@o3r/components 12.5.0-prerelease.61 → 12.5.0-prerelease.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builders/component-extractor/helpers/component/component.parser.d.ts.map +1 -1
- package/builders/component-extractor/helpers/component/component.parser.js +2 -3
- package/builders/component-extractor/helpers/component/component.parser.js.map +1 -1
- package/fesm2022/o3r-components-rules-engine.mjs +10 -10
- package/fesm2022/o3r-components-rules-engine.mjs.map +1 -1
- package/fesm2022/o3r-components.mjs +57 -57
- package/fesm2022/o3r-components.mjs.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.parser.d.ts","sourceRoot":"","sources":["../../../../../builders/component-extractor/helpers/component/component.parser.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,mBAAmB,EACpB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"component.parser.d.ts","sourceRoot":"","sources":["../../../../../builders/component-extractor/helpers/component/component.parser.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,mBAAmB,EACpB,MAAM,WAAW,CAAC;AAMnB,OAAO,EAEL,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,+BAA+B,EAChC,MAAM,8BAA8B,CAAC;AAEtC,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IAEb,uCAAuC;IACvC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IAEjC,2CAA2C;IAC3C,aAAa,CAAC,EAAE,+BAA+B,CAAC;CACjD;AAED,kBAAkB;AAClB,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;IACjE,kBAAkB;IAClB,SAAS,EAAE,oBAAoB,CAAC;CACjC;AAED,kBAAkB;AAClB,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;IACrE,kBAAkB;IAClB,aAAa,EAAE,+BAA+B,CAAC;CAChD;AAED,2BAA2B;AAC3B,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,UAAU,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,yBAAyB,CAAA;KAAE,CAAC;IAE1D,mCAAmC;IACnC,cAAc,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,6BAA6B,CAAA;KAAE,CAAC;CACnE;AAED;;GAEG;AACH,qBAAa,eAAe;IAaxB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IAjBzC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAsB;IAEhE;;;;;;;;OAQG;gBAEgB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,OAAO,CAAC,SAAS,EACzB,UAAU,UAAQ,EAClB,SAAS,GAAE,MAAM,EAAO,EACxB,sBAAsB,GAAE,mBAAmB,EAAO;IAKrE,kDAAkD;IAClD,OAAO,CAAC,uBAAuB;IAe/B,8CAA8C;IAC9C,OAAO,CAAC,oBAAoB;IAK5B;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAKpB;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAuCxB;;;OAGG;IACU,KAAK,IAAI,OAAO,CAAC,YAAY,CAAC;CA4B5C"}
|
|
@@ -4,11 +4,10 @@ exports.ComponentParser = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const path = tslib_1.__importStar(require("node:path"));
|
|
6
6
|
const schematics_1 = require("@o3r/schematics");
|
|
7
|
+
const globby_1 = tslib_1.__importDefault(require("globby"));
|
|
7
8
|
const ts = tslib_1.__importStar(require("typescript"));
|
|
8
9
|
const component_class_extractor_1 = require("./component-class.extractor");
|
|
9
10
|
const component_config_extractor_1 = require("./component-config.extractor");
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports -- default import not working when used inside Otter mono-repository
|
|
11
|
-
const globby = require('globby');
|
|
12
11
|
/**
|
|
13
12
|
* Component extractor parser.
|
|
14
13
|
*/
|
|
@@ -47,7 +46,7 @@ class ComponentParser {
|
|
|
47
46
|
/** Get the list of file from tsconfig.json */
|
|
48
47
|
getFilesFromTsConfig() {
|
|
49
48
|
const { include, exclude, cwd } = this.getPatternsFromTsConfig();
|
|
50
|
-
return
|
|
49
|
+
return (0, globby_1.default)(include, { ignore: exclude, cwd, absolute: true });
|
|
51
50
|
}
|
|
52
51
|
/**
|
|
53
52
|
* Extract a component of a given file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.parser.js","sourceRoot":"","sources":["../../../../../builders/component-extractor/helpers/component/component.parser.ts"],"names":[],"mappings":";;;;AAAA,wDAAkC;AAOlC,gDAEyB;AACzB,uDAAiC;AACjC,2EAGqC;AACrC,6EAGsC;
|
|
1
|
+
{"version":3,"file":"component.parser.js","sourceRoot":"","sources":["../../../../../builders/component-extractor/helpers/component/component.parser.ts"],"names":[],"mappings":";;;;AAAA,wDAAkC;AAOlC,gDAEyB;AACzB,4DAA4B;AAC5B,uDAAiC;AACjC,2EAGqC;AACrC,6EAGsC;AAmCtC;;GAEG;AACH,MAAa,eAAe;IAG1B;;;;;;;;OAQG;IACH,YACmB,WAAmB,EACnB,YAAoB,EACpB,MAAyB,EACzB,aAAa,KAAK,EAClB,YAAsB,EAAE,EACxB,yBAAgD,EAAE;QALlD,gBAAW,GAAX,WAAW,CAAQ;QACnB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,WAAM,GAAN,MAAM,CAAmB;QACz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M,EAAE,OAAO,CAAC,CAAC;gBACjF,IAAI,uBAAuB,CAAC,wBAAwB,IAAI,uBAAuB,CAAC,mBAAmB,EAAE,CAAC;oBACpG,cAAc,CAAC,QAAQ,CAAC,GAAG,EAAE,aAAa,EAAE,uBAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;gBACxF,CAAC;gBACD,MAAM,mBAAmB,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBAChE,IAAI,mBAAmB,EAAE,CAAC;oBACxB,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,EAAE,mBAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;gBAC5E,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;IACxC,CAAC;CACF;AApID,0CAoIC"}
|
|
@@ -153,10 +153,10 @@ class PlaceholderRulesEngineActionHandler {
|
|
|
153
153
|
}));
|
|
154
154
|
this.placeholdersActions$.next(templates);
|
|
155
155
|
}
|
|
156
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
157
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
156
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRulesEngineActionHandler, deps: [{ token: i1.Store }, { token: i2.LoggerService }, { token: i0.Injector }, { token: i3.LocalizationService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
157
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRulesEngineActionHandler }); }
|
|
158
158
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRulesEngineActionHandler, decorators: [{
|
|
160
160
|
type: Injectable
|
|
161
161
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.LoggerService }, { type: i0.Injector }, { type: i3.LocalizationService, decorators: [{
|
|
162
162
|
type: Optional
|
|
@@ -262,10 +262,10 @@ class PlaceholderTemplateResponseEffect {
|
|
|
262
262
|
})))
|
|
263
263
|
: of({ renderedTemplate: template, unknownTypeFound });
|
|
264
264
|
}
|
|
265
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
266
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
265
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderTemplateResponseEffect, deps: [{ token: i1$1.Actions }, { token: i1.Store }, { token: i3$1.RulesEngineRunnerService, optional: true }, { token: i4.DynamicContentService, optional: true }, { token: i3.LocalizationService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
266
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderTemplateResponseEffect }); }
|
|
267
267
|
}
|
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderTemplateResponseEffect, decorators: [{
|
|
269
269
|
type: Injectable
|
|
270
270
|
}], ctorParameters: () => [{ type: i1$1.Actions }, { type: i1.Store }, { type: i3$1.RulesEngineRunnerService, decorators: [{
|
|
271
271
|
type: Optional
|
|
@@ -276,16 +276,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
276
276
|
}] }] });
|
|
277
277
|
|
|
278
278
|
class PlaceholderRulesEngineActionModule {
|
|
279
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
280
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
279
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
280
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRulesEngineActionModule, imports: [i1$1.EffectsFeatureModule, PlaceholderRequestStoreModule,
|
|
281
281
|
PlaceholderTemplateStoreModule] }); }
|
|
282
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
282
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRulesEngineActionModule, providers: [
|
|
283
283
|
PlaceholderRulesEngineActionHandler
|
|
284
284
|
], imports: [EffectsModule.forFeature([PlaceholderTemplateResponseEffect]),
|
|
285
285
|
PlaceholderRequestStoreModule,
|
|
286
286
|
PlaceholderTemplateStoreModule] }); }
|
|
287
287
|
}
|
|
288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRulesEngineActionModule, decorators: [{
|
|
289
289
|
type: NgModule,
|
|
290
290
|
args: [{
|
|
291
291
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o3r-components-rules-engine.mjs","sources":["../../src/rules-engine/placeholder.interfaces.ts","../../src/rules-engine/placeholder.action-handler.ts","../../src/rules-engine/placeholder.rules-engine.effect.ts","../../src/rules-engine/placeholder.rules-engine.module.ts","../../src/rules-engine/o3r-components-rules-engine.ts"],"sourcesContent":["import type {\n RulesEngineAction,\n} from '@o3r/core';\n\n/** ActionUpdatePlaceholderBlock */\nexport const RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE = 'UPDATE_PLACEHOLDER';\n\n/**\n * Content of action that updates a placeholder\n */\nexport interface ActionUpdatePlaceholderBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE;\n placeholderId: string;\n value: string;\n priority?: number;\n}\n","import {\n Injectable,\n Injector,\n Optional,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n select,\n Store,\n} from '@ngrx/store';\nimport type {\n RulesEngineActionHandler,\n} from '@o3r/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LocalizationService,\n} from '@o3r/localization';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n combineLatest,\n distinctUntilChanged,\n firstValueFrom,\n map,\n of,\n startWith,\n Subject,\n withLatestFrom,\n} from 'rxjs';\nimport {\n ActionUpdatePlaceholderBlock,\n RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE,\n} from './placeholder.interfaces';\nimport {\n deletePlaceholderTemplateEntity,\n PlaceholderRequestReply,\n PlaceholderTemplateStore,\n selectPlaceholderRequestEntities,\n selectPlaceholderTemplateEntities,\n setPlaceholderRequestEntityFromUrl,\n setPlaceholderTemplateEntity,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdatePlaceholderBlock> {\n protected placeholdersActions$: Subject<{ placeholderId: string; templateUrl: string; priority: number }[]> = new Subject();\n\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE] as const;\n\n constructor(\n store: Store<PlaceholderTemplateStore>,\n private readonly logger: LoggerService,\n private readonly injector: Injector,\n @Optional() translateService?: LocalizationService\n ) {\n const lang$ = translateService\n ? translateService.getTranslateService().onLangChange.pipe(\n map(({ lang }) => lang),\n startWith(translateService.getCurrentLanguage()),\n distinctUntilChanged()\n )\n : of(null);\n\n const filteredActions$ = combineLatest([\n lang$,\n this.placeholdersActions$.pipe(\n distinctUntilChanged((prev, next) => JSON.stringify(prev) === JSON.stringify(next))\n )\n ]).pipe(\n withLatestFrom(\n combineLatest([store.pipe(select(selectPlaceholderTemplateEntities)), store.pipe(select(selectPlaceholderRequestEntities))])\n ),\n map(([langAndTemplatesUrls, storedPlaceholdersAndRequests]) => {\n const [lang, placeholderActions] = langAndTemplatesUrls;\n const storedPlaceholders = storedPlaceholdersAndRequests[0] || {};\n const storedPlaceholderRequests = storedPlaceholdersAndRequests[1] || {};\n const placeholderNewRequests: { rawUrl: string; resolvedUrl: string }[] = [];\n // Stores all raw Urls used from the current engine execution\n const usedUrls: Record<string, boolean> = {};\n // Get all Urls that needs to be resolved from current rules engine output\n const placeholdersTemplates = placeholderActions.reduce((acc, placeholderAction) => {\n const placeholdersTemplateUrl = {\n rawUrl: placeholderAction.templateUrl,\n priority: placeholderAction.priority\n };\n if (acc[placeholderAction.placeholderId]) {\n acc[placeholderAction.placeholderId].push(placeholdersTemplateUrl);\n } else {\n acc[placeholderAction.placeholderId] = [placeholdersTemplateUrl];\n }\n const resolvedUrl = this.resolveUrlWithLang(placeholderAction.templateUrl, lang);\n // Filters duplicates and resolved urls that are already in the store\n if (!usedUrls[placeholderAction.templateUrl] && (!storedPlaceholderRequests[placeholderAction.templateUrl]\n || storedPlaceholderRequests[placeholderAction.templateUrl]!.resolvedUrl !== resolvedUrl)) {\n placeholderNewRequests.push({\n rawUrl: placeholderAction.templateUrl,\n resolvedUrl: this.resolveUrlWithLang(placeholderAction.templateUrl, lang)\n });\n }\n usedUrls[placeholderAction.templateUrl] = true;\n return acc;\n }, {} as { [key: string]: { rawUrl: string; priority: number }[] });\n // Urls not used anymore and not already disabled\n const placeholderRequestsToDisable: string[] = [];\n // Urls used that were disabled\n const placeholderRequestsToEnable: string[] = [];\n Object.keys(storedPlaceholderRequests).forEach((storedPlaceholderRequestRawUrl) => {\n const usedFromEngineIteration = usedUrls[storedPlaceholderRequestRawUrl];\n const usedFromStore = (storedPlaceholderRequests && storedPlaceholderRequests[storedPlaceholderRequestRawUrl]) ? storedPlaceholderRequests[storedPlaceholderRequestRawUrl].used : false;\n if (!usedFromEngineIteration && usedFromStore) {\n placeholderRequestsToDisable.push(storedPlaceholderRequestRawUrl);\n } else if (usedFromEngineIteration && !usedFromStore) {\n placeholderRequestsToEnable.push(storedPlaceholderRequestRawUrl);\n }\n });\n // Placeholder that are no longer filled by the current engine execution output will be cleared\n const placeholdersTemplatesToBeCleanedUp = Object.keys(storedPlaceholders)\n .filter((placeholderId) => !placeholdersTemplates[placeholderId]);\n\n const placeholdersTemplatesToBeSet = Object.keys(placeholdersTemplates).reduce((changedPlaceholderTemplates, placeholderTemplateId) => {\n // Caching if the placeholder template already exists with the same urls\n if (!storedPlaceholders[placeholderTemplateId]\n || !(JSON.stringify(storedPlaceholders[placeholderTemplateId].urlsWithPriority) === JSON.stringify(placeholdersTemplates[placeholderTemplateId]))) {\n changedPlaceholderTemplates.push({\n id: placeholderTemplateId,\n urlsWithPriority: placeholdersTemplates[placeholderTemplateId]\n });\n }\n return changedPlaceholderTemplates;\n }, [] as { id: string; urlsWithPriority: { rawUrl: string; priority: number }[] }[]);\n return {\n placeholdersTemplatesToBeCleanedUp,\n placeholderRequestsToDisable,\n placeholderRequestsToEnable,\n placeholdersTemplatesToBeSet,\n placeholderNewRequests\n };\n })\n );\n filteredActions$.pipe(takeUntilDestroyed()).subscribe((placeholdersUpdates) => {\n placeholdersUpdates.placeholdersTemplatesToBeCleanedUp.forEach((placeholderId) =>\n store.dispatch(deletePlaceholderTemplateEntity({\n id: placeholderId\n }))\n );\n placeholdersUpdates.placeholdersTemplatesToBeSet.forEach((placeholdersTemplateToBeSet) => {\n store.dispatch(setPlaceholderTemplateEntity({ entity: placeholdersTemplateToBeSet }));\n });\n placeholdersUpdates.placeholderRequestsToDisable.forEach((placeholderRequestToDisable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToDisable, used: false } }));\n });\n placeholdersUpdates.placeholderRequestsToEnable.forEach((placeholderRequestToEnable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToEnable, used: true } }));\n });\n placeholdersUpdates.placeholderNewRequests.forEach((placeholderNewRequest) => {\n store.dispatch(setPlaceholderRequestEntityFromUrl({\n resolvedUrl: placeholderNewRequest.resolvedUrl,\n id: placeholderNewRequest.rawUrl,\n call: this.retrieveTemplate(placeholderNewRequest.resolvedUrl)\n }));\n });\n });\n }\n\n /**\n * Localize the url, replacing the language marker\n * @param url\n * @param language\n */\n protected resolveUrlWithLang(url: string, language: string | null): string {\n if (!language && url.includes('[LANGUAGE]')) {\n this.logger.warn(`Missing language when trying to resolve ${url}`);\n }\n return language ? url.replace(/\\[LANGUAGE]/g, language) : url;\n }\n\n /**\n * Retrieve template as json from a given url\n * @param url\n */\n protected async retrieveTemplate(url: string): Promise<PlaceholderRequestReply> {\n const resolvedUrl$ = this.injector.get(DynamicContentService, null, { optional: true })?.getContentPathStream(url) || of(url);\n const fullUrl = await firstValueFrom(resolvedUrl$);\n return fetch(fullUrl).then((response) => response.json());\n }\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdatePlaceholderBlock[]) {\n const templates = actions.map((action) => ({\n placeholderId: action.placeholderId,\n templateUrl: action.value,\n priority: action.priority || 0\n }));\n\n this.placeholdersActions$.next(templates);\n }\n}\n","import {\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n Store,\n} from '@ngrx/store';\nimport {\n fromApiEffectSwitchMapById,\n} from '@o3r/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LocalizationService,\n} from '@o3r/localization';\nimport {\n RulesEngineRunnerService,\n} from '@o3r/rules-engine';\nimport {\n JSONPath,\n} from 'jsonpath-plus';\nimport {\n combineLatest,\n EMPTY,\n Observable,\n of,\n} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n switchMap,\n take,\n} from 'rxjs/operators';\nimport {\n cancelPlaceholderRequest,\n failPlaceholderRequestEntity,\n type PlaceholderRequestStore,\n type PlaceholderVariable,\n selectPlaceholderRequestEntityUsage,\n setPlaceholderRequestEntityFromUrl,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderTemplateResponseEffect {\n /**\n * Set the PlaceholderRequest entity with the reply content, dispatch failPlaceholderRequestEntity if it catches a failure\n * Handles the rendering of the HTML content from the template and creates the combine latest from facts list if needed\n * Disables unused templates refresh if used is false in the store\n */\n public setPlaceholderRequestEntityFromUrl$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setPlaceholderRequestEntityFromUrl),\n fromApiEffectSwitchMapById(\n (templateResponse, action) => {\n const facts = templateResponse.vars ? Object.entries(templateResponse.vars).filter(([, variable]) => variable.type === 'fact') : [];\n const factsStreamsList = this.rulesEngineService\n ? facts.map(([varName, fact]) =>\n this.rulesEngineService!.engine.retrieveOrCreateFactStream(fact.value).pipe(\n map((factValue) => ({\n varName,\n factName: fact.value,\n // eslint-disable-next-line new-cap -- naming convention imposed by jsonpath-plus\n factValue: (fact.path && factValue) ? JSONPath({ wrap: false, json: factValue, path: fact.path }) : factValue\n })),\n distinctUntilChanged((previous, current) => previous.factValue === current.factValue)\n ))\n : [];\n\n const factsStreamsList$ = factsStreamsList.length > 0 ? combineLatest(factsStreamsList) : of([]);\n return combineLatest([factsStreamsList$, this.store.select(selectPlaceholderRequestEntityUsage(action.id)).pipe(distinctUntilChanged())]).pipe(\n switchMap(([factsUsedInTemplate, placeholderRequestUsage]) => {\n if (!placeholderRequestUsage) {\n return EMPTY;\n }\n return this.getRenderedHTML$(templateResponse.template, templateResponse.vars, factsUsedInTemplate).pipe(\n map(({ renderedTemplate, unknownTypeFound }) =>\n // Update instead of set because used already set by the update from url action\n updatePlaceholderRequestEntity({\n entity: {\n ...templateResponse,\n resolvedUrl: action.resolvedUrl,\n id: action.id,\n renderedTemplate,\n unknownTypeFound\n },\n requestId: action.requestId\n })\n )\n );\n }));\n },\n (error, action) => of(failPlaceholderRequestEntity({ ids: [action.id], error, requestId: action.requestId })),\n (requestIdPayload, action) => cancelPlaceholderRequest({ ...requestIdPayload, id: action.id })\n )\n )\n );\n\n constructor(\n private readonly actions$: Actions,\n private readonly store: Store<PlaceholderRequestStore>,\n @Optional() private readonly rulesEngineService: RulesEngineRunnerService | null,\n @Optional() private readonly dynamicContentService: DynamicContentService | null,\n @Optional() private readonly translationService: LocalizationService | null) {}\n\n /**\n * Renders the html template, replacing facts and urls and localizationKeys\n * @param template\n * @param vars\n * @param facts\n */\n private getRenderedHTML$(template?: string, vars?: Record<string, PlaceholderVariable>, facts?: { varName: string; factName: string; factValue: any }[]) {\n let unknownTypeFound = false;\n const factMapFromVars = (facts || []).reduce((mapping: { [key: string]: any }, fact) => {\n mapping[fact.varName] = fact.factValue;\n return mapping;\n }, {});\n const replacements$: Observable<{ ejsVar: RegExp; value: string } | null>[] = [];\n if (vars && template) {\n for (const varName in vars) {\n if (Object.prototype.hasOwnProperty.call(vars, varName)) {\n const ejsVar = new RegExp(`<%=\\\\s*${varName}\\\\s*%>`, 'g');\n switch (vars[varName].type) {\n case 'relativeUrl': {\n replacements$.push(\n this.dynamicContentService?.getMediaPathStream(vars[varName].value).pipe(\n take(1),\n map((value: string) => ({ ejsVar, value }))\n ) || of({ ejsVar, value: vars[varName].value })\n );\n break;\n }\n case 'fullUrl': {\n template = template.replace(ejsVar, vars[varName].value);\n break;\n }\n case 'fact': {\n template = template.replace(ejsVar, factMapFromVars[varName] ?? '');\n break;\n }\n case 'localisation': {\n const linkedParams = (Object.entries(vars[varName].parameters || {})).reduce((acc: { [key: string]: any }, [paramKey, paramValue]) => {\n acc[paramKey] = factMapFromVars[paramValue];\n return acc;\n }, {});\n replacements$.push(\n this.translationService\n ? this.translationService.translate(vars[varName].value, linkedParams).pipe(\n map((value) => (value ? { ejsVar, value } : null))\n )\n : of(null)\n );\n break;\n }\n default : {\n unknownTypeFound = true;\n break;\n }\n }\n }\n }\n }\n return replacements$.length > 0 && !!template\n ? combineLatest(replacements$).pipe(\n map((replacements) => ({\n renderedTemplate: replacements.reduce(\n (acc, replacement) =>\n replacement ? acc.replace(replacement.ejsVar, replacement.value) : acc,\n template\n ),\n unknownTypeFound\n }))\n )\n : of({ renderedTemplate: template, unknownTypeFound });\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n EffectsModule,\n} from '@ngrx/effects';\nimport {\n PlaceholderRulesEngineActionHandler,\n} from './placeholder.action-handler';\nimport {\n PlaceholderTemplateResponseEffect,\n} from './placeholder.rules-engine.effect';\nimport {\n PlaceholderRequestStoreModule,\n PlaceholderTemplateStoreModule,\n} from '@o3r/components';\n\n@NgModule({\n imports: [\n EffectsModule.forFeature([PlaceholderTemplateResponseEffect]),\n PlaceholderRequestStoreModule,\n PlaceholderTemplateStoreModule\n ],\n providers: [\n PlaceholderRulesEngineActionHandler\n ]\n})\nexport class PlaceholderRulesEngineActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["map","distinctUntilChanged","i1","i2","i3","i5"],"mappings":";;;;;;;;;;;;;;;;;;AAIA;AACO,MAAM,2CAA2C,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kCAAkC,uCAP3C,6BAA6B;YAC7B,8BAA8B,CAAA,EAAA,CAAA,CAAA;AAMrB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,EAJlC,SAAA,EAAA;YACT;AACD,SAAA,EAAA,OAAA,EAAA,CANC,aAAa,CAAC,UAAU,CAAC,CAAC,iCAAiC,CAAC,CAAC;YAC7D,6BAA6B;YAC7B,8BAA8B,CAAA,EAAA,CAAA,CAAA;;4FAMrB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAV9C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;AACP,wBAAA,aAAa,CAAC,UAAU,CAAC,CAAC,iCAAiC,CAAC,CAAC;wBAC7D,6BAA6B;wBAC7B;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT;AACD;AACF,iBAAA;;;AC1BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"o3r-components-rules-engine.mjs","sources":["../../src/rules-engine/placeholder.interfaces.ts","../../src/rules-engine/placeholder.action-handler.ts","../../src/rules-engine/placeholder.rules-engine.effect.ts","../../src/rules-engine/placeholder.rules-engine.module.ts","../../src/rules-engine/o3r-components-rules-engine.ts"],"sourcesContent":["import type {\n RulesEngineAction,\n} from '@o3r/core';\n\n/** ActionUpdatePlaceholderBlock */\nexport const RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE = 'UPDATE_PLACEHOLDER';\n\n/**\n * Content of action that updates a placeholder\n */\nexport interface ActionUpdatePlaceholderBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE;\n placeholderId: string;\n value: string;\n priority?: number;\n}\n","import {\n Injectable,\n Injector,\n Optional,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n select,\n Store,\n} from '@ngrx/store';\nimport type {\n RulesEngineActionHandler,\n} from '@o3r/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LocalizationService,\n} from '@o3r/localization';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n combineLatest,\n distinctUntilChanged,\n firstValueFrom,\n map,\n of,\n startWith,\n Subject,\n withLatestFrom,\n} from 'rxjs';\nimport {\n ActionUpdatePlaceholderBlock,\n RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE,\n} from './placeholder.interfaces';\nimport {\n deletePlaceholderTemplateEntity,\n PlaceholderRequestReply,\n PlaceholderTemplateStore,\n selectPlaceholderRequestEntities,\n selectPlaceholderTemplateEntities,\n setPlaceholderRequestEntityFromUrl,\n setPlaceholderTemplateEntity,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdatePlaceholderBlock> {\n protected placeholdersActions$: Subject<{ placeholderId: string; templateUrl: string; priority: number }[]> = new Subject();\n\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE] as const;\n\n constructor(\n store: Store<PlaceholderTemplateStore>,\n private readonly logger: LoggerService,\n private readonly injector: Injector,\n @Optional() translateService?: LocalizationService\n ) {\n const lang$ = translateService\n ? translateService.getTranslateService().onLangChange.pipe(\n map(({ lang }) => lang),\n startWith(translateService.getCurrentLanguage()),\n distinctUntilChanged()\n )\n : of(null);\n\n const filteredActions$ = combineLatest([\n lang$,\n this.placeholdersActions$.pipe(\n distinctUntilChanged((prev, next) => JSON.stringify(prev) === JSON.stringify(next))\n )\n ]).pipe(\n withLatestFrom(\n combineLatest([store.pipe(select(selectPlaceholderTemplateEntities)), store.pipe(select(selectPlaceholderRequestEntities))])\n ),\n map(([langAndTemplatesUrls, storedPlaceholdersAndRequests]) => {\n const [lang, placeholderActions] = langAndTemplatesUrls;\n const storedPlaceholders = storedPlaceholdersAndRequests[0] || {};\n const storedPlaceholderRequests = storedPlaceholdersAndRequests[1] || {};\n const placeholderNewRequests: { rawUrl: string; resolvedUrl: string }[] = [];\n // Stores all raw Urls used from the current engine execution\n const usedUrls: Record<string, boolean> = {};\n // Get all Urls that needs to be resolved from current rules engine output\n const placeholdersTemplates = placeholderActions.reduce((acc, placeholderAction) => {\n const placeholdersTemplateUrl = {\n rawUrl: placeholderAction.templateUrl,\n priority: placeholderAction.priority\n };\n if (acc[placeholderAction.placeholderId]) {\n acc[placeholderAction.placeholderId].push(placeholdersTemplateUrl);\n } else {\n acc[placeholderAction.placeholderId] = [placeholdersTemplateUrl];\n }\n const resolvedUrl = this.resolveUrlWithLang(placeholderAction.templateUrl, lang);\n // Filters duplicates and resolved urls that are already in the store\n if (!usedUrls[placeholderAction.templateUrl] && (!storedPlaceholderRequests[placeholderAction.templateUrl]\n || storedPlaceholderRequests[placeholderAction.templateUrl]!.resolvedUrl !== resolvedUrl)) {\n placeholderNewRequests.push({\n rawUrl: placeholderAction.templateUrl,\n resolvedUrl: this.resolveUrlWithLang(placeholderAction.templateUrl, lang)\n });\n }\n usedUrls[placeholderAction.templateUrl] = true;\n return acc;\n }, {} as { [key: string]: { rawUrl: string; priority: number }[] });\n // Urls not used anymore and not already disabled\n const placeholderRequestsToDisable: string[] = [];\n // Urls used that were disabled\n const placeholderRequestsToEnable: string[] = [];\n Object.keys(storedPlaceholderRequests).forEach((storedPlaceholderRequestRawUrl) => {\n const usedFromEngineIteration = usedUrls[storedPlaceholderRequestRawUrl];\n const usedFromStore = (storedPlaceholderRequests && storedPlaceholderRequests[storedPlaceholderRequestRawUrl]) ? storedPlaceholderRequests[storedPlaceholderRequestRawUrl].used : false;\n if (!usedFromEngineIteration && usedFromStore) {\n placeholderRequestsToDisable.push(storedPlaceholderRequestRawUrl);\n } else if (usedFromEngineIteration && !usedFromStore) {\n placeholderRequestsToEnable.push(storedPlaceholderRequestRawUrl);\n }\n });\n // Placeholder that are no longer filled by the current engine execution output will be cleared\n const placeholdersTemplatesToBeCleanedUp = Object.keys(storedPlaceholders)\n .filter((placeholderId) => !placeholdersTemplates[placeholderId]);\n\n const placeholdersTemplatesToBeSet = Object.keys(placeholdersTemplates).reduce((changedPlaceholderTemplates, placeholderTemplateId) => {\n // Caching if the placeholder template already exists with the same urls\n if (!storedPlaceholders[placeholderTemplateId]\n || !(JSON.stringify(storedPlaceholders[placeholderTemplateId].urlsWithPriority) === JSON.stringify(placeholdersTemplates[placeholderTemplateId]))) {\n changedPlaceholderTemplates.push({\n id: placeholderTemplateId,\n urlsWithPriority: placeholdersTemplates[placeholderTemplateId]\n });\n }\n return changedPlaceholderTemplates;\n }, [] as { id: string; urlsWithPriority: { rawUrl: string; priority: number }[] }[]);\n return {\n placeholdersTemplatesToBeCleanedUp,\n placeholderRequestsToDisable,\n placeholderRequestsToEnable,\n placeholdersTemplatesToBeSet,\n placeholderNewRequests\n };\n })\n );\n filteredActions$.pipe(takeUntilDestroyed()).subscribe((placeholdersUpdates) => {\n placeholdersUpdates.placeholdersTemplatesToBeCleanedUp.forEach((placeholderId) =>\n store.dispatch(deletePlaceholderTemplateEntity({\n id: placeholderId\n }))\n );\n placeholdersUpdates.placeholdersTemplatesToBeSet.forEach((placeholdersTemplateToBeSet) => {\n store.dispatch(setPlaceholderTemplateEntity({ entity: placeholdersTemplateToBeSet }));\n });\n placeholdersUpdates.placeholderRequestsToDisable.forEach((placeholderRequestToDisable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToDisable, used: false } }));\n });\n placeholdersUpdates.placeholderRequestsToEnable.forEach((placeholderRequestToEnable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToEnable, used: true } }));\n });\n placeholdersUpdates.placeholderNewRequests.forEach((placeholderNewRequest) => {\n store.dispatch(setPlaceholderRequestEntityFromUrl({\n resolvedUrl: placeholderNewRequest.resolvedUrl,\n id: placeholderNewRequest.rawUrl,\n call: this.retrieveTemplate(placeholderNewRequest.resolvedUrl)\n }));\n });\n });\n }\n\n /**\n * Localize the url, replacing the language marker\n * @param url\n * @param language\n */\n protected resolveUrlWithLang(url: string, language: string | null): string {\n if (!language && url.includes('[LANGUAGE]')) {\n this.logger.warn(`Missing language when trying to resolve ${url}`);\n }\n return language ? url.replace(/\\[LANGUAGE]/g, language) : url;\n }\n\n /**\n * Retrieve template as json from a given url\n * @param url\n */\n protected async retrieveTemplate(url: string): Promise<PlaceholderRequestReply> {\n const resolvedUrl$ = this.injector.get(DynamicContentService, null, { optional: true })?.getContentPathStream(url) || of(url);\n const fullUrl = await firstValueFrom(resolvedUrl$);\n return fetch(fullUrl).then((response) => response.json());\n }\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdatePlaceholderBlock[]) {\n const templates = actions.map((action) => ({\n placeholderId: action.placeholderId,\n templateUrl: action.value,\n priority: action.priority || 0\n }));\n\n this.placeholdersActions$.next(templates);\n }\n}\n","import {\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport {\n Store,\n} from '@ngrx/store';\nimport {\n fromApiEffectSwitchMapById,\n} from '@o3r/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LocalizationService,\n} from '@o3r/localization';\nimport {\n RulesEngineRunnerService,\n} from '@o3r/rules-engine';\nimport {\n JSONPath,\n} from 'jsonpath-plus';\nimport {\n combineLatest,\n EMPTY,\n Observable,\n of,\n} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n switchMap,\n take,\n} from 'rxjs/operators';\nimport {\n cancelPlaceholderRequest,\n failPlaceholderRequestEntity,\n type PlaceholderRequestStore,\n type PlaceholderVariable,\n selectPlaceholderRequestEntityUsage,\n setPlaceholderRequestEntityFromUrl,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderTemplateResponseEffect {\n /**\n * Set the PlaceholderRequest entity with the reply content, dispatch failPlaceholderRequestEntity if it catches a failure\n * Handles the rendering of the HTML content from the template and creates the combine latest from facts list if needed\n * Disables unused templates refresh if used is false in the store\n */\n public setPlaceholderRequestEntityFromUrl$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setPlaceholderRequestEntityFromUrl),\n fromApiEffectSwitchMapById(\n (templateResponse, action) => {\n const facts = templateResponse.vars ? Object.entries(templateResponse.vars).filter(([, variable]) => variable.type === 'fact') : [];\n const factsStreamsList = this.rulesEngineService\n ? facts.map(([varName, fact]) =>\n this.rulesEngineService!.engine.retrieveOrCreateFactStream(fact.value).pipe(\n map((factValue) => ({\n varName,\n factName: fact.value,\n // eslint-disable-next-line new-cap -- naming convention imposed by jsonpath-plus\n factValue: (fact.path && factValue) ? JSONPath({ wrap: false, json: factValue, path: fact.path }) : factValue\n })),\n distinctUntilChanged((previous, current) => previous.factValue === current.factValue)\n ))\n : [];\n\n const factsStreamsList$ = factsStreamsList.length > 0 ? combineLatest(factsStreamsList) : of([]);\n return combineLatest([factsStreamsList$, this.store.select(selectPlaceholderRequestEntityUsage(action.id)).pipe(distinctUntilChanged())]).pipe(\n switchMap(([factsUsedInTemplate, placeholderRequestUsage]) => {\n if (!placeholderRequestUsage) {\n return EMPTY;\n }\n return this.getRenderedHTML$(templateResponse.template, templateResponse.vars, factsUsedInTemplate).pipe(\n map(({ renderedTemplate, unknownTypeFound }) =>\n // Update instead of set because used already set by the update from url action\n updatePlaceholderRequestEntity({\n entity: {\n ...templateResponse,\n resolvedUrl: action.resolvedUrl,\n id: action.id,\n renderedTemplate,\n unknownTypeFound\n },\n requestId: action.requestId\n })\n )\n );\n }));\n },\n (error, action) => of(failPlaceholderRequestEntity({ ids: [action.id], error, requestId: action.requestId })),\n (requestIdPayload, action) => cancelPlaceholderRequest({ ...requestIdPayload, id: action.id })\n )\n )\n );\n\n constructor(\n private readonly actions$: Actions,\n private readonly store: Store<PlaceholderRequestStore>,\n @Optional() private readonly rulesEngineService: RulesEngineRunnerService | null,\n @Optional() private readonly dynamicContentService: DynamicContentService | null,\n @Optional() private readonly translationService: LocalizationService | null) {}\n\n /**\n * Renders the html template, replacing facts and urls and localizationKeys\n * @param template\n * @param vars\n * @param facts\n */\n private getRenderedHTML$(template?: string, vars?: Record<string, PlaceholderVariable>, facts?: { varName: string; factName: string; factValue: any }[]) {\n let unknownTypeFound = false;\n const factMapFromVars = (facts || []).reduce((mapping: { [key: string]: any }, fact) => {\n mapping[fact.varName] = fact.factValue;\n return mapping;\n }, {});\n const replacements$: Observable<{ ejsVar: RegExp; value: string } | null>[] = [];\n if (vars && template) {\n for (const varName in vars) {\n if (Object.prototype.hasOwnProperty.call(vars, varName)) {\n const ejsVar = new RegExp(`<%=\\\\s*${varName}\\\\s*%>`, 'g');\n switch (vars[varName].type) {\n case 'relativeUrl': {\n replacements$.push(\n this.dynamicContentService?.getMediaPathStream(vars[varName].value).pipe(\n take(1),\n map((value: string) => ({ ejsVar, value }))\n ) || of({ ejsVar, value: vars[varName].value })\n );\n break;\n }\n case 'fullUrl': {\n template = template.replace(ejsVar, vars[varName].value);\n break;\n }\n case 'fact': {\n template = template.replace(ejsVar, factMapFromVars[varName] ?? '');\n break;\n }\n case 'localisation': {\n const linkedParams = (Object.entries(vars[varName].parameters || {})).reduce((acc: { [key: string]: any }, [paramKey, paramValue]) => {\n acc[paramKey] = factMapFromVars[paramValue];\n return acc;\n }, {});\n replacements$.push(\n this.translationService\n ? this.translationService.translate(vars[varName].value, linkedParams).pipe(\n map((value) => (value ? { ejsVar, value } : null))\n )\n : of(null)\n );\n break;\n }\n default : {\n unknownTypeFound = true;\n break;\n }\n }\n }\n }\n }\n return replacements$.length > 0 && !!template\n ? combineLatest(replacements$).pipe(\n map((replacements) => ({\n renderedTemplate: replacements.reduce(\n (acc, replacement) =>\n replacement ? acc.replace(replacement.ejsVar, replacement.value) : acc,\n template\n ),\n unknownTypeFound\n }))\n )\n : of({ renderedTemplate: template, unknownTypeFound });\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n EffectsModule,\n} from '@ngrx/effects';\nimport {\n PlaceholderRulesEngineActionHandler,\n} from './placeholder.action-handler';\nimport {\n PlaceholderTemplateResponseEffect,\n} from './placeholder.rules-engine.effect';\nimport {\n PlaceholderRequestStoreModule,\n PlaceholderTemplateStoreModule,\n} from '@o3r/components';\n\n@NgModule({\n imports: [\n EffectsModule.forFeature([PlaceholderTemplateResponseEffect]),\n PlaceholderRequestStoreModule,\n PlaceholderTemplateStoreModule\n ],\n providers: [\n PlaceholderRulesEngineActionHandler\n ]\n})\nexport class PlaceholderRulesEngineActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["map","distinctUntilChanged","i1","i2","i3","i5"],"mappings":";;;;;;;;;;;;;;;;;;AAIA;AACO,MAAM,2CAA2C,GAAG;;AC4C3D;;AAEG;MAEU,mCAAmC,CAAA;AAM9C,IAAA,WAAA,CACE,KAAsC,EACrB,MAAqB,EACrB,QAAkB,EACvB,gBAAsC,EAAA;QAFjC,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,QAAQ,GAAR,QAAQ;AARjB,QAAA,IAAA,CAAA,oBAAoB,GAAgF,IAAI,OAAO,EAAE;;AAG3G,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,2CAA2C,CAAU;QAQxF,MAAM,KAAK,GAAG;AACZ,cAAE,gBAAgB,CAAC,mBAAmB,EAAE,CAAC,YAAY,CAAC,IAAI,CACxD,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,EACvB,SAAS,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,EAChD,oBAAoB,EAAE;AAExB,cAAE,EAAE,CAAC,IAAI,CAAC;QAEZ,MAAM,gBAAgB,GAAG,aA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AAA,CAAA;kBAV9C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;AACP,wBAAA,aAAa,CAAC,UAAU,CAAC,CAAC,iCAAiC,CAAC,CAAC;wBAC7D,6BAA6B;wBAC7B;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT;AACD;AACF,iBAAA;;;AC1BD;;AAEG;;;;"}
|
|
@@ -159,13 +159,13 @@ class PlaceholderRequestStoreModule {
|
|
|
159
159
|
]
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
163
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
164
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
162
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRequestStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
163
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRequestStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
164
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRequestStoreModule, providers: [
|
|
165
165
|
{ provide: PLACEHOLDER_REQUEST_REDUCER_TOKEN, useFactory: getDefaultplaceholderRequestReducer }
|
|
166
166
|
], imports: [StoreModule.forFeature(PLACEHOLDER_REQUEST_STORE_NAME, PLACEHOLDER_REQUEST_REDUCER_TOKEN)] }); }
|
|
167
167
|
}
|
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderRequestStoreModule, decorators: [{
|
|
169
169
|
type: NgModule,
|
|
170
170
|
args: [{
|
|
171
171
|
imports: [
|
|
@@ -270,13 +270,13 @@ class PlaceholderTemplateStoreModule {
|
|
|
270
270
|
]
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
274
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
275
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
273
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderTemplateStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
274
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderTemplateStoreModule, imports: [i1.StoreFeatureModule] }); }
|
|
275
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderTemplateStoreModule, providers: [
|
|
276
276
|
{ provide: PLACEHOLDER_TEMPLATE_REDUCER_TOKEN, useFactory: getDefaultPlaceholderTemplateReducer }
|
|
277
277
|
], imports: [StoreModule.forFeature(PLACEHOLDER_TEMPLATE_STORE_NAME, PLACEHOLDER_TEMPLATE_REDUCER_TOKEN)] }); }
|
|
278
278
|
}
|
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderTemplateStoreModule, decorators: [{
|
|
280
280
|
type: NgModule,
|
|
281
281
|
args: [{
|
|
282
282
|
imports: [
|
|
@@ -718,10 +718,10 @@ class HighlightService {
|
|
|
718
718
|
this.singleRun = false;
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
722
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
721
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HighlightService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
722
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HighlightService, providedIn: 'root' }); }
|
|
723
723
|
}
|
|
724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HighlightService, decorators: [{
|
|
725
725
|
type: Injectable,
|
|
726
726
|
args: [{
|
|
727
727
|
providedIn: 'root'
|
|
@@ -1129,10 +1129,10 @@ class ComponentsDevtoolsMessageService {
|
|
|
1129
1129
|
this.inspectorService.otterLikeComponentInfoToBeSent$
|
|
1130
1130
|
.pipe(takeUntilDestroyed(this.destroyRef), filter((info) => !!info)).subscribe((info) => this.sendMessage('selectedComponentInfo', info));
|
|
1131
1131
|
}
|
|
1132
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1133
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
1132
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ComponentsDevtoolsMessageService, deps: [{ token: i1$1.LoggerService }, { token: i1.Store }, { token: OTTER_COMPONENTS_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1133
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ComponentsDevtoolsMessageService, providedIn: 'root' }); }
|
|
1134
1134
|
}
|
|
1135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ComponentsDevtoolsMessageService, decorators: [{
|
|
1136
1136
|
type: Injectable,
|
|
1137
1137
|
args: [{
|
|
1138
1138
|
providedIn: 'root'
|
|
@@ -1158,16 +1158,16 @@ class ComponentsDevtoolsModule {
|
|
|
1158
1158
|
]
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1162
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
1161
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ComponentsDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1162
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: ComponentsDevtoolsModule, imports: [StoreModule,
|
|
1163
1163
|
PlaceholderTemplateStoreModule] }); }
|
|
1164
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
1164
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ComponentsDevtoolsModule, providers: [
|
|
1165
1165
|
{ provide: OTTER_COMPONENTS_DEVTOOLS_OPTIONS, useValue: OTTER_COMPONENTS_DEVTOOLS_DEFAULT_OPTIONS },
|
|
1166
1166
|
ComponentsDevtoolsMessageService
|
|
1167
1167
|
], imports: [StoreModule,
|
|
1168
1168
|
PlaceholderTemplateStoreModule] }); }
|
|
1169
1169
|
}
|
|
1170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ComponentsDevtoolsModule, decorators: [{
|
|
1171
1171
|
type: NgModule,
|
|
1172
1172
|
args: [{
|
|
1173
1173
|
imports: [
|
|
@@ -1294,8 +1294,8 @@ class C11nDirective {
|
|
|
1294
1294
|
this.componentRef.destroy();
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1298
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
1297
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.KeyValueDiffers }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1298
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: C11nDirective, isStandalone: true, selector: "[c11n]", inputs: { component: "component", config: "config", formControl: "formControl", inputs: "inputs", outputs: "outputs" }, providers: [
|
|
1299
1299
|
{
|
|
1300
1300
|
provide: NG_VALUE_ACCESSOR,
|
|
1301
1301
|
useExisting: forwardRef((() => C11nDirective)),
|
|
@@ -1308,7 +1308,7 @@ class C11nDirective {
|
|
|
1308
1308
|
}
|
|
1309
1309
|
], usesOnChanges: true, ngImport: i0 }); }
|
|
1310
1310
|
}
|
|
1311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nDirective, decorators: [{
|
|
1312
1312
|
type: Directive,
|
|
1313
1313
|
args: [{
|
|
1314
1314
|
selector: '[c11n]',
|
|
@@ -1376,10 +1376,10 @@ class C11nService {
|
|
|
1376
1376
|
return typeof presenterConfig === 'string' && presenterConfig !== '' ? (this.presentersMap.get(presenterConfig) || defaultPres) : defaultPres;
|
|
1377
1377
|
}));
|
|
1378
1378
|
}
|
|
1379
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1380
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
1379
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nService, deps: [{ token: C11N_PRESENTERS_MAP_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1380
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nService }); }
|
|
1381
1381
|
}
|
|
1382
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nService, decorators: [{
|
|
1383
1383
|
type: Injectable
|
|
1384
1384
|
}], ctorParameters: () => [{ type: Map, decorators: [{
|
|
1385
1385
|
type: Inject,
|
|
@@ -1388,10 +1388,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
1388
1388
|
|
|
1389
1389
|
/** C11n directive mock */
|
|
1390
1390
|
class MockC11nDirective {
|
|
1391
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1392
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
1391
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockC11nDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1392
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.14", type: MockC11nDirective, isStandalone: false, selector: "[c11n]", inputs: { config: "config", component: "component", inputs: "inputs", outputs: "outputs" }, ngImport: i0 }); }
|
|
1393
1393
|
}
|
|
1394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MockC11nDirective, decorators: [{
|
|
1395
1395
|
type: Directive,
|
|
1396
1396
|
args: [{
|
|
1397
1397
|
selector: '[c11n]',
|
|
@@ -1406,21 +1406,21 @@ class C11nMockService {
|
|
|
1406
1406
|
getPresenter(_defaultPres, _presKey) {
|
|
1407
1407
|
return (source) => source.pipe(mapTo(null));
|
|
1408
1408
|
}
|
|
1409
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1410
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
1409
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nMockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1410
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nMockService }); }
|
|
1411
1411
|
}
|
|
1412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nMockService, decorators: [{
|
|
1413
1413
|
type: Injectable
|
|
1414
1414
|
}] });
|
|
1415
1415
|
/**
|
|
1416
1416
|
* The purpose of this module is to be imported in the unit tests of the components which are using c11n directive
|
|
1417
1417
|
*/
|
|
1418
1418
|
class C11nMockModule {
|
|
1419
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1420
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
1421
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
1419
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1420
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: C11nMockModule, declarations: [MockC11nDirective], exports: [MockC11nDirective] }); }
|
|
1421
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nMockModule, providers: [{ provide: C11nService, useClass: C11nMockService }] }); }
|
|
1422
1422
|
}
|
|
1423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nMockModule, decorators: [{
|
|
1424
1424
|
type: NgModule,
|
|
1425
1425
|
args: [{
|
|
1426
1426
|
declarations: [MockC11nDirective],
|
|
@@ -1463,11 +1463,11 @@ class C11nModule {
|
|
|
1463
1463
|
}]
|
|
1464
1464
|
};
|
|
1465
1465
|
}
|
|
1466
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1467
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
1468
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
1466
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1467
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: C11nModule, imports: [C11nDirective], exports: [C11nDirective] }); }
|
|
1468
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nModule }); }
|
|
1469
1469
|
}
|
|
1470
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: C11nModule, decorators: [{
|
|
1471
1471
|
type: NgModule,
|
|
1472
1472
|
args: [{
|
|
1473
1473
|
imports: [C11nDirective],
|
|
@@ -1513,10 +1513,10 @@ class O3rCapitalizePipe {
|
|
|
1513
1513
|
const firstLetter = val && val.charAt(0);
|
|
1514
1514
|
return firstLetter ? firstLetter.toUpperCase() + val.slice(1) : value;
|
|
1515
1515
|
}
|
|
1516
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1517
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
1516
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: O3rCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1517
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: O3rCapitalizePipe, isStandalone: true, name: "o3rCapitalize" }); }
|
|
1518
1518
|
}
|
|
1519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1519
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: O3rCapitalizePipe, decorators: [{
|
|
1520
1520
|
type: Pipe,
|
|
1521
1521
|
args: [{ name: 'o3rCapitalize' }]
|
|
1522
1522
|
}] });
|
|
@@ -1596,10 +1596,10 @@ class O3rDurationPipe {
|
|
|
1596
1596
|
return result.replace(matchedPatternToReplace, padded);
|
|
1597
1597
|
}, pattern);
|
|
1598
1598
|
}
|
|
1599
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1600
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
1599
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: O3rDurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1600
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: O3rDurationPipe, isStandalone: true, name: "o3rDuration" }); }
|
|
1601
1601
|
}
|
|
1602
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1602
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: O3rDurationPipe, decorators: [{
|
|
1603
1603
|
type: Pipe,
|
|
1604
1604
|
args: [{ name: 'o3rDuration' }]
|
|
1605
1605
|
}] });
|
|
@@ -1608,10 +1608,10 @@ class O3rKeepWhiteSpacePipe {
|
|
|
1608
1608
|
transform(value) {
|
|
1609
1609
|
return value.replace(/\s/g, ' ');
|
|
1610
1610
|
}
|
|
1611
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1612
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
1611
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: O3rKeepWhiteSpacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1612
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: O3rKeepWhiteSpacePipe, isStandalone: true, name: "o3rKeepWhiteSpace" }); }
|
|
1613
1613
|
}
|
|
1614
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: O3rKeepWhiteSpacePipe, decorators: [{
|
|
1615
1615
|
type: Pipe,
|
|
1616
1616
|
args: [{ name: 'o3rKeepWhiteSpace' }]
|
|
1617
1617
|
}] });
|
|
@@ -1627,10 +1627,10 @@ class O3rReplaceWithBoldPipe {
|
|
|
1627
1627
|
return value;
|
|
1628
1628
|
}
|
|
1629
1629
|
}
|
|
1630
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1631
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
1630
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: O3rReplaceWithBoldPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1631
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: O3rReplaceWithBoldPipe, isStandalone: true, name: "o3rReplaceWithBold" }); }
|
|
1632
1632
|
}
|
|
1633
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: O3rReplaceWithBoldPipe, decorators: [{
|
|
1634
1634
|
type: Pipe,
|
|
1635
1635
|
args: [{ name: 'o3rReplaceWithBold' }]
|
|
1636
1636
|
}] });
|
|
@@ -1696,10 +1696,10 @@ class PlaceholderComponent {
|
|
|
1696
1696
|
this.messages$.complete();
|
|
1697
1697
|
this.afterViewInit$.complete();
|
|
1698
1698
|
}
|
|
1699
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1700
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
1699
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderComponent, deps: [{ token: i1.Store }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1700
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: PlaceholderComponent, isStandalone: false, 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 }); }
|
|
1701
1701
|
}
|
|
1702
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderComponent, decorators: [{
|
|
1703
1703
|
type: Component,
|
|
1704
1704
|
args: [{ selector: 'o3r-placeholder', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1705
1705
|
'[class.debug]': `mode() === 'debug'`
|
|
@@ -1709,17 +1709,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
1709
1709
|
}] } });
|
|
1710
1710
|
|
|
1711
1711
|
class PlaceholderModule {
|
|
1712
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1713
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
1712
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1713
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderModule, declarations: [PlaceholderComponent], imports: [CommonModule,
|
|
1714
1714
|
StoreModule,
|
|
1715
1715
|
PlaceholderTemplateStoreModule,
|
|
1716
1716
|
PlaceholderRequestStoreModule], exports: [PlaceholderComponent] }); }
|
|
1717
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
1717
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderModule, imports: [CommonModule,
|
|
1718
1718
|
StoreModule,
|
|
1719
1719
|
PlaceholderTemplateStoreModule,
|
|
1720
1720
|
PlaceholderRequestStoreModule] }); }
|
|
1721
1721
|
}
|
|
1722
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PlaceholderModule, decorators: [{
|
|
1723
1723
|
type: NgModule,
|
|
1724
1724
|
args: [{
|
|
1725
1725
|
imports: [
|