@cocoar/vue-page-builder 2.17.0 → 2.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder/BuilderCanvas.vue.d.ts.map +1 -1
- package/dist/builder/BuilderOutlineNode.vue.d.ts.map +1 -1
- package/dist/elements/registry.d.ts +5 -1
- package/dist/elements/registry.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +708 -676
- package/dist/schema.d.ts +8 -4
- package/dist/schema.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, markRaw as d, mergeModels as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, onMounted as _, openBlock as v, provide as y, ref as b, renderList as x, renderSlot as S, resolveComponent as C, resolveDynamicComponent as w, shallowRef as T, toDisplayString as E, toRaw as D, unref as O, useCssVars as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { CoarButton as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, markRaw as d, mergeModels as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, onMounted as _, openBlock as v, provide as y, ref as b, renderList as x, renderSlot as S, resolveComponent as C, resolveDynamicComponent as w, shallowRef as T, toDisplayString as E, toRaw as D, unref as O, useCssVars as k, useModel as A, watch as ee, watchEffect as te, withCtx as j, withKeys as M, withModifiers as N } from "vue";
|
|
2
|
+
import { useI18n as P } from "@cocoar/vue-localization";
|
|
3
|
+
import { CoarButton as F, CoarCard as I, CoarCheckbox as L, CoarDivider as R, CoarFormField as z, CoarIcon as B, CoarMultiSelect as V, CoarNote as H, CoarNumberInput as U, CoarOtpInput as W, CoarPasswordInput as ne, CoarPlainDatePicker as re, CoarPlainDateTimePicker as G, CoarRadioButton as K, CoarRadioGroup as ie, CoarSelect as q, CoarSwitch as ae, CoarTab as oe, CoarTabGroup as se, CoarTextInput as J } from "@cocoar/vue-ui";
|
|
4
4
|
import { Temporal as ce } from "@js-temporal/polyfill";
|
|
5
5
|
//#region src/schema.ts
|
|
6
6
|
function le(e) {
|
|
@@ -200,7 +200,7 @@ var Oe = /* @__PURE__ */ l({
|
|
|
200
200
|
patch: { type: Function }
|
|
201
201
|
},
|
|
202
202
|
setup(t) {
|
|
203
|
-
let o = t, { t: s } =
|
|
203
|
+
let o = t, { t: s } = P();
|
|
204
204
|
return (t, c) => (v(), i(e, null, [a("div", Ae, [a("span", je, E(O(s)("coar.pageBuilder.props.direction", void 0, "Direction")), 1), a("div", {
|
|
205
205
|
class: "pb-prop-seg",
|
|
206
206
|
role: "radiogroup",
|
|
@@ -217,7 +217,7 @@ var Oe = /* @__PURE__ */ l({
|
|
|
217
217
|
role: "radio",
|
|
218
218
|
"aria-checked": o.node.props.direction === "row",
|
|
219
219
|
onClick: c[1] ||= (e) => o.patch({ props: { direction: "row" } })
|
|
220
|
-
}, " → " + E(O(s)("coar.pageBuilder.props.row", void 0, "Row")), 11, Pe)], 8, Me)]), o.node.props.direction === "row" ? (v(), n(O(
|
|
220
|
+
}, " → " + E(O(s)("coar.pageBuilder.props.row", void 0, "Row")), 11, Pe)], 8, Me)]), o.node.props.direction === "row" ? (v(), n(O(L), {
|
|
221
221
|
key: 0,
|
|
222
222
|
"model-value": !!o.node.props.wrap,
|
|
223
223
|
label: O(s)("coar.pageBuilder.props.wrapChildren", void 0, "Wrap children"),
|
|
@@ -236,8 +236,8 @@ var Oe = /* @__PURE__ */ l({
|
|
|
236
236
|
props: { node: {} },
|
|
237
237
|
setup(e) {
|
|
238
238
|
let r = e, i = t(() => De(r.node.style));
|
|
239
|
-
return (t, r) => (v(), n(O(
|
|
240
|
-
default:
|
|
239
|
+
return (t, r) => (v(), n(O(I), { title: e.node.props.title }, {
|
|
240
|
+
default: j(() => [a("div", {
|
|
241
241
|
class: "pb-card-body",
|
|
242
242
|
style: h(i.value)
|
|
243
243
|
}, [S(t.$slots, "default", {}, void 0, !0)], 4)]),
|
|
@@ -261,9 +261,9 @@ var Oe = /* @__PURE__ */ l({
|
|
|
261
261
|
patch: { type: Function }
|
|
262
262
|
},
|
|
263
263
|
setup(e) {
|
|
264
|
-
let t = e, { t: r } =
|
|
265
|
-
return (e, i) => (v(), n(O(
|
|
266
|
-
default:
|
|
264
|
+
let t = e, { t: r } = P();
|
|
265
|
+
return (e, i) => (v(), n(O(z), { label: O(r)("coar.pageBuilder.props.title", void 0, "Title") }, {
|
|
266
|
+
default: j(() => [c(O(J), {
|
|
267
267
|
"model-value": t.node.props.title ?? "",
|
|
268
268
|
"onUpdate:modelValue": i[0] ||= (e) => t.patch({ props: { title: e } })
|
|
269
269
|
}, null, 8, ["model-value"])]),
|
|
@@ -307,9 +307,9 @@ var Oe = /* @__PURE__ */ l({
|
|
|
307
307
|
patch: { type: Function }
|
|
308
308
|
},
|
|
309
309
|
setup(e) {
|
|
310
|
-
let t = e, { t: r } =
|
|
311
|
-
return (e, i) => (v(), n(O(
|
|
312
|
-
default:
|
|
310
|
+
let t = e, { t: r } = P();
|
|
311
|
+
return (e, i) => (v(), n(O(z), { label: O(r)("coar.pageBuilder.props.title", void 0, "Title") }, {
|
|
312
|
+
default: j(() => [c(O(J), {
|
|
313
313
|
"model-value": t.node.props.title ?? "",
|
|
314
314
|
"onUpdate:modelValue": i[0] ||= (e) => t.patch({ props: { title: e } })
|
|
315
315
|
}, null, 8, ["model-value"])]),
|
|
@@ -327,7 +327,7 @@ var Oe = /* @__PURE__ */ l({
|
|
|
327
327
|
__name: "DividerRenderer",
|
|
328
328
|
props: { node: {} },
|
|
329
329
|
setup(e) {
|
|
330
|
-
return (e, t) => (v(), n(O(
|
|
330
|
+
return (e, t) => (v(), n(O(R)));
|
|
331
331
|
}
|
|
332
332
|
}),
|
|
333
333
|
builder: {
|
|
@@ -345,7 +345,7 @@ var Oe = /* @__PURE__ */ l({
|
|
|
345
345
|
resolveAsset: { type: Function }
|
|
346
346
|
},
|
|
347
347
|
setup(e) {
|
|
348
|
-
return (e, t) => (v(), n(O(
|
|
348
|
+
return (e, t) => (v(), n(O(R)));
|
|
349
349
|
}
|
|
350
350
|
})
|
|
351
351
|
}
|
|
@@ -389,12 +389,12 @@ var Oe = /* @__PURE__ */ l({
|
|
|
389
389
|
patch: { type: Function }
|
|
390
390
|
},
|
|
391
391
|
setup(e) {
|
|
392
|
-
let t = e, { t: r } =
|
|
393
|
-
return (e, i) => (v(), n(O(
|
|
392
|
+
let t = e, { t: r } = P();
|
|
393
|
+
return (e, i) => (v(), n(O(z), {
|
|
394
394
|
label: O(r)("coar.pageBuilder.props.sizeCss", void 0, "Size (CSS)"),
|
|
395
395
|
hint: O(r)("coar.pageBuilder.props.spacerSizeHint", void 0, "Leave empty to fill available space")
|
|
396
396
|
}, {
|
|
397
|
-
default:
|
|
397
|
+
default: j(() => [c(O(J), {
|
|
398
398
|
"model-value": t.node.props.size ?? "",
|
|
399
399
|
placeholder: "e.g. 24px",
|
|
400
400
|
"onUpdate:modelValue": i[0] ||= (e) => t.patch({ props: { size: e } })
|
|
@@ -463,7 +463,7 @@ var $e = Z({
|
|
|
463
463
|
props: { node: {} },
|
|
464
464
|
setup(e) {
|
|
465
465
|
return (t, r) => (v(), n(w(O(Ge)(e.node.props.level)), { class: "pb-heading" }, {
|
|
466
|
-
default:
|
|
466
|
+
default: j(() => [s(E(e.node.props.text), 1)]),
|
|
467
467
|
_: 1
|
|
468
468
|
}));
|
|
469
469
|
}
|
|
@@ -487,7 +487,7 @@ var $e = Z({
|
|
|
487
487
|
setup(e) {
|
|
488
488
|
let t = e;
|
|
489
489
|
return (e, r) => (v(), n(w(O(Ge)(t.node.props?.level)), { class: "canvas-node__heading" }, {
|
|
490
|
-
default:
|
|
490
|
+
default: j(() => [s(E(t.node.props?.text || "Heading"), 1)]),
|
|
491
491
|
_: 1
|
|
492
492
|
}));
|
|
493
493
|
}
|
|
@@ -499,7 +499,7 @@ var $e = Z({
|
|
|
499
499
|
patch: { type: Function }
|
|
500
500
|
},
|
|
501
501
|
setup(t) {
|
|
502
|
-
let n = t, { t: r } =
|
|
502
|
+
let n = t, { t: r } = P(), a = [
|
|
503
503
|
{
|
|
504
504
|
value: 1,
|
|
505
505
|
label: "H1"
|
|
@@ -525,14 +525,14 @@ var $e = Z({
|
|
|
525
525
|
label: "H6"
|
|
526
526
|
}
|
|
527
527
|
];
|
|
528
|
-
return (t, o) => (v(), i(e, null, [c(O(
|
|
529
|
-
default:
|
|
528
|
+
return (t, o) => (v(), i(e, null, [c(O(z), { label: O(r)("coar.pageBuilder.props.text", void 0, "Text") }, {
|
|
529
|
+
default: j(() => [c(O(J), {
|
|
530
530
|
"model-value": n.node.props.text ?? "",
|
|
531
531
|
"onUpdate:modelValue": o[0] ||= (e) => n.patch({ props: { text: e } })
|
|
532
532
|
}, null, 8, ["model-value"])]),
|
|
533
533
|
_: 1
|
|
534
|
-
}, 8, ["label"]), c(O(
|
|
535
|
-
default:
|
|
534
|
+
}, 8, ["label"]), c(O(z), { label: O(r)("coar.pageBuilder.props.level", void 0, "Level") }, {
|
|
535
|
+
default: j(() => [c(O(q), {
|
|
536
536
|
"model-value": n.node.props.level ?? 2,
|
|
537
537
|
options: a,
|
|
538
538
|
"onUpdate:modelValue": o[1] ||= (e) => n.patch({ props: { level: e } })
|
|
@@ -579,9 +579,9 @@ var $e = Z({
|
|
|
579
579
|
patch: { type: Function }
|
|
580
580
|
},
|
|
581
581
|
setup(e) {
|
|
582
|
-
let t = e, { t: r } =
|
|
583
|
-
return (e, i) => (v(), n(O(
|
|
584
|
-
default:
|
|
582
|
+
let t = e, { t: r } = P();
|
|
583
|
+
return (e, i) => (v(), n(O(z), { label: O(r)("coar.pageBuilder.props.text", void 0, "Text") }, {
|
|
584
|
+
default: j(() => [a("textarea", {
|
|
585
585
|
class: "pb-prop-textarea",
|
|
586
586
|
value: t.node.props.text ?? "",
|
|
587
587
|
rows: "3",
|
|
@@ -601,8 +601,8 @@ var $e = Z({
|
|
|
601
601
|
__name: "NoteRenderer",
|
|
602
602
|
props: { node: {} },
|
|
603
603
|
setup(e) {
|
|
604
|
-
return (t, r) => (v(), n(O(
|
|
605
|
-
default:
|
|
604
|
+
return (t, r) => (v(), n(O(H), { variant: e.node.props.variant }, {
|
|
605
|
+
default: j(() => [s(E(e.node.props.text), 1)]),
|
|
606
606
|
_: 1
|
|
607
607
|
}, 8, ["variant"]));
|
|
608
608
|
}
|
|
@@ -625,8 +625,8 @@ var $e = Z({
|
|
|
625
625
|
},
|
|
626
626
|
setup(e) {
|
|
627
627
|
let t = e;
|
|
628
|
-
return (e, r) => (v(), n(O(
|
|
629
|
-
default:
|
|
628
|
+
return (e, r) => (v(), n(O(H), { variant: t.node.props?.variant }, {
|
|
629
|
+
default: j(() => [s(E(t.node.props?.text || "Note text."), 1)]),
|
|
630
630
|
_: 1
|
|
631
631
|
}, 8, ["variant"]));
|
|
632
632
|
}
|
|
@@ -638,7 +638,7 @@ var $e = Z({
|
|
|
638
638
|
patch: { type: Function }
|
|
639
639
|
},
|
|
640
640
|
setup(t) {
|
|
641
|
-
let n = t, { t: r } =
|
|
641
|
+
let n = t, { t: r } = P(), a = [
|
|
642
642
|
{
|
|
643
643
|
value: "neutral",
|
|
644
644
|
label: "neutral"
|
|
@@ -664,15 +664,15 @@ var $e = Z({
|
|
|
664
664
|
label: "accent"
|
|
665
665
|
}
|
|
666
666
|
];
|
|
667
|
-
return (t, o) => (v(), i(e, null, [c(O(
|
|
668
|
-
default:
|
|
667
|
+
return (t, o) => (v(), i(e, null, [c(O(z), { label: O(r)("coar.pageBuilder.props.text", void 0, "Text") }, {
|
|
668
|
+
default: j(() => [c(O(J), {
|
|
669
669
|
"model-value": n.node.props.text ?? "",
|
|
670
670
|
rows: 3,
|
|
671
671
|
"onUpdate:modelValue": o[0] ||= (e) => n.patch({ props: { text: e } })
|
|
672
672
|
}, null, 8, ["model-value"])]),
|
|
673
673
|
_: 1
|
|
674
|
-
}, 8, ["label"]), c(O(
|
|
675
|
-
default:
|
|
674
|
+
}, 8, ["label"]), c(O(z), { label: O(r)("coar.pageBuilder.props.variant", void 0, "Variant") }, {
|
|
675
|
+
default: j(() => [c(O(q), {
|
|
676
676
|
"model-value": n.node.props.variant ?? "neutral",
|
|
677
677
|
options: a,
|
|
678
678
|
"onUpdate:modelValue": o[1] ||= (e) => n.patch({ props: { variant: e } })
|
|
@@ -722,13 +722,13 @@ var lt = Z({
|
|
|
722
722
|
function s(e) {
|
|
723
723
|
return e === "email" ? "email" : e === "url" ? "url" : void 0;
|
|
724
724
|
}
|
|
725
|
-
return (t, r) => (v(), n(O(
|
|
725
|
+
return (t, r) => (v(), n(O(z), {
|
|
726
726
|
label: e.node.props.label,
|
|
727
727
|
required: e.node.validation?.required,
|
|
728
728
|
error: a.value ? O(i).getError(a.value) : "",
|
|
729
729
|
disabled: e.node.props.disabled
|
|
730
730
|
}, {
|
|
731
|
-
default:
|
|
731
|
+
default: j(() => [c(O(J), {
|
|
732
732
|
"model-value": a.value ? O(i).getValue(a.value) ?? "" : "",
|
|
733
733
|
type: o(e.node.props.inputType),
|
|
734
734
|
autocomplete: s(e.node.props.inputType),
|
|
@@ -775,11 +775,11 @@ var lt = Z({
|
|
|
775
775
|
resolveAsset: { type: Function }
|
|
776
776
|
},
|
|
777
777
|
setup(e) {
|
|
778
|
-
return (t, r) => (v(), n(O(
|
|
778
|
+
return (t, r) => (v(), n(O(z), {
|
|
779
779
|
label: e.node.props.label,
|
|
780
780
|
required: e.node.validation?.required
|
|
781
781
|
}, {
|
|
782
|
-
default:
|
|
782
|
+
default: j(() => [c(O(J), {
|
|
783
783
|
"model-value": "",
|
|
784
784
|
rows: e.node.props.rows,
|
|
785
785
|
placeholder: e.node.props.placeholder,
|
|
@@ -796,7 +796,7 @@ var lt = Z({
|
|
|
796
796
|
patch: { type: Function }
|
|
797
797
|
},
|
|
798
798
|
setup(t) {
|
|
799
|
-
let n = t, { t: r } =
|
|
799
|
+
let n = t, { t: r } = P(), a = [
|
|
800
800
|
{
|
|
801
801
|
value: "text",
|
|
802
802
|
label: "text"
|
|
@@ -811,30 +811,30 @@ var lt = Z({
|
|
|
811
811
|
}
|
|
812
812
|
];
|
|
813
813
|
return (t, o) => (v(), i(e, null, [
|
|
814
|
-
c(O(
|
|
815
|
-
default:
|
|
814
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
815
|
+
default: j(() => [c(O(J), {
|
|
816
816
|
"model-value": n.node.props.label ?? "",
|
|
817
817
|
"onUpdate:modelValue": o[0] ||= (e) => n.patch({ props: { label: e } })
|
|
818
818
|
}, null, 8, ["model-value"])]),
|
|
819
819
|
_: 1
|
|
820
820
|
}, 8, ["label"]),
|
|
821
|
-
c(O(
|
|
822
|
-
default:
|
|
821
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.placeholder", void 0, "Placeholder") }, {
|
|
822
|
+
default: j(() => [c(O(J), {
|
|
823
823
|
"model-value": n.node.props.placeholder ?? "",
|
|
824
824
|
"onUpdate:modelValue": o[1] ||= (e) => n.patch({ props: { placeholder: e } })
|
|
825
825
|
}, null, 8, ["model-value"])]),
|
|
826
826
|
_: 1
|
|
827
827
|
}, 8, ["label"]),
|
|
828
|
-
c(O(
|
|
829
|
-
default:
|
|
828
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.inputType", void 0, "Input type") }, {
|
|
829
|
+
default: j(() => [c(O(q), {
|
|
830
830
|
"model-value": n.node.props.inputType ?? "text",
|
|
831
831
|
options: a,
|
|
832
832
|
"onUpdate:modelValue": o[2] ||= (e) => n.patch({ props: { inputType: e } })
|
|
833
833
|
}, null, 8, ["model-value"])]),
|
|
834
834
|
_: 1
|
|
835
835
|
}, 8, ["label"]),
|
|
836
|
-
c(O(
|
|
837
|
-
default:
|
|
836
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.rows", void 0, "Rows") }, {
|
|
837
|
+
default: j(() => [c(O(U), {
|
|
838
838
|
clearable: "",
|
|
839
839
|
min: 1,
|
|
840
840
|
max: 20,
|
|
@@ -844,7 +844,7 @@ var lt = Z({
|
|
|
844
844
|
}, null, 8, ["model-value"])]),
|
|
845
845
|
_: 1
|
|
846
846
|
}, 8, ["label"]),
|
|
847
|
-
c(O(
|
|
847
|
+
c(O(L), {
|
|
848
848
|
"model-value": !!n.node.props.disabled,
|
|
849
849
|
label: O(r)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
850
850
|
"onUpdate:modelValue": o[4] ||= (e) => n.patch({ props: { disabled: e } })
|
|
@@ -863,13 +863,13 @@ var lt = Z({
|
|
|
863
863
|
props: { node: {} },
|
|
864
864
|
setup(e) {
|
|
865
865
|
let r = e, i = $(), a = t(() => r.node.name);
|
|
866
|
-
return (t, r) => (v(), n(O(
|
|
866
|
+
return (t, r) => (v(), n(O(z), {
|
|
867
867
|
label: e.node.props.label,
|
|
868
868
|
required: e.node.validation?.required,
|
|
869
869
|
error: a.value ? O(i).getError(a.value) : "",
|
|
870
870
|
disabled: e.node.props.disabled
|
|
871
871
|
}, {
|
|
872
|
-
default:
|
|
872
|
+
default: j(() => [c(O(ne), {
|
|
873
873
|
"model-value": a.value ? O(i).getValue(a.value) ?? "" : "",
|
|
874
874
|
placeholder: e.node.props.placeholder,
|
|
875
875
|
disabled: e.node.props.disabled,
|
|
@@ -910,11 +910,11 @@ var lt = Z({
|
|
|
910
910
|
resolveAsset: { type: Function }
|
|
911
911
|
},
|
|
912
912
|
setup(e) {
|
|
913
|
-
return (t, r) => (v(), n(O(
|
|
913
|
+
return (t, r) => (v(), n(O(z), {
|
|
914
914
|
label: e.node.props.label,
|
|
915
915
|
required: e.node.validation?.required
|
|
916
916
|
}, {
|
|
917
|
-
default:
|
|
917
|
+
default: j(() => [c(O(ne), {
|
|
918
918
|
"model-value": "",
|
|
919
919
|
placeholder: e.node.props.placeholder,
|
|
920
920
|
disabled: ""
|
|
@@ -930,23 +930,23 @@ var lt = Z({
|
|
|
930
930
|
patch: { type: Function }
|
|
931
931
|
},
|
|
932
932
|
setup(t) {
|
|
933
|
-
let n = t, { t: r } =
|
|
933
|
+
let n = t, { t: r } = P();
|
|
934
934
|
return (t, a) => (v(), i(e, null, [
|
|
935
|
-
c(O(
|
|
936
|
-
default:
|
|
935
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
936
|
+
default: j(() => [c(O(J), {
|
|
937
937
|
"model-value": n.node.props.label ?? "",
|
|
938
938
|
"onUpdate:modelValue": a[0] ||= (e) => n.patch({ props: { label: e } })
|
|
939
939
|
}, null, 8, ["model-value"])]),
|
|
940
940
|
_: 1
|
|
941
941
|
}, 8, ["label"]),
|
|
942
|
-
c(O(
|
|
943
|
-
default:
|
|
942
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.placeholder", void 0, "Placeholder") }, {
|
|
943
|
+
default: j(() => [c(O(J), {
|
|
944
944
|
"model-value": n.node.props.placeholder ?? "",
|
|
945
945
|
"onUpdate:modelValue": a[1] ||= (e) => n.patch({ props: { placeholder: e } })
|
|
946
946
|
}, null, 8, ["model-value"])]),
|
|
947
947
|
_: 1
|
|
948
948
|
}, 8, ["label"]),
|
|
949
|
-
c(O(
|
|
949
|
+
c(O(L), {
|
|
950
950
|
"model-value": !!n.node.props.disabled,
|
|
951
951
|
label: O(r)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
952
952
|
"onUpdate:modelValue": a[2] ||= (e) => n.patch({ props: { disabled: e } })
|
|
@@ -964,13 +964,13 @@ var lt = Z({
|
|
|
964
964
|
props: { node: {} },
|
|
965
965
|
setup(e) {
|
|
966
966
|
let r = e, i = $(), a = t(() => r.node.name);
|
|
967
|
-
return (t, r) => (v(), n(O(
|
|
967
|
+
return (t, r) => (v(), n(O(z), {
|
|
968
968
|
label: e.node.props.label,
|
|
969
969
|
required: e.node.validation?.required,
|
|
970
970
|
error: a.value ? O(i).getError(a.value) : "",
|
|
971
971
|
disabled: e.node.props.disabled
|
|
972
972
|
}, {
|
|
973
|
-
default:
|
|
973
|
+
default: j(() => [c(O(U), {
|
|
974
974
|
"model-value": a.value ? O(i).getValue(a.value) ?? null : null,
|
|
975
975
|
placeholder: e.node.props.placeholder,
|
|
976
976
|
min: e.node.props.min,
|
|
@@ -1004,11 +1004,11 @@ var lt = Z({
|
|
|
1004
1004
|
resolveAsset: { type: Function }
|
|
1005
1005
|
},
|
|
1006
1006
|
setup(e) {
|
|
1007
|
-
return (t, r) => (v(), n(O(
|
|
1007
|
+
return (t, r) => (v(), n(O(z), {
|
|
1008
1008
|
label: e.node.props.label,
|
|
1009
1009
|
required: e.node.validation?.required
|
|
1010
1010
|
}, {
|
|
1011
|
-
default:
|
|
1011
|
+
default: j(() => [c(O(U), {
|
|
1012
1012
|
"model-value": e.node.defaultValue ?? null,
|
|
1013
1013
|
placeholder: e.node.props.placeholder,
|
|
1014
1014
|
disabled: ""
|
|
@@ -1039,28 +1039,28 @@ var lt = Z({
|
|
|
1039
1039
|
patch: { type: Function }
|
|
1040
1040
|
},
|
|
1041
1041
|
setup(t) {
|
|
1042
|
-
let n = t, { t: r } =
|
|
1042
|
+
let n = t, { t: r } = P();
|
|
1043
1043
|
function o(e, t) {
|
|
1044
1044
|
n.patch({ props: { [e]: t ?? void 0 } });
|
|
1045
1045
|
}
|
|
1046
1046
|
return (t, s) => (v(), i(e, null, [
|
|
1047
|
-
c(O(
|
|
1048
|
-
default:
|
|
1047
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
1048
|
+
default: j(() => [c(O(J), {
|
|
1049
1049
|
"model-value": n.node.props.label ?? "",
|
|
1050
1050
|
"onUpdate:modelValue": s[0] ||= (e) => n.patch({ props: { label: e } })
|
|
1051
1051
|
}, null, 8, ["model-value"])]),
|
|
1052
1052
|
_: 1
|
|
1053
1053
|
}, 8, ["label"]),
|
|
1054
|
-
c(O(
|
|
1055
|
-
default:
|
|
1054
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.placeholder", void 0, "Placeholder") }, {
|
|
1055
|
+
default: j(() => [c(O(J), {
|
|
1056
1056
|
"model-value": n.node.props.placeholder ?? "",
|
|
1057
1057
|
"onUpdate:modelValue": s[1] ||= (e) => n.patch({ props: { placeholder: e } })
|
|
1058
1058
|
}, null, 8, ["model-value"])]),
|
|
1059
1059
|
_: 1
|
|
1060
1060
|
}, 8, ["label"]),
|
|
1061
1061
|
a("div", pt, [
|
|
1062
|
-
c(O(
|
|
1063
|
-
default:
|
|
1062
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.min", void 0, "Min") }, {
|
|
1063
|
+
default: j(() => [c(O(U), {
|
|
1064
1064
|
size: "s",
|
|
1065
1065
|
clearable: "",
|
|
1066
1066
|
decimals: 6,
|
|
@@ -1069,8 +1069,8 @@ var lt = Z({
|
|
|
1069
1069
|
}, null, 8, ["model-value"])]),
|
|
1070
1070
|
_: 1
|
|
1071
1071
|
}, 8, ["label"]),
|
|
1072
|
-
c(O(
|
|
1073
|
-
default:
|
|
1072
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.max", void 0, "Max") }, {
|
|
1073
|
+
default: j(() => [c(O(U), {
|
|
1074
1074
|
size: "s",
|
|
1075
1075
|
clearable: "",
|
|
1076
1076
|
decimals: 6,
|
|
@@ -1079,8 +1079,8 @@ var lt = Z({
|
|
|
1079
1079
|
}, null, 8, ["model-value"])]),
|
|
1080
1080
|
_: 1
|
|
1081
1081
|
}, 8, ["label"]),
|
|
1082
|
-
c(O(
|
|
1083
|
-
default:
|
|
1082
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.step", void 0, "Step") }, {
|
|
1083
|
+
default: j(() => [c(O(U), {
|
|
1084
1084
|
size: "s",
|
|
1085
1085
|
clearable: "",
|
|
1086
1086
|
decimals: 6,
|
|
@@ -1089,8 +1089,8 @@ var lt = Z({
|
|
|
1089
1089
|
}, null, 8, ["model-value"])]),
|
|
1090
1090
|
_: 1
|
|
1091
1091
|
}, 8, ["label"]),
|
|
1092
|
-
c(O(
|
|
1093
|
-
default:
|
|
1092
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.decimals", void 0, "Decimals") }, {
|
|
1093
|
+
default: j(() => [c(O(U), {
|
|
1094
1094
|
size: "s",
|
|
1095
1095
|
clearable: "",
|
|
1096
1096
|
min: 0,
|
|
@@ -1101,7 +1101,7 @@ var lt = Z({
|
|
|
1101
1101
|
_: 1
|
|
1102
1102
|
}, 8, ["label"])
|
|
1103
1103
|
]),
|
|
1104
|
-
c(O(
|
|
1104
|
+
c(O(L), {
|
|
1105
1105
|
"model-value": !!n.node.props.disabled,
|
|
1106
1106
|
label: O(r)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
1107
1107
|
"onUpdate:modelValue": s[6] ||= (e) => n.patch({ props: { disabled: e } })
|
|
@@ -1122,7 +1122,7 @@ var lt = Z({
|
|
|
1122
1122
|
emits: ["update:modelValue"],
|
|
1123
1123
|
setup(e, { emit: t }) {
|
|
1124
1124
|
let r = e, i = t;
|
|
1125
|
-
return (e, t) => (v(), n(O(
|
|
1125
|
+
return (e, t) => (v(), n(O(U), {
|
|
1126
1126
|
clearable: "",
|
|
1127
1127
|
decimals: r.props.decimals ?? 6,
|
|
1128
1128
|
"model-value": r.modelValue ?? null,
|
|
@@ -1140,11 +1140,11 @@ var lt = Z({
|
|
|
1140
1140
|
function o(e) {
|
|
1141
1141
|
a.value && (i.setValue(a.value, e), i.markTouched(a.value));
|
|
1142
1142
|
}
|
|
1143
|
-
return (t, r) => (v(), n(O(
|
|
1143
|
+
return (t, r) => (v(), n(O(z), {
|
|
1144
1144
|
error: a.value ? O(i).getError(a.value) : "",
|
|
1145
1145
|
disabled: e.node.props.disabled
|
|
1146
1146
|
}, {
|
|
1147
|
-
default:
|
|
1147
|
+
default: j(() => [c(O(L), {
|
|
1148
1148
|
"model-value": a.value ? O(i).getValue(a.value) ?? !1 : !1,
|
|
1149
1149
|
label: e.node.props.label,
|
|
1150
1150
|
required: e.node.validation?.required,
|
|
@@ -1179,7 +1179,7 @@ var lt = Z({
|
|
|
1179
1179
|
resolveAsset: { type: Function }
|
|
1180
1180
|
},
|
|
1181
1181
|
setup(e) {
|
|
1182
|
-
return (t, r) => (v(), n(O(
|
|
1182
|
+
return (t, r) => (v(), n(O(L), {
|
|
1183
1183
|
"model-value": !!e.node.defaultValue,
|
|
1184
1184
|
label: e.node.props.label || "Checkbox",
|
|
1185
1185
|
required: e.node.validation?.required,
|
|
@@ -1198,14 +1198,14 @@ var lt = Z({
|
|
|
1198
1198
|
patch: { type: Function }
|
|
1199
1199
|
},
|
|
1200
1200
|
setup(t) {
|
|
1201
|
-
let n = t, { t: r } =
|
|
1202
|
-
return (t, a) => (v(), i(e, null, [c(O(
|
|
1203
|
-
default:
|
|
1201
|
+
let n = t, { t: r } = P();
|
|
1202
|
+
return (t, a) => (v(), i(e, null, [c(O(z), { label: O(r)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
1203
|
+
default: j(() => [c(O(J), {
|
|
1204
1204
|
"model-value": n.node.props.label ?? "",
|
|
1205
1205
|
"onUpdate:modelValue": a[0] ||= (e) => n.patch({ props: { label: e } })
|
|
1206
1206
|
}, null, 8, ["model-value"])]),
|
|
1207
1207
|
_: 1
|
|
1208
|
-
}, 8, ["label"]), c(O(
|
|
1208
|
+
}, 8, ["label"]), c(O(L), {
|
|
1209
1209
|
"model-value": !!n.node.props.disabled,
|
|
1210
1210
|
label: O(r)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
1211
1211
|
"onUpdate:modelValue": a[1] ||= (e) => n.patch({ props: { disabled: e } })
|
|
@@ -1224,8 +1224,8 @@ var lt = Z({
|
|
|
1224
1224
|
},
|
|
1225
1225
|
emits: ["update:modelValue"],
|
|
1226
1226
|
setup(e, { emit: t }) {
|
|
1227
|
-
let r = e, i = t, { t: a } =
|
|
1228
|
-
return (e, t) => (v(), n(O(
|
|
1227
|
+
let r = e, i = t, { t: a } = P();
|
|
1228
|
+
return (e, t) => (v(), n(O(L), {
|
|
1229
1229
|
"model-value": !!r.modelValue,
|
|
1230
1230
|
label: O(a)("coar.pageBuilder.props.checkedByDefault", void 0, "Checked by default"),
|
|
1231
1231
|
"onUpdate:modelValue": t[0] ||= (e) => i("update:modelValue", e || void 0)
|
|
@@ -1242,11 +1242,11 @@ var lt = Z({
|
|
|
1242
1242
|
function o(e) {
|
|
1243
1243
|
a.value && (i.setValue(a.value, e), i.markTouched(a.value));
|
|
1244
1244
|
}
|
|
1245
|
-
return (t, r) => (v(), n(O(
|
|
1245
|
+
return (t, r) => (v(), n(O(z), {
|
|
1246
1246
|
error: a.value ? O(i).getError(a.value) : "",
|
|
1247
1247
|
disabled: e.node.props.disabled
|
|
1248
1248
|
}, {
|
|
1249
|
-
default:
|
|
1249
|
+
default: j(() => [c(O(ae), {
|
|
1250
1250
|
"model-value": a.value ? O(i).getValue(a.value) ?? !1 : !1,
|
|
1251
1251
|
label: e.node.props.label,
|
|
1252
1252
|
disabled: e.node.props.disabled,
|
|
@@ -1293,14 +1293,14 @@ var lt = Z({
|
|
|
1293
1293
|
patch: { type: Function }
|
|
1294
1294
|
},
|
|
1295
1295
|
setup(t) {
|
|
1296
|
-
let n = t, { t: r } =
|
|
1297
|
-
return (t, a) => (v(), i(e, null, [c(O(
|
|
1298
|
-
default:
|
|
1296
|
+
let n = t, { t: r } = P();
|
|
1297
|
+
return (t, a) => (v(), i(e, null, [c(O(z), { label: O(r)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
1298
|
+
default: j(() => [c(O(J), {
|
|
1299
1299
|
"model-value": n.node.props.label ?? "",
|
|
1300
1300
|
"onUpdate:modelValue": a[0] ||= (e) => n.patch({ props: { label: e } })
|
|
1301
1301
|
}, null, 8, ["model-value"])]),
|
|
1302
1302
|
_: 1
|
|
1303
|
-
}, 8, ["label"]), c(O(
|
|
1303
|
+
}, 8, ["label"]), c(O(L), {
|
|
1304
1304
|
"model-value": !!n.node.props.disabled,
|
|
1305
1305
|
label: O(r)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
1306
1306
|
"onUpdate:modelValue": a[1] ||= (e) => n.patch({ props: { disabled: e } })
|
|
@@ -1319,7 +1319,7 @@ var lt = Z({
|
|
|
1319
1319
|
},
|
|
1320
1320
|
emits: ["update:modelValue"],
|
|
1321
1321
|
setup(e, { emit: t }) {
|
|
1322
|
-
let r = e, i = t, { t: a } =
|
|
1322
|
+
let r = e, i = t, { t: a } = P();
|
|
1323
1323
|
return (e, t) => (v(), n(O(ae), {
|
|
1324
1324
|
"model-value": !!r.modelValue,
|
|
1325
1325
|
label: O(a)("coar.pageBuilder.props.onByDefault", void 0, "On by default"),
|
|
@@ -1336,7 +1336,7 @@ function _t(e) {
|
|
|
1336
1336
|
}
|
|
1337
1337
|
function vt(e) {
|
|
1338
1338
|
let t = $(), n = b([]), r = !1, i = 0;
|
|
1339
|
-
return
|
|
1339
|
+
return te(() => {
|
|
1340
1340
|
let a = e(), o = a.optionsSourceId, s = t.config?.optionsSource;
|
|
1341
1341
|
if (o && s) {
|
|
1342
1342
|
let e = ++i;
|
|
@@ -1358,13 +1358,13 @@ var yt = /* @__PURE__ */ l({
|
|
|
1358
1358
|
function d(e) {
|
|
1359
1359
|
l.value && (o.setValue(l.value, e), o.markTouched(l.value));
|
|
1360
1360
|
}
|
|
1361
|
-
return (t, a) => (v(), n(O(
|
|
1361
|
+
return (t, a) => (v(), n(O(z), {
|
|
1362
1362
|
label: r.node.props.label,
|
|
1363
1363
|
required: r.node.validation?.required,
|
|
1364
1364
|
error: l.value ? O(o).getError(l.value) : "",
|
|
1365
1365
|
disabled: r.node.props.disabled
|
|
1366
1366
|
}, {
|
|
1367
|
-
default:
|
|
1367
|
+
default: j(() => [c(O(ie), {
|
|
1368
1368
|
"model-value": l.value ? O(o).getValue(l.value) ?? void 0 : void 0,
|
|
1369
1369
|
name: l.value ?? r.node.id,
|
|
1370
1370
|
label: r.node.props.label,
|
|
@@ -1373,12 +1373,12 @@ var yt = /* @__PURE__ */ l({
|
|
|
1373
1373
|
disabled: r.node.props.disabled,
|
|
1374
1374
|
"onUpdate:modelValue": d
|
|
1375
1375
|
}, {
|
|
1376
|
-
default:
|
|
1376
|
+
default: j(() => [(v(!0), i(e, null, x(O(u), (e) => (v(), n(O(K), {
|
|
1377
1377
|
key: e.value,
|
|
1378
1378
|
value: e.value,
|
|
1379
1379
|
disabled: r.node.props.disabled
|
|
1380
1380
|
}, {
|
|
1381
|
-
default:
|
|
1381
|
+
default: j(() => [s(E(e.label), 1)]),
|
|
1382
1382
|
_: 2
|
|
1383
1383
|
}, 1032, ["value", "disabled"]))), 128))]),
|
|
1384
1384
|
_: 1
|
|
@@ -1406,22 +1406,22 @@ var yt = /* @__PURE__ */ l({
|
|
|
1406
1406
|
},
|
|
1407
1407
|
setup(r) {
|
|
1408
1408
|
let a = r, o = t(() => typeof a.node.defaultValue == "string" ? a.node.defaultValue : void 0);
|
|
1409
|
-
return (t, a) => (v(), n(O(
|
|
1409
|
+
return (t, a) => (v(), n(O(z), {
|
|
1410
1410
|
label: r.node.props.label,
|
|
1411
1411
|
required: r.node.validation?.required
|
|
1412
1412
|
}, {
|
|
1413
|
-
default:
|
|
1413
|
+
default: j(() => [c(O(ie), {
|
|
1414
1414
|
"model-value": o.value,
|
|
1415
1415
|
name: `preview-${r.node.id}`,
|
|
1416
1416
|
orientation: r.node.props.orientation,
|
|
1417
1417
|
disabled: ""
|
|
1418
1418
|
}, {
|
|
1419
|
-
default:
|
|
1419
|
+
default: j(() => [(v(!0), i(e, null, x(r.node.props.options ?? [], (e) => (v(), n(O(K), {
|
|
1420
1420
|
key: e.value,
|
|
1421
1421
|
value: e.value,
|
|
1422
1422
|
disabled: ""
|
|
1423
1423
|
}, {
|
|
1424
|
-
default:
|
|
1424
|
+
default: j(() => [s(E(e.label), 1)]),
|
|
1425
1425
|
_: 2
|
|
1426
1426
|
}, 1032, ["value"]))), 128))]),
|
|
1427
1427
|
_: 1
|
|
@@ -1446,7 +1446,7 @@ var yt = /* @__PURE__ */ l({
|
|
|
1446
1446
|
props: { options: {} },
|
|
1447
1447
|
emits: ["update:options"],
|
|
1448
1448
|
setup(t, { emit: n }) {
|
|
1449
|
-
let r = t, o = n, { t: s } =
|
|
1449
|
+
let r = t, o = n, { t: s } = P();
|
|
1450
1450
|
function l(e, t, n) {
|
|
1451
1451
|
o("update:options", r.options.map((r, i) => i === e ? {
|
|
1452
1452
|
...r,
|
|
@@ -1501,7 +1501,7 @@ var yt = /* @__PURE__ */ l({
|
|
|
1501
1501
|
disabled: n === 0,
|
|
1502
1502
|
title: O(s)("coar.pageBuilder.common.moveUp", void 0, "Move up"),
|
|
1503
1503
|
onClick: (e) => f(n, -1)
|
|
1504
|
-
}, [c(O(
|
|
1504
|
+
}, [c(O(B), {
|
|
1505
1505
|
name: "chevron-up",
|
|
1506
1506
|
size: "xs"
|
|
1507
1507
|
})], 8, Ct),
|
|
@@ -1511,7 +1511,7 @@ var yt = /* @__PURE__ */ l({
|
|
|
1511
1511
|
disabled: n === t.options.length - 1,
|
|
1512
1512
|
title: O(s)("coar.pageBuilder.common.moveDown", void 0, "Move down"),
|
|
1513
1513
|
onClick: (e) => f(n, 1)
|
|
1514
|
-
}, [c(O(
|
|
1514
|
+
}, [c(O(B), {
|
|
1515
1515
|
name: "chevron-down",
|
|
1516
1516
|
size: "xs"
|
|
1517
1517
|
})], 8, wt),
|
|
@@ -1520,7 +1520,7 @@ var yt = /* @__PURE__ */ l({
|
|
|
1520
1520
|
class: "pb-select-options__btn pb-select-options__btn--danger",
|
|
1521
1521
|
title: O(s)("coar.pageBuilder.props.removeOption", void 0, "Remove option"),
|
|
1522
1522
|
onClick: (e) => d(n)
|
|
1523
|
-
}, [c(O(
|
|
1523
|
+
}, [c(O(B), {
|
|
1524
1524
|
name: "x",
|
|
1525
1525
|
size: "xs"
|
|
1526
1526
|
})], 8, Tt)
|
|
@@ -1529,7 +1529,7 @@ var yt = /* @__PURE__ */ l({
|
|
|
1529
1529
|
type: "button",
|
|
1530
1530
|
class: "pb-select-options__add",
|
|
1531
1531
|
onClick: u
|
|
1532
|
-
}, [c(O(
|
|
1532
|
+
}, [c(O(B), {
|
|
1533
1533
|
name: "plus",
|
|
1534
1534
|
size: "xs"
|
|
1535
1535
|
}), a("span", null, E(O(s)("coar.pageBuilder.props.addOption", void 0, "Add option")), 1)])
|
|
@@ -1542,7 +1542,7 @@ var yt = /* @__PURE__ */ l({
|
|
|
1542
1542
|
patch: { type: Function }
|
|
1543
1543
|
},
|
|
1544
1544
|
setup(n) {
|
|
1545
|
-
let r = n, { t: a } =
|
|
1545
|
+
let r = n, { t: a } = P(), o = t(() => r.node.props.options ?? []);
|
|
1546
1546
|
function s(e) {
|
|
1547
1547
|
let t = { props: { options: e.length > 0 ? e : void 0 } };
|
|
1548
1548
|
r.node.defaultValue !== void 0 && !e.some((e) => e.value === r.node.defaultValue) && (t.defaultValue = void 0), r.patch(t);
|
|
@@ -1555,8 +1555,8 @@ var yt = /* @__PURE__ */ l({
|
|
|
1555
1555
|
label: a("coar.pageBuilder.props.horizontal", void 0, "Horizontal")
|
|
1556
1556
|
}]);
|
|
1557
1557
|
return (t, n) => (v(), i(e, null, [
|
|
1558
|
-
c(O(
|
|
1559
|
-
default:
|
|
1558
|
+
c(O(z), { label: O(a)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
1559
|
+
default: j(() => [c(O(J), {
|
|
1560
1560
|
"model-value": r.node.props.label ?? "",
|
|
1561
1561
|
"onUpdate:modelValue": n[0] ||= (e) => r.patch({ props: { label: e } })
|
|
1562
1562
|
}, null, 8, ["model-value"])]),
|
|
@@ -1566,26 +1566,26 @@ var yt = /* @__PURE__ */ l({
|
|
|
1566
1566
|
options: o.value,
|
|
1567
1567
|
"onUpdate:options": s
|
|
1568
1568
|
}, null, 8, ["options"]),
|
|
1569
|
-
c(O(
|
|
1569
|
+
c(O(z), {
|
|
1570
1570
|
label: O(a)("coar.pageBuilder.props.optionsSource", void 0, "Options source ID"),
|
|
1571
1571
|
hint: O(a)("coar.pageBuilder.props.optionsSourceHint", void 0, "Resolved via config.optionsSource at render time — overrides the static options")
|
|
1572
1572
|
}, {
|
|
1573
|
-
default:
|
|
1573
|
+
default: j(() => [c(O(J), {
|
|
1574
1574
|
"model-value": r.node.props.optionsSourceId ?? "",
|
|
1575
1575
|
placeholder: "e.g. countries",
|
|
1576
1576
|
"onUpdate:modelValue": n[1] ||= (e) => r.patch({ props: { optionsSourceId: e || void 0 } })
|
|
1577
1577
|
}, null, 8, ["model-value"])]),
|
|
1578
1578
|
_: 1
|
|
1579
1579
|
}, 8, ["label", "hint"]),
|
|
1580
|
-
c(O(
|
|
1581
|
-
default:
|
|
1580
|
+
c(O(z), { label: O(a)("coar.pageBuilder.props.orientation", void 0, "Orientation") }, {
|
|
1581
|
+
default: j(() => [c(O(q), {
|
|
1582
1582
|
"model-value": r.node.props.orientation ?? "vertical",
|
|
1583
1583
|
options: l.value,
|
|
1584
1584
|
"onUpdate:modelValue": n[2] ||= (e) => r.patch({ props: { orientation: e } })
|
|
1585
1585
|
}, null, 8, ["model-value", "options"])]),
|
|
1586
1586
|
_: 1
|
|
1587
1587
|
}, 8, ["label"]),
|
|
1588
|
-
c(O(
|
|
1588
|
+
c(O(L), {
|
|
1589
1589
|
"model-value": !!r.node.props.disabled,
|
|
1590
1590
|
label: O(a)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
1591
1591
|
"onUpdate:modelValue": n[3] ||= (e) => r.patch({ props: { disabled: e } })
|
|
@@ -1640,7 +1640,7 @@ var kt = Z({
|
|
|
1640
1640
|
},
|
|
1641
1641
|
emits: ["update:modelValue"],
|
|
1642
1642
|
setup(e, { emit: r }) {
|
|
1643
|
-
let i = e, a = r, { t: o } =
|
|
1643
|
+
let i = e, a = r, { t: o } = P(), s = t(() => Ot(i.props.options));
|
|
1644
1644
|
return (e, t) => (v(), n(O(q), {
|
|
1645
1645
|
"model-value": i.modelValue ?? null,
|
|
1646
1646
|
options: s.value,
|
|
@@ -1664,13 +1664,13 @@ var kt = Z({
|
|
|
1664
1664
|
function s(e) {
|
|
1665
1665
|
a.value && (i.setValue(a.value, e), i.markTouched(a.value));
|
|
1666
1666
|
}
|
|
1667
|
-
return (t, r) => (v(), n(O(
|
|
1667
|
+
return (t, r) => (v(), n(O(z), {
|
|
1668
1668
|
label: e.node.props.label,
|
|
1669
1669
|
required: e.node.validation?.required,
|
|
1670
1670
|
error: a.value ? O(i).getError(a.value) : "",
|
|
1671
1671
|
disabled: e.node.props.disabled
|
|
1672
1672
|
}, {
|
|
1673
|
-
default:
|
|
1673
|
+
default: j(() => [c(O(q), {
|
|
1674
1674
|
"model-value": a.value ? O(i).getValue(a.value) ?? null : null,
|
|
1675
1675
|
options: O(Ot)(O(o)),
|
|
1676
1676
|
placeholder: e.node.props.placeholder,
|
|
@@ -1719,11 +1719,11 @@ var kt = Z({
|
|
|
1719
1719
|
resolveAsset: { type: Function }
|
|
1720
1720
|
},
|
|
1721
1721
|
setup(e) {
|
|
1722
|
-
return (t, r) => (v(), n(O(
|
|
1722
|
+
return (t, r) => (v(), n(O(z), {
|
|
1723
1723
|
label: e.node.props.label,
|
|
1724
1724
|
required: e.node.validation?.required
|
|
1725
1725
|
}, {
|
|
1726
|
-
default:
|
|
1726
|
+
default: j(() => [c(O(q), {
|
|
1727
1727
|
"model-value": null,
|
|
1728
1728
|
options: O(Ot)(e.node.props.options),
|
|
1729
1729
|
placeholder: e.node.props.placeholder,
|
|
@@ -1740,21 +1740,21 @@ var kt = Z({
|
|
|
1740
1740
|
patch: { type: Function }
|
|
1741
1741
|
},
|
|
1742
1742
|
setup(n) {
|
|
1743
|
-
let r = n, { t: a } =
|
|
1743
|
+
let r = n, { t: a } = P(), o = t(() => r.node.props.options ?? []);
|
|
1744
1744
|
function s(e) {
|
|
1745
1745
|
let t = { props: { options: e.length > 0 ? e : void 0 } };
|
|
1746
1746
|
r.node.defaultValue !== void 0 && !e.some((e) => e.value === r.node.defaultValue) && (t.defaultValue = void 0), r.patch(t);
|
|
1747
1747
|
}
|
|
1748
1748
|
return (t, n) => (v(), i(e, null, [
|
|
1749
|
-
c(O(
|
|
1750
|
-
default:
|
|
1749
|
+
c(O(z), { label: O(a)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
1750
|
+
default: j(() => [c(O(J), {
|
|
1751
1751
|
"model-value": r.node.props.label ?? "",
|
|
1752
1752
|
"onUpdate:modelValue": n[0] ||= (e) => r.patch({ props: { label: e } })
|
|
1753
1753
|
}, null, 8, ["model-value"])]),
|
|
1754
1754
|
_: 1
|
|
1755
1755
|
}, 8, ["label"]),
|
|
1756
|
-
c(O(
|
|
1757
|
-
default:
|
|
1756
|
+
c(O(z), { label: O(a)("coar.pageBuilder.props.placeholder", void 0, "Placeholder") }, {
|
|
1757
|
+
default: j(() => [c(O(J), {
|
|
1758
1758
|
"model-value": r.node.props.placeholder ?? "",
|
|
1759
1759
|
"onUpdate:modelValue": n[1] ||= (e) => r.patch({ props: { placeholder: e } })
|
|
1760
1760
|
}, null, 8, ["model-value"])]),
|
|
@@ -1764,18 +1764,18 @@ var kt = Z({
|
|
|
1764
1764
|
options: o.value,
|
|
1765
1765
|
"onUpdate:options": s
|
|
1766
1766
|
}, null, 8, ["options"]),
|
|
1767
|
-
c(O(
|
|
1767
|
+
c(O(z), {
|
|
1768
1768
|
label: O(a)("coar.pageBuilder.props.optionsSource", void 0, "Options source ID"),
|
|
1769
1769
|
hint: O(a)("coar.pageBuilder.props.optionsSourceHint", void 0, "Resolved via config.optionsSource at render time — overrides the static options")
|
|
1770
1770
|
}, {
|
|
1771
|
-
default:
|
|
1771
|
+
default: j(() => [c(O(J), {
|
|
1772
1772
|
"model-value": r.node.props.optionsSourceId ?? "",
|
|
1773
1773
|
placeholder: "e.g. countries",
|
|
1774
1774
|
"onUpdate:modelValue": n[2] ||= (e) => r.patch({ props: { optionsSourceId: e || void 0 } })
|
|
1775
1775
|
}, null, 8, ["model-value"])]),
|
|
1776
1776
|
_: 1
|
|
1777
1777
|
}, 8, ["label", "hint"]),
|
|
1778
|
-
c(O(
|
|
1778
|
+
c(O(L), {
|
|
1779
1779
|
"model-value": !!r.node.props.disabled,
|
|
1780
1780
|
label: O(a)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
1781
1781
|
"onUpdate:modelValue": n[3] ||= (e) => r.patch({ props: { disabled: e } })
|
|
@@ -1795,7 +1795,7 @@ var kt = Z({
|
|
|
1795
1795
|
},
|
|
1796
1796
|
emits: ["update:modelValue"],
|
|
1797
1797
|
setup(e, { emit: r }) {
|
|
1798
|
-
let i = e, a = r, { t: o } =
|
|
1798
|
+
let i = e, a = r, { t: o } = P(), s = t(() => Ot(i.props.options));
|
|
1799
1799
|
return (e, t) => (v(), n(O(q), {
|
|
1800
1800
|
"model-value": i.modelValue ?? null,
|
|
1801
1801
|
options: s.value,
|
|
@@ -1819,13 +1819,13 @@ var kt = Z({
|
|
|
1819
1819
|
function s(e) {
|
|
1820
1820
|
a.value && (i.setValue(a.value, e), i.markTouched(a.value));
|
|
1821
1821
|
}
|
|
1822
|
-
return (t, r) => (v(), n(O(
|
|
1822
|
+
return (t, r) => (v(), n(O(z), {
|
|
1823
1823
|
label: e.node.props.label,
|
|
1824
1824
|
required: e.node.validation?.required,
|
|
1825
1825
|
error: a.value ? O(i).getError(a.value) : "",
|
|
1826
1826
|
disabled: e.node.props.disabled
|
|
1827
1827
|
}, {
|
|
1828
|
-
default:
|
|
1828
|
+
default: j(() => [c(O(V), {
|
|
1829
1829
|
"model-value": a.value ? O(i).getValue(a.value) ?? [] : [],
|
|
1830
1830
|
options: O(Ot)(O(o)),
|
|
1831
1831
|
placeholder: e.node.props.placeholder,
|
|
@@ -1874,11 +1874,11 @@ var kt = Z({
|
|
|
1874
1874
|
resolveAsset: { type: Function }
|
|
1875
1875
|
},
|
|
1876
1876
|
setup(e) {
|
|
1877
|
-
return (t, r) => (v(), n(O(
|
|
1877
|
+
return (t, r) => (v(), n(O(z), {
|
|
1878
1878
|
label: e.node.props.label,
|
|
1879
1879
|
required: e.node.validation?.required
|
|
1880
1880
|
}, {
|
|
1881
|
-
default:
|
|
1881
|
+
default: j(() => [c(O(V), {
|
|
1882
1882
|
"model-value": e.node.defaultValue ?? [],
|
|
1883
1883
|
options: O(Ot)(e.node.props.options),
|
|
1884
1884
|
placeholder: e.node.props.placeholder,
|
|
@@ -1899,7 +1899,7 @@ var kt = Z({
|
|
|
1899
1899
|
patch: { type: Function }
|
|
1900
1900
|
},
|
|
1901
1901
|
setup(n) {
|
|
1902
|
-
let r = n, { t: a } =
|
|
1902
|
+
let r = n, { t: a } = P(), o = t(() => r.node.props.options ?? []);
|
|
1903
1903
|
function s(e) {
|
|
1904
1904
|
let t = { props: { options: e.length > 0 ? e : void 0 } }, n = r.node.defaultValue;
|
|
1905
1905
|
if (n !== void 0) {
|
|
@@ -1909,15 +1909,15 @@ var kt = Z({
|
|
|
1909
1909
|
r.patch(t);
|
|
1910
1910
|
}
|
|
1911
1911
|
return (t, n) => (v(), i(e, null, [
|
|
1912
|
-
c(O(
|
|
1913
|
-
default:
|
|
1912
|
+
c(O(z), { label: O(a)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
1913
|
+
default: j(() => [c(O(J), {
|
|
1914
1914
|
"model-value": r.node.props.label ?? "",
|
|
1915
1915
|
"onUpdate:modelValue": n[0] ||= (e) => r.patch({ props: { label: e } })
|
|
1916
1916
|
}, null, 8, ["model-value"])]),
|
|
1917
1917
|
_: 1
|
|
1918
1918
|
}, 8, ["label"]),
|
|
1919
|
-
c(O(
|
|
1920
|
-
default:
|
|
1919
|
+
c(O(z), { label: O(a)("coar.pageBuilder.props.placeholder", void 0, "Placeholder") }, {
|
|
1920
|
+
default: j(() => [c(O(J), {
|
|
1921
1921
|
"model-value": r.node.props.placeholder ?? "",
|
|
1922
1922
|
"onUpdate:modelValue": n[1] ||= (e) => r.patch({ props: { placeholder: e } })
|
|
1923
1923
|
}, null, 8, ["model-value"])]),
|
|
@@ -1927,18 +1927,18 @@ var kt = Z({
|
|
|
1927
1927
|
options: o.value,
|
|
1928
1928
|
"onUpdate:options": s
|
|
1929
1929
|
}, null, 8, ["options"]),
|
|
1930
|
-
c(O(
|
|
1930
|
+
c(O(z), {
|
|
1931
1931
|
label: O(a)("coar.pageBuilder.props.optionsSource", void 0, "Options source ID"),
|
|
1932
1932
|
hint: O(a)("coar.pageBuilder.props.optionsSourceHint", void 0, "Resolved via config.optionsSource at render time — overrides the static options")
|
|
1933
1933
|
}, {
|
|
1934
|
-
default:
|
|
1934
|
+
default: j(() => [c(O(J), {
|
|
1935
1935
|
"model-value": r.node.props.optionsSourceId ?? "",
|
|
1936
1936
|
placeholder: "e.g. countries",
|
|
1937
1937
|
"onUpdate:modelValue": n[2] ||= (e) => r.patch({ props: { optionsSourceId: e || void 0 } })
|
|
1938
1938
|
}, null, 8, ["model-value"])]),
|
|
1939
1939
|
_: 1
|
|
1940
1940
|
}, 8, ["label", "hint"]),
|
|
1941
|
-
c(O(
|
|
1941
|
+
c(O(L), {
|
|
1942
1942
|
"model-value": !!r.node.props.disabled,
|
|
1943
1943
|
label: O(a)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
1944
1944
|
"onUpdate:modelValue": n[3] ||= (e) => r.patch({ props: { disabled: e } })
|
|
@@ -1958,8 +1958,8 @@ var kt = Z({
|
|
|
1958
1958
|
},
|
|
1959
1959
|
emits: ["update:modelValue"],
|
|
1960
1960
|
setup(e, { emit: r }) {
|
|
1961
|
-
let i = e, a = r, { t: o } =
|
|
1962
|
-
return (e, t) => (v(), n(O(
|
|
1961
|
+
let i = e, a = r, { t: o } = P(), s = t(() => Ot(i.props.options));
|
|
1962
|
+
return (e, t) => (v(), n(O(V), {
|
|
1963
1963
|
"model-value": i.modelValue ?? [],
|
|
1964
1964
|
options: s.value,
|
|
1965
1965
|
placeholder: O(o)("coar.pageBuilder.props.none", void 0, "— none"),
|
|
@@ -1979,13 +1979,13 @@ var kt = Z({
|
|
|
1979
1979
|
props: { node: {} },
|
|
1980
1980
|
setup(e) {
|
|
1981
1981
|
let r = e, i = $(), a = t(() => r.node.name);
|
|
1982
|
-
return (t, r) => (v(), n(O(
|
|
1982
|
+
return (t, r) => (v(), n(O(z), {
|
|
1983
1983
|
label: e.node.props.label,
|
|
1984
1984
|
required: e.node.validation?.required,
|
|
1985
1985
|
error: a.value ? O(i).getError(a.value) : "",
|
|
1986
1986
|
disabled: e.node.props.disabled
|
|
1987
1987
|
}, {
|
|
1988
|
-
default:
|
|
1988
|
+
default: j(() => [c(O(W), {
|
|
1989
1989
|
"model-value": a.value ? O(i).getValue(a.value) ?? "" : "",
|
|
1990
1990
|
length: e.node.props.length,
|
|
1991
1991
|
type: e.node.props.otpType,
|
|
@@ -2029,11 +2029,11 @@ var kt = Z({
|
|
|
2029
2029
|
resolveAsset: { type: Function }
|
|
2030
2030
|
},
|
|
2031
2031
|
setup(e) {
|
|
2032
|
-
return (t, r) => (v(), n(O(
|
|
2032
|
+
return (t, r) => (v(), n(O(z), {
|
|
2033
2033
|
label: e.node.props.label,
|
|
2034
2034
|
required: e.node.validation?.required
|
|
2035
2035
|
}, {
|
|
2036
|
-
default:
|
|
2036
|
+
default: j(() => [c(O(W), {
|
|
2037
2037
|
"model-value": "",
|
|
2038
2038
|
length: e.node.props.length,
|
|
2039
2039
|
mask: e.node.props.mask,
|
|
@@ -2050,7 +2050,7 @@ var kt = Z({
|
|
|
2050
2050
|
patch: { type: Function }
|
|
2051
2051
|
},
|
|
2052
2052
|
setup(t) {
|
|
2053
|
-
let n = t, { t: r } =
|
|
2053
|
+
let n = t, { t: r } = P(), a = [
|
|
2054
2054
|
{
|
|
2055
2055
|
value: "numeric",
|
|
2056
2056
|
label: "numeric"
|
|
@@ -2065,15 +2065,15 @@ var kt = Z({
|
|
|
2065
2065
|
}
|
|
2066
2066
|
];
|
|
2067
2067
|
return (t, o) => (v(), i(e, null, [
|
|
2068
|
-
c(O(
|
|
2069
|
-
default:
|
|
2068
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
2069
|
+
default: j(() => [c(O(J), {
|
|
2070
2070
|
"model-value": n.node.props.label ?? "",
|
|
2071
2071
|
"onUpdate:modelValue": o[0] ||= (e) => n.patch({ props: { label: e } })
|
|
2072
2072
|
}, null, 8, ["model-value"])]),
|
|
2073
2073
|
_: 1
|
|
2074
2074
|
}, 8, ["label"]),
|
|
2075
|
-
c(O(
|
|
2076
|
-
default:
|
|
2075
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.length", void 0, "Length") }, {
|
|
2076
|
+
default: j(() => [c(O(U), {
|
|
2077
2077
|
clearable: "",
|
|
2078
2078
|
min: 3,
|
|
2079
2079
|
max: 12,
|
|
@@ -2083,20 +2083,20 @@ var kt = Z({
|
|
|
2083
2083
|
}, null, 8, ["model-value"])]),
|
|
2084
2084
|
_: 1
|
|
2085
2085
|
}, 8, ["label"]),
|
|
2086
|
-
c(O(
|
|
2087
|
-
default:
|
|
2086
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.otpType", void 0, "Character set") }, {
|
|
2087
|
+
default: j(() => [c(O(q), {
|
|
2088
2088
|
"model-value": n.node.props.otpType ?? "numeric",
|
|
2089
2089
|
options: a,
|
|
2090
2090
|
"onUpdate:modelValue": o[2] ||= (e) => n.patch({ props: { otpType: e } })
|
|
2091
2091
|
}, null, 8, ["model-value"])]),
|
|
2092
2092
|
_: 1
|
|
2093
2093
|
}, 8, ["label"]),
|
|
2094
|
-
c(O(
|
|
2094
|
+
c(O(L), {
|
|
2095
2095
|
"model-value": !!n.node.props.mask,
|
|
2096
2096
|
label: O(r)("coar.pageBuilder.props.mask", void 0, "Mask input"),
|
|
2097
2097
|
"onUpdate:modelValue": o[3] ||= (e) => n.patch({ props: { mask: e || void 0 } })
|
|
2098
2098
|
}, null, 8, ["model-value", "label"]),
|
|
2099
|
-
c(O(
|
|
2099
|
+
c(O(L), {
|
|
2100
2100
|
"model-value": !!n.node.props.disabled,
|
|
2101
2101
|
label: O(r)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
2102
2102
|
"onUpdate:modelValue": o[4] ||= (e) => n.patch({ props: { disabled: e } })
|
|
@@ -2118,13 +2118,13 @@ var kt = Z({
|
|
|
2118
2118
|
function o(e) {
|
|
2119
2119
|
a.value && (i.setValue(a.value, e), i.markTouched(a.value));
|
|
2120
2120
|
}
|
|
2121
|
-
return (t, r) => (v(), n(O(
|
|
2121
|
+
return (t, r) => (v(), n(O(z), {
|
|
2122
2122
|
label: e.node.props.label,
|
|
2123
2123
|
required: e.node.validation?.required,
|
|
2124
2124
|
error: a.value ? O(i).getError(a.value) : "",
|
|
2125
2125
|
disabled: e.node.props.disabled
|
|
2126
2126
|
}, {
|
|
2127
|
-
default:
|
|
2127
|
+
default: j(() => [c(O(re), {
|
|
2128
2128
|
"model-value": a.value ? O(Ze)(O(i).getValue(a.value)) : null,
|
|
2129
2129
|
placeholder: e.node.props.placeholder,
|
|
2130
2130
|
disabled: e.node.props.disabled,
|
|
@@ -2163,11 +2163,11 @@ var kt = Z({
|
|
|
2163
2163
|
resolveAsset: { type: Function }
|
|
2164
2164
|
},
|
|
2165
2165
|
setup(e) {
|
|
2166
|
-
return (t, r) => (v(), n(O(
|
|
2166
|
+
return (t, r) => (v(), n(O(z), {
|
|
2167
2167
|
label: e.node.props.label,
|
|
2168
2168
|
required: e.node.validation?.required
|
|
2169
2169
|
}, {
|
|
2170
|
-
default:
|
|
2170
|
+
default: j(() => [c(O(re), {
|
|
2171
2171
|
"model-value": O(Ze)(e.node.defaultValue),
|
|
2172
2172
|
placeholder: e.node.props.placeholder,
|
|
2173
2173
|
disabled: ""
|
|
@@ -2183,23 +2183,23 @@ var kt = Z({
|
|
|
2183
2183
|
patch: { type: Function }
|
|
2184
2184
|
},
|
|
2185
2185
|
setup(t) {
|
|
2186
|
-
let n = t, { t: r } =
|
|
2186
|
+
let n = t, { t: r } = P();
|
|
2187
2187
|
return (t, a) => (v(), i(e, null, [
|
|
2188
|
-
c(O(
|
|
2189
|
-
default:
|
|
2188
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
2189
|
+
default: j(() => [c(O(J), {
|
|
2190
2190
|
"model-value": n.node.props.label ?? "",
|
|
2191
2191
|
"onUpdate:modelValue": a[0] ||= (e) => n.patch({ props: { label: e } })
|
|
2192
2192
|
}, null, 8, ["model-value"])]),
|
|
2193
2193
|
_: 1
|
|
2194
2194
|
}, 8, ["label"]),
|
|
2195
|
-
c(O(
|
|
2196
|
-
default:
|
|
2195
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.placeholder", void 0, "Placeholder") }, {
|
|
2196
|
+
default: j(() => [c(O(J), {
|
|
2197
2197
|
"model-value": n.node.props.placeholder ?? "",
|
|
2198
2198
|
"onUpdate:modelValue": a[1] ||= (e) => n.patch({ props: { placeholder: e } })
|
|
2199
2199
|
}, null, 8, ["model-value"])]),
|
|
2200
2200
|
_: 1
|
|
2201
2201
|
}, 8, ["label"]),
|
|
2202
|
-
c(O(
|
|
2202
|
+
c(O(L), {
|
|
2203
2203
|
"model-value": !!n.node.props.disabled,
|
|
2204
2204
|
label: O(r)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
2205
2205
|
"onUpdate:modelValue": a[2] ||= (e) => n.patch({ props: { disabled: e } })
|
|
@@ -2220,7 +2220,7 @@ var kt = Z({
|
|
|
2220
2220
|
emits: ["update:modelValue"],
|
|
2221
2221
|
setup(e, { emit: t }) {
|
|
2222
2222
|
let r = e, i = t;
|
|
2223
|
-
return (e, t) => (v(), n(O(
|
|
2223
|
+
return (e, t) => (v(), n(O(re), {
|
|
2224
2224
|
clearable: "",
|
|
2225
2225
|
"model-value": O(Ze)(r.modelValue),
|
|
2226
2226
|
"onUpdate:modelValue": t[0] ||= (e) => i("update:modelValue", e ? e.toString() : void 0)
|
|
@@ -2237,13 +2237,13 @@ var kt = Z({
|
|
|
2237
2237
|
function o(e) {
|
|
2238
2238
|
a.value && (i.setValue(a.value, e), i.markTouched(a.value));
|
|
2239
2239
|
}
|
|
2240
|
-
return (t, r) => (v(), n(O(
|
|
2240
|
+
return (t, r) => (v(), n(O(z), {
|
|
2241
2241
|
label: e.node.props.label,
|
|
2242
2242
|
required: e.node.validation?.required,
|
|
2243
2243
|
error: a.value ? O(i).getError(a.value) : "",
|
|
2244
2244
|
disabled: e.node.props.disabled
|
|
2245
2245
|
}, {
|
|
2246
|
-
default:
|
|
2246
|
+
default: j(() => [c(O(G), {
|
|
2247
2247
|
"model-value": a.value ? O(Qe)(O(i).getValue(a.value)) : null,
|
|
2248
2248
|
placeholder: e.node.props.placeholder,
|
|
2249
2249
|
disabled: e.node.props.disabled,
|
|
@@ -2282,11 +2282,11 @@ var kt = Z({
|
|
|
2282
2282
|
resolveAsset: { type: Function }
|
|
2283
2283
|
},
|
|
2284
2284
|
setup(e) {
|
|
2285
|
-
return (t, r) => (v(), n(O(
|
|
2285
|
+
return (t, r) => (v(), n(O(z), {
|
|
2286
2286
|
label: e.node.props.label,
|
|
2287
2287
|
required: e.node.validation?.required
|
|
2288
2288
|
}, {
|
|
2289
|
-
default:
|
|
2289
|
+
default: j(() => [c(O(G), {
|
|
2290
2290
|
"model-value": O(Qe)(e.node.defaultValue),
|
|
2291
2291
|
placeholder: e.node.props.placeholder,
|
|
2292
2292
|
disabled: ""
|
|
@@ -2302,23 +2302,23 @@ var kt = Z({
|
|
|
2302
2302
|
patch: { type: Function }
|
|
2303
2303
|
},
|
|
2304
2304
|
setup(t) {
|
|
2305
|
-
let n = t, { t: r } =
|
|
2305
|
+
let n = t, { t: r } = P();
|
|
2306
2306
|
return (t, a) => (v(), i(e, null, [
|
|
2307
|
-
c(O(
|
|
2308
|
-
default:
|
|
2307
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
2308
|
+
default: j(() => [c(O(J), {
|
|
2309
2309
|
"model-value": n.node.props.label ?? "",
|
|
2310
2310
|
"onUpdate:modelValue": a[0] ||= (e) => n.patch({ props: { label: e } })
|
|
2311
2311
|
}, null, 8, ["model-value"])]),
|
|
2312
2312
|
_: 1
|
|
2313
2313
|
}, 8, ["label"]),
|
|
2314
|
-
c(O(
|
|
2315
|
-
default:
|
|
2314
|
+
c(O(z), { label: O(r)("coar.pageBuilder.props.placeholder", void 0, "Placeholder") }, {
|
|
2315
|
+
default: j(() => [c(O(J), {
|
|
2316
2316
|
"model-value": n.node.props.placeholder ?? "",
|
|
2317
2317
|
"onUpdate:modelValue": a[1] ||= (e) => n.patch({ props: { placeholder: e } })
|
|
2318
2318
|
}, null, 8, ["model-value"])]),
|
|
2319
2319
|
_: 1
|
|
2320
2320
|
}, 8, ["label"]),
|
|
2321
|
-
c(O(
|
|
2321
|
+
c(O(L), {
|
|
2322
2322
|
"model-value": !!n.node.props.disabled,
|
|
2323
2323
|
label: O(r)("coar.pageBuilder.props.disabled", void 0, "Disabled"),
|
|
2324
2324
|
"onUpdate:modelValue": a[2] ||= (e) => n.patch({ props: { disabled: e } })
|
|
@@ -2339,7 +2339,7 @@ var kt = Z({
|
|
|
2339
2339
|
emits: ["update:modelValue"],
|
|
2340
2340
|
setup(e, { emit: t }) {
|
|
2341
2341
|
let r = e, i = t;
|
|
2342
|
-
return (e, t) => (v(), n(O(
|
|
2342
|
+
return (e, t) => (v(), n(O(G), {
|
|
2343
2343
|
clearable: "",
|
|
2344
2344
|
"model-value": O(Qe)(r.modelValue),
|
|
2345
2345
|
"onUpdate:modelValue": t[0] ||= (e) => i("update:modelValue", e ? e.toString() : void 0)
|
|
@@ -2355,7 +2355,7 @@ var kt = Z({
|
|
|
2355
2355
|
function c(e, t) {
|
|
2356
2356
|
e && i.triggerAction(e, t);
|
|
2357
2357
|
}
|
|
2358
|
-
return (t, i) => (v(), n(O(
|
|
2358
|
+
return (t, i) => (v(), n(O(F), {
|
|
2359
2359
|
class: "pb-button",
|
|
2360
2360
|
variant: e.node.props.variant ?? "primary",
|
|
2361
2361
|
size: e.node.props.size,
|
|
@@ -2364,7 +2364,7 @@ var kt = Z({
|
|
|
2364
2364
|
disabled: o.value && !a.value,
|
|
2365
2365
|
onClick: i[0] ||= (e) => c(r.node.props.action, r.node.props.validates)
|
|
2366
2366
|
}, {
|
|
2367
|
-
default:
|
|
2367
|
+
default: j(() => [s(E(e.node.props.label), 1)]),
|
|
2368
2368
|
_: 1
|
|
2369
2369
|
}, 8, [
|
|
2370
2370
|
"variant",
|
|
@@ -2390,13 +2390,13 @@ var Lt = /* @__PURE__ */ l({
|
|
|
2390
2390
|
},
|
|
2391
2391
|
setup(e) {
|
|
2392
2392
|
let r = e, i = t(() => It(r.node.style));
|
|
2393
|
-
return (e, t) => (v(), n(O(
|
|
2393
|
+
return (e, t) => (v(), n(O(F), {
|
|
2394
2394
|
variant: r.node.props?.variant ?? "primary",
|
|
2395
2395
|
size: r.node.props?.size,
|
|
2396
2396
|
style: h(i.value),
|
|
2397
2397
|
disabled: ""
|
|
2398
2398
|
}, {
|
|
2399
|
-
default:
|
|
2399
|
+
default: j(() => [s(E(r.node.props?.label || "Button"), 1)]),
|
|
2400
2400
|
_: 1
|
|
2401
2401
|
}, 8, [
|
|
2402
2402
|
"variant",
|
|
@@ -2421,7 +2421,7 @@ var Lt = /* @__PURE__ */ l({
|
|
|
2421
2421
|
patch: { type: Function }
|
|
2422
2422
|
},
|
|
2423
2423
|
setup(r) {
|
|
2424
|
-
let a = r, { t: o } =
|
|
2424
|
+
let a = r, { t: o } = P(), s = u(zt), l = t(() => {
|
|
2425
2425
|
let e = s?.value?.availableActions;
|
|
2426
2426
|
if (!e || e.length === 0) return null;
|
|
2427
2427
|
let t = /* @__PURE__ */ new Set(), n = [{
|
|
@@ -2477,18 +2477,18 @@ var Lt = /* @__PURE__ */ l({
|
|
|
2477
2477
|
}
|
|
2478
2478
|
]);
|
|
2479
2479
|
return (t, r) => (v(), i(e, null, [
|
|
2480
|
-
c(O(
|
|
2481
|
-
default:
|
|
2480
|
+
c(O(z), { label: O(o)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
2481
|
+
default: j(() => [c(O(J), {
|
|
2482
2482
|
"model-value": a.node.props.label ?? "",
|
|
2483
2483
|
"onUpdate:modelValue": r[0] ||= (e) => a.patch({ props: { label: e } })
|
|
2484
2484
|
}, null, 8, ["model-value"])]),
|
|
2485
2485
|
_: 1
|
|
2486
2486
|
}, 8, ["label"]),
|
|
2487
|
-
c(O(
|
|
2487
|
+
c(O(z), {
|
|
2488
2488
|
label: O(o)("coar.pageBuilder.props.action", void 0, "Action"),
|
|
2489
2489
|
hint: O(o)("coar.pageBuilder.props.actionHint", void 0, "Matched against the actions map at render time")
|
|
2490
2490
|
}, {
|
|
2491
|
-
default:
|
|
2491
|
+
default: j(() => [l.value ? (v(), n(O(q), {
|
|
2492
2492
|
key: 0,
|
|
2493
2493
|
"model-value": a.node.props.action ?? "",
|
|
2494
2494
|
options: l.value,
|
|
@@ -2501,36 +2501,36 @@ var Lt = /* @__PURE__ */ l({
|
|
|
2501
2501
|
}, null, 8, ["model-value"]))]),
|
|
2502
2502
|
_: 1
|
|
2503
2503
|
}, 8, ["label", "hint"]),
|
|
2504
|
-
c(O(
|
|
2505
|
-
default:
|
|
2504
|
+
c(O(z), { label: O(o)("coar.pageBuilder.props.variant", void 0, "Variant") }, {
|
|
2505
|
+
default: j(() => [c(O(q), {
|
|
2506
2506
|
"model-value": a.node.props.variant ?? "primary",
|
|
2507
2507
|
options: d,
|
|
2508
2508
|
"onUpdate:modelValue": r[3] ||= (e) => a.patch({ props: { variant: e } })
|
|
2509
2509
|
}, null, 8, ["model-value"])]),
|
|
2510
2510
|
_: 1
|
|
2511
2511
|
}, 8, ["label"]),
|
|
2512
|
-
c(O(
|
|
2513
|
-
default:
|
|
2512
|
+
c(O(z), { label: O(o)("coar.pageBuilder.props.size", void 0, "Size") }, {
|
|
2513
|
+
default: j(() => [c(O(q), {
|
|
2514
2514
|
"model-value": a.node.props.size ?? "",
|
|
2515
2515
|
options: f.value,
|
|
2516
2516
|
"onUpdate:modelValue": r[4] ||= (e) => a.patch({ props: { size: e || void 0 } })
|
|
2517
2517
|
}, null, 8, ["model-value", "options"])]),
|
|
2518
2518
|
_: 1
|
|
2519
2519
|
}, 8, ["label"]),
|
|
2520
|
-
c(O(
|
|
2521
|
-
default:
|
|
2520
|
+
c(O(z), { label: O(o)("coar.pageBuilder.props.iconLeft", void 0, "Icon (left)") }, {
|
|
2521
|
+
default: j(() => [c(O(J), {
|
|
2522
2522
|
"model-value": a.node.props.icon ?? "",
|
|
2523
2523
|
placeholder: "e.g. log-in",
|
|
2524
2524
|
"onUpdate:modelValue": r[5] ||= (e) => a.patch({ props: { icon: e } })
|
|
2525
2525
|
}, null, 8, ["model-value"])]),
|
|
2526
2526
|
_: 1
|
|
2527
2527
|
}, 8, ["label"]),
|
|
2528
|
-
c(O(
|
|
2528
|
+
c(O(L), {
|
|
2529
2529
|
"model-value": !!a.node.props.validates,
|
|
2530
2530
|
label: O(o)("coar.pageBuilder.props.validatesForm", void 0, "Validates form before firing"),
|
|
2531
2531
|
"onUpdate:modelValue": r[6] ||= (e) => a.patch({ props: { validates: e } })
|
|
2532
2532
|
}, null, 8, ["model-value", "label"]),
|
|
2533
|
-
c(O(
|
|
2533
|
+
c(O(L), {
|
|
2534
2534
|
"model-value": !!a.node.props.default,
|
|
2535
2535
|
label: O(o)("coar.pageBuilder.props.defaultButton", void 0, "Default button (Enter submits here)"),
|
|
2536
2536
|
"onUpdate:modelValue": r[7] ||= (e) => a.patch({ props: { default: e || void 0 } })
|
|
@@ -2588,7 +2588,7 @@ var Lt = /* @__PURE__ */ l({
|
|
|
2588
2588
|
patch: { type: Function }
|
|
2589
2589
|
},
|
|
2590
2590
|
setup(r) {
|
|
2591
|
-
let a = r, { t: o } =
|
|
2591
|
+
let a = r, { t: o } = P(), s = u(zt), l = t(() => {
|
|
2592
2592
|
let e = s?.value?.availableActions;
|
|
2593
2593
|
if (!e || e.length === 0) return null;
|
|
2594
2594
|
let t = /* @__PURE__ */ new Set(), n = [{
|
|
@@ -2605,14 +2605,14 @@ var Lt = /* @__PURE__ */ l({
|
|
|
2605
2605
|
label: o("coar.pageBuilder.props.notConfigured", { id: r }, "{id} (not configured)")
|
|
2606
2606
|
}), n;
|
|
2607
2607
|
});
|
|
2608
|
-
return (t, r) => (v(), i(e, null, [c(O(
|
|
2609
|
-
default:
|
|
2608
|
+
return (t, r) => (v(), i(e, null, [c(O(z), { label: O(o)("coar.pageBuilder.props.label", void 0, "Label") }, {
|
|
2609
|
+
default: j(() => [c(O(J), {
|
|
2610
2610
|
"model-value": a.node.props.label ?? "",
|
|
2611
2611
|
"onUpdate:modelValue": r[0] ||= (e) => a.patch({ props: { label: e } })
|
|
2612
2612
|
}, null, 8, ["model-value"])]),
|
|
2613
2613
|
_: 1
|
|
2614
|
-
}, 8, ["label"]), c(O(
|
|
2615
|
-
default:
|
|
2614
|
+
}, 8, ["label"]), c(O(z), { label: O(o)("coar.pageBuilder.props.action", void 0, "Action") }, {
|
|
2615
|
+
default: j(() => [l.value ? (v(), n(O(q), {
|
|
2616
2616
|
key: 0,
|
|
2617
2617
|
"model-value": a.node.props.action ?? "",
|
|
2618
2618
|
options: l.value,
|
|
@@ -2663,7 +2663,7 @@ var Lt = /* @__PURE__ */ l({
|
|
|
2663
2663
|
alt: n.node.props?.alt ?? "",
|
|
2664
2664
|
class: "canvas-node__image-preview",
|
|
2665
2665
|
style: h(r.value)
|
|
2666
|
-
}, null, 12, Kt)) : (v(), i("div", qt, [c(O(
|
|
2666
|
+
}, null, 12, Kt)) : (v(), i("div", qt, [c(O(B), {
|
|
2667
2667
|
name: "image",
|
|
2668
2668
|
size: "m"
|
|
2669
2669
|
}), a("span", null, E(n.node.props?.assetId || "No image"), 1)]));
|
|
@@ -2710,7 +2710,7 @@ var Lt = /* @__PURE__ */ l({
|
|
|
2710
2710
|
patch: { type: Function }
|
|
2711
2711
|
},
|
|
2712
2712
|
setup(o) {
|
|
2713
|
-
let l = o, { t: d } =
|
|
2713
|
+
let l = o, { t: d } = P(), f = u(zt), p = t(() => !!f?.value?.pickAsset), m = t(() => {
|
|
2714
2714
|
let e = l.node.props.assetId;
|
|
2715
2715
|
return e ? f?.value?.assetResolver?.(e) ?? "" : "";
|
|
2716
2716
|
});
|
|
@@ -2723,46 +2723,46 @@ var Lt = /* @__PURE__ */ l({
|
|
|
2723
2723
|
function g() {
|
|
2724
2724
|
l.patch({ props: { assetId: "" } });
|
|
2725
2725
|
}
|
|
2726
|
-
return (t, o) => (v(), i(e, null, [p.value ? (v(), n(O(
|
|
2726
|
+
return (t, o) => (v(), i(e, null, [p.value ? (v(), n(O(z), {
|
|
2727
2727
|
key: 0,
|
|
2728
2728
|
label: O(d)("coar.pageBuilder.props.asset", void 0, "Asset")
|
|
2729
2729
|
}, {
|
|
2730
|
-
default:
|
|
2730
|
+
default: j(() => [a("div", Yt, [a("div", Xt, [m.value ? (v(), i("img", {
|
|
2731
2731
|
key: 0,
|
|
2732
2732
|
src: m.value,
|
|
2733
2733
|
alt: l.node.props.alt ?? ""
|
|
2734
|
-
}, null, 8, Zt)) : (v(), i("span", Qt, [c(O(
|
|
2734
|
+
}, null, 8, Zt)) : (v(), i("span", Qt, [c(O(B), {
|
|
2735
2735
|
name: "image",
|
|
2736
2736
|
size: "m"
|
|
2737
|
-
}), a("span", $t, E(l.node.props.assetId ? O(d)("coar.pageBuilder.props.noPreview", void 0, "No preview") : O(d)("coar.pageBuilder.props.noImage", void 0, "No image")), 1)]))]), a("div", en, [c(O(
|
|
2737
|
+
}), a("span", $t, E(l.node.props.assetId ? O(d)("coar.pageBuilder.props.noPreview", void 0, "No preview") : O(d)("coar.pageBuilder.props.noImage", void 0, "No image")), 1)]))]), a("div", en, [c(O(F), {
|
|
2738
2738
|
size: "s",
|
|
2739
2739
|
variant: "secondary",
|
|
2740
2740
|
onClick: h
|
|
2741
2741
|
}, {
|
|
2742
|
-
default:
|
|
2742
|
+
default: j(() => [s(E(l.node.props.assetId ? O(d)("coar.pageBuilder.props.change", void 0, "Change…") : O(d)("coar.pageBuilder.props.choose", void 0, "Choose…")), 1)]),
|
|
2743
2743
|
_: 1
|
|
2744
|
-
}), l.node.props.assetId ? (v(), n(O(
|
|
2744
|
+
}), l.node.props.assetId ? (v(), n(O(F), {
|
|
2745
2745
|
key: 0,
|
|
2746
2746
|
size: "s",
|
|
2747
2747
|
variant: "ghost",
|
|
2748
2748
|
onClick: g
|
|
2749
2749
|
}, {
|
|
2750
|
-
default:
|
|
2750
|
+
default: j(() => [s(E(O(d)("coar.pageBuilder.props.clear", void 0, "Clear")), 1)]),
|
|
2751
2751
|
_: 1
|
|
2752
2752
|
})) : r("", !0)])])]),
|
|
2753
2753
|
_: 1
|
|
2754
|
-
}, 8, ["label"])) : (v(), n(O(
|
|
2754
|
+
}, 8, ["label"])) : (v(), n(O(z), {
|
|
2755
2755
|
key: 1,
|
|
2756
2756
|
label: O(d)("coar.pageBuilder.props.assetId", void 0, "Asset ID"),
|
|
2757
2757
|
hint: O(d)("coar.pageBuilder.props.assetIdHint", void 0, "Resolved via assetResolver at render time")
|
|
2758
2758
|
}, {
|
|
2759
|
-
default:
|
|
2759
|
+
default: j(() => [c(O(J), {
|
|
2760
2760
|
"model-value": l.node.props.assetId ?? "",
|
|
2761
2761
|
"onUpdate:modelValue": o[0] ||= (e) => l.patch({ props: { assetId: e } })
|
|
2762
2762
|
}, null, 8, ["model-value"])]),
|
|
2763
2763
|
_: 1
|
|
2764
|
-
}, 8, ["label", "hint"])), c(O(
|
|
2765
|
-
default:
|
|
2764
|
+
}, 8, ["label", "hint"])), c(O(z), { label: O(d)("coar.pageBuilder.props.altText", void 0, "Alt text") }, {
|
|
2765
|
+
default: j(() => [c(O(J), {
|
|
2766
2766
|
"model-value": l.node.props.alt ?? "",
|
|
2767
2767
|
"onUpdate:modelValue": o[1] ||= (e) => l.patch({ props: { alt: e } })
|
|
2768
2768
|
}, null, 8, ["model-value"])]),
|
|
@@ -3137,7 +3137,7 @@ var yn = Symbol("pb-parent-direction"), bn = /* @__PURE__ */ new Set(), xn = /*
|
|
|
3137
3137
|
"data-pb-enter-submit": _.value ? "true" : void 0
|
|
3138
3138
|
}, o({ _: 2 }, [f.value.container ? {
|
|
3139
3139
|
name: "default",
|
|
3140
|
-
fn:
|
|
3140
|
+
fn: j(() => [(v(!0), i(e, null, x(g.value, (e) => (v(), n(c, {
|
|
3141
3141
|
key: e.id,
|
|
3142
3142
|
node: e
|
|
3143
3143
|
}, null, 8, ["node"]))), 128))]),
|
|
@@ -3165,103 +3165,103 @@ var yn = Symbol("pb-parent-direction"), bn = /* @__PURE__ */ new Set(), xn = /*
|
|
|
3165
3165
|
},
|
|
3166
3166
|
emits: ["update:values"],
|
|
3167
3167
|
setup(e, { expose: n, emit: a }) {
|
|
3168
|
-
let o = e, l = a, { t: u } =
|
|
3168
|
+
let o = e, l = a, { t: u } = P(), d = b({}), f = b({}), m = b({}), h = b(!1), g = b(!1), _ = b(null), x = b(""), C = t(() => sn(cn(on(mn(o.schema))))), w = nn(t(() => o.config));
|
|
3169
3169
|
function T(e) {
|
|
3170
3170
|
return e.type === "page" ? void 0 : w.value[e.type];
|
|
3171
3171
|
}
|
|
3172
|
-
function
|
|
3172
|
+
function k(e) {
|
|
3173
3173
|
let t = T(e), n = e.name;
|
|
3174
3174
|
return !!t?.value && typeof n == "string" && !!n && !Xe(n);
|
|
3175
3175
|
}
|
|
3176
|
-
function
|
|
3176
|
+
function A(e) {
|
|
3177
3177
|
return ue(e.type, o.config);
|
|
3178
3178
|
}
|
|
3179
|
-
function
|
|
3179
|
+
function te(e) {
|
|
3180
3180
|
if (e.type === "page") return !0;
|
|
3181
3181
|
let t = e.visibleWhen;
|
|
3182
3182
|
if (!t || typeof t != "object" || typeof t.field != "string" || t.field === "") return !0;
|
|
3183
3183
|
let n = d.value[t.field];
|
|
3184
|
-
return "equals" in t ?
|
|
3184
|
+
return "equals" in t ? B(n, t.equals) : Array.isArray(t.in) ? t.in.some((e) => B(n, e)) : !0;
|
|
3185
3185
|
}
|
|
3186
|
-
function
|
|
3186
|
+
function N() {
|
|
3187
3187
|
let e = {}, t = (n) => {
|
|
3188
|
-
!
|
|
3188
|
+
!A(n) || !te(n) || (k(n) && n.name in d.value && (e[n.name] = d.value[n.name]), "children" in n && Array.isArray(n.children) && n.children.forEach(t));
|
|
3189
3189
|
};
|
|
3190
3190
|
return t(C.value), e;
|
|
3191
3191
|
}
|
|
3192
|
-
function
|
|
3192
|
+
function F() {
|
|
3193
3193
|
let e = /* @__PURE__ */ new Set(), t = (n) => {
|
|
3194
|
-
!
|
|
3194
|
+
!A(n) || !te(n) || (k(n) && e.add(n.name), "children" in n && Array.isArray(n.children) && n.children.forEach(t));
|
|
3195
3195
|
};
|
|
3196
3196
|
return t(C.value), e;
|
|
3197
3197
|
}
|
|
3198
|
-
function
|
|
3198
|
+
function I(e) {
|
|
3199
3199
|
let t = {};
|
|
3200
|
-
if (!
|
|
3201
|
-
if (
|
|
3200
|
+
if (!A(e)) return t;
|
|
3201
|
+
if (k(e)) {
|
|
3202
3202
|
let n = T(e)?.value?.defaultValue?.(e.props), r = e.defaultValue === void 0 ? n : e.defaultValue;
|
|
3203
3203
|
r !== void 0 && (t[e.name] = r);
|
|
3204
3204
|
}
|
|
3205
|
-
if ("children" in e && Array.isArray(e.children)) for (let n of e.children) Object.assign(t,
|
|
3205
|
+
if ("children" in e && Array.isArray(e.children)) for (let n of e.children) Object.assign(t, I(n));
|
|
3206
3206
|
return t;
|
|
3207
3207
|
}
|
|
3208
|
-
function
|
|
3209
|
-
if (
|
|
3208
|
+
function L(e, t) {
|
|
3209
|
+
if (A(e) && (k(e) && e.name && t.add(e.name), "children" in e && Array.isArray(e.children))) for (let n of e.children) L(n, t);
|
|
3210
3210
|
}
|
|
3211
|
-
let
|
|
3212
|
-
function
|
|
3213
|
-
let e =
|
|
3211
|
+
let R = {};
|
|
3212
|
+
function z() {
|
|
3213
|
+
let e = I(C.value);
|
|
3214
3214
|
if (o.initialValues) {
|
|
3215
3215
|
let t = /* @__PURE__ */ new Set();
|
|
3216
|
-
|
|
3216
|
+
L(C.value, t);
|
|
3217
3217
|
for (let [n, r] of Object.entries(o.initialValues)) t.has(n) && (e[n] = r);
|
|
3218
3218
|
}
|
|
3219
|
-
d.value = e,
|
|
3219
|
+
d.value = e, R = { ...e }, f.value = {}, m.value = {}, x.value = "", l("update:values", N());
|
|
3220
3220
|
}
|
|
3221
|
-
function
|
|
3221
|
+
function B(e, t, n = 0) {
|
|
3222
3222
|
let r = D(e), i = D(t);
|
|
3223
3223
|
if (Object.is(r, i)) return !0;
|
|
3224
3224
|
if (n > 32) return !1;
|
|
3225
|
-
if (Array.isArray(r) && Array.isArray(i)) return r.length === i.length && r.every((e, t) =>
|
|
3225
|
+
if (Array.isArray(r) && Array.isArray(i)) return r.length === i.length && r.every((e, t) => B(e, i[t], n + 1));
|
|
3226
3226
|
if (r !== null && i !== null && typeof r == "object" && typeof i == "object" && !Array.isArray(r) && !Array.isArray(i)) {
|
|
3227
3227
|
let e = Object.keys(r), t = Object.keys(i);
|
|
3228
|
-
return e.length === t.length && e.every((e) =>
|
|
3228
|
+
return e.length === t.length && e.every((e) => B(r[e], i[e], n + 1));
|
|
3229
3229
|
}
|
|
3230
3230
|
return !1;
|
|
3231
3231
|
}
|
|
3232
|
-
function
|
|
3232
|
+
function V(e, t) {
|
|
3233
3233
|
if (e === t) return !0;
|
|
3234
3234
|
if (!e || !t) return !1;
|
|
3235
3235
|
let n = Object.keys(e);
|
|
3236
|
-
return n.length === Object.keys(t).length ? n.every((n) =>
|
|
3236
|
+
return n.length === Object.keys(t).length ? n.every((n) => B(e[n], t[n])) : !1;
|
|
3237
3237
|
}
|
|
3238
|
-
|
|
3238
|
+
z(), ee(() => o.schema, z, { deep: !1 }), ee(() => o.initialValues, (e, t) => {
|
|
3239
3239
|
let n = /* @__PURE__ */ new Set();
|
|
3240
|
-
|
|
3240
|
+
L(C.value, n);
|
|
3241
3241
|
let r = (e) => {
|
|
3242
3242
|
let t = {};
|
|
3243
3243
|
for (let r of Object.keys(e ?? {})) n.has(r) && (t[r] = e[r]);
|
|
3244
3244
|
return t;
|
|
3245
3245
|
};
|
|
3246
|
-
|
|
3246
|
+
V(r(e), r(t)) || z();
|
|
3247
3247
|
});
|
|
3248
|
-
let
|
|
3249
|
-
function
|
|
3250
|
-
let t =
|
|
3251
|
-
return t === void 0 && (t = Ke(e), t === null && console.warn(`[CoarPageRenderer] validation.pattern ${JSON.stringify(e)} is not a valid regular expression — rule ignored.`),
|
|
3248
|
+
let U = /* @__PURE__ */ new Map();
|
|
3249
|
+
function W(e) {
|
|
3250
|
+
let t = U.get(e);
|
|
3251
|
+
return t === void 0 && (t = Ke(e), t === null && console.warn(`[CoarPageRenderer] validation.pattern ${JSON.stringify(e)} is not a valid regular expression — rule ignored.`), U.set(e, t)), t;
|
|
3252
3252
|
}
|
|
3253
|
-
function
|
|
3253
|
+
function ne(e) {
|
|
3254
3254
|
return e == null || e === "" || e === !1 || Array.isArray(e) && e.length === 0;
|
|
3255
3255
|
}
|
|
3256
|
-
let
|
|
3257
|
-
function
|
|
3256
|
+
let re = /* @__PURE__ */ new Set();
|
|
3257
|
+
function G(e, t) {
|
|
3258
3258
|
let n = d.value[e.name], r = e.validation;
|
|
3259
|
-
if (r?.required && (t.value?.isEmpty ? t.value.isEmpty(n, e.props) :
|
|
3259
|
+
if (r?.required && (t.value?.isEmpty ? t.value.isEmpty(n, e.props) : ne(n))) return r.message ?? u("coar.pageBuilder.validation.required", void 0, "This field is required");
|
|
3260
3260
|
if (r && t.value?.textRules && typeof n == "string") {
|
|
3261
3261
|
if (r.minLength && n.length < r.minLength) return r.message ?? u("coar.pageBuilder.validation.minLength", { n: r.minLength }, "Minimum {n} characters");
|
|
3262
3262
|
if (r.maxLength && n.length > r.maxLength) return r.message ?? u("coar.pageBuilder.validation.maxLength", { n: r.maxLength }, "Maximum {n} characters");
|
|
3263
3263
|
if (r.pattern) {
|
|
3264
|
-
let e =
|
|
3264
|
+
let e = W(r.pattern);
|
|
3265
3265
|
if (e && !e.test(n)) return r.message ?? u("coar.pageBuilder.validation.pattern", void 0, "Invalid format");
|
|
3266
3266
|
}
|
|
3267
3267
|
}
|
|
@@ -3271,25 +3271,25 @@ var yn = Symbol("pb-parent-direction"), bn = /* @__PURE__ */ new Set(), xn = /*
|
|
|
3271
3271
|
let r = t.value.validate(n, e, d.value);
|
|
3272
3272
|
if (r) return r;
|
|
3273
3273
|
} catch (t) {
|
|
3274
|
-
|
|
3274
|
+
re.has(e.type) || (re.add(e.type), console.warn(`[CoarPageRenderer] validate hook of element "${e.type}" threw — rule ignored.`, t));
|
|
3275
3275
|
}
|
|
3276
3276
|
return "";
|
|
3277
3277
|
}
|
|
3278
|
-
function
|
|
3279
|
-
if (!(!
|
|
3280
|
-
if (
|
|
3281
|
-
let n = T(e), r = n ?
|
|
3278
|
+
function K(e, t) {
|
|
3279
|
+
if (!(!A(e) || !te(e))) {
|
|
3280
|
+
if (k(e)) {
|
|
3281
|
+
let n = T(e), r = n ? G(e, n) : "";
|
|
3282
3282
|
r && (t[e.name] = r);
|
|
3283
3283
|
}
|
|
3284
|
-
"children" in e && Array.isArray(e.children) && e.children.forEach((e) =>
|
|
3284
|
+
"children" in e && Array.isArray(e.children) && e.children.forEach((e) => K(e, t));
|
|
3285
3285
|
}
|
|
3286
3286
|
}
|
|
3287
|
-
let
|
|
3287
|
+
let ie = t(() => {
|
|
3288
3288
|
let e = {};
|
|
3289
|
-
return
|
|
3290
|
-
}), q = t(() => Object.keys(
|
|
3289
|
+
return K(C.value, e), e;
|
|
3290
|
+
}), q = t(() => Object.keys(ie.value).length === 0), ae = t(() => !V(d.value, R));
|
|
3291
3291
|
function oe(e) {
|
|
3292
|
-
!
|
|
3292
|
+
!A(e) || !te(e) || (k(e) && e.name && (f.value[e.name] = !0), "children" in e && Array.isArray(e.children) && e.children.forEach(oe));
|
|
3293
3293
|
}
|
|
3294
3294
|
let se = /* @__PURE__ */ new Set(), J = /* @__PURE__ */ new Set();
|
|
3295
3295
|
function ce() {
|
|
@@ -3307,7 +3307,7 @@ var yn = Symbol("pb-parent-direction"), bn = /* @__PURE__ */ new Set(), xn = /*
|
|
|
3307
3307
|
if (n) {
|
|
3308
3308
|
g.value = !0;
|
|
3309
3309
|
try {
|
|
3310
|
-
await n(t ??
|
|
3310
|
+
await n(t ?? N());
|
|
3311
3311
|
} catch (t) {
|
|
3312
3312
|
x.value = t instanceof Error && t.message || X(), console.error(`[CoarPageRenderer] action "${e}" failed.`, t);
|
|
3313
3313
|
} finally {
|
|
@@ -3320,14 +3320,14 @@ var yn = Symbol("pb-parent-direction"), bn = /* @__PURE__ */ new Set(), xn = /*
|
|
|
3320
3320
|
Y();
|
|
3321
3321
|
return;
|
|
3322
3322
|
}
|
|
3323
|
-
let t =
|
|
3323
|
+
let t = N();
|
|
3324
3324
|
if (o.onValidate) {
|
|
3325
3325
|
h.value = !0;
|
|
3326
3326
|
try {
|
|
3327
3327
|
let e = await o.onValidate(t), n = {}, r = [];
|
|
3328
3328
|
for (let [t, i] of Object.entries(e ?? {})) i && (Xe(t) ? r.push(i) : n[t] = i);
|
|
3329
3329
|
x.value = n._form ?? "", delete n[st];
|
|
3330
|
-
let i =
|
|
3330
|
+
let i = F(), a = Object.keys(n).filter((e) => !i.has(e));
|
|
3331
3331
|
x.value = [
|
|
3332
3332
|
x.value,
|
|
3333
3333
|
...a.map((e) => n[e]),
|
|
@@ -3363,7 +3363,7 @@ var yn = Symbol("pb-parent-direction"), bn = /* @__PURE__ */ new Set(), xn = /*
|
|
|
3363
3363
|
let e = C.value;
|
|
3364
3364
|
if (e.type !== "page" || !e.enterSubmits) return null;
|
|
3365
3365
|
let t = null, n = null, r = (e) => {
|
|
3366
|
-
if (!(t || !
|
|
3366
|
+
if (!(t || !A(e) || !te(e))) {
|
|
3367
3367
|
if (e.type === "button") {
|
|
3368
3368
|
let r = e.props ?? {};
|
|
3369
3369
|
if (typeof r.action == "string" && r.action) {
|
|
@@ -3408,7 +3408,7 @@ var yn = Symbol("pb-parent-direction"), bn = /* @__PURE__ */ new Set(), xn = /*
|
|
|
3408
3408
|
reportUnknown(e) {
|
|
3409
3409
|
J.has(e) || (J.add(e), console.warn(`[CoarPageRenderer] No element registration for type "${e}" — instances were skipped at render time (register it via config.elements).`));
|
|
3410
3410
|
},
|
|
3411
|
-
isVisible:
|
|
3411
|
+
isVisible: te,
|
|
3412
3412
|
isFormValid: q,
|
|
3413
3413
|
isValidating: h,
|
|
3414
3414
|
isSubmitting: g,
|
|
@@ -3421,10 +3421,10 @@ var yn = Symbol("pb-parent-direction"), bn = /* @__PURE__ */ new Set(), xn = /*
|
|
|
3421
3421
|
let t = { ...m.value };
|
|
3422
3422
|
delete t[e], m.value = t;
|
|
3423
3423
|
}
|
|
3424
|
-
x.value &&= "", l("update:values",
|
|
3424
|
+
x.value &&= "", l("update:values", N());
|
|
3425
3425
|
}
|
|
3426
3426
|
},
|
|
3427
|
-
getError: (e) => !Xe(e) && f.value[e] ?
|
|
3427
|
+
getError: (e) => !Xe(e) && f.value[e] ? ie.value[e] ?? m.value[e] ?? "" : "",
|
|
3428
3428
|
markTouched: (e) => {
|
|
3429
3429
|
Xe(e) || (f.value[e] = !0);
|
|
3430
3430
|
},
|
|
@@ -3432,20 +3432,20 @@ var yn = Symbol("pb-parent-direction"), bn = /* @__PURE__ */ new Set(), xn = /*
|
|
|
3432
3432
|
pe(e, t);
|
|
3433
3433
|
}
|
|
3434
3434
|
}), n({
|
|
3435
|
-
values: t(() =>
|
|
3435
|
+
values: t(() => N()),
|
|
3436
3436
|
isDirty: ae,
|
|
3437
3437
|
isFormValid: q,
|
|
3438
|
-
reset: () =>
|
|
3438
|
+
reset: () => z()
|
|
3439
3439
|
}), (e, t) => (v(), i("div", {
|
|
3440
3440
|
ref_key: "rootEl",
|
|
3441
3441
|
ref: le,
|
|
3442
3442
|
class: "coar-page-renderer",
|
|
3443
|
-
onKeydown:
|
|
3444
|
-
}, [S(e.$slots, "form-error", { error: x.value }, () => [x.value ? (v(), i("div", Sn, [c(O(
|
|
3443
|
+
onKeydown: M(he, ["enter"])
|
|
3444
|
+
}, [S(e.$slots, "form-error", { error: x.value }, () => [x.value ? (v(), i("div", Sn, [c(O(H), {
|
|
3445
3445
|
variant: "error",
|
|
3446
3446
|
padding: "s"
|
|
3447
3447
|
}, {
|
|
3448
|
-
default:
|
|
3448
|
+
default: j(() => [s(E(x.value), 1)]),
|
|
3449
3449
|
_: 1
|
|
3450
3450
|
})])) : r("", !0)], !0), c(xn, { node: C.value }, null, 8, ["node"])], 544));
|
|
3451
3451
|
}
|
|
@@ -3844,23 +3844,23 @@ function Gn(e) {
|
|
|
3844
3844
|
function _(e) {
|
|
3845
3845
|
if (e.pointerId === n && (l = e.clientX, u = e.clientY, t === "pending")) {
|
|
3846
3846
|
let e = Math.hypot(l - s, u - c);
|
|
3847
|
-
r ? e > Ln &&
|
|
3847
|
+
r ? e > Ln && A(!1) : e > In && S();
|
|
3848
3848
|
}
|
|
3849
3849
|
}
|
|
3850
3850
|
function v(r) {
|
|
3851
|
-
r.pointerId === n && (t === "dragging" && h && e.onZoneDrop(h.path, h.index),
|
|
3851
|
+
r.pointerId === n && (t === "dragging" && h && e.onZoneDrop(h.path, h.index), A(t === "dragging"));
|
|
3852
3852
|
}
|
|
3853
3853
|
function y(e) {
|
|
3854
|
-
e.pointerId === n &&
|
|
3854
|
+
e.pointerId === n && A(t === "dragging");
|
|
3855
3855
|
}
|
|
3856
3856
|
function b(e) {
|
|
3857
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
3857
|
+
e.key === "Escape" && (e.preventDefault(), A(!0));
|
|
3858
3858
|
}
|
|
3859
3859
|
function x(e) {
|
|
3860
3860
|
t !== "idle" && e.preventDefault();
|
|
3861
3861
|
}
|
|
3862
3862
|
function S() {
|
|
3863
|
-
i && (t = "dragging", e.startDrag(i), window.addEventListener("keydown", b, !0), a && (p =
|
|
3863
|
+
i && (t = "dragging", e.startDrag(i), window.addEventListener("keydown", b, !0), a && (p = k(a)), m = document.createElement("style"), m.textContent = "* { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }", document.head.appendChild(m), f = requestAnimationFrame(C));
|
|
3864
3864
|
}
|
|
3865
3865
|
function C() {
|
|
3866
3866
|
t === "dragging" && (O(), T(), E(), p && (p.style.transform = `translate(${l + 12}px, ${u + 10}px)`), f = requestAnimationFrame(C));
|
|
@@ -3913,7 +3913,7 @@ function Gn(e) {
|
|
|
3913
3913
|
n < Vn ? t.scrollTop -= Hn * (1 - n / Vn) : r < Vn && (t.scrollTop += Hn * (1 - r / Vn));
|
|
3914
3914
|
}
|
|
3915
3915
|
}
|
|
3916
|
-
function
|
|
3916
|
+
function k(e) {
|
|
3917
3917
|
let t = e.getBoundingClientRect(), n = e.cloneNode(!0);
|
|
3918
3918
|
n.style.margin = "0";
|
|
3919
3919
|
let r = document.createElement("div");
|
|
@@ -3933,7 +3933,7 @@ function Gn(e) {
|
|
|
3933
3933
|
transform: `translate(${l + 12}px, ${u + 10}px)`
|
|
3934
3934
|
}), r.appendChild(n), document.body.appendChild(r), r;
|
|
3935
3935
|
}
|
|
3936
|
-
function
|
|
3936
|
+
function A(r) {
|
|
3937
3937
|
d !== null && (clearTimeout(d), d = null), cancelAnimationFrame(f), window.removeEventListener("pointermove", _), window.removeEventListener("pointerup", v), window.removeEventListener("pointercancel", y), window.removeEventListener("keydown", b, !0), window.removeEventListener("contextmenu", x, !0), p?.remove(), p = null, m?.remove(), m = null, D(), h = null, i = null, a = null, t = "idle", n = -1, r && e.endDrag(), o = null;
|
|
3938
3938
|
}
|
|
3939
3939
|
return { onHandlePointerDown: g };
|
|
@@ -4034,7 +4034,13 @@ var Xn = [
|
|
|
4034
4034
|
key: 0,
|
|
4035
4035
|
class: "pb-tree-add__menu",
|
|
4036
4036
|
role: "menu"
|
|
4037
|
-
}, dr = { class: "pb-tree-add__group-label" }, fr = ["onClick"], pr = {
|
|
4037
|
+
}, dr = { class: "pb-tree-add__group-label" }, fr = ["onClick"], pr = {
|
|
4038
|
+
key: 0,
|
|
4039
|
+
class: "pb-tree-add__divider"
|
|
4040
|
+
}, mr = { class: "pb-tree-add__group-label" }, hr = ["onClick"], gr = {
|
|
4041
|
+
key: 0,
|
|
4042
|
+
class: "pb-tree-add__divider"
|
|
4043
|
+
}, _r = { class: "pb-tree-add__group-label" }, vr = ["onClick"], yr = /* @__PURE__ */ Q(/* @__PURE__ */ l({
|
|
4038
4044
|
name: "BuilderOutlineNode",
|
|
4039
4045
|
__name: "BuilderOutlineNode",
|
|
4040
4046
|
props: {
|
|
@@ -4043,18 +4049,19 @@ var Xn = [
|
|
|
4043
4049
|
depth: { default: 0 }
|
|
4044
4050
|
},
|
|
4045
4051
|
setup(n) {
|
|
4046
|
-
let o = n, { t: s } =
|
|
4052
|
+
let o = n, { t: s } = P(), l = u(Rt), d = u(zt), f = u(Bt), p = Yn(), y = nn(d), S = t(() => y.value[o.node.type]), w = t(() => o.node.type === "page" || S.value?.container === !0), T = t(() => {
|
|
4047
4053
|
let e = o.node.children;
|
|
4048
4054
|
return Array.isArray(e) ? e : [];
|
|
4049
|
-
}), D = t(() => S.value?.builder?.icon ?? (o.node.type === "page" ? "file" : "circle-alert")),
|
|
4055
|
+
}), D = t(() => S.value?.builder?.icon ?? (o.node.type === "page" ? "file" : "circle-alert")), k = t(() => Object.entries(y.value).filter(([e, t]) => t.builder && ue(e, d?.value)).map(([e, t]) => ({
|
|
4050
4056
|
type: e,
|
|
4051
4057
|
label: s(t.builder.label.key, void 0, t.builder.label.fallback),
|
|
4052
4058
|
icon: t.builder.icon ?? "circle-alert",
|
|
4053
|
-
group: t.builder.group ?? "element"
|
|
4054
|
-
|
|
4059
|
+
group: t.builder.group ?? "element",
|
|
4060
|
+
hasValue: !!t.value
|
|
4061
|
+
}))), A = t(() => k.value.filter((e) => e.group === "container")), ee = t(() => k.value.filter((e) => e.group === "element" && e.hasValue)), te = t(() => k.value.filter((e) => e.group === "element" && !e.hasValue)), j = t(() => d?.value?.hideElementPicker !== !0), M = t(() => f?.byNodeId.value.get(o.node.id) ?? []), F = t(() => M.value.some((e) => e.severity === "error") ? "error" : M.value.length > 0 ? "warning" : null), I = t(() => M.value.map((e) => `• ${e.message}`).join("\n")), L = t(() => o.path.length === 0), R = t(() => {
|
|
4055
4062
|
let e = l.selectedPath.value;
|
|
4056
4063
|
return e !== null && e.length === o.path.length && e.every((e, t) => e === o.path[t]);
|
|
4057
|
-
}),
|
|
4064
|
+
}), z = t(() => {
|
|
4058
4065
|
let e = o.node;
|
|
4059
4066
|
if (e.type === "page") return s("coar.pageBuilder.type.page", void 0, "Page");
|
|
4060
4067
|
if (e.type === "stack") return e.props?.direction === "row" ? s("coar.pageBuilder.outline.row", void 0, "Row") : s("coar.pageBuilder.outline.column", void 0, "Column");
|
|
@@ -4063,56 +4070,56 @@ var Xn = [
|
|
|
4063
4070
|
if (e.props?.title) return String(e.props.title);
|
|
4064
4071
|
let t = S.value?.builder?.label;
|
|
4065
4072
|
return t ? s(t.key, void 0, t.fallback) : e.type;
|
|
4066
|
-
}),
|
|
4073
|
+
}), V = t(() => {
|
|
4067
4074
|
let e = o.node;
|
|
4068
4075
|
return e.name ? String(e.name) : void 0;
|
|
4069
|
-
}),
|
|
4070
|
-
function
|
|
4071
|
-
|
|
4076
|
+
}), H = b(!1), U = b(null);
|
|
4077
|
+
function W() {
|
|
4078
|
+
H.value = !H.value;
|
|
4072
4079
|
}
|
|
4073
|
-
function
|
|
4074
|
-
|
|
4080
|
+
function ne(e) {
|
|
4081
|
+
H.value = !1, l.addChild(o.path, e);
|
|
4075
4082
|
}
|
|
4076
|
-
function
|
|
4077
|
-
if (!
|
|
4083
|
+
function re(e) {
|
|
4084
|
+
if (!H.value) return;
|
|
4078
4085
|
let t = e.target;
|
|
4079
|
-
t &&
|
|
4086
|
+
t && U.value && !U.value.contains(t) && (H.value = !1);
|
|
4080
4087
|
}
|
|
4081
|
-
function
|
|
4082
|
-
e.key === "Escape" && (
|
|
4088
|
+
function G(e) {
|
|
4089
|
+
e.key === "Escape" && (H.value = !1);
|
|
4083
4090
|
}
|
|
4084
4091
|
_(() => {
|
|
4085
|
-
document.addEventListener("click",
|
|
4092
|
+
document.addEventListener("click", re), document.addEventListener("keydown", G);
|
|
4086
4093
|
}), g(() => {
|
|
4087
|
-
document.removeEventListener("click",
|
|
4094
|
+
document.removeEventListener("click", re), document.removeEventListener("keydown", G);
|
|
4088
4095
|
});
|
|
4089
|
-
let
|
|
4090
|
-
function
|
|
4091
|
-
return `o:${
|
|
4096
|
+
let K = t(() => o.path.join("/")), ie = t(() => T.value.length);
|
|
4097
|
+
function q(e) {
|
|
4098
|
+
return `o:${K.value}:${e}`;
|
|
4092
4099
|
}
|
|
4093
|
-
let
|
|
4094
|
-
function
|
|
4100
|
+
let ae = t(() => `o:${K.value}:into`);
|
|
4101
|
+
function oe(e) {
|
|
4095
4102
|
return {
|
|
4096
4103
|
"pb-outline-zone--active": p.isDragging.value && p.canDrop(o.path),
|
|
4097
|
-
"pb-outline-zone--over": p.activeZoneKey.value ===
|
|
4104
|
+
"pb-outline-zone--over": p.activeZoneKey.value === q(e)
|
|
4098
4105
|
};
|
|
4099
4106
|
}
|
|
4100
|
-
let
|
|
4101
|
-
function
|
|
4102
|
-
if (
|
|
4107
|
+
let se = t(() => p.isDragging.value && p.activeZoneKey.value === ae.value);
|
|
4108
|
+
function J(e) {
|
|
4109
|
+
if (L.value) return;
|
|
4103
4110
|
let t = e.currentTarget?.closest(".pb-tree-row");
|
|
4104
4111
|
p.onHandlePointerDown(e, {
|
|
4105
4112
|
kind: "move",
|
|
4106
4113
|
path: [...o.path]
|
|
4107
4114
|
}, t);
|
|
4108
4115
|
}
|
|
4109
|
-
function
|
|
4116
|
+
function ce(e) {
|
|
4110
4117
|
e.target?.closest("button") || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), l.select(o.path));
|
|
4111
4118
|
}
|
|
4112
|
-
function
|
|
4119
|
+
function le() {
|
|
4113
4120
|
return o.path.length > 0 && o.path[o.path.length - 1] > 0;
|
|
4114
4121
|
}
|
|
4115
|
-
function
|
|
4122
|
+
function Y() {
|
|
4116
4123
|
if (o.path.length === 0) return !1;
|
|
4117
4124
|
let e = o.path.slice(0, -1), t = o.path[o.path.length - 1], n = l.schema.value;
|
|
4118
4125
|
for (let t of e) {
|
|
@@ -4126,95 +4133,95 @@ var Xn = [
|
|
|
4126
4133
|
return (t, o) => {
|
|
4127
4134
|
let u = C("BuilderOutlineNode", !0);
|
|
4128
4135
|
return v(), i("div", { class: m(["pb-tree-node", {
|
|
4129
|
-
"pb-tree-node--selected":
|
|
4130
|
-
"pb-tree-node--root":
|
|
4136
|
+
"pb-tree-node--selected": R.value,
|
|
4137
|
+
"pb-tree-node--root": L.value
|
|
4131
4138
|
}]) }, [a("div", {
|
|
4132
|
-
class: m(["pb-tree-row", { "pb-tree-row--dropinto":
|
|
4139
|
+
class: m(["pb-tree-row", { "pb-tree-row--dropinto": se.value }]),
|
|
4133
4140
|
style: h({ paddingLeft: `${8 + n.depth * 16}px` }),
|
|
4134
4141
|
role: "treeitem",
|
|
4135
4142
|
"aria-level": n.depth + 1,
|
|
4136
|
-
"aria-selected":
|
|
4143
|
+
"aria-selected": R.value,
|
|
4137
4144
|
"aria-expanded": w.value ? !0 : void 0,
|
|
4138
|
-
tabindex:
|
|
4139
|
-
"data-dropzone": w.value ?
|
|
4140
|
-
"data-pb-zone-path": w.value ?
|
|
4145
|
+
tabindex: R.value ? 0 : -1,
|
|
4146
|
+
"data-dropzone": w.value ? ae.value : void 0,
|
|
4147
|
+
"data-pb-zone-path": w.value ? K.value : void 0,
|
|
4141
4148
|
"data-pb-zone-index": w.value ? ie.value : void 0,
|
|
4142
|
-
onClick: o[4] ||=
|
|
4143
|
-
onKeydown:
|
|
4149
|
+
onClick: o[4] ||= N((e) => O(l).select(n.path), ["stop"]),
|
|
4150
|
+
onKeydown: ce
|
|
4144
4151
|
}, [
|
|
4145
|
-
|
|
4152
|
+
L.value ? (v(), i("span", Zn)) : (v(), i("span", {
|
|
4146
4153
|
key: 0,
|
|
4147
4154
|
class: "pb-tree-grip",
|
|
4148
4155
|
"aria-hidden": "true",
|
|
4149
|
-
onPointerdown:
|
|
4150
|
-
}, [c(O(
|
|
4156
|
+
onPointerdown: N(J, ["stop"])
|
|
4157
|
+
}, [c(O(B), {
|
|
4151
4158
|
name: "grip-vertical",
|
|
4152
4159
|
size: "xs"
|
|
4153
4160
|
})], 32)),
|
|
4154
|
-
a("span", Qn, [c(O(
|
|
4161
|
+
a("span", Qn, [c(O(B), {
|
|
4155
4162
|
name: D.value,
|
|
4156
4163
|
size: "s"
|
|
4157
4164
|
}, null, 8, ["name"])]),
|
|
4158
|
-
a("span", $n, [a("span", er, E(
|
|
4159
|
-
|
|
4165
|
+
a("span", $n, [a("span", er, E(z.value), 1), V.value ? (v(), i("span", tr, E(V.value), 1)) : r("", !0)]),
|
|
4166
|
+
F.value ? (v(), i("span", {
|
|
4160
4167
|
key: 2,
|
|
4161
|
-
class: m(["pb-tree-issue", `pb-tree-issue--${
|
|
4162
|
-
title:
|
|
4168
|
+
class: m(["pb-tree-issue", `pb-tree-issue--${F.value}`]),
|
|
4169
|
+
title: I.value,
|
|
4163
4170
|
"aria-label": O(s)("coar.pageBuilder.outline.validationIssues", void 0, "Validation issues")
|
|
4164
|
-
}, [c(O(
|
|
4165
|
-
name:
|
|
4171
|
+
}, [c(O(B), {
|
|
4172
|
+
name: F.value === "error" ? "circle-alert" : "triangle-alert",
|
|
4166
4173
|
size: "s"
|
|
4167
4174
|
}, null, 8, ["name"])], 10, nr)) : r("", !0),
|
|
4168
4175
|
a("div", rr, [
|
|
4169
|
-
|
|
4176
|
+
L.value ? r("", !0) : (v(), i("button", {
|
|
4170
4177
|
key: 0,
|
|
4171
4178
|
type: "button",
|
|
4172
4179
|
class: "pb-tree-btn",
|
|
4173
|
-
disabled: !
|
|
4180
|
+
disabled: !le(),
|
|
4174
4181
|
title: O(s)("coar.pageBuilder.common.moveUp", void 0, "Move up"),
|
|
4175
|
-
onClick: o[0] ||=
|
|
4176
|
-
}, [c(O(
|
|
4182
|
+
onClick: o[0] ||= N((e) => O(l).move(n.path, -1), ["stop"])
|
|
4183
|
+
}, [c(O(B), {
|
|
4177
4184
|
name: "chevron-up",
|
|
4178
4185
|
size: "s"
|
|
4179
4186
|
})], 8, ir)),
|
|
4180
|
-
|
|
4187
|
+
L.value ? r("", !0) : (v(), i("button", {
|
|
4181
4188
|
key: 1,
|
|
4182
4189
|
type: "button",
|
|
4183
4190
|
class: "pb-tree-btn",
|
|
4184
|
-
disabled: !
|
|
4191
|
+
disabled: !Y(),
|
|
4185
4192
|
title: O(s)("coar.pageBuilder.common.moveDown", void 0, "Move down"),
|
|
4186
|
-
onClick: o[1] ||=
|
|
4187
|
-
}, [c(O(
|
|
4193
|
+
onClick: o[1] ||= N((e) => O(l).move(n.path, 1), ["stop"])
|
|
4194
|
+
}, [c(O(B), {
|
|
4188
4195
|
name: "chevron-down",
|
|
4189
4196
|
size: "s"
|
|
4190
4197
|
})], 8, ar)),
|
|
4191
|
-
|
|
4198
|
+
L.value ? r("", !0) : (v(), i("button", {
|
|
4192
4199
|
key: 2,
|
|
4193
4200
|
type: "button",
|
|
4194
4201
|
class: "pb-tree-btn",
|
|
4195
4202
|
title: O(s)("coar.pageBuilder.common.duplicate", void 0, "Duplicate"),
|
|
4196
|
-
onClick: o[2] ||=
|
|
4197
|
-
}, [c(O(
|
|
4203
|
+
onClick: o[2] ||= N((e) => O(l).duplicate(n.path), ["stop"])
|
|
4204
|
+
}, [c(O(B), {
|
|
4198
4205
|
name: "copy",
|
|
4199
4206
|
size: "s"
|
|
4200
4207
|
})], 8, or)),
|
|
4201
|
-
|
|
4208
|
+
L.value ? r("", !0) : (v(), i("button", {
|
|
4202
4209
|
key: 3,
|
|
4203
4210
|
type: "button",
|
|
4204
4211
|
class: "pb-tree-btn pb-tree-btn--danger",
|
|
4205
4212
|
title: O(s)("coar.pageBuilder.common.delete", void 0, "Delete"),
|
|
4206
|
-
onClick: o[3] ||=
|
|
4207
|
-
}, [c(O(
|
|
4213
|
+
onClick: o[3] ||= N((e) => O(l).remove(n.path), ["stop"])
|
|
4214
|
+
}, [c(O(B), {
|
|
4208
4215
|
name: "trash-2",
|
|
4209
4216
|
size: "s"
|
|
4210
4217
|
})], 8, sr))
|
|
4211
4218
|
])
|
|
4212
4219
|
], 46, Xn), w.value ? (v(), i(e, { key: 0 }, [
|
|
4213
4220
|
(v(!0), i(e, null, x(T.value, (t, r) => (v(), i(e, { key: t.id }, [a("div", {
|
|
4214
|
-
class: m(["pb-outline-zone",
|
|
4221
|
+
class: m(["pb-outline-zone", oe(r)]),
|
|
4215
4222
|
style: h({ marginLeft: `${8 + (n.depth + 1) * 16}px` }),
|
|
4216
|
-
"data-dropzone":
|
|
4217
|
-
"data-pb-zone-path":
|
|
4223
|
+
"data-dropzone": q(r),
|
|
4224
|
+
"data-pb-zone-path": K.value,
|
|
4218
4225
|
"data-pb-zone-index": r,
|
|
4219
4226
|
"data-pb-zone-inflate": "6",
|
|
4220
4227
|
"aria-hidden": "true"
|
|
@@ -4229,60 +4236,75 @@ var Xn = [
|
|
|
4229
4236
|
])], 64))), 128)),
|
|
4230
4237
|
T.value.length > 0 ? (v(), i("div", {
|
|
4231
4238
|
key: 0,
|
|
4232
|
-
class: m(["pb-outline-zone",
|
|
4239
|
+
class: m(["pb-outline-zone", oe(T.value.length)]),
|
|
4233
4240
|
style: h({ marginLeft: `${8 + (n.depth + 1) * 16}px` }),
|
|
4234
|
-
"data-dropzone":
|
|
4235
|
-
"data-pb-zone-path":
|
|
4241
|
+
"data-dropzone": q(T.value.length),
|
|
4242
|
+
"data-pb-zone-path": K.value,
|
|
4236
4243
|
"data-pb-zone-index": T.value.length,
|
|
4237
4244
|
"data-pb-zone-inflate": "6",
|
|
4238
4245
|
"aria-hidden": "true"
|
|
4239
4246
|
}, null, 14, lr)) : r("", !0),
|
|
4240
|
-
|
|
4247
|
+
A.value.length > 0 || te.value.length > 0 || j.value && ee.value.length > 0 ? (v(), i("div", {
|
|
4241
4248
|
key: 1,
|
|
4242
4249
|
ref_key: "addMenuRoot",
|
|
4243
|
-
ref:
|
|
4250
|
+
ref: U,
|
|
4244
4251
|
class: "pb-tree-add",
|
|
4245
4252
|
style: h({ paddingLeft: `${8 + (n.depth + 1) * 16}px` })
|
|
4246
4253
|
}, [a("button", {
|
|
4247
4254
|
type: "button",
|
|
4248
|
-
class: m(["pb-tree-add__trigger", { "pb-tree-add__trigger--open":
|
|
4249
|
-
onClick:
|
|
4250
|
-
}, [c(O(
|
|
4255
|
+
class: m(["pb-tree-add__trigger", { "pb-tree-add__trigger--open": H.value }]),
|
|
4256
|
+
onClick: N(W, ["stop"])
|
|
4257
|
+
}, [c(O(B), {
|
|
4251
4258
|
name: "plus",
|
|
4252
4259
|
size: "s"
|
|
4253
|
-
}), a("span", null, E(O(s)("coar.pageBuilder.outline.addChild", void 0, "Add child")), 1)], 2),
|
|
4254
|
-
a("div", dr, E(O(s)("coar.pageBuilder.palette.containers", void 0, "Containers")), 1),
|
|
4255
|
-
(v(!0), i(e, null, x(ee.value.filter((e) => e.group === "container"), (e) => (v(), i("button", {
|
|
4260
|
+
}), a("span", null, E(O(s)("coar.pageBuilder.outline.addChild", void 0, "Add child")), 1)], 2), H.value ? (v(), i("div", ur, [
|
|
4261
|
+
A.value.length > 0 ? (v(), i(e, { key: 0 }, [a("div", dr, E(O(s)("coar.pageBuilder.palette.containers", void 0, "Containers")), 1), (v(!0), i(e, null, x(A.value, (e) => (v(), i("button", {
|
|
4256
4262
|
key: e.type,
|
|
4257
4263
|
type: "button",
|
|
4258
4264
|
class: "pb-tree-add__item",
|
|
4259
4265
|
role: "menuitem",
|
|
4260
|
-
onClick:
|
|
4261
|
-
}, [c(O(
|
|
4266
|
+
onClick: N((t) => ne(e.type), ["stop"])
|
|
4267
|
+
}, [c(O(B), {
|
|
4262
4268
|
name: e.icon,
|
|
4263
4269
|
size: "s"
|
|
4264
|
-
}, null, 8, ["name"]), a("span", null, E(e.label), 1)], 8, fr))), 128)),
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4270
|
+
}, null, 8, ["name"]), a("span", null, E(e.label), 1)], 8, fr))), 128))], 64)) : r("", !0),
|
|
4271
|
+
j.value && ee.value.length > 0 ? (v(), i(e, { key: 1 }, [
|
|
4272
|
+
A.value.length > 0 ? (v(), i("div", pr)) : r("", !0),
|
|
4273
|
+
a("div", mr, E(O(s)("coar.pageBuilder.palette.inputs", void 0, "Inputs")), 1),
|
|
4274
|
+
(v(!0), i(e, null, x(ee.value, (e) => (v(), i("button", {
|
|
4275
|
+
key: e.type,
|
|
4276
|
+
type: "button",
|
|
4277
|
+
class: "pb-tree-add__item",
|
|
4278
|
+
role: "menuitem",
|
|
4279
|
+
onClick: N((t) => ne(e.type), ["stop"])
|
|
4280
|
+
}, [c(O(B), {
|
|
4281
|
+
name: e.icon,
|
|
4282
|
+
size: "s"
|
|
4283
|
+
}, null, 8, ["name"]), a("span", null, E(e.label), 1)], 8, hr))), 128))
|
|
4284
|
+
], 64)) : r("", !0),
|
|
4285
|
+
te.value.length > 0 ? (v(), i(e, { key: 2 }, [
|
|
4286
|
+
A.value.length > 0 || j.value && ee.value.length > 0 ? (v(), i("div", gr)) : r("", !0),
|
|
4287
|
+
a("div", _r, E(O(s)("coar.pageBuilder.palette.elements", void 0, "Elements")), 1),
|
|
4288
|
+
(v(!0), i(e, null, x(te.value, (e) => (v(), i("button", {
|
|
4289
|
+
key: e.type,
|
|
4290
|
+
type: "button",
|
|
4291
|
+
class: "pb-tree-add__item",
|
|
4292
|
+
role: "menuitem",
|
|
4293
|
+
onClick: N((t) => ne(e.type), ["stop"])
|
|
4294
|
+
}, [c(O(B), {
|
|
4295
|
+
name: e.icon,
|
|
4296
|
+
size: "s"
|
|
4297
|
+
}, null, 8, ["name"]), a("span", null, E(e.label), 1)], 8, vr))), 128))
|
|
4298
|
+
], 64)) : r("", !0)
|
|
4299
|
+
])) : r("", !0)], 4)) : r("", !0)
|
|
4278
4300
|
], 64)) : r("", !0)], 2);
|
|
4279
4301
|
};
|
|
4280
4302
|
}
|
|
4281
|
-
}), [["__scopeId", "data-v-
|
|
4303
|
+
}), [["__scopeId", "data-v-bf63e38a"]]), br = ["aria-label"], xr = /* @__PURE__ */ Q(/* @__PURE__ */ l({
|
|
4282
4304
|
name: "BuilderOutline",
|
|
4283
4305
|
__name: "BuilderOutline",
|
|
4284
4306
|
setup(e) {
|
|
4285
|
-
let { t } =
|
|
4307
|
+
let { t } = P(), n = u(Rt), r = b(null);
|
|
4286
4308
|
function a(e) {
|
|
4287
4309
|
if (![
|
|
4288
4310
|
"ArrowDown",
|
|
@@ -4302,30 +4324,30 @@ var Xn = [
|
|
|
4302
4324
|
role: "tree",
|
|
4303
4325
|
"aria-label": O(t)("coar.pageBuilder.outline.treeLabel", void 0, "Page structure"),
|
|
4304
4326
|
onKeydown: a
|
|
4305
|
-
}, [c(
|
|
4327
|
+
}, [c(yr, {
|
|
4306
4328
|
node: O(n).schema.value,
|
|
4307
4329
|
path: [],
|
|
4308
4330
|
depth: 0
|
|
4309
|
-
}, null, 8, ["node"])], 40,
|
|
4331
|
+
}, null, 8, ["node"])], 40, br));
|
|
4310
4332
|
}
|
|
4311
|
-
}), [["__scopeId", "data-v-90246b78"]]),
|
|
4333
|
+
}), [["__scopeId", "data-v-90246b78"]]), Sr = ["title"], Cr = { class: "canvas-node__tab-label" }, wr = ["title"], Tr = {
|
|
4312
4334
|
key: 0,
|
|
4313
4335
|
class: "canvas-node__blocked",
|
|
4314
4336
|
role: "note"
|
|
4315
|
-
},
|
|
4337
|
+
}, Er = ["title"], Dr = ["title"], Or = {
|
|
4316
4338
|
key: 0,
|
|
4317
4339
|
class: "canvas-node__section-title"
|
|
4318
|
-
},
|
|
4340
|
+
}, kr = ["data-dropzone", "data-pb-zone-path"], Ar = ["data-dropzone", "data-pb-zone-path"], jr = [
|
|
4319
4341
|
"data-dropzone",
|
|
4320
4342
|
"data-pb-zone-path",
|
|
4321
4343
|
"data-pb-zone-index"
|
|
4322
|
-
],
|
|
4344
|
+
], Mr = {
|
|
4323
4345
|
key: 4,
|
|
4324
4346
|
class: "canvas-node__preview"
|
|
4325
|
-
},
|
|
4347
|
+
}, Nr = {
|
|
4326
4348
|
key: 1,
|
|
4327
4349
|
class: "canvas-node__generic-preview"
|
|
4328
|
-
},
|
|
4350
|
+
}, Pr = Symbol("canvas-parent-direction"), Fr = /* @__PURE__ */ Q(/* @__PURE__ */ l({
|
|
4329
4351
|
name: "BuilderCanvasNode",
|
|
4330
4352
|
__name: "BuilderCanvasNode",
|
|
4331
4353
|
props: {
|
|
@@ -4333,41 +4355,41 @@ var Xn = [
|
|
|
4333
4355
|
path: {}
|
|
4334
4356
|
},
|
|
4335
4357
|
setup(o) {
|
|
4336
|
-
let s = o, l = u(Rt), d = u(zt), f = Yn(), p = nn(d), { t: g } =
|
|
4358
|
+
let s = o, l = u(Rt), d = u(zt), f = Yn(), p = nn(d), { t: g } = P(), _ = t(() => s.node.type === "page" ? void 0 : p.value[s.node.type]);
|
|
4337
4359
|
function b(e) {
|
|
4338
4360
|
return d?.value?.assetResolver?.(e) ?? "";
|
|
4339
4361
|
}
|
|
4340
4362
|
let S = t(() => s.path.length === 0), T = t(() => s.path.join("/")), D = t(() => {
|
|
4341
4363
|
let e = f.payload.value;
|
|
4342
4364
|
return !e || e.kind !== "move" ? !1 : e.path.length === s.path.length && e.path.every((e, t) => e === s.path[t]);
|
|
4343
|
-
}),
|
|
4365
|
+
}), k = t(() => {
|
|
4344
4366
|
let e = l.selectedPath.value;
|
|
4345
4367
|
return e !== null && e.length === s.path.length && e.every((e, t) => e === s.path[t]);
|
|
4346
|
-
}),
|
|
4368
|
+
}), A = t(() => {
|
|
4347
4369
|
let e = s.node;
|
|
4348
4370
|
return e.props?.text ? `${e.type} · ${String(e.props.text).slice(0, 24)}` : e.props?.label ? `${e.type} · ${String(e.props.label).slice(0, 24)}` : e.props?.title ? `${e.type} · ${String(e.props.title).slice(0, 24)}` : e.name ? `${e.type} · ${String(e.name)}` : e.type;
|
|
4349
|
-
}),
|
|
4371
|
+
}), ee = t(() => _.value?.builder?.icon ?? (s.node.type === "page" ? "file" : "circle-alert")), te = t(() => s.node.visibleWhen), j = t(() => g("coar.pageBuilder.canvas.visibleWhen", { field: String(te.value?.field ?? "") }, "Shown conditionally — depends on \"{field}\"")), M = t(() => s.node.type === "page" || _.value?.container === !0), F = t(() => M.value ? "container" : "element"), I = t(() => s.node.children ?? []), L = t(() => s.node.type !== "page" && !_.value), R = t(() => L.value || !ue(s.node.type, d?.value)), z = t(() => L.value ? g("coar.pageBuilder.canvas.unknownType", { type: String(s.node.type) }, "Unknown type \"{type}\" — skipped at runtime") : g("coar.pageBuilder.canvas.notAllowed", void 0, "Not in allowedElements — skipped at runtime")), V = t(() => {
|
|
4350
4372
|
let e = s.node;
|
|
4351
4373
|
return e.type === "stack" ? e.props.direction ?? "column" : "column";
|
|
4352
|
-
}),
|
|
4353
|
-
y(
|
|
4354
|
-
let
|
|
4374
|
+
}), H = u(Pr, void 0);
|
|
4375
|
+
y(Pr, V);
|
|
4376
|
+
let U = t(() => {
|
|
4355
4377
|
let e = s.node;
|
|
4356
|
-
if (!
|
|
4378
|
+
if (!M.value) return {};
|
|
4357
4379
|
let t = {
|
|
4358
4380
|
display: "flex",
|
|
4359
|
-
flexDirection:
|
|
4381
|
+
flexDirection: V.value,
|
|
4360
4382
|
...De(e.style)
|
|
4361
4383
|
};
|
|
4362
4384
|
return e.type !== "card" && e.style?.padding && (t.padding = e.style.padding), t;
|
|
4363
|
-
}),
|
|
4364
|
-
function
|
|
4385
|
+
}), W = t(() => Te(s.node.style, H?.value ?? "column"));
|
|
4386
|
+
function ne(e) {
|
|
4365
4387
|
e.stopPropagation(), l.select(s.path);
|
|
4366
4388
|
}
|
|
4367
|
-
function
|
|
4389
|
+
function re(e) {
|
|
4368
4390
|
e.target === e.currentTarget && (e.key !== "Enter" && e.key !== " " || (e.preventDefault(), e.stopPropagation(), l.select(s.path)));
|
|
4369
4391
|
}
|
|
4370
|
-
function
|
|
4392
|
+
function G(e) {
|
|
4371
4393
|
if (S.value) return;
|
|
4372
4394
|
let t = e.currentTarget?.closest(".canvas-node");
|
|
4373
4395
|
f.onHandlePointerDown(e, {
|
|
@@ -4375,144 +4397,145 @@ var Xn = [
|
|
|
4375
4397
|
path: [...s.path]
|
|
4376
4398
|
}, t);
|
|
4377
4399
|
}
|
|
4378
|
-
function
|
|
4400
|
+
function K(e) {
|
|
4379
4401
|
return `${T.value}:${e}`;
|
|
4380
4402
|
}
|
|
4381
|
-
function
|
|
4382
|
-
return f.activeZoneKey.value ===
|
|
4403
|
+
function ie(e) {
|
|
4404
|
+
return f.activeZoneKey.value === K(e);
|
|
4383
4405
|
}
|
|
4384
4406
|
function q(e) {
|
|
4385
4407
|
let t = f.isDragging.value, n = f.canDrop(s.path);
|
|
4386
4408
|
return {
|
|
4387
4409
|
"canvas-dropzone--drag-active": t && n,
|
|
4388
4410
|
"canvas-dropzone--disabled": t && !n,
|
|
4389
|
-
"canvas-dropzone--over":
|
|
4411
|
+
"canvas-dropzone--over": ie(e)
|
|
4390
4412
|
};
|
|
4391
4413
|
}
|
|
4392
4414
|
return (t, s) => {
|
|
4393
4415
|
let u = C("BuilderCanvasNode", !0);
|
|
4394
4416
|
return v(), i("div", {
|
|
4395
|
-
class: m(["canvas-node", [`canvas-node--${
|
|
4396
|
-
"canvas-node--selected":
|
|
4417
|
+
class: m(["canvas-node", [`canvas-node--${F.value}`, {
|
|
4418
|
+
"canvas-node--selected": k.value,
|
|
4397
4419
|
"canvas-node--root": S.value,
|
|
4398
4420
|
"canvas-node--dragging": D.value,
|
|
4399
|
-
"canvas-node--blocked":
|
|
4421
|
+
"canvas-node--blocked": R.value
|
|
4400
4422
|
}]]),
|
|
4401
|
-
style: h(
|
|
4423
|
+
style: h(W.value),
|
|
4402
4424
|
tabindex: "0",
|
|
4403
|
-
onClick:
|
|
4404
|
-
onKeydown:
|
|
4425
|
+
onClick: ne,
|
|
4426
|
+
onKeydown: re
|
|
4405
4427
|
}, [
|
|
4406
4428
|
a("span", {
|
|
4407
4429
|
class: m(["canvas-node__tab", { "canvas-node__tab--grabbable": !S.value }]),
|
|
4408
|
-
title:
|
|
4409
|
-
onPointerdown:
|
|
4430
|
+
title: A.value,
|
|
4431
|
+
onPointerdown: G
|
|
4410
4432
|
}, [
|
|
4411
|
-
c(O(
|
|
4412
|
-
name:
|
|
4433
|
+
c(O(B), {
|
|
4434
|
+
name: ee.value,
|
|
4413
4435
|
size: "xs"
|
|
4414
4436
|
}, null, 8, ["name"]),
|
|
4415
|
-
a("span",
|
|
4416
|
-
|
|
4437
|
+
a("span", Cr, E(A.value), 1),
|
|
4438
|
+
te.value ? (v(), i("span", {
|
|
4417
4439
|
key: 0,
|
|
4418
4440
|
class: "canvas-node__tab-eye",
|
|
4419
|
-
title:
|
|
4420
|
-
}, [c(O(
|
|
4441
|
+
title: j.value
|
|
4442
|
+
}, [c(O(B), {
|
|
4421
4443
|
name: "eye",
|
|
4422
4444
|
size: "xs"
|
|
4423
|
-
})], 8,
|
|
4424
|
-
], 42,
|
|
4425
|
-
|
|
4445
|
+
})], 8, wr)) : r("", !0)
|
|
4446
|
+
], 42, Sr),
|
|
4447
|
+
R.value ? (v(), i("div", Tr, [c(O(B), {
|
|
4426
4448
|
name: "circle-alert",
|
|
4427
4449
|
size: "xs"
|
|
4428
|
-
}), a("span", null, E(
|
|
4450
|
+
}), a("span", null, E(z.value), 1)])) : r("", !0),
|
|
4429
4451
|
S.value ? r("", !0) : (v(), i("button", {
|
|
4430
4452
|
key: 1,
|
|
4431
4453
|
type: "button",
|
|
4432
4454
|
class: "canvas-node__delete canvas-node__duplicate",
|
|
4433
4455
|
title: O(g)("coar.pageBuilder.common.duplicate", void 0, "Duplicate"),
|
|
4434
|
-
onClick: s[0] ||=
|
|
4435
|
-
}, [c(O(
|
|
4456
|
+
onClick: s[0] ||= N((e) => O(l).duplicate(o.path), ["stop"])
|
|
4457
|
+
}, [c(O(B), {
|
|
4436
4458
|
name: "copy",
|
|
4437
4459
|
size: "xs"
|
|
4438
|
-
})], 8,
|
|
4460
|
+
})], 8, Er)),
|
|
4439
4461
|
S.value ? r("", !0) : (v(), i("button", {
|
|
4440
4462
|
key: 2,
|
|
4441
4463
|
type: "button",
|
|
4442
4464
|
class: "canvas-node__delete",
|
|
4443
4465
|
title: O(g)("coar.pageBuilder.common.delete", void 0, "Delete"),
|
|
4444
|
-
onClick: s[1] ||=
|
|
4445
|
-
}, [c(O(
|
|
4466
|
+
onClick: s[1] ||= N((e) => O(l).remove(o.path), ["stop"])
|
|
4467
|
+
}, [c(O(B), {
|
|
4446
4468
|
name: "x",
|
|
4447
4469
|
size: "xs"
|
|
4448
|
-
})], 8,
|
|
4449
|
-
|
|
4470
|
+
})], 8, Dr)),
|
|
4471
|
+
M.value ? (v(), i("div", {
|
|
4450
4472
|
key: 3,
|
|
4451
|
-
class: m(["canvas-node__body", [`canvas-node__body--${o.node.type}`, `canvas-node__body--dir-${
|
|
4452
|
-
style: h(
|
|
4453
|
-
}, [o.node.type === "section" && o.node.props?.title ? (v(), i("div",
|
|
4473
|
+
class: m(["canvas-node__body", [`canvas-node__body--${o.node.type}`, `canvas-node__body--dir-${V.value}`]]),
|
|
4474
|
+
style: h(U.value)
|
|
4475
|
+
}, [o.node.type === "section" && o.node.props?.title ? (v(), i("div", Or, E(o.node.props.title), 1)) : r("", !0), I.value.length === 0 ? (v(), i("div", {
|
|
4454
4476
|
key: 1,
|
|
4455
4477
|
class: m(["canvas-dropzone canvas-dropzone--empty", q(0)]),
|
|
4456
|
-
"data-dropzone":
|
|
4478
|
+
"data-dropzone": K(0),
|
|
4457
4479
|
"data-pb-zone-path": T.value,
|
|
4458
4480
|
"data-pb-zone-index": 0
|
|
4459
|
-
}, E(O(g)("coar.pageBuilder.canvas.emptyContainer", { type: o.node.type }, "Empty {type} — drop something here")), 11,
|
|
4460
|
-
class: m(["canvas-dropzone", [`canvas-dropzone--${
|
|
4461
|
-
"data-dropzone":
|
|
4481
|
+
}, E(O(g)("coar.pageBuilder.canvas.emptyContainer", { type: o.node.type }, "Empty {type} — drop something here")), 11, kr)) : (v(), i(e, { key: 2 }, [a("div", {
|
|
4482
|
+
class: m(["canvas-dropzone", [`canvas-dropzone--${V.value}`, q(0)]]),
|
|
4483
|
+
"data-dropzone": K(0),
|
|
4462
4484
|
"data-pb-zone-path": T.value,
|
|
4463
4485
|
"data-pb-zone-index": 0,
|
|
4464
4486
|
"data-pb-zone-inflate": "8",
|
|
4465
4487
|
"aria-hidden": "true"
|
|
4466
|
-
}, null, 10,
|
|
4488
|
+
}, null, 10, Ar), (v(!0), i(e, null, x(I.value, (t, n) => (v(), i(e, { key: t.id }, [c(u, {
|
|
4467
4489
|
node: t,
|
|
4468
4490
|
path: [...o.path, n]
|
|
4469
4491
|
}, null, 8, ["node", "path"]), a("div", {
|
|
4470
|
-
class: m(["canvas-dropzone", [`canvas-dropzone--${
|
|
4471
|
-
"data-dropzone":
|
|
4492
|
+
class: m(["canvas-dropzone", [`canvas-dropzone--${V.value}`, q(n + 1)]]),
|
|
4493
|
+
"data-dropzone": K(n + 1),
|
|
4472
4494
|
"data-pb-zone-path": T.value,
|
|
4473
4495
|
"data-pb-zone-index": n + 1,
|
|
4474
4496
|
"data-pb-zone-inflate": "8",
|
|
4475
4497
|
"aria-hidden": "true"
|
|
4476
|
-
}, null, 10,
|
|
4498
|
+
}, null, 10, jr)], 64))), 128))], 64))], 6)) : (v(), i("div", Mr, [_.value?.builder?.preview ? (v(), n(w(_.value.builder.preview), {
|
|
4477
4499
|
key: 0,
|
|
4478
4500
|
node: o.node,
|
|
4479
4501
|
"resolve-asset": b
|
|
4480
|
-
}, null, 8, ["node"])) : _.value ? (v(), i("div",
|
|
4502
|
+
}, null, 8, ["node"])) : _.value ? (v(), i("div", Nr, [c(O(B), {
|
|
4481
4503
|
name: _.value.builder?.icon ?? "puzzle",
|
|
4482
4504
|
size: "s"
|
|
4483
|
-
}, null, 8, ["name"]), a("span", null, E(
|
|
4505
|
+
}, null, 8, ["name"]), a("span", null, E(A.value), 1)])) : r("", !0)]))
|
|
4484
4506
|
], 38);
|
|
4485
4507
|
};
|
|
4486
4508
|
}
|
|
4487
|
-
}), [["__scopeId", "data-v-765f4f97"]]),
|
|
4509
|
+
}), [["__scopeId", "data-v-765f4f97"]]), Ir = { class: "pb-canvas-shell" }, Lr = { class: "pb-palette" }, Rr = {
|
|
4488
4510
|
key: 0,
|
|
4489
4511
|
class: "pb-palette__group"
|
|
4490
|
-
}, Fr = { class: "pb-palette__label" }, Ir = ["title", "onPointerdown"], Lr = {
|
|
4491
|
-
key: 1,
|
|
4492
|
-
class: "pb-palette__divider"
|
|
4493
|
-
}, Rr = {
|
|
4494
|
-
key: 2,
|
|
4495
|
-
class: "pb-palette__group"
|
|
4496
4512
|
}, zr = { class: "pb-palette__label" }, Br = ["title", "onPointerdown"], Vr = {
|
|
4497
4513
|
key: 0,
|
|
4498
4514
|
class: "pb-palette__divider"
|
|
4499
|
-
}, Hr = { class: "pb-palette__group" }, Ur = { class: "pb-palette__label" }, Wr = [
|
|
4515
|
+
}, Hr = { class: "pb-palette__group" }, Ur = { class: "pb-palette__label" }, Wr = ["title", "onPointerdown"], Gr = {
|
|
4516
|
+
key: 0,
|
|
4517
|
+
class: "pb-palette__divider"
|
|
4518
|
+
}, Kr = { class: "pb-palette__group" }, qr = { class: "pb-palette__label" }, Jr = ["title", "onPointerdown"], Yr = {
|
|
4519
|
+
key: 0,
|
|
4520
|
+
class: "pb-palette__divider"
|
|
4521
|
+
}, Xr = { class: "pb-palette__group" }, Zr = { class: "pb-palette__label" }, Qr = [
|
|
4500
4522
|
"disabled",
|
|
4501
4523
|
"title",
|
|
4502
4524
|
"onPointerdown"
|
|
4503
|
-
],
|
|
4525
|
+
], $r = {
|
|
4504
4526
|
key: 0,
|
|
4505
4527
|
class: "pb-palette__field-required",
|
|
4506
4528
|
"aria-hidden": "true"
|
|
4507
|
-
},
|
|
4529
|
+
}, ei = /* @__PURE__ */ Q(/* @__PURE__ */ l({
|
|
4508
4530
|
name: "BuilderCanvas",
|
|
4509
4531
|
__name: "BuilderCanvas",
|
|
4510
4532
|
setup(n) {
|
|
4511
|
-
let o = u(Rt), s = u(zt), l = Yn(), d = nn(s), { t: f } =
|
|
4533
|
+
let o = u(Rt), s = u(zt), l = Yn(), d = nn(s), { t: f } = P(), p = t(() => Object.entries(d.value).filter(([e, t]) => t.builder && ue(e, s?.value)).map(([e, t]) => ({
|
|
4512
4534
|
type: e,
|
|
4513
4535
|
label: f(t.builder.label.key, void 0, t.builder.label.fallback),
|
|
4514
4536
|
icon: t.builder.icon ?? "circle-alert",
|
|
4515
|
-
group: t.builder.group ?? "element"
|
|
4537
|
+
group: t.builder.group ?? "element",
|
|
4538
|
+
hasValue: !!t.value
|
|
4516
4539
|
})));
|
|
4517
4540
|
function h(e) {
|
|
4518
4541
|
let t = l.payload.value;
|
|
@@ -4543,12 +4566,12 @@ var Xn = [
|
|
|
4543
4566
|
bound: y.value.has(e.name),
|
|
4544
4567
|
icon: _[e.valueType] ?? "circle-alert",
|
|
4545
4568
|
label: e.label ?? e.name
|
|
4546
|
-
}))), S = t(() => s?.value?.hideElementPicker !== !0);
|
|
4547
|
-
function
|
|
4569
|
+
}))), S = t(() => s?.value?.hideElementPicker !== !0), C = t(() => p.value.filter((e) => e.group === "container")), w = t(() => p.value.filter((e) => e.group === "element" && e.hasValue)), T = t(() => p.value.filter((e) => e.group === "element" && !e.hasValue));
|
|
4570
|
+
function D(e) {
|
|
4548
4571
|
let t = l.payload.value;
|
|
4549
4572
|
return !!(t && t.kind === "new" && t.bind?.name === e);
|
|
4550
4573
|
}
|
|
4551
|
-
function
|
|
4574
|
+
function k(e, t) {
|
|
4552
4575
|
t.bound || !t.elementType || l.onHandlePointerDown(e, {
|
|
4553
4576
|
kind: "new",
|
|
4554
4577
|
type: t.elementType,
|
|
@@ -4559,55 +4582,64 @@ var Xn = [
|
|
|
4559
4582
|
}
|
|
4560
4583
|
});
|
|
4561
4584
|
}
|
|
4562
|
-
function
|
|
4585
|
+
function A() {
|
|
4563
4586
|
o.select([]);
|
|
4564
4587
|
}
|
|
4565
|
-
return (t, n) => (v(), i("div",
|
|
4566
|
-
|
|
4588
|
+
return (t, n) => (v(), i("div", Ir, [a("div", Lr, [
|
|
4589
|
+
C.value.length > 0 ? (v(), i("div", Rr, [a("span", zr, E(O(f)("coar.pageBuilder.palette.containers", void 0, "Containers")), 1), (v(!0), i(e, null, x(C.value, (e) => (v(), i("button", {
|
|
4567
4590
|
key: e.type,
|
|
4568
4591
|
type: "button",
|
|
4569
4592
|
class: m(["pb-palette__card pb-palette__card--container", { "pb-palette__card--dragging": h(e.type) }]),
|
|
4570
4593
|
title: O(f)("coar.pageBuilder.palette.dragToAdd", { label: e.label }, "Drag to add {label}"),
|
|
4571
4594
|
onPointerdown: (t) => g(t, e.type)
|
|
4572
|
-
}, [c(O(
|
|
4595
|
+
}, [c(O(B), {
|
|
4573
4596
|
name: e.icon,
|
|
4574
4597
|
size: "s"
|
|
4575
|
-
}, null, 8, ["name"]), a("span", null, E(e.label), 1)], 42,
|
|
4576
|
-
S.value ? (v(), i("div",
|
|
4577
|
-
S.value ? (v(), i("div", Rr, [a("span", zr, E(O(f)("coar.pageBuilder.palette.elements", void 0, "Elements")), 1), (v(!0), i(e, null, x(p.value.filter((e) => e.group === "element"), (e) => (v(), i("button", {
|
|
4598
|
+
}, null, 8, ["name"]), a("span", null, E(e.label), 1)], 42, Br))), 128))])) : r("", !0),
|
|
4599
|
+
S.value && w.value.length > 0 ? (v(), i(e, { key: 1 }, [C.value.length > 0 ? (v(), i("div", Vr)) : r("", !0), a("div", Hr, [a("span", Ur, E(O(f)("coar.pageBuilder.palette.inputs", void 0, "Inputs")), 1), (v(!0), i(e, null, x(w.value, (e) => (v(), i("button", {
|
|
4578
4600
|
key: e.type,
|
|
4579
4601
|
type: "button",
|
|
4580
4602
|
class: m(["pb-palette__card pb-palette__card--element", { "pb-palette__card--dragging": h(e.type) }]),
|
|
4581
4603
|
title: O(f)("coar.pageBuilder.palette.dragToAdd", { label: e.label }, "Drag to add {label}"),
|
|
4582
4604
|
onPointerdown: (t) => g(t, e.type)
|
|
4583
|
-
}, [c(O(
|
|
4605
|
+
}, [c(O(B), {
|
|
4584
4606
|
name: e.icon,
|
|
4585
4607
|
size: "s"
|
|
4586
|
-
}, null, 8, ["name"]), a("span", null, E(e.label), 1)], 42,
|
|
4587
|
-
|
|
4608
|
+
}, null, 8, ["name"]), a("span", null, E(e.label), 1)], 42, Wr))), 128))])], 64)) : r("", !0),
|
|
4609
|
+
T.value.length > 0 ? (v(), i(e, { key: 2 }, [C.value.length > 0 || S.value && w.value.length > 0 ? (v(), i("div", Gr)) : r("", !0), a("div", Kr, [a("span", qr, E(O(f)("coar.pageBuilder.palette.elements", void 0, "Elements")), 1), (v(!0), i(e, null, x(T.value, (e) => (v(), i("button", {
|
|
4610
|
+
key: e.type,
|
|
4611
|
+
type: "button",
|
|
4612
|
+
class: m(["pb-palette__card pb-palette__card--element", { "pb-palette__card--dragging": h(e.type) }]),
|
|
4613
|
+
title: O(f)("coar.pageBuilder.palette.dragToAdd", { label: e.label }, "Drag to add {label}"),
|
|
4614
|
+
onPointerdown: (t) => g(t, e.type)
|
|
4615
|
+
}, [c(O(B), {
|
|
4616
|
+
name: e.icon,
|
|
4617
|
+
size: "s"
|
|
4618
|
+
}, null, 8, ["name"]), a("span", null, E(e.label), 1)], 42, Jr))), 128))])], 64)) : r("", !0),
|
|
4619
|
+
b.value.length > 0 ? (v(), i(e, { key: 3 }, [C.value.length > 0 || T.value.length > 0 || S.value && w.value.length > 0 ? (v(), i("div", Yr)) : r("", !0), a("div", Xr, [a("span", Zr, E(O(f)("coar.pageBuilder.palette.fields", void 0, "Fields")), 1), (v(!0), i(e, null, x(b.value, (e) => (v(), i("button", {
|
|
4588
4620
|
key: e.field.name,
|
|
4589
4621
|
type: "button",
|
|
4590
|
-
class: m(["pb-palette__card pb-palette__card--field", { "pb-palette__card--dragging":
|
|
4622
|
+
class: m(["pb-palette__card pb-palette__card--field", { "pb-palette__card--dragging": D(e.field.name) }]),
|
|
4591
4623
|
disabled: e.bound || !e.elementType,
|
|
4592
4624
|
title: e.bound ? O(f)("coar.pageBuilder.palette.fieldBound", void 0, "Already on the page") : e.elementType ? O(f)("coar.pageBuilder.palette.dragToAdd", { label: e.label }, "Drag to add {label}") : O(f)("coar.pageBuilder.palette.fieldNoElement", void 0, "No compatible element available"),
|
|
4593
|
-
onPointerdown: (t) =>
|
|
4625
|
+
onPointerdown: (t) => k(t, e)
|
|
4594
4626
|
}, [
|
|
4595
|
-
c(O(
|
|
4627
|
+
c(O(B), {
|
|
4596
4628
|
name: e.icon,
|
|
4597
4629
|
size: "s"
|
|
4598
4630
|
}, null, 8, ["name"]),
|
|
4599
4631
|
a("span", null, E(e.label), 1),
|
|
4600
|
-
e.field.required ? (v(), i("span",
|
|
4601
|
-
], 42,
|
|
4632
|
+
e.field.required ? (v(), i("span", $r, "*")) : r("", !0)
|
|
4633
|
+
], 42, Qr))), 128))])], 64)) : r("", !0)
|
|
4602
4634
|
]), a("div", {
|
|
4603
4635
|
class: m(["pb-canvas", { "pb-canvas--dragging": O(l).isDragging.value }]),
|
|
4604
|
-
onClick:
|
|
4605
|
-
}, [c(
|
|
4636
|
+
onClick: N(A, ["self"])
|
|
4637
|
+
}, [c(Fr, {
|
|
4606
4638
|
node: O(o).schema.value,
|
|
4607
4639
|
path: []
|
|
4608
4640
|
}, null, 8, ["node"])], 2)]));
|
|
4609
4641
|
}
|
|
4610
|
-
}), [["__scopeId", "data-v-
|
|
4642
|
+
}), [["__scopeId", "data-v-8a414058"]]), ti = /* @__PURE__ */ l({
|
|
4611
4643
|
__name: "StyleProps",
|
|
4612
4644
|
props: {
|
|
4613
4645
|
node: {},
|
|
@@ -4615,7 +4647,7 @@ var Xn = [
|
|
|
4615
4647
|
container: { type: Boolean }
|
|
4616
4648
|
},
|
|
4617
4649
|
setup(a) {
|
|
4618
|
-
let o = a, { t: s } =
|
|
4650
|
+
let o = a, { t: s } = P(), l = t(() => o.node.style ?? {}), u = t(() => l.value.size ?? (l.value.width ? "fixed" : "")), d = t(() => u.value === "fixed"), f = t(() => [
|
|
4619
4651
|
{
|
|
4620
4652
|
value: "",
|
|
4621
4653
|
label: s("coar.pageBuilder.props.inherit", void 0, "— inherit")
|
|
@@ -4689,76 +4721,76 @@ var Xn = [
|
|
|
4689
4721
|
});
|
|
4690
4722
|
}
|
|
4691
4723
|
return (t, a) => (v(), i(e, null, [
|
|
4692
|
-
o.container ? (v(), n(O(
|
|
4724
|
+
o.container ? (v(), n(O(z), {
|
|
4693
4725
|
key: 0,
|
|
4694
4726
|
label: O(s)("coar.pageBuilder.props.gap", void 0, "Gap")
|
|
4695
4727
|
}, {
|
|
4696
|
-
default:
|
|
4728
|
+
default: j(() => [c(O(J), {
|
|
4697
4729
|
"model-value": l.value.gap ?? "",
|
|
4698
4730
|
placeholder: "e.g. 8px",
|
|
4699
4731
|
"onUpdate:modelValue": a[0] ||= (e) => o.patchStyle({ gap: e || void 0 })
|
|
4700
4732
|
}, null, 8, ["model-value"])]),
|
|
4701
4733
|
_: 1
|
|
4702
4734
|
}, 8, ["label"])) : r("", !0),
|
|
4703
|
-
o.container ? (v(), n(O(
|
|
4735
|
+
o.container ? (v(), n(O(z), {
|
|
4704
4736
|
key: 1,
|
|
4705
4737
|
label: O(s)("coar.pageBuilder.props.justify", void 0, "Justify (main axis)")
|
|
4706
4738
|
}, {
|
|
4707
|
-
default:
|
|
4739
|
+
default: j(() => [c(O(q), {
|
|
4708
4740
|
"model-value": l.value.justify ?? "",
|
|
4709
4741
|
options: f.value,
|
|
4710
4742
|
"onUpdate:modelValue": a[1] ||= (e) => o.patchStyle({ justify: e || void 0 })
|
|
4711
4743
|
}, null, 8, ["model-value", "options"])]),
|
|
4712
4744
|
_: 1
|
|
4713
4745
|
}, 8, ["label"])) : r("", !0),
|
|
4714
|
-
o.container ? (v(), n(O(
|
|
4746
|
+
o.container ? (v(), n(O(z), {
|
|
4715
4747
|
key: 2,
|
|
4716
4748
|
label: O(s)("coar.pageBuilder.props.alignItems", void 0, "Align items (cross axis)")
|
|
4717
4749
|
}, {
|
|
4718
|
-
default:
|
|
4750
|
+
default: j(() => [c(O(q), {
|
|
4719
4751
|
"model-value": l.value.align ?? "",
|
|
4720
4752
|
options: p.value,
|
|
4721
4753
|
"onUpdate:modelValue": a[2] ||= (e) => o.patchStyle({ align: e || void 0 })
|
|
4722
4754
|
}, null, 8, ["model-value", "options"])]),
|
|
4723
4755
|
_: 1
|
|
4724
4756
|
}, 8, ["label"])) : r("", !0),
|
|
4725
|
-
c(O(
|
|
4726
|
-
default:
|
|
4757
|
+
c(O(z), { label: O(s)("coar.pageBuilder.props.alignSelf", void 0, "Align self") }, {
|
|
4758
|
+
default: j(() => [c(O(q), {
|
|
4727
4759
|
"model-value": l.value.alignSelf ?? "",
|
|
4728
4760
|
options: p.value,
|
|
4729
4761
|
"onUpdate:modelValue": a[3] ||= (e) => o.patchStyle({ alignSelf: e || void 0 })
|
|
4730
4762
|
}, null, 8, ["model-value", "options"])]),
|
|
4731
4763
|
_: 1
|
|
4732
4764
|
}, 8, ["label"]),
|
|
4733
|
-
c(O(
|
|
4734
|
-
default:
|
|
4765
|
+
c(O(z), { label: O(s)("coar.pageBuilder.props.size", void 0, "Size") }, {
|
|
4766
|
+
default: j(() => [c(O(q), {
|
|
4735
4767
|
"model-value": u.value,
|
|
4736
4768
|
options: m.value,
|
|
4737
4769
|
"onUpdate:modelValue": a[4] ||= (e) => h(e)
|
|
4738
4770
|
}, null, 8, ["model-value", "options"])]),
|
|
4739
4771
|
_: 1
|
|
4740
4772
|
}, 8, ["label"]),
|
|
4741
|
-
d.value ? (v(), n(O(
|
|
4773
|
+
d.value ? (v(), n(O(z), {
|
|
4742
4774
|
key: 3,
|
|
4743
4775
|
label: O(s)("coar.pageBuilder.props.width", void 0, "Width")
|
|
4744
4776
|
}, {
|
|
4745
|
-
default:
|
|
4777
|
+
default: j(() => [c(O(J), {
|
|
4746
4778
|
"model-value": l.value.width ?? "",
|
|
4747
4779
|
placeholder: "e.g. 380px, 50%",
|
|
4748
4780
|
"onUpdate:modelValue": a[5] ||= (e) => o.patchStyle({ width: e || void 0 })
|
|
4749
4781
|
}, null, 8, ["model-value"])]),
|
|
4750
4782
|
_: 1
|
|
4751
4783
|
}, 8, ["label"])) : r("", !0),
|
|
4752
|
-
c(O(
|
|
4753
|
-
default:
|
|
4784
|
+
c(O(z), { label: O(s)("coar.pageBuilder.props.minHeight", void 0, "Min height") }, {
|
|
4785
|
+
default: j(() => [c(O(J), {
|
|
4754
4786
|
"model-value": l.value.minHeight ?? "",
|
|
4755
4787
|
placeholder: "e.g. 100vh, 400px",
|
|
4756
4788
|
"onUpdate:modelValue": a[6] ||= (e) => o.patchStyle({ minHeight: e || void 0 })
|
|
4757
4789
|
}, null, 8, ["model-value"])]),
|
|
4758
4790
|
_: 1
|
|
4759
4791
|
}, 8, ["label"]),
|
|
4760
|
-
c(O(
|
|
4761
|
-
default:
|
|
4792
|
+
c(O(z), { label: O(s)("coar.pageBuilder.props.padding", void 0, "Padding") }, {
|
|
4793
|
+
default: j(() => [c(O(J), {
|
|
4762
4794
|
"model-value": l.value.padding ?? "",
|
|
4763
4795
|
placeholder: "e.g. 16px",
|
|
4764
4796
|
"onUpdate:modelValue": a[7] ||= (e) => o.patchStyle({ padding: e || void 0 })
|
|
@@ -4767,64 +4799,64 @@ var Xn = [
|
|
|
4767
4799
|
}, 8, ["label"])
|
|
4768
4800
|
], 64));
|
|
4769
4801
|
}
|
|
4770
|
-
}),
|
|
4802
|
+
}), ni = { class: "pb-props" }, ri = { class: "pb-props__header" }, ii = { class: "pb-props__title" }, ai = {
|
|
4771
4803
|
key: 0,
|
|
4772
4804
|
class: "pb-props__empty"
|
|
4773
|
-
},
|
|
4805
|
+
}, oi = { class: "pb-props__empty-title" }, si = { class: "pb-props__empty-hint" }, ci = {
|
|
4774
4806
|
key: 1,
|
|
4775
4807
|
class: "pb-props__body"
|
|
4776
|
-
},
|
|
4808
|
+
}, li = {
|
|
4777
4809
|
key: 0,
|
|
4778
4810
|
class: "pb-props__issues"
|
|
4779
|
-
},
|
|
4811
|
+
}, ui = {
|
|
4780
4812
|
key: 1,
|
|
4781
4813
|
class: "pb-props__section"
|
|
4782
|
-
},
|
|
4814
|
+
}, di = { class: "pb-props__section-title" }, fi = {
|
|
4783
4815
|
key: 2,
|
|
4784
4816
|
class: "pb-props__section"
|
|
4785
|
-
},
|
|
4817
|
+
}, pi = { class: "pb-props__section-title" }, mi = { class: "pb-props__section-title" }, hi = { class: "pb-props__section-title" }, gi = {
|
|
4786
4818
|
key: 0,
|
|
4787
4819
|
class: "pb-props__hint"
|
|
4788
|
-
},
|
|
4820
|
+
}, _i = {
|
|
4789
4821
|
key: 1,
|
|
4790
4822
|
class: "pb-props__hint"
|
|
4791
|
-
},
|
|
4823
|
+
}, vi = { class: "pb-props__section-title" }, yi = /* @__PURE__ */ Q(/* @__PURE__ */ l({
|
|
4792
4824
|
name: "BuilderPropsPanel",
|
|
4793
4825
|
__name: "BuilderPropsPanel",
|
|
4794
4826
|
setup(o) {
|
|
4795
|
-
let { t: s } =
|
|
4827
|
+
let { t: s } = P(), l = u(Rt), d = u(zt), f = u(Bt), p = nn(d), h = t(() => l.selectedNode.value), g = t(() => l.selectedPath.value ?? []), _ = t(() => h.value ? p.value[h.value.type] : void 0), y = t(() => h.value && _.value?.value ? h.value : null), b = t(() => _.value?.builder?.inspector), S = t(() => _.value?.builder?.defaultValueInput), C = t(() => {
|
|
4796
4828
|
let e = _.value?.builder;
|
|
4797
4829
|
if (!e) return "";
|
|
4798
4830
|
let t = e.inspectorTitle ?? e.label;
|
|
4799
4831
|
return s(t.key, void 0, t.fallback);
|
|
4800
|
-
}), T = t(() => h.value?.type === "page" || _.value?.container === !0), D = t(() => h.value?.type === "page" ? h.value : null),
|
|
4801
|
-
function
|
|
4832
|
+
}), T = t(() => h.value?.type === "page" || _.value?.container === !0), D = t(() => h.value?.type === "page" ? h.value : null), k = t(() => h.value ? f?.byNodeId.value.get(h.value.id) ?? [] : []);
|
|
4833
|
+
function A(e) {
|
|
4802
4834
|
g.value && l.patch(g.value, e);
|
|
4803
4835
|
}
|
|
4804
|
-
function
|
|
4805
|
-
h.value &&
|
|
4836
|
+
function ee(e) {
|
|
4837
|
+
h.value && A({ style: {
|
|
4806
4838
|
...h.value.style ?? {},
|
|
4807
4839
|
...e
|
|
4808
4840
|
} });
|
|
4809
4841
|
}
|
|
4810
|
-
function
|
|
4842
|
+
function te(e) {
|
|
4811
4843
|
let t = { ...y.value?.validation };
|
|
4812
|
-
e ? t.required = !0 : delete t.required,
|
|
4844
|
+
e ? t.required = !0 : delete t.required, A({ validation: Object.keys(t).length > 0 ? t : void 0 });
|
|
4813
4845
|
}
|
|
4814
|
-
let
|
|
4815
|
-
if (!
|
|
4816
|
-
let e = Dn(_.value,
|
|
4846
|
+
let M = t(() => d?.value?.fields), N = t(() => (M.value?.length ?? 0) > 0), F = t(() => d?.value?.allowCustomFields === !0), I = t(() => {
|
|
4847
|
+
if (!M.value || !_.value) return [];
|
|
4848
|
+
let e = Dn(_.value, M.value).map((e) => ({
|
|
4817
4849
|
value: e.name,
|
|
4818
4850
|
label: e.label ? `${e.label} (${e.name})` : e.name
|
|
4819
4851
|
})), t = y.value?.name;
|
|
4820
|
-
return t && !
|
|
4852
|
+
return t && !M.value.some((e) => e.name === t) && e.unshift({
|
|
4821
4853
|
value: t,
|
|
4822
4854
|
label: `${t} (custom)`
|
|
4823
4855
|
}), e;
|
|
4824
|
-
}),
|
|
4856
|
+
}), R = t(() => {
|
|
4825
4857
|
let e = h.value;
|
|
4826
4858
|
if (!e || !_.value?.value) return [];
|
|
4827
|
-
let t =
|
|
4859
|
+
let t = M.value?.find((e) => e.name === y.value?.name), n;
|
|
4828
4860
|
if (t) n = On(p.value, t.valueType);
|
|
4829
4861
|
else {
|
|
4830
4862
|
let e = _.value.value.types;
|
|
@@ -4838,18 +4870,18 @@ var Xn = [
|
|
|
4838
4870
|
let t = p.value[e].builder;
|
|
4839
4871
|
return {
|
|
4840
4872
|
value: e,
|
|
4841
|
-
label:
|
|
4873
|
+
label: V(t.label.key, t.label.fallback)
|
|
4842
4874
|
};
|
|
4843
4875
|
});
|
|
4844
4876
|
});
|
|
4845
|
-
function
|
|
4877
|
+
function V(e, t) {
|
|
4846
4878
|
return s(e, void 0, t);
|
|
4847
4879
|
}
|
|
4848
|
-
function
|
|
4880
|
+
function H(e) {
|
|
4849
4881
|
!e || !h.value || e === h.value.type || l.convertTo(g.value, e);
|
|
4850
4882
|
}
|
|
4851
|
-
let
|
|
4852
|
-
function
|
|
4883
|
+
let U = t(() => !!h.value && h.value.type !== "page"), W = t(() => h.value?.visibleWhen), ne = t(() => Array.isArray(W.value?.in));
|
|
4884
|
+
function re(e) {
|
|
4853
4885
|
let t = null, n = (r) => {
|
|
4854
4886
|
if (!t) {
|
|
4855
4887
|
if ((r.type === "page" ? void 0 : p.value[r.type])?.value && r.name === e) {
|
|
@@ -4861,16 +4893,16 @@ var Xn = [
|
|
|
4861
4893
|
};
|
|
4862
4894
|
return n(l.schema.value), t;
|
|
4863
4895
|
}
|
|
4864
|
-
function
|
|
4896
|
+
function G(e) {
|
|
4865
4897
|
if (!e) return "string";
|
|
4866
|
-
let t =
|
|
4898
|
+
let t = M.value?.find((t) => t.name === e.name)?.valueType;
|
|
4867
4899
|
if (t === "boolean") return "boolean";
|
|
4868
4900
|
if (t === "number") return "number";
|
|
4869
4901
|
if (t) return "string";
|
|
4870
4902
|
let n = p.value[e.type]?.value?.types;
|
|
4871
4903
|
return n?.length === 1 && n[0] === "boolean" ? "boolean" : n?.length === 1 && n[0] === "number" ? "number" : "string";
|
|
4872
4904
|
}
|
|
4873
|
-
let
|
|
4905
|
+
let K = t(() => {
|
|
4874
4906
|
let e = [], t = (n) => {
|
|
4875
4907
|
let r = n.type === "page" ? void 0 : p.value[n.type], i = n.name;
|
|
4876
4908
|
r?.value && typeof i == "string" && i && n.id !== h.value?.id && !r.value.types?.includes("string[]") && !e.some((e) => e.value === i) && e.push({
|
|
@@ -4879,20 +4911,20 @@ var Xn = [
|
|
|
4879
4911
|
}), "children" in n && Array.isArray(n.children) && n.children.forEach(t);
|
|
4880
4912
|
};
|
|
4881
4913
|
t(l.schema.value);
|
|
4882
|
-
let n =
|
|
4914
|
+
let n = W.value?.field;
|
|
4883
4915
|
return n && !e.some((e) => e.value === n) && e.push({
|
|
4884
4916
|
value: n,
|
|
4885
|
-
label:
|
|
4917
|
+
label: re(n) ? n : `${n} (?)`
|
|
4886
4918
|
}), e;
|
|
4887
|
-
}),
|
|
4888
|
-
let e =
|
|
4919
|
+
}), ie = t(() => W.value?.field ? re(W.value.field) : null), ae = t(() => {
|
|
4920
|
+
let e = ie.value;
|
|
4889
4921
|
if (!e) return !1;
|
|
4890
|
-
let t =
|
|
4922
|
+
let t = M.value?.find((t) => t.name === e.name)?.valueType;
|
|
4891
4923
|
return t ? t === "string[]" : !!p.value[e.type]?.value?.types?.includes("string[]");
|
|
4892
4924
|
}), oe = t(() => {
|
|
4893
|
-
let e =
|
|
4925
|
+
let e = ie.value;
|
|
4894
4926
|
if (!e) return null;
|
|
4895
|
-
if (
|
|
4927
|
+
if (G(e) === "boolean") return [{
|
|
4896
4928
|
value: "true",
|
|
4897
4929
|
label: s("coar.pageBuilder.props.checked", void 0, "checked")
|
|
4898
4930
|
}, {
|
|
@@ -4905,11 +4937,11 @@ var Xn = [
|
|
|
4905
4937
|
label: e.label || e.value
|
|
4906
4938
|
})) : null;
|
|
4907
4939
|
}), se = t(() => {
|
|
4908
|
-
let e =
|
|
4940
|
+
let e = W.value?.equals;
|
|
4909
4941
|
return typeof e == "boolean" ? e ? "true" : "false" : e == null ? "" : String(e);
|
|
4910
4942
|
});
|
|
4911
4943
|
function ce(e, t) {
|
|
4912
|
-
let n =
|
|
4944
|
+
let n = G(t);
|
|
4913
4945
|
if (n === "boolean") return e === "true";
|
|
4914
4946
|
if (n === "number") {
|
|
4915
4947
|
let t = Number(e);
|
|
@@ -4919,28 +4951,28 @@ var Xn = [
|
|
|
4919
4951
|
}
|
|
4920
4952
|
function le(e) {
|
|
4921
4953
|
if (!e) {
|
|
4922
|
-
|
|
4954
|
+
A({ visibleWhen: void 0 });
|
|
4923
4955
|
return;
|
|
4924
4956
|
}
|
|
4925
|
-
let t =
|
|
4926
|
-
|
|
4957
|
+
let t = re(e);
|
|
4958
|
+
A({ visibleWhen: {
|
|
4927
4959
|
field: e,
|
|
4928
|
-
equals:
|
|
4960
|
+
equals: G(t) === "boolean" ? !0 : (t?.props)?.options?.[0]?.value ?? ""
|
|
4929
4961
|
} });
|
|
4930
4962
|
}
|
|
4931
4963
|
function Y(e) {
|
|
4932
|
-
let t =
|
|
4933
|
-
t &&
|
|
4964
|
+
let t = W.value;
|
|
4965
|
+
t && A({ visibleWhen: {
|
|
4934
4966
|
field: t.field,
|
|
4935
|
-
equals: ce(e,
|
|
4967
|
+
equals: ce(e, ie.value)
|
|
4936
4968
|
} });
|
|
4937
4969
|
}
|
|
4938
4970
|
function X(e) {
|
|
4939
4971
|
if (!e) {
|
|
4940
|
-
|
|
4972
|
+
A({ name: void 0 });
|
|
4941
4973
|
return;
|
|
4942
4974
|
}
|
|
4943
|
-
let t = { name: e }, n =
|
|
4975
|
+
let t = { name: e }, n = M.value?.find((t) => t.name === e);
|
|
4944
4976
|
if (n) {
|
|
4945
4977
|
let e = _.value?.builder?.defaults(), r = y.value?.props?.label;
|
|
4946
4978
|
n.label && e && "label" in e && (r === void 0 || r === e.label) && (t.props = { label: n.label }), n.required && !y.value?.validation?.required && (t.validation = {
|
|
@@ -4948,31 +4980,31 @@ var Xn = [
|
|
|
4948
4980
|
required: !0
|
|
4949
4981
|
});
|
|
4950
4982
|
}
|
|
4951
|
-
|
|
4983
|
+
A(t);
|
|
4952
4984
|
}
|
|
4953
|
-
return (t, o) => (v(), i("aside",
|
|
4985
|
+
return (t, o) => (v(), i("aside", ni, [a("header", ri, [c(O(B), {
|
|
4954
4986
|
name: "settings",
|
|
4955
4987
|
size: "s"
|
|
4956
|
-
}), a("span",
|
|
4957
|
-
|
|
4988
|
+
}), a("span", ii, E(O(s)("coar.pageBuilder.props.panelTitle", void 0, "Properties")), 1)]), h.value ? (v(), i("div", ci, [
|
|
4989
|
+
k.value.length > 0 ? (v(), i("ul", li, [(v(!0), i(e, null, x(k.value, (e, t) => (v(), i("li", {
|
|
4958
4990
|
key: t,
|
|
4959
4991
|
class: m(["pb-props__issue", `pb-props__issue--${e.severity}`])
|
|
4960
|
-
}, [c(O(
|
|
4992
|
+
}, [c(O(B), {
|
|
4961
4993
|
name: e.severity === "error" ? "circle-alert" : "triangle-alert",
|
|
4962
4994
|
size: "s"
|
|
4963
4995
|
}, null, 8, ["name"]), a("span", null, E(e.message), 1)], 2))), 128))])) : r("", !0),
|
|
4964
|
-
D.value ? (v(), i("section",
|
|
4996
|
+
D.value ? (v(), i("section", ui, [a("h4", di, E(O(s)("coar.pageBuilder.props.section.page", void 0, "Page")), 1), c(O(L), {
|
|
4965
4997
|
"model-value": !!D.value.enterSubmits,
|
|
4966
4998
|
label: O(s)("coar.pageBuilder.props.enterSubmits", void 0, "Enter submits (fires the default button)"),
|
|
4967
|
-
"onUpdate:modelValue": o[0] ||= (e) =>
|
|
4999
|
+
"onUpdate:modelValue": o[0] ||= (e) => A({ enterSubmits: e || void 0 })
|
|
4968
5000
|
}, null, 8, ["model-value", "label"])])) : r("", !0),
|
|
4969
|
-
y.value ? (v(), i("section",
|
|
4970
|
-
a("h4",
|
|
4971
|
-
c(O(
|
|
4972
|
-
default:
|
|
5001
|
+
y.value ? (v(), i("section", fi, [
|
|
5002
|
+
a("h4", pi, E(O(s)("coar.pageBuilder.props.section.field", void 0, "Field")), 1),
|
|
5003
|
+
c(O(z), { label: O(s)("coar.pageBuilder.props.fieldName", void 0, "Field name") }, {
|
|
5004
|
+
default: j(() => [N.value ? (v(), n(O(q), {
|
|
4973
5005
|
key: 0,
|
|
4974
5006
|
"model-value": y.value.name ?? null,
|
|
4975
|
-
options:
|
|
5007
|
+
options: I.value,
|
|
4976
5008
|
clearable: "",
|
|
4977
5009
|
placeholder: O(s)("coar.pageBuilder.props.fieldUnbound", void 0, "Not bound"),
|
|
4978
5010
|
"onUpdate:modelValue": o[1] ||= (e) => X(e)
|
|
@@ -4983,46 +5015,46 @@ var Xn = [
|
|
|
4983
5015
|
])) : (v(), n(O(J), {
|
|
4984
5016
|
key: 1,
|
|
4985
5017
|
"model-value": y.value.name ?? "",
|
|
4986
|
-
"onUpdate:modelValue": o[2] ||= (e) =>
|
|
5018
|
+
"onUpdate:modelValue": o[2] ||= (e) => A({ name: e })
|
|
4987
5019
|
}, null, 8, ["model-value"]))]),
|
|
4988
5020
|
_: 1
|
|
4989
5021
|
}, 8, ["label"]),
|
|
4990
|
-
|
|
5022
|
+
N.value && F.value ? (v(), n(O(z), {
|
|
4991
5023
|
key: 0,
|
|
4992
5024
|
label: O(s)("coar.pageBuilder.props.customFieldName", void 0, "Custom name")
|
|
4993
5025
|
}, {
|
|
4994
|
-
default:
|
|
5026
|
+
default: j(() => [c(O(J), {
|
|
4995
5027
|
"model-value": y.value.name ?? "",
|
|
4996
|
-
"onUpdate:modelValue": o[3] ||= (e) =>
|
|
5028
|
+
"onUpdate:modelValue": o[3] ||= (e) => A({ name: e })
|
|
4997
5029
|
}, null, 8, ["model-value"])]),
|
|
4998
5030
|
_: 1
|
|
4999
5031
|
}, 8, ["label"])) : r("", !0),
|
|
5000
|
-
|
|
5032
|
+
R.value.length > 0 ? (v(), n(O(z), {
|
|
5001
5033
|
key: 1,
|
|
5002
5034
|
label: O(s)("coar.pageBuilder.props.elementType", void 0, "Element")
|
|
5003
5035
|
}, {
|
|
5004
|
-
default:
|
|
5036
|
+
default: j(() => [c(O(q), {
|
|
5005
5037
|
"model-value": h.value.type,
|
|
5006
|
-
options:
|
|
5007
|
-
"onUpdate:modelValue": o[4] ||= (e) =>
|
|
5038
|
+
options: R.value,
|
|
5039
|
+
"onUpdate:modelValue": o[4] ||= (e) => H(e)
|
|
5008
5040
|
}, null, 8, ["model-value", "options"])]),
|
|
5009
5041
|
_: 1
|
|
5010
5042
|
}, 8, ["label"])) : r("", !0),
|
|
5011
|
-
c(O(
|
|
5043
|
+
c(O(L), {
|
|
5012
5044
|
"model-value": !!y.value.validation?.required,
|
|
5013
5045
|
label: O(s)("coar.pageBuilder.props.required", void 0, "Required"),
|
|
5014
|
-
"onUpdate:modelValue":
|
|
5046
|
+
"onUpdate:modelValue": te
|
|
5015
5047
|
}, null, 8, ["model-value", "label"]),
|
|
5016
|
-
c(O(
|
|
5017
|
-
default:
|
|
5048
|
+
c(O(z), { label: O(s)("coar.pageBuilder.props.defaultValue", void 0, "Default value") }, {
|
|
5049
|
+
default: j(() => [S.value ? (v(), n(w(S.value), {
|
|
5018
5050
|
key: 0,
|
|
5019
5051
|
"model-value": y.value.defaultValue,
|
|
5020
5052
|
props: y.value.props,
|
|
5021
|
-
"onUpdate:modelValue": o[5] ||= (e) =>
|
|
5053
|
+
"onUpdate:modelValue": o[5] ||= (e) => A({ defaultValue: e ?? void 0 })
|
|
5022
5054
|
}, null, 8, ["model-value", "props"])) : (v(), n(O(J), {
|
|
5023
5055
|
key: 1,
|
|
5024
5056
|
"model-value": String(y.value.defaultValue ?? ""),
|
|
5025
|
-
"onUpdate:modelValue": o[6] ||= (e) =>
|
|
5057
|
+
"onUpdate:modelValue": o[6] ||= (e) => A({ defaultValue: e || void 0 })
|
|
5026
5058
|
}, null, 8, ["model-value"]))]),
|
|
5027
5059
|
_: 1
|
|
5028
5060
|
}, 8, ["label"])
|
|
@@ -5030,19 +5062,19 @@ var Xn = [
|
|
|
5030
5062
|
b.value ? (v(), i("section", {
|
|
5031
5063
|
key: 3,
|
|
5032
5064
|
class: m(["pb-props__section", { "pb-props__section--separated": !!y.value }])
|
|
5033
|
-
}, [a("h4",
|
|
5065
|
+
}, [a("h4", mi, E(C.value), 1), (v(), n(w(b.value), {
|
|
5034
5066
|
node: h.value,
|
|
5035
|
-
patch:
|
|
5067
|
+
patch: A
|
|
5036
5068
|
}, null, 8, ["node"]))], 2)) : r("", !0),
|
|
5037
|
-
|
|
5069
|
+
U.value ? (v(), i("section", {
|
|
5038
5070
|
key: 4,
|
|
5039
5071
|
class: m(["pb-props__section", { "pb-props__section--separated": !!b.value || !!y.value }])
|
|
5040
5072
|
}, [
|
|
5041
|
-
a("h4",
|
|
5042
|
-
c(O(
|
|
5043
|
-
default:
|
|
5044
|
-
"model-value":
|
|
5045
|
-
options:
|
|
5073
|
+
a("h4", hi, E(O(s)("coar.pageBuilder.props.section.visibility", void 0, "Visibility")), 1),
|
|
5074
|
+
c(O(z), { label: O(s)("coar.pageBuilder.props.visibleWhenField", void 0, "Visible when") }, {
|
|
5075
|
+
default: j(() => [c(O(q), {
|
|
5076
|
+
"model-value": W.value?.field ?? null,
|
|
5077
|
+
options: K.value,
|
|
5046
5078
|
clearable: "",
|
|
5047
5079
|
placeholder: O(s)("coar.pageBuilder.props.alwaysVisible", void 0, "Always visible"),
|
|
5048
5080
|
"onUpdate:modelValue": o[7] ||= (e) => le(e)
|
|
@@ -5053,11 +5085,11 @@ var Xn = [
|
|
|
5053
5085
|
])]),
|
|
5054
5086
|
_: 1
|
|
5055
5087
|
}, 8, ["label"]),
|
|
5056
|
-
|
|
5088
|
+
ne.value ? (v(), i("p", gi, E(O(s)("coar.pageBuilder.props.visibleWhenIn", void 0, "Multi-value condition (in) — edit it in the JSON tab.")), 1)) : W.value && ae.value ? (v(), i("p", _i, E(O(s)("coar.pageBuilder.props.visibleWhenArray", void 0, "\"equals\" cannot match a multi-value field — author this condition in the JSON tab.")), 1)) : W.value ? (v(), n(O(z), {
|
|
5057
5089
|
key: 2,
|
|
5058
5090
|
label: O(s)("coar.pageBuilder.props.visibleWhenEquals", void 0, "equals")
|
|
5059
5091
|
}, {
|
|
5060
|
-
default:
|
|
5092
|
+
default: j(() => [oe.value ? (v(), n(O(q), {
|
|
5061
5093
|
key: 0,
|
|
5062
5094
|
"model-value": se.value,
|
|
5063
5095
|
options: oe.value,
|
|
@@ -5072,28 +5104,28 @@ var Xn = [
|
|
|
5072
5104
|
], 2)) : r("", !0),
|
|
5073
5105
|
_.value?.builder?.hideStyleSection ? r("", !0) : (v(), i("section", {
|
|
5074
5106
|
key: 5,
|
|
5075
|
-
class: m(["pb-props__section", { "pb-props__section--separated": !!b.value || !!y.value || !!D.value ||
|
|
5076
|
-
}, [a("h4",
|
|
5107
|
+
class: m(["pb-props__section", { "pb-props__section--separated": !!b.value || !!y.value || !!D.value || U.value }])
|
|
5108
|
+
}, [a("h4", vi, E(O(s)("coar.pageBuilder.props.section.style", void 0, "Style")), 1), c(ti, {
|
|
5077
5109
|
node: h.value,
|
|
5078
5110
|
container: T.value,
|
|
5079
|
-
"patch-style":
|
|
5111
|
+
"patch-style": ee
|
|
5080
5112
|
}, null, 8, ["node", "container"])], 2))
|
|
5081
|
-
])) : (v(), i("div",
|
|
5082
|
-
c(O(
|
|
5113
|
+
])) : (v(), i("div", ai, [
|
|
5114
|
+
c(O(B), {
|
|
5083
5115
|
name: "settings",
|
|
5084
5116
|
size: "l"
|
|
5085
5117
|
}),
|
|
5086
|
-
a("p",
|
|
5087
|
-
a("p",
|
|
5118
|
+
a("p", oi, E(O(s)("coar.pageBuilder.props.emptyTitle", void 0, "No node selected")), 1),
|
|
5119
|
+
a("p", si, E(O(s)("coar.pageBuilder.props.emptyHint", void 0, "Click a node in the outline or canvas to edit it.")), 1)
|
|
5088
5120
|
]))]));
|
|
5089
5121
|
}
|
|
5090
|
-
}), [["__scopeId", "data-v-3bcb1779"]]),
|
|
5122
|
+
}), [["__scopeId", "data-v-3bcb1779"]]), bi = { class: "pb-builder__pane-header" }, xi = { class: "pb-builder__pane-title" }, Si = ["title"], Ci = { class: "pb-builder__tree-scroll" }, wi = ["title"], Ti = { class: "pb-builder__pane pb-builder__pane--center" }, Ei = ["disabled", "title"], Di = ["disabled", "title"], Oi = { class: "pb-builder__tab-label" }, ki = { class: "pb-builder__tab-label" }, Ai = { class: "pb-builder__preview-pane" }, ji = { class: "pb-builder__preview-toolbar" }, Mi = ["aria-label"], Ni = ["aria-checked", "title"], Pi = ["aria-checked", "title"], Fi = ["aria-checked", "title"], Ii = { class: "pb-builder__preview" }, Li = { class: "pb-builder__tab-label" }, Ri = { class: "pb-builder__json-pane" }, zi = { class: "pb-builder__json-toolbar" }, Bi = { class: "pb-builder__json-hint" }, Vi = {
|
|
5091
5123
|
key: 0,
|
|
5092
5124
|
class: "pb-builder__json-error"
|
|
5093
|
-
},
|
|
5125
|
+
}, Hi = {
|
|
5094
5126
|
key: 1,
|
|
5095
5127
|
class: "pb-builder__json-warning"
|
|
5096
|
-
},
|
|
5128
|
+
}, Ui = ["disabled"], Wi = ["value"], Gi = ["title"], Ki = ["title"], qi = 260, Ji = 180, Yi = 280, Xi = 220, Zi = 360, Qi = 36, $i = /* @__PURE__ */ Q(/* @__PURE__ */ l({
|
|
5097
5129
|
__name: "CoarPageBuilder",
|
|
5098
5130
|
props: /* @__PURE__ */ f({ config: {} }, {
|
|
5099
5131
|
modelValue: { required: !1 },
|
|
@@ -5101,11 +5133,11 @@ var Xn = [
|
|
|
5101
5133
|
}),
|
|
5102
5134
|
emits: ["update:modelValue"],
|
|
5103
5135
|
setup(n) {
|
|
5104
|
-
|
|
5105
|
-
v1af739b7:
|
|
5106
|
-
v18f237ee:
|
|
5136
|
+
k((e) => ({
|
|
5137
|
+
v1af739b7: z.value,
|
|
5138
|
+
v18f237ee: V.value
|
|
5107
5139
|
}));
|
|
5108
|
-
let { t: o } =
|
|
5140
|
+
let { t: o } = P(), l = A(n, "modelValue"), u = n;
|
|
5109
5141
|
function d(e) {
|
|
5110
5142
|
let { schema: t, issues: n } = gn(e, { elements: x.value });
|
|
5111
5143
|
return n.length > 0 && `${n.map((e) => `${e.path}: ${e.message}`).join(" · ")}`, t;
|
|
@@ -5124,37 +5156,37 @@ var Xn = [
|
|
|
5124
5156
|
elements: x,
|
|
5125
5157
|
config: f
|
|
5126
5158
|
});
|
|
5127
|
-
|
|
5159
|
+
ee(S.schema, (e) => {
|
|
5128
5160
|
D(l.value) !== e && (l.value = e);
|
|
5129
|
-
}, { immediate: !0 }),
|
|
5161
|
+
}, { immediate: !0 }), ee(l, (e) => {
|
|
5130
5162
|
if (e == null) return;
|
|
5131
5163
|
let t = D(e);
|
|
5132
5164
|
t !== D(S.schema.value) && S.replaceSchema(d(t));
|
|
5133
5165
|
});
|
|
5134
5166
|
let C = jn(S.schema, f);
|
|
5135
5167
|
Jn(S), y(Rt, S), y(zt, f), y(Bt, C);
|
|
5136
|
-
let w = b("editor"), T = b("full"),
|
|
5168
|
+
let w = b("editor"), T = b("full"), te = {
|
|
5137
5169
|
tablet: 768,
|
|
5138
5170
|
mobile: 375
|
|
5139
|
-
},
|
|
5140
|
-
maxWidth: `${
|
|
5171
|
+
}, M = t(() => T.value === "full" ? {} : {
|
|
5172
|
+
maxWidth: `${te[T.value]}px`,
|
|
5141
5173
|
width: "100%",
|
|
5142
5174
|
margin: "0 auto"
|
|
5143
|
-
}),
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
}),
|
|
5147
|
-
|
|
5175
|
+
}), N = b(qi), F = b(Yi), I = b(!1), L = b(!1), R = b(null), z = b(`${qi}px`), V = b(`${Yi}px`);
|
|
5176
|
+
ee([I, N], () => {
|
|
5177
|
+
z.value = I.value ? `${Qi}px` : `${N.value}px`;
|
|
5178
|
+
}), ee([L, F], () => {
|
|
5179
|
+
V.value = L.value ? `${Qi}px` : `${F.value}px`;
|
|
5148
5180
|
});
|
|
5149
|
-
let
|
|
5150
|
-
function
|
|
5181
|
+
let H = b(null);
|
|
5182
|
+
function U(e) {
|
|
5151
5183
|
let t = e;
|
|
5152
5184
|
if (!t) return !1;
|
|
5153
5185
|
let n = t.tagName;
|
|
5154
5186
|
return n === "INPUT" || n === "TEXTAREA" || n === "SELECT" || t.isContentEditable;
|
|
5155
5187
|
}
|
|
5156
|
-
function
|
|
5157
|
-
if (!
|
|
5188
|
+
function W(e) {
|
|
5189
|
+
if (!H.value?.contains(document.activeElement) || U(e.target)) return;
|
|
5158
5190
|
let t = e.ctrlKey || e.metaKey;
|
|
5159
5191
|
if (t && (e.key === "z" || e.key === "Z")) {
|
|
5160
5192
|
e.preventDefault(), e.shiftKey ? S.redo() : S.undo();
|
|
@@ -5167,38 +5199,38 @@ var Xn = [
|
|
|
5167
5199
|
if (e.key !== "Delete" && e.key !== "Backspace") return;
|
|
5168
5200
|
let n = S.selectedPath.value;
|
|
5169
5201
|
!n || n.length === 0 || (e.preventDefault(), S.remove(n), p(() => {
|
|
5170
|
-
|
|
5202
|
+
H.value && !H.value.contains(document.activeElement) && H.value.focus({ preventScroll: !0 });
|
|
5171
5203
|
}));
|
|
5172
5204
|
}
|
|
5173
|
-
function
|
|
5174
|
-
|
|
5205
|
+
function ne() {
|
|
5206
|
+
H.value && (H.value.contains(document.activeElement) || H.value.focus({ preventScroll: !0 }));
|
|
5175
5207
|
}
|
|
5176
|
-
_(() => window.addEventListener("keydown",
|
|
5177
|
-
function
|
|
5178
|
-
if (e === "outline" &&
|
|
5179
|
-
t.preventDefault(),
|
|
5180
|
-
let n = t.clientX, r =
|
|
5208
|
+
_(() => window.addEventListener("keydown", W)), g(() => window.removeEventListener("keydown", W));
|
|
5209
|
+
function re(e, t) {
|
|
5210
|
+
if (e === "outline" && I.value || e === "props" && L.value) return;
|
|
5211
|
+
t.preventDefault(), R.value = e;
|
|
5212
|
+
let n = t.clientX, r = N.value, i = F.value;
|
|
5181
5213
|
function a(t) {
|
|
5182
|
-
let a =
|
|
5214
|
+
let a = H.value?.getBoundingClientRect().width ?? 0;
|
|
5183
5215
|
if (!a) return;
|
|
5184
|
-
let o = a - (e === "outline" ?
|
|
5185
|
-
e === "outline" ?
|
|
5216
|
+
let o = a - (e === "outline" ? L.value ? Qi : F.value : I.value ? Qi : N.value) - Zi - 2, s = t.clientX - n;
|
|
5217
|
+
e === "outline" ? N.value = Math.min(Math.max(r + s, Ji), Math.max(Ji, o)) : F.value = Math.min(Math.max(i - s, Xi), Math.max(Xi, o));
|
|
5186
5218
|
}
|
|
5187
5219
|
function o() {
|
|
5188
|
-
|
|
5220
|
+
R.value = null, window.removeEventListener("pointermove", a), window.removeEventListener("pointerup", o), window.removeEventListener("pointercancel", o);
|
|
5189
5221
|
}
|
|
5190
5222
|
window.addEventListener("pointermove", a), window.addEventListener("pointerup", o), window.addEventListener("pointercancel", o);
|
|
5191
5223
|
}
|
|
5192
|
-
let
|
|
5193
|
-
|
|
5194
|
-
q || (
|
|
5224
|
+
let G = b(JSON.stringify(S.schema.value, null, 2)), K = b(""), ie = b(""), q = !1;
|
|
5225
|
+
ee(S.schema, (e) => {
|
|
5226
|
+
q || (G.value = JSON.stringify(e, null, 2));
|
|
5195
5227
|
}, { deep: !1 });
|
|
5196
5228
|
function ae(e) {
|
|
5197
|
-
q = !0,
|
|
5229
|
+
q = !0, ie.value = "", G.value = e.target.value;
|
|
5198
5230
|
try {
|
|
5199
|
-
JSON.parse(
|
|
5231
|
+
JSON.parse(G.value), K.value = "";
|
|
5200
5232
|
} catch {
|
|
5201
|
-
|
|
5233
|
+
K.value = "Invalid JSON";
|
|
5202
5234
|
}
|
|
5203
5235
|
}
|
|
5204
5236
|
function J() {
|
|
@@ -5211,98 +5243,98 @@ var Xn = [
|
|
|
5211
5243
|
function le() {
|
|
5212
5244
|
let e;
|
|
5213
5245
|
try {
|
|
5214
|
-
e = JSON.parse(
|
|
5246
|
+
e = JSON.parse(G.value);
|
|
5215
5247
|
} catch (e) {
|
|
5216
|
-
|
|
5248
|
+
K.value = e instanceof Error ? e.message : "Invalid JSON";
|
|
5217
5249
|
return;
|
|
5218
5250
|
}
|
|
5219
5251
|
let { schema: t, issues: n } = gn(e, { elements: x.value }), r = n.filter((e) => e.severity === "error");
|
|
5220
5252
|
if (r.length > 0) {
|
|
5221
|
-
|
|
5253
|
+
K.value = ce(r);
|
|
5222
5254
|
return;
|
|
5223
5255
|
}
|
|
5224
|
-
S.replaceSchema(t),
|
|
5256
|
+
S.replaceSchema(t), K.value = "", ie.value = n.length > 0 ? ce(n) : "", n.length === 0 && (w.value = "editor");
|
|
5225
5257
|
}
|
|
5226
5258
|
return (t, l) => (v(), i("div", {
|
|
5227
5259
|
ref_key: "rootRef",
|
|
5228
|
-
ref:
|
|
5260
|
+
ref: H,
|
|
5229
5261
|
class: m(["pb-builder", {
|
|
5230
|
-
"pb-builder--outline-collapsed":
|
|
5231
|
-
"pb-builder--props-collapsed":
|
|
5232
|
-
"pb-builder--resizing":
|
|
5262
|
+
"pb-builder--outline-collapsed": I.value,
|
|
5263
|
+
"pb-builder--props-collapsed": L.value,
|
|
5264
|
+
"pb-builder--resizing": R.value !== null
|
|
5233
5265
|
}]),
|
|
5234
5266
|
tabindex: "-1",
|
|
5235
|
-
onPointerdown:
|
|
5267
|
+
onPointerdown: ne
|
|
5236
5268
|
}, [
|
|
5237
|
-
a("section", { class: m(["pb-builder__pane pb-builder__pane--tree", { "pb-builder__pane--rail":
|
|
5269
|
+
a("section", { class: m(["pb-builder__pane pb-builder__pane--tree", { "pb-builder__pane--rail": I.value }]) }, [I.value ? (v(), i("button", {
|
|
5238
5270
|
key: 1,
|
|
5239
5271
|
type: "button",
|
|
5240
5272
|
class: "pb-builder__rail-btn",
|
|
5241
5273
|
title: O(o)("coar.pageBuilder.chrome.expandOutline", void 0, "Expand outline"),
|
|
5242
|
-
onClick: l[1] ||= (e) =>
|
|
5243
|
-
}, [c(O(
|
|
5274
|
+
onClick: l[1] ||= (e) => I.value = !1
|
|
5275
|
+
}, [c(O(B), {
|
|
5244
5276
|
name: "chevrons-right",
|
|
5245
5277
|
size: "s"
|
|
5246
|
-
})], 8,
|
|
5247
|
-
c(O(
|
|
5278
|
+
})], 8, wi)) : (v(), i(e, { key: 0 }, [a("header", bi, [
|
|
5279
|
+
c(O(B), {
|
|
5248
5280
|
name: "list",
|
|
5249
5281
|
size: "s"
|
|
5250
5282
|
}),
|
|
5251
|
-
a("span",
|
|
5283
|
+
a("span", xi, E(O(o)("coar.pageBuilder.chrome.outline", void 0, "Outline")), 1),
|
|
5252
5284
|
a("button", {
|
|
5253
5285
|
type: "button",
|
|
5254
5286
|
class: "pb-builder__icon-btn",
|
|
5255
5287
|
title: O(o)("coar.pageBuilder.chrome.collapseOutline", void 0, "Collapse outline"),
|
|
5256
|
-
onClick: l[0] ||= (e) =>
|
|
5257
|
-
}, [c(O(
|
|
5288
|
+
onClick: l[0] ||= (e) => I.value = !0
|
|
5289
|
+
}, [c(O(B), {
|
|
5258
5290
|
name: "chevrons-left",
|
|
5259
5291
|
size: "s"
|
|
5260
|
-
})], 8,
|
|
5261
|
-
]), a("div",
|
|
5292
|
+
})], 8, Si)
|
|
5293
|
+
]), a("div", Ci, [c(xr)])], 64))], 2),
|
|
5262
5294
|
a("div", {
|
|
5263
|
-
class: m(["pb-builder__divider", { "pb-builder__divider--inert":
|
|
5295
|
+
class: m(["pb-builder__divider", { "pb-builder__divider--inert": I.value }]),
|
|
5264
5296
|
role: "separator",
|
|
5265
|
-
onPointerdown: l[2] ||= (e) =>
|
|
5297
|
+
onPointerdown: l[2] ||= (e) => re("outline", e)
|
|
5266
5298
|
}, null, 34),
|
|
5267
|
-
a("section",
|
|
5299
|
+
a("section", Ti, [c(O(se), {
|
|
5268
5300
|
modelValue: w.value,
|
|
5269
5301
|
"onUpdate:modelValue": l[8] ||= (e) => w.value = e,
|
|
5270
5302
|
class: "pb-builder__tabs"
|
|
5271
5303
|
}, {
|
|
5272
|
-
actions:
|
|
5304
|
+
actions: j(() => [a("button", {
|
|
5273
5305
|
type: "button",
|
|
5274
5306
|
class: "pb-builder__icon-btn",
|
|
5275
5307
|
disabled: !O(S).canUndo.value,
|
|
5276
5308
|
title: O(o)("coar.pageBuilder.chrome.undo", void 0, "Undo (Ctrl+Z)"),
|
|
5277
5309
|
onClick: l[3] ||= (e) => O(S).undo()
|
|
5278
|
-
}, [c(O(
|
|
5310
|
+
}, [c(O(B), {
|
|
5279
5311
|
name: "undo-2",
|
|
5280
5312
|
size: "s"
|
|
5281
|
-
})], 8,
|
|
5313
|
+
})], 8, Ei), a("button", {
|
|
5282
5314
|
type: "button",
|
|
5283
5315
|
class: "pb-builder__icon-btn",
|
|
5284
5316
|
disabled: !O(S).canRedo.value,
|
|
5285
5317
|
title: O(o)("coar.pageBuilder.chrome.redo", void 0, "Redo (Ctrl+Y)"),
|
|
5286
5318
|
onClick: l[4] ||= (e) => O(S).redo()
|
|
5287
|
-
}, [c(O(
|
|
5319
|
+
}, [c(O(B), {
|
|
5288
5320
|
name: "redo-2",
|
|
5289
5321
|
size: "s"
|
|
5290
|
-
})], 8,
|
|
5291
|
-
default:
|
|
5322
|
+
})], 8, Di)]),
|
|
5323
|
+
default: j(() => [
|
|
5292
5324
|
c(O(oe), { id: "editor" }, {
|
|
5293
|
-
default:
|
|
5325
|
+
default: j(() => [a("span", Oi, [c(O(B), {
|
|
5294
5326
|
name: "pencil",
|
|
5295
5327
|
size: "s"
|
|
5296
5328
|
}), s(" " + E(O(o)("coar.pageBuilder.chrome.tabEditor", void 0, "Editor")), 1)])]),
|
|
5297
|
-
content:
|
|
5329
|
+
content: j(() => [c(ei)]),
|
|
5298
5330
|
_: 1
|
|
5299
5331
|
}),
|
|
5300
5332
|
c(O(oe), { id: "preview" }, {
|
|
5301
|
-
default:
|
|
5333
|
+
default: j(() => [a("span", ki, [c(O(B), {
|
|
5302
5334
|
name: "eye",
|
|
5303
5335
|
size: "s"
|
|
5304
5336
|
}), s(" " + E(O(o)("coar.pageBuilder.chrome.tabPreview", void 0, "Preview")), 1)])]),
|
|
5305
|
-
content:
|
|
5337
|
+
content: j(() => [a("div", Ai, [a("div", ji, [a("div", {
|
|
5306
5338
|
class: "pb-builder__seg",
|
|
5307
5339
|
role: "radiogroup",
|
|
5308
5340
|
"aria-label": O(o)("coar.pageBuilder.chrome.previewWidth", void 0, "Preview width")
|
|
@@ -5314,7 +5346,7 @@ var Xn = [
|
|
|
5314
5346
|
"aria-checked": T.value === "full",
|
|
5315
5347
|
title: O(o)("coar.pageBuilder.chrome.previewFullTitle", void 0, "Full width"),
|
|
5316
5348
|
onClick: l[5] ||= (e) => T.value = "full"
|
|
5317
|
-
}, E(O(o)("coar.pageBuilder.chrome.previewDesktop", void 0, "Desktop")), 11,
|
|
5349
|
+
}, E(O(o)("coar.pageBuilder.chrome.previewDesktop", void 0, "Desktop")), 11, Ni),
|
|
5318
5350
|
a("button", {
|
|
5319
5351
|
type: "button",
|
|
5320
5352
|
class: m(["pb-builder__seg-btn", { "pb-builder__seg-btn--active": T.value === "tablet" }]),
|
|
@@ -5322,7 +5354,7 @@ var Xn = [
|
|
|
5322
5354
|
"aria-checked": T.value === "tablet",
|
|
5323
5355
|
title: O(o)("coar.pageBuilder.chrome.previewTabletTitle", void 0, "768px"),
|
|
5324
5356
|
onClick: l[6] ||= (e) => T.value = "tablet"
|
|
5325
|
-
}, E(O(o)("coar.pageBuilder.chrome.previewTablet", void 0, "Tablet · 768")), 11,
|
|
5357
|
+
}, E(O(o)("coar.pageBuilder.chrome.previewTablet", void 0, "Tablet · 768")), 11, Pi),
|
|
5326
5358
|
a("button", {
|
|
5327
5359
|
type: "button",
|
|
5328
5360
|
class: m(["pb-builder__seg-btn", { "pb-builder__seg-btn--active": T.value === "mobile" }]),
|
|
@@ -5330,10 +5362,10 @@ var Xn = [
|
|
|
5330
5362
|
"aria-checked": T.value === "mobile",
|
|
5331
5363
|
title: O(o)("coar.pageBuilder.chrome.previewMobileTitle", void 0, "375px"),
|
|
5332
5364
|
onClick: l[7] ||= (e) => T.value = "mobile"
|
|
5333
|
-
}, E(O(o)("coar.pageBuilder.chrome.previewMobile", void 0, "Mobile · 375")), 11,
|
|
5334
|
-
], 8,
|
|
5365
|
+
}, E(O(o)("coar.pageBuilder.chrome.previewMobile", void 0, "Mobile · 375")), 11, Fi)
|
|
5366
|
+
], 8, Mi)]), a("div", Ii, [a("div", {
|
|
5335
5367
|
class: "pb-builder__preview-frame",
|
|
5336
|
-
style: h(
|
|
5368
|
+
style: h(M.value)
|
|
5337
5369
|
}, [c(Cn, {
|
|
5338
5370
|
schema: O(S).schema.value,
|
|
5339
5371
|
config: n.config
|
|
@@ -5341,55 +5373,55 @@ var Xn = [
|
|
|
5341
5373
|
_: 1
|
|
5342
5374
|
}),
|
|
5343
5375
|
c(O(oe), { id: "json" }, {
|
|
5344
|
-
default:
|
|
5376
|
+
default: j(() => [a("span", Li, [c(O(B), {
|
|
5345
5377
|
name: "code",
|
|
5346
5378
|
size: "s"
|
|
5347
5379
|
}), s(" " + E(O(o)("coar.pageBuilder.chrome.tabJson", void 0, "JSON")), 1)])]),
|
|
5348
|
-
content:
|
|
5349
|
-
a("span",
|
|
5350
|
-
|
|
5380
|
+
content: j(() => [a("div", Ri, [a("div", zi, [
|
|
5381
|
+
a("span", Bi, E(O(o)("coar.pageBuilder.chrome.jsonHint", void 0, "Paste or edit JSON, then click Apply")), 1),
|
|
5382
|
+
K.value ? (v(), i("span", Vi, E(K.value), 1)) : ie.value ? (v(), i("span", Hi, E(ie.value), 1)) : r("", !0),
|
|
5351
5383
|
a("button", {
|
|
5352
5384
|
class: "pb-builder__json-apply",
|
|
5353
|
-
disabled: !!
|
|
5385
|
+
disabled: !!K.value,
|
|
5354
5386
|
onClick: le
|
|
5355
|
-
}, E(O(o)("coar.pageBuilder.chrome.jsonApply", void 0, "Apply →")), 9,
|
|
5387
|
+
}, E(O(o)("coar.pageBuilder.chrome.jsonApply", void 0, "Apply →")), 9, Ui)
|
|
5356
5388
|
]), a("textarea", {
|
|
5357
5389
|
class: "pb-builder__json-editor",
|
|
5358
|
-
value:
|
|
5390
|
+
value: G.value,
|
|
5359
5391
|
spellcheck: "false",
|
|
5360
5392
|
onInput: ae,
|
|
5361
5393
|
onBlur: J
|
|
5362
|
-
}, null, 40,
|
|
5394
|
+
}, null, 40, Wi)])]),
|
|
5363
5395
|
_: 1
|
|
5364
5396
|
})
|
|
5365
5397
|
]),
|
|
5366
5398
|
_: 1
|
|
5367
5399
|
}, 8, ["modelValue"])]),
|
|
5368
5400
|
a("div", {
|
|
5369
|
-
class: m(["pb-builder__divider", { "pb-builder__divider--inert":
|
|
5401
|
+
class: m(["pb-builder__divider", { "pb-builder__divider--inert": L.value }]),
|
|
5370
5402
|
role: "separator",
|
|
5371
|
-
onPointerdown: l[9] ||= (e) =>
|
|
5403
|
+
onPointerdown: l[9] ||= (e) => re("props", e)
|
|
5372
5404
|
}, null, 34),
|
|
5373
|
-
a("section", { class: m(["pb-builder__pane pb-builder__pane--props", { "pb-builder__pane--rail":
|
|
5405
|
+
a("section", { class: m(["pb-builder__pane pb-builder__pane--props", { "pb-builder__pane--rail": L.value }]) }, [L.value ? (v(), i("button", {
|
|
5374
5406
|
key: 1,
|
|
5375
5407
|
type: "button",
|
|
5376
5408
|
class: "pb-builder__rail-btn",
|
|
5377
5409
|
title: O(o)("coar.pageBuilder.chrome.expandProperties", void 0, "Expand properties"),
|
|
5378
|
-
onClick: l[11] ||= (e) =>
|
|
5379
|
-
}, [c(O(
|
|
5410
|
+
onClick: l[11] ||= (e) => L.value = !1
|
|
5411
|
+
}, [c(O(B), {
|
|
5380
5412
|
name: "chevrons-left",
|
|
5381
5413
|
size: "s"
|
|
5382
|
-
})], 8,
|
|
5414
|
+
})], 8, Ki)) : (v(), i(e, { key: 0 }, [a("button", {
|
|
5383
5415
|
type: "button",
|
|
5384
5416
|
class: "pb-builder__icon-btn pb-builder__icon-btn--corner",
|
|
5385
5417
|
title: O(o)("coar.pageBuilder.chrome.collapseProperties", void 0, "Collapse properties"),
|
|
5386
|
-
onClick: l[10] ||= (e) =>
|
|
5387
|
-
}, [c(O(
|
|
5418
|
+
onClick: l[10] ||= (e) => L.value = !0
|
|
5419
|
+
}, [c(O(B), {
|
|
5388
5420
|
name: "chevrons-right",
|
|
5389
5421
|
size: "s"
|
|
5390
|
-
})], 8,
|
|
5422
|
+
})], 8, Gi), c(yi, { class: "pb-builder__pane-inner" })], 64))], 2)
|
|
5391
5423
|
], 34));
|
|
5392
5424
|
}
|
|
5393
5425
|
}), [["__scopeId", "data-v-a92ce3d0"]]);
|
|
5394
5426
|
//#endregion
|
|
5395
|
-
export {
|
|
5427
|
+
export { $i as CoarPageBuilder, Cn as CoarPageRenderer, Se as ELEMENT_KEY_PATTERN, st as FORM_ERROR_KEY, pn as KNOWN_ELEMENT_TYPES, Et as OptionsEditor, Ce as PAGE_ELEMENTS_KEY, On as compatibleElementTypes, Dn as compatibleFields, An as defaultElementForField, kn as defineFields, Z as definePageElement, le as isContainerNode, ue as isElementAllowed, En as isFieldCompatible, we as mergeElementRegistries, mn as migrateLegacyTypes, on as migrateV1PropsBag, gn as normalizePageSchema, $ as usePageElement, vt as useResolvedOptions };
|