@billgangcom/theme-lib 1.10.2 → 1.11.0
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 +3 -3
- package/dist/builder.es.js +159 -159
- package/dist/{index-C8nZ3s7u.cjs → index-C4eTUjpB.cjs} +1 -1
- package/dist/{index-Ca7u1mPN.js → index-hz9iiZsE.js} +6 -6
- package/dist/shared/ui/Accordion/index.d.ts +7 -0
- package/dist/shared/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +439 -404
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,19 +1,53 @@
|
|
|
1
|
-
import { j as t,
|
|
2
|
-
import { h as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
1
|
+
import { j as t, c as W, I as h, a as M, S as E, T as ot, C as st, b as z, D as ct, H as it, B as nt, v as V, u as lt, d as at } from "./index-hz9iiZsE.js";
|
|
2
|
+
import { h as Fs, i as Gs, f as Us, M as Xs, P as Ys, R as Vs, e as Js, g as Ks } from "./index-hz9iiZsE.js";
|
|
3
|
+
import m from "react";
|
|
4
|
+
const ut = "_accordion_2tiiw_1", _t = "_header_2tiiw_9", pt = "_icon_2tiiw_16", mt = "_open_2tiiw_19", ht = "_content_2tiiw_23", U = {
|
|
5
|
+
accordion: ut,
|
|
6
|
+
header: _t,
|
|
7
|
+
icon: pt,
|
|
8
|
+
open: mt,
|
|
9
|
+
content: ht
|
|
10
|
+
}, qs = ({ title: u, content: s }) => {
|
|
11
|
+
const [n, c] = m.useState(!1), [i, l] = m.useState(0), e = m.useRef(null), o = () => {
|
|
12
|
+
c(!n);
|
|
13
|
+
};
|
|
14
|
+
return m.useEffect(() => {
|
|
15
|
+
e.current && l(n ? e.current.scrollHeight : 0);
|
|
16
|
+
}, [n]), /* @__PURE__ */ t.jsxs("div", { className: U.accordion, children: [
|
|
17
|
+
/* @__PURE__ */ t.jsxs(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: U.header,
|
|
21
|
+
onClick: o,
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ t.jsx("h3", { children: u }),
|
|
24
|
+
/* @__PURE__ */ t.jsx("div", { className: W(U.icon, { [U.open]: n }), children: /* @__PURE__ */ t.jsx(h, { name: "CaretDown" }) })
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ t.jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
ref: e,
|
|
32
|
+
className: U.content,
|
|
33
|
+
style: { height: `${i}px` },
|
|
34
|
+
children: /* @__PURE__ */ t.jsx("p", { children: s })
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] });
|
|
38
|
+
}, gt = "_wrapper_1g82c_2", xt = "_alignmentBlock_1g82c_8", bt = "_title_1g82c_15", ft = "_subtitle_1g82c_22", vt = "_alignmentContent_1g82c_29", jt = "_alignments_1g82c_35", kt = "_alignment_1g82c_8", $t = "_circle_1g82c_54", yt = "_paddings_1g82c_61", wt = "_padding_1g82c_61", Nt = "_input_1g82c_79", S = {
|
|
39
|
+
wrapper: gt,
|
|
40
|
+
alignmentBlock: xt,
|
|
41
|
+
title: bt,
|
|
42
|
+
subtitle: ft,
|
|
43
|
+
alignmentContent: vt,
|
|
44
|
+
alignments: jt,
|
|
45
|
+
alignment: kt,
|
|
46
|
+
circle: $t,
|
|
47
|
+
paddings: yt,
|
|
48
|
+
padding: wt,
|
|
49
|
+
input: Nt
|
|
50
|
+
}, Bt = [
|
|
17
51
|
"topLeft",
|
|
18
52
|
"top",
|
|
19
53
|
"topRight",
|
|
@@ -23,8 +57,8 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
23
57
|
"bottomLeft",
|
|
24
58
|
"bottom",
|
|
25
59
|
"bottomRight"
|
|
26
|
-
],
|
|
27
|
-
const { alignment: s, padding:
|
|
60
|
+
], Ct = ["left", "top", "right", "bottom"], Es = (u) => {
|
|
61
|
+
const { alignment: s, padding: n, setPadding: c, setAlignment: i } = u;
|
|
28
62
|
function l() {
|
|
29
63
|
switch (s) {
|
|
30
64
|
case "left":
|
|
@@ -43,8 +77,8 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
43
77
|
return "TextAlignCenter";
|
|
44
78
|
}
|
|
45
79
|
}
|
|
46
|
-
function e(
|
|
47
|
-
switch (
|
|
80
|
+
function e(o) {
|
|
81
|
+
switch (o) {
|
|
48
82
|
case "left":
|
|
49
83
|
return "AlignLeft";
|
|
50
84
|
case "right":
|
|
@@ -60,17 +94,17 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
60
94
|
/* @__PURE__ */ t.jsxs("div", { className: S.alignmentBlock, children: [
|
|
61
95
|
/* @__PURE__ */ t.jsx("h5", { className: S.subtitle, children: "Alignment" }),
|
|
62
96
|
/* @__PURE__ */ t.jsxs("div", { className: S.alignmentContent, children: [
|
|
63
|
-
/* @__PURE__ */ t.jsx("div", { className: S.alignments, children:
|
|
97
|
+
/* @__PURE__ */ t.jsx("div", { className: S.alignments, children: Bt.map((o) => /* @__PURE__ */ t.jsxs(
|
|
64
98
|
"div",
|
|
65
99
|
{
|
|
66
100
|
onClick: () => {
|
|
67
|
-
i(
|
|
101
|
+
i(o);
|
|
68
102
|
},
|
|
69
103
|
className: S.alignment,
|
|
70
104
|
children: [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
105
|
+
o !== s && /* @__PURE__ */ t.jsx("div", { className: S.circle }),
|
|
106
|
+
o === s && /* @__PURE__ */ t.jsx(
|
|
107
|
+
h,
|
|
74
108
|
{
|
|
75
109
|
name: l(),
|
|
76
110
|
fill: "#FF3F19",
|
|
@@ -80,13 +114,13 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
80
114
|
)
|
|
81
115
|
]
|
|
82
116
|
},
|
|
83
|
-
|
|
117
|
+
o
|
|
84
118
|
)) }),
|
|
85
|
-
/* @__PURE__ */ t.jsx("div", { className: S.paddings, children:
|
|
119
|
+
/* @__PURE__ */ t.jsx("div", { className: S.paddings, children: Ct.map((o) => /* @__PURE__ */ t.jsxs("label", { className: S.padding, children: [
|
|
86
120
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
87
|
-
|
|
121
|
+
h,
|
|
88
122
|
{
|
|
89
|
-
name: e(
|
|
123
|
+
name: e(o),
|
|
90
124
|
width: 20,
|
|
91
125
|
height: 20
|
|
92
126
|
}
|
|
@@ -95,10 +129,10 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
95
129
|
M,
|
|
96
130
|
{
|
|
97
131
|
type: "text",
|
|
98
|
-
value: String(o
|
|
132
|
+
value: String(n[o]),
|
|
99
133
|
onChange: (r) => c({
|
|
100
|
-
...
|
|
101
|
-
[
|
|
134
|
+
...n,
|
|
135
|
+
[o]: Number(r)
|
|
102
136
|
}),
|
|
103
137
|
paddingless: !0,
|
|
104
138
|
borderless: !0
|
|
@@ -108,18 +142,18 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
108
142
|
] })
|
|
109
143
|
] })
|
|
110
144
|
] });
|
|
111
|
-
},
|
|
112
|
-
subtitle:
|
|
113
|
-
header:
|
|
114
|
-
text:
|
|
115
|
-
top:
|
|
116
|
-
itemsBlock:
|
|
117
|
-
},
|
|
118
|
-
typeTexts:
|
|
119
|
-
block:
|
|
120
|
-
active:
|
|
121
|
-
},
|
|
122
|
-
const { typesText: s, setTypesText:
|
|
145
|
+
}, Tt = "_subtitle_2zbxx_1", Pt = "_header_2zbxx_8", It = "_text_2zbxx_9", At = "_top_2zbxx_16", St = "_itemsBlock_2zbxx_23", X = {
|
|
146
|
+
subtitle: Tt,
|
|
147
|
+
header: Pt,
|
|
148
|
+
text: It,
|
|
149
|
+
top: At,
|
|
150
|
+
itemsBlock: St
|
|
151
|
+
}, Ot = "_typeTexts_3zlec_1", Dt = "_block_3zlec_7", Lt = "_active_3zlec_18", tt = {
|
|
152
|
+
typeTexts: Ot,
|
|
153
|
+
block: Dt,
|
|
154
|
+
active: Lt
|
|
155
|
+
}, qt = ["bold", "italic", "underline", "strike-through", "code"], rt = (u) => {
|
|
156
|
+
const { typesText: s, setTypesText: n } = u;
|
|
123
157
|
function c(i) {
|
|
124
158
|
switch (i) {
|
|
125
159
|
case "bold":
|
|
@@ -134,22 +168,22 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
134
168
|
return "TextUnderline";
|
|
135
169
|
}
|
|
136
170
|
}
|
|
137
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
171
|
+
return /* @__PURE__ */ t.jsx("div", { className: tt.typeTexts, children: qt.map((i) => /* @__PURE__ */ t.jsx(
|
|
138
172
|
"div",
|
|
139
173
|
{
|
|
140
|
-
className: tt
|
|
141
|
-
[
|
|
174
|
+
className: W(tt.block, {
|
|
175
|
+
[tt.active]: s.includes(i)
|
|
142
176
|
}),
|
|
143
177
|
onClick: () => {
|
|
144
178
|
const l = [...s];
|
|
145
179
|
if (l.includes(i)) {
|
|
146
|
-
const e = l.filter((
|
|
147
|
-
|
|
180
|
+
const e = l.filter((o) => o !== i);
|
|
181
|
+
n(e);
|
|
148
182
|
} else
|
|
149
|
-
l.push(i),
|
|
183
|
+
l.push(i), n(l);
|
|
150
184
|
},
|
|
151
185
|
children: /* @__PURE__ */ t.jsx(
|
|
152
|
-
|
|
186
|
+
h,
|
|
153
187
|
{
|
|
154
188
|
name: c(i),
|
|
155
189
|
fill: s.includes(i) ? "#252525" : "#757575",
|
|
@@ -160,32 +194,32 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
160
194
|
},
|
|
161
195
|
String(i)
|
|
162
196
|
)) });
|
|
163
|
-
},
|
|
197
|
+
}, Et = (u) => {
|
|
164
198
|
const {
|
|
165
199
|
typesText: s,
|
|
166
|
-
isActiveText:
|
|
200
|
+
isActiveText: n,
|
|
167
201
|
setIsActiveText: c,
|
|
168
202
|
text: i,
|
|
169
203
|
setText: l,
|
|
170
204
|
setTypesText: e,
|
|
171
|
-
title:
|
|
205
|
+
title: o,
|
|
172
206
|
subtitle: r = "Items"
|
|
173
207
|
} = u;
|
|
174
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
175
|
-
(
|
|
176
|
-
|
|
177
|
-
|
|
208
|
+
return /* @__PURE__ */ t.jsxs("div", { className: X.text, children: [
|
|
209
|
+
(o || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
|
|
210
|
+
o && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: o }),
|
|
211
|
+
n !== void 0 && c && /* @__PURE__ */ t.jsx(
|
|
178
212
|
E,
|
|
179
213
|
{
|
|
180
|
-
current:
|
|
214
|
+
current: n,
|
|
181
215
|
onChange: (j) => c(j)
|
|
182
216
|
}
|
|
183
217
|
)
|
|
184
218
|
] }),
|
|
185
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
186
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
219
|
+
/* @__PURE__ */ t.jsxs("div", { className: X.itemsBlock, children: [
|
|
220
|
+
/* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: r }),
|
|
187
221
|
/* @__PURE__ */ t.jsx(
|
|
188
|
-
|
|
222
|
+
ot,
|
|
189
223
|
{
|
|
190
224
|
onChange: (j) => l(j),
|
|
191
225
|
value: i,
|
|
@@ -193,7 +227,7 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
193
227
|
}
|
|
194
228
|
),
|
|
195
229
|
/* @__PURE__ */ t.jsx(
|
|
196
|
-
|
|
230
|
+
rt,
|
|
197
231
|
{
|
|
198
232
|
typesText: s,
|
|
199
233
|
setTypesText: e
|
|
@@ -201,29 +235,29 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
201
235
|
)
|
|
202
236
|
] })
|
|
203
237
|
] });
|
|
204
|
-
},
|
|
205
|
-
subtitle:
|
|
206
|
-
header:
|
|
207
|
-
text:
|
|
208
|
-
productsBlock:
|
|
209
|
-
top:
|
|
210
|
-
itemsBlock:
|
|
211
|
-
typeTexts:
|
|
212
|
-
block:
|
|
213
|
-
active:
|
|
214
|
-
products:
|
|
215
|
-
product:
|
|
216
|
-
button:
|
|
217
|
-
disabled:
|
|
218
|
-
image:
|
|
219
|
-
info:
|
|
220
|
-
name:
|
|
221
|
-
buttons:
|
|
222
|
-
modal:
|
|
223
|
-
link:
|
|
224
|
-
modalOptions:
|
|
225
|
-
},
|
|
226
|
-
const { activeItem: s, setActiveItem:
|
|
238
|
+
}, Rt = "_subtitle_11qr1_1", Ht = "_header_11qr1_8", Mt = "_text_11qr1_9", zt = "_productsBlock_11qr1_10", Ft = "_top_11qr1_22", Gt = "_itemsBlock_11qr1_29", Ut = "_typeTexts_11qr1_35", Xt = "_block_11qr1_41", Yt = "_active_11qr1_52", Vt = "_products_11qr1_10", Jt = "_product_11qr1_10", Kt = "_button_11qr1_70", Qt = "_disabled_11qr1_80", Wt = "_image_11qr1_84", Zt = "_info_11qr1_91", te = "_name_11qr1_102", ee = "_buttons_11qr1_106", se = "_modal_11qr1_112", ne = "_link_11qr1_130", oe = "_modalOptions_11qr1_136", y = {
|
|
239
|
+
subtitle: Rt,
|
|
240
|
+
header: Ht,
|
|
241
|
+
text: Mt,
|
|
242
|
+
productsBlock: zt,
|
|
243
|
+
top: Ft,
|
|
244
|
+
itemsBlock: Gt,
|
|
245
|
+
typeTexts: Ut,
|
|
246
|
+
block: Xt,
|
|
247
|
+
active: Yt,
|
|
248
|
+
products: Vt,
|
|
249
|
+
product: Jt,
|
|
250
|
+
button: Kt,
|
|
251
|
+
disabled: Qt,
|
|
252
|
+
image: Wt,
|
|
253
|
+
info: Zt,
|
|
254
|
+
name: te,
|
|
255
|
+
buttons: ee,
|
|
256
|
+
modal: se,
|
|
257
|
+
link: ne,
|
|
258
|
+
modalOptions: oe
|
|
259
|
+
}, ce = (u) => {
|
|
260
|
+
const { activeItem: s, setActiveItem: n, popupPosition: c, modalOptions: i, setIsOpenModal: l } = u;
|
|
227
261
|
return /* @__PURE__ */ t.jsxs(
|
|
228
262
|
"div",
|
|
229
263
|
{
|
|
@@ -239,14 +273,14 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
239
273
|
/* @__PURE__ */ t.jsxs("div", { className: y.top, children: [
|
|
240
274
|
/* @__PURE__ */ t.jsx("h3", { children: s.name }),
|
|
241
275
|
/* @__PURE__ */ t.jsx(
|
|
242
|
-
|
|
276
|
+
h,
|
|
243
277
|
{
|
|
244
278
|
name: "X",
|
|
245
279
|
height: 20,
|
|
246
280
|
width: 20,
|
|
247
281
|
hoverable: !0,
|
|
248
282
|
onClick: () => {
|
|
249
|
-
|
|
283
|
+
n(null), l(!1);
|
|
250
284
|
}
|
|
251
285
|
}
|
|
252
286
|
)
|
|
@@ -254,37 +288,37 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
254
288
|
/* @__PURE__ */ t.jsx("div", { className: y.modalOptions, children: i.map((e) => {
|
|
255
289
|
if (e.type === "image")
|
|
256
290
|
return /* @__PURE__ */ t.jsx(
|
|
257
|
-
|
|
291
|
+
st,
|
|
258
292
|
{
|
|
259
293
|
label: "Put up an attractive image",
|
|
260
|
-
onChange: (
|
|
294
|
+
onChange: (o) => {
|
|
261
295
|
const r = {
|
|
262
296
|
...s,
|
|
263
|
-
[e.field]:
|
|
297
|
+
[e.field]: o
|
|
264
298
|
};
|
|
265
|
-
|
|
299
|
+
n(r);
|
|
266
300
|
}
|
|
267
301
|
}
|
|
268
302
|
);
|
|
269
303
|
if (e.type === "text")
|
|
270
304
|
return /* @__PURE__ */ t.jsx(
|
|
271
|
-
|
|
305
|
+
Et,
|
|
272
306
|
{
|
|
273
307
|
typesText: s[e.field.type],
|
|
274
|
-
setTypesText: (
|
|
308
|
+
setTypesText: (o) => {
|
|
275
309
|
const r = {
|
|
276
310
|
...s,
|
|
277
|
-
[e.field.type]:
|
|
311
|
+
[e.field.type]: o
|
|
278
312
|
};
|
|
279
|
-
|
|
313
|
+
n(r);
|
|
280
314
|
},
|
|
281
315
|
text: s[e.field.text] || "",
|
|
282
|
-
setText: (
|
|
316
|
+
setText: (o) => {
|
|
283
317
|
const r = {
|
|
284
318
|
...s,
|
|
285
|
-
[e.field.text]:
|
|
319
|
+
[e.field.text]: o
|
|
286
320
|
};
|
|
287
|
-
|
|
321
|
+
n(r);
|
|
288
322
|
},
|
|
289
323
|
subtitle: e.label
|
|
290
324
|
}
|
|
@@ -293,12 +327,12 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
293
327
|
return /* @__PURE__ */ t.jsx(
|
|
294
328
|
M,
|
|
295
329
|
{
|
|
296
|
-
onChange: (
|
|
330
|
+
onChange: (o) => {
|
|
297
331
|
const r = {
|
|
298
332
|
...s,
|
|
299
|
-
[e.field]:
|
|
333
|
+
[e.field]: o
|
|
300
334
|
};
|
|
301
|
-
|
|
335
|
+
n(r);
|
|
302
336
|
},
|
|
303
337
|
value: s[e.field] || "",
|
|
304
338
|
label: e.label,
|
|
@@ -310,12 +344,12 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
310
344
|
/* @__PURE__ */ t.jsx(
|
|
311
345
|
M,
|
|
312
346
|
{
|
|
313
|
-
onChange: (
|
|
347
|
+
onChange: (o) => {
|
|
314
348
|
const r = {
|
|
315
349
|
...s,
|
|
316
|
-
[e.field.text]:
|
|
350
|
+
[e.field.text]: o
|
|
317
351
|
};
|
|
318
|
-
|
|
352
|
+
n(r);
|
|
319
353
|
},
|
|
320
354
|
value: s[e.field.text] || "",
|
|
321
355
|
label: e.inputLabel,
|
|
@@ -327,27 +361,27 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
327
361
|
{
|
|
328
362
|
current: !!s[e.field.switch] || !1,
|
|
329
363
|
label: e.switchLabel,
|
|
330
|
-
onChange: (
|
|
364
|
+
onChange: (o) => {
|
|
331
365
|
const r = {
|
|
332
366
|
...s,
|
|
333
|
-
[e.field.switch]:
|
|
367
|
+
[e.field.switch]: o
|
|
334
368
|
};
|
|
335
|
-
|
|
369
|
+
n(r);
|
|
336
370
|
}
|
|
337
371
|
}
|
|
338
372
|
)
|
|
339
373
|
] });
|
|
340
374
|
if (e.type === "list")
|
|
341
375
|
return /* @__PURE__ */ t.jsx(
|
|
342
|
-
|
|
376
|
+
de,
|
|
343
377
|
{
|
|
344
378
|
items: s[e.field] || [],
|
|
345
|
-
setItems: (
|
|
379
|
+
setItems: (o) => {
|
|
346
380
|
const r = {
|
|
347
381
|
...s,
|
|
348
|
-
[e.field]:
|
|
382
|
+
[e.field]: o
|
|
349
383
|
};
|
|
350
|
-
|
|
384
|
+
n(r);
|
|
351
385
|
},
|
|
352
386
|
itemsType: "select",
|
|
353
387
|
draggable: e.draggable || !1,
|
|
@@ -362,31 +396,31 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
362
396
|
z,
|
|
363
397
|
{
|
|
364
398
|
options: e.itemsOptions,
|
|
365
|
-
onChange: (
|
|
399
|
+
onChange: (o) => {
|
|
366
400
|
const r = {
|
|
367
401
|
...s,
|
|
368
|
-
[e.field]:
|
|
402
|
+
[e.field]: o
|
|
369
403
|
};
|
|
370
|
-
|
|
404
|
+
n(r);
|
|
371
405
|
},
|
|
372
406
|
label: e.label,
|
|
373
407
|
value: s[e.field] || "String",
|
|
374
|
-
leftAddon: e.leftAddon && e.leftAddon === "icon" && /* @__PURE__ */ t.jsx(
|
|
408
|
+
leftAddon: e.leftAddon && e.leftAddon === "icon" && /* @__PURE__ */ t.jsx(h, { name: s[e.field] })
|
|
375
409
|
}
|
|
376
410
|
);
|
|
377
411
|
}) })
|
|
378
412
|
]
|
|
379
413
|
}
|
|
380
414
|
);
|
|
381
|
-
},
|
|
382
|
-
other:
|
|
383
|
-
subtitle:
|
|
384
|
-
items:
|
|
385
|
-
},
|
|
386
|
-
const { items: s, title:
|
|
387
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
388
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
389
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
415
|
+
}, ie = "_other_1wtgi_1", le = "_subtitle_1wtgi_7", ae = "_items_1wtgi_14", et = {
|
|
416
|
+
other: ie,
|
|
417
|
+
subtitle: le,
|
|
418
|
+
items: ae
|
|
419
|
+
}, dt = (u) => {
|
|
420
|
+
const { items: s, title: n = "Other" } = u;
|
|
421
|
+
return /* @__PURE__ */ t.jsxs("div", { className: et.other, children: [
|
|
422
|
+
/* @__PURE__ */ t.jsx("h5", { className: et.subtitle, children: n }),
|
|
423
|
+
/* @__PURE__ */ t.jsx("div", { className: et.items, children: s.map((c) => /* @__PURE__ */ t.jsx(
|
|
390
424
|
E,
|
|
391
425
|
{
|
|
392
426
|
current: c.isItem,
|
|
@@ -397,74 +431,74 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
397
431
|
}
|
|
398
432
|
)) })
|
|
399
433
|
] });
|
|
400
|
-
},
|
|
401
|
-
const { index: s, moveProduct:
|
|
434
|
+
}, re = (u) => {
|
|
435
|
+
const { index: s, moveProduct: n, children: c } = u, [, i] = lt({
|
|
402
436
|
accept: "product",
|
|
403
|
-
hover(
|
|
404
|
-
|
|
437
|
+
hover(o) {
|
|
438
|
+
o.index !== s && (n(o.index, s), o.index = s);
|
|
405
439
|
}
|
|
406
|
-
}), [{ isDragging: l }, e] =
|
|
440
|
+
}), [{ isDragging: l }, e] = at({
|
|
407
441
|
type: "product",
|
|
408
442
|
item: { index: s },
|
|
409
|
-
collect: (
|
|
410
|
-
isDragging:
|
|
443
|
+
collect: (o) => ({
|
|
444
|
+
isDragging: o.isDragging()
|
|
411
445
|
})
|
|
412
446
|
});
|
|
413
447
|
return /* @__PURE__ */ t.jsx(
|
|
414
448
|
"div",
|
|
415
449
|
{
|
|
416
|
-
ref: (
|
|
450
|
+
ref: (o) => e(i(o)),
|
|
417
451
|
className: `${y.product} ${l ? y.dragging : ""}`,
|
|
418
452
|
children: c
|
|
419
453
|
}
|
|
420
454
|
);
|
|
421
|
-
},
|
|
455
|
+
}, de = (u) => {
|
|
422
456
|
const {
|
|
423
457
|
isActiveItems: s,
|
|
424
|
-
setIsActiveItems:
|
|
458
|
+
setIsActiveItems: n,
|
|
425
459
|
items: c,
|
|
426
460
|
setItems: i,
|
|
427
461
|
other: l,
|
|
428
462
|
title: e,
|
|
429
|
-
subtitle:
|
|
463
|
+
subtitle: o,
|
|
430
464
|
editable: r = !0,
|
|
431
465
|
draggable: j = !1,
|
|
432
466
|
withImage: _ = !1,
|
|
433
467
|
deletable: v = !0,
|
|
434
|
-
addable:
|
|
468
|
+
addable: f = !0,
|
|
435
469
|
itemsType: w,
|
|
436
|
-
itemsPlaceholder:
|
|
470
|
+
itemsPlaceholder: g = "",
|
|
437
471
|
itemsOptions: p,
|
|
438
472
|
hasRangeSelector: C = !1,
|
|
439
|
-
rangeSelectorOptions:
|
|
440
|
-
modalOptions:
|
|
473
|
+
rangeSelectorOptions: J,
|
|
474
|
+
modalOptions: K,
|
|
441
475
|
addableOptions: F = {},
|
|
442
476
|
limit: I
|
|
443
|
-
} = u, [D, L] =
|
|
477
|
+
} = u, [D, L] = m.useState(null), [Z, Q] = m.useState({
|
|
444
478
|
top: 0,
|
|
445
479
|
left: 0
|
|
446
|
-
}), [d,
|
|
447
|
-
const P = [...c], [
|
|
448
|
-
P.splice(N, 0,
|
|
480
|
+
}), [d, x] = m.useState(!1), T = (a, N) => {
|
|
481
|
+
const P = [...c], [b] = P.splice(a, 1);
|
|
482
|
+
P.splice(N, 0, b), i(P);
|
|
449
483
|
};
|
|
450
|
-
|
|
484
|
+
m.useEffect(() => {
|
|
451
485
|
const a = () => {
|
|
452
|
-
L(null),
|
|
486
|
+
L(null), x(!1);
|
|
453
487
|
};
|
|
454
|
-
return document.body.addEventListener("click", a), L(null),
|
|
455
|
-
L(null),
|
|
488
|
+
return document.body.addEventListener("click", a), L(null), x(!1), () => {
|
|
489
|
+
L(null), x(!1), document.body.removeEventListener("click", a);
|
|
456
490
|
};
|
|
457
|
-
}, []),
|
|
491
|
+
}, []), m.useEffect(() => {
|
|
458
492
|
if (D) {
|
|
459
493
|
const a = [...c].map((N) => N.id === D.id ? D : N);
|
|
460
494
|
i(a);
|
|
461
495
|
}
|
|
462
496
|
}, [D]);
|
|
463
497
|
const k = (a, N) => {
|
|
464
|
-
a.stopPropagation(),
|
|
465
|
-
const P = a.target.getBoundingClientRect(),
|
|
498
|
+
a.stopPropagation(), x(!0);
|
|
499
|
+
const P = a.target.getBoundingClientRect(), b = 500, G = window.innerHeight;
|
|
466
500
|
let O = P.top + window.scrollY;
|
|
467
|
-
console.log(
|
|
501
|
+
console.log(b), O + b > G && (O = G - b - 20), Q({
|
|
468
502
|
top: O - 80,
|
|
469
503
|
left: P.left - 30
|
|
470
504
|
}), L(N);
|
|
@@ -480,7 +514,7 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
480
514
|
height: 16
|
|
481
515
|
}
|
|
482
516
|
) : /* @__PURE__ */ t.jsx(
|
|
483
|
-
|
|
517
|
+
h,
|
|
484
518
|
{
|
|
485
519
|
name: "Image",
|
|
486
520
|
width: 16,
|
|
@@ -492,7 +526,7 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
492
526
|
const A = (a, N) => {
|
|
493
527
|
const P = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
494
528
|
j && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
495
|
-
|
|
529
|
+
h,
|
|
496
530
|
{
|
|
497
531
|
name: "DotsSixVertical",
|
|
498
532
|
hoverable: !0,
|
|
@@ -503,14 +537,14 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
503
537
|
w === "select" && /* @__PURE__ */ t.jsx(
|
|
504
538
|
z,
|
|
505
539
|
{
|
|
506
|
-
onChange: (
|
|
540
|
+
onChange: (b) => {
|
|
507
541
|
const O = [...c].map((q) => q.id === a.id ? {
|
|
508
542
|
...a,
|
|
509
|
-
name:
|
|
543
|
+
name: b
|
|
510
544
|
} : q);
|
|
511
545
|
L({
|
|
512
546
|
...a,
|
|
513
|
-
name:
|
|
547
|
+
name: b
|
|
514
548
|
}), i([...O]);
|
|
515
549
|
},
|
|
516
550
|
value: a.name,
|
|
@@ -521,24 +555,24 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
521
555
|
w === "input" && /* @__PURE__ */ t.jsx(
|
|
522
556
|
M,
|
|
523
557
|
{
|
|
524
|
-
onChange: (
|
|
558
|
+
onChange: (b) => {
|
|
525
559
|
const O = [...c].map((q) => q.id === a.id ? {
|
|
526
560
|
...a,
|
|
527
|
-
name:
|
|
561
|
+
name: b
|
|
528
562
|
} : q);
|
|
529
563
|
i([...O]);
|
|
530
564
|
},
|
|
531
565
|
value: a.name,
|
|
532
|
-
placeholder:
|
|
566
|
+
placeholder: g
|
|
533
567
|
}
|
|
534
568
|
),
|
|
535
569
|
w === "image" && /* @__PURE__ */ t.jsx(
|
|
536
|
-
|
|
570
|
+
st,
|
|
537
571
|
{
|
|
538
|
-
onChange: (
|
|
572
|
+
onChange: (b) => {
|
|
539
573
|
const O = [...c].map((q) => q.id === a.id ? {
|
|
540
574
|
...a,
|
|
541
|
-
images:
|
|
575
|
+
images: b
|
|
542
576
|
} : q);
|
|
543
577
|
i([...O]);
|
|
544
578
|
}
|
|
@@ -546,30 +580,30 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
546
580
|
),
|
|
547
581
|
/* @__PURE__ */ t.jsxs("div", { className: y.buttons, children: [
|
|
548
582
|
r && /* @__PURE__ */ t.jsx(
|
|
549
|
-
|
|
583
|
+
h,
|
|
550
584
|
{
|
|
551
585
|
name: "Sliders",
|
|
552
586
|
hoverable: !0,
|
|
553
587
|
width: 20,
|
|
554
588
|
height: 20,
|
|
555
|
-
onClick: (
|
|
589
|
+
onClick: (b) => k(b, a)
|
|
556
590
|
}
|
|
557
591
|
),
|
|
558
592
|
v && /* @__PURE__ */ t.jsx(
|
|
559
|
-
|
|
593
|
+
h,
|
|
560
594
|
{
|
|
561
595
|
name: "Trash",
|
|
562
596
|
hoverable: !0,
|
|
563
597
|
width: 20,
|
|
564
598
|
height: 20,
|
|
565
599
|
fill: "#C12A2A",
|
|
566
|
-
onClick: () => i(c.filter((
|
|
600
|
+
onClick: () => i(c.filter((b) => b.id !== a.id))
|
|
567
601
|
}
|
|
568
602
|
)
|
|
569
603
|
] })
|
|
570
604
|
] });
|
|
571
605
|
return j ? /* @__PURE__ */ t.jsx(
|
|
572
|
-
|
|
606
|
+
re,
|
|
573
607
|
{
|
|
574
608
|
product: a,
|
|
575
609
|
index: N,
|
|
@@ -593,28 +627,28 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
593
627
|
E,
|
|
594
628
|
{
|
|
595
629
|
current: s,
|
|
596
|
-
onChange: (a) =>
|
|
630
|
+
onChange: (a) => n == null ? void 0 : n(a)
|
|
597
631
|
}
|
|
598
632
|
)
|
|
599
633
|
] }),
|
|
600
|
-
D && r &&
|
|
601
|
-
|
|
634
|
+
D && r && K && d && /* @__PURE__ */ t.jsx(
|
|
635
|
+
ce,
|
|
602
636
|
{
|
|
603
637
|
activeItem: D,
|
|
604
638
|
setActiveItem: L,
|
|
605
|
-
popupPosition:
|
|
606
|
-
modalOptions:
|
|
607
|
-
setIsOpenModal:
|
|
639
|
+
popupPosition: Z,
|
|
640
|
+
modalOptions: K,
|
|
641
|
+
setIsOpenModal: x
|
|
608
642
|
}
|
|
609
643
|
),
|
|
610
|
-
C &&
|
|
644
|
+
C && J && /* @__PURE__ */ t.jsx(ps, { ...J }),
|
|
611
645
|
/* @__PURE__ */ t.jsxs("div", { className: y.products, children: [
|
|
612
|
-
|
|
613
|
-
j ? /* @__PURE__ */ t.jsx(
|
|
614
|
-
|
|
615
|
-
|
|
646
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: y.subtitle, children: o }),
|
|
647
|
+
j ? /* @__PURE__ */ t.jsx(ct, { backend: it, children: c.map((a, N) => A(a, N)) }) : c.map((a, N) => A(a, N)),
|
|
648
|
+
f && /* @__PURE__ */ t.jsxs(
|
|
649
|
+
nt,
|
|
616
650
|
{
|
|
617
|
-
className:
|
|
651
|
+
className: W(y.button, {
|
|
618
652
|
[y.disabled]: !!(I && I <= c.length)
|
|
619
653
|
}),
|
|
620
654
|
size: "s",
|
|
@@ -623,22 +657,22 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
623
657
|
const a = [...c];
|
|
624
658
|
w === "select" ? a.push({
|
|
625
659
|
name: p[0] || `Product ${c.length + 1}`,
|
|
626
|
-
id:
|
|
660
|
+
id: V(),
|
|
627
661
|
...F
|
|
628
662
|
}) : w === "input" ? a.push({
|
|
629
663
|
name: "",
|
|
630
|
-
id:
|
|
664
|
+
id: V(),
|
|
631
665
|
...F
|
|
632
666
|
}) : a.push({
|
|
633
667
|
name: `Image ${c.length + 1}`,
|
|
634
|
-
id:
|
|
668
|
+
id: V(),
|
|
635
669
|
...F
|
|
636
670
|
}), i(a);
|
|
637
671
|
},
|
|
638
672
|
children: [
|
|
639
673
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
640
674
|
/* @__PURE__ */ t.jsx(
|
|
641
|
-
|
|
675
|
+
h,
|
|
642
676
|
{
|
|
643
677
|
name: "Plus",
|
|
644
678
|
width: 16,
|
|
@@ -649,33 +683,33 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
649
683
|
}
|
|
650
684
|
)
|
|
651
685
|
] }),
|
|
652
|
-
l !== void 0 && /* @__PURE__ */ t.jsx(
|
|
686
|
+
l !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: l })
|
|
653
687
|
] });
|
|
654
|
-
},
|
|
655
|
-
subtitle:
|
|
656
|
-
header:
|
|
657
|
-
text:
|
|
658
|
-
productsBlock:
|
|
659
|
-
buttonsBlock:
|
|
660
|
-
top:
|
|
661
|
-
itemsBlock:
|
|
662
|
-
typeTexts:
|
|
663
|
-
block:
|
|
664
|
-
active:
|
|
665
|
-
products:
|
|
666
|
-
product:
|
|
667
|
-
button:
|
|
668
|
-
image:
|
|
669
|
-
info:
|
|
670
|
-
name:
|
|
671
|
-
buttons:
|
|
672
|
-
modal:
|
|
673
|
-
other:
|
|
674
|
-
options:
|
|
675
|
-
},
|
|
676
|
-
const { activeButton: s, setActiveButton:
|
|
677
|
-
return
|
|
678
|
-
|
|
688
|
+
}, ue = "_subtitle_41klp_1", _e = "_header_41klp_8", pe = "_text_41klp_9", me = "_productsBlock_41klp_10", he = "_buttonsBlock_41klp_11", ge = "_top_41klp_21", xe = "_itemsBlock_41klp_28", be = "_typeTexts_41klp_34", fe = "_block_41klp_40", ve = "_active_41klp_51", je = "_products_41klp_10", ke = "_product_41klp_10", $e = "_button_41klp_11", ye = "_image_41klp_79", we = "_info_41klp_86", Ne = "_name_41klp_97", Be = "_buttons_41klp_11", Ce = "_modal_41klp_107", Te = "_other_41klp_124", Pe = "_options_41klp_130", H = {
|
|
689
|
+
subtitle: ue,
|
|
690
|
+
header: _e,
|
|
691
|
+
text: pe,
|
|
692
|
+
productsBlock: me,
|
|
693
|
+
buttonsBlock: he,
|
|
694
|
+
top: ge,
|
|
695
|
+
itemsBlock: xe,
|
|
696
|
+
typeTexts: be,
|
|
697
|
+
block: fe,
|
|
698
|
+
active: ve,
|
|
699
|
+
products: je,
|
|
700
|
+
product: ke,
|
|
701
|
+
button: $e,
|
|
702
|
+
image: ye,
|
|
703
|
+
info: we,
|
|
704
|
+
name: Ne,
|
|
705
|
+
buttons: Be,
|
|
706
|
+
modal: Ce,
|
|
707
|
+
other: Te,
|
|
708
|
+
options: Pe
|
|
709
|
+
}, Ie = (u) => {
|
|
710
|
+
const { activeButton: s, setActiveButton: n, popupPosition: c } = u, [i, l] = m.useState(s.typesText), [e, o] = m.useState(s.destination), [r, j] = m.useState(s.link || ""), [_, v] = m.useState(s.text || "");
|
|
711
|
+
return m.useEffect(() => {
|
|
712
|
+
n({
|
|
679
713
|
...s,
|
|
680
714
|
...{
|
|
681
715
|
text: _,
|
|
@@ -688,8 +722,8 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
688
722
|
"div",
|
|
689
723
|
{
|
|
690
724
|
className: H.modal,
|
|
691
|
-
onClick: (
|
|
692
|
-
|
|
725
|
+
onClick: (f) => {
|
|
726
|
+
f.stopPropagation();
|
|
693
727
|
},
|
|
694
728
|
style: {
|
|
695
729
|
top: `${c.top}px`,
|
|
@@ -699,13 +733,13 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
699
733
|
/* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
700
734
|
/* @__PURE__ */ t.jsx("h3", { children: s.type }),
|
|
701
735
|
/* @__PURE__ */ t.jsx(
|
|
702
|
-
|
|
736
|
+
h,
|
|
703
737
|
{
|
|
704
738
|
name: "X",
|
|
705
739
|
height: 20,
|
|
706
740
|
width: 20,
|
|
707
741
|
hoverable: !0,
|
|
708
|
-
onClick: () =>
|
|
742
|
+
onClick: () => n(null)
|
|
709
743
|
}
|
|
710
744
|
)
|
|
711
745
|
] }),
|
|
@@ -714,7 +748,7 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
714
748
|
z,
|
|
715
749
|
{
|
|
716
750
|
label: "Destination",
|
|
717
|
-
onChange: (
|
|
751
|
+
onChange: (f) => o(f),
|
|
718
752
|
options: ["Go to Page", "Open Link"],
|
|
719
753
|
value: e
|
|
720
754
|
}
|
|
@@ -731,7 +765,7 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
731
765
|
) : /* @__PURE__ */ t.jsx(
|
|
732
766
|
M,
|
|
733
767
|
{
|
|
734
|
-
onChange: (
|
|
768
|
+
onChange: (f) => j(f),
|
|
735
769
|
value: r,
|
|
736
770
|
placeholder: "https://",
|
|
737
771
|
label: "Link"
|
|
@@ -745,16 +779,16 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
745
779
|
}
|
|
746
780
|
),
|
|
747
781
|
/* @__PURE__ */ t.jsx(
|
|
748
|
-
|
|
782
|
+
ot,
|
|
749
783
|
{
|
|
750
|
-
onChange: (
|
|
784
|
+
onChange: (f) => v(f),
|
|
751
785
|
value: _,
|
|
752
786
|
label: "Text",
|
|
753
787
|
maxLength: 150
|
|
754
788
|
}
|
|
755
789
|
),
|
|
756
790
|
/* @__PURE__ */ t.jsx(
|
|
757
|
-
|
|
791
|
+
rt,
|
|
758
792
|
{
|
|
759
793
|
typesText: i,
|
|
760
794
|
setTypesText: l
|
|
@@ -764,78 +798,78 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
764
798
|
]
|
|
765
799
|
}
|
|
766
800
|
);
|
|
767
|
-
},
|
|
768
|
-
subtitle:
|
|
769
|
-
header:
|
|
770
|
-
text:
|
|
771
|
-
productsBlock:
|
|
772
|
-
buttonsBlock:
|
|
773
|
-
top:
|
|
774
|
-
itemsBlock:
|
|
775
|
-
typeTexts:
|
|
776
|
-
block:
|
|
777
|
-
active:
|
|
778
|
-
products:
|
|
779
|
-
product:
|
|
780
|
-
button:
|
|
781
|
-
image:
|
|
782
|
-
info:
|
|
783
|
-
name:
|
|
784
|
-
buttons:
|
|
785
|
-
modal:
|
|
786
|
-
other:
|
|
787
|
-
options:
|
|
788
|
-
},
|
|
789
|
-
const { buttons: s, setButtons:
|
|
801
|
+
}, Ae = "_subtitle_1y5sw_1", Se = "_header_1y5sw_8", Oe = "_text_1y5sw_9", De = "_productsBlock_1y5sw_10", Le = "_buttonsBlock_1y5sw_11", qe = "_top_1y5sw_22", Ee = "_itemsBlock_1y5sw_29", Re = "_typeTexts_1y5sw_35", He = "_block_1y5sw_41", Me = "_active_1y5sw_52", ze = "_products_1y5sw_10", Fe = "_product_1y5sw_10", Ge = "_button_1y5sw_11", Ue = "_image_1y5sw_80", Xe = "_info_1y5sw_87", Ye = "_name_1y5sw_98", Ve = "_buttons_1y5sw_11", Je = "_modal_1y5sw_108", Ke = "_other_1y5sw_125", Qe = "_options_1y5sw_131", Y = {
|
|
802
|
+
subtitle: Ae,
|
|
803
|
+
header: Se,
|
|
804
|
+
text: Oe,
|
|
805
|
+
productsBlock: De,
|
|
806
|
+
buttonsBlock: Le,
|
|
807
|
+
top: qe,
|
|
808
|
+
itemsBlock: Ee,
|
|
809
|
+
typeTexts: Re,
|
|
810
|
+
block: He,
|
|
811
|
+
active: Me,
|
|
812
|
+
products: ze,
|
|
813
|
+
product: Fe,
|
|
814
|
+
button: Ge,
|
|
815
|
+
image: Ue,
|
|
816
|
+
info: Xe,
|
|
817
|
+
name: Ye,
|
|
818
|
+
buttons: Ve,
|
|
819
|
+
modal: Je,
|
|
820
|
+
other: Ke,
|
|
821
|
+
options: Qe
|
|
822
|
+
}, We = (u) => {
|
|
823
|
+
const { buttons: s, setButtons: n, deletable: c = !0, addable: i = !0 } = u, [l, e] = m.useState(null), [o, r] = m.useState({
|
|
790
824
|
top: 0,
|
|
791
825
|
left: 0
|
|
792
826
|
});
|
|
793
|
-
|
|
827
|
+
m.useEffect(() => {
|
|
794
828
|
const _ = () => {
|
|
795
829
|
e(null);
|
|
796
830
|
};
|
|
797
831
|
return document.body.addEventListener("click", _), e(null), () => {
|
|
798
832
|
e(null), document.body.removeEventListener("click", _);
|
|
799
833
|
};
|
|
800
|
-
}, []),
|
|
834
|
+
}, []), m.useEffect(() => {
|
|
801
835
|
if (l) {
|
|
802
836
|
const _ = [...s].map((v) => v.id === l.id ? l : v);
|
|
803
|
-
|
|
837
|
+
n(_);
|
|
804
838
|
}
|
|
805
839
|
}, [l]);
|
|
806
840
|
const j = (_, v) => {
|
|
807
841
|
_.stopPropagation();
|
|
808
|
-
const
|
|
809
|
-
let p =
|
|
810
|
-
p + w >
|
|
842
|
+
const f = _.target.getBoundingClientRect(), w = 490, g = window.innerHeight;
|
|
843
|
+
let p = f.top + window.scrollY;
|
|
844
|
+
p + w > g && (p = g - w - 20), r({
|
|
811
845
|
top: p,
|
|
812
|
-
left:
|
|
846
|
+
left: f.left - 30
|
|
813
847
|
}), e(v);
|
|
814
848
|
};
|
|
815
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
816
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
849
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
|
|
850
|
+
/* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: "Button Type" }),
|
|
817
851
|
s.map((_) => /* @__PURE__ */ t.jsxs(
|
|
818
852
|
"div",
|
|
819
853
|
{
|
|
820
|
-
className:
|
|
854
|
+
className: Y.product,
|
|
821
855
|
children: [
|
|
822
856
|
/* @__PURE__ */ t.jsx(
|
|
823
857
|
z,
|
|
824
858
|
{
|
|
825
859
|
onChange: (v) => {
|
|
826
|
-
const w = [...s].map((
|
|
860
|
+
const w = [...s].map((g) => g.id === _.id ? {
|
|
827
861
|
..._,
|
|
828
862
|
type: v
|
|
829
|
-
} :
|
|
830
|
-
|
|
863
|
+
} : g);
|
|
864
|
+
n(w);
|
|
831
865
|
},
|
|
832
866
|
value: _.type,
|
|
833
867
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
834
868
|
}
|
|
835
869
|
),
|
|
836
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
870
|
+
/* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
|
|
837
871
|
/* @__PURE__ */ t.jsx(
|
|
838
|
-
|
|
872
|
+
h,
|
|
839
873
|
{
|
|
840
874
|
name: "Sliders",
|
|
841
875
|
hoverable: !0,
|
|
@@ -847,13 +881,13 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
847
881
|
}
|
|
848
882
|
),
|
|
849
883
|
c && /* @__PURE__ */ t.jsx(
|
|
850
|
-
|
|
884
|
+
h,
|
|
851
885
|
{
|
|
852
886
|
name: "Trash",
|
|
853
887
|
hoverable: !0,
|
|
854
888
|
onClick: () => {
|
|
855
|
-
const v = s.filter((
|
|
856
|
-
|
|
889
|
+
const v = s.filter((f) => f.id !== _.id);
|
|
890
|
+
n(v);
|
|
857
891
|
},
|
|
858
892
|
width: 20,
|
|
859
893
|
height: 20,
|
|
@@ -866,32 +900,32 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
866
900
|
_.id
|
|
867
901
|
)),
|
|
868
902
|
l && /* @__PURE__ */ t.jsx(
|
|
869
|
-
|
|
903
|
+
Ie,
|
|
870
904
|
{
|
|
871
905
|
activeButton: l,
|
|
872
906
|
setActiveButton: e,
|
|
873
|
-
popupPosition:
|
|
907
|
+
popupPosition: o
|
|
874
908
|
}
|
|
875
909
|
),
|
|
876
910
|
i && /* @__PURE__ */ t.jsxs(
|
|
877
|
-
|
|
911
|
+
nt,
|
|
878
912
|
{
|
|
879
|
-
className:
|
|
913
|
+
className: Y.button,
|
|
880
914
|
size: "s",
|
|
881
915
|
onClick: () => {
|
|
882
916
|
const _ = [...s];
|
|
883
917
|
_.push({
|
|
884
918
|
type: "Primary",
|
|
885
|
-
id:
|
|
919
|
+
id: V(),
|
|
886
920
|
typesText: [],
|
|
887
921
|
destination: "Go to Page",
|
|
888
922
|
text: ""
|
|
889
|
-
}),
|
|
923
|
+
}), n(_);
|
|
890
924
|
},
|
|
891
925
|
children: [
|
|
892
926
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
893
927
|
/* @__PURE__ */ t.jsx(
|
|
894
|
-
|
|
928
|
+
h,
|
|
895
929
|
{
|
|
896
930
|
name: "Plus",
|
|
897
931
|
width: 16,
|
|
@@ -902,8 +936,8 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
902
936
|
}
|
|
903
937
|
)
|
|
904
938
|
] });
|
|
905
|
-
},
|
|
906
|
-
const { isActiveButtons: s, setIsActiveButtons:
|
|
939
|
+
}, Rs = (u) => {
|
|
940
|
+
const { isActiveButtons: s, setIsActiveButtons: n, buttons: c, setButtons: i } = u;
|
|
907
941
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: H.buttonsBlock, children: [
|
|
908
942
|
/* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
909
943
|
/* @__PURE__ */ t.jsx("h3", { className: H.title, children: "Buttons" }),
|
|
@@ -911,40 +945,40 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
911
945
|
E,
|
|
912
946
|
{
|
|
913
947
|
current: s,
|
|
914
|
-
onChange: (l) =>
|
|
948
|
+
onChange: (l) => n(l)
|
|
915
949
|
}
|
|
916
950
|
)
|
|
917
951
|
] }),
|
|
918
952
|
/* @__PURE__ */ t.jsx(
|
|
919
|
-
|
|
953
|
+
We,
|
|
920
954
|
{
|
|
921
955
|
buttons: c,
|
|
922
956
|
setButtons: i
|
|
923
957
|
}
|
|
924
958
|
)
|
|
925
959
|
] }) });
|
|
926
|
-
},
|
|
927
|
-
wrapper:
|
|
928
|
-
subtitle:
|
|
929
|
-
content:
|
|
930
|
-
range:
|
|
931
|
-
track:
|
|
932
|
-
progress:
|
|
933
|
-
dots:
|
|
934
|
-
dot:
|
|
935
|
-
active:
|
|
936
|
-
input:
|
|
937
|
-
countBlock:
|
|
938
|
-
count:
|
|
939
|
-
controls:
|
|
940
|
-
button:
|
|
941
|
-
},
|
|
942
|
-
const { label: s, min:
|
|
960
|
+
}, Ze = "_wrapper_tn7gb_1", ts = "_subtitle_tn7gb_7", es = "_content_tn7gb_14", ss = "_range_tn7gb_21", ns = "_track_tn7gb_26", os = "_progress_tn7gb_35", cs = "_dots_tn7gb_45", is = "_dot_tn7gb_45", ls = "_active_tn7gb_62", as = "_input_tn7gb_74", rs = "_countBlock_tn7gb_88", ds = "_count_tn7gb_88", us = "_controls_tn7gb_103", _s = "_button_tn7gb_108", $ = {
|
|
961
|
+
wrapper: Ze,
|
|
962
|
+
subtitle: ts,
|
|
963
|
+
content: es,
|
|
964
|
+
range: ss,
|
|
965
|
+
track: ns,
|
|
966
|
+
progress: os,
|
|
967
|
+
dots: cs,
|
|
968
|
+
dot: is,
|
|
969
|
+
active: ls,
|
|
970
|
+
input: as,
|
|
971
|
+
countBlock: rs,
|
|
972
|
+
count: ds,
|
|
973
|
+
controls: us,
|
|
974
|
+
button: _s
|
|
975
|
+
}, ps = (u) => {
|
|
976
|
+
const { label: s, min: n = 1, max: c = 4, step: i = 1, count: l, setCount: e } = u, [o, r] = m.useState(!1), j = Array.from({ length: (c - n) / i + 1 }), _ = (l - n) / (c - n) * 100, v = () => {
|
|
943
977
|
l < c && e(l + i);
|
|
944
|
-
},
|
|
945
|
-
l >
|
|
946
|
-
}, w = (
|
|
947
|
-
const p =
|
|
978
|
+
}, f = () => {
|
|
979
|
+
l > n && e(l - i);
|
|
980
|
+
}, w = (g) => {
|
|
981
|
+
const p = n + g * i;
|
|
948
982
|
e(p);
|
|
949
983
|
};
|
|
950
984
|
return /* @__PURE__ */ t.jsxs("div", { className: $.wrapper, children: [
|
|
@@ -959,18 +993,18 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
959
993
|
style: { width: `${_}%` }
|
|
960
994
|
}
|
|
961
995
|
),
|
|
962
|
-
/* @__PURE__ */ t.jsx("div", { className: $.dots, children: j.map((
|
|
963
|
-
const C = p <= (l -
|
|
996
|
+
/* @__PURE__ */ t.jsx("div", { className: $.dots, children: j.map((g, p) => {
|
|
997
|
+
const C = p <= (l - n) / i;
|
|
964
998
|
return /* @__PURE__ */ t.jsx(
|
|
965
999
|
"button",
|
|
966
1000
|
{
|
|
967
1001
|
onClick: () => w(p),
|
|
968
|
-
className:
|
|
1002
|
+
className: W($.dot, {
|
|
969
1003
|
[$.active]: C,
|
|
970
1004
|
[$.inactive]: !C,
|
|
971
|
-
[$.dragging]:
|
|
1005
|
+
[$.dragging]: o
|
|
972
1006
|
}),
|
|
973
|
-
"aria-label": `Set value to ${
|
|
1007
|
+
"aria-label": `Set value to ${n + p * i}`
|
|
974
1008
|
},
|
|
975
1009
|
p
|
|
976
1010
|
);
|
|
@@ -979,11 +1013,11 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
979
1013
|
"input",
|
|
980
1014
|
{
|
|
981
1015
|
type: "range",
|
|
982
|
-
min:
|
|
1016
|
+
min: n,
|
|
983
1017
|
max: c,
|
|
984
1018
|
step: i,
|
|
985
1019
|
value: l,
|
|
986
|
-
onChange: (
|
|
1020
|
+
onChange: (g) => e(Number(g.target.value)),
|
|
987
1021
|
onMouseDown: () => r(!0),
|
|
988
1022
|
onMouseUp: () => r(!1),
|
|
989
1023
|
onTouchStart: () => r(!0),
|
|
@@ -997,12 +1031,12 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
997
1031
|
M,
|
|
998
1032
|
{
|
|
999
1033
|
type: "number",
|
|
1000
|
-
min:
|
|
1034
|
+
min: n,
|
|
1001
1035
|
max: c,
|
|
1002
1036
|
paddingless: !0,
|
|
1003
|
-
onChange: (
|
|
1004
|
-
const p = Number(
|
|
1005
|
-
p > c ? e(c) : p <
|
|
1037
|
+
onChange: (g) => {
|
|
1038
|
+
const p = Number(g);
|
|
1039
|
+
p > c ? e(c) : p < n ? e(n) : e(p);
|
|
1006
1040
|
},
|
|
1007
1041
|
value: String(l)
|
|
1008
1042
|
}
|
|
@@ -1016,7 +1050,7 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1016
1050
|
className: $.button,
|
|
1017
1051
|
"aria-label": "Increment count",
|
|
1018
1052
|
children: /* @__PURE__ */ t.jsx(
|
|
1019
|
-
|
|
1053
|
+
h,
|
|
1020
1054
|
{
|
|
1021
1055
|
name: "CaretUp",
|
|
1022
1056
|
width: 15,
|
|
@@ -1028,12 +1062,12 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1028
1062
|
/* @__PURE__ */ t.jsx(
|
|
1029
1063
|
"button",
|
|
1030
1064
|
{
|
|
1031
|
-
onClick:
|
|
1032
|
-
disabled: l <=
|
|
1065
|
+
onClick: f,
|
|
1066
|
+
disabled: l <= n,
|
|
1033
1067
|
className: $.button,
|
|
1034
1068
|
"aria-label": "Decrement count",
|
|
1035
1069
|
children: /* @__PURE__ */ t.jsx(
|
|
1036
|
-
|
|
1070
|
+
h,
|
|
1037
1071
|
{
|
|
1038
1072
|
name: "CaretDown",
|
|
1039
1073
|
width: 15,
|
|
@@ -1046,28 +1080,28 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1046
1080
|
] })
|
|
1047
1081
|
] })
|
|
1048
1082
|
] });
|
|
1049
|
-
},
|
|
1050
|
-
subtitle:
|
|
1051
|
-
header:
|
|
1052
|
-
text:
|
|
1053
|
-
productsBlock:
|
|
1054
|
-
top:
|
|
1055
|
-
itemsBlock:
|
|
1056
|
-
typeTexts:
|
|
1057
|
-
block:
|
|
1058
|
-
active:
|
|
1059
|
-
products:
|
|
1060
|
-
product:
|
|
1061
|
-
button:
|
|
1062
|
-
image:
|
|
1063
|
-
info:
|
|
1064
|
-
name:
|
|
1065
|
-
buttons:
|
|
1066
|
-
modal:
|
|
1067
|
-
link:
|
|
1068
|
-
modalOptions:
|
|
1069
|
-
},
|
|
1070
|
-
const { activeItem: s, setActiveItem:
|
|
1083
|
+
}, ms = "_subtitle_1nl8x_1", hs = "_header_1nl8x_8", gs = "_text_1nl8x_9", xs = "_productsBlock_1nl8x_10", bs = "_top_1nl8x_22", fs = "_itemsBlock_1nl8x_29", vs = "_typeTexts_1nl8x_35", js = "_block_1nl8x_41", ks = "_active_1nl8x_52", $s = "_products_1nl8x_10", ys = "_product_1nl8x_10", ws = "_button_1nl8x_70", Ns = "_image_1nl8x_80", Bs = "_info_1nl8x_87", Cs = "_name_1nl8x_98", Ts = "_buttons_1nl8x_102", Ps = "_modal_1nl8x_108", Is = "_link_1nl8x_126", As = "_modalOptions_1nl8x_132", B = {
|
|
1084
|
+
subtitle: ms,
|
|
1085
|
+
header: hs,
|
|
1086
|
+
text: gs,
|
|
1087
|
+
productsBlock: xs,
|
|
1088
|
+
top: bs,
|
|
1089
|
+
itemsBlock: fs,
|
|
1090
|
+
typeTexts: vs,
|
|
1091
|
+
block: js,
|
|
1092
|
+
active: ks,
|
|
1093
|
+
products: $s,
|
|
1094
|
+
product: ys,
|
|
1095
|
+
button: ws,
|
|
1096
|
+
image: Ns,
|
|
1097
|
+
info: Bs,
|
|
1098
|
+
name: Cs,
|
|
1099
|
+
buttons: Ts,
|
|
1100
|
+
modal: Ps,
|
|
1101
|
+
link: Is,
|
|
1102
|
+
modalOptions: As
|
|
1103
|
+
}, Ss = (u) => {
|
|
1104
|
+
const { activeItem: s, setActiveItem: n, popupPosition: c, setIsOpenModal: i } = u;
|
|
1071
1105
|
return /* @__PURE__ */ t.jsxs(
|
|
1072
1106
|
"div",
|
|
1073
1107
|
{
|
|
@@ -1083,20 +1117,20 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1083
1117
|
/* @__PURE__ */ t.jsxs("div", { className: B.top, children: [
|
|
1084
1118
|
/* @__PURE__ */ t.jsx("h3", { children: s.name }),
|
|
1085
1119
|
/* @__PURE__ */ t.jsx(
|
|
1086
|
-
|
|
1120
|
+
h,
|
|
1087
1121
|
{
|
|
1088
1122
|
name: "X",
|
|
1089
1123
|
height: 20,
|
|
1090
1124
|
width: 20,
|
|
1091
1125
|
hoverable: !0,
|
|
1092
1126
|
onClick: () => {
|
|
1093
|
-
i(!1),
|
|
1127
|
+
i(!1), n(null);
|
|
1094
1128
|
}
|
|
1095
1129
|
}
|
|
1096
1130
|
)
|
|
1097
1131
|
] }),
|
|
1098
1132
|
/* @__PURE__ */ t.jsx("div", { className: B.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
1099
|
-
|
|
1133
|
+
st,
|
|
1100
1134
|
{
|
|
1101
1135
|
label: "Put up an attractive image",
|
|
1102
1136
|
onChange: (l) => {
|
|
@@ -1105,80 +1139,80 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1105
1139
|
images: l,
|
|
1106
1140
|
imagePath: l[0]
|
|
1107
1141
|
};
|
|
1108
|
-
|
|
1142
|
+
n(e);
|
|
1109
1143
|
}
|
|
1110
1144
|
}
|
|
1111
1145
|
) })
|
|
1112
1146
|
]
|
|
1113
1147
|
}
|
|
1114
1148
|
);
|
|
1115
|
-
},
|
|
1116
|
-
const { index: s, moveProduct:
|
|
1149
|
+
}, Os = (u) => {
|
|
1150
|
+
const { index: s, moveProduct: n, children: c } = u, [, i] = lt({
|
|
1117
1151
|
accept: "product",
|
|
1118
|
-
hover(
|
|
1119
|
-
|
|
1152
|
+
hover(o) {
|
|
1153
|
+
o.index !== s && (n(o.index, s), o.index = s);
|
|
1120
1154
|
}
|
|
1121
|
-
}), [{ isDragging: l }, e] =
|
|
1155
|
+
}), [{ isDragging: l }, e] = at({
|
|
1122
1156
|
type: "product",
|
|
1123
1157
|
item: { index: s },
|
|
1124
|
-
collect: (
|
|
1125
|
-
isDragging:
|
|
1158
|
+
collect: (o) => ({
|
|
1159
|
+
isDragging: o.isDragging()
|
|
1126
1160
|
})
|
|
1127
1161
|
});
|
|
1128
1162
|
return /* @__PURE__ */ t.jsx(
|
|
1129
1163
|
"div",
|
|
1130
1164
|
{
|
|
1131
|
-
ref: (
|
|
1165
|
+
ref: (o) => e(i(o)),
|
|
1132
1166
|
className: `${B.product} ${l ? B.dragging : ""}`,
|
|
1133
1167
|
children: c
|
|
1134
1168
|
}
|
|
1135
1169
|
);
|
|
1136
|
-
},
|
|
1170
|
+
}, Hs = (u) => {
|
|
1137
1171
|
const {
|
|
1138
1172
|
isActiveItems: s,
|
|
1139
|
-
setIsActiveItems:
|
|
1173
|
+
setIsActiveItems: n,
|
|
1140
1174
|
items: c,
|
|
1141
1175
|
setItems: i,
|
|
1142
1176
|
other: l,
|
|
1143
1177
|
title: e,
|
|
1144
|
-
subtitle:
|
|
1178
|
+
subtitle: o,
|
|
1145
1179
|
editable: r = !0,
|
|
1146
1180
|
draggable: j = !1,
|
|
1147
1181
|
withImage: _ = !1,
|
|
1148
1182
|
deletable: v = !0,
|
|
1149
|
-
addable:
|
|
1183
|
+
addable: f = !0,
|
|
1150
1184
|
itemsType: w,
|
|
1151
|
-
itemsOptions:
|
|
1152
|
-
} = u, [p, C] =
|
|
1185
|
+
itemsOptions: g
|
|
1186
|
+
} = u, [p, C] = m.useState(null), [J, K] = m.useState({
|
|
1153
1187
|
top: 0,
|
|
1154
1188
|
left: 0
|
|
1155
|
-
}), [F, I] =
|
|
1189
|
+
}), [F, I] = m.useState(!1), D = (d, x) => {
|
|
1156
1190
|
const T = [...c], [k] = T.splice(d, 1);
|
|
1157
|
-
T.splice(
|
|
1191
|
+
T.splice(x, 0, k), i(T);
|
|
1158
1192
|
};
|
|
1159
|
-
|
|
1193
|
+
m.useEffect(() => {
|
|
1160
1194
|
const d = () => {
|
|
1161
1195
|
C(null), I(!1);
|
|
1162
1196
|
};
|
|
1163
1197
|
return document.body.addEventListener("click", d), C(null), I(!1), () => {
|
|
1164
1198
|
C(null), I(!1), document.body.removeEventListener("click", d);
|
|
1165
1199
|
};
|
|
1166
|
-
}, []),
|
|
1200
|
+
}, []), m.useEffect(() => {
|
|
1167
1201
|
if (p) {
|
|
1168
|
-
const d = [...c].map((
|
|
1202
|
+
const d = [...c].map((x) => x.id === p.id ? p : x);
|
|
1169
1203
|
i(d);
|
|
1170
1204
|
}
|
|
1171
1205
|
}, [p]);
|
|
1172
|
-
const L = (d,
|
|
1206
|
+
const L = (d, x) => {
|
|
1173
1207
|
d.stopPropagation();
|
|
1174
1208
|
const T = d.target.getBoundingClientRect(), k = 100, R = window.innerHeight;
|
|
1175
1209
|
let A = T.top + window.scrollY;
|
|
1176
|
-
A + k > R && (A = R - k - 20), I(!0),
|
|
1210
|
+
A + k > R && (A = R - k - 20), I(!0), K({
|
|
1177
1211
|
top: A - 80,
|
|
1178
1212
|
left: T.left - 30
|
|
1179
|
-
}), C(
|
|
1213
|
+
}), C(x);
|
|
1180
1214
|
};
|
|
1181
|
-
function
|
|
1215
|
+
function Z(d) {
|
|
1182
1216
|
if (_)
|
|
1183
1217
|
return d ? /* @__PURE__ */ t.jsx(
|
|
1184
1218
|
"img",
|
|
@@ -1189,7 +1223,7 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1189
1223
|
height: 16
|
|
1190
1224
|
}
|
|
1191
1225
|
) : /* @__PURE__ */ t.jsx(
|
|
1192
|
-
|
|
1226
|
+
h,
|
|
1193
1227
|
{
|
|
1194
1228
|
name: "Image",
|
|
1195
1229
|
width: 16,
|
|
@@ -1198,10 +1232,10 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1198
1232
|
}
|
|
1199
1233
|
);
|
|
1200
1234
|
}
|
|
1201
|
-
const
|
|
1235
|
+
const Q = (d, x) => {
|
|
1202
1236
|
const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1203
1237
|
j && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1204
|
-
|
|
1238
|
+
h,
|
|
1205
1239
|
{
|
|
1206
1240
|
name: "DotsSixVertical",
|
|
1207
1241
|
hoverable: !0,
|
|
@@ -1213,18 +1247,18 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1213
1247
|
z,
|
|
1214
1248
|
{
|
|
1215
1249
|
onChange: (k) => {
|
|
1216
|
-
const R = [...c], A = Number(k.split(" ")[1]), a =
|
|
1250
|
+
const R = [...c], A = Number(k.split(" ")[1]), a = g.find((b) => b.id === A);
|
|
1217
1251
|
if (!a) return;
|
|
1218
1252
|
const N = {
|
|
1219
1253
|
...a.productData.stats,
|
|
1220
1254
|
newPrice: a.productData.minPrice.amount,
|
|
1221
1255
|
oldPrice: a.productData.compareAtPrice.amount
|
|
1222
|
-
}, P = R.map((
|
|
1256
|
+
}, P = R.map((b) => b.id === d.id ? {
|
|
1223
1257
|
...d,
|
|
1224
1258
|
name: k,
|
|
1225
1259
|
listingId: A,
|
|
1226
1260
|
stats: N
|
|
1227
|
-
} :
|
|
1261
|
+
} : b);
|
|
1228
1262
|
C({
|
|
1229
1263
|
...d,
|
|
1230
1264
|
name: k,
|
|
@@ -1232,13 +1266,13 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1232
1266
|
}), i([...P]);
|
|
1233
1267
|
},
|
|
1234
1268
|
value: d.name,
|
|
1235
|
-
options: [...
|
|
1236
|
-
leftAddon:
|
|
1269
|
+
options: [...g.map((k) => `Product ${k.id}`)],
|
|
1270
|
+
leftAddon: Z(d.images[0])
|
|
1237
1271
|
}
|
|
1238
1272
|
),
|
|
1239
1273
|
/* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
|
|
1240
1274
|
r && /* @__PURE__ */ t.jsx(
|
|
1241
|
-
|
|
1275
|
+
h,
|
|
1242
1276
|
{
|
|
1243
1277
|
name: "Sliders",
|
|
1244
1278
|
hoverable: !0,
|
|
@@ -1248,7 +1282,7 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1248
1282
|
}
|
|
1249
1283
|
),
|
|
1250
1284
|
v && /* @__PURE__ */ t.jsx(
|
|
1251
|
-
|
|
1285
|
+
h,
|
|
1252
1286
|
{
|
|
1253
1287
|
name: "Trash",
|
|
1254
1288
|
hoverable: !0,
|
|
@@ -1261,10 +1295,10 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1261
1295
|
] })
|
|
1262
1296
|
] });
|
|
1263
1297
|
return j ? /* @__PURE__ */ t.jsx(
|
|
1264
|
-
|
|
1298
|
+
Os,
|
|
1265
1299
|
{
|
|
1266
1300
|
product: d,
|
|
1267
|
-
index:
|
|
1301
|
+
index: x,
|
|
1268
1302
|
moveProduct: D,
|
|
1269
1303
|
children: T
|
|
1270
1304
|
},
|
|
@@ -1285,46 +1319,46 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1285
1319
|
E,
|
|
1286
1320
|
{
|
|
1287
1321
|
current: s,
|
|
1288
|
-
onChange: (d) =>
|
|
1322
|
+
onChange: (d) => n == null ? void 0 : n(d)
|
|
1289
1323
|
}
|
|
1290
1324
|
)
|
|
1291
1325
|
] }),
|
|
1292
1326
|
F && p && /* @__PURE__ */ t.jsx(
|
|
1293
|
-
|
|
1327
|
+
Ss,
|
|
1294
1328
|
{
|
|
1295
1329
|
activeItem: p,
|
|
1296
1330
|
setActiveItem: C,
|
|
1297
1331
|
setIsOpenModal: I,
|
|
1298
|
-
popupPosition:
|
|
1332
|
+
popupPosition: J
|
|
1299
1333
|
}
|
|
1300
1334
|
),
|
|
1301
1335
|
/* @__PURE__ */ t.jsxs("div", { className: B.products, children: [
|
|
1302
|
-
|
|
1303
|
-
j ? /* @__PURE__ */ t.jsx(
|
|
1304
|
-
|
|
1305
|
-
|
|
1336
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: B.subtitle, children: o }),
|
|
1337
|
+
j ? /* @__PURE__ */ t.jsx(ct, { backend: it, children: c.map((d, x) => Q(d, x)) }) : c.map((d, x) => Q(d, x)),
|
|
1338
|
+
f && /* @__PURE__ */ t.jsxs(
|
|
1339
|
+
nt,
|
|
1306
1340
|
{
|
|
1307
1341
|
className: B.button,
|
|
1308
1342
|
size: "s",
|
|
1309
1343
|
onClick: () => {
|
|
1310
|
-
const d = [...c],
|
|
1344
|
+
const d = [...c], x = g[0].id;
|
|
1311
1345
|
d.push({
|
|
1312
|
-
name: `Product ${
|
|
1313
|
-
id:
|
|
1314
|
-
listingId:
|
|
1346
|
+
name: `Product ${x}`,
|
|
1347
|
+
id: V(),
|
|
1348
|
+
listingId: x,
|
|
1315
1349
|
imagePath: "",
|
|
1316
1350
|
images: [],
|
|
1317
1351
|
stats: {
|
|
1318
|
-
...
|
|
1319
|
-
newPrice:
|
|
1320
|
-
oldPrice:
|
|
1352
|
+
...g[0].productData.stats,
|
|
1353
|
+
newPrice: g[0].productData.minPrice.amount,
|
|
1354
|
+
oldPrice: g[0].productData.compareAtPrice.amount
|
|
1321
1355
|
}
|
|
1322
1356
|
}), i(d);
|
|
1323
1357
|
},
|
|
1324
1358
|
children: [
|
|
1325
1359
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1326
1360
|
/* @__PURE__ */ t.jsx(
|
|
1327
|
-
|
|
1361
|
+
h,
|
|
1328
1362
|
{
|
|
1329
1363
|
name: "Plus",
|
|
1330
1364
|
width: 16,
|
|
@@ -1335,31 +1369,32 @@ const dt = "_wrapper_1g82c_2", ut = "_alignmentBlock_1g82c_8", _t = "_title_1g82
|
|
|
1335
1369
|
}
|
|
1336
1370
|
)
|
|
1337
1371
|
] }),
|
|
1338
|
-
l !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1372
|
+
l !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: l })
|
|
1339
1373
|
] });
|
|
1340
1374
|
};
|
|
1341
1375
|
export {
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1376
|
+
qs as Accordion,
|
|
1377
|
+
nt as Button,
|
|
1378
|
+
We as ButtonTypeSettings,
|
|
1379
|
+
Rs as ButtonsSettings,
|
|
1380
|
+
Fs as Checkbox,
|
|
1381
|
+
st as ChooseImage,
|
|
1382
|
+
Gs as ChooseImageModal,
|
|
1383
|
+
Us as ColorPicker,
|
|
1384
|
+
h as Icon,
|
|
1350
1385
|
M as Input,
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1386
|
+
de as ItemsSettings,
|
|
1387
|
+
Es as LayoutSettings,
|
|
1388
|
+
Hs as ListingSelector,
|
|
1389
|
+
Xs as Modal,
|
|
1390
|
+
Ys as Picker,
|
|
1391
|
+
Vs as Radio,
|
|
1392
|
+
ps as RangeSelector,
|
|
1358
1393
|
z as Select,
|
|
1359
|
-
|
|
1394
|
+
Js as Submodal,
|
|
1360
1395
|
E as Switch,
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1396
|
+
Et as TextSettings,
|
|
1397
|
+
ot as Textarea,
|
|
1398
|
+
Ks as Tip,
|
|
1399
|
+
rt as TypesText
|
|
1365
1400
|
};
|