@kosdev-code/kos-ui-sdk 0.1.0-next.944 → 0.1.0-next.958
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.kos.json +2 -1
- package/common/events/async-event-bus.d.ts +2 -11
- package/common/events/async-event-bus.d.ts.map +1 -1
- package/common/events/eventBus.d.ts +1 -18
- package/common/events/eventBus.d.ts.map +1 -1
- package/core/core/decorators/kos-child.d.ts +2 -3
- package/core/core/decorators/kos-child.d.ts.map +1 -1
- package/core/core/decorators/kos-companion.d.ts +25 -87
- package/core/core/decorators/kos-companion.d.ts.map +1 -1
- package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts +2 -0
- package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts.map +1 -0
- package/core/core/decorators/kos-container-aware.d.ts +191 -420
- package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-execute-service-request.d.ts +7 -11
- package/core/core/decorators/kos-execute-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-execution-context.d.ts +14 -31
- package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
- package/core/core/decorators/kos-future-aware.d.ts +21 -74
- package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-http-decorators.d.ts +18 -62
- package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
- package/core/core/decorators/kos-logger-aware.d.ts +10 -60
- package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-model-effect.d.ts +10 -9
- package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
- package/core/core/decorators/kos-multiple-future-aware.d.ts +21 -94
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-reload-aware.d.ts +14 -16
- package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request.d.ts +80 -238
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +35 -275
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
- package/core/core/decorators/kos-trouble-aware.d.ts +9 -43
- package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-view-model.d.ts +20 -100
- package/core/core/decorators/kos-view-model.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +28 -89
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/indexing/index.d.ts +2 -4
- package/core/core/indexing/index.d.ts.map +1 -1
- package/core/core/indexing/kos-container-index-aware.d.ts +17 -48
- package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
- package/core/core/indexing/kos-index-aware.d.ts +11 -37
- package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
- package/core/core/kos-container-model.d.ts +11 -32
- package/core/core/kos-container-model.d.ts.map +1 -1
- package/core/core/kos-data-container.d.ts +6 -6
- package/core/core/kos-data-container.d.ts.map +1 -1
- package/core/core/kosCore.d.ts +7 -4
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +16 -8
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/kosModelManager.d.ts +2 -3
- package/core/core/kosModelManager.d.ts.map +1 -1
- package/core/core/lifecycle/constants.d.ts +6 -2
- package/core/core/lifecycle/constants.d.ts.map +1 -1
- package/core/core/lifecycle/kosCoreLifecycle.d.ts +11 -1
- package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
- package/core/core/lifecycle/kosModelLifecycle.d.ts +6 -0
- package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
- package/core/core/lifecycle/model-machine.d.ts +6 -0
- package/core/core/lifecycle/model-machine.d.ts.map +1 -1
- package/core/core/model/kos-fsm-manager.d.ts +6 -0
- package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
- package/core/core/model/kos-offline-queue.d.ts +1 -1
- package/core/core/model/service-response-store.d.ts +2 -15
- package/core/core/model/service-response-store.d.ts.map +1 -1
- package/core/core/reconnect/reconnect-fixture.d.ts +17 -0
- package/core/core/reconnect/reconnect-fixture.d.ts.map +1 -0
- package/core/core/services/app-startup-service.d.ts +5 -13
- package/core/core/services/app-startup-service.d.ts.map +1 -1
- package/core/core/services/intent-service.d.ts +3 -12
- package/core/core/services/intent-service.d.ts.map +1 -1
- package/core/core/transport/mock/mock-frames.d.ts +3 -3
- package/core/core/transport/transport.d.ts +1 -1
- package/core/core/transport/transport.d.ts.map +1 -1
- package/core/core/transport/webSocketTransport.d.ts +10 -0
- package/core/core/transport/webSocketTransport.d.ts.map +1 -1
- package/core/types/model.d.ts +4 -8
- package/core/types/model.d.ts.map +1 -1
- package/core/types/service-response-store.d.ts +3 -11
- package/core/types/service-response-store.d.ts.map +1 -1
- package/core/types/utils/kos-fetch.d.ts +25 -37
- package/core/types/utils/kos-fetch.d.ts.map +1 -1
- package/core/util/abortable-when.d.ts +5 -6
- package/core/util/abortable-when.d.ts.map +1 -1
- package/core/util/ancestor-path-visitor.d.ts +14 -20
- package/core/util/ancestor-path-visitor.d.ts.map +1 -1
- package/core/util/container-utils.d.ts +26 -159
- package/core/util/container-utils.d.ts.map +1 -1
- package/core/util/date-utils.d.ts +9 -58
- package/core/util/date-utils.d.ts.map +1 -1
- package/core/util/debounce.d.ts +1 -8
- package/core/util/debounce.d.ts.map +1 -1
- package/core/util/kos-fetch.d.ts +1 -1
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/core/util/kos-model-utils.d.ts +10 -11
- package/core/util/kos-model-utils.d.ts.map +1 -1
- package/core/util/model-attribute-utils.d.ts +5 -22
- package/core/util/model-attribute-utils.d.ts.map +1 -1
- package/core/util/promise-utils.d.ts +1 -26
- package/core/util/promise-utils.d.ts.map +1 -1
- package/core/util/service-factory.d.ts +5 -23
- package/core/util/service-factory.d.ts.map +1 -1
- package/core/util/service-request-error.d.ts +3 -5
- package/core/util/service-request-error.d.ts.map +1 -1
- package/core/util/service-response.d.ts +12 -67
- package/core/util/service-response.d.ts.map +1 -1
- package/core/util/transport-not-ready-error.d.ts +11 -13
- package/core/util/transport-not-ready-error.d.ts.map +1 -1
- package/core/util/when-ready.d.ts +1 -8
- package/core/util/when-ready.d.ts.map +1 -1
- package/index.cjs +144 -109
- package/index.cjs.map +1 -1
- package/index.js +173 -138
- package/index.js.map +1 -1
- package/models/decorators/future-service.d.ts +7 -7
- package/models/models/browser-router/browser-router-model.d.ts +10 -39
- package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
- package/models/models/browser-router/browser-router-registration.d.ts +5 -77
- package/models/models/browser-router/browser-router-registration.d.ts.map +1 -1
- package/models/models/browser-router/types/index.d.ts +2 -16
- package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts +5 -77
- package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts.map +1 -1
- package/models/models/canvas-renderer/canvas-renderer-registration.d.ts +5 -75
- package/models/models/canvas-renderer/canvas-renderer-registration.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model-builder.d.ts +4 -11
- package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model.d.ts +23 -66
- package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts +15 -62
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/types/index.d.ts +34 -215
- package/models/models/device/device-model.d.ts +20 -199
- package/models/models/device/device-model.d.ts.map +1 -1
- package/models/models/device/device-registration.d.ts +7 -87
- package/models/models/device/device-registration.d.ts.map +1 -1
- package/models/models/device/types/index.d.ts +5 -34
- package/models/models/future/future-aware.d.ts +7 -71
- package/models/models/future/future-aware.d.ts.map +1 -1
- package/models/models/future/future-model-builder.d.ts +2 -2
- package/models/models/future/future-model.d.ts +3 -23
- package/models/models/future/future-model.d.ts.map +1 -1
- package/models/models/future/future-types.d.ts +28 -145
- package/models/models/future/future-types.d.ts.map +1 -1
- package/models/models/gpio-chip/gpio-chip-builders.d.ts +14 -0
- package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -0
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts +2 -1
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
- package/models/models/key-value/key-value-model.d.ts +12 -72
- package/models/models/key-value/key-value-model.d.ts.map +1 -1
- package/models/models/key-value/key-value-registration.d.ts +5 -77
- package/models/models/key-value/key-value-registration.d.ts.map +1 -1
- package/models/models/key-value/services/key-value-services.d.ts +13 -72
- package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
- package/models/models/key-value/types/index.d.ts +3 -46
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +32 -99
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +2 -12
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -1
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts +7 -46
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
- package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +5 -80
- package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -1
- package/models/models/kos-log-manager/types/index.d.ts +13 -156
- package/models/models/kos-time/kos-time-model.d.ts +8 -39
- package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
- package/models/models/kos-time/kos-time-registration.d.ts +6 -73
- package/models/models/kos-time/kos-time-registration.d.ts.map +1 -1
- package/models/models/kos-time/types/index.d.ts +3 -58
- package/models/models/log-block/log-block-container-model.d.ts +2 -118
- package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
- package/models/models/log-block/log-block-container-registration.d.ts +5 -75
- package/models/models/log-block/log-block-container-registration.d.ts.map +1 -1
- package/models/models/log-block/log-block-model.d.ts +5 -168
- package/models/models/log-block/log-block-model.d.ts.map +1 -1
- package/models/models/log-block/log-block-registration.d.ts +5 -75
- package/models/models/log-block/log-block-registration.d.ts.map +1 -1
- package/models/models/log-block/types/index.d.ts +14 -81
- package/models/models/log-stream/log-stream-container-model.d.ts +8 -35
- package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-container-registration.d.ts +5 -75
- package/models/models/log-stream/log-stream-container-registration.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-model.d.ts +8 -29
- package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-registration.d.ts +5 -75
- package/models/models/log-stream/log-stream-registration.d.ts.map +1 -1
- package/models/models/log-stream/types/index.d.ts +5 -60
- package/models/models/network-interface/network-interface-container-model.d.ts +6 -35
- package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-container-registration.d.ts +5 -73
- package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-model.d.ts +5 -43
- package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-registration.d.ts +5 -73
- package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
- package/models/models/network-interface/types/index.d.ts +2 -16
- package/models/models/ota/ota-model.d.ts +11 -39
- package/models/models/ota/ota-model.d.ts.map +1 -1
- package/models/models/ota/ota-registration.d.ts +5 -77
- package/models/models/ota/ota-registration.d.ts.map +1 -1
- package/models/models/ota/types/index.d.ts +2 -141
- package/models/models/region-info/types/index.d.ts +19 -99
- package/models/models/region-info/types/index.d.ts.map +1 -1
- package/models/models/software-info/services/software-info-services.d.ts +2 -14
- package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
- package/models/models/software-info/software-info-model.d.ts +3 -39
- package/models/models/software-info/software-info-model.d.ts.map +1 -1
- package/models/models/software-info/software-info-registration.d.ts +6 -73
- package/models/models/software-info/software-info-registration.d.ts.map +1 -1
- package/models/models/software-info/types/index.d.ts +6 -20
- package/models/models/state-bean/state-bean-model.d.ts +10 -41
- package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
- package/models/models/state-bean/state-bean-registration.d.ts +6 -73
- package/models/models/state-bean/state-bean-registration.d.ts.map +1 -1
- package/models/models/state-bean/types/index.d.ts +4 -84
- package/models/models/state-prop/state-prop-model.d.ts +6 -40
- package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
- package/models/models/state-prop/state-prop-registration.d.ts +6 -73
- package/models/models/state-prop/state-prop-registration.d.ts.map +1 -1
- package/models/models/state-prop/types/index.d.ts +5 -37
- package/models/models/storage-device/storage-device-container-model.d.ts +7 -273
- package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-container-registration.d.ts +5 -75
- package/models/models/storage-device/storage-device-container-registration.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-model.d.ts +3 -49
- package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-registration.d.ts +5 -75
- package/models/models/storage-device/storage-device-registration.d.ts.map +1 -1
- package/models/models/storage-device/types/index.d.ts +13 -82
- package/models/models/studio-properties/studio-properties-model.d.ts +13 -36
- package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
- package/models/models/studio-properties/studio-properties-registration.d.ts +5 -75
- package/models/models/studio-properties/studio-properties-registration.d.ts.map +1 -1
- package/models/models/studio-properties/types/index.d.ts +2 -24
- package/models/models/translation/descriptor-merge.d.ts +13 -17
- package/models/models/translation/descriptor-merge.d.ts.map +1 -1
- package/models/models/translation/services/translation-services.d.ts +19 -77
- package/models/models/translation/services/translation-services.d.ts.map +1 -1
- package/models/models/translation/test-harness.d.ts +6 -8
- package/models/models/translation/test-harness.d.ts.map +1 -1
- package/models/models/translation/translation-container-model.d.ts +7 -59
- package/models/models/translation/translation-container-model.d.ts.map +1 -1
- package/models/models/translation/translation-container-registration.d.ts +6 -73
- package/models/models/translation/translation-container-registration.d.ts.map +1 -1
- package/models/models/translation/translation-model.d.ts +17 -50
- package/models/models/translation/translation-model.d.ts.map +1 -1
- package/models/models/translation/translation-registration.d.ts +6 -73
- package/models/models/translation/translation-registration.d.ts.map +1 -1
- package/models/models/translation/types/index.d.ts +51 -276
- package/models/models/trouble/trouble-registration.d.ts +6 -73
- package/models/models/trouble/trouble-registration.d.ts.map +1 -1
- package/models/models/trouble/types/index.d.ts +17 -188
- package/models/models/trouble/utils/is-trouble-aware.d.ts +4 -85
- package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
- package/models/models/trouble-container/trouble-builders.d.ts +11 -0
- package/models/models/trouble-container/trouble-builders.d.ts.map +1 -0
- package/models/models/trouble-container/trouble-container-model.d.ts +2 -1
- package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
- package/models/models/usb-update/usb-update-container-registration.d.ts +5 -75
- package/models/models/usb-update/usb-update-container-registration.d.ts.map +1 -1
- package/models/models/usb-update/usb-update-registration.d.ts +5 -75
- package/models/models/usb-update/usb-update-registration.d.ts.map +1 -1
- package/models/types/cancellable-promise.d.ts +6 -9
- package/models/types/cancellable-promise.d.ts.map +1 -1
- package/models/utils/await-future-call.d.ts +9 -21
- package/models/utils/await-future-call.d.ts.map +1 -1
- package/models/utils/cancellable-future-call.d.ts +8 -19
- package/models/utils/cancellable-future-call.d.ts.map +1 -1
- package/models/utils/cancellable-service.d.ts +14 -23
- package/models/utils/cancellable-service.d.ts.map +1 -1
- package/models/utils/conversion-utils.d.ts +8 -48
- package/models/utils/conversion-utils.d.ts.map +1 -1
- package/models/utils/persistence-store.d.ts +1 -1
- package/models/utils/service.d.ts +14 -48
- package/models/utils/service.d.ts.map +1 -1
- package/models/utils/services/kos/daily/service.d.ts +4 -4
- package/models/utils/services/vfs/daily/service.d.ts +4 -4
- package/models/utils/timer-manager.d.ts.map +1 -1
- package/package.json +3 -3
- package/{software-info-registration-CKlTQPet.js → software-info-registration-C8kf-pBB.js} +551 -530
- package/software-info-registration-C8kf-pBB.js.map +1 -0
- package/{software-info-registration-GUbTY4KD.cjs → software-info-registration-Y1iADHWT.cjs} +522 -501
- package/software-info-registration-Y1iADHWT.cjs.map +1 -0
- package/testing/index.d.ts +28 -33
- package/testing/index.d.ts.map +1 -1
- package/testing.cjs +1 -1
- package/testing.cjs.map +1 -1
- package/testing.js +1 -1
- package/testing.js.map +1 -1
- package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts +9 -0
- package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts.map +1 -0
- package/ui/components/connection-dev-button/index.d.ts +36 -0
- package/ui/components/connection-dev-button/index.d.ts.map +1 -0
- package/ui/components/connection-dev-button/use-connection-dev-state.d.ts +29 -0
- package/ui/components/connection-dev-button/use-connection-dev-state.d.ts.map +1 -0
- package/ui/components/index.d.ts +1 -0
- package/ui/components/index.d.ts.map +1 -1
- package/ui/features/canvas/hooks/use-image-renderer.d.ts +5 -4
- package/ui/features/canvas/hooks/use-image-renderer.d.ts.map +1 -1
- package/ui/hooks/use-function-warmup.d.ts +4 -14
- package/ui/hooks/use-function-warmup.d.ts.map +1 -1
- package/ui/hooks/use-kos-date-formats.d.ts +15 -29
- package/ui/hooks/use-kos-date-formats.d.ts.map +1 -1
- package/ui/hooks/use-kos-region-timezones.d.ts +4 -55
- package/ui/hooks/use-kos-region-timezones.d.ts.map +1 -1
- package/ui/hooks/use-kos-regions.d.ts +11 -23
- package/ui/hooks/use-kos-regions.d.ts.map +1 -1
- package/ui/hooks/use-kos-time-formats.d.ts +16 -31
- package/ui/hooks/use-kos-time-formats.d.ts.map +1 -1
- package/ui/hooks/use-kos-unit-systems.d.ts +13 -27
- package/ui/hooks/use-kos-unit-systems.d.ts.map +1 -1
- package/ui/hooks/view-model/use-view-model.d.ts +6 -31
- package/ui/hooks/view-model/use-view-model.d.ts.map +1 -1
- package/ui/policies/reload-on-disconnect-policy.d.ts +5 -6
- package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
- package/software-info-registration-CKlTQPet.js.map +0 -1
- package/software-info-registration-GUbTY4KD.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"software-info-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/models/models/software-info/services/software-info-services.ts"],"names":[],"mappings":"AAKA,OAAO,EAAO,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAQ5D,MAAM,WAAW,KAAK;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,8BAA8B,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CACvD,wBAAwB,EACxB,KAAK,CACN,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,WAAW,KACnB,OAAO,CAAC,0BAA0B,CAmBpC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"software-info-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-ui-sdk/src/models/models/software-info/services/software-info-services.ts"],"names":[],"mappings":"AAKA,OAAO,EAAO,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAQ5D,MAAM,WAAW,KAAK;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,8BAA8B,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CACvD,wBAAwB,EACxB,KAAK,CACN,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,WAAW,KACnB,OAAO,CAAC,0BAA0B,CAmBpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B;YAE4mvM,oDAAsB;GAD7nvM,CAAC"}
|
|
@@ -3,47 +3,11 @@ import { PublicModelInterface } from '../../../core/types';
|
|
|
3
3
|
import { ArtifactsType, NodeInfoType, SoftwareInfoOptions } from './types';
|
|
4
4
|
export declare const MODEL_TYPE = "software-info-model";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* artifacts, and system components across all nodes in a KOS device. This model is essential
|
|
10
|
-
* for applications that need to display system information, perform version checks, or
|
|
11
|
-
* manage software compatibility and updates.
|
|
12
|
-
*
|
|
13
|
-
* ## Key Features
|
|
14
|
-
* - **Node-Based Architecture** - Track software information across multiple device nodes
|
|
15
|
-
* - **Artifact Management** - Complete visibility into installed software components and versions
|
|
16
|
-
* - **Version Tracking** - Monitor KOS framework versions and application artifacts
|
|
17
|
-
* - **Group Organization** - Automatic categorization of artifacts by functional groups
|
|
18
|
-
* - **System Overview** - Comprehensive system software inventory and version reporting
|
|
19
|
-
* - **Compatibility Checking** - Version information for dependency and compatibility validation
|
|
20
|
-
*
|
|
21
|
-
* ## Data Structure
|
|
22
|
-
* The model organizes software information hierarchically:
|
|
23
|
-
* - **Nodes** - Individual system nodes (primary, secondary, etc.)
|
|
24
|
-
* - **Artifacts** - Software components installed on each node
|
|
25
|
-
* - **Groups** - Logical grouping of related artifacts (core, ui, services, etc.)
|
|
26
|
-
* - **Versions** - Specific version information for each artifact
|
|
27
|
-
*
|
|
28
|
-
* ## Common Use Cases
|
|
29
|
-
* - **System Information Display** - Show installed software versions to users and administrators
|
|
30
|
-
* - **Version Compatibility** - Check software versions before updates or feature activation
|
|
31
|
-
* - **Support Diagnostics** - Provide detailed software information for troubleshooting
|
|
32
|
-
* - **Update Planning** - Assess current software state before planning updates
|
|
33
|
-
* - **Inventory Management** - Track and report on installed software components
|
|
6
|
+
* Software installed on each node of the device. On load the model reads the
|
|
7
|
+
* manifest and fills `nodes`, one entry per node with its KOS version and its
|
|
8
|
+
* artifacts grouped by artifact group.
|
|
34
9
|
*
|
|
35
10
|
* @interface
|
|
36
|
-
* @example Basic Usage
|
|
37
|
-
* ```typescript
|
|
38
|
-
* const softwareInfo = SoftwareInfo.instance('system-info').build();
|
|
39
|
-
*
|
|
40
|
-
* // Access system software information across nodes
|
|
41
|
-
* const nodes = softwareInfo.nodes;
|
|
42
|
-
* nodes?.forEach(node => {
|
|
43
|
-
* console.log(`Node ${node.nodeName}: KOS ${node.kosVersion}`);
|
|
44
|
-
* });
|
|
45
|
-
* ```
|
|
46
|
-
*
|
|
47
11
|
* @group KOS Model
|
|
48
12
|
* @category System Integration
|
|
49
13
|
* @useDeclaredType
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"software-info-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/software-info/software-info-model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEhF,eAAO,MAAM,UAAU,wBAAwB,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"software-info-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/software-info/software-info-model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEhF,eAAO,MAAM,UAAU,wBAAwB,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;AAE5E;;;GAGG;AACH,qBACa,qBAAsB,YAAW,aAAa;IACzD,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IAEjC,sFAAsF;IACtF,KAAK,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;gBAEhC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,kBAAkB;IAS7B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;;;;;OAMG;IACH,OAAO,CAAC,GAAG,EAAE,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,aAAa;IAU3D;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAuB5B"}
|
|
@@ -1,83 +1,16 @@
|
|
|
1
1
|
import { KosModelRegistrationBean } from '../../../core/types';
|
|
2
2
|
import { SoftwareInfoModel, SoftwareInfoOptions } from './types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Registration for {@link SoftwareInfoModel}.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* The type property is a string that identifies the model type.
|
|
10
|
-
* 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
|
|
11
|
-
* used when declaring dependencies on models.
|
|
6
|
+
* `type` identifies the model in the registry and in `@kosDependency` declarations.
|
|
7
|
+
* `factory(id)(options)` creates the model, or returns the existing one when the id is already in use. `predicate` narrows a model to `SoftwareInfoModel`.
|
|
8
|
+
* Spread `registration` into an application's model registry.
|
|
12
9
|
*
|
|
13
10
|
* @example
|
|
14
11
|
* ```typescript
|
|
15
|
-
*
|
|
16
|
-
* @kosDependency({modelType: SoftwareInfo.type, id: "softwareInfoId"})
|
|
17
|
-
* private softwareInfoModel: SoftwareInfoModel;
|
|
12
|
+
* const model = SoftwareInfo.factory("softwareInfoId")(options);
|
|
18
13
|
* ```
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
* ## factory
|
|
22
|
-
*
|
|
23
|
-
* The factory method creates a factory function that can be used to create new SoftwareInfoModel instances.
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
27
|
-
*
|
|
28
|
-
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
29
|
-
* in this case and the existing model will be returned in its current state.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```typescript
|
|
33
|
-
* const model = SoftwareInfo.factory("softwareInfoId")({
|
|
34
|
-
* // Add option data
|
|
35
|
-
* });
|
|
36
|
-
* ```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*
|
|
40
|
-
* ## predicate
|
|
41
|
-
*
|
|
42
|
-
* [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 SoftwareInfoModel.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```typescript
|
|
46
|
-
*
|
|
47
|
-
* const model: IKosDataModel = ...; // some model
|
|
48
|
-
*
|
|
49
|
-
* if (SoftwareInfo.predicate(model)) {
|
|
50
|
-
* // if the function evaluates to true, the model is narrowed down to SoftwareInfoModel
|
|
51
|
-
* // and the compiler will know that the model has the SoftwareInfoModel interface
|
|
52
|
-
* model.updateAvailability(false);
|
|
53
|
-
* }
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* ## registration
|
|
57
|
-
*
|
|
58
|
-
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
59
|
-
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
*
|
|
64
|
-
* In an application registration file you can declare the model registration as follows:
|
|
65
|
-
*
|
|
66
|
-
* **registration.ts**
|
|
67
|
-
* ```typescript
|
|
68
|
-
* import { SoftwareInfo } from "@kos-ui/kos-dispenser-model";
|
|
69
|
-
* ...
|
|
70
|
-
* import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
71
|
-
* export const kosModels: IKosRegistry["models"] = {
|
|
72
|
-
* ...SoftwareInfo.registration,
|
|
73
|
-
* };
|
|
74
|
-
* ```
|
|
75
|
-
*
|
|
76
|
-
* ## registration.singleton
|
|
77
|
-
|
|
78
|
-
* The softwareInfo 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.
|
|
79
|
-
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
80
|
-
|
|
81
|
-
* */
|
|
14
|
+
*/
|
|
82
15
|
export declare const SoftwareInfo: Readonly<KosModelRegistrationBean<SoftwareInfoModel, SoftwareInfoOptions>>;
|
|
83
16
|
//# sourceMappingURL=software-info-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"software-info-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/software-info/software-info-registration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAGpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEtE
|
|
1
|
+
{"version":3,"file":"software-info-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/software-info/software-info-registration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAGpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CACjC,wBAAwB,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAajE,CAAC"}
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
import { PublicModelInterface } from '../../../../core';
|
|
2
2
|
import { SoftwareInfoModelImpl } from '../software-info-model';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* This interface defines the configuration options for the SoftwareInfo model.
|
|
7
|
-
* Currently, no specific configuration options are required as the model
|
|
8
|
-
* automatically loads software information from the system manifest API.
|
|
9
|
-
*
|
|
10
|
-
* @example Basic Usage
|
|
11
|
-
* ```typescript
|
|
12
|
-
* const softwareInfo = SoftwareInfo.instance('system-info').build();
|
|
13
|
-
* ```
|
|
4
|
+
* Options for a {@link SoftwareInfoModel}. The model takes none; it loads its
|
|
5
|
+
* data from the system manifest.
|
|
14
6
|
*
|
|
15
7
|
* @kosService core.software-info
|
|
16
8
|
* @category Model Configuration
|
|
17
9
|
* @category System Integration
|
|
18
10
|
*/
|
|
19
11
|
export interface SoftwareInfoOptions {
|
|
20
|
-
/**
|
|
12
|
+
/** No options are accepted. */
|
|
21
13
|
[key: string]: never;
|
|
22
14
|
}
|
|
23
15
|
|
|
@@ -29,10 +21,7 @@ export interface SoftwareInfoOptions {
|
|
|
29
21
|
export type SoftwareInfoModel = PublicModelInterface<SoftwareInfoModelImpl>;
|
|
30
22
|
|
|
31
23
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* This interface describes a software artifact (component, package, or module)
|
|
35
|
-
* installed on a KOS device node, including its identification, grouping, and version.
|
|
24
|
+
* A software artifact installed on a node.
|
|
36
25
|
*
|
|
37
26
|
* @kosService core.software-info
|
|
38
27
|
* @group KOS Model
|
|
@@ -48,11 +37,8 @@ export interface ArtifactsType {
|
|
|
48
37
|
}
|
|
49
38
|
|
|
50
39
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* This interface describes the complete software configuration of a single KOS device node,
|
|
54
|
-
* including the node identification, KOS framework version, and all installed artifacts
|
|
55
|
-
* organized by functional groups.
|
|
40
|
+
* The software installed on one node: its KOS version and its artifacts,
|
|
41
|
+
* grouped by artifact group.
|
|
56
42
|
*
|
|
57
43
|
* @kosService core.software-info
|
|
58
44
|
* @group KOS Model
|
|
@@ -5,50 +5,19 @@ import { StateBeanResponse } from './services';
|
|
|
5
5
|
import { StateBeanModel, StateBeanOptions, StatePropsMap } from './types';
|
|
6
6
|
export declare const MODEL_TYPE = "state-bean-model";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* The device state properties at one state path. The model loads them on load
|
|
9
|
+
* and applies `/kos/state/{path}` topic updates, converting `"true"`/`"false"`
|
|
10
|
+
* and numeric strings to booleans and numbers. `props` is a reactive map, so a
|
|
11
|
+
* `kosComponent` reading it re-renders when a property changes.
|
|
9
12
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* topics. This model is essential for applications that need to monitor device state,
|
|
13
|
-
* track property changes, or build reactive UIs that respond to device status updates.
|
|
14
|
-
*
|
|
15
|
-
* ## Key Features
|
|
16
|
-
* - **Real-time Synchronization** - Automatic updates via `/kos/state/{path}` WebSocket topics
|
|
17
|
-
* - **Type-safe Properties** - Strongly typed state properties with automatic type conversion
|
|
18
|
-
* - **Observable State Map** - Reactive Map-based property storage for efficient updates
|
|
19
|
-
* - **Automatic Type Conversion** - Smart conversion of string values to boolean/number types
|
|
20
|
-
* - **Path-based Organization** - Hierarchical state organization using dot-notation paths
|
|
21
|
-
* - **Lifecycle Management** - Proper initialization and loading of state data
|
|
22
|
-
*
|
|
23
|
-
* ## Topic-Based Reactivity
|
|
24
|
-
* The model listens to KOS topics for real-time synchronization:
|
|
25
|
-
* - **`/kos/state/{path}`** - Receives state updates for the specified path, triggering automatic property updates across all connected clients
|
|
26
|
-
*
|
|
27
|
-
* ## State Property Types
|
|
28
|
-
* Supports all common KOS state property types:
|
|
29
|
-
* - **string** - Text values, configuration strings, identifiers
|
|
30
|
-
* - **number** - Numeric values, counters, measurements, percentages
|
|
31
|
-
* - **boolean** - Status flags, enabled/disabled states, operational flags
|
|
32
|
-
* - **object** - Complex state objects, nested configurations
|
|
33
|
-
*
|
|
34
|
-
* ## Common Use Cases
|
|
35
|
-
* - **Device Status Monitoring** - Track operational states, error conditions, health metrics
|
|
36
|
-
* - **Configuration State** - Monitor dynamic configuration changes and feature flags
|
|
37
|
-
* - **System Status Dashboards** - Build real-time status displays and monitoring interfaces
|
|
38
|
-
* - **Conditional UI Logic** - Show/hide UI elements based on device state
|
|
39
|
-
* - **State-dependent Operations** - Enable/disable functionality based on device state
|
|
40
|
-
* - **Multi-client Synchronization** - Keep multiple clients in sync with device state
|
|
13
|
+
* Declare one on a model with `@kosStateBean`, or a single property with
|
|
14
|
+
* `@kosStateProp`.
|
|
41
15
|
*
|
|
42
16
|
* @interface
|
|
43
|
-
* @example
|
|
17
|
+
* @example
|
|
44
18
|
* ```typescript
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* .build();
|
|
48
|
-
*
|
|
49
|
-
* // Access reactive state properties
|
|
50
|
-
* const isOnline = deviceState.props.get('online') as boolean;
|
|
51
|
-
* const temperature = deviceState.props.get('temperature') as number;
|
|
19
|
+
* @kosStateBean({ path: "system:app" })
|
|
20
|
+
* appState!: StateBean;
|
|
52
21
|
* ```
|
|
53
22
|
*
|
|
54
23
|
* @group KOS Model
|
|
@@ -92,7 +61,7 @@ export declare class StateBeanModelImpl<T extends Record<string, StatePropertyTy
|
|
|
92
61
|
*/
|
|
93
62
|
init(): Promise<void>;
|
|
94
63
|
/**
|
|
95
|
-
*
|
|
64
|
+
* Sets several properties at once.
|
|
96
65
|
* @param props Properties to update
|
|
97
66
|
* @private
|
|
98
67
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-bean-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/state-bean/state-bean-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/E,eAAO,MAAM,UAAU,qBAAqB,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"state-bean-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/state-bean/state-bean-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/E,eAAO,MAAM,UAAU,qBAAqB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,SAAS,CACnB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAAG,MAAM,CACnD,MAAM,EACN,kBAAkB,CACnB,IACC,oBAAoB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;AAIhD;;;GAGG;AACH,qBACa,kBAAkB,CAC7B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAAG,MAAM,CACnD,MAAM,EACN,kBAAkB,CACnB,CACD,YAAW,cAAc,CAAC,CAAC,CAAC,EAAE,eAAe;IAE7C,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,6CAA6C;IAC7C,IAAI,EAAG,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACxB,mDAAmD;IACnD,MAAM,EAAE,gBAAgB,CAAC;gBAEvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,kBAAkB;IAQ7B;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAI5C;;;;;OAKG;IAKH,uBAAuB,CAAC,SAAS,EAAE,iBAAiB;IAkBpD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAMrD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAO5B"}
|
|
@@ -1,83 +1,16 @@
|
|
|
1
1
|
import { KosModelRegistrationBean } from '../../../core';
|
|
2
2
|
import { StateBeanModel, StateBeanOptions } from './types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Registration for {@link StateBeanModel}.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* The type property is a string that identifies the model type.
|
|
10
|
-
* 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
|
|
11
|
-
* used when declaring dependencies on models.
|
|
6
|
+
* `type` identifies the model in the registry and in `@kosDependency` declarations.
|
|
7
|
+
* `factory(id)(options)` creates the model, or returns the existing one when the id is already in use. `predicate` narrows a model to `StateBeanModel`.
|
|
8
|
+
* Spread `registration` into an application's model registry.
|
|
12
9
|
*
|
|
13
10
|
* @example
|
|
14
11
|
* ```typescript
|
|
15
|
-
*
|
|
16
|
-
* @kosDependency({modelType: StateBean.type, id: "stateBeanId"})
|
|
17
|
-
* private stateBeanModel: StateBeanModel;
|
|
12
|
+
* const model = StateBean.factory("stateBeanId")(options);
|
|
18
13
|
* ```
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
* ## factory
|
|
22
|
-
*
|
|
23
|
-
* The factory method creates a factory function that can be used to create new StateBeanModel instances.
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
27
|
-
*
|
|
28
|
-
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
29
|
-
* in this case and the existing model will be returned in its current state.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```typescript
|
|
33
|
-
* const model = StateBean.factory("stateBeanId")({
|
|
34
|
-
* // Add option data
|
|
35
|
-
* });
|
|
36
|
-
* ```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*
|
|
40
|
-
* ## predicate
|
|
41
|
-
*
|
|
42
|
-
* [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 StateBeanModel.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```typescript
|
|
46
|
-
*
|
|
47
|
-
* const model: IKosDataModel = ...; // some model
|
|
48
|
-
*
|
|
49
|
-
* if (StateBean.predicate(model)) {
|
|
50
|
-
* // if the function evaluates to true, the model is narrowed down to StateBeanModel
|
|
51
|
-
* // and the compiler will know that the model has the StateBeanModel interface
|
|
52
|
-
* model.updateAvailability(false);
|
|
53
|
-
* }
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* ## registration
|
|
57
|
-
*
|
|
58
|
-
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
59
|
-
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
*
|
|
64
|
-
* In an application registration file you can declare the model registration as follows:
|
|
65
|
-
*
|
|
66
|
-
* **registration.ts**
|
|
67
|
-
* ```typescript
|
|
68
|
-
* import { StateBean } from "@kosdev-code/kos-dispense-sdk";
|
|
69
|
-
* ...
|
|
70
|
-
* import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
71
|
-
* export const kosModels: IKosRegistry["models"] = {
|
|
72
|
-
* ...StateBean.registration,
|
|
73
|
-
* };
|
|
74
|
-
* ```
|
|
75
|
-
*
|
|
76
|
-
* ## registration.singleton
|
|
77
|
-
|
|
78
|
-
* The stateBean 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.
|
|
79
|
-
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
80
|
-
|
|
81
|
-
* */
|
|
14
|
+
*/
|
|
82
15
|
export declare const StateBean: Readonly<KosModelRegistrationBean<StateBeanModel, StateBeanOptions>>;
|
|
83
16
|
//# sourceMappingURL=state-bean-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-bean-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/state-bean/state-bean-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAG9D,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhE
|
|
1
|
+
{"version":3,"file":"state-bean-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/state-bean/state-bean-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAG9D,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,EAAE,QAAQ,CAC9B,wBAAwB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAW3D,CAAC"}
|
|
@@ -1,64 +1,13 @@
|
|
|
1
1
|
import { StatePropertyTypes } from '../../types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* This interface defines the configuration options for the StateBean model,
|
|
6
|
-
* specifying which state path the model should monitor for real-time updates.
|
|
7
|
-
*
|
|
8
|
-
* @example Basic StateBean Model Creation
|
|
9
|
-
* ```typescript
|
|
10
|
-
* // Monitor device operational status
|
|
11
|
-
* const deviceState = StateBean.instance('device-status')
|
|
12
|
-
* .options({ path: 'device.operational.status' })
|
|
13
|
-
* .build();
|
|
14
|
-
*
|
|
15
|
-
* // Monitor system health metrics
|
|
16
|
-
* const healthState = StateBean.instance('system-health')
|
|
17
|
-
* .options({ path: 'system.health.metrics' })
|
|
18
|
-
* .build();
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @example Path Patterns
|
|
22
|
-
* ```typescript
|
|
23
|
-
* // Different path patterns for different use cases
|
|
24
|
-
* const networkOptions: StateBeanOptions = {
|
|
25
|
-
* path: 'network.interfaces.primary' // Network interface state
|
|
26
|
-
* };
|
|
27
|
-
*
|
|
28
|
-
* const pumpOptions: StateBeanOptions = {
|
|
29
|
-
* path: 'assembly.pumps.status' // Pump system state
|
|
30
|
-
* };
|
|
31
|
-
*
|
|
32
|
-
* const brewingOptions: StateBeanOptions = {
|
|
33
|
-
* path: 'beverage.brewing.process' // Brewing process state
|
|
34
|
-
* };
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @example Hierarchical State Organization
|
|
38
|
-
* ```typescript
|
|
39
|
-
* // Use dot notation for hierarchical state paths
|
|
40
|
-
* const parentState = StateBean.instance('parent')
|
|
41
|
-
* .options({ path: 'system' })
|
|
42
|
-
* .build();
|
|
43
|
-
*
|
|
44
|
-
* const childState = StateBean.instance('child')
|
|
45
|
-
* .options({ path: 'system.subsystem.component' })
|
|
46
|
-
* .build();
|
|
47
|
-
* ```
|
|
3
|
+
* Options for a {@link StateBean}: the device state path to follow.
|
|
48
4
|
*
|
|
49
5
|
* @kosService core.state-bean
|
|
50
6
|
* @category Model Configuration
|
|
51
7
|
* @category State Management
|
|
52
8
|
*/
|
|
53
9
|
export interface StateBeanOptions {
|
|
54
|
-
/**
|
|
55
|
-
* State path to monitor for updates using dot notation hierarchy.
|
|
56
|
-
* This path corresponds to the WebSocket topic `/kos/state/{path}` for real-time updates.
|
|
57
|
-
*
|
|
58
|
-
* @example "device.operational.status"
|
|
59
|
-
* @example "network.interfaces.primary"
|
|
60
|
-
* @example "assembly.pumps.status"
|
|
61
|
-
*/
|
|
10
|
+
/** State path to follow. Updates arrive on the `/kos/state/{path}` topic. */
|
|
62
11
|
path: string;
|
|
63
12
|
}
|
|
64
13
|
|
|
@@ -70,32 +19,7 @@ export interface StateBeanOptions {
|
|
|
70
19
|
type StateKeys<T extends Record<string, StatePropertyTypes>> = keyof T;
|
|
71
20
|
|
|
72
21
|
/**
|
|
73
|
-
* Reactive
|
|
74
|
-
*
|
|
75
|
-
* This Map provides efficient storage and retrieval of state properties with automatic
|
|
76
|
-
* reactivity through MobX observables. The Map structure allows for dynamic property
|
|
77
|
-
* addition/removal while maintaining type safety for known properties.
|
|
78
|
-
*
|
|
79
|
-
* @example Accessing State Properties
|
|
80
|
-
* ```typescript
|
|
81
|
-
* // Define typed state interface
|
|
82
|
-
* interface PumpState {
|
|
83
|
-
* active: boolean;
|
|
84
|
-
* flowRate: number;
|
|
85
|
-
* temperature: number;
|
|
86
|
-
* lastMaintenance: string;
|
|
87
|
-
* }
|
|
88
|
-
*
|
|
89
|
-
* const pumpState = StateBean.instance('pump-monitor')
|
|
90
|
-
* .options({ path: 'assembly.pumps.pump1' })
|
|
91
|
-
* .build() as StateBean<PumpState>;
|
|
92
|
-
*
|
|
93
|
-
* // Type-safe property access
|
|
94
|
-
* const isActive = pumpState.props.get('active') as boolean;
|
|
95
|
-
* const currentFlow = pumpState.props.get('flowRate') as number;
|
|
96
|
-
* const temp = pumpState.props.get('temperature') as number;
|
|
97
|
-
* const maintenance = pumpState.props.get('lastMaintenance') as string;
|
|
98
|
-
* ```
|
|
22
|
+
* Reactive map of a state bean's properties, keyed by property name.
|
|
99
23
|
*
|
|
100
24
|
* @template T - The state property type mapping
|
|
101
25
|
*
|
|
@@ -106,11 +30,7 @@ type StateKeys<T extends Record<string, StatePropertyTypes>> = keyof T;
|
|
|
106
30
|
export type StatePropsMap<T> = Map<StateKeys<T>, T[keyof T]>;
|
|
107
31
|
|
|
108
32
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* This interface represents the public API for StateBean models, providing reactive
|
|
112
|
-
* access to device state properties through an observable Map structure. The interface
|
|
113
|
-
* supports real-time synchronization with device state via WebSocket topics.
|
|
33
|
+
* Public API of a {@link StateBean}.
|
|
114
34
|
*
|
|
115
35
|
* @kosService core.state-bean
|
|
116
36
|
* @group KOS Model
|
|
@@ -5,49 +5,15 @@ import { StatePropertyTypes } from '../types';
|
|
|
5
5
|
import { KosStateProp, StatePropOptions } from './types';
|
|
6
6
|
export declare const MODEL_TYPE = "state-prop-model";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* offering a focused interface for components or services that only need to monitor
|
|
12
|
-
* specific state values. This model automatically manages its dependency on the underlying
|
|
13
|
-
* StateBean and provides reactive access to individual property values.
|
|
14
|
-
*
|
|
15
|
-
* ## Key Features
|
|
16
|
-
* - **Single Property Focus** - Access one specific property from a StateBean path
|
|
17
|
-
* - **Automatic StateBean Dependency** - Manages StateBean dependency transparently
|
|
18
|
-
* - **Type-safe Value Access** - Strongly typed property value with generic support
|
|
19
|
-
* - **Reactive Updates** - Automatically updates when underlying StateBean changes
|
|
20
|
-
* - **Simplified Interface** - Clean `.value` accessor for property values
|
|
21
|
-
* - **String Conversion** - Built-in `toString()` method for display purposes
|
|
22
|
-
*
|
|
23
|
-
* ## StateBean Integration
|
|
24
|
-
* StateProp models automatically create and manage dependencies on StateBean models:
|
|
25
|
-
* - **Automatic Dependency** - Creates StateBean with matching path automatically
|
|
26
|
-
* - **Shared StateBean** - Multiple StateProp models can share the same StateBean
|
|
27
|
-
* - **Lifecycle Management** - Proper initialization and cleanup of dependencies
|
|
28
|
-
* - **Real-time Synchronization** - Inherits WebSocket updates from StateBean
|
|
29
|
-
*
|
|
30
|
-
* ## Common Use Cases
|
|
31
|
-
* - **Single Value Components** - React components that only need one state property
|
|
32
|
-
* - **Conditional Logic** - Enable/disable functionality based on specific state
|
|
33
|
-
* - **Status Indicators** - Display individual status flags or measurements
|
|
34
|
-
* - **Property Validation** - Monitor specific properties for validation rules
|
|
35
|
-
* - **Focused Updates** - Reduce re-renders by tracking only needed properties
|
|
36
|
-
* - **Service Dependencies** - Services that depend on specific state values
|
|
8
|
+
* One property of a device state bean. The model depends on the
|
|
9
|
+
* {@link StateBean} for its path, which StateProps on the same path share, and
|
|
10
|
+
* `value` reads the attribute from it reactively.
|
|
37
11
|
*
|
|
38
12
|
* @interface
|
|
39
|
-
* @example
|
|
13
|
+
* @example
|
|
40
14
|
* ```typescript
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* path: 'device.operational.status',
|
|
44
|
-
* attribute: 'online'
|
|
45
|
-
* })
|
|
46
|
-
* .build();
|
|
47
|
-
*
|
|
48
|
-
* // Access focused property value with type safety
|
|
49
|
-
* const isOnline = deviceOnline.value as boolean;
|
|
50
|
-
* console.log(`Status: ${deviceOnline.toString()}`);
|
|
15
|
+
* @kosStateProp({ path: "system:app", attribute: "online" })
|
|
16
|
+
* online!: StateProp<boolean>;
|
|
51
17
|
* ```
|
|
52
18
|
*
|
|
53
19
|
* @group KOS Model
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-prop-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/state-prop/state-prop-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9D,eAAO,MAAM,UAAU,qBAAqB,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"state-prop-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/state-prop/state-prop-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9D,eAAO,MAAM,UAAU,qBAAqB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,IACrE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;AAI9C;;;GAGG;AACH,qBACa,kBAAkB,CAC7B,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,CACjD,YAAW,YAAY,CAAC,CAAC,CAAC,EAAE,eAAe;IAE3C,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,MAAM,EAAE,gBAAgB,CAAC;IAEzB,+DAA+D;IAM/D,SAAS,EAAG,cAAc,CAAC;gBAGzB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,kBAAkB;IAW7B,oEAAoE;IACpE,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAEzB;IAID;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;;OAGG;IACH,QAAQ,IAAI,MAAM;CAGnB"}
|