@kosdev-code/kos-ui-sdk 3.0.25 → 3.0.27

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 (355) hide show
  1. package/.kos.json +3 -2
  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 +25 -87
  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 +67 -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 +22 -131
  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 -14
  35. package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
  36. package/core/core/decorators/kos-service-request-helpers.d.ts +3 -1
  37. package/core/core/decorators/kos-service-request-helpers.d.ts.map +1 -1
  38. package/core/core/decorators/kos-service-request.d.ts +85 -265
  39. package/core/core/decorators/kos-service-request.d.ts.map +1 -1
  40. package/core/core/decorators/kos-state-machine.d.ts +44 -273
  41. package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
  42. package/core/core/decorators/kos-topic-handler-flow-control.d.ts +37 -29
  43. package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
  44. package/core/core/decorators/kos-trouble-aware.d.ts +9 -43
  45. package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
  46. package/core/core/decorators/kos-view-model.d.ts +20 -100
  47. package/core/core/decorators/kos-view-model.d.ts.map +1 -1
  48. package/core/core/decorators/kosDependency.d.ts +4 -2
  49. package/core/core/decorators/kosDependency.d.ts.map +1 -1
  50. package/core/core/decorators/kosModel.d.ts.map +1 -1
  51. package/core/core/decorators/kosTopicHandler.d.ts +28 -98
  52. package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
  53. package/core/core/decorators/propKeys.d.ts +1 -0
  54. package/core/core/decorators/propKeys.d.ts.map +1 -1
  55. package/core/core/extension/extension-manager.d.ts.map +1 -1
  56. package/core/core/indexing/index.d.ts +2 -4
  57. package/core/core/indexing/index.d.ts.map +1 -1
  58. package/core/core/indexing/kos-container-index-aware.d.ts +17 -48
  59. package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
  60. package/core/core/indexing/kos-index-aware.d.ts +11 -37
  61. package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
  62. package/core/core/kos-container-index.d.ts +11 -0
  63. package/core/core/kos-container-index.d.ts.map +1 -1
  64. package/core/core/kos-container-model.d.ts +11 -32
  65. package/core/core/kos-container-model.d.ts.map +1 -1
  66. package/core/core/kos-data-container.d.ts +6 -6
  67. package/core/core/kos-data-container.d.ts.map +1 -1
  68. package/core/core/kosCore.d.ts +22 -4
  69. package/core/core/kosCore.d.ts.map +1 -1
  70. package/core/core/kosModel.d.ts +21 -8
  71. package/core/core/kosModel.d.ts.map +1 -1
  72. package/core/core/kosModelManager.d.ts +2 -3
  73. package/core/core/kosModelManager.d.ts.map +1 -1
  74. package/core/core/lifecycle/constants.d.ts +6 -2
  75. package/core/core/lifecycle/constants.d.ts.map +1 -1
  76. package/core/core/lifecycle/kosCoreLifecycle.d.ts +11 -1
  77. package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
  78. package/core/core/lifecycle/kosModelLifecycle.d.ts +6 -0
  79. package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
  80. package/core/core/lifecycle/model-machine.d.ts +6 -0
  81. package/core/core/lifecycle/model-machine.d.ts.map +1 -1
  82. package/core/core/model/kos-fsm-manager.d.ts +6 -0
  83. package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
  84. package/core/core/model/kos-model-component-factory.d.ts +1 -1
  85. package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
  86. package/core/core/model/kos-offline-queue.d.ts +1 -1
  87. package/core/core/model/kos-service-request-manager.d.ts +7 -2
  88. package/core/core/model/kos-service-request-manager.d.ts.map +1 -1
  89. package/core/core/model/kos-subscription-manager.d.ts +2 -2
  90. package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
  91. package/core/core/model/service-response-store.d.ts +4 -16
  92. package/core/core/model/service-response-store.d.ts.map +1 -1
  93. package/core/core/reconnect/reconnect-fixture.d.ts +17 -0
  94. package/core/core/reconnect/reconnect-fixture.d.ts.map +1 -0
  95. package/core/core/registration/model-registration.d.ts.map +1 -1
  96. package/core/core/services/app-startup-service.d.ts +5 -13
  97. package/core/core/services/app-startup-service.d.ts.map +1 -1
  98. package/core/core/services/intent-service.d.ts +3 -12
  99. package/core/core/services/intent-service.d.ts.map +1 -1
  100. package/core/core/transport/mock/mock-frames.d.ts +3 -3
  101. package/core/core/transport/transport.d.ts +1 -1
  102. package/core/core/transport/transport.d.ts.map +1 -1
  103. package/core/core/transport/webSocketTransport.d.ts +10 -0
  104. package/core/core/transport/webSocketTransport.d.ts.map +1 -1
  105. package/core/types/kos-dependency.d.ts +13 -4
  106. package/core/types/kos-dependency.d.ts.map +1 -1
  107. package/core/types/model.d.ts +4 -8
  108. package/core/types/model.d.ts.map +1 -1
  109. package/core/types/service-response-store.d.ts +3 -15
  110. package/core/types/service-response-store.d.ts.map +1 -1
  111. package/core/types/utils/kos-fetch.d.ts +25 -37
  112. package/core/types/utils/kos-fetch.d.ts.map +1 -1
  113. package/core/util/abortable-when.d.ts +5 -6
  114. package/core/util/abortable-when.d.ts.map +1 -1
  115. package/core/util/ancestor-path-visitor.d.ts +14 -20
  116. package/core/util/ancestor-path-visitor.d.ts.map +1 -1
  117. package/core/util/container-utils.d.ts +26 -159
  118. package/core/util/container-utils.d.ts.map +1 -1
  119. package/core/util/date-utils.d.ts +9 -58
  120. package/core/util/date-utils.d.ts.map +1 -1
  121. package/core/util/debounce.d.ts +1 -8
  122. package/core/util/debounce.d.ts.map +1 -1
  123. package/core/util/kos-fetch.d.ts +1 -1
  124. package/core/util/kos-fetch.d.ts.map +1 -1
  125. package/core/util/kos-model-utils.d.ts +10 -11
  126. package/core/util/kos-model-utils.d.ts.map +1 -1
  127. package/core/util/model-attribute-utils.d.ts +5 -22
  128. package/core/util/model-attribute-utils.d.ts.map +1 -1
  129. package/core/util/model-type-guards.d.ts.map +1 -1
  130. package/core/util/model-utils.d.ts.map +1 -1
  131. package/core/util/promise-utils.d.ts +1 -26
  132. package/core/util/promise-utils.d.ts.map +1 -1
  133. package/core/util/service-factory.d.ts +5 -23
  134. package/core/util/service-factory.d.ts.map +1 -1
  135. package/core/util/service-request-error.d.ts +3 -5
  136. package/core/util/service-request-error.d.ts.map +1 -1
  137. package/core/util/service-response.d.ts +12 -67
  138. package/core/util/service-response.d.ts.map +1 -1
  139. package/core/util/transport-not-ready-error.d.ts +11 -13
  140. package/core/util/transport-not-ready-error.d.ts.map +1 -1
  141. package/core/util/when-ready.d.ts +1 -8
  142. package/core/util/when-ready.d.ts.map +1 -1
  143. package/index.cjs +983 -11777
  144. package/index.cjs.map +1 -1
  145. package/index.js +1056 -11854
  146. package/index.js.map +1 -1
  147. package/models/decorators/future-service.d.ts +7 -7
  148. package/models/models/browser-router/browser-router-model.d.ts +10 -39
  149. package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
  150. package/models/models/browser-router/browser-router-registration.d.ts +5 -77
  151. package/models/models/browser-router/browser-router-registration.d.ts.map +1 -1
  152. package/models/models/browser-router/types/index.d.ts +2 -16
  153. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts +5 -77
  154. package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts.map +1 -1
  155. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts +5 -75
  156. package/models/models/canvas-renderer/canvas-renderer-registration.d.ts.map +1 -1
  157. package/models/models/config-bean/config-bean-model-builder.d.ts +4 -11
  158. package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
  159. package/models/models/config-bean/config-bean-model.d.ts +23 -66
  160. package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
  161. package/models/models/config-bean-prop/config-bean-prop-model.d.ts +15 -62
  162. package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
  163. package/models/models/config-bean-prop/types/index.d.ts +34 -215
  164. package/models/models/device/device-model.d.ts +20 -199
  165. package/models/models/device/device-model.d.ts.map +1 -1
  166. package/models/models/device/device-registration.d.ts +7 -87
  167. package/models/models/device/device-registration.d.ts.map +1 -1
  168. package/models/models/device/types/index.d.ts +5 -34
  169. package/models/models/future/future-aware.d.ts +7 -71
  170. package/models/models/future/future-aware.d.ts.map +1 -1
  171. package/models/models/future/future-model-builder.d.ts +2 -2
  172. package/models/models/future/future-model.d.ts +3 -23
  173. package/models/models/future/future-model.d.ts.map +1 -1
  174. package/models/models/future/future-types.d.ts +28 -145
  175. package/models/models/future/future-types.d.ts.map +1 -1
  176. package/models/models/gpio-chip/gpio-chip-builders.d.ts +14 -0
  177. package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -0
  178. package/models/models/gpio-chip/gpio-chip-container-model.d.ts +2 -1
  179. package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
  180. package/models/models/key-value/key-value-model.d.ts +12 -72
  181. package/models/models/key-value/key-value-model.d.ts.map +1 -1
  182. package/models/models/key-value/key-value-registration.d.ts +5 -77
  183. package/models/models/key-value/key-value-registration.d.ts.map +1 -1
  184. package/models/models/key-value/services/key-value-services.d.ts +13 -72
  185. package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
  186. package/models/models/key-value/types/index.d.ts +3 -46
  187. package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts +29 -0
  188. package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts.map +1 -0
  189. package/models/models/kos-expression-evaluator/index.d.ts +1 -0
  190. package/models/models/kos-expression-evaluator/index.d.ts.map +1 -1
  191. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +73 -105
  192. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
  193. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +2 -12
  194. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -1
  195. package/models/models/kos-log-manager/kos-log-manager-model.d.ts +7 -46
  196. package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
  197. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +5 -80
  198. package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -1
  199. package/models/models/kos-log-manager/types/index.d.ts +13 -156
  200. package/models/models/kos-time/kos-time-model.d.ts +8 -39
  201. package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
  202. package/models/models/kos-time/kos-time-registration.d.ts +6 -73
  203. package/models/models/kos-time/kos-time-registration.d.ts.map +1 -1
  204. package/models/models/kos-time/types/index.d.ts +3 -58
  205. package/models/models/log-block/log-block-container-model.d.ts +2 -118
  206. package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
  207. package/models/models/log-block/log-block-container-registration.d.ts +5 -75
  208. package/models/models/log-block/log-block-container-registration.d.ts.map +1 -1
  209. package/models/models/log-block/log-block-model.d.ts +5 -168
  210. package/models/models/log-block/log-block-model.d.ts.map +1 -1
  211. package/models/models/log-block/log-block-registration.d.ts +5 -75
  212. package/models/models/log-block/log-block-registration.d.ts.map +1 -1
  213. package/models/models/log-block/types/index.d.ts +14 -81
  214. package/models/models/log-stream/log-stream-container-model.d.ts +8 -35
  215. package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
  216. package/models/models/log-stream/log-stream-container-registration.d.ts +5 -75
  217. package/models/models/log-stream/log-stream-container-registration.d.ts.map +1 -1
  218. package/models/models/log-stream/log-stream-model.d.ts +8 -29
  219. package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
  220. package/models/models/log-stream/log-stream-registration.d.ts +5 -75
  221. package/models/models/log-stream/log-stream-registration.d.ts.map +1 -1
  222. package/models/models/log-stream/types/index.d.ts +5 -60
  223. package/models/models/network-interface/network-interface-container-model.d.ts +6 -35
  224. package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
  225. package/models/models/network-interface/network-interface-container-registration.d.ts +5 -73
  226. package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
  227. package/models/models/network-interface/network-interface-model.d.ts +5 -43
  228. package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
  229. package/models/models/network-interface/network-interface-registration.d.ts +5 -73
  230. package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
  231. package/models/models/network-interface/types/index.d.ts +2 -16
  232. package/models/models/ota/ota-model.d.ts +11 -39
  233. package/models/models/ota/ota-model.d.ts.map +1 -1
  234. package/models/models/ota/ota-registration.d.ts +5 -77
  235. package/models/models/ota/ota-registration.d.ts.map +1 -1
  236. package/models/models/ota/types/index.d.ts +2 -141
  237. package/models/models/region-info/types/index.d.ts +19 -99
  238. package/models/models/region-info/types/index.d.ts.map +1 -1
  239. package/models/models/software-info/services/software-info-services.d.ts +2 -14
  240. package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
  241. package/models/models/software-info/software-info-model.d.ts +3 -39
  242. package/models/models/software-info/software-info-model.d.ts.map +1 -1
  243. package/models/models/software-info/software-info-registration.d.ts +6 -73
  244. package/models/models/software-info/software-info-registration.d.ts.map +1 -1
  245. package/models/models/software-info/types/index.d.ts +6 -20
  246. package/models/models/state-bean/state-bean-model.d.ts +10 -41
  247. package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
  248. package/models/models/state-bean/state-bean-registration.d.ts +6 -73
  249. package/models/models/state-bean/state-bean-registration.d.ts.map +1 -1
  250. package/models/models/state-bean/types/index.d.ts +4 -84
  251. package/models/models/state-prop/state-prop-model.d.ts +6 -40
  252. package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
  253. package/models/models/state-prop/state-prop-registration.d.ts +6 -73
  254. package/models/models/state-prop/state-prop-registration.d.ts.map +1 -1
  255. package/models/models/state-prop/types/index.d.ts +5 -37
  256. package/models/models/storage-device/storage-device-container-model.d.ts +7 -273
  257. package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
  258. package/models/models/storage-device/storage-device-container-registration.d.ts +5 -75
  259. package/models/models/storage-device/storage-device-container-registration.d.ts.map +1 -1
  260. package/models/models/storage-device/storage-device-model.d.ts +3 -49
  261. package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
  262. package/models/models/storage-device/storage-device-registration.d.ts +5 -75
  263. package/models/models/storage-device/storage-device-registration.d.ts.map +1 -1
  264. package/models/models/storage-device/types/index.d.ts +13 -82
  265. package/models/models/studio-properties/studio-properties-model.d.ts +13 -36
  266. package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
  267. package/models/models/studio-properties/studio-properties-registration.d.ts +5 -75
  268. package/models/models/studio-properties/studio-properties-registration.d.ts.map +1 -1
  269. package/models/models/studio-properties/types/index.d.ts +2 -24
  270. package/models/models/translation/descriptor-merge.d.ts +13 -17
  271. package/models/models/translation/descriptor-merge.d.ts.map +1 -1
  272. package/models/models/translation/services/translation-services.d.ts +19 -77
  273. package/models/models/translation/services/translation-services.d.ts.map +1 -1
  274. package/models/models/translation/test-harness.d.ts +6 -8
  275. package/models/models/translation/test-harness.d.ts.map +1 -1
  276. package/models/models/translation/translation-container-model.d.ts +7 -59
  277. package/models/models/translation/translation-container-model.d.ts.map +1 -1
  278. package/models/models/translation/translation-container-registration.d.ts +6 -73
  279. package/models/models/translation/translation-container-registration.d.ts.map +1 -1
  280. package/models/models/translation/translation-model.d.ts +17 -50
  281. package/models/models/translation/translation-model.d.ts.map +1 -1
  282. package/models/models/translation/translation-registration.d.ts +6 -73
  283. package/models/models/translation/translation-registration.d.ts.map +1 -1
  284. package/models/models/translation/types/index.d.ts +51 -276
  285. package/models/models/trouble/trouble-registration.d.ts +6 -73
  286. package/models/models/trouble/trouble-registration.d.ts.map +1 -1
  287. package/models/models/trouble/types/index.d.ts +17 -188
  288. package/models/models/trouble/utils/is-trouble-aware.d.ts +4 -85
  289. package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
  290. package/models/models/trouble-container/trouble-builders.d.ts +11 -0
  291. package/models/models/trouble-container/trouble-builders.d.ts.map +1 -0
  292. package/models/models/trouble-container/trouble-container-model.d.ts +2 -1
  293. package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
  294. package/models/models/usb-update/usb-update-container-registration.d.ts +5 -75
  295. package/models/models/usb-update/usb-update-container-registration.d.ts.map +1 -1
  296. package/models/models/usb-update/usb-update-registration.d.ts +5 -75
  297. package/models/models/usb-update/usb-update-registration.d.ts.map +1 -1
  298. package/models/types/cancellable-promise.d.ts +6 -9
  299. package/models/types/cancellable-promise.d.ts.map +1 -1
  300. package/models/utils/await-future-call.d.ts +9 -21
  301. package/models/utils/await-future-call.d.ts.map +1 -1
  302. package/models/utils/cancellable-future-call.d.ts +8 -19
  303. package/models/utils/cancellable-future-call.d.ts.map +1 -1
  304. package/models/utils/cancellable-service.d.ts +14 -23
  305. package/models/utils/cancellable-service.d.ts.map +1 -1
  306. package/models/utils/conversion-utils.d.ts +8 -48
  307. package/models/utils/conversion-utils.d.ts.map +1 -1
  308. package/models/utils/persistence-store.d.ts +1 -1
  309. package/models/utils/service.d.ts +14 -48
  310. package/models/utils/service.d.ts.map +1 -1
  311. package/models/utils/services/kos/daily/service.d.ts +5 -5
  312. package/models/utils/services/kos/daily/service.d.ts.map +1 -1
  313. package/models/utils/services/vfs/daily/service.d.ts +5 -5
  314. package/models/utils/services/vfs/daily/service.d.ts.map +1 -1
  315. package/models/utils/timer-manager.d.ts.map +1 -1
  316. package/package.json +2 -2
  317. package/{index-CRb8ucfF.cjs → software-info-registration-Le3V0a6v.cjs} +12187 -986
  318. package/software-info-registration-Le3V0a6v.cjs.map +1 -0
  319. package/software-info-registration-kSGacOka.js +24809 -0
  320. package/software-info-registration-kSGacOka.js.map +1 -0
  321. package/testing/index.d.ts +32 -34
  322. package/testing/index.d.ts.map +1 -1
  323. package/testing.cjs +2 -1
  324. package/testing.cjs.map +1 -1
  325. package/testing.js +2 -1
  326. package/testing.js.map +1 -1
  327. package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts +9 -0
  328. package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts.map +1 -0
  329. package/ui/components/connection-dev-button/index.d.ts +36 -0
  330. package/ui/components/connection-dev-button/index.d.ts.map +1 -0
  331. package/ui/components/connection-dev-button/use-connection-dev-state.d.ts +29 -0
  332. package/ui/components/connection-dev-button/use-connection-dev-state.d.ts.map +1 -0
  333. package/ui/components/index.d.ts +1 -0
  334. package/ui/components/index.d.ts.map +1 -1
  335. package/ui/features/canvas/hooks/use-image-renderer.d.ts +5 -4
  336. package/ui/features/canvas/hooks/use-image-renderer.d.ts.map +1 -1
  337. package/ui/hooks/use-function-warmup.d.ts +4 -14
  338. package/ui/hooks/use-function-warmup.d.ts.map +1 -1
  339. package/ui/hooks/use-kos-date-formats.d.ts +15 -29
  340. package/ui/hooks/use-kos-date-formats.d.ts.map +1 -1
  341. package/ui/hooks/use-kos-region-timezones.d.ts +4 -55
  342. package/ui/hooks/use-kos-region-timezones.d.ts.map +1 -1
  343. package/ui/hooks/use-kos-regions.d.ts +11 -23
  344. package/ui/hooks/use-kos-regions.d.ts.map +1 -1
  345. package/ui/hooks/use-kos-time-formats.d.ts +16 -31
  346. package/ui/hooks/use-kos-time-formats.d.ts.map +1 -1
  347. package/ui/hooks/use-kos-unit-systems.d.ts +13 -27
  348. package/ui/hooks/use-kos-unit-systems.d.ts.map +1 -1
  349. package/ui/hooks/view-model/use-view-model.d.ts +6 -31
  350. package/ui/hooks/view-model/use-view-model.d.ts.map +1 -1
  351. package/ui/policies/reload-on-disconnect-policy.d.ts +5 -6
  352. package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
  353. package/index-CRb8ucfF.cjs.map +0 -1
  354. package/index-YzHb2lnB.js +0 -13607
  355. package/index-YzHb2lnB.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"kos-container-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-container-aware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AACtC;;;;;;;GAOG;AACH,MAAM,WAAW,wBAAwB,CACvC,CAAC,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EAAE,GAAG,IAAI,CAAC;IAE/B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C;;;;;OAKG;IACH,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAEvC;;;;OAIG;IACH,IAAI,EAAE,CAAC,EAAE,CAAC;CACX;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,MAAM,MAAM,yBAAyB,CACnC,CAAC,SAAS,aAAa,GAAG,aAAa,EACvC,CAAC,SAAS,MAAM,GAAG,WAAW,IAC5B,qBAAqB,CAAC,CAAC,CAAC,GAAG;KAC5B,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkJG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,EACvE,OAAO,CAAC,EAAE,wBAAwB,CAAC,CAAC,CAAC,GACpC,cAAc,CAuBhB"}
