jmap-carlsource-js 1.2.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ > 0.5%
2
+ last 2 versions
3
+ Firefox ESR
4
+ not dead
package/.eslintrc.js ADDED
@@ -0,0 +1,243 @@
1
+ const path = require("path")
2
+ module.exports = {
3
+ env: {
4
+ browser: true
5
+ },
6
+ // TODO: add "eslint:recommended" to extends one day
7
+ extends: ["plugin:@typescript-eslint/recommended-type-checked", "prettier"],
8
+ parser: "@typescript-eslint/parser",
9
+ parserOptions: {
10
+ project: path.join(__dirname, "tsconfig.json"),
11
+ sourceType: "module"
12
+ },
13
+ plugins: ["eslint-plugin-import", "eslint-plugin-jsdoc", "eslint-plugin-prefer-arrow", "@typescript-eslint"],
14
+ root: true,
15
+ rules: {
16
+ "@typescript-eslint/adjacent-overload-signatures": "error",
17
+ "@typescript-eslint/array-type": [
18
+ "error",
19
+ {
20
+ default: "array-simple"
21
+ }
22
+ ],
23
+ "@typescript-eslint/ban-types": [
24
+ "error",
25
+ {
26
+ types: {
27
+ "Object": {
28
+ message: "Avoid using the `Object` type. Did you mean `object`?"
29
+ },
30
+ "Function": {
31
+ message: "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."
32
+ },
33
+ "Boolean": {
34
+ message: "Avoid using the `Boolean` type. Did you mean `boolean`?"
35
+ },
36
+ "Number": {
37
+ message: "Avoid using the `Number` type. Did you mean `number`?"
38
+ },
39
+ "String": {
40
+ message: "Avoid using the `String` type. Did you mean `string`?"
41
+ },
42
+ "Symbol": {
43
+ message: "Avoid using the `Symbol` type. Did you mean `symbol`?"
44
+ },
45
+ "{}": false
46
+ },
47
+ extendDefaults: true
48
+ }
49
+ ],
50
+ "@typescript-eslint/consistent-type-assertions": "error",
51
+ "@typescript-eslint/consistent-type-definitions": "error",
52
+ "@typescript-eslint/dot-notation": "error",
53
+ "@typescript-eslint/explicit-function-return-type": "off",
54
+ "@typescript-eslint/explicit-member-accessibility": [
55
+ "error",
56
+ {
57
+ accessibility: "explicit"
58
+ }
59
+ ],
60
+ "@typescript-eslint/explicit-module-boundary-types": "off",
61
+ "@typescript-eslint/member-delimiter-style": [
62
+ "error",
63
+ {
64
+ multiline: {
65
+ delimiter: "none",
66
+ requireLast: true
67
+ },
68
+ singleline: {
69
+ delimiter: "semi",
70
+ requireLast: false
71
+ }
72
+ }
73
+ ],
74
+ "@typescript-eslint/member-ordering": "error",
75
+ "@typescript-eslint/naming-convention": "off",
76
+ "@typescript-eslint/no-empty-function": "error",
77
+ "@typescript-eslint/no-empty-interface": "error",
78
+ "@typescript-eslint/no-explicit-any": "off",
79
+ "@typescript-eslint/no-misused-new": "error",
80
+ "@typescript-eslint/no-namespace": "error",
81
+ "@typescript-eslint/no-parameter-properties": "off",
82
+ "no-shadow": "off",
83
+ "@typescript-eslint/no-shadow": [
84
+ "error",
85
+ {
86
+ hoist: "never"
87
+ }
88
+ ],
89
+ "@typescript-eslint/no-unused-expressions": "error",
90
+ "@typescript-eslint/no-use-before-define": "off",
91
+ "@typescript-eslint/no-var-requires": "error",
92
+ "@typescript-eslint/prefer-for-of": "error",
93
+ "@typescript-eslint/prefer-function-type": "error",
94
+ "@typescript-eslint/prefer-namespace-keyword": "error",
95
+ "@typescript-eslint/quotes": [
96
+ "error",
97
+ "double",
98
+ {
99
+ avoidEscape: true
100
+ }
101
+ ],
102
+ "@typescript-eslint/semi": ["error", "never"],
103
+ "@typescript-eslint/triple-slash-reference": [
104
+ "error",
105
+ {
106
+ path: "always",
107
+ types: "prefer-import",
108
+ lib: "always"
109
+ }
110
+ ],
111
+ "@typescript-eslint/type-annotation-spacing": "error",
112
+ "@typescript-eslint/typedef": "off",
113
+ "@typescript-eslint/unified-signatures": "error",
114
+ "arrow-body-style": "error",
115
+ "arrow-parens": ["error", "as-needed"],
116
+ "brace-style": ["error", "1tbs"],
117
+ "comma-dangle": "error",
118
+ "complexity": "off",
119
+ "constructor-super": "error",
120
+ "curly": "error",
121
+ "dot-notation": "error",
122
+ "eol-last": "error",
123
+ "eqeqeq": ["error", "smart"],
124
+ "guard-for-in": "error",
125
+ "id-denylist": [
126
+ "off",
127
+ "any",
128
+ "Number",
129
+ "number",
130
+ "String",
131
+ "string",
132
+ "Boolean",
133
+ "boolean",
134
+ "Undefined",
135
+ "undefined"
136
+ ],
137
+ "id-match": "off",
138
+ "import/order": "off",
139
+ "jsdoc/check-alignment": "error",
140
+ "jsdoc/check-indentation": "error",
141
+ "max-classes-per-file": ["error", 10],
142
+ "max-len": [
143
+ "error",
144
+ {
145
+ code: 222
146
+ }
147
+ ],
148
+ "new-parens": "error",
149
+ "no-bitwise": "error",
150
+ "no-caller": "error",
151
+ "no-cond-assign": "error",
152
+ "no-console": [
153
+ "error",
154
+ {
155
+ allow: [
156
+ "warn",
157
+ "dir",
158
+ "time",
159
+ "timeEnd",
160
+ "timeLog",
161
+ "trace",
162
+ "assert",
163
+ "clear",
164
+ "count",
165
+ "countReset",
166
+ "group",
167
+ "groupEnd",
168
+ "table",
169
+ "debug",
170
+ "info",
171
+ "dirxml",
172
+ "error",
173
+ "groupCollapsed",
174
+ "Console",
175
+ "profile",
176
+ "profileEnd",
177
+ "timeStamp",
178
+ "context"
179
+ ]
180
+ }
181
+ ],
182
+ "no-debugger": "error",
183
+ "no-empty": "error",
184
+ "no-empty-function": "error",
185
+ "no-eval": "off",
186
+ "no-fallthrough": "off",
187
+ "no-invalid-this": "off",
188
+ "no-multiple-empty-lines": "error",
189
+ "no-new-wrappers": "error",
190
+ "no-throw-literal": "error",
191
+ "no-trailing-spaces": [
192
+ "error",
193
+ {
194
+ ignoreComments: true
195
+ }
196
+ ],
197
+ "no-undef-init": "error",
198
+ "no-underscore-dangle": "off",
199
+ "no-unreachable": "error",
200
+ "no-unsafe-finally": "error",
201
+ "no-unused-expressions": "error",
202
+ "no-unused-labels": "error",
203
+ "no-use-before-define": "off",
204
+ "no-var": "error",
205
+ "object-shorthand": "error",
206
+ "one-var": ["error", "never"],
207
+ "prefer-const": "error",
208
+ "quote-props": ["error", "consistent-as-needed"],
209
+ "quotes": ["error", "double", "avoid-escape"],
210
+ "radix": "error",
211
+ "semi": ["error", "never"],
212
+ "space-before-function-paren": [
213
+ "error",
214
+ {
215
+ anonymous: "never",
216
+ asyncArrow: "always",
217
+ named: "never"
218
+ }
219
+ ],
220
+ "spaced-comment": [
221
+ "error",
222
+ "always",
223
+ {
224
+ markers: ["/"]
225
+ }
226
+ ],
227
+ "use-isnan": "error",
228
+ "valid-typeof": "off",
229
+ "no-unused-vars": "off",
230
+ "@typescript-eslint/no-unused-vars": "off",
231
+ "@typescript-eslint/no-unsafe-argument": "off",
232
+ "@typescript-eslint/no-inferrable-types": "off",
233
+ "@typescript-eslint/no-unsafe-member-access": "off",
234
+ "@typescript-eslint/restrict-template-expressions": "off",
235
+ "@typescript-eslint/no-unsafe-assignment": "off",
236
+ "@typescript-eslint/no-unsafe-return": "off",
237
+ "@typescript-eslint/no-misused-promises": "off",
238
+ "@typescript-eslint/no-floating-promises": "off",
239
+ "@typescript-eslint/unbound-method": "off",
240
+ "@typescript-eslint/no-unsafe-call": "off",
241
+ "@typescript-eslint/require-await": "off"
242
+ }
243
+ }
package/.prettierrc CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "printWidth": 120,
2
+ "printWidth": 130,
3
3
  "semi": false,
