@kosdev-code/kos-ui-sdk 2.1.36 → 2.1.38
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/eventBus.d.ts +30 -0
- package/common/events/eventBus.d.ts.map +1 -1
- package/common/events/eventBus.functional.d.ts +48 -0
- package/common/events/eventBus.functional.d.ts.map +1 -1
- package/common/events/eventBus.state.d.ts +33 -0
- package/common/events/eventBus.state.d.ts.map +1 -1
- package/core/core/decorators/fsm-injection-utils.d.ts.map +1 -1
- package/core/core/decorators/index.d.ts +1 -0
- package/core/core/decorators/index.d.ts.map +1 -1
- package/core/core/decorators/kos-child.d.ts +2 -0
- package/core/core/decorators/kos-child.d.ts.map +1 -1
- package/core/core/decorators/kos-companion.d.ts +14 -0
- package/core/core/decorators/kos-companion.d.ts.map +1 -1
- package/core/core/decorators/kos-container-aware.d.ts +21 -0
- package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-context.d.ts +6 -0
- package/core/core/decorators/kos-context.d.ts.map +1 -1
- package/core/core/decorators/kos-execution-context.d.ts +4 -1
- package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
- package/core/core/decorators/kos-future-aware.d.ts +12 -0
- package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-http-decorators.d.ts +15 -0
- package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
- package/core/core/decorators/kos-log.d.ts +4 -0
- package/core/core/decorators/kos-log.d.ts.map +1 -1
- package/core/core/decorators/kos-logger-aware.d.ts +9 -0
- package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-model-effect.d.ts +9 -0
- package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
- package/core/core/decorators/kos-multiple-future-aware.d.ts +14 -0
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-parent.d.ts +4 -0
- package/core/core/decorators/kos-parent.d.ts.map +1 -1
- package/core/core/decorators/kos-reference.d.ts +9 -0
- package/core/core/decorators/kos-reference.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts +4 -2
- package/core/core/decorators/kos-service-request-helpers.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request.d.ts +44 -3
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +24 -0
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts +17 -1
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
- package/core/core/decorators/kos-trouble-aware.d.ts +6 -0
- package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-view-model.d.ts +14 -0
- package/core/core/decorators/kos-view-model.d.ts.map +1 -1
- package/core/core/decorators/kosDependency.d.ts +2 -0
- package/core/core/decorators/kosDependency.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts +2 -0
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosSubscribe.d.ts +9 -0
- package/core/core/decorators/kosSubscribe.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +34 -0
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/extension/extension-manager.d.ts +50 -0
- package/core/core/extension/extension-manager.d.ts.map +1 -1
- package/core/core/extension/initialize-extension.d.ts +24 -0
- package/core/core/extension/initialize-extension.d.ts.map +1 -1
- package/core/core/extension/plugin-extension-manager.d.ts +11 -0
- package/core/core/extension/plugin-extension-manager.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +38 -0
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/model/kos-service-request-manager.d.ts.map +1 -1
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/core/services/browser-router.d.ts.map +1 -1
- package/core/core/transport/webSocketTransport.d.ts +2 -1
- package/core/core/transport/webSocketTransport.d.ts.map +1 -1
- package/core/index.d.ts +1 -1
- package/core/index.d.ts.map +1 -1
- package/core/types/kos-dependency.d.ts +10 -1
- package/core/types/kos-dependency.d.ts.map +1 -1
- package/core/types/service-response-store.d.ts +10 -0
- package/core/types/service-response-store.d.ts.map +1 -1
- package/core/types/utils/kos-fetch.d.ts +121 -0
- package/core/types/utils/kos-fetch.d.ts.map +1 -1
- package/core/util/ancestor-path-visitor.d.ts +2 -0
- package/core/util/ancestor-path-visitor.d.ts.map +1 -1
- package/core/util/api-request-id.d.ts +4 -0
- package/core/util/api-request-id.d.ts.map +1 -1
- package/core/util/apply-mixins.d.ts +4 -0
- package/core/util/apply-mixins.d.ts.map +1 -1
- package/core/util/array-utils.d.ts +4 -0
- package/core/util/array-utils.d.ts.map +1 -1
- package/core/util/container-utils.d.ts +14 -0
- package/core/util/container-utils.d.ts.map +1 -1
- package/core/util/date-utils.d.ts +29 -0
- package/core/util/date-utils.d.ts.map +1 -1
- package/core/util/debounce.d.ts +3 -0
- package/core/util/debounce.d.ts.map +1 -1
- package/core/util/feature-flags.d.ts +19 -0
- package/core/util/feature-flags.d.ts.map +1 -1
- package/core/util/get-query-params.d.ts +4 -0
- package/core/util/get-query-params.d.ts.map +1 -1
- package/core/util/hsl-to-hex.d.ts +16 -0
- package/core/util/hsl-to-hex.d.ts.map +1 -1
- package/core/util/index.d.ts +2 -0
- package/core/util/index.d.ts.map +1 -1
- package/core/util/kos-config-init.d.ts +36 -0
- package/core/util/kos-config-init.d.ts.map +1 -1
- package/core/util/kos-data-mapper-utils.d.ts +9 -0
- package/core/util/kos-data-mapper-utils.d.ts.map +1 -1
- package/core/util/kos-fetch.d.ts +12 -0
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/core/util/kos-message-utils.d.ts +88 -0
- package/core/util/kos-message-utils.d.ts.map +1 -1
- package/core/util/kos-model-utils.d.ts +46 -0
- package/core/util/kos-model-utils.d.ts.map +1 -1
- package/core/util/kos-model-visitor.d.ts +2 -0
- package/core/util/kos-model-visitor.d.ts.map +1 -1
- package/core/util/kos-org-utils.d.ts +3 -0
- package/core/util/kos-org-utils.d.ts.map +1 -0
- package/core/util/kos-service-request.d.ts +34 -2
- package/core/util/kos-service-request.d.ts.map +1 -1
- package/core/util/log-utils.d.ts +12 -0
- package/core/util/log-utils.d.ts.map +1 -1
- package/core/util/middleware.d.ts +15 -0
- package/core/util/middleware.d.ts.map +1 -1
- package/core/util/model-attribute-utils.d.ts +7 -0
- package/core/util/model-attribute-utils.d.ts.map +1 -1
- package/core/util/model-factory.d.ts +4 -0
- package/core/util/model-factory.d.ts.map +1 -1
- package/core/util/model-registration-utils.d.ts +8 -0
- package/core/util/model-registration-utils.d.ts.map +1 -1
- package/core/util/model-utils.d.ts +30 -6
- package/core/util/model-utils.d.ts.map +1 -1
- package/core/util/observable-proxy-map.d.ts +11 -0
- package/core/util/observable-proxy-map.d.ts.map +1 -1
- package/core/util/paired-client-heartbeat.d.ts +2 -0
- package/core/util/paired-client-heartbeat.d.ts.map +1 -1
- package/core/util/pipe.d.ts +4 -0
- package/core/util/pipe.d.ts.map +1 -1
- package/core/util/retry-with-exponential-backoff.d.ts +3 -0
- package/core/util/retry-with-exponential-backoff.d.ts.map +1 -1
- package/core/util/service-factory.d.ts +10 -0
- package/core/util/service-factory.d.ts.map +1 -1
- package/core/util/service-request-error.d.ts +60 -0
- package/core/util/service-request-error.d.ts.map +1 -0
- package/core/util/service-response.d.ts +15 -0
- package/core/util/service-response.d.ts.map +1 -1
- package/core/util/session-utils.d.ts +8 -0
- package/core/util/session-utils.d.ts.map +1 -1
- package/core/util/wait-for-request.d.ts +16 -0
- package/core/util/wait-for-request.d.ts.map +1 -1
- package/core/util/when-ready.d.ts +3 -0
- package/core/util/when-ready.d.ts.map +1 -1
- package/index.cjs +70 -70
- package/index.cjs.map +1 -1
- package/index.d.cts +6 -4
- package/index.d.ts +6 -4
- package/index.d.ts.map +1 -1
- package/index.js +9257 -9251
- package/index.js.map +1 -1
- package/kos-models.json +426 -0
- package/models/constants/index.d.ts +3 -1
- package/models/constants/index.d.ts.map +1 -1
- package/models/decorators/future-service.d.ts.map +1 -1
- package/models/models/browser-router/types/index.d.ts +1 -0
- package/models/models/canvas-dispatcher/types/index.d.ts +5 -0
- package/models/models/canvas-renderer/types/index.d.ts +5 -0
- package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
- package/models/models/config-bean/types/index.d.ts +1 -0
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts +1 -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 +8 -2
- package/models/models/device/types/index.d.ts +1 -0
- package/models/models/future/future-types.d.ts +14 -0
- package/models/models/future/future-types.d.ts.map +1 -1
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts +25 -0
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -0
- package/models/models/gpio-chip/gpio-chip-model.d.ts +30 -0
- package/models/models/gpio-chip/gpio-chip-model.d.ts.map +1 -0
- package/models/models/gpio-chip/index.d.ts +7 -0
- package/models/models/gpio-chip/index.d.ts.map +1 -0
- package/models/models/gpio-chip/services/gpio-chip-services.d.ts +86 -0
- package/models/models/gpio-chip/services/gpio-chip-services.d.ts.map +1 -0
- package/models/models/gpio-chip/services/index.d.ts +2 -0
- package/models/models/gpio-chip/services/index.d.ts.map +1 -0
- package/models/models/gpio-chip/types/index.d.ts +24 -0
- package/models/models/gpio-pin/gpio-pin-container-model.d.ts +23 -0
- package/models/models/gpio-pin/gpio-pin-container-model.d.ts.map +1 -0
- package/models/models/gpio-pin/gpio-pin-model.d.ts +26 -0
- package/models/models/gpio-pin/gpio-pin-model.d.ts.map +1 -0
- package/models/models/gpio-pin/index.d.ts +6 -0
- package/models/models/gpio-pin/index.d.ts.map +1 -0
- package/models/models/gpio-pin/types/index.d.ts +23 -0
- package/models/models/key-value/types/index.d.ts +1 -0
- package/models/models/kos-expression-evaluator/types/index.d.ts +5 -0
- package/models/models/kos-log-manager/types/index.d.ts +4 -0
- package/models/models/kos-time/types/index.d.ts +3 -0
- package/models/models/log-block/types/index.d.ts +4 -0
- package/models/models/log-stream/types/index.d.ts +3 -1
- package/models/models/network-interface/services/network-interface-services.d.ts.map +1 -1
- package/models/models/network-interface/types/index.d.ts +1 -0
- package/models/models/ota/types/index.d.ts +31 -0
- package/models/models/region-info/region-info-model.d.ts +1 -0
- package/models/models/region-info/region-info-model.d.ts.map +1 -1
- package/models/models/region-info/services/region-info-services.d.ts +2 -2
- package/models/models/region-info/services/region-info-services.d.ts.map +1 -1
- package/models/models/region-info/types/index.d.ts +50 -0
- package/models/models/region-info/types/index.d.ts.map +1 -1
- package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
- package/models/models/software-info/types/index.d.ts +4 -1
- package/models/models/state-bean/types/index.d.ts +3 -0
- package/models/models/state-prop/types/index.d.ts +2 -0
- package/models/models/storage-device/types/index.d.ts +2 -0
- package/models/models/translation/types/index.d.ts +3 -0
- package/models/models/trouble/services/trouble-services.d.ts +1 -0
- package/models/models/trouble/services/trouble-services.d.ts.map +1 -1
- package/models/models/trouble/trouble-model.d.ts +3 -1
- package/models/models/trouble/trouble-model.d.ts.map +1 -1
- package/models/models/trouble/types/index.d.ts +12 -0
- package/models/models/trouble-container/trouble-container-model.d.ts +3 -2
- package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
- package/models/models/trouble-container/types/index.d.ts +5 -0
- package/models/models/usb-update/types/index.d.ts +10 -0
- package/models/utils/client.d.ts +4 -0
- package/models/utils/client.d.ts.map +1 -1
- package/models/utils/extension-manager.d.ts +5 -0
- package/models/utils/extension-manager.d.ts.map +1 -1
- package/models/utils/get-kos-connection-id.d.ts +2 -0
- package/models/utils/get-kos-connection-id.d.ts.map +1 -0
- package/models/utils/index.d.ts +2 -0
- package/models/utils/index.d.ts.map +1 -1
- package/models/utils/openapi-index.d.ts +2 -2
- package/models/utils/service-accessor.d.ts +86 -0
- package/models/utils/service-accessor.d.ts.map +1 -0
- package/models/utils/service.d.ts +4 -0
- package/models/utils/service.d.ts.map +1 -1
- package/models/utils/services/kos/1.6.5/service.d.ts +4 -0
- package/models/utils/services/kos/1.6.5/service.d.ts.map +1 -1
- package/models/utils/services/kos/1.8.1/service.d.ts +4 -0
- package/models/utils/services/kos/1.8.1/service.d.ts.map +1 -1
- package/models/utils/services/kos/1.9.x/openapi.d.ts +4597 -0
- package/models/utils/services/kos/1.9.x/service.d.ts +124 -0
- package/models/utils/services/kos/1.9.x/service.d.ts.map +1 -0
- package/models/utils/services/kos/daily/service.d.ts +4 -0
- package/models/utils/services/kos/daily/service.d.ts.map +1 -1
- package/models/utils/services/vfs/1.6.5/service.d.ts +4 -0
- package/models/utils/services/vfs/1.6.5/service.d.ts.map +1 -1
- package/models/utils/services/vfs/1.8.1/service.d.ts +4 -0
- package/models/utils/services/vfs/1.8.1/service.d.ts.map +1 -1
- package/models/utils/services/vfs/1.9.x/openapi.d.ts +51 -0
- package/models/utils/services/vfs/1.9.x/service.d.ts +124 -0
- package/models/utils/services/vfs/1.9.x/service.d.ts.map +1 -0
- package/models/utils/services/vfs/daily/service.d.ts +4 -0
- package/models/utils/services/vfs/daily/service.d.ts.map +1 -1
- package/models/utils/services-index.d.ts +2 -0
- package/models/utils/services-index.d.ts.map +1 -1
- package/package.json +4 -2
- package/ui/hooks/device/use-device.d.ts +6 -0
- package/ui/hooks/device/use-device.d.ts.map +1 -1
- package/ui/hooks/kos-time/use-kos-time.d.ts +6 -0
- package/ui/hooks/kos-time/use-kos-time.d.ts.map +1 -1
- package/ui/hooks/network-interface-container/use-network-interface-container.d.ts +6 -0
- package/ui/hooks/network-interface-container/use-network-interface-container.d.ts.map +1 -1
- package/ui/hooks/ota/use-ota.d.ts +6 -0
- package/ui/hooks/ota/use-ota.d.ts.map +1 -1
- package/ui/hooks/software-info/use-software-info.d.ts +6 -0
- package/ui/hooks/software-info/use-software-info.d.ts.map +1 -1
- package/ui/hooks/storage-device-container/use-storage-device-container.d.ts +6 -0
- package/ui/hooks/storage-device-container/use-storage-device-container.d.ts.map +1 -1
- package/ui/hooks/translation-container/trans.d.ts +6 -0
- package/ui/hooks/translation-container/trans.d.ts.map +1 -1
- package/ui/hooks/translation-container/use-translation-container.d.ts +6 -0
- package/ui/hooks/translation-container/use-translation-container.d.ts.map +1 -1
- package/ui/hooks/translation-container/use-translation.d.ts +7 -0
- package/ui/hooks/translation-container/use-translation.d.ts.map +1 -1
- package/ui/hooks/translation-container/with-translation-container.d.ts +6 -0
- package/ui/hooks/translation-container/with-translation-container.d.ts.map +1 -1
- package/ui/hooks/usb-update-container/use-usb-update-container.d.ts +6 -0
- package/ui/hooks/usb-update-container/use-usb-update-container.d.ts.map +1 -1
- package/ui/hooks/use-config-bean.d.ts +6 -0
- package/ui/hooks/use-config-bean.d.ts.map +1 -1
- package/ui/hooks/use-config-property.d.ts +6 -0
- package/ui/hooks/use-config-property.d.ts.map +1 -1
- package/ui/hooks/use-kos-model.d.ts +6 -0
- package/ui/hooks/use-kos-model.d.ts.map +1 -1
- package/ui/hooks/use-kos-regions.d.ts.map +1 -1
- package/core/core/declarative/declarative-actions-wiring.d.ts +0 -13
- package/core/core/declarative/declarative-actions-wiring.d.ts.map +0 -1
- package/core/core/declarative/declarative-model-bindings.d.ts +0 -191
- package/core/core/declarative/declarative-model-bindings.d.ts.map +0 -1
- package/core/core/declarative/declarative-model-discovery.d.ts +0 -74
- package/core/core/declarative/declarative-model-discovery.d.ts.map +0 -1
- package/core/core/declarative/declarative-model-factory.d.ts +0 -58
- package/core/core/declarative/declarative-model-factory.d.ts.map +0 -1
- package/core/core/declarative/declarative-model-types.d.ts +0 -96
- package/core/core/declarative/declarative-model-types.d.ts.map +0 -1
- package/core/core/declarative/index.d.ts +0 -7
- package/core/core/declarative/index.d.ts.map +0 -1
- package/core/core/declarative/types.d.ts +0 -304
- package/core/core/declarative/types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-software-info.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/software-info/use-software-info.ts"],"names":[],"mappings":";AAAA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGvE,eAAO,MAAM,eAAe;;;;;;;;;;CAS3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-software-info.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/software-info/use-software-info.ts"],"names":[],"mappings":";AAAA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGvE;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;CAS3B,CAAC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { StorageDeviceContainerModel, StorageDeviceModel } from '../../../models';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Hook for accessing the KOS storage device container model.
|
|
5
|
+
*
|
|
6
|
+
* @kosService core.use-storage
|
|
7
|
+
* @kosApiLevel 2
|
|
8
|
+
*/
|
|
3
9
|
export declare const useStorageDeviceContainer: () => {
|
|
4
10
|
inserted: boolean;
|
|
5
11
|
devices: StorageDeviceModel[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-storage-device-container.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/storage-device-container/use-storage-device-container.ts"],"names":[],"mappings":";AAEA,OAAO,EAEL,2BAA2B,EAC3B,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;CAsBrC,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-storage-device-container.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/storage-device-container/use-storage-device-container.ts"],"names":[],"mappings":";AAEA,OAAO,EAEL,2BAA2B,EAC3B,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAGzB;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;CAsBrC,CAAC"}
|
|
@@ -16,6 +16,12 @@ interface TransProps {
|
|
|
16
16
|
context?: string;
|
|
17
17
|
className?: string;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* React component for rendering translated strings with embedded components or markup.
|
|
21
|
+
*
|
|
22
|
+
* @kosService core.use-translation
|
|
23
|
+
* @kosApiLevel 2
|
|
24
|
+
*/
|
|
19
25
|
export declare const Trans: React.FunctionComponent<TransProps>;
|
|
20
26
|
export {};
|
|
21
27
|
//# sourceMappingURL=trans.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trans.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/translation-container/trans.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA0C9C,eAAO,MAAM,qBAAqB,YACvB,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,WAC/B,MAAM,GAAG,MAAM,YACd,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,YAAY,0KAQlE,CAAC;AAEF,UAAU,UAAU;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;CAC5B;AAED,KAAK,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;AAEpC,KAAK,YAAY,GAAG,UAAU,GAAG,cAAc,CAAC;AAChD,UAAU,UAAU;IAClB,CAAC,EAAE,SAAS,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,GAAG,SAAS,CAAC,CAAC;IACzC,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAmBD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAWrD,CAAC"}
|
|
1
|
+
{"version":3,"file":"trans.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/translation-container/trans.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA0C9C,eAAO,MAAM,qBAAqB,YACvB,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,WAC/B,MAAM,GAAG,MAAM,YACd,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,YAAY,0KAQlE,CAAC;AAEF,UAAU,UAAU;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;CAC5B;AAED,KAAK,cAAc,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;AAEpC,KAAK,YAAY,GAAG,UAAU,GAAG,cAAc,CAAC;AAChD,UAAU,UAAU;IAClB,CAAC,EAAE,SAAS,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,GAAG,SAAS,CAAC,CAAC;IACzC,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAmBD;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAWrD,CAAC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { TranslationContainerModel } from '../../../models';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Hook for accessing the KOS translation container model.
|
|
5
|
+
*
|
|
6
|
+
* @kosService core.use-translation
|
|
7
|
+
* @kosApiLevel 2
|
|
8
|
+
*/
|
|
3
9
|
export declare const useTranslationContainer: () => {
|
|
4
10
|
model: TranslationContainerModel | undefined;
|
|
5
11
|
ready: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-translation-container.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/translation-container/use-translation-container.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,uBAAuB;;;;;;;;;;CASnC,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-translation-container.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/translation-container/use-translation-container.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,iBAAiB,CAAC;AAGzB;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;CASnC,CAAC"}
|
|
@@ -5,6 +5,13 @@ export type TFunction = <T = string>(key: string, options?: ResolveTranslationOp
|
|
|
5
5
|
export interface UseKosTranslationOptions {
|
|
6
6
|
keyPrefix?: string;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Primary hook for consuming KOS translations in React components.
|
|
10
|
+
* Resolves a translation namespace and returns a `t` function for key lookup.
|
|
11
|
+
*
|
|
12
|
+
* @kosService core.use-translation
|
|
13
|
+
* @kosApiLevel 2
|
|
14
|
+
*/
|
|
8
15
|
export declare const useKosTranslation: (namespace: string | string[], baseOptions?: UseKosTranslationOptions) => {
|
|
9
16
|
t: TFunction;
|
|
10
17
|
i18n: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-translation.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/translation-container/use-translation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,yBAAyB,EAG1B,MAAM,iBAAiB,CAAC;AAkCzB,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,KAOxC;AAwBD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,MAAM,EACjC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAAG,MAAM,KAC5C,CAAC,GAAG,MAAM,CAAC;AAEhB,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,eAAO,MAAM,iBAAiB,cACjB,MAAM,GAAG,MAAM,EAAE,gBACd,wBAAwB;;;sBAiBpB,MAAM;;CAgCzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-translation.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/translation-container/use-translation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,yBAAyB,EAG1B,MAAM,iBAAiB,CAAC;AAkCzB,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,KAOxC;AAwBD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,MAAM,EACjC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAAG,MAAM,KAC5C,CAAC,GAAG,MAAM,CAAC;AAEhB,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,cACjB,MAAM,GAAG,MAAM,EAAE,gBACd,wBAAwB;;;sBAiBpB,MAAM;;CAgCzB,CAAC"}
|
|
@@ -4,6 +4,12 @@ interface TranslationContainerProps {
|
|
|
4
4
|
translationContainer: TranslationContainerModel;
|
|
5
5
|
}
|
|
6
6
|
type HoCTranslationContainerProps = TranslationContainerProps;
|
|
7
|
+
/**
|
|
8
|
+
* Higher-order component that injects a `TranslationContainerModel` into a wrapped component.
|
|
9
|
+
*
|
|
10
|
+
* @kosService core.use-translation
|
|
11
|
+
* @kosApiLevel 2
|
|
12
|
+
*/
|
|
7
13
|
export declare function withTranslationContainer<T extends HoCTranslationContainerProps = HoCTranslationContainerProps>(WrappedComponent: React.ComponentType<T>): (props: Omit<T, keyof TranslationContainerProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
14
|
export {};
|
|
9
15
|
//# sourceMappingURL=with-translation-container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-translation-container.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/translation-container/with-translation-container.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAGjE,UAAU,yBAAyB;IACjC,oBAAoB,EAAE,yBAAyB,CAAC;CACjD;AAED,KAAK,4BAA4B,GAAG,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"with-translation-container.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/translation-container/with-translation-container.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAGjE,UAAU,yBAAyB;IACjC,oBAAoB,EAAE,yBAAyB,CAAC;CACjD;AAED,KAAK,4BAA4B,GAAG,yBAAyB,CAAC;AAC9D;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,CAAC,SAAS,4BAA4B,GAAG,4BAA4B,EACrE,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,WACzB,KAAK,CAAC,EAAE,MAAM,yBAAyB,CAAC,sDASxD"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { UsbUpdateContainerModel, UsbUpdateModel } from '../../../models';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Hook for accessing the KOS USB update container model.
|
|
5
|
+
*
|
|
6
|
+
* @kosService core.use-usb-update
|
|
7
|
+
* @kosApiLevel 2
|
|
8
|
+
*/
|
|
3
9
|
export declare const useUsbUpdateContainer: () => {
|
|
4
10
|
inserted: boolean;
|
|
5
11
|
updateAvailable: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-usb-update-container.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/usb-update-container/use-usb-update-container.ts"],"names":[],"mappings":";AAEA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;CA2BjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-usb-update-container.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/usb-update-container/use-usb-update-container.ts"],"names":[],"mappings":";AAEA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAGzB;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;CA2BjC,CAAC"}
|
|
@@ -4,6 +4,12 @@ interface UseConfigBeanParams {
|
|
|
4
4
|
path: string;
|
|
5
5
|
propKey?: string;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Hook for binding to a KOS configuration bean.
|
|
9
|
+
*
|
|
10
|
+
* @kosService core.use-config-property
|
|
11
|
+
* @kosApiLevel 2
|
|
12
|
+
*/
|
|
7
13
|
export declare const useConfigBean: ({ path, propKey }: UseConfigBeanParams) => {
|
|
8
14
|
config: IConfigBeanModel | undefined;
|
|
9
15
|
ready: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-config-bean.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/use-config-bean.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAA2B,MAAM,cAAc,CAAC;AAI9E,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,eAAO,MAAM,aAAa,sBAAuB,mBAAmB;;;;;uBAYxC,MAAM;CAuCjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-config-bean.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/use-config-bean.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAA2B,MAAM,cAAc,CAAC;AAI9E,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,sBAAuB,mBAAmB;;;;;uBAYxC,MAAM;CAuCjC,CAAC"}
|
|
@@ -8,6 +8,12 @@ interface Props {
|
|
|
8
8
|
configProperty?: KosConfigProp;
|
|
9
9
|
optionsTransformer?: OptionsTransformer;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Hook for binding to a KOS configuration property.
|
|
13
|
+
*
|
|
14
|
+
* @kosService core.use-config-property
|
|
15
|
+
* @kosApiLevel 2
|
|
16
|
+
*/
|
|
11
17
|
export declare const useConfigProperty: <T extends object = any>({ configProperty, optionsTransformer, }: Props) => {
|
|
12
18
|
configSelectProps: {
|
|
13
19
|
onChange: (e: SelectCallback) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-config-property.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/use-config-property.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAMZ,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,KAAK,cAAc,GAAG,MAAM,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,KAAK,GAAG,EAAE,CAAC;AAEpE,KAAK,aAAa,GACd,iBAAiB,CAAC,mBAAmB,CAAC,GACtC,iBAAiB,CAAC,MAAM,CAAC,GACzB,iBAAiB,CAAC,MAAM,CAAC,GACzB,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAC/B,UAAU,KAAK;IACb,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AA2BD,eAAO,MAAM,iBAAiB,oEAG3B,KAAK;;sBAkBA,cAAc;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-config-property.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/use-config-property.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAMZ,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,KAAK,cAAc,GAAG,MAAM,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,KAAK,GAAG,EAAE,CAAC;AAEpE,KAAK,aAAa,GACd,iBAAiB,CAAC,mBAAmB,CAAC,GACtC,iBAAiB,CAAC,MAAM,CAAC,GACzB,iBAAiB,CAAC,MAAM,CAAC,GACzB,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAC/B,UAAU,KAAK;IACb,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AA2BD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,oEAG3B,KAAK;;sBAkBA,cAAc;;;;;;;;uBA7CF,GAAG;;;;8BAII,MAAM,KAAK,IAAI;;CA6GzC,CAAC"}
|
|
@@ -9,6 +9,12 @@ interface Options<T extends IKosDataModel, O extends Object = {}> {
|
|
|
9
9
|
destroyOnUnmount?: boolean;
|
|
10
10
|
forceUpdate?: boolean;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Primary hook for consuming KOS models in React components.
|
|
14
|
+
*
|
|
15
|
+
* @kosService core.use-kos-model
|
|
16
|
+
* @kosApiLevel 2
|
|
17
|
+
*/
|
|
12
18
|
export declare const useKosModel: <T extends IKosDataModel, O extends Object = {}>(modelOptions: Options<T, O>) => {
|
|
13
19
|
model: T | undefined;
|
|
14
20
|
ready: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-kos-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/use-kos-model.ts"],"names":[],"mappings":";AAAA,OAAO,EAGL,aAAa,EAGb,YAAY,EACb,MAAM,YAAY,CAAC;AASpB,UAAU,OAAO,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA8FD,eAAO,MAAM,WAAW,iEACR,QAAQ,CAAC,EAAE,CAAC,CAAC;;;;;;;;;;CAsG5B,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-kos-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/use-kos-model.ts"],"names":[],"mappings":";AAAA,OAAO,EAGL,aAAa,EAGb,YAAY,EACb,MAAM,YAAY,CAAC;AASpB,UAAU,OAAO,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,MAAM,GAAG,EAAE;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA8FD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,iEACR,QAAQ,CAAC,EAAE,CAAC,CAAC;;;;;;;;;;CAsG5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-kos-regions.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/use-kos-regions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoC,MAAM,OAAO,CAAC;AAMtE,OAAO,EAGL,cAAc,EACd,KAAK,eAAe,EACrB,MAAM,iCAAiC,CAAC;AAQzC,KAAK,cAAc,GAAG,MAAM,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAC9D,KAAK,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC;AAO/D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB,CAChC,UAAU,SAAS,cAAc,CAAC,kBAAkB,GAAG,cAAc,CAAC,kBAAkB,EACxF,CAAC,SAAS,MAAM,GAAG,GAAG;IAEtB,4DAA4D;IAC5D,GAAG,EAAE,MAAM,EAAE,CAAC;IAEd,yDAAyD;IACzD,WAAW,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IAE1C,yDAAyD;IACzD,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;IAEvB,uDAAuD;IACvD,YAAY,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAE1C,+DAA+D;IAC/D,iBAAiB,EAAE;QACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;QACtC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,CAAC,EAAE,CAAC;KACd,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,aAAa,6HAIb,UAAU,CAAC,CAAC,KACtB,kBAAkB,UAAU,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"use-kos-regions.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/ui/hooks/use-kos-regions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoC,MAAM,OAAO,CAAC;AAMtE,OAAO,EAGL,cAAc,EACd,KAAK,eAAe,EACrB,MAAM,iCAAiC,CAAC;AAQzC,KAAK,cAAc,GAAG,MAAM,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAC9D,KAAK,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC;AAO/D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB,CAChC,UAAU,SAAS,cAAc,CAAC,kBAAkB,GAAG,cAAc,CAAC,kBAAkB,EACxF,CAAC,SAAS,MAAM,GAAG,GAAG;IAEtB,4DAA4D;IAC5D,GAAG,EAAE,MAAM,EAAE,CAAC;IAEd,yDAAyD;IACzD,WAAW,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IAE1C,yDAAyD;IACzD,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;IAEvB,uDAAuD;IACvD,YAAY,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAE1C,+DAA+D;IAC/D,iBAAiB,EAAE;QACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;QACtC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,CAAC,EAAE,CAAC;KACd,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,aAAa,6HAIb,UAAU,CAAC,CAAC,KACtB,kBAAkB,UAAU,EAAE,CAAC,CA+DjC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DeclarativeModelConfig } from './types';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Wire all actions from the unified `actions` section.
|
|
5
|
-
*
|
|
6
|
-
* Routes each action to the appropriate framework metadata:
|
|
7
|
-
* - Actions with `service` → ServiceRequestHandlers Symbol
|
|
8
|
-
* - Actions with `future` → FutureService + FutureAliases Symbols
|
|
9
|
-
* - FutureContainerSetup is auto-inferred from the count of future actions
|
|
10
|
-
* - Plain actions (no service/future) are handled by buildDynamicClass via bindings.actions
|
|
11
|
-
*/
|
|
12
|
-
export declare function wireActions(prototype: any, config: DeclarativeModelConfig): void;
|
|
13
|
-
//# sourceMappingURL=declarative-actions-wiring.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"declarative-actions-wiring.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/declarative/declarative-actions-wiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAeH,OAAO,KAAK,EAEV,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAwKjB;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,SAAS,EAAE,GAAG,EACd,MAAM,EAAE,sBAAsB,GAC7B,IAAI,CAgEN"}
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { BasePropsFor, RegisteredBinding } from './declarative-model-types';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* An effect handler binding: either a plain function or an object
|
|
5
|
-
* with a handler and optional dependency function.
|
|
6
|
-
*/
|
|
7
|
-
export type EffectHandlerBinding<TModel = any> = ((model: TModel) => void) | {
|
|
8
|
-
handler: (model: TModel) => void;
|
|
9
|
-
/** Dependency function that returns an array of tracked values.
|
|
10
|
-
* When provided, this takes priority over JSON string paths. */
|
|
11
|
-
dependencies?: (model: TModel) => any[];
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Registration for a declarative model's imperative bindings.
|
|
15
|
-
*
|
|
16
|
-
* The `TModel` parameter enables typed `model` arguments when the type
|
|
17
|
-
* system knows the model shape (via generated `.d.ts` augmentation).
|
|
18
|
-
* Defaults to `any` for full backward compatibility.
|
|
19
|
-
*/
|
|
20
|
-
export interface ModelBindingRegistration<TModel = any> {
|
|
21
|
-
/**
|
|
22
|
-
* Computed property getters. Each key becomes a `get` accessor
|
|
23
|
-
* on the model instance. MobX will treat these as computed values.
|
|
24
|
-
*/
|
|
25
|
-
computed?: Record<string, (model: TModel) => any>;
|
|
26
|
-
/**
|
|
27
|
-
* Topic handler implementations keyed by handler name.
|
|
28
|
-
* Referenced from `topics[topic].handler` in the JSON config.
|
|
29
|
-
*/
|
|
30
|
-
topicHandlers?: Record<string, (model: TModel, payload: any, raw?: any) => void>;
|
|
31
|
-
/**
|
|
32
|
-
* Custom condition functions for topic handlers, keyed by handler name.
|
|
33
|
-
* When provided, the condition is called before the handler — if it
|
|
34
|
-
* returns false, the message is discarded.
|
|
35
|
-
*
|
|
36
|
-
* Signature: `(data, model, payload) => boolean`
|
|
37
|
-
*/
|
|
38
|
-
topicConditions?: Record<string, (data: any, model: TModel, payload: any) => boolean>;
|
|
39
|
-
/**
|
|
40
|
-
* Custom transform functions for topic handlers, keyed by handler name.
|
|
41
|
-
* When provided, the transform is applied to the raw message body
|
|
42
|
-
* before passing it to the handler.
|
|
43
|
-
*
|
|
44
|
-
* Signature: `(payload) => transformedPayload`
|
|
45
|
-
*/
|
|
46
|
-
topicTransforms?: Record<string, (payload: any) => any>;
|
|
47
|
-
/**
|
|
48
|
-
* Service request response handlers keyed by handler name.
|
|
49
|
-
* Referenced from `serviceRequests[name].handler` in the JSON config.
|
|
50
|
-
* Called with error-first parameters: `(model, error, data)`.
|
|
51
|
-
*/
|
|
52
|
-
serviceHandlers?: Record<string, (model: TModel, error: string | null, data: any) => void>;
|
|
53
|
-
/**
|
|
54
|
-
* Custom condition functions for service requests, keyed by handler name.
|
|
55
|
-
* When provided, the condition is checked before executing the request —
|
|
56
|
-
* if it returns false, the request is skipped.
|
|
57
|
-
*
|
|
58
|
-
* Signature: `(model) => boolean`
|
|
59
|
-
*/
|
|
60
|
-
serviceConditions?: Record<string, (model: TModel) => boolean>;
|
|
61
|
-
/**
|
|
62
|
-
* Custom transform functions for service request responses, keyed by handler name.
|
|
63
|
-
* Applied to the raw response before the handler receives it.
|
|
64
|
-
*
|
|
65
|
-
* Signature: `(response) => transformedResponse`
|
|
66
|
-
*/
|
|
67
|
-
serviceTransforms?: Record<string, (response: any) => any>;
|
|
68
|
-
/**
|
|
69
|
-
* Lifecycle hook implementations.
|
|
70
|
-
* Called during the corresponding KosModel lifecycle phase.
|
|
71
|
-
*/
|
|
72
|
-
lifecycle?: {
|
|
73
|
-
init?: (model: TModel, context?: any) => Promise<void>;
|
|
74
|
-
load?: (model: TModel, context?: any) => Promise<void>;
|
|
75
|
-
ready?: (model: TModel, context?: any) => Promise<void>;
|
|
76
|
-
activate?: (model: TModel, context?: any) => Promise<void>;
|
|
77
|
-
online?: (model: TModel, context?: any) => Promise<void>;
|
|
78
|
-
offline?: (model: TModel, context?: any) => Promise<void>;
|
|
79
|
-
unload?: (model: TModel, context?: any) => void;
|
|
80
|
-
deactivate?: (model: TModel, context?: any) => Promise<void>;
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* Effect handler implementations keyed by effect name.
|
|
84
|
-
* Referenced from `effects[name].handler` in the JSON config.
|
|
85
|
-
*
|
|
86
|
-
* Each entry can be either:
|
|
87
|
-
* - A plain function `(model) => void` — uses dependencies from JSON
|
|
88
|
-
* - An object `{ handler, dependencies? }` — the `dependencies` function
|
|
89
|
-
* takes priority over JSON string paths when both are provided.
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* ```typescript
|
|
93
|
-
* effectHandlers: {
|
|
94
|
-
* // Simple: handler only, dependencies come from JSON
|
|
95
|
-
* onPourIdle: (model) => { model.count++; },
|
|
96
|
-
*
|
|
97
|
-
* // With dependency function (overrides JSON string paths)
|
|
98
|
-
* onDeviceChange: {
|
|
99
|
-
* handler: (model) => { model.syncStatus(); },
|
|
100
|
-
* dependencies: (model) => [model.device?.isOnline, model.device?.status],
|
|
101
|
-
* },
|
|
102
|
-
* }
|
|
103
|
-
* ```
|
|
104
|
-
*/
|
|
105
|
-
effectHandlers?: Record<string, EffectHandlerBinding<TModel>>;
|
|
106
|
-
/**
|
|
107
|
-
* Custom actions to add to the model instance.
|
|
108
|
-
* The first argument is always the model instance itself.
|
|
109
|
-
*/
|
|
110
|
-
actions?: Record<string, (model: TModel, ...args: any[]) => any>;
|
|
111
|
-
/**
|
|
112
|
-
* Options expander functions for config properties, keyed by expander name.
|
|
113
|
-
* Referenced from `configProperties[name].optionsExpander` in the JSON config.
|
|
114
|
-
*/
|
|
115
|
-
configPropertyExpanders?: Record<string, (model: TModel) => any>;
|
|
116
|
-
/**
|
|
117
|
-
* Future-related bindings: service handlers and update callback.
|
|
118
|
-
*
|
|
119
|
-
* - `handlers` — Keyed by handler name, referenced from
|
|
120
|
-
* `futureServices[name].handler` in the JSON config.
|
|
121
|
-
* Each is an async function that calls a backend service and
|
|
122
|
-
* returns a FutureResponse (or KosServiceResponse<FutureResponse>).
|
|
123
|
-
* The first argument is the model instance.
|
|
124
|
-
*
|
|
125
|
-
* - `onFutureUpdate` — Optional callback invoked when a managed Future
|
|
126
|
-
* updates (progress or endState). Called by the FutureHandler as
|
|
127
|
-
* `model.onFutureUpdate(future, alias?)`.
|
|
128
|
-
* The first argument is the model instance.
|
|
129
|
-
*/
|
|
130
|
-
futureHandlers?: {
|
|
131
|
-
handlers?: Record<string, (model: TModel, ...args: any[]) => Promise<any>>;
|
|
132
|
-
onFutureUpdate?: (model: TModel, future: any, alias?: string) => void;
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Singleton registry for declarative model bindings.
|
|
137
|
-
*
|
|
138
|
-
* Bindings must be registered before their corresponding `.model.json`
|
|
139
|
-
* is processed by the declarative model factory.
|
|
140
|
-
*/
|
|
141
|
-
declare class ModelBindingRegistry {
|
|
142
|
-
private static _instance;
|
|
143
|
-
private bindings;
|
|
144
|
-
static getInstance(): ModelBindingRegistry;
|
|
145
|
-
/**
|
|
146
|
-
* Register bindings for a model type.
|
|
147
|
-
*
|
|
148
|
-
* Returns a branded type handle that carries the model type key and
|
|
149
|
-
* binding shape for use with `DeclarativeModel<typeof registration>`.
|
|
150
|
-
* The return value has no runtime content — it exists purely for type inference.
|
|
151
|
-
*
|
|
152
|
-
* @param modelTypeId - The model type identifier matching `model.modelTypeId` in JSON.
|
|
153
|
-
* @param binding - The binding registration.
|
|
154
|
-
* @returns A branded type handle for use with `DeclarativeModel`.
|
|
155
|
-
*/
|
|
156
|
-
register<K extends string, B extends ModelBindingRegistration<BasePropsFor<K>>>(modelTypeId: K, binding: B): RegisteredBinding<K, B>;
|
|
157
|
-
/**
|
|
158
|
-
* Retrieve bindings for a model type.
|
|
159
|
-
*
|
|
160
|
-
* @param modelTypeId - The model type identifier.
|
|
161
|
-
* @returns The binding registration, or undefined if none registered.
|
|
162
|
-
*/
|
|
163
|
-
get(modelTypeId: string): ModelBindingRegistration | undefined;
|
|
164
|
-
/**
|
|
165
|
-
* Check if bindings exist for a model type.
|
|
166
|
-
*/
|
|
167
|
-
has(modelTypeId: string): boolean;
|
|
168
|
-
/**
|
|
169
|
-
* Remove bindings for a model type. Primarily for testing.
|
|
170
|
-
*/
|
|
171
|
-
remove(modelTypeId: string): boolean;
|
|
172
|
-
/**
|
|
173
|
-
* Clear all registered bindings. Primarily for testing.
|
|
174
|
-
*/
|
|
175
|
-
clear(): void;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Singleton instance of the model binding registry.
|
|
179
|
-
*
|
|
180
|
-
* Use this to register and retrieve bindings for declarative models:
|
|
181
|
-
*
|
|
182
|
-
* ```typescript
|
|
183
|
-
* import { modelBindings, type DeclarativeModel } from "@kosdev-code/kos-ui-sdk";
|
|
184
|
-
*
|
|
185
|
-
* const reg = modelBindings.register("my-model", { ... });
|
|
186
|
-
* export type MyModel = DeclarativeModel<typeof reg>;
|
|
187
|
-
* ```
|
|
188
|
-
*/
|
|
189
|
-
export declare const modelBindings: ModelBindingRegistry;
|
|
190
|
-
export {};
|
|
191
|
-
//# sourceMappingURL=declarative-model-bindings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"declarative-model-bindings.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/declarative/declarative-model-bindings.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auto-discovery and registration for declarative models.
|
|
3
|
-
*
|
|
4
|
-
* Provides `discoverAndRegisterModels()` which accepts glob results
|
|
5
|
-
* from either Vite (`import.meta.glob`) or Webpack (`require.context`)
|
|
6
|
-
* and auto-detects the format using UMD-style shape detection.
|
|
7
|
-
*
|
|
8
|
-
* ## Library-level usage (recommended)
|
|
9
|
-
*
|
|
10
|
-
* Model library packages export a registration function:
|
|
11
|
-
*
|
|
12
|
-
* ```typescript
|
|
13
|
-
* // kos-ddk-models/src/declarative-registration.ts
|
|
14
|
-
* import { discoverAndRegisterModels } from "@kosdev-code/kos-ui-sdk";
|
|
15
|
-
*
|
|
16
|
-
* const models = import.meta.glob("./lib/**\/*.model.json", { eager: true, import: "default" });
|
|
17
|
-
* const bindings = import.meta.glob("./lib/**\/*.bindings.ts", { eager: true });
|
|
18
|
-
*
|
|
19
|
-
* export function registerDeclarativeDDKModels() {
|
|
20
|
-
* discoverAndRegisterModels({ models, bindings });
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* ## App-level usage
|
|
25
|
-
*
|
|
26
|
-
* ```typescript
|
|
27
|
-
* // Vite app
|
|
28
|
-
* discoverAndRegisterModels({
|
|
29
|
-
* models: import.meta.glob("./models/**\/*.model.json", { eager: true, import: "default" }),
|
|
30
|
-
* bindings: import.meta.glob("./models/**\/*.bindings.ts", { eager: true }),
|
|
31
|
-
* });
|
|
32
|
-
*
|
|
33
|
-
* // Webpack app
|
|
34
|
-
* discoverAndRegisterModels({
|
|
35
|
-
* models: require.context("./models", true, /\.model\.json$/),
|
|
36
|
-
* bindings: require.context("./models", true, /\.bindings\.ts$/),
|
|
37
|
-
* });
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
interface WebpackRequireContext {
|
|
41
|
-
keys(): string[];
|
|
42
|
-
(id: string): any;
|
|
43
|
-
resolve(id: string): string;
|
|
44
|
-
}
|
|
45
|
-
type GlobRecord = Record<string, any>;
|
|
46
|
-
/**
|
|
47
|
-
* Configuration for `discoverAndRegisterModels()`.
|
|
48
|
-
*/
|
|
49
|
-
export interface DiscoverModelsConfig {
|
|
50
|
-
/**
|
|
51
|
-
* Discovered model JSON files.
|
|
52
|
-
* Accepts either Vite `import.meta.glob` result (plain object)
|
|
53
|
-
* or Webpack `require.context` result (function with `.keys()`).
|
|
54
|
-
*/
|
|
55
|
-
models: GlobRecord | WebpackRequireContext;
|
|
56
|
-
/**
|
|
57
|
-
* Discovered binding TypeScript files.
|
|
58
|
-
* Accepts either Vite `import.meta.glob` result
|
|
59
|
-
* or Webpack `require.context` result.
|
|
60
|
-
*/
|
|
61
|
-
bindings?: GlobRecord | WebpackRequireContext;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Discover and register declarative models from glob results.
|
|
65
|
-
*
|
|
66
|
-
* Auto-detects the bundler format (Vite or Webpack) and normalizes
|
|
67
|
-
* the input. Bindings are executed first to ensure they are available
|
|
68
|
-
* when model JSONs are processed.
|
|
69
|
-
*
|
|
70
|
-
* @param config - Glob results for models and bindings.
|
|
71
|
-
*/
|
|
72
|
-
export declare function discoverAndRegisterModels(config: DiscoverModelsConfig): void;
|
|
73
|
-
export {};
|
|
74
|
-
//# sourceMappingURL=declarative-model-discovery.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"declarative-model-discovery.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/declarative/declarative-model-discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAWH,UAAU,qBAAqB;IAC7B,IAAI,IAAI,MAAM,EAAE,CAAC;IACjB,CAAC,EAAE,EAAE,MAAM,GAAG,GAAG,CAAC;IAClB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAYD,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAqHtC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,MAAM,EAAE,UAAU,GAAG,qBAAqB,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,qBAAqB,CAAC;CAC/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAY5E"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { DeclarativeLifecycle, DeclarativeModelConfig } from './types';
|
|
2
|
-
import { KosModelRegistrationType } from '../registration/model-registration';
|
|
3
|
-
import { IKosDataModel, KosCreationContext } from '../kosModel';
|
|
4
|
-
|
|
5
|
-
export declare function toFrameworkLifecycle(lifecycle?: DeclarativeLifecycle): string;
|
|
6
|
-
/** Return type of declarativeModel() - the proxied class with Registration. */
|
|
7
|
-
export interface DeclarativeModelClass<T extends IKosDataModel = IKosDataModel, O extends object = Record<string, any>> {
|
|
8
|
-
new (id: string, options: O, context: KosCreationContext): T;
|
|
9
|
-
Registration: KosModelRegistrationType<T, O>;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Registry of all declarative model classes created by `declarativeModel()`.
|
|
13
|
-
*
|
|
14
|
-
* Provides lookup by modelTypeId so that container bindings can resolve
|
|
15
|
-
* child model Registrations without manually importing the child JSON.
|
|
16
|
-
*
|
|
17
|
-
* Lookups should be done lazily (at handler execution time, not at
|
|
18
|
-
* registration time) to avoid ordering dependencies.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```typescript
|
|
22
|
-
* import { declarativeModelRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
23
|
-
*
|
|
24
|
-
* // Inside a service handler (called at runtime, after all models are registered)
|
|
25
|
-
* const ChildModel = declarativeModelRegistry.get("child-model-type");
|
|
26
|
-
* const instance = ChildModel.Registration.instance(id).options(opts).build();
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare const declarativeModelRegistry: {
|
|
30
|
-
/** Look up a declarative model class by its modelTypeId. */
|
|
31
|
-
get(modelTypeId: string): DeclarativeModelClass | undefined;
|
|
32
|
-
/** Check if a declarative model class exists for a given modelTypeId. */
|
|
33
|
-
has(modelTypeId: string): boolean;
|
|
34
|
-
/** Remove a model from the registry. Primarily for testing. */
|
|
35
|
-
remove(modelTypeId: string): boolean;
|
|
36
|
-
/** Clear all registered models. Primarily for testing. */
|
|
37
|
-
clear(): void;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Create a KOS model class from a declarative JSON configuration.
|
|
41
|
-
*
|
|
42
|
-
* The returned class has a `.Registration` property and is fully compatible
|
|
43
|
-
* with the KOS model framework - it passes through the same `kosModel()`
|
|
44
|
-
* decorator, constructor proxy, and MobX observability pipeline as
|
|
45
|
-
* imperative models.
|
|
46
|
-
*
|
|
47
|
-
* @param config - Parsed JSON configuration from a `.model.json` file.
|
|
48
|
-
* @returns A proxied model class with `.Registration`.
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```typescript
|
|
52
|
-
* import config from "./beverage-model.model.json";
|
|
53
|
-
* const BeverageModel = declarativeModel(config);
|
|
54
|
-
* BeverageModel.Registration.register();
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
export declare function declarativeModel<T extends IKosDataModel = IKosDataModel, O extends object = Record<string, any>>(config: DeclarativeModelConfig): DeclarativeModelClass<T, O>;
|
|
58
|
-
//# sourceMappingURL=declarative-model-factory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"declarative-model-factory.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/declarative/declarative-model-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAeH,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAGnF,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAmBjB,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAG7E;AA6bD,+EAA+E;AAC/E,MAAM,WAAW,qBAAqB,CACpC,CAAC,SAAS,aAAa,GAAG,aAAa,EACvC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAEtC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,kBAAkB,GAAG,CAAC,CAAC;IAC7D,YAAY,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC9C;AAYD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB;IACnC,4DAA4D;qBAC3C,MAAM,GAAG,qBAAqB,GAAG,SAAS;IAI3D,yEAAyE;qBACxD,MAAM,GAAG,OAAO;IAIjC,+DAA+D;wBAC3C,MAAM,GAAG,OAAO;IAIpC,0DAA0D;aACjD,IAAI;CAGd,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAC9B,CAAC,SAAS,aAAa,GAAG,aAAa,EACvC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtC,MAAM,EAAE,sBAAsB,GAAG,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CA2C7D"}
|