@o3r/components 14.6.0-prerelease.55 → 14.6.0-prerelease.57

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.
@@ -168,10 +168,10 @@ class PlaceholderRulesEngineActionHandler {
168
168
  }));
169
169
  this.placeholdersActions$.next(templates);
170
170
  }
171
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRulesEngineActionHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
172
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRulesEngineActionHandler }); }
171
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRulesEngineActionHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
172
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRulesEngineActionHandler }); }
173
173
  }
174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRulesEngineActionHandler, decorators: [{
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRulesEngineActionHandler, decorators: [{
175
175
  type: Injectable
176
176
  }], ctorParameters: () => [] });
177
177
 
@@ -284,10 +284,10 @@ class PlaceholderTemplateResponseEffect {
284
284
  })))
285
285
  : of({ renderedTemplate: template, unknownTypeFound });
286
286
  }
287
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderTemplateResponseEffect, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
288
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderTemplateResponseEffect }); }
287
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderTemplateResponseEffect, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
288
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderTemplateResponseEffect }); }
289
289
  }
290
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderTemplateResponseEffect, decorators: [{
290
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderTemplateResponseEffect, decorators: [{
291
291
  type: Injectable
292
292
  }] });
293
293
 
@@ -295,16 +295,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImpo
295
295
  * @deprecated Will be removed in v16. Use {@link providePlaceholderRulesEngineAction} instead.
296
296
  */
297
297
  class PlaceholderRulesEngineActionModule {
298
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
299
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRulesEngineActionModule, imports: [i1.EffectsFeatureModule, PlaceholderRequestStoreModule,
298
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
299
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRulesEngineActionModule, imports: [i1.EffectsFeatureModule, PlaceholderRequestStoreModule,
300
300
  PlaceholderTemplateStoreModule] }); }
301
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRulesEngineActionModule, providers: [
301
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRulesEngineActionModule, providers: [
302
302
  PlaceholderRulesEngineActionHandler
303
303
  ], imports: [EffectsModule.forFeature([PlaceholderTemplateResponseEffect]),
304
304
  PlaceholderRequestStoreModule,
305
305
  PlaceholderTemplateStoreModule] }); }
306
306
  }
