@mxtommy/kip 3.10.0 → 3.10.3
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 +3 -0
- package/README.md +39 -59
- package/dist/out-tsc/kip-plugin/src/index.js +223 -0
- package/dist/out-tsc/kip-plugin/src/index.js.map +1 -0
- package/dist/out-tsc/kip-plugin/src/openApi.json +367 -0
- package/dist/out-tsc/package.json +118 -0
- package/dist/out-tsc/schematics/widget/index.js +70 -0
- package/dist/out-tsc/schematics/widget/index.js.map +1 -0
- package/dist/out-tsc/src/app/app.component.js +286 -0
- package/dist/out-tsc/src/app/app.component.js.map +1 -0
- package/dist/out-tsc/src/app/app.component.spec.js +26 -0
- package/dist/out-tsc/src/app/app.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/app.routes.js +35 -0
- package/dist/out-tsc/src/app/app.routes.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/app-help/app-help.component.js +60 -0
- package/dist/out-tsc/src/app/core/components/app-help/app-help.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/app-help/app-help.component.spec.js +150 -0
- package/dist/out-tsc/src/app/core/components/app-help/app-help.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dashboard/dashboard.component.js +361 -0
- package/dist/out-tsc/src/app/core/components/dashboard/dashboard.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dashboard/dashboard.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/dashboard/dashboard.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dashboard-scroller/dashboard-scroller.component.js +33 -0
- package/dist/out-tsc/src/app/core/components/dashboard-scroller/dashboard-scroller.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dashboard-scroller/dashboard-scroller.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/dashboard-scroller/dashboard-scroller.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dashboards-editor/dashboards-editor.component.js +183 -0
- package/dist/out-tsc/src/app/core/components/dashboards-editor/dashboards-editor.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dashboards-editor/dashboards-editor.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/dashboards-editor/dashboards-editor.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dashboards-manage-bottom-sheet/dashboards-manage-bottom-sheet.component.js +28 -0
- package/dist/out-tsc/src/app/core/components/dashboards-manage-bottom-sheet/dashboards-manage-bottom-sheet.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dashboards-manage-bottom-sheet/dashboards-manage-bottom-sheet.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/dashboards-manage-bottom-sheet/dashboards-manage-bottom-sheet.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/data-inspector/data-inspector.component.js +130 -0
- package/dist/out-tsc/src/app/core/components/data-inspector/data-inspector.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/data-inspector/data-inspector.component.spec.js +21 -0
- package/dist/out-tsc/src/app/core/components/data-inspector/data-inspector.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/data-inspector-row/data-inspector-row.component.js +82 -0
- package/dist/out-tsc/src/app/core/components/data-inspector-row/data-inspector-row.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/datasets/datasets.component.js +168 -0
- package/dist/out-tsc/src/app/core/components/datasets/datasets.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/datasets/datasets.component.spec.js +21 -0
- package/dist/out-tsc/src/app/core/components/datasets/datasets.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dialog-confirmation/dialog-confirmation.component.js +24 -0
- package/dist/out-tsc/src/app/core/components/dialog-confirmation/dialog-confirmation.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dialog-confirmation/dialog-confirmation.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/dialog-confirmation/dialog-confirmation.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dialog-dashboard-page-editor/dialog-dashboard-page-editor.component.js +45 -0
- package/dist/out-tsc/src/app/core/components/dialog-dashboard-page-editor/dialog-dashboard-page-editor.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dialog-dashboard-page-editor/dialog-dashboard-page-editor.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/dialog-dashboard-page-editor/dialog-dashboard-page-editor.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dialog-frame/dialog-frame.component.js +25 -0
- package/dist/out-tsc/src/app/core/components/dialog-frame/dialog-frame.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dialog-frame/dialog-frame.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/dialog-frame/dialog-frame.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dialog-name/dialog-name.component.js +31 -0
- package/dist/out-tsc/src/app/core/components/dialog-name/dialog-name.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/dialog-name/dialog-name.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/dialog-name/dialog-name.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/menu-actions/menu-actions.component.js +100 -0
- package/dist/out-tsc/src/app/core/components/menu-actions/menu-actions.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/menu-actions/menu-actions.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/menu-actions/menu-actions.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/menu-notifications/menu-notifications.component.js +60 -0
- package/dist/out-tsc/src/app/core/components/menu-notifications/menu-notifications.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/menu-notifications/menu-notifications.component.spec.js +21 -0
- package/dist/out-tsc/src/app/core/components/menu-notifications/menu-notifications.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/modal-user-credential/modal-user-credential.component.js +32 -0
- package/dist/out-tsc/src/app/core/components/modal-user-credential/modal-user-credential.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/modal-user-credential/modal-user-credential.component.spec.js +21 -0
- package/dist/out-tsc/src/app/core/components/modal-user-credential/modal-user-credential.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/notification-badge/notification-badge.component.js +51 -0
- package/dist/out-tsc/src/app/core/components/notification-badge/notification-badge.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/notification-badge/notification-badge.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/notification-badge/notification-badge.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/configuration/config.component.js +228 -0
- package/dist/out-tsc/src/app/core/components/options/configuration/config.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/configuration/config.component.spec.js +21 -0
- package/dist/out-tsc/src/app/core/components/options/configuration/config.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/display/display.component.js +142 -0
- package/dist/out-tsc/src/app/core/components/options/display/display.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/display/display.component.spec.js +21 -0
- package/dist/out-tsc/src/app/core/components/options/display/display.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/notifications/notifications.component.js +66 -0
- package/dist/out-tsc/src/app/core/components/options/notifications/notifications.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/notifications/notifications.component.spec.js +21 -0
- package/dist/out-tsc/src/app/core/components/options/notifications/notifications.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/signalk/signalk.component.js +255 -0
- package/dist/out-tsc/src/app/core/components/options/signalk/signalk.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/signalk/signalk.component.spec.js +21 -0
- package/dist/out-tsc/src/app/core/components/options/signalk/signalk.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/tabs/tabs.component.js +44 -0
- package/dist/out-tsc/src/app/core/components/options/tabs/tabs.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/tabs/tabs.component.spec.js +21 -0
- package/dist/out-tsc/src/app/core/components/options/tabs/tabs.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/units/units.component.js +55 -0
- package/dist/out-tsc/src/app/core/components/options/units/units.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/options/units/units.component.spec.js +21 -0
- package/dist/out-tsc/src/app/core/components/options/units/units.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/page-header/page-header.component.js +31 -0
- package/dist/out-tsc/src/app/core/components/page-header/page-header.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/page-header/page-header.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/page-header/page-header.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/remote-control/remote-control.component.js +63 -0
- package/dist/out-tsc/src/app/core/components/remote-control/remote-control.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/remote-control/remote-control.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/remote-control/remote-control.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/select-icon/select-icon.component.js +75 -0
- package/dist/out-tsc/src/app/core/components/select-icon/select-icon.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/select-icon/select-icon.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/select-icon/select-icon.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/settings/settings.component.js +56 -0
- package/dist/out-tsc/src/app/core/components/settings/settings.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/settings/settings.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/settings/settings.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/tile-large-icon/tile-large-icon.component.js +28 -0
- package/dist/out-tsc/src/app/core/components/tile-large-icon/tile-large-icon.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/tile-large-icon/tile-large-icon.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/tile-large-icon/tile-large-icon.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/upgrade-config/upgrade-config.component.js +336 -0
- package/dist/out-tsc/src/app/core/components/upgrade-config/upgrade-config.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/upgrade-config/upgrade-config.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/upgrade-config/upgrade-config.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/upgrade-config/v10-config-interface.js +2 -0
- package/dist/out-tsc/src/app/core/components/upgrade-config/v10-config-interface.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/widget-host/widget-host.component.js +77 -0
- package/dist/out-tsc/src/app/core/components/widget-host/widget-host.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/widget-host/widget-host.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/widget-host/widget-host.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/widget-host-bottom-sheet/widget-host-bottom-sheet.component.js +29 -0
- package/dist/out-tsc/src/app/core/components/widget-host-bottom-sheet/widget-host-bottom-sheet.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/widget-host-bottom-sheet/widget-host-bottom-sheet.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/widget-host-bottom-sheet/widget-host-bottom-sheet.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/widget-list-card/widget-list-card.component.js +34 -0
- package/dist/out-tsc/src/app/core/components/widget-list-card/widget-list-card.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/widget-list-card/widget-list-card.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/widget-list-card/widget-list-card.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/widget-title/widget-title.component.js +70 -0
- package/dist/out-tsc/src/app/core/components/widget-title/widget-title.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/widget-title/widget-title.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/widget-title/widget-title.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/widgets-list/widgets-list.component.js +61 -0
- package/dist/out-tsc/src/app/core/components/widgets-list/widgets-list.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/components/widgets-list/widgets-list.component.spec.js +19 -0
- package/dist/out-tsc/src/app/core/components/widgets-list/widgets-list.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/directives/gesture.directive.js +457 -0
- package/dist/out-tsc/src/app/core/directives/gesture.directive.js.map +1 -0
- package/dist/out-tsc/src/app/core/interceptors/authentication-interceptor.js +43 -0
- package/dist/out-tsc/src/app/core/interceptors/authentication-interceptor.js.map +1 -0
- package/dist/out-tsc/src/app/core/interceptors/authentication-interceptor.spec.js +7 -0
- package/dist/out-tsc/src/app/core/interceptors/authentication-interceptor.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/interfaces/app-interfaces.js +8 -0
- package/dist/out-tsc/src/app/core/interfaces/app-interfaces.js.map +1 -0
- package/dist/out-tsc/src/app/core/interfaces/app-settings.interfaces.js +2 -0
- package/dist/out-tsc/src/app/core/interfaces/app-settings.interfaces.js.map +1 -0
- package/dist/out-tsc/src/app/core/interfaces/dialog-data.js +2 -0
- package/dist/out-tsc/src/app/core/interfaces/dialog-data.js.map +1 -0
- package/dist/out-tsc/src/app/core/interfaces/signalk-autopilot-interfaces.js +11 -0
- package/dist/out-tsc/src/app/core/interfaces/signalk-autopilot-interfaces.js.map +1 -0
- package/dist/out-tsc/src/app/core/interfaces/signalk-interfaces.js +45 -0
- package/dist/out-tsc/src/app/core/interfaces/signalk-interfaces.js.map +1 -0
- package/dist/out-tsc/src/app/core/interfaces/widgets-interface.js +7 -0
- package/dist/out-tsc/src/app/core/interfaces/widgets-interface.js.map +1 -0
- package/dist/out-tsc/src/app/core/pipes/filter-self.pipe.js +24 -0
- package/dist/out-tsc/src/app/core/pipes/filter-self.pipe.js.map +1 -0
- package/dist/out-tsc/src/app/core/pipes/filter-self.pipe.spec.js +8 -0
- package/dist/out-tsc/src/app/core/pipes/filter-self.pipe.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/pipes/object-keys.pipe.js +20 -0
- package/dist/out-tsc/src/app/core/pipes/object-keys.pipe.js.map +1 -0
- package/dist/out-tsc/src/app/core/pipes/object-keys.pipe.spec.js +8 -0
- package/dist/out-tsc/src/app/core/pipes/object-keys.pipe.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/pipes/safe.pipe.js +22 -0
- package/dist/out-tsc/src/app/core/pipes/safe.pipe.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/app-initNetwork.service.js +199 -0
- package/dist/out-tsc/src/app/core/services/app-initNetwork.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/app-initNetwork.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/app-initNetwork.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/app-service.js +249 -0
- package/dist/out-tsc/src/app/core/services/app-service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/app-service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/app-service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/app-settings.service.js +566 -0
- package/dist/out-tsc/src/app/core/services/app-settings.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/app-settings.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/app-settings.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/authentication.service.js +308 -0
- package/dist/out-tsc/src/app/core/services/authentication.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/authentication.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/authentication.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/canvas.service.js +566 -0
- package/dist/out-tsc/src/app/core/services/canvas.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/canvas.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/canvas.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/connection-state-machine.service.js +325 -0
- package/dist/out-tsc/src/app/core/services/connection-state-machine.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/dashboard.service.js +273 -0
- package/dist/out-tsc/src/app/core/services/dashboard.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/dashboard.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/dashboard.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/data-set.service.js +515 -0
- package/dist/out-tsc/src/app/core/services/data-set.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/data-set.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/data-set.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/data.service.js +425 -0
- package/dist/out-tsc/src/app/core/services/data.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/data.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/data.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/dialog.service.js +73 -0
- package/dist/out-tsc/src/app/core/services/dialog.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/dialog.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/dialog.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/notification-overlay.service.js +106 -0
- package/dist/out-tsc/src/app/core/services/notification-overlay.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/notifications.service.js +322 -0
- package/dist/out-tsc/src/app/core/services/notifications.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/notifications.service.spec.js +10 -0
- package/dist/out-tsc/src/app/core/services/notifications.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/remote-dashboards.service.js +125 -0
- package/dist/out-tsc/src/app/core/services/remote-dashboards.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/remote-dashboards.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/remote-dashboards.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/signalk-connection.service.js +283 -0
- package/dist/out-tsc/src/app/core/services/signalk-connection.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/signalk-delta.service.js +486 -0
- package/dist/out-tsc/src/app/core/services/signalk-delta.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/signalk-delta.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/signalk-delta.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/signalk-plugins.service.js +121 -0
- package/dist/out-tsc/src/app/core/services/signalk-plugins.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/signalk-plugins.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/signalk-plugins.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/signalk-requests.service.js +232 -0
- package/dist/out-tsc/src/app/core/services/signalk-requests.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/signalk-requests.service.spec.js +10 -0
- package/dist/out-tsc/src/app/core/services/signalk-requests.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/storage.service.js +390 -0
- package/dist/out-tsc/src/app/core/services/storage.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/storage.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/storage.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/timers.service.js +107 -0
- package/dist/out-tsc/src/app/core/services/timers.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/timers.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/timers.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/uiEvent.service.js +256 -0
- package/dist/out-tsc/src/app/core/services/uiEvent.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/uiEvent.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/uiEvent.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/units.service.js +630 -0
- package/dist/out-tsc/src/app/core/services/units.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/widget.service.js +405 -0
- package/dist/out-tsc/src/app/core/services/widget.service.js.map +1 -0
- package/dist/out-tsc/src/app/core/services/widget.service.spec.js +13 -0
- package/dist/out-tsc/src/app/core/services/widget.service.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/utils/app-overlay-container.js +30 -0
- package/dist/out-tsc/src/app/core/utils/app-overlay-container.js.map +1 -0
- package/dist/out-tsc/src/app/core/utils/base-widget.component.js +291 -0
- package/dist/out-tsc/src/app/core/utils/base-widget.component.js.map +1 -0
- package/dist/out-tsc/src/app/core/utils/base-widget.component.spec.js +88 -0
- package/dist/out-tsc/src/app/core/utils/base-widget.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/core/utils/dataScales.util.js +127 -0
- package/dist/out-tsc/src/app/core/utils/dataScales.util.js.map +1 -0
- package/dist/out-tsc/src/app/core/utils/dataTransforms.util.js +138 -0
- package/dist/out-tsc/src/app/core/utils/dataTransforms.util.js.map +1 -0
- package/dist/out-tsc/src/app/core/utils/iframe-inputs-inject.utils.js +55 -0
- package/dist/out-tsc/src/app/core/utils/iframe-inputs-inject.utils.js.map +1 -0
- package/dist/out-tsc/src/app/core/utils/svg-animate.util.js +303 -0
- package/dist/out-tsc/src/app/core/utils/svg-animate.util.js.map +1 -0
- package/dist/out-tsc/src/app/core/utils/themeColors.utils.js +34 -0
- package/dist/out-tsc/src/app/core/utils/themeColors.utils.js.map +1 -0
- package/dist/out-tsc/src/app/core/utils/uuid.util.js +17 -0
- package/dist/out-tsc/src/app/core/utils/uuid.util.js.map +1 -0
- package/dist/out-tsc/src/app/core/utils/zones-highlight.utils.js +87 -0
- package/dist/out-tsc/src/app/core/utils/zones-highlight.utils.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/boolean-control-config/boolean-control-config.component.js +49 -0
- package/dist/out-tsc/src/app/widget-config/boolean-control-config/boolean-control-config.component.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/boolean-control-config/boolean-control-config.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widget-config/boolean-control-config/boolean-control-config.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/boolean-multicontrol-options/boolean-multicontrol-options.component.js +100 -0
- package/dist/out-tsc/src/app/widget-config/boolean-multicontrol-options/boolean-multicontrol-options.component.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/boolean-multicontrol-options/boolean-multicontrol-options.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widget-config/boolean-multicontrol-options/boolean-multicontrol-options.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/dataset-chart-options/dataset-chart-options.component.js +54 -0
- package/dist/out-tsc/src/app/widget-config/dataset-chart-options/dataset-chart-options.component.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/dataset-chart-options/dataset-chart-options.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widget-config/dataset-chart-options/dataset-chart-options.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/display-chart-options/display-chart-options.component.js +89 -0
- package/dist/out-tsc/src/app/widget-config/display-chart-options/display-chart-options.component.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/display-chart-options/display-chart-options.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widget-config/display-chart-options/display-chart-options.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/display-datetime/display-datetime.component.js +1760 -0
- package/dist/out-tsc/src/app/widget-config/display-datetime/display-datetime.component.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/display-datetime/display-datetime.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widget-config/display-datetime/display-datetime.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/modal-widget-config/modal-widget-config.component.js +327 -0
- package/dist/out-tsc/src/app/widget-config/modal-widget-config/modal-widget-config.component.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/modal-widget-config/modal-widget-config.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widget-config/modal-widget-config/modal-widget-config.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/path-control-config/path-control-config.component.js +268 -0
- package/dist/out-tsc/src/app/widget-config/path-control-config/path-control-config.component.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/path-control-config/path-control-config.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widget-config/path-control-config/path-control-config.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/paths-options/paths-options.component.js +81 -0
- package/dist/out-tsc/src/app/widget-config/paths-options/paths-options.component.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/paths-options/paths-options.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widget-config/paths-options/paths-options.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/select-autopilot/select-autopilot.component.js +266 -0
- package/dist/out-tsc/src/app/widget-config/select-autopilot/select-autopilot.component.js.map +1 -0
- package/dist/out-tsc/src/app/widget-config/select-autopilot/select-autopilot.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widget-config/select-autopilot/select-autopilot.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/gauge-steel/gauge-steel.component.js +309 -0
- package/dist/out-tsc/src/app/widgets/gauge-steel/gauge-steel.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/gauge-steel/gauge-steel.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/gauge-steel/gauge-steel.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/minichart/minichart.component.js +512 -0
- package/dist/out-tsc/src/app/widgets/minichart/minichart.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/minichart/minichart.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/minichart/minichart.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-autopilot/svg-autopilot.component.js +227 -0
- package/dist/out-tsc/src/app/widgets/svg-autopilot/svg-autopilot.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-autopilot/svg-autopilot.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/svg-autopilot/svg-autopilot.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-button/svg-boolean-button.component.js +163 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-button/svg-boolean-button.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-button/svg-boolean-button.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-button/svg-boolean-button.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-light/svg-boolean-light.component.js +97 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-light/svg-boolean-light.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-light/svg-boolean-light.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-light/svg-boolean-light.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-switch/svg-boolean-switch.component.js +122 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-switch/svg-boolean-switch.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-switch/svg-boolean-switch.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/svg-boolean-switch/svg-boolean-switch.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-racesteer/svg-racesteer.component.js +389 -0
- package/dist/out-tsc/src/app/widgets/svg-racesteer/svg-racesteer.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-racesteer/svg-racesteer.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/svg-racesteer/svg-racesteer.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-simple-linear-gauge/svg-simple-linear-gauge.component.js +76 -0
- package/dist/out-tsc/src/app/widgets/svg-simple-linear-gauge/svg-simple-linear-gauge.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-simple-linear-gauge/svg-simple-linear-gauge.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/svg-simple-linear-gauge/svg-simple-linear-gauge.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-windsteer/svg-windsteer.component.js +429 -0
- package/dist/out-tsc/src/app/widgets/svg-windsteer/svg-windsteer.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/svg-windsteer/svg-windsteer.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/svg-windsteer/svg-windsteer.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-autopilot/widget-autopilot.component.js +1128 -0
- package/dist/out-tsc/src/app/widgets/widget-autopilot/widget-autopilot.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-autopilot/widget-autopilot.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-autopilot/widget-autopilot.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-boolean-switch/widget-boolean-switch.component.js +140 -0
- package/dist/out-tsc/src/app/widgets/widget-boolean-switch/widget-boolean-switch.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-boolean-switch/widget-boolean-switch.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/widget-boolean-switch/widget-boolean-switch.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-data-chart/widget-data-chart.component.js +678 -0
- package/dist/out-tsc/src/app/widgets/widget-data-chart/widget-data-chart.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-data-chart/widget-data-chart.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/widget-data-chart/widget-data-chart.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-datetime/widget-datetime.component.js +177 -0
- package/dist/out-tsc/src/app/widgets/widget-datetime/widget-datetime.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-datetime/widget-datetime.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-datetime/widget-datetime.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-freeboardsk/widget-freeboardsk.component.js +146 -0
- package/dist/out-tsc/src/app/widgets/widget-freeboardsk/widget-freeboardsk.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-freeboardsk/widget-freeboardsk.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/widget-freeboardsk/widget-freeboardsk.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-compass/widget-gauge-ng-compass.component.js +301 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-compass/widget-gauge-ng-compass.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-compass/widget-gauge-ng-compass.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-compass/widget-gauge-ng-compass.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-linear/widget-gauge-ng-linear.component.js +413 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-linear/widget-gauge-ng-linear.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-linear/widget-gauge-ng-linear.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-linear/widget-gauge-ng-linear.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.js +360 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-steel/widget-gauge-steel.component.js +119 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-steel/widget-gauge-steel.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-steel/widget-gauge-steel.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-gauge-steel/widget-gauge-steel.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-heel-gauge/widget-heel-gauge.component.js +205 -0
- package/dist/out-tsc/src/app/widgets/widget-heel-gauge/widget-heel-gauge.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-heel-gauge/widget-heel-gauge.component.spec.js +15 -0
- package/dist/out-tsc/src/app/widgets/widget-heel-gauge/widget-heel-gauge.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-horizon/widget-horizon.component.js +196 -0
- package/dist/out-tsc/src/app/widgets/widget-horizon/widget-horizon.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-horizon/widget-horizon.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-horizon/widget-horizon.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-iframe/widget-iframe.component.js +173 -0
- package/dist/out-tsc/src/app/widgets/widget-iframe/widget-iframe.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-iframe/widget-iframe.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-iframe/widget-iframe.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-label/widget-label.component.js +128 -0
- package/dist/out-tsc/src/app/widgets/widget-label/widget-label.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-label/widget-label.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/widget-label/widget-label.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-login/login.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-login/login.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-login/widget-login.component.js +78 -0
- package/dist/out-tsc/src/app/widgets/widget-login/widget-login.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-numeric/widget-numeric.component.js +303 -0
- package/dist/out-tsc/src/app/widgets/widget-numeric/widget-numeric.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-numeric/widget-numeric.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-numeric/widget-numeric.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-position/widget-position.component.js +177 -0
- package/dist/out-tsc/src/app/widgets/widget-position/widget-position.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-position/widget-position.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-position/widget-position.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-race-timer/widget-race-timer.component.js +275 -0
- package/dist/out-tsc/src/app/widgets/widget-race-timer/widget-race-timer.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-race-timer/widget-race-timer.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-race-timer/widget-race-timer.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-racer-line/widget-racer-line.component.js +319 -0
- package/dist/out-tsc/src/app/widgets/widget-racer-line/widget-racer-line.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-racer-line/widget-racer-line.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-racer-line/widget-racer-line.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-racer-timer/widget-racer-timer.component.js +365 -0
- package/dist/out-tsc/src/app/widgets/widget-racer-timer/widget-racer-timer.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-racer-timer/widget-racer-timer.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-racer-timer/widget-racer-timer.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-racesteer/widget-racesteer.component.js +321 -0
- package/dist/out-tsc/src/app/widgets/widget-racesteer/widget-racesteer.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-racesteer/widget-racesteer.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-racesteer/widget-racesteer.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-simple-linear/widget-simple-linear.component.js +189 -0
- package/dist/out-tsc/src/app/widgets/widget-simple-linear/widget-simple-linear.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-simple-linear/widget-simple-linear.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-simple-linear/widget-simple-linear.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-slider/widget-slider.component.js +248 -0
- package/dist/out-tsc/src/app/widgets/widget-slider/widget-slider.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-slider/widget-slider.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/widget-slider/widget-slider.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-text/widget-text.component.js +138 -0
- package/dist/out-tsc/src/app/widgets/widget-text/widget-text.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-text/widget-text.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-text/widget-text.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-tutorial/widget-tutorial.component.js +43 -0
- package/dist/out-tsc/src/app/widgets/widget-tutorial/widget-tutorial.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-tutorial/widget-tutorial.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-tutorial/widget-tutorial.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-windsteer/widget-windsteer.component.js +483 -0
- package/dist/out-tsc/src/app/widgets/widget-windsteer/widget-windsteer.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-windsteer/widget-windsteer.component.spec.js +21 -0
- package/dist/out-tsc/src/app/widgets/widget-windsteer/widget-windsteer.component.spec.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-windtrends-chart/widget-windtrends-chart.component.js +1067 -0
- package/dist/out-tsc/src/app/widgets/widget-windtrends-chart/widget-windtrends-chart.component.js.map +1 -0
- package/dist/out-tsc/src/app/widgets/widget-windtrends-chart/widget-windtrends-chart.component.spec.js +19 -0
- package/dist/out-tsc/src/app/widgets/widget-windtrends-chart/widget-windtrends-chart.component.spec.js.map +1 -0
- package/dist/out-tsc/src/default-config/config.blank.const.js +35 -0
- package/dist/out-tsc/src/default-config/config.blank.const.js.map +1 -0
- package/dist/out-tsc/src/default-config/config.blank.notification.const.js +22 -0
- package/dist/out-tsc/src/default-config/config.blank.notification.const.js.map +1 -0
- package/dist/out-tsc/src/default-config/config.blank.units.const.js +24 -0
- package/dist/out-tsc/src/default-config/config.blank.units.const.js.map +1 -0
- package/dist/out-tsc/src/default-config/config.demo.const.js +739 -0
- package/dist/out-tsc/src/default-config/config.demo.const.js.map +1 -0
- package/dist/out-tsc/src/environments/environment.js +8 -0
- package/dist/out-tsc/src/environments/environment.js.map +1 -0
- package/dist/out-tsc/src/environments/environment.prod.js +4 -0
- package/dist/out-tsc/src/environments/environment.prod.js.map +1 -0
- package/dist/out-tsc/src/main.js +111 -0
- package/dist/out-tsc/src/main.js.map +1 -0
- package/dist/out-tsc/src/polyfills.js +67 -0
- package/dist/out-tsc/src/polyfills.js.map +1 -0
- package/dist/out-tsc/src/test-setup.js +1 -0
- package/dist/out-tsc/src/test-setup.js.map +1 -0
- package/dist/out-tsc/src/test-shims/steelseries-shim.js +44 -0
- package/dist/out-tsc/src/test-shims/steelseries-shim.js.map +1 -0
- package/dist/out-tsc/src/test.js +84 -0
- package/dist/out-tsc/src/test.js.map +1 -0
- package/images/ActionSidenav.png +0 -0
- package/images/KipBrightness-1024.png +0 -0
- package/images/KipNightMode-1024.png +0 -0
- package/images/Options.png +0 -0
- package/images/exterior_user_installs.png +0 -0
- package/package.json +1 -1
- package/plugin/index.js +2 -1
- package/public/{chunk-YPVFGYWU.js → chunk-4APSKT6I.js} +1 -1
- package/public/{chunk-CCEKSCJH.js → chunk-HHR4WMHS.js} +1 -1
- package/public/{chunk-TTNX7JB6.js → chunk-JDDRJMPN.js} +1 -1
- package/public/{chunk-TSNRNW3D.js → chunk-MRF22PVK.js} +1 -1
- package/public/{chunk-G5U7W6LL.js → chunk-RNSD64U3.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-JN6ENHFX.js → main-5QLZ4ZUU.js} +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
import { SignalkPluginsService } from './signalk-plugins.service';
|
|
3
|
+
describe('SignalkPluginsService', () => {
|
|
4
|
+
let service;
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
TestBed.configureTestingModule({});
|
|
7
|
+
service = TestBed.inject(SignalkPluginsService);
|
|
8
|
+
});
|
|
9
|
+
it('should be created', () => {
|
|
10
|
+
expect(service).toBeTruthy();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=signalk-plugins.service.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signalk-plugins.service.spec.js","sourceRoot":"","sources":["../../../../../../src/app/core/services/signalk-plugins.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,IAAI,OAA8B,CAAC;IAEnC,UAAU,CAAC,GAAG,EAAE;QACd,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;QACnC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Injectable, inject } from '@angular/core';
|
|
11
|
+
import { Subject } from 'rxjs';
|
|
12
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
|
+
import { AppSettingsService } from './app-settings.service';
|
|
14
|
+
import { SignalKDeltaService } from './signalk-delta.service';
|
|
15
|
+
import { AuthenticationService } from './authentication.service';
|
|
16
|
+
import { UUID } from '../utils/uuid.util';
|
|
17
|
+
import { AppService } from './app-service';
|
|
18
|
+
const deltaStatusCodes = {
|
|
19
|
+
200: "The request was successfully.",
|
|
20
|
+
202: "Request accepted and pending completion.",
|
|
21
|
+
400: "Something is wrong with the client's request.",
|
|
22
|
+
401: "Login failed. Your User ID or Password is incorrect.",
|
|
23
|
+
403: "DENIED: Authorization with R/W or Admin permission level is required to send commands. Configure Sign In credential.",
|
|
24
|
+
405: "The server does not support the request.",
|
|
25
|
+
500: "The request failed.",
|
|
26
|
+
502: "Something went wrong carrying out the request on the server.",
|
|
27
|
+
504: "Timeout on the server side trying to carry out the request."
|
|
28
|
+
};
|
|
29
|
+
let SignalkRequestsService = class SignalkRequestsService {
|
|
30
|
+
signalKDeltaService = inject(SignalKDeltaService);
|
|
31
|
+
appSettingsService = inject(AppSettingsService);
|
|
32
|
+
appService = inject(AppService);
|
|
33
|
+
auth = inject(AuthenticationService);
|
|
34
|
+
requestStatus$ = new Subject(); // public Observable passing message post processing
|
|
35
|
+
requests = []; // Private array of all requests.
|
|
36
|
+
constructor() {
|
|
37
|
+
// Observer to get all signalk-delta messages of type request type.
|
|
38
|
+
this.signalKDeltaService.subscribeRequestUpdates()
|
|
39
|
+
.pipe(takeUntilDestroyed())
|
|
40
|
+
.subscribe(requestMessage => { this.updateRequest(requestMessage); });
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Submit a Signal K server Read/Write Device authorization token request - only required
|
|
44
|
+
* if you need to submit data to Signal K (PUT or storage requests).
|
|
45
|
+
*
|
|
46
|
+
* Once approved, a Devices authorization Token will be saved in the Kip
|
|
47
|
+
* Config and sent with every requests.
|
|
48
|
+
*
|
|
49
|
+
* The Device authorization is a manual process done on the server.
|
|
50
|
+
*/
|
|
51
|
+
requestDeviceAccessToken() {
|
|
52
|
+
const requestId = UUID.create();
|
|
53
|
+
const deviceTokenRequest = {
|
|
54
|
+
requestId: requestId,
|
|
55
|
+
accessRequest: {
|
|
56
|
+
clientId: this.appSettingsService.KipUUID,
|
|
57
|
+
description: "KIP Instrument MDF",
|
|
58
|
+
permissions: "admin"
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
console.log("[Request Service] Requesting Device Authorization Token");
|
|
62
|
+
this.signalKDeltaService.publishDelta(deviceTokenRequest);
|
|
63
|
+
const request = {
|
|
64
|
+
requestId: requestId,
|
|
65
|
+
state: null,
|
|
66
|
+
statusCode: null
|
|
67
|
+
};
|
|
68
|
+
this.requests.push(request);
|
|
69
|
+
return requestId;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Submit a Signal K WebSocket User login request - user needs to exist in Signal K Server.
|
|
73
|
+
* Required to use the Signal K User Storage feature (ie. to store Config by users)
|
|
74
|
+
* and if you need to submit data to Signal K.
|
|
75
|
+
*
|
|
76
|
+
* An alternative to user authentication is to use requestDeviceAccessToken method
|
|
77
|
+
* removing the need for usr/pwd but this will limit Kip's automatic Config sharing feature.
|
|
78
|
+
*
|
|
79
|
+
* Once approved, the user authorization Token will be saved in the Config and sent with every
|
|
80
|
+
* requests.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} userId The Signal K server User ID
|
|
83
|
+
* @param {string} userPassword The Signal K server user Password
|
|
84
|
+
* @return {*} {string} requestId Identifier for this specific request. Enables Request result monitoring.
|
|
85
|
+
* @memberof SignalkRequestsService
|
|
86
|
+
*/
|
|
87
|
+
requestUserLogin(userId, userPassword) {
|
|
88
|
+
const requestId = UUID.create();
|
|
89
|
+
const loginRequest = {
|
|
90
|
+
requestId: requestId,
|
|
91
|
+
login: {
|
|
92
|
+
username: userId,
|
|
93
|
+
password: userPassword
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
console.log("[Request Service] Requesting User Login");
|
|
97
|
+
this.signalKDeltaService.publishDelta(loginRequest);
|
|
98
|
+
const request = {
|
|
99
|
+
requestId: requestId,
|
|
100
|
+
state: null,
|
|
101
|
+
statusCode: null
|
|
102
|
+
};
|
|
103
|
+
this.requests.push(request);
|
|
104
|
+
return requestId;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Sends a async PUT request to the Signal K server and returns a requestId for tracking.
|
|
108
|
+
*
|
|
109
|
+
* @param path - The Signal K full path to write to. Must be a non-empty string. If
|
|
110
|
+
* the path starts with 'self.', it will be removed automatically.
|
|
111
|
+
* @param value - The value to be sent. Can be any type, but must not be undefined.
|
|
112
|
+
* @param widgetUUID - (Optional) The widget's UUID. Used for filtering responses
|
|
113
|
+
* specific to the requesting widget.
|
|
114
|
+
* @returns The Signal K server generated request tracking number
|
|
115
|
+
* for this PUT.
|
|
116
|
+
*
|
|
117
|
+
* Returns null and logs an error if the server did not accept the request or if
|
|
118
|
+
* the path is missing/empty or the value is undefined.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* const reqId = putRequest('navigation.lights', true, 'this.widgetProperties.uuid');
|
|
122
|
+
* if (reqId) { ... }
|
|
123
|
+
*/
|
|
124
|
+
putRequest(path, value, widgetUUID) {
|
|
125
|
+
if (typeof value === 'undefined') {
|
|
126
|
+
console.error("[Request Service] Undefined value for PUT request");
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
if (!path) {
|
|
130
|
+
console.error("[Request Service] Path is required for PUT request");
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
const requestId = UUID.create();
|
|
134
|
+
const noSelfPath = path.replace(/^(self\.)/, ""); //no self in path...
|
|
135
|
+
const selfContext = "vessels.self"; // hard coded context. Could be dynamic at some point
|
|
136
|
+
const message = {
|
|
137
|
+
"context": selfContext,
|
|
138
|
+
"requestId": requestId,
|
|
139
|
+
"put": {
|
|
140
|
+
"path": noSelfPath,
|
|
141
|
+
"value": value,
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
this.signalKDeltaService.publishDelta(message); //send request
|
|
145
|
+
const request = {
|
|
146
|
+
requestId: requestId,
|
|
147
|
+
state: null,
|
|
148
|
+
statusCode: null,
|
|
149
|
+
widgetUUID: widgetUUID,
|
|
150
|
+
};
|
|
151
|
+
this.requests.push(request); // save to private array pending response with widgetUUID so we can filter response from subscriber
|
|
152
|
+
return requestId; // return the ID to the Subscriber, if tracking of individual request is required
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Handles request updates, issue display and logging.
|
|
156
|
+
*
|
|
157
|
+
* @param delta Signal K Delta message
|
|
158
|
+
*/
|
|
159
|
+
updateRequest(delta) {
|
|
160
|
+
const index = this.requests.findIndex(r => r.requestId == delta.requestId);
|
|
161
|
+
if (index > -1) { // exists in local array
|
|
162
|
+
this.requests[index].state = delta.state;
|
|
163
|
+
this.requests[index].statusCode = delta.statusCode;
|
|
164
|
+
this.requests[index].message = delta.message;
|
|
165
|
+
const currentStatusCode = deltaStatusCodes[delta.statusCode];
|
|
166
|
+
if ((typeof currentStatusCode != 'undefined') && (this.requests[index].statusCode == 200 || this.requests[index].statusCode == 202 || this.requests[index].statusCode == 400 || this.requests[index].statusCode == 401 || this.requests[index].statusCode == 403 || this.requests[index].statusCode == 405)) {
|
|
167
|
+
this.requests[index].statusCodeDescription = currentStatusCode;
|
|
168
|
+
if (this.requests[index].statusCode == 202) {
|
|
169
|
+
console.log("[Request Service] Async 202 response received");
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (this.requests[index].statusCode == 400) {
|
|
173
|
+
this.appService.sendSnackbarNotification(this.requests[index].message);
|
|
174
|
+
console.log("[Request Service] " + this.requests[index].message);
|
|
175
|
+
}
|
|
176
|
+
if (this.requests[index].statusCode == 403) {
|
|
177
|
+
console.warn("[Request Service] Status Code: " + this.requests[index].statusCode + " - " + this.requests[index].statusCodeDescription);
|
|
178
|
+
}
|
|
179
|
+
if (this.requests[index].statusCode == 405) {
|
|
180
|
+
console.error("[Request Service] Status Code: " + this.requests[index].statusCode + " - " + this.requests[index].message);
|
|
181
|
+
}
|
|
182
|
+
if ((delta.accessRequest !== undefined) && (delta.accessRequest.token !== undefined)) {
|
|
183
|
+
this.appService.sendSnackbarNotification(delta.accessRequest.permission + ": Device Access Token received from server.");
|
|
184
|
+
console.log(`[Request Service] ${delta.accessRequest.permission}: Device Access Token received`);
|
|
185
|
+
this.auth.setDeviceAccessToken(delta.accessRequest.token);
|
|
186
|
+
}
|
|
187
|
+
else if (delta.login !== undefined) {
|
|
188
|
+
// Delta (WebSocket) login not implemented. Use REST login from
|
|
189
|
+
// Authentication service to obtain Session token
|
|
190
|
+
if (delta.login.token !== undefined) {
|
|
191
|
+
// Do logic
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
this.appService.sendSnackbarNotification("ERROR: Unknown Request Status Code received: " + this.requests[index].statusCode + " - " + deltaStatusCodes[this.requests[index].statusCode] + " - " + this.requests[index].message);
|
|
197
|
+
console.error("[Request Service] Unknown Request Status Code received: " + this.requests[index].statusCode + " - " + deltaStatusCodes[this.requests[index].statusCode] + " - " + this.requests[index].message);
|
|
198
|
+
}
|
|
199
|
+
try {
|
|
200
|
+
this.requestStatus$.next(this.requests[index]); // dispatched results
|
|
201
|
+
this.requests.splice(index, 1); // cleanup array
|
|
202
|
+
}
|
|
203
|
+
catch (err) {
|
|
204
|
+
this.requestStatus$.error(err);
|
|
205
|
+
console.error("[Request Service] " + err);
|
|
206
|
+
this.requests = []; // flush array to clean values that will become stale post error
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
this.appService.sendSnackbarNotification("ERROR: A request message that contains an unknown Request ID was received. Request Delta:\n" + JSON.stringify(delta));
|
|
211
|
+
console.error("[Request Service] A Request message that contains an unknown Request ID was received. from delta:\n" + JSON.stringify(delta));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Subscribe to Signal K request response. This allows you to inspect server
|
|
216
|
+
* response information such as State, Status Codes and such for further processing
|
|
217
|
+
* logic. Subscription object should be used for the Return :)
|
|
218
|
+
*
|
|
219
|
+
* @return Observable of type skRequest.
|
|
220
|
+
*/
|
|
221
|
+
subscribeRequest() {
|
|
222
|
+
return this.requestStatus$.asObservable();
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
SignalkRequestsService = __decorate([
|
|
226
|
+
Injectable({
|
|
227
|
+
providedIn: 'root'
|
|
228
|
+
}),
|
|
229
|
+
__metadata("design:paramtypes", [])
|
|
230
|
+
], SignalkRequestsService);
|
|
231
|
+
export { SignalkRequestsService };
|
|
232
|
+
//# sourceMappingURL=signalk-requests.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signalk-requests.service.js","sourceRoot":"","sources":["../../../../../../src/app/core/services/signalk-requests.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE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AK,CAAC,qGAAqG,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAA;QAC9I,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACI,gBAAgB;QACrB,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;IAC5C,CAAC;CACF,CAAA;AAxNY,sBAAsB;IAHlC,UAAU,CAAC;QACV,UAAU,EAAE,MAAM;KACnB,CAAC;;GACW,sBAAsB,CAwNlC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
import { SignalkRequestsService } from './signalk-requests.service';
|
|
3
|
+
describe('SignalkRequestsService', () => {
|
|
4
|
+
beforeEach(() => TestBed.configureTestingModule({}));
|
|
5
|
+
it('should be created', () => {
|
|
6
|
+
const service = TestBed.inject(SignalkRequestsService);
|
|
7
|
+
expect(service).toBeTruthy();
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=signalk-requests.service.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signalk-requests.service.spec.js","sourceRoot":"","sources":["../../../../../../src/app/core/services/signalk-requests.service.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC;IAErD,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,OAAO,GAA2B,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;QAC/E,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { SignalKConnectionService } from './signalk-connection.service';
|
|
11
|
+
import { Injectable, inject } from '@angular/core';
|
|
12
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
|
+
import { compare } from 'compare-versions';
|
|
14
|
+
import { HttpClient } from '@angular/common/http';
|
|
15
|
+
import { Subject } from 'rxjs/internal/Subject';
|
|
16
|
+
import { tap, concatMap, catchError, lastValueFrom, BehaviorSubject } from 'rxjs';
|
|
17
|
+
import { AuthenticationService } from './authentication.service';
|
|
18
|
+
let StorageService = class StorageService {
|
|
19
|
+
server = inject(SignalKConnectionService);
|
|
20
|
+
http = inject(HttpClient);
|
|
21
|
+
_auth = inject(AuthenticationService);
|
|
22
|
+
serverEndpoint = null;
|
|
23
|
+
isAppDataSupported = false;
|
|
24
|
+
configFileVersion = null;
|
|
25
|
+
sharedConfigName;
|
|
26
|
+
InitConfig = null;
|
|
27
|
+
storageServiceReady$ = new BehaviorSubject(false);
|
|
28
|
+
_isLoggedIn = false;
|
|
29
|
+
_networkStatus = undefined;
|
|
30
|
+
patchQueue$ = new Subject(); // REST call queue to force sequential calls
|
|
31
|
+
patch = function (arg) {
|
|
32
|
+
//console.log(`[Storage Service] Send patch request:\n${JSON.stringify(arg.document)}`);
|
|
33
|
+
return this.http.post(arg.url, arg.document)
|
|
34
|
+
.pipe(tap(() => console.log("[Storage Service] Remote config patch request completed successfully")), catchError((error) => this.handleError(error)));
|
|
35
|
+
};
|
|
36
|
+
constructor() {
|
|
37
|
+
const server = this.server;
|
|
38
|
+
// Subscriptions auto‑teardown via takeUntilDestroyed
|
|
39
|
+
this._auth.isLoggedIn$
|
|
40
|
+
.pipe(takeUntilDestroyed())
|
|
41
|
+
.subscribe(isLoggedIn => {
|
|
42
|
+
this._isLoggedIn = isLoggedIn;
|
|
43
|
+
this.isStorageServiceReady();
|
|
44
|
+
});
|
|
45
|
+
server.serverServiceEndpoint$
|
|
46
|
+
.pipe(takeUntilDestroyed())
|
|
47
|
+
.subscribe((status) => {
|
|
48
|
+
this._networkStatus = status;
|
|
49
|
+
this.isStorageServiceReady();
|
|
50
|
+
});
|
|
51
|
+
server.serverVersion$
|
|
52
|
+
.pipe(takeUntilDestroyed())
|
|
53
|
+
.subscribe(version => {
|
|
54
|
+
if (version) {
|
|
55
|
+
this.isAppDataSupported = compare(version, '1.27.0', ">=");
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
// Patch request queue to insure JSON Patch requests to SK server don't run over each other and cause collisions/conflicts. SK does not handle multiple async applicationData access calls
|
|
59
|
+
this.patchQueue$
|
|
60
|
+
.pipe(concatMap((arg) => this.patch(arg)), takeUntilDestroyed())
|
|
61
|
+
.subscribe(() => { });
|
|
62
|
+
}
|
|
63
|
+
isStorageServiceReady() {
|
|
64
|
+
if (this._networkStatus?.httpServiceUrl) {
|
|
65
|
+
this.serverEndpoint = this._networkStatus.httpServiceUrl.substring(0, this._networkStatus.httpServiceUrl.length - 4) + "applicationData/"; // this removes 'api/' from the end;
|
|
66
|
+
}
|
|
67
|
+
if (this._networkStatus?.operation === 2 && this._isLoggedIn && this.serverEndpoint) {
|
|
68
|
+
this.storageServiceReady$.next(true);
|
|
69
|
+
console.log(`[Remote Storage Service] Authenticated ${this._isLoggedIn} ,AppData API: ${this.serverEndpoint}`);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.storageServiceReady$.next(false);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
ensureReady() {
|
|
76
|
+
if (!this.storageServiceReady$.getValue()) {
|
|
77
|
+
throw new Error('[StorageService] Not ready: storageServiceReady is false');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Retrieves server Application Data config lists for Kip in both Global
|
|
82
|
+
* and User scopes for the current app version.
|
|
83
|
+
*
|
|
84
|
+
* @param {string} [forceConfigFileVersion] Optional parameter. Forces the
|
|
85
|
+
* Signal K configuration file name to a specific version. If not set, configFileVersion
|
|
86
|
+
* is used by default (set in app-settings and app-initNetwork services).
|
|
87
|
+
* Old KIP versions used value of 1.
|
|
88
|
+
*
|
|
89
|
+
* @return {*} {Promise<Config[]>}
|
|
90
|
+
* @memberof StorageService
|
|
91
|
+
*/
|
|
92
|
+
async listConfigs(forceConfigFileVersion) {
|
|
93
|
+
this.ensureReady();
|
|
94
|
+
const serverConfigs = [];
|
|
95
|
+
if (!this.serverEndpoint) {
|
|
96
|
+
console.warn("[Storage Service] No server endpoint set. Cannot retrieve config list");
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
const url = this.serverEndpoint;
|
|
100
|
+
let globalUrl = url + "global/kip/" + this.configFileVersion + "/?keys=true";
|
|
101
|
+
let userUrl = url + "user/kip/" + this.configFileVersion + "/?keys=true";
|
|
102
|
+
if (forceConfigFileVersion) {
|
|
103
|
+
globalUrl = url + "global/kip/" + forceConfigFileVersion + "/?keys=true";
|
|
104
|
+
userUrl = url + "user/kip/" + forceConfigFileVersion + "/?keys=true";
|
|
105
|
+
}
|
|
106
|
+
await lastValueFrom(this.http.get(globalUrl))
|
|
107
|
+
.then((configNames) => {
|
|
108
|
+
for (const cname of configNames) {
|
|
109
|
+
serverConfigs.push({ scope: 'global', name: cname });
|
|
110
|
+
}
|
|
111
|
+
console.log(`[Storage Service] Retrieved Global config list`);
|
|
112
|
+
})
|
|
113
|
+
.catch(error => {
|
|
114
|
+
this.handleError(error);
|
|
115
|
+
});
|
|
116
|
+
await lastValueFrom(this.http.get(userUrl))
|
|
117
|
+
.then((configNames) => {
|
|
118
|
+
for (const cname of configNames) {
|
|
119
|
+
serverConfigs.push({ scope: 'user', name: cname });
|
|
120
|
+
}
|
|
121
|
+
console.log(`[Storage Service] Retrieved User config list`);
|
|
122
|
+
})
|
|
123
|
+
.catch(error => {
|
|
124
|
+
this.handleError(error);
|
|
125
|
+
});
|
|
126
|
+
return serverConfigs;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Retrieves version and name specific server Application Data config
|
|
130
|
+
* from a given scope.
|
|
131
|
+
*
|
|
132
|
+
* @param {string} scope String value of either 'global' or 'user'
|
|
133
|
+
* @param {string} configName String value of the config name
|
|
134
|
+
* @param {string} [forceConfigFileVersion] Optional parameter. Forces the
|
|
135
|
+
* Signal K configuration file name to a specific version. If not set, configFileVersion
|
|
136
|
+
* is used by default (set in app-settings and app-initNetwork services).
|
|
137
|
+
* Old KIP versions used value of 1.
|
|
138
|
+
* @param {boolean} isInitLoad User for AppSettings config initialization. If True, config will be kept
|
|
139
|
+
*
|
|
140
|
+
* @return {*} {IConfig}
|
|
141
|
+
* @memberof StorageService
|
|
142
|
+
*/
|
|
143
|
+
async getConfig(scope, configName, forceConfigFileVersion, isInitLoad) {
|
|
144
|
+
this.ensureReady();
|
|
145
|
+
let conf = null;
|
|
146
|
+
let url = this.serverEndpoint + scope + "/kip/" + this.configFileVersion + "/" + configName;
|
|
147
|
+
if (forceConfigFileVersion) {
|
|
148
|
+
url = this.serverEndpoint + scope + "/kip/" + forceConfigFileVersion + "/" + configName;
|
|
149
|
+
}
|
|
150
|
+
await lastValueFrom(this.http.get(url))
|
|
151
|
+
.then(remoteConfig => {
|
|
152
|
+
conf = remoteConfig;
|
|
153
|
+
console.log(`[Storage Service] Retrieved config [${configName}] from [${scope}] scope`);
|
|
154
|
+
if (isInitLoad) {
|
|
155
|
+
this.InitConfig = remoteConfig;
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
.catch(error => {
|
|
159
|
+
this.handleError(error);
|
|
160
|
+
});
|
|
161
|
+
return conf;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Send configuration data to the server Application Data service
|
|
165
|
+
* with a scope and name and optional file version. The configuration will be saved in the
|
|
166
|
+
* current Kip app version file number (9.0.0.json) in applicationData subfolder on the server.
|
|
167
|
+
*
|
|
168
|
+
* @usage If the given ConfigName exists in the provided scope for the same version,
|
|
169
|
+
* the data will be overwritten/replaced, else it will be created on the server.
|
|
170
|
+
*
|
|
171
|
+
* @param {string} scope String value of either 'global' or 'user'
|
|
172
|
+
* @param {string} configName String value of the config name
|
|
173
|
+
* @param {IConfig} config config data to be saved
|
|
174
|
+
* @return {*} {null} returns null if operation is successful or raises an error.
|
|
175
|
+
* @memberof StorageService
|
|
176
|
+
*/
|
|
177
|
+
async setConfig(scope, configName, config, forceConfigFileVersion) {
|
|
178
|
+
this.ensureReady();
|
|
179
|
+
let url = this.serverEndpoint + scope + "/kip/" + this.configFileVersion + "/" + configName;
|
|
180
|
+
let response = null;
|
|
181
|
+
if (forceConfigFileVersion) {
|
|
182
|
+
url = this.serverEndpoint + scope + "/kip/" + forceConfigFileVersion + "/" + configName;
|
|
183
|
+
}
|
|
184
|
+
await lastValueFrom(this.http.post(url, config))
|
|
185
|
+
.then(x => {
|
|
186
|
+
console.log(`[Storage Service] Saved config [${configName}] to [${scope}] scope`);
|
|
187
|
+
response = x;
|
|
188
|
+
})
|
|
189
|
+
.catch(error => {
|
|
190
|
+
this.handleError(error);
|
|
191
|
+
});
|
|
192
|
+
return response;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Updates JSON configuration entry section in the server application storage. This uses the JSON Patch standard.
|
|
196
|
+
*
|
|
197
|
+
* @param {string} ObjType string describing the type of configuration object. Value can be: IAppConfig, IThemeConfig, IWidgetConfig, ILayoutConfig, Array\<IUnitDefaults\>, Array\<IDataSet\>, Array\<IZone\>, IZonesConfig, INotificationConfig
|
|
198
|
+
* @param {*} value unstringified update object. The resulting outgoing POST request will automatically stringify.
|
|
199
|
+
* @memberof StorageService
|
|
200
|
+
*/
|
|
201
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
202
|
+
patchConfig(ObjType, value, forceConfigFileVersion) {
|
|
203
|
+
this.ensureReady();
|
|
204
|
+
let url = this.serverEndpoint + "user/kip/" + this.configFileVersion;
|
|
205
|
+
let document;
|
|
206
|
+
if (forceConfigFileVersion) {
|
|
207
|
+
url = this.serverEndpoint + "user/kip/" + forceConfigFileVersion;
|
|
208
|
+
}
|
|
209
|
+
switch (ObjType) {
|
|
210
|
+
case "IAppConfig":
|
|
211
|
+
document =
|
|
212
|
+
[{
|
|
213
|
+
"op": "replace",
|
|
214
|
+
"path": `/${this.sharedConfigName}/app`,
|
|
215
|
+
"value": value
|
|
216
|
+
}];
|
|
217
|
+
break;
|
|
218
|
+
case "IThemeConfig":
|
|
219
|
+
document =
|
|
220
|
+
[{
|
|
221
|
+
"op": "replace",
|
|
222
|
+
"path": `/${this.sharedConfigName}/theme/themeName`,
|
|
223
|
+
"value": value.themeName
|
|
224
|
+
}];
|
|
225
|
+
break;
|
|
226
|
+
case "IWidgetConfig":
|
|
227
|
+
document =
|
|
228
|
+
[{
|
|
229
|
+
"op": "replace",
|
|
230
|
+
"path": `/${this.sharedConfigName}/widget`,
|
|
231
|
+
"value": value
|
|
232
|
+
}];
|
|
233
|
+
break;
|
|
234
|
+
case "ILayoutConfig":
|
|
235
|
+
document =
|
|
236
|
+
[{
|
|
237
|
+
"op": "replace",
|
|
238
|
+
"path": `/${this.sharedConfigName}/layout`,
|
|
239
|
+
"value": value
|
|
240
|
+
}];
|
|
241
|
+
break;
|
|
242
|
+
case "Dashboards":
|
|
243
|
+
document =
|
|
244
|
+
[{
|
|
245
|
+
"op": "replace",
|
|
246
|
+
"path": `/${this.sharedConfigName}/dashboards`,
|
|
247
|
+
"value": value
|
|
248
|
+
}];
|
|
249
|
+
break;
|
|
250
|
+
case "Array<IUnitDefaults>":
|
|
251
|
+
document =
|
|
252
|
+
[{
|
|
253
|
+
"op": "replace",
|
|
254
|
+
"path": `/${this.sharedConfigName}/app/unitDefaults`,
|
|
255
|
+
"value": value
|
|
256
|
+
}];
|
|
257
|
+
break;
|
|
258
|
+
case "Array<IDatasetDef>":
|
|
259
|
+
document =
|
|
260
|
+
[{
|
|
261
|
+
"op": "replace",
|
|
262
|
+
"path": `/${this.sharedConfigName}/app/dataSets`,
|
|
263
|
+
"value": value
|
|
264
|
+
}];
|
|
265
|
+
break;
|
|
266
|
+
case "INotificationConfig":
|
|
267
|
+
document =
|
|
268
|
+
[{
|
|
269
|
+
"op": "replace",
|
|
270
|
+
"path": `/${this.sharedConfigName}/app/notificationConfig`,
|
|
271
|
+
"value": value
|
|
272
|
+
}];
|
|
273
|
+
break;
|
|
274
|
+
default:
|
|
275
|
+
console.warn("[Storage Service] JSON Patch request type unknown");
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
const patch = { url, document };
|
|
279
|
+
this.patchQueue$.next(patch);
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Applies full KIP configuration entry file operations the server's Global Scope application storage.
|
|
283
|
+
*
|
|
284
|
+
* @param {string} configName name of the configuration.
|
|
285
|
+
* @param {string} scope the storage scope to use. Can either be: 'user' or 'global'.
|
|
286
|
+
* @param {string} operation string describing the type action to perform. values can be: 'add', 'replace' or 'remove'.
|
|
287
|
+
* @param {IConfig} config unstringified config object. The resulting outgoing POST request will automatically stringify.
|
|
288
|
+
* @param {number} fileVersion Configuration file version. Supported are 9 for current and 1 for old configs.
|
|
289
|
+
* @memberof StorageService
|
|
290
|
+
*/
|
|
291
|
+
patchGlobal(configName, scope, config, operation, fileVersion) {
|
|
292
|
+
this.ensureReady();
|
|
293
|
+
let url = this.serverEndpoint + scope + "/kip/" + this.configFileVersion;
|
|
294
|
+
if (fileVersion) {
|
|
295
|
+
url = this.serverEndpoint + scope + "/kip/" + fileVersion;
|
|
296
|
+
}
|
|
297
|
+
let document;
|
|
298
|
+
switch (operation) {
|
|
299
|
+
case "add":
|
|
300
|
+
document =
|
|
301
|
+
[{
|
|
302
|
+
"op": "add",
|
|
303
|
+
"path": `/${configName}`,
|
|
304
|
+
"value": config
|
|
305
|
+
}];
|
|
306
|
+
break;
|
|
307
|
+
case "replace":
|
|
308
|
+
document =
|
|
309
|
+
[{
|
|
310
|
+
"op": "replace",
|
|
311
|
+
"path": `/${configName}`,
|
|
312
|
+
"value": config
|
|
313
|
+
}];
|
|
314
|
+
break;
|
|
315
|
+
case "remove":
|
|
316
|
+
document =
|
|
317
|
+
[{
|
|
318
|
+
"op": "remove",
|
|
319
|
+
"path": `/${configName}`,
|
|
320
|
+
"value": config
|
|
321
|
+
}];
|
|
322
|
+
break;
|
|
323
|
+
default:
|
|
324
|
+
console.warn("[Storage Service] JSON Patch operation request type unknown");
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
const patch = { url, document };
|
|
328
|
+
this.patchQueue$.next(patch);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Deletes/removes a full configuration entry from the server ApplicationStorage using JSON Patch standard.
|
|
332
|
+
*
|
|
333
|
+
* @param {string} scope destination storage scope of either global or user value
|
|
334
|
+
* @param {string} name configuration name to delete
|
|
335
|
+
* @param {string} [forceConfigFileVersion] Optional parameter. Forces the
|
|
336
|
+
* Signal K configuration file name to a specific version. If not set, configFileVersion
|
|
337
|
+
* is used by default (set in app-settings and app-initNetwork services).
|
|
338
|
+
* Old KIP versions used value of 1.
|
|
339
|
+
*
|
|
340
|
+
* @memberof StorageService
|
|
341
|
+
*/
|
|
342
|
+
removeItem(scope, name, forceConfigFileVersion) {
|
|
343
|
+
this.ensureReady();
|
|
344
|
+
let url = this.serverEndpoint + scope + "/kip/" + this.configFileVersion;
|
|
345
|
+
if (forceConfigFileVersion) {
|
|
346
|
+
url = this.serverEndpoint + scope + "/kip/" + forceConfigFileVersion;
|
|
347
|
+
}
|
|
348
|
+
const document = [
|
|
349
|
+
{
|
|
350
|
+
"op": "remove",
|
|
351
|
+
"path": `/${name}`
|
|
352
|
+
}
|
|
353
|
+
];
|
|
354
|
+
const patch = { url, document };
|
|
355
|
+
this.patchQueue$.next(patch);
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* *** Not implemented
|
|
359
|
+
*/
|
|
360
|
+
clear() {
|
|
361
|
+
this.ensureReady();
|
|
362
|
+
}
|
|
363
|
+
set activeConfigFileVersion(v) {
|
|
364
|
+
this.configFileVersion = v;
|
|
365
|
+
}
|
|
366
|
+
handleError(error) {
|
|
367
|
+
if (error.status === 0) {
|
|
368
|
+
// A client-side or network error occurred. Handle it accordingly.
|
|
369
|
+
console.error('[Storage Service] An error occurred:', error.error);
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
// The backend returned an unsuccessful response code.
|
|
373
|
+
// The response body may contain clues as to what went wrong.
|
|
374
|
+
console.error(`[Storage Service] Backend returned error: `, error.message);
|
|
375
|
+
}
|
|
376
|
+
// Return an observable with a user-facing error message.
|
|
377
|
+
throw error;
|
|
378
|
+
}
|
|
379
|
+
get initConfig() {
|
|
380
|
+
return this.InitConfig;
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
StorageService = __decorate([
|
|
384
|
+
Injectable({
|
|
385
|
+
providedIn: 'root'
|
|
386
|
+
}),
|
|
387
|
+
__metadata("design:paramtypes", [])
|
|
388
|
+
], StorageService);
|
|
389
|
+
export { StorageService };
|
|
390
|
+
//# sourceMappingURL=storage.service.js.map
|