@o3r/components 10.0.0-next.9 → 11.0.0-next.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.
Files changed (134) hide show
  1. package/README.md +1 -1
  2. package/builders/component-extractor/helpers/component/component-class.extractor.d.ts +2 -0
  3. package/builders/component-extractor/helpers/component/component-class.extractor.d.ts.map +1 -1
  4. package/builders/component-extractor/helpers/component/component-class.extractor.js +14 -8
  5. package/builders/component-extractor/helpers/component/component-class.extractor.js.map +1 -1
  6. package/builders/component-extractor/helpers/component/component-config.extractor.d.ts.map +1 -1
  7. package/builders/component-extractor/helpers/component/component-config.extractor.js +6 -2
  8. package/builders/component-extractor/helpers/component/component-config.extractor.js.map +1 -1
  9. package/builders/component-extractor/helpers/component/component.extractor.d.ts +5 -5
  10. package/builders/component-extractor/helpers/component/component.extractor.d.ts.map +1 -1
  11. package/builders/component-extractor/helpers/component/component.extractor.js +4 -2
  12. package/builders/component-extractor/helpers/component/component.extractor.js.map +1 -1
  13. package/builders/component-extractor/helpers/component/component.parser.d.ts +9 -6
  14. package/builders/component-extractor/helpers/component/component.parser.d.ts.map +1 -1
  15. package/builders/component-extractor/helpers/component/component.parser.js +36 -10
  16. package/builders/component-extractor/helpers/component/component.parser.js.map +1 -1
  17. package/builders/component-extractor/index.d.ts +0 -1
  18. package/builders/component-extractor/index.d.ts.map +1 -1
  19. package/builders/component-extractor/index.js +8 -9
  20. package/builders/component-extractor/index.js.map +1 -1
  21. package/builders/component-extractor/schema.d.ts +5 -0
  22. package/builders/component-extractor/schema.d.ts.map +1 -1
  23. package/builders/component-extractor/schema.json +22 -1
  24. package/core/component.output.d.ts +8 -11
  25. package/core/component.output.d.ts.map +1 -1
  26. package/core/index.d.ts +0 -1
  27. package/core/index.d.ts.map +1 -1
  28. package/core/rendering/helpers.d.ts +0 -1
  29. package/core/rendering/helpers.d.ts.map +1 -1
  30. package/devkit/components-devkit.interface.d.ts +0 -1
  31. package/devkit/components-devkit.interface.d.ts.map +1 -1
  32. package/devkit/components-devtools.message.service.d.ts +4 -6
  33. package/devkit/components-devtools.message.service.d.ts.map +1 -1
  34. package/devkit/components-devtools.module.d.ts +0 -1
  35. package/devkit/components-devtools.module.d.ts.map +1 -1
  36. package/devkit/inspector/ng/ng.d.ts +0 -3
  37. package/devkit/inspector/ng/ng.d.ts.map +1 -1
  38. package/devkit/inspector/otter-inspector.helpers.d.ts +0 -7
  39. package/devkit/inspector/otter-inspector.helpers.d.ts.map +1 -1
  40. package/devkit/inspector/otter-inspector.service.d.ts +5 -6
  41. package/devkit/inspector/otter-inspector.service.d.ts.map +1 -1
  42. package/esm2022/core/component.output.mjs +1 -1
  43. package/esm2022/core/index.mjs +1 -2
  44. package/esm2022/core/rendering/helpers.mjs +1 -2
  45. package/esm2022/devkit/components-devkit.interface.mjs +1 -2
  46. package/esm2022/devkit/components-devtools.message.service.mjs +6 -8
  47. package/esm2022/devkit/components-devtools.module.mjs +5 -6
  48. package/esm2022/devkit/inspector/ng/ng.mjs +1 -1
  49. package/esm2022/devkit/inspector/otter-inspector.helpers.mjs +1 -8
  50. package/esm2022/devkit/inspector/otter-inspector.service.mjs +1 -2
  51. package/esm2022/public_api.mjs +1 -1
  52. package/esm2022/rules-engine/o3r-components-rules-engine.mjs +5 -0
  53. package/esm2022/rules-engine/placeholder.action-handler.mjs +154 -0
  54. package/esm2022/rules-engine/placeholder.interfaces.mjs +3 -0
  55. package/esm2022/rules-engine/placeholder.rules-engine.effect.mjs +124 -0
  56. package/esm2022/rules-engine/placeholder.rules-engine.module.mjs +31 -0
  57. package/esm2022/rules-engine/public_api.mjs +4 -0
  58. package/esm2022/stores/placeholder-request/placeholder-request.module.mjs +4 -4
  59. package/esm2022/stores/placeholder-request/placeholder-request.selectors.mjs +1 -2
  60. package/esm2022/stores/placeholder-template/placeholder-template.module.mjs +4 -4
  61. package/esm2022/stores/placeholder-template/placeholder-template.selectors.mjs +24 -10
  62. package/esm2022/tools/component-replacement/c11n.directive.mjs +17 -23
  63. package/esm2022/tools/component-replacement/c11n.helpers.mjs +1 -2
  64. package/esm2022/tools/component-replacement/c11n.mock.module.mjs +10 -10
  65. package/esm2022/tools/component-replacement/c11n.module.mjs +5 -6
  66. package/esm2022/tools/component-replacement/c11n.service.mjs +6 -8
  67. package/esm2022/tools/pipes/capitalize/capitalize.module.mjs +4 -4
  68. package/esm2022/tools/pipes/capitalize/capitalize.pipe.mjs +3 -3
  69. package/esm2022/tools/pipes/duration/duration.module.mjs +4 -4
  70. package/esm2022/tools/pipes/duration/duration.pipe.mjs +4 -5
  71. package/esm2022/tools/pipes/keep-white-space/keep-white-space.module.mjs +4 -4
  72. package/esm2022/tools/pipes/keep-white-space/keep-white-space.pipe.mjs +3 -3
  73. package/esm2022/tools/pipes/replace-with-bold/replace-with-bold.module.mjs +4 -4
  74. package/esm2022/tools/pipes/replace-with-bold/replace-with-bold.pipe.mjs +3 -3
  75. package/esm2022/tools/placeholder/placeholder.component.mjs +44 -23
  76. package/esm2022/tools/placeholder/placeholder.interface.mjs +2 -0
  77. package/esm2022/tools/placeholder/placeholder.module.mjs +4 -4
  78. package/fesm2022/o3r-components-rules-engine.mjs +302 -0
  79. package/fesm2022/o3r-components-rules-engine.mjs.map +1 -0
  80. package/fesm2022/o3r-components.mjs +150 -141
  81. package/fesm2022/o3r-components.mjs.map +1 -1
  82. package/package.json +62 -33
  83. package/public_api.d.ts +1 -1
  84. package/public_api.d.ts.map +1 -1
  85. package/rules-engine/index.d.ts +6 -0
  86. package/rules-engine/o3r-components-rules-engine.d.ts.map +1 -0
  87. package/rules-engine/placeholder.action-handler.d.ts +42 -0
  88. package/rules-engine/placeholder.action-handler.d.ts.map +1 -0
  89. package/rules-engine/placeholder.interfaces.d.ts +13 -0
  90. package/rules-engine/placeholder.interfaces.d.ts.map +1 -0
  91. package/rules-engine/placeholder.rules-engine.effect.d.ts +37 -0
  92. package/rules-engine/placeholder.rules-engine.effect.d.ts.map +1 -0
  93. package/rules-engine/placeholder.rules-engine.module.d.ts +9 -0
  94. package/rules-engine/placeholder.rules-engine.module.d.ts.map +1 -0
  95. package/rules-engine/public_api.d.ts +4 -0
  96. package/rules-engine/public_api.d.ts.map +1 -0
  97. package/schemas/component.metadata.schema.json +8 -1
  98. package/schemas/placeholder-template.schema.json +1 -1
  99. package/schemas/rules-engine.placeholder-action.schema.json +26 -0
  100. package/schematics/cms-adapter/index.d.ts +0 -1
  101. package/schematics/cms-adapter/index.d.ts.map +1 -1
  102. package/schematics/cms-adapter/index.js +5 -9
  103. package/schematics/cms-adapter/index.js.map +1 -1
  104. package/schematics/ng-add/helpers/devtools-registration.d.ts +10 -0
  105. package/schematics/ng-add/helpers/devtools-registration.d.ts.map +1 -0
  106. package/schematics/ng-add/helpers/devtools-registration.js +25 -0
  107. package/schematics/ng-add/helpers/devtools-registration.js.map +1 -0
  108. package/schematics/ng-add/index.d.ts +0 -1
  109. package/schematics/ng-add/index.d.ts.map +1 -1
  110. package/schematics/ng-add/index.js +7 -5
  111. package/schematics/ng-add/index.js.map +1 -1
  112. package/schematics/ng-add/schema.json +1 -1
  113. package/stores/placeholder-request/placeholder-request.selectors.d.ts +0 -1
  114. package/stores/placeholder-request/placeholder-request.selectors.d.ts.map +1 -1
  115. package/stores/placeholder-template/placeholder-template.selectors.d.ts +41 -8
  116. package/stores/placeholder-template/placeholder-template.selectors.d.ts.map +1 -1
  117. package/tools/component-replacement/c11n.directive.d.ts +5 -10
  118. package/tools/component-replacement/c11n.directive.d.ts.map +1 -1
  119. package/tools/component-replacement/c11n.helpers.d.ts +1 -3
  120. package/tools/component-replacement/c11n.helpers.d.ts.map +1 -1
  121. package/tools/component-replacement/c11n.module.d.ts +0 -1
  122. package/tools/component-replacement/c11n.module.d.ts.map +1 -1
  123. package/tools/component-replacement/c11n.service.d.ts +2 -5
  124. package/tools/component-replacement/c11n.service.d.ts.map +1 -1
  125. package/tools/pipes/duration/duration.pipe.d.ts.map +1 -1
  126. package/tools/placeholder/placeholder.component.d.ts +7 -5
  127. package/tools/placeholder/placeholder.component.d.ts.map +1 -1
  128. package/tools/placeholder/placeholder.interface.d.ts +22 -0
  129. package/tools/placeholder/placeholder.interface.d.ts.map +1 -0
  130. package/builders/package.json +0 -3
  131. package/core/focus.d.ts +0 -17
  132. package/core/focus.d.ts.map +0 -1
  133. package/esm2022/core/focus.mjs +0 -2
  134. package/schematics/package.json +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/components",