1
+ {"version":3,"file":"kos-container-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-container-aware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CA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;GA8CG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,SAAS,aAAa,GAAG,aAAa,EACvC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,GAAG,EAC9B,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,CAAC,EAC5B,OAAO,CAAC,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAwB7D"}
@@ -3,9 +3,9 @@ import { KosExecutionContext } from './kos-execution-context';
3
3
  import { KosLoggerAware } from './kos-logger-aware';
4
4
  import { HttpMethod, ServiceRequestExecutor } from './kos-service-request';
5
5
  /**
6
- * Run a METHOD-DRIVEN service request, collapsing the four steps every such
7
- * method repeats: guard the injected context, await the error-first tuple, log
8
- * a failure, and reject an empty body. Callers are left with the success path:
6
+ * Runs a method-driven service request: checks the injected context, awaits the
7
+ * error-first tuple, logs a failure and treats an empty body as a failure, so the
8
+ * caller handles only the success path.
9
9
  *
10
10
  * ```typescript
11
11
  * const data = await executeServiceRequest(this, $ctx, {
@@ -14,15 +14,11 @@ import { HttpMethod, ServiceRequestExecutor } from './kos-service-request';
14
14
  * if (!data) return;
15
15
  * ```
16
16
  *
17
- * Failures are attributed to the method through `$ctx.$name`, which the
18
- * decorator injects — nothing to pass, and nothing to leave stale at the next
19
- * rename.
17
+ * Failures are logged against the method name the decorator puts on `$ctx.$name`.
20
18
  *
21
- * ONLY for the method-driven form — a `@kosServiceRequest` WITHOUT `lifecycle`.
22
- * The decorator injects `$ctx.$request` only on that branch; a lifecycle
23
- * handler is invoked by the ServiceRequestManager with the request already
24
- * performed, error-first as `(error, data)`, and never receives a context. See
25
- * `KosExecutionContext`.
19
+ * Use it only with a @kosServiceRequest that has no `lifecycle`. A lifecycle-driven
20
+ * handler receives `(error, data)` with the request already performed and never gets
21
+ * a context.
26
22
  *
27
23
  * @param host Model the request belongs to; supplies the logger.
28
24
  * @param $ctx Context the decorator injected as the method's last parameter.
@@ -1 +1 @@
1
- {"version":3,"file":"kos-execute-service-request.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-execute-service-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjC,IAAI,SAAS,MAAM,KAAK,EACxB,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,EAEjD,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,SAAS,EACvE,MAAM,CAAC,EAAE,UAAU,CAAC,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAClE,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,CA0B/C"}
1
+ {"version":3,"file":"kos-execute-service-request.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-execute-service-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjC,IAAI,SAAS,MAAM,KAAK,EACxB,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,EAEjD,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,SAAS,EACvE,MAAM,CAAC,EAAE,UAAU,CAAC,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAClE,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,CAuB/C"}
@@ -7,31 +7,20 @@ import { ClientResponse } from '../../util/kos-service-request';
7
7
  */