307
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRulesEngineActionModule, decorators: [{
307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRulesEngineActionModule, decorators: [{
308
308
  type: NgModule,
309
309
  args: [{
310
310
  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';\nimport type {\n Observable,\n} from 'rxjs';\n\n/**\n * Minimal subset of the underlying translation service (ngx-translate's `TranslateService` or\n * transloco's `TranslocoService`) exposing language-change notifications.\n * TODO: remove this abstraction and rely on the single supported translation service in v16\n */\nexport interface PlaceholderTranslateService {\n /** Language-change stream exposed by ngx-translate (`@o3r/localization`) */\n onLangChange?: Observable<{ lang: string }>;\n /** Language-change stream exposed by transloco (`@o3r/transloco`) */\n langChanges$?: Observable<string>;\n}\n\n/**\n * Minimal subset of the `LocalizationService` API (from `@o3r/localization` or `@o3r/transloco`)\n * used by the placeholder rules engine. Declared locally so that neither package is a hard dependency.\n * TODO: remove this abstraction and import `LocalizationService` directly from the single supported translation package in v16\n */\nexport interface PlaceholderLocalizationService {\n /** Translate a localization key, resolving the given interpolation parameters */\n translate(key: string, interpolateParams?: object): Observable<string>;\n /** Get the underlying translation service used by the localization service */\n getTranslateService(): PlaceholderTranslateService;\n /** Get the current active language */\n getCurrentLanguage(): string;\n}\n\n/** ActionUpdatePlaceholderBlock */\nexport const RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE = 'UPDATE_PLACEHOLDER';\n\n/**\n * Content of action that updates a placeholder\n */\nexport interface ActionUpdatePlaceholderBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE;\n placeholderId: string;\n value: string;\n priority?: number;\n}\n","import {\n inject,\n Injectable,\n Injector,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n select,\n Store,\n} from '@ngrx/store';\nimport type {\n RulesEngineActionHandler,\n} from '@o3r/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n combineLatest,\n distinctUntilChanged,\n firstValueFrom,\n from,\n map,\n Observable,\n of,\n startWith,\n Subject,\n switchMap,\n withLatestFrom,\n} from 'rxjs';\nimport {\n ActionUpdatePlaceholderBlock,\n type PlaceholderLocalizationService,\n RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE,\n} from './placeholder-interfaces';\nimport {\n deletePlaceholderTemplateEntity,\n PlaceholderRequestReply,\n PlaceholderTemplateStore,\n selectPlaceholderRequestEntities,\n selectPlaceholderTemplateEntities,\n setPlaceholderRequestEntityFromUrl,\n setPlaceholderTemplateEntity,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdatePlaceholderBlock> {\n private readonly logger = inject(LoggerService);\n private readonly injector = inject(Injector);\n // Prefer `@o3r/transloco`, fall back to `@o3r/localization`; both are optional peer dependencies.\n // TODO: use `injectAsync` to resolve the optional `LocalizationService` token once migrated to ng22\n // TODO: remove the dynamic-import fallback and inject the `LocalizationService` from the single supported translation package in v16\n private readonly translationService: Promise<PlaceholderLocalizationService | undefined> = import('@o3r/transloco')\n .then((mod) => this.injector.get(mod.LocalizationService, null) as PlaceholderLocalizationService | null)\n .catch(() => null)\n .then((service) => service ?? import('@o3r/localization')\n .then((mod) => (this.injector.get(mod.LocalizationService, null) as PlaceholderLocalizationService | null) ?? undefined)\n .catch(() => undefined));\n\n protected placeholdersActions$: Subject<{ placeholderId: string; templateUrl: string; priority: number }[]> = new Subject();\n\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE] as const;\n\n constructor() {\n const store = inject<Store<PlaceholderTemplateStore>>(Store);\n\n const lang$ = from(this.translationService).pipe(\n switchMap((translationService) => {\n if (!translationService) {\n return of(null);\n }\n const translateService = translationService.getTranslateService();\n // `@o3r/localization` (ngx-translate) exposes `onLangChange`, while `@o3r/transloco` (transloco) exposes `langChanges$`\n const langChange$: Observable<string> = translateService.onLangChange\n ? translateService.onLangChange.pipe(map(({ lang }) => lang))\n : translateService.langChanges$!;\n return langChange$.pipe(\n startWith(translationService.getCurrentLanguage()),\n distinctUntilChanged()\n );\n })\n );\n\n const filteredActions$ = combineLatest([\n lang$,\n this.placeholdersActions$.pipe(\n distinctUntilChanged((prev, next) => JSON.stringify(prev) === JSON.stringify(next))\n )\n ]).pipe(\n withLatestFrom(\n combineLatest([store.pipe(select(selectPlaceholderTemplateEntities)), store.pipe(select(selectPlaceholderRequestEntities))])\n ),\n map(([langAndTemplatesUrls, storedPlaceholdersAndRequests]) => {\n const [lang, placeholderActions] = langAndTemplatesUrls;\n const storedPlaceholders = storedPlaceholdersAndRequests[0] || {};\n const storedPlaceholderRequests = storedPlaceholdersAndRequests[1] || {};\n const placeholderNewRequests: { rawUrl: string; resolvedUrl: string }[] = [];\n // Stores all raw Urls used from the current engine execution\n const usedUrls: Record<string, boolean> = {};\n // Get all Urls that needs to be resolved from current rules engine output\n const placeholdersTemplates = placeholderActions.reduce((acc, placeholderAction) => {\n const placeholdersTemplateUrl = {\n rawUrl: placeholderAction.templateUrl,\n priority: placeholderAction.priority\n };\n if (acc[placeholderAction.placeholderId]) {\n acc[placeholderAction.placeholderId].push(placeholdersTemplateUrl);\n } else {\n acc[placeholderAction.placeholderId] = [placeholdersTemplateUrl];\n }\n const resolvedUrl = this.resolveUrlWithLang(placeholderAction.templateUrl, lang);\n // Filters duplicates and resolved urls that are already in the store\n if (!usedUrls[placeholderAction.templateUrl] && (!storedPlaceholderRequests[placeholderAction.templateUrl]\n || storedPlaceholderRequests[placeholderAction.templateUrl]!.resolvedUrl !== resolvedUrl)) {\n placeholderNewRequests.push({\n rawUrl: placeholderAction.templateUrl,\n resolvedUrl: this.resolveUrlWithLang(placeholderAction.templateUrl, lang)\n });\n }\n usedUrls[placeholderAction.templateUrl] = true;\n return acc;\n }, {} as { [key: string]: { rawUrl: string; priority: number }[] });\n // Urls not used anymore and not already disabled\n const placeholderRequestsToDisable: string[] = [];\n // Urls used that were disabled\n const placeholderRequestsToEnable: string[] = [];\n Object.keys(storedPlaceholderRequests).forEach((storedPlaceholderRequestRawUrl) => {\n const usedFromEngineIteration = usedUrls[storedPlaceholderRequestRawUrl];\n const usedFromStore = (storedPlaceholderRequests && storedPlaceholderRequests[storedPlaceholderRequestRawUrl]) ? storedPlaceholderRequests[storedPlaceholderRequestRawUrl].used : false;\n if (!usedFromEngineIteration && usedFromStore) {\n placeholderRequestsToDisable.push(storedPlaceholderRequestRawUrl);\n } else if (usedFromEngineIteration && !usedFromStore) {\n placeholderRequestsToEnable.push(storedPlaceholderRequestRawUrl);\n }\n });\n // Placeholder that are no longer filled by the current engine execution output will be cleared\n const placeholdersTemplatesToBeCleanedUp = Object.keys(storedPlaceholders)\n .filter((placeholderId) => !placeholdersTemplates[placeholderId]);\n\n const placeholdersTemplatesToBeSet = Object.keys(placeholdersTemplates).reduce((changedPlaceholderTemplates, placeholderTemplateId) => {\n // Caching if the placeholder template already exists with the same urls\n if (!storedPlaceholders[placeholderTemplateId]\n || !(JSON.stringify(storedPlaceholders[placeholderTemplateId].urlsWithPriority) === JSON.stringify(placeholdersTemplates[placeholderTemplateId]))) {\n changedPlaceholderTemplates.push({\n id: placeholderTemplateId,\n urlsWithPriority: placeholdersTemplates[placeholderTemplateId]\n });\n }\n return changedPlaceholderTemplates;\n }, [] as { id: string; urlsWithPriority: { rawUrl: string; priority: number }[] }[]);\n return {\n placeholdersTemplatesToBeCleanedUp,\n placeholderRequestsToDisable,\n placeholderRequestsToEnable,\n placeholdersTemplatesToBeSet,\n placeholderNewRequests\n };\n })\n );\n filteredActions$.pipe(takeUntilDestroyed()).subscribe((placeholdersUpdates) => {\n placeholdersUpdates.placeholdersTemplatesToBeCleanedUp.forEach((placeholderId) =>\n store.dispatch(deletePlaceholderTemplateEntity({\n id: placeholderId\n }))\n );\n placeholdersUpdates.placeholdersTemplatesToBeSet.forEach((placeholdersTemplateToBeSet) => {\n store.dispatch(setPlaceholderTemplateEntity({ entity: placeholdersTemplateToBeSet }));\n });\n placeholdersUpdates.placeholderRequestsToDisable.forEach((placeholderRequestToDisable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToDisable, used: false } }));\n });\n placeholdersUpdates.placeholderRequestsToEnable.forEach((placeholderRequestToEnable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToEnable, used: true } }));\n });\n placeholdersUpdates.placeholderNewRequests.forEach((placeholderNewRequest) => {\n store.dispatch(setPlaceholderRequestEntityFromUrl({\n resolvedUrl: placeholderNewRequest.resolvedUrl,\n id: placeholderNewRequest.rawUrl,\n call: this.retrieveTemplate(placeholderNewRequest.resolvedUrl)\n }));\n });\n });\n }\n\n /**\n * Localize the url, replacing the language marker\n * @param url\n * @param language\n */\n protected resolveUrlWithLang(url: string, language: string | null): string {\n if (!language && url.includes('[LANGUAGE]')) {\n this.logger.warn(`Missing language when trying to resolve ${url}`);\n }\n return language ? url.replace(/\\[LANGUAGE]/g, language) : url;\n }\n\n /**\n * Retrieve template as json from a given url\n * @param url\n */\n protected async retrieveTemplate(url: string): Promise<PlaceholderRequestReply> {\n const resolvedUrl$ = this.injector.get(DynamicContentService, null, { optional: true })?.getContentPathStream(url) || of(url);\n const fullUrl = await firstValueFrom(resolvedUrl$);\n return fetch(fullUrl).then((response) => response.json());\n }\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdatePlaceholderBlock[]) {\n const templates = actions.map((action) => ({\n placeholderId: action.placeholderId,\n templateUrl: action.value,\n priority: action.priority || 0\n }));\n\n this.placeholdersActions$.next(templates);\n }\n}\n","import {\n inject,\n Injectable,\n Injector,\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 RulesEngineRunnerService,\n} from '@o3r/rules-engine';\nimport {\n JSONPath,\n} from 'jsonpath-plus';\nimport {\n combineLatest,\n EMPTY,\n from,\n Observable,\n of,\n} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n switchMap,\n take,\n} from 'rxjs/operators';\nimport type {\n PlaceholderLocalizationService,\n} from './placeholder-interfaces';\nimport {\n cancelPlaceholderRequest,\n failPlaceholderRequestEntity,\n type PlaceholderRequestStore,\n type PlaceholderVariable,\n selectPlaceholderRequestEntityUsage,\n setPlaceholderRequestEntityFromUrl,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderTemplateResponseEffect {\n private readonly actions$ = inject(Actions);\n private readonly store = inject<Store<PlaceholderRequestStore>>(Store);\n private readonly rulesEngineService = inject(RulesEngineRunnerService, { optional: true });\n private readonly dynamicContentService = inject(DynamicContentService, { optional: true });\n private readonly injector = inject(Injector);\n // Prefer `@o3r/transloco`, fall back to `@o3r/localization`; both are optional peer dependencies.\n // TODO: use `injectAsync` to resolve the optional `LocalizationService` token once migrated to ng22\n // TODO: remove the dynamic-import fallback and inject the `LocalizationService` from the single supported translation package in v16\n private readonly translationService: Promise<PlaceholderLocalizationService | undefined> = import('@o3r/transloco')\n .then((mod) => this.injector.get(mod.LocalizationService, null) as PlaceholderLocalizationService | null)\n .catch(() => null)\n .then((service) => service ?? import('@o3r/localization')\n .then((mod) => (this.injector.get(mod.LocalizationService, null) as PlaceholderLocalizationService | null) ?? undefined)\n .catch(() => undefined));\n\n /**\n * Set the PlaceholderRequest entity with the reply content, dispatch failPlaceholderRequestEntity if it catches a failure\n * Handles the rendering of the HTML content from the template and creates the combine latest from facts list if needed\n * Disables unused templates refresh if used is false in the store\n */\n public setPlaceholderRequestEntityFromUrl$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setPlaceholderRequestEntityFromUrl),\n fromApiEffectSwitchMapById(\n (templateResponse, action) => {\n const facts = templateResponse.vars ? Object.entries(templateResponse.vars).filter(([, variable]) => variable.type === 'fact') : [];\n const factsStreamsList = this.rulesEngineService\n ? facts.map(([varName, fact]) =>\n this.rulesEngineService!.engine.retrieveOrCreateFactStream(fact.value).pipe(\n map((factValue) => ({\n varName,\n factName: fact.value,\n // eslint-disable-next-line new-cap -- naming convention imposed by jsonpath-plus\n factValue: (fact.path && factValue) ? JSONPath({ wrap: false, json: factValue, path: fact.path }) : factValue\n })),\n distinctUntilChanged((previous, current) => previous.factValue === current.factValue)\n ))\n : [];\n\n const factsStreamsList$ = factsStreamsList.length > 0 ? combineLatest(factsStreamsList) : of([]);\n return combineLatest([factsStreamsList$, this.store.select(selectPlaceholderRequestEntityUsage(action.id)).pipe(distinctUntilChanged())]).pipe(\n switchMap(([factsUsedInTemplate, placeholderRequestUsage]) => {\n if (!placeholderRequestUsage) {\n return EMPTY;\n }\n return this.getRenderedHTML$(templateResponse.template, templateResponse.vars, factsUsedInTemplate).pipe(\n map(({ renderedTemplate, unknownTypeFound }) =>\n // Update instead of set because used already set by the update from url action\n updatePlaceholderRequestEntity({\n entity: {\n ...templateResponse,\n resolvedUrl: action.resolvedUrl,\n id: action.id,\n renderedTemplate,\n unknownTypeFound\n },\n requestId: action.requestId\n })\n )\n );\n }));\n },\n (error, action) => of(failPlaceholderRequestEntity({ ids: [action.id], error, requestId: action.requestId })),\n (requestIdPayload, action) => cancelPlaceholderRequest({ ...requestIdPayload, id: action.id })\n )\n )\n );\n\n /**\n * Renders the html template, replacing facts and urls and localizationKeys\n * @param template\n * @param vars\n * @param facts\n */\n private getRenderedHTML$(template?: string, vars?: Record<string, PlaceholderVariable>, facts?: { varName: string; factName: string; factValue: any }[]) {\n let unknownTypeFound = false;\n const factMapFromVars = (facts || []).reduce((mapping: { [key: string]: any }, fact) => {\n mapping[fact.varName] = fact.factValue;\n return mapping;\n }, {});\n const replacements$: Observable<{ ejsVar: RegExp; value: string } | null>[] = [];\n if (vars && template) {\n for (const varName in vars) {\n if (Object.prototype.hasOwnProperty.call(vars, varName)) {\n const ejsVar = new RegExp(`<%=\\\\s*${varName}\\\\s*%>`, 'g');\n switch (vars[varName].type) {\n case 'relativeUrl': {\n replacements$.push(\n this.dynamicContentService?.getMediaPathStream(vars[varName].value).pipe(\n take(1),\n map((value: string) => ({ ejsVar, value }))\n ) || of({ ejsVar, value: vars[varName].value })\n );\n break;\n }\n case 'fullUrl': {\n template = template.replace(ejsVar, vars[varName].value);\n break;\n }\n case 'fact': {\n template = template.replace(ejsVar, factMapFromVars[varName] ?? '');\n break;\n }\n case 'localisation': {\n const linkedParams = (Object.entries(vars[varName].parameters || {})).reduce((acc: { [key: string]: any }, [paramKey, paramValue]) => {\n acc[paramKey] = factMapFromVars[paramValue];\n return acc;\n }, {});\n replacements$.push(\n from(this.translationService).pipe(\n switchMap((translationService) => translationService\n ? translationService.translate(vars[varName].value, linkedParams).pipe(\n map((value) => (value ? { ejsVar, value } : null))\n )\n : of(null))\n )\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 EnvironmentProviders,\n makeEnvironmentProviders,\n NgModule,\n} from '@angular/core';\nimport {\n EffectsModule,\n provideEffects,\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 providePlaceholderRequestStore,\n providePlaceholderTemplateStore,\n} from '@o3r/components';\n\n/**\n * @deprecated Will be removed in v16. Use {@link providePlaceholderRulesEngineAction} instead.\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/**\n * Provide placeholder rules engine action handler.\n */\nexport function providePlaceholderRulesEngineAction(): EnvironmentProviders {\n return makeEnvironmentProviders([\n providePlaceholderRequestStore(),\n providePlaceholderTemplateStore(),\n provideEffects(PlaceholderTemplateResponseEffect),\n PlaceholderRulesEngineActionHandler\n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CAAkC,qCAP3C,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,EAAA,SAAA,EAJlC;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;;AAGD;;AAEG;SACa,mCAAmC,GAAA;AACjD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,8BAA8B,EAAE;AAChC,QAAA,+BAA+B,EAAE;QACjC,cAAc,CAAC,iCAAiC,CAAC;QACjD;AACD,KAAA,CAAC;AACJ;;AC/CA;;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';\nimport type {\n Observable,\n} from 'rxjs';\n\n/**\n * Minimal subset of the underlying translation service (ngx-translate's `TranslateService` or\n * transloco's `TranslocoService`) exposing language-change notifications.\n * TODO: remove this abstraction and rely on the single supported translation service in v16\n */\nexport interface PlaceholderTranslateService {\n /** Language-change stream exposed by ngx-translate (`@o3r/localization`) */\n onLangChange?: Observable<{ lang: string }>;\n /** Language-change stream exposed by transloco (`@o3r/transloco`) */\n langChanges$?: Observable<string>;\n}\n\n/**\n * Minimal subset of the `LocalizationService` API (from `@o3r/localization` or `@o3r/transloco`)\n * used by the placeholder rules engine. Declared locally so that neither package is a hard dependency.\n * TODO: remove this abstraction and import `LocalizationService` directly from the single supported translation package in v16\n */\nexport interface PlaceholderLocalizationService {\n /** Translate a localization key, resolving the given interpolation parameters */\n translate(key: string, interpolateParams?: object): Observable<string>;\n /** Get the underlying translation service used by the localization service */\n getTranslateService(): PlaceholderTranslateService;\n /** Get the current active language */\n getCurrentLanguage(): string;\n}\n\n/** ActionUpdatePlaceholderBlock */\nexport const RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE = 'UPDATE_PLACEHOLDER';\n\n/**\n * Content of action that updates a placeholder\n */\nexport interface ActionUpdatePlaceholderBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE;\n placeholderId: string;\n value: string;\n priority?: number;\n}\n","import {\n inject,\n Injectable,\n Injector,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n select,\n Store,\n} from '@ngrx/store';\nimport type {\n RulesEngineActionHandler,\n} from '@o3r/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n combineLatest,\n distinctUntilChanged,\n firstValueFrom,\n from,\n map,\n Observable,\n of,\n startWith,\n Subject,\n switchMap,\n withLatestFrom,\n} from 'rxjs';\nimport {\n ActionUpdatePlaceholderBlock,\n type PlaceholderLocalizationService,\n RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE,\n} from './placeholder-interfaces';\nimport {\n deletePlaceholderTemplateEntity,\n PlaceholderRequestReply,\n PlaceholderTemplateStore,\n selectPlaceholderRequestEntities,\n selectPlaceholderTemplateEntities,\n setPlaceholderRequestEntityFromUrl,\n setPlaceholderTemplateEntity,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdatePlaceholderBlock> {\n private readonly logger = inject(LoggerService);\n private readonly injector = inject(Injector);\n // Prefer `@o3r/transloco`, fall back to `@o3r/localization`; both are optional peer dependencies.\n // TODO: use `injectAsync` to resolve the optional `LocalizationService` token once migrated to ng22\n // TODO: remove the dynamic-import fallback and inject the `LocalizationService` from the single supported translation package in v16\n private readonly translationService: Promise<PlaceholderLocalizationService | undefined> = import('@o3r/transloco')\n .then((mod) => this.injector.get(mod.LocalizationService, null) as PlaceholderLocalizationService | null)\n .catch(() => null)\n .then((service) => service ?? import('@o3r/localization')\n .then((mod) => (this.injector.get(mod.LocalizationService, null) as PlaceholderLocalizationService | null) ?? undefined)\n .catch(() => undefined));\n\n protected placeholdersActions$: Subject<{ placeholderId: string; templateUrl: string; priority: number }[]> = new Subject();\n\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_PLACEHOLDER_UPDATE_ACTION_TYPE] as const;\n\n constructor() {\n const store = inject<Store<PlaceholderTemplateStore>>(Store);\n\n const lang$ = from(this.translationService).pipe(\n switchMap((translationService) => {\n if (!translationService) {\n return of(null);\n }\n const translateService = translationService.getTranslateService();\n // `@o3r/localization` (ngx-translate) exposes `onLangChange`, while `@o3r/transloco` (transloco) exposes `langChanges$`\n const langChange$: Observable<string> = translateService.onLangChange\n ? translateService.onLangChange.pipe(map(({ lang }) => lang))\n : translateService.langChanges$!;\n return langChange$.pipe(\n startWith(translationService.getCurrentLanguage()),\n distinctUntilChanged()\n );\n })\n );\n\n const filteredActions$ = combineLatest([\n lang$,\n this.placeholdersActions$.pipe(\n distinctUntilChanged((prev, next) => JSON.stringify(prev) === JSON.stringify(next))\n )\n ]).pipe(\n withLatestFrom(\n combineLatest([store.pipe(select(selectPlaceholderTemplateEntities)), store.pipe(select(selectPlaceholderRequestEntities))])\n ),\n map(([langAndTemplatesUrls, storedPlaceholdersAndRequests]) => {\n const [lang, placeholderActions] = langAndTemplatesUrls;\n const storedPlaceholders = storedPlaceholdersAndRequests[0] || {};\n const storedPlaceholderRequests = storedPlaceholdersAndRequests[1] || {};\n const placeholderNewRequests: { rawUrl: string; resolvedUrl: string }[] = [];\n // Stores all raw Urls used from the current engine execution\n const usedUrls: Record<string, boolean> = {};\n // Get all Urls that needs to be resolved from current rules engine output\n const placeholdersTemplates = placeholderActions.reduce((acc, placeholderAction) => {\n const placeholdersTemplateUrl = {\n rawUrl: placeholderAction.templateUrl,\n priority: placeholderAction.priority\n };\n if (acc[placeholderAction.placeholderId]) {\n acc[placeholderAction.placeholderId].push(placeholdersTemplateUrl);\n } else {\n acc[placeholderAction.placeholderId] = [placeholdersTemplateUrl];\n }\n const resolvedUrl = this.resolveUrlWithLang(placeholderAction.templateUrl, lang);\n // Filters duplicates and resolved urls that are already in the store\n if (!usedUrls[placeholderAction.templateUrl] && (!storedPlaceholderRequests[placeholderAction.templateUrl]\n || storedPlaceholderRequests[placeholderAction.templateUrl]!.resolvedUrl !== resolvedUrl)) {\n placeholderNewRequests.push({\n rawUrl: placeholderAction.templateUrl,\n resolvedUrl: this.resolveUrlWithLang(placeholderAction.templateUrl, lang)\n });\n }\n usedUrls[placeholderAction.templateUrl] = true;\n return acc;\n }, {} as { [key: string]: { rawUrl: string; priority: number }[] });\n // Urls not used anymore and not already disabled\n const placeholderRequestsToDisable: string[] = [];\n // Urls used that were disabled\n const placeholderRequestsToEnable: string[] = [];\n Object.keys(storedPlaceholderRequests).forEach((storedPlaceholderRequestRawUrl) => {\n const usedFromEngineIteration = usedUrls[storedPlaceholderRequestRawUrl];\n const usedFromStore = (storedPlaceholderRequests && storedPlaceholderRequests[storedPlaceholderRequestRawUrl]) ? storedPlaceholderRequests[storedPlaceholderRequestRawUrl].used : false;\n if (!usedFromEngineIteration && usedFromStore) {\n placeholderRequestsToDisable.push(storedPlaceholderRequestRawUrl);\n } else if (usedFromEngineIteration && !usedFromStore) {\n placeholderRequestsToEnable.push(storedPlaceholderRequestRawUrl);\n }\n });\n // Placeholder that are no longer filled by the current engine execution output will be cleared\n const placeholdersTemplatesToBeCleanedUp = Object.keys(storedPlaceholders)\n .filter((placeholderId) => !placeholdersTemplates[placeholderId]);\n\n const placeholdersTemplatesToBeSet = Object.keys(placeholdersTemplates).reduce((changedPlaceholderTemplates, placeholderTemplateId) => {\n // Caching if the placeholder template already exists with the same urls\n if (!storedPlaceholders[placeholderTemplateId]\n || !(JSON.stringify(storedPlaceholders[placeholderTemplateId].urlsWithPriority) === JSON.stringify(placeholdersTemplates[placeholderTemplateId]))) {\n changedPlaceholderTemplates.push({\n id: placeholderTemplateId,\n urlsWithPriority: placeholdersTemplates[placeholderTemplateId]\n });\n }\n return changedPlaceholderTemplates;\n }, [] as { id: string; urlsWithPriority: { rawUrl: string; priority: number }[] }[]);\n return {\n placeholdersTemplatesToBeCleanedUp,\n placeholderRequestsToDisable,\n placeholderRequestsToEnable,\n placeholdersTemplatesToBeSet,\n placeholderNewRequests\n };\n })\n );\n filteredActions$.pipe(takeUntilDestroyed()).subscribe((placeholdersUpdates) => {\n placeholdersUpdates.placeholdersTemplatesToBeCleanedUp.forEach((placeholderId) =>\n store.dispatch(deletePlaceholderTemplateEntity({\n id: placeholderId\n }))\n );\n placeholdersUpdates.placeholdersTemplatesToBeSet.forEach((placeholdersTemplateToBeSet) => {\n store.dispatch(setPlaceholderTemplateEntity({ entity: placeholdersTemplateToBeSet }));\n });\n placeholdersUpdates.placeholderRequestsToDisable.forEach((placeholderRequestToDisable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToDisable, used: false } }));\n });\n placeholdersUpdates.placeholderRequestsToEnable.forEach((placeholderRequestToEnable) => {\n store.dispatch(updatePlaceholderRequestEntity({ entity: { id: placeholderRequestToEnable, used: true } }));\n });\n placeholdersUpdates.placeholderNewRequests.forEach((placeholderNewRequest) => {\n store.dispatch(setPlaceholderRequestEntityFromUrl({\n resolvedUrl: placeholderNewRequest.resolvedUrl,\n id: placeholderNewRequest.rawUrl,\n call: this.retrieveTemplate(placeholderNewRequest.resolvedUrl)\n }));\n });\n });\n }\n\n /**\n * Localize the url, replacing the language marker\n * @param url\n * @param language\n */\n protected resolveUrlWithLang(url: string, language: string | null): string {\n if (!language && url.includes('[LANGUAGE]')) {\n this.logger.warn(`Missing language when trying to resolve ${url}`);\n }\n return language ? url.replace(/\\[LANGUAGE]/g, language) : url;\n }\n\n /**\n * Retrieve template as json from a given url\n * @param url\n */\n protected async retrieveTemplate(url: string): Promise<PlaceholderRequestReply> {\n const resolvedUrl$ = this.injector.get(DynamicContentService, null, { optional: true })?.getContentPathStream(url) || of(url);\n const fullUrl = await firstValueFrom(resolvedUrl$);\n return fetch(fullUrl).then((response) => response.json());\n }\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdatePlaceholderBlock[]) {\n const templates = actions.map((action) => ({\n placeholderId: action.placeholderId,\n templateUrl: action.value,\n priority: action.priority || 0\n }));\n\n this.placeholdersActions$.next(templates);\n }\n}\n","import {\n inject,\n Injectable,\n Injector,\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 RulesEngineRunnerService,\n} from '@o3r/rules-engine';\nimport {\n JSONPath,\n} from 'jsonpath-plus';\nimport {\n combineLatest,\n EMPTY,\n from,\n Observable,\n of,\n} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n switchMap,\n take,\n} from 'rxjs/operators';\nimport type {\n PlaceholderLocalizationService,\n} from './placeholder-interfaces';\nimport {\n cancelPlaceholderRequest,\n failPlaceholderRequestEntity,\n type PlaceholderRequestStore,\n type PlaceholderVariable,\n selectPlaceholderRequestEntityUsage,\n setPlaceholderRequestEntityFromUrl,\n updatePlaceholderRequestEntity,\n} from '@o3r/components';\n\n/**\n * Service to handle async PlaceholderTemplate actions\n */\n@Injectable()\nexport class PlaceholderTemplateResponseEffect {\n private readonly actions$ = inject(Actions);\n private readonly store = inject<Store<PlaceholderRequestStore>>(Store);\n private readonly rulesEngineService = inject(RulesEngineRunnerService, { optional: true });\n private readonly dynamicContentService = inject(DynamicContentService, { optional: true });\n private readonly injector = inject(Injector);\n // Prefer `@o3r/transloco`, fall back to `@o3r/localization`; both are optional peer dependencies.\n // TODO: use `injectAsync` to resolve the optional `LocalizationService` token once migrated to ng22\n // TODO: remove the dynamic-import fallback and inject the `LocalizationService` from the single supported translation package in v16\n private readonly translationService: Promise<PlaceholderLocalizationService | undefined> = import('@o3r/transloco')\n .then((mod) => this.injector.get(mod.LocalizationService, null) as PlaceholderLocalizationService | null)\n .catch(() => null)\n .then((service) => service ?? import('@o3r/localization')\n .then((mod) => (this.injector.get(mod.LocalizationService, null) as PlaceholderLocalizationService | null) ?? undefined)\n .catch(() => undefined));\n\n /**\n * Set the PlaceholderRequest entity with the reply content, dispatch failPlaceholderRequestEntity if it catches a failure\n * Handles the rendering of the HTML content from the template and creates the combine latest from facts list if needed\n * Disables unused templates refresh if used is false in the store\n */\n public setPlaceholderRequestEntityFromUrl$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setPlaceholderRequestEntityFromUrl),\n fromApiEffectSwitchMapById(\n (templateResponse, action) => {\n const facts = templateResponse.vars ? Object.entries(templateResponse.vars).filter(([, variable]) => variable.type === 'fact') : [];\n const factsStreamsList = this.rulesEngineService\n ? facts.map(([varName, fact]) =>\n this.rulesEngineService!.engine.retrieveOrCreateFactStream(fact.value).pipe(\n map((factValue) => ({\n varName,\n factName: fact.value,\n // eslint-disable-next-line new-cap -- naming convention imposed by jsonpath-plus\n factValue: (fact.path && factValue) ? JSONPath({ wrap: false, json: factValue, path: fact.path }) : factValue\n })),\n distinctUntilChanged((previous, current) => previous.factValue === current.factValue)\n ))\n : [];\n\n const factsStreamsList$ = factsStreamsList.length > 0 ? combineLatest(factsStreamsList) : of([]);\n return combineLatest([factsStreamsList$, this.store.select(selectPlaceholderRequestEntityUsage(action.id)).pipe(distinctUntilChanged())]).pipe(\n switchMap(([factsUsedInTemplate, placeholderRequestUsage]) => {\n if (!placeholderRequestUsage) {\n return EMPTY;\n }\n return this.getRenderedHTML$(templateResponse.template, templateResponse.vars, factsUsedInTemplate).pipe(\n map(({ renderedTemplate, unknownTypeFound }) =>\n // Update instead of set because used already set by the update from url action\n updatePlaceholderRequestEntity({\n entity: {\n ...templateResponse,\n resolvedUrl: action.resolvedUrl,\n id: action.id,\n renderedTemplate,\n unknownTypeFound\n },\n requestId: action.requestId\n })\n )\n );\n }));\n },\n (error, action) => of(failPlaceholderRequestEntity({ ids: [action.id], error, requestId: action.requestId })),\n (requestIdPayload, action) => cancelPlaceholderRequest({ ...requestIdPayload, id: action.id })\n )\n )\n );\n\n /**\n * Renders the html template, replacing facts and urls and localizationKeys\n * @param template\n * @param vars\n * @param facts\n */\n private getRenderedHTML$(template?: string, vars?: Record<string, PlaceholderVariable>, facts?: { varName: string; factName: string; factValue: any }[]) {\n let unknownTypeFound = false;\n const factMapFromVars = (facts || []).reduce((mapping: { [key: string]: any }, fact) => {\n mapping[fact.varName] = fact.factValue;\n return mapping;\n }, {});\n const replacements$: Observable<{ ejsVar: RegExp; value: string } | null>[] = [];\n if (vars && template) {\n for (const varName in vars) {\n if (Object.prototype.hasOwnProperty.call(vars, varName)) {\n const ejsVar = new RegExp(`<%=\\\\s*${varName}\\\\s*%>`, 'g');\n switch (vars[varName].type) {\n case 'relativeUrl': {\n replacements$.push(\n this.dynamicContentService?.getMediaPathStream(vars[varName].value).pipe(\n take(1),\n map((value: string) => ({ ejsVar, value }))\n ) || of({ ejsVar, value: vars[varName].value })\n );\n break;\n }\n case 'fullUrl': {\n template = template.replace(ejsVar, vars[varName].value);\n break;\n }\n case 'fact': {\n template = template.replace(ejsVar, factMapFromVars[varName] ?? '');\n break;\n }\n case 'localisation': {\n const linkedParams = (Object.entries(vars[varName].parameters || {})).reduce((acc: { [key: string]: any }, [paramKey, paramValue]) => {\n acc[paramKey] = factMapFromVars[paramValue];\n return acc;\n }, {});\n replacements$.push(\n from(this.translationService).pipe(\n switchMap((translationService) => translationService\n ? translationService.translate(vars[varName].value, linkedParams).pipe(\n map((value) => (value ? { ejsVar, value } : null))\n )\n : of(null))\n )\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 EnvironmentProviders,\n makeEnvironmentProviders,\n NgModule,\n} from '@angular/core';\nimport {\n EffectsModule,\n provideEffects,\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 providePlaceholderRequestStore,\n providePlaceholderTemplateStore,\n} from '@o3r/components';\n\n/**\n * @deprecated Will be removed in v16. Use {@link providePlaceholderRulesEngineAction} instead.\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/**\n * Provide placeholder rules engine action handler.\n */\nexport function providePlaceholderRulesEngineAction(): EnvironmentProviders {\n return makeEnvironmentProviders([\n providePlaceholderRequestStore(),\n providePlaceholderTemplateStore(),\n provideEffects(PlaceholderTemplateResponseEffect),\n PlaceholderRulesEngineActionHandler\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["map","distinctUntilChanged","switchMap"],"mappings":";;;;;;;;;;;;;;;AAiCA;AACO,MAAM,2CAA2C,GAAG;;ACgB3D;;AAEG;MAEU,mCAAmC,CAAA;AAkB9C,IAAA,WAAA,GAAA;AAjBiB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AAC9B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;;;;AAI3B,QAAA,IAAA,CAAA,kBAAkB,GAAwD,OAAO,gBAAgB;AAC/G,aAAA,IAAI,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAA0C;AACvG,aAAA,KAAK,CAAC,MAAM,IAAI;aAChB,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,IAAI,OAAO,mBAAmB;aACrD,IAAI,CAAC,CAAC,GAAG,KAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAA2C,IAAI,SAAS;AACtH,aAAA,KAAK,CAAC,MAAM,SAAS,CAAC,CAAC;AAElB,QAAA,IAAA,CAAA,oBAAoB,GAAgF,IAAI,OAAO,EAAE;;AAG3G,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,2CAA2C,CAAU;AAGxF,QAAA,MAAM,KAAK,GAAG,MAAM,CAAkC,KAAK,CAAC;AAE5D,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAC9C,SAAS,CAAC,CAAC,kBAAkB,KAAI;YAC/B,IAAI,CAAC,kBAAkB,EAAE;AACvB,gBAAA,OAAO,E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,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,qCAP3C,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,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,EAAA,SAAA,EAJlC;YACT;AACD,SAAA,EAAA,OAAA,EAAA,CANC,aAAa,CAAC,UAAU,CAAC,CAAC,iCAAiC,CAAC,CAAC;YAC7D,6BAA6B;YAC7B,8BAA8B,CAAA,EAAA,CAAA,CAAA;;2FAMrB,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;;AAGD;;AAEG;SACa,mCAAmC,GAAA;AACjD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,8BAA8B,EAAE;AAChC,QAAA,+BAA+B,EAAE;QACjC,cAAc,CAAC,iCAAiC,CAAC;QACjD;AACD,KAAA,CAAC;AACJ;;AC/CA;;AAEG;;;;"}
@@ -161,13 +161,13 @@ class PlaceholderRequestStoreModule {
161
161
  ]
162
162
  };
163
163
  }
164
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRequestStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
165
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRequestStoreModule, imports: [i1.StoreFeatureModule] }); }
166
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRequestStoreModule, providers: [
164
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRequestStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
165
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRequestStoreModule, imports: [i1.StoreFeatureModule] }); }
166
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRequestStoreModule, providers: [
167
167
  { provide: PLACEHOLDER_REQUEST_REDUCER_TOKEN, useFactory: getDefaultplaceholderRequestReducer }
168
168
  ], imports: [StoreModule.forFeature(PLACEHOLDER_REQUEST_STORE_NAME, PLACEHOLDER_REQUEST_REDUCER_TOKEN)] }); }