3
- "version": "10.0.0-next.9",
3
+ "version": "11.0.0-next.0",
4
4
  "description": "This module contains component-related features (Component replacement, CMS compatibility, helpers, pipes, debugging developer tools...)\nIt comes with an integrated ng builder to help you generate components compatible with Otter features (CMS integration, localization, etc.).",
5
5
  "keywords": [
6
6
  "components",
@@ -8,40 +8,76 @@
8
8
  "otter-module",
9
9
  "otter-cms"
10
10
  ],
11
+ "exports": {
12
+ "./schemas/*.json": {
13
+ "default": "./schemas/*.json"
14
+ },
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./index.d.ts",
20
+ "esm2022": "./esm2022/o3r-components.mjs",
21
+ "esm": "./esm2022/o3r-components.mjs",
22
+ "default": "./fesm2022/o3r-components.mjs"
23
+ },
24
+ "./rules-engine": {
25
+ "types": "./rules-engine/index.d.ts",
26
+ "esm2022": "./esm2022/rules-engine/o3r-components-rules-engine.mjs",
27
+ "esm": "./esm2022/rules-engine/o3r-components-rules-engine.mjs",
28
+ "default": "./fesm2022/o3r-components-rules-engine.mjs"
29
+ }
30
+ },
11
31
  "peerDependencies": {
12
- "@angular-devkit/architect": "~0.1602.0",
13
- "@angular-devkit/schematics": "~16.2.0",
14
- "@angular/cdk": "~16.2.0",
15
- "@angular/common": "~16.2.0",
16
- "@angular/core": "~16.2.0",
17
- "@angular/forms": "~16.2.0",
18
- "@angular/platform-browser": "~16.2.0",
19
- "@angular/platform-browser-dynamic": "~16.2.0",
20
- "@ngrx/entity": "~16.2.0",
21
- "@ngrx/store": "~16.2.0",
22
- "@o3r/configuration": "^10.0.0-next.9",
23
- "@o3r/core": "^10.0.0-next.9",
24
- "@o3r/dev-tools": "^10.0.0-next.9",
25
- "@o3r/extractors": "^10.0.0-next.9",
26
- "@o3r/logger": "^10.0.0-next.9",
27
- "@o3r/schematics": "^10.0.0-next.9",
28
- "@o3r/testing": "^10.0.0-next.9",
29
- "@schematics/angular": "~16.2.0",
32
+ "@angular-devkit/architect": "~0.1700.0",
33
+ "@angular-devkit/schematics": "~17.0.0",
34
+ "@angular/cdk": "~17.0.0",
35
+ "@angular/common": "~17.0.0",
36
+ "@angular/core": "~17.0.0",
37
+ "@angular/forms": "~17.0.0",
38
+ "@angular/platform-browser": "~17.0.0",
39
+ "@angular/platform-browser-dynamic": "~17.0.0",
40
+ "@ngrx/effects": "~17.0.0",
41
+ "@ngrx/entity": "~17.0.0",
42
+ "@ngrx/store": "~17.0.0",
43
+ "@o3r/configuration": "^11.0.0-next.0",
44
+ "@o3r/core": "^11.0.0-next.0",
45
+ "@o3r/dynamic-content": "^11.0.0-next.0",
46
+ "@o3r/extractors": "^11.0.0-next.0",
47
+ "@o3r/localization": "^11.0.0-next.0",
48
+ "@o3r/logger": "^11.0.0-next.0",
49
+ "@o3r/rules-engine": "^11.0.0-next.0",
50
+ "@o3r/schematics": "^11.0.0-next.0",
51
+ "@o3r/testing": "^11.0.0-next.0",
52
+ "@schematics/angular": "~17.0.0",
30
53
  "chokidar": "^3.5.2",
31
54
  "globby": "^11.1.0",
55
+ "jsonpath-plus": "^7.0.0",
32
56
  "rxjs": "^7.8.1",
33
- "typescript": "~5.1.6"
57
+ "typescript": "~5.2.2"
34
58
  },