8
8
  export declare const KOS_EXECUTION_CONTEXT: unique symbol;
9
9
  /**
10
- * Execution context passed to decorated methods for accessing decorator-injected functionality.
10
+ * Execution context passed as the last parameter of a decorated method, carrying the
11
+ * runtime functionality its decorators inject: `$request` and `$name` from a
12
+ * method-driven @kosServiceRequest, `$tracker` from @kosFuture.
11
13
  *
12
- * This context provides a type-safe way for decorators to inject runtime functionality
13
- * into methods without polluting the class interface or relying on magic parameters.
14
- *
15
- * Currently used by @kosServiceRequest to inject the $request executor.
16
- * Designed to be extensible for future decorators that need to inject runtime functionality.
17
- *
18
- * @example Using with @kosServiceRequest
14
+ * @example
19
15
  * ```typescript
20
- * @kosServiceRequest({
21
- * path: PATH_VM_INSTALL,
22
- * method: 'post'
23
- * })
24
- * async createRelease(
16
+ * @kosServiceRequest({ path: PATH_VM_INSTALL, method: 'post' })
17
+ * async install(
25
18
  * path: string,
26
- * keysetId?: string,
27
- * ctx: KosExecutionContext<paths, typeof PATH_VM_INSTALL, 'post'>
19
+ * ctx?: KosExecutionContext<paths, typeof PATH_VM_INSTALL, 'post'>
28
20
  * ): Promise<void> {
29
- * const [error, response] = await ctx.$request({
30
- * queryParams: { keySetId: keysetId },
31
- * body: { path }
32
- * });
21
+ * const [error, response] = await ctx!.$request!({ body: { path } });
33
22
  * if (error) throw new Error(error);
34
- * return response?.data;
23
+ * this.lastInstall = response;
35
24
  * }
36
25
  * ```
37
26
  *
@@ -50,12 +39,9 @@ export interface KosExecutionContext<Paths extends Record<string, any> = Record<
50
39
  */
