@lanaco/lnc-react-ui 4.0.161 → 4.0.162
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/BlogsSectionWithFilters.cjs +1 -1
- package/dist/BlogsSectionWithFilters.js +1 -1
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/LocationSearchSection.cjs +1 -1
- package/dist/LocationSearchSection.js +1 -1
- package/dist/SalesCampaignsSection.cjs +33 -33
- package/dist/SalesCampaignsSection.js +270 -249
- package/dist/index-Be-_NM9Q.cjs +4 -0
- package/dist/index-BvQx3xAm.cjs +95 -0
- package/dist/index-C0LcDEqa.js +47 -0
- package/dist/index-dXWRbvgi.js +345 -0
- package/package.json +1 -1
- package/dist/index-D0xXo7W6.cjs +0 -98
- package/dist/index-Dweo-G3H.js +0 -384
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
4
|
-
import { a as
|
|
5
|
-
import { M as
|
|
6
|
-
import { m as
|
|
1
|
+
import { jsx as n, jsxs as c, Fragment as De } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as z, useRef as he, useEffect as ee, Fragment as Te, createElement as Pe, useState as K, Suspense as ze, memo as Me, useMemo as Le } from "react";
|
|
3
|
+
import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { a as M, k as Q, l as Ue, o as fe } from "./utils-BdsZgOUE.js";
|
|
5
|
+
import { M as T } from "./consts-BuFChS64.js";
|
|
6
|
+
import { m as pe } from "./motion-Ckekul_K.js";
|
|
7
7
|
import { P as a } from "./index-CblbdqjE.js";
|
|
8
8
|
import ue from "./Icon.js";
|
|
9
9
|
import { D as se } from "./ShopAvatar-4-fCYGEc.js";
|
|
10
10
|
import Oe from "./Badge.js";
|
|
11
|
-
import { u as
|
|
11
|
+
import { u as re } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
12
12
|
import le from "./IconButton.js";
|
|
13
13
|
import { u as xe } from "./useDetectMobile-Bkvj0VMa.js";
|
|
14
|
-
|
|
14
|
+
import { I as Ee } from "./index-C0LcDEqa.js";
|
|
15
|
+
const je = m.div`
|
|
15
16
|
cursor: pointer;
|
|
16
17
|
display: flex;
|
|
17
18
|
gap: 1rem;
|
|
@@ -19,13 +20,13 @@ const Ee = h.div`
|
|
|
19
20
|
border-radius: 1.25rem;
|
|
20
21
|
border: 1px solid var(--gray-200, #e4e9f0);
|
|
21
22
|
|
|
22
|
-
@media (max-width: ${
|
|
23
|
+
@media (max-width: ${T + "px"}) {
|
|
23
24
|
flex-direction: column;
|
|
24
25
|
padding: 1rem;
|
|
25
26
|
gap: 0;
|
|
26
27
|
}
|
|
27
|
-
`,
|
|
28
|
-
border-radius: ${(e) =>
|
|
28
|
+
`, Re = m.div`
|
|
29
|
+
border-radius: ${(e) => M(e.theme, "edged")};
|
|
29
30
|
height: 13.75rem;
|
|
30
31
|
width: 13.75rem;
|
|
31
32
|
min-width: 13.75rem;
|
|
@@ -47,7 +48,7 @@ const Ee = h.div`
|
|
|
47
48
|
transform: scale(1.25);
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
`,
|
|
51
|
+
`, Be = m.div`
|
|
51
52
|
flex: 1;
|
|
52
53
|
display: flex;
|
|
53
54
|
flex-direction: column;
|
|
@@ -130,7 +131,7 @@ const Ee = h.div`
|
|
|
130
131
|
color: var(--gray-600, #676e79);
|
|
131
132
|
}
|
|
132
133
|
|
|
133
|
-
@media (max-width: ${
|
|
134
|
+
@media (max-width: ${T + "px"}) {
|
|
134
135
|
padding: 1rem 0 0 0;
|
|
135
136
|
|
|
136
137
|
& .campaign-title-text {
|
|
@@ -161,7 +162,7 @@ const Ee = h.div`
|
|
|
161
162
|
${t ? "" : "flex-wrap: nowrap;"}
|
|
162
163
|
${e ? "align-items: center;" : ""}
|
|
163
164
|
${o ? "justify-content: center;" : ""}
|
|
164
|
-
`,
|
|
165
|
+
`, Fe = m(pe.div)`
|
|
165
166
|
text-decoration: none;
|
|
166
167
|
${(e) => e.hasPermission === !0 && "cursor: pointer"};
|
|
167
168
|
|
|
@@ -185,7 +186,7 @@ const Ee = h.div`
|
|
|
185
186
|
font-weight: 500;
|
|
186
187
|
font-size: 1rem;
|
|
187
188
|
line-height: 1.5rem;
|
|
188
|
-
border-radius: ${(e) =>
|
|
189
|
+
border-radius: ${(e) => M(e.theme, "slight")};
|
|
189
190
|
transition: all 0.25s ease;
|
|
190
191
|
& .description {
|
|
191
192
|
font-size: 0.85rem;
|
|
@@ -233,18 +234,18 @@ const Ee = h.div`
|
|
|
233
234
|
background-color: var(--gray-95080, #14161acc);
|
|
234
235
|
}
|
|
235
236
|
|
|
236
|
-
@media (max-width: ${
|
|
237
|
+
@media (max-width: ${T + "px"}) {
|
|
237
238
|
padding: 0;
|
|
238
239
|
font-size: 0.875rem;
|
|
239
240
|
}
|
|
240
|
-
`,
|
|
241
|
+
`, We = m.div`
|
|
241
242
|
position: absolute;
|
|
242
243
|
top: 0.5rem;
|
|
243
244
|
${(e) => e.alignToLeft === !0 ? "left: 0.5rem;" : "right: 0.5rem;"}
|
|
244
245
|
display: flex;
|
|
245
246
|
gap: 0.25rem;
|
|
246
|
-
`,
|
|
247
|
-
border-radius: ${(e) =>
|
|
247
|
+
`, Ve = m.div`
|
|
248
|
+
border-radius: ${(e) => M(e.theme, e.borderRadius || "slight")};
|
|
248
249
|
background-color: ${(e) => e == null ? void 0 : e.color};
|
|
249
250
|
color: white;
|
|
250
251
|
height: 1.5rem;
|
|
@@ -259,63 +260,63 @@ const Ee = h.div`
|
|
|
259
260
|
& i {
|
|
260
261
|
font-size: 0.813rem;
|
|
261
262
|
}
|
|
262
|
-
`, Ae =
|
|
263
|
+
`, Ae = z(({ src: e, ...t }, o) => {
|
|
263
264
|
const i = he();
|
|
264
|
-
return
|
|
265
|
-
var
|
|
266
|
-
const
|
|
265
|
+
return ee(() => {
|
|
266
|
+
var h;
|
|
267
|
+
const d = (s) => {
|
|
267
268
|
s.target.src = se, s.onerror = null;
|
|
268
269
|
};
|
|
269
|
-
return (
|
|
270
|
+
return (h = i == null ? void 0 : i.current) == null || h.addEventListener("error", d), () => {
|
|
270
271
|
var s;
|
|
271
|
-
(s = i == null ? void 0 : i.current) == null || s.removeEventListener("error",
|
|
272
|
+
(s = i == null ? void 0 : i.current) == null || s.removeEventListener("error", d);
|
|
272
273
|
};
|
|
273
|
-
}, []), /* @__PURE__ */ n(Te, { ref: o, children:
|
|
274
|
+
}, []), /* @__PURE__ */ n(Te, { ref: o, children: Q(e) ? /* @__PURE__ */ n("img", { ref: i, src: e, ...t }) : /* @__PURE__ */ n("img", { src: se, ...t }) });
|
|
274
275
|
}), we = (e) => {
|
|
275
276
|
const {
|
|
276
277
|
uuid: t,
|
|
277
278
|
hasPermission: o = !0,
|
|
278
279
|
isUser: i,
|
|
279
|
-
image:
|
|
280
|
-
imageComponent:
|
|
280
|
+
image: d,
|
|
281
|
+
imageComponent: h,
|
|
281
282
|
name: s,
|
|
282
|
-
notifications:
|
|
283
|
-
color:
|
|
284
|
-
size:
|
|
285
|
-
style:
|
|
286
|
-
disabled:
|
|
287
|
-
onClick:
|
|
283
|
+
notifications: f = 0,
|
|
284
|
+
color: l = "primary",
|
|
285
|
+
size: b = "large",
|
|
286
|
+
style: p,
|
|
287
|
+
disabled: S,
|
|
288
|
+
onClick: u = () => {
|
|
288
289
|
},
|
|
289
|
-
isActive:
|
|
290
|
-
className:
|
|
291
|
-
shopCategory:
|
|
290
|
+
isActive: v,
|
|
291
|
+
className: k,
|
|
292
|
+
shopCategory: I,
|
|
292
293
|
// new
|
|
293
|
-
themeData:
|
|
294
|
-
} = e,
|
|
295
|
-
theme:
|
|
296
|
-
color:
|
|
297
|
-
size:
|
|
298
|
-
style:
|
|
299
|
-
disabled:
|
|
294
|
+
themeData: $
|
|
295
|
+
} = e, x = {
|
|
296
|
+
theme: re(),
|
|
297
|
+
color: l,
|
|
298
|
+
size: b,
|
|
299
|
+
style: p,
|
|
300
|
+
disabled: S
|
|
300
301
|
};
|
|
301
302
|
return /* @__PURE__ */ Pe(
|
|
302
|
-
|
|
303
|
+
Fe,
|
|
303
304
|
{
|
|
304
|
-
onClick: (
|
|
305
|
-
|
|
305
|
+
onClick: (_) => {
|
|
306
|
+
_.stopPropagation(), o === !0 && (u == null || u());
|
|
306
307
|
},
|
|
307
|
-
...
|
|
308
|
+
...x,
|
|
308
309
|
key: s,
|
|
309
|
-
className: `profile-item ${
|
|
310
|
+
className: `profile-item ${k}`,
|
|
310
311
|
hasPermission: o,
|
|
311
|
-
isActive:
|
|
312
|
-
themeColor: (
|
|
312
|
+
isActive: v,
|
|
313
|
+
themeColor: ($ == null ? void 0 : $.code) || "transparent"
|
|
313
314
|
},
|
|
314
|
-
/* @__PURE__ */ n("div", { className: "logo-wrapper", children: Ue(
|
|
315
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ n("div", { className: "logo-wrapper", children: Ue(h) ? h : d }),
|
|
316
|
+
/* @__PURE__ */ c("div", { children: [
|
|
316
317
|
/* @__PURE__ */ n("div", { className: "name", children: s }),
|
|
317
|
-
!i && /* @__PURE__ */ n("div", { className: "description", children:
|
|
318
|
-
|
|
318
|
+
!i && /* @__PURE__ */ n("div", { className: "description", children: I }),
|
|
319
|
+
f > 0 && /* @__PURE__ */ n("div", { className: "notifications-number", children: /* @__PURE__ */ n(Oe, { className: "badge", color: "danger", size: "small", children: f > 99 ? "99+" : f }) })
|
|
319
320
|
] })
|
|
320
321
|
);
|
|
321
322
|
};
|
|
@@ -350,92 +351,92 @@ const de = (e, t) => {
|
|
|
350
351
|
const t = new Date(e), o = t.getFullYear(), i = t.getMonth() + 1;
|
|
351
352
|
return `${String(t.getDate()).padStart(2)}. ${i}. ${o}.`;
|
|
352
353
|
}
|
|
353
|
-
}, be =
|
|
354
|
+
}, be = z((e, t) => {
|
|
354
355
|
var ie;
|
|
355
|
-
const o =
|
|
356
|
+
const o = re(), {
|
|
356
357
|
// uuid,
|
|
357
358
|
shopUuid: i,
|
|
358
|
-
title:
|
|
359
|
+
title: d = "",
|
|
359
360
|
// description,
|
|
360
361
|
// badges,
|
|
361
|
-
coverPhoto:
|
|
362
|
+
coverPhoto: h,
|
|
362
363
|
onSelect: s,
|
|
363
364
|
// status,
|
|
364
|
-
startDate:
|
|
365
|
-
endDate:
|
|
366
|
-
salesPackages:
|
|
367
|
-
shopName:
|
|
368
|
-
shopCategory:
|
|
369
|
-
shopImage:
|
|
370
|
-
shopImageComponent:
|
|
371
|
-
className:
|
|
372
|
-
onSelectCard:
|
|
365
|
+
startDate: f,
|
|
366
|
+
endDate: l,
|
|
367
|
+
salesPackages: b,
|
|
368
|
+
shopName: p,
|
|
369
|
+
shopCategory: S,
|
|
370
|
+
shopImage: u,
|
|
371
|
+
shopImageComponent: v,
|
|
372
|
+
className: k,
|
|
373
|
+
onSelectCard: I = () => {
|
|
373
374
|
},
|
|
374
|
-
onSelectShop:
|
|
375
|
+
onSelectShop: $ = () => {
|
|
375
376
|
},
|
|
376
|
-
upcoming:
|
|
377
|
-
upcomingCampaignText:
|
|
378
|
-
campaignSingleText:
|
|
379
|
-
salesCampaignTypes:
|
|
377
|
+
upcoming: g = !1,
|
|
378
|
+
upcomingCampaignText: x,
|
|
379
|
+
campaignSingleText: _,
|
|
380
|
+
salesCampaignTypes: C = [],
|
|
380
381
|
startsInPrefixTextPlural: W,
|
|
381
|
-
startsinSuffixTextPlural:
|
|
382
|
-
startsInPrefixTextSingular:
|
|
383
|
-
startsinSuffixTextSingular:
|
|
382
|
+
startsinSuffixTextPlural: V,
|
|
383
|
+
startsInPrefixTextSingular: A,
|
|
384
|
+
startsinSuffixTextSingular: ne,
|
|
384
385
|
endsInPrefixTextPlural: H,
|
|
385
386
|
endsinSuffixTextPlural: G,
|
|
386
|
-
endsInPrefixTextSingular:
|
|
387
|
-
endsinSuffixTextSingular:
|
|
388
|
-
themeData:
|
|
389
|
-
numberOfListings:
|
|
390
|
-
numberOfListingsTextSingular:
|
|
391
|
-
numberOfListingsTextPlural:
|
|
392
|
-
metadata:
|
|
393
|
-
...
|
|
394
|
-
} = e,
|
|
395
|
-
|
|
387
|
+
endsInPrefixTextSingular: L,
|
|
388
|
+
endsinSuffixTextSingular: X,
|
|
389
|
+
themeData: te,
|
|
390
|
+
numberOfListings: N,
|
|
391
|
+
numberOfListingsTextSingular: Y,
|
|
392
|
+
numberOfListingsTextPlural: U,
|
|
393
|
+
metadata: r,
|
|
394
|
+
...Z
|
|
395
|
+
} = e, q = he(), O = f ? new Date(f) <= /* @__PURE__ */ new Date() : !1, $e = de(
|
|
396
|
+
f ? new Date(f) : null,
|
|
396
397
|
/* @__PURE__ */ new Date()
|
|
397
398
|
), E = de(
|
|
398
|
-
|
|
399
|
+
l ? new Date(l) : null,
|
|
399
400
|
/* @__PURE__ */ new Date()
|
|
400
|
-
), _e = E !== null && E <= 2 && E > 0, ae =
|
|
401
|
-
if (!
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
404
|
-
const
|
|
405
|
-
return { hours:
|
|
406
|
-
}, [ke,
|
|
407
|
-
|
|
401
|
+
), _e = E !== null && E <= 2 && E > 0, ae = l ? new Date(l).getTime() : null, Ce = Date.now(), J = ae !== null ? ae - Ce : null, j = J !== null && J > 0 && J < 24 * 60 * 60 * 1e3, oe = (y, B, w, P, D) => w === 1 ? `${y} ${w} ${P}` : `${B} ${w} ${D}`, Se = () => {
|
|
402
|
+
if (!l) return null;
|
|
403
|
+
const y = ke, w = new Date(l).getTime() - y.getTime();
|
|
404
|
+
if (w <= 0) return null;
|
|
405
|
+
const P = Math.floor(w / (1e3 * 60 * 60)), D = Math.floor(w % (1e3 * 60 * 60) / (1e3 * 60)), Ne = Math.floor(w % (1e3 * 60) / 1e3);
|
|
406
|
+
return { hours: P, minutes: D, seconds: Ne };
|
|
407
|
+
}, [ke, Ie] = K(/* @__PURE__ */ new Date());
|
|
408
|
+
ee(() => {
|
|
408
409
|
if (!j) return;
|
|
409
|
-
const
|
|
410
|
-
|
|
410
|
+
const y = setInterval(() => {
|
|
411
|
+
Ie(/* @__PURE__ */ new Date());
|
|
411
412
|
}, 1e3);
|
|
412
|
-
return () => clearInterval(
|
|
413
|
+
return () => clearInterval(y);
|
|
413
414
|
}, [j]);
|
|
414
415
|
const R = j ? Se() : null;
|
|
415
|
-
return /* @__PURE__ */
|
|
416
|
-
|
|
416
|
+
return /* @__PURE__ */ c(
|
|
417
|
+
je,
|
|
417
418
|
{
|
|
418
|
-
ref:
|
|
419
|
+
ref: q,
|
|
419
420
|
theme: o,
|
|
420
|
-
className:
|
|
421
|
-
name:
|
|
422
|
-
"data-accessor":
|
|
423
|
-
onClick: (
|
|
424
|
-
...
|
|
421
|
+
className: k,
|
|
422
|
+
name: r == null ? void 0 : r.name,
|
|
423
|
+
"data-accessor": r == null ? void 0 : r.accessor,
|
|
424
|
+
onClick: (y) => I(y, q),
|
|
425
|
+
...Z,
|
|
425
426
|
children: [
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */ n("img", { src:
|
|
428
|
-
/* @__PURE__ */ n(
|
|
429
|
-
var
|
|
427
|
+
/* @__PURE__ */ c(Re, { theme: o, onClick: () => s == null ? void 0 : s(), children: [
|
|
428
|
+
/* @__PURE__ */ n("img", { src: h }),
|
|
429
|
+
/* @__PURE__ */ n(We, { children: b == null ? void 0 : b.map((y, B) => {
|
|
430
|
+
var w, P;
|
|
430
431
|
return /* @__PURE__ */ n(
|
|
431
|
-
|
|
432
|
+
Ve,
|
|
432
433
|
{
|
|
433
|
-
color: (
|
|
434
|
+
color: (w = C == null ? void 0 : C.find((D) => D.value === y)) == null ? void 0 : w.color,
|
|
434
435
|
theme: o,
|
|
435
436
|
children: /* @__PURE__ */ n(
|
|
436
437
|
ue,
|
|
437
438
|
{
|
|
438
|
-
icon: (
|
|
439
|
+
icon: (P = C == null ? void 0 : C.find((D) => D.value === y)) == null ? void 0 : P.icon
|
|
439
440
|
}
|
|
440
441
|
)
|
|
441
442
|
},
|
|
@@ -443,20 +444,20 @@ const de = (e, t) => {
|
|
|
443
444
|
);
|
|
444
445
|
}) })
|
|
445
446
|
] }),
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */ n("div", { className: "text-block-wrapper", children: /* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */ n("div", { className: "campaign-title", children: (ie =
|
|
449
|
-
/* @__PURE__ */ n("div", { className: "campaign-title-text", children:
|
|
450
|
-
|
|
451
|
-
ge(
|
|
447
|
+
/* @__PURE__ */ c(Be, { theme: o, children: [
|
|
448
|
+
/* @__PURE__ */ n("div", { className: "text-block-wrapper", children: /* @__PURE__ */ c("div", { className: "title-block-wrapper", children: [
|
|
449
|
+
/* @__PURE__ */ n("div", { className: "campaign-title", children: (ie = g ? x : _) == null ? void 0 : ie.toUpperCase() }),
|
|
450
|
+
/* @__PURE__ */ n("div", { className: "campaign-title-text", children: d }),
|
|
451
|
+
l && f && /* @__PURE__ */ c("div", { className: "campaign-date", children: [
|
|
452
|
+
ge(f),
|
|
452
453
|
" - ",
|
|
453
|
-
ge(
|
|
454
|
+
ge(l)
|
|
454
455
|
] }),
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
|
|
457
|
-
|
|
456
|
+
/* @__PURE__ */ c("div", { className: "timestamp-text", children: [
|
|
457
|
+
N > 0 && /* @__PURE__ */ c("span", { className: "listings-text", children: [
|
|
458
|
+
N,
|
|
458
459
|
" ",
|
|
459
|
-
|
|
460
|
+
N === 1 ? Y : U,
|
|
460
461
|
" ",
|
|
461
462
|
"∙",
|
|
462
463
|
" "
|
|
@@ -464,27 +465,27 @@ const de = (e, t) => {
|
|
|
464
465
|
/* @__PURE__ */ n(
|
|
465
466
|
"span",
|
|
466
467
|
{
|
|
467
|
-
className: `duration-text ${_e ? "urgent" : ""} ${
|
|
468
|
-
children: j && R ? /* @__PURE__ */
|
|
469
|
-
|
|
468
|
+
className: `duration-text ${_e ? "urgent" : ""} ${O ? "" : "starts-in"}`,
|
|
469
|
+
children: j && R ? /* @__PURE__ */ c("div", { className: "countdown-timer", children: [
|
|
470
|
+
L,
|
|
470
471
|
" ",
|
|
471
472
|
R.hours.toString().padStart(2, "0"),
|
|
472
473
|
":",
|
|
473
474
|
R.minutes.toString().padStart(2, "0"),
|
|
474
475
|
":",
|
|
475
476
|
R.seconds.toString().padStart(2, "0")
|
|
476
|
-
] }) :
|
|
477
|
-
|
|
477
|
+
] }) : O ? oe(
|
|
478
|
+
L,
|
|
478
479
|
H,
|
|
479
480
|
E,
|
|
480
|
-
|
|
481
|
+
X,
|
|
481
482
|
G
|
|
482
483
|
) : oe(
|
|
483
|
-
|
|
484
|
+
A,
|
|
484
485
|
W,
|
|
485
486
|
$e,
|
|
486
|
-
|
|
487
|
-
|
|
487
|
+
ne,
|
|
488
|
+
V
|
|
488
489
|
)
|
|
489
490
|
}
|
|
490
491
|
)
|
|
@@ -494,14 +495,14 @@ const de = (e, t) => {
|
|
|
494
495
|
we,
|
|
495
496
|
{
|
|
496
497
|
hasPermission: !0,
|
|
497
|
-
image: /* @__PURE__ */ n(Ae, { src:
|
|
498
|
-
imageComponent:
|
|
499
|
-
themeData:
|
|
498
|
+
image: /* @__PURE__ */ n(Ae, { src: u }),
|
|
499
|
+
imageComponent: v,
|
|
500
|
+
themeData: te,
|
|
500
501
|
isActive: !0,
|
|
501
502
|
isUser: !1,
|
|
502
|
-
name:
|
|
503
|
-
shopCategory:
|
|
504
|
-
onClick: () =>
|
|
503
|
+
name: p,
|
|
504
|
+
shopCategory: S,
|
|
505
|
+
onClick: () => $(i)
|
|
505
506
|
}
|
|
506
507
|
)
|
|
507
508
|
] })
|
|
@@ -515,7 +516,7 @@ be.propTypes = {
|
|
|
515
516
|
dropdown: a.any,
|
|
516
517
|
color: a.string
|
|
517
518
|
};
|
|
518
|
-
|
|
519
|
+
m.div`
|
|
519
520
|
display: flex;
|
|
520
521
|
flex-direction: column;
|
|
521
522
|
gap: 1.5rem;
|
|
@@ -546,7 +547,7 @@ h.div`
|
|
|
546
547
|
}
|
|
547
548
|
}
|
|
548
549
|
|
|
549
|
-
@media (max-width: ${
|
|
550
|
+
@media (max-width: ${T + "px"}) {
|
|
550
551
|
& .campaign-item {
|
|
551
552
|
min-width: 100%;
|
|
552
553
|
width: 100%;
|
|
@@ -554,19 +555,19 @@ h.div`
|
|
|
554
555
|
}
|
|
555
556
|
}
|
|
556
557
|
`;
|
|
557
|
-
const F =
|
|
558
|
+
const F = m.div`
|
|
558
559
|
width: ${(e) => e.width || "100%"};
|
|
559
560
|
height: ${(e) => (e.heightCoeff || 1) * 1.125}rem;
|
|
560
561
|
background-color: var(--gray-200, #dddfe4);
|
|
561
562
|
|
|
562
|
-
${
|
|
563
|
-
`,
|
|
563
|
+
${fe("-90deg")}
|
|
564
|
+
`, He = m.div`
|
|
564
565
|
display: flex;
|
|
565
566
|
flex-direction: ${(e) => e != null && e.row ? "row" : "column"};
|
|
566
567
|
gap: ${(e) => (e == null ? void 0 : e.gap) ?? "0.5rem"};
|
|
567
568
|
width: ${(e) => (e == null ? void 0 : e.width) ?? "100%"};
|
|
568
|
-
`, me =
|
|
569
|
-
border-radius: ${(e) =>
|
|
569
|
+
`, me = m.div`
|
|
570
|
+
border-radius: ${(e) => M(e.theme, (e == null ? void 0 : e.borderRadius) ?? "regular")};
|
|
570
571
|
background: var(--gray-200, #dddfe4);
|
|
571
572
|
position: relative;
|
|
572
573
|
max-height: ${(e) => (e == null ? void 0 : e.height) ?? "5rem"};
|
|
@@ -575,10 +576,10 @@ const F = h.div`
|
|
|
575
576
|
width: ${(e) => (e == null ? void 0 : e.width) ?? "5rem"};
|
|
576
577
|
flex-shrink: 0;
|
|
577
578
|
|
|
578
|
-
${
|
|
579
|
-
`,
|
|
579
|
+
${fe()}
|
|
580
|
+
`, Ge = m.div`
|
|
580
581
|
background: var(--white, #fff);
|
|
581
|
-
border-radius: ${(e) =>
|
|
582
|
+
border-radius: ${(e) => M(e.theme, "edged")};
|
|
582
583
|
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
|
|
583
584
|
border: 1px solid var(--gray-95012, #14161a1f);
|
|
584
585
|
|
|
@@ -605,19 +606,19 @@ const F = h.div`
|
|
|
605
606
|
gap: 0.5rem;
|
|
606
607
|
}
|
|
607
608
|
|
|
608
|
-
@media (max-width: ${
|
|
609
|
+
@media (max-width: ${T + "px"}) {
|
|
609
610
|
flex-direction: column;
|
|
610
611
|
|
|
611
612
|
& .campaign__user {
|
|
612
613
|
margin-top: 1rem;
|
|
613
614
|
}
|
|
614
615
|
}
|
|
615
|
-
`,
|
|
616
|
+
`, Xe = m.div`
|
|
616
617
|
display: flex;
|
|
617
618
|
gap: 1.5rem;
|
|
618
|
-
`,
|
|
619
|
-
const t =
|
|
620
|
-
return /* @__PURE__ */
|
|
619
|
+
`, Ye = z(({}, e) => {
|
|
620
|
+
const t = re();
|
|
621
|
+
return /* @__PURE__ */ c(Ge, { ref: e, theme: t, children: [
|
|
621
622
|
/* @__PURE__ */ n("div", { className: "campaign__left-section", children: /* @__PURE__ */ n(
|
|
622
623
|
me,
|
|
623
624
|
{
|
|
@@ -627,13 +628,13 @@ const F = h.div`
|
|
|
627
628
|
borderRadius: "edged"
|
|
628
629
|
}
|
|
629
630
|
) }),
|
|
630
|
-
/* @__PURE__ */
|
|
631
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ c("div", { className: "campaign__right-section", children: [
|
|
632
|
+
/* @__PURE__ */ c(He, { theme: t, children: [
|
|
632
633
|
/* @__PURE__ */ n(F, { heightCoeff: 0.75, theme: t, width: "35%" }),
|
|
633
634
|
/* @__PURE__ */ n(F, { heightCoeff: 1.25, theme: t }),
|
|
634
635
|
/* @__PURE__ */ n(F, { heightCoeff: 3, theme: t })
|
|
635
636
|
] }),
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ c("div", { className: "campaign__user", children: [
|
|
637
638
|
/* @__PURE__ */ n(
|
|
638
639
|
me,
|
|
639
640
|
{
|
|
@@ -647,17 +648,17 @@ const F = h.div`
|
|
|
647
648
|
] })
|
|
648
649
|
] })
|
|
649
650
|
] });
|
|
650
|
-
}),
|
|
651
|
-
|
|
651
|
+
}), Ze = ({ itemsCount: e = 5, keyPrefix: t }) => /* @__PURE__ */ n(Xe, { children: Array.from({ length: e }, (o, i) => /* @__PURE__ */ n(
|
|
652
|
+
Ye,
|
|
652
653
|
{},
|
|
653
654
|
`${t}-skeleton-campaign-card-${i}`
|
|
654
|
-
)) }),
|
|
655
|
+
)) }), qe = ({
|
|
655
656
|
children: e,
|
|
656
657
|
fallbackComponent: t = /* @__PURE__ */ n(De, {}),
|
|
657
658
|
isLoading: o = !1,
|
|
658
659
|
itemsCount: i = 5,
|
|
659
|
-
keyPrefix:
|
|
660
|
-
}) => /* @__PURE__ */ n(ze, { fallback: t, children: o === !0 ? /* @__PURE__ */ n(
|
|
660
|
+
keyPrefix: d
|
|
661
|
+
}) => /* @__PURE__ */ n(ze, { fallback: t, children: o === !0 ? /* @__PURE__ */ n(Ze, { itemsCount: i, keyPrefix: d }) : e }), Je = m.div`
|
|
661
662
|
margin: 0 auto;
|
|
662
663
|
display: flex;
|
|
663
664
|
flex-direction: column;
|
|
@@ -696,7 +697,7 @@ const F = h.div`
|
|
|
696
697
|
right: 0;
|
|
697
698
|
}
|
|
698
699
|
|
|
699
|
-
@media (max-width: ${
|
|
700
|
+
@media (max-width: ${T + "px"}) {
|
|
700
701
|
gap: 1.25rem;
|
|
701
702
|
|
|
702
703
|
& .scrollable-section__header {
|
|
@@ -708,13 +709,13 @@ const F = h.div`
|
|
|
708
709
|
}
|
|
709
710
|
}
|
|
710
711
|
}
|
|
711
|
-
`,
|
|
712
|
+
`, Ke = m(pe.div)`
|
|
712
713
|
display: grid;
|
|
713
714
|
grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumns}, 1fr);
|
|
714
715
|
gap: 1.5rem;
|
|
715
716
|
width: 100%;
|
|
716
717
|
|
|
717
|
-
@media (max-width: ${
|
|
718
|
+
@media (max-width: ${T + "px"}) {
|
|
718
719
|
display: flex;
|
|
719
720
|
flex-wrap: nowrap;
|
|
720
721
|
overflow-x: scroll;
|
|
@@ -736,25 +737,36 @@ const F = h.div`
|
|
|
736
737
|
/* Safari and Chrome */
|
|
737
738
|
}
|
|
738
739
|
}
|
|
739
|
-
`, ve =
|
|
740
|
-
({
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
740
|
+
`, ve = z(
|
|
741
|
+
({
|
|
742
|
+
icon: e,
|
|
743
|
+
title: t,
|
|
744
|
+
numOfSlides: o = 2,
|
|
745
|
+
showNavigation: i = !0,
|
|
746
|
+
hasNextPage: d = !1,
|
|
747
|
+
handleFetchNextPage: h = () => {
|
|
748
|
+
},
|
|
749
|
+
children: s
|
|
750
|
+
}, f) => {
|
|
751
|
+
const [l, b] = K(0), [p, S] = K(1), u = xe(), v = (s == null ? void 0 : s.length) ?? 1;
|
|
752
|
+
ee(() => {
|
|
753
|
+
const g = () => {
|
|
754
|
+
S(o);
|
|
745
755
|
};
|
|
746
|
-
return window.addEventListener("resize",
|
|
756
|
+
return window.addEventListener("resize", g), g(), () => window.removeEventListener("resize", g);
|
|
747
757
|
}, []);
|
|
748
|
-
const
|
|
749
|
-
var
|
|
750
|
-
(
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
758
|
+
const k = u ? s : s == null ? void 0 : s.slice(l, l + p), I = (g) => {
|
|
759
|
+
var _;
|
|
760
|
+
(_ = g == null ? void 0 : g.target) == null || _.blur();
|
|
761
|
+
const x = l + p;
|
|
762
|
+
x < v && b(x), x + p >= v && d && h();
|
|
763
|
+
}, $ = (g) => {
|
|
764
|
+
var x;
|
|
765
|
+
(x = g == null ? void 0 : g.target) == null || x.blur(), l - p >= 0 && b(l - p);
|
|
754
766
|
};
|
|
755
|
-
return /* @__PURE__ */
|
|
756
|
-
/* @__PURE__ */ n("div", { className: "scrollable-section__header", children: /* @__PURE__ */
|
|
757
|
-
|
|
767
|
+
return /* @__PURE__ */ c(Je, { ref: f, children: [
|
|
768
|
+
/* @__PURE__ */ n("div", { className: "scrollable-section__header", children: /* @__PURE__ */ c("div", { className: "scrollable-section__title", children: [
|
|
769
|
+
Q(e) && /* @__PURE__ */ n(
|
|
758
770
|
ue,
|
|
759
771
|
{
|
|
760
772
|
icon: e,
|
|
@@ -763,16 +775,16 @@ const F = h.div`
|
|
|
763
775
|
className: "title__icon"
|
|
764
776
|
}
|
|
765
777
|
),
|
|
766
|
-
|
|
778
|
+
Q(t) && /* @__PURE__ */ c("div", { className: "title__text", children: [
|
|
767
779
|
" ",
|
|
768
780
|
t
|
|
769
781
|
] })
|
|
770
782
|
] }) }),
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
|
|
783
|
+
/* @__PURE__ */ c(
|
|
784
|
+
Ke,
|
|
773
785
|
{
|
|
774
786
|
numOfColumns: o,
|
|
775
|
-
...!
|
|
787
|
+
...!u && {
|
|
776
788
|
animate: {
|
|
777
789
|
x: 0,
|
|
778
790
|
opacity: 1
|
|
@@ -782,11 +794,14 @@ const F = h.div`
|
|
|
782
794
|
opacity: 0
|
|
783
795
|
}
|
|
784
796
|
},
|
|
785
|
-
children:
|
|
797
|
+
children: [
|
|
798
|
+
k,
|
|
799
|
+
u && d && /* @__PURE__ */ n(Ee, { onIsVisible: h })
|
|
800
|
+
]
|
|
786
801
|
},
|
|
787
|
-
`scrollable-section__content-${
|
|
802
|
+
`scrollable-section__content-${l}`
|
|
788
803
|
),
|
|
789
|
-
i && v >
|
|
804
|
+
i && v > p && !u && /* @__PURE__ */ c("div", { className: "scrollable-section__navigation", children: [
|
|
790
805
|
/* @__PURE__ */ n(
|
|
791
806
|
le,
|
|
792
807
|
{
|
|
@@ -795,8 +810,8 @@ const F = h.div`
|
|
|
795
810
|
btnType: "tinted",
|
|
796
811
|
color: "neutral",
|
|
797
812
|
className: "navigation__arrow",
|
|
798
|
-
disabled:
|
|
799
|
-
onClick:
|
|
813
|
+
disabled: l === 0,
|
|
814
|
+
onClick: $
|
|
800
815
|
}
|
|
801
816
|
),
|
|
802
817
|
/* @__PURE__ */ n(
|
|
@@ -807,8 +822,8 @@ const F = h.div`
|
|
|
807
822
|
btnType: "tinted",
|
|
808
823
|
color: "neutral",
|
|
809
824
|
className: "navigation__arrow",
|
|
810
|
-
disabled:
|
|
811
|
-
onClick:
|
|
825
|
+
disabled: l + p >= v,
|
|
826
|
+
onClick: I
|
|
812
827
|
}
|
|
813
828
|
)
|
|
814
829
|
] })
|
|
@@ -820,9 +835,10 @@ ve.propTypes = {
|
|
|
820
835
|
title: a.string,
|
|
821
836
|
numOfSlides: a.number,
|
|
822
837
|
numOfSlidesForMobile: a.number,
|
|
838
|
+
handleFetchNextPage: a.func,
|
|
823
839
|
showNavigation: a.bool
|
|
824
840
|
};
|
|
825
|
-
const
|
|
841
|
+
const Qe = m.div`
|
|
826
842
|
display: flex;
|
|
827
843
|
flex: 1;
|
|
828
844
|
width: 100%;
|
|
@@ -839,20 +855,20 @@ const Ke = h.div`
|
|
|
839
855
|
border-radius: 1.25rem;
|
|
840
856
|
object-fit: cover;
|
|
841
857
|
}
|
|
842
|
-
`, ye =
|
|
858
|
+
`, ye = z(
|
|
843
859
|
({
|
|
844
860
|
sectionName: e,
|
|
845
861
|
imageUrl: t,
|
|
846
862
|
maxHeight: o = "16.25rem",
|
|
847
863
|
className: i = "",
|
|
848
|
-
handleClick:
|
|
864
|
+
handleClick: d = () => {
|
|
849
865
|
}
|
|
850
|
-
},
|
|
851
|
-
|
|
866
|
+
}, h) => /* @__PURE__ */ n(
|
|
867
|
+
Qe,
|
|
852
868
|
{
|
|
853
|
-
ref:
|
|
869
|
+
ref: h,
|
|
854
870
|
maxHeight: o,
|
|
855
|
-
onClick:
|
|
871
|
+
onClick: d,
|
|
856
872
|
className: `itemless-banner ${i}`,
|
|
857
873
|
children: /* @__PURE__ */ n("img", { src: t, alt: `itemless-banner__${e}` })
|
|
858
874
|
}
|
|
@@ -865,46 +881,49 @@ ye.propTypes = {
|
|
|
865
881
|
className: a.string,
|
|
866
882
|
handleClick: a.func
|
|
867
883
|
};
|
|
868
|
-
const
|
|
884
|
+
const er = Me(be), pr = z(
|
|
869
885
|
({
|
|
870
886
|
sellerType: e = "Shop",
|
|
871
887
|
items: t = [],
|
|
872
888
|
title: o,
|
|
873
889
|
icon: i,
|
|
874
|
-
isLoading:
|
|
875
|
-
onSelectCard:
|
|
890
|
+
isLoading: d,
|
|
891
|
+
onSelectCard: h = () => {
|
|
876
892
|
},
|
|
877
893
|
onSelectShop: s = () => {
|
|
878
894
|
},
|
|
879
|
-
getImage:
|
|
895
|
+
getImage: f = () => {
|
|
880
896
|
},
|
|
881
|
-
campaignSingleText:
|
|
882
|
-
upcomingCampaignText:
|
|
883
|
-
salesCampaignTypes:
|
|
884
|
-
startsInPrefixTextPlural:
|
|
885
|
-
startsinSuffixTextPlural:
|
|
886
|
-
startsInPrefixTextSingular:
|
|
887
|
-
startsinSuffixTextSingular:
|
|
888
|
-
endsInPrefixTextPlural:
|
|
889
|
-
endsinSuffixTextPlural:
|
|
890
|
-
endsInPrefixTextSingular:
|
|
891
|
-
endsinSuffixTextSingular:
|
|
892
|
-
numOfSlides:
|
|
893
|
-
showNavigation:
|
|
897
|
+
campaignSingleText: l,
|
|
898
|
+
upcomingCampaignText: b,
|
|
899
|
+
salesCampaignTypes: p = [],
|
|
900
|
+
startsInPrefixTextPlural: S,
|
|
901
|
+
startsinSuffixTextPlural: u,
|
|
902
|
+
startsInPrefixTextSingular: v,
|
|
903
|
+
startsinSuffixTextSingular: k,
|
|
904
|
+
endsInPrefixTextPlural: I,
|
|
905
|
+
endsinSuffixTextPlural: $,
|
|
906
|
+
endsInPrefixTextSingular: g,
|
|
907
|
+
endsinSuffixTextSingular: x,
|
|
908
|
+
numOfSlides: _ = 2,
|
|
909
|
+
showNavigation: C = !0,
|
|
894
910
|
numberOfListingsTextSingular: W,
|
|
895
|
-
numberOfListingsTextPlural:
|
|
896
|
-
itemlessImageUrl:
|
|
897
|
-
itemlessLink:
|
|
911
|
+
numberOfListingsTextPlural: V,
|
|
912
|
+
itemlessImageUrl: A,
|
|
913
|
+
itemlessLink: ne,
|
|
898
914
|
handleItemlessLink: H = () => {
|
|
899
915
|
},
|
|
900
|
-
componentName: G
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
916
|
+
componentName: G,
|
|
917
|
+
hasNextPage: L = !1,
|
|
918
|
+
handleFetchNextPage: X = () => {
|
|
919
|
+
}
|
|
920
|
+
}, te) => {
|
|
921
|
+
const N = xe(), Y = Le(() => {
|
|
922
|
+
let U = t == null ? void 0 : t.map((r, Z) => /* @__PURE__ */ n(
|
|
923
|
+
er,
|
|
905
924
|
{
|
|
906
925
|
className: "campaign-item",
|
|
907
|
-
coverPhoto:
|
|
926
|
+
coverPhoto: f(
|
|
908
927
|
r == null ? void 0 : r.coverPhoto,
|
|
909
928
|
(r == null ? void 0 : r.uuid) || (r == null ? void 0 : r.campaignUuid)
|
|
910
929
|
),
|
|
@@ -920,62 +939,64 @@ const Qe = Me(be), hr = M(
|
|
|
920
939
|
startDate: r == null ? void 0 : r.startDate,
|
|
921
940
|
title: r == null ? void 0 : r.name,
|
|
922
941
|
uuid: r == null ? void 0 : r.campaignUuid,
|
|
923
|
-
onSelectCard: (
|
|
942
|
+
onSelectCard: (q, O) => h(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid, O),
|
|
924
943
|
onSelectShop: () => s(r == null ? void 0 : r.shopUuid),
|
|
925
|
-
campaignSingleText:
|
|
926
|
-
upcomingCampaignText:
|
|
944
|
+
campaignSingleText: l,
|
|
945
|
+
upcomingCampaignText: b,
|
|
927
946
|
upcoming: r == null ? void 0 : r.upcoming,
|
|
928
|
-
salesCampaignTypes:
|
|
929
|
-
startsInPrefixTextPlural:
|
|
930
|
-
startsinSuffixTextPlural:
|
|
931
|
-
startsInPrefixTextSingular:
|
|
932
|
-
startsinSuffixTextSingular:
|
|
933
|
-
endsInPrefixTextPlural:
|
|
934
|
-
endsinSuffixTextPlural:
|
|
935
|
-
endsInPrefixTextSingular:
|
|
936
|
-
endsinSuffixTextSingular:
|
|
947
|
+
salesCampaignTypes: p,
|
|
948
|
+
startsInPrefixTextPlural: S,
|
|
949
|
+
startsinSuffixTextPlural: u,
|
|
950
|
+
startsInPrefixTextSingular: v,
|
|
951
|
+
startsinSuffixTextSingular: k,
|
|
952
|
+
endsInPrefixTextPlural: I,
|
|
953
|
+
endsinSuffixTextPlural: $,
|
|
954
|
+
endsInPrefixTextSingular: g,
|
|
955
|
+
endsinSuffixTextSingular: x,
|
|
937
956
|
themeData: r == null ? void 0 : r.themeData,
|
|
938
957
|
numberOfListings: r == null ? void 0 : r.numberOfListings,
|
|
939
958
|
numberOfListingsTextSingular: W,
|
|
940
|
-
numberOfListingsTextPlural:
|
|
959
|
+
numberOfListingsTextPlural: V,
|
|
941
960
|
metadata: { name: G, accessor: r == null ? void 0 : r.accessor }
|
|
942
961
|
},
|
|
943
962
|
`campaign__item__${Z}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
|
|
944
963
|
));
|
|
945
|
-
return (t == null ? void 0 : t.length) < 2 && !
|
|
946
|
-
...
|
|
964
|
+
return (t == null ? void 0 : t.length) < 2 && !N ? [
|
|
965
|
+
...U,
|
|
947
966
|
/* @__PURE__ */ n(
|
|
948
967
|
ye,
|
|
949
968
|
{
|
|
950
|
-
imageUrl:
|
|
969
|
+
imageUrl: A,
|
|
951
970
|
className: "campaign-item",
|
|
952
971
|
handleClick: H
|
|
953
972
|
},
|
|
954
973
|
"itemless-campaign-section-banner"
|
|
955
974
|
)
|
|
956
|
-
] :
|
|
975
|
+
] : U;
|
|
957
976
|
}, [t]);
|
|
958
977
|
return /* @__PURE__ */ n(
|
|
959
|
-
|
|
978
|
+
qe,
|
|
960
979
|
{
|
|
961
|
-
isLoading:
|
|
962
|
-
itemsCount:
|
|
980
|
+
isLoading: d,
|
|
981
|
+
itemsCount: N ? 1 : 2,
|
|
963
982
|
keyPrefix: "sales-camp",
|
|
964
983
|
children: /* @__PURE__ */ n(
|
|
965
984
|
ve,
|
|
966
985
|
{
|
|
967
986
|
icon: i,
|
|
968
987
|
title: o,
|
|
969
|
-
numOfSlides:
|
|
970
|
-
showNavigation:
|
|
988
|
+
numOfSlides: _,
|
|
989
|
+
showNavigation: C,
|
|
990
|
+
hasNextPage: L,
|
|
991
|
+
handleFetchNextPage: X,
|
|
971
992
|
children: Y
|
|
972
993
|
},
|
|
973
|
-
`sales-campaign-section__${
|
|
994
|
+
`sales-campaign-section__${N}`
|
|
974
995
|
)
|
|
975
996
|
}
|
|
976
997
|
);
|
|
977
998
|
}
|
|
978
999
|
);
|
|
979
1000
|
export {
|
|
980
|
-
|
|
1001
|
+
pr as default
|
|
981
1002
|
};
|