@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,291 @@
|
|
|
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 { Component, Input, inject } from '@angular/core';
|
|
11
|
+
import { BehaviorSubject, delayWhen, map, retryWhen, sampleTime, tap, throwError, timeout, timer } from 'rxjs';
|
|
12
|
+
import { DataService } from '../services/data.service';
|
|
13
|
+
import { UnitsService } from '../services/units.service';
|
|
14
|
+
import { cloneDeep, merge } from 'lodash-es';
|
|
15
|
+
import { AppService } from '../services/app-service';
|
|
16
|
+
import { BaseWidget } from 'gridstack/dist/angular';
|
|
17
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
18
|
+
;
|
|
19
|
+
let BaseWidgetComponent = class BaseWidgetComponent extends BaseWidget {
|
|
20
|
+
widgetProperties;
|
|
21
|
+
zones$ = new BehaviorSubject([]);
|
|
22
|
+
/** Signal K data stream service to obtain/observe server data */
|
|
23
|
+
DataService = inject(DataService);
|
|
24
|
+
/** Unit conversion service to convert a wide range of numerical data formats */
|
|
25
|
+
unitsService = inject(UnitsService);
|
|
26
|
+
/** Unit conversion service to convert a wide range of numerical data formats */
|
|
27
|
+
app = inject(AppService);
|
|
28
|
+
/** Active theme colors signal */
|
|
29
|
+
theme = toSignal(this.app.cssThemeColorRoles$, { requireSync: true });
|
|
30
|
+
/** Default Widget configuration Object properties. This Object is only used as the default configuration template when Widget is added in a KIP page. The default configuration will automatically be pushed to the AppSettings service (the configuration storage service). From then on, any configuration changes made by users using the Widget Options UI is stored in AppSettings service. defaultConfig will only be use from then on to insure missing properties are merged with their default values is needed insuring a safety net when adding new configuration properties. */
|
|
31
|
+
defaultConfig = undefined;
|
|
32
|
+
/** Array of data paths use for observable automatic setup and cleanup */
|
|
33
|
+
dataStream = undefined;
|
|
34
|
+
/** Single Observable Subscription object for all data paths */
|
|
35
|
+
dataSubscriptions = undefined;
|
|
36
|
+
/** Single Observable Subscription object for all data paths */
|
|
37
|
+
metaSubscriptions = undefined;
|
|
38
|
+
constructor() {
|
|
39
|
+
super();
|
|
40
|
+
}
|
|
41
|
+
serialize() {
|
|
42
|
+
return { widgetProperties: this.widgetProperties };
|
|
43
|
+
}
|
|
44
|
+
observeMetaStream() {
|
|
45
|
+
if (this.widgetProperties && this.widgetProperties.config.paths && Object.keys(this.widgetProperties.config.paths).length > 0) {
|
|
46
|
+
const firstKey = Object.keys(this.widgetProperties.config.paths)[0];
|
|
47
|
+
const path = this.widgetProperties.config.paths[firstKey].path;
|
|
48
|
+
this.metaSubscriptions = this.DataService.getPathMetaObservable(path).subscribe((meta) => {
|
|
49
|
+
if (!meta) {
|
|
50
|
+
this.zones$.next([]);
|
|
51
|
+
}
|
|
52
|
+
else if (meta.zones) {
|
|
53
|
+
this.zones$.next(meta.zones);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.zones$.next([]);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Call this method to automatically unsubscribe all Widget Meta Observers, cleanup KIP's Observable
|
|
63
|
+
* registry and reset Widget Subscriptions to free resources.
|
|
64
|
+
*
|
|
65
|
+
* Should be called in ngOnDestroy().
|
|
66
|
+
*
|
|
67
|
+
* @protected
|
|
68
|
+
* @memberof BaseWidgetComponent
|
|
69
|
+
*/
|
|
70
|
+
unsubscribeMetaStream() {
|
|
71
|
+
this.metaSubscriptions?.unsubscribe();
|
|
72
|
+
this.metaSubscriptions = undefined;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* This method is used to insure Widget configuration property model changes (not value)
|
|
76
|
+
* are added to older versions of Widget configuration and limit breaking changes.
|
|
77
|
+
*
|
|
78
|
+
* The method compares Widget configuration (from saved storage config) with Widget
|
|
79
|
+
* defaultConfig, adds missing defaultConfig properties and values recursively to
|
|
80
|
+
* configuration.
|
|
81
|
+
*
|
|
82
|
+
* The changes are not persisted until the configuration is saved.
|
|
83
|
+
*
|
|
84
|
+
* @protected
|
|
85
|
+
* @memberof BaseWidgetComponent
|
|
86
|
+
*/
|
|
87
|
+
validateConfig() {
|
|
88
|
+
this.widgetProperties.config = cloneDeep(merge(this.defaultConfig, this.widgetProperties.config));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Will iterate and creates all Widget Observables based on the Widget's widgetProperties.config.paths
|
|
92
|
+
* child Objects definitions. If no widgetProperties.config.paths child Objects definitions
|
|
93
|
+
* exists, method returns without further execution.
|
|
94
|
+
*
|
|
95
|
+
* This method will be automatically called by observeDataStream() if it finds that no Observable
|
|
96
|
+
* have been created.
|
|
97
|
+
*
|
|
98
|
+
* This method can be called manually if you are not using observeDataStream() and you are manually
|
|
99
|
+
* handling Observer operations for your custom needs.
|
|
100
|
+
*
|
|
101
|
+
* @protected
|
|
102
|
+
* @return {*} {void}
|
|
103
|
+
* @memberof BaseWidgetComponent
|
|
104
|
+
*/
|
|
105
|
+
createDataObservable() {
|
|
106
|
+
// check if Widget has properties
|
|
107
|
+
if (this.widgetProperties === undefined)
|
|
108
|
+
return;
|
|
109
|
+
if (Object.keys(this.widgetProperties.config.paths).length == 0) {
|
|
110
|
+
this.dataStream = undefined;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
this.dataStream = [];
|
|
115
|
+
}
|
|
116
|
+
Object.keys(this.widgetProperties.config.paths).forEach(pathKey => {
|
|
117
|
+
// check if Widget has valid path
|
|
118
|
+
if (typeof (this.widgetProperties.config.paths[pathKey].path) != 'string' || this.widgetProperties.config.paths[pathKey].path == '' || this.widgetProperties.config.paths[pathKey].path == null) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
this.dataStream.push({
|
|
123
|
+
pathName: pathKey,
|
|
124
|
+
observable: this.DataService.subscribePath(this.widgetProperties.config.paths[pathKey].path, this.widgetProperties.config.paths[pathKey].source)
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Use this method to subscribe to a Signal K data path Observable and receive a
|
|
131
|
+
* live data stream from the server. This method apply
|
|
132
|
+
* a combination of widgetProperties.config and widgetProperties.config.paths[pathName]
|
|
133
|
+
* objects properties to setup the Observer. Ex: Widget min/max, decimal, combined with
|
|
134
|
+
* path sampleTimes and conversions.
|
|
135
|
+
*
|
|
136
|
+
* @protected
|
|
137
|
+
* @param {string} pathName the [key: string] name of the path IWidgetPath Object ie. paths: { "numericPath"... Look at the this.defaultConfig Object to identify the string key to use.
|
|
138
|
+
* @param {((value) => void)} subscribeNextFunction The callback function for the Next notification delivered by the Observer. The function has the same properties as a standard subscribe callback function. ie. observer.subscribe( x => { console.log(x) } ).
|
|
139
|
+
* @return {*}
|
|
140
|
+
* @memberof BaseWidgetComponent
|
|
141
|
+
*/
|
|
142
|
+
observeDataStream(pathName, subscribeNextFunction) {
|
|
143
|
+
if (this.dataStream === undefined || this.dataStream.length == 0) {
|
|
144
|
+
this.createDataObservable();
|
|
145
|
+
}
|
|
146
|
+
const pathType = this.widgetProperties.config.paths[pathName].pathType;
|
|
147
|
+
const path = this.widgetProperties.config.paths[pathName].path;
|
|
148
|
+
const convert = this.widgetProperties.config.paths[pathName].convertUnitTo;
|
|
149
|
+
const widgetSample = this.widgetProperties.config.paths[pathName].sampleTime;
|
|
150
|
+
const dataTimeout = this.widgetProperties.config.dataTimeout * 1000;
|
|
151
|
+
const retryDelay = 5000;
|
|
152
|
+
const timeoutErrorMsg = `[Widget] ${this.widgetProperties.config.displayName} - ${dataTimeout / 1000} second data update timeout reached for `;
|
|
153
|
+
const retryErrorMsg = `[Widget] ${this.widgetProperties.config.displayName} - Retrying in ${retryDelay / 1000} secondes`;
|
|
154
|
+
const observer = this.buildObserver(pathName, subscribeNextFunction);
|
|
155
|
+
const pathObs = this.dataStream.find((stream) => {
|
|
156
|
+
return stream.pathName === pathName;
|
|
157
|
+
});
|
|
158
|
+
// check Widget paths Observable(s)
|
|
159
|
+
if (pathObs === undefined)
|
|
160
|
+
return;
|
|
161
|
+
let dataPipe$;
|
|
162
|
+
// if numeric apply unit conversion
|
|
163
|
+
if (pathType == 'number') {
|
|
164
|
+
if (this.widgetProperties.config.enableTimeout) {
|
|
165
|
+
dataPipe$ = pathObs.observable.pipe(
|
|
166
|
+
// filterNullish(),
|
|
167
|
+
map(x => ({
|
|
168
|
+
data: {
|
|
169
|
+
value: this.unitsService.convertToUnit(convert, x.data.value),
|
|
170
|
+
timestamp: x.data.timestamp
|
|
171
|
+
},
|
|
172
|
+
state: x.state
|
|
173
|
+
})), sampleTime(widgetSample), timeout({
|
|
174
|
+
each: dataTimeout,
|
|
175
|
+
with: () => throwError(() => {
|
|
176
|
+
console.log(timeoutErrorMsg + path);
|
|
177
|
+
this.DataService.timeoutPathObservable(path, pathType);
|
|
178
|
+
})
|
|
179
|
+
}), retryWhen(error => error.pipe(tap(() => console.log(retryErrorMsg)), delayWhen(() => timer(retryDelay)))));
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
dataPipe$ = pathObs.observable.pipe(
|
|
183
|
+
// filterNullish(),
|
|
184
|
+
map(x => ({
|
|
185
|
+
data: {
|
|
186
|
+
value: this.unitsService.convertToUnit(convert, x.data.value),
|
|
187
|
+
timestamp: x.data.timestamp
|
|
188
|
+
},
|
|
189
|
+
state: x.state
|
|
190
|
+
})), sampleTime(widgetSample));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
else if (pathType == 'string' || pathType == 'Date') {
|
|
194
|
+
if (this.widgetProperties.config.enableTimeout) {
|
|
195
|
+
dataPipe$ = pathObs.observable.pipe(
|
|
196
|
+
// filterNullish(),
|
|
197
|
+
sampleTime(widgetSample), timeout({
|
|
198
|
+
each: dataTimeout,
|
|
199
|
+
with: () => throwError(() => {
|
|
200
|
+
console.log(timeoutErrorMsg + path);
|
|
201
|
+
this.DataService.timeoutPathObservable(path, pathType);
|
|
202
|
+
})
|
|
203
|
+
}), retryWhen(error => error.pipe(tap(() => console.log(retryErrorMsg)), delayWhen(() => timer(retryDelay)))));
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
dataPipe$ = pathObs.observable.pipe(
|
|
207
|
+
// filterNullish(),
|
|
208
|
+
sampleTime(widgetSample));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
else { // boolean
|
|
212
|
+
dataPipe$ = pathObs.observable.pipe(
|
|
213
|
+
// filterNullish(),
|
|
214
|
+
sampleTime(widgetSample));
|
|
215
|
+
}
|
|
216
|
+
if (this.dataSubscriptions === undefined) {
|
|
217
|
+
this.dataSubscriptions = dataPipe$.subscribe(observer);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
this.dataSubscriptions.add(dataPipe$.subscribe(observer));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Call this method to automatically unsubscribe all Widget Observers, cleanup KIP's Observable
|
|
225
|
+
* registry and reset Widget Subscriptions to free resources.
|
|
226
|
+
*
|
|
227
|
+
* Should be called in ngOnDestroy().
|
|
228
|
+
*
|
|
229
|
+
* @protected
|
|
230
|
+
* @memberof BaseWidgetComponent
|
|
231
|
+
*/
|
|
232
|
+
unsubscribeDataStream() {
|
|
233
|
+
this.dataSubscriptions?.unsubscribe();
|
|
234
|
+
this.dataSubscriptions = undefined;
|
|
235
|
+
this.dataStream = undefined;
|
|
236
|
+
}
|
|
237
|
+
buildObserver(pathKey, subscribeNextFunction) {
|
|
238
|
+
const observer = {
|
|
239
|
+
next: (value) => subscribeNextFunction(value),
|
|
240
|
+
error: err => console.error('[Widget] Observer got an error: ' + err),
|
|
241
|
+
complete: () => console.log('[Widget] Observer got a complete notification: ' + pathKey),
|
|
242
|
+
};
|
|
243
|
+
return observer;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* This method will automatically ensure that Widget min/max values and decimal places
|
|
247
|
+
* are applied. To respect decimal places a string must be returned, else trailing
|
|
248
|
+
* zeros are stripped.
|
|
249
|
+
*
|
|
250
|
+
* @protected
|
|
251
|
+
* @param {number} v the value to format
|
|
252
|
+
* @return {*} {string} the final output to display
|
|
253
|
+
* @memberof BaseWidgetComponent
|
|
254
|
+
*/
|
|
255
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
256
|
+
formatWidgetNumberValue(v) {
|
|
257
|
+
// Check if v is not a number or is null or undefined
|
|
258
|
+
if (typeof v !== 'number' || v == null) {
|
|
259
|
+
return '';
|
|
260
|
+
}
|
|
261
|
+
// Limit value to Min/Max range
|
|
262
|
+
v = Math.min(Math.max(v, this.widgetProperties.config.displayScale.lower), this.widgetProperties.config.displayScale.upper);
|
|
263
|
+
// Convert to fixed decimal string
|
|
264
|
+
const vStr = v.toFixed(this.widgetProperties.config.numDecimal);
|
|
265
|
+
return vStr;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* @description This method is used to destroy all Widget Observables and free resources.
|
|
269
|
+
* This method should be called in component ngOnDestroy() to ensure all data layer
|
|
270
|
+
* resources are freed.
|
|
271
|
+
* @protected
|
|
272
|
+
* @memberof BaseWidgetComponent
|
|
273
|
+
*/
|
|
274
|
+
destroyDataStreams() {
|
|
275
|
+
this.unsubscribeDataStream();
|
|
276
|
+
this.unsubscribeMetaStream();
|
|
277
|
+
this.zones$.complete();
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
__decorate([
|
|
281
|
+
Input({ required: true }),
|
|
282
|
+
__metadata("design:type", Object)
|
|
283
|
+
], BaseWidgetComponent.prototype, "widgetProperties", void 0);
|
|
284
|
+
BaseWidgetComponent = __decorate([
|
|
285
|
+
Component({
|
|
286
|
+
template: ''
|
|
287
|
+
}),
|
|
288
|
+
__metadata("design:paramtypes", [])
|
|
289
|
+
], BaseWidgetComponent);
|
|
290
|
+
export { BaseWidgetComponent };
|
|
291
|
+
//# sourceMappingURL=base-widget.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-widget.component.js","sourceRoot":"","sources":["../../../../../../src/app/core/utils/base-widget.component.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,eAAe,EAAsC,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACnJ,OAAO,EAAE,WAAW,EAAe,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAgB,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4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,CAAA;AA9SsC;IAApC,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6DAAsC;AAD5C,mBAAmB;IAHxC,SAAS,CAAC;QACT,QAAQ,EAAE,EAAE;KACb,CAAC;;GACoB,mBAAmB,CA+SxC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
import { Component } from '@angular/core';
|
|
8
|
+
import { TestBed } from '@angular/core/testing';
|
|
9
|
+
import { BaseWidgetComponent } from './base-widget.component';
|
|
10
|
+
// Minimal concrete implementation for testing the abstract base class logic.
|
|
11
|
+
let TestWidgetComponent = class TestWidgetComponent extends BaseWidgetComponent {
|
|
12
|
+
defaultConfig = {
|
|
13
|
+
displayName: 'Test Widget',
|
|
14
|
+
displayScale: { lower: 0, upper: 100, type: 'linear' },
|
|
15
|
+
numDecimal: 1,
|
|
16
|
+
enableTimeout: false,
|
|
17
|
+
dataTimeout: 10,
|
|
18
|
+
paths: {
|
|
19
|
+
main: {
|
|
20
|
+
description: 'Main',
|
|
21
|
+
path: 'self.test.path',
|
|
22
|
+
source: null,
|
|
23
|
+
pathType: 'number',
|
|
24
|
+
isPathConfigurable: true,
|
|
25
|
+
sampleTime: 1000
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
// Provide no-op implementations for abstract methods.
|
|
30
|
+
startWidget() { }
|
|
31
|
+
updateConfig() { }
|
|
32
|
+
// Expose protected method for spec assertions
|
|
33
|
+
runValidateConfig() { this.validateConfig(); }
|
|
34
|
+
// Public helpers for spec to set/get protected widgetProperties
|
|
35
|
+
setProps(p) { this.widgetProperties = p; }
|
|
36
|
+
get props() { return this.widgetProperties; }
|
|
37
|
+
};
|
|
38
|
+
TestWidgetComponent = __decorate([
|
|
39
|
+
Component({
|
|
40
|
+
selector: 'kip-test-widget',
|
|
41
|
+
template: '<div>Test Widget {{widgetProperties?.config?.displayName}}</div>'
|
|
42
|
+
})
|
|
43
|
+
], TestWidgetComponent);
|
|
44
|
+
describe('BaseWidgetComponent (via TestWidgetComponent)', () => {
|
|
45
|
+
let component;
|
|
46
|
+
let fixture;
|
|
47
|
+
const widgetProps = {
|
|
48
|
+
uuid: 'test-uuid',
|
|
49
|
+
type: 'test',
|
|
50
|
+
config: {
|
|
51
|
+
displayName: 'Test Widget',
|
|
52
|
+
displayScale: { lower: 0, upper: 100, type: 'linear' },
|
|
53
|
+
numDecimal: 1,
|
|
54
|
+
enableTimeout: false,
|
|
55
|
+
dataTimeout: 10,
|
|
56
|
+
paths: {
|
|
57
|
+
main: {
|
|
58
|
+
description: 'Main',
|
|
59
|
+
path: 'self.test.path',
|
|
60
|
+
source: null,
|
|
61
|
+
pathType: 'number',
|
|
62
|
+
isPathConfigurable: true,
|
|
63
|
+
sampleTime: 1000
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
beforeEach(async () => {
|
|
69
|
+
await TestBed.configureTestingModule({
|
|
70
|
+
declarations: [TestWidgetComponent]
|
|
71
|
+
}).compileComponents();
|
|
72
|
+
fixture = TestBed.createComponent(TestWidgetComponent);
|
|
73
|
+
component = fixture.componentInstance;
|
|
74
|
+
component.setProps(widgetProps);
|
|
75
|
+
fixture.detectChanges();
|
|
76
|
+
});
|
|
77
|
+
it('should create concrete test widget', () => {
|
|
78
|
+
expect(component).toBeTruthy();
|
|
79
|
+
});
|
|
80
|
+
it('validateConfig merges defaults (idempotent)', () => {
|
|
81
|
+
// remove a property to ensure it gets merged back
|
|
82
|
+
// assign through helper accessor
|
|
83
|
+
delete component.props.config.numDecimal;
|
|
84
|
+
component.runValidateConfig();
|
|
85
|
+
expect(component.props.config.numDecimal).toBe(1);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
//# sourceMappingURL=base-widget.component.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-widget.component.spec.js","sourceRoot":"","sources":["../../../../../../src/app/core/utils/base-widget.component.spec.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAoB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,6EAA6E;AAK7E,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,mBAAmB;IAC1C,aAAa,GAAqB;QACzC,WAAW,EAAE,aAAa;QAC1B,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE;QACtD,UAAU,EAAE,CAAC;QACb,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,EAAE;QACf,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,gBAAgB;gBACtB,MAAM,EAAE,IAAI;gBACZ,QAAQ,EAAE,QAAQ;gBAClB,kBAAkB,EAAE,IAAI;gBACxB,UAAU,EAAE,IAAI;aACjB;SACF;KACF,CAAC;IAEF,sDAAsD;IACnC,WAAW,KAAgC,CAAC;IAC5C,YAAY,KAAgC,CAAC;IAEhE,8CAA8C;IACvC,iBAAiB,KAAW,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IAE3D,gEAAgE;IACzD,QAAQ,CAAC,CAAU,IA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AC;IAEH,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,kDAAkD;QACpD,iCAAiC;QACjC,OAAQ,SAAS,CAAC,KAAK,CAAC,MAA6C,CAAC,UAAU,CAAC;QAC/E,SAAS,CAAC,iBAAiB,EAAE,CAAC;QAChC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns an adjusted scale range, with major tick values that are well rounded ie. limiting
|
|
3
|
+
* tick value factions as best as possible. Note that the min/max value are starting points.
|
|
4
|
+
* The returned range may be different from the input range, as the min/max values *may
|
|
5
|
+
* will be adjusted.
|
|
6
|
+
*
|
|
7
|
+
* @private
|
|
8
|
+
* @param {number} minValue suggested range min value
|
|
9
|
+
* @param {number} maxValue suggested range max value
|
|
10
|
+
* @param {boolean} [invert=false] whether the resulting scale should be inverted. When true, min/max are swapped and ticks are reversed.
|
|
11
|
+
* @return {*} {[number, number, number[]]} array containing calculated rounded range minimal value, maximum value and the corresponding tick array values
|
|
12
|
+
*/
|
|
13
|
+
export function adjustLinearScaleAndMajorTicks(minValue, maxValue, invert = false) {
|
|
14
|
+
const tickArray = [];
|
|
15
|
+
let niceRange = maxValue - minValue;
|
|
16
|
+
let majorTickSpacing = 0;
|
|
17
|
+
const maxNoOfMajorTicks = 10;
|
|
18
|
+
niceRange = calcNiceNumber(maxValue - minValue, false);
|
|
19
|
+
majorTickSpacing = calcNiceNumber(niceRange / (maxNoOfMajorTicks - 1), true);
|
|
20
|
+
const niceMinValue = Math.floor(minValue / majorTickSpacing) * majorTickSpacing;
|
|
21
|
+
const niceMaxValue = Math.ceil(maxValue / majorTickSpacing) * majorTickSpacing;
|
|
22
|
+
tickArray.push(niceMinValue);
|
|
23
|
+
const range = niceRange / majorTickSpacing;
|
|
24
|
+
for (let index = 0; index < range; index++) {
|
|
25
|
+
if (tickArray[index] < niceMaxValue) {
|
|
26
|
+
const tick = (Number(tickArray[index].toFixed(2)) * 100 + Number(majorTickSpacing.toFixed(2)) * 100) / 100;
|
|
27
|
+
tickArray.push(tick);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
// Ensure the last tick is the niceMaxValue
|
|
31
|
+
if (tickArray[tickArray.length - 1] !== niceMaxValue) {
|
|
32
|
+
tickArray.push(niceMaxValue);
|
|
33
|
+
}
|
|
34
|
+
if (invert) {
|
|
35
|
+
const invertedTicks = [...tickArray].reverse();
|
|
36
|
+
return { min: niceMinValue, max: niceMaxValue, majorTicks: invertedTicks };
|
|
37
|
+
}
|
|
38
|
+
return { min: niceMinValue, max: niceMaxValue, majorTicks: tickArray };
|
|
39
|
+
}
|
|
40
|
+
function calcNiceNumber(range, round) {
|
|
41
|
+
const exponent = Math.floor(Math.log10(range)); // exponent of range
|
|
42
|
+
const fraction = range / Math.pow(10, exponent); // fractional part of range
|
|
43
|
+
let niceFraction = null; // nice, rounded fraction
|
|
44
|
+
if (round) {
|
|
45
|
+
if (1.5 > fraction) {
|
|
46
|
+
niceFraction = 1;
|
|
47
|
+
}
|
|
48
|
+
else if (3 > fraction) {
|
|
49
|
+
niceFraction = 2;
|
|
50
|
+
}
|
|
51
|
+
else if (7 > fraction) {
|
|
52
|
+
niceFraction = 5;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
niceFraction = 10;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
if (1 >= fraction) {
|
|
60
|
+
niceFraction = 1;
|
|
61
|
+
}
|
|
62
|
+
else if (2 >= fraction) {
|
|
63
|
+
niceFraction = 2;
|
|
64
|
+
}
|
|
65
|
+
else if (5 >= fraction) {
|
|
66
|
+
niceFraction = 5;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
niceFraction = 10;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return niceFraction * Math.pow(10, exponent);
|
|
73
|
+
}
|
|
74
|
+
export function generateScaleTypeTicks(minValue, maxValue, scaleType) {
|
|
75
|
+
const ticks = [];
|
|
76
|
+
switch (scaleType) {
|
|
77
|
+
case 'linear': {
|
|
78
|
+
const numTicksLinear = calculateNiceLinearNumTicks(minValue, maxValue);
|
|
79
|
+
const rangeLinear = maxValue - minValue;
|
|
80
|
+
const stepLinear = rangeLinear / (numTicksLinear - 1);
|
|
81
|
+
for (let i = 0; i < numTicksLinear; i++) {
|
|
82
|
+
const tick = minValue + (i * stepLinear);
|
|
83
|
+
ticks.push(tick);
|
|
84
|
+
}
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
default:
|
|
88
|
+
throw new Error(`Invalid or or not implemented scale type: ${scaleType}`);
|
|
89
|
+
}
|
|
90
|
+
return ticks;
|
|
91
|
+
}
|
|
92
|
+
function calculateNiceLinearNumTicks(minValue, maxValue) {
|
|
93
|
+
const range = maxValue - minValue;
|
|
94
|
+
let step = range / 10; // Start with a step that divides the range into 10 parts
|
|
95
|
+
// Increase the step until we get a step value with no more than 1 decimal place
|
|
96
|
+
while (Math.floor(step * 10) !== step * 10) {
|
|
97
|
+
step += 0.1;
|
|
98
|
+
}
|
|
99
|
+
// Calculate the number of ticks based on the step
|
|
100
|
+
const numTicks = Math.round(range / step);
|
|
101
|
+
return numTicks;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Transforms a value to a new value based on a focal range.
|
|
105
|
+
*
|
|
106
|
+
* @export
|
|
107
|
+
* @param {number} value The value to transform
|
|
108
|
+
* @param {number} minValue The minimum value of the original range
|
|
109
|
+
* @param {number} maxValue The maximum value of the original range
|
|
110
|
+
* @param {number} focalRangeStart The start of the focal range
|
|
111
|
+
* @param {number} focalRangeEnd The end of the focal range
|
|
112
|
+
* @param {number} focalRange The size of the focal range
|
|
113
|
+
* @return {*} {number}
|
|
114
|
+
*/
|
|
115
|
+
export function focalRangeTransform(value, minValue, maxValue, focalRangeStart, focalRangeEnd, focalRange) {
|
|
116
|
+
if (value < focalRangeStart) {
|
|
117
|
+
return minValue + ((value - minValue) * 0.4); // Non-focal range (40%)
|
|
118
|
+
}
|
|
119
|
+
else if (value <= focalRangeEnd) {
|
|
120
|
+
return minValue + (value - focalRangeStart) * ((maxValue - minValue) * 0.6 / focalRange);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
return minValue + ((maxValue - minValue) * 0.6) + ((value - focalRangeEnd) * 0.4); // Non-focal range (40%)
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
;
|
|
127
|
+
//# sourceMappingURL=dataScales.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataScales.util.js","sourceRoot":"","sources":["../../../../../../src/app/core/utils/dataScales.util.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,8BAA8B,CAAC,QAAgB,EAAE,QAAgB,EAAE,MAAM,GAAG,KAAK;IAC/F,MAAM,SAAS,GAAG,EAAc,CAAC;IACjC,IAAI,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACpC,IAAI,gBAAgB,GAAG,CAAC,CAAC;IACzB,MAAM,iBAAiB,GAAG,EAAE,CAAC;IAG7B,SAAS,GAAG,cAAc,CAAC,QAAQ,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC;IACvD,gBAAgB,GAAG,cAAc,CAAC,SAAS,GAAG,CAAC,iBAAiB,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAC7E,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;IAChF,MAAM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