@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.
Files changed (486) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +39 -59
  3. package/dist/out-tsc/kip-plugin/src/index.js +223 -0
  4. package/dist/out-tsc/kip-plugin/src/index.js.map +1 -0
  5. package/dist/out-tsc/kip-plugin/src/openApi.json +367 -0
  6. package/dist/out-tsc/package.json +118 -0
  7. package/dist/out-tsc/schematics/widget/index.js +70 -0
  8. package/dist/out-tsc/schematics/widget/index.js.map +1 -0
  9. package/dist/out-tsc/src/app/app.component.js +286 -0
  10. package/dist/out-tsc/src/app/app.component.js.map +1 -0
  11. package/dist/out-tsc/src/app/app.component.spec.js +26 -0
  12. package/dist/out-tsc/src/app/app.component.spec.js.map +1 -0
  13. package/dist/out-tsc/src/app/app.routes.js +35 -0
  14. package/dist/out-tsc/src/app/app.routes.js.map +1 -0
  15. package/dist/out-tsc/src/app/core/components/app-help/app-help.component.js +60 -0
  16. package/dist/out-tsc/src/app/core/components/app-help/app-help.component.js.map +1 -0
  17. package/dist/out-tsc/src/app/core/components/app-help/app-help.component.spec.js +150 -0
  18. package/dist/out-tsc/src/app/core/components/app-help/app-help.component.spec.js.map +1 -0
  19. package/dist/out-tsc/src/app/core/components/dashboard/dashboard.component.js +361 -0
  20. package/dist/out-tsc/src/app/core/components/dashboard/dashboard.component.js.map +1 -0
  21. package/dist/out-tsc/src/app/core/components/dashboard/dashboard.component.spec.js +19 -0
  22. package/dist/out-tsc/src/app/core/components/dashboard/dashboard.component.spec.js.map +1 -0
  23. package/dist/out-tsc/src/app/core/components/dashboard-scroller/dashboard-scroller.component.js +33 -0
  24. package/dist/out-tsc/src/app/core/components/dashboard-scroller/dashboard-scroller.component.js.map +1 -0
  25. package/dist/out-tsc/src/app/core/components/dashboard-scroller/dashboard-scroller.component.spec.js +19 -0
  26. package/dist/out-tsc/src/app/core/components/dashboard-scroller/dashboard-scroller.component.spec.js.map +1 -0
  27. package/dist/out-tsc/src/app/core/components/dashboards-editor/dashboards-editor.component.js +183 -0
  28. package/dist/out-tsc/src/app/core/components/dashboards-editor/dashboards-editor.component.js.map +1 -0
  29. package/dist/out-tsc/src/app/core/components/dashboards-editor/dashboards-editor.component.spec.js +19 -0
  30. package/dist/out-tsc/src/app/core/components/dashboards-editor/dashboards-editor.component.spec.js.map +1 -0
  31. package/dist/out-tsc/src/app/core/components/dashboards-manage-bottom-sheet/dashboards-manage-bottom-sheet.component.js +28 -0
  32. package/dist/out-tsc/src/app/core/components/dashboards-manage-bottom-sheet/dashboards-manage-bottom-sheet.component.js.map +1 -0
  33. package/dist/out-tsc/src/app/core/components/dashboards-manage-bottom-sheet/dashboards-manage-bottom-sheet.component.spec.js +19 -0
  34. package/dist/out-tsc/src/app/core/components/dashboards-manage-bottom-sheet/dashboards-manage-bottom-sheet.component.spec.js.map +1 -0
  35. package/dist/out-tsc/src/app/core/components/data-inspector/data-inspector.component.js +130 -0
  36. package/dist/out-tsc/src/app/core/components/data-inspector/data-inspector.component.js.map +1 -0
  37. package/dist/out-tsc/src/app/core/components/data-inspector/data-inspector.component.spec.js +21 -0
  38. package/dist/out-tsc/src/app/core/components/data-inspector/data-inspector.component.spec.js.map +1 -0
  39. package/dist/out-tsc/src/app/core/components/data-inspector-row/data-inspector-row.component.js +82 -0
  40. package/dist/out-tsc/src/app/core/components/data-inspector-row/data-inspector-row.component.js.map +1 -0
  41. package/dist/out-tsc/src/app/core/components/datasets/datasets.component.js +168 -0
  42. package/dist/out-tsc/src/app/core/components/datasets/datasets.component.js.map +1 -0
  43. package/dist/out-tsc/src/app/core/components/datasets/datasets.component.spec.js +21 -0
  44. package/dist/out-tsc/src/app/core/components/datasets/datasets.component.spec.js.map +1 -0
  45. package/dist/out-tsc/src/app/core/components/dialog-confirmation/dialog-confirmation.component.js +24 -0
  46. package/dist/out-tsc/src/app/core/components/dialog-confirmation/dialog-confirmation.component.js.map +1 -0
  47. package/dist/out-tsc/src/app/core/components/dialog-confirmation/dialog-confirmation.component.spec.js +19 -0
  48. package/dist/out-tsc/src/app/core/components/dialog-confirmation/dialog-confirmation.component.spec.js.map +1 -0
  49. package/dist/out-tsc/src/app/core/components/dialog-dashboard-page-editor/dialog-dashboard-page-editor.component.js +45 -0
  50. package/dist/out-tsc/src/app/core/components/dialog-dashboard-page-editor/dialog-dashboard-page-editor.component.js.map +1 -0
  51. package/dist/out-tsc/src/app/core/components/dialog-dashboard-page-editor/dialog-dashboard-page-editor.component.spec.js +19 -0
  52. package/dist/out-tsc/src/app/core/components/dialog-dashboard-page-editor/dialog-dashboard-page-editor.component.spec.js.map +1 -0
  53. package/dist/out-tsc/src/app/core/components/dialog-frame/dialog-frame.component.js +25 -0
  54. package/dist/out-tsc/src/app/core/components/dialog-frame/dialog-frame.component.js.map +1 -0
  55. package/dist/out-tsc/src/app/core/components/dialog-frame/dialog-frame.component.spec.js +19 -0
  56. package/dist/out-tsc/src/app/core/components/dialog-frame/dialog-frame.component.spec.js.map +1 -0
  57. package/dist/out-tsc/src/app/core/components/dialog-name/dialog-name.component.js +31 -0
  58. package/dist/out-tsc/src/app/core/components/dialog-name/dialog-name.component.js.map +1 -0
  59. package/dist/out-tsc/src/app/core/components/dialog-name/dialog-name.component.spec.js +19 -0
  60. package/dist/out-tsc/src/app/core/components/dialog-name/dialog-name.component.spec.js.map +1 -0
  61. package/dist/out-tsc/src/app/core/components/menu-actions/menu-actions.component.js +100 -0
  62. package/dist/out-tsc/src/app/core/components/menu-actions/menu-actions.component.js.map +1 -0
  63. package/dist/out-tsc/src/app/core/components/menu-actions/menu-actions.component.spec.js +19 -0
  64. package/dist/out-tsc/src/app/core/components/menu-actions/menu-actions.component.spec.js.map +1 -0
  65. package/dist/out-tsc/src/app/core/components/menu-notifications/menu-notifications.component.js +60 -0
  66. package/dist/out-tsc/src/app/core/components/menu-notifications/menu-notifications.component.js.map +1 -0
  67. package/dist/out-tsc/src/app/core/components/menu-notifications/menu-notifications.component.spec.js +21 -0
  68. package/dist/out-tsc/src/app/core/components/menu-notifications/menu-notifications.component.spec.js.map +1 -0
  69. package/dist/out-tsc/src/app/core/components/modal-user-credential/modal-user-credential.component.js +32 -0
  70. package/dist/out-tsc/src/app/core/components/modal-user-credential/modal-user-credential.component.js.map +1 -0
  71. package/dist/out-tsc/src/app/core/components/modal-user-credential/modal-user-credential.component.spec.js +21 -0
  72. package/dist/out-tsc/src/app/core/components/modal-user-credential/modal-user-credential.component.spec.js.map +1 -0
  73. package/dist/out-tsc/src/app/core/components/notification-badge/notification-badge.component.js +51 -0
  74. package/dist/out-tsc/src/app/core/components/notification-badge/notification-badge.component.js.map +1 -0
  75. package/dist/out-tsc/src/app/core/components/notification-badge/notification-badge.component.spec.js +19 -0
  76. package/dist/out-tsc/src/app/core/components/notification-badge/notification-badge.component.spec.js.map +1 -0
  77. package/dist/out-tsc/src/app/core/components/options/configuration/config.component.js +228 -0
  78. package/dist/out-tsc/src/app/core/components/options/configuration/config.component.js.map +1 -0
  79. package/dist/out-tsc/src/app/core/components/options/configuration/config.component.spec.js +21 -0
  80. package/dist/out-tsc/src/app/core/components/options/configuration/config.component.spec.js.map +1 -0
  81. package/dist/out-tsc/src/app/core/components/options/display/display.component.js +142 -0
  82. package/dist/out-tsc/src/app/core/components/options/display/display.component.js.map +1 -0
  83. package/dist/out-tsc/src/app/core/components/options/display/display.component.spec.js +21 -0
  84. package/dist/out-tsc/src/app/core/components/options/display/display.component.spec.js.map +1 -0
  85. package/dist/out-tsc/src/app/core/components/options/notifications/notifications.component.js +66 -0
  86. package/dist/out-tsc/src/app/core/components/options/notifications/notifications.component.js.map +1 -0
  87. package/dist/out-tsc/src/app/core/components/options/notifications/notifications.component.spec.js +21 -0
  88. package/dist/out-tsc/src/app/core/components/options/notifications/notifications.component.spec.js.map +1 -0
  89. package/dist/out-tsc/src/app/core/components/options/signalk/signalk.component.js +255 -0
  90. package/dist/out-tsc/src/app/core/components/options/signalk/signalk.component.js.map +1 -0
  91. package/dist/out-tsc/src/app/core/components/options/signalk/signalk.component.spec.js +21 -0
  92. package/dist/out-tsc/src/app/core/components/options/signalk/signalk.component.spec.js.map +1 -0
  93. package/dist/out-tsc/src/app/core/components/options/tabs/tabs.component.js +44 -0
  94. package/dist/out-tsc/src/app/core/components/options/tabs/tabs.component.js.map +1 -0
  95. package/dist/out-tsc/src/app/core/components/options/tabs/tabs.component.spec.js +21 -0
  96. package/dist/out-tsc/src/app/core/components/options/tabs/tabs.component.spec.js.map +1 -0
  97. package/dist/out-tsc/src/app/core/components/options/units/units.component.js +55 -0
  98. package/dist/out-tsc/src/app/core/components/options/units/units.component.js.map +1 -0
  99. package/dist/out-tsc/src/app/core/components/options/units/units.component.spec.js +21 -0
  100. package/dist/out-tsc/src/app/core/components/options/units/units.component.spec.js.map +1 -0
  101. package/dist/out-tsc/src/app/core/components/page-header/page-header.component.js +31 -0
  102. package/dist/out-tsc/src/app/core/components/page-header/page-header.component.js.map +1 -0
  103. package/dist/out-tsc/src/app/core/components/page-header/page-header.component.spec.js +19 -0
  104. package/dist/out-tsc/src/app/core/components/page-header/page-header.component.spec.js.map +1 -0
  105. package/dist/out-tsc/src/app/core/components/remote-control/remote-control.component.js +63 -0
  106. package/dist/out-tsc/src/app/core/components/remote-control/remote-control.component.js.map +1 -0
  107. package/dist/out-tsc/src/app/core/components/remote-control/remote-control.component.spec.js +19 -0
  108. package/dist/out-tsc/src/app/core/components/remote-control/remote-control.component.spec.js.map +1 -0
  109. package/dist/out-tsc/src/app/core/components/select-icon/select-icon.component.js +75 -0
  110. package/dist/out-tsc/src/app/core/components/select-icon/select-icon.component.js.map +1 -0
  111. package/dist/out-tsc/src/app/core/components/select-icon/select-icon.component.spec.js +19 -0
  112. package/dist/out-tsc/src/app/core/components/select-icon/select-icon.component.spec.js.map +1 -0
  113. package/dist/out-tsc/src/app/core/components/settings/settings.component.js +56 -0
  114. package/dist/out-tsc/src/app/core/components/settings/settings.component.js.map +1 -0
  115. package/dist/out-tsc/src/app/core/components/settings/settings.component.spec.js +19 -0
  116. package/dist/out-tsc/src/app/core/components/settings/settings.component.spec.js.map +1 -0
  117. package/dist/out-tsc/src/app/core/components/tile-large-icon/tile-large-icon.component.js +28 -0
  118. package/dist/out-tsc/src/app/core/components/tile-large-icon/tile-large-icon.component.js.map +1 -0
  119. package/dist/out-tsc/src/app/core/components/tile-large-icon/tile-large-icon.component.spec.js +19 -0
  120. package/dist/out-tsc/src/app/core/components/tile-large-icon/tile-large-icon.component.spec.js.map +1 -0
  121. package/dist/out-tsc/src/app/core/components/upgrade-config/upgrade-config.component.js +336 -0
  122. package/dist/out-tsc/src/app/core/components/upgrade-config/upgrade-config.component.js.map +1 -0
  123. package/dist/out-tsc/src/app/core/components/upgrade-config/upgrade-config.component.spec.js +19 -0
  124. package/dist/out-tsc/src/app/core/components/upgrade-config/upgrade-config.component.spec.js.map +1 -0
  125. package/dist/out-tsc/src/app/core/components/upgrade-config/v10-config-interface.js +2 -0
  126. package/dist/out-tsc/src/app/core/components/upgrade-config/v10-config-interface.js.map +1 -0
  127. package/dist/out-tsc/src/app/core/components/widget-host/widget-host.component.js +77 -0
  128. package/dist/out-tsc/src/app/core/components/widget-host/widget-host.component.js.map +1 -0
  129. package/dist/out-tsc/src/app/core/components/widget-host/widget-host.component.spec.js +19 -0
  130. package/dist/out-tsc/src/app/core/components/widget-host/widget-host.component.spec.js.map +1 -0
  131. package/dist/out-tsc/src/app/core/components/widget-host-bottom-sheet/widget-host-bottom-sheet.component.js +29 -0
  132. package/dist/out-tsc/src/app/core/components/widget-host-bottom-sheet/widget-host-bottom-sheet.component.js.map +1 -0
  133. package/dist/out-tsc/src/app/core/components/widget-host-bottom-sheet/widget-host-bottom-sheet.component.spec.js +19 -0
  134. package/dist/out-tsc/src/app/core/components/widget-host-bottom-sheet/widget-host-bottom-sheet.component.spec.js.map +1 -0
  135. package/dist/out-tsc/src/app/core/components/widget-list-card/widget-list-card.component.js +34 -0
  136. package/dist/out-tsc/src/app/core/components/widget-list-card/widget-list-card.component.js.map +1 -0
  137. package/dist/out-tsc/src/app/core/components/widget-list-card/widget-list-card.component.spec.js +19 -0
  138. package/dist/out-tsc/src/app/core/components/widget-list-card/widget-list-card.component.spec.js.map +1 -0
  139. package/dist/out-tsc/src/app/core/components/widget-title/widget-title.component.js +70 -0
  140. package/dist/out-tsc/src/app/core/components/widget-title/widget-title.component.js.map +1 -0
  141. package/dist/out-tsc/src/app/core/components/widget-title/widget-title.component.spec.js +19 -0
  142. package/dist/out-tsc/src/app/core/components/widget-title/widget-title.component.spec.js.map +1 -0
  143. package/dist/out-tsc/src/app/core/components/widgets-list/widgets-list.component.js +61 -0
  144. package/dist/out-tsc/src/app/core/components/widgets-list/widgets-list.component.js.map +1 -0
  145. package/dist/out-tsc/src/app/core/components/widgets-list/widgets-list.component.spec.js +19 -0
  146. package/dist/out-tsc/src/app/core/components/widgets-list/widgets-list.component.spec.js.map +1 -0
  147. package/dist/out-tsc/src/app/core/directives/gesture.directive.js +457 -0
  148. package/dist/out-tsc/src/app/core/directives/gesture.directive.js.map +1 -0
  149. package/dist/out-tsc/src/app/core/interceptors/authentication-interceptor.js +43 -0
  150. package/dist/out-tsc/src/app/core/interceptors/authentication-interceptor.js.map +1 -0
  151. package/dist/out-tsc/src/app/core/interceptors/authentication-interceptor.spec.js +7 -0
  152. package/dist/out-tsc/src/app/core/interceptors/authentication-interceptor.spec.js.map +1 -0
  153. package/dist/out-tsc/src/app/core/interfaces/app-interfaces.js +8 -0
  154. package/dist/out-tsc/src/app/core/interfaces/app-interfaces.js.map +1 -0
  155. package/dist/out-tsc/src/app/core/interfaces/app-settings.interfaces.js +2 -0
  156. package/dist/out-tsc/src/app/core/interfaces/app-settings.interfaces.js.map +1 -0
  157. package/dist/out-tsc/src/app/core/interfaces/dialog-data.js +2 -0
  158. package/dist/out-tsc/src/app/core/interfaces/dialog-data.js.map +1 -0
  159. package/dist/out-tsc/src/app/core/interfaces/signalk-autopilot-interfaces.js +11 -0
  160. package/dist/out-tsc/src/app/core/interfaces/signalk-autopilot-interfaces.js.map +1 -0
  161. package/dist/out-tsc/src/app/core/interfaces/signalk-interfaces.js +45 -0
  162. package/dist/out-tsc/src/app/core/interfaces/signalk-interfaces.js.map +1 -0
  163. package/dist/out-tsc/src/app/core/interfaces/widgets-interface.js +7 -0
  164. package/dist/out-tsc/src/app/core/interfaces/widgets-interface.js.map +1 -0
  165. package/dist/out-tsc/src/app/core/pipes/filter-self.pipe.js +24 -0
  166. package/dist/out-tsc/src/app/core/pipes/filter-self.pipe.js.map +1 -0
  167. package/dist/out-tsc/src/app/core/pipes/filter-self.pipe.spec.js +8 -0
  168. package/dist/out-tsc/src/app/core/pipes/filter-self.pipe.spec.js.map +1 -0
  169. package/dist/out-tsc/src/app/core/pipes/object-keys.pipe.js +20 -0
  170. package/dist/out-tsc/src/app/core/pipes/object-keys.pipe.js.map +1 -0
  171. package/dist/out-tsc/src/app/core/pipes/object-keys.pipe.spec.js +8 -0
  172. package/dist/out-tsc/src/app/core/pipes/object-keys.pipe.spec.js.map +1 -0
  173. package/dist/out-tsc/src/app/core/pipes/safe.pipe.js +22 -0
  174. package/dist/out-tsc/src/app/core/pipes/safe.pipe.js.map +1 -0
  175. package/dist/out-tsc/src/app/core/services/app-initNetwork.service.js +199 -0
  176. package/dist/out-tsc/src/app/core/services/app-initNetwork.service.js.map +1 -0
  177. package/dist/out-tsc/src/app/core/services/app-initNetwork.service.spec.js +13 -0
  178. package/dist/out-tsc/src/app/core/services/app-initNetwork.service.spec.js.map +1 -0
  179. package/dist/out-tsc/src/app/core/services/app-service.js +249 -0
  180. package/dist/out-tsc/src/app/core/services/app-service.js.map +1 -0
  181. package/dist/out-tsc/src/app/core/services/app-service.spec.js +13 -0
  182. package/dist/out-tsc/src/app/core/services/app-service.spec.js.map +1 -0
  183. package/dist/out-tsc/src/app/core/services/app-settings.service.js +566 -0
  184. package/dist/out-tsc/src/app/core/services/app-settings.service.js.map +1 -0
  185. package/dist/out-tsc/src/app/core/services/app-settings.service.spec.js +13 -0
  186. package/dist/out-tsc/src/app/core/services/app-settings.service.spec.js.map +1 -0
  187. package/dist/out-tsc/src/app/core/services/authentication.service.js +308 -0
  188. package/dist/out-tsc/src/app/core/services/authentication.service.js.map +1 -0
  189. package/dist/out-tsc/src/app/core/services/authentication.service.spec.js +13 -0
  190. package/dist/out-tsc/src/app/core/services/authentication.service.spec.js.map +1 -0
  191. package/dist/out-tsc/src/app/core/services/canvas.service.js +566 -0
  192. package/dist/out-tsc/src/app/core/services/canvas.service.js.map +1 -0
  193. package/dist/out-tsc/src/app/core/services/canvas.service.spec.js +13 -0
  194. package/dist/out-tsc/src/app/core/services/canvas.service.spec.js.map +1 -0
  195. package/dist/out-tsc/src/app/core/services/connection-state-machine.service.js +325 -0
  196. package/dist/out-tsc/src/app/core/services/connection-state-machine.service.js.map +1 -0
  197. package/dist/out-tsc/src/app/core/services/dashboard.service.js +273 -0
  198. package/dist/out-tsc/src/app/core/services/dashboard.service.js.map +1 -0
  199. package/dist/out-tsc/src/app/core/services/dashboard.service.spec.js +13 -0
  200. package/dist/out-tsc/src/app/core/services/dashboard.service.spec.js.map +1 -0
  201. package/dist/out-tsc/src/app/core/services/data-set.service.js +515 -0
  202. package/dist/out-tsc/src/app/core/services/data-set.service.js.map +1 -0
  203. package/dist/out-tsc/src/app/core/services/data-set.service.spec.js +13 -0
  204. package/dist/out-tsc/src/app/core/services/data-set.service.spec.js.map +1 -0
  205. package/dist/out-tsc/src/app/core/services/data.service.js +425 -0
  206. package/dist/out-tsc/src/app/core/services/data.service.js.map +1 -0
  207. package/dist/out-tsc/src/app/core/services/data.service.spec.js +13 -0
  208. package/dist/out-tsc/src/app/core/services/data.service.spec.js.map +1 -0
  209. package/dist/out-tsc/src/app/core/services/dialog.service.js +73 -0
  210. package/dist/out-tsc/src/app/core/services/dialog.service.js.map +1 -0
  211. package/dist/out-tsc/src/app/core/services/dialog.service.spec.js +13 -0
  212. package/dist/out-tsc/src/app/core/services/dialog.service.spec.js.map +1 -0
  213. package/dist/out-tsc/src/app/core/services/notification-overlay.service.js +106 -0
  214. package/dist/out-tsc/src/app/core/services/notification-overlay.service.js.map +1 -0
  215. package/dist/out-tsc/src/app/core/services/notifications.service.js +322 -0
  216. package/dist/out-tsc/src/app/core/services/notifications.service.js.map +1 -0
  217. package/dist/out-tsc/src/app/core/services/notifications.service.spec.js +10 -0
  218. package/dist/out-tsc/src/app/core/services/notifications.service.spec.js.map +1 -0
  219. package/dist/out-tsc/src/app/core/services/remote-dashboards.service.js +125 -0
  220. package/dist/out-tsc/src/app/core/services/remote-dashboards.service.js.map +1 -0
  221. package/dist/out-tsc/src/app/core/services/remote-dashboards.service.spec.js +13 -0
  222. package/dist/out-tsc/src/app/core/services/remote-dashboards.service.spec.js.map +1 -0
  223. package/dist/out-tsc/src/app/core/services/signalk-connection.service.js +283 -0
  224. package/dist/out-tsc/src/app/core/services/signalk-connection.service.js.map +1 -0
  225. package/dist/out-tsc/src/app/core/services/signalk-delta.service.js +486 -0
  226. package/dist/out-tsc/src/app/core/services/signalk-delta.service.js.map +1 -0
  227. package/dist/out-tsc/src/app/core/services/signalk-delta.service.spec.js +13 -0
  228. package/dist/out-tsc/src/app/core/services/signalk-delta.service.spec.js.map +1 -0
  229. package/dist/out-tsc/src/app/core/services/signalk-plugins.service.js +121 -0
  230. package/dist/out-tsc/src/app/core/services/signalk-plugins.service.js.map +1 -0
  231. package/dist/out-tsc/src/app/core/services/signalk-plugins.service.spec.js +13 -0
  232. package/dist/out-tsc/src/app/core/services/signalk-plugins.service.spec.js.map +1 -0
  233. package/dist/out-tsc/src/app/core/services/signalk-requests.service.js +232 -0
  234. package/dist/out-tsc/src/app/core/services/signalk-requests.service.js.map +1 -0
  235. package/dist/out-tsc/src/app/core/services/signalk-requests.service.spec.js +10 -0
  236. package/dist/out-tsc/src/app/core/services/signalk-requests.service.spec.js.map +1 -0
  237. package/dist/out-tsc/src/app/core/services/storage.service.js +390 -0
  238. package/dist/out-tsc/src/app/core/services/storage.service.js.map +1 -0
  239. package/dist/out-tsc/src/app/core/services/storage.service.spec.js +13 -0
  240. package/dist/out-tsc/src/app/core/services/storage.service.spec.js.map +1 -0
  241. package/dist/out-tsc/src/app/core/services/timers.service.js +107 -0
  242. package/dist/out-tsc/src/app/core/services/timers.service.js.map +1 -0
  243. package/dist/out-tsc/src/app/core/services/timers.service.spec.js +13 -0
  244. package/dist/out-tsc/src/app/core/services/timers.service.spec.js.map +1 -0
  245. package/dist/out-tsc/src/app/core/services/uiEvent.service.js +256 -0
  246. package/dist/out-tsc/src/app/core/services/uiEvent.service.js.map +1 -0
  247. package/dist/out-tsc/src/app/core/services/uiEvent.service.spec.js +13 -0
  248. package/dist/out-tsc/src/app/core/services/uiEvent.service.spec.js.map +1 -0
  249. package/dist/out-tsc/src/app/core/services/units.service.js +630 -0
  250. package/dist/out-tsc/src/app/core/services/units.service.js.map +1 -0
  251. package/dist/out-tsc/src/app/core/services/widget.service.js +405 -0
  252. package/dist/out-tsc/src/app/core/services/widget.service.js.map +1 -0
  253. package/dist/out-tsc/src/app/core/services/widget.service.spec.js +13 -0
  254. package/dist/out-tsc/src/app/core/services/widget.service.spec.js.map +1 -0
  255. package/dist/out-tsc/src/app/core/utils/app-overlay-container.js +30 -0
  256. package/dist/out-tsc/src/app/core/utils/app-overlay-container.js.map +1 -0
  257. package/dist/out-tsc/src/app/core/utils/base-widget.component.js +291 -0
  258. package/dist/out-tsc/src/app/core/utils/base-widget.component.js.map +1 -0
  259. package/dist/out-tsc/src/app/core/utils/base-widget.component.spec.js +88 -0
  260. package/dist/out-tsc/src/app/core/utils/base-widget.component.spec.js.map +1 -0
  261. package/dist/out-tsc/src/app/core/utils/dataScales.util.js +127 -0
  262. package/dist/out-tsc/src/app/core/utils/dataScales.util.js.map +1 -0
  263. package/dist/out-tsc/src/app/core/utils/dataTransforms.util.js +138 -0
  264. package/dist/out-tsc/src/app/core/utils/dataTransforms.util.js.map +1 -0
  265. package/dist/out-tsc/src/app/core/utils/iframe-inputs-inject.utils.js +55 -0
  266. package/dist/out-tsc/src/app/core/utils/iframe-inputs-inject.utils.js.map +1 -0
  267. package/dist/out-tsc/src/app/core/utils/svg-animate.util.js +303 -0
  268. package/dist/out-tsc/src/app/core/utils/svg-animate.util.js.map +1 -0
  269. package/dist/out-tsc/src/app/core/utils/themeColors.utils.js +34 -0
  270. package/dist/out-tsc/src/app/core/utils/themeColors.utils.js.map +1 -0
  271. package/dist/out-tsc/src/app/core/utils/uuid.util.js +17 -0
  272. package/dist/out-tsc/src/app/core/utils/uuid.util.js.map +1 -0
  273. package/dist/out-tsc/src/app/core/utils/zones-highlight.utils.js +87 -0
  274. package/dist/out-tsc/src/app/core/utils/zones-highlight.utils.js.map +1 -0
  275. package/dist/out-tsc/src/app/widget-config/boolean-control-config/boolean-control-config.component.js +49 -0
  276. package/dist/out-tsc/src/app/widget-config/boolean-control-config/boolean-control-config.component.js.map +1 -0
  277. package/dist/out-tsc/src/app/widget-config/boolean-control-config/boolean-control-config.component.spec.js +19 -0
  278. package/dist/out-tsc/src/app/widget-config/boolean-control-config/boolean-control-config.component.spec.js.map +1 -0
  279. package/dist/out-tsc/src/app/widget-config/boolean-multicontrol-options/boolean-multicontrol-options.component.js +100 -0
  280. package/dist/out-tsc/src/app/widget-config/boolean-multicontrol-options/boolean-multicontrol-options.component.js.map +1 -0
  281. package/dist/out-tsc/src/app/widget-config/boolean-multicontrol-options/boolean-multicontrol-options.component.spec.js +19 -0
  282. package/dist/out-tsc/src/app/widget-config/boolean-multicontrol-options/boolean-multicontrol-options.component.spec.js.map +1 -0
  283. package/dist/out-tsc/src/app/widget-config/dataset-chart-options/dataset-chart-options.component.js +54 -0
  284. package/dist/out-tsc/src/app/widget-config/dataset-chart-options/dataset-chart-options.component.js.map +1 -0
  285. package/dist/out-tsc/src/app/widget-config/dataset-chart-options/dataset-chart-options.component.spec.js +19 -0
  286. package/dist/out-tsc/src/app/widget-config/dataset-chart-options/dataset-chart-options.component.spec.js.map +1 -0
  287. package/dist/out-tsc/src/app/widget-config/display-chart-options/display-chart-options.component.js +89 -0
  288. package/dist/out-tsc/src/app/widget-config/display-chart-options/display-chart-options.component.js.map +1 -0
  289. package/dist/out-tsc/src/app/widget-config/display-chart-options/display-chart-options.component.spec.js +19 -0
  290. package/dist/out-tsc/src/app/widget-config/display-chart-options/display-chart-options.component.spec.js.map +1 -0
  291. package/dist/out-tsc/src/app/widget-config/display-datetime/display-datetime.component.js +1760 -0
  292. package/dist/out-tsc/src/app/widget-config/display-datetime/display-datetime.component.js.map +1 -0
  293. package/dist/out-tsc/src/app/widget-config/display-datetime/display-datetime.component.spec.js +19 -0
  294. package/dist/out-tsc/src/app/widget-config/display-datetime/display-datetime.component.spec.js.map +1 -0
  295. package/dist/out-tsc/src/app/widget-config/modal-widget-config/modal-widget-config.component.js +327 -0
  296. package/dist/out-tsc/src/app/widget-config/modal-widget-config/modal-widget-config.component.js.map +1 -0
  297. package/dist/out-tsc/src/app/widget-config/modal-widget-config/modal-widget-config.component.spec.js +21 -0
  298. package/dist/out-tsc/src/app/widget-config/modal-widget-config/modal-widget-config.component.spec.js.map +1 -0
  299. package/dist/out-tsc/src/app/widget-config/path-control-config/path-control-config.component.js +268 -0
  300. package/dist/out-tsc/src/app/widget-config/path-control-config/path-control-config.component.js.map +1 -0
  301. package/dist/out-tsc/src/app/widget-config/path-control-config/path-control-config.component.spec.js +21 -0
  302. package/dist/out-tsc/src/app/widget-config/path-control-config/path-control-config.component.spec.js.map +1 -0
  303. package/dist/out-tsc/src/app/widget-config/paths-options/paths-options.component.js +81 -0
  304. package/dist/out-tsc/src/app/widget-config/paths-options/paths-options.component.js.map +1 -0
  305. package/dist/out-tsc/src/app/widget-config/paths-options/paths-options.component.spec.js +19 -0
  306. package/dist/out-tsc/src/app/widget-config/paths-options/paths-options.component.spec.js.map +1 -0
  307. package/dist/out-tsc/src/app/widget-config/select-autopilot/select-autopilot.component.js +266 -0
  308. package/dist/out-tsc/src/app/widget-config/select-autopilot/select-autopilot.component.js.map +1 -0
  309. package/dist/out-tsc/src/app/widget-config/select-autopilot/select-autopilot.component.spec.js +19 -0
  310. package/dist/out-tsc/src/app/widget-config/select-autopilot/select-autopilot.component.spec.js.map +1 -0
  311. package/dist/out-tsc/src/app/widgets/gauge-steel/gauge-steel.component.js +309 -0
  312. package/dist/out-tsc/src/app/widgets/gauge-steel/gauge-steel.component.js.map +1 -0
  313. package/dist/out-tsc/src/app/widgets/gauge-steel/gauge-steel.component.spec.js +21 -0
  314. package/dist/out-tsc/src/app/widgets/gauge-steel/gauge-steel.component.spec.js.map +1 -0
  315. package/dist/out-tsc/src/app/widgets/minichart/minichart.component.js +512 -0
  316. package/dist/out-tsc/src/app/widgets/minichart/minichart.component.js.map +1 -0
  317. package/dist/out-tsc/src/app/widgets/minichart/minichart.component.spec.js +19 -0
  318. package/dist/out-tsc/src/app/widgets/minichart/minichart.component.spec.js.map +1 -0
  319. package/dist/out-tsc/src/app/widgets/svg-autopilot/svg-autopilot.component.js +227 -0
  320. package/dist/out-tsc/src/app/widgets/svg-autopilot/svg-autopilot.component.js.map +1 -0
  321. package/dist/out-tsc/src/app/widgets/svg-autopilot/svg-autopilot.component.spec.js +21 -0
  322. package/dist/out-tsc/src/app/widgets/svg-autopilot/svg-autopilot.component.spec.js.map +1 -0
  323. package/dist/out-tsc/src/app/widgets/svg-boolean-button/svg-boolean-button.component.js +163 -0
  324. package/dist/out-tsc/src/app/widgets/svg-boolean-button/svg-boolean-button.component.js.map +1 -0
  325. package/dist/out-tsc/src/app/widgets/svg-boolean-button/svg-boolean-button.component.spec.js +19 -0
  326. package/dist/out-tsc/src/app/widgets/svg-boolean-button/svg-boolean-button.component.spec.js.map +1 -0
  327. package/dist/out-tsc/src/app/widgets/svg-boolean-light/svg-boolean-light.component.js +97 -0
  328. package/dist/out-tsc/src/app/widgets/svg-boolean-light/svg-boolean-light.component.js.map +1 -0
  329. package/dist/out-tsc/src/app/widgets/svg-boolean-light/svg-boolean-light.component.spec.js +19 -0
  330. package/dist/out-tsc/src/app/widgets/svg-boolean-light/svg-boolean-light.component.spec.js.map +1 -0
  331. package/dist/out-tsc/src/app/widgets/svg-boolean-switch/svg-boolean-switch.component.js +122 -0
  332. package/dist/out-tsc/src/app/widgets/svg-boolean-switch/svg-boolean-switch.component.js.map +1 -0
  333. package/dist/out-tsc/src/app/widgets/svg-boolean-switch/svg-boolean-switch.component.spec.js +19 -0
  334. package/dist/out-tsc/src/app/widgets/svg-boolean-switch/svg-boolean-switch.component.spec.js.map +1 -0
  335. package/dist/out-tsc/src/app/widgets/svg-racesteer/svg-racesteer.component.js +389 -0
  336. package/dist/out-tsc/src/app/widgets/svg-racesteer/svg-racesteer.component.js.map +1 -0
  337. package/dist/out-tsc/src/app/widgets/svg-racesteer/svg-racesteer.component.spec.js +21 -0
  338. package/dist/out-tsc/src/app/widgets/svg-racesteer/svg-racesteer.component.spec.js.map +1 -0
  339. package/dist/out-tsc/src/app/widgets/svg-simple-linear-gauge/svg-simple-linear-gauge.component.js +76 -0
  340. package/dist/out-tsc/src/app/widgets/svg-simple-linear-gauge/svg-simple-linear-gauge.component.js.map +1 -0
  341. package/dist/out-tsc/src/app/widgets/svg-simple-linear-gauge/svg-simple-linear-gauge.component.spec.js +21 -0
  342. package/dist/out-tsc/src/app/widgets/svg-simple-linear-gauge/svg-simple-linear-gauge.component.spec.js.map +1 -0
  343. package/dist/out-tsc/src/app/widgets/svg-windsteer/svg-windsteer.component.js +429 -0
  344. package/dist/out-tsc/src/app/widgets/svg-windsteer/svg-windsteer.component.js.map +1 -0
  345. package/dist/out-tsc/src/app/widgets/svg-windsteer/svg-windsteer.component.spec.js +21 -0
  346. package/dist/out-tsc/src/app/widgets/svg-windsteer/svg-windsteer.component.spec.js.map +1 -0
  347. package/dist/out-tsc/src/app/widgets/widget-autopilot/widget-autopilot.component.js +1128 -0
  348. package/dist/out-tsc/src/app/widgets/widget-autopilot/widget-autopilot.component.js.map +1 -0
  349. package/dist/out-tsc/src/app/widgets/widget-autopilot/widget-autopilot.component.spec.js +21 -0
  350. package/dist/out-tsc/src/app/widgets/widget-autopilot/widget-autopilot.component.spec.js.map +1 -0
  351. package/dist/out-tsc/src/app/widgets/widget-boolean-switch/widget-boolean-switch.component.js +140 -0
  352. package/dist/out-tsc/src/app/widgets/widget-boolean-switch/widget-boolean-switch.component.js.map +1 -0
  353. package/dist/out-tsc/src/app/widgets/widget-boolean-switch/widget-boolean-switch.component.spec.js +19 -0
  354. package/dist/out-tsc/src/app/widgets/widget-boolean-switch/widget-boolean-switch.component.spec.js.map +1 -0
  355. package/dist/out-tsc/src/app/widgets/widget-data-chart/widget-data-chart.component.js +678 -0
  356. package/dist/out-tsc/src/app/widgets/widget-data-chart/widget-data-chart.component.js.map +1 -0
  357. package/dist/out-tsc/src/app/widgets/widget-data-chart/widget-data-chart.component.spec.js +19 -0
  358. package/dist/out-tsc/src/app/widgets/widget-data-chart/widget-data-chart.component.spec.js.map +1 -0
  359. package/dist/out-tsc/src/app/widgets/widget-datetime/widget-datetime.component.js +177 -0
  360. package/dist/out-tsc/src/app/widgets/widget-datetime/widget-datetime.component.js.map +1 -0
  361. package/dist/out-tsc/src/app/widgets/widget-datetime/widget-datetime.component.spec.js +21 -0
  362. package/dist/out-tsc/src/app/widgets/widget-datetime/widget-datetime.component.spec.js.map +1 -0
  363. package/dist/out-tsc/src/app/widgets/widget-freeboardsk/widget-freeboardsk.component.js +146 -0
  364. package/dist/out-tsc/src/app/widgets/widget-freeboardsk/widget-freeboardsk.component.js.map +1 -0
  365. package/dist/out-tsc/src/app/widgets/widget-freeboardsk/widget-freeboardsk.component.spec.js +19 -0
  366. package/dist/out-tsc/src/app/widgets/widget-freeboardsk/widget-freeboardsk.component.spec.js.map +1 -0
  367. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-compass/widget-gauge-ng-compass.component.js +301 -0
  368. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-compass/widget-gauge-ng-compass.component.js.map +1 -0
  369. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-compass/widget-gauge-ng-compass.component.spec.js +19 -0
  370. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-compass/widget-gauge-ng-compass.component.spec.js.map +1 -0
  371. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-linear/widget-gauge-ng-linear.component.js +413 -0
  372. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-linear/widget-gauge-ng-linear.component.js.map +1 -0
  373. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-linear/widget-gauge-ng-linear.component.spec.js +21 -0
  374. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-linear/widget-gauge-ng-linear.component.spec.js.map +1 -0
  375. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.js +360 -0
  376. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.js.map +1 -0
  377. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.spec.js +21 -0
  378. package/dist/out-tsc/src/app/widgets/widget-gauge-ng-radial/widget-gauge-ng-radial.component.spec.js.map +1 -0
  379. package/dist/out-tsc/src/app/widgets/widget-gauge-steel/widget-gauge-steel.component.js +119 -0
  380. package/dist/out-tsc/src/app/widgets/widget-gauge-steel/widget-gauge-steel.component.js.map +1 -0
  381. package/dist/out-tsc/src/app/widgets/widget-gauge-steel/widget-gauge-steel.component.spec.js +21 -0
  382. package/dist/out-tsc/src/app/widgets/widget-gauge-steel/widget-gauge-steel.component.spec.js.map +1 -0
  383. package/dist/out-tsc/src/app/widgets/widget-heel-gauge/widget-heel-gauge.component.js +205 -0
  384. package/dist/out-tsc/src/app/widgets/widget-heel-gauge/widget-heel-gauge.component.js.map +1 -0
  385. package/dist/out-tsc/src/app/widgets/widget-heel-gauge/widget-heel-gauge.component.spec.js +15 -0
  386. package/dist/out-tsc/src/app/widgets/widget-heel-gauge/widget-heel-gauge.component.spec.js.map +1 -0
  387. package/dist/out-tsc/src/app/widgets/widget-horizon/widget-horizon.component.js +196 -0
  388. package/dist/out-tsc/src/app/widgets/widget-horizon/widget-horizon.component.js.map +1 -0
  389. package/dist/out-tsc/src/app/widgets/widget-horizon/widget-horizon.component.spec.js +21 -0
  390. package/dist/out-tsc/src/app/widgets/widget-horizon/widget-horizon.component.spec.js.map +1 -0
  391. package/dist/out-tsc/src/app/widgets/widget-iframe/widget-iframe.component.js +173 -0
  392. package/dist/out-tsc/src/app/widgets/widget-iframe/widget-iframe.component.js.map +1 -0
  393. package/dist/out-tsc/src/app/widgets/widget-iframe/widget-iframe.component.spec.js +21 -0
  394. package/dist/out-tsc/src/app/widgets/widget-iframe/widget-iframe.component.spec.js.map +1 -0
  395. package/dist/out-tsc/src/app/widgets/widget-label/widget-label.component.js +128 -0
  396. package/dist/out-tsc/src/app/widgets/widget-label/widget-label.component.js.map +1 -0
  397. package/dist/out-tsc/src/app/widgets/widget-label/widget-label.component.spec.js +19 -0
  398. package/dist/out-tsc/src/app/widgets/widget-label/widget-label.component.spec.js.map +1 -0
  399. package/dist/out-tsc/src/app/widgets/widget-login/login.component.spec.js +21 -0
  400. package/dist/out-tsc/src/app/widgets/widget-login/login.component.spec.js.map +1 -0
  401. package/dist/out-tsc/src/app/widgets/widget-login/widget-login.component.js +78 -0
  402. package/dist/out-tsc/src/app/widgets/widget-login/widget-login.component.js.map +1 -0
  403. package/dist/out-tsc/src/app/widgets/widget-numeric/widget-numeric.component.js +303 -0
  404. package/dist/out-tsc/src/app/widgets/widget-numeric/widget-numeric.component.js.map +1 -0
  405. package/dist/out-tsc/src/app/widgets/widget-numeric/widget-numeric.spec.js +21 -0
  406. package/dist/out-tsc/src/app/widgets/widget-numeric/widget-numeric.spec.js.map +1 -0
  407. package/dist/out-tsc/src/app/widgets/widget-position/widget-position.component.js +177 -0
  408. package/dist/out-tsc/src/app/widgets/widget-position/widget-position.component.js.map +1 -0
  409. package/dist/out-tsc/src/app/widgets/widget-position/widget-position.component.spec.js +21 -0
  410. package/dist/out-tsc/src/app/widgets/widget-position/widget-position.component.spec.js.map +1 -0
  411. package/dist/out-tsc/src/app/widgets/widget-race-timer/widget-race-timer.component.js +275 -0
  412. package/dist/out-tsc/src/app/widgets/widget-race-timer/widget-race-timer.component.js.map +1 -0
  413. package/dist/out-tsc/src/app/widgets/widget-race-timer/widget-race-timer.component.spec.js +21 -0
  414. package/dist/out-tsc/src/app/widgets/widget-race-timer/widget-race-timer.component.spec.js.map +1 -0
  415. package/dist/out-tsc/src/app/widgets/widget-racer-line/widget-racer-line.component.js +319 -0
  416. package/dist/out-tsc/src/app/widgets/widget-racer-line/widget-racer-line.component.js.map +1 -0
  417. package/dist/out-tsc/src/app/widgets/widget-racer-line/widget-racer-line.component.spec.js +21 -0
  418. package/dist/out-tsc/src/app/widgets/widget-racer-line/widget-racer-line.component.spec.js.map +1 -0
  419. package/dist/out-tsc/src/app/widgets/widget-racer-timer/widget-racer-timer.component.js +365 -0
  420. package/dist/out-tsc/src/app/widgets/widget-racer-timer/widget-racer-timer.component.js.map +1 -0
  421. package/dist/out-tsc/src/app/widgets/widget-racer-timer/widget-racer-timer.component.spec.js +21 -0
  422. package/dist/out-tsc/src/app/widgets/widget-racer-timer/widget-racer-timer.component.spec.js.map +1 -0
  423. package/dist/out-tsc/src/app/widgets/widget-racesteer/widget-racesteer.component.js +321 -0
  424. package/dist/out-tsc/src/app/widgets/widget-racesteer/widget-racesteer.component.js.map +1 -0
  425. package/dist/out-tsc/src/app/widgets/widget-racesteer/widget-racesteer.component.spec.js +21 -0
  426. package/dist/out-tsc/src/app/widgets/widget-racesteer/widget-racesteer.component.spec.js.map +1 -0
  427. package/dist/out-tsc/src/app/widgets/widget-simple-linear/widget-simple-linear.component.js +189 -0
  428. package/dist/out-tsc/src/app/widgets/widget-simple-linear/widget-simple-linear.component.js.map +1 -0
  429. package/dist/out-tsc/src/app/widgets/widget-simple-linear/widget-simple-linear.component.spec.js +21 -0
  430. package/dist/out-tsc/src/app/widgets/widget-simple-linear/widget-simple-linear.component.spec.js.map +1 -0
  431. package/dist/out-tsc/src/app/widgets/widget-slider/widget-slider.component.js +248 -0
  432. package/dist/out-tsc/src/app/widgets/widget-slider/widget-slider.component.js.map +1 -0
  433. package/dist/out-tsc/src/app/widgets/widget-slider/widget-slider.component.spec.js +19 -0
  434. package/dist/out-tsc/src/app/widgets/widget-slider/widget-slider.component.spec.js.map +1 -0
  435. package/dist/out-tsc/src/app/widgets/widget-text/widget-text.component.js +138 -0
  436. package/dist/out-tsc/src/app/widgets/widget-text/widget-text.component.js.map +1 -0
  437. package/dist/out-tsc/src/app/widgets/widget-text/widget-text.component.spec.js +21 -0
  438. package/dist/out-tsc/src/app/widgets/widget-text/widget-text.component.spec.js.map +1 -0
  439. package/dist/out-tsc/src/app/widgets/widget-tutorial/widget-tutorial.component.js +43 -0
  440. package/dist/out-tsc/src/app/widgets/widget-tutorial/widget-tutorial.component.js.map +1 -0
  441. package/dist/out-tsc/src/app/widgets/widget-tutorial/widget-tutorial.component.spec.js +21 -0
  442. package/dist/out-tsc/src/app/widgets/widget-tutorial/widget-tutorial.component.spec.js.map +1 -0
  443. package/dist/out-tsc/src/app/widgets/widget-windsteer/widget-windsteer.component.js +483 -0
  444. package/dist/out-tsc/src/app/widgets/widget-windsteer/widget-windsteer.component.js.map +1 -0
  445. package/dist/out-tsc/src/app/widgets/widget-windsteer/widget-windsteer.component.spec.js +21 -0
  446. package/dist/out-tsc/src/app/widgets/widget-windsteer/widget-windsteer.component.spec.js.map +1 -0
  447. package/dist/out-tsc/src/app/widgets/widget-windtrends-chart/widget-windtrends-chart.component.js +1067 -0
  448. package/dist/out-tsc/src/app/widgets/widget-windtrends-chart/widget-windtrends-chart.component.js.map +1 -0
  449. package/dist/out-tsc/src/app/widgets/widget-windtrends-chart/widget-windtrends-chart.component.spec.js +19 -0
  450. package/dist/out-tsc/src/app/widgets/widget-windtrends-chart/widget-windtrends-chart.component.spec.js.map +1 -0
  451. package/dist/out-tsc/src/default-config/config.blank.const.js +35 -0
  452. package/dist/out-tsc/src/default-config/config.blank.const.js.map +1 -0
  453. package/dist/out-tsc/src/default-config/config.blank.notification.const.js +22 -0
  454. package/dist/out-tsc/src/default-config/config.blank.notification.const.js.map +1 -0
  455. package/dist/out-tsc/src/default-config/config.blank.units.const.js +24 -0
  456. package/dist/out-tsc/src/default-config/config.blank.units.const.js.map +1 -0
  457. package/dist/out-tsc/src/default-config/config.demo.const.js +739 -0
  458. package/dist/out-tsc/src/default-config/config.demo.const.js.map +1 -0
  459. package/dist/out-tsc/src/environments/environment.js +8 -0
  460. package/dist/out-tsc/src/environments/environment.js.map +1 -0
  461. package/dist/out-tsc/src/environments/environment.prod.js +4 -0
  462. package/dist/out-tsc/src/environments/environment.prod.js.map +1 -0
  463. package/dist/out-tsc/src/main.js +111 -0
  464. package/dist/out-tsc/src/main.js.map +1 -0
  465. package/dist/out-tsc/src/polyfills.js +67 -0
  466. package/dist/out-tsc/src/polyfills.js.map +1 -0
  467. package/dist/out-tsc/src/test-setup.js +1 -0
  468. package/dist/out-tsc/src/test-setup.js.map +1 -0
  469. package/dist/out-tsc/src/test-shims/steelseries-shim.js +44 -0
  470. package/dist/out-tsc/src/test-shims/steelseries-shim.js.map +1 -0
  471. package/dist/out-tsc/src/test.js +84 -0
  472. package/dist/out-tsc/src/test.js.map +1 -0
  473. package/images/ActionSidenav.png +0 -0
  474. package/images/KipBrightness-1024.png +0 -0
  475. package/images/KipNightMode-1024.png +0 -0
  476. package/images/Options.png +0 -0
  477. package/images/exterior_user_installs.png +0 -0
  478. package/package.json +1 -1
  479. package/plugin/index.js +2 -1
  480. package/public/{chunk-YPVFGYWU.js → chunk-4APSKT6I.js} +1 -1
  481. package/public/{chunk-CCEKSCJH.js → chunk-HHR4WMHS.js} +1 -1
  482. package/public/{chunk-TTNX7JB6.js → chunk-JDDRJMPN.js} +1 -1
  483. package/public/{chunk-TSNRNW3D.js → chunk-MRF22PVK.js} +1 -1
  484. package/public/{chunk-G5U7W6LL.js → chunk-RNSD64U3.js} +1 -1
  485. package/public/index.html +1 -1
  486. package/public/{main-JN6ENHFX.js → main-5QLZ4ZUU.js} +2 -2
