@liquidcommercedev/rmn-sdk 1.5.0-beta.18 → 1.5.0-beta.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,5 @@
1
+ import type { RMN_SPOT_TYPE } from 'enums';
1
2
  import type { ISpotOverlay } from '../element.interface';
2
3
  export declare function convertHexToRgba(hex: string, opacity?: number): string;
3
4
  export declare function generateGradientColor(overlay?: ISpotOverlay, fallback?: string): string;
4
- export declare function spotHtmlStringToElement(htmlString: string): HTMLElement;
5
+ export declare function spotHtmlStringToElement(htmlString: string, spotType: RMN_SPOT_TYPE): HTMLElement;
@@ -1,5 +1,10 @@
1
1
  import type { RMN_EVENT, RMN_SPOT_EVENT } from 'enums';
2
2
  import type { ISpot } from '../selection';
3
+ export type ActiveSpotsType = Map<string, // spotId
4
+ {
5
+ placementId: string;
6
+ spotElement: HTMLElement;
7
+ }>;
3
8
  export interface IFireEventParams {
4
9
  event: RMN_SPOT_EVENT;
5
10
  eventUrl: string;
@@ -6,7 +6,7 @@ export declare class EventService {
6
6
  private localStorageService;
7
7
  private intersectionObserver;
8
8
  private spotStates;
9
- private activeSpots;
9
+ private readonly activeSpots;
10
10
  private constructor();
11
11
  static getInstance(): EventService;
12
12
  subscribe(eventType: RMN_EVENT, callback: (data: IRmnEventMap[RMN_EVENT]) => void): () => void;
@@ -23,8 +23,9 @@ export declare class EventService {
23
23
  * @returns {void}
24
24
  */
25
25
  handleSpotState(placementId: string, updates: Partial<ILifecycleState>, publish?: boolean): void;
26
+ private handleClickEvent;
27
+ private handleImpressionEvent;
28
+ private getSpotIdByPlacementId;
26
29
  private deepMerge;
27
- private handleClick;
28
30
  private handleIntersectionObserver;
29
- private fireImpressionEvent;
30
31
  }
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.18",
5
+ "version": "1.5.0-beta.19",
6
6
  "homepage": "https://docs.liquidcommerce.co/rmn-sdk",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.esm.js",