@billgangcom/theme-lib 1.8.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/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 +2 -1
- package/dist/ui/ButtonTypeSettings/index.d.ts +2 -0
- package/dist/ui/ButtonsSettings/index.d.ts +4 -3
- package/dist/ui/ItemsSettings/index.d.ts +1 -0
- package/dist/ui/ItemsSettings/popup.d.ts +1 -1
- package/dist/ui/TextSettings/index.d.ts +3 -3
- package/dist/ui/TypesText/index.d.ts +7 -0
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +578 -513
- package/package.json +1 -1
- package/dist/index-D2fsOZUo.js +0 -3978
- package/dist/index-K_gSTxJk.cjs +0 -39
- 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,8 +23,8 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
23
23
|
"bottomLeft",
|
|
24
24
|
"bottom",
|
|
25
25
|
"bottomRight"
|
|
26
|
-
],
|
|
27
|
-
const { alignment: s, padding: o, setPadding:
|
|
26
|
+
], xt = ["left", "top", "right", "bottom"], cs = (d) => {
|
|
27
|
+
const { alignment: s, padding: o, setPadding: c, setAlignment: l } = d;
|
|
28
28
|
function e() {
|
|
29
29
|
switch (s) {
|
|
30
30
|
case "left":
|
|
@@ -43,22 +43,22 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_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
|
-
l(
|
|
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
63
|
name: `text-align-${e()}`,
|
|
64
64
|
fill: "#FF3F19",
|
|
@@ -68,25 +68,25 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_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(o[
|
|
87
|
-
onChange: (
|
|
86
|
+
value: String(o[n]),
|
|
87
|
+
onChange: (i) => c({
|
|
88
88
|
...o,
|
|
89
|
-
[
|
|
89
|
+
[n]: Number(i)
|
|
90
90
|
}),
|
|
91
91
|
paddingless: !0,
|
|
92
92
|
borderless: !0
|
|
@@ -96,116 +96,123 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_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: s
|
|
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
|
-
|
|
139
|
+
typesText: s,
|
|
133
140
|
isActiveText: o,
|
|
134
|
-
setIsActiveText:
|
|
141
|
+
setIsActiveText: c,
|
|
135
142
|
text: l,
|
|
136
143
|
setText: e,
|
|
137
|
-
|
|
138
|
-
title:
|
|
139
|
-
subtitle:
|
|
144
|
+
setTypesText: n,
|
|
145
|
+
title: i,
|
|
146
|
+
subtitle: h = "Items"
|
|
140
147
|
} = d;
|
|
141
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
142
|
-
(
|
|
143
|
-
|
|
144
|
-
o &&
|
|
145
|
-
|
|
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
154
|
current: o,
|
|
148
|
-
onChange: (
|
|
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: (
|
|
164
|
+
onChange: (j) => e(j),
|
|
158
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
|
-
link:
|
|
190
|
-
modalOptions:
|
|
191
|
-
},
|
|
192
|
-
const { activeItem: s, setActiveItem: o, popupPosition:
|
|
193
|
-
return
|
|
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;
|
|
200
|
+
return /* @__PURE__ */ t.jsxs(
|
|
194
201
|
"div",
|
|
195
202
|
{
|
|
196
|
-
className:
|
|
203
|
+
className: f.modal,
|
|
197
204
|
onClick: (e) => {
|
|
198
205
|
e.stopPropagation();
|
|
199
206
|
},
|
|
200
207
|
style: {
|
|
201
|
-
top: `${
|
|
202
|
-
left: `${
|
|
208
|
+
top: `${c.top}px`,
|
|
209
|
+
left: `${c.left}px`
|
|
203
210
|
},
|
|
204
211
|
children: [
|
|
205
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
212
|
+
/* @__PURE__ */ t.jsxs("div", { className: f.top, children: [
|
|
206
213
|
/* @__PURE__ */ t.jsx("h3", { children: s.name }),
|
|
207
214
|
/* @__PURE__ */ t.jsx(
|
|
208
|
-
|
|
215
|
+
g,
|
|
209
216
|
{
|
|
210
217
|
name: "x",
|
|
211
218
|
height: 20,
|
|
@@ -215,54 +222,54 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
215
222
|
}
|
|
216
223
|
)
|
|
217
224
|
] }),
|
|
218
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
225
|
+
/* @__PURE__ */ t.jsx("div", { className: f.modalOptions, children: l.map((e) => {
|
|
219
226
|
if (e.type === "image")
|
|
220
227
|
return /* @__PURE__ */ t.jsx(
|
|
221
|
-
|
|
228
|
+
J,
|
|
222
229
|
{
|
|
223
230
|
label: "Put up an attractive image",
|
|
224
|
-
onChange: (
|
|
225
|
-
const
|
|
231
|
+
onChange: (n) => {
|
|
232
|
+
const i = {
|
|
226
233
|
...s,
|
|
227
|
-
[e.field]:
|
|
234
|
+
[e.field]: n[0]
|
|
228
235
|
};
|
|
229
|
-
o(
|
|
236
|
+
o(i);
|
|
230
237
|
}
|
|
231
238
|
}
|
|
232
239
|
);
|
|
233
240
|
if (e.type === "text")
|
|
234
241
|
return /* @__PURE__ */ t.jsx(
|
|
235
|
-
|
|
242
|
+
Nt,
|
|
236
243
|
{
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
const
|
|
244
|
+
typesText: s[e.field.type],
|
|
245
|
+
setTypesText: (n) => {
|
|
246
|
+
const i = {
|
|
240
247
|
...s,
|
|
241
|
-
[e.field.type]:
|
|
248
|
+
[e.field.type]: n
|
|
242
249
|
};
|
|
243
|
-
o(
|
|
250
|
+
o(i);
|
|
244
251
|
},
|
|
245
252
|
text: s[e.field.text] || "",
|
|
246
|
-
setText: (
|
|
247
|
-
const
|
|
253
|
+
setText: (n) => {
|
|
254
|
+
const i = {
|
|
248
255
|
...s,
|
|
249
|
-
[e.field.text]:
|
|
256
|
+
[e.field.text]: n
|
|
250
257
|
};
|
|
251
|
-
o(
|
|
258
|
+
o(i);
|
|
252
259
|
},
|
|
253
260
|
subtitle: e.label
|
|
254
261
|
}
|
|
255
262
|
);
|
|
256
263
|
if (e.type === "input")
|
|
257
264
|
return /* @__PURE__ */ t.jsx(
|
|
258
|
-
|
|
265
|
+
I,
|
|
259
266
|
{
|
|
260
|
-
onChange: (
|
|
261
|
-
const
|
|
267
|
+
onChange: (n) => {
|
|
268
|
+
const i = {
|
|
262
269
|
...s,
|
|
263
|
-
[e.field]:
|
|
270
|
+
[e.field]: n
|
|
264
271
|
};
|
|
265
|
-
o(
|
|
272
|
+
o(i);
|
|
266
273
|
},
|
|
267
274
|
value: s[e.field] || "",
|
|
268
275
|
label: e.label,
|
|
@@ -270,16 +277,16 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
270
277
|
}
|
|
271
278
|
);
|
|
272
279
|
if (e.type === "inputSwitch")
|
|
273
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
280
|
+
return /* @__PURE__ */ t.jsxs("div", { className: f.link, children: [
|
|
274
281
|
/* @__PURE__ */ t.jsx(
|
|
275
|
-
|
|
282
|
+
I,
|
|
276
283
|
{
|
|
277
|
-
onChange: (
|
|
278
|
-
const
|
|
284
|
+
onChange: (n) => {
|
|
285
|
+
const i = {
|
|
279
286
|
...s,
|
|
280
|
-
[e.field.text]:
|
|
287
|
+
[e.field.text]: n
|
|
281
288
|
};
|
|
282
|
-
o(
|
|
289
|
+
o(i);
|
|
283
290
|
},
|
|
284
291
|
value: s[e.field.text] || "",
|
|
285
292
|
label: e.inputLabel,
|
|
@@ -287,24 +294,31 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
287
294
|
}
|
|
288
295
|
),
|
|
289
296
|
/* @__PURE__ */ t.jsx(
|
|
290
|
-
|
|
297
|
+
P,
|
|
291
298
|
{
|
|
292
299
|
current: !!s[e.field.switch] || !1,
|
|
293
|
-
label: e.switchLabel
|
|
300
|
+
label: e.switchLabel,
|
|
301
|
+
onChange: (n) => {
|
|
302
|
+
const i = {
|
|
303
|
+
...s,
|
|
304
|
+
[e.field.switch]: n
|
|
305
|
+
};
|
|
306
|
+
o(i);
|
|
307
|
+
}
|
|
294
308
|
}
|
|
295
309
|
)
|
|
296
310
|
] });
|
|
297
311
|
if (e.type === "list")
|
|
298
312
|
return /* @__PURE__ */ t.jsx(
|
|
299
|
-
|
|
313
|
+
Zt,
|
|
300
314
|
{
|
|
301
315
|
items: s[e.field] || [],
|
|
302
|
-
setItems: (
|
|
303
|
-
const
|
|
316
|
+
setItems: (n) => {
|
|
317
|
+
const i = {
|
|
304
318
|
...s,
|
|
305
|
-
[e.field]:
|
|
319
|
+
[e.field]: n
|
|
306
320
|
};
|
|
307
|
-
o(
|
|
321
|
+
o(i);
|
|
308
322
|
},
|
|
309
323
|
itemsType: "select",
|
|
310
324
|
draggable: e.draggable || !1,
|
|
@@ -316,15 +330,15 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
316
330
|
);
|
|
317
331
|
if (e.type === "select")
|
|
318
332
|
return /* @__PURE__ */ t.jsx(
|
|
319
|
-
|
|
333
|
+
D,
|
|
320
334
|
{
|
|
321
335
|
options: e.itemsOptions,
|
|
322
|
-
onChange: (
|
|
323
|
-
const
|
|
336
|
+
onChange: (n) => {
|
|
337
|
+
const i = {
|
|
324
338
|
...s,
|
|
325
|
-
[e.field]:
|
|
339
|
+
[e.field]: n
|
|
326
340
|
};
|
|
327
|
-
o(
|
|
341
|
+
o(i);
|
|
328
342
|
},
|
|
329
343
|
label: e.label,
|
|
330
344
|
value: s[e.field] || "String"
|
|
@@ -334,83 +348,108 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
334
348
|
]
|
|
335
349
|
}
|
|
336
350
|
);
|
|
337
|
-
},
|
|
338
|
-
other:
|
|
339
|
-
subtitle:
|
|
340
|
-
items:
|
|
341
|
-
},
|
|
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) => {
|
|
342
356
|
const { items: s, title: o = "Other" } = d;
|
|
343
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
344
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
345
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
346
|
-
|
|
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,
|
|
347
361
|
{
|
|
348
|
-
current:
|
|
349
|
-
onChange: (l) =>
|
|
350
|
-
label:
|
|
362
|
+
current: c.isItem,
|
|
363
|
+
onChange: (l) => c.setIsItem(l),
|
|
364
|
+
label: c.label,
|
|
351
365
|
hasBackground: !0,
|
|
352
366
|
paddingless: !1
|
|
353
367
|
}
|
|
354
368
|
)) })
|
|
355
369
|
] });
|
|
356
|
-
},
|
|
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) => {
|
|
357
392
|
const {
|
|
358
393
|
isActiveItems: s,
|
|
359
394
|
setIsActiveItems: o,
|
|
360
|
-
items:
|
|
395
|
+
items: c,
|
|
361
396
|
setItems: l,
|
|
362
397
|
other: e,
|
|
363
|
-
title:
|
|
364
|
-
subtitle:
|
|
365
|
-
editable:
|
|
366
|
-
draggable:
|
|
367
|
-
withImage:
|
|
368
|
-
deletable:
|
|
369
|
-
addable:
|
|
370
|
-
itemsType:
|
|
371
|
-
itemsPlaceholder:
|
|
372
|
-
itemsOptions:
|
|
373
|
-
hasRangeSelector:
|
|
374
|
-
rangeSelectorOptions:
|
|
375
|
-
modalOptions:
|
|
376
|
-
|
|
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({
|
|
377
413
|
top: 0,
|
|
378
414
|
left: 0
|
|
379
|
-
})
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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);
|
|
383
422
|
};
|
|
384
|
-
return document.body.addEventListener("click",
|
|
385
|
-
|
|
423
|
+
return document.body.addEventListener("click", a), S(null), () => {
|
|
424
|
+
S(null), document.body.removeEventListener("click", a);
|
|
386
425
|
};
|
|
387
|
-
}, []),
|
|
388
|
-
if (
|
|
389
|
-
const
|
|
390
|
-
l(
|
|
426
|
+
}, []), v.useEffect(() => {
|
|
427
|
+
if (C) {
|
|
428
|
+
const a = [...c].map((y) => y.id === C.id ? C : y);
|
|
429
|
+
l(a);
|
|
391
430
|
}
|
|
392
|
-
}, [
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
const
|
|
396
|
-
let
|
|
397
|
-
|
|
398
|
-
top:
|
|
399
|
-
left:
|
|
400
|
-
}),
|
|
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);
|
|
401
440
|
};
|
|
402
|
-
function
|
|
403
|
-
if (
|
|
404
|
-
return
|
|
441
|
+
function tt(a) {
|
|
442
|
+
if (r)
|
|
443
|
+
return a ? /* @__PURE__ */ t.jsx(
|
|
405
444
|
"img",
|
|
406
445
|
{
|
|
407
|
-
src: `https://imagedelivery.net/${
|
|
446
|
+
src: `https://imagedelivery.net/${a}/w=1000`,
|
|
408
447
|
alt: "image",
|
|
409
448
|
width: 16,
|
|
410
449
|
height: 16
|
|
411
450
|
}
|
|
412
451
|
) : /* @__PURE__ */ t.jsx(
|
|
413
|
-
|
|
452
|
+
g,
|
|
414
453
|
{
|
|
415
454
|
name: "image",
|
|
416
455
|
width: 16,
|
|
@@ -419,138 +458,149 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
419
458
|
}
|
|
420
459
|
);
|
|
421
460
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
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(
|
|
426
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,
|
|
503
|
+
{
|
|
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,
|
|
427
560
|
{
|
|
428
561
|
current: s,
|
|
429
|
-
onChange: (
|
|
562
|
+
onChange: (a) => o == null ? void 0 : o(a)
|
|
430
563
|
}
|
|
431
564
|
)
|
|
432
565
|
] }),
|
|
433
|
-
|
|
434
|
-
|
|
566
|
+
C && h && G && /* @__PURE__ */ t.jsx(
|
|
567
|
+
Jt,
|
|
435
568
|
{
|
|
436
|
-
activeItem:
|
|
437
|
-
setActiveItem:
|
|
438
|
-
popupPosition:
|
|
439
|
-
modalOptions:
|
|
569
|
+
activeItem: C,
|
|
570
|
+
setActiveItem: S,
|
|
571
|
+
popupPosition: V,
|
|
572
|
+
modalOptions: G
|
|
440
573
|
}
|
|
441
574
|
),
|
|
442
|
-
|
|
443
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
className: b.product,
|
|
449
|
-
children: [
|
|
450
|
-
u && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
451
|
-
m,
|
|
452
|
-
{
|
|
453
|
-
name: "drag",
|
|
454
|
-
hoverable: !0,
|
|
455
|
-
width: 20,
|
|
456
|
-
height: 20
|
|
457
|
-
}
|
|
458
|
-
) }),
|
|
459
|
-
x === "select" && /* @__PURE__ */ t.jsx(
|
|
460
|
-
O,
|
|
461
|
-
{
|
|
462
|
-
onChange: (h) => {
|
|
463
|
-
const w = [...n].map((f) => f.id === i.id ? {
|
|
464
|
-
...i,
|
|
465
|
-
name: h
|
|
466
|
-
} : f);
|
|
467
|
-
l(w);
|
|
468
|
-
},
|
|
469
|
-
value: i.name,
|
|
470
|
-
options: g,
|
|
471
|
-
leftAddon: V(i.image)
|
|
472
|
-
}
|
|
473
|
-
),
|
|
474
|
-
x === "input" && /* @__PURE__ */ t.jsx(
|
|
475
|
-
T,
|
|
476
|
-
{
|
|
477
|
-
onChange: (h) => {
|
|
478
|
-
const w = [...n].map((f) => f.id === i.id ? {
|
|
479
|
-
...i,
|
|
480
|
-
name: h
|
|
481
|
-
} : f);
|
|
482
|
-
l(w);
|
|
483
|
-
},
|
|
484
|
-
value: i.name,
|
|
485
|
-
placeholder: $
|
|
486
|
-
}
|
|
487
|
-
),
|
|
488
|
-
x === "image" && /* @__PURE__ */ t.jsx(
|
|
489
|
-
Y,
|
|
490
|
-
{
|
|
491
|
-
onChange: (h) => {
|
|
492
|
-
const w = [...n].map((f) => f.id === i.id ? {
|
|
493
|
-
...i,
|
|
494
|
-
image: h[0]
|
|
495
|
-
} : f);
|
|
496
|
-
l(w);
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
),
|
|
500
|
-
/* @__PURE__ */ t.jsxs("div", { className: b.buttons, children: [
|
|
501
|
-
r && /* @__PURE__ */ t.jsx(
|
|
502
|
-
m,
|
|
503
|
-
{
|
|
504
|
-
name: "sliders",
|
|
505
|
-
hoverable: !0,
|
|
506
|
-
width: 20,
|
|
507
|
-
height: 20,
|
|
508
|
-
onClick: (h) => {
|
|
509
|
-
Q(h, i);
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
),
|
|
513
|
-
y && /* @__PURE__ */ t.jsx(
|
|
514
|
-
m,
|
|
515
|
-
{
|
|
516
|
-
name: "trash",
|
|
517
|
-
hoverable: !0,
|
|
518
|
-
onClick: () => {
|
|
519
|
-
const h = n.filter((N) => N.id !== i.id);
|
|
520
|
-
l(h);
|
|
521
|
-
},
|
|
522
|
-
width: 20,
|
|
523
|
-
height: 20,
|
|
524
|
-
fill: "#C12A2A"
|
|
525
|
-
}
|
|
526
|
-
)
|
|
527
|
-
] })
|
|
528
|
-
]
|
|
529
|
-
},
|
|
530
|
-
i.id
|
|
531
|
-
)),
|
|
532
|
-
k && /* @__PURE__ */ t.jsxs(
|
|
533
|
-
U,
|
|
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,
|
|
534
581
|
{
|
|
535
|
-
className:
|
|
582
|
+
className: f.button,
|
|
536
583
|
size: "s",
|
|
537
584
|
onClick: () => {
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
name:
|
|
541
|
-
id:
|
|
542
|
-
|
|
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({
|
|
543
591
|
name: "",
|
|
544
|
-
id:
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
592
|
+
id: E(),
|
|
593
|
+
...z
|
|
594
|
+
}) : a.push({
|
|
595
|
+
name: `Image ${c.length + 1}`,
|
|
596
|
+
id: E(),
|
|
597
|
+
...z
|
|
598
|
+
}), l(a);
|
|
549
599
|
},
|
|
550
600
|
children: [
|
|
551
601
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
552
602
|
/* @__PURE__ */ t.jsx(
|
|
553
|
-
|
|
603
|
+
g,
|
|
554
604
|
{
|
|
555
605
|
name: "plus",
|
|
556
606
|
width: 16,
|
|
@@ -561,47 +611,57 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
561
611
|
}
|
|
562
612
|
)
|
|
563
613
|
] }),
|
|
564
|
-
e !== void 0 && /* @__PURE__ */ t.jsx(
|
|
614
|
+
e !== void 0 && /* @__PURE__ */ t.jsx(Wt, { items: e })
|
|
565
615
|
] });
|
|
566
|
-
},
|
|
567
|
-
subtitle:
|
|
568
|
-
header:
|
|
569
|
-
text:
|
|
570
|
-
productsBlock:
|
|
571
|
-
buttonsBlock:
|
|
572
|
-
top:
|
|
573
|
-
itemsBlock:
|
|
574
|
-
typeTexts:
|
|
575
|
-
block:
|
|
576
|
-
active:
|
|
577
|
-
products:
|
|
578
|
-
product:
|
|
579
|
-
button:
|
|
580
|
-
image:
|
|
581
|
-
info:
|
|
582
|
-
name:
|
|
583
|
-
buttons:
|
|
584
|
-
modal:
|
|
585
|
-
other:
|
|
586
|
-
options:
|
|
587
|
-
},
|
|
588
|
-
const { activeButton: s, setActiveButton: o, popupPosition:
|
|
589
|
-
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(
|
|
590
650
|
"div",
|
|
591
651
|
{
|
|
592
|
-
className:
|
|
593
|
-
onClick: (
|
|
594
|
-
|
|
652
|
+
className: T.modal,
|
|
653
|
+
onClick: (u) => {
|
|
654
|
+
u.stopPropagation();
|
|
595
655
|
},
|
|
596
656
|
style: {
|
|
597
|
-
top: `${
|
|
598
|
-
left: `${
|
|
657
|
+
top: `${c.top}px`,
|
|
658
|
+
left: `${c.left}px`
|
|
599
659
|
},
|
|
600
660
|
children: [
|
|
601
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
661
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.top, children: [
|
|
602
662
|
/* @__PURE__ */ t.jsx("h3", { children: s.type }),
|
|
603
663
|
/* @__PURE__ */ t.jsx(
|
|
604
|
-
|
|
664
|
+
g,
|
|
605
665
|
{
|
|
606
666
|
name: "x",
|
|
607
667
|
height: 20,
|
|
@@ -611,18 +671,18 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
611
671
|
}
|
|
612
672
|
)
|
|
613
673
|
] }),
|
|
614
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
674
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.options, children: [
|
|
615
675
|
/* @__PURE__ */ t.jsx(
|
|
616
|
-
|
|
676
|
+
D,
|
|
617
677
|
{
|
|
618
678
|
label: "Destination",
|
|
619
|
-
onChange: (
|
|
679
|
+
onChange: (u) => i(u),
|
|
620
680
|
options: ["Go to Page", "Open Link"],
|
|
621
|
-
value:
|
|
681
|
+
value: n
|
|
622
682
|
}
|
|
623
683
|
),
|
|
624
|
-
|
|
625
|
-
|
|
684
|
+
n === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
685
|
+
D,
|
|
626
686
|
{
|
|
627
687
|
label: "Go to",
|
|
628
688
|
onChange: () => {
|
|
@@ -631,127 +691,131 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
631
691
|
value: "Homepage"
|
|
632
692
|
}
|
|
633
693
|
) : /* @__PURE__ */ t.jsx(
|
|
634
|
-
|
|
694
|
+
I,
|
|
635
695
|
{
|
|
636
|
-
onChange: (
|
|
637
|
-
value:
|
|
696
|
+
onChange: (u) => j(u),
|
|
697
|
+
value: h,
|
|
638
698
|
placeholder: "https://",
|
|
639
699
|
label: "Link"
|
|
640
700
|
}
|
|
641
701
|
),
|
|
642
702
|
/* @__PURE__ */ t.jsx(
|
|
643
|
-
|
|
703
|
+
P,
|
|
644
704
|
{
|
|
645
705
|
current: !1,
|
|
646
706
|
label: "Open in new tab"
|
|
647
707
|
}
|
|
648
708
|
),
|
|
649
709
|
/* @__PURE__ */ t.jsx(
|
|
650
|
-
|
|
710
|
+
q,
|
|
651
711
|
{
|
|
652
|
-
onChange: () =>
|
|
653
|
-
|
|
654
|
-
value: "Lorem ipsum dolor sit amet com",
|
|
712
|
+
onChange: (u) => p(u),
|
|
713
|
+
value: r,
|
|
655
714
|
label: "Text",
|
|
656
715
|
maxLength: 150
|
|
657
716
|
}
|
|
658
717
|
),
|
|
659
718
|
/* @__PURE__ */ t.jsx(
|
|
660
|
-
|
|
719
|
+
Q,
|
|
661
720
|
{
|
|
662
|
-
|
|
663
|
-
|
|
721
|
+
typesText: l,
|
|
722
|
+
setTypesText: e
|
|
664
723
|
}
|
|
665
724
|
)
|
|
666
725
|
] })
|
|
667
726
|
]
|
|
668
727
|
}
|
|
669
728
|
);
|
|
670
|
-
},
|
|
671
|
-
subtitle:
|
|
672
|
-
header:
|
|
673
|
-
text:
|
|
674
|
-
productsBlock:
|
|
675
|
-
buttonsBlock:
|
|
676
|
-
top:
|
|
677
|
-
itemsBlock:
|
|
678
|
-
typeTexts:
|
|
679
|
-
block:
|
|
680
|
-
active:
|
|
681
|
-
products:
|
|
682
|
-
product:
|
|
683
|
-
button:
|
|
684
|
-
image:
|
|
685
|
-
info:
|
|
686
|
-
name:
|
|
687
|
-
buttons:
|
|
688
|
-
modal:
|
|
689
|
-
other:
|
|
690
|
-
options:
|
|
691
|
-
},
|
|
692
|
-
const { buttons: s, setButtons: o } = d, [
|
|
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({
|
|
693
752
|
top: 0,
|
|
694
753
|
left: 0
|
|
695
754
|
});
|
|
696
|
-
|
|
755
|
+
v.useEffect(() => {
|
|
697
756
|
const r = () => {
|
|
698
|
-
|
|
757
|
+
n(null);
|
|
699
758
|
};
|
|
700
|
-
return document.body.addEventListener("click", r),
|
|
701
|
-
|
|
759
|
+
return document.body.addEventListener("click", r), n(null), () => {
|
|
760
|
+
n(null), document.body.removeEventListener("click", r);
|
|
702
761
|
};
|
|
703
|
-
}, [])
|
|
704
|
-
|
|
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) => {
|
|
705
769
|
r.stopPropagation();
|
|
706
|
-
const
|
|
707
|
-
let
|
|
708
|
-
|
|
709
|
-
top:
|
|
710
|
-
left:
|
|
711
|
-
}),
|
|
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);
|
|
712
776
|
};
|
|
713
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
714
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
777
|
+
return /* @__PURE__ */ t.jsxs("div", { className: L.products, children: [
|
|
778
|
+
/* @__PURE__ */ t.jsx("h5", { className: L.subtitle, children: "Button Type" }),
|
|
715
779
|
s.map((r) => /* @__PURE__ */ t.jsxs(
|
|
716
780
|
"div",
|
|
717
781
|
{
|
|
718
|
-
className:
|
|
782
|
+
className: L.product,
|
|
719
783
|
children: [
|
|
720
784
|
/* @__PURE__ */ t.jsx(
|
|
721
|
-
|
|
785
|
+
D,
|
|
722
786
|
{
|
|
723
|
-
onChange: (
|
|
724
|
-
const
|
|
787
|
+
onChange: (p) => {
|
|
788
|
+
const k = [...s].map((x) => x.id === r.id ? {
|
|
725
789
|
...r,
|
|
726
|
-
type:
|
|
727
|
-
} :
|
|
728
|
-
o(
|
|
790
|
+
type: p
|
|
791
|
+
} : x);
|
|
792
|
+
o(k);
|
|
729
793
|
},
|
|
730
794
|
value: r.type,
|
|
731
795
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
732
796
|
}
|
|
733
797
|
),
|
|
734
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
798
|
+
/* @__PURE__ */ t.jsxs("div", { className: L.buttons, children: [
|
|
735
799
|
/* @__PURE__ */ t.jsx(
|
|
736
|
-
|
|
800
|
+
g,
|
|
737
801
|
{
|
|
738
802
|
name: "sliders",
|
|
739
803
|
hoverable: !0,
|
|
740
804
|
width: 20,
|
|
741
805
|
height: 20,
|
|
742
|
-
onClick: (
|
|
743
|
-
|
|
806
|
+
onClick: (p) => {
|
|
807
|
+
j(p, r);
|
|
744
808
|
}
|
|
745
809
|
}
|
|
746
810
|
),
|
|
747
|
-
/* @__PURE__ */ t.jsx(
|
|
748
|
-
|
|
811
|
+
c && /* @__PURE__ */ t.jsx(
|
|
812
|
+
g,
|
|
749
813
|
{
|
|
750
814
|
name: "trash",
|
|
751
815
|
hoverable: !0,
|
|
752
816
|
onClick: () => {
|
|
753
|
-
const
|
|
754
|
-
o(
|
|
817
|
+
const p = s.filter((u) => u.id !== r.id);
|
|
818
|
+
o(p);
|
|
755
819
|
},
|
|
756
820
|
width: 20,
|
|
757
821
|
height: 20,
|
|
@@ -763,32 +827,33 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
763
827
|
},
|
|
764
828
|
r.id
|
|
765
829
|
)),
|
|
766
|
-
|
|
767
|
-
|
|
830
|
+
e && /* @__PURE__ */ t.jsx(
|
|
831
|
+
ve,
|
|
768
832
|
{
|
|
769
|
-
activeButton:
|
|
770
|
-
setActiveButton:
|
|
771
|
-
popupPosition:
|
|
833
|
+
activeButton: e,
|
|
834
|
+
setActiveButton: n,
|
|
835
|
+
popupPosition: i
|
|
772
836
|
}
|
|
773
837
|
),
|
|
774
|
-
/* @__PURE__ */ t.jsxs(
|
|
775
|
-
|
|
838
|
+
l && /* @__PURE__ */ t.jsxs(
|
|
839
|
+
K,
|
|
776
840
|
{
|
|
777
|
-
className:
|
|
841
|
+
className: L.button,
|
|
778
842
|
size: "s",
|
|
779
843
|
onClick: () => {
|
|
780
844
|
const r = [...s];
|
|
781
845
|
r.push({
|
|
782
846
|
type: "Primary",
|
|
783
|
-
id:
|
|
784
|
-
|
|
785
|
-
destination: "Go to Page"
|
|
847
|
+
id: E(),
|
|
848
|
+
typesText: [],
|
|
849
|
+
destination: "Go to Page",
|
|
850
|
+
text: ""
|
|
786
851
|
}), o(r);
|
|
787
852
|
},
|
|
788
853
|
children: [
|
|
789
854
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
790
855
|
/* @__PURE__ */ t.jsx(
|
|
791
|
-
|
|
856
|
+
g,
|
|
792
857
|
{
|
|
793
858
|
name: "plus",
|
|
794
859
|
width: 16,
|
|
@@ -799,13 +864,13 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
799
864
|
}
|
|
800
865
|
)
|
|
801
866
|
] });
|
|
802
|
-
},
|
|
803
|
-
const { isActiveButtons: s, setIsActiveButtons: o, buttons:
|
|
804
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
805
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
806
|
-
/* @__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" }),
|
|
807
872
|
/* @__PURE__ */ t.jsx(
|
|
808
|
-
|
|
873
|
+
P,
|
|
809
874
|
{
|
|
810
875
|
current: s,
|
|
811
876
|
onChange: (e) => o(e)
|
|
@@ -813,63 +878,63 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
813
878
|
)
|
|
814
879
|
] }),
|
|
815
880
|
/* @__PURE__ */ t.jsx(
|
|
816
|
-
|
|
881
|
+
Me,
|
|
817
882
|
{
|
|
818
|
-
buttons:
|
|
883
|
+
buttons: c,
|
|
819
884
|
setButtons: l
|
|
820
885
|
}
|
|
821
886
|
)
|
|
822
887
|
] }) });
|
|
823
|
-
},
|
|
824
|
-
wrapper:
|
|
825
|
-
subtitle:
|
|
826
|
-
content:
|
|
827
|
-
range:
|
|
828
|
-
track:
|
|
829
|
-
progress:
|
|
830
|
-
dots:
|
|
831
|
-
dot:
|
|
832
|
-
active:
|
|
833
|
-
input:
|
|
834
|
-
countBlock:
|
|
835
|
-
count:
|
|
836
|
-
controls:
|
|
837
|
-
button:
|
|
838
|
-
},
|
|
839
|
-
const { label: s, min: o = 1, max:
|
|
840
|
-
e <
|
|
841
|
-
},
|
|
842
|
-
e > o &&
|
|
843
|
-
},
|
|
844
|
-
const
|
|
845
|
-
|
|
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(_);
|
|
846
911
|
};
|
|
847
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
848
|
-
s && /* @__PURE__ */ t.jsx("h5", { className:
|
|
849
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
850
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
851
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
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 }),
|
|
852
917
|
/* @__PURE__ */ t.jsx(
|
|
853
918
|
"div",
|
|
854
919
|
{
|
|
855
|
-
className:
|
|
856
|
-
style: { width: `${
|
|
920
|
+
className: m.progress,
|
|
921
|
+
style: { width: `${r}%` }
|
|
857
922
|
}
|
|
858
923
|
),
|
|
859
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
860
|
-
const
|
|
924
|
+
/* @__PURE__ */ t.jsx("div", { className: m.dots, children: j.map((x, _) => {
|
|
925
|
+
const R = _ <= (e - o) / l;
|
|
861
926
|
return /* @__PURE__ */ t.jsx(
|
|
862
927
|
"button",
|
|
863
928
|
{
|
|
864
|
-
onClick: () =>
|
|
865
|
-
className:
|
|
866
|
-
[
|
|
867
|
-
[
|
|
868
|
-
[
|
|
929
|
+
onClick: () => k(_),
|
|
930
|
+
className: U(m.dot, {
|
|
931
|
+
[m.active]: R,
|
|
932
|
+
[m.inactive]: !R,
|
|
933
|
+
[m.dragging]: i
|
|
869
934
|
}),
|
|
870
|
-
"aria-label": `Set value to ${o +
|
|
935
|
+
"aria-label": `Set value to ${o + _ * l}`
|
|
871
936
|
},
|
|
872
|
-
|
|
937
|
+
_
|
|
873
938
|
);
|
|
874
939
|
}) }),
|
|
875
940
|
/* @__PURE__ */ t.jsx(
|
|
@@ -877,43 +942,43 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
877
942
|
{
|
|
878
943
|
type: "range",
|
|
879
944
|
min: o,
|
|
880
|
-
max:
|
|
945
|
+
max: c,
|
|
881
946
|
step: l,
|
|
882
947
|
value: e,
|
|
883
|
-
onChange: (
|
|
884
|
-
onMouseDown: () =>
|
|
885
|
-
onMouseUp: () =>
|
|
886
|
-
onTouchStart: () =>
|
|
887
|
-
onTouchEnd: () =>
|
|
888
|
-
className:
|
|
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
|
|
889
954
|
}
|
|
890
955
|
)
|
|
891
956
|
] }),
|
|
892
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
957
|
+
/* @__PURE__ */ t.jsxs("div", { className: m.countBlock, children: [
|
|
893
958
|
/* @__PURE__ */ t.jsx(
|
|
894
|
-
|
|
959
|
+
I,
|
|
895
960
|
{
|
|
896
961
|
type: "number",
|
|
897
962
|
min: o,
|
|
898
|
-
max:
|
|
963
|
+
max: c,
|
|
899
964
|
paddingless: !0,
|
|
900
|
-
onChange: (
|
|
901
|
-
const
|
|
902
|
-
|
|
965
|
+
onChange: (x) => {
|
|
966
|
+
const _ = Number(x);
|
|
967
|
+
_ > c ? n(c) : _ < o ? n(o) : n(_);
|
|
903
968
|
},
|
|
904
969
|
value: String(e)
|
|
905
970
|
}
|
|
906
971
|
),
|
|
907
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
972
|
+
/* @__PURE__ */ t.jsxs("div", { className: m.controls, children: [
|
|
908
973
|
/* @__PURE__ */ t.jsx(
|
|
909
974
|
"button",
|
|
910
975
|
{
|
|
911
|
-
onClick:
|
|
912
|
-
disabled: e >=
|
|
913
|
-
className:
|
|
976
|
+
onClick: p,
|
|
977
|
+
disabled: e >= c,
|
|
978
|
+
className: m.button,
|
|
914
979
|
"aria-label": "Increment count",
|
|
915
980
|
children: /* @__PURE__ */ t.jsx(
|
|
916
|
-
|
|
981
|
+
g,
|
|
917
982
|
{
|
|
918
983
|
name: "arrow-down",
|
|
919
984
|
width: 15,
|
|
@@ -926,12 +991,12 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
926
991
|
/* @__PURE__ */ t.jsx(
|
|
927
992
|
"button",
|
|
928
993
|
{
|
|
929
|
-
onClick:
|
|
994
|
+
onClick: u,
|
|
930
995
|
disabled: e <= o,
|
|
931
|
-
className:
|
|
996
|
+
className: m.button,
|
|
932
997
|
"aria-label": "Decrement count",
|
|
933
998
|
children: /* @__PURE__ */ t.jsx(
|
|
934
|
-
|
|
999
|
+
g,
|
|
935
1000
|
{
|
|
936
1001
|
name: "arrow-down",
|
|
937
1002
|
width: 15,
|
|
@@ -946,26 +1011,26 @@ const W = "_wrapper_1g82c_2", X = "_alignmentBlock_1g82c_8", Z = "_title_1g82c_1
|
|
|
946
1011
|
] });
|
|
947
1012
|
};
|
|
948
1013
|
export {
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1014
|
+
K as Button,
|
|
1015
|
+
Me as ButtonTypeSettings,
|
|
1016
|
+
ls as ButtonsSettings,
|
|
1017
|
+
rs as Checkbox,
|
|
1018
|
+
J as ChooseImage,
|
|
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
|
|
971
1036
|
};
|