@magicfeedback/popup-sdk 1.8.0 → 1.8.1

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.
@@ -1,4 +1,5 @@
1
1
  import {
2
+ BUSY_JS,
2
3
  LABELS,
3
4
  PRIMARY_COLOR_JS,
4
5
  RESOLVE_LOCALE_JS,
@@ -17,7 +18,7 @@ import {
17
18
  sdkWarn,
18
19
  setLogger,
19
20
  style_default
20
- } from "./chunk-322DDMX6.mjs";
21
+ } from "./chunk-EBJZDVC6.mjs";
21
22
 
22
23
  // src/react-native/index.tsx
23
24
  import { createContext, useContext, useEffect, useRef, useState } from "react";
@@ -431,6 +432,7 @@ ${customCss}
431
432
  var footer=document.getElementById('dd-footer');
432
433
  var spinner=document.getElementById('dd-spinner');
433
434
  var formHost=document.getElementById('mf');
435
+ var formWrapper=document.getElementById('dd-form-wrapper');
434
436
  var errorHint=document.getElementById('dd-error');
435
437
  var backBtn=document.getElementById('dd-back');
436
438
  var startBtn=document.getElementById('dd-start');
@@ -590,6 +592,7 @@ ${customCss}
590
592
  }
591
593
 
592
594
  ${PRIMARY_COLOR_JS}
595
+ ${BUSY_JS}
593
596
  ${REVEAL_JS}
594
597
  // El popup se ense\xF1a cuando el survey est\xE1 pintado; \`ready\` deja al host abrir su propio
595
598
  // Modal en ese momento en vez de montar un WebView en blanco.
@@ -600,6 +603,11 @@ ${REVEAL_JS}
600
603
 
601
604
  function setLoading(isLoading){
602
605
  spinner.style.display=isLoading?'flex':'none';
606
+ // El spinner no tapa el survey (28px en posicion absoluta), asi que sin esto el usuario
607
+ // puede seguir cambiando de opcion mientras se envia la pagina, y ese cambio ya no viaja
608
+ // con ella. Se bloquea el wrapper, que es el elemento estable: el div de dentro lo
609
+ // sustituye @magicfeedback/native por su propio contenedor al generar el survey.
610
+ ddSetSurveyBusy(formWrapper, isLoading);
603
611
  if(!isLoading){
604
612
  formHost.style.visibility='visible';
605
613
  // Fin de la carga, sea por survey cargado o por error. Entre p\xE1ginas es no-op: la
@@ -862,7 +870,7 @@ function createReactNativeRenderer() {
862
870
  }
863
871
 
864
872
  // src/ui/preload.ts
865
- var defaultLoader = () => import("./renderPopup-SNDPX5RX.mjs");
873
+ var defaultLoader = () => import("./renderPopup-E2OLIXIQ.mjs");
866
874
  var pending = null;
867
875
  function preloadRenderPopup(loader = defaultLoader) {
868
876
  if (pending) return pending;
@@ -935,7 +943,7 @@ var BrowserPopupRenderer = class {
935
943
  if (!this.container) return;
936
944
  this.visible = true;
937
945
  const container = this.container;
938
- void import("./renderPopup-SNDPX5RX.mjs").then(({ renderPopup }) => {
946
+ void import("./renderPopup-E2OLIXIQ.mjs").then(({ renderPopup }) => {
939
947
  renderPopup(container, surveyId, productId, actions, emit, onClose, env, userId, style, sessionId, miniService, analyticsFeedbackSessionId, options);
940
948
  });
941
949
  }
@@ -2781,7 +2789,7 @@ var DeepdotsPopups = class {
2781
2789
  }
2782
2790
  if (!this.popupContainer) return;
2783
2791
  const container = this.popupContainer;
2784
- void import("./renderPopup-SNDPX5RX.mjs").then(({ renderPopup }) => {
2792
+ void import("./renderPopup-E2OLIXIQ.mjs").then(({ renderPopup }) => {
2785
2793
  renderPopup(
2786
2794
  container,
2787
2795
  surveyId,