@o3r/components 11.6.0-prerelease.3 → 11.6.0-prerelease.31

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 (143) hide show
  1. package/builders/component-extractor/helpers/component/component-class.extractor.d.ts +3 -9
  2. package/builders/component-extractor/helpers/component/component-class.extractor.d.ts.map +1 -1
  3. package/builders/component-extractor/helpers/component/component-class.extractor.js +34 -37
  4. package/builders/component-extractor/helpers/component/component-config.extractor.d.ts +2 -15
  5. package/builders/component-extractor/helpers/component/component-config.extractor.d.ts.map +1 -1
  6. package/builders/component-extractor/helpers/component/component-config.extractor.js +41 -48
  7. package/builders/component-extractor/helpers/component/component.extractor.d.ts +2 -10
  8. package/builders/component-extractor/helpers/component/component.extractor.d.ts.map +1 -1
  9. package/builders/component-extractor/helpers/component/component.extractor.js +20 -25
  10. package/builders/component-extractor/helpers/component/component.parser.d.ts +2 -3
  11. package/builders/component-extractor/helpers/component/component.parser.d.ts.map +1 -1
  12. package/builders/component-extractor/helpers/component/component.parser.js +11 -14
  13. package/builders/component-extractor/index.d.ts.map +1 -1
  14. package/builders/component-extractor/index.js +25 -27
  15. package/builders/component-extractor/schema.d.ts.map +1 -1
  16. package/builders/metadata-check/helpers/config-metadata-comparison.helper.d.ts +2 -2
  17. package/builders/metadata-check/helpers/config-metadata-comparison.helper.d.ts.map +1 -1
  18. package/builders/metadata-check/helpers/config-metadata-comparison.helper.js +1 -1
  19. package/builders/metadata-check/index.d.ts.map +1 -1
  20. package/builders/metadata-check/schema.d.ts.map +1 -1
  21. package/core/component.output.d.ts.map +1 -1
  22. package/core/rendering/helpers.d.ts +0 -1
  23. package/core/rendering/helpers.d.ts.map +1 -1
  24. package/devkit/components-devkit.interface.d.ts.map +1 -1
  25. package/devkit/components-devtools.message.service.d.ts +4 -8
  26. package/devkit/components-devtools.message.service.d.ts.map +1 -1
  27. package/devkit/components-devtools.module.d.ts.map +1 -1
  28. package/devkit/components-devtools.token.d.ts +1 -1
  29. package/devkit/components-devtools.token.d.ts.map +1 -1
  30. package/devkit/inspector/ng/ng.d.ts +3 -1
  31. package/devkit/inspector/ng/ng.d.ts.map +1 -1
  32. package/devkit/inspector/otter-inspector.helpers.d.ts.map +1 -1
  33. package/devkit/inspector/otter-inspector.service.d.ts.map +1 -1
  34. package/esm2022/core/component.output.mjs +1 -1
  35. package/esm2022/core/rendering/helpers.mjs +3 -4
  36. package/esm2022/devkit/components-devkit.interface.mjs +7 -7
  37. package/esm2022/devkit/components-devtools.message.service.mjs +20 -24
  38. package/esm2022/devkit/components-devtools.module.mjs +10 -10
  39. package/esm2022/devkit/components-devtools.token.mjs +2 -2
  40. package/esm2022/devkit/index.mjs +1 -1
  41. package/esm2022/devkit/inspector/index.mjs +1 -1
  42. package/esm2022/devkit/inspector/ng/ng.mjs +1 -1
  43. package/esm2022/devkit/inspector/otter-inspector.helpers.mjs +8 -8
  44. package/esm2022/devkit/inspector/otter-inspector.service.mjs +8 -8
  45. package/esm2022/rules-engine/placeholder.action-handler.mjs +26 -28
  46. package/esm2022/rules-engine/placeholder.interfaces.mjs +1 -1
  47. package/esm2022/rules-engine/placeholder.rules-engine.effect.mjs +28 -25
  48. package/esm2022/rules-engine/placeholder.rules-engine.module.mjs +10 -10
  49. package/esm2022/rules-engine/public_api.mjs +2 -2
  50. package/esm2022/stores/index.mjs +2 -2
  51. package/esm2022/stores/placeholder-request/index.mjs +1 -1
  52. package/esm2022/stores/placeholder-request/placeholder-request.actions.mjs +3 -3
  53. package/esm2022/stores/placeholder-request/placeholder-request.module.mjs +9 -9
  54. package/esm2022/stores/placeholder-request/placeholder-request.reducer.mjs +4 -4
  55. package/esm2022/stores/placeholder-request/placeholder-request.selectors.mjs +4 -4
  56. package/esm2022/stores/placeholder-request/placeholder-request.state.mjs +1 -1
  57. package/esm2022/stores/placeholder-request/placeholder-request.sync.mjs +3 -3
  58. package/esm2022/stores/placeholder-template/index.mjs +1 -1
  59. package/esm2022/stores/placeholder-template/placeholder-template.actions.mjs +2 -2
  60. package/esm2022/stores/placeholder-template/placeholder-template.module.mjs +9 -9
  61. package/esm2022/stores/placeholder-template/placeholder-template.reducer.mjs +3 -3
  62. package/esm2022/stores/placeholder-template/placeholder-template.selectors.mjs +8 -8
  63. package/esm2022/stores/placeholder-template/placeholder-template.state.mjs +1 -1
  64. package/esm2022/stores/placeholder-template/placeholder-template.sync.mjs +2 -2
  65. package/esm2022/tools/component-replacement/c11n.directive.mjs +9 -8
  66. package/esm2022/tools/component-replacement/c11n.helpers.mjs +1 -1
  67. package/esm2022/tools/component-replacement/c11n.mock.module.mjs +15 -15
  68. package/esm2022/tools/component-replacement/c11n.module.mjs +10 -9
  69. package/esm2022/tools/component-replacement/c11n.service.mjs +7 -7
  70. package/esm2022/tools/component-replacement/c11n.token.mjs +2 -2
  71. package/esm2022/tools/component-replacement/index.mjs +3 -3
  72. package/esm2022/tools/pipes/capitalize/capitalize.module.mjs +7 -7
  73. package/esm2022/tools/pipes/capitalize/capitalize.pipe.mjs +8 -8
  74. package/esm2022/tools/pipes/duration/duration.module.mjs +7 -7
  75. package/esm2022/tools/pipes/duration/duration.pipe.mjs +10 -9
  76. package/esm2022/tools/pipes/keep-white-space/keep-white-space.module.mjs +7 -7
  77. package/esm2022/tools/pipes/keep-white-space/keep-white-space.pipe.mjs +8 -8
  78. package/esm2022/tools/pipes/replace-with-bold/replace-with-bold.module.mjs +7 -7
  79. package/esm2022/tools/pipes/replace-with-bold/replace-with-bold.pipe.mjs +9 -9
  80. package/esm2022/tools/placeholder/placeholder.component.mjs +24 -27
  81. package/esm2022/tools/placeholder/placeholder.interface.mjs +1 -1
  82. package/esm2022/tools/placeholder/placeholder.module.mjs +11 -11
  83. package/fesm2022/o3r-components-rules-engine.mjs +45 -44
  84. package/fesm2022/o3r-components-rules-engine.mjs.map +1 -1
  85. package/fesm2022/o3r-components.mjs +253 -259
  86. package/fesm2022/o3r-components.mjs.map +1 -1
  87. package/package.json +11 -11
  88. package/rules-engine/placeholder.action-handler.d.ts +4 -7
  89. package/rules-engine/placeholder.action-handler.d.ts.map +1 -1
  90. package/rules-engine/placeholder.interfaces.d.ts.map +1 -1
  91. package/rules-engine/placeholder.rules-engine.effect.d.ts +2 -2
  92. package/rules-engine/placeholder.rules-engine.effect.d.ts.map +1 -1
  93. package/rules-engine/placeholder.rules-engine.module.d.ts.map +1 -1
  94. package/rules-engine/public_api.d.ts +1 -1
  95. package/rules-engine/public_api.d.ts.map +1 -1
  96. package/schematics/cms-adapter/index.d.ts.map +1 -1
  97. package/schematics/cms-adapter/index.js +1 -1
  98. package/schematics/ng-add/helpers/devtools-registration.d.ts +0 -2
  99. package/schematics/ng-add/helpers/devtools-registration.d.ts.map +1 -1
  100. package/schematics/ng-add/helpers/devtools-registration.js +1 -3
  101. package/schematics/ng-add/index.d.ts.map +1 -1
  102. package/schematics/ng-add/index.js +3 -4
  103. package/schematics/ng-add/schema.d.ts.map +1 -1
  104. package/schematics/ng-update/v10-0/index.d.ts.map +1 -1
  105. package/schematics/ng-update/v10-0/index.js +2 -1
  106. package/stores/index.d.ts +1 -1
  107. package/stores/index.d.ts.map +1 -1
  108. package/stores/placeholder-request/placeholder-request.actions.d.ts.map +1 -1
  109. package/stores/placeholder-request/placeholder-request.module.d.ts.map +1 -1
  110. package/stores/placeholder-request/placeholder-request.reducer.d.ts.map +1 -1
  111. package/stores/placeholder-request/placeholder-request.selectors.d.ts.map +1 -1
  112. package/stores/placeholder-request/placeholder-request.state.d.ts.map +1 -1
  113. package/stores/placeholder-request/placeholder-request.sync.d.ts +1 -1
  114. package/stores/placeholder-request/placeholder-request.sync.d.ts.map +1 -1
  115. package/stores/placeholder-template/placeholder-template.actions.d.ts.map +1 -1
  116. package/stores/placeholder-template/placeholder-template.module.d.ts.map +1 -1
  117. package/stores/placeholder-template/placeholder-template.reducer.d.ts.map +1 -1
  118. package/stores/placeholder-template/placeholder-template.selectors.d.ts.map +1 -1
  119. package/stores/placeholder-template/placeholder-template.state.d.ts.map +1 -1
  120. package/stores/placeholder-template/placeholder-template.sync.d.ts +2 -2
  121. package/stores/placeholder-template/placeholder-template.sync.d.ts.map +1 -1
  122. package/tools/component-replacement/c11n.directive.d.ts.map +1 -1
  123. package/tools/component-replacement/c11n.helpers.d.ts.map +1 -1
  124. package/tools/component-replacement/c11n.mock.module.d.ts.map +1 -1
  125. package/tools/component-replacement/c11n.module.d.ts +1 -0
  126. package/tools/component-replacement/c11n.module.d.ts.map +1 -1
  127. package/tools/component-replacement/c11n.service.d.ts.map +1 -1
  128. package/tools/component-replacement/c11n.token.d.ts.map +1 -1
  129. package/tools/component-replacement/index.d.ts +2 -2
  130. package/tools/component-replacement/index.d.ts.map +1 -1
  131. package/tools/pipes/capitalize/capitalize.module.d.ts.map +1 -1
  132. package/tools/pipes/capitalize/capitalize.pipe.d.ts.map +1 -1
  133. package/tools/pipes/duration/duration.module.d.ts.map +1 -1
  134. package/tools/pipes/duration/duration.pipe.d.ts +1 -0
  135. package/tools/pipes/duration/duration.pipe.d.ts.map +1 -1
  136. package/tools/pipes/keep-white-space/keep-white-space.module.d.ts.map +1 -1
  137. package/tools/pipes/keep-white-space/keep-white-space.pipe.d.ts.map +1 -1
  138. package/tools/pipes/replace-with-bold/replace-with-bold.module.d.ts.map +1 -1
  139. package/tools/pipes/replace-with-bold/replace-with-bold.pipe.d.ts.map +1 -1
  140. package/tools/placeholder/placeholder.component.d.ts +1 -1
  141. package/tools/placeholder/placeholder.component.d.ts.map +1 -1
  142. package/tools/placeholder/placeholder.interface.d.ts.map +1 -1
  143. package/tools/placeholder/placeholder.module.d.ts.map +1 -1
