@o3r/localization 15.3.0-prerelease.9 → 15.4.0-prerelease.0

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.
@@ -1,57 +1,90 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Injectable, NgModule } from '@angular/core';
3
- import { Store } from '@ngrx/store';
4
- import { setLocalizationOverride, LocalizationOverrideStoreModule } from '@o3r/localization';
5
-
6
- /** ActionUpdateLocalisationBlock */
7
- const RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE = 'UPDATE_LOCALISATION';
8
-
9
- /**
10
- * Service to handle async Localization actions
11
- */
12
- class LocalizationRulesEngineActionHandler {
13
- constructor() {
14
- this.store = inject(Store);
15
- /** @inheritdoc */
16
- this.supportingActions = [RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE];
17
- }
18
- /** @inheritdoc */
19
- executeActions(actions) {
20
- const localizationOverrides = actions.reduce((acc, { key, value }) => {
21
- acc[key] = value;
22
- return acc;
23
- }, {});
24
- this.store.dispatch(setLocalizationOverride({ state: { localizationOverrides } }));
25
- }
26
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: LocalizationRulesEngineActionHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
27
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: LocalizationRulesEngineActionHandler }); }
28
- }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: LocalizationRulesEngineActionHandler, decorators: [{
30
- type: Injectable
31
- }] });
32
-
33
- class LocalizationRulesEngineActionModule {
34
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: LocalizationRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
35
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.0", ngImport: i0, type: LocalizationRulesEngineActionModule, imports: [LocalizationOverrideStoreModule] }); }
36
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: LocalizationRulesEngineActionModule, providers: [
37
- LocalizationRulesEngineActionHandler
38
- ], imports: [LocalizationOverrideStoreModule] }); }
39
- }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: LocalizationRulesEngineActionModule, decorators: [{
41
- type: NgModule,
42
- args: [{
43
- imports: [
44
- LocalizationOverrideStoreModule
45
- ],
46
- providers: [
47
- LocalizationRulesEngineActionHandler
48
- ]
49
- }]
50
- }] });
51
-
52
- /**
53
- * Generated bundle index. Do not edit.
54
- */
55
-
1
+ import * as i0 from "@angular/core";
2
+ import { Injectable, NgModule, inject } from "@angular/core";
3
+ import { Store } from "@ngrx/store";
4
+ import { LocalizationOverrideStoreModule, setLocalizationOverride } from "@o3r/localization";
5
+ const RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE = "UPDATE_LOCALISATION";
6
+ var LocalizationRulesEngineActionHandler = class LocalizationRulesEngineActionHandler {
7
+ constructor() {
8
+ this.store = inject(Store);
9
+ this.supportingActions = [RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE];
10
+ }
11
+ executeActions(actions) {
12
+ const localizationOverrides = actions.reduce((acc, { key, value }) => {
13
+ acc[key] = value;
14
+ return acc;
15
+ }, {});
16
+ this.store.dispatch(setLocalizationOverride({ state: { localizationOverrides } }));
17
+ }
18
+ static {
19
+ this.ɵfac = i0.ɵɵngDeclareFactory({
20
+ minVersion: "12.0.0",
21
+ version: "22.2.3",
22
+ ngImport: i0,
23
+ type: LocalizationRulesEngineActionHandler,
24
+ deps: [],
25
+ target: i0.ɵɵFactoryTarget.Injectable
26
+ });
27
+ }
28
+ static {
29
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
30
+ minVersion: "12.0.0",
31
+ version: "22.2.3",
32
+ ngImport: i0,
33
+ type: LocalizationRulesEngineActionHandler
34
+ });
35
+ }
36
+ };
37
+ i0.ɵɵngDeclareClassMetadata({
38
+ minVersion: "12.0.0",
39
+ version: "22.2.3",
40
+ ngImport: i0,
41
+ type: LocalizationRulesEngineActionHandler,
42
+ decorators: [{ type: Injectable }]
43
+ });
44
+ var LocalizationRulesEngineActionModule = class LocalizationRulesEngineActionModule {
45
+ static {
46
+ this.ɵfac = i0.ɵɵngDeclareFactory({
47
+ minVersion: "12.0.0",
48
+ version: "22.2.3",
49
+ ngImport: i0,
50
+ type: LocalizationRulesEngineActionModule,
51
+ deps: [],
52
+ target: i0.ɵɵFactoryTarget.NgModule
53
+ });
54
+ }
55
+ static {
56
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
57
+ minVersion: "14.0.0",
58
+ version: "22.2.3",
59
+ ngImport: i0,
60
+ type: LocalizationRulesEngineActionModule,
61
+ imports: [LocalizationOverrideStoreModule]
62
+ });
63
+ }
64
+ static {
65
+ this.ɵinj = i0.ɵɵngDeclareInjector({
66
+ minVersion: "12.0.0",
67
+ version: "22.2.3",
68
+ ngImport: i0,
69
+ type: LocalizationRulesEngineActionModule,
70
+ providers: [LocalizationRulesEngineActionHandler],
71
+ imports: [LocalizationOverrideStoreModule]
72
+ });
73
+ }
74
+ };
75
+ i0.ɵɵngDeclareClassMetadata({
76
+ minVersion: "12.0.0",
77
+ version: "22.2.3",
78
+ ngImport: i0,
79
+ type: LocalizationRulesEngineActionModule,
80
+ decorators: [{
81
+ type: NgModule,
82
+ args: [{
83
+ imports: [LocalizationOverrideStoreModule],
84
+ providers: [LocalizationRulesEngineActionHandler]
85
+ }]
86
+ }]
87
+ });
56
88
  export { LocalizationRulesEngineActionHandler, LocalizationRulesEngineActionModule, RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE };
57
- //# sourceMappingURL=o3r-localization-rules-engine.mjs.map
89
+
90
+ //# sourceMappingURL=o3r-localization-rules-engine.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-localization-rules-engine.mjs","sources":["../../src/rules-engine/localization-interfaces.ts","../../src/rules-engine/localization-rules-engine-action-handler.ts","../../src/rules-engine/localization-rules-engine-module.ts","../../src/rules-engine/o3r-localization-rules-engine.ts"],"sourcesContent":["import type {\n RulesEngineAction,\n} from '@o3r/core';\n\n/** ActionUpdateLocalisationBlock */\nexport const RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE = 'UPDATE_LOCALISATION';\n\n/**\n * Content of action that updates localization\n */\nexport interface ActionUpdateLocalisationBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE;\n key: string;\n value: 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 ActionUpdateLocalisationBlock,\n RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE,\n} from './localization-interfaces';\nimport {\n LocalizationOverrideStore,\n setLocalizationOverride,\n} from '@o3r/localization';\n\n/**\n * Service to handle async Localization actions\n */\n@Injectable()\nexport class LocalizationRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdateLocalisationBlock> {\n private readonly store = inject<Store<LocalizationOverrideStore>>(Store);\n\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE] as const;\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdateLocalisationBlock[]): void | Promise<void> {\n const localizationOverrides = actions.reduce<Record<string, string>>((acc, { key, value }) => {\n acc[key] = value;\n return acc;\n }, {});\n\n this.store.dispatch(setLocalizationOverride({ state: { localizationOverrides } }));\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n LocalizationRulesEngineActionHandler,\n} from './localization-rules-engine-action-handler';\nimport {\n LocalizationOverrideStoreModule,\n} from '@o3r/localization';\n\n@NgModule({\n imports: [\n LocalizationOverrideStoreModule\n ],\n providers: [\n LocalizationRulesEngineActionHandler\n ]\n})\nexport class LocalizationRulesEngineActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAIA;AACO,MAAM,4CAA4C,GAAG;;ACc5D;;AAEG;MAEU,oCAAoC,CAAA;AADjD,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAmC,KAAK,CAAC;;AAGxD,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,4CAA4C,CAAU;AAW5F,IAAA;;AARQ,IAAA,cAAc,CAAC,OAAwC,EAAA;AAC5D,QAAA,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAyB,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,KAAI;AAC3F,YAAA,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AAChB,YAAA,OAAO,GAAG;QACZ,CAAC,EAAE,EAAE,CAAC;AAEN,QAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,KAAK,EAAE,EAAE,qBAAqB,EAAE,EAAE,CAAC,CAAC;IACpF;iIAdW,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;qIAApC,oCAAoC,EAAA,CAAA,CAAA;;2FAApC,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBADhD;;;MCJY,mCAAmC,CAAA;iIAAnC,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnC,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,mCAAmC,YAN5C,+BAA+B,CAAA,EAAA,CAAA,CAAA;AAMtB,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,mCAAmC,EAAA,SAAA,EAJnC;YACT;AACD,SAAA,EAAA,OAAA,EAAA,CAJC,+BAA+B,CAAA,EAAA,CAAA,CAAA;;2FAMtB,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAR/C,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-localization-rules-engine.mjs","names":[],"sources":["../../src/rules-engine/localization-interfaces.ts","../../src/rules-engine/localization-rules-engine-action-handler.ts","../../src/rules-engine/localization-rules-engine-module.ts"],"sourcesContent":["import type {\n RulesEngineAction,\n} from '@o3r/core';\n\n/** ActionUpdateLocalisationBlock */\nexport const RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE = 'UPDATE_LOCALISATION';\n\n/**\n * Content of action that updates localization\n */\nexport interface ActionUpdateLocalisationBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE;\n key: string;\n value: 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 ActionUpdateLocalisationBlock,\n RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE,\n} from './localization-interfaces';\nimport {\n LocalizationOverrideStore,\n setLocalizationOverride,\n} from '@o3r/localization';\n\n/**\n * Service to handle async Localization actions\n */\n@Injectable()\nexport class LocalizationRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdateLocalisationBlock> {\n private readonly store = inject<Store<LocalizationOverrideStore>>(Store);\n\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE] as const;\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdateLocalisationBlock[]): void | Promise<void> {\n const localizationOverrides = actions.reduce<Record<string, string>>((acc, { key, value }) => {\n acc[key] = value;\n return acc;\n }, {});\n\n this.store.dispatch(setLocalizationOverride({ state: { localizationOverrides } }));\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n LocalizationRulesEngineActionHandler,\n} from './localization-rules-engine-action-handler';\nimport {\n LocalizationOverrideStoreModule,\n} from '@o3r/localization';\n\n@NgModule({\n imports: [\n LocalizationOverrideStoreModule\n ],\n providers: [\n LocalizationRulesEngineActionHandler\n ]\n})\nexport class LocalizationRulesEngineActionModule {}\n"],"mappings":";;;;AAKA,MAAa,+CAA+C;ACkB5D,IAAa,uCAAb,MAAa,qCAAoC;CADjD,cAAA;EAEmB,KAAA,QAAQ,OAAyC,KAAK;EAGvD,KAAA,oBAAoB,CAAC,4CAA4C;CAWlF;CARQ,eAAe,SAAwC;EAC5D,MAAM,wBAAwB,QAAQ,QAAgC,KAAK,EAAE,KAAK,YAAW;GAC3F,IAAI,OAAO;GACX,OAAO;EACT,GAAG,CAAA,CAAE;EAEL,KAAK,MAAM,SAAS,wBAAwB,EAAE,OAAO,EAAE,sBAAqB,EAAE,CAAE,CAAC;CACnF;CAdW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoC,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAApC;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;EAAoC,CAAA;CAAA;;AAApC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoC,YAAA,CAAA,EADhD,MAAA,W;;ACJD,IAAa,sCAAb,MAAa,oCAAmC;CAAnC;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmC,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAnC;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmC,SAAA,CAN5C,+BAA+B;EAAA,CAAA;CAAA;CAMtB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmC,WAJnC,CACT,oCACD;GAAA,SAAA,CAJC,+BAA+B;EAAA,CAAA;CAAA;;AAMtB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmC,YAAA,CAAA;EAR/C,MAAA;EAAS,MAAA,CAAA;GACR,SAAS,CACP,+BACD;GACD,WAAW,CACT,oCACD;EACF,CAAA"}