@chaibuilder/sdk 1.3.0-beta.8 → 1.3.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CodeEditor-CTpbkvn0.cjs +1 -0
- package/dist/CodeEditor-ChxA5nBg.js +77 -0
- package/dist/STRINGS-eiGM83kj.js +7 -0
- package/dist/STRINGS-ew98weUe.cjs +1 -0
- package/dist/Topbar-QwR6PKnl.cjs +1 -0
- package/dist/Topbar-z1o2yz-v.js +113 -0
- package/dist/UnsplashImages-BZ4Uvn_u.cjs +1 -0
- package/dist/UnsplashImages-BiXwCeGg.js +189 -0
- package/dist/UploadImages-BeAGmTnm.js +101 -0
- package/dist/UploadImages-e9ItP1o-.cjs +1 -0
- package/dist/context-menu-BbqLeYFX.js +979 -0
- package/dist/context-menu-DfAXjmc8.cjs +1 -0
- package/dist/controls-C4n5ycp4.cjs +1 -0
- package/dist/controls-Com-zYCq.js +234 -0
- package/dist/core.cjs +1 -82
- package/dist/core.d.ts +8 -4
- package/dist/core.js +74 -74
- package/dist/iconBase-Cn2BsTrq.cjs +1 -0
- package/dist/iconBase-DHfFLkem.js +124 -0
- package/dist/index-Cu1kFTGh.cjs +63 -0
- package/dist/index-D1NbGHAC.js +9318 -0
- package/dist/jsx-runtime-BYECrxsp.cjs +30 -0
- package/dist/jsx-runtime-DGlMoOmv.js +630 -0
- package/dist/plugin-BOEoR5jk.js +44 -0
- package/dist/plugin-COMQcYlW.cjs +1 -0
- package/dist/plugin-Dw854zFv.js +107 -0
- package/dist/plugin-I9XxF65G.cjs +1 -0
- package/dist/render.cjs +2 -208
- package/dist/render.js +125 -171
- package/dist/runtime.cjs +1 -26
- package/dist/runtime.js +16 -16
- package/dist/style.css +2 -1529
- package/dist/tailwind.cjs +1 -78
- package/dist/tailwind.js +19 -21
- package/dist/ui.cjs +1 -392
- package/dist/ui.js +257 -268
- package/dist/web-blocks.cjs +3 -1241
- package/dist/web-blocks.js +555 -764
- package/package.json +1 -1
- package/dist/CodeEditor-1LboGb1I.cjs +0 -91
- package/dist/CodeEditor-BKgZeXwz.js +0 -91
- package/dist/STRINGS-3Sn_NeX1.cjs +0 -9
- package/dist/STRINGS-DdpfVlsV.js +0 -10
- package/dist/Topbar-B8IS6y4H.js +0 -135
- package/dist/Topbar-DXC7DFU1.cjs +0 -135
- package/dist/UnsplashImages-CjJ5szAy.cjs +0 -215
- package/dist/UnsplashImages-Ck9qpKR0.js +0 -215
- package/dist/UploadImages-DW1mj4MB.cjs +0 -117
- package/dist/UploadImages-DgAMZ8GR.js +0 -117
- package/dist/context-menu-BLbuduri.cjs +0 -1073
- package/dist/context-menu-BgtRnByf.js +0 -1042
- package/dist/controls-8EZmm0Ns.js +0 -234
- package/dist/controls-DaW52RjX.cjs +0 -233
- package/dist/iconBase-BSrIcOaG.cjs +0 -146
- package/dist/iconBase-CWgVxu0A.js +0 -147
- package/dist/index-Bjw2sUN2.cjs +0 -12139
- package/dist/index-D8_rAW8B.js +0 -12124
- package/dist/jsx-runtime-B6vEU3CM.cjs +0 -925
- package/dist/jsx-runtime-ClFauRgV.js +0 -926
- package/dist/plugin-BYwesM58.cjs +0 -54
- package/dist/plugin-BiDLHDo3.cjs +0 -114
- package/dist/plugin-BukD7GJR.js +0 -115
- package/dist/plugin-tVAEvXiS.js +0 -55
package/dist/web-blocks.js
CHANGED
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
import { registerChaiBlock } from "@chaibuilder/runtime";
|
|
2
|
-
import { j as
|
|
3
|
-
import * as
|
|
4
|
-
import { T, y, x, g, q
|
|
5
|
-
import { c as
|
|
6
|
-
import { ButtonIcon, CodeIcon, HeadingIcon, TextIcon, CursorTextIcon, Link1Icon, ImageIcon, RowsIcon, ColumnsIcon, SketchLogoIcon, VideoIcon, DividerHorizontalIcon, MoonIcon, SpaceBetweenVerticallyIcon, GroupIcon, InputIcon, RadiobuttonIcon, DropdownMenuIcon, CheckboxIcon } from "@radix-ui/react-icons";
|
|
7
|
-
import { isNull, isEmpty, get, pick, omit, map } from "lodash-es";
|
|
8
|
-
import { GlobeIcon } from "lucide-react";
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (!children) {
|
|
17
|
-
nestedChildren = /* @__PURE__ */ jsxRuntimeExports.jsx(EmptySlot, { inBuilder });
|
|
18
|
-
}
|
|
19
|
-
let cssStyles = {};
|
|
20
|
-
if (backgroundImage) {
|
|
21
|
-
cssStyles = { backgroundImage: `url(${backgroundImage})` };
|
|
22
|
-
}
|
|
23
|
-
return React.createElement(tag, { ...blockProps, ...styles, style: cssStyles }, nestedChildren);
|
|
24
|
-
};
|
|
25
|
-
const Config$s = {
|
|
1
|
+
import { registerChaiBlock as u } from "@chaibuilder/runtime";
|
|
2
|
+
import { j as s } from "./jsx-runtime-DGlMoOmv.js";
|
|
3
|
+
import * as b from "react";
|
|
4
|
+
import { T as f, y as v, x as j, g as p, q as $, s as L, l as T, f as B, m as S, w as D, c as y, b as F, S as G } from "./controls-Com-zYCq.js";
|
|
5
|
+
import { c as C, G as V, g as I } from "./iconBase-DHfFLkem.js";
|
|
6
|
+
import { ButtonIcon as H, CodeIcon as U, HeadingIcon as O, TextIcon as W, CursorTextIcon as X, Link1Icon as Y, ImageIcon as R, RowsIcon as Z, ColumnsIcon as J, SketchLogoIcon as K, VideoIcon as Q, DividerHorizontalIcon as ee, MoonIcon as te, SpaceBetweenVerticallyIcon as z, GroupIcon as le, InputIcon as A, RadiobuttonIcon as oe, DropdownMenuIcon as ae, CheckboxIcon as se } from "@radix-ui/react-icons";
|
|
7
|
+
import { isNull as re, isEmpty as k, get as w, pick as ne, omit as ie, map as M } from "lodash-es";
|
|
8
|
+
import { GlobeIcon as ce } from "lucide-react";
|
|
9
|
+
const _ = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ s.jsx("div", { className: C("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", 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 dark:outline-gray-700" }) }) }) : null, de = (e) => {
|
|
10
|
+
const { blockProps: l, inBuilder: t, backgroundImage: o, children: a, tag: r = "div", styles: n } = e;
|
|
11
|
+
let i = a;
|
|
12
|
+
a || (i = /* @__PURE__ */ s.jsx(_, { inBuilder: t }));
|
|
13
|
+
let c = {};
|
|
14
|
+
return o && (c = { backgroundImage: `url(${o})` }), b.createElement(r, { ...l, ...n, style: c }, i);
|
|
15
|
+
}, ue = {
|
|
26
16
|
type: "Box",
|
|
27
17
|
label: "web_blocks.box",
|
|
28
18
|
category: "core",
|
|
29
19
|
group: "basic",
|
|
30
20
|
props: {
|
|
31
|
-
styles:
|
|
32
|
-
tag:
|
|
21
|
+
styles: f({ default: "" }),
|
|
22
|
+
tag: v({
|
|
33
23
|
title: "web_blocks.tag",
|
|
34
24
|
default: "div",
|
|
35
25
|
options: [
|
|
@@ -52,46 +42,42 @@ const Config$s = {
|
|
|
52
42
|
{ value: "mark", title: "web_blocks.mark" }
|
|
53
43
|
]
|
|
54
44
|
}),
|
|
55
|
-
backgroundImage:
|
|
45
|
+
backgroundImage: j({ title: "web_blocks.background_image" })
|
|
56
46
|
},
|
|
57
|
-
canAcceptBlock: () =>
|
|
58
|
-
}
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const child = children || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
63
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { "data-ai-key": "content", children: content }),
|
|
64
|
-
_icon && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47
|
+
canAcceptBlock: () => !0
|
|
48
|
+
}, pe = (e) => {
|
|
49
|
+
const { blockProps: l, iconSize: t, icon: o, content: a, iconPos: r, styles: n, children: i } = e, c = o, d = i || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
50
|
+
/* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", children: a }),
|
|
51
|
+
c && /* @__PURE__ */ s.jsx(
|
|
65
52
|
"div",
|
|
66
53
|
{
|
|
67
|
-
style: { width:
|
|
68
|
-
className:
|
|
69
|
-
dangerouslySetInnerHTML: { __html:
|
|
54
|
+
style: { width: t + "px" },
|
|
55
|
+
className: r + " " + (r === "order-first" ? "mr-2" : "ml-2") || "",
|
|
56
|
+
dangerouslySetInnerHTML: { __html: c }
|
|
70
57
|
}
|
|
71
58
|
)
|
|
72
59
|
] });
|
|
73
|
-
return
|
|
60
|
+
return b.createElement(
|
|
74
61
|
"button",
|
|
75
62
|
{
|
|
76
|
-
...
|
|
77
|
-
...
|
|
63
|
+
...l,
|
|
64
|
+
...n,
|
|
78
65
|
type: "button"
|
|
79
66
|
},
|
|
80
|
-
|
|
67
|
+
d
|
|
81
68
|
);
|
|
82
|
-
}
|
|
83
|
-
const Config$r = {
|
|
69
|
+
}, be = {
|
|
84
70
|
type: "Button",
|
|
85
71
|
label: "web_blocks.button",
|
|
86
72
|
category: "core",
|
|
87
|
-
icon:
|
|
73
|
+
icon: H,
|
|
88
74
|
group: "basic",
|
|
89
75
|
props: {
|
|
90
|
-
content:
|
|
91
|
-
styles:
|
|
92
|
-
icon:
|
|
93
|
-
iconSize:
|
|
94
|
-
iconPos:
|
|
76
|
+
content: p({ title: "web_blocks.label", default: "Button", ai: !0, i18n: !0 }),
|
|
77
|
+
styles: f({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
|
|
78
|
+
icon: $({ title: "web_blocks.icon", default: "" }),
|
|
79
|
+
iconSize: L({ title: "web_blocks.icon_size", default: 24 }),
|
|
80
|
+
iconPos: v({
|
|
95
81
|
title: "web_blocks.icon_position",
|
|
96
82
|
default: "order-last",
|
|
97
83
|
options: [
|
|
@@ -100,78 +86,68 @@ const Config$r = {
|
|
|
100
86
|
]
|
|
101
87
|
})
|
|
102
88
|
}
|
|
103
|
-
}
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
dangerouslySetInnerHTML: { __html: htmlCode.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
89
|
+
}, fe = (e) => {
|
|
90
|
+
const { blockProps: l, styles: t, htmlCode: o, inBuilder: a } = e;
|
|
91
|
+
return a ? /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
|
|
92
|
+
a ? /* @__PURE__ */ s.jsx("div", { ...l, ...t, className: "absolute z-20 h-full w-full" }) : null,
|
|
93
|
+
b.createElement("div", {
|
|
94
|
+
...t,
|
|
95
|
+
dangerouslySetInnerHTML: { __html: o.replace(/<script.*?>.*?<\/script>/g, "") }
|
|
111
96
|
})
|
|
112
|
-
] }) :
|
|
113
|
-
...
|
|
114
|
-
...
|
|
115
|
-
dangerouslySetInnerHTML: { __html:
|
|
97
|
+
] }) : b.createElement("div", {
|
|
98
|
+
...l,
|
|
99
|
+
...t,
|
|
100
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
116
101
|
});
|
|
117
|
-
}
|
|
118
|
-
const Config$q = {
|
|
102
|
+
}, me = {
|
|
119
103
|
type: "CustomHTML",
|
|
120
104
|
label: "web_blocks.custom_html",
|
|
121
105
|
category: "core",
|
|
122
|
-
icon:
|
|
106
|
+
icon: U,
|
|
123
107
|
group: "advanced",
|
|
124
108
|
props: {
|
|
125
|
-
styles:
|
|
126
|
-
htmlCode:
|
|
109
|
+
styles: f({ default: "" }),
|
|
110
|
+
htmlCode: T({
|
|
127
111
|
title: "web_blocks.html_code",
|
|
128
112
|
default: "<div><p>Enter your HTML code here...</p></div>",
|
|
129
113
|
placeholder: "web_blocks.placeholder"
|
|
130
114
|
})
|
|
131
115
|
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (backgroundImage) {
|
|
138
|
-
cssStyles = { backgroundImage: `url(${backgroundImage})` };
|
|
139
|
-
}
|
|
140
|
-
return React.createElement("div", { ...blockProps, ...styles, style: cssStyles });
|
|
116
|
+
}, he = b.memo(
|
|
117
|
+
(e) => {
|
|
118
|
+
const { blockProps: l, styles: t, backgroundImage: o } = e;
|
|
119
|
+
let a = {};
|
|
120
|
+
return o && (a = { backgroundImage: `url(${o})` }), b.createElement("div", { ...l, ...t, style: a });
|
|
141
121
|
}
|
|
142
|
-
)
|
|
143
|
-
const Config$p = {
|
|
122
|
+
), ye = {
|
|
144
123
|
type: "EmptyBox",
|
|
145
124
|
label: "web_blocks.empty_box",
|
|
146
125
|
category: "core",
|
|
147
126
|
group: "basic",
|
|
148
127
|
props: {
|
|
149
|
-
styles:
|
|
150
|
-
backgroundImage:
|
|
128
|
+
styles: f({ default: "" }),
|
|
129
|
+
backgroundImage: j({ title: "Background Image" })
|
|
151
130
|
}
|
|
152
|
-
}
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
...styles,
|
|
158
|
-
...blockProps,
|
|
131
|
+
}, ge = (e) => {
|
|
132
|
+
const { blockProps: l, styles: t, content: o, level: a = "h1", children: r = null } = e;
|
|
133
|
+
return r ? b.createElement(a, { ...t, ...l }, r) : b.createElement(a, {
|
|
134
|
+
...t,
|
|
135
|
+
...l,
|
|
159
136
|
"data-ai-key": "content",
|
|
160
137
|
"data-ai-type": "html",
|
|
161
|
-
dangerouslySetInnerHTML: { __html:
|
|
138
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
162
139
|
});
|
|
163
|
-
}
|
|
164
|
-
const Config$o = {
|
|
140
|
+
}, ke = {
|
|
165
141
|
type: "Heading",
|
|
166
142
|
label: "web_blocks.heading",
|
|
167
143
|
category: "core",
|
|
168
|
-
icon:
|
|
144
|
+
icon: O,
|
|
169
145
|
group: "typography",
|
|
170
146
|
props: {
|
|
171
|
-
level:
|
|
147
|
+
level: v({
|
|
172
148
|
title: "web_blocks.level",
|
|
173
149
|
default: "h2",
|
|
174
|
-
binding:
|
|
150
|
+
binding: !1,
|
|
175
151
|
options: [
|
|
176
152
|
{ value: "h1", title: "h1" },
|
|
177
153
|
{ value: "h2", title: "h2" },
|
|
@@ -181,196 +157,152 @@ const Config$o = {
|
|
|
181
157
|
{ value: "h6", title: "h6" }
|
|
182
158
|
]
|
|
183
159
|
}),
|
|
184
|
-
styles:
|
|
185
|
-
content:
|
|
160
|
+
styles: f({ default: "text-3xl" }),
|
|
161
|
+
content: B({ title: "Content", default: "Heading goes here", ai: !0, i18n: !0 })
|
|
186
162
|
},
|
|
187
|
-
canAcceptBlock: (
|
|
188
|
-
}
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
...styles,
|
|
194
|
-
...blockProps,
|
|
163
|
+
canAcceptBlock: (e) => e === "Span" || e === "Text"
|
|
164
|
+
}, xe = (e) => {
|
|
165
|
+
const { blockProps: l, styles: t, content: o } = e;
|
|
166
|
+
return re(e.children) ? b.createElement("p", {
|
|
167
|
+
...t,
|
|
168
|
+
...l,
|
|
195
169
|
"data-ai-key": "content",
|
|
196
170
|
"data-ai-type": "html",
|
|
197
|
-
dangerouslySetInnerHTML: { __html:
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
const Config$n = {
|
|
171
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
172
|
+
}) : b.createElement("p", { ...t, ...l }, e.children);
|
|
173
|
+
}, we = {
|
|
201
174
|
type: "Paragraph",
|
|
202
175
|
label: "Paragraph",
|
|
203
176
|
category: "core",
|
|
204
|
-
icon:
|
|
177
|
+
icon: W,
|
|
205
178
|
group: "typography",
|
|
206
179
|
props: {
|
|
207
|
-
styles:
|
|
208
|
-
content:
|
|
180
|
+
styles: f({ default: "" }),
|
|
181
|
+
content: B({
|
|
209
182
|
title: "Content",
|
|
210
183
|
default: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.
|
|
211
184
|
Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus
|
|
212
185
|
nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.`,
|
|
213
|
-
ai:
|
|
214
|
-
i18n:
|
|
186
|
+
ai: !0,
|
|
187
|
+
i18n: !0
|
|
215
188
|
})
|
|
216
189
|
},
|
|
217
|
-
canAcceptBlock: (
|
|
218
|
-
}
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
...styles,
|
|
224
|
-
...blockProps,
|
|
190
|
+
canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
|
|
191
|
+
}, ve = (e) => {
|
|
192
|
+
const { blockProps: l, styles: t, content: o, children: a = null, tag: r } = e;
|
|
193
|
+
return a ? b.createElement("span", { ...t, ...l }, a) : b.createElement(r || "span", {
|
|
194
|
+
...t,
|
|
195
|
+
...l,
|
|
225
196
|
"data-ai-key": "content",
|
|
226
|
-
dangerouslySetInnerHTML: { __html:
|
|
197
|
+
dangerouslySetInnerHTML: { __html: o || "" }
|
|
227
198
|
});
|
|
228
|
-
}
|
|
229
|
-
const Config$m = {
|
|
199
|
+
}, _e = {
|
|
230
200
|
type: "Span",
|
|
231
201
|
label: "Span",
|
|
232
202
|
category: "core",
|
|
233
203
|
group: "typography",
|
|
234
204
|
props: {
|
|
235
|
-
styles:
|
|
236
|
-
content:
|
|
205
|
+
styles: f({ default: "" }),
|
|
206
|
+
content: B({ title: "Content", default: "", ai: !0, i18n: !0 })
|
|
237
207
|
},
|
|
238
|
-
canAcceptBlock: () =>
|
|
239
|
-
}
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
208
|
+
canAcceptBlock: () => !0
|
|
209
|
+
}, Ie = (e) => {
|
|
210
|
+
const { blockProps: l, content: t, styles: o } = e;
|
|
211
|
+
return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx(
|
|
243
212
|
"div",
|
|
244
213
|
{
|
|
245
214
|
"data-ai-key": "content",
|
|
246
215
|
"data-ai-type": "richtext",
|
|
247
|
-
...
|
|
248
|
-
...
|
|
249
|
-
dangerouslySetInnerHTML: { __html:
|
|
216
|
+
...l,
|
|
217
|
+
...o,
|
|
218
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
250
219
|
}
|
|
251
220
|
) });
|
|
252
|
-
}
|
|
253
|
-
const Config$l = {
|
|
221
|
+
}, Le = {
|
|
254
222
|
type: "RichText",
|
|
255
223
|
label: "Rich Text",
|
|
256
224
|
category: "core",
|
|
257
|
-
icon:
|
|
225
|
+
icon: X,
|
|
258
226
|
group: "typography",
|
|
259
227
|
props: {
|
|
260
|
-
styles:
|
|
261
|
-
content:
|
|
228
|
+
styles: f({ default: "" }),
|
|
229
|
+
content: S({
|
|
262
230
|
title: "Content",
|
|
263
|
-
ai:
|
|
264
|
-
i18n:
|
|
231
|
+
ai: !0,
|
|
232
|
+
i18n: !0,
|
|
265
233
|
default: "<p>This is a rich text block. You can add text, and other content here.</p>"
|
|
266
234
|
})
|
|
267
235
|
}
|
|
268
|
-
}
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
{
|
|
282
|
-
...blockProps,
|
|
283
|
-
...styles,
|
|
284
|
-
style: emptyStyles,
|
|
285
|
-
"data-ai-key": "content"
|
|
286
|
-
},
|
|
287
|
-
content
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
if (children) {
|
|
292
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: (link == null ? void 0 : link.href) || "#/", target: link == null ? void 0 : link.target, ...blockProps, ...styles, children });
|
|
293
|
-
}
|
|
294
|
-
return React.createElement(
|
|
236
|
+
}, Be = (e) => {
|
|
237
|
+
const { blockProps: l, link: t, children: o, styles: a, inBuilder: r, content: n } = e;
|
|
238
|
+
let i = {};
|
|
239
|
+
return !o && k(n) && (i = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), r ? o ? /* @__PURE__ */ s.jsx("span", { ...l, style: i, ...a, children: o }) : b.createElement(
|
|
240
|
+
"span",
|
|
241
|
+
{
|
|
242
|
+
...l,
|
|
243
|
+
...a,
|
|
244
|
+
style: i,
|
|
245
|
+
"data-ai-key": "content"
|
|
246
|
+
},
|
|
247
|
+
n
|
|
248
|
+
) : o ? /* @__PURE__ */ s.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...l, ...a, children: o }) : b.createElement(
|
|
295
249
|
"a",
|
|
296
250
|
{
|
|
297
|
-
...
|
|
298
|
-
...
|
|
251
|
+
...l,
|
|
252
|
+
...a,
|
|
299
253
|
"data-ai-key": "content",
|
|
300
|
-
href: (
|
|
301
|
-
target: (
|
|
254
|
+
href: (t == null ? void 0 : t.href) || "#",
|
|
255
|
+
target: (t == null ? void 0 : t.target) || "_self"
|
|
302
256
|
},
|
|
303
|
-
|
|
257
|
+
n
|
|
304
258
|
);
|
|
305
|
-
}
|
|
306
|
-
const Config$k = {
|
|
259
|
+
}, Ce = {
|
|
307
260
|
type: "Link",
|
|
308
261
|
label: "Link",
|
|
309
262
|
category: "core",
|
|
310
|
-
icon:
|
|
263
|
+
icon: Y,
|
|
311
264
|
group: "basic",
|
|
312
265
|
props: {
|
|
313
|
-
styles:
|
|
314
|
-
content:
|
|
315
|
-
link:
|
|
266
|
+
styles: f({ default: "" }),
|
|
267
|
+
content: p({ title: "Content", default: "", ai: !0, i18n: !0 }),
|
|
268
|
+
link: D({
|
|
316
269
|
title: "Link",
|
|
317
270
|
default: { type: "collection", target: "_self", href: "" }
|
|
318
271
|
})
|
|
319
272
|
},
|
|
320
|
-
canAcceptBlock: (
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
...forcedStyles,
|
|
342
|
-
dangerouslySetInnerHTML: { __html: content }
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
const lightBoxAttrs = {};
|
|
347
|
-
lightBoxAttrs["data-vbtype"] = hrefType;
|
|
348
|
-
if (autoplay) lightBoxAttrs["data-autoplay"] = "true";
|
|
349
|
-
if (maxWidth) lightBoxAttrs["data-maxwidth"] = maxWidth + "px";
|
|
350
|
-
if (backdropColor) lightBoxAttrs["data-overlay"] = backdropColor;
|
|
351
|
-
if (galleryName) lightBoxAttrs["data-gall"] = galleryName;
|
|
352
|
-
if (children) {
|
|
353
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { ...lightBoxAttrs, href: href || "#/", ...blockProps, ...forcedStyles, children });
|
|
354
|
-
}
|
|
355
|
-
return React.createElement("a", {
|
|
356
|
-
...blockProps,
|
|
357
|
-
...forcedStyles,
|
|
358
|
-
...lightBoxAttrs,
|
|
359
|
-
href: href || "#",
|
|
360
|
-
dangerouslySetInnerHTML: { __html: content }
|
|
273
|
+
canAcceptBlock: (e) => e !== "Link"
|
|
274
|
+
}, q = (e, ...l) => ({
|
|
275
|
+
...e,
|
|
276
|
+
className: C(e.className, ...l)
|
|
277
|
+
}), je = (e) => {
|
|
278
|
+
const { blockProps: l, children: t, styles: o, inBuilder: a, content: r, href: n } = e, { hrefType: i, autoplay: c, maxWidth: d, backdropColor: h, galleryName: m } = e, g = q(o, "cb-lightbox");
|
|
279
|
+
if (!t && k(o == null ? void 0 : o.className) && k(r))
|
|
280
|
+
return /* @__PURE__ */ s.jsx(_, { inBuilder: a });
|
|
281
|
+
if (a)
|
|
282
|
+
return t ? /* @__PURE__ */ s.jsx("span", { ...l, ...g, children: t }) : b.createElement("span", {
|
|
283
|
+
...l,
|
|
284
|
+
...g,
|
|
285
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
286
|
+
});
|
|
287
|
+
const x = {};
|
|
288
|
+
return x["data-vbtype"] = i, c && (x["data-autoplay"] = "true"), d && (x["data-maxwidth"] = d + "px"), h && (x["data-overlay"] = h), m && (x["data-gall"] = m), t ? /* @__PURE__ */ s.jsx("a", { ...x, href: n || "#/", ...l, ...g, children: t }) : b.createElement("a", {
|
|
289
|
+
...l,
|
|
290
|
+
...g,
|
|
291
|
+
...x,
|
|
292
|
+
href: n || "#",
|
|
293
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
361
294
|
});
|
|
362
|
-
}
|
|
363
|
-
const Config$j = {
|
|
295
|
+
}, Se = {
|
|
364
296
|
type: "LightBoxLink",
|
|
365
297
|
label: "Lightbox Link",
|
|
366
298
|
category: "core",
|
|
367
|
-
icon:
|
|
299
|
+
icon: R,
|
|
368
300
|
group: "basic",
|
|
369
301
|
props: {
|
|
370
|
-
styles:
|
|
371
|
-
content:
|
|
372
|
-
href:
|
|
373
|
-
hrefType:
|
|
302
|
+
styles: f({ default: "" }),
|
|
303
|
+
content: p({ title: "Content", default: "Link text or drop blocks inside", ai: !0, i18n: !0 }),
|
|
304
|
+
href: p({ title: "Href", default: "" }),
|
|
305
|
+
hrefType: v({
|
|
374
306
|
title: "Type",
|
|
375
307
|
default: "video",
|
|
376
308
|
options: [
|
|
@@ -380,34 +312,28 @@ const Config$j = {
|
|
|
380
312
|
{ value: "ajax", title: "Ajax" }
|
|
381
313
|
]
|
|
382
314
|
}),
|
|
383
|
-
autoplay:
|
|
384
|
-
maxWidth:
|
|
385
|
-
backdropColor:
|
|
386
|
-
galleryName:
|
|
315
|
+
autoplay: y({ title: "Autoplay", default: !1 }),
|
|
316
|
+
maxWidth: L({ title: "Max Width", default: "" }),
|
|
317
|
+
backdropColor: p({ title: "Backdrop Color", default: "" }),
|
|
318
|
+
galleryName: p({ title: "Gallery Name", default: "" })
|
|
387
319
|
},
|
|
388
|
-
canAcceptBlock: (
|
|
389
|
-
}
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}
|
|
396
|
-
return React.createElement(
|
|
397
|
-
tag ? tag : listType === "list-decimal" ? "ol" : "ul",
|
|
398
|
-
{ ...blockProps, ...styles, className },
|
|
399
|
-
children
|
|
320
|
+
canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
|
|
321
|
+
}, Me = (e) => {
|
|
322
|
+
const { blockProps: l, children: t, listType: o, styles: a, tag: r, inBuilder: n } = e, i = C(w(a, "className", ""), o);
|
|
323
|
+
return !t && k(a == null ? void 0 : a.className) ? /* @__PURE__ */ s.jsx(_, { inBuilder: n }) : b.createElement(
|
|
324
|
+
r || (o === "list-decimal" ? "ol" : "ul"),
|
|
325
|
+
{ ...l, ...a, className: i },
|
|
326
|
+
t
|
|
400
327
|
);
|
|
401
|
-
}
|
|
402
|
-
const Config$i = {
|
|
328
|
+
}, $e = {
|
|
403
329
|
type: "List",
|
|
404
330
|
label: "web_blocks.list",
|
|
405
|
-
icon:
|
|
331
|
+
icon: Z,
|
|
406
332
|
category: "core",
|
|
407
333
|
group: "basic",
|
|
408
334
|
props: {
|
|
409
|
-
styles:
|
|
410
|
-
listType:
|
|
335
|
+
styles: f({ default: "" }),
|
|
336
|
+
listType: v({
|
|
411
337
|
title: "web_blocks.list_type",
|
|
412
338
|
default: "list-none",
|
|
413
339
|
options: [
|
|
@@ -417,7 +343,7 @@ const Config$i = {
|
|
|
417
343
|
]
|
|
418
344
|
})
|
|
419
345
|
},
|
|
420
|
-
canAcceptBlock: (
|
|
346
|
+
canAcceptBlock: (e) => e === "ListItem",
|
|
421
347
|
blocks: [
|
|
422
348
|
{ _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
|
|
423
349
|
{
|
|
@@ -442,235 +368,186 @@ const Config$i = {
|
|
|
442
368
|
content: "Item 3"
|
|
443
369
|
}
|
|
444
370
|
]
|
|
445
|
-
}
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
});
|
|
455
|
-
}
|
|
456
|
-
return React.createElement(tag || "li", { ...styles, ...blockProps }, children);
|
|
457
|
-
};
|
|
458
|
-
const Config$h = {
|
|
371
|
+
}, Ee = (e) => {
|
|
372
|
+
const { blockProps: l, content: t, styles: o, children: a, tag: r } = e;
|
|
373
|
+
return a ? b.createElement(r || "li", { ...o, ...l }, a) : b.createElement(r || "li", {
|
|
374
|
+
...o,
|
|
375
|
+
...l,
|
|
376
|
+
"data-ai-key": "content",
|
|
377
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
378
|
+
});
|
|
379
|
+
}, Ne = {
|
|
459
380
|
type: "ListItem",
|
|
460
381
|
label: "List Item",
|
|
461
|
-
icon:
|
|
382
|
+
icon: J,
|
|
462
383
|
category: "core",
|
|
463
384
|
group: "basic",
|
|
464
385
|
props: {
|
|
465
|
-
styles:
|
|
466
|
-
content:
|
|
386
|
+
styles: f({ default: "" }),
|
|
387
|
+
content: B({ title: "Content", default: "List item", ai: !0, i18n: !0 })
|
|
467
388
|
},
|
|
468
|
-
canAcceptBlock: (
|
|
469
|
-
canBeNested: (
|
|
470
|
-
}
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
...blockProps,
|
|
480
|
-
...iStyles,
|
|
481
|
-
dangerouslySetInnerHTML: { __html: svg }
|
|
389
|
+
canAcceptBlock: (e) => e !== "ListItem",
|
|
390
|
+
canBeNested: (e) => e === "List"
|
|
391
|
+
}, Pe = (e) => {
|
|
392
|
+
const { blockProps: l, icon: t, styles: o, width: a, inBuilder: r, height: n } = e, i = q(o, C(a ? `w-[${a}px]` : "", n ? `h-[${n}px]` : ""));
|
|
393
|
+
if (k(t))
|
|
394
|
+
return /* @__PURE__ */ s.jsx(_, { inBuilder: r, className: "h-8 w-14" });
|
|
395
|
+
const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
|
|
396
|
+
return b.createElement("span", {
|
|
397
|
+
...l,
|
|
398
|
+
...i,
|
|
399
|
+
dangerouslySetInnerHTML: { __html: c }
|
|
482
400
|
});
|
|
483
|
-
}
|
|
484
|
-
const Config$g = {
|
|
401
|
+
}, Te = {
|
|
485
402
|
type: "Icon",
|
|
486
403
|
label: "web_blocks.icon",
|
|
487
404
|
category: "core",
|
|
488
|
-
icon:
|
|
405
|
+
icon: K,
|
|
489
406
|
group: "media",
|
|
490
407
|
props: {
|
|
491
|
-
styles:
|
|
492
|
-
icon:
|
|
408
|
+
styles: f({ default: "text-black" }),
|
|
409
|
+
icon: $({
|
|
493
410
|
title: "web_blocks.icon",
|
|
494
|
-
default:
|
|
411
|
+
default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'
|
|
495
412
|
}),
|
|
496
|
-
width:
|
|
497
|
-
height:
|
|
413
|
+
width: L({ title: "web_blocks.width", default: "" }),
|
|
414
|
+
height: L({ title: "web_blocks.height", default: "" })
|
|
498
415
|
}
|
|
499
|
-
}
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
height,
|
|
510
|
-
width
|
|
416
|
+
}, He = (e) => {
|
|
417
|
+
const { blockProps: l, image: t, styles: o, alt: a, height: r, width: n, lazyLoading: i } = e;
|
|
418
|
+
return k(t) ? /* @__PURE__ */ s.jsx(_, { className: "h-36" }) : b.createElement("img", {
|
|
419
|
+
...l,
|
|
420
|
+
...o,
|
|
421
|
+
src: t,
|
|
422
|
+
alt: a,
|
|
423
|
+
loading: i ? "lazy" : "eager",
|
|
424
|
+
height: r,
|
|
425
|
+
width: n
|
|
511
426
|
});
|
|
512
|
-
}
|
|
513
|
-
const Config$f = {
|
|
427
|
+
}, Re = {
|
|
514
428
|
type: "Image",
|
|
515
429
|
label: "Image",
|
|
516
430
|
category: "core",
|
|
517
|
-
icon:
|
|
431
|
+
icon: R,
|
|
518
432
|
group: "media",
|
|
519
433
|
props: {
|
|
520
|
-
styles:
|
|
521
|
-
image:
|
|
434
|
+
styles: f({ default: "" }),
|
|
435
|
+
image: j({
|
|
522
436
|
title: "Image",
|
|
523
437
|
default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
|
|
524
438
|
}),
|
|
525
|
-
alt:
|
|
526
|
-
width:
|
|
527
|
-
height:
|
|
528
|
-
lazyLoading:
|
|
439
|
+
alt: p({ title: "Alt text", default: "", ai: !0, i18n: !0 }),
|
|
440
|
+
width: p({ title: "Width", default: "" }),
|
|
441
|
+
height: p({ title: "Height", default: "" }),
|
|
442
|
+
lazyLoading: y({ title: "Lazy Load", default: !0 })
|
|
529
443
|
}
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
const getEmbedURL = (url) => {
|
|
535
|
-
if (YOUTUBE_REGEX.test(url)) {
|
|
536
|
-
const match = url.match(YOUTUBE_REGEX);
|
|
537
|
-
if (match) {
|
|
538
|
-
const videoId = match[4];
|
|
539
|
-
return `https://www.youtube.com/embed/${videoId}`;
|
|
540
|
-
}
|
|
541
|
-
return url;
|
|
444
|
+
}, E = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, N = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, ze = (e) => {
|
|
445
|
+
if (E.test(e)) {
|
|
446
|
+
const l = e.match(E);
|
|
447
|
+
return l ? `https://www.youtube.com/embed/${l[4]}` : e;
|
|
542
448
|
}
|
|
543
|
-
if (
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
const videoId = match[3];
|
|
547
|
-
return `https://player.vimeo.com/video/${videoId}`;
|
|
548
|
-
}
|
|
549
|
-
return url;
|
|
449
|
+
if (N.test(e)) {
|
|
450
|
+
const l = e.match(N);
|
|
451
|
+
return l ? `https://player.vimeo.com/video/${l[3]}` : e;
|
|
550
452
|
}
|
|
551
|
-
if (
|
|
552
|
-
const
|
|
553
|
-
|
|
554
|
-
const videoId = match[4];
|
|
555
|
-
return `https://www.dailymotion.com/embed/video/${videoId}`;
|
|
556
|
-
}
|
|
557
|
-
return url;
|
|
453
|
+
if (P.test(e)) {
|
|
454
|
+
const l = e.match(P);
|
|
455
|
+
return l ? `https://www.dailymotion.com/embed/video/${l[4]}` : e;
|
|
558
456
|
}
|
|
559
457
|
return null;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
let embedURL = getEmbedURL(url);
|
|
570
|
-
let videoElement = null;
|
|
571
|
-
if (embedURL) {
|
|
572
|
-
if (!isEmpty(embedURL)) {
|
|
573
|
-
const iframeControls = [];
|
|
574
|
-
iframeControls.push(`autoplay=${autoplay ? 1 : 0}`);
|
|
575
|
-
iframeControls.push(`controls=${controls ? 1 : 0}`);
|
|
576
|
-
iframeControls.push(`mute=${muted ? 1 : 0}&muted=${muted ? 1 : 0}`);
|
|
577
|
-
iframeControls.push(`loop=${loop ? 1 : 0}`);
|
|
578
|
-
embedURL = `${embedURL}?${iframeControls.join("&")}`;
|
|
458
|
+
}, Ae = b.memo(
|
|
459
|
+
(e) => {
|
|
460
|
+
const { blockProps: l, inBuilder: t, styles: o, url: a, controls: r } = e, n = w(r, "autoPlay", !1), i = w(r, "controls", !1), c = n || w(r, "muted", !0), d = w(r, "loop", !1);
|
|
461
|
+
if (k(a)) return /* @__PURE__ */ s.jsx(_, { inBuilder: t, className: "h-36" });
|
|
462
|
+
let h = ze(a), m = null;
|
|
463
|
+
if (h) {
|
|
464
|
+
if (!k(h)) {
|
|
465
|
+
const g = [];
|
|
466
|
+
g.push(`autoplay=${n ? 1 : 0}`), g.push(`controls=${r ? 1 : 0}`), g.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), g.push(`loop=${d ? 1 : 0}`), h = `${h}?${g.join("&")}`;
|
|
579
467
|
}
|
|
580
|
-
|
|
581
|
-
...
|
|
468
|
+
m = b.createElement("iframe", {
|
|
469
|
+
...l,
|
|
582
470
|
className: "absolute inset-0 w-full h-full",
|
|
583
|
-
src:
|
|
584
|
-
allow:
|
|
585
|
-
allowFullScreen:
|
|
471
|
+
src: h,
|
|
472
|
+
allow: t ? "" : "autoplay *; fullscreen *",
|
|
473
|
+
allowFullScreen: !0,
|
|
586
474
|
frameBorder: 0
|
|
587
475
|
});
|
|
588
|
-
} else
|
|
589
|
-
|
|
590
|
-
...
|
|
476
|
+
} else
|
|
477
|
+
m = b.createElement("video", {
|
|
478
|
+
...l,
|
|
591
479
|
className: "absolute inset-0 w-full h-full",
|
|
592
|
-
src:
|
|
593
|
-
controls:
|
|
594
|
-
muted,
|
|
595
|
-
autoPlay:
|
|
596
|
-
loop
|
|
480
|
+
src: a,
|
|
481
|
+
controls: i,
|
|
482
|
+
muted: c,
|
|
483
|
+
autoPlay: t ? !1 : n,
|
|
484
|
+
loop: d
|
|
597
485
|
});
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
videoElement
|
|
486
|
+
return /* @__PURE__ */ s.jsx("div", { ...ne(o, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
487
|
+
t ? /* @__PURE__ */ s.jsx("div", { ...l, ...ie(o, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
|
|
488
|
+
m
|
|
602
489
|
] }) });
|
|
603
490
|
}
|
|
604
|
-
)
|
|
605
|
-
const Config$e = {
|
|
491
|
+
), qe = {
|
|
606
492
|
type: "Video",
|
|
607
493
|
label: "Video",
|
|
608
494
|
category: "core",
|
|
609
|
-
icon:
|
|
495
|
+
icon: Q,
|
|
610
496
|
group: "media",
|
|
611
497
|
props: {
|
|
612
|
-
styles:
|
|
613
|
-
url:
|
|
498
|
+
styles: f({ default: "" }),
|
|
499
|
+
url: p({
|
|
614
500
|
title: "Video URL",
|
|
615
501
|
default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann",
|
|
616
|
-
i18n:
|
|
502
|
+
i18n: !0
|
|
617
503
|
}),
|
|
618
|
-
controls:
|
|
504
|
+
controls: F({
|
|
619
505
|
title: "Controls",
|
|
620
506
|
properties: {
|
|
621
|
-
autoPlay:
|
|
622
|
-
controls:
|
|
623
|
-
loop:
|
|
624
|
-
muted:
|
|
507
|
+
autoPlay: y({ title: "Autoplay", default: !0 }),
|
|
508
|
+
controls: y({ title: "Controls", default: !1 }),
|
|
509
|
+
loop: y({ title: "Loop", default: !1 }),
|
|
510
|
+
muted: y({ title: "Muted", default: !0 })
|
|
625
511
|
}
|
|
626
512
|
})
|
|
627
513
|
}
|
|
628
514
|
};
|
|
629
|
-
function
|
|
630
|
-
return
|
|
515
|
+
function De(e) {
|
|
516
|
+
return V({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 32 32" }, child: [{ tag: "path", attr: { d: "M4.698 3.419l2.057 23.073 9.231 2.563 9.256-2.566 2.059-23.069h-22.604zM13.226 9.394l-0.409 4.441 9.671 0.001-0.069 0.76-0.665 7.45-0.042 0.478-5.804 1.609-5.796-1.609-0.396-4.443h2.84l0.202 2.257 3.154 0.85 3.156-0.852 0.328-3.67-9.671-0.001 0.069-0.76 0.665-7.45 0.209-2.086h11.287l0.131 1.598 0.403 4.453h-2.841l-0.262-2.922-2.889-0.174h-0.515v-0.004l-2.755 0.074z" }, child: [] }] })(e);
|
|
631
517
|
}
|
|
632
|
-
const
|
|
633
|
-
const { scripts, inBuilder, blockProps } =
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { dangerouslySetInnerHTML: { __html: scripts } });
|
|
637
|
-
};
|
|
638
|
-
const Config$d = {
|
|
518
|
+
const Fe = (e) => {
|
|
519
|
+
const { scripts: l, inBuilder: t, blockProps: o } = e;
|
|
520
|
+
return t ? /* @__PURE__ */ s.jsx("div", { ...o, children: /* @__PURE__ */ s.jsx("div", { className: C("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ s.jsx("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ s.jsx("div", { dangerouslySetInnerHTML: { __html: l } });
|
|
521
|
+
}, Ge = {
|
|
639
522
|
type: "CustomScript",
|
|
640
523
|
label: "web_blocks.custom_script",
|
|
641
524
|
category: "core",
|
|
642
|
-
icon:
|
|
525
|
+
icon: De,
|
|
643
526
|
group: "advanced",
|
|
644
527
|
props: {
|
|
645
|
-
scripts:
|
|
528
|
+
scripts: T({
|
|
646
529
|
title: "Script",
|
|
647
530
|
default: "",
|
|
648
531
|
placeholder: "<script>console.log('Hello, world!');<\/script>"
|
|
649
532
|
})
|
|
650
533
|
}
|
|
651
|
-
}
|
|
652
|
-
const
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
};
|
|
656
|
-
const Config$c = {
|
|
534
|
+
}, Ve = (e) => {
|
|
535
|
+
const { blockProps: l, styles: t } = e;
|
|
536
|
+
return b.createElement("hr", { ...t, ...l });
|
|
537
|
+
}, Ue = {
|
|
657
538
|
type: "Divider",
|
|
658
539
|
label: "web_blocks.divider",
|
|
659
540
|
category: "core",
|
|
660
|
-
icon:
|
|
541
|
+
icon: ee,
|
|
661
542
|
group: "basic",
|
|
662
543
|
props: {
|
|
663
|
-
styles:
|
|
544
|
+
styles: f({ default: "bg-gray-900 h-0.5 py-2 my-1" })
|
|
664
545
|
}
|
|
665
|
-
}
|
|
666
|
-
const DarkMode = () => {
|
|
667
|
-
return null;
|
|
668
|
-
};
|
|
669
|
-
const Config$b = {
|
|
546
|
+
}, Oe = () => null, We = {
|
|
670
547
|
type: "Dark Mode",
|
|
671
548
|
label: "web_blocks.dark_mode",
|
|
672
549
|
category: "core",
|
|
673
|
-
icon:
|
|
550
|
+
icon: te,
|
|
674
551
|
group: "advanced",
|
|
675
552
|
props: {},
|
|
676
553
|
blocks: () => [
|
|
@@ -722,99 +599,77 @@ const Config$b = {
|
|
|
722
599
|
icon: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'></circle><path d='M12 2v2'></path><path d='M12 20v2'></path><path d='m4.93 4.93 1.41 1.41'></path><path d='m17.66 17.66 1.41 1.41'></path><path d='M2 12h2'></path><path d='M20 12h2'></path><path d='m6.34 17.66-1.41 1.41'></path><path d='m19.07 4.93-1.41 1.41'></path></svg>"
|
|
723
600
|
}
|
|
724
601
|
]
|
|
725
|
-
}
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
"
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
);
|
|
743
|
-
}
|
|
744
|
-
return React.createElement("div", { ...blockProps }, children);
|
|
745
|
-
};
|
|
746
|
-
const Config$a = {
|
|
602
|
+
}, Xe = (e) => {
|
|
603
|
+
const { blockProps: l, inBuilder: t, children: o, globalBlock: a } = e;
|
|
604
|
+
return t && !a ? /* @__PURE__ */ s.jsxs(
|
|
605
|
+
"div",
|
|
606
|
+
{
|
|
607
|
+
className: "flex flex-col items-center justify-center gap-y-1 rounded-lg bg-gray-100 py-4 dark:bg-gray-800",
|
|
608
|
+
...l,
|
|
609
|
+
children: [
|
|
610
|
+
/* @__PURE__ */ s.jsxs("h1", { children: [
|
|
611
|
+
"Global Block - ",
|
|
612
|
+
a
|
|
613
|
+
] }),
|
|
614
|
+
/* @__PURE__ */ s.jsx("p", { children: "Choose a block from the sidebar to add it to this page." })
|
|
615
|
+
]
|
|
616
|
+
}
|
|
617
|
+
) : b.createElement("div", { ...l }, o);
|
|
618
|
+
}, Ye = {
|
|
747
619
|
type: "GlobalBlock",
|
|
748
620
|
label: "Global Block",
|
|
749
|
-
icon:
|
|
621
|
+
icon: ce,
|
|
750
622
|
category: "core",
|
|
751
623
|
group: "advanced",
|
|
752
624
|
props: {
|
|
753
|
-
globalBlock:
|
|
754
|
-
}
|
|
755
|
-
};
|
|
756
|
-
const RawTextBlock = (props) => {
|
|
757
|
-
if (props.inBuilder || props.forceWrapper) {
|
|
758
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "data-ai-key": "content", ...props.blockProps, children: props.content });
|
|
625
|
+
globalBlock: p({ title: "global block", default: "", hidden: !0 })
|
|
759
626
|
}
|
|
760
|
-
|
|
761
|
-
};
|
|
762
|
-
const Config$9 = {
|
|
627
|
+
}, Ze = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ s.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`, Je = {
|
|
763
628
|
type: "Text",
|
|
764
629
|
label: "Text",
|
|
765
|
-
hidden:
|
|
630
|
+
hidden: !0,
|
|
766
631
|
category: "core",
|
|
767
632
|
group: "typography",
|
|
768
|
-
icon:
|
|
633
|
+
icon: z,
|
|
769
634
|
props: {
|
|
770
|
-
content:
|
|
771
|
-
}
|
|
772
|
-
};
|
|
773
|
-
const BodyBlock = (props) => {
|
|
774
|
-
const { blockProps, backgroundImage, children, styles } = props;
|
|
775
|
-
let cssStyles = {};
|
|
776
|
-
if (backgroundImage) {
|
|
777
|
-
cssStyles = { backgroundImage: `url(${backgroundImage})` };
|
|
635
|
+
content: B({ title: "Content", default: "", ai: !0, i18n: !0 })
|
|
778
636
|
}
|
|
779
|
-
|
|
780
|
-
};
|
|
781
|
-
|
|
637
|
+
}, Ke = (e) => {
|
|
638
|
+
const { blockProps: l, backgroundImage: t, children: o, styles: a } = e;
|
|
639
|
+
let r = {};
|
|
640
|
+
return t && (r = { backgroundImage: `url(${t})` }), b.createElement("div", { ...l, ...a, style: r }, o);
|
|
641
|
+
}, Qe = {
|
|
782
642
|
type: "Body",
|
|
783
643
|
label: "Body",
|
|
784
644
|
category: "core",
|
|
785
645
|
group: "basic",
|
|
786
|
-
hidden:
|
|
646
|
+
hidden: !0,
|
|
787
647
|
props: {
|
|
788
|
-
styles:
|
|
789
|
-
backgroundImage:
|
|
648
|
+
styles: f({ default: "font-body antialiased" }),
|
|
649
|
+
backgroundImage: j({ title: "Background Image" })
|
|
790
650
|
},
|
|
791
|
-
canAcceptBlock: () =>
|
|
792
|
-
canDelete: () =>
|
|
793
|
-
canMove: () =>
|
|
794
|
-
canDuplicate: () =>
|
|
795
|
-
}
|
|
796
|
-
const
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
};
|
|
800
|
-
const Config$7 = {
|
|
651
|
+
canAcceptBlock: () => !0,
|
|
652
|
+
canDelete: () => !1,
|
|
653
|
+
canMove: () => !1,
|
|
654
|
+
canDuplicate: () => !1
|
|
655
|
+
}, et = (e) => {
|
|
656
|
+
const { blockProps: l, styles: t } = e;
|
|
657
|
+
return b.createElement("br", { ...l, ...t });
|
|
658
|
+
}, tt = {
|
|
801
659
|
type: "LineBreak",
|
|
802
660
|
label: "Line Break",
|
|
803
661
|
category: "core",
|
|
804
662
|
group: "basic",
|
|
805
|
-
hidden:
|
|
806
|
-
icon:
|
|
663
|
+
hidden: !0,
|
|
664
|
+
icon: z,
|
|
807
665
|
props: {
|
|
808
|
-
styles:
|
|
809
|
-
}
|
|
810
|
-
};
|
|
811
|
-
const FormBlock = (props) => {
|
|
812
|
-
const { blockProps, errorMessage, name, _type, successMessage, action, styles, children } = props;
|
|
813
|
-
let nestedChildren = children;
|
|
814
|
-
if (!children) {
|
|
815
|
-
nestedChildren = /* @__PURE__ */ jsxRuntimeExports.jsx(EmptySlot, {});
|
|
666
|
+
styles: f({ default: "" })
|
|
816
667
|
}
|
|
817
|
-
|
|
668
|
+
}, lt = (e) => {
|
|
669
|
+
const { blockProps: l, errorMessage: t, name: o, _type: a, successMessage: r, action: n, styles: i, children: c } = e;
|
|
670
|
+
let d = c;
|
|
671
|
+
c || (d = /* @__PURE__ */ s.jsx(_, {}));
|
|
672
|
+
const h = {
|
|
818
673
|
"x-data": `{
|
|
819
674
|
formStatus: '',
|
|
820
675
|
formLoading: false,
|
|
@@ -838,87 +693,81 @@ const FormBlock = (props) => {
|
|
|
838
693
|
}
|
|
839
694
|
}`,
|
|
840
695
|
"x-on:submit.prevent": "submit"
|
|
841
|
-
}
|
|
842
|
-
const formResponseAttr = {
|
|
696
|
+
}, m = {
|
|
843
697
|
"data-response": "",
|
|
844
698
|
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
845
699
|
};
|
|
846
|
-
return /* @__PURE__ */
|
|
700
|
+
return /* @__PURE__ */ s.jsxs(
|
|
847
701
|
"form",
|
|
848
702
|
{
|
|
849
|
-
...
|
|
850
|
-
"data-error":
|
|
851
|
-
"data-success":
|
|
703
|
+
...h,
|
|
704
|
+
"data-error": t,
|
|
705
|
+
"data-success": r,
|
|
852
706
|
method: "post",
|
|
853
|
-
action,
|
|
854
|
-
...
|
|
855
|
-
...
|
|
707
|
+
action: n,
|
|
708
|
+
...l,
|
|
709
|
+
...i,
|
|
856
710
|
children: [
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
|
|
711
|
+
/* @__PURE__ */ s.jsx("div", { ...m }),
|
|
712
|
+
/* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: o || a }),
|
|
713
|
+
d
|
|
860
714
|
]
|
|
861
715
|
}
|
|
862
716
|
);
|
|
863
|
-
}
|
|
864
|
-
const Config$6 = {
|
|
717
|
+
}, ot = {
|
|
865
718
|
type: "Form",
|
|
866
719
|
label: "Form",
|
|
867
720
|
category: "core",
|
|
868
|
-
icon:
|
|
721
|
+
icon: le,
|
|
869
722
|
group: "form",
|
|
870
723
|
props: {
|
|
871
|
-
styles:
|
|
872
|
-
action:
|
|
724
|
+
styles: f({ default: "" }),
|
|
725
|
+
action: p({
|
|
873
726
|
title: "Submit URL",
|
|
874
727
|
default: "/api/form/submit"
|
|
875
728
|
}),
|
|
876
|
-
errorMessage:
|
|
729
|
+
errorMessage: S({
|
|
877
730
|
title: "Error Message",
|
|
878
731
|
default: "Something went wrong. Please try again"
|
|
879
732
|
}),
|
|
880
|
-
successMessage:
|
|
733
|
+
successMessage: S({
|
|
881
734
|
title: "Success Message",
|
|
882
735
|
default: "Thank you for your submission."
|
|
883
736
|
})
|
|
884
737
|
},
|
|
885
|
-
canAcceptBlock: () =>
|
|
886
|
-
}
|
|
887
|
-
const
|
|
888
|
-
const { blockProps, inBuilder, label, styles, inputStyles, icon, iconPos } = block;
|
|
889
|
-
const fieldId = generateUUID();
|
|
890
|
-
const attrs = {
|
|
738
|
+
canAcceptBlock: () => !0
|
|
739
|
+
}, at = (e) => {
|
|
740
|
+
const { blockProps: l, inBuilder: t, label: o, styles: a, inputStyles: r, icon: n, iconPos: i } = e, c = I(), d = {
|
|
891
741
|
"x-bind:disabled": "formLoading"
|
|
892
742
|
};
|
|
893
|
-
return /* @__PURE__ */
|
|
743
|
+
return /* @__PURE__ */ s.jsxs(
|
|
894
744
|
"button",
|
|
895
745
|
{
|
|
896
|
-
id:
|
|
897
|
-
...
|
|
898
|
-
...
|
|
899
|
-
...
|
|
900
|
-
...
|
|
901
|
-
type:
|
|
746
|
+
id: c,
|
|
747
|
+
...d,
|
|
748
|
+
...r,
|
|
749
|
+
...a,
|
|
750
|
+
...l || {},
|
|
751
|
+
type: t ? "button" : "submit",
|
|
902
752
|
children: [
|
|
903
|
-
|
|
904
|
-
|
|
753
|
+
o,
|
|
754
|
+
n && /* @__PURE__ */ s.jsx("span", { className: i, dangerouslySetInnerHTML: { __html: n } })
|
|
905
755
|
]
|
|
906
756
|
}
|
|
907
757
|
);
|
|
908
|
-
}
|
|
909
|
-
const Config$5 = {
|
|
758
|
+
}, st = {
|
|
910
759
|
type: "FormButton",
|
|
911
760
|
label: "Submit Button",
|
|
912
761
|
category: "core",
|
|
913
|
-
icon:
|
|
762
|
+
icon: H,
|
|
914
763
|
group: "form",
|
|
915
764
|
props: {
|
|
916
|
-
label:
|
|
917
|
-
styles:
|
|
765
|
+
label: p({ title: "Label", default: "Submit", ai: !0, i18n: !0 }),
|
|
766
|
+
styles: f({
|
|
918
767
|
default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
919
768
|
}),
|
|
920
|
-
icon:
|
|
921
|
-
iconPos:
|
|
769
|
+
icon: $({ title: "Icon", default: "" }),
|
|
770
|
+
iconPos: v({
|
|
922
771
|
title: "Icon Position",
|
|
923
772
|
default: "order-last",
|
|
924
773
|
options: [
|
|
@@ -927,319 +776,261 @@ const Config$5 = {
|
|
|
927
776
|
]
|
|
928
777
|
})
|
|
929
778
|
}
|
|
930
|
-
}
|
|
931
|
-
const InputBlock = (block) => {
|
|
779
|
+
}, rt = (e) => {
|
|
932
780
|
const {
|
|
933
|
-
blockProps,
|
|
934
|
-
label,
|
|
935
|
-
placeholder,
|
|
936
|
-
styles,
|
|
937
|
-
inputStyles,
|
|
938
|
-
showLabel,
|
|
939
|
-
required,
|
|
940
|
-
inputType = "text",
|
|
941
|
-
inBuilder,
|
|
942
|
-
fieldName
|
|
943
|
-
} =
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
);
|
|
961
|
-
}
|
|
962
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ...styles, ...blockProps, children: [
|
|
963
|
-
showLabel && /* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: fieldId, children: label }),
|
|
964
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
781
|
+
blockProps: l,
|
|
782
|
+
label: t,
|
|
783
|
+
placeholder: o,
|
|
784
|
+
styles: a,
|
|
785
|
+
inputStyles: r,
|
|
786
|
+
showLabel: n,
|
|
787
|
+
required: i,
|
|
788
|
+
inputType: c = "text",
|
|
789
|
+
inBuilder: d,
|
|
790
|
+
fieldName: h
|
|
791
|
+
} = e, m = I();
|
|
792
|
+
return !n || c === "submit" ? (c === "submit" && (l.value = t), /* @__PURE__ */ s.jsx(
|
|
793
|
+
"input",
|
|
794
|
+
{
|
|
795
|
+
id: m,
|
|
796
|
+
name: h,
|
|
797
|
+
readOnly: d,
|
|
798
|
+
...l,
|
|
799
|
+
...r,
|
|
800
|
+
...a,
|
|
801
|
+
type: c,
|
|
802
|
+
placeholder: o,
|
|
803
|
+
required: i
|
|
804
|
+
}
|
|
805
|
+
)) : /* @__PURE__ */ s.jsxs("div", { ...a, ...l, children: [
|
|
806
|
+
n && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: t }),
|
|
807
|
+
/* @__PURE__ */ s.jsx(
|
|
965
808
|
"input",
|
|
966
809
|
{
|
|
967
|
-
name:
|
|
968
|
-
readOnly:
|
|
969
|
-
...
|
|
970
|
-
id:
|
|
971
|
-
type:
|
|
972
|
-
placeholder,
|
|
973
|
-
required
|
|
810
|
+
name: h,
|
|
811
|
+
readOnly: d,
|
|
812
|
+
...r,
|
|
813
|
+
id: m,
|
|
814
|
+
type: c,
|
|
815
|
+
placeholder: o,
|
|
816
|
+
required: i
|
|
974
817
|
}
|
|
975
818
|
)
|
|
976
819
|
] });
|
|
977
|
-
}
|
|
978
|
-
const Config$4 = {
|
|
820
|
+
}, nt = {
|
|
979
821
|
type: "Input",
|
|
980
822
|
label: "Input",
|
|
981
823
|
category: "core",
|
|
982
|
-
icon:
|
|
824
|
+
icon: A,
|
|
983
825
|
group: "form",
|
|
984
826
|
props: {
|
|
985
|
-
styles:
|
|
986
|
-
fieldName:
|
|
987
|
-
inputType:
|
|
827
|
+
styles: f({ default: "" }),
|
|
828
|
+
fieldName: p({ title: "Field Name", default: "input" }),
|
|
829
|
+
inputType: v({
|
|
988
830
|
title: "Type",
|
|
989
|
-
options:
|
|
831
|
+
options: M(
|
|
990
832
|
["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
|
|
991
|
-
(
|
|
992
|
-
value:
|
|
993
|
-
title:
|
|
833
|
+
(e) => ({
|
|
834
|
+
value: e,
|
|
835
|
+
title: e
|
|
994
836
|
})
|
|
995
837
|
),
|
|
996
838
|
default: "text"
|
|
997
839
|
}),
|
|
998
|
-
value:
|
|
999
|
-
showLabel:
|
|
1000
|
-
inputStyles:
|
|
1001
|
-
label:
|
|
1002
|
-
placeholder:
|
|
840
|
+
value: p({ title: "Value", default: "", ai: !0, i18n: !0 }),
|
|
841
|
+
showLabel: y({ title: "Show Label", default: !0 }),
|
|
842
|
+
inputStyles: f({ default: "w-full p-1" }),
|
|
843
|
+
label: p({ title: "Label", default: "Label", ai: !0, i18n: !0 }),
|
|
844
|
+
placeholder: p({
|
|
1003
845
|
title: "Placeholder",
|
|
1004
846
|
default: "Placeholder"
|
|
1005
847
|
}),
|
|
1006
|
-
required:
|
|
848
|
+
required: y({ title: "Required", default: !1 })
|
|
1007
849
|
}
|
|
1008
|
-
}
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("input", { ...inputStyles, name: fieldName, id: fieldId, type: "radio", required, defaultChecked: checked }),
|
|
1028
|
-
label && /* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: fieldId, children: label })
|
|
1029
|
-
] });
|
|
1030
|
-
};
|
|
1031
|
-
const Config$3 = {
|
|
850
|
+
}, it = (e) => {
|
|
851
|
+
const { blockProps: l, fieldName: t, label: o, styles: a, inputStyles: r, checked: n, required: i, showLabel: c = !0 } = e, d = I();
|
|
852
|
+
return c ? /* @__PURE__ */ s.jsxs("div", { ...a, ...l, children: [
|
|
853
|
+
/* @__PURE__ */ s.jsx("input", { ...r, name: t, id: d, type: "radio", required: i, defaultChecked: n }),
|
|
854
|
+
o && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: o })
|
|
855
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
856
|
+
"input",
|
|
857
|
+
{
|
|
858
|
+
id: d,
|
|
859
|
+
...l,
|
|
860
|
+
...r,
|
|
861
|
+
...a,
|
|
862
|
+
type: "radio",
|
|
863
|
+
required: i,
|
|
864
|
+
checked: n,
|
|
865
|
+
name: t
|
|
866
|
+
}
|
|
867
|
+
);
|
|
868
|
+
}, ct = {
|
|
1032
869
|
type: "Radio",
|
|
1033
870
|
label: "web_blocks.radio",
|
|
1034
871
|
category: "core",
|
|
1035
|
-
icon:
|
|
872
|
+
icon: oe,
|
|
1036
873
|
group: "form",
|
|
1037
874
|
props: {
|
|
1038
|
-
styles:
|
|
1039
|
-
fieldName:
|
|
1040
|
-
label:
|
|
1041
|
-
checked:
|
|
1042
|
-
required:
|
|
875
|
+
styles: f({ default: "flex items-center w-max gap-x-2" }),
|
|
876
|
+
fieldName: p({ title: "web_blocks.field_name", default: "radio" }),
|
|
877
|
+
label: p({ title: "web_blocks.label", default: "Label" }),
|
|
878
|
+
checked: y({ title: "web_blocks.checked", default: !1 }),
|
|
879
|
+
required: y({ title: "web_blocks.required", default: !1 })
|
|
1043
880
|
}
|
|
1044
|
-
}
|
|
1045
|
-
const SelectBlock = (block) => {
|
|
881
|
+
}, dt = (e) => {
|
|
1046
882
|
const {
|
|
1047
|
-
blockProps,
|
|
1048
|
-
fieldName,
|
|
1049
|
-
label,
|
|
1050
|
-
placeholder,
|
|
1051
|
-
styles,
|
|
1052
|
-
inputStyles,
|
|
1053
|
-
required,
|
|
1054
|
-
showLabel,
|
|
1055
|
-
_multiple =
|
|
1056
|
-
} =
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
"
|
|
1061
|
-
|
|
1062
|
-
id: fieldId,
|
|
1063
|
-
...styles,
|
|
1064
|
-
...blockProps,
|
|
1065
|
-
required,
|
|
1066
|
-
multiple: _multiple,
|
|
1067
|
-
name: fieldName,
|
|
1068
|
-
children: [
|
|
1069
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", disabled: true, selected: true, hidden: true, children: placeholder }),
|
|
1070
|
-
map(block.options, (option) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1071
|
-
"option",
|
|
1072
|
-
{
|
|
1073
|
-
selected: get(option, "selected", false),
|
|
1074
|
-
value: option.value,
|
|
1075
|
-
dangerouslySetInnerHTML: { __html: option.label }
|
|
1076
|
-
},
|
|
1077
|
-
option.value
|
|
1078
|
-
))
|
|
1079
|
-
]
|
|
1080
|
-
}
|
|
1081
|
-
);
|
|
1082
|
-
}
|
|
1083
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ...styles, children: [
|
|
1084
|
-
showLabel && /* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: fieldId, children: label }),
|
|
1085
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("select", { ...inputStyles, id: fieldId, required, multiple: _multiple, name: fieldName, children: [
|
|
1086
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "", disabled: true, selected: true, hidden: true, children: placeholder }),
|
|
1087
|
-
map(block.options, (option) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
883
|
+
blockProps: l,
|
|
884
|
+
fieldName: t,
|
|
885
|
+
label: o,
|
|
886
|
+
placeholder: a,
|
|
887
|
+
styles: r,
|
|
888
|
+
inputStyles: n,
|
|
889
|
+
required: i,
|
|
890
|
+
showLabel: c,
|
|
891
|
+
_multiple: d = !1
|
|
892
|
+
} = e, h = I();
|
|
893
|
+
return c ? /* @__PURE__ */ s.jsxs("div", { ...r, children: [
|
|
894
|
+
c && /* @__PURE__ */ s.jsx("label", { htmlFor: h, children: o }),
|
|
895
|
+
/* @__PURE__ */ s.jsxs("select", { ...n, id: h, required: i, multiple: d, name: t, children: [
|
|
896
|
+
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: a }),
|
|
897
|
+
M(e.options, (m) => /* @__PURE__ */ s.jsx(
|
|
1088
898
|
"option",
|
|
1089
899
|
{
|
|
1090
|
-
selected:
|
|
1091
|
-
value:
|
|
1092
|
-
dangerouslySetInnerHTML: { __html:
|
|
900
|
+
selected: w(m, "selected", !1),
|
|
901
|
+
value: m.value,
|
|
902
|
+
dangerouslySetInnerHTML: { __html: m.label }
|
|
1093
903
|
},
|
|
1094
|
-
|
|
904
|
+
m.value
|
|
1095
905
|
))
|
|
1096
906
|
] })
|
|
1097
|
-
] })
|
|
1098
|
-
|
|
1099
|
-
|
|
907
|
+
] }) : /* @__PURE__ */ s.jsxs(
|
|
908
|
+
"select",
|
|
909
|
+
{
|
|
910
|
+
id: h,
|
|
911
|
+
...r,
|
|
912
|
+
...l,
|
|
913
|
+
required: i,
|
|
914
|
+
multiple: d,
|
|
915
|
+
name: t,
|
|
916
|
+
children: [
|
|
917
|
+
/* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: a }),
|
|
918
|
+
M(e.options, (m) => /* @__PURE__ */ s.jsx(
|
|
919
|
+
"option",
|
|
920
|
+
{
|
|
921
|
+
selected: w(m, "selected", !1),
|
|
922
|
+
value: m.value,
|
|
923
|
+
dangerouslySetInnerHTML: { __html: m.label }
|
|
924
|
+
},
|
|
925
|
+
m.value
|
|
926
|
+
))
|
|
927
|
+
]
|
|
928
|
+
}
|
|
929
|
+
);
|
|
930
|
+
}, ut = {
|
|
1100
931
|
type: "Select",
|
|
1101
932
|
label: "web_blocks.select",
|
|
1102
933
|
category: "core",
|
|
1103
|
-
icon:
|
|
934
|
+
icon: ae,
|
|
1104
935
|
group: "form",
|
|
1105
936
|
props: {
|
|
1106
|
-
styles:
|
|
1107
|
-
fieldName:
|
|
1108
|
-
showLabel:
|
|
1109
|
-
inputStyles:
|
|
1110
|
-
label:
|
|
1111
|
-
placeholder:
|
|
937
|
+
styles: f({ default: "" }),
|
|
938
|
+
fieldName: p({ title: "Field Name", default: "select" }),
|
|
939
|
+
showLabel: y({ title: "Show Label", default: !0 }),
|
|
940
|
+
inputStyles: f({ default: "w-full p-1" }),
|
|
941
|
+
label: p({ title: "Label", default: "Label", ai: !0, i18n: !0 }),
|
|
942
|
+
placeholder: p({
|
|
1112
943
|
title: "Placeholder",
|
|
1113
944
|
default: "Placeholder"
|
|
1114
945
|
}),
|
|
1115
|
-
required:
|
|
1116
|
-
_multiple:
|
|
1117
|
-
options:
|
|
946
|
+
required: y({ title: "Required", default: !1 }),
|
|
947
|
+
_multiple: y({ title: "Multiple", default: !1 }),
|
|
948
|
+
options: G({
|
|
1118
949
|
title: "Options",
|
|
1119
950
|
itemProperties: {
|
|
1120
|
-
label:
|
|
1121
|
-
value:
|
|
951
|
+
label: p({ title: "Label", default: "", ai: !0, i18n: !0 }),
|
|
952
|
+
value: p({ title: "Value", default: "" })
|
|
1122
953
|
}
|
|
1123
954
|
})
|
|
1124
955
|
}
|
|
1125
|
-
}
|
|
1126
|
-
const
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ...styles, ...blockProps, children: [
|
|
1144
|
-
showLabel && /* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: fieldId, children: label }),
|
|
1145
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("textarea", { name: fieldName, ...inputStyles, id: fieldId, placeholder, rows: _rows })
|
|
1146
|
-
] });
|
|
1147
|
-
};
|
|
1148
|
-
const Config$1 = {
|
|
956
|
+
}, pt = (e) => {
|
|
957
|
+
const { blockProps: l, fieldName: t, label: o, placeholder: a, styles: r, inputStyles: n, _rows: i, showLabel: c } = e, d = I();
|
|
958
|
+
return c ? /* @__PURE__ */ s.jsxs("div", { ...r, ...l, children: [
|
|
959
|
+
c && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: o }),
|
|
960
|
+
/* @__PURE__ */ s.jsx("textarea", { name: t, ...n, id: d, placeholder: a, rows: i })
|
|
961
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
962
|
+
"textarea",
|
|
963
|
+
{
|
|
964
|
+
id: d,
|
|
965
|
+
name: t,
|
|
966
|
+
...l,
|
|
967
|
+
...n,
|
|
968
|
+
...r,
|
|
969
|
+
placeholder: a,
|
|
970
|
+
rows: i
|
|
971
|
+
}
|
|
972
|
+
);
|
|
973
|
+
}, bt = {
|
|
1149
974
|
type: "TextArea",
|
|
1150
975
|
label: "web_blocks.textarea",
|
|
1151
976
|
category: "core",
|
|
1152
|
-
icon:
|
|
977
|
+
icon: A,
|
|
1153
978
|
group: "form",
|
|
1154
979
|
props: {
|
|
1155
|
-
fieldName:
|
|
1156
|
-
showLabel:
|
|
1157
|
-
styles:
|
|
1158
|
-
inputStyles:
|
|
1159
|
-
label:
|
|
1160
|
-
placeholder:
|
|
980
|
+
fieldName: p({ title: "Field Name", default: "textarea" }),
|
|
981
|
+
showLabel: y({ title: "Show Label", default: !0 }),
|
|
982
|
+
styles: f({ default: "" }),
|
|
983
|
+
inputStyles: f({ default: "w-full p-1" }),
|
|
984
|
+
label: p({ title: "Label", default: "Label", ai: !0, i18n: !0 }),
|
|
985
|
+
placeholder: p({
|
|
1161
986
|
title: "Placeholder",
|
|
1162
987
|
default: "Placeholder"
|
|
1163
988
|
}),
|
|
1164
|
-
_rows:
|
|
989
|
+
_rows: L({ title: "Rows", default: 3 })
|
|
1165
990
|
}
|
|
1166
|
-
}
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
if (!showLabel)
|
|
1171
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
991
|
+
}, ft = (e) => {
|
|
992
|
+
const { blockProps: l, fieldName: t, label: o, styles: a, inputStyles: r, required: n, checked: i, showLabel: c = !0 } = e, d = I();
|
|
993
|
+
return c ? /* @__PURE__ */ s.jsxs("div", { ...a, ...l, children: [
|
|
994
|
+
/* @__PURE__ */ s.jsx(
|
|
1172
995
|
"input",
|
|
1173
996
|
{
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
...styles,
|
|
997
|
+
...r,
|
|
998
|
+
name: t,
|
|
999
|
+
id: d,
|
|
1178
1000
|
type: "checkbox",
|
|
1179
|
-
required,
|
|
1180
|
-
|
|
1181
|
-
}
|
|
1182
|
-
);
|
|
1183
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ...styles, ...blockProps, children: [
|
|
1184
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1185
|
-
"input",
|
|
1186
|
-
{
|
|
1187
|
-
...inputStyles,
|
|
1188
|
-
name: fieldName,
|
|
1189
|
-
id: fieldId,
|
|
1190
|
-
type: "checkbox",
|
|
1191
|
-
required,
|
|
1192
|
-
defaultChecked: checked
|
|
1001
|
+
required: n,
|
|
1002
|
+
defaultChecked: i
|
|
1193
1003
|
}
|
|
1194
1004
|
),
|
|
1195
|
-
|
|
1196
|
-
] })
|
|
1197
|
-
|
|
1198
|
-
|
|
1005
|
+
o && o !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: d, children: o })
|
|
1006
|
+
] }) : /* @__PURE__ */ s.jsx(
|
|
1007
|
+
"input",
|
|
1008
|
+
{
|
|
1009
|
+
id: d,
|
|
1010
|
+
...l,
|
|
1011
|
+
...r,
|
|
1012
|
+
...a,
|
|
1013
|
+
type: "checkbox",
|
|
1014
|
+
required: n,
|
|
1015
|
+
name: t
|
|
1016
|
+
}
|
|
1017
|
+
);
|
|
1018
|
+
}, mt = {
|
|
1199
1019
|
type: "Checkbox",
|
|
1200
1020
|
label: "web_blocks.checkbox",
|
|
1201
1021
|
category: "core",
|
|
1202
|
-
icon:
|
|
1022
|
+
icon: se,
|
|
1203
1023
|
group: "form",
|
|
1204
1024
|
props: {
|
|
1205
|
-
fieldName:
|
|
1206
|
-
styles:
|
|
1207
|
-
label:
|
|
1208
|
-
checked:
|
|
1209
|
-
required:
|
|
1025
|
+
fieldName: p({ title: "Field Name", default: "checkbox" }),
|
|
1026
|
+
styles: f({ default: "flex items-center gap-x-2" }),
|
|
1027
|
+
label: p({ title: "web_blocks.label", default: "Label" }),
|
|
1028
|
+
checked: y({ title: "web_blocks.checked", default: !1 }),
|
|
1029
|
+
required: y({ title: "web_blocks.required", default: !1 })
|
|
1210
1030
|
}
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
registerChaiBlock(Component$2, Config$s);
|
|
1214
|
-
registerChaiBlock(EmptyBox, Config$p);
|
|
1215
|
-
registerChaiBlock(Component$1, Config$r);
|
|
1216
|
-
registerChaiBlock(HeadingBlock, Config$o);
|
|
1217
|
-
registerChaiBlock(ParagraphBlock, Config$n);
|
|
1218
|
-
registerChaiBlock(SpanBlock, Config$m);
|
|
1219
|
-
registerChaiBlock(RichTextBlock, Config$l);
|
|
1220
|
-
registerChaiBlock(LinkBlock, Config$k);
|
|
1221
|
-
registerChaiBlock(LightBoxLinkBlock, Config$j);
|
|
1222
|
-
registerChaiBlock(ListBlock, Config$i);
|
|
1223
|
-
registerChaiBlock(ListItemBlock, Config$h);
|
|
1224
|
-
registerChaiBlock(IconBlock, Config$g);
|
|
1225
|
-
registerChaiBlock(ImageBlock, Config$f);
|
|
1226
|
-
registerChaiBlock(VideoBlock, Config$e);
|
|
1227
|
-
registerChaiBlock(CustomHTMLBlock, Config$q);
|
|
1228
|
-
registerChaiBlock(RawTextBlock, Config$9);
|
|
1229
|
-
registerChaiBlock(FormBlock, Config$6);
|
|
1230
|
-
registerChaiBlock(FormButtonBlock, Config$5);
|
|
1231
|
-
registerChaiBlock(InputBlock, Config$4);
|
|
1232
|
-
registerChaiBlock(CheckboxBlock, Config);
|
|
1233
|
-
registerChaiBlock(RadioBlock, Config$3);
|
|
1234
|
-
registerChaiBlock(SelectBlock, Config$2);
|
|
1235
|
-
registerChaiBlock(TextAreaBlock, Config$1);
|
|
1236
|
-
registerChaiBlock(LineBreakComponent, Config$7);
|
|
1237
|
-
registerChaiBlock(BodyBlock, Config$8);
|
|
1238
|
-
registerChaiBlock(CustomScript, Config$d);
|
|
1239
|
-
registerChaiBlock(DividerBlock, Config$c);
|
|
1240
|
-
registerChaiBlock(DarkMode, Config$b);
|
|
1241
|
-
registerChaiBlock(Component, Config$a);
|
|
1031
|
+
}, _t = () => {
|
|
1032
|
+
u(de, ue), u(he, ye), u(pe, be), u(ge, ke), u(xe, we), u(ve, _e), u(Ie, Le), u(Be, Ce), u(je, Se), u(Me, $e), u(Ee, Ne), u(Pe, Te), u(He, Re), u(Ae, qe), u(fe, me), u(Ze, Je), u(lt, ot), u(at, st), u(rt, nt), u(ft, mt), u(it, ct), u(dt, ut), u(pt, bt), u(et, tt), u(Ke, Qe), u(Fe, Ge), u(Ve, Ue), u(Oe, We), u(Xe, Ye);
|
|
1242
1033
|
};
|
|
1243
1034
|
export {
|
|
1244
|
-
loadWebBlocks
|
|
1035
|
+
_t as loadWebBlocks
|
|
1245
1036
|
};
|