@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
|
@@ -55,18 +55,8 @@ declare class KosConfigPropertyImpl implements KosConfigProperty {
|
|
|
55
55
|
*/
|
|
56
56
|
get schemaFormat(): string;
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* @returns Array of options with label/value pairs for dropdowns and selection controls
|
|
61
|
-
*
|
|
62
|
-
* @example Get Property Options
|
|
63
|
-
* ```typescript
|
|
64
|
-
* const options = statusProperty.options;
|
|
65
|
-
* // Returns: [
|
|
66
|
-
* // { label: "Active", value: "active" },
|
|
67
|
-
* // { label: "Inactive", value: "inactive" }
|
|
68
|
-
* // ]
|
|
69
|
-
* ```
|
|
58
|
+
* Options for an enumerated property: the `optionsExpander` when set, otherwise
|
|
59
|
+
* the schema's enum values or the values derived from its schema.
|
|
70
60
|
*/
|
|
71
61
|
get options(): OptionsType[];
|
|
72
62
|
convertUnit(converter?: UnitConverter, defaultSystem?: string, defaultMeasure?: string): {
|
|
@@ -83,25 +73,15 @@ declare class KosConfigPropertyImpl implements KosConfigProperty {
|
|
|
83
73
|
};
|
|
84
74
|
};
|
|
85
75
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* @param value - The new value to set (in regional units)
|
|
76
|
+
* Writes the value, given in display units, through {@link updateProperty}.
|
|
89
77
|
*
|
|
90
|
-
* @
|
|
91
|
-
* ```typescript
|
|
92
|
-
* pumpRateProperty.value = 1.2; // Sets rate to 1.2 mL/s (converted to backend units)
|
|
93
|
-
* ```
|
|
78
|
+
* @param value - The new value in display units
|
|
94
79
|
*/
|
|
95
80
|
set value(value: ConfigPropertyTypes);
|
|
96
81
|
/**
|
|
97
|
-
*
|
|
82
|
+
* The value converted to display units.
|
|
98
83
|
*
|
|
99
|
-
* @returns Property value in
|
|
100
|
-
*
|
|
101
|
-
* @example Get Property Value
|
|
102
|
-
* ```typescript
|
|
103
|
-
* const currentRate = pumpRateProperty.value; // Gets rate in mL/s (regional units)
|
|
104
|
-
* ```
|
|
84
|
+
* @returns Property value in display units
|
|
105
85
|
*/
|
|
106
86
|
get value(): ConfigPropertyTypes;
|
|
107
87
|
/**
|
|
@@ -117,16 +97,9 @@ declare class KosConfigPropertyImpl implements KosConfigProperty {
|
|
|
117
97
|
*/
|
|
118
98
|
get significantValue(): unknown;
|
|
119
99
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* @returns Previous property value in regional display units
|
|
100
|
+
* The value before the last update, in display units.
|
|
123
101
|
*
|
|
124
|
-
* @
|
|
125
|
-
* ```typescript
|
|
126
|
-
* const oldValue = pumpRateProperty.previousValue; // Previous rate value
|
|
127
|
-
* const newValue = pumpRateProperty.value; // Current rate value
|
|
128
|
-
* console.log(`Rate changed from ${oldValue} to ${newValue}`);
|
|
129
|
-
* ```
|
|
102
|
+
* @returns Previous property value in display units
|
|
130
103
|
*/
|
|
131
104
|
get previousValue(): {};
|
|
132
105
|
getValue(current: boolean): {};
|
|
@@ -135,27 +108,15 @@ declare class KosConfigPropertyImpl implements KosConfigProperty {
|
|
|
135
108
|
*/
|
|
136
109
|
activate(): Promise<void>;
|
|
137
110
|
/**
|
|
138
|
-
*
|
|
111
|
+
* The value formatted with its unit for the active locale, such as `"72.5 °F"`.
|
|
139
112
|
*
|
|
140
|
-
* @returns Localized string representation with
|
|
141
|
-
*
|
|
142
|
-
* @example Display Formatted Value
|
|
143
|
-
* ```typescript
|
|
144
|
-
* const display = temperatureProperty.displayValue; // "72.5 °F"
|
|
145
|
-
* const rate = pumpRateProperty.displayValue; // "1.2 mL/s"
|
|
146
|
-
* ```
|
|
113
|
+
* @returns Localized string representation with units
|
|
147
114
|
*/
|
|
148
115
|
get displayValue(): string;
|
|
149
116
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* @returns Unit string (e.g., "°F", "mL/s", "seconds") or empty string for unitless properties
|
|
117
|
+
* Display unit of the value, such as `"°F"` or `"mL"`.
|
|
153
118
|
*
|
|
154
|
-
* @
|
|
155
|
-
* ```typescript
|
|
156
|
-
* const unit = temperatureProperty.unit; // "°F" or "°C" based on regional settings
|
|
157
|
-
* const rateUnit = pumpRateProperty.unit; // "mL/s"
|
|
158
|
-
* ```
|
|
119
|
+
* @returns Unit string, or an empty string for unitless properties
|
|
159
120
|
*/
|
|
160
121
|
get unit(): string | undefined;
|
|
161
122
|
/**
|
|
@@ -170,18 +131,10 @@ declare class KosConfigPropertyImpl implements KosConfigProperty {
|
|
|
170
131
|
getFormatterOptions(converter?: ConfigPropConverter): Intl.NumberFormat | null;
|
|
171
132
|
private getConverter;
|
|
172
133
|
/**
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
* @param value - The new value to set (in regional display units)
|
|
176
|
-
*
|
|
177
|
-
* @example Update Property
|
|
178
|
-
* ```typescript
|
|
179
|
-
* // Set temperature in Fahrenheit (regional unit)
|
|
180
|
-
* await temperatureProperty.updateProperty(75.5);
|
|
134
|
+
* Converts the value from display units to backend units and writes it to the
|
|
135
|
+
* bean.
|
|
181
136
|
*
|
|
182
|
-
*
|
|
183
|
-
* await pumpRateProperty.updateProperty(1.2);
|
|
184
|
-
* ```
|
|
137
|
+
* @param value - The new value in display units
|
|
185
138
|
*/
|
|
186
139
|
updateProperty(value: ConfigPropertyTypes): Promise<void>;
|
|
187
140
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-bean-prop-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/config-bean-prop/config-bean-prop-model.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAS3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKpD,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,WAAW,EACZ,MAAM,SAAS,CAAC;AAuDjB;;;GAGG;AACH,cACM,qBAAsB,YAAW,iBAAiB;IACtD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAG5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAM9B,UAAU,EAAG,eAAe,CAAC;IAW7B,IAAI,EAAG,gBAAgB,CAAC;gBAEZ,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB;IAe3D;;;;;;;QAOI;IACJ,2BAA2B,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM;IAgBf;;;;;;;;;QASI;IACJ,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAW5D;;;;OAIG;IACH,IAAI,UAAU,iEAOb;IAED;;;;OAIG;IACH,IAAI,YAAY,WAMf;IAED
|
|
1
|
+
{"version":3,"file":"config-bean-prop-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-ui-sdk/src/models/models/config-bean-prop/config-bean-prop-model.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAS3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKpD,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,WAAW,EACZ,MAAM,SAAS,CAAC;AAuDjB;;;GAGG;AACH,cACM,qBAAsB,YAAW,iBAAiB;IACtD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAG5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAM9B,UAAU,EAAG,eAAe,CAAC;IAW7B,IAAI,EAAG,gBAAgB,CAAC;gBAEZ,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB;IAe3D;;;;;;;QAOI;IACJ,2BAA2B,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM;IAgBf;;;;;;;;;QASI;IACJ,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAW5D;;;;OAIG;IACH,IAAI,UAAU,iEAOb;IAED;;;;OAIG;IACH,IAAI,YAAY,WAMf;IAED;;;OAGG;IACH,IAAI,OAAO,kBAwBV;IAED,WAAW,CACT,SAAS,CAAC,EAAE,aAAa,EACzB,aAAa,CAAC,EAAE,MAAM,EACtB,cAAc,CAAC,EAAE,MAAM;;;;;IAazB,iBAAiB;;;;;;;;IAajB;;;;OAIG;IACH,IAAI,KAAK,CAAC,KAAK,EAAE,mBAAmB,EAEnC;IAED;;;;OAIG;IACH,IAAI,KAAK,IATQ,mBAAmB,CAWnC;IAED;;;;OAIG;IACH,IAAI,QAAQ,YAEX;IAED;;;;OAIG;IACH,IAAI,gBAAgB,YA8BnB;IAED;;;;OAIG;IACH,IAAI,aAAa,OAEhB;IAED,QAAQ,CAAC,OAAO,EAAE,OAAO;IAczB;;OAEG;IACG,QAAQ;IAId;;;;OAIG;IACH,IAAI,YAAY,WA2Bf;IAED;;;;OAIG;IACH,IAAI,IAAI,uBAWP;IAED;;;;OAIG;IACH,IAAI,cAAc,uEAMjB;IAED,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,cAAc;IAgBtB,mBAAmB,CAAC,SAAS,CAAC,EAAE,mBAAmB;IAuDnD,OAAO,CAAC,YAAY;IA6DpB;;;;;OAKG;IACG,cAAc,CAAC,KAAK,EAAE,mBAAmB;CAgBhD;AAED,QAAA,MAAM,YAAY;;;;;;;;8BA3jBM,+BACvB,EAED,iBAAiB;CAmkBhB,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -3,27 +3,18 @@ import { SchemaNodeType, SchemaOptionsType } from '../../../services/config-bean
|
|
|
3
3
|
import { IKosDataModel } from '../../core';
|
|
4
4
|
import { ConfigPropertyTypes } from '../../types';
|
|
5
5
|
/**
|
|
6
|
-
* Unit conversion
|
|
6
|
+
* Unit conversion for a {@link KosConfigProperty}: the units the backend stores
|
|
7
|
+
* and the units shown to the user.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* When `from.system` is omitted the backend value is treated as SI; when `to`
|
|
10
|
+
* omits a system or unit, the region's default unit system and its default unit
|
|
11
|
+
* for the measure are used.
|
|
11
12
|
*
|
|
12
|
-
* @example
|
|
13
|
+
* @example
|
|
13
14
|
* ```typescript
|
|
14
|
-
* const
|
|
15
|
-
* measure:
|
|
16
|
-
* from: { unit:
|
|
17
|
-
* to: { system: 'auto' } // Auto-detect regional display
|
|
18
|
-
* };
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @example Volume Conversion with Specific Units
|
|
22
|
-
* ```typescript
|
|
23
|
-
* const volumeConverter: ConfigPropConverter = {
|
|
24
|
-
* measure: 'volume',
|
|
25
|
-
* from: { unit: 'liter' }, // Backend in liters
|
|
26
|
-
* to: { unit: 'fluid-ounce', system: 'imperial' } // Force US fluid ounces
|
|
15
|
+
* const converter: ConfigPropConverter = {
|
|
16
|
+
* measure: "volume",
|
|
17
|
+
* from: { unit: "milliliter" },
|
|
27
18
|
* };
|
|
28
19
|
* ```
|
|
29
20
|
*
|
|
@@ -32,49 +23,19 @@ import { ConfigPropertyTypes } from '../../types';
|
|
|
32
23
|
* @category Configuration
|
|
33
24
|
*/
|
|
34
25
|
export interface ConfigPropConverter {
|
|
35
|
-
/**
|
|
36
|
-
* The physical measure being converted (temperature, volume, pressure, etc.).
|
|
37
|
-
* This helps the system understand what type of conversion to perform.
|
|
38
|
-
*/
|
|
26
|
+
/** Physical measure being converted, such as `temperature` or `volume`. */
|
|
39
27
|
measure?: string;
|
|
40
28
|
|
|
41
|
-
/**
|
|
42
|
-
* Source unit configuration (typically backend storage units).
|
|
43
|
-
* Defines the unit system and specific unit that values are stored in.
|
|
44
|
-
*/
|
|
29
|
+
/** Units the backend stores the value in. */
|
|
45
30
|
from?: UnitConverter;
|
|
46
31
|
|
|
47
|
-
/**
|
|
48
|
-
* Target unit configuration (display units).
|
|
49
|
-
* Defines how values should be displayed to users, including regional preferences.
|
|
50
|
-
*/
|
|
32
|
+
/** Units the value is displayed in. */
|
|
51
33
|
to?: UnitConverter;
|
|
52
34
|
}
|
|
53
35
|
|
|
54
36
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* Supports both static formatting options and dynamic formatting based on unit system.
|
|
58
|
-
* Built on top of the Intl.NumberFormat API for internationalization support.
|
|
59
|
-
*
|
|
60
|
-
* @example Static Formatting Options
|
|
61
|
-
* ```typescript
|
|
62
|
-
* const staticFormatter: FormatOptions = {
|
|
63
|
-
* style: 'unit',
|
|
64
|
-
* unit: 'celsius',
|
|
65
|
-
* maximumFractionDigits: 1
|
|
66
|
-
* };
|
|
67
|
-
* ```
|
|
68
|
-
*
|
|
69
|
-
* @example Dynamic System-Based Formatting
|
|
70
|
-
* ```typescript
|
|
71
|
-
* const dynamicFormatter: FormatOptions = (system: string) => {
|
|
72
|
-
* if (system === 'imperial') {
|
|
73
|
-
* return { style: 'unit', unit: 'fahrenheit', maximumFractionDigits: 0 };
|
|
74
|
-
* }
|
|
75
|
-
* return { style: 'unit', unit: 'celsius', maximumFractionDigits: 1 };
|
|
76
|
-
* };
|
|
77
|
-
* ```
|
|
37
|
+
* `Intl.NumberFormat` options for a property's display value, either fixed or
|
|
38
|
+
* computed from the active unit system.
|
|
78
39
|
*
|
|
79
40
|
* @kosService core.use-config-property
|
|
80
41
|
* @group KOS Model
|
|
@@ -85,19 +46,7 @@ export type FormatOptions =
|
|
|
85
46
|
| ((system: string) => Intl.NumberFormatOptions);
|
|
86
47
|
|
|
87
48
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* Represents a single selectable option with a display label and internal value.
|
|
91
|
-
* Used for configuration properties that have predefined valid values.
|
|
92
|
-
*
|
|
93
|
-
* @example Basic Options
|
|
94
|
-
* ```typescript
|
|
95
|
-
* const optionsList: OptionsType[] = [
|
|
96
|
-
* { label: 'Low Speed', value: 'low' },
|
|
97
|
-
* { label: 'Medium Speed', value: 'medium' },
|
|
98
|
-
* { label: 'High Speed', value: 'high' }
|
|
99
|
-
* ];
|
|
100
|
-
* ```
|
|
49
|
+
* A selectable value of an enumerated configuration property.
|
|
101
50
|
*
|
|
102
51
|
* @kosService core.use-config-property
|
|
103
52
|
* @group KOS Model
|
|
@@ -111,39 +60,8 @@ export interface OptionsType {
|
|
|
111
60
|
}
|
|
112
61
|
|
|
113
62
|
/**
|
|
114
|
-
* Options
|
|
115
|
-
*
|
|
116
|
-
* Can be either a static list of options or a dynamic function that generates
|
|
117
|
-
* options based on the current unit system. Useful for configuration properties
|
|
118
|
-
* that need different option sets based on regional settings.
|
|
119
|
-
*
|
|
120
|
-
* @example Static Options List
|
|
121
|
-
* ```typescript
|
|
122
|
-
* const staticOptions: OptionsExpander = [
|
|
123
|
-
* { label: 'Automatic', value: 'auto' },
|
|
124
|
-
* { label: 'Manual', value: 'manual' },
|
|
125
|
-
* { label: 'Disabled', value: 'disabled' }
|
|
126
|
-
* ];
|
|
127
|
-
* ```
|
|
128
|
-
*
|
|
129
|
-
* @example Dynamic System-Based Options
|
|
130
|
-
* ```typescript
|
|
131
|
-
* const dynamicOptions: OptionsExpander = (system: string, schemaOptions?: string[]) => {
|
|
132
|
-
* const baseOptions = [
|
|
133
|
-
* { label: 'Automatic', value: 'auto' },
|
|
134
|
-
* { label: 'Manual', value: 'manual' }
|
|
135
|
-
* ];
|
|
136
|
-
*
|
|
137
|
-
* // Add system-specific options
|
|
138
|
-
* if (system === 'imperial') {
|
|
139
|
-
* baseOptions.push({ label: 'Imperial Mode', value: 'imperial' });
|
|
140
|
-
* } else if (system === 'metric') {
|
|
141
|
-
* baseOptions.push({ label: 'Metric Mode', value: 'metric' });
|
|
142
|
-
* }
|
|
143
|
-
*
|
|
144
|
-
* return baseOptions;
|
|
145
|
-
* };
|
|
146
|
-
* ```
|
|
63
|
+
* Options for an enumerated property: a fixed list, or a function of the active
|
|
64
|
+
* unit system and the values the schema allows.
|
|
147
65
|
*
|
|
148
66
|
* @kosService core.use-config-property
|
|
149
67
|
* @group KOS Model
|
|
@@ -154,36 +72,8 @@ export type OptionsExpander =
|
|
|
154
72
|
| ((system: string, options?: string[]) => OptionsType[]);
|
|
155
73
|
|
|
156
74
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* These options define how individual configuration properties access and display
|
|
160
|
-
* values from the backend configuration system. They specify the configuration path,
|
|
161
|
-
* attribute name, and optional unit conversion and formatting behavior.
|
|
162
|
-
*
|
|
163
|
-
* @example Basic Property Configuration
|
|
164
|
-
* ```typescript
|
|
165
|
-
* const pumpRateOptions: ConfigBeanPropOptions = {
|
|
166
|
-
* path: 'assembly:core:board:micro:pump:S4',
|
|
167
|
-
* attribute: 'nominalRate'
|
|
168
|
-
* };
|
|
169
|
-
* ```
|
|
170
|
-
*
|
|
171
|
-
* @example Property with Unit Conversion
|
|
172
|
-
* ```typescript
|
|
173
|
-
* const temperatureOptions: ConfigBeanPropOptions = {
|
|
174
|
-
* path: 'assembly:core:board:cooling',
|
|
175
|
-
* attribute: 'targetTemperature',
|
|
176
|
-
* converter: {
|
|
177
|
-
* measure: 'temperature',
|
|
178
|
-
* from: { unit: 'kelvin' },
|
|
179
|
-
* to: { system: 'auto' }
|
|
180
|
-
* },
|
|
181
|
-
* formatter: {
|
|
182
|
-
* style: 'unit',
|
|
183
|
-
* maximumFractionDigits: 1
|
|
184
|
-
* }
|
|
185
|
-
* };
|
|
186
|
-
* ```
|
|
75
|
+
* Options for a {@link KosConfigProperty}. These are the parameters of
|
|
76
|
+
* `@kosConfigProperty`.
|
|
187
77
|
*
|
|
188
78
|
* @kosService core.use-config-property
|
|
189
79
|
* @group KOS Model
|
|
@@ -191,97 +81,30 @@ export type OptionsExpander =
|
|
|
191
81
|
*/
|
|
192
82
|
export interface ConfigBeanPropOptions {
|
|
193
83
|
/**
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
* This path identifies the specific configuration bean that contains
|
|
197
|
-
* the target attribute. Must match the path used by the parent ConfigBeanModel.
|
|
198
|
-
*
|
|
199
|
-
* @example Common Configuration Paths
|
|
200
|
-
* ```typescript
|
|
201
|
-
* // Hardware component configuration
|
|
202
|
-
* path: 'assembly:core:board:micro:pump:S4'
|
|
203
|
-
*
|
|
204
|
-
* // System-level configuration
|
|
205
|
-
* path: 'system:app'
|
|
206
|
-
*
|
|
207
|
-
* // Service configuration
|
|
208
|
-
* path: 'kos:service:CANPumpMgr'
|
|
209
|
-
* ```
|
|
84
|
+
* Colon-separated path of the config bean that holds the attribute, such as `system:app`.
|
|
210
85
|
*/
|
|
211
86
|
path: string;
|
|
212
87
|
|
|
213
88
|
/**
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
* This identifies which property within the configuration bean
|
|
217
|
-
* this KosConfigProperty instance should access and manage.
|
|
218
|
-
*
|
|
219
|
-
* @example Attribute Examples
|
|
220
|
-
* ```typescript
|
|
221
|
-
* attribute: 'nominalRate' // For pump flow rates
|
|
222
|
-
* attribute: 'targetTemperature' // For temperature settings
|
|
223
|
-
* attribute: 'enabled' // For boolean flags
|
|
224
|
-
* attribute: 'retryCount' // For numeric counters
|
|
225
|
-
* ```
|
|
89
|
+
* Attribute within the bean, such as `nominalRate` or `settings.durationSec`.
|
|
226
90
|
*/
|
|
227
91
|
attribute: string;
|
|
228
92
|
|
|
229
93
|
/**
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
* When provided, enables automatic conversion between backend storage units
|
|
233
|
-
* and regional display units. If omitted, no unit conversion is performed.
|
|
234
|
-
*
|
|
235
|
-
* @example Temperature Conversion
|
|
236
|
-
* ```typescript
|
|
237
|
-
* converter: {
|
|
238
|
-
* from: { unit: 'kelvin', system: 'si' },
|
|
239
|
-
* to: { system: 'auto' } // Auto-detect regional system
|
|
240
|
-
* }
|
|
241
|
-
* ```
|
|
94
|
+
* Unit conversion between backend and display units. Without it, values are shown as stored.
|
|
242
95
|
*/
|
|
243
96
|
converter?: { measure?: string; from?: UnitConverter; to?: UnitConverter };
|
|
244
97
|
|
|
245
|
-
/**
|
|
246
|
-
* Optional display formatting configuration.
|
|
247
|
-
*
|
|
248
|
-
* Configures how numeric values are formatted for display, including
|
|
249
|
-
* decimal places, units, and locale-specific formatting rules.
|
|
250
|
-
*
|
|
251
|
-
* @example Custom Formatting
|
|
252
|
-
* ```typescript
|
|
253
|
-
* formatter: {
|
|
254
|
-
* style: 'unit',
|
|
255
|
-
* unit: 'celsius',
|
|
256
|
-
* maximumFractionDigits: 1,
|
|
257
|
-
* minimumFractionDigits: 1
|
|
258
|
-
* }
|
|
259
|
-
* ```
|
|
260
|
-
*/
|
|
98
|
+
/** Number formatting for `displayValue`. */
|
|
261
99
|
formatter?: FormatOptions;
|
|
262
100
|
|
|
263
101
|
/**
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
* Provides a list of valid values for configuration properties that
|
|
267
|
-
* have discrete options rather than continuous values.
|
|
268
|
-
*
|
|
269
|
-
* @example Static Options
|
|
270
|
-
* ```typescript
|
|
271
|
-
* optionsExpander: [
|
|
272
|
-
* { label: 'Low', value: 'low' },
|
|
273
|
-
* { label: 'Medium', value: 'medium' },
|
|
274
|
-
* { label: 'High', value: 'high' }
|
|
275
|
-
* ]
|
|
276
|
-
* ```
|
|
102
|
+
* Options for an enumerated property, replacing those derived from the schema.
|
|
277
103
|
*/
|
|
278
104
|
optionsExpander?: OptionsExpander;
|
|
279
105
|
|
|
280
106
|
/**
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
* When provided, overrides the default configuration service endpoint.
|
|
284
|
-
* Useful for testing, development, or alternative service implementations.
|
|
107
|
+
* Base path of the config service, when it differs from the default.
|
|
285
108
|
*
|
|
286
109
|
* @default undefined (uses default KOS configuration service path)
|
|
287
110
|
*/
|
|
@@ -290,8 +113,8 @@ export interface ConfigBeanPropOptions {
|
|
|
290
113
|
/**
|
|
291
114
|
* Connection the property's bean is routed to.
|
|
292
115
|
*
|
|
293
|
-
* Set it when one window binds the same config path on several devices;
|
|
294
|
-
*
|
|
116
|
+
* Set it when one window binds the same config path on several devices; the
|
|
117
|
+
* property and bean model ids include it so each device gets its own bean.
|
|
295
118
|
*
|
|
296
119
|
* @default undefined (the transport's default connection)
|
|
297
120
|
*/
|
|
@@ -299,17 +122,13 @@ export interface ConfigBeanPropOptions {
|
|
|
299
122
|
}
|
|
300
123
|
|
|
301
124
|
/**
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* Provides type-safe access to specific configuration attributes with built-in unit conversion
|
|
305
|
-
* between backend storage units (typically SI) and regional display units.
|
|
125
|
+
* One attribute of a config bean, with unit conversion to the region's display
|
|
126
|
+
* units and number formatting. Declare it on a model with `@kosConfigProperty`.
|
|
306
127
|
*
|
|
307
|
-
* @example
|
|
128
|
+
* @example
|
|
308
129
|
* ```typescript
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
* attribute: 'nominalRate'
|
|
312
|
-
* });
|
|
130
|
+
* @kosConfigProperty({ path: "system:app", attribute: "settings.durationSec", converter: { to: "second" } })
|
|
131
|
+
* durationSec!: KosConfigProperty<number>;
|
|
313
132
|
* ```
|
|
314
133
|
*
|
|
315
134
|
* @kosService core.use-config-property
|
|
@@ -357,8 +176,8 @@ export interface KosConfigProperty<
|
|
|
357
176
|
readonly schemaFormat?: string;
|
|
358
177
|
|
|
359
178
|
/**
|
|
360
|
-
*
|
|
361
|
-
*
|
|
179
|
+
* Writes a new value to the backend, converting it from display units to
|
|
180
|
+
* backend units first.
|
|
362
181
|
*
|
|
363
182
|
* @param value The new value in display units
|
|
364
183
|
*/
|