@chaibuilder/sdk 3.1.28 → 3.1.30
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/{code-editor-W1Kvc_mp.js → code-editor-C9OjZ4pO.js} +1 -1
- package/dist/{code-editor-DosOD_MJ.cjs → code-editor-DiMrcGU6.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +1 -3
- package/dist/core.js +1 -1
- package/dist/index-BxU793-d.cjs +154 -0
- package/dist/{index-hrVqQhCa.js → index-DbG1Z1b3.js} +1877 -1904
- package/dist/{rte-widget-modal-DioHGWr7.js → rte-widget-modal-BtmZDq6x.js} +1 -1
- package/dist/{rte-widget-modal-BFwz3uU8.cjs → rte-widget-modal-CMfi2JfL.cjs} +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +118 -112
- package/package.json +1 -1
- package/dist/index-tOL3lzGY.cjs +0 -154
package/dist/web-blocks.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { registerChaiBlockSchema as p, StylesProp as u, registerChaiBlock as d, getRegisteredChaiBlock as U, stylesProp as L, closestBlockProp as Z } from "@chaibuilder/runtime";
|
|
2
|
-
import { jsx as i, jsxs as
|
|
2
|
+
import { jsx as i, jsxs as h, Fragment as N } from "react/jsx-runtime";
|
|
3
3
|
import { c as _, g as I } from "./common-functions-D2lMFR6K.js";
|
|
4
|
-
import * as
|
|
5
|
-
import { createElement as
|
|
6
|
-
import { ButtonIcon as M, CodeIcon as H, FrameIcon as $, SketchLogoIcon as q, LayoutIcon as G, RowsIcon as j, DividerHorizontalIcon as W, CheckboxIcon as O, FileTextIcon as Y, InputIcon as D, LetterCaseToggleIcon as Q, RadiobuttonIcon as J, DropdownMenuIcon as X, HeadingIcon as K, TableIcon as ee, BorderTopIcon as te, BorderAllIcon as oe, ViewHorizontalIcon as le, DragHandleHorizontalIcon as re, ImageIcon as ne, Link1Icon as ie, ColumnsIcon as ae, TextIcon as se, CursorTextIcon as ce, SpaceBetweenVerticallyIcon as de, VideoIcon as pe, ChevronLeftIcon as ue, ChevronRightIcon as me, LoopIcon as
|
|
7
|
-
import { isEmpty as
|
|
4
|
+
import * as b from "react";
|
|
5
|
+
import { createElement as x } from "react";
|
|
6
|
+
import { ButtonIcon as M, CodeIcon as H, FrameIcon as $, SketchLogoIcon as q, LayoutIcon as G, RowsIcon as j, DividerHorizontalIcon as W, CheckboxIcon as O, FileTextIcon as Y, InputIcon as D, LetterCaseToggleIcon as Q, RadiobuttonIcon as J, DropdownMenuIcon as X, HeadingIcon as K, TableIcon as ee, BorderTopIcon as te, BorderAllIcon as oe, ViewHorizontalIcon as le, DragHandleHorizontalIcon as re, ImageIcon as ne, Link1Icon as ie, ColumnsIcon as ae, TextIcon as se, CursorTextIcon as ce, SpaceBetweenVerticallyIcon as de, VideoIcon as pe, ChevronLeftIcon as ue, ChevronRightIcon as me, LoopIcon as V } from "@radix-ui/react-icons";
|
|
7
|
+
import { isEmpty as w, get as k, map as R, isNull as ye, omit as z, pick as F } from "lodash-es";
|
|
8
8
|
const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div", { className: _("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ i("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ i("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, ge = (e) => {
|
|
9
9
|
const { blockProps: o, inBuilder: t, backgroundImage: l, children: r, tag: n = "div", styles: a } = e;
|
|
10
10
|
let s = r;
|
|
11
11
|
r || (s = /* @__PURE__ */ i(C, { inBuilder: t }));
|
|
12
12
|
let c = {};
|
|
13
|
-
return l && (c = { backgroundImage: `url(${l})` }),
|
|
13
|
+
return l && (c = { backgroundImage: `url(${l})` }), b.createElement(n, { ...o, ...a, style: c }, s);
|
|
14
14
|
}, be = {
|
|
15
15
|
type: "Box",
|
|
16
16
|
description: "Similar to a div or section elements in HTML",
|
|
@@ -54,17 +54,17 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
54
54
|
}),
|
|
55
55
|
canAcceptBlock: () => !0
|
|
56
56
|
}, fe = (e) => {
|
|
57
|
-
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: a, iconPos: s, link: c, inBuilder:
|
|
57
|
+
const { blockProps: o, iconSize: t, icon: l, content: r, styles: n, children: a, iconPos: s, link: c, inBuilder: y } = e, g = l, v = a || /* @__PURE__ */ h(N, { children: [
|
|
58
58
|
r && /* @__PURE__ */ i("span", { children: r }),
|
|
59
|
-
|
|
59
|
+
g && /* @__PURE__ */ i(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
62
|
style: { width: t + "px" },
|
|
63
63
|
className: s + " " + (r ? s === "order-first" ? "mr-2" : "ml-2" : "") || "",
|
|
64
|
-
dangerouslySetInnerHTML: { __html:
|
|
64
|
+
dangerouslySetInnerHTML: { __html: g }
|
|
65
65
|
}
|
|
66
66
|
)
|
|
67
|
-
] }),
|
|
67
|
+
] }), f = x(
|
|
68
68
|
"button",
|
|
69
69
|
{
|
|
70
70
|
...o,
|
|
@@ -72,9 +72,9 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
72
72
|
type: "button",
|
|
73
73
|
"aria-label": r
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
v
|
|
76
76
|
);
|
|
77
|
-
return
|
|
77
|
+
return w(k(c, "href")) ? f : y ? /* @__PURE__ */ i("span", { children: f }) : /* @__PURE__ */ i("a", { "aria-label": r, href: k(c, "href") || "/", target: k(c, "target", "_self"), children: f });
|
|
78
78
|
}, he = {
|
|
79
79
|
type: "Button",
|
|
80
80
|
description: "similar to a button element in HTML",
|
|
@@ -133,13 +133,13 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
133
133
|
aiProps: ["content"]
|
|
134
134
|
}, ke = (e) => {
|
|
135
135
|
const { blockProps: o, styles: t, htmlCode: l, inBuilder: r } = e;
|
|
136
|
-
return r ? /* @__PURE__ */
|
|
136
|
+
return r ? /* @__PURE__ */ h("div", { className: "relative", ...o, children: [
|
|
137
137
|
r ? /* @__PURE__ */ i("div", { ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
138
|
-
|
|
138
|
+
b.createElement("div", {
|
|
139
139
|
...t,
|
|
140
140
|
dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
141
141
|
})
|
|
142
|
-
] }) :
|
|
142
|
+
] }) : b.createElement("div", {
|
|
143
143
|
...o,
|
|
144
144
|
...t,
|
|
145
145
|
dangerouslySetInnerHTML: { __html: l }
|
|
@@ -186,20 +186,20 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
186
186
|
})
|
|
187
187
|
}, Ce = (e) => {
|
|
188
188
|
const { blockProps: o, inBuilder: t, children: l, globalBlock: r } = e;
|
|
189
|
-
return t && !r ? /* @__PURE__ */
|
|
189
|
+
return t && !r ? /* @__PURE__ */ h(
|
|
190
190
|
"div",
|
|
191
191
|
{
|
|
192
192
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
193
193
|
...o,
|
|
194
194
|
children: [
|
|
195
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ h("h1", { children: [
|
|
196
196
|
"Global Block - ",
|
|
197
197
|
r
|
|
198
198
|
] }),
|
|
199
199
|
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
200
200
|
]
|
|
201
201
|
}
|
|
202
|
-
) :
|
|
202
|
+
) : b.createElement("span", { ...o }, l);
|
|
203
203
|
}, Ie = {
|
|
204
204
|
type: "GlobalBlock",
|
|
205
205
|
description: "A global block component",
|
|
@@ -223,10 +223,10 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
223
223
|
className: _(e.className, ...o)
|
|
224
224
|
}), Pe = (e) => {
|
|
225
225
|
const { blockProps: o, icon: t, styles: l, width: r, inBuilder: n, height: a } = e, s = T(l, "");
|
|
226
|
-
if (
|
|
226
|
+
if (w(t))
|
|
227
227
|
return /* @__PURE__ */ i(C, { inBuilder: n, className: "h-8 w-14" });
|
|
228
228
|
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
229
|
-
return
|
|
229
|
+
return b.createElement("span", {
|
|
230
230
|
...o,
|
|
231
231
|
...s,
|
|
232
232
|
style: {
|
|
@@ -265,20 +265,20 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
265
265
|
})
|
|
266
266
|
}, Be = (e) => {
|
|
267
267
|
const { blockProps: o, inBuilder: t, children: l, partialBlockId: r } = e;
|
|
268
|
-
return t && !r ? /* @__PURE__ */
|
|
268
|
+
return t && !r ? /* @__PURE__ */ h(
|
|
269
269
|
"div",
|
|
270
270
|
{
|
|
271
271
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
272
272
|
...o,
|
|
273
273
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ h("h1", { children: [
|
|
275
275
|
"Partial Block - ",
|
|
276
276
|
r
|
|
277
277
|
] }),
|
|
278
278
|
/* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
279
279
|
]
|
|
280
280
|
}
|
|
281
|
-
) :
|
|
281
|
+
) : b.createElement("span", { ...o }, l);
|
|
282
282
|
}, Se = {
|
|
283
283
|
type: "PartialBlock",
|
|
284
284
|
description: "A partial block component. Partial blocks are global blocks that can be used in multiple pages.",
|
|
@@ -422,7 +422,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
422
422
|
})
|
|
423
423
|
}, Ae = (e) => {
|
|
424
424
|
const { blockProps: o, styles: t } = e;
|
|
425
|
-
return
|
|
425
|
+
return x("hr", { ...t, ...o });
|
|
426
426
|
}, Ee = {
|
|
427
427
|
type: "Divider",
|
|
428
428
|
description: "A horizontal line component",
|
|
@@ -438,7 +438,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
438
438
|
}, Me = (e) => {
|
|
439
439
|
const { blockProps: o, styles: t, backgroundImage: l } = e;
|
|
440
440
|
let r = {};
|
|
441
|
-
return l && (r = { backgroundImage: `url(${l})` }),
|
|
441
|
+
return l && (r = { backgroundImage: `url(${l})` }), b.createElement("div", { ...o, ...t, style: r });
|
|
442
442
|
}, He = {
|
|
443
443
|
type: "EmptyBox",
|
|
444
444
|
description: "A box component with no children",
|
|
@@ -458,7 +458,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
458
458
|
})
|
|
459
459
|
}, $e = (e) => {
|
|
460
460
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: a, checked: s, showLabel: c = !0 } = e;
|
|
461
|
-
return c ? /* @__PURE__ */
|
|
461
|
+
return c ? /* @__PURE__ */ h("div", { ...r, ...o, children: [
|
|
462
462
|
/* @__PURE__ */ i("input", { ...n, name: t, type: "checkbox", required: a, defaultChecked: s }),
|
|
463
463
|
l && /* @__PURE__ */ i("label", { htmlFor: t, children: l })
|
|
464
464
|
] }) : /* @__PURE__ */ i(
|
|
@@ -515,7 +515,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
515
515
|
}, De = (e) => {
|
|
516
516
|
const { children: o, blockProps: t, errorMessage: l, successMessage: r, action: n, styles: a, inBuilder: s } = e;
|
|
517
517
|
let c = o;
|
|
518
|
-
return o || (c = /* @__PURE__ */ i(C, { inBuilder: s })), /* @__PURE__ */
|
|
518
|
+
return o || (c = /* @__PURE__ */ i(C, { inBuilder: s })), /* @__PURE__ */ h(
|
|
519
519
|
"form",
|
|
520
520
|
{
|
|
521
521
|
...{
|
|
@@ -537,7 +537,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
537
537
|
]
|
|
538
538
|
}
|
|
539
539
|
);
|
|
540
|
-
},
|
|
540
|
+
}, Ve = {
|
|
541
541
|
type: "Form",
|
|
542
542
|
label: "Form",
|
|
543
543
|
category: "core",
|
|
@@ -578,9 +578,9 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
578
578
|
i18nProps: ["errorMessage", "successMessage"],
|
|
579
579
|
aiProps: ["errorMessage", "successMessage"],
|
|
580
580
|
canAcceptBlock: () => !0
|
|
581
|
-
},
|
|
581
|
+
}, ze = (e) => {
|
|
582
582
|
const { blockProps: o, inBuilder: t, label: l, styles: r, icon: n, iconSize: a, iconPos: s } = e;
|
|
583
|
-
return /* @__PURE__ */
|
|
583
|
+
return /* @__PURE__ */ h("button", { ...r, ...o || {}, type: t ? "button" : "submit", "aria-label": l, children: [
|
|
584
584
|
l,
|
|
585
585
|
n && /* @__PURE__ */ i(
|
|
586
586
|
"div",
|
|
@@ -708,21 +708,21 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
708
708
|
inputStyles: a,
|
|
709
709
|
showLabel: s,
|
|
710
710
|
required: c,
|
|
711
|
-
inputType:
|
|
712
|
-
defaultValue:
|
|
713
|
-
} = e, { type:
|
|
714
|
-
return s ? /* @__PURE__ */
|
|
711
|
+
inputType: y,
|
|
712
|
+
defaultValue: g
|
|
713
|
+
} = e, { type: v, autocomplete: f } = Ue(y);
|
|
714
|
+
return s ? /* @__PURE__ */ h("div", { ...n, ...o, children: [
|
|
715
715
|
s && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
|
|
716
716
|
/* @__PURE__ */ i(
|
|
717
717
|
"input",
|
|
718
718
|
{
|
|
719
719
|
name: t,
|
|
720
|
-
defaultValue:
|
|
720
|
+
defaultValue: g,
|
|
721
721
|
...a,
|
|
722
|
-
type:
|
|
722
|
+
type: v,
|
|
723
723
|
placeholder: r,
|
|
724
724
|
required: c,
|
|
725
|
-
autoComplete:
|
|
725
|
+
autoComplete: f
|
|
726
726
|
}
|
|
727
727
|
)
|
|
728
728
|
] }) : /* @__PURE__ */ i(
|
|
@@ -732,11 +732,11 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
732
732
|
...o,
|
|
733
733
|
...a,
|
|
734
734
|
...n,
|
|
735
|
-
type:
|
|
735
|
+
type: v,
|
|
736
736
|
placeholder: r,
|
|
737
737
|
required: c,
|
|
738
|
-
autoComplete:
|
|
739
|
-
defaultValue:
|
|
738
|
+
autoComplete: f,
|
|
739
|
+
defaultValue: g
|
|
740
740
|
}
|
|
741
741
|
);
|
|
742
742
|
}, qe = {
|
|
@@ -856,7 +856,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
856
856
|
i18nProps: ["label", "placeholder"]
|
|
857
857
|
}, Ge = (e) => {
|
|
858
858
|
const { blockProps: o, content: t, styles: l, children: r } = e, n = { ...l, ...o };
|
|
859
|
-
return r ?
|
|
859
|
+
return r ? b.createElement("label", n, r) : b.createElement("label", {
|
|
860
860
|
...n,
|
|
861
861
|
dangerouslySetInnerHTML: { __html: t }
|
|
862
862
|
});
|
|
@@ -880,7 +880,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
880
880
|
i18nProps: ["content"]
|
|
881
881
|
}, Oe = (e) => {
|
|
882
882
|
const { blockProps: o, fieldName: t, label: l, styles: r, inputStyles: n, required: a, checked: s, showLabel: c = !0 } = e;
|
|
883
|
-
return c ? /* @__PURE__ */
|
|
883
|
+
return c ? /* @__PURE__ */ h("div", { ...r, ...o, children: [
|
|
884
884
|
/* @__PURE__ */ i("input", { ...n, name: t, type: "radio", required: a, defaultChecked: s }),
|
|
885
885
|
l && /* @__PURE__ */ i("label", { htmlFor: t, children: l })
|
|
886
886
|
] }) : /* @__PURE__ */ i(
|
|
@@ -944,38 +944,38 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
944
944
|
inputStyles: a,
|
|
945
945
|
required: s,
|
|
946
946
|
showLabel: c,
|
|
947
|
-
_multiple:
|
|
948
|
-
options:
|
|
949
|
-
defaultValue:
|
|
950
|
-
} = e,
|
|
951
|
-
return c ? /* @__PURE__ */
|
|
947
|
+
_multiple: y,
|
|
948
|
+
options: g,
|
|
949
|
+
defaultValue: v
|
|
950
|
+
} = e, f = y && v ? v.split(",").map((m) => m.trim()) : v || "";
|
|
951
|
+
return c ? /* @__PURE__ */ h("div", { ...n, ...o, children: [
|
|
952
952
|
c && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
|
|
953
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ h(
|
|
954
954
|
"select",
|
|
955
955
|
{
|
|
956
956
|
...a,
|
|
957
957
|
required: s,
|
|
958
|
-
multiple:
|
|
958
|
+
multiple: y,
|
|
959
959
|
name: t,
|
|
960
|
-
defaultValue:
|
|
960
|
+
defaultValue: f,
|
|
961
961
|
children: [
|
|
962
962
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
963
|
-
R(
|
|
963
|
+
R(g, (m) => /* @__PURE__ */ i("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
|
|
964
964
|
]
|
|
965
965
|
}
|
|
966
966
|
)
|
|
967
|
-
] }) : /* @__PURE__ */
|
|
967
|
+
] }) : /* @__PURE__ */ h(
|
|
968
968
|
"select",
|
|
969
969
|
{
|
|
970
970
|
...n,
|
|
971
971
|
...o,
|
|
972
972
|
required: s,
|
|
973
|
-
multiple:
|
|
973
|
+
multiple: y,
|
|
974
974
|
name: t,
|
|
975
|
-
defaultValue:
|
|
975
|
+
defaultValue: f,
|
|
976
976
|
children: [
|
|
977
977
|
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: r }),
|
|
978
|
-
R(
|
|
978
|
+
R(g, (m) => /* @__PURE__ */ i("option", { value: m == null ? void 0 : m.value, children: m == null ? void 0 : m.label }, m == null ? void 0 : m.value))
|
|
979
979
|
]
|
|
980
980
|
}
|
|
981
981
|
);
|
|
@@ -1049,8 +1049,8 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
1049
1049
|
aiProps: ["label", "placeholder"],
|
|
1050
1050
|
i18nProps: ["label", "placeholder"]
|
|
1051
1051
|
}, Xe = (e) => {
|
|
1052
|
-
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: a, rows: s, showLabel: c, required:
|
|
1053
|
-
return c ? /* @__PURE__ */
|
|
1052
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: r, styles: n, inputStyles: a, rows: s, showLabel: c, required: y, defaultValue: g } = e;
|
|
1053
|
+
return c ? /* @__PURE__ */ h("div", { ...n, ...o, children: [
|
|
1054
1054
|
c && /* @__PURE__ */ i("label", { htmlFor: t, children: l }),
|
|
1055
1055
|
/* @__PURE__ */ i(
|
|
1056
1056
|
"textarea",
|
|
@@ -1059,8 +1059,8 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
1059
1059
|
...a,
|
|
1060
1060
|
placeholder: r,
|
|
1061
1061
|
rows: s,
|
|
1062
|
-
required:
|
|
1063
|
-
defaultValue:
|
|
1062
|
+
required: y,
|
|
1063
|
+
defaultValue: g
|
|
1064
1064
|
}
|
|
1065
1065
|
)
|
|
1066
1066
|
] }) : /* @__PURE__ */ i(
|
|
@@ -1072,8 +1072,8 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
1072
1072
|
...n,
|
|
1073
1073
|
placeholder: r,
|
|
1074
1074
|
rows: s,
|
|
1075
|
-
required:
|
|
1076
|
-
defaultValue:
|
|
1075
|
+
required: y,
|
|
1076
|
+
defaultValue: g
|
|
1077
1077
|
}
|
|
1078
1078
|
);
|
|
1079
1079
|
}, Ke = {
|
|
@@ -1129,7 +1129,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
1129
1129
|
i18nProps: ["label", "placeholder"]
|
|
1130
1130
|
}, et = (e) => {
|
|
1131
1131
|
const { blockProps: o, styles: t, content: l, tag: r = "h1", children: n = null } = e;
|
|
1132
|
-
return n ?
|
|
1132
|
+
return n ? b.createElement(r, { ...t, ...o }, n) : b.createElement(r, {
|
|
1133
1133
|
...t,
|
|
1134
1134
|
...o,
|
|
1135
1135
|
dangerouslySetInnerHTML: { __html: l }
|
|
@@ -1163,7 +1163,7 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
1163
1163
|
canAcceptBlock: () => !0
|
|
1164
1164
|
}, ot = (e) => {
|
|
1165
1165
|
const { blockProps: o, styles: t } = e;
|
|
1166
|
-
return
|
|
1166
|
+
return x("br", { ...o, ...t });
|
|
1167
1167
|
}, lt = {
|
|
1168
1168
|
type: "LineBreak",
|
|
1169
1169
|
label: "Line Break",
|
|
@@ -1181,19 +1181,19 @@ const C = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ i("div",
|
|
|
1181
1181
|
canDuplicate: () => !1
|
|
1182
1182
|
}, rt = (e) => {
|
|
1183
1183
|
const { blockProps: o, children: t, styles: l } = e;
|
|
1184
|
-
return t ?
|
|
1184
|
+
return t ? x("table", { ...o, ...l }, t) : /* @__PURE__ */ i(C, {});
|
|
1185
1185
|
}, nt = (e) => {
|
|
1186
1186
|
const { blockProps: o, children: t, styles: l } = e;
|
|
1187
|
-
return t ?
|
|
1187
|
+
return t ? x("thead", { ...o, ...l }, t) : /* @__PURE__ */ i(C, {});
|
|
1188
1188
|
}, it = (e) => {
|
|
1189
1189
|
const { blockProps: o, children: t, styles: l } = e;
|
|
1190
|
-
return t ?
|
|
1190
|
+
return t ? x("tbody", { ...o, ...l }, t) : /* @__PURE__ */ i(C, {});
|
|
1191
1191
|
}, at = (e) => {
|
|
1192
1192
|
const { blockProps: o, children: t, styles: l } = e;
|
|
1193
|
-
return t ?
|
|
1193
|
+
return t ? x("tr", { ...o, ...l }, t) : /* @__PURE__ */ i(C, {});
|
|
1194
1194
|
}, st = (e) => {
|
|
1195
1195
|
const { blockProps: o, children: t, content: l, styles: r } = e;
|
|
1196
|
-
return !t &&
|
|
1196
|
+
return !t && w(l) ? /* @__PURE__ */ i(C, {}) : t ? x("td", { ...o, ...r }, t) : x("td", {
|
|
1197
1197
|
...o,
|
|
1198
1198
|
...r,
|
|
1199
1199
|
dangerouslySetInnerHTML: { __html: l }
|
|
@@ -1321,9 +1321,9 @@ function P(e) {
|
|
|
1321
1321
|
return e === "TableRow" ? t() : e === "TableHead" ? l() : e === "TableBody" ? r() : [];
|
|
1322
1322
|
}
|
|
1323
1323
|
const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNiIgZmlsbD0iI2Q1ZDdkYSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkltYWdlIFBsYWNlaG9sZGVyPC90ZXh0Pjwvc3ZnPg==", dt = (e) => {
|
|
1324
|
-
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: a, width: s, lazyLoading: c, mobileWidth:
|
|
1325
|
-
return
|
|
1326
|
-
l && /* @__PURE__ */ i("source", { srcSet: l, media: "(max-width: 480px)", width:
|
|
1324
|
+
const { blockProps: o, image: t, mobileImage: l, styles: r, alt: n, height: a, width: s, lazyLoading: c, mobileWidth: y, mobileHeight: g } = e;
|
|
1325
|
+
return w(t) ? /* @__PURE__ */ i(C, { className: "h-36" }) : /* @__PURE__ */ h("picture", { children: [
|
|
1326
|
+
l && /* @__PURE__ */ i("source", { srcSet: l, media: "(max-width: 480px)", width: y, height: g }),
|
|
1327
1327
|
/* @__PURE__ */ i(
|
|
1328
1328
|
"img",
|
|
1329
1329
|
{
|
|
@@ -1401,7 +1401,7 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1401
1401
|
}, ut = (e) => {
|
|
1402
1402
|
const { blockProps: o, link: t, children: l, styles: r, inBuilder: n, content: a } = e;
|
|
1403
1403
|
let s = {};
|
|
1404
|
-
return !l &&
|
|
1404
|
+
return !l && w(a) && (s = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? l ? /* @__PURE__ */ i("span", { role: "link", ...o, style: s, ...r, children: l }) : x(
|
|
1405
1405
|
"span",
|
|
1406
1406
|
{
|
|
1407
1407
|
...o,
|
|
@@ -1410,7 +1410,7 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1410
1410
|
role: "link"
|
|
1411
1411
|
},
|
|
1412
1412
|
a
|
|
1413
|
-
) : l ? /* @__PURE__ */ i("a", { "aria-label": a, href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...r, children: l }) :
|
|
1413
|
+
) : l ? /* @__PURE__ */ i("a", { "aria-label": a, href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...r, children: l }) : x(
|
|
1414
1414
|
"a",
|
|
1415
1415
|
{
|
|
1416
1416
|
...o,
|
|
@@ -1464,7 +1464,7 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1464
1464
|
canAcceptBlock: (e) => e !== "Link"
|
|
1465
1465
|
}, yt = (e) => {
|
|
1466
1466
|
const { blockProps: o, children: t, styles: l, tag: r, inBuilder: n } = e;
|
|
1467
|
-
return !t &&
|
|
1467
|
+
return !t && w(l == null ? void 0 : l.className) ? /* @__PURE__ */ i(C, { inBuilder: n }) : b.createElement(r || "ul", { ...o, ...l }, t);
|
|
1468
1468
|
}, gt = {
|
|
1469
1469
|
type: "List",
|
|
1470
1470
|
description: "A list component",
|
|
@@ -1504,7 +1504,7 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1504
1504
|
]
|
|
1505
1505
|
}, bt = (e) => {
|
|
1506
1506
|
const { blockProps: o, content: t, styles: l, children: r, tag: n } = e;
|
|
1507
|
-
return r ?
|
|
1507
|
+
return r ? b.createElement(n || "li", { ...l, ...o }, r) : b.createElement(n || "li", {
|
|
1508
1508
|
...l,
|
|
1509
1509
|
...o,
|
|
1510
1510
|
dangerouslySetInnerHTML: { __html: t }
|
|
@@ -1535,9 +1535,9 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1535
1535
|
canBeNested: (e) => e === "List" || e === "Repeater"
|
|
1536
1536
|
}, ht = (e) => {
|
|
1537
1537
|
const { blockProps: o, styles: t, content: l } = e;
|
|
1538
|
-
if (!ye(e.children)) return
|
|
1538
|
+
if (!ye(e.children)) return b.createElement("p", { ...t, ...o }, e.children);
|
|
1539
1539
|
const r = T(t, "rte");
|
|
1540
|
-
return
|
|
1540
|
+
return b.createElement("div", {
|
|
1541
1541
|
...r,
|
|
1542
1542
|
...o,
|
|
1543
1543
|
dangerouslySetInnerHTML: { __html: l }
|
|
@@ -1589,7 +1589,7 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1589
1589
|
i18nProps: ["content"]
|
|
1590
1590
|
}, vt = (e) => {
|
|
1591
1591
|
const { blockProps: o, styles: t, content: l, children: r = null, tag: n } = e;
|
|
1592
|
-
return r ?
|
|
1592
|
+
return r ? b.createElement("span", { ...t, ...o }, r) : b.createElement(n || "span", {
|
|
1593
1593
|
...t,
|
|
1594
1594
|
...o,
|
|
1595
1595
|
dangerouslySetInnerHTML: { __html: l || "" }
|
|
@@ -1671,8 +1671,8 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1671
1671
|
const a = e.match(A);
|
|
1672
1672
|
if (a) {
|
|
1673
1673
|
const s = a[4];
|
|
1674
|
-
let c = `https://www.youtube.com/embed/${s}`,
|
|
1675
|
-
return
|
|
1674
|
+
let c = `https://www.youtube.com/embed/${s}`, y = t ? "autoplay=1" : "";
|
|
1675
|
+
return y += r ? `&loop=1&playlist=${s}` : "", y += n ? "&mute=1&muted=1" : "", y += l ? "&controls=1" : "&controls=0", `${c}?${y}`;
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
1678
|
if (E.test(e)) {
|
|
@@ -1685,41 +1685,42 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1685
1685
|
}
|
|
1686
1686
|
return null;
|
|
1687
1687
|
}, Bt = (e) => {
|
|
1688
|
-
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: a } = e,
|
|
1689
|
-
return /* @__PURE__ */
|
|
1690
|
-
!
|
|
1688
|
+
const { url: o, blockProps: t, styles: l, controls: r, videoSource: n, inBuilder: a, title: s } = e, c = Lt(o, r);
|
|
1689
|
+
return /* @__PURE__ */ h("div", { ...z(l, "className"), className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
1690
|
+
!c && a ? /* @__PURE__ */ i("div", { className: "absolute flex h-full w-full items-center justify-center bg-gray-300 text-center", children: w(o) ? `Provided ${n} video link in settings Video URL.` : `Provided ${n} video link is invalid.` }) : /* @__PURE__ */ i("iframe", { width: "100%", src: c, title: s || "Video player", ...F(l, "className") }),
|
|
1691
1691
|
a && /* @__PURE__ */ i("div", { ...t, className: "absolute top-0 h-full w-full" })
|
|
1692
1692
|
] });
|
|
1693
1693
|
}, St = (e) => {
|
|
1694
|
-
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: a } = e;
|
|
1695
|
-
let
|
|
1696
|
-
const
|
|
1697
|
-
o && typeof o == "string" &&
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1700
|
-
const
|
|
1701
|
-
return (
|
|
1694
|
+
const { url: o, styles: t, controls: l, sources: r, poster: n, blockProps: a, title: s } = e;
|
|
1695
|
+
let c = n;
|
|
1696
|
+
const y = [...k(r, "srcsets", []) || []];
|
|
1697
|
+
o && typeof o == "string" && y.push({ url: o, width: "9999" });
|
|
1698
|
+
const g = y.sort((f, m) => parseInt(f.width) - parseInt(m.width)).filter((f) => !w(f.url) && !w(f.width));
|
|
1699
|
+
g.length === 0 && !c && (c = "https://placehold.co/300x200/EEE/ccc?text=Choose%20Video");
|
|
1700
|
+
const v = k(l, "autoplay", !1) || k(l, "muted", !0);
|
|
1701
|
+
return (c || !w(g)) && /* @__PURE__ */ i("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: /* @__PURE__ */ x(
|
|
1702
1702
|
"video",
|
|
1703
1703
|
{
|
|
1704
1704
|
...t,
|
|
1705
1705
|
...a,
|
|
1706
|
-
|
|
1706
|
+
title: s || "Video player",
|
|
1707
|
+
key: JSON.stringify(g),
|
|
1707
1708
|
controls: k(l, "controls", !1),
|
|
1708
1709
|
autoPlay: k(l, "autoplay", !1),
|
|
1709
1710
|
loop: k(l, "loop", !1),
|
|
1710
|
-
poster:
|
|
1711
|
-
...
|
|
1711
|
+
poster: c,
|
|
1712
|
+
...v ? { muted: !0 } : {}
|
|
1712
1713
|
},
|
|
1713
|
-
|
|
1714
|
-
if (!
|
|
1715
|
-
const
|
|
1716
|
-
return /* @__PURE__ */ i("source", { src:
|
|
1714
|
+
g.map((f) => {
|
|
1715
|
+
if (!f.url || f.url.length < 4 || isNaN(f.width)) return null;
|
|
1716
|
+
const m = `(max-width: ${f.width}px)`;
|
|
1717
|
+
return /* @__PURE__ */ i("source", { src: f.url, media: m, type: f.type }, f.url);
|
|
1717
1718
|
}),
|
|
1718
1719
|
"Your browser does not support the video tag."
|
|
1719
1720
|
) });
|
|
1720
1721
|
}, Nt = (e) => {
|
|
1721
1722
|
const { videoSource: o } = e;
|
|
1722
|
-
return o === "Custom" ? /* @__PURE__ */ i(St, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ i(Bt, { ...e }) : /* @__PURE__ */
|
|
1723
|
+
return o === "Custom" ? /* @__PURE__ */ i(St, { ...e }) : o === "Youtube" || o === "Vimeo" ? /* @__PURE__ */ i(Bt, { ...e }) : /* @__PURE__ */ h("div", { children: [
|
|
1723
1724
|
"Invalid video source : ",
|
|
1724
1725
|
o
|
|
1725
1726
|
] });
|
|
@@ -1737,6 +1738,11 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1737
1738
|
default: "Custom",
|
|
1738
1739
|
enum: ["Custom", "Youtube", "Vimeo"],
|
|
1739
1740
|
title: "Video source"
|
|
1741
|
+
},
|
|
1742
|
+
title: {
|
|
1743
|
+
type: "string",
|
|
1744
|
+
title: "Video Title",
|
|
1745
|
+
default: "Video player"
|
|
1740
1746
|
}
|
|
1741
1747
|
},
|
|
1742
1748
|
allOf: [
|
|
@@ -1807,10 +1813,10 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1807
1813
|
poster: { "ui:placeholder": "Enter poster URL" }
|
|
1808
1814
|
}
|
|
1809
1815
|
}),
|
|
1810
|
-
i18nProps: ["url"]
|
|
1816
|
+
i18nProps: ["url", "title"]
|
|
1811
1817
|
}, Tt = (e) => {
|
|
1812
1818
|
const { paginationStyles: o } = e, t = U("Pagination");
|
|
1813
|
-
return /* @__PURE__ */ i("div", { ...o, children: t ?
|
|
1819
|
+
return /* @__PURE__ */ i("div", { ...o, children: t ? b.createElement(t.component, { ...z(e, ["paginationStyles"]), blockProps: {} }) : /* @__PURE__ */ h(N, { children: [
|
|
1814
1820
|
/* @__PURE__ */ i(
|
|
1815
1821
|
"button",
|
|
1816
1822
|
{
|
|
@@ -1829,17 +1835,17 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1829
1835
|
}, Rt = (e) => {
|
|
1830
1836
|
const { children: o, tag: t, styles: l, blockProps: r, $loading: n } = e, { pagination: a, inBuilder: s } = e;
|
|
1831
1837
|
let c = o;
|
|
1832
|
-
return
|
|
1838
|
+
return w(c) && s && (c = /* @__PURE__ */ i("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Choose a collection to display items" })), t === "none" ? n && s ? Array.from({ length: 2 }).map((y, g) => /* @__PURE__ */ h("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1833
1839
|
/* @__PURE__ */ i("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1834
1840
|
/* @__PURE__ */ i("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1835
|
-
] },
|
|
1836
|
-
|
|
1841
|
+
] }, g)) : c : /* @__PURE__ */ h(N, { children: [
|
|
1842
|
+
b.createElement(
|
|
1837
1843
|
t,
|
|
1838
1844
|
{ ...r, ...l },
|
|
1839
|
-
n && s ? Array.from({ length: 2 }).map((
|
|
1845
|
+
n && s ? Array.from({ length: 2 }).map((y, g) => /* @__PURE__ */ h("div", { className: "animate-pulse rounded-md bg-primary/10 p-5", children: [
|
|
1840
1846
|
/* @__PURE__ */ i("div", { className: "h-6 w-1/2 rounded-md bg-primary/10" }),
|
|
1841
1847
|
/* @__PURE__ */ i("div", { className: "mt-2 h-4 w-1/2 rounded-md bg-primary/10" })
|
|
1842
|
-
] },
|
|
1848
|
+
] }, g)) : c
|
|
1843
1849
|
),
|
|
1844
1850
|
a && /* @__PURE__ */ i(
|
|
1845
1851
|
Tt,
|
|
@@ -1859,7 +1865,7 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1859
1865
|
}, At = {
|
|
1860
1866
|
type: "Repeater",
|
|
1861
1867
|
label: "Repeater",
|
|
1862
|
-
icon:
|
|
1868
|
+
icon: V,
|
|
1863
1869
|
group: "basic",
|
|
1864
1870
|
description: "Repeater block is used to display a list of items based on data binding in repeaterItems",
|
|
1865
1871
|
dataProviderMode: "live",
|
|
@@ -1969,15 +1975,15 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1969
1975
|
default:
|
|
1970
1976
|
n = "div";
|
|
1971
1977
|
}
|
|
1972
|
-
return !e && r ?
|
|
1978
|
+
return !e && r ? b.createElement(
|
|
1973
1979
|
n,
|
|
1974
1980
|
{ ...o, ...t },
|
|
1975
1981
|
/* @__PURE__ */ i("div", { className: "col-span-3 flex items-center justify-center bg-orange-50 p-5 text-sm text-muted-foreground", children: "Add children to repeater item" })
|
|
1976
|
-
) :
|
|
1982
|
+
) : b.createElement(n, { ...o, ...t }, e);
|
|
1977
1983
|
}, Mt = {
|
|
1978
1984
|
type: "RepeaterItem",
|
|
1979
1985
|
label: "Repeater Item",
|
|
1980
|
-
icon:
|
|
1986
|
+
icon: V,
|
|
1981
1987
|
hidden: !0,
|
|
1982
1988
|
group: "basic",
|
|
1983
1989
|
...p({
|
|
@@ -1994,7 +2000,7 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
1994
2000
|
children: e,
|
|
1995
2001
|
blockProps: o,
|
|
1996
2002
|
styles: t
|
|
1997
|
-
}) =>
|
|
2003
|
+
}) => b.createElement("div", { ...o, ...t }, e), $t = {
|
|
1998
2004
|
type: "RepeaterEmptyState",
|
|
1999
2005
|
label: "Empty State",
|
|
2000
2006
|
hidden: !0,
|
|
@@ -2007,7 +2013,7 @@ const ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
|
|
|
2007
2013
|
canMove: () => !1,
|
|
2008
2014
|
canDuplicate: () => !1
|
|
2009
2015
|
}, Zt = () => {
|
|
2010
|
-
d(ge, be), d(Me, He), d(fe, he), d(et, tt), d(ht, kt), d(vt, Ct), d(xt, wt), d(ut, mt), d(yt, gt), d(bt, ft), d(Pe, Le), d(dt, pt), d(Nt, _t), d(ke, xe), d(we, ve), d(It, Pt), d(De,
|
|
2016
|
+
d(ge, be), d(Me, He), d(fe, he), d(et, tt), d(ht, kt), d(vt, Ct), d(xt, wt), d(ut, mt), d(yt, gt), d(bt, ft), d(Pe, Le), d(dt, pt), d(Nt, _t), d(ke, xe), d(we, ve), d(It, Pt), d(De, Ve), d(ze, Fe), d(Ze, qe), d($e, je), d(Oe, Ye), d(Qe, Je), d(Xe, Ke), d(Ge, We), d(ot, lt), d(Ae, Ee), d(Ce, Ie), d(Be, Se), d(Te, Re), d(Ne, _e), d(Rt, At), d(Et, Mt), d(Ht, $t);
|
|
2011
2017
|
};
|
|
2012
2018
|
export {
|
|
2013
2019
|
Zt as loadWebBlocks
|