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