@kosdev-code/kos-ui-sdk 3.0.25 → 3.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.kos.json +3 -2
- package/common/events/async-event-bus.d.ts +8 -11
- package/common/events/async-event-bus.d.ts.map +1 -1
- package/common/events/eventBus.d.ts +1 -18
- package/common/events/eventBus.d.ts.map +1 -1
- package/core/core/companion-instantiator.d.ts +5 -0
- package/core/core/companion-instantiator.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 -3
- package/core/core/decorators/kos-child.d.ts.map +1 -1
- package/core/core/decorators/kos-companion.d.ts +25 -87
- package/core/core/decorators/kos-companion.d.ts.map +1 -1
- package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts +2 -0
- package/core/core/decorators/kos-container-aware-reconcile.test-d.d.ts.map +1 -0
- package/core/core/decorators/kos-container-aware.d.ts +191 -420
- package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-execute-service-request.d.ts +7 -11
- package/core/core/decorators/kos-execute-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-execution-context.d.ts +14 -31
- package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
- package/core/core/decorators/kos-future-aware.d.ts +21 -74
- package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-http-decorators.d.ts +18 -62
- package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
- package/core/core/decorators/kos-logger-aware.d.ts +10 -60
- package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-mixin.d.ts +67 -0
- package/core/core/decorators/kos-mixin.d.ts.map +1 -0
- package/core/core/decorators/kos-model-effect.d.ts +10 -9
- package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
- package/core/core/decorators/kos-multiple-future-aware.d.ts +22 -131
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-reload-aware.d.ts +14 -14
- package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts +3 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request.d.ts +85 -265
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +44 -273
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts +37 -29
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
- package/core/core/decorators/kos-trouble-aware.d.ts +9 -43
- package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-view-model.d.ts +20 -100
- package/core/core/decorators/kos-view-model.d.ts.map +1 -1
- package/core/core/decorators/kosDependency.d.ts +4 -2
- package/core/core/decorators/kosDependency.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +28 -98
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/decorators/propKeys.d.ts +1 -0
- package/core/core/decorators/propKeys.d.ts.map +1 -1
- package/core/core/extension/extension-manager.d.ts.map +1 -1
- package/core/core/indexing/index.d.ts +2 -4
- package/core/core/indexing/index.d.ts.map +1 -1
- package/core/core/indexing/kos-container-index-aware.d.ts +17 -48
- package/core/core/indexing/kos-container-index-aware.d.ts.map +1 -1
- package/core/core/indexing/kos-index-aware.d.ts +11 -37
- package/core/core/indexing/kos-index-aware.d.ts.map +1 -1
- package/core/core/kos-container-index.d.ts +11 -0
- package/core/core/kos-container-index.d.ts.map +1 -1
- package/core/core/kos-container-model.d.ts +11 -32
- package/core/core/kos-container-model.d.ts.map +1 -1
- package/core/core/kos-data-container.d.ts +6 -6
- package/core/core/kos-data-container.d.ts.map +1 -1
- package/core/core/kosCore.d.ts +22 -4
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +21 -8
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/kosModelManager.d.ts +2 -3
- package/core/core/kosModelManager.d.ts.map +1 -1
- package/core/core/lifecycle/constants.d.ts +6 -2
- package/core/core/lifecycle/constants.d.ts.map +1 -1
- package/core/core/lifecycle/kosCoreLifecycle.d.ts +11 -1
- package/core/core/lifecycle/kosCoreLifecycle.d.ts.map +1 -1
- package/core/core/lifecycle/kosModelLifecycle.d.ts +6 -0
- package/core/core/lifecycle/kosModelLifecycle.d.ts.map +1 -1
- package/core/core/lifecycle/model-machine.d.ts +6 -0
- package/core/core/lifecycle/model-machine.d.ts.map +1 -1
- package/core/core/model/kos-fsm-manager.d.ts +6 -0
- package/core/core/model/kos-fsm-manager.d.ts.map +1 -1
- package/core/core/model/kos-model-component-factory.d.ts +1 -1
- package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
- package/core/core/model/kos-offline-queue.d.ts +1 -1
- package/core/core/model/kos-service-request-manager.d.ts +7 -2
- package/core/core/model/kos-service-request-manager.d.ts.map +1 -1
- package/core/core/model/kos-subscription-manager.d.ts +2 -2
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/core/model/service-response-store.d.ts +4 -16
- package/core/core/model/service-response-store.d.ts.map +1 -1
- package/core/core/reconnect/reconnect-fixture.d.ts +17 -0
- package/core/core/reconnect/reconnect-fixture.d.ts.map +1 -0
- package/core/core/registration/model-registration.d.ts.map +1 -1
- package/core/core/services/app-startup-service.d.ts +5 -13
- package/core/core/services/app-startup-service.d.ts.map +1 -1
- package/core/core/services/intent-service.d.ts +3 -12
- package/core/core/services/intent-service.d.ts.map +1 -1
- package/core/core/transport/mock/mock-frames.d.ts +3 -3
- package/core/core/transport/transport.d.ts +1 -1
- package/core/core/transport/transport.d.ts.map +1 -1
- package/core/core/transport/webSocketTransport.d.ts +10 -0
- package/core/core/transport/webSocketTransport.d.ts.map +1 -1
- package/core/types/kos-dependency.d.ts +13 -4
- package/core/types/kos-dependency.d.ts.map +1 -1
- package/core/types/model.d.ts +4 -8
- package/core/types/model.d.ts.map +1 -1
- package/core/types/service-response-store.d.ts +3 -15
- package/core/types/service-response-store.d.ts.map +1 -1
- package/core/types/utils/kos-fetch.d.ts +25 -37
- package/core/types/utils/kos-fetch.d.ts.map +1 -1
- package/core/util/abortable-when.d.ts +5 -6
- package/core/util/abortable-when.d.ts.map +1 -1
- package/core/util/ancestor-path-visitor.d.ts +14 -20
- package/core/util/ancestor-path-visitor.d.ts.map +1 -1
- package/core/util/container-utils.d.ts +26 -159
- package/core/util/container-utils.d.ts.map +1 -1
- package/core/util/date-utils.d.ts +9 -58
- package/core/util/date-utils.d.ts.map +1 -1
- package/core/util/debounce.d.ts +1 -8
- package/core/util/debounce.d.ts.map +1 -1
- package/core/util/kos-fetch.d.ts +1 -1
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/core/util/kos-model-utils.d.ts +10 -11
- package/core/util/kos-model-utils.d.ts.map +1 -1
- package/core/util/model-attribute-utils.d.ts +5 -22
- package/core/util/model-attribute-utils.d.ts.map +1 -1
- package/core/util/model-type-guards.d.ts.map +1 -1
- package/core/util/model-utils.d.ts.map +1 -1
- package/core/util/promise-utils.d.ts +1 -26
- package/core/util/promise-utils.d.ts.map +1 -1
- package/core/util/service-factory.d.ts +5 -23
- package/core/util/service-factory.d.ts.map +1 -1
- package/core/util/service-request-error.d.ts +3 -5
- package/core/util/service-request-error.d.ts.map +1 -1
- package/core/util/service-response.d.ts +12 -67
- package/core/util/service-response.d.ts.map +1 -1
- package/core/util/transport-not-ready-error.d.ts +11 -13
- package/core/util/transport-not-ready-error.d.ts.map +1 -1
- package/core/util/when-ready.d.ts +1 -8
- package/core/util/when-ready.d.ts.map +1 -1
- package/index.cjs +983 -11777
- package/index.cjs.map +1 -1
- package/index.js +1056 -11854
- package/index.js.map +1 -1
- package/models/decorators/future-service.d.ts +7 -7
- package/models/models/browser-router/browser-router-model.d.ts +10 -39
- package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
- package/models/models/browser-router/browser-router-registration.d.ts +5 -77
- package/models/models/browser-router/browser-router-registration.d.ts.map +1 -1
- package/models/models/browser-router/types/index.d.ts +2 -16
- package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts +5 -77
- package/models/models/canvas-dispatcher/canvas-dispatcher-registration.d.ts.map +1 -1
- package/models/models/canvas-renderer/canvas-renderer-registration.d.ts +5 -75
- package/models/models/canvas-renderer/canvas-renderer-registration.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model-builder.d.ts +4 -11
- package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model.d.ts +23 -66
- package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts +15 -62
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/types/index.d.ts +34 -215
- package/models/models/device/device-model.d.ts +20 -199
- package/models/models/device/device-model.d.ts.map +1 -1
- package/models/models/device/device-registration.d.ts +7 -87
- package/models/models/device/device-registration.d.ts.map +1 -1
- package/models/models/device/types/index.d.ts +5 -34
- package/models/models/future/future-aware.d.ts +7 -71
- package/models/models/future/future-aware.d.ts.map +1 -1
- package/models/models/future/future-model-builder.d.ts +2 -2
- package/models/models/future/future-model.d.ts +3 -23
- package/models/models/future/future-model.d.ts.map +1 -1
- package/models/models/future/future-types.d.ts +28 -145
- package/models/models/future/future-types.d.ts.map +1 -1
- package/models/models/gpio-chip/gpio-chip-builders.d.ts +14 -0
- package/models/models/gpio-chip/gpio-chip-builders.d.ts.map +1 -0
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts +2 -1
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -1
- package/models/models/key-value/key-value-model.d.ts +12 -72
- package/models/models/key-value/key-value-model.d.ts.map +1 -1
- package/models/models/key-value/key-value-registration.d.ts +5 -77
- package/models/models/key-value/key-value-registration.d.ts.map +1 -1
- package/models/models/key-value/services/key-value-services.d.ts +13 -72
- package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
- package/models/models/key-value/types/index.d.ts +3 -46
- package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts +29 -0
- package/models/models/kos-expression-evaluator/expression-parse-cache.d.ts.map +1 -0
- package/models/models/kos-expression-evaluator/index.d.ts +1 -0
- package/models/models/kos-expression-evaluator/index.d.ts.map +1 -1
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +73 -105
- package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -1
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +2 -12
- package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -1
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts +7 -46
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
- package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +5 -80
- package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -1
- package/models/models/kos-log-manager/types/index.d.ts +13 -156
- package/models/models/kos-time/kos-time-model.d.ts +8 -39
- package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
- package/models/models/kos-time/kos-time-registration.d.ts +6 -73
- package/models/models/kos-time/kos-time-registration.d.ts.map +1 -1
- package/models/models/kos-time/types/index.d.ts +3 -58
- package/models/models/log-block/log-block-container-model.d.ts +2 -118
- package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
- package/models/models/log-block/log-block-container-registration.d.ts +5 -75
- package/models/models/log-block/log-block-container-registration.d.ts.map +1 -1
- package/models/models/log-block/log-block-model.d.ts +5 -168
- package/models/models/log-block/log-block-model.d.ts.map +1 -1
- package/models/models/log-block/log-block-registration.d.ts +5 -75
- package/models/models/log-block/log-block-registration.d.ts.map +1 -1
- package/models/models/log-block/types/index.d.ts +14 -81
- package/models/models/log-stream/log-stream-container-model.d.ts +8 -35
- package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-container-registration.d.ts +5 -75
- package/models/models/log-stream/log-stream-container-registration.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-model.d.ts +8 -29
- package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
- package/models/models/log-stream/log-stream-registration.d.ts +5 -75
- package/models/models/log-stream/log-stream-registration.d.ts.map +1 -1
- package/models/models/log-stream/types/index.d.ts +5 -60
- package/models/models/network-interface/network-interface-container-model.d.ts +6 -35
- package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-container-registration.d.ts +5 -73
- package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-model.d.ts +5 -43
- package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
- package/models/models/network-interface/network-interface-registration.d.ts +5 -73
- package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
- package/models/models/network-interface/types/index.d.ts +2 -16
- package/models/models/ota/ota-model.d.ts +11 -39
- package/models/models/ota/ota-model.d.ts.map +1 -1
- package/models/models/ota/ota-registration.d.ts +5 -77
- package/models/models/ota/ota-registration.d.ts.map +1 -1
- package/models/models/ota/types/index.d.ts +2 -141
- package/models/models/region-info/types/index.d.ts +19 -99
- package/models/models/region-info/types/index.d.ts.map +1 -1
- package/models/models/software-info/services/software-info-services.d.ts +2 -14
- package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
- package/models/models/software-info/software-info-model.d.ts +3 -39
- package/models/models/software-info/software-info-model.d.ts.map +1 -1
- package/models/models/software-info/software-info-registration.d.ts +6 -73
- package/models/models/software-info/software-info-registration.d.ts.map +1 -1
- package/models/models/software-info/types/index.d.ts +6 -20
- package/models/models/state-bean/state-bean-model.d.ts +10 -41
- package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
- package/models/models/state-bean/state-bean-registration.d.ts +6 -73
- package/models/models/state-bean/state-bean-registration.d.ts.map +1 -1
- package/models/models/state-bean/types/index.d.ts +4 -84
- package/models/models/state-prop/state-prop-model.d.ts +6 -40
- package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
- package/models/models/state-prop/state-prop-registration.d.ts +6 -73
- package/models/models/state-prop/state-prop-registration.d.ts.map +1 -1
- package/models/models/state-prop/types/index.d.ts +5 -37
- package/models/models/storage-device/storage-device-container-model.d.ts +7 -273
- package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-container-registration.d.ts +5 -75
- package/models/models/storage-device/storage-device-container-registration.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-model.d.ts +3 -49
- package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
- package/models/models/storage-device/storage-device-registration.d.ts +5 -75
- package/models/models/storage-device/storage-device-registration.d.ts.map +1 -1
- package/models/models/storage-device/types/index.d.ts +13 -82
- package/models/models/studio-properties/studio-properties-model.d.ts +13 -36
- package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
- package/models/models/studio-properties/studio-properties-registration.d.ts +5 -75
- package/models/models/studio-properties/studio-properties-registration.d.ts.map +1 -1
- package/models/models/studio-properties/types/index.d.ts +2 -24
- package/models/models/translation/descriptor-merge.d.ts +13 -17
- package/models/models/translation/descriptor-merge.d.ts.map +1 -1
- package/models/models/translation/services/translation-services.d.ts +19 -77
- package/models/models/translation/services/translation-services.d.ts.map +1 -1
- package/models/models/translation/test-harness.d.ts +6 -8
- package/models/models/translation/test-harness.d.ts.map +1 -1
- package/models/models/translation/translation-container-model.d.ts +7 -59
- package/models/models/translation/translation-container-model.d.ts.map +1 -1
- package/models/models/translation/translation-container-registration.d.ts +6 -73
- package/models/models/translation/translation-container-registration.d.ts.map +1 -1
- package/models/models/translation/translation-model.d.ts +17 -50
- package/models/models/translation/translation-model.d.ts.map +1 -1
- package/models/models/translation/translation-registration.d.ts +6 -73
- package/models/models/translation/translation-registration.d.ts.map +1 -1
- package/models/models/translation/types/index.d.ts +51 -276
- package/models/models/trouble/trouble-registration.d.ts +6 -73
- package/models/models/trouble/trouble-registration.d.ts.map +1 -1
- package/models/models/trouble/types/index.d.ts +17 -188
- package/models/models/trouble/utils/is-trouble-aware.d.ts +4 -85
- package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
- package/models/models/trouble-container/trouble-builders.d.ts +11 -0
- package/models/models/trouble-container/trouble-builders.d.ts.map +1 -0
- package/models/models/trouble-container/trouble-container-model.d.ts +2 -1
- package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
- package/models/models/usb-update/usb-update-container-registration.d.ts +5 -75
- package/models/models/usb-update/usb-update-container-registration.d.ts.map +1 -1
- package/models/models/usb-update/usb-update-registration.d.ts +5 -75
- package/models/models/usb-update/usb-update-registration.d.ts.map +1 -1
- package/models/types/cancellable-promise.d.ts +6 -9
- package/models/types/cancellable-promise.d.ts.map +1 -1
- package/models/utils/await-future-call.d.ts +9 -21
- package/models/utils/await-future-call.d.ts.map +1 -1
- package/models/utils/cancellable-future-call.d.ts +8 -19
- package/models/utils/cancellable-future-call.d.ts.map +1 -1
- package/models/utils/cancellable-service.d.ts +14 -23
- package/models/utils/cancellable-service.d.ts.map +1 -1
- package/models/utils/conversion-utils.d.ts +8 -48
- package/models/utils/conversion-utils.d.ts.map +1 -1
- package/models/utils/persistence-store.d.ts +1 -1
- package/models/utils/service.d.ts +14 -48
- package/models/utils/service.d.ts.map +1 -1
- package/models/utils/services/kos/daily/service.d.ts +5 -5
- package/models/utils/services/kos/daily/service.d.ts.map +1 -1
- package/models/utils/services/vfs/daily/service.d.ts +5 -5
- package/models/utils/services/vfs/daily/service.d.ts.map +1 -1
- package/models/utils/timer-manager.d.ts.map +1 -1
- package/package.json +2 -2
- package/{index-CRb8ucfF.cjs → software-info-registration-Le3V0a6v.cjs} +12187 -986
- package/software-info-registration-Le3V0a6v.cjs.map +1 -0
- package/software-info-registration-kSGacOka.js +24809 -0
- package/software-info-registration-kSGacOka.js.map +1 -0
- package/testing/index.d.ts +32 -34
- package/testing/index.d.ts.map +1 -1
- package/testing.cjs +2 -1
- package/testing.cjs.map +1 -1
- package/testing.js +2 -1
- package/testing.js.map +1 -1
- package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts +9 -0
- package/ui/components/connection-dev-button/connection-dev-button-styles.d.ts.map +1 -0
- package/ui/components/connection-dev-button/index.d.ts +36 -0
- package/ui/components/connection-dev-button/index.d.ts.map +1 -0
- package/ui/components/connection-dev-button/use-connection-dev-state.d.ts +29 -0
- package/ui/components/connection-dev-button/use-connection-dev-state.d.ts.map +1 -0
- package/ui/components/index.d.ts +1 -0
- package/ui/components/index.d.ts.map +1 -1
- package/ui/features/canvas/hooks/use-image-renderer.d.ts +5 -4
- package/ui/features/canvas/hooks/use-image-renderer.d.ts.map +1 -1
- package/ui/hooks/use-function-warmup.d.ts +4 -14
- package/ui/hooks/use-function-warmup.d.ts.map +1 -1
- package/ui/hooks/use-kos-date-formats.d.ts +15 -29
- package/ui/hooks/use-kos-date-formats.d.ts.map +1 -1
- package/ui/hooks/use-kos-region-timezones.d.ts +4 -55
- package/ui/hooks/use-kos-region-timezones.d.ts.map +1 -1
- package/ui/hooks/use-kos-regions.d.ts +11 -23
- package/ui/hooks/use-kos-regions.d.ts.map +1 -1
- package/ui/hooks/use-kos-time-formats.d.ts +16 -31
- package/ui/hooks/use-kos-time-formats.d.ts.map +1 -1
- package/ui/hooks/use-kos-unit-systems.d.ts +13 -27
- package/ui/hooks/use-kos-unit-systems.d.ts.map +1 -1
- package/ui/hooks/view-model/use-view-model.d.ts +6 -31
- package/ui/hooks/view-model/use-view-model.d.ts.map +1 -1
- package/ui/policies/reload-on-disconnect-policy.d.ts +5 -6
- package/ui/policies/reload-on-disconnect-policy.d.ts.map +1 -1
- package/index-CRb8ucfF.cjs.map +0 -1
- package/index-YzHb2lnB.js +0 -13607
- package/index-YzHb2lnB.js.map +0 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Waits for a
|
|
2
|
+
* Waits for a reactive predicate to become `true`, but gives up as soon as the
|
|
3
3
|
* supplied signal aborts.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* reaction observing the predicate for the lifetime of the process.
|
|
5
|
+
* `when()` waits forever by design. A caller working against a deadline needs
|
|
6
|
+
* the wait to be cancellable and the underlying reaction disposed when it
|
|
7
|
+
* gives up; otherwise every abandoned waiter keeps a live reaction observing
|
|
8
|
+
* the predicate for the lifetime of the process.
|
|
10
9
|
*
|
|
11
10
|
* @param predicate - The reactive condition to wait for.
|
|
12
11
|
* @param signal - Optional signal that cancels the wait. When omitted the wait
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abortable-when.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/abortable-when.ts"],"names":[],"mappings":"AASA
|
|
1
|
+
{"version":3,"file":"abortable-when.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/abortable-when.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,GACxB,WAAW,MAAM,OAAO,EACxB,SAAS,WAAW,KACnB,OAAO,CAAC,IAAI,CAqCd,CAAC"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { IKosDataModel, IKosModel } from '../core/kosModel';
|
|
2
2
|
import { KosModelVisitor } from './kos-model-visitor';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Visitor that finds the ids of a target model's ancestors in any KOS model
|
|
5
|
+
* hierarchy that implements the visitor pattern.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Works well for Studio's typical model sizes (dozens to ~100 items).
|
|
7
|
+
* It walks the tree depth-first and tracks the current path, so when the
|
|
8
|
+
* target is found the accumulated path is the ancestor list. The traversal
|
|
9
|
+
* visits every model until the target is found, which suits hierarchies of
|
|
10
|
+
* up to a few hundred models.
|
|
12
11
|
*
|
|
13
12
|
* @example
|
|
14
13
|
* ```typescript
|
|
15
|
-
* const visitor = new AncestorPathVisitor(
|
|
14
|
+
* const visitor = new AncestorPathVisitor("target-item-id");
|
|
16
15
|
* visitor.start(rootContainerModel);
|
|
17
|
-
* const ancestors = visitor.getAncestorPath(); // [
|
|
16
|
+
* const ancestors = visitor.getAncestorPath(); // ["root", "parent"]
|
|
18
17
|
* ```
|
|
19
18
|
*
|
|
20
19
|
* @category Core
|
|
@@ -27,18 +26,13 @@ export declare class AncestorPathVisitor extends KosModelVisitor {
|
|
|
27
26
|
private foundPath;
|
|
28
27
|
constructor(targetId: string);
|
|
29
28
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* 1. Check cycle detection (skip if already visited)
|
|
34
|
-
* 2. Push model to path
|
|
35
|
-
* 3. Call visitModel() to check if this is target
|
|
36
|
-
* 4. If not target, visit children
|
|
37
|
-
* 5. Pop from path if target not found in this subtree (backtrack)
|
|
29
|
+
* Wraps the visit with path tracking: push the model, check whether it is
|
|
30
|
+
* the target, visit its children, then pop it again if the target was not
|
|
31
|
+
* found in this subtree.
|
|
38
32
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
33
|
+
* The base class logic is inlined rather than calling super.visit() so the
|
|
34
|
+
* push and pop happen at the right points relative to cycle detection and
|
|
35
|
+
* child traversal.
|
|
42
36
|
*/
|
|
43
37
|
visit(model: IKosModel): void;
|
|
44
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ancestor-path-visitor.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/ancestor-path-visitor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD
|
|
1
|
+
{"version":3,"file":"ancestor-path-visitor.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/ancestor-path-visitor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,SAAS,CAAyB;gBAE9B,QAAQ,EAAE,MAAM;IAK5B;;;;;;;;OAQG;IACM,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAgCtC;;;OAGG;IACH,UAAU,CAAC,CAAC,SAAS,aAAa,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,GAAG,IAAI;IAY7D;;;OAGG;IACH,eAAe,IAAI,MAAM,EAAE;IAI3B;;OAEG;IACH,QAAQ,IAAI,OAAO;CAGpB"}
|
|
@@ -4,46 +4,21 @@ interface Identifiable {
|
|
|
4
4
|
id: string;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Transforms an entity's id before container synchronization.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* Use it to build compound model ids when backend ids are only unique within
|
|
10
|
+
* their parent (for example `"123"` becomes `"release-version-abc-123"`), and
|
|
11
|
+
* to keep the original backend id on a `rawId` field for server calls.
|
|
10
12
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* model IDs even when backend IDs are only unique within their parent scope.
|
|
13
|
+
* @template D - Input entity type (data from the backend)
|
|
14
|
+
* @template M - Mapped entity type (defaults to D when no transformation is needed)
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
* for server communication while using compound IDs for model identity.
|
|
17
|
-
*
|
|
18
|
-
* @template D - Input entity type (data from backend)
|
|
19
|
-
* @template M - Mapped entity type (data after transformation, defaults to D if no transformation)
|
|
20
|
-
*
|
|
21
|
-
* @example Simple ID prefix transformation
|
|
16
|
+
* @example
|
|
22
17
|
* ```typescript
|
|
23
18
|
* const idMapper: IdMapper<User, User & { rawId: string }> = (user) => ({
|
|
24
19
|
* ...user,
|
|
25
20
|
* rawId: user.id,
|
|
26
|
-
* id: `user-${user.id}
|
|
27
|
-
* });
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @example Compound ID with parent context
|
|
31
|
-
* ```typescript
|
|
32
|
-
* type WithRawId<T> = T & { rawId: string };
|
|
33
|
-
*
|
|
34
|
-
* const idMapper: IdMapper<VersionResponse, WithRawId<VersionResponse>> = (version) => ({
|
|
35
|
-
* ...version,
|
|
36
|
-
* rawId: version.id,
|
|
37
|
-
* id: `release-version-${templateId}-${version.id}`
|
|
38
|
-
* });
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @example Multi-level compound ID
|
|
42
|
-
* ```typescript
|
|
43
|
-
* const idMapper: IdMapper<CandidateResponse, WithRawId<CandidateResponse>> = (candidate) => ({
|
|
44
|
-
* ...candidate,
|
|
45
|
-
* rawId: candidate.id,
|
|
46
|
-
* id: `release-candidate-${templateId}-${versionId}-${candidate.id}`
|
|
21
|
+
* id: `user-${user.id}`,
|
|
47
22
|
* });
|
|
48
23
|
* ```
|
|
49
24
|
*
|
|
@@ -72,130 +47,47 @@ interface ResolveParams<T extends Container, D extends Identifiable, M extends I
|
|
|
72
47
|
/**
|
|
73
48
|
* Creates a function that synchronizes a container with a new list of entities.
|
|
74
49
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* to
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* - **ID transformation**: Optional `idMapper` transforms backend IDs to model IDs
|
|
82
|
-
* - **Update-in-place**: `onUpdateItem` can update existing models without recreating
|
|
83
|
-
* - **Type safety**: Generic type parameters ensure type consistency through transformation
|
|
84
|
-
*
|
|
85
|
-
* Workflow:
|
|
86
|
-
* 1. Apply `idMapper` to transform entity IDs (if provided)
|
|
87
|
-
* 2. Calculate deltas: which IDs are missing from new data (removals)
|
|
88
|
-
* 3. Invoke `onRemoveItem` for each ID to remove
|
|
89
|
-
* 4. For each entity in new data:
|
|
90
|
-
* - If model exists: invoke `onUpdateItem` (if provided) or `onAddItem`
|
|
91
|
-
* - If model doesn't exist: invoke `onAddItem`
|
|
92
|
-
* 5. Add all new models to container in batch
|
|
50
|
+
* Entity ids are first passed through `idMapper`. Ids in the container that are
|
|
51
|
+
* missing from the new list are passed to `onRemoveItem` and the results are
|
|
52
|
+
* removed. Each incoming entity then goes to `onUpdateItem` when a model with
|
|
53
|
+
* that id already exists (and the callback is provided), otherwise to
|
|
54
|
+
* `onAddItem`. Every non-null return value is added to the container in one
|
|
55
|
+
* batch, so `onUpdateItem` returns `null` after updating a model in place.
|
|
93
56
|
*
|
|
94
57
|
* @template T - Container type implementing IKosModelContainer
|
|
95
|
-
* @template D - Input entity type (data from backend)
|
|
58
|
+
* @template D - Input entity type (data from the backend)
|
|
96
59
|
* @template M - Mapped entity type (after idMapper transformation, defaults to D)
|
|
97
60
|
*
|
|
98
61
|
* @param params - Configuration for resolving deltas
|
|
99
62
|
* @param params.container - The container to synchronize
|
|
100
63
|
* @param params.onAddItem - Callback to create a new model from entity data
|
|
101
|
-
* @param params.onUpdateItem - Optional callback to update existing model (return null to skip adding)
|
|
102
|
-
* @param params.onRemoveItem - Optional callback invoked with each
|
|
103
|
-
* @param params.idMapper - Optional function to transform entity
|
|
64
|
+
* @param params.onUpdateItem - Optional callback to update an existing model (return null to skip adding)
|
|
65
|
+
* @param params.onRemoveItem - Optional callback invoked with each id to remove (default: identity function)
|
|
66
|
+
* @param params.idMapper - Optional function to transform entity ids before processing
|
|
104
67
|
*
|
|
105
68
|
* @returns A function that accepts entities and synchronizes the container
|
|
106
69
|
*
|
|
107
70
|
* @kosService core.container-utils
|
|
108
71
|
*
|
|
109
|
-
* @example
|
|
72
|
+
* @example
|
|
110
73
|
* ```typescript
|
|
111
74
|
* const syncUsers = resolveContainerDeltas({
|
|
112
75
|
* container: userContainer,
|
|
113
76
|
* onAddItem: (user) => User.instance(user.id).options(user).build(),
|
|
114
77
|
* onUpdateItem: (user, existing) => {
|
|
115
78
|
* existing.updateModel(user);
|
|
116
|
-
* return null;
|
|
79
|
+
* return null;
|
|
117
80
|
* },
|
|
118
|
-
* onRemoveItem: (id) => id
|
|
119
81
|
* });
|
|
120
82
|
* syncUsers(newUserList);
|
|
121
83
|
* ```
|
|
122
|
-
*
|
|
123
|
-
* @example ID transformation with compound IDs and rawId preservation
|
|
124
|
-
* ```typescript
|
|
125
|
-
* type WithRawId<T> = T & { rawId: string };
|
|
126
|
-
*
|
|
127
|
-
* const syncVersions = resolveContainerDeltas<
|
|
128
|
-
* typeof template.versions,
|
|
129
|
-
* VersionResponse,
|
|
130
|
-
* WithRawId<VersionResponse>
|
|
131
|
-
* >({
|
|
132
|
-
* container: template.versions,
|
|
133
|
-
* idMapper: (versionData) => ({
|
|
134
|
-
* ...versionData,
|
|
135
|
-
* rawId: versionData.id, // Preserve backend ID
|
|
136
|
-
* id: ReleaseIdFactory.version(templateId, versionData.id) // Compound model ID
|
|
137
|
-
* }),
|
|
138
|
-
* onAddItem: (data) => {
|
|
139
|
-
* const model = ReleaseVersion.instance(data.id)
|
|
140
|
-
* .options({
|
|
141
|
-
* rawId: data.rawId, // Store backend ID for server communication
|
|
142
|
-
* version: data.version,
|
|
143
|
-
* // ... other options
|
|
144
|
-
* })
|
|
145
|
-
* .build();
|
|
146
|
-
* // Recursively sync nested containers
|
|
147
|
-
* syncCandidates(model, data.candidates || []);
|
|
148
|
-
* return model;
|
|
149
|
-
* },
|
|
150
|
-
* onUpdateItem: (data, existingVersion) => {
|
|
151
|
-
* existingVersion.updateModel({
|
|
152
|
-
* rawId: data.rawId || existingVersion.rawId,
|
|
153
|
-
* version: data.version,
|
|
154
|
-
* // ... other updates
|
|
155
|
-
* });
|
|
156
|
-
* // Recursively sync nested containers
|
|
157
|
-
* syncCandidates(existingVersion, data.candidates || []);
|
|
158
|
-
* return null; // Don't add, just updated in place
|
|
159
|
-
* },
|
|
160
|
-
* onRemoveItem: (id) => id
|
|
161
|
-
* })(versionsData);
|
|
162
|
-
* ```
|
|
163
|
-
*
|
|
164
|
-
* @example Nested container synchronization
|
|
165
|
-
* ```typescript
|
|
166
|
-
* // Parent level
|
|
167
|
-
* syncTemplates(containerModel, templatesData);
|
|
168
|
-
*
|
|
169
|
-
* // Within onAddItem and onUpdateItem, sync children
|
|
170
|
-
* function syncTemplates(container, templates) {
|
|
171
|
-
* resolveContainerDeltas({
|
|
172
|
-
* container: container.container,
|
|
173
|
-
* idMapper: (template) => ({
|
|
174
|
-
* ...template,
|
|
175
|
-
* rawId: template.id,
|
|
176
|
-
* id: ReleaseIdFactory.template(template.id)
|
|
177
|
-
* }),
|
|
178
|
-
* onAddItem: (template) => {
|
|
179
|
-
* const model = createTemplateModel(template);
|
|
180
|
-
* syncQueues(model, template.queues); // Nested sync
|
|
181
|
-
* syncVersions(model, template.versions); // Nested sync
|
|
182
|
-
* return model;
|
|
183
|
-
* },
|
|
184
|
-
* onUpdateItem: (template, existing) => {
|
|
185
|
-
* existing.updateModel(template);
|
|
186
|
-
* syncQueues(existing, template.queues); // Nested sync
|
|
187
|
-
* syncVersions(existing, template.versions); // Nested sync
|
|
188
|
-
* return null;
|
|
189
|
-
* }
|
|
190
|
-
* })(templates);
|
|
191
|
-
* }
|
|
192
|
-
* ```
|
|
193
84
|
* @kosApiLevel 2
|
|
194
85
|
*/
|
|
195
86
|
export declare const resolveContainerDeltas: <T extends IKosModelContainer<any>, D extends Identifiable, M extends Identifiable = D>({ container, onAddItem, onUpdateItem, onRemoveItem, idMapper, }: ResolveParams<T, D, M>) => (entities: D[]) => void;
|
|
196
87
|
/**
|
|
197
88
|
* Creates a function that synchronizes a container model's list with new entities.
|
|
198
|
-
*
|
|
89
|
+
* Unlike {@link resolveContainerDeltas} it does not modify the container: it calls
|
|
90
|
+
* `onRemoveItem` for each id that disappeared and `onAddItem` for every incoming entity.
|
|
199
91
|
*
|
|
200
92
|
* @template T - Container model type implementing IKosContainerModel
|
|
201
93
|
* @template D - Input entity type with an id property
|
|
@@ -204,14 +96,6 @@ export declare const resolveContainerDeltas: <T extends IKosModelContainer<any>,
|
|
|
204
96
|
* @returns A function that accepts entities and synchronizes by invoking callbacks
|
|
205
97
|
*
|
|
206
98
|
* @kosService core.container-utils
|
|
207
|
-
*
|
|
208
|
-
* @example
|
|
209
|
-
* const syncLayers = resolveListDeltas({
|
|
210
|
-
* container: layerContainer,
|
|
211
|
-
* onAddItem: (layer) => addLayer(layer),
|
|
212
|
-
* onRemoveItem: (id) => removeLayer(id)
|
|
213
|
-
* });
|
|
214
|
-
* syncLayers(newLayerList);
|
|
215
99
|
* @kosApiLevel 2
|
|
216
100
|
*/
|
|
217
101
|
export declare const resolveListDeltas: <T extends IKosContainerModel<any, any>, D extends Identifiable, M extends Identifiable = D>({ container, onAddItem, onRemoveItem, idMapper, }: ResolveParams<T, D, M>) => (entities: D[]) => void;
|
|
@@ -232,8 +116,9 @@ interface ResolveItemsParams<T extends Identifiable, D extends Identifiable, M e
|
|
|
232
116
|
idMapper?: IdMapper<D, M>;
|
|
233
117
|
}
|
|
234
118
|
/**
|
|
235
|
-
* Creates a function that synchronizes a plain array of items with
|
|
236
|
-
*
|
|
119
|
+
* Creates a function that synchronizes a plain array of identifiable items with
|
|
120
|
+
* new entities. It calls `onRemoveItem` for each id that disappeared and
|
|
121
|
+
* `onAddItem` for every incoming entity.
|
|
237
122
|
*
|
|
238
123
|
* @template T - Current item type with an id property
|
|
239
124
|
* @template D - Input entity type with an id property
|
|
@@ -242,34 +127,16 @@ interface ResolveItemsParams<T extends Identifiable, D extends Identifiable, M e
|
|
|
242
127
|
* @returns A function that accepts entities and synchronizes the array
|
|
243
128
|
*
|
|
244
129
|
* @kosService core.container-utils
|
|
245
|
-
*
|
|
246
|
-
* @example
|
|
247
|
-
* const currentItems = [{ id: '1', name: 'Item 1' }];
|
|
248
|
-
* const syncItems = resolveItemListDeltas({
|
|
249
|
-
* items: currentItems,
|
|
250
|
-
* onAddItem: (item) => currentItems.push(item),
|
|
251
|
-
* onRemoveItem: (id) => {
|
|
252
|
-
* const index = currentItems.findIndex(i => i.id === id);
|
|
253
|
-
* if (index >= 0) currentItems.splice(index, 1);
|
|
254
|
-
* }
|
|
255
|
-
* });
|
|
256
|
-
* syncItems(newItems);
|
|
257
130
|
* @kosApiLevel 2
|
|
258
131
|
*/
|
|
259
132
|
export declare const resolveItemListDeltas: <T extends Identifiable, D extends Identifiable, M extends Identifiable = D>({ items, onAddItem, onRemoveItem, idMapper, }: ResolveItemsParams<T, D, M>) => (entities: D[]) => void;
|
|
260
133
|
/**
|
|
261
|
-
* Removes a prefix from an id
|
|
262
|
-
* Useful for normalizing ids that may have parent or namespace prefixes.
|
|
134
|
+
* Removes a leading prefix from an id when present.
|
|
263
135
|
*
|
|
264
136
|
* @param id - The id string to process
|
|
265
137
|
* @param prefix - The prefix to remove (defaults to "parent-")
|
|
266
138
|
* @returns The id with the prefix removed, or the original id if prefix not found
|
|
267
139
|
*
|
|
268
|
-
* @example
|
|
269
|
-
* processId("parent-123") // returns "123"
|
|
270
|
-
* processId("parent-abc", "parent-") // returns "abc"
|
|
271
|
-
* processId("child-456", "parent-") // returns "child-456"
|
|
272
|
-
*
|
|
273
140
|
* @kosService core.container-utils
|
|
274
141
|
* @kosApiLevel 2
|
|
275
142
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/container-utils.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"container-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/container-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ;AAqBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,QAAQ,CAClB,CAAC,SAAS,YAAY,GAAG,YAAY,EACrC,CAAC,SAAS,YAAY,GAAG,CAAC,IACxB,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;AAErB,KAAK,SAAS,GAAG,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;AAExE;;;;;GAKG;AACH,UAAU,aAAa,CACrB,CAAC,SAAS,SAAS,EACnB,CAAC,SAAS,YAAY,EACtB,CAAC,SAAS,YAAY,GAAG,CAAC;IAE1B,mCAAmC;IACnC,SAAS,EAAE,CAAC,CAAC;IACb,4DAA4D;IAC5D,SAAS,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,GAAG,CAAC;IAC9B,2EAA2E;IAC3E,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,GAAG,CAAC;IACnC,6DAA6D;IAC7D,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,KAAK,GAAG,CAAC;IACtD,gEAAgE;IAChE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3B;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,sBAAsB,GAE/B,CAAC,SAAS,k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imeOptions {
|
|
|
34
34
|
interface FormatDateTimeOptions extends FormatDateOptions, FormatTimeOptions {
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* Formats a date according to
|
|
37
|
+
* Formats a date with `Intl.DateTimeFormat` according to `dateStyle` and locale.
|
|
38
38
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* - `"short"` uses a custom format: `dd/mm/yyyy` (e.g., `31/12/2025`)
|
|
42
|
-
* - Other styles use built-in `Intl` formatting
|
|
43
|
-
*
|
|
44
|
-
* ### Example Output
|
|
45
|
-
* ```ts
|
|
46
|
-
* formatDate(new Date("2025-12-31"), { dateStyle: "short" }); // "31/12/2025"
|
|
47
|
-
* formatDate(new Date("2025-12-31"), { dateStyle: "medium" }); // "Dec 31, 2025"
|
|
48
|
-
* formatDate(new Date("2025-12-31"), { dateStyle: "long" }); // "December 31, 2025"
|
|
49
|
-
* formatDate(new Date("2025-12-31"), { dateStyle: "full" }); // "Wednesday, December 31, 2025"
|
|
50
|
-
* ```
|
|
39
|
+
* `"short"` uses a numeric year with two-digit month and day in the locale's
|
|
40
|
+
* order (`12/31/2025` in en-US); the other styles use the built-in `Intl` styles.
|
|
51
41
|
*
|
|
52
42
|
* @param date - The date object or timestamp to format.
|
|
53
43
|
* @param options - Options to customize formatting.
|
|
@@ -60,17 +50,9 @@ interface FormatDateTimeOptions extends FormatDateOptions, FormatTimeOptions {
|
|
|
60
50
|
*/
|
|
61
51
|
export declare const formatDate: (date?: Date | number, { dateStyle, locales }?: FormatDateOptions) => string;
|
|
62
52
|
/**
|
|
63
|
-
* Formats a time according to
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* ### Example Output
|
|
68
|
-
* ```ts
|
|
69
|
-
* formatTime(new Date("2025-12-31T23:59:59"), { timeStyle: "short" }); // "11:59 PM"
|
|
70
|
-
* formatTime(new Date("2025-12-31T23:59:59"), { timeStyle: "medium" }); // "11:59:59 PM"
|
|
71
|
-
* formatTime(new Date("2025-12-31T23:59:59"), { timeStyle: "long" }); // "11:59:59 PM EST"
|
|
72
|
-
* formatTime(new Date("2025-12-31T23:59:59"), { timeStyle: "full" }); // "11:59 PM Eastern Standard Time"
|
|
73
|
-
* ```
|
|
53
|
+
* Formats a time with `Intl.DateTimeFormat` according to `timeStyle` and
|
|
54
|
+
* locale. All styles use a 12-hour clock; `"medium"` and `"long"` add seconds,
|
|
55
|
+
* and `"long"` and `"full"` add the time zone name.
|
|
74
56
|
*
|
|
75
57
|
* @param date - The date object or timestamp to extract the time from.
|
|
76
58
|
* @param options - Options to customize time formatting.
|
|
@@ -83,40 +65,9 @@ export declare const formatDate: (date?: Date | number, { dateStyle, locales }?:
|
|
|
83
65
|
*/
|
|
84
66
|
export declare const formatTime: (date?: Date | number, { locales, timeStyle }?: FormatTimeOptions) => string;
|
|
85
67
|
/**
|
|
86
|
-
* Formats a date and
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* - `"short"` date is always `dd/mm/yyyy`
|
|
91
|
-
* - `"short"` time is always 12-hour format (e.g., `11:59 PM`)
|
|
92
|
-
* - Supports combining both formats into a single string
|
|
93
|
-
*
|
|
94
|
-
* ### Example Output
|
|
95
|
-
* ```ts
|
|
96
|
-
* formatDateTime(new Date("2025-12-31T23:59:59"), {
|
|
97
|
-
* dateStyle: "short",
|
|
98
|
-
* timeStyle: "short"
|
|
99
|
-
* }); // "31/12/2025, 11:59 PM"
|
|
100
|
-
*
|
|
101
|
-
* formatDateTime(new Date("2025-12-31T23:59:59"), {
|
|
102
|
-
* dateStyle: "medium",
|
|
103
|
-
* timeStyle: "medium"
|
|
104
|
-
* }); // "Dec 31, 2025, 11:59:59 PM"
|
|
105
|
-
*
|
|
106
|
-
* formatDateTime(new Date("2025-12-31T23:59:59"), {
|
|
107
|
-
* dateStyle: "long",
|
|
108
|
-
* timeStyle: "long"
|
|
109
|
-
* }); // "December 31, 2025, 11:59:59 PM EST"
|
|
110
|
-
*
|
|
111
|
-
* formatDateTime(new Date("2025-12-31T23:59:59"), {
|
|
112
|
-
* dateStyle: "full",
|
|
113
|
-
* timeStyle: "full"
|
|
114
|
-
* }); // "Wednesday, December 31, 2025, 11:59 PM Eastern Standard Time"
|
|
115
|
-
*
|
|
116
|
-
* formatDateTime(new Date("2025-12-31T23:59:59"), {
|
|
117
|
-
* timeStyle: "short"
|
|
118
|
-
* }); // "11:59 PM"
|
|
119
|
-
* ```
|
|
68
|
+
* Formats a date and time in one string with `Intl.DateTimeFormat`. It takes
|
|
69
|
+
* the same `dateStyle` and `timeStyle` names as {@link formatDate} and
|
|
70
|
+
* {@link formatTime}; both default to `"short"` (`12/31/2025, 11:59 PM` in en-US).
|
|
120
71
|
*
|
|
121
72
|
* @param date - The `Date` object or timestamp to format.
|
|
122
73
|
* @param options - Formatting options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/date-utils.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,UAWzC;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,KAAG,OACgB,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,KAAG,MAG1D,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,EAAE,OAAO,MAAM,SAOxD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,EAAE,OAAO,MAAM,SAItD,CAAC;AAIF,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC7B;AAED,UAAU,iBAAiB;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AM,UAAU,GACrB,OAAO,IAAI,GAAG,MAAM,EACpB,yBAAmD,iBAGlD,WAIF,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,cAAc,GACzB,OAAO,IAAI,GAAG,MAAM,EACpB,qCAIG,qBAIF,WAOF,CAAC"}
|
package/core/util/debounce.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Debounces a function
|
|
3
|
-
* has passed since the last invocation.
|
|
2
|
+
* Debounces a function so it runs once the timeout has passed since the last call.
|
|
4
3
|
*
|
|
5
4
|
* @param context - The context (this value) to be used when calling the debounced function.
|
|
6
5
|
* @param func - The function to debounce.
|
|
@@ -8,12 +7,6 @@
|
|
|
8
7
|
* Defaults to 300 milliseconds.
|
|
9
8
|
* @returns A debounced version of the provided function.
|
|
10
9
|
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```typescript
|
|
13
|
-
* const debouncedFn = debounce(this, myFunction, 500);
|
|
14
|
-
* debouncedFn(arg1, arg2);
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
10
|
* @kosService core.utils
|
|
18
11
|
* @kosApiLevel 2
|
|
19
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/debounce.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/debounce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,iBAAS,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,SAAM,IAQnD,GAAG,MAAM,GAAG,UAarB;AAED,eAAe,QAAQ,CAAC"}
|
package/core/util/kos-fetch.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface KosServiceResponse<T> {
|
|
|
19
19
|
*/
|
|
20
20
|
declare let BASE_URL: string;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Fetch-like function that sends requests over the KOS transport.
|
|
23
23
|
*
|
|
24
24
|
* @kosService core.fetch
|
|
25
25
|
* @kosApiLevel 2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-fetch.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/kos-fetch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAoBrE;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"kos-fetch.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/kos-fetch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAoBrE;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;CAChB;AA0XD;;;;;GAKG;AACH,QAAA,IAAI,QAAQ,QAAS,CAAC;AACtB;;;;;GAKG;AACH,QAAA,IAAI,QAAQ,QA9OL,MAAM,YACD,eAAe,KACxB,OAAO,CAAC,QAAQ,CA4OM,CAAC;AAW1B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -160,34 +160,33 @@ export declare const isKosModelReady: (model: IKosDataModel) => boolean;
|
|
|
160
160
|
/**
|
|
161
161
|
* An observable, read-only view of a model's activation lifecycle.
|
|
162
162
|
*
|
|
163
|
-
* Models that fetch lazily do so in `activate()`, so activation state
|
|
164
|
-
* `loaded`, which tracks
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
* {@link IKosModel}.
|
|
163
|
+
* Models that fetch lazily do so in `activate()`, so activation state (rather
|
|
164
|
+
* than `loaded`, which tracks `load()`) tells a consumer whether that fetch has
|
|
165
|
+
* settled and whether it succeeded. A view can react to it without depending
|
|
166
|
+
* on the whole {@link IKosModel}.
|
|
168
167
|
*/
|
|
169
168
|
export interface KosModelActivationState {
|
|
170
169
|
/** The model's current activation state. */
|
|
171
170
|
readonly activeStatus: KosModelState;
|
|
172
|
-
/** Activation is in flight
|
|
171
|
+
/** Activation is in flight, so there is nothing conclusive to render yet. */
|
|
173
172
|
readonly isActivating: boolean;
|
|
174
173
|
/** Activation completed; the model's activate() work is done. */
|
|
175
174
|
readonly isActive: boolean;
|
|
176
|
-
/** Activation threw
|
|
175
|
+
/** Activation threw, so the model's data is absent rather than empty. */
|
|
177
176
|
readonly isFailed: boolean;
|
|
178
177
|
}
|
|
179
178
|
/**
|
|
180
179
|
* Retrieves an observable view of a model's activation state.
|
|
181
180
|
*
|
|
182
|
-
* Every member is a getter
|
|
183
|
-
*
|
|
184
|
-
*
|
|
181
|
+
* Every member is a getter that reads the reactive model at access time. Read
|
|
182
|
+
* its properties inside a `kosComponent` to re-render as the model activates,
|
|
183
|
+
* succeeds or fails.
|
|
185
184
|
*
|
|
186
185
|
* @param model - The KOS data model to observe.
|
|
187
186
|
* @returns The activation view, or `undefined` when the model has no wrapper
|
|
188
187
|
* yet (not created, or already destroyed).
|
|
189
188
|
*
|
|
190
|
-
* @example
|
|
189
|
+
* @example
|
|
191
190
|
* ```tsx
|
|
192
191
|
* const activation = getKosModelActivationState(container);
|
|
193
192
|
* if (!activation || activation.isActivating) return <Blank />;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-model-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/kos-model-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjE,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CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,aAAa,EACzD,SAAS,MAAM,EACf,UAAU,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,KAC9B,SAAS,GAAG,SAWd,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GACpB,CAAC,SAAS,aAAa,EAAE,MAAM,MAAM,MACrC,OAAO,GAAG,KAAG,KAAK,IAAI,CAC4B,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,aAAa,YAMnD,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"kos-model-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/kos-model-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAkB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAAU,OAAO,aAAa,kBAGzD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,GAAU,WAAW,aAAa,kBAa5D,CAAC;AACF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,GAAU,OAAO,aAAa,kBAoBvD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,GAAU,SAAS,MAAM,gCAQpD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GAAU,CAAC,SAAS,aAAa,GAAG,aAAa,EACvE,SAAS,MAAM;WAQqB,CAAC;;EACtC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,aAAa,GAAG,aAAa,EACrE,SAAS,MAAM;WAOqB,CAAC;;CACtC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC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;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,0BAA0B,GACrC,OAAO,aAAa,GAAG,SAAS,KAC/B,uBAAuB,GAAG,SAuB5B,CAAC"}
|
|
@@ -1,34 +1,17 @@
|
|
|
1
1
|
import { IKosDataModel } from '../core/kosModel';
|
|
2
2
|
/**
|
|
3
|
-
* Creates a property key
|
|
3
|
+
* Creates a property key placeholder (`{PROP_<key>}`) for a data model field.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* a property key should be used to reference the data model key.
|
|
9
|
-
*
|
|
10
|
-
* For kos dependencies, propKeys can be used to resolve any dependency options that are derived from the data model.
|
|
11
|
-
*
|
|
12
|
-
* For topic handlers, the resolved topic can include propKey to allow for dynamic topic resolution based on the data model.
|
|
5
|
+
* Decorator options that depend on model data, such as a `@kosDependency` id
|
|
6
|
+
* or a `@kosTopicHandler` topic, use a property key; the framework replaces it
|
|
7
|
+
* with the model's current value for that field when it resolves the option.
|
|
13
8
|
*
|
|
14
9
|
* @param key - The key from a Kos data model.
|
|
15
10
|
* @returns A property key string enclosed in curly braces with a "PROP_" prefix.
|
|
16
11
|
*
|
|
17
12
|
* @example
|
|
18
|
-
* // Create a property key for a data model key "name"
|
|
19
|
-
* const propertyKey = createPropKey("name");
|
|
20
|
-
* // Result: "{PROP_name}"
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* // Create a property key for a data model key "id"
|
|
24
|
-
* const propertyKey = createPropKey("id");
|
|
25
|
-
* // Result: "{PROP_id}"
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* The propKey can be used as part of dependency or topic listener to allow for models to
|
|
29
|
-
* dynamically change the dependency or topic listener based on the data model.
|
|
30
13
|
* ```typescript
|
|
31
|
-
* @kosDependency({modelType: Ingredient.type, id:
|
|
14
|
+
* @kosDependency({ modelType: Ingredient.type, id: createPropKey("ingredientId") })
|
|
32
15
|
* ```
|
|
33
16
|
*
|
|
34
17
|
* @kosService core.kos-model
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-attribute-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/model-attribute-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD
|
|
1
|
+
{"version":3,"file":"model-attribute-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/model-attribute-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,aAAa,EAAE,KAAK,MAAM,CAAC,WAC1C,CAAC;AAE1B;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,MAAM,EAAE,KAAK,MAAM,CAAC,WACrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-type-guards.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/model-type-guards.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI;IAAE,MAAM,EAAE,MAAM,MAAM,CAAA;CACpC,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,aACd,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,GAAG,KACT,KAAK,IAAI,kBAAkB,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"model-type-guards.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/model-type-guards.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI;IAAE,MAAM,EAAE,MAAM,MAAM,CAAA;CACpC,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,aACd,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,GAAG,KACT,KAAK,IAAI,kBAAkB,CAAC,GAAG,CAIP,CAAC;AAE5B;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GACvB,WAAW,GAAG,KACb,aAAa,GAAG,aAAa,EAAE,GAAG,SAepC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/model-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EACL,mBAAmB,EAEnB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAiB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAItE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACtE,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,SAAS,EAChB,YAAY,mBAAmB,CAAC,GAAG,CAAC;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"model-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-ui-sdk/src/core/util/model-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EACL,mBAAmB,EAEnB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAiB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAItE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACtE,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,SAAS,EAChB,YAAY,mBAAmB,CAAC,GAAG,CAAC;;;;;;;;;;;CAwLrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,GACrC,OAAO,SAAS,EAChB,YAA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