@chaibuilder/sdk 1.2.96 → 1.2.98
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-ePAAihqK.js → CodeEditor-JFNyNUeD.js} +2 -2
- package/dist/{CodeEditor-yh-ZegYZ.cjs → CodeEditor-v6e1cv9g.cjs} +1 -1
- package/dist/{Topbar-ZnEryH_x.cjs → Topbar--bKmw8Qf.cjs} +1 -1
- package/dist/{Topbar-xeW18bO-.js → Topbar-bca7NmyC.js} +2 -2
- package/dist/{UnsplashImages-ZF707QgA.cjs → UnsplashImages-Xfn4852d.cjs} +1 -1
- package/dist/{UnsplashImages-ypfGqude.js → UnsplashImages-vR5ig3Lz.js} +2 -2
- package/dist/{UploadImages-y6d81X_8.cjs → UploadImages-Yl-90dxh.cjs} +1 -1
- package/dist/{UploadImages-UWFlkqDP.js → UploadImages-jCqfO33R.js} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +4 -0
- package/dist/core.js +70 -69
- package/dist/iconBase-5hdsfZ0z.cjs +1 -0
- package/dist/{iconBase-HBZkvN04.js → iconBase-RFUjwZUN.js} +77 -68
- package/dist/{index-29Bt0qID.js → index-5aoq9X96.js} +1013 -958
- package/dist/index-M74Ml_9k.cjs +61 -0
- package/dist/web-blocks.cjs +3 -1
- package/dist/web-blocks.js +309 -302
- package/package.json +3 -3
- package/dist/iconBase-kuD_VwQx.cjs +0 -1
- package/dist/index-PdMLfgsS.cjs +0 -61
package/dist/web-blocks.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
2
|
-
import { j as
|
|
3
|
-
import * as
|
|
4
|
-
import { c as
|
|
5
|
-
import { ButtonIcon as H, CodeIcon as
|
|
6
|
-
import { isNull as
|
|
7
|
-
import { GlobeIcon as
|
|
2
|
+
import { j as a } from "./jsx-runtime-Sp0orL4X.js";
|
|
3
|
+
import * as b from "react";
|
|
4
|
+
import { c as B, T as m, y as _, x as C, b as p, q as N, s as L, l as $, f as j, m as S, w as D, d as g, e as F, G, g as I, S as V } from "./iconBase-RFUjwZUN.js";
|
|
5
|
+
import { ButtonIcon as H, CodeIcon as U, HeadingIcon as O, 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 A, GroupIcon as le, InputIcon as R, RadiobuttonIcon as oe, DropdownMenuIcon as ae, CheckboxIcon as se } from "@radix-ui/react-icons";
|
|
6
|
+
import { isNull as re, isEmpty as k, get as v, pick as ne, omit as ie, map as M } from "lodash-es";
|
|
7
|
+
import { GlobeIcon as ce } from "lucide-react";
|
|
8
8
|
import "clsx";
|
|
9
9
|
import "tailwind-merge";
|
|
10
|
-
const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */
|
|
11
|
-
const { blockProps: l, inBuilder: t, backgroundImage:
|
|
12
|
-
let
|
|
13
|
-
o || (
|
|
14
|
-
let
|
|
15
|
-
return
|
|
16
|
-
},
|
|
10
|
+
const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("div", { className: B("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ a.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 = de, ue = (e) => {
|
|
11
|
+
const { blockProps: l, inBuilder: t, backgroundImage: s, children: o, tag: r = "div", styles: n } = e;
|
|
12
|
+
let c = o;
|
|
13
|
+
o || (c = /* @__PURE__ */ a.jsx(x, { inBuilder: t }));
|
|
14
|
+
let i = {};
|
|
15
|
+
return s && (i = { backgroundImage: `url(${s})` }), b.createElement(r, { ...l, ...n, style: i }, c);
|
|
16
|
+
}, pe = {
|
|
17
17
|
type: "Box",
|
|
18
18
|
label: "web_blocks.box",
|
|
19
19
|
category: "core",
|
|
20
20
|
group: "basic",
|
|
21
21
|
props: {
|
|
22
22
|
styles: m({ default: "" }),
|
|
23
|
-
tag:
|
|
23
|
+
tag: _({
|
|
24
24
|
title: "web_blocks.tag",
|
|
25
25
|
default: "div",
|
|
26
26
|
options: [
|
|
@@ -46,23 +46,23 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
46
46
|
backgroundImage: C({ title: "web_blocks.background_image" })
|
|
47
47
|
},
|
|
48
48
|
canAcceptBlock: () => !0
|
|
49
|
-
},
|
|
50
|
-
const { blockProps: l, iconSize: t, icon:
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
49
|
+
}, be = (e) => {
|
|
50
|
+
const { blockProps: l, iconSize: t, icon: s, content: o, iconPos: r, styles: n, children: c } = e, i = s, d = c || /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
51
|
+
/* @__PURE__ */ a.jsx("span", { "data-ai-key": "content", children: o }),
|
|
52
|
+
i && /* @__PURE__ */ a.jsx(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
55
|
style: { width: t + "px" },
|
|
56
|
-
className:
|
|
57
|
-
dangerouslySetInnerHTML: { __html:
|
|
56
|
+
className: r + " " + (r === "order-first" ? "mr-2" : "ml-2") || "",
|
|
57
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
] });
|
|
61
|
-
return
|
|
61
|
+
return b.createElement(
|
|
62
62
|
"button",
|
|
63
63
|
{
|
|
64
64
|
...l,
|
|
65
|
-
...
|
|
65
|
+
...n,
|
|
66
66
|
type: "button"
|
|
67
67
|
},
|
|
68
68
|
d
|
|
@@ -74,11 +74,11 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
74
74
|
icon: H,
|
|
75
75
|
group: "basic",
|
|
76
76
|
props: {
|
|
77
|
-
content:
|
|
77
|
+
content: p({ title: "web_blocks.label", default: "Button", ai: !0, i18n: !0 }),
|
|
78
78
|
styles: m({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
|
|
79
79
|
icon: N({ title: "web_blocks.icon", default: "" }),
|
|
80
|
-
iconSize:
|
|
81
|
-
iconPos:
|
|
80
|
+
iconSize: L({ title: "web_blocks.icon_size", default: 24 }),
|
|
81
|
+
iconPos: _({
|
|
82
82
|
title: "web_blocks.icon_position",
|
|
83
83
|
default: "order-last",
|
|
84
84
|
options: [
|
|
@@ -88,36 +88,36 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
88
88
|
})
|
|
89
89
|
}
|
|
90
90
|
}, fe = (e) => {
|
|
91
|
-
const { blockProps: l, styles: t, htmlCode:
|
|
92
|
-
return o ? /* @__PURE__ */
|
|
93
|
-
o ? /* @__PURE__ */
|
|
94
|
-
|
|
91
|
+
const { blockProps: l, styles: t, htmlCode: s, inBuilder: o } = e;
|
|
92
|
+
return o ? /* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
|
|
93
|
+
o ? /* @__PURE__ */ a.jsx("div", { ...l, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
94
|
+
b.createElement("div", {
|
|
95
95
|
...t,
|
|
96
|
-
dangerouslySetInnerHTML: { __html:
|
|
96
|
+
dangerouslySetInnerHTML: { __html: s.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
97
97
|
})
|
|
98
|
-
] }) :
|
|
98
|
+
] }) : b.createElement("div", {
|
|
99
99
|
...l,
|
|
100
100
|
...t,
|
|
101
|
-
dangerouslySetInnerHTML: { __html:
|
|
101
|
+
dangerouslySetInnerHTML: { __html: s }
|
|
102
102
|
});
|
|
103
103
|
}, he = {
|
|
104
104
|
type: "CustomHTML",
|
|
105
105
|
label: "web_blocks.custom_html",
|
|
106
106
|
category: "core",
|
|
107
|
-
icon:
|
|
107
|
+
icon: U,
|
|
108
108
|
group: "advanced",
|
|
109
109
|
props: {
|
|
110
110
|
styles: m({ default: "" }),
|
|
111
|
-
htmlCode:
|
|
111
|
+
htmlCode: $({
|
|
112
112
|
title: "web_blocks.html_code",
|
|
113
113
|
default: "<div><p>Enter your HTML code here...</p></div>",
|
|
114
114
|
placeholder: "web_blocks.placeholder"
|
|
115
115
|
})
|
|
116
116
|
}
|
|
117
|
-
}, ge =
|
|
117
|
+
}, ge = b.memo(
|
|
118
118
|
(e) => {
|
|
119
119
|
const { blockProps: l, styles: t } = e;
|
|
120
|
-
return
|
|
120
|
+
return b.createElement("div", { ...l, ...t });
|
|
121
121
|
}
|
|
122
122
|
), ye = {
|
|
123
123
|
type: "EmptyBox",
|
|
@@ -129,22 +129,22 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
129
129
|
backgroundImage: C({ title: "web_blocks.background_image" })
|
|
130
130
|
}
|
|
131
131
|
}, ke = (e) => {
|
|
132
|
-
const { blockProps: l, styles: t, content:
|
|
133
|
-
return
|
|
132
|
+
const { blockProps: l, styles: t, content: s, level: o = "h1", children: r = null } = e;
|
|
133
|
+
return r ? b.createElement(o, { ...t, ...l }, r) : b.createElement(o, {
|
|
134
134
|
...t,
|
|
135
135
|
...l,
|
|
136
136
|
"data-ai-key": "content",
|
|
137
137
|
"data-ai-type": "html",
|
|
138
|
-
dangerouslySetInnerHTML: { __html:
|
|
138
|
+
dangerouslySetInnerHTML: { __html: s }
|
|
139
139
|
});
|
|
140
|
-
},
|
|
140
|
+
}, xe = {
|
|
141
141
|
type: "Heading",
|
|
142
142
|
label: "web_blocks.heading",
|
|
143
143
|
category: "core",
|
|
144
|
-
icon:
|
|
144
|
+
icon: O,
|
|
145
145
|
group: "typography",
|
|
146
146
|
props: {
|
|
147
|
-
level:
|
|
147
|
+
level: _({
|
|
148
148
|
title: "web_blocks.level",
|
|
149
149
|
default: "h2",
|
|
150
150
|
binding: !1,
|
|
@@ -158,124 +158,130 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
158
158
|
]
|
|
159
159
|
}),
|
|
160
160
|
styles: m({ default: "text-3xl" }),
|
|
161
|
-
content:
|
|
161
|
+
content: j({ title: "Content", default: "Heading goes here", ai: !0, i18n: !0 })
|
|
162
162
|
},
|
|
163
163
|
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
164
164
|
}, we = (e) => {
|
|
165
|
-
const { blockProps: l, styles: t, content:
|
|
166
|
-
return
|
|
165
|
+
const { blockProps: l, styles: t, content: s } = e;
|
|
166
|
+
return re(e.children) ? b.createElement("p", {
|
|
167
167
|
...t,
|
|
168
168
|
...l,
|
|
169
169
|
"data-ai-key": "content",
|
|
170
170
|
"data-ai-type": "html",
|
|
171
|
-
dangerouslySetInnerHTML: { __html:
|
|
172
|
-
}) :
|
|
173
|
-
},
|
|
171
|
+
dangerouslySetInnerHTML: { __html: s }
|
|
172
|
+
}) : b.createElement("p", { ...t, ...l }, e.children);
|
|
173
|
+
}, ve = {
|
|
174
174
|
type: "Paragraph",
|
|
175
|
-
label: "
|
|
175
|
+
label: "Paragraph",
|
|
176
176
|
category: "core",
|
|
177
177
|
icon: W,
|
|
178
178
|
group: "typography",
|
|
179
179
|
props: {
|
|
180
180
|
styles: m({ default: "" }),
|
|
181
|
-
content:
|
|
182
|
-
title: "
|
|
183
|
-
default:
|
|
181
|
+
content: j({
|
|
182
|
+
title: "Content",
|
|
183
|
+
default: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
|
|
184
|
+
Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus
|
|
185
|
+
nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.`,
|
|
186
|
+
ai: !0,
|
|
187
|
+
i18n: !0
|
|
184
188
|
})
|
|
185
189
|
},
|
|
186
190
|
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
187
|
-
},
|
|
188
|
-
const { blockProps: l, styles: t, content:
|
|
189
|
-
return o ?
|
|
191
|
+
}, _e = (e) => {
|
|
192
|
+
const { blockProps: l, styles: t, content: s, children: o = null, tag: r } = e;
|
|
193
|
+
return o ? b.createElement("span", { ...t, ...l }, o) : b.createElement(r || "span", {
|
|
190
194
|
...t,
|
|
191
195
|
...l,
|
|
192
196
|
"data-ai-key": "content",
|
|
193
|
-
dangerouslySetInnerHTML: { __html:
|
|
197
|
+
dangerouslySetInnerHTML: { __html: s || "" }
|
|
194
198
|
});
|
|
195
|
-
},
|
|
199
|
+
}, Ie = {
|
|
196
200
|
type: "Span",
|
|
197
|
-
label: "
|
|
201
|
+
label: "Span",
|
|
198
202
|
category: "core",
|
|
199
203
|
group: "typography",
|
|
200
204
|
props: {
|
|
201
205
|
styles: m({ default: "" }),
|
|
202
|
-
content:
|
|
206
|
+
content: j({ title: "Content", default: "", ai: !0, i18n: !0 })
|
|
203
207
|
},
|
|
204
208
|
canAcceptBlock: () => !0
|
|
205
|
-
},
|
|
206
|
-
const { blockProps: l, content: t, styles:
|
|
207
|
-
return /* @__PURE__ */
|
|
209
|
+
}, Le = (e) => {
|
|
210
|
+
const { blockProps: l, content: t, styles: s } = e;
|
|
211
|
+
return /* @__PURE__ */ a.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ a.jsx(
|
|
208
212
|
"div",
|
|
209
213
|
{
|
|
210
214
|
"data-ai-key": "content",
|
|
211
215
|
"data-ai-type": "richtext",
|
|
212
216
|
...l,
|
|
213
|
-
...
|
|
217
|
+
...s,
|
|
214
218
|
dangerouslySetInnerHTML: { __html: t }
|
|
215
219
|
}
|
|
216
220
|
) });
|
|
217
|
-
},
|
|
221
|
+
}, Be = {
|
|
218
222
|
type: "RichText",
|
|
219
|
-
label: "
|
|
223
|
+
label: "Rich Text",
|
|
220
224
|
category: "core",
|
|
221
225
|
icon: X,
|
|
222
226
|
group: "typography",
|
|
223
227
|
props: {
|
|
224
228
|
styles: m({ default: "" }),
|
|
225
229
|
content: S({
|
|
226
|
-
title: "
|
|
230
|
+
title: "Content",
|
|
231
|
+
ai: !0,
|
|
232
|
+
i18n: !0,
|
|
227
233
|
default: "<p>This is a rich text block. You can add text, and other content here.</p>"
|
|
228
234
|
})
|
|
229
235
|
}
|
|
230
|
-
},
|
|
231
|
-
const { blockProps: l, link: t, children:
|
|
232
|
-
return !
|
|
236
|
+
}, je = (e) => {
|
|
237
|
+
const { blockProps: l, link: t, children: s, styles: o, inBuilder: r, content: n } = e;
|
|
238
|
+
return !s && k(o == null ? void 0 : o.className) && k(n) ? /* @__PURE__ */ a.jsx(x, { inBuilder: r }) : r ? s ? /* @__PURE__ */ a.jsx("span", { ...l, ...o, children: s }) : b.createElement("span", {
|
|
233
239
|
...l,
|
|
234
240
|
...o,
|
|
235
|
-
dangerouslySetInnerHTML: { __html:
|
|
236
|
-
}) :
|
|
241
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
242
|
+
}) : s ? /* @__PURE__ */ a.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...l, ...o, children: s }) : b.createElement("a", {
|
|
237
243
|
...l,
|
|
238
244
|
...o,
|
|
239
245
|
"data-ai-key": "content",
|
|
240
246
|
href: (t == null ? void 0 : t.href) || "#",
|
|
241
247
|
target: (t == null ? void 0 : t.target) || "_self",
|
|
242
|
-
dangerouslySetInnerHTML: { __html:
|
|
248
|
+
dangerouslySetInnerHTML: { __html: n }
|
|
243
249
|
});
|
|
244
250
|
}, Ce = {
|
|
245
251
|
type: "Link",
|
|
246
|
-
label: "
|
|
252
|
+
label: "Link",
|
|
247
253
|
category: "core",
|
|
248
254
|
icon: Y,
|
|
249
255
|
group: "basic",
|
|
250
256
|
props: {
|
|
251
257
|
styles: m({ default: "" }),
|
|
252
|
-
content:
|
|
253
|
-
link:
|
|
254
|
-
title: "
|
|
258
|
+
content: p({ title: "Content", default: "", ai: !0, i18n: !0 }),
|
|
259
|
+
link: D({
|
|
260
|
+
title: "Link",
|
|
255
261
|
default: { type: "page", target: "_self", href: "#" }
|
|
256
262
|
})
|
|
257
263
|
},
|
|
258
264
|
canAcceptBlock: (e) => e !== "Link"
|
|
259
|
-
},
|
|
265
|
+
}, q = (e, ...l) => ({
|
|
260
266
|
...e,
|
|
261
|
-
className:
|
|
267
|
+
className: B(e.className, ...l)
|
|
262
268
|
}), Se = (e) => {
|
|
263
|
-
const { blockProps: l, children: t, styles:
|
|
264
|
-
if (!t && k(
|
|
265
|
-
return /* @__PURE__ */
|
|
269
|
+
const { blockProps: l, children: t, styles: s, inBuilder: o, content: r, href: n } = e, { hrefType: c, autoplay: i, maxWidth: d, backdropColor: h, galleryName: f } = e, y = q(s, "cb-lightbox");
|
|
270
|
+
if (!t && k(s == null ? void 0 : s.className) && k(r))
|
|
271
|
+
return /* @__PURE__ */ a.jsx(x, { inBuilder: o });
|
|
266
272
|
if (o)
|
|
267
|
-
return t ? /* @__PURE__ */
|
|
273
|
+
return t ? /* @__PURE__ */ a.jsx("span", { ...l, ...y, children: t }) : b.createElement("span", {
|
|
268
274
|
...l,
|
|
269
275
|
...y,
|
|
270
|
-
dangerouslySetInnerHTML: { __html:
|
|
276
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
271
277
|
});
|
|
272
278
|
const w = {};
|
|
273
|
-
return w["data-vbtype"] =
|
|
279
|
+
return w["data-vbtype"] = c, i && (w["data-autoplay"] = "true"), d && (w["data-maxwidth"] = d + "px"), h && (w["data-overlay"] = h), f && (w["data-gall"] = f), t ? /* @__PURE__ */ a.jsx("a", { ...w, href: n || "#/", ...l, ...y, children: t }) : b.createElement("a", {
|
|
274
280
|
...l,
|
|
275
281
|
...y,
|
|
276
282
|
...w,
|
|
277
|
-
href:
|
|
278
|
-
dangerouslySetInnerHTML: { __html:
|
|
283
|
+
href: n || "#",
|
|
284
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
279
285
|
});
|
|
280
286
|
}, Me = {
|
|
281
287
|
type: "LightBoxLink",
|
|
@@ -285,9 +291,9 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
285
291
|
group: "basic",
|
|
286
292
|
props: {
|
|
287
293
|
styles: m({ default: "" }),
|
|
288
|
-
content:
|
|
289
|
-
href:
|
|
290
|
-
hrefType:
|
|
294
|
+
content: p({ title: "Content", default: "Link text or drop blocks inside", ai: !0, i18n: !0 }),
|
|
295
|
+
href: p({ title: "Href", default: "" }),
|
|
296
|
+
hrefType: _({
|
|
291
297
|
title: "Type",
|
|
292
298
|
default: "video",
|
|
293
299
|
options: [
|
|
@@ -298,19 +304,19 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
298
304
|
]
|
|
299
305
|
}),
|
|
300
306
|
autoplay: g({ title: "Autoplay", default: !1 }),
|
|
301
|
-
maxWidth:
|
|
302
|
-
backdropColor:
|
|
303
|
-
galleryName:
|
|
307
|
+
maxWidth: L({ title: "Max Width", default: "" }),
|
|
308
|
+
backdropColor: p({ title: "Backdrop Color", default: "" }),
|
|
309
|
+
galleryName: p({ title: "Gallery Name", default: "" })
|
|
304
310
|
},
|
|
305
311
|
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
306
312
|
}, Ne = (e) => {
|
|
307
|
-
const { blockProps: l, children: t, listType:
|
|
308
|
-
return !t && k(o == null ? void 0 : o.className) ? /* @__PURE__ */
|
|
309
|
-
|
|
310
|
-
{ ...l, ...o, className:
|
|
313
|
+
const { blockProps: l, children: t, listType: s, styles: o, tag: r, inBuilder: n } = e, c = B(v(o, "className", ""), s);
|
|
314
|
+
return !t && k(o == null ? void 0 : o.className) ? /* @__PURE__ */ a.jsx(x, { inBuilder: n }) : b.createElement(
|
|
315
|
+
r || (s === "list-decimal" ? "ol" : "ul"),
|
|
316
|
+
{ ...l, ...o, className: c },
|
|
311
317
|
t
|
|
312
318
|
);
|
|
313
|
-
},
|
|
319
|
+
}, Pe = {
|
|
314
320
|
type: "List",
|
|
315
321
|
label: "web_blocks.list",
|
|
316
322
|
icon: Z,
|
|
@@ -318,7 +324,7 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
318
324
|
group: "basic",
|
|
319
325
|
props: {
|
|
320
326
|
styles: m({ default: "" }),
|
|
321
|
-
listType:
|
|
327
|
+
listType: _({
|
|
322
328
|
title: "web_blocks.list_type",
|
|
323
329
|
default: "list-none",
|
|
324
330
|
options: [
|
|
@@ -354,34 +360,34 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
354
360
|
}
|
|
355
361
|
]
|
|
356
362
|
}, Ee = (e) => {
|
|
357
|
-
const { blockProps: l, content: t, styles:
|
|
358
|
-
return o ?
|
|
359
|
-
...
|
|
363
|
+
const { blockProps: l, content: t, styles: s, children: o, tag: r } = e;
|
|
364
|
+
return o ? b.createElement(r || "li", { ...s, ...l }, o) : b.createElement(r || "li", {
|
|
365
|
+
...s,
|
|
360
366
|
...l,
|
|
361
367
|
"data-ai-key": "content",
|
|
362
368
|
dangerouslySetInnerHTML: { __html: t }
|
|
363
369
|
});
|
|
364
|
-
},
|
|
370
|
+
}, Te = {
|
|
365
371
|
type: "ListItem",
|
|
366
|
-
label: "
|
|
372
|
+
label: "List Item",
|
|
367
373
|
icon: J,
|
|
368
374
|
category: "core",
|
|
369
375
|
group: "basic",
|
|
370
376
|
props: {
|
|
371
377
|
styles: m({ default: "" }),
|
|
372
|
-
content:
|
|
378
|
+
content: j({ title: "Content", default: "List item", ai: !0, i18n: !0 })
|
|
373
379
|
},
|
|
374
380
|
canAcceptBlock: (e) => e !== "ListItem",
|
|
375
381
|
canBeNested: (e) => e === "List"
|
|
376
|
-
},
|
|
377
|
-
const { blockProps: l, icon: t, styles:
|
|
382
|
+
}, $e = (e) => {
|
|
383
|
+
const { blockProps: l, icon: t, styles: s, width: o, inBuilder: r, height: n } = e, c = q(s, B(o ? `w-[${o}px]` : "", n ? `h-[${n}px]` : ""));
|
|
378
384
|
if (k(t))
|
|
379
|
-
return /* @__PURE__ */
|
|
380
|
-
const
|
|
381
|
-
return
|
|
385
|
+
return /* @__PURE__ */ a.jsx(x, { inBuilder: r, className: "h-8 w-14" });
|
|
386
|
+
const i = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
387
|
+
return b.createElement("span", {
|
|
382
388
|
...l,
|
|
383
|
-
...
|
|
384
|
-
dangerouslySetInnerHTML: { __html:
|
|
389
|
+
...c,
|
|
390
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
385
391
|
});
|
|
386
392
|
}, He = {
|
|
387
393
|
type: "Icon",
|
|
@@ -395,23 +401,23 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
395
401
|
title: "web_blocks.icon",
|
|
396
402
|
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>'
|
|
397
403
|
}),
|
|
398
|
-
width:
|
|
399
|
-
height:
|
|
404
|
+
width: L({ title: "web_blocks.width", default: "" }),
|
|
405
|
+
height: L({ title: "web_blocks.height", default: "" })
|
|
400
406
|
}
|
|
401
407
|
}, ze = (e) => {
|
|
402
|
-
const { blockProps: l, image: t, styles:
|
|
403
|
-
return k(t) ? /* @__PURE__ */
|
|
408
|
+
const { blockProps: l, image: t, styles: s, alt: o, height: r, width: n, lazyLoading: c } = e;
|
|
409
|
+
return k(t) ? /* @__PURE__ */ a.jsx(x, { className: "h-36" }) : b.createElement("img", {
|
|
404
410
|
...l,
|
|
405
|
-
...
|
|
411
|
+
...s,
|
|
406
412
|
src: t,
|
|
407
413
|
alt: o,
|
|
408
|
-
loading:
|
|
409
|
-
height:
|
|
410
|
-
width:
|
|
414
|
+
loading: c ? "lazy" : "eager",
|
|
415
|
+
height: r,
|
|
416
|
+
width: n
|
|
411
417
|
});
|
|
412
418
|
}, Ae = {
|
|
413
419
|
type: "Image",
|
|
414
|
-
label: "
|
|
420
|
+
label: "Image",
|
|
415
421
|
category: "core",
|
|
416
422
|
icon: z,
|
|
417
423
|
group: "media",
|
|
@@ -421,37 +427,37 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
421
427
|
title: "Image",
|
|
422
428
|
default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
|
|
423
429
|
}),
|
|
424
|
-
alt:
|
|
425
|
-
width:
|
|
426
|
-
height:
|
|
430
|
+
alt: p({ title: "Alt text", default: "", ai: !0, i18n: !0 }),
|
|
431
|
+
width: p({ title: "Width", default: "" }),
|
|
432
|
+
height: p({ title: "Height", default: "" }),
|
|
427
433
|
lazyLoading: g({ title: "Lazy Load", default: !0 })
|
|
428
434
|
}
|
|
429
|
-
},
|
|
430
|
-
if (
|
|
431
|
-
const l = e.match(
|
|
435
|
+
}, P = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, E = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, T = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Re = (e) => {
|
|
436
|
+
if (P.test(e)) {
|
|
437
|
+
const l = e.match(P);
|
|
432
438
|
return l ? `https://www.youtube.com/embed/${l[4]}` : e;
|
|
433
439
|
}
|
|
434
440
|
if (E.test(e)) {
|
|
435
441
|
const l = e.match(E);
|
|
436
442
|
return l ? `https://player.vimeo.com/video/${l[3]}` : e;
|
|
437
443
|
}
|
|
438
|
-
if (
|
|
439
|
-
const l = e.match(
|
|
444
|
+
if (T.test(e)) {
|
|
445
|
+
const l = e.match(T);
|
|
440
446
|
return l ? `https://www.dailymotion.com/embed/video/${l[4]}` : e;
|
|
441
447
|
}
|
|
442
448
|
return null;
|
|
443
|
-
},
|
|
449
|
+
}, qe = b.memo(
|
|
444
450
|
(e) => {
|
|
445
|
-
const { blockProps: l, inBuilder: t, styles:
|
|
451
|
+
const { blockProps: l, inBuilder: t, styles: s, url: o, controls: r } = e, n = v(r, "autoPlay", !1), c = v(r, "controls", !1), i = n || v(r, "muted", !0), d = v(r, "loop", !1);
|
|
446
452
|
if (k(o))
|
|
447
|
-
return /* @__PURE__ */
|
|
448
|
-
let h =
|
|
453
|
+
return /* @__PURE__ */ a.jsx(x, { inBuilder: t, className: "h-36" });
|
|
454
|
+
let h = Re(o), f = null;
|
|
449
455
|
if (h) {
|
|
450
456
|
if (!k(h)) {
|
|
451
457
|
const y = [];
|
|
452
|
-
y.push(`autoplay=${
|
|
458
|
+
y.push(`autoplay=${n ? 1 : 0}`), y.push(`controls=${r ? 1 : 0}`), y.push(`mute=${i ? 1 : 0}&muted=${i ? 1 : 0}`), y.push(`loop=${d ? 1 : 0}`), h = `${h}?${y.join("&")}`;
|
|
453
459
|
}
|
|
454
|
-
f =
|
|
460
|
+
f = b.createElement("iframe", {
|
|
455
461
|
...l,
|
|
456
462
|
className: "absolute inset-0 w-full h-full",
|
|
457
463
|
src: h,
|
|
@@ -460,39 +466,40 @@ const de = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("d
|
|
|
460
466
|
frameBorder: 0
|
|
461
467
|
});
|
|
462
468
|
} else
|
|
463
|
-
f =
|
|
469
|
+
f = b.createElement("video", {
|
|
464
470
|
...l,
|
|
465
471
|
className: "absolute inset-0 w-full h-full",
|
|
466
472
|
src: o,
|
|
467
|
-
controls:
|
|
468
|
-
muted:
|
|
469
|
-
autoPlay: t ? !1 :
|
|
473
|
+
controls: c,
|
|
474
|
+
muted: i,
|
|
475
|
+
autoPlay: t ? !1 : n,
|
|
470
476
|
loop: d
|
|
471
477
|
});
|
|
472
|
-
return /* @__PURE__ */
|
|
473
|
-
t ? /* @__PURE__ */
|
|
478
|
+
return /* @__PURE__ */ a.jsx("div", { ...ne(s, ["className"]), children: /* @__PURE__ */ a.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
479
|
+
t ? /* @__PURE__ */ a.jsx("div", { ...l, ...ie(s, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
474
480
|
f
|
|
475
481
|
] }) });
|
|
476
482
|
}
|
|
477
|
-
),
|
|
483
|
+
), De = {
|
|
478
484
|
type: "Video",
|
|
479
|
-
label: "
|
|
485
|
+
label: "Video",
|
|
480
486
|
category: "core",
|
|
481
487
|
icon: Q,
|
|
482
488
|
group: "media",
|
|
483
489
|
props: {
|
|
484
490
|
styles: m({ default: "" }),
|
|
485
|
-
url:
|
|
486
|
-
title: "
|
|
487
|
-
default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
|
|
491
|
+
url: p({
|
|
492
|
+
title: "Video URL",
|
|
493
|
+
default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann",
|
|
494
|
+
i18n: !0
|
|
488
495
|
}),
|
|
489
496
|
controls: F({
|
|
490
|
-
title: "
|
|
497
|
+
title: "Controls",
|
|
491
498
|
properties: {
|
|
492
|
-
autoPlay: g({ title: "
|
|
493
|
-
controls: g({ title: "
|
|
494
|
-
loop: g({ title: "
|
|
495
|
-
muted: g({ title: "
|
|
499
|
+
autoPlay: g({ title: "Autoplay", default: !0 }),
|
|
500
|
+
controls: g({ title: "Controls", default: !1 }),
|
|
501
|
+
loop: g({ title: "Loop", default: !1 }),
|
|
502
|
+
muted: g({ title: "Muted", default: !0 })
|
|
496
503
|
}
|
|
497
504
|
})
|
|
498
505
|
}
|
|
@@ -501,8 +508,8 @@ function Fe(e) {
|
|
|
501
508
|
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);
|
|
502
509
|
}
|
|
503
510
|
const Ge = (e) => {
|
|
504
|
-
const { scripts: l, inBuilder: t, blockProps:
|
|
505
|
-
return t ? /* @__PURE__ */
|
|
511
|
+
const { scripts: l, inBuilder: t, blockProps: s } = e;
|
|
512
|
+
return t ? /* @__PURE__ */ a.jsx("div", { ...s, children: /* @__PURE__ */ a.jsx("div", { className: B("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ a.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__ */ a.jsx("div", { dangerouslySetInnerHTML: { __html: l } });
|
|
506
513
|
}, Ve = {
|
|
507
514
|
type: "CustomScript",
|
|
508
515
|
label: "web_blocks.custom_script",
|
|
@@ -510,16 +517,16 @@ const Ge = (e) => {
|
|
|
510
517
|
icon: Fe,
|
|
511
518
|
group: "advanced",
|
|
512
519
|
props: {
|
|
513
|
-
scripts:
|
|
520
|
+
scripts: $({
|
|
514
521
|
title: "Script",
|
|
515
522
|
default: "",
|
|
516
523
|
placeholder: "<script>console.log('Hello, world!');<\/script>"
|
|
517
524
|
})
|
|
518
525
|
}
|
|
519
|
-
},
|
|
526
|
+
}, Ue = (e) => {
|
|
520
527
|
const { blockProps: l, styles: t } = e;
|
|
521
|
-
return
|
|
522
|
-
},
|
|
528
|
+
return b.createElement("hr", { ...t, ...l });
|
|
529
|
+
}, Oe = {
|
|
523
530
|
type: "Divider",
|
|
524
531
|
label: "web_blocks.divider",
|
|
525
532
|
category: "core",
|
|
@@ -585,44 +592,44 @@ const Ge = (e) => {
|
|
|
585
592
|
}
|
|
586
593
|
]
|
|
587
594
|
}, Ye = (e) => {
|
|
588
|
-
const { blockProps: l, inBuilder: t, children:
|
|
589
|
-
return t && !o ? /* @__PURE__ */
|
|
595
|
+
const { blockProps: l, inBuilder: t, children: s, globalBlock: o } = e;
|
|
596
|
+
return t && !o ? /* @__PURE__ */ a.jsxs(
|
|
590
597
|
"div",
|
|
591
598
|
{
|
|
592
599
|
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
593
600
|
...l,
|
|
594
601
|
children: [
|
|
595
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ a.jsxs("h1", { children: [
|
|
596
603
|
"Global Block - ",
|
|
597
604
|
o
|
|
598
605
|
] }),
|
|
599
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ a.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
600
607
|
]
|
|
601
608
|
}
|
|
602
|
-
) :
|
|
609
|
+
) : b.createElement("div", { ...l }, s);
|
|
603
610
|
}, Ze = {
|
|
604
611
|
type: "GlobalBlock",
|
|
605
612
|
label: "Global Block",
|
|
606
|
-
icon:
|
|
613
|
+
icon: ce,
|
|
607
614
|
category: "core",
|
|
608
615
|
group: "advanced",
|
|
609
616
|
props: {
|
|
610
|
-
globalBlock:
|
|
617
|
+
globalBlock: p({ title: "global block", default: "", hidden: !0 })
|
|
611
618
|
}
|
|
612
|
-
}, Je = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */
|
|
619
|
+
}, Je = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ a.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`, Ke = {
|
|
613
620
|
type: "Text",
|
|
614
|
-
label: "
|
|
621
|
+
label: "Text",
|
|
615
622
|
hidden: !0,
|
|
616
623
|
category: "core",
|
|
617
624
|
group: "typography",
|
|
618
625
|
icon: A,
|
|
619
626
|
props: {
|
|
620
|
-
content:
|
|
627
|
+
content: j({ title: "Content", default: "", ai: !0, i18n: !0 })
|
|
621
628
|
}
|
|
622
629
|
}, Qe = (e) => {
|
|
623
|
-
const { blockProps: l, backgroundImage: t, children:
|
|
624
|
-
let
|
|
625
|
-
return t && (
|
|
630
|
+
const { blockProps: l, backgroundImage: t, children: s, styles: o } = e;
|
|
631
|
+
let r = {};
|
|
632
|
+
return t && (r = { backgroundImage: `url(${t})` }), b.createElement("div", { ...l, ...o, style: r }, s);
|
|
626
633
|
}, et = {
|
|
627
634
|
type: "Body",
|
|
628
635
|
label: "Body",
|
|
@@ -639,7 +646,7 @@ const Ge = (e) => {
|
|
|
639
646
|
canDuplicate: () => !1
|
|
640
647
|
}, tt = (e) => {
|
|
641
648
|
const { blockProps: l, styles: t } = e;
|
|
642
|
-
return
|
|
649
|
+
return b.createElement("br", { ...l, ...t });
|
|
643
650
|
}, lt = {
|
|
644
651
|
type: "LineBreak",
|
|
645
652
|
label: "Line Break",
|
|
@@ -651,9 +658,9 @@ const Ge = (e) => {
|
|
|
651
658
|
styles: m({ default: "" })
|
|
652
659
|
}
|
|
653
660
|
}, ot = (e) => {
|
|
654
|
-
const { blockProps: l, errorMessage: t, name:
|
|
655
|
-
let d =
|
|
656
|
-
|
|
661
|
+
const { blockProps: l, errorMessage: t, name: s, _type: o, successMessage: r, action: n, styles: c, children: i } = e;
|
|
662
|
+
let d = i;
|
|
663
|
+
i || (d = /* @__PURE__ */ a.jsx(x, {}));
|
|
657
664
|
const h = {
|
|
658
665
|
"x-data": "{}",
|
|
659
666
|
"x-on:submit.prevent": "post"
|
|
@@ -661,137 +668,137 @@ const Ge = (e) => {
|
|
|
661
668
|
"x-html": "",
|
|
662
669
|
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
663
670
|
};
|
|
664
|
-
return /* @__PURE__ */
|
|
671
|
+
return /* @__PURE__ */ a.jsxs(
|
|
665
672
|
"form",
|
|
666
673
|
{
|
|
667
674
|
...h,
|
|
668
675
|
"data-error": t,
|
|
669
|
-
"data-success":
|
|
676
|
+
"data-success": r,
|
|
670
677
|
method: "post",
|
|
671
|
-
action:
|
|
678
|
+
action: n,
|
|
672
679
|
...l,
|
|
673
|
-
...
|
|
680
|
+
...c,
|
|
674
681
|
children: [
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ a.jsx("div", { ...f }),
|
|
683
|
+
/* @__PURE__ */ a.jsx("input", { name: "formname", type: "hidden", value: s || o }),
|
|
677
684
|
d
|
|
678
685
|
]
|
|
679
686
|
}
|
|
680
687
|
);
|
|
681
|
-
},
|
|
688
|
+
}, at = {
|
|
682
689
|
type: "Form",
|
|
683
|
-
label: "
|
|
690
|
+
label: "Form",
|
|
684
691
|
category: "core",
|
|
685
692
|
icon: le,
|
|
686
693
|
group: "form",
|
|
687
694
|
props: {
|
|
688
695
|
styles: m({ default: "" }),
|
|
689
|
-
action:
|
|
690
|
-
title: "
|
|
696
|
+
action: p({
|
|
697
|
+
title: "Submit URL",
|
|
691
698
|
default: "/api/form/submit"
|
|
692
699
|
}),
|
|
693
700
|
errorMessage: S({
|
|
694
|
-
title: "
|
|
701
|
+
title: "Error Message",
|
|
695
702
|
default: "Something went wrong. Please try again"
|
|
696
703
|
}),
|
|
697
704
|
successMessage: S({
|
|
698
|
-
title: "
|
|
705
|
+
title: "Success Message",
|
|
699
706
|
default: "Thank you for your submission."
|
|
700
707
|
})
|
|
701
708
|
},
|
|
702
709
|
canAcceptBlock: () => !0
|
|
703
|
-
},
|
|
704
|
-
const { blockProps: l, inBuilder: t, label:
|
|
710
|
+
}, st = (e) => {
|
|
711
|
+
const { blockProps: l, inBuilder: t, label: s, styles: o, inputStyles: r, icon: n, iconPos: c } = e, i = I(), d = {
|
|
705
712
|
"x-bind:disabled": "formLoading"
|
|
706
713
|
};
|
|
707
|
-
return /* @__PURE__ */
|
|
714
|
+
return /* @__PURE__ */ a.jsxs(
|
|
708
715
|
"button",
|
|
709
716
|
{
|
|
710
|
-
id:
|
|
717
|
+
id: i,
|
|
711
718
|
...d,
|
|
712
|
-
...
|
|
719
|
+
...r,
|
|
713
720
|
...o,
|
|
714
721
|
...l || {},
|
|
715
722
|
type: t ? "button" : "submit",
|
|
716
723
|
children: [
|
|
717
|
-
|
|
718
|
-
|
|
724
|
+
s,
|
|
725
|
+
n && /* @__PURE__ */ a.jsx("span", { className: c, dangerouslySetInnerHTML: { __html: n } })
|
|
719
726
|
]
|
|
720
727
|
}
|
|
721
728
|
);
|
|
722
|
-
},
|
|
729
|
+
}, rt = {
|
|
723
730
|
type: "FormButton",
|
|
724
|
-
label: "
|
|
731
|
+
label: "Submit Button",
|
|
725
732
|
category: "core",
|
|
726
733
|
icon: H,
|
|
727
734
|
group: "form",
|
|
728
735
|
props: {
|
|
729
|
-
label:
|
|
736
|
+
label: p({ title: "Label", default: "Submit", ai: !0, i18n: !0 }),
|
|
730
737
|
styles: m({
|
|
731
738
|
default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
732
739
|
}),
|
|
733
740
|
icon: N({ title: "Icon", default: "" }),
|
|
734
|
-
iconPos:
|
|
735
|
-
title: "
|
|
741
|
+
iconPos: _({
|
|
742
|
+
title: "Icon Position",
|
|
736
743
|
default: "order-last",
|
|
737
744
|
options: [
|
|
738
|
-
{ title: "
|
|
739
|
-
{ title: "
|
|
745
|
+
{ title: "Start", value: "order-first" },
|
|
746
|
+
{ title: "End", value: "order-last" }
|
|
740
747
|
]
|
|
741
748
|
})
|
|
742
749
|
}
|
|
743
|
-
},
|
|
750
|
+
}, nt = (e) => {
|
|
744
751
|
const {
|
|
745
752
|
blockProps: l,
|
|
746
753
|
label: t,
|
|
747
|
-
placeholder:
|
|
754
|
+
placeholder: s,
|
|
748
755
|
styles: o,
|
|
749
|
-
inputStyles:
|
|
750
|
-
showLabel:
|
|
751
|
-
required:
|
|
752
|
-
inputType:
|
|
756
|
+
inputStyles: r,
|
|
757
|
+
showLabel: n,
|
|
758
|
+
required: c,
|
|
759
|
+
inputType: i = "text",
|
|
753
760
|
inBuilder: d,
|
|
754
761
|
fieldName: h
|
|
755
|
-
} = e, f =
|
|
756
|
-
return !
|
|
762
|
+
} = e, f = I();
|
|
763
|
+
return !n || i === "submit" ? (i === "submit" && (l.value = t), /* @__PURE__ */ a.jsx(
|
|
757
764
|
"input",
|
|
758
765
|
{
|
|
759
766
|
id: f,
|
|
760
767
|
name: h,
|
|
761
768
|
readOnly: d,
|
|
762
769
|
...l,
|
|
763
|
-
...
|
|
770
|
+
...r,
|
|
764
771
|
...o,
|
|
765
|
-
type:
|
|
766
|
-
placeholder:
|
|
767
|
-
required:
|
|
772
|
+
type: i,
|
|
773
|
+
placeholder: s,
|
|
774
|
+
required: c
|
|
768
775
|
}
|
|
769
|
-
)) : /* @__PURE__ */
|
|
770
|
-
|
|
771
|
-
/* @__PURE__ */
|
|
776
|
+
)) : /* @__PURE__ */ a.jsxs("div", { ...o, ...l, children: [
|
|
777
|
+
n && /* @__PURE__ */ a.jsx("label", { htmlFor: f, children: t }),
|
|
778
|
+
/* @__PURE__ */ a.jsx(
|
|
772
779
|
"input",
|
|
773
780
|
{
|
|
774
781
|
name: h,
|
|
775
782
|
readOnly: d,
|
|
776
|
-
...
|
|
783
|
+
...r,
|
|
777
784
|
id: f,
|
|
778
|
-
type:
|
|
779
|
-
placeholder:
|
|
780
|
-
required:
|
|
785
|
+
type: i,
|
|
786
|
+
placeholder: s,
|
|
787
|
+
required: c
|
|
781
788
|
}
|
|
782
789
|
)
|
|
783
790
|
] });
|
|
784
|
-
},
|
|
791
|
+
}, it = {
|
|
785
792
|
type: "Input",
|
|
786
|
-
label: "
|
|
793
|
+
label: "Input",
|
|
787
794
|
category: "core",
|
|
788
|
-
icon:
|
|
795
|
+
icon: R,
|
|
789
796
|
group: "form",
|
|
790
797
|
props: {
|
|
791
798
|
styles: m({ default: "" }),
|
|
792
|
-
fieldName:
|
|
793
|
-
inputType:
|
|
794
|
-
title: "
|
|
799
|
+
fieldName: p({ title: "Field Name", default: "input" }),
|
|
800
|
+
inputType: _({
|
|
801
|
+
title: "Type",
|
|
795
802
|
options: M(
|
|
796
803
|
["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
|
|
797
804
|
(e) => ({
|
|
@@ -801,31 +808,31 @@ const Ge = (e) => {
|
|
|
801
808
|
),
|
|
802
809
|
default: "text"
|
|
803
810
|
}),
|
|
804
|
-
value:
|
|
805
|
-
showLabel: g({ title: "
|
|
811
|
+
value: p({ title: "Value", default: "", ai: !0, i18n: !0 }),
|
|
812
|
+
showLabel: g({ title: "Show Label", default: !0 }),
|
|
806
813
|
inputStyles: m({ default: "w-full p-1" }),
|
|
807
|
-
label:
|
|
808
|
-
placeholder:
|
|
809
|
-
title: "
|
|
814
|
+
label: p({ title: "Label", default: "Label", ai: !0, i18n: !0 }),
|
|
815
|
+
placeholder: p({
|
|
816
|
+
title: "Placeholder",
|
|
810
817
|
default: "Placeholder"
|
|
811
818
|
}),
|
|
812
|
-
required: g({ title: "
|
|
819
|
+
required: g({ title: "Required", default: !1 })
|
|
813
820
|
}
|
|
814
|
-
},
|
|
815
|
-
const { blockProps: l, fieldName: t, label:
|
|
816
|
-
return
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
-
|
|
819
|
-
] }) : /* @__PURE__ */
|
|
821
|
+
}, ct = (e) => {
|
|
822
|
+
const { blockProps: l, fieldName: t, label: s, styles: o, inputStyles: r, checked: n, required: c, showLabel: i = !0 } = e, d = I();
|
|
823
|
+
return i ? /* @__PURE__ */ a.jsxs("div", { ...o, ...l, children: [
|
|
824
|
+
/* @__PURE__ */ a.jsx("input", { ...r, name: t, id: d, type: "radio", required: c, defaultChecked: n }),
|
|
825
|
+
s && /* @__PURE__ */ a.jsx("label", { htmlFor: d, children: s })
|
|
826
|
+
] }) : /* @__PURE__ */ a.jsx(
|
|
820
827
|
"input",
|
|
821
828
|
{
|
|
822
829
|
id: d,
|
|
823
830
|
...l,
|
|
824
|
-
...
|
|
831
|
+
...r,
|
|
825
832
|
...o,
|
|
826
833
|
type: "radio",
|
|
827
|
-
required:
|
|
828
|
-
checked:
|
|
834
|
+
required: c,
|
|
835
|
+
checked: n,
|
|
829
836
|
name: t
|
|
830
837
|
}
|
|
831
838
|
);
|
|
@@ -837,8 +844,8 @@ const Ge = (e) => {
|
|
|
837
844
|
group: "form",
|
|
838
845
|
props: {
|
|
839
846
|
styles: m({ default: "flex items-center w-max gap-x-2" }),
|
|
840
|
-
fieldName:
|
|
841
|
-
label:
|
|
847
|
+
fieldName: p({ title: "web_blocks.field_name", default: "radio" }),
|
|
848
|
+
label: p({ title: "web_blocks.label", default: "Label" }),
|
|
842
849
|
checked: g({ title: "web_blocks.checked", default: !1 }),
|
|
843
850
|
required: g({ title: "web_blocks.required", default: !1 })
|
|
844
851
|
}
|
|
@@ -846,43 +853,43 @@ const Ge = (e) => {
|
|
|
846
853
|
const {
|
|
847
854
|
blockProps: l,
|
|
848
855
|
fieldName: t,
|
|
849
|
-
label:
|
|
856
|
+
label: s,
|
|
850
857
|
placeholder: o,
|
|
851
|
-
styles:
|
|
852
|
-
inputStyles:
|
|
853
|
-
required:
|
|
854
|
-
showLabel:
|
|
858
|
+
styles: r,
|
|
859
|
+
inputStyles: n,
|
|
860
|
+
required: c,
|
|
861
|
+
showLabel: i,
|
|
855
862
|
_multiple: d = !1
|
|
856
|
-
} = e, h =
|
|
857
|
-
return
|
|
858
|
-
|
|
859
|
-
/* @__PURE__ */
|
|
860
|
-
/* @__PURE__ */
|
|
861
|
-
M(e.options, (f) => /* @__PURE__ */
|
|
863
|
+
} = e, h = I();
|
|
864
|
+
return i ? /* @__PURE__ */ a.jsxs("div", { ...r, children: [
|
|
865
|
+
i && /* @__PURE__ */ a.jsx("label", { htmlFor: h, children: s }),
|
|
866
|
+
/* @__PURE__ */ a.jsxs("select", { ...n, id: h, required: c, multiple: d, name: t, children: [
|
|
867
|
+
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
|
|
868
|
+
M(e.options, (f) => /* @__PURE__ */ a.jsx(
|
|
862
869
|
"option",
|
|
863
870
|
{
|
|
864
|
-
selected:
|
|
871
|
+
selected: v(f, "selected", !1),
|
|
865
872
|
value: f.value,
|
|
866
873
|
dangerouslySetInnerHTML: { __html: f.label }
|
|
867
874
|
},
|
|
868
875
|
f.value
|
|
869
876
|
))
|
|
870
877
|
] })
|
|
871
|
-
] }) : /* @__PURE__ */
|
|
878
|
+
] }) : /* @__PURE__ */ a.jsxs(
|
|
872
879
|
"select",
|
|
873
880
|
{
|
|
874
881
|
id: h,
|
|
875
|
-
...
|
|
882
|
+
...r,
|
|
876
883
|
...l,
|
|
877
|
-
required:
|
|
884
|
+
required: c,
|
|
878
885
|
multiple: d,
|
|
879
886
|
name: t,
|
|
880
887
|
children: [
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
-
M(e.options, (f) => /* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
|
|
889
|
+
M(e.options, (f) => /* @__PURE__ */ a.jsx(
|
|
883
890
|
"option",
|
|
884
891
|
{
|
|
885
|
-
selected:
|
|
892
|
+
selected: v(f, "selected", !1),
|
|
886
893
|
value: f.value,
|
|
887
894
|
dangerouslySetInnerHTML: { __html: f.label }
|
|
888
895
|
},
|
|
@@ -891,91 +898,91 @@ const Ge = (e) => {
|
|
|
891
898
|
]
|
|
892
899
|
}
|
|
893
900
|
);
|
|
894
|
-
},
|
|
901
|
+
}, pt = {
|
|
895
902
|
type: "Select",
|
|
896
903
|
label: "web_blocks.select",
|
|
897
904
|
category: "core",
|
|
898
|
-
icon:
|
|
905
|
+
icon: ae,
|
|
899
906
|
group: "form",
|
|
900
907
|
props: {
|
|
901
908
|
styles: m({ default: "" }),
|
|
902
|
-
fieldName:
|
|
903
|
-
showLabel: g({ title: "
|
|
909
|
+
fieldName: p({ title: "Field Name", default: "select" }),
|
|
910
|
+
showLabel: g({ title: "Show Label", default: !0 }),
|
|
904
911
|
inputStyles: m({ default: "w-full p-1" }),
|
|
905
|
-
label:
|
|
906
|
-
placeholder:
|
|
907
|
-
title: "
|
|
912
|
+
label: p({ title: "Label", default: "Label", ai: !0, i18n: !0 }),
|
|
913
|
+
placeholder: p({
|
|
914
|
+
title: "Placeholder",
|
|
908
915
|
default: "Placeholder"
|
|
909
916
|
}),
|
|
910
|
-
required: g({ title: "
|
|
911
|
-
_multiple: g({ title: "
|
|
917
|
+
required: g({ title: "Required", default: !1 }),
|
|
918
|
+
_multiple: g({ title: "Multiple", default: !1 }),
|
|
912
919
|
options: V({
|
|
913
|
-
title: "
|
|
920
|
+
title: "Options",
|
|
914
921
|
itemProperties: {
|
|
915
|
-
label:
|
|
916
|
-
value:
|
|
922
|
+
label: p({ title: "Label", default: "", ai: !0, i18n: !0 }),
|
|
923
|
+
value: p({ title: "Value", default: "" })
|
|
917
924
|
}
|
|
918
925
|
})
|
|
919
926
|
}
|
|
920
|
-
},
|
|
921
|
-
const { blockProps: l, fieldName: t, label:
|
|
922
|
-
return
|
|
923
|
-
|
|
924
|
-
/* @__PURE__ */
|
|
925
|
-
] }) : /* @__PURE__ */
|
|
927
|
+
}, bt = (e) => {
|
|
928
|
+
const { blockProps: l, fieldName: t, label: s, placeholder: o, styles: r, inputStyles: n, _rows: c, showLabel: i } = e, d = I();
|
|
929
|
+
return i ? /* @__PURE__ */ a.jsxs("div", { ...r, ...l, children: [
|
|
930
|
+
i && /* @__PURE__ */ a.jsx("label", { htmlFor: d, children: s }),
|
|
931
|
+
/* @__PURE__ */ a.jsx("textarea", { name: t, ...n, id: d, placeholder: o, rows: c })
|
|
932
|
+
] }) : /* @__PURE__ */ a.jsx(
|
|
926
933
|
"textarea",
|
|
927
934
|
{
|
|
928
935
|
id: d,
|
|
929
936
|
name: t,
|
|
930
937
|
...l,
|
|
931
|
-
...r,
|
|
932
938
|
...n,
|
|
939
|
+
...r,
|
|
933
940
|
placeholder: o,
|
|
934
|
-
rows:
|
|
941
|
+
rows: c
|
|
935
942
|
}
|
|
936
943
|
);
|
|
937
944
|
}, mt = {
|
|
938
945
|
type: "TextArea",
|
|
939
946
|
label: "web_blocks.textarea",
|
|
940
947
|
category: "core",
|
|
941
|
-
icon:
|
|
948
|
+
icon: R,
|
|
942
949
|
group: "form",
|
|
943
950
|
props: {
|
|
944
|
-
fieldName:
|
|
945
|
-
showLabel: g({ title: "
|
|
951
|
+
fieldName: p({ title: "Field Name", default: "textarea" }),
|
|
952
|
+
showLabel: g({ title: "Show Label", default: !0 }),
|
|
946
953
|
styles: m({ default: "" }),
|
|
947
954
|
inputStyles: m({ default: "w-full p-1" }),
|
|
948
|
-
label:
|
|
949
|
-
placeholder:
|
|
950
|
-
title: "
|
|
955
|
+
label: p({ title: "Label", default: "Label", ai: !0, i18n: !0 }),
|
|
956
|
+
placeholder: p({
|
|
957
|
+
title: "Placeholder",
|
|
951
958
|
default: "Placeholder"
|
|
952
959
|
}),
|
|
953
|
-
_rows:
|
|
960
|
+
_rows: L({ title: "Rows", default: 3 })
|
|
954
961
|
}
|
|
955
962
|
}, ft = (e) => {
|
|
956
|
-
const { blockProps: l, fieldName: t, label:
|
|
957
|
-
return
|
|
958
|
-
/* @__PURE__ */
|
|
963
|
+
const { blockProps: l, fieldName: t, label: s, styles: o, inputStyles: r, required: n, checked: c, showLabel: i = !0 } = e, d = I();
|
|
964
|
+
return i ? /* @__PURE__ */ a.jsxs("div", { ...o, ...l, children: [
|
|
965
|
+
/* @__PURE__ */ a.jsx(
|
|
959
966
|
"input",
|
|
960
967
|
{
|
|
961
|
-
...
|
|
968
|
+
...r,
|
|
962
969
|
name: t,
|
|
963
970
|
id: d,
|
|
964
971
|
type: "checkbox",
|
|
965
|
-
required:
|
|
966
|
-
defaultChecked:
|
|
972
|
+
required: n,
|
|
973
|
+
defaultChecked: c
|
|
967
974
|
}
|
|
968
975
|
),
|
|
969
|
-
|
|
970
|
-
] }) : /* @__PURE__ */
|
|
976
|
+
s && s !== "Label" && /* @__PURE__ */ a.jsx("label", { htmlFor: d, children: s })
|
|
977
|
+
] }) : /* @__PURE__ */ a.jsx(
|
|
971
978
|
"input",
|
|
972
979
|
{
|
|
973
980
|
id: d,
|
|
974
981
|
...l,
|
|
975
|
-
...
|
|
982
|
+
...r,
|
|
976
983
|
...o,
|
|
977
984
|
type: "checkbox",
|
|
978
|
-
required:
|
|
985
|
+
required: n,
|
|
979
986
|
name: t
|
|
980
987
|
}
|
|
981
988
|
);
|
|
@@ -983,18 +990,18 @@ const Ge = (e) => {
|
|
|
983
990
|
type: "Checkbox",
|
|
984
991
|
label: "web_blocks.checkbox",
|
|
985
992
|
category: "core",
|
|
986
|
-
icon:
|
|
993
|
+
icon: se,
|
|
987
994
|
group: "form",
|
|
988
995
|
props: {
|
|
989
|
-
fieldName:
|
|
996
|
+
fieldName: p({ title: "Field Name", default: "checkbox" }),
|
|
990
997
|
styles: m({ default: "flex items-center gap-x-2" }),
|
|
991
|
-
label:
|
|
998
|
+
label: p({ title: "web_blocks.label", default: "Label" }),
|
|
992
999
|
checked: g({ title: "web_blocks.checked", default: !1 }),
|
|
993
1000
|
required: g({ title: "web_blocks.required", default: !1 })
|
|
994
1001
|
}
|
|
995
|
-
},
|
|
996
|
-
u(ue,
|
|
1002
|
+
}, Lt = () => {
|
|
1003
|
+
u(ue, pe), u(ge, ye), u(be, me), u(ke, xe), u(we, ve), u(_e, Ie), u(Le, Be), u(je, Ce), u(Se, Me), u(Ne, Pe), u(Ee, Te), u($e, He), u(ze, Ae), u(qe, De), u(fe, he), u(Je, Ke), u(ot, at), u(st, rt), u(nt, it), u(ft, ht), u(ct, dt), u(ut, pt), u(bt, mt), u(tt, lt), u(Qe, et), u(Ge, Ve), u(Ue, Oe), u(We, Xe), u(Ye, Ze);
|
|
997
1004
|
};
|
|
998
1005
|
export {
|
|
999
|
-
|
|
1006
|
+
Lt as loadWebBlocks
|
|
1000
1007
|
};
|