4
4
  "quoteProps": "consistent",
5
5
  "jsxBracketSameLine": true,
@@ -7,4 +7,4 @@
7
7
  "tabWidth": 2,
8
8
  "arrowParens": "avoid",
9
9
  "bracketSpacing": true
10
- }
10
+ }
package/package.json CHANGED
@@ -1,21 +1,14 @@
1
1
  {
2
2
  "name": "jmap-carlsource-js",
3
- "version": "1.2.1",
3
+ "version": "2.0.0",
4
4
  "description": "Carl-Source JMap NG Extension",
5
5
  "private": false,
6
6
  "main": "public/index.js",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1",
9
- "doc": "export NODE_ENV='production'; gulp typedoc --gulpfile build/gulpfile.js;",
10
- "lint": "export NODE_ENV='production'; gulp lint --gulpfile build/gulpfile.js;",
11
- "build": "export NODE_ENV='production'; gulp --gulpfile build/gulpfile.js;",
12
- "build-dev": "export NODE_ENV='development'; gulp --gulpfile build/gulpfile.js;",
13
- "build-win": "gulp --gulpfile build/gulpfile.js",
14
- "analyse": "gulp analyse-webpack --gulpfile build/gulpfile.js",
15
- "copy": "export NODE_ENV='development'; gulp copy-html --gulpfile build/gulpfile.js;",
16
- "count-all": "find ./src -name '*.ts*' | xargs wc -l",
17
- "count-test": "find ./src -name '*.spec.ts' | xargs wc -l",
18
- "start": "gulp --gulpfile build/gulpfile.js start"
9
+ "lint": "export NODE_ENV='production'; node build/buildfile.js lint;",
10
+ "build": "node build/buildfile.js build ",
11
+ "start": "export NODE_ENV='development'; node build/buildfile.js start;"
19
12
  },
