@o3r/core 13.2.0-prerelease.9 → 14.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builders/app-version/index.js.map +1 -0
- package/builders/app-version/schema.js.map +1 -0
- package/builders/lib-build/index.js.map +1 -0
- package/builders/lib-build/schema.js.map +1 -0
- package/builders/multi-watcher/index.js.map +1 -0
- package/builders/multi-watcher/schema.js.map +1 -0
- package/builders/ngc/index.js.map +1 -0
- package/builders/ngc/schema.js.map +1 -0
- package/builders/pattern-replacement/index.js.map +1 -0
- package/builders/pattern-replacement/schema.js.map +1 -0
- package/builders/run-script/index.js.map +1 -0
- package/builders/run-script/schema.js.map +1 -0
- package/builders/utils.js.map +1 -0
- package/core/application/build-properties.d.ts +50 -0
- package/core/application/build-properties.d.ts.map +1 -0
- package/core/application/build-properties.js +17 -0
- package/core/application/build-properties.js.map +1 -0
- package/core/application/dgp.interfaces.d.ts +35 -0
- package/core/application/dgp.interfaces.d.ts.map +1 -0
- package/core/application/dgp.interfaces.js +2 -0
- package/core/application/dgp.interfaces.js.map +1 -0
- package/core/application/index.d.ts +4 -0
- package/core/application/index.d.ts.map +1 -0
- package/core/application/index.js +4 -0
- package/core/application/index.js.map +1 -0
- package/core/application/runtime.d.ts +14 -0
- package/core/application/runtime.d.ts.map +1 -0
- package/core/application/runtime.js +2 -0
- package/core/application/runtime.js.map +1 -0
- package/core/common/index.d.ts +3 -0
- package/core/common/index.d.ts.map +1 -0
- package/core/common/index.js +3 -0
- package/core/common/index.js.map +1 -0
- package/core/common/interface-utils.d.ts +7 -0
- package/core/common/interface-utils.d.ts.map +1 -0
- package/core/common/interface-utils.js +2 -0
- package/core/common/interface-utils.js.map +1 -0
- package/core/common/label-value.d.ts +8 -0
- package/core/common/label-value.d.ts.map +1 -0
- package/core/common/label-value.js +2 -0
- package/core/common/label-value.js.map +1 -0
- package/core/devkit/devtools.interface.d.ts +34 -0
- package/core/devkit/devtools.interface.d.ts.map +1 -0
- package/core/devkit/devtools.interface.js +2 -0
- package/core/devkit/devtools.interface.js.map +1 -0
- package/core/devkit/index.d.ts +2 -0
- package/core/devkit/index.d.ts.map +1 -0
- package/core/devkit/index.js +2 -0
- package/core/devkit/index.js.map +1 -0
- package/core/index.d.ts +7 -0
- package/core/index.d.ts.map +1 -0
- package/core/index.js +7 -0
- package/core/index.js.map +1 -0
- package/core/interfaces/configuration.d.ts +90 -0
- package/core/interfaces/configuration.d.ts.map +1 -0
- package/core/interfaces/configuration.js +2 -0
- package/core/interfaces/configuration.js.map +1 -0
- package/core/interfaces/context.d.ts +57 -0
- package/core/interfaces/context.d.ts.map +1 -0
- package/core/interfaces/context.js +2 -0
- package/core/interfaces/context.js.map +1 -0
- package/core/interfaces/index.d.ts +5 -0
- package/core/interfaces/index.d.ts.map +1 -0
- package/core/interfaces/index.js +5 -0
- package/core/interfaces/index.js.map +1 -0
- package/core/interfaces/item-identifier.d.ts +14 -0
- package/core/interfaces/item-identifier.d.ts.map +1 -0
- package/core/interfaces/item-identifier.js +2 -0
- package/core/interfaces/item-identifier.js.map +1 -0
- package/core/interfaces/translation.d.ts +7 -0
- package/core/interfaces/translation.d.ts.map +1 -0
- package/core/interfaces/translation.js +2 -0
- package/core/interfaces/translation.js.map +1 -0
- package/core/metadata/component.decorator.d.ts +32 -0
- package/core/metadata/component.decorator.d.ts.map +1 -0
- package/core/metadata/component.decorator.js +18 -0
- package/core/metadata/component.decorator.js.map +1 -0
- package/core/metadata/component.identifier.d.ts +7 -0
- package/core/metadata/component.identifier.d.ts.map +1 -0
- package/core/metadata/component.identifier.js +9 -0
- package/core/metadata/component.identifier.js.map +1 -0
- package/core/metadata/index.d.ts +4 -0
- package/core/metadata/index.d.ts.map +1 -0
- package/core/metadata/index.js +4 -0
- package/core/metadata/index.js.map +1 -0
- package/core/metadata/metadata.interface.d.ts +10 -0
- package/core/metadata/metadata.interface.d.ts.map +1 -0
- package/core/metadata/metadata.interface.js +2 -0
- package/core/metadata/metadata.interface.js.map +1 -0
- package/core/rules-engine/index.d.ts +2 -0
- package/core/rules-engine/index.d.ts.map +1 -0
- package/core/rules-engine/index.js +2 -0
- package/core/rules-engine/index.js.map +1 -0
- package/core/rules-engine/rules-engine.interfaces.d.ts +24 -0
- package/core/rules-engine/rules-engine.interfaces.d.ts.map +1 -0
- package/core/rules-engine/rules-engine.interfaces.js +2 -0
- package/core/rules-engine/rules-engine.interfaces.js.map +1 -0
- package/log/index.d.ts +2 -0
- package/log/index.d.ts.map +1 -0
- package/log/index.js +2 -0
- package/log/index.js.map +1 -0
- package/log/logger.d.ts +36 -0
- package/log/logger.d.ts.map +1 -0
- package/log/logger.js +2 -0
- package/log/logger.js.map +1 -0
- package/messages/common-message.interface.d.ts +17 -0
- package/messages/common-message.interface.d.ts.map +1 -0
- package/messages/common-message.interface.js +2 -0
- package/messages/common-message.interface.js.map +1 -0
- package/messages/index.d.ts +4 -0
- package/messages/index.d.ts.map +1 -0
- package/messages/index.js +4 -0
- package/messages/index.js.map +1 -0
- package/messages/message.helpers.d.ts +24 -0
- package/messages/message.helpers.d.ts.map +1 -0
- package/messages/message.helpers.js +54 -0
- package/messages/message.helpers.js.map +1 -0
- package/messages/message.interfaces.d.ts +26 -0
- package/messages/message.interfaces.d.ts.map +1 -0
- package/messages/message.interfaces.js +5 -0
- package/messages/message.interfaces.js.map +1 -0
- package/migration.json +10 -0
- package/package.json +6 -6
- package/public_api.d.ts +6 -0
- package/public_api.d.ts.map +1 -0
- package/public_api.js +6 -0
- package/public_api.js.map +1 -0
- package/schematics/add-modules/index.js.map +1 -0
- package/schematics/add-modules/schema.js.map +1 -0
- package/schematics/component/container/index.js.map +1 -0
- package/schematics/component/container/schema.js.map +1 -0
- package/schematics/component/index.js.map +1 -0
- package/schematics/component/presenter/index.js.map +1 -0
- package/schematics/component/presenter/schema.js.map +1 -0
- package/schematics/component/schema.js.map +1 -0
- package/schematics/component/structures.types.js.map +1 -0
- package/schematics/context-to-component/index.js.map +1 -0
- package/schematics/context-to-component/schema.js.map +1 -0
- package/schematics/convert-component/index.js.map +1 -0
- package/schematics/convert-component/schema.d.ts +1 -1
- package/schematics/convert-component/schema.d.ts.map +1 -1
- package/schematics/convert-component/schema.js.map +1 -0
- package/schematics/ng-add/component-decorator/index.js.map +1 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/project-setup/index.js.map +1 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.js.map +1 -0
- package/schematics/ng-add/updates-for-v8/generators/update-generators-names.js.map +1 -0
- package/schematics/ng-add/updates-for-v8/replaced-packages.js.map +1 -0
- package/schematics/ng-add-create/index.js.map +1 -0
- package/schematics/ng-add-create/schema.js.map +1 -0
- package/schematics/ng-update/index.d.ts +8 -0
- package/schematics/ng-update/index.d.ts.map +1 -1
- package/schematics/ng-update/index.js +13 -1
- package/schematics/ng-update/index.js.map +1 -0
- package/schematics/ng-update/v10.0/configuration.js.map +1 -0
- package/schematics/ng-update/v8.2/import-map.js.map +1 -0
- package/schematics/page/index.js.map +1 -0
- package/schematics/page/schema.js.map +1 -0
- package/schematics/renovate/index.js.map +1 -0
- package/schematics/renovate/schema.js.map +1 -0
- package/schematics/rule-factories/additional-modules/index.js.map +1 -0
- package/schematics/rule-factories/component/analytics.js.map +1 -0
- package/schematics/rule-factories/component/common.js.map +1 -0
- package/schematics/rule-factories/component/configuration.js.map +1 -0
- package/schematics/rule-factories/component/context.js.map +1 -0
- package/schematics/rule-factories/component/design-token.js.map +1 -0
- package/schematics/rule-factories/component/fixture.js.map +1 -0
- package/schematics/rule-factories/component/localization.js.map +1 -0
- package/schematics/rule-factories/component/rules-engine.js.map +1 -0
- package/schematics/rule-factories/component/theming.js.map +1 -0
- package/schematics/rule-factories/customization-environment/index.js.map +1 -0
- package/schematics/rule-factories/index.js.map +1 -0
- package/schematics/rule-factories/o3r-basic-updates/index.js.map +1 -0
- package/schematics/rule-factories/otter-environment/index.js.map +1 -0
- package/schematics/rule-factories/store/index.js.map +1 -0
- package/schematics/rule-factories/update-package-json/index.js.map +1 -0
- package/schematics/schematics-update/index.js.map +1 -0
- package/schematics/schematics-update/schema.js.map +1 -0
- package/schematics/service/index.js.map +1 -0
- package/schematics/service/schema.js.map +1 -0
- package/schematics/shared/presets/all.preset.js.map +1 -0
- package/schematics/shared/presets/basic.preset.js.map +1 -0
- package/schematics/shared/presets/cms.preset.js.map +1 -0
- package/schematics/shared/presets/external.preset.js.map +1 -0
- package/schematics/shared/presets/helpers.js.map +1 -0
- package/schematics/shared/presets/index.js.map +1 -0
- package/schematics/shared/presets/preset.interface.js.map +1 -0
- package/schematics/shared/presets/recommended.preset.js.map +1 -0
- package/schematics/show-modules/index.js.map +1 -0
- package/schematics/show-modules/schema.js.map +1 -0
- package/schematics/store/common/helpers.js.map +1 -0
- package/schematics/store/common/schema.js.map +1 -0
- package/schematics/store/entity-async/index.js.map +1 -0
- package/schematics/store/entity-async/schema.js.map +1 -0
- package/schematics/store/entity-sync/index.js.map +1 -0
- package/schematics/store/entity-sync/schema.js.map +1 -0
- package/schematics/store/index.js.map +1 -0
- package/schematics/store/schema.js.map +1 -0
- package/schematics/store/simple-async/index.js.map +1 -0
- package/schematics/store/simple-async/schema.js.map +1 -0
- package/schematics/store/simple-sync/index.js.map +1 -0
- package/schematics/store/simple-sync/schema.js.map +1 -0
- package/schematics/store-action/index.js.map +1 -0
- package/schematics/store-action/schema.js.map +1 -0
- package/store/async/async-entity.adapter.d.ts +62 -0
- package/store/async/async-entity.adapter.d.ts.map +1 -0
- package/store/async/async-entity.adapter.js +49 -0
- package/store/async/async-entity.adapter.js.map +1 -0
- package/store/async/async.adapter.d.ts +91 -0
- package/store/async/async.adapter.d.ts.map +1 -0
- package/store/async/async.adapter.js +94 -0
- package/store/async/async.adapter.js.map +1 -0
- package/store/async/async.helpers.d.ts +17 -0
- package/store/async/async.helpers.d.ts.map +1 -0
- package/store/async/async.helpers.js +25 -0
- package/store/async/async.helpers.js.map +1 -0
- package/store/async/async.interfaces.d.ts +91 -0
- package/store/async/async.interfaces.d.ts.map +1 -0
- package/store/async/async.interfaces.js +2 -0
- package/store/async/async.interfaces.js.map +1 -0
- package/store/async/async.operators.d.ts +22 -0
- package/store/async/async.operators.d.ts.map +1 -0
- package/store/async/async.operators.js +75 -0
- package/store/async/async.operators.js.map +1 -0
- package/store/async/async.props.d.ts +7 -0
- package/store/async/async.props.d.ts.map +1 -0
- package/store/async/async.props.js +10 -0
- package/store/async/async.props.js.map +1 -0
- package/store/async/async.serializer.d.ts +29 -0
- package/store/async/async.serializer.d.ts.map +1 -0
- package/store/async/async.serializer.js +34 -0
- package/store/async/async.serializer.js.map +1 -0
- package/store/async/index.d.ts +8 -0
- package/store/async/index.d.ts.map +1 -0
- package/store/async/index.js +8 -0
- package/store/async/index.js.map +1 -0
- package/store/index.d.ts +3 -0
- package/store/index.d.ts.map +1 -0
- package/store/index.js +3 -0
- package/store/index.js.map +1 -0
- package/store/types.d.ts +95 -0
- package/store/types.d.ts.map +1 -0
- package/store/types.js +11 -0
- package/store/types.js.map +1 -0
- package/utils/debug/debug.helper.d.ts +14 -0
- package/utils/debug/debug.helper.d.ts.map +1 -0
- package/utils/debug/debug.helper.js +19 -0
- package/utils/debug/debug.helper.js.map +1 -0
- package/utils/deep-fill/deep-fill.d.ts +37 -0
- package/utils/deep-fill/deep-fill.d.ts.map +1 -0
- package/utils/deep-fill/deep-fill.js +71 -0
- package/utils/deep-fill/deep-fill.js.map +1 -0
- package/utils/index.d.ts +4 -0
- package/utils/index.d.ts.map +1 -0
- package/utils/index.js +4 -0
- package/utils/index.js.map +1 -0
- package/utils/rendering/rendering.helpers.d.ts +10 -0
- package/utils/rendering/rendering.helpers.d.ts.map +1 -0
- package/utils/rendering/rendering.helpers.js +31 -0
- package/utils/rendering/rendering.helpers.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async.serializer.js","sourceRoot":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
export * from './async.helpers';
|
|
4
|
+
export * from './async.interfaces';
|
|
5
|
+
export * from './async.operators';
|
|
6
|
+
export * from './async.props';
|
|
7
|
+
export * from './async.serializer';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/async/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './async-entity.adapter';
|
|
2
|
+
export * from './async.adapter';
|
|
3
|
+
export * from './async.helpers';
|
|
4
|
+
export * from './async.interfaces';
|
|
5
|
+
export * from './async.operators';
|
|
6
|
+
export * from './async.props';
|
|
7
|
+
export * from './async.serializer';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/async/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC"}
|
package/store/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
|
package/store/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
|
package/store/types.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Object that define how to serialize a specific state
|
|
3
|
+
*/
|
|
4
|
+
export interface Serializer<T> {
|
|
5
|
+
serialize?: (obj: T) => any;
|
|
6
|
+
deserialize?: (data?: any) => T;
|
|
7
|
+
reviver?: (key: string, value: any) => any;
|
|
8
|
+
replacer?: (key: string, value: any) => any;
|
|
9
|
+
initialState?: T;
|
|
10
|
+
}
|
|
11
|
+
export declare class StateSerializer<T> implements Serializer<T> {
|
|
12
|
+
serialize?: (obj: T) => any;
|
|
13
|
+
deserialize?: (data?: any) => T;
|
|
14
|
+
replacer?: (key: string, value: any) => any;
|
|
15
|
+
initialState?: T;
|
|
16
|
+
constructor(serializer: Serializer<T>);
|
|
17
|
+
reviver: (_: string, value: any) => any;
|
|
18
|
+
}
|
|
19
|
+
export interface LocalStateModel {
|
|
20
|
+
/**
|
|
21
|
+
* Temporary ID of the model in the dictionary
|
|
22
|
+
*/
|
|
23
|
+
tid: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Adds an `id` to the given type
|
|
27
|
+
*/
|
|
28
|
+
export type Idfy<T> = T & {
|
|
29
|
+
id: string | number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Payload to update actions
|
|
33
|
+
*/
|
|
34
|
+
export interface UpdateActionPayload<T> {
|
|
35
|
+
stateDetails: Partial<T>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Payload to set actions
|
|
39
|
+
*/
|
|
40
|
+
export interface SetActionPayload<T> {
|
|
41
|
+
stateDetails: T;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Payload to set state actions
|
|
45
|
+
*/
|
|
46
|
+
export interface SetStateActionPayload<T> {
|
|
47
|
+
state: T;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Payload to fail actions
|
|
51
|
+
*/
|
|
52
|
+
export interface FailActionPayload<T> {
|
|
53
|
+
error?: T;
|
|
54
|
+
}
|
|
55
|
+
export type Keep<T, K extends keyof T> = Partial<T> & Pick<T, K>;
|
|
56
|
+
/** Payload to update entities actions */
|
|
57
|
+
export interface UpdateEntitiesActionPayload<T, K extends keyof T> {
|
|
58
|
+
entities: Keep<T, K>[];
|
|
59
|
+
}
|
|
60
|
+
/** Payload to update entities actions with a field ID */
|
|
61
|
+
export interface UpdateEntitiesActionPayloadWithId<T extends {
|
|
62
|
+
id: string | number;
|
|
63
|
+
}> {
|
|
64
|
+
entities: Keep<T, 'id'>[];
|
|
65
|
+
}
|
|
66
|
+
/** Payload to update entities actions */
|
|
67
|
+
export interface UpdateEntityActionPayload<T, K extends keyof T> {
|
|
68
|
+
entity: Keep<T, K>;
|
|
69
|
+
}
|
|
70
|
+
/** Payload to update entities actions with a field ID */
|
|
71
|
+
export interface UpdateEntityActionPayloadWithId<T extends {
|
|
72
|
+
id: string | number;
|
|
73
|
+
}> {
|
|
74
|
+
entity: Keep<T, 'id'>;
|
|
75
|
+
}
|
|
76
|
+
/** Payload to set entities and upsert entities actions */
|
|
77
|
+
export interface SetEntitiesActionPayload<T> {
|
|
78
|
+
entities: T[];
|
|
79
|
+
}
|
|
80
|
+
/** Payload to set entity and upsert entity actions */
|
|
81
|
+
export interface SetEntityActionPayload<T> {
|
|
82
|
+
entity: T;
|
|
83
|
+
}
|
|
84
|
+
/** Payload to fail entities actions */
|
|
85
|
+
export interface FailEntitiesActionPayload<T> extends FailActionPayload<T> {
|
|
86
|
+
ids?: (string | number)[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Payload to clear the store in case of failure
|
|
90
|
+
*/
|
|
91
|
+
export interface ClearOnFailurePayload {
|
|
92
|
+
/** Clear store on failure */
|
|
93
|
+
clearOnFailure?: boolean;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=types.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sBAAsB,CAAC,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC;CACX;AAED,uCAAuC;AACvC,MAAM,WAAW,yBAAyB,CAAC,CAAC,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IACxE,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,6BAA6B;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
|
package/store/types.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class StateSerializer {
|
|
2
|
+
constructor(serializer) {
|
|
3
|
+
this.reviver = (_, value) => value;
|
|
4
|
+
this.serialize = serializer.serialize || this.serialize;
|
|
5
|
+
this.deserialize = serializer.deserialize || this.deserialize;
|
|
6
|
+
this.reviver = serializer.reviver || this.reviver;
|
|
7
|
+
this.replacer = serializer.replacer || this.replacer;
|
|
8
|
+
this.initialState = serializer.initialState || this.initialState;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/store/types.ts"],"names":[],"mappings":"AAWA,MAAM,OAAO,eAAe;IAM1B,YAAY,UAAyB;QAQ9B,YAAO,GAAG,CAAC,CAAS,EAAE,KAAU,EAAO,EAAE,CAAC,KAAK,CAAC;QAPrD,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC;QACxD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC;QAC9D,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC;QACrD,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC;IACnE,CAAC;CAGF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Dataset } from '../../core/application/dgp.interfaces';
|
|
2
|
+
/**
|
|
3
|
+
* Pad number
|
|
4
|
+
* @param val
|
|
5
|
+
* @param digits
|
|
6
|
+
*/
|
|
7
|
+
export declare function padNumber(val: number, digits?: number): string;
|
|
8
|
+
/**
|
|
9
|
+
* Returns TRUE if bootstrap config environment is production FALSE otherwise
|
|
10
|
+
* @param dataset
|
|
11
|
+
* @returns TRUE if bootstrap config environment is production FALSE otherwise
|
|
12
|
+
*/
|
|
13
|
+
export declare function isProductionEnvironment(dataset: Dataset): boolean;
|
|
14
|
+
//# sourceMappingURL=debug.helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.helper.d.ts","sourceRoot":"","sources":["../../../src/utils/debug/debug.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,OAAO,EACR,MAAM,uCAAuC,CAAC;AAE/C;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAGzD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAGjE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pad number
|
|
3
|
+
* @param val
|
|
4
|
+
* @param digits
|
|
5
|
+
*/
|
|
6
|
+
export function padNumber(val, digits = 2) {
|
|
7
|
+
const str = `${val}`;
|
|
8
|
+
return '0'.repeat(Math.max(0, digits - str.length)) + str;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Returns TRUE if bootstrap config environment is production FALSE otherwise
|
|
12
|
+
* @param dataset
|
|
13
|
+
* @returns TRUE if bootstrap config environment is production FALSE otherwise
|
|
14
|
+
*/
|
|
15
|
+
export function isProductionEnvironment(dataset) {
|
|
16
|
+
const bootstrapConfig = dataset.bootstrapconfig && JSON.parse(dataset.bootstrapconfig);
|
|
17
|
+
return bootstrapConfig?.environment === 'prod';
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=debug.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.helper.js","sourceRoot":"","sources":["../../../src/utils/debug/debug.helper.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,MAAM,GAAG,CAAC;IAC/C,MAAM,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC;IACrB,OAAO,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,GAAG,CAAC;AAC5D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,eAAe,GAAoB,OAAO,CAAC,eAAe,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IACxG,OAAO,eAAe,EAAE,WAAW,KAAK,MAAM,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Reviver Mapper to detect and create object on deepFill */
|
|
2
|
+
export interface PrimitiveReviverMapper<T = any> {
|
|
3
|
+
/** Condition to fill to be determine as */
|
|
4
|
+
condition: (data: any) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Construct the primitive type if needed
|
|
7
|
+
* @param data to be constructed
|
|
8
|
+
* @default {@see defaultConstruct}
|
|
9
|
+
*/
|
|
10
|
+
construct?: (data: any) => T;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Check if an object is not an array or a date
|
|
14
|
+
* @param obj
|
|
15
|
+
* @param additionalMappers
|
|
16
|
+
*/
|
|
17
|
+
export declare function isObject(obj: any, additionalMappers?: PrimitiveReviverMapper[]): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Return a new reference of the given object
|
|
20
|
+
* @param obj
|
|
21
|
+
* @param additionalMappers
|
|
22
|
+
*/
|
|
23
|
+
export declare function immutablePrimitive(obj: any, additionalMappers?: PrimitiveReviverMapper[]): any;
|
|
24
|
+
/**
|
|
25
|
+
* Deep fill of base object using source
|
|
26
|
+
* It will do a deep merge of the objects, overriding arrays
|
|
27
|
+
* All properties not present in source, but present in base, will remain
|
|
28
|
+
* @param base
|
|
29
|
+
* @param source
|
|
30
|
+
* @param additionalMappers Map of conditions of type mapper
|
|
31
|
+
*/
|
|
32
|
+
export declare function deepFill<T extends {
|
|
33
|
+
[x: string]: any;
|
|
34
|
+
}>(base: T, source?: {
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
}, additionalMappers?: PrimitiveReviverMapper[]): T;
|
|
37
|
+
//# sourceMappingURL=deep-fill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep-fill.d.ts","sourceRoot":"","sources":["../../../src/utils/deep-fill/deep-fill.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,GAAG;IAC7C,4CAA4C;IAC5C,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC;IAElC;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC;CAC9B;AAMD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,iBAAiB,CAAC,EAAE,sBAAsB,EAAE,WAE9E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,iBAAiB,CAAC,EAAE,sBAAsB,EAAE,OAiBxF;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,iBAAiB,CAAC,EAAE,sBAAsB,EAAE,GAAG,CAAC,CA0BhJ"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const defaultConstruct = (data) => data;
|
|
2
|
+
const isDate = (data) => data instanceof Date && !Number.isNaN(data);
|
|
3
|
+
/**
|
|
4
|
+
* Check if an object is not an array or a date
|
|
5
|
+
* @param obj
|
|
6
|
+
* @param additionalMappers
|
|
7
|
+
*/
|
|
8
|
+
export function isObject(obj, additionalMappers) {
|
|
9
|
+
return obj instanceof Object && !Array.isArray(obj) && !additionalMappers?.some((mapper) => mapper.condition(obj)) && !isDate(obj);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Return a new reference of the given object
|
|
13
|
+
* @param obj
|
|
14
|
+
* @param additionalMappers
|
|
15
|
+
*/
|
|
16
|
+
export function immutablePrimitive(obj, additionalMappers) {
|
|
17
|
+
if (Array.isArray(obj)) {
|
|
18
|
+
return obj.slice();
|
|
19
|
+
}
|
|
20
|
+
const matchingPrimitive = additionalMappers?.find((mapper) => mapper.condition(obj));
|
|
21
|
+
const resolvedType = matchingPrimitive && ((matchingPrimitive.construct || defaultConstruct)(obj));
|
|
22
|
+
if (resolvedType !== undefined) {
|
|
23
|
+
return resolvedType;
|
|
24
|
+
}
|
|
25
|
+
if (isDate(obj)) {
|
|
26
|
+
return new Date(obj);
|
|
27
|
+
}
|
|
28
|
+
else if (obj instanceof Object) {
|
|
29
|
+
return deepFill(obj, obj, additionalMappers);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return obj;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Deep fill of base object using source
|
|
37
|
+
* It will do a deep merge of the objects, overriding arrays
|
|
38
|
+
* All properties not present in source, but present in base, will remain
|
|
39
|
+
* @param base
|
|
40
|
+
* @param source
|
|
41
|
+
* @param additionalMappers Map of conditions of type mapper
|
|
42
|
+
*/
|
|
43
|
+
export function deepFill(base, source, additionalMappers) {
|
|
44
|
+
if (typeof source === 'undefined') {
|
|
45
|
+
return deepFill(base, base, additionalMappers);
|
|
46
|
+
}
|
|
47
|
+
if (!isObject(base, additionalMappers)) {
|
|
48
|
+
return immutablePrimitive(typeof source === 'undefined' ? base : source, additionalMappers);
|
|
49
|
+
}
|
|
50
|
+
const newObj = { ...base };
|
|
51
|
+
for (const key in base) {
|
|
52
|
+
if (source[key] === null) {
|
|
53
|
+
newObj[key] = immutablePrimitive(null, additionalMappers);
|
|
54
|
+
}
|
|
55
|
+
else if (key in source && typeof base[key] === typeof source[key]) {
|
|
56
|
+
const keyOfSource = source[key];
|
|
57
|
+
newObj[key] = typeof keyOfSource === 'undefined' ? immutablePrimitive(base[key], additionalMappers) : deepFill(base[key], keyOfSource, additionalMappers);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
newObj[key] = immutablePrimitive(base[key], additionalMappers);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// getting keys present in source and not present in base
|
|
64
|
+
for (const key in source) {
|
|
65
|
+
if (!(key in newObj)) {
|
|
66
|
+
newObj[key] = immutablePrimitive(source[key], additionalMappers);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return newObj;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=deep-fill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep-fill.js","sourceRoot":"","sources":["../../../src/utils/deep-fill/deep-fill.ts"],"names":[],"mappings":"AAaA,MAAM,gBAAgB,GAAG,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC;AAE7C,MAAM,MAAM,GAAG,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,YAAY,IAAI,IAAI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CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,EAAE,CAAC;YACrB,MAAM,CAAC,GAAc,CAAC,GAAG,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAC9E,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC"}
|
package/utils/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Buffers and emits data for lazy/progressive rendering of big lists
|
|
4
|
+
* That could solve issues with long-running tasks when trying to render an array
|
|
5
|
+
* of similar components.
|
|
6
|
+
* @param delayMs Delay between data emits
|
|
7
|
+
* @param concurrency Amount of elements that should be emitted at once
|
|
8
|
+
*/
|
|
9
|
+
export declare function lazyArray<T>(delayMs?: number, concurrency?: number): (source$: Observable<T[]>) => Observable<T[]>;
|
|
10
|
+
//# sourceMappingURL=rendering.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rendering.helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/rendering/rendering.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAGX,MAAM,MAAM,CAAC;AAUd;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,SAAI,EAAE,WAAW,SAAI,IAE/C,SAAS,UAAU,CAAC,CAAC,EAAE,CAAC,qBA+BjC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { animationFrameScheduler, from, observeOn, of, } from 'rxjs';
|
|
2
|
+
import { bufferCount, concatMap, delay, mergeMap, scan, tap, } from 'rxjs/operators';
|
|
3
|
+
/**
|
|
4
|
+
* Buffers and emits data for lazy/progressive rendering of big lists
|
|
5
|
+
* That could solve issues with long-running tasks when trying to render an array
|
|
6
|
+
* of similar components.
|
|
7
|
+
* @param delayMs Delay between data emits
|
|
8
|
+
* @param concurrency Amount of elements that should be emitted at once
|
|
9
|
+
*/
|
|
10
|
+
export function lazyArray(delayMs = 0, concurrency = 2) {
|
|
11
|
+
let isFirstEmission = true;
|
|
12
|
+
return (source$) => {
|
|
13
|
+
return source$.pipe(mergeMap((items) => {
|
|
14
|
+
if (!isFirstEmission) {
|
|
15
|
+
return of(items);
|
|
16
|
+
}
|
|
17
|
+
const items$ = from(items);
|
|
18
|
+
return items$.pipe(bufferCount(concurrency), concatMap((value, index) => {
|
|
19
|
+
return of(value).pipe(observeOn(animationFrameScheduler), delay(index * delayMs));
|
|
20
|
+
}), scan((acc, steps) => {
|
|
21
|
+
return [...acc, ...steps];
|
|
22
|
+
}, []), tap((scannedItems) => {
|
|
23
|
+
const scanDidComplete = scannedItems.length === items.length;
|
|
24
|
+
if (scanDidComplete) {
|
|
25
|
+
isFirstEmission = false;
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=rendering.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rendering.helpers.js","sourceRoot":"","sources":["../../../src/utils/rendering/rendering.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,IAAI,EAEJ,SAAS,EACT,EAAE,GACH,MAAM,MAAM,CAAC;AACd,OAAO,EACL,WAAW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