mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 09:15:29 +01:00
Merge pull request #778 from propheel/feat/updateDependencies
Update dependencies
This commit is contained in:
commit
bf27a35ef5
14 changed files with 7188 additions and 7882 deletions
3
.babelrc
3
.babelrc
|
@ -6,7 +6,8 @@
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"static-fs",
|
"static-fs",
|
||||||
"react-hot-loader/babel",
|
"react-hot-loader/babel",
|
||||||
"@babel/plugin-proposal-class-properties"
|
"@babel/plugin-proposal-class-properties",
|
||||||
|
"@babel/transform-runtime"
|
||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"test": {
|
"test": {
|
||||||
|
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -78,7 +78,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
node-version: [10.x]
|
node-version: [16.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -166,11 +166,11 @@ jobs:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
selenium:
|
selenium:
|
||||||
image: selenium/standalone-${{ matrix.browser }}
|
# geckodriver-0.31 seems to have problems as of 2022 May 1
|
||||||
|
image: selenium/standalone-${{ matrix.browser == 'firefox' && 'firefox:99.0-geckodriver-0.30-20220427' || matrix.browser }}
|
||||||
ports:
|
ports:
|
||||||
- 4444:4444
|
- 4444:4444
|
||||||
volumes: # share shm with host: https://stackoverflow.com/questions/53902507/unknown-error-session-deleted-because-of-page-crash-from-unknown-error-cannot
|
options: --shm-size=2gb
|
||||||
- /dev/shm:/dev/shm
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
24
README.md
24
README.md
|
@ -46,14 +46,14 @@ Install the deps, start the dev server and open the web browser on `http://local
|
||||||
# install dependencies
|
# install dependencies
|
||||||
npm install
|
npm install
|
||||||
# start dev server
|
# start dev server
|
||||||
npm start
|
npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want Maputnik to be accessible externally use the [`--host` option](https://webpack.js.org/configuration/dev-server/#devserverhost):
|
If you want Maputnik to be accessible externally use the [`--host` option](https://webpack.js.org/configuration/dev-server/#devserverhost):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# start externally accessible dev server
|
# start externally accessible dev server
|
||||||
npm start -- --host 0.0.0.0
|
npm run start -- --host 0.0.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
The build process will watch for changes to the filesystem, rebuild and autoreload the editor. However note this from the [webpack-dev-server docs](https://webpack.js.org/configuration/dev-server/):
|
The build process will watch for changes to the filesystem, rebuild and autoreload the editor. However note this from the [webpack-dev-server docs](https://webpack.js.org/configuration/dev-server/):
|
||||||
|
@ -76,26 +76,18 @@ npm run lint-styles
|
||||||
|
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
For testing we use [webdriverio](http://webdriver.io) and [selenium-standalone](https://github.com/vvo/selenium-standalone)
|
For testing we use [webdriverio](https://webdriver.io) and [selenium-standalone](https://github.com/webdriverio/selenium-standalone).
|
||||||
|
|
||||||
[selenium-standalone](https://github.com/vvo/selenium-standalone) starts a server that will launch browsers on your local machine. We use chrome so you **must** have chrome installed on your machine.
|
[selenium-standalone](https://github.com/webdriverio/selenium-standalone) starts a server that will launch browsers on your local machine. You need to have Java installed on your machine as well as *chrome* or *firefox*.
|
||||||
|
|
||||||
Now open a terminal and run the following. This will install the drivers on your local machine
|
Now open a terminal and run the following using *chrome*:
|
||||||
|
|
||||||
```
|
```
|
||||||
./node_modules/.bin/selenium-standalone install
|
npm run test
|
||||||
```
|
```
|
||||||
|
or *firefox*:
|
||||||
Now start the standalone server
|
|
||||||
|
|
||||||
```
|
```
|
||||||
./node_modules/.bin/selenium-standalone start
|
BROWSER=firefox npm run test
|
||||||
```
|
|
||||||
|
|
||||||
Then open another terminal and run
|
|
||||||
|
|
||||||
```
|
|
||||||
npm test
|
|
||||||
```
|
```
|
||||||
|
|
||||||
After some time you should see a browser launch which will be automated by the test runner.
|
After some time you should see a browser launch which will be automated by the test runner.
|
||||||
|
|
|
@ -3,7 +3,6 @@ var WebpackDevServer = require("webpack-dev-server");
|
||||||
var webpackConfig = require("./webpack.config");
|
var webpackConfig = require("./webpack.config");
|
||||||
var testConfig = require("../test/config/specs");
|
var testConfig = require("../test/config/specs");
|
||||||
var artifacts = require("../test/artifacts");
|
var artifacts = require("../test/artifacts");
|
||||||
var isDocker = require("is-docker");
|
|
||||||
|
|
||||||
|
|
||||||
var server;
|
var server;
|
||||||
|
@ -22,6 +21,8 @@ exports.config = {
|
||||||
browserName: (process.env.BROWSER || 'chrome'),
|
browserName: (process.env.BROWSER || 'chrome'),
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
// geckodriver-0.31 seems to have problems as of 2022 May 1
|
||||||
|
services: process.env.DOCKER_HOST ? [] : [ ['selenium-standalone', { drivers: { firefox: '0.30.0', chrome: 'latest' } } ] ],
|
||||||
logLevel: 'info',
|
logLevel: 'info',
|
||||||
bail: 0,
|
bail: 0,
|
||||||
screenshotPath: SCREENSHOT_PATH,
|
screenshotPath: SCREENSHOT_PATH,
|
||||||
|
@ -33,39 +34,14 @@ exports.config = {
|
||||||
// Because we don't know how long the initial build will take...
|
// Because we don't know how long the initial build will take...
|
||||||
timeout: 4*60*1000,
|
timeout: 4*60*1000,
|
||||||
},
|
},
|
||||||
onPrepare: function (config, capabilities) {
|
onPrepare: async function (config, capabilities) {
|
||||||
return new Promise(function(resolve, reject) {
|
webpackConfig.devServer.host = testConfig.testNetwork;
|
||||||
var compiler = webpack(webpackConfig);
|
webpackConfig.devServer.port = testConfig.port;
|
||||||
const serverHost = "0.0.0.0";
|
const compiler = webpack(webpackConfig);
|
||||||
|
server = new WebpackDevServer(webpackConfig.devServer, compiler);
|
||||||
server = new WebpackDevServer(compiler, {
|
await server.start();
|
||||||
host: serverHost,
|
|
||||||
disableHostCheck: true,
|
|
||||||
stats: {
|
|
||||||
colors: true
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
server.listen(testConfig.port, serverHost, function(err) {
|
|
||||||
if(err) {
|
|
||||||
reject(err);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
onComplete: function(exitCode) {
|
onComplete: async function (exitCode, config, capabilities) {
|
||||||
return new Promise(function(resolve, reject) {
|
await server.stop();
|
||||||
server.close(function (err) {
|
|
||||||
if (err) {
|
|
||||||
reject(err)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
var webpack = require('webpack');
|
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var rules = require('./webpack.rules');
|
var rules = require('./webpack.rules');
|
||||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
@ -37,27 +36,25 @@ module.exports = {
|
||||||
tls: 'empty'
|
tls: 'empty'
|
||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
contentBase: "./public",
|
|
||||||
// See <https://webpack.js.org/configuration/stats/> for details
|
|
||||||
stats: 'minimal',
|
|
||||||
// enable HMR
|
// enable HMR
|
||||||
hot: true,
|
hot: true,
|
||||||
// embed the webpack-dev-server runtime into the bundle
|
|
||||||
inline: true,
|
|
||||||
// serve index.html in place of 404 responses to allow HTML5 history
|
// serve index.html in place of 404 responses to allow HTML5 history
|
||||||
historyApiFallback: true,
|
historyApiFallback: true,
|
||||||
port: PORT,
|
port: PORT,
|
||||||
host: HOST,
|
host: HOST,
|
||||||
watchOptions: {
|
watchFiles: {
|
||||||
// Disabled polling by default as it causes lots of CPU usage and hence drains laptop batteries. To enable polling add WEBPACK_DEV_SERVER_POLLING to your environment
|
options: {
|
||||||
// See <https://webpack.js.org/configuration/watch/#watchoptions-poll> for details
|
// Disabled polling by default as it causes lots of CPU usage and hence drains laptop batteries. To enable polling add WEBPACK_DEV_SERVER_POLLING to your environment
|
||||||
poll: (!!process.env.WEBPACK_DEV_SERVER_POLLING ? true : false),
|
// See <https://webpack.js.org/configuration/watch/#watchoptions-poll> for details
|
||||||
watch: false
|
usePolling: (!!process.env.WEBPACK_DEV_SERVER_POLLING ? true : false),
|
||||||
},
|
watch: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
optimization: {
|
||||||
|
noEmitOnErrors: true,
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.NoEmitOnErrorsPlugin(),
|
|
||||||
new webpack.HotModuleReplacementPlugin(),
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
title: 'Maputnik',
|
title: 'Maputnik',
|
||||||
template: './src/template.html'
|
template: './src/template.html'
|
||||||
|
@ -65,11 +62,13 @@ module.exports = {
|
||||||
new HtmlWebpackInlineSVGPlugin({
|
new HtmlWebpackInlineSVGPlugin({
|
||||||
runPreEmit: true,
|
runPreEmit: true,
|
||||||
}),
|
}),
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin({
|
||||||
{
|
patterns: [
|
||||||
from: './src/manifest.json',
|
{
|
||||||
to: 'manifest.json'
|
from: './src/manifest.json',
|
||||||
}
|
to: 'manifest.json'
|
||||||
])
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -48,12 +48,14 @@ module.exports = {
|
||||||
new HtmlWebpackInlineSVGPlugin({
|
new HtmlWebpackInlineSVGPlugin({
|
||||||
runPreEmit: true,
|
runPreEmit: true,
|
||||||
}),
|
}),
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin({
|
||||||
{
|
patterns: [
|
||||||
from: './src/manifest.json',
|
{
|
||||||
to: 'manifest.json'
|
from: './src/manifest.json',
|
||||||
}
|
to: 'manifest.json'
|
||||||
]),
|
}
|
||||||
|
]
|
||||||
|
}),
|
||||||
new BundleAnalyzerPlugin({
|
new BundleAnalyzerPlugin({
|
||||||
analyzerMode: 'static',
|
analyzerMode: 'static',
|
||||||
defaultSizes: 'gzip',
|
defaultSizes: 'gzip',
|
||||||
|
|
14738
package-lock.json
generated
14738
package-lock.json
generated
File diff suppressed because it is too large
Load diff
158
package.json
158
package.json
|
@ -4,14 +4,14 @@
|
||||||
"description": "A MapboxGL visual style editor",
|
"description": "A MapboxGL visual style editor",
|
||||||
"main": "''",
|
"main": "''",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"stats": "webpack --config config/webpack.production.config.js --profile --json > stats.json",
|
"stats": "webpack --config config/webpack.production.config.js --progress=profile --json > stats.json",
|
||||||
"build": "webpack --config config/webpack.production.config.js --progress --profile --colors",
|
"build": "webpack --config config/webpack.production.config.js --progress=profile --color",
|
||||||
"profiling-build": "webpack --config config/webpack.profiling.config.js --progress --profile --colors",
|
"profiling-build": "webpack --config config/webpack.profiling.config.js --progress=profile --color",
|
||||||
"test": "cross-env NODE_ENV=test wdio config/wdio.conf.js",
|
"test": "cross-env NODE_ENV=test wdio config/wdio.conf.js",
|
||||||
"test-watch": "cross-env NODE_ENV=test wdio config/wdio.conf.js --watch",
|
"test-watch": "cross-env NODE_ENV=test wdio config/wdio.conf.js --watch",
|
||||||
"start": "webpack-dev-server --progress --profile --colors --config config/webpack.config.js",
|
"start": "webpack-dev-server --progress=profile --color --config config/webpack.config.js",
|
||||||
"start-prod": "webpack-dev-server --progress --profile --colors --config config/webpack.production.config.js",
|
"start-prod": "webpack-dev-server --progress=profile --color --config config/webpack.production.config.js",
|
||||||
"start-sandbox": "webpack-dev-server --disable-host-check --host 0.0.0.0 --progress --profile --colors --config config/webpack.production.config.js",
|
"start-sandbox": "webpack-dev-server --disable-host-check --host 0.0.0.0 --progress=profile --color --config config/webpack.production.config.js",
|
||||||
"lint-js": "eslint --ext js --ext jsx src test",
|
"lint-js": "eslint --ext js --ext jsx src test",
|
||||||
"lint-css": "stylelint \"src/styles/*.scss\"",
|
"lint-css": "stylelint \"src/styles/*.scss\"",
|
||||||
"lint": "npm run lint-js && npm run lint-css",
|
"lint": "npm run lint-js && npm run lint-css",
|
||||||
|
@ -26,49 +26,48 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://github.com/maputnik/editor#readme",
|
"homepage": "https://github.com/maputnik/editor#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.8.4",
|
"@babel/runtime": "^7.17.9",
|
||||||
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
|
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
|
||||||
"@mapbox/mapbox-gl-style-spec": "^13.15.0",
|
"@mapbox/mapbox-gl-style-spec": "^13.23.1",
|
||||||
"@mdi/react": "^1.4.0",
|
"@mdi/react": "^1.5.0",
|
||||||
"array-move": "^2.2.1",
|
"array-move": "^4.0.0",
|
||||||
"caniuse-lite": "^1.0.30001325",
|
"classnames": "^2.3.1",
|
||||||
"classnames": "^2.2.6",
|
"codemirror": "^5.65.2",
|
||||||
"codemirror": "^5.52.0",
|
"color": "^4.2.3",
|
||||||
"color": "^3.1.2",
|
"detect-browser": "^5.3.0",
|
||||||
"detect-browser": "^5.0.0",
|
"file-saver": "^2.0.5",
|
||||||
"file-saver": "^2.0.2",
|
"json-stringify-pretty-compact": "^3.0.0",
|
||||||
"json-to-ast": "^2.1.0",
|
"json-to-ast": "^2.1.0",
|
||||||
"jsonlint": "github:josdejong/jsonlint#85a19d7",
|
"jsonlint": "github:josdejong/jsonlint#85a19d7",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.21",
|
||||||
"lodash.capitalize": "^4.2.1",
|
"lodash.capitalize": "^4.2.1",
|
||||||
"lodash.clamp": "^4.0.3",
|
"lodash.clamp": "^4.0.3",
|
||||||
"lodash.clonedeep": "^4.5.0",
|
"lodash.clonedeep": "^4.5.0",
|
||||||
"lodash.get": "^4.4.2",
|
"lodash.get": "^4.4.2",
|
||||||
"lodash.isequal": "^4.5.0",
|
"lodash.isequal": "^4.5.0",
|
||||||
"lodash.throttle": "^4.1.1",
|
"lodash.throttle": "^4.1.1",
|
||||||
"mapbox-gl": "^1.11.0",
|
"mapbox-gl": "^1.13.2",
|
||||||
"mapbox-gl-inspect": "^1.3.1",
|
"mapbox-gl-inspect": "^1.3.1",
|
||||||
"maputnik-design": "github:maputnik/design#172b06c",
|
"maputnik-design": "github:maputnik/design#172b06c",
|
||||||
"ol": "^6.3.1",
|
"ol": "^6.14.1",
|
||||||
"ol-mapbox-style": "^6.0.1",
|
"ol-mapbox-style": "^7.1.1",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.8.1",
|
||||||
"react": "^16.12.0",
|
"react": "^16.0.0",
|
||||||
"react-accessible-accordion": "^3.0.1",
|
"react-accessible-accordion": "^4.0.0",
|
||||||
"react-aria-menubutton": "^6.3.0",
|
"react-aria-menubutton": "^7.0.3",
|
||||||
"react-aria-modal": "^4.0.0",
|
"react-aria-modal": "^4.0.1",
|
||||||
"react-autobind": "^1.0.6",
|
"react-autobind": "^1.0.6",
|
||||||
"react-autocomplete": "^1.8.1",
|
"react-autocomplete": "^1.8.1",
|
||||||
"react-collapse": "^5.0.1",
|
"react-collapse": "^5.1.1",
|
||||||
"react-color": "^2.18.0",
|
"react-color": "^2.19.3",
|
||||||
"react-dom": "^16.12.0",
|
"react-dom": "^16.0.0",
|
||||||
"react-file-reader-input": "^2.0.0",
|
"react-file-reader-input": "^2.0.0",
|
||||||
"react-icon-base": "^2.1.2",
|
"react-icon-base": "^2.1.2",
|
||||||
"react-icons": "^3.9.0",
|
"react-icons": "^4.3.1",
|
||||||
"react-motion": "^0.5.2",
|
"react-sortable-hoc": "^2.0.0",
|
||||||
"react-sortable-hoc": "^1.11.0",
|
|
||||||
"reconnecting-websocket": "^4.4.0",
|
"reconnecting-websocket": "^4.4.0",
|
||||||
"sass": "^1.49.9",
|
"sass": "^1.50.0",
|
||||||
"slugify": "^1.4.5",
|
"slugify": "^1.6.5",
|
||||||
"string-hash": "^1.1.3",
|
"string-hash": "^1.1.3",
|
||||||
"url": "^0.11.0"
|
"url": "^0.11.0"
|
||||||
},
|
},
|
||||||
|
@ -118,59 +117,58 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.8.4",
|
"@babel/core": "^7.17.9",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.5.5",
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
||||||
"@babel/plugin-transform-runtime": "^7.6.2",
|
"@babel/plugin-transform-runtime": "^7.17.0",
|
||||||
"@babel/preset-env": "^7.6.3",
|
"@babel/preset-env": "^7.16.11",
|
||||||
"@babel/preset-flow": "^7.0.0",
|
"@babel/preset-flow": "^7.16.7",
|
||||||
"@babel/preset-react": "^7.6.3",
|
"@babel/preset-react": "^7.16.7",
|
||||||
"@mdi/js": "^5.0.45",
|
"@mdi/js": "^6.6.96",
|
||||||
"@storybook/addon-a11y": "^5.3.19",
|
"@storybook/addon-a11y": "^6.4.20",
|
||||||
"@storybook/addon-actions": "^5.3.19",
|
"@storybook/addon-actions": "^6.4.20",
|
||||||
"@storybook/addon-links": "^5.3.19",
|
"@storybook/addon-links": "^6.4.20",
|
||||||
"@storybook/addon-storysource": "^5.3.19",
|
"@storybook/addon-storysource": "^6.4.20",
|
||||||
"@storybook/addons": "^5.3.19",
|
"@storybook/addons": "^6.4.20",
|
||||||
"@storybook/react": "^5.3.19",
|
"@storybook/react": "^6.4.20",
|
||||||
"@storybook/theming": "^5.3.19",
|
"@storybook/theming": "^6.4.20",
|
||||||
"@wdio/cli": "^6.1.14",
|
"@wdio/cli": "^7.19.3",
|
||||||
"@wdio/local-runner": "^6.1.14",
|
"@wdio/local-runner": "^7.19.3",
|
||||||
"@wdio/mocha-framework": "^6.1.14",
|
"@wdio/mocha-framework": "^7.19.3",
|
||||||
"@wdio/selenium-standalone-service": "^6.1.14",
|
"@wdio/selenium-standalone-service": "^7.19.1",
|
||||||
"@wdio/spec-reporter": "^6.1.14",
|
"@wdio/spec-reporter": "^7.19.1",
|
||||||
"babel-eslint": "^10.0.3",
|
"babel-eslint": "^10.1.0",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.2.4",
|
||||||
"babel-plugin-istanbul": "^6.0.0",
|
"babel-plugin-istanbul": "^6.1.1",
|
||||||
"babel-plugin-static-fs": "^3.0.0",
|
"babel-plugin-static-fs": "^3.0.0",
|
||||||
"copy-webpack-plugin": "^5.1.1",
|
"copy-webpack-plugin": "^6.4.1",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.3",
|
||||||
"css-loader": "^3.4.2",
|
"css-loader": "^5.2.7",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^8.12.0",
|
||||||
"eslint-plugin-react": "^7.18.3",
|
"eslint-plugin-react": "^7.29.4",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.3",
|
||||||
"file-loader": "^6.0.0",
|
"html-webpack-inline-svg-plugin": "^2.3.0",
|
||||||
"html-webpack-inline-svg-plugin": "^1.3.0",
|
"html-webpack-plugin": "^4.5.2",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
|
||||||
"is-docker": "^2.0.0",
|
|
||||||
"istanbul": "^0.4.5",
|
"istanbul": "^0.4.5",
|
||||||
"istanbul-lib-coverage": "^3.0.0",
|
"istanbul-lib-coverage": "^3.2.0",
|
||||||
"mkdirp": "^1.0.4",
|
"mkdirp": "^1.0.4",
|
||||||
"mocha": "^7.1.2",
|
"mocha": "^9.2.2",
|
||||||
"react-hot-loader": "^4.12.19",
|
"postcss": "^8.4.12",
|
||||||
"sass-loader": "^8.0.2",
|
"react-hot-loader": "^4.13.0",
|
||||||
"selenium-standalone": "^6.17.0",
|
"sass-loader": "^10.2.1",
|
||||||
"style-loader": "^1.1.3",
|
"style-loader": "^2.0.0",
|
||||||
"stylelint": "^13.3.0",
|
"stylelint": "^14.6.1",
|
||||||
"stylelint-config-recommended-scss": "^4.2.0",
|
"stylelint-config-recommended-scss": "^6.0.0",
|
||||||
"stylelint-scss": "^3.14.2",
|
"stylelint-scss": "^4.2.0",
|
||||||
"svg-inline-loader": "^0.8.2",
|
"svg-inline-loader": "^0.8.2",
|
||||||
"transform-loader": "^0.2.4",
|
"transform-loader": "^0.2.4",
|
||||||
"uuid": "^7.0.3",
|
"typescript": "^4.6.3",
|
||||||
"webdriverio": "^6.1.11",
|
"uuid": "^8.3.2",
|
||||||
"webpack": "^4.41.6",
|
"webdriverio": "^7.19.3",
|
||||||
"webpack-bundle-analyzer": "^3.6.0",
|
"webpack": "^4.46.0",
|
||||||
|
"webpack-bundle-analyzer": "^4.5.0",
|
||||||
"webpack-cleanup-plugin": "^0.5.1",
|
"webpack-cleanup-plugin": "^0.5.1",
|
||||||
"webpack-cli": "^3.3.11",
|
"webpack-cli": "^4.9.2",
|
||||||
"webpack-dev-server": "^3.10.3"
|
"webpack-dev-server": "^4.8.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import cloneDeep from 'lodash.clonedeep'
|
||||||
import clamp from 'lodash.clamp'
|
import clamp from 'lodash.clamp'
|
||||||
import get from 'lodash.get'
|
import get from 'lodash.get'
|
||||||
import {unset} from 'lodash'
|
import {unset} from 'lodash'
|
||||||
import arrayMove from 'array-move'
|
import {arrayMoveMutable} from 'array-move'
|
||||||
import url from 'url'
|
import url from 'url'
|
||||||
import hash from "string-hash";
|
import hash from "string-hash";
|
||||||
|
|
||||||
|
@ -486,7 +486,7 @@ export default class App extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
layers = layers.slice(0);
|
layers = layers.slice(0);
|
||||||
layers = arrayMove(layers, oldIndex, newIndex);
|
arrayMoveMutable(layers, oldIndex, newIndex);
|
||||||
this.onLayersChange(layers);
|
this.onLayersChange(layers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -764,17 +764,17 @@ export default class App extends React.Component {
|
||||||
parseInt(parts[1], 10),
|
parseInt(parts[1], 10),
|
||||||
];
|
];
|
||||||
|
|
||||||
let invalid = false;
|
let valid = true;
|
||||||
if (hashVal !== "-") {
|
if (hashVal !== "-") {
|
||||||
const currentHashVal = hash(JSON.stringify(mapStyle));
|
const currentHashVal = hash(JSON.stringify(mapStyle));
|
||||||
if (currentHashVal !== parseInt(hashVal, 10)) {
|
if (currentHashVal !== parseInt(hashVal, 10)) {
|
||||||
invalid = true;
|
valid = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!invalid) {
|
if (valid) {
|
||||||
this.setState({
|
this.setState({
|
||||||
selectedLayerIndex,
|
selectedLayerIndex,
|
||||||
selectedLayerOriginalId: this.state.mapStyle.layers[selectedLayerIndex].id,
|
selectedLayerOriginalId: mapStyle.layers[selectedLayerIndex].id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,6 +326,7 @@ export default class LayerList extends React.Component {
|
||||||
helperClass='sortableHelper'
|
helperClass='sortableHelper'
|
||||||
onSortEnd={this.props.onMoveLayer.bind(this)}
|
onSortEnd={this.props.onMoveLayer.bind(this)}
|
||||||
useDragHandle={true}
|
useDragHandle={true}
|
||||||
|
shouldCancelStart={() => false}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -276,26 +276,6 @@ export default class DataProperty extends React.Component {
|
||||||
{deleteStopBtn}
|
{deleteStopBtn}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
return <Block
|
|
||||||
error={error}
|
|
||||||
key={key}
|
|
||||||
action={deleteStopBtn}
|
|
||||||
label=""
|
|
||||||
>
|
|
||||||
{zoomInput}
|
|
||||||
<div className="maputnik-data-spec-property-stop-data">
|
|
||||||
{dataInput}
|
|
||||||
</div>
|
|
||||||
<div className="maputnik-data-spec-property-stop-value">
|
|
||||||
<InputSpec
|
|
||||||
fieldName={this.props.fieldName}
|
|
||||||
fieldSpec={this.props.fieldSpec}
|
|
||||||
value={value}
|
|
||||||
onChange={(_, newValue) => this.changeStop(idx, {zoom: zoomLevel, value: dataLevel}, newValue)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Block>
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
var config = {};
|
var config = {};
|
||||||
var testNetwork = process.env.TEST_NETWORK || "localhost";
|
config.testNetwork = process.env.TEST_NETWORK || "localhost";
|
||||||
|
|
||||||
config.port = 9001;
|
config.port = 9001;
|
||||||
config.baseUrl = "http://"+testNetwork+":"+config.port;
|
config.baseUrl = "http://"+config.testNetwork+":"+config.port;
|
||||||
|
|
||||||
module.exports = config;
|
module.exports = config;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
var wd = require("../wd-helper");
|
var wd = require("../wd-helper");
|
||||||
var uuid = require('uuid/v1');
|
var {v1: uuid} = require('uuid');
|
||||||
var geoServer = require("../geojson-server");
|
var geoServer = require("../geojson-server");
|
||||||
|
|
||||||
var testNetwork = process.env.TEST_NETWORK || "localhost";
|
var testNetwork = process.env.TEST_NETWORK || "localhost";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var assert = require("assert");
|
var assert = require("assert");
|
||||||
var config = require("../../config/specs");
|
var config = require("../../config/specs");
|
||||||
var helper = require("../helper");
|
var helper = require("../helper");
|
||||||
var uuid = require('uuid/v1');
|
var {v1: uuid} = require('uuid');
|
||||||
var wd = require("../../wd-helper");
|
var wd = require("../../wd-helper");
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue