@kosdev-code/kos-ui-sdk 3.0.26 → 3.0.28

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 (339) hide show
  1. package/.kos.json +2 -1
  2. package/common/events/async-event-bus.d.ts +8 -11
  3. package/common/events/async-event-bus.d.ts.map +1 -1
  4. package/common/events/eventBus.d.ts +1 -18
  5. package/common/events/eventBus.d.ts.map +1 -1
  6. package/core/core/companion-instantiator.d.ts +5 -0
  7. package/core/core/companion-instantiator.d.ts.map +1 -1
  8. package/core/core/decorators/index.d.ts +1 -0
  9. package/core/core/decorators/index.d.ts.map +1 -1
  10. package/core/core/decorators/kos-child.d.ts +2 -3
  11. package/core/core/decorators/kos-child.d.ts.map +1 -1
  12. package/core/core/decorators/kos-companion.d.ts +26 -88
  13. package/core/core/decorators/kos-companion.d.ts.map +1 -1
  14. package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts +2 -0
  15. package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts.map +1 -0
  16. package/core/core/decorators/kos-container-aware.d.ts +191 -420
  17. package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
  18. package/core/core/decorators/kos-execute-service-request.d.ts +7 -11
  19. package/core/core/decorators/kos-execute-service-request.d.ts.map +1 -1
  20. package/core/core/decorators/kos-execution-context.d.ts +14 -31
  21. package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
  22. package/core/core/decorators/kos-future-aware.d.ts +21 -74
  23. package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
  24. package/core/core/decorators/kos-http-decorators.d.ts +18 -62
  25. package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
  26. package/core/core/decorators/kos-logger-aware.d.ts +10 -60
  27. package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
  28. package/core/core/decorators/kos-mixin.d.ts +69 -0
  29. package/core/core/decorators/kos-mixin.d.ts.map +1 -0
  30. package/core/core/decorators/kos-model-effect.d.ts +10 -9
  31. package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
  32. package/core/core/decorators/kos-multiple-future-aware.d.ts +21 -94
  33. package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
  34. package/core/core/decorators/kos-reload-aware.d.ts +14 -16
  35. package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
  36. package/core/core/decorators/kos-service-request.d.ts +80 -238
  37. package/core/core/decorators/kos-service-request.d.ts.map +1 -1
  38. package/core/core/decorators/kos-state-machine.d.ts +35 -275
  39. package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
  40. package/core/core/decorators/kos-topic-handler-flow-control.d.ts +11 -3
  41. package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
  42. package/core/core/decorators/kos-trouble-aware.d.ts +9 -43
  43. package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
  44. package/core/core/decorators/kos-view-model.d.ts +20 -100
  45. package/core/core/decorators/kos-view-model.d.ts.map +1 -1
  46. package/core/core/decorators/kosModel.d.ts.map +1 -1
  47. package/core/core/decorators/kosTopicHandler.d.ts +28 -89
  48. package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
  49. package/core/core/decorators/propKeys.d.ts +1 -0
  50. package/core/core/decorators/propKeys.d.ts.map +1 -1
  51. package/core/core/indexing/index.d.ts +2 -4
  52. package/core/core/indexing/index.d.ts.map +1 -1
  53. package/core/core/indexing/kos-container-index-aware.d.ts +17 -48
  54. package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
  55. package/core/core/indexing/kos-index-aware.d.ts +11 -37
  56. package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
  57. package/core/core/kos-container-index.d.ts +11 -0
  58. package/core/core/kos-container-index.d.ts.map +1 -1
  59. package/core/core/kos-container-model.d.ts +11 -32
  60. package/core/core/kos-container-model.d.ts.map +1 -1
  61. package/core/core/kos-data-container.d.ts +6 -6
  62. package/core/core/kos-data-container.d.ts.map +1 -1
  63. package/core/core/kosCore.d.ts +7 -4
  64. package/core/core/kosCore.d.ts.map +1 -1
  65. package/core/core/kosModel.d.ts +16 -8
  66. package/core/core/kosModel.d.ts.map +1 -1
  67. package/core/core/kosModelManager.d.ts +2 -3
  68. package/core/core/kosModelManager.d.ts.map +1 -1
  69. package/core/core/lifecycle/constants.d.ts +6 -2
  70. package/core/core/lifecycle/constants.d.ts.map +1 -1
  71. package/core/core/lifecycle/kosCoreLifecycle.d.ts +11 -1
  72. package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
  73. package/core/core/lifecycle/kosModelLifecycle.d.ts +6 -0
  74. package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
  75. package/core/core/lifecycle/model-machine.d.ts +6 -0
  76. package/core/core/lifecycle/model-machine.d.ts.map +1 -1
  77. package/core/core/model/kos-fsm-manager.d.ts +6 -0
  78. package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
  79. package/core/core/model/kos-offline-queue.d.ts +1 -1
  80. package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
  81. package/core/core/model/service-response-store.d.ts +2 -15
  82. package/core/core/model/service-response-store.d.ts.map +1 -1
  83. package/core/core/reconnect/reconnect-fixture.d.ts +17 -0
  84. package/core/core/reconnect/reconnect-fixture.d.ts.map +1 -0
  85. package/core/core/registration/model-registration.d.ts.map +1 -1
  86. package/core/core/services/app-startup-service.d.ts +5 -13
  87. package/core/core/services/app-startup-service.d.ts.map +1 -1
  88. package/core/core/services/intent-service.d.ts +3 -12
  89. package/core/core/services/intent-service.d.ts.map +1 -1
  90. package/core/core/transport/mock/mock-frames.d.ts +3 -3
  91. package/core/core/transport/transport.d.ts +1 -1
  92. package/core/core/transport/transport.d.ts.map +1 -1
  93. package/core/core/transport/webSocketTransport.d.ts +10 -0
  94. package/core/core/transport/webSocketTransport.d.ts.map +1 -1
  95. package/core/types/model.d.ts +4 -8
  96. package/core/types/model.d.ts.map +1 -1
  97. package/core/types/service-response-store.d.ts +3 -11
  98. package/core/types/service-response-store.d.ts.map +1 -1
  99. package/core/types/utils/kos-fetch.d.ts +25 -37
  100. package/core/types/utils/kos-fetch.d.ts.map +1 -1
  101. package/core/util/abortable-when.d.ts +5 -6
  102. package/core/util/abortable-when.d.ts.map +1 -1
  103. package/core/util/ancestor-path-visitor.d.ts +14 -20
  104. package/core/util/ancestor-path-visitor.d.ts.map +1 -1
  105. package/core/util/container-utils.d.ts +26 -159
  106. package/core/util/container-utils.d.ts.map +1 -1
  107. package/core/util/date-utils.d.ts +9 -58
  108. package/core/util/date-utils.d.ts.map +1 -1
  109. package/core/util/debounce.d.ts +1 -8
  110. package/core/util/debounce.d.ts.map +1 -1
  111. package/core/util/kos-fetch.d.ts +1 -1
  112. package/core/util/kos-fetch.d.ts.map +1 -1
  113. package/core/util/kos-model-utils.d.ts +10 -11
  114. package/core/util/kos-model-utils.d.ts.map +1 -1
  115. package/core/util/model-attribute-utils.d.ts +5 -22
  116. package/core/util/model-attribute-utils.d.ts.map +1 -1
  117. package/core/util/model-type-guards.d.ts.map +1 -1
  118. package/core/util/promise-utils.d.ts +1 -26
  119. package/core/util/promise-utils.d.ts.map +1 -1
  120. package/core/util/service-factory.d.ts +5 -23
  121. package/core/util/service-factory.d.ts.map +1 -1
  122. package/core/util/service-request-error.d.ts +3 -5
  123. package/core/util/service-request-error.d.ts.map +1 -1
  124. package/core/util/service-response.d.ts +12 -67
  125. package/core/util/service-response.d.ts.map +1 -1
  126. package/core/util/transport-not-ready-error.d.ts +11 -13
  127. package/core/util/transport-not-ready-error.d.ts.map +1 -1
  128. package/core/util/when-ready.d.ts +1 -8
  129. package/core/util/when-ready.d.ts.map +1 -1
  130. package/index.cjs +692 -11760
  131. package/index.cjs.map +1 -1
  132. package/index.js +774 -11846
  133. package/index.js.map +1 -1
  134. package/models/decorators/future-service.d.ts +7 -7
  135. package/models/models/browser-router/browser-router-model.d.ts +10 -39
  136. package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
  137. package/models/models/browser-router/browser-router-registration.d.ts +5 -77
  138. package/models/models/browser-router/browser-router-registration.d.ts.map +1 -1
  139. package/models/models/browser-router/types/index.d.ts +2 -16
  140. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts +5 -77
  141. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts.map +1 -1
  142. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts +5 -75
  143. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts.map +1 -1
  144. package/models/models/config-bean/config-bean-model-builder.d.ts +4 -11
  145. package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
  146. package/models/models/config-bean/config-bean-model.d.ts +23 -66
  147. package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
  148. package/models/models/config-bean-prop/config-bean-prop-model.d.ts +15 -62
  149. package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
  150. package/models/models/config-bean-prop/types/index.d.ts +34 -215
  151. package/models/models/device/device-model.d.ts +20 -199
  152. package/models/models/device/device-model.d.ts.map +1 -1
  153. package/models/models/device/device-registration.d.ts +7 -87
  154. package/models/models/device/device-registration.d.ts.map +1 -1
  155. package/models/models/device/types/index.d.ts +5 -34
  156. package/models/models/future/future-aware.d.ts +7 -71
  157. package/models/models/future/future-aware.d.ts.map +1 -1
  158. package/models/models/future/future-model-builder.d.ts +2 -2
  159. package/models/models/future/future-model.d.ts +3 -23
  160. package/models/models/future/future-model.d.ts.map +1 -1
  161. package/models/models/future/future-types.d.ts +28 -145
  162. package/models/models/future/future-types.d.ts.map +1 -1
  163. package/models/models/gpio-chip/gpio-chip-builders.d.ts +14 -0
  164. package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -0
  165. package/models/models/gpio-chip/gpio-chip-container-model.d.ts +2 -1
  166. package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
  167. package/models/models/key-value/key-value-model.d.ts +12 -72
  168. package/models/models/key-value/key-value-model.d.ts.map +1 -1
  169. package/models/models/key-value/key-value-registration.d.ts +5 -77
  170. package/models/models/key-value/key-value-registration.d.ts.map +1 -1
  171. package/models/models/key-value/services/key-value-services.d.ts +13 -72
  172. package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
  173. package/models/models/key-value/types/index.d.ts +3 -46
  174. package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts +29 -0
  175. package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts.map +1 -0
  176. package/models/models/kos-expression-evaluator/index.d.ts +1 -0
  177. package/models/models/kos-expression-evaluator/index.d.ts.map +1 -1
  178. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +73 -105
  179. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
  180. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +2 -12
  181. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -1
  182. package/models/models/kos-log-manager/kos-log-manager-model.d.ts +7 -46
  183. package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
  184. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +5 -80
  185. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -1
  186. package/models/models/kos-log-manager/types/index.d.ts +13 -156
  187. package/models/models/kos-time/kos-time-model.d.ts +8 -39
  188. package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
  189. package/models/models/kos-time/kos-time-registration.d.ts +6 -73
  190. package/models/models/kos-time/kos-time-registration.d.ts.map +1 -1
  191. package/models/models/kos-time/types/index.d.ts +3 -58
  192. package/models/models/log-block/log-block-container-model.d.ts +2 -118
  193. package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
  194. package/models/models/log-block/log-block-container-registration.d.ts +5 -75
  195. package/models/models/log-block/log-block-container-registration.d.ts.map +1 -1
  196. package/models/models/log-block/log-block-model.d.ts +5 -168
  197. package/models/models/log-block/log-block-model.d.ts.map +1 -1
  198. package/models/models/log-block/log-block-registration.d.ts +5 -75
  199. package/models/models/log-block/log-block-registration.d.ts.map +1 -1
  200. package/models/models/log-block/types/index.d.ts +14 -81
  201. package/models/models/log-stream/log-stream-container-model.d.ts +8 -35
  202. package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
  203. package/models/models/log-stream/log-stream-container-registration.d.ts +5 -75
  204. package/models/models/log-stream/log-stream-container-registration.d.ts.map +1 -1
  205. package/models/models/log-stream/log-stream-model.d.ts +8 -29
  206. package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
  207. package/models/models/log-stream/log-stream-registration.d.ts +5 -75
  208. package/models/models/log-stream/log-stream-registration.d.ts.map +1 -1
  209. package/models/models/log-stream/types/index.d.ts +5 -60
  210. package/models/models/network-interface/network-interface-container-model.d.ts +6 -35
  211. package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
  212. package/models/models/network-interface/network-interface-container-registration.d.ts +5 -73
  213. package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
  214. package/models/models/network-interface/network-interface-model.d.ts +5 -43
  215. package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
  216. package/models/models/network-interface/network-interface-registration.d.ts +5 -73
  217. package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
  218. package/models/models/network-interface/types/index.d.ts +2 -16
  219. package/models/models/ota/ota-model.d.ts +11 -39
  220. package/models/models/ota/ota-model.d.ts.map +1 -1
  221. package/models/models/ota/ota-registration.d.ts +5 -77
  222. package/models/models/ota/ota-registration.d.ts.map +1 -1
  223. package/models/models/ota/types/index.d.ts +2 -141
  224. package/models/models/region-info/types/index.d.ts +19 -99
  225. package/models/models/region-info/types/index.d.ts.map +1 -1
  226. package/models/models/software-info/services/software-info-services.d.ts +2 -14
  227. package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
  228. package/models/models/software-info/software-info-model.d.ts +3 -39
  229. package/models/models/software-info/software-info-model.d.ts.map +1 -1
  230. package/models/models/software-info/software-info-registration.d.ts +6 -73
  231. package/models/models/software-info/software-info-registration.d.ts.map +1 -1
  232. package/models/models/software-info/types/index.d.ts +6 -20
  233. package/models/models/state-bean/state-bean-model.d.ts +10 -41
  234. package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
  235. package/models/models/state-bean/state-bean-registration.d.ts +6 -73
  236. package/models/models/state-bean/state-bean-registration.d.ts.map +1 -1
  237. package/models/models/state-bean/types/index.d.ts +4 -84
  238. package/models/models/state-prop/state-prop-model.d.ts +6 -40
  239. package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
  240. package/models/models/state-prop/state-prop-registration.d.ts +6 -73
  241. package/models/models/state-prop/state-prop-registration.d.ts.map +1 -1
  242. package/models/models/state-prop/types/index.d.ts +5 -37
  243. package/models/models/storage-device/storage-device-container-model.d.ts +7 -273
  244. package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
  245. package/models/models/storage-device/storage-device-container-registration.d.ts +5 -75
  246. package/models/models/storage-device/storage-device-container-registration.d.ts.map +1 -1
  247. package/models/models/storage-device/storage-device-model.d.ts +3 -49
  248. package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
  249. package/models/models/storage-device/storage-device-registration.d.ts +5 -75
  250. package/models/models/storage-device/storage-device-registration.d.ts.map +1 -1
  251. package/models/models/storage-device/types/index.d.ts +13 -82
  252. package/models/models/studio-properties/studio-properties-model.d.ts +13 -36
  253. package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
  254. package/models/models/studio-properties/studio-properties-registration.d.ts +5 -75
  255. package/models/models/studio-properties/studio-properties-registration.d.ts.map +1 -1
  256. package/models/models/studio-properties/types/index.d.ts +2 -24
  257. package/models/models/translation/descriptor-merge.d.ts +13 -17
  258. package/models/models/translation/descriptor-merge.d.ts.map +1 -1
  259. package/models/models/translation/services/translation-services.d.ts +19 -77
  260. package/models/models/translation/services/translation-services.d.ts.map +1 -1
  261. package/models/models/translation/test-harness.d.ts +6 -8
  262. package/models/models/translation/test-harness.d.ts.map +1 -1
  263. package/models/models/translation/translation-container-model.d.ts +7 -59
  264. package/models/models/translation/translation-container-model.d.ts.map +1 -1
  265. package/models/models/translation/translation-container-registration.d.ts +6 -73
  266. package/models/models/translation/translation-container-registration.d.ts.map +1 -1
  267. package/models/models/translation/translation-model.d.ts +17 -50
  268. package/models/models/translation/translation-model.d.ts.map +1 -1
  269. package/models/models/translation/translation-registration.d.ts +6 -73
  270. package/models/models/translation/translation-registration.d.ts.map +1 -1
  271. package/models/models/translation/types/index.d.ts +51 -276
  272. package/models/models/trouble/trouble-registration.d.ts +6 -73
  273. package/models/models/trouble/trouble-registration.d.ts.map +1 -1
  274. package/models/models/trouble/types/index.d.ts +17 -188
  275. package/models/models/trouble/utils/is-trouble-aware.d.ts +4 -85
  276. package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
  277. package/models/models/trouble-container/trouble-builders.d.ts +11 -0
  278. package/models/models/trouble-container/trouble-builders.d.ts.map +1 -0
  279. package/models/models/trouble-container/trouble-container-model.d.ts +2 -1
  280. package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
  281. package/models/models/usb-update/usb-update-container-registration.d.ts +5 -75
  282. package/models/models/usb-update/usb-update-container-registration.d.ts.map +1 -1
  283. package/models/models/usb-update/usb-update-registration.d.ts +5 -75
  284. package/models/models/usb-update/usb-update-registration.d.ts.map +1 -1
  285. package/models/types/cancellable-promise.d.ts +6 -9
  286. package/models/types/cancellable-promise.d.ts.map +1 -1
  287. package/models/utils/await-future-call.d.ts +9 -21
  288. package/models/utils/await-future-call.d.ts.map +1 -1
  289. package/models/utils/cancellable-future-call.d.ts +8 -19
  290. package/models/utils/cancellable-future-call.d.ts.map +1 -1
  291. package/models/utils/cancellable-service.d.ts +14 -23
  292. package/models/utils/cancellable-service.d.ts.map +1 -1
  293. package/models/utils/conversion-utils.d.ts +8 -48
  294. package/models/utils/conversion-utils.d.ts.map +1 -1
  295. package/models/utils/persistence-store.d.ts +1 -1
  296. package/models/utils/service.d.ts +14 -48
  297. package/models/utils/service.d.ts.map +1 -1
  298. package/models/utils/services/kos/daily/service.d.ts +4 -4
  299. package/models/utils/services/vfs/daily/service.d.ts +4 -4
  300. package/models/utils/timer-manager.d.ts.map +1 -1
  301. package/package.json +2 -2
  302. package/{index-D52vEGXT.cjs → software-info-registration-Le3V0a6v.cjs} +11906 -416
  303. package/software-info-registration-Le3V0a6v.cjs.map +1 -0
  304. package/{index-Csq0zQtb.js → software-info-registration-kSGacOka.js} +12116 -625
  305. package/software-info-registration-kSGacOka.js.map +1 -0
  306. package/testing/index.d.ts +32 -34
  307. package/testing/index.d.ts.map +1 -1
  308. package/testing.cjs +2 -1
  309. package/testing.cjs.map +1 -1
  310. package/testing.js +2 -1
  311. package/testing.js.map +1 -1
  312. package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts +9 -0
  313. package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts.map +1 -0
  314. package/ui/components/connection-dev-button/index.d.ts +36 -0
  315. package/ui/components/connection-dev-button/index.d.ts.map +1 -0
  316. package/ui/components/connection-dev-button/use-connection-dev-state.d.ts +29 -0
  317. package/ui/components/connection-dev-button/use-connection-dev-state.d.ts.map +1 -0
  318. package/ui/components/index.d.ts +1 -0
  319. package/ui/components/index.d.ts.map +1 -1
  320. package/ui/features/canvas/hooks/use-image-renderer.d.ts +5 -4
  321. package/ui/features/canvas/hooks/use-image-renderer.d.ts.map +1 -1
  322. package/ui/hooks/use-function-warmup.d.ts +4 -14
  323. package/ui/hooks/use-function-warmup.d.ts.map +1 -1
  324. package/ui/hooks/use-kos-date-formats.d.ts +15 -29
  325. package/ui/hooks/use-kos-date-formats.d.ts.map +1 -1
  326. package/ui/hooks/use-kos-region-timezones.d.ts +4 -55
  327. package/ui/hooks/use-kos-region-timezones.d.ts.map +1 -1
  328. package/ui/hooks/use-kos-regions.d.ts +11 -23
  329. package/ui/hooks/use-kos-regions.d.ts.map +1 -1
  330. package/ui/hooks/use-kos-time-formats.d.ts +16 -31
  331. package/ui/hooks/use-kos-time-formats.d.ts.map +1 -1
  332. package/ui/hooks/use-kos-unit-systems.d.ts +13 -27
  333. package/ui/hooks/use-kos-unit-systems.d.ts.map +1 -1
  334. package/ui/hooks/view-model/use-view-model.d.ts +6 -31
  335. package/ui/hooks/view-model/use-view-model.d.ts.map +1 -1
  336. package/ui/policies/reload-on-disconnect-policy.d.ts +5 -6
  337. package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
  338. package/index-Csq0zQtb.js.map +0 -1
  339. package/index-D52vEGXT.cjs.map +0 -1
