@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/dynamic-content",
3
- "version": "10.0.0-next.9",
3
+ "version": "11.0.0-next.0",
4
4
  "description": "This module provides a mechanism to retrieve media and data depending on the host or a server specific url.",
5
5
  "keywords": [
6
6
  "dynamic-content",
@@ -21,6 +21,12 @@
21
21
  "esm": "./esm2022/o3r-dynamic-content.mjs",
22
22
  "default": "./fesm2022/o3r-dynamic-content.mjs"
23
23
  },
24
+ "./rules-engine": {
25
+ "types": "./rules-engine/index.d.ts",
26
+ "esm2022": "./esm2022/rules-engine/o3r-dynamic-content-rules-engine.mjs",
27
+ "esm": "./esm2022/rules-engine/o3r-dynamic-content-rules-engine.mjs",
28
+ "default": "./fesm2022/o3r-dynamic-content-rules-engine.mjs"
29
+ },
24
30
  "./fixtures/jasmine": {
25
31
  "types": "./fixtures/jasmine/index.d.ts",
26
32
  "esm2022": "./esm2022/fixtures/jasmine/o3r-dynamic-content-fixtures-jasmine.mjs",
@@ -35,14 +41,13 @@
35
41
  }
36
42
  },
37
43
  "peerDependencies": {
38
- "@angular-devkit/architect": "~0.1602.0",
39
- "@angular/compiler-cli": "~16.2.0",
40
- "@angular/core": "~16.2.0",
41
- "@angular/platform-browser-dynamic": "~16.2.0",
42
- "@ngrx/store": "~16.2.0",
43
- "@o3r/core": "^10.0.0-next.9",
44
- "@o3r/dev-tools": "^10.0.0-next.9",
45
- "@o3r/schematics": "^10.0.0-next.9",
44
+ "@angular-devkit/architect": "~0.1700.0",
45
+ "@angular/compiler-cli": "~17.0.2",
46
+ "@angular/core": "~17.0.2",
47
+ "@angular/platform-browser-dynamic": "~17.0.2",
48
+ "@ngrx/store": "~17.0.0",
49
+ "@o3r/core": "^11.0.0-next.0",
50
+ "@o3r/schematics": "^11.0.0-next.0",
46
51
  "cheerio": "^1.0.0-rc.10",
47
52
  "express-interceptor": "^1.2.0",
48
53
  "jasmine": "^5.0.0",
@@ -66,7 +71,7 @@
66
71
  "tslib": "^2.5.3"
67
72
  },
68
73
  "engines": {
69
- "node": ">=16.0.0"
74
+ "node": ">=18.0.0"
70
75
  },
71
76
  "schematics": "./collection.json",
72
77
  "module": "fesm2022/o3r-dynamic-content.mjs",
@@ -135,5 +140,6 @@
135
140
  ],
136
141
  "bugs": "https://github.com/AmadeusITGroup/otter/issues",
137
142
  "repository": "https://github.com/AmadeusITGroup/otter",
138
- "license": "BSD-3-Clause"
143
+ "license": "BSD-3-Clause",
144
+ "homepage": "https://amadeusitgroup.github.io/otter/"
139
145
  }