169
169
  }
170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderRequestStoreModule, decorators: [{
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderRequestStoreModule, decorators: [{
171
171
  type: NgModule,
172
172
  args: [{
173
173
  imports: [
@@ -284,13 +284,13 @@ class PlaceholderTemplateStoreModule {
284
284
  ]
285
285
  };
286
286
  }
287
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderTemplateStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
288
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderTemplateStoreModule, imports: [i1.StoreFeatureModule] }); }
289
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderTemplateStoreModule, providers: [
287
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderTemplateStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
288
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderTemplateStoreModule, imports: [i1.StoreFeatureModule] }); }
289
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderTemplateStoreModule, providers: [
290
290
  { provide: PLACEHOLDER_TEMPLATE_REDUCER_TOKEN, useFactory: getDefaultPlaceholderTemplateReducer }
291
291
  ], imports: [StoreModule.forFeature(PLACEHOLDER_TEMPLATE_STORE_NAME, PLACEHOLDER_TEMPLATE_REDUCER_TOKEN)] }); }
292
292
  }
293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderTemplateStoreModule, decorators: [{
293
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderTemplateStoreModule, decorators: [{
294
294
  type: NgModule,
295
295
  args: [{
296
296
  imports: [
@@ -725,10 +725,10 @@ class HighlightService {
725
725
  this.singleRun = false;
726
726
  }
727
727
  }
728
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: HighlightService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
729
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: HighlightService, providedIn: 'root' }); }
728
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: HighlightService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
729
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: HighlightService, providedIn: 'root' }); }
730
730
  }
