@o3r/configuration 10.3.0-prerelease.4 → 10.3.0-prerelease.41
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/README.md +2 -2
- package/collection.json +6 -0
- package/core/configurable.d.ts +1 -1
- package/core/configurable.d.ts.map +1 -1
- package/esm2022/core/configurable.mjs +1 -1
- package/esm2022/devkit/configuration-devtools.console.service.mjs +3 -3
- package/esm2022/devkit/configuration-devtools.message.service.mjs +3 -3
- package/esm2022/devkit/configuration-devtools.module.mjs +4 -4
- package/esm2022/devkit/configuration-devtools.service.mjs +3 -3
- package/esm2022/rules-engine/configuration.handler-action.mjs +3 -3
- package/esm2022/rules-engine/configuration.rules-engine.module.mjs +4 -4
- package/esm2022/services/configuration/configuration.base.module.mjs +4 -4
- package/esm2022/services/configuration/configuration.base.service.mjs +3 -3
- package/esm2022/stores/config-override/config-override.module.mjs +4 -4
- package/esm2022/stores/configuration/configuration.module.mjs +4 -4
- package/esm2022/tools/configuration.decorators.mjs +35 -0
- package/esm2022/tools/configuration.signal.mjs +19 -0
- package/esm2022/tools/index.mjs +3 -2
- package/fesm2022/o3r-configuration-rules-engine.mjs +7 -7
- package/fesm2022/o3r-configuration.mjs +74 -48
- package/fesm2022/o3r-configuration.mjs.map +1 -1
- package/migration.json +10 -0
- package/package.json +7 -7
- package/schematics/configuration-to-component/index.d.ts.map +1 -1
- package/schematics/configuration-to-component/index.js +93 -13
- package/schematics/configuration-to-component/schema.d.ts +2 -0
- package/schematics/configuration-to-component/schema.d.ts.map +1 -1
- package/schematics/configuration-to-component/schema.json +5 -0
- package/schematics/ng-update/v10-3/index.d.ts +6 -0
- package/schematics/ng-update/v10-3/index.d.ts.map +1 -0
- package/schematics/ng-update/v10-3/index.js +21 -0
- package/schematics/use-config-signal/index.d.ts +8 -0
- package/schematics/use-config-signal/index.d.ts.map +1 -0
- package/schematics/use-config-signal/index.js +95 -0
- package/schematics/use-config-signal/schema.d.ts +8 -0
- package/schematics/use-config-signal/schema.d.ts.map +1 -0
- package/schematics/use-config-signal/schema.js +3 -0
- package/schematics/use-config-signal/schema.json +21 -0
- package/tools/configuration.decorators.d.ts +10 -0
- package/tools/configuration.decorators.d.ts.map +1 -0
- package/tools/configuration.signal.d.ts +16 -0
- package/tools/configuration.signal.d.ts.map +1 -0
- package/tools/index.d.ts +2 -1
- package/tools/index.d.ts.map +1 -1
- package/esm2022/tools/configuration.decorator.mjs +0 -26
- package/tools/configuration.decorator.d.ts +0 -5
- package/tools/configuration.decorator.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ ng add @o3r/configuration
|
|
|
27
27
|
## Description
|
|
28
28
|
|
|
29
29
|
The aim of this document is to help developers to implement configuration inside components, in order to be compliant
|
|
30
|
-
with the **
|
|
30
|
+
with the **CMS architecture**. This will give the possibility to **Business Analysts** to configure the
|
|
31
31
|
application/components.
|
|
32
32
|
|
|
33
33
|
### Component config types
|
|
@@ -78,7 +78,7 @@ A component will have to handle different types of configurations.
|
|
|
78
78
|
#### Global config
|
|
79
79
|
|
|
80
80
|
- The common configuration is the one used in multiple components (it can be a date format, price display, type of input
|
|
81
|
-
form fields from an
|
|
81
|
+
form fields from an Angular material input element ...)
|
|
82
82
|
- A common configuration is defined in every library. The application common configuration (**global config**) will be
|
|
83
83
|
the result of the **merge of all common** configurations.
|
|
84
84
|
- The common configuration is **not overridden** at component type (there will be no properties with the same name in
|
package/collection.json
CHANGED
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
"factory": "./schematics/configuration-to-component/index#ngAddConfig",
|
|
13
13
|
"schema": "./schematics/configuration-to-component/schema.json",
|
|
14
14
|
"aliases": ["add-config"]
|
|
15
|
+
},
|
|
16
|
+
"use-config-signal": {
|
|
17
|
+
"description": "Migrate from configuration observable to signal",
|
|
18
|
+
"factory": "./schematics/use-config-signal/index#ngUseConfigSignal",
|
|
19
|
+
"schema": "./schematics/use-config-signal/schema.json",
|
|
20
|
+
"aliases": ["migrate-to-signal-config"]
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
}
|
package/core/configurable.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { DynamicConfigurable, Configurable } from '@o3r/core';
|
|
1
|
+
export type { DynamicConfigurable, Configurable, DynamicConfigurableWithSignal } from '@o3r/core';
|
|
2
2
|
//# sourceMappingURL=configurable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurable.d.ts","sourceRoot":"","sources":["../../src/core/configurable.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"configurable.d.ts","sourceRoot":"","sources":["../../src/core/configurable.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvcmUvY29uZmlndXJhYmxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSB7IER5bmFtaWNDb25maWd1cmFibGUsIENvbmZpZ3VyYWJsZSwgRHluYW1pY0NvbmZpZ3VyYWJsZVdpdGhTaWduYWwgfSBmcm9tICdAbzNyL2NvcmUnO1xuIl19
|
|
@@ -115,10 +115,10 @@ export class ConfigurationDevtoolsConsoleService {
|
|
|
115
115
|
updateConfigurations(configurations) {
|
|
116
116
|
this.configurationDevtools.loadConfiguration(configurations);
|
|
117
117
|
}
|
|
118
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
119
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
118
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsConsoleService, deps: [{ token: i1.OtterConfigurationDevtools }, { token: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
119
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsConsoleService, providedIn: 'root' }); }
|
|
120
120
|
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsConsoleService, decorators: [{
|
|
122
122
|
type: Injectable,
|
|
123
123
|
args: [{
|
|
124
124
|
providedIn: 'root'
|
|
@@ -86,10 +86,10 @@ export class ConfigurationDevtoolsMessageService {
|
|
|
86
86
|
ngOnDestroy() {
|
|
87
87
|
this.subscriptions.unsubscribe();
|
|
88
88
|
}
|
|
89
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
90
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
89
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsMessageService, deps: [{ token: i1.Store }, { token: i2.LoggerService }, { token: i3.OtterConfigurationDevtools }, { token: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
90
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsMessageService, providedIn: 'root' }); }
|
|
91
91
|
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsMessageService, decorators: [{
|
|
93
93
|
type: Injectable,
|
|
94
94
|
args: [{
|
|
95
95
|
providedIn: 'root'
|
|
@@ -22,10 +22,10 @@ export class ConfigurationDevtoolsModule {
|
|
|
22
22
|
]
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
26
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.
|
|
25
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
26
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsModule, imports: [StoreModule,
|
|
27
27
|
ConfigurationStoreModule] }); }
|
|
28
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.
|
|
28
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsModule, providers: [
|
|
29
29
|
{ provide: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, useValue: OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS },
|
|
30
30
|
ConfigurationDevtoolsMessageService,
|
|
31
31
|
ConfigurationDevtoolsConsoleService,
|
|
@@ -33,7 +33,7 @@ export class ConfigurationDevtoolsModule {
|
|
|
33
33
|
], imports: [StoreModule,
|
|
34
34
|
ConfigurationStoreModule] }); }
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsModule, decorators: [{
|
|
37
37
|
type: NgModule,
|
|
38
38
|
args: [{
|
|
39
39
|
imports: [
|
|
@@ -88,10 +88,10 @@ export class OtterConfigurationDevtools {
|
|
|
88
88
|
this.store.dispatch(upsertConfigurationEntities(computeConfiguration(typeof configurations === 'string' ? JSON.parse(configurations) : configurations)));
|
|
89
89
|
this.appRef.tick();
|
|
90
90
|
}
|
|
91
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
92
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
91
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: OtterConfigurationDevtools, deps: [{ token: i1.Store }, { token: i0.ApplicationRef }, { token: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
92
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: OtterConfigurationDevtools, providedIn: 'root' }); }
|
|
93
93
|
}
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: OtterConfigurationDevtools, decorators: [{
|
|
95
95
|
type: Injectable,
|
|
96
96
|
args: [{ providedIn: 'root' }]
|
|
97
97
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i0.ApplicationRef }, { type: undefined, decorators: [{
|
|
@@ -31,10 +31,10 @@ export class ConfigurationRulesEngineActionHandler {
|
|
|
31
31
|
}, {});
|
|
32
32
|
this.store.dispatch(setConfigOverride({ state: { configOverrides } }));
|
|
33
33
|
}
|
|
34
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
35
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
34
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionHandler, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
35
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionHandler }); }
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionHandler, decorators: [{
|
|
38
38
|
type: Injectable
|
|
39
39
|
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
40
40
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbi5oYW5kbGVyLWFjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi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lvbi5jb21wb25lbnQgJiYgYWN0aW9uLnByb3BlcnR5ICYmIHR5cGVvZiBhY3Rpb24udmFsdWUgIT09ICd1bmRlZmluZWQnKVxuICAgICAgLnJlZHVjZTxSZWNvcmQ8c3RyaW5nLCBQcm9wZXJ0eU92ZXJyaWRlPj4oKGFjYywgb3YpID0+IHtcbiAgICAgICAgY29uc3QgY29uZmlnTmFtZSA9IGNvbXB1dGVJdGVtSWRlbnRpZmllcihvdi5jb21wb25lbnQsIG92LmxpYnJhcnkpO1xuICAgICAgICBhY2NbY29uZmlnTmFtZV0gfHw9IHsgb3ZlcnJpZGVzOiB7fSB9O1xuICAgICAgICBhY2NbY29uZmlnTmFtZV0ub3ZlcnJpZGVzW292LnByb3BlcnR5XSA9IG92LnZhbHVlO1xuICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgfSwge30pO1xuXG4gICAgY29uc3QgY29uZmlnT3ZlcnJpZGVzID0gT2JqZWN0LmVudHJpZXMoY29uZmlnT3ZlcnJpZGVNYXApXG4gICAgICAucmVkdWNlPFJlY29yZDxzdHJpbmcsIFByb3BlcnR5T3ZlcnJpZGU+PigoYWNjLCBba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgICAgYWNjW2tleV0gPSB2YWx1ZS5vdmVycmlkZXM7XG4gICAgICAgIHJldHVybiBhY2M7XG4gICAgICB9LCB7fSk7XG5cbiAgICB0aGlzLnN0b3JlLmRpc3BhdGNoKHNldENvbmZpZ092ZXJyaWRlKHsgc3RhdGU6IHsgY29uZmlnT3ZlcnJpZGVzIH0gfSkpO1xuICB9XG59XG4iXX0=
|
|
@@ -3,13 +3,13 @@ import { ConfigurationStoreModule } from '@o3r/configuration';
|
|
|
3
3
|
import { ConfigurationRulesEngineActionHandler } from './configuration.handler-action';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export class ConfigurationRulesEngineActionModule {
|
|
6
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
7
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.
|
|
8
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.
|
|
6
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionModule, imports: [ConfigurationStoreModule] }); }
|
|
8
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionModule, providers: [
|
|
9
9
|
ConfigurationRulesEngineActionHandler
|
|
10
10
|
], imports: [ConfigurationStoreModule] }); }
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionModule, decorators: [{
|
|
13
13
|
type: NgModule,
|
|
14
14
|
args: [{
|
|
15
15
|
imports: [
|
|
@@ -3,11 +3,11 @@ import { LoggerModule } from '@o3r/logger';
|
|
|
3
3
|
import { ConfigurationStoreModule } from '../../stores/index';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export class ConfigurationBaseServiceModule {
|
|
6
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
7
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.
|
|
8
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.
|
|
6
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseServiceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseServiceModule, imports: [ConfigurationStoreModule, LoggerModule] }); }
|
|
8
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseServiceModule, imports: [ConfigurationStoreModule, LoggerModule] }); }
|
|
9
9
|
}
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseServiceModule, decorators: [{
|
|
11
11
|
type: NgModule,
|
|
12
12
|
args: [{
|
|
13
13
|
imports: [ConfigurationStoreModule, LoggerModule]
|
|
@@ -88,10 +88,10 @@ export class ConfigurationBaseService {
|
|
|
88
88
|
const overrideConfig$ = this.store.pipe(select(selectComponentOverrideConfig(id)));
|
|
89
89
|
return combineLatest([globalConfig$, componentConfig$, overrideConfig$]).pipe(map(([globalConfig, componentConfig, overrideConfig]) => ({ ...globalConfig, ...componentConfig, ...overrideConfig })), distinctUntilChanged(jsonStringifyDiff));
|
|
90
90
|
}
|
|
91
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
92
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
91
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseService, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
92
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseService, providedIn: ConfigurationBaseServiceModule }); }
|
|
93
93
|
}
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseService, decorators: [{
|
|
95
95
|
type: Injectable,
|
|
96
96
|
args: [{
|
|
97
97
|
providedIn: ConfigurationBaseServiceModule
|
|
@@ -19,13 +19,13 @@ export class ConfigOverrideStoreModule {
|
|
|
19
19
|
]
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
23
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.
|
|
24
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.
|
|
22
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigOverrideStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
23
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ConfigOverrideStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
24
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigOverrideStoreModule, providers: [
|
|
25
25
|
{ provide: CONFIG_OVERRIDE_REDUCER_TOKEN, useFactory: getDefaultConfigOverrideReducer }
|
|
26
26
|
], imports: [StoreModule.forFeature(CONFIG_OVERRIDE_STORE_NAME, CONFIG_OVERRIDE_REDUCER_TOKEN)] }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigOverrideStoreModule, decorators: [{
|
|
29
29
|
type: NgModule,
|
|
30
30
|
args: [{
|
|
31
31
|
imports: [
|
|
@@ -19,13 +19,13 @@ export class ConfigurationStoreModule {
|
|
|
19
19
|
]
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
23
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.
|
|
24
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.
|
|
22
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
23
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
24
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationStoreModule, providers: [
|
|
25
25
|
{ provide: CONFIGURATION_REDUCER_TOKEN, useFactory: getDefaultConfigurationReducer }
|
|
26
26
|
], imports: [StoreModule.forFeature(CONFIGURATION_STORE_NAME, CONFIGURATION_REDUCER_TOKEN)] }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationStoreModule, decorators: [{
|
|
29
29
|
type: NgModule,
|
|
30
30
|
args: [{
|
|
31
31
|
imports: [
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { otterComponentInfoPropertyName } from '@o3r/core';
|
|
2
|
+
const decorator = (target, key) => {
|
|
3
|
+
const privateField = `_${key}`;
|
|
4
|
+
if (delete target[key]) {
|
|
5
|
+
Object.defineProperty(target, key, {
|
|
6
|
+
get: function () {
|
|
7
|
+
return this[privateField];
|
|
8
|
+
},
|
|
9
|
+
set: function (value) {
|
|
10
|
+
this[privateField] = value;
|
|
11
|
+
if (this[otterComponentInfoPropertyName]) {
|
|
12
|
+
this[otterComponentInfoPropertyName].configId = this[privateField].configId;
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Decorator to identify the configuration observer
|
|
22
|
+
* @deprecated please use O3rConfig, will be removed in v12
|
|
23
|
+
*/
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
25
|
+
export function ConfigObserver() {
|
|
26
|
+
return decorator;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Decorator to identify the component's configuration
|
|
30
|
+
*/
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
32
|
+
export function O3rConfig() {
|
|
33
|
+
return decorator;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJh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pZWxkXS5jb25maWdJZDtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIGVudW1lcmFibGU6IHRydWUsXG4gICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICB9KTtcbiAgfVxufTtcblxuLyoqXG4gKiBEZWNvcmF0b3IgdG8gaWRlbnRpZnkgdGhlIGNvbmZpZ3VyYXRpb24gb2JzZXJ2ZXJcbiAqIEBkZXByZWNhdGVkIHBsZWFzZSB1c2UgTzNyQ29uZmlnLCB3aWxsIGJlIHJlbW92ZWQgaW4gdjEyXG4gKi9cbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbmFtaW5nLWNvbnZlbnRpb25cbmV4cG9ydCBmdW5jdGlvbiBDb25maWdPYnNlcnZlcigpIHtcbiAgcmV0dXJuIGRlY29yYXRvcjtcbn1cblxuLyoqXG4gKiBEZWNvcmF0b3IgdG8gaWRlbnRpZnkgdGhlIGNvbXBvbmVudCdzIGNvbmZpZ3VyYXRpb25cbiAqL1xuLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uYW1pbmctY29udmVudGlvblxuZXhwb3J0IGZ1bmN0aW9uIE8zckNvbmZpZygpIHtcbiAgcmV0dXJuIGRlY29yYXRvcjtcbn1cbiJdfQ==
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { toObservable, toSignal } from '@angular/core/rxjs-interop';
|
|
2
|
+
import { shareReplay } from 'rxjs';
|
|
3
|
+
import { getConfiguration } from '../core';
|
|
4
|
+
/**
|
|
5
|
+
* Get a configuration signal
|
|
6
|
+
* @param configInput
|
|
7
|
+
* @param configId
|
|
8
|
+
* @param defaultConfig
|
|
9
|
+
* @param configurationService
|
|
10
|
+
*/
|
|
11
|
+
export const configSignal = (configInput, configId, defaultConfig, configurationService) => {
|
|
12
|
+
if (configurationService) {
|
|
13
|
+
configurationService.extendConfiguration(defaultConfig, configId);
|
|
14
|
+
}
|
|
15
|
+
const signal = toSignal(toObservable(configInput).pipe(configurationService ? configurationService.getComponentConfig(configId, defaultConfig) : getConfiguration(defaultConfig), shareReplay({ bufferSize: 1, refCount: true })), { initialValue: defaultConfig });
|
|
16
|
+
signal.configId = configId;
|
|
17
|
+
return signal;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbi5zaWduYWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdG9vbHMvY29uZmlndXJhdGlvbi5zaWduYWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLFlBQVksRUFBRSxRQUFRLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUVwRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ25DLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLFNBQVMsQ0FBQztBQU0zQzs7Ozs7O0dBTUc7QUFDSCxNQUFNLENBQUMsTUFBTSxZQUFZLEdBQUcsQ0FDMUIsV0FBZ0QsRUFDaEQsUUFBZ0IsRUFDaEIsYUFBZ0IsRUFDaEIsb0JBQXNELEVBQzlCLEVBQUU7SUFDMUIsSUFBSSxvQkFBb0IsRUFBRSxDQUFDO1FBQ3pCLG9CQUFvQixDQUFDLG1CQUFtQixDQUFDLGFBQWEsRUFBRSxRQUFRLENBQUMsQ0FBQztJQUNwRSxDQUFDO0lBRUQsTUFBTSxNQUFNLEdBQTJCLFFBQVEsQ0FDN0MsWUFBWSxDQUFDLFdBQVcsQ0FBQyxDQUFDLElBQUksQ0FDNUIsb0JBQW9CLENBQUMsQ0FBQyxDQUFDLG9CQUFvQixDQUFDLGtCQUFrQixDQUFDLFFBQVEsRUFBRSxhQUFhLENBQUMsQ0FBQyxDQUFDLENBQUMsZ0J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nN0IGNvbmZpZ1NpZ25hbCA9IDxUIGV4dGVuZHMgQ29uZmlndXJhdGlvbj4oXG4gIGNvbmZpZ0lucHV0OiBJbnB1dFNpZ25hbDxQYXJ0aWFsPFQ+IHwgdW5kZWZpbmVkPixcbiAgY29uZmlnSWQ6IHN0cmluZyxcbiAgZGVmYXVsdENvbmZpZzogVCxcbiAgY29uZmlndXJhdGlvblNlcnZpY2U/OiBDb25maWd1cmF0aW9uQmFzZVNlcnZpY2UgfCBudWxsXG4pOiBDb25maWd1cmF0aW9uU2lnbmFsPFQ+ID0+IHtcbiAgaWYgKGNvbmZpZ3VyYXRpb25TZXJ2aWNlKSB7XG4gICAgY29uZmlndXJhdGlvblNlcnZpY2UuZXh0ZW5kQ29uZmlndXJhdGlvbihkZWZhdWx0Q29uZmlnLCBjb25maWdJZCk7XG4gIH1cblxuICBjb25zdCBzaWduYWw6IENvbmZpZ3VyYXRpb25TaWduYWw8VD4gPSB0b1NpZ25hbChcbiAgICB0b09ic2VydmFibGUoY29uZmlnSW5wdXQpLnBpcGUoXG4gICAgICBjb25maWd1cmF0aW9uU2VydmljZSA/IGNvbmZpZ3VyYXRpb25TZXJ2aWNlLmdldENvbXBvbmVudENvbmZpZyhjb25maWdJZCwgZGVmYXVsdENvbmZpZykgOiBnZXRDb25maWd1cmF0aW9uKGRlZmF1bHRDb25maWcpLFxuICAgICAgc2hhcmVSZXBsYXkoeyBidWZmZXJTaXplOiAxLCByZWZDb3VudDogdHJ1ZSB9KVxuICAgICksXG4gICAgeyBpbml0aWFsVmFsdWU6IGRlZmF1bHRDb25maWcgfVxuICApIGFzIENvbmZpZ3VyYXRpb25TaWduYWw8VD47XG4gIHNpZ25hbC5jb25maWdJZCA9IGNvbmZpZ0lkO1xuICByZXR1cm4gc2lnbmFsO1xufTtcbiJdfQ==
|
package/esm2022/tools/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export * from './configuration.
|
|
1
|
+
export * from './configuration.decorators';
|
|
2
2
|
export * from './configuration.observer';
|
|
3
|
-
|
|
3
|
+
export * from './configuration.signal';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdG9vbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMsd0JBQXdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NvbmZpZ3VyYXRpb24uZGVjb3JhdG9ycyc7XG5leHBvcnQgKiBmcm9tICcuL2NvbmZpZ3VyYXRpb24ub2JzZXJ2ZXInO1xuZXhwb3J0ICogZnJvbSAnLi9jb25maWd1cmF0aW9uLnNpZ25hbCc7XG4iXX0=
|
|
@@ -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: "17.3.
|
|
37
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
36
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionHandler, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
37
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionHandler }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", 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: "17.3.
|
|
45
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.
|
|
46
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.
|
|
44
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
45
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionModule, imports: [ConfigurationStoreModule] }); }
|
|
46
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionModule, providers: [
|
|
47
47
|
ConfigurationRulesEngineActionHandler
|
|
48
48
|
], imports: [ConfigurationStoreModule] }); }
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationRulesEngineActionModule, decorators: [{
|
|
51
51
|
type: NgModule,
|
|
52
52
|
args: [{
|
|
53
53
|
imports: [
|
|
@@ -2,12 +2,13 @@ import { computeItemIdentifier, deepFill, sendOtterMessage, filterMessageContent
|
|
|
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 } from '@angular/core';
|
|
5
|
-
import { firstValueFrom, Subscription, fromEvent, of, combineLatest, BehaviorSubject } from 'rxjs';
|
|
5
|
+
import { firstValueFrom, Subscription, fromEvent, of, combineLatest, BehaviorSubject, shareReplay as shareReplay$1 } from 'rxjs';
|
|
6
6
|
import * as i1 from '@ngrx/store';
|
|
7
7
|
import { createAction, props, on, createReducer, StoreModule, createFeatureSelector, createSelector, select } from '@ngrx/store';
|
|
8
8
|
import { createEntityAdapter } from '@ngrx/entity';
|
|
9
9
|
import * as i2 from '@o3r/logger';
|
|
10
10
|
import { LoggerModule } from '@o3r/logger';
|
|
11
|
+
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Get the configuration name
|
|
@@ -95,13 +96,13 @@ class ConfigOverrideStoreModule {
|
|
|
95
96
|
]
|
|
96
97
|
};
|
|
97
98
|
}
|
|
98
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
99
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.
|
|
100
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.
|
|
99
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigOverrideStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
100
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ConfigOverrideStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
101
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigOverrideStoreModule, providers: [
|
|
101
102
|
{ provide: CONFIG_OVERRIDE_REDUCER_TOKEN, useFactory: getDefaultConfigOverrideReducer }
|
|
102
103
|
], imports: [StoreModule.forFeature(CONFIG_OVERRIDE_STORE_NAME, CONFIG_OVERRIDE_REDUCER_TOKEN)] }); }
|
|
103
104
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigOverrideStoreModule, decorators: [{
|
|
105
106
|
type: NgModule,
|
|
106
107
|
args: [{
|
|
107
108
|
imports: [
|
|
@@ -233,13 +234,13 @@ class ConfigurationStoreModule {
|
|
|
233
234
|
]
|
|
234
235
|
};
|
|
235
236
|
}
|
|
236
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
237
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.
|
|
238
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.
|
|
237
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
238
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
239
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationStoreModule, providers: [
|
|
239
240
|
{ provide: CONFIGURATION_REDUCER_TOKEN, useFactory: getDefaultConfigurationReducer }
|
|
240
241
|
], imports: [StoreModule.forFeature(CONFIGURATION_STORE_NAME, CONFIGURATION_REDUCER_TOKEN)] }); }
|
|
241
242
|
}
|
|
242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationStoreModule, decorators: [{
|
|
243
244
|
type: NgModule,
|
|
244
245
|
args: [{
|
|
245
246
|
imports: [
|
|
@@ -377,10 +378,10 @@ class OtterConfigurationDevtools {
|
|
|
377
378
|
this.store.dispatch(upsertConfigurationEntities(computeConfiguration(typeof configurations === 'string' ? JSON.parse(configurations) : configurations)));
|
|
378
379
|
this.appRef.tick();
|
|
379
380
|
}
|
|
380
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
381
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
381
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: OtterConfigurationDevtools, deps: [{ token: i1.Store }, { token: i0.ApplicationRef }, { token: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
382
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: OtterConfigurationDevtools, providedIn: 'root' }); }
|
|
382
383
|
}
|
|
383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: OtterConfigurationDevtools, decorators: [{
|
|
384
385
|
type: Injectable,
|
|
385
386
|
args: [{ providedIn: 'root' }]
|
|
386
387
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i0.ApplicationRef }, { type: undefined, decorators: [{
|
|
@@ -501,10 +502,10 @@ class ConfigurationDevtoolsConsoleService {
|
|
|
501
502
|
updateConfigurations(configurations) {
|
|
502
503
|
this.configurationDevtools.loadConfiguration(configurations);
|
|
503
504
|
}
|
|
504
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
505
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
505
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsConsoleService, deps: [{ token: OtterConfigurationDevtools }, { token: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
506
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsConsoleService, providedIn: 'root' }); }
|
|
506
507
|
}
|
|
507
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsConsoleService, decorators: [{
|
|
508
509
|
type: Injectable,
|
|
509
510
|
args: [{
|
|
510
511
|
providedIn: 'root'
|
|
@@ -591,10 +592,10 @@ class ConfigurationDevtoolsMessageService {
|
|
|
591
592
|
ngOnDestroy() {
|
|
592
593
|
this.subscriptions.unsubscribe();
|
|
593
594
|
}
|
|
594
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
595
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
595
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsMessageService, deps: [{ token: i1.Store }, { token: i2.LoggerService }, { token: OtterConfigurationDevtools }, { token: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
596
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsMessageService, providedIn: 'root' }); }
|
|
596
597
|
}
|
|
597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsMessageService, decorators: [{
|
|
598
599
|
type: Injectable,
|
|
599
600
|
args: [{
|
|
600
601
|
providedIn: 'root'
|
|
@@ -622,10 +623,10 @@ class ConfigurationDevtoolsModule {
|
|
|
622
623
|
]
|
|
623
624
|
};
|
|
624
625
|
}
|
|
625
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
626
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.
|
|
626
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
627
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsModule, imports: [StoreModule,
|
|
627
628
|
ConfigurationStoreModule] }); }
|
|
628
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.
|
|
629
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsModule, providers: [
|
|
629
630
|
{ provide: OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, useValue: OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS },
|
|
630
631
|
ConfigurationDevtoolsMessageService,
|
|
631
632
|
ConfigurationDevtoolsConsoleService,
|
|
@@ -633,7 +634,7 @@ class ConfigurationDevtoolsModule {
|
|
|
633
634
|
], imports: [StoreModule,
|
|
634
635
|
ConfigurationStoreModule] }); }
|
|
635
636
|
}
|
|
636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationDevtoolsModule, decorators: [{
|
|
637
638
|
type: NgModule,
|
|
638
639
|
args: [{
|
|
639
640
|
imports: [
|
|
@@ -650,11 +651,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
|
650
651
|
}] });
|
|
651
652
|
|
|
652
653
|
class ConfigurationBaseServiceModule {
|
|
653
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
654
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.
|
|
655
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.
|
|
654
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseServiceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
655
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseServiceModule, imports: [ConfigurationStoreModule, LoggerModule] }); }
|
|
656
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseServiceModule, imports: [ConfigurationStoreModule, LoggerModule] }); }
|
|
656
657
|
}
|
|
657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseServiceModule, decorators: [{
|
|
658
659
|
type: NgModule,
|
|
659
660
|
args: [{
|
|
660
661
|
imports: [ConfigurationStoreModule, LoggerModule]
|
|
@@ -741,39 +742,48 @@ class ConfigurationBaseService {
|
|
|
741
742
|
const overrideConfig$ = this.store.pipe(select(selectComponentOverrideConfig(id)));
|
|
742
743
|
return combineLatest([globalConfig$, componentConfig$, overrideConfig$]).pipe(map(([globalConfig, componentConfig, overrideConfig]) => ({ ...globalConfig, ...componentConfig, ...overrideConfig })), distinctUntilChanged(jsonStringifyDiff));
|
|
743
744
|
}
|
|
744
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
745
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.
|
|
745
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseService, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
746
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseService, providedIn: ConfigurationBaseServiceModule }); }
|
|
746
747
|
}
|
|
747
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
748
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ConfigurationBaseService, decorators: [{
|
|
748
749
|
type: Injectable,
|
|
749
750
|
args: [{
|
|
750
751
|
providedIn: ConfigurationBaseServiceModule
|
|
751
752
|
}]
|
|
752
753
|
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
753
754
|
|
|
755
|
+
const decorator = (target, key) => {
|
|
756
|
+
const privateField = `_${key}`;
|
|
757
|
+
if (delete target[key]) {
|
|
758
|
+
Object.defineProperty(target, key, {
|
|
759
|
+
get: function () {
|
|
760
|
+
return this[privateField];
|
|
761
|
+
},
|
|
762
|
+
set: function (value) {
|
|
763
|
+
this[privateField] = value;
|
|
764
|
+
if (this[otterComponentInfoPropertyName]) {
|
|
765
|
+
this[otterComponentInfoPropertyName].configId = this[privateField].configId;
|
|
766
|
+
}
|
|
767
|
+
},
|
|
768
|
+
enumerable: true,
|
|
769
|
+
configurable: true
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
};
|
|
754
773
|
/**
|
|
755
774
|
* Decorator to identify the configuration observer
|
|
775
|
+
* @deprecated please use O3rConfig, will be removed in v12
|
|
756
776
|
*/
|
|
757
777
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
758
778
|
function ConfigObserver() {
|
|
759
|
-
return
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
this[privateField] = value;
|
|
768
|
-
if (this[otterComponentInfoPropertyName]) {
|
|
769
|
-
this[otterComponentInfoPropertyName].configId = this[privateField].configId;
|
|
770
|
-
}
|
|
771
|
-
},
|
|
772
|
-
enumerable: true,
|
|
773
|
-
configurable: true
|
|
774
|
-
});
|
|
775
|
-
}
|
|
776
|
-
};
|
|
779
|
+
return decorator;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Decorator to identify the component's configuration
|
|
783
|
+
*/
|
|
784
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
785
|
+
function O3rConfig() {
|
|
786
|
+
return decorator;
|
|
777
787
|
}
|
|
778
788
|
|
|
779
789
|
class ConfigurationObserver {
|
|
@@ -809,9 +819,25 @@ class ConfigurationObserver {
|
|
|
809
819
|
}
|
|
810
820
|
}
|
|
811
821
|
|
|
822
|
+
/**
|
|
823
|
+
* Get a configuration signal
|
|
824
|
+
* @param configInput
|
|
825
|
+
* @param configId
|
|
826
|
+
* @param defaultConfig
|
|
827
|
+
* @param configurationService
|
|
828
|
+
*/
|
|
829
|
+
const configSignal = (configInput, configId, defaultConfig, configurationService) => {
|
|
830
|
+
if (configurationService) {
|
|
831
|
+
configurationService.extendConfiguration(defaultConfig, configId);
|
|
832
|
+
}
|
|
833
|
+
const signal = toSignal(toObservable(configInput).pipe(configurationService ? configurationService.getComponentConfig(configId, defaultConfig) : getConfiguration(defaultConfig), shareReplay$1({ bufferSize: 1, refCount: true })), { initialValue: defaultConfig });
|
|
834
|
+
signal.configId = configId;
|
|
835
|
+
return signal;
|
|
836
|
+
};
|
|
837
|
+
|
|
812
838
|
/**
|
|
813
839
|
* Generated bundle index. Do not edit.
|
|
814
840
|
*/
|
|
815
841
|
|
|
816
|
-
export { CONFIGURATION_REDUCER_TOKEN, CONFIGURATION_STORE_NAME, CONFIG_OVERRIDE_REDUCER_TOKEN, CONFIG_OVERRIDE_STORE_NAME, ConfigObserver, ConfigOverrideStoreModule, ConfigurationBaseService, ConfigurationBaseServiceModule, ConfigurationDevtoolsConsoleService, ConfigurationDevtoolsMessageService, ConfigurationDevtoolsModule, ConfigurationObserver, ConfigurationStoreModule, OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, OtterConfigurationDevtools, clearConfigurationEntities, computeConfiguration, computeConfigurationName, configOverrideInitialState, configOverrideReducer, configOverrideReducerFeatures, configOverrideStorageDeserializer, configOverrideStorageSync, 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 };
|
|
842
|
+
export { CONFIGURATION_REDUCER_TOKEN, CONFIGURATION_STORE_NAME, CONFIG_OVERRIDE_REDUCER_TOKEN, CONFIG_OVERRIDE_STORE_NAME, ConfigObserver, ConfigOverrideStoreModule, ConfigurationBaseService, ConfigurationBaseServiceModule, ConfigurationDevtoolsConsoleService, ConfigurationDevtoolsMessageService, ConfigurationDevtoolsModule, ConfigurationObserver, ConfigurationStoreModule, O3rConfig, OTTER_CONFIGURATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_CONFIGURATION_DEVTOOLS_OPTIONS, OtterConfigurationDevtools, clearConfigurationEntities, computeConfiguration, computeConfigurationName, 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 };
|
|
817
843
|
//# sourceMappingURL=o3r-configuration.mjs.map
|