@chaibuilder/sdk 2.0.0-beta.12 → 2.0.0-beta.13
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/core.cjs +4 -4
- package/dist/core.js +207 -143
- package/dist/style.css +1 -1
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +107 -97
- package/package.json +1 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { registerChaiBlockSchema as p, StylesProp as c, registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
2
2
|
import { j as r } from "./jsx-runtime-Sp0orL4X.js";
|
|
3
3
|
import * as y from "react";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as I, G as E, g as w } from "./iconBase-Ief2hJUZ.js";
|
|
5
5
|
import { ButtonIcon as C, CodeIcon as T, HeadingIcon as $, TextIcon as N, CursorTextIcon as H, Link1Icon as z, ImageIcon as j, RowsIcon as R, ColumnsIcon as A, SketchLogoIcon as D, VideoIcon as q, DividerHorizontalIcon as F, MoonIcon as G, SpaceBetweenVerticallyIcon as V, InputIcon as S, RadiobuttonIcon as O, DropdownMenuIcon as U, CheckboxIcon as W, LetterCaseToggleIcon as X } from "@radix-ui/react-icons";
|
|
6
|
-
import { isNull as Y, isEmpty as b, get as v, pick as Z, omit as J, map as
|
|
6
|
+
import { isNull as Y, isEmpty as b, get as v, pick as Z, omit as J, map as L } from "lodash-es";
|
|
7
7
|
import { GlobeIcon as K, GroupIcon as Q } from "lucide-react";
|
|
8
8
|
import "clsx";
|
|
9
9
|
import "tailwind-merge";
|
|
10
|
-
const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("div", { className:
|
|
11
|
-
const { blockProps: o, inBuilder: t, backgroundImage: n, children: l, tag:
|
|
10
|
+
const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("div", { className: I("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ r.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ r.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, x = ee, te = (e) => {
|
|
11
|
+
const { blockProps: o, inBuilder: t, backgroundImage: n, children: l, tag: i = "div", styles: s } = e;
|
|
12
12
|
let a = l;
|
|
13
13
|
l || (a = /* @__PURE__ */ r.jsx(x, { inBuilder: t }));
|
|
14
14
|
let d = {};
|
|
15
|
-
return n && (d = { backgroundImage: `url(${n})` }), y.createElement(
|
|
15
|
+
return n && (d = { backgroundImage: `url(${n})` }), y.createElement(i, { ...o, ...s, style: d }, a);
|
|
16
16
|
}, oe = {
|
|
17
17
|
type: "Box",
|
|
18
18
|
label: "Box",
|
|
@@ -55,7 +55,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
55
55
|
}),
|
|
56
56
|
canAcceptBlock: () => !0
|
|
57
57
|
}, le = (e) => {
|
|
58
|
-
const { blockProps: o, iconSize: t, icon: n, content: l, styles:
|
|
58
|
+
const { blockProps: o, iconSize: t, icon: n, content: l, styles: i, children: s, iconPos: a } = e, d = n, g = s || /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
59
59
|
/* @__PURE__ */ r.jsx("span", { "data-ai-key": "content", children: l }),
|
|
60
60
|
d && /* @__PURE__ */ r.jsx(
|
|
61
61
|
"div",
|
|
@@ -70,7 +70,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
70
70
|
"button",
|
|
71
71
|
{
|
|
72
72
|
...o,
|
|
73
|
-
...
|
|
73
|
+
...i,
|
|
74
74
|
type: "button"
|
|
75
75
|
},
|
|
76
76
|
g
|
|
@@ -123,7 +123,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
123
123
|
...t,
|
|
124
124
|
dangerouslySetInnerHTML: { __html: n }
|
|
125
125
|
});
|
|
126
|
-
},
|
|
126
|
+
}, ie = {
|
|
127
127
|
type: "CustomHTML",
|
|
128
128
|
label: "web_blocks.custom_html",
|
|
129
129
|
category: "core",
|
|
@@ -139,7 +139,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
})
|
|
142
|
-
},
|
|
142
|
+
}, se = (e) => {
|
|
143
143
|
const { blockProps: o, styles: t, backgroundImage: n } = e;
|
|
144
144
|
let l = {};
|
|
145
145
|
return n && (l = { backgroundImage: `url(${n})` }), y.createElement("div", { ...o, ...t, style: l });
|
|
@@ -160,8 +160,8 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
160
160
|
}
|
|
161
161
|
})
|
|
162
162
|
}, ce = (e) => {
|
|
163
|
-
const { blockProps: o, styles: t, content: n, level: l = "h1", children:
|
|
164
|
-
return
|
|
163
|
+
const { blockProps: o, styles: t, content: n, level: l = "h1", children: i = null } = e;
|
|
164
|
+
return i ? y.createElement(l, { ...t, ...o }, i) : y.createElement(l, {
|
|
165
165
|
...t,
|
|
166
166
|
...o,
|
|
167
167
|
dangerouslySetInnerHTML: { __html: n }
|
|
@@ -222,8 +222,8 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
222
222
|
aiProps: ["content"],
|
|
223
223
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
224
224
|
}, ge = (e) => {
|
|
225
|
-
const { blockProps: o, styles: t, content: n, children: l = null, tag:
|
|
226
|
-
return l ? y.createElement("span", { ...t, ...o }, l) : y.createElement(
|
|
225
|
+
const { blockProps: o, styles: t, content: n, children: l = null, tag: i } = e;
|
|
226
|
+
return l ? y.createElement("span", { ...t, ...o }, l) : y.createElement(i || "span", {
|
|
227
227
|
...t,
|
|
228
228
|
...o,
|
|
229
229
|
dangerouslySetInnerHTML: { __html: n || "" }
|
|
@@ -270,16 +270,16 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
270
270
|
aiProps: ["content"],
|
|
271
271
|
i18nProps: ["content"]
|
|
272
272
|
}, fe = (e) => {
|
|
273
|
-
const { blockProps: o, link: t, children: n, styles: l, inBuilder:
|
|
273
|
+
const { blockProps: o, link: t, children: n, styles: l, inBuilder: i, content: s } = e;
|
|
274
274
|
let a = {};
|
|
275
|
-
return !n && b(
|
|
275
|
+
return !n && b(s) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), i ? n ? /* @__PURE__ */ r.jsx("span", { ...o, style: a, ...l, children: n }) : y.createElement(
|
|
276
276
|
"span",
|
|
277
277
|
{
|
|
278
278
|
...o,
|
|
279
279
|
...l,
|
|
280
280
|
style: a
|
|
281
281
|
},
|
|
282
|
-
|
|
282
|
+
s
|
|
283
283
|
) : n ? /* @__PURE__ */ r.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...l, children: n }) : y.createElement(
|
|
284
284
|
"a",
|
|
285
285
|
{
|
|
@@ -288,7 +288,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
288
288
|
href: (t == null ? void 0 : t.href) || "#",
|
|
289
289
|
target: (t == null ? void 0 : t.target) || "_self"
|
|
290
290
|
},
|
|
291
|
-
|
|
291
|
+
s
|
|
292
292
|
);
|
|
293
293
|
}, be = {
|
|
294
294
|
type: "Link",
|
|
@@ -328,24 +328,24 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
328
328
|
canAcceptBlock: (e) => e !== "Link"
|
|
329
329
|
}, M = (e, ...o) => ({
|
|
330
330
|
...e,
|
|
331
|
-
className:
|
|
331
|
+
className: I(e.className, ...o)
|
|
332
332
|
}), ke = (e) => {
|
|
333
|
-
const { blockProps: o, children: t, styles: n, inBuilder: l, content:
|
|
334
|
-
if (!t && b(n == null ? void 0 : n.className) && b(
|
|
333
|
+
const { blockProps: o, children: t, styles: n, inBuilder: l, content: i, href: s } = e, { hrefType: a, autoplay: d, maxWidth: g, backdropColor: h, galleryName: f } = e, m = M(n, "cb-lightbox");
|
|
334
|
+
if (!t && b(n == null ? void 0 : n.className) && b(i))
|
|
335
335
|
return /* @__PURE__ */ r.jsx(x, { inBuilder: l });
|
|
336
336
|
if (l)
|
|
337
337
|
return t ? /* @__PURE__ */ r.jsx("span", { ...o, ...m, children: t }) : y.createElement("span", {
|
|
338
338
|
...o,
|
|
339
339
|
...m,
|
|
340
|
-
dangerouslySetInnerHTML: { __html:
|
|
340
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
341
341
|
});
|
|
342
342
|
const k = {};
|
|
343
|
-
return k["data-vbtype"] = a, d && (k["data-autoplay"] = "true"), g && (k["data-maxwidth"] = g + "px"), h && (k["data-overlay"] = h), f && (k["data-gall"] = f), t ? /* @__PURE__ */ r.jsx("a", { ...k, href:
|
|
343
|
+
return k["data-vbtype"] = a, d && (k["data-autoplay"] = "true"), g && (k["data-maxwidth"] = g + "px"), h && (k["data-overlay"] = h), f && (k["data-gall"] = f), t ? /* @__PURE__ */ r.jsx("a", { ...k, href: s || "#/", ...o, ...m, children: t }) : y.createElement("a", {
|
|
344
344
|
...o,
|
|
345
345
|
...m,
|
|
346
346
|
...k,
|
|
347
|
-
href:
|
|
348
|
-
dangerouslySetInnerHTML: { __html:
|
|
347
|
+
href: s || "#",
|
|
348
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
349
349
|
});
|
|
350
350
|
}, xe = {
|
|
351
351
|
type: "LightBoxLink",
|
|
@@ -422,9 +422,9 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
422
422
|
aiProps: ["content"],
|
|
423
423
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
424
424
|
}, we = (e) => {
|
|
425
|
-
const { blockProps: o, children: t, listType: n, styles: l, tag:
|
|
426
|
-
return !t && b(l == null ? void 0 : l.className) ? /* @__PURE__ */ r.jsx(x, { inBuilder:
|
|
427
|
-
|
|
425
|
+
const { blockProps: o, children: t, listType: n, styles: l, tag: i, inBuilder: s } = e, a = I(v(l, "className", ""), n);
|
|
426
|
+
return !t && b(l == null ? void 0 : l.className) ? /* @__PURE__ */ r.jsx(x, { inBuilder: s }) : y.createElement(
|
|
427
|
+
i || (n === "list-decimal" ? "ol" : "ul"),
|
|
428
428
|
{ ...o, ...l, className: a },
|
|
429
429
|
t
|
|
430
430
|
);
|
|
@@ -474,14 +474,14 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
474
474
|
content: "Item 3"
|
|
475
475
|
}
|
|
476
476
|
]
|
|
477
|
-
},
|
|
478
|
-
const { blockProps: o, content: t, styles: n, children: l, tag:
|
|
479
|
-
return l ? y.createElement(
|
|
477
|
+
}, Ie = (e) => {
|
|
478
|
+
const { blockProps: o, content: t, styles: n, children: l, tag: i } = e;
|
|
479
|
+
return l ? y.createElement(i || "li", { ...n, ...o }, l) : y.createElement(i || "li", {
|
|
480
480
|
...n,
|
|
481
481
|
...o,
|
|
482
482
|
dangerouslySetInnerHTML: { __html: t }
|
|
483
483
|
});
|
|
484
|
-
},
|
|
484
|
+
}, Le = {
|
|
485
485
|
type: "ListItem",
|
|
486
486
|
label: "List Item",
|
|
487
487
|
icon: A,
|
|
@@ -505,9 +505,9 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
505
505
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
506
506
|
canBeNested: (e) => e === "List"
|
|
507
507
|
}, _e = (e) => {
|
|
508
|
-
const { blockProps: o, icon: t, styles: n, width: l, inBuilder:
|
|
508
|
+
const { blockProps: o, icon: t, styles: n, width: l, inBuilder: i, height: s } = e, a = M(n, I(l ? `w-[${l}px]` : "", s ? `h-[${s}px]` : ""));
|
|
509
509
|
if (b(t))
|
|
510
|
-
return /* @__PURE__ */ r.jsx(x, { inBuilder:
|
|
510
|
+
return /* @__PURE__ */ r.jsx(x, { inBuilder: i, className: "h-8 w-14" });
|
|
511
511
|
const d = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
512
512
|
return y.createElement("span", {
|
|
513
513
|
...o,
|
|
@@ -542,15 +542,15 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
542
542
|
}
|
|
543
543
|
})
|
|
544
544
|
}, Pe = (e) => {
|
|
545
|
-
const { blockProps: o, image: t, styles: n, alt: l, height:
|
|
545
|
+
const { blockProps: o, image: t, styles: n, alt: l, height: i, width: s, lazyLoading: a } = e;
|
|
546
546
|
return b(t) ? /* @__PURE__ */ r.jsx(x, { className: "h-36" }) : y.createElement("img", {
|
|
547
547
|
...o,
|
|
548
548
|
...n,
|
|
549
549
|
src: t,
|
|
550
550
|
alt: l,
|
|
551
551
|
loading: a ? "lazy" : "eager",
|
|
552
|
-
height:
|
|
553
|
-
width:
|
|
552
|
+
height: i,
|
|
553
|
+
width: s
|
|
554
554
|
});
|
|
555
555
|
}, Ce = {
|
|
556
556
|
type: "Image",
|
|
@@ -565,38 +565,48 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
565
565
|
type: "string",
|
|
566
566
|
title: "Image",
|
|
567
567
|
default: "https://fakeimg.pl/400x200?text=Choose&font=bebas",
|
|
568
|
-
ui: {
|
|
569
|
-
"ui:widget": "image"
|
|
570
|
-
}
|
|
568
|
+
ui: { "ui:widget": "image" }
|
|
571
569
|
},
|
|
572
570
|
alt: {
|
|
573
571
|
type: "string",
|
|
574
572
|
title: "Alt text",
|
|
575
573
|
default: "",
|
|
576
|
-
ui: {
|
|
577
|
-
|
|
578
|
-
|
|
574
|
+
ui: { "ui:placeholder": "Enter alt text" }
|
|
575
|
+
},
|
|
576
|
+
lazyLoading: {
|
|
577
|
+
type: "boolean",
|
|
578
|
+
title: "Lazy Load",
|
|
579
|
+
default: !0
|
|
580
|
+
},
|
|
581
|
+
width: {
|
|
582
|
+
type: "number",
|
|
583
|
+
title: "Width",
|
|
584
|
+
default: "",
|
|
585
|
+
ui: { "ui:placeholder": "Enter width" }
|
|
579
586
|
},
|
|
580
587
|
height: {
|
|
581
588
|
type: "number",
|
|
582
589
|
title: "Height",
|
|
583
590
|
default: "",
|
|
584
|
-
ui: {
|
|
585
|
-
"ui:placeholder": "Enter Here"
|
|
586
|
-
}
|
|
591
|
+
ui: { "ui:placeholder": "Enter height" }
|
|
587
592
|
},
|
|
588
|
-
|
|
593
|
+
mobileImage: {
|
|
594
|
+
type: "string",
|
|
595
|
+
title: "Mobile Image",
|
|
596
|
+
default: "",
|
|
597
|
+
ui: { "ui:widget": "image" }
|
|
598
|
+
},
|
|
599
|
+
mobileWidth: {
|
|
589
600
|
type: "number",
|
|
590
|
-
title: "Width",
|
|
601
|
+
title: "Mobile Width",
|
|
591
602
|
default: "",
|
|
592
|
-
ui: {
|
|
593
|
-
"ui:placeholder": "Enter Here"
|
|
594
|
-
}
|
|
603
|
+
ui: { "ui:placeholder": "Enter width" }
|
|
595
604
|
},
|
|
596
|
-
|
|
597
|
-
type: "
|
|
598
|
-
title: "
|
|
599
|
-
default:
|
|
605
|
+
mobileHeight: {
|
|
606
|
+
type: "number",
|
|
607
|
+
title: "Mobile Height",
|
|
608
|
+
default: "",
|
|
609
|
+
ui: { "ui:placeholder": "Enter height" }
|
|
600
610
|
}
|
|
601
611
|
}
|
|
602
612
|
}),
|
|
@@ -617,14 +627,14 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
617
627
|
}
|
|
618
628
|
return null;
|
|
619
629
|
}, Se = y.memo((e) => {
|
|
620
|
-
const { blockProps: o, inBuilder: t, styles: n, url: l, controls:
|
|
630
|
+
const { blockProps: o, inBuilder: t, styles: n, url: l, controls: i } = e, s = v(i, "autoPlay", !1), a = v(i, "controls", !1), d = s || v(i, "muted", !0), g = v(i, "loop", !1);
|
|
621
631
|
if (b(l))
|
|
622
632
|
return /* @__PURE__ */ r.jsx(x, { inBuilder: t, className: "h-36" });
|
|
623
633
|
let h = je(l), f = null;
|
|
624
634
|
if (h) {
|
|
625
635
|
if (!b(h)) {
|
|
626
636
|
const m = [];
|
|
627
|
-
m.push(`autoplay=${
|
|
637
|
+
m.push(`autoplay=${s ? 1 : 0}`), m.push(`controls=${i ? 1 : 0}`), m.push(`mute=${d ? 1 : 0}&muted=${d ? 1 : 0}`), m.push(`loop=${g ? 1 : 0}`), h = `${h}?${m.join("&")}`;
|
|
628
638
|
}
|
|
629
639
|
f = y.createElement("iframe", {
|
|
630
640
|
...o,
|
|
@@ -641,7 +651,7 @@ const ee = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
641
651
|
src: l,
|
|
642
652
|
controls: a,
|
|
643
653
|
muted: d,
|
|
644
|
-
autoPlay: t ? !1 :
|
|
654
|
+
autoPlay: t ? !1 : s,
|
|
645
655
|
loop: g
|
|
646
656
|
});
|
|
647
657
|
return /* @__PURE__ */ r.jsx("div", { ...Z(n, ["className"]), children: /* @__PURE__ */ r.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
@@ -717,7 +727,7 @@ function $e(e) {
|
|
|
717
727
|
}
|
|
718
728
|
const Ne = (e) => {
|
|
719
729
|
const { scripts: o, inBuilder: t, blockProps: n } = e;
|
|
720
|
-
return t ? /* @__PURE__ */ r.jsx("div", { ...n, children: /* @__PURE__ */ r.jsx("div", { className:
|
|
730
|
+
return t ? /* @__PURE__ */ r.jsx("div", { ...n, children: /* @__PURE__ */ r.jsx("div", { className: I("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ r.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ r.jsx("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ r.jsx("div", { dangerouslySetInnerHTML: { __html: o } });
|
|
721
731
|
}, He = {
|
|
722
732
|
type: "CustomScript",
|
|
723
733
|
label: "web_blocks.custom_script",
|
|
@@ -844,9 +854,9 @@ const Ne = (e) => {
|
|
|
844
854
|
aiProps: ["content"],
|
|
845
855
|
i18nProps: ["content"]
|
|
846
856
|
}, Ge = (e) => {
|
|
847
|
-
const { blockProps: o, backgroundImage: t, children: n, styles: l, tag:
|
|
848
|
-
let
|
|
849
|
-
return t && (
|
|
857
|
+
const { blockProps: o, backgroundImage: t, children: n, styles: l, tag: i } = e;
|
|
858
|
+
let s = {};
|
|
859
|
+
return t && (s = { backgroundImage: `url(${t})` }), y.createElement(i || "div", { ...o, ...l, style: s }, n);
|
|
850
860
|
}, Ve = {
|
|
851
861
|
type: "Body",
|
|
852
862
|
label: "Body",
|
|
@@ -911,7 +921,7 @@ const Ne = (e) => {
|
|
|
911
921
|
canMove: () => !1,
|
|
912
922
|
canDuplicate: () => !1
|
|
913
923
|
}, We = (e) => {
|
|
914
|
-
const { children: o, blockProps: t, errorMessage: n, successMessage: l, action:
|
|
924
|
+
const { children: o, blockProps: t, errorMessage: n, successMessage: l, action: i, styles: s } = e;
|
|
915
925
|
let a = o;
|
|
916
926
|
o || (a = /* @__PURE__ */ r.jsx(x, {}));
|
|
917
927
|
const d = {
|
|
@@ -928,9 +938,9 @@ const Ne = (e) => {
|
|
|
928
938
|
"data-error": n,
|
|
929
939
|
"data-success": l,
|
|
930
940
|
method: "post",
|
|
931
|
-
action:
|
|
941
|
+
action: i,
|
|
932
942
|
...t,
|
|
933
|
-
...
|
|
943
|
+
...s,
|
|
934
944
|
children: [
|
|
935
945
|
/* @__PURE__ */ r.jsx("div", { ...g }),
|
|
936
946
|
a
|
|
@@ -969,7 +979,7 @@ const Ne = (e) => {
|
|
|
969
979
|
aiProps: ["errorMessage", "successMessage"],
|
|
970
980
|
canAcceptBlock: () => !0
|
|
971
981
|
}, Ye = (e) => {
|
|
972
|
-
const { blockProps: o, inBuilder: t, label: n, styles: l, inputStyles:
|
|
982
|
+
const { blockProps: o, inBuilder: t, label: n, styles: l, inputStyles: i, icon: s, iconSize: a, iconPos: d } = e, g = w(), h = {
|
|
973
983
|
"x-bind:disabled": "formLoading"
|
|
974
984
|
};
|
|
975
985
|
return /* @__PURE__ */ r.jsxs(
|
|
@@ -977,18 +987,18 @@ const Ne = (e) => {
|
|
|
977
987
|
{
|
|
978
988
|
id: g,
|
|
979
989
|
...h,
|
|
980
|
-
...
|
|
990
|
+
...i,
|
|
981
991
|
...l,
|
|
982
992
|
...o || {},
|
|
983
993
|
type: t ? "button" : "submit",
|
|
984
994
|
children: [
|
|
985
995
|
n,
|
|
986
|
-
|
|
996
|
+
s && /* @__PURE__ */ r.jsx(
|
|
987
997
|
"div",
|
|
988
998
|
{
|
|
989
999
|
style: { width: a + "px" },
|
|
990
1000
|
className: d + " " + (d === "order-first" ? "mr-2" : "ml-2") || "",
|
|
991
|
-
dangerouslySetInnerHTML: { __html:
|
|
1001
|
+
dangerouslySetInnerHTML: { __html: s }
|
|
992
1002
|
}
|
|
993
1003
|
)
|
|
994
1004
|
]
|
|
@@ -1035,14 +1045,14 @@ const Ne = (e) => {
|
|
|
1035
1045
|
i18nProps: ["label"],
|
|
1036
1046
|
aiProps: ["label"]
|
|
1037
1047
|
}, Je = (e) => {
|
|
1038
|
-
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles:
|
|
1039
|
-
return a ? /* @__PURE__ */ r.jsxs("div", { ...
|
|
1048
|
+
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, showLabel: a, required: d, inputType: g } = e, h = w();
|
|
1049
|
+
return a ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
|
|
1040
1050
|
a && /* @__PURE__ */ r.jsx("label", { htmlFor: h, children: n }),
|
|
1041
1051
|
/* @__PURE__ */ r.jsx(
|
|
1042
1052
|
"input",
|
|
1043
1053
|
{
|
|
1044
1054
|
name: t,
|
|
1045
|
-
...
|
|
1055
|
+
...s,
|
|
1046
1056
|
id: h,
|
|
1047
1057
|
type: g,
|
|
1048
1058
|
placeholder: l,
|
|
@@ -1055,8 +1065,8 @@ const Ne = (e) => {
|
|
|
1055
1065
|
id: h,
|
|
1056
1066
|
name: t,
|
|
1057
1067
|
...o,
|
|
1058
|
-
...i,
|
|
1059
1068
|
...s,
|
|
1069
|
+
...i,
|
|
1060
1070
|
type: g,
|
|
1061
1071
|
placeholder: l,
|
|
1062
1072
|
required: d
|
|
@@ -1118,19 +1128,19 @@ const Ne = (e) => {
|
|
|
1118
1128
|
aiProps: ["label", "placeholder"],
|
|
1119
1129
|
i18nProps: ["label", "placeholder"]
|
|
1120
1130
|
}, Qe = (e) => {
|
|
1121
|
-
const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles:
|
|
1131
|
+
const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles: i, required: s, checked: a, showLabel: d = !0 } = e, g = w();
|
|
1122
1132
|
return d ? /* @__PURE__ */ r.jsxs("div", { ...l, ...o, children: [
|
|
1123
|
-
/* @__PURE__ */ r.jsx("input", { ...
|
|
1133
|
+
/* @__PURE__ */ r.jsx("input", { ...i, name: t, id: g, type: "radio", required: s, defaultChecked: a }),
|
|
1124
1134
|
n && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: n })
|
|
1125
1135
|
] }) : /* @__PURE__ */ r.jsx(
|
|
1126
1136
|
"input",
|
|
1127
1137
|
{
|
|
1128
1138
|
id: g,
|
|
1129
1139
|
...o,
|
|
1130
|
-
...
|
|
1140
|
+
...i,
|
|
1131
1141
|
...l,
|
|
1132
1142
|
type: "radio",
|
|
1133
|
-
required:
|
|
1143
|
+
required: s,
|
|
1134
1144
|
checked: a,
|
|
1135
1145
|
name: t
|
|
1136
1146
|
}
|
|
@@ -1170,16 +1180,16 @@ const Ne = (e) => {
|
|
|
1170
1180
|
aiProps: ["label"],
|
|
1171
1181
|
i18nProps: ["label"]
|
|
1172
1182
|
}, tt = (e) => {
|
|
1173
|
-
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles:
|
|
1174
|
-
return d ? /* @__PURE__ */ r.jsxs("div", { ...
|
|
1183
|
+
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, required: a, showLabel: d, _multiple: g, options: h } = e, f = w();
|
|
1184
|
+
return d ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
|
|
1175
1185
|
d && /* @__PURE__ */ r.jsx("label", { htmlFor: f, children: n }),
|
|
1176
|
-
/* @__PURE__ */ r.jsxs("select", { ...
|
|
1186
|
+
/* @__PURE__ */ r.jsxs("select", { ...s, id: f, required: a, multiple: g, name: t, children: [
|
|
1177
1187
|
/* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: l }),
|
|
1178
|
-
|
|
1188
|
+
L(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
|
|
1179
1189
|
] })
|
|
1180
|
-
] }) : /* @__PURE__ */ r.jsxs("select", { id: f, ...
|
|
1190
|
+
] }) : /* @__PURE__ */ r.jsxs("select", { id: f, ...i, ...o, required: a, multiple: g, name: t, children: [
|
|
1181
1191
|
/* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: l }),
|
|
1182
|
-
|
|
1192
|
+
L(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
|
|
1183
1193
|
] });
|
|
1184
1194
|
}, ot = {
|
|
1185
1195
|
type: "Select",
|
|
@@ -1241,18 +1251,18 @@ const Ne = (e) => {
|
|
|
1241
1251
|
aiProps: ["label", "placeholder"],
|
|
1242
1252
|
i18nProps: ["label", "placeholder"]
|
|
1243
1253
|
}, lt = (e) => {
|
|
1244
|
-
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles:
|
|
1245
|
-
return d ? /* @__PURE__ */ r.jsxs("div", { ...
|
|
1254
|
+
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, _rows: a, showLabel: d } = e, g = w();
|
|
1255
|
+
return d ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
|
|
1246
1256
|
d && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: n }),
|
|
1247
|
-
/* @__PURE__ */ r.jsx("textarea", { name: t, ...
|
|
1257
|
+
/* @__PURE__ */ r.jsx("textarea", { name: t, ...s, id: g, placeholder: l, rows: a })
|
|
1248
1258
|
] }) : /* @__PURE__ */ r.jsx(
|
|
1249
1259
|
"textarea",
|
|
1250
1260
|
{
|
|
1251
1261
|
id: g,
|
|
1252
1262
|
name: t,
|
|
1253
1263
|
...o,
|
|
1254
|
-
...i,
|
|
1255
1264
|
...s,
|
|
1265
|
+
...i,
|
|
1256
1266
|
placeholder: l,
|
|
1257
1267
|
rows: a
|
|
1258
1268
|
}
|
|
@@ -1293,16 +1303,16 @@ const Ne = (e) => {
|
|
|
1293
1303
|
aiProps: ["label", "placeholder"],
|
|
1294
1304
|
i18nProps: ["label", "placeholder"]
|
|
1295
1305
|
}, rt = (e) => {
|
|
1296
|
-
const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles:
|
|
1306
|
+
const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles: i, required: s, checked: a, showLabel: d = !0 } = e, g = w();
|
|
1297
1307
|
return d ? /* @__PURE__ */ r.jsxs("div", { ...l, ...o, children: [
|
|
1298
1308
|
/* @__PURE__ */ r.jsx(
|
|
1299
1309
|
"input",
|
|
1300
1310
|
{
|
|
1301
|
-
...
|
|
1311
|
+
...i,
|
|
1302
1312
|
name: t,
|
|
1303
1313
|
id: g,
|
|
1304
1314
|
type: "checkbox",
|
|
1305
|
-
required:
|
|
1315
|
+
required: s,
|
|
1306
1316
|
defaultChecked: a
|
|
1307
1317
|
}
|
|
1308
1318
|
),
|
|
@@ -1312,14 +1322,14 @@ const Ne = (e) => {
|
|
|
1312
1322
|
{
|
|
1313
1323
|
id: g,
|
|
1314
1324
|
...o,
|
|
1315
|
-
...
|
|
1325
|
+
...i,
|
|
1316
1326
|
...l,
|
|
1317
1327
|
type: "checkbox",
|
|
1318
|
-
required:
|
|
1328
|
+
required: s,
|
|
1319
1329
|
name: t
|
|
1320
1330
|
}
|
|
1321
1331
|
);
|
|
1322
|
-
},
|
|
1332
|
+
}, it = {
|
|
1323
1333
|
type: "Checkbox",
|
|
1324
1334
|
label: "web_blocks.checkbox",
|
|
1325
1335
|
category: "core",
|
|
@@ -1353,10 +1363,10 @@ const Ne = (e) => {
|
|
|
1353
1363
|
}),
|
|
1354
1364
|
aiProps: ["label"],
|
|
1355
1365
|
i18nProps: ["label"]
|
|
1356
|
-
},
|
|
1357
|
-
const { blockProps: o, content: t, styles: n, children: l } = e,
|
|
1358
|
-
return l ? y.createElement("label",
|
|
1359
|
-
...
|
|
1366
|
+
}, st = (e) => {
|
|
1367
|
+
const { blockProps: o, content: t, styles: n, children: l } = e, i = { ...n, ...o };
|
|
1368
|
+
return l ? y.createElement("label", i, l) : y.createElement("label", {
|
|
1369
|
+
...i,
|
|
1360
1370
|
dangerouslySetInnerHTML: { __html: t }
|
|
1361
1371
|
});
|
|
1362
1372
|
}, at = {
|
|
@@ -1376,7 +1386,7 @@ const Ne = (e) => {
|
|
|
1376
1386
|
}
|
|
1377
1387
|
})
|
|
1378
1388
|
}, ft = () => {
|
|
1379
|
-
u(te, oe), u(
|
|
1389
|
+
u(te, oe), u(se, ae), u(le, ne), u(ce, de), u(ue, pe), u(ge, ye), u(me, he), u(fe, be), u(ke, xe), u(we, ve), u(Ie, Le), u(_e, Be), u(Pe, Ce), u(Se, Me), u(re, ie), u(Ne, He), u(qe, Fe), u(We, Xe), u(Ye, Ze), u(Je, Ke), u(rt, it), u(Qe, et), u(tt, ot), u(lt, nt), u(st, at), u(Oe, Ue), u(Ge, Ve), u(Ee, Te), u(ze, Re), u(Ae, De);
|
|
1380
1390
|
};
|
|
1381
1391
|
export {
|
|
1382
1392
|
ft as loadWebBlocks
|