@kosdev-code/kos-ui-sdk 2.0.41 → 2.1.1
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/core/core/decorators/index.d.ts +4 -0
- package/core/core/decorators/index.d.ts.map +1 -1
- package/core/core/decorators/kos-companion.d.ts +125 -8
- package/core/core/decorators/kos-companion.d.ts.map +1 -1
- package/core/core/decorators/kos-container-aware.d.ts +465 -0
- package/core/core/decorators/kos-container-aware.d.ts.map +1 -0
- package/core/core/decorators/kos-future-aware.d.ts +150 -0
- package/core/core/decorators/kos-future-aware.d.ts.map +1 -0
- package/core/core/decorators/kos-logger-aware.d.ts +96 -0
- package/core/core/decorators/kos-logger-aware.d.ts.map +1 -0
- package/core/core/decorators/kos-trouble-aware.d.ts +71 -0
- package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -0
- package/core/core/decorators/kosModel.d.ts +8 -2
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/decorators/propKeys.d.ts +4 -0
- package/core/core/decorators/propKeys.d.ts.map +1 -1
- package/core/core/extension/extension-manager.d.ts +1 -1
- package/core/core/extension/extension-manager.d.ts.map +1 -1
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/registration/index.d.ts +1 -0
- package/core/core/registration/index.d.ts.map +1 -1
- package/core/index.d.ts +1 -1
- package/core/index.d.ts.map +1 -1
- package/core/util/container-utils.d.ts +3 -2
- package/core/util/container-utils.d.ts.map +1 -1
- package/core/util/observable-proxy-map.d.ts.map +1 -1
- package/index.cjs +79 -76
- package/index.cjs.map +1 -1
- package/index.d.cts +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +9672 -7760
- package/index.js.map +1 -1
- package/models/models/browser-router/browser-router-model.d.ts +80 -1
- package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
- package/models/models/browser-router/types/index.d.ts +25 -1
- package/models/models/config-bean/config-bean-model-builder.d.ts +4 -2
- package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model.d.ts +117 -13
- package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-types.d.ts +6 -3
- package/models/models/config-bean/config-bean-types.d.ts.map +1 -1
- package/models/models/config-bean/types/index.d.ts +33 -0
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts +112 -1
- 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 +293 -17
- package/models/models/device/device-model.d.ts +219 -9
- package/models/models/device/device-model.d.ts.map +1 -1
- package/models/models/device/device-registration.d.ts +61 -48
- package/models/models/device/device-registration.d.ts.map +1 -1
- package/models/models/device/types/index.d.ts +41 -0
- package/models/models/future/future-aware.d.ts +82 -0
- package/models/models/future/future-aware.d.ts.map +1 -1
- package/models/models/future/future-model.d.ts +34 -5
- package/models/models/future/future-model.d.ts.map +1 -1
- package/models/models/future/future-types.d.ts +186 -7
- package/models/models/future/future-types.d.ts.map +1 -1
- package/models/models/future-container/future-container-model.d.ts +2 -2
- package/models/models/index.d.ts +1 -0
- package/models/models/index.d.ts.map +1 -1
- package/models/models/key-value/index.d.ts +4 -0
- package/models/models/key-value/index.d.ts.map +1 -1
- package/models/models/key-value/key-value-model.d.ts +111 -0
- package/models/models/key-value/key-value-model.d.ts.map +1 -1
- package/models/models/key-value/services/key-value-services.d.ts +124 -2
- package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
- package/models/models/key-value/types/index.d.ts +56 -0
- package/models/models/kos-expression-evaluator/index.d.ts +4 -0
- package/models/models/kos-expression-evaluator/index.d.ts.map +1 -0
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +209 -0
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -0
- package/models/models/kos-expression-evaluator/services/index.d.ts +6 -0
- package/models/models/kos-expression-evaluator/services/index.d.ts.map +1 -0
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +15 -0
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -0
- package/models/models/kos-expression-evaluator/types/index.d.ts +1 -0
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts +61 -14
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
- package/models/models/kos-log-manager/types/index.d.ts +187 -0
- package/models/models/kos-time/kos-time-model.d.ts +64 -0
- package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
- package/models/models/kos-time/types/index.d.ts +80 -0
- package/models/models/log-block/log-block-container-model.d.ts +132 -0
- package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
- package/models/models/log-block/log-block-model.d.ts +185 -0
- package/models/models/log-block/log-block-model.d.ts.map +1 -1
- package/models/models/log-block/types/index.d.ts +129 -0
- package/models/models/log-stream/index.d.ts +6 -2
- package/models/models/log-stream/index.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-container-model.d.ts +62 -0
- package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-model.d.ts +55 -0
- package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
- package/models/models/log-stream/services/log-stream-services.d.ts +2 -1
- package/models/models/log-stream/services/log-stream-services.d.ts.map +1 -1
- package/models/models/log-stream/types/index.d.ts +77 -0
- package/models/models/network-interface/index.d.ts +6 -2
- package/models/models/network-interface/index.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-container-model.d.ts +62 -0
- 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 +2 -1
- package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-model.d.ts +77 -0
- package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-registration.d.ts +2 -1
- package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
- package/models/models/network-interface/services/network-interface-services.d.ts +54 -0
- package/models/models/network-interface/services/network-interface-services.d.ts.map +1 -1
- package/models/models/network-interface/types/index.d.ts +21 -0
- package/models/models/ota/ota-model.d.ts +82 -3
- package/models/models/ota/ota-model.d.ts.map +1 -1
- package/models/models/ota/types/index.d.ts +146 -0
- package/models/models/region-info/region-info-model.d.ts +7 -3
- package/models/models/region-info/region-info-model.d.ts.map +1 -1
- package/models/models/region-info/services/region-info-services.d.ts.map +1 -1
- package/models/models/region-info/types/index.d.ts +141 -13
- package/models/models/region-info/types/index.d.ts.map +1 -1
- package/models/models/software-info/software-info-model.d.ts +74 -2
- package/models/models/software-info/software-info-model.d.ts.map +1 -1
- package/models/models/software-info/types/index.d.ts +48 -16
- package/models/models/state-bean/state-bean-model.d.ts +86 -9
- package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
- package/models/models/state-bean/types/index.d.ts +114 -6
- package/models/models/state-prop/state-prop-model.d.ts +78 -1
- package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
- package/models/models/state-prop/types/index.d.ts +55 -7
- package/models/models/storage-device/storage-device-container-model.d.ts +289 -2
- package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-model.d.ts +84 -2
- package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
- package/models/models/storage-device/types/index.d.ts +112 -0
- package/models/models/studio-properties/studio-properties-model.d.ts +75 -0
- package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
- package/models/models/studio-properties/types/index.d.ts +29 -0
- package/models/models/translation/services/translation-services.d.ts +128 -2
- package/models/models/translation/services/translation-services.d.ts.map +1 -1
- package/models/models/translation/translation-container-model.d.ts +100 -10
- package/models/models/translation/translation-container-model.d.ts.map +1 -1
- package/models/models/translation/translation-container-registration.d.ts +2 -1
- package/models/models/translation/translation-container-registration.d.ts.map +1 -1
- package/models/models/translation/translation-context.d.ts +1 -16
- package/models/models/translation/translation-context.d.ts.map +1 -1
- package/models/models/translation/translation-model.d.ts +113 -1
- package/models/models/translation/translation-model.d.ts.map +1 -1
- package/models/models/translation/types/index.d.ts +340 -0
- package/models/models/trouble/services/trouble-services.d.ts +3 -3
- package/models/models/trouble/services/trouble-services.d.ts.map +1 -1
- package/models/models/trouble/trouble-model.d.ts +2 -1
- package/models/models/trouble/trouble-model.d.ts.map +1 -1
- package/models/models/trouble/types/index.d.ts +22 -93
- package/models/models/trouble/utils/is-trouble-aware.d.ts +2 -2
- package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
- package/models/models/trouble-container/index.d.ts +4 -3
- package/models/models/trouble-container/index.d.ts.map +1 -1
- package/models/models/trouble-container/trouble-container-model.d.ts +9 -5
- package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
- package/models/models/trouble-container/types/index.d.ts +2 -15
- package/models/utils/client.d.ts +8 -8
- package/models/utils/core-registration-manager.d.ts +1 -1
- package/models/utils/core-registration-manager.d.ts.map +1 -1
- package/models/utils/index.d.ts +0 -2
- package/models/utils/index.d.ts.map +1 -1
- package/models/utils/service.d.ts +9 -9
- package/package.json +2 -2
- package/ui/contexts/state-bean/state-bean-provider.d.ts.map +1 -1
- package/ui/hooks/state-bean/use-state-bean.d.ts +2 -2
- package/ui/hooks/state-bean/use-state-bean.d.ts.map +1 -1
- package/ui/hooks/state-bean/with-state-bean.d.ts.map +1 -1
- package/ui/hooks/translation-container/use-translation-container.d.ts +4 -33
- package/ui/hooks/translation-container/use-translation-container.d.ts.map +1 -1
- package/models/models/trouble-container/trouble-container-registration.d.ts +0 -5
- package/models/models/trouble-container/trouble-container-registration.d.ts.map +0 -1
- package/models/utils/kosmodel-compatible-future-mixin.d.ts +0 -142
- package/models/utils/kosmodel-compatible-future-mixin.d.ts.map +0 -1
- package/models/utils/kosmodel-interface-companion-mixin.d.ts +0 -83
- package/models/utils/kosmodel-interface-companion-mixin.d.ts.map +0 -1
|
@@ -10,6 +10,10 @@ interface RegionSettingsService {
|
|
|
10
10
|
timeZone: string;
|
|
11
11
|
}
|
|
12
12
|
type RegionSettingsConfigBean = IConfigBeanModel<RegionSettingsService>;
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
13
17
|
export declare class RegionInfoModelImpl<AdditionalData extends BaseRegionResponse = BaseRegionResponse> implements RegionInfoModel {
|
|
14
18
|
id: string;
|
|
15
19
|
private unitSystemMap;
|
|
@@ -69,15 +73,15 @@ export declare class RegionInfoModelImpl<AdditionalData extends BaseRegionRespon
|
|
|
69
73
|
*/
|
|
70
74
|
convert(value: number, from: UnitSource, to: UnitSource): string;
|
|
71
75
|
/**
|
|
72
|
-
|
|
76
|
+
* @internal
|
|
73
77
|
*/
|
|
74
78
|
init(): Promise<void>;
|
|
75
79
|
/**
|
|
76
|
-
|
|
80
|
+
* @internal
|
|
77
81
|
*/
|
|
78
82
|
load(): Promise<void>;
|
|
79
83
|
/**
|
|
80
|
-
|
|
84
|
+
* @internal
|
|
81
85
|
*/
|
|
82
86
|
ready(): Promise<void>;
|
|
83
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"region-info-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/region-info/region-info-model.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EACL,kBAAkB,EAIlB,eAAe,EAEhB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iBAAiB,EAGjB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,SAAS,EAEV,MAAM,SAAS,CAAC;AAOjB,UAAU,qBAAqB;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAA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K,EAAE,MAAM;IAa5B;;OAEG;IACH,2BAA2B,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM;IAqChB;;OAEG;IACH,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAyB5D;;OAEG;IAEH,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS;IAoBnE;;OAEG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IAazD;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU;IAqDvD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAuD3B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B;AAED,QAAA,MAAM,YAAY;;;;;;;;;CASjB,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"region-info-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/region-info/region-info-model.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EACL,kBAAkB,EAIlB,eAAe,EAEhB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iBAAiB,EAGjB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,SAAS,EAEV,MAAM,SAAS,CAAC;AAOjB,UAAU,qBAAqB;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO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a,CAAC,KAAK,CAAC,EAAE,MAAM;IAe5B,cAAc,CAAC,KAAK,EAAE,MAAM;IAa5B;;OAEG;IACH,2BAA2B,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM;IAqChB;;OAEG;IACH,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAyB5D;;OAEG;IAEH,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS;IAoBnE;;OAEG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IAazD;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU;IAqDvD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAuD3B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B;AAED,QAAA,MAAM,YAAY;;;;;;;;;CASjB,CAAC;AACF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"region-info-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/region-info/services/region-info-services.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf;AACD,MAAM,WAAW,IAAI;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;CACd;AACD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AACD,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,MAAM,eAAe,CACzB,cAAc,SAAS,kBAAkB,GAAG,kBAAkB,IAC5D,kBAAkB,GAAG;KACtB,GAAG,IAAI,MAAM,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC;CACnD,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"region-info-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/region-info/services/region-info-services.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf;AACD,MAAM,WAAW,IAAI;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;CACd;AACD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AACD,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,MAAM,eAAe,CACzB,cAAc,SAAS,kBAAkB,GAAG,kBAAkB,IAC5D,kBAAkB,GAAG;KACtB,GAAG,IAAI,MAAM,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC;CACnD,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,aAAa,8FAOzB,CAAC;AAEF,eAAO,MAAM,UAAU,iHAStB,CAAC"}
|
|
@@ -1,9 +1,41 @@
|
|
|
1
1
|
import { BaseRegionResponse, RegionsResponse, Unit } from '../services';
|
|
2
2
|
import { IKosDataModel } from '../../../../core';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Unit conversion source specification for the conversion system.
|
|
6
|
+
*
|
|
7
|
+
* Flexible specification allowing conversion by specific unit name or by
|
|
8
|
+
* measurement system with automatic unit selection. The conversion system
|
|
9
|
+
* intelligently selects appropriate default units when only system/measure is provided.
|
|
10
|
+
*
|
|
11
|
+
* @example Specific Unit Conversion
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const fahrenheitSource: UnitSource = { unit: 'fahrenheit' };
|
|
14
|
+
* const celsiusSource: UnitSource = { unit: 'celsius' };
|
|
15
|
+
*
|
|
16
|
+
* const result = regionModel.convert(72, fahrenheitSource, celsiusSource);
|
|
17
|
+
* console.log(result); // '22.22'
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @example System-Based Conversion (Auto Unit Selection)
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const imperialLength: UnitSource = { measure: 'length', system: 'imperial' };
|
|
23
|
+
* const metricLength: UnitSource = { measure: 'length', system: 'metric' };
|
|
24
|
+
*
|
|
25
|
+
* // Automatically uses miles → kilometers
|
|
26
|
+
* const result = regionModel.convert(5, imperialLength, metricLength);
|
|
27
|
+
* console.log(result); // '8.047'
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @group KOS Model
|
|
31
|
+
* @category Region Info
|
|
32
|
+
*/
|
|
4
33
|
export interface UnitSource {
|
|
34
|
+
/** Measurement system identifier (e.g., 'metric', 'imperial', 'us') */
|
|
5
35
|
system?: string;
|
|
36
|
+
/** Type of measurement (e.g., 'length', 'weight', 'temperature', 'volume') */
|
|
6
37
|
measure?: string;
|
|
38
|
+
/** Specific unit name (e.g., 'meter', 'kilogram', 'fahrenheit') */
|
|
7
39
|
unit?: string;
|
|
8
40
|
}
|
|
9
41
|
export type MeasureMapKeys = string | "default";
|
|
@@ -11,6 +43,24 @@ export type SystemMeasureMap = Record<MeasureMapKeys, Unit>;
|
|
|
11
43
|
export type MeasureMap = Record<string, SystemMeasureMap>;
|
|
12
44
|
export type SystemDefaultMap = Record<string, string>;
|
|
13
45
|
export type DefaultMeasureMap = Record<string, SystemDefaultMap>;
|
|
46
|
+
/**
|
|
47
|
+
* Configuration options for creating RegionInfoModel instances.
|
|
48
|
+
*
|
|
49
|
+
* Currently an empty interface but reserved for future regional configuration
|
|
50
|
+
* options such as default locale preferences, custom unit mappings, or
|
|
51
|
+
* regional API endpoints.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* const options: RegionInfoOptions = {
|
|
56
|
+
* // Future options will be defined here
|
|
57
|
+
* };
|
|
58
|
+
* const regionModel = RegionInfo.instance().options(options).build();
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @group KOS Model
|
|
62
|
+
* @category Region Info
|
|
63
|
+
*/
|
|
14
64
|
export interface RegionInfoOptions {
|
|
15
65
|
}
|
|
16
66
|
interface BaseOptions {
|
|
@@ -20,32 +70,110 @@ interface FormatOptions extends BaseOptions {
|
|
|
20
70
|
format: string;
|
|
21
71
|
}
|
|
22
72
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
|
|
73
|
+
* Time format configuration options for regional time display.
|
|
74
|
+
*
|
|
75
|
+
* Defines available time formats including 12-hour (AM/PM) and 24-hour formats
|
|
76
|
+
* with their display patterns and behavior.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```typescript
|
|
80
|
+
* const timeFormats: TimeFormatOptions[] = [
|
|
81
|
+
* { id: '12h', format: 'hh:mm:ss a', ampm: true }, // 3:45:30 PM
|
|
82
|
+
* { id: '24h', format: 'HH:mm:ss', ampm: false } // 15:45:30
|
|
83
|
+
* ];
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @group KOS Model
|
|
87
|
+
* @category Region Info
|
|
88
|
+
*/
|
|
26
89
|
export interface TimeFormatOptions extends FormatOptions {
|
|
90
|
+
/** True if using 12-hour format with AM/PM, false for 24-hour format */
|
|
27
91
|
ampm: boolean;
|
|
28
92
|
}
|
|
29
93
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
94
|
+
* Date format configuration options for regional date display.
|
|
95
|
+
*
|
|
96
|
+
* Defines available date formats including different component ordering
|
|
97
|
+
* (Day/Month/Year vs Month/Day/Year) and display patterns.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```typescript
|
|
101
|
+
* const dateFormats: DateFormatOptions[] = [
|
|
102
|
+
* { id: 'us', format: 'MM/DD/YYYY', order: 'MDY' }, // 03/15/2024
|
|
103
|
+
* { id: 'eu', format: 'DD/MM/YYYY', order: 'DMY' }, // 15/03/2024
|
|
104
|
+
* { id: 'iso', format: 'YYYY-MM-DD', order: 'YMD' } // 2024-03-15
|
|
105
|
+
* ];
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @group KOS Model
|
|
109
|
+
* @category Region Info
|
|
110
|
+
*/
|
|
33
111
|
export interface DateFormatOptions extends FormatOptions {
|
|
112
|
+
/** Order of date components: 'MDY', 'DMY', 'YMD', etc. */
|
|
34
113
|
order: string;
|
|
35
114
|
}
|
|
36
115
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
|
|
116
|
+
* Unit system configuration options for measurement standards.
|
|
117
|
+
*
|
|
118
|
+
* Defines available unit systems (metric, imperial, etc.) with their
|
|
119
|
+
* display names and identification.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```typescript
|
|
123
|
+
* const unitSystems: UnitSystemOptions[] = [
|
|
124
|
+
* { id: 'metric', name: 'Metric System' },
|
|
125
|
+
* { id: 'imperial', name: 'Imperial System' },
|
|
126
|
+
* { id: 'us', name: 'US Customary System' }
|
|
127
|
+
* ];
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* @group KOS Model
|
|
131
|
+
* @category Region Info
|
|
132
|
+
*/
|
|
40
133
|
export interface UnitSystemOptions extends BaseOptions {
|
|
134
|
+
/** Display name of the unit system (e.g., 'Metric System', 'Imperial System') */
|
|
41
135
|
name: string;
|
|
42
136
|
}
|
|
43
137
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
138
|
+
* Region Info Model - Comprehensive regional localization and unit conversion system for KOS applications.
|
|
139
|
+
*
|
|
140
|
+
* This singleton model provides centralized management of regional settings including time formats,
|
|
141
|
+
* date formats, unit systems, time zones, and intelligent unit conversion. Essential for building
|
|
142
|
+
* internationally-aware applications that adapt to local preferences and measurement standards.
|
|
143
|
+
*
|
|
144
|
+
* ## Key Features
|
|
145
|
+
* - **Time & Date Formatting** - Configurable 12/24-hour time and various date order formats
|
|
146
|
+
* - **Unit System Management** - Complete metric/imperial conversion with precision control
|
|
147
|
+
* - **Time Zone Support** - Full time zone management with regional associations
|
|
148
|
+
* - **Dynamic Configuration** - Live updates through KOS configuration system
|
|
149
|
+
* - **Type Safety** - Generic support for additional regional data
|
|
150
|
+
* - **Singleton Pattern** - Single instance manages all regional settings
|
|
151
|
+
*
|
|
152
|
+
* ## Unit Conversion System
|
|
153
|
+
* The model provides intelligent unit conversion between different measurement systems:
|
|
154
|
+
* - **Automatic scaling** - Handles complex conversions with proper scaling factors
|
|
155
|
+
* - **Precision control** - Configurable decimal places per unit type
|
|
156
|
+
* - **Family validation** - Prevents invalid conversions (e.g., length to weight)
|
|
157
|
+
* - **Default unit resolution** - Automatic selection of appropriate units per system
|
|
158
|
+
*
|
|
159
|
+
* @template AdditionalData - Extends BaseRegionResponse for custom regional data requirements
|
|
160
|
+
*
|
|
161
|
+
* @interface
|
|
162
|
+
* @example Basic Usage
|
|
163
|
+
* ```typescript
|
|
164
|
+
* const regionModel = RegionInfo.instance().build();
|
|
165
|
+
*
|
|
166
|
+
* // Unit conversion and regional settings
|
|
167
|
+
* const celsius = regionModel.convert(72, { unit: 'fahrenheit' }, { unit: 'celsius' });
|
|
168
|
+
* console.log(regionModel.selectedCountry); // 'us'
|
|
169
|
+
* ```
|
|
170
|
+
*
|
|
171
|
+
* @group KOS Model
|
|
172
|
+
* @category Region Info
|
|
173
|
+
* @useDeclaredType
|
|
46
174
|
*
|
|
47
|
-
* @
|
|
48
|
-
* @
|
|
175
|
+
* @see {@link UnitSource} - Unit conversion source specification
|
|
176
|
+
* @see {@link RegionInfoOptions} - Configuration options for RegionInfoModel instances
|
|
49
177
|
*/
|
|
50
178
|
export interface RegionInfoModel<AdditionalData extends BaseRegionResponse = BaseRegionResponse> extends RegionInfoOptions, IKosDataModel {
|
|
51
179
|
/** Unique identifier for the region model instance. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/region-info/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/region-info/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,UAAU;IACzB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,CAAC;AAGhD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;AAG5D,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAG1D,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAGtD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,E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C;IAEzC;;;;;;;OAOG;IACH,2BAA2B,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAAC;CACX;AAGD,oBAAY,aAAa;IACvB,MAAM,IAAA;IACN,KAAK,IAAA;IACL,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,KAAK,IAAA;IACL,MAAM,IAAA;CACP;AAGD,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;CACf,CAAC"}
|
|
@@ -1,14 +1,86 @@
|
|
|
1
|
-
import { ArtifactsType, NodeInfoType,
|
|
1
|
+
import { ArtifactsType, NodeInfoType, SoftwareInfoOptions } from './types';
|
|
2
|
+
import { PublicModelInterface } from '../../../core/types';
|
|
2
3
|
import { IKosDataModel, KosCreationContext } from '../../../core/core/kosModel';
|
|
3
4
|
|
|
4
5
|
export declare const MODEL_TYPE = "software-info-model";
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* SoftwareInfo - System software version and artifact management for KOS devices.
|
|
8
|
+
*
|
|
9
|
+
* The SoftwareInfo model provides comprehensive visibility into installed software versions,
|
|
10
|
+
* artifacts, and system components across all nodes in a KOS device. This model is essential
|
|
11
|
+
* for applications that need to display system information, perform version checks, or
|
|
12
|
+
* manage software compatibility and updates.
|
|
13
|
+
*
|
|
14
|
+
* ## Key Features
|
|
15
|
+
* - **Node-Based Architecture** - Track software information across multiple device nodes
|
|
16
|
+
* - **Artifact Management** - Complete visibility into installed software components and versions
|
|
17
|
+
* - **Version Tracking** - Monitor KOS framework versions and application artifacts
|
|
18
|
+
* - **Group Organization** - Automatic categorization of artifacts by functional groups
|
|
19
|
+
* - **System Overview** - Comprehensive system software inventory and version reporting
|
|
20
|
+
* - **Compatibility Checking** - Version information for dependency and compatibility validation
|
|
21
|
+
*
|
|
22
|
+
* ## Data Structure
|
|
23
|
+
* The model organizes software information hierarchically:
|
|
24
|
+
* - **Nodes** - Individual system nodes (primary, secondary, etc.)
|
|
25
|
+
* - **Artifacts** - Software components installed on each node
|
|
26
|
+
* - **Groups** - Logical grouping of related artifacts (core, ui, services, etc.)
|
|
27
|
+
* - **Versions** - Specific version information for each artifact
|
|
28
|
+
*
|
|
29
|
+
* ## Common Use Cases
|
|
30
|
+
* - **System Information Display** - Show installed software versions to users and administrators
|
|
31
|
+
* - **Version Compatibility** - Check software versions before updates or feature activation
|
|
32
|
+
* - **Support Diagnostics** - Provide detailed software information for troubleshooting
|
|
33
|
+
* - **Update Planning** - Assess current software state before planning updates
|
|
34
|
+
* - **Inventory Management** - Track and report on installed software components
|
|
35
|
+
*
|
|
36
|
+
* @interface
|
|
37
|
+
* @example Basic Usage
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const softwareInfo = SoftwareInfo.instance('system-info').build();
|
|
40
|
+
*
|
|
41
|
+
* // Access system software information across nodes
|
|
42
|
+
* const nodes = softwareInfo.nodes;
|
|
43
|
+
* nodes?.forEach(node => {
|
|
44
|
+
* console.log(`Node ${node.nodeName}: KOS ${node.kosVersion}`);
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @group KOS Model
|
|
49
|
+
* @category System Integration
|
|
50
|
+
* @useDeclaredType
|
|
51
|
+
*
|
|
52
|
+
* @see {@link SoftwareInfoOptions} - Configuration options for SoftwareInfo model
|
|
53
|
+
* @see {@link NodeInfoType} - Individual node software information
|
|
54
|
+
* @see {@link ArtifactsType} - Software artifact information
|
|
55
|
+
* @see {@link getSoftwareInfos} - Service function for loading software data
|
|
56
|
+
*/
|
|
57
|
+
export type SoftwareInfoModel = PublicModelInterface<SoftwareInfoModelImpl>;
|
|
58
|
+
/**
|
|
59
|
+
* @ignore
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export declare class SoftwareInfoModelImpl implements IKosDataModel {
|
|
63
|
+
/** Unique identifier for the model instance */
|
|
6
64
|
id: string;
|
|
7
65
|
private logger;
|
|
66
|
+
/** Software information for all device nodes, including KOS versions and artifacts */
|
|
8
67
|
nodes: NodeInfoType[] | undefined;
|
|
9
68
|
constructor(modelId: string, _options: SoftwareInfoOptions, context: KosCreationContext);
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
10
72
|
init(): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Groups artifacts by a specified property for organization.
|
|
75
|
+
* @param arr Array of artifacts to group
|
|
76
|
+
* @param property Property to group by
|
|
77
|
+
* @returns Grouped artifacts organized by the specified property
|
|
78
|
+
* @private
|
|
79
|
+
*/
|
|
11
80
|
groupBy(arr: ArtifactsType[], property: keyof ArtifactsType): Record<string, ArtifactsType[]>;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
12
84
|
load(): Promise<void>;
|
|
13
85
|
}
|
|
14
86
|
//# sourceMappingURL=software-info-model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"software-info-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/software-info/software-info-model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"software-info-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/software-info/software-info-model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEhF,eAAO,MAAM,UAAU,wBAAwB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;AAE5E;;;GAGG;AACH,qBACa,qBAAsB,YAAW,aAAa;IACzD,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IAEjC,sFAAsF;IACtF,KAAK,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;gBAEhC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,kBAAkB;IAS7B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;;;;;OAMG;IACH,OAAO,CAAC,GAAG,EAAE,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,aAAa;IAU3D;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAuB5B"}
|
|
@@ -1,35 +1,67 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SoftwareInfoModelImpl } from '../software-info-model';
|
|
2
|
+
import { PublicModelInterface } from '../../../../core';
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* Configuration options for SoftwareInfo model instances.
|
|
7
|
+
*
|
|
8
|
+
* This interface defines the configuration options for the SoftwareInfo model.
|
|
9
|
+
* Currently, no specific configuration options are required as the model
|
|
10
|
+
* automatically loads software information from the system manifest API.
|
|
11
|
+
*
|
|
12
|
+
* @example Basic Usage
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const softwareInfo = SoftwareInfo.instance('system-info').build();
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @category Model Configuration
|
|
18
|
+
* @category System Integration
|
|
6
19
|
*/
|
|
7
|
-
export interface SoftwareInfoOptions {
|
|
20
|
+
export interface SoftwareInfoOptions {
|
|
21
|
+
/** Reserved for future extensibility - currently no options required */
|
|
22
|
+
[key: string]: never;
|
|
23
|
+
}
|
|
8
24
|
|
|
9
25
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @
|
|
12
|
-
* @link withSoftwareInfo
|
|
26
|
+
* @interface
|
|
27
|
+
* @useDeclaredType
|
|
13
28
|
*/
|
|
14
|
-
export
|
|
15
|
-
nodes: Nodes;
|
|
16
|
-
}
|
|
29
|
+
export type SoftwareInfoModel = PublicModelInterface<SoftwareInfoModelImpl>;
|
|
17
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Software artifact information representing an individual component or package.
|
|
33
|
+
*
|
|
34
|
+
* This interface describes a software artifact (component, package, or module)
|
|
35
|
+
* installed on a KOS device node, including its identification, grouping, and version.
|
|
36
|
+
*
|
|
37
|
+
* @group KOS Model
|
|
38
|
+
* @category Types
|
|
39
|
+
*/
|
|
18
40
|
export interface ArtifactsType {
|
|
41
|
+
/** Unique identifier/name of the software artifact */
|
|
19
42
|
name: string;
|
|
43
|
+
/** Functional group classification (core, ui, services, etc.) */
|
|
20
44
|
group: string;
|
|
45
|
+
/** Semantic version string of the artifact */
|
|
21
46
|
version: string;
|
|
22
47
|
}
|
|
23
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Node software information representing all software components on a device node.
|
|
51
|
+
*
|
|
52
|
+
* This interface describes the complete software configuration of a single KOS device node,
|
|
53
|
+
* including the node identification, KOS framework version, and all installed artifacts
|
|
54
|
+
* organized by functional groups.
|
|
55
|
+
*
|
|
56
|
+
* @group KOS Model
|
|
57
|
+
* @category Types
|
|
58
|
+
*/
|
|
24
59
|
export interface NodeInfoType {
|
|
60
|
+
/** Node identifier (primary, secondary, etc.) */
|
|
25
61
|
nodeName: string;
|
|
62
|
+
/** KOS framework version running on this node */
|
|
63
|
+
kosVersion?: string;
|
|
64
|
+
/** Artifacts organized by functional groups */
|
|
26
65
|
group: Record<string, ArtifactsType[]>;
|
|
27
66
|
}
|
|
28
67
|
|
|
29
|
-
export interface NodeHead {
|
|
30
|
-
NodeType: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface object {
|
|
34
|
-
[key: string]: string;
|
|
35
|
-
}
|
|
@@ -1,29 +1,106 @@
|
|
|
1
1
|
import { StateBeanModel, StateBeanOptions, StatePropsMap } from './types';
|
|
2
2
|
import { StateBeanResponse } from './services';
|
|
3
3
|
import { StatePropertyTypes } from '../types';
|
|
4
|
+
import { PublicModelInterface } from '../../../core/types';
|
|
4
5
|
import { IKosModelLogger, KosContextLogger, KosCreationContext } from '../../../core';
|
|
5
6
|
|
|
6
7
|
export declare const MODEL_TYPE = "state-bean-model";
|
|
7
|
-
|
|
8
|
+
/**
|
|
9
|
+
* StateBean - Reactive state management for KOS device state properties.
|
|
10
|
+
*
|
|
11
|
+
* The StateBean model provides real-time access to KOS device state information through
|
|
12
|
+
* reactive properties that automatically synchronize with device state changes via WebSocket
|
|
13
|
+
* topics. This model is essential for applications that need to monitor device state,
|
|
14
|
+
* track property changes, or build reactive UIs that respond to device status updates.
|
|
15
|
+
*
|
|
16
|
+
* ## Key Features
|
|
17
|
+
* - **Real-time Synchronization** - Automatic updates via `/kos/state/{path}` WebSocket topics
|
|
18
|
+
* - **Type-safe Properties** - Strongly typed state properties with automatic type conversion
|
|
19
|
+
* - **Observable State Map** - Reactive Map-based property storage for efficient updates
|
|
20
|
+
* - **Automatic Type Conversion** - Smart conversion of string values to boolean/number types
|
|
21
|
+
* - **Path-based Organization** - Hierarchical state organization using dot-notation paths
|
|
22
|
+
* - **Lifecycle Management** - Proper initialization and loading of state data
|
|
23
|
+
*
|
|
24
|
+
* ## Topic-Based Reactivity
|
|
25
|
+
* The model listens to KOS topics for real-time synchronization:
|
|
26
|
+
* - **`/kos/state/{path}`** - Receives state updates for the specified path, triggering automatic property updates across all connected clients
|
|
27
|
+
*
|
|
28
|
+
* ## State Property Types
|
|
29
|
+
* Supports all common KOS state property types:
|
|
30
|
+
* - **string** - Text values, configuration strings, identifiers
|
|
31
|
+
* - **number** - Numeric values, counters, measurements, percentages
|
|
32
|
+
* - **boolean** - Status flags, enabled/disabled states, operational flags
|
|
33
|
+
* - **object** - Complex state objects, nested configurations
|
|
34
|
+
*
|
|
35
|
+
* ## Common Use Cases
|
|
36
|
+
* - **Device Status Monitoring** - Track operational states, error conditions, health metrics
|
|
37
|
+
* - **Configuration State** - Monitor dynamic configuration changes and feature flags
|
|
38
|
+
* - **System Status Dashboards** - Build real-time status displays and monitoring interfaces
|
|
39
|
+
* - **Conditional UI Logic** - Show/hide UI elements based on device state
|
|
40
|
+
* - **State-dependent Operations** - Enable/disable functionality based on device state
|
|
41
|
+
* - **Multi-client Synchronization** - Keep multiple clients in sync with device state
|
|
42
|
+
*
|
|
43
|
+
* @interface
|
|
44
|
+
* @example Basic Usage
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const deviceState = StateBean.instance('device-status')
|
|
47
|
+
* .options({ path: 'device.operational.status' })
|
|
48
|
+
* .build();
|
|
49
|
+
*
|
|
50
|
+
* // Access reactive state properties
|
|
51
|
+
* const isOnline = deviceState.props.get('online') as boolean;
|
|
52
|
+
* const temperature = deviceState.props.get('temperature') as number;
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @group KOS Model
|
|
56
|
+
* @category State Management
|
|
57
|
+
* @useDeclaredType
|
|
58
|
+
*
|
|
59
|
+
* @see {@link StateBeanOptions} - Configuration options for StateBean model
|
|
60
|
+
* @see {@link StatePropertyTypes} - Supported state property value types
|
|
61
|
+
* @see {@link StateProp} - Individual property access model
|
|
62
|
+
* @see {@link getStateBeanData} - Service function for loading state data
|
|
63
|
+
*/
|
|
64
|
+
export type StateBean<T extends Record<string, StatePropertyTypes> = Record<string, StatePropertyTypes>> = PublicModelInterface<StateBeanModelImpl<T>>;
|
|
65
|
+
/**
|
|
66
|
+
* @ignore
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
export declare class StateBeanModelImpl<T extends Record<string, StatePropertyTypes> = Record<string, StatePropertyTypes>> implements StateBeanModel<T>, IKosModelLogger {
|
|
70
|
+
/** Unique identifier for the model instance */
|
|
8
71
|
id: string;
|
|
72
|
+
/** State path being monitored for updates */
|
|
9
73
|
path: string;
|
|
74
|
+
/** Reactive Map of state properties with automatic type conversion */
|
|
10
75
|
props: StatePropsMap<T>;
|
|
76
|
+
/** Context logger for debugging and diagnostics */
|
|
11
77
|
logger: KosContextLogger;
|
|
12
78
|
constructor(modelId: string, options: StateBeanOptions, context: KosCreationContext);
|
|
79
|
+
/**
|
|
80
|
+
* Updates the model configuration with new options.
|
|
81
|
+
* @param options New configuration options to apply
|
|
82
|
+
*/
|
|
13
83
|
updateModel(options: StateBeanOptions): void;
|
|
14
84
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @param data - the raw callback
|
|
21
|
-
* @param data.body - the Config Bean that was updated.
|
|
22
|
-
* @see ConfigBeanResponse
|
|
85
|
+
* Handles WebSocket state updates from the KOS topic system.
|
|
86
|
+
* Automatically converts string values to appropriate types (boolean, number).
|
|
87
|
+
* @param stateBean State data received from WebSocket topic
|
|
88
|
+
* @internal
|
|
23
89
|
*/
|
|
24
90
|
handleConfigBeanUpdated(stateBean: StateBeanResponse): void;
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
25
94
|
init(): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Updates multiple properties at once with type conversion.
|
|
97
|
+
* @param props Properties to update
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
26
100
|
updateProps(props: Record<string, StatePropertyTypes>): void;
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
27
104
|
load(): Promise<void>;
|
|
28
105
|
}
|
|
29
106
|
//# sourceMappingURL=state-bean-model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-bean-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/state-bean/state-bean-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"state-bean-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/state-bean/state-bean-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/E,eAAO,MAAM,UAAU,qBAAqB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,MAAM,MAAM,SAAS,CACnB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAAG,MAAM,CACnD,MAAM,EACN,kBAAkB,CACnB,IACC,oBAAoB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;AAIhD;;;GAGG;AACH,qBACa,kBAAkB,CAC7B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAAG,MAAM,CACnD,MAAM,EACN,kBAAkB,CACnB,CACD,YAAW,cAAc,CAAC,CAAC,CAAC,EAAE,eAAe;IAE7C,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,6CAA6C;IAC7C,IAAI,EAAG,MAAM,CAAC;IACd,sEAAsE;IACtE,KAA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