@@ -2,30 +2,11 @@ import { IKosDataModel } from '../../../core';
2
2
  import { FutureResponse } from '../../../services/future';
3
3
  import { FutureContainer, IFutureModel } from '../../future/future-types';
4
4
  /**
5
- * Configuration options for creating or updating a Trouble model.
6
- *
7
- * This interface defines all the properties that can be set when initializing
8
- * a trouble instance. Troubles represent issues, alerts, or conditions that
9
- * require attention in the KOS system.
5
+ * Options for creating or updating a {@link TroubleModel}, usually mapped from
6
+ * the trouble data the backend sends.
10
7
  *
11
8
  * @template AdditionalData - Optional type parameter for domain-specific trouble data
12
9
  *
13
- * @example
14
- * ```typescript
15
- * const troubleOptions: TroubleOptions = {
16
- * id: 'low-fluid-001',
17
- * type: 'FLUID_LEVEL',
18
- * reason: 'Fluid level below minimum threshold',
19
- * rank: 7,
20
- * role: 'operator',
21
- * color: 'orange',
22
- * resolvable: true,
23
- * ifaces: ['fluid-monitor', 'alert-system'],
24
- * tags: ['maintenance', 'fluid', 'warning'],
25
- * createTime: new Date().toISOString()
26
- * };
27
- * ```
28
- *
29
10
  * @kosService core.trouble-aware
30
11
  * @group KOS Model
31
12
  * @category Types
@@ -66,34 +47,17 @@ export interface TroubleOptions<AdditionalData extends object = any> {
66
47
  }
67
48
 
68
49
  /**
69
- * Represents a trouble (issue, alert, or condition) in the KOS system.
70
- *
71
- * TroubleModel is the core interface for managing system issues, warnings, and
72
- * alerts throughout the KOS platform. It provides a unified way to track,
73
- * display, resolve, and defer various types of operational issues.
74
- *
75
- * ## Key Features
76
- * - **Priority ranking** - Troubles are ranked 1-10 for severity
77
- * - **Role-based visibility** - Troubles can be filtered by user role
78
- * - **Resolution support** - Resolvable troubles can be cleared through actions
79
- * - **Deferral capability** - Troubles can be temporarily deferred
80
- * - **Future integration** - Async resolution through futures
81
- * - **Type categorization** - Troubles grouped by type for filtering
82
- * - **Visual indicators** - Color coding for UI representation
50
+ * An issue, alert or condition reported by the device. A trouble has a rank,
51
+ * type, role and color for display, and may be resolvable (through a future) or
52
+ * deferrable.
83
53
  *
84
54
  * @template AdditionalData - Type parameter for domain-specific trouble data
85
55
  *
86
56
  * @interface
87
- * @example Basic Usage
57
+ * @example
88
58
  * ```typescript
89
- * function handleTrouble(trouble: TroubleModel) {
90
- * if (trouble.rank >= 8) {
91
- * console.error(`Critical trouble: ${trouble.reason}`);
92
- * }
93
- *
94
- * if (trouble.resolvable) {
95
- * const futureResponse = await trouble.resolve();
96
- * }
59
+ * if (trouble.resolvable) {
60
+ * await trouble.resolve();
97
61
  * }
98
62
  * ```
99
63
  *
@@ -189,22 +153,8 @@ export interface ContainerTroubleData {
189
153
  }
190
154
 
191
155
  /**
192
- * Interface for objects that can be resolved asynchronously.
193
- *
194
- * Provides a standard resolution mechanism for troubles and other
195
- * resolvable conditions in the KOS system. Resolution typically
196
- * involves sending a command to clear the condition.
197
- *
198
- * @example
199
- * ```typescript
200
- * class ResolvableTrouble implements ResolveAware {
201
- * async resolve(tracker?: string) {
202
- * console.log(`Resolving with tracker: ${tracker}`);
203
- * const response = await sendResolveCommand(this.id, tracker);
204
- * return response;
205
- * }
206
- * }
207
- * ```
156
+ * Something that can be resolved asynchronously, usually by sending the
157
+ * backend a command that clears the condition.
208
158
  *
209
159
  * @kosService core.trouble-aware
210
160
  * @group KOS Model
@@ -221,35 +171,8 @@ export interface ResolveAware {
221
171
  }
222
172
 
223
173
  /**
224
- * Interface for objects that support deferral of actions.
225
- *
226
- * Deferral allows temporary postponement of trouble handling or
227
- * other actions. Deferred items can be cleared to restore normal
228
- * processing. This is useful for managing low-priority issues
229
- * during critical operations.
230
- *
231
- * @example
232
- * ```typescript
233
- * class DeferrableTrouble implements DeferAware {
234
- * shouldDefer = false;
235
- * deferred = false;
236
- *
237
- * defer() {
238
- * this.deferred = true;
239
- * console.log('Trouble deferred');
240
- * }
241
- *
242
- * clearDefer() {
243
- * this.deferred = false;
244
- * console.log('Deferral cleared');
245
- * }
246
- * }
247
- *
248
- * // Usage
249
- * if (trouble.shouldDefer && !trouble.deferred) {
250
- * trouble.defer();
251
- * }
252
- * ```
174
+ * Something whose handling can be postponed. A deferred item stays deferred
175
+ * until `clearDefer` is called.
253
176
  *
254
177
  * @kosService core.trouble-aware
255
178
  * @group KOS Model
@@ -266,87 +189,8 @@ export interface DeferAware {
266
189
  clearDefer: VoidFunction;
267
190
  }
268
191
  /**
269
- * Interface for models that can track and expose trouble states.
270
- *
271
- * TroubleAware provides a standardized way for KOS models to expose
272
- * their trouble states, making it easy to monitor, display, and react
273
- * to issues throughout the system. Any model implementing this interface
274
- * can be monitored for troubles and integrated with trouble management UI.
275
- *
276
- * ## Key Concepts
277
- * - **Trouble aggregation** - Models can aggregate troubles from multiple sources
278
- * - **Status summary** - Provides a single status string for quick checks
279
- * - **Type grouping** - Troubles organized by type for filtering and display
280
- * - **Read-only access** - Troubles are exposed as readonly for safety
281
- *
282
- * @example
283
- * ```typescript
284
- * // Check if a model has troubles
285
- * function checkModelHealth(model: TroubleAware) {
286
- * if (model.troubles.length > 0) {
287
- * console.warn(`Model has ${model.troubles.length} troubles`);
288
- * console.warn(`Status: ${model.troubleStatus}`);
289
- *
290
- * // Check specific trouble types
291
- * const errors = model.troublesByType['ERROR'] || [];
292
- * const warnings = model.troublesByType['WARNING'] || [];
293
- *
294
- * if (errors.length > 0) {
295
- * handleCriticalErrors(errors);
296
- * }
297
- * }
298
- * }
299
- * ```
300
- *
301
- * @example
302
- * ```typescript
303
- * // React component using TroubleAware
304
- * const TroubleIndicator: React.FC<{ model: TroubleAware }> = ({ model }) => {
305
- * const troubles = model.troubles;
306
- * const highPriority = troubles.filter(t => t.rank >= 7);
307
- *
308
- * if (troubles.length === 0) {
309
- * return <StatusIcon color="green" />;
310
- * }
311
- *
312
- * return (
313
- * <div className="trouble-indicator">
314
- * <StatusIcon color={highPriority.length > 0 ? 'red' : 'yellow'} />
315
- * <span>{model.troubleStatus}</span>
316
- * <Badge count={troubles.length} />
317
- * </div>
318
- * );
319
- * };
320
- * ```
321
- *
322
- * @example
323
- * ```typescript
324
- * // Implementing TroubleAware
325
- * class MyModel implements TroubleAware {
326
- * private _troubles: TroubleModel[] = [];
327
- *
328
- * get troubles(): readonly TroubleModel[] {
329
- * return this._troubles;
330
- * }
331
- *
332
- * get troubleStatus(): string {
333
- * if (this._troubles.length === 0) return 'OK';
334
- * const highest = this._troubles.reduce((max, t) =>
335
- * t.rank > max.rank ? t : max
336
- * );
337
- * return highest.reason || 'Unknown issue';
338
- * }
339
- *
340
- * get troublesByType(): Record<string, TroubleModel[]> {
341
- * return this._troubles.reduce((groups, trouble) => {
342
- * const type = trouble.type;
343
- * groups[type] = groups[type] || [];
344
- * groups[type].push(trouble);
345
- * return groups;
346
- * }, {} as Record<string, TroubleModel[]>);
347
- * }
348
- * }
349
- * ```
192
+ * A model that exposes the troubles affecting it, so trouble UI and hooks such
193
+ * as `useTroubleDecoration` can monitor it.
350
194
  *
351
195
  * @kosService core.trouble-aware
352
196
  * @group KOS Model
@@ -357,27 +201,12 @@ export interface DeferAware {
357
201
  * @see {@link useTroubleDecoration} - Hook for trouble-based styling
358
202
  */
