@o3r/rules-engine 10.0.0-prerelease.9 → 10.0.0-prerelease.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/builders/rules-engine-extractor/index.d.ts.map +1 -1
  2. package/builders/rules-engine-extractor/index.js +2 -2
  3. package/components/rules-engine/ruleset-history/ruleset-history-pres.module.d.ts +7 -7
  4. package/components/rules-engine/shared/fallback-to.pipe.d.ts +8 -1
  5. package/components/rules-engine/shared/fallback-to.pipe.d.ts.map +1 -1
  6. package/esm2022/components/rules-engine/rule-actions/rule-actions-pres.component.mjs +5 -5
  7. package/esm2022/components/rules-engine/rule-condition/rule-condition-pres.component.mjs +3 -3
  8. package/esm2022/components/rules-engine/rule-key-value/rule-key-value-pres.component.mjs +4 -4
  9. package/esm2022/components/rules-engine/rule-tree/rule-tree-pres.component.mjs +3 -3
  10. package/esm2022/components/rules-engine/ruleset-history/ruleset-history-pres.component.mjs +5 -5
  11. package/esm2022/components/rules-engine/ruleset-history/ruleset-history-pres.module.mjs +8 -8
  12. package/esm2022/components/rules-engine/shared/fallback-to.pipe.mjs +16 -5
  13. package/esm2022/devkit/rules-engine-devtools.console.service.mjs +3 -3
  14. package/esm2022/devkit/rules-engine-devtools.message.service.mjs +3 -3
  15. package/esm2022/devkit/rules-engine-devtools.module.mjs +4 -4
  16. package/esm2022/devkit/rules-engine-devtools.service.mjs +3 -3
  17. package/esm2022/services/runner/rules-engine.runner.module.mjs +4 -4
  18. package/esm2022/services/runner/rules-engine.runner.service.mjs +3 -3
  19. package/esm2022/stores/rulesets/rulesets.effect.mjs +3 -3
  20. package/esm2022/stores/rulesets/rulesets.module.mjs +4 -4
  21. package/fesm2022/o3r-rules-engine.mjs +70 -59
  22. package/fesm2022/o3r-rules-engine.mjs.map +1 -1
  23. package/package.json +17 -14
  24. package/schematics/cms-adapter/index.d.ts +2 -3
  25. package/schematics/cms-adapter/index.d.ts.map +1 -1
  26. package/schematics/cms-adapter/index.js +7 -3
  27. package/schematics/facts-service/index.d.ts +1 -2
  28. package/schematics/facts-service/index.d.ts.map +1 -1
  29. package/schematics/facts-service/index.js +6 -3
  30. package/schematics/ng-add/index.d.ts +1 -1
  31. package/schematics/ng-add/index.d.ts.map +1 -1
  32. package/schematics/ng-add/index.js +6 -2
  33. package/schematics/ng-update/v10.0/action-module-split.d.ts.map +1 -1
  34. package/schematics/ng-update/v10.0/action-module-split.js +4 -0
  35. package/schematics/operator/index.d.ts +1 -1
  36. package/schematics/operator/index.d.ts.map +1 -1
  37. package/schematics/operator/index.js +6 -2
  38. package/schematics/rules-engine-to-component/index.d.ts +1 -1
  39. package/schematics/rules-engine-to-component/index.d.ts.map +1 -1
  40. package/schematics/rules-engine-to-component/index.js +6 -2
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@o3r/rules-engine",
3
- "version": "10.0.0-prerelease.9",
3
+ "version": "10.0.0-prerelease.90",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
4
7
  "description": "This module provides a rule engine that can be executed on your Otter application to customize your application (translations, placeholders and configs) based on a json file generated by your CMS.",
5
8
  "keywords": [
6
9
  "rules-engine",
@@ -35,27 +38,27 @@
35
38
  }
36
39
  },