@@ -1,11 +1,12 @@
1
- import { of, from, observeOn, animationFrameScheduler, BehaviorSubject, Subscription, firstValueFrom, fromEvent, Subject, ReplaySubject, sample } from 'rxjs';
1
+ import { of, from, observeOn, animationFrameScheduler, BehaviorSubject, firstValueFrom, fromEvent, Subject, ReplaySubject, sample } from 'rxjs';
2
2
  import { mergeMap, bufferCount, concatMap, delay, scan, tap, filter, distinctUntilChanged, map, mapTo, switchMap } from 'rxjs/operators';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, NgModule, Injectable, Optional, Inject, SimpleChange, forwardRef, Directive, Input, Pipe, Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
5
- import { asyncProps, createEntityAsyncRequestAdapter, asyncStoreItemAdapter, asyncEntitySerializer, otterComponentInfoPropertyName, sendOtterMessage, filterMessageContent } from '@o3r/core';
6
- import * as i1$1 from '@o3r/logger';
4
+ import { InjectionToken, NgModule, inject, DestroyRef, Injectable, Optional, Inject, SimpleChange, forwardRef, Directive, Input, Pipe, Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
5
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
6
  import * as i1 from '@ngrx/store';
8
7
  import { createAction, props, on, createReducer, StoreModule, createFeatureSelector, createSelector } from '@ngrx/store';
8
+ import { asyncProps, createEntityAsyncRequestAdapter, asyncStoreItemAdapter, asyncEntitySerializer, otterComponentInfoPropertyName, sendOtterMessage, filterMessageContent } from '@o3r/core';
9
+ import * as i1$1 from '@o3r/logger';
9
10
  import { createEntityAdapter } from '@ngrx/entity';
10
11
  import { NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
11
12
  import * as i2 from '@angular/common';
@@ -17,7 +18,6 @@ import { CommonModule } from '@angular/common';
17
18
  * of similar components.
18
19
  * @param delayMs Delay between data emits
19
20
  * @param concurrency Amount of elements that should be emitted at once
20
- * @returns
21
21
  */
22
22
  function lazyArray(delayMs = 0, concurrency = 2) {
23
23
  let isFirstEmission = true;
@@ -46,97 +46,14 @@ function lazyArray(delayMs = 0, concurrency = 2) {
46
46
  * @param message message to check
47
47
  */
48
48
  const isComponentsMessage = (message) => {
49
- return message && (message.dataType === 'requestMessages' ||
50
- message.dataType === 'connect' ||
51
- message.dataType === 'selectedComponentInfo' ||
52
- message.dataType === 'isComponentSelectionAvailable' ||
53
- message.dataType === 'placeholderMode' ||
54
- message.dataType === 'toggleInspector');
49
+ return message && (message.dataType === 'requestMessages'
50
+ || message.dataType === 'connect'
51
+ || message.dataType === 'selectedComponentInfo'
52
+ || message.dataType === 'isComponentSelectionAvailable'
53
+ || message.dataType === 'placeholderMode'
54
+ || message.dataType === 'toggleInspector');
55
55
  };
56
56
 
57
- const ACTION_DELETE_ENTITY = '[PlaceholderTemplate] delete entity';
58
- const ACTION_SET_ENTITY = '[PlaceholderTemplate] set entity';
59
- const ACTION_TOGGLE_MODE = '[PlaceholderTemplate] toggle mode';
60
- /** Action to delete a specific entity */
61
- const deletePlaceholderTemplateEntity = createAction(ACTION_DELETE_ENTITY, props());
62
- /** Action to clear all placeholderTemplate and fill the store with the payload */
63
- const setPlaceholderTemplateEntity = createAction(ACTION_SET_ENTITY, props());
64
- const togglePlaceholderModeTemplate = createAction(ACTION_TOGGLE_MODE, props());
65
-
66
- /**
67
- * PlaceholderTemplate Store adapter
68
- */
69
- const placeholderTemplateAdapter = createEntityAdapter({
70
- selectId: (model) => model.id
71
- });
72
- /**
73
- * PlaceholderTemplate Store initial value
74
- */
75
- const placeholderTemplateInitialState = placeholderTemplateAdapter.getInitialState({
76
- mode: 'normal'
77
- });
78
- /**
79
- * List of basic actions for PlaceholderTemplate Store
80
- */
81
- const placeholderTemplateReducerFeatures = [
82
- on(setPlaceholderTemplateEntity, (state, payload) => placeholderTemplateAdapter.addOne(payload.entity, placeholderTemplateAdapter.removeOne(payload.entity.id, state))),
83
- on(deletePlaceholderTemplateEntity, (state, payload) => {
84
- const id = payload.id;
85
- if (!id || !state.entities[id]) {
86
- return state;
87
- }
88
- return placeholderTemplateAdapter.removeOne(id, state);
89
- }),
90
- on(togglePlaceholderModeTemplate, (state, payload) => {
91
- return {
92
- ...state,
93
- mode: payload.mode
94
- };
95
- })
96
- ];
97
- /**
98
- * PlaceholderTemplate Store reducer
99
- */
100
- const placeholderTemplateReducer = createReducer(placeholderTemplateInitialState, ...placeholderTemplateReducerFeatures);
101
-
102
- /**
103
- * Name of the PlaceholderTemplate Store
104
- */
105
- const PLACEHOLDER_TEMPLATE_STORE_NAME = 'placeholderTemplate';
106
-
107
- /** Token of the PlaceholderTemplate reducer */
108
- const PLACEHOLDER_TEMPLATE_REDUCER_TOKEN = new InjectionToken('Feature PlaceholderTemplate Reducer');
109
- /** Provide default reducer for PlaceholderTemplate store */
110
- function getDefaultPlaceholderTemplateReducer() {
111
- return placeholderTemplateReducer;
112
- }
113
- class PlaceholderTemplateStoreModule {
114
- static forRoot(reducerFactory) {
115
- return {
116
- ngModule: PlaceholderTemplateStoreModule,
117
- providers: [
118
- { provide: PLACEHOLDER_TEMPLATE_REDUCER_TOKEN, useFactory: reducerFactory }
119
- ]
120
- };
121
- }
122
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderTemplateStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
123
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderTemplateStoreModule, imports: [i1.StoreFeatureModule] }); }
124
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderTemplateStoreModule, providers: [
125
- { provide: PLACEHOLDER_TEMPLATE_REDUCER_TOKEN, useFactory: getDefaultPlaceholderTemplateReducer }
126
- ], imports: [StoreModule.forFeature(PLACEHOLDER_TEMPLATE_STORE_NAME, PLACEHOLDER_TEMPLATE_REDUCER_TOKEN)] }); }
127
- }
128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderTemplateStoreModule, decorators: [{
129
- type: NgModule,
130
- args: [{
131
- imports: [
132
- StoreModule.forFeature(PLACEHOLDER_TEMPLATE_STORE_NAME, PLACEHOLDER_TEMPLATE_REDUCER_TOKEN)
133
- ],
134
- providers: [
135
- { provide: PLACEHOLDER_TEMPLATE_REDUCER_TOKEN, useFactory: getDefaultPlaceholderTemplateReducer }
136
- ]
137
- }]
138
- }] });
139
-
140
57
  const ACTION_FAIL_ENTITIES = '[PlaceholderRequest] fail entities';
