builder-settings-types 0.0.119 → 0.0.121
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/builder-settings-types.cjs.js +28 -28
- package/dist/builder-settings-types.es.js +196 -144
- package/dist/index.css +1 -1
- package/dist/index.d.ts +18 -0
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const
|
|
1
|
+
const A = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
2
2
|
let B = (c = 21) => {
|
|
3
3
|
let t = "", e = crypto.getRandomValues(new Uint8Array(c |= 0));
|
|
4
4
|
for (; c--; )
|
|
5
|
-
t +=
|
|
5
|
+
t += A[e[c] & 63];
|
|
6
6
|
return t;
|
|
7
7
|
};
|
|
8
|
-
function
|
|
8
|
+
function T(c, t) {
|
|
9
9
|
for (const e in c)
|
|
10
10
|
if (c.hasOwnProperty(e)) {
|
|
11
11
|
const i = c[e];
|
|
12
12
|
t(e, i);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const b = class b {
|
|
16
16
|
constructor(t) {
|
|
17
17
|
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.lastValues = {}, this.lastChangeTime = 0, this.CHANGE_DEBOUNCE = 100, this.handleBlur = () => {
|
|
18
18
|
}, this.pendingBlurHandler = null, this.id = t.id || B(), this.title = t.title, this.settings = t.settings, this.description = t.description, this.icon = t.icon, this.isCollapsed = t.collapsed ?? !1, this.isMain = t.main ?? !1, this.custom = t.custom ?? !1, this.hideCondition = t.hideCondition, this.onBlur = t.onBlur, Object.assign(this, t.settings), this.initialValues = this.getValues();
|
|
@@ -38,11 +38,11 @@ const w = class w {
|
|
|
38
38
|
Object.keys(s).length > 0 && (this.lastChangeTime = Date.now(), t(i), this.updateVisibility(), this.initialValues = i), this.isHandlingChange = !1;
|
|
39
39
|
}, 50));
|
|
40
40
|
};
|
|
41
|
-
return this.changeHandlers.clear(),
|
|
41
|
+
return this.changeHandlers.clear(), T(this.settings, (i, s) => {
|
|
42
42
|
const n = () => {
|
|
43
43
|
this.isHandlingChange || e();
|
|
44
44
|
};
|
|
45
|
-
this.changeHandlers.add(n), s instanceof
|
|
45
|
+
this.changeHandlers.add(n), s instanceof b, s.setOnChange(n);
|
|
46
46
|
}), this;
|
|
47
47
|
}
|
|
48
48
|
setOnBlur(t) {
|
|
@@ -53,9 +53,9 @@ const w = class w {
|
|
|
53
53
|
}, this.elementRef && this.setupBlurHandlers(), this;
|
|
54
54
|
}
|
|
55
55
|
setupBlurHandlers() {
|
|
56
|
-
this.elementRef && this.elementRef.removeEventListener("focusout", this.handleBlur), this.elementRef && this.elementRef.addEventListener("focusout", this.handleBlur, !0),
|
|
56
|
+
this.elementRef && this.elementRef.removeEventListener("focusout", this.handleBlur), this.elementRef && this.elementRef.addEventListener("focusout", this.handleBlur, !0), T(this.settings, (t, e) => {
|
|
57
57
|
var i;
|
|
58
|
-
if (e instanceof
|
|
58
|
+
if (e instanceof b)
|
|
59
59
|
e.setOnBlur(this.handleBlur);
|
|
60
60
|
else {
|
|
61
61
|
const s = (i = this.elementRef) == null ? void 0 : i.querySelector(`[data-setting-id="${e.id}"]`);
|
|
@@ -70,7 +70,7 @@ const w = class w {
|
|
|
70
70
|
// Add the clone method here
|
|
71
71
|
clone() {
|
|
72
72
|
const t = {};
|
|
73
|
-
|
|
73
|
+
T(this.settings, (n, a) => {
|
|
74
74
|
typeof a.clone == "function" ? t[n] = a.clone() : (console.warn(`Setting with key '${n}' does not have a clone method. Copying reference.`), t[n] = a);
|
|
75
75
|
});
|
|
76
76
|
const e = {
|
|
@@ -118,17 +118,17 @@ const w = class w {
|
|
|
118
118
|
for (const i in this.settings)
|
|
119
119
|
if (this.settings.hasOwnProperty(i)) {
|
|
120
120
|
const s = this.settings[i];
|
|
121
|
-
s instanceof
|
|
121
|
+
s instanceof b ? e[i] = s.getValues() : e[i] = s.value;
|
|
122
122
|
}
|
|
123
123
|
return e;
|
|
124
124
|
} else {
|
|
125
125
|
const e = this.settings[t];
|
|
126
|
-
return e ? e instanceof
|
|
126
|
+
return e ? e instanceof b ? e.getValues() : e.value : void 0;
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
draw() {
|
|
130
130
|
const t = document.createElement("div");
|
|
131
|
-
t.className = "setting-group", t.id = `setting-group-${this.id}`,
|
|
131
|
+
t.className = "setting-group", t.id = `setting-group-${this.id}`, b.hiddenElements.add(t), this.hideCondition && this.hideCondition() && (t.style.display = "none"), this.isMain && t.classList.add("main-group");
|
|
132
132
|
const e = document.createElement("div");
|
|
133
133
|
e.className = "setting-group-title", this.isCollapsed && e.classList.add("collapsed-view"), e.setAttribute("role", "button"), e.setAttribute(
|
|
134
134
|
"aria-expanded",
|
|
@@ -232,8 +232,8 @@ const w = class w {
|
|
|
232
232
|
this.isHidden ? this.show() : this.hide();
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
|
-
|
|
236
|
-
let v =
|
|
235
|
+
b.hiddenElements = /* @__PURE__ */ new Set();
|
|
236
|
+
let v = b;
|
|
237
237
|
function y(c) {
|
|
238
238
|
if (c === null || typeof c != "object")
|
|
239
239
|
return c;
|
|
@@ -251,7 +251,7 @@ function y(c) {
|
|
|
251
251
|
const e = Object.getPrototypeOf(c);
|
|
252
252
|
return e !== Object.prototype && Object.setPrototypeOf(t, e), t;
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function W(c) {
|
|
255
255
|
switch (c) {
|
|
256
256
|
case "number":
|
|
257
257
|
return 0;
|
|
@@ -269,7 +269,7 @@ function A(c) {
|
|
|
269
269
|
return "";
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
class
|
|
272
|
+
class C {
|
|
273
273
|
constructor(t = {}) {
|
|
274
274
|
this.props = t, this.id = t.id || B(), this.value = this.props.default, this.title = t.title || "";
|
|
275
275
|
}
|
|
@@ -305,7 +305,7 @@ class f {
|
|
|
305
305
|
const i = document.createElement("div");
|
|
306
306
|
i.className = t.wrapperClassName || "";
|
|
307
307
|
const s = document.createElement("input");
|
|
308
|
-
this.inputEl = s, s.value = String(t.value ||
|
|
308
|
+
this.inputEl = s, s.value = String(t.value || W(t.inputType)), s.type = t.inputType, s.placeholder = t.placeholder || "", s.className = t.inputClassName || "";
|
|
309
309
|
const n = (a) => {
|
|
310
310
|
const o = a.target;
|
|
311
311
|
let l = o.value;
|
|
@@ -344,7 +344,7 @@ class f {
|
|
|
344
344
|
return i.className = "input-icon " + (e || ""), i.innerHTML = t, i;
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
class
|
|
347
|
+
class V extends C {
|
|
348
348
|
constructor(t = {}) {
|
|
349
349
|
super(t), this.inputType = "text", t.onChange && this.setOnChange(t.onChange);
|
|
350
350
|
}
|
|
@@ -364,12 +364,12 @@ class O extends f {
|
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
const
|
|
368
|
-
class
|
|
367
|
+
const N = "<svg xmlns='http://www.w3.org/2000/svg' width='18' height='19' viewBox='0 0 18 19' fill='none'><path d='M8.99999 15.8542C9.79613 16.5667 10.8475 17 12 17C14.4853 17 16.5 14.9853 16.5 12.5C16.5 10.4248 15.0953 8.67769 13.1849 8.15763M4.81513 8.15762C2.9047 8.67768 1.5 10.4248 1.5 12.5C1.5 14.9853 3.51472 17 6 17C8.48528 17 10.5 14.9853 10.5 12.5C10.5 11.9146 10.3882 11.3554 10.1849 10.8424M13.5 6.5C13.5 8.98528 11.4853 11 9 11C6.51472 11 4.5 8.98528 4.5 6.5C4.5 4.01472 6.51472 2 9 2C11.4853 2 13.5 4.01472 13.5 6.5Z' stroke='#667085' stroke-linecap='round' stroke-linejoin='round'/></svg>";
|
|
368
|
+
class O extends V {
|
|
369
369
|
constructor(t) {
|
|
370
370
|
super({
|
|
371
371
|
...t,
|
|
372
|
-
icon: t.icon ||
|
|
372
|
+
icon: t.icon || N,
|
|
373
373
|
title: t.title || "Color"
|
|
374
374
|
}), this.inputType = "color", this.detectChange = t.detectChange;
|
|
375
375
|
}
|
|
@@ -392,7 +392,7 @@ class N extends O {
|
|
|
392
392
|
t.className = "color-setting-wrapper";
|
|
393
393
|
const e = document.createElement("div");
|
|
394
394
|
e.className = "icon-container";
|
|
395
|
-
const i = this.createIcon(this.props.icon ||
|
|
395
|
+
const i = this.createIcon(this.props.icon || N), s = this.createLabel(this.title || "Color");
|
|
396
396
|
e.appendChild(i), e.appendChild(s);
|
|
397
397
|
const n = document.createElement("div");
|
|
398
398
|
n.className = "color-input-wrapper";
|
|
@@ -400,7 +400,7 @@ class N extends O {
|
|
|
400
400
|
const g = p.value.split(",").map((H) => parseInt(H.trim()));
|
|
401
401
|
if (g.length !== 3 || g.some(isNaN))
|
|
402
402
|
return p.style.border = "1px solid red", !1;
|
|
403
|
-
const [d, m,
|
|
403
|
+
const [d, m, f] = g, L = d >= 0 && d <= 255 && m >= 0 && m <= 255 && f >= 0 && f <= 255;
|
|
404
404
|
return p.style.border = L ? "" : "1px solid red", L;
|
|
405
405
|
}, o = document.createElement("div");
|
|
406
406
|
o.className = "color-preview", o.style.backgroundColor = this.value ? `rgb(${this.value})` : "";
|
|
@@ -418,17 +418,17 @@ class N extends O {
|
|
|
418
418
|
let g = p.target.value.trim();
|
|
419
419
|
a(h) && (this.value = g, (d = this.onChange) == null || d.call(this, g), u.value = this.rgbToHex(g), o.style.backgroundColor = `rgb(${g})`);
|
|
420
420
|
}, u.oninput = (p) => {
|
|
421
|
-
var m,
|
|
421
|
+
var m, f;
|
|
422
422
|
const g = p.target.value, d = this.hexToRgb(g);
|
|
423
|
-
this.value = d, (m = this.onChange) == null || m.call(this, d), (
|
|
423
|
+
this.value = d, (m = this.onChange) == null || m.call(this, d), (f = this.detectChange) == null || f.call(this, d), h.value = d, o.style.backgroundColor = `rgb(${d})`;
|
|
424
424
|
}, u.onchange = (p) => {
|
|
425
|
-
var m,
|
|
425
|
+
var m, f;
|
|
426
426
|
const g = p.target.value, d = this.hexToRgb(g);
|
|
427
|
-
this.value = d, (m = this.onChange) == null || m.call(this, d), (
|
|
427
|
+
this.value = d, (m = this.onChange) == null || m.call(this, d), (f = this.detectChange) == null || f.call(this, d), h.value = d, o.style.backgroundColor = `rgb(${d})`;
|
|
428
428
|
}, n.appendChild(o), n.appendChild(r), n.appendChild(l), t.appendChild(e), t.appendChild(n), this.value && (h.value = this.value, u.value = this.rgbToHex(this.value), o.style.backgroundColor = `rgb(${this.value})`), t;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
class
|
|
431
|
+
class w extends C {
|
|
432
432
|
// Store the input element
|
|
433
433
|
constructor(t = {}) {
|
|
434
434
|
super(t), this.inputType = "number", this.inputElement = null;
|
|
@@ -468,18 +468,18 @@ class b extends f {
|
|
|
468
468
|
return s < e && (s = e), s > i && (s = i), s;
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
class M extends
|
|
471
|
+
class M extends w {
|
|
472
472
|
constructor(t) {
|
|
473
473
|
super({
|
|
474
474
|
...t,
|
|
475
475
|
minValue: 0,
|
|
476
476
|
maxValue: 100,
|
|
477
|
-
icon: t.icon ||
|
|
477
|
+
icon: t.icon || $,
|
|
478
478
|
title: t.title || "Opacity"
|
|
479
479
|
}), this.inputType = "number";
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
const
|
|
482
|
+
const $ = `
|
|
483
483
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
484
484
|
<path d="M3.69749 15.365C3.54749 15.365 3.40502 15.305 3.30002 15.2C1.77752 13.6775 0.9375 11.6525 0.9375 9.5C0.9375 5.0525 4.5525 1.4375 9 1.4375C11.1525 1.4375 13.1775 2.2775 14.7 3.8C14.805 3.905 14.865 4.0475 14.865 4.1975C14.865 4.3475 14.805 4.49 14.7 4.595L4.09502 15.2C3.99002 15.305 3.84749 15.365 3.69749 15.365ZM9 2.5625C5.175 2.5625 2.0625 5.675 2.0625 9.5C2.0625 11.165 2.64751 12.74 3.71251 13.9925L13.4925 4.2125C12.24 3.1475 10.665 2.5625 9 2.5625Z" fill="#667085"/>
|
|
485
485
|
<path d="M9.00014 17.5623C6.84764 17.5623 4.82266 16.7223 3.30016 15.1998C3.19516 15.0948 3.13513 14.9523 3.13513 14.8023C3.13513 14.6523 3.19516 14.5098 3.30016 14.4048L13.9051 3.79984C14.1226 3.58234 14.4826 3.58234 14.7001 3.79984C16.2226 5.32234 17.0626 7.34734 17.0626 9.49984C17.0626 13.9473 13.4476 17.5623 9.00014 17.5623ZM4.50764 14.7873C5.76014 15.8523 7.33514 16.4373 9.00014 16.4373C12.8251 16.4373 15.9376 13.3248 15.9376 9.49984C15.9376 7.83484 15.3526 6.25984 14.2876 5.00734L4.50764 14.7873Z" fill="#667085"/>
|
|
@@ -487,12 +487,12 @@ const W = `
|
|
|
487
487
|
<path d="M13.4025 15.5225C13.26 15.5225 13.1175 15.47 13.005 15.3575L8.06999 10.4225C7.85249 10.205 7.85249 9.84498 8.06999 9.62748C8.28749 9.40998 8.64748 9.40998 8.86498 9.62748L13.8 14.5625C14.0175 14.78 14.0175 15.14 13.8 15.3575C13.6875 15.47 13.545 15.5225 13.4025 15.5225Z" fill="#667085"/>
|
|
488
488
|
<path d="M15.84 12.6648C15.6975 12.6648 15.555 12.6123 15.4425 12.4998L10.725 7.78234C10.5075 7.56484 10.5075 7.20484 10.725 6.98734C10.9425 6.76984 11.3025 6.76984 11.52 6.98734L16.2375 11.7048C16.455 11.9223 16.455 12.2823 16.2375 12.4998C16.1325 12.6048 15.99 12.6648 15.84 12.6648Z" fill="#667085"/>
|
|
489
489
|
</svg>
|
|
490
|
-
`,
|
|
490
|
+
`, _ = `
|
|
491
491
|
<svg xmlns="http://www.w3.org/2000/svg" class="svg-select" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
|
|
492
492
|
<polyline points="6 9 12 15 18 9"></polyline>
|
|
493
493
|
</svg>
|
|
494
494
|
`;
|
|
495
|
-
class I extends
|
|
495
|
+
class I extends C {
|
|
496
496
|
constructor(t = {}) {
|
|
497
497
|
if (super(t), this.inputType = "select", this._options = [], this.isOpen = !1, this.selectedOptionIndex = null, this.optionsListEl = null, this.svgContainer = null, this.buttonEl = null, this.isLoading = !1, this.container = null, this.clickOutsideListener = null, t.options && (this._options = [...t.options]), t.getOptions && this._options.push(...t.getOptions()), t.getOptionsAsync && (this.isLoading = !0), this.value !== void 0) {
|
|
498
498
|
const e = this._options.findIndex((i) => i.value === this.value);
|
|
@@ -531,7 +531,7 @@ class I extends f {
|
|
|
531
531
|
o.onclick = (l) => this.selectOption(l, a, e), i.appendChild(o);
|
|
532
532
|
}), t.appendChild(i);
|
|
533
533
|
const s = document.createElement("div");
|
|
534
|
-
return s.classList.add("svg-container"), s.innerHTML =
|
|
534
|
+
return s.classList.add("svg-container"), s.innerHTML = _, t.appendChild(s), this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
|
|
535
535
|
this._options.push(...n), this.isLoading = !1, this.updateOptionsList(), this.updateButtonText();
|
|
536
536
|
}).catch((n) => {
|
|
537
537
|
console.error("Failed to fetch async options:", n), this.isLoading = !1, this.updateButtonText("Failed to load options");
|
|
@@ -576,7 +576,7 @@ class I extends f {
|
|
|
576
576
|
this.clickOutsideListener && (document.removeEventListener("click", this.clickOutsideListener), this.clickOutsideListener = null), super.destroy();
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
class
|
|
579
|
+
class G extends C {
|
|
580
580
|
constructor(t = {}) {
|
|
581
581
|
super(t), this.inputType = "button", this.value || (this.value = "center");
|
|
582
582
|
}
|
|
@@ -629,7 +629,7 @@ class _ extends f {
|
|
|
629
629
|
}), t.appendChild(i), t;
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
class
|
|
632
|
+
class lt extends C {
|
|
633
633
|
constructor(t) {
|
|
634
634
|
super(t), this.inputType = "button";
|
|
635
635
|
}
|
|
@@ -642,27 +642,27 @@ class ot extends f {
|
|
|
642
642
|
return e.className = "button-setting-wrapper " + (this.props.wrapperClassName || ""), e.appendChild(t), e;
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
class
|
|
645
|
+
class rt extends C {
|
|
646
646
|
constructor(t = {}) {
|
|
647
647
|
super(t), this.inputType = { width: "number", height: "number" }, this.aspectRatio = 1, this.isUpdating = !1;
|
|
648
648
|
const e = t.width || 0, i = t.height || 0;
|
|
649
649
|
this.value || (this.value = {
|
|
650
650
|
width: e,
|
|
651
651
|
height: i
|
|
652
|
-
}), this.minWidth = t.minWidth ?? 0, this.maxWidth = t.maxWidth, this.minHeight = t.minHeight ?? 0, this.maxHeight = t.maxHeight, this.locked = t.locked ?? !1, this.value.height > 0 && (this.aspectRatio = this.value.width / this.value.height), this.widthSetting = new
|
|
652
|
+
}), this.minWidth = t.minWidth ?? 0, this.maxWidth = t.maxWidth, this.minHeight = t.minHeight ?? 0, this.maxHeight = t.maxHeight, this.locked = t.locked ?? !1, this.value.height > 0 && (this.aspectRatio = this.value.width / this.value.height), this.widthSetting = new w({
|
|
653
653
|
title: "Width",
|
|
654
654
|
default: this.value.width,
|
|
655
655
|
suffix: "px",
|
|
656
656
|
minValue: this.minWidth,
|
|
657
657
|
maxValue: this.maxWidth,
|
|
658
|
-
icon:
|
|
659
|
-
}), this.heightSetting = new
|
|
658
|
+
icon: j
|
|
659
|
+
}), this.heightSetting = new w({
|
|
660
660
|
title: "Height",
|
|
661
661
|
default: this.value.height,
|
|
662
662
|
suffix: "px",
|
|
663
663
|
minValue: this.minHeight,
|
|
664
664
|
maxValue: this.maxHeight,
|
|
665
|
-
icon:
|
|
665
|
+
icon: q
|
|
666
666
|
}), this.widthSetting.setOnChange(this.handleWidthChange.bind(this)), this.heightSetting.setOnChange(this.handleHeightChange.bind(this));
|
|
667
667
|
}
|
|
668
668
|
handleWidthChange(t) {
|
|
@@ -754,25 +754,25 @@ class lt extends f {
|
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
const
|
|
757
|
+
const j = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
758
758
|
<path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
759
|
-
</svg>`,
|
|
759
|
+
</svg>`, q = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
760
760
|
<path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
761
|
-
</svg>`,
|
|
761
|
+
</svg>`, S = `
|
|
762
762
|
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
|
|
763
763
|
<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"/>
|
|
764
764
|
</svg>
|
|
765
|
-
`,
|
|
765
|
+
`, F = `
|
|
766
766
|
<svg width="91" height="71" viewBox="0 0 91 71" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
767
767
|
<rect width="91" height="71" rx="4" fill="#F2F4F7"/>
|
|
768
768
|
<path d="M37 31.5L39.5 29M39.5 29L42 31.5M39.5 29V34.625M44.5 31.9643C45.2634 31.3338 45.75 30.38 45.75 29.3125C45.75 27.414 44.211 25.875 42.3125 25.875C42.1759 25.875 42.0482 25.8037 41.9788 25.6861C41.1638 24.303 39.659 23.375 37.9375 23.375C35.3487 23.375 33.25 25.4737 33.25 28.0625C33.25 29.3538 33.7721 30.5232 34.6168 31.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
|
|
769
769
|
</svg>
|
|
770
|
-
`,
|
|
770
|
+
`, U = `
|
|
771
771
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 12 12" fill="none">
|
|
772
772
|
<path d="M8 3V2.6C8 2.03995 8 1.75992 7.89101 1.54601C7.79513 1.35785 7.64215 1.20487 7.45399 1.10899C7.24008 1 6.96005 1 6.4 1H5.6C5.03995 1 4.75992 1 4.54601 1.10899C4.35785 1.20487 4.20487 1.35785 4.10899 1.54601C4 1.75992 4 2.03995 4 2.6V3M5 5.75V8.25M7 5.75V8.25M1.5 3H10.5M9.5 3V8.6C9.5 9.44008 9.5 9.86012 9.33651 10.181C9.1927 10.4632 8.96323 10.6927 8.68099 10.8365C8.36012 11 7.94008 11 7.1 11H4.9C4.05992 11 3.63988 11 3.31901 10.8365C3.03677 10.6927 2.8073 10.4632 2.66349 10.181C2.5 9.86012 2.5 9.44008 2.5 8.6V3" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
773
773
|
</svg>
|
|
774
774
|
`;
|
|
775
|
-
class
|
|
775
|
+
class z extends C {
|
|
776
776
|
constructor(t = {}) {
|
|
777
777
|
super(t), this.inputType = "button", this.previewWrapper = null, this.previewEl = null, this.emptyStateEl = null, !this.value && t.defaultUrl && t.defaultUrl !== "" && (this.value = t.defaultUrl);
|
|
778
778
|
}
|
|
@@ -780,10 +780,10 @@ class U extends f {
|
|
|
780
780
|
if (!this.previewWrapper || !this.previewEl) return;
|
|
781
781
|
const e = this.previewWrapper.parentElement, i = e == null ? void 0 : e.querySelector(".upload-button"), s = e == null ? void 0 : e.querySelector(".preview-placeholder");
|
|
782
782
|
t && t !== "" ? (this.previewWrapper.classList.add("has-image"), this.previewEl.src = t, this.previewWrapper.style.display = "block", this.previewEl.style.display = "block", s && s instanceof HTMLElement && (s.style.display = "none"), e && e.classList.remove("no-image"), i && (i.innerHTML = `
|
|
783
|
-
<span class="upload-icon">${
|
|
783
|
+
<span class="upload-icon">${S}</span>
|
|
784
784
|
<span class="upload-label">Replace</span>
|
|
785
785
|
`)) : (this.previewWrapper.classList.remove("has-image"), this.previewEl.src = "", this.previewEl.style.display = "none", this.previewWrapper.style.display = "none", s && s instanceof HTMLElement && (s.style.display = "block"), e && e.classList.add("no-image"), i && (i.innerHTML = `
|
|
786
|
-
<span class="upload-icon">${
|
|
786
|
+
<span class="upload-icon">${S}</span>
|
|
787
787
|
<span class="upload-label">Upload</span>
|
|
788
788
|
`));
|
|
789
789
|
}
|
|
@@ -811,12 +811,12 @@ class U extends f {
|
|
|
811
811
|
const s = this.value && this.value !== "";
|
|
812
812
|
s || i.classList.add("no-image");
|
|
813
813
|
const n = document.createElement("div");
|
|
814
|
-
n.className = "preview-placeholder", n.innerHTML =
|
|
814
|
+
n.className = "preview-placeholder", n.innerHTML = F, this.previewWrapper = document.createElement("div"), this.previewWrapper.className = "preview-wrapper", this.previewEl = document.createElement("img"), this.previewEl.className = "upload-preview";
|
|
815
815
|
const a = document.createElement("button");
|
|
816
|
-
a.className = "delete-button", a.type = "button", a.title = "Delete image", a.innerHTML =
|
|
816
|
+
a.className = "delete-button", a.type = "button", a.title = "Delete image", a.innerHTML = U, this.previewWrapper.appendChild(this.previewEl), this.previewWrapper.appendChild(a);
|
|
817
817
|
const o = document.createElement("button");
|
|
818
818
|
o.className = "upload-button", o.innerHTML = `
|
|
819
|
-
<span class="upload-icon">${
|
|
819
|
+
<span class="upload-icon">${S}</span>
|
|
820
820
|
<span class="upload-label">Upload</span>
|
|
821
821
|
`;
|
|
822
822
|
const l = document.createElement("input");
|
|
@@ -833,10 +833,10 @@ class U extends f {
|
|
|
833
833
|
o.classList.add("loading"), o.disabled = !0;
|
|
834
834
|
const d = new FormData(), m = this.props.formFieldName || "file";
|
|
835
835
|
d.append(m, h, h.name);
|
|
836
|
-
const
|
|
837
|
-
if (!
|
|
836
|
+
const f = this.props.uploadUrl;
|
|
837
|
+
if (!f)
|
|
838
838
|
throw new Error("No uploadUrl provided to UploadSetting.");
|
|
839
|
-
const L = this.props.requestMethod || "POST", H = { ...this.props.requestHeaders || {} }, E = await (await fetch(
|
|
839
|
+
const L = this.props.requestMethod || "POST", H = { ...this.props.requestHeaders || {} }, E = await (await fetch(f, {
|
|
840
840
|
method: L,
|
|
841
841
|
body: d,
|
|
842
842
|
headers: H
|
|
@@ -858,7 +858,7 @@ class U extends f {
|
|
|
858
858
|
}, t;
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
|
-
class
|
|
861
|
+
class ht extends w {
|
|
862
862
|
constructor(t = {}) {
|
|
863
863
|
super({
|
|
864
864
|
...t,
|
|
@@ -873,7 +873,7 @@ class rt extends b {
|
|
|
873
873
|
const D = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
874
874
|
<path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
875
875
|
</svg>`;
|
|
876
|
-
class ct extends
|
|
876
|
+
class ct extends w {
|
|
877
877
|
constructor(t = {}) {
|
|
878
878
|
super({
|
|
879
879
|
...t,
|
|
@@ -881,18 +881,18 @@ class ct extends b {
|
|
|
881
881
|
suffix: "px",
|
|
882
882
|
minValue: t.minValue ?? 0,
|
|
883
883
|
maxValue: t.maxValue,
|
|
884
|
-
icon: t.icon ||
|
|
884
|
+
icon: t.icon || Z
|
|
885
885
|
}), this.inputType = "number";
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
|
-
const
|
|
888
|
+
const Z = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
889
889
|
<path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
890
|
-
</svg>`,
|
|
890
|
+
</svg>`, P = `
|
|
891
891
|
<svg xmlns="http://www.w3.org/2000/svg" class="svg-select-api" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
|
|
892
892
|
<polyline points="6 9 12 15 18 9"></polyline>
|
|
893
893
|
</svg>
|
|
894
894
|
`;
|
|
895
|
-
class
|
|
895
|
+
class dt extends C {
|
|
896
896
|
constructor(t = {}) {
|
|
897
897
|
super(t), this.inputType = "select", this._options = [], this.isOpen = !1, this.selectedOptionIndex = null, this.optionsListEl = null, this.svgContainer = null, this.buttonEl = null, this.isLoading = !1, this.container = null, this.hasInitializedOptions = !1, this.initializeOptions(t), t.default !== void 0 && (this.value = t.default, this.selectedOptionIndex = this._options.findIndex(
|
|
898
898
|
(e) => JSON.stringify(e.value) === JSON.stringify(t.default)
|
|
@@ -933,7 +933,7 @@ class ht extends f {
|
|
|
933
933
|
o.onclick = (l) => this.selectApiOption(l, a, e), i.appendChild(o);
|
|
934
934
|
}), t.appendChild(i);
|
|
935
935
|
const s = document.createElement("div");
|
|
936
|
-
return s.classList.add("svg-container"), s.innerHTML =
|
|
936
|
+
return s.classList.add("svg-container"), s.innerHTML = P, t.appendChild(s), s.onclick = () => {
|
|
937
937
|
var n, a;
|
|
938
938
|
this.isLoading || (this.isOpen = !this.isOpen, (n = this.optionsListEl) == null || n.classList.toggle("open", this.isOpen), (a = this.svgContainer) == null || a.classList.toggle("open", this.isOpen));
|
|
939
939
|
}, this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && !this.hasInitializedOptions ? (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
|
|
@@ -1015,7 +1015,7 @@ class ht extends f {
|
|
|
1015
1015
|
this.detectChangeCallback = t;
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
class
|
|
1018
|
+
class pt extends C {
|
|
1019
1019
|
constructor(t) {
|
|
1020
1020
|
var e, i;
|
|
1021
1021
|
super(t), this.inputType = "text", this.value = t.default ?? ((i = (e = t.options) == null ? void 0 : e[0]) == null ? void 0 : i.value) ?? "", this.detectChangeCallback = t.detectChange;
|
|
@@ -1060,10 +1060,10 @@ class dt extends f {
|
|
|
1060
1060
|
this.detectChangeCallback = t;
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
|
-
const
|
|
1063
|
+
const J = `<svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1064
1064
|
<path d="M1.25 7.5H1.2575M4.625 7.5H4.6325M11.375 7.5H11.3825M8 7.5H8.0075M14.75 7.5H14.7575M14.75 14.25V13.65C14.75 12.8099 14.75 12.3899 14.5865 12.069C14.4427 11.7868 14.2132 11.5573 13.931 11.4135C13.6101 11.25 13.1901 11.25 12.35 11.25H3.65C2.80992 11.25 2.38988 11.25 2.06901 11.4135C1.78677 11.5573 1.5573 11.7868 1.41349 12.069C1.25 12.3899 1.25 12.8099 1.25 13.65V14.25M14.75 0.75V1.35C14.75 2.19008 14.75 2.61012 14.5865 2.93099C14.4427 3.21323 14.2132 3.4427 13.931 3.58651C13.6101 3.75 13.1901 3.75 12.35 3.75H3.65C2.80992 3.75 2.38988 3.75 2.06901 3.58651C1.78677 3.4427 1.5573 3.21323 1.41349 2.93099C1.25 2.61012 1.25 2.19008 1.25 1.35V0.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1065
1065
|
</svg>`;
|
|
1066
|
-
class
|
|
1066
|
+
class ut extends C {
|
|
1067
1067
|
constructor(t = {}) {
|
|
1068
1068
|
super(t), this.inputType = "number", this.inputValues = {};
|
|
1069
1069
|
}
|
|
@@ -1100,7 +1100,7 @@ class pt extends f {
|
|
|
1100
1100
|
const s = document.createElement("div");
|
|
1101
1101
|
s.classList.add("gap-label-container");
|
|
1102
1102
|
const n = document.createElement("div");
|
|
1103
|
-
n.classList.add("gap-setting-icon"), n.innerHTML = this.props.icon ||
|
|
1103
|
+
n.classList.add("gap-setting-icon"), n.innerHTML = this.props.icon || J, s.appendChild(n);
|
|
1104
1104
|
const a = document.createElement("label");
|
|
1105
1105
|
a.classList.add("gap-input-label"), a.textContent = t, s.appendChild(a), i.appendChild(s);
|
|
1106
1106
|
const o = (u) => {
|
|
@@ -1126,7 +1126,7 @@ class pt extends f {
|
|
|
1126
1126
|
return r.className = "suffix-label", r.textContent = this.props.suffix, l.appendChild(r), i.appendChild(l), i;
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
|
-
class
|
|
1129
|
+
class R extends v {
|
|
1130
1130
|
constructor(t) {
|
|
1131
1131
|
var o;
|
|
1132
1132
|
if (!t.tabs)
|
|
@@ -1142,11 +1142,34 @@ class ut extends v {
|
|
|
1142
1142
|
hideCondition: t.hideCondition,
|
|
1143
1143
|
onBlur: t.onBlur
|
|
1144
1144
|
};
|
|
1145
|
-
super(a), this.tabs = [], this.activeTabId = "", this.tabsContainer = null, this.previousTabId = "", this.container = null, this.tabs = e, this.activeTabId = i, this.previousTabId = i, this.onStateChangeCallback = t.onStateChange, this.detectChangeCallback = t.detectChange;
|
|
1145
|
+
super(a), this.tabs = [], this.activeTabId = "", this.tabsContainer = null, this.previousTabId = "", this.container = null, this.tabValues = {}, this.tabs = e, this.activeTabId = i, this.previousTabId = i, this.onStateChangeCallback = t.onStateChange, this.detectChangeCallback = t.detectChange, this.initializeTabValues(), this.connectChildChangeHandlers();
|
|
1146
1146
|
}
|
|
1147
1147
|
updateSettingsFromTab(t) {
|
|
1148
1148
|
const e = this.tabs.find((i) => i.id === t);
|
|
1149
|
-
e && (this.settings = e.settings);
|
|
1149
|
+
e && (this.settings = e.settings, this.connectChildChangeHandlers());
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* Connect all child settings' onChange events to trigger the parent's onChange
|
|
1153
|
+
*/
|
|
1154
|
+
connectChildChangeHandlers() {
|
|
1155
|
+
if (!this.settings) return;
|
|
1156
|
+
const t = () => {
|
|
1157
|
+
if (this.activeTabId) {
|
|
1158
|
+
const e = this.tabs.find((i) => i.id === this.activeTabId);
|
|
1159
|
+
e && (this.tabValues[this.activeTabId] = this.getTabValues(e));
|
|
1160
|
+
}
|
|
1161
|
+
this.initialValues = {
|
|
1162
|
+
tabs: this.tabValues,
|
|
1163
|
+
activeTabId: this.activeTabId
|
|
1164
|
+
}, this.onChange && this.onChange(this.getValues());
|
|
1165
|
+
};
|
|
1166
|
+
Object.values(this.settings).forEach((e) => {
|
|
1167
|
+
e instanceof v ? e.setOnChange(() => {
|
|
1168
|
+
t();
|
|
1169
|
+
}) : e instanceof C && e.setOnChange(() => {
|
|
1170
|
+
t();
|
|
1171
|
+
});
|
|
1172
|
+
});
|
|
1150
1173
|
}
|
|
1151
1174
|
draw() {
|
|
1152
1175
|
const t = super.draw();
|
|
@@ -1160,32 +1183,30 @@ class ut extends v {
|
|
|
1160
1183
|
return i && t.insertBefore(e, i), t;
|
|
1161
1184
|
}
|
|
1162
1185
|
handleTabClick(t) {
|
|
1163
|
-
var
|
|
1186
|
+
var a, o;
|
|
1164
1187
|
if (t === this.activeTabId) return;
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1188
|
+
const e = this.tabs.find((l) => l.id === this.activeTabId);
|
|
1189
|
+
e && (this.tabValues[this.activeTabId] = this.getTabValues(e)), this.previousTabId = this.activeTabId, this.activeTabId = t;
|
|
1190
|
+
const i = (a = this.tabsContainer) == null ? void 0 : a.querySelectorAll(".tab-button");
|
|
1191
|
+
i == null || i.forEach((l) => {
|
|
1192
|
+
if (l instanceof HTMLElement) {
|
|
1193
|
+
const h = this.tabs.find((r) => r.label === l.textContent);
|
|
1194
|
+
l.classList.toggle("active", (h == null ? void 0 : h.id) === t);
|
|
1171
1195
|
}
|
|
1172
1196
|
}), this.updateSettingsFromTab(t);
|
|
1173
|
-
const
|
|
1174
|
-
if (
|
|
1175
|
-
|
|
1176
|
-
const
|
|
1177
|
-
Object.values(
|
|
1178
|
-
|
|
1197
|
+
const s = (o = this.container) == null ? void 0 : o.querySelector(".setting-group-content");
|
|
1198
|
+
if (s) {
|
|
1199
|
+
s.innerHTML = "";
|
|
1200
|
+
const l = this.settings;
|
|
1201
|
+
Object.values(l).forEach((h) => {
|
|
1202
|
+
s.appendChild(h.draw());
|
|
1179
1203
|
});
|
|
1180
1204
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
this.
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
const a = this.getValues();
|
|
1187
|
-
this.detectChangeCallback(t, a);
|
|
1188
|
-
}
|
|
1205
|
+
const n = this.getValues();
|
|
1206
|
+
this.initialValues = {
|
|
1207
|
+
tabs: this.tabValues,
|
|
1208
|
+
activeTabId: this.activeTabId
|
|
1209
|
+
}, this.onStateChangeCallback && this.onStateChangeCallback(t, n), this.detectChangeCallback && this.detectChangeCallback(t, n), this.onChange && this.onChange(n);
|
|
1189
1210
|
}
|
|
1190
1211
|
setOnStateChange(t) {
|
|
1191
1212
|
return this.onStateChangeCallback = t, this;
|
|
@@ -1197,30 +1218,61 @@ class ut extends v {
|
|
|
1197
1218
|
return this.activeTabId;
|
|
1198
1219
|
}
|
|
1199
1220
|
getValues() {
|
|
1200
|
-
|
|
1201
|
-
tabs:
|
|
1221
|
+
return this.updateTabValues(), {
|
|
1222
|
+
tabs: this.tabValues,
|
|
1202
1223
|
activeTabId: this.activeTabId
|
|
1203
1224
|
};
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1225
|
+
}
|
|
1226
|
+
/**
|
|
1227
|
+
* Updates the tab values for all tabs
|
|
1228
|
+
*/
|
|
1229
|
+
updateTabValues() {
|
|
1230
|
+
!this.tabs || this.tabs.length === 0 || this.tabs.forEach((t) => {
|
|
1231
|
+
this.tabValues[t.id] = this.getTabValues(t);
|
|
1208
1232
|
});
|
|
1209
|
-
const e = super.getValues();
|
|
1210
|
-
return Object.assign(t, e), t;
|
|
1211
1233
|
}
|
|
1212
1234
|
/**
|
|
1213
1235
|
* Updates the initialValues property to include values from all tabs
|
|
1214
1236
|
*/
|
|
1215
1237
|
updateInitialValues() {
|
|
1216
|
-
this.tabs
|
|
1238
|
+
!this.tabs || this.tabs.length === 0 || (this.updateTabValues(), this.initialValues = {
|
|
1239
|
+
tabs: this.tabValues,
|
|
1240
|
+
activeTabId: this.activeTabId
|
|
1241
|
+
}, this.tabs.forEach((t) => {
|
|
1242
|
+
Object.values(t.settings).forEach((e) => {
|
|
1243
|
+
e instanceof R && e.updateInitialValues();
|
|
1244
|
+
});
|
|
1245
|
+
}));
|
|
1246
|
+
}
|
|
1247
|
+
setOnChange(t) {
|
|
1248
|
+
return this.onChange = t, this.connectChildChangeHandlers(), this;
|
|
1249
|
+
}
|
|
1250
|
+
/**
|
|
1251
|
+
* Initialize the tabValues with data from all tabs
|
|
1252
|
+
*/
|
|
1253
|
+
initializeTabValues() {
|
|
1254
|
+
!this.tabs || this.tabs.length === 0 || (this.tabs.forEach((t) => {
|
|
1255
|
+
this.tabValues[t.id] = this.getTabValues(t);
|
|
1256
|
+
}), this.initialValues = {
|
|
1257
|
+
tabs: this.tabValues,
|
|
1258
|
+
activeTabId: this.activeTabId
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* Get values from a specific tab's settings
|
|
1263
|
+
*/
|
|
1264
|
+
getTabValues(t) {
|
|
1265
|
+
const e = {};
|
|
1266
|
+
return Object.entries(t.settings).forEach(([i, s]) => {
|
|
1267
|
+
s instanceof v ? e[i] = s.getValues() : e[i] = s.value;
|
|
1268
|
+
}), e;
|
|
1217
1269
|
}
|
|
1218
1270
|
}
|
|
1219
|
-
const
|
|
1271
|
+
const X = `
|
|
1220
1272
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1221
1273
|
<path d="M5.625 9.5H5.6325M12.375 9.5H12.3825M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 6.35L2.25 12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75L5.85 2.75C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1222
1274
|
</svg>
|
|
1223
|
-
`,
|
|
1275
|
+
`, Q = `
|
|
1224
1276
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1225
1277
|
<path d="M6 2.75H5.85C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35V6.5M6 16.25H5.85C4.58988 16.25 3.95982 16.25 3.47852 16.0048C3.05516 15.789 2.71095 15.4448 2.49524 15.0215C2.25 14.5402 2.25 13.9101 2.25 12.65V12.5M15.75 6.5V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75H12M15.75 12.5V12.65C15.75 13.9101 15.75 14.5402 15.5048 15.0215C15.289 15.4448 14.9448 15.789 14.5215 16.0048C14.0402 16.25 13.4101 16.25 12.15 16.25H12" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1226
1278
|
</svg>
|
|
@@ -1232,13 +1284,13 @@ class gt extends v {
|
|
|
1232
1284
|
collapsed: t == null ? void 0 : t.collapsed,
|
|
1233
1285
|
hideCondition: t == null ? void 0 : t.hideCondition,
|
|
1234
1286
|
settings: {
|
|
1235
|
-
size: new
|
|
1287
|
+
size: new w({
|
|
1236
1288
|
title: "Size",
|
|
1237
|
-
icon:
|
|
1289
|
+
icon: Q,
|
|
1238
1290
|
default: (t == null ? void 0 : t.size) ?? 0,
|
|
1239
1291
|
suffix: "px"
|
|
1240
1292
|
}),
|
|
1241
|
-
color: new
|
|
1293
|
+
color: new O({
|
|
1242
1294
|
default: (t == null ? void 0 : t.color) ?? "0, 0, 30"
|
|
1243
1295
|
}),
|
|
1244
1296
|
opacity: new M({
|
|
@@ -1246,9 +1298,9 @@ class gt extends v {
|
|
|
1246
1298
|
minValue: 0,
|
|
1247
1299
|
maxValue: 100
|
|
1248
1300
|
}),
|
|
1249
|
-
radius: new
|
|
1301
|
+
radius: new w({
|
|
1250
1302
|
title: "Radius",
|
|
1251
|
-
icon:
|
|
1303
|
+
icon: X,
|
|
1252
1304
|
default: (t == null ? void 0 : t.radius) ?? 12,
|
|
1253
1305
|
suffix: "px"
|
|
1254
1306
|
})
|
|
@@ -1268,15 +1320,15 @@ class gt extends v {
|
|
|
1268
1320
|
`;
|
|
1269
1321
|
}
|
|
1270
1322
|
}
|
|
1271
|
-
const
|
|
1323
|
+
const Y = `
|
|
1272
1324
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="13" viewBox="0 0 14 13" fill="none">
|
|
1273
1325
|
<path d="M1 2.75C1 2.05109 1 1.70163 1.11418 1.42597C1.26642 1.05843 1.55843 0.766422 1.92597 0.614181C2.20163 0.5 2.55109 0.5 3.25 0.5H10.75C11.4489 0.5 11.7984 0.5 12.074 0.614181C12.4416 0.766422 12.7336 1.05843 12.8858 1.42597C13 1.70163 13 2.05109 13 2.75M4.75 12.5H9.25M7 0.5V12.5" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1274
1326
|
</svg>
|
|
1275
|
-
`,
|
|
1327
|
+
`, K = `
|
|
1276
1328
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1277
1329
|
<path d="M3 5.75C3 5.05109 3 4.70163 3.11418 4.42597C3.26642 4.05843 3.55843 3.76642 3.92597 3.61418C4.20163 3.5 4.55109 3.5 5.25 3.5H12.75C13.4489 3.5 13.7984 3.5 14.074 3.61418C14.4416 3.76642 14.7336 4.05843 14.8858 4.42597C15 4.70163 15 5.05109 15 5.75M6 15.5H12M7.6875 3.5V15.5M10.3125 3.5V15.5" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1278
1330
|
</svg>
|
|
1279
|
-
`,
|
|
1331
|
+
`, tt = `
|
|
1280
1332
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1281
1333
|
<path d="M6 5.75H12M9 5.75V13.25M5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75H5.85C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35V12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1282
1334
|
</svg>
|
|
@@ -1288,7 +1340,7 @@ class mt extends v {
|
|
|
1288
1340
|
collapsed: t.collapsed,
|
|
1289
1341
|
hideCondition: t.hideCondition,
|
|
1290
1342
|
settings: {
|
|
1291
|
-
color: new
|
|
1343
|
+
color: new O({
|
|
1292
1344
|
default: t.colorDefault ?? "0, 0, 30"
|
|
1293
1345
|
}),
|
|
1294
1346
|
opacity: new M({
|
|
@@ -1296,7 +1348,7 @@ class mt extends v {
|
|
|
1296
1348
|
}),
|
|
1297
1349
|
fontFamily: new I({
|
|
1298
1350
|
title: "Font",
|
|
1299
|
-
icon:
|
|
1351
|
+
icon: Y,
|
|
1300
1352
|
default: t.fontFamilyDefault ?? "Satoshi",
|
|
1301
1353
|
options: t.fontFamilyOptions ?? [
|
|
1302
1354
|
{ name: "Satoshi", value: "Satoshi" },
|
|
@@ -1308,7 +1360,7 @@ class mt extends v {
|
|
|
1308
1360
|
}),
|
|
1309
1361
|
fontWeight: new I({
|
|
1310
1362
|
title: "Weight",
|
|
1311
|
-
icon:
|
|
1363
|
+
icon: K,
|
|
1312
1364
|
default: t.fontWeightDefault ?? "400",
|
|
1313
1365
|
options: t.fontWeightOptions ?? [
|
|
1314
1366
|
{ name: "Regular", value: "400" },
|
|
@@ -1318,13 +1370,13 @@ class mt extends v {
|
|
|
1318
1370
|
getOptions: t.fontWeightGetOptions,
|
|
1319
1371
|
getOptionsAsync: t.fontWeightGetOptionsAsync
|
|
1320
1372
|
}),
|
|
1321
|
-
fontSize: new
|
|
1373
|
+
fontSize: new w({
|
|
1322
1374
|
title: "Size",
|
|
1323
|
-
icon:
|
|
1375
|
+
icon: tt,
|
|
1324
1376
|
default: t.fontSizeDefault ?? 12,
|
|
1325
1377
|
suffix: "px"
|
|
1326
1378
|
}),
|
|
1327
|
-
align: new
|
|
1379
|
+
align: new G({
|
|
1328
1380
|
title: "Align",
|
|
1329
1381
|
default: t.alignDefault ?? "center"
|
|
1330
1382
|
})
|
|
@@ -1343,7 +1395,7 @@ class mt extends v {
|
|
|
1343
1395
|
`;
|
|
1344
1396
|
}
|
|
1345
1397
|
}
|
|
1346
|
-
class k extends
|
|
1398
|
+
class k extends C {
|
|
1347
1399
|
constructor(t) {
|
|
1348
1400
|
super({
|
|
1349
1401
|
...t,
|
|
@@ -1398,25 +1450,25 @@ class Ct extends v {
|
|
|
1398
1450
|
settings: {
|
|
1399
1451
|
marginTop: new k({
|
|
1400
1452
|
title: "Top",
|
|
1401
|
-
icon:
|
|
1453
|
+
icon: et,
|
|
1402
1454
|
suffix: "px",
|
|
1403
1455
|
default: (t == null ? void 0 : t.marginTop) ?? "auto"
|
|
1404
1456
|
}),
|
|
1405
1457
|
marginRight: new k({
|
|
1406
1458
|
title: "Right",
|
|
1407
|
-
icon:
|
|
1459
|
+
icon: it,
|
|
1408
1460
|
suffix: "px",
|
|
1409
1461
|
default: (t == null ? void 0 : t.marginRight) ?? 0
|
|
1410
1462
|
}),
|
|
1411
1463
|
marginBottom: new k({
|
|
1412
1464
|
title: "Bottom",
|
|
1413
|
-
icon:
|
|
1465
|
+
icon: st,
|
|
1414
1466
|
suffix: "px",
|
|
1415
1467
|
default: (t == null ? void 0 : t.marginBottom) ?? 0
|
|
1416
1468
|
}),
|
|
1417
1469
|
marginLeft: new k({
|
|
1418
1470
|
title: "Left",
|
|
1419
|
-
icon:
|
|
1471
|
+
icon: nt,
|
|
1420
1472
|
suffix: "px",
|
|
1421
1473
|
default: (t == null ? void 0 : t.marginLeft) ?? 0
|
|
1422
1474
|
})
|
|
@@ -1433,27 +1485,27 @@ class Ct extends v {
|
|
|
1433
1485
|
`;
|
|
1434
1486
|
}
|
|
1435
1487
|
}
|
|
1436
|
-
const
|
|
1488
|
+
const et = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1437
1489
|
<path d="M2.25 16.25H2.2575M2.25 9.5H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M5.625 16.25H5.6325M5.625 9.5H5.6325M12.375 16.25H12.3825M12.375 9.5H12.3825M9 16.25H9.0075M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 16.25H15.7575M15.75 9.5H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M15.75 2.75H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1438
|
-
</svg>`, et = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1439
|
-
<path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 16.25H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M15.75 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1440
1490
|
</svg>`, it = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1441
|
-
<path d="
|
|
1491
|
+
<path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 16.25H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M15.75 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1442
1492
|
</svg>`, st = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1493
|
+
<path d="M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M5.625 2.75H5.6325M5.625 9.5H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1494
|
+
</svg>`, nt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
|
|
1443
1495
|
<path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 16.25H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1444
1496
|
</svg>`;
|
|
1445
|
-
class
|
|
1497
|
+
class at extends v {
|
|
1446
1498
|
constructor(t, e, i) {
|
|
1447
1499
|
super({
|
|
1448
1500
|
title: `Tab ${t + 1}`,
|
|
1449
1501
|
hideCondition: i == null ? void 0 : i.hideCondition,
|
|
1450
1502
|
collapsed: i == null ? void 0 : i.collapsed,
|
|
1451
1503
|
settings: {
|
|
1452
|
-
name: new
|
|
1504
|
+
name: new V({
|
|
1453
1505
|
title: "Tab Name",
|
|
1454
1506
|
default: `Tab ${t + 1}`
|
|
1455
1507
|
}),
|
|
1456
|
-
content: new
|
|
1508
|
+
content: new V({
|
|
1457
1509
|
title: "Content",
|
|
1458
1510
|
default: ""
|
|
1459
1511
|
})
|
|
@@ -1498,7 +1550,7 @@ class ft extends v {
|
|
|
1498
1550
|
}
|
|
1499
1551
|
/** Adds a new tab. */
|
|
1500
1552
|
addTab(t) {
|
|
1501
|
-
const e = this.tabs.length, i = new
|
|
1553
|
+
const e = this.tabs.length, i = new at(
|
|
1502
1554
|
e,
|
|
1503
1555
|
() => this.removeTab(i),
|
|
1504
1556
|
t
|
|
@@ -1586,14 +1638,14 @@ class vt extends v {
|
|
|
1586
1638
|
collapsed: t == null ? void 0 : t.collapsed,
|
|
1587
1639
|
hideCondition: t == null ? void 0 : t.hideCondition,
|
|
1588
1640
|
settings: {
|
|
1589
|
-
backgroundImage: new
|
|
1641
|
+
backgroundImage: new z({
|
|
1590
1642
|
...t == null ? void 0 : t.uploadProps,
|
|
1591
1643
|
default: (t == null ? void 0 : t.backgroundImage) ?? ""
|
|
1592
1644
|
}),
|
|
1593
1645
|
opacity: new M({
|
|
1594
1646
|
default: (t == null ? void 0 : t.opacity) ?? 100
|
|
1595
1647
|
}),
|
|
1596
|
-
backgroundColor: new
|
|
1648
|
+
backgroundColor: new O({
|
|
1597
1649
|
default: (t == null ? void 0 : t.backgroundColor) ?? "0, 0, 30"
|
|
1598
1650
|
}),
|
|
1599
1651
|
opacityBG: new M({
|
|
@@ -1630,27 +1682,27 @@ class vt extends v {
|
|
|
1630
1682
|
}
|
|
1631
1683
|
}
|
|
1632
1684
|
export {
|
|
1633
|
-
|
|
1685
|
+
G as AlignSetting,
|
|
1634
1686
|
vt as BackgroundSettingSet,
|
|
1635
1687
|
gt as BorderSettingSet,
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1688
|
+
lt as ButtonSetting,
|
|
1689
|
+
O as ColorSetting,
|
|
1690
|
+
rt as DimensionSetting,
|
|
1691
|
+
ut as GapSetting,
|
|
1640
1692
|
mt as HeaderTypographySettingSet,
|
|
1641
|
-
|
|
1693
|
+
ht as HeightSetting,
|
|
1642
1694
|
Ct as MarginSettingGroup,
|
|
1643
|
-
|
|
1695
|
+
w as NumberSetting,
|
|
1644
1696
|
M as OpacitySetting,
|
|
1645
|
-
|
|
1697
|
+
dt as SelectApiSettings,
|
|
1646
1698
|
I as SelectSetting,
|
|
1647
|
-
|
|
1699
|
+
C as Setting,
|
|
1648
1700
|
v as SettingGroup,
|
|
1649
|
-
|
|
1701
|
+
V as StringSetting,
|
|
1650
1702
|
ft as TabsContainerGroup,
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1703
|
+
R as TabsSettings,
|
|
1704
|
+
pt as Toggle,
|
|
1705
|
+
z as UploadSetting,
|
|
1654
1706
|
ct as WidthSetting,
|
|
1655
|
-
|
|
1707
|
+
T as iterateSettings
|
|
1656
1708
|
};
|