@o3r/configuration 12.0.0-next.2 → 12.0.0-next.21
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/configuration.d.ts +0 -7
- package/core/configuration.d.ts.map +1 -1
- package/devkit/configuration-devtools.console.service.d.ts +0 -6
- package/devkit/configuration-devtools.console.service.d.ts.map +1 -1
- package/devkit/configuration-devtools.service.d.ts.map +1 -1
- package/fesm2022/o3r-configuration-rules-engine.mjs +7 -7
- package/fesm2022/o3r-configuration-rules-engine.mjs.map +1 -1
- package/fesm2022/o3r-configuration.mjs +41 -61
- package/fesm2022/o3r-configuration.mjs.map +1 -1
- package/fixtures/jasmine/package.json +3 -0
- package/fixtures/jest/package.json +3 -0
- package/migration.json +5 -0
- package/package.json +12 -19
- package/rules-engine/package.json +3 -0
- package/schemas/configuration.metadata.schema.json +2 -1
- package/schematics/configuration-to-component/index.js.map +1 -1
- package/schematics/ng-update/v12-0/index.d.ts +6 -0
- package/schematics/ng-update/v12-0/index.d.ts.map +1 -0
- package/schematics/ng-update/v12-0/index.js +32 -0
- package/schematics/ng-update/v12-0/index.js.map +1 -0
- package/schematics/package.json +3 -0
- package/tools/configuration.decorators.d.ts +0 -5
- package/tools/configuration.decorators.d.ts.map +1 -1
- package/tools/configuration.signal.d.ts +0 -10
- package/tools/configuration.signal.d.ts.map +1 -1
- package/esm2022/core/configurable.mjs +0 -2
- package/esm2022/core/configuration.mjs +0 -35
- package/esm2022/core/index.mjs +0 -3
- package/esm2022/devkit/configuration-devtools.console.service.mjs +0 -130
- package/esm2022/devkit/configuration-devtools.interface.mjs +0 -11
- package/esm2022/devkit/configuration-devtools.message.service.mjs +0 -94
- package/esm2022/devkit/configuration-devtools.module.mjs +0 -51
- package/esm2022/devkit/configuration-devtools.service.mjs +0 -100
- package/esm2022/devkit/configuration-devtools.token.mjs +0 -9
- package/esm2022/devkit/index.mjs +0 -7
- package/esm2022/fixtures/jasmine/configuration.base.service.fixture.jasmine.mjs +0 -22
- package/esm2022/fixtures/jasmine/index.mjs +0 -2
- package/esm2022/fixtures/jasmine/o3r-configuration-fixtures-jasmine.mjs +0 -5
- package/esm2022/fixtures/jest/configuration.base.service.fixture.jest.mjs +0 -22
- package/esm2022/fixtures/jest/index.mjs +0 -2
- package/esm2022/fixtures/jest/o3r-configuration-fixtures-jest.mjs +0 -5
- package/esm2022/o3r-configuration.mjs +0 -5
- package/esm2022/public_api.mjs +0 -6
- package/esm2022/rules-engine/configuration.handler-action.mjs +0 -40
- package/esm2022/rules-engine/configuration.interfaces.mjs +0 -3
- package/esm2022/rules-engine/configuration.rules-engine.module.mjs +0 -23
- package/esm2022/rules-engine/o3r-configuration-rules-engine.mjs +0 -5
- package/esm2022/rules-engine/public_api.mjs +0 -4
- package/esm2022/services/configuration/configuration.base.module.mjs +0 -16
- package/esm2022/services/configuration/configuration.base.service.mjs +0 -100
- package/esm2022/services/configuration/index.mjs +0 -3
- package/esm2022/services/index.mjs +0 -2
- package/esm2022/stores/config-override/config-override.actions.mjs +0 -8
- package/esm2022/stores/config-override/config-override.module.mjs +0 -39
- package/esm2022/stores/config-override/config-override.reducer.mjs +0 -17
- package/esm2022/stores/config-override/config-override.selectors.mjs +0 -12
- package/esm2022/stores/config-override/config-override.state.mjs +0 -5
- package/esm2022/stores/config-override/config-override.sync.mjs +0 -15
- package/esm2022/stores/config-override/index.mjs +0 -7
- package/esm2022/stores/configuration/configuration.actions.mjs +0 -33
- package/esm2022/stores/configuration/configuration.helpers.mjs +0 -14
- package/esm2022/stores/configuration/configuration.module.mjs +0 -39
- package/esm2022/stores/configuration/configuration.reducer.mjs +0 -29
- package/esm2022/stores/configuration/configuration.selectors.mjs +0 -28
- package/esm2022/stores/configuration/configuration.state.mjs +0 -9
- package/esm2022/stores/configuration/configuration.sync.mjs +0 -11
- package/esm2022/stores/configuration/index.mjs +0 -8
- package/esm2022/stores/index.mjs +0 -3
- package/esm2022/tools/configuration.decorators.mjs +0 -35
- package/esm2022/tools/configuration.observer.mjs +0 -38
- package/esm2022/tools/configuration.signal.mjs +0 -16
- package/esm2022/tools/index.mjs +0 -4
package/core/configuration.d.ts
CHANGED
|
@@ -19,13 +19,6 @@ export interface Identifiable {
|
|
|
19
19
|
*/
|
|
20
20
|
id: string;
|
|
21
21
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Get the configuration name
|
|
24
|
-
* @deprecated use {@link computeItemIdentifier} from @o3r/core. Will be removed in v12
|
|
25
|
-
* @param componentName Name of the component to get the configuration
|
|
26
|
-
* @param libraryName Name of the library the component is coming from
|
|
27
|
-
*/
|
|
28
|
-
export declare function computeConfigurationName(componentName: string, libraryName?: string): string;
|
|
29
22
|
/**
|
|
30
23
|
* Get the component and library's names based on the configuration name
|
|
31
24
|
* @param configurationName Name of the component as found in the store
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/core/configuration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/core/configuration.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EACX,MAAM,MAAM,CAAC;AAOd;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,aAAa,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,iBAAiB,EAAE,MAAM,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAQ/I;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC,IACzE,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,UAAU,UAAU,CAAC,CAAC,GAAG,SAAS,CAAE,KAAG,UAAU,CAAC,CAAC,CAAC,CAQjF"}
|
|
@@ -55,12 +55,6 @@ export declare class ConfigurationDevtoolsConsoleService implements DevtoolsServ
|
|
|
55
55
|
* Copy the whole configuration to the clipboard
|
|
56
56
|
*/
|
|
57
57
|
copyConfigurationToClipboard(): Promise<void>;
|
|
58
|
-
/**
|
|
59
|
-
* Load a json configuration
|
|
60
|
-
* @param configurations configurations to load
|
|
61
|
-
* @deprecated please use `updateConfigurations` instead, will be removed in Otter v12.
|
|
62
|
-
*/
|
|
63
|
-
loadConfiguration(configurations: string | CustomConfig<Configuration>[]): void;
|
|
64
58
|
/**
|
|
65
59
|
* Replace N configurations in one shot
|
|
66
60
|
* @param configurations array of configurations to update
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-devtools.console.service.d.ts","sourceRoot":"","sources":["../../src/devkit/configuration-devtools.console.service.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,aAAa,EAEb,YAAY,EACZ,wBAAwB,EAEzB,MAAM,WAAW,CAAC;AAInB,OAAO,EACL,sCAAsC,EACtC,mCAAmC,EACpC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,0BAA0B,EAC3B,MAAM,kCAAkC,CAAC;;AAM1C,qBAGa,mCAAoC,YAAW,wBAAwB,EAAE,sCAAsC;IAKxH,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACoB,OAAO,CAAC,QAAQ,CAAC,OAAO;IALpF,4DAA4D;IAC5D,gBAAuB,gBAAgB,mBAAmB;gBAGvC,qBAAqB,EAAE,0BAA0B,EACS,OAAO,EAAE,mCAAmC;IAezH,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,sBAAsB;IAS9B;;;;;OAKG;IACI,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG,IAAI;IAIvI,kBAAkB;IACX,QAAQ;IAQf;;;OAGG;IACU,kCAAkC;IAK/C;;;;;;OAMG;IACU,8BAA8B,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE;IAK1G;;;OAGG;IACU,iBAAiB,CAAC,QAAQ,GAAE,MAAyC;IAKlF;;OAEG;IACU,oBAAoB;IAKjC;;OAEG;IACU,4BAA4B;IAOzC;;OAEG;IACU,4BAA4B;IAKzC
|
|
1
|
+
{"version":3,"file":"configuration-devtools.console.service.d.ts","sourceRoot":"","sources":["../../src/devkit/configuration-devtools.console.service.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,aAAa,EAEb,YAAY,EACZ,wBAAwB,EAEzB,MAAM,WAAW,CAAC;AAInB,OAAO,EACL,sCAAsC,EACtC,mCAAmC,EACpC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,0BAA0B,EAC3B,MAAM,kCAAkC,CAAC;;AAM1C,qBAGa,mCAAoC,YAAW,wBAAwB,EAAE,sCAAsC;IAKxH,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACoB,OAAO,CAAC,QAAQ,CAAC,OAAO;IALpF,4DAA4D;IAC5D,gBAAuB,gBAAgB,mBAAmB;gBAGvC,qBAAqB,EAAE,0BAA0B,EACS,OAAO,EAAE,mCAAmC;IAezH,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,sBAAsB;IAS9B;;;;;OAKG;IACI,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG,IAAI;IAIvI,kBAAkB;IACX,QAAQ;IAQf;;;OAGG;IACU,kCAAkC;IAK/C;;;;;;OAMG;IACU,8BAA8B,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE;IAK1G;;;OAGG;IACU,iBAAiB,CAAC,QAAQ,GAAE,MAAyC;IAKlF;;OAEG;IACU,oBAAoB;IAKjC;;OAEG;IACU,4BAA4B;IAOzC;;OAEG;IACU,4BAA4B;IAKzC;;;OAGG;IACI,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,YAAY,CAAC,aAAa,CAAC,EAAE,GAAG,IAAI;yCArH9E,mCAAmC;6CAAnC,mCAAmC;CAwH/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-devtools.service.d.ts","sourceRoot":"","sources":["../../src/devkit/configuration-devtools.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAIf,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,KAAK,EACN,MAAM,aAAa,CAAC;AACrB,OAAO,
|
|
1
|
+
{"version":3,"file":"configuration-devtools.service.d.ts","sourceRoot":"","sources":["../../src/devkit/configuration-devtools.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAIf,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,KAAK,EACN,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,aAAa,EACb,YAAY,EACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAEL,UAAU,EACX,MAAM,MAAM,CAAC;AASd,OAAO,EAGL,kBAAkB,EAKnB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mCAAmC,EACpC,MAAM,oCAAoC,CAAC;;AAM5C,qBACa,0BAA0B;IAKnC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM;IACmC,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpF,+BAA+B;IAC/B,SAAgB,sBAAsB,EAAE,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;gBAGvD,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC,EACzB,MAAM,EAAE,cAAc,EACoC,OAAO,EAAE,mCAAmC;IAmBzH;;;;;;OAMG;IACI,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,EAAE,cAAc,UAAQ;IAUpH;;OAEG;IACI,8BAA8B,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAc1D;;;;;OAKG;IACI,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG,IAAI;IAUvI;;;;OAIG;IACI,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;IAczH;;OAEG;IACI,gBAAgB;IAIvB;;;OAGG;IACI,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,YAAY,CAAC,aAAa,CAAC,EAAE,GAAG,IAAI;yCA1G3E,0BAA0B;6CAA1B,0BAA0B;CA8GtC"}
|
|
@@ -33,21 +33,21 @@ class ConfigurationRulesEngineActionHandler {
|
|
|
33
33
|
}, {});
|
|
34
34
|
this.store.dispatch(setConfigOverride({ state: { configOverrides } }));
|
|
35
35
|
}
|
|
36
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
37
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
36
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationRulesEngineActionHandler, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
37
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationRulesEngineActionHandler }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationRulesEngineActionHandler, decorators: [{
|
|
40
40
|
type: Injectable
|
|
41
41
|
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
42
42
|
|
|
43
43
|
class ConfigurationRulesEngineActionModule {
|
|
44
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
45
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
46
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
44
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
45
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationRulesEngineActionModule, imports: [ConfigurationStoreModule] }); }
|
|
46
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationRulesEngineActionModule, providers: [
|
|
47
47
|
ConfigurationRulesEngineActionHandler
|
|
48
48
|
], imports: [ConfigurationStoreModule] }); }
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationRulesEngineActionModule, decorators: [{
|
|
51
51
|
type: NgModule,
|
|
52
52
|
args: [{
|
|
53
53
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o3r-configuration-rules-engine.mjs","sources":["../../src/rules-engine/configuration.interfaces.ts","../../src/rules-engine/configuration.handler-action.ts","../../src/rules-engine/configuration.rules-engine.module.ts","../../src/rules-engine/o3r-configuration-rules-engine.ts"],"sourcesContent":["import type {\n RulesEngineAction,\n} from '@o3r/core';\n\n/** ActionUpdateConfigurationBlock */\nexport const RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE = 'UPDATE_CONFIG';\n\n/**\n * Content of action that updates a Configuration\n */\nexport interface ActionUpdateConfigBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE;\n library: string;\n component: string;\n property: string;\n}\n","import {\n Injectable,\n} from '@angular/core';\nimport {\n Store,\n} from '@ngrx/store';\nimport type {\n RulesEngineActionHandler,\n} from '@o3r/core';\nimport {\n computeItemIdentifier,\n} from '@o3r/core';\nimport {\n ActionUpdateConfigBlock,\n RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE,\n} from './configuration.interfaces';\nimport {\n ConfigurationStore,\n PropertyOverride,\n setConfigOverride,\n} from '@o3r/configuration';\n\n/**\n * Service to handle async Configuration actions\n */\n@Injectable()\nexport class ConfigurationRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdateConfigBlock> {\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE] as const;\n\n constructor(private readonly store: Store<ConfigurationStore>) {}\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdateConfigBlock[]): void | Promise<void> {\n const configOverrideMap = actions\n .filter((action) => action.library && action.component && action.property && typeof action.value !== 'undefined')\n .reduce<Record<string, PropertyOverride>>((acc, ov) => {\n const configName = computeItemIdentifier(ov.component, ov.library);\n acc[configName] ||= { overrides: {} };\n acc[configName].overrides[ov.property] = ov.value;\n return acc;\n }, {});\n\n const configOverrides = Object.entries(configOverrideMap)\n .reduce<Record<string, PropertyOverride>>((acc, [key, value]) => {\n acc[key] = value.overrides;\n return acc;\n }, {});\n\n this.store.dispatch(setConfigOverride({ state: { configOverrides } }));\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n ConfigurationRulesEngineActionHandler,\n} from './configuration.handler-action';\nimport {\n ConfigurationStoreModule,\n} from '@o3r/configuration';\n\n@NgModule({\n imports: [\n ConfigurationStoreModule\n ],\n providers: [\n ConfigurationRulesEngineActionHandler\n ]\n})\nexport class ConfigurationRulesEngineActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAIA;AACO,MAAM,6CAA6C,GAAG;;ACiB7D;;AAEG;MAEU,qCAAqC,CAAA;AAIhD,IAAA,WAAA,CAA6B,KAAgC,EAAA;QAAhC,IAAK,CAAA,KAAA,GAAL,KAAK;;AAFlB,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,6CAA6C,CAAU;;;AAKrF,IAAA,cAAc,CAAC,OAAkC,EAAA;QACtD,MAAM,iBAAiB,GAAG;aACvB,MAAM,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,QAAQ,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW;AAC/G,aAAA,MAAM,CAAmC,CAAC,GAAG,EAAE,EAAE,KAAI;AACpD,YAAA,MAAM,UAAU,GAAG,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC;YAClE,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;AACrC,YAAA,GAAG,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK;AACjD,YAAA,OAAO,GAAG;SACX,EAAE,EAAE,CAAC;AAER,QAAA,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,iBAAiB;aACrD,MAAM,CAAmC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;AAC9D,YAAA,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS;AAC1B,YAAA,OAAO,GAAG;SACX,EAAE,EAAE,CAAC;AAER,QAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC;;
|
|
1
|
+
{"version":3,"file":"o3r-configuration-rules-engine.mjs","sources":["../../src/rules-engine/configuration.interfaces.ts","../../src/rules-engine/configuration.handler-action.ts","../../src/rules-engine/configuration.rules-engine.module.ts","../../src/rules-engine/o3r-configuration-rules-engine.ts"],"sourcesContent":["import type {\n RulesEngineAction,\n} from '@o3r/core';\n\n/** ActionUpdateConfigurationBlock */\nexport const RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE = 'UPDATE_CONFIG';\n\n/**\n * Content of action that updates a Configuration\n */\nexport interface ActionUpdateConfigBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE;\n library: string;\n component: string;\n property: string;\n}\n","import {\n Injectable,\n} from '@angular/core';\nimport {\n Store,\n} from '@ngrx/store';\nimport type {\n RulesEngineActionHandler,\n} from '@o3r/core';\nimport {\n computeItemIdentifier,\n} from '@o3r/core';\nimport {\n ActionUpdateConfigBlock,\n RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE,\n} from './configuration.interfaces';\nimport {\n ConfigurationStore,\n PropertyOverride,\n setConfigOverride,\n} from '@o3r/configuration';\n\n/**\n * Service to handle async Configuration actions\n */\n@Injectable()\nexport class ConfigurationRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdateConfigBlock> {\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE] as const;\n\n constructor(private readonly store: Store<ConfigurationStore>) {}\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdateConfigBlock[]): void | Promise<void> {\n const configOverrideMap = actions\n .filter((action) => action.library && action.component && action.property && typeof action.value !== 'undefined')\n .reduce<Record<string, PropertyOverride>>((acc, ov) => {\n const configName = computeItemIdentifier(ov.component, ov.library);\n acc[configName] ||= { overrides: {} };\n acc[configName].overrides[ov.property] = ov.value;\n return acc;\n }, {});\n\n const configOverrides = Object.entries(configOverrideMap)\n .reduce<Record<string, PropertyOverride>>((acc, [key, value]) => {\n acc[key] = value.overrides;\n return acc;\n }, {});\n\n this.store.dispatch(setConfigOverride({ state: { configOverrides } }));\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n ConfigurationRulesEngineActionHandler,\n} from './configuration.handler-action';\nimport {\n ConfigurationStoreModule,\n} from '@o3r/configuration';\n\n@NgModule({\n imports: [\n ConfigurationStoreModule\n ],\n providers: [\n ConfigurationRulesEngineActionHandler\n ]\n})\nexport class ConfigurationRulesEngineActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAIA;AACO,MAAM,6CAA6C,GAAG;;ACiB7D;;AAEG;MAEU,qCAAqC,CAAA;AAIhD,IAAA,WAAA,CAA6B,KAAgC,EAAA;QAAhC,IAAK,CAAA,KAAA,GAAL,KAAK;;AAFlB,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,6CAA6C,CAAU;;;AAKrF,IAAA,cAAc,CAAC,OAAkC,EAAA;QACtD,MAAM,iBAAiB,GAAG;aACvB,MAAM,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,QAAQ,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,WAAW;AAC/G,aAAA,MAAM,CAAmC,CAAC,GAAG,EAAE,EAAE,KAAI;AACpD,YAAA,MAAM,UAAU,GAAG,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC;YAClE,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;AACrC,YAAA,GAAG,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK;AACjD,YAAA,OAAO,GAAG;SACX,EAAE,EAAE,CAAC;AAER,QAAA,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,iBAAiB;aACrD,MAAM,CAAmC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;AAC9D,YAAA,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,SAAS;AAC1B,YAAA,OAAO,GAAG;SACX,EAAE,EAAE,CAAC;AAER,QAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC;;iIAvB7D,qCAAqC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,KAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;qIAArC,qCAAqC,EAAA,CAAA,CAAA;;2FAArC,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD;;;MCPY,oCAAoC,CAAA;iIAApC,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAApC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oCAAoC,YAN7C,wBAAwB,CAAA,EAAA,CAAA,CAAA;AAMf,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oCAAoC,EAJpC,SAAA,EAAA;YACT;AACD,SAAA,EAAA,OAAA,EAAA,CAJC,wBAAwB,CAAA,EAAA,CAAA,CAAA;;2FAMf,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBARhD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT;AACD;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { deepFill, computeItemIdentifier, sendOtterMessage, filterMessageContent, otterComponentInfoPropertyName } from '@o3r/core';
|
|
2
2
|
import { map, distinctUntilChanged, shareReplay, filter, take, switchMap } from 'rxjs/operators';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { InjectionToken, NgModule, Injectable, Optional, Inject, inject, DestroyRef } from '@angular/core';
|
|
@@ -10,15 +10,6 @@ import { takeUntilDestroyed, toSignal, toObservable } from '@angular/core/rxjs-i
|
|
|
10
10
|
import * as i2 from '@o3r/logger';
|
|
11
11
|
import { LoggerModule } from '@o3r/logger';
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* Get the configuration name
|
|
15
|
-
* @deprecated use {@link computeItemIdentifier} from @o3r/core. Will be removed in v12
|
|
16
|
-
* @param componentName Name of the component to get the configuration
|
|
17
|
-
* @param libraryName Name of the library the component is coming from
|
|
18
|
-
*/
|
|
19
|
-
function computeConfigurationName(componentName, libraryName) {
|
|
20
|
-
return computeItemIdentifier(componentName, libraryName);
|
|
21
|
-
}
|
|
22
13
|
/**
|
|
23
14
|
* Get the component and library's names based on the configuration name
|
|
24
15
|
* @param configurationName Name of the component as found in the store
|
|
@@ -85,13 +76,13 @@ class ConfigOverrideStoreModule {
|
|
|
85
76
|
]
|
|
86
77
|
};
|
|
87
78
|
}
|
|
88
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
89
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
90
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
79
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigOverrideStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
80
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: ConfigOverrideStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
81
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigOverrideStoreModule, providers: [
|
|
91
82
|
{ provide: CONFIG_OVERRIDE_REDUCER_TOKEN, useFactory: getDefaultConfigOverrideReducer }
|
|
92
83
|
], imports: [StoreModule.forFeature(CONFIG_OVERRIDE_STORE_NAME, CONFIG_OVERRIDE_REDUCER_TOKEN)] }); }
|
|
93
84
|
}
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigOverrideStoreModule, decorators: [{
|
|
95
86
|
type: NgModule,
|
|
96
87
|
args: [{
|
|
97
88
|
imports: [
|
|
@@ -222,13 +213,13 @@ class ConfigurationStoreModule {
|
|
|
222
213
|
]
|
|
223
214
|
};
|
|
224
215
|
}
|
|
225
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
226
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
227
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
216
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
217
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
218
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationStoreModule, providers: [
|
|
228
219
|
{ provide: CONFIGURATION_REDUCER_TOKEN, useFactory: getDefaultConfigurationReducer }
|
|
229
220
|
], imports: [StoreModule.forFeature(CONFIGURATION_STORE_NAME, CONFIGURATION_REDUCER_TOKEN)] }); }
|
|
230
221
|
}
|
|
231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationStoreModule, decorators: [{
|
|
232
223
|
type: NgModule,
|
|
233
224
|
args: [{
|
|
234
225
|
imports: [
|
|
@@ -307,11 +298,11 @@ class OtterConfigurationDevtools {
|
|
|
307
298
|
*/
|
|
308
299
|
getComponentConfigName(selector, isFallbackName = false) {
|
|
309
300
|
if (!isFallbackName) {
|
|
310
|
-
return typeof selector === 'string' ? selector :
|
|
301
|
+
return typeof selector === 'string' ? selector : computeItemIdentifier(selector.componentName, selector.library || this.options.defaultLibraryName);
|
|
311
302
|
}
|
|
312
303
|
return typeof selector === 'string'
|
|
313
|
-
?
|
|
314
|
-
:
|
|
304
|
+
? computeItemIdentifier(selector, this.options.defaultLibraryName || 'global')
|
|
305
|
+
: computeItemIdentifier(selector.componentName, this.options.defaultLibraryName || 'global');
|
|
315
306
|
}
|
|
316
307
|
/**
|
|
317
308
|
* Get the list of components which have a configuration loaded in the store
|
|
@@ -361,10 +352,10 @@ class OtterConfigurationDevtools {
|
|
|
361
352
|
this.store.dispatch(upsertConfigurationEntities(computeConfiguration(typeof configurations === 'string' ? JSON.parse(configurations) : configurations)));
|
|
362
353
|
this.appRef.tick();
|
|
363
354
|
}
|
|
364
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
365
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
355
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: OtterConfigurationDevtools, deps: [{ token: i1.Store }, { token: i0.ApplicationRef }, { token: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
356
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: OtterConfigurationDevtools, providedIn: 'root' }); }
|
|
366
357
|
}
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: OtterConfigurationDevtools, decorators: [{
|
|
368
359
|
type: Injectable,
|
|
369
360
|
args: [{ providedIn: 'root' }]
|
|
370
361
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i0.ApplicationRef }, { type: undefined, decorators: [{
|
|
@@ -468,14 +459,6 @@ class ConfigurationDevtoolsConsoleService {
|
|
|
468
459
|
const configs = await firstValueFrom(this.configurationDevtools.configurationEntities$);
|
|
469
460
|
this.copyElementToClipboard(JSON.stringify(configs));
|
|
470
461
|
}
|
|
471
|
-
/**
|
|
472
|
-
* Load a json configuration
|
|
473
|
-
* @param configurations configurations to load
|
|
474
|
-
* @deprecated please use `updateConfigurations` instead, will be removed in Otter v12.
|
|
475
|
-
*/
|
|
476
|
-
loadConfiguration(configurations) {
|
|
477
|
-
this.configurationDevtools.loadConfiguration(configurations);
|
|
478
|
-
}
|
|
479
462
|
/**
|
|
480
463
|
* Replace N configurations in one shot
|
|
481
464
|
* @param configurations array of configurations to update
|
|
@@ -483,10 +466,10 @@ class ConfigurationDevtoolsConsoleService {
|
|
|
483
466
|
updateConfigurations(configurations) {
|
|
484
467
|
this.configurationDevtools.loadConfiguration(configurations);
|
|
485
468
|
}
|
|
486
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
487
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
469
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationDevtoolsConsoleService, deps: [{ token: OtterConfigurationDevtools }, { token: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
470
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationDevtoolsConsoleService, providedIn: 'root' }); }
|
|
488
471
|
}
|
|
489
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationDevtoolsConsoleService, decorators: [{
|
|
490
473
|
type: Injectable,
|
|
491
474
|
args: [{
|
|
492
475
|
providedIn: 'root'
|
|
@@ -574,10 +557,10 @@ class ConfigurationDevtoolsMessageService {
|
|
|
574
557
|
fromEvent(window, 'message').pipe(takeUntilDestroyed(this.destroyRef), filterMessageContent(isConfigurationMessage)).subscribe((e) => this.handleEvents(e));
|
|
575
558
|
this.store.pipe(select(selectConfigurationEntities), takeUntilDestroyed(this.destroyRef)).subscribe((configurations) => this.sendMessage('configurations', { configurations }));
|
|
576
559
|
}
|
|
577
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
578
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
560
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationDevtoolsMessageService, deps: [{ token: i1.Store }, { token: i2.LoggerService }, { token: OtterConfigurationDevtools }, { token: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
561
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationDevtoolsMessageService, providedIn: 'root' }); }
|
|
579
562
|
}
|
|
580
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationDevtoolsMessageService, decorators: [{
|
|
581
564
|
type: Injectable,
|
|
582
565
|
args: [{
|
|
583
566
|
providedIn: 'root'
|
|
@@ -605,10 +588,10 @@ class ConfigurationDevtoolsModule {
|
|
|
605
588
|
]
|
|
606
589
|
};
|
|
607
590
|
}
|
|
608
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
609
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
591
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
592
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationDevtoolsModule, imports: [StoreModule,
|
|
610
593
|
ConfigurationStoreModule] }); }
|
|
611
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
594
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationDevtoolsModule, providers: [
|
|
612
595
|
{ provide: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, useValue: OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS },
|
|
613
596
|
ConfigurationDevtoolsMessageService,
|
|
614
597
|
ConfigurationDevtoolsConsoleService,
|
|
@@ -616,7 +599,7 @@ class ConfigurationDevtoolsModule {
|
|
|
616
599
|
], imports: [StoreModule,
|
|
617
600
|
ConfigurationStoreModule] }); }
|
|
618
601
|
}
|
|
619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
602
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationDevtoolsModule, decorators: [{
|
|
620
603
|
type: NgModule,
|
|
621
604
|
args: [{
|
|
622
605
|
imports: [
|
|
@@ -633,11 +616,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
633
616
|
}] });
|
|
634
617
|
|
|
635
618
|
class ConfigurationBaseServiceModule {
|
|
636
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
637
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
638
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
619
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationBaseServiceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
620
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationBaseServiceModule, imports: [ConfigurationStoreModule, LoggerModule] }); }
|
|
621
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationBaseServiceModule, imports: [ConfigurationStoreModule, LoggerModule] }); }
|
|
639
622
|
}
|
|
640
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationBaseServiceModule, decorators: [{
|
|
641
624
|
type: NgModule,
|
|
642
625
|
args: [{
|
|
643
626
|
imports: [ConfigurationStoreModule, LoggerModule]
|
|
@@ -724,10 +707,10 @@ class ConfigurationBaseService {
|
|
|
724
707
|
const overrideConfig$ = this.store.pipe(select(selectComponentOverrideConfig(id)));
|
|
725
708
|
return combineLatest([globalConfig$, componentConfig$, overrideConfig$]).pipe(map(([globalConfig, componentConfig, overrideConfig]) => ({ ...globalConfig, ...componentConfig, ...overrideConfig })), distinctUntilChanged(jsonStringifyDiff));
|
|
726
709
|
}
|
|
727
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
728
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
710
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationBaseService, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
711
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationBaseService, providedIn: ConfigurationBaseServiceModule }); }
|
|
729
712
|
}
|
|
730
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: ConfigurationBaseService, decorators: [{
|
|
731
714
|
type: Injectable,
|
|
732
715
|
args: [{
|
|
733
716
|
providedIn: ConfigurationBaseServiceModule
|
|
@@ -752,14 +735,6 @@ const decorator = (target, key) => {
|
|
|
752
735
|
});
|
|
753
736
|
}
|
|
754
737
|
};
|
|
755
|
-
/**
|
|
756
|
-
* Decorator to identify the configuration observer
|
|
757
|
-
* @deprecated please use O3rConfig, will be removed in v12
|
|
758
|
-
*/
|
|
759
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention -- decorator should be PascalCase
|
|
760
|
-
function ConfigObserver() {
|
|
761
|
-
return decorator;
|
|
762
|
-
}
|
|
763
738
|
/**
|
|
764
739
|
* Decorator to identify the component's configuration
|
|
765
740
|
*/
|
|
@@ -803,9 +778,14 @@ class ConfigurationObserver {
|
|
|
803
778
|
}
|
|
804
779
|
}
|
|
805
780
|
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
781
|
+
/**
|
|
782
|
+
* Get a configuration signal
|
|
783
|
+
* @param configInput
|
|
784
|
+
* @param configId
|
|
785
|
+
* @param defaultConfig
|
|
786
|
+
*/
|
|
787
|
+
function configSignal(configInput, configId, defaultConfig) {
|
|
788
|
+
const configurationService = inject(ConfigurationBaseService, { optional: true });
|
|
809
789
|
if (configurationService) {
|
|
810
790
|
configurationService.extendConfiguration(defaultConfig, configId);
|
|
811
791
|
}
|
|
@@ -818,5 +798,5 @@ function configSignal(configInput, configId, defaultConfig, configurationService
|
|
|
818
798
|
* Generated bundle index. Do not edit.
|
|
819
799
|
*/
|
|
820
800
|
|
|
821
|
-
export { CONFIGURATION_REDUCER_TOKEN, CONFIGURATION_STORE_NAME, CONFIG_OVERRIDE_REDUCER_TOKEN, CONFIG_OVERRIDE_STORE_NAME,
|
|
801
|
+
export { CONFIGURATION_REDUCER_TOKEN, CONFIGURATION_STORE_NAME, CONFIG_OVERRIDE_REDUCER_TOKEN, CONFIG_OVERRIDE_STORE_NAME, ConfigOverrideStoreModule, ConfigurationBaseService, ConfigurationBaseServiceModule, ConfigurationDevtoolsConsoleService, ConfigurationDevtoolsMessageService, ConfigurationDevtoolsModule, ConfigurationObserver, ConfigurationStoreModule, O3rConfig, OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, OtterConfigurationDevtools, clearConfigurationEntities, computeConfiguration, configOverrideInitialState, configOverrideReducer, configOverrideReducerFeatures, configOverrideStorageDeserializer, configOverrideStorageSync, configSignal, configurationAdapter, configurationInitialState, configurationReducer, configurationReducerFeatures, configurationStorageSync, getConfiguration, getDefaultConfigOverrideReducer, getDefaultConfigurationReducer, globalConfigurationId, isConfigurationMessage, parseConfigurationName, selectAllConfiguration, selectComponentOverrideConfig, selectConfigOverride, selectConfigOverrideState, selectConfigurationEntities, selectConfigurationForComponent, selectConfigurationIds, selectConfigurationState, selectConfigurationTotal, selectGlobalConfiguration, setConfigOverride, setConfigurationEntities, updateConfigurationEntities, updateConfigurationEntity, upsertConfigurationEntities, upsertConfigurationEntity };
|
|
822
802
|
//# sourceMappingURL=o3r-configuration.mjs.map
|