@o3r/configuration 13.0.0-next.6 → 13.0.0-prerelease.2
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/fesm2022/o3r-configuration-fixtures-jasmine.mjs.map +1 -1
- package/fesm2022/o3r-configuration-fixtures-jest.mjs.map +1 -1
- package/fesm2022/o3r-configuration-rules-engine.mjs +12 -12
- package/fesm2022/o3r-configuration-rules-engine.mjs.map +1 -1
- package/fesm2022/o3r-configuration.mjs +53 -67
- package/fesm2022/o3r-configuration.mjs.map +1 -1
- package/index.d.ts +568 -4
- package/index.d.ts.map +1 -0
- package/middlewares/bootstrap-config.middleware.d.ts.map +1 -1
- package/middlewares/bootstrap-config.middleware.js +2 -0
- package/package.json +14 -14
- package/rules-engine/index.d.ts +36 -4
- package/rules-engine/index.d.ts.map +1 -0
- package/schematics/configuration-to-component/schema.json +2 -1
- package/schematics/ng-add/schema.json +2 -1
- package/core/configurable.d.ts +0 -2
- package/core/configurable.d.ts.map +0 -1
- package/core/configuration.d.ts +0 -37
- package/core/configuration.d.ts.map +0 -1
- package/core/index.d.ts +0 -3
- package/core/index.d.ts.map +0 -1
- package/devkit/configuration-devtools.console.service.d.ts +0 -66
- package/devkit/configuration-devtools.console.service.d.ts.map +0 -1
- package/devkit/configuration-devtools.interface.d.ts +0 -48
- package/devkit/configuration-devtools.interface.d.ts.map +0 -1
- package/devkit/configuration-devtools.message.service.d.ts +0 -36
- package/devkit/configuration-devtools.message.service.d.ts.map +0 -1
- package/devkit/configuration-devtools.module.d.ts +0 -16
- package/devkit/configuration-devtools.module.d.ts.map +0 -1
- package/devkit/configuration-devtools.service.d.ts +0 -61
- package/devkit/configuration-devtools.service.d.ts.map +0 -1
- package/devkit/configuration-devtools.token.d.ts +0 -5
- package/devkit/configuration-devtools.token.d.ts.map +0 -1
- package/devkit/index.d.ts +0 -7
- package/devkit/index.d.ts.map +0 -1
- package/fixtures/jasmine/o3r-configuration-fixtures-jasmine.d.ts.map +0 -1
- package/fixtures/jest/o3r-configuration-fixtures-jest.d.ts.map +0 -1
- package/middlewares/bootstrap-config.middleware.js.map +0 -1
- package/middlewares/index.js.map +0 -1
- package/o3r-configuration.d.ts.map +0 -1
- package/public_api.d.ts +0 -7
- package/public_api.d.ts.map +0 -1
- package/rules-engine/configuration.handler-action.d.ts +0 -19
- package/rules-engine/configuration.handler-action.d.ts.map +0 -1
- package/rules-engine/configuration.interfaces.d.ts +0 -13
- package/rules-engine/configuration.interfaces.d.ts.map +0 -1
- package/rules-engine/configuration.rules-engine.module.d.ts +0 -8
- package/rules-engine/configuration.rules-engine.module.d.ts.map +0 -1
- package/rules-engine/o3r-configuration-rules-engine.d.ts.map +0 -1
- package/rules-engine/public_api.d.ts +0 -4
- package/rules-engine/public_api.d.ts.map +0 -1
- package/schematics/configuration-to-component/index.js.map +0 -1
- package/schematics/configuration-to-component/schema.js.map +0 -1
- package/schematics/ng-add/helpers/devtools-registration.js.map +0 -1
- package/schematics/ng-add/index.js.map +0 -1
- package/schematics/ng-add/schema.js.map +0 -1
- package/schematics/ng-update/v10-3/index.js.map +0 -1
- package/schematics/ng-update/v11-6/index.js.map +0 -1
- package/schematics/ng-update/v12-0/index.js.map +0 -1
- package/schematics/use-config-signal/index.js.map +0 -1
- package/schematics/use-config-signal/schema.js.map +0 -1
- package/services/configuration/configuration.base.module.d.ts +0 -9
- package/services/configuration/configuration.base.module.d.ts.map +0 -1
- package/services/configuration/configuration.base.service.d.ts +0 -57
- package/services/configuration/configuration.base.service.d.ts.map +0 -1
- package/services/configuration/index.d.ts +0 -3
- package/services/configuration/index.d.ts.map +0 -1
- package/services/index.d.ts +0 -2
- package/services/index.d.ts.map +0 -1
- package/stores/config-override/config-override.actions.d.ts +0 -7
- package/stores/config-override/config-override.actions.d.ts.map +0 -1
- package/stores/config-override/config-override.module.d.ts +0 -16
- package/stores/config-override/config-override.module.d.ts.map +0 -1
- package/stores/config-override/config-override.reducer.d.ts +0 -15
- package/stores/config-override/config-override.reducer.d.ts.map +0 -1
- package/stores/config-override/config-override.selectors.d.ts +0 -11
- package/stores/config-override/config-override.selectors.d.ts.map +0 -1
- package/stores/config-override/config-override.state.d.ts +0 -25
- package/stores/config-override/config-override.state.d.ts.map +0 -1
- package/stores/config-override/config-override.sync.d.ts +0 -9
- package/stores/config-override/config-override.sync.d.ts.map +0 -1
- package/stores/config-override/index.d.ts +0 -7
- package/stores/config-override/index.d.ts.map +0 -1
- package/stores/configuration/configuration.actions.d.ts +0 -44
- package/stores/configuration/configuration.actions.d.ts.map +0 -1
- package/stores/configuration/configuration.helpers.d.ts +0 -8
- package/stores/configuration/configuration.helpers.d.ts.map +0 -1
- package/stores/configuration/configuration.module.d.ts +0 -16
- package/stores/configuration/configuration.module.d.ts.map +0 -1
- package/stores/configuration/configuration.reducer.d.ts +0 -20
- package/stores/configuration/configuration.reducer.d.ts.map +0 -1
- package/stores/configuration/configuration.selectors.d.ts +0 -42
- package/stores/configuration/configuration.selectors.d.ts.map +0 -1
- package/stores/configuration/configuration.state.d.ts +0 -29
- package/stores/configuration/configuration.state.d.ts.map +0 -1
- package/stores/configuration/configuration.sync.d.ts +0 -5
- package/stores/configuration/configuration.sync.d.ts.map +0 -1
- package/stores/configuration/index.d.ts +0 -8
- package/stores/configuration/index.d.ts.map +0 -1
- package/stores/index.d.ts +0 -3
- package/stores/index.d.ts.map +0 -1
- package/tools/configuration.decorators.d.ts +0 -5
- package/tools/configuration.decorators.d.ts.map +0 -1
- package/tools/configuration.observer.d.ts +0 -27
- package/tools/configuration.observer.d.ts.map +0 -1
- package/tools/configuration.signal.d.ts +0 -14
- package/tools/configuration.signal.d.ts.map +0 -1
- package/tools/index.d.ts +0 -4
- package/tools/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o3r-configuration-fixtures-jasmine.mjs","sources":["../../src/fixtures/jasmine/configuration.base.service.fixture.jasmine.ts","../../src/fixtures/jasmine/o3r-configuration-fixtures-jasmine.ts"],"sourcesContent":["import type {\n ConfigurationBaseService,\n} from '@o3r/configuration';\n\n/**\n * Fixture file for configuration service\n */\nexport class ConfigurationBaseServiceFixture implements Readonly<ConfigurationBaseService> {\n /** @inheritDoc */\n public updateConfiguration: jasmine.Spy = jasmine.createSpy('updateConfiguration');\n /** @inheritDoc */\n public upsertConfiguration: jasmine.Spy = jasmine.createSpy('upsertConfiguration');\n /** @inheritDoc */\n public computeConfiguration: jasmine.Spy = jasmine.createSpy('computeConfiguration');\n /** @inheritDoc */\n public getConfigFromBodyTag: jasmine.Spy = jasmine.createSpy('getConfigFromBodyTag');\n /** @inheritDoc */\n public extendConfiguration: jasmine.Spy = jasmine.createSpy('extendConfiguration');\n /** @inheritDoc */\n public getComponentConfig: jasmine.Spy = jasmine.createSpy('getComponentConfig');\n /** @inheritDoc */\n public getConfig: jasmine.Spy = jasmine.createSpy('getConfig');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAIA;;AAEG;MACU,+BAA+B,CAAA;AAA5C,IAAA,WAAA,GAAA;;AAES,QAAA,IAAA,CAAA,mBAAmB,GAAgB,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;;AAE3E,QAAA,IAAA,CAAA,mBAAmB,GAAgB,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;;AAE3E,QAAA,IAAA,CAAA,oBAAoB,GAAgB,OAAO,CAAC,SAAS,CAAC,sBAAsB,CAAC;;AAE7E,QAAA,IAAA,CAAA,oBAAoB,GAAgB,OAAO,CAAC,SAAS,CAAC,sBAAsB,CAAC;;AAE7E,QAAA,IAAA,CAAA,mBAAmB,GAAgB,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;;AAE3E,QAAA,IAAA,CAAA,kBAAkB,GAAgB,OAAO,CAAC,SAAS,CAAC,oBAAoB,CAAC;;AAEzE,QAAA,IAAA,CAAA,SAAS,GAAgB,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC;;
|
|
1
|
+
{"version":3,"file":"o3r-configuration-fixtures-jasmine.mjs","sources":["../../src/fixtures/jasmine/configuration.base.service.fixture.jasmine.ts","../../src/fixtures/jasmine/o3r-configuration-fixtures-jasmine.ts"],"sourcesContent":["import type {\n ConfigurationBaseService,\n} from '@o3r/configuration';\n\n/**\n * Fixture file for configuration service\n */\nexport class ConfigurationBaseServiceFixture implements Readonly<ConfigurationBaseService> {\n /** @inheritDoc */\n public updateConfiguration: jasmine.Spy = jasmine.createSpy('updateConfiguration');\n /** @inheritDoc */\n public upsertConfiguration: jasmine.Spy = jasmine.createSpy('upsertConfiguration');\n /** @inheritDoc */\n public computeConfiguration: jasmine.Spy = jasmine.createSpy('computeConfiguration');\n /** @inheritDoc */\n public getConfigFromBodyTag: jasmine.Spy = jasmine.createSpy('getConfigFromBodyTag');\n /** @inheritDoc */\n public extendConfiguration: jasmine.Spy = jasmine.createSpy('extendConfiguration');\n /** @inheritDoc */\n public getComponentConfig: jasmine.Spy = jasmine.createSpy('getComponentConfig');\n /** @inheritDoc */\n public getConfig: jasmine.Spy = jasmine.createSpy('getConfig');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAIA;;AAEG;MACU,+BAA+B,CAAA;AAA5C,IAAA,WAAA,GAAA;;AAES,QAAA,IAAA,CAAA,mBAAmB,GAAgB,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;;AAE3E,QAAA,IAAA,CAAA,mBAAmB,GAAgB,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;;AAE3E,QAAA,IAAA,CAAA,oBAAoB,GAAgB,OAAO,CAAC,SAAS,CAAC,sBAAsB,CAAC;;AAE7E,QAAA,IAAA,CAAA,oBAAoB,GAAgB,OAAO,CAAC,SAAS,CAAC,sBAAsB,CAAC;;AAE7E,QAAA,IAAA,CAAA,mBAAmB,GAAgB,OAAO,CAAC,SAAS,CAAC,qBAAqB,CAAC;;AAE3E,QAAA,IAAA,CAAA,kBAAkB,GAAgB,OAAO,CAAC,SAAS,CAAC,oBAAoB,CAAC;;AAEzE,QAAA,IAAA,CAAA,SAAS,GAAgB,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC;IAChE;AAAC;;ACtBD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o3r-configuration-fixtures-jest.mjs","sources":["../../src/fixtures/jest/configuration.base.service.fixture.jest.ts","../../src/fixtures/jest/o3r-configuration-fixtures-jest.ts"],"sourcesContent":["import type {\n ConfigurationBaseService,\n} from '@o3r/configuration';\n\n/**\n * Fixture file for configuration service\n */\nexport class ConfigurationBaseServiceFixture implements Readonly<ConfigurationBaseService> {\n /** @inheritDoc */\n public updateConfiguration: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public upsertConfiguration: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public computeConfiguration: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public getConfigFromBodyTag: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public extendConfiguration: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public getComponentConfig: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public getConfig: jest.Mock<any, any> = jest.fn();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAIA;;AAEG;MACU,+BAA+B,CAAA;AAA5C,IAAA,WAAA,GAAA;;AAES,QAAA,IAAA,CAAA,mBAAmB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAEpD,QAAA,IAAA,CAAA,mBAAmB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAEpD,QAAA,IAAA,CAAA,oBAAoB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAErD,QAAA,IAAA,CAAA,oBAAoB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAErD,QAAA,IAAA,CAAA,mBAAmB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAEpD,QAAA,IAAA,CAAA,kBAAkB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAEnD,QAAA,IAAA,CAAA,SAAS,GAAwB,IAAI,CAAC,EAAE,EAAE;;
|
|
1
|
+
{"version":3,"file":"o3r-configuration-fixtures-jest.mjs","sources":["../../src/fixtures/jest/configuration.base.service.fixture.jest.ts","../../src/fixtures/jest/o3r-configuration-fixtures-jest.ts"],"sourcesContent":["import type {\n ConfigurationBaseService,\n} from '@o3r/configuration';\n\n/**\n * Fixture file for configuration service\n */\nexport class ConfigurationBaseServiceFixture implements Readonly<ConfigurationBaseService> {\n /** @inheritDoc */\n public updateConfiguration: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public upsertConfiguration: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public computeConfiguration: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public getConfigFromBodyTag: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public extendConfiguration: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public getComponentConfig: jest.Mock<any, any> = jest.fn();\n /** @inheritDoc */\n public getConfig: jest.Mock<any, any> = jest.fn();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAIA;;AAEG;MACU,+BAA+B,CAAA;AAA5C,IAAA,WAAA,GAAA;;AAES,QAAA,IAAA,CAAA,mBAAmB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAEpD,QAAA,IAAA,CAAA,mBAAmB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAEpD,QAAA,IAAA,CAAA,oBAAoB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAErD,QAAA,IAAA,CAAA,oBAAoB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAErD,QAAA,IAAA,CAAA,mBAAmB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAEpD,QAAA,IAAA,CAAA,kBAAkB,GAAwB,IAAI,CAAC,EAAE,EAAE;;AAEnD,QAAA,IAAA,CAAA,SAAS,GAAwB,IAAI,CAAC,EAAE,EAAE;IACnD;AAAC;;ACtBD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, NgModule } from '@angular/core';
|
|
3
|
-
import
|
|
2
|
+
import { inject, Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import { Store } from '@ngrx/store';
|
|
4
4
|
import { computeItemIdentifier } from '@o3r/core';
|
|
5
5
|
import { setConfigOverride, ConfigurationStoreModule } from '@o3r/configuration';
|
|
6
6
|
|
|
@@ -11,8 +11,8 @@ const RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE = 'UPDATE_CONFIG';
|
|
|
11
11
|
* Service to handle async Configuration actions
|
|
12
12
|
*/
|
|
13
13
|
class ConfigurationRulesEngineActionHandler {
|
|
14
|
-
constructor(
|
|
15
|
-
this.store =
|
|
14
|
+
constructor() {
|
|
15
|
+
this.store = inject(Store);
|
|
16
16
|
/** @inheritdoc */
|
|
17
17
|
this.supportingActions = [RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE];
|
|
18
18
|
}
|
|
@@ -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: "20.0.7", ngImport: i0, type: ConfigurationRulesEngineActionHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
37
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationRulesEngineActionHandler }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationRulesEngineActionHandler, decorators: [{
|
|
40
40
|
type: Injectable
|
|
41
|
-
}]
|
|
41
|
+
}] });
|
|
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: "20.0.7", ngImport: i0, type: ConfigurationRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
45
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationRulesEngineActionModule, imports: [ConfigurationStoreModule] }); }
|
|
46
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.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: "20.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
|
|
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 inject,\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 private readonly store = inject<Store<ConfigurationStore>>(Store);\n\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_CONFIGURATION_UPDATE_ACTION_TYPE] as const;\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;;ACkB7D;;AAEG;MAEU,qCAAqC,CAAA;AADlD,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAA4B,KAAK,CAAC;;AAGjD,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,6CAA6C,CAAU;AAqB7F,IAAA;;AAlBQ,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;QACZ,CAAC,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;QACZ,CAAC,EAAE,EAAE,CAAC;AAER,QAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,CAAC,CAAC;IACxE;iIAxBW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;qIAArC,qCAAqC,EAAA,CAAA,CAAA;;2FAArC,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD;;;MCRY,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,EAAA,SAAA,EAJpC;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,14 +1,13 @@
|
|
|
1
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
|
-
import { InjectionToken, NgModule,
|
|
4
|
+
import { InjectionToken, NgModule, inject, ApplicationRef, Injectable, DestroyRef } from '@angular/core';
|
|
5
5
|
import { firstValueFrom, fromEvent, of, combineLatest, BehaviorSubject, shareReplay as shareReplay$1 } from 'rxjs';
|
|
6
6
|
import * as i1 from '@ngrx/store';
|
|
7
|
-
import { createAction, props, on, createReducer, StoreModule, createFeatureSelector, createSelector, select } from '@ngrx/store';
|
|
7
|
+
import { createAction, props, on, createReducer, StoreModule, createFeatureSelector, createSelector, Store, select } from '@ngrx/store';
|
|
8
8
|
import { createEntityAdapter } from '@ngrx/entity';
|
|
9
9
|
import { takeUntilDestroyed, toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
10
|
-
import
|
|
11
|
-
import { LoggerModule } from '@o3r/logger';
|
|
10
|
+
import { LoggerService, LoggerModule } from '@o3r/logger';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Get the component and library's names based on the configuration name
|
|
@@ -76,13 +75,13 @@ class ConfigOverrideStoreModule {
|
|
|
76
75
|
]
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
80
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
81
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
78
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigOverrideStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
79
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: ConfigOverrideStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
80
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigOverrideStoreModule, providers: [
|
|
82
81
|
{ provide: CONFIG_OVERRIDE_REDUCER_TOKEN, useFactory: getDefaultConfigOverrideReducer }
|
|
83
82
|
], imports: [StoreModule.forFeature(CONFIG_OVERRIDE_STORE_NAME, CONFIG_OVERRIDE_REDUCER_TOKEN)] }); }
|
|
84
83
|
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigOverrideStoreModule, decorators: [{
|
|
86
85
|
type: NgModule,
|
|
87
86
|
args: [{
|
|
88
87
|
imports: [
|
|
@@ -213,13 +212,13 @@ class ConfigurationStoreModule {
|
|
|
213
212
|
]
|
|
214
213
|
};
|
|
215
214
|
}
|
|
216
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
217
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
218
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
215
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
216
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
217
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationStoreModule, providers: [
|
|
219
218
|
{ provide: CONFIGURATION_REDUCER_TOKEN, useFactory: getDefaultConfigurationReducer }
|
|
220
219
|
], imports: [StoreModule.forFeature(CONFIGURATION_STORE_NAME, CONFIGURATION_REDUCER_TOKEN)] }); }
|
|
221
220
|
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationStoreModule, decorators: [{
|
|
223
222
|
type: NgModule,
|
|
224
223
|
args: [{
|
|
225
224
|
imports: [
|
|
@@ -261,8 +260,7 @@ const configurationStorageSync = {
|
|
|
261
260
|
if (!rawObject || !rawObject.ids) {
|
|
262
261
|
return configurationInitialState;
|
|
263
262
|
}
|
|
264
|
-
|
|
265
|
-
return storeObject;
|
|
263
|
+
return configurationAdapter.getInitialState(rawObject);
|
|
266
264
|
}
|
|
267
265
|
};
|
|
268
266
|
|
|
@@ -275,10 +273,11 @@ const OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS = {
|
|
|
275
273
|
const OTTER_CONFIGURATION_DEVTOOLS_OPTIONS = new InjectionToken('Otter Configuration Devtools options');
|
|
276
274
|
|
|
277
275
|
class OtterConfigurationDevtools {
|
|
278
|
-
constructor(
|
|
279
|
-
this.store =
|
|
280
|
-
this.appRef =
|
|
281
|
-
this.options =
|
|
276
|
+
constructor() {
|
|
277
|
+
this.store = inject(Store);
|
|
278
|
+
this.appRef = inject(ApplicationRef);
|
|
279
|
+
this.options = inject(OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, { optional: true }) ?? OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS;
|
|
280
|
+
const options = this.options;
|
|
282
281
|
this.options = { ...OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS, ...options };
|
|
283
282
|
/** Full configuration store */
|
|
284
283
|
this.configurationEntities$ = this.store.pipe(select(selectConfigurationEntities), map((entities) => Object.values(entities)
|
|
@@ -352,26 +351,22 @@ class OtterConfigurationDevtools {
|
|
|
352
351
|
this.store.dispatch(upsertConfigurationEntities(computeConfiguration(typeof configurations === 'string' ? JSON.parse(configurations) : configurations)));
|
|
353
352
|
this.appRef.tick();
|
|
354
353
|
}
|
|
355
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
356
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
354
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: OtterConfigurationDevtools, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
355
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: OtterConfigurationDevtools, providedIn: 'root' }); }
|
|
357
356
|
}
|
|
358
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: OtterConfigurationDevtools, decorators: [{
|
|
359
358
|
type: Injectable,
|
|
360
359
|
args: [{ providedIn: 'root' }]
|
|
361
|
-
}], ctorParameters: () => [
|
|
362
|
-
type: Optional
|
|
363
|
-
}, {
|
|
364
|
-
type: Inject,
|
|
365
|
-
args: [OTTER_CONFIGURATION_DEVTOOLS_OPTIONS]
|
|
366
|
-
}] }] });
|
|
360
|
+
}], ctorParameters: () => [] });
|
|
367
361
|
|
|
368
362
|
/* eslint-disable no-console -- service to log message in the console */
|
|
369
363
|
class ConfigurationDevtoolsConsoleService {
|
|
370
364
|
/** Name of the Window property to access to the devtools */
|
|
371
365
|
static { this.windowModuleName = 'configuration'; }
|
|
372
|
-
constructor(
|
|
373
|
-
this.configurationDevtools =
|
|
374
|
-
this.options =
|
|
366
|
+
constructor() {
|
|
367
|
+
this.configurationDevtools = inject(OtterConfigurationDevtools);
|
|
368
|
+
this.options = inject(OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, { optional: true }) ?? OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS;
|
|
369
|
+
const options = this.options;
|
|
375
370
|
this.options = { ...OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS, ...options };
|
|
376
371
|
if (this.options.isActivatedOnBootstrap
|
|
377
372
|
|| (this.options.isActivatedOnBootstrapWhenCMSContext
|
|
@@ -466,20 +461,15 @@ class ConfigurationDevtoolsConsoleService {
|
|
|
466
461
|
updateConfigurations(configurations) {
|
|
467
462
|
this.configurationDevtools.loadConfiguration(configurations);
|
|
468
463
|
}
|
|
469
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
470
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
464
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationDevtoolsConsoleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
465
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationDevtoolsConsoleService, providedIn: 'root' }); }
|
|
471
466
|
}
|
|
472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
467
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationDevtoolsConsoleService, decorators: [{
|
|
473
468
|
type: Injectable,
|
|
474
469
|
args: [{
|
|
475
470
|
providedIn: 'root'
|
|
476
471
|
}]
|
|
477
|
-
}], ctorParameters: () => [
|
|
478
|
-
type: Optional
|
|
479
|
-
}, {
|
|
480
|
-
type: Inject,
|
|
481
|
-
args: [OTTER_CONFIGURATION_DEVTOOLS_OPTIONS]
|
|
482
|
-
}] }] });
|
|
472
|
+
}], ctorParameters: () => [] });
|
|
483
473
|
|
|
484
474
|
/**
|
|
485
475
|
* Determine if the given message is a Configuration message
|
|
@@ -493,13 +483,14 @@ const isConfigurationMessage = (message) => {
|
|
|
493
483
|
};
|
|
494
484
|
|
|
495
485
|
class ConfigurationDevtoolsMessageService {
|
|
496
|
-
constructor(
|
|
497
|
-
this.store =
|
|
498
|
-
this.logger =
|
|
499
|
-
this.configurationDevtools =
|
|
500
|
-
this.options =
|
|
486
|
+
constructor() {
|
|
487
|
+
this.store = inject(Store);
|
|
488
|
+
this.logger = inject(LoggerService);
|
|
489
|
+
this.configurationDevtools = inject(OtterConfigurationDevtools);
|
|
490
|
+
this.options = inject(OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, { optional: true });
|
|
501
491
|
this.sendMessage = (sendOtterMessage);
|
|
502
492
|
this.destroyRef = inject(DestroyRef);
|
|
493
|
+
const options = this.options;
|
|
503
494
|
this.options = { ...OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS, ...options };
|
|
504
495
|
if (this.options.isActivatedOnBootstrap) {
|
|
505
496
|
this.activate();
|
|
@@ -557,20 +548,15 @@ class ConfigurationDevtoolsMessageService {
|
|
|
557
548
|
fromEvent(window, 'message').pipe(takeUntilDestroyed(this.destroyRef), filterMessageContent(isConfigurationMessage)).subscribe((e) => this.handleEvents(e));
|
|
558
549
|
this.store.pipe(select(selectConfigurationEntities), takeUntilDestroyed(this.destroyRef)).subscribe((configurations) => this.sendMessage('configurations', { configurations }));
|
|
559
550
|
}
|
|
560
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
561
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
551
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationDevtoolsMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
552
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationDevtoolsMessageService, providedIn: 'root' }); }
|
|
562
553
|
}
|
|
563
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationDevtoolsMessageService, decorators: [{
|
|
564
555
|
type: Injectable,
|
|
565
556
|
args: [{
|
|
566
557
|
providedIn: 'root'
|
|
567
558
|
}]
|
|
568
|
-
}], ctorParameters: () => [
|
|
569
|
-
type: Optional
|
|
570
|
-
}, {
|
|
571
|
-
type: Inject,
|
|
572
|
-
args: [OTTER_CONFIGURATION_DEVTOOLS_OPTIONS]
|
|
573
|
-
}] }] });
|
|
559
|
+
}], ctorParameters: () => [] });
|
|
574
560
|
|
|
575
561
|
class ConfigurationDevtoolsModule {
|
|
576
562
|
/**
|
|
@@ -588,10 +574,10 @@ class ConfigurationDevtoolsModule {
|
|
|
588
574
|
]
|
|
589
575
|
};
|
|
590
576
|
}
|
|
591
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
592
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
577
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
578
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationDevtoolsModule, imports: [StoreModule,
|
|
593
579
|
ConfigurationStoreModule] }); }
|
|
594
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
580
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationDevtoolsModule, providers: [
|
|
595
581
|
{ provide: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, useValue: OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS },
|
|
596
582
|
ConfigurationDevtoolsMessageService,
|
|
597
583
|
ConfigurationDevtoolsConsoleService,
|
|
@@ -599,7 +585,7 @@ class ConfigurationDevtoolsModule {
|
|
|
599
585
|
], imports: [StoreModule,
|
|
600
586
|
ConfigurationStoreModule] }); }
|
|
601
587
|
}
|
|
602
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationDevtoolsModule, decorators: [{
|
|
603
589
|
type: NgModule,
|
|
604
590
|
args: [{
|
|
605
591
|
imports: [
|
|
@@ -616,11 +602,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
616
602
|
}] });
|
|
617
603
|
|
|
618
604
|
class ConfigurationBaseServiceModule {
|
|
619
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
620
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
621
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
605
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationBaseServiceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
606
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationBaseServiceModule, imports: [ConfigurationStoreModule, LoggerModule] }); }
|
|
607
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationBaseServiceModule, imports: [ConfigurationStoreModule, LoggerModule] }); }
|
|
622
608
|
}
|
|
623
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
609
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationBaseServiceModule, decorators: [{
|
|
624
610
|
type: NgModule,
|
|
625
611
|
args: [{
|
|
626
612
|
imports: [ConfigurationStoreModule, LoggerModule]
|
|
@@ -632,8 +618,8 @@ const jsonStringifyDiff = (obj1, obj2) => JSON.stringify(obj1) === JSON.stringif
|
|
|
632
618
|
* Configuration service
|
|
633
619
|
*/
|
|
634
620
|
class ConfigurationBaseService {
|
|
635
|
-
constructor(
|
|
636
|
-
this.store =
|
|
621
|
+
constructor() {
|
|
622
|
+
this.store = inject(Store);
|
|
637
623
|
this.extendedConfiguration = {};
|
|
638
624
|
}
|
|
639
625
|
/**
|
|
@@ -707,15 +693,15 @@ class ConfigurationBaseService {
|
|
|
707
693
|
const overrideConfig$ = this.store.pipe(select(selectComponentOverrideConfig(id)));
|
|
708
694
|
return combineLatest([globalConfig$, componentConfig$, overrideConfig$]).pipe(map(([globalConfig, componentConfig, overrideConfig]) => ({ ...globalConfig, ...componentConfig, ...overrideConfig })), distinctUntilChanged(jsonStringifyDiff));
|
|
709
695
|
}
|
|
710
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
711
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
696
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationBaseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
697
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationBaseService, providedIn: ConfigurationBaseServiceModule }); }
|
|
712
698
|
}
|
|
713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationBaseService, decorators: [{
|
|
714
700
|
type: Injectable,
|
|
715
701
|
args: [{
|
|
716
702
|
providedIn: ConfigurationBaseServiceModule
|
|
717
703
|
}]
|
|
718
|
-
}]
|
|
704
|
+
}] });
|
|
719
705
|
|
|
720
706
|
const decorator = (target, key) => {
|
|
721
707
|
const privateField = `_${key}`;
|