731
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: HighlightService, decorators: [{
731
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: HighlightService, decorators: [{
732
732
  type: Injectable,
733
733
  args: [{
734
734
  providedIn: 'root'
@@ -1137,10 +1137,10 @@ class ComponentsDevtoolsMessageService {
1137
1137
  this.inspectorService.otterLikeComponentInfoToBeSent$
1138
1138
  .pipe(takeUntilDestroyed(this.destroyRef), filter((info) => !!info)).subscribe((info) => this.sendMessage('selectedComponentInfo', info));
1139
1139
  }
1140
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ComponentsDevtoolsMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1141
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ComponentsDevtoolsMessageService, providedIn: 'root' }); }
1140
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ComponentsDevtoolsMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1141
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ComponentsDevtoolsMessageService, providedIn: 'root' }); }
1142
1142
  }
1143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ComponentsDevtoolsMessageService, decorators: [{
1143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ComponentsDevtoolsMessageService, decorators: [{
1144
1144
  type: Injectable,
1145
1145
  args: [{
1146
1146
  providedIn: 'root'
@@ -1164,16 +1164,16 @@ class ComponentsDevtoolsModule {
1164
1164
  ]
1165
1165
  };
1166
1166
  }
1167
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ComponentsDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1168
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: ComponentsDevtoolsModule, imports: [StoreModule,
1167
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ComponentsDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1168
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: ComponentsDevtoolsModule, imports: [StoreModule,
1169
1169
  PlaceholderTemplateStoreModule] }); }
1170
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ComponentsDevtoolsModule, providers: [
1170
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ComponentsDevtoolsModule, providers: [
1171
1171
  { provide: OTTER_COMPONENTS_DEVTOOLS_OPTIONS, useValue: OTTER_COMPONENTS_DEVTOOLS_DEFAULT_OPTIONS },
1172
1172
  ComponentsDevtoolsMessageService
1173
1173
  ], imports: [StoreModule,
1174
1174
  PlaceholderTemplateStoreModule] }); }
