@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.
Files changed (109) hide show
  1. package/fesm2022/o3r-configuration-fixtures-jasmine.mjs.map +1 -1
  2. package/fesm2022/o3r-configuration-fixtures-jest.mjs.map +1 -1
  3. package/fesm2022/o3r-configuration-rules-engine.mjs +12 -12
  4. package/fesm2022/o3r-configuration-rules-engine.mjs.map +1 -1
  5. package/fesm2022/o3r-configuration.mjs +53 -67
  6. package/fesm2022/o3r-configuration.mjs.map +1 -1
  7. package/index.d.ts +568 -4
  8. package/index.d.ts.map +1 -0
  9. package/middlewares/bootstrap-config.middleware.d.ts.map +1 -1
  10. package/middlewares/bootstrap-config.middleware.js +2 -0
  11. package/package.json +14 -14
  12. package/rules-engine/index.d.ts +36 -4
  13. package/rules-engine/index.d.ts.map +1 -0
  14. package/schematics/configuration-to-component/schema.json +2 -1
  15. package/schematics/ng-add/schema.json +2 -1
  16. package/core/configurable.d.ts +0 -2
  17. package/core/configurable.d.ts.map +0 -1
  18. package/core/configuration.d.ts +0 -37
  19. package/core/configuration.d.ts.map +0 -1
  20. package/core/index.d.ts +0 -3
  21. package/core/index.d.ts.map +0 -1
  22. package/devkit/configuration-devtools.console.service.d.ts +0 -66
  23. package/devkit/configuration-devtools.console.service.d.ts.map +0 -1
  24. package/devkit/configuration-devtools.interface.d.ts +0 -48
  25. package/devkit/configuration-devtools.interface.d.ts.map +0 -1
  26. package/devkit/configuration-devtools.message.service.d.ts +0 -36
  27. package/devkit/configuration-devtools.message.service.d.ts.map +0 -1
  28. package/devkit/configuration-devtools.module.d.ts +0 -16
  29. package/devkit/configuration-devtools.module.d.ts.map +0 -1
  30. package/devkit/configuration-devtools.service.d.ts +0 -61
  31. package/devkit/configuration-devtools.service.d.ts.map +0 -1
  32. package/devkit/configuration-devtools.token.d.ts +0 -5
  33. package/devkit/configuration-devtools.token.d.ts.map +0 -1
  34. package/devkit/index.d.ts +0 -7
  35. package/devkit/index.d.ts.map +0 -1
  36. package/fixtures/jasmine/o3r-configuration-fixtures-jasmine.d.ts.map +0 -1
  37. package/fixtures/jest/o3r-configuration-fixtures-jest.d.ts.map +0 -1
  38. package/middlewares/bootstrap-config.middleware.js.map +0 -1
  39. package/middlewares/index.js.map +0 -1
  40. package/o3r-configuration.d.ts.map +0 -1
  41. package/public_api.d.ts +0 -7
  42. package/public_api.d.ts.map +0 -1
  43. package/rules-engine/configuration.handler-action.d.ts +0 -19
  44. package/rules-engine/configuration.handler-action.d.ts.map +0 -1
  45. package/rules-engine/configuration.interfaces.d.ts +0 -13
  46. package/rules-engine/configuration.interfaces.d.ts.map +0 -1
  47. package/rules-engine/configuration.rules-engine.module.d.ts +0 -8
  48. package/rules-engine/configuration.rules-engine.module.d.ts.map +0 -1
  49. package/rules-engine/o3r-configuration-rules-engine.d.ts.map +0 -1
  50. package/rules-engine/public_api.d.ts +0 -4
  51. package/rules-engine/public_api.d.ts.map +0 -1
  52. package/schematics/configuration-to-component/index.js.map +0 -1
  53. package/schematics/configuration-to-component/schema.js.map +0 -1
  54. package/schematics/ng-add/helpers/devtools-registration.js.map +0 -1
  55. package/schematics/ng-add/index.js.map +0 -1
  56. package/schematics/ng-add/schema.js.map +0 -1
  57. package/schematics/ng-update/v10-3/index.js.map +0 -1
  58. package/schematics/ng-update/v11-6/index.js.map +0 -1
  59. package/schematics/ng-update/v12-0/index.js.map +0 -1
  60. package/schematics/use-config-signal/index.js.map +0 -1
  61. package/schematics/use-config-signal/schema.js.map +0 -1
  62. package/services/configuration/configuration.base.module.d.ts +0 -9
  63. package/services/configuration/configuration.base.module.d.ts.map +0 -1
  64. package/services/configuration/configuration.base.service.d.ts +0 -57
  65. package/services/configuration/configuration.base.service.d.ts.map +0 -1
  66. package/services/configuration/index.d.ts +0 -3
  67. package/services/configuration/index.d.ts.map +0 -1
  68. package/services/index.d.ts +0 -2
  69. package/services/index.d.ts.map +0 -1
  70. package/stores/config-override/config-override.actions.d.ts +0 -7
  71. package/stores/config-override/config-override.actions.d.ts.map +0 -1
  72. package/stores/config-override/config-override.module.d.ts +0 -16
  73. package/stores/config-override/config-override.module.d.ts.map +0 -1
  74. package/stores/config-override/config-override.reducer.d.ts +0 -15
  75. package/stores/config-override/config-override.reducer.d.ts.map +0 -1
  76. package/stores/config-override/config-override.selectors.d.ts +0 -11
  77. package/stores/config-override/config-override.selectors.d.ts.map +0 -1
  78. package/stores/config-override/config-override.state.d.ts +0 -25
  79. package/stores/config-override/config-override.state.d.ts.map +0 -1
  80. package/stores/config-override/config-override.sync.d.ts +0 -9
  81. package/stores/config-override/config-override.sync.d.ts.map +0 -1
  82. package/stores/config-override/index.d.ts +0 -7
  83. package/stores/config-override/index.d.ts.map +0 -1
  84. package/stores/configuration/configuration.actions.d.ts +0 -44
  85. package/stores/configuration/configuration.actions.d.ts.map +0 -1
  86. package/stores/configuration/configuration.helpers.d.ts +0 -8
  87. package/stores/configuration/configuration.helpers.d.ts.map +0 -1
  88. package/stores/configuration/configuration.module.d.ts +0 -16
  89. package/stores/configuration/configuration.module.d.ts.map +0 -1
  90. package/stores/configuration/configuration.reducer.d.ts +0 -20
  91. package/stores/configuration/configuration.reducer.d.ts.map +0 -1
  92. package/stores/configuration/configuration.selectors.d.ts +0 -42
  93. package/stores/configuration/configuration.selectors.d.ts.map +0 -1
  94. package/stores/configuration/configuration.state.d.ts +0 -29
  95. package/stores/configuration/configuration.state.d.ts.map +0 -1
  96. package/stores/configuration/configuration.sync.d.ts +0 -5
  97. package/stores/configuration/configuration.sync.d.ts.map +0 -1
  98. package/stores/configuration/index.d.ts +0 -8
  99. package/stores/configuration/index.d.ts.map +0 -1
  100. package/stores/index.d.ts +0 -3
  101. package/stores/index.d.ts.map +0 -1
  102. package/tools/configuration.decorators.d.ts +0 -5
  103. package/tools/configuration.decorators.d.ts.map +0 -1
  104. package/tools/configuration.observer.d.ts +0 -27
  105. package/tools/configuration.observer.d.ts.map +0 -1
  106. package/tools/configuration.signal.d.ts +0 -14
  107. package/tools/configuration.signal.d.ts.map +0 -1
  108. package/tools/index.d.ts +0 -4
  109. 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;;AAC/D;;ACtBD;;AAEG;;;;"}
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;;AAClD;;ACtBD;;AAEG;;;;"}
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 * as i1 from '@ngrx/store';
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(store) {
15
- this.store = 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: "19.2.13", 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.2.13", ngImport: i0, type: ConfigurationRulesEngineActionHandler }); }
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: "19.2.13", ngImport: i0, type: ConfigurationRulesEngineActionHandler, decorators: [{
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ConfigurationRulesEngineActionHandler, decorators: [{
40
40
  type: Injectable
41
- }], ctorParameters: () => [{ type: i1.Store }] });
41
+ }] });
42
42
 
