@kosdev-code/kos-ui-sdk 0.1.0-next.943 → 0.1.0-next.948
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/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.d.ts +67 -358
- 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 +12 -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/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 +3 -3
- package/core/core/kosModelManager.d.ts +2 -3
- package/core/core/kosModelManager.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/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/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 +12 -21
- package/index.cjs.map +1 -1
- package/index.js +13 -22
- 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 +14 -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/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/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-GUbTY4KD.cjs → software-info-registration-CY_E6Rw7.cjs} +85 -368
- package/software-info-registration-CY_E6Rw7.cjs.map +1 -0
- package/{software-info-registration-CKlTQPet.js → software-info-registration-CuuEsH8v.js} +85 -368
- package/software-info-registration-CuuEsH8v.js.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/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
|
@@ -2031,7 +2031,7 @@ class KosModelContainer {
|
|
|
2031
2031
|
}
|
|
2032
2032
|
}
|
|
2033
2033
|
/**
|
|
2034
|
-
*
|
|
2034
|
+
* Watch indexed model properties and refresh the matching indexes when they change (Zone 3)
|
|
2035
2035
|
* @private
|
|
2036
2036
|
*/
|
|
2037
2037
|
_configureModelMonitoring(model) {
|
|
@@ -2163,8 +2163,8 @@ class KosModelContainer {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
2165
|
/**
|
|
2166
|
-
*
|
|
2167
|
-
*
|
|
2166
|
+
* Evict models when capacity is exceeded (Zone 2: Workflow orchestration).
|
|
2167
|
+
* Evictions are logged at INFO level.
|
|
2168
2168
|
* @private
|
|
2169
2169
|
*/
|
|
2170
2170
|
async _evictModels() {
|
|
@@ -2906,7 +2906,7 @@ function injectFutureContainerSupport(modelInstance) {
|
|
|
2906
2906
|
},
|
|
2907
2907
|
enumerable: true,
|
|
2908
2908
|
configurable: true
|
|
2909
|
-
//
|
|
2909
|
+
// so makeAutoObservable can redefine it
|
|
2910
2910
|
});
|
|
2911
2911
|
Object.defineProperty(modelInstance, "progress", {
|
|
2912
2912
|
get() {
|
|
@@ -3112,7 +3112,7 @@ function injectCompanionSupport(modelInstance, initialData) {
|
|
|
3112
3112
|
get: () => parentModel,
|
|
3113
3113
|
enumerable: true,
|
|
3114
3114
|
configurable: true
|
|
3115
|
-
//
|
|
3115
|
+
// so makeAutoObservable can redefine it
|
|
3116
3116
|
});
|
|
3117
3117
|
if (mode === "composition") {
|
|
3118
3118
|
return;
|
|
@@ -3172,7 +3172,7 @@ function injectCompanionSupport(modelInstance, initialData) {
|
|
|
3172
3172
|
},
|
|
3173
3173
|
enumerable: true,
|
|
3174
3174
|
configurable: true
|
|
3175
|
-
//
|
|
3175
|
+
// so makeAutoObservable can redefine it
|
|
3176
3176
|
});
|
|
3177
3177
|
}
|
|
3178
3178
|
} catch (error) {
|
|
@@ -5157,7 +5157,7 @@ class KosOfflineQueue {
|
|
|
5157
5157
|
});
|
|
5158
5158
|
}
|
|
5159
5159
|
/**
|
|
5160
|
-
* Flush all queued events
|
|
5160
|
+
* Flush all queued events without temporal filtering
|
|
5161
5161
|
*/
|
|
5162
5162
|
flush() {
|
|
5163
5163
|
if (this.queue.length === 0) return;
|
|
@@ -11037,9 +11037,8 @@ class KosModelManager {
|
|
|
11037
11037
|
* @returns An array of preloaded model instances.
|
|
11038
11038
|
*
|
|
11039
11039
|
* @remarks
|
|
11040
|
-
*
|
|
11041
|
-
*
|
|
11042
|
-
* - Supports both string-based model keys and object-based model configurations.
|
|
11040
|
+
* Entries in `preloadModels` may be a model type string or an object with
|
|
11041
|
+
* `modelType`, `modelId` and `options`.
|
|
11043
11042
|
*/
|
|
11044
11043
|
get preloadedModels() {
|
|
11045
11044
|
return this.cache.preload((modelKey) => {
|
|
@@ -12539,29 +12538,11 @@ const ServiceFactory = {
|
|
|
12539
12538
|
* @returns An object with service methods for interacting with the server.
|
|
12540
12539
|
*
|
|
12541
12540
|
* @example
|
|
12542
|
-
*
|
|
12543
|
-
* const entityService = ServiceFactory.build({
|
|
12544
|
-
*
|
|
12545
|
-
*
|
|
12546
|
-
*
|
|
12547
|
-
* deleteModelPath: "/delete",
|
|
12548
|
-
* addModelPath: "/add",
|
|
12549
|
-
* modifyModelPath: "/modify",
|
|
12550
|
-
* });
|
|
12551
|
-
*
|
|
12552
|
-
* // Fetch a list of entities.
|
|
12553
|
-
* const entities = await entityService.getAll({ ordered: true });
|
|
12554
|
-
*
|
|
12555
|
-
* // Get details of a specific entity by ID.
|
|
12556
|
-
* const entityDetails = await entityService.getModelById({ id: "entity123" });
|
|
12557
|
-
*
|
|
12558
|
-
* // Add a new entity to the server.
|
|
12559
|
-
* const newEntity = { name: "New Entity" };
|
|
12560
|
-
* await entityService.addModel({ model: newEntity });
|
|
12561
|
-
*
|
|
12562
|
-
* // Modify an existing entity.
|
|
12563
|
-
* const updatedEntity = { id: "entity123", name: "Updated Entity" };
|
|
12564
|
-
* await entityService.modifyModel({ model: updatedEntity });
|
|
12541
|
+
* ```typescript
|
|
12542
|
+
* const entityService = ServiceFactory.build({ basePath: "/api/entities" });
|
|
12543
|
+
* const entities = await entityService.getAll({});
|
|
12544
|
+
* await entityService.modifyModel({ id: "entity123", model: { name: "Updated" } });
|
|
12545
|
+
* ```
|
|
12565
12546
|
*/
|
|
12566
12547
|
build: ({
|
|
12567
12548
|
destinationAddress = "",
|
|
@@ -12912,7 +12893,7 @@ class KosDataContainer {
|
|
|
12912
12893
|
}
|
|
12913
12894
|
}
|
|
12914
12895
|
/**
|
|
12915
|
-
*
|
|
12896
|
+
* Watch indexed data properties and bump the container revision when they change (Zone 3)
|
|
12916
12897
|
* @private
|
|
12917
12898
|
*/
|
|
12918
12899
|
_configureDataMonitoring(data) {
|
|
@@ -12983,9 +12964,9 @@ class KosDataContainer {
|
|
|
12983
12964
|
}
|
|
12984
12965
|
}
|
|
12985
12966
|
/**
|
|
12986
|
-
*
|
|
12987
|
-
*
|
|
12988
|
-
*
|
|
12967
|
+
* Evict data models when capacity is exceeded (Zone 2: Workflow orchestration).
|
|
12968
|
+
* Evictions are logged at INFO level. Data models have no lifecycle, so they
|
|
12969
|
+
* are removed from the container rather than destroyed.
|
|
12989
12970
|
* @private
|
|
12990
12971
|
*/
|
|
12991
12972
|
_evictModels() {
|
|
@@ -12999,7 +12980,7 @@ class KosDataContainer {
|
|
|
12999
12980
|
this._logDataEvictionComplete(idsToEvict.length);
|
|
13000
12981
|
}
|
|
13001
12982
|
/**
|
|
13002
|
-
* Log
|
|
12983
|
+
* Log that the data container exceeded its capacity (Zone 3)
|
|
13003
12984
|
* @private
|
|
13004
12985
|
*/
|
|
13005
12986
|
_logDataCapacityWarning(toEvict) {
|
|
@@ -13621,16 +13602,9 @@ let ConfigBeanModelImpl = class {
|
|
|
13621
13602
|
this.prevProps = ObservableData();
|
|
13622
13603
|
}
|
|
13623
13604
|
/**
|
|
13624
|
-
*
|
|
13605
|
+
* Current values of all the bean's attributes.
|
|
13625
13606
|
*
|
|
13626
13607
|
* @returns Object containing all configuration properties with their current values
|
|
13627
|
-
*
|
|
13628
|
-
* @example Access Configuration Values
|
|
13629
|
-
* ```typescript
|
|
13630
|
-
* const currentValues = systemConfig.values;
|
|
13631
|
-
* console.log('Machine ID:', currentValues.machineId);
|
|
13632
|
-
* console.log('Debug Mode:', currentValues.debugMode);
|
|
13633
|
-
* ```
|
|
13634
13608
|
*/
|
|
13635
13609
|
get values() {
|
|
13636
13610
|
return this.props.values;
|
|
@@ -13646,9 +13620,7 @@ let ConfigBeanModelImpl = class {
|
|
|
13646
13620
|
* @internal
|
|
13647
13621
|
*
|
|
13648
13622
|
* @remarks
|
|
13649
|
-
*
|
|
13650
|
-
*
|
|
13651
|
-
* In future additional information about the workspace could be loaded
|
|
13623
|
+
* Fetches the bean's values and schema.
|
|
13652
13624
|
*/
|
|
13653
13625
|
async load() {
|
|
13654
13626
|
log$k.debug(`loading config bean ${this.path}`);
|
|
@@ -13678,19 +13650,11 @@ let ConfigBeanModelImpl = class {
|
|
|
13678
13650
|
return Object.keys(this._schema?.schema || {});
|
|
13679
13651
|
}
|
|
13680
13652
|
/**
|
|
13681
|
-
*
|
|
13653
|
+
* Schema definition of an attribute. Schema keys may be regular expressions,
|
|
13654
|
+
* so a key with no exact entry is matched against them.
|
|
13682
13655
|
*
|
|
13683
13656
|
* @param key - Property key to get schema for
|
|
13684
13657
|
* @returns Schema definition if found, undefined otherwise
|
|
13685
|
-
*
|
|
13686
|
-
* @example Get Property Schema
|
|
13687
|
-
* ```typescript
|
|
13688
|
-
* const schema = systemConfig.getSchemaForProperty('debugMode');
|
|
13689
|
-
* if (schema) {
|
|
13690
|
-
* console.log('Type:', schema.type);
|
|
13691
|
-
* console.log('Description:', schema.description);
|
|
13692
|
-
* }
|
|
13693
|
-
* ```
|
|
13694
13658
|
*/
|
|
13695
13659
|
getSchemaForProperty(key) {
|
|
13696
13660
|
if (this.schemaKeys.includes(key)) {
|
|
@@ -13704,18 +13668,12 @@ let ConfigBeanModelImpl = class {
|
|
|
13704
13668
|
}
|
|
13705
13669
|
// -------------------ACTIONS----------------------------
|
|
13706
13670
|
/**
|
|
13707
|
-
*
|
|
13671
|
+
* Sets one attribute and writes the bean to the backend.
|
|
13708
13672
|
*
|
|
13709
13673
|
* @category Action
|
|
13710
13674
|
*
|
|
13711
13675
|
* @param key - The configuration property key to update
|
|
13712
13676
|
* @param value - The new value to set for the property
|
|
13713
|
-
*
|
|
13714
|
-
* @example Update Configuration Property
|
|
13715
|
-
* ```typescript
|
|
13716
|
-
* await systemConfig.updateProperty('debugMode', true);
|
|
13717
|
-
* await systemConfig.updateProperty('machineId', 'MACHINE-001');
|
|
13718
|
-
* ```
|
|
13719
13677
|
*/
|
|
13720
13678
|
async updateProperty(key, value) {
|
|
13721
13679
|
this.props[key] = value;
|
|
@@ -14700,18 +14658,8 @@ let KosConfigPropertyImpl = class {
|
|
|
14700
14658
|
return "";
|
|
14701
14659
|
}
|
|
14702
14660
|
/**
|
|
14703
|
-
*
|
|
14704
|
-
*
|
|
14705
|
-
* @returns Array of options with label/value pairs for dropdowns and selection controls
|
|
14706
|
-
*
|
|
14707
|
-
* @example Get Property Options
|
|
14708
|
-
* ```typescript
|
|
14709
|
-
* const options = statusProperty.options;
|
|
14710
|
-
* // Returns: [
|
|
14711
|
-
* // { label: "Active", value: "active" },
|
|
14712
|
-
* // { label: "Inactive", value: "inactive" }
|
|
14713
|
-
* // ]
|
|
14714
|
-
* ```
|
|
14661
|
+
* Options for an enumerated property: the `optionsExpander` when set, otherwise
|
|
14662
|
+
* the schema's enum values or the values derived from its schema.
|
|
14715
14663
|
*/
|
|
14716
14664
|
get options() {
|
|
14717
14665
|
const defaultUnitSystem = this.regionInfo.defaultUnitSystem;
|
|
@@ -14753,27 +14701,17 @@ let KosConfigPropertyImpl = class {
|
|
|
14753
14701
|
return { backend, display };
|
|
14754
14702
|
}
|
|
14755
14703
|
/**
|
|
14756
|
-
*
|
|
14704
|
+
* Writes the value, given in display units, through {@link updateProperty}.
|
|
14757
14705
|
*
|
|
14758
|
-
* @param value - The new value
|
|
14759
|
-
*
|
|
14760
|
-
* @example Update Property Value
|
|
14761
|
-
* ```typescript
|
|
14762
|
-
* pumpRateProperty.value = 1.2; // Sets rate to 1.2 mL/s (converted to backend units)
|
|
14763
|
-
* ```
|
|
14706
|
+
* @param value - The new value in display units
|
|
14764
14707
|
*/
|
|
14765
14708
|
set value(value) {
|
|
14766
14709
|
this.updateProperty(value);
|
|
14767
14710
|
}
|
|
14768
14711
|
/**
|
|
14769
|
-
*
|
|
14770
|
-
*
|
|
14771
|
-
* @returns Property value in regional display units
|
|
14712
|
+
* The value converted to display units.
|
|
14772
14713
|
*
|
|
14773
|
-
* @
|
|
14774
|
-
* ```typescript
|
|
14775
|
-
* const currentRate = pumpRateProperty.value; // Gets rate in mL/s (regional units)
|
|
14776
|
-
* ```
|
|
14714
|
+
* @returns Property value in display units
|
|
14777
14715
|
*/
|
|
14778
14716
|
get value() {
|
|
14779
14717
|
return this.getValue(true);
|
|
@@ -14818,16 +14756,9 @@ let KosConfigPropertyImpl = class {
|
|
|
14818
14756
|
return _val;
|
|
14819
14757
|
}
|
|
14820
14758
|
/**
|
|
14821
|
-
*
|
|
14759
|
+
* The value before the last update, in display units.
|
|
14822
14760
|
*
|
|
14823
|
-
* @returns Previous property value in
|
|
14824
|
-
*
|
|
14825
|
-
* @example Track Value Changes
|
|
14826
|
-
* ```typescript
|
|
14827
|
-
* const oldValue = pumpRateProperty.previousValue; // Previous rate value
|
|
14828
|
-
* const newValue = pumpRateProperty.value; // Current rate value
|
|
14829
|
-
* console.log(`Rate changed from ${oldValue} to ${newValue}`);
|
|
14830
|
-
* ```
|
|
14761
|
+
* @returns Previous property value in display units
|
|
14831
14762
|
*/
|
|
14832
14763
|
get previousValue() {
|
|
14833
14764
|
return this.getValue(false);
|
|
@@ -14852,15 +14783,9 @@ let KosConfigPropertyImpl = class {
|
|
|
14852
14783
|
log$i.debug(`activating config bean ${this.id}`);
|
|
14853
14784
|
}
|
|
14854
14785
|
/**
|
|
14855
|
-
*
|
|
14856
|
-
*
|
|
14857
|
-
* @returns Localized string representation with appropriate units (e.g., "1.2 mL/s", "150 °F")
|
|
14786
|
+
* The value formatted with its unit for the active locale, such as `"72.5 °F"`.
|
|
14858
14787
|
*
|
|
14859
|
-
* @
|
|
14860
|
-
* ```typescript
|
|
14861
|
-
* const display = temperatureProperty.displayValue; // "72.5 °F"
|
|
14862
|
-
* const rate = pumpRateProperty.displayValue; // "1.2 mL/s"
|
|
14863
|
-
* ```
|
|
14788
|
+
* @returns Localized string representation with units
|
|
14864
14789
|
*/
|
|
14865
14790
|
get displayValue() {
|
|
14866
14791
|
const _val = this.value;
|
|
@@ -14888,15 +14813,9 @@ let KosConfigPropertyImpl = class {
|
|
|
14888
14813
|
return String(_val);
|
|
14889
14814
|
}
|
|
14890
14815
|
/**
|
|
14891
|
-
*
|
|
14816
|
+
* Display unit of the value, such as `"°F"` or `"mL"`.
|
|
14892
14817
|
*
|
|
14893
|
-
* @returns Unit string
|
|
14894
|
-
*
|
|
14895
|
-
* @example Get Property Unit
|
|
14896
|
-
* ```typescript
|
|
14897
|
-
* const unit = temperatureProperty.unit; // "°F" or "°C" based on regional settings
|
|
14898
|
-
* const rateUnit = pumpRateProperty.unit; // "mL/s"
|
|
14899
|
-
* ```
|
|
14818
|
+
* @returns Unit string, or an empty string for unitless properties
|
|
14900
14819
|
*/
|
|
14901
14820
|
get unit() {
|
|
14902
14821
|
const converter = this.getConverter();
|
|
@@ -15041,18 +14960,10 @@ let KosConfigPropertyImpl = class {
|
|
|
15041
14960
|
return void 0;
|
|
15042
14961
|
}
|
|
15043
14962
|
/**
|
|
15044
|
-
*
|
|
14963
|
+
* Converts the value from display units to backend units and writes it to the
|
|
14964
|
+
* bean.
|
|
15045
14965
|
*
|
|
15046
|
-
* @param value - The new value
|
|
15047
|
-
*
|
|
15048
|
-
* @example Update Property
|
|
15049
|
-
* ```typescript
|
|
15050
|
-
* // Set temperature in Fahrenheit (regional unit)
|
|
15051
|
-
* await temperatureProperty.updateProperty(75.5);
|
|
15052
|
-
*
|
|
15053
|
-
* // Set pump rate in mL/s (regional unit)
|
|
15054
|
-
* await pumpRateProperty.updateProperty(1.2);
|
|
15055
|
-
* ```
|
|
14966
|
+
* @param value - The new value in display units
|
|
15056
14967
|
*/
|
|
15057
14968
|
async updateProperty(value) {
|
|
15058
14969
|
log$i.debug(`updating property ${this.attribute} with value ${value}`);
|
|
@@ -15443,7 +15354,7 @@ let StateBeanModelImpl = class {
|
|
|
15443
15354
|
this.logger.debug(`initializing state-bean ${this.id}`);
|
|
15444
15355
|
}
|
|
15445
15356
|
/**
|
|
15446
|
-
*
|
|
15357
|
+
* Sets several properties at once.
|
|
15447
15358
|
* @param props Properties to update
|
|
15448
15359
|
* @private
|
|
15449
15360
|
*/
|
|
@@ -15641,7 +15552,7 @@ let BrowserRouterModelImpl = class {
|
|
|
15641
15552
|
}
|
|
15642
15553
|
/**
|
|
15643
15554
|
* Registers a route with optional middleware chain.
|
|
15644
|
-
* @param method HTTP method (GET, POST, PUT, DELETE
|
|
15555
|
+
* @param method HTTP method (GET, POST, PUT, DELETE)
|
|
15645
15556
|
* @param path Route path pattern with parameter support
|
|
15646
15557
|
* @param middlewares Middleware functions and final handler
|
|
15647
15558
|
*/
|
|
@@ -15779,34 +15690,14 @@ let FutureModel$1 = class FutureModel {
|
|
|
15779
15690
|
}
|
|
15780
15691
|
}
|
|
15781
15692
|
/**
|
|
15782
|
-
*
|
|
15783
|
-
*
|
|
15784
|
-
* @returns Status string: "NOT_ACTIVE", "IN_PROGRESS", "Success", or "Fail"
|
|
15785
|
-
*
|
|
15786
|
-
* @example Monitor Status
|
|
15787
|
-
* ```typescript
|
|
15788
|
-
* if (future.status === "IN_PROGRESS") {
|
|
15789
|
-
* console.log(`Operation running: ${future.progress}% complete`);
|
|
15790
|
-
* } else if (future.status === "Success") {
|
|
15791
|
-
* console.log("Operation completed successfully!");
|
|
15792
|
-
* }
|
|
15793
|
-
* ```
|
|
15693
|
+
* Status of the operation: the `endState` once it has ended, otherwise
|
|
15694
|
+
* `IN_PROGRESS` while progress is reported, or `NOT_ACTIVE`.
|
|
15794
15695
|
*/
|
|
15795
15696
|
get status() {
|
|
15796
15697
|
return this.endState ? this.endState : this.progress > -1 ? "IN_PROGRESS" : "NOT_ACTIVE";
|
|
15797
15698
|
}
|
|
15798
15699
|
/**
|
|
15799
|
-
*
|
|
15800
|
-
*
|
|
15801
|
-
* @returns Formatted time string (e.g., "5 minutes", "30 seconds") or empty string if unknown
|
|
15802
|
-
*
|
|
15803
|
-
* @example Display Time Remaining
|
|
15804
|
-
* ```typescript
|
|
15805
|
-
* const timeLeft = future.timeRemaining;
|
|
15806
|
-
* if (timeLeft) {
|
|
15807
|
-
* console.log(`${timeLeft} remaining`);
|
|
15808
|
-
* }
|
|
15809
|
-
* ```
|
|
15700
|
+
* Remaining time as text, such as `"5 minutes"`, or an empty string when unknown.
|
|
15810
15701
|
*/
|
|
15811
15702
|
get timeRemaining() {
|
|
15812
15703
|
const remaining = this.remainingTimeMs || -1;
|
|
@@ -16104,23 +15995,11 @@ let KeyValueModelImpl = class {
|
|
|
16104
15995
|
this.logger.debug(`initializing studio-state ${this.id}`);
|
|
16105
15996
|
}
|
|
16106
15997
|
/**
|
|
16107
|
-
*
|
|
16108
|
-
*
|
|
16109
|
-
* Changes are automatically persisted and synchronized across all instances
|
|
16110
|
-
* with the same namespace via KOS topics.
|
|
15998
|
+
* Stores a value under `key`, or deletes the key when `value` is undefined.
|
|
16111
15999
|
*
|
|
16112
16000
|
* @param key - The key to update or delete
|
|
16113
|
-
* @param value - The value to set
|
|
16001
|
+
* @param value - The value to set, or undefined to delete the key
|
|
16114
16002
|
* @returns Promise that resolves when the operation completes
|
|
16115
|
-
*
|
|
16116
|
-
* @example
|
|
16117
|
-
* ```typescript
|
|
16118
|
-
* // Set a value
|
|
16119
|
-
* await keyValue.updateState('theme', 'dark');
|
|
16120
|
-
*
|
|
16121
|
-
* // Delete a key
|
|
16122
|
-
* await keyValue.updateState('theme', undefined);
|
|
16123
|
-
* ```
|
|
16124
16003
|
*/
|
|
16125
16004
|
async updateState(key, value) {
|
|
16126
16005
|
this.logger.debug(`updating studio-state ${key} with value ${value}`);
|
|
@@ -17798,9 +17677,7 @@ class ReactiveExpression {
|
|
|
17798
17677
|
this.getContextData = getContextData;
|
|
17799
17678
|
this._lastResult = { value: void 0, error: void 0 };
|
|
17800
17679
|
}
|
|
17801
|
-
/**
|
|
17802
|
-
* Pure getter that returns the cached result without side effects.
|
|
17803
|
-
*/
|
|
17680
|
+
/** The cached result, returned without evaluating. */
|
|
17804
17681
|
get result() {
|
|
17805
17682
|
return this._lastResult;
|
|
17806
17683
|
}
|
|
@@ -17811,8 +17688,7 @@ class ReactiveExpression {
|
|
|
17811
17688
|
this._lastResult = result;
|
|
17812
17689
|
}
|
|
17813
17690
|
/**
|
|
17814
|
-
* Evaluate the expression
|
|
17815
|
-
* This method allows the parent model to trigger evaluation without side effects in getters.
|
|
17691
|
+
* Evaluate the expression against the given context data. The cached result is unchanged.
|
|
17816
17692
|
*/
|
|
17817
17693
|
evaluate(contextData) {
|
|
17818
17694
|
try {
|
|
@@ -17871,15 +17747,9 @@ let KosExpressionEvaluatorModelImpl = class {
|
|
|
17871
17747
|
return this._contextRevision;
|
|
17872
17748
|
}
|
|
17873
17749
|
/**
|
|
17874
|
-
* Replace the
|
|
17875
|
-
* automatically re-evaluate against the new context.
|
|
17750
|
+
* Replace the context data. Every expression re-evaluates against it.
|
|
17876
17751
|
*
|
|
17877
17752
|
* @param newData - Complete new context data to replace existing data
|
|
17878
|
-
*
|
|
17879
|
-
* @example
|
|
17880
|
-
* ```typescript
|
|
17881
|
-
* evaluator.setContextData({ temperature: 75, humidity: 40 });
|
|
17882
|
-
* ```
|
|
17883
17753
|
*/
|
|
17884
17754
|
setContextData(newData) {
|
|
17885
17755
|
this._data.setValues(newData);
|
|
@@ -17892,31 +17762,20 @@ let KosExpressionEvaluatorModelImpl = class {
|
|
|
17892
17762
|
});
|
|
17893
17763
|
}
|
|
17894
17764
|
/**
|
|
17895
|
-
*
|
|
17896
|
-
* value will automatically re-evaluate.
|
|
17765
|
+
* Set one top-level context value.
|
|
17897
17766
|
*
|
|
17898
17767
|
* @param key - The context data key to update
|
|
17899
17768
|
* @param value - The new value to set
|
|
17900
|
-
*
|
|
17901
|
-
* @example
|
|
17902
|
-
* ```typescript
|
|
17903
|
-
* evaluator.updateContextValue('temperature', 85);
|
|
17904
|
-
* ```
|
|
17905
17769
|
*/
|
|
17906
17770
|
updateContextValue(key, value) {
|
|
17907
17771
|
this._data[key] = value;
|
|
17908
17772
|
}
|
|
17909
17773
|
/**
|
|
17910
|
-
*
|
|
17911
|
-
*
|
|
17774
|
+
* Set a nested context value by dot-separated path, such as
|
|
17775
|
+
* `sensors.humidity`, creating intermediate objects as needed.
|
|
17912
17776
|
*
|
|
17913
|
-
* @param path - Dot-separated path to the nested property
|
|
17777
|
+
* @param path - Dot-separated path to the nested property
|
|
17914
17778
|
* @param value - The new value to set at the nested path
|
|
17915
|
-
*
|
|
17916
|
-
* @example
|
|
17917
|
-
* ```typescript
|
|
17918
|
-
* evaluator.updateNestedValue('sensors.humidity', 60);
|
|
17919
|
-
* ```
|
|
17920
17779
|
*/
|
|
17921
17780
|
updateNestedValue(path, value) {
|
|
17922
17781
|
const pathSegments = path.split(".");
|
|
@@ -17936,35 +17795,21 @@ let KosExpressionEvaluatorModelImpl = class {
|
|
|
17936
17795
|
this.logger.debug(`Updated nested context value "${path}" to:`, value);
|
|
17937
17796
|
}
|
|
17938
17797
|
/**
|
|
17939
|
-
* Add a KOS model to the
|
|
17940
|
-
*
|
|
17941
|
-
* re-evaluate when the model's data changes.
|
|
17798
|
+
* Add a KOS model to the context under `key`. Expressions read its properties
|
|
17799
|
+
* with dotted notation (`sensor.temperature`) and re-evaluate when they change.
|
|
17942
17800
|
*
|
|
17943
17801
|
* @param key - The context key to store the model under
|
|
17944
|
-
* @param model -
|
|
17945
|
-
*
|
|
17946
|
-
* @example
|
|
17947
|
-
* ```typescript
|
|
17948
|
-
* const sensorModel = SensorModel.instance('main-sensor').build();
|
|
17949
|
-
* evaluator.addModelToContext('sensor', sensorModel);
|
|
17950
|
-
* evaluator.addExpression('isCritical', 'sensor.temperature > 80');
|
|
17951
|
-
* ```
|
|
17802
|
+
* @param model - KOS model instance
|
|
17952
17803
|
*/
|
|
17953
17804
|
addModelToContext(key, model) {
|
|
17954
17805
|
this._data[key] = model;
|
|
17955
17806
|
}
|
|
17956
17807
|
/**
|
|
17957
|
-
* Add a named expression
|
|
17958
|
-
* The expression will re-evaluate whenever its dependencies in the context change.
|
|
17808
|
+
* Add a named expression and evaluate it once.
|
|
17959
17809
|
*
|
|
17960
|
-
* @param name - Unique identifier for this expression
|
|
17961
|
-
* @param expressionString -
|
|
17810
|
+
* @param name - Unique identifier for this expression
|
|
17811
|
+
* @param expressionString - Expression in `expr-eval` syntax
|
|
17962
17812
|
* @throws {Error} If the expression has invalid syntax
|
|
17963
|
-
*
|
|
17964
|
-
* @example
|
|
17965
|
-
* ```typescript
|
|
17966
|
-
* evaluator.addExpression('isHot', 'temperature > 80');
|
|
17967
|
-
* ```
|
|
17968
17813
|
*/
|
|
17969
17814
|
addExpression(name, expressionString) {
|
|
17970
17815
|
try {
|
|
@@ -18021,17 +17866,11 @@ let KosExpressionEvaluatorModelImpl = class {
|
|
|
18021
17866
|
return expression.result;
|
|
18022
17867
|
}
|
|
18023
17868
|
/**
|
|
18024
|
-
*
|
|
18025
|
-
*
|
|
18026
|
-
* creating reactive chains through the expression evaluation.
|
|
17869
|
+
* The last cached result of an expression, read without re-evaluating. Use it
|
|
17870
|
+
* in effects that should not depend on the expression's inputs.
|
|
18027
17871
|
*
|
|
18028
17872
|
* @param name - The expression name to get the cached result for
|
|
18029
17873
|
* @returns The last cached result, or undefined if expression doesn't exist
|
|
18030
|
-
*
|
|
18031
|
-
* @example
|
|
18032
|
-
* ```typescript
|
|
18033
|
-
* const cached = evaluator.getCachedExpressionValue('myExpression');
|
|
18034
|
-
* ```
|
|
18035
17874
|
*/
|
|
18036
17875
|
getCachedExpressionValue(name) {
|
|
18037
17876
|
const expression = this._expressions.get(name);
|
|
@@ -18046,15 +17885,12 @@ let KosExpressionEvaluatorModelImpl = class {
|
|
|
18046
17885
|
get expressionNames() {
|
|
18047
17886
|
return Array.from(this._expressions.keys());
|
|
18048
17887
|
}
|
|
18049
|
-
//
|
|
17888
|
+
// Evaluates on access so readers track the context data each expression uses
|
|
18050
17889
|
get results() {
|
|
18051
17890
|
this.evaluateAllExpressions();
|
|
18052
17891
|
return this._results;
|
|
18053
17892
|
}
|
|
18054
|
-
/**
|
|
18055
|
-
* Force re-evaluation of all expressions and update cached results.
|
|
18056
|
-
* This is called by the effect when context data changes.
|
|
18057
|
-
*/
|
|
17893
|
+
/** Re-evaluate every expression and update the cached results. */
|
|
18058
17894
|
evaluateAllExpressions() {
|
|
18059
17895
|
const keys = Array.from(this._expressions.keys());
|
|
18060
17896
|
keys.forEach((key) => {
|
|
@@ -18088,11 +17924,7 @@ let KosExpressionEvaluatorModelImpl = class {
|
|
|
18088
17924
|
this.updateResult(name, newResult);
|
|
18089
17925
|
}
|
|
18090
17926
|
}
|
|
18091
|
-
/**
|
|
18092
|
-
* Internal method to update the results object when expression values change.
|
|
18093
|
-
* This is called by ReactiveExpression when its value changes.
|
|
18094
|
-
* ObservableData handles dynamic properties automatically with MobX atoms.
|
|
18095
|
-
*/
|
|
17927
|
+
/** Store a changed result in the reactive results object. */
|
|
18096
17928
|
updateResult(name, result) {
|
|
18097
17929
|
this.logger.debug(
|
|
18098
17930
|
`ExpressionEvaluator.updateResult called for "${name}":`,
|
|
@@ -18103,17 +17935,11 @@ let KosExpressionEvaluatorModelImpl = class {
|
|
|
18103
17935
|
});
|
|
18104
17936
|
}
|
|
18105
17937
|
/**
|
|
18106
|
-
*
|
|
18107
|
-
*
|
|
17938
|
+
* Add an expression under a generated id and return the id, for use with
|
|
17939
|
+
* `getExpressionValue(id)` or `results[id]`.
|
|
18108
17940
|
*
|
|
18109
|
-
* @param expressionString -
|
|
18110
|
-
* @returns Generated
|
|
18111
|
-
*
|
|
18112
|
-
* @example
|
|
18113
|
-
* ```typescript
|
|
18114
|
-
* const tempCheckId = evaluator.createExpression('temperature > 75');
|
|
18115
|
-
* const result = evaluator.getExpressionValue(tempCheckId);
|
|
18116
|
-
* ```
|
|
17941
|
+
* @param expressionString - Expression in `expr-eval` syntax
|
|
17942
|
+
* @returns Generated expression id
|
|
18117
17943
|
*/
|
|
18118
17944
|
createExpression(expressionString) {
|
|
18119
17945
|
const anonymousId = uuid();
|
|
@@ -22403,118 +22229,35 @@ let DeviceModelImpl = class {
|
|
|
22403
22229
|
id;
|
|
22404
22230
|
logger;
|
|
22405
22231
|
_serialNumber;
|
|
22406
|
-
/**
|
|
22407
|
-
* Hardware-based device serial number for unique identification.
|
|
22408
|
-
*
|
|
22409
|
-
* Returns the device's hardware serial number or "unassigned" if not yet loaded.
|
|
22410
|
-
* Serial numbers are typically retrieved from the device's hardware identification
|
|
22411
|
-
* system during critical data events.
|
|
22412
|
-
*
|
|
22413
|
-
* @example
|
|
22414
|
-
* ```typescript
|
|
22415
|
-
* const device = Device.factory({});
|
|
22416
|
-
*
|
|
22417
|
-
* // Check if serial number is available
|
|
22418
|
-
* if (device.serialNumber !== "unassigned") {
|
|
22419
|
-
* console.log(`Device Serial: ${device.serialNumber}`);
|
|
22420
|
-
* }
|
|
22421
|
-
* ```
|
|
22422
|
-
*/
|
|
22232
|
+
/** Hardware serial number, or `"unassigned"` until it has been loaded. */
|
|
22423
22233
|
get serialNumber() {
|
|
22424
22234
|
return this._serialNumber;
|
|
22425
22235
|
}
|
|
22426
22236
|
_name;
|
|
22427
|
-
/**
|
|
22428
|
-
* Human-readable device name for administrative identification.
|
|
22429
|
-
*
|
|
22430
|
-
* Returns the configured device name or "unassigned" if not yet set.
|
|
22431
|
-
* Device names are typically configured during device setup and used
|
|
22432
|
-
* in administrative interfaces for device identification and management.
|
|
22433
|
-
*
|
|
22434
|
-
* @example
|
|
22435
|
-
* ```typescript
|
|
22436
|
-
* const device = Device.factory({
|
|
22437
|
-
* name: 'Main Production Dispenser'
|
|
22438
|
-
* });
|
|
22439
|
-
*
|
|
22440
|
-
* console.log(`Device Name: ${device.name}`);
|
|
22441
|
-
* // Output: "Device Name: Main Production Dispenser"
|
|
22442
|
-
* ```
|
|
22443
|
-
*/
|
|
22237
|
+
/** Human-readable device name, or `"unassigned"` until it has been loaded. */
|
|
22444
22238
|
get name() {
|
|
22445
22239
|
return this._name;
|
|
22446
22240
|
}
|
|
22447
22241
|
_nodeId;
|
|
22448
22242
|
/**
|
|
22449
|
-
*
|
|
22450
|
-
*
|
|
22451
|
-
* Returns the complete node ID or "unassigned" if not yet configured.
|
|
22452
|
-
* Node IDs follow the pattern "type-instance" (e.g., "primary-main", "secondary-backup")
|
|
22453
|
-
* and identify the specific node role and instance within multi-node deployments.
|
|
22454
|
-
*
|
|
22455
|
-
* @example
|
|
22456
|
-
* ```typescript
|
|
22457
|
-
* const device = Device.factory({
|
|
22458
|
-
* nodeId: 'primary-controller'
|
|
22459
|
-
* });
|
|
22460
|
-
*
|
|
22461
|
-
* console.log(`Node ID: ${device.nodeId}`);
|
|
22462
|
-
* // Output: "Node ID: primary-controller"
|
|
22463
|
-
* ```
|
|
22243
|
+
* Node identifier within the deployment, in `type-name` form (for example
|
|
22244
|
+
* `primary-main`), or `"unassigned"` until it has been loaded.
|
|
22464
22245
|
*
|
|
22465
|
-
* @see {@link nodeType} for
|
|
22466
|
-
* @see {@link nodeName} for
|
|
22246
|
+
* @see {@link nodeType} for the type portion
|
|
22247
|
+
* @see {@link nodeName} for the name portion
|
|
22467
22248
|
*/
|
|
22468
22249
|
get nodeId() {
|
|
22469
22250
|
return this._nodeId;
|
|
22470
22251
|
}
|
|
22471
22252
|
/**
|
|
22472
|
-
*
|
|
22473
|
-
*
|
|
22474
|
-
* Returns the first part of the node ID (before the hyphen).
|
|
22475
|
-
* For node ID "primary-controller", this returns "primary".
|
|
22476
|
-
* Used for role-based logic and node coordination.
|
|
22477
|
-
*
|
|
22478
|
-
* @example
|
|
22479
|
-
* ```typescript
|
|
22480
|
-
* const device = Device.factory({
|
|
22481
|
-
* nodeId: 'primary-controller'
|
|
22482
|
-
* });
|
|
22483
|
-
*
|
|
22484
|
-
* console.log(`Node Type: ${device.nodeType}`);
|
|
22485
|
-
* // Output: "Node Type: primary"
|
|
22486
|
-
*
|
|
22487
|
-
* // Role-based coordination
|
|
22488
|
-
* if (device.nodeType === 'primary') {
|
|
22489
|
-
* // Handle primary node responsibilities
|
|
22490
|
-
* }
|
|
22491
|
-
* ```
|
|
22253
|
+
* The part of {@link nodeId} before the hyphen (`"primary"` for `primary-main`).
|
|
22492
22254
|
*/
|
|
22493
22255
|
get nodeType() {
|
|
22494
22256
|
const [nodeType] = this.nodeId.split("-");
|
|
22495
22257
|
return nodeType;
|
|
22496
22258
|
}
|
|
22497
22259
|
/**
|
|
22498
|
-
*
|
|
22499
|
-
*
|
|
22500
|
-
* Returns the second part of the node ID (after the hyphen).
|
|
22501
|
-
* For node ID "primary-controller", this returns "controller".
|
|
22502
|
-
* Used for instance-specific identification within node types.
|
|
22503
|
-
*
|
|
22504
|
-
* @example
|
|
22505
|
-
* ```typescript
|
|
22506
|
-
* const device = Device.factory({
|
|
22507
|
-
* nodeId: 'secondary-backup'
|
|
22508
|
-
* });
|
|
22509
|
-
*
|
|
22510
|
-
* console.log(`Node Name: ${device.nodeName}`);
|
|
22511
|
-
* // Output: "Node Name: backup"
|
|
22512
|
-
*
|
|
22513
|
-
* // Instance-specific logic
|
|
22514
|
-
* if (device.nodeName === 'backup') {
|
|
22515
|
-
* // Handle backup node configuration
|
|
22516
|
-
* }
|
|
22517
|
-
* ```
|
|
22260
|
+
* The part of {@link nodeId} after the hyphen (`"main"` for `primary-main`).
|
|
22518
22261
|
*/
|
|
22519
22262
|
get nodeName() {
|
|
22520
22263
|
const [, nodeName] = this.nodeId.split("-");
|
|
@@ -22528,38 +22271,10 @@ let DeviceModelImpl = class {
|
|
|
22528
22271
|
this._nodeId = "unassigned";
|
|
22529
22272
|
}
|
|
22530
22273
|
/**
|
|
22531
|
-
*
|
|
22532
|
-
*
|
|
22533
|
-
* Allows dynamic updating of device identity and node configuration.
|
|
22534
|
-
* Any undefined values will be set to "unassigned". This method is typically
|
|
22535
|
-
* called internally during device data loading or external configuration changes.
|
|
22536
|
-
*
|
|
22537
|
-
* @param options - Device configuration options to apply
|
|
22274
|
+
* Replace the device identity. Fields left undefined become `"unassigned"`, so
|
|
22275
|
+
* pass every field you want to keep.
|
|
22538
22276
|
*
|
|
22539
|
-
* @
|
|
22540
|
-
* ```typescript
|
|
22541
|
-
* const device = Device.factory({});
|
|
22542
|
-
*
|
|
22543
|
-
* // Update with new device information
|
|
22544
|
-
* device.updateModel({
|
|
22545
|
-
* serialNumber: 'KOS-DEVICE-12345',
|
|
22546
|
-
* name: 'Updated Dispenser Name',
|
|
22547
|
-
* nodeId: 'primary-main'
|
|
22548
|
-
* });
|
|
22549
|
-
*
|
|
22550
|
-
* console.log(device.serialNumber); // "KOS-DEVICE-12345"
|
|
22551
|
-
* console.log(device.name); // "Updated Dispenser Name"
|
|
22552
|
-
* console.log(device.nodeId); // "primary-main"
|
|
22553
|
-
* ```
|
|
22554
|
-
*
|
|
22555
|
-
* @example Partial Updates
|
|
22556
|
-
* ```typescript
|
|
22557
|
-
* // Only update specific fields
|
|
22558
|
-
* device.updateModel({
|
|
22559
|
-
* name: 'New Device Name'
|
|
22560
|
-
* // serialNumber and nodeId remain unchanged
|
|
22561
|
-
* });
|
|
22562
|
-
* ```
|
|
22277
|
+
* @param options - Device identity to apply
|
|
22563
22278
|
*/
|
|
22564
22279
|
updateModel(options) {
|
|
22565
22280
|
this._serialNumber = options.serialNumber ?? "unassigned";
|
|
@@ -23539,9 +23254,11 @@ let TranslationModelImpl = class {
|
|
|
23539
23254
|
return !!this.data[key];
|
|
23540
23255
|
}
|
|
23541
23256
|
/**
|
|
23542
|
-
* Resolves a translation key
|
|
23257
|
+
* Resolves a translation key, substituting `{{name}}` placeholders from
|
|
23258
|
+
* `options` (or from `options.data` when it is an object). With
|
|
23259
|
+
* `options.context`, the variant key `<key>_<context>` is tried first.
|
|
23543
23260
|
* @param _key Translation key, optionally with namespace prefix
|
|
23544
|
-
* @param options
|
|
23261
|
+
* @param options Interpolation values, or a default value string
|
|
23545
23262
|
* @returns Resolved translation string or array
|
|
23546
23263
|
*/
|
|
23547
23264
|
resolveKey(_key, options) {
|
|
@@ -23687,7 +23404,7 @@ let TranslationContainerModelImpl = class {
|
|
|
23687
23404
|
});
|
|
23688
23405
|
}
|
|
23689
23406
|
get defaultNamespace() {
|
|
23690
|
-
return this._defaultNamespace ? this.getModel(
|
|
23407
|
+
return this._defaultNamespace ? this.getModel(this._defaultNamespace) : void 0;
|
|
23691
23408
|
}
|
|
23692
23409
|
getModel(id) {
|
|
23693
23410
|
this.logger.debug("getting model " + id);
|
|
@@ -24647,4 +24364,4 @@ exports.waitForAppToStart = waitForAppToStart;
|
|
|
24647
24364
|
exports.waitForAppsToStart = waitForAppsToStart;
|
|
24648
24365
|
exports.whenReady = whenReady;
|
|
24649
24366
|
exports.wrapWithFutureLifecycle = wrapWithFutureLifecycle;
|
|
24650
|
-
//# sourceMappingURL=software-info-registration-
|
|
24367
|
+
//# sourceMappingURL=software-info-registration-CY_E6Rw7.cjs.map
|