1175
1175
  }
1176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ComponentsDevtoolsModule, decorators: [{
1176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ComponentsDevtoolsModule, decorators: [{
1177
1177
  type: NgModule,
1178
1178
  args: [{
1179
1179
  imports: [
@@ -1312,8 +1312,8 @@ class C11nDirective {
1312
1312
  this.componentRef.destroy();
1313
1313
  }
1314
1314
  }
1315
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1316
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.18", type: C11nDirective, isStandalone: true, selector: "[c11n]", inputs: { component: "component", config: "config", formControl: "formControl", inputs: "inputs", outputs: "outputs" }, providers: [
1315
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1316
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: C11nDirective, isStandalone: true, selector: "[c11n]", inputs: { component: "component", config: "config", formControl: "formControl", inputs: "inputs", outputs: "outputs" }, providers: [
1317
1317
  {
1318
1318
  provide: NG_VALUE_ACCESSOR,
1319
1319
  useExisting: forwardRef((() => C11nDirective)),
@@ -1326,7 +1326,7 @@ class C11nDirective {
1326
1326
  }
1327
1327
  ], usesOnChanges: true, ngImport: i0 }); }
1328
1328
  }
1329
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nDirective, decorators: [{
1329
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nDirective, decorators: [{
1330
1330
  type: Directive,
1331
1331
  args: [{
1332
1332
  selector: '[c11n]',
@@ -1394,25 +1394,24 @@ class C11nService {
1394
1394
  return typeof presenterConfig === 'string' && presenterConfig !== '' ? (this.presentersMap.get(presenterConfig) || defaultPres) : defaultPres;
1395
1395
  }));
1396
1396
  }
1397
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1398
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nService }); }
1397
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1398
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nService }); }
1399
1399
  }