141
58
  const ACTION_SET_ENTITY_FROM_URL = '[PlaceholderRequest] set entity from url';
142
59
  const ACTION_CANCEL_REQUEST = '[PlaceholderRequest] cancel request';
@@ -240,13 +157,13 @@ class PlaceholderRequestStoreModule {
240
157
  ]
241
158
  };
242
159
  }
243
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderRequestStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
244
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderRequestStoreModule, imports: [i1.StoreFeatureModule] }); }
245
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderRequestStoreModule, providers: [
160
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderRequestStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
161
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderRequestStoreModule, imports: [i1.StoreFeatureModule] }); }
162
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderRequestStoreModule, providers: [
246
163
  { provide: PLACEHOLDER_REQUEST_REDUCER_TOKEN, useFactory: getDefaultplaceholderRequestReducer }
247
164
  ], imports: [StoreModule.forFeature(PLACEHOLDER_REQUEST_STORE_NAME, PLACEHOLDER_REQUEST_REDUCER_TOKEN)] }); }
248
165
  }
249
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderRequestStoreModule, decorators: [{
166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderRequestStoreModule, decorators: [{
250
167
  type: NgModule,
251
168
  args: [{
252
169
  imports: [
@@ -286,6 +203,89 @@ const placeholderRequestStorageSync = {
286
203
  deserialize: placeholderRequestStorageDeserializer
287
204
  };
288
205
 
206
+ const ACTION_DELETE_ENTITY = '[PlaceholderTemplate] delete entity';
207
+ const ACTION_SET_ENTITY = '[PlaceholderTemplate] set entity';
208
+ const ACTION_TOGGLE_MODE = '[PlaceholderTemplate] toggle mode';
209
+ /** Action to delete a specific entity */
210
+ const deletePlaceholderTemplateEntity = createAction(ACTION_DELETE_ENTITY, props());
211
+ /** Action to clear all placeholderTemplate and fill the store with the payload */
212
+ const setPlaceholderTemplateEntity = createAction(ACTION_SET_ENTITY, props());
213
+ const togglePlaceholderModeTemplate = createAction(ACTION_TOGGLE_MODE, props());
214
+
215
+ /**
216
+ * PlaceholderTemplate Store adapter
217
+ */
218
+ const placeholderTemplateAdapter = createEntityAdapter({
219
+ selectId: (model) => model.id
220
+ });
221
+ /**
222
+ * PlaceholderTemplate Store initial value
223
+ */
224
+ const placeholderTemplateInitialState = placeholderTemplateAdapter.getInitialState({
225
+ mode: 'normal'
226
+ });
227
+ /**
228
+ * List of basic actions for PlaceholderTemplate Store
229
+ */
230
+ const placeholderTemplateReducerFeatures = [
231
+ on(setPlaceholderTemplateEntity, (state, payload) => placeholderTemplateAdapter.addOne(payload.entity, placeholderTemplateAdapter.removeOne(payload.entity.id, state))),
232
+ on(deletePlaceholderTemplateEntity, (state, payload) => {
233
+ const id = payload.id;
234
+ if (!id || !state.entities[id]) {
235
+ return state;
236
+ }
237
+ return placeholderTemplateAdapter.removeOne(id, state);
238
+ }),
239
+ on(togglePlaceholderModeTemplate, (state, payload) => {
240
+ return {
241
+ ...state,
242
+ mode: payload.mode
243
+ };
244
+ })
245
+ ];
246
+ /**
247
+ * PlaceholderTemplate Store reducer
248
+ */
249
+ const placeholderTemplateReducer = createReducer(placeholderTemplateInitialState, ...placeholderTemplateReducerFeatures);
250
+
251
+ /**
252
+ * Name of the PlaceholderTemplate Store
253
+ */
254
+ const PLACEHOLDER_TEMPLATE_STORE_NAME = 'placeholderTemplate';
255
+
256
+ /** Token of the PlaceholderTemplate reducer */
257
+ const PLACEHOLDER_TEMPLATE_REDUCER_TOKEN = new InjectionToken('Feature PlaceholderTemplate Reducer');
258
+ /** Provide default reducer for PlaceholderTemplate store */
259
+ function getDefaultPlaceholderTemplateReducer() {
260
+ return placeholderTemplateReducer;
261
+ }
262
+ class PlaceholderTemplateStoreModule {
263
+ static forRoot(reducerFactory) {
264
+ return {
265
+ ngModule: PlaceholderTemplateStoreModule,
266
+ providers: [
267
+ { provide: PLACEHOLDER_TEMPLATE_REDUCER_TOKEN, useFactory: reducerFactory }
268
+ ]
269
+ };
270
+ }
271
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderTemplateStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
272
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderTemplateStoreModule, imports: [i1.StoreFeatureModule] }); }
273
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderTemplateStoreModule, providers: [
274
+ { provide: PLACEHOLDER_TEMPLATE_REDUCER_TOKEN, useFactory: getDefaultPlaceholderTemplateReducer }
275
+ ], imports: [StoreModule.forFeature(PLACEHOLDER_TEMPLATE_STORE_NAME, PLACEHOLDER_TEMPLATE_REDUCER_TOKEN)] }); }
276
+ }
277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderTemplateStoreModule, decorators: [{
278
+ type: NgModule,
279
+ args: [{
280
+ imports: [
281
+ StoreModule.forFeature(PLACEHOLDER_TEMPLATE_STORE_NAME, PLACEHOLDER_TEMPLATE_REDUCER_TOKEN)
282
+ ],
283
+ providers: [
284
+ { provide: PLACEHOLDER_TEMPLATE_REDUCER_TOKEN, useFactory: getDefaultPlaceholderTemplateReducer }
285
+ ]
286
+ }]
287
+ }] });
288
+
289
289
  const { selectEntities } = placeholderTemplateAdapter.getSelectors();
