@signalk/freeboard-sk 2.19.8 → 2.20.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalk/freeboard-sk",
3
- "version": "2.19.8",
3
+ "version": "2.20.0",
4
4
  "description": "Openlayers chart plotter implementation for Signal K",
5
5
  "keywords": [
6
6
  "signalk-webapp",
@@ -40,7 +40,7 @@
40
40
  ],
41
41
  "license": "Apache-v2",
42
42
  "dependencies": {
43
- "@signalk/server-api": "^2.9.0",
43
+ "@signalk/server-api": "^2.22.0",
44
44
  "geolib": "^3.3.3",
45
45
  "google-protobuf": "^4.0.1",
46
46
  "tslib": "^2.0.0",
@@ -64,22 +64,17 @@
64
64
  "@types/arcgis-rest-api": "^10.4.5",
65
65
  "@types/express": "^4.17.17",
66
66
  "@types/geojson": "^7946.0.10",
67
- "@types/jasmine": "~5.1.0",
68
67
  "@types/node": "^24.10.1",
69
68
  "@types/topojson-specification": "^1.0.2",
70
69
  "@types/xml2js": "^0.4.14",
71
70
  "@typescript-eslint/eslint-plugin": "^8.46.3",
72
71
  "@typescript-eslint/parser": "^8.46.3",
72
+ "@vitest/web-worker": "^4.0.18",
73
73
  "baseline-browser-mapping": "^2.9.18",
74
74
  "buffer": "^6.0.3",
75
75
  "eslint": "^9.17.0",
76
76
  "events": "^3.3.0",
77
- "jasmine-core": "~5.5.0",
78
- "karma": "~6.4.0",
79
- "karma-chrome-launcher": "~3.1.0",
80
- "karma-coverage": "~2.2.0",
81
- "karma-jasmine": "~5.1.0",
82
- "karma-jasmine-html-reporter": "~2.1.0",
77
+ "jsdom": "^28.1.0",
83
78
  "ng-packagr": "^21.0.0",
84
79
  "ngeohash": "^0.6.3",
85
80
  "ol": "^10.7.0",
@@ -88,7 +83,7 @@
88
83
  "prettier": "^3.6.2",
89
84
  "prettier-plugin-organize-attributes": "^1.0.0",
90
85
  "proj4": "2.6.2",
91
- "rxjs": "~6.6.3",
86
+ "rxjs": "~7.8.2",
92
87
  "semver": "^7.6.0",
93
88
  "signalk-client-angular": "^2.0.3",
94
89
  "simplify-ts": "^1.0.2",
@@ -97,6 +92,7 @@
97
92
  "timers": "^0.1.1",
98
93
  "ts-node": "~7.0.0",
99
94
  "typescript": "~5.9.3",
95
+ "vitest": "^4.0.18",
100
96
  "xml2js": "^0.6.2",
101
97
  "zone.js": "~0.15.0"
102
98
  }