35
59
  "peerDependenciesMeta": {
36
60
  "@angular-devkit/schematics": {
37
61
  "optional": true
38
62
  },
63
+ "@ngx-translate/core": {
64
+ "optional": true
65
+ },
39
66
  "@o3r/configuration": {
40
67
  "optional": true
41
68
  },
69
+ "@o3r/dynamic-content": {
70
+ "optional": true
71
+ },
42
72
  "@o3r/extractors": {
43
73
  "optional": true
44
74
  },
75
+ "@o3r/localization": {
76
+ "optional": true
77
+ },
78
+ "@o3r/rules-engine": {
79
+ "optional": true
80
+ },
45
81
  "@o3r/schematics": {
46
82
  "optional": true
47
83
  },
@@ -54,6 +90,9 @@
54
90
  "globby": {
55
91
  "optional": true
56
92
  },
93
+ "jsonpath-plus": {
94
+ "optional": true
95
+ },
57
96
  "typescript": {
58
97
  "optional": true
59
98
  }
@@ -62,23 +101,12 @@
62
101
  "tslib": "^2.5.3"
63
102
  },
64
103
  "engines": {
65
- "node": ">=16.0.0"
104
+ "node": ">=18.0.0"
66
105
  },
67
106
  "schematics": "./collection.json",
68
107
  "builders": "./builders.json",
69
108
  "module": "fesm2022/o3r-components.mjs",
70
109
  "typings": "index.d.ts",