290
290
  const selectPlaceholderTemplateState = createFeatureSelector(PLACEHOLDER_TEMPLATE_STORE_NAME);
291
291
  /** Select the dictionary of PlaceholderTemplate entities */
@@ -308,7 +308,7 @@ const selectSortedTemplates = (placeholderId) => createSelector(selectPlaceholde
308
308
  // The isPending will be considered true if any of the Url is still pending
309
309
  let isPending = false;
310
310
  const templates = [];
311
- placeholderTemplate.urlsWithPriority.forEach(urlWithPriority => {
311
+ placeholderTemplate.urlsWithPriority.forEach((urlWithPriority) => {
312
312
  const placeholderRequest = placeholderRequestState.entities[urlWithPriority.rawUrl];
313
313
  if (placeholderRequest) {
314
314
  // If one of the items is pending, we will wait to display all contents at the same time
@@ -331,7 +331,7 @@ const selectSortedTemplates = (placeholderId) => createSelector(selectPlaceholde
331
331
  // Sort templates by priority
332
332
  const orderedTemplates = templates.sort((template1, template2) => {
333
333
  return (template2.priority - template1.priority) || 1;
334
- }).filter(templateData => !!templateData.renderedTemplate);
334
+ }).filter((templateData) => !!templateData.renderedTemplate);
335
335
  return { orderedTemplates, isPending };
336
336
  });
337
337
  /**
@@ -346,7 +346,7 @@ const selectPlaceholderRenderedTemplates = (placeholderId) => createSelector(sel
346
346
  return;
347
347
  }
348
348
  return {
349
- orderedRenderedTemplates: placeholderData.orderedTemplates?.map(placeholder => placeholder.renderedTemplate),
349
+ orderedRenderedTemplates: placeholderData.orderedTemplates?.map((placeholder) => placeholder.renderedTemplate),
350
350
  isPending: placeholderData.isPending
351
351
  };
352
352
  });
@@ -408,7 +408,7 @@ function getTranslationsRec(node, rec) {
408
408
  const translations = {};
409
409
  subTranslations.forEach((s) => {
410
410
  Object.entries(s || {}).forEach(([k, v]) => {
411
- if (v.length) {
411
+ if (v.length > 0) {
412
412
  translations[k] = v;
413
413
  }
414
414
  });
@@ -416,11 +416,11 @@ function getTranslationsRec(node, rec) {
416
416
  if (component) {
417
417
  const componentName = component.constructor.name;
418
418
  const componentTranslations = Object.values(component[o3rInfoProperty]?.translations || {}).filter((t) => typeof t === 'string');
419
- if (componentTranslations.length) {
419
+ if (componentTranslations.length > 0) {
420
420
  translations[componentName] = componentTranslations;
421
421
  }
422
422
  }
423
- return Object.keys(translations).length ? translations : undefined;
423
+ return Object.keys(translations).length > 0 ? translations : undefined;
424
424
  }
425
425
  /**
426
426
  * Determine the translations of a node
@@ -445,7 +445,7 @@ function getAnalyticEventsRec(node, rec) {
445
445
  const events = {};
446
446
  subEvents.forEach((s) => {
447
447
  Object.entries(s || {}).forEach(([k, v]) => {
448
- if (v.length) {
448
+ if (v.length > 0) {
449
449
  events[k] = v;
450
450
  }
451
451
  });
@@ -453,11 +453,11 @@ function getAnalyticEventsRec(node, rec) {
453
453
  if (component && component[o3rInfoProperty]) {
454
454
  const componentName = component.constructor.name;
455
455
  const componentEvents = Object.values(component.analyticsEvents || {}).map((eventConstructor) => eventConstructor.name);
456
- if (componentEvents.length) {
456
+ if (componentEvents.length > 0) {
457
457
  events[componentName] = componentEvents;
458
458
  }
459
459
  }
460
- return Object.keys(events).length ? events : undefined;
460
+ return Object.keys(events).length > 0 ? events : undefined;
461
461
  }
462
462
  /**
463
463
  * Determine the analytics of a node
@@ -518,7 +518,6 @@ class OtterInspectorService {
518
518
  const container = isContainer(parentHost)
519
519
  ? getOtterLikeComponentInfo(parent, parentHost)
520
520
  : undefined;
521
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
522
521
  const { component, host, ...infoToBeSent } = this.selectedComponent;
523
522
  this.otterLikeComponentInfoToBeSent.next({
524
523
  ...infoToBeSent,
@@ -528,7 +527,7 @@ class OtterInspectorService {
528
527
  isOtterLikeComponent(info) {
529
528
  const hasConfigId = !!info.configId;
530
529
  const hasTranslations = !!info.translations?.length;
531
- const hasAnalytics = !!Object.keys(info.analytics || {}).length;
530
+ const hasAnalytics = Object.keys(info.analytics || {}).length > 0;
532
531
  return hasConfigId || hasTranslations || hasAnalytics;
533
532
  }
534
533
  findComponentInfo(node) {
@@ -623,10 +622,11 @@ class OtterInspectorService {
623
622
  }`;
624
623
  const inspectorDiv = document.createElement('div');
625
624
  const inspectorSpan = document.createElement('span');
626
- inspectorDiv.appendChild(inspectorSpan);
625
+ inspectorDiv.append(inspectorSpan);
627
626
  inspectorDiv.classList.add(INSPECTOR_CLASS);
628
- document.head.appendChild(inspectorCss);
629
- this.inspectorDiv = document.body.appendChild(inspectorDiv);
627
+ document.head.append(inspectorCss);
628
+ document.body.append(inspectorDiv);
629
+ this.inspectorDiv = inspectorDiv;
630
630
  }
631
631
  /**
632
632
  * Toggle the inspector.
@@ -652,8 +652,8 @@ class ComponentsDevtoolsMessageService {
652
652
  constructor(logger, store, options) {
653
653
  this.logger = logger;
654
654
  this.store = store;
655
- this.subscriptions = new Subscription();
656
655
  this.sendMessage = (sendOtterMessage);
656
+ this.destroyRef = inject(DestroyRef);
657
657
  this.options = {
658
658
  ...OTTER_COMPONENTS_DEVTOOLS_DEFAULT_OPTIONS,
659
659
  ...options
@@ -701,8 +701,7 @@ class ComponentsDevtoolsMessageService {
701
701
  }
702
702
  /**
703
703
  * Function to handle the incoming messages from Otter Chrome DevTools extension
704
- * @param event Event coming from the Otter Chrome DevTools extension
705
- * @param message
704
+ * @param message message coming from the Otter Chrome DevTools extension
706
705
  */
707
706
  async handleEvents(message) {
708
707
  this.logger.debug('Message handling by the components service', message);
@@ -730,19 +729,15 @@ class ComponentsDevtoolsMessageService {
730
729
  }
731
730
  /** @inheritDoc */
732
731
  activate() {
733
- this.subscriptions.add(fromEvent(window, 'message').pipe(filterMessageContent(isComponentsMessage)).subscribe((e) => this.handleEvents(e)));
732
+ fromEvent(window, 'message').pipe(takeUntilDestroyed(this.destroyRef), filterMessageContent(isComponentsMessage)).subscribe((e) => this.handleEvents(e));
734
733
  this.inspectorService.prepareInspector();
735
- this.subscriptions.add(this.inspectorService.otterLikeComponentInfoToBeSent$
736
- .pipe(filter((info) => !!info)).subscribe((info) => this.sendMessage('selectedComponentInfo', info)));
737
- }
738
- /** @inheritDoc */
739
- ngOnDestroy() {
740
- this.subscriptions.unsubscribe();
734
+ this.inspectorService.otterLikeComponentInfoToBeSent$
735
+ .pipe(takeUntilDestroyed(this.destroyRef), filter((info) => !!info)).subscribe((info) => this.sendMessage('selectedComponentInfo', info));
741
736
  }
742
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ComponentsDevtoolsMessageService, deps: [{ token: i1$1.LoggerService }, { token: i1.Store }, { token: OTTER_COMPONENTS_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
743
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ComponentsDevtoolsMessageService, providedIn: 'root' }); }
737
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComponentsDevtoolsMessageService, deps: [{ token: i1$1.LoggerService }, { token: i1.Store }, { token: OTTER_COMPONENTS_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
738
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComponentsDevtoolsMessageService, providedIn: 'root' }); }
744
739
  }
745
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ComponentsDevtoolsMessageService, decorators: [{
740
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComponentsDevtoolsMessageService, decorators: [{
746
741
  type: Injectable,
747
742
  args: [{
748
743
  providedIn: 'root'
@@ -768,16 +763,16 @@ class ComponentsDevtoolsModule {
768
763
  ]
769
764
  };
770
765
  }
771
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ComponentsDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
772
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: ComponentsDevtoolsModule, imports: [StoreModule,
766
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComponentsDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
767
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ComponentsDevtoolsModule, imports: [StoreModule,
773
768
  PlaceholderTemplateStoreModule] }); }
774
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ComponentsDevtoolsModule, providers: [
769
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComponentsDevtoolsModule, providers: [
775
770
  { provide: OTTER_COMPONENTS_DEVTOOLS_OPTIONS, useValue: OTTER_COMPONENTS_DEVTOOLS_DEFAULT_OPTIONS },
776
771
  ComponentsDevtoolsMessageService
777
772
  ], imports: [StoreModule,
778
773
  PlaceholderTemplateStoreModule] }); }
779
774
  }