@@ -63,14 +63,14 @@ class AreaAlarmManager {
63
63
  */
64
64
  silence(id) {
65
65
  // clean up notification
66
- const n = server.getSelfPath(`notifications.area.${id}`);
67
- if (n.value && Array.isArray(n.value.method)) {
66
+ const n = getSelfPathValue(`notifications.area.${id}`);
67
+ if (n?.value && Array.isArray(n.value.method)) {
68
68
  const m = n.value.method.filter((i) => i !== 'sound');
69
69
  n.value.method = m;
70
70
  }
71
71
  emitNotification({
72
72
  path: `notifications.area.${id}`,
73
- value: n.value
73
+ value: n?.value
74
74
  });
75
75
  }
76
76
  /**
@@ -140,6 +140,9 @@ let pluginId;
140
140
  let unsubscribes = [];
141
141
  const alarmAreas = new Map();
142
142
  const alarmManager = new AreaAlarmManager();
143
+ const getSelfPathValue = (path) => {
144
+ return server.getSelfPath(path);
145
+ };
143
146
  const initAlarms = (app, id) => {
144
147
  server = app;
145
148
  pluginId = id;
@@ -389,12 +392,13 @@ const initAlarmEndpoints = async () => {
389
392
  return;
390
393
  }
391
394
  try {
392
- const al = server.getSelfPath(`notifications.${req.params.alarmType}.${req.params.id}`);
393
- if (al && al.value) {
395
+ const al = getSelfPathValue(`notifications.${req.params.alarmType}.${req.params.id}`);
396
+ if (al?.value) {
394
397
  server.debug('Alarm value....');
395
- if (al.value.method && al.value.method.includes('sound')) {
398
+ if (al.value.method &&
399
+ al.value.method.includes(server_api_1.ALARM_METHOD.sound)) {
396
400
  server.debug('Alarm has sound... silence!!!');
397
- al.value.method = al.value.method.filter((i) => i !== 'sound');
401
+ al.value.method = al.value.method.filter((i) => i !== server_api_1.ALARM_METHOD.sound);
398
402
  const r = handleAlarm('vessels.self', `notifications.${req.params.alarmType}.${req.params.id}`, al.value);
399
403
  res.status(r.statusCode).json(r);
400
404
  }
@@ -447,11 +451,11 @@ const handleV1PutRequest = (context, path, value, cb) => {
447
451
  cb(handleAlarm(context, path, value));
448
452
  };
449
453
  const buildAlarmData = () => {
450
- const pos = server.getSelfPath('navigation.position');
454
+ const pos = getSelfPathValue('navigation.position');
451
455
  const r = {
452
456
  createdAt: new Date().toISOString()
453
457
  };
454
- if (pos) {
458
+ if (pos?.value) {
455
459
  r.position = pos.value;
456
460
  }
457
461
  return r;
@@ -844,6 +844,22 @@ License: "Apache-2.0"
844
844
  limitations under the License.
845
845
 
846
846
 
847
+ --------------------------------------------------------------------------------
848
+ Package: tslib
849
+ License: "0BSD"
850
+
851
+ Copyright (c) Microsoft Corporation.
852
+
853
+ Permission to use, copy, modify, and/or distribute this software for any
854
+ purpose with or without fee is hereby granted.
855
+
856
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
857
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
858
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
859
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
860
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
861
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
862
+ PERFORMANCE OF THIS SOFTWARE.
847
863
  --------------------------------------------------------------------------------
848
864
  Package: @angular/common
849
865
  License: "MIT"
@@ -1035,38 +1051,6 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1035
1051
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1036
1052
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1037
1053
 
1038
- --------------------------------------------------------------------------------
1039
- Package: pbf
1040
- License: "BSD-3-Clause"
1041
-
1042
- Copyright (c) 2024, Mapbox
1043
- All rights reserved.
1044
-
1045
- Redistribution and use in source and binary forms, with or without
1046
- modification, are permitted provided that the following conditions are met:
1047
-
1048
- * Redistributions of source code must retain the above copyright notice, this
1049
- list of conditions and the following disclaimer.
1050
-
1051
- * Redistributions in binary form must reproduce the above copyright notice,
1052
- this list of conditions and the following disclaimer in the documentation
1053
- and/or other materials provided with the distribution.
1054
-
1055
- * Neither the name of pbf nor the names of its
1056
- contributors may be used to endorse or promote products derived from
1057
- this software without specific prior written permission.
1058
-
1059
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1060
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1061
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1062
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1063
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1064
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1065
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1066
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1067
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1068
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1069
-
1070
1054
  --------------------------------------------------------------------------------
1071
1055
  Package: quickselect
1072
1056
  License: "ISC"
@@ -1191,6 +1175,38 @@ Package: pmtiles
1191
1175
  License: "BSD-3-Clause"
1192
1176
 
1193
1177
 
1178
+ --------------------------------------------------------------------------------
1179
+ Package: pbf
1180
+ License: "BSD-3-Clause"
1181
+
1182
+ Copyright (c) 2024, Mapbox
1183
+ All rights reserved.
1184
+
1185
+ Redistribution and use in source and binary forms, with or without
1186
+ modification, are permitted provided that the following conditions are met:
1187
+
1188
+ * Redistributions of source code must retain the above copyright notice, this
1189
+ list of conditions and the following disclaimer.
1190
+
1191
+ * Redistributions in binary form must reproduce the above copyright notice,
1192
+ this list of conditions and the following disclaimer in the documentation
1193
+ and/or other materials provided with the distribution.
1194
+
1195
+ * Neither the name of pbf nor the names of its
1196
+ contributors may be used to endorse or promote products derived from
1197
+ this software without specific prior written permission.
1198
+
1199
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1200
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1201
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1202
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1203
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1204
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1205
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1206
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1207
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1208
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1209
+
1194
1210
  --------------------------------------------------------------------------------
1195
1211
  Package: @maplibre/maplibre-gl-style-spec
1196
1212
  License: "ISC"
@@ -120,7 +120,7 @@
120
120
  >
121
121
  </div>
122
122
 
123
- <div
123
+ <!--<div
124
124
  class="panel"
125
125
  id="deprecations"
126
126
  style="background-color: rgba(255, 0, 0, 0.4)"
@@ -142,7 +142,7 @@
142
142
  >
143
143
  </li>
144
144
  </ul>
145
- </div>
145
+ </div>-->
146
146
 
147
147
  <div class="panel" id="server">
148
148
  <h3>Signal K Server</h3>
@@ -281,13 +281,42 @@
281
281
  alt=""
282
282
  />.<br />
283
283
  <img src="./img/screen.png" style="height: 400px" alt="" />
284
- <br />
285
- The menu bar along the left of the screen provides access to functions
286
- and menus that allow you control the map display. <br />
287
- The buttons along the right side provide access to quick-actions and
288
- experiments.
289
284
  <br />&nbsp;<br />
285
+ <b>Status Area:</b>
286
+ Provides visual indication of the following conditions.
287
+ <ul>
288
+ <li class="nobullet">
289
+ <i class="material-icons"
290
+ >signal_wifi_statusbar_connected_no_internet_4</i
291
+ >
292
+ <b>No server messages:</b>
293
+ Indicates there may be an issue on the server as messages no have
294
+ been received over the open connection in the last 8-10 seconds.
295
+ </li>
296
+ <li class="nobullet">
297
+ <i class="material-icons">directions_boat</i>
298
+ <b>Vessels hidden:</b>
299
+ Indicates vessels are not being displayed.
300
+ </li>
301
+ <li class="nobullet">
302
+ <i class="material-icons">local_offer</i>
303
+ <b>Notes hidden:</b>
304
+ Indicates notes are not being displayed.
305
+ </li>
306
+ <li class="nobullet">
307
+ <i class="material-icons">compare_arrows</i>
308
+ <b>Course hidden:</b>
309
+ Indicates course information is not being displayed.
310
+ </li>
311
+ <li class="nobullet">
312
+ <i class="material-icons">visibility_off</i>
313
+ <b>Wake lock off:</b>
314
+ Indicates that the device wake lock is off.
315
+ </li>
316
+ </ul>
317
+ <br />
290
318
  <b>Left menu bar:</b>
319
+ Provides access to functions that allow you control the map display.
291
320
  <ul>
292
321
  <li class="nobullet">
293
322
  <i class="material-icons">menu</i>
@@ -377,6 +406,7 @@
377
406
  </ul>
378
407
  <br />
379
408
  <b>Right menu bar:</b>
409
+ Provides access to quick-actions and experiments.
380
410
  <ul>
381
411
  <li class="nobullet">
382
412
  <i class="material-icons">av_timer</i>
@@ -2239,10 +2269,19 @@
2239
2269
  This section provides choices about the units and values used when
2240
2270
  displaying data.<br />
2241
2271
 
2272
+ <b>Use Server Unit Preferences</b>: When checked sets the Distance,
2273
+ Depth, Speed & Temperature units to those selected on the Signal K
2274
+ server.
2275
+ <br />
2242
2276
  <b>Distance Units</b>: <i>Kilometres</i> / <i>Nautical Miles</i>
2243
2277
  <br />
2244
2278
  <b>Depth Units</b>: <i>Metres</i> / <i>Feet</i>
2245
2279
  <br />
2280
+ <b>Speed Units</b>: <i>Knots</i> / <i>m/sec</i> / <i>km/h</i> /
2281
+ <i>mph</i>
2282
+ <br />
2283
+ <b>Temperature Units</b>: <i>Celcius</i> / <i>Fahrenheit</i>
2284
+ <br />
2246
2285
  <b>Prefer True / Magnetic values</b>: <i>True</i> / <i>Magnetic</i
2247
2286
  ><br />
2248
2287
  Instructs Freeboard to use either the True or Magnetic value path for
package/public/index.html CHANGED
@@ -54,5 +54,5 @@
54
54
  </div>
55
55
  </div>
56
56
  </app-root>
57
- <link rel="modulepreload" href="chunk-FDERIQAA.js"><script src="polyfills-5CFQRCPP.js" type="module"></script><script src="main-3CX2DAQ4.js" type="module"></script></body>
57
+ <link rel="modulepreload" href="chunk-FDERIQAA.js"><script src="polyfills-5CFQRCPP.js" type="module"></script><script src="main-6U2EOOC2.js" type="module"></script></body>
58
58
  </html>