@kosdev-code/kos-ui-sdk 2.1.21 → 2.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/core/decorators/kos-parent.d.ts.map +1 -1
- package/core/core/decorators/kosDependency.d.ts +2 -1
- package/core/core/decorators/kosDependency.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts +7 -0
- package/core/core/decorators/kosModel.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/model-instantiator.d.ts.map +1 -1
- package/core/types/kos-dependency.d.ts +26 -0
- package/core/types/kos-dependency.d.ts.map +1 -1
- package/core/util/model-error-utils.d.ts +61 -0
- package/core/util/model-error-utils.d.ts.map +1 -0
- package/core/util/model-utils.d.ts +6 -1
- package/core/util/model-utils.d.ts.map +1 -1
- package/index.cjs +94 -71
- package/index.cjs.map +1 -1
- package/index.js +3417 -3259
- package/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-parent.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-parent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,UAAU,iBAAiB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa;IACjE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"kos-parent.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kos-parent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,UAAU,iBAAiB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa;IACjE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAaD,eAAO,MAAM,cAAc,sCACW,cAAc,mBACpC,kBAAkB,CAAC,CAAC,KAAG,GAOpC,CAAC"}
|
|
@@ -9,8 +9,9 @@ export * as KosDependencyTypes from '../../types/kos-dependency';
|
|
|
9
9
|
* @param params.id The id of the model to be injected.
|
|
10
10
|
* @param params.options The options to be passed to the model constructor.
|
|
11
11
|
* @param params.lifecycle The lifecycle at which the dependency should be injected.
|
|
12
|
+
* @param params.resolutionPolicy The policy for handling dependency resolution failures.
|
|
12
13
|
*
|
|
13
14
|
* @category KOS Model Decorator
|
|
14
15
|
* */
|
|
15
|
-
export declare const kosDependency: <Options = unknown>({ modelType, id, options, lifecycle, }: KosDependencyParams<Options>) => (target: {} | any, name: PropertyKey) => any;
|
|
16
|
+
export declare const kosDependency: <Options = unknown>({ modelType, id, options, lifecycle, resolutionPolicy, }: KosDependencyParams<Options>) => (target: {} | any, name: PropertyKey) => any;
|
|
16
17
|
//# sourceMappingURL=kosDependency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kosDependency.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kosDependency.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AAEjE
|
|
1
|
+
{"version":3,"file":"kosDependency.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kosDependency.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AAEjE;;;;;;;;;;;KAWK;AACL,eAAO,MAAM,aAAa,gFASrB,oBAAoB,OAAO,CAAC,cACtB,EAAE,GAAG,GAAG,QAAQ,WAAW,KAAG,GAUtC,CAAC"}
|
|
@@ -4,6 +4,13 @@ interface KosModelConfig {
|
|
|
4
4
|
modelTypeId: string;
|
|
5
5
|
singleton?: boolean;
|
|
6
6
|
autoRegister?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Indicates whether this model requires options to be provided during instantiation.
|
|
9
|
+
* When true, the framework will throw an error if an empty or undefined options object
|
|
10
|
+
* is provided when creating a dependency with DependencyResolutionPolicy.CREATE.
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
optionsRequired?: boolean;
|
|
7
14
|
}
|
|
8
15
|
/**
|
|
9
16
|
* Decorator for defining a Kos Data Model class.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kosModel.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kosModel.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"kosModel.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/kosModel.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAklB5C,UAAU,cAAc;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,CAAC,SAAS,aAAa,EACvB,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtC,MAAM,EAAE,MAAM,GAAG,cAAc,GAAG,cAAc,CA0DjD"}
|
|
@@ -21,4 +21,5 @@ export declare const StateMachineSetup: unique symbol;
|
|
|
21
21
|
export declare const StateEntryHandlers: unique symbol;
|
|
22
22
|
export declare const StateExitHandlers: unique symbol;
|
|
23
23
|
export declare const StateActionHandlers: unique symbol;
|
|
24
|
+
export declare const OptionsRequired: unique symbol;
|
|
24
25
|
//# sourceMappingURL=propKeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propKeys.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/propKeys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAC3D,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,SAAS,eAAsB,CAAC;AAC7C,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,cAAc,eAA2B,CAAC;AACvD,eAAO,MAAM,YAAY,eAAyB,CAAC;AACnD,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,4BAA4B,eAExC,CAAC;AACF,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AACjE,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,mBAAmB,eAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"propKeys.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/core/core/decorators/propKeys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAC3D,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,SAAS,eAAsB,CAAC;AAC7C,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,eAAO,MAAM,cAAc,eAA2B,CAAC;AACvD,eAAO,MAAM,YAAY,eAAyB,CAAC;AACnD,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,eAAO,MAAM,4BAA4B,eAExC,CAAC;AACF,eAAO,MAAM,aAAa,eAA0B,CAAC;AACrD,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AACjE,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAC/D,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAC7D,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AACjE,eAAO,MAAM,eAAe,eAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-instantiator.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model-instantiator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"model-instantiator.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/core/model-instantiator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAGpD,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAU5C;;;GAGG;AACH,qBAAa,oBAAoB;IAI7B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,KAAK;IAJf,OAAO,CAAC,qBAAqB,CAA2B;gBAG9C,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,oBAAoB;IASrC,mBAAmB,CAAC,OAAO,SAAS,aAAa,EAC/C,MAAM,EAAE,MAAM,EACd,EAAE,CAAC,EAAE,MAAM,EACX,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAChC;QAAE,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE;IA4C/C;;;;;;;OAOG;IACH,qBAAqB,CACnB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,SAAS,CAAC,EAAE,mBAAmB;IAKjC;;;OAGG;IACH,OAAO,CAAC,sBAAsB;CAM/B"}
|
|
@@ -5,6 +5,25 @@ export declare enum DependencyLifecycle {
|
|
|
5
5
|
ACTIVATE = "activate",
|
|
6
6
|
ONLINE = "online"
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Policy for handling dependency resolution failures.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum DependencyResolutionPolicy {
|
|
12
|
+
/**
|
|
13
|
+
* CREATE (default) - Attempt to create a new instance of the model if it doesn't exist.
|
|
14
|
+
* If the model expects options and none are provided, it will fail with an exception.
|
|
15
|
+
*/
|
|
16
|
+
CREATE = "create",
|
|
17
|
+
/**
|
|
18
|
+
* CONTINUE - Do not create a new instance if the dependency cannot be resolved.
|
|
19
|
+
* The property will be set to undefined/null. Log the failure but allow execution to continue.
|
|
20
|
+
*/
|
|
21
|
+
CONTINUE = "continue",
|
|
22
|
+
/**
|
|
23
|
+
* FAIL - Throw an exception and log detailed failure information if the dependency cannot be resolved.
|
|
24
|
+
*/
|
|
25
|
+
FAIL = "fail"
|
|
26
|
+
}
|
|
8
27
|
/**
|
|
9
28
|
* The parameters for the kosDependency decorator.
|
|
10
29
|
* */
|
|
@@ -17,5 +36,12 @@ export interface KosDependencyParams<Options = unknown> {
|
|
|
17
36
|
options?: Options;
|
|
18
37
|
/** The lifecycle at which the dependency should be injected. */
|
|
19
38
|
lifecycle?: DependencyLifecycle;
|
|
39
|
+
/**
|
|
40
|
+
* Policy for handling dependency resolution failures.
|
|
41
|
+
* - CREATE (default): Attempts to create model instance, fails if options are missing
|
|
42
|
+
* - CONTINUE: Logs error but continues with undefined dependency
|
|
43
|
+
* - FAIL: Throws exception with detailed error logging
|
|
44
|
+
*/
|
|
45
|
+
resolutionPolicy?: DependencyResolutionPolicy;
|
|
20
46
|
}
|
|
21
47
|
//# sourceMappingURL=kos-dependency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kos-dependency.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/types/kos-dependency.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED;;KAEK;AACL,MAAM,WAAW,mBAAmB,CAAC,OAAO,GAAG,OAAO;IACpD,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,SAAS,CAAC,EAAE,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"kos-dependency.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/types/kos-dependency.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,oBAAY,0BAA0B;IACpC;;;OAGG;IACH,MAAM,WAAW;IACjB;;;OAGG;IACH,QAAQ,aAAa;IACrB;;OAEG;IACH,IAAI,SAAS;CACd;AAED;;KAEK;AACL,MAAM,WAAW,mBAAmB,CAAC,OAAO,GAAG,OAAO;IACpD,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;CAC/C"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { DependencyLifecycle } from '../types/kos-dependency';
|
|
2
|
+
import { IKosDataModel, IKosModel } from '../core/kosModel';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Enhanced error class that preserves context through the model lifecycle.
|
|
6
|
+
*/
|
|
7
|
+
export declare class KosModelError extends Error {
|
|
8
|
+
readonly context: ModelErrorContext;
|
|
9
|
+
readonly originalCause?: Error;
|
|
10
|
+
constructor(message: string, context: ModelErrorContext, cause?: Error);
|
|
11
|
+
/**
|
|
12
|
+
* Format error with full context for logging.
|
|
13
|
+
*/
|
|
14
|
+
toDetailedString(): string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Context information for model errors.
|
|
18
|
+
*/
|
|
19
|
+
export interface ModelErrorContext {
|
|
20
|
+
/** Type of model involved */
|
|
21
|
+
modelType: string;
|
|
22
|
+
/** ID of model instance */
|
|
23
|
+
modelId?: string;
|
|
24
|
+
/** Parent model context if applicable */
|
|
25
|
+
parentModel?: {
|
|
26
|
+
type: string;
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
29
|
+
/** Lifecycle phase where error occurred */
|
|
30
|
+
lifecycle?: DependencyLifecycle | string;
|
|
31
|
+
/** Operation being performed */
|
|
32
|
+
operation?: string;
|
|
33
|
+
/** Options provided to the model */
|
|
34
|
+
options?: Record<string, any>;
|
|
35
|
+
/** Additional context-specific data */
|
|
36
|
+
metadata?: Record<string, any>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Wraps an error with model context, preserving the original error as cause.
|
|
40
|
+
*/
|
|
41
|
+
export declare function enrichError(error: Error | unknown, context: ModelErrorContext): KosModelError;
|
|
42
|
+
/**
|
|
43
|
+
* Safely executes an async operation with automatic error enrichment.
|
|
44
|
+
*/
|
|
45
|
+
export declare function executeWithContext<T>(operation: () => Promise<T>, context: ModelErrorContext): Promise<T>;
|
|
46
|
+
/**
|
|
47
|
+
* Safely executes a sync operation with automatic error enrichment.
|
|
48
|
+
*/
|
|
49
|
+
export declare function executeSyncWithContext<T>(operation: () => T, context: ModelErrorContext): T;
|
|
50
|
+
/**
|
|
51
|
+
* Creates context for a model from its data.
|
|
52
|
+
*/
|
|
53
|
+
export declare function createModelContext(model: IKosModel | IKosDataModel, operation?: string): ModelErrorContext;
|
|
54
|
+
/**
|
|
55
|
+
* Logs a collection of errors with summary and details.
|
|
56
|
+
*/
|
|
57
|
+
export declare function logErrorCollection(errors: Array<{
|
|
58
|
+
error: Error;
|
|
59
|
+
context: ModelErrorContext;
|
|
60
|
+
}>, summary: string): void;
|
|
61
|
+
//# sourceMappingURL=model-error-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-error-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/model-error-utils.ts"],"names":[],"mapp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AsB,CAAC,CAAC,EACtC,SAAS,EAAE,MAAM,CAAC,EAClB,OAAO,EAAE,iBAAiB,GACzB,CAAC,CAQH;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,SAAS,GAAG,aAAa,EAChC,SAAS,CAAC,EAAE,MAAM,GACjB,iBAAiB,CAkBnB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,iBAAiB,CAAA;CAAE,CAAC,EAC3D,OAAO,EAAE,MAAM,GACd,IAAI,CAaN"}
|
|
@@ -29,10 +29,15 @@ export declare const TransitionMap: {
|
|
|
29
29
|
init: (model: IKosModel) => Promise<void>;
|
|
30
30
|
};
|
|
31
31
|
export declare const createModelDependency: (model: IKosModel, dependency: KosDependencyParams<any>) => {
|
|
32
|
+
dependentModel: null;
|
|
33
|
+
dataModelId: string;
|
|
34
|
+
success: boolean;
|
|
35
|
+
} | {
|
|
32
36
|
dependentModel: import('../core/types/kos-model-manager-types').IKosCreateInstanceResponse<IKosDataModel>;
|
|
33
37
|
dataModelId: string;
|
|
38
|
+
success: boolean;
|
|
34
39
|
};
|
|
35
|
-
export declare const getDependenciesByLifecycle: (model: IKosModel, lifecycle?: DependencyLifecycle) => Promise<void>[];
|
|
40
|
+
export declare const getDependenciesByLifecycle: (model: IKosModel, lifecycle?: DependencyLifecycle) => (Promise<void> | null)[];
|
|
36
41
|
export declare const executeListLifecycle: (sourceModel: IKosModel, models: (IKosModel | undefined)[], target: Transitions, sourceLifecycle: DependencyLifecycle) => Promise<void>;
|
|
37
42
|
export declare const executeChildrenModelLifecycle: (model: IKosModel, target: Transitions, sourceLifecycle: DependencyLifecycle) => Promise<void>;
|
|
38
43
|
export declare const executeDependentModelLifecycle: (model: IKosModel, lifecycle: DependencyLifecycle) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/model-utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EACL,mBAAmB,
|
|
1
|
+
{"version":3,"file":"model-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/model-utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EACL,mBAAmB,EAEnB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAIjC,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;AASD,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AA8BvE,eAAO,MAAM,kBAAkB,UAAW,SAAS,KAAG,QAAQ,IAAI,CACM,CAAC;AAEzE,eAAO,MAAM,iBAAiB,UAAW,SAAS,KAAG,QAAQ,IAAI,CAC9C,CAAC;AAEpB,eAAO,MAAM,gBAAgB,UAAW,SAAS,KAAG,QAAQ,IAAI,CACG,CAAC;AAEpE,eAAO,MAAM,kBAAkB,UAAW,SAAS,KAAG,QAAQ,IAAI,CACK,CAAC;AAExE,eAAO,MAAM,gBAAgB,UAAW,SAAS,KAAG,QAAQ,IAAI,CACc,CAAC;AAE/E,oBAAY,WAAW;IACrB,MA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