780
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ComponentsDevtoolsModule, decorators: [{
775
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ComponentsDevtoolsModule, decorators: [{
781
776
  type: NgModule,
782
777
  args: [{
783
778
  imports: [
@@ -796,6 +791,7 @@ class C11nDirective {
796
791
  set inputs(value) {
797
792
  this._inputs = value;
798
793
  if (!this.differInputs && value) {
794
+ // eslint-disable-next-line unicorn/no-array-callback-reference -- KeyValueDiffers.find is not an array function
799
795
  this.differInputs = this.differsService.find(value).create();
800
796
  }
801
797
  }
@@ -840,7 +836,7 @@ class C11nDirective {
840
836
  this.viewContainerRef.clear();
841
837
  this.componentRef = this.viewContainerRef.createComponent(changes.component.currentValue);
842
838
  Object.keys(this.componentRef.instance)
843
- .filter(prop => !(this.outputs && Object.keys(this.outputs).some(o => o === prop)))
839
+ .filter((prop) => !(this.outputs && Object.keys(this.outputs).includes(prop)))
844
840
  .forEach((prop) => {
845
841
  this.uninitializedInputs.add(prop);
846
842
  });
@@ -878,7 +874,7 @@ class C11nDirective {
878
874
  inputChanges.config = new SimpleChange(this.componentRef.instance.config, changes.config.currentValue, this.uninitializedInputs.has('config'));
879
875
  this.uninitializedInputs.delete('config');
880
876
  }
881
- if (this.componentRef && Object.keys(inputChanges).length) {
877
+ if (this.componentRef && Object.keys(inputChanges).length > 0) {
882
878
  Object.entries(inputChanges).forEach(([inputName, value]) => {
883
879
  this.componentRef.setInput(inputName, value.currentValue);
884
880
  });
@@ -903,8 +899,8 @@ class C11nDirective {
903
899
  this.componentRef.destroy();
904
900
  }
905
901
  }
906
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.KeyValueDiffers }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive }); }
907
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: C11nDirective, selector: "[c11n]", inputs: { component: "component", config: "config", formControl: "formControl", inputs: "inputs", outputs: "outputs" }, providers: [
902
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.KeyValueDiffers }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive }); }
903
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: C11nDirective, selector: "[c11n]", inputs: { component: "component", config: "config", formControl: "formControl", inputs: "inputs", outputs: "outputs" }, providers: [
908
904
  {
909
905
  provide: NG_VALUE_ACCESSOR,
910
906
  useExisting: forwardRef((() => C11nDirective)),
@@ -917,7 +913,7 @@ class C11nDirective {
917
913
  }
918
914
  ], usesOnChanges: true, ngImport: i0 }); }
919
915
  }
920
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nDirective, decorators: [{
916
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nDirective, decorators: [{
921
917
  type: Directive,
922
918
  args: [{
923
919
  selector: '[c11n]',
@@ -946,6 +942,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
946
942
  type: Input
947
943
  }] } });
948
944
 
945
+ /**
946
+ * Register a custom component
947
+ * @param customComponentsMap an object containing the already registered custom component
948
+ * @param customComponentKey
949
+ * @param customComponent
950
+ */
951
+ function registerCustomComponent(customComponentsMap, customComponentKey, customComponent) {
952
+ customComponentsMap.set(customComponentKey, customComponent);
953
+ return customComponentsMap;
954
+ }
955
+
949
956
  /** The C11n injection token */
950
957
  const C11N_PRESENTERS_MAP_TOKEN = new InjectionToken('C11n injection token');
951
958
  /** Function used to register custom components */
@@ -974,16 +981,58 @@ class C11nService {
974
981
  return typeof presenterConfig === 'string' && presenterConfig !== '' ? (this.presentersMap.get(presenterConfig) || defaultPres) : defaultPres;
975
982
  }));
976
983
  }
977
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nService, deps: [{ token: C11N_PRESENTERS_MAP_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
978
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nService }); }
984
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nService, deps: [{ token: C11N_PRESENTERS_MAP_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
985
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nService }); }
979
986
  }
980
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nService, decorators: [{
987
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nService, decorators: [{
981
988
  type: Injectable
982
989
  }], ctorParameters: () => [{ type: Map, decorators: [{
983
990
  type: Inject,
984
991
  args: [C11N_PRESENTERS_MAP_TOKEN]
985
992
  }] }] });
986
993
 