51
40
  $request?: ServiceRequestExecutor<Paths, Path, Method>;
52
41
  /**
53
- * What the request yields once the decorator's `transform` has run — the raw
54
- * response when it declares none.
55
- *
56
- * Type-only: never populated at runtime. It exists so `executeServiceRequest`
57
- * can read the shape off the context, while `$request` keeps returning `any`
58
- * on its data half, as it always has.
42
+ * Type of what the request yields after the decorator's `transform` (the raw
43
+ * response when there is none). Type-only and never set at runtime;
44
+ * `executeServiceRequest` reads its return type from it.
59
45
  */
60
46
  readonly $transformed?: Transformed;
61
47
  /**
@@ -64,11 +50,8 @@ export interface KosExecutionContext<Paths extends Record<string, any> = Record<
64
50
  */
65
51
  $tracker?: string;
66
52
  /**
67
- * Name of the decorated method (injected by @kosServiceRequest).
68
- *
69
- * Lets helpers attribute a failure to its method without the caller passing
70
- * the name in — a hand-written label silently outlives the rename that
71
- * invalidates it, and a stale one points at code that no longer exists.
53
+ * Name of the decorated method (injected by @kosServiceRequest), used to attribute
54
+ * failures to the method.
72
55
  */
73
56
  $name?: string;
