@magicfeedback/popup-sdk 1.17.1 → 1.17.2

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.
@@ -932,7 +932,7 @@ function createReactNativeRenderer() {
932
932
  }
933
933
 
934
934
  // src/ui/preload.ts
935
- var defaultLoader = () => import("./renderPopup-S3RU3Y6J.mjs");
935
+ var defaultLoader = () => import("./renderPopup-L2Q3KJAZ.mjs");
936
936
  var pending = null;
937
937
  function preloadRenderPopup(loader = defaultLoader) {
938
938
  if (pending) return pending;
@@ -1005,9 +1005,18 @@ var BrowserPopupRenderer = class {
1005
1005
  if (!this.container) return;
1006
1006
  this.visible = true;
1007
1007
  const container = this.container;
1008
- void import("./renderPopup-S3RU3Y6J.mjs").then(({ renderPopup }) => {
1009
- renderPopup(container, surveyId, productId, actions, emit, onClose, env, userId, style, sessionId, miniService, analyticsFeedbackSessionId, options);
1010
- });
1008
+ void import("./renderPopup-L2Q3KJAZ.mjs").then(
1009
+ ({ renderPopup }) => {
1010
+ renderPopup(container, surveyId, productId, actions, emit, onClose, env, userId, style, sessionId, miniService, analyticsFeedbackSessionId, options);
1011
+ },
1012
+ (error) => {
1013
+ this.visible = false;
1014
+ sdkWarn("[Deepdots] popup renderer failed to load:", error);
1015
+ }
1016
+ );
1017
+ }
1018
+ isShowing() {
1019
+ return this.visible;
1011
1020
  }
1012
1021
  hide() {
1013
1022
  this.visible = false;
@@ -2950,6 +2959,10 @@ var DeepdotsPopups = class {
2950
2959
  });
2951
2960
  }
2952
2961
  showDefinition(def) {
2962
+ if (this.renderer.isShowing?.()) {
2963
+ this.debug("Popup skipped: another popup is already open", def.id);
2964
+ return;
2965
+ }
2953
2966
  this.log("Showing popup (definition)", def);
2954
2967
  this.surveyToPopupId.set(def.surveyId, def.id);
2955
2968
  this.lastShown.set(def.id, Date.now());