@lanaco/lnc-react-ui 4.0.133 → 4.0.135
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/BannerSectionCarousel.cjs +157 -87
- package/dist/BannerSectionCarousel.js +510 -414
- package/dist/BlogCardsSponsoredSection.cjs +6 -4
- package/dist/BlogCardsSponsoredSection.js +11 -9
- package/dist/BlogListSection.cjs +3 -1
- package/dist/BlogListSection.js +15 -13
- package/dist/BlogsSectionDetailed.cjs +4 -4
- package/dist/BlogsSectionDetailed.js +2 -2
- package/dist/BlogsSectionSimple.cjs +2 -5
- package/dist/BlogsSectionSimple.js +2 -5
- 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/GiftCardsSection.cjs +1 -1
- package/dist/GiftCardsSection.js +1 -1
- package/dist/ProductsWithBannerSection.cjs +1 -1
- package/dist/ProductsWithBannerSection.js +1 -1
- package/dist/SalesCampaignsSection.cjs +29 -29
- package/dist/SalesCampaignsSection.js +261 -257
- package/dist/SimpleCategoriesSection.cjs +1 -1
- package/dist/SimpleCategoriesSection.js +1 -1
- package/dist/{style-XXDQBreL.js → style-DAn9Ifqe.js} +9 -7
- package/dist/{style-C_BRvopE.cjs → style-DaT7Beup.cjs} +7 -5
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as n, jsxs as g, Fragment as Te } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as z, useRef as ke, useEffect as K, Fragment as Ne, createElement as De, useState as U, Suspense as Ie, memo as Pe, useMemo as Me } from "react";
|
|
3
3
|
import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
-
import { a as O, k as
|
|
5
|
-
import { M as
|
|
4
|
+
import { a as O, k as J, l as ze, o as de } from "./utils-BPdU4_1q.js";
|
|
5
|
+
import { M as L } from "./consts-BuFChS64.js";
|
|
6
6
|
import { m as ge } from "./motion-Ckekul_K.js";
|
|
7
7
|
import { P as a } from "./index-CblbdqjE.js";
|
|
8
8
|
import me from "./Icon.js";
|
|
9
9
|
import { D as ae } from "./ShopAvatar-4-fCYGEc.js";
|
|
10
|
-
import
|
|
11
|
-
import { u as
|
|
10
|
+
import Le from "./Badge.js";
|
|
11
|
+
import { u as Q } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
12
12
|
import oe from "./IconButton.js";
|
|
13
13
|
import { u as he } from "./useDetectMobile-Bkvj0VMa.js";
|
|
14
|
-
const
|
|
14
|
+
const Ue = f.div`
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
display: flex;
|
|
17
17
|
gap: 1rem;
|
|
@@ -19,14 +19,14 @@ const ze = f.div`
|
|
|
19
19
|
border-radius: 20px;
|
|
20
20
|
border: 1px solid var(--gray-95008, #14161a14);
|
|
21
21
|
|
|
22
|
-
@media (max-width: ${
|
|
22
|
+
@media (max-width: ${L + "px"}) {
|
|
23
23
|
flex-direction: column;
|
|
24
24
|
padding: 0;
|
|
25
25
|
gap: 0;
|
|
26
26
|
border: none;
|
|
27
27
|
border-radius: 0;
|
|
28
28
|
}
|
|
29
|
-
`,
|
|
29
|
+
`, Oe = f.div`
|
|
30
30
|
border-radius: ${(e) => O(e.theme, "edged")};
|
|
31
31
|
height: 13.75rem;
|
|
32
32
|
width: 13.75rem;
|
|
@@ -50,12 +50,12 @@ const ze = f.div`
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
@media (max-width: ${
|
|
53
|
+
@media (max-width: ${L + "px"}) {
|
|
54
54
|
width: 100%;
|
|
55
55
|
max-width: 100dvh;
|
|
56
56
|
height: 23.438rem;
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`, Ee = f.div`
|
|
59
59
|
flex: 1;
|
|
60
60
|
display: flex;
|
|
61
61
|
flex-direction: column;
|
|
@@ -127,7 +127,7 @@ const ze = f.div`
|
|
|
127
127
|
background-color: transparent;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
@media (max-width: ${
|
|
130
|
+
@media (max-width: ${L + "px"}) {
|
|
131
131
|
padding: 1.25rem;
|
|
132
132
|
|
|
133
133
|
& .campaign-title {
|
|
@@ -141,13 +141,13 @@ const ze = f.div`
|
|
|
141
141
|
gap: 0.25rem;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
`, ie = (e = !1,
|
|
144
|
+
`, ie = (e = !1, t = !1, o = !1) => `
|
|
145
145
|
display: flex;
|
|
146
|
-
${
|
|
147
|
-
${
|
|
146
|
+
${t ? "flex-wrap: wrap;" : ""}
|
|
147
|
+
${t ? "" : "flex-wrap: nowrap;"}
|
|
148
148
|
${e ? "align-items: center;" : ""}
|
|
149
149
|
${o ? "justify-content: center;" : ""}
|
|
150
|
-
`,
|
|
150
|
+
`, je = f(ge.div)`
|
|
151
151
|
text-decoration: none;
|
|
152
152
|
${(e) => e.hasPermission === !0 && "cursor: pointer"};
|
|
153
153
|
|
|
@@ -218,13 +218,13 @@ const ze = f.div`
|
|
|
218
218
|
cursor: pointer;
|
|
219
219
|
background-color: var(--gray-95080, #14161acc);
|
|
220
220
|
}
|
|
221
|
-
`,
|
|
221
|
+
`, Re = f.div`
|
|
222
222
|
position: absolute;
|
|
223
223
|
top: 0.5rem;
|
|
224
224
|
${(e) => e.alignToLeft === !0 ? "left: 0.5rem;" : "right: 0.5rem;"}
|
|
225
225
|
display: flex;
|
|
226
226
|
gap: 0.25rem;
|
|
227
|
-
`,
|
|
227
|
+
`, Be = f.div`
|
|
228
228
|
border-radius: ${(e) => O(e.theme, e.borderRadius || "slight")};
|
|
229
229
|
background-color: ${(e) => e == null ? void 0 : e.color};
|
|
230
230
|
color: white;
|
|
@@ -240,62 +240,63 @@ const ze = f.div`
|
|
|
240
240
|
& i {
|
|
241
241
|
font-size: 0.813rem;
|
|
242
242
|
}
|
|
243
|
-
`,
|
|
244
|
-
const i =
|
|
245
|
-
return
|
|
246
|
-
var
|
|
247
|
-
const m = (
|
|
248
|
-
|
|
243
|
+
`, Fe = z(({ src: e, ...t }, o) => {
|
|
244
|
+
const i = ke();
|
|
245
|
+
return K(() => {
|
|
246
|
+
var c;
|
|
247
|
+
const m = (d) => {
|
|
248
|
+
d.target.src = ae, d.onerror = null;
|
|
249
249
|
};
|
|
250
|
-
return (
|
|
251
|
-
var
|
|
252
|
-
(
|
|
250
|
+
return (c = i == null ? void 0 : i.current) == null || c.addEventListener("error", m), () => {
|
|
251
|
+
var d;
|
|
252
|
+
(d = i == null ? void 0 : i.current) == null || d.removeEventListener("error", m);
|
|
253
253
|
};
|
|
254
|
-
}, []), /* @__PURE__ */
|
|
254
|
+
}, []), /* @__PURE__ */ n(Ne, { ref: o, children: J(e) ? /* @__PURE__ */ n("img", { ref: i, src: e, ...t }) : /* @__PURE__ */ n("img", { src: ae, ...t }) });
|
|
255
255
|
}), ue = (e) => {
|
|
256
256
|
const {
|
|
257
|
-
uuid:
|
|
257
|
+
uuid: t,
|
|
258
258
|
hasPermission: o = !0,
|
|
259
259
|
isUser: i,
|
|
260
260
|
image: m,
|
|
261
|
+
imageComponent: c,
|
|
261
262
|
name: d,
|
|
262
|
-
notifications:
|
|
263
|
-
color:
|
|
264
|
-
size:
|
|
265
|
-
style:
|
|
266
|
-
disabled:
|
|
263
|
+
notifications: l = 0,
|
|
264
|
+
color: h = "primary",
|
|
265
|
+
size: u = "large",
|
|
266
|
+
style: N,
|
|
267
|
+
disabled: $,
|
|
267
268
|
onClick: b = () => {
|
|
268
269
|
},
|
|
269
|
-
isActive:
|
|
270
|
-
className:
|
|
271
|
-
shopCategory:
|
|
270
|
+
isActive: _,
|
|
271
|
+
className: C,
|
|
272
|
+
shopCategory: y,
|
|
272
273
|
// new
|
|
273
|
-
themeData:
|
|
274
|
-
} = e,
|
|
275
|
-
theme:
|
|
276
|
-
color:
|
|
277
|
-
size:
|
|
278
|
-
style:
|
|
279
|
-
disabled:
|
|
274
|
+
themeData: v
|
|
275
|
+
} = e, D = {
|
|
276
|
+
theme: Q(),
|
|
277
|
+
color: h,
|
|
278
|
+
size: u,
|
|
279
|
+
style: N,
|
|
280
|
+
disabled: $
|
|
280
281
|
};
|
|
281
|
-
return /* @__PURE__ */
|
|
282
|
-
|
|
282
|
+
return /* @__PURE__ */ De(
|
|
283
|
+
je,
|
|
283
284
|
{
|
|
284
|
-
onClick: (
|
|
285
|
-
|
|
285
|
+
onClick: (T) => {
|
|
286
|
+
T.stopPropagation(), o === !0 && (b == null || b());
|
|
286
287
|
},
|
|
287
|
-
...
|
|
288
|
+
...D,
|
|
288
289
|
key: d,
|
|
289
|
-
className: `profile-item ${
|
|
290
|
+
className: `profile-item ${C}`,
|
|
290
291
|
hasPermission: o,
|
|
291
|
-
isActive:
|
|
292
|
-
themeColor: (
|
|
292
|
+
isActive: _,
|
|
293
|
+
themeColor: (v == null ? void 0 : v.code) || "transparent"
|
|
293
294
|
},
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ n("div", { className: "logo-wrapper", children: ze(c) ? c : m }),
|
|
295
296
|
/* @__PURE__ */ g("div", { children: [
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
!i && /* @__PURE__ */
|
|
298
|
-
|
|
297
|
+
/* @__PURE__ */ n("div", { className: "name", children: d }),
|
|
298
|
+
!i && /* @__PURE__ */ n("div", { className: "description", children: y }),
|
|
299
|
+
l > 0 && /* @__PURE__ */ n("div", { className: "notifications-number", children: /* @__PURE__ */ n(Le, { className: "badge", color: "danger", size: "small", children: l > 99 ? "99+" : l }) })
|
|
299
300
|
] })
|
|
300
301
|
);
|
|
301
302
|
};
|
|
@@ -321,162 +322,164 @@ ue.propTypes = {
|
|
|
321
322
|
onSelect: a.func,
|
|
322
323
|
hasPermission: a.bool
|
|
323
324
|
};
|
|
324
|
-
const se = (e,
|
|
325
|
-
if (!e || !
|
|
326
|
-
const o = e.getTime() -
|
|
325
|
+
const se = (e, t) => {
|
|
326
|
+
if (!e || !t) return null;
|
|
327
|
+
const o = e.getTime() - t.getTime(), i = 24 * 60 * 60 * 1e3;
|
|
327
328
|
return o >= 0 ? Math.ceil(o / i) : Math.floor(o / i);
|
|
328
329
|
}, le = (e) => {
|
|
329
330
|
if (e !== void 0) {
|
|
330
|
-
const
|
|
331
|
-
return `${String(
|
|
331
|
+
const t = new Date(e), o = t.getFullYear(), i = t.getMonth() + 1;
|
|
332
|
+
return `${String(t.getDate()).padStart(2)}. ${i}. ${o}.`;
|
|
332
333
|
}
|
|
333
|
-
}, fe =
|
|
334
|
-
var
|
|
335
|
-
const o =
|
|
334
|
+
}, fe = z((e, t) => {
|
|
335
|
+
var te;
|
|
336
|
+
const o = Q(), {
|
|
336
337
|
// uuid,
|
|
337
338
|
shopUuid: i,
|
|
338
339
|
title: m = "",
|
|
339
340
|
// description,
|
|
340
341
|
// badges,
|
|
341
|
-
coverPhoto:
|
|
342
|
-
onSelect:
|
|
342
|
+
coverPhoto: c,
|
|
343
|
+
onSelect: d,
|
|
343
344
|
// status,
|
|
344
345
|
startDate: l,
|
|
345
346
|
endDate: h,
|
|
346
347
|
salesPackages: u,
|
|
347
|
-
shopName:
|
|
348
|
-
shopCategory:
|
|
349
|
-
shopImage:
|
|
350
|
-
|
|
351
|
-
|
|
348
|
+
shopName: N,
|
|
349
|
+
shopCategory: $,
|
|
350
|
+
shopImage: b,
|
|
351
|
+
shopImageComponent: _,
|
|
352
|
+
className: C,
|
|
353
|
+
onSelectCard: y = () => {
|
|
352
354
|
},
|
|
353
|
-
onSelectShop:
|
|
355
|
+
onSelectShop: v = () => {
|
|
354
356
|
},
|
|
355
|
-
upcoming:
|
|
356
|
-
upcomingCampaignText:
|
|
357
|
-
campaignSingleText:
|
|
358
|
-
salesCampaignTypes:
|
|
359
|
-
startsInPrefixTextPlural:
|
|
360
|
-
startsinSuffixTextPlural:
|
|
361
|
-
startsInPrefixTextSingular:
|
|
362
|
-
startsinSuffixTextSingular:
|
|
363
|
-
endsInPrefixTextPlural:
|
|
364
|
-
endsinSuffixTextPlural:
|
|
365
|
-
endsInPrefixTextSingular:
|
|
366
|
-
endsinSuffixTextSingular:
|
|
367
|
-
themeData:
|
|
368
|
-
numberOfListings:
|
|
369
|
-
numberOfListingsTextSingular:
|
|
370
|
-
numberOfListingsTextPlural:
|
|
371
|
-
...
|
|
372
|
-
} = e, ee = l ? new Date(l) <= /* @__PURE__ */ new Date() : !1,
|
|
357
|
+
upcoming: S = !1,
|
|
358
|
+
upcomingCampaignText: D,
|
|
359
|
+
campaignSingleText: T,
|
|
360
|
+
salesCampaignTypes: x = [],
|
|
361
|
+
startsInPrefixTextPlural: E,
|
|
362
|
+
startsinSuffixTextPlural: j,
|
|
363
|
+
startsInPrefixTextSingular: R,
|
|
364
|
+
startsinSuffixTextSingular: s,
|
|
365
|
+
endsInPrefixTextPlural: p,
|
|
366
|
+
endsinSuffixTextPlural: H,
|
|
367
|
+
endsInPrefixTextSingular: G,
|
|
368
|
+
endsinSuffixTextSingular: B,
|
|
369
|
+
themeData: Y,
|
|
370
|
+
numberOfListings: P,
|
|
371
|
+
numberOfListingsTextSingular: r,
|
|
372
|
+
numberOfListingsTextPlural: Z,
|
|
373
|
+
...we
|
|
374
|
+
} = e, ee = l ? new Date(l) <= /* @__PURE__ */ new Date() : !1, ve = se(
|
|
373
375
|
l ? new Date(l) : null,
|
|
374
376
|
/* @__PURE__ */ new Date()
|
|
375
|
-
),
|
|
377
|
+
), F = se(
|
|
376
378
|
h ? new Date(h) : null,
|
|
377
379
|
/* @__PURE__ */ new Date()
|
|
378
|
-
),
|
|
380
|
+
), be = F !== null && F <= 2 && F > 0, re = h ? new Date(h).getTime() : null, ye = Date.now(), q = re !== null ? re - ye : null, W = q !== null && q > 0 && q < 24 * 60 * 60 * 1e3, ne = (k, V, w, M, I) => w === 1 ? `${k} ${w} ${M}` : `${V} ${w} ${I}`, $e = () => {
|
|
379
381
|
if (!h) return null;
|
|
380
|
-
const
|
|
381
|
-
if (
|
|
382
|
-
const
|
|
383
|
-
return { hours:
|
|
384
|
-
}, [
|
|
385
|
-
|
|
386
|
-
if (!
|
|
387
|
-
const
|
|
388
|
-
|
|
382
|
+
const k = _e, w = new Date(h).getTime() - k.getTime();
|
|
383
|
+
if (w <= 0) return null;
|
|
384
|
+
const M = Math.floor(w / (1e3 * 60 * 60)), I = Math.floor(w % (1e3 * 60 * 60) / (1e3 * 60)), Se = Math.floor(w % (1e3 * 60) / 1e3);
|
|
385
|
+
return { hours: M, minutes: I, seconds: Se };
|
|
386
|
+
}, [_e, Ce] = U(/* @__PURE__ */ new Date());
|
|
387
|
+
K(() => {
|
|
388
|
+
if (!W) return;
|
|
389
|
+
const k = setInterval(() => {
|
|
390
|
+
Ce(/* @__PURE__ */ new Date());
|
|
389
391
|
}, 1e3);
|
|
390
|
-
return () => clearInterval(
|
|
391
|
-
}, [
|
|
392
|
-
const
|
|
392
|
+
return () => clearInterval(k);
|
|
393
|
+
}, [W]);
|
|
394
|
+
const A = W ? $e() : null;
|
|
393
395
|
return /* @__PURE__ */ g(
|
|
394
|
-
|
|
396
|
+
Ue,
|
|
395
397
|
{
|
|
396
|
-
ref:
|
|
398
|
+
ref: t,
|
|
397
399
|
theme: o,
|
|
398
|
-
className:
|
|
399
|
-
onClick:
|
|
400
|
-
...
|
|
400
|
+
className: C,
|
|
401
|
+
onClick: y,
|
|
402
|
+
...we,
|
|
401
403
|
children: [
|
|
402
|
-
/* @__PURE__ */ g(
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
var
|
|
406
|
-
return /* @__PURE__ */
|
|
407
|
-
|
|
404
|
+
/* @__PURE__ */ g(Oe, { theme: o, onClick: () => d == null ? void 0 : d(), children: [
|
|
405
|
+
/* @__PURE__ */ n("img", { src: c }),
|
|
406
|
+
/* @__PURE__ */ n(Re, { children: u == null ? void 0 : u.map((k, V) => {
|
|
407
|
+
var w, M;
|
|
408
|
+
return /* @__PURE__ */ n(
|
|
409
|
+
Be,
|
|
408
410
|
{
|
|
409
|
-
color: (
|
|
411
|
+
color: (w = x == null ? void 0 : x.find((I) => I.value === k)) == null ? void 0 : w.color,
|
|
410
412
|
theme: o,
|
|
411
|
-
children: /* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ n(
|
|
412
414
|
me,
|
|
413
415
|
{
|
|
414
|
-
icon: (
|
|
416
|
+
icon: (M = x == null ? void 0 : x.find((I) => I.value === k)) == null ? void 0 : M.icon
|
|
415
417
|
}
|
|
416
418
|
)
|
|
417
419
|
},
|
|
418
|
-
`package__${
|
|
420
|
+
`package__${V}`
|
|
419
421
|
);
|
|
420
422
|
}) })
|
|
421
423
|
] }),
|
|
422
|
-
/* @__PURE__ */ g(
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ g(Ee, { theme: o, children: [
|
|
425
|
+
/* @__PURE__ */ n("div", { className: "text-block-wrapper", children: /* @__PURE__ */ g("div", { className: "title-block-wrapper", children: [
|
|
426
|
+
/* @__PURE__ */ n("div", { className: "campaign-title", children: (te = S ? D : T) == null ? void 0 : te.toUpperCase() }),
|
|
427
|
+
/* @__PURE__ */ n("div", { className: "campaign-title-text", children: m }),
|
|
426
428
|
h && l && /* @__PURE__ */ g("div", { children: [
|
|
427
429
|
le(l),
|
|
428
430
|
" - ",
|
|
429
431
|
le(h)
|
|
430
432
|
] }),
|
|
431
433
|
/* @__PURE__ */ g("div", { className: "timestamp-text", children: [
|
|
432
|
-
|
|
433
|
-
|
|
434
|
+
P > 0 && /* @__PURE__ */ g("span", { className: "listings-text", children: [
|
|
435
|
+
P,
|
|
434
436
|
" ",
|
|
435
|
-
|
|
437
|
+
P === 1 ? r : Z,
|
|
436
438
|
" ",
|
|
437
439
|
"∙",
|
|
438
440
|
" "
|
|
439
441
|
] }),
|
|
440
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ n(
|
|
441
443
|
"span",
|
|
442
444
|
{
|
|
443
|
-
className: `duration-text ${
|
|
444
|
-
children:
|
|
445
|
-
|
|
445
|
+
className: `duration-text ${be ? "urgent" : ""} ${ee ? "" : "starts-in"}`,
|
|
446
|
+
children: W && A ? /* @__PURE__ */ g("div", { className: "countdown-timer", children: [
|
|
447
|
+
G,
|
|
446
448
|
" ",
|
|
447
|
-
|
|
449
|
+
A.hours.toString().padStart(2, "0"),
|
|
448
450
|
":",
|
|
449
|
-
|
|
451
|
+
A.minutes.toString().padStart(2, "0"),
|
|
450
452
|
":",
|
|
451
|
-
|
|
452
|
-
] }) : ee ?
|
|
453
|
+
A.seconds.toString().padStart(2, "0")
|
|
454
|
+
] }) : ee ? ne(
|
|
455
|
+
G,
|
|
456
|
+
p,
|
|
457
|
+
F,
|
|
453
458
|
B,
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
Q,
|
|
457
|
-
p
|
|
458
|
-
) : te(
|
|
459
|
-
j,
|
|
460
|
-
I,
|
|
461
|
-
we,
|
|
459
|
+
H
|
|
460
|
+
) : ne(
|
|
462
461
|
R,
|
|
463
|
-
E
|
|
462
|
+
E,
|
|
463
|
+
ve,
|
|
464
|
+
s,
|
|
465
|
+
j
|
|
464
466
|
)
|
|
465
467
|
}
|
|
466
468
|
)
|
|
467
469
|
] })
|
|
468
470
|
] }) }),
|
|
469
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ n(
|
|
470
472
|
ue,
|
|
471
473
|
{
|
|
472
474
|
hasPermission: !0,
|
|
473
|
-
image: /* @__PURE__ */
|
|
474
|
-
|
|
475
|
+
image: /* @__PURE__ */ n(Fe, { src: b }),
|
|
476
|
+
imageComponent: _,
|
|
477
|
+
themeData: Y,
|
|
475
478
|
isActive: !0,
|
|
476
479
|
isUser: !1,
|
|
477
|
-
name:
|
|
478
|
-
shopCategory:
|
|
479
|
-
onClick: () =>
|
|
480
|
+
name: N,
|
|
481
|
+
shopCategory: $,
|
|
482
|
+
onClick: () => v(i)
|
|
480
483
|
}
|
|
481
484
|
)
|
|
482
485
|
] })
|
|
@@ -521,7 +524,7 @@ f.div`
|
|
|
521
524
|
}
|
|
522
525
|
}
|
|
523
526
|
|
|
524
|
-
@media (max-width: ${
|
|
527
|
+
@media (max-width: ${L + "px"}) {
|
|
525
528
|
& .campaign-item {
|
|
526
529
|
min-width: 100%;
|
|
527
530
|
width: 100%;
|
|
@@ -529,13 +532,13 @@ f.div`
|
|
|
529
532
|
}
|
|
530
533
|
}
|
|
531
534
|
`;
|
|
532
|
-
const
|
|
535
|
+
const X = f.div`
|
|
533
536
|
width: ${(e) => e.width || "100%"};
|
|
534
537
|
height: ${(e) => (e.heightCoeff || 1) * 1.125}rem;
|
|
535
538
|
background-color: var(--gray-200, #dddfe4);
|
|
536
539
|
|
|
537
540
|
${de("-90deg")}
|
|
538
|
-
`,
|
|
541
|
+
`, We = f.div`
|
|
539
542
|
display: flex;
|
|
540
543
|
flex-direction: ${(e) => e != null && e.row ? "row" : "column"};
|
|
541
544
|
gap: ${(e) => (e == null ? void 0 : e.gap) ?? "0.5rem"};
|
|
@@ -551,7 +554,7 @@ const G = f.div`
|
|
|
551
554
|
flex-shrink: 0;
|
|
552
555
|
|
|
553
556
|
${de()}
|
|
554
|
-
`,
|
|
557
|
+
`, Ae = f.div`
|
|
555
558
|
background: var(--white, #fff);
|
|
556
559
|
border-radius: ${(e) => O(e.theme, "edged")};
|
|
557
560
|
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
|
|
@@ -580,59 +583,59 @@ const G = f.div`
|
|
|
580
583
|
gap: 0.5rem;
|
|
581
584
|
}
|
|
582
585
|
|
|
583
|
-
@media (max-width: ${
|
|
586
|
+
@media (max-width: ${L + "px"}) {
|
|
584
587
|
flex-direction: column;
|
|
585
588
|
|
|
586
589
|
& .campaign__user {
|
|
587
590
|
margin-top: 1rem;
|
|
588
591
|
}
|
|
589
592
|
}
|
|
590
|
-
`,
|
|
593
|
+
`, Ve = f.div`
|
|
591
594
|
display: flex;
|
|
592
595
|
gap: 1.5rem;
|
|
593
|
-
`,
|
|
594
|
-
const
|
|
595
|
-
return /* @__PURE__ */ g(
|
|
596
|
-
/* @__PURE__ */
|
|
596
|
+
`, Xe = z(({}, e) => {
|
|
597
|
+
const t = Q();
|
|
598
|
+
return /* @__PURE__ */ g(Ae, { ref: e, theme: t, children: [
|
|
599
|
+
/* @__PURE__ */ n("div", { className: "campaign__left-section", children: /* @__PURE__ */ n(
|
|
597
600
|
ce,
|
|
598
601
|
{
|
|
599
|
-
theme:
|
|
602
|
+
theme: t,
|
|
600
603
|
width: "15rem",
|
|
601
604
|
height: "15rem",
|
|
602
605
|
borderRadius: "edged"
|
|
603
606
|
}
|
|
604
607
|
) }),
|
|
605
608
|
/* @__PURE__ */ g("div", { className: "campaign__right-section", children: [
|
|
606
|
-
/* @__PURE__ */ g(
|
|
607
|
-
/* @__PURE__ */
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ g(We, { theme: t, children: [
|
|
610
|
+
/* @__PURE__ */ n(X, { heightCoeff: 0.75, theme: t, width: "35%" }),
|
|
611
|
+
/* @__PURE__ */ n(X, { heightCoeff: 1.25, theme: t }),
|
|
612
|
+
/* @__PURE__ */ n(X, { heightCoeff: 3, theme: t })
|
|
610
613
|
] }),
|
|
611
614
|
/* @__PURE__ */ g("div", { className: "campaign__user", children: [
|
|
612
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ n(
|
|
613
616
|
ce,
|
|
614
617
|
{
|
|
615
|
-
theme:
|
|
618
|
+
theme: t,
|
|
616
619
|
width: "2.5rem",
|
|
617
620
|
height: "2.5rem",
|
|
618
621
|
borderRadius: "curved"
|
|
619
622
|
}
|
|
620
623
|
),
|
|
621
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ n(X, { theme: t, width: "75%" })
|
|
622
625
|
] })
|
|
623
626
|
] })
|
|
624
627
|
] });
|
|
625
|
-
}),
|
|
626
|
-
|
|
628
|
+
}), He = ({ itemsCount: e = 5, keyPrefix: t }) => /* @__PURE__ */ n(Ve, { children: Array.from({ length: e }, (o, i) => /* @__PURE__ */ n(
|
|
629
|
+
Xe,
|
|
627
630
|
{},
|
|
628
|
-
`${
|
|
629
|
-
)) }),
|
|
631
|
+
`${t}-skeleton-campaign-card-${i}`
|
|
632
|
+
)) }), Ge = ({
|
|
630
633
|
children: e,
|
|
631
|
-
fallbackComponent:
|
|
634
|
+
fallbackComponent: t = /* @__PURE__ */ n(Te, {}),
|
|
632
635
|
isLoading: o = !1,
|
|
633
636
|
itemsCount: i = 5,
|
|
634
637
|
keyPrefix: m
|
|
635
|
-
}) => /* @__PURE__ */
|
|
638
|
+
}) => /* @__PURE__ */ n(Ie, { fallback: t, children: o === !0 ? /* @__PURE__ */ n(He, { itemsCount: i, keyPrefix: m }) : e }), Ye = f.div`
|
|
636
639
|
margin: 0 auto;
|
|
637
640
|
display: flex;
|
|
638
641
|
flex-direction: column;
|
|
@@ -673,56 +676,56 @@ const G = f.div`
|
|
|
673
676
|
top: 0;
|
|
674
677
|
right: 0;
|
|
675
678
|
}
|
|
676
|
-
`,
|
|
679
|
+
`, Ze = f(ge.div)`
|
|
677
680
|
display: grid;
|
|
678
681
|
grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumns}, 1fr);
|
|
679
682
|
gap: 1.5rem;
|
|
680
683
|
width: 100%;
|
|
681
684
|
|
|
682
|
-
@media (max-width: ${
|
|
685
|
+
@media (max-width: ${L + "px"}) {
|
|
683
686
|
grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumnsForMobile}, 1fr);
|
|
684
687
|
}
|
|
685
|
-
`, pe =
|
|
688
|
+
`, pe = z(
|
|
686
689
|
({
|
|
687
690
|
icon: e,
|
|
688
|
-
title:
|
|
691
|
+
title: t,
|
|
689
692
|
numOfSlides: o = 2,
|
|
690
693
|
numOfSlidesForMobile: i = 1,
|
|
691
694
|
showNavigation: m = !0,
|
|
692
|
-
children:
|
|
693
|
-
},
|
|
694
|
-
const [l, h] = U(0), [u,
|
|
695
|
-
|
|
695
|
+
children: c
|
|
696
|
+
}, d) => {
|
|
697
|
+
const [l, h] = U(0), [u, N] = U(1), [$, b] = U(null), [_, C] = U(null), y = he(), v = 50, S = (c == null ? void 0 : c.length) ?? 1;
|
|
698
|
+
K(() => {
|
|
696
699
|
const s = () => {
|
|
697
|
-
|
|
700
|
+
N(y ? i : o);
|
|
698
701
|
};
|
|
699
702
|
return window.addEventListener("resize", s), s(), () => window.removeEventListener("resize", s);
|
|
700
703
|
}, []);
|
|
701
|
-
const
|
|
704
|
+
const D = c == null ? void 0 : c.slice(l, l + u), T = (s) => {
|
|
702
705
|
var p;
|
|
703
|
-
(p = s == null ? void 0 : s.target) == null || p.blur(), l + u <
|
|
704
|
-
},
|
|
706
|
+
(p = s == null ? void 0 : s.target) == null || p.blur(), l + u < S && h(l + u);
|
|
707
|
+
}, x = (s) => {
|
|
705
708
|
var p;
|
|
706
709
|
(p = s == null ? void 0 : s.target) == null || p.blur(), l - u >= 0 && h(l - u);
|
|
707
710
|
};
|
|
708
711
|
return /* @__PURE__ */ g(
|
|
709
|
-
|
|
712
|
+
Ye,
|
|
710
713
|
{
|
|
711
|
-
ref:
|
|
712
|
-
...
|
|
714
|
+
ref: d,
|
|
715
|
+
...y ? { onTouchStart: (s) => {
|
|
713
716
|
var p;
|
|
714
|
-
|
|
717
|
+
C(null), b((p = s == null ? void 0 : s.targetTouches["0"]) == null ? void 0 : p.clientX);
|
|
715
718
|
}, onTouchMove: (s) => {
|
|
716
719
|
var p;
|
|
717
|
-
|
|
720
|
+
C((p = s == null ? void 0 : s.targetTouches["0"]) == null ? void 0 : p.clientX);
|
|
718
721
|
}, onTouchEnd: () => {
|
|
719
|
-
if (
|
|
720
|
-
const s =
|
|
721
|
-
s >
|
|
722
|
+
if (!$ || !_) return;
|
|
723
|
+
const s = $ - _;
|
|
724
|
+
s > v && T(), s < -v && x();
|
|
722
725
|
} } : {},
|
|
723
726
|
children: [
|
|
724
|
-
/* @__PURE__ */
|
|
725
|
-
|
|
727
|
+
/* @__PURE__ */ n("div", { className: "scrollable-section__header", children: /* @__PURE__ */ g("div", { className: "scrollable-section__title", children: [
|
|
728
|
+
J(e) && /* @__PURE__ */ n(
|
|
726
729
|
me,
|
|
727
730
|
{
|
|
728
731
|
icon: e,
|
|
@@ -731,10 +734,10 @@ const G = f.div`
|
|
|
731
734
|
className: "title__icon"
|
|
732
735
|
}
|
|
733
736
|
),
|
|
734
|
-
|
|
737
|
+
J(t) && /* @__PURE__ */ n("div", { className: "title__text", children: t })
|
|
735
738
|
] }) }),
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
|
|
739
|
+
/* @__PURE__ */ n(
|
|
740
|
+
Ze,
|
|
738
741
|
{
|
|
739
742
|
numOfColumns: o,
|
|
740
743
|
numOfColumnsForMobile: i,
|
|
@@ -746,12 +749,12 @@ const G = f.div`
|
|
|
746
749
|
x: 10,
|
|
747
750
|
opacity: 0
|
|
748
751
|
},
|
|
749
|
-
children:
|
|
752
|
+
children: D
|
|
750
753
|
},
|
|
751
754
|
`scrollable-section__content-${l}`
|
|
752
755
|
),
|
|
753
|
-
m &&
|
|
754
|
-
/* @__PURE__ */
|
|
756
|
+
m && S > u && !y && /* @__PURE__ */ g("div", { className: "scrollable-section__navigation", children: [
|
|
757
|
+
/* @__PURE__ */ n(
|
|
755
758
|
oe,
|
|
756
759
|
{
|
|
757
760
|
icon: "angle-left",
|
|
@@ -760,10 +763,10 @@ const G = f.div`
|
|
|
760
763
|
color: "neutral",
|
|
761
764
|
className: "navigation__arrow",
|
|
762
765
|
disabled: l === 0,
|
|
763
|
-
onClick:
|
|
766
|
+
onClick: x
|
|
764
767
|
}
|
|
765
768
|
),
|
|
766
|
-
/* @__PURE__ */
|
|
769
|
+
/* @__PURE__ */ n(
|
|
767
770
|
oe,
|
|
768
771
|
{
|
|
769
772
|
icon: "angle-right",
|
|
@@ -771,8 +774,8 @@ const G = f.div`
|
|
|
771
774
|
btnType: "tinted",
|
|
772
775
|
color: "neutral",
|
|
773
776
|
className: "navigation__arrow",
|
|
774
|
-
disabled: l + u >=
|
|
775
|
-
onClick:
|
|
777
|
+
disabled: l + u >= S,
|
|
778
|
+
onClick: T
|
|
776
779
|
}
|
|
777
780
|
)
|
|
778
781
|
] })
|
|
@@ -788,7 +791,7 @@ pe.propTypes = {
|
|
|
788
791
|
numOfSlidesForMobile: a.number,
|
|
789
792
|
showNavigation: a.bool
|
|
790
793
|
};
|
|
791
|
-
const
|
|
794
|
+
const qe = f.div`
|
|
792
795
|
display: flex;
|
|
793
796
|
flex: 1;
|
|
794
797
|
width: 100%;
|
|
@@ -805,21 +808,21 @@ const Ye = f.div`
|
|
|
805
808
|
border-radius: 1.25rem;
|
|
806
809
|
object-fit: cover;
|
|
807
810
|
}
|
|
808
|
-
`, xe =
|
|
811
|
+
`, xe = z(
|
|
809
812
|
({
|
|
810
813
|
sectionName: e,
|
|
811
|
-
imageUrl:
|
|
814
|
+
imageUrl: t,
|
|
812
815
|
maxHeight: o = "16.25rem",
|
|
813
816
|
className: i = "",
|
|
814
817
|
handleClick: m = () => {
|
|
815
818
|
}
|
|
816
|
-
}) => /* @__PURE__ */
|
|
817
|
-
|
|
819
|
+
}) => /* @__PURE__ */ n(
|
|
820
|
+
qe,
|
|
818
821
|
{
|
|
819
822
|
maxHeight: o,
|
|
820
823
|
onClick: m,
|
|
821
824
|
className: `itemless-banner ${i}`,
|
|
822
|
-
children: /* @__PURE__ */
|
|
825
|
+
children: /* @__PURE__ */ n("img", { src: t, alt: `itemless-banner__${e}` })
|
|
823
826
|
}
|
|
824
827
|
)
|
|
825
828
|
);
|
|
@@ -830,43 +833,43 @@ xe.propTypes = {
|
|
|
830
833
|
className: a.string,
|
|
831
834
|
handleClick: a.func
|
|
832
835
|
};
|
|
833
|
-
const
|
|
836
|
+
const Je = Pe(fe), gr = z(
|
|
834
837
|
({
|
|
835
838
|
sellerType: e = "Shop",
|
|
836
|
-
items:
|
|
839
|
+
items: t = [],
|
|
837
840
|
title: o,
|
|
838
841
|
icon: i,
|
|
839
842
|
isLoading: m,
|
|
840
|
-
onSelectCard:
|
|
843
|
+
onSelectCard: c = () => {
|
|
841
844
|
},
|
|
842
|
-
onSelectShop:
|
|
845
|
+
onSelectShop: d = () => {
|
|
843
846
|
},
|
|
844
847
|
getImage: l = () => {
|
|
845
848
|
},
|
|
846
849
|
campaignSingleText: h,
|
|
847
850
|
upcomingCampaignText: u,
|
|
848
|
-
salesCampaignTypes:
|
|
849
|
-
startsInPrefixTextPlural:
|
|
850
|
-
startsinSuffixTextPlural:
|
|
851
|
-
startsInPrefixTextSingular:
|
|
852
|
-
startsinSuffixTextSingular:
|
|
853
|
-
endsInPrefixTextPlural:
|
|
854
|
-
endsinSuffixTextPlural:
|
|
855
|
-
endsInPrefixTextSingular:
|
|
856
|
-
endsinSuffixTextSingular:
|
|
857
|
-
numOfSlides:
|
|
858
|
-
numOfSlidesForMobile:
|
|
851
|
+
salesCampaignTypes: N = [],
|
|
852
|
+
startsInPrefixTextPlural: $,
|
|
853
|
+
startsinSuffixTextPlural: b,
|
|
854
|
+
startsInPrefixTextSingular: _,
|
|
855
|
+
startsinSuffixTextSingular: C,
|
|
856
|
+
endsInPrefixTextPlural: y,
|
|
857
|
+
endsinSuffixTextPlural: v,
|
|
858
|
+
endsInPrefixTextSingular: S,
|
|
859
|
+
endsinSuffixTextSingular: D,
|
|
860
|
+
numOfSlides: T = 2,
|
|
861
|
+
numOfSlidesForMobile: x = 1,
|
|
859
862
|
showNavigation: E = !0,
|
|
860
863
|
numberOfListingsTextSingular: j,
|
|
861
864
|
numberOfListingsTextPlural: R,
|
|
862
865
|
itemlessImageUrl: s,
|
|
863
866
|
itemlessLink: p,
|
|
864
|
-
handleItemlessLink:
|
|
867
|
+
handleItemlessLink: H = () => {
|
|
865
868
|
}
|
|
866
|
-
},
|
|
867
|
-
const
|
|
868
|
-
let
|
|
869
|
-
|
|
869
|
+
}, G) => {
|
|
870
|
+
const B = he(), Y = Me(() => {
|
|
871
|
+
let P = t == null ? void 0 : t.map((r, Z) => /* @__PURE__ */ n(
|
|
872
|
+
Je,
|
|
870
873
|
{
|
|
871
874
|
className: "campaign-item",
|
|
872
875
|
coverPhoto: l(
|
|
@@ -878,60 +881,61 @@ const Ze = Ie(fe), cr = M(
|
|
|
878
881
|
salesPackages: r == null ? void 0 : r.salesPackages,
|
|
879
882
|
sellerType: e,
|
|
880
883
|
shopImage: r == null ? void 0 : r.profileImage,
|
|
884
|
+
shopImageComponent: r == null ? void 0 : r.profileImageComponent,
|
|
881
885
|
shopName: r == null ? void 0 : r.shopName,
|
|
882
886
|
shopUuid: r == null ? void 0 : r.shopUuid,
|
|
883
887
|
shopCategory: r == null ? void 0 : r.shopCategory,
|
|
884
888
|
startDate: r == null ? void 0 : r.startDate,
|
|
885
889
|
title: r == null ? void 0 : r.name,
|
|
886
890
|
uuid: r == null ? void 0 : r.campaignUuid,
|
|
887
|
-
onSelectCard: () =>
|
|
888
|
-
onSelectShop: () =>
|
|
891
|
+
onSelectCard: () => c(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
|
|
892
|
+
onSelectShop: () => d(r == null ? void 0 : r.shopUuid),
|
|
889
893
|
campaignSingleText: h,
|
|
890
894
|
upcomingCampaignText: u,
|
|
891
895
|
upcoming: r == null ? void 0 : r.upcoming,
|
|
892
|
-
salesCampaignTypes:
|
|
893
|
-
startsInPrefixTextPlural:
|
|
894
|
-
startsinSuffixTextPlural:
|
|
895
|
-
startsInPrefixTextSingular:
|
|
896
|
-
startsinSuffixTextSingular:
|
|
897
|
-
endsInPrefixTextPlural:
|
|
898
|
-
endsinSuffixTextPlural:
|
|
899
|
-
endsInPrefixTextSingular:
|
|
900
|
-
endsinSuffixTextSingular:
|
|
896
|
+
salesCampaignTypes: N,
|
|
897
|
+
startsInPrefixTextPlural: $,
|
|
898
|
+
startsinSuffixTextPlural: b,
|
|
899
|
+
startsInPrefixTextSingular: _,
|
|
900
|
+
startsinSuffixTextSingular: C,
|
|
901
|
+
endsInPrefixTextPlural: y,
|
|
902
|
+
endsinSuffixTextPlural: v,
|
|
903
|
+
endsInPrefixTextSingular: S,
|
|
904
|
+
endsinSuffixTextSingular: D,
|
|
901
905
|
themeData: r == null ? void 0 : r.themeData,
|
|
902
906
|
numberOfListings: r == null ? void 0 : r.numberOfListings,
|
|
903
907
|
numberOfListingsTextSingular: j,
|
|
904
908
|
numberOfListingsTextPlural: R
|
|
905
909
|
},
|
|
906
|
-
`campaign__item__${
|
|
910
|
+
`campaign__item__${Z}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
|
|
907
911
|
));
|
|
908
|
-
return (
|
|
909
|
-
...
|
|
910
|
-
/* @__PURE__ */
|
|
912
|
+
return (t == null ? void 0 : t.length) < 2 && !B ? [
|
|
913
|
+
...P,
|
|
914
|
+
/* @__PURE__ */ n(
|
|
911
915
|
xe,
|
|
912
916
|
{
|
|
913
917
|
imageUrl: s,
|
|
914
918
|
className: "campaign-item",
|
|
915
|
-
handleClick:
|
|
919
|
+
handleClick: H
|
|
916
920
|
}
|
|
917
921
|
)
|
|
918
|
-
] :
|
|
919
|
-
}, [
|
|
920
|
-
return /* @__PURE__ */
|
|
921
|
-
|
|
922
|
+
] : P;
|
|
923
|
+
}, [t]);
|
|
924
|
+
return /* @__PURE__ */ n(
|
|
925
|
+
Ge,
|
|
922
926
|
{
|
|
923
927
|
isLoading: m,
|
|
924
|
-
itemsCount:
|
|
928
|
+
itemsCount: B ? 1 : 2,
|
|
925
929
|
keyPrefix: "sales-camp",
|
|
926
|
-
children: /* @__PURE__ */
|
|
930
|
+
children: /* @__PURE__ */ n(
|
|
927
931
|
pe,
|
|
928
932
|
{
|
|
929
933
|
icon: i,
|
|
930
934
|
title: o,
|
|
931
|
-
numOfSlides:
|
|
932
|
-
numOfSlidesForMobile:
|
|
935
|
+
numOfSlides: T,
|
|
936
|
+
numOfSlidesForMobile: x,
|
|
933
937
|
showNavigation: E,
|
|
934
|
-
children:
|
|
938
|
+
children: Y
|
|
935
939
|
}
|
|
936
940
|
)
|
|
937
941
|
}
|
|
@@ -939,5 +943,5 @@ const Ze = Ie(fe), cr = M(
|
|
|
939
943
|
}
|
|
940
944
|
);
|
|
941
945
|
export {
|
|
942
|
-
|
|
946
|
+
gr as default
|
|
943
947
|
};
|