@chaibuilder/sdk 2.0.0-beta.17 → 2.0.0-beta.19
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.d.ts +2 -2
- package/dist/core.js +448 -503
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +210 -290
- package/package.json +2 -2
package/dist/web-blocks.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { registerChaiBlockSchema as p, StylesProp as c, registerChaiBlock as
|
|
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 I, G as
|
|
5
|
-
import { ButtonIcon as
|
|
6
|
-
import { isNull as
|
|
7
|
-
import { GlobeIcon as
|
|
4
|
+
import { c as I, G as E, g as w } from "./iconBase-Ief2hJUZ.js";
|
|
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 L } from "lodash-es";
|
|
7
|
+
import { GlobeIcon as K, GroupIcon as Q } from "lucide-react";
|
|
8
8
|
import "clsx";
|
|
9
9
|
import "tailwind-merge";
|
|
10
|
-
const
|
|
11
|
-
const { blockProps:
|
|
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
|
-
l || (a = /* @__PURE__ */ r.jsx(x, { inBuilder:
|
|
14
|
-
let
|
|
15
|
-
return n && (
|
|
16
|
-
},
|
|
13
|
+
l || (a = /* @__PURE__ */ r.jsx(x, { inBuilder: t }));
|
|
14
|
+
let d = {};
|
|
15
|
+
return n && (d = { backgroundImage: `url(${n})` }), y.createElement(i, { ...o, ...s, style: d }, a);
|
|
16
|
+
}, oe = {
|
|
17
17
|
type: "Box",
|
|
18
18
|
label: "Box",
|
|
19
19
|
category: "core",
|
|
@@ -54,32 +54,32 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
54
54
|
}
|
|
55
55
|
}),
|
|
56
56
|
canAcceptBlock: () => !0
|
|
57
|
-
},
|
|
58
|
-
const { blockProps:
|
|
57
|
+
}, le = (e) => {
|
|
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",
|
|
62
62
|
{
|
|
63
|
-
style: { width:
|
|
63
|
+
style: { width: t + "px" },
|
|
64
64
|
className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
|
|
65
|
-
dangerouslySetInnerHTML: { __html:
|
|
65
|
+
dangerouslySetInnerHTML: { __html: d }
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
68
|
] });
|
|
69
69
|
return y.createElement(
|
|
70
70
|
"button",
|
|
71
71
|
{
|
|
72
|
-
...
|
|
72
|
+
...o,
|
|
73
73
|
...i,
|
|
74
74
|
type: "button"
|
|
75
75
|
},
|
|
76
76
|
g
|
|
77
77
|
);
|
|
78
|
-
},
|
|
78
|
+
}, ne = {
|
|
79
79
|
type: "Button",
|
|
80
80
|
label: "Button",
|
|
81
81
|
category: "core",
|
|
82
|
-
icon:
|
|
82
|
+
icon: C,
|
|
83
83
|
group: "basic",
|
|
84
84
|
...p({
|
|
85
85
|
properties: {
|
|
@@ -110,24 +110,24 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
110
110
|
}),
|
|
111
111
|
i18nProps: ["content"],
|
|
112
112
|
aiProps: ["content"]
|
|
113
|
-
},
|
|
114
|
-
const { blockProps:
|
|
113
|
+
}, re = (e) => {
|
|
114
|
+
const { blockProps: o, styles: t, htmlCode: n, inBuilder: l } = e;
|
|
115
115
|
return l ? /* @__PURE__ */ r.jsxs("div", { className: "relative", children: [
|
|
116
|
-
l ? /* @__PURE__ */ r.jsx("div", { ...
|
|
116
|
+
l ? /* @__PURE__ */ r.jsx("div", { ...o, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
117
117
|
y.createElement("div", {
|
|
118
|
-
...
|
|
118
|
+
...t,
|
|
119
119
|
dangerouslySetInnerHTML: { __html: n.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
120
120
|
})
|
|
121
121
|
] }) : y.createElement("div", {
|
|
122
|
-
...t,
|
|
123
122
|
...o,
|
|
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",
|
|
130
|
-
icon:
|
|
130
|
+
icon: T,
|
|
131
131
|
group: "advanced",
|
|
132
132
|
...p({
|
|
133
133
|
properties: {
|
|
@@ -139,11 +139,11 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
})
|
|
142
|
-
},
|
|
143
|
-
const { blockProps:
|
|
142
|
+
}, se = (e) => {
|
|
143
|
+
const { blockProps: o, styles: t, backgroundImage: n } = e;
|
|
144
144
|
let l = {};
|
|
145
|
-
return n && (l = { backgroundImage: `url(${n})` }), y.createElement("div", { ...
|
|
146
|
-
},
|
|
145
|
+
return n && (l = { backgroundImage: `url(${n})` }), y.createElement("div", { ...o, ...t, style: l });
|
|
146
|
+
}, ae = {
|
|
147
147
|
type: "EmptyBox",
|
|
148
148
|
label: "Empty Box",
|
|
149
149
|
category: "core",
|
|
@@ -159,18 +159,18 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
})
|
|
162
|
-
},
|
|
163
|
-
const { blockProps:
|
|
164
|
-
return i ? y.createElement(l, { ...
|
|
165
|
-
...o,
|
|
162
|
+
}, ce = (e) => {
|
|
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, {
|
|
166
165
|
...t,
|
|
166
|
+
...o,
|
|
167
167
|
dangerouslySetInnerHTML: { __html: n }
|
|
168
168
|
});
|
|
169
|
-
},
|
|
169
|
+
}, de = {
|
|
170
170
|
type: "Heading",
|
|
171
171
|
label: "web_blocks.heading",
|
|
172
172
|
category: "core",
|
|
173
|
-
icon:
|
|
173
|
+
icon: $,
|
|
174
174
|
group: "typography",
|
|
175
175
|
...p({
|
|
176
176
|
properties: {
|
|
@@ -193,17 +193,17 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
193
193
|
i18nProps: ["content"],
|
|
194
194
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
195
195
|
}, ue = (e) => {
|
|
196
|
-
const { blockProps:
|
|
197
|
-
return
|
|
198
|
-
...o,
|
|
196
|
+
const { blockProps: o, styles: t, content: n } = e;
|
|
197
|
+
return Y(e.children) ? y.createElement("p", {
|
|
199
198
|
...t,
|
|
199
|
+
...o,
|
|
200
200
|
dangerouslySetInnerHTML: { __html: n }
|
|
201
|
-
}) : y.createElement("p", { ...
|
|
202
|
-
},
|
|
201
|
+
}) : y.createElement("p", { ...t, ...o }, e.children);
|
|
202
|
+
}, pe = {
|
|
203
203
|
type: "Paragraph",
|
|
204
204
|
label: "Paragraph",
|
|
205
205
|
category: "core",
|
|
206
|
-
icon:
|
|
206
|
+
icon: N,
|
|
207
207
|
group: "typography",
|
|
208
208
|
...p({
|
|
209
209
|
properties: {
|
|
@@ -221,14 +221,14 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
221
221
|
i18nProps: ["content"],
|
|
222
222
|
aiProps: ["content"],
|
|
223
223
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
224
|
-
},
|
|
225
|
-
const { blockProps:
|
|
226
|
-
return l ? y.createElement("span", { ...
|
|
227
|
-
...o,
|
|
224
|
+
}, ge = (e) => {
|
|
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", {
|
|
228
227
|
...t,
|
|
228
|
+
...o,
|
|
229
229
|
dangerouslySetInnerHTML: { __html: n || "" }
|
|
230
230
|
});
|
|
231
|
-
},
|
|
231
|
+
}, ye = {
|
|
232
232
|
type: "Span",
|
|
233
233
|
label: "Span",
|
|
234
234
|
category: "core",
|
|
@@ -247,10 +247,10 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
247
247
|
aiProps: ["content"],
|
|
248
248
|
i18nProps: ["content"],
|
|
249
249
|
canAcceptBlock: () => !0
|
|
250
|
-
},
|
|
251
|
-
const { blockProps:
|
|
252
|
-
return /* @__PURE__ */ r.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ r.jsx("div", { ...
|
|
253
|
-
},
|
|
250
|
+
}, me = (e) => {
|
|
251
|
+
const { blockProps: o, content: t, styles: n } = e;
|
|
252
|
+
return /* @__PURE__ */ r.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ r.jsx("div", { ...o, ...n, dangerouslySetInnerHTML: { __html: t } }) });
|
|
253
|
+
}, he = {
|
|
254
254
|
type: "RichText",
|
|
255
255
|
label: "Rich Text",
|
|
256
256
|
category: "core",
|
|
@@ -269,28 +269,28 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
269
269
|
}),
|
|
270
270
|
aiProps: ["content"],
|
|
271
271
|
i18nProps: ["content"]
|
|
272
|
-
},
|
|
273
|
-
const { blockProps:
|
|
272
|
+
}, fe = (e) => {
|
|
273
|
+
const { blockProps: o, link: t, children: n, styles: l, inBuilder: i, content: s } = e;
|
|
274
274
|
let a = {};
|
|
275
|
-
return !n && b(s) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), i ? n ? /* @__PURE__ */ r.jsx("span", { ...
|
|
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
|
-
) : n ? /* @__PURE__ */ r.jsx("a", { href: (
|
|
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
|
{
|
|
286
|
-
...
|
|
286
|
+
...o,
|
|
287
287
|
...l,
|
|
288
|
-
href: (
|
|
289
|
-
target: (
|
|
288
|
+
href: (t == null ? void 0 : t.href) || "#",
|
|
289
|
+
target: (t == null ? void 0 : t.target) || "_self"
|
|
290
290
|
},
|
|
291
291
|
s
|
|
292
292
|
);
|
|
293
|
-
},
|
|
293
|
+
}, be = {
|
|
294
294
|
type: "Link",
|
|
295
295
|
label: "Link",
|
|
296
296
|
category: "core",
|
|
@@ -325,28 +325,28 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
325
325
|
aiProps: ["content"],
|
|
326
326
|
i18nProps: ["content"],
|
|
327
327
|
canAcceptBlock: (e) => e !== "Link"
|
|
328
|
-
}, M = (e, ...
|
|
328
|
+
}, M = (e, ...o) => ({
|
|
329
329
|
...e,
|
|
330
|
-
className: I(e.className, ...
|
|
331
|
-
}),
|
|
332
|
-
const { blockProps:
|
|
333
|
-
if (!
|
|
330
|
+
className: I(e.className, ...o)
|
|
331
|
+
}), ke = (e) => {
|
|
332
|
+
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");
|
|
333
|
+
if (!t && b(n == null ? void 0 : n.className) && b(i))
|
|
334
334
|
return /* @__PURE__ */ r.jsx(x, { inBuilder: l });
|
|
335
335
|
if (l)
|
|
336
|
-
return
|
|
337
|
-
...
|
|
336
|
+
return t ? /* @__PURE__ */ r.jsx("span", { ...o, ...m, children: t }) : y.createElement("span", {
|
|
337
|
+
...o,
|
|
338
338
|
...m,
|
|
339
339
|
dangerouslySetInnerHTML: { __html: i }
|
|
340
340
|
});
|
|
341
341
|
const k = {};
|
|
342
|
-
return k["data-vbtype"] = a,
|
|
343
|
-
...
|
|
342
|
+
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", {
|
|
343
|
+
...o,
|
|
344
344
|
...m,
|
|
345
345
|
...k,
|
|
346
346
|
href: s || "#",
|
|
347
347
|
dangerouslySetInnerHTML: { __html: i }
|
|
348
348
|
});
|
|
349
|
-
},
|
|
349
|
+
}, xe = {
|
|
350
350
|
type: "LightBoxLink",
|
|
351
351
|
label: "Lightbox Link",
|
|
352
352
|
category: "core",
|
|
@@ -420,17 +420,17 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
420
420
|
i18nProps: ["content"],
|
|
421
421
|
aiProps: ["content"],
|
|
422
422
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
423
|
-
},
|
|
424
|
-
const { blockProps:
|
|
425
|
-
return !
|
|
423
|
+
}, we = (e) => {
|
|
424
|
+
const { blockProps: o, children: t, listType: n, styles: l, tag: i, inBuilder: s } = e, a = I(v(l, "className", ""), n);
|
|
425
|
+
return !t && b(l == null ? void 0 : l.className) ? /* @__PURE__ */ r.jsx(x, { inBuilder: s }) : y.createElement(
|
|
426
426
|
i || (n === "list-decimal" ? "ol" : "ul"),
|
|
427
|
-
{ ...
|
|
428
|
-
|
|
427
|
+
{ ...o, ...l, className: a },
|
|
428
|
+
t
|
|
429
429
|
);
|
|
430
|
-
},
|
|
430
|
+
}, ve = {
|
|
431
431
|
type: "List",
|
|
432
432
|
label: "web_blocks.list",
|
|
433
|
-
icon:
|
|
433
|
+
icon: R,
|
|
434
434
|
category: "core",
|
|
435
435
|
group: "basic",
|
|
436
436
|
...p({
|
|
@@ -473,17 +473,17 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
473
473
|
content: "Item 3"
|
|
474
474
|
}
|
|
475
475
|
]
|
|
476
|
-
},
|
|
477
|
-
const { blockProps:
|
|
478
|
-
return l ? y.createElement(i || "li", { ...n, ...
|
|
476
|
+
}, Ie = (e) => {
|
|
477
|
+
const { blockProps: o, content: t, styles: n, children: l, tag: i } = e;
|
|
478
|
+
return l ? y.createElement(i || "li", { ...n, ...o }, l) : y.createElement(i || "li", {
|
|
479
479
|
...n,
|
|
480
|
-
...
|
|
481
|
-
dangerouslySetInnerHTML: { __html:
|
|
480
|
+
...o,
|
|
481
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
482
482
|
});
|
|
483
483
|
}, Le = {
|
|
484
484
|
type: "ListItem",
|
|
485
485
|
label: "List Item",
|
|
486
|
-
icon:
|
|
486
|
+
icon: A,
|
|
487
487
|
category: "core",
|
|
488
488
|
group: "basic",
|
|
489
489
|
...p({
|
|
@@ -503,21 +503,21 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
503
503
|
aiProps: ["content"],
|
|
504
504
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
505
505
|
canBeNested: (e) => e === "List"
|
|
506
|
-
},
|
|
507
|
-
const { blockProps:
|
|
508
|
-
if (b(
|
|
506
|
+
}, _e = (e) => {
|
|
507
|
+
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]` : ""));
|
|
508
|
+
if (b(t))
|
|
509
509
|
return /* @__PURE__ */ r.jsx(x, { inBuilder: i, className: "h-8 w-14" });
|
|
510
|
-
const
|
|
510
|
+
const d = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
511
511
|
return y.createElement("span", {
|
|
512
|
-
...
|
|
512
|
+
...o,
|
|
513
513
|
...a,
|
|
514
|
-
dangerouslySetInnerHTML: { __html:
|
|
514
|
+
dangerouslySetInnerHTML: { __html: d }
|
|
515
515
|
});
|
|
516
|
-
},
|
|
516
|
+
}, Be = {
|
|
517
517
|
type: "Icon",
|
|
518
518
|
label: "web_blocks.icon",
|
|
519
519
|
category: "core",
|
|
520
|
-
icon:
|
|
520
|
+
icon: D,
|
|
521
521
|
group: "media",
|
|
522
522
|
...p({
|
|
523
523
|
properties: {
|
|
@@ -541,17 +541,17 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
541
541
|
}
|
|
542
542
|
})
|
|
543
543
|
}, Pe = (e) => {
|
|
544
|
-
const { blockProps:
|
|
545
|
-
return b(
|
|
546
|
-
...
|
|
544
|
+
const { blockProps: o, image: t, styles: n, alt: l, height: i, width: s, lazyLoading: a } = e;
|
|
545
|
+
return b(t) ? /* @__PURE__ */ r.jsx(x, { className: "h-36" }) : y.createElement("img", {
|
|
546
|
+
...o,
|
|
547
547
|
...n,
|
|
548
|
-
src:
|
|
548
|
+
src: t,
|
|
549
549
|
alt: l,
|
|
550
550
|
loading: a ? "lazy" : "eager",
|
|
551
551
|
height: i,
|
|
552
552
|
width: s
|
|
553
553
|
});
|
|
554
|
-
},
|
|
554
|
+
}, Ce = {
|
|
555
555
|
type: "Image",
|
|
556
556
|
label: "Image",
|
|
557
557
|
category: "core",
|
|
@@ -611,57 +611,57 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
611
611
|
}),
|
|
612
612
|
aiProps: ["alt"],
|
|
613
613
|
i18nProps: ["alt"]
|
|
614
|
-
},
|
|
615
|
-
if (
|
|
616
|
-
const
|
|
617
|
-
return
|
|
614
|
+
}, _ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, B = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, je = (e) => {
|
|
615
|
+
if (_.test(e)) {
|
|
616
|
+
const o = e.match(_);
|
|
617
|
+
return o ? `https://www.youtube.com/embed/${o[4]}` : e;
|
|
618
618
|
}
|
|
619
619
|
if (B.test(e)) {
|
|
620
|
-
const
|
|
621
|
-
return
|
|
620
|
+
const o = e.match(B);
|
|
621
|
+
return o ? `https://player.vimeo.com/video/${o[3]}` : e;
|
|
622
622
|
}
|
|
623
|
-
if (
|
|
624
|
-
const
|
|
625
|
-
return
|
|
623
|
+
if (P.test(e)) {
|
|
624
|
+
const o = e.match(P);
|
|
625
|
+
return o ? `https://www.dailymotion.com/embed/video/${o[4]}` : e;
|
|
626
626
|
}
|
|
627
627
|
return null;
|
|
628
|
-
},
|
|
629
|
-
const { blockProps:
|
|
628
|
+
}, Se = y.memo((e) => {
|
|
629
|
+
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);
|
|
630
630
|
if (b(l))
|
|
631
|
-
return /* @__PURE__ */ r.jsx(x, { inBuilder:
|
|
632
|
-
let h =
|
|
631
|
+
return /* @__PURE__ */ r.jsx(x, { inBuilder: t, className: "h-36" });
|
|
632
|
+
let h = je(l), f = null;
|
|
633
633
|
if (h) {
|
|
634
634
|
if (!b(h)) {
|
|
635
635
|
const m = [];
|
|
636
|
-
m.push(`autoplay=${s ? 1 : 0}`), m.push(`controls=${i ? 1 : 0}`), m.push(`mute=${
|
|
636
|
+
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("&")}`;
|
|
637
637
|
}
|
|
638
638
|
f = y.createElement("iframe", {
|
|
639
|
-
...
|
|
639
|
+
...o,
|
|
640
640
|
className: "absolute inset-0 w-full h-full",
|
|
641
641
|
src: h,
|
|
642
|
-
allow:
|
|
642
|
+
allow: t ? "" : "autoplay *; fullscreen *",
|
|
643
643
|
allowFullScreen: !0,
|
|
644
644
|
frameBorder: 0
|
|
645
645
|
});
|
|
646
646
|
} else
|
|
647
647
|
f = y.createElement("video", {
|
|
648
|
-
...
|
|
648
|
+
...o,
|
|
649
649
|
className: "absolute inset-0 w-full h-full",
|
|
650
650
|
src: l,
|
|
651
651
|
controls: a,
|
|
652
|
-
muted:
|
|
653
|
-
autoPlay:
|
|
652
|
+
muted: d,
|
|
653
|
+
autoPlay: t ? !1 : s,
|
|
654
654
|
loop: g
|
|
655
655
|
});
|
|
656
|
-
return /* @__PURE__ */ r.jsx("div", { ...
|
|
657
|
-
|
|
656
|
+
return /* @__PURE__ */ r.jsx("div", { ...Z(n, ["className"]), children: /* @__PURE__ */ r.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
657
|
+
t ? /* @__PURE__ */ r.jsx("div", { ...o, ...J(n, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
658
658
|
f
|
|
659
659
|
] }) });
|
|
660
|
-
}),
|
|
660
|
+
}), Me = {
|
|
661
661
|
type: "Video",
|
|
662
662
|
label: "Video",
|
|
663
663
|
category: "core",
|
|
664
|
-
icon:
|
|
664
|
+
icon: q,
|
|
665
665
|
group: "media",
|
|
666
666
|
...p({
|
|
667
667
|
properties: {
|
|
@@ -706,14 +706,14 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
706
706
|
}
|
|
707
707
|
}),
|
|
708
708
|
i18nProps: ["url"]
|
|
709
|
-
},
|
|
710
|
-
const { blockProps:
|
|
711
|
-
return y.createElement("hr", { ...
|
|
712
|
-
},
|
|
709
|
+
}, Ee = (e) => {
|
|
710
|
+
const { blockProps: o, styles: t } = e;
|
|
711
|
+
return y.createElement("hr", { ...t, ...o });
|
|
712
|
+
}, Te = {
|
|
713
713
|
type: "Divider",
|
|
714
714
|
label: "web_blocks.divider",
|
|
715
715
|
category: "core",
|
|
716
|
-
icon:
|
|
716
|
+
icon: F,
|
|
717
717
|
group: "basic",
|
|
718
718
|
...p({
|
|
719
719
|
properties: {
|
|
@@ -721,17 +721,17 @@ const te = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ r.jsx("d
|
|
|
721
721
|
}
|
|
722
722
|
})
|
|
723
723
|
};
|
|
724
|
-
function
|
|
725
|
-
return
|
|
724
|
+
function $e(e) {
|
|
725
|
+
return E({ 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);
|
|
726
726
|
}
|
|
727
|
-
const
|
|
728
|
-
const { scripts:
|
|
729
|
-
return
|
|
727
|
+
const Ne = (e) => {
|
|
728
|
+
const { scripts: o, inBuilder: t, blockProps: n } = e;
|
|
729
|
+
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 } });
|
|
730
730
|
}, He = {
|
|
731
731
|
type: "CustomScript",
|
|
732
732
|
label: "web_blocks.custom_script",
|
|
733
733
|
category: "core",
|
|
734
|
-
icon:
|
|
734
|
+
icon: $e,
|
|
735
735
|
group: "advanced",
|
|
736
736
|
...p({
|
|
737
737
|
properties: {
|
|
@@ -744,11 +744,11 @@ const De = (e) => {
|
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
})
|
|
747
|
-
}, ze = (e) => null,
|
|
747
|
+
}, ze = (e) => null, Re = {
|
|
748
748
|
type: "Dark Mode",
|
|
749
749
|
label: "web_blocks.dark_mode",
|
|
750
750
|
category: "core",
|
|
751
|
-
icon:
|
|
751
|
+
icon: G,
|
|
752
752
|
group: "advanced",
|
|
753
753
|
...p({
|
|
754
754
|
properties: {}
|
|
@@ -802,13 +802,13 @@ const De = (e) => {
|
|
|
802
802
|
icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'></circle><path d='M12 2v2'></path><path d='M12 20v2'></path><path d='m4.93 4.93 1.41 1.41'></path><path d='m17.66 17.66 1.41 1.41'></path><path d='M2 12h2'></path><path d='M20 12h2'></path><path d='m6.34 17.66-1.41 1.41'></path><path d='m19.07 4.93-1.41 1.41'></path></svg>"
|
|
803
803
|
}
|
|
804
804
|
]
|
|
805
|
-
},
|
|
806
|
-
const { blockProps:
|
|
807
|
-
return
|
|
805
|
+
}, Ae = (e) => {
|
|
806
|
+
const { blockProps: o, inBuilder: t, children: n, globalBlock: l } = e;
|
|
807
|
+
return t && !l ? /* @__PURE__ */ r.jsxs(
|
|
808
808
|
"div",
|
|
809
809
|
{
|
|
810
810
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
811
|
-
...
|
|
811
|
+
...o,
|
|
812
812
|
children: [
|
|
813
813
|
/* @__PURE__ */ r.jsxs("h1", { children: [
|
|
814
814
|
"Global Block - ",
|
|
@@ -817,11 +817,11 @@ const De = (e) => {
|
|
|
817
817
|
/* @__PURE__ */ r.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
818
818
|
]
|
|
819
819
|
}
|
|
820
|
-
) : y.createElement("div", { ...
|
|
821
|
-
},
|
|
820
|
+
) : y.createElement("div", { ...o }, n);
|
|
821
|
+
}, De = {
|
|
822
822
|
type: "GlobalBlock",
|
|
823
823
|
label: "Global Block",
|
|
824
|
-
icon:
|
|
824
|
+
icon: K,
|
|
825
825
|
category: "core",
|
|
826
826
|
group: "advanced",
|
|
827
827
|
...p({
|
|
@@ -836,7 +836,7 @@ const De = (e) => {
|
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
838
|
})
|
|
839
|
-
},
|
|
839
|
+
}, qe = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ r.jsx("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Fe = {
|
|
840
840
|
type: "Text",
|
|
841
841
|
label: "Text",
|
|
842
842
|
hidden: !0,
|
|
@@ -854,10 +854,10 @@ const De = (e) => {
|
|
|
854
854
|
}),
|
|
855
855
|
aiProps: ["content"],
|
|
856
856
|
i18nProps: ["content"]
|
|
857
|
-
},
|
|
858
|
-
const { blockProps:
|
|
857
|
+
}, Ge = (e) => {
|
|
858
|
+
const { blockProps: o, backgroundImage: t, children: n, styles: l, tag: i } = e;
|
|
859
859
|
let s = {};
|
|
860
|
-
return
|
|
860
|
+
return t && (s = { backgroundImage: `url(${t})` }), y.createElement(i || "div", { ...o, ...l, style: s }, n);
|
|
861
861
|
}, Ve = {
|
|
862
862
|
type: "Body",
|
|
863
863
|
label: "Body",
|
|
@@ -904,8 +904,8 @@ const De = (e) => {
|
|
|
904
904
|
canMove: () => !1,
|
|
905
905
|
canDuplicate: () => !1
|
|
906
906
|
}, Oe = (e) => {
|
|
907
|
-
const { blockProps:
|
|
908
|
-
return y.createElement("br", { ...
|
|
907
|
+
const { blockProps: o, styles: t } = e;
|
|
908
|
+
return y.createElement("br", { ...o, ...t });
|
|
909
909
|
}, Ue = {
|
|
910
910
|
type: "LineBreak",
|
|
911
911
|
label: "Line Break",
|
|
@@ -921,11 +921,11 @@ const De = (e) => {
|
|
|
921
921
|
canDelete: () => !1,
|
|
922
922
|
canMove: () => !1,
|
|
923
923
|
canDuplicate: () => !1
|
|
924
|
-
},
|
|
925
|
-
const { children:
|
|
926
|
-
let a =
|
|
927
|
-
|
|
928
|
-
const
|
|
924
|
+
}, We = (e) => {
|
|
925
|
+
const { children: o, blockProps: t, errorMessage: n, successMessage: l, action: i, styles: s } = e;
|
|
926
|
+
let a = o;
|
|
927
|
+
o || (a = /* @__PURE__ */ r.jsx(x, {}));
|
|
928
|
+
const d = {
|
|
929
929
|
"x-data": "{}",
|
|
930
930
|
"x-on:submit.prevent": "post"
|
|
931
931
|
}, g = {
|
|
@@ -935,12 +935,12 @@ const De = (e) => {
|
|
|
935
935
|
return /* @__PURE__ */ r.jsxs(
|
|
936
936
|
"form",
|
|
937
937
|
{
|
|
938
|
-
...
|
|
938
|
+
...d,
|
|
939
939
|
"data-error": n,
|
|
940
940
|
"data-success": l,
|
|
941
941
|
method: "post",
|
|
942
942
|
action: i,
|
|
943
|
-
...
|
|
943
|
+
...t,
|
|
944
944
|
...s,
|
|
945
945
|
children: [
|
|
946
946
|
/* @__PURE__ */ r.jsx("div", { ...g }),
|
|
@@ -948,11 +948,11 @@ const De = (e) => {
|
|
|
948
948
|
]
|
|
949
949
|
}
|
|
950
950
|
);
|
|
951
|
-
},
|
|
951
|
+
}, Xe = {
|
|
952
952
|
type: "Form",
|
|
953
953
|
label: "Form",
|
|
954
954
|
category: "core",
|
|
955
|
-
icon:
|
|
955
|
+
icon: Q,
|
|
956
956
|
group: "form",
|
|
957
957
|
...p({
|
|
958
958
|
properties: {
|
|
@@ -979,8 +979,8 @@ const De = (e) => {
|
|
|
979
979
|
i18nProps: ["errorMessage", "successMessage"],
|
|
980
980
|
aiProps: ["errorMessage", "successMessage"],
|
|
981
981
|
canAcceptBlock: () => !0
|
|
982
|
-
},
|
|
983
|
-
const { blockProps:
|
|
982
|
+
}, Ye = (e) => {
|
|
983
|
+
const { blockProps: o, inBuilder: t, label: n, styles: l, inputStyles: i, icon: s, iconSize: a, iconPos: d } = e, g = w(), h = {
|
|
984
984
|
"x-bind:disabled": "formLoading"
|
|
985
985
|
};
|
|
986
986
|
return /* @__PURE__ */ r.jsxs(
|
|
@@ -990,26 +990,26 @@ const De = (e) => {
|
|
|
990
990
|
...h,
|
|
991
991
|
...i,
|
|
992
992
|
...l,
|
|
993
|
-
...
|
|
994
|
-
type:
|
|
993
|
+
...o || {},
|
|
994
|
+
type: t ? "button" : "submit",
|
|
995
995
|
children: [
|
|
996
996
|
n,
|
|
997
997
|
s && /* @__PURE__ */ r.jsx(
|
|
998
998
|
"div",
|
|
999
999
|
{
|
|
1000
1000
|
style: { width: a + "px" },
|
|
1001
|
-
className:
|
|
1001
|
+
className: d + " " + (d === "order-first" ? "mr-2" : "ml-2") || "",
|
|
1002
1002
|
dangerouslySetInnerHTML: { __html: s }
|
|
1003
1003
|
}
|
|
1004
1004
|
)
|
|
1005
1005
|
]
|
|
1006
1006
|
}
|
|
1007
1007
|
);
|
|
1008
|
-
},
|
|
1008
|
+
}, Ze = {
|
|
1009
1009
|
type: "FormButton",
|
|
1010
1010
|
label: "Submit Button",
|
|
1011
1011
|
category: "core",
|
|
1012
|
-
icon:
|
|
1012
|
+
icon: C,
|
|
1013
1013
|
group: "form",
|
|
1014
1014
|
...p({
|
|
1015
1015
|
properties: {
|
|
@@ -1045,35 +1045,35 @@ const De = (e) => {
|
|
|
1045
1045
|
}),
|
|
1046
1046
|
i18nProps: ["label"],
|
|
1047
1047
|
aiProps: ["label"]
|
|
1048
|
-
},
|
|
1049
|
-
const { blockProps:
|
|
1050
|
-
return a ? /* @__PURE__ */ r.jsxs("div", { ...i, ...
|
|
1048
|
+
}, Je = (e) => {
|
|
1049
|
+
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, showLabel: a, required: d, inputType: g } = e, h = w();
|
|
1050
|
+
return a ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
|
|
1051
1051
|
a && /* @__PURE__ */ r.jsx("label", { htmlFor: h, children: n }),
|
|
1052
1052
|
/* @__PURE__ */ r.jsx(
|
|
1053
1053
|
"input",
|
|
1054
1054
|
{
|
|
1055
|
-
name:
|
|
1055
|
+
name: t,
|
|
1056
1056
|
...s,
|
|
1057
1057
|
id: h,
|
|
1058
1058
|
type: g,
|
|
1059
1059
|
placeholder: l,
|
|
1060
|
-
required:
|
|
1060
|
+
required: d
|
|
1061
1061
|
}
|
|
1062
1062
|
)
|
|
1063
1063
|
] }) : /* @__PURE__ */ r.jsx(
|
|
1064
1064
|
"input",
|
|
1065
1065
|
{
|
|
1066
1066
|
id: h,
|
|
1067
|
-
name:
|
|
1068
|
-
...
|
|
1067
|
+
name: t,
|
|
1068
|
+
...o,
|
|
1069
1069
|
...s,
|
|
1070
1070
|
...i,
|
|
1071
1071
|
type: g,
|
|
1072
1072
|
placeholder: l,
|
|
1073
|
-
required:
|
|
1073
|
+
required: d
|
|
1074
1074
|
}
|
|
1075
1075
|
);
|
|
1076
|
-
},
|
|
1076
|
+
}, Ke = {
|
|
1077
1077
|
type: "Input",
|
|
1078
1078
|
label: "web_blocks.input",
|
|
1079
1079
|
category: "core",
|
|
@@ -1128,25 +1128,25 @@ const De = (e) => {
|
|
|
1128
1128
|
}),
|
|
1129
1129
|
aiProps: ["label", "placeholder"],
|
|
1130
1130
|
i18nProps: ["label", "placeholder"]
|
|
1131
|
-
},
|
|
1132
|
-
const { blockProps:
|
|
1133
|
-
return
|
|
1134
|
-
/* @__PURE__ */ r.jsx("input", { ...i, name:
|
|
1131
|
+
}, Qe = (e) => {
|
|
1132
|
+
const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles: i, required: s, checked: a, showLabel: d = !0 } = e, g = w();
|
|
1133
|
+
return d ? /* @__PURE__ */ r.jsxs("div", { ...l, ...o, children: [
|
|
1134
|
+
/* @__PURE__ */ r.jsx("input", { ...i, name: t, id: g, type: "radio", required: s, defaultChecked: a }),
|
|
1135
1135
|
n && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: n })
|
|
1136
1136
|
] }) : /* @__PURE__ */ r.jsx(
|
|
1137
1137
|
"input",
|
|
1138
1138
|
{
|
|
1139
1139
|
id: g,
|
|
1140
|
-
...
|
|
1140
|
+
...o,
|
|
1141
1141
|
...i,
|
|
1142
1142
|
...l,
|
|
1143
1143
|
type: "radio",
|
|
1144
1144
|
required: s,
|
|
1145
1145
|
checked: a,
|
|
1146
|
-
name:
|
|
1146
|
+
name: t
|
|
1147
1147
|
}
|
|
1148
1148
|
);
|
|
1149
|
-
},
|
|
1149
|
+
}, et = {
|
|
1150
1150
|
type: "Radio",
|
|
1151
1151
|
label: "web_blocks.radio",
|
|
1152
1152
|
category: "core",
|
|
@@ -1180,19 +1180,19 @@ const De = (e) => {
|
|
|
1180
1180
|
}),
|
|
1181
1181
|
aiProps: ["label"],
|
|
1182
1182
|
i18nProps: ["label"]
|
|
1183
|
-
},
|
|
1184
|
-
const { blockProps:
|
|
1185
|
-
return
|
|
1186
|
-
|
|
1187
|
-
/* @__PURE__ */ r.jsxs("select", { ...s, id: f, required: a, multiple: g, name:
|
|
1183
|
+
}, tt = (e) => {
|
|
1184
|
+
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, required: a, showLabel: d, _multiple: g, options: h } = e, f = w();
|
|
1185
|
+
return d ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
|
|
1186
|
+
d && /* @__PURE__ */ r.jsx("label", { htmlFor: f, children: n }),
|
|
1187
|
+
/* @__PURE__ */ r.jsxs("select", { ...s, id: f, required: a, multiple: g, name: t, children: [
|
|
1188
1188
|
/* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: l }),
|
|
1189
|
-
|
|
1189
|
+
L(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
|
|
1190
1190
|
] })
|
|
1191
|
-
] }) : /* @__PURE__ */ r.jsxs("select", { id: f, ...i, ...
|
|
1191
|
+
] }) : /* @__PURE__ */ r.jsxs("select", { id: f, ...i, ...o, required: a, multiple: g, name: t, children: [
|
|
1192
1192
|
/* @__PURE__ */ r.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: l }),
|
|
1193
|
-
|
|
1193
|
+
L(h, (m) => /* @__PURE__ */ r.jsx("option", { value: m.value, dangerouslySetInnerHTML: { __html: m.label } }, m.value))
|
|
1194
1194
|
] });
|
|
1195
|
-
},
|
|
1195
|
+
}, ot = {
|
|
1196
1196
|
type: "Select",
|
|
1197
1197
|
label: "web_blocks.select",
|
|
1198
1198
|
category: "core",
|
|
@@ -1251,24 +1251,24 @@ const De = (e) => {
|
|
|
1251
1251
|
}),
|
|
1252
1252
|
aiProps: ["label", "placeholder"],
|
|
1253
1253
|
i18nProps: ["label", "placeholder"]
|
|
1254
|
-
},
|
|
1255
|
-
const { blockProps:
|
|
1256
|
-
return
|
|
1257
|
-
|
|
1258
|
-
/* @__PURE__ */ r.jsx("textarea", { name:
|
|
1254
|
+
}, lt = (e) => {
|
|
1255
|
+
const { blockProps: o, fieldName: t, label: n, placeholder: l, styles: i, inputStyles: s, _rows: a, showLabel: d } = e, g = w();
|
|
1256
|
+
return d ? /* @__PURE__ */ r.jsxs("div", { ...i, ...o, children: [
|
|
1257
|
+
d && /* @__PURE__ */ r.jsx("label", { htmlFor: g, children: n }),
|
|
1258
|
+
/* @__PURE__ */ r.jsx("textarea", { name: t, ...s, id: g, placeholder: l, rows: a })
|
|
1259
1259
|
] }) : /* @__PURE__ */ r.jsx(
|
|
1260
1260
|
"textarea",
|
|
1261
1261
|
{
|
|
1262
1262
|
id: g,
|
|
1263
|
-
name:
|
|
1264
|
-
...
|
|
1263
|
+
name: t,
|
|
1264
|
+
...o,
|
|
1265
1265
|
...s,
|
|
1266
1266
|
...i,
|
|
1267
1267
|
placeholder: l,
|
|
1268
1268
|
rows: a
|
|
1269
1269
|
}
|
|
1270
1270
|
);
|
|
1271
|
-
},
|
|
1271
|
+
}, nt = {
|
|
1272
1272
|
type: "TextArea",
|
|
1273
1273
|
label: "web_blocks.textarea",
|
|
1274
1274
|
category: "core",
|
|
@@ -1303,14 +1303,14 @@ const De = (e) => {
|
|
|
1303
1303
|
}),
|
|
1304
1304
|
aiProps: ["label", "placeholder"],
|
|
1305
1305
|
i18nProps: ["label", "placeholder"]
|
|
1306
|
-
},
|
|
1307
|
-
const { blockProps:
|
|
1308
|
-
return
|
|
1306
|
+
}, rt = (e) => {
|
|
1307
|
+
const { blockProps: o, fieldName: t, label: n, styles: l, inputStyles: i, required: s, checked: a, showLabel: d = !0 } = e, g = w();
|
|
1308
|
+
return d ? /* @__PURE__ */ r.jsxs("div", { ...l, ...o, children: [
|
|
1309
1309
|
/* @__PURE__ */ r.jsx(
|
|
1310
1310
|
"input",
|
|
1311
1311
|
{
|
|
1312
1312
|
...i,
|
|
1313
|
-
name:
|
|
1313
|
+
name: t,
|
|
1314
1314
|
id: g,
|
|
1315
1315
|
type: "checkbox",
|
|
1316
1316
|
required: s,
|
|
@@ -1322,19 +1322,19 @@ const De = (e) => {
|
|
|
1322
1322
|
"input",
|
|
1323
1323
|
{
|
|
1324
1324
|
id: g,
|
|
1325
|
-
...
|
|
1325
|
+
...o,
|
|
1326
1326
|
...i,
|
|
1327
1327
|
...l,
|
|
1328
1328
|
type: "checkbox",
|
|
1329
1329
|
required: s,
|
|
1330
|
-
name:
|
|
1330
|
+
name: t
|
|
1331
1331
|
}
|
|
1332
1332
|
);
|
|
1333
|
-
},
|
|
1333
|
+
}, it = {
|
|
1334
1334
|
type: "Checkbox",
|
|
1335
1335
|
label: "web_blocks.checkbox",
|
|
1336
1336
|
category: "core",
|
|
1337
|
-
icon:
|
|
1337
|
+
icon: W,
|
|
1338
1338
|
group: "form",
|
|
1339
1339
|
...p({
|
|
1340
1340
|
properties: {
|
|
@@ -1364,17 +1364,17 @@ const De = (e) => {
|
|
|
1364
1364
|
}),
|
|
1365
1365
|
aiProps: ["label"],
|
|
1366
1366
|
i18nProps: ["label"]
|
|
1367
|
-
},
|
|
1368
|
-
const { blockProps:
|
|
1367
|
+
}, st = (e) => {
|
|
1368
|
+
const { blockProps: o, content: t, styles: n, children: l } = e, i = { ...n, ...o };
|
|
1369
1369
|
return l ? y.createElement("label", i, l) : y.createElement("label", {
|
|
1370
1370
|
...i,
|
|
1371
|
-
dangerouslySetInnerHTML: { __html:
|
|
1371
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
1372
1372
|
});
|
|
1373
|
-
},
|
|
1373
|
+
}, at = {
|
|
1374
1374
|
type: "Label",
|
|
1375
1375
|
label: "Label",
|
|
1376
1376
|
category: "core",
|
|
1377
|
-
icon:
|
|
1377
|
+
icon: X,
|
|
1378
1378
|
group: "form",
|
|
1379
1379
|
...p({
|
|
1380
1380
|
properties: {
|
|
@@ -1386,89 +1386,9 @@ const De = (e) => {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
1388
|
})
|
|
1389
|
-
},
|
|
1390
|
-
|
|
1391
|
-
button: { "x-on:click": "open = !open" },
|
|
1392
|
-
menu: { "x-show": "open", "x-on:click.away": "open = false" }
|
|
1393
|
-
}, dt = (e) => {
|
|
1394
|
-
const { blockProps: t, title: o, icon: n, iconWidth: l, iconHeight: i, styles: s } = e;
|
|
1395
|
-
return /* @__PURE__ */ r.jsxs("button", { ...t, ...E.button, ...s, children: [
|
|
1396
|
-
o,
|
|
1397
|
-
/* @__PURE__ */ r.jsx("span", { dangerouslySetInnerHTML: { __html: n }, style: { width: l, height: i } })
|
|
1398
|
-
] });
|
|
1399
|
-
};
|
|
1400
|
-
d(dt, {
|
|
1401
|
-
type: "DropdownButton",
|
|
1402
|
-
label: "Dropdown Button",
|
|
1403
|
-
group: "advanced",
|
|
1404
|
-
category: "core",
|
|
1405
|
-
hidden: !0,
|
|
1406
|
-
canMove: () => !1,
|
|
1407
|
-
canDelete: () => !1,
|
|
1408
|
-
...p({
|
|
1409
|
-
properties: {
|
|
1410
|
-
title: { type: "string", title: "Title", default: "Menu Item" },
|
|
1411
|
-
icon: { type: "string", title: "Icon", default: "", ui: { "ui:widget": "icon" } },
|
|
1412
|
-
iconWidth: { type: "string", title: "Icon Width", default: "16px" },
|
|
1413
|
-
iconHeight: { type: "string", title: "Icon Height", default: "16px" },
|
|
1414
|
-
styles: c("flex items-center gap-2 px-4 py-1")
|
|
1415
|
-
}
|
|
1416
|
-
})
|
|
1417
|
-
});
|
|
1418
|
-
const pt = (e) => {
|
|
1419
|
-
const { blockProps: t, children: o, styles: n } = e;
|
|
1420
|
-
return /* @__PURE__ */ r.jsx("div", { ...t, ...E.wrapper, className: "relative", children: /* @__PURE__ */ r.jsx("div", { ...n, children: o }) });
|
|
1421
|
-
};
|
|
1422
|
-
d(pt, {
|
|
1423
|
-
type: "DropdownMenuContent",
|
|
1424
|
-
label: "Dropdown Content",
|
|
1425
|
-
hidden: !0,
|
|
1426
|
-
canMove: () => !1,
|
|
1427
|
-
canDelete: () => !1,
|
|
1428
|
-
canAcceptBlock: () => !0,
|
|
1429
|
-
...p({
|
|
1430
|
-
properties: {
|
|
1431
|
-
styles: c("absolute left-0 w-80 mt-2 bg-white rounded-lg shadow-lg z-50")
|
|
1432
|
-
}
|
|
1433
|
-
})
|
|
1434
|
-
});
|
|
1435
|
-
const ut = (e) => {
|
|
1436
|
-
const { children: t } = e;
|
|
1437
|
-
return t;
|
|
1438
|
-
}, gt = {
|
|
1439
|
-
type: "DropdownMenu",
|
|
1440
|
-
label: "Dropdown Menu",
|
|
1441
|
-
group: "advanced",
|
|
1442
|
-
blocks: () => [
|
|
1443
|
-
{ _type: "DropdownMenu", _id: "menu" },
|
|
1444
|
-
{
|
|
1445
|
-
_type: "DropdownButton",
|
|
1446
|
-
_id: "button",
|
|
1447
|
-
_parent: "menu",
|
|
1448
|
-
title: "Menu Item",
|
|
1449
|
-
icon: "",
|
|
1450
|
-
styles: "#styles:,flex items-center gap-2 px-4 py-1"
|
|
1451
|
-
},
|
|
1452
|
-
{
|
|
1453
|
-
_type: "DropdownMenuContent",
|
|
1454
|
-
_id: "content",
|
|
1455
|
-
_parent: "menu",
|
|
1456
|
-
styles: "#styles:,absolute left-0 w-80 mt-2 bg-white rounded-lg shadow-lg z-50"
|
|
1457
|
-
}
|
|
1458
|
-
],
|
|
1459
|
-
category: "core",
|
|
1460
|
-
...p({
|
|
1461
|
-
properties: {
|
|
1462
|
-
showDropdown: {
|
|
1463
|
-
type: "boolean",
|
|
1464
|
-
title: "Show Dropdown",
|
|
1465
|
-
default: !1
|
|
1466
|
-
}
|
|
1467
|
-
}
|
|
1468
|
-
})
|
|
1469
|
-
}, vt = () => {
|
|
1470
|
-
d(oe, le), d(ae, ce), d(ne, re), d(de, pe), d(ue, ge), d(ye, me), d(he, fe), d(be, ke), d(xe, we), d(ve, Ie), d(_e, Le), d(Be, Ce), d(Pe, je), d(Me, Ee), d(ie, se), d(De, He), d(Fe, Ge), d(Xe, Ye), d(Ze, Je), d(Ke, Qe), d(it, st), d(et, tt), d(ot, lt), d(nt, rt), d(at, ct), d(Oe, Ue), d(We, Ve), d(Te, $e), d(ze, Ae), d(Re, qe), d(ut, gt);
|
|
1389
|
+
}, ft = () => {
|
|
1390
|
+
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);
|
|
1471
1391
|
};
|
|
1472
1392
|
export {
|
|
1473
|
-
|
|
1393
|
+
ft as loadWebBlocks
|
|
1474
1394
|
};
|