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