359
203
  export interface TroubleAware {
360
- /**
361
- * Array of troubles directly related to this model.
362
- * Troubles are typically sorted by rank (highest priority first).
363
- */
204
+ /** Troubles directly related to this model. */
364
205
  readonly troubles: TroubleModel[];
365
206
 
366
- /**
367
- * Summary status string representing the highest priority trouble.
368
- * Returns a human-readable status or 'OK' if no troubles exist.
369
- */
207
+ /** Summary status derived from the model's troubles. */
370
208
  readonly troubleStatus: string;
371
209
 
372
- /**
373
- * Troubles organized by their type property.
374
- * Useful for filtering and categorized display of issues.
375
- *
376
- * @example
377
- * ```typescript
378
- * const errorTroubles = model.troublesByType['ERROR'] || [];
379
- * const warningTroubles = model.troublesByType['WARNING'] || [];
380
- * ```
381
- */
210
+ /** Troubles grouped by their `type`. */
382
211
  readonly troublesByType: Record<string, TroubleModel[]>;
383
212
  }
@@ -1,94 +1,13 @@
1
1
  import { TroubleAware } from '../types';
2
2
  /**
3
- * Type guard function to check if an object implements the TroubleAware interface.
4
- *
5
- * This function performs runtime validation to determine whether a given object
6
- * has the necessary properties and structure to be considered trouble-aware.
7
- * It checks for the presence of both the `troubles` array and `troublesByType`
8
- * object, which are required by the TroubleAware interface.
3
+ * Type guard for {@link TroubleAware}: true when `obj` has a `troubles` array
4
+ * and a `troublesByType` object. It checks structure only, not the contents.
9
5
  *
10
6
  * @category Utilities
11
7
  * @category Trouble Management
12
8
  *
13
- * @param obj - The object to check for trouble awareness. Can be any type.
14
- *
15
- * @returns `true` if the object implements TroubleAware interface, `false` otherwise.
16
- * When this function returns true, TypeScript will narrow the type of `obj`
17
- * to `TroubleAware` in the current scope.
18
- *
19
- * @example
20
- * ```typescript
21
- * // Basic type guard usage
22
- * function processModel(model: IKosDataModel) {
23
- * if (isTroubleAware(model)) {
24
- * // TypeScript now knows model has troubles property
25
- * console.log(`Found ${model.troubles.length} troubles`);
26
- * console.log(`Trouble status: ${model.troubleStatus}`);
27
- * } else {
28
- * console.log('Model is not trouble-aware');
29
- * }
30
- * }
31
- * ```
32
- *
33
- * @example
34
- * ```typescript
35
- * // Using with React hooks for conditional trouble handling
36
- * const TroubleDisplay: React.FC<{ model: IKosDataModel }> = ({ model }) => {
37
- * if (!isTroubleAware(model)) {
38
- * return <div>No trouble tracking available</div>;
39
- * }
40
- *
41
- * // Safe to access trouble properties here
42
- * const criticalTroubles = model.troubles.filter(t => t.rank > 8);
43
- * const troubleTypes = Object.keys(model.troublesByType);
44
- *
45
- * return (
46
- * <div>
47
- * <h3>Trouble Status: {model.troubleStatus}</h3>
48
- * <p>Critical issues: {criticalTroubles.length}</p>
49
- * <p>Types: {troubleTypes.join(', ')}</p>
50
- * </div>
51
- * );
52
- * };
53
- * ```
54
- *
55
- * @example
56
- * ```typescript
57
- * // Filtering trouble-aware models from a collection
58
- * const models: IKosDataModel[] = getAllModels();
59
- * const troubleAwareModels = models.filter(isTroubleAware);
60
- *
61
- * // TypeScript knows troubleAwareModels is TroubleAware[]
62
- * troubleAwareModels.forEach(model => {
63
- * const troublesByType = model.troublesByType;
64
- * Object.entries(troublesByType).forEach(([type, troubles]) => {
65
- * console.log(`Type ${type}: ${troubles.length} troubles`);
66
- * });
67
- * });
68
- * ```
69
- *
70
- * @example
71
- * ```typescript
72
- * // Early return pattern for non-trouble-aware models
73
- * function calculateTroubleSeverity(model: any): number {
74
- * if (!isTroubleAware(model)) {
75
- * return 0; // No troubles means no severity
76
- * }
77
- *
78
- * // Calculate weighted severity based on trouble ranks
79
- * return model.troubles.reduce((total, trouble) => {
80
- * return total + (trouble.rank * (trouble.deferred ? 0.5 : 1));
81
- * }, 0);
82
- * }
83
- * ```
84
- *
85
- * @remarks
86
- * - This is a runtime check, not a compile-time check
87
- * - The function checks for structural compatibility, not nominal typing
88
- * - It validates that `troubles` is specifically an Array instance, not just array-like
89
- * - The `troublesByType` property must be an object (not null or undefined)
90
- * - Does not validate the contents of the arrays or object, only their presence and type
91
- * - This function is commonly used as a guard before accessing trouble-related properties
9
+ * @param obj - The object to check
10
+ * @returns `true` if the object implements TroubleAware
92
11
  *
93
12
  * @see {@link TroubleAware} - The interface this function checks for
94
13
  * @see {@link useTroubleDecoration} - Hook that uses this guard internally
@@ -1 +1 @@
1
- {"version":3,"file":"is-trouble-aware.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/models/models/trouble/utils/is-trouble-aware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,wBAAgB,cAAc,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,YAAY,CAO7D"}
1
+ {"version":3,"file":"is-trouble-aware.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/models/models/trouble/utils/is-trouble-aware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,YAAY,CAO7D"}
@@ -0,0 +1,11 @@
1
+ import { TroubleResponse } from '../trouble/services';
2
+ import { TroubleModel, TroubleOptions } from '../trouble/types';
3
+ export interface TroubleDto {
4
+ id: string;
5
+ servicePath: string;
6
+ trouble: TroubleResponse;
7
+ }
8
+ export declare function mapTroubleToOptions(dto: TroubleDto): TroubleOptions;
9
+ export declare function createTroubleModel(dto: TroubleDto): TroubleModel;
10
+ export declare function mapTroubleToDto(trouble: TroubleResponse, servicePath: string): TroubleDto;
11
+ //# sourceMappingURL=trouble-builders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trouble-builders.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/trouble-container/trouble-builders.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE1E,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,UAAU,GAAG,cAAc,CAWnE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,UAAU,GAAG,YAAY,CAEhE;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,MAAM,GAClB,UAAU,CAEZ"}
@@ -1,10 +1,11 @@
1
1
  import { IKosDataModel, IKosIdentifiable, KosContainerAwareWithProp, KosFutureAwareFull, KosLoggerAware, KosModelRegistrationType, PublicModelInterface } from '../../../core';
2
2
  import { TroubleResponse } from '../trouble/services';
3
3
  import { TroubleModel } from '../trouble/types';
4
+ import { TroubleDto } from './trouble-builders';
4
5
  import { TroubleContainerOptions } from './types';
5
6
  export declare const MODEL_TYPE = "trouble-container-model";
6
7
  export type TroubleContainerModel = PublicModelInterface<TroubleContainerModelImpl>;
7
- export interface TroubleContainerModelImpl extends KosContainerAwareWithProp<TroubleModel, "troubles">, KosFutureAwareFull, KosLoggerAware {
8
+ export interface TroubleContainerModelImpl extends KosContainerAwareWithProp<TroubleModel, "troubles", TroubleDto>, KosFutureAwareFull, KosLoggerAware {
8
9
  }
9
10
  export declare class Troubles {
10
11
  static readonly INDEX_TROUBLES_BY_IFACE = "byIface";
@@ -1 +1 @@
1
- {"version":3,"file":"trouble-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/trouble-container/trouble-container-model.ts"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AASvB,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAiDvD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AAEpD,MAAM,MAAM,qBAAqB,GAC/B,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;AAClD,MAAM,WAAW,yBACf,SAAQ,yBAAyB,CAAC,YAAY,EAAE,UAAU,CAAC,EACzD,kBAAkB,EAClB,cAAc;CAAG;AACrB,qBAAa,QAAQ;IACnB,MAAM,CAAC,QAAQ,CAAC,uBAAuB,aAAa;IACpD,MAAM,CAAC,QAAQ,CAAC,sBAAsB,YAAY;IAClD,MAAM,CAAC,QAAQ,CAAC,uBAAuB,aAAa;IACpD,MAAM,CAAC,QAAQ,CAAC,0BAA0B,gBAAgB;IAC1D,MAAM,CAAC,QAAQ,CAAC,aAAa,UAAU;IACvC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,UAAU;CAC5C;AACD,qBAea,yBACX,YAAW,gBAAgB,EAAE,aAAa;IAE1C,MAAM,CAAC,YAAY,EAAE,wBAAwB,CAC3C,yBAAyB,EACzB,uBAAuB,CACxB,CAAC;IACF,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,SAAuB;gBACtB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;IAMvD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAkBvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAyBrB,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM;IAYjC,oBAAoB,CAAC,EAAE,EAAE,MAAM;IAW/B,kBAAkB,CAAC,OAAO,EAAE,eAAe;CAiB5C"}
1
+ {"version":3,"file":"trouble-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/trouble-container/trouble-container-model.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AAEpD,MAAM,MAAM,qBAAqB,GAC/B,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;AAClD,MAAM,WAAW,yBACf,SAAQ,yBAAyB,CAAC,YAAY,EAAE,UAAU,EAAE,UAAU,CAAC,EACrE,kBAAkB,EAClB,cAAc;CAAG;AACrB,qBAAa,QAAQ;IACnB,MAAM,CAAC,QAAQ,CAAC,uBAAuB,aAAa;IACpD,MAAM,CAAC,QAAQ,CAAC,sBAAsB,YAAY;IAClD,MAAM,CAAC,QAAQ,CAAC,uBAAuB,aAAa;IACpD,MAAM,CAAC,QAAQ,CAAC,0BAA0B,gBAAgB;IAC1D,MAAM,CAAC,QAAQ,CAAC,aAAa,UAAU;IACvC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,UAAU;CAC5C;AACD,qBAgBa,yBACX,YAAW,gBAAgB,EAAE,aAAa;IAE1C,MAAM,CAAC,YAAY,EAAE,wBAAwB,CAC3C,yBAAyB,EACzB,uBAAuB,CACxB,CAAC;IACF,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,SAAuB;gBACtB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;IAMvD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IASvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBrB,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM;IAYjC,oBAAoB,CAAC,EAAE,EAAE,MAAM;IAW/B,kBAAkB,CAAC,OAAO,EAAE,eAAe;CAQ5C"}
@@ -2,85 +2,15 @@ import { SingletonKosModelRegistrationFactory } from '../../../core';
2
2
  import { UsbUpdateContainerOptions } from './types';
3
3
  import { UsbUpdateContainerModel } from './usb-update-container-model';
4
4
  /**
5
- * # UsbUpdateContainer
5
+ * Registration for {@link UsbUpdateContainerModel}, a singleton model.
6
6
  *
7
- * The registration bean includes convenience methods for creating and working with UsbUpdateContainerModel instances.
8
- *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
12
- * used when declaring dependencies on models.
13
- *
14
- * @example
15
- * ```typescript
16
- *
17
- * @kosDependency({modelType: UsbUpdateContainer.type, id: "usbUpdateContainerId"})
18
- * private usbUpdateContainerModel: UsbUpdateContainerModel;
19
- * ```
20
- *
21
- *
22
- * ## factory
23
- *
24
- * The factory method creates a factory function that can be used to create new UsbUpdateContainerModel instances.
25
- *
26
-
27
- * As this is a singleton model, the factory function accepts the model options as its argument.
28
- *
29
- * If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
30
- * in this case and the existing model will be returned in its current state.
31
- *
32
- * @example
33
- * ```typescript
34
- * const model = UsbUpdateContainer.factory({
35
- * // Add option data
36
- * });
37
- * ```
38
-
39
-
40
- *
41
- * ## predicate
42
- *
43
- * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a UsbUpdateContainerModel.
7
+ * `type` identifies the model in the registry and in `@kosDependency` declarations.
8
+ * `register()` adds the model to the registry. `instance()` builds or returns the single instance; later calls ignore the options.
44
9
  *
45
10
  * @example
46
11
  * ```typescript
47
- *
48
- * const model: IKosDataModel = ...; // some model
49
- *
50
- * if (UsbUpdateContainer.predicate(model)) {
51
- * // if the function evaluates to true, the model is narrowed down to UsbUpdateContainerModel
52
- * // and the compiler will know that the model has the UsbUpdateContainerModel interface
53
- * model.updateAvailability(false);
54
- * }
12
+ * const model = UsbUpdateContainer.instance().options(options).build();
55
13
  * ```
56
- *
57
- * ## registration
58
- *
59
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
60
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
61
- *
62
- *
63
- * @example
64
- *
65
- * In an application registration file you can declare the model registration as follows:
66
- *
67
- * **registration.ts**
68
- * ```typescript
69
- * import { UsbUpdateContainer } from "@kosdev-code/kos-dispense-sdk";
70
- * ...
71
- * import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
72
- * export const kosModels: IKosRegistry["models"] = {
73
- * ...UsbUpdateContainer.registration,
74
- * };
75
- * ```
76
- *
77
- * ## registration.singleton
78
-
79
- * The usbUpdateContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
80
- * If the model does not yet exist, it will be created passing in the provided options to initialize it.
81
- *
82
- * Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
83
-
84
- * */
14
+ */
85
15
  export declare const UsbUpdateContainer: SingletonKosModelRegistrationFactory<UsbUpdateContainerModel, UsbUpdateContainerOptions>;