71
- "exports": {
72
- "./package.json": {
73
- "default": "./package.json"
74
- },
75
- ".": {
76
- "types": "./index.d.ts",
77
- "esm2022": "./esm2022/o3r-components.mjs",
78
- "esm": "./esm2022/o3r-components.mjs",
79
- "default": "./fesm2022/o3r-components.mjs"
80
- }
81
- },
82
110
  "sideEffects": false,
83
111
  "contributors": [
84
112
  {
@@ -143,5 +171,6 @@
143
171
  ],
144
172
  "bugs": "https://github.com/AmadeusITGroup/otter/issues",
145
173
  "repository": "https://github.com/AmadeusITGroup/otter",
146
- "license": "BSD-3-Clause"
174
+ "license": "BSD-3-Clause",
175
+ "homepage": "https://amadeusitgroup.github.io/otter/"
147
176
  }
package/public_api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type { Block, ExposedComponent, Page, Context, ContextInput, BaseContextOutput, TemplateContext } from '@o3r/core';
1
+ export type { Context, ContextInput, BaseContextOutput, TemplateContext } from '@o3r/core';
2
2
  export * from './core/index';
3
3
  export * from './devkit/index';
4
4
  export * from './stores/index';
@@ -1 +1 @@
1
- {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC1H,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../src/public_api.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC3F,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@o3r/components/rules-engine" />
5
+ export * from './public_api';
6
+ //# sourceMappingURL=o3r-components-rules-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"o3r-components-rules-engine.d.ts","sourceRoot":"","sources":["../../src/rules-engine/o3r-components-rules-engine.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import type { RulesEngineActionHandler } from '@o3r/core';
3
+ import { LoggerService } from '@o3r/logger';
4
+ import { Subject, Subscription } from 'rxjs';
5
+ import { PlaceholderRequestReply, PlaceholderTemplateStore } from '@o3r/components';
6
+ import { Store } from '@ngrx/store';
7
+ import { LocalizationService } from '@o3r/localization';
8
+ import { ActionUpdatePlaceholderBlock } from './placeholder.interfaces';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * Service to handle async PlaceholderTemplate actions
12
+ */
13
+ export declare class PlaceholderRulesEngineActionHandler implements OnDestroy, RulesEngineActionHandler<ActionUpdatePlaceholderBlock> {
14
+ private readonly logger;
15
+ protected subscription: Subscription;
16
+ protected placeholdersActions$: Subject<{
17
+ placeholderId: string;
18
+ templateUrl: string;
19
+ priority: number;
20
+ }[]>;
21
+ /** @inheritdoc */
22
+ readonly supportingActions: readonly ["UPDATE_PLACEHOLDER"];
23
+ constructor(store: Store<PlaceholderTemplateStore>, logger: LoggerService, translateService?: LocalizationService);
24
+ /**
25
+ * Localize the url, replacing the language marker
26
+ * @param url
27
+ * @param language
28
+ */
29
+ protected resolveUrlWithLang(url: string, language: string | null): string;
30
+ /**
31
+ * Retrieve template as json from a given url
32
+ * @param url
33
+ */
34
+ protected retrieveTemplate(url: string): Promise<PlaceholderRequestReply>;
35
+ /** @inheritdoc */
36
+ executeActions(actions: ActionUpdatePlaceholderBlock[]): void;
37
+ /** @inheritdoc */
38
+ ngOnDestroy(): void;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<PlaceholderRulesEngineActionHandler, [null, null, { optional: true; }]>;
40
+ static ɵprov: i0.ɵɵInjectableDeclaration<PlaceholderRulesEngineActionHandler>;
41
+ }
42
+ //# sourceMappingURL=placeholder.action-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholder.action-handler.d.ts","sourceRoot":"","sources":["../../src/rules-engine/placeholder.action-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,SAAS,EAAY,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAgE,OAAO,EAAE,YAAY,EAAkB,MAAM,MAAM,CAAC;AAC3H,OAAO,EAEL,uBAAuB,EACvB,wBAAwB,EAMzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAU,KAAK,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,4BAA4B,EAA+C,MAAM,0BAA0B,CAAC;;AAGrH;;GAEG;AACH,qBACa,mCAAoC,YAAW,SAAS,EAAE,wBAAwB,CAAC,4BAA4B,CAAC;IASvE,OAAO,CAAC,QAAQ,CAAC,MAAM;IAP3E,SAAS,CAAC,YAAY,eAAsB;IAE5C,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC,CAAiB;IAE5H,kBAAkB;IAClB,SAAgB,iBAAiB,kCAA0D;gBAE/E,KAAK,EAAE,KAAK,CAAC,wBAAwB,CAAC,EAAmB,MAAM,EAAE,aAAa,EAAc,gBAAgB,CAAC,EAAE,mBAAmB;IAwG9I;;;;OAIG;IACH,SAAS,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM;IAO1E;;;OAGG;cACa,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAM/E,kBAAkB;IACX,cAAc,CAAC,OAAO,EAAE,4BAA4B,EAAE;IAU7D,kBAAkB;IACX,WAAW,IAAI,IAAI;yCAnJf,mCAAmC;6CAAnC,mCAAmC;CAsJ/C"}
@@ -0,0 +1,13 @@
1
+ import type { RulesEngineAction } from '@o3r/core';
2
+ /** ActionUpdatePlaceholderBlock */
3
+ export declare const RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE = "UPDATE_PLACEHOLDER";
4
+ /**
5
+ * Content of action that updates a placeholder
6
+ */
7
+ export interface ActionUpdatePlaceholderBlock extends RulesEngineAction {
8
+ actionType: typeof RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE;
9
+ placeholderId: string;
10
+ value: string;
11
+ priority?: number;
12
+ }
13
+ //# sourceMappingURL=placeholder.interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholder.interfaces.d.ts","sourceRoot":"","sources":["../../src/rules-engine/placeholder.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,oCAAoC;AACpC,eAAO,MAAM,2CAA2C,uBAAuB,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB;IACrE,UAAU,EAAE,OAAO,2CAA2C,CAAC;IAC/D,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,37 @@
1
+ import { Actions } from '@ngrx/effects';
2
+ import { PlaceholderRequestStore } from '@o3r/components';
3
+ import { DynamicContentService } from '@o3r/dynamic-content';
4
+ import { LocalizationService } from '@o3r/localization';
5
+ import { RulesEngineRunnerService } from '@o3r/rules-engine';
6
+ import { Observable } from 'rxjs';
7
+ import { Store } from '@ngrx/store';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * Service to handle async PlaceholderTemplate actions
11
+ */
12
+ export declare class PlaceholderTemplateResponseEffect {
13
+ private readonly actions$;
14
+ private readonly store;
15
+ private readonly rulesEngineService;
16
+ private readonly dynamicContentService;
17
+ private readonly translationService;
18
+ /**
19
+ * Set the PlaceholderRequest entity with the reply content, dispatch failPlaceholderRequestEntity if it catches a failure
20
+ * Handles the rendering of the HTML content from the template and creates the combine latest from facts list if needed
21
+ * Disables unused templates refresh if used is false in the store
22
+ */
23
+ setPlaceholderRequestEntityFromUrl$: Observable<(import("@o3r/core").UpdateAsyncStoreItemEntityActionPayloadWithId<import("@o3r/components").PlaceholderRequestModel> & import("@ngrx/store/src/models").TypedAction<"[PlaceholderRequest] update entity">) | (import("@o3r/core").FailAsyncStoreItemEntitiesActionPayload<any> & import("@ngrx/store/src/models").TypedAction<"[PlaceholderRequest] fail entities">) | (import("@o3r/core").AsyncRequest & {
24
+ id: string;
25
+ } & import("@ngrx/store/src/models").TypedAction<"[PlaceholderRequest] cancel request">)> & import("@ngrx/effects").CreateEffectMetadata;
26
+ constructor(actions$: Actions, store: Store<PlaceholderRequestStore>, rulesEngineService: RulesEngineRunnerService | null, dynamicContentService: DynamicContentService | null, translationService: LocalizationService | null);
27
+ /**
28
+ * Renders the html template, replacing facts and urls and localizationKeys
29
+ * @param template
30
+ * @param vars
31
+ * @param facts
32
+ */
33
+ private getRenderedHTML$;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<PlaceholderTemplateResponseEffect, [null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<PlaceholderTemplateResponseEffect>;
36
+ }
37
+ //# sourceMappingURL=placeholder.rules-engine.effect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholder.rules-engine.effect.d.ts","sourceRoot":"","sources":["../../src/rules-engine/placeholder.rules-engine.effect.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAuB,MAAM,eAAe,CAAC;AAC5D,OAAO,EAGL,uBAAuB,EAKxB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAC,qBAAqB,EAAC,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAC,wBAAwB,EAAC,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAuB,UAAU,EAAK,MAAM,MAAM,CAAC;AAE1D,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;;AAGlC;;GAEG;AACH,qBACa,iCAAiC;IAoD1C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACV,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACtC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAvDjD;;;;OAIG;IACI,mCAAmC;;6IA2CxC;gBAGiB,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,KAAK,CAAC,uBAAuB,CAAC,EACzB,kBAAkB,EAAE,wBAAwB,GAAG,IAAI,EACnD,qBAAqB,EAAE,qBAAqB,GAAG,IAAI,EACnD,kBAAkB,EAAE,mBAAmB,GAAG,IAAI;IAG7E;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;yCAjEb,iCAAiC;6CAAjC,iCAAiC;CAgI7C"}
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@ngrx/effects";
3
+ import * as i2 from "@o3r/components";
4
+ export declare class PlaceholderRulesEngineActionModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<PlaceholderRulesEngineActionModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PlaceholderRulesEngineActionModule, never, [typeof i1.EffectsFeatureModule, typeof i2.PlaceholderRequestStoreModule, typeof i2.PlaceholderTemplateStoreModule], never>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<PlaceholderRulesEngineActionModule>;
8
+ }
9
+ //# sourceMappingURL=placeholder.rules-engine.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholder.rules-engine.module.d.ts","sourceRoot":"","sources":["../../src/rules-engine/placeholder.rules-engine.module.ts"],"names":[],"mappings":";;;AAMA,qBAUa,kCAAkC;yCAAlC,kCAAkC;0CAAlC,kCAAkC;0CAAlC,kCAAkC;CAC9C"}
@@ -0,0 +1,4 @@
1
+ export * from './placeholder.rules-engine.module';
2
+ export * from './placeholder.action-handler';
3
+ export * from './placeholder.interfaces';
4
+ //# sourceMappingURL=public_api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../src/rules-engine/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "http://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
3
  "$id": "ComponentMetadataSchema",
4
4
  "description": "Schema of Component class",
5
5
  "type": "array",
@@ -107,6 +107,13 @@
107
107
  "linkableToRuleset": {
108
108
  "type": "boolean",
109
109
  "description": "Determine if the component is activating a ruleset"
110
+ },
111
+ "localizationKeys": {
112
+ "type": "array",
113
+ "description": "List of localization keys declared by the component",
114
+ "items": {
115
+ "type": "string"
116
+ }
110
117
  }
111
118
  }
