@liquidcommercedev/rmn-sdk 1.5.0-beta.17 → 1.5.0-beta.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +682 -205
- package/dist/index.esm.js +682 -205
- package/dist/types/modules/element/template/helper.d.ts +2 -1
- package/dist/types/modules/event/event.interface.d.ts +5 -0
- package/dist/types/modules/event/event.service.d.ts +4 -3
- package/dist/types/rmn-client.d.ts +1 -0
- package/package.json +1 -1
- package/umd/liquidcommerce-rmn-sdk.min.js +1 -1
@@ -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
|
}
|
@@ -4,6 +4,7 @@ import type { ISpot, ISpots, ISpotSelectionParams } from 'modules/selection';
|
|
4
4
|
import type { IRmnClient, IRmnConfig, IRmnEventManager } from 'types';
|
5
5
|
/**
|
6
6
|
* LiquidCommerce Rmn Client
|
7
|
+
*
|
7
8
|
* @class
|
8
9
|
*/
|
9
10
|
export declare class LiquidCommerceRmnClient implements IRmnClient {
|
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.
|
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",
|