1400
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nService, decorators: [{
1400
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nService, decorators: [{
1401
1401
  type: Injectable
1402
1402
  }] });
1403
1403
 
1404
1404
  /** C11n directive mock */
1405
1405
  class MockC11nDirective {
1406
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: MockC11nDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1407
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.18", type: MockC11nDirective, isStandalone: false, selector: "[c11n]", inputs: { config: "config", component: "component", inputs: "inputs", outputs: "outputs" }, ngImport: i0 }); }
1406
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MockC11nDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1407
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: MockC11nDirective, isStandalone: true, selector: "[c11n]", inputs: { config: "config", component: "component", inputs: "inputs", outputs: "outputs" }, ngImport: i0 }); }
1408
1408
  }
1409
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: MockC11nDirective, decorators: [{
1409
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MockC11nDirective, decorators: [{
1410
1410
  type: Directive,
1411
1411
  args: [{
1412
1412
  selector: '[c11n]',
1413
1413
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property -- mocked directive
1414
- inputs: ['config', 'component', 'inputs', 'outputs'],
1415
- standalone: false
1414
+ inputs: ['config', 'component', 'inputs', 'outputs']
1416
1415
  }]
1417
1416
  }] });
1418
1417
  /** C11n service mock */
@@ -1421,10 +1420,10 @@ class C11nMockService {
1421
1420
  getPresenter(_defaultPres, _presKey) {
1422
1421
  return (source) => source.pipe(mapTo(null));
1423
1422
  }
1424
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nMockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1425
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nMockService }); }
1423
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nMockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1424
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nMockService }); }
1426
1425
  }