@@ -0,0 +1,1067 @@
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, ElementRef, viewChild, inject, effect, NgZone } from '@angular/core';
11
+ import { BaseWidgetComponent } from '../../core/utils/base-widget.component';
12
+ import { WidgetHostComponent } from '../../core/components/widget-host/widget-host.component';
13
+ import { DatasetService } from '../../core/services/data-set.service';
14
+ import { CanvasService } from '../../core/services/canvas.service';
15
+ import { Chart, TimeScale, LinearScale, LineController, PointElement, LineElement, Filler, Title, SubTitle } from 'chart.js';
16
+ import 'chartjs-adapter-date-fns';
17
+ Chart.register(TimeScale, LinearScale, LineController, PointElement, LineElement, Filler, Title, SubTitle);
18
+ let WidgetWindTrendsChartComponent = class WidgetWindTrendsChartComponent extends BaseWidgetComponent {
19
+ ngZone = inject(NgZone);
20
+ _dataset = inject(DatasetService);
21
+ canvasService = inject(CanvasService);
22
+ widgetDataChart = viewChild('widgetDataChart', { read: ElementRef });
23
+ lineChartData = {
24
+ datasets: []
25
+ };
26
+ lineChartOptions = {
27
+ parsing: false,
28
+ datasets: {
29
+ line: {
30
+ pointRadius: 0,
31
+ pointHoverRadius: 0,
32
+ tension: 0.3,
33
+ }
34
+ },
35
+ animations: {
36
+ tension: {
37
+ easing: "easeInOutCubic"
38
+ }
39
+ }
40
+ };
41
+ lineChartType = 'line';
42
+ chart;
43
+ _dsDirectionSub = null;
44
+ _dsSpeedSub = null;
45
+ datasetConfig = null;
46
+ dataSourceInfo = null;
47
+ xCenter = null;
48
+ xStep = null;
49
+ xCenterSpeed = null;
50
+ xStepSpeed = null;
51
+ // Visual constants
52
+ CENTER_LINE_WIDTH = 4;
53
+ GRID_LINE_WIDTH = 1;
54
+ EDGE_EXTEND_UP_PX = 42; // extension height above top scale
55
+ EDGE_SPEED_LABEL_OFFSET = 5; // px left shift for rightmost speed label
56
+ EDGE_DIR_LABEL_OFFSET = 5; // px right shift for leftmost direction label
57
+ TICK_LABEL_FONT_SIZE = 20;
58
+ CENTER_LABEL_FONT_SIZE = 22;
59
+ SPEED_VALUE_FONT_SIZE = 62;
60
+ TOP_VALUE_Y_OFFSET = 62; // px above area.top for big top values
61
+ TOP_UNIT_Y_OFFSET = 51; // px above area.top for units
62
+ UNIT_FONT_SIZE = 28;
63
+ UNIT_PADDING = 8; // px between speed value and 'kts'
64
+ // Helper: robust near-equality to avoid suppressing non-target ticks
65
+ nearlyEqual(a, b, eps = 1e-6) {
66
+ if (!Number.isFinite(a) || !Number.isFinite(b))
67
+ return false;
68
+ const scale = Math.max(1, Math.max(Math.abs(a), Math.abs(b)));
69
+ return Math.abs(a - b) <= eps * scale;
70
+ }
71
+ // Helper: resolve tick color from scale ticks.color (string or function)
72
+ resolveTickColor(chart, scale, tickValue) {
73
+ const ticksOpt = scale.options.ticks;
74
+ const col = ticksOpt?.color;
75
+ if (typeof col === 'function') {
76
+ const resolved = col({ chart, scale, tick: { value: tickValue } });
77
+ return resolved ?? Chart.defaults.color;
78
+ }
79
+ return typeof col === 'string' ? col : Chart.defaults.color;
80
+ }
81
+ // Helper: y position for top scale labels relative to an axis scale
82
+ axisTopLabelY(scale) {
83
+ const pos = scale.options?.position;
84
+ return pos === 'top' ? (scale.top + 4) : (scale.bottom + 2);
85
+ }
86
+ // Paint background under grid lines (chartArea only) so it appears beneath grids
87
+ gridBackgroundPlugin = {
88
+ id: 'xSpeedGridBackground',
89
+ beforeDraw: (chart) => {
90
+ const area = chart.chartArea;
91
+ if (!area)
92
+ return;
93
+ const ctx = chart.ctx;
94
+ const theme = this.theme();
95
+ ctx.save();
96
+ ctx.globalCompositeOperation = 'destination-over';
97
+ ctx.fillStyle = theme.background;
98
+ // Fill exactly the plotting area where grid lines are drawn
99
+ ctx.fillRect(area.left, area.top, area.width / 2, area.height);
100
+ ctx.restore();
101
+ }
102
+ };
103
+ centerTickPlugin = {
104
+ id: 'centerTickStyle',
105
+ afterDraw: (chart) => {
106
+ const ctx = chart.ctx;
107
+ const area = chart.chartArea;
108
+ const theme = this.theme();
109
+ const chartColors = this.getThemeColors();
110
+ const def = Chart.defaults.font;
111
+ const scaleMap = chart.scales;
112
+ const optScales = chart.options?.scales;
113
+ // Loading overlay flag; do not skip drawings so all lines are visible on load
114
+ const dirVals = chart.data?.datasets?.[0]?.data;
115
+ const spdVals = chart.data?.datasets?.[5]?.data;
116
+ const ready = (dirVals?.length ?? 0) >= 2 && (spdVals?.length ?? 0) >= 2;
117
+ const drawForAxis = (axisKey, format) => {
118
+ const scale = scaleMap?.[axisKey];
119
+ const scales = optScales;
120
+ if (!scale)
121
+ return;
122
+ // Use configured min/max if present, else fall back to built scale bounds
123
+ const sAny = scale;
124
+ const min = scales?.[axisKey]?.min ?? sAny.min;
125
+ const max = scales?.[axisKey]?.max ?? sAny.max;
126
+ if (typeof min !== 'number' || typeof max !== 'number' || !isFinite(min) || !isFinite(max))
127
+ return;
128
+ const center = (min + max) / 2;
129
+ const px = scale.getPixelForValue(center);
130
+ ctx.save();
131
+ // Center guideline for the given axis
132
+ ctx.strokeStyle = theme.contrastDim;
133
+ ctx.lineWidth = this.CENTER_LINE_WIDTH;
134
+ ctx.beginPath();
135
+ ctx.moveTo(px, area.top);
136
+ ctx.lineTo(px, area.bottom);
137
+ ctx.stroke();
138
+ ctx.restore();
139
+ ctx.save();
140
+ ctx.fillStyle = theme.contrastDim;
141
+ ctx.font = `bold ${this.CENTER_LABEL_FONT_SIZE}px ${def.family}`;
142
+ ctx.textAlign = 'center';
143
+ ctx.textBaseline = 'top';
144
+ const y = this.axisTopLabelY(scale);
145
+ ctx.fillText(format(center), px, y);
146
+ ctx.restore();
147
+ };
148
+ drawForAxis('x', (v) => `${(((v % 360) + 360) % 360).toFixed(0)}°`);
149
+ drawForAxis('xSpeed', (v) => `${v.toFixed(1)}`);
150
+ // Draw xSpeed rightmost tick label shifted slightly left (custom label)
151
+ const xSpeedScale = scaleMap?.['xSpeed'];
152
+ if (xSpeedScale) {
153
+ const scales = optScales;
154
+ const sAny = xSpeedScale;
155
+ const xmax = scales?.['xSpeed']?.max ?? sAny.max;
156
+ if (typeof xmax === 'number' && isFinite(xmax)) {
157
+ const px = xSpeedScale.getPixelForValue(xmax);
158
+ ctx.save();
159
+ // Match tick label color for xSpeed axis
160
+ ctx.fillStyle = this.resolveTickColor(chart, xSpeedScale, xmax);
161
+ ctx.font = `normal ${this.TICK_LABEL_FONT_SIZE}px ${def.family}`;
162
+ ctx.textAlign = 'right';
163
+ ctx.textBaseline = 'top';
164
+ const y = this.axisTopLabelY(xSpeedScale);
165
+ const step = this.xStepSpeed ?? 1;
166
+ const dp = Math.max(0, Math.min(3, Math.ceil(-Math.log10(step))));
167
+ ctx.fillText(`${xmax.toFixed(dp)}`, px - this.EDGE_SPEED_LABEL_OFFSET, y);
168
+ ctx.restore();
169
+ // Extend the rightmost xSpeed tick vertical line 10px above the top time scale line
170
+ ctx.save();
171
+ ctx.strokeStyle = theme.contrastDim;
172
+ ctx.lineWidth = this.GRID_LINE_WIDTH;
173
+ ctx.beginPath();
174
+ const xLine = Math.round(px) + 0.5;
175
+ ctx.moveTo(xLine, area.bottom);
176
+ ctx.lineTo(xLine, area.top - this.EDGE_EXTEND_UP_PX);
177
+ ctx.stroke();
178
+ ctx.restore();
179
+ }
180
+ }
181
+ // Draw x leftmost tick label shifted slightly right (custom label)
182
+ const xScale = scaleMap?.['x'];
183
+ if (xScale) {
184
+ const scales = optScales;
185
+ const sAny = xScale;
186
+ const xmin = scales?.['x']?.min ?? sAny.min;
187
+ if (typeof xmin === 'number' && isFinite(xmin)) {
188
+ const px = xScale.getPixelForValue(xmin);
189
+ ctx.save();
190
+ // Match tick label color for x axis
191
+ ctx.fillStyle = this.resolveTickColor(chart, xScale, xmin);
192
+ ctx.font = `normal ${this.TICK_LABEL_FONT_SIZE}px ${def.family}`;
193
+ ctx.textAlign = 'left';
194
+ ctx.textBaseline = 'top';
195
+ const y = this.axisTopLabelY(xScale);
196
+ const wrapped = this.normalizeAngle(xmin);
197
+ ctx.fillText(`${wrapped.toFixed(0)}°`, px + this.EDGE_DIR_LABEL_OFFSET, y);
198
+ ctx.restore();
199
+ }
200
+ }
201
+ // Top-right speed value
202
+ const ds = chart.data?.datasets;
203
+ const speedVal = ds?.[5]?.data; // first speed dataset index (see dataset order)
204
+ const last = speedVal?.length ? speedVal.length - 1 : -1;
205
+ const lastSpeed = last >= 0 ? speedVal[last]?.x : undefined;
206
+ if (typeof lastSpeed === 'number' && isFinite(lastSpeed)) {
207
+ ctx.save();
208
+ ctx.fillStyle = chartColors.chartValue;
209
+ // Draw speed value centered
210
+ ctx.font = `bold ${this.SPEED_VALUE_FONT_SIZE}px ${def.family}`;
211
+ ctx.textAlign = 'center';
212
+ ctx.textBaseline = 'middle';
213
+ const speedText = `${lastSpeed.toFixed(1)}`;
214
+ const speedX = area.left + (area.width / 4);
215
+ const speedY = area.top - this.TOP_VALUE_Y_OFFSET;
216
+ ctx.fillText(speedText, speedX, speedY);
217
+ // Measure speed text to place unit right after it
218
+ const metrics = ctx.measureText(speedText);
219
+ const unitX = speedX + (metrics.width / 2) + this.UNIT_PADDING;
220
+ const unitY = area.top - this.TOP_UNIT_Y_OFFSET;
221
+ ctx.font = `bold ${this.UNIT_FONT_SIZE}px ${def.family}`;
222
+ ctx.textAlign = 'left';
223
+ ctx.fillText('kts', unitX, unitY);
224
+ ctx.restore();
225
+ }
226
+ // Top direction value
227
+ const dirVal = ds?.[0]?.data; // first direction dataset index
228
+ const lastDirIdx = dirVal?.length ? dirVal.length - 1 : -1;
229
+ const lastDir = lastDirIdx >= 0 ? dirVal[lastDirIdx]?.x : undefined;
230
+ if (typeof lastDir === 'number' && isFinite(lastDir)) {
231
+ const dir = this.normalizeAngle(lastDir);
232
+ ctx.save();
233
+ ctx.fillStyle = chartColors.chartValue;
234
+ ctx.font = `bold ${this.SPEED_VALUE_FONT_SIZE}px ${def.family}`;
235
+ ctx.textAlign = 'center';
236
+ ctx.textBaseline = 'middle';
237
+ ctx.fillText(`${dir.toFixed(0)}°`, area.left + (3 * area.width / 4), area.top - this.TOP_VALUE_Y_OFFSET);
238
+ ctx.restore();
239
+ }
240
+ // Draw loading overlay box/text visible above background; keep lines visible via semi-transparent fill
241
+ if (!ready) {
242
+ const boxW = Math.min(area.width * 0.7, 420);
243
+ const boxH = 90;
244
+ const x = area.left + (area.width - boxW) / 2;
245
+ const y = area.top + (area.height - boxH) / 2;
246
+ // Background with slight transparency so lines remain visible
247
+ ctx.save();
248
+ ctx.globalAlpha = 0.82;
249
+ ctx.fillStyle = theme.background;
250
+ ctx.fillRect(x, y, boxW, boxH);
251
+ ctx.restore();
252
+ // Border on top
253
+ ctx.save();
254
+ ctx.strokeStyle = theme.contrastDim;
255
+ ctx.lineWidth = 2;
256
+ ctx.strokeRect(x, y, boxW, boxH);
257
+ ctx.restore();
258
+ // Text over everything
259
+ ctx.save();
260
+ ctx.fillStyle = this.getThemeColors().chartLabel;
261
+ ctx.textAlign = 'center';
262
+ ctx.textBaseline = 'middle';
263
+ ctx.font = `bold 18px ${def.family}`;
264
+ ctx.fillText('Data acquisition...', x + boxW / 2, y + boxH / 2);
265
+ ctx.restore();
266
+ }
267
+ }
268
+ };
269
+ constructor() {
270
+ super();
271
+ this.defaultConfig = {
272
+ filterSelfPaths: true,
273
+ color: "contrast",
274
+ timeScale: "Last 30 Minutes"
275
+ };
276
+ effect(() => {
277
+ if (this.theme()) {
278
+ if (this.datasetConfig) {
279
+ this.setChartOptions();
280
+ this.setDatasetsColors();
281
+ }
282
+ }
283
+ });
284
+ }
285
+ ngOnInit() {
286
+ this.validateConfig();
287
+ this.createServiceDataset();
288
+ }
289
+ ngAfterViewInit() {
290
+ this.startWidget();
291
+ }
292
+ startWidget() {
293
+ this.datasetConfig = this._dataset.getDatasetConfig(`${this.widgetProperties.uuid}-twd`);
294
+ this.dataSourceInfo = this._dataset.getDataSourceInfo(`${this.widgetProperties.uuid}-twd`);
295
+ if (this.datasetConfig) {
296
+ this.createDatasets();
297
+ this.setChartOptions();
298
+ if (!this.chart) {
299
+ this.chart = new Chart(this.widgetDataChart().nativeElement.getContext('2d'), {
300
+ type: this.lineChartType,
301
+ data: this.lineChartData,
302
+ options: this.lineChartOptions,
303
+ plugins: [this.gridBackgroundPlugin, this.centerTickPlugin]
304
+ });
305
+ // Render once so initial axes and plugin drawings appear before data
306
+ this.ngZone.runOutsideAngular(() => {
307
+ this.chart?.update();
308
+ });
309
+ }
310
+ else {
311
+ this.ngZone.runOutsideAngular(() => {
312
+ this.chart?.update('quiet');
313
+ });
314
+ }
315
+ this.startStreaming();
316
+ }
317
+ }
318
+ updateConfig(config) {
319
+ this.widgetProperties.config = config;
320
+ // remove dataset if they exists and recreate
321
+ if (this._dataset.list().filter(ds => ds.uuid === `${this.widgetProperties.uuid}-twd`).length > 0) {
322
+ this._dataset.remove(`${this.widgetProperties.uuid}-twd`);
323
+ }
324
+ if (this._dataset.list().filter(ds => ds.uuid === `${this.widgetProperties.uuid}-tws`).length > 0) {
325
+ this._dataset.remove(`${this.widgetProperties.uuid}-tws`);
326
+ }
327
+ this.createServiceDataset();
328
+ this.startWidget();
329
+ }
330
+ createServiceDataset() {
331
+ if (this.widgetProperties.config.timeScale === '')
332
+ return;
333
+ const pathDirection = "self.environment.wind.directionTrue";
334
+ const pathSpeed = "self.environment.wind.speedTrue";
335
+ const source = "default";
336
+ // Create datasets if it does not exist
337
+ if (this._dataset.list().filter(ds => ds.uuid === `${this.widgetProperties.uuid}-twd`).length === 0) {
338
+ this._dataset.create(pathDirection, source, this.widgetProperties.config.timeScale, 30, `windtrends-${this.widgetProperties.uuid}`, true, false, `${this.widgetProperties.uuid}-twd`);
339
+ }
340
+ if (this._dataset.list().filter(ds => ds.uuid === `${this.widgetProperties.uuid}-tws`).length === 0) {
341
+ this._dataset.create(pathSpeed, source, this.widgetProperties.config.timeScale, 30, `speedtrends-${this.widgetProperties.uuid}`, true, false, `${this.widgetProperties.uuid}-tws`);
342
+ }
343
+ }
344
+ setChartOptions() {
345
+ this.lineChartOptions.maintainAspectRatio = false;
346
+ this.lineChartOptions.animation = false;
347
+ this.lineChartOptions.indexAxis = 'y';
348
+ // Provide initial x (direction) range so ticks/center line render before data arrives
349
+ const xDefaultMin = 0;
350
+ const xDefaultMax = 360;
351
+ const xDefaultStep = (xDefaultMax - xDefaultMin) / 4; // 5 ticks
352
+ // Provide initial xSpeed (knots) range as well
353
+ const xsDefaultMin = 0;
354
+ const xsDefaultMax = 20;
355
+ const xsDefaultStep = (xsDefaultMax - xsDefaultMin) / 4; // 5 ticks
356
+ this.lineChartOptions.scales = {
357
+ y: {
358
+ type: "linear",
359
+ display: true,
360
+ position: "right",
361
+ reverse: true, // 0 (now) at top; older increases downward
362
+ title: {
363
+ display: true,
364
+ text: `${this.datasetConfig.timeScaleFormat}`,
365
+ align: "center"
366
+ },
367
+ ticks: {
368
+ count: 6, // 6 lines including start/end
369
+ autoSkip: false,
370
+ includeBounds: true,
371
+ align: 'inner',
372
+ major: { enabled: true },
373
+ font: { size: 16 },
374
+ callback: (value) => {
375
+ const ms = Number(value);
376
+ const fmt = this.datasetConfig?.timeScaleFormat;
377
+ const windowMs = this.getWindowMs(fmt);
378
+ // 5-minute scale: show whole minutes
379
+ if (fmt === 'Last 5 Minutes') {
380
+ const m = Math.round(ms / 60_000);
381
+ return `${m}'`;
382
+ }
383
+ // >= 10 minutes → minutes; else seconds
384
+ if (windowMs >= 10 * 60_000) {
385
+ const m = Math.round(ms / 60_000);
386
+ return `${m}'`;
387
+ }
388
+ const s = Math.round(ms / 1000);
389
+ return `${s}"`;
390
+ }
391
+ },
392
+ grid: {
393
+ display: true,
394
+ color: this.theme().contrastDimmer
395
+ }
396
+ },
397
+ x: {
398
+ type: "linear",
399
+ position: "top",
400
+ stack: 'trends',
401
+ beginAtZero: false,
402
+ bounds: 'ticks',
403
+ min: xDefaultMin,
404
+ max: xDefaultMax,
405
+ // min/max will be set dynamically in updateChartAfterDataChange
406
+ title: { display: false },
407
+ ticks: {
408
+ count: 5,
409
+ align: 'inner',
410
+ autoSkip: false,
411
+ includeBounds: true,
412
+ stepSize: xDefaultStep,
413
+ minRotation: 0,
414
+ maxRotation: 0,
415
+ callback: (value) => {
416
+ // Hide the default center tick label; plugin will draw a bold themed label there
417
+ const center = this.xCenter ?? Number.NaN;
418
+ if (this.nearlyEqual(value, center))
419
+ return '';
420
+ // Hide leftmost label (at min) to avoid overlap with custom shifted label
421
+ const scales = this.chart?.options?.scales;
422
+ const minOpt = scales?.x?.min;
423
+ if (typeof minOpt === 'number' && this.nearlyEqual(value, minOpt))
424
+ return '';
425
+ const wrapped = ((value % 360 + 360) % 360);
426
+ return `${wrapped.toFixed(0)}°`;
427
+ },
428
+ // Make the center tick bold and themed using precomputed midpoint/step
429
+ font: (ctx) => {
430
+ const tickVal = ctx.tick?.value ?? Number.NaN;
431
+ const center = this.xCenter ?? Number.NaN;
432
+ const isCenter = this.nearlyEqual(tickVal, center);
433
+ return { size: 20, weight: isCenter ? 'bold' : 'normal' };
434
+ },
435
+ color: (ctx) => {
436
+ const tickVal = ctx.tick?.value ?? Number.NaN;
437
+ const center = this.xCenter ?? Number.NaN;
438
+ const isCenter = this.nearlyEqual(tickVal, center);
439
+ return isCenter ? this.theme().contrast : undefined;
440
+ },
441
+ },
442
+ grid: {
443
+ display: true,
444
+ color: (ctx) => {
445
+ const tickVal = ctx.tick?.value ?? Number.NaN;
446
+ const scale = ctx.scale;
447
+ const scales = this.chart?.options?.scales;
448
+ const sAny = scale;
449
+ const min = scales?.x?.min ?? sAny.min;
450
+ const isMin = this.nearlyEqual(tickVal, min);
451
+ return isMin ? 'rgba(0,0,0,0)' : this.theme().contrastDimmer;
452
+ },
453
+ lineWidth: 1
454
+ }
455
+ },
456
+ xSpeed: {
457
+ type: "linear",
458
+ position: "top",
459
+ stack: 'trends',
460
+ beginAtZero: false,
461
+ bounds: 'ticks',
462
+ min: xsDefaultMin,
463
+ max: xsDefaultMax,
464
+ title: { display: false },
465
+ ticks: {
466
+ count: 5,
467
+ align: 'inner',
468
+ autoSkip: false,
469
+ includeBounds: true,
470
+ stepSize: xsDefaultStep,
471
+ minRotation: 0,
472
+ maxRotation: 0,
473
+ callback: (value) => {
474
+ const center = this.xCenterSpeed ?? Number.NaN;
475
+ if (this.nearlyEqual(value, center))
476
+ return '';
477
+ // Hide rightmost label (at max) to avoid overlap with custom shifted label
478
+ const scales = this.chart?.options?.scales;
479
+ const maxOpt = scales?.xSpeed?.max;
480
+ if (typeof maxOpt === 'number' && this.nearlyEqual(value, maxOpt))
481
+ return '';
482
+ // Derive decimals from step so adjacent ticks remain distinct
483
+ const stepS = this.xStepSpeed ?? Number.NaN;
484
+ const s = Number.isFinite(stepS) ? stepS : 1;
485
+ const dp = Math.max(0, Math.min(3, Math.ceil(-Math.log10(s))));
486
+ return `${value.toFixed(dp)}`;
487
+ },
488
+ font: (ctx) => {
489
+ const tickVal = ctx.tick?.value ?? Number.NaN;
490
+ const center = this.xCenterSpeed ?? Number.NaN;
491
+ const isCenter = this.nearlyEqual(tickVal, center);
492
+ return { size: 20, weight: isCenter ? 'bold' : 'normal' };
493
+ },
494
+ color: (ctx) => {
495
+ const tickVal = ctx.tick?.value ?? Number.NaN;
496
+ const center = this.xCenterSpeed ?? Number.NaN;
497
+ const isCenter = this.nearlyEqual(tickVal, center);
498
+ return isCenter ? this.theme().contrast : undefined;
499
+ },
500
+ },
501
+ grid: {
502
+ display: true,
503
+ color: (ctx) => {
504
+ const tickVal = ctx.tick?.value ?? Number.NaN;
505
+ const scale = ctx.scale;
506
+ const scales = this.chart?.options?.scales;
507
+ const sAny = scale;
508
+ const max = scales?.xSpeed?.max ?? sAny.max;
509
+ const isMax = this.nearlyEqual(tickVal, max);
510
+ return isMax ? 'rgba(0,0,0,0)' : this.theme().contrastDimmer;
511
+ },
512
+ lineWidth: 1
513
+ }
514
+ }
515
+ };
516
+ this.lineChartOptions.plugins = {
517
+ title: {
518
+ display: true,
519
+ align: "end",
520
+ padding: { top: 3, bottom: 0 },
521
+ text: `TWD `,
522
+ font: { size: 35, weight: 'normal' },
523
+ color: this.getThemeColors().chartLabel
524
+ },
525
+ subtitle: {
526
+ display: true,
527
+ align: "start",
528
+ padding: { top: -41, bottom: 12 },
529
+ text: ` TWS`,
530
+ font: { size: 35 },
531
+ color: this.getThemeColors().chartLabel
532
+ },
533
+ annotation: {},
534
+ legend: { display: false }
535
+ };
536
+ // Cache initial centers/steps for tick styling before first data update
537
+ this.xCenter = (xDefaultMin + xDefaultMax) / 2;
538
+ this.xStep = xDefaultStep;
539
+ this.xCenterSpeed = (xsDefaultMin + xsDefaultMax) / 2;
540
+ this.xStepSpeed = xsDefaultStep;
541
+ }
542
+ createDatasets() {
543
+ this.lineChartData.datasets = [];
544
+ this.lineChartData.datasets.push({
545
+ label: 'Value',
546
+ data: [],
547
+ order: 2,
548
+ parsing: false,
549
+ normalized: true,
550
+ tension: 0,
551
+ pointRadius: 0,
552
+ pointHoverRadius: 0,
553
+ pointHitRadius: 0,
554
+ borderWidth: 1,
555
+ fill: false,
556
+ xAxisID: 'x'
557
+ }, {
558
+ label: 'SMA',
559
+ data: [],
560
+ order: 0,
561
+ parsing: false,
562
+ normalized: true,
563
+ tension: 0.3,
564
+ pointRadius: 0,
565
+ pointHoverRadius: 0,
566
+ pointHitRadius: 0,
567
+ borderWidth: 10,
568
+ fill: false,
569
+ borderColor: (context) => {
570
+ const chart = context.chart;
571
+ const { ctx } = chart;
572
+ return this.lineGradientForAxis(ctx, chart, 'x');
573
+ },
574
+ backgroundColor: 'red',
575
+ xAxisID: 'x'
576
+ }, {
577
+ label: 'lastAverage',
578
+ data: [],
579
+ order: 1,
580
+ parsing: false,
581
+ normalized: true,
582
+ tension: 0,
583
+ pointRadius: 0,
584
+ pointHoverRadius: 0,
585
+ pointHitRadius: 0,
586
+ borderWidth: 0,
587
+ borderColor: '',
588
+ fill: false,
589
+ hidden: true,
590
+ xAxisID: 'x'
591
+ }, {
592
+ label: 'lastMinimum',
593
+ data: [],
594
+ order: 3,
595
+ parsing: false,
596
+ normalized: true,
597
+ hidden: true,
598
+ xAxisID: 'x'
599
+ }, {
600
+ label: 'lastMaximum',
601
+ data: [],
602
+ order: 4,
603
+ parsing: false,
604
+ normalized: true,
605
+ hidden: true,
606
+ xAxisID: 'x'
607
+ },
608
+ // Speed datasets (5..9)
609
+ {
610
+ label: 'Value Speed',
611
+ data: [],
612
+ order: 2,
613
+ parsing: false,
614
+ normalized: true,
615
+ tension: 0,
616
+ pointRadius: 0,
617
+ pointHoverRadius: 0,
618
+ pointHitRadius: 0,
619
+ borderWidth: 1,
620
+ fill: false,
621
+ xAxisID: 'xSpeed'
622
+ }, {
623
+ label: 'SMA Speed',
624
+ data: [],
625
+ order: 0,
626
+ parsing: false,
627
+ normalized: true,
628
+ tension: 0.2,
629
+ pointRadius: 0,
630
+ pointHoverRadius: 0,
631
+ pointHitRadius: 0,
632
+ borderWidth: 3,
633
+ fill: false,
634
+ borderColor: (context) => {
635
+ const chart = context.chart;
636
+ const { ctx } = chart;
637
+ return this.lineGradientForAxis(ctx, chart, 'xSpeed');
638
+ },
639
+ xAxisID: 'xSpeed'
640
+ }, {
641
+ label: 'lastAverage Speed',
642
+ data: [],
643
+ order: 1,
644
+ parsing: false,
645
+ normalized: true,
646
+ tension: 0,
647
+ pointRadius: 0,
648
+ pointHoverRadius: 0,
649
+ pointHitRadius: 0,
650
+ borderWidth: 0,
651
+ borderColor: '',
652
+ fill: false,
653
+ hidden: true,
654
+ xAxisID: 'xSpeed'
655
+ }, {
656
+ label: 'lastMinimum Speed',
657
+ data: [],
658
+ order: 3,
659
+ parsing: false,
660
+ normalized: true,
661
+ hidden: true,
662
+ xAxisID: 'xSpeed'
663
+ }, {
664
+ label: 'lastMaximum Speed',
665
+ data: [],
666
+ order: 4,
667
+ parsing: false,
668
+ normalized: true,
669
+ hidden: true,
670
+ xAxisID: 'xSpeed'
671
+ });
672
+ this.setDatasetsColors();
673
+ }
674
+ startStreaming() {
675
+ this._dsDirectionSub?.unsubscribe();
676
+ this._dsSpeedSub?.unsubscribe();
677
+ const batchThenLiveDir$ = this._dataset.getDatasetBatchThenLiveObservable(`${this.widgetProperties.uuid}-twd`);
678
+ const batchThenLiveSpd$ = this._dataset.getDatasetBatchThenLiveObservable(`${this.widgetProperties.uuid}-tws`);
679
+ this._dsDirectionSub = batchThenLiveDir$?.subscribe(dsPointOrBatch => {
680
+ if (Array.isArray(dsPointOrBatch)) {
681
+ this.pushRowsToDatasets(dsPointOrBatch);
682
+ }
683
+ else {
684
+ this.pushRowsToDatasets([dsPointOrBatch]);
685
+ if (this.chart.data.datasets[0].data.length > this.dataSourceInfo.maxDataPoints) {
686
+ for (let i = 0; i <= 4; i++)
687
+ this.chart.data.datasets[i].data.shift();
688
+ }
689
+ }
690
+ this.updateChartAfterDataChange();
691
+ this.ngZone.runOutsideAngular(() => { this.chart?.update('quiet'); });
692
+ });
693
+ this._dsSpeedSub = batchThenLiveSpd$?.subscribe(dsPointOrBatch => {
694
+ if (Array.isArray(dsPointOrBatch)) {
695
+ this.pushRowsToSpeedDatasets(dsPointOrBatch);
696
+ }
697
+ else {
698
+ this.pushRowsToSpeedDatasets([dsPointOrBatch]);
699
+ if (this.chart.data.datasets[5].data.length > this.dataSourceInfo.maxDataPoints) {
700
+ for (let i = 5; i <= 9; i++)
701
+ this.chart.data.datasets[i].data.shift();
702
+ }
703
+ }
704
+ this.updateChartAfterDataChange();
705
+ this.ngZone.runOutsideAngular(() => { this.chart?.update('quiet'); });
706
+ });
707
+ }
708
+ unwrapAngles(degrees) {
709
+ if (degrees.length === 0)
710
+ return [];
711
+ const unwrapped = [];
712
+ let prev = null;
713
+ for (const val of degrees) {
714
+ if (val == null) {
715
+ unwrapped.push(null);
716
+ continue;
717
+ }
718
+ if (prev == null) {
719
+ unwrapped.push(val);
720
+ prev = val;
721
+ continue;
722
+ }
723
+ let delta = val - prev;
724
+ if (delta > 180)
725
+ delta -= 360;
726
+ if (delta < -180)
727
+ delta += 360;
728
+ unwrapped.push(unwrapped[unwrapped.length - 1] + delta);
729
+ prev = val;
730
+ }
731
+ return unwrapped;
732
+ }
733
+ pushRowsToDatasets(rows) {
734
+ this.pushRowsGeneric(rows, 0, 'deg', true);
735
+ }
736
+ pushRowsToSpeedDatasets(rows) {
737
+ this.pushRowsGeneric(rows, 5, 'knots', false);
738
+ }
739
+ getRowValue(row, datasetType) {
740
+ switch (datasetType) {
741
+ case 'value': return row.data.value ?? null;
742
+ case 'sma': return row.data.sma ?? null;
743
+ case 'ema': return row.data.ema ?? null;
744
+ case 'dema': return row.data.doubleEma ?? null;
745
+ case 'avg': return row.data.lastAverage ?? null;
746
+ case 'min': return row.data.lastMinimum ?? null;
747
+ case 'max': return row.data.lastMaximum ?? null;
748
+ default: return null;
749
+ }
750
+ }
751
+ // Generic transform for degree/knots series
752
+ transformRows(rows, datasetType, toUnit, unwrap) {
753
+ const vals = rows.map(row => {
754
+ const raw = this.getRowValue(row, datasetType);
755
+ return raw == null ? null : this.unitsService.convertToUnit(toUnit, raw);
756
+ });
757
+ const xs = unwrap ? this.unwrapAngles(vals) : vals;
758
+ return rows.map((row, idx) => ({
759
+ x: xs[idx],
760
+ y: row.timestamp,
761
+ ts: row.timestamp,
762
+ }));
763
+ }
764
+ // Push a batch of rows into 5 consecutive datasets starting at baseIndex
765
+ pushRowsGeneric(rows, baseIndex, toUnit, unwrap) {
766
+ const types = ['value', 'sma', 'avg', 'min', 'max'];
767
+ types.forEach((type, i) => {
768
+ this.chart.data.datasets[baseIndex + i].data
769
+ .push(...this.transformRows(rows, type, toUnit, unwrap));
770
+ });
771
+ }
772
+ normalizeAngle(angle) {
773
+ return ((angle % 360) + 360) % 360;
774
+ }
775
+ // Minimal absolute angular distance in degrees [0, 180]
776
+ angularDiff(a, b) {
777
+ const d = ((a - b + 540) % 360) - 180; // [-180, 180)
778
+ return Math.abs(d);
779
+ }
780
+ // More flexible: choose from provided mantissas (ascending) for a nice step
781
+ niceStepFromMantissas(step, mantissas) {
782
+ if (!isFinite(step) || step <= 0)
783
+ return 1;
784
+ const exp = Math.floor(Math.log10(step));
785
+ const base = step / Math.pow(10, exp);
786
+ const chosen = mantissas.find(m => base <= m) ?? mantissas[mantissas.length - 1];
787
+ return chosen * Math.pow(10, exp);
788
+ }
789
+ updateChartAfterDataChange() {
790
+ // Calculate dynamic x (direction) scale range based on lastAverage center and lastMin/Max distances (with wrap-around)
791
+ const dirAvgArr = this.chart.data.datasets[2]?.data;
792
+ const dirSmaArr = this.chart.data.datasets[1]?.data;
793
+ const dirValArr = this.chart.data.datasets[0]?.data;
794
+ const hasAvg = !!dirAvgArr?.length;
795
+ const hasSma = !!dirSmaArr?.length;
796
+ const hasVal = !!dirValArr?.length;
797
+ // Center MUST be the latest lastAverage value when available, else fall back to SMA, else Value
798
+ const centerVal = hasAvg
799
+ ? dirAvgArr[dirAvgArr.length - 1].x
800
+ : hasSma
801
+ ? dirSmaArr[dirSmaArr.length - 1].x
802
+ : hasVal
803
+ ? dirValArr[dirValArr.length - 1].x
804
+ : undefined;
805
+ if (typeof centerVal === 'number' && isFinite(centerVal)) {
806
+ // Try to use lastMinimum/Maximum if available; else derive half-range from recent window using angular distance
807
+ const minDs = this.chart.data.datasets[3]?.data;
808
+ const maxDs = this.chart.data.datasets[4]?.data;
809
+ const lastMin = minDs?.length ? minDs[minDs.length - 1].x : undefined;
810
+ const lastMax = maxDs?.length ? maxDs[maxDs.length - 1].x : undefined;
811
+ const minDiff = typeof lastMin === 'number' && isFinite(lastMin) ? this.angularDiff(centerVal, lastMin) : Number.NaN;
812
+ const maxDiff = typeof lastMax === 'number' && isFinite(lastMax) ? this.angularDiff(centerVal, lastMax) : Number.NaN;
813
+ let halfRange = Number.isFinite(minDiff) || Number.isFinite(maxDiff)
814
+ ? Math.max(Number.isFinite(minDiff) ? minDiff : 0, Number.isFinite(maxDiff) ? maxDiff : 0)
815
+ : Number.NaN;
816
+ if (!Number.isFinite(halfRange)) {
817
+ const src = hasAvg ? dirAvgArr : hasSma ? dirSmaArr : dirValArr;
818
+ const take = Math.min(30, src?.length ?? 0);
819
+ if (take > 1) {
820
+ const slice = src.slice(src.length - take);
821
+ const xs = slice.map(p => p.x).filter(v => typeof v === 'number' && isFinite(v));
822
+ if (xs.length) {
823
+ halfRange = xs.reduce((m, v) => Math.max(m, this.angularDiff(centerVal, v)), 0);
824
+ }
825
+ }
826
+ }
827
+ // Ensure a sensible minimum half-range so the axis doesn't collapse on first point
828
+ const minHalfRangeDeg = 15; // shows a 30° window initially
829
+ halfRange = Math.max(halfRange || 0, minHalfRangeDeg);
830
+ // 5 ticks (4 intervals) with a nice step, snapped to grid around the chosen center
831
+ const requestedStep = (2 * halfRange) / 4; // = halfRange / 2
832
+ // Allow 15° by including 1.5 mantissa; also support 7.5
833
+ const dStep = this.niceStepFromMantissas(requestedStep, [1, 1.5, 2, 2.5, 5, 7.5, 10]);
834
+ // Place center exactly at lastAverage
835
+ const xMin = centerVal - 2 * dStep;
836
+ const xMax = centerVal + 2 * dStep;
837
+ this.chart.options.scales.x.min = xMin;
838
+ this.chart.options.scales.x.max = xMax;
839
+ const xScale = this.chart.options.scales;
840
+ xScale.x.ticks = { ...(xScale.x.ticks ?? {}), stepSize: dStep };
841
+ // Cache for tick styling
842
+ this.xCenter = centerVal;
843
+ this.xStep = dStep;
844
+ }
845
+ // Calculate dynamic xSpeed (knots) scale range based on lastAverage center and lastMin/Max distances
846
+ const sAvgArr = this.chart.data.datasets[7]?.data;
847
+ if (sAvgArr && sAvgArr.length) {
848
+ const sIdx = sAvgArr.length - 1;
849
+ const sAvg = sAvgArr[sIdx]?.x ?? 0;
850
+ const sMin = this.chart.data.datasets[8].data[sIdx]?.x ?? sAvg;
851
+ const sMax = this.chart.data.datasets[9].data[sIdx]?.x ?? sAvg;
852
+ const sDiffMin = Math.abs(sAvg - sMin);
853
+ const sDiffMax = Math.abs(sMax - sAvg);
854
+ let halfRangeS = Math.max(sDiffMin, sDiffMax);
855
+ // Guard minimum half-range to avoid collapse
856
+ const minHalfRangeS = 0.5; // knots
857
+ halfRangeS = Math.max(halfRangeS, minHalfRangeS);
858
+ // Target 5 ticks (4 intervals) with a nice step (ceiling)
859
+ const requestedStep = (2 * halfRangeS) / 4; // = halfRangeS / 2
860
+ // Preserve previous speed behavior (no 1.5/7.5 mantissas)
861
+ const spStep = this.niceStepFromMantissas(requestedStep, [1, 2, 2.5, 5, 10]);
862
+ // Keep center exactly at lastAverage Speed
863
+ const spMin = sAvg - 2 * spStep;
864
+ const spMax = sAvg + 2 * spStep;
865
+ const scales = this.chart.options.scales;
866
+ scales.xSpeed.min = spMin;
867
+ scales.xSpeed.max = spMax;
868
+ scales.xSpeed.ticks = { ...(scales.xSpeed.ticks ?? {}), stepSize: spStep };
869
+ // cache for tick styling on speed axis
870
+ this.xCenterSpeed = sAvg;
871
+ this.xStepSpeed = spStep;
872
+ }
873
+ // Fixed, non-scrolling y-axis window (relative age)
874
+ const windowMs = this.getWindowMs(this.datasetConfig?.timeScaleFormat);
875
+ const data0 = this.chart.data.datasets[0].data;
876
+ if (data0.length > 0) {
877
+ const nowTs = Date.now();
878
+ // Recompute y for all datasets as age (ms) relative to now
879
+ this.chart.data.datasets.forEach(ds => {
880
+ ds.data.forEach(p => {
881
+ const ts = p.ts ?? p.y;
882
+ p.y = Math.max(0, Math.min(windowMs, nowTs - ts));
883
+ });
884
+ });
885
+ // Lock y scale to [0, window]
886
+ this.chart.options.scales.y.min = 0;
887
+ this.chart.options.scales.y.max = windowMs;
888
+ // Explicit step per selected window
889
+ let step;
890
+ const fmt = this.datasetConfig?.timeScaleFormat;
891
+ switch (fmt) {
892
+ case 'Last Minute':
893
+ step = 15_000; // 15 seconds
894
+ break;
895
+ case 'Last 5 Minutes':
896
+ step = 60_000; // 1 minute
897
+ break;
898
+ case 'Last 30 Minutes':
899
+ step = 5 * 60_000; // 5 minutes
900
+ break;
901
+ default:
902
+ // fallback keeps 6 ticks => 5 intervals
903
+ step = windowMs / 5;
904
+ break;
905
+ }
906
+ const yScale = this.chart.options.scales;
907
+ const ticksCopy = { ...(yScale.y.ticks ?? {}) };
908
+ delete ticksCopy.count;
909
+ ticksCopy.stepSize = step;
910
+ yScale.y.ticks = ticksCopy;
911
+ }
912
+ }
913
+ getWindowMs(fmt) {
914
+ switch (fmt) {
915
+ case 'Last 30 Minutes':
916
+ return 30 * 60_000;
917
+ case 'Last 5 Minutes':
918
+ return 5 * 60_000;
919
+ case 'Last Minute':
920
+ return 60_000;
921
+ default:
922
+ return 60_000; // fallback 1 minute
923
+ }
924
+ }
925
+ lineGradientForAxis(ctx, chart, axisKey) {
926
+ const chartArea = chart.chartArea;
927
+ if (!chartArea)
928
+ return null;
929
+ const scale = chart.scales?.[axisKey];
930
+ if (!scale)
931
+ return null;
932
+ const scales = chart.options?.scales;
933
+ const sAny = scale;
934
+ const min = scales?.[axisKey]?.min ?? sAny.min;
935
+ const max = scales?.[axisKey]?.max ?? sAny.max;
936
+ if (typeof min !== 'number' || typeof max !== 'number' || !isFinite(min) || !isFinite(max))
937
+ return null;
938
+ const center = (min + max) / 2;
939
+ const centerPx = scale.getPixelForValue(center);
940
+ const offset = Math.max(0, Math.min(1, (centerPx - chartArea.left) / chartArea.width));
941
+ const gradient = ctx.createLinearGradient(chartArea.left, 0, chartArea.right, 0);
942
+ gradient.addColorStop(0, this.theme().port);
943
+ gradient.addColorStop(offset, this.theme().port);
944
+ gradient.addColorStop(offset, this.theme().starboard);
945
+ gradient.addColorStop(1, this.theme().starboard);
946
+ return gradient;
947
+ }
948
+ setDatasetsColors() {
949
+ this.lineChartData.datasets.forEach((dataset) => {
950
+ if (dataset.label === 'Value') {
951
+ dataset.borderColor = this.getThemeColors().valueLine;
952
+ dataset.backgroundColor = this.getThemeColors().valueFill;
953
+ }
954
+ if (dataset.label === 'Value Speed') {
955
+ dataset.borderColor = this.getThemeColors().valueLine;
956
+ dataset.backgroundColor = this.getThemeColors().valueFill;
957
+ }
958
+ });
959
+ }
960
+ getThemeColors() {
961
+ const widgetColor = this.widgetProperties.config.color;
962
+ const colors = {
963
+ valueLine: null,
964
+ valueFill: null,
965
+ averageLine: null,
966
+ averageFill: null,
967
+ averageChartLine: null,
968
+ chartLabel: null,
969
+ chartValue: null
970
+ };
971
+ switch (widgetColor) {
972
+ case "contrast":
973
+ colors.valueLine = this.theme().contrastDim;
974
+ colors.valueFill = this.theme().contrastDimmer;
975
+ colors.averageLine = this.theme().contrast;
976
+ colors.averageFill = this.theme().contrast;
977
+ colors.chartValue = this.theme().contrast;
978
+ colors.averageChartLine = this.theme().contrast;
979
+ colors.chartLabel = this.theme().contrastDim;
980
+ break;
981
+ case "blue":
982
+ colors.valueLine = this.theme().blueDim;
983
+ colors.valueFill = this.theme().blueDimmer;
984
+ colors.averageLine = this.theme().blue;
985
+ colors.averageFill = this.theme().blue;
986
+ colors.chartValue = this.theme().blue;
987
+ colors.averageChartLine = this.theme().blueDim;
988
+ colors.chartLabel = this.theme().blueDim;
989
+ break;
990
+ case "green":
991
+ colors.valueLine = this.theme().greenDim;
992
+ colors.valueFill = this.theme().greenDimmer;
993
+ colors.averageLine = this.theme().green;
994
+ colors.averageFill = this.theme().green;
995
+ colors.chartValue = this.theme().green;
996
+ colors.averageChartLine = this.theme().greenDim;
997
+ colors.chartLabel = this.theme().greenDim;
998
+ break;
999
+ case "pink":
1000
+ colors.valueLine = this.theme().pinkDim;
1001
+ colors.valueFill = this.theme().pinkDimmer;
1002
+ colors.averageLine = this.theme().pink;
1003
+ colors.averageFill = this.theme().pink;
1004
+ colors.chartValue = this.theme().pink;
1005
+ colors.averageChartLine = this.theme().pinkDim;
1006
+ colors.chartLabel = this.theme().pinkDim;
1007
+ break;
1008
+ case "orange":
1009
+ colors.valueLine = this.theme().orangeDim;
1010
+ colors.valueFill = this.theme().orangeDimmer;
1011
+ colors.averageLine = this.theme().orange;
1012
+ colors.averageFill = this.theme().orange;
1013
+ colors.chartValue = this.theme().orange;
1014
+ colors.averageChartLine = this.theme().orangeDim;
1015
+ colors.chartLabel = this.theme().orangeDim;
1016
+ break;
1017
+ case "purple":
1018
+ colors.valueLine = this.theme().purpleDim;
1019
+ colors.valueFill = this.theme().purpleDimmer;
1020
+ colors.averageLine = this.theme().purple;
1021
+ colors.averageFill = this.theme().purple;
1022
+ colors.chartValue = this.theme().purple;
1023
+ colors.averageChartLine = this.theme().purpleDim;
1024
+ colors.chartLabel = this.theme().purpleDim;
1025
+ break;
1026
+ case "grey":
1027
+ colors.valueLine = this.theme().greyDim;
1028
+ colors.valueFill = this.theme().greyDimmer;
1029
+ colors.averageLine = this.theme().grey;
1030
+ colors.averageFill = this.theme().grey;
1031
+ colors.chartValue = this.theme().grey;
1032
+ colors.averageChartLine = this.theme().greyDim;
1033
+ colors.chartLabel = this.theme().greyDim;
1034
+ break;
1035
+ case "yellow":
1036
+ colors.valueLine = this.theme().yellowDim;
1037
+ colors.valueFill = this.theme().yellowDimmer;
1038
+ colors.averageLine = this.theme().yellow;
1039
+ colors.averageFill = this.theme().yellow;
1040
+ colors.chartValue = this.theme().yellow;
1041
+ colors.averageChartLine = this.theme().yellowDim;
1042
+ colors.chartLabel = this.theme().yellowDim;
1043
+ break;
1044
+ }
1045
+ return colors;
1046
+ }
1047
+ ngOnDestroy() {
1048
+ this.destroyDataStreams();
1049
+ this._dsDirectionSub?.unsubscribe();
1050
+ this._dsSpeedSub?.unsubscribe();
1051
+ // we need to destroy when moving Pages to remove Chart Objects
1052
+ this.chart?.destroy();
1053
+ const canvas = this.widgetDataChart?.()?.nativeElement;
1054
+ this.canvasService.releaseCanvas(canvas, { clear: true, removeFromDom: true });
1055
+ }
1056
+ };
1057
+ WidgetWindTrendsChartComponent = __decorate([
1058
+ Component({
1059
+ selector: 'widget-windtrends-chart',
1060
+ imports: [WidgetHostComponent],
1061
+ templateUrl: './widget-windtrends-chart.component.html',
1062
+ styleUrl: './widget-windtrends-chart.component.scss'
1063
+ }),
1064
+ __metadata("design:paramtypes", [])
1065
+ ], WidgetWindTrendsChartComponent);
1066
+ export { WidgetWindTrendsChartComponent };
1067
+ //# sourceMappingURL=widget-windtrends-chart.component.js.map