112
119
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "http://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
3
  "$id": "ComponentMetadataSchema",
4
4
  "description": "Schema of the placeholders descriptor",
5
5
  "type": "object",
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "ActionUpdatePlaceholderBlock",
4
+ "type": "object",
5
+ "description": "Content of action that updates a placeholder",
6
+ "properties": {
7
+ "actionType": {
8
+ "type": "string",
9
+ "description": "Action Type",
10
+ "const": "UPDATE_PLACEHOLDER"
11
+ },
12
+ "placeholderId": {
13
+ "type": "string",
14
+ "description": "Id of the placeholder to update"
15
+ },
16
+ "value": {
17
+ "type": "string"
18
+ }
19
+ },
20
+ "additionalItems": false,
21
+ "required": [
22
+ "actionType",
23
+ "placeholderId",
24
+ "value"
25
+ ]
26
+ }
@@ -1,7 +1,6 @@
1
1
  import { Rule } from '@angular-devkit/schematics';
2
2
  /**
3
3
  * Update CMS adapter tools
4
- *
5
4
  * @param options @see RuleFactory.options
6
5
  * @param options.projectName
7
6
  * @param rootPath @see RuleFactory.rootPath
@@ -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;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,IAAI,CAuEpF"}
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"}
@@ -7,7 +7,6 @@ const schematics_2 = require("@o3r/schematics");
7
7
  const path = tslib_1.__importStar(require("node:path"));
8
8
  /**
9
9
  * Update CMS adapter tools
10
- *
11
10
  * @param options @see RuleFactory.options
12
11
  * @param options.projectName
13
12
  * @param rootPath @see RuleFactory.rootPath
@@ -18,15 +17,14 @@ function updateCmsAdapter(options) {
18
17
  }
19
18
  /**
20
19
  * Add cms extractors builder into the angular.json
21
- *
22
20
  * @param tree
23
21
  * @param _context
24
22
  * @param context
25
23
  */