1427
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nMockService, decorators: [{
1426
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nMockService, decorators: [{
1428
1427
  type: Injectable
1429
1428
  }] });
1430
1429
  /**
@@ -1432,25 +1431,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImpo
1432
1431
  * @deprecated Will be removed in v16. Use {@link provideC11nMock} and import `MockC11nDirective` directly instead.
1433
1432
  */
1434
1433
  class C11nMockModule {
1435
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1436
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: C11nMockModule, declarations: [MockC11nDirective], exports: [MockC11nDirective] }); }
1437
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nMockModule, providers: [{ provide: C11nService, useClass: C11nMockService }] }); }
1434
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1435
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: C11nMockModule, imports: [MockC11nDirective] }); }
1436
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nMockModule, providers: [{ provide: C11nService, useClass: C11nMockService }] }); }
1438
1437
  }
1439
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: C11nMockModule, decorators: [{
1438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: C11nMockModule, decorators: [{
1440
1439
  type: NgModule,
1441
1440
  args: [{
1442
- declarations: [MockC11nDirective],
1443
- exports: [MockC11nDirective],
1441
+ imports: [MockC11nDirective],
1444
1442
  providers: [{ provide: C11nService, useClass: C11nMockService }]
1445
1443
  }]
1446
1444
  }] });
