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