@o3r/dynamic-content 10.0.0-next.9 → 11.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +1 -1
  2. package/esm2022/public_api.mjs +1 -1
  3. package/esm2022/rules-engine/asset.handler-action.mjs +30 -0
  4. package/esm2022/rules-engine/asset.interfaces.mjs +3 -0
  5. package/esm2022/rules-engine/asset.rules-engine.module.mjs +23 -0
  6. package/esm2022/rules-engine/o3r-dynamic-content-rules-engine.mjs +5 -0
  7. package/esm2022/rules-engine/public_api.mjs +4 -0
  8. package/esm2022/services/dynamic-content/dynamic-content.module.mjs +5 -6
  9. package/esm2022/services/dynamic-content/dynamic-content.pipe.mjs +5 -5
  10. package/esm2022/services/dynamic-content/dynamic-content.service.mjs +15 -13
  11. package/esm2022/services/index.mjs +2 -1
  12. package/esm2022/services/request-parameters/request-parameters.module.mjs +4 -4
  13. package/esm2022/services/request-parameters/request-parameters.service.mjs +6 -17
  14. package/esm2022/services/styling/index.mjs +3 -0
  15. package/esm2022/services/styling/style-lazy-loader.module.mjs +15 -0
  16. package/esm2022/services/styling/style-lazy-loader.service.mjs +57 -0
  17. package/esm2022/stores/asset-path-override/asset-path-override.module.mjs +4 -4
  18. package/esm2022/stores/asset-path-override/asset-path-override.sync.mjs +1 -2
  19. package/fesm2022/o3r-dynamic-content-rules-engine.mjs +57 -0
  20. package/fesm2022/o3r-dynamic-content-rules-engine.mjs.map +1 -0
  21. package/fesm2022/o3r-dynamic-content.mjs +101 -49
  22. package/fesm2022/o3r-dynamic-content.mjs.map +1 -1
  23. package/package.json +17 -11
  24. package/rules-engine/asset.handler-action.d.ts +19 -0
  25. package/rules-engine/asset.handler-action.d.ts.map +1 -0
  26. package/rules-engine/asset.interfaces.d.ts +12 -0
  27. package/rules-engine/asset.interfaces.d.ts.map +1 -0
  28. package/rules-engine/asset.rules-engine.module.d.ts +8 -0
  29. package/rules-engine/asset.rules-engine.module.d.ts.map +1 -0
  30. package/rules-engine/index.d.ts +6 -0
  31. package/rules-engine/o3r-dynamic-content-rules-engine.d.ts.map +1 -0
  32. package/rules-engine/public_api.d.ts +4 -0
  33. package/rules-engine/public_api.d.ts.map +1 -0
  34. package/schemas/rules-engine.asset-action.schema.json +26 -0
  35. package/schematics/ng-add/schema.json +1 -1
  36. package/services/dynamic-content/dynamic-content.module.d.ts +0 -1
  37. package/services/dynamic-content/dynamic-content.module.d.ts.map +1 -1
  38. package/services/dynamic-content/dynamic-content.pipe.d.ts +2 -2
  39. package/services/dynamic-content/dynamic-content.pipe.d.ts.map +1 -1
  40. package/services/dynamic-content/dynamic-content.service.d.ts +10 -8
  41. package/services/dynamic-content/dynamic-content.service.d.ts.map +1 -1
  42. package/services/index.d.ts +1 -0
  43. package/services/index.d.ts.map +1 -1
  44. package/services/request-parameters/request-parameters.service.d.ts +1 -12
  45. package/services/request-parameters/request-parameters.service.d.ts.map +1 -1
  46. package/services/styling/index.d.ts +3 -0
  47. package/services/styling/index.d.ts.map +1 -0
  48. package/services/styling/style-lazy-loader.module.d.ts +8 -0
  49. package/services/styling/style-lazy-loader.module.d.ts.map +1 -0
  50. package/services/styling/style-lazy-loader.service.d.ts +38 -0
  51. package/services/styling/style-lazy-loader.service.d.ts.map +1 -0
  52. package/stores/asset-path-override/asset-path-override.sync.d.ts +0 -1
  53. package/stores/asset-path-override/asset-path-override.sync.d.ts.map +1 -1
  54. package/schematics/package.json +0 -3
@@ -1,7 +1,6 @@
1
1
  import { assetPathOverrideInitialState } from './asset-path-override.reducer';
2
2
  /**
3
3
  * Deserializer
4
- *
5
4
  * @param rawObject
6
5
  */
7
6
  export const assetPathOverrideStorageDeserializer = (rawObject) => {
@@ -13,4 +12,4 @@ export const assetPathOverrideStorageDeserializer = (rawObject) => {
13
12
  export const assetPathOverrideStorageSync = {
14
13
  deserialize: assetPathOverrideStorageDeserializer
15
14
  };
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZX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mlkZUluaXRpYWxTdGF0ZSB9IGZyb20gJy4vYXNzZXQtcGF0aC1vdmVycmlkZS5yZWR1Y2VyJztcbmltcG9ydCB7IEFzc2V0UGF0aE92ZXJyaWRlU3RhdGUgfSBmcm9tICcuL2Fzc2V0LXBhdGgtb3ZlcnJpZGUuc3RhdGUnO1xuXG4vKipcbiAqIERlc2VyaWFsaXplclxuICogQHBhcmFtIHJhd09iamVjdFxuICovXG5leHBvcnQgY29uc3QgYXNzZXRQYXRoT3ZlcnJpZGVTdG9yYWdlRGVzZXJpYWxpemVyID0gKHJhd09iamVjdDogYW55KSA9PiB7XG4gIGlmICghcmF3T2JqZWN0KSB7XG4gICAgcmV0dXJuIGFzc2V0UGF0aE92ZXJyaWRlSW5pdGlhbFN0YXRlO1xuICB9XG4gIHJldHVybiByYXdPYmplY3Q7XG59O1xuXG5leHBvcnQgY29uc3QgYXNzZXRQYXRoT3ZlcnJpZGVTdG9yYWdlU3luYzogU2VyaWFsaXplcjxBc3NldFBhdGhPdmVycmlkZVN0YXRlPiA9IHtcbiAgZGVzZXJpYWxpemU6IGFzc2V0UGF0aE92ZXJyaWRlU3RvcmFnZURlc2VyaWFsaXplclxufTtcbiJdfQ==
@@ -0,0 +1,57 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, NgModule } from '@angular/core';
3
+ import * as i1 from '@ngrx/store';
4
+ import { setAssetPathOverride, AssetPathOverrideStoreModule } from '@o3r/dynamic-content';
5
+
6
+ /** ActionUpdateAssetBlock */
7
+ const RULES_ENGINE_ASSET_UPDATE_ACTION_TYPE = 'UPDATE_ASSET';
8
+
9
+ /**
10
+ * Service to handle async Asset actions
11
+ */
12
+ class AssetRulesEngineActionHandler {
13
+ constructor(store) {
14
+ this.store = store;
15
+ /** @inheritdoc */
16
+ this.supportingActions = [RULES_ENGINE_ASSET_UPDATE_ACTION_TYPE];
17
+ }
18
+ /** @inheritdoc */
19
+ executeActions(actions) {
20
+ const assetPathOverrides = actions.reduce((acc, { asset, value }) => {
21
+ acc[asset] = value;
22
+ return acc;
23
+ }, {});
24
+ this.store.dispatch(setAssetPathOverride({ state: { assetPathOverrides } }));
25
+ }
26
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AssetRulesEngineActionHandler, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
27
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AssetRulesEngineActionHandler }); }
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AssetRulesEngineActionHandler, decorators: [{
30
+ type: Injectable
31
+ }], ctorParameters: () => [{ type: i1.Store }] });
32
+
33
+ class AssetRulesEngineActionModule {
34
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AssetRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
35
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: AssetRulesEngineActionModule, imports: [AssetPathOverrideStoreModule] }); }
36
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AssetRulesEngineActionModule, providers: [
37
+ AssetRulesEngineActionHandler
38
+ ], imports: [AssetPathOverrideStoreModule] }); }
39
+ }
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AssetRulesEngineActionModule, decorators: [{
41
+ type: NgModule,
42
+ args: [{
43
+ imports: [
44
+ AssetPathOverrideStoreModule
45
+ ],
46
+ providers: [
47
+ AssetRulesEngineActionHandler
48
+ ]
49
+ }]
50
+ }] });
51
+
52
+ /**
53
+ * Generated bundle index. Do not edit.
54
+ */
55
+
56
+ export { AssetRulesEngineActionHandler, AssetRulesEngineActionModule, RULES_ENGINE_ASSET_UPDATE_ACTION_TYPE };
57
+ //# sourceMappingURL=o3r-dynamic-content-rules-engine.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"o3r-dynamic-content-rules-engine.mjs","sources":["../../src/rules-engine/asset.interfaces.ts","../../src/rules-engine/asset.handler-action.ts","../../src/rules-engine/asset.rules-engine.module.ts","../../src/rules-engine/o3r-dynamic-content-rules-engine.ts"],"sourcesContent":["import type { RulesEngineAction } from '@o3r/core';\n\n/** ActionUpdateAssetBlock */\nexport const RULES_ENGINE_ASSET_UPDATE_ACTION_TYPE = 'UPDATE_ASSET';\n\n/**\n * Content of action that updates asset\n */\nexport interface ActionUpdateAssetBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_ASSET_UPDATE_ACTION_TYPE;\n asset: string;\n value: string;\n}\n","import { Injectable } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport type { RulesEngineActionHandler } from '@o3r/core';\nimport { AssetPathOverrideStore, setAssetPathOverride } from '@o3r/dynamic-content';\nimport { ActionUpdateAssetBlock, RULES_ENGINE_ASSET_UPDATE_ACTION_TYPE } from './asset.interfaces';\n\n/**\n * Service to handle async Asset actions\n */\n@Injectable()\nexport class AssetRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdateAssetBlock> {\n\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_ASSET_UPDATE_ACTION_TYPE] as const;\n\n constructor(private readonly store: Store<AssetPathOverrideStore>) {\n }\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdateAssetBlock[]): void | Promise<void> {\n const assetPathOverrides = actions.reduce<Record<string, string>>((acc, { asset, value }) => {\n acc[asset] = value;\n return acc;\n }, {});\n\n this.store.dispatch(setAssetPathOverride({ state: { assetPathOverrides } }));\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AssetPathOverrideStoreModule } from '@o3r/dynamic-content';\nimport { AssetRulesEngineActionHandler } from './asset.handler-action';\n\n@NgModule({\n imports: [\n AssetPathOverrideStoreModule\n ],\n providers: [\n AssetRulesEngineActionHandler\n ]\n})\nexport class AssetRulesEngineActionModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAEA;AACO,MAAM,qCAAqC,GAAG;;ACGrD;;AAEG;MAEU,6BAA6B,CAAA;AAKxC,IAAA,WAAA,CAA6B,KAAoC,EAAA;QAApC,IAAK,CAAA,KAAA,GAAL,KAAK,CAA+B;;AAFjD,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,qCAAqC,CAAU,CAAC;KAGpF;;AAGM,IAAA,cAAc,CAAC,OAAiC,EAAA;AACrD,QAAA,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAyB,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAI;AAC1F,YAAA,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AACnB,YAAA,OAAO,GAAG,CAAC;SACZ,EAAE,EAAE,CAAC,CAAC;AAEP,QAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC,CAAC;KAC9E;iIAhBU,6BAA6B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,KAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;qIAA7B,6BAA6B,EAAA,CAAA,CAAA,EAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBADzC,UAAU;;;MCGE,4BAA4B,CAAA;iIAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAA5B,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,4BAA4B,YANrC,4BAA4B,CAAA,EAAA,CAAA,CAAA,EAAA;AAMnB,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,4BAA4B,EAJ5B,SAAA,EAAA;YACT,6BAA6B;AAC9B,SAAA,EAAA,OAAA,EAAA,CAJC,4BAA4B,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAMnB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBARxC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,4BAA4B;AAC7B,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT,6BAA6B;AAC9B,qBAAA;AACF,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, NgModule, Injectable, Inject, Optional, Pipe } from '@angular/core';
3
3
  import * as i1 from '@ngrx/store';
