@chaibuilder/sdk 1.2.93 → 1.2.95
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/{CodeEditor-7AhH7ll8.js → CodeEditor-rsNTHAnV.js} +28 -30
- package/dist/CodeEditor-sMmjIL-u.cjs +1 -0
- package/dist/{Topbar-X_79oQQf.js → Topbar-TkCq6YMq.js} +19 -21
- package/dist/Topbar-f4B5oRp1.cjs +1 -0
- package/dist/{UnsplashImages-TlLU5BkT.js → UnsplashImages-Ax3Ik6fg.js} +33 -35
- package/dist/UnsplashImages-vCpHQ4up.cjs +1 -0
- package/dist/{UploadImages-GiKofaXX.js → UploadImages-Jar31A7w.js} +62 -37
- package/dist/UploadImages-KO8wFdE8.cjs +1 -0
- package/dist/{context-menu-yLeOsx9j.js → context-menu-9cWJcKdh.js} +463 -427
- package/dist/context-menu-sQn7ryJ6.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +77 -79
- package/dist/iconBase-HBZkvN04.js +330 -0
- package/dist/iconBase-kuD_VwQx.cjs +1 -0
- package/dist/index-cUydM1n4.cjs +223 -0
- package/dist/{index-GjgkZP8W.js → index-esmAeUzA.js} +9012 -7760
- package/dist/{plugin-BXpjdQxx.cjs → plugin-P0tpo_XZ.cjs} +1 -1
- package/dist/plugin-_F-KZp1i.cjs +1 -0
- package/dist/{plugin-DdKuAR7p.js → plugin-f5uJtdXY.js} +1 -1
- package/dist/plugin-sJ3Hzvpv.js +57 -0
- package/dist/render.cjs +2 -2
- package/dist/render.js +6 -7
- package/dist/style.css +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +6 -7
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +112 -113
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +235 -265
- package/package.json +1 -1
- package/dist/CodeEditor-Iy57NpaR.cjs +0 -1
- package/dist/Topbar-oXx57vCi.cjs +0 -1
- package/dist/UnsplashImages-smJeXVat.cjs +0 -1
- package/dist/UploadImages-Ic_iZgWY.cjs +0 -1
- package/dist/_commonjsHelpers-f3sTPFkQ.js +0 -8
- package/dist/_commonjsHelpers-f52AuuUj.cjs +0 -1
- package/dist/button-9Duvj2dH.js +0 -42
- package/dist/button-oQgWN0j0.cjs +0 -1
- package/dist/context-menu-8MWP_Ikf.cjs +0 -1
- package/dist/iconBase-BnEC5_qG.js +0 -1583
- package/dist/iconBase-_bgMuxa5.cjs +0 -1
- package/dist/index-f5CPA351.cjs +0 -223
- package/dist/plugin-02QsHeBE.cjs +0 -1
- package/dist/plugin-VDzc8jUO.js +0 -52
package/dist/web-blocks.js
CHANGED
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
import { registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
2
|
-
import { j as
|
|
2
|
+
import { j as s } from "./jsx-runtime-Sp0orL4X.js";
|
|
3
3
|
import * as p from "react";
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { GlobeIcon as be } from "lucide-react";
|
|
9
|
-
import "react-i18next";
|
|
10
|
-
import { B as pe } from "./button-9Duvj2dH.js";
|
|
11
|
-
import "jotai";
|
|
4
|
+
import { c as j, T as m, f as v, o as C, b, q as N, y as I, l as T, d as L, m as S, v as R, r as k, e as F, G, g as B, S as O } from "./iconBase-HBZkvN04.js";
|
|
5
|
+
import { ButtonIcon as H, CodeIcon as U, HeadingIcon as V, TextIcon as W, CursorTextIcon as X, Link1Icon as Y, ImageIcon as z, RowsIcon as Z, ColumnsIcon as J, SketchLogoIcon as K, VideoIcon as Q, DividerHorizontalIcon as ee, MoonIcon as te, SpaceBetweenVerticallyIcon as q, GroupIcon as le, InputIcon as A, RadiobuttonIcon as oe, DropdownMenuIcon as se, CheckboxIcon as ae } from "@radix-ui/react-icons";
|
|
6
|
+
import { isNull as ne, isEmpty as y, get as x, pick as re, omit as ce, map as M } from "lodash-es";
|
|
7
|
+
import { GlobeIcon as ie } from "lucide-react";
|
|
12
8
|
import "clsx";
|
|
13
9
|
import "tailwind-merge";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import "class-variance-authority";
|
|
19
|
-
const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("div", { className: I("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ o.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ o.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, _ = me, fe = (e) => {
|
|
20
|
-
const { blockProps: l, inBuilder: t, backgroundImage: a, children: s, tag: r = "div", styles: n } = e;
|
|
21
|
-
let i = s;
|
|
22
|
-
s || (i = /* @__PURE__ */ o.jsx(_, { inBuilder: t }));
|
|
10
|
+
const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("div", { className: j("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, _ = de, ue = (e) => {
|
|
11
|
+
const { blockProps: l, inBuilder: t, backgroundImage: a, children: o, tag: n = "div", styles: r } = e;
|
|
12
|
+
let i = o;
|
|
13
|
+
o || (i = /* @__PURE__ */ s.jsx(_, { inBuilder: t }));
|
|
23
14
|
let c = {};
|
|
24
|
-
return a && (c = { backgroundImage: `url(${a})` }), p.createElement(
|
|
25
|
-
},
|
|
15
|
+
return a && (c = { backgroundImage: `url(${a})` }), p.createElement(n, { ...l, ...r, style: c }, i);
|
|
16
|
+
}, be = {
|
|
26
17
|
type: "Box",
|
|
27
18
|
label: "web_blocks.box",
|
|
28
19
|
category: "core",
|
|
@@ -55,14 +46,14 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
55
46
|
backgroundImage: C({ title: "web_blocks.background_image" })
|
|
56
47
|
},
|
|
57
48
|
canAcceptBlock: () => !0
|
|
58
|
-
},
|
|
59
|
-
const { blockProps: l, iconSize: t, icon: a, content:
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
c && /* @__PURE__ */
|
|
49
|
+
}, pe = (e) => {
|
|
50
|
+
const { blockProps: l, iconSize: t, icon: a, content: o, iconPos: n, styles: r, children: i } = e, c = a, d = i || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
51
|
+
/* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", children: o }),
|
|
52
|
+
c && /* @__PURE__ */ s.jsx(
|
|
62
53
|
"div",
|
|
63
54
|
{
|
|
64
55
|
style: { width: t + "px" },
|
|
65
|
-
className:
|
|
56
|
+
className: n + " " + (n === "order-first" ? "mr-2" : "ml-2") || "",
|
|
66
57
|
dangerouslySetInnerHTML: { __html: c }
|
|
67
58
|
}
|
|
68
59
|
)
|
|
@@ -71,12 +62,12 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
71
62
|
"button",
|
|
72
63
|
{
|
|
73
64
|
...l,
|
|
74
|
-
...
|
|
65
|
+
...r,
|
|
75
66
|
type: "button"
|
|
76
67
|
},
|
|
77
68
|
d
|
|
78
69
|
);
|
|
79
|
-
},
|
|
70
|
+
}, me = {
|
|
80
71
|
type: "Button",
|
|
81
72
|
label: "web_blocks.button",
|
|
82
73
|
category: "core",
|
|
@@ -86,7 +77,7 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
86
77
|
content: b({ title: "web_blocks.label", default: "Button" }),
|
|
87
78
|
styles: m({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
|
|
88
79
|
icon: N({ title: "web_blocks.icon", default: "" }),
|
|
89
|
-
iconSize:
|
|
80
|
+
iconSize: I({ title: "web_blocks.icon_size", default: 24 }),
|
|
90
81
|
iconPos: v({
|
|
91
82
|
title: "web_blocks.icon_position",
|
|
92
83
|
default: "order-last",
|
|
@@ -96,10 +87,10 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
96
87
|
]
|
|
97
88
|
})
|
|
98
89
|
}
|
|
99
|
-
},
|
|
100
|
-
const { blockProps: l, styles: t, htmlCode: a, inBuilder:
|
|
101
|
-
return
|
|
102
|
-
|
|
90
|
+
}, fe = (e) => {
|
|
91
|
+
const { blockProps: l, styles: t, htmlCode: a, inBuilder: o } = e;
|
|
92
|
+
return o ? /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
|
|
93
|
+
o ? /* @__PURE__ */ s.jsx("div", { ...l, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
103
94
|
p.createElement("div", {
|
|
104
95
|
...t,
|
|
105
96
|
dangerouslySetInnerHTML: { __html: a.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
@@ -109,11 +100,11 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
109
100
|
...t,
|
|
110
101
|
dangerouslySetInnerHTML: { __html: a }
|
|
111
102
|
});
|
|
112
|
-
},
|
|
103
|
+
}, he = {
|
|
113
104
|
type: "CustomHTML",
|
|
114
105
|
label: "web_blocks.custom_html",
|
|
115
106
|
category: "core",
|
|
116
|
-
icon:
|
|
107
|
+
icon: U,
|
|
117
108
|
group: "advanced",
|
|
118
109
|
props: {
|
|
119
110
|
styles: m({ default: "" }),
|
|
@@ -123,12 +114,12 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
123
114
|
placeholder: "web_blocks.placeholder"
|
|
124
115
|
})
|
|
125
116
|
}
|
|
126
|
-
},
|
|
117
|
+
}, ke = p.memo(
|
|
127
118
|
(e) => {
|
|
128
119
|
const { blockProps: l, styles: t } = e;
|
|
129
120
|
return p.createElement("div", { ...l, ...t });
|
|
130
121
|
}
|
|
131
|
-
),
|
|
122
|
+
), ge = {
|
|
132
123
|
type: "EmptyBox",
|
|
133
124
|
label: "web_blocks.empty_box",
|
|
134
125
|
category: "core",
|
|
@@ -137,20 +128,20 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
137
128
|
styles: m({ default: "" }),
|
|
138
129
|
backgroundImage: C({ title: "web_blocks.background_image" })
|
|
139
130
|
}
|
|
140
|
-
},
|
|
141
|
-
const { blockProps: l, styles: t, content: a, level:
|
|
142
|
-
return
|
|
131
|
+
}, ye = (e) => {
|
|
132
|
+
const { blockProps: l, styles: t, content: a, level: o = "h1", children: n = null } = e;
|
|
133
|
+
return n ? p.createElement(o, { ...t, ...l }, n) : p.createElement(o, {
|
|
143
134
|
...t,
|
|
144
135
|
...l,
|
|
145
136
|
"data-ai-key": "content",
|
|
146
137
|
"data-ai-type": "html",
|
|
147
138
|
dangerouslySetInnerHTML: { __html: a }
|
|
148
139
|
});
|
|
149
|
-
},
|
|
140
|
+
}, _e = {
|
|
150
141
|
type: "Heading",
|
|
151
142
|
label: "web_blocks.heading",
|
|
152
143
|
category: "core",
|
|
153
|
-
icon:
|
|
144
|
+
icon: V,
|
|
154
145
|
group: "typography",
|
|
155
146
|
props: {
|
|
156
147
|
level: v({
|
|
@@ -170,20 +161,20 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
170
161
|
content: L({ title: "web_blocks.content", default: "Heading goes here" })
|
|
171
162
|
},
|
|
172
163
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
173
|
-
},
|
|
164
|
+
}, we = (e) => {
|
|
174
165
|
const { blockProps: l, styles: t, content: a } = e;
|
|
175
|
-
return
|
|
166
|
+
return ne(e.children) ? p.createElement("p", {
|
|
176
167
|
...t,
|
|
177
168
|
...l,
|
|
178
169
|
"data-ai-key": "content",
|
|
179
170
|
"data-ai-type": "html",
|
|
180
171
|
dangerouslySetInnerHTML: { __html: a }
|
|
181
172
|
}) : p.createElement("p", { ...t, ...l }, e.children);
|
|
182
|
-
},
|
|
173
|
+
}, xe = {
|
|
183
174
|
type: "Paragraph",
|
|
184
175
|
label: "web_blocks.paragraph",
|
|
185
176
|
category: "core",
|
|
186
|
-
icon:
|
|
177
|
+
icon: W,
|
|
187
178
|
group: "typography",
|
|
188
179
|
props: {
|
|
189
180
|
styles: m({ default: "" }),
|
|
@@ -193,15 +184,15 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
193
184
|
})
|
|
194
185
|
},
|
|
195
186
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
196
|
-
},
|
|
197
|
-
const { blockProps: l, styles: t, content: a, children:
|
|
198
|
-
return
|
|
187
|
+
}, ve = (e) => {
|
|
188
|
+
const { blockProps: l, styles: t, content: a, children: o = null, tag: n } = e;
|
|
189
|
+
return o ? p.createElement("span", { ...t, ...l }, o) : p.createElement(n || "span", {
|
|
199
190
|
...t,
|
|
200
191
|
...l,
|
|
201
192
|
"data-ai-key": "content",
|
|
202
193
|
dangerouslySetInnerHTML: { __html: a }
|
|
203
194
|
});
|
|
204
|
-
},
|
|
195
|
+
}, Be = {
|
|
205
196
|
type: "Span",
|
|
206
197
|
label: "web_blocks.span",
|
|
207
198
|
category: "core",
|
|
@@ -211,9 +202,9 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
211
202
|
content: L({ title: "web_blocks.content", default: "" })
|
|
212
203
|
},
|
|
213
204
|
canAcceptBlock: () => !0
|
|
214
|
-
},
|
|
205
|
+
}, Ie = (e) => {
|
|
215
206
|
const { blockProps: l, content: t, styles: a } = e;
|
|
216
|
-
return /* @__PURE__ */
|
|
207
|
+
return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx(
|
|
217
208
|
"div",
|
|
218
209
|
{
|
|
219
210
|
"data-ai-key": "content",
|
|
@@ -223,11 +214,11 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
223
214
|
dangerouslySetInnerHTML: { __html: t }
|
|
224
215
|
}
|
|
225
216
|
) });
|
|
226
|
-
},
|
|
217
|
+
}, je = {
|
|
227
218
|
type: "RichText",
|
|
228
219
|
label: "web_blocks.richtext",
|
|
229
220
|
category: "core",
|
|
230
|
-
icon:
|
|
221
|
+
icon: X,
|
|
231
222
|
group: "typography",
|
|
232
223
|
props: {
|
|
233
224
|
styles: m({ default: "" }),
|
|
@@ -236,57 +227,57 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
236
227
|
default: "<p>This is a rich text block. You can add text, and other content here.</p>"
|
|
237
228
|
})
|
|
238
229
|
}
|
|
239
|
-
},
|
|
240
|
-
const { blockProps: l, link: t, children: a, styles:
|
|
241
|
-
return !a && y(
|
|
230
|
+
}, Le = (e) => {
|
|
231
|
+
const { blockProps: l, link: t, children: a, styles: o, inBuilder: n, content: r } = e;
|
|
232
|
+
return !a && y(o == null ? void 0 : o.className) && y(r) ? /* @__PURE__ */ s.jsx(_, { inBuilder: n }) : n ? a ? /* @__PURE__ */ s.jsx("span", { ...l, ...o, children: a }) : p.createElement("span", {
|
|
242
233
|
...l,
|
|
243
|
-
...
|
|
244
|
-
dangerouslySetInnerHTML: { __html:
|
|
245
|
-
}) : a ? /* @__PURE__ */
|
|
234
|
+
...o,
|
|
235
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
236
|
+
}) : a ? /* @__PURE__ */ s.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...l, ...o, children: a }) : p.createElement("a", {
|
|
246
237
|
...l,
|
|
247
|
-
...
|
|
238
|
+
...o,
|
|
248
239
|
"data-ai-key": "content",
|
|
249
240
|
href: (t == null ? void 0 : t.href) || "#",
|
|
250
241
|
target: (t == null ? void 0 : t.target) || "_self",
|
|
251
|
-
dangerouslySetInnerHTML: { __html:
|
|
242
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
252
243
|
});
|
|
253
|
-
},
|
|
244
|
+
}, Ce = {
|
|
254
245
|
type: "Link",
|
|
255
246
|
label: "web_blocks.link",
|
|
256
247
|
category: "core",
|
|
257
|
-
icon:
|
|
248
|
+
icon: Y,
|
|
258
249
|
group: "basic",
|
|
259
250
|
props: {
|
|
260
251
|
styles: m({ default: "" }),
|
|
261
252
|
content: b({ title: "web_blocks.content", default: "" }),
|
|
262
|
-
link:
|
|
253
|
+
link: R({
|
|
263
254
|
title: "web_blocks.link",
|
|
264
255
|
default: { type: "page", target: "_self", href: "#" }
|
|
265
256
|
})
|
|
266
257
|
},
|
|
267
258
|
canAcceptBlock: (e) => e !== "Link"
|
|
268
|
-
},
|
|
259
|
+
}, D = (e, ...l) => ({
|
|
269
260
|
...e,
|
|
270
|
-
className:
|
|
271
|
-
}),
|
|
272
|
-
const { blockProps: l, children: t, styles: a, inBuilder:
|
|
273
|
-
if (!t && y(a == null ? void 0 : a.className) && y(
|
|
274
|
-
return /* @__PURE__ */
|
|
275
|
-
if (
|
|
276
|
-
return t ? /* @__PURE__ */
|
|
261
|
+
className: j(e.className, ...l)
|
|
262
|
+
}), Se = (e) => {
|
|
263
|
+
const { blockProps: l, children: t, styles: a, inBuilder: o, content: n, href: r } = e, { hrefType: i, autoplay: c, maxWidth: d, backdropColor: h, galleryName: f } = e, g = D(a, "cb-lightbox");
|
|
264
|
+
if (!t && y(a == null ? void 0 : a.className) && y(n))
|
|
265
|
+
return /* @__PURE__ */ s.jsx(_, { inBuilder: o });
|
|
266
|
+
if (o)
|
|
267
|
+
return t ? /* @__PURE__ */ s.jsx("span", { ...l, ...g, children: t }) : p.createElement("span", {
|
|
277
268
|
...l,
|
|
278
|
-
...
|
|
279
|
-
dangerouslySetInnerHTML: { __html:
|
|
269
|
+
...g,
|
|
270
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
280
271
|
});
|
|
281
272
|
const w = {};
|
|
282
|
-
return w["data-vbtype"] = i, c && (w["data-autoplay"] = "true"), d && (w["data-maxwidth"] = d + "px"), h && (w["data-overlay"] = h), f && (w["data-gall"] = f), t ? /* @__PURE__ */
|
|
273
|
+
return w["data-vbtype"] = i, c && (w["data-autoplay"] = "true"), d && (w["data-maxwidth"] = d + "px"), h && (w["data-overlay"] = h), f && (w["data-gall"] = f), t ? /* @__PURE__ */ s.jsx("a", { ...w, href: r || "#/", ...l, ...g, children: t }) : p.createElement("a", {
|
|
283
274
|
...l,
|
|
284
|
-
...
|
|
275
|
+
...g,
|
|
285
276
|
...w,
|
|
286
|
-
href:
|
|
287
|
-
dangerouslySetInnerHTML: { __html:
|
|
277
|
+
href: r || "#",
|
|
278
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
288
279
|
});
|
|
289
|
-
},
|
|
280
|
+
}, Me = {
|
|
290
281
|
type: "LightBoxLink",
|
|
291
282
|
label: "web_blocks.lightbox_link",
|
|
292
283
|
category: "core",
|
|
@@ -306,23 +297,23 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
306
297
|
{ value: "ajax", title: "web_blocks.ajax" }
|
|
307
298
|
]
|
|
308
299
|
}),
|
|
309
|
-
autoplay:
|
|
310
|
-
maxWidth:
|
|
300
|
+
autoplay: k({ title: "web_blocks.autoplay", default: !1 }),
|
|
301
|
+
maxWidth: I({ title: "web_blocks.max_width", default: "" }),
|
|
311
302
|
backdropColor: b({ title: "backdrop_color", default: "" }),
|
|
312
303
|
galleryName: b({ title: "web_blocks.gallery_name", default: "" })
|
|
313
304
|
},
|
|
314
305
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
315
|
-
},
|
|
316
|
-
const { blockProps: l, children: t, listType: a, styles:
|
|
317
|
-
return !t && y(
|
|
318
|
-
|
|
319
|
-
{ ...l, ...
|
|
306
|
+
}, Ne = (e) => {
|
|
307
|
+
const { blockProps: l, children: t, listType: a, styles: o, tag: n, inBuilder: r } = e, i = j(x(o, "className", ""), a);
|
|
308
|
+
return !t && y(o == null ? void 0 : o.className) ? /* @__PURE__ */ s.jsx(_, { inBuilder: r }) : p.createElement(
|
|
309
|
+
n || (a === "list-decimal" ? "ol" : "ul"),
|
|
310
|
+
{ ...l, ...o, className: i },
|
|
320
311
|
t
|
|
321
312
|
);
|
|
322
|
-
},
|
|
313
|
+
}, $e = {
|
|
323
314
|
type: "List",
|
|
324
315
|
label: "web_blocks.list",
|
|
325
|
-
icon:
|
|
316
|
+
icon: Z,
|
|
326
317
|
category: "core",
|
|
327
318
|
group: "basic",
|
|
328
319
|
props: {
|
|
@@ -362,18 +353,18 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
362
353
|
content: "Item 3"
|
|
363
354
|
}
|
|
364
355
|
]
|
|
365
|
-
},
|
|
366
|
-
const { blockProps: l, content: t, styles: a, children:
|
|
367
|
-
return
|
|
356
|
+
}, Ee = (e) => {
|
|
357
|
+
const { blockProps: l, content: t, styles: a, children: o, tag: n } = e;
|
|
358
|
+
return o ? p.createElement(n || "li", { ...a, ...l }, o) : p.createElement(n || "li", {
|
|
368
359
|
...a,
|
|
369
360
|
...l,
|
|
370
361
|
"data-ai-key": "content",
|
|
371
362
|
dangerouslySetInnerHTML: { __html: t }
|
|
372
363
|
});
|
|
373
|
-
},
|
|
364
|
+
}, Pe = {
|
|
374
365
|
type: "ListItem",
|
|
375
366
|
label: "web_blocks.listitem",
|
|
376
|
-
icon:
|
|
367
|
+
icon: J,
|
|
377
368
|
category: "core",
|
|
378
369
|
group: "basic",
|
|
379
370
|
props: {
|
|
@@ -382,21 +373,21 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
382
373
|
},
|
|
383
374
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
384
375
|
canBeNested: (e) => e === "List"
|
|
385
|
-
},
|
|
386
|
-
const { blockProps: l, icon: t, styles: a, width:
|
|
376
|
+
}, Te = (e) => {
|
|
377
|
+
const { blockProps: l, icon: t, styles: a, width: o, inBuilder: n, height: r } = e, i = D(a, j(o ? `w-[${o}px]` : "", r ? `h-[${r}px]` : ""));
|
|
387
378
|
if (y(t))
|
|
388
|
-
return /* @__PURE__ */
|
|
379
|
+
return /* @__PURE__ */ s.jsx(_, { inBuilder: n, className: "h-8 w-14" });
|
|
389
380
|
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
390
381
|
return p.createElement("span", {
|
|
391
382
|
...l,
|
|
392
383
|
...i,
|
|
393
384
|
dangerouslySetInnerHTML: { __html: c }
|
|
394
385
|
});
|
|
395
|
-
},
|
|
386
|
+
}, He = {
|
|
396
387
|
type: "Icon",
|
|
397
388
|
label: "web_blocks.icon",
|
|
398
389
|
category: "core",
|
|
399
|
-
icon:
|
|
390
|
+
icon: K,
|
|
400
391
|
group: "media",
|
|
401
392
|
props: {
|
|
402
393
|
styles: m({ default: "text-black" }),
|
|
@@ -404,21 +395,21 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
404
395
|
title: "web_blocks.icon",
|
|
405
396
|
default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'
|
|
406
397
|
}),
|
|
407
|
-
width:
|
|
408
|
-
height:
|
|
398
|
+
width: I({ title: "web_blocks.width", default: "" }),
|
|
399
|
+
height: I({ title: "web_blocks.height", default: "" })
|
|
409
400
|
}
|
|
410
|
-
},
|
|
411
|
-
const { blockProps: l, image: t, styles: a, alt:
|
|
412
|
-
return y(t) ? /* @__PURE__ */
|
|
401
|
+
}, ze = (e) => {
|
|
402
|
+
const { blockProps: l, image: t, styles: a, alt: o, height: n, width: r } = e;
|
|
403
|
+
return y(t) ? /* @__PURE__ */ s.jsx(_, { className: "h-36" }) : p.createElement("img", {
|
|
413
404
|
...l,
|
|
414
405
|
...a,
|
|
415
406
|
src: t,
|
|
416
|
-
alt:
|
|
407
|
+
alt: o,
|
|
417
408
|
loading: "lazy",
|
|
418
|
-
height:
|
|
419
|
-
width:
|
|
409
|
+
height: n,
|
|
410
|
+
width: r
|
|
420
411
|
});
|
|
421
|
-
},
|
|
412
|
+
}, qe = {
|
|
422
413
|
type: "Image",
|
|
423
414
|
label: "web_blocks.image",
|
|
424
415
|
category: "core",
|
|
@@ -434,7 +425,7 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
434
425
|
width: b({ title: "web_blocks.width", default: "" }),
|
|
435
426
|
height: b({ title: "web_blocks.height", default: "" })
|
|
436
427
|
}
|
|
437
|
-
}, $ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, E = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/,
|
|
428
|
+
}, $ = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, E = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Ae = (e) => {
|
|
438
429
|
if ($.test(e)) {
|
|
439
430
|
const l = e.match($);
|
|
440
431
|
return l ? `https://www.youtube.com/embed/${l[4]}` : e;
|
|
@@ -448,16 +439,16 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
448
439
|
return l ? `https://www.dailymotion.com/embed/video/${l[4]}` : e;
|
|
449
440
|
}
|
|
450
441
|
return null;
|
|
451
|
-
},
|
|
442
|
+
}, De = p.memo(
|
|
452
443
|
(e) => {
|
|
453
|
-
const { blockProps: l, inBuilder: t, styles: a, url:
|
|
454
|
-
if (y(
|
|
455
|
-
return /* @__PURE__ */
|
|
456
|
-
let h =
|
|
444
|
+
const { blockProps: l, inBuilder: t, styles: a, url: o, controls: n } = e, r = x(n, "autoPlay", !1), i = x(n, "controls", !1), c = r || x(n, "muted", !0), d = x(n, "loop", !1);
|
|
445
|
+
if (y(o))
|
|
446
|
+
return /* @__PURE__ */ s.jsx(_, { inBuilder: t, className: "h-36" });
|
|
447
|
+
let h = Ae(o), f = null;
|
|
457
448
|
if (h) {
|
|
458
449
|
if (!y(h)) {
|
|
459
|
-
const
|
|
460
|
-
|
|
450
|
+
const g = [];
|
|
451
|
+
g.push(`autoplay=${r ? 1 : 0}`), g.push(`controls=${n ? 1 : 0}`), g.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), g.push(`loop=${d ? 1 : 0}`), h = `${h}?${g.join("&")}`;
|
|
461
452
|
}
|
|
462
453
|
f = p.createElement("iframe", {
|
|
463
454
|
...l,
|
|
@@ -471,22 +462,22 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
471
462
|
f = p.createElement("video", {
|
|
472
463
|
...l,
|
|
473
464
|
className: "absolute inset-0 w-full h-full",
|
|
474
|
-
src:
|
|
465
|
+
src: o,
|
|
475
466
|
controls: i,
|
|
476
467
|
muted: c,
|
|
477
|
-
autoPlay: t ? !1 :
|
|
468
|
+
autoPlay: t ? !1 : r,
|
|
478
469
|
loop: d
|
|
479
470
|
});
|
|
480
|
-
return /* @__PURE__ */
|
|
481
|
-
t ? /* @__PURE__ */
|
|
471
|
+
return /* @__PURE__ */ s.jsx("div", { ...re(a, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
472
|
+
t ? /* @__PURE__ */ s.jsx("div", { ...l, ...ce(a, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
482
473
|
f
|
|
483
474
|
] }) });
|
|
484
475
|
}
|
|
485
|
-
),
|
|
476
|
+
), Re = {
|
|
486
477
|
type: "Video",
|
|
487
478
|
label: "web_blocks.video",
|
|
488
479
|
category: "core",
|
|
489
|
-
icon:
|
|
480
|
+
icon: Q,
|
|
490
481
|
group: "media",
|
|
491
482
|
props: {
|
|
492
483
|
styles: m({ default: "" }),
|
|
@@ -497,25 +488,25 @@ const me = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ o.jsx("d
|
|
|
497
488
|
controls: F({
|
|
498
489
|
title: "web_blocks.controls",
|
|
499
490
|
properties: {
|
|
500
|
-
autoPlay:
|
|
501
|
-
controls:
|
|
502
|
-
loop:
|
|
503
|
-
muted:
|
|
491
|
+
autoPlay: k({ title: "web_blocks.autoplay", default: !0 }),
|
|
492
|
+
controls: k({ title: "web_blocks.controls", default: !1 }),
|
|
493
|
+
loop: k({ title: "web_blocks.loop", default: !1 }),
|
|
494
|
+
muted: k({ title: "web_blocks.muted", default: !0 })
|
|
504
495
|
}
|
|
505
496
|
})
|
|
506
497
|
}
|
|
507
498
|
};
|
|
508
|
-
function
|
|
499
|
+
function Fe(e) {
|
|
509
500
|
return G({ 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);
|
|
510
501
|
}
|
|
511
|
-
const
|
|
502
|
+
const Ge = (e) => {
|
|
512
503
|
const { scripts: l, inBuilder: t, blockProps: a } = e;
|
|
513
|
-
return t ? /* @__PURE__ */
|
|
514
|
-
},
|
|
504
|
+
return t ? /* @__PURE__ */ s.jsx("div", { ...a, children: /* @__PURE__ */ s.jsx("div", { className: j("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: l } });
|
|
505
|
+
}, Oe = {
|
|
515
506
|
type: "CustomScript",
|
|
516
507
|
label: "web_blocks.custom_script",
|
|
517
508
|
category: "core",
|
|
518
|
-
icon:
|
|
509
|
+
icon: Fe,
|
|
519
510
|
group: "advanced",
|
|
520
511
|
props: {
|
|
521
512
|
scripts: T({
|
|
@@ -524,23 +515,23 @@ const We = (e) => {
|
|
|
524
515
|
placeholder: "<script>console.log('Hello, world!');<\/script>"
|
|
525
516
|
})
|
|
526
517
|
}
|
|
527
|
-
},
|
|
518
|
+
}, Ue = (e) => {
|
|
528
519
|
const { blockProps: l, styles: t } = e;
|
|
529
520
|
return p.createElement("hr", { ...t, ...l });
|
|
530
|
-
},
|
|
521
|
+
}, Ve = {
|
|
531
522
|
type: "Divider",
|
|
532
523
|
label: "web_blocks.divider",
|
|
533
524
|
category: "core",
|
|
534
|
-
icon:
|
|
525
|
+
icon: ee,
|
|
535
526
|
group: "basic",
|
|
536
527
|
props: {
|
|
537
528
|
styles: m({ default: "bg-gray-900 h-0.5 py-2 my-1" })
|
|
538
529
|
}
|
|
539
|
-
},
|
|
530
|
+
}, We = () => null, Xe = {
|
|
540
531
|
type: "Dark Mode",
|
|
541
532
|
label: "web_blocks.dark_mode",
|
|
542
533
|
category: "core",
|
|
543
|
-
icon:
|
|
534
|
+
icon: te,
|
|
544
535
|
group: "advanced",
|
|
545
536
|
props: {},
|
|
546
537
|
blocks: () => [
|
|
@@ -592,53 +583,32 @@ const We = (e) => {
|
|
|
592
583
|
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>"
|
|
593
584
|
}
|
|
594
585
|
]
|
|
595
|
-
},
|
|
596
|
-
const
|
|
597
|
-
return /* @__PURE__ */
|
|
598
|
-
/* @__PURE__ */ o.jsx("label", { className: "text-sm", children: "Choose a global block" }),
|
|
599
|
-
/* @__PURE__ */ o.jsxs(
|
|
600
|
-
"select",
|
|
601
|
-
{
|
|
602
|
-
className: "h-8 w-full rounded-md border border-gray-300 p-0 px-2 text-xs dark:border-gray-600",
|
|
603
|
-
value: (e == null ? void 0 : e.globalBlock) || "",
|
|
604
|
-
onChange: (r) => {
|
|
605
|
-
s([e._id], { globalBlock: r.target.value });
|
|
606
|
-
},
|
|
607
|
-
children: [
|
|
608
|
-
/* @__PURE__ */ o.jsx("option", { value: "", children: "Select a global block" }),
|
|
609
|
-
Object.keys(l).map((r) => /* @__PURE__ */ o.jsx("option", { value: r, children: l[r].name || r }, r))
|
|
610
|
-
]
|
|
611
|
-
}
|
|
612
|
-
),
|
|
613
|
-
/* @__PURE__ */ o.jsx("div", { className: "mt-2 text-xs", children: /* @__PURE__ */ o.jsx(pe, { size: "sm", variant: "outline", onClick: t, className: "text-xs", children: a ? "Loading..." : "Refresh List" }) })
|
|
614
|
-
] });
|
|
615
|
-
}, et = (e) => {
|
|
616
|
-
const { blockProps: l, inBuilder: t, children: a, globalBlock: s } = e;
|
|
617
|
-
return t && !s ? /* @__PURE__ */ o.jsxs(
|
|
586
|
+
}, Ye = (e) => {
|
|
587
|
+
const { blockProps: l, inBuilder: t, children: a, globalBlock: o } = e;
|
|
588
|
+
return t && !o ? /* @__PURE__ */ s.jsxs(
|
|
618
589
|
"div",
|
|
619
590
|
{
|
|
620
591
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
621
592
|
...l,
|
|
622
593
|
children: [
|
|
623
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ s.jsxs("h1", { children: [
|
|
624
595
|
"Global Block - ",
|
|
625
|
-
|
|
596
|
+
o
|
|
626
597
|
] }),
|
|
627
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ s.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
628
599
|
]
|
|
629
600
|
}
|
|
630
601
|
) : p.createElement("div", { ...l }, a);
|
|
631
|
-
},
|
|
602
|
+
}, Ze = {
|
|
632
603
|
type: "GlobalBlock",
|
|
633
604
|
label: "Global Block",
|
|
634
|
-
icon:
|
|
605
|
+
icon: ie,
|
|
635
606
|
category: "core",
|
|
636
607
|
group: "advanced",
|
|
637
608
|
props: {
|
|
638
609
|
globalBlock: b({ title: "global block", default: "", hidden: !0 })
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
}, lt = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ o.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`, ot = {
|
|
610
|
+
}
|
|
611
|
+
}, Je = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`, Ke = {
|
|
642
612
|
type: "Text",
|
|
643
613
|
label: "web_blocks.text",
|
|
644
614
|
hidden: !0,
|
|
@@ -648,11 +618,11 @@ const We = (e) => {
|
|
|
648
618
|
props: {
|
|
649
619
|
content: L({ title: "web_blocks.content", defaultValue: "" })
|
|
650
620
|
}
|
|
651
|
-
},
|
|
652
|
-
const { blockProps: l, backgroundImage: t, children: a, styles:
|
|
653
|
-
let
|
|
654
|
-
return t && (
|
|
655
|
-
},
|
|
621
|
+
}, Qe = (e) => {
|
|
622
|
+
const { blockProps: l, backgroundImage: t, children: a, styles: o } = e;
|
|
623
|
+
let n = {};
|
|
624
|
+
return t && (n = { backgroundImage: `url(${t})` }), p.createElement("div", { ...l, ...o, style: n }, a);
|
|
625
|
+
}, et = {
|
|
656
626
|
type: "Body",
|
|
657
627
|
label: "Body",
|
|
658
628
|
category: "core",
|
|
@@ -666,10 +636,10 @@ const We = (e) => {
|
|
|
666
636
|
canDelete: () => !1,
|
|
667
637
|
canMove: () => !1,
|
|
668
638
|
canDuplicate: () => !1
|
|
669
|
-
},
|
|
639
|
+
}, tt = (e) => {
|
|
670
640
|
const { blockProps: l, styles: t } = e;
|
|
671
641
|
return p.createElement("br", { ...l, ...t });
|
|
672
|
-
},
|
|
642
|
+
}, lt = {
|
|
673
643
|
type: "LineBreak",
|
|
674
644
|
label: "Line Break",
|
|
675
645
|
category: "core",
|
|
@@ -679,10 +649,10 @@ const We = (e) => {
|
|
|
679
649
|
props: {
|
|
680
650
|
styles: m({ default: "" })
|
|
681
651
|
}
|
|
682
|
-
},
|
|
683
|
-
const { blockProps: l, errorMessage: t, name: a, _type:
|
|
652
|
+
}, ot = (e) => {
|
|
653
|
+
const { blockProps: l, errorMessage: t, name: a, _type: o, successMessage: n, action: r, styles: i, children: c } = e;
|
|
684
654
|
let d = c;
|
|
685
|
-
c || (d = /* @__PURE__ */
|
|
655
|
+
c || (d = /* @__PURE__ */ s.jsx(_, {}));
|
|
686
656
|
const h = {
|
|
687
657
|
"x-data": "{}",
|
|
688
658
|
"x-on:submit.prevent": "post"
|
|
@@ -690,28 +660,28 @@ const We = (e) => {
|
|
|
690
660
|
"x-html": "",
|
|
691
661
|
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
692
662
|
};
|
|
693
|
-
return /* @__PURE__ */
|
|
663
|
+
return /* @__PURE__ */ s.jsxs(
|
|
694
664
|
"form",
|
|
695
665
|
{
|
|
696
666
|
...h,
|
|
697
667
|
"data-error": t,
|
|
698
|
-
"data-success":
|
|
668
|
+
"data-success": n,
|
|
699
669
|
method: "post",
|
|
700
|
-
action:
|
|
670
|
+
action: r,
|
|
701
671
|
...l,
|
|
702
672
|
...i,
|
|
703
673
|
children: [
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ s.jsx("div", { ...f }),
|
|
675
|
+
/* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: a || o }),
|
|
706
676
|
d
|
|
707
677
|
]
|
|
708
678
|
}
|
|
709
679
|
);
|
|
710
|
-
},
|
|
680
|
+
}, st = {
|
|
711
681
|
type: "Form",
|
|
712
682
|
label: "web_blocks.form",
|
|
713
683
|
category: "core",
|
|
714
|
-
icon:
|
|
684
|
+
icon: le,
|
|
715
685
|
group: "form",
|
|
716
686
|
props: {
|
|
717
687
|
styles: m({ default: "" }),
|
|
@@ -729,26 +699,26 @@ const We = (e) => {
|
|
|
729
699
|
})
|
|
730
700
|
},
|
|
731
701
|
canAcceptBlock: () => !0
|
|
732
|
-
},
|
|
733
|
-
const { blockProps: l, inBuilder: t, label: a, styles:
|
|
702
|
+
}, at = (e) => {
|
|
703
|
+
const { blockProps: l, inBuilder: t, label: a, styles: o, inputStyles: n, icon: r, iconPos: i } = e, c = B(), d = {
|
|
734
704
|
"x-bind:disabled": "formLoading"
|
|
735
705
|
};
|
|
736
|
-
return /* @__PURE__ */
|
|
706
|
+
return /* @__PURE__ */ s.jsxs(
|
|
737
707
|
"button",
|
|
738
708
|
{
|
|
739
709
|
id: c,
|
|
740
710
|
...d,
|
|
741
|
-
...
|
|
742
|
-
...
|
|
711
|
+
...n,
|
|
712
|
+
...o,
|
|
743
713
|
...l || {},
|
|
744
714
|
type: t ? "button" : "submit",
|
|
745
715
|
children: [
|
|
746
716
|
a,
|
|
747
|
-
|
|
717
|
+
r && /* @__PURE__ */ s.jsx("span", { className: i, dangerouslySetInnerHTML: { __html: r } })
|
|
748
718
|
]
|
|
749
719
|
}
|
|
750
720
|
);
|
|
751
|
-
},
|
|
721
|
+
}, nt = {
|
|
752
722
|
type: "FormButton",
|
|
753
723
|
label: "web_blocks.submit_button",
|
|
754
724
|
category: "core",
|
|
@@ -769,40 +739,40 @@ const We = (e) => {
|
|
|
769
739
|
]
|
|
770
740
|
})
|
|
771
741
|
}
|
|
772
|
-
},
|
|
742
|
+
}, rt = (e) => {
|
|
773
743
|
const {
|
|
774
744
|
blockProps: l,
|
|
775
745
|
label: t,
|
|
776
746
|
placeholder: a,
|
|
777
|
-
styles:
|
|
778
|
-
inputStyles:
|
|
779
|
-
showLabel:
|
|
747
|
+
styles: o,
|
|
748
|
+
inputStyles: n,
|
|
749
|
+
showLabel: r,
|
|
780
750
|
required: i,
|
|
781
751
|
inputType: c = "text",
|
|
782
752
|
inBuilder: d,
|
|
783
753
|
fieldName: h
|
|
784
754
|
} = e, f = B();
|
|
785
|
-
return !
|
|
755
|
+
return !r || c === "submit" ? (c === "submit" && (l.value = t), /* @__PURE__ */ s.jsx(
|
|
786
756
|
"input",
|
|
787
757
|
{
|
|
788
758
|
id: f,
|
|
789
759
|
name: h,
|
|
790
760
|
readOnly: d,
|
|
791
761
|
...l,
|
|
792
|
-
...
|
|
793
|
-
...
|
|
762
|
+
...n,
|
|
763
|
+
...o,
|
|
794
764
|
type: c,
|
|
795
765
|
placeholder: a,
|
|
796
766
|
required: i
|
|
797
767
|
}
|
|
798
|
-
)) : /* @__PURE__ */
|
|
799
|
-
|
|
800
|
-
/* @__PURE__ */
|
|
768
|
+
)) : /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
|
|
769
|
+
r && /* @__PURE__ */ s.jsx("label", { htmlFor: f, children: t }),
|
|
770
|
+
/* @__PURE__ */ s.jsx(
|
|
801
771
|
"input",
|
|
802
772
|
{
|
|
803
773
|
name: h,
|
|
804
774
|
readOnly: d,
|
|
805
|
-
...
|
|
775
|
+
...n,
|
|
806
776
|
id: f,
|
|
807
777
|
type: c,
|
|
808
778
|
placeholder: a,
|
|
@@ -810,7 +780,7 @@ const We = (e) => {
|
|
|
810
780
|
}
|
|
811
781
|
)
|
|
812
782
|
] });
|
|
813
|
-
},
|
|
783
|
+
}, ct = {
|
|
814
784
|
type: "Input",
|
|
815
785
|
label: "web_blocks.input",
|
|
816
786
|
category: "core",
|
|
@@ -831,63 +801,63 @@ const We = (e) => {
|
|
|
831
801
|
default: "text"
|
|
832
802
|
}),
|
|
833
803
|
value: b({ title: "web_blocks.value", default: "" }),
|
|
834
|
-
showLabel:
|
|
804
|
+
showLabel: k({ title: "web_blocks.show_label", default: !0 }),
|
|
835
805
|
inputStyles: m({ default: "w-full p-1" }),
|
|
836
806
|
label: b({ title: "web_blocks.label", default: "Label" }),
|
|
837
807
|
placeholder: b({
|
|
838
808
|
title: "web_blocks.placeholder",
|
|
839
809
|
default: "Placeholder"
|
|
840
810
|
}),
|
|
841
|
-
required:
|
|
811
|
+
required: k({ title: "web_blocks.required", default: !1 })
|
|
842
812
|
}
|
|
843
|
-
},
|
|
844
|
-
const { blockProps: l, fieldName: t, label: a, styles:
|
|
845
|
-
return c ? /* @__PURE__ */
|
|
846
|
-
/* @__PURE__ */
|
|
847
|
-
a && /* @__PURE__ */
|
|
848
|
-
] }) : /* @__PURE__ */
|
|
813
|
+
}, it = (e) => {
|
|
814
|
+
const { blockProps: l, fieldName: t, label: a, styles: o, inputStyles: n, checked: r, required: i, showLabel: c = !0 } = e, d = B();
|
|
815
|
+
return c ? /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
|
|
816
|
+
/* @__PURE__ */ s.jsx("input", { ...n, name: t, id: d, type: "radio", required: i, defaultChecked: r }),
|
|
817
|
+
a && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: a })
|
|
818
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
849
819
|
"input",
|
|
850
820
|
{
|
|
851
821
|
id: d,
|
|
852
822
|
...l,
|
|
853
|
-
...
|
|
854
|
-
...
|
|
823
|
+
...n,
|
|
824
|
+
...o,
|
|
855
825
|
type: "radio",
|
|
856
826
|
required: i,
|
|
857
|
-
checked:
|
|
827
|
+
checked: r,
|
|
858
828
|
name: t
|
|
859
829
|
}
|
|
860
830
|
);
|
|
861
|
-
},
|
|
831
|
+
}, dt = {
|
|
862
832
|
type: "Radio",
|
|
863
833
|
label: "web_blocks.radio",
|
|
864
834
|
category: "core",
|
|
865
|
-
icon:
|
|
835
|
+
icon: oe,
|
|
866
836
|
group: "form",
|
|
867
837
|
props: {
|
|
868
838
|
styles: m({ default: "flex items-center w-max gap-x-2" }),
|
|
869
839
|
fieldName: b({ title: "web_blocks.field_name", default: "radio" }),
|
|
870
840
|
label: b({ title: "web_blocks.label", default: "Label" }),
|
|
871
|
-
checked:
|
|
872
|
-
required:
|
|
841
|
+
checked: k({ title: "web_blocks.checked", default: !1 }),
|
|
842
|
+
required: k({ title: "web_blocks.required", default: !1 })
|
|
873
843
|
}
|
|
874
|
-
},
|
|
844
|
+
}, ut = (e) => {
|
|
875
845
|
const {
|
|
876
846
|
blockProps: l,
|
|
877
847
|
fieldName: t,
|
|
878
848
|
label: a,
|
|
879
|
-
placeholder:
|
|
880
|
-
styles:
|
|
881
|
-
inputStyles:
|
|
849
|
+
placeholder: o,
|
|
850
|
+
styles: n,
|
|
851
|
+
inputStyles: r,
|
|
882
852
|
required: i,
|
|
883
853
|
showLabel: c,
|
|
884
854
|
_multiple: d = !1
|
|
885
855
|
} = e, h = B();
|
|
886
|
-
return c ? /* @__PURE__ */
|
|
887
|
-
c && /* @__PURE__ */
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
/* @__PURE__ */
|
|
890
|
-
M(e.options, (f) => /* @__PURE__ */
|
|
856
|
+
return c ? /* @__PURE__ */ s.jsxs("div", { ...n, children: [
|
|
857
|
+
c && /* @__PURE__ */ s.jsx("label", { htmlFor: h, children: a }),
|
|
858
|
+
/* @__PURE__ */ s.jsxs("select", { ...r, id: h, required: i, multiple: d, name: t, children: [
|
|
859
|
+
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
|
|
860
|
+
M(e.options, (f) => /* @__PURE__ */ s.jsx(
|
|
891
861
|
"option",
|
|
892
862
|
{
|
|
893
863
|
selected: x(f, "selected", !1),
|
|
@@ -897,18 +867,18 @@ const We = (e) => {
|
|
|
897
867
|
f.value
|
|
898
868
|
))
|
|
899
869
|
] })
|
|
900
|
-
] }) : /* @__PURE__ */
|
|
870
|
+
] }) : /* @__PURE__ */ s.jsxs(
|
|
901
871
|
"select",
|
|
902
872
|
{
|
|
903
873
|
id: h,
|
|
904
|
-
...
|
|
874
|
+
...n,
|
|
905
875
|
...l,
|
|
906
876
|
required: i,
|
|
907
877
|
multiple: d,
|
|
908
878
|
name: t,
|
|
909
879
|
children: [
|
|
910
|
-
/* @__PURE__ */
|
|
911
|
-
M(e.options, (f) => /* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
|
|
881
|
+
M(e.options, (f) => /* @__PURE__ */ s.jsx(
|
|
912
882
|
"option",
|
|
913
883
|
{
|
|
914
884
|
selected: x(f, "selected", !1),
|
|
@@ -920,25 +890,25 @@ const We = (e) => {
|
|
|
920
890
|
]
|
|
921
891
|
}
|
|
922
892
|
);
|
|
923
|
-
},
|
|
893
|
+
}, bt = {
|
|
924
894
|
type: "Select",
|
|
925
895
|
label: "web_blocks.select",
|
|
926
896
|
category: "core",
|
|
927
|
-
icon:
|
|
897
|
+
icon: se,
|
|
928
898
|
group: "form",
|
|
929
899
|
props: {
|
|
930
900
|
styles: m({ default: "" }),
|
|
931
901
|
fieldName: b({ title: "web_blocks.field_name", default: "select" }),
|
|
932
|
-
showLabel:
|
|
902
|
+
showLabel: k({ title: "web_blocks.show_label", default: !0 }),
|
|
933
903
|
inputStyles: m({ default: "w-full p-1" }),
|
|
934
904
|
label: b({ title: "web_blocks.label", default: "Label" }),
|
|
935
905
|
placeholder: b({
|
|
936
906
|
title: "web_blocks.placeholder",
|
|
937
907
|
default: "Placeholder"
|
|
938
908
|
}),
|
|
939
|
-
required:
|
|
940
|
-
_multiple:
|
|
941
|
-
options:
|
|
909
|
+
required: k({ title: "web_blocks.required", default: !1 }),
|
|
910
|
+
_multiple: k({ title: "web_blocks.multiple", default: !1 }),
|
|
911
|
+
options: O({
|
|
942
912
|
title: "web_blocks.options",
|
|
943
913
|
itemProperties: {
|
|
944
914
|
label: b({ title: "web_blocks.label", default: "" }),
|
|
@@ -946,24 +916,24 @@ const We = (e) => {
|
|
|
946
916
|
}
|
|
947
917
|
})
|
|
948
918
|
}
|
|
949
|
-
},
|
|
950
|
-
const { blockProps: l, fieldName: t, label: a, placeholder:
|
|
951
|
-
return c ? /* @__PURE__ */
|
|
952
|
-
c && /* @__PURE__ */
|
|
953
|
-
/* @__PURE__ */
|
|
954
|
-
] }) : /* @__PURE__ */
|
|
919
|
+
}, pt = (e) => {
|
|
920
|
+
const { blockProps: l, fieldName: t, label: a, placeholder: o, styles: n, inputStyles: r, _rows: i, showLabel: c } = e, d = B();
|
|
921
|
+
return c ? /* @__PURE__ */ s.jsxs("div", { ...n, ...l, children: [
|
|
922
|
+
c && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: a }),
|
|
923
|
+
/* @__PURE__ */ s.jsx("textarea", { name: t, ...r, id: d, placeholder: o, rows: i })
|
|
924
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
955
925
|
"textarea",
|
|
956
926
|
{
|
|
957
927
|
id: d,
|
|
958
928
|
name: t,
|
|
959
929
|
...l,
|
|
960
|
-
...n,
|
|
961
930
|
...r,
|
|
962
|
-
|
|
931
|
+
...n,
|
|
932
|
+
placeholder: o,
|
|
963
933
|
rows: i
|
|
964
934
|
}
|
|
965
935
|
);
|
|
966
|
-
},
|
|
936
|
+
}, mt = {
|
|
967
937
|
type: "TextArea",
|
|
968
938
|
label: "web_blocks.textarea",
|
|
969
939
|
category: "core",
|
|
@@ -971,7 +941,7 @@ const We = (e) => {
|
|
|
971
941
|
group: "form",
|
|
972
942
|
props: {
|
|
973
943
|
fieldName: b({ title: "web_blocks.field_name", default: "textarea" }),
|
|
974
|
-
showLabel:
|
|
944
|
+
showLabel: k({ title: "web_blocks.show_label", default: !0 }),
|
|
975
945
|
styles: m({ default: "" }),
|
|
976
946
|
inputStyles: m({ default: "w-full p-1" }),
|
|
977
947
|
label: b({ title: "web_blocks.label", default: "Label" }),
|
|
@@ -979,51 +949,51 @@ const We = (e) => {
|
|
|
979
949
|
title: "web_blocks.placeholder",
|
|
980
950
|
default: "Placeholder"
|
|
981
951
|
}),
|
|
982
|
-
_rows:
|
|
952
|
+
_rows: I({ title: "web_blocks.rows", default: 3 })
|
|
983
953
|
}
|
|
984
|
-
},
|
|
985
|
-
const { blockProps: l, fieldName: t, label: a, styles:
|
|
986
|
-
return c ? /* @__PURE__ */
|
|
987
|
-
/* @__PURE__ */
|
|
954
|
+
}, ft = (e) => {
|
|
955
|
+
const { blockProps: l, fieldName: t, label: a, styles: o, inputStyles: n, required: r, checked: i, showLabel: c = !0 } = e, d = B();
|
|
956
|
+
return c ? /* @__PURE__ */ s.jsxs("div", { ...o, ...l, children: [
|
|
957
|
+
/* @__PURE__ */ s.jsx(
|
|
988
958
|
"input",
|
|
989
959
|
{
|
|
990
|
-
...
|
|
960
|
+
...n,
|
|
991
961
|
name: t,
|
|
992
962
|
id: d,
|
|
993
963
|
type: "checkbox",
|
|
994
|
-
required:
|
|
964
|
+
required: r,
|
|
995
965
|
defaultChecked: i
|
|
996
966
|
}
|
|
997
967
|
),
|
|
998
|
-
a && a !== "Label" && /* @__PURE__ */
|
|
999
|
-
] }) : /* @__PURE__ */
|
|
968
|
+
a && a !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: a })
|
|
969
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
1000
970
|
"input",
|
|
1001
971
|
{
|
|
1002
972
|
id: d,
|
|
1003
973
|
...l,
|
|
1004
|
-
...
|
|
1005
|
-
...
|
|
974
|
+
...n,
|
|
975
|
+
...o,
|
|
1006
976
|
type: "checkbox",
|
|
1007
|
-
required:
|
|
977
|
+
required: r,
|
|
1008
978
|
name: t
|
|
1009
979
|
}
|
|
1010
980
|
);
|
|
1011
|
-
},
|
|
981
|
+
}, ht = {
|
|
1012
982
|
type: "Checkbox",
|
|
1013
983
|
label: "web_blocks.checkbox",
|
|
1014
984
|
category: "core",
|
|
1015
|
-
icon:
|
|
985
|
+
icon: ae,
|
|
1016
986
|
group: "form",
|
|
1017
987
|
props: {
|
|
1018
988
|
fieldName: b({ title: "Field Name", default: "checkbox" }),
|
|
1019
989
|
styles: m({ default: "flex items-center gap-x-2" }),
|
|
1020
990
|
label: b({ title: "web_blocks.label", default: "Label" }),
|
|
1021
|
-
checked:
|
|
1022
|
-
required:
|
|
991
|
+
checked: k({ title: "web_blocks.checked", default: !1 }),
|
|
992
|
+
required: k({ title: "web_blocks.required", default: !1 })
|
|
1023
993
|
}
|
|
1024
|
-
},
|
|
1025
|
-
u(
|
|
994
|
+
}, It = () => {
|
|
995
|
+
u(ue, be), u(ke, ge), u(pe, me), u(ye, _e), u(we, xe), u(ve, Be), u(Ie, je), u(Le, Ce), u(Se, Me), u(Ne, $e), u(Ee, Pe), u(Te, He), u(ze, qe), u(De, Re), u(fe, he), u(Je, Ke), u(ot, st), u(at, nt), u(rt, ct), u(ft, ht), u(it, dt), u(ut, bt), u(pt, mt), u(tt, lt), u(Qe, et), u(Ge, Oe), u(Ue, Ve), u(We, Xe), u(Ye, Ze);
|
|
1026
996
|
};
|
|
1027
997
|
export {
|
|
1028
|
-
|
|
998
|
+
It as loadWebBlocks
|
|
1029
999
|
};
|