builder-settings-types 0.0.371 → 0.0.373
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.
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
align-items: center;
|
|
355
355
|
justify-content: center;
|
|
356
356
|
line-height: 1;
|
|
357
|
-
`,n.addEventListener("click",()=>this.closePopup()),i.appendChild(s),i.appendChild(n),e.appendChild(i);const o=document.createElement("div");return o.classList.add("multi-language-popup-content"),this.props.languages.forEach(a=>{var h;const l=((h=this.value)==null?void 0:h[a])||"",r=this.createTextareaRow(a,l);o.appendChild(r)}),e.appendChild(o),t.appendChild(e),t.addEventListener("click",a=>{a.target===t&&this.closePopup()}),t}showPopup(){this.popup||(this.popup=this.createPopup(),document.body.appendChild(this.popup))}closePopup(){this.popup&&(document.body.removeChild(this.popup),this.popup=null)}draw(){const t=document.createElement("div");t.classList.add("simple-multi-language-wrapper");const e=document.createElement("div");e.classList.add("simple-multi-language-title"),e.style.cssText=`
|
|
357
|
+
`,n.addEventListener("click",()=>this.closePopup()),i.appendChild(s),i.appendChild(n),e.appendChild(i);const o=document.createElement("div");return o.classList.add("multi-language-popup-content"),this.props.languages.forEach(a=>{var h;const l=((h=this.value)==null?void 0:h[a])||"",r=this.createTextareaRow(a,l);o.appendChild(r)}),e.appendChild(o),t.appendChild(e),t.addEventListener("click",a=>{a.target===t&&this.closePopup()}),t}showPopup(){this.popup||(this.popup=this.createPopup(),document.body.appendChild(this.popup))}closePopup(){this.popup&&(document.body.removeChild(this.popup),this.popup=null)}draw(){if(window.testDraws=window.testDraws||[],window.testDraws.filter(l=>l==this.value.$id).length){console.log("opaaaaaaaaaaaaa");debugger}window.testDraw.push(this.value.$id);const t=document.createElement("div");t.classList.add("simple-multi-language-wrapper");const e=document.createElement("div");e.classList.add("simple-multi-language-title"),e.style.cssText=`
|
|
358
358
|
display: flex;
|
|
359
359
|
justify-content: space-between;
|
|
360
360
|
align-items: center;
|
|
@@ -124,7 +124,7 @@ function it(c) {
|
|
|
124
124
|
}
|
|
125
125
|
return c;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Dt(c) {
|
|
128
128
|
switch (c) {
|
|
129
129
|
case "number":
|
|
130
130
|
return 0;
|
|
@@ -206,7 +206,7 @@ const I = class I {
|
|
|
206
206
|
const i = document.createElement("div");
|
|
207
207
|
i.className = t.wrapperClassName || "";
|
|
208
208
|
const s = document.createElement("input");
|
|
209
|
-
this.inputEl = s, s.value = String(t.value ||
|
|
209
|
+
this.inputEl = s, s.value = String(t.value || Dt(t.inputType)), s.type = t.inputType, s.placeholder = t.placeholder || "", s.className = t.inputClassName || "", this.dataPropsPath && s.setAttribute("data-test-id", this.dataPropsPath);
|
|
210
210
|
const n = (a) => {
|
|
211
211
|
const l = a.target;
|
|
212
212
|
let r = l.value;
|
|
@@ -361,7 +361,7 @@ const dt = (c, t, e) => {
|
|
|
361
361
|
return `rgba(${s}, ${n}, ${o}, ${e})`;
|
|
362
362
|
}
|
|
363
363
|
return c;
|
|
364
|
-
},
|
|
364
|
+
}, At = (c) => [
|
|
365
365
|
"red",
|
|
366
366
|
"green",
|
|
367
367
|
"blue",
|
|
@@ -466,7 +466,7 @@ const dt = (c, t, e) => {
|
|
|
466
466
|
"at",
|
|
467
467
|
"contain",
|
|
468
468
|
"cover"
|
|
469
|
-
].includes(t) ? !1 : /^#[0-9a-f]{3,8}$/i.test(t) || /^rgb/i.test(c) || /^hsl/i.test(c) ||
|
|
469
|
+
].includes(t) ? !1 : /^#[0-9a-f]{3,8}$/i.test(t) || /^rgb/i.test(c) || /^hsl/i.test(c) || At(t);
|
|
470
470
|
}, yt = (c) => {
|
|
471
471
|
const t = [];
|
|
472
472
|
return c.forEach((e, i) => {
|
|
@@ -478,7 +478,7 @@ const dt = (c, t, e) => {
|
|
|
478
478
|
const l = Nt(n);
|
|
479
479
|
l.position = Math.max(0, Math.min(100, Math.round(o))), t.push(l);
|
|
480
480
|
}), t;
|
|
481
|
-
},
|
|
481
|
+
}, A = (c) => {
|
|
482
482
|
const t = c.stops && c.stops.length ? c.stops : [{ color: "#000000", position: 0, opacity: 100 }];
|
|
483
483
|
return {
|
|
484
484
|
type: c.type && ["linear", "radial", "solid"].includes(c.type) ? c.type : "linear",
|
|
@@ -493,7 +493,7 @@ const dt = (c, t, e) => {
|
|
|
493
493
|
const t = c.replace(/;$/, "").trim();
|
|
494
494
|
if (Rt(t)) {
|
|
495
495
|
const s = Nt(t);
|
|
496
|
-
return
|
|
496
|
+
return A({ type: "solid", angle: 0, stops: [s] });
|
|
497
497
|
}
|
|
498
498
|
const e = Ct(t, "linear-gradient");
|
|
499
499
|
if (e) {
|
|
@@ -514,12 +514,12 @@ const dt = (c, t, e) => {
|
|
|
514
514
|
"to top left": 315
|
|
515
515
|
}[a] ?? 90, o = s.slice(1));
|
|
516
516
|
const l = yt(o);
|
|
517
|
-
return l.length ?
|
|
517
|
+
return l.length ? A({ type: "linear", angle: n, stops: l }) : null;
|
|
518
518
|
}
|
|
519
519
|
const i = Ct(t, "radial-gradient");
|
|
520
520
|
if (i) {
|
|
521
521
|
const s = ft(i), n = s[0] && !Gt(s[0]) ? s.slice(1) : s, o = yt(n);
|
|
522
|
-
return o.length ?
|
|
522
|
+
return o.length ? A({ type: "radial", angle: 0, stops: o }) : null;
|
|
523
523
|
}
|
|
524
524
|
return null;
|
|
525
525
|
}, T = (c) => {
|
|
@@ -1216,16 +1216,16 @@ const P = class P extends w {
|
|
|
1216
1216
|
const t = this.originalDefault;
|
|
1217
1217
|
if (typeof t == "string") {
|
|
1218
1218
|
if (t.startsWith("var(--"))
|
|
1219
|
-
return
|
|
1219
|
+
return A({
|
|
1220
1220
|
type: "solid",
|
|
1221
1221
|
angle: 0,
|
|
1222
1222
|
stops: [{ color: t, position: 0, opacity: 100 }]
|
|
1223
1223
|
});
|
|
1224
1224
|
const i = V(t);
|
|
1225
1225
|
if (i)
|
|
1226
|
-
return
|
|
1226
|
+
return A(i);
|
|
1227
1227
|
}
|
|
1228
|
-
return
|
|
1228
|
+
return A(t && typeof t == "object" ? t : {
|
|
1229
1229
|
type: "linear",
|
|
1230
1230
|
angle: 90,
|
|
1231
1231
|
stops: [
|
|
@@ -1236,11 +1236,11 @@ const P = class P extends w {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
setValue(t) {
|
|
1238
1238
|
let e = null;
|
|
1239
|
-
typeof t == "string" ? t.startsWith("var(--") ? e =
|
|
1239
|
+
typeof t == "string" ? t.startsWith("var(--") ? e = A({
|
|
1240
1240
|
type: "solid",
|
|
1241
1241
|
angle: 0,
|
|
1242
1242
|
stops: [{ color: t, position: 0, opacity: 100 }]
|
|
1243
|
-
}) : e = V(t) : t && typeof t == "object" && (e =
|
|
1243
|
+
}) : e = V(t) : t && typeof t == "object" && (e = A(t)), e || (e = this.defaultValue()), this.value = e, this.setLinkedGlobalVariableFrom(t ?? e), this.updateUI(), this.isPopoverOpen && this.refreshPopoverContent(), this.triggerChange(), this.pendingSolidColor = null, this.updateUnlinkButtonVisibility();
|
|
1244
1244
|
}
|
|
1245
1245
|
updateUI() {
|
|
1246
1246
|
if (this.previewEl && this.value)
|
|
@@ -3839,12 +3839,12 @@ function Be(c) {
|
|
|
3839
3839
|
}
|
|
3840
3840
|
const e = document.createElement("div");
|
|
3841
3841
|
e.className = "upload-section";
|
|
3842
|
-
const i =
|
|
3842
|
+
const i = De(c);
|
|
3843
3843
|
e.appendChild(i), t.appendChild(e);
|
|
3844
3844
|
}
|
|
3845
3845
|
return t;
|
|
3846
3846
|
}
|
|
3847
|
-
function
|
|
3847
|
+
function De(c) {
|
|
3848
3848
|
if (c.uploadMethod === "input") {
|
|
3849
3849
|
const t = document.createElement("label");
|
|
3850
3850
|
t.className = "upload-label", t.innerHTML = `<div class="upload-placeholder">${st}<span>Click to upload image</span></div>`;
|
|
@@ -3867,7 +3867,7 @@ function Ae(c) {
|
|
|
3867
3867
|
}), t;
|
|
3868
3868
|
}
|
|
3869
3869
|
}
|
|
3870
|
-
function
|
|
3870
|
+
function Ae() {
|
|
3871
3871
|
const c = document.createElement("img");
|
|
3872
3872
|
c.className = "image-map-thumbnail-main";
|
|
3873
3873
|
const t = document.createElement("span");
|
|
@@ -3993,7 +3993,7 @@ function We(c, t, e) {
|
|
|
3993
3993
|
}
|
|
3994
3994
|
const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox="0 0 8 4" fill="none">
|
|
3995
3995
|
<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="#FF5630"/>
|
|
3996
|
-
</svg>`,
|
|
3996
|
+
</svg>`, D = class D extends w {
|
|
3997
3997
|
constructor(t = {}) {
|
|
3998
3998
|
var e;
|
|
3999
3999
|
super(t), this.inputType = {
|
|
@@ -4032,7 +4032,7 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
|
|
|
4032
4032
|
const i = document.createElement("div");
|
|
4033
4033
|
i.className = "image-map-section";
|
|
4034
4034
|
const s = document.createElement("h4");
|
|
4035
|
-
s.className = "image-map-section-title", s.textContent = "Upload/Replace Map Image", i.appendChild(s), this.mainDisplayElements =
|
|
4035
|
+
s.className = "image-map-section-title", s.textContent = "Upload/Replace Map Image", i.appendChild(s), this.mainDisplayElements = Ae();
|
|
4036
4036
|
const n = Re(
|
|
4037
4037
|
this.mainDisplayElements.thumbnailEl,
|
|
4038
4038
|
() => {
|
|
@@ -4061,7 +4061,7 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
|
|
|
4061
4061
|
);
|
|
4062
4062
|
}
|
|
4063
4063
|
openPopover() {
|
|
4064
|
-
|
|
4064
|
+
D.openInstance && D.openInstance !== this && D.openInstance.closePopover(), this.isPopoverOpen = !0, D.openInstance = this, this.value ? this.initialValue = JSON.parse(
|
|
4065
4065
|
JSON.stringify(this.value)
|
|
4066
4066
|
) : this.initialValue = { imageUrl: "", markers: [] }, this.value && this.historyManager.initialize(this.value.markers), this.popoverElements && (this.popoverElements.backdrop.style.display = "block", this.popoverElements.popover.style.display = "flex"), this.positionPopoverElement(), this.refreshPopoverContentAndScrollToBottom(), setTimeout(() => {
|
|
4067
4067
|
document.addEventListener("click", this.onBackgroundClick, !0);
|
|
@@ -4087,7 +4087,7 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
|
|
|
4087
4087
|
JSON.stringify(this.initialValue)
|
|
4088
4088
|
), this.mainDisplayElements && O(this.mainDisplayElements, this.value), this.triggerChange());
|
|
4089
4089
|
}
|
|
4090
|
-
this.isPopoverOpen = !1, this.draggingMarkerId = null, this.clearErrorTooltip(), this.popoverElements && (this.popoverElements.backdrop.style.display = "none", this.popoverElements.popover.style.display = "none"), document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0),
|
|
4090
|
+
this.isPopoverOpen = !1, this.draggingMarkerId = null, this.clearErrorTooltip(), this.popoverElements && (this.popoverElements.backdrop.style.display = "none", this.popoverElements.popover.style.display = "none"), document.removeEventListener("click", this.onBackgroundClick, !0), document.removeEventListener("keydown", this.handlePopoverKeydown, !0), D.openInstance === this && (D.openInstance = null);
|
|
4091
4091
|
}
|
|
4092
4092
|
}
|
|
4093
4093
|
positionPopoverElement() {
|
|
@@ -4398,8 +4398,8 @@ const je = `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="4" viewBox
|
|
|
4398
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
|
-
|
|
4402
|
-
let kt =
|
|
4401
|
+
D.openInstance = null;
|
|
4402
|
+
let kt = D;
|
|
4403
4403
|
class _e extends B {
|
|
4404
4404
|
constructor(t = {}) {
|
|
4405
4405
|
super({
|
|
@@ -4943,6 +4943,11 @@ class yi extends w {
|
|
|
4943
4943
|
this.popup && (document.body.removeChild(this.popup), this.popup = null);
|
|
4944
4944
|
}
|
|
4945
4945
|
draw() {
|
|
4946
|
+
if (window.testDraws = window.testDraws || [], window.testDraws.filter((l) => l == this.value.$id).length) {
|
|
4947
|
+
console.log("opaaaaaaaaaaaaa");
|
|
4948
|
+
debugger;
|
|
4949
|
+
}
|
|
4950
|
+
window.testDraw.push(this.value.$id);
|
|
4946
4951
|
const t = document.createElement("div");
|
|
4947
4952
|
t.classList.add("simple-multi-language-wrapper");
|
|
4948
4953
|
const e = document.createElement("div");
|
package/package.json
CHANGED