jmapcloud-jakartowns 2.1.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.
- package/.browserslistrc +4 -0
- package/.eslintrc.js +232 -0
- package/.prettierrc +10 -0
- package/package.json +84 -0
- package/public/dev/index.html +35 -0
- package/public/index.html +26 -0
- package/readme.md +25 -0
package/.browserslistrc
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
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": ["off", "any", "Number", "number", "String", "string", "Boolean", "boolean", "Undefined", "undefined"],
|
|
126
|
+
"id-match": "off",
|
|
127
|
+
"import/order": "off",
|
|
128
|
+
"jsdoc/check-alignment": "error",
|
|
129
|
+
"jsdoc/check-indentation": "error",
|
|
130
|
+
"max-classes-per-file": ["error", 10],
|
|
131
|
+
"max-len": [
|
|
132
|
+
"error",
|
|
133
|
+
{
|
|
134
|
+
code: 222
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"new-parens": "error",
|
|
138
|
+
"no-bitwise": "error",
|
|
139
|
+
"no-caller": "error",
|
|
140
|
+
"no-cond-assign": "error",
|
|
141
|
+
"no-console": [
|
|
142
|
+
"error",
|
|
143
|
+
{
|
|
144
|
+
allow: [
|
|
145
|
+
"warn",
|
|
146
|
+
"dir",
|
|
147
|
+
"time",
|
|
148
|
+
"timeEnd",
|
|
149
|
+
"timeLog",
|
|
150
|
+
"trace",
|
|
151
|
+
"assert",
|
|
152
|
+
"clear",
|
|
153
|
+
"count",
|
|
154
|
+
"countReset",
|
|
155
|
+
"group",
|
|
156
|
+
"groupEnd",
|
|
157
|
+
"table",
|
|
158
|
+
"debug",
|
|
159
|
+
"info",
|
|
160
|
+
"dirxml",
|
|
161
|
+
"error",
|
|
162
|
+
"groupCollapsed",
|
|
163
|
+
"Console",
|
|
164
|
+
"profile",
|
|
165
|
+
"profileEnd",
|
|
166
|
+
"timeStamp",
|
|
167
|
+
"context"
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"no-debugger": "error",
|
|
172
|
+
"no-empty": "error",
|
|
173
|
+
"no-empty-function": "error",
|
|
174
|
+
"no-eval": "off",
|
|
175
|
+
"no-fallthrough": "off",
|
|
176
|
+
"no-invalid-this": "off",
|
|
177
|
+
"no-multiple-empty-lines": "error",
|
|
178
|
+
"no-new-wrappers": "error",
|
|
179
|
+
"no-throw-literal": "error",
|
|
180
|
+
"no-trailing-spaces": [
|
|
181
|
+
"error",
|
|
182
|
+
{
|
|
183
|
+
ignoreComments: true
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"no-undef-init": "error",
|
|
187
|
+
"no-underscore-dangle": "off",
|
|
188
|
+
"no-unreachable": "error",
|
|
189
|
+
"no-unsafe-finally": "error",
|
|
190
|
+
"no-unused-expressions": "error",
|
|
191
|
+
"no-unused-labels": "error",
|
|
192
|
+
"no-use-before-define": "off",
|
|
193
|
+
"no-var": "error",
|
|
194
|
+
"object-shorthand": "error",
|
|
195
|
+
"one-var": ["error", "never"],
|
|
196
|
+
"prefer-const": "error",
|
|
197
|
+
"quote-props": ["error", "consistent-as-needed"],
|
|
198
|
+
"quotes": ["error", "double", "avoid-escape"],
|
|
199
|
+
"radix": "error",
|
|
200
|
+
"semi": ["error", "never"],
|
|
201
|
+
"space-before-function-paren": [
|
|
202
|
+
"error",
|
|
203
|
+
{
|
|
204
|
+
anonymous: "never",
|
|
205
|
+
asyncArrow: "always",
|
|
206
|
+
named: "never"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"spaced-comment": [
|
|
210
|
+
"error",
|
|
211
|
+
"always",
|
|
212
|
+
{
|
|
213
|
+
markers: ["/"]
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"use-isnan": "error",
|
|
217
|
+
"valid-typeof": "off",
|
|
218
|
+
"no-unused-vars": "off",
|
|
219
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
220
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
221
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
222
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
223
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
224
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
225
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
226
|
+
"@typescript-eslint/no-misused-promises": "off",
|
|
227
|
+
"@typescript-eslint/no-floating-promises": "off",
|
|
228
|
+
"@typescript-eslint/unbound-method": "off",
|
|
229
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
230
|
+
"@typescript-eslint/require-await": "off"
|
|
231
|
+
}
|
|
232
|
+
}
|
package/.prettierrc
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jmapcloud-jakartowns",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "K2 Geospatial Extension",
|
|
5
|
+
"private": false,
|
|
6
|
+
"main": "public/index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
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;"
|
|
12
|
+
},
|
|
13
|
+
"author": "K2 Geospatial developer",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"ignore": [
|
|
16
|
+
"**/.*",
|
|
17
|
+
"node_modules"
|
|
18
|
+
],
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@hookform/resolvers": "^3.9.0",
|
|
21
|
+
"@mui/icons-material": "^5.16.7",
|
|
22
|
+
"react-hook-form": "^7.53.0",
|
|
23
|
+
"react-rnd": "10.4.13",
|
|
24
|
+
"react-tooltip": "5.28.0",
|
|
25
|
+
"zod": "^3.23.8"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@emotion/react": "^11.11.4",
|
|
29
|
+
"@emotion/styled": "^11.11.5",
|
|
30
|
+
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
31
|
+
"@fortawesome/pro-light-svg-icons": "^6.5.2",
|
|
32
|
+
"@fortawesome/pro-solid-svg-icons": "^6.5.2",
|
|
33
|
+
"@fortawesome/react-fontawesome": "^0.2.1",
|
|
34
|
+
"@mui/material": "^5.15.18",
|
|
35
|
+
"axios": "^1.6.8",
|
|
36
|
+
"core-js": "^3.37.1",
|
|
37
|
+
"maplibre-gl": "^4.7.1",
|
|
38
|
+
"react": "^18.3.1",
|
|
39
|
+
"react-dom": "^18.3.1",
|
|
40
|
+
"react-redux": "^9.1.2",
|
|
41
|
+
"redux": "^5.0.1"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@babel/core": "^7.24.5",
|
|
45
|
+
"@babel/plugin-proposal-decorators": "^7.24.1",
|
|
46
|
+
"@babel/plugin-transform-arrow-functions": "^7.24.1",
|
|
47
|
+
"@babel/plugin-transform-class-properties": "^7.24.1",
|
|
48
|
+
"@babel/plugin-transform-object-assign": "^7.24.1",
|
|
49
|
+
"@babel/plugin-transform-react-jsx": "^7.23.4",
|
|
50
|
+
"@babel/plugin-transform-runtime": "^7.24.3",
|
|
51
|
+
"@babel/preset-env": "^7.24.5",
|
|
52
|
+
"@babel/preset-react": "^7.24.1",
|
|
53
|
+
"@babel/preset-typescript": "^7.24.1",
|
|
54
|
+
"@babel/runtime": "^7.24.5",
|
|
55
|
+
"@fortawesome/fontawesome-free": "^6.5.2",
|
|
56
|
+
"@fortawesome/react-fontawesome": "^0.2.1",
|
|
57
|
+
"@types/react": "^18.3.2",
|
|
58
|
+
"@types/react-dom": "^18.3.0",
|
|
59
|
+
"@types/react-redux": "^7.1.33",
|
|
60
|
+
"@types/react-window": "^1.8.8",
|
|
61
|
+
"@types/webpack-env": "^1.18.5",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^7.9.0",
|
|
63
|
+
"@typescript-eslint/parser": "^7.9.0",
|
|
64
|
+
"babel-loader": "^9.1.3",
|
|
65
|
+
"css-loader": "^7.1.1",
|
|
66
|
+
"del": "^6.0.0",
|
|
67
|
+
"eslint": "^8.56.0",
|
|
68
|
+
"eslint-config-prettier": "^9.1.0",
|
|
69
|
+
"eslint-plugin-import": "^2.29.1",
|
|
70
|
+
"eslint-plugin-jsdoc": "^48.2.5",
|
|
71
|
+
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
72
|
+
"jmapcloud-ng-core-types": "1.0.20",
|
|
73
|
+
"jmapcloud-ng-types": "1.0.22",
|
|
74
|
+
"postcss-loader": "^8.1.1",
|
|
75
|
+
"postcss-parent-selector": "^1.0.0",
|
|
76
|
+
"style-loader": "^4.0.0",
|
|
77
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
78
|
+
"ts-loader": "^9.5.1",
|
|
79
|
+
"typescript": "5.4.5",
|
|
80
|
+
"webpack": "^5.91.0",
|
|
81
|
+
"webpack-bundle-analyzer": "^4.10.2",
|
|
82
|
+
"webpack-dev-server": "^5.0.4"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<style>
|
|
7
|
+
html,
|
|
8
|
+
body {
|
|
9
|
+
padding: 0px;
|
|
10
|
+
margin: 0px;
|
|
11
|
+
height: 100%;
|
|
12
|
+
width: 100%;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<script type="text/javascript">
|
|
19
|
+
window.JMAP_OPTIONS = {
|
|
20
|
+
restBaseUrl: "http://localhost:8080/services/rest/v2.0",
|
|
21
|
+
// in development, for a server project extension, you must
|
|
22
|
+
// specify the server Id and local override for the extention
|
|
23
|
+
extensionsUrlOverride: [
|
|
24
|
+
{
|
|
25
|
+
extensionUniqueIdentifier: "jmap.extensions.jakartowns.requests.JakartownsRequest", // serverExtensionId for JMS, jmapCloudExtensionUrn for JMC
|
|
26
|
+
jsUrl: "https://localhost:8083/index.js" // this should be fine if you don't change your build config
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
31
|
+
<!-- if you want to load your extension right away, uncomment the following line -->
|
|
32
|
+
<!-- <script defer type="text/javascript" src="/index.js"></script> -->
|
|
33
|
+
<script defer type="text/javascript" src="https://cdn.jsdelivr.net/npm/jmapserver-ng@7_Lima_HF1"></script>
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<style>
|
|
7
|
+
html,
|
|
8
|
+
body {
|
|
9
|
+
padding: 0px;
|
|
10
|
+
margin: 0px;
|
|
11
|
+
height: 100%;
|
|
12
|
+
width: 100%;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
16
|
+
</head>
|
|
17
|
+
|
|
18
|
+
<body>
|
|
19
|
+
<script type="text/javascript">
|
|
20
|
+
window.JMAP_OPTIONS = {
|
|
21
|
+
restBaseUrl: "https://jmap7dev.jmaponline.net/services/rest/v2.0"
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
<script src="https://cdn.jsdelivr.net/npm/jmapserver-ng@7_Lima_HF1"></script>
|
|
25
|
+
</body>
|
|
26
|
+
</html>
|
package/readme.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
This is the NG official extension repo.
|
|
2
|
+
|
|
3
|
+
Use this template to start new projects involving NG Core and/or App.
|
|
4
|
+
|
|
5
|
+
#### Install the following vs-code extensions:
|
|
6
|
+
|
|
7
|
+
- "TSLint (deprecated)" extention
|
|
8
|
+
- "Prettier - Code formatter" extention (Author : Esben Petersen)
|
|
9
|
+
- "vscode-styled-components" extention (Author : Julien Poissonier)
|
|
10
|
+
|
|
11
|
+
#### Install dependencies (process only one time):
|
|
12
|
+
|
|
13
|
+
npm i
|
|
14
|
+
|
|
15
|
+
#### To start the application:
|
|
16
|
+
|
|
17
|
+
npm start
|
|
18
|
+
|
|
19
|
+
The application is accessible at this location: https://localhost:8083
|
|
20
|
+
|
|
21
|
+
When code is changed, it's automatically built and the web page refresh by its own (thanks webpack dev server).
|
|
22
|
+
|
|
23
|
+
#### Configuration
|
|
24
|
+
|
|
25
|
+
The viewer's initial position is defined using window.JMAP_OPTIONS.map in the index.html
|