74
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"kos-execution-context.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-execution-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,eAAgC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,mBAAmB,CAClC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACvD,IAAI,SAAS,MAAM,KAAK,GAAG,MAAM,EACjC,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC;IAEjD;;;OAGG;IACH,CAAC,qBAAqB,CAAC,EAAE,IAAI,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAEvD;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC;IAEpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,mBAAmB,CAE1E"}
1
+ {"version":3,"file":"kos-execution-context.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-execution-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,eAAgC,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,mBAAmB,CAClC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACvD,IAAI,SAAS,MAAM,KAAK,GAAG,MAAM,EACjC,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC;IAEjD;;;OAGG;IACH,CAAC,qBAAqB,CAAC,EAAE,IAAI,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAEvD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC;IAEpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,mBAAmB,CAE1E"}
@@ -10,49 +10,22 @@ export interface KosFutureAwareOptions {
10
10
  handlerProperty?: string;
11
11
  }
12
12
  /**
13
- * Interface for models using @kosFutureAware in minimal mode.
14
- * Use TypeScript interface merging to add the futureHandler property to your model class.
15
- *
16
- * @example
17
- * Add ESLint disable comment at top of file, then:
18
- * ```typescript
19
- * interface BackgroundServiceModelImpl extends KosFutureAwareMinimal {}
20
- *
21
- * kosFutureAware({ mode: 'minimal' })
22
- * class BackgroundServiceModelImpl implements IKosDataModel {
23
- * // futureHandler is now available via interface merging
24
- * }
25
- * ```
13
+ * Members injected by @kosFutureAware in minimal mode. Declare an interface with the
14
+ * same name as the class that extends this type (TypeScript interface merging).
26
15
  *
27
16
  * @kosService core.future-aware
28
17
  * @kosApiLevel 13
29
18
  */
30
19
  export interface KosFutureAwareMinimal<T extends object = Record<string, unknown>> {
31
20
  /**
32
- * Core future management container that handles Future lifecycle operations.
33
- * Provides methods to add, remove, and query Future instances.
34
- * Automatically injected by @kosFutureAware decorator.
21
+ * Container that tracks the model's Future operations.
35
22
  */
36
23
  futureHandler: FutureAwareContainer<T>;
37
24
  }