43
43
  class ConfigurationRulesEngineActionModule {
44
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: ConfigurationRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
45
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: ConfigurationRulesEngineActionModule, imports: [ConfigurationStoreModule] }); }
46
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: ConfigurationRulesEngineActionModule, providers: [
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: "19.2.13", ngImport: i0, type: ConfigurationRulesEngineActionModule, decorators: [{
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 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;;kIAvB7D,qCAAqC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,KAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;sIAArC,qCAAqC,EAAA,CAAA,CAAA;;4FAArC,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD;;;MCPY,oCAAoC,CAAA;kIAApC,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,SAAA,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,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oCAAoC,EAJpC,SAAA,EAAA;YACT;AACD,SAAA,EAAA,OAAA,EAAA,CAJC,wBAAwB,CAAA,EAAA,CAAA,CAAA;;4FAMf,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
+ {"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, Optional, Inject, Injectable, inject, DestroyRef } from '@angular/core';
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 * as i2 from '@o3r/logger';
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: "19.2.13", ngImport: i0, type: ConfigOverrideStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
80
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: ConfigOverrideStoreModule, imports: [i1.StoreFeatureModule] }); }
81
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: ConfigOverrideStoreModule, providers: [
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: "19.2.13", ngImport: i0, type: ConfigOverrideStoreModule, decorators: [{
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: "19.2.13", ngImport: i0, type: ConfigurationStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
217
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: ConfigurationStoreModule, imports: [i1.StoreFeatureModule] }); }
218
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: ConfigurationStoreModule, providers: [
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: "19.2.13", ngImport: i0, type: ConfigurationStoreModule, decorators: [{
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
- const storeObject = configurationAdapter.getInitialState(rawObject);
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(store, appRef, options) {
279
- this.store = store;
280
- this.appRef = appRef;
281
- this.options = 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: "19.2.13", 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.2.13", ngImport: i0, type: OtterConfigurationDevtools, providedIn: 'root' }); }
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: "19.2.13", ngImport: i0, type: OtterConfigurationDevtools, decorators: [{
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: () => [{ type: i1.Store }, { type: i0.ApplicationRef }, { type: undefined, decorators: [{
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(configurationDevtools, options) {
373
- this.configurationDevtools = configurationDevtools;
374
- this.options = 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: "19.2.13", 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.2.13", ngImport: i0, type: ConfigurationDevtoolsConsoleService, providedIn: 'root' }); }
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: "19.2.13", ngImport: i0, type: ConfigurationDevtoolsConsoleService, decorators: [{
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: () => [{ type: OtterConfigurationDevtools }, { type: undefined, decorators: [{
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(store, logger, configurationDevtools, options) {
497
- this.store = store;
498
- this.logger = logger;
499
- this.configurationDevtools = configurationDevtools;
500
- this.options = 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: "19.2.13", 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.2.13", ngImport: i0, type: ConfigurationDevtoolsMessageService, providedIn: 'root' }); }
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: "19.2.13", ngImport: i0, type: ConfigurationDevtoolsMessageService, decorators: [{
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: () => [{ type: i1.Store }, { type: i2.LoggerService }, { type: OtterConfigurationDevtools }, { type: undefined, decorators: [{
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: "19.2.13", ngImport: i0, type: ConfigurationDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
592
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: ConfigurationDevtoolsModule, imports: [StoreModule,
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: "19.2.13", ngImport: i0, type: ConfigurationDevtoolsModule, providers: [
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: "19.2.13", ngImport: i0, type: ConfigurationDevtoolsModule, decorators: [{
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: "19.2.13", ngImport: i0, type: ConfigurationBaseServiceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
620
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: ConfigurationBaseServiceModule, imports: [ConfigurationStoreModule, LoggerModule] }); }
621
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: ConfigurationBaseServiceModule, imports: [ConfigurationStoreModule, LoggerModule] }); }
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: "19.2.13", ngImport: i0, type: ConfigurationBaseServiceModule, decorators: [{
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(store) {
636
- this.store = 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: "19.2.13", 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.2.13", ngImport: i0, type: ConfigurationBaseService, providedIn: ConfigurationBaseServiceModule }); }
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: "19.2.13", ngImport: i0, type: ConfigurationBaseService, decorators: [{
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
- }], ctorParameters: () => [{ type: i1.Store }] });
704
+ }] });
719
705
 
720
706
  const decorator = (target, key) => {
721
707
  const privateField = `_${key}`;