@lanaco/lnc-react-ui 4.0.91 → 4.0.93
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.
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createElement as
|
|
3
|
-
import { s as
|
|
4
|
-
import { a as
|
|
1
|
+
import { jsx as o, jsxs as u, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as se, useState as z, useEffect as G, forwardRef as Z, useRef as ee, useImperativeHandle as le, Suspense as ce, memo as de, useMemo as ge } from "react";
|
|
3
|
+
import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { a as B, l as Y, o as re } from "./utils-BXCGNjIy.js";
|
|
5
5
|
import { M as A } from "./consts-BuFChS64.js";
|
|
6
|
-
import { m as
|
|
6
|
+
import { m as he } from "./motion-Ckekul_K.js";
|
|
7
7
|
import { P as i } from "./index-S5Cd7WrG.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import fe from "./Icon.js";
|
|
9
|
+
import me from "./Badge.js";
|
|
10
10
|
import { u as M } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
11
|
-
import { u as
|
|
12
|
-
import
|
|
13
|
-
import { I as
|
|
11
|
+
import { u as te } from "./useDetectMobile-Bkvj0VMa.js";
|
|
12
|
+
import pe from "./FlexBox.js";
|
|
13
|
+
import { I as q } from "./index-Dhf4jQmS.js";
|
|
14
14
|
import L from "./IconButton.js";
|
|
15
|
-
const
|
|
15
|
+
const ue = f.div`
|
|
16
16
|
cursor: pointer;
|
|
17
17
|
display: flex;
|
|
18
18
|
gap: 1rem;
|
|
@@ -27,8 +27,8 @@ const me = m.div`
|
|
|
27
27
|
border: none;
|
|
28
28
|
border-radius: 0;
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
31
|
-
border-radius: ${(e) =>
|
|
30
|
+
`, we = f.div`
|
|
31
|
+
border-radius: ${(e) => B(e.theme, "edged")};
|
|
32
32
|
height: 15rem;
|
|
33
33
|
width: 15rem;
|
|
34
34
|
min-width: 15rem;
|
|
@@ -56,7 +56,7 @@ const me = m.div`
|
|
|
56
56
|
max-width: 100dvh;
|
|
57
57
|
height: 23.438rem;
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`, be = f.div`
|
|
60
60
|
flex: 1;
|
|
61
61
|
display: flex;
|
|
62
62
|
flex-direction: column;
|
|
@@ -119,7 +119,7 @@ const me = m.div`
|
|
|
119
119
|
gap: 0.25rem;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
`,
|
|
122
|
+
`, xe = {
|
|
123
123
|
"#ADE3EB": "#76D0DB",
|
|
124
124
|
"#DDD6FE": "#C4B5FD",
|
|
125
125
|
"#FDE68A": "#FCD34D",
|
|
@@ -131,13 +131,13 @@ const me = m.div`
|
|
|
131
131
|
"#E7E5E4": "#D6D3D1",
|
|
132
132
|
"#FED7AA": "#FDBA74",
|
|
133
133
|
default: "#C4C8CF"
|
|
134
|
-
},
|
|
134
|
+
}, J = (e = !1, t = !1, l = !1) => `
|
|
135
135
|
display: flex;
|
|
136
|
-
${
|
|
137
|
-
${
|
|
136
|
+
${t ? "flex-wrap: wrap;" : ""}
|
|
137
|
+
${t ? "" : "flex-wrap: nowrap;"}
|
|
138
138
|
${e ? "align-items: center;" : ""}
|
|
139
139
|
${l ? "justify-content: center;" : ""}
|
|
140
|
-
`,
|
|
140
|
+
`, ve = f(he.div)`
|
|
141
141
|
text-decoration: none;
|
|
142
142
|
${(e) => e.hasPermission === !0 && "cursor: pointer"};
|
|
143
143
|
|
|
@@ -154,22 +154,22 @@ const me = m.div`
|
|
|
154
154
|
text-decoration: none;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
${
|
|
157
|
+
${J(!0)}
|
|
158
158
|
gap: 0.5rem;
|
|
159
159
|
padding: 0.5rem;
|
|
160
160
|
color: ${(e) => e.isActive === !1 ? "var(--gray-900)" : "var(--primary-600)"};
|
|
161
161
|
font-weight: 500;
|
|
162
162
|
font-size: 0.875rem;
|
|
163
163
|
line-height: 1.25rem;
|
|
164
|
-
border-radius: ${(e) =>
|
|
164
|
+
border-radius: ${(e) => B(e.theme, "slight")};
|
|
165
165
|
transition: all 0.25s ease;
|
|
166
166
|
|
|
167
167
|
& .logo-wrapper {
|
|
168
|
-
${
|
|
168
|
+
${J(!0, !1, !0)}
|
|
169
169
|
flex-shrink: 0;
|
|
170
170
|
border-radius: 999px;
|
|
171
171
|
border: 3px solid
|
|
172
|
-
${(e) => e.isActive === !1 ? "var(--gray-300, #c4c8cf)" :
|
|
172
|
+
${(e) => e.isActive === !1 ? "var(--gray-300, #c4c8cf)" : xe[e.themeColor] ?? "var(--gray-300, #c4c8cf)"};
|
|
173
173
|
|
|
174
174
|
& img,
|
|
175
175
|
.img-placeholder {
|
|
@@ -211,15 +211,15 @@ const me = m.div`
|
|
|
211
211
|
background-color: var(--gray-95080, #14161acc);
|
|
212
212
|
color: var(--gray-600, #676e79);
|
|
213
213
|
}
|
|
214
|
-
`,
|
|
214
|
+
`, ye = f.div`
|
|
215
215
|
position: absolute;
|
|
216
216
|
top: 0.5rem;
|
|
217
217
|
${(e) => e.alignToLeft === !0 ? "left: 0.5rem;" : "right: 0.5rem;"}
|
|
218
218
|
display: flex;
|
|
219
219
|
gap: 0.25rem;
|
|
220
|
-
`,
|
|
221
|
-
border-radius: ${(e) =>
|
|
222
|
-
background-color: ${(e) =>
|
|
220
|
+
`, $e = (e) => `var(--${e}-700)`, De = f.div`
|
|
221
|
+
border-radius: ${(e) => B(e.theme, e.borderRadius || "slight")};
|
|
222
|
+
background-color: ${(e) => $e(e == null ? void 0 : e.color)};
|
|
223
223
|
color: white;
|
|
224
224
|
height: 1.5rem;
|
|
225
225
|
min-width: 1.5rem;
|
|
@@ -233,44 +233,44 @@ const me = m.div`
|
|
|
233
233
|
& i {
|
|
234
234
|
font-size: 0.813rem;
|
|
235
235
|
}
|
|
236
|
-
`,
|
|
236
|
+
`, oe = (e) => {
|
|
237
237
|
const {
|
|
238
|
-
uuid:
|
|
238
|
+
uuid: t,
|
|
239
239
|
hasPermission: l = !0,
|
|
240
240
|
isUser: a,
|
|
241
|
-
image:
|
|
241
|
+
image: w,
|
|
242
242
|
name: n,
|
|
243
|
-
notifications:
|
|
244
|
-
color:
|
|
245
|
-
size:
|
|
243
|
+
notifications: g = 0,
|
|
244
|
+
color: m = "primary",
|
|
245
|
+
size: b = "large",
|
|
246
246
|
style: D,
|
|
247
247
|
disabled: s,
|
|
248
|
-
onSelect:
|
|
248
|
+
onSelect: d = () => {
|
|
249
249
|
},
|
|
250
|
-
isActive:
|
|
251
|
-
className:
|
|
250
|
+
isActive: v,
|
|
251
|
+
className: x,
|
|
252
252
|
// new
|
|
253
|
-
themeData:
|
|
254
|
-
} = e,
|
|
253
|
+
themeData: p
|
|
254
|
+
} = e, C = {
|
|
255
255
|
theme: M(),
|
|
256
|
-
color:
|
|
257
|
-
size:
|
|
256
|
+
color: m,
|
|
257
|
+
size: b,
|
|
258
258
|
style: D,
|
|
259
259
|
disabled: s
|
|
260
260
|
};
|
|
261
|
-
return /* @__PURE__ */
|
|
262
|
-
|
|
261
|
+
return /* @__PURE__ */ se(
|
|
262
|
+
ve,
|
|
263
263
|
{
|
|
264
|
-
onClick: (
|
|
265
|
-
|
|
264
|
+
onClick: (S) => {
|
|
265
|
+
S.stopPropagation(), l === !0 && (d == null || d());
|
|
266
266
|
},
|
|
267
|
-
...
|
|
267
|
+
...C,
|
|
268
268
|
key: n,
|
|
269
269
|
animate: {
|
|
270
270
|
y: 0,
|
|
271
271
|
opacity: 1
|
|
272
272
|
},
|
|
273
|
-
className: `profile-item ${
|
|
273
|
+
className: `profile-item ${x}`,
|
|
274
274
|
exit: {
|
|
275
275
|
opacity: 0
|
|
276
276
|
},
|
|
@@ -279,15 +279,15 @@ const me = m.div`
|
|
|
279
279
|
y: -10,
|
|
280
280
|
opacity: 0
|
|
281
281
|
},
|
|
282
|
-
isActive:
|
|
283
|
-
themeColor: (
|
|
282
|
+
isActive: v,
|
|
283
|
+
themeColor: (p == null ? void 0 : p.code) || "transparent"
|
|
284
284
|
},
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
|
|
285
|
+
/* @__PURE__ */ o("div", { className: "logo-wrapper", children: w }),
|
|
286
|
+
/* @__PURE__ */ o("div", { className: "name", children: n }),
|
|
287
|
+
g > 0 && /* @__PURE__ */ o("div", { className: "notifications-number", children: /* @__PURE__ */ o(me, { className: "badge", color: "danger", size: "small", children: g > 99 ? "99+" : g }) })
|
|
288
288
|
);
|
|
289
289
|
};
|
|
290
|
-
|
|
290
|
+
oe.propTypes = {
|
|
291
291
|
id: i.any,
|
|
292
292
|
isUserProfile: i.bool,
|
|
293
293
|
themeColor: i.string,
|
|
@@ -309,86 +309,86 @@ te.propTypes = {
|
|
|
309
309
|
onSelect: i.func,
|
|
310
310
|
hasPermission: i.bool
|
|
311
311
|
};
|
|
312
|
-
const
|
|
313
|
-
if (!e || !
|
|
314
|
-
let l = Math.floor((e == null ? void 0 : e.getTime()) - (
|
|
312
|
+
const K = (e, t) => {
|
|
313
|
+
if (!e || !t) return null;
|
|
314
|
+
let l = Math.floor((e == null ? void 0 : e.getTime()) - (t == null ? void 0 : t.getTime())), a = 1e3 * 60 * 60 * 24;
|
|
315
315
|
return Math.ceil(l / a);
|
|
316
|
-
},
|
|
317
|
-
const
|
|
316
|
+
}, ie = (e) => {
|
|
317
|
+
const t = M(), {
|
|
318
318
|
uuid: l,
|
|
319
319
|
shopUuid: a,
|
|
320
|
-
title:
|
|
320
|
+
title: w = "",
|
|
321
321
|
description: n,
|
|
322
|
-
badges:
|
|
323
|
-
coverPhoto:
|
|
324
|
-
onSelect:
|
|
322
|
+
badges: g,
|
|
323
|
+
coverPhoto: m,
|
|
324
|
+
onSelect: b,
|
|
325
325
|
status: D,
|
|
326
326
|
startDate: s,
|
|
327
|
-
endDate:
|
|
328
|
-
salesPackages:
|
|
329
|
-
shopName:
|
|
330
|
-
shopImage:
|
|
331
|
-
className:
|
|
332
|
-
onSelectCard:
|
|
327
|
+
endDate: d,
|
|
328
|
+
salesPackages: v,
|
|
329
|
+
shopName: x,
|
|
330
|
+
shopImage: p,
|
|
331
|
+
className: h,
|
|
332
|
+
onSelectCard: C = () => {
|
|
333
333
|
},
|
|
334
|
-
onSelectShop:
|
|
334
|
+
onSelectShop: S = () => {
|
|
335
335
|
},
|
|
336
336
|
campaignSingleText: r,
|
|
337
|
-
salesCampaignTypes:
|
|
338
|
-
startsInPrefixTextPlural:
|
|
339
|
-
startsinSuffixTextPlural:
|
|
340
|
-
startsInPrefixTextSingular:
|
|
341
|
-
startsinSuffixTextSingular:
|
|
342
|
-
themeData:
|
|
343
|
-
...
|
|
344
|
-
} = e,
|
|
345
|
-
|
|
346
|
-
|
|
337
|
+
salesCampaignTypes: y = [],
|
|
338
|
+
startsInPrefixTextPlural: H,
|
|
339
|
+
startsinSuffixTextPlural: N,
|
|
340
|
+
startsInPrefixTextSingular: R,
|
|
341
|
+
startsinSuffixTextSingular: I,
|
|
342
|
+
themeData: W,
|
|
343
|
+
...j
|
|
344
|
+
} = e, U = s ? new Date(s) <= /* @__PURE__ */ new Date() : !1;
|
|
345
|
+
K(
|
|
346
|
+
d ? new Date(d) : null,
|
|
347
347
|
s ? new Date(s) : null
|
|
348
348
|
);
|
|
349
|
-
const
|
|
349
|
+
const c = K(
|
|
350
350
|
s ? new Date(s) : null,
|
|
351
351
|
/* @__PURE__ */ new Date()
|
|
352
352
|
);
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
-
|
|
353
|
+
return /* @__PURE__ */ u(
|
|
354
|
+
ue,
|
|
355
355
|
{
|
|
356
|
-
theme:
|
|
357
|
-
className:
|
|
358
|
-
onClick:
|
|
359
|
-
...
|
|
356
|
+
theme: t,
|
|
357
|
+
className: h,
|
|
358
|
+
onClick: C,
|
|
359
|
+
...j,
|
|
360
360
|
children: [
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
var
|
|
365
|
-
return /* @__PURE__ */
|
|
366
|
-
|
|
361
|
+
/* @__PURE__ */ u(we, { theme: t, onClick: () => b == null ? void 0 : b(), children: [
|
|
362
|
+
/* @__PURE__ */ o("img", { src: m }),
|
|
363
|
+
/* @__PURE__ */ o(ye, { children: v == null ? void 0 : v.map(($, F) => {
|
|
364
|
+
var T, _;
|
|
365
|
+
return /* @__PURE__ */ o(
|
|
366
|
+
De,
|
|
367
367
|
{
|
|
368
|
-
color: (
|
|
369
|
-
theme:
|
|
370
|
-
children: /* @__PURE__ */
|
|
371
|
-
|
|
368
|
+
color: (T = y == null ? void 0 : y.find((P) => P.value === $)) == null ? void 0 : T.color,
|
|
369
|
+
theme: t,
|
|
370
|
+
children: /* @__PURE__ */ o(
|
|
371
|
+
fe,
|
|
372
372
|
{
|
|
373
|
-
icon: (
|
|
373
|
+
icon: (_ = y == null ? void 0 : y.find((P) => P.value === $)) == null ? void 0 : _.icon
|
|
374
374
|
}
|
|
375
375
|
)
|
|
376
376
|
},
|
|
377
|
-
`package__${
|
|
377
|
+
`package__${F}`
|
|
378
378
|
);
|
|
379
379
|
}) })
|
|
380
380
|
] }),
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ u(be, { theme: t, children: [
|
|
382
|
+
/* @__PURE__ */ u("div", { className: "text-block-wrapper", children: [
|
|
383
|
+
/* @__PURE__ */ u("div", { className: "title-block-wrapper", children: [
|
|
384
|
+
/* @__PURE__ */ o("div", { className: "campaign-title", children: r }),
|
|
385
|
+
/* @__PURE__ */ o("div", { className: "campaign-title-text", children: w }),
|
|
386
|
+
/* @__PURE__ */ o("div", { className: "timestamp-text", children: U ? "" : c === 1 ? `${R} ${c} ${I}` : `${H} ${c} ${N}` })
|
|
387
387
|
] }),
|
|
388
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ o("div", { children: n })
|
|
389
389
|
] }),
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
|
|
390
|
+
/* @__PURE__ */ o(
|
|
391
|
+
oe,
|
|
392
392
|
{
|
|
393
393
|
hasPermission: !0,
|
|
394
394
|
image: (
|
|
@@ -398,19 +398,19 @@ const J = (e, o) => {
|
|
|
398
398
|
// size={ImageSize.SMALL}
|
|
399
399
|
// className={`${shopImage ? "" : "no-image"}`}
|
|
400
400
|
// />
|
|
401
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ o(
|
|
402
402
|
"img",
|
|
403
403
|
{
|
|
404
|
-
src:
|
|
405
|
-
className: `${
|
|
404
|
+
src: p,
|
|
405
|
+
className: `${p ? "" : "no-image"}`
|
|
406
406
|
}
|
|
407
407
|
)
|
|
408
408
|
),
|
|
409
|
-
themeData:
|
|
409
|
+
themeData: W,
|
|
410
410
|
isActive: !0,
|
|
411
411
|
isUser: !1,
|
|
412
|
-
name:
|
|
413
|
-
onClick: () =>
|
|
412
|
+
name: x,
|
|
413
|
+
onClick: () => S(a)
|
|
414
414
|
}
|
|
415
415
|
)
|
|
416
416
|
] })
|
|
@@ -418,13 +418,13 @@ const J = (e, o) => {
|
|
|
418
418
|
}
|
|
419
419
|
);
|
|
420
420
|
};
|
|
421
|
-
|
|
421
|
+
ie.propTypes = {
|
|
422
422
|
title: i.oneOfType([i.string, i.element]),
|
|
423
423
|
numberOfListings: i.number,
|
|
424
424
|
dropdown: i.any,
|
|
425
425
|
color: i.string
|
|
426
426
|
};
|
|
427
|
-
const
|
|
427
|
+
const ke = f.div`
|
|
428
428
|
display: flex;
|
|
429
429
|
flex-direction: column;
|
|
430
430
|
gap: 1.5rem;
|
|
@@ -435,7 +435,7 @@ const $e = m.div`
|
|
|
435
435
|
position: absolute;
|
|
436
436
|
top: 50%;
|
|
437
437
|
left: 1.5rem;
|
|
438
|
-
z-index: ${(e) =>
|
|
438
|
+
z-index: ${(e) => Y(e.arrowsZIndex) ? e.arrowsZIndex : 20};
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
& .hover-right-arrow {
|
|
@@ -443,7 +443,7 @@ const $e = m.div`
|
|
|
443
443
|
position: absolute;
|
|
444
444
|
top: 50%;
|
|
445
445
|
right: 1.5rem;
|
|
446
|
-
z-index: ${(e) =>
|
|
446
|
+
z-index: ${(e) => Y(e.arrowsZIndex) ? e.arrowsZIndex : 20};
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
& .clip-loader-wrapper {
|
|
@@ -458,7 +458,7 @@ const $e = m.div`
|
|
|
458
458
|
display: flex;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
`,
|
|
461
|
+
`, Ce = f.div`
|
|
462
462
|
display: flex;
|
|
463
463
|
align-items: center;
|
|
464
464
|
|
|
@@ -479,7 +479,7 @@ const $e = m.div`
|
|
|
479
479
|
display: none;
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
`,
|
|
482
|
+
`, Se = f.div`
|
|
483
483
|
position: relative;
|
|
484
484
|
padding: ${(e) => e.padding};
|
|
485
485
|
|
|
@@ -557,100 +557,104 @@ const $e = m.div`
|
|
|
557
557
|
right: 0;
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
`,
|
|
561
|
-
const [l, a] =
|
|
560
|
+
`, Ne = (e, t) => {
|
|
561
|
+
const [l, a] = z({
|
|
562
562
|
trigger: null,
|
|
563
563
|
direction: null
|
|
564
|
-
}),
|
|
565
|
-
return
|
|
564
|
+
}), w = (n) => n.touches || n.originalEvent.touches;
|
|
565
|
+
return G(() => {
|
|
566
566
|
const n = typeof e == "string" || e instanceof String ? document.getElementById(e) : e.current;
|
|
567
|
-
let
|
|
567
|
+
let g = null, m = null;
|
|
568
568
|
if (n) {
|
|
569
|
-
const
|
|
570
|
-
const
|
|
571
|
-
|
|
569
|
+
const b = (s) => {
|
|
570
|
+
const d = w(s)[0];
|
|
571
|
+
g = d.clientX, m = d.clientY;
|
|
572
572
|
}, D = (s) => {
|
|
573
|
-
if (!
|
|
573
|
+
if (!g || !m)
|
|
574
574
|
return;
|
|
575
|
-
const
|
|
576
|
-
Math.abs(
|
|
577
|
-
trigger: !
|
|
578
|
-
direction:
|
|
579
|
-
})) : a((
|
|
580
|
-
trigger: !
|
|
581
|
-
direction:
|
|
582
|
-
})) :
|
|
583
|
-
trigger: !
|
|
584
|
-
direction:
|
|
585
|
-
})) : a((
|
|
586
|
-
trigger: !
|
|
587
|
-
direction:
|
|
588
|
-
})),
|
|
575
|
+
const d = s.touches[0].clientX, v = s.touches[0].clientY, x = g - d, p = m - v;
|
|
576
|
+
Math.abs(x) > Math.abs(p) ? x > 0 ? a((h) => ({
|
|
577
|
+
trigger: !h.trigger,
|
|
578
|
+
direction: E.LEFT
|
|
579
|
+
})) : a((h) => ({
|
|
580
|
+
trigger: !h.trigger,
|
|
581
|
+
direction: E.RIGHT
|
|
582
|
+
})) : p > 0 ? a((h) => ({
|
|
583
|
+
trigger: !h.trigger,
|
|
584
|
+
direction: E.UP
|
|
585
|
+
})) : a((h) => ({
|
|
586
|
+
trigger: !h.trigger,
|
|
587
|
+
direction: E.DOWN
|
|
588
|
+
})), g = null, m = null;
|
|
589
589
|
};
|
|
590
|
-
return n.addEventListener("touchstart",
|
|
591
|
-
n.removeEventListener("touchstart",
|
|
590
|
+
return n.addEventListener("touchstart", b), n.addEventListener("touchmove", D), () => {
|
|
591
|
+
n.removeEventListener("touchstart", b), n.addEventListener("touchmove", D);
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
594
|
}, []), l;
|
|
595
|
-
},
|
|
595
|
+
}, E = {
|
|
596
596
|
UP: "up",
|
|
597
597
|
DOWN: "down",
|
|
598
598
|
RIGHT: "right",
|
|
599
599
|
LEFT: "left"
|
|
600
|
-
},
|
|
600
|
+
}, ae = Z(
|
|
601
601
|
({
|
|
602
602
|
title: e,
|
|
603
|
-
columnGap:
|
|
603
|
+
columnGap: t = "2rem",
|
|
604
604
|
rowGap: l = "1.25rem",
|
|
605
605
|
scrollBySize: a = 300,
|
|
606
|
-
wrapForMobile:
|
|
606
|
+
wrapForMobile: w = !1,
|
|
607
607
|
wrap: n = !1,
|
|
608
|
-
children:
|
|
609
|
-
methodsRef:
|
|
610
|
-
arrowsVisibleOnHover:
|
|
608
|
+
children: g,
|
|
609
|
+
methodsRef: m,
|
|
610
|
+
arrowsVisibleOnHover: b = !0,
|
|
611
611
|
rightAlignArrows: D = !1,
|
|
612
612
|
padding: s = "0",
|
|
613
|
-
showTimesBtn:
|
|
614
|
-
noArrows:
|
|
615
|
-
onShowEnd:
|
|
616
|
-
arrowsZIndex:
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
(
|
|
613
|
+
showTimesBtn: d,
|
|
614
|
+
noArrows: v,
|
|
615
|
+
onShowEnd: x,
|
|
616
|
+
arrowsZIndex: p,
|
|
617
|
+
elementsCount: h,
|
|
618
|
+
minElementsCount: C = 2,
|
|
619
|
+
...S
|
|
620
|
+
}, r) => {
|
|
621
|
+
const y = te(), H = M(), [N, R] = z(
|
|
622
|
+
h < C
|
|
623
|
+
), [I, W] = z(!1), [j, U] = z(!0), c = ee(), $ = Ne(c);
|
|
624
|
+
G(() => {
|
|
625
|
+
($ == null ? void 0 : $.direction) === E.RIGHT && I !== !0 ? T() : ($ == null ? void 0 : $.direction) === E.LEFT && N !== !0 && F();
|
|
626
|
+
}, [$]);
|
|
627
|
+
const F = () => {
|
|
628
|
+
var k;
|
|
629
|
+
(k = c.current) == null || k.scrollBy(a, 0);
|
|
626
630
|
}, T = () => {
|
|
627
|
-
var
|
|
628
|
-
(
|
|
629
|
-
}, [
|
|
630
|
-
|
|
631
|
-
var
|
|
632
|
-
|
|
633
|
-
((
|
|
631
|
+
var k;
|
|
632
|
+
(k = c.current) == null || k.scrollBy(-a, 0);
|
|
633
|
+
}, [_, P] = z(!1);
|
|
634
|
+
G(() => {
|
|
635
|
+
var k, X;
|
|
636
|
+
P(
|
|
637
|
+
((k = c == null ? void 0 : c.current) == null ? void 0 : k.scrollWidth) > ((X = c == null ? void 0 : c.current) == null ? void 0 : X.clientWidth)
|
|
634
638
|
);
|
|
635
|
-
}, [
|
|
639
|
+
}, [g]), le(m, () => ({
|
|
636
640
|
scrollToEnd() {
|
|
637
|
-
|
|
641
|
+
ne();
|
|
638
642
|
},
|
|
639
643
|
scrollLeft() {
|
|
640
644
|
T();
|
|
641
645
|
},
|
|
642
646
|
scrollRight() {
|
|
643
|
-
|
|
647
|
+
F();
|
|
644
648
|
}
|
|
645
649
|
}));
|
|
646
|
-
const
|
|
647
|
-
|
|
650
|
+
const ne = () => {
|
|
651
|
+
c.current.scrollLeft = c.current.scrollWidth;
|
|
648
652
|
};
|
|
649
|
-
return /* @__PURE__ */
|
|
650
|
-
/* @__PURE__ */
|
|
651
|
-
/* @__PURE__ */
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
-
/* @__PURE__ */
|
|
653
|
+
return /* @__PURE__ */ u(ke, { arrowsZIndex: p, children: [
|
|
654
|
+
/* @__PURE__ */ u(Ce, { children: [
|
|
655
|
+
/* @__PURE__ */ o("div", { children: e }),
|
|
656
|
+
/* @__PURE__ */ u("div", { className: "btns-group", children: [
|
|
657
|
+
/* @__PURE__ */ o(
|
|
654
658
|
L,
|
|
655
659
|
{
|
|
656
660
|
borderRadius: "curved",
|
|
@@ -662,21 +666,21 @@ const $e = m.div`
|
|
|
662
666
|
onClick: T
|
|
663
667
|
}
|
|
664
668
|
),
|
|
665
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ o(
|
|
666
670
|
L,
|
|
667
671
|
{
|
|
668
672
|
borderRadius: "curved",
|
|
669
673
|
btnType: "tinted",
|
|
670
674
|
className: "scroll-arrow-right",
|
|
671
675
|
color: "neutral",
|
|
672
|
-
disabled:
|
|
676
|
+
disabled: N,
|
|
673
677
|
icon: "angle-right",
|
|
674
|
-
onClick:
|
|
678
|
+
onClick: F
|
|
675
679
|
}
|
|
676
680
|
)
|
|
677
681
|
] })
|
|
678
682
|
] }),
|
|
679
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ o(
|
|
680
684
|
L,
|
|
681
685
|
{
|
|
682
686
|
borderRadius: "curved",
|
|
@@ -688,65 +692,65 @@ const $e = m.div`
|
|
|
688
692
|
onClick: T
|
|
689
693
|
}
|
|
690
694
|
),
|
|
691
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ o(
|
|
692
696
|
L,
|
|
693
697
|
{
|
|
694
698
|
borderRadius: "curved",
|
|
695
699
|
btnType: "tinted",
|
|
696
700
|
className: "hover-right-arrow scroll-arrow-right",
|
|
697
701
|
color: "neutral",
|
|
698
|
-
disabled:
|
|
702
|
+
disabled: N,
|
|
699
703
|
icon: "angle-right",
|
|
700
|
-
onClick:
|
|
704
|
+
onClick: F
|
|
701
705
|
}
|
|
702
706
|
),
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
|
|
707
|
+
/* @__PURE__ */ o(
|
|
708
|
+
Se,
|
|
705
709
|
{
|
|
706
|
-
ref:
|
|
707
|
-
arrowsVisibleOnHover:
|
|
708
|
-
hasOverflow:
|
|
709
|
-
noArrows:
|
|
710
|
+
ref: r,
|
|
711
|
+
arrowsVisibleOnHover: b,
|
|
712
|
+
hasOverflow: _,
|
|
713
|
+
noArrows: v,
|
|
710
714
|
padding: s,
|
|
711
715
|
rightAlignArrows: D,
|
|
712
|
-
showTimesBtn:
|
|
713
|
-
theme:
|
|
714
|
-
...
|
|
715
|
-
children: /* @__PURE__ */
|
|
716
|
-
|
|
716
|
+
showTimesBtn: d,
|
|
717
|
+
theme: H,
|
|
718
|
+
...S,
|
|
719
|
+
children: /* @__PURE__ */ u(
|
|
720
|
+
pe,
|
|
717
721
|
{
|
|
718
|
-
ref:
|
|
722
|
+
ref: c,
|
|
719
723
|
className: "scrollable-container",
|
|
720
|
-
columnGap:
|
|
724
|
+
columnGap: t,
|
|
721
725
|
rowGap: l,
|
|
722
|
-
wrap: n ||
|
|
726
|
+
wrap: n || w && y ? "Wrap" : "NoWrap",
|
|
723
727
|
children: [
|
|
724
|
-
/* @__PURE__ */
|
|
725
|
-
|
|
728
|
+
/* @__PURE__ */ o(
|
|
729
|
+
q,
|
|
726
730
|
{
|
|
727
731
|
isHorizontal: !0,
|
|
728
732
|
onIsNotVisible: () => {
|
|
729
|
-
I === !0 &&
|
|
733
|
+
I === !0 && W(!1);
|
|
730
734
|
},
|
|
731
735
|
onIsVisible: () => {
|
|
732
|
-
I === !1 &&
|
|
736
|
+
I === !1 && W(!0);
|
|
733
737
|
}
|
|
734
738
|
}
|
|
735
739
|
),
|
|
736
|
-
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
|
|
740
|
+
g,
|
|
741
|
+
/* @__PURE__ */ o(
|
|
742
|
+
q,
|
|
739
743
|
{
|
|
740
744
|
isHorizontal: !0,
|
|
741
745
|
onIsNotVisible: () => {
|
|
742
|
-
|
|
746
|
+
N === !0 && R(!1), U(!0);
|
|
743
747
|
},
|
|
744
748
|
onIsVisible: () => {
|
|
745
|
-
|
|
749
|
+
N === !1 && R(!0), U(!1), x == null || x();
|
|
746
750
|
}
|
|
747
751
|
}
|
|
748
752
|
),
|
|
749
|
-
|
|
753
|
+
j && _ && /* @__PURE__ */ o("div", { className: "gradient" })
|
|
750
754
|
]
|
|
751
755
|
}
|
|
752
756
|
)
|
|
@@ -755,7 +759,7 @@ const $e = m.div`
|
|
|
755
759
|
] });
|
|
756
760
|
}
|
|
757
761
|
);
|
|
758
|
-
|
|
762
|
+
ae.propTypes = {
|
|
759
763
|
title: i.string,
|
|
760
764
|
rowGap: i.string,
|
|
761
765
|
columnGap: i.string,
|
|
@@ -767,7 +771,7 @@ ie.propTypes = {
|
|
|
767
771
|
rightAlignArrows: i.bool,
|
|
768
772
|
padding: i.string
|
|
769
773
|
};
|
|
770
|
-
const
|
|
774
|
+
const Ie = f.div`
|
|
771
775
|
display: flex;
|
|
772
776
|
flex-direction: column;
|
|
773
777
|
gap: 1.5rem;
|
|
@@ -801,19 +805,19 @@ const Se = m.div`
|
|
|
801
805
|
margin-right: 0;
|
|
802
806
|
}
|
|
803
807
|
}
|
|
804
|
-
`, O =
|
|
808
|
+
`, O = f.div`
|
|
805
809
|
width: ${(e) => e.width || "100%"};
|
|
806
810
|
height: ${(e) => (e.heightCoeff || 1) * 1.125}rem;
|
|
807
811
|
background-color: var(--gray-200, #dddfe4);
|
|
808
812
|
|
|
809
|
-
${
|
|
810
|
-
`,
|
|
813
|
+
${re("-90deg")}
|
|
814
|
+
`, Te = f.div`
|
|
811
815
|
display: flex;
|
|
812
816
|
flex-direction: ${(e) => e != null && e.row ? "row" : "column"};
|
|
813
817
|
gap: ${(e) => (e == null ? void 0 : e.gap) ?? "0.5rem"};
|
|
814
818
|
width: ${(e) => (e == null ? void 0 : e.width) ?? "100%"};
|
|
815
|
-
`,
|
|
816
|
-
border-radius: ${(e) =>
|
|
819
|
+
`, Q = f.div`
|
|
820
|
+
border-radius: ${(e) => B(e.theme, (e == null ? void 0 : e.borderRadius) ?? "regular")};
|
|
817
821
|
background: var(--gray-200, #dddfe4);
|
|
818
822
|
position: relative;
|
|
819
823
|
max-height: ${(e) => (e == null ? void 0 : e.height) ?? "5rem"};
|
|
@@ -822,10 +826,10 @@ const Se = m.div`
|
|
|
822
826
|
width: ${(e) => (e == null ? void 0 : e.width) ?? "5rem"};
|
|
823
827
|
flex-shrink: 0;
|
|
824
828
|
|
|
825
|
-
${
|
|
826
|
-
`,
|
|
829
|
+
${re()}
|
|
830
|
+
`, Ae = f.div`
|
|
827
831
|
background: var(--white, #fff);
|
|
828
|
-
border-radius: ${(e) =>
|
|
832
|
+
border-radius: ${(e) => B(e.theme, "edged")};
|
|
829
833
|
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
|
|
830
834
|
border: 1px solid var(--gray-95012, #14161a1f);
|
|
831
835
|
|
|
@@ -851,74 +855,74 @@ const Se = m.div`
|
|
|
851
855
|
align-items: center;
|
|
852
856
|
gap: 0.5rem;
|
|
853
857
|
}
|
|
854
|
-
`,
|
|
855
|
-
const
|
|
856
|
-
return /* @__PURE__ */
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
-
|
|
858
|
+
`, Fe = Z(({}, e) => {
|
|
859
|
+
const t = M();
|
|
860
|
+
return /* @__PURE__ */ u(Ae, { ref: e, theme: t, children: [
|
|
861
|
+
/* @__PURE__ */ o("div", { className: "campaign__left-section", children: /* @__PURE__ */ o(
|
|
862
|
+
Q,
|
|
859
863
|
{
|
|
860
|
-
theme:
|
|
864
|
+
theme: t,
|
|
861
865
|
width: "15rem",
|
|
862
866
|
height: "15rem",
|
|
863
867
|
borderRadius: "edged"
|
|
864
868
|
}
|
|
865
869
|
) }),
|
|
866
|
-
/* @__PURE__ */
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
-
/* @__PURE__ */
|
|
870
|
+
/* @__PURE__ */ u("div", { className: "campaign__right-section", children: [
|
|
871
|
+
/* @__PURE__ */ u(Te, { theme: t, children: [
|
|
872
|
+
/* @__PURE__ */ o(O, { heightCoeff: 0.75, theme: t, width: "35%" }),
|
|
873
|
+
/* @__PURE__ */ o(O, { heightCoeff: 1.25, theme: t }),
|
|
874
|
+
/* @__PURE__ */ o(O, { heightCoeff: 3, theme: t })
|
|
871
875
|
] }),
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
|
|
876
|
+
/* @__PURE__ */ u("div", { className: "campaign__user", children: [
|
|
877
|
+
/* @__PURE__ */ o(
|
|
878
|
+
Q,
|
|
875
879
|
{
|
|
876
|
-
theme:
|
|
880
|
+
theme: t,
|
|
877
881
|
width: "2.5rem",
|
|
878
882
|
height: "2.5rem",
|
|
879
883
|
borderRadius: "curved"
|
|
880
884
|
}
|
|
881
885
|
),
|
|
882
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ o(O, { theme: t, width: "75%" })
|
|
883
887
|
] })
|
|
884
888
|
] })
|
|
885
889
|
] });
|
|
886
|
-
}),
|
|
887
|
-
|
|
890
|
+
}), Ee = ({ itemsCount: e = 5, keyPrefix: t }) => /* @__PURE__ */ o(V, { children: Array.from({ length: e }, (l, a) => /* @__PURE__ */ o(
|
|
891
|
+
Fe,
|
|
888
892
|
{},
|
|
889
|
-
`${
|
|
890
|
-
)) }),
|
|
893
|
+
`${t}-skeleton-campaign-card-${a}`
|
|
894
|
+
)) }), _e = ({
|
|
891
895
|
children: e,
|
|
892
|
-
fallbackComponent:
|
|
896
|
+
fallbackComponent: t = /* @__PURE__ */ o(V, {}),
|
|
893
897
|
isLoading: l = !1,
|
|
894
898
|
itemsCount: a = 5,
|
|
895
|
-
keyPrefix:
|
|
896
|
-
}) => /* @__PURE__ */
|
|
899
|
+
keyPrefix: w
|
|
900
|
+
}) => /* @__PURE__ */ o(ce, { fallback: t, children: l === !0 ? /* @__PURE__ */ o(Ee, { itemsCount: a, keyPrefix: w }) : e }), Pe = de(ie), Ye = Z(
|
|
897
901
|
({
|
|
898
902
|
sellerType: e = "Shop",
|
|
899
|
-
items:
|
|
903
|
+
items: t = [],
|
|
900
904
|
title: l,
|
|
901
905
|
isLoading: a,
|
|
902
|
-
onSelectCard:
|
|
906
|
+
onSelectCard: w = () => {
|
|
903
907
|
},
|
|
904
908
|
onSelectShop: n = () => {
|
|
905
909
|
},
|
|
906
|
-
getImage:
|
|
910
|
+
getImage: g = () => {
|
|
907
911
|
},
|
|
908
912
|
// new
|
|
909
|
-
customScrollSize:
|
|
910
|
-
campaignSingleText:
|
|
913
|
+
customScrollSize: m,
|
|
914
|
+
campaignSingleText: b,
|
|
911
915
|
salesCampaignTypes: D = [],
|
|
912
916
|
startsInPrefixTextPlural: s,
|
|
913
|
-
startsinSuffixTextPlural:
|
|
914
|
-
startsInPrefixTextSingular:
|
|
915
|
-
startsinSuffixTextSingular:
|
|
916
|
-
},
|
|
917
|
-
const
|
|
918
|
-
|
|
917
|
+
startsinSuffixTextPlural: d,
|
|
918
|
+
startsInPrefixTextSingular: v,
|
|
919
|
+
startsinSuffixTextSingular: x
|
|
920
|
+
}, p) => {
|
|
921
|
+
const h = ee(), C = te(), S = ge(() => t == null ? void 0 : t.map((r, y) => /* @__PURE__ */ o(
|
|
922
|
+
Pe,
|
|
919
923
|
{
|
|
920
924
|
className: "campaign-item",
|
|
921
|
-
coverPhoto:
|
|
925
|
+
coverPhoto: g(
|
|
922
926
|
r == null ? void 0 : r.coverPhoto,
|
|
923
927
|
(r == null ? void 0 : r.uuid) || (r == null ? void 0 : r.campaignUuid)
|
|
924
928
|
),
|
|
@@ -932,41 +936,42 @@ const Se = m.div`
|
|
|
932
936
|
startDate: r == null ? void 0 : r.startDate,
|
|
933
937
|
title: r == null ? void 0 : r.name,
|
|
934
938
|
uuid: r == null ? void 0 : r.campaignUuid,
|
|
935
|
-
onSelectCard: () =>
|
|
939
|
+
onSelectCard: () => w(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
|
|
936
940
|
onSelectShop: () => n(r == null ? void 0 : r.shopUuid),
|
|
937
|
-
campaignSingleText:
|
|
941
|
+
campaignSingleText: b,
|
|
938
942
|
salesCampaignTypes: D,
|
|
939
943
|
startsInPrefixTextPlural: s,
|
|
940
|
-
startsinSuffixTextPlural:
|
|
941
|
-
startsInPrefixTextSingular:
|
|
942
|
-
startsinSuffixTextSingular:
|
|
944
|
+
startsinSuffixTextPlural: d,
|
|
945
|
+
startsInPrefixTextSingular: v,
|
|
946
|
+
startsinSuffixTextSingular: x,
|
|
943
947
|
themeData: r == null ? void 0 : r.themeData
|
|
944
948
|
},
|
|
945
|
-
`campaign__item__${
|
|
946
|
-
)), [
|
|
947
|
-
return /* @__PURE__ */
|
|
948
|
-
|
|
949
|
+
`campaign__item__${y}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
|
|
950
|
+
)), [t]);
|
|
951
|
+
return /* @__PURE__ */ o(V, { children: (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ o(Ie, { ref: p, className: "row-section-scroll", children: /* @__PURE__ */ o(
|
|
952
|
+
ae,
|
|
949
953
|
{
|
|
950
954
|
arrowsVisibleOnHover: !1,
|
|
951
955
|
columnGap: "0",
|
|
952
|
-
methodsRef:
|
|
956
|
+
methodsRef: h,
|
|
953
957
|
mobileHoverScrollButtons: !0,
|
|
954
958
|
noArrows: !0,
|
|
955
959
|
padding: "0.25rem 0",
|
|
956
960
|
rightAlignArrows: !0,
|
|
957
|
-
|
|
961
|
+
elementsCount: t == null ? void 0 : t.length,
|
|
962
|
+
scrollBySize: C ? window.innerWidth : m > 0 ? m : window.innerWidth,
|
|
958
963
|
showTimesBtn: !1,
|
|
959
964
|
title: l,
|
|
960
965
|
onShowEnd: () => {
|
|
961
966
|
},
|
|
962
967
|
arrowsZIndex: 11,
|
|
963
|
-
children: /* @__PURE__ */
|
|
964
|
-
|
|
968
|
+
children: /* @__PURE__ */ o(
|
|
969
|
+
_e,
|
|
965
970
|
{
|
|
966
971
|
isLoading: a,
|
|
967
972
|
itemsCount: 2,
|
|
968
973
|
keyPrefix: "sales-camp",
|
|
969
|
-
children:
|
|
974
|
+
children: S
|
|
970
975
|
}
|
|
971
976
|
)
|
|
972
977
|
}
|
|
@@ -974,5 +979,5 @@ const Se = m.div`
|
|
|
974
979
|
}
|
|
975
980
|
);
|
|
976
981
|
export {
|
|
977
|
-
|
|
982
|
+
Ye as default
|
|
978
983
|
};
|