@liquidcommercedev/rmn-sdk 1.5.0-beta.38 → 1.5.0-beta.39

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.
package/dist/index.cjs CHANGED
@@ -63,6 +63,7 @@ exports.RMN_EVENT = void 0;
63
63
  (function (RMN_EVENT) {
64
64
  RMN_EVENT["LIFECYCLE_STATE"] = "LIFECYCLE_STATE";
65
65
  RMN_EVENT["SPOT_EVENT"] = "SPOT_EVENT";
66
+ RMN_EVENT["RENDERED_SPOT_DATA"] = "RENDERED_SPOT_DATA";
66
67
  })(exports.RMN_EVENT || (exports.RMN_EVENT = {}));
67
68
  exports.RMN_SPOT_EVENT = void 0;
68
69
  (function (RMN_SPOT_EVENT) {
@@ -21466,6 +21467,12 @@ class BrowserRmnClient {
21466
21467
  spotElement,
21467
21468
  });
21468
21469
  placement.replaceChildren(spotElement);
21470
+ if (config === null || config === void 0 ? void 0 : config.listenRenderedSpotData) {
21471
+ this.spotManagerService.publish(exports.RMN_EVENT.RENDERED_SPOT_DATA, {
21472
+ placementId,
21473
+ data: [spotData],
21474
+ });
21475
+ }
21469
21476
  this.spotManagerService.updateSpotLifecycleState(placementId, {
21470
21477
  dom: {
21471
21478
  spotElement,
@@ -21559,6 +21566,12 @@ class BrowserRmnClient {
21559
21566
  return;
21560
21567
  }
21561
21568
  placement.replaceChildren(carouselElement);
21569
+ if (config === null || config === void 0 ? void 0 : config.listenRenderedSpotData) {
21570
+ this.spotManagerService.publish(exports.RMN_EVENT.RENDERED_SPOT_DATA, {
21571
+ placementId,
21572
+ data: spots,
21573
+ });
21574
+ }
21562
21575
  this.spotManagerService.updateSpotLifecycleState(placementId, {
21563
21576
  dom: {
21564
21577
  spotElement: carouselElement,
package/dist/index.esm.js CHANGED
@@ -61,6 +61,7 @@ var RMN_EVENT;
61
61
  (function (RMN_EVENT) {
62
62
  RMN_EVENT["LIFECYCLE_STATE"] = "LIFECYCLE_STATE";
63
63
  RMN_EVENT["SPOT_EVENT"] = "SPOT_EVENT";
64
+ RMN_EVENT["RENDERED_SPOT_DATA"] = "RENDERED_SPOT_DATA";
64
65
  })(RMN_EVENT || (RMN_EVENT = {}));
65
66
  var RMN_SPOT_EVENT;
66
67
  (function (RMN_SPOT_EVENT) {
@@ -21464,6 +21465,12 @@ class BrowserRmnClient {
21464
21465
  spotElement,
21465
21466
  });
21466
21467
  placement.replaceChildren(spotElement);
21468
+ if (config === null || config === void 0 ? void 0 : config.listenRenderedSpotData) {
21469
+ this.spotManagerService.publish(RMN_EVENT.RENDERED_SPOT_DATA, {
21470
+ placementId,
21471
+ data: [spotData],
21472
+ });
21473
+ }
21467
21474
  this.spotManagerService.updateSpotLifecycleState(placementId, {
21468
21475
  dom: {
21469
21476
  spotElement,
@@ -21557,6 +21564,12 @@ class BrowserRmnClient {
21557
21564
  return;
21558
21565
  }
21559
21566
  placement.replaceChildren(carouselElement);
21567
+ if (config === null || config === void 0 ? void 0 : config.listenRenderedSpotData) {
21568
+ this.spotManagerService.publish(RMN_EVENT.RENDERED_SPOT_DATA, {
21569
+ placementId,
21570
+ data: spots,
21571
+ });
21572
+ }
21560
21573
  this.spotManagerService.updateSpotLifecycleState(placementId, {
21561
21574
  dom: {
21562
21575
  spotElement: carouselElement,
@@ -55,7 +55,8 @@ export declare enum RMN_FILTER_PROPERTIES {
55
55
  }
56
56
  export declare enum RMN_EVENT {
57
57
  LIFECYCLE_STATE = "LIFECYCLE_STATE",
58
- SPOT_EVENT = "SPOT_EVENT"
58
+ SPOT_EVENT = "SPOT_EVENT",
59
+ RENDERED_SPOT_DATA = "RENDERED_SPOT_DATA"
59
60
  }
60
61
  export declare enum RMN_SPOT_EVENT {
61
62
  IMPRESSION = "IMPRESSION",
@@ -16,11 +16,12 @@ export interface ISpotOverlay {
16
16
  }
17
17
  export interface IInjectSpotElementConfig {
18
18
  fluid?: boolean;
19
- url?: string;
20
19
  colors?: ISpotColors;
21
- minScale?: number;
22
20
  overlay?: ISpotOverlay;
23
21
  carousel?: ICarouselOptions;
22
+ minScale?: number;
23
+ url?: string;
24
+ listenRenderedSpotData?: boolean;
24
25
  }
25
26
  export type IInjectSpotElementFilterType = Partial<Omit<RmnFilterType, RMN_FILTER_PROPERTIES.KEYWORDS> & {
26
27
  exactMatch?: string;
@@ -36,9 +36,14 @@ export interface IRmnSpotEvent {
36
36
  placementId: string;
37
37
  spotId: string;
38
38
  }
39
+ export interface IRmnRenderedSpotDataEvent {
40
+ placementId: string;
41
+ data: ISpot[];
42
+ }
39
43
  export interface IRmnEventMap {
40
44
  [RMN_EVENT.LIFECYCLE_STATE]: ILifecycleState;
41
45
  [RMN_EVENT.SPOT_EVENT]: IRmnSpotEvent;
46
+ [RMN_EVENT.RENDERED_SPOT_DATA]: IRmnRenderedSpotDataEvent;
42
47
  }
43
48
  export interface IRegisterSpotParams {
44
49
  placementId: string;
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.38",
5
+ "version": "1.5.0-beta.39",
6
6
  "homepage": "https://docs.liquidcommerce.co/rmn-sdk",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.esm.js",