@o3r/components 14.0.0-next.2 → 14.0.0-next.3
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-class.extractor.d.ts → component-class-extractor.d.ts} +1 -1
- package/builders/component-extractor/helpers/component/{component-class.extractor.d.ts.map → component-class-extractor.d.ts.map} +1 -1
- package/builders/component-extractor/helpers/component/{component-class.extractor.js → component-class-extractor.js} +1 -1
- package/builders/component-extractor/helpers/component/{component-config.extractor.d.ts → component-config-extractor.d.ts} +1 -1
- package/builders/component-extractor/helpers/component/{component-config.extractor.d.ts.map → component-config-extractor.d.ts.map} +1 -1
- package/builders/component-extractor/helpers/component/{component-config.extractor.js → component-config-extractor.js} +1 -1
- package/builders/component-extractor/helpers/component/{component.extractor.d.ts → component-extractor.d.ts} +2 -2
- package/builders/component-extractor/helpers/component/{component.extractor.d.ts.map → component-extractor.d.ts.map} +1 -1
- package/builders/component-extractor/helpers/component/{component.extractor.js → component-extractor.js} +1 -1
- package/builders/component-extractor/helpers/component/{component.parser.d.ts → component-parser.d.ts} +3 -3
- package/builders/component-extractor/helpers/component/{component.parser.d.ts.map → component-parser.d.ts.map} +1 -1
- package/builders/component-extractor/helpers/component/{component.parser.js → component-parser.js} +3 -3
- package/builders/component-extractor/helpers/component/index.d.ts +4 -4
- package/builders/component-extractor/helpers/component/index.js +4 -4
- package/builders/component-extractor/schema.json +1 -1
- package/builders/metadata-check/component/helpers/{component-metadata-comparison.helper.d.ts → component-metadata-comparison-helper.d.ts} +1 -1
- package/builders/metadata-check/component/helpers/{component-metadata-comparison.helper.d.ts.map → component-metadata-comparison-helper.d.ts.map} +1 -1
- package/builders/metadata-check/component/helpers/{component-metadata-comparison.helper.js → component-metadata-comparison-helper.js} +1 -1
- package/builders/metadata-check/component/helpers/index.d.ts +1 -1
- package/builders/metadata-check/component/helpers/index.js +1 -1
- package/builders/metadata-check/component/index.js +1 -1
- package/builders/metadata-check/config/helpers/{config-metadata-comparison.helper.d.ts → config-metadata-comparison-helper.d.ts} +1 -1
- package/builders/metadata-check/config/helpers/{config-metadata-comparison.helper.d.ts.map → config-metadata-comparison-helper.d.ts.map} +1 -1
- package/builders/metadata-check/config/helpers/{config-metadata-comparison.helper.js → config-metadata-comparison-helper.js} +1 -1
- package/builders/metadata-check/config/helpers/index.d.ts +1 -1
- package/builders/metadata-check/config/helpers/index.js +1 -1
- package/builders/metadata-check/config/index.js +1 -1
- package/fesm2022/o3r-components-rules-engine.mjs +10 -10
- package/fesm2022/o3r-components-rules-engine.mjs.map +1 -1
- package/fesm2022/o3r-components.mjs +57 -57
- package/fesm2022/o3r-components.mjs.map +1 -1
- package/index.d.ts.map +1 -1
- package/package.json +11 -12
- package/rules-engine/index.d.ts.map +1 -1
- package/builders/component-extractor/helpers/component/component-class.extractor.js.map +0 -1
- package/builders/component-extractor/helpers/component/component-config.extractor.js.map +0 -1
- package/builders/component-extractor/helpers/component/component.extractor.js.map +0 -1
- package/builders/component-extractor/helpers/component/component.parser.js.map +0 -1
- package/builders/component-extractor/helpers/component/index.js.map +0 -1
- package/builders/component-extractor/helpers/index.js.map +0 -1
- package/builders/component-extractor/index.js.map +0 -1
- package/builders/component-extractor/schema.js.map +0 -1
- package/builders/metadata-check/component/helpers/component-metadata-comparison.helper.js.map +0 -1
- package/builders/metadata-check/component/helpers/index.js.map +0 -1
- package/builders/metadata-check/component/index.js.map +0 -1
- package/builders/metadata-check/component/schema.js.map +0 -1
- package/builders/metadata-check/config/helpers/config-metadata-comparison.helper.js.map +0 -1
- package/builders/metadata-check/config/helpers/index.js.map +0 -1
- package/builders/metadata-check/config/index.js.map +0 -1
- package/builders/metadata-check/config/schema.js.map +0 -1
- package/schematics/cms-adapter/index.js.map +0 -1
- package/schematics/ng-add/helpers/devtools-registration.js.map +0 -1
- package/schematics/ng-add/index.js.map +0 -1
- package/schematics/ng-add/schema.js.map +0 -1
- package/schematics/ng-update/v10-0/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-class
|
|
1
|
+
{"version":3,"file":"component-class-extractor.d.ts","sourceRoot":"","sources":["../../../../../builders/component-extractor/helpers/component/component-class-extractor.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACR,MAAM,sBAAsB,CAAC;AAO9B,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EACV,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB,kDAAkD;AAClD,MAAM,WAAW,oBAAoB;IACnC,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,eAAe,EAAE,OAAO,CAAC;IACzB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,IAAI,EAAE,kBAAkB,CAAC;IACzB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,iBAAiB,EAAE,OAAO,CAAC;IAC3B,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,qBAAa,uBAAuB;IAUf,MAAM,EAAE,EAAE,CAAC,UAAU;IAAE,OAAO,CAAC,QAAQ,CAAC,MAAM;IAA4B,QAAQ,EAAE,MAAM;IAT7G,qEAAqE;IACrE,SAAgB,uBAAuB,EAAE,MAAM,EAAE,CAA4E;IAE7H;;;;;OAKG;gBACgB,MAAM,EAAE,EAAE,CAAC,UAAU,EAAmB,MAAM,EAAE,OAAO,CAAC,SAAS,EAAS,QAAQ,EAAE,MAAM;IAE7G;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAI5B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAS5B;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,qBAAqB;IAkB7B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IA2D/B;;;OAGG;IACH,OAAO,CAAC,WAAW;IAoBnB;;OAEG;IACI,OAAO;CAiBf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-config
|
|
1
|
+
{"version":3,"file":"component-config-extractor.d.ts","sourceRoot":"","sources":["../../../../../builders/component-extractor/helpers/component/component-config-extractor.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,EACR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,WAAW,CAAC;AAOnB,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EACV,cAAc,EAIf,MAAM,iBAAiB,CAAC;AAEzB,sDAAsD;AACtD,MAAM,WAAW,wBAAwB;IACvC,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IAEb,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,qEAAqE;IACrE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,8CAA8C;IAC9C,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,kGAAkG;AAClG,MAAM,WAAW,sBAAsB;IACrC,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,iEAAiE;AACjE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AyC;IAoGjD;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAI5B;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IAyBlC;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAWnB;;;OAGG;IACH,OAAO,CAAC,oCAAoC;IA2B5C;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IAwBlC;;OAEG;IACI,OAAO;CA0Bf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logging } from '@angular-devkit/core';
|
|
2
2
|
import type { ComponentExtractorBuilderSchema } from '../../index';
|
|
3
|
-
import { ParserOutput } from './component
|
|
3
|
+
import { ParserOutput } from './component-parser';
|
|
4
4
|
import type { ComponentOutput } from '@o3r/components';
|
|
5
5
|
/**
|
|
6
6
|
* Extracts components metadata
|
|
@@ -91,4 +91,4 @@ export declare class ComponentExtractor {
|
|
|
91
91
|
*/
|
|
92
92
|
extract(parserOutput: ParserOutput, options: ComponentExtractorBuilderSchema): Promise<ComponentOutput>;
|
|
93
93
|
}
|
|
94
|
-
//# sourceMappingURL=component
|
|
94
|
+
//# sourceMappingURL=component-extractor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component
|
|
1
|
+
{"version":3,"file":"component-extractor.d.ts","sourceRoot":"","sources":["../../../../../builders/component-extractor/helpers/component/component-extractor.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACR,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,KAAK,EACV,+BAA+B,EAChC,MAAM,aAAa,CAAC;AAQrB,OAAO,EACL,YAAY,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAGV,eAAe,EAIhB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,qBAAa,kBAAkB;IAkBjB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAA+B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAAqB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAAU,OAAO,CAAC,QAAQ,CAAC,UAAU;IAjBtL,2DAA2D;IAC3D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAE9C,8CAA8C;IAC9C,OAAO,CAAC,iBAAiB,CAAC,CAA4B;IAEtD,oDAAoD;IACpD,OAAO,CAAC,wBAAwB,CAAC,CAA2B;IAE5D;;;;;;;OAOG;gBAC0B,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAmB,MAAM,EAAE,OAAO,CAAC,SAAS,EAAmB,aAAa,EAAE,MAAM,EAAmB,UAAU,UAAQ;IAK9L;;;OAGG;YACW,yBAAyB;IAQvC;;;OAGG;YACW,gCAAgC;IAQ9C;;;OAGG;IACH,OAAO,CAAC,cAAc;IAKtB;;;;;OAKG;IACH,OAAO,CAAC,2BAA2B;IAenC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAKzB;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAU5B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAyCzB;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAiC7B;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IASlC;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;IA+ChC;;;;OAIG;IACU,OAAO,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,eAAe,CAAC;CAsBrH"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { logging } from '@angular-devkit/core';
|
|
2
2
|
import type { CategoryDescription } from '@o3r/core';
|
|
3
|
-
import { ComponentInformation } from './component-class
|
|
4
|
-
import { ConfigurationInformationWrapper } from './component-config
|
|
3
|
+
import { ComponentInformation } from './component-class-extractor';
|
|
4
|
+
import { ConfigurationInformationWrapper } from './component-config-extractor';
|
|
5
5
|
/** Output of a file parsing */
|
|
6
6
|
export interface FileParserOutput {
|
|
7
7
|
/** Path to the file parsed */
|
|
@@ -76,4 +76,4 @@ export declare class ComponentParser {
|
|
|
76
76
|
*/
|
|
77
77
|
parse(): Promise<ParserOutput>;
|
|
78
78
|
}
|
|
79
|
-
//# sourceMappingURL=component
|
|
79
|
+
//# sourceMappingURL=component-parser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component
|
|
1
|
+
{"version":3,"file":"component-parser.d.ts","sourceRoot":"","sources":["../../../../../builders/component-extractor/helpers/component/component-parser.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,mBAAmB,EACpB,MAAM,WAAW,CAAC;AAMnB,OAAO,EAEL,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,+BAA+B,EAChC,MAAM,8BAA8B,CAAC;AAEtC,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IAEb,uCAAuC;IACvC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IAEjC,2CAA2C;IAC3C,aAAa,CAAC,EAAE,+BAA+B,CAAC;CACjD;AAED,kBAAkB;AAClB,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;IACjE,kBAAkB;IAClB,SAAS,EAAE,oBAAoB,CAAC;CACjC;AAED,kBAAkB;AAClB,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;IACrE,kBAAkB;IAClB,aAAa,EAAE,+BAA+B,CAAC;CAChD;AAED,2BAA2B;AAC3B,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,UAAU,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,yBAAyB,CAAA;KAAE,CAAC;IAE1D,mCAAmC;IACnC,cAAc,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,6BAA6B,CAAA;KAAE,CAAC;CACnE;AAED;;GAEG;AACH,qBAAa,eAAe;IAaxB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IAjBzC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAsB;IAEhE;;;;;;;;OAQG;gBAEgB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,OAAO,CAAC,SAAS,EACzB,UAAU,UAAQ,EAClB,SAAS,GAAE,MAAM,EAAO,EACxB,sBAAsB,GAAE,mBAAmB,EAAO;IAKrE,kDAAkD;IAClD,OAAO,CAAC,uBAAuB;IAe/B,8CAA8C;IAC9C,OAAO,CAAC,oBAAoB;IAK5B;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAKpB;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAuCxB;;;OAGG;IACU,KAAK,IAAI,OAAO,CAAC,YAAY,CAAC;CA4B5C"}
|
package/builders/component-extractor/helpers/component/{component.parser.js → component-parser.js}
RENAMED
|
@@ -6,8 +6,8 @@ const path = tslib_1.__importStar(require("node:path"));
|
|
|
6
6
|
const schematics_1 = require("@o3r/schematics");
|
|
7
7
|
const globby_1 = tslib_1.__importDefault(require("globby"));
|
|
8
8
|
const ts = tslib_1.__importStar(require("typescript"));
|
|
9
|
-
const component_class_extractor_1 = require("./component-class
|
|
10
|
-
const component_config_extractor_1 = require("./component-config
|
|
9
|
+
const component_class_extractor_1 = require("./component-class-extractor");
|
|
10
|
+
const component_config_extractor_1 = require("./component-config-extractor");
|
|
11
11
|
/**
|
|
12
12
|
* Component extractor parser.
|
|
13
13
|
*/
|
|
@@ -130,4 +130,4 @@ class ComponentParser {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
exports.ComponentParser = ComponentParser;
|
|
133
|
-
//# sourceMappingURL=component
|
|
133
|
+
//# sourceMappingURL=component-parser.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './component-class
|
|
2
|
-
export * from './component-config
|
|
3
|
-
export * from './component
|
|
4
|
-
export * from './component
|
|
1
|
+
export * from './component-class-extractor';
|
|
2
|
+
export * from './component-config-extractor';
|
|
3
|
+
export * from './component-extractor';
|
|
4
|
+
export * from './component-parser';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./component-class
|
|
5
|
-
tslib_1.__exportStar(require("./component-config
|
|
6
|
-
tslib_1.__exportStar(require("./component
|
|
7
|
-
tslib_1.__exportStar(require("./component
|
|
4
|
+
tslib_1.__exportStar(require("./component-class-extractor"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./component-config-extractor"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./component-extractor"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./component-parser"), exports);
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -21,4 +21,4 @@ export interface MigrationComponentData {
|
|
|
21
21
|
* Comparator used to compare one version of component metadata with another
|
|
22
22
|
*/
|
|
23
23
|
export declare const componentMetadataComparator: Readonly<MetadataComparator<ComponentClassOutput, MigrationComponentData, ComponentClassOutput[]>>;
|
|
24
|
-
//# sourceMappingURL=component-metadata-comparison
|
|
24
|
+
//# sourceMappingURL=component-metadata-comparison-helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-metadata-comparison
|
|
1
|
+
{"version":3,"file":"component-metadata-comparison-helper.d.ts","sourceRoot":"","sources":["../../../../../builders/metadata-check/component/helpers/component-metadata-comparison-helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA4BD;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,kBAAkB,CAAC,oBAAoB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,CAAC,CAKjI,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './component-metadata-comparison
|
|
1
|
+
export * from './component-metadata-comparison-helper';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./component-metadata-comparison
|
|
4
|
+
tslib_1.__exportStar(require("./component-metadata-comparison-helper"), exports);
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const architect_1 = require("@angular-devkit/architect");
|
|
4
4
|
const extractors_1 = require("@o3r/extractors");
|
|
5
|
-
const component_metadata_comparison_helper_1 = require("./helpers/component-metadata-comparison
|
|
5
|
+
const component_metadata_comparison_helper_1 = require("./helpers/component-metadata-comparison-helper");
|
|
6
6
|
exports.default = (0, architect_1.createBuilder)((0, extractors_1.createBuilderWithMetricsIfInstalled)((options, context) => {
|
|
7
7
|
return (0, extractors_1.checkMetadataBuilder)({ ...options, packageJsonEntry: 'componentFilePath' }, context, component_metadata_comparison_helper_1.componentMetadataComparator);
|
|
8
8
|
}));
|
|
@@ -19,4 +19,4 @@ export interface MigrationConfigData {
|
|
|
19
19
|
* Comparator used to compare one version of config metadata with another
|
|
20
20
|
*/
|
|
21
21
|
export declare const configMetadataComparator: Readonly<MetadataComparator<ComponentConfigOutput, MigrationConfigData, ComponentConfigOutput[]>>;
|
|
22
|
-
//# sourceMappingURL=config-metadata-comparison
|
|
22
|
+
//# sourceMappingURL=config-metadata-comparison-helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-metadata-comparison
|
|
1
|
+
{"version":3,"file":"config-metadata-comparison-helper.d.ts","sourceRoot":"","sources":["../../../../../builders/metadata-check/config/helpers/config-metadata-comparison-helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4BD;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,CAAC,CAK7H,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './config-metadata-comparison
|
|
1
|
+
export * from './config-metadata-comparison-helper';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./config-metadata-comparison
|
|
4
|
+
tslib_1.__exportStar(require("./config-metadata-comparison-helper"), exports);
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const architect_1 = require("@angular-devkit/architect");
|
|
4
4
|
const extractors_1 = require("@o3r/extractors");
|
|
5
|
-
const config_metadata_comparison_helper_1 = require("./helpers/config-metadata-comparison
|
|
5
|
+
const config_metadata_comparison_helper_1 = require("./helpers/config-metadata-comparison-helper");
|
|
6
6
|
exports.default = (0, architect_1.createBuilder)((0, extractors_1.createBuilderWithMetricsIfInstalled)((options, context) => {
|
|
7
7
|
return (0, extractors_1.checkMetadataBuilder)({ ...options, packageJsonEntry: 'configurationFilePath' }, context, config_metadata_comparison_helper_1.configMetadataComparator);
|
|
8
8
|
}));
|
|
@@ -153,10 +153,10 @@ class PlaceholderRulesEngineActionHandler {
|
|
|
153
153
|
}));
|
|
154
154
|
this.placeholdersActions$.next(templates);
|
|
155
155
|
}
|
|
156
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
157
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
156
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: PlaceholderRulesEngineActionHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
157
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: PlaceholderRulesEngineActionHandler }); }
|
|
158
158
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: PlaceholderRulesEngineActionHandler, decorators: [{
|
|
160
160
|
type: Injectable
|
|
161
161
|
}], ctorParameters: () => [] });
|
|
162
162
|
|
|
@@ -260,24 +260,24 @@ class PlaceholderTemplateResponseEffect {
|
|
|
260
260
|
})))
|
|
261
261
|
: of({ renderedTemplate: template, unknownTypeFound });
|
|
262
262
|
}
|
|
263
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
264
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
263
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: PlaceholderTemplateResponseEffect, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
264
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: PlaceholderTemplateResponseEffect }); }
|
|
265
265
|
}
|
|
266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: PlaceholderTemplateResponseEffect, decorators: [{
|
|
267
267
|
type: Injectable
|
|
268
268
|
}] });
|
|
269
269
|
|
|
270
270
|
class PlaceholderRulesEngineActionModule {
|
|
271
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
272
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
271
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: PlaceholderRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
272
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.13", ngImport: i0, type: PlaceholderRulesEngineActionModule, imports: [i1.EffectsFeatureModule, PlaceholderRequestStoreModule,
|
|
273
273
|
PlaceholderTemplateStoreModule] }); }
|
|
274
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
274
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: PlaceholderRulesEngineActionModule, providers: [
|
|
275
275
|
PlaceholderRulesEngineActionHandler
|
|
276
276
|
], imports: [EffectsModule.forFeature([PlaceholderTemplateResponseEffect]),
|
|
277
277
|
PlaceholderRequestStoreModule,
|
|
278
278
|
PlaceholderTemplateStoreModule] }); }
|
|
279
279
|
}
|
|
280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: PlaceholderRulesEngineActionModule, decorators: [{
|
|
281
281
|
type: NgModule,
|
|
282
282
|
args: [{
|
|
283
283
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o3r-components-rules-engine.mjs","sources":["../../src/rules-engine/placeholder.interfaces.ts","../../src/rules-engine/placeholder.action-handler.ts","../../src/rules-engine/placeholder.rules-engine.effect.ts","../../src/rules-engine/placeholder.rules-engine.module.ts","../../src/rules-engine/o3r-components-rules-engine.ts"],"sourcesContent":["import type {\n RulesEngineAction,\n} from '@o3r/core';\n\n/** ActionUpdatePlaceholderBlock */\nexport const RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE = 'UPDATE_PLACEHOLDER';\n\n/**\n * Content of action that updates a placeholder\n */\nexport interface ActionUpdatePlaceholderBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE;\n placeholderId: string;\n value: string;\n priority?: number;\n}\n","import {\n inject,\n Injectable,\n Injector,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n select,\n Store,\n} from '@ngrx/store';\nimport type {\n RulesEngineActionHandler,\n} from '@o3r/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LocalizationService,\n} from '@o3r/localization';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n combineLatest,\n distinctUntilChanged,\n firstValueFrom,\n map,\n of,\n startWith,\n Subject,\n withLatestFrom,\n} from 'rxjs';\nimport {\n ActionUpdatePlaceholderBlock,\n RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE,\n} from './placeholder.interfaces';\nimport {\n deletePlaceholderTemplateEntity,\n PlaceholderRequestReply,\n PlaceholderTemplateStore,\n selectPlaceholderRequestEntities,\n selectPlaceholderTemplateEntities,\n setPlaceholderRequestEntityFromUrl,\n setPlaceholderTemplateEntity,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdatePlaceholderBlock> {\n private readonly logger = inject(LoggerService);\n private readonly injector = inject(Injector);\n\n protected placeholdersActions$: Subject<{ placeholderId: string; templateUrl: string; priority: number }[]> = new Subject();\n\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE] as const;\n\n constructor() {\n const store = inject<Store<PlaceholderTemplateStore>>(Store);\n const translateService = inject(LocalizationService, { optional: true });\n\n const lang$ = translateService\n ? translateService.getTranslateService().onLangChange.pipe(\n map(({ lang }) => lang),\n startWith(translateService.getCurrentLanguage()),\n distinctUntilChanged()\n )\n : of(null);\n\n const filteredActions$ = combineLatest([\n lang$,\n this.placeholdersActions$.pipe(\n distinctUntilChanged((prev, next) => JSON.stringify(prev) === JSON.stringify(next))\n )\n ]).pipe(\n withLatestFrom(\n combineLatest([store.pipe(select(selectPlaceholderTemplateEntities)), store.pipe(select(selectPlaceholderRequestEntities))])\n ),\n map(([langAndTemplatesUrls, storedPlaceholdersAndRequests]) => {\n const [lang, placeholderActions] = langAndTemplatesUrls;\n const storedPlaceholders = storedPlaceholdersAndRequests[0] || {};\n const storedPlaceholderRequests = storedPlaceholdersAndRequests[1] || {};\n const placeholderNewRequests: { rawUrl: string; resolvedUrl: string }[] = [];\n // Stores all raw Urls used from the current engine execution\n const usedUrls: Record<string, boolean> = {};\n // Get all Urls that needs to be resolved from current rules engine output\n const placeholdersTemplates = placeholderActions.reduce((acc, placeholderAction) => {\n const placeholdersTemplateUrl = {\n rawUrl: placeholderAction.templateUrl,\n priority: placeholderAction.priority\n };\n if (acc[placeholderAction.placeholderId]) {\n acc[placeholderAction.placeholderId].push(placeholdersTemplateUrl);\n } else {\n acc[placeholderAction.placeholderId] = [placeholdersTemplateUrl];\n }\n const resolvedUrl = this.resolveUrlWithLang(placeholderAction.templateUrl, lang);\n // Filters duplicates and resolved urls that are already in the store\n if (!usedUrls[placeholderAction.templateUrl] && (!storedPlaceholderRequests[placeholderAction.templateUrl]\n || storedPlaceholderRequests[placeholderAction.templateUrl]!.resolvedUrl !== resolvedUrl)) {\n placeholderNewRequests.push({\n rawUrl: placeholderAction.templateUrl,\n resolvedUrl: this.resolveUrlWithLang(placeholderAction.templateUrl, lang)\n });\n }\n usedUrls[placeholderAction.templateUrl] = true;\n return acc;\n }, {} as { [key: string]: { rawUrl: string; priority: number }[] });\n // Urls not used anymore and not already disabled\n const placeholderRequestsToDisable: string[] = [];\n // Urls used that were disabled\n const placeholderRequestsToEnable: string[] = [];\n Object.keys(storedPlaceholderRequests).forEach((storedPlaceholderRequestRawUrl) => {\n const usedFromEngineIteration = usedUrls[storedPlaceholderRequestRawUrl];\n const usedFromStore = (storedPlaceholderRequests && storedPlaceholderRequests[storedPlaceholderRequestRawUrl]) ? storedPlaceholderRequests[storedPlaceholderRequestRawUrl].used : false;\n if (!usedFromEngineIteration && usedFromStore) {\n placeholderRequestsToDisable.push(storedPlaceholderRequestRawUrl);\n } else if (usedFromEngineIteration && !usedFromStore) {\n placeholderRequestsToEnable.push(storedPlaceholderRequestRawUrl);\n }\n });\n // Placeholder that are no longer filled by the current engine execution output will be cleared\n const placeholdersTemplatesToBeCleanedUp = Object.keys(storedPlaceholders)\n .filter((placeholderId) => !placeholdersTemplates[placeholderId]);\n\n const placeholdersTemplatesToBeSet = Object.keys(placeholdersTemplates).reduce((changedPlaceholderTemplates, placeholderTemplateId) => {\n // Caching if the placeholder template already exists with the same urls\n if (!storedPlaceholders[placeholderTemplateId]\n || !(JSON.stringify(storedPlaceholders[placeholderTemplateId].urlsWithPriority) === JSON.stringify(placeholdersTemplates[placeholderTemplateId]))) {\n changedPlaceholderTemplates.push({\n id: placeholderTemplateId,\n urlsWithPriority: placeholdersTemplates[placeholderTemplateId]\n });\n }\n return changedPlaceholderTemplates;\n }, [] as { id: string; urlsWithPriority: { rawUrl: string; priority: number }[] }[]);\n return {\n placeholdersTemplatesToBeCleanedUp,\n placeholderRequestsToDisable,\n placeholderRequestsToEnable,\n placeholdersTemplatesToBeSet,\n placeholderNewRequests\n };\n })\n );\n filteredActions$.pipe(takeUntilDestroyed()).subscribe((placeholdersUpdates) => {\n placeholdersUpdates.placeholdersTemplatesToBeCleanedUp.forEach((placeholderId) =>\n store.dispatch(deletePlaceholderTemplateEntity({\n id: placeholderId\n }))\n );\n placeholdersUpdates.placeholdersTemplatesToBeSet.forEach((placeholdersTemplateToBeSet) => {\n store.dispatch(setPlaceholderTemplateEntity({ entity: placeholdersTemplateToBeSet }));\n });\n placeholdersUpdates.placeholderRequestsToDisable.forEach((placeholderRequestToDisable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToDisable, used: false } }));\n });\n placeholdersUpdates.placeholderRequestsToEnable.forEach((placeholderRequestToEnable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToEnable, used: true } }));\n });\n placeholdersUpdates.placeholderNewRequests.forEach((placeholderNewRequest) => {\n store.dispatch(setPlaceholderRequestEntityFromUrl({\n resolvedUrl: placeholderNewRequest.resolvedUrl,\n id: placeholderNewRequest.rawUrl,\n call: this.retrieveTemplate(placeholderNewRequest.resolvedUrl)\n }));\n });\n });\n }\n\n /**\n * Localize the url, replacing the language marker\n * @param url\n * @param language\n */\n protected resolveUrlWithLang(url: string, language: string | null): string {\n if (!language && url.includes('[LANGUAGE]')) {\n this.logger.warn(`Missing language when trying to resolve ${url}`);\n }\n return language ? url.replace(/\\[LANGUAGE]/g, language) : url;\n }\n\n /**\n * Retrieve template as json from a given url\n * @param url\n */\n protected async retrieveTemplate(url: string): Promise<PlaceholderRequestReply> {\n const resolvedUrl$ = this.injector.get(DynamicContentService, null, { optional: true })?.getContentPathStream(url) || of(url);\n const fullUrl = await firstValueFrom(resolvedUrl$);\n return fetch(fullUrl).then((response) => response.json());\n }\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdatePlaceholderBlock[]) {\n const templates = actions.map((action) => ({\n placeholderId: action.placeholderId,\n templateUrl: action.value,\n priority: action.priority || 0\n }));\n\n this.placeholdersActions$.next(templates);\n }\n}\n","import {\n inject,\n Injectable,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n Store,\n} from '@ngrx/store';\nimport {\n fromApiEffectSwitchMapById,\n} from '@o3r/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LocalizationService,\n} from '@o3r/localization';\nimport {\n RulesEngineRunnerService,\n} from '@o3r/rules-engine';\nimport {\n JSONPath,\n} from 'jsonpath-plus';\nimport {\n combineLatest,\n EMPTY,\n Observable,\n of,\n} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n switchMap,\n take,\n} from 'rxjs/operators';\nimport {\n cancelPlaceholderRequest,\n failPlaceholderRequestEntity,\n type PlaceholderRequestStore,\n type PlaceholderVariable,\n selectPlaceholderRequestEntityUsage,\n setPlaceholderRequestEntityFromUrl,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderTemplateResponseEffect {\n private readonly actions$ = inject(Actions);\n private readonly store = inject<Store<PlaceholderRequestStore>>(Store);\n private readonly rulesEngineService = inject(RulesEngineRunnerService, { optional: true });\n private readonly dynamicContentService = inject(DynamicContentService, { optional: true });\n private readonly translationService = inject(LocalizationService, { optional: true });\n\n /**\n * Set the PlaceholderRequest entity with the reply content, dispatch failPlaceholderRequestEntity if it catches a failure\n * Handles the rendering of the HTML content from the template and creates the combine latest from facts list if needed\n * Disables unused templates refresh if used is false in the store\n */\n public setPlaceholderRequestEntityFromUrl$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setPlaceholderRequestEntityFromUrl),\n fromApiEffectSwitchMapById(\n (templateResponse, action) => {\n const facts = templateResponse.vars ? Object.entries(templateResponse.vars).filter(([, variable]) => variable.type === 'fact') : [];\n const factsStreamsList = this.rulesEngineService\n ? facts.map(([varName, fact]) =>\n this.rulesEngineService!.engine.retrieveOrCreateFactStream(fact.value).pipe(\n map((factValue) => ({\n varName,\n factName: fact.value,\n // eslint-disable-next-line new-cap -- naming convention imposed by jsonpath-plus\n factValue: (fact.path && factValue) ? JSONPath({ wrap: false, json: factValue, path: fact.path }) : factValue\n })),\n distinctUntilChanged((previous, current) => previous.factValue === current.factValue)\n ))\n : [];\n\n const factsStreamsList$ = factsStreamsList.length > 0 ? combineLatest(factsStreamsList) : of([]);\n return combineLatest([factsStreamsList$, this.store.select(selectPlaceholderRequestEntityUsage(action.id)).pipe(distinctUntilChanged())]).pipe(\n switchMap(([factsUsedInTemplate, placeholderRequestUsage]) => {\n if (!placeholderRequestUsage) {\n return EMPTY;\n }\n return this.getRenderedHTML$(templateResponse.template, templateResponse.vars, factsUsedInTemplate).pipe(\n map(({ renderedTemplate, unknownTypeFound }) =>\n // Update instead of set because used already set by the update from url action\n updatePlaceholderRequestEntity({\n entity: {\n ...templateResponse,\n resolvedUrl: action.resolvedUrl,\n id: action.id,\n renderedTemplate,\n unknownTypeFound\n },\n requestId: action.requestId\n })\n )\n );\n }));\n },\n (error, action) => of(failPlaceholderRequestEntity({ ids: [action.id], error, requestId: action.requestId })),\n (requestIdPayload, action) => cancelPlaceholderRequest({ ...requestIdPayload, id: action.id })\n )\n )\n );\n\n /**\n * Renders the html template, replacing facts and urls and localizationKeys\n * @param template\n * @param vars\n * @param facts\n */\n private getRenderedHTML$(template?: string, vars?: Record<string, PlaceholderVariable>, facts?: { varName: string; factName: string; factValue: any }[]) {\n let unknownTypeFound = false;\n const factMapFromVars = (facts || []).reduce((mapping: { [key: string]: any }, fact) => {\n mapping[fact.varName] = fact.factValue;\n return mapping;\n }, {});\n const replacements$: Observable<{ ejsVar: RegExp; value: string } | null>[] = [];\n if (vars && template) {\n for (const varName in vars) {\n if (Object.prototype.hasOwnProperty.call(vars, varName)) {\n const ejsVar = new RegExp(`<%=\\\\s*${varName}\\\\s*%>`, 'g');\n switch (vars[varName].type) {\n case 'relativeUrl': {\n replacements$.push(\n this.dynamicContentService?.getMediaPathStream(vars[varName].value).pipe(\n take(1),\n map((value: string) => ({ ejsVar, value }))\n ) || of({ ejsVar, value: vars[varName].value })\n );\n break;\n }\n case 'fullUrl': {\n template = template.replace(ejsVar, vars[varName].value);\n break;\n }\n case 'fact': {\n template = template.replace(ejsVar, factMapFromVars[varName] ?? '');\n break;\n }\n case 'localisation': {\n const linkedParams = (Object.entries(vars[varName].parameters || {})).reduce((acc: { [key: string]: any }, [paramKey, paramValue]) => {\n acc[paramKey] = factMapFromVars[paramValue];\n return acc;\n }, {});\n replacements$.push(\n this.translationService\n ? this.translationService.translate(vars[varName].value, linkedParams).pipe(\n map((value) => (value ? { ejsVar, value } : null))\n )\n : of(null)\n );\n break;\n }\n default : {\n unknownTypeFound = true;\n break;\n }\n }\n }\n }\n }\n return replacements$.length > 0 && !!template\n ? combineLatest(replacements$).pipe(\n map((replacements) => ({\n renderedTemplate: replacements.reduce(\n (acc, replacement) =>\n replacement ? acc.replace(replacement.ejsVar, replacement.value) : acc,\n template\n ),\n unknownTypeFound\n }))\n )\n : of({ renderedTemplate: template, unknownTypeFound });\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n EffectsModule,\n} from '@ngrx/effects';\nimport {\n PlaceholderRulesEngineActionHandler,\n} from './placeholder.action-handler';\nimport {\n PlaceholderTemplateResponseEffect,\n} from './placeholder.rules-engine.effect';\nimport {\n PlaceholderRequestStoreModule,\n PlaceholderTemplateStoreModule,\n} from '@o3r/components';\n\n@NgModule({\n imports: [\n EffectsModule.forFeature([PlaceholderTemplateResponseEffect]),\n PlaceholderRequestStoreModule,\n PlaceholderTemplateStoreModule\n ],\n providers: [\n PlaceholderRulesEngineActionHandler\n ]\n})\nexport class PlaceholderRulesEngineActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["map","distinctUntilChanged"],"mappings":";;;;;;;;;;;;;;;;AAIA;AACO,MAAM,2CAA2C,GAAG;;AC4C3D;;AAEG;MAEU,mCAAmC,CAAA;AAS9C,IAAA,WAAA,GAAA;AARiB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AAC9B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAElC,QAAA,IAAA,CAAA,oBAAoB,GAAgF,IAAI,OAAO,EAAE;;AAG3G,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,2CAA2C,CAAU;AAGxF,QAAA,MAAM,KAAK,GAAG,MAAM,CAAkC,KAAK,CAAC;AAC5D,QAAA,MAAM,gBAAgB,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAExE,MAAM,KAAK,GAAG;AACZ,cAAE,gBAAgB,CAAC,mBAAmB,EAAE,CAAC,YAAY,CAAC,IAAI,CACxD,GAAG,CAAC,CAAC,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;;;"}
|
|
1
|
+
{"version":3,"file":"o3r-components-rules-engine.mjs","sources":["../../src/rules-engine/placeholder-interfaces.ts","../../src/rules-engine/placeholder-action-handler.ts","../../src/rules-engine/placeholder-rules-engine.effect.ts","../../src/rules-engine/placeholder-rules-engine-module.ts","../../src/rules-engine/o3r-components-rules-engine.ts"],"sourcesContent":["import type {\n RulesEngineAction,\n} from '@o3r/core';\n\n/** ActionUpdatePlaceholderBlock */\nexport const RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE = 'UPDATE_PLACEHOLDER';\n\n/**\n * Content of action that updates a placeholder\n */\nexport interface ActionUpdatePlaceholderBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE;\n placeholderId: string;\n value: string;\n priority?: number;\n}\n","import {\n inject,\n Injectable,\n Injector,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n select,\n Store,\n} from '@ngrx/store';\nimport type {\n RulesEngineActionHandler,\n} from '@o3r/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LocalizationService,\n} from '@o3r/localization';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n combineLatest,\n distinctUntilChanged,\n firstValueFrom,\n map,\n of,\n startWith,\n Subject,\n withLatestFrom,\n} from 'rxjs';\nimport {\n ActionUpdatePlaceholderBlock,\n RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE,\n} from './placeholder-interfaces';\nimport {\n deletePlaceholderTemplateEntity,\n PlaceholderRequestReply,\n PlaceholderTemplateStore,\n selectPlaceholderRequestEntities,\n selectPlaceholderTemplateEntities,\n setPlaceholderRequestEntityFromUrl,\n setPlaceholderTemplateEntity,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdatePlaceholderBlock> {\n private readonly logger = inject(LoggerService);\n private readonly injector = inject(Injector);\n\n protected placeholdersActions$: Subject<{ placeholderId: string; templateUrl: string; priority: number }[]> = new Subject();\n\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE] as const;\n\n constructor() {\n const store = inject<Store<PlaceholderTemplateStore>>(Store);\n const translateService = inject(LocalizationService, { optional: true });\n\n const lang$ = translateService\n ? translateService.getTranslateService().onLangChange.pipe(\n map(({ lang }) => lang),\n startWith(translateService.getCurrentLanguage()),\n distinctUntilChanged()\n )\n : of(null);\n\n const filteredActions$ = combineLatest([\n lang$,\n this.placeholdersActions$.pipe(\n distinctUntilChanged((prev, next) => JSON.stringify(prev) === JSON.stringify(next))\n )\n ]).pipe(\n withLatestFrom(\n combineLatest([store.pipe(select(selectPlaceholderTemplateEntities)), store.pipe(select(selectPlaceholderRequestEntities))])\n ),\n map(([langAndTemplatesUrls, storedPlaceholdersAndRequests]) => {\n const [lang, placeholderActions] = langAndTemplatesUrls;\n const storedPlaceholders = storedPlaceholdersAndRequests[0] || {};\n const storedPlaceholderRequests = storedPlaceholdersAndRequests[1] || {};\n const placeholderNewRequests: { rawUrl: string; resolvedUrl: string }[] = [];\n // Stores all raw Urls used from the current engine execution\n const usedUrls: Record<string, boolean> = {};\n // Get all Urls that needs to be resolved from current rules engine output\n const placeholdersTemplates = placeholderActions.reduce((acc, placeholderAction) => {\n const placeholdersTemplateUrl = {\n rawUrl: placeholderAction.templateUrl,\n priority: placeholderAction.priority\n };\n if (acc[placeholderAction.placeholderId]) {\n acc[placeholderAction.placeholderId].push(placeholdersTemplateUrl);\n } else {\n acc[placeholderAction.placeholderId] = [placeholdersTemplateUrl];\n }\n const resolvedUrl = this.resolveUrlWithLang(placeholderAction.templateUrl, lang);\n // Filters duplicates and resolved urls that are already in the store\n if (!usedUrls[placeholderAction.templateUrl] && (!storedPlaceholderRequests[placeholderAction.templateUrl]\n || storedPlaceholderRequests[placeholderAction.templateUrl]!.resolvedUrl !== resolvedUrl)) {\n placeholderNewRequests.push({\n rawUrl: placeholderAction.templateUrl,\n resolvedUrl: this.resolveUrlWithLang(placeholderAction.templateUrl, lang)\n });\n }\n usedUrls[placeholderAction.templateUrl] = true;\n return acc;\n }, {} as { [key: string]: { rawUrl: string; priority: number }[] });\n // Urls not used anymore and not already disabled\n const placeholderRequestsToDisable: string[] = [];\n // Urls used that were disabled\n const placeholderRequestsToEnable: string[] = [];\n Object.keys(storedPlaceholderRequests).forEach((storedPlaceholderRequestRawUrl) => {\n const usedFromEngineIteration = usedUrls[storedPlaceholderRequestRawUrl];\n const usedFromStore = (storedPlaceholderRequests && storedPlaceholderRequests[storedPlaceholderRequestRawUrl]) ? storedPlaceholderRequests[storedPlaceholderRequestRawUrl].used : false;\n if (!usedFromEngineIteration && usedFromStore) {\n placeholderRequestsToDisable.push(storedPlaceholderRequestRawUrl);\n } else if (usedFromEngineIteration && !usedFromStore) {\n placeholderRequestsToEnable.push(storedPlaceholderRequestRawUrl);\n }\n });\n // Placeholder that are no longer filled by the current engine execution output will be cleared\n const placeholdersTemplatesToBeCleanedUp = Object.keys(storedPlaceholders)\n .filter((placeholderId) => !placeholdersTemplates[placeholderId]);\n\n const placeholdersTemplatesToBeSet = Object.keys(placeholdersTemplates).reduce((changedPlaceholderTemplates, placeholderTemplateId) => {\n // Caching if the placeholder template already exists with the same urls\n if (!storedPlaceholders[placeholderTemplateId]\n || !(JSON.stringify(storedPlaceholders[placeholderTemplateId].urlsWithPriority) === JSON.stringify(placeholdersTemplates[placeholderTemplateId]))) {\n changedPlaceholderTemplates.push({\n id: placeholderTemplateId,\n urlsWithPriority: placeholdersTemplates[placeholderTemplateId]\n });\n }\n return changedPlaceholderTemplates;\n }, [] as { id: string; urlsWithPriority: { rawUrl: string; priority: number }[] }[]);\n return {\n placeholdersTemplatesToBeCleanedUp,\n placeholderRequestsToDisable,\n placeholderRequestsToEnable,\n placeholdersTemplatesToBeSet,\n placeholderNewRequests\n };\n })\n );\n filteredActions$.pipe(takeUntilDestroyed()).subscribe((placeholdersUpdates) => {\n placeholdersUpdates.placeholdersTemplatesToBeCleanedUp.forEach((placeholderId) =>\n store.dispatch(deletePlaceholderTemplateEntity({\n id: placeholderId\n }))\n );\n placeholdersUpdates.placeholdersTemplatesToBeSet.forEach((placeholdersTemplateToBeSet) => {\n store.dispatch(setPlaceholderTemplateEntity({ entity: placeholdersTemplateToBeSet }));\n });\n placeholdersUpdates.placeholderRequestsToDisable.forEach((placeholderRequestToDisable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToDisable, used: false } }));\n });\n placeholdersUpdates.placeholderRequestsToEnable.forEach((placeholderRequestToEnable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToEnable, used: true } }));\n });\n placeholdersUpdates.placeholderNewRequests.forEach((placeholderNewRequest) => {\n store.dispatch(setPlaceholderRequestEntityFromUrl({\n resolvedUrl: placeholderNewRequest.resolvedUrl,\n id: placeholderNewRequest.rawUrl,\n call: this.retrieveTemplate(placeholderNewRequest.resolvedUrl)\n }));\n });\n });\n }\n\n /**\n * Localize the url, replacing the language marker\n * @param url\n * @param language\n */\n protected resolveUrlWithLang(url: string, language: string | null): string {\n if (!language && url.includes('[LANGUAGE]')) {\n this.logger.warn(`Missing language when trying to resolve ${url}`);\n }\n return language ? url.replace(/\\[LANGUAGE]/g, language) : url;\n }\n\n /**\n * Retrieve template as json from a given url\n * @param url\n */\n protected async retrieveTemplate(url: string): Promise<PlaceholderRequestReply> {\n const resolvedUrl$ = this.injector.get(DynamicContentService, null, { optional: true })?.getContentPathStream(url) || of(url);\n const fullUrl = await firstValueFrom(resolvedUrl$);\n return fetch(fullUrl).then((response) => response.json());\n }\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdatePlaceholderBlock[]) {\n const templates = actions.map((action) => ({\n placeholderId: action.placeholderId,\n templateUrl: action.value,\n priority: action.priority || 0\n }));\n\n this.placeholdersActions$.next(templates);\n }\n}\n","import {\n inject,\n Injectable,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n Store,\n} from '@ngrx/store';\nimport {\n fromApiEffectSwitchMapById,\n} from '@o3r/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LocalizationService,\n} from '@o3r/localization';\nimport {\n RulesEngineRunnerService,\n} from '@o3r/rules-engine';\nimport {\n JSONPath,\n} from 'jsonpath-plus';\nimport {\n combineLatest,\n EMPTY,\n Observable,\n of,\n} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n switchMap,\n take,\n} from 'rxjs/operators';\nimport {\n cancelPlaceholderRequest,\n failPlaceholderRequestEntity,\n type PlaceholderRequestStore,\n type PlaceholderVariable,\n selectPlaceholderRequestEntityUsage,\n setPlaceholderRequestEntityFromUrl,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderTemplateResponseEffect {\n private readonly actions$ = inject(Actions);\n private readonly store = inject<Store<PlaceholderRequestStore>>(Store);\n private readonly rulesEngineService = inject(RulesEngineRunnerService, { optional: true });\n private readonly dynamicContentService = inject(DynamicContentService, { optional: true });\n private readonly translationService = inject(LocalizationService, { optional: true });\n\n /**\n * Set the PlaceholderRequest entity with the reply content, dispatch failPlaceholderRequestEntity if it catches a failure\n * Handles the rendering of the HTML content from the template and creates the combine latest from facts list if needed\n * Disables unused templates refresh if used is false in the store\n */\n public setPlaceholderRequestEntityFromUrl$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setPlaceholderRequestEntityFromUrl),\n fromApiEffectSwitchMapById(\n (templateResponse, action) => {\n const facts = templateResponse.vars ? Object.entries(templateResponse.vars).filter(([, variable]) => variable.type === 'fact') : [];\n const factsStreamsList = this.rulesEngineService\n ? facts.map(([varName, fact]) =>\n this.rulesEngineService!.engine.retrieveOrCreateFactStream(fact.value).pipe(\n map((factValue) => ({\n varName,\n factName: fact.value,\n // eslint-disable-next-line new-cap -- naming convention imposed by jsonpath-plus\n factValue: (fact.path && factValue) ? JSONPath({ wrap: false, json: factValue, path: fact.path }) : factValue\n })),\n distinctUntilChanged((previous, current) => previous.factValue === current.factValue)\n ))\n : [];\n\n const factsStreamsList$ = factsStreamsList.length > 0 ? combineLatest(factsStreamsList) : of([]);\n return combineLatest([factsStreamsList$, this.store.select(selectPlaceholderRequestEntityUsage(action.id)).pipe(distinctUntilChanged())]).pipe(\n switchMap(([factsUsedInTemplate, placeholderRequestUsage]) => {\n if (!placeholderRequestUsage) {\n return EMPTY;\n }\n return this.getRenderedHTML$(templateResponse.template, templateResponse.vars, factsUsedInTemplate).pipe(\n map(({ renderedTemplate, unknownTypeFound }) =>\n // Update instead of set because used already set by the update from url action\n updatePlaceholderRequestEntity({\n entity: {\n ...templateResponse,\n resolvedUrl: action.resolvedUrl,\n id: action.id,\n renderedTemplate,\n unknownTypeFound\n },\n requestId: action.requestId\n })\n )\n );\n }));\n },\n (error, action) => of(failPlaceholderRequestEntity({ ids: [action.id], error, requestId: action.requestId })),\n (requestIdPayload, action) => cancelPlaceholderRequest({ ...requestIdPayload, id: action.id })\n )\n )\n );\n\n /**\n * Renders the html template, replacing facts and urls and localizationKeys\n * @param template\n * @param vars\n * @param facts\n */\n private getRenderedHTML$(template?: string, vars?: Record<string, PlaceholderVariable>, facts?: { varName: string; factName: string; factValue: any }[]) {\n let unknownTypeFound = false;\n const factMapFromVars = (facts || []).reduce((mapping: { [key: string]: any }, fact) => {\n mapping[fact.varName] = fact.factValue;\n return mapping;\n }, {});\n const replacements$: Observable<{ ejsVar: RegExp; value: string } | null>[] = [];\n if (vars && template) {\n for (const varName in vars) {\n if (Object.prototype.hasOwnProperty.call(vars, varName)) {\n const ejsVar = new RegExp(`<%=\\\\s*${varName}\\\\s*%>`, 'g');\n switch (vars[varName].type) {\n case 'relativeUrl': {\n replacements$.push(\n this.dynamicContentService?.getMediaPathStream(vars[varName].value).pipe(\n take(1),\n map((value: string) => ({ ejsVar, value }))\n ) || of({ ejsVar, value: vars[varName].value })\n );\n break;\n }\n case 'fullUrl': {\n template = template.replace(ejsVar, vars[varName].value);\n break;\n }\n case 'fact': {\n template = template.replace(ejsVar, factMapFromVars[varName] ?? '');\n break;\n }\n case 'localisation': {\n const linkedParams = (Object.entries(vars[varName].parameters || {})).reduce((acc: { [key: string]: any }, [paramKey, paramValue]) => {\n acc[paramKey] = factMapFromVars[paramValue];\n return acc;\n }, {});\n replacements$.push(\n this.translationService\n ? this.translationService.translate(vars[varName].value, linkedParams).pipe(\n map((value) => (value ? { ejsVar, value } : null))\n )\n : of(null)\n );\n break;\n }\n default : {\n unknownTypeFound = true;\n break;\n }\n }\n }\n }\n }\n return replacements$.length > 0 && !!template\n ? combineLatest(replacements$).pipe(\n map((replacements) => ({\n renderedTemplate: replacements.reduce(\n (acc, replacement) =>\n replacement ? acc.replace(replacement.ejsVar, replacement.value) : acc,\n template\n ),\n unknownTypeFound\n }))\n )\n : of({ renderedTemplate: template, unknownTypeFound });\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n EffectsModule,\n} from '@ngrx/effects';\nimport {\n PlaceholderRulesEngineActionHandler,\n} from './placeholder-action-handler';\nimport {\n PlaceholderTemplateResponseEffect,\n} from './placeholder-rules-engine.effect';\nimport {\n PlaceholderRequestStoreModule,\n PlaceholderTemplateStoreModule,\n} from '@o3r/components';\n\n@NgModule({\n imports: [\n EffectsModule.forFeature([PlaceholderTemplateResponseEffect]),\n PlaceholderRequestStoreModule,\n PlaceholderTemplateStoreModule\n ],\n providers: [\n PlaceholderRulesEngineActionHandler\n ]\n})\nexport class PlaceholderRulesEngineActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["map","distinctUntilChanged"],"mappings":";;;;;;;;;;;;;;;;AAIA;AACO,MAAM,2CAA2C,GAAG;;AC4C3D;;AAEG;MAEU,mC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