@chaibuilder/sdk 2.0.0-beta.27 → 2.0.0-beta.28
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 +363 -366
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +291 -248
- package/package.json +1 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as u, StylesProp as c, registerChaiBlock as d, closestBlockProp as P, runtimeProp as
|
|
2
|
-
import { j as
|
|
1
|
+
import { registerChaiBlockSchema as u, StylesProp as c, registerChaiBlock as d, closestBlockProp as P, runtimeProp as D } from "@chaibuilder/runtime";
|
|
2
|
+
import { j as s } from "./jsx-runtime-Sp0orL4X.js";
|
|
3
3
|
import * as y from "react";
|
|
4
|
-
import { c as _, G as
|
|
5
|
-
import { ButtonIcon as
|
|
6
|
-
import { isEmpty as k, get as
|
|
7
|
-
import { GlobeIcon as
|
|
4
|
+
import { c as _, G as A, g as v } from "./iconBase-Ief2hJUZ.js";
|
|
5
|
+
import { ButtonIcon as M, CodeIcon as z, HeadingIcon as H, TextIcon as R, CursorTextIcon as q, Link1Icon as G, ImageIcon as N, RowsIcon as F, ColumnsIcon as U, SketchLogoIcon as V, VideoIcon as O, DividerHorizontalIcon as W, MoonIcon as X, SpaceBetweenVerticallyIcon as Y, InputIcon as E, RadiobuttonIcon as Z, DropdownMenuIcon as $, CheckboxIcon as J, LetterCaseToggleIcon as K } from "@radix-ui/react-icons";
|
|
6
|
+
import { isEmpty as k, get as f, isNull as Q, pick as ee, omit as te, map as C } from "lodash-es";
|
|
7
|
+
import { GlobeIcon as oe, GroupIcon as le, Columns as ne, Rows as se } from "lucide-react";
|
|
8
8
|
import "clsx";
|
|
9
9
|
import "tailwind-merge";
|
|
10
|
-
const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */
|
|
11
|
-
const { blockProps: o, inBuilder: t, backgroundImage:
|
|
12
|
-
let a =
|
|
13
|
-
|
|
10
|
+
const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ s.jsx("div", { className: _("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ s.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, w = re, ie = (e) => {
|
|
11
|
+
const { blockProps: o, inBuilder: t, backgroundImage: l, children: n, tag: r = "div", styles: i } = e;
|
|
12
|
+
let a = n;
|
|
13
|
+
n || (a = /* @__PURE__ */ s.jsx(w, { inBuilder: t }));
|
|
14
14
|
let p = {};
|
|
15
|
-
return
|
|
16
|
-
},
|
|
15
|
+
return l && (p = { backgroundImage: `url(${l})` }), y.createElement(r, { ...o, ...i, style: p }, a);
|
|
16
|
+
}, ae = {
|
|
17
17
|
type: "Box",
|
|
18
18
|
label: "Box",
|
|
19
19
|
category: "core",
|
|
@@ -54,10 +54,10 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
54
54
|
}
|
|
55
55
|
}),
|
|
56
56
|
canAcceptBlock: () => !0
|
|
57
|
-
},
|
|
58
|
-
const { blockProps: o, iconSize: t, icon:
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
h && /* @__PURE__ */
|
|
57
|
+
}, ce = (e) => {
|
|
58
|
+
const { blockProps: o, iconSize: t, icon: l, content: n, styles: r, children: i, iconPos: a, link: p, inBuilder: g } = e, h = l, b = i || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
59
|
+
/* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", children: n }),
|
|
60
|
+
h && /* @__PURE__ */ s.jsx(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
style: { width: t + "px" },
|
|
@@ -69,17 +69,17 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
69
69
|
"button",
|
|
70
70
|
{
|
|
71
71
|
...o,
|
|
72
|
-
...
|
|
72
|
+
...r,
|
|
73
73
|
type: "button"
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
b
|
|
76
76
|
);
|
|
77
|
-
return k(
|
|
78
|
-
},
|
|
77
|
+
return k(f(p, "href")) ? m : g ? /* @__PURE__ */ s.jsx("span", { children: m }) : /* @__PURE__ */ s.jsx("a", { href: f(p, "href") || "/", target: f(p, "target", "_self"), children: m });
|
|
78
|
+
}, pe = {
|
|
79
79
|
type: "Button",
|
|
80
80
|
label: "Button",
|
|
81
81
|
category: "core",
|
|
82
|
-
icon:
|
|
82
|
+
icon: M,
|
|
83
83
|
group: "basic",
|
|
84
84
|
...u({
|
|
85
85
|
properties: {
|
|
@@ -126,20 +126,20 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
126
126
|
}),
|
|
127
127
|
i18nProps: ["content"],
|
|
128
128
|
aiProps: ["content"]
|
|
129
|
-
},
|
|
130
|
-
const { blockProps: o, styles: t, htmlCode:
|
|
131
|
-
return
|
|
132
|
-
|
|
129
|
+
}, de = (e) => {
|
|
130
|
+
const { blockProps: o, styles: t, htmlCode: l, inBuilder: n } = e;
|
|
131
|
+
return n ? /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
|
|
132
|
+
n ? /* @__PURE__ */ s.jsx("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
133
133
|
y.createElement("div", {
|
|
134
134
|
...t,
|
|
135
|
-
dangerouslySetInnerHTML: { __html:
|
|
135
|
+
dangerouslySetInnerHTML: { __html: l.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
136
136
|
})
|
|
137
137
|
] }) : y.createElement("div", {
|
|
138
138
|
...o,
|
|
139
139
|
...t,
|
|
140
|
-
dangerouslySetInnerHTML: { __html:
|
|
140
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, ue = {
|
|
143
143
|
type: "CustomHTML",
|
|
144
144
|
label: "web_blocks.custom_html",
|
|
145
145
|
category: "core",
|
|
@@ -155,11 +155,11 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
})
|
|
158
|
-
},
|
|
159
|
-
const { blockProps: o, styles: t, backgroundImage:
|
|
160
|
-
let
|
|
161
|
-
return
|
|
162
|
-
},
|
|
158
|
+
}, ge = (e) => {
|
|
159
|
+
const { blockProps: o, styles: t, backgroundImage: l } = e;
|
|
160
|
+
let n = {};
|
|
161
|
+
return l && (n = { backgroundImage: `url(${l})` }), y.createElement("div", { ...o, ...t, style: n });
|
|
162
|
+
}, ye = {
|
|
163
163
|
type: "EmptyBox",
|
|
164
164
|
label: "Empty Box",
|
|
165
165
|
category: "core",
|
|
@@ -175,14 +175,14 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
})
|
|
178
|
-
},
|
|
179
|
-
const { blockProps: o, styles: t, content:
|
|
180
|
-
return
|
|
178
|
+
}, me = (e) => {
|
|
179
|
+
const { blockProps: o, styles: t, content: l, tag: n = "h1", children: r = null } = e;
|
|
180
|
+
return r ? y.createElement(n, { ...t, ...o }, r) : y.createElement(n, {
|
|
181
181
|
...t,
|
|
182
182
|
...o,
|
|
183
|
-
dangerouslySetInnerHTML: { __html:
|
|
183
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
184
184
|
});
|
|
185
|
-
},
|
|
185
|
+
}, he = {
|
|
186
186
|
type: "Heading",
|
|
187
187
|
label: "web_blocks.heading",
|
|
188
188
|
category: "core",
|
|
@@ -208,14 +208,14 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
208
208
|
aiProps: ["content"],
|
|
209
209
|
i18nProps: ["content"],
|
|
210
210
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
211
|
-
},
|
|
212
|
-
const { blockProps: o, styles: t, content:
|
|
213
|
-
return
|
|
211
|
+
}, fe = (e) => {
|
|
212
|
+
const { blockProps: o, styles: t, content: l } = e;
|
|
213
|
+
return Q(e.children) ? y.createElement("p", {
|
|
214
214
|
...t,
|
|
215
215
|
...o,
|
|
216
|
-
dangerouslySetInnerHTML: { __html:
|
|
216
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
217
217
|
}) : y.createElement("p", { ...t, ...o }, e.children);
|
|
218
|
-
},
|
|
218
|
+
}, be = {
|
|
219
219
|
type: "Paragraph",
|
|
220
220
|
label: "Paragraph",
|
|
221
221
|
category: "core",
|
|
@@ -237,14 +237,14 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
237
237
|
i18nProps: ["content"],
|
|
238
238
|
aiProps: ["content"],
|
|
239
239
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
240
|
-
},
|
|
241
|
-
const { blockProps: o, styles: t, content:
|
|
242
|
-
return
|
|
240
|
+
}, ke = (e) => {
|
|
241
|
+
const { blockProps: o, styles: t, content: l, children: n = null, tag: r } = e;
|
|
242
|
+
return n ? y.createElement("span", { ...t, ...o }, n) : y.createElement(r || "span", {
|
|
243
243
|
...t,
|
|
244
244
|
...o,
|
|
245
|
-
dangerouslySetInnerHTML: { __html:
|
|
245
|
+
dangerouslySetInnerHTML: { __html: l || "" }
|
|
246
246
|
});
|
|
247
|
-
},
|
|
247
|
+
}, xe = {
|
|
248
248
|
type: "Span",
|
|
249
249
|
label: "Span",
|
|
250
250
|
category: "core",
|
|
@@ -263,14 +263,14 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
263
263
|
aiProps: ["content"],
|
|
264
264
|
i18nProps: ["content"],
|
|
265
265
|
canAcceptBlock: () => !0
|
|
266
|
-
},
|
|
267
|
-
const { blockProps: o, content: t, styles:
|
|
268
|
-
return /* @__PURE__ */
|
|
269
|
-
},
|
|
266
|
+
}, we = (e) => {
|
|
267
|
+
const { blockProps: o, content: t, styles: l } = e;
|
|
268
|
+
return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx("div", { ...o, ...l, dangerouslySetInnerHTML: { __html: t } }) });
|
|
269
|
+
}, ve = {
|
|
270
270
|
type: "RichText",
|
|
271
271
|
label: "Rich Text",
|
|
272
272
|
category: "core",
|
|
273
|
-
icon:
|
|
273
|
+
icon: q,
|
|
274
274
|
group: "typography",
|
|
275
275
|
...u({
|
|
276
276
|
properties: {
|
|
@@ -285,32 +285,32 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
285
285
|
}),
|
|
286
286
|
aiProps: ["content"],
|
|
287
287
|
i18nProps: ["content"]
|
|
288
|
-
},
|
|
289
|
-
const { blockProps: o, link: t, children:
|
|
288
|
+
}, _e = (e) => {
|
|
289
|
+
const { blockProps: o, link: t, children: l, styles: n, inBuilder: r, content: i } = e;
|
|
290
290
|
let a = {};
|
|
291
|
-
return !
|
|
291
|
+
return !l && k(i) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), r ? l ? /* @__PURE__ */ s.jsx("span", { ...o, style: a, ...n, children: l }) : y.createElement(
|
|
292
292
|
"span",
|
|
293
293
|
{
|
|
294
294
|
...o,
|
|
295
|
-
...
|
|
295
|
+
...n,
|
|
296
296
|
style: a
|
|
297
297
|
},
|
|
298
298
|
i
|
|
299
|
-
) :
|
|
299
|
+
) : l ? /* @__PURE__ */ s.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...o, ...n, children: l }) : y.createElement(
|
|
300
300
|
"a",
|
|
301
301
|
{
|
|
302
302
|
...o,
|
|
303
|
-
...
|
|
303
|
+
...n,
|
|
304
304
|
href: (t == null ? void 0 : t.href) || "#",
|
|
305
305
|
target: (t == null ? void 0 : t.target) || "_self"
|
|
306
306
|
},
|
|
307
307
|
i
|
|
308
308
|
);
|
|
309
|
-
},
|
|
309
|
+
}, Ie = {
|
|
310
310
|
type: "Link",
|
|
311
311
|
label: "Link",
|
|
312
312
|
category: "core",
|
|
313
|
-
icon:
|
|
313
|
+
icon: G,
|
|
314
314
|
group: "basic",
|
|
315
315
|
...u({
|
|
316
316
|
properties: {
|
|
@@ -344,29 +344,29 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
344
344
|
}, T = (e, ...o) => ({
|
|
345
345
|
...e,
|
|
346
346
|
className: _(e.className, ...o)
|
|
347
|
-
}),
|
|
348
|
-
const { blockProps: o, children: t, styles:
|
|
349
|
-
if (!t && k(
|
|
350
|
-
return /* @__PURE__ */
|
|
351
|
-
if (
|
|
352
|
-
return t ? /* @__PURE__ */
|
|
347
|
+
}), Le = (e) => {
|
|
348
|
+
const { blockProps: o, children: t, styles: l, inBuilder: n, content: r, href: i } = e, { hrefType: a, autoplay: p, maxWidth: g, backdropColor: h, galleryName: b } = e, m = T(l, "cb-lightbox");
|
|
349
|
+
if (!t && k(l == null ? void 0 : l.className) && k(r))
|
|
350
|
+
return /* @__PURE__ */ s.jsx(w, { inBuilder: n });
|
|
351
|
+
if (n)
|
|
352
|
+
return t ? /* @__PURE__ */ s.jsx("span", { ...o, ...m, children: t }) : y.createElement("span", {
|
|
353
353
|
...o,
|
|
354
354
|
...m,
|
|
355
|
-
dangerouslySetInnerHTML: { __html:
|
|
355
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
356
356
|
});
|
|
357
357
|
const x = {};
|
|
358
|
-
return a !== "image" && (x["data-vbtype"] = a), p && (x["data-autoplay"] = "true"), g && (x["data-maxwidth"] = g + "px"), h && (x["data-overlay"] = h),
|
|
358
|
+
return a !== "image" && (x["data-vbtype"] = a), p && (x["data-autoplay"] = "true"), g && (x["data-maxwidth"] = g + "px"), h && (x["data-overlay"] = h), b && (x["data-gall"] = b), t ? /* @__PURE__ */ s.jsx("a", { ...x, href: i || "#/", ...o, ...m, children: t }) : y.createElement("a", {
|
|
359
359
|
...o,
|
|
360
360
|
...m,
|
|
361
361
|
...x,
|
|
362
362
|
href: i || "#",
|
|
363
|
-
dangerouslySetInnerHTML: { __html:
|
|
363
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
364
364
|
});
|
|
365
|
-
},
|
|
365
|
+
}, Ce = {
|
|
366
366
|
type: "LightBoxLink",
|
|
367
367
|
label: "Lightbox Link",
|
|
368
368
|
category: "core",
|
|
369
|
-
icon:
|
|
369
|
+
icon: N,
|
|
370
370
|
group: "basic",
|
|
371
371
|
...u({
|
|
372
372
|
properties: {
|
|
@@ -417,13 +417,13 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
417
417
|
aiProps: ["content"],
|
|
418
418
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
419
419
|
}, Be = (e) => {
|
|
420
|
-
const { blockProps: o, children: t, listType:
|
|
421
|
-
return !t && k(
|
|
422
|
-
|
|
423
|
-
{ ...o, ...
|
|
420
|
+
const { blockProps: o, children: t, listType: l, styles: n, tag: r, inBuilder: i } = e, a = _(f(n, "className", ""), l);
|
|
421
|
+
return !t && k(n == null ? void 0 : n.className) ? /* @__PURE__ */ s.jsx(w, { inBuilder: i }) : y.createElement(
|
|
422
|
+
r || (l === "list-decimal" ? "ol" : "ul"),
|
|
423
|
+
{ ...o, ...n, className: a },
|
|
424
424
|
t
|
|
425
425
|
);
|
|
426
|
-
},
|
|
426
|
+
}, je = {
|
|
427
427
|
type: "List",
|
|
428
428
|
label: "web_blocks.list",
|
|
429
429
|
icon: F,
|
|
@@ -469,17 +469,17 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
469
469
|
content: "Item 3"
|
|
470
470
|
}
|
|
471
471
|
]
|
|
472
|
-
},
|
|
473
|
-
const { blockProps: o, content: t, styles:
|
|
474
|
-
return
|
|
475
|
-
...
|
|
472
|
+
}, Se = (e) => {
|
|
473
|
+
const { blockProps: o, content: t, styles: l, children: n, tag: r } = e;
|
|
474
|
+
return n ? y.createElement(r || "li", { ...l, ...o }, n) : y.createElement(r || "li", {
|
|
475
|
+
...l,
|
|
476
476
|
...o,
|
|
477
477
|
dangerouslySetInnerHTML: { __html: t }
|
|
478
478
|
});
|
|
479
479
|
}, Pe = {
|
|
480
480
|
type: "ListItem",
|
|
481
481
|
label: "List Item",
|
|
482
|
-
icon:
|
|
482
|
+
icon: U,
|
|
483
483
|
category: "core",
|
|
484
484
|
group: "basic",
|
|
485
485
|
...u({
|
|
@@ -499,17 +499,17 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
499
499
|
aiProps: ["content"],
|
|
500
500
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
501
501
|
canBeNested: (e) => e === "List"
|
|
502
|
-
},
|
|
503
|
-
const { blockProps: o, icon: t, styles:
|
|
502
|
+
}, Me = (e) => {
|
|
503
|
+
const { blockProps: o, icon: t, styles: l, width: n, inBuilder: r, height: i } = e, a = T(l, _(n ? `w-[${n}px]` : "", i ? `h-[${i}px]` : ""));
|
|
504
504
|
if (k(t))
|
|
505
|
-
return /* @__PURE__ */
|
|
505
|
+
return /* @__PURE__ */ s.jsx(w, { inBuilder: r, className: "h-8 w-14" });
|
|
506
506
|
const p = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
507
507
|
return y.createElement("span", {
|
|
508
508
|
...o,
|
|
509
509
|
...a,
|
|
510
510
|
dangerouslySetInnerHTML: { __html: p }
|
|
511
511
|
});
|
|
512
|
-
},
|
|
512
|
+
}, Ne = {
|
|
513
513
|
type: "Icon",
|
|
514
514
|
label: "web_blocks.icon",
|
|
515
515
|
category: "core",
|
|
@@ -536,17 +536,17 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
})
|
|
539
|
-
},
|
|
540
|
-
const { blockProps: o, image: t, mobileImage:
|
|
541
|
-
return k(t) ? /* @__PURE__ */
|
|
542
|
-
|
|
543
|
-
/* @__PURE__ */
|
|
539
|
+
}, Ee = (e) => {
|
|
540
|
+
const { blockProps: o, image: t, mobileImage: l, styles: n, alt: r, height: i, width: a, lazyLoading: p } = e;
|
|
541
|
+
return k(t) ? /* @__PURE__ */ s.jsx(w, { className: "h-36" }) : /* @__PURE__ */ s.jsxs("picture", { children: [
|
|
542
|
+
l && /* @__PURE__ */ s.jsx("source", { srcSet: l, media: "(max-width: 480px)" }),
|
|
543
|
+
/* @__PURE__ */ s.jsx(
|
|
544
544
|
"img",
|
|
545
545
|
{
|
|
546
546
|
...o,
|
|
547
|
-
...
|
|
547
|
+
...n,
|
|
548
548
|
src: t,
|
|
549
|
-
alt:
|
|
549
|
+
alt: r,
|
|
550
550
|
loading: p ? "lazy" : "eager",
|
|
551
551
|
width: a,
|
|
552
552
|
height: i
|
|
@@ -557,7 +557,7 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
557
557
|
type: "Image",
|
|
558
558
|
label: "Image",
|
|
559
559
|
category: "core",
|
|
560
|
-
icon:
|
|
560
|
+
icon: N,
|
|
561
561
|
group: "media",
|
|
562
562
|
...u({
|
|
563
563
|
properties: {
|
|
@@ -601,31 +601,31 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
601
601
|
}),
|
|
602
602
|
aiProps: ["alt"],
|
|
603
603
|
i18nProps: ["alt"]
|
|
604
|
-
}, B = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/,
|
|
604
|
+
}, B = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, j = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, S = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Te = (e) => {
|
|
605
605
|
if (B.test(e)) {
|
|
606
606
|
const o = e.match(B);
|
|
607
607
|
return o ? `https://www.youtube.com/embed/${o[4]}` : e;
|
|
608
608
|
}
|
|
609
|
-
if (L.test(e)) {
|
|
610
|
-
const o = e.match(L);
|
|
611
|
-
return o ? `https://player.vimeo.com/video/${o[3]}` : e;
|
|
612
|
-
}
|
|
613
609
|
if (j.test(e)) {
|
|
614
610
|
const o = e.match(j);
|
|
611
|
+
return o ? `https://player.vimeo.com/video/${o[3]}` : e;
|
|
612
|
+
}
|
|
613
|
+
if (S.test(e)) {
|
|
614
|
+
const o = e.match(S);
|
|
615
615
|
return o ? `https://www.dailymotion.com/embed/video/${o[4]}` : e;
|
|
616
616
|
}
|
|
617
617
|
return null;
|
|
618
|
-
},
|
|
619
|
-
const { blockProps: o, inBuilder: t, styles:
|
|
620
|
-
if (k(
|
|
621
|
-
return /* @__PURE__ */
|
|
622
|
-
let h = Te(
|
|
618
|
+
}, De = y.memo((e) => {
|
|
619
|
+
const { blockProps: o, inBuilder: t, styles: l, url: n, controls: r } = e, i = f(r, "autoPlay", !1), a = f(r, "controls", !1), p = i || f(r, "muted", !0), g = f(r, "loop", !1);
|
|
620
|
+
if (k(n))
|
|
621
|
+
return /* @__PURE__ */ s.jsx(w, { inBuilder: t, className: "h-36" });
|
|
622
|
+
let h = Te(n), b = null;
|
|
623
623
|
if (h) {
|
|
624
624
|
if (!k(h)) {
|
|
625
625
|
const m = [];
|
|
626
|
-
m.push(`autoplay=${i ? 1 : 0}`), m.push(`controls=${
|
|
626
|
+
m.push(`autoplay=${i ? 1 : 0}`), m.push(`controls=${r ? 1 : 0}`), m.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), m.push(`loop=${g ? 1 : 0}`), h = `${h}?${m.join("&")}`;
|
|
627
627
|
}
|
|
628
|
-
|
|
628
|
+
b = y.createElement("iframe", {
|
|
629
629
|
...o,
|
|
630
630
|
className: "absolute inset-0 w-full h-full",
|
|
631
631
|
src: h,
|
|
@@ -634,24 +634,24 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
634
634
|
frameBorder: 0
|
|
635
635
|
});
|
|
636
636
|
} else
|
|
637
|
-
|
|
637
|
+
b = y.createElement("video", {
|
|
638
638
|
...o,
|
|
639
639
|
className: "absolute inset-0 w-full h-full",
|
|
640
|
-
src:
|
|
640
|
+
src: n,
|
|
641
641
|
controls: a,
|
|
642
642
|
muted: p,
|
|
643
643
|
autoPlay: t ? !1 : i,
|
|
644
644
|
loop: g
|
|
645
645
|
});
|
|
646
|
-
return /* @__PURE__ */
|
|
647
|
-
t ? /* @__PURE__ */
|
|
648
|
-
|
|
646
|
+
return /* @__PURE__ */ s.jsx("div", { ...ee(l, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
647
|
+
t ? /* @__PURE__ */ s.jsx("div", { ...o, ...te(l, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
648
|
+
b
|
|
649
649
|
] }) });
|
|
650
|
-
}),
|
|
650
|
+
}), Ae = {
|
|
651
651
|
type: "Video",
|
|
652
652
|
label: "Video",
|
|
653
653
|
category: "core",
|
|
654
|
-
icon:
|
|
654
|
+
icon: O,
|
|
655
655
|
group: "media",
|
|
656
656
|
...u({
|
|
657
657
|
properties: {
|
|
@@ -703,7 +703,7 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
703
703
|
type: "Divider",
|
|
704
704
|
label: "web_blocks.divider",
|
|
705
705
|
category: "core",
|
|
706
|
-
icon:
|
|
706
|
+
icon: W,
|
|
707
707
|
group: "basic",
|
|
708
708
|
...u({
|
|
709
709
|
properties: {
|
|
@@ -712,12 +712,12 @@ const re = ({ className: e = "", inBuilder: o }) => o ? /* @__PURE__ */ r.jsx("d
|
|
|
712
712
|
})
|
|
713
713
|
};
|
|
714
714
|
function Re(e) {
|
|
715
|
-
return
|
|
715
|
+
return A({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 32 32" }, child: [{ tag: "path", attr: { d: "M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z" }, child: [] }] })(e);
|
|
716
716
|
}
|
|
717
|
-
const
|
|
718
|
-
const { scripts: o, inBuilder: t, blockProps:
|
|
719
|
-
return t ? /* @__PURE__ */
|
|
720
|
-
},
|
|
717
|
+
const qe = (e) => {
|
|
718
|
+
const { scripts: o, inBuilder: t, blockProps: l } = e;
|
|
719
|
+
return t ? /* @__PURE__ */ s.jsx("div", { ...l, children: /* @__PURE__ */ s.jsx("div", { className: _("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s.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__ */ s.jsx("div", { dangerouslySetInnerHTML: { __html: o } });
|
|
720
|
+
}, Ge = {
|
|
721
721
|
type: "CustomScript",
|
|
722
722
|
label: "web_blocks.custom_script",
|
|
723
723
|
category: "core",
|
|
@@ -734,11 +734,11 @@ const Ae = (e) => {
|
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
})
|
|
737
|
-
}, Fe = (e) => null,
|
|
737
|
+
}, Fe = (e) => null, Ue = {
|
|
738
738
|
type: "Dark Mode",
|
|
739
739
|
label: "web_blocks.dark_mode",
|
|
740
740
|
category: "core",
|
|
741
|
-
icon:
|
|
741
|
+
icon: X,
|
|
742
742
|
group: "advanced",
|
|
743
743
|
...u({
|
|
744
744
|
properties: {}
|
|
@@ -793,25 +793,25 @@ const Ae = (e) => {
|
|
|
793
793
|
}
|
|
794
794
|
]
|
|
795
795
|
}, Ve = (e) => {
|
|
796
|
-
const { blockProps: o, inBuilder: t, children:
|
|
797
|
-
return t && !
|
|
796
|
+
const { blockProps: o, inBuilder: t, children: l, globalBlock: n } = e;
|
|
797
|
+
return t && !n ? /* @__PURE__ */ s.jsxs(
|
|
798
798
|
"div",
|
|
799
799
|
{
|
|
800
800
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
801
801
|
...o,
|
|
802
802
|
children: [
|
|
803
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ s.jsxs("h1", { children: [
|
|
804
804
|
"Global Block - ",
|
|
805
|
-
|
|
805
|
+
n
|
|
806
806
|
] }),
|
|
807
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ s.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
808
808
|
]
|
|
809
809
|
}
|
|
810
|
-
) : y.createElement("div", { ...o },
|
|
811
|
-
},
|
|
810
|
+
) : y.createElement("div", { ...o }, l);
|
|
811
|
+
}, Oe = {
|
|
812
812
|
type: "GlobalBlock",
|
|
813
813
|
label: "Global Block",
|
|
814
|
-
icon:
|
|
814
|
+
icon: oe,
|
|
815
815
|
category: "core",
|
|
816
816
|
group: "advanced",
|
|
817
817
|
...u({
|
|
@@ -826,13 +826,13 @@ const Ae = (e) => {
|
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
})
|
|
829
|
-
},
|
|
829
|
+
}, We = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s.jsx("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Xe = {
|
|
830
830
|
type: "Text",
|
|
831
831
|
label: "Text",
|
|
832
832
|
hidden: !0,
|
|
833
833
|
category: "core",
|
|
834
834
|
group: "typography",
|
|
835
|
-
icon:
|
|
835
|
+
icon: Y,
|
|
836
836
|
...u({
|
|
837
837
|
properties: {
|
|
838
838
|
styles: c("text-black"),
|
|
@@ -844,11 +844,11 @@ const Ae = (e) => {
|
|
|
844
844
|
}),
|
|
845
845
|
aiProps: ["content"],
|
|
846
846
|
i18nProps: ["content"]
|
|
847
|
-
},
|
|
848
|
-
const { blockProps: o, backgroundImage: t, children:
|
|
847
|
+
}, Ye = (e) => {
|
|
848
|
+
const { blockProps: o, backgroundImage: t, children: l, styles: n, tag: r } = e;
|
|
849
849
|
let i = {};
|
|
850
|
-
return t && (i = { backgroundImage: `url(${t})` }), y.createElement(
|
|
851
|
-
},
|
|
850
|
+
return t && (i = { backgroundImage: `url(${t})` }), y.createElement(r || "div", { ...o, ...n, style: i }, l);
|
|
851
|
+
}, Ze = {
|
|
852
852
|
type: "Body",
|
|
853
853
|
label: "Body",
|
|
854
854
|
category: "core",
|
|
@@ -893,10 +893,10 @@ const Ae = (e) => {
|
|
|
893
893
|
canDelete: () => !1,
|
|
894
894
|
canMove: () => !1,
|
|
895
895
|
canDuplicate: () => !1
|
|
896
|
-
},
|
|
896
|
+
}, Je = (e) => {
|
|
897
897
|
const { blockProps: o, styles: t } = e;
|
|
898
898
|
return y.createElement("br", { ...o, ...t });
|
|
899
|
-
},
|
|
899
|
+
}, Ke = {
|
|
900
900
|
type: "LineBreak",
|
|
901
901
|
label: "Line Break",
|
|
902
902
|
category: "core",
|
|
@@ -911,10 +911,10 @@ const Ae = (e) => {
|
|
|
911
911
|
canDelete: () => !1,
|
|
912
912
|
canMove: () => !1,
|
|
913
913
|
canDuplicate: () => !1
|
|
914
|
-
},
|
|
915
|
-
const { children: o, blockProps: t, errorMessage:
|
|
914
|
+
}, Qe = (e) => {
|
|
915
|
+
const { children: o, blockProps: t, errorMessage: l, successMessage: n, action: r, styles: i } = e;
|
|
916
916
|
let a = o;
|
|
917
|
-
o || (a = /* @__PURE__ */
|
|
917
|
+
o || (a = /* @__PURE__ */ s.jsx(w, {}));
|
|
918
918
|
const p = {
|
|
919
919
|
"x-data": "{}",
|
|
920
920
|
"x-on:submit.prevent": "post"
|
|
@@ -922,27 +922,27 @@ const Ae = (e) => {
|
|
|
922
922
|
"x-html": "",
|
|
923
923
|
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
924
924
|
};
|
|
925
|
-
return /* @__PURE__ */
|
|
925
|
+
return /* @__PURE__ */ s.jsxs(
|
|
926
926
|
"form",
|
|
927
927
|
{
|
|
928
928
|
...p,
|
|
929
|
-
"data-error":
|
|
930
|
-
"data-success":
|
|
929
|
+
"data-error": l,
|
|
930
|
+
"data-success": n,
|
|
931
931
|
method: "post",
|
|
932
|
-
action:
|
|
932
|
+
action: r,
|
|
933
933
|
...t,
|
|
934
934
|
...i,
|
|
935
935
|
children: [
|
|
936
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ s.jsx("div", { ...g }),
|
|
937
937
|
a
|
|
938
938
|
]
|
|
939
939
|
}
|
|
940
940
|
);
|
|
941
|
-
},
|
|
941
|
+
}, et = {
|
|
942
942
|
type: "Form",
|
|
943
943
|
label: "Form",
|
|
944
944
|
category: "core",
|
|
945
|
-
icon:
|
|
945
|
+
icon: le,
|
|
946
946
|
group: "form",
|
|
947
947
|
...u({
|
|
948
948
|
properties: {
|
|
@@ -969,22 +969,22 @@ const Ae = (e) => {
|
|
|
969
969
|
i18nProps: ["errorMessage", "successMessage"],
|
|
970
970
|
aiProps: ["errorMessage", "successMessage"],
|
|
971
971
|
canAcceptBlock: () => !0
|
|
972
|
-
},
|
|
973
|
-
const { blockProps: o, inBuilder: t, label:
|
|
972
|
+
}, tt = (e) => {
|
|
973
|
+
const { blockProps: o, inBuilder: t, label: l, styles: n, inputStyles: r, icon: i, iconSize: a, iconPos: p } = e, g = v(), h = {
|
|
974
974
|
"x-bind:disabled": "formLoading"
|
|
975
975
|
};
|
|
976
|
-
return /* @__PURE__ */
|
|
976
|
+
return /* @__PURE__ */ s.jsxs(
|
|
977
977
|
"button",
|
|
978
978
|
{
|
|
979
979
|
id: g,
|
|
980
980
|
...h,
|
|
981
|
-
...
|
|
982
|
-
...
|
|
981
|
+
...r,
|
|
982
|
+
...n,
|
|
983
983
|
...o || {},
|
|
984
984
|
type: t ? "button" : "submit",
|
|
985
985
|
children: [
|
|
986
|
-
|
|
987
|
-
i && /* @__PURE__ */
|
|
986
|
+
l,
|
|
987
|
+
i && /* @__PURE__ */ s.jsx(
|
|
988
988
|
"div",
|
|
989
989
|
{
|
|
990
990
|
style: { width: a + "px" },
|
|
@@ -995,11 +995,11 @@ const Ae = (e) => {
|
|
|
995
995
|
]
|
|
996
996
|
}
|
|
997
997
|
);
|
|
998
|
-
},
|
|
998
|
+
}, ot = {
|
|
999
999
|
type: "FormButton",
|
|
1000
1000
|
label: "Submit Button",
|
|
1001
1001
|
category: "core",
|
|
1002
|
-
icon:
|
|
1002
|
+
icon: M,
|
|
1003
1003
|
group: "form",
|
|
1004
1004
|
...u({
|
|
1005
1005
|
properties: {
|
|
@@ -1035,39 +1035,39 @@ const Ae = (e) => {
|
|
|
1035
1035
|
}),
|
|
1036
1036
|
i18nProps: ["label"],
|
|
1037
1037
|
aiProps: ["label"]
|
|
1038
|
-
},
|
|
1039
|
-
const { blockProps: o, fieldName: t, label:
|
|
1040
|
-
return a ? /* @__PURE__ */
|
|
1041
|
-
a && /* @__PURE__ */
|
|
1042
|
-
/* @__PURE__ */
|
|
1038
|
+
}, lt = (e) => {
|
|
1039
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: r, inputStyles: i, showLabel: a, required: p, inputType: g } = e, h = v();
|
|
1040
|
+
return a ? /* @__PURE__ */ s.jsxs("div", { ...r, ...o, children: [
|
|
1041
|
+
a && /* @__PURE__ */ s.jsx("label", { htmlFor: h, children: l }),
|
|
1042
|
+
/* @__PURE__ */ s.jsx(
|
|
1043
1043
|
"input",
|
|
1044
1044
|
{
|
|
1045
1045
|
name: t,
|
|
1046
1046
|
...i,
|
|
1047
1047
|
id: h,
|
|
1048
1048
|
type: g,
|
|
1049
|
-
placeholder:
|
|
1049
|
+
placeholder: n,
|
|
1050
1050
|
required: p
|
|
1051
1051
|
}
|
|
1052
1052
|
)
|
|
1053
|
-
] }) : /* @__PURE__ */
|
|
1053
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
1054
1054
|
"input",
|
|
1055
1055
|
{
|
|
1056
1056
|
id: h,
|
|
1057
1057
|
name: t,
|
|
1058
1058
|
...o,
|
|
1059
1059
|
...i,
|
|
1060
|
-
...
|
|
1060
|
+
...r,
|
|
1061
1061
|
type: g,
|
|
1062
|
-
placeholder:
|
|
1062
|
+
placeholder: n,
|
|
1063
1063
|
required: p
|
|
1064
1064
|
}
|
|
1065
1065
|
);
|
|
1066
|
-
},
|
|
1066
|
+
}, nt = {
|
|
1067
1067
|
type: "Input",
|
|
1068
1068
|
label: "web_blocks.input",
|
|
1069
1069
|
category: "core",
|
|
1070
|
-
icon:
|
|
1070
|
+
icon: E,
|
|
1071
1071
|
group: "form",
|
|
1072
1072
|
...u({
|
|
1073
1073
|
properties: {
|
|
@@ -1118,18 +1118,18 @@ const Ae = (e) => {
|
|
|
1118
1118
|
}),
|
|
1119
1119
|
aiProps: ["label", "placeholder"],
|
|
1120
1120
|
i18nProps: ["label", "placeholder"]
|
|
1121
|
-
},
|
|
1122
|
-
const { blockProps: o, fieldName: t, label:
|
|
1123
|
-
return p ? /* @__PURE__ */
|
|
1124
|
-
/* @__PURE__ */
|
|
1125
|
-
|
|
1126
|
-
] }) : /* @__PURE__ */
|
|
1121
|
+
}, st = (e) => {
|
|
1122
|
+
const { blockProps: o, fieldName: t, label: l, styles: n, inputStyles: r, required: i, checked: a, showLabel: p = !0 } = e, g = v();
|
|
1123
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...n, ...o, children: [
|
|
1124
|
+
/* @__PURE__ */ s.jsx("input", { ...r, name: t, id: g, type: "radio", required: i, defaultChecked: a }),
|
|
1125
|
+
l && /* @__PURE__ */ s.jsx("label", { htmlFor: g, children: l })
|
|
1126
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
1127
1127
|
"input",
|
|
1128
1128
|
{
|
|
1129
1129
|
id: g,
|
|
1130
1130
|
...o,
|
|
1131
|
-
...
|
|
1132
|
-
...
|
|
1131
|
+
...r,
|
|
1132
|
+
...n,
|
|
1133
1133
|
type: "radio",
|
|
1134
1134
|
required: i,
|
|
1135
1135
|
checked: a,
|
|
@@ -1140,7 +1140,7 @@ const Ae = (e) => {
|
|
|
1140
1140
|
type: "Radio",
|
|
1141
1141
|
label: "web_blocks.radio",
|
|
1142
1142
|
category: "core",
|
|
1143
|
-
icon:
|
|
1143
|
+
icon: Z,
|
|
1144
1144
|
group: "form",
|
|
1145
1145
|
...u({
|
|
1146
1146
|
properties: {
|
|
@@ -1170,19 +1170,19 @@ const Ae = (e) => {
|
|
|
1170
1170
|
}),
|
|
1171
1171
|
aiProps: ["label"],
|
|
1172
1172
|
i18nProps: ["label"]
|
|
1173
|
-
},
|
|
1174
|
-
const { blockProps: o, fieldName: t, label:
|
|
1175
|
-
return p ? /* @__PURE__ */
|
|
1176
|
-
p && /* @__PURE__ */
|
|
1177
|
-
/* @__PURE__ */
|
|
1178
|
-
/* @__PURE__ */
|
|
1179
|
-
|
|
1173
|
+
}, it = (e) => {
|
|
1174
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: r, inputStyles: i, required: a, showLabel: p, _multiple: g, options: h } = e, b = v();
|
|
1175
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...o, children: [
|
|
1176
|
+
p && /* @__PURE__ */ s.jsx("label", { htmlFor: b, children: l }),
|
|
1177
|
+
/* @__PURE__ */ s.jsxs("select", { ...i, id: b, required: a, multiple: g, name: t, children: [
|
|
1178
|
+
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
|
|
1179
|
+
C(h, (m) => /* @__PURE__ */ s.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
|
|
1180
1180
|
] })
|
|
1181
|
-
] }) : /* @__PURE__ */
|
|
1182
|
-
/* @__PURE__ */
|
|
1183
|
-
|
|
1181
|
+
] }) : /* @__PURE__ */ s.jsxs("select", { id: b, ...r, ...o, required: a, multiple: g, name: t, children: [
|
|
1182
|
+
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
|
|
1183
|
+
C(h, (m) => /* @__PURE__ */ s.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
|
|
1184
1184
|
] });
|
|
1185
|
-
},
|
|
1185
|
+
}, at = {
|
|
1186
1186
|
type: "Select",
|
|
1187
1187
|
label: "web_blocks.select",
|
|
1188
1188
|
category: "core",
|
|
@@ -1241,28 +1241,28 @@ const Ae = (e) => {
|
|
|
1241
1241
|
}),
|
|
1242
1242
|
aiProps: ["label", "placeholder"],
|
|
1243
1243
|
i18nProps: ["label", "placeholder"]
|
|
1244
|
-
},
|
|
1245
|
-
const { blockProps: o, fieldName: t, label:
|
|
1246
|
-
return p ? /* @__PURE__ */
|
|
1247
|
-
p && /* @__PURE__ */
|
|
1248
|
-
/* @__PURE__ */
|
|
1249
|
-
] }) : /* @__PURE__ */
|
|
1244
|
+
}, ct = (e) => {
|
|
1245
|
+
const { blockProps: o, fieldName: t, label: l, placeholder: n, styles: r, inputStyles: i, _rows: a, showLabel: p } = e, g = v();
|
|
1246
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...o, children: [
|
|
1247
|
+
p && /* @__PURE__ */ s.jsx("label", { htmlFor: g, children: l }),
|
|
1248
|
+
/* @__PURE__ */ s.jsx("textarea", { name: t, ...i, id: g, placeholder: n, rows: a })
|
|
1249
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
1250
1250
|
"textarea",
|
|
1251
1251
|
{
|
|
1252
1252
|
id: g,
|
|
1253
1253
|
name: t,
|
|
1254
1254
|
...o,
|
|
1255
1255
|
...i,
|
|
1256
|
-
...
|
|
1257
|
-
placeholder:
|
|
1256
|
+
...r,
|
|
1257
|
+
placeholder: n,
|
|
1258
1258
|
rows: a
|
|
1259
1259
|
}
|
|
1260
1260
|
);
|
|
1261
|
-
},
|
|
1261
|
+
}, pt = {
|
|
1262
1262
|
type: "TextArea",
|
|
1263
1263
|
label: "web_blocks.textarea",
|
|
1264
1264
|
category: "core",
|
|
1265
|
-
icon:
|
|
1265
|
+
icon: E,
|
|
1266
1266
|
group: "form",
|
|
1267
1267
|
...u({
|
|
1268
1268
|
properties: {
|
|
@@ -1293,13 +1293,13 @@ const Ae = (e) => {
|
|
|
1293
1293
|
}),
|
|
1294
1294
|
aiProps: ["label", "placeholder"],
|
|
1295
1295
|
i18nProps: ["label", "placeholder"]
|
|
1296
|
-
},
|
|
1297
|
-
const { blockProps: o, fieldName: t, label:
|
|
1298
|
-
return p ? /* @__PURE__ */
|
|
1299
|
-
/* @__PURE__ */
|
|
1296
|
+
}, dt = (e) => {
|
|
1297
|
+
const { blockProps: o, fieldName: t, label: l, styles: n, inputStyles: r, required: i, checked: a, showLabel: p = !0 } = e, g = v();
|
|
1298
|
+
return p ? /* @__PURE__ */ s.jsxs("div", { ...n, ...o, children: [
|
|
1299
|
+
/* @__PURE__ */ s.jsx(
|
|
1300
1300
|
"input",
|
|
1301
1301
|
{
|
|
1302
|
-
...
|
|
1302
|
+
...r,
|
|
1303
1303
|
name: t,
|
|
1304
1304
|
id: g,
|
|
1305
1305
|
type: "checkbox",
|
|
@@ -1307,24 +1307,24 @@ const Ae = (e) => {
|
|
|
1307
1307
|
defaultChecked: a
|
|
1308
1308
|
}
|
|
1309
1309
|
),
|
|
1310
|
-
|
|
1311
|
-
] }) : /* @__PURE__ */
|
|
1310
|
+
l && /* @__PURE__ */ s.jsx("label", { htmlFor: g, children: l })
|
|
1311
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
1312
1312
|
"input",
|
|
1313
1313
|
{
|
|
1314
1314
|
id: g,
|
|
1315
1315
|
...o,
|
|
1316
|
-
...
|
|
1317
|
-
...
|
|
1316
|
+
...r,
|
|
1317
|
+
...n,
|
|
1318
1318
|
type: "checkbox",
|
|
1319
1319
|
required: i,
|
|
1320
1320
|
name: t
|
|
1321
1321
|
}
|
|
1322
1322
|
);
|
|
1323
|
-
},
|
|
1323
|
+
}, ut = {
|
|
1324
1324
|
type: "Checkbox",
|
|
1325
1325
|
label: "web_blocks.checkbox",
|
|
1326
1326
|
category: "core",
|
|
1327
|
-
icon:
|
|
1327
|
+
icon: J,
|
|
1328
1328
|
group: "form",
|
|
1329
1329
|
...u({
|
|
1330
1330
|
properties: {
|
|
@@ -1354,17 +1354,17 @@ const Ae = (e) => {
|
|
|
1354
1354
|
}),
|
|
1355
1355
|
aiProps: ["label"],
|
|
1356
1356
|
i18nProps: ["label"]
|
|
1357
|
-
},
|
|
1358
|
-
const { blockProps: o, content: t, styles:
|
|
1359
|
-
return
|
|
1360
|
-
...
|
|
1357
|
+
}, gt = (e) => {
|
|
1358
|
+
const { blockProps: o, content: t, styles: l, children: n } = e, r = { ...l, ...o };
|
|
1359
|
+
return n ? y.createElement("label", r, n) : y.createElement("label", {
|
|
1360
|
+
...r,
|
|
1361
1361
|
dangerouslySetInnerHTML: { __html: t }
|
|
1362
1362
|
});
|
|
1363
|
-
},
|
|
1363
|
+
}, yt = {
|
|
1364
1364
|
type: "Label",
|
|
1365
1365
|
label: "Label",
|
|
1366
1366
|
category: "core",
|
|
1367
|
-
icon:
|
|
1367
|
+
icon: K,
|
|
1368
1368
|
group: "form",
|
|
1369
1369
|
...u({
|
|
1370
1370
|
properties: {
|
|
@@ -1376,25 +1376,25 @@ const Ae = (e) => {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
}
|
|
1378
1378
|
})
|
|
1379
|
-
},
|
|
1379
|
+
}, L = {
|
|
1380
1380
|
wrapper: { "x-data": "{ open: false }" },
|
|
1381
1381
|
button: { "x-on:click": "open = !open" },
|
|
1382
1382
|
menu: { "x-show": "open", "x-on:click.away": "open = false" }
|
|
1383
|
-
},
|
|
1384
|
-
const { blockProps: o, content: t, icon:
|
|
1385
|
-
return /* @__PURE__ */
|
|
1383
|
+
}, mt = (e) => {
|
|
1384
|
+
const { blockProps: o, content: t, icon: l, iconWidth: n, iconHeight: r, styles: i, show: a } = e;
|
|
1385
|
+
return /* @__PURE__ */ s.jsxs("button", { ...o, ...L.button, ...i, children: [
|
|
1386
1386
|
t,
|
|
1387
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ s.jsx(
|
|
1388
1388
|
"span",
|
|
1389
1389
|
{
|
|
1390
1390
|
className: a ? "rotate-180" : "",
|
|
1391
|
-
dangerouslySetInnerHTML: { __html:
|
|
1392
|
-
style: { width:
|
|
1391
|
+
dangerouslySetInnerHTML: { __html: l },
|
|
1392
|
+
style: { width: n, height: r }
|
|
1393
1393
|
}
|
|
1394
1394
|
)
|
|
1395
1395
|
] });
|
|
1396
1396
|
};
|
|
1397
|
-
d(
|
|
1397
|
+
d(mt, {
|
|
1398
1398
|
type: "DropdownButton",
|
|
1399
1399
|
label: "Dropdown Button",
|
|
1400
1400
|
group: "advanced",
|
|
@@ -1413,11 +1413,11 @@ d(yt, {
|
|
|
1413
1413
|
}
|
|
1414
1414
|
})
|
|
1415
1415
|
});
|
|
1416
|
-
const
|
|
1417
|
-
const { blockProps: o, children: t, styles:
|
|
1418
|
-
return
|
|
1416
|
+
const ht = (e) => {
|
|
1417
|
+
const { blockProps: o, children: t, styles: l, show: n, inBuilder: r } = e;
|
|
1418
|
+
return r && !n ? null : /* @__PURE__ */ s.jsx("div", { ...o, ...L.menu, ...l, children: t });
|
|
1419
1419
|
};
|
|
1420
|
-
d(
|
|
1420
|
+
d(ht, {
|
|
1421
1421
|
type: "DropdownContent",
|
|
1422
1422
|
label: "Dropdown Content",
|
|
1423
1423
|
hidden: !0,
|
|
@@ -1431,10 +1431,10 @@ d(mt, {
|
|
|
1431
1431
|
}
|
|
1432
1432
|
})
|
|
1433
1433
|
});
|
|
1434
|
-
const
|
|
1435
|
-
const { blockProps: o, children: t, styles:
|
|
1436
|
-
return /* @__PURE__ */
|
|
1437
|
-
},
|
|
1434
|
+
const ft = (e) => {
|
|
1435
|
+
const { blockProps: o, children: t, styles: l } = e;
|
|
1436
|
+
return /* @__PURE__ */ s.jsx("div", { ...o, ...l, ...L.wrapper, children: t });
|
|
1437
|
+
}, bt = {
|
|
1438
1438
|
type: "Dropdown",
|
|
1439
1439
|
label: "Dropdown",
|
|
1440
1440
|
group: "basic",
|
|
@@ -1468,7 +1468,7 @@ const ht = (e) => {
|
|
|
1468
1468
|
wrapper: !0,
|
|
1469
1469
|
...u({
|
|
1470
1470
|
properties: {
|
|
1471
|
-
showDropdown:
|
|
1471
|
+
showDropdown: D({
|
|
1472
1472
|
type: "boolean",
|
|
1473
1473
|
title: "Show Dropdown",
|
|
1474
1474
|
default: !1
|
|
@@ -1476,22 +1476,65 @@ const ht = (e) => {
|
|
|
1476
1476
|
styles: c("relative w-max")
|
|
1477
1477
|
}
|
|
1478
1478
|
})
|
|
1479
|
-
},
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1479
|
+
}, I = {
|
|
1480
|
+
SMALL: {
|
|
1481
|
+
1: "col-span-1",
|
|
1482
|
+
2: "col-span-2",
|
|
1483
|
+
3: "col-span-3",
|
|
1484
|
+
4: "col-span-4",
|
|
1485
|
+
5: "col-span-5",
|
|
1486
|
+
6: "col-span-6",
|
|
1487
|
+
7: "col-span-7",
|
|
1488
|
+
8: "col-span-8",
|
|
1489
|
+
9: "col-span-9",
|
|
1490
|
+
10: "col-span-10",
|
|
1491
|
+
11: "col-span-11",
|
|
1492
|
+
12: "col-span-12"
|
|
1493
|
+
},
|
|
1494
|
+
MEDIUM: {
|
|
1495
|
+
1: "md:col-span-1",
|
|
1496
|
+
2: "md:col-span-2",
|
|
1497
|
+
3: "md:col-span-3",
|
|
1498
|
+
4: "md:col-span-4",
|
|
1499
|
+
5: "md:col-span-5",
|
|
1500
|
+
6: "md:col-span-6",
|
|
1501
|
+
7: "md:col-span-7",
|
|
1502
|
+
8: "md:col-span-8",
|
|
1503
|
+
9: "md:col-span-9",
|
|
1504
|
+
10: "md:col-span-10",
|
|
1505
|
+
11: "md:col-span-11",
|
|
1506
|
+
12: "md:col-span-12"
|
|
1507
|
+
},
|
|
1508
|
+
LARGE: {
|
|
1509
|
+
1: "lg:col-span-1",
|
|
1510
|
+
2: "lg:col-span-2",
|
|
1511
|
+
3: "lg:col-span-3",
|
|
1512
|
+
4: "lg:col-span-4",
|
|
1513
|
+
5: "lg:col-span-5",
|
|
1514
|
+
6: "lg:col-span-6",
|
|
1515
|
+
7: "lg:col-span-7",
|
|
1516
|
+
8: "lg:col-span-8",
|
|
1517
|
+
9: "lg:col-span-9",
|
|
1518
|
+
10: "lg:col-span-10",
|
|
1519
|
+
11: "lg:col-span-11",
|
|
1520
|
+
12: "lg:col-span-12"
|
|
1521
|
+
}
|
|
1522
|
+
}, kt = (e) => {
|
|
1523
|
+
const { blockProps: o, children: t, styles: l, colSpan: n, tabletColSpan: r, desktopColSpan: i } = e, p = { className: [
|
|
1524
|
+
f(l, "className", ""),
|
|
1525
|
+
f(I, ["SMALL", isNaN(n) || !n ? 6 : n], ""),
|
|
1526
|
+
r ? f(I, ["MEDIUM", r || n], "") : "",
|
|
1527
|
+
i ? f(I, ["LARGE", r || n], "") : ""
|
|
1485
1528
|
].join(" ") };
|
|
1486
|
-
return /* @__PURE__ */
|
|
1529
|
+
return /* @__PURE__ */ s.jsx("div", { ...o, ...l, ...p, children: t || /* @__PURE__ */ s.jsx("div", { className: "min-h-12 h-full w-full border-2 border-dashed border-gray-400 bg-gray-100 dark:bg-gray-900" }) });
|
|
1487
1530
|
};
|
|
1488
|
-
d(
|
|
1531
|
+
d(kt, {
|
|
1489
1532
|
type: "Column",
|
|
1490
1533
|
label: "Column",
|
|
1491
1534
|
hidden: !0,
|
|
1492
1535
|
canMove: () => !1,
|
|
1493
1536
|
canDelete: () => !0,
|
|
1494
|
-
icon:
|
|
1537
|
+
icon: ne,
|
|
1495
1538
|
wrapper: !0,
|
|
1496
1539
|
canAcceptBlock: () => !0,
|
|
1497
1540
|
...u({
|
|
@@ -1520,14 +1563,14 @@ d(bt, {
|
|
|
1520
1563
|
}
|
|
1521
1564
|
})
|
|
1522
1565
|
});
|
|
1523
|
-
const
|
|
1524
|
-
const { blockProps: o, children: t, styles:
|
|
1525
|
-
return /* @__PURE__ */
|
|
1526
|
-
},
|
|
1566
|
+
const xt = (e) => {
|
|
1567
|
+
const { blockProps: o, children: t, styles: l, gutter: n } = e, i = { className: [f(l, "className", ""), " grid grid-cols-12"].join() };
|
|
1568
|
+
return typeof (l == null ? void 0 : l.style) == "object" ? l.style.gap = `${n}px` : i.style = { gap: `${n}px` }, /* @__PURE__ */ s.jsx("div", { ...o, ...l, ...i, children: t });
|
|
1569
|
+
}, wt = {
|
|
1527
1570
|
type: "Row",
|
|
1528
1571
|
label: "Row",
|
|
1529
1572
|
group: "basic",
|
|
1530
|
-
icon:
|
|
1573
|
+
icon: se,
|
|
1531
1574
|
blocks: () => [
|
|
1532
1575
|
{ _type: "Row", _id: "row", styles: "#styles:,p-1" },
|
|
1533
1576
|
{ _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
|
|
@@ -1541,21 +1584,21 @@ const kt = (e) => {
|
|
|
1541
1584
|
styles: c(""),
|
|
1542
1585
|
colCount: {
|
|
1543
1586
|
type: "number",
|
|
1544
|
-
title: "
|
|
1587
|
+
title: "",
|
|
1545
1588
|
default: 2,
|
|
1546
1589
|
minimum: 0,
|
|
1547
1590
|
ui: { "ui:widget": "colCount" }
|
|
1548
1591
|
},
|
|
1549
1592
|
gutter: {
|
|
1550
1593
|
type: "number",
|
|
1551
|
-
title: "Gutter",
|
|
1594
|
+
title: "Gutter (in px)",
|
|
1552
1595
|
default: 16,
|
|
1553
1596
|
minimum: 0
|
|
1554
1597
|
}
|
|
1555
1598
|
}
|
|
1556
1599
|
})
|
|
1557
1600
|
}, Pt = () => {
|
|
1558
|
-
d(
|
|
1601
|
+
d(ie, ae), d(ge, ye), d(ce, pe), d(me, he), d(fe, be), d(ke, xe), d(we, ve), d(_e, Ie), d(Le, Ce), d(Be, je), d(Se, Pe), d(Me, Ne), d(Ee, $e), d(De, Ae), d(de, ue), d(qe, Ge), d(We, Xe), d(Qe, et), d(tt, ot), d(lt, nt), d(dt, ut), d(st, rt), d(it, at), d(ct, pt), d(gt, yt), d(Je, Ke), d(Ye, Ze), d(ze, He), d(Fe, Ue), d(Ve, Oe), d(ft, bt), d(xt, wt);
|
|
1559
1602
|
};
|
|
1560
1603
|
export {
|
|
1561
1604
|
Pt as loadWebBlocks
|