1447
1445
  /**
1448
- * Provide C11n mock service for testing.
1446
+ * Provide C11n mock service for unit testing.
1449
1447
  */
1450
1448
  function provideC11nMock() {
1451
- return [
1449
+ return makeEnvironmentProviders([
1452
1450
  { provide: C11nService, useClass: C11nMockService }
1453
- ];
1451
+ ]);
1454
1452
  }
1455
1453
 
1456
1454
  /**
@@ -1506,10 +1504,10 @@ class O3rCapitalizePipe {
1506
1504
  const firstLetter = val && val.charAt(0);
1507
1505
  return firstLetter ? firstLetter.toUpperCase() + val.slice(1) : value;
1508
1506
  }
1509
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: O3rCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1510
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: O3rCapitalizePipe, isStandalone: true, name: "o3rCapitalize" }); }
1507
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: O3rCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1508
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: O3rCapitalizePipe, isStandalone: true, name: "o3rCapitalize" }); }
1511
1509
  }
1512
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: O3rCapitalizePipe, decorators: [{
1510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: O3rCapitalizePipe, decorators: [{
1513
1511
  type: Pipe,
1514
1512
  args: [{ name: 'o3rCapitalize' }]
1515
1513
  }] });
@@ -1589,10 +1587,10 @@ class O3rDurationPipe {
1589
1587
  return result.replace(matchedPatternToReplace, padded);
1590
1588
  }, pattern);
1591
1589
  }
1592
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: O3rDurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1593
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: O3rDurationPipe, isStandalone: true, name: "o3rDuration" }); }
1590
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: O3rDurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1591
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: O3rDurationPipe, isStandalone: true, name: "o3rDuration" }); }
1594
1592
  }
1595
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: O3rDurationPipe, decorators: [{
1593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: O3rDurationPipe, decorators: [{
1596
1594
  type: Pipe,
1597
1595
  args: [{ name: 'o3rDuration' }]
1598
1596
  }] });
@@ -1601,10 +1599,10 @@ class O3rKeepWhiteSpacePipe {
1601
1599
  transform(value) {
1602
1600
  return value.replace(/\s/g, '&nbsp;');
1603
1601
  }
1604
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: O3rKeepWhiteSpacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1605
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: O3rKeepWhiteSpacePipe, isStandalone: true, name: "o3rKeepWhiteSpace" }); }
1602
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: O3rKeepWhiteSpacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1603
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: O3rKeepWhiteSpacePipe, isStandalone: true, name: "o3rKeepWhiteSpace" }); }
1606
1604
  }
1607
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: O3rKeepWhiteSpacePipe, decorators: [{
1605
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: O3rKeepWhiteSpacePipe, decorators: [{
1608
1606
  type: Pipe,
1609
1607
  args: [{ name: 'o3rKeepWhiteSpace' }]
1610
1608
  }] });
@@ -1620,10 +1618,10 @@ class O3rReplaceWithBoldPipe {
1620
1618
  return value;
1621
1619
  }
1622
1620
  }
1623
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: O3rReplaceWithBoldPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1624
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: O3rReplaceWithBoldPipe, isStandalone: true, name: "o3rReplaceWithBold" }); }
1621
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: O3rReplaceWithBoldPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1622
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: O3rReplaceWithBoldPipe, isStandalone: true, name: "o3rReplaceWithBold" }); }
1625
1623
  }
1626
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: O3rReplaceWithBoldPipe, decorators: [{
1624
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: O3rReplaceWithBoldPipe, decorators: [{
1627
1625
  type: Pipe,
1628
1626
  args: [{ name: 'o3rReplaceWithBold' }]
1629
1627
  }] });
@@ -1689,10 +1687,10 @@ class PlaceholderComponent {
1689
1687
  this.messages$.complete();
1690
1688
  this.afterViewInit$.complete();
1691
1689
  }
1692
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1693
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: PlaceholderComponent, isStandalone: true, selector: "o3r-placeholder", inputs: { id: "id" }, host: { properties: { "class.debug": "mode() === 'debug'" } }, ngImport: i0, template: "<ng-template #projection>\n <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: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1690
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1691
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: PlaceholderComponent, isStandalone: true, selector: "o3r-placeholder", inputs: { id: "id" }, host: { properties: { "class.debug": "mode() === 'debug'" } }, ngImport: i0, template: "<ng-template #projection>\n <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: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1694
1692
  }
1695
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderComponent, decorators: [{
1693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderComponent, decorators: [{
1696
1694
  type: Component,
1697
1695
  args: [{ selector: 'o3r-placeholder', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
1698
1696
  AsyncPipe,
@@ -1708,18 +1706,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImpo
1708
1706
  * @deprecated Will be removed in v16. Use {@link providePlaceholder} and import `PlaceholderComponent` directly instead.
1709
1707
  */
1710
1708
  class PlaceholderModule {
1711
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1712
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderModule, imports: [CommonModule,
1709
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1710
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderModule, imports: [CommonModule,
1713
1711
  StoreModule,
1714
1712
  PlaceholderTemplateStoreModule,
1715
1713
  PlaceholderRequestStoreModule,
1716
1714
  PlaceholderComponent] }); }
1717
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderModule, imports: [CommonModule,
1715
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderModule, imports: [CommonModule,
1718
1716
  StoreModule,
1719
1717
  PlaceholderTemplateStoreModule,
1720
1718
  PlaceholderRequestStoreModule] }); }
1721
1719
  }
1722
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: PlaceholderModule, decorators: [{
1720
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PlaceholderModule, decorators: [{
1723
1721
  type: NgModule,
1724
1722
  args: [{
1725
1723
  imports: [