86
16
  //# sourceMappingURL=usb-update-container-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usb-update-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/usb-update/usb-update-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAO5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,kBAAkB,0FAM7B,CAAC"}
1
+ {"version":3,"file":"usb-update-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/usb-update/usb-update-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAO5E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,0FAM7B,CAAC"}
@@ -2,85 +2,15 @@ import { KosModelRegistrationFactory } from '../../../core';
2
2
  import { UsbUpdateOptions } from './types';
3
3
  import { UsbUpdateModel } from './usb-update-model';
4
4
  /**
5
- * # UsbUpdate
5
+ * Registration for {@link UsbUpdateModel}.
6
6
  *
7
- * The registration bean includes convenience methods for creating and working with UsbUpdateModel instances.
8
- *
9
- * ## type
10
- * The type property is a string that identifies the model type.
11
- * The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
12
- * used when declaring dependencies on models.
13
- *
14
- * @example
15
- * ```typescript
16
- *
17
- * @kosDependency({modelType: UsbUpdate.type, id: "usbUpdateId"})
18
- * private usbUpdateModel: UsbUpdateModel;
19
- * ```
20
- *
21
- *
22
- * ## factory
23
- *
24
- * The factory method creates a factory function that can be used to create new UsbUpdateModel instances.
25
- *
26
-
27
- * The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
28
- *
29
- * If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
30
- * in this case and the existing model will be returned in its current state.
7
+ * `type` identifies the model in the registry and in `@kosDependency` declarations.
8
+ * `register()` adds the model to the registry. `instance(id)` builds the model, or returns the existing one when the id is already in use.
31
9
  *
32
10
  * @example
33
11
  * ```typescript
34
- * const model = UsbUpdate.factory("usbUpdateId")({
35
- * // Add option data
36
- * });
12
+ * const model = UsbUpdate.instance("usbUpdateId").options(options).build();
37
13
  * ```
38
-
39
-
40
- *
41
- * ## predicate
42
- *
43
- * [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a UsbUpdateModel.
44
- *
45
- * @example
46
- * ```typescript
47
- *
48
- * const model: IKosDataModel = ...; // some model
49
- *
50
- * if (UsbUpdate.predicate(model)) {
51
- * // if the function evaluates to true, the model is narrowed down to UsbUpdateModel
52
- * // and the compiler will know that the model has the UsbUpdateModel interface
53
- * model.updateAvailability(false);
54
- * }
55
- * ```
56
- *
57
- * ## registration
58
- *
59
- * The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
60
- * can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
61
- *
62
- *
63
- * @example
64
- *
65
- * In an application registration file you can declare the model registration as follows:
66
- *
67
- * **registration.ts**
68
- * ```typescript
69
- * import { UsbUpdate } from "@kos-ui/project-models";
70
- * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
71
- *
72
- * import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
73
- *
74
- * KosModelRegistry.dispense
75
- * .models()
76
- * .model(UsbUpdate);
77
- * ```
78
- *
79
- * ## registration.singleton
80
-
81
- * The usbUpdate model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.
82
- * If the factory function is called with an ID that already exists, the existing model will be returned.
83
-
84
- * */
14
+ */
85
15
  export declare const UsbUpdate: KosModelRegistrationFactory<UsbUpdateModel, UsbUpdateOptions>;