26
24
  const editAngularJson = (tree, context) => {
27
- const workspace = (0, schematics_2.readAngularJson)(tree);
28
- const workspaceProject = (0, schematics_2.getProjectFromTree)(tree, options.projectName);
29
- if (!workspaceProject) {
25
+ const workspace = (0, schematics_2.getWorkspaceConfig)(tree);
26
+ const workspaceProject = options.projectName ? workspace?.projects[options.projectName] : undefined;
27
+ if (!workspace || !workspaceProject) {
30
28
  context.logger.error('No project detected, the extractors will not be added');
31
29
  return tree;
32
30
  }
@@ -40,20 +38,18 @@ function updateCmsAdapter(options) {
40
38
  libraries: []
41
39
  }
42
40
  };
43
- const { name, ...newProject } = workspaceProject;
44
- workspace.projects[name] = newProject;
41
+ workspace.projects[options.projectName] = workspaceProject;
45
42
  tree.overwrite('/angular.json', JSON.stringify(workspace, null, 2));
46
43
  return tree;
47
44
  };
48
45
  /**
49
46
  * Add cms extractors scripts into the package.json
50
- *
51
47
  * @param tree
52
48
  * @param _context
53
49
  * @param context
54
50
  */
55
51
  const addExtractorsScripts = (tree, context) => {
56
- const workspaceProject = (0, schematics_2.getProjectFromTree)(tree, options.projectName);
52
+ const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
57
53
  if (!workspaceProject) {
58
54
  context.logger.error('No package detected, the extractor scripts will not be added');
59
55
  return tree;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/cms-adapter/index.ts"],"names":[],"mappings":";;;;AAAA,2DAAuF;AACvF,gDAAoI;AACpI,wDAAkC;AAGlC;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,OAA6C;IAC5E,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;QACxB,OAAO,iBAAI,CAAC;KACb;IAED;;;;;;OAMG;IACH,MAAM,eAAe,GAAG,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAChE,MAAM,SAAS,GAAG,IAAA,4BAAe,EAAC,IAAI,CAAC,CAAC;QACxC,MAAM,gBAAgB,GAAG,IAAA,+BAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;QAEvE,IAAI,CAAC,gBAAgB,EAAE;YACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;YAC9E,OAAO,IAAI,CAAC;SACb;QAED,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE;YAC/B,gBAAgB,CAAC,SAAS,GAAG,EAAE,CAAC;SACjC;QAED,gBAAgB,CAAC,SAAS,CAAC,oBAAoB,CAAC,KAAK;YACnD,OAAO,EAAE,2BAA2B;YACpC,OAAO,EAAE;gBACP,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,IAAI,EAAE,EAAE,mBAAmB,CAAC;gBACtE,SAAS,EAAE,EAAE;aACd;SACF,CAAC;QAEF,MAAM,EA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EhB,IAAI,CAAC,SAAS,CAAC,GAAG,gBAAgB,CAAC,IAAI,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9F,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,IAAA,kBAAK,EAAC;QACX,oBAAoB;QACpB,eAAe;KAChB,CAAC,CAAC;AACL,CAAC;AApED,4CAoEC"}
@@ -0,0 +1,10 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ import type { NgAddSchematicsSchema } from '../schema';
3
+ /**
4
+ * Register Devtools to the application
5
+ * @param tree
6
+ * @param context
7
+ * @param options
8
+ */
9
+ export declare const registerDevtools: (options: NgAddSchematicsSchema) => Promise<Rule>;
10
+ //# sourceMappingURL=devtools-registration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools-registration.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/helpers/devtools-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAMvD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,YAAmB,qBAAqB,KAAG,QAAQ,IAAI,CAQnF,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerDevtools = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const path = tslib_1.__importStar(require("node:path"));
6
+ const DEVTOOL_MODULE_NAME = 'ComponentsDevtoolsModule';
7
+ const DEVTOOL_SERVICE_NAME = 'ComponentsDevtoolsMessageService';
8
+ const PACKAGE_NAME = require(path.resolve(__dirname, '..', '..', '..', 'package.json')).name;
9
+ /**
10
+ * Register Devtools to the application
11
+ * @param tree
12
+ * @param context
13
+ * @param options
14
+ */
15
+ const registerDevtools = async (options) => {
16
+ const { registerDevtoolsToApplication } = await Promise.resolve().then(() => tslib_1.__importStar(require('@o3r/schematics')));
17
+ return registerDevtoolsToApplication({
18
+ moduleName: DEVTOOL_MODULE_NAME,
19
+ packageName: PACKAGE_NAME,
20
+ serviceName: DEVTOOL_SERVICE_NAME,
21
+ projectName: options.projectName
22
+ });
23
+ };
24
+ exports.registerDevtools = registerDevtools;
25
+ //# sourceMappingURL=devtools-registration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools-registration.js","sourceRoot":"","sources":["../../../../schematics/ng-add/helpers/devtools-registration.ts"],"names":[],"mappings":";;;;AACA,wDAAkC;AAGlC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AACvD,MAAM,oBAAoB,GAAG,kCAAkC,CAAC;AAChE,MAAM,YAAY,GAAW,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;AAErG;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,KAAK,EAAE,OAA8B,EAAiB,EAAE;IACtF,MAAM,EAAE,6BAA6B,EAAE,GAAG,gEAAa,iBAAiB,GAAC,CAAC;IAC1E,OAAO,6BAA6B,CAAC;QACnC,UAAU,EAAE,mBAAmB;QAC/B,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,oBAAoB;QACjC,WAAW,EAAE,OAAO,CAAC,WAAW;KACjC,CAAC,CAAC;AACL,CAAC,CAAC;AARW,QAAA,gBAAgB,oBAQ3B"}
@@ -2,7 +2,6 @@ import { Rule } from '@angular-devkit/schematics';
2
2
  import type { NgAddSchematicsSchema } from './schema';
3
3
  /**
4
4
  * Add Otter components to an Angular Project
5
- *
6
5
  * @param options
7
6
  */
8
7
  export declare function ngAdd(options: NgAddSchematicsSchema): Rule;
@@ -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;AAIjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAqD1D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAIjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGtD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAuD1D"}
@@ -6,16 +6,16 @@ const schematics_1 = require("@angular-devkit/schematics");
6
6
  const path = tslib_1.__importStar(require("node:path"));
7
7
  const fs = tslib_1.__importStar(require("node:fs"));
8
8
  const cms_adapter_1 = require("../cms-adapter");
9
+ const devtools_registration_1 = require("./helpers/devtools-registration");
9
10
  /**
10
11
  * Add Otter components to an Angular Project
11
- *
12
12
  * @param options
13
13
  */
14
14
  function ngAdd(options) {
15
15
  /* ng add rules */
16
16
  return async (tree, context) => {
17
17
  try {
18
- const { getDefaultOptionsForSchematic, getO3rPeerDeps, getProjectDepType, getWorkspaceConfig, ngAddPackages, ngAddPeerDependencyPackages, removePackages, registerPackageCollectionSchematics, getProjectRootDir } = await Promise.resolve().then(() => tslib_1.__importStar(require('@o3r/schematics')));
18
+ const { getDefaultOptionsForSchematic, getO3rPeerDeps, getProjectNewDependenciesType, getWorkspaceConfig, ngAddPackages, ngAddPeerDependencyPackages, removePackages, registerPackageCollectionSchematics } = await Promise.resolve().then(() => tslib_1.__importStar(require('@o3r/schematics')));
19
19
  // eslint-disable-next-line @typescript-eslint/naming-convention
20
20
  const { NodeDependencyType } = await Promise.resolve().then(() => tslib_1.__importStar(require('@schematics/angular/utility/dependencies')));
21
21
  options = { ...getDefaultOptionsForSchematic(getWorkspaceConfig(tree), '@o3r/components', 'ng-add', options), ...options };
@@ -25,8 +25,9 @@ function ngAdd(options) {
25
25
  if (options.enableMetadataExtract) {
26
26
  depsInfo.o3rPeerDeps = [...depsInfo.o3rPeerDeps, '@o3r/extractors'];
27
27
  }
28
- const dependencyType = getProjectDepType(tree);
29
- const workingDirectory = getProjectRootDir(tree, options.projectName);
28
+ const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
29
+ const workingDirectory = workspaceProject?.root || '.';
30
+ const dependencyType = getProjectNewDependenciesType(workspaceProject);
30
31
  const rule = (0, schematics_1.chain)([
31
32
  removePackages(['@otter/components']),
32
33
  ngAddPackages(depsInfo.o3rPeerDeps, {
@@ -39,7 +40,8 @@ function ngAdd(options) {
39
40
  }),
40
41
  ngAddPeerDependencyPackages(['chokidar'], packageJsonPath, NodeDependencyType.Dev, { ...options, workingDirectory, skipNgAddSchematicRun: true }, '@o3r/components - install builder dependency'),
41
42
  registerPackageCollectionSchematics(packageJson),
42
- ...(options.enableMetadataExtract ? [(0, cms_adapter_1.updateCmsAdapter)(options)] : [])
43
+ ...(options.enableMetadataExtract ? [(0, cms_adapter_1.updateCmsAdapter)(options)] : []),
44
+ await (0, devtools_registration_1.registerDevtools)(options)
43
45
  ]);
44
46
  context.logger.info(`The package ${depsInfo.packageName} comes with a debug mechanism`);
45
47
  context.logger.info('Get more information on the following page: https://github.com/AmadeusITGroup/otter/tree/main/docs/components/COMPONENT_STRUCTURE.md#Runtime-debugging');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;;AAAA,2DAAiF;AACjF,wDAAkC;AAClC,oDAA8B;AAC9B,gDAAkD;AAGlD;;;;GAIG;AACH,SAAgB,KAAK,CAAC,OAA8B;IAClD,kBAAkB;IAClB,OAAO,KAAK,EAAE,IAAU,EAAE,OAAyB,EAAE,EAAE;QACrD,IAAI;YACF,MAA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C,WAAW;oBAChC,cAAc;oBACd,gBAAgB;iBACjB,CAAC;gBACF,2BAA2B,CAAC,CAAC,UAAU,CAAC,EAAE,eAAe,EAAE,kBAAkB,CAAC,GAAG,EAAE,EAAC,GAAG,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,IAAI,EAAC,EAAE,8CAA8C,CAAC;gBAC/L,mCAAmC,CAAC,WAAW,CAAC;gBAChD,GAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,IAAA,8BAAgB,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACrE,MAAM,IAAA,wCAAgB,EAAC,OAAO,CAAC;aAChC,CAAC,CAAC;YAEH,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,QAAQ,CAAC,WAAY,+BAA+B,CAAC,CAAC;YACzF,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,wJAAwJ,CAAC,CAAC;YAE9K,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SAClC;QAAC,OAAO,CAAC,EAAE;YACV,8EAA8E;YAC9E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;;oDAEyB,CAAC,CAAC;YAChD,MAAM,CAAC,CAAC,CAAC,CAAC;SACX;IACH,CAAC,CAAC;AACJ,CAAC;AAvDD,sBAuDC"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "http://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
3
  "$id": "ngAddSchematicsSchema",
4
4
  "title": "Add Otter components ",
5
5
  "description": "ngAdd Otter components ",
@@ -4,7 +4,6 @@ export declare const selectPlaceholderRequestState: import("@ngrx/store").Memoiz
4
4
  export declare const selectPlaceholderRequestEntities: import("@ngrx/store").MemoizedSelector<object, import("@ngrx/entity").Dictionary<import("./placeholder-request.state").PlaceholderRequestModel>, (s1: PlaceholderRequestState) => import("@ngrx/entity").Dictionary<import("./placeholder-request.state").PlaceholderRequestModel>>;
5
5
  /**
6
6
  * Select a specific PlaceholderRequest entity using a raw url as id
7
- *
8
7
  * @param rawUrl
9
8
  */
10
9
  export declare const selectPlaceholderRequestEntityUsage: (rawUrl: string) => import("@ngrx/store").MemoizedSelector<object, boolean | undefined, (s1: PlaceholderRequestState) => boolean | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"placeholder-request.selectors.d.ts","sourceRoot":"","sources":["../../../src/stores/placeholder-request/placeholder-request.selectors.ts"],"names":[],"mappings":"AACA,OAAO,EAAiC,uBAAuB,EAAC,MAAM,6BAA6B,CAAC;AAGpG,eAAO,MAAM,6BAA6B,4IAAiF,CAAC;AAI5H,2DAA2D;AAC3D,eAAO,MAAM,gCAAgC,qRAA2F,CAAC;AAEzI;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,WAAY,MAAM,8HAI9D,CAAC"}
1
+ {"version":3,"file":"placeholder-request.selectors.d.ts","sourceRoot":"","sources":["../../../src/stores/placeholder-request/placeholder-request.selectors.ts"],"names":[],"mappings":"AACA,OAAO,EAAiC,uBAAuB,EAAC,MAAM,6BAA6B,CAAC;AAGpG,eAAO,MAAM,6BAA6B,4IAAiF,CAAC;AAI5H,2DAA2D;AAC3D,eAAO,MAAM,gCAAgC,qRAA2F,CAAC;AAEzI;;;GAGG;AACH,eAAO,MAAM,mCAAmC,WAAY,MAAM,8HAI9D,CAAC"}