994
+ /** C11n directive mock */
995
+ class MockC11nDirective {
996
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MockC11nDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
997
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MockC11nDirective, selector: "[c11n]", inputs: { config: "config", component: "component", inputs: "inputs", outputs: "outputs" }, ngImport: i0 }); }
998
+ }
999
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MockC11nDirective, decorators: [{
1000
+ type: Directive,
1001
+ args: [{
1002
+ selector: '[c11n]',
1003
+ // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property -- mocked directive
1004
+ inputs: ['config', 'component', 'inputs', 'outputs']
1005
+ }]
1006
+ }] });
1007
+ /** C11n service mock */
1008
+ class C11nMockService {
1009
+ addPresenter(_presKey, _presType) { }
1010
+ getPresenter(_defaultPres, _presKey) {
1011
+ return (source) => source.pipe(mapTo(null));
1012
+ }
1013
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nMockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1014
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nMockService }); }
1015
+ }
1016
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nMockService, decorators: [{
1017
+ type: Injectable
1018
+ }] });
1019
+ /**
1020
+ * The purpose of this module is to be imported in the unit tests of the components which are using c11n directive
1021
+ */
1022
+ class C11nMockModule {
1023
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1024
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: C11nMockModule, declarations: [MockC11nDirective], exports: [MockC11nDirective] }); }
1025
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nMockModule, providers: [{ provide: C11nService, useClass: C11nMockService }] }); }
1026
+ }
1027
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nMockModule, decorators: [{
1028
+ type: NgModule,
1029
+ args: [{
1030
+ declarations: [MockC11nDirective],
1031
+ exports: [MockC11nDirective],
1032
+ providers: [{ provide: C11nService, useClass: C11nMockService }]
1033
+ }]
1034
+ }] });
1035
+
987
1036
  /**
988
1037
  * Customization service factory
989
1038
  * @param config -> registerCompFunc - a function which returns the map of custom components which will be injected in c11n service
@@ -998,6 +1047,7 @@ function createC11nService(config) {
998
1047
  }
999
1048
  class C11nModule {
1000
1049
  /**
1050
+ * Get the module with providers for the root component
1001
1051
  * @param config -> registerCompFunc - a function which returns the map of custom components which will be injected in c11n service
1002
1052
  * @param config.registerCompFunc
1003
1053
  */
@@ -1013,11 +1063,11 @@ class C11nModule {
1013
1063
  }]
1014
1064
  };
1015
1065
  }
1016
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1017
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: C11nModule, declarations: [C11nDirective], exports: [C11nDirective] }); }
1018
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nModule }); }
1066
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1067
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: C11nModule, declarations: [C11nDirective], exports: [C11nDirective] }); }
1068
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nModule }); }
1019
1069
  }
1020
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nModule, decorators: [{
1070
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C11nModule, decorators: [{
1021
1071
  type: NgModule,
1022
1072
  args: [{
1023
1073
  declarations: [C11nDirective],
@@ -1025,69 +1075,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
1025
1075
  }]
1026
1076
  }] });
1027
1077
 
1028
- /**
1029
- * Register a custom component
1030
- * @param customComponentsMap an object containing the already registered custom component
1031
- * @param customComponentKey
1032
- * @param customComponent
1033
- */
1034
- function registerCustomComponent(customComponentsMap, customComponentKey, customComponent) {
1035
- customComponentsMap.set(customComponentKey, customComponent);
1036
- return customComponentsMap;
1037
- }
1038
-
1039
- /** C11n directive mock */
1040
- class MockC11nDirective {
1041
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: MockC11nDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1042
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: MockC11nDirective, selector: "[c11n]", inputs: { config: "config", component: "component", inputs: "inputs", outputs: "outputs" }, ngImport: i0 }); }
1043
- }
1044
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: MockC11nDirective, decorators: [{
1045
- type: Directive,
1046
- args: [{
1047
- selector: '[c11n]',
1048
- // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1049
- inputs: ['config', 'component', 'inputs', 'outputs']
1050
- }]
1051
- }] });
1052
- /** C11n service mock */
1053
- class C11nMockService {
1054
- addPresenter(_presKey, _presType) { }
1055
- getPresenter(_defaultPres, _presKey) {
1056
- return (source) => source.pipe(mapTo(null));
1057
- }
1058
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nMockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1059
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nMockService }); }
1060
- }
1061
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nMockService, decorators: [{
1062
- type: Injectable
1063
- }] });
1064
- /**
1065
- * The purpose of this module is to be imported in the unit tests of the components which are using c11n directive
1066
- */
1067
- class C11nMockModule {
1068
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1069
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: C11nMockModule, declarations: [MockC11nDirective], exports: [MockC11nDirective] }); }
1070
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nMockModule, providers: [{ provide: C11nService, useClass: C11nMockService }] }); }
1071
- }
1072
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: C11nMockModule, decorators: [{
1073
- type: NgModule,
1074
- args: [{
1075
- declarations: [MockC11nDirective],
1076
- exports: [MockC11nDirective],
1077
- providers: [{ provide: C11nService, useClass: C11nMockService }]
1078
- }]
1079
- }] });
1080
-
1081
1078
  class O3rCapitalizePipe {
1082
1079
  transform(value) {
1083
1080
  const val = value && value.toString && value.toString();
1084
1081
  const firstLetter = val && val.charAt(0);
1085
1082
  return firstLetter ? firstLetter.toUpperCase() + val.slice(1) : value;
1086
1083
  }
1087
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: O3rCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1088
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: O3rCapitalizePipe, isStandalone: true, name: "o3rCapitalize" }); }
1084
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: O3rCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1085
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: O3rCapitalizePipe, isStandalone: true, name: "o3rCapitalize" }); }
1089
1086
  }
1090
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: O3rCapitalizePipe, decorators: [{
1087
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: O3rCapitalizePipe, decorators: [{
1091
1088
  type: Pipe,
1092
1089
  args: [{ name: 'o3rCapitalize', standalone: true }]
1093
1090
  }] });
@@ -1095,10 +1092,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
1095
1092
  * @deprecated please use O3rCapitalizePipe, will be removed in v12.
1096
1093
  */
1097
1094
  class CapitalizePipe extends O3rCapitalizePipe {
1098
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CapitalizePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
1099
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: CapitalizePipe, name: "capitalize" }); }
1095
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CapitalizePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
1096
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: CapitalizePipe, name: "capitalize" }); }
1100
1097
  }
1101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CapitalizePipe, decorators: [{
1098
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CapitalizePipe, decorators: [{
1102
1099
  type: Pipe,
1103
1100
  args: [{ name: 'capitalize' }]
1104
1101
  }] });
@@ -1107,11 +1104,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
1107
1104
  * @deprecated please use O3rCapitalizePipe, will be removed in v12.
1108
1105
  */
1109
1106
  class CapitalizePipeModule {
1110
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CapitalizePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1111
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: CapitalizePipeModule, declarations: [CapitalizePipe], exports: [CapitalizePipe] }); }
1112
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CapitalizePipeModule }); }
1107
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CapitalizePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1108
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: CapitalizePipeModule, declarations: [CapitalizePipe], exports: [CapitalizePipe] }); }
1109
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CapitalizePipeModule }); }
1113
1110
  }
