@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,1128 @@
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
+ /**
11
+ * Autopilot Widget Component
12
+ *
13
+ * A comprehensive autopilot control widget that supports both Signal K V1 (plugin-based)
14
+ * and V2 (REST API-based) autopilot systems. Provides intuitive controls for autopilot
15
+ * modes, heading adjustments, tacking, and route navigation.
16
+ *
17
+ * Features:
18
+ * - Automatic API version detection (V1/V2)
19
+ * - Dynamic endpoint discovery for V2 systems
20
+ * - Mixed environment support (V2 preferred, V1 fallback)
21
+ * - Comprehensive error handling and user feedback
22
+ * - Promise-based state management for V2 operations
23
+ * - Confirmation dialogs for critical operations (tack, waypoint advance)
24
+ *
25
+ * Supported Autopilot Operations:
26
+ * - Mode switching (auto, wind, route, standby)
27
+ * - Heading adjustments (±1°, ±10°)
28
+ * - Tacking (port/starboard with confirmation)
29
+ * - Waypoint advancement with confirmation
30
+ * - V2-only: Absolute target heading, dodge mode
31
+ *
32
+ * @requires HttpClient, Angular Signals
33
+ */
34
+ import { Component, inject, signal, untracked, DestroyRef, computed, linkedSignal } from '@angular/core';
35
+ import { HttpClient } from '@angular/common/http';
36
+ import { MatButtonModule } from '@angular/material/button';
37
+ import { MatIconModule } from '@angular/material/icon';
38
+ import { TitleCasePipe } from '@angular/common';
39
+ import { MatBadgeModule } from '@angular/material/badge';
40
+ import { BaseWidgetComponent } from '../../core/utils/base-widget.component';
41
+ import { WidgetHostComponent } from '../../core/components/widget-host/widget-host.component';
42
+ import { SvgAutopilotComponent } from '../svg-autopilot/svg-autopilot.component';
43
+ import { WidgetPositionComponent } from '../widget-position/widget-position.component';
44
+ import { WidgetNumericComponent } from '../widget-numeric/widget-numeric.component';
45
+ import { WidgetDatetimeComponent } from "../widget-datetime/widget-datetime.component";
46
+ import { DashboardService } from '../../core/services/dashboard.service';
47
+ import { SignalkRequestsService } from '../../core/services/signalk-requests.service';
48
+ import { isEqual } from 'lodash-es';
49
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
50
+ import { lastValueFrom, finalize } from 'rxjs';
51
+ // Shared constants for API paths and configuration
52
+ const API_PATHS = {
53
+ V1_MODE_PATH: 'self.steering.autopilot.state',
54
+ V2_BASE: '/signalk/v2/api',
55
+ V2_AUTOPILOTS: '/signalk/v2/api/vessels/self/autopilots',
56
+ V2_COURSE: '/signalk/v2/api/vessels/self/navigation/course'
57
+ };
58
+ const V2_ENDPOINT_TEMPLATES = {
59
+ BASE: (instance) => `${API_PATHS.V2_AUTOPILOTS}/${instance}`,
60
+ ENGAGE: (instance) => `${API_PATHS.V2_AUTOPILOTS}/${instance}/engage`,
61
+ DISENGAGE: (instance) => `${API_PATHS.V2_AUTOPILOTS}/${instance}/disengage`,
62
+ STATE: (instance) => `${API_PATHS.V2_AUTOPILOTS}/${instance}/state`,
63
+ MODE: (instance) => `${API_PATHS.V2_AUTOPILOTS}/${instance}/mode`,
64
+ TARGET_HEADING: (instance) => `${API_PATHS.V2_AUTOPILOTS}/${instance}/target`,
65
+ TACK: (instance) => `${API_PATHS.V2_AUTOPILOTS}/${instance}/tack`,
66
+ GYBE: (instance) => `${API_PATHS.V2_AUTOPILOTS}/${instance}/gybe`,
67
+ DODGE: (instance) => `${API_PATHS.V2_AUTOPILOTS}/${instance}/dodge`,
68
+ ADJUST_HEADING: (instance) => `${API_PATHS.V2_AUTOPILOTS}/${instance}/target/adjust`,
69
+ };
70
+ const COMMANDS = {
71
+ "auto": { "path": "self.steering.autopilot.state", "value": "auto" },
72
+ "wind": { "path": "self.steering.autopilot.state", "value": "wind" },
73
+ "route": { "path": "self.steering.autopilot.state", "value": "route" },
74
+ "standby": { "path": "self.steering.autopilot.state", "value": "standby" },
75
+ "+1": { "path": "self.steering.autopilot.actions.adjustHeading", "value": 1 },
76
+ "+10": { "path": "self.steering.autopilot.actions.adjustHeading", "value": 10 },
77
+ "-1": { "path": "self.steering.autopilot.actions.adjustHeading", "value": -1 },
78
+ "-10": { "path": "self.steering.autopilot.actions.adjustHeading", "value": -10 },
79
+ "tackToPort": { "path": "self.steering.autopilot.actions.tack", "value": "port" },
80
+ "tackToStarboard": { "path": "self.steering.autopilot.actions.tack", "value": "starboard" },
81
+ "advanceWaypoint": { "path": "self.steering.autopilot.actions.advanceWaypoint", "value": "1" },
82
+ // V2-only commands
83
+ "compass": { "path": "v2 only command", "value": "v2 only command" },
84
+ "gps": { "path": "v2 only command", "value": "v2 only command" },
85
+ "true wind": { "path": "v2 only command", "value": "v2 only command" },
86
+ "nav": { "path": "v2 only command", "value": "v2 only command" },
87
+ };
88
+ const DEFAULTS = {
89
+ COUNTDOWN_SECONDS: 5,
90
+ ERROR_DISPLAY_DURATION: 6000,
91
+ MESSAGE_DISPLAY_DURATION: 5000
92
+ };
93
+ let WidgetAutopilotComponent = class WidgetAutopilotComponent extends BaseWidgetComponent {
94
+ _requests = inject(SignalkRequestsService);
95
+ http = inject(HttpClient);
96
+ dashboard = inject(DashboardService);
97
+ _destroyRef = inject(DestroyRef);
98
+ apiEndpoints;
99
+ // Autopilot state Management
100
+ apState = signal(null);
101
+ apEngaged = signal(null);
102
+ apMode = signal(null);
103
+ dodgeModeActive = signal(false);
104
+ autopilotTargetHeading = signal(null);
105
+ autopilotTargetWindHeading = signal(null);
106
+ heading = signal(null);
107
+ crossTrackError = signal(null);
108
+ windAngleApparent = signal(null);
109
+ rudder = signal(null);
110
+ autopilotTarget = linkedSignal(() => {
111
+ const v1Heading = this.autopilotTargetHeading();
112
+ const v1Wind = this.autopilotTargetWindHeading();
113
+ if (this.apMode() === 'wind') {
114
+ return v1Wind ?? null;
115
+ }
116
+ return v1Heading ?? null;
117
+ });
118
+ // Request management
119
+ currentRequests = new Set();
120
+ // Keypad buttons & layout
121
+ apGrid = computed(() => this.apMode() ? 'grid' : 'none');
122
+ apEngageBtnDisabled = computed(() => {
123
+ const state = this.apState();
124
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
125
+ const engaged = this.apEngaged();
126
+ const apiVersion = this.widgetProperties.config.autopilot.apiVersion;
127
+ if (!apiVersion)
128
+ return true;
129
+ if (apiVersion === "v1") {
130
+ return (['standby', 'off-line'].includes(state)) ? true : false;
131
+ }
132
+ if (apiVersion === "v2") {
133
+ return false;
134
+ }
135
+ return true;
136
+ });
137
+ apBtnDisabled = computed(() => {
138
+ const engaged = this.apEngaged();
139
+ const apiVersion = this.widgetProperties.config.autopilot.apiVersion;
140
+ if (apiVersion === "v1") {
141
+ return this.apMode() === 'standby' ? true : false;
142
+ }
143
+ if (engaged) {
144
+ return false;
145
+ }
146
+ return true;
147
+ });
148
+ adjustHdgBtnVisibility = computed(() => {
149
+ const mode = this.apMode();
150
+ if (['auto', 'compass', 'gps', 'wind', 'true wind', 'standby'].includes(mode)) {
151
+ return true;
152
+ }
153
+ return false;
154
+ });
155
+ tackBtnVisibility = computed(() => {
156
+ const mode = this.apMode();
157
+ if (['auto', 'compass', 'gps', 'wind', 'true wind', 'standby'].includes(mode)) {
158
+ return true;
159
+ }
160
+ return false;
161
+ });
162
+ routeBtnVisibility = computed(() => {
163
+ const mode = this.apMode();
164
+ if (mode === 'route' || mode === 'nav') {
165
+ return true;
166
+ }
167
+ return false;
168
+ });
169
+ // Widget messaging countdown
170
+ countdownOverlayVisibility = signal('hidden');
171
+ countdownOverlayText = signal('');
172
+ msgOverlayVisibility = signal('hidden');
173
+ msgOverlayText = signal('');
174
+ errorOverlayVisibility = signal('hidden');
175
+ errorOverlayText = signal('');
176
+ handleCountDownCounterTimeout = null;
177
+ handleConfirmActionTimeout = null;
178
+ handleDisplayErrorTimeout = null;
179
+ handleMessageTimeout = null;
180
+ isPersistentError = false; // Track if current error should persist
181
+ countDownValue = -1;
182
+ actionToBeConfirmed = "";
183
+ // Mode Menu
184
+ menuItems = computed(() => {
185
+ const mode = this.apMode();
186
+ const apiVersion = this.widgetProperties.config.autopilot.apiVersion;
187
+ const plugin = this.widgetProperties.config.autopilot.pluginId;
188
+ let menuItems = [];
189
+ untracked(() => {
190
+ if (apiVersion === 'v2') {
191
+ if (plugin == 'pypilot-autopilot-provider') {
192
+ const allAPModes = [
193
+ { label: 'Compass', action: 'compass' },
194
+ { label: 'GPS', action: 'gps' },
195
+ { label: 'Wind', action: 'wind' },
196
+ { label: 'True Wind', action: 'true wind' },
197
+ { label: 'Navigation', action: 'nav' },
198
+ { label: 'Close', action: 'cancel', isCancel: true }
199
+ ];
200
+ menuItems = this.parseMenuItems(allAPModes, mode);
201
+ }
202
+ }
203
+ else if (apiVersion === 'v1') {
204
+ const allAPModes = [
205
+ { label: 'Auto', action: 'auto' },
206
+ { label: 'Wind', action: 'wind' },
207
+ { label: 'Route', action: 'route' },
208
+ { label: 'Close', action: 'cancel', isCancel: true }
209
+ ];
210
+ menuItems = this.parseMenuItems(allAPModes, mode);
211
+ }
212
+ });
213
+ return menuItems;
214
+ });
215
+ menuOpen = signal(false);
216
+ itemHeight = 60;
217
+ padding = 20;
218
+ // Integrated widget properties
219
+ embedWidgetColor = 'contrast';
220
+ nextWptProperties = signal({
221
+ type: "widget-position",
222
+ uuid: "db473695-42b1-4435-9d3d-ac2f27bf9665",
223
+ config: {
224
+ displayName: "Next WPT",
225
+ filterSelfPaths: true,
226
+ paths: {
227
+ "longPath": {
228
+ description: "Longitude",
229
+ path: "self.navigation.courseGreatCircle.nextPoint.position.longitude",
230
+ source: "default",
231
+ pathType: "number",
232
+ isPathConfigurable: true,
233
+ convertUnitTo: "longitudeMin",
234
+ showPathSkUnitsFilter: true,
235
+ pathSkUnitsFilter: null,
236
+ sampleTime: 500
237
+ },
238
+ "latPath": {
239
+ description: "Latitude",
240
+ path: "self.navigation.courseGreatCircle.nextPoint.position.latitude",
241
+ source: "default",
242
+ pathType: "number",
243
+ isPathConfigurable: true,
244
+ convertUnitTo: "latitudeMin",
245
+ showPathSkUnitsFilter: true,
246
+ pathSkUnitsFilter: null,
247
+ sampleTime: 500
248
+ }
249
+ },
250
+ color: this.embedWidgetColor,
251
+ enableTimeout: false,
252
+ dataTimeout: 5
253
+ }
254
+ }, { equal: isEqual });
255
+ ttwProperties = signal({
256
+ type: "widget-numeric",
257
+ uuid: "ee022f2f-ee23-41a7-b0b1-0928dc28864d",
258
+ config: {
259
+ displayName: "TTWpt",
260
+ filterSelfPaths: true,
261
+ paths: {
262
+ numericPath: {
263
+ description: "Time To Waypoint",
264
+ path: "self.navigation.course.calcValues.timeToGo",
265
+ source: "default",
266
+ pathType: "number",
267
+ isPathConfigurable: true,
268
+ convertUnitTo: "D HH:MM:SS",
269
+ showPathSkUnitsFilter: true,
270
+ pathSkUnitsFilter: null,
271
+ sampleTime: 500
272
+ }
273
+ },
274
+ showMax: false,
275
+ showMin: false,
276
+ numDecimal: 1,
277
+ numInt: 1,
278
+ showMiniChart: false,
279
+ color: this.embedWidgetColor,
280
+ enableTimeout: false,
281
+ dataTimeout: 5,
282
+ ignoreZones: false
283
+ }
284
+ }, { equal: isEqual });
285
+ etaProperties = signal({
286
+ type: "widget-datetime",
287
+ uuid: "544ca35d-18bf-4a90-9aa8-b12312e3fc60",
288
+ config: {
289
+ displayName: "ETA",
290
+ filterSelfPaths: true,
291
+ paths: {
292
+ gaugePath: {
293
+ description: "Estimated Time Of Arrival Date",
294
+ path: "self.navigation.course.calcValues.estimatedTimeOfArrival",
295
+ source: "default",
296
+ pathType: "Date",
297
+ isPathConfigurable: true,
298
+ sampleTime: 500
299
+ }
300
+ },
301
+ dateFormat: "EEE HH:mm",
302
+ dateTimezone: "System Timezone -",
303
+ color: this.embedWidgetColor,
304
+ enableTimeout: false,
305
+ dataTimeout: 5
306
+ }
307
+ }, { equal: isEqual });
308
+ dtwProperties = signal({
309
+ type: "widget-numeric",
310
+ uuid: "ee02ef2f-ee23-41a7-b0b1-0928dc28864d",
311
+ config: {
312
+ displayName: "DTWpt",
313
+ filterSelfPaths: true,
314
+ paths: {
315
+ numericPath: {
316
+ description: "Distance To Waypoint",
317
+ path: "self.navigation.course.calcValues.distance",
318
+ source: "default",
319
+ pathType: "number",
320
+ isPathConfigurable: true,
321
+ convertUnitTo: "nm",
322
+ showPathSkUnitsFilter: true,
323
+ pathSkUnitsFilter: null,
324
+ sampleTime: 500
325
+ }
326
+ },
327
+ showMax: false,
328
+ showMin: false,
329
+ numDecimal: 1,
330
+ numInt: 1,
331
+ showMiniChart: false,
332
+ color: this.embedWidgetColor,
333
+ enableTimeout: false,
334
+ dataTimeout: 5,
335
+ ignoreZones: false
336
+ }
337
+ }, { equal: isEqual });
338
+ xteProperties = signal({
339
+ type: "widget-numeric",
340
+ uuid: "9234856b-7573-4154-a44f-3baf7c6f119c",
341
+ config: {
342
+ displayName: "XTE",
343
+ filterSelfPaths: true,
344
+ paths: {
345
+ numericPath: {
346
+ description: "Cross Track Error",
347
+ path: "self.navigation.course.calcValues.crossTrackError",
348
+ source: "default",
349
+ pathType: "number",
350
+ isPathConfigurable: true,
351
+ convertUnitTo: "m",
352
+ showPathSkUnitsFilter: true,
353
+ pathSkUnitsFilter: null,
354
+ sampleTime: 500
355
+ }
356
+ },
357
+ showMax: false,
358
+ showMin: false,
359
+ numDecimal: 1,
360
+ numInt: 1,
361
+ showMiniChart: false,
362
+ color: this.embedWidgetColor,
363
+ enableTimeout: false,
364
+ dataTimeout: 5,
365
+ ignoreZones: false
366
+ }
367
+ }, { equal: isEqual });
368
+ constructor() {
369
+ super();
370
+ this.defaultConfig = {
371
+ filterSelfPaths: true,
372
+ paths: {
373
+ "autopilotState": {
374
+ description: "Autopilot State",
375
+ path: "self.steering.autopilot.state",
376
+ source: "default",
377
+ pathType: "string",
378
+ isPathConfigurable: false,
379
+ showPathSkUnitsFilter: false,
380
+ convertUnitTo: "",
381
+ sampleTime: 500
382
+ },
383
+ "autopilotMode": {
384
+ description: "Autopilot Mode",
385
+ path: "self.steering.autopilot.mode",
386
+ source: "default",
387
+ pathType: "string",
388
+ isPathConfigurable: false,
389
+ showPathSkUnitsFilter: false,
390
+ convertUnitTo: "",
391
+ sampleTime: 500
392
+ },
393
+ "autopilotEngaged": {
394
+ description: "Autopilot Engaged",
395
+ path: 'self.steering.autopilot.engaged',
396
+ source: 'default',
397
+ pathType: "boolean",
398
+ isPathConfigurable: false,
399
+ showPathSkUnitsFilter: false,
400
+ convertUnitTo: "",
401
+ sampleTime: 500
402
+ },
403
+ "autopilotV2Target": {
404
+ description: "Autopilot API v2 Target",
405
+ path: 'self.steering.autopilot.target',
406
+ source: 'default',
407
+ pathType: "number",
408
+ convertUnitTo: "deg",
409
+ isPathConfigurable: false,
410
+ showPathSkUnitsFilter: false,
411
+ pathSkUnitsFilter: 'rad',
412
+ sampleTime: 500
413
+ },
414
+ "autopilotTargetHeading": {
415
+ description: "Autopilot Target Magnetic Heading",
416
+ path: 'self.steering.autopilot.target.headingMagnetic',
417
+ source: 'default',
418
+ pathType: "number",
419
+ convertUnitTo: "deg",
420
+ isPathConfigurable: false,
421
+ showPathSkUnitsFilter: false,
422
+ pathSkUnitsFilter: 'rad',
423
+ sampleTime: 500
424
+ },
425
+ "autopilotTargetWindHeading": {
426
+ description: "Autopilot Target Apparent Wind Angle",
427
+ path: 'self.steering.autopilot.target.windAngleApparent',
428
+ source: 'default',
429
+ pathType: "number",
430
+ convertUnitTo: "deg",
431
+ isPathConfigurable: false,
432
+ showPathSkUnitsFilter: false,
433
+ pathSkUnitsFilter: 'rad',
434
+ sampleTime: 500
435
+ },
436
+ "rudderAngle": {
437
+ description: "Rudder Angle",
438
+ path: 'self.steering.rudderAngle',
439
+ source: 'default',
440
+ pathType: "number",
441
+ convertUnitTo: "deg",
442
+ isPathConfigurable: false,
443
+ showPathSkUnitsFilter: false,
444
+ pathSkUnitsFilter: 'rad',
445
+ sampleTime: 500
446
+ },
447
+ "courseXte": {
448
+ description: "Cross Track Error",
449
+ path: "self.navigation.course.calcValues.crossTrackError",
450
+ source: "default",
451
+ pathType: "number",
452
+ isPathConfigurable: false,
453
+ convertUnitTo: "m",
454
+ showPathSkUnitsFilter: true,
455
+ pathRequired: false,
456
+ pathSkUnitsFilter: 'm',
457
+ sampleTime: 500
458
+ },
459
+ "headingMag": {
460
+ description: "Magnetic Heading",
461
+ path: 'self.navigation.headingMagnetic',
462
+ source: 'default',
463
+ pathType: "number",
464
+ convertUnitTo: "deg",
465
+ isPathConfigurable: true,
466
+ pathRequired: false,
467
+ showPathSkUnitsFilter: false,
468
+ pathSkUnitsFilter: 'rad',
469
+ showConvertUnitTo: false,
470
+ sampleTime: 500
471
+ },
472
+ "headingTrue": {
473
+ description: "True Heading",
474
+ path: 'self.navigation.headingTrue',
475
+ source: 'default',
476
+ pathType: "number",
477
+ convertUnitTo: "deg",
478
+ isPathConfigurable: true,
479
+ pathRequired: false,
480
+ showPathSkUnitsFilter: false,
481
+ pathSkUnitsFilter: 'rad',
482
+ showConvertUnitTo: false,
483
+ sampleTime: 500
484
+ },
485
+ "windAngleApparent": {
486
+ description: "Apparent Wind Angle",
487
+ path: 'self.environment.wind.angleApparent',
488
+ source: 'default',
489
+ pathType: "number",
490
+ convertUnitTo: "deg",
491
+ isPathConfigurable: true,
492
+ pathRequired: false,
493
+ showPathSkUnitsFilter: false,
494
+ pathSkUnitsFilter: 'rad',
495
+ showConvertUnitTo: false,
496
+ sampleTime: 500
497
+ },
498
+ "windAngleTrueWater": {
499
+ description: "Wind Angle True Water",
500
+ path: 'self.environment.wind.angleTrueWater',
501
+ source: 'default',
502
+ pathType: "number",
503
+ convertUnitTo: "deg",
504
+ isPathConfigurable: true,
505
+ pathRequired: false,
506
+ showPathSkUnitsFilter: false,
507
+ pathSkUnitsFilter: 'rad',
508
+ showConvertUnitTo: false,
509
+ sampleTime: 500
510
+ }
511
+ },
512
+ autopilot: {
513
+ invertRudder: true,
514
+ headingDirectionTrue: false,
515
+ courseDirectionTrue: false,
516
+ apiVersion: null,
517
+ instanceId: null,
518
+ pluginId: null,
519
+ modes: null // Default modes for V1
520
+ },
521
+ enableTimeout: false,
522
+ dataTimeout: 5,
523
+ };
524
+ }
525
+ ngOnInit() {
526
+ this.validateConfig();
527
+ this.startWidget();
528
+ }
529
+ startWidget() {
530
+ const err = {
531
+ statusCode: 500,
532
+ statusCodeDescription: 'Autopilot widget not configured',
533
+ requestId: '',
534
+ state: ''
535
+ };
536
+ const apiVersion = this.widgetProperties.config.autopilot.apiVersion;
537
+ const instanceId = this.widgetProperties.config.autopilot.instanceId;
538
+ const pluginId = this.widgetProperties.config.autopilot.pluginId;
539
+ // Helper for persistent error state
540
+ const setPersistentError = (message) => {
541
+ this.unsubscribeDataStream();
542
+ console.error(`[Autopilot Widget] ${message}`);
543
+ this.displayApError(err);
544
+ this.isPersistentError = true;
545
+ this.apMode.set('off-line');
546
+ this.apState.set('off-line');
547
+ this.apEngaged.set(false);
548
+ };
549
+ this.unsubscribeDataStream();
550
+ if (!apiVersion) {
551
+ setPersistentError('Not configured with autopilot API version, skipping initialization');
552
+ return;
553
+ }
554
+ if (apiVersion === 'v2') {
555
+ if (!instanceId) {
556
+ setPersistentError('No autopilot instance ID configured for V2 API, skipping initialization');
557
+ return;
558
+ }
559
+ if (!pluginId) {
560
+ setPersistentError('No autopilot plugin ID configured for V2 API, skipping initialization');
561
+ return;
562
+ }
563
+ this.apiEndpoints = this.setV2Endpoint(instanceId);
564
+ this.startV2Subscriptions();
565
+ return;
566
+ }
567
+ if (apiVersion === 'v1') {
568
+ this.startV1Subscriptions();
569
+ return;
570
+ }
571
+ // Unknown API version
572
+ setPersistentError(`Unknown autopilot API version: ${apiVersion}`);
573
+ }
574
+ setV2Endpoint(instanceId) {
575
+ const endpoints = {
576
+ engage: V2_ENDPOINT_TEMPLATES.ENGAGE(instanceId),
577
+ disengage: V2_ENDPOINT_TEMPLATES.DISENGAGE(instanceId),
578
+ mode: V2_ENDPOINT_TEMPLATES.MODE(instanceId),
579
+ state: V2_ENDPOINT_TEMPLATES.STATE(instanceId),
580
+ target: V2_ENDPOINT_TEMPLATES.TARGET_HEADING(instanceId),
581
+ tack: V2_ENDPOINT_TEMPLATES.TACK(instanceId),
582
+ gybe: V2_ENDPOINT_TEMPLATES.GYBE(instanceId),
583
+ dodge: V2_ENDPOINT_TEMPLATES.DODGE(instanceId),
584
+ adjustHeading: V2_ENDPOINT_TEMPLATES.ADJUST_HEADING(instanceId)
585
+ };
586
+ return endpoints;
587
+ }
588
+ isV2CommandSupported(command) {
589
+ return this.widgetProperties.config.autopilot.modes.includes(command);
590
+ }
591
+ updateConfig(config) {
592
+ this.widgetProperties.config = config;
593
+ // Cancel any ongoing HTTP requests
594
+ this.cancelAllHttpRequests();
595
+ // Clear any error or message overlays
596
+ this.isPersistentError = false;
597
+ this.errorOverlayVisibility.set("hidden");
598
+ this.errorOverlayText.set("");
599
+ this.apEngaged.set(null);
600
+ this.startWidget();
601
+ }
602
+ startV2Subscriptions() {
603
+ this.observeDataStream('autopilotState', newValue => {
604
+ if (newValue.data?.value) {
605
+ this.apState.set(newValue.data.value);
606
+ }
607
+ else {
608
+ this.apState.set('off-line');
609
+ console.warn('[Autopilot Widget] Autopilot state is null or not available');
610
+ }
611
+ });
612
+ this.observeDataStream('autopilotMode', newValue => {
613
+ if (newValue.data?.value) {
614
+ this.apMode.set(newValue.data.value);
615
+ }
616
+ else {
617
+ this.apMode.set('off-line');
618
+ console.warn('[Autopilot Widget] Autopilot mode is null or not available');
619
+ }
620
+ });
621
+ this.observeDataStream('autopilotEngaged', newValue => {
622
+ if (newValue.data?.value != null) {
623
+ this.apEngaged.set(newValue.data.value);
624
+ }
625
+ else {
626
+ this.apEngaged.set(false);
627
+ console.warn('[Autopilot Widget] Autopilot engaged is null or not available');
628
+ }
629
+ });
630
+ this.observeDataStream('autopilotV2Target', newValue => {
631
+ if (newValue.data?.value) {
632
+ this.autopilotTarget.set(newValue.data.value);
633
+ }
634
+ else {
635
+ this.autopilotTarget.set(null);
636
+ console.warn('[Autopilot Widget] Autopilot V2 target is null or not available');
637
+ }
638
+ });
639
+ this.startDataSubscription();
640
+ }
641
+ startV1Subscriptions() {
642
+ // For V1, we use this single legacy path
643
+ this.widgetProperties.config.paths['autopilotMode'].path = API_PATHS.V1_MODE_PATH;
644
+ this.observeDataStream('autopilotMode', newValue => {
645
+ if (newValue.data?.value) {
646
+ this.apMode.set(newValue.data.value);
647
+ }
648
+ else {
649
+ this.apMode.set('off-line');
650
+ console.warn('[Autopilot Widget] Autopilot V1 mode state is null or not available');
651
+ }
652
+ });
653
+ this.observeDataStream('autopilotTargetHeading', newValue => this.autopilotTargetHeading.set(newValue.data.value != null ? newValue.data.value : 0));
654
+ this.observeDataStream('autopilotTargetWindHeading', newValue => this.autopilotTargetWindHeading.set(newValue.data.value != null ? newValue.data.value : 0));
655
+ this.startDataSubscription();
656
+ // Subscribe to V1 autopilot PUT state changes
657
+ this.subscribePutResponse();
658
+ // Not used in V1, but needed for UI state management
659
+ this.apState.set(null);
660
+ }
661
+ startDataSubscription() {
662
+ this.observeDataStream('courseXte', newValue => this.crossTrackError.set(newValue.data.value != null ? newValue.data.value : 0));
663
+ this.observeDataStream('rudderAngle', newValue => {
664
+ if (newValue.data.value === null) {
665
+ this.rudder.set(null);
666
+ }
667
+ else {
668
+ this.rudder.set(this.widgetProperties.config.autopilot.invertRudder ? -newValue.data.value : newValue.data.value);
669
+ }
670
+ });
671
+ if (this.widgetProperties.config.autopilot.headingDirectionTrue) {
672
+ this.observeDataStream('headingTrue', newValue => this.heading.set(newValue.data.value != null ? newValue.data.value : 0));
673
+ }
674
+ else {
675
+ this.observeDataStream('headingMag', newValue => this.heading.set(newValue.data.value != null ? newValue.data.value : 0));
676
+ }
677
+ this.observeDataStream('windAngleApparent', newValue => this.windAngleApparent.set(newValue.data.value != null ? newValue.data.value : 0));
678
+ }
679
+ subscribePutResponse() {
680
+ this._requests.subscribeRequest().pipe(takeUntilDestroyed(this._destroyRef)).subscribe(requestResult => {
681
+ if (requestResult.widgetUUID == this.widgetProperties.uuid) {
682
+ this.commandReceived(requestResult);
683
+ }
684
+ });
685
+ }
686
+ /**
687
+ * Creates a managed HTTP request with automatic cancellation and tracking
688
+ * @param observable The HTTP Observable to manage
689
+ * @returns Observable with takeUntilDestroyed and tracking
690
+ */
691
+ makeHttpRequest(observable) {
692
+ const request = observable.pipe(takeUntilDestroyed(this._destroyRef));
693
+ this.currentRequests.add(request);
694
+ return request.pipe(finalize(() => this.currentRequests.delete(request)));
695
+ }
696
+ /**
697
+ * Cancels all ongoing HTTP requests
698
+ */
699
+ cancelAllHttpRequests() {
700
+ // Observables with takeUntilDestroyed() auto-cancel, just clear tracking
701
+ this.currentRequests.clear();
702
+ }
703
+ buildAndSendCommand(cmd) {
704
+ const cmdAction = COMMANDS[cmd];
705
+ if (typeof cmdAction === 'undefined') {
706
+ alert('Unknown Autopilot command: ' + cmd);
707
+ return;
708
+ }
709
+ if ((this.actionToBeConfirmed !== '') && (this.actionToBeConfirmed !== cmd)) {
710
+ this.clearConfirmCmd();
711
+ }
712
+ if (((cmd === 'tackToPort') || (cmd === 'tackToStarboard')) && (this.actionToBeConfirmed === '')) {
713
+ this.confirmTack(cmd);
714
+ return;
715
+ }
716
+ if (((cmd === 'route' && this.apMode() === 'route') || (cmd === 'route' && this.apMode() === 'nav')) && (this.actionToBeConfirmed === '')) {
717
+ this.confirmAdvanceWaypoint(cmd);
718
+ return;
719
+ }
720
+ if (this.actionToBeConfirmed === cmd) {
721
+ this.clearConfirmCmd();
722
+ if ((cmd === 'tackToPort') || (cmd === 'tackToStarboard')) {
723
+ const direction = cmd === 'tackToPort' ? 'port' : 'starboard';
724
+ this.performTackOrGybe('tack', direction);
725
+ }
726
+ if ((cmd === 'route' && this.apMode() === 'route') || (cmd === 'route' && this.apMode() === 'nav')) {
727
+ this.routeCommand(cmd, COMMANDS['advanceWaypoint']);
728
+ }
729
+ return;
730
+ }
731
+ this.routeCommand(cmd, cmdAction);
732
+ }
733
+ routeCommand(cmd, cmdAction) {
734
+ const apiVersion = this.widgetProperties.config.autopilot.apiVersion;
735
+ if (apiVersion === 'v2') {
736
+ if (cmd === 'route' && this.apMode() === 'nav') {
737
+ cmd = 'advanceWaypoint';
738
+ }
739
+ this.sendV2Command(cmd);
740
+ }
741
+ else if (apiVersion === 'v1' && !cmdAction.path.startsWith('v2:')) {
742
+ // V1 command
743
+ this.sendV1Command(cmdAction);
744
+ }
745
+ else {
746
+ console.error('[Autopilot Widget] Unsupported basic command:', cmdAction.path);
747
+ this.displayApError({
748
+ statusCode: 400,
749
+ statusCodeDescription: 'Unsupported Command',
750
+ message: `Command path '${cmdAction.path}' is not supported in the current API version`,
751
+ widgetUUID: this.widgetProperties.uuid
752
+ });
753
+ }
754
+ }
755
+ sendV1Command(cmdAction) {
756
+ this._requests.putRequest(cmdAction["path"], cmdAction["value"], this.widgetProperties.uuid);
757
+ console.log("AP Action:\n" + JSON.stringify(cmdAction));
758
+ }
759
+ /**
760
+ * Executes V2 autopilot commands using REST endpoints
761
+ *
762
+ * Special Handling:
763
+ * - Dodge mode: Toggles between POST (activate) and DELETE (deactivate)
764
+ * - Tack/Gybe: Appends direction to endpoint path
765
+ * - State tracking: Updates dodgeModeActive signal on successful dodge operations
766
+ *
767
+ * @param cmd V2 command identifier
768
+ * @param cmdAction Optional V1 command for compatibility (unused in V2)
769
+ * @param value Optional command value (direction for tack/gybe, heading for target)
770
+ */
771
+ async sendV2Command(cmd, value) {
772
+ const endpoints = this.apiEndpoints;
773
+ if (!endpoints) {
774
+ console.error('V2 endpoints not available');
775
+ return;
776
+ }
777
+ const dodge = this.dodgeModeActive();
778
+ let targetCommand;
779
+ switch (cmd) {
780
+ case '+1':
781
+ targetCommand = {
782
+ path: !dodge ? endpoints.adjustHeading : endpoints.dodge,
783
+ value: { value: +1, units: "deg" }
784
+ };
785
+ this.executeRestRequest('PUT', targetCommand);
786
+ break;
787
+ case '+10':
788
+ targetCommand = {
789
+ path: !dodge ? endpoints.adjustHeading : endpoints.dodge,
790
+ value: { value: +10, units: "deg" }
791
+ };
792
+ this.executeRestRequest('PUT', targetCommand);
793
+ break;
794
+ case '-1':
795
+ targetCommand = {
796
+ path: !dodge ? endpoints.adjustHeading : endpoints.dodge,
797
+ value: { value: -1, units: "deg" }
798
+ };
799
+ this.executeRestRequest('PUT', targetCommand);
800
+ break;
801
+ case '-10':
802
+ targetCommand = {
803
+ path: !dodge ? endpoints.adjustHeading : endpoints.dodge,
804
+ value: { value: -10, units: "deg" }
805
+ };
806
+ this.executeRestRequest('PUT', targetCommand);
807
+ break;
808
+ case 'advanceWaypoint':
809
+ targetCommand = {
810
+ path: `${API_PATHS.V2_COURSE}/activeRoute/nextPoint`
811
+ };
812
+ this.executeRestRequest('PUT', targetCommand);
813
+ break;
814
+ case 'tack':
815
+ targetCommand = {
816
+ path: `${endpoints.tack}/${value.value}`
817
+ };
818
+ this.executeRestRequest('POST', targetCommand);
819
+ break;
820
+ case 'gybe':
821
+ targetCommand = {
822
+ path: `${endpoints.gybe}/${value}`
823
+ };
824
+ this.executeRestRequest('POST', targetCommand);
825
+ break;
826
+ case 'dodge':
827
+ targetCommand = {
828
+ path: endpoints.dodge
829
+ };
830
+ if (this.dodgeModeActive()) {
831
+ this.executeRestRequest('DELETE', targetCommand).then(response => {
832
+ if (response.statusCode !== 200) {
833
+ this.dodgeModeActive.set(false);
834
+ }
835
+ });
836
+ }
837
+ else {
838
+ this.executeRestRequest('POST', targetCommand).then(response => {
839
+ if (response.statusCode !== 200) {
840
+ this.dodgeModeActive.set(true);
841
+ }
842
+ });
843
+ }
844
+ break;
845
+ case 'target_heading':
846
+ targetCommand = {
847
+ path: endpoints.target,
848
+ value: value
849
+ };
850
+ this.executeRestRequest('PUT', targetCommand);
851
+ break;
852
+ case 'standby':
853
+ {
854
+ const targetCommand = {
855
+ path: `${this.apEngaged() ? endpoints.disengage : endpoints.engage}`
856
+ };
857
+ this.executeRestRequest('POST', targetCommand);
858
+ }
859
+ break;
860
+ case 'auto':
861
+ case 'compass':
862
+ case 'gps':
863
+ case 'wind':
864
+ case 'true wind':
865
+ case 'route':
866
+ case 'nav':
867
+ await this.setModeAndEnable(cmd, endpoints);
868
+ break;
869
+ default:
870
+ console.error('Unknown V2 command:', cmd);
871
+ this.displayApError({
872
+ statusCode: 400,
873
+ statusCodeDescription: 'Unknown Command',
874
+ message: `V2 command '${cmd}' is not supported`,
875
+ widgetUUID: this.widgetProperties.uuid
876
+ });
877
+ }
878
+ }
879
+ async executeRestRequest(method, cmd) {
880
+ try {
881
+ let response;
882
+ switch (method) {
883
+ case 'POST':
884
+ response = await lastValueFrom(this.makeHttpRequest(this.http.post(cmd.path, undefined)));
885
+ break;
886
+ case 'PUT':
887
+ response = await lastValueFrom(this.makeHttpRequest(this.http.put(cmd.path, cmd.value == null ? undefined : cmd.value)));
888
+ break;
889
+ case 'DELETE':
890
+ response = await lastValueFrom(this.makeHttpRequest(this.http.delete(cmd.path)));
891
+ break;
892
+ default:
893
+ console.error('[Autopilot Widget] Unsupported REST method:', method);
894
+ }
895
+ if (response && response.statusCode === 200) {
896
+ // console.log('[Autopilot Widget] V2 Command executed successfully:', cmd.path);
897
+ return response;
898
+ }
899
+ else {
900
+ console.warn('[Autopilot Widget] V2 Command completed with non-success status:', JSON.stringify(response));
901
+ return response || { statusCode: 0, message: 'Unavailable', state: 'not provided' };
902
+ }
903
+ }
904
+ catch (error) {
905
+ console.error('[Autopilot Widget] REST operation failed:', error);
906
+ // Display error to user for V2 command failures
907
+ this.displayApError({
908
+ statusCode: 500,
909
+ statusCodeDescription: 'V2 Command Failed',
910
+ message: `Failed to execute ${method} ${cmd.path}`,
911
+ widgetUUID: this.widgetProperties.uuid
912
+ });
913
+ return {
914
+ statusCode: 0,
915
+ message: error instanceof Error ? error.message : 'REST operation failed',
916
+ state: null
917
+ };
918
+ }
919
+ }
920
+ async setModeAndEnable(mode, endpoints) {
921
+ try {
922
+ const modeResp = await this.executeRestRequest('PUT', { path: endpoints.mode, value: { value: mode } });
923
+ if (modeResp.statusCode !== 200) {
924
+ console.error(`[Autopilot Widget] Failed to set mode '${mode}':`, modeResp);
925
+ return; // abort engage if setting mode failed
926
+ }
927
+ const engageResp = await this.executeRestRequest('PUT', { path: endpoints.state, value: { value: 'enabled' } });
928
+ if (engageResp.statusCode !== 200) {
929
+ console.error(`[Autopilot Widget] Failed to engage after mode '${mode}':`, engageResp);
930
+ }
931
+ }
932
+ catch (err) {
933
+ console.error('[Autopilot Widget] setModeAndEngage unexpected error:', err);
934
+ }
935
+ }
936
+ performTackOrGybe(operation, direction) {
937
+ if (this.widgetProperties.config.autopilot.apiVersion === 'v2') {
938
+ this.sendV2Command(operation, { value: direction });
939
+ }
940
+ else {
941
+ // Fall back to V1
942
+ if (operation !== 'tack')
943
+ return;
944
+ // console.log(`[Autopilot Widget] Executing V1 tack to ${direction}`);
945
+ const cmdAction = COMMANDS[direction === 'port' ? 'tackToPort' : 'tackToStarboard'];
946
+ this._requests.putRequest(cmdAction.path, cmdAction.value, this.widgetProperties.uuid);
947
+ }
948
+ }
949
+ // V2 Absolute Target Method (class only - no UI yet)
950
+ setAbsoluteTarget(heading) {
951
+ if (this.widgetProperties.config.autopilot.apiVersion === 'v2') {
952
+ this.sendV2Command('target_heading', { "value": heading, "units": "deg" });
953
+ }
954
+ else {
955
+ console.error('[Autopilot Widget] Absolute target only available in V2 API');
956
+ }
957
+ }
958
+ // V2 Dodge Method (class only - no UI yet)
959
+ toggleDodge() {
960
+ if (this.widgetProperties.config.autopilot.apiVersion === 'v2') {
961
+ this.sendV2Command('dodge');
962
+ }
963
+ else {
964
+ console.warn('[Autopilot Widget] Dodge mode only available in V2 API');
965
+ this.displayApError({
966
+ statusCode: 400,
967
+ statusCodeDescription: 'V2 API Required',
968
+ message: 'Dodge mode only available in V2 API',
969
+ widgetUUID: this.widgetProperties.uuid
970
+ });
971
+ }
972
+ }
973
+ commandReceived(cmdResult) {
974
+ if (cmdResult.statusCode != 200) {
975
+ this.displayApError(cmdResult);
976
+ }
977
+ else {
978
+ // console.log("AP Received: \n" + JSON.stringify(cmdResult));
979
+ }
980
+ }
981
+ confirmAdvanceWaypoint(cmd) {
982
+ const message = "Repeat key [Adv Wpt] to confirm";
983
+ this.startConfirmCmd(cmd, message);
984
+ }
985
+ confirmTack(cmd) {
986
+ let direction = "";
987
+ if (cmd === "tackToPort") {
988
+ direction = "Port";
989
+ this.actionToBeConfirmed = cmd;
990
+ }
991
+ else if (cmd === "tackToStarboard") {
992
+ direction = "Starboard";
993
+ this.actionToBeConfirmed = cmd;
994
+ }
995
+ else {
996
+ this.actionToBeConfirmed = "";
997
+ return;
998
+ }
999
+ const message = `Repeat [Tack ${direction}] key to confirm`;
1000
+ this.startConfirmCmd(cmd, message);
1001
+ }
1002
+ startConfirmCmd(cmd, message) {
1003
+ this.countDownValue = DEFAULTS.COUNTDOWN_SECONDS;
1004
+ this.actionToBeConfirmed = cmd;
1005
+ this.countdownOverlayText.set(message);
1006
+ this.countdownOverlayVisibility.set("visible");
1007
+ this.updateCountDownCounter(message);
1008
+ clearTimeout(this.handleConfirmActionTimeout);
1009
+ this.handleConfirmActionTimeout = setTimeout(() => {
1010
+ this.countdownOverlayVisibility.set("hidden");
1011
+ this.countdownOverlayText.set("");
1012
+ this.actionToBeConfirmed = "";
1013
+ }, DEFAULTS.MESSAGE_DISPLAY_DURATION);
1014
+ }
1015
+ clearConfirmCmd() {
1016
+ clearTimeout(this.handleConfirmActionTimeout);
1017
+ clearTimeout(this.handleCountDownCounterTimeout);
1018
+ this.countDownValue = -1;
1019
+ this.countdownOverlayVisibility.set("hidden");
1020
+ this.countdownOverlayText.set("");
1021
+ this.actionToBeConfirmed = '';
1022
+ }
1023
+ updateCountDownCounter(message) {
1024
+ if (this.countDownValue > 0) {
1025
+ clearTimeout(this.handleCountDownCounterTimeout);
1026
+ this.countdownOverlayText.set(message);
1027
+ this.countDownValue -= 1;
1028
+ this.handleCountDownCounterTimeout = setTimeout(() => {
1029
+ this.updateCountDownCounter(message);
1030
+ }, 1000);
1031
+ }
1032
+ else {
1033
+ this.countDownValue = -1;
1034
+ clearTimeout(this.handleCountDownCounterTimeout);
1035
+ }
1036
+ }
1037
+ displayApError(cmdResult) {
1038
+ // Don't override persistent offline errors with temporary command errors
1039
+ if (this.isPersistentError) {
1040
+ console.warn('[Autopilot Widget] Skipping temporary error display - persistent error active:', cmdResult.statusCodeDescription);
1041
+ return;
1042
+ }
1043
+ let errMsg = cmdResult.statusCode + " - " + cmdResult.statusCodeDescription + ".";
1044
+ if (cmdResult.message) {
1045
+ errMsg = errMsg + "Server Message: " + cmdResult.message + ".";
1046
+ }
1047
+ this.errorOverlayText.set(errMsg);
1048
+ this.errorOverlayVisibility.set("visible");
1049
+ clearTimeout(this.handleDisplayErrorTimeout);
1050
+ this.handleDisplayErrorTimeout = setTimeout(() => {
1051
+ // Only hide if it's not a persistent error
1052
+ if (!this.isPersistentError) {
1053
+ this.errorOverlayVisibility.set("hidden");
1054
+ this.errorOverlayText.set("");
1055
+ }
1056
+ }, DEFAULTS.ERROR_DISPLAY_DURATION);
1057
+ }
1058
+ toggleMenu() {
1059
+ this.menuOpen.set(!this.menuOpen());
1060
+ }
1061
+ onMenuItemClick(action) {
1062
+ if (action === 'cancel') {
1063
+ this.toggleMenu();
1064
+ return;
1065
+ }
1066
+ this.buildAndSendCommand(action);
1067
+ this.menuOpen.set(false);
1068
+ }
1069
+ parseMenuItems(menuItems, mode) {
1070
+ // Set enabled/disabled state for each mode menu item based
1071
+ const apiVersion = this.widgetProperties.config.autopilot.apiVersion;
1072
+ const parsedMenuItems = menuItems.map(item => {
1073
+ if (item.isCancel)
1074
+ return { ...item, current: false, disabled: false };
1075
+ let enabled = false;
1076
+ if (apiVersion === 'v1') {
1077
+ switch (mode) {
1078
+ case 'standby':
1079
+ enabled = (item.action === 'auto' || item.action === 'wind');
1080
+ break;
1081
+ case 'auto':
1082
+ enabled = (item.action === 'wind' || item.action === 'route');
1083
+ break;
1084
+ case 'wind':
1085
+ enabled = (item.action === 'auto');
1086
+ break;
1087
+ case 'route':
1088
+ enabled = (item.action === 'auto');
1089
+ break;
1090
+ default:
1091
+ enabled = false;
1092
+ }
1093
+ }
1094
+ else if (apiVersion === 'v2') {
1095
+ // For V2, check if the action is in the capabilities
1096
+ enabled = this.widgetProperties.config.autopilot.modes.includes(item.action);
1097
+ }
1098
+ return {
1099
+ ...item,
1100
+ current: item.action === mode,
1101
+ disabled: !enabled
1102
+ };
1103
+ });
1104
+ return parsedMenuItems;
1105
+ }
1106
+ ngOnDestroy() {
1107
+ // Cancel all ongoing HTTP requests
1108
+ this.cancelAllHttpRequests();
1109
+ // Clear any pending timeouts
1110
+ clearTimeout(this.handleCountDownCounterTimeout);
1111
+ clearTimeout(this.handleConfirmActionTimeout);
1112
+ clearTimeout(this.handleDisplayErrorTimeout);
1113
+ clearTimeout(this.handleMessageTimeout);
1114
+ // Clean up data streams
1115
+ this.destroyDataStreams();
1116
+ }
1117
+ };
1118
+ WidgetAutopilotComponent = __decorate([
1119
+ Component({
1120
+ selector: 'widget-autopilot',
1121
+ templateUrl: './widget-autopilot.component.html',
1122
+ styleUrls: ['./widget-autopilot.component.scss'],
1123
+ imports: [WidgetHostComponent, SvgAutopilotComponent, MatButtonModule, TitleCasePipe, MatIconModule, MatBadgeModule, WidgetPositionComponent, WidgetNumericComponent, WidgetDatetimeComponent],
1124
+ }),
1125
+ __metadata("design:paramtypes", [])
1126
+ ], WidgetAutopilotComponent);
1127
+ export { WidgetAutopilotComponent };
1128
+ //# sourceMappingURL=widget-autopilot.component.js.map