4
- import { createAction, props, on, createReducer, StoreModule, createFeatureSelector, createSelector, select } from '@ngrx/store';
5
- import { of } from 'rxjs';
4
+ import { props, createAction, on, createReducer, StoreModule, createFeatureSelector, createSelector, select } from '@ngrx/store';
5
+ import { of, firstValueFrom } from 'rxjs';
6
6
  import { map, distinctUntilChanged, shareReplay } from 'rxjs/operators';
7
7
 
8
8
  /** Actions */
@@ -47,13 +47,13 @@ class AssetPathOverrideStoreModule {
47
47
  ]
48
48
  };
49
49
  }
50
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: AssetPathOverrideStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
51
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.0", ngImport: i0, type: AssetPathOverrideStoreModule, imports: [i1.StoreFeatureModule] }); }
52
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: AssetPathOverrideStoreModule, providers: [
50
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AssetPathOverrideStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
51
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: AssetPathOverrideStoreModule, imports: [i1.StoreFeatureModule] }); }
52
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AssetPathOverrideStoreModule, providers: [
53
53
  { provide: ASSET_PATH_OVERRIDE_REDUCER_TOKEN, useFactory: getDefaultAssetPathOverrideReducer }
54
54
  ], imports: [StoreModule.forFeature(ASSET_PATH_OVERRIDE_STORE_NAME, ASSET_PATH_OVERRIDE_REDUCER_TOKEN)] }); }
55
55
  }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: AssetPathOverrideStoreModule, decorators: [{
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: AssetPathOverrideStoreModule, decorators: [{
57
57
  type: NgModule,
58
58
  args: [{
59
59
  imports: [
@@ -72,7 +72,6 @@ const selectAssetPathOverride = createSelector(selectAssetPathOverrideState, (st
72
72
 
73
73
  /**
74
74
  * Deserializer
75
- *
76
75
  * @param rawObject
77
76
  */
78
77
  const assetPathOverrideStorageDeserializer = (rawObject) => {
@@ -122,10 +121,11 @@ class DynamicContentService {
122
121
  /**
123
122
  * Gets the full path of a content relative to the root
124
123
  * Content path doesn't consider any override, you will always get the same file
125
- *
126
- * @example getMediaPath('assets/imgs/my-image.png') will give you the basePath + 'assets/imgs/my-image.png'
127
- *
128
124
  * @param assetPath asset location in the root folder
125
+ * @example
126
+ * ```typescript
127
+ * getMediaPath('assets/imgs/my-image.png') // will give you the basePath + 'assets/imgs/my-image.png'
128
+ * ```
129
129
  */
130
130
  getContentPathStream(assetPath) {
131
131
  return of(this.getContentPath(assetPath));
@@ -134,23 +134,24 @@ class DynamicContentService {
134
134
  * Gets the stream that provides the full path of a media content
135
135
  * A Media content is always stored in the 'assets' media folder, no external content will be accessible through this function
136
136
  * If any override is applied to the content, returns the override path instead
137
- *
138
- * @example getMediaPathStream('imgs/my-image.png') will give you the basePath + mediaFolder + 'imgs/my-image.png'
139
- *
140
137
  * @param assetPath asset location in the media folder (e.g imgs/my-image.png)
138
+ * @example
139
+ * ```typescript
140
+ * getMediaPathStream('imgs/my-image.png') // will give you the basePath + mediaFolder + 'imgs/my-image.png'
141
+ * ```
141
142
  */
142
143
  getMediaPathStream(assetPath) {
143
144
  if (!this.store) {
144
145
  return of(this.getMediaPath(assetPath));
145
146
  }
146
- return this.store.pipe(select(selectAssetPathOverride), map((entities) => assetPath && entities && entities[assetPath] ? entities[assetPath] : assetPath), map((finalAssetPath) => this.getMediaPath(finalAssetPath)), distinctUntilChanged(), shareReplay(1));
147
+ return this.store.pipe(select(selectAssetPathOverride), map((entities) => assetPath && entities && entities[assetPath] ? entities[assetPath] : assetPath), map((finalAssetPath) => this.getMediaPath(finalAssetPath)), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
147
148
  }
148
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DynamicContentService, deps: [{ token: DYNAMIC_CONTENT_BASE_PATH_TOKEN }, { token: CMS_ASSETS_PATH_TOKEN }, { token: i1.Store, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
149
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DynamicContentService }); }
149
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DynamicContentService, deps: [{ token: DYNAMIC_CONTENT_BASE_PATH_TOKEN }, { token: CMS_ASSETS_PATH_TOKEN }, { token: i1.Store, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
150
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DynamicContentService }); }
150
151
  }
151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DynamicContentService, decorators: [{
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DynamicContentService, decorators: [{
152
153
  type: Injectable
153
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
154
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
154
155
  type: Inject,
155
156
  args: [DYNAMIC_CONTENT_BASE_PATH_TOKEN]
156
157
  }] }, { type: undefined, decorators: [{
@@ -158,7 +159,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
158
159
  args: [CMS_ASSETS_PATH_TOKEN]
159
160
  }] }, { type: i1.Store, decorators: [{
160
161
  type: Optional
161
- }] }]; } });
162
+ }] }] });
162
163
 
163
164
  class DynamicContentPipe {
164
165
  constructor(service, cd) {
@@ -187,13 +188,13 @@ class DynamicContentPipe {
187
188
  this.onMediaPathChange.unsubscribe();
188
189
  }
189
190
  }
190
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DynamicContentPipe, deps: [{ token: DynamicContentService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
191
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.0", ngImport: i0, type: DynamicContentPipe, name: "dynamicContent", pure: false }); }
191
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DynamicContentPipe, deps: [{ token: DynamicContentService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
192
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: DynamicContentPipe, name: "dynamicContent", pure: false }); }
192
193
  }
193
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DynamicContentPipe, decorators: [{
194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DynamicContentPipe, decorators: [{
194
195
  type: Pipe,
195
196
  args: [{ name: 'dynamicContent', pure: false }]
196
- }], ctorParameters: function () { return [{ type: DynamicContentService }, { type: i0.ChangeDetectorRef }]; } });
197
+ }], ctorParameters: () => [{ type: DynamicContentService }, { type: i0.ChangeDetectorRef }] });
197
198
 
198
199
  /**
199
200
  * Function to get dynamic content from body dataset
@@ -214,7 +215,6 @@ function getCmsAssets() {
214
215
  class DynamicContentModule {
215
216
  /**
216
217
  * Customize the location where the application will search for the base path of dynamic content
217
- *
218
218
  * @param dynamicPath Configuration for dynamic content path
219
219
  * @param dynamicPath.content The string will be used as base path of dynamic content
220
220
  * @param dynamicPath.cmsAssets The string will be used for the the base path of cms assets
@@ -239,9 +239,9 @@ class DynamicContentModule {
239
239
  providers
240
240
  };
241
241
  }
242
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DynamicContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
243
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.0", ngImport: i0, type: DynamicContentModule, declarations: [DynamicContentPipe], exports: [DynamicContentPipe] }); }
244
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DynamicContentModule, providers: [
242
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DynamicContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
243
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: DynamicContentModule, declarations: [DynamicContentPipe], exports: [DynamicContentPipe] }); }
244
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DynamicContentModule, providers: [
245
245
  {
246
246
  provide: DYNAMIC_CONTENT_BASE_PATH_TOKEN,
247
247
  useFactory: getDynamicContent
@@ -253,7 +253,7 @@ class DynamicContentModule {
253
253
  DynamicContentService
254
254
  ] }); }
255
255
  }
256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: DynamicContentModule, decorators: [{
256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: DynamicContentModule, decorators: [{
257
257
  type: NgModule,
258
258
  args: [{
259
259
  declarations: [DynamicContentPipe],
@@ -321,7 +321,6 @@ class RequestParametersService {
321
321
  /**
322
322
  * Depending on the strategy, set the internal values for the parameters.
323
323
  * See StorageStrategy for more info.
324
- *
325
324
  * @param key
326
325
  * @param value
327
326
  */