20
13
  "author": "K2 Geospatial developer",
21
14
  "license": "ISC",
@@ -24,63 +17,60 @@
24
17
  "node_modules"
25
18
  ],
26
19
  "dependencies": {
27
- "@date-io/moment": "^1.3.13",
28
- "@material-ui/core": "^4.9.14",
29
- "@material-ui/icons": "^4.9.1",
30
- "@types/color": "^3.0.1",
31
- "axios": "^0.18.0",
32
- "babel-polyfill": "^6.26.0",
33
- "color": "^3.1.3",
34
- "mapbox-gl": "^1.6.0",
35
- "moment": "^2.24.0",
36
- "react": "^16.12.0",
37
- "react-dom": "^16.12.0",
38
- "react-redux": "^7.2.0",
39
- "redux": "^4.0.1"
20
+ "color": "^5.0.0"
21
+ },
22
+ "peerDependencies": {
23
+ "@mui/material": "^5.15.18",
24
+ "axios": "^1.6.8",
25
+ "core-js": "^3.37.1",
26
+ "maplibre-gl": "^4.5.0",
27
+ "react": "^18.3.1",
28
+ "react-dom": "^18.3.1",
29
+ "react-redux": "^9.1.2",
30
+ "redux": "^5.0.1",
31
+ "@emotion/react": "^11.11.4",
32
+ "@emotion/styled": "^11.11.5"
40
33
  },
