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