@liquidcommercedev/rmn-sdk 1.5.0-beta.2 → 1.5.0-beta.21
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +2728 -953
- package/dist/index.esm.js +2729 -954
- package/dist/types/common/helpers/event-type.helper.d.ts +8 -0
- package/dist/types/common/helpers/extract-deep.helper.d.ts +28 -0
- package/dist/types/common/helpers/index.d.ts +5 -0
- package/dist/types/common/helpers/utils.helper.d.ts +35 -0
- package/dist/types/enums.d.ts +8 -1
- package/dist/types/modules/element/component/skeleton/index.d.ts +2 -0
- package/dist/types/modules/element/component/skeleton/skeleton.component.d.ts +3 -0
- package/dist/types/modules/element/component/skeleton/skeleton.interface.d.ts +13 -0
- package/dist/types/modules/element/component/skeleton/skeleton.template.d.ts +2 -0
- package/dist/types/modules/element/element.constant.d.ts +3 -0
- package/dist/types/modules/element/element.interface.d.ts +5 -2
- package/dist/types/modules/element/element.service.d.ts +11 -0
- package/dist/types/modules/element/template/helper.d.ts +2 -1
- package/dist/types/modules/event/event.interface.d.ts +11 -32
- package/dist/types/modules/event/event.service.d.ts +11 -27
- package/dist/types/modules/event/index.d.ts +0 -1
- package/dist/types/modules/{event/helpers → helper-service}/index.d.ts +1 -0
- package/dist/types/modules/{event/helpers → helper-service}/intersection.service.d.ts +1 -1
- package/dist/types/modules/helper-service/localstorage.service.d.ts +77 -0
- package/dist/types/modules/{event/pubsub.d.ts → helper-service/pubsub.service.d.ts} +8 -8
- package/dist/types/modules/{event/helpers → helper-service}/resize.service.d.ts +1 -1
- package/dist/types/modules/monitor/index.d.ts +2 -0
- package/dist/types/modules/monitor/monitor.enums.d.ts +4 -0
- package/dist/types/modules/monitor/monitor.interface.d.ts +16 -0
- package/dist/types/modules/monitor/monitor.service.d.ts +12 -0
- package/dist/types/modules/monitor/monitors/datalayer.monitor.d.ts +12 -0
- package/dist/types/modules/selection/selection.interface.d.ts +10 -2
- package/dist/types/modules/selection/selection.service.d.ts +1 -0
- package/dist/types/rmn-client.d.ts +17 -25
- package/dist/types/rmn-client.helper.d.ts +36 -0
- package/dist/types/types.d.ts +5 -4
- package/package.json +1 -1
- package/umd/liquidcommerce-rmn-sdk.min.js +1 -1
- package/dist/types/modules/element/component/utils.d.ts +0 -1
- package/dist/types/modules/event/helpers/localstorage.service.d.ts +0 -26
- /package/dist/types/{static.constant.d.ts → example.constant.d.ts} +0 -0
@@ -0,0 +1,36 @@
|
|
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
|
+
export declare function useSpotSelectionExample(inject: IInjectSpotElement[]): Promise<ISpots | {
|
33
|
+
error: string;
|
34
|
+
}>;
|
35
|
+
export declare function setUserId(): void;
|
36
|
+
export declare function initDOMObserver(elementIds: string[], callback: (element: HTMLElement) => void): MutationObserver;
|
package/dist/types/types.d.ts
CHANGED
@@ -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,
|
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:
|
17
|
-
publish: (eventType:
|
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.
|
5
|
+
"version": "1.5.0-beta.21",
|
6
6
|
"homepage": "https://docs.liquidcommerce.co/rmn-sdk",
|
7
7
|
"main": "./dist/index.cjs",
|
8
8
|
"module": "./dist/index.esm.js",
|