@chaibuilder/sdk 1.2.2 → 1.2.4
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/{AddBlocks-QvCc-oag.js → AddBlocks-gbfzju1d.js} +15 -15
- package/dist/{AddBlocks-57-vroWk.cjs → AddBlocks-wuKI1ieB.cjs} +1 -1
- package/dist/{CanvasArea-59Gm0EZx.js → CanvasArea-WS9dnLyS.js} +8 -6
- package/dist/{CanvasArea-jRg53jrS.cjs → CanvasArea-wpskKN1H.cjs} +1 -1
- package/dist/CurrentPage-X9fCVXgY.cjs +1 -0
- package/dist/{CurrentPage-YPI5QTjk.js → CurrentPage-iaGHiR2B.js} +11 -9
- package/dist/Layers-EGhZWmvD.cjs +1 -0
- package/dist/{Layers-no2keK4N.js → Layers-V15IDskJ.js} +6 -4
- package/dist/{PagesPanel-pOIuFPOA.cjs → PagesPanel-Vla7HZkm.cjs} +1 -1
- package/dist/{PagesPanel-Q08uN4X3.js → PagesPanel-wfyKhLJ5.js} +6 -4
- package/dist/ProjectPanel-YLS4oOuU.cjs +1 -0
- package/dist/{ProjectPanel-zzYV9yrV.js → ProjectPanel-aiKhpNvr.js} +13 -11
- package/dist/{Settings-28A7R61i.js → Settings-JjYbPJrt.js} +5 -4
- package/dist/Settings-rnHnjhZ4.cjs +1 -0
- package/dist/{SidePanels--ZK6Iqou.js → SidePanels-XABN8kD3.js} +31 -29
- package/dist/SidePanels-vcWHxatg.cjs +1 -0
- package/dist/{add-page-modal-EHIYTW4T.js → add-page-modal-Gwhl6J1F.js} +5 -4
- package/dist/{add-page-modal-OvNXLGf0.cjs → add-page-modal-o5dy8nwt.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +24 -15
- package/dist/core.js +55 -53
- package/dist/delete-page-modal-IO_9ZCm4.cjs +1 -0
- package/dist/{delete-page-modal-qZJCk_JH.js → delete-page-modal-xGWX8RHn.js} +19 -17
- package/dist/email-blocks.cjs +1 -1
- package/dist/email-blocks.d.ts +1 -1
- package/dist/email-blocks.js +5 -5
- package/dist/html-to-json-5UoswV2Q.cjs +1 -0
- package/dist/html-to-json-yjzEN9OX.js +184 -0
- package/dist/{index-QEchoZ98.js → index-7mV_OcXd.js} +34 -33
- package/dist/{index-hMoPNZVn.cjs → index-mUPP605-.cjs} +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.js +1 -1
- package/dist/{page-viewer-zFLkUu2I.js → page-viewer-Xl1i1V3J.js} +7 -5
- package/dist/page-viewer-pJFW_LaN.cjs +1 -0
- package/dist/{project-general-setting-MWGOOurD.js → project-general-setting-8H1Rka2z.js} +5 -4
- package/dist/{project-general-setting-y8daY7V9.cjs → project-general-setting-lNEoQK1n.cjs} +1 -1
- package/dist/render.d.ts +1 -1
- package/dist/{single-page-detail-C48IPzbd.js → single-page-detail-1hsqXV8c.js} +6 -5
- package/dist/single-page-detail-VKqGt-s1.cjs +1 -0
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +5 -3
- package/dist/web-blocks.cjs +2 -2
- package/dist/web-blocks.js +253 -235
- package/package.json +5 -4
- package/dist/CurrentPage-MLObvs0K.cjs +0 -1
- package/dist/Layers-x_mWeT_q.cjs +0 -1
- package/dist/ProjectPanel-4bN_GyNm.cjs +0 -1
- package/dist/Settings-KlTtgu3w.cjs +0 -1
- package/dist/SidePanels-eJBA_cUu.cjs +0 -1
- package/dist/delete-page-modal-U4yiuhx0.cjs +0 -1
- package/dist/html-to-json-dfALTAdG.cjs +0 -1
- package/dist/html-to-json-xKBERAI1.js +0 -177
- package/dist/page-viewer-WhM1FSU0.cjs +0 -1
- package/dist/single-page-detail--xPv74bX.cjs +0 -1
package/dist/web-blocks.js
CHANGED
|
@@ -1,31 +1,48 @@
|
|
|
1
|
-
import { j as a } from "./jsx-runtime-WbnYoNE9.js";
|
|
2
1
|
import * as d from "react";
|
|
3
|
-
import { S as c,
|
|
2
|
+
import { S as c, o as E, f as v, g as I, m as w, u as f, q as H, T as P, c as R, b as D, r as h, h as q } from "./controls-XPXGHKht.js";
|
|
4
3
|
import { registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { j as a } from "./jsx-runtime-WbnYoNE9.js";
|
|
5
|
+
import { omit as $, isEmpty as k, isNull as O, get as S, map as j, noop as V } from "lodash-es";
|
|
6
|
+
import { c as B, g as x } from "./Functions-7jnEwJyw.js";
|
|
7
|
+
import { HeadingIcon as U, TextIcon as W, CursorTextIcon as G, ButtonIcon as F, Link1Icon as Y, RowsIcon as X, ColumnsIcon as Z, SketchLogoIcon as J, ImageIcon as K, VideoIcon as Q, CodeIcon as ee, DividerHorizontalIcon as te, SpaceBetweenVerticallyIcon as z, TableIcon as le, BorderTopIcon as oe, BorderAllIcon as re, ViewHorizontalIcon as se, DragHandleHorizontalIcon as ae, GroupIcon as ne, LetterCaseToggleIcon as ie, InputIcon as A, DropdownMenuIcon as ce, CheckboxIcon as de, RadiobuttonIcon as ue } from "@radix-ui/react-icons";
|
|
8
|
+
import { get as T } from "lodash";
|
|
8
9
|
import "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
10
|
import "clsx";
|
|
10
11
|
import "tailwind-merge";
|
|
12
|
+
const pe = (l) => {
|
|
13
|
+
const { blockProps: e, backgroundImage: t, children: o, styles: s } = l;
|
|
14
|
+
let r = {};
|
|
15
|
+
return t && (r = { backgroundImage: `url(${t})` }), d.createElement("div", { ...e, ...s, style: r }, o);
|
|
16
|
+
};
|
|
17
|
+
u(pe, {
|
|
18
|
+
type: "Body",
|
|
19
|
+
label: "Body",
|
|
20
|
+
category: "core",
|
|
21
|
+
group: "basic",
|
|
22
|
+
hidden: !0,
|
|
23
|
+
props: {
|
|
24
|
+
styles: c({ default: "font-body antialiased" }),
|
|
25
|
+
backgroundImage: E({ title: "Background Image" })
|
|
26
|
+
}
|
|
27
|
+
});
|
|
11
28
|
const g = ({ blockProps: l, className: e = "", styles: t = {} }) => /* @__PURE__ */ a.jsx(
|
|
12
29
|
"div",
|
|
13
30
|
{
|
|
14
31
|
...l,
|
|
15
|
-
className:
|
|
16
|
-
|
|
32
|
+
className: B("flex h-20 flex-col items-center justify-center", e),
|
|
33
|
+
...$(t, ["className"]),
|
|
17
34
|
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", children: /* @__PURE__ */ a.jsx("span", { className: "opacit flex items-center gap-x-1.5 text-xs font-semibold text-gray-400" }) })
|
|
18
35
|
}
|
|
19
|
-
),
|
|
36
|
+
), me = d.memo(
|
|
20
37
|
(l) => {
|
|
21
|
-
const { blockProps: e, backgroundImage: t, children: o, tag:
|
|
22
|
-
if (!o && k(
|
|
23
|
-
return /* @__PURE__ */ a.jsx(g, { blockProps: e, styles:
|
|
38
|
+
const { blockProps: e, backgroundImage: t, children: o, tag: s = "div", styles: r } = l;
|
|
39
|
+
if (!o && k(r == null ? void 0 : r.className))
|
|
40
|
+
return /* @__PURE__ */ a.jsx(g, { blockProps: e, styles: r });
|
|
24
41
|
let n = {};
|
|
25
|
-
return t && (n = { backgroundImage: `url(${t})` }), d.createElement(
|
|
42
|
+
return t && (n = { backgroundImage: `url(${t})` }), d.createElement(s, { ...e, ...r, style: n }, o);
|
|
26
43
|
}
|
|
27
44
|
);
|
|
28
|
-
u(
|
|
45
|
+
u(me, {
|
|
29
46
|
type: "Box",
|
|
30
47
|
label: "Box",
|
|
31
48
|
category: "core",
|
|
@@ -55,22 +72,22 @@ u(ue, {
|
|
|
55
72
|
{ value: "mark", title: "mark" }
|
|
56
73
|
]
|
|
57
74
|
}),
|
|
58
|
-
backgroundImage:
|
|
75
|
+
backgroundImage: E({ title: "Background Image" })
|
|
59
76
|
}
|
|
60
77
|
});
|
|
61
|
-
const
|
|
62
|
-
const { blockProps: e, styles: t, content: o, level:
|
|
63
|
-
return
|
|
78
|
+
const fe = (l) => {
|
|
79
|
+
const { blockProps: e, styles: t, content: o, level: s = "h1", children: r = null } = l;
|
|
80
|
+
return r ? d.createElement(s, { ...t, ...e }, r) : d.createElement(s, {
|
|
64
81
|
...t,
|
|
65
82
|
...e,
|
|
66
83
|
dangerouslySetInnerHTML: { __html: o }
|
|
67
84
|
});
|
|
68
85
|
};
|
|
69
|
-
u(
|
|
86
|
+
u(fe, {
|
|
70
87
|
type: "Heading",
|
|
71
88
|
label: "Heading",
|
|
72
89
|
category: "core",
|
|
73
|
-
icon:
|
|
90
|
+
icon: U,
|
|
74
91
|
group: "basic",
|
|
75
92
|
props: {
|
|
76
93
|
level: v({
|
|
@@ -90,19 +107,19 @@ u(pe, {
|
|
|
90
107
|
content: I({ title: "Content", default: "Heading goes here" })
|
|
91
108
|
}
|
|
92
109
|
});
|
|
93
|
-
const
|
|
110
|
+
const be = (l) => {
|
|
94
111
|
const { blockProps: e, styles: t, content: o } = l;
|
|
95
|
-
return
|
|
112
|
+
return O(l.children) ? d.createElement("div", {
|
|
96
113
|
...t,
|
|
97
114
|
...e,
|
|
98
115
|
dangerouslySetInnerHTML: { __html: o }
|
|
99
116
|
}) : d.createElement("p", { ...t, ...e }, l.children);
|
|
100
117
|
};
|
|
101
|
-
u(
|
|
118
|
+
u(be, {
|
|
102
119
|
type: "Paragraph",
|
|
103
120
|
label: "Paragraph",
|
|
104
121
|
category: "core",
|
|
105
|
-
icon:
|
|
122
|
+
icon: W,
|
|
106
123
|
group: "basic",
|
|
107
124
|
props: {
|
|
108
125
|
styles: c({ default: "" }),
|
|
@@ -112,19 +129,37 @@ u(me, {
|
|
|
112
129
|
})
|
|
113
130
|
}
|
|
114
131
|
});
|
|
115
|
-
const
|
|
132
|
+
const ye = (l) => {
|
|
133
|
+
const { blockProps: e, styles: t, content: o, children: s = null, tag: r } = l;
|
|
134
|
+
return s ? d.createElement("span", { ...t, ...e }, s) : d.createElement(r || "span", {
|
|
135
|
+
...t,
|
|
136
|
+
...e,
|
|
137
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
u(ye, {
|
|
141
|
+
type: "Span",
|
|
142
|
+
label: "Span",
|
|
143
|
+
category: "core",
|
|
144
|
+
group: "basic",
|
|
145
|
+
props: {
|
|
146
|
+
styles: c({ default: "" }),
|
|
147
|
+
content: I({ title: "Content", default: "Enter your content" })
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
const he = (l) => {
|
|
116
151
|
const { blockProps: e, content: t, styles: o } = l;
|
|
117
152
|
return /* @__PURE__ */ a.jsx("div", { className: "prose max-w-full", children: /* @__PURE__ */ a.jsx("div", { ...e, ...o, dangerouslySetInnerHTML: { __html: t } }) });
|
|
118
153
|
};
|
|
119
|
-
u(
|
|
154
|
+
u(he, {
|
|
120
155
|
type: "RichText",
|
|
121
156
|
label: "Rich Text",
|
|
122
157
|
category: "core",
|
|
123
|
-
icon:
|
|
158
|
+
icon: G,
|
|
124
159
|
group: "basic",
|
|
125
160
|
props: {
|
|
126
161
|
styles: c({ default: "" }),
|
|
127
|
-
content:
|
|
162
|
+
content: w({
|
|
128
163
|
title: "Content",
|
|
129
164
|
default: `Lorem Ipsum Rich Text Editor Demo
|
|
130
165
|
|
|
@@ -138,32 +173,32 @@ Utilize nested lists for organization.`
|
|
|
138
173
|
})
|
|
139
174
|
}
|
|
140
175
|
});
|
|
141
|
-
const
|
|
142
|
-
const { blockProps: e, iconSize: t, icon: o, content:
|
|
143
|
-
|
|
176
|
+
const ge = (l) => {
|
|
177
|
+
const { blockProps: e, iconSize: t, icon: o, content: s, iconPos: r, styles: n, children: i } = l, p = o, m = i || /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
178
|
+
s,
|
|
144
179
|
p && /* @__PURE__ */ a.jsx(
|
|
145
180
|
"div",
|
|
146
181
|
{
|
|
147
182
|
style: { width: t + "px" },
|
|
148
|
-
className:
|
|
183
|
+
className: r + (r === "order-first" ? " mr-2" : "ml-2") || "",
|
|
149
184
|
dangerouslySetInnerHTML: { __html: p }
|
|
150
185
|
}
|
|
151
186
|
)
|
|
152
187
|
] });
|
|
153
188
|
return d.createElement("button", { ...e, ...n, type: "button" }, m);
|
|
154
189
|
};
|
|
155
|
-
u(
|
|
190
|
+
u(ge, {
|
|
156
191
|
type: "Button",
|
|
157
192
|
label: "Button",
|
|
158
193
|
category: "core",
|
|
159
|
-
icon:
|
|
194
|
+
icon: F,
|
|
160
195
|
group: "basic",
|
|
161
196
|
props: {
|
|
162
197
|
content: f({ title: "Label", default: "Button", multiLingual: !0 }),
|
|
163
198
|
styles: c({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
|
|
164
|
-
link:
|
|
165
|
-
icon:
|
|
166
|
-
iconSize:
|
|
199
|
+
link: H({ title: "Link", default: { type: "page", href: "", target: "_blank" } }),
|
|
200
|
+
icon: P({ title: "Icon", default: "" }),
|
|
201
|
+
iconSize: R({ title: "Icon Size", default: 24 }),
|
|
167
202
|
iconPos: v({
|
|
168
203
|
title: "Icon Position",
|
|
169
204
|
default: "order-last",
|
|
@@ -174,50 +209,50 @@ u(be, {
|
|
|
174
209
|
})
|
|
175
210
|
}
|
|
176
211
|
});
|
|
177
|
-
const
|
|
178
|
-
const { blockProps: e, link: t, children: o, styles:
|
|
179
|
-
return !o && k(
|
|
212
|
+
const xe = (l) => {
|
|
213
|
+
const { blockProps: e, link: t, children: o, styles: s, inBuilder: r, content: n } = l;
|
|
214
|
+
return !o && k(s == null ? void 0 : s.className) && k(n) ? /* @__PURE__ */ a.jsx(g, { blockProps: e }) : r ? o ? /* @__PURE__ */ a.jsx("span", { "data-simulate": "a", ...e, ...s, children: o }) : d.createElement("span", {
|
|
180
215
|
...e,
|
|
181
|
-
...
|
|
216
|
+
...s,
|
|
182
217
|
href: t.href || "#",
|
|
183
218
|
target: t.target || "_self",
|
|
184
219
|
dangerouslySetInnerHTML: { __html: n },
|
|
185
220
|
"data-simulate": "a"
|
|
186
|
-
}) : o ? /* @__PURE__ */ a.jsx("a", { href: t.href || "#/", target: t.target, ...e, ...
|
|
221
|
+
}) : o ? /* @__PURE__ */ a.jsx("a", { href: t.href || "#/", target: t.target, ...e, ...s, children: o }) : d.createElement("a", {
|
|
187
222
|
...e,
|
|
188
|
-
...
|
|
223
|
+
...s,
|
|
189
224
|
href: t.href || "#",
|
|
190
225
|
target: t.target || "_self",
|
|
191
226
|
dangerouslySetInnerHTML: { __html: n }
|
|
192
227
|
});
|
|
193
228
|
};
|
|
194
|
-
u(
|
|
229
|
+
u(xe, {
|
|
195
230
|
type: "Link",
|
|
196
231
|
label: "Link",
|
|
197
232
|
category: "core",
|
|
198
|
-
icon:
|
|
233
|
+
icon: Y,
|
|
199
234
|
group: "basic",
|
|
200
235
|
props: {
|
|
201
236
|
styles: c({ default: "" }),
|
|
202
237
|
content: f({ title: "Content", default: "" }),
|
|
203
|
-
link:
|
|
238
|
+
link: H({
|
|
204
239
|
title: "Link",
|
|
205
240
|
default: { type: "page", target: "_self", href: "" }
|
|
206
241
|
})
|
|
207
242
|
}
|
|
208
243
|
});
|
|
209
|
-
const
|
|
210
|
-
const { blockProps: e, children: t, listType: o, styles:
|
|
211
|
-
return !t && k(
|
|
212
|
-
|
|
213
|
-
{ ...e, ...
|
|
244
|
+
const ke = (l) => {
|
|
245
|
+
const { blockProps: e, children: t, listType: o, styles: s, tag: r } = l, n = B(S(s, "className", ""), o);
|
|
246
|
+
return !t && k(s == null ? void 0 : s.className) ? /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "LIST ITEM" }) : d.createElement(
|
|
247
|
+
r || (o === "list-decimal" ? "ol" : "ul"),
|
|
248
|
+
{ ...e, ...s, className: n },
|
|
214
249
|
t
|
|
215
250
|
);
|
|
216
251
|
};
|
|
217
|
-
u(
|
|
252
|
+
u(ke, {
|
|
218
253
|
type: "List",
|
|
219
254
|
label: "List",
|
|
220
|
-
icon:
|
|
255
|
+
icon: X,
|
|
221
256
|
category: "core",
|
|
222
257
|
group: "basic",
|
|
223
258
|
props: {
|
|
@@ -257,18 +292,18 @@ u(he, {
|
|
|
257
292
|
}
|
|
258
293
|
]
|
|
259
294
|
});
|
|
260
|
-
const
|
|
261
|
-
const { blockProps: e, content: t, styles: o, children:
|
|
262
|
-
return
|
|
295
|
+
const ve = (l) => {
|
|
296
|
+
const { blockProps: e, content: t, styles: o, children: s, tag: r } = l;
|
|
297
|
+
return s ? d.createElement(r || "li", { ...o, ...e }, s) : d.createElement(r || "li", {
|
|
263
298
|
...o,
|
|
264
299
|
...e,
|
|
265
300
|
dangerouslySetInnerHTML: { __html: t }
|
|
266
301
|
});
|
|
267
302
|
};
|
|
268
|
-
u(
|
|
303
|
+
u(ve, {
|
|
269
304
|
type: "ListItem",
|
|
270
305
|
label: "List Item",
|
|
271
|
-
icon:
|
|
306
|
+
icon: Z,
|
|
272
307
|
category: "core",
|
|
273
308
|
group: "basic",
|
|
274
309
|
props: {
|
|
@@ -276,51 +311,51 @@ u(ge, {
|
|
|
276
311
|
content: I({ title: "Content", default: "List item" })
|
|
277
312
|
}
|
|
278
313
|
});
|
|
279
|
-
const
|
|
280
|
-
const { blockProps: e, icon: t, styles: o } = l,
|
|
314
|
+
const Ie = (l) => {
|
|
315
|
+
const { blockProps: e, icon: t, styles: o } = l, s = {
|
|
281
316
|
...o,
|
|
282
|
-
className:
|
|
317
|
+
className: B(o.className, "inline-block c-inline-block")
|
|
283
318
|
};
|
|
284
319
|
return k(t) ? /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "", className: "h-8 w-14" }) : d.createElement("span", {
|
|
285
320
|
...e,
|
|
286
|
-
...
|
|
321
|
+
...s,
|
|
287
322
|
dangerouslySetInnerHTML: { __html: t }
|
|
288
323
|
});
|
|
289
324
|
};
|
|
290
|
-
u(
|
|
325
|
+
u(Ie, {
|
|
291
326
|
type: "Icon",
|
|
292
327
|
label: "Icon",
|
|
293
328
|
category: "core",
|
|
294
|
-
icon:
|
|
329
|
+
icon: J,
|
|
295
330
|
group: "basic",
|
|
296
331
|
props: {
|
|
297
332
|
styles: c({ default: "text-black" }),
|
|
298
|
-
icon:
|
|
333
|
+
icon: P({
|
|
299
334
|
title: "Icon",
|
|
300
335
|
default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" 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>'
|
|
301
336
|
})
|
|
302
337
|
}
|
|
303
338
|
});
|
|
304
|
-
const
|
|
305
|
-
const { blockProps: e, image: t, styles: o, alt:
|
|
339
|
+
const Le = (l) => {
|
|
340
|
+
const { blockProps: e, image: t, styles: o, alt: s, height: r = 200, width: n = 200 } = l;
|
|
306
341
|
return k(t) ? /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "IMAGE URL", className: "h-36" }) : d.createElement("img", {
|
|
307
342
|
...e,
|
|
308
343
|
...o,
|
|
309
344
|
src: t,
|
|
310
|
-
alt:
|
|
311
|
-
height:
|
|
345
|
+
alt: s,
|
|
346
|
+
height: r,
|
|
312
347
|
width: n
|
|
313
348
|
});
|
|
314
349
|
};
|
|
315
|
-
u(
|
|
350
|
+
u(Le, {
|
|
316
351
|
type: "Image",
|
|
317
352
|
label: "Image",
|
|
318
353
|
category: "core",
|
|
319
|
-
icon:
|
|
354
|
+
icon: K,
|
|
320
355
|
group: "basic",
|
|
321
356
|
props: {
|
|
322
357
|
styles: c({ default: "" }),
|
|
323
|
-
image:
|
|
358
|
+
image: E({
|
|
324
359
|
title: "Image",
|
|
325
360
|
default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
|
|
326
361
|
}),
|
|
@@ -329,17 +364,17 @@ u(ke, {
|
|
|
329
364
|
height: f({ title: "Height", default: "" })
|
|
330
365
|
}
|
|
331
366
|
});
|
|
332
|
-
const
|
|
333
|
-
var
|
|
367
|
+
const Te = (l) => {
|
|
368
|
+
var r;
|
|
334
369
|
const { blockProps: e, styles: t, children: o } = l;
|
|
335
|
-
let
|
|
336
|
-
return o || (
|
|
337
|
-
/* @__PURE__ */ a.jsx("div", { className:
|
|
370
|
+
let s = null;
|
|
371
|
+
return o || (s = // @ts-ignore
|
|
372
|
+
/* @__PURE__ */ a.jsx("div", { className: B("flex flex-col items-center justify-center", (r = l.emptyStyles) == null ? void 0 : r.className), children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full rounded-md border-4 border-dashed", children: /* @__PURE__ */ a.jsxs("p", { className: "truncate p-1 text-left text-xs text-gray-400", children: [
|
|
338
373
|
"Slot: ",
|
|
339
374
|
l.name
|
|
340
|
-
] }) }) })), d.createElement("div", { ...t, ...e, droppable: "yes" }, o ||
|
|
375
|
+
] }) }) })), d.createElement("div", { ...t, ...e, droppable: "yes" }, o || s);
|
|
341
376
|
};
|
|
342
|
-
u(
|
|
377
|
+
u(Te, {
|
|
343
378
|
type: "Slot",
|
|
344
379
|
label: "Slot",
|
|
345
380
|
group: "basic",
|
|
@@ -350,30 +385,30 @@ u(ve, {
|
|
|
350
385
|
emptyStyles: c({ default: "" })
|
|
351
386
|
}
|
|
352
387
|
});
|
|
353
|
-
const
|
|
354
|
-
if (
|
|
355
|
-
const e = l.match(
|
|
388
|
+
const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, C = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, M = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, we = (l) => {
|
|
389
|
+
if (N.test(l)) {
|
|
390
|
+
const e = l.match(N);
|
|
356
391
|
return e ? `https://www.youtube.com/embed/${e[4]}` : l;
|
|
357
392
|
}
|
|
358
|
-
if (
|
|
359
|
-
const e = l.match(
|
|
393
|
+
if (C.test(l)) {
|
|
394
|
+
const e = l.match(C);
|
|
360
395
|
return e ? `https://player.vimeo.com/video/${e[3]}` : l;
|
|
361
396
|
}
|
|
362
|
-
if (
|
|
363
|
-
const e = l.match(
|
|
397
|
+
if (M.test(l)) {
|
|
398
|
+
const e = l.match(M);
|
|
364
399
|
return e ? `https://www.dailymotion.com/embed/video/${e[4]}` : l;
|
|
365
400
|
}
|
|
366
401
|
return null;
|
|
367
|
-
},
|
|
402
|
+
}, Be = d.memo(
|
|
368
403
|
(l) => {
|
|
369
|
-
const { blockProps: e, inBuilder: t, styles: o, url:
|
|
370
|
-
if (k(
|
|
404
|
+
const { blockProps: e, inBuilder: t, styles: o, url: s, controls: r } = l, n = T(r, "autoPlay", !1), i = T(r, "controls", !1), p = n || T(r, "muted", !0), m = T(r, "loop", !1);
|
|
405
|
+
if (k(s))
|
|
371
406
|
return /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "VIDEO URL", className: "h-36" });
|
|
372
|
-
let y =
|
|
407
|
+
let y = we(s), b = null;
|
|
373
408
|
if (y) {
|
|
374
409
|
if (!k(y)) {
|
|
375
410
|
const L = [];
|
|
376
|
-
L.push(`autoplay=${n ? 1 : 0}`), L.push(`controls=${
|
|
411
|
+
L.push(`autoplay=${n ? 1 : 0}`), L.push(`controls=${r ? 1 : 0}`), L.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), L.push(`loop=${m ? 1 : 0}`), y = `${y}?${L.join("&")}`;
|
|
377
412
|
}
|
|
378
413
|
b = d.createElement("iframe", {
|
|
379
414
|
...e,
|
|
@@ -387,23 +422,23 @@ const E = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-
|
|
|
387
422
|
b = d.createElement("video", {
|
|
388
423
|
...e,
|
|
389
424
|
...o,
|
|
390
|
-
src:
|
|
425
|
+
src: s,
|
|
391
426
|
controls: i,
|
|
392
427
|
muted: p,
|
|
393
428
|
autoPlay: t ? !1 : n,
|
|
394
429
|
loop: m
|
|
395
430
|
});
|
|
396
|
-
return /* @__PURE__ */ a.jsxs("div", { className: "relative overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
431
|
+
return /* @__PURE__ */ a.jsxs("div", { className: "relative overflow-hidden w-full h-full", style: { paddingBottom: "56.25%" }, children: [
|
|
397
432
|
t ? /* @__PURE__ */ a.jsx("div", { ...e, ...o, className: "absolute h-full w-full z-20" }) : null,
|
|
398
433
|
b
|
|
399
434
|
] });
|
|
400
435
|
}
|
|
401
436
|
);
|
|
402
|
-
u(
|
|
437
|
+
u(Be, {
|
|
403
438
|
type: "Video",
|
|
404
439
|
label: "Video",
|
|
405
440
|
category: "core",
|
|
406
|
-
icon:
|
|
441
|
+
icon: Q,
|
|
407
442
|
group: "basic",
|
|
408
443
|
props: {
|
|
409
444
|
styles: c({ default: "absolute top-0 left-0 w-full h-full" }),
|
|
@@ -411,7 +446,7 @@ u(Le, {
|
|
|
411
446
|
title: "Video URL",
|
|
412
447
|
default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
|
|
413
448
|
}),
|
|
414
|
-
controls:
|
|
449
|
+
controls: D({
|
|
415
450
|
title: "Controls",
|
|
416
451
|
properties: {
|
|
417
452
|
autoPlay: h({ title: "Autoplay", default: !0 }),
|
|
@@ -422,11 +457,11 @@ u(Le, {
|
|
|
422
457
|
})
|
|
423
458
|
}
|
|
424
459
|
});
|
|
425
|
-
const
|
|
460
|
+
const _e = d.memo(
|
|
426
461
|
(l) => {
|
|
427
|
-
const { blockProps: e, styles: t, content: o, inBuilder:
|
|
462
|
+
const { blockProps: e, styles: t, content: o, inBuilder: s } = l;
|
|
428
463
|
return /* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
|
|
429
|
-
|
|
464
|
+
s ? /* @__PURE__ */ a.jsx("div", { ...e, ...t, className: "absolute h-full w-full z-20" }) : null,
|
|
430
465
|
d.createElement("div", {
|
|
431
466
|
...t,
|
|
432
467
|
dangerouslySetInnerHTML: { __html: o }
|
|
@@ -434,11 +469,11 @@ const Te = d.memo(
|
|
|
434
469
|
] });
|
|
435
470
|
}
|
|
436
471
|
);
|
|
437
|
-
u(
|
|
472
|
+
u(_e, {
|
|
438
473
|
type: "CustomHTML",
|
|
439
474
|
label: "CustomHTML",
|
|
440
475
|
category: "core",
|
|
441
|
-
icon:
|
|
476
|
+
icon: ee,
|
|
442
477
|
group: "basic",
|
|
443
478
|
props: {
|
|
444
479
|
styles: c({ default: "" }),
|
|
@@ -449,192 +484,175 @@ u(Te, {
|
|
|
449
484
|
})
|
|
450
485
|
}
|
|
451
486
|
});
|
|
452
|
-
const
|
|
453
|
-
const { blockProps: e, styles: t, content: o, children: r = null, tag: s } = l;
|
|
454
|
-
return r ? d.createElement("span", { ...t, ...e }, r) : d.createElement(s || "span", {
|
|
455
|
-
...t,
|
|
456
|
-
...e,
|
|
457
|
-
dangerouslySetInnerHTML: { __html: o }
|
|
458
|
-
});
|
|
459
|
-
};
|
|
460
|
-
u(we, {
|
|
461
|
-
type: "Span",
|
|
462
|
-
label: "Span",
|
|
463
|
-
category: "core",
|
|
464
|
-
group: "basic",
|
|
465
|
-
props: {
|
|
466
|
-
styles: c({ default: "" }),
|
|
467
|
-
content: I({ title: "Content", default: "Enter your content" })
|
|
468
|
-
}
|
|
469
|
-
});
|
|
470
|
-
const Be = (l) => {
|
|
487
|
+
const Se = (l) => {
|
|
471
488
|
const { blockProps: e, styles: t } = l;
|
|
472
489
|
return d.createElement("hr", { ...t, ...e });
|
|
473
490
|
};
|
|
474
|
-
u(
|
|
491
|
+
u(Se, {
|
|
475
492
|
type: "Divider",
|
|
476
493
|
label: "Divider",
|
|
477
494
|
category: "core",
|
|
478
|
-
icon:
|
|
495
|
+
icon: te,
|
|
479
496
|
group: "basic",
|
|
480
497
|
props: {
|
|
481
498
|
styles: c({ default: "bg-gray-900 h-0.5 py-2 my-1" })
|
|
482
499
|
}
|
|
483
500
|
});
|
|
484
|
-
const
|
|
501
|
+
const je = (l) => {
|
|
485
502
|
const { blockProps: e, styles: t } = l;
|
|
486
503
|
return d.createElement("br", { ...e, ...t });
|
|
487
504
|
};
|
|
488
|
-
u(
|
|
505
|
+
u(je, {
|
|
489
506
|
type: "LineBreak",
|
|
490
507
|
label: "Line Break",
|
|
491
508
|
category: "core",
|
|
492
509
|
group: "basic",
|
|
493
|
-
|
|
510
|
+
hidden: !0,
|
|
511
|
+
icon: z,
|
|
494
512
|
props: {
|
|
495
513
|
styles: c({ default: "" })
|
|
496
514
|
}
|
|
497
515
|
});
|
|
498
|
-
const
|
|
499
|
-
u(
|
|
516
|
+
const Ee = (l) => l.inBuilder ? /* @__PURE__ */ a.jsx("span", { className: "inline", ...l.blockProps, children: l.content }) : `${l.content}`;
|
|
517
|
+
u(Ee, {
|
|
500
518
|
type: "Text",
|
|
501
519
|
label: "Text",
|
|
502
520
|
hidden: !0,
|
|
503
521
|
category: "core",
|
|
504
522
|
group: "basic",
|
|
505
|
-
icon:
|
|
523
|
+
icon: z,
|
|
506
524
|
props: {
|
|
507
525
|
content: I({ title: "Content", defaultValue: "" })
|
|
508
526
|
}
|
|
509
527
|
});
|
|
510
|
-
const
|
|
511
|
-
const e = (
|
|
528
|
+
const _ = (l) => {
|
|
529
|
+
const e = (r, n) => ({
|
|
512
530
|
_id: x(),
|
|
513
|
-
_parent:
|
|
531
|
+
_parent: r,
|
|
514
532
|
_type: "TableCell",
|
|
515
533
|
styles: "#styles:,",
|
|
516
534
|
content: `${l === "TableHead" ? "Table Head" : "Table Cell " + n}`
|
|
517
|
-
}), t = (
|
|
535
|
+
}), t = (r) => {
|
|
518
536
|
const n = x(), i = {
|
|
519
537
|
_type: "TableRow",
|
|
520
538
|
_id: n,
|
|
521
539
|
styles: "#styles:,border-b"
|
|
522
540
|
};
|
|
523
|
-
return
|
|
524
|
-
}, o = (
|
|
541
|
+
return r && (i._parent = r), [i, e(n, "1"), e(n, "2"), e(n, "3")];
|
|
542
|
+
}, o = (r) => {
|
|
525
543
|
const n = x(), i = {
|
|
526
544
|
_id: n,
|
|
527
545
|
_type: "TableHead",
|
|
528
546
|
styles: "#styles:,font-medium"
|
|
529
547
|
};
|
|
530
|
-
return
|
|
531
|
-
},
|
|
548
|
+
return r && (i._parent = r), [i, ...t(n)];
|
|
549
|
+
}, s = (r) => {
|
|
532
550
|
const n = x(), i = {
|
|
533
551
|
_id: n,
|
|
534
552
|
_type: "TableBody",
|
|
535
553
|
styles: "#styles:,"
|
|
536
554
|
};
|
|
537
|
-
return
|
|
555
|
+
return r && (i._parent = r), [i, ...t(n), ...t(n)];
|
|
538
556
|
};
|
|
539
557
|
if (l === "Table") {
|
|
540
|
-
const
|
|
558
|
+
const r = x();
|
|
541
559
|
return [
|
|
542
560
|
{
|
|
543
|
-
_id:
|
|
561
|
+
_id: r,
|
|
544
562
|
_type: "Table",
|
|
545
563
|
styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
|
|
546
564
|
},
|
|
547
|
-
...o(
|
|
548
|
-
...r
|
|
565
|
+
...o(r),
|
|
566
|
+
...s(r)
|
|
549
567
|
];
|
|
550
568
|
}
|
|
551
|
-
return l === "TableRow" ? t() : l === "TableHead" ? o() : l === "TableBody" ?
|
|
552
|
-
},
|
|
569
|
+
return l === "TableRow" ? t() : l === "TableHead" ? o() : l === "TableBody" ? s() : [];
|
|
570
|
+
}, Pe = (l) => {
|
|
553
571
|
const { blockProps: e, children: t, styles: o } = l;
|
|
554
572
|
return t ? d.createElement("table", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE HEAD / BODY" });
|
|
555
573
|
};
|
|
556
|
-
u(
|
|
574
|
+
u(Pe, {
|
|
557
575
|
type: "Table",
|
|
558
576
|
label: "Table",
|
|
559
577
|
category: "core",
|
|
560
578
|
group: "table",
|
|
561
579
|
hidden: !0,
|
|
562
|
-
icon:
|
|
580
|
+
icon: le,
|
|
563
581
|
props: {
|
|
564
582
|
styles: c({ default: "" })
|
|
565
583
|
},
|
|
566
|
-
blocks:
|
|
584
|
+
blocks: _("Table")
|
|
567
585
|
});
|
|
568
|
-
const
|
|
586
|
+
const Ne = (l) => {
|
|
569
587
|
const { blockProps: e, children: t, styles: o } = l;
|
|
570
588
|
return t ? d.createElement("thead", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE ROW" });
|
|
571
589
|
};
|
|
572
|
-
u(
|
|
590
|
+
u(Ne, {
|
|
573
591
|
type: "TableHead",
|
|
574
592
|
label: "Table Head",
|
|
575
593
|
category: "core",
|
|
576
594
|
group: "table",
|
|
577
595
|
hidden: !0,
|
|
578
|
-
icon:
|
|
596
|
+
icon: oe,
|
|
579
597
|
props: {
|
|
580
598
|
styles: c({ default: "" })
|
|
581
599
|
},
|
|
582
|
-
blocks:
|
|
600
|
+
blocks: _("TableHead")
|
|
583
601
|
});
|
|
584
|
-
const
|
|
602
|
+
const Ce = (l) => {
|
|
585
603
|
const { blockProps: e, children: t, styles: o } = l;
|
|
586
604
|
return t ? d.createElement("tbody", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE ROW" });
|
|
587
605
|
};
|
|
588
|
-
u(
|
|
606
|
+
u(Ce, {
|
|
589
607
|
type: "TableBody",
|
|
590
608
|
label: "Table Body",
|
|
591
609
|
category: "core",
|
|
592
610
|
group: "table",
|
|
593
611
|
hidden: !0,
|
|
594
|
-
icon:
|
|
612
|
+
icon: re,
|
|
595
613
|
props: {
|
|
596
614
|
styles: c({ default: "" })
|
|
597
615
|
},
|
|
598
|
-
blocks:
|
|
616
|
+
blocks: _("TableBody")
|
|
599
617
|
});
|
|
600
|
-
const
|
|
618
|
+
const Me = (l) => {
|
|
601
619
|
const { blockProps: e, children: t, styles: o } = l;
|
|
602
620
|
return t ? d.createElement("tr", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE CELL" });
|
|
603
621
|
};
|
|
604
|
-
u(
|
|
622
|
+
u(Me, {
|
|
605
623
|
type: "TableRow",
|
|
606
624
|
label: "Table Row",
|
|
607
625
|
category: "core",
|
|
608
626
|
group: "table",
|
|
609
627
|
hidden: !0,
|
|
610
|
-
icon:
|
|
628
|
+
icon: se,
|
|
611
629
|
props: {
|
|
612
630
|
styles: c({ default: "w-full" })
|
|
613
631
|
},
|
|
614
|
-
blocks:
|
|
632
|
+
blocks: _("TableRow")
|
|
615
633
|
});
|
|
616
|
-
const
|
|
617
|
-
const { blockProps: e, children: t, content: o, styles:
|
|
618
|
-
return !t && k(o) ? /* @__PURE__ */ a.jsx(g, { blockProps: e }) : t ? d.createElement("td", { ...e, ...
|
|
634
|
+
const He = (l) => {
|
|
635
|
+
const { blockProps: e, children: t, content: o, styles: s } = l;
|
|
636
|
+
return !t && k(o) ? /* @__PURE__ */ a.jsx(g, { blockProps: e }) : t ? d.createElement("td", { ...e, ...s }, t) : d.createElement("td", {
|
|
619
637
|
...e,
|
|
620
|
-
...
|
|
638
|
+
...s,
|
|
621
639
|
dangerouslySetInnerHTML: { __html: o }
|
|
622
640
|
});
|
|
623
641
|
};
|
|
624
|
-
u(
|
|
642
|
+
u(He, {
|
|
625
643
|
type: "TableCell",
|
|
626
644
|
label: "Table Cell",
|
|
627
645
|
category: "core",
|
|
628
646
|
group: "table",
|
|
629
647
|
hidden: !0,
|
|
630
|
-
icon:
|
|
648
|
+
icon: ae,
|
|
631
649
|
props: {
|
|
632
650
|
styles: c({ default: "" }),
|
|
633
|
-
content:
|
|
651
|
+
content: w({ title: "Content", default: "Table cell item" })
|
|
634
652
|
}
|
|
635
653
|
});
|
|
636
|
-
const
|
|
637
|
-
const { blockProps: e, errorMessage: t, name: o, _type:
|
|
654
|
+
const Re = (l) => {
|
|
655
|
+
const { blockProps: e, errorMessage: t, name: o, _type: s, successMessage: r, action: n, styles: i, children: p } = l;
|
|
638
656
|
if (!p && k(i == null ? void 0 : i.className))
|
|
639
657
|
return /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "FORM FIELDS" });
|
|
640
658
|
const m = {
|
|
@@ -649,24 +667,24 @@ const Me = (l) => {
|
|
|
649
667
|
{
|
|
650
668
|
...m,
|
|
651
669
|
"data-error": t,
|
|
652
|
-
"data-success":
|
|
670
|
+
"data-success": r,
|
|
653
671
|
method: "post",
|
|
654
672
|
action: n,
|
|
655
673
|
...e,
|
|
656
674
|
...i,
|
|
657
675
|
children: [
|
|
658
676
|
/* @__PURE__ */ a.jsx("div", { ...y }),
|
|
659
|
-
/* @__PURE__ */ a.jsx("input", { name: "formname", type: "hidden", value: o ||
|
|
677
|
+
/* @__PURE__ */ a.jsx("input", { name: "formname", type: "hidden", value: o || s }),
|
|
660
678
|
p
|
|
661
679
|
]
|
|
662
680
|
}
|
|
663
681
|
);
|
|
664
682
|
};
|
|
665
|
-
u(
|
|
683
|
+
u(Re, {
|
|
666
684
|
type: "Form",
|
|
667
685
|
label: "Form",
|
|
668
686
|
category: "core",
|
|
669
|
-
icon:
|
|
687
|
+
icon: ne,
|
|
670
688
|
group: "form",
|
|
671
689
|
hidden: !0,
|
|
672
690
|
props: {
|
|
@@ -675,28 +693,28 @@ u(Me, {
|
|
|
675
693
|
title: "Submit URL",
|
|
676
694
|
default: "/api/form/submit"
|
|
677
695
|
}),
|
|
678
|
-
errorMessage:
|
|
696
|
+
errorMessage: w({
|
|
679
697
|
title: "Error Message",
|
|
680
698
|
default: "Something went wrong. Please try again"
|
|
681
699
|
}),
|
|
682
|
-
successMessage:
|
|
700
|
+
successMessage: w({
|
|
683
701
|
title: "Success Message",
|
|
684
702
|
default: "Thank you for your submission."
|
|
685
703
|
})
|
|
686
704
|
}
|
|
687
705
|
});
|
|
688
|
-
const
|
|
689
|
-
const { blockProps: e, content: t, styles: o, children:
|
|
690
|
-
return
|
|
691
|
-
...
|
|
706
|
+
const Fe = (l) => {
|
|
707
|
+
const { blockProps: e, content: t, styles: o, children: s } = l, r = { ...o, ...e };
|
|
708
|
+
return s ? d.createElement("label", r, s) : d.createElement("label", {
|
|
709
|
+
...r,
|
|
692
710
|
dangerouslySetInnerHTML: { __html: t }
|
|
693
711
|
});
|
|
694
712
|
};
|
|
695
|
-
u(
|
|
713
|
+
u(Fe, {
|
|
696
714
|
type: "Label",
|
|
697
715
|
label: "Label",
|
|
698
716
|
category: "core",
|
|
699
|
-
icon:
|
|
717
|
+
icon: ie,
|
|
700
718
|
group: "form",
|
|
701
719
|
hidden: !0,
|
|
702
720
|
props: {
|
|
@@ -704,13 +722,13 @@ u(He, {
|
|
|
704
722
|
content: f({ title: "Content", default: "Label" })
|
|
705
723
|
}
|
|
706
724
|
});
|
|
707
|
-
const
|
|
725
|
+
const ze = (l) => {
|
|
708
726
|
const {
|
|
709
727
|
blockProps: e,
|
|
710
728
|
label: t,
|
|
711
729
|
placeholder: o,
|
|
712
|
-
styles:
|
|
713
|
-
inputStyles:
|
|
730
|
+
styles: s,
|
|
731
|
+
inputStyles: r,
|
|
714
732
|
showLabel: n,
|
|
715
733
|
required: i,
|
|
716
734
|
inputType: p = "text",
|
|
@@ -724,20 +742,20 @@ const Re = (l) => {
|
|
|
724
742
|
name: y,
|
|
725
743
|
readOnly: m,
|
|
726
744
|
...e,
|
|
727
|
-
...s,
|
|
728
745
|
...r,
|
|
746
|
+
...s,
|
|
729
747
|
type: p,
|
|
730
748
|
placeholder: o,
|
|
731
749
|
required: i
|
|
732
750
|
}
|
|
733
|
-
)) : /* @__PURE__ */ a.jsxs("div", { ...
|
|
751
|
+
)) : /* @__PURE__ */ a.jsxs("div", { ...s, ...e, children: [
|
|
734
752
|
n && /* @__PURE__ */ a.jsx("label", { htmlFor: b, children: t }),
|
|
735
753
|
/* @__PURE__ */ a.jsx(
|
|
736
754
|
"input",
|
|
737
755
|
{
|
|
738
756
|
name: y,
|
|
739
757
|
readOnly: m,
|
|
740
|
-
...
|
|
758
|
+
...r,
|
|
741
759
|
id: b,
|
|
742
760
|
type: p,
|
|
743
761
|
placeholder: o,
|
|
@@ -746,11 +764,11 @@ const Re = (l) => {
|
|
|
746
764
|
)
|
|
747
765
|
] });
|
|
748
766
|
};
|
|
749
|
-
u(
|
|
767
|
+
u(ze, {
|
|
750
768
|
type: "Input",
|
|
751
769
|
label: "Input",
|
|
752
770
|
category: "core",
|
|
753
|
-
icon:
|
|
771
|
+
icon: A,
|
|
754
772
|
group: "form",
|
|
755
773
|
hidden: !0,
|
|
756
774
|
props: {
|
|
@@ -758,7 +776,7 @@ u(Re, {
|
|
|
758
776
|
fieldName: f({ title: "Field Name", default: "input" }),
|
|
759
777
|
inputType: v({
|
|
760
778
|
title: "Type",
|
|
761
|
-
options:
|
|
779
|
+
options: j(
|
|
762
780
|
["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
|
|
763
781
|
(l) => ({
|
|
764
782
|
value: l,
|
|
@@ -778,11 +796,11 @@ u(Re, {
|
|
|
778
796
|
required: h({ title: "Required", default: !1 })
|
|
779
797
|
}
|
|
780
798
|
});
|
|
781
|
-
const
|
|
782
|
-
const { blockProps: e, fieldName: t, label: o, placeholder:
|
|
783
|
-
return p ? /* @__PURE__ */ a.jsxs("div", { ...
|
|
799
|
+
const Ae = (l) => {
|
|
800
|
+
const { blockProps: e, fieldName: t, label: o, placeholder: s, styles: r, inputStyles: n, _rows: i, showLabel: p } = l, m = x();
|
|
801
|
+
return p ? /* @__PURE__ */ a.jsxs("div", { ...r, ...e, children: [
|
|
784
802
|
p && /* @__PURE__ */ a.jsx("label", { htmlFor: m, children: o }),
|
|
785
|
-
/* @__PURE__ */ a.jsx("textarea", { name: t, ...n, id: m, placeholder:
|
|
803
|
+
/* @__PURE__ */ a.jsx("textarea", { name: t, ...n, id: m, placeholder: s, rows: i })
|
|
786
804
|
] }) : /* @__PURE__ */ a.jsx(
|
|
787
805
|
"textarea",
|
|
788
806
|
{
|
|
@@ -790,17 +808,17 @@ const Fe = (l) => {
|
|
|
790
808
|
name: t,
|
|
791
809
|
...e,
|
|
792
810
|
...n,
|
|
793
|
-
...
|
|
794
|
-
placeholder:
|
|
811
|
+
...r,
|
|
812
|
+
placeholder: s,
|
|
795
813
|
rows: i
|
|
796
814
|
}
|
|
797
815
|
);
|
|
798
816
|
};
|
|
799
|
-
u(
|
|
817
|
+
u(Ae, {
|
|
800
818
|
type: "TextArea",
|
|
801
819
|
label: "TextArea",
|
|
802
820
|
category: "core",
|
|
803
|
-
icon:
|
|
821
|
+
icon: A,
|
|
804
822
|
group: "form",
|
|
805
823
|
hidden: !0,
|
|
806
824
|
props: {
|
|
@@ -813,38 +831,38 @@ u(Fe, {
|
|
|
813
831
|
title: "Placeholder",
|
|
814
832
|
default: "Placeholder"
|
|
815
833
|
}),
|
|
816
|
-
_rows:
|
|
834
|
+
_rows: R({ title: "Rows", default: 3 })
|
|
817
835
|
}
|
|
818
836
|
});
|
|
819
|
-
const
|
|
837
|
+
const De = (l) => {
|
|
820
838
|
const {
|
|
821
839
|
blockProps: e,
|
|
822
840
|
fieldName: t,
|
|
823
841
|
label: o,
|
|
824
|
-
placeholder:
|
|
825
|
-
styles:
|
|
842
|
+
placeholder: s,
|
|
843
|
+
styles: r,
|
|
826
844
|
inputStyles: n,
|
|
827
845
|
required: i,
|
|
828
846
|
showLabel: p,
|
|
829
847
|
_multiple: m = !1
|
|
830
848
|
} = l, y = x();
|
|
831
|
-
return p ? /* @__PURE__ */ a.jsxs("div", { ...
|
|
849
|
+
return p ? /* @__PURE__ */ a.jsxs("div", { ...r, children: [
|
|
832
850
|
p && /* @__PURE__ */ a.jsx("label", { htmlFor: y, children: o }),
|
|
833
851
|
/* @__PURE__ */ a.jsxs(
|
|
834
852
|
"select",
|
|
835
853
|
{
|
|
836
854
|
...n,
|
|
837
855
|
id: y,
|
|
838
|
-
placeholder:
|
|
856
|
+
placeholder: s,
|
|
839
857
|
required: i,
|
|
840
858
|
multiple: m,
|
|
841
859
|
name: t,
|
|
842
860
|
children: [
|
|
843
|
-
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children:
|
|
844
|
-
|
|
861
|
+
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
|
|
862
|
+
j(l.options, (b) => /* @__PURE__ */ a.jsx(
|
|
845
863
|
"option",
|
|
846
864
|
{
|
|
847
|
-
selected:
|
|
865
|
+
selected: S(b, "selected", !1),
|
|
848
866
|
value: b.value,
|
|
849
867
|
dangerouslySetInnerHTML: { __html: b.label }
|
|
850
868
|
},
|
|
@@ -857,18 +875,18 @@ const ze = (l) => {
|
|
|
857
875
|
"select",
|
|
858
876
|
{
|
|
859
877
|
id: y,
|
|
860
|
-
...
|
|
878
|
+
...r,
|
|
861
879
|
...e,
|
|
862
|
-
placeholder:
|
|
880
|
+
placeholder: s,
|
|
863
881
|
required: i,
|
|
864
882
|
multiple: m,
|
|
865
883
|
name: t,
|
|
866
884
|
children: [
|
|
867
|
-
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children:
|
|
868
|
-
|
|
885
|
+
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
|
|
886
|
+
j(l.options, (b) => /* @__PURE__ */ a.jsx(
|
|
869
887
|
"option",
|
|
870
888
|
{
|
|
871
|
-
selected:
|
|
889
|
+
selected: S(b, "selected", !1),
|
|
872
890
|
value: b.value,
|
|
873
891
|
dangerouslySetInnerHTML: { __html: b.label }
|
|
874
892
|
},
|
|
@@ -878,11 +896,11 @@ const ze = (l) => {
|
|
|
878
896
|
}
|
|
879
897
|
);
|
|
880
898
|
};
|
|
881
|
-
u(
|
|
899
|
+
u(De, {
|
|
882
900
|
type: "Select",
|
|
883
901
|
label: "Select",
|
|
884
902
|
category: "core",
|
|
885
|
-
icon:
|
|
903
|
+
icon: ce,
|
|
886
904
|
group: "form",
|
|
887
905
|
hidden: !0,
|
|
888
906
|
props: {
|
|
@@ -897,7 +915,7 @@ u(ze, {
|
|
|
897
915
|
}),
|
|
898
916
|
required: h({ title: "Required", default: !1 }),
|
|
899
917
|
_multiple: h({ title: "Multiple Choice", default: !1 }),
|
|
900
|
-
options:
|
|
918
|
+
options: q({
|
|
901
919
|
title: "Options",
|
|
902
920
|
itemProperties: {
|
|
903
921
|
label: f({ title: "Label", default: "" }),
|
|
@@ -906,13 +924,13 @@ u(ze, {
|
|
|
906
924
|
})
|
|
907
925
|
}
|
|
908
926
|
});
|
|
909
|
-
const
|
|
910
|
-
const { blockProps: e, fieldName: t, label: o, styles:
|
|
911
|
-
return p ? /* @__PURE__ */ a.jsxs("div", { ...
|
|
927
|
+
const qe = (l) => {
|
|
928
|
+
const { blockProps: e, fieldName: t, label: o, styles: s, inputStyles: r, required: n, checked: i, showLabel: p = !0 } = l, m = x();
|
|
929
|
+
return p ? /* @__PURE__ */ a.jsxs("div", { ...s, ...e, children: [
|
|
912
930
|
/* @__PURE__ */ a.jsx(
|
|
913
931
|
"input",
|
|
914
932
|
{
|
|
915
|
-
...
|
|
933
|
+
...r,
|
|
916
934
|
name: t,
|
|
917
935
|
id: m,
|
|
918
936
|
type: "checkbox",
|
|
@@ -926,19 +944,19 @@ const Ae = (l) => {
|
|
|
926
944
|
{
|
|
927
945
|
id: m,
|
|
928
946
|
...e,
|
|
929
|
-
...s,
|
|
930
947
|
...r,
|
|
948
|
+
...s,
|
|
931
949
|
type: "checkbox",
|
|
932
950
|
required: n,
|
|
933
951
|
name: t
|
|
934
952
|
}
|
|
935
953
|
);
|
|
936
954
|
};
|
|
937
|
-
u(
|
|
955
|
+
u(qe, {
|
|
938
956
|
type: "Checkbox",
|
|
939
957
|
label: "Checkbox",
|
|
940
958
|
category: "core",
|
|
941
|
-
icon:
|
|
959
|
+
icon: de,
|
|
942
960
|
group: "form",
|
|
943
961
|
hidden: !0,
|
|
944
962
|
props: {
|
|
@@ -949,18 +967,18 @@ u(Ae, {
|
|
|
949
967
|
required: h({ title: "Required", default: !1 })
|
|
950
968
|
}
|
|
951
969
|
});
|
|
952
|
-
const
|
|
953
|
-
const { blockProps: e, fieldName: t, label: o, styles:
|
|
954
|
-
return p ? /* @__PURE__ */ a.jsxs("div", { ...
|
|
955
|
-
/* @__PURE__ */ a.jsx("input", { ...
|
|
970
|
+
const $e = (l) => {
|
|
971
|
+
const { blockProps: e, fieldName: t, label: o, styles: s, inputStyles: r, checked: n, required: i, showLabel: p = !0 } = l, m = x();
|
|
972
|
+
return p ? /* @__PURE__ */ a.jsxs("div", { ...s, ...e, children: [
|
|
973
|
+
/* @__PURE__ */ a.jsx("input", { ...r, name: t, id: m, type: "radio", required: i, defaultChecked: n }),
|
|
956
974
|
o && /* @__PURE__ */ a.jsx("label", { htmlFor: m, children: o })
|
|
957
975
|
] }) : /* @__PURE__ */ a.jsx(
|
|
958
976
|
"input",
|
|
959
977
|
{
|
|
960
978
|
id: m,
|
|
961
979
|
...e,
|
|
962
|
-
...s,
|
|
963
980
|
...r,
|
|
981
|
+
...s,
|
|
964
982
|
type: "radio",
|
|
965
983
|
required: i,
|
|
966
984
|
checked: n,
|
|
@@ -968,11 +986,11 @@ const De = (l) => {
|
|
|
968
986
|
}
|
|
969
987
|
);
|
|
970
988
|
};
|
|
971
|
-
u(
|
|
989
|
+
u($e, {
|
|
972
990
|
type: "Radio",
|
|
973
991
|
label: "Radio",
|
|
974
992
|
category: "core",
|
|
975
|
-
icon:
|
|
993
|
+
icon: ue,
|
|
976
994
|
group: "form",
|
|
977
995
|
hidden: !0,
|
|
978
996
|
props: {
|
|
@@ -983,8 +1001,8 @@ u(De, {
|
|
|
983
1001
|
required: h({ title: "Required", default: !1 })
|
|
984
1002
|
}
|
|
985
1003
|
});
|
|
986
|
-
const
|
|
987
|
-
const { blockProps: e, inBuilder: t, label: o, placeholder:
|
|
1004
|
+
const Oe = (l) => {
|
|
1005
|
+
const { blockProps: e, inBuilder: t, label: o, placeholder: s, styles: r, inputStyles: n, icon: i, iconPos: p } = l, m = x(), y = {
|
|
988
1006
|
"x-bind:disabled": "formLoading"
|
|
989
1007
|
};
|
|
990
1008
|
return /* @__PURE__ */ a.jsxs(
|
|
@@ -993,10 +1011,10 @@ const qe = (l) => {
|
|
|
993
1011
|
id: m,
|
|
994
1012
|
...y,
|
|
995
1013
|
...n,
|
|
996
|
-
...
|
|
1014
|
+
...r,
|
|
997
1015
|
...e || {},
|
|
998
1016
|
type: t ? "button" : "submit",
|
|
999
|
-
placeholder:
|
|
1017
|
+
placeholder: s,
|
|
1000
1018
|
children: [
|
|
1001
1019
|
o,
|
|
1002
1020
|
i && /* @__PURE__ */ a.jsx("span", { className: p, dangerouslySetInnerHTML: { __html: i } })
|
|
@@ -1004,11 +1022,11 @@ const qe = (l) => {
|
|
|
1004
1022
|
}
|
|
1005
1023
|
);
|
|
1006
1024
|
};
|
|
1007
|
-
u(
|
|
1025
|
+
u(Oe, {
|
|
1008
1026
|
type: "FormButton",
|
|
1009
1027
|
label: "Submit Button",
|
|
1010
1028
|
category: "core",
|
|
1011
|
-
icon:
|
|
1029
|
+
icon: F,
|
|
1012
1030
|
group: "form",
|
|
1013
1031
|
hidden: !0,
|
|
1014
1032
|
props: {
|
|
@@ -1016,7 +1034,7 @@ u(qe, {
|
|
|
1016
1034
|
styles: c({
|
|
1017
1035
|
default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
1018
1036
|
}),
|
|
1019
|
-
icon:
|
|
1037
|
+
icon: P({ title: "Icon", default: "" }),
|
|
1020
1038
|
iconPos: v({
|
|
1021
1039
|
title: "Icon Position",
|
|
1022
1040
|
default: "order-last",
|
|
@@ -1027,7 +1045,7 @@ u(qe, {
|
|
|
1027
1045
|
})
|
|
1028
1046
|
}
|
|
1029
1047
|
});
|
|
1030
|
-
const
|
|
1048
|
+
const et = V;
|
|
1031
1049
|
export {
|
|
1032
|
-
|
|
1050
|
+
et as loadWebBlocks
|
|
1033
1051
|
};
|