1114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CapitalizePipeModule, decorators: [{
1111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CapitalizePipeModule, decorators: [{
1115
1112
  type: NgModule,
1116
1113
  args: [{
1117
1114
  declarations: [CapitalizePipe],
@@ -1156,6 +1153,7 @@ function padNum(num, digits) {
1156
1153
  */
1157
1154
  class O3rDurationPipe {
1158
1155
  /**
1156
+ * Converts a duration in seconds into the HH:mm format
1159
1157
  * @param value the value in seconds
1160
1158
  * @param pattern the desired output format.
1161
1159
  * The pattern takes into account static format characters surrounded by braces
@@ -1193,10 +1191,10 @@ class O3rDurationPipe {
1193
1191
  return result.replace(matchedPatternToReplace, padded);
1194
1192
  }, pattern);
1195
1193
  }
1196
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: O3rDurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1197
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: O3rDurationPipe, isStandalone: true, name: "o3rDuration" }); }
1194
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: O3rDurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1195
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: O3rDurationPipe, isStandalone: true, name: "o3rDuration" }); }
1198
1196
  }
1199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: O3rDurationPipe, decorators: [{
1197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: O3rDurationPipe, decorators: [{
1200
1198
  type: Pipe,
1201
1199
  args: [{ name: 'o3rDuration', standalone: true }]
1202
1200
  }] });
@@ -1205,10 +1203,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
1205
1203
  * @deprecated please use O3rDurationPipe, will be removed in v12.
1206
1204
  */
1207
1205
  class DurationPipe extends O3rDurationPipe {
1208
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DurationPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
1209
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: DurationPipe, name: "duration" }); }
1206
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DurationPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
1207
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: DurationPipe, name: "duration" }); }
1210
1208
  }
1211
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DurationPipe, decorators: [{
1209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DurationPipe, decorators: [{
1212
1210
  type: Pipe,
1213
1211
  args: [{ name: 'duration' }]
1214
1212
  }] });
@@ -1217,11 +1215,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
1217
1215
  * @deprecated please use O3rDurationPipe, will be removed in v12.
1218
1216
  */
1219
1217
  class DurationPipeModule {
1220
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DurationPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1221
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: DurationPipeModule, declarations: [DurationPipe], exports: [DurationPipe] }); }
1222
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DurationPipeModule }); }
1218
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DurationPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1219
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: DurationPipeModule, declarations: [DurationPipe], exports: [DurationPipe] }); }
1220
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DurationPipeModule }); }
1223
1221
  }
1224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: DurationPipeModule, decorators: [{
1222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DurationPipeModule, decorators: [{
1225
1223
  type: NgModule,
1226
1224
  args: [{
1227
1225
  declarations: [DurationPipe],
@@ -1233,10 +1231,10 @@ class O3rKeepWhiteSpacePipe {
1233
1231
  transform(value) {
1234
1232
  return value.replace(/\s/g, ' ');
1235
1233
  }
1236
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: O3rKeepWhiteSpacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1237
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: O3rKeepWhiteSpacePipe, name: "o3rKeepWhiteSpace" }); }
1234
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: O3rKeepWhiteSpacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1235
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: O3rKeepWhiteSpacePipe, name: "o3rKeepWhiteSpace" }); }
1238
1236
  }
1239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: O3rKeepWhiteSpacePipe, decorators: [{
1237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: O3rKeepWhiteSpacePipe, decorators: [{
1240
1238
  type: Pipe,
1241
1239
  args: [{
1242
1240
  name: 'o3rKeepWhiteSpace'
@@ -1246,10 +1244,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
1246
1244
  * @deprecated please use O3rKeepWhiteSpacePipe, will be removed in v12.
1247
1245
  */
1248
1246
  class KeepWhiteSpacePipe extends O3rKeepWhiteSpacePipe {
1249
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: KeepWhiteSpacePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
1250
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: KeepWhiteSpacePipe, name: "keepWhiteSpace" }); }
1247
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KeepWhiteSpacePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
1248
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: KeepWhiteSpacePipe, name: "keepWhiteSpace" }); }
1251
1249
  }
1252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: KeepWhiteSpacePipe, decorators: [{
1250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KeepWhiteSpacePipe, decorators: [{
1253
1251
  type: Pipe,
1254
1252
  args: [{
1255
1253
  name: 'keepWhiteSpace'
@@ -1260,11 +1258,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
1260
1258
  * @deprecated please use O3rKeepWhiteSpacePipe, will be removed in v12.
1261
1259
  */
1262
1260
  class KeepWhiteSpacePipeModule {
1263
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: KeepWhiteSpacePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1264
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: KeepWhiteSpacePipeModule, declarations: [KeepWhiteSpacePipe], exports: [KeepWhiteSpacePipe] }); }
1265
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: KeepWhiteSpacePipeModule }); }
1261
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KeepWhiteSpacePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1262
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: KeepWhiteSpacePipeModule, declarations: [KeepWhiteSpacePipe], exports: [KeepWhiteSpacePipe] }); }
1263
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KeepWhiteSpacePipeModule }); }
1266
1264
  }
1267
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: KeepWhiteSpacePipeModule, decorators: [{
1265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KeepWhiteSpacePipeModule, decorators: [{
1268
1266
  type: NgModule,
1269
1267
  args: [{
1270
1268
  declarations: [KeepWhiteSpacePipe],
@@ -1272,7 +1270,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
1272
1270
  }]
1273
1271
  }] });
1274
1272
 
1275
- const escapeRegExp = (str) => str.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&');
1273
+ const escapeRegExp = (str) => str.replace(/[$()*+./?[\\\]^{|}-]/g, '\\$&');
1276
1274
  class O3rReplaceWithBoldPipe {
1277
1275
  transform(value, inputText) {
1278
1276
  if (inputText) {
@@ -1283,10 +1281,10 @@ class O3rReplaceWithBoldPipe {
1283
1281
  return value;
1284
1282
  }
1285
1283
  }
1286
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: O3rReplaceWithBoldPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1287
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: O3rReplaceWithBoldPipe, isStandalone: true, name: "o3rReplaceWithBold" }); }
1284
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: O3rReplaceWithBoldPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1285
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: O3rReplaceWithBoldPipe, isStandalone: true, name: "o3rReplaceWithBold" }); }
1288
1286
  }
1289
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: O3rReplaceWithBoldPipe, decorators: [{
1287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: O3rReplaceWithBoldPipe, decorators: [{
1290
1288
  type: Pipe,
1291
1289
  args: [{
1292
1290
  name: 'o3rReplaceWithBold',
@@ -1300,10 +1298,10 @@ class ReplaceWithBoldPipe extends O3rReplaceWithBoldPipe {
1300
1298
  escapeRegExp(str) {
1301
1299
  return escapeRegExp(str);
1302
1300
  }
1303
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ReplaceWithBoldPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
1304
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: ReplaceWithBoldPipe, name: "replaceWithBold" }); }
1301
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReplaceWithBoldPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
1302
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ReplaceWithBoldPipe, name: "replaceWithBold" }); }
1305
1303
  }
1306
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ReplaceWithBoldPipe, decorators: [{
1304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReplaceWithBoldPipe, decorators: [{
1307
1305
  type: Pipe,
1308
1306
  args: [{
1309
1307
  name: 'replaceWithBold'
@@ -1314,11 +1312,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
1314
1312
  * @deprecated please use O3rReplaceWithBoldPipe, will be removed in v12.
1315
1313
  */
1316
1314
  class ReplaceWithBoldPipeModule {
1317
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ReplaceWithBoldPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1318
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: ReplaceWithBoldPipeModule, declarations: [ReplaceWithBoldPipe], exports: [ReplaceWithBoldPipe] }); }
1319
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ReplaceWithBoldPipeModule }); }
1315
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReplaceWithBoldPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1316
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ReplaceWithBoldPipeModule, declarations: [ReplaceWithBoldPipe], exports: [ReplaceWithBoldPipe] }); }
1317
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReplaceWithBoldPipeModule }); }
1320
1318
  }