37
40
  "peerDependencies": {
38
- "@angular-devkit/architect": "~0.1700.0",
39
- "@angular-devkit/core": "~17.0.0",
40
- "@angular-devkit/schematics": "~17.0.0",
41
- "@angular/common": "~17.0.2",
42
- "@angular/core": "~17.0.2",
43
- "@angular/platform-browser-dynamic": "~17.0.2",
41
+ "@angular-devkit/architect": "~0.1702.0",
42
+ "@angular-devkit/core": "~17.2.0",
43
+ "@angular-devkit/schematics": "~17.2.0",
44
+ "@angular/common": "~17.2.0",
45
+ "@angular/core": "~17.2.0",
46
+ "@angular/platform-browser-dynamic": "~17.2.0",
44
47
  "@ngrx/effects": "~17.1.0",
45
48
  "@ngrx/entity": "~17.1.0",
46
49
  "@ngrx/store": "~17.1.0",
47
50
  "@ngx-translate/core": "~15.0.0",
48
- "@o3r/core": "^10.0.0-prerelease.9",
49
- "@o3r/extractors": "^10.0.0-prerelease.9",
50
- "@o3r/logger": "^10.0.0-prerelease.9",
51
- "@o3r/schematics": "^10.0.0-prerelease.9",
52
- "@schematics/angular": "~17.0.0",
51
+ "@o3r/core": "^10.0.0-prerelease.90",
52
+ "@o3r/extractors": "^10.0.0-prerelease.90",
53
+ "@o3r/logger": "^10.0.0-prerelease.90",
54
+ "@o3r/schematics": "^10.0.0-prerelease.90",
55
+ "@schematics/angular": "~17.2.0",
53
56
  "globby": "^11.1.0",
54
57
  "jasmine": "^5.0.0",
55
- "jsonpath-plus": "^7.0.0",
58
+ "jsonpath-plus": "^8.0.0",
56
59
  "rxjs": "^7.8.1",
57
60
  "typescript": "~5.2.2",
58
- "typescript-json-schema": "~0.62.0"
61
+ "typescript-json-schema": "~0.63.0"
59
62
  },