38
25
  /**
39
- * Interface for models using @kosFutureAware in full mode (default).
40
- * Use TypeScript interface merging to add all Future Container properties to your model class.
41
- *
42
- * @example
43
- * Add ESLint disable comment at top of file, then:
44
- * ```typescript
45
- * interface CopyLogsModelImpl extends KosFutureAwareFull<CopyProgress> {}
46
- *
47
- * kosFutureAware() // defaults to full mode
48
- * class CopyLogsModelImpl implements IKosDataModel {
49
- * // All Future Container properties are now available automatically
50
- *
51
- * onFutureUpdate?(future: IFutureModel<CopyProgress>): void {
52
- * // Access typed clientData
53
- * }
54
- * }
55
- * ```
26
+ * Members injected by @kosFutureAware in full mode (the default). Declare an interface
27
+ * with the same name as the class that extends this type (TypeScript interface
28
+ * merging).
56
29
  *
57
30
  * @kosService core.future-aware
58
31
  * @kosApiLevel 13
@@ -98,56 +71,30 @@ export interface KosFutureAwareFull<T extends object = Record<string, unknown>>
98
71
  cancelFuture(): Promise<void>;
99
72
  }
100
73
  /**
101
- * Class decorator that automatically adds Future Container capabilities to a KOS model.
102
- *
103
- * This decorator eliminates the need for manual Future Container setup by:
104
- * - Adding a futureHandler property for managing Future operations
105
- * - Adding reactive getters for future, progress, status, isRunning, isCancelled (in full mode)
106
- * - Adding cancelFuture method for canceling operations (in full mode)
107
- *
108
- * **Important**: Use TypeScript interface merging to get proper type information:
109
- *
110
- * ```typescript
111
- * // Add ESLint disable comment at top of file, then:
112
- * interface MyModelImpl extends KosFutureAwareFull<MyDataType> {}
74
+ * Class decorator that lets a KOS model track a long-running backend operation (a
75
+ * Future) started by one of its @kosFuture methods.
113
76
  *
114
- * kosFutureAware()
115
- * class MyModelImpl implements IKosDataModel {
116
- * // All Future properties are now available with full type safety
117
- * }
118
- * ```
77
+ * The model gets a `futureHandler` container and, in full mode, reactive `future`,
78
+ * `progress`, `status`, `isRunning` and `isCancelled` getters plus `cancelFuture()`.
79
+ * An optional `onFutureUpdate(future)` method on the model is called as the Future
80
+ * progresses. For several concurrent Futures, use @kosMultipleFutureAware.
119
81
  *
120
- * Note: This decorator supports single Future operations. For models that need to manage
121
- * multiple concurrent Futures, use @kosMultiFutureAware (coming soon).
82
+ * Pair the decorator with an interface that extends {@link KosFutureAwareFull} (or
83
+ * {@link KosFutureAwareMinimal}) so the injected members are typed.
122
84
  *
123
85
  * @param options Configuration options for the decorator
124
86
  * @returns A class decorator
125
87
  *
126
88
  * @example
127
89
  * ```typescript
128
- * // Full mode example
129
- * interface DeviceOperationsModelImpl extends KosFutureAwareFull<OperationData> {}
130
- *
131
- * kosFutureAware()
132
- * class DeviceOperationsModelImpl implements IKosDataModel {
133
- * onFutureUpdate?(future: IFutureModel<OperationData>): void {
134
- * // Handle Future updates
135
- * }
136
- *
137
- * kosFuture()
138
- * async performOperation(): Promise<OperationData> {
139
- * return { result: "done" };
140
- * }
141
- * }
142
- *
143
- * // Minimal mode example
144
- * interface BackgroundServiceModelImpl extends KosFutureAwareMinimal {}
90
+ * interface CopyLogsModelImpl extends KosFutureAwareFull<CopyProgress> {}
145
91
  *
146
- * kosFutureAware({ mode: 'minimal' })
147
- * class BackgroundServiceModelImpl implements IKosDataModel {
148
- * kosFuture()
149
- * async backgroundTask() {
150
- * return "done";
92
+ * @kosModel("copy-logs-model")
93
+ * @kosFutureAware()
94
+ * class CopyLogsModelImpl implements IKosDataModel {
95
+ * @kosFuture()
96
+ * async startCopy(): Promise<FutureResponse | undefined> {
97
+ * return startCopyService();
151
98
  * }
152
99
  * }
153
100
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"kos-future-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-future-aware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACb,MAAM,4CAA4C,CAAC;AAGpD;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,mGAAmG;IACnG,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,qBAAqB,CACpC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE1C;;;;OAIG;IACH,aAAa,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAC5E,SAAQ,qBAAqB,CAAC,CAAC,CAAC;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAEzB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;;;;OAMG;IACH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,qBAAqB,GAC9B,cAAc,CAchB"}
1
+ {"version":3,"file":"kos-future-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-future-aware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACb,MAAM,4CAA4C,CAAC;AAGpD;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,mGAAmG;IACnG,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB,CACpC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE1C;;OAEG;IACH,aAAa,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;CACxC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAC5E,SAAQ,qBAAqB,CAAC,CAAC,CAAC;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAEzB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;;;;OAMG;IACH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,qBAAqB,GAC9B,cAAc,CAchB"}
@@ -16,37 +16,18 @@ export interface IHttpRouteConfig {
16
16
  middleware?: Array<(req: KosRequest, res: KosResponse, next: () => void) => void>;
17
17
  }
18
18
  /**
19
- * Decorator for GET endpoints
20
- * @param path - The route path (e.g., "/api/users/:id")
21
- *
22
- * Supports PropKeys for dynamic path segments:
23
- * - {MODEL_ID} - replaced with the model's ID
24
- * - {PROP_propertyName} - replaced with model.propertyName value
19
+ * Registers the decorated method as the handler for GET requests to `path` on the
20
+ * browser router. `:name` segments are parsed into `req.params`. The path may also use
21
+ * `{MODEL_ID}` (the model's ID) and `{PROP_propertyName}` (a model property value),
22
+ * resolved when the route is registered.
25
23
  *
26
- * @example Basic usage:
27
- * ```typescript
28
- * @get("/api/users/:id")
29
- * async getUser(req: KosRequest<"/api/users/:id">, res: KosResponse) {
30
- * const userId = req.params.id;
31
- * const user = await this.userService.getUser(userId);
32
- * res.status(200).send(user);
33
- * }
34
- * ```
24
+ * @param path - The route path (e.g., "/api/users/:id")
35
25
  *
36
- * @example With PropKeys:
26
+ * @example
37
27
  * ```typescript
38
- * class TenantApiModel {
39
- * tenantId = "acme-corp";
40
- *
41
- * @get("/api/tenants/{PROP_tenantId}/users")
42
- * async getTenantUsers(req: KosRequest, res: KosResponse) {
43
- * // Route registered as: /api/tenants/acme-corp/users
44
- * }
45
- *
46
- * @get("/api/models/{MODEL_ID}/config")
47
- * async getModelConfig(req: KosRequest, res: KosResponse) {
48
- * // Route registered as: /api/models/<actual-model-id>/config
49
- * }
28
+ * @get("/api/models/{MODEL_ID}/users/:id")
29
+ * async getUser(req: KosRequest<"/api/models/{MODEL_ID}/users/:id">, res: KosResponse) {
30
+ * res.send(this.users.getModel(req.params.id));
50
31
  * }
51
32
  * ```
52
33
  *
@@ -55,55 +36,30 @@ export interface IHttpRouteConfig {
55
36
  */
56
37
  export declare const get: (path: string) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
57
38
  /**
58
- * Decorator for POST endpoints
59
- * @param path - The route path
39
+ * Registers the decorated method as the handler for POST requests to `path`.
40
+ * See {@link get} for path syntax.
60
41
  *
61
- * @example
62
- * ```typescript
63
- * @post("/api/users")
64
- * async createUser(req: KosRequest<"/api/users">, res: KosResponse) {
65
- * const userData = req.body;
66
- * const newUser = await this.userService.createUser(userData);
67
- * res.status(201).send(newUser);
68
- * }
69
- * ```
42
+ * @param path - The route path
70
43
  *
71
44
  * @kosService core.http-route
72
45
  * @kosApiLevel 12
73
46
  */
74
47
  export declare const post: (path: string) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
75
48
  /**
76
- * Decorator for PUT endpoints
77
- * @param path - The route path
49
+ * Registers the decorated method as the handler for PUT requests to `path`.
50
+ * See {@link get} for path syntax.
78
51
  *
79
- * @example
80
- * ```typescript
81
- * @put("/api/users/:id")
82
- * async updateUser(req: KosRequest<"/api/users/:id">, res: KosResponse) {
83
- * const userId = req.params.id;
84
- * const updates = req.body;
85
- * const updatedUser = await this.userService.updateUser(userId, updates);
86
- * res.status(200).send(updatedUser);
87
- * }
88
- * ```
52
+ * @param path - The route path
89
53
  *
90
54
  * @kosService core.http-route
91
55
  * @kosApiLevel 12
92
56
  */
93
57
  export declare const put: (path: string) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
