@billgangcom/theme-lib 1.7.0 → 1.8.1
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/App.d.ts +5 -0
- package/dist/builder.cjs.js +4 -5
- package/dist/builder.es.js +1363 -3688
- package/dist/index-C6aV8YdJ.js +6290 -0
- package/dist/index-aZQncUjW.cjs +40 -0
- package/dist/shared/ui/Button/index.d.ts +2 -0
- package/dist/shared/ui/Icon/index.d.ts +3 -1
- package/dist/shared/ui/Input/index.d.ts +1 -0
- package/dist/store/useChooseImageStore.d.ts +3 -0
- package/dist/ui/ButtonTypeSettings/index.d.ts +3 -1
- package/dist/ui/ButtonsSettings/index.d.ts +6 -5
- package/dist/ui/ButtonsSettings/popup.d.ts +1 -1
- package/dist/ui/ChooseImage/index.d.ts +1 -0
- package/dist/ui/ItemsSettings/index.d.ts +14 -10
- package/dist/ui/ItemsSettings/popup.d.ts +47 -3
- package/dist/ui/LayoutSettings/index.d.ts +2 -2
- package/dist/ui/OtherSettings/index.d.ts +6 -3
- package/dist/ui/RangeSelector/index.d.ts +11 -0
- package/dist/ui/TextSettings/index.d.ts +7 -7
- package/dist/ui/TypesText/index.d.ts +7 -0
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +765 -421
- package/package.json +1 -1
- package/dist/index-DPhpcpnj.cjs +0 -39
- package/dist/index-DxdTFgwx.js +0 -3958
- package/dist/ui/TypeTexts/index.d.ts +0 -7
package/dist/ui.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
wrapper:
|
|
6
|
-
alignmentBlock:
|
|
7
|
-
title:
|
|
8
|
-
subtitle:
|
|
9
|
-
alignmentContent:
|
|
10
|
-
alignments:
|
|
11
|
-
alignment:
|
|
12
|
-
circle:
|
|
13
|
-
paddings:
|
|
14
|
-
padding:
|
|
15
|
-
input:
|
|
16
|
-
},
|
|
1
|
+
import { j as t, I as g, a as I, c as U, S as P, T as q, C as J, b as D, D as et, H as st, B as K, v as E, u as nt, d as ot } from "./index-C6aV8YdJ.js";
|
|
2
|
+
import { h as rs, i as ds, f as us, M as _s, P as ps, R as ms, e as hs, g as gs } from "./index-C6aV8YdJ.js";
|
|
3
|
+
import v from "react";
|
|
4
|
+
const ct = "_wrapper_1g82c_2", lt = "_alignmentBlock_1g82c_8", it = "_title_1g82c_15", at = "_subtitle_1g82c_22", rt = "_alignmentContent_1g82c_29", dt = "_alignments_1g82c_35", ut = "_alignment_1g82c_8", _t = "_circle_1g82c_54", pt = "_paddings_1g82c_61", mt = "_padding_1g82c_61", ht = "_input_1g82c_79", $ = {
|
|
5
|
+
wrapper: ct,
|
|
6
|
+
alignmentBlock: lt,
|
|
7
|
+
title: it,
|
|
8
|
+
subtitle: at,
|
|
9
|
+
alignmentContent: rt,
|
|
10
|
+
alignments: dt,
|
|
11
|
+
alignment: ut,
|
|
12
|
+
circle: _t,
|
|
13
|
+
paddings: pt,
|
|
14
|
+
padding: mt,
|
|
15
|
+
input: ht
|
|
16
|
+
}, gt = [
|
|
17
17
|
"topLeft",
|
|
18
18
|
"top",
|
|
19
19
|
"topRight",
|
|
@@ -23,10 +23,10 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
|
|
|
23
23
|
"bottomLeft",
|
|
24
24
|
"bottom",
|
|
25
25
|
"bottomRight"
|
|
26
|
-
],
|
|
27
|
-
const { alignment:
|
|
28
|
-
function
|
|
29
|
-
switch (
|
|
26
|
+
], xt = ["left", "top", "right", "bottom"], cs = (d) => {
|
|
27
|
+
const { alignment: s, padding: o, setPadding: c, setAlignment: l } = d;
|
|
28
|
+
function e() {
|
|
29
|
+
switch (s) {
|
|
30
30
|
case "left":
|
|
31
31
|
case "topLeft":
|
|
32
32
|
case "bottomLeft":
|
|
@@ -43,24 +43,24 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
|
|
|
43
43
|
return "center";
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
47
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
48
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
49
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
50
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
51
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
46
|
+
return /* @__PURE__ */ t.jsxs("div", { className: $.layout, children: [
|
|
47
|
+
/* @__PURE__ */ t.jsx("h3", { className: $.title, children: "Layout" }),
|
|
48
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.alignmentBlock, children: [
|
|
49
|
+
/* @__PURE__ */ t.jsx("h5", { className: $.subtitle, children: "Alignment" }),
|
|
50
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.alignmentContent, children: [
|
|
51
|
+
/* @__PURE__ */ t.jsx("div", { className: $.alignments, children: gt.map((n) => /* @__PURE__ */ t.jsxs(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
54
|
onClick: () => {
|
|
55
|
-
n
|
|
55
|
+
l(n);
|
|
56
56
|
},
|
|
57
|
-
className:
|
|
57
|
+
className: $.alignment,
|
|
58
58
|
children: [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
n !== s && /* @__PURE__ */ t.jsx("div", { className: $.circle }),
|
|
60
|
+
n === s && /* @__PURE__ */ t.jsx(
|
|
61
|
+
g,
|
|
62
62
|
{
|
|
63
|
-
name: `text-align-${
|
|
63
|
+
name: `text-align-${e()}`,
|
|
64
64
|
fill: "#FF3F19",
|
|
65
65
|
width: 22,
|
|
66
66
|
height: 22
|
|
@@ -68,26 +68,26 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
|
|
|
68
68
|
)
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
|
-
|
|
71
|
+
n
|
|
72
72
|
)) }),
|
|
73
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
73
|
+
/* @__PURE__ */ t.jsx("div", { className: $.paddings, children: xt.map((n) => /* @__PURE__ */ t.jsxs("label", { className: $.padding, children: [
|
|
74
74
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
75
|
-
|
|
75
|
+
g,
|
|
76
76
|
{
|
|
77
|
-
name: `align-${
|
|
77
|
+
name: `align-${n}`,
|
|
78
78
|
width: 20,
|
|
79
79
|
height: 20
|
|
80
80
|
}
|
|
81
81
|
) }),
|
|
82
82
|
/* @__PURE__ */ t.jsx(
|
|
83
|
-
|
|
83
|
+
I,
|
|
84
84
|
{
|
|
85
85
|
type: "text",
|
|
86
|
-
value: String(
|
|
87
|
-
onChange: (
|
|
86
|
+
value: String(o[n]),
|
|
87
|
+
onChange: (i) => c({
|
|
88
88
|
...o,
|
|
89
|
-
[
|
|
90
|
-
})
|
|
89
|
+
[n]: Number(i)
|
|
90
|
+
}),
|
|
91
91
|
paddingless: !0,
|
|
92
92
|
borderless: !0
|
|
93
93
|
}
|
|
@@ -96,190 +96,360 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
|
|
|
96
96
|
] })
|
|
97
97
|
] })
|
|
98
98
|
] });
|
|
99
|
-
},
|
|
100
|
-
subtitle:
|
|
101
|
-
header:
|
|
102
|
-
text:
|
|
103
|
-
top:
|
|
104
|
-
itemsBlock:
|
|
105
|
-
},
|
|
106
|
-
typeTexts:
|
|
107
|
-
block:
|
|
108
|
-
active:
|
|
109
|
-
},
|
|
110
|
-
const {
|
|
111
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
99
|
+
}, bt = "_subtitle_2zbxx_1", ft = "_header_2zbxx_8", vt = "_text_2zbxx_9", jt = "_top_2zbxx_16", kt = "_itemsBlock_2zbxx_23", O = {
|
|
100
|
+
subtitle: bt,
|
|
101
|
+
header: ft,
|
|
102
|
+
text: vt,
|
|
103
|
+
top: jt,
|
|
104
|
+
itemsBlock: kt
|
|
105
|
+
}, yt = "_typeTexts_3zlec_1", $t = "_block_3zlec_7", wt = "_active_3zlec_18", H = {
|
|
106
|
+
typeTexts: yt,
|
|
107
|
+
block: $t,
|
|
108
|
+
active: wt
|
|
109
|
+
}, Bt = ["bold", "italic", "underline", "strike-through", "code"], Q = (d) => {
|
|
110
|
+
const { typesText: s, setTypesText: o } = d;
|
|
111
|
+
return /* @__PURE__ */ t.jsx("div", { className: H.typeTexts, children: Bt.map((c) => /* @__PURE__ */ t.jsx(
|
|
112
112
|
"div",
|
|
113
113
|
{
|
|
114
|
-
className:
|
|
115
|
-
[
|
|
114
|
+
className: U(H.block, {
|
|
115
|
+
[H.active]: s.includes(c)
|
|
116
116
|
}),
|
|
117
|
-
onClick: () =>
|
|
117
|
+
onClick: () => {
|
|
118
|
+
const l = [...s];
|
|
119
|
+
if (l.includes(c)) {
|
|
120
|
+
const e = l.filter((n) => n !== c);
|
|
121
|
+
o(e);
|
|
122
|
+
} else
|
|
123
|
+
l.push(c), o(l);
|
|
124
|
+
},
|
|
118
125
|
children: /* @__PURE__ */ t.jsx(
|
|
119
|
-
|
|
126
|
+
g,
|
|
120
127
|
{
|
|
121
|
-
name: `text-${
|
|
122
|
-
fill:
|
|
128
|
+
name: `text-${c}`,
|
|
129
|
+
fill: s.includes(c) ? "#252525" : "#757575",
|
|
123
130
|
width: 20,
|
|
124
131
|
height: 20
|
|
125
132
|
}
|
|
126
133
|
)
|
|
127
134
|
},
|
|
128
|
-
String(
|
|
135
|
+
String(c)
|
|
129
136
|
)) });
|
|
130
|
-
},
|
|
137
|
+
}, Nt = (d) => {
|
|
131
138
|
const {
|
|
132
|
-
|
|
133
|
-
isActiveText:
|
|
134
|
-
setIsActiveText:
|
|
135
|
-
text:
|
|
136
|
-
setText:
|
|
137
|
-
|
|
138
|
-
title:
|
|
139
|
-
subtitle:
|
|
140
|
-
} =
|
|
141
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
142
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
143
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
144
|
-
/* @__PURE__ */ t.jsx(
|
|
145
|
-
|
|
139
|
+
typesText: s,
|
|
140
|
+
isActiveText: o,
|
|
141
|
+
setIsActiveText: c,
|
|
142
|
+
text: l,
|
|
143
|
+
setText: e,
|
|
144
|
+
setTypesText: n,
|
|
145
|
+
title: i,
|
|
146
|
+
subtitle: h = "Items"
|
|
147
|
+
} = d;
|
|
148
|
+
return /* @__PURE__ */ t.jsxs("div", { className: O.text, children: [
|
|
149
|
+
(i || o) && /* @__PURE__ */ t.jsxs("div", { className: O.top, children: [
|
|
150
|
+
i && /* @__PURE__ */ t.jsx("h3", { className: O.title, children: i }),
|
|
151
|
+
o && c && /* @__PURE__ */ t.jsx(
|
|
152
|
+
P,
|
|
146
153
|
{
|
|
147
|
-
current:
|
|
148
|
-
onChange: (
|
|
154
|
+
current: o,
|
|
155
|
+
onChange: (j) => c(j)
|
|
149
156
|
}
|
|
150
157
|
)
|
|
151
158
|
] }),
|
|
152
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
153
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
159
|
+
/* @__PURE__ */ t.jsxs("div", { className: O.itemsBlock, children: [
|
|
160
|
+
/* @__PURE__ */ t.jsx("h5", { className: O.subtitle, children: h }),
|
|
154
161
|
/* @__PURE__ */ t.jsx(
|
|
155
|
-
|
|
162
|
+
q,
|
|
156
163
|
{
|
|
157
|
-
onChange: (
|
|
158
|
-
value:
|
|
164
|
+
onChange: (j) => e(j),
|
|
165
|
+
value: l,
|
|
159
166
|
maxLength: 150
|
|
160
167
|
}
|
|
161
168
|
),
|
|
162
169
|
/* @__PURE__ */ t.jsx(
|
|
163
|
-
|
|
170
|
+
Q,
|
|
164
171
|
{
|
|
165
|
-
|
|
166
|
-
|
|
172
|
+
typesText: s,
|
|
173
|
+
setTypesText: n
|
|
167
174
|
}
|
|
168
175
|
)
|
|
169
176
|
] })
|
|
170
177
|
] });
|
|
171
|
-
},
|
|
172
|
-
subtitle:
|
|
173
|
-
header:
|
|
174
|
-
text:
|
|
175
|
-
productsBlock:
|
|
176
|
-
top:
|
|
177
|
-
itemsBlock:
|
|
178
|
-
typeTexts:
|
|
179
|
-
block:
|
|
180
|
-
active:
|
|
181
|
-
products:
|
|
182
|
-
product:
|
|
183
|
-
button:
|
|
184
|
-
image:
|
|
185
|
-
info:
|
|
186
|
-
name:
|
|
187
|
-
buttons:
|
|
188
|
-
modal:
|
|
189
|
-
|
|
190
|
-
|
|
178
|
+
}, Ct = "_subtitle_1nl8x_1", Tt = "_header_1nl8x_8", It = "_text_1nl8x_9", Pt = "_productsBlock_1nl8x_10", St = "_top_1nl8x_22", At = "_itemsBlock_1nl8x_29", Ot = "_typeTexts_1nl8x_35", Lt = "_block_1nl8x_41", Dt = "_active_1nl8x_52", Rt = "_products_1nl8x_10", Et = "_product_1nl8x_10", zt = "_button_1nl8x_70", Ht = "_image_1nl8x_80", Mt = "_info_1nl8x_87", Ft = "_name_1nl8x_98", Gt = "_buttons_1nl8x_102", Yt = "_modal_1nl8x_108", Ut = "_link_1nl8x_126", qt = "_modalOptions_1nl8x_132", f = {
|
|
179
|
+
subtitle: Ct,
|
|
180
|
+
header: Tt,
|
|
181
|
+
text: It,
|
|
182
|
+
productsBlock: Pt,
|
|
183
|
+
top: St,
|
|
184
|
+
itemsBlock: At,
|
|
185
|
+
typeTexts: Ot,
|
|
186
|
+
block: Lt,
|
|
187
|
+
active: Dt,
|
|
188
|
+
products: Rt,
|
|
189
|
+
product: Et,
|
|
190
|
+
button: zt,
|
|
191
|
+
image: Ht,
|
|
192
|
+
info: Mt,
|
|
193
|
+
name: Ft,
|
|
194
|
+
buttons: Gt,
|
|
195
|
+
modal: Yt,
|
|
196
|
+
link: Ut,
|
|
197
|
+
modalOptions: qt
|
|
198
|
+
}, Jt = (d) => {
|
|
199
|
+
const { activeItem: s, setActiveItem: o, popupPosition: c, modalOptions: l } = d;
|
|
191
200
|
return /* @__PURE__ */ t.jsxs(
|
|
192
201
|
"div",
|
|
193
202
|
{
|
|
194
|
-
className:
|
|
195
|
-
onClick: (
|
|
196
|
-
|
|
203
|
+
className: f.modal,
|
|
204
|
+
onClick: (e) => {
|
|
205
|
+
e.stopPropagation();
|
|
197
206
|
},
|
|
198
207
|
style: {
|
|
199
|
-
top: `${
|
|
200
|
-
left: `${
|
|
208
|
+
top: `${c.top}px`,
|
|
209
|
+
left: `${c.left}px`
|
|
201
210
|
},
|
|
202
211
|
children: [
|
|
203
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
204
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
212
|
+
/* @__PURE__ */ t.jsxs("div", { className: f.top, children: [
|
|
213
|
+
/* @__PURE__ */ t.jsx("h3", { children: s.name }),
|
|
205
214
|
/* @__PURE__ */ t.jsx(
|
|
206
|
-
|
|
215
|
+
g,
|
|
207
216
|
{
|
|
208
217
|
name: "x",
|
|
209
218
|
height: 20,
|
|
210
219
|
width: 20,
|
|
211
220
|
hoverable: !0,
|
|
212
|
-
onClick: () =>
|
|
221
|
+
onClick: () => o(null)
|
|
213
222
|
}
|
|
214
223
|
)
|
|
215
224
|
] }),
|
|
216
|
-
/* @__PURE__ */ t.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
225
|
+
/* @__PURE__ */ t.jsx("div", { className: f.modalOptions, children: l.map((e) => {
|
|
226
|
+
if (e.type === "image")
|
|
227
|
+
return /* @__PURE__ */ t.jsx(
|
|
228
|
+
J,
|
|
229
|
+
{
|
|
230
|
+
label: "Put up an attractive image",
|
|
231
|
+
onChange: (n) => {
|
|
232
|
+
const i = {
|
|
233
|
+
...s,
|
|
234
|
+
[e.field]: n[0]
|
|
235
|
+
};
|
|
236
|
+
o(i);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
if (e.type === "text")
|
|
241
|
+
return /* @__PURE__ */ t.jsx(
|
|
242
|
+
Nt,
|
|
243
|
+
{
|
|
244
|
+
typesText: s[e.field.type],
|
|
245
|
+
setTypesText: (n) => {
|
|
246
|
+
const i = {
|
|
247
|
+
...s,
|
|
248
|
+
[e.field.type]: n
|
|
249
|
+
};
|
|
250
|
+
o(i);
|
|
251
|
+
},
|
|
252
|
+
text: s[e.field.text] || "",
|
|
253
|
+
setText: (n) => {
|
|
254
|
+
const i = {
|
|
255
|
+
...s,
|
|
256
|
+
[e.field.text]: n
|
|
257
|
+
};
|
|
258
|
+
o(i);
|
|
259
|
+
},
|
|
260
|
+
subtitle: e.label
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
if (e.type === "input")
|
|
264
|
+
return /* @__PURE__ */ t.jsx(
|
|
265
|
+
I,
|
|
266
|
+
{
|
|
267
|
+
onChange: (n) => {
|
|
268
|
+
const i = {
|
|
269
|
+
...s,
|
|
270
|
+
[e.field]: n
|
|
271
|
+
};
|
|
272
|
+
o(i);
|
|
273
|
+
},
|
|
274
|
+
value: s[e.field] || "",
|
|
275
|
+
label: e.label,
|
|
276
|
+
placeholder: e.placeholder
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
if (e.type === "inputSwitch")
|
|
280
|
+
return /* @__PURE__ */ t.jsxs("div", { className: f.link, children: [
|
|
281
|
+
/* @__PURE__ */ t.jsx(
|
|
282
|
+
I,
|
|
283
|
+
{
|
|
284
|
+
onChange: (n) => {
|
|
285
|
+
const i = {
|
|
286
|
+
...s,
|
|
287
|
+
[e.field.text]: n
|
|
288
|
+
};
|
|
289
|
+
o(i);
|
|
290
|
+
},
|
|
291
|
+
value: s[e.field.text] || "",
|
|
292
|
+
label: e.inputLabel,
|
|
293
|
+
placeholder: e.placeholder
|
|
294
|
+
}
|
|
295
|
+
),
|
|
296
|
+
/* @__PURE__ */ t.jsx(
|
|
297
|
+
P,
|
|
298
|
+
{
|
|
299
|
+
current: !!s[e.field.switch] || !1,
|
|
300
|
+
label: e.switchLabel,
|
|
301
|
+
onChange: (n) => {
|
|
302
|
+
const i = {
|
|
303
|
+
...s,
|
|
304
|
+
[e.field.switch]: n
|
|
305
|
+
};
|
|
306
|
+
o(i);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
)
|
|
310
|
+
] });
|
|
311
|
+
if (e.type === "list")
|
|
312
|
+
return /* @__PURE__ */ t.jsx(
|
|
313
|
+
Zt,
|
|
314
|
+
{
|
|
315
|
+
items: s[e.field] || [],
|
|
316
|
+
setItems: (n) => {
|
|
317
|
+
const i = {
|
|
318
|
+
...s,
|
|
319
|
+
[e.field]: n
|
|
320
|
+
};
|
|
321
|
+
o(i);
|
|
322
|
+
},
|
|
323
|
+
itemsType: "select",
|
|
324
|
+
draggable: e.draggable || !1,
|
|
325
|
+
itemsOptions: e.itemsOptions,
|
|
326
|
+
deletable: e.deletable || !1,
|
|
327
|
+
editable: !1,
|
|
328
|
+
subtitle: e.label
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
if (e.type === "select")
|
|
332
|
+
return /* @__PURE__ */ t.jsx(
|
|
333
|
+
D,
|
|
334
|
+
{
|
|
335
|
+
options: e.itemsOptions,
|
|
336
|
+
onChange: (n) => {
|
|
337
|
+
const i = {
|
|
338
|
+
...s,
|
|
339
|
+
[e.field]: n
|
|
340
|
+
};
|
|
341
|
+
o(i);
|
|
342
|
+
},
|
|
343
|
+
label: e.label,
|
|
344
|
+
value: s[e.field] || "String"
|
|
345
|
+
}
|
|
346
|
+
);
|
|
347
|
+
}) })
|
|
220
348
|
]
|
|
221
349
|
}
|
|
222
350
|
);
|
|
223
|
-
},
|
|
224
|
-
other:
|
|
225
|
-
subtitle:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
/* @__PURE__ */ t.jsx(
|
|
231
|
-
|
|
351
|
+
}, Kt = "_other_1wtgi_1", Qt = "_subtitle_1wtgi_7", Vt = "_items_1wtgi_14", M = {
|
|
352
|
+
other: Kt,
|
|
353
|
+
subtitle: Qt,
|
|
354
|
+
items: Vt
|
|
355
|
+
}, Wt = (d) => {
|
|
356
|
+
const { items: s, title: o = "Other" } = d;
|
|
357
|
+
return /* @__PURE__ */ t.jsxs("div", { className: M.other, children: [
|
|
358
|
+
/* @__PURE__ */ t.jsx("h5", { className: M.subtitle, children: o }),
|
|
359
|
+
/* @__PURE__ */ t.jsx("div", { className: M.items, children: s.map((c) => /* @__PURE__ */ t.jsx(
|
|
360
|
+
P,
|
|
232
361
|
{
|
|
233
|
-
current:
|
|
234
|
-
onChange: (
|
|
235
|
-
label:
|
|
362
|
+
current: c.isItem,
|
|
363
|
+
onChange: (l) => c.setIsItem(l),
|
|
364
|
+
label: c.label,
|
|
236
365
|
hasBackground: !0,
|
|
237
366
|
paddingless: !1
|
|
238
367
|
}
|
|
239
|
-
)
|
|
368
|
+
)) })
|
|
240
369
|
] });
|
|
241
|
-
},
|
|
370
|
+
}, Xt = (d) => {
|
|
371
|
+
const { index: s, moveProduct: o, children: c } = d, [, l] = nt({
|
|
372
|
+
accept: "product",
|
|
373
|
+
hover(i) {
|
|
374
|
+
i.index !== s && (o(i.index, s), i.index = s);
|
|
375
|
+
}
|
|
376
|
+
}), [{ isDragging: e }, n] = ot({
|
|
377
|
+
type: "product",
|
|
378
|
+
item: { index: s },
|
|
379
|
+
collect: (i) => ({
|
|
380
|
+
isDragging: i.isDragging()
|
|
381
|
+
})
|
|
382
|
+
});
|
|
383
|
+
return /* @__PURE__ */ t.jsx(
|
|
384
|
+
"div",
|
|
385
|
+
{
|
|
386
|
+
ref: (i) => n(l(i)),
|
|
387
|
+
className: `${f.product} ${e ? f.dragging : ""}`,
|
|
388
|
+
children: c
|
|
389
|
+
}
|
|
390
|
+
);
|
|
391
|
+
}, Zt = (d) => {
|
|
242
392
|
const {
|
|
243
|
-
isActiveItems:
|
|
244
|
-
setIsActiveItems:
|
|
245
|
-
items:
|
|
246
|
-
setItems:
|
|
247
|
-
other:
|
|
248
|
-
title:
|
|
249
|
-
subtitle:
|
|
250
|
-
editable:
|
|
251
|
-
draggable:
|
|
252
|
-
withImage:
|
|
253
|
-
deletable:
|
|
254
|
-
addable:
|
|
255
|
-
itemsType:
|
|
256
|
-
itemsPlaceholder:
|
|
257
|
-
itemsOptions:
|
|
258
|
-
|
|
393
|
+
isActiveItems: s,
|
|
394
|
+
setIsActiveItems: o,
|
|
395
|
+
items: c,
|
|
396
|
+
setItems: l,
|
|
397
|
+
other: e,
|
|
398
|
+
title: n,
|
|
399
|
+
subtitle: i,
|
|
400
|
+
editable: h = !0,
|
|
401
|
+
draggable: j = !1,
|
|
402
|
+
withImage: r = !1,
|
|
403
|
+
deletable: p = !0,
|
|
404
|
+
addable: u = !0,
|
|
405
|
+
itemsType: k,
|
|
406
|
+
itemsPlaceholder: x = "",
|
|
407
|
+
itemsOptions: _,
|
|
408
|
+
hasRangeSelector: R = !1,
|
|
409
|
+
rangeSelectorOptions: F,
|
|
410
|
+
modalOptions: G,
|
|
411
|
+
addableOptions: z = {}
|
|
412
|
+
} = d, [C, S] = v.useState(null), [V, W] = v.useState({
|
|
259
413
|
top: 0,
|
|
260
414
|
left: 0
|
|
261
|
-
})
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
415
|
+
}), X = (a, y) => {
|
|
416
|
+
const w = [...c], [b] = w.splice(a, 1);
|
|
417
|
+
w.splice(y, 0, b), l(w);
|
|
418
|
+
};
|
|
419
|
+
v.useEffect(() => {
|
|
420
|
+
const a = () => {
|
|
421
|
+
S(null);
|
|
265
422
|
};
|
|
266
|
-
return document.body.addEventListener("click",
|
|
267
|
-
|
|
423
|
+
return document.body.addEventListener("click", a), S(null), () => {
|
|
424
|
+
S(null), document.body.removeEventListener("click", a);
|
|
268
425
|
};
|
|
269
|
-
}, [])
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
426
|
+
}, []), v.useEffect(() => {
|
|
427
|
+
if (C) {
|
|
428
|
+
const a = [...c].map((y) => y.id === C.id ? C : y);
|
|
429
|
+
l(a);
|
|
430
|
+
}
|
|
431
|
+
}, [C]);
|
|
432
|
+
const Z = (a, y) => {
|
|
433
|
+
a.stopPropagation();
|
|
434
|
+
const w = a.target.getBoundingClientRect(), b = 100, A = window.innerHeight;
|
|
435
|
+
let B = w.top + window.scrollY;
|
|
436
|
+
B + b > A && (B = A - b - 20), W({
|
|
437
|
+
top: B - 80,
|
|
438
|
+
left: w.left - 30
|
|
439
|
+
}), S(y);
|
|
278
440
|
};
|
|
279
|
-
function
|
|
280
|
-
if (
|
|
281
|
-
return /* @__PURE__ */ t.jsx(
|
|
282
|
-
|
|
441
|
+
function tt(a) {
|
|
442
|
+
if (r)
|
|
443
|
+
return a ? /* @__PURE__ */ t.jsx(
|
|
444
|
+
"img",
|
|
445
|
+
{
|
|
446
|
+
src: `https://imagedelivery.net/${a}/w=1000`,
|
|
447
|
+
alt: "image",
|
|
448
|
+
width: 16,
|
|
449
|
+
height: 16
|
|
450
|
+
}
|
|
451
|
+
) : /* @__PURE__ */ t.jsx(
|
|
452
|
+
g,
|
|
283
453
|
{
|
|
284
454
|
name: "image",
|
|
285
455
|
width: 16,
|
|
@@ -288,119 +458,149 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
|
|
|
288
458
|
}
|
|
289
459
|
);
|
|
290
460
|
}
|
|
291
|
-
|
|
292
|
-
/* @__PURE__ */ t.jsxs(
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
461
|
+
const Y = (a, y) => {
|
|
462
|
+
const w = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
463
|
+
j && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
464
|
+
g,
|
|
465
|
+
{
|
|
466
|
+
name: "drag",
|
|
467
|
+
hoverable: !0,
|
|
468
|
+
width: 20,
|
|
469
|
+
height: 20
|
|
470
|
+
}
|
|
471
|
+
) }),
|
|
472
|
+
k === "select" && /* @__PURE__ */ t.jsx(
|
|
473
|
+
D,
|
|
474
|
+
{
|
|
475
|
+
onChange: (b) => {
|
|
476
|
+
const B = [...c].map((N) => N.id === a.id ? {
|
|
477
|
+
...a,
|
|
478
|
+
name: b
|
|
479
|
+
} : N);
|
|
480
|
+
l(B);
|
|
481
|
+
},
|
|
482
|
+
value: a.name,
|
|
483
|
+
options: _,
|
|
484
|
+
leftAddon: tt(a.image)
|
|
485
|
+
}
|
|
486
|
+
),
|
|
487
|
+
k === "input" && /* @__PURE__ */ t.jsx(
|
|
488
|
+
I,
|
|
489
|
+
{
|
|
490
|
+
onChange: (b) => {
|
|
491
|
+
const B = [...c].map((N) => N.id === a.id ? {
|
|
492
|
+
...a,
|
|
493
|
+
name: b
|
|
494
|
+
} : N);
|
|
495
|
+
l(B);
|
|
496
|
+
},
|
|
497
|
+
value: a.name,
|
|
498
|
+
placeholder: x
|
|
499
|
+
}
|
|
500
|
+
),
|
|
501
|
+
k === "image" && /* @__PURE__ */ t.jsx(
|
|
502
|
+
J,
|
|
296
503
|
{
|
|
297
|
-
|
|
298
|
-
|
|
504
|
+
onChange: (b) => {
|
|
505
|
+
const B = [...c].map((N) => N.id === a.id ? {
|
|
506
|
+
...a,
|
|
507
|
+
image: b[0]
|
|
508
|
+
} : N);
|
|
509
|
+
l(B);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
),
|
|
513
|
+
/* @__PURE__ */ t.jsxs("div", { className: f.buttons, children: [
|
|
514
|
+
h && /* @__PURE__ */ t.jsx(
|
|
515
|
+
g,
|
|
516
|
+
{
|
|
517
|
+
name: "sliders",
|
|
518
|
+
hoverable: !0,
|
|
519
|
+
width: 20,
|
|
520
|
+
height: 20,
|
|
521
|
+
onClick: (b) => Z(b, a)
|
|
522
|
+
}
|
|
523
|
+
),
|
|
524
|
+
p && /* @__PURE__ */ t.jsx(
|
|
525
|
+
g,
|
|
526
|
+
{
|
|
527
|
+
name: "trash",
|
|
528
|
+
hoverable: !0,
|
|
529
|
+
width: 20,
|
|
530
|
+
height: 20,
|
|
531
|
+
fill: "#C12A2A",
|
|
532
|
+
onClick: () => l(c.filter((b) => b.id !== a.id))
|
|
533
|
+
}
|
|
534
|
+
)
|
|
535
|
+
] })
|
|
536
|
+
] });
|
|
537
|
+
return j ? /* @__PURE__ */ t.jsx(
|
|
538
|
+
Xt,
|
|
539
|
+
{
|
|
540
|
+
product: a,
|
|
541
|
+
index: y,
|
|
542
|
+
moveProduct: X,
|
|
543
|
+
children: w
|
|
544
|
+
},
|
|
545
|
+
a.id
|
|
546
|
+
) : /* @__PURE__ */ t.jsx(
|
|
547
|
+
"div",
|
|
548
|
+
{
|
|
549
|
+
className: f.product,
|
|
550
|
+
children: w
|
|
551
|
+
},
|
|
552
|
+
a.id
|
|
553
|
+
);
|
|
554
|
+
};
|
|
555
|
+
return /* @__PURE__ */ t.jsxs("div", { className: f.productsBlock, children: [
|
|
556
|
+
(n || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: f.top, children: [
|
|
557
|
+
n && /* @__PURE__ */ t.jsx("h3", { className: f.title, children: n }),
|
|
558
|
+
s !== void 0 && /* @__PURE__ */ t.jsx(
|
|
559
|
+
P,
|
|
560
|
+
{
|
|
561
|
+
current: s,
|
|
562
|
+
onChange: (a) => o == null ? void 0 : o(a)
|
|
299
563
|
}
|
|
300
564
|
)
|
|
301
565
|
] }),
|
|
302
|
-
|
|
303
|
-
|
|
566
|
+
C && h && G && /* @__PURE__ */ t.jsx(
|
|
567
|
+
Jt,
|
|
304
568
|
{
|
|
305
|
-
activeItem:
|
|
306
|
-
setActiveItem:
|
|
307
|
-
popupPosition:
|
|
569
|
+
activeItem: C,
|
|
570
|
+
setActiveItem: S,
|
|
571
|
+
popupPosition: V,
|
|
572
|
+
modalOptions: G
|
|
308
573
|
}
|
|
309
574
|
),
|
|
310
|
-
/* @__PURE__ */ t.
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
children: [
|
|
317
|
-
a && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
318
|
-
p,
|
|
319
|
-
{
|
|
320
|
-
name: "drag",
|
|
321
|
-
hoverable: !0,
|
|
322
|
-
width: 20,
|
|
323
|
-
height: 20
|
|
324
|
-
}
|
|
325
|
-
) }),
|
|
326
|
-
h === "select" && /* @__PURE__ */ t.jsx(
|
|
327
|
-
I,
|
|
328
|
-
{
|
|
329
|
-
onChange: (_) => {
|
|
330
|
-
n((f) => [...f].map((b) => b.id === c.id ? {
|
|
331
|
-
...c,
|
|
332
|
-
name: _
|
|
333
|
-
} : b));
|
|
334
|
-
},
|
|
335
|
-
value: c.name,
|
|
336
|
-
options: L,
|
|
337
|
-
leftAddon: D(c.image)
|
|
338
|
-
}
|
|
339
|
-
),
|
|
340
|
-
h === "input" && /* @__PURE__ */ t.jsx(
|
|
341
|
-
A,
|
|
342
|
-
{
|
|
343
|
-
onChange: (_) => {
|
|
344
|
-
n((f) => [...f].map((b) => b.id === c.id ? {
|
|
345
|
-
...c,
|
|
346
|
-
name: _
|
|
347
|
-
} : b));
|
|
348
|
-
},
|
|
349
|
-
value: c.name,
|
|
350
|
-
placeholder: F
|
|
351
|
-
}
|
|
352
|
-
),
|
|
353
|
-
h === "image" && /* @__PURE__ */ t.jsx(J, {}),
|
|
354
|
-
/* @__PURE__ */ t.jsxs("div", { className: g.buttons, children: [
|
|
355
|
-
o && /* @__PURE__ */ t.jsx(
|
|
356
|
-
p,
|
|
357
|
-
{
|
|
358
|
-
name: "sliders",
|
|
359
|
-
hoverable: !0,
|
|
360
|
-
width: 20,
|
|
361
|
-
height: 20,
|
|
362
|
-
onClick: (_) => {
|
|
363
|
-
q(_, c);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
),
|
|
367
|
-
v && /* @__PURE__ */ t.jsx(
|
|
368
|
-
p,
|
|
369
|
-
{
|
|
370
|
-
name: "trash",
|
|
371
|
-
hoverable: !0,
|
|
372
|
-
onClick: () => n((_) => _.filter((f) => f.id !== c.id)),
|
|
373
|
-
width: 20,
|
|
374
|
-
height: 20,
|
|
375
|
-
fill: "#C12A2A"
|
|
376
|
-
}
|
|
377
|
-
)
|
|
378
|
-
] })
|
|
379
|
-
]
|
|
380
|
-
},
|
|
381
|
-
c.id
|
|
382
|
-
)),
|
|
383
|
-
y && /* @__PURE__ */ t.jsxs(
|
|
384
|
-
E,
|
|
575
|
+
R && F && /* @__PURE__ */ t.jsx(ss, { ...F }),
|
|
576
|
+
/* @__PURE__ */ t.jsxs("div", { className: f.products, children: [
|
|
577
|
+
i && /* @__PURE__ */ t.jsx("h5", { className: f.subtitle, children: i }),
|
|
578
|
+
j ? /* @__PURE__ */ t.jsx(et, { backend: st, children: c.map((a, y) => Y(a, y)) }) : c.map((a, y) => Y(a, y)),
|
|
579
|
+
u && /* @__PURE__ */ t.jsxs(
|
|
580
|
+
K,
|
|
385
581
|
{
|
|
386
|
-
className:
|
|
582
|
+
className: f.button,
|
|
387
583
|
size: "s",
|
|
388
|
-
onClick: () =>
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
name:
|
|
392
|
-
id:
|
|
393
|
-
|
|
584
|
+
onClick: () => {
|
|
585
|
+
const a = [...c];
|
|
586
|
+
k === "select" ? a.push({
|
|
587
|
+
name: _[0] || `Product ${c.length + 1}`,
|
|
588
|
+
id: E(),
|
|
589
|
+
...z
|
|
590
|
+
}) : k === "input" ? a.push({
|
|
394
591
|
name: "",
|
|
395
|
-
id:
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
592
|
+
id: E(),
|
|
593
|
+
...z
|
|
594
|
+
}) : a.push({
|
|
595
|
+
name: `Image ${c.length + 1}`,
|
|
596
|
+
id: E(),
|
|
597
|
+
...z
|
|
598
|
+
}), l(a);
|
|
599
|
+
},
|
|
400
600
|
children: [
|
|
401
601
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
402
602
|
/* @__PURE__ */ t.jsx(
|
|
403
|
-
|
|
603
|
+
g,
|
|
404
604
|
{
|
|
405
605
|
name: "plus",
|
|
406
606
|
width: 16,
|
|
@@ -411,68 +611,78 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
|
|
|
411
611
|
}
|
|
412
612
|
)
|
|
413
613
|
] }),
|
|
414
|
-
|
|
614
|
+
e !== void 0 && /* @__PURE__ */ t.jsx(Wt, { items: e })
|
|
415
615
|
] });
|
|
416
|
-
},
|
|
417
|
-
subtitle:
|
|
418
|
-
header:
|
|
419
|
-
text:
|
|
420
|
-
productsBlock:
|
|
421
|
-
buttonsBlock:
|
|
422
|
-
top:
|
|
423
|
-
itemsBlock:
|
|
424
|
-
typeTexts:
|
|
425
|
-
block:
|
|
426
|
-
active:
|
|
427
|
-
products:
|
|
428
|
-
product:
|
|
429
|
-
button:
|
|
430
|
-
image:
|
|
431
|
-
info:
|
|
432
|
-
name:
|
|
433
|
-
buttons:
|
|
434
|
-
modal:
|
|
435
|
-
other:
|
|
436
|
-
options:
|
|
437
|
-
},
|
|
438
|
-
const { activeButton:
|
|
439
|
-
return
|
|
616
|
+
}, te = "_subtitle_41klp_1", ee = "_header_41klp_8", se = "_text_41klp_9", ne = "_productsBlock_41klp_10", oe = "_buttonsBlock_41klp_11", ce = "_top_41klp_21", le = "_itemsBlock_41klp_28", ie = "_typeTexts_41klp_34", ae = "_block_41klp_40", re = "_active_41klp_51", de = "_products_41klp_10", ue = "_product_41klp_10", _e = "_button_41klp_11", pe = "_image_41klp_79", me = "_info_41klp_86", he = "_name_41klp_97", ge = "_buttons_41klp_11", xe = "_modal_41klp_107", be = "_other_41klp_124", fe = "_options_41klp_130", T = {
|
|
617
|
+
subtitle: te,
|
|
618
|
+
header: ee,
|
|
619
|
+
text: se,
|
|
620
|
+
productsBlock: ne,
|
|
621
|
+
buttonsBlock: oe,
|
|
622
|
+
top: ce,
|
|
623
|
+
itemsBlock: le,
|
|
624
|
+
typeTexts: ie,
|
|
625
|
+
block: ae,
|
|
626
|
+
active: re,
|
|
627
|
+
products: de,
|
|
628
|
+
product: ue,
|
|
629
|
+
button: _e,
|
|
630
|
+
image: pe,
|
|
631
|
+
info: me,
|
|
632
|
+
name: he,
|
|
633
|
+
buttons: ge,
|
|
634
|
+
modal: xe,
|
|
635
|
+
other: be,
|
|
636
|
+
options: fe
|
|
637
|
+
}, ve = (d) => {
|
|
638
|
+
const { activeButton: s, setActiveButton: o, popupPosition: c } = d, [l, e] = v.useState(s.typesText), [n, i] = v.useState(s.destination), [h, j] = v.useState(s.link || ""), [r, p] = v.useState(s.text || "");
|
|
639
|
+
return v.useEffect(() => {
|
|
640
|
+
o({
|
|
641
|
+
...s,
|
|
642
|
+
...{
|
|
643
|
+
text: r,
|
|
644
|
+
link: h,
|
|
645
|
+
destination: n,
|
|
646
|
+
typesText: l
|
|
647
|
+
}
|
|
648
|
+
});
|
|
649
|
+
}, [l, n, h, r]), /* @__PURE__ */ t.jsxs(
|
|
440
650
|
"div",
|
|
441
651
|
{
|
|
442
|
-
className:
|
|
443
|
-
onClick: (
|
|
444
|
-
|
|
652
|
+
className: T.modal,
|
|
653
|
+
onClick: (u) => {
|
|
654
|
+
u.stopPropagation();
|
|
445
655
|
},
|
|
446
656
|
style: {
|
|
447
|
-
top: `${
|
|
448
|
-
left: `${
|
|
657
|
+
top: `${c.top}px`,
|
|
658
|
+
left: `${c.left}px`
|
|
449
659
|
},
|
|
450
660
|
children: [
|
|
451
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
452
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
661
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.top, children: [
|
|
662
|
+
/* @__PURE__ */ t.jsx("h3", { children: s.type }),
|
|
453
663
|
/* @__PURE__ */ t.jsx(
|
|
454
|
-
|
|
664
|
+
g,
|
|
455
665
|
{
|
|
456
666
|
name: "x",
|
|
457
667
|
height: 20,
|
|
458
668
|
width: 20,
|
|
459
669
|
hoverable: !0,
|
|
460
|
-
onClick: () =>
|
|
670
|
+
onClick: () => o(null)
|
|
461
671
|
}
|
|
462
672
|
)
|
|
463
673
|
] }),
|
|
464
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
674
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.options, children: [
|
|
465
675
|
/* @__PURE__ */ t.jsx(
|
|
466
|
-
|
|
676
|
+
D,
|
|
467
677
|
{
|
|
468
678
|
label: "Destination",
|
|
469
|
-
onChange: (
|
|
679
|
+
onChange: (u) => i(u),
|
|
470
680
|
options: ["Go to Page", "Open Link"],
|
|
471
|
-
value:
|
|
681
|
+
value: n
|
|
472
682
|
}
|
|
473
683
|
),
|
|
474
|
-
|
|
475
|
-
|
|
684
|
+
n === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
685
|
+
D,
|
|
476
686
|
{
|
|
477
687
|
label: "Go to",
|
|
478
688
|
onChange: () => {
|
|
@@ -481,124 +691,132 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
|
|
|
481
691
|
value: "Homepage"
|
|
482
692
|
}
|
|
483
693
|
) : /* @__PURE__ */ t.jsx(
|
|
484
|
-
|
|
694
|
+
I,
|
|
485
695
|
{
|
|
486
|
-
onChange: (
|
|
487
|
-
value:
|
|
696
|
+
onChange: (u) => j(u),
|
|
697
|
+
value: h,
|
|
488
698
|
placeholder: "https://",
|
|
489
699
|
label: "Link"
|
|
490
700
|
}
|
|
491
701
|
),
|
|
492
702
|
/* @__PURE__ */ t.jsx(
|
|
493
|
-
|
|
703
|
+
P,
|
|
494
704
|
{
|
|
495
705
|
current: !1,
|
|
496
706
|
label: "Open in new tab"
|
|
497
707
|
}
|
|
498
708
|
),
|
|
499
709
|
/* @__PURE__ */ t.jsx(
|
|
500
|
-
|
|
710
|
+
q,
|
|
501
711
|
{
|
|
502
|
-
onChange: () =>
|
|
503
|
-
|
|
504
|
-
value: "Lorem ipsum dolor sit amet com",
|
|
712
|
+
onChange: (u) => p(u),
|
|
713
|
+
value: r,
|
|
505
714
|
label: "Text",
|
|
506
715
|
maxLength: 150
|
|
507
716
|
}
|
|
508
717
|
),
|
|
509
718
|
/* @__PURE__ */ t.jsx(
|
|
510
|
-
|
|
719
|
+
Q,
|
|
511
720
|
{
|
|
512
|
-
|
|
513
|
-
|
|
721
|
+
typesText: l,
|
|
722
|
+
setTypesText: e
|
|
514
723
|
}
|
|
515
724
|
)
|
|
516
725
|
] })
|
|
517
726
|
]
|
|
518
727
|
}
|
|
519
728
|
);
|
|
520
|
-
},
|
|
521
|
-
subtitle:
|
|
522
|
-
header:
|
|
523
|
-
text:
|
|
524
|
-
productsBlock:
|
|
525
|
-
buttonsBlock:
|
|
526
|
-
top:
|
|
527
|
-
itemsBlock:
|
|
528
|
-
typeTexts:
|
|
529
|
-
block:
|
|
530
|
-
active:
|
|
531
|
-
products:
|
|
532
|
-
product:
|
|
533
|
-
button:
|
|
534
|
-
image:
|
|
535
|
-
info:
|
|
536
|
-
name:
|
|
537
|
-
buttons:
|
|
538
|
-
modal:
|
|
539
|
-
other:
|
|
540
|
-
options:
|
|
541
|
-
},
|
|
542
|
-
const { buttons:
|
|
729
|
+
}, je = "_subtitle_1y5sw_1", ke = "_header_1y5sw_8", ye = "_text_1y5sw_9", $e = "_productsBlock_1y5sw_10", we = "_buttonsBlock_1y5sw_11", Be = "_top_1y5sw_22", Ne = "_itemsBlock_1y5sw_29", Ce = "_typeTexts_1y5sw_35", Te = "_block_1y5sw_41", Ie = "_active_1y5sw_52", Pe = "_products_1y5sw_10", Se = "_product_1y5sw_10", Ae = "_button_1y5sw_11", Oe = "_image_1y5sw_80", Le = "_info_1y5sw_87", De = "_name_1y5sw_98", Re = "_buttons_1y5sw_11", Ee = "_modal_1y5sw_108", ze = "_other_1y5sw_125", He = "_options_1y5sw_131", L = {
|
|
730
|
+
subtitle: je,
|
|
731
|
+
header: ke,
|
|
732
|
+
text: ye,
|
|
733
|
+
productsBlock: $e,
|
|
734
|
+
buttonsBlock: we,
|
|
735
|
+
top: Be,
|
|
736
|
+
itemsBlock: Ne,
|
|
737
|
+
typeTexts: Ce,
|
|
738
|
+
block: Te,
|
|
739
|
+
active: Ie,
|
|
740
|
+
products: Pe,
|
|
741
|
+
product: Se,
|
|
742
|
+
button: Ae,
|
|
743
|
+
image: Oe,
|
|
744
|
+
info: Le,
|
|
745
|
+
name: De,
|
|
746
|
+
buttons: Re,
|
|
747
|
+
modal: Ee,
|
|
748
|
+
other: ze,
|
|
749
|
+
options: He
|
|
750
|
+
}, Me = (d) => {
|
|
751
|
+
const { buttons: s, setButtons: o, deletable: c = !0, addable: l = !0 } = d, [e, n] = v.useState(null), [i, h] = v.useState({
|
|
543
752
|
top: 0,
|
|
544
753
|
left: 0
|
|
545
754
|
});
|
|
546
|
-
|
|
547
|
-
const
|
|
755
|
+
v.useEffect(() => {
|
|
756
|
+
const r = () => {
|
|
548
757
|
n(null);
|
|
549
758
|
};
|
|
550
|
-
return document.body.addEventListener("click",
|
|
551
|
-
n(null), document.body.removeEventListener("click",
|
|
759
|
+
return document.body.addEventListener("click", r), n(null), () => {
|
|
760
|
+
n(null), document.body.removeEventListener("click", r);
|
|
552
761
|
};
|
|
553
|
-
}, [])
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
762
|
+
}, []), v.useEffect(() => {
|
|
763
|
+
if (e) {
|
|
764
|
+
const r = [...s].map((p) => p.id === e.id ? e : p);
|
|
765
|
+
o(r);
|
|
766
|
+
}
|
|
767
|
+
}, [e]), console.log(s);
|
|
768
|
+
const j = (r, p) => {
|
|
769
|
+
r.stopPropagation();
|
|
770
|
+
const u = r.target.getBoundingClientRect(), k = 490, x = window.innerHeight;
|
|
771
|
+
let _ = u.top + window.scrollY;
|
|
772
|
+
_ + k > x && (_ = x - k - 20), h({
|
|
773
|
+
top: _,
|
|
774
|
+
left: u.left - 30
|
|
775
|
+
}), n(p);
|
|
562
776
|
};
|
|
563
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
564
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
565
|
-
|
|
777
|
+
return /* @__PURE__ */ t.jsxs("div", { className: L.products, children: [
|
|
778
|
+
/* @__PURE__ */ t.jsx("h5", { className: L.subtitle, children: "Button Type" }),
|
|
779
|
+
s.map((r) => /* @__PURE__ */ t.jsxs(
|
|
566
780
|
"div",
|
|
567
781
|
{
|
|
568
|
-
className:
|
|
782
|
+
className: L.product,
|
|
569
783
|
children: [
|
|
570
784
|
/* @__PURE__ */ t.jsx(
|
|
571
|
-
|
|
785
|
+
D,
|
|
572
786
|
{
|
|
573
|
-
onChange: (
|
|
574
|
-
|
|
575
|
-
...
|
|
576
|
-
type:
|
|
577
|
-
} :
|
|
787
|
+
onChange: (p) => {
|
|
788
|
+
const k = [...s].map((x) => x.id === r.id ? {
|
|
789
|
+
...r,
|
|
790
|
+
type: p
|
|
791
|
+
} : x);
|
|
792
|
+
o(k);
|
|
578
793
|
},
|
|
579
|
-
value:
|
|
794
|
+
value: r.type,
|
|
580
795
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
581
796
|
}
|
|
582
797
|
),
|
|
583
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
798
|
+
/* @__PURE__ */ t.jsxs("div", { className: L.buttons, children: [
|
|
584
799
|
/* @__PURE__ */ t.jsx(
|
|
585
|
-
|
|
800
|
+
g,
|
|
586
801
|
{
|
|
587
802
|
name: "sliders",
|
|
588
803
|
hoverable: !0,
|
|
589
804
|
width: 20,
|
|
590
805
|
height: 20,
|
|
591
|
-
onClick: (
|
|
592
|
-
|
|
806
|
+
onClick: (p) => {
|
|
807
|
+
j(p, r);
|
|
593
808
|
}
|
|
594
809
|
}
|
|
595
810
|
),
|
|
596
|
-
/* @__PURE__ */ t.jsx(
|
|
597
|
-
|
|
811
|
+
c && /* @__PURE__ */ t.jsx(
|
|
812
|
+
g,
|
|
598
813
|
{
|
|
599
814
|
name: "trash",
|
|
600
815
|
hoverable: !0,
|
|
601
|
-
onClick: () =>
|
|
816
|
+
onClick: () => {
|
|
817
|
+
const p = s.filter((u) => u.id !== r.id);
|
|
818
|
+
o(p);
|
|
819
|
+
},
|
|
602
820
|
width: 20,
|
|
603
821
|
height: 20,
|
|
604
822
|
fill: "#C12A2A"
|
|
@@ -607,34 +825,35 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
|
|
|
607
825
|
] })
|
|
608
826
|
]
|
|
609
827
|
},
|
|
610
|
-
|
|
828
|
+
r.id
|
|
611
829
|
)),
|
|
612
|
-
|
|
613
|
-
|
|
830
|
+
e && /* @__PURE__ */ t.jsx(
|
|
831
|
+
ve,
|
|
614
832
|
{
|
|
615
|
-
activeButton:
|
|
833
|
+
activeButton: e,
|
|
616
834
|
setActiveButton: n,
|
|
617
|
-
popupPosition:
|
|
835
|
+
popupPosition: i
|
|
618
836
|
}
|
|
619
837
|
),
|
|
620
|
-
/* @__PURE__ */ t.jsxs(
|
|
621
|
-
|
|
838
|
+
l && /* @__PURE__ */ t.jsxs(
|
|
839
|
+
K,
|
|
622
840
|
{
|
|
623
|
-
className:
|
|
841
|
+
className: L.button,
|
|
624
842
|
size: "s",
|
|
625
|
-
onClick: () =>
|
|
626
|
-
const
|
|
627
|
-
|
|
843
|
+
onClick: () => {
|
|
844
|
+
const r = [...s];
|
|
845
|
+
r.push({
|
|
628
846
|
type: "Primary",
|
|
629
|
-
id:
|
|
630
|
-
|
|
631
|
-
destination: "Go to Page"
|
|
632
|
-
|
|
633
|
-
|
|
847
|
+
id: E(),
|
|
848
|
+
typesText: [],
|
|
849
|
+
destination: "Go to Page",
|
|
850
|
+
text: ""
|
|
851
|
+
}), o(r);
|
|
852
|
+
},
|
|
634
853
|
children: [
|
|
635
854
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
636
855
|
/* @__PURE__ */ t.jsx(
|
|
637
|
-
|
|
856
|
+
g,
|
|
638
857
|
{
|
|
639
858
|
name: "plus",
|
|
640
859
|
width: 16,
|
|
@@ -645,48 +864,173 @@ const K = "_wrapper_1g82c_2", Q = "_alignmentBlock_1g82c_8", U = "_title_1g82c_1
|
|
|
645
864
|
}
|
|
646
865
|
)
|
|
647
866
|
] });
|
|
648
|
-
},
|
|
649
|
-
const { isActiveButtons:
|
|
650
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
651
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
652
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
867
|
+
}, ls = (d) => {
|
|
868
|
+
const { isActiveButtons: s, setIsActiveButtons: o, buttons: c, setButtons: l } = d;
|
|
869
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: T.buttonsBlock, children: [
|
|
870
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.top, children: [
|
|
871
|
+
/* @__PURE__ */ t.jsx("h3", { className: T.title, children: "Buttons" }),
|
|
653
872
|
/* @__PURE__ */ t.jsx(
|
|
654
|
-
|
|
873
|
+
P,
|
|
655
874
|
{
|
|
656
|
-
current:
|
|
657
|
-
onChange: (
|
|
875
|
+
current: s,
|
|
876
|
+
onChange: (e) => o(e)
|
|
658
877
|
}
|
|
659
878
|
)
|
|
660
879
|
] }),
|
|
661
880
|
/* @__PURE__ */ t.jsx(
|
|
662
|
-
|
|
881
|
+
Me,
|
|
663
882
|
{
|
|
664
|
-
buttons:
|
|
665
|
-
setButtons:
|
|
883
|
+
buttons: c,
|
|
884
|
+
setButtons: l
|
|
666
885
|
}
|
|
667
886
|
)
|
|
668
887
|
] }) });
|
|
888
|
+
}, Fe = "_wrapper_tn7gb_1", Ge = "_subtitle_tn7gb_7", Ye = "_content_tn7gb_14", Ue = "_range_tn7gb_21", qe = "_track_tn7gb_26", Je = "_progress_tn7gb_35", Ke = "_dots_tn7gb_45", Qe = "_dot_tn7gb_45", Ve = "_active_tn7gb_62", We = "_input_tn7gb_74", Xe = "_countBlock_tn7gb_88", Ze = "_count_tn7gb_88", ts = "_controls_tn7gb_103", es = "_button_tn7gb_108", m = {
|
|
889
|
+
wrapper: Fe,
|
|
890
|
+
subtitle: Ge,
|
|
891
|
+
content: Ye,
|
|
892
|
+
range: Ue,
|
|
893
|
+
track: qe,
|
|
894
|
+
progress: Je,
|
|
895
|
+
dots: Ke,
|
|
896
|
+
dot: Qe,
|
|
897
|
+
active: Ve,
|
|
898
|
+
input: We,
|
|
899
|
+
countBlock: Xe,
|
|
900
|
+
count: Ze,
|
|
901
|
+
controls: ts,
|
|
902
|
+
button: es
|
|
903
|
+
}, ss = (d) => {
|
|
904
|
+
const { label: s, min: o = 1, max: c = 4, step: l = 1, count: e, setCount: n } = d, [i, h] = v.useState(!1), j = Array.from({ length: (c - o) / l + 1 }), r = (e - o) / (c - o) * 100, p = () => {
|
|
905
|
+
e < c && n(e + l);
|
|
906
|
+
}, u = () => {
|
|
907
|
+
e > o && n(e - l);
|
|
908
|
+
}, k = (x) => {
|
|
909
|
+
const _ = o + x * l;
|
|
910
|
+
n(_);
|
|
911
|
+
};
|
|
912
|
+
return /* @__PURE__ */ t.jsxs("div", { className: m.wrapper, children: [
|
|
913
|
+
s && /* @__PURE__ */ t.jsx("h5", { className: m.subtitle, children: s }),
|
|
914
|
+
/* @__PURE__ */ t.jsxs("div", { className: m.content, children: [
|
|
915
|
+
/* @__PURE__ */ t.jsxs("div", { className: m.range, children: [
|
|
916
|
+
/* @__PURE__ */ t.jsx("div", { className: m.track }),
|
|
917
|
+
/* @__PURE__ */ t.jsx(
|
|
918
|
+
"div",
|
|
919
|
+
{
|
|
920
|
+
className: m.progress,
|
|
921
|
+
style: { width: `${r}%` }
|
|
922
|
+
}
|
|
923
|
+
),
|
|
924
|
+
/* @__PURE__ */ t.jsx("div", { className: m.dots, children: j.map((x, _) => {
|
|
925
|
+
const R = _ <= (e - o) / l;
|
|
926
|
+
return /* @__PURE__ */ t.jsx(
|
|
927
|
+
"button",
|
|
928
|
+
{
|
|
929
|
+
onClick: () => k(_),
|
|
930
|
+
className: U(m.dot, {
|
|
931
|
+
[m.active]: R,
|
|
932
|
+
[m.inactive]: !R,
|
|
933
|
+
[m.dragging]: i
|
|
934
|
+
}),
|
|
935
|
+
"aria-label": `Set value to ${o + _ * l}`
|
|
936
|
+
},
|
|
937
|
+
_
|
|
938
|
+
);
|
|
939
|
+
}) }),
|
|
940
|
+
/* @__PURE__ */ t.jsx(
|
|
941
|
+
"input",
|
|
942
|
+
{
|
|
943
|
+
type: "range",
|
|
944
|
+
min: o,
|
|
945
|
+
max: c,
|
|
946
|
+
step: l,
|
|
947
|
+
value: e,
|
|
948
|
+
onChange: (x) => n(Number(x.target.value)),
|
|
949
|
+
onMouseDown: () => h(!0),
|
|
950
|
+
onMouseUp: () => h(!1),
|
|
951
|
+
onTouchStart: () => h(!0),
|
|
952
|
+
onTouchEnd: () => h(!1),
|
|
953
|
+
className: m.input
|
|
954
|
+
}
|
|
955
|
+
)
|
|
956
|
+
] }),
|
|
957
|
+
/* @__PURE__ */ t.jsxs("div", { className: m.countBlock, children: [
|
|
958
|
+
/* @__PURE__ */ t.jsx(
|
|
959
|
+
I,
|
|
960
|
+
{
|
|
961
|
+
type: "number",
|
|
962
|
+
min: o,
|
|
963
|
+
max: c,
|
|
964
|
+
paddingless: !0,
|
|
965
|
+
onChange: (x) => {
|
|
966
|
+
const _ = Number(x);
|
|
967
|
+
_ > c ? n(c) : _ < o ? n(o) : n(_);
|
|
968
|
+
},
|
|
969
|
+
value: String(e)
|
|
970
|
+
}
|
|
971
|
+
),
|
|
972
|
+
/* @__PURE__ */ t.jsxs("div", { className: m.controls, children: [
|
|
973
|
+
/* @__PURE__ */ t.jsx(
|
|
974
|
+
"button",
|
|
975
|
+
{
|
|
976
|
+
onClick: p,
|
|
977
|
+
disabled: e >= c,
|
|
978
|
+
className: m.button,
|
|
979
|
+
"aria-label": "Increment count",
|
|
980
|
+
children: /* @__PURE__ */ t.jsx(
|
|
981
|
+
g,
|
|
982
|
+
{
|
|
983
|
+
name: "arrow-down",
|
|
984
|
+
width: 15,
|
|
985
|
+
height: 15,
|
|
986
|
+
rotated: !0
|
|
987
|
+
}
|
|
988
|
+
)
|
|
989
|
+
}
|
|
990
|
+
),
|
|
991
|
+
/* @__PURE__ */ t.jsx(
|
|
992
|
+
"button",
|
|
993
|
+
{
|
|
994
|
+
onClick: u,
|
|
995
|
+
disabled: e <= o,
|
|
996
|
+
className: m.button,
|
|
997
|
+
"aria-label": "Decrement count",
|
|
998
|
+
children: /* @__PURE__ */ t.jsx(
|
|
999
|
+
g,
|
|
1000
|
+
{
|
|
1001
|
+
name: "arrow-down",
|
|
1002
|
+
width: 15,
|
|
1003
|
+
height: 15
|
|
1004
|
+
}
|
|
1005
|
+
)
|
|
1006
|
+
}
|
|
1007
|
+
)
|
|
1008
|
+
] })
|
|
1009
|
+
] })
|
|
1010
|
+
] })
|
|
1011
|
+
] });
|
|
669
1012
|
};
|
|
670
1013
|
export {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
1014
|
+
K as Button,
|
|
1015
|
+
Me as ButtonTypeSettings,
|
|
1016
|
+
ls as ButtonsSettings,
|
|
1017
|
+
rs as Checkbox,
|
|
675
1018
|
J as ChooseImage,
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
1019
|
+
ds as ChooseImageModal,
|
|
1020
|
+
us as ColorPicker,
|
|
1021
|
+
g as Icon,
|
|
1022
|
+
I as Input,
|
|
1023
|
+
Zt as ItemsSettings,
|
|
1024
|
+
cs as LayoutSettings,
|
|
1025
|
+
_s as Modal,
|
|
1026
|
+
ps as Picker,
|
|
1027
|
+
ms as Radio,
|
|
1028
|
+
ss as RangeSelector,
|
|
1029
|
+
D as Select,
|
|
1030
|
+
hs as Submodal,
|
|
1031
|
+
P as Switch,
|
|
1032
|
+
Nt as TextSettings,
|
|
1033
|
+
q as Textarea,
|
|
1034
|
+
gs as Tip,
|
|
1035
|
+
Q as TypesText
|
|
692
1036
|
};
|