@@ -377,7 +376,6 @@ class RequestParametersService {
377
376
  }
378
377
  /**
379
378
  * Get a specific query parameter value, given the key.
380
- *
381
379
  * @param key
382
380
  */
383
381
  getQueryParameter(key) {
@@ -385,7 +383,6 @@ class RequestParametersService {
385
383
  }
386
384
  /**
387
385
  * Get a specific query parameter value as boolean, given the key.
388
- *
389
386
  * @param key
390
387
  */
391
388
  getQueryParameterAsBoolean(key) {
@@ -394,7 +391,6 @@ class RequestParametersService {
394
391
  }
395
392
  /**
396
393
  * Get a specific post parameter value, given the key.
397
- *
398
394
  * @param key
399
395
  */
400
396
  getPostParameter(key) {
@@ -402,7 +398,6 @@ class RequestParametersService {
402
398
  }
403
399
  /**
404
400
  * Get a specific post parameter value as boolean, given the key.
405
- *
406
401
  * @param key
407
402
  */
408
403
  getPostParameterAsBoolean(key) {
@@ -411,7 +406,6 @@ class RequestParametersService {
411
406
  }
412
407
  /**
413
408
  * Get a specific parameter value, given the key.
414
- *
415
409
  * @param key
416
410
  */
417
411
  getParameter(key) {
@@ -419,7 +413,6 @@ class RequestParametersService {
419
413
  }
420
414
  /**
421
415
  * Get a specific parameter value as boolean, given the key.
422
- *
423
416
  * @param key
424
417
  */
425
418
  getParameterAsBoolean(key) {
@@ -428,7 +421,6 @@ class RequestParametersService {
428
421
  }
429
422
  /**
430
423
  * Clear GET parameters from the storage
431
- *
432
424
  * @param paramsToClear the list on key that you want to clear in get parameters
433
425
  */
434
426
  clearQueryParameters(paramsToClear) {
@@ -444,7 +436,6 @@ class RequestParametersService {
444
436
  }
445
437
  /**
446
438
  * Clear POST parameters from the storage
447
- *
448
439
  * @param paramsToClear the list on key that you want to clean in post parameters
449
440
  */
450
441
  clearPostParameters(paramsToClear) {
@@ -460,7 +451,6 @@ class RequestParametersService {
460
451
  }
461
452
  /**
462
453
  * Get all the parameters in a map.
463
- *
464
454
  * @param priority the parameter to be given priority in case same key is in get and post params.
465
455
  */
466
456
  getParams(priority = 'query') {
@@ -468,7 +458,6 @@ class RequestParametersService {
468
458
  }
469
459
  /**
470
460
  * Filter Parameters(both Query/POST) from the storage
471
- *
472
461
  * @param paramstoFilter the list on key that you want to filter from parameters
473
462
  * @param priority the priorty of the parameter type(POST/Query)
474
463
  */
@@ -484,15 +473,15 @@ class RequestParametersService {
484
473
  return acc;
485
474
  }, {});
486
475
  }
487
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: RequestParametersService, deps: [{ token: REQUEST_PARAMETERS_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
488
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: RequestParametersService }); }
476
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: RequestParametersService, deps: [{ token: REQUEST_PARAMETERS_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
477
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: RequestParametersService }); }
489
478
  }
490
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: RequestParametersService, decorators: [{
479
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: RequestParametersService, decorators: [{
491
480
  type: Injectable
492
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
481
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
493
482
  type: Inject,
494
483
  args: [REQUEST_PARAMETERS_CONFIG_TOKEN]
495
- }] }]; } });
484
+ }] }] });
496
485
 
497
486
  /**
498
487
  * Empty configuration factory, used when config is not provided. It needs a separate function for AOT.
@@ -516,9 +505,9 @@ class RequestParametersModule {
516
505
  ]
517
506
  };
518
507
  }
519
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: RequestParametersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
520
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.0", ngImport: i0, type: RequestParametersModule }); }
521
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: RequestParametersModule, providers: [
508
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: RequestParametersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
509
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: RequestParametersModule }); }
510
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: RequestParametersModule, providers: [
522
511
  {
523
512
  provide: REQUEST_PARAMETERS_CONFIG_TOKEN,
524
513
  useValue: {}
@@ -526,7 +515,7 @@ class RequestParametersModule {
526
515
  RequestParametersService
527
516
  ] }); }
528
517
  }
529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: RequestParametersModule, decorators: [{
518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: RequestParametersModule, decorators: [{
530
519
  type: NgModule,
531
520
  args: [{
532
521
  imports: [],
@@ -540,9 +529,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImpor
540
529
  }]
541
530
  }] });
542
531
 
532
+ class StyleLazyLoaderModule {
533
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: StyleLazyLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
534
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: StyleLazyLoaderModule, imports: [DynamicContentModule] }); }
535
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: StyleLazyLoaderModule, imports: [DynamicContentModule] }); }
536
+ }
537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: StyleLazyLoaderModule, decorators: [{
538
+ type: NgModule,
539
+ args: [{
540
+ imports: [DynamicContentModule]
541
+ }]
542
+ }] });
543
+
544
+ /**
545
+ * Service to lazy load a CSS file
546
+ */
547
+ class StyleLazyLoader {
548
+ constructor(dcService) {
549
+ this.dcService = dcService;
550
+ this.DEFAULT_STYLE_ELEMENT_ID = 'external-theme';
551
+ }
552
+ /**
553
+ * Load a new CSS from an absolute URL, if we already HTML element exists with the url, otherwise
554
+ * @param styleUrlConfig object containing CSS File absolute URL to load, integrity and crossOrigin attributes
555
+ * and the styleId id of the dynamic style in the body tag.
556
+ */
557
+ loadStyleFromURL(styleUrlConfig) {
558
+ const elementId = styleUrlConfig.id ? styleUrlConfig.id : this.DEFAULT_STYLE_ELEMENT_ID;
559
+ let style = document.getElementById(elementId);
560
+ if (style === null) {
561
+ style = document.createElement('link');
562
+ style.rel = 'stylesheet';
563
+ style.type = 'text/css';
564
+ const head = document.getElementsByTagName('head')[0];
565
+ head.appendChild(style);
566
+ }
567
+ if (styleUrlConfig.integrity) {
568
+ style.integrity = styleUrlConfig.integrity;
569
+ }
570
+ if (styleUrlConfig.crossOrigin !== undefined) {
571
+ style.crossOrigin = styleUrlConfig.crossOrigin;
572
+ }
573
+ style.href = styleUrlConfig.href;
574
+ }
575
+ /**
576
+ * Load a new CSS File
577
+ * @param styleUrlConfig CSS File config containing URL to load, integrity and crossOrigin attributes
578
+ * and the styleId id of the dynamic style in the body tag
579
+ */
580
+ async asyncLoadStyleFromDynamicContent(styleUrlConfig) {
581
+ const dynamicContentPath = await firstValueFrom(this.dcService.getContentPathStream(styleUrlConfig.href));
582
+ styleUrlConfig.href = dynamicContentPath;
583
+ this.loadStyleFromURL(styleUrlConfig);
584
+ }
585
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: StyleLazyLoader, deps: [{ token: DynamicContentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
586
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: StyleLazyLoader, providedIn: StyleLazyLoaderModule }); }
587
+ }
588
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: StyleLazyLoader, decorators: [{
589
+ type: Injectable,
590
+ args: [{
591
+ providedIn: StyleLazyLoaderModule
592
+ }]
593
+ }], ctorParameters: () => [{ type: DynamicContentService }] });
594
+
543
595
  /**
544
596
  * Generated bundle index. Do not edit.
545
597
  */
546
598
 