94
58
  /**
95
- * Decorator for DELETE endpoints
96
- * @param path - The route path
59
+ * Registers the decorated method as the handler for DELETE requests to `path`.
60
+ * See {@link get} for path syntax.
97
61
  *
98
- * @example
99
- * ```typescript
100
- * @del("/api/users/:id")
101
- * async deleteUser(req: KosRequest<"/api/users/:id">, res: KosResponse) {
102
- * const userId = req.params.id;
103
- * await this.userService.deleteUser(userId);
104
- * res.status(204).send();
105
- * }
106
- * ```
62
+ * @param path - The route path
107
63
  *
108
64
  * @kosService core.http-route
109
65
  * @kosApiLevel 12
@@ -1 +1 @@
1
- {"version":3,"file":"kos-http-decorators.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-http-decorators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAGpC;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAO7D;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,KAAK,CAChB,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,CAC9D,CAAC;CACH;AA2CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,GAAG,SA3E4B,MAAM,MAE5C,QAAQ,GAAG,EACX,aAAa,MAAM,EACnB,YAAY,kBAAkB,uBAuEe,CAAC;AAEpD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI,SA9F2B,MAAM,MAE5C,QAAQ,GAAG,EACX,aAAa,MAAM,EACnB,YAAY,kBAAkB,uBA0FiB,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,GAAG,SAlH4B,MAAM,MAE5C,QAAQ,GAAG,EACX,aAAa,MAAM,EACnB,YAAY,kBAAkB,uBA8Ge,CAAC;AAEpD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,SArI4B,MAAM,MAE5C,QAAQ,GAAG,EACX,aAAa,MAAM,EACnB,YAAY,kBAAkB,uBAiIkB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,UAAU,SA1IqB,MAAM,MAE5C,QAAQ,GAAG,EACX,aAAa,MAAM,EACnB,YAAY,kBAAkB,uBAsIP,CAAC;AAE9B;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAExD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,gBAAgB,EAAE,CAEnE"}
1
+ {"version":3,"file":"kos-http-decorators.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-http-decorators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAGpC;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAO7D;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,KAAK,CAChB,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,CAC9D,CAAC;CACH;AA2CD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,GAAG,SAxD4B,MAAM,MAE5C,QAAQ,GAAG,EACX,aAAa,MAAM,EACnB,YAAY,kBAAkB,uBAoDe,CAAC;AAEpD;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,SAnE2B,MAAM,MAE5C,QAAQ,GAAG,EACX,aAAa,MAAM,EACnB,YAAY,kBAAkB,uBA+DiB,CAAC;AAEtD;;;;;;;;GAQG;AACH,eAAO,MAAM,GAAG,SA9E4B,MAAM,MAE5C,QAAQ,GAAG,EACX,aAAa,MAAM,EACnB,YAAY,kBAAkB,uBA0Ee,CAAC;AAEpD;;;;;;;;GAQG;AACH,eAAO,MAAM,GAAG,SAzF4B,MAAM,MAE5C,QAAQ,GAAG,EACX,aAAa,MAAM,EACnB,YAAY,kBAAkB,uBAqFkB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,UAAU,SA9FqB,MAAM,MAE5C,QAAQ,GAAG,EACX,aAAa,MAAM,EACnB,YAAY,kBAAkB,uBA0FP,CAAC;AAE9B;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAExD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,gBAAgB,EAAE,CAEnE"}
@@ -10,91 +10,41 @@ export interface KosLoggerAwareOptions {
10
10
  loggerContext?: string;
11
11
  }
12
12
  /**
13
- * Interface for models using @kosLoggerAware decorator.
14
- * Use TypeScript interface merging to add the logger property to your model class.
15
- *
16
- * @example
17
- * ```typescript
18
- * interface MyModelImpl extends KosLoggerAware {}
19
- *
20
- * @kosModel("my-model")
21
- * @kosLoggerAware()
22
- * export class MyModelImpl implements IKosDataModel {
23
- * id: string;
24
- *
25
- * constructor(modelId: string, options: any, context: KosCreationContext) {
26
- * this.id = modelId;
27
- * // No logger setup needed - automatically injected!
28
- * }
29
- *
30
- * async performOperation() {
31
- * this.logger.info("Starting operation"); // Direct access to logger
32
- * }
33
- * }
34
- * ```
13
+ * Members injected by @kosLoggerAware. Declare an interface with the same name as the
14
+ * class that extends this type (TypeScript interface merging).
35
15
  *
36
16
  * @kosService core.logger-aware
37
17
  * @kosApiLevel 13
38
18
  */
39
19
  export interface KosLoggerAware {
40
20
  /**
41
- * KOS context logger for this model instance.
42
- * Automatically injected by the @kosLoggerAware decorator.
43
- * Shared across all instances of the same model type for optimal performance.
44
- * Provides structured logging with debug(), info(), warn(), and error() methods.
45
- * Logger context is automatically set to the model type name unless overridden.
21
+ * Logger for this model type, shared by all its instances. Its context is the model
22
+ * type unless `loggerContext` is set.
46
23
  */
47
24
  logger: KosContextLogger;
48
25
  }