41
34
  "devDependencies": {
42
- "@fortawesome/fontawesome-free": "^5.13.0",
43
- "@fortawesome/react-fontawesome": "^0.1.11",
44
- "@fortawesome/fontawesome-svg-core": "^1.2.31",
45
- "@types/axios": "^0.14.0",
46
- "@types/es6-promise": "^3.3.0",
47
- "@types/mapbox-gl": "^1.6.0",
48
- "@types/react": "^16.9.13",
49
- "@types/react-dom": "^16.9.4",
50
- "@types/react-redux": "^7.1.7",
51
- "@types/webpack-env": "^1.13.9",
52
- "awesome-typescript-loader": "^5.0.0",
53
- "babel-core": "^6.26.0",
54
- "babel-loader": "^7.1.4",
55
- "babel-plugin-dynamic-import-webpack": "^1.1.0",
56
- "babel-plugin-es6-promise": "^1.1.1",
57
- "babel-plugin-transform-object-assign": "^6.22.0",
58
- "babel-plugin-transform-runtime": "^6.23.0",
59
- "babel-preset-env": "^1.6.1",
60
- "babel-preset-es2015": "^6.24.1",
61
- "babel-preset-react": "^6.24.1",
62
- "css-loader": "^3.0.0",
63
- "del": "^2.2.2",
64
- "file-loader": "^1.1.11",
65
- "gulp": "^4.0.0",
66
- "gulp-plumber": "^1.2.0",
67
- "gulp-rewrite-css": "^1.0.4",
68
- "gulp-tslint": "^8.1.3",
69
- "jmap-app": "2.3.8",
70
- "jmap-core": "2.3.8",
71
- "postcss-loader": "^2.1.4",
35
+ "@babel/core": "^7.24.5",
36
+ "@babel/plugin-proposal-decorators": "^7.24.1",
37
+ "@babel/plugin-transform-arrow-functions": "^7.24.1",
38
+ "@babel/plugin-transform-class-properties": "^7.24.1",
39
+ "@babel/plugin-transform-object-assign": "^7.24.1",
40
+ "@babel/plugin-transform-react-jsx": "^7.23.4",
41
+ "@babel/plugin-transform-runtime": "^7.24.3",
42
+ "@babel/preset-env": "^7.24.5",
43
+ "@babel/preset-react": "^7.24.1",
44
+ "@babel/preset-typescript": "^7.24.1",
45
+ "@babel/runtime": "^7.24.5",
46
+ "@fortawesome/fontawesome-free": "^6.5.2",
47
+ "@fortawesome/react-fontawesome": "^0.2.1",
48
+ "@types/react": "^18.3.2",
49
+ "@types/react-dom": "^18.3.0",
50
+ "@types/react-redux": "^7.1.33",
51
+ "@types/react-window": "^1.8.8",
52
+ "@types/webpack-env": "^1.18.5",
53
+ "@typescript-eslint/eslint-plugin": "^7.9.0",
54
+ "@typescript-eslint/parser": "^7.9.0",
55
+ "babel-loader": "^9.1.3",
56
+ "css-loader": "^7.1.1",
57
+ "del": "^6.0.0",
58
+ "eslint": "^8.56.0",
59
+ "eslint-config-prettier": "^9.1.0",
60
+ "eslint-plugin-import": "^2.29.1",
61
+ "eslint-plugin-jsdoc": "^48.2.5",
62
+ "eslint-plugin-prefer-arrow": "^1.2.3",
63
+ "jmapserver-ng-core-types": "2.4.0",
64
+ "jmapserver-ng-types": "2.4.1",
65
+ "postcss": "^8.5.3",
66
+ "postcss-loader": "^8.1.1",
72
67
  "postcss-parent-selector": "^1.0.0",
73
- "source-map-loader": "^0.2.3",
74
- "style-loader": "^0.20.3",
75
- "ts-loader": "^4.2.0",
76
- "tslint": "^5.20.1",
77
- "tslint-loader": "^3.5.4",
78
- "typescript": "^3.8.3",
79
- "uglifyjs-webpack-plugin": "^1.2.4",
80
- "vinyl-paths": "^2.1.0",
81
- "webpack": "^4.34.0",
82
- "webpack-bundle-analyzer": "^3.3.2",
83
- "webpack-dev-server": "^3.11.2",
84
- "webpack-stream": "^5.2.1"
68
+ "style-loader": "^4.0.0",
69
+ "terser-webpack-plugin": "^5.3.10",
70
+ "ts-loader": "^9.5.1",
71
+ "typescript": "^5.4.5",
72
+ "webpack": "^5.91.0",
73
+ "webpack-bundle-analyzer": "^4.10.2",
74
+ "webpack-dev-server": "^5.0.4"
85
75
  }
86
- }
76
+ }