@@ -0,0 +1,19 @@
1
+ import { Store } from '@ngrx/store';
2
+ import type { RulesEngineActionHandler } from '@o3r/core';
3
+ import { AssetPathOverrideStore } from '@o3r/dynamic-content';
4
+ import { ActionUpdateAssetBlock } from './asset.interfaces';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Service to handle async Asset actions
8
+ */
9
+ export declare class AssetRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdateAssetBlock> {
10
+ private readonly store;
11
+ /** @inheritdoc */
12
+ readonly supportingActions: readonly ["UPDATE_ASSET"];
13
+ constructor(store: Store<AssetPathOverrideStore>);
14
+ /** @inheritdoc */
15
+ executeActions(actions: ActionUpdateAssetBlock[]): void | Promise<void>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<AssetRulesEngineActionHandler, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<AssetRulesEngineActionHandler>;
18
+ }
19
+ //# sourceMappingURL=asset.handler-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset.handler-action.d.ts","sourceRoot":"","sources":["../../src/rules-engine/asset.handler-action.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAwB,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAyC,MAAM,oBAAoB,CAAC;;AAEnG;;GAEG;AACH,qBACa,6BAA8B,YAAW,wBAAwB,CAAC,sBAAsB,CAAC;IAKxF,OAAO,CAAC,QAAQ,CAAC,KAAK;IAHlC,kBAAkB;IAClB,SAAgB,iBAAiB,4BAAoD;gBAExD,KAAK,EAAE,KAAK,CAAC,sBAAsB,CAAC;IAGjE,kBAAkB;IACX,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;yCATnE,6BAA6B;6CAA7B,6BAA6B;CAiBzC"}
@@ -0,0 +1,12 @@
1
+ import type { RulesEngineAction } from '@o3r/core';
2
+ /** ActionUpdateAssetBlock */
3
+ export declare const RULES_ENGINE_ASSET_UPDATE_ACTION_TYPE = "UPDATE_ASSET";
4
+ /**
5
+ * Content of action that updates asset
6
+ */
7
+ export interface ActionUpdateAssetBlock extends RulesEngineAction {
8
+ actionType: typeof RULES_ENGINE_ASSET_UPDATE_ACTION_TYPE;
9
+ asset: string;
10
+ value: string;
11
+ }
12
+ //# sourceMappingURL=asset.interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset.interfaces.d.ts","sourceRoot":"","sources":["../../src/rules-engine/asset.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,8BAA8B;AAC9B,eAAO,MAAM,qCAAqC,iBAAiB,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,UAAU,EAAE,OAAO,qCAAqC,CAAC;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@o3r/dynamic-content";
3
+ export declare class AssetRulesEngineActionModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<AssetRulesEngineActionModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AssetRulesEngineActionModule, never, [typeof i1.AssetPathOverrideStoreModule], never>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<AssetRulesEngineActionModule>;
7
+ }
8
+ //# sourceMappingURL=asset.rules-engine.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset.rules-engine.module.d.ts","sourceRoot":"","sources":["../../src/rules-engine/asset.rules-engine.module.ts"],"names":[],"mappings":";;AAIA,qBAQa,4BAA4B;yCAA5B,4BAA4B;0CAA5B,4BAA4B;0CAA5B,4BAA4B;CACxC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@o3r/dynamic-content/rules-engine" />
5
+ export * from './public_api';
6
+ //# sourceMappingURL=o3r-dynamic-content-rules-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"o3r-dynamic-content-rules-engine.d.ts","sourceRoot":"","sources":["../../src/rules-engine/o3r-dynamic-content-rules-engine.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './asset.handler-action';
2
+ export * from './asset.interfaces';
3
+ export * from './asset.rules-engine.module';
4
+ //# sourceMappingURL=public_api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../src/rules-engine/public_api.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "RulesActionUpdateAssetBlock",
4
+ "type": "object",
5
+ "description": "Content of action that updates the assets",
6
+ "properties": {
7
+ "actionType": {
8
+ "type": "string",
9
+ "description": "Action Type",
10
+ "const": "UPDATE_ASSET"
11
+ },
12
+ "asset": {
13
+ "type": "string",
14
+ "description": "asset to update"
15
+ },
16
+ "value": {
17
+ "type": "string"
18
+ }
19
+ },
20
+ "additionalItems": false,
21
+ "required": [
22
+ "actionType",
23
+ "asset",
24
+ "value"
25
+ ]
26
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "http://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
3
  "$id": "ngAddSchematicsSchema",
4
4
  "title": "Add Otter dynamic-content ",
5
5
  "description": "ngAdd Otter dynamic-content ",
@@ -13,7 +13,6 @@ export declare function getCmsAssets(): string;
13
13
  export declare class DynamicContentModule {
14
14
  /**
15
15
  * Customize the location where the application will search for the base path of dynamic content
16
- *
17
16
  * @param dynamicPath Configuration for dynamic content path
18
17
  * @param dynamicPath.content The string will be used as base path of dynamic content
19
18
  * @param dynamicPath.cmsAssets The string will be used for the the base path of cms assets
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-content.module.d.ts","sourceRoot":"","sources":["../../../src/services/dynamic-content/dynamic-content.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAY,MAAM,eAAe,CAAC;;;AAK9D;;GAEG;AACH,wBAAgB,iBAAiB,WAEhC;AAED;;;GAGG;AACH,wBAAgB,YAAY,WAE3B;AAED,qBAkBa,oBAAoB;IAE/B;;;;;;;OAOG;WACW,OAAO,CAAC,WAAW,EAAE;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,GAAG;QAAC,SAAS,EAAE,MAAM,CAAA;KAAC,GAAG,mBAAmB,CAAC,oBAAoB,CAAC;yCAV3G,oBAAoB;0CAApB,oBAAoB;0CAApB,oBAAoB;CA8BhC"}
1
+ {"version":3,"file":"dynamic-content.module.d.ts","sourceRoot":"","sources":["../../../src/services/dynamic-content/dynamic-content.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAY,MAAM,eAAe,CAAC;;;AAK9D;;GAEG;AACH,wBAAgB,iBAAiB,WAEhC;AAED;;;GAGG;AACH,wBAAgB,YAAY,WAE3B;AAED,qBAkBa,oBAAoB;IAE/B;;;;;;OAMG;WACW,OAAO,CAAC,WAAW,EAAE;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,GAAG;QAAC,SAAS,EAAE,MAAM,CAAA;KAAC,GAAG,mBAAmB,CAAC,oBAAoB,CAAC;yCAT3G,oBAAoB;0CAApB,oBAAoB;0CAApB,oBAAoB;CA6BhC"}
@@ -2,8 +2,8 @@ import { ChangeDetectorRef, OnDestroy, PipeTransform } from '@angular/core';
2
2
  import { DynamicContentService } from './dynamic-content.service';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class DynamicContentPipe implements PipeTransform, OnDestroy {
5
- private service;
6
- private cd;
5
+ private readonly service;
6
+ private readonly cd;
7
7
  /** Last query value */
8
8
  private lastQuery?;
9
9
  /** Subscription to retrieve media path */
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-content.pipe.d.ts","sourceRoot":"","sources":["../../../src/services/dynamic-content/dynamic-content.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAQ,aAAa,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;;AAElE,qBACa,kBAAmB,YAAW,aAAa,EAAE,SAAS;IAUrD,OAAO,CAAC,OAAO;IAAyB,OAAO,CAAC,EAAE;IAT9D,wBAAwB;IACxB,OAAO,CAAC,SAAS,CAAC,CAAS;IAE3B,0CAA0C;IAC1C,OAAO,CAAC,iBAAiB,CAAC,CAAe;IAEzC,wBAAwB;IACxB,OAAO,CAAC,SAAS,CAAM;gBAEH,OAAO,EAAE,qBAAqB,EAAU,EAAE,EAAE,iBAAiB;IAEjF,kBAAkB;IACX,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM;IAe/B,kBAAkB;IACX,WAAW,IAAI,IAAI;yCA7Bf,kBAAkB;uCAAlB,kBAAkB;CAkC9B"}
1
+ {"version":3,"file":"dynamic-content.pipe.d.ts","sourceRoot":"","sources":["../../../src/services/dynamic-content/dynamic-content.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAQ,aAAa,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;;AAElE,qBACa,kBAAmB,YAAW,aAAa,EAAE,SAAS;IAUrD,OAAO,CAAC,QAAQ,CAAC,OAAO;IAAyB,OAAO,CAAC,QAAQ,CAAC,EAAE;IAThF,wBAAwB;IACxB,OAAO,CAAC,SAAS,CAAC,CAAS;IAE3B,0CAA0C;IAC1C,OAAO,CAAC,iBAAiB,CAAC,CAAe;IAEzC,wBAAwB;IACxB,OAAO,CAAC,SAAS,CAAM;gBAEM,OAAO,EAAE,qBAAqB,EAAmB,EAAE,EAAE,iBAAiB;IAEnG,kBAAkB;IACX,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM;IAe/B,kBAAkB;IACX,WAAW,IAAI,IAAI;yCA7Bf,kBAAkB;uCAAlB,kBAAkB;CAkC9B"}
@@ -5,8 +5,8 @@ import * as i0 from "@angular/core";
5
5
  * Service for getting dynamic content path
6
6
  */
7
7
  export declare class DynamicContentService {
8
- private cmsOnlyAssetsPath;
9
- private store?;
8
+ private readonly cmsOnlyAssetsPath;
9
+ private readonly store?;
10
10
  readonly basePath: string;
11
11
  private readonly mediaFolder;
12
12
  constructor(dynamicContentPath: string, cmsOnlyAssetsPath: string, store?: Store<AssetPathOverrideStore> | undefined);
@@ -16,20 +16,22 @@ export declare class DynamicContentService {
16
16
  /**
17
17
  * Gets the full path of a content relative to the root
18
18
  * Content path doesn't consider any override, you will always get the same file
19
- *
20
- * @example getMediaPath('assets/imgs/my-image.png') will give you the basePath + 'assets/imgs/my-image.png'
21
- *
22
19
  * @param assetPath asset location in the root folder
20
+ * @example
21
+ * ```typescript
22
+ * getMediaPath('assets/imgs/my-image.png') // will give you the basePath + 'assets/imgs/my-image.png'
23
+ * ```
23
24
  */
24
25
  getContentPathStream(assetPath?: string): import("rxjs").Observable<string>;
25
26
  /**
26
27
  * Gets the stream that provides the full path of a media content
27
28
  * A Media content is always stored in the 'assets' media folder, no external content will be accessible through this function
28
29
  * If any override is applied to the content, returns the override path instead
29
- *
30
- * @example getMediaPathStream('imgs/my-image.png') will give you the basePath + mediaFolder + 'imgs/my-image.png'
31
- *
32
30
  * @param assetPath asset location in the media folder (e.g imgs/my-image.png)
31
+ * @example
32
+ * ```typescript
33
+ * getMediaPathStream('imgs/my-image.png') // will give you the basePath + mediaFolder + 'imgs/my-image.png'
34
+ * ```
33
35
  */
34
36
  getMediaPathStream(assetPath?: string): import("rxjs").Observable<string>;
35
37
  static ɵfac: i0.ɵɵFactoryDeclaration<DynamicContentService, [null, null, { optional: true; }]>;
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-content.service.d.ts","sourceRoot":"","sources":["../../../src/services/dynamic-content/dynamic-content.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,sBAAsB,EAA2B,MAAM,oBAAoB,CAAC;;AAKrF;;GAEG;AACH,qBACa,qBAAqB;IAMW,OAAO,CAAC,iBAAiB;IAC5C,OAAO,CAAC,KAAK,CAAC;IANtC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IAEjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEgB,kBAAkB,EAAE,MAAM,EAC5B,iBAAiB,EAAE,MAAM,EAC5C,KAAK,CAAC,2CAA+B;IAKrE,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,YAAY;IAOpB;;;;;;;OAOG;IACI,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM;IAI9C;;;;;;;;OAQG;IACI,kBAAkB,CAAC,SAAS,CAAC,EAAE,MAAM;yCAjDjC,qBAAqB;6CAArB,qBAAqB;CA6DjC"}
1
+ {"version":3,"file":"dynamic-content.service.d.ts","sourceRoot":"","sources":["../../../src/services/dynamic-content/dynamic-content.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,sBAAsB,EAA2B,MAAM,oBAAoB,CAAC;;AAKrF;;GAEG;AACH,qBACa,qBAAqB;IAMW,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IACrD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IAN/C,SAAgB,QAAQ,EAAE,MAAM,CAAC;IAEjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEgB,kBAAkB,EAAE,MAAM,EACnB,iBAAiB,EAAE,MAAM,EAC5C,KAAK,CAAC,2CAA+B;IAK9E,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,YAAY;IAOpB;;;;;;;;OAQG;IACI,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM;IAI9C;;;;;;;;;OASG;IACI,kBAAkB,CAAC,SAAS,CAAC,EAAE,MAAM;yCAnDjC,qBAAqB;6CAArB,qBAAqB;CA+DjC"}
@@ -1,3 +1,4 @@
1
1
  export * from './dynamic-content/index';
2
2
  export * from './request-parameters/index';
3
+ export * from './styling/index';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC"}
@@ -18,12 +18,11 @@ export interface PartialRequestParametersConfig extends Partial<RequestParameter
18
18
  export declare class RequestParametersService implements ParamsType {
19
19
  private _query;
20
20
  private _post;
21
- private config;
21
+ private readonly config;
22
22
  constructor(config: PartialRequestParametersConfig);
23
23
  /**
24
24
  * Depending on the strategy, set the internal values for the parameters.
25
25
  * See StorageStrategy for more info.
26
- *
27
26
  * @param key
28
27
  * @param value
29
28
  */
@@ -42,55 +41,46 @@ export declare class RequestParametersService implements ParamsType {
42
41
  };
43
42
  /**
44
43
  * Get a specific query parameter value, given the key.
45
- *
46
44
  * @param key
47
45
  */
48
46
  getQueryParameter(key: string): string | undefined;
49
47
  /**
50
48
  * Get a specific query parameter value as boolean, given the key.
51
- *
52
49
  * @param key
53
50
  */
54
51
  getQueryParameterAsBoolean(key: string): boolean | undefined;
55
52
  /**
56
53
  * Get a specific post parameter value, given the key.
57
- *
58
54
  * @param key
59
55
  */
60
56
  getPostParameter(key: string): string | undefined;
61
57
  /**
62
58
  * Get a specific post parameter value as boolean, given the key.
63
- *
64
59
  * @param key
65
60
  */
66
61
  getPostParameterAsBoolean(key: string): boolean | undefined;
67
62
  /**
68
63
  * Get a specific parameter value, given the key.
69
- *
70
64
  * @param key
71
65
  */
72
66
  getParameter(key: string): string | undefined;
73
67
  /**
74
68
  * Get a specific parameter value as boolean, given the key.
75
- *
76
69
  * @param key
77
70
  */
78
71
  getParameterAsBoolean(key: string): boolean | undefined;
79
72
  /**
80
73
  * Clear GET parameters from the storage
81
- *
82
74
  * @param paramsToClear the list on key that you want to clear in get parameters
83
75
  */
84
76
  clearQueryParameters(paramsToClear?: string[]): void;
85
77
  /**
86
78
  * Clear POST parameters from the storage
87
- *
88
79
  * @param paramsToClear the list on key that you want to clean in post parameters
89
80
  */
90
81
  clearPostParameters(paramsToClear?: string[]): void;
91
82
  /**
92
83
  * Get all the parameters in a map.
93
- *
94
84
  * @param priority the parameter to be given priority in case same key is in get and post params.
95
85
  */
96
86
  getParams(priority?: ParamsList): {
@@ -98,7 +88,6 @@ export declare class RequestParametersService implements ParamsType {
98
88
  };
99
89
  /**
100
90
  * Filter Parameters(both Query/POST) from the storage
101
- *
102
91
  * @param paramstoFilter the list on key that you want to filter from parameters
103
92
  * @param priority the priorty of the parameter type(POST/Query)
104
93
  */
@@ -1 +1 @@
1
- {"version":3,"file":"request-parameters.service.d.ts","sourceRoot":"","sources":["../../../src/services/request-parameters/request-parameters.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiC,uBAAuB,EAAkB,MAAM,6BAA6B,CAAC;;AAIrH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1C,MAAM,MAAM,UAAU,GAAG;KAAE,CAAC,IAAI,UAAU,GAAG;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC;CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,OAAO,CAAC,uBAAuB,CAAC;CAAG;AAE3F;;;GAGG;AACH,qBACa,wBAAyB,YAAW,UAAU;IACzD,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,KAAK,CAA4B;IAEzC,OAAO,CAAC,MAAM,CAA0B;gBAEa,MAAM,EAAE,8BAA8B;IAU3F;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAuCrB;;OAEG;IACH,IAAW,KAAK;;MAEf;IAED;;OAEG;IACH,IAAW,IAAI;;MAEd;IAED;;;;OAIG;IACI,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIzD;;;;OAIG;IACI,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAKnE;;;;OAIG;IACI,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIxD;;;;OAIG;IACI,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAKlE;;;;OAIG;IACI,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIpD;;;;OAIG;IACI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAK9D;;;;OAIG;IACI,oBAAoB,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE;IAYpD;;;;OAIG;IACI,mBAAmB,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE;IAYnD;;;;OAIG;IACI,SAAS,CAAC,QAAQ,GAAE,UAAoB;;;IAI/C;;;;;OAKG;IACI,qBAAqB,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,QAAQ,GAAE,UAAoB;;;yCAtL3E,wBAAwB;6CAAxB,wBAAwB;CAkMpC"}
1
+ {"version":3,"file":"request-parameters.service.d.ts","sourceRoot":"","sources":["../../../src/services/request-parameters/request-parameters.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiC,uBAAuB,EAAkB,MAAM,6BAA6B,CAAC;;AAIrH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1C,MAAM,MAAM,UAAU,GAAG;KAAE,CAAC,IAAI,UAAU,GAAG;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC;CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,OAAO,CAAC,uBAAuB,CAAC;CAAG;AAE3F;;;GAGG;AACH,qBACa,wBAAyB,YAAW,UAAU;IACzD,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,KAAK,CAA4B;IAEzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;gBAEI,MAAM,EAAE,8BAA8B;IAU3F;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAuCrB;;OAEG;IACH,IAAW,KAAK;;MAEf;IAED;;OAEG;IACH,IAAW,IAAI;;MAEd;IAED;;;OAGG;IACI,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIzD;;;OAGG;IACI,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAKnE;;;OAGG;IACI,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIxD;;;OAGG;IACI,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAKlE;;;OAGG;IACI,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIpD;;;OAGG;IACI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAK9D;;;OAGG;IACI,oBAAoB,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE;IAYpD;;;OAGG;IACI,mBAAmB,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE;IAYnD;;;OAGG;IACI,SAAS,CAAC,QAAQ,GAAE,UAAoB;;;IAI/C;;;;OAIG;IACI,qBAAqB,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,QAAQ,GAAE,UAAoB;;;yCA3K3E,wBAAwB;6CAAxB,wBAAwB;CAuLpC"}
@@ -0,0 +1,3 @@
1
+ export * from './style-lazy-loader.module';
2
+ export * from './style-lazy-loader.service';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/styling/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "../dynamic-content/dynamic-content.module";
3
+ export declare class StyleLazyLoaderModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<StyleLazyLoaderModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<StyleLazyLoaderModule, never, [typeof i1.DynamicContentModule], never>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<StyleLazyLoaderModule>;
7
+ }
8
+ //# sourceMappingURL=style-lazy-loader.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-lazy-loader.module.d.ts","sourceRoot":"","sources":["../../../src/services/styling/style-lazy-loader.module.ts"],"names":[],"mappings":";;AAGA,qBAGa,qBAAqB;yCAArB,qBAAqB;0CAArB,qBAAqB;0CAArB,qBAAqB;CAAG"}
@@ -0,0 +1,38 @@
1
+ import { DynamicContentService } from '../dynamic-content/index';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Interface to describe a style to lazy load from a url.
5
+ */
6
+ export interface StyleURL {
7
+ /** url to file */
8
+ href: string;
9
+ /** id of the HTML element */
10
+ id?: string;
11
+ /** html integrity attribute to verify fetched resources */
12
+ integrity?: string;
13
+ /** html crossOrigin attribute for CORS support. */
14
+ crossOrigin?: 'anonymous' | 'use-credentials' | '';
15
+ }
16
+ /**
17
+ * Service to lazy load a CSS file
18
+ */
19
+ export declare class StyleLazyLoader {
20
+ private readonly dcService;
21
+ private readonly DEFAULT_STYLE_ELEMENT_ID;
22
+ constructor(dcService: DynamicContentService);
23
+ /**
24
+ * Load a new CSS from an absolute URL, if we already HTML element exists with the url, otherwise
25
+ * @param styleUrlConfig object containing CSS File absolute URL to load, integrity and crossOrigin attributes
26
+ * and the styleId id of the dynamic style in the body tag.
27
+ */
28
+ loadStyleFromURL(styleUrlConfig: StyleURL): void;
29
+ /**
30
+ * Load a new CSS File
31
+ * @param styleUrlConfig CSS File config containing URL to load, integrity and crossOrigin attributes
32
+ * and the styleId id of the dynamic style in the body tag
33
+ */
34
+ asyncLoadStyleFromDynamicContent(styleUrlConfig: StyleURL): Promise<void>;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<StyleLazyLoader, never>;
36
+ static ɵprov: i0.ɵɵInjectableDeclaration<StyleLazyLoader>;
37
+ }
38
+ //# sourceMappingURL=style-lazy-loader.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-lazy-loader.service.d.ts","sourceRoot":"","sources":["../../../src/services/styling/style-lazy-loader.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;;AAEjE;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,WAAW,CAAC,EAAE,WAAW,GAAG,iBAAiB,GAAG,EAAE,CAAC;CACpD;AAED;;GAEG;AACH,qBAGa,eAAe;IAId,OAAO,CAAC,QAAQ,CAAC,SAAS;IAFtC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAoB;gBAEhC,SAAS,EAAE,qBAAqB;IAG7D;;;;OAIG;IACI,gBAAgB,CAAC,cAAc,EAAE,QAAQ;IAqBhD;;;;OAIG;IACU,gCAAgC,CAAC,cAAc,EAAE,QAAQ;yCAtC3D,eAAe;6CAAf,eAAe;CA6C3B"}
@@ -2,7 +2,6 @@ import type { Serializer } from '@o3r/core';
2
2
  import { AssetPathOverrideState } from './asset-path-override.state';
3
3
  /**
4
4
  * Deserializer
5
- *
6
5
  * @param rawObject
7
6
  */
8
7
  export declare const assetPathOverrideStorageDeserializer: (rawObject: any) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"asset-path-override.sync.d.ts","sourceRoot":"","sources":["../../../src/stores/asset-path-override/asset-path-override.sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,cAAe,GAAG,QAKlE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,UAAU,CAAC,sBAAsB,CAE3E,CAAC"}
1
+ {"version":3,"file":"asset-path-override.sync.d.ts","sourceRoot":"","sources":["../../../src/stores/asset-path-override/asset-path-override.sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,oCAAoC,cAAe,GAAG,QAKlE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,UAAU,CAAC,sBAAsB,CAE3E,CAAC"}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }