From a22476cab278739f921fd37965cce30b76c4b191 Mon Sep 17 00:00:00 2001 From: Harel M Date: Tue, 26 Dec 2023 23:13:22 +0200 Subject: [PATCH] Add lint to CI and fix errors (#853) Adds lint to CI and fixes errors. I'm not sure I'm fully proud of all the solutions there. But there's no lint issues and the lint is being checked as part of the CI. --------- Co-authored-by: Yuri Astrakhan --- .eslintrc | 45 ++ .eslintrc.cjs | 20 - .github/workflows/ci.yml | 3 + package-lock.json | 383 +++++++++++------- package.json | 9 +- src/components/App.tsx | 68 ++-- src/components/AppLayout.tsx | 4 +- src/components/Block.tsx | 2 +- src/components/Doc.tsx | 2 +- src/components/FieldFunction.tsx | 2 +- src/components/Fieldset.tsx | 5 +- src/components/FilterEditor.tsx | 10 +- src/components/IconLayer.tsx | 20 +- src/components/InputAutocomplete.tsx | 2 +- src/components/InputCheckbox.tsx | 4 +- src/components/InputColor.tsx | 6 +- src/components/InputDynamicArray.tsx | 2 +- src/components/InputNumber.tsx | 10 +- src/components/InputSpec.tsx | 109 ++--- src/components/InputString.tsx | 6 +- src/components/InputUrl.tsx | 4 +- src/components/LayerEditor.tsx | 140 +++---- src/components/LayerEditorGroup.tsx | 8 +- src/components/LayerList.tsx | 43 +- src/components/LayerListItem.tsx | 50 +-- src/components/MapMaplibreGl.tsx | 2 +- .../MapMaplibreGlFeaturePropertyPopup.tsx | 4 +- src/components/MapMaplibreGlLayerPopup.tsx | 18 +- src/components/MapOpenLayers.tsx | 2 +- src/components/ModalAdd.tsx | 48 +-- src/components/ModalLoading.tsx | 2 +- src/components/ModalOpen.tsx | 54 +-- src/components/ModalSources.tsx | 158 ++++---- src/components/ModalSourcesTypeEditor.tsx | 44 +- src/components/_DataProperty.tsx | 4 +- src/components/_ExpressionProperty.tsx | 12 +- src/components/_ZoomProperty.tsx | 2 +- src/index.jsx | 1 - src/libs/apistore.ts | 42 +- src/libs/debug.ts | 2 +- src/libs/layer.ts | 18 + src/libs/metadata.ts | 24 +- src/libs/stylestore.ts | 16 +- src/libs/urlopen.ts | 20 +- src/styles/_components.scss | 5 +- src/styles/_filtereditor.scss | 6 +- src/styles/_input.scss | 15 +- src/styles/_layer.scss | 27 +- src/styles/_modal.scss | 12 +- src/styles/_toolbar.scss | 7 +- src/styles/_zoomproperty.scss | 8 +- src/styles/index.scss | 3 - src/util/codemirror-mgl.ts | 6 +- src/util/spec-helper.ts | 2 +- tsconfig.json | 1 + 55 files changed, 831 insertions(+), 691 deletions(-) create mode 100644 .eslintrc delete mode 100644 .eslintrc.cjs diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..996d01b4 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,45 @@ +{ + "root": true, + "env": { + "browser": true, + "es2020": true + }, + "extends": [ + "eslint:recommended", + "plugin:react/recommended", + "plugin:react/jsx-runtime", + "plugin:react-hooks/recommended", + ], + "ignorePatterns": [ + "dist" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "settings": { + "react": { "version": "16.4" } + }, + "plugins": [ + "@typescript-eslint", + "react-refresh"], + "rules": { + "react-refresh/only-export-components": [ + "warn", + { "allowConstantExport": true } + ], + "@typescript-eslint/no-unused-vars": [ + "warn", + { "argsIgnorePattern": "^_" } + ], + "no-unused-vars": "off", + "react/prop-types": ["off"], + // Disable no-undef. It's covered by @typescript-eslint + "no-undef": "off", + "indent": ["error", 2] + }, + "globals": { + "global": "readonly" + } +} diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 3b84bd6e..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - root: true, - env: { browser: true, es2020: true }, - extends: [ - 'eslint:recommended', - 'plugin:react/recommended', - 'plugin:react/jsx-runtime', - 'plugin:react-hooks/recommended', - ], - ignorePatterns: ['dist', '.eslintrc.cjs'], - parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, - settings: { react: { version: '18.2' } }, - plugins: ['react-refresh'], - rules: { - 'react-refresh/only-export-components': [ - 'warn', - { allowConstantExport: true }, - ], - }, - } \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5b591d1..e9446c78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,9 @@ jobs: ${{ runner.os }}-node- - run: npm ci - run: npm run build + - run: npm run lint + - run: npm run lint-css + build-artifacts: diff --git a/package-lock.json b/package-lock.json index 993cf5cf..4fd76174 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,8 @@ "@maplibre/maplibre-gl-style-spec": "^17.0.1", "@mdi/js": "^6.6.96", "@mdi/react": "^1.5.0", + "@typescript-eslint/eslint-plugin": "^6.16.0", + "@typescript-eslint/parser": "^6.16.0", "array-move": "^4.0.0", "buffer": "^6.0.3", "classnames": "^2.3.1", @@ -73,6 +75,7 @@ "@types/color": "^3.0.6", "@types/cors": "^2.8.17", "@types/file-saver": "^2.0.7", + "@types/geojson": "^7946.0.13", "@types/json-to-ast": "^2.1.4", "@types/lodash.capitalize": "^4.2.9", "@types/lodash.clamp": "^4.0.9", @@ -94,10 +97,10 @@ "@vitejs/plugin-react": "^4.2.0", "cors": "^2.8.5", "cypress": "^13.6.1", - "eslint": "^8.53.0", + "eslint": "^8.56.0", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.4", + "eslint-plugin-react-refresh": "^0.4.5", "express": "^4.17.3", "istanbul": "^0.4.5", "istanbul-lib-coverage": "^3.2.0", @@ -118,7 +121,6 @@ "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -2824,7 +2826,6 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -2839,7 +2840,6 @@ "version": "4.10.0", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", - "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -2848,7 +2848,6 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -2871,7 +2870,6 @@ "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -2886,7 +2884,6 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, "engines": { "node": ">=10" }, @@ -2898,7 +2895,6 @@ "version": "8.56.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -2913,7 +2909,6 @@ "version": "0.11.13", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", - "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", @@ -2927,7 +2922,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, "engines": { "node": ">=12.22" }, @@ -2939,8 +2933,7 @@ "node_modules/@humanwhocodes/object-schema": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", - "dev": true + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==" }, "node_modules/@icons/material": { "version": "0.2.4", @@ -3426,7 +3419,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -3439,7 +3431,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, "engines": { "node": ">= 8" } @@ -3448,7 +3439,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -4952,9 +4942,7 @@ "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "peer": true + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@types/json-to-ast": { "version": "2.1.4", @@ -5229,8 +5217,7 @@ "node_modules/@types/semver": { "version": "7.5.6", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", - "dev": true + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==" }, "node_modules/@types/send": { "version": "0.17.4", @@ -5296,6 +5283,210 @@ "@types/node": "*" } }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.16.0.tgz", + "integrity": "sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ==", + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.16.0", + "@typescript-eslint/type-utils": "6.16.0", + "@typescript-eslint/utils": "6.16.0", + "@typescript-eslint/visitor-keys": "6.16.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.16.0.tgz", + "integrity": "sha512-H2GM3eUo12HpKZU9njig3DF5zJ58ja6ahj1GoHEHOgQvYxzoFJJEvC1MQ7T2l9Ha+69ZSOn7RTxOdpC/y3ikMw==", + "dependencies": { + "@typescript-eslint/scope-manager": "6.16.0", + "@typescript-eslint/types": "6.16.0", + "@typescript-eslint/typescript-estree": "6.16.0", + "@typescript-eslint/visitor-keys": "6.16.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.16.0.tgz", + "integrity": "sha512-0N7Y9DSPdaBQ3sqSCwlrm9zJwkpOuc6HYm7LpzLAPqBL7dmzAUimr4M29dMkOP/tEwvOCC/Cxo//yOfJD3HUiw==", + "dependencies": { + "@typescript-eslint/types": "6.16.0", + "@typescript-eslint/visitor-keys": "6.16.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.16.0.tgz", + "integrity": "sha512-ThmrEOcARmOnoyQfYkHw/DX2SEYBalVECmoldVuH6qagKROp/jMnfXpAU/pAIWub9c4YTxga+XwgAkoA0pxfmg==", + "dependencies": { + "@typescript-eslint/typescript-estree": "6.16.0", + "@typescript-eslint/utils": "6.16.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.16.0.tgz", + "integrity": "sha512-hvDFpLEvTJoHutVl87+MG/c5C8I6LOgEx05zExTSJDEVU7hhR3jhV8M5zuggbdFCw98+HhZWPHZeKS97kS3JoQ==", + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.16.0.tgz", + "integrity": "sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA==", + "dependencies": { + "@typescript-eslint/types": "6.16.0", + "@typescript-eslint/visitor-keys": "6.16.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.16.0.tgz", + "integrity": "sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A==", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.16.0", + "@typescript-eslint/types": "6.16.0", + "@typescript-eslint/typescript-estree": "6.16.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.16.0.tgz", + "integrity": "sha512-QSFQLruk7fhs91a/Ep/LqRdbJCZ1Rq03rqBdKT5Ky17Sz8zRLUksqIe9DW0pKtg/Z35/ztbLQ6qpOCN6rOC11A==", + "dependencies": { + "@typescript-eslint/types": "6.16.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", @@ -5305,8 +5496,7 @@ "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, "node_modules/@vitejs/plugin-react": { "version": "4.2.1", @@ -5578,7 +5768,6 @@ "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -5590,7 +5779,6 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -5642,7 +5830,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5766,7 +5953,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -5775,7 +5961,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -5845,8 +6030,7 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/array-buffer-byte-length": { "version": "1.0.0", @@ -5901,7 +6085,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, "engines": { "node": ">=8" } @@ -6308,8 +6491,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/base64-js": { "version": "1.5.1", @@ -6494,7 +6676,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6670,7 +6851,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, "engines": { "node": ">=6" } @@ -6740,7 +6920,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -7132,8 +7311,7 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/concat-stream": { "version": "1.6.2", @@ -7280,7 +7458,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -7507,7 +7684,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -7557,8 +7733,7 @@ "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "node_modules/default-browser-id": { "version": "3.0.0", @@ -7804,7 +7979,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, "dependencies": { "path-type": "^4.0.0" }, @@ -7816,7 +7990,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, "dependencies": { "esutils": "^2.0.2" }, @@ -8240,7 +8413,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, "engines": { "node": ">=10" }, @@ -8273,7 +8445,6 @@ "version": "8.56.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", - "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -8400,7 +8571,6 @@ "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -8416,7 +8586,6 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -8428,7 +8597,6 @@ "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -8443,7 +8611,6 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, "engines": { "node": ">=10" }, @@ -8455,7 +8622,6 @@ "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -8472,7 +8638,6 @@ "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", - "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -8497,7 +8662,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -8509,7 +8673,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -8521,7 +8684,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "engines": { "node": ">=4.0" } @@ -8536,7 +8698,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -8711,14 +8872,12 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -8734,7 +8893,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -8745,14 +8903,12 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "node_modules/fastest-levenshtein": { "version": "1.0.16", @@ -8767,7 +8923,6 @@ "version": "1.16.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", - "dev": true, "dependencies": { "reusify": "^1.0.4" } @@ -8815,7 +8970,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, "dependencies": { "flat-cache": "^3.0.4" }, @@ -9011,7 +9165,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -9036,7 +9189,6 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -9049,8 +9201,7 @@ "node_modules/flatted": { "version": "3.2.9", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", - "dev": true + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" }, "node_modules/flow-parser": { "version": "0.224.0", @@ -9225,8 +9376,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { "version": "2.3.3", @@ -9475,7 +9625,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -9607,7 +9756,6 @@ "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -9654,8 +9802,7 @@ "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" }, "node_modules/grid-index": { "version": "1.1.0", @@ -9740,7 +9887,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -9958,7 +10104,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", - "dev": true, "engines": { "node": ">= 4" } @@ -9972,7 +10117,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -9988,7 +10132,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, "engines": { "node": ">=4" } @@ -10006,7 +10149,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, "engines": { "node": ">=0.8.19" } @@ -10024,7 +10166,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -10033,8 +10174,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ini": { "version": "2.0.0", @@ -10405,7 +10545,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -11071,7 +11210,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -11139,8 +11277,7 @@ "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", @@ -11157,14 +11294,12 @@ "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" }, "node_modules/json-stringify-pretty-compact": { "version": "3.0.0", @@ -11274,7 +11409,6 @@ "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, "dependencies": { "json-buffer": "3.0.1" } @@ -11343,7 +11477,6 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -11430,7 +11563,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -11491,8 +11623,7 @@ "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "node_modules/lodash.once": { "version": "4.1.1", @@ -11883,7 +12014,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, "engines": { "node": ">= 8" } @@ -11901,7 +12031,6 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -11974,7 +12103,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -12214,8 +12342,7 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/murmurhash-js": { "version": "1.0.0", @@ -12237,8 +12364,7 @@ "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, "node_modules/negotiator": { "version": "0.6.3", @@ -12841,7 +12967,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "dependencies": { "wrappy": "1" } @@ -12882,7 +13007,6 @@ "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, "dependencies": { "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", @@ -12928,7 +13052,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -12943,7 +13066,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -13002,7 +13124,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -13046,7 +13167,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, "engines": { "node": ">=8" } @@ -13055,7 +13175,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -13064,7 +13183,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "engines": { "node": ">=8" } @@ -13110,7 +13228,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, "engines": { "node": ">=8" } @@ -13349,7 +13466,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, "engines": { "node": ">= 0.8.0" } @@ -13514,7 +13630,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, "engines": { "node": ">=6" } @@ -13669,7 +13784,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, "funding": [ { "type": "github", @@ -14445,7 +14559,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -14461,7 +14574,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -14476,7 +14588,6 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -14512,7 +14623,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, "funding": [ { "type": "github", @@ -14689,7 +14799,6 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -14704,7 +14813,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -14715,8 +14823,7 @@ "node_modules/semver/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/send": { "version": "0.18.0", @@ -14849,7 +14956,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -14861,7 +14967,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "engines": { "node": ">=8" } @@ -14915,7 +15020,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, "engines": { "node": ">=8" } @@ -15240,7 +15344,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -15298,7 +15401,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, "engines": { "node": ">=8" }, @@ -15437,7 +15539,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -15868,8 +15969,7 @@ "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "node_modules/throttleit": { "version": "1.0.1", @@ -16028,6 +16128,17 @@ "node": ">=8" } }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-dedent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", @@ -16065,7 +16176,6 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, "dependencies": { "prelude-ls": "^1.2.1" }, @@ -16182,7 +16292,6 @@ "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -16367,7 +16476,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -17159,7 +17267,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -17373,8 +17480,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/write-file-atomic": { "version": "2.4.3", @@ -17535,7 +17641,6 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index 33f933ab..2678fa3d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "start": "vite", "build": "tsc && vite build", - "lint": "eslint ./src --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0 && npm run lint-css", + "lint": "eslint ./src --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0", "test": "cypress run", "cy:open": "cypress open", "lint-css": "stylelint \"src/styles/*.scss\"", @@ -26,6 +26,8 @@ "@maplibre/maplibre-gl-style-spec": "^17.0.1", "@mdi/js": "^6.6.96", "@mdi/react": "^1.5.0", + "@typescript-eslint/eslint-plugin": "^6.16.0", + "@typescript-eslint/parser": "^6.16.0", "array-move": "^4.0.0", "buffer": "^6.0.3", "classnames": "^2.3.1", @@ -103,6 +105,7 @@ "@types/color": "^3.0.6", "@types/cors": "^2.8.17", "@types/file-saver": "^2.0.7", + "@types/geojson": "^7946.0.13", "@types/json-to-ast": "^2.1.4", "@types/lodash.capitalize": "^4.2.9", "@types/lodash.clamp": "^4.0.9", @@ -124,10 +127,10 @@ "@vitejs/plugin-react": "^4.2.0", "cors": "^2.8.5", "cypress": "^13.6.1", - "eslint": "^8.53.0", + "eslint": "^8.56.0", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.4", + "eslint-plugin-react-refresh": "^0.4.5", "express": "^4.17.3", "istanbul": "^0.4.5", "istanbul-lib-coverage": "^3.2.0", diff --git a/src/components/App.tsx b/src/components/App.tsx index f02a416c..74402710 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -334,7 +334,7 @@ export default class App extends React.Component { const metadata: {[key: string]: string} = this.state.mapStyle.metadata || {} as any const accessToken = metadata['maputnik:openmaptiles_access_token'] || tokens.openmaptiles - let glyphUrl = (typeof urlTemplate === 'string')? urlTemplate.replace('{key}', accessToken): urlTemplate; + const glyphUrl = (typeof urlTemplate === 'string')? urlTemplate.replace('{key}', accessToken): urlTemplate; downloadGlyphsMetadata(glyphUrl, fonts => { this.setState({ spec: updateRootSpec(this.state.spec, 'glyphs', fonts)}) }) @@ -402,7 +402,7 @@ export default class App extends React.Component { // Special case: Duplicate layer id const dupMatch = error.message.match(/layers\[(\d+)\]: (duplicate layer id "?(.*)"?, previously used)/); if (dupMatch) { - const [_matchStr, index, message] = dupMatch; + const [, index, message] = dupMatch; return { message: error.message, parsed: { @@ -419,7 +419,7 @@ export default class App extends React.Component { // Special case: Invalid source const invalidSourceMatch = error.message.match(/layers\[(\d+)\]: (source "(?:.*)" not found)/); if (invalidSourceMatch) { - const [_matchStr, index, message] = invalidSourceMatch; + const [, index, message] = invalidSourceMatch; return { message: error.message, parsed: { @@ -435,7 +435,7 @@ export default class App extends React.Component { const layerMatch = error.message.match(/layers\[(\d+)\]\.(?:(\S+)\.)?(\S+): (.*)/); if (layerMatch) { - const [_matchStr, index, group, property, message] = layerMatch; + const [, index, group, property, message] = layerMatch; const key = (group && property) ? [group, property].join(".") : property; return { message: error.message, @@ -466,7 +466,7 @@ export default class App extends React.Component { try { const objPath = message.split(":")[0]; // Errors can be deply nested for example 'layers[0].filter[1][1][0]' we only care upto the property 'layers[0].filter' - const unsetPath = objPath.match(/^\S+?\[\d+\]\.[^\[]+/)![0]; + const unsetPath = objPath.match(/^\S+?\[\d+\]\.[^[]+/)![0]; unset(dirtyMapStyle, unsetPath); } catch (err) { @@ -547,14 +547,14 @@ export default class App extends React.Component { } onLayerDestroy = (index: number) => { - let layers = this.state.mapStyle.layers; + const layers = this.state.mapStyle.layers; const remainingLayers = layers.slice(0); remainingLayers.splice(index, 1); this.onLayersChange(remainingLayers); } onLayerCopy = (index: number) => { - let layers = this.state.mapStyle.layers; + const layers = this.state.mapStyle.layers; const changedLayers = layers.slice(0) const clonedLayer = cloneDeep(changedLayers[index]) @@ -564,7 +564,7 @@ export default class App extends React.Component { } onLayerVisibilityToggle = (index: number) => { - let layers = this.state.mapStyle.layers; + const layers = this.state.mapStyle.layers; const changedLayers = layers.slice(0) const layer = { ...changedLayers[index] } @@ -624,11 +624,11 @@ export default class App extends React.Component { fetchSources() { const sourceList: {[key: string]: any} = {}; - for(let [key, val] of Object.entries(this.state.mapStyle.sources)) { + for(const [key, val] of Object.entries(this.state.mapStyle.sources)) { if( - !this.state.sources.hasOwnProperty(key) && + !Object.prototype.hasOwnProperty.call(this.state.sources, key) && val.type === "vector" && - val.hasOwnProperty("url") + Object.prototype.hasOwnProperty.call(val, "url") ) { sourceList[key] = { type: val.type, @@ -646,30 +646,30 @@ export default class App extends React.Component { fetch(url!, { mode: 'cors', }) - .then(response => response.json()) - .then(json => { + .then(response => response.json()) + .then(json => { - if(!json.hasOwnProperty("vector_layers")) { - return; - } + if(!Object.prototype.hasOwnProperty.call(json, "vector_layers")) { + return; + } - // Create new objects before setState - const sources = Object.assign({}, { - [key]: this.state.sources[key], + // Create new objects before setState + const sources = Object.assign({}, { + [key]: this.state.sources[key], + }); + + for(const layer of json.vector_layers) { + (sources[key] as any).layers.push(layer.id) + } + + console.debug("Updating source: "+key); + this.setState({ + sources: sources + }); + }) + .catch(err => { + console.error("Failed to process sources for '%s'", url, err); }); - - for(let layer of json.vector_layers) { - (sources[key] as any).layers.push(layer.id) - } - - console.debug("Updating source: "+key); - this.setState({ - sources: sources - }); - }) - .catch(err => { - console.error("Failed to process sources for '%s'", url, err); - }); } else { sourceList[key] = this.state.sources[key] || this.state.mapStyle.sources[key]; @@ -760,8 +760,8 @@ export default class App extends React.Component { url.searchParams.set("layer", `${hashVal}~${selectedLayerIndex}`); const openModals = Object.entries(isOpen) - .map(([key, val]) => (val === true ? key : null)) - .filter(val => val !== null); + .map(([key, val]) => (val === true ? key : null)) + .filter(val => val !== null); if (openModals.length > 0) { url.searchParams.set("modal", openModals.join(",")); diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 90392ab9..61ee4920 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -35,8 +35,8 @@ class AppLayout extends React.Component { {this.props.map} {this.props.bottom &&
- {this.props.bottom} -
+ {this.props.bottom} + } {this.props.modals} diff --git a/src/components/Block.tsx b/src/components/Block.tsx index 8aaa621a..ad9d9b11 100644 --- a/src/components/Block.tsx +++ b/src/components/Block.tsx @@ -56,7 +56,7 @@ export default class Block extends React.Component { if (event.nativeEvent.target.nodeName !== "INPUT" && !contains) { event.stopPropagation(); } - event.preventDefault(); + event.preventDefault(); } render() { diff --git a/src/components/Doc.tsx b/src/components/Doc.tsx index 92937522..dad73d72 100644 --- a/src/components/Doc.tsx +++ b/src/components/Doc.tsx @@ -71,7 +71,7 @@ export default class Doc extends React.Component { {key} {Object.keys(headers).map((k) => { - if (supportObj.hasOwnProperty(k)) { + if (Object.prototype.hasOwnProperty.call(supportObj, k)) { return {supportObj[k as keyof typeof headers]}; } else { diff --git a/src/components/FieldFunction.tsx b/src/components/FieldFunction.tsx index 0241f7c9..94a6d3bb 100644 --- a/src/components/FieldFunction.tsx +++ b/src/components/FieldFunction.tsx @@ -40,7 +40,7 @@ function isIdentityProperty(value: any) { return ( typeof(value) === 'object' && value.type === "identity" && - value.hasOwnProperty("property") + Object.prototype.hasOwnProperty.call(value, "property") ); } diff --git a/src/components/Fieldset.tsx b/src/components/Fieldset.tsx index db4b4a38..88901850 100644 --- a/src/components/Fieldset.tsx +++ b/src/components/Fieldset.tsx @@ -1,6 +1,7 @@ import React, { ReactElement } from 'react' import FieldDocLabel from './FieldDocLabel' import Doc from './Doc' +import generateUniqueId from '../libs/document-uid'; type FieldsetProps = { label?: string, @@ -12,14 +13,12 @@ type FieldsetState = { showDoc: boolean }; -let IDX = 0; - export default class Fieldset extends React.Component { _labelId: string; constructor (props: FieldsetProps) { super(props); - this._labelId = `fieldset_label_${(IDX++)}`; + this._labelId = generateUniqueId(`fieldset_label_`); this.state = { showDoc: false, } diff --git a/src/components/FilterEditor.tsx b/src/components/FilterEditor.tsx index 7ea370aa..248148c2 100644 --- a/src/components/FilterEditor.tsx +++ b/src/components/FilterEditor.tsx @@ -16,7 +16,7 @@ import ExpressionProperty from './_ExpressionProperty'; function combiningFilter(props: FilterEditorProps): LegacyFilterSpecification | ExpressionSpecification { - let filter = props.filter || ['all']; + const filter = props.filter || ['all']; if (!Array.isArray(filter)) { return filter; @@ -148,7 +148,7 @@ export default class FilterEditor extends React.Component { - let filter = combiningFilter(this.props); + const filter = combiningFilter(this.props); this.props.onChange(migrateFilter(filter)); this.setState({ displaySimpleFilter: false, @@ -205,8 +205,8 @@ export default class FilterEditor extends React.Component @@ -282,7 +282,7 @@ export default class FilterEditor extends React.Component diff --git a/src/components/IconLayer.tsx b/src/components/IconLayer.tsx index e45a13f6..9839b3ea 100644 --- a/src/components/IconLayer.tsx +++ b/src/components/IconLayer.tsx @@ -17,16 +17,16 @@ export default class IconLayer extends React.Component { render() { const iconProps = { style: this.props.style } switch(this.props.type) { - case 'fill-extrusion': return - case 'raster': return - case 'hillshade': return - case 'heatmap': return - case 'fill': return - case 'background': return - case 'line': return - case 'symbol': return - case 'circle': return - default: return + case 'fill-extrusion': return + case 'raster': return + case 'hillshade': return + case 'heatmap': return + case 'fill': return + case 'background': return + case 'line': return + case 'symbol': return + case 'circle': return + default: return } } } diff --git a/src/components/InputAutocomplete.tsx b/src/components/InputAutocomplete.tsx index 4665fa8a..53b9f31c 100644 --- a/src/components/InputAutocomplete.tsx +++ b/src/components/InputAutocomplete.tsx @@ -91,7 +91,7 @@ export default class InputAutocomplete extends React.Component - {item[1]} + {item[1]} )} /> diff --git a/src/components/InputCheckbox.tsx b/src/components/InputCheckbox.tsx index a799e5a3..f425f4ac 100644 --- a/src/components/InputCheckbox.tsx +++ b/src/components/InputCheckbox.tsx @@ -27,8 +27,8 @@ export default class InputCheckbox extends React.Component { />
+ display: this.props.value ? 'inline' : 'none' + }} className="maputnik-checkbox-icon" viewBox='0 0 32 32'>
diff --git a/src/components/InputColor.tsx b/src/components/InputColor.tsx index ad1c6e76..5b5ffa87 100644 --- a/src/components/InputColor.tsx +++ b/src/components/InputColor.tsx @@ -87,8 +87,8 @@ export default class InputColor extends React.Component { const picker =
@@ -110,7 +110,7 @@ export default class InputColor extends React.Component { />
- var swatchStyle = { + const swatchStyle = { backgroundColor: this.props.value }; diff --git a/src/components/InputDynamicArray.tsx b/src/components/InputDynamicArray.tsx index 32d5a6cd..5748abde 100644 --- a/src/components/InputDynamicArray.tsx +++ b/src/components/InputDynamicArray.tsx @@ -100,7 +100,7 @@ export default class FieldDynamicArray extends React.Component + >
{deleteValueBtn}
diff --git a/src/components/InputNumber.tsx b/src/components/InputNumber.tsx index 85631a11..56a34116 100644 --- a/src/components/InputNumber.tsx +++ b/src/components/InputNumber.tsx @@ -1,6 +1,5 @@ import React, { BaseSyntheticEvent } from 'react' - -let IDX = 0; +import generateUniqueId from '../libs/document-uid'; export type InputNumberProps = { value?: number @@ -32,7 +31,7 @@ export default class InputNumber extends React.Component { 'aria-label': this.props['aria-label'], } switch(this.props.fieldSpec?.type) { - case 'number': return ( - - ) - case 'enum': - const options = Object.keys(this.props.fieldSpec.values || []).map(v => [v, capitalize(v)]) + case 'number': return ( + + ) + case 'enum': { + const options = Object.keys(this.props.fieldSpec.values || []).map(v => [v, capitalize(v)]) - return } - options={options} + return } + options={options} + /> + } + case 'resolvedImage': + case 'formatted': + case 'string': + if (iconProperties.indexOf(this.props.fieldName!) >= 0) { + const options = this.props.fieldSpec.values || []; + return } + options={options.map(f => [f, f])} /> - case 'resolvedImage': - case 'formatted': - case 'string': - if (iconProperties.indexOf(this.props.fieldName!) >= 0) { - const options = this.props.fieldSpec.values || []; - return } - options={options.map(f => [f, f])} + } else { + return + } + case 'color': return ( + + ) + case 'boolean': return ( + + ) + case 'array': + if(this.props.fieldName === 'text-font') { + return + } else { + if (this.props.fieldSpec.length) { + return } else { - return } - case 'color': return ( - - ) - case 'boolean': return ( - - ) - case 'array': - if(this.props.fieldName === 'text-font') { - return - } else { - if (this.props.fieldSpec.length) { - return - } else { - return - } - } - default: return null + } + default: return null } } diff --git a/src/components/InputString.tsx b/src/components/InputString.tsx index b072f0a4..9595df30 100644 --- a/src/components/InputString.tsx +++ b/src/components/InputString.tsx @@ -46,7 +46,7 @@ export default class InputString extends React.Component Must provide protocol { isSsl - ? https:// - : <>http:// or https:// + ? https:// + : <>http:// or https:// } ); diff --git a/src/components/LayerEditor.tsx b/src/components/LayerEditor.tsx index d45fb90d..8165f54c 100644 --- a/src/components/LayerEditor.tsx +++ b/src/components/LayerEditor.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import React, {type JSX} from 'react' import PropTypes from 'prop-types' import { Wrapper, Button, Menu, MenuItem } from 'react-aria-menubutton' import {Accordion} from 'react-accessible-accordion'; @@ -150,87 +150,87 @@ export default class LayerEditor extends React.Component; - if(this.props.sources.hasOwnProperty(layer.source)) { + if(Object.prototype.hasOwnProperty.call(this.props.sources, layer.source)) { sourceLayerIds = (this.props.sources[layer.source] as any).layers; } switch(type) { - case 'layer': return
- this.props.onLayerIdChange(this.props.layerIndex, this.props.layer.id, newId)} - /> - this.props.onLayerChanged( - this.props.layerIndex, - changeType(this.props.layer, newType) - )} - /> - {this.props.layer.type !== 'background' && this.changeProperty(null, 'source', v)} - /> - } - {['background', 'raster', 'hillshade', 'heatmap'].indexOf(this.props.layer.type) < 0 && + case 'layer': return
+ this.props.onLayerIdChange(this.props.layerIndex, this.props.layer.id, newId)} + /> + this.props.onLayerChanged( + this.props.layerIndex, + changeType(this.props.layer, newType) + )} + /> + {this.props.layer.type !== 'background' && this.changeProperty(null, 'source', v)} + /> + } + {['background', 'raster', 'hillshade', 'heatmap'].indexOf(this.props.layer.type) < 0 && this.changeProperty(null, 'source-layer', v)} /> - } - this.changeProperty(null, 'minzoom', v)} - /> - this.changeProperty(null, 'maxzoom', v)} - /> - this.changeProperty('metadata', 'maputnik:comment', v == "" ? undefined : v)} - /> -
- case 'filter': return
-
- this.changeProperty(null, 'filter', f)} - /> -
-
- case 'properties': - return this.changeProperty(null, 'minzoom', v)} + /> + this.changeProperty(null, 'maxzoom', v)} + /> + this.changeProperty('metadata', 'maputnik:comment', v == "" ? undefined : v)} + /> +
+ case 'filter': return
+
+ this.changeProperty(null, 'filter', f)} /> - case 'jsoneditor': - return { - this.props.onLayerChanged( - this.props.layerIndex, - layer - ); - }} - /> - default: return <> +
+
+ case 'properties': + return + case 'jsoneditor': + return { + this.props.onLayerChanged( + this.props.layerIndex, + layer + ); + }} + /> + default: return <> } } diff --git a/src/components/LayerEditorGroup.tsx b/src/components/LayerEditorGroup.tsx index fe4ae5af..33f32712 100644 --- a/src/components/LayerEditorGroup.tsx +++ b/src/components/LayerEditorGroup.tsx @@ -5,10 +5,10 @@ import { mdiMenuUp } from '@mdi/js'; import { - AccordionItem, - AccordionItemHeading, - AccordionItemButton, - AccordionItemPanel, + AccordionItem, + AccordionItemHeading, + AccordionItemButton, + AccordionItemPanel, } from 'react-accessible-accordion'; diff --git a/src/components/LayerList.tsx b/src/components/LayerList.tsx index b07774bd..8d6e11e9 100644 --- a/src/components/LayerList.tsx +++ b/src/components/LayerList.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import React, {type JSX} from 'react' import classnames from 'classnames' import lodash from 'lodash'; @@ -8,26 +8,8 @@ import ModalAdd from './ModalAdd' import {SortEndHandler, SortableContainer} from 'react-sortable-hoc'; import type {LayerSpecification} from 'maplibre-gl'; - -function layerPrefix(name: string) { - return name.replace(' ', '-').replace('_', '-').split('-')[0] -} - -function findClosestCommonPrefix(layers: LayerSpecification[], idx: number) { - const currentLayerPrefix = layerPrefix(layers[idx].id) - let closestIdx = idx - for (let i = idx; i > 0; i--) { - const previousLayerPrefix = layerPrefix(layers[i-1].id) - if(previousLayerPrefix === currentLayerPrefix) { - closestIdx = i - 1 - } else { - return closestIdx - } - } - return closestIdx -} - -let UID = 0; +import generateUniqueId from '../libs/document-uid'; +import { findClosestCommonPrefix, layerPrefix } from '../libs/layer'; type LayerListContainerProps = { layers: LayerSpecification[] @@ -64,7 +46,7 @@ class LayerListContainer extends React.Component { let idx = 0 - let newGroups: {[key:string]: boolean} = {} + const newGroups: {[key:string]: boolean} = {} this.groupedLayers().forEach(layers => { const groupPrefix = layerPrefix(layers[0].id) @@ -284,12 +266,12 @@ class LayerListContainer extends React.Component
Layers @@ -328,6 +310,7 @@ class LayerListContainer extends React.Component ) type LayerListProps = LayerListContainerProps & { diff --git a/src/components/LayerListItem.tsx b/src/components/LayerListItem.tsx index f4dd6cdf..15d5b394 100644 --- a/src/components/LayerListItem.tsx +++ b/src/components/LayerListItem.tsx @@ -36,10 +36,10 @@ type IconActionProps = { class IconAction extends React.Component { renderIcon() { switch(this.props.action) { - case 'duplicate': return - case 'show': return - case 'hide': return - case 'delete': return + case 'duplicate': return + case 'show': return + case 'hide': return + case 'delete': return } } @@ -114,27 +114,27 @@ class LayerListItem extends React.Component { "maputnik-layer-list-item-selected": this.props.isSelected, [this.props.className!]: true, })}> - - - this.props.onLayerDestroy!(this.props.layerIndex)} - /> - this.props.onLayerCopy!(this.props.layerIndex)} - /> - this.props.onLayerVisibilityToggle!(this.props.layerIndex)} - /> + + + this.props.onLayerDestroy!(this.props.layerIndex)} + /> + this.props.onLayerCopy!(this.props.layerIndex)} + /> + this.props.onLayerVisibilityToggle!(this.props.layerIndex)} + /> } } diff --git a/src/components/MapMaplibreGl.tsx b/src/components/MapMaplibreGl.tsx index b3a02baf..cecb940e 100644 --- a/src/components/MapMaplibreGl.tsx +++ b/src/components/MapMaplibreGl.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import React, {type JSX} from 'react' import ReactDOM from 'react-dom' import MapLibreGl, {LayerSpecification, LngLat, Map, MapOptions, SourceSpecification, StyleSpecification} from 'maplibre-gl' // @ts-ignore diff --git a/src/components/MapMaplibreGlFeaturePropertyPopup.tsx b/src/components/MapMaplibreGlFeaturePropertyPopup.tsx index 2634a78d..c2337475 100644 --- a/src/components/MapMaplibreGlFeaturePropertyPopup.tsx +++ b/src/components/MapMaplibreGlFeaturePropertyPopup.tsx @@ -34,7 +34,7 @@ function renderFeatureId(feature: InspectFeature) { return - } +} function renderFeature(feature: InspectFeature, idx: number) { return
@@ -48,7 +48,7 @@ function renderFeature(feature: InspectFeature, idx: number) { } function removeDuplicatedFeatures(features: InspectFeature[]) { - let uniqueFeatures: InspectFeature[] = []; + const uniqueFeatures: InspectFeature[] = []; features.forEach(feature => { const featureIndex = uniqueFeatures.findIndex(feature2 => { diff --git a/src/components/MapMaplibreGlLayerPopup.tsx b/src/components/MapMaplibreGlLayerPopup.tsx index 1a1fe2e9..42291562 100644 --- a/src/components/MapMaplibreGlLayerPopup.tsx +++ b/src/components/MapMaplibreGlLayerPopup.tsx @@ -5,10 +5,10 @@ import type {InspectFeature} from './MapMaplibreGlFeaturePropertyPopup'; function groupFeaturesBySourceLayer(features: InspectFeature[]) { const sources: {[key: string]: InspectFeature[]} = {} - let returnedFeatures: {[key: string]: number} = {} + const returnedFeatures: {[key: string]: number} = {} features.forEach(feature => { - if(returnedFeatures.hasOwnProperty(feature.layer.id)) { + if(Object.prototype.hasOwnProperty.call(returnedFeatures, feature.layer.id)) { returnedFeatures[feature.layer.id]++ const featureObject = sources[feature.layer['source-layer']].find((f: InspectFeature) => f.layer.id === feature.layer.id) @@ -42,21 +42,21 @@ class FeatureLayerPopup extends React.Component { const paintProps = feature.layer.paint; let propName; - if(paintProps.hasOwnProperty("text-color") && paintProps["text-color"]) { + if(Object.prototype.hasOwnProperty.call(paintProps, "text-color") && paintProps["text-color"]) { propName = "text-color"; } - else if (paintProps.hasOwnProperty("fill-color") && paintProps["fill-color"]) { + else if (Object.prototype.hasOwnProperty.call(paintProps, "fill-color") && paintProps["fill-color"]) { propName = "fill-color"; } - else if (paintProps.hasOwnProperty("line-color") && paintProps["line-color"]) { + else if (Object.prototype.hasOwnProperty.call(paintProps, "line-color") && paintProps["line-color"]) { propName = "line-color"; } - else if (paintProps.hasOwnProperty("fill-extrusion-color") && paintProps["fill-extrusion-color"]) { + else if (Object.prototype.hasOwnProperty.call(paintProps, "fill-extrusion-color") && paintProps["fill-extrusion-color"]) { propName = "fill-extrusion-color"; } if(propName) { - let color = feature.layer.paint[propName]; + const color = feature.layer.paint[propName]; return String(color); } else { @@ -80,8 +80,8 @@ class FeatureLayerPopup extends React.Component { const featureColor = this._getFeatureColor(feature, this.props.zoom); return
{ - var coords = toLonLat(evt.coordinate); + const coords = toLonLat(evt.coordinate); this.setState({ cursor: [ coords[0].toFixed(2), diff --git a/src/components/ModalAdd.tsx b/src/components/ModalAdd.tsx index b70d069c..e86e5657 100644 --- a/src/components/ModalAdd.tsx +++ b/src/components/ModalAdd.tsx @@ -68,7 +68,7 @@ export default class ModalAdd extends React.Component -1) { sources.push(key); @@ -136,41 +136,41 @@ export default class ModalAdd extends React.Component
- { - this.setState({ id: v }) - }} - /> - this.setState({ type: v })} - /> - {this.state.type !== 'background' && + { + this.setState({ id: v }) + }} + /> + this.setState({ type: v })} + /> + {this.state.type !== 'background' && this.setState({ source: v })} /> - } - {['background', 'raster', 'hillshade', 'heatmap'].indexOf(this.state.type) < 0 && + } + {['background', 'raster', 'hillshade', 'heatmap'].indexOf(this.state.type) < 0 && this.setState({ 'source-layer': v })} /> - } - + } + Add Layer - +
} diff --git a/src/components/ModalLoading.tsx b/src/components/ModalLoading.tsx index f6f132e7..6b6b202e 100644 --- a/src/components/ModalLoading.tsx +++ b/src/components/ModalLoading.tsx @@ -25,7 +25,7 @@ export default class ModalLoading extends React.Component { underlayClickExits={false} underlayProps={{ // @ts-ignore - onClick: (e: Event) => underlayProps(e) + onClick: (e: Event) => underlayProps(e) }} title={this.props.title} onOpenToggle={() => this.props.onCancel()} diff --git a/src/components/ModalOpen.tsx b/src/components/ModalOpen.tsx index da7aaeeb..fe718e24 100644 --- a/src/components/ModalOpen.tsx +++ b/src/components/ModalOpen.tsx @@ -91,33 +91,33 @@ export default class ModalOpen extends React.Component { - if(canceled) { - return; - } + .then(function(response) { + return response.json(); + }) + .then((body) => { + if(canceled) { + return; + } - this.setState({ - activeRequest: null, - activeRequestUrl: null - }); + this.setState({ + activeRequest: null, + activeRequestUrl: null + }); - const mapStyle = style.ensureStyleValidity(body) - console.log('Loaded style ', mapStyle.id) - this.props.onStyleOpen(mapStyle) - this.onOpenToggle() - }) - .catch((err) => { - this.setState({ - error: `Failed to load: '${styleUrl}'`, - activeRequest: null, - activeRequestUrl: null - }); - console.error(err); - console.warn('Could not open the style URL', styleUrl) - }) + const mapStyle = style.ensureStyleValidity(body) + console.log('Loaded style ', mapStyle.id) + this.props.onStyleOpen(mapStyle) + this.onOpenToggle() + }) + .catch((err) => { + this.setState({ + error: `Failed to load: '${styleUrl}'`, + activeRequest: null, + activeRequestUrl: null + }); + console.error(err); + console.warn('Could not open the style URL', styleUrl) + }) this.setState({ activeRequest: { @@ -135,7 +135,7 @@ export default class ModalOpen extends React.Component { - const [_e, file] = files[0]; + const [, file] = files[0]; const reader = new FileReader(); this.clearError(); @@ -244,7 +244,7 @@ export default class ModalOpen extends React.Component
- {styleOptions} + {styleOptions}
diff --git a/src/components/ModalSources.tsx b/src/components/ModalSources.tsx index 473b7ce1..24d2cf26 100644 --- a/src/components/ModalSources.tsx +++ b/src/components/ModalSources.tsx @@ -24,17 +24,17 @@ type PublicSourceProps = { class PublicSource extends React.Component { render() { return
- this.props.onSelect(this.props.id)} - > -
-

{this.props.title}

-

#{this.props.id}

-
- - -
+ onClick={() => this.props.onSelect(this.props.id)} + > +
+

{this.props.title}

+

#{this.props.id}

+
+ + +
} } @@ -127,68 +127,68 @@ class AddSource extends React.Component { const {protocol} = window.location; switch(mode) { - case 'geojson_url': return { - type: 'geojson', - data: `${protocol}//localhost:3000/geojson.json` - } - case 'geojson_json': return { - type: 'geojson', - cluster: (source as GeoJSONSourceSpecification).cluster || false, - data: {} - } - case 'tilejson_vector': return { - type: 'vector', - url: (source as VectorSourceSpecification).url || `${protocol}//localhost:3000/tilejson.json` - } - case 'tilexyz_vector': return { - type: 'vector', - tiles: (source as VectorSourceSpecification).tiles || [`${protocol}//localhost:3000/{x}/{y}/{z}.pbf`], - minzoom: (source as VectorSourceSpecification).minzoom || 0, - maxzoom: (source as VectorSourceSpecification).maxzoom || 14 - } - case 'tilejson_raster': return { - type: 'raster', - url: (source as RasterSourceSpecification).url || `${protocol}//localhost:3000/tilejson.json` - } - case 'tilexyz_raster': return { - type: 'raster', - tiles: (source as RasterSourceSpecification).tiles || [`${protocol}//localhost:3000/{x}/{y}/{z}.pbf`], - minzoom: (source as RasterSourceSpecification).minzoom || 0, - maxzoom: (source as RasterSourceSpecification).maxzoom || 14 - } - case 'tilejson_raster-dem': return { - type: 'raster-dem', - url: (source as RasterDEMSourceSpecification).url || `${protocol}//localhost:3000/tilejson.json` - } - case 'tilexyz_raster-dem': return { - type: 'raster-dem', - tiles: (source as RasterDEMSourceSpecification).tiles || [`${protocol}//localhost:3000/{x}/{y}/{z}.pbf`], - minzoom: (source as RasterDEMSourceSpecification).minzoom || 0, - maxzoom: (source as RasterDEMSourceSpecification).maxzoom || 14 - } - case 'image': return { - type: 'image', - url: `${protocol}//localhost:3000/image.png`, - coordinates: [ - [0,0], - [0,0], - [0,0], - [0,0], - ], - } - case 'video': return { - type: 'video', - urls: [ - `${protocol}//localhost:3000/movie.mp4` - ], - coordinates: [ - [0,0], - [0,0], - [0,0], - [0,0], - ], - } - default: return {} as any + case 'geojson_url': return { + type: 'geojson', + data: `${protocol}//localhost:3000/geojson.json` + } + case 'geojson_json': return { + type: 'geojson', + cluster: (source as GeoJSONSourceSpecification).cluster || false, + data: {} + } + case 'tilejson_vector': return { + type: 'vector', + url: (source as VectorSourceSpecification).url || `${protocol}//localhost:3000/tilejson.json` + } + case 'tilexyz_vector': return { + type: 'vector', + tiles: (source as VectorSourceSpecification).tiles || [`${protocol}//localhost:3000/{x}/{y}/{z}.pbf`], + minzoom: (source as VectorSourceSpecification).minzoom || 0, + maxzoom: (source as VectorSourceSpecification).maxzoom || 14 + } + case 'tilejson_raster': return { + type: 'raster', + url: (source as RasterSourceSpecification).url || `${protocol}//localhost:3000/tilejson.json` + } + case 'tilexyz_raster': return { + type: 'raster', + tiles: (source as RasterSourceSpecification).tiles || [`${protocol}//localhost:3000/{x}/{y}/{z}.pbf`], + minzoom: (source as RasterSourceSpecification).minzoom || 0, + maxzoom: (source as RasterSourceSpecification).maxzoom || 14 + } + case 'tilejson_raster-dem': return { + type: 'raster-dem', + url: (source as RasterDEMSourceSpecification).url || `${protocol}//localhost:3000/tilejson.json` + } + case 'tilexyz_raster-dem': return { + type: 'raster-dem', + tiles: (source as RasterDEMSourceSpecification).tiles || [`${protocol}//localhost:3000/{x}/{y}/{z}.pbf`], + minzoom: (source as RasterDEMSourceSpecification).minzoom || 0, + maxzoom: (source as RasterDEMSourceSpecification).maxzoom || 14 + } + case 'image': return { + type: 'image', + url: `${protocol}//localhost:3000/image.png`, + coordinates: [ + [0,0], + [0,0], + [0,0], + [0,0], + ], + } + case 'video': return { + type: 'video', + urls: [ + `${protocol}//localhost:3000/movie.mp4` + ], + coordinates: [ + [0,0], + [0,0], + [0,0], + [0,0], + ], + } + default: return {} as any } } @@ -245,7 +245,7 @@ class AddSource extends React.Component { /> Add Source @@ -308,16 +308,16 @@ export default class ModalSources extends React.Component { Add one of the publicly available sources to your style.

- {tilesetOptions} + {tilesetOptions}
-

Add New Source

-

Add a new source to your style. You can only choose the source type and id at creation time!

- this.props.onStyleChanged(addSource(mapStyle, sourceId, source))} - /> +

Add New Source

+

Add a new source to your style. You can only choose the source type and id at creation time!

+ this.props.onStyleChanged(addSource(mapStyle, sourceId, source))} + />
} diff --git a/src/components/ModalSourcesTypeEditor.tsx b/src/components/ModalSourcesTypeEditor.tsx index e51b7f30..0c2a0d6b 100644 --- a/src/components/ModalSourcesTypeEditor.tsx +++ b/src/components/ModalSourcesTypeEditor.tsx @@ -269,28 +269,28 @@ export default class ModalSourcesTypeEditor extends React.Component - case 'geojson_json': return - case 'tilejson_vector': return - case 'tilexyz_vector': return - case 'tilejson_raster': return - case 'tilexyz_raster': return - case 'tilejson_raster-dem': return - case 'tilexyz_raster-dem': return - this.props.onChange({ - ...this.props.source, - encoding: encoding - })} - value={this.props.source.encoding || latest.source_raster_dem.encoding.default} - /> - - case 'image': return - case 'video': return - default: return null + case 'geojson_url': return + case 'geojson_json': return + case 'tilejson_vector': return + case 'tilexyz_vector': return + case 'tilejson_raster': return + case 'tilexyz_raster': return + case 'tilejson_raster-dem': return + case 'tilexyz_raster-dem': return + this.props.onChange({ + ...this.props.source, + encoding: encoding + })} + value={this.props.source.encoding || latest.source_raster_dem.encoding.default} + /> + + case 'image': return + case 'video': return + default: return null } } } diff --git a/src/components/_DataProperty.tsx b/src/components/_DataProperty.tsx index 7144e74f..11a638e7 100644 --- a/src/components/_DataProperty.tsx +++ b/src/components/_DataProperty.tsx @@ -23,7 +23,7 @@ function setStopRefs(props: DataPropertyProps, state: DataPropertyState) { if(props.value && props.value.stops) { props.value.stops.forEach((_val, idx) => { - if(!state.refs.hasOwnProperty(idx)) { + if(!Object.prototype.hasOwnProperty.call(state.refs, idx)) { if(!newRefs) { newRefs = {...state}; } @@ -118,7 +118,7 @@ export default class DataProperty extends React.Component sortNumerically(a.data[0].zoom, b.data[0].zoom)); // Fetch the new position of the stops diff --git a/src/components/_ExpressionProperty.tsx b/src/components/_ExpressionProperty.tsx index 43dd77dc..2ef27e03 100644 --- a/src/components/_ExpressionProperty.tsx +++ b/src/components/_ExpressionProperty.tsx @@ -96,12 +96,12 @@ export default class ExpressionProperty extends React.Component { - return key.startsWith(errorKeyStart); - }) - .forEach(([_key, error]) => { - return foundErrors.push(error); - }) + .filter(([key, _error]) => { + return key.startsWith(errorKeyStart); + }) + .forEach(([_key, error]) => { + return foundErrors.push(error); + }) if (fieldError) { foundErrors.push(fieldError); diff --git a/src/components/_ZoomProperty.tsx b/src/components/_ZoomProperty.tsx index e14ff22f..3eba8ebd 100644 --- a/src/components/_ZoomProperty.tsx +++ b/src/components/_ZoomProperty.tsx @@ -26,7 +26,7 @@ function setStopRefs(props: ZoomPropertyProps, state: ZoomPropertyState) { if(props.value && (props.value as ZoomWithStops).stops) { (props.value as ZoomWithStops).stops.forEach((_val, idx: number) => { - if(!state.refs.hasOwnProperty(idx)) { + if(Object.prototype.hasOwnProperty.call(!state.refs, idx)) { if(!newRefs) { newRefs = {...state}; } diff --git a/src/index.jsx b/src/index.jsx index 56224184..b7740e5d 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -1,5 +1,4 @@ import { IconContext } from "react-icons"; -import React from 'react'; import ReactDOM from 'react-dom'; import './favicon.ico' diff --git a/src/libs/apistore.ts b/src/libs/apistore.ts index d403fb74..62d5849a 100644 --- a/src/libs/apistore.ts +++ b/src/libs/apistore.ts @@ -29,18 +29,18 @@ export class ApiStyleStore { fetch(this.localUrl + '/styles', { mode: 'cors', }) - .then((response) => { - return response.json(); - }) - .then((body) => { - const styleIds = body; - this.latestStyleId = styleIds[0] - this.notifyLocalChanges() - cb(null) - }) - .catch(() => { - cb(new Error('Can not connect to style API')) - }) + .then((response) => { + return response.json(); + }) + .then((body) => { + const styleIds = body; + this.latestStyleId = styleIds[0] + this.notifyLocalChanges() + cb(null) + }) + .catch(() => { + cb(new Error('Can not connect to style API')) + }) } notifyLocalChanges() { @@ -64,12 +64,12 @@ export class ApiStyleStore { fetch(this.localUrl + '/styles/' + this.latestStyleId, { mode: 'cors', }) - .then(function(response) { - return response.json(); - }) - .then(function(body) { - cb(style.ensureStyleValidity(body)) - }) + .then(function(response) { + return response.json(); + }) + .then(function(body) { + cb(style.ensureStyleValidity(body)) + }) } else { throw new Error('No latest style available. You need to init the api backend first.') } @@ -92,9 +92,9 @@ export class ApiStyleStore { }, body: styleJSON }) - .catch(function(error) { - if(error) console.error(error) - }) + .catch(function(error) { + if(error) console.error(error) + }) return mapStyle } } diff --git a/src/libs/debug.ts b/src/libs/debug.ts index 2a5dc9fc..db2e1f81 100644 --- a/src/libs/debug.ts +++ b/src/libs/debug.ts @@ -33,7 +33,7 @@ function get(namespace: keyof DebugStore, key: string) { if(!enabled()) { throw genErr(); } - if(debugStore.hasOwnProperty(namespace)) { + if(Object.prototype.hasOwnProperty.call(debugStore, namespace)) { return debugStore[namespace][key]; } } diff --git a/src/libs/layer.ts b/src/libs/layer.ts index 38b27d88..263f311c 100644 --- a/src/libs/layer.ts +++ b/src/libs/layer.ts @@ -70,3 +70,21 @@ export function changeProperty(layer: LayerSpecification, group: keyof LayerSpec } } } + +export function layerPrefix(name: string) { + return name.replace(' ', '-').replace('_', '-').split('-')[0] +} + +export function findClosestCommonPrefix(layers: LayerSpecification[], idx: number) { + const currentLayerPrefix = layerPrefix(layers[idx].id) + let closestIdx = idx + for (let i = idx; i > 0; i--) { + const previousLayerPrefix = layerPrefix(layers[i-1].id) + if(previousLayerPrefix === currentLayerPrefix) { + closestIdx = i - 1 + } else { + return closestIdx + } + } + return closestIdx +} diff --git a/src/libs/metadata.ts b/src/libs/metadata.ts index f0474a56..f724661f 100644 --- a/src/libs/metadata.ts +++ b/src/libs/metadata.ts @@ -5,16 +5,16 @@ function loadJSON(url: string, defaultValue: any, cb: (...args: any[]) => void) mode: 'cors', credentials: "same-origin" }) - .then(function(response) { - return response.json(); - }) - .then(function(body) { - cb(body) - }) - .catch(function() { - console.warn('Can not metadata for ' + url) - cb(defaultValue) - }) + .then(function(response) { + return response.json(); + }) + .then(function(body) { + cb(body) + }) + .catch(function() { + console.warn('Can not metadata for ' + url) + cb(defaultValue) + }) } export function downloadGlyphsMetadata(urlTemplate: string, cb: (...args: any[]) => void) { @@ -22,14 +22,14 @@ export function downloadGlyphsMetadata(urlTemplate: string, cb: (...args: any[]) // Special handling because Tileserver GL serves the fontstacks metadata differently // https://github.com/klokantech/tileserver-gl/pull/104#issuecomment-274444087 - let urlObj = npmurl.parse(urlTemplate); + const urlObj = npmurl.parse(urlTemplate); const normPathPart = '/%7Bfontstack%7D/%7Brange%7D.pbf'; if(urlObj.pathname === normPathPart) { urlObj.pathname = '/fontstacks.json'; } else { urlObj.pathname = urlObj.pathname!.replace(normPathPart, '.json'); } - let url = npmurl.format(urlObj); + const url = npmurl.format(urlObj); loadJSON(url, [], cb) } diff --git a/src/libs/stylestore.ts b/src/libs/stylestore.ts index 506c5636..b74f7907 100644 --- a/src/libs/stylestore.ts +++ b/src/libs/stylestore.ts @@ -21,10 +21,10 @@ export function loadDefaultStyle(cb: (...args: any[]) => void) { function loadStoredStyles() { const styles = [] for (let i = 0; i < window.localStorage.length; i++) { - const key = window.localStorage.key(i) - if(isStyleKey(key!)) { - styles.push(fromKey(key!)) - } + const key = window.localStorage.key(i) + if(isStyleKey(key!)) { + styles.push(fromKey(key!)) + } } return styles } @@ -70,10 +70,10 @@ export class StyleStore { // Delete entire style history purge() { for (let i = 0; i < window.localStorage.length; i++) { - const key = window.localStorage.key(i) as string; - if(key.startsWith(storagePrefix)) { - window.localStorage.removeItem(key) - } + const key = window.localStorage.key(i) as string; + if(key.startsWith(storagePrefix)) { + window.localStorage.removeItem(key) + } } } diff --git a/src/libs/urlopen.ts b/src/libs/urlopen.ts index d0f97908..8a887039 100644 --- a/src/libs/urlopen.ts +++ b/src/libs/urlopen.ts @@ -12,16 +12,16 @@ export function loadStyleUrl(styleUrl: string, cb: (...args: any[]) => void) { mode: 'cors', credentials: "same-origin" }) - .then(function(response) { - return response.json(); - }) - .then(function(body) { - cb(style.ensureStyleValidity(body)) - }) - .catch(function() { - console.warn('Could not fetch default style', styleUrl) - cb(style.emptyStyle) - }) + .then(function(response) { + return response.json(); + }) + .then(function(body) { + cb(style.ensureStyleValidity(body)) + }) + .catch(function() { + console.warn('Could not fetch default style', styleUrl) + cb(style.emptyStyle) + }) } export function removeStyleQuerystring() { diff --git a/src/styles/_components.scss b/src/styles/_components.scss index 5d7213ea..637b6e20 100644 --- a/src/styles/_components.scss +++ b/src/styles/_components.scss @@ -1,3 +1,4 @@ +@use 'sass:color'; // MAP .maputnik-map__container { background: white; @@ -110,12 +111,12 @@ text-decoration: none; &:hover { - background-color: lighten($color-midgray, 12); + background-color: color.adjust($color-midgray, $lightness: 12%); color: $color-white; } &:disabled { - background-color: darken($color-midgray, 5); + background-color: color.adjust($color-midgray, $lightness: -5%); color: $color-midgray; cursor: not-allowed; } diff --git a/src/styles/_filtereditor.scss b/src/styles/_filtereditor.scss index 2db39192..f2219ded 100644 --- a/src/styles/_filtereditor.scss +++ b/src/styles/_filtereditor.scss @@ -8,7 +8,7 @@ } .maputnik-filter-editor { - @extend .clearfix; + @extend .clearfix; /* stylelint-disable-line */ color: $color-lowgray; } @@ -62,7 +62,7 @@ } .maputnik-delete-filter { - @extend .maputnik-icon-button; + @extend .maputnik-icon-button; /* stylelint-disable-line */ } .maputnik-filter-editor-block-action { @@ -79,7 +79,7 @@ } .maputnik-radio-as-button { - @extend .maputnik-button; + @extend .maputnik-button; /* stylelint-disable-line */ border: solid 1px transparent; diff --git a/src/styles/_input.scss b/src/styles/_input.scss index 87d6a0a8..5af49891 100644 --- a/src/styles/_input.scss +++ b/src/styles/_input.scss @@ -1,3 +1,4 @@ +@use 'sass:color'; //INPUT .maputnik-input { height: 24px; @@ -10,7 +11,7 @@ padding-right: $margin-2; border: none; background-color: $color-gray; - color: lighten($color-lowgray, 12); + color: color.adjust($color-lowgray, $lightness: 12%); &:invalid { border: solid 1px #B71C1C; @@ -19,7 +20,7 @@ } .maputnik-string { - @extend .maputnik-input; + @extend .maputnik-input; /* stylelint-disable-line */ &--multi { resize: vertical; @@ -43,12 +44,12 @@ } .maputnik-number { - @extend .maputnik-input; + @extend .maputnik-input; /* stylelint-disable-line */ } //COLOR PICKER .maputnik-color { - @extend .maputnik-input; + @extend .maputnik-input; /* stylelint-disable-line */ height: 26px; } @@ -95,7 +96,7 @@ // SELECT .maputnik-select { - @extend .maputnik-input; + @extend .maputnik-input; /* stylelint-disable-line */ -moz-appearance: none; -webkit-appearance: none; @@ -117,7 +118,7 @@ } .maputnik-button-selected { - background-color: lighten($color-midgray, 12); + background-color: color.adjust($color-midgray, $lightness: 12%); color: white; } @@ -133,7 +134,7 @@ outline: none; &-wrapper { - @extend .maputnik-input; + @extend .maputnik-input; /* stylelint-disable-line */ padding-left: 0; padding-right: 0; diff --git a/src/styles/_layer.scss b/src/styles/_layer.scss index c3cc579b..5dc9bf36 100644 --- a/src/styles/_layer.scss +++ b/src/styles/_layer.scss @@ -1,3 +1,4 @@ +@use 'sass:color'; // LAYER LIST .maputnik-layer-list { height: 100%; @@ -48,7 +49,7 @@ font-weight: 400; color: $color-lowgray; font-size: $font-size-6; - border-bottom-color: lighten($color-black, 0.1); + border-bottom-color: color.adjust($color-black, $lightness: 0.1%); user-select: none; list-style: none; z-index: 2000; @@ -87,7 +88,7 @@ height: 15px; svg { - fill: darken($color-lowgray, 20); + fill: color.adjust($color-lowgray, $lightness: -20%); &:hover { fill: $color-white; @@ -101,13 +102,13 @@ .maputnik-layer-list-item:hover, .maputnik-layer-list-item-selected { - background-color: lighten($color-black, 2); + background-color: color.adjust($color-black, $lightness: 2%); .maputnik-layer-list-icon-action { display: block; svg { - fill: darken($color-lowgray, 0.5); + fill: color.adjust($color-lowgray, $lightness: -0.5%); } } } @@ -151,7 +152,7 @@ border: solid 1px transparent; font-size: $font-size-6; color: $color-lowgray; - background-color: lighten($color-black, 2); + background-color: color.adjust($color-black, $lightness: 2%); user-select: none; padding: $margin-2; @@ -185,7 +186,7 @@ .maputnik-layer-editor-group { font-weight: bold; font-size: $font-size-5; - background-color: lighten($color-black, 2); + background-color: color.adjust($color-black, $lightness: 2%); color: $color-white; cursor: pointer; user-select: none; @@ -232,7 +233,7 @@ // PROPERTY .maputnik-default-property { .maputnik-input-block-label { - color: darken($color-lowgray, 20%); + color: color.adjust($color-lowgray, $lightness: -20%); } .maputnik-string, @@ -240,8 +241,8 @@ .maputnik-color, .maputnik-select, .maputnik-checkbox-wrapper { - background-color: darken($color-gray, 2%); - color: darken($color-lowgray, 20%); + background-color: color.adjust($color-gray, $lightness: -2%); + color: color.adjust($color-lowgray, $lightness: -20%); } .maputnik-make-zoom-function svg { @@ -249,17 +250,17 @@ } .maputnik-multibutton .maputnik-button { - background-color: darken($color-midgray, 10%); - color: darken($color-lowgray, 20%); + background-color: color.adjust($color-midgray, $lightness: -10%); + color: color.adjust($color-lowgray, $lightness: -20%); &:hover { - background-color: lighten($color-midgray, 12); + background-color: color.adjust($color-midgray, $lightness: 12%); color: $color-white; } } .maputnik-multibutton .maputnik-button-selected { - background-color: darken($color-midgray, 2%); + background-color: color.adjust($color-midgray, $lightness: -2%); color: $color-lowgray; } } diff --git a/src/styles/_modal.scss b/src/styles/_modal.scss index 3b08ded5..8b6b8e75 100644 --- a/src/styles/_modal.scss +++ b/src/styles/_modal.scss @@ -72,12 +72,12 @@ } .maputnik-modal-header-space { - @extend .maputnik-space; + @extend .maputnik-space; /* stylelint-disable-line */ } //OPEN MODAL .maputnik-upload-button { - @extend .maputnik-big-button; + @extend .maputnik-big-button; /* stylelint-disable-line */ } .maputnik-style-gallery-container { @@ -139,12 +139,12 @@ } .maputnik-add-layer { - @extend .clearfix; + @extend .clearfix; /* stylelint-disable-line */ } //ADD MODAL .maputnik-add-layer-button { - @extend .maputnik-big-button; + @extend .maputnik-big-button; /* stylelint-disable-line */ margin-right: $margin-3; float: right; @@ -221,7 +221,7 @@ } .maputnik-add-source { - @extend .clearfix; + @extend .clearfix; /* stylelint-disable-line */ .maputnik-input-block-label { width: 30%; @@ -233,7 +233,7 @@ } .maputnik-add-source-button { - @extend .maputnik-big-button; + @extend .maputnik-big-button; /* stylelint-disable-line */ display: inline-block; margin-top: 0; diff --git a/src/styles/_toolbar.scss b/src/styles/_toolbar.scss index dc62d25e..7d515f96 100644 --- a/src/styles/_toolbar.scss +++ b/src/styles/_toolbar.scss @@ -1,3 +1,4 @@ +@use 'sass:color'; // TOOLBAR .maputnik-toolbar { position: fixed; @@ -75,7 +76,7 @@ } &:hover .maputnik-toolbar-link-wrapper { - background-color: lighten($color-midgray, 12); + background-color: color.adjust($color-midgray, $lightness: 12%); color: $color-white; } } @@ -93,13 +94,13 @@ .maputnik-toolbar-action { background: inherit; border-width: 0; - @extend .maputnik-toolbar-link; + @extend .maputnik-toolbar-link; /* stylelint-disable-line */ } .maputnik-toolbar-select { background: inherit; border-width: 0; - @extend .maputnik-toolbar-link; + @extend .maputnik-toolbar-link; /* stylelint-disable-line */ select { margin-left: 6px; diff --git a/src/styles/_zoomproperty.scss b/src/styles/_zoomproperty.scss index ae9d72a2..7a76e6b4 100644 --- a/src/styles/_zoomproperty.scss +++ b/src/styles/_zoomproperty.scss @@ -5,12 +5,12 @@ vertical-align: middle; padding: 0 $margin-2 0 0; - @extend .maputnik-icon-button; + @extend .maputnik-icon-button; /* stylelint-disable-line */ } // ZOOM PROPERTY .maputnik-zoom-spec-property { - @extend .clearfix; + @extend .clearfix; /* stylelint-disable-line */ } .maputnik-zoom-spec-property-label { @@ -49,7 +49,7 @@ padding-top: 0; vertical-align: middle; - @extend .maputnik-icon-button; + @extend .maputnik-icon-button; /* stylelint-disable-line */ } .maputnik-add-stop { @@ -65,7 +65,7 @@ vertical-align: middle; padding: 0 $margin-2 0 0; - @extend .maputnik-icon-button; + @extend .maputnik-icon-button; /* stylelint-disable-line */ } .maputnik-data-spec-property { diff --git a/src/styles/index.scss b/src/styles/index.scss index 3b8b69ae..865cf994 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -28,9 +28,6 @@ height: 14px; } -.maputnik-data-spec-property { -} - .maputnik-data-fieldset-inner { background: $color-black; border: solid 1px $color-midgray; diff --git a/src/util/codemirror-mgl.ts b/src/util/codemirror-mgl.ts index 84219cf4..ca6ae5e9 100644 --- a/src/util/codemirror-mgl.ts +++ b/src/util/codemirror-mgl.ts @@ -55,7 +55,9 @@ CodeMirror.registerHelper("lint", "mgl", (text: string, opts: any, doc: any) => try { parser.parse(text); } - catch (e) {} + catch (e) { + // ignore errors + } if (found.length > 0) { // JSON invalid so don't go any further @@ -154,7 +156,7 @@ CodeMirror.registerHelper("lint", "mgl", (text: string, opts: any, doc: any) => found.push(err); } else if (key) { - const path = key.replace(/^\[|\]$/g, "").split(/\.|[\[\]]+/).filter(Boolean) + const path = key.replace(/^\[|\]$/g, "").split(/\.|[[\]]+/).filter(Boolean) const parsedError = getArrayPositionalFromAst(ast, path); if (!parsedError) { console.warn("Something went wrong parsing error:", error); diff --git a/src/util/spec-helper.ts b/src/util/spec-helper.ts index 2574d28a..a9f78bbf 100644 --- a/src/util/spec-helper.ts +++ b/src/util/spec-helper.ts @@ -2,7 +2,7 @@ * If we don't have a default value just make one up */ export function findDefaultFromSpec(spec: { type: 'string' | 'color' | 'boolean' | 'array', default?: any }) { - if (spec.hasOwnProperty('default')) { + if (Object.prototype.hasOwnProperty.call(spec, 'default')) { return spec.default; } diff --git a/tsconfig.json b/tsconfig.json index 39dcb900..4c098757 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "target": "ES2020", "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], + "types": ["geojson"], "module": "ESNext", "skipLibCheck": true,