builder-settings-types 0.0.381 → 0.0.383

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,5 +1,5 @@
1
1
  const Ot = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2
- let dt = (c = 21) => {
2
+ let Mt = (c = 21) => {
3
3
  let t = "", e = crypto.getRandomValues(new Uint8Array(c |= 0));
4
4
  for (; c--; )
5
5
  t += Ot[e[c] & 63];
@@ -111,7 +111,7 @@ class Bt {
111
111
  this.observer && (this.observer.disconnect(), this.observer = void 0), this.observedElements.clear();
112
112
  }
113
113
  }
114
- const vt = new Bt();
114
+ const mt = new Bt();
115
115
  function it(c) {
116
116
  if (c === null || typeof c != "object") return c;
117
117
  if (c instanceof Date) return new Date(c.getTime());
@@ -144,7 +144,7 @@ function At(c) {
144
144
  }
145
145
  const I = class I {
146
146
  constructor(t = {}) {
147
- this.props = t, this.dataPropsPath = "", this.id = t.id || dt(), this.value = this.props.default, this.desktop = this.props.default, this.title = t.title || "", this.includeGetJson = t.includeGetJson !== void 0 ? t.includeGetJson : !0;
147
+ this.props = t, this.dataPropsPath = "", this.id = t.id || Mt(), this.value = this.props.default, this.desktop = this.props.default, this.title = t.title || "", this.includeGetJson = t.includeGetJson !== void 0 ? t.includeGetJson : !0;
148
148
  }
149
149
  static SetUploadUrl(t) {
150
150
  globalThis.DefaultUploadUrl = t, I.DefaultUploadUrl = t;
@@ -268,10 +268,10 @@ function R(c) {
268
268
  function M(c) {
269
269
  return c instanceof $;
270
270
  }
271
- function ft(c) {
271
+ function vt(c) {
272
272
  return R(c) || M(c);
273
273
  }
274
- const pt = (c, t, e) => {
274
+ const dt = (c, t, e) => {
275
275
  let i = !1, s = 0, n = 0, o = 0, a = 0;
276
276
  const l = (d) => {
277
277
  if (d.target.closest("button")) return;
@@ -432,7 +432,7 @@ const pt = (c, t, e) => {
432
432
  };
433
433
  }
434
434
  return { color: U(t) || t, position: 0, opacity: 100 };
435
- }, Ct = (c) => {
435
+ }, ft = (c) => {
436
436
  const t = [];
437
437
  let e = "", i = 0;
438
438
  for (let s = 0; s < c.length; s++) {
@@ -446,7 +446,7 @@ const pt = (c, t, e) => {
446
446
  e += n;
447
447
  }
448
448
  return e.trim() && t.push(e.trim()), t;
449
- }, yt = (c, t) => {
449
+ }, Ct = (c, t) => {
450
450
  const e = new RegExp(`${t}\\s*\\(`, "i"), i = c.match(e);
451
451
  if (!i) return null;
452
452
  const s = i.index + i[0].length;
@@ -467,7 +467,7 @@ const pt = (c, t, e) => {
467
467
  "contain",
468
468
  "cover"
469
469
  ].includes(t) ? !1 : /^#[0-9a-f]{3,8}$/i.test(t) || /^rgb/i.test(c) || /^hsl/i.test(c) || Dt(t);
470
- }, Et = (c) => {
470
+ }, yt = (c) => {
471
471
  const t = [];
472
472
  return c.forEach((e, i) => {
473
473
  const s = e.trim();
@@ -495,9 +495,9 @@ const pt = (c, t, e) => {
495
495
  const s = Nt(t);
496
496
  return D({ type: "solid", angle: 0, stops: [s] });
497
497
  }
498
- const e = yt(t, "linear-gradient");
498
+ const e = Ct(t, "linear-gradient");
499
499
  if (e) {
500
- const s = Ct(e);
500
+ const s = ft(e);
501
501
  let n = 90, o = s;
502
502
  const a = s[0];
503
503
  if (a.includes("deg")) {
@@ -513,12 +513,12 @@ const pt = (c, t, e) => {
513
513
  "to top right": 45,
514
514
  "to top left": 315
515
515
  }[a] ?? 90, o = s.slice(1));
516
- const l = Et(o);
516
+ const l = yt(o);
517
517
  return l.length ? D({ type: "linear", angle: n, stops: l }) : null;
518
518
  }
519
- const i = yt(t, "radial-gradient");
519
+ const i = Ct(t, "radial-gradient");
520
520
  if (i) {
521
- const s = Ct(i), n = s[0] && !Gt(s[0]) ? s.slice(1) : s, o = Et(n);
521
+ const s = ft(i), n = s[0] && !Gt(s[0]) ? s.slice(1) : s, o = yt(n);
522
522
  return o.length ? D({ type: "radial", angle: 0, stops: o }) : null;
523
523
  }
524
524
  return null;
@@ -623,7 +623,7 @@ const pt = (c, t, e) => {
623
623
  };
624
624
  X.STORAGE_KEY = "settingsLib_recentColors", X.MAX_COLORS = 18, X.colors = null;
625
625
  let z = X;
626
- const ut = (c, t) => {
626
+ const pt = (c, t) => {
627
627
  const e = document.createElement("div");
628
628
  e.className = "color-picker-recent-section";
629
629
  const i = document.createElement("div");
@@ -747,7 +747,7 @@ class Zt {
747
747
  const i = document.createElement("span");
748
748
  i.textContent = "Color";
749
749
  const s = document.createElement("button");
750
- s.className = "color-picker-close", s.innerHTML = Tt, s.addEventListener("click", () => this.close(!0)), e.appendChild(i), e.appendChild(s), pt(e, t);
750
+ s.className = "color-picker-close", s.innerHTML = Tt, s.addEventListener("click", () => this.close(!0)), e.appendChild(i), e.appendChild(s), dt(e, t);
751
751
  const n = document.createElement("div");
752
752
  n.className = "color-picker-area", this.colorArea = n;
753
753
  const o = document.createElement("div");
@@ -766,7 +766,7 @@ class Zt {
766
766
  p.className = "color-picker-opacity", this.opacitySlider = p;
767
767
  const u = document.createElement("div");
768
768
  u.className = "color-picker-opacity-marker", this.opacityMarker = u, p.appendChild(u), r.appendChild(h), r.appendChild(p), a.appendChild(l), a.appendChild(r);
769
- const C = ut((E) => {
769
+ const C = pt((E) => {
770
770
  var L;
771
771
  this.setColor(E), (L = this.onChange) == null || L.call(this, E, this.currentOpacity);
772
772
  }, this.recentScope);
@@ -963,7 +963,7 @@ class Jt {
963
963
  r.className = "color-picker-opacity embedded", this.opacitySlider = r;
964
964
  const h = document.createElement("div");
965
965
  h.className = "color-picker-opacity-marker", this.opacityMarker = h, r.appendChild(h), o.appendChild(a), o.appendChild(r), s.appendChild(n), s.appendChild(o);
966
- const d = ut((b) => {
966
+ const d = pt((b) => {
967
967
  const k = V(b);
968
968
  k && k.type !== "solid" ? this.onColorChange(b, this.currentOpacity) : (this.setColor(b), this.onColorChange(this.currentColor, this.currentOpacity));
969
969
  }, "all");
@@ -1335,7 +1335,7 @@ const P = class P extends w {
1335
1335
  t.appendChild(l);
1336
1336
  }
1337
1337
  const i = document.createElement("button");
1338
- i.type = "button", i.className = "gradient-popover-close", i.innerHTML = Tt, i.addEventListener("click", () => this.closePopover()), t.appendChild(i), pt(t, this.popoverEl, (l, r) => {
1338
+ i.type = "button", i.className = "gradient-popover-close", i.innerHTML = Tt, i.addEventListener("click", () => this.closePopover()), t.appendChild(i), dt(t, this.popoverEl, (l, r) => {
1339
1339
  this.popoverPosition = { left: l, top: r };
1340
1340
  });
1341
1341
  const s = document.createElement("div");
@@ -1565,7 +1565,7 @@ const P = class P extends w {
1565
1565
  a.type = "button", a.className = "gradient-add-stop", a.textContent = "+", n.appendChild(o), n.appendChild(a);
1566
1566
  const l = document.createElement("div");
1567
1567
  l.className = "gradient-stops", t.appendChild(n), t.appendChild(l), this.updateStopsList(l);
1568
- const r = ut((h) => {
1568
+ const r = pt((h) => {
1569
1569
  const d = V(h);
1570
1570
  d && (this.clearGlobalBindingForCustomChange(), this.value = d, this.switchType(d.type, !0), this.updateUI(), this.triggerChange());
1571
1571
  }, "all");
@@ -1881,7 +1881,7 @@ function Y(c, t) {
1881
1881
  const ot = class ot {
1882
1882
  constructor(t) {
1883
1883
  this.elementRef = null, this.isHidden = !1, this.custom = !1, this.initialValues = {}, this.changeTimeout = null, this.isHandlingChange = !1, this.changeHandlers = /* @__PURE__ */ new Set(), this.blurTimeout = null, this.lastChangeTime = 0, this.handleBlur = () => {
1884
- }, this.pendingBlurHandler = null, this.originalDefaultValues = {}, this.nestingLevel = 0, this.dataPropsPath = "", this.hide = !1, this.id = t.id || dt(), this.title = t.title, this.settings = t.settings, this.isCollapsed = t.collapsed ?? !1, this.isMain = t.main ?? !1, this.custom = t.custom ?? !1, this.nestingLevel = 0, this.includeGetJson = t.includeGetJson ?? !0, this.addItemCfg = t.addItem, this.deleteItemCfg = t.deleteItem, this.dataProps = t.dataProps, this.dataPropsPath = t.dataProps || "", this.hide = t.hide ?? !1, Object.assign(this, t.settings), this.initialValues = this.getValues(), this.originalDefaultValues = this.getDefaultValues(), this.propagateNestingLevel(), this.propagateDataPropsPath();
1884
+ }, this.pendingBlurHandler = null, this.originalDefaultValues = {}, this.nestingLevel = 0, this.dataPropsPath = "", this.hide = !1, this.id = t.id || Mt(), this.title = t.title, this.settings = t.settings, this.isCollapsed = t.collapsed ?? !1, this.isMain = t.main ?? !1, this.custom = t.custom ?? !1, this.nestingLevel = 0, this.includeGetJson = t.includeGetJson ?? !0, this.addItemCfg = t.addItem, this.deleteItemCfg = t.deleteItem, this.dataProps = t.dataProps, this.dataPropsPath = t.dataProps || "", this.hide = t.hide ?? !1, Object.assign(this, t.settings), this.initialValues = this.getValues(), this.originalDefaultValues = this.getDefaultValues(), this.propagateNestingLevel(), this.propagateDataPropsPath();
1885
1885
  }
1886
1886
  propagateNestingLevel() {
1887
1887
  const t = this.nestingLevel + 1;
@@ -2091,7 +2091,7 @@ const ot = class ot {
2091
2091
  const o = i.slice(this.addItemCfg.keyPrefix.length), a = Number(o);
2092
2092
  if (Number.isFinite(a)) {
2093
2093
  const l = this.addItemCfg.createItem(a);
2094
- ft(l) && (this.addSetting(i, l), n = l);
2094
+ vt(l) && (this.addSetting(i, l), n = l);
2095
2095
  }
2096
2096
  }
2097
2097
  n && (M(n) || R(n)) && typeof n.setValue == "function" && n.setValue(s);
@@ -2125,7 +2125,7 @@ const ot = class ot {
2125
2125
  p && t.startsWith(p) && this.addDeleteButtonToElement(l, t);
2126
2126
  }
2127
2127
  const h = o.querySelector(".sg-add-button-bottom");
2128
- h ? o.insertBefore(l, h) : o.appendChild(l), vt.trackElement(l), Q(l, this.nestingLevel + 1), lt(l, this.nestingLevel + 1);
2128
+ h ? o.insertBefore(l, h) : o.appendChild(l), mt.trackElement(l), Q(l, this.nestingLevel + 1), lt(l, this.nestingLevel + 1);
2129
2129
  const d = l.style.display;
2130
2130
  l.style.display = "none", l.offsetHeight, l.style.display = d, this.updateNestingStyles();
2131
2131
  }
@@ -2447,13 +2447,13 @@ const ot = class ot {
2447
2447
  h.innerHTML = `${d}<span style="margin-left:4px;">${this.addItemCfg.buttonLabel ?? "Add"}</span>`, h.addEventListener("click", (p) => {
2448
2448
  p.stopPropagation(), p.preventDefault();
2449
2449
  const u = this.getNextIndexFromPrefix(this.addItemCfg.keyPrefix), C = this.addItemCfg.createItem(u);
2450
- if (ft(C)) {
2450
+ if (vt(C)) {
2451
2451
  const m = `${this.addItemCfg.keyPrefix}${u}`;
2452
2452
  this.addSetting(m, C);
2453
2453
  }
2454
2454
  }), a.appendChild(h);
2455
2455
  }
2456
- return e.appendChild(i), e.appendChild(n), t.appendChild(e), t.appendChild(a), this.elementRef = t, vt.trackElement(t), setTimeout(() => {
2456
+ return e.appendChild(i), e.appendChild(n), t.appendChild(e), t.appendChild(a), this.elementRef = t, mt.trackElement(t), setTimeout(() => {
2457
2457
  this.updateNestingStyles();
2458
2458
  }, 0), this.pendingBlurHandler && (this.pendingBlurHandler = null), t;
2459
2459
  }
@@ -3360,7 +3360,7 @@ const oe = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewB
3360
3360
  <circle cx="6.7" cy="6.7" r="1.5" fill="#02CC59" opacity="0.3"/>
3361
3361
  </svg>
3362
3362
  `;
3363
- class gt extends w {
3363
+ class ut extends w {
3364
3364
  constructor(t = {}) {
3365
3365
  super(t), this.inputType = "button", this.previewWrapper = null, this.previewEl = null, this.emptyStateEl = null, this.errorContainer = null, this.messageListener = null, this.loadingSpinner = null, this.props.delete === void 0 && (this.props.delete = !0), this.props.maxFileSizeMB === void 0 && (this.props.maxFileSizeMB = 5), !this.value && t.defaultUrl && t.defaultUrl !== "" && (this.value = t.defaultUrl), this.setupMessageListener();
3366
3366
  }
@@ -3484,7 +3484,7 @@ const st = `
3484
3484
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
3485
3485
  <path d="M5 10.5L7.5 8M7.5 8L10 10.5M7.5 8V13.625M12.5 10.9643C13.2634 10.3338 13.75 9.37996 13.75 8.3125C13.75 6.41402 12.211 4.875 10.3125 4.875C10.1759 4.875 10.0482 4.80375 9.97882 4.68609C9.16379 3.30302 7.65902 2.375 5.9375 2.375C3.34867 2.375 1.25 4.47367 1.25 7.0625C1.25 8.35381 1.77215 9.52317 2.61684 10.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
3486
3486
  </svg>
3487
- `, bt = `
3487
+ `, Et = `
3488
3488
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
3489
3489
  <path d="M1.5 7.5C1.5 7.5 3.00374 5.45116 4.22538 4.22868C5.44702 3.0062 7.1352 2.25 9 2.25C12.7279 2.25 15.75 5.27208 15.75 9C15.75 12.7279 12.7279 15.75 9 15.75C5.92268 15.75 3.32633 13.6907 2.51382 10.875M1.5 7.5V3M1.5 7.5H6" stroke="#637381" stroke-linecap="round" stroke-linejoin="round"/>
3490
3490
  </svg>
@@ -3535,7 +3535,7 @@ const st = `
3535
3535
  <svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox="0 0 8 4" fill="none">
3536
3536
  <path fill-rule="evenodd" clip-rule="evenodd" d="M0 0L2.58579 2.58579C3.36684 3.36684 4.63317 3.36683 5.41421 2.58579L8 0L0 0Z" fill="#1C252E"/>
3537
3537
  </svg>
3538
- `, F = 10, wt = 5, Ee = 24, be = 50, we = 5e3, xe = 800, Le = 0.8, ke = 700, Me = [
3538
+ `, F = 10, bt = 5, Ee = 24, be = 50, we = 5e3, xe = 800, Le = 0.8, ke = 700, Me = [
3539
3539
  "image/jpeg",
3540
3540
  "image/jpg",
3541
3541
  "image/png",
@@ -3554,7 +3554,7 @@ function Ie(c, t) {
3554
3554
  error: `File size (${(c.size / 1048576).toFixed(1)}MB) exceeds ${t}MB limit.`
3555
3555
  } : { valid: !0 };
3556
3556
  }
3557
- function xt(c, t, e) {
3557
+ function wt(c, t, e) {
3558
3558
  if (!c.length) return [];
3559
3559
  const i = t && t.width && t.height && t || e && e.width && e.height && e || null;
3560
3560
  return c.map((s) => {
@@ -3565,7 +3565,7 @@ function xt(c, t, e) {
3565
3565
  function nt(c) {
3566
3566
  return Number.isFinite(c) ? Math.max(0, Math.min(100, c)) : 0;
3567
3567
  }
3568
- function Lt(c, t, e) {
3568
+ function xt(c, t, e) {
3569
3569
  const i = (c - e.left) / e.width * 100, s = (t - e.top) / e.height * 100;
3570
3570
  return {
3571
3571
  x: nt(i),
@@ -3591,7 +3591,7 @@ function Se(c, t) {
3591
3591
  }
3592
3592
  return { index: e, name: i };
3593
3593
  }
3594
- const mt = class mt {
3594
+ const gt = class gt {
3595
3595
  static show(t, e = we) {
3596
3596
  this.injectStyles();
3597
3597
  const i = document.createElement("div");
@@ -3645,8 +3645,8 @@ const mt = class mt {
3645
3645
  }
3646
3646
  }
3647
3647
  };
3648
- mt.styleInjected = !1;
3649
- let _ = mt;
3648
+ gt.styleInjected = !1;
3649
+ let _ = gt;
3650
3650
  class Ne {
3651
3651
  constructor() {
3652
3652
  this.overlayElement = null, this.activePromise = null;
@@ -3781,7 +3781,7 @@ class Ve {
3781
3781
  this.handlers.clear(), this.cleanupMessageListener();
3782
3782
  }
3783
3783
  }
3784
- const kt = new Ve();
3784
+ const Lt = new Ve();
3785
3785
  function Oe(c, t) {
3786
3786
  const e = document.createElement("div");
3787
3787
  e.className = "marker-container", e.style.left = `${c.x}%`, e.style.top = `${c.y}%`, e.setAttribute("data-marker-id", String(c.id));
@@ -3902,7 +3902,7 @@ function Ge(c, t, e) {
3902
3902
  const i = document.createElement("label");
3903
3903
  i.className = "image-map-upload-label", i.innerHTML = `
3904
3904
  <div class="upload-icon upload-icon-default">${st}</div>
3905
- <div class="upload-icon upload-icon-replace">${bt}</div>
3905
+ <div class="upload-icon upload-icon-replace">${Et}</div>
3906
3906
  <span class="upload-text">Upload Image</span>
3907
3907
  `;
3908
3908
  const s = document.createElement("input");
@@ -3915,7 +3915,7 @@ function Ge(c, t, e) {
3915
3915
  const i = document.createElement("button");
3916
3916
  return i.type = "button", i.className = "image-map-upload-label", i.innerHTML = `
3917
3917
  <div class="upload-icon upload-icon-default">${st}</div>
3918
- <div class="upload-icon upload-icon-replace">${bt}</div>
3918
+ <div class="upload-icon upload-icon-replace">${Et}</div>
3919
3919
  <span class="upload-text">Upload Image</span>
3920
3920
  `, i.addEventListener("click", () => {
3921
3921
  window.postMessage(
@@ -3959,7 +3959,7 @@ function Ue(c, t) {
3959
3959
  const n = document.createElement("h3");
3960
3960
  n.className = "image-map-title", n.textContent = "Prize Map", s.appendChild(n);
3961
3961
  const o = document.createElement("button");
3962
- o.type = "button", o.className = "image-map-close-btn", o.innerHTML = he, o.addEventListener("click", () => void c()), s.appendChild(o), pt(s, i, (l, r) => {
3962
+ o.type = "button", o.className = "image-map-close-btn", o.innerHTML = he, o.addEventListener("click", () => void c()), s.appendChild(o), dt(s, i, (l, r) => {
3963
3963
  t(l, r);
3964
3964
  }), i.appendChild(s);
3965
3965
  const a = document.createElement("div");
@@ -3999,7 +3999,7 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
3999
3999
  super(t), this.inputType = {
4000
4000
  imageUrl: "text",
4001
4001
  markers: "text"
4002
- }, this.mainDisplayElements = null, this.popoverElements = null, this.imageElement = null, this.cursorTooltip = null, this.popoverPosition = null, this.isPopoverOpen = !1, this.confirmModal = new Ne(), this.previousImageDimensions = null, this.draggingMarkerId = null, this.historyManager = new Pe(), this.isUndoRedoOperation = !1, this.initialValue = null, this.lastMouseX = 0, this.lastMouseY = 0, this.errorTooltipEl = null, this.errorTooltipTimeoutId = null, this.props.maxMarkers = this.props.maxMarkers ?? ((e = this.props.prizeMap) == null ? void 0 : e.length) ?? F, this.props.maxFileSizeMB = this.props.maxFileSizeMB ?? wt, this.props.markerSize = this.props.markerSize ?? Ee, this.value || (this.value = { imageUrl: "", markers: [] }), kt.registerHandler(this.id, (i) => {
4002
+ }, this.mainDisplayElements = null, this.popoverElements = null, this.imageElement = null, this.cursorTooltip = null, this.popoverPosition = null, this.isPopoverOpen = !1, this.confirmModal = new Ne(), this.previousImageDimensions = null, this.draggingMarkerId = null, this.historyManager = new Pe(), this.isUndoRedoOperation = !1, this.initialValue = null, this.lastMouseX = 0, this.lastMouseY = 0, this.errorTooltipEl = null, this.errorTooltipTimeoutId = null, this.props.maxMarkers = this.props.maxMarkers ?? ((e = this.props.prizeMap) == null ? void 0 : e.length) ?? F, this.props.maxFileSizeMB = this.props.maxFileSizeMB ?? bt, this.props.markerSize = this.props.markerSize ?? Ee, this.value || (this.value = { imageUrl: "", markers: [] }), Lt.registerHandler(this.id, (i) => {
4003
4003
  this.handleFileManagerImageSelected(i);
4004
4004
  }), this.onBackgroundClick = (i) => {
4005
4005
  if (this.isPopoverOpen && this.popoverElements && !this.popoverElements.popover.contains(i.target)) {
@@ -4195,7 +4195,7 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
4195
4195
  const s = {
4196
4196
  width: i.naturalWidth || 0,
4197
4197
  height: i.naturalHeight || 0
4198
- }, n = xt(
4198
+ }, n = wt(
4199
4199
  ((o = this.value) == null ? void 0 : o.markers) || [],
4200
4200
  e,
4201
4201
  s
@@ -4211,7 +4211,7 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
4211
4211
  handleImageUpload(t) {
4212
4212
  const e = this.previousImageDimensions, i = Ie(
4213
4213
  t,
4214
- this.props.maxFileSizeMB || wt
4214
+ this.props.maxFileSizeMB || bt
4215
4215
  );
4216
4216
  if (!i.valid) {
4217
4217
  _.show(i.error);
@@ -4228,7 +4228,7 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
4228
4228
  const r = {
4229
4229
  width: l.naturalWidth || 0,
4230
4230
  height: l.naturalHeight || 0
4231
- }, h = xt(
4231
+ }, h = wt(
4232
4232
  ((d = this.value) == null ? void 0 : d.markers) || [],
4233
4233
  e,
4234
4234
  r
@@ -4252,7 +4252,7 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
4252
4252
  this.showErrorTooltip(r, t.clientX, t.clientY);
4253
4253
  return;
4254
4254
  }
4255
- const e = this.imageElement.getBoundingClientRect(), { x: i, y: s } = Lt(t.clientX, t.clientY, e), n = Vt(this.value.markers);
4255
+ const e = this.imageElement.getBoundingClientRect(), { x: i, y: s } = xt(t.clientX, t.clientY, e), n = Vt(this.value.markers);
4256
4256
  let o;
4257
4257
  this.props.prizeMap && this.props.prizeMap.length > 0 && (o = this.props.prizeMap[n - 1]);
4258
4258
  const a = {
@@ -4268,7 +4268,7 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
4268
4268
  var a;
4269
4269
  if (this.draggingMarkerId === null || !this.imageElement || !this.value)
4270
4270
  return;
4271
- const e = this.imageElement.getBoundingClientRect(), { x: i, y: s } = Lt(t.clientX, t.clientY, e), n = this.value.markers.map(
4271
+ const e = this.imageElement.getBoundingClientRect(), { x: i, y: s } = xt(t.clientX, t.clientY, e), n = this.value.markers.map(
4272
4272
  (l) => l.id === this.draggingMarkerId ? { ...l, x: i, y: s } : l
4273
4273
  ), o = (a = this.popoverElements) == null ? void 0 : a.popover.querySelector(
4274
4274
  `[data-marker-id="${this.draggingMarkerId}"]`
@@ -4395,11 +4395,11 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
4395
4395
  this.popoverElements.backdrop
4396
4396
  ), this.popoverElements.popover.parentElement && this.popoverElements.popover.parentElement.removeChild(
4397
4397
  this.popoverElements.popover
4398
- )), document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0), kt.unregisterHandler(this.id), this.confirmModal.cleanup();
4398
+ )), document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0), Lt.unregisterHandler(this.id), this.confirmModal.cleanup();
4399
4399
  }
4400
4400
  };
4401
4401
  A.openInstance = null;
4402
- let Mt = A;
4402
+ let kt = A;
4403
4403
  class _e extends B {
4404
4404
  constructor(t = {}) {
4405
4405
  super({
@@ -4743,13 +4743,15 @@ class Ci extends B {
4743
4743
  }
4744
4744
  class yi extends w {
4745
4745
  constructor(t) {
4746
- super(t), this.inputType = {}, this.container = null, this.defaultLanguage = "", this.uploadSettings = /* @__PURE__ */ new Map(), this.popup = null, t.default ? this.value = t.default : this.value || (this.value = {}), this.value.$id = dt();
4747
- const e = w.HasExplicitCurrentLanguage(), i = e ? w.CurrentLanguage() : "", s = w.DefaultLanguage;
4748
- this.defaultLanguage = e && i && t.languages.includes(i) ? i : s && t.languages.includes(s) ? s : t.languages[0];
4749
- const n = t.defaultValue || `Enter text in ${this.capitalizeFirstLetter(this.defaultLanguage)}`;
4750
- t.languages.forEach((o) => {
4751
- var a, l;
4752
- o in (this.value || {}) || (this.value || (this.value = {}), o === this.defaultLanguage && n ? this.value[o] = ((a = t.default) == null ? void 0 : a[o]) || n : this.value[o] = ((l = t.default) == null ? void 0 : l[o]) || "");
4746
+ super(t), this.inputType = {}, this.container = null, this.defaultLanguage = "", this.uploadSettings = /* @__PURE__ */ new Map(), this.popup = null;
4747
+ const e = window;
4748
+ e.textElementListeners || (e.textElementListeners = /* @__PURE__ */ new Map()), t.default ? this.value = t.default : this.value || (this.value = {}), this.value.$id = this.id;
4749
+ const i = w.HasExplicitCurrentLanguage(), s = i ? w.CurrentLanguage() : "", n = w.DefaultLanguage;
4750
+ this.defaultLanguage = i && s && t.languages.includes(s) ? s : n && t.languages.includes(n) ? n : t.languages[0];
4751
+ const o = t.defaultValue || `Enter text in ${this.capitalizeFirstLetter(this.defaultLanguage)}`;
4752
+ t.languages.forEach((a) => {
4753
+ var l, r;
4754
+ a in (this.value || {}) || (this.value || (this.value = {}), a === this.defaultLanguage && o ? this.value[a] = ((l = t.default) == null ? void 0 : l[a]) || o : this.value[a] = ((r = t.default) == null ? void 0 : r[a]) || "");
4753
4755
  });
4754
4756
  }
4755
4757
  capitalizeFirstLetter(t) {
@@ -4794,7 +4796,7 @@ class yi extends w {
4794
4796
  i.classList.add("simple-multi-language-row");
4795
4797
  const s = document.createElement("label");
4796
4798
  if (s.classList.add("simple-language-label"), s.textContent = t.toUpperCase(), s.setAttribute("for", `textarea-${t}`), i.appendChild(s), this.props.multiImg) {
4797
- const n = new gt({
4799
+ const n = new ut({
4798
4800
  defaultUrl: e || "",
4799
4801
  title: "",
4800
4802
  id: `${this.id}_upload_${t}`
@@ -4973,50 +4975,48 @@ class yi extends w {
4973
4975
  s.style.color = "#000";
4974
4976
  }), s.addEventListener("mouseleave", () => {
4975
4977
  s.style.color = "#666";
4976
- }), s.addEventListener("click", (a) => {
4977
- a.preventDefault(), this.showPopup();
4978
- }), e.appendChild(i), e.appendChild(s), t.appendChild(e);
4979
- const n = document.createElement("div");
4980
- n.classList.add("simple-multi-language-content"), t.appendChild(n), this.container = t, this.renderContent(t), this.languageChangeUnsubscribe = w.onLanguageChange((a) => {
4981
- a && this.props.languages.includes(a) && (this.defaultLanguage = a), this.container && this.renderContent(this.container);
4978
+ }), s.addEventListener("click", (l) => {
4979
+ l.preventDefault(), this.showPopup();
4980
+ });
4981
+ const n = window.textElementListeners;
4982
+ if (this.id && !n.has(this.id)) {
4983
+ const l = (r) => {
4984
+ var p;
4985
+ const { type: h, data: d } = r.data || {};
4986
+ h === "TEXT_ELEMENT_CLICKED" && d.$id && (d == null ? void 0 : d.$id) === ((p = this.value) == null ? void 0 : p.$id) && this.showPopup();
4987
+ };
4988
+ window.addEventListener("message", l), n.set(this.id, l);
4989
+ }
4990
+ e.appendChild(i), e.appendChild(s), t.appendChild(e);
4991
+ const o = document.createElement("div");
4992
+ o.classList.add("simple-multi-language-content"), t.appendChild(o), this.container = t, this.renderContent(t), this.languageChangeUnsubscribe = w.onLanguageChange((l) => {
4993
+ l && this.props.languages.includes(l) && (this.defaultLanguage = l), this.container && this.renderContent(this.container);
4982
4994
  });
4983
- const o = () => {
4995
+ const a = () => {
4984
4996
  if (!this.container) return;
4985
4997
  this.container.querySelectorAll(
4986
4998
  ".simple-language-textarea"
4987
- ).forEach((l) => {
4988
- const r = l.getAttribute("data-full-placeholder") || "";
4989
- r && this.adaptPlaceholderToSingleLine(l, r);
4999
+ ).forEach((r) => {
5000
+ const h = r.getAttribute("data-full-placeholder") || "";
5001
+ h && this.adaptPlaceholderToSingleLine(r, h);
4990
5002
  });
4991
5003
  };
4992
- return window.addEventListener("resize", o), t;
5004
+ return window.addEventListener("resize", a), t;
4993
5005
  }
4994
5006
  setValue(t) {
4995
- var n;
4996
- super.setValue(t), this.value.$id = this.value.$id || t.$id;
4997
- const e = window;
4998
- e.textElementListeners || (e.textElementListeners = /* @__PURE__ */ new Map());
4999
- const i = (n = this.value) == null ? void 0 : n.$id, s = window.textElementListeners;
5000
- if (i && !s.has(i)) {
5001
- const o = (a) => {
5002
- const { type: l, data: r } = a.data || {};
5003
- l === "TEXT_ELEMENT_CLICKED" && (r == null ? void 0 : r.$id) === i && this.showPopup();
5004
- };
5005
- window.addEventListener("message", o), s.set(i, o);
5006
- }
5007
- this.container && this.props.languages.forEach((o) => {
5008
- var a;
5007
+ super.setValue(t), this.value.$id = this.value.$id || t.$id, this.container && this.props.languages.forEach((e) => {
5008
+ var i;
5009
5009
  if (this.props.multiImg) {
5010
- const l = this.uploadSettings.get(o);
5011
- l && l.setValue((t == null ? void 0 : t[o]) || "");
5010
+ const s = this.uploadSettings.get(e);
5011
+ s && s.setValue((t == null ? void 0 : t[e]) || "");
5012
5012
  } else {
5013
- const l = (a = this.container) == null ? void 0 : a.querySelector(
5014
- `#textarea-${o}`
5013
+ const s = (i = this.container) == null ? void 0 : i.querySelector(
5014
+ `#textarea-${e}`
5015
5015
  );
5016
- if (l) {
5017
- l.value = (t == null ? void 0 : t[o]) || "", this.autosizeTextarea(l, 3);
5018
- const r = l.getAttribute("data-full-placeholder") || "";
5019
- r && this.adaptPlaceholderToSingleLine(l, r);
5016
+ if (s) {
5017
+ s.value = (t == null ? void 0 : t[e]) || "", this.autosizeTextarea(s, 3);
5018
+ const n = s.getAttribute("data-full-placeholder") || "";
5019
+ n && this.adaptPlaceholderToSingleLine(s, n);
5020
5020
  }
5021
5021
  }
5022
5022
  });
@@ -5296,7 +5296,7 @@ class Li extends $ {
5296
5296
  title: "Background Image",
5297
5297
  collapsed: t == null ? void 0 : t.collapsed,
5298
5298
  settings: {
5299
- backgroundImage: new gt({
5299
+ backgroundImage: new ut({
5300
5300
  ...t == null ? void 0 : t.uploadProps,
5301
5301
  default: (t == null ? void 0 : t.backgroundImage) ?? ""
5302
5302
  }),
@@ -5335,7 +5335,7 @@ class ki extends $ {
5335
5335
  title: (t == null ? void 0 : t.title) ?? "Image",
5336
5336
  collapsed: t == null ? void 0 : t.collapsed,
5337
5337
  settings: {
5338
- image: new gt({
5338
+ image: new ut({
5339
5339
  ...t == null ? void 0 : t.uploadProps,
5340
5340
  default: (t == null ? void 0 : t.image) ?? ""
5341
5341
  }),
@@ -5365,7 +5365,7 @@ export {
5365
5365
  wi as HeaderTypographySettingSet,
5366
5366
  _e as HeightSetting,
5367
5367
  di as HtmlSetting,
5368
- Mt as ImageMapSetting,
5368
+ kt as ImageMapSetting,
5369
5369
  ki as ImageSettingSet,
5370
5370
  fi as MarginBottomSetting,
5371
5371
  xi as MarginSettingGroup,
@@ -5381,13 +5381,13 @@ export {
5381
5381
  Xt as TabSettingGroup,
5382
5382
  Xt as TabsSettingGroup,
5383
5383
  mi as Toggle,
5384
- gt as UploadSetting,
5384
+ ut as UploadSetting,
5385
5385
  Ze as WidthSetting,
5386
5386
  hi as asSettingGroupWithSettings,
5387
5387
  Yt as createSettingGroup,
5388
5388
  ci as createTabSettingGroup,
5389
5389
  R as isSetting,
5390
- ft as isSettingChild,
5390
+ vt as isSettingChild,
5391
5391
  M as isSettingGroup,
5392
5392
  Y as iterateSettings
5393
5393
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "builder-settings-types",
3
3
  "description": "builder settings",
4
- "version": "0.0.381",
4
+ "version": "0.0.383",
5
5
  "type": "module",
6
6
  "main": "dist/builder-settings-types.cjs.js",
7
7
  "module": "dist/builder-settings-types.es.js",