node-red-contrib-web-worldmap 5.6.1 → 5.7.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/CHANGELOG.md +1 -0
- package/README.md +5 -0
- package/node_modules/@turf/bezier-spline/package.json +4 -5
- package/node_modules/@turf/helpers/package.json +2 -3
- package/node_modules/@turf/invariant/package.json +3 -4
- package/node_modules/body-parser/HISTORY.md +6 -0
- package/node_modules/body-parser/lib/types/json.js +1 -5
- package/node_modules/body-parser/lib/types/urlencoded.js +5 -6
- package/node_modules/body-parser/package.json +2 -2
- package/node_modules/hasown/CHANGELOG.md +11 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +1 -0
- package/node_modules/hasown/package.json +14 -14
- package/node_modules/path-to-regexp/index.js +2 -0
- package/node_modules/path-to-regexp/package.json +1 -1
- package/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/node_modules/side-channel-list/index.js +1 -3
- package/node_modules/side-channel-list/package.json +8 -8
- package/node_modules/side-channel-list/test/index.js +50 -0
- package/package.json +6 -6
- package/worldmap/css/worldmap.css +4 -0
- package/worldmap/index.html +2 -5
- package/worldmap/worldmap.js +323 -56
- package/worldmap.js +10 -8
- package/node_modules/hasown/.eslintrc +0 -5
- package/worldmap/leaflet/Leaflet.Dialog.css +0 -106
- package/worldmap/leaflet/Leaflet.Dialog.js +0 -372
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
+
- v5.7.0 - Add events for openPopup and closePopup actions, small popup fixups. Add showdialog command.
|
|
3
4
|
- v5.6.1 - Also call autoswitch on initial connect to ensure map in view.
|
|
4
5
|
- v5.6.0 - Autoswitch pmtiles basemaps based on zoom and/or coverage.
|
|
5
6
|
- v5.5.8 - Bump qs dep for CVE
|
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ A <a href="https://nodered.org" target="mapinfo">Node-RED</a> node to provide a
|
|
|
10
10
|
|
|
11
11
|
### Updates
|
|
12
12
|
|
|
13
|
+
- v5.7.0 - Add events for openPopup and closePopup, small popup fixups. Add showdialog command.
|
|
13
14
|
- v5.6.1 - Also call autoswitch on initial connect to ensure map in view.
|
|
14
15
|
- v5.6.0 - Autoswitch pmtiles basemaps based on zoom and/or coverage.
|
|
15
16
|
- v5.5.8 - Bump qs dep for CVE
|
|
@@ -404,6 +405,7 @@ Optional properties for **msg.payload.command** include
|
|
|
404
405
|
- **showmenu** - Show or hide the display of the hamberger menu control in the top right . Values can be "show" or "hide". - `{"command":{"showmenu": "hide"}}`
|
|
405
406
|
- **showlayers** - Show or hide the display of selectable layers. Does not control the display of an individual layer, rather a users ability to interact with them. Values can be "show" or "hide". - `{"command":{"showlayers": "hide"}}`
|
|
406
407
|
- **sidcEdgeIcon** - Show or hide small sidc icons around edge of map for things just outside of view. Values can be true or false (default is true). - `{"command":{"sidcEdgeIcon": false}}`
|
|
408
|
+
- **showdialog** - Show a dialog style overlay of html to provide information to the user. Send an empty string to close automatically. - `{"command":{"showdialog": "<h1>Title</h1>Hello World"}}`
|
|
407
409
|
|
|
408
410
|
#### To switch layer, move map and zoom
|
|
409
411
|
|
|
@@ -677,6 +679,9 @@ The **worldmap in** node can be used to receive various events from the map. Exa
|
|
|
677
679
|
|
|
678
680
|
{ "action": "file", "name": "myfilename", "type":"image/jpeg", "lat":51, "lon":-1, "content":"....."} // when a file is dropped on the map - see below.
|
|
679
681
|
|
|
682
|
+
{ "action": "openPopup", "name":"Poptest", "lat":47.59, "lon":18.41, "popped":true } // when a popup is opened
|
|
683
|
+
{ "action":"closePopup", "name":"Poptest", "lat":47.59, "lon":18.41, "popped":false } // when a popup is closed
|
|
684
|
+
|
|
680
685
|
{ "action": "button", "name": "My Fancy Button" } // when a user defined button is clicked
|
|
681
686
|
|
|
682
687
|
{ "action": "feedback", "name": "some name", "value": "some value", "lat":51, "lon":0, "layer":"unknown" } // when a user calls the feedback function - see below
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/bezier-spline",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.5",
|
|
4
4
|
"description": "Smooths a line into a curve using Bézier splines, great for visualizing routes.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"scripts": {
|
|
48
48
|
"bench": "tsx bench.ts",
|
|
49
49
|
"build": "tsup --config ../../tsup.config.ts",
|
|
50
|
-
"docs": "tsx ../../scripts/generate-readmes.ts",
|
|
51
50
|
"test": "pnpm run /test:.*/",
|
|
52
51
|
"test:tape": "tsx test.ts"
|
|
53
52
|
},
|
|
@@ -63,10 +62,10 @@
|
|
|
63
62
|
"write-json-file": "^6.0.0"
|
|
64
63
|
},
|
|
65
64
|
"dependencies": {
|
|
66
|
-
"@turf/helpers": "7.3.
|
|
67
|
-
"@turf/invariant": "7.3.
|
|
65
|
+
"@turf/helpers": "7.3.5",
|
|
66
|
+
"@turf/invariant": "7.3.5",
|
|
68
67
|
"@types/geojson": "^7946.0.10",
|
|
69
68
|
"tslib": "^2.8.1"
|
|
70
69
|
},
|
|
71
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "a33ca387405df72847af00cdf689d3209301a2c1"
|
|
72
71
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/helpers",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.5",
|
|
4
4
|
"description": "Provides helper functions to create GeoJSON features, like points, lines, or areas on a map.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"scripts": {
|
|
53
53
|
"bench": "tsx bench.ts",
|
|
54
54
|
"build": "tsup --config ../../tsup.config.ts",
|
|
55
|
-
"docs": "tsx ../../scripts/generate-readmes.ts",
|
|
56
55
|
"test": "pnpm run /test:.*/",
|
|
57
56
|
"test:tape": "tsx test.ts",
|
|
58
57
|
"test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
|
|
@@ -70,5 +69,5 @@
|
|
|
70
69
|
"@types/geojson": "^7946.0.10",
|
|
71
70
|
"tslib": "^2.8.1"
|
|
72
71
|
},
|
|
73
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "a33ca387405df72847af00cdf689d3209301a2c1"
|
|
74
73
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/invariant",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.5",
|
|
4
4
|
"description": "Lightweight utility for input validation and data extraction in Turf.js. Ensures GeoJSON inputs are in the correct format and extracts specific components like coordinates or geometries.",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"scripts": {
|
|
50
50
|
"bench": "tsx bench.ts",
|
|
51
51
|
"build": "tsup --config ../../tsup.config.ts",
|
|
52
|
-
"docs": "tsx ../../scripts/generate-readmes.ts",
|
|
53
52
|
"test": "pnpm run /test:.*/",
|
|
54
53
|
"test:tape": "tsx test.ts",
|
|
55
54
|
"test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
|
|
@@ -64,9 +63,9 @@
|
|
|
64
63
|
"typescript": "^5.8.3"
|
|
65
64
|
},
|
|
66
65
|
"dependencies": {
|
|
67
|
-
"@turf/helpers": "7.3.
|
|
66
|
+
"@turf/helpers": "7.3.5",
|
|
68
67
|
"@types/geojson": "^7946.0.10",
|
|
69
68
|
"tslib": "^2.8.1"
|
|
70
69
|
},
|
|
71
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "a33ca387405df72847af00cdf689d3209301a2c1"
|
|
72
71
|
}
|
|
@@ -158,11 +158,7 @@ function createStrictSyntaxError (str, char) {
|
|
|
158
158
|
var partial = ''
|
|
159
159
|
|
|
160
160
|
if (index !== -1) {
|
|
161
|
-
partial = str.substring(0, index) + JSON_SYNTAX_CHAR
|
|
162
|
-
|
|
163
|
-
for (var i = index + 1; i < str.length; i++) {
|
|
164
|
-
partial += JSON_SYNTAX_CHAR
|
|
165
|
-
}
|
|
161
|
+
partial = str.substring(0, index) + new Array(str.length - index + 1).join(JSON_SYNTAX_CHAR)
|
|
166
162
|
}
|
|
167
163
|
|
|
168
164
|
try {
|
|
@@ -206,16 +206,15 @@ function getCharset (req) {
|
|
|
206
206
|
|
|
207
207
|
function parameterCount (body, limit) {
|
|
208
208
|
var count = 0
|
|
209
|
-
var index =
|
|
209
|
+
var index = -1
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
do {
|
|
212
212
|
count++
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
if (count === limit) {
|
|
213
|
+
if (count > limit) {
|
|
216
214
|
return undefined
|
|
217
215
|
}
|
|
218
|
-
|
|
216
|
+
index = body.indexOf('&', index + 1)
|
|
217
|
+
} while (index !== -1)
|
|
219
218
|
|
|
220
219
|
return count
|
|
221
220
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "body-parser",
|
|
3
3
|
"description": "Node.js body parsing middleware",
|
|
4
|
-
"version": "1.20.
|
|
4
|
+
"version": "1.20.5",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"http-errors": "~2.0.1",
|
|
18
18
|
"iconv-lite": "~0.4.24",
|
|
19
19
|
"on-finished": "~2.4.1",
|
|
20
|
-
"qs": "~6.
|
|
20
|
+
"qs": "~6.15.1",
|
|
21
21
|
"raw-body": "~2.5.3",
|
|
22
22
|
"type-is": "~1.6.18",
|
|
23
23
|
"unpipe": "~1.0.0"
|
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v2.0.3](https://github.com/inspect-js/hasOwn/compare/v2.0.2...v2.0.3) - 2026-04-17
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [actions] update workflows [`fb837b8`](https://github.com/inspect-js/hasOwn/commit/fb837b849bcdb8416fdc8fd344edfacd5574696c)
|
|
13
|
+
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `eslint`, `mock-property`, `npmignore`, `tape` [`f4b279b`](https://github.com/inspect-js/hasOwn/commit/f4b279bd682be34b3f0ede2a58d4e8acb58d6d47)
|
|
14
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`; migrate to flat config [`7e415ce`](https://github.com/inspect-js/hasOwn/commit/7e415cee55ebf43b3c34d7fd86db73a9928b05f7)
|
|
15
|
+
- [Dev Deps] update `eslint` [`ef313da`](https://github.com/inspect-js/hasOwn/commit/ef313da342d33b60e23e738b9f5a86f6065f39ef)
|
|
16
|
+
- [meta] use `npm audit` instead of `aud` [`d5c6d4d`](https://github.com/inspect-js/hasOwn/commit/d5c6d4d7a19c6ca4f14ac173b30d8bf25abcabee)
|
|
17
|
+
- [types] add overload that narrows the key [`cc03a09`](https://github.com/inspect-js/hasOwn/commit/cc03a097e9402fb8b86d413050e67f790dd6c8c5)
|
|
18
|
+
|
|
8
19
|
## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10
|
|
9
20
|
|
|
10
21
|
### Commits
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hasown",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "A robust, ES3 compatible, \"has own property\" predicate.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
15
15
|
"prepublishOnly": "safe-publish-latest",
|
|
16
16
|
"prelint": "evalmd README.md",
|
|
17
|
-
"lint": "eslint
|
|
17
|
+
"lint": "eslint .",
|
|
18
18
|
"postlint": "npm run tsc",
|
|
19
19
|
"pretest": "npm run lint",
|
|
20
20
|
"tsc": "tsc -p .",
|
|
21
21
|
"posttsc": "attw -P",
|
|
22
22
|
"tests-only": "nyc tape 'test/**/*.js'",
|
|
23
23
|
"test": "npm run tests-only",
|
|
24
|
-
"posttest": "
|
|
24
|
+
"posttest": "npx npm@\">= 10.2\" audit --production",
|
|
25
25
|
"version": "auto-changelog && git add CHANGELOG.md",
|
|
26
26
|
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
27
27
|
},
|
|
@@ -51,22 +51,22 @@
|
|
|
51
51
|
"function-bind": "^1.1.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@arethetypeswrong/cli": "^0.
|
|
55
|
-
"@ljharb/eslint-config": "^
|
|
56
|
-
"@ljharb/tsconfig": "^0.2
|
|
54
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
55
|
+
"@ljharb/eslint-config": "^22.2.2",
|
|
56
|
+
"@ljharb/tsconfig": "^0.3.2",
|
|
57
57
|
"@types/function-bind": "^1.1.10",
|
|
58
|
-
"@types/
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"eslint": "=8.8.0",
|
|
58
|
+
"@types/tape": "^5.8.1",
|
|
59
|
+
"auto-changelog": "^2.5.0",
|
|
60
|
+
"encoding": "^0.1.13",
|
|
61
|
+
"eslint": "^10.2.0",
|
|
63
62
|
"evalmd": "^0.0.19",
|
|
64
63
|
"in-publish": "^2.0.1",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
64
|
+
"jiti": "^0.0.0",
|
|
65
|
+
"mock-property": "^1.1.0",
|
|
66
|
+
"npmignore": "^0.3.5",
|
|
67
67
|
"nyc": "^10.3.2",
|
|
68
68
|
"safe-publish-latest": "^2.0.0",
|
|
69
|
-
"tape": "^5.
|
|
69
|
+
"tape": "^5.9.0",
|
|
70
70
|
"typescript": "next"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
@@ -94,6 +94,7 @@ function pathToRegexp(path, keys, options) {
|
|
|
94
94
|
pos = offset + match.length;
|
|
95
95
|
|
|
96
96
|
if (match === '*') {
|
|
97
|
+
backtrack = '';
|
|
97
98
|
extraOffset += 3;
|
|
98
99
|
return '(.*)';
|
|
99
100
|
}
|
|
@@ -123,6 +124,7 @@ function pathToRegexp(path, keys, options) {
|
|
|
123
124
|
+ ')'
|
|
124
125
|
+ optional;
|
|
125
126
|
|
|
127
|
+
backtrack = '';
|
|
126
128
|
extraOffset += result.length - match.length;
|
|
127
129
|
|
|
128
130
|
return result;
|
|
@@ -5,11 +5,32 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v1.0.1](https://github.com/ljharb/side-channel-list.git
|
|
9
|
+
/compare/v1.0.0...v1.0.1) - 2026-04-08
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- [Fix] `delete`: do not reset the list when deleting the head node of a multi-node list [`#3`](https://github.com/ljharb/side-channel-list.git
|
|
14
|
+
/issues/3)
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [actions] update workflows [`9e79e6b`](https://github.com/ljharb/side-channel-list.git
|
|
19
|
+
/commit/9e79e6bf845532fafbf03b547429fe4f737214a3)
|
|
20
|
+
- [Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `eslint`, `npmignore` [`babf3ca`](https://github.com/ljharb/side-channel-list.git
|
|
21
|
+
/commit/babf3ca4849d2fd893a470a6b82c62a80ccc9307)
|
|
22
|
+
- [Deps] update `object-inspect` [`9f0f4b8`](https://github.com/ljharb/side-channel-list.git
|
|
23
|
+
/commit/9f0f4b88ff2aa8b7b7c9e589ac1513f133d64b9f)
|
|
24
|
+
|
|
8
25
|
## v1.0.0 - 2024-12-10
|
|
9
26
|
|
|
10
27
|
### Commits
|
|
11
28
|
|
|
12
|
-
- Initial implementation, tests, readme, types [`5d6baee`](https://github.com/ljharb/side-channel-list
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
29
|
+
- Initial implementation, tests, readme, types [`5d6baee`](https://github.com/ljharb/side-channel-list.git
|
|
30
|
+
/commit/5d6baee5c9054a1238007f5a1dfc109a7a816251)
|
|
31
|
+
- Initial commit [`3ae784c`](https://github.com/ljharb/side-channel-list.git
|
|
32
|
+
/commit/3ae784c63a47895fbaeed2a91ab54a8029a7a100)
|
|
33
|
+
- npm init [`07055a4`](https://github.com/ljharb/side-channel-list.git
|
|
34
|
+
/commit/07055a4d139895565b199dba5fe2479c1a1b9e28)
|
|
35
|
+
- Only apps should have lockfiles [`9573058`](https://github.com/ljharb/side-channel-list.git
|
|
36
|
+
/commit/9573058a47494e2d68f8c6c77b5d7fbe441949c1)
|
|
@@ -84,9 +84,8 @@ module.exports = function getSideChannelList() {
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
'delete': function (key) {
|
|
87
|
-
var root = $o && $o.next;
|
|
88
87
|
var deletedNode = listDelete($o, key);
|
|
89
|
-
if (deletedNode &&
|
|
88
|
+
if (deletedNode && $o && !$o.next) {
|
|
90
89
|
$o = void undefined;
|
|
91
90
|
}
|
|
92
91
|
return !!deletedNode;
|
|
@@ -108,6 +107,5 @@ module.exports = function getSideChannelList() {
|
|
|
108
107
|
listSet(/** @type {NonNullable<typeof $o>} */ ($o), key, value);
|
|
109
108
|
}
|
|
110
109
|
};
|
|
111
|
-
// @ts-expect-error TODO: figure out why this is erroring
|
|
112
110
|
return channel;
|
|
113
111
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "side-channel-list",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Store information about any JS value in a side channel, using a linked list",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
"homepage": "https://github.com/ljharb/side-channel-list#readme",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"es-errors": "^1.3.0",
|
|
41
|
-
"object-inspect": "^1.13.
|
|
41
|
+
"object-inspect": "^1.13.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@arethetypeswrong/cli": "^0.
|
|
45
|
-
"@ljharb/eslint-config": "^
|
|
46
|
-
"@ljharb/tsconfig": "^0.
|
|
44
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
45
|
+
"@ljharb/eslint-config": "^22.2.2",
|
|
46
|
+
"@ljharb/tsconfig": "^0.3.2",
|
|
47
47
|
"@types/object-inspect": "^1.13.0",
|
|
48
|
-
"@types/tape": "^5.
|
|
48
|
+
"@types/tape": "^5.8.1",
|
|
49
49
|
"auto-changelog": "^2.5.0",
|
|
50
50
|
"eclint": "^2.8.1",
|
|
51
51
|
"encoding": "^0.1.13",
|
|
52
|
-
"eslint": "
|
|
52
|
+
"eslint": "^8.57.1",
|
|
53
53
|
"evalmd": "^0.0.19",
|
|
54
54
|
"in-publish": "^2.0.1",
|
|
55
|
-
"npmignore": "^0.3.
|
|
55
|
+
"npmignore": "^0.3.5",
|
|
56
56
|
"nyc": "^10.3.2",
|
|
57
57
|
"safe-publish-latest": "^2.0.0",
|
|
58
58
|
"tape": "^5.9.0",
|
|
@@ -100,5 +100,55 @@ test('getSideChannelList', function (t) {
|
|
|
100
100
|
st.end();
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
+
t.test('delete: first node in a multi-node list', function (st) {
|
|
104
|
+
var channel = getSideChannelList();
|
|
105
|
+
|
|
106
|
+
channel.set('a', 1);
|
|
107
|
+
channel.set('b', 2);
|
|
108
|
+
|
|
109
|
+
st.equal(channel['delete']('b'), true, 'deleting first data node yields true');
|
|
110
|
+
|
|
111
|
+
st.equal(channel.has('a'), true, 'second node is still present after deleting first');
|
|
112
|
+
st.equal(channel.get('a'), 1, 'second node value is intact after deleting first');
|
|
113
|
+
st.equal(channel.has('b'), false, 'deleted node is gone');
|
|
114
|
+
|
|
115
|
+
st.end();
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
t.test('delete: last remaining node empties the list', function (st) {
|
|
119
|
+
var channel = getSideChannelList();
|
|
120
|
+
|
|
121
|
+
channel.set('a', 1);
|
|
122
|
+
channel.set('b', 2);
|
|
123
|
+
|
|
124
|
+
st.equal(channel['delete']('b'), true, 'delete first node');
|
|
125
|
+
st.equal(channel['delete']('a'), true, 'delete second (last) node');
|
|
126
|
+
|
|
127
|
+
st.equal(channel.has('a'), false, 'a is gone');
|
|
128
|
+
st.equal(channel.has('b'), false, 'b is gone');
|
|
129
|
+
st.equal(channel.get('a'), undefined, 'get a yields undefined');
|
|
130
|
+
|
|
131
|
+
channel.set('c', 3);
|
|
132
|
+
st.equal(channel.get('c'), 3, 'can set new values after emptying');
|
|
133
|
+
|
|
134
|
+
st.end();
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
t.test('delete: middle node in a multi-node list', function (st) {
|
|
138
|
+
var channel = getSideChannelList();
|
|
139
|
+
|
|
140
|
+
channel.set('a', 1);
|
|
141
|
+
channel.set('b', 2);
|
|
142
|
+
channel.set('c', 3);
|
|
143
|
+
|
|
144
|
+
st.equal(channel['delete']('b'), true, 'deleting middle node yields true');
|
|
145
|
+
|
|
146
|
+
st.equal(channel.get('a'), 1, 'first node still intact');
|
|
147
|
+
st.equal(channel.has('b'), false, 'middle node is gone');
|
|
148
|
+
st.equal(channel.get('c'), 3, 'last node still intact');
|
|
149
|
+
|
|
150
|
+
st.end();
|
|
151
|
+
});
|
|
152
|
+
|
|
103
153
|
t.end();
|
|
104
154
|
});
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-web-worldmap",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@turf/bezier-spline": "
|
|
6
|
+
"@turf/bezier-spline": "7.3.5",
|
|
7
7
|
"cgi": "0.3.1",
|
|
8
|
-
"compression": "
|
|
9
|
-
"express": "
|
|
10
|
-
"sockjs": "
|
|
8
|
+
"compression": "1.8.1",
|
|
9
|
+
"express": "4.22.1",
|
|
10
|
+
"sockjs": "0.3.24"
|
|
11
11
|
},
|
|
12
12
|
"overrides": {
|
|
13
13
|
"express": {
|
|
14
14
|
"body-parser": {
|
|
15
|
-
"qs": "
|
|
15
|
+
"qs": "6.14.2"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
},
|
package/worldmap/index.html
CHANGED
|
@@ -36,11 +36,9 @@
|
|
|
36
36
|
<link rel="stylesheet" type="text/css" href="leaflet/leaflet-ruler.css">
|
|
37
37
|
<link rel="stylesheet" type="text/css" href="leaflet/easy-button.css">
|
|
38
38
|
<link rel="stylesheet" type="text/css" href="leaflet/leaflet.fullscreen.css">
|
|
39
|
-
<link rel="stylesheet" type="text/css" href="leaflet/Leaflet.Dialog.css">
|
|
40
39
|
<link rel="stylesheet" type="text/css" href="leaflet/Control.MiniMap.min.css">
|
|
41
40
|
<link rel="stylesheet" type="text/css" href="leaflet/leaflet-velocity.min.css">
|
|
42
41
|
<link rel="stylesheet" type="text/css" href="leaflet/leaflet.mousecoordinate.css">
|
|
43
|
-
<!-- <link rel="stylesheet" type="text/css" href="leaflet/dialog-polyfill.css"/> -->
|
|
44
42
|
<link rel="stylesheet" type="text/css" href="css/worldmap.css"/>
|
|
45
43
|
|
|
46
44
|
<script src="leaflet/sockjs.min.js"></script>
|
|
@@ -55,7 +53,6 @@
|
|
|
55
53
|
<script src="leaflet/leaflet-ruler.js"></script>
|
|
56
54
|
<script src="leaflet/easy-button.js"></script>
|
|
57
55
|
<script src="leaflet/Leaflet.fullscreen.min.js"></script>
|
|
58
|
-
<script src="leaflet/Leaflet.Dialog.js"></script>
|
|
59
56
|
<script src="leaflet/l.ellipse.min.js"></script>
|
|
60
57
|
<script src="leaflet/milsymbol.js"></script>
|
|
61
58
|
<script src="leaflet/nvg.js" async></script>
|
|
@@ -84,7 +81,6 @@
|
|
|
84
81
|
<script src="leaflet/leaflet.antimeridian-src.js"></script>
|
|
85
82
|
<script src="leaflet/L.TileLayer.PixelFilter.js"></script>
|
|
86
83
|
<script src="leaflet/jszip.min.js"></script>
|
|
87
|
-
<!-- <script src="leaflet/dialog-polyfill.js"></script> -->
|
|
88
84
|
<script src="images/emoji.js"></script>
|
|
89
85
|
</head>
|
|
90
86
|
|
|
@@ -98,7 +94,8 @@
|
|
|
98
94
|
<span id="bars" onclick='toggleMenu()'><i class="fa fa-bars fa-2x fa-inverse"></i></span>
|
|
99
95
|
</div>
|
|
100
96
|
<div id="menu"></div>
|
|
101
|
-
<div id="map"></div>
|
|
97
|
+
<div id="map"><dialog id="helpDialog"></dialog></div>
|
|
98
|
+
|
|
102
99
|
<div id="footer"></div>
|
|
103
100
|
|
|
104
101
|
<script src="worldmap.js"></script>
|