@chaibuilder/sdk 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddBlocks-H7BZYHUC.js → AddBlocks-eoo1CzaK.js} +114 -111
- package/dist/AddBlocks-jU0NwP_s.cjs +3 -0
- package/dist/BrandingOptions-WSCFnWAf.cjs +1 -0
- package/dist/{BrandingOptions-PAgY-kvj.js → BrandingOptions-_Og7VUHA.js} +57 -41
- package/dist/{CanvasArea-zn2ox-5h.js → CanvasArea-cky_d2Lu.js} +517 -519
- package/dist/CanvasArea-hT9uHhkz.cjs +46 -0
- package/dist/Class-RZuPYbUS.cjs +1 -0
- package/dist/{Class-l7qYbuoN.js → Class-nQk08vqd.js} +204 -124
- package/dist/{CurrentPage-6Jp4xAWK.js → CurrentPage--OlBwyNE.js} +58 -40
- package/dist/CurrentPage-x6Ez11gP.cjs +1 -0
- package/dist/Layers-gEA0qWYP.cjs +1 -0
- package/dist/{Layers-WkZ48AUm.js → Layers-uzA3QA-4.js} +158 -141
- package/dist/MarkAsGlobalBlock-lYL8cO9x.cjs +1 -0
- package/dist/MarkAsGlobalBlock-ySc-D4SB.js +84 -0
- package/dist/PagesPanel-5t0bV9T2.cjs +1 -0
- package/dist/PagesPanel-tH6c9Mnv.js +70 -0
- package/dist/ProjectPanel-NdrR6a8t.cjs +1 -0
- package/dist/ProjectPanel-Q2-15-In.js +91 -0
- package/dist/Settings-DBiwm1hY.cjs +1 -0
- package/dist/{Settings-fH8fZKpm.js → Settings-LOqpvQ_1.js} +411 -408
- package/dist/SidePanels-8JWYXGqN.cjs +1 -0
- package/dist/{SidePanels-w8ZHKJaR.js → SidePanels-F7ccs2Xf.js} +106 -88
- package/dist/{Topbar-hm1D_5sb.js → Topbar-lX9OMPwj.js} +47 -45
- package/dist/Topbar-qi5ab8rR.cjs +1 -0
- package/dist/UnsplashImages-a2r7b3kB.cjs +1 -0
- package/dist/{UnsplashImages-gPcBLjgB.js → UnsplashImages-u_QTABzi.js} +56 -44
- package/dist/{UploadImages-_ZyUU66E.js → UploadImages-gV5xDHIu.js} +55 -34
- package/dist/UploadImages-jLQgLujd.cjs +1 -0
- package/dist/add-page-modal-U5ramelz.js +110 -0
- package/dist/add-page-modal-tIt3N8jH.cjs +1 -0
- package/dist/confirm-alert-ZQ-sxX0X.js +58 -0
- package/dist/confirm-alert-z74-fGOT.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +99 -124
- package/dist/delete-page-modal-5XuSfQT0.cjs +1 -0
- package/dist/delete-page-modal-_E87bVUZ.js +89 -0
- package/dist/form-Osm1AmO5.cjs +1 -0
- package/dist/{form-dVpOAyRl.js → form-zZJyZuNH.js} +12 -12
- package/dist/index-2EHcmZqL.js +2947 -0
- package/dist/index-RVm8Txnj.js +1149 -0
- package/dist/index-_jFEo7h5.cjs +206 -0
- package/dist/index-c8zW_D2V.cjs +1 -0
- package/dist/index-cU5eyVRU.js +40872 -0
- package/dist/index-fwo4wa7u.cjs +1 -0
- package/dist/index-gmZcUXyn.js +25 -0
- package/dist/index-m2muA80V.cjs +9 -0
- package/dist/{jsx-runtime-JYMCiFoE.cjs → jsx-runtime-WKRPbKtm.cjs} +7 -7
- package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-qAwJ85SY.js} +109 -106
- package/dist/lib.cjs +2 -1
- package/dist/lib.js +1333 -71
- package/dist/page-viewer-BSc-5M4B.cjs +1 -0
- package/dist/{page-viewer-Y4YiaZ_m.js → page-viewer-nLqIs_9w.js} +62 -44
- package/dist/project-general-setting-14MA_cX5.cjs +1 -0
- package/dist/{project-general-setting-U4S_KlhU.js → project-general-setting-kXh5myAr.js} +46 -36
- package/dist/project-seo-setting-POGPEJZ8.cjs +1 -0
- package/dist/project-seo-setting-nT1qo1Bb.js +89 -0
- package/dist/render.cjs +1 -1
- package/dist/render.js +23 -19
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/dist/single-page-detail-EgQd9TSA.cjs +1 -0
- package/dist/{single-page-detail-pAxCy_Pe.js → single-page-detail-fV-A6vJR.js} +90 -80
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +45 -25
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +156 -357
- package/package.json +1 -1
- package/dist/AddBlocks-7ACJv8LW.cjs +0 -3
- package/dist/BrandingOptions-5j-XszLM.cjs +0 -1
- package/dist/CanvasArea-Dnm-yeus.cjs +0 -46
- package/dist/ChaiBuilderEditor-BoE-sArB.cjs +0 -163
- package/dist/ChaiBuilderEditor-hEuUONQ3.js +0 -27094
- package/dist/Class-_uCzl5v1.cjs +0 -1
- package/dist/CurrentPage-YMpqOqx7.cjs +0 -1
- package/dist/ImagesPanel-6us7hiLN.cjs +0 -1
- package/dist/ImagesPanel-oaHOD-Ex.js +0 -27
- package/dist/Layers-EzOZdWvd.cjs +0 -1
- package/dist/MODIFIERS-DsEzQ3aH.js +0 -73
- package/dist/MODIFIERS-Fx6WAZcw.cjs +0 -1
- package/dist/MarkAsGlobalBlock-0HubcRkY.js +0 -77
- package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +0 -1
- package/dist/PagesPanel-6JuwBLFQ.js +0 -50
- package/dist/PagesPanel-zJq8p1ja.cjs +0 -1
- package/dist/ProjectPanel-Zml2F8b9.cjs +0 -1
- package/dist/ProjectPanel-cu2QSDW9.js +0 -73
- package/dist/Settings-lc9PfnmG.cjs +0 -1
- package/dist/SidePanels-VH72zFE2.cjs +0 -1
- package/dist/Topbar-vQPo9xSY.cjs +0 -1
- package/dist/UnsplashImages-BoBBSi1a.cjs +0 -1
- package/dist/UploadImages-T6kW0s3G.cjs +0 -1
- package/dist/accordion-oPUeqPCZ.js +0 -42
- package/dist/accordion-ynvFtV_p.cjs +0 -1
- package/dist/add-page-modal--qZSwJuB.cjs +0 -1
- package/dist/add-page-modal-bj7qbZuK.js +0 -99
- package/dist/alert-dialog-GNfnpqFB.js +0 -64
- package/dist/alert-dialog-Mv0-wAvS.cjs +0 -1
- package/dist/command-ThdTuUxt.cjs +0 -1
- package/dist/command-VHca6CcN.js +0 -97
- package/dist/confirm-alert-8EHe0OOd.cjs +0 -1
- package/dist/confirm-alert-b0e_BLhF.js +0 -36
- package/dist/context-menu-8dC9uGXj.js +0 -122
- package/dist/context-menu-IgLbIuth.cjs +0 -1
- package/dist/controls-Ni5kEzLz.js +0 -103
- package/dist/controls-W97-POR_.cjs +0 -1
- package/dist/controls-enQY7NI8.js +0 -118
- package/dist/controls-xUKa23ic.cjs +0 -1
- package/dist/delete-page-modal-2LuDLEiP.cjs +0 -1
- package/dist/delete-page-modal-cnrR8tWH.js +0 -69
- package/dist/dialog-S_QbL1iq.cjs +0 -1
- package/dist/dialog-jrw9DF1f.js +0 -65
- package/dist/dropdown-menu-S03K_fNs.js +0 -164
- package/dist/dropdown-menu-sMXR59cB.cjs +0 -1
- package/dist/form-nRAvKPQj.cjs +0 -1
- package/dist/functions-nNTuSTsR.js +0 -1106
- package/dist/functions-pcUZhFJM.js +0 -12
- package/dist/functions-sCuB7nvZ.cjs +0 -2
- package/dist/functions-uw7QP2kT.cjs +0 -1
- package/dist/html-to-json-P6GpbcQX.cjs +0 -1
- package/dist/html-to-json-pdHQfRkN.js +0 -178
- package/dist/index-HAue58ea.cjs +0 -1
- package/dist/index-T4_wfKl5.js +0 -2256
- package/dist/index-X9ZgD09V.cjs +0 -1
- package/dist/index-ehKdBRUK.js +0 -18
- package/dist/label-KaP7MRrs.js +0 -10
- package/dist/label-tFm8HZdb.cjs +0 -1
- package/dist/link-6o6n2Tnd.js +0 -204
- package/dist/link-ece8dZGH.cjs +0 -1
- package/dist/page-viewer-IARz6OSp.cjs +0 -1
- package/dist/popover-a84pbVhQ.js +0 -23
- package/dist/popover-fKjgcRUx.cjs +0 -1
- package/dist/project-general-setting-eSl3t-VH.cjs +0 -1
- package/dist/project-seo-setting-Ga9v_ECU.js +0 -67
- package/dist/project-seo-setting-rankm1z3.cjs +0 -1
- package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
- package/dist/scroll-area-ewXbxc3n.js +0 -30
- package/dist/select-7bjg-rr9.cjs +0 -1
- package/dist/select-POGdEDHT.js +0 -75
- package/dist/separator-3Civ-6hb.cjs +0 -1
- package/dist/separator-SctTn0Qi.js +0 -18
- package/dist/single-page-detail-yPgnu2AI.cjs +0 -1
- package/dist/skeleton-CU_FIbg3.js +0 -239
- package/dist/skeleton-JHP9zwL2.cjs +0 -1
- package/dist/tabs-Gb9v5dVb.js +0 -46
- package/dist/tabs-iWeaaVrg.cjs +0 -1
- package/dist/textarea-1kZEh7ki.cjs +0 -1
- package/dist/textarea-b2QvVhrK.js +0 -73
- package/dist/toggle-ASJRAaGP.js +0 -30
- package/dist/toggle-ehNIPmme.cjs +0 -1
- package/dist/useAddBlock-WJc3OgG8.js +0 -86
- package/dist/useAddBlock-dCKRFPRU.cjs +0 -1
- package/dist/useAllBlocks-6hvuNuyw.cjs +0 -1
- package/dist/useAllBlocks-PQKYvs-e.js +0 -20
- package/dist/useChaiExternalData-4K9WxANa.js +0 -6
- package/dist/useChaiExternalData-DkyBJ81C.cjs +0 -1
- package/dist/useDarkMode-ZKCO_gkt.js +0 -23
- package/dist/useDarkMode-dV6FM6l-.cjs +0 -1
- package/dist/useFeatureSupport-OLwNgEZb.js +0 -16
- package/dist/useFeatureSupport-c9IgPW2t.cjs +0 -1
- package/dist/useHiddenBlocks-3MsGOJ1s.js +0 -15
- package/dist/useHiddenBlocks-oJuQDmTy.cjs +0 -1
- package/dist/useLanguage-NKKKaxVM.cjs +0 -1
- package/dist/useLanguage-gVC5rxO5.js +0 -216
- package/dist/useMarkAsGlobalBlock-X73Vny8u.js +0 -25
- package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +0 -1
- package/dist/useUiLibraries-4hPOi8DI.js +0 -12
- package/dist/useUiLibraries-9FhQCpKo.cjs +0 -1
- package/dist/utils-dze1SGvB.js +0 -6
- package/dist/utils-qK_SjzzV.cjs +0 -1
|
@@ -0,0 +1,1149 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { HeadingIcon as q, TextIcon as A, CursorTextIcon as F, ButtonIcon as N, PlusCircledIcon as $, Link1Icon as D, RowsIcon as O, ColumnsIcon as z, SketchLogoIcon as V, ImageIcon as U, VideoIcon as G, CodeIcon as W, DividerHorizontalIcon as Y, SpaceBetweenVerticallyIcon as M, TableIcon as X, BorderTopIcon as Z, BorderAllIcon as K, ViewHorizontalIcon as J, DragHandleHorizontalIcon as Q, GroupIcon as ee, LetterCaseToggleIcon as te, InputIcon as R, DropdownMenuIcon as le, CheckboxIcon as oe, RadiobuttonIcon as ne } from "@radix-ui/react-icons";
|
|
3
|
+
import { get as b, omit as T, isNull as re, isEmpty as I, map as _ } from "lodash";
|
|
4
|
+
import { f as d } from "./index-gmZcUXyn.js";
|
|
5
|
+
import { j as a } from "./jsx-runtime-qAwJ85SY.js";
|
|
6
|
+
import "./lib.js";
|
|
7
|
+
import { b as v, d as x } from "./Class-nQk08vqd.js";
|
|
8
|
+
const ae = "#styles:";
|
|
9
|
+
const m = (e) => ({
|
|
10
|
+
type: "singular",
|
|
11
|
+
default: e.default || "",
|
|
12
|
+
binding: b(e, "binding", !0),
|
|
13
|
+
i18n: e.i18n || !1,
|
|
14
|
+
dataType: "string",
|
|
15
|
+
required: e.required || !1,
|
|
16
|
+
schema: {
|
|
17
|
+
type: "string",
|
|
18
|
+
...T(e, ["i18n", "required"])
|
|
19
|
+
},
|
|
20
|
+
uiSchema: {
|
|
21
|
+
"ui:placeholder": e.placeholder || "Enter here"
|
|
22
|
+
}
|
|
23
|
+
}), j = (e) => ({
|
|
24
|
+
type: "singular",
|
|
25
|
+
default: e.default || "",
|
|
26
|
+
binding: b(e, "binding", !0),
|
|
27
|
+
dataType: "string",
|
|
28
|
+
i18n: e.i18n || !1,
|
|
29
|
+
required: e.required || !1,
|
|
30
|
+
schema: {
|
|
31
|
+
type: "string",
|
|
32
|
+
...T(e, ["i18n", "required", "rows"])
|
|
33
|
+
},
|
|
34
|
+
uiSchema: {
|
|
35
|
+
"ui:widget": "textarea",
|
|
36
|
+
"ui:placeholder": e.placeholder || "Enter here",
|
|
37
|
+
"ui:options": {
|
|
38
|
+
rows: e.rows || 4
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}), g = (e) => ({
|
|
42
|
+
type: "singular",
|
|
43
|
+
i18n: e.i18n || !1,
|
|
44
|
+
default: e.default || !1,
|
|
45
|
+
dataType: "boolean",
|
|
46
|
+
binding: b(e, "binding", !0),
|
|
47
|
+
schema: {
|
|
48
|
+
type: "boolean",
|
|
49
|
+
...T(e, ["i18n", "required"])
|
|
50
|
+
},
|
|
51
|
+
uiSchema: {
|
|
52
|
+
"ui:title": e.title || "Select Item",
|
|
53
|
+
"ui:description": ""
|
|
54
|
+
}
|
|
55
|
+
}), se = (e) => ({
|
|
56
|
+
type: "singular",
|
|
57
|
+
default: e.default || "",
|
|
58
|
+
binding: b(e, "binding", !0),
|
|
59
|
+
dataType: "number",
|
|
60
|
+
i18n: e.i18n || !1,
|
|
61
|
+
required: e.required || !1,
|
|
62
|
+
schema: {
|
|
63
|
+
type: "number",
|
|
64
|
+
...T(e, ["i18n", "required"])
|
|
65
|
+
},
|
|
66
|
+
uiSchema: {}
|
|
67
|
+
}), w = (e) => ({
|
|
68
|
+
type: "singular",
|
|
69
|
+
default: e.default || "",
|
|
70
|
+
binding: b(e, "binding", !0),
|
|
71
|
+
i18n: e.i18n || !1,
|
|
72
|
+
required: e.required || !1,
|
|
73
|
+
dataType: "string",
|
|
74
|
+
schema: {
|
|
75
|
+
type: "string",
|
|
76
|
+
...T(e, ["i18n", "required", "options", "binding"]),
|
|
77
|
+
oneOf: e.options.map((t) => ({ const: t.value, title: t.title }))
|
|
78
|
+
},
|
|
79
|
+
uiSchema: {
|
|
80
|
+
"ui:widget": "select"
|
|
81
|
+
}
|
|
82
|
+
}), We = (e) => ({
|
|
83
|
+
type: "singular",
|
|
84
|
+
i18n: e.i18n || !1,
|
|
85
|
+
default: e.default || "",
|
|
86
|
+
binding: b(e, "binding", !0),
|
|
87
|
+
dataType: "string",
|
|
88
|
+
schema: {
|
|
89
|
+
type: "string",
|
|
90
|
+
...T(e, ["i18n", "required"])
|
|
91
|
+
},
|
|
92
|
+
uiSchema: {
|
|
93
|
+
"ui:widget": "color"
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
const L = (e) => ({
|
|
97
|
+
type: "singular",
|
|
98
|
+
default: e.default || "",
|
|
99
|
+
i18n: e.i18n || !1,
|
|
100
|
+
binding: b(e, "binding", !0),
|
|
101
|
+
dataType: "string",
|
|
102
|
+
schema: {
|
|
103
|
+
type: "string",
|
|
104
|
+
...T(e, ["i18n", "required"])
|
|
105
|
+
},
|
|
106
|
+
uiSchema: {
|
|
107
|
+
"ui:widget": "richtext"
|
|
108
|
+
}
|
|
109
|
+
}), ie = (e) => ({
|
|
110
|
+
type: "model",
|
|
111
|
+
title: e.title,
|
|
112
|
+
dataType: "object",
|
|
113
|
+
default: e.default || {},
|
|
114
|
+
binding: b(e, "binding", !0),
|
|
115
|
+
properties: e.properties
|
|
116
|
+
}), ce = (e) => ({
|
|
117
|
+
type: "list",
|
|
118
|
+
itemProperties: e.itemProperties,
|
|
119
|
+
binding: b(e, "binding", !0),
|
|
120
|
+
title: e.title,
|
|
121
|
+
dataType: "array",
|
|
122
|
+
default: e.default || [],
|
|
123
|
+
itemTitle: e.getItemLabel ? e.getItemLabel({}) : () => ""
|
|
124
|
+
}), c = (e) => ({
|
|
125
|
+
type: "styles",
|
|
126
|
+
binding: !1,
|
|
127
|
+
default: `${ae},${e.default || ""}`
|
|
128
|
+
}), B = (e) => ({
|
|
129
|
+
default: e.default || "",
|
|
130
|
+
binding: b(e, "binding", !0),
|
|
131
|
+
type: "singular",
|
|
132
|
+
i18n: e.i18n || !1,
|
|
133
|
+
dataType: "string",
|
|
134
|
+
schema: {
|
|
135
|
+
type: "string",
|
|
136
|
+
title: "Icon",
|
|
137
|
+
default: e.default || ""
|
|
138
|
+
},
|
|
139
|
+
uiSchema: {
|
|
140
|
+
"ui:widget": "icon"
|
|
141
|
+
}
|
|
142
|
+
}), H = (e) => ({
|
|
143
|
+
default: e.default,
|
|
144
|
+
type: "singular",
|
|
145
|
+
binding: b(e, "binding", !0),
|
|
146
|
+
dataType: "object",
|
|
147
|
+
i18n: e.i18n || !1,
|
|
148
|
+
schema: {
|
|
149
|
+
type: "object",
|
|
150
|
+
...e || {},
|
|
151
|
+
properties: {
|
|
152
|
+
type: { type: "string" },
|
|
153
|
+
href: { type: "string" },
|
|
154
|
+
target: { type: "string" }
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
uiSchema: {
|
|
158
|
+
"ui:field": "link"
|
|
159
|
+
}
|
|
160
|
+
}), de = (e) => ({
|
|
161
|
+
type: "singular",
|
|
162
|
+
default: e.default || "",
|
|
163
|
+
binding: b(e, "binding", !0),
|
|
164
|
+
dataType: "string",
|
|
165
|
+
i18n: e.i18n || !1,
|
|
166
|
+
schema: {
|
|
167
|
+
type: "string",
|
|
168
|
+
...T(e, ["i18n", "required"])
|
|
169
|
+
},
|
|
170
|
+
uiSchema: {
|
|
171
|
+
"ui:widget": "image"
|
|
172
|
+
}
|
|
173
|
+
}), ue = (e) => {
|
|
174
|
+
const { blockProps: t, styles: l, content: o, level: n = "h1", children: r = null } = e;
|
|
175
|
+
return r ? u.createElement(n, { ...l, ...t }, r) : u.createElement(n, {
|
|
176
|
+
...l,
|
|
177
|
+
...t,
|
|
178
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
d(ue, {
|
|
182
|
+
type: "Heading",
|
|
183
|
+
label: "Heading",
|
|
184
|
+
category: "core",
|
|
185
|
+
icon: q,
|
|
186
|
+
group: "basic",
|
|
187
|
+
props: {
|
|
188
|
+
level: w({
|
|
189
|
+
title: "Level",
|
|
190
|
+
default: "h1",
|
|
191
|
+
binding: !1,
|
|
192
|
+
options: [
|
|
193
|
+
{ value: "h1", title: "h1" },
|
|
194
|
+
{ value: "h2", title: "h2" },
|
|
195
|
+
{ value: "h3", title: "h3" },
|
|
196
|
+
{ value: "h4", title: "h4" },
|
|
197
|
+
{ value: "h5", title: "h5" },
|
|
198
|
+
{ value: "h6", title: "h6" }
|
|
199
|
+
]
|
|
200
|
+
}),
|
|
201
|
+
styles: c({ default: "text-3xl" }),
|
|
202
|
+
content: L({ title: "Content", default: "Heading goes here" })
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
const pe = (e) => {
|
|
206
|
+
const { blockProps: t, styles: l, content: o } = e;
|
|
207
|
+
return re(e.children) ? u.createElement("div", {
|
|
208
|
+
...l,
|
|
209
|
+
...t,
|
|
210
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
211
|
+
}) : u.createElement("p", { ...l, ...t }, e.children);
|
|
212
|
+
};
|
|
213
|
+
d(pe, {
|
|
214
|
+
type: "Paragraph",
|
|
215
|
+
label: "Paragraph",
|
|
216
|
+
category: "core",
|
|
217
|
+
icon: A,
|
|
218
|
+
group: "basic",
|
|
219
|
+
props: {
|
|
220
|
+
styles: c({ default: "" }),
|
|
221
|
+
content: L({
|
|
222
|
+
title: "Content",
|
|
223
|
+
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."
|
|
224
|
+
})
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
const me = (e) => {
|
|
228
|
+
const { blockProps: t, content: l, styles: o } = e;
|
|
229
|
+
return /* @__PURE__ */ a.jsx("div", { className: "prose max-w-full", children: /* @__PURE__ */ a.jsx("div", { ...t, ...o, dangerouslySetInnerHTML: { __html: l } }) });
|
|
230
|
+
};
|
|
231
|
+
d(me, {
|
|
232
|
+
type: "RichText",
|
|
233
|
+
label: "Rich Text",
|
|
234
|
+
category: "core",
|
|
235
|
+
icon: F,
|
|
236
|
+
group: "basic",
|
|
237
|
+
props: {
|
|
238
|
+
styles: c({ default: "" }),
|
|
239
|
+
content: L({
|
|
240
|
+
title: "Content",
|
|
241
|
+
default: `Lorem Ipsum Rich Text Editor Demo
|
|
242
|
+
|
|
243
|
+
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:
|
|
244
|
+
|
|
245
|
+
Text Formatting: You can make text bold, italic, or underline it.
|
|
246
|
+
Lists:
|
|
247
|
+
Create ordered lists.
|
|
248
|
+
Craft unordered lists.
|
|
249
|
+
Utilize nested lists for organization.`
|
|
250
|
+
})
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
const fe = (e) => {
|
|
254
|
+
const { blockProps: t, icon: l, content: o, iconPos: n, styles: r, children: s } = e, i = s || /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
255
|
+
o,
|
|
256
|
+
l && /* @__PURE__ */ a.jsx("span", { className: n || "", dangerouslySetInnerHTML: { __html: l } })
|
|
257
|
+
] });
|
|
258
|
+
return u.createElement("button", { ...t, ...r, type: "button" }, i);
|
|
259
|
+
};
|
|
260
|
+
d(fe, {
|
|
261
|
+
type: "Button",
|
|
262
|
+
label: "Button",
|
|
263
|
+
category: "core",
|
|
264
|
+
icon: N,
|
|
265
|
+
group: "basic",
|
|
266
|
+
props: {
|
|
267
|
+
content: m({
|
|
268
|
+
title: "Label",
|
|
269
|
+
default: "Button",
|
|
270
|
+
multiLingual: !0
|
|
271
|
+
}),
|
|
272
|
+
styles: c({
|
|
273
|
+
default: "text-white bg-primary px-4 py-2 rounded-global flex items-center"
|
|
274
|
+
}),
|
|
275
|
+
link: H({
|
|
276
|
+
title: "Link",
|
|
277
|
+
default: { type: "page", href: "", target: "_blank" }
|
|
278
|
+
}),
|
|
279
|
+
icon: B({ title: "Icon", default: "" }),
|
|
280
|
+
iconPos: w({
|
|
281
|
+
title: "Icon Position",
|
|
282
|
+
default: "order-last",
|
|
283
|
+
options: [
|
|
284
|
+
{ title: "Start", value: "order-first" },
|
|
285
|
+
{ title: "End", value: "order-last" }
|
|
286
|
+
]
|
|
287
|
+
})
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
const k = ({ blockProps: e, className: t = "", text: l = "BLOCK", styles: o = {} }) => /* @__PURE__ */ a.jsx(
|
|
291
|
+
"div",
|
|
292
|
+
{
|
|
293
|
+
...e,
|
|
294
|
+
className: v("flex h-20 flex-col items-center justify-center", t),
|
|
295
|
+
...T(o, ["className"]),
|
|
296
|
+
children: /* @__PURE__ */ a.jsx("div", { className: "flex h-full w-full items-center justify-center bg-[radial-gradient(#CCC,transparent_1.5px)] outline-dashed outline-2 outline-gray-400 duration-300 [background-size:12px_12px] dark:bg-[radial-gradient(#AAA,transparent_1.5px)]", children: /* @__PURE__ */ a.jsxs("span", { className: "opacit flex items-center gap-x-1.5 text-xs font-semibold text-gray-400", children: [
|
|
297
|
+
/* @__PURE__ */ a.jsx($, { className: "w-3 h-3" }),
|
|
298
|
+
" ADD ",
|
|
299
|
+
l
|
|
300
|
+
] }) })
|
|
301
|
+
}
|
|
302
|
+
), ye = (e) => {
|
|
303
|
+
const { blockProps: t, link: l, children: o, styles: n, inBuilder: r, content: s } = e;
|
|
304
|
+
return !o && I(n == null ? void 0 : n.className) && I(s) ? /* @__PURE__ */ a.jsx(k, { blockProps: t }) : r ? o ? /* @__PURE__ */ a.jsx("span", { "data-simulate": "a", ...t, ...n, children: o }) : u.createElement("span", {
|
|
305
|
+
...t,
|
|
306
|
+
...n,
|
|
307
|
+
href: l.href || "#",
|
|
308
|
+
target: l.target || "_self",
|
|
309
|
+
dangerouslySetInnerHTML: { __html: s },
|
|
310
|
+
"data-simulate": "a"
|
|
311
|
+
}) : o ? /* @__PURE__ */ a.jsx("a", { href: l.href || "#/", target: l.target, ...t, ...n, children: o }) : u.createElement("a", {
|
|
312
|
+
...t,
|
|
313
|
+
...n,
|
|
314
|
+
href: l.href || "#",
|
|
315
|
+
target: l.target || "_self",
|
|
316
|
+
dangerouslySetInnerHTML: { __html: s }
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
d(ye, {
|
|
320
|
+
type: "Link",
|
|
321
|
+
label: "Link",
|
|
322
|
+
category: "core",
|
|
323
|
+
icon: D,
|
|
324
|
+
group: "basic",
|
|
325
|
+
props: {
|
|
326
|
+
styles: c({ default: "" }),
|
|
327
|
+
content: m({ title: "Content", default: "" }),
|
|
328
|
+
link: H({
|
|
329
|
+
title: "Link",
|
|
330
|
+
default: { type: "page", target: "_self", href: "" }
|
|
331
|
+
})
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
const be = (e) => {
|
|
335
|
+
const { blockProps: t, children: l, listType: o, styles: n, tag: r } = e, s = v(b(n, "className", ""), o);
|
|
336
|
+
return !l && I(n == null ? void 0 : n.className) ? /* @__PURE__ */ a.jsx(k, { blockProps: t, text: "LIST ITEM" }) : u.createElement(
|
|
337
|
+
r || (o === "list-decimal" ? "ol" : "ul"),
|
|
338
|
+
{ ...t, ...n, className: s },
|
|
339
|
+
l
|
|
340
|
+
);
|
|
341
|
+
};
|
|
342
|
+
d(be, {
|
|
343
|
+
type: "List",
|
|
344
|
+
label: "List",
|
|
345
|
+
icon: O,
|
|
346
|
+
category: "core",
|
|
347
|
+
group: "basic",
|
|
348
|
+
props: {
|
|
349
|
+
styles: c({ default: "" }),
|
|
350
|
+
listType: w({
|
|
351
|
+
title: "List type",
|
|
352
|
+
default: "list-disc",
|
|
353
|
+
options: [
|
|
354
|
+
{ value: "list-none", title: "None" },
|
|
355
|
+
{ value: "list-disc", title: "Disc" },
|
|
356
|
+
{ value: "list-decimal", title: "Number" }
|
|
357
|
+
]
|
|
358
|
+
})
|
|
359
|
+
},
|
|
360
|
+
blocks: [
|
|
361
|
+
{ _type: "List", _id: "a", listType: "list-none", styles: "#styles:," },
|
|
362
|
+
{
|
|
363
|
+
_type: "ListItem",
|
|
364
|
+
_id: "b",
|
|
365
|
+
_parent: "a",
|
|
366
|
+
styles: "#styles:,",
|
|
367
|
+
content: "Item 1"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
_type: "ListItem",
|
|
371
|
+
_id: "c",
|
|
372
|
+
_parent: "a",
|
|
373
|
+
styles: "#styles:,",
|
|
374
|
+
content: "Item 2"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
_type: "ListItem",
|
|
378
|
+
_id: "d",
|
|
379
|
+
_parent: "a",
|
|
380
|
+
styles: "#styles:,",
|
|
381
|
+
content: "Item 3"
|
|
382
|
+
}
|
|
383
|
+
]
|
|
384
|
+
});
|
|
385
|
+
const he = (e) => {
|
|
386
|
+
const { blockProps: t, content: l, styles: o, children: n, tag: r } = e;
|
|
387
|
+
return n ? u.createElement(r || "li", { ...o, ...t }, n) : u.createElement(r || "li", {
|
|
388
|
+
...o,
|
|
389
|
+
...t,
|
|
390
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
d(he, {
|
|
394
|
+
type: "ListItem",
|
|
395
|
+
label: "List Item",
|
|
396
|
+
icon: z,
|
|
397
|
+
category: "core",
|
|
398
|
+
group: "basic",
|
|
399
|
+
props: {
|
|
400
|
+
styles: c({ default: "" }),
|
|
401
|
+
content: L({ title: "Content", default: "List item" })
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
const ge = (e) => {
|
|
405
|
+
const { blockProps: t, icon: l, styles: o } = e, n = {
|
|
406
|
+
...o,
|
|
407
|
+
className: v(o.className, "inline-block c-inline-block")
|
|
408
|
+
};
|
|
409
|
+
return I(l) ? /* @__PURE__ */ a.jsx(k, { blockProps: t, text: "", className: "h-8 w-14" }) : u.createElement("span", {
|
|
410
|
+
...t,
|
|
411
|
+
...n,
|
|
412
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
413
|
+
});
|
|
414
|
+
};
|
|
415
|
+
d(ge, {
|
|
416
|
+
type: "Icon",
|
|
417
|
+
label: "Icon",
|
|
418
|
+
category: "core",
|
|
419
|
+
icon: V,
|
|
420
|
+
group: "basic",
|
|
421
|
+
props: {
|
|
422
|
+
styles: c({ default: "text-black" }),
|
|
423
|
+
icon: B({
|
|
424
|
+
title: "Icon",
|
|
425
|
+
default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'
|
|
426
|
+
})
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
const xe = (e) => {
|
|
430
|
+
const { blockProps: t, image: l, styles: o, alt: n, height: r = 200, width: s = 200 } = e;
|
|
431
|
+
return I(l) ? /* @__PURE__ */ a.jsx(k, { blockProps: t, text: "IMAGE URL", className: "h-36" }) : u.createElement("img", {
|
|
432
|
+
...t,
|
|
433
|
+
...o,
|
|
434
|
+
src: l,
|
|
435
|
+
alt: n,
|
|
436
|
+
height: r,
|
|
437
|
+
width: s
|
|
438
|
+
});
|
|
439
|
+
};
|
|
440
|
+
d(xe, {
|
|
441
|
+
type: "Image",
|
|
442
|
+
label: "Image",
|
|
443
|
+
category: "core",
|
|
444
|
+
icon: U,
|
|
445
|
+
group: "basic",
|
|
446
|
+
props: {
|
|
447
|
+
styles: c({ default: "" }),
|
|
448
|
+
image: de({
|
|
449
|
+
title: "Image",
|
|
450
|
+
default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
|
|
451
|
+
}),
|
|
452
|
+
alt: m({ title: "Alt", default: "" }),
|
|
453
|
+
width: m({ title: "Width", default: "" }),
|
|
454
|
+
height: m({ title: "Height", default: "" })
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
const ke = (e) => {
|
|
458
|
+
var r;
|
|
459
|
+
const { blockProps: t, styles: l, children: o } = e;
|
|
460
|
+
let n = null;
|
|
461
|
+
return o || (n = // @ts-ignore
|
|
462
|
+
/* @__PURE__ */ a.jsx("div", { className: v("flex flex-col items-center justify-center", (r = e.emptyStyles) == null ? void 0 : r.className), children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full rounded-md border-4 border-dashed", children: /* @__PURE__ */ a.jsxs("p", { className: "truncate p-1 text-left text-xs text-gray-400", children: [
|
|
463
|
+
"Slot: ",
|
|
464
|
+
e.name
|
|
465
|
+
] }) }) })), u.createElement("div", { ...l, ...t, droppable: "yes" }, o || n);
|
|
466
|
+
};
|
|
467
|
+
d(ke, {
|
|
468
|
+
type: "Slot",
|
|
469
|
+
label: "Slot",
|
|
470
|
+
group: "basic",
|
|
471
|
+
category: "core",
|
|
472
|
+
hidden: !0,
|
|
473
|
+
props: {
|
|
474
|
+
styles: c({ default: "" }),
|
|
475
|
+
emptyStyles: c({ default: "" })
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
const E = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, P = /^(https?:\/\/)?(www\.)?vimeo\.com\/(\d+)/, C = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Ie = (e) => {
|
|
479
|
+
if (E.test(e)) {
|
|
480
|
+
const t = e.match(E);
|
|
481
|
+
return t ? `https://www.youtube.com/embed/${t[4]}` : e;
|
|
482
|
+
}
|
|
483
|
+
if (P.test(e)) {
|
|
484
|
+
const t = e.match(P);
|
|
485
|
+
return t ? `https://player.vimeo.com/video/${t[3]}` : e;
|
|
486
|
+
}
|
|
487
|
+
if (C.test(e)) {
|
|
488
|
+
const t = e.match(C);
|
|
489
|
+
return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
|
|
490
|
+
}
|
|
491
|
+
return null;
|
|
492
|
+
}, Te = (e) => {
|
|
493
|
+
const { blockProps: t, styles: l, _url: o, _controls: n } = e, r = n.autoPlay, s = n.controls, i = r || n.muted, f = n.loop;
|
|
494
|
+
if (I(o))
|
|
495
|
+
return /* @__PURE__ */ a.jsx(k, { blockProps: t, text: "VIDEO URL", className: "h-36" });
|
|
496
|
+
let p = Ie(o), h = null;
|
|
497
|
+
if (p) {
|
|
498
|
+
if (!I(p)) {
|
|
499
|
+
const y = [];
|
|
500
|
+
y.push(`autoplay=${r ? 1 : 0}`), y.push(`controls=${s ? 1 : 0}`), y.push(`mute=${i ? 1 : 0}&muted=${i ? 1 : 0}`), y.push(`loop=${f ? 1 : 0}`), p = `${p}?${y.join("&")}`;
|
|
501
|
+
}
|
|
502
|
+
h = u.createElement("iframe", {
|
|
503
|
+
...t,
|
|
504
|
+
...l,
|
|
505
|
+
src: p,
|
|
506
|
+
allow: "autoplay *; fullscreen *",
|
|
507
|
+
allowFullScreen: !0,
|
|
508
|
+
frameBorder: 0
|
|
509
|
+
});
|
|
510
|
+
} else
|
|
511
|
+
h = u.createElement("video", {
|
|
512
|
+
...t,
|
|
513
|
+
...l,
|
|
514
|
+
src: o,
|
|
515
|
+
controls: s,
|
|
516
|
+
muted: i,
|
|
517
|
+
autoPlay: r,
|
|
518
|
+
loop: f
|
|
519
|
+
});
|
|
520
|
+
return /* @__PURE__ */ a.jsxs("div", { className: "relative overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
|
|
521
|
+
/* @__PURE__ */ a.jsx("div", { className: "absolute h-full w-full" }),
|
|
522
|
+
h
|
|
523
|
+
] });
|
|
524
|
+
};
|
|
525
|
+
d(Te, {
|
|
526
|
+
type: "Video",
|
|
527
|
+
label: "Video",
|
|
528
|
+
category: "core",
|
|
529
|
+
icon: G,
|
|
530
|
+
group: "basic",
|
|
531
|
+
props: {
|
|
532
|
+
styles: c({ default: "absolute top-0 left-0 w-full h-full" }),
|
|
533
|
+
_url: m({
|
|
534
|
+
title: "Video URL",
|
|
535
|
+
default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
|
|
536
|
+
}),
|
|
537
|
+
_controls: ie({
|
|
538
|
+
title: "Controls",
|
|
539
|
+
properties: {
|
|
540
|
+
autoPlay: g({ title: "Autoplay", default: !0 }),
|
|
541
|
+
controls: g({ title: "Show widgets", default: !1 }),
|
|
542
|
+
loop: g({ title: "Loop", default: !1 }),
|
|
543
|
+
muted: g({ title: "Muted", default: !0 })
|
|
544
|
+
}
|
|
545
|
+
})
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
const Le = (e) => {
|
|
549
|
+
const { blockProps: t, styles: l, content: o } = e;
|
|
550
|
+
return u.createElement("div", {
|
|
551
|
+
...l,
|
|
552
|
+
...t,
|
|
553
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
554
|
+
});
|
|
555
|
+
};
|
|
556
|
+
d(Le, {
|
|
557
|
+
type: "CustomHTML",
|
|
558
|
+
label: "CustomHTML",
|
|
559
|
+
category: "core",
|
|
560
|
+
icon: W,
|
|
561
|
+
group: "basic",
|
|
562
|
+
props: {
|
|
563
|
+
styles: c({ default: "" }),
|
|
564
|
+
content: j({
|
|
565
|
+
title: "HTML Content",
|
|
566
|
+
default: "",
|
|
567
|
+
placeholder: "Enter custom HTML code here"
|
|
568
|
+
})
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
const we = (e) => {
|
|
572
|
+
const { blockProps: t, styles: l, content: o, children: n = null, tag: r } = e;
|
|
573
|
+
return n ? u.createElement("span", { ...l, ...t }, n) : u.createElement(r || "span", {
|
|
574
|
+
...l,
|
|
575
|
+
...t,
|
|
576
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
577
|
+
});
|
|
578
|
+
};
|
|
579
|
+
d(we, {
|
|
580
|
+
type: "Span",
|
|
581
|
+
label: "Span",
|
|
582
|
+
category: "core",
|
|
583
|
+
group: "basic",
|
|
584
|
+
props: {
|
|
585
|
+
styles: c({ default: "" }),
|
|
586
|
+
content: j({ title: "Content", default: "" })
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
const ve = (e) => {
|
|
590
|
+
const { blockProps: t, styles: l } = e;
|
|
591
|
+
return u.createElement("hr", { ...l, ...t });
|
|
592
|
+
};
|
|
593
|
+
d(ve, {
|
|
594
|
+
type: "Divider",
|
|
595
|
+
label: "Divider",
|
|
596
|
+
category: "core",
|
|
597
|
+
icon: Y,
|
|
598
|
+
group: "basic",
|
|
599
|
+
props: {
|
|
600
|
+
styles: c({ default: "bg-gray-900 h-0.5 py-2 my-1" })
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
const Se = (e) => {
|
|
604
|
+
const { blockProps: t, styles: l } = e;
|
|
605
|
+
return u.createElement("br", { ...t, ...l });
|
|
606
|
+
};
|
|
607
|
+
d(Se, {
|
|
608
|
+
type: "LineBreak",
|
|
609
|
+
label: "Line Break",
|
|
610
|
+
category: "core",
|
|
611
|
+
group: "basic",
|
|
612
|
+
icon: M,
|
|
613
|
+
props: {
|
|
614
|
+
styles: c({ default: "" })
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
const _e = (e) => e.inBuilder ? /* @__PURE__ */ a.jsxs("span", { ...e.blockProps, children: [
|
|
618
|
+
" ",
|
|
619
|
+
e.content,
|
|
620
|
+
" "
|
|
621
|
+
] }) : ` ${e.content} `;
|
|
622
|
+
d(_e, {
|
|
623
|
+
type: "Text",
|
|
624
|
+
label: "Text",
|
|
625
|
+
hidden: !0,
|
|
626
|
+
category: "core",
|
|
627
|
+
group: "basic",
|
|
628
|
+
icon: M,
|
|
629
|
+
props: {
|
|
630
|
+
content: j({ title: "Content", defaultValue: "" })
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
const S = (e) => {
|
|
634
|
+
const t = (r, s) => ({
|
|
635
|
+
_id: x(),
|
|
636
|
+
_parent: r,
|
|
637
|
+
_type: "TableCell",
|
|
638
|
+
styles: "#styles:,",
|
|
639
|
+
content: `${e === "TableHead" ? "Table Head" : "Table Cell " + s}`
|
|
640
|
+
}), l = (r) => {
|
|
641
|
+
const s = x(), i = {
|
|
642
|
+
_type: "TableRow",
|
|
643
|
+
_id: s,
|
|
644
|
+
styles: "#styles:,border-b"
|
|
645
|
+
};
|
|
646
|
+
return r && (i._parent = r), [i, t(s, "1"), t(s, "2"), t(s, "3")];
|
|
647
|
+
}, o = (r) => {
|
|
648
|
+
const s = x(), i = {
|
|
649
|
+
_id: s,
|
|
650
|
+
_type: "TableHead",
|
|
651
|
+
styles: "#styles:,font-medium"
|
|
652
|
+
};
|
|
653
|
+
return r && (i._parent = r), [i, ...l(s)];
|
|
654
|
+
}, n = (r) => {
|
|
655
|
+
const s = x(), i = {
|
|
656
|
+
_id: s,
|
|
657
|
+
_type: "TableBody",
|
|
658
|
+
styles: "#styles:,"
|
|
659
|
+
};
|
|
660
|
+
return r && (i._parent = r), [i, ...l(s), ...l(s)];
|
|
661
|
+
};
|
|
662
|
+
if (e === "Table") {
|
|
663
|
+
const r = x();
|
|
664
|
+
return [
|
|
665
|
+
{
|
|
666
|
+
_id: r,
|
|
667
|
+
_type: "Table",
|
|
668
|
+
styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
|
|
669
|
+
},
|
|
670
|
+
...o(r),
|
|
671
|
+
...n(r)
|
|
672
|
+
];
|
|
673
|
+
}
|
|
674
|
+
return e === "TableRow" ? l() : e === "TableHead" ? o() : e === "TableBody" ? n() : [];
|
|
675
|
+
}, je = (e) => {
|
|
676
|
+
const { blockProps: t, children: l, styles: o } = e;
|
|
677
|
+
return l ? u.createElement("table", { ...t, ...o }, l) : /* @__PURE__ */ a.jsx(k, { blockProps: t, text: "TABLE HEAD / BODY" });
|
|
678
|
+
};
|
|
679
|
+
d(je, {
|
|
680
|
+
type: "Table",
|
|
681
|
+
label: "Table",
|
|
682
|
+
category: "core",
|
|
683
|
+
group: "table",
|
|
684
|
+
icon: X,
|
|
685
|
+
props: {
|
|
686
|
+
styles: c({ default: "" })
|
|
687
|
+
},
|
|
688
|
+
blocks: S("Table")
|
|
689
|
+
});
|
|
690
|
+
const Be = (e) => {
|
|
691
|
+
const { blockProps: t, children: l, styles: o } = e;
|
|
692
|
+
return l ? u.createElement("thead", { ...t, ...o }, l) : /* @__PURE__ */ a.jsx(k, { blockProps: t, text: "TABLE ROW" });
|
|
693
|
+
};
|
|
694
|
+
d(Be, {
|
|
695
|
+
type: "TableHead",
|
|
696
|
+
label: "Table Head",
|
|
697
|
+
category: "core",
|
|
698
|
+
group: "table",
|
|
699
|
+
icon: Z,
|
|
700
|
+
props: {
|
|
701
|
+
styles: c({ default: "" })
|
|
702
|
+
},
|
|
703
|
+
blocks: S("TableHead")
|
|
704
|
+
});
|
|
705
|
+
const Ee = (e) => {
|
|
706
|
+
const { blockProps: t, children: l, styles: o } = e;
|
|
707
|
+
return l ? u.createElement("tbody", { ...t, ...o }, l) : /* @__PURE__ */ a.jsx(k, { blockProps: t, text: "TABLE ROW" });
|
|
708
|
+
};
|
|
709
|
+
d(Ee, {
|
|
710
|
+
type: "TableBody",
|
|
711
|
+
label: "Table Body",
|
|
712
|
+
category: "core",
|
|
713
|
+
group: "table",
|
|
714
|
+
icon: K,
|
|
715
|
+
props: {
|
|
716
|
+
styles: c({ default: "" })
|
|
717
|
+
},
|
|
718
|
+
blocks: S("TableBody")
|
|
719
|
+
});
|
|
720
|
+
const Pe = (e) => {
|
|
721
|
+
const { blockProps: t, children: l, styles: o } = e;
|
|
722
|
+
return l ? u.createElement("tr", { ...t, ...o }, l) : /* @__PURE__ */ a.jsx(k, { blockProps: t, text: "TABLE CELL" });
|
|
723
|
+
};
|
|
724
|
+
d(Pe, {
|
|
725
|
+
type: "TableRow",
|
|
726
|
+
label: "Table Row",
|
|
727
|
+
category: "core",
|
|
728
|
+
group: "table",
|
|
729
|
+
icon: J,
|
|
730
|
+
props: {
|
|
731
|
+
styles: c({ default: "w-full" })
|
|
732
|
+
},
|
|
733
|
+
blocks: S("TableRow")
|
|
734
|
+
});
|
|
735
|
+
const Ce = (e) => {
|
|
736
|
+
const { blockProps: t, children: l, content: o, styles: n } = e;
|
|
737
|
+
return !l && I(o) ? /* @__PURE__ */ a.jsx(k, { blockProps: t }) : l ? u.createElement("td", { ...t, ...n }, l) : u.createElement("td", {
|
|
738
|
+
...t,
|
|
739
|
+
...n,
|
|
740
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
741
|
+
});
|
|
742
|
+
};
|
|
743
|
+
d(Ce, {
|
|
744
|
+
type: "TableCell",
|
|
745
|
+
label: "Table Cell",
|
|
746
|
+
category: "core",
|
|
747
|
+
group: "table",
|
|
748
|
+
icon: Q,
|
|
749
|
+
props: {
|
|
750
|
+
styles: c({ default: "" }),
|
|
751
|
+
content: L({ title: "Content", default: "Table cell item" })
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
const Ne = (e) => {
|
|
755
|
+
const { blockProps: t, errorMessage: l, name: o, _type: n, successMessage: r, action: s, styles: i, children: f } = e;
|
|
756
|
+
if (!f && I(i == null ? void 0 : i.className))
|
|
757
|
+
return /* @__PURE__ */ a.jsx(k, { blockProps: t, text: "FORM FIELDS" });
|
|
758
|
+
const p = {
|
|
759
|
+
"x-data": "useForm",
|
|
760
|
+
"x-on:submit.prevent": "post"
|
|
761
|
+
}, h = {
|
|
762
|
+
"x-html": "formResponse",
|
|
763
|
+
":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
|
|
764
|
+
};
|
|
765
|
+
return /* @__PURE__ */ a.jsxs(
|
|
766
|
+
"form",
|
|
767
|
+
{
|
|
768
|
+
...p,
|
|
769
|
+
"data-error": l,
|
|
770
|
+
"data-success": r,
|
|
771
|
+
method: "post",
|
|
772
|
+
action: s,
|
|
773
|
+
...t,
|
|
774
|
+
...i,
|
|
775
|
+
children: [
|
|
776
|
+
/* @__PURE__ */ a.jsx("div", { ...h }),
|
|
777
|
+
/* @__PURE__ */ a.jsx("input", { name: "formname", type: "hidden", value: o || n }),
|
|
778
|
+
f
|
|
779
|
+
]
|
|
780
|
+
}
|
|
781
|
+
);
|
|
782
|
+
};
|
|
783
|
+
d(Ne, {
|
|
784
|
+
type: "Form",
|
|
785
|
+
label: "Form",
|
|
786
|
+
category: "core",
|
|
787
|
+
icon: ee,
|
|
788
|
+
group: "form",
|
|
789
|
+
props: {
|
|
790
|
+
styles: c({ default: "" }),
|
|
791
|
+
action: m({
|
|
792
|
+
title: "Submit URL",
|
|
793
|
+
default: "/api/form/submit"
|
|
794
|
+
}),
|
|
795
|
+
errorMessage: L({
|
|
796
|
+
title: "Error Message",
|
|
797
|
+
default: "Something went wrong. Please try again"
|
|
798
|
+
}),
|
|
799
|
+
successMessage: L({
|
|
800
|
+
title: "Success Message",
|
|
801
|
+
default: "Thank you for your submission."
|
|
802
|
+
})
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
const Me = (e) => {
|
|
806
|
+
const { blockProps: t, content: l, styles: o, children: n } = e, r = { ...o, ...t };
|
|
807
|
+
return n ? u.createElement("label", r, n) : u.createElement("label", {
|
|
808
|
+
...r,
|
|
809
|
+
dangerouslySetInnerHTML: { __html: l }
|
|
810
|
+
});
|
|
811
|
+
};
|
|
812
|
+
d(Me, {
|
|
813
|
+
type: "Label",
|
|
814
|
+
label: "Label",
|
|
815
|
+
category: "core",
|
|
816
|
+
icon: te,
|
|
817
|
+
group: "form",
|
|
818
|
+
props: {
|
|
819
|
+
styles: c({ default: "" }),
|
|
820
|
+
content: m({ title: "Content", default: "Label" })
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
const Re = (e) => {
|
|
824
|
+
const {
|
|
825
|
+
blockProps: t,
|
|
826
|
+
label: l,
|
|
827
|
+
placeholder: o,
|
|
828
|
+
styles: n,
|
|
829
|
+
inputStyles: r,
|
|
830
|
+
showLabel: s,
|
|
831
|
+
required: i,
|
|
832
|
+
inputType: f = "text",
|
|
833
|
+
inBuilder: p,
|
|
834
|
+
fieldName: h
|
|
835
|
+
} = e, y = x();
|
|
836
|
+
return !s || f === "submit" ? (f === "submit" && (t.value = l), /* @__PURE__ */ a.jsx(
|
|
837
|
+
"input",
|
|
838
|
+
{
|
|
839
|
+
id: y,
|
|
840
|
+
name: h,
|
|
841
|
+
readOnly: p,
|
|
842
|
+
...t,
|
|
843
|
+
...r,
|
|
844
|
+
...n,
|
|
845
|
+
type: f,
|
|
846
|
+
placeholder: o,
|
|
847
|
+
required: i
|
|
848
|
+
}
|
|
849
|
+
)) : /* @__PURE__ */ a.jsxs("div", { ...n, ...t, children: [
|
|
850
|
+
s && /* @__PURE__ */ a.jsx("label", { htmlFor: y, children: l }),
|
|
851
|
+
/* @__PURE__ */ a.jsx(
|
|
852
|
+
"input",
|
|
853
|
+
{
|
|
854
|
+
name: h,
|
|
855
|
+
readOnly: p,
|
|
856
|
+
...r,
|
|
857
|
+
id: y,
|
|
858
|
+
type: f,
|
|
859
|
+
placeholder: o,
|
|
860
|
+
required: i
|
|
861
|
+
}
|
|
862
|
+
)
|
|
863
|
+
] });
|
|
864
|
+
};
|
|
865
|
+
d(Re, {
|
|
866
|
+
type: "Input",
|
|
867
|
+
label: "Input",
|
|
868
|
+
category: "core",
|
|
869
|
+
icon: R,
|
|
870
|
+
group: "form",
|
|
871
|
+
props: {
|
|
872
|
+
styles: c({ default: "" }),
|
|
873
|
+
fieldName: m({ title: "Field Name", default: "input" }),
|
|
874
|
+
inputType: w({
|
|
875
|
+
title: "Type",
|
|
876
|
+
options: _(
|
|
877
|
+
["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
|
|
878
|
+
(e) => ({
|
|
879
|
+
value: e,
|
|
880
|
+
title: e
|
|
881
|
+
})
|
|
882
|
+
),
|
|
883
|
+
default: "text"
|
|
884
|
+
}),
|
|
885
|
+
value: m({ title: "Value", default: "" }),
|
|
886
|
+
showLabel: g({ title: "Show label", default: !0 }),
|
|
887
|
+
inputStyles: c({ default: "w-full p-1" }),
|
|
888
|
+
label: m({ title: "Label", default: "Label" }),
|
|
889
|
+
placeholder: m({
|
|
890
|
+
title: "Placeholder",
|
|
891
|
+
default: "Placeholder"
|
|
892
|
+
}),
|
|
893
|
+
required: g({ title: "Required", default: !1 })
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
const He = (e) => {
|
|
897
|
+
const { blockProps: t, fieldName: l, label: o, placeholder: n, styles: r, inputStyles: s, _rows: i, showLabel: f } = e, p = x();
|
|
898
|
+
return f ? /* @__PURE__ */ a.jsxs("div", { ...r, ...t, children: [
|
|
899
|
+
f && /* @__PURE__ */ a.jsx("label", { htmlFor: p, children: o }),
|
|
900
|
+
/* @__PURE__ */ a.jsx("textarea", { name: l, ...s, id: p, placeholder: n, rows: i })
|
|
901
|
+
] }) : /* @__PURE__ */ a.jsx(
|
|
902
|
+
"textarea",
|
|
903
|
+
{
|
|
904
|
+
id: p,
|
|
905
|
+
name: l,
|
|
906
|
+
...t,
|
|
907
|
+
...s,
|
|
908
|
+
...r,
|
|
909
|
+
placeholder: n,
|
|
910
|
+
rows: i
|
|
911
|
+
}
|
|
912
|
+
);
|
|
913
|
+
};
|
|
914
|
+
d(He, {
|
|
915
|
+
type: "TextArea",
|
|
916
|
+
label: "TextArea",
|
|
917
|
+
category: "core",
|
|
918
|
+
icon: R,
|
|
919
|
+
group: "form",
|
|
920
|
+
props: {
|
|
921
|
+
fieldName: m({ title: "Field Name", default: "textarea" }),
|
|
922
|
+
showLabel: g({ title: "Show label", default: !0 }),
|
|
923
|
+
styles: c({ default: "" }),
|
|
924
|
+
inputStyles: c({ default: "w-full p-1" }),
|
|
925
|
+
label: m({ title: "Label", default: "Label" }),
|
|
926
|
+
placeholder: m({
|
|
927
|
+
title: "Placeholder",
|
|
928
|
+
default: "Placeholder"
|
|
929
|
+
}),
|
|
930
|
+
_rows: se({ title: "Rows", default: 3 })
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
const qe = (e) => {
|
|
934
|
+
const {
|
|
935
|
+
blockProps: t,
|
|
936
|
+
fieldName: l,
|
|
937
|
+
label: o,
|
|
938
|
+
placeholder: n,
|
|
939
|
+
styles: r,
|
|
940
|
+
inputStyles: s,
|
|
941
|
+
required: i,
|
|
942
|
+
showLabel: f,
|
|
943
|
+
_multiple: p = !1
|
|
944
|
+
} = e, h = x();
|
|
945
|
+
return f ? /* @__PURE__ */ a.jsxs("div", { ...r, children: [
|
|
946
|
+
f && /* @__PURE__ */ a.jsx("label", { htmlFor: h, children: o }),
|
|
947
|
+
/* @__PURE__ */ a.jsxs(
|
|
948
|
+
"select",
|
|
949
|
+
{
|
|
950
|
+
...s,
|
|
951
|
+
id: h,
|
|
952
|
+
placeholder: n,
|
|
953
|
+
required: i,
|
|
954
|
+
multiple: p,
|
|
955
|
+
name: l,
|
|
956
|
+
children: [
|
|
957
|
+
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
|
|
958
|
+
_(e.options, (y) => /* @__PURE__ */ a.jsx(
|
|
959
|
+
"option",
|
|
960
|
+
{
|
|
961
|
+
selected: b(y, "selected", !1),
|
|
962
|
+
value: y.value,
|
|
963
|
+
dangerouslySetInnerHTML: { __html: y.label }
|
|
964
|
+
},
|
|
965
|
+
y.value
|
|
966
|
+
))
|
|
967
|
+
]
|
|
968
|
+
}
|
|
969
|
+
)
|
|
970
|
+
] }) : /* @__PURE__ */ a.jsxs(
|
|
971
|
+
"select",
|
|
972
|
+
{
|
|
973
|
+
id: h,
|
|
974
|
+
...r,
|
|
975
|
+
...t,
|
|
976
|
+
placeholder: n,
|
|
977
|
+
required: i,
|
|
978
|
+
multiple: p,
|
|
979
|
+
name: l,
|
|
980
|
+
children: [
|
|
981
|
+
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: n }),
|
|
982
|
+
_(e.options, (y) => /* @__PURE__ */ a.jsx(
|
|
983
|
+
"option",
|
|
984
|
+
{
|
|
985
|
+
selected: b(y, "selected", !1),
|
|
986
|
+
value: y.value,
|
|
987
|
+
dangerouslySetInnerHTML: { __html: y.label }
|
|
988
|
+
},
|
|
989
|
+
y.value
|
|
990
|
+
))
|
|
991
|
+
]
|
|
992
|
+
}
|
|
993
|
+
);
|
|
994
|
+
};
|
|
995
|
+
d(qe, {
|
|
996
|
+
type: "Select",
|
|
997
|
+
label: "Select",
|
|
998
|
+
category: "core",
|
|
999
|
+
icon: le,
|
|
1000
|
+
group: "form",
|
|
1001
|
+
props: {
|
|
1002
|
+
styles: c({ default: "" }),
|
|
1003
|
+
fieldName: m({ title: "Field Name", default: "select" }),
|
|
1004
|
+
showLabel: g({ title: "Show label", default: !0 }),
|
|
1005
|
+
inputStyles: c({ default: "w-full p-1" }),
|
|
1006
|
+
label: m({ title: "Label", default: "Label" }),
|
|
1007
|
+
placeholder: m({
|
|
1008
|
+
title: "Placeholder",
|
|
1009
|
+
default: "Placeholder"
|
|
1010
|
+
}),
|
|
1011
|
+
required: g({ title: "Required", default: !1 }),
|
|
1012
|
+
_multiple: g({ title: "Multiple Choice", default: !1 }),
|
|
1013
|
+
options: ce({
|
|
1014
|
+
title: "Options",
|
|
1015
|
+
itemProperties: {
|
|
1016
|
+
label: m({ title: "Label", default: "" }),
|
|
1017
|
+
value: m({ title: "Value", default: "" })
|
|
1018
|
+
}
|
|
1019
|
+
})
|
|
1020
|
+
}
|
|
1021
|
+
});
|
|
1022
|
+
const Ae = (e) => {
|
|
1023
|
+
const { blockProps: t, fieldName: l, label: o, styles: n, inputStyles: r, required: s, checked: i, showLabel: f = !0 } = e, p = x();
|
|
1024
|
+
return f ? /* @__PURE__ */ a.jsxs("div", { ...n, ...t, children: [
|
|
1025
|
+
/* @__PURE__ */ a.jsx(
|
|
1026
|
+
"input",
|
|
1027
|
+
{
|
|
1028
|
+
...r,
|
|
1029
|
+
name: l,
|
|
1030
|
+
id: p,
|
|
1031
|
+
type: "checkbox",
|
|
1032
|
+
required: s,
|
|
1033
|
+
defaultChecked: i
|
|
1034
|
+
}
|
|
1035
|
+
),
|
|
1036
|
+
o && o !== "Label" && /* @__PURE__ */ a.jsx("label", { htmlFor: p, children: o })
|
|
1037
|
+
] }) : /* @__PURE__ */ a.jsx(
|
|
1038
|
+
"input",
|
|
1039
|
+
{
|
|
1040
|
+
id: p,
|
|
1041
|
+
...t,
|
|
1042
|
+
...r,
|
|
1043
|
+
...n,
|
|
1044
|
+
type: "checkbox",
|
|
1045
|
+
required: s,
|
|
1046
|
+
name: l
|
|
1047
|
+
}
|
|
1048
|
+
);
|
|
1049
|
+
};
|
|
1050
|
+
d(Ae, {
|
|
1051
|
+
type: "Checkbox",
|
|
1052
|
+
label: "Checkbox",
|
|
1053
|
+
category: "core",
|
|
1054
|
+
icon: oe,
|
|
1055
|
+
group: "form",
|
|
1056
|
+
props: {
|
|
1057
|
+
fieldName: m({ title: "Field Name", default: "checkbox" }),
|
|
1058
|
+
styles: c({ default: "flex items-center gap-x-2" }),
|
|
1059
|
+
label: m({ title: "Label", default: "Label" }),
|
|
1060
|
+
checked: g({ title: "Checked", default: !1 }),
|
|
1061
|
+
required: g({ title: "Required", default: !1 })
|
|
1062
|
+
}
|
|
1063
|
+
});
|
|
1064
|
+
const Fe = (e) => {
|
|
1065
|
+
const { blockProps: t, fieldName: l, label: o, styles: n, inputStyles: r, checked: s, required: i, showLabel: f = !0 } = e, p = x();
|
|
1066
|
+
return f ? /* @__PURE__ */ a.jsxs("div", { ...n, ...t, children: [
|
|
1067
|
+
/* @__PURE__ */ a.jsx("input", { ...r, name: l, id: p, type: "radio", required: i, defaultChecked: s }),
|
|
1068
|
+
o && /* @__PURE__ */ a.jsx("label", { htmlFor: p, children: o })
|
|
1069
|
+
] }) : /* @__PURE__ */ a.jsx(
|
|
1070
|
+
"input",
|
|
1071
|
+
{
|
|
1072
|
+
id: p,
|
|
1073
|
+
...t,
|
|
1074
|
+
...r,
|
|
1075
|
+
...n,
|
|
1076
|
+
type: "radio",
|
|
1077
|
+
required: i,
|
|
1078
|
+
checked: s,
|
|
1079
|
+
name: l
|
|
1080
|
+
}
|
|
1081
|
+
);
|
|
1082
|
+
};
|
|
1083
|
+
d(Fe, {
|
|
1084
|
+
type: "Radio",
|
|
1085
|
+
label: "Radio",
|
|
1086
|
+
category: "core",
|
|
1087
|
+
icon: ne,
|
|
1088
|
+
group: "form",
|
|
1089
|
+
props: {
|
|
1090
|
+
styles: c({ default: "flex items-center w-max gap-x-2" }),
|
|
1091
|
+
fieldName: m({ title: "Field Name", default: "radio" }),
|
|
1092
|
+
label: m({ title: "Label", default: "Label" }),
|
|
1093
|
+
checked: g({ title: "Checked", default: !1 }),
|
|
1094
|
+
required: g({ title: "Required", default: !1 })
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
const $e = (e) => {
|
|
1098
|
+
const { blockProps: t, inBuilder: l, label: o, placeholder: n, styles: r, inputStyles: s, icon: i, iconPos: f } = e, p = x(), h = {
|
|
1099
|
+
"x-bind:disabled": "formLoading"
|
|
1100
|
+
};
|
|
1101
|
+
return /* @__PURE__ */ a.jsxs(
|
|
1102
|
+
"button",
|
|
1103
|
+
{
|
|
1104
|
+
id: p,
|
|
1105
|
+
...h,
|
|
1106
|
+
...s,
|
|
1107
|
+
...r,
|
|
1108
|
+
...t || {},
|
|
1109
|
+
type: l ? "button" : "submit",
|
|
1110
|
+
placeholder: n,
|
|
1111
|
+
children: [
|
|
1112
|
+
o,
|
|
1113
|
+
i && /* @__PURE__ */ a.jsx("span", { className: f, dangerouslySetInnerHTML: { __html: i } })
|
|
1114
|
+
]
|
|
1115
|
+
}
|
|
1116
|
+
);
|
|
1117
|
+
};
|
|
1118
|
+
d($e, {
|
|
1119
|
+
type: "FormButton",
|
|
1120
|
+
label: "Submit Button",
|
|
1121
|
+
category: "core",
|
|
1122
|
+
icon: N,
|
|
1123
|
+
group: "form",
|
|
1124
|
+
props: {
|
|
1125
|
+
label: m({ title: "Label", default: "Submit" }),
|
|
1126
|
+
styles: c({
|
|
1127
|
+
default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
|
|
1128
|
+
}),
|
|
1129
|
+
icon: B({ title: "Icon", default: "" }),
|
|
1130
|
+
iconPos: w({
|
|
1131
|
+
title: "Icon Position",
|
|
1132
|
+
default: "order-last",
|
|
1133
|
+
options: [
|
|
1134
|
+
{ title: "Start", value: "order-first" },
|
|
1135
|
+
{ title: "End", value: "order-last" }
|
|
1136
|
+
]
|
|
1137
|
+
})
|
|
1138
|
+
}
|
|
1139
|
+
});
|
|
1140
|
+
export {
|
|
1141
|
+
ie as b,
|
|
1142
|
+
se as c,
|
|
1143
|
+
w as f,
|
|
1144
|
+
j as g,
|
|
1145
|
+
de as o,
|
|
1146
|
+
g as r,
|
|
1147
|
+
m as u,
|
|
1148
|
+
We as y
|
|
1149
|
+
};
|