547
- export { ASSET_PATH_OVERRIDE_REDUCER_TOKEN, ASSET_PATH_OVERRIDE_STORE_NAME, AssetPathOverrideStoreModule, CMS_ASSETS_PATH_TOKEN, DYNAMIC_CONTENT_BASE_PATH_TOKEN, DynamicContentModule, DynamicContentPipe, DynamicContentService, RequestParametersModule, RequestParametersService, StorageStrategy, assetPathOverrideInitialState, assetPathOverrideReducer, assetPathOverrideReducerFeatures, assetPathOverrideStorageDeserializer, assetPathOverrideStorageSync, defaultConfigFactory, defaultRequestParametersConfig, getCmsAssets, getDefaultAssetPathOverrideReducer, getDynamicContent, selectAssetPathOverride, selectAssetPathOverrideState, setAssetPathOverride };
599
+ export { ASSET_PATH_OVERRIDE_REDUCER_TOKEN, ASSET_PATH_OVERRIDE_STORE_NAME, AssetPathOverrideStoreModule, CMS_ASSETS_PATH_TOKEN, DYNAMIC_CONTENT_BASE_PATH_TOKEN, DynamicContentModule, DynamicContentPipe, DynamicContentService, RequestParametersModule, RequestParametersService, StorageStrategy, StyleLazyLoader, StyleLazyLoaderModule, assetPathOverrideInitialState, assetPathOverrideReducer, assetPathOverrideReducerFeatures, assetPathOverrideStorageDeserializer, assetPathOverrideStorageSync, defaultConfigFactory, defaultRequestParametersConfig, getCmsAssets, getDefaultAssetPathOverrideReducer, getDynamicContent, selectAssetPathOverride, selectAssetPathOverrideState, setAssetPathOverride };
548
600
  //# sourceMappingURL=o3r-dynamic-content.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-dynamic-content.mjs","sources":["../../src/stores/asset-path-override/asset-path-override.actions.ts","../../src/stores/asset-path-override/asset-path-override.reducer.ts","../../src/stores/asset-path-override/asset-path-override.state.ts","../../src/stores/asset-path-override/asset-path-override.module.ts","../../src/stores/asset-path-override/asset-path-override.selectors.ts","../../src/stores/asset-path-override/asset-path-override.sync.ts","../../src/services/dynamic-content/dynamic-content.token.ts","../../src/services/dynamic-content/dynamic-content.service.ts","../../src/services/dynamic-content/dynamic-content.pipe.ts","../../src/services/dynamic-content/dynamic-content.module.ts","../../src/services/request-parameters/request-parameters.config.ts","../../src/services/request-parameters/request-parameters.token.ts","../../src/services/request-parameters/request-parameters.service.ts","../../src/services/request-parameters/request-parameters.module.ts","../../src/o3r-dynamic-content.ts"],"sourcesContent":["import { createAction, props } from '@ngrx/store';\nimport type { SetStateActionPayload } from '@o3r/core';\nimport { AssetPathOverrideState } from './asset-path-override.state';\n\n/** Actions */\nconst ACTION_SET = '[AssetPathOverride] set entities';\n\n/**\n * Clear all overrides and fill the store with the payload\n */\nexport const setAssetPathOverride = createAction(ACTION_SET, props<SetStateActionPayload<AssetPathOverrideState>>());\n","import {ActionCreator, createReducer, on, ReducerTypes} from '@ngrx/store';\nimport * as actions from './asset-path-override.actions';\n\nimport {AssetPathOverrideState} from './asset-path-override.state';\n\n/**\n * AssetPathOverride Store initial value\n */\nexport const assetPathOverrideInitialState: AssetPathOverrideState = {assetPathOverrides: {}};\n\n/**\n * List of basic actions for AssetPathOverride Store\n */\nexport const assetPathOverrideReducerFeatures: ReducerTypes<AssetPathOverrideState, ActionCreator[]>[] = [\n on(actions.setAssetPathOverride, (_state, payload) => ({...payload.state}))\n];\n\n/**\n * AssetPathOverride Store reducer\n */\nexport const assetPathOverrideReducer = createReducer(\n assetPathOverrideInitialState,\n ...assetPathOverrideReducerFeatures\n);\n","/**\n * AssetPathOverride store state\n */\nexport interface AssetPathOverrideState {\n /** Mapping of asset path (key) and its override (value)*/\n assetPathOverrides : Record<string,string>;\n}\n\n/**\n * Name of the AssetPathOverride Store\n */\nexport const ASSET_PATH_OVERRIDE_STORE_NAME = 'assetPathOverride';\n\n/**\n * AssetPathOverride Store Interface\n */\nexport interface AssetPathOverrideStore {\n /** AssetPathOverride state */\n [ASSET_PATH_OVERRIDE_STORE_NAME]: AssetPathOverrideState;\n}\n","import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';\nimport { Action, ActionReducer, StoreModule } from '@ngrx/store';\n\nimport { assetPathOverrideReducer } from './asset-path-override.reducer';\nimport { ASSET_PATH_OVERRIDE_STORE_NAME, AssetPathOverrideState } from './asset-path-override.state';\n\n/** Token of the AssetPathOverride reducer */\nexport const ASSET_PATH_OVERRIDE_REDUCER_TOKEN = new InjectionToken<ActionReducer<AssetPathOverrideState, Action>>('Feature AssetPathOverride Reducer');\n\n/** Provide default reducer for AssetPathOverride store */\nexport function getDefaultAssetPathOverrideReducer() {\n return assetPathOverrideReducer;\n}\n\n@NgModule({\n imports: [\n StoreModule.forFeature(ASSET_PATH_OVERRIDE_STORE_NAME, ASSET_PATH_OVERRIDE_REDUCER_TOKEN)\n ],\n providers: [\n { provide: ASSET_PATH_OVERRIDE_REDUCER_TOKEN, useFactory: getDefaultAssetPathOverrideReducer }\n ]\n})\nexport class AssetPathOverrideStoreModule {\n public static forRoot<T extends AssetPathOverrideState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<AssetPathOverrideStoreModule> {\n return {\n ngModule: AssetPathOverrideStoreModule,\n providers: [\n { provide: ASSET_PATH_OVERRIDE_REDUCER_TOKEN, useFactory: reducerFactory }\n ]\n };\n }\n}\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\nimport { ASSET_PATH_OVERRIDE_STORE_NAME, AssetPathOverrideState } from './asset-path-override.state';\n\n/** Select AssetPathOverride State */\nexport const selectAssetPathOverrideState = createFeatureSelector<AssetPathOverrideState>(ASSET_PATH_OVERRIDE_STORE_NAME);\n\n/** Select all assetPath override map */\nexport const selectAssetPathOverride = createSelector(selectAssetPathOverrideState, (state) => state?.assetPathOverrides || {});\n\n","import type { Serializer } from '@o3r/core';\nimport { assetPathOverrideInitialState } from './asset-path-override.reducer';\nimport { AssetPathOverrideState } from './asset-path-override.state';\n\n/**\n * Deserializer\n *\n * @param rawObject\n */\nexport const assetPathOverrideStorageDeserializer = (rawObject: any) => {\n if (!rawObject) {\n return assetPathOverrideInitialState;\n }\n return rawObject;\n};\n\nexport const assetPathOverrideStorageSync: Serializer<AssetPathOverrideState> = {\n deserialize: assetPathOverrideStorageDeserializer\n};\n","import {InjectionToken} from '@angular/core';\n\n/**\n * Injection token for the rootpath of dynamic content\n */\nexport const DYNAMIC_CONTENT_BASE_PATH_TOKEN: InjectionToken<string> = new InjectionToken('Dynamic content path injection token');\n\n/**\n * Injection token for the assets path injected by the cms\n * This token will be injected only in editor mode\n */\nexport const CMS_ASSETS_PATH_TOKEN: InjectionToken<string> = new InjectionToken('CMS assets path injection token');\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { select, Store } from '@ngrx/store';\nimport { of } from 'rxjs';\nimport { distinctUntilChanged, map, shareReplay } from 'rxjs/operators';\nimport { AssetPathOverrideStore, selectAssetPathOverride } from '../../stores/index';\nimport { CMS_ASSETS_PATH_TOKEN, DYNAMIC_CONTENT_BASE_PATH_TOKEN } from './dynamic-content.token';\n\nconst MEDIA_FOLDER_NAME = 'assets';\n\n/**\n * Service for getting dynamic content path\n */\n@Injectable()\nexport class DynamicContentService {\n public readonly basePath: string;\n\n private readonly mediaFolder: string;\n\n constructor(@Inject(DYNAMIC_CONTENT_BASE_PATH_TOKEN) dynamicContentPath: string,\n @Inject(CMS_ASSETS_PATH_TOKEN) private cmsOnlyAssetsPath: string,\n @Optional() private store?: Store<AssetPathOverrideStore>) {\n this.basePath = dynamicContentPath.replace(/\\/$/, '');\n this.mediaFolder = MEDIA_FOLDER_NAME;\n }\n\n private normalizePath(assetPath?: string) {\n return !assetPath ? '' : assetPath.replace(/^\\//, '');\n }\n\n private getContentPath(assetPath?: string) {\n const normalizedAssetPath = this.normalizePath(assetPath);\n return this.basePath !== '' ? `${this.basePath}/${normalizedAssetPath}` : assetPath || '';\n }\n\n private getMediaPath(assetPath?: string) {\n if (this.cmsOnlyAssetsPath && assetPath) {\n return assetPath.startsWith('/') ? assetPath : `${this.cmsOnlyAssetsPath.replace(/\\/$/, '')}/${assetPath}`;\n }\n return this.getContentPath(this.mediaFolder ? `${this.mediaFolder}/${this.normalizePath(assetPath)}` : assetPath);\n }\n\n /**\n * Gets the full path of a content relative to the root\n * Content path doesn't consider any override, you will always get the same file\n *\n * @example getMediaPath('assets/imgs/my-image.png') will give you the basePath + 'assets/imgs/my-image.png'\n *\n * @param assetPath asset location in the root folder\n */\n public getContentPathStream(assetPath?: string) {\n return of(this.getContentPath(assetPath));\n }\n\n /**\n * Gets the stream that provides the full path of a media content\n * A Media content is always stored in the 'assets' media folder, no external content will be accessible through this function\n * If any override is applied to the content, returns the override path instead\n *\n * @example getMediaPathStream('imgs/my-image.png') will give you the basePath + mediaFolder + 'imgs/my-image.png'\n *\n * @param assetPath asset location in the media folder (e.g imgs/my-image.png)\n */\n public getMediaPathStream(assetPath?: string) {\n if (!this.store) {\n return of(this.getMediaPath(assetPath));\n }\n return this.store.pipe(\n select(selectAssetPathOverride),\n map((entities) => assetPath && entities && entities[assetPath] ? entities[assetPath] : assetPath),\n map((finalAssetPath) => this.getMediaPath(finalAssetPath)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n }\n}\n","import { ChangeDetectorRef, OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { DynamicContentService } from './dynamic-content.service';\n\n@Pipe({name: 'dynamicContent', pure: false})\nexport class DynamicContentPipe implements PipeTransform, OnDestroy {\n /** Last query value */\n private lastQuery?: string;\n\n /** Subscription to retrieve media path */\n private onMediaPathChange?: Subscription;\n\n /** Path to the media */\n private mediaPath = '';\n\n constructor(private service: DynamicContentService, private cd: ChangeDetectorRef) {}\n\n /** @inheritDoc */\n public transform(query?: string) {\n if (query !== this.lastQuery) {\n this.lastQuery = query;\n if (this.onMediaPathChange) {\n this.onMediaPathChange.unsubscribe();\n }\n this.onMediaPathChange = this.service.getMediaPathStream(query).subscribe((mediaPath) => {\n this.mediaPath = mediaPath;\n this.cd.markForCheck();\n });\n }\n\n return this.mediaPath;\n }\n\n /** @inheritDoc */\n public ngOnDestroy(): void {\n if (this.onMediaPathChange) {\n this.onMediaPathChange.unsubscribe();\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { DynamicContentPipe } from './dynamic-content.pipe';\nimport { DynamicContentService } from './dynamic-content.service';\nimport { CMS_ASSETS_PATH_TOKEN, DYNAMIC_CONTENT_BASE_PATH_TOKEN } from './dynamic-content.token';\n\n/**\n * Function to get dynamic content from body dataset\n */\nexport function getDynamicContent() {\n return document.body.dataset.dynamiccontentpath || '';\n}\n\n/**\n * Function to get the cms assets from body dataset\n * This will be used only in a CMS context(not in local or prod) to display correctly the assets in the editor\n */\nexport function getCmsAssets() {\n return document.body.dataset.cmsassetspath || '';\n}\n\n@NgModule({\n declarations: [DynamicContentPipe],\n providers: [\n {\n provide: DYNAMIC_CONTENT_BASE_PATH_TOKEN,\n useFactory: getDynamicContent\n },\n {\n provide: CMS_ASSETS_PATH_TOKEN,\n useFactory: getCmsAssets\n },\n DynamicContentService\n ],\n exports: [DynamicContentPipe]\n})\n/**\n * DynamicContent module\n */\nexport class DynamicContentModule {\n\n /**\n * Customize the location where the application will search for the base path of dynamic content\n *\n * @param dynamicPath Configuration for dynamic content path\n * @param dynamicPath.content The string will be used as base path of dynamic content\n * @param dynamicPath.cmsAssets The string will be used for the the base path of cms assets\n * @note The cmsAssets will be used only in the cms editor mode and it will take priority over dynamic content\n */\n public static forRoot(dynamicPath: {content: string} | {cmsAssets: string}): ModuleWithProviders<DynamicContentModule> {\n const providers = [];\n if ('content' in dynamicPath) {\n providers.push({\n provide: DYNAMIC_CONTENT_BASE_PATH_TOKEN,\n useValue: dynamicPath.content\n });\n }\n if ('cmsAssets' in dynamicPath) {\n providers.push({\n provide: CMS_ASSETS_PATH_TOKEN,\n useValue: dynamicPath.cmsAssets\n });\n }\n\n return {\n ngModule: DynamicContentModule,\n providers\n };\n }\n}\n","/**\n * Strategies available to read / write data in the RequestParameters service.\n * Rehydrate: if the storage already have data, those will be used by the service, ignoring new data. Otherwise set the storage\n * Merge: storage data will be merged with the ones provided. (provided data has priority)\n * Replace: storage data will be completely replaced by the ones provided\n * ReplaceIfNotEmpty: If no parameters are provided, use the content from storage. Otherwise use the ones provided and update the storage with them.\n */\n// eslint-disable-next-line no-shadow\nexport enum StorageStrategy {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Rehydrate = 0,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Merge = 1,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Replace = 2,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n ReplaceIfNotEmpty = 3\n}\n\n/**\n * Configuration used by a user to feed the request parameters service.\n */\nexport interface RequestParametersConfig {\n /**\n * Strategy used by the RequestParameters Service. See StorageStrategy for more info\n */\n strategy: StorageStrategy;\n /**\n * Storage used by the RequestParameters service\n */\n storage?: Storage;\n /**\n * Value of the DOM element containing your query parameters (e.g. `document.body.dataset.query`)\n */\n queryParamsValue: string;\n /**\n * Value of the DOM element containing your post parameters (e.g. `document.body.dataset.post`)\n */\n postParamsValue: string;\n}\n\nexport const defaultRequestParametersConfig: RequestParametersConfig = {\n storage: (typeof window !== 'undefined') ? window.sessionStorage : undefined,\n strategy: StorageStrategy.Rehydrate,\n queryParamsValue: typeof document !== 'undefined' && document.body && document.body.dataset && document.body.dataset.query || '{}',\n postParamsValue: typeof document !== 'undefined' && document.body && document.body.dataset && document.body.dataset.post || '{}'\n};\n","import { InjectionToken } from '@angular/core';\nimport { RequestParametersConfig } from './request-parameters.config';\n\n/**\n * Token to be provided in case of service customization needs.\n */\nexport const REQUEST_PARAMETERS_CONFIG_TOKEN = new InjectionToken<Partial<RequestParametersConfig>>('RequestParametersConfig injection token', {factory: () => ({})});\n","import {Inject, Injectable} from '@angular/core';\n\nimport {defaultRequestParametersConfig, RequestParametersConfig, StorageStrategy} from './request-parameters.config';\n\nimport {REQUEST_PARAMETERS_CONFIG_TOKEN} from './request-parameters.token';\n\nexport type ParamsList = 'query' | 'post';\n\nexport type ParamsType = {[k in ParamsList]: {[key: string]: string}};\n\n/**\n * Partial configuration for RequestParameters Service\n */\nexport interface PartialRequestParametersConfig extends Partial<RequestParametersConfig> {}\n\n/**\n * Service used to store the request parameters of your requests so that subsequent calls or refresh the page will preserve\n * them.\n */\n@Injectable()\nexport class RequestParametersService implements ParamsType {\n private _query: {[key: string]: any} = {};\n private _post: {[key: string]: any} = {};\n\n private config: RequestParametersConfig;\n\n constructor(@Inject(REQUEST_PARAMETERS_CONFIG_TOKEN) config: PartialRequestParametersConfig) {\n this.config = defaultRequestParametersConfig;\n (Object.keys(config) as (keyof RequestParametersConfig)[])\n .filter((key) => config[key] !== undefined)\n .forEach((key) => (this.config as any)[key] = config[key]);\n\n this.setParameters('query', JSON.parse(this.config.queryParamsValue));\n this.setParameters('post', JSON.parse(this.config.postParamsValue));\n }\n\n /**\n * Depending on the strategy, set the internal values for the parameters.\n * See StorageStrategy for more info.\n *\n * @param key\n * @param value\n */\n private setParameters(key: ParamsList, value: {[key: string]: string}) {\n const privateKey: `_${ParamsList}` = `_${key}`;\n if (!this.config.storage) {\n // No storage is available , cannot set items\n return;\n }\n switch (this.config.strategy) {\n case StorageStrategy.Rehydrate: {\n if (!this.config.storage.getItem(privateKey)) {\n this[privateKey] = value;\n this.config.storage.setItem(privateKey, JSON.stringify(value));\n break;\n }\n this[privateKey] = JSON.parse(this.config.storage.getItem(privateKey) || '{}');\n break;\n }\n case StorageStrategy.Replace: {\n this[privateKey] = value;\n this.config.storage.setItem(privateKey, JSON.stringify(value));\n break;\n }\n case StorageStrategy.Merge: {\n const storageData = Object.assign(JSON.parse(this.config.storage.getItem(privateKey) || '{}'), value);\n this[privateKey] = storageData;\n this.config.storage.setItem(privateKey, JSON.stringify(storageData));\n break;\n }\n case StorageStrategy.ReplaceIfNotEmpty: {\n if (Object.keys(value).length > 0) {\n this[privateKey] = value;\n this.config.storage.setItem(privateKey, JSON.stringify(value));\n break;\n }\n this[privateKey] = JSON.parse(this.config.storage.getItem(privateKey) || '{}');\n break;\n }\n }\n }\n\n /**\n * Get all the query parameters in a map.\n */\n public get query() {\n return this._query;\n }\n\n /**\n * Get all the post parameters in a map.\n */\n public get post() {\n return this._post;\n }\n\n /**\n * Get a specific query parameter value, given the key.\n *\n * @param key\n */\n public getQueryParameter(key: string): string | undefined {\n return this._query[key];\n }\n\n /**\n * Get a specific query parameter value as boolean, given the key.\n *\n * @param key\n */\n public getQueryParameterAsBoolean(key: string): boolean | undefined {\n const queryParameter: string | undefined = this.getQueryParameter(key);\n return queryParameter ? queryParameter.toLowerCase() === 'true' : undefined;\n }\n\n /**\n * Get a specific post parameter value, given the key.\n *\n * @param key\n */\n public getPostParameter(key: string): string | undefined {\n return this._post[key];\n }\n\n /**\n * Get a specific post parameter value as boolean, given the key.\n *\n * @param key\n */\n public getPostParameterAsBoolean(key: string): boolean | undefined {\n const postParameter: string | undefined = this.getPostParameter(key);\n return postParameter ? postParameter.toLowerCase() === 'true' : undefined;\n }\n\n /**\n * Get a specific parameter value, given the key.\n *\n * @param key\n */\n public getParameter(key: string): string | undefined {\n return this._query[key] || this._post[key];\n }\n\n /**\n * Get a specific parameter value as boolean, given the key.\n *\n * @param key\n */\n public getParameterAsBoolean(key: string): boolean | undefined {\n const parameter: string | undefined = this.getParameter(key);\n return parameter ? parameter.toLowerCase() === 'true' : undefined;\n }\n\n /**\n * Clear GET parameters from the storage\n *\n * @param paramsToClear the list on key that you want to clear in get parameters\n */\n public clearQueryParameters(paramsToClear?: string[]) {\n const newQuery = (paramsToClear ? Object.keys(this._query).filter((key) => paramsToClear.indexOf(key) === -1) : [])\n .reduce<{[k: string]: string}>((acc, key) => {\n acc[key] = this._query[key];\n return acc;\n }, {});\n if (this.config.storage) {\n this.config.storage.setItem('_query', JSON.stringify(newQuery));\n }\n this._query = newQuery;\n }\n\n /**\n * Clear POST parameters from the storage\n *\n * @param paramsToClear the list on key that you want to clean in post parameters\n */\n public clearPostParameters(paramsToClear?: string[]) {\n const newPost = (paramsToClear ? Object.keys(this._post).filter((key) => paramsToClear.indexOf(key) === -1) : [])\n .reduce<{[k: string]: string}>((acc, key) => {\n acc[key] = this._post[key];\n return acc;\n }, {});\n if (this.config.storage) {\n this.config.storage.setItem('_post', JSON.stringify(newPost));\n }\n this._post = newPost;\n }\n\n /**\n * Get all the parameters in a map.\n *\n * @param priority the parameter to be given priority in case same key is in get and post params.\n */\n public getParams(priority: ParamsList = 'query') {\n return priority === 'query' ? { ...this._post, ...this._query } : { ...this._query, ...this._post };\n }\n\n /**\n * Filter Parameters(both Query/POST) from the storage\n *\n * @param paramstoFilter the list on key that you want to filter from parameters\n * @param priority the priorty of the parameter type(POST/Query)\n */\n public getFilteredParameters(paramstoFilter?: string[], priority: ParamsList = 'query') {\n const params = this.getParams(priority);\n if (!paramstoFilter) {\n return params;\n }\n return Object.keys(params)\n .filter((key) => paramstoFilter.indexOf(key) === -1)\n .reduce<{ [k: string]: string }>((acc, key) => {\n acc[key] = params[key];\n return acc;\n }, {});\n }\n}\n","import {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport { RequestParametersService} from './request-parameters.service';\nimport { REQUEST_PARAMETERS_CONFIG_TOKEN } from './request-parameters.token';\n\nimport {RequestParametersConfig} from './request-parameters.config';\n\n/**\n * Empty configuration factory, used when config is not provided. It needs a separate function for AOT.\n */\nexport function defaultConfigFactory() {\n return {};\n}\n/**\n * RequestParametersService Module\n */\n@NgModule({\n imports: [],\n providers: [\n {\n provide: REQUEST_PARAMETERS_CONFIG_TOKEN,\n useValue: {}\n },\n RequestParametersService\n ]\n})\nexport class RequestParametersModule {\n public static forRoot(config: () => Partial<RequestParametersConfig> = defaultConfigFactory): ModuleWithProviders<RequestParametersModule> {\n return {\n ngModule: RequestParametersModule,\n providers: [\n {\n provide: REQUEST_PARAMETERS_CONFIG_TOKEN,\n useFactory: config\n },\n RequestParametersService\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["actions.setAssetPathOverride","i1.DynamicContentService"],"mappings":";;;;;;;AAIA;AACA,MAAM,UAAU,GAAG,kCAAkC,CAAC;AAEtD;;AAEG;AACU,MAAA,oBAAoB,GAAG,YAAY,CAAC,UAAU,EAAE,KAAK,EAAiD;;ACLnH;;AAEG;MACU,6BAA6B,GAA2B,EAAC,kBAAkB,EAAE,EAAE,GAAE;AAE9F;;AAEG;AACU,MAAA,gCAAgC,GAA4D;IACvG,EAAE,CAACA,oBAA4B,EAAE,CAAC,MAAM,EAAE,OAAO,MAAM,EAAC,GAAG,OAAO,CAAC,KAAK,EAAC,CAAC,CAAC;EAC3E;AAEF;;AAEG;AACU,MAAA,wBAAwB,GAAG,aAAa,CACnD,6BAA6B,EAC7B,GAAG,gCAAgC;;ACdrC;;AAEG;AACI,MAAM,8BAA8B,GAAG;;ACL9C;MACa,iCAAiC,GAAG,IAAI,cAAc,CAAgD,mCAAm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AAA,CAAA;;;ACzBD;;AAEG;;;;"}