1321
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ReplaceWithBoldPipeModule, decorators: [{
1319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReplaceWithBoldPipeModule, decorators: [{
1322
1320
  type: NgModule,
1323
1321
  args: [{
1324
1322
  declarations: [ReplaceWithBoldPipe],
@@ -1340,39 +1338,36 @@ class PlaceholderComponent {
1340
1338
  constructor(store, cd) {
1341
1339
  this.store = store;
1342
1340
  this.cd = cd;
1343
- this.subscription = new Subscription();
1344
1341
  this.id$ = new BehaviorSubject(undefined);
1345
1342
  this.afterViewInit$ = new Subject();
1346
1343
  this.messages$ = new ReplaySubject(1);
1344
+ this.destroyRef = inject(DestroyRef);
1347
1345
  this.mode = this.store.selectSignal(selectPlaceholderTemplateMode);
1348
1346
  }
1349
1347
  /** @inheritdoc */
1350
1348
  ngOnInit() {
1351
- this.subscription.add(this.id$.pipe(filter((id) => !!id), distinctUntilChanged(), switchMap((id) => this.store.select(selectSortedTemplates(id)).pipe(map((placeholders) => ({
1349
+ this.id$.pipe(filter((id) => !!id), distinctUntilChanged(), switchMap((id) => this.store.select(selectSortedTemplates(id)).pipe(map((placeholders) => ({
1352
1350
  id,
1353
1351
  orderedTemplates: placeholders?.orderedTemplates,
1354
1352
  isPending: placeholders?.isPending
1355
- })), distinctUntilChanged((previous, current) => previous.id === current.id &&
1356
- previous.isPending === current.isPending &&
1357
- previous.orderedTemplates?.map(placeholder => placeholder.renderedTemplate).join('') ===
1358
- current.orderedTemplates?.map(placeholder => placeholder.renderedTemplate).join(''))))).subscribe(({ id, orderedTemplates, isPending }) => {
1353
+ })), distinctUntilChanged((previous, current) => previous.id === current.id
1354
+ && previous.isPending === current.isPending
1355
+ && previous.orderedTemplates?.map((placeholder) => placeholder.renderedTemplate).join('')
1356
+ === current.orderedTemplates?.map((placeholder) => placeholder.renderedTemplate).join(''))))).subscribe(({ id, orderedTemplates, isPending }) => {
1359
1357
  this.isPending = isPending;
1360
- if (!orderedTemplates?.length) {
1361
- this.template = undefined;
1362
- }
1363
- else {
1358
+ this.template = orderedTemplates?.length
1364
1359
  // Concatenates the list of templates
1365
- this.template = orderedTemplates.map(placeholder => placeholder.renderedTemplate).join('');
1366
- }
1360
+ ? orderedTemplates.map((placeholder) => placeholder.renderedTemplate).join('')
1361
+ : undefined;
1367
1362
  if (this.isPending === false) {
1368
1363
  this.messages$.next({
1369
- templateIds: !this.isPending ? (orderedTemplates || []).map(placeholder => placeholder.resolvedUrl) : [],
1364
+ templateIds: this.isPending ? [] : (orderedTemplates || []).map((placeholder) => placeholder.resolvedUrl),
1370
1365
  placeholderId: id
1371
1366
  });
1372
1367
  }
1373
1368
  this.cd.markForCheck();
1374
- }));
1375
- this.messages$.pipe(sample(this.afterViewInit$), distinctUntilChanged((previous, current) => JSON.stringify(current) === JSON.stringify(previous))).subscribe({
1369
+ });
1370
+ this.messages$.pipe(takeUntilDestroyed(this.destroyRef), sample(this.afterViewInit$), distinctUntilChanged((previous, current) => JSON.stringify(current) === JSON.stringify(previous))).subscribe({
1376
1371
  next: (data) => sendOtterMessage('placeholder-loading-status', data, false),
1377
1372
  complete: () => sendOtterMessage('placeholder-loading-status', {
1378
1373
  placeholderId: this.id$.value,
@@ -1386,17 +1381,16 @@ class PlaceholderComponent {
1386
1381
  }
1387
1382
  /** @inheritdoc */
1388
1383
  ngOnDestroy() {
1384
+ this.id$.complete();
1389
1385
  this.messages$.complete();
1390
1386
  this.afterViewInit$.complete();
1391
- this.subscription.unsubscribe();
1392
1387
  }
1393
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderComponent, deps: [{ token: i1.Store }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1394
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: PlaceholderComponent, selector: "o3r-placeholder", inputs: { id: "id" }, host: { properties: { "class.debug": "mode() === 'debug'" } }, ngImport: i0, template: "<ng-template #projection>\n <ng-content></ng-content>\n</ng-template>\n@switch (mode()) {\n @case ('debug') {\n <span class=\"placehoder-id\">{{ id$ | async }}</span>\n }\n @case ('pending') {\n <ng-container *ngTemplateOutlet=\"projection\" />\n }\n @case ('normal') {\n @if (isPending) {\n <ng-container *ngTemplateOutlet=\"projection\" />\n } @else {\n <div [innerHTML]=\"template\"></div>\n }\n }\n}\n", styles: [".debug{padding:15px;text-align:center;border:2px dashed var(--o3r-placeholder-debug-color, #a65c27);border-radius:10px;width:100%;background:var(--o3r-placeholder-background, #fff2ea);border-style:dashed;color:var(--o3r-placeholder-debug-color, #a65c27);font-size:larger}\n"], dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1388
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderComponent, deps: [{ token: i1.Store }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1389
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PlaceholderComponent, selector: "o3r-placeholder", inputs: { id: "id" }, host: { properties: { "class.debug": "mode() === 'debug'" } }, ngImport: i0, template: "<ng-template #projection>\n <ng-content></ng-content>\n</ng-template>\n@switch (mode()) {\n @case ('debug') {\n <span class=\"placehoder-id\">{{ id$ | async }}</span>\n }\n @case ('pending') {\n <ng-container *ngTemplateOutlet=\"projection\" />\n }\n @case ('normal') {\n @if (isPending) {\n <ng-container *ngTemplateOutlet=\"projection\" />\n } @else {\n <div [innerHTML]=\"template\"></div>\n }\n }\n}\n", styles: [".debug{padding:15px;text-align:center;border:2px dashed var(--o3r-placeholder-debug-color, #a65c27);border-radius:10px;width:100%;background:var(--o3r-placeholder-background, #fff2ea);border-style:dashed;color:var(--o3r-placeholder-debug-color, #a65c27);font-size:larger}\n"], dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1395
1390
  }
1396
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderComponent, decorators: [{
1391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderComponent, decorators: [{
1397
1392
  type: Component,
1398
1393
  args: [{ selector: 'o3r-placeholder', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
1399
- // eslint-disable-next-line @typescript-eslint/naming-convention
1400
1394
  '[class.debug]': `mode() === 'debug'`
1401
1395
  }, template: "<ng-template #projection>\n <ng-content></ng-content>\n</ng-template>\n@switch (mode()) {\n @case ('debug') {\n <span class=\"placehoder-id\">{{ id$ | async }}</span>\n }\n @case ('pending') {\n <ng-container *ngTemplateOutlet=\"projection\" />\n }\n @case ('normal') {\n @if (isPending) {\n <ng-container *ngTemplateOutlet=\"projection\" />\n } @else {\n <div [innerHTML]=\"template\"></div>\n }\n }\n}\n", styles: [".debug{padding:15px;text-align:center;border:2px dashed var(--o3r-placeholder-debug-color, #a65c27);border-radius:10px;width:100%;background:var(--o3r-placeholder-background, #fff2ea);border-style:dashed;color:var(--o3r-placeholder-debug-color, #a65c27);font-size:larger}\n"] }]
1402
1396
  }], ctorParameters: () => [{ type: i1.Store }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{
@@ -1404,17 +1398,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
1404
1398
  }] } });
1405
1399
 
1406
1400
  class PlaceholderModule {
1407
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1408
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderModule, declarations: [PlaceholderComponent], imports: [CommonModule,
1401
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1402
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderModule, declarations: [PlaceholderComponent], imports: [CommonModule,
1409
1403
  StoreModule,
1410
1404
  PlaceholderTemplateStoreModule,
1411
1405
  PlaceholderRequestStoreModule], exports: [PlaceholderComponent] }); }
1412
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderModule, imports: [CommonModule,
1406
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderModule, imports: [CommonModule,
1413
1407
  StoreModule,
1414
1408
  PlaceholderTemplateStoreModule,
1415
1409
  PlaceholderRequestStoreModule] }); }
1416
1410
  }
1417
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: PlaceholderModule, decorators: [{
1411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PlaceholderModule, decorators: [{
1418
1412
  type: NgModule,
1419
1413
  args: [{
1420
1414
  imports: [