@o3r/components 14.4.0-prerelease.9 → 14.4.0-rc.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.
- package/builders/component-extractor/helpers/component/component-config-extractor.d.ts.map +1 -1
- package/builders/component-extractor/helpers/component/component-config-extractor.js.map +1 -1
- package/fesm2022/o3r-components-rules-engine.mjs +46 -22
- package/fesm2022/o3r-components-rules-engine.mjs.map +1 -1
- package/fesm2022/o3r-components.mjs +53 -53
- package/fesm2022/o3r-components.mjs.map +1 -1
- package/package.json +16 -11
- package/types/o3r-components-rules-engine.d.ts +29 -2
- package/types/o3r-components-rules-engine.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/components",
|
|
3
|
-
"version": "14.4.0-
|
|
3
|
+
"version": "14.4.0-rc.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -44,15 +44,16 @@
|
|
|
44
44
|
"@ngrx/effects": "^21.0.0",
|
|
45
45
|
"@ngrx/entity": "^21.0.0",
|
|
46
46
|
"@ngrx/store": "^21.0.0",
|
|
47
|
-
"@o3r/analytics": "~14.4.0-
|
|
48
|
-
"@o3r/configuration": "~14.4.0-
|
|
49
|
-
"@o3r/core": "~14.4.0-
|
|
50
|
-
"@o3r/dynamic-content": "~14.4.0-
|
|
51
|
-
"@o3r/extractors": "~14.4.0-
|
|
52
|
-
"@o3r/localization": "~14.4.0-
|
|
53
|
-
"@o3r/logger": "~14.4.0-
|
|
54
|
-
"@o3r/rules-engine": "~14.4.0-
|
|
55
|
-
"@o3r/schematics": "~14.4.0-
|
|
47
|
+
"@o3r/analytics": "~14.4.0-rc.0",
|
|
48
|
+
"@o3r/configuration": "~14.4.0-rc.0",
|
|
49
|
+
"@o3r/core": "~14.4.0-rc.0",
|
|
50
|
+
"@o3r/dynamic-content": "~14.4.0-rc.0",
|
|
51
|
+
"@o3r/extractors": "~14.4.0-rc.0",
|
|
52
|
+
"@o3r/localization": "~14.4.0-rc.0",
|
|
53
|
+
"@o3r/logger": "~14.4.0-rc.0",
|
|
54
|
+
"@o3r/rules-engine": "~14.4.0-rc.0",
|
|
55
|
+
"@o3r/schematics": "~14.4.0-rc.0",
|
|
56
|
+
"@o3r/transloco": "~14.4.0-rc.0",
|
|
56
57
|
"@schematics/angular": "^21.0.0",
|
|
57
58
|
"@yarnpkg/cli": "^4.0.0",
|
|
58
59
|
"@yarnpkg/core": "^4.1.1",
|
|
@@ -95,6 +96,9 @@
|
|
|
95
96
|
"@o3r/schematics": {
|
|
96
97
|
"optional": true
|
|
97
98
|
},
|
|
99
|
+
"@o3r/transloco": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
98
102
|
"@schematics/angular": {
|
|
99
103
|
"optional": true
|
|
100
104
|
},
|
|
@@ -133,7 +137,7 @@
|
|
|
133
137
|
}
|
|
134
138
|
},
|
|
135
139
|
"dependencies": {
|
|
136
|
-
"@o3r/schematics": "~14.4.0-
|
|
140
|
+
"@o3r/schematics": "~14.4.0-rc.0",
|
|
137
141
|
"tslib": "^2.6.2"
|
|
138
142
|
},
|
|
139
143
|
"engines": {
|
|
@@ -147,6 +151,7 @@
|
|
|
147
151
|
"module": "fesm2022/o3r-components.mjs",
|
|
148
152
|
"typings": "types/o3r-components.d.ts",
|
|
149
153
|
"sideEffects": false,
|
|
154
|
+
"type": "module",
|
|
150
155
|
"contributors": [
|
|
151
156
|
{
|
|
152
157
|
"name": "Yannick Adam",
|
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
import { RulesEngineAction, RulesEngineActionHandler } from '@o3r/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
3
|
import * as i2 from '@o3r/components';
|
|
4
4
|
import { PlaceholderRequestReply } from '@o3r/components';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import * as i1 from '@ngrx/effects';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Minimal subset of the underlying translation service (ngx-translate's `TranslateService` or
|
|
10
|
+
* transloco's `TranslocoService`) exposing language-change notifications.
|
|
11
|
+
* TODO: remove this abstraction and rely on the single supported translation service in v16
|
|
12
|
+
*/
|
|
13
|
+
interface PlaceholderTranslateService {
|
|
14
|
+
/** Language-change stream exposed by ngx-translate (`@o3r/localization`) */
|
|
15
|
+
onLangChange?: Observable<{
|
|
16
|
+
lang: string;
|
|
17
|
+
}>;
|
|
18
|
+
/** Language-change stream exposed by transloco (`@o3r/transloco`) */
|
|
19
|
+
langChanges$?: Observable<string>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Minimal subset of the `LocalizationService` API (from `@o3r/localization` or `@o3r/transloco`)
|
|
23
|
+
* used by the placeholder rules engine. Declared locally so that neither package is a hard dependency.
|
|
24
|
+
* TODO: remove this abstraction and import `LocalizationService` directly from the single supported translation package in v16
|
|
25
|
+
*/
|
|
26
|
+
interface PlaceholderLocalizationService {
|
|
27
|
+
/** Translate a localization key, resolving the given interpolation parameters */
|
|
28
|
+
translate(key: string, interpolateParams?: object): Observable<string>;
|
|
29
|
+
/** Get the underlying translation service used by the localization service */
|
|
30
|
+
getTranslateService(): PlaceholderTranslateService;
|
|
31
|
+
/** Get the current active language */
|
|
32
|
+
getCurrentLanguage(): string;
|
|
33
|
+
}
|
|
8
34
|
/** ActionUpdatePlaceholderBlock */
|
|
9
35
|
declare const RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE = "UPDATE_PLACEHOLDER";
|
|
10
36
|
/**
|
|
@@ -23,6 +49,7 @@ interface ActionUpdatePlaceholderBlock extends RulesEngineAction {
|
|
|
23
49
|
declare class PlaceholderRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdatePlaceholderBlock> {
|
|
24
50
|
private readonly logger;
|
|
25
51
|
private readonly injector;
|
|
52
|
+
private readonly translationService;
|
|
26
53
|
protected placeholdersActions$: Subject<{
|
|
27
54
|
placeholderId: string;
|
|
28
55
|
templateUrl: string;
|
|
@@ -55,5 +82,5 @@ declare class PlaceholderRulesEngineActionModule {
|
|
|
55
82
|
}
|
|
56
83
|
|
|
57
84
|
export { PlaceholderRulesEngineActionHandler, PlaceholderRulesEngineActionModule, RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE };
|
|
58
|
-
export type { ActionUpdatePlaceholderBlock };
|
|
85
|
+
export type { ActionUpdatePlaceholderBlock, PlaceholderLocalizationService, PlaceholderTranslateService };
|
|
59
86
|
//# sourceMappingURL=o3r-components-rules-engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o3r-components-rules-engine.d.ts","sources":["../../src/rules-engine/placeholder-interfaces.ts","../../src/rules-engine/placeholder-action-handler.ts","../../src/rules-engine/placeholder-rules-engine-module.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"o3r-components-rules-engine.d.ts","sources":["../../src/rules-engine/placeholder-interfaces.ts","../../src/rules-engine/placeholder-action-handler.ts","../../src/rules-engine/placeholder-rules-engine-module.ts"],"mappings":";;;;;;;AAOA;;;;AAIG;UACc,2BAA2B;;mBAE3B,UAAU;;AAAiB;;AAE1C,mBAAe,UAAU;AAC1B;AAED;;;;AAIG;UACc,8BAA8B;;AAE7C,wDAAoD,UAAU;;2BAEvC,2BAA2B;;;AAGnD;AAED;AACA,cAAa,2CAA2C;AAExD;;AAEG;AACG,UAAW,4BAA6B,SAAQ,iBAAiB;uBAClD,2CAA2C;;;;AAI/D;;ACMD;;AAEG;AACH,cACa,mCAAoC,YAAW,wBAAwB,CAAC,4BAA4B;AAC/G;AACA;AAIA;AAOA,oCAAgC,OAAO;;;;AAAiE;;AAGxG;;AA2HA;;;;AAIG;AACH;AAOA;;;AAGG;6CAC4C,OAAO,CAAC,uBAAuB;;AAOvE,4BAAwB,4BAA4B;yCAlKhD,mCAAmC;6CAAnC,mCAAmC;AA2K/C;;AChND,cAUa,kCAAkC;yCAAlC,kCAAkC;0CAAlC,kCAAkC,iBAAA,EAAA,CAAA,oBAAA,SAAA,EAAA,CAAA,6BAAA,SAAA,EAAA,CAAA,8BAAA;0CAAlC,kCAAkC;AAAG;;;;","names":[]}
|