60
63
  "peerDependenciesMeta": {
61
64
  "@angular-devkit/core": {
@@ -3,9 +3,8 @@ import { Rule } from '@angular-devkit/schematics';
3
3
  * Update CMS adapter tools
4
4
  * @param options @see RuleFactory.options
5
5
  * @param options.projectName
6
- * @param rootPath @see RuleFactory.rootPath
7
6
  */
8
- export declare function updateCmsAdapter(options: {
7
+ export declare const updateCmsAdapter: (options: {
9
8
  projectName?: string | undefined;
10
- }): Rule;
9
+ }) => Rule;
11
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/cms-adapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAKvF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,IAAI,CAoEpF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/cms-adapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AA+EvF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;kBA3EwB,MAAM,GAAG,SAAS;UA2EkB,CAAC"}
@@ -9,9 +9,8 @@ const path = tslib_1.__importStar(require("node:path"));
9
9
  * Update CMS adapter tools
10
10
  * @param options @see RuleFactory.options
11
11
  * @param options.projectName
12
- * @param rootPath @see RuleFactory.rootPath
13
12
  */
14
- function updateCmsAdapter(options) {
13
+ function updateCmsAdapterFn(options) {
15
14
  if (!options.projectName) {
16
15
  return schematics_1.noop;
17
16
  }
@@ -70,5 +69,10 @@ function updateCmsAdapter(options) {
70
69
  editAngularJson
71
70
  ]);
72
71
  }
73
- exports.updateCmsAdapter = updateCmsAdapter;
72
+ /**
73
+ * Update CMS adapter tools
74
+ * @param options @see RuleFactory.options
75
+ * @param options.projectName
76
+ */
77
+ exports.updateCmsAdapter = (0, schematics_2.createSchematicWithMetricsIfInstalled)(updateCmsAdapterFn);
74
78
  //# sourceMappingURL=index.js.map
@@ -2,8 +2,7 @@ import { Rule } from '@angular-devkit/schematics';
2
2
  import { NgGenerateFactsServiceSchematicsSchema } from './schema';
3
3
  /**
4
4
  * Generate the facts service
5
- *
6
5
  * @param options
7
6
  */
8
- export declare function ngGenerateFactsService(options: NgGenerateFactsServiceSchematicsSchema): Rule;
7
+ export declare const ngGenerateFactsService: (options: NgGenerateFactsServiceSchematicsSchema) => Rule;
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/facts-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8F,IAAI,EAAiB,MAAM,4BAA4B,CAAC;AAE7J,OAAO,EAAE,sCAAsC,EAAE,MAAM,UAAU,CAAC;AAIlE;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,sCAAsC,GAAG,IAAI,CAkD5F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/facts-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8F,IAAI,EAAiB,MAAM,4BAA4B,CAAC;AAE7J,OAAO,EAAE,sCAAsC,EAAE,MAAM,UAAU,CAAC;AA4DlE;;;GAGG;AACH,eAAO,MAAM,sBAAsB,2DAAkE,CAAC"}
@@ -8,10 +8,9 @@ const strings_1 = require("@angular-devkit/core/src/utils/strings");
8
8
  const path = tslib_1.__importStar(require("node:path"));
9
9
  /**
10
10
  * Generate the facts service
11
- *
12
11
  * @param options
13
12
  */
14
- function ngGenerateFactsService(options) {
13
+ function ngGenerateFactsServiceFn(options) {
15
14
  const generateFiles = () => {
16
15
  const name = (0, strings_1.dasherize)(options.name);
17
16
  const serviceFolderPath = path.posix.join(options.path, name);
@@ -57,5 +56,9 @@ function ngGenerateFactsService(options) {
57
56
  options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)()
58
57
  ]);
59
58
  }
60
- exports.ngGenerateFactsService = ngGenerateFactsService;
59
+ /**
60
+ * Generate the facts service
61
+ * @param options
62
+ */
63
+ exports.ngGenerateFactsService = (0, schematics_2.createSchematicWithMetricsIfInstalled)(ngGenerateFactsServiceFn);
61
64
  //# sourceMappingURL=index.js.map
@@ -4,5 +4,5 @@ import type { NgAddSchematicsSchema } from './schema';
4
4
  * Add Otter rules-engine to an Angular Project
5
5
  * @param options
6
6
  */
7
- export declare function ngAdd(options: NgAddSchematicsSchema): Rule;
7
+ export declare const ngAdd: (options: NgAddSchematicsSchema) => Rule;
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAGjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAKtD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CA8D1D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAGjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAyEtD;;;GAGG;AACH,eAAO,MAAM,KAAK,0CAAiD,CAAC"}
@@ -12,7 +12,7 @@ const devtools_registration_1 = require("./helpers/devtools-registration");
12
12
  * Add Otter rules-engine to an Angular Project
13
13
  * @param options
14
14
  */
15
- function ngAdd(options) {
15
+ function ngAddFn(options) {
16
16
  /* ng add rules */
17
17
  return async (tree, context) => {
18
18
  try {
@@ -65,5 +65,9 @@ function ngAdd(options) {
65
65
  }
66
66
  };
67
67
  }
68
- exports.ngAdd = ngAdd;
68
+ /**
69
+ * Add Otter rules-engine to an Angular Project
70
+ * @param options
71
+ */
72
+ exports.ngAdd = (0, schematics_2.createSchematicWithMetricsIfInstalled)(ngAddFn);
69
73
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-module-split.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/v10.0/action-module-split.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGvD;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAW9C"}
1
+ {"version":3,"file":"action-module-split.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/v10.0/action-module-split.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGvD;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAe9C"}
@@ -12,6 +12,10 @@ function updateRuleEngineService() {
12
12
  RulesEngineService: {
13
13
  newPackage: '@o3r/rules-engine',
14
14
  newValue: 'RulesEngineRunnerService'
15
+ },
16
+ RulesEngineModule: {
17
+ newPackage: '@o3r/rules-engine',
18
+ newValue: 'RulesEngineRunnerModule'
15
19
  }
16
20
  }
17
21
  });
@@ -4,5 +4,5 @@ import type { NgGenerateOperatorSchematicsSchema } from './schema';
4
4
  * Generate the operator
5
5
  * @param options
6
6
  */
7
- export declare function ngGenerateOperator(options: NgGenerateOperatorSchematicsSchema): Rule;
7
+ export declare const ngGenerateOperator: (options: NgGenerateOperatorSchematicsSchema) => Rule;
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/operator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2E,IAAI,EAAiB,MAAM,4BAA4B,CAAC;AAE1I,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AAInE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kCAAkC,GAAG,IAAI,CAwBpF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/operator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2E,IAAI,EAAiB,MAAM,4BAA4B,CAAC;AAE1I,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AAkCnE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,uDAA8D,CAAC"}
@@ -10,7 +10,7 @@ const path = tslib_1.__importStar(require("node:path"));
10
10
  * Generate the operator
11
11
  * @param options
12
12
  */
13
- function ngGenerateOperator(options) {
13
+ function ngGenerateOperatorFn(options) {
14
14
  const generateFiles = () => {
15
15
  const name = (0, strings_1.dasherize)(options.name);
16
16
  const operatorFolderPath = path.posix.join(options.path, name);
@@ -33,5 +33,9 @@ function ngGenerateOperator(options) {
33
33
  options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)()
34
34
  ]);
35
35
  }
36
- exports.ngGenerateOperator = ngGenerateOperator;
36
+ /**
37
+ * Generate the operator
38
+ * @param options
39
+ */
40
+ exports.ngGenerateOperator = (0, schematics_2.createSchematicWithMetricsIfInstalled)(ngGenerateOperatorFn);
37
41
  //# sourceMappingURL=index.js.map
@@ -4,5 +4,5 @@ import { NgGenerateRulesEngineToComponentSchematicsSchema } from './schema';
4
4
  * Generate the code to enable rules-engine on a component
5
5
  * @param options
6
6
  */
7
- export declare function ngGenerateRulesEngineToComponent(options: NgGenerateRulesEngineToComponentSchematicsSchema): Rule;
7
+ export declare const ngGenerateRulesEngineToComponent: (options: NgGenerateRulesEngineToComponentSchematicsSchema) => Rule;
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/rules-engine-to-component/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAgBvF,OAAO,EAAE,gDAAgD,EAAE,MAAM,UAAU,CAAC;AA8B5E;;;GAGG;AACH,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,gDAAgD,GAAG,IAAI,CAoHhH"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/rules-engine-to-component/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAiBvF,OAAO,EAAE,gDAAgD,EAAE,MAAM,UAAU,CAAC;AAyJ5E;;;GAGG;AACH,eAAO,MAAM,gCAAgC,qEAA4E,CAAC"}
@@ -27,7 +27,7 @@ const checkRulesEngine = (componentPath) => (tree) => {
27
27
  * Generate the code to enable rules-engine on a component
28
28
  * @param options
29
29
  */
30
- function ngGenerateRulesEngineToComponent(options) {
30
+ function ngGenerateRulesEngineToComponentFn(options) {
31
31
  const generateFiles = (tree, _context) => {
32
32
  const componentPath = options.path;
33
33
  const projectName = options.projectName || (0, schematics_2.getLibraryNameFromPath)(componentPath) || '';
@@ -107,5 +107,9 @@ function ngGenerateRulesEngineToComponent(options) {
107
107
  options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)()
108
108
  ]);
109
109
  }
110
- exports.ngGenerateRulesEngineToComponent = ngGenerateRulesEngineToComponent;
110
+ /**
111
+ * Generate the code to enable rules-engine on a component
112
+ * @param options
113
+ */
114
+ exports.ngGenerateRulesEngineToComponent = (0, schematics_2.createSchematicWithMetricsIfInstalled)(ngGenerateRulesEngineToComponentFn);
111
115
  //# sourceMappingURL=index.js.map