1
+ {"version":3,"file":"o3r-dynamic-content.mjs","sources":["../../src/stores/asset-path-override/asset-path-override.actions.ts","../../src/stores/asset-path-override/asset-path-override.reducer.ts","../../src/stores/asset-path-override/asset-path-override.state.ts","../../src/stores/asset-path-override/asset-path-override.module.ts","../../src/stores/asset-path-override/asset-path-override.selectors.ts","../../src/stores/asset-path-override/asset-path-override.sync.ts","../../src/services/dynamic-content/dynamic-content.token.ts","../../src/services/dynamic-content/dynamic-content.service.ts","../../src/services/dynamic-content/dynamic-content.pipe.ts","../../src/services/dynamic-content/dynamic-content.module.ts","../../src/services/request-parameters/request-parameters.config.ts","../../src/services/request-parameters/request-parameters.token.ts","../../src/services/request-parameters/request-parameters.service.ts","../../src/services/request-parameters/request-parameters.module.ts","../../src/services/styling/style-lazy-loader.module.ts","../../src/services/styling/style-lazy-loader.service.ts","../../src/o3r-dynamic-content.ts"],"sourcesContent":["import { createAction, props } from '@ngrx/store';\nimport type { SetStateActionPayload } from '@o3r/core';\nimport { AssetPathOverrideState } from './asset-path-override.state';\n\n/** Actions */\nconst ACTION_SET = '[AssetPathOverride] set entities';\n\n/**\n * Clear all overrides and fill the store with the payload\n */\nexport const setAssetPathOverride = createAction(ACTION_SET, props<SetStateActionPayload<AssetPathOverrideState>>());\n","import {ActionCreator, createReducer, on, ReducerTypes} from '@ngrx/store';\nimport * as actions from './asset-path-override.actions';\n\nimport {AssetPathOverrideState} from './asset-path-override.state';\n\n/**\n * AssetPathOverride Store initial value\n */\nexport const assetPathOverrideInitialState: AssetPathOverrideState = {assetPathOverrides: {}};\n\n/**\n * List of basic actions for AssetPathOverride Store\n */\nexport const assetPathOverrideReducerFeatures: ReducerTypes<AssetPathOverrideState, ActionCreator[]>[] = [\n on(actions.setAssetPathOverride, (_state, payload) => ({...payload.state}))\n];\n\n/**\n * AssetPathOverride Store reducer\n */\nexport const assetPathOverrideReducer = createReducer(\n assetPathOverrideInitialState,\n ...assetPathOverrideReducerFeatures\n);\n","/**\n * AssetPathOverride store state\n */\nexport interface AssetPathOverrideState {\n /** Mapping of asset path (key) and its override (value)*/\n assetPathOverrides : Record<string,string>;\n}\n\n/**\n * Name of the AssetPathOverride Store\n */\nexport const ASSET_PATH_OVERRIDE_STORE_NAME = 'assetPathOverride';\n\n/**\n * AssetPathOverride Store Interface\n */\nexport interface AssetPathOverrideStore {\n /** AssetPathOverride state */\n [ASSET_PATH_OVERRIDE_STORE_NAME]: AssetPathOverrideState;\n}\n","import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';\nimport { Action, ActionReducer, StoreModule } from '@ngrx/store';\n\nimport { assetPathOverrideReducer } from './asset-path-override.reducer';\nimport { ASSET_PATH_OVERRIDE_STORE_NAME, AssetPathOverrideState } from './asset-path-override.state';\n\n/** Token of the AssetPathOverride reducer */\nexport const ASSET_PATH_OVERRIDE_REDUCER_TOKEN = new InjectionToken<ActionReducer<AssetPathOverrideState, Action>>('Feature AssetPathOverride Reducer');\n\n/** Provide default reducer for AssetPathOverride store */\nexport function getDefaultAssetPathOverrideReducer() {\n return assetPathOverrideReducer;\n}\n\n@NgModule({\n imports: [\n StoreModule.forFeature(ASSET_PATH_OVERRIDE_STORE_NAME, ASSET_PATH_OVERRIDE_REDUCER_TOKEN)\n ],\n providers: [\n { provide: ASSET_PATH_OVERRIDE_REDUCER_TOKEN, useFactory: getDefaultAssetPathOverrideReducer }\n ]\n})\nexport class AssetPathOverrideStoreModule {\n public static forRoot<T extends AssetPathOverrideState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<AssetPathOverrideStoreModule> {\n return {\n ngModule: AssetPathOverrideStoreModule,\n providers: [\n { provide: ASSET_PATH_OVERRIDE_REDUCER_TOKEN, useFactory: reducerFactory }\n ]\n };\n }\n}\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\nimport { ASSET_PATH_OVERRIDE_STORE_NAME, AssetPathOverrideState } from './asset-path-override.state';\n\n/** Select AssetPathOverride State */\nexport const selectAssetPathOverrideState = createFeatureSelector<AssetPathOverrideState>(ASSET_PATH_OVERRIDE_STORE_NAME);\n\n/** Select all assetPath override map */\nexport const selectAssetPathOverride = createSelector(selectAssetPathOverrideState, (state) => state?.assetPathOverrides || {});\n\n","import type { Serializer } from '@o3r/core';\nimport { assetPathOverrideInitialState } from './asset-path-override.reducer';\nimport { AssetPathOverrideState } from './asset-path-override.state';\n\n/**\n * Deserializer\n * @param rawObject\n */\nexport const assetPathOverrideStorageDeserializer = (rawObject: any) => {\n if (!rawObject) {\n return assetPathOverrideInitialState;\n }\n return rawObject;\n};\n\nexport const assetPathOverrideStorageSync: Serializer<AssetPathOverrideState> = {\n deserialize: assetPathOverrideStorageDeserializer\n};\n","import {InjectionToken} from '@angular/core';\n\n/**\n * Injection token for the rootpath of dynamic content\n */\nexport const DYNAMIC_CONTENT_BASE_PATH_TOKEN: InjectionToken<string> = new InjectionToken('Dynamic content path injection token');\n\n/**\n * Injection token for the assets path injected by the cms\n * This token will be injected only in editor mode\n */\nexport const CMS_ASSETS_PATH_TOKEN: InjectionToken<string> = new InjectionToken('CMS assets path injection token');\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { select, Store } from '@ngrx/store';\nimport { of } from 'rxjs';\nimport { distinctUntilChanged, map, shareReplay } from 'rxjs/operators';\nimport { AssetPathOverrideStore, selectAssetPathOverride } from '../../stores/index';\nimport { CMS_ASSETS_PATH_TOKEN, DYNAMIC_CONTENT_BASE_PATH_TOKEN } from './dynamic-content.token';\n\nconst MEDIA_FOLDER_NAME = 'assets';\n\n/**\n * Service for getting dynamic content path\n */\n@Injectable()\nexport class DynamicContentService {\n public readonly basePath: string;\n\n private readonly mediaFolder: string;\n\n constructor(@Inject(DYNAMIC_CONTENT_BASE_PATH_TOKEN) dynamicContentPath: string,\n @Inject(CMS_ASSETS_PATH_TOKEN) private readonly cmsOnlyAssetsPath: string,\n @Optional() private readonly store?: Store<AssetPathOverrideStore>) {\n this.basePath = dynamicContentPath.replace(/\\/$/, '');\n this.mediaFolder = MEDIA_FOLDER_NAME;\n }\n\n private normalizePath(assetPath?: string) {\n return !assetPath ? '' : assetPath.replace(/^\\//, '');\n }\n\n private getContentPath(assetPath?: string) {\n const normalizedAssetPath = this.normalizePath(assetPath);\n return this.basePath !== '' ? `${this.basePath}/${normalizedAssetPath}` : assetPath || '';\n }\n\n private getMediaPath(assetPath?: string) {\n if (this.cmsOnlyAssetsPath && assetPath) {\n return assetPath.startsWith('/') ? assetPath : `${this.cmsOnlyAssetsPath.replace(/\\/$/, '')}/${assetPath}`;\n }\n return this.getContentPath(this.mediaFolder ? `${this.mediaFolder}/${this.normalizePath(assetPath)}` : assetPath);\n }\n\n /**\n * Gets the full path of a content relative to the root\n * Content path doesn't consider any override, you will always get the same file\n * @param assetPath asset location in the root folder\n * @example\n * ```typescript\n * getMediaPath('assets/imgs/my-image.png') // will give you the basePath + 'assets/imgs/my-image.png'\n * ```\n */\n public getContentPathStream(assetPath?: string) {\n return of(this.getContentPath(assetPath));\n }\n\n /**\n * Gets the stream that provides the full path of a media content\n * A Media content is always stored in the 'assets' media folder, no external content will be accessible through this function\n * If any override is applied to the content, returns the override path instead\n * @param assetPath asset location in the media folder (e.g imgs/my-image.png)\n * @example\n * ```typescript\n * getMediaPathStream('imgs/my-image.png') // will give you the basePath + mediaFolder + 'imgs/my-image.png'\n * ```\n */\n public getMediaPathStream(assetPath?: string) {\n if (!this.store) {\n return of(this.getMediaPath(assetPath));\n }\n return this.store.pipe(\n select(selectAssetPathOverride),\n map((entities) => assetPath && entities && entities[assetPath] ? entities[assetPath] : assetPath),\n map((finalAssetPath) => this.getMediaPath(finalAssetPath)),\n distinctUntilChanged(),\n shareReplay({bufferSize: 1, refCount: true})\n );\n }\n}\n","import { ChangeDetectorRef, OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { DynamicContentService } from './dynamic-content.service';\n\n@Pipe({name: 'dynamicContent', pure: false})\nexport class DynamicContentPipe implements PipeTransform, OnDestroy {\n /** Last query value */\n private lastQuery?: string;\n\n /** Subscription to retrieve media path */\n private onMediaPathChange?: Subscription;\n\n /** Path to the media */\n private mediaPath = '';\n\n constructor(private readonly service: DynamicContentService, private readonly cd: ChangeDetectorRef) {}\n\n /** @inheritDoc */\n public transform(query?: string) {\n if (query !== this.lastQuery) {\n this.lastQuery = query;\n if (this.onMediaPathChange) {\n this.onMediaPathChange.unsubscribe();\n }\n this.onMediaPathChange = this.service.getMediaPathStream(query).subscribe((mediaPath) => {\n this.mediaPath = mediaPath;\n this.cd.markForCheck();\n });\n }\n\n return this.mediaPath;\n }\n\n /** @inheritDoc */\n public ngOnDestroy(): void {\n if (this.onMediaPathChange) {\n this.onMediaPathChange.unsubscribe();\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { DynamicContentPipe } from './dynamic-content.pipe';\nimport { DynamicContentService } from './dynamic-content.service';\nimport { CMS_ASSETS_PATH_TOKEN, DYNAMIC_CONTENT_BASE_PATH_TOKEN } from './dynamic-content.token';\n\n/**\n * Function to get dynamic content from body dataset\n */\nexport function getDynamicContent() {\n return document.body.dataset.dynamiccontentpath || '';\n}\n\n/**\n * Function to get the cms assets from body dataset\n * This will be used only in a CMS context(not in local or prod) to display correctly the assets in the editor\n */\nexport function getCmsAssets() {\n return document.body.dataset.cmsassetspath || '';\n}\n\n@NgModule({\n declarations: [DynamicContentPipe],\n providers: [\n {\n provide: DYNAMIC_CONTENT_BASE_PATH_TOKEN,\n useFactory: getDynamicContent\n },\n {\n provide: CMS_ASSETS_PATH_TOKEN,\n useFactory: getCmsAssets\n },\n DynamicContentService\n ],\n exports: [DynamicContentPipe]\n})\n/**\n * DynamicContent module\n */\nexport class DynamicContentModule {\n\n /**\n * Customize the location where the application will search for the base path of dynamic content\n * @param dynamicPath Configuration for dynamic content path\n * @param dynamicPath.content The string will be used as base path of dynamic content\n * @param dynamicPath.cmsAssets The string will be used for the the base path of cms assets\n * @note The cmsAssets will be used only in the cms editor mode and it will take priority over dynamic content\n */\n public static forRoot(dynamicPath: {content: string} | {cmsAssets: string}): ModuleWithProviders<DynamicContentModule> {\n const providers = [];\n if ('content' in dynamicPath) {\n providers.push({\n provide: DYNAMIC_CONTENT_BASE_PATH_TOKEN,\n useValue: dynamicPath.content\n });\n }\n if ('cmsAssets' in dynamicPath) {\n providers.push({\n provide: CMS_ASSETS_PATH_TOKEN,\n useValue: dynamicPath.cmsAssets\n });\n }\n\n return {\n ngModule: DynamicContentModule,\n providers\n };\n }\n}\n","/**\n * Strategies available to read / write data in the RequestParameters service.\n * Rehydrate: if the storage already have data, those will be used by the service, ignoring new data. Otherwise set the storage\n * Merge: storage data will be merged with the ones provided. (provided data has priority)\n * Replace: storage data will be completely replaced by the ones provided\n * ReplaceIfNotEmpty: If no parameters are provided, use the content from storage. Otherwise use the ones provided and update the storage with them.\n */\n// eslint-disable-next-line no-shadow\nexport enum StorageStrategy {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Rehydrate = 0,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Merge = 1,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Replace = 2,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n ReplaceIfNotEmpty = 3\n}\n\n/**\n * Configuration used by a user to feed the request parameters service.\n */\nexport interface RequestParametersConfig {\n /**\n * Strategy used by the RequestParameters Service. See StorageStrategy for more info\n */\n strategy: StorageStrategy;\n /**\n * Storage used by the RequestParameters service\n */\n storage?: Storage;\n /**\n * Value of the DOM element containing your query parameters (e.g. `document.body.dataset.query`)\n */\n queryParamsValue: string;\n /**\n * Value of the DOM element containing your post parameters (e.g. `document.body.dataset.post`)\n */\n postParamsValue: string;\n}\n\nexport const defaultRequestParametersConfig: RequestParametersConfig = {\n storage: (typeof window !== 'undefined') ? window.sessionStorage : undefined,\n strategy: StorageStrategy.Rehydrate,\n queryParamsValue: typeof document !== 'undefined' && document.body && document.body.dataset && document.body.dataset.query || '{}',\n postParamsValue: typeof document !== 'undefined' && document.body && document.body.dataset && document.body.dataset.post || '{}'\n};\n","import { InjectionToken } from '@angular/core';\nimport { RequestParametersConfig } from './request-parameters.config';\n\n/**\n * Token to be provided in case of service customization needs.\n */\nexport const REQUEST_PARAMETERS_CONFIG_TOKEN = new InjectionToken<Partial<RequestParametersConfig>>('RequestParametersConfig injection token', {factory: () => ({})});\n","import {Inject, Injectable} from '@angular/core';\n\nimport {defaultRequestParametersConfig, RequestParametersConfig, StorageStrategy} from './request-parameters.config';\n\nimport {REQUEST_PARAMETERS_CONFIG_TOKEN} from './request-parameters.token';\n\nexport type ParamsList = 'query' | 'post';\n\nexport type ParamsType = {[k in ParamsList]: {[key: string]: string}};\n\n/**\n * Partial configuration for RequestParameters Service\n */\nexport interface PartialRequestParametersConfig extends Partial<RequestParametersConfig> {}\n\n/**\n * Service used to store the request parameters of your requests so that subsequent calls or refresh the page will preserve\n * them.\n */\n@Injectable()\nexport class RequestParametersService implements ParamsType {\n private _query: {[key: string]: any} = {};\n private _post: {[key: string]: any} = {};\n\n private readonly config: RequestParametersConfig;\n\n constructor(@Inject(REQUEST_PARAMETERS_CONFIG_TOKEN) config: PartialRequestParametersConfig) {\n this.config = defaultRequestParametersConfig;\n (Object.keys(config) as (keyof RequestParametersConfig)[])\n .filter((key) => config[key] !== undefined)\n .forEach((key) => (this.config as any)[key] = config[key]);\n\n this.setParameters('query', JSON.parse(this.config.queryParamsValue));\n this.setParameters('post', JSON.parse(this.config.postParamsValue));\n }\n\n /**\n * Depending on the strategy, set the internal values for the parameters.\n * See StorageStrategy for more info.\n * @param key\n * @param value\n */\n private setParameters(key: ParamsList, value: {[key: string]: string}) {\n const privateKey: `_${ParamsList}` = `_${key}`;\n if (!this.config.storage) {\n // No storage is available , cannot set items\n return;\n }\n switch (this.config.strategy) {\n case StorageStrategy.Rehydrate: {\n if (!this.config.storage.getItem(privateKey)) {\n this[privateKey] = value;\n this.config.storage.setItem(privateKey, JSON.stringify(value));\n break;\n }\n this[privateKey] = JSON.parse(this.config.storage.getItem(privateKey) || '{}');\n break;\n }\n case StorageStrategy.Replace: {\n this[privateKey] = value;\n this.config.storage.setItem(privateKey, JSON.stringify(value));\n break;\n }\n case StorageStrategy.Merge: {\n const storageData = Object.assign(JSON.parse(this.config.storage.getItem(privateKey) || '{}'), value);\n this[privateKey] = storageData;\n this.config.storage.setItem(privateKey, JSON.stringify(storageData));\n break;\n }\n case StorageStrategy.ReplaceIfNotEmpty: {\n if (Object.keys(value).length > 0) {\n this[privateKey] = value;\n this.config.storage.setItem(privateKey, JSON.stringify(value));\n break;\n }\n this[privateKey] = JSON.parse(this.config.storage.getItem(privateKey) || '{}');\n break;\n }\n }\n }\n\n /**\n * Get all the query parameters in a map.\n */\n public get query() {\n return this._query;\n }\n\n /**\n * Get all the post parameters in a map.\n */\n public get post() {\n return this._post;\n }\n\n /**\n * Get a specific query parameter value, given the key.\n * @param key\n */\n public getQueryParameter(key: string): string | undefined {\n return this._query[key];\n }\n\n /**\n * Get a specific query parameter value as boolean, given the key.\n * @param key\n */\n public getQueryParameterAsBoolean(key: string): boolean | undefined {\n const queryParameter: string | undefined = this.getQueryParameter(key);\n return queryParameter ? queryParameter.toLowerCase() === 'true' : undefined;\n }\n\n /**\n * Get a specific post parameter value, given the key.\n * @param key\n */\n public getPostParameter(key: string): string | undefined {\n return this._post[key];\n }\n\n /**\n * Get a specific post parameter value as boolean, given the key.\n * @param key\n */\n public getPostParameterAsBoolean(key: string): boolean | undefined {\n const postParameter: string | undefined = this.getPostParameter(key);\n return postParameter ? postParameter.toLowerCase() === 'true' : undefined;\n }\n\n /**\n * Get a specific parameter value, given the key.\n * @param key\n */\n public getParameter(key: string): string | undefined {\n return this._query[key] || this._post[key];\n }\n\n /**\n * Get a specific parameter value as boolean, given the key.\n * @param key\n */\n public getParameterAsBoolean(key: string): boolean | undefined {\n const parameter: string | undefined = this.getParameter(key);\n return parameter ? parameter.toLowerCase() === 'true' : undefined;\n }\n\n /**\n * Clear GET parameters from the storage\n * @param paramsToClear the list on key that you want to clear in get parameters\n */\n public clearQueryParameters(paramsToClear?: string[]) {\n const newQuery = (paramsToClear ? Object.keys(this._query).filter((key) => paramsToClear.indexOf(key) === -1) : [])\n .reduce<{[k: string]: string}>((acc, key) => {\n acc[key] = this._query[key];\n return acc;\n }, {});\n if (this.config.storage) {\n this.config.storage.setItem('_query', JSON.stringify(newQuery));\n }\n this._query = newQuery;\n }\n\n /**\n * Clear POST parameters from the storage\n * @param paramsToClear the list on key that you want to clean in post parameters\n */\n public clearPostParameters(paramsToClear?: string[]) {\n const newPost = (paramsToClear ? Object.keys(this._post).filter((key) => paramsToClear.indexOf(key) === -1) : [])\n .reduce<{[k: string]: string}>((acc, key) => {\n acc[key] = this._post[key];\n return acc;\n }, {});\n if (this.config.storage) {\n this.config.storage.setItem('_post', JSON.stringify(newPost));\n }\n this._post = newPost;\n }\n\n /**\n * Get all the parameters in a map.\n * @param priority the parameter to be given priority in case same key is in get and post params.\n */\n public getParams(priority: ParamsList = 'query') {\n return priority === 'query' ? { ...this._post, ...this._query } : { ...this._query, ...this._post };\n }\n\n /**\n * Filter Parameters(both Query/POST) from the storage\n * @param paramstoFilter the list on key that you want to filter from parameters\n * @param priority the priorty of the parameter type(POST/Query)\n */\n public getFilteredParameters(paramstoFilter?: string[], priority: ParamsList = 'query') {\n const params = this.getParams(priority);\n if (!paramstoFilter) {\n return params;\n }\n return Object.keys(params)\n .filter((key) => paramstoFilter.indexOf(key) === -1)\n .reduce<{ [k: string]: string }>((acc, key) => {\n acc[key] = params[key];\n return acc;\n }, {});\n }\n}\n","import {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport { RequestParametersService} from './request-parameters.service';\nimport { REQUEST_PARAMETERS_CONFIG_TOKEN } from './request-parameters.token';\n\nimport {RequestParametersConfig} from './request-parameters.config';\n\n/**\n * Empty configuration factory, used when config is not provided. It needs a separate function for AOT.\n */\nexport function defaultConfigFactory() {\n return {};\n}\n/**\n * RequestParametersService Module\n */\n@NgModule({\n imports: [],\n providers: [\n {\n provide: REQUEST_PARAMETERS_CONFIG_TOKEN,\n useValue: {}\n },\n RequestParametersService\n ]\n})\nexport class RequestParametersModule {\n public static forRoot(config: () => Partial<RequestParametersConfig> = defaultConfigFactory): ModuleWithProviders<RequestParametersModule> {\n return {\n ngModule: RequestParametersModule,\n providers: [\n {\n provide: REQUEST_PARAMETERS_CONFIG_TOKEN,\n useFactory: config\n },\n RequestParametersService\n ]\n };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DynamicContentModule } from '../dynamic-content/index';\n\n@NgModule({\n imports: [DynamicContentModule]\n})\nexport class StyleLazyLoaderModule {}\n","import { Injectable } from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { StyleLazyLoaderModule } from './style-lazy-loader.module';\nimport { DynamicContentService } from '../dynamic-content/index';\n\n/**\n * Interface to describe a style to lazy load from a url.\n */\nexport interface StyleURL {\n /** url to file */\n href: string;\n /** id of the HTML element */\n id?: string;\n /** html integrity attribute to verify fetched resources */\n integrity?: string;\n /** html crossOrigin attribute for CORS support. */\n crossOrigin?: 'anonymous' | 'use-credentials' | '';\n}\n\n/**\n * Service to lazy load a CSS file\n */\n@Injectable({\n providedIn: StyleLazyLoaderModule\n})\nexport class StyleLazyLoader {\n\n private readonly DEFAULT_STYLE_ELEMENT_ID = 'external-theme';\n\n constructor(private readonly dcService: DynamicContentService) {\n }\n\n /**\n * Load a new CSS from an absolute URL, if we already HTML element exists with the url, otherwise\n * @param styleUrlConfig object containing CSS File absolute URL to load, integrity and crossOrigin attributes\n * and the styleId id of the dynamic style in the body tag.\n */\n public loadStyleFromURL(styleUrlConfig: StyleURL) {\n\n const elementId = styleUrlConfig.id ? styleUrlConfig.id : this.DEFAULT_STYLE_ELEMENT_ID;\n let style = document.getElementById(elementId) as HTMLLinkElement | null;\n\n if (style === null) {\n style = document.createElement('link');\n style.rel = 'stylesheet';\n style.type = 'text/css';\n const head = document.getElementsByTagName('head')[0];\n head.appendChild(style);\n }\n if (styleUrlConfig.integrity) {\n style.integrity = styleUrlConfig.integrity;\n }\n if (styleUrlConfig.crossOrigin !== undefined) {\n style.crossOrigin = styleUrlConfig.crossOrigin;\n }\n style.href = styleUrlConfig.href;\n }\n\n /**\n * Load a new CSS File\n * @param styleUrlConfig CSS File config containing URL to load, integrity and crossOrigin attributes\n * and the styleId id of the dynamic style in the body tag\n */\n public async asyncLoadStyleFromDynamicContent(styleUrlConfig: StyleURL) {\n const dynamicContentPath = await firstValueFrom(\n this.dcService.getContentPathStream(styleUrlConfig.href)\n );\n styleUrlConfig.href = dynamicContentPath;\n this.loadStyleFromURL(styleUrlConfig);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["actions.setAssetPathOverride","i1.DynamicContentService"],"mappings":";;;;;;;AAIA;AACA,MAAM,UAAU,GAAG,kCAAkC,CAAC;AAEtD;;AAEG;AACU,MAAA,oBAAoB,GAAG,YAAY,CAAC,UAAU,EAAE,KAAK,EAAiD;;ACLnH;;AAEG;MACU,6BAA6B,GAA2B,EAAC,kBAAkB,EAAE,EAAE,GAAE;AAE9F;;AAEG;AACU,MAAA,gCAAgC,GAA4D;IACvG,EAAE,CAACA,oBAA4B,EAAE,CAAC,MAAM,EAAE,OAAO,MAAM,EAAC,GAAG,OAAO,CAAC,KAAK,EAAC,CAAC,CAAC;EAC3E;AAEF;;AAEG;AACU,MAAA,wBAAwB,GAAG,aAAa,CACnD,6BAA6B,EAC7B,GAAG,gCAAgC;;ACdrC;;AAEG;AACI,MAAM,8BAA8B,GAAG;;ACL9C;MACa,iCAAiC,GAAG,IAAI,cAAc,CAAgD,mCAAmC,EAAE;AAExJ;SACgB,kCAAkC,GAAA;AAChD,IAAA,OAAO,wBAAwB,CAAC;AAClC,CAAC;MAUY,4BAA4B,CAAA;IAChC,OAAO,OAAO,CAAmC,cAA8C,EAAA;QACpG,OAAO;AACL,YAAA,QAAQ,EAAE,4BAA4B;AACtC,YAAA,SA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