86
16
  //# sourceMappingURL=usb-update-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usb-update-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/usb-update/usb-update-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,SAAS,+DAMpB,CAAC"}
1
+ {"version":3,"file":"usb-update-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/usb-update/usb-update-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,+DAMpB,CAAC"}
@@ -1,16 +1,14 @@
1
1
  /**
2
2
  * A long-running operation whose progress can be observed imperatively.
3
3
  *
4
- * This is the consumer-facing contract for progress surfaces (progress
5
- * notifications, status indicators, modals): they depend on this interface,
6
- * never on the producer. Producers adapt their source to it — e.g.
7
- * `awaitFutureCall` adapts a KOS Future, but an XHR upload or an aggregate
8
- * over several operations can implement it just as well.
4
+ * Progress surfaces (notifications, status indicators, modals) depend on this
5
+ * interface rather than on any producer. `awaitFutureCall` adapts a KOS Future
6
+ * to it; an upload or an aggregate of several operations can implement it too.
9
7
  */
10
8
  export interface ProgressOperation<T = unknown> extends Promise<T> {
11
9
  /**
12
- * Percent complete, 0-100. Values <= 0 mean the operation has not reported
13
- * real progress yet — consumers should render an indeterminate state.
10
+ * Percent complete, 0-100. A value of 0 or less means the operation has not
11
+ * reported progress yet, so consumers should show an indeterminate state.
14
12
  */
15
13
  readonly progress: number;
16
14
  /**
@@ -33,8 +31,7 @@ export interface ProgressOperation<T = unknown> extends Promise<T> {
33
31
  */
34
32
  cancel(): Promise<void>;
35
33
  /**
36
- * Check if this operation was cancelled. Optional — consumers must treat
37
- * a missing implementation as "unknown".
34
+ * Whether the operation was cancelled. Treat a missing implementation as unknown.
38
35
  */
39
36
  isCancelled?(): boolean;
40
37
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cancellable-promise.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/models/types/cancellable-promise.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAChE;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,IAAI,OAAO,CAAC;IAExB;;;OAGG;IACH,gBAAgB,CACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GACnD,MAAM,IAAI,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IACjE;;OAEG;IACH,aAAa,IAAI,eAAe,GAAG,SAAS,CAAC;IAE7C;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB,CAAC,CAAC;IAC1C,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,GAAG,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,eAAe,CAAC,EAAE,eAAe,EACjC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAClC,MAAM,CAAC,EAAE,GAAG,GACX,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACzB,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,GACpC,kBAAkB,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"cancellable-promise.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/models/types/cancellable-promise.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAChE;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,IAAI,OAAO,CAAC;IAExB;;;OAGG;IACH,gBAAgB,CACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GACnD,MAAM,IAAI,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IACjE;;OAEG;IACH,aAAa,IAAI,eAAe,GAAG,SAAS,CAAC;IAE7C;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB,CAAC,CAAC;IAC1C,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,GAAG,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,eAAe,CAAC,EAAE,eAAe,EACjC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAClC,MAAM,CAAC,EAAE,GAAG,GACX,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACzB,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,GACpC,kBAAkB,CAAC,CAAC,CAAC,CAAC"}