49
26
  /**
50
- * Class decorator that automatically injects a shared logger into a KOS model.
51
- *
52
- * This decorator eliminates the need for manual logger setup in constructors by:
53
- * - Creating a single shared logger per model type (not per instance)
54
- * - Using the KosLoggerFactory for consistent logger creation
55
- * - Following KOS naming conventions for logger context
56
- * - Providing optimal performance through logger reuse
27
+ * Class decorator that gives a KOS model or ViewModel a `logger` (or `loggerProperty`).
57
28
  *
58
- * **Performance Note**: Creates one logger per model type, shared across all instances
59
- * of that type. This is much more efficient than per-instance logger creation.
29
+ * The logger is created lazily on first access, once per model type, and shared by
30
+ * every instance of that type.
60
31
  *
61
- * **Important**: Use TypeScript interface merging to get proper type information:
32
+ * @param options Configuration options for the logger injection
33
+ * @returns A class decorator
62
34
  *
35
+ * @example
63
36
  * ```typescript
64
37
  * interface MyModelImpl extends KosLoggerAware {}
65
38
  *
66
39
  * @kosModel("my-model")
67
40
  * @kosLoggerAware()
68
41
  * export class MyModelImpl implements IKosDataModel {
69
- * // logger property is now available with full type safety
70
42
  * async doSomething() {
71
43
  * this.logger.debug("Doing something...");
72
44
  * }
73
45
  * }
74
46
  * ```
75
47
  *
76
- * @param options Configuration options for the logger injection
77
- * @returns A class decorator
78
- *
79
- * @example
80
- * ```typescript
81
- * // Basic usage with default logger property
82
- * @kosLoggerAware()
83
- * class MyModel { }
84
- *
85
- * // Custom logger property name
86
- * @kosLoggerAware({ loggerProperty: 'log' })
87
- * class MyModel {
88
- * // this.log is available instead of this.logger
89
- * }
90
- *
91
- * // Custom logger context for specialized logging
92
- * @kosLoggerAware({ loggerContext: 'analytics' })
93
- * class AnalyticsModel {
94
- * // Logger uses "analytics" context instead of model type
95
- * }
96
- * ```
97
- *
98
48
  * @category KOS Model Decorator
99
49
  * @since 2.1.0
100
50
  * @kosService core.logger-aware
@@ -1 +1 @@
1
- {"version":3,"file":"kos-logger-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-logger-aware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;OAMG;IACH,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,qBAAqB,GAC9B,cAAc,CAoChB"}
1
+ {"version":3,"file":"kos-logger-aware.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-logger-aware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,cAAc,CAC5B,OAAO,CAAC,EAAE,qBAAqB,GAC9B,cAAc,CAqChB"}
@@ -0,0 +1,67 @@
1
+ import { IKosDataModel } from '../kosModel';
2
+ import { KosModelRegistrationFactory } from '../registration/base-kos-model-registration';
3
+ import { KosCompanionAware } from './kos-companion';
4
+ /**
5
+ * A mixin declared on a host, keyed by the property that holds it.
6
+ *
7
+ * @internal
8
+ */
9
+ export interface KosMixinDefinition {
10
+ registration: KosModelRegistrationFactory<any, any>;
11
+ options?: unknown;
12
+ }
13
+ /**
14
+ * The host interface a mixin requires.
15
+ *
16
+ * @kosService core.mixin
17
+ * @kosApiLevel 25
18
+ */
19
+ export type KosMixinHost<TMixin> = TMixin extends KosCompanionAware<infer THost> ? THost : IKosDataModel;
20
+ /**
21
+ * The options a host passes to its mixin. Any option can be a prop key, resolved from the
22
+ * host's data when the mixin is created.
23
+ *
24
+ * @kosService core.mixin
25
+ * @kosApiLevel 25
26
+ */
27
+ export type KosMixinOptions<O> = O extends {
28
+ data?: infer D;
29
+ } ? {
30
+ [K in keyof D]: D[K] | string;
31
+ } : never;
32
+ /**
33
+ * Mixes a reusable behaviour into a model. The host gets its own instance of the mixin
34
+ * in the decorated property, there from the moment the host is created and observable,
35
+ * so the host's effects can react to it.
36
+ *
37
+ * The mixin calls back into the host through `getCompanionParent()`, typed by the host
38
+ * interface it declares; a host that does not implement that interface does not
39
+ * compile.
40
+ *
41
+ * @param mixin The mixin model's registration.
42
+ * @param options The mixin's model options, received as `options.data`. Any option can
43
+ * be a prop key (`createPropKey`), resolved from the host's data when the mixin is
44
+ * created.
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * interface DirtyHost extends IKosDataModel { onDirtyChanged?(dirty: boolean): void }
49
+ * interface DirtyTrackingImpl extends KosCompanionComposition<DirtyHost> {}
50
+ *
51
+ * @kosModel("dirty-tracking")
52
+ * @kosCompanion({ mode: "composition" })
53
+ * class DirtyTrackingImpl implements IKosDataModel { ... }
54
+ *
55
+ * @kosModel("recipe")
56
+ * class RecipeImpl implements IKosDataModel, DirtyHost {
57
+ * @kosMixin(DirtyTracking, { fields: ["name"] })
58
+ * dirty!: DirtyTrackingModel;
59
+ * }
60
+ * ```
61
+ *
62
+ * @category KOS Model Decorator
63
+ * @kosService core.mixin
64
+ * @kosApiLevel 25
65
+ */
66
+ export declare function kosMixin<TMixin extends IKosDataModel, O extends object>(mixin: KosModelRegistrationFactory<TMixin, O>, options?: KosMixinOptions<O>): (target: KosMixinHost<TMixin>, propertyKey: string) => void;
67
+ //# sourceMappingURL=kos-mixin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kos-mixin.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-mixin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC/F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,2BAA2B,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,MAAM,IAAI,MAAM,SAAS,iBAAiB,CAAC,MAAM,KAAK,CAAC,GAC5E,KAAK,GACL,aAAa,CAAC;AAElB;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAA;CAAE,GACzD;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM;CAAE,GACjC,KAAK,CAAC;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,QAAQ,CAAC,MAAM,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,EACrE,KAAK,EAAE,2BAA2B,CAAC,MAAM,EAAE,CAAC,CAAC,EAC7C,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,IAEpB,QAAQ,YAAY,CAAC,MAAM,CAAC,EAAE,aAAa,MAAM,KAAG,IAAI,CAuBjE"}
@@ -12,20 +12,21 @@ interface KosModelEffectProps<T = any> {
12
12
  };
13
13
  }
14
14
  /**
15
- * Decorator for defining a Kos model effect function within a Kos Data Model class.
15
+ * Method decorator that runs the method as a reactive effect of the model.
16
16
  *
17
- * @param props - An object containing configuration parameters for the topic handler.
17
+ * With `dependencies`, the method runs each time the returned values change (and once
18
+ * immediately with `fireImmediately`). Without them, it runs immediately and again
19
+ * whenever any reactive model state it reads changes. Effects start when the model
20
+ * loads and stop when it unloads. The method cannot be called directly.
21
+ *
22
+ * @param props - The effect's dependencies and options.
18
23
  * @returns A decorator function.
19
24
  *
20
25
  * @example
21
26
  * ```typescript
22
- * class MyKosDataModel implements IKosDataModel {
23
- * // ...
24
- *
25
- * @kosModelEffect()
26
- * handleModelEffect() {
27
- * // Handle the received topic payload here.
28
- * }
27
+ * @kosModelEffect({ dependencies: (model: MyModelImpl) => [model.selectedId] })
28
+ * onSelectionChanged() {
29
+ * this.details = this.lookup(this.selectedId);
29
30
  * }
30
31
  * ```
31
32
  * @category KOS Model Decorator
@@ -1 +1 @@
1
- {"version":3,"file":"kos-model-effect.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-model-effect.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,UAAU,mBAAmB,CAAC,CAAC,GAAG,GAAG;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,GAAG,EAAE,CAAC;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE;QACR,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;CACH;AACD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,IAC5D,QAAQ,CAAC,EAAE,cAAc,MAAM,EAAE,YAAY,kBAAkB,UAYxE"}
1
+ {"version":3,"file":"kos-model-effect.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/core/core/decorators/kos-model-effect.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,UAAU,mBAAmB,CAAC,CAAC,GAAG,GAAG;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,GAAG,EAAE,CAAC;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE;QACR,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;CACH;AACD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,IAC5D,QAAQ,CAAC,EAAE,cAAc,MAAM,EAAE,YAAY,kBAAkB,UAYxE"}