@lanaco/lnc-react-ui 4.0.220 → 4.0.222
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/BlogListSection.cjs +5 -5
- package/dist/BlogListSection.js +55 -55
- package/dist/SalesCampaignsSection.cjs +46 -16
- package/dist/SalesCampaignsSection.js +278 -244
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { forwardRef as R, useRef as Se, useEffect as
|
|
3
|
-
import { s as
|
|
4
|
-
import { b as
|
|
5
|
-
import { d as
|
|
1
|
+
import { jsx as n, jsxs as i, Fragment as Ue } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as R, useRef as Se, useEffect as oe, Fragment as Ee, createElement as Me, useState as te, Suspense as Re, memo as je, useMemo as Oe } from "react";
|
|
3
|
+
import { s as y } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { b as ie, l as ae, m as Be, z as We, A as Ge, B as Ve, C as pe } from "./utils-B2fsQ6PS.js";
|
|
5
|
+
import { d as P, o as Fe } from "./breakpoints-ff0SIcV3.js";
|
|
6
6
|
import $e from "./Icon.js";
|
|
7
7
|
import { D as fe } from "./ShopAvatar-4-fCYGEc.js";
|
|
8
8
|
import Ae from "./Badge.js";
|
|
9
9
|
import { u as _e } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
10
10
|
import ue from "./IconButton.js";
|
|
11
11
|
import { u as Ce } from "./useDetectMobile-CcVo3PNi.js";
|
|
12
|
-
import { I as
|
|
13
|
-
import { m as
|
|
14
|
-
import { S as M, c as xe, b as be, a as
|
|
15
|
-
const Ye =
|
|
12
|
+
import { I as He } from "./index-BdKi2ogu.js";
|
|
13
|
+
import { m as qe } from "./motion-Ckekul_K.js";
|
|
14
|
+
import { S as M, c as xe, b as be, a as w, d as ve } from "./style-BwQ4djFC.js";
|
|
15
|
+
const Ye = y.a`
|
|
16
16
|
text-decoration: none;
|
|
17
17
|
color: var(--gray-950);
|
|
18
18
|
cursor: pointer;
|
|
@@ -33,12 +33,30 @@ const Ye = S.a`
|
|
|
33
33
|
background: #ffffff;
|
|
34
34
|
`}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
&.horizontal-campaign-item {
|
|
37
|
+
flex-direction: row;
|
|
38
|
+
|
|
39
|
+
& img {
|
|
40
|
+
max-width: 13.75rem;
|
|
41
|
+
max-height: 13.75rem;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media ${P("S")} {
|
|
37
46
|
width: 100%;
|
|
38
47
|
gap: 0;
|
|
48
|
+
|
|
49
|
+
&.horizontal-campaign-item {
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
|
|
52
|
+
& img {
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
max-height: 100%;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
39
57
|
}
|
|
40
|
-
`, Ze =
|
|
41
|
-
border-radius: ${(r) =>
|
|
58
|
+
`, Ze = y.div`
|
|
59
|
+
border-radius: ${(r) => ie(r.theme, "edged")};
|
|
42
60
|
cursor: pointer;
|
|
43
61
|
|
|
44
62
|
position: relative;
|
|
@@ -58,10 +76,10 @@ const Ye = S.a`
|
|
|
58
76
|
}
|
|
59
77
|
}
|
|
60
78
|
|
|
61
|
-
@media ${
|
|
79
|
+
@media ${P("S")} {
|
|
62
80
|
width: 14.5rem;
|
|
63
81
|
}
|
|
64
|
-
`, Je =
|
|
82
|
+
`, Je = y.div`
|
|
65
83
|
flex: 1;
|
|
66
84
|
display: flex;
|
|
67
85
|
flex-direction: column;
|
|
@@ -144,7 +162,7 @@ const Ye = S.a`
|
|
|
144
162
|
color: var(--gray-600, #676e79);
|
|
145
163
|
}
|
|
146
164
|
|
|
147
|
-
@media ${
|
|
165
|
+
@media ${P("S")} {
|
|
148
166
|
padding: 1rem 0 0 0;
|
|
149
167
|
|
|
150
168
|
& .campaign-title-text {
|
|
@@ -175,7 +193,7 @@ const Ye = S.a`
|
|
|
175
193
|
${t ? "" : "flex-wrap: nowrap;"}
|
|
176
194
|
${r ? "align-items: center;" : ""}
|
|
177
195
|
${o ? "justify-content: center;" : ""}
|
|
178
|
-
`, Ke =
|
|
196
|
+
`, Ke = y.a`
|
|
179
197
|
text-decoration: none;
|
|
180
198
|
color: var(--gray-950);
|
|
181
199
|
${(r) => r.hasPermission === !0 && "cursor: pointer"};
|
|
@@ -199,7 +217,7 @@ const Ye = S.a`
|
|
|
199
217
|
font-weight: 500;
|
|
200
218
|
font-size: 1rem;
|
|
201
219
|
line-height: 1.5rem;
|
|
202
|
-
border-radius: ${(r) =>
|
|
220
|
+
border-radius: ${(r) => ie(r.theme, "slight")};
|
|
203
221
|
transition: all 0.25s ease;
|
|
204
222
|
& .description {
|
|
205
223
|
font-size: 0.85rem;
|
|
@@ -247,18 +265,18 @@ const Ye = S.a`
|
|
|
247
265
|
background-color: var(--gray-95080, #14161acc);
|
|
248
266
|
}
|
|
249
267
|
|
|
250
|
-
@media ${
|
|
268
|
+
@media ${P("S")} {
|
|
251
269
|
padding: 0;
|
|
252
270
|
font-size: 0.875rem;
|
|
253
271
|
}
|
|
254
|
-
`, Qe =
|
|
272
|
+
`, Qe = y.div`
|
|
255
273
|
position: absolute;
|
|
256
274
|
top: 0.5rem;
|
|
257
275
|
${(r) => r.alignToLeft === !0 ? "left: 0.5rem;" : "right: 0.5rem;"}
|
|
258
276
|
display: flex;
|
|
259
277
|
gap: 0.25rem;
|
|
260
|
-
`, Xe =
|
|
261
|
-
border-radius: ${(r) =>
|
|
278
|
+
`, Xe = y.div`
|
|
279
|
+
border-radius: ${(r) => ie(r.theme, r.borderRadius || "slight")};
|
|
262
280
|
background-color: ${(r) => r == null ? void 0 : r.color};
|
|
263
281
|
color: white;
|
|
264
282
|
height: 1.5rem;
|
|
@@ -275,64 +293,64 @@ const Ye = S.a`
|
|
|
275
293
|
}
|
|
276
294
|
`, er = R(({ src: r, ...t }, o) => {
|
|
277
295
|
const a = Se();
|
|
278
|
-
return
|
|
279
|
-
var
|
|
280
|
-
const
|
|
281
|
-
|
|
296
|
+
return oe(() => {
|
|
297
|
+
var h;
|
|
298
|
+
const s = (p) => {
|
|
299
|
+
p.target.src = fe, p.onerror = null;
|
|
282
300
|
};
|
|
283
|
-
return (
|
|
284
|
-
var
|
|
285
|
-
(
|
|
301
|
+
return (h = a == null ? void 0 : a.current) == null || h.addEventListener("error", s), () => {
|
|
302
|
+
var p;
|
|
303
|
+
(p = a == null ? void 0 : a.current) == null || p.removeEventListener("error", s);
|
|
286
304
|
};
|
|
287
|
-
}, []), /* @__PURE__ */ n(Ee, { ref: o, children:
|
|
305
|
+
}, []), /* @__PURE__ */ n(Ee, { ref: o, children: ae(r) ? /* @__PURE__ */ n("img", { ref: a, src: r, ...t }) : /* @__PURE__ */ n("img", { src: fe, ...t }) });
|
|
288
306
|
}), rr = (r) => {
|
|
289
307
|
const {
|
|
290
308
|
uuid: t,
|
|
291
309
|
hasPermission: o = !0,
|
|
292
310
|
isUser: a,
|
|
293
|
-
image:
|
|
294
|
-
imageComponent:
|
|
295
|
-
name:
|
|
296
|
-
notifications:
|
|
297
|
-
color:
|
|
298
|
-
size:
|
|
299
|
-
style:
|
|
300
|
-
disabled:
|
|
301
|
-
onClick:
|
|
311
|
+
image: s,
|
|
312
|
+
imageComponent: h,
|
|
313
|
+
name: p,
|
|
314
|
+
notifications: S = 0,
|
|
315
|
+
color: l = "primary",
|
|
316
|
+
size: f = "large",
|
|
317
|
+
style: c,
|
|
318
|
+
disabled: C,
|
|
319
|
+
onClick: m = () => {
|
|
302
320
|
},
|
|
303
|
-
isActive:
|
|
304
|
-
className:
|
|
305
|
-
shopCategory:
|
|
321
|
+
isActive: N,
|
|
322
|
+
className: b,
|
|
323
|
+
shopCategory: v,
|
|
306
324
|
// new
|
|
307
|
-
themeData:
|
|
325
|
+
themeData: $,
|
|
308
326
|
LinkComponent: k
|
|
309
|
-
} = r,
|
|
327
|
+
} = r, D = k || "a", u = {
|
|
310
328
|
theme: _e(),
|
|
311
|
-
color:
|
|
312
|
-
size:
|
|
313
|
-
style:
|
|
314
|
-
disabled:
|
|
329
|
+
color: l,
|
|
330
|
+
size: f,
|
|
331
|
+
style: c,
|
|
332
|
+
disabled: C
|
|
315
333
|
};
|
|
316
334
|
return /* @__PURE__ */ Me(
|
|
317
335
|
Ke,
|
|
318
336
|
{
|
|
319
|
-
onClick: (
|
|
320
|
-
|
|
337
|
+
onClick: (g) => {
|
|
338
|
+
g == null || g.preventDefault(), g.stopPropagation(), o === !0 && (m == null || m());
|
|
321
339
|
},
|
|
322
|
-
...
|
|
323
|
-
key:
|
|
324
|
-
className: `profile-item ${
|
|
340
|
+
...u,
|
|
341
|
+
key: p,
|
|
342
|
+
className: `profile-item ${b}`,
|
|
325
343
|
hasPermission: o,
|
|
326
|
-
isActive:
|
|
327
|
-
themeColor: (
|
|
328
|
-
as:
|
|
344
|
+
isActive: N,
|
|
345
|
+
themeColor: ($ == null ? void 0 : $.code) || "transparent",
|
|
346
|
+
as: D,
|
|
329
347
|
...k ? { to: `/${a ? "user" : "shop"}/${t}` } : { href: `/${a ? "user" : "shop"}/${t}` }
|
|
330
348
|
},
|
|
331
|
-
/* @__PURE__ */ n("div", { className: "logo-wrapper", children: Be(
|
|
332
|
-
/* @__PURE__ */
|
|
333
|
-
/* @__PURE__ */ n("div", { className: "name", children:
|
|
334
|
-
!a && /* @__PURE__ */ n("div", { className: "description", children:
|
|
335
|
-
|
|
349
|
+
/* @__PURE__ */ n("div", { className: "logo-wrapper", children: Be(h) ? h : s }),
|
|
350
|
+
/* @__PURE__ */ i("div", { children: [
|
|
351
|
+
/* @__PURE__ */ n("div", { className: "name", children: p }),
|
|
352
|
+
!a && /* @__PURE__ */ n("div", { className: "description", children: v }),
|
|
353
|
+
S > 0 && /* @__PURE__ */ n("div", { className: "notifications-number", children: /* @__PURE__ */ n(Ae, { className: "badge", color: "danger", size: "small", children: S > 99 ? "99+" : S }) })
|
|
336
354
|
] })
|
|
337
355
|
);
|
|
338
356
|
}, ye = (r) => {
|
|
@@ -341,93 +359,93 @@ const Ye = S.a`
|
|
|
341
359
|
return `${String(t.getDate()).padStart(2)}. ${a}. ${o}.`;
|
|
342
360
|
}
|
|
343
361
|
}, nr = R((r, t) => {
|
|
344
|
-
var
|
|
362
|
+
var he;
|
|
345
363
|
const o = _e(), {
|
|
346
364
|
uuid: a,
|
|
347
|
-
shopUuid:
|
|
348
|
-
title:
|
|
365
|
+
shopUuid: s,
|
|
366
|
+
title: h = "",
|
|
349
367
|
// description,
|
|
350
368
|
// badges,
|
|
351
|
-
coverPhoto:
|
|
352
|
-
onSelect:
|
|
369
|
+
coverPhoto: p,
|
|
370
|
+
onSelect: S,
|
|
353
371
|
// status,
|
|
354
|
-
startDate:
|
|
355
|
-
endDate:
|
|
356
|
-
salesPackages:
|
|
357
|
-
shopName:
|
|
358
|
-
shopCategory:
|
|
359
|
-
shopImage:
|
|
360
|
-
shopImageComponent:
|
|
361
|
-
className:
|
|
362
|
-
onSelectCard:
|
|
372
|
+
startDate: l,
|
|
373
|
+
endDate: f,
|
|
374
|
+
salesPackages: c,
|
|
375
|
+
shopName: C,
|
|
376
|
+
shopCategory: m,
|
|
377
|
+
shopImage: N,
|
|
378
|
+
shopImageComponent: b,
|
|
379
|
+
className: v,
|
|
380
|
+
onSelectCard: $ = () => {
|
|
363
381
|
},
|
|
364
382
|
onSelectShop: k = () => {
|
|
365
383
|
},
|
|
366
|
-
upcoming:
|
|
367
|
-
upcomingCampaignText:
|
|
368
|
-
campaignSingleText:
|
|
369
|
-
salesCampaignTypes:
|
|
384
|
+
upcoming: D = !1,
|
|
385
|
+
upcomingCampaignText: d,
|
|
386
|
+
campaignSingleText: u,
|
|
387
|
+
salesCampaignTypes: g = [],
|
|
370
388
|
startsInPrefixTextPlural: V,
|
|
371
389
|
startsinSuffixTextPlural: F,
|
|
372
390
|
startsInPrefixTextSingular: A,
|
|
373
|
-
startsinSuffixTextSingular:
|
|
391
|
+
startsinSuffixTextSingular: H,
|
|
374
392
|
endsInPrefixTextPlural: q,
|
|
375
|
-
endsinSuffixTextPlural:
|
|
393
|
+
endsinSuffixTextPlural: Y,
|
|
376
394
|
endsInPrefixTextSingular: j,
|
|
377
|
-
endsinSuffixTextSingular:
|
|
378
|
-
endedText:
|
|
379
|
-
themeData:
|
|
380
|
-
numberOfListings:
|
|
381
|
-
numberOfListingsTextSingular:
|
|
395
|
+
endsinSuffixTextSingular: Z,
|
|
396
|
+
endedText: J,
|
|
397
|
+
themeData: se,
|
|
398
|
+
numberOfListings: z,
|
|
399
|
+
numberOfListingsTextSingular: K,
|
|
382
400
|
numberOfListingsTextPlural: O,
|
|
383
401
|
metadata: e,
|
|
384
402
|
LinkComponent: B,
|
|
385
403
|
sponsored: le,
|
|
386
|
-
...
|
|
387
|
-
} = r, ke = B || "a", ce = Se(), E = We(
|
|
388
|
-
if (!
|
|
389
|
-
const
|
|
404
|
+
...Q
|
|
405
|
+
} = r, ke = B || "a", ce = Se(), E = We(l, f), X = E !== -1 && (E == null ? void 0 : E.isEnded) === !0, ee = E !== -1 && !X, re = Ge(l), L = Ve(f), Ie = L !== null && L <= 2 && L > 0, de = pe(f), ge = de ? new Date(de) : null, Ne = /* @__PURE__ */ new Date(), ne = ge ? ge.getTime() - Ne.getTime() : null, W = ne !== null && ne > 0 && ne < 24 * 60 * 60 * 1e3, me = (x, U, I, _, T) => I === 1 ? `${x} ${I} ${_}` : `${U} ${I} ${T}`, De = () => {
|
|
406
|
+
if (!f) return null;
|
|
407
|
+
const x = pe(f), U = x ? new Date(x) : null;
|
|
390
408
|
if (!U) return null;
|
|
391
|
-
const
|
|
392
|
-
if (
|
|
393
|
-
const T = Math.floor(
|
|
409
|
+
const I = ze, _ = U.getTime() - I.getTime();
|
|
410
|
+
if (_ <= 0) return null;
|
|
411
|
+
const T = Math.floor(_ / (1e3 * 60 * 60)), Pe = Math.floor(_ % (1e3 * 60 * 60) / (1e3 * 60)), Le = Math.floor(_ % (1e3 * 60) / 1e3);
|
|
394
412
|
return { hours: T, minutes: Pe, seconds: Le };
|
|
395
|
-
}, [
|
|
396
|
-
|
|
413
|
+
}, [ze, Te] = te(/* @__PURE__ */ new Date());
|
|
414
|
+
oe(() => {
|
|
397
415
|
if (!W) return;
|
|
398
|
-
const
|
|
399
|
-
|
|
416
|
+
const x = setInterval(() => {
|
|
417
|
+
Te(/* @__PURE__ */ new Date());
|
|
400
418
|
}, 1e3);
|
|
401
|
-
return () => clearInterval(
|
|
419
|
+
return () => clearInterval(x);
|
|
402
420
|
}, [W]);
|
|
403
421
|
const G = W ? De() : null;
|
|
404
|
-
return /* @__PURE__ */
|
|
422
|
+
return /* @__PURE__ */ i(
|
|
405
423
|
Ye,
|
|
406
424
|
{
|
|
407
425
|
ref: ce,
|
|
408
426
|
theme: o,
|
|
409
|
-
className:
|
|
427
|
+
className: v,
|
|
410
428
|
name: e == null ? void 0 : e.name,
|
|
411
429
|
"data-accessor": e == null ? void 0 : e.accessor,
|
|
412
|
-
onClick: (
|
|
430
|
+
onClick: (x) => $(x, ce),
|
|
413
431
|
as: ke,
|
|
414
|
-
...B ? { to: `/shop/${
|
|
432
|
+
...B ? { to: `/shop/${s}/campaign/${a}` } : { href: `/shop/${s}/campaign/${a}` },
|
|
415
433
|
sponsored: le,
|
|
416
|
-
...
|
|
434
|
+
...Q,
|
|
417
435
|
children: [
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */ n("img", { src:
|
|
420
|
-
/* @__PURE__ */ n(Qe, { children:
|
|
421
|
-
var
|
|
436
|
+
/* @__PURE__ */ i(Ze, { theme: o, children: [
|
|
437
|
+
/* @__PURE__ */ n("img", { src: p }),
|
|
438
|
+
/* @__PURE__ */ n(Qe, { children: c == null ? void 0 : c.map((x, U) => {
|
|
439
|
+
var I, _;
|
|
422
440
|
return /* @__PURE__ */ n(
|
|
423
441
|
Xe,
|
|
424
442
|
{
|
|
425
|
-
color: (
|
|
443
|
+
color: (I = g == null ? void 0 : g.find((T) => T.value === x)) == null ? void 0 : I.color,
|
|
426
444
|
theme: o,
|
|
427
445
|
children: /* @__PURE__ */ n(
|
|
428
446
|
$e,
|
|
429
447
|
{
|
|
430
|
-
icon: (
|
|
448
|
+
icon: (_ = g == null ? void 0 : g.find((T) => T.value === x)) == null ? void 0 : _.icon
|
|
431
449
|
}
|
|
432
450
|
)
|
|
433
451
|
},
|
|
@@ -435,20 +453,20 @@ const Ye = S.a`
|
|
|
435
453
|
);
|
|
436
454
|
}) })
|
|
437
455
|
] }),
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
-
/* @__PURE__ */ n("div", { className: "text-block-wrapper", children: /* @__PURE__ */
|
|
440
|
-
/* @__PURE__ */ n("div", { className: "campaign-title", children: (
|
|
441
|
-
/* @__PURE__ */ n("div", { className: "campaign-title-text", children:
|
|
442
|
-
|
|
443
|
-
ye(
|
|
456
|
+
/* @__PURE__ */ i(Je, { theme: o, children: [
|
|
457
|
+
/* @__PURE__ */ n("div", { className: "text-block-wrapper", children: /* @__PURE__ */ i("div", { className: "title-block-wrapper", children: [
|
|
458
|
+
/* @__PURE__ */ n("div", { className: "campaign-title", children: (he = D ? d : u) == null ? void 0 : he.toUpperCase() }),
|
|
459
|
+
/* @__PURE__ */ n("div", { className: "campaign-title-text", children: h }),
|
|
460
|
+
f && l && /* @__PURE__ */ i("div", { className: "campaign-date", children: [
|
|
461
|
+
ye(l),
|
|
444
462
|
" - ",
|
|
445
|
-
ye(
|
|
463
|
+
ye(f)
|
|
446
464
|
] }),
|
|
447
|
-
/* @__PURE__ */
|
|
448
|
-
|
|
449
|
-
|
|
465
|
+
/* @__PURE__ */ i("div", { className: "timestamp-text", children: [
|
|
466
|
+
z > 0 && /* @__PURE__ */ i("span", { className: "listings-text", children: [
|
|
467
|
+
z,
|
|
450
468
|
" ",
|
|
451
|
-
|
|
469
|
+
z === 1 ? K : O,
|
|
452
470
|
" ",
|
|
453
471
|
"∙",
|
|
454
472
|
" "
|
|
@@ -456,8 +474,8 @@ const Ye = S.a`
|
|
|
456
474
|
/* @__PURE__ */ n(
|
|
457
475
|
"span",
|
|
458
476
|
{
|
|
459
|
-
className: `duration-text ${Ie ? "urgent" : ""} ${
|
|
460
|
-
children: W && G ? /* @__PURE__ */
|
|
477
|
+
className: `duration-text ${Ie ? "urgent" : ""} ${ee ? "" : "starts-in"}`,
|
|
478
|
+
children: W && G ? /* @__PURE__ */ i("div", { className: "countdown-timer", children: [
|
|
461
479
|
j,
|
|
462
480
|
" ",
|
|
463
481
|
G.hours.toString().padStart(2, "0"),
|
|
@@ -465,17 +483,17 @@ const Ye = S.a`
|
|
|
465
483
|
G.minutes.toString().padStart(2, "0"),
|
|
466
484
|
":",
|
|
467
485
|
G.seconds.toString().padStart(2, "0")
|
|
468
|
-
] }) :
|
|
486
|
+
] }) : ee && !X && L !== null && L > 0 ? me(
|
|
469
487
|
j,
|
|
470
488
|
q,
|
|
471
489
|
L,
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
) :
|
|
490
|
+
Z,
|
|
491
|
+
Y
|
|
492
|
+
) : X ? J || "Završena" : !ee && re !== null && re > 0 ? me(
|
|
475
493
|
A,
|
|
476
494
|
V,
|
|
477
|
-
|
|
478
|
-
|
|
495
|
+
re,
|
|
496
|
+
H,
|
|
479
497
|
F
|
|
480
498
|
) : null
|
|
481
499
|
}
|
|
@@ -486,22 +504,22 @@ const Ye = S.a`
|
|
|
486
504
|
rr,
|
|
487
505
|
{
|
|
488
506
|
hasPermission: !0,
|
|
489
|
-
image: /* @__PURE__ */ n(er, { src:
|
|
490
|
-
imageComponent:
|
|
491
|
-
themeData:
|
|
507
|
+
image: /* @__PURE__ */ n(er, { src: N }),
|
|
508
|
+
imageComponent: b,
|
|
509
|
+
themeData: se,
|
|
492
510
|
isActive: !0,
|
|
493
511
|
isUser: !1,
|
|
494
|
-
name:
|
|
495
|
-
shopCategory:
|
|
496
|
-
uuid:
|
|
497
|
-
onClick: () => k(
|
|
512
|
+
name: C,
|
|
513
|
+
shopCategory: m,
|
|
514
|
+
uuid: s,
|
|
515
|
+
onClick: () => k(s)
|
|
498
516
|
}
|
|
499
517
|
)
|
|
500
518
|
] })
|
|
501
519
|
]
|
|
502
520
|
}
|
|
503
521
|
);
|
|
504
|
-
}), tr =
|
|
522
|
+
}), tr = y.div`
|
|
505
523
|
margin: 0 auto;
|
|
506
524
|
display: flex;
|
|
507
525
|
flex-direction: column;
|
|
@@ -540,7 +558,19 @@ const Ye = S.a`
|
|
|
540
558
|
right: 0;
|
|
541
559
|
}
|
|
542
560
|
|
|
543
|
-
|
|
561
|
+
&.itemless {
|
|
562
|
+
& .scrollable-section__content {
|
|
563
|
+
&:has(.campaign-item:nth-child(3):last-child) {
|
|
564
|
+
& .campaign-item {
|
|
565
|
+
&:last-child {
|
|
566
|
+
grid-column: span 2;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
@media ${P("S")} {
|
|
544
574
|
gap: 1.25rem;
|
|
545
575
|
|
|
546
576
|
& .scrollable-section__header {
|
|
@@ -552,7 +582,7 @@ const Ye = S.a`
|
|
|
552
582
|
}
|
|
553
583
|
}
|
|
554
584
|
}
|
|
555
|
-
`, ar =
|
|
585
|
+
`, ar = y(qe.div)`
|
|
556
586
|
display: grid;
|
|
557
587
|
grid-template-columns: repeat(${(r) => r == null ? void 0 : r.numOfColumns}, 1fr);
|
|
558
588
|
gap: 1.5rem;
|
|
@@ -562,7 +592,7 @@ const Ye = S.a`
|
|
|
562
592
|
grid-template-columns: repeat(${(r) => (r == null ? void 0 : r.tabletNumOfColumns) ?? 2}, 1fr);
|
|
563
593
|
}
|
|
564
594
|
|
|
565
|
-
@media ${
|
|
595
|
+
@media ${P("S")} {
|
|
566
596
|
display: flex;
|
|
567
597
|
flex-wrap: nowrap;
|
|
568
598
|
overflow-x: scroll;
|
|
@@ -590,31 +620,32 @@ const Ye = S.a`
|
|
|
590
620
|
title: t,
|
|
591
621
|
numOfSlides: o = 4,
|
|
592
622
|
tabletNumOfSlides: a,
|
|
593
|
-
showNavigation:
|
|
594
|
-
hasNextPage:
|
|
595
|
-
|
|
623
|
+
showNavigation: s = !0,
|
|
624
|
+
hasNextPage: h = !1,
|
|
625
|
+
className: p = "",
|
|
626
|
+
handleFetchNextPage: S = () => {
|
|
596
627
|
},
|
|
597
|
-
children:
|
|
598
|
-
},
|
|
599
|
-
const [
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
|
|
628
|
+
children: l
|
|
629
|
+
}, f) => {
|
|
630
|
+
const [c, C] = te(0), [m, N] = te(1), b = Ce(), v = (l == null ? void 0 : l.length) ?? 1;
|
|
631
|
+
oe(() => {
|
|
632
|
+
const d = () => {
|
|
633
|
+
N(o);
|
|
603
634
|
};
|
|
604
|
-
return window.addEventListener("resize",
|
|
635
|
+
return window.addEventListener("resize", d), d(), () => window.removeEventListener("resize", d);
|
|
605
636
|
}, []);
|
|
606
|
-
const
|
|
607
|
-
var
|
|
608
|
-
(
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
},
|
|
612
|
-
var
|
|
613
|
-
(
|
|
637
|
+
const $ = b ? l : l == null ? void 0 : l.slice(c, c + m), k = (d) => {
|
|
638
|
+
var g;
|
|
639
|
+
(g = d == null ? void 0 : d.target) == null || g.blur();
|
|
640
|
+
const u = c + m;
|
|
641
|
+
u < v && C(u), u + m >= v && h && S();
|
|
642
|
+
}, D = (d) => {
|
|
643
|
+
var u;
|
|
644
|
+
(u = d == null ? void 0 : d.target) == null || u.blur(), c - m >= 0 && C(c - m);
|
|
614
645
|
};
|
|
615
|
-
return /* @__PURE__ */
|
|
616
|
-
/* @__PURE__ */ n("div", { className: "scrollable-section__header", children: /* @__PURE__ */
|
|
617
|
-
|
|
646
|
+
return /* @__PURE__ */ i(tr, { ref: f, className: p, children: [
|
|
647
|
+
/* @__PURE__ */ n("div", { className: "scrollable-section__header", children: /* @__PURE__ */ i("div", { className: "scrollable-section__title", children: [
|
|
648
|
+
ae(r) && /* @__PURE__ */ n(
|
|
618
649
|
$e,
|
|
619
650
|
{
|
|
620
651
|
icon: r,
|
|
@@ -623,17 +654,17 @@ const Ye = S.a`
|
|
|
623
654
|
className: "title__icon"
|
|
624
655
|
}
|
|
625
656
|
),
|
|
626
|
-
|
|
657
|
+
ae(t) && /* @__PURE__ */ i("div", { className: "title__text", children: [
|
|
627
658
|
" ",
|
|
628
659
|
t
|
|
629
660
|
] })
|
|
630
661
|
] }) }),
|
|
631
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ i(
|
|
632
663
|
ar,
|
|
633
664
|
{
|
|
634
665
|
numOfColumns: o,
|
|
635
666
|
tabletNumOfColumns: a,
|
|
636
|
-
...!
|
|
667
|
+
...!b && {
|
|
637
668
|
animate: {
|
|
638
669
|
x: 0,
|
|
639
670
|
opacity: 1
|
|
@@ -643,14 +674,15 @@ const Ye = S.a`
|
|
|
643
674
|
opacity: 0
|
|
644
675
|
}
|
|
645
676
|
},
|
|
677
|
+
className: "scrollable-section__content",
|
|
646
678
|
children: [
|
|
647
|
-
|
|
648
|
-
|
|
679
|
+
$,
|
|
680
|
+
b && h && /* @__PURE__ */ n(He, { onIsVisible: S })
|
|
649
681
|
]
|
|
650
682
|
},
|
|
651
|
-
`scrollable-section__content-${
|
|
683
|
+
`scrollable-section__content-${c}`
|
|
652
684
|
),
|
|
653
|
-
|
|
685
|
+
s && v > m && !b && /* @__PURE__ */ i("div", { className: "scrollable-section__navigation", children: [
|
|
654
686
|
/* @__PURE__ */ n(
|
|
655
687
|
ue,
|
|
656
688
|
{
|
|
@@ -659,8 +691,8 @@ const Ye = S.a`
|
|
|
659
691
|
btnType: "tinted",
|
|
660
692
|
color: "neutral",
|
|
661
693
|
className: "navigation__arrow",
|
|
662
|
-
disabled:
|
|
663
|
-
onClick:
|
|
694
|
+
disabled: c === 0,
|
|
695
|
+
onClick: D
|
|
664
696
|
}
|
|
665
697
|
),
|
|
666
698
|
/* @__PURE__ */ n(
|
|
@@ -671,14 +703,14 @@ const Ye = S.a`
|
|
|
671
703
|
btnType: "tinted",
|
|
672
704
|
color: "neutral",
|
|
673
705
|
className: "navigation__arrow",
|
|
674
|
-
disabled:
|
|
675
|
-
onClick:
|
|
706
|
+
disabled: c + m >= v,
|
|
707
|
+
onClick: k
|
|
676
708
|
}
|
|
677
709
|
)
|
|
678
710
|
] })
|
|
679
711
|
] });
|
|
680
712
|
}
|
|
681
|
-
),
|
|
713
|
+
), ir = y.div`
|
|
682
714
|
display: flex;
|
|
683
715
|
flex: 1;
|
|
684
716
|
width: 100%;
|
|
@@ -695,26 +727,26 @@ const Ye = S.a`
|
|
|
695
727
|
border-radius: 1.25rem;
|
|
696
728
|
object-fit: cover;
|
|
697
729
|
}
|
|
698
|
-
`,
|
|
730
|
+
`, sr = R(
|
|
699
731
|
({
|
|
700
732
|
sectionName: r,
|
|
701
733
|
imageUrl: t,
|
|
702
734
|
maxHeight: o = "16.25rem",
|
|
703
735
|
className: a = "",
|
|
704
|
-
handleClick:
|
|
736
|
+
handleClick: s = () => {
|
|
705
737
|
}
|
|
706
|
-
},
|
|
707
|
-
|
|
738
|
+
}, h) => /* @__PURE__ */ n(
|
|
739
|
+
ir,
|
|
708
740
|
{
|
|
709
|
-
ref:
|
|
741
|
+
ref: h,
|
|
710
742
|
maxHeight: o,
|
|
711
|
-
onClick:
|
|
743
|
+
onClick: s,
|
|
712
744
|
className: `itemless-banner ${a}`,
|
|
713
745
|
children: /* @__PURE__ */ n("img", { src: t, alt: `itemless-banner__${r}` })
|
|
714
746
|
}
|
|
715
747
|
)
|
|
716
|
-
), lr =
|
|
717
|
-
@media ${
|
|
748
|
+
), lr = y(M)`
|
|
749
|
+
@media ${P("S")} {
|
|
718
750
|
flex-direction: column;
|
|
719
751
|
|
|
720
752
|
& .skeleton__image {
|
|
@@ -728,8 +760,8 @@ const Ye = S.a`
|
|
|
728
760
|
}
|
|
729
761
|
}
|
|
730
762
|
}
|
|
731
|
-
`, cr = ({ keyPrefix: r }) => /* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
763
|
+
`, cr = ({ keyPrefix: r }) => /* @__PURE__ */ i(lr, { children: [
|
|
764
|
+
/* @__PURE__ */ i(M, { children: [
|
|
733
765
|
/* @__PURE__ */ n(
|
|
734
766
|
xe,
|
|
735
767
|
{
|
|
@@ -739,18 +771,18 @@ const Ye = S.a`
|
|
|
739
771
|
},
|
|
740
772
|
`${r}-1`
|
|
741
773
|
),
|
|
742
|
-
/* @__PURE__ */
|
|
743
|
-
/* @__PURE__ */ n(
|
|
744
|
-
/* @__PURE__ */ n(
|
|
745
|
-
/* @__PURE__ */ n(
|
|
746
|
-
/* @__PURE__ */ n(
|
|
747
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ i(be, { noGradient: !0, children: [
|
|
775
|
+
/* @__PURE__ */ n(w, { height: "1rem" }),
|
|
776
|
+
/* @__PURE__ */ n(w, { height: "1.75rem" }),
|
|
777
|
+
/* @__PURE__ */ n(w, { height: "1.25rem" }),
|
|
778
|
+
/* @__PURE__ */ n(w, { height: "2rem" }),
|
|
779
|
+
/* @__PURE__ */ i(M, { alignItems: "center", noGradient: !0, children: [
|
|
748
780
|
/* @__PURE__ */ n(ve, { width: "2.5rem", height: "2.5rem" }),
|
|
749
|
-
/* @__PURE__ */ n(
|
|
781
|
+
/* @__PURE__ */ n(w, { width: "5rem", height: "1.25rem" })
|
|
750
782
|
] })
|
|
751
783
|
] })
|
|
752
784
|
] }),
|
|
753
|
-
/* @__PURE__ */
|
|
785
|
+
/* @__PURE__ */ i(M, { noGradient: !0, children: [
|
|
754
786
|
/* @__PURE__ */ n(
|
|
755
787
|
xe,
|
|
756
788
|
{
|
|
@@ -760,14 +792,14 @@ const Ye = S.a`
|
|
|
760
792
|
},
|
|
761
793
|
`${r}-2`
|
|
762
794
|
),
|
|
763
|
-
/* @__PURE__ */
|
|
764
|
-
/* @__PURE__ */ n(
|
|
765
|
-
/* @__PURE__ */ n(
|
|
766
|
-
/* @__PURE__ */ n(
|
|
767
|
-
/* @__PURE__ */ n(
|
|
768
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ i(be, { noGradient: !0, children: [
|
|
796
|
+
/* @__PURE__ */ n(w, { height: "1rem" }),
|
|
797
|
+
/* @__PURE__ */ n(w, { height: "1.75rem" }),
|
|
798
|
+
/* @__PURE__ */ n(w, { height: "1.25rem" }),
|
|
799
|
+
/* @__PURE__ */ n(w, { height: "2rem" }),
|
|
800
|
+
/* @__PURE__ */ i(M, { alignItems: "center", noGradient: !0, children: [
|
|
769
801
|
/* @__PURE__ */ n(ve, { width: "2.5rem", height: "2.5rem" }),
|
|
770
|
-
/* @__PURE__ */ n(
|
|
802
|
+
/* @__PURE__ */ n(w, { width: "5rem", height: "1.25rem" })
|
|
771
803
|
] })
|
|
772
804
|
] })
|
|
773
805
|
] })
|
|
@@ -782,45 +814,45 @@ const Ye = S.a`
|
|
|
782
814
|
items: t = [],
|
|
783
815
|
title: o,
|
|
784
816
|
icon: a,
|
|
785
|
-
isLoading:
|
|
786
|
-
onSelectCard:
|
|
817
|
+
isLoading: s,
|
|
818
|
+
onSelectCard: h = () => {
|
|
787
819
|
},
|
|
788
|
-
onSelectShop:
|
|
820
|
+
onSelectShop: p = () => {
|
|
789
821
|
},
|
|
790
|
-
getImage:
|
|
822
|
+
getImage: S = () => {
|
|
791
823
|
},
|
|
792
|
-
campaignSingleText:
|
|
793
|
-
upcomingCampaignText:
|
|
794
|
-
salesCampaignTypes:
|
|
795
|
-
startsInPrefixTextPlural:
|
|
796
|
-
startsinSuffixTextPlural:
|
|
797
|
-
startsInPrefixTextSingular:
|
|
798
|
-
startsinSuffixTextSingular:
|
|
799
|
-
endsInPrefixTextPlural:
|
|
800
|
-
endsinSuffixTextPlural:
|
|
824
|
+
campaignSingleText: l,
|
|
825
|
+
upcomingCampaignText: f,
|
|
826
|
+
salesCampaignTypes: c = [],
|
|
827
|
+
startsInPrefixTextPlural: C,
|
|
828
|
+
startsinSuffixTextPlural: m,
|
|
829
|
+
startsInPrefixTextSingular: N,
|
|
830
|
+
startsinSuffixTextSingular: b,
|
|
831
|
+
endsInPrefixTextPlural: v,
|
|
832
|
+
endsinSuffixTextPlural: $,
|
|
801
833
|
endsInPrefixTextSingular: k,
|
|
802
|
-
endsinSuffixTextSingular:
|
|
803
|
-
endedText:
|
|
804
|
-
numOfSlides:
|
|
805
|
-
showNavigation:
|
|
834
|
+
endsinSuffixTextSingular: D,
|
|
835
|
+
endedText: d,
|
|
836
|
+
numOfSlides: u = 4,
|
|
837
|
+
showNavigation: g = !0,
|
|
806
838
|
numberOfListingsTextSingular: V,
|
|
807
839
|
numberOfListingsTextPlural: F,
|
|
808
840
|
itemlessImageUrl: A,
|
|
809
|
-
|
|
841
|
+
itemlessMaxHeight: H,
|
|
810
842
|
handleItemlessLink: q = () => {
|
|
811
843
|
},
|
|
812
|
-
componentName:
|
|
844
|
+
componentName: Y,
|
|
813
845
|
hasNextPage: j = !1,
|
|
814
|
-
handleFetchNextPage:
|
|
846
|
+
handleFetchNextPage: Z = () => {
|
|
815
847
|
},
|
|
816
|
-
LinkComponent:
|
|
817
|
-
},
|
|
818
|
-
const
|
|
848
|
+
LinkComponent: J
|
|
849
|
+
}, se) => {
|
|
850
|
+
const z = Ce(), K = Oe(() => {
|
|
819
851
|
let O = t == null ? void 0 : t.map((e, B) => /* @__PURE__ */ n(
|
|
820
852
|
gr,
|
|
821
853
|
{
|
|
822
|
-
className: "campaign-item"
|
|
823
|
-
coverPhoto:
|
|
854
|
+
className: `campaign-item ${(t == null ? void 0 : t.length) === 1 ? "horizontal-campaign-item" : ""}`,
|
|
855
|
+
coverPhoto: S(
|
|
824
856
|
e == null ? void 0 : e.coverPhoto,
|
|
825
857
|
(e == null ? void 0 : e.uuid) || (e == null ? void 0 : e.campaignUuid)
|
|
826
858
|
),
|
|
@@ -836,38 +868,39 @@ const Ye = S.a`
|
|
|
836
868
|
startDate: e == null ? void 0 : e.startDate,
|
|
837
869
|
title: e == null ? void 0 : e.name,
|
|
838
870
|
uuid: e == null ? void 0 : e.campaignUuid,
|
|
839
|
-
onSelectCard: (le,
|
|
840
|
-
onSelectShop: () =>
|
|
841
|
-
campaignSingleText:
|
|
842
|
-
upcomingCampaignText:
|
|
871
|
+
onSelectCard: (le, Q) => h(e == null ? void 0 : e.campaignUuid, e == null ? void 0 : e.shopUuid, Q),
|
|
872
|
+
onSelectShop: () => p(e == null ? void 0 : e.shopUuid),
|
|
873
|
+
campaignSingleText: l,
|
|
874
|
+
upcomingCampaignText: f,
|
|
843
875
|
upcoming: e == null ? void 0 : e.upcoming,
|
|
844
|
-
salesCampaignTypes:
|
|
845
|
-
startsInPrefixTextPlural:
|
|
846
|
-
startsinSuffixTextPlural:
|
|
847
|
-
startsInPrefixTextSingular:
|
|
848
|
-
startsinSuffixTextSingular:
|
|
849
|
-
endsInPrefixTextPlural:
|
|
850
|
-
endsinSuffixTextPlural:
|
|
876
|
+
salesCampaignTypes: c,
|
|
877
|
+
startsInPrefixTextPlural: C,
|
|
878
|
+
startsinSuffixTextPlural: m,
|
|
879
|
+
startsInPrefixTextSingular: N,
|
|
880
|
+
startsinSuffixTextSingular: b,
|
|
881
|
+
endsInPrefixTextPlural: v,
|
|
882
|
+
endsinSuffixTextPlural: $,
|
|
851
883
|
endsInPrefixTextSingular: k,
|
|
852
|
-
endsinSuffixTextSingular:
|
|
853
|
-
endedText:
|
|
884
|
+
endsinSuffixTextSingular: D,
|
|
885
|
+
endedText: d,
|
|
854
886
|
themeData: e == null ? void 0 : e.themeData,
|
|
855
887
|
numberOfListings: e == null ? void 0 : e.numberOfListings,
|
|
856
888
|
numberOfListingsTextSingular: V,
|
|
857
889
|
numberOfListingsTextPlural: F,
|
|
858
|
-
metadata: { name:
|
|
859
|
-
LinkComponent:
|
|
890
|
+
metadata: { name: Y, accessor: e == null ? void 0 : e.accessor },
|
|
891
|
+
LinkComponent: J,
|
|
860
892
|
sponsored: e == null ? void 0 : e.sponsored
|
|
861
893
|
},
|
|
862
894
|
`campaign__item__${B}__${e == null ? void 0 : e.startDate}___${e == null ? void 0 : e.endDate}`
|
|
863
895
|
));
|
|
864
|
-
return (t == null ? void 0 : t.length) < 4 && !
|
|
896
|
+
return (t == null ? void 0 : t.length) < 4 && !z ? [
|
|
865
897
|
...O,
|
|
866
898
|
/* @__PURE__ */ n(
|
|
867
|
-
|
|
899
|
+
sr,
|
|
868
900
|
{
|
|
869
901
|
imageUrl: A,
|
|
870
902
|
className: "campaign-item",
|
|
903
|
+
maxHeight: H,
|
|
871
904
|
handleClick: q
|
|
872
905
|
},
|
|
873
906
|
"itemless-campaign-section-banner"
|
|
@@ -877,21 +910,22 @@ const Ye = S.a`
|
|
|
877
910
|
return /* @__PURE__ */ n(
|
|
878
911
|
dr,
|
|
879
912
|
{
|
|
880
|
-
isLoading:
|
|
913
|
+
isLoading: s,
|
|
881
914
|
keyPrefix: "sales-campaign-skeleton",
|
|
882
915
|
children: /* @__PURE__ */ n(
|
|
883
916
|
or,
|
|
884
917
|
{
|
|
885
918
|
icon: a,
|
|
886
919
|
title: o,
|
|
887
|
-
numOfSlides:
|
|
920
|
+
numOfSlides: u,
|
|
888
921
|
tabletNumOfSlides: 2,
|
|
889
|
-
showNavigation:
|
|
922
|
+
showNavigation: g,
|
|
890
923
|
hasNextPage: j,
|
|
891
|
-
handleFetchNextPage:
|
|
892
|
-
|
|
924
|
+
handleFetchNextPage: Z,
|
|
925
|
+
className: (t == null ? void 0 : t.length) < 4 && !z ? "itemless" : "",
|
|
926
|
+
children: K
|
|
893
927
|
},
|
|
894
|
-
`sales-campaign-section__${
|
|
928
|
+
`sales-campaign-section__${z}`
|
|
895
929
|
)
|
|
896
930
|
}
|
|
897
931
|
);
|