@liquidcommercedev/rmn-sdk 1.5.0-beta.2 → 1.5.0-beta.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/dist/index.cjs +2710 -946
  2. package/dist/index.esm.js +2711 -947
  3. package/dist/types/common/helpers/event-type.helper.d.ts +8 -0
  4. package/dist/types/common/helpers/extract-deep.helper.d.ts +28 -0
  5. package/dist/types/common/helpers/index.d.ts +5 -0
  6. package/dist/types/common/helpers/utils.helper.d.ts +35 -0
  7. package/dist/types/enums.d.ts +8 -1
  8. package/dist/types/modules/element/component/skeleton/index.d.ts +2 -0
  9. package/dist/types/modules/element/component/skeleton/skeleton.component.d.ts +3 -0
  10. package/dist/types/modules/element/component/skeleton/skeleton.interface.d.ts +13 -0
  11. package/dist/types/modules/element/component/skeleton/skeleton.template.d.ts +2 -0
  12. package/dist/types/modules/element/element.constant.d.ts +3 -0
  13. package/dist/types/modules/element/element.interface.d.ts +5 -2
  14. package/dist/types/modules/element/element.service.d.ts +11 -0
  15. package/dist/types/modules/element/template/helper.d.ts +2 -1
  16. package/dist/types/modules/event/event.interface.d.ts +11 -32
  17. package/dist/types/modules/event/event.service.d.ts +11 -27
  18. package/dist/types/modules/event/index.d.ts +0 -1
  19. package/dist/types/modules/{event/helpers → helper-service}/index.d.ts +1 -0
  20. package/dist/types/modules/{event/helpers → helper-service}/intersection.service.d.ts +1 -1
  21. package/dist/types/modules/helper-service/localstorage.service.d.ts +77 -0
  22. package/dist/types/modules/{event/pubsub.d.ts → helper-service/pubsub.service.d.ts} +8 -8
  23. package/dist/types/modules/{event/helpers → helper-service}/resize.service.d.ts +1 -1
  24. package/dist/types/modules/monitor/index.d.ts +2 -0
  25. package/dist/types/modules/monitor/monitor.enums.d.ts +4 -0
  26. package/dist/types/modules/monitor/monitor.interface.d.ts +16 -0
  27. package/dist/types/modules/monitor/monitor.service.d.ts +12 -0
  28. package/dist/types/modules/monitor/monitors/datalayer.monitor.d.ts +12 -0
  29. package/dist/types/modules/selection/selection.interface.d.ts +10 -2
  30. package/dist/types/modules/selection/selection.service.d.ts +1 -0
  31. package/dist/types/rmn-client.d.ts +17 -25
  32. package/dist/types/rmn-client.helper.d.ts +41 -0
  33. package/dist/types/types.d.ts +5 -4
  34. package/package.json +1 -1
  35. package/umd/liquidcommerce-rmn-sdk.min.js +1 -1
  36. package/dist/types/modules/element/component/utils.d.ts +0 -1
  37. package/dist/types/modules/event/helpers/localstorage.service.d.ts +0 -26
  38. /package/dist/types/{static.constant.d.ts → example.constant.d.ts} +0 -0
@@ -0,0 +1,41 @@
1
+ import type { IInjectSpotElement } from 'modules/element';
2
+ import type { ISpots } from 'modules/selection';
3
+ /**
4
+ * Checks if the current environment is a browser environment.
5
+ *
6
+ * @return {boolean} - Whether the current environment is a browser environment.
7
+ */
8
+ export declare function isBrowserEnvironment(): boolean;
9
+ /**
10
+ * Validates the inject data by preventing duplicate placement ids and non-existent spot types.
11
+ *
12
+ * @param {IInjectSpotElement[]} inject - The inject data.
13
+ * @return {IInjectSpotElement[]} - The validated inject data.
14
+ */
15
+ export declare function validateInjectData(inject: IInjectSpotElement[]): IInjectSpotElement[];
16
+ /**
17
+ * Clears the placement element by removing all its children.
18
+ *
19
+ * @param {string} placementId - The placement id.
20
+ *
21
+ * @return {void}
22
+ */
23
+ export declare function clearPlacement(placementId: string): void;
24
+ /**
25
+ * Prepares the spot placement for rendering by taking care of its styling.
26
+ *
27
+ * @param {HTMLElement} placement - The placement element.
28
+ *
29
+ * @return {void}
30
+ */
31
+ export declare function prepareSpotPlacement(placement: HTMLElement): void;
32
+ /**
33
+ * Waits for the DOM to be ready before continuing.
34
+ *
35
+ * @return {Promise<void>} - A promise that resolves when the DOM is ready.
36
+ */
37
+ export declare function waitForDOM(): Promise<void>;
38
+ export declare function useSpotSelectionExample(inject: IInjectSpotElement[]): Promise<ISpots | {
39
+ error: string;
40
+ }>;
41
+ export declare function setUserId(): void;
@@ -1,10 +1,11 @@
1
- import type { IEventMap } from './modules/event';
2
1
  export type { IInjectSpotElement, IInjectSpotElementConfig, IInjectSpotElementParams, IRmnCreateSpotElementConfig, ISpotColors, ISpotOverlay, } from 'modules/element';
3
2
  export type { CarouselNavPositionType, ICarouselButtonOptions, ICarouselDotOptions, ICarouselOptions, } from 'modules/element/component/carousel';
3
+ export type { ILifecycleState, ILSDisplayConfig, ILSDom, ILSIdentifier, ILSState, IRmnEventMap, IRmnSpotEvent, } from 'modules/event';
4
4
  export type { ISpots, RmnFilterType, RmnSpotType } from 'modules/selection';
5
5
  export { ISpot, ISpotEvent, ISpotSelectionParams } from 'modules/selection';
6
- import type { RMN_ENV, RMN_SPOT_EVENT } from 'enums';
6
+ import type { RMN_ENV, RMN_EVENT } from 'enums';
7
7
  import type { IInjectSpotElementParams } from 'modules/element';
8
+ import type { IRmnEventMap } from 'modules/event';
8
9
  import type { ISpots, ISpotSelectionParams } from 'modules/selection';
9
10
  export interface IRmnClient {
10
11
  spotSelection(params: ISpotSelectionParams): Promise<ISpots | {
@@ -13,8 +14,8 @@ export interface IRmnClient {
13
14
  injectSpotElement(params: IInjectSpotElementParams): Promise<void>;
14
15
  }
15
16
  export interface IRmnEventManager {
16
- subscribe: (eventType: RMN_SPOT_EVENT, callback: (data: IEventMap[RMN_SPOT_EVENT]) => void) => () => void;
17
- publish: (eventType: RMN_SPOT_EVENT, data: IEventMap[RMN_SPOT_EVENT]) => void;
17
+ subscribe: (eventType: RMN_EVENT, callback: (data: IRmnEventMap[RMN_EVENT]) => void) => () => void;
18
+ publish: (eventType: RMN_EVENT, data: IRmnEventMap[RMN_EVENT]) => void;
18
19
  destroySpot: (placementId: string) => void;
19
20
  }
20
21
  export interface IRmnConfig {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@liquidcommercedev/rmn-sdk",
3
3
  "description": "LiquidCommerce RMN SDK",
4
4
  "author": "LiquidCommerce Tech",
5
- "version": "1.5.0-beta.2",
5
+ "version": "1.5.0-beta.20",
6
6
  "homepage": "https://docs.liquidcommerce.co/rmn-sdk",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.esm.js",