@magicfeedback/popup-sdk 1.5.0 → 1.6.0

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.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  sdkWarn,
10
10
  setLogger,
11
11
  style_default
12
- } from "./chunk-JSBMP4MI.mjs";
12
+ } from "./chunk-AN7JIVWB.mjs";
13
13
 
14
14
  // src/types/index.ts
15
15
  var POPUP_TRIGGER_CONDITION_STATUSES = [
@@ -214,7 +214,7 @@ function jsonForScript(value) {
214
214
  }
215
215
  function buildSurveyHtml(opts) {
216
216
  const env = opts.env === "development" ? "dev" : "prod";
217
- const version = opts.version ?? "2.2.4";
217
+ const version = opts.version ?? "2.2.8";
218
218
  const cdn = `https://cdn.jsdelivr.net/npm/@magicfeedback/native@${version}/dist/magicfeedback-sdk.browser.js`;
219
219
  const sid = jsonForScript(opts.surveyId);
220
220
  const pid = jsonForScript(opts.productId);
@@ -291,7 +291,7 @@ body{display:${bodyDisplay};justify-content:${pos.justifyContent};align-items:${
291
291
  #dd-form-wrapper{width:100%;flex:1 1 auto}
292
292
  #mf{width:100%;box-sizing:border-box;visibility:hidden}
293
293
  .deepdots-popup-main *{max-width:100%;box-sizing:border-box}
294
- #dd-logo{max-height:40px;max-width:100%;object-fit:contain}
294
+ #dd-logo{max-height:40px;max-width:100%;object-fit:contain;display:block;margin:12px 0 0 0}
295
295
  .deepdots-error-hint{display:none;margin:12px 0 0 0;padding:10px 12px;border-radius:6px;background:#FEF3C7;color:#92400E;border:1px solid #FCD34D;font-size:13px}
296
296
  /* Pantalla final: el HTML del editor de la plataforma (imagen + texto), centrado. */
297
297
  .deepdots-success{display:none;width:100%;text-align:center;padding:24px 0;color:${textPrimary}}
@@ -324,8 +324,8 @@ ${customCss}
324
324
  <div class="deepdots-popup-header">
325
325
  <h2 id="dd-title" class="deepdots-popup-title" hidden></h2>
326
326
  <button type="button" id="dd-close" aria-label="Close popup">
327
- <svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
328
- <path d="M6 6L18 18M6 18L18 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
327
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
328
+ <path d="M5 5L19 19M5 19L19 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="butt"/>
329
329
  </svg>
330
330
  </button>
331
331
  </div>
@@ -549,10 +549,12 @@ ${customCss}
549
549
  if(s.logoSize==='small'){ logoImg.style.maxHeight='30px'; }
550
550
  else if(s.logoSize==='medium'){ logoImg.style.maxHeight='50px'; }
551
551
  else if(s.logoSize==='large'){ logoImg.style.maxHeight='70px'; }
552
- if(s.logoPosition==='left'){ logoImg.style.margin='0 16px 20px 0'; logoImg.style.display='block'; logoImg.style.marginLeft='0'; }
553
- else if(s.logoPosition==='right'){ logoImg.style.margin='0 0 20px 16px'; logoImg.style.display='block'; logoImg.style.marginLeft='auto'; }
554
- else if(s.logoPosition==='center'){ logoImg.style.margin='0 auto 20px auto'; logoImg.style.display='block'; }
555
- main.insertBefore(logoImg, document.getElementById('dd-form-wrapper'));
552
+ if(s.logoPosition==='left'){ logoImg.style.margin='12px 16px 0 0'; logoImg.style.marginLeft='0'; }
553
+ else if(s.logoPosition==='right'){ logoImg.style.margin='12px 0 0 16px'; logoImg.style.marginLeft='auto'; }
554
+ else if(s.logoPosition==='center'){ logoImg.style.margin='12px auto 0 auto'; }
555
+ // Encima de la barra de progreso, como hermano del header (espejo de ui/logo.ts en
556
+ // web). Fuera de #dd-main, as\xED el logo no se va con el scroll del formulario.
557
+ popup.insertBefore(logoImg, progressEl);
556
558
  }
557
559
  if(s.startMessage && s.startMessage!==''){ onStartPage=true; updateButtons('start'); }
558
560
  else { updateButtons('in_progress_first'); }
@@ -747,7 +749,7 @@ var BrowserPopupRenderer = class {
747
749
  if (!this.container) return;
748
750
  this.visible = true;
749
751
  const container = this.container;
750
- void import("./renderPopup-PXJEND4Y.mjs").then(({ renderPopup }) => {
752
+ void import("./renderPopup-M6MKTDEH.mjs").then(({ renderPopup }) => {
751
753
  renderPopup(container, surveyId, productId, actions, emit, onClose, env, userId, style, sessionId, miniService, analyticsFeedbackSessionId, options);
752
754
  });
753
755
  }
@@ -2463,7 +2465,7 @@ var DeepdotsPopups = class {
2463
2465
  }
2464
2466
  if (!this.popupContainer) return;
2465
2467
  const container = this.popupContainer;
2466
- void import("./renderPopup-PXJEND4Y.mjs").then(({ renderPopup }) => {
2468
+ void import("./renderPopup-M6MKTDEH.mjs").then(({ renderPopup }) => {
2467
2469
  renderPopup(
2468
2470
  container,
2469
2471
  surveyId,