@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.
@@ -1,17 +1,18 @@
1
- import { jsx as n, jsxs as g, Fragment as De } from "react/jsx-runtime";
2
- import { forwardRef as M, useRef as he, useEffect as Q, Fragment as Te, createElement as Pe, useState as U, Suspense as ze, memo as Me, useMemo as Le } from "react";
3
- import { s as h } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { a as O, k as K, l as Ue, o as pe } from "./utils-BdsZgOUE.js";
5
- import { M as k } from "./consts-BuFChS64.js";
6
- import { m as fe } from "./motion-Ckekul_K.js";
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 ee } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
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
- const Ee = h.div`
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: ${k + "px"}) {
23
+ @media (max-width: ${T + "px"}) {
23
24
  flex-direction: column;
24
25
  padding: 1rem;
25
26
  gap: 0;
26
27
  }
27
- `, je = h.div`
28
- border-radius: ${(e) => O(e.theme, "edged")};
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
- `, Re = h.div`
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: ${k + "px"}) {
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
- `, Be = h(fe.div)`
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) => O(e.theme, "slight")};
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: ${k + "px"}) {
237
+ @media (max-width: ${T + "px"}) {
237
238
  padding: 0;
238
239
  font-size: 0.875rem;
239
240
  }
240
- `, Fe = h.div`
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
- `, We = h.div`
247
- border-radius: ${(e) => O(e.theme, e.borderRadius || "slight")};
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 = M(({ src: e, ...t }, o) => {
263
+ `, Ae = z(({ src: e, ...t }, o) => {
263
264
  const i = he();
264
- return Q(() => {
265
- var f;
266
- const l = (s) => {
265
+ return ee(() => {
266
+ var h;
267
+ const d = (s) => {
267
268
  s.target.src = se, s.onerror = null;
268
269
  };
269
- return (f = i == null ? void 0 : i.current) == null || f.addEventListener("error", l), () => {
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", l);
272
+ (s = i == null ? void 0 : i.current) == null || s.removeEventListener("error", d);
272
273
  };
273
- }, []), /* @__PURE__ */ n(Te, { ref: o, children: K(e) ? /* @__PURE__ */ n("img", { ref: i, src: e, ...t }) : /* @__PURE__ */ n("img", { src: se, ...t }) });
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: l,
280
- imageComponent: f,
280
+ image: d,
281
+ imageComponent: h,
281
282
  name: s,
282
- notifications: m = 0,
283
- color: c = "primary",
284
- size: w = "large",
285
- style: N,
286
- disabled: I,
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: D,
290
- className: b,
291
- shopCategory: v,
290
+ isActive: v,
291
+ className: k,
292
+ shopCategory: I,
292
293
  // new
293
- themeData: y
294
- } = e, _ = {
295
- theme: ee(),
296
- color: c,
297
- size: w,
298
- style: N,
299
- disabled: I
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
- Be,
303
+ Fe,
303
304
  {
304
- onClick: (d) => {
305
- d.stopPropagation(), o === !0 && ($ == null || $());
305
+ onClick: (_) => {
306
+ _.stopPropagation(), o === !0 && (u == null || u());
306
307
  },
307
- ..._,
308
+ ...x,
308
309
  key: s,
309
- className: `profile-item ${b}`,
310
+ className: `profile-item ${k}`,
310
311
  hasPermission: o,
311
- isActive: D,
312
- themeColor: (y == null ? void 0 : y.code) || "transparent"
312
+ isActive: v,
313
+ themeColor: ($ == null ? void 0 : $.code) || "transparent"
313
314
  },
314
- /* @__PURE__ */ n("div", { className: "logo-wrapper", children: Ue(f) ? f : l }),
315
- /* @__PURE__ */ g("div", { children: [
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: v }),
318
- m > 0 && /* @__PURE__ */ n("div", { className: "notifications-number", children: /* @__PURE__ */ n(Oe, { className: "badge", color: "danger", size: "small", children: m > 99 ? "99+" : m }) })
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 = M((e, t) => {
354
+ }, be = z((e, t) => {
354
355
  var ie;
355
- const o = ee(), {
356
+ const o = re(), {
356
357
  // uuid,
357
358
  shopUuid: i,
358
- title: l = "",
359
+ title: d = "",
359
360
  // description,
360
361
  // badges,
361
- coverPhoto: f,
362
+ coverPhoto: h,
362
363
  onSelect: s,
363
364
  // status,
364
- startDate: m,
365
- endDate: c,
366
- salesPackages: w,
367
- shopName: N,
368
- shopCategory: I,
369
- shopImage: $,
370
- shopImageComponent: D,
371
- className: b,
372
- onSelectCard: v = () => {
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: y = () => {
375
+ onSelectShop: $ = () => {
375
376
  },
376
- upcoming: T = !1,
377
- upcomingCampaignText: _,
378
- campaignSingleText: d,
379
- salesCampaignTypes: p = [],
377
+ upcoming: g = !1,
378
+ upcomingCampaignText: x,
379
+ campaignSingleText: _,
380
+ salesCampaignTypes: C = [],
380
381
  startsInPrefixTextPlural: W,
381
- startsinSuffixTextPlural: A,
382
- startsInPrefixTextSingular: V,
383
- startsinSuffixTextSingular: re,
382
+ startsinSuffixTextPlural: V,
383
+ startsInPrefixTextSingular: A,
384
+ startsinSuffixTextSingular: ne,
384
385
  endsInPrefixTextPlural: H,
385
386
  endsinSuffixTextPlural: G,
386
- endsInPrefixTextSingular: X,
387
- endsinSuffixTextSingular: L,
388
- themeData: Y,
389
- numberOfListings: P,
390
- numberOfListingsTextSingular: r,
391
- numberOfListingsTextPlural: Z,
392
- metadata: C,
393
- ...q
394
- } = e, ne = he(), te = m ? new Date(m) <= /* @__PURE__ */ new Date() : !1, $e = de(
395
- m ? new Date(m) : null,
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
- c ? new Date(c) : null,
399
+ l ? new Date(l) : null,
399
400
  /* @__PURE__ */ new Date()
400
- ), _e = E !== null && E <= 2 && E > 0, ae = c ? new Date(c).getTime() : null, Ce = Date.now(), J = ae !== null ? ae - Ce : null, j = J !== null && J > 0 && J < 24 * 60 * 60 * 1e3, oe = (x, B, u, z, S) => u === 1 ? `${x} ${u} ${z}` : `${B} ${u} ${S}`, Se = () => {
401
- if (!c) return null;
402
- const x = ke, u = new Date(c).getTime() - x.getTime();
403
- if (u <= 0) return null;
404
- const z = Math.floor(u / (1e3 * 60 * 60)), S = Math.floor(u % (1e3 * 60 * 60) / (1e3 * 60)), Ie = Math.floor(u % (1e3 * 60) / 1e3);
405
- return { hours: z, minutes: S, seconds: Ie };
406
- }, [ke, Ne] = U(/* @__PURE__ */ new Date());
407
- Q(() => {
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 x = setInterval(() => {
410
- Ne(/* @__PURE__ */ new Date());
410
+ const y = setInterval(() => {
411
+ Ie(/* @__PURE__ */ new Date());
411
412
  }, 1e3);
412
- return () => clearInterval(x);
413
+ return () => clearInterval(y);
413
414
  }, [j]);
414
415
  const R = j ? Se() : null;
415
- return /* @__PURE__ */ g(
416
- Ee,
416
+ return /* @__PURE__ */ c(
417
+ je,
417
418
  {
418
- ref: ne,
419
+ ref: q,
419
420
  theme: o,
420
- className: b,
421
- name: C == null ? void 0 : C.name,
422
- "data-accessor": C == null ? void 0 : C.accessor,
423
- onClick: (x) => v(x, ne),
424
- ...q,
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__ */ g(je, { theme: o, onClick: () => s == null ? void 0 : s(), children: [
427
- /* @__PURE__ */ n("img", { src: f }),
428
- /* @__PURE__ */ n(Fe, { children: w == null ? void 0 : w.map((x, B) => {
429
- var u, z;
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
- We,
432
+ Ve,
432
433
  {
433
- color: (u = p == null ? void 0 : p.find((S) => S.value === x)) == null ? void 0 : u.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: (z = p == null ? void 0 : p.find((S) => S.value === x)) == null ? void 0 : z.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__ */ g(Re, { theme: o, children: [
447
- /* @__PURE__ */ n("div", { className: "text-block-wrapper", children: /* @__PURE__ */ g("div", { className: "title-block-wrapper", children: [
448
- /* @__PURE__ */ n("div", { className: "campaign-title", children: (ie = T ? _ : d) == null ? void 0 : ie.toUpperCase() }),
449
- /* @__PURE__ */ n("div", { className: "campaign-title-text", children: l }),
450
- c && m && /* @__PURE__ */ g("div", { className: "campaign-date", children: [
451
- ge(m),
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(c)
454
+ ge(l)
454
455
  ] }),
455
- /* @__PURE__ */ g("div", { className: "timestamp-text", children: [
456
- P > 0 && /* @__PURE__ */ g("span", { className: "listings-text", children: [
457
- P,
456
+ /* @__PURE__ */ c("div", { className: "timestamp-text", children: [
457
+ N > 0 && /* @__PURE__ */ c("span", { className: "listings-text", children: [
458
+ N,
458
459
  " ",
459
- P === 1 ? r : Z,
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" : ""} ${te ? "" : "starts-in"}`,
468
- children: j && R ? /* @__PURE__ */ g("div", { className: "countdown-timer", children: [
469
- X,
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
- ] }) : te ? oe(
477
- X,
477
+ ] }) : O ? oe(
478
+ L,
478
479
  H,
479
480
  E,
480
- L,
481
+ X,
481
482
  G
482
483
  ) : oe(
483
- V,
484
+ A,
484
485
  W,
485
486
  $e,
486
- re,
487
- A
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: D,
499
- themeData: Y,
498
+ image: /* @__PURE__ */ n(Ae, { src: u }),
499
+ imageComponent: v,
500
+ themeData: te,
500
501
  isActive: !0,
501
502
  isUser: !1,
502
- name: N,
503
- shopCategory: I,
504
- onClick: () => y(i)
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
- h.div`
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: ${k + "px"}) {
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 = h.div`
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
- ${pe("-90deg")}
563
- `, Ve = h.div`
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 = h.div`
569
- border-radius: ${(e) => O(e.theme, (e == null ? void 0 : e.borderRadius) ?? "regular")};
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
- ${pe()}
579
- `, He = h.div`
579
+ ${fe()}
580
+ `, Ge = m.div`
580
581
  background: var(--white, #fff);
581
- border-radius: ${(e) => O(e.theme, "edged")};
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: ${k + "px"}) {
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
- `, Ge = h.div`
616
+ `, Xe = m.div`
616
617
  display: flex;
617
618
  gap: 1.5rem;
618
- `, Xe = M(({}, e) => {
619
- const t = ee();
620
- return /* @__PURE__ */ g(He, { ref: e, theme: t, children: [
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__ */ g("div", { className: "campaign__right-section", children: [
631
- /* @__PURE__ */ g(Ve, { theme: t, children: [
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__ */ g("div", { className: "campaign__user", children: [
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
- }), Ye = ({ itemsCount: e = 5, keyPrefix: t }) => /* @__PURE__ */ n(Ge, { children: Array.from({ length: e }, (o, i) => /* @__PURE__ */ n(
651
- Xe,
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
- )) }), Ze = ({
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: l
660
- }) => /* @__PURE__ */ n(ze, { fallback: t, children: o === !0 ? /* @__PURE__ */ n(Ye, { itemsCount: i, keyPrefix: l }) : e }), qe = h.div`
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: ${k + "px"}) {
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
- `, Je = h(fe.div)`
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: ${k + "px"}) {
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 = M(
740
- ({ icon: e, title: t, numOfSlides: o = 2, showNavigation: i = !0, children: l }, f) => {
741
- const [s, m] = U(0), [c, w] = U(1), [N, I] = U(null), [$, D] = U(null), b = xe(), v = (l == null ? void 0 : l.length) ?? 1;
742
- Q(() => {
743
- const d = () => {
744
- w(o);
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", d), d(), () => window.removeEventListener("resize", d);
756
+ return window.addEventListener("resize", g), g(), () => window.removeEventListener("resize", g);
747
757
  }, []);
748
- const y = b ? l : l == null ? void 0 : l.slice(s, s + c), T = (d) => {
749
- var p;
750
- (p = d == null ? void 0 : d.target) == null || p.blur(), s + c < v && m(s + c);
751
- }, _ = (d) => {
752
- var p;
753
- (p = d == null ? void 0 : d.target) == null || p.blur(), s - c >= 0 && m(s - c);
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__ */ g(qe, { ref: f, children: [
756
- /* @__PURE__ */ n("div", { className: "scrollable-section__header", children: /* @__PURE__ */ g("div", { className: "scrollable-section__title", children: [
757
- K(e) && /* @__PURE__ */ n(
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
- K(t) && /* @__PURE__ */ g("div", { className: "title__text", children: [
778
+ Q(t) && /* @__PURE__ */ c("div", { className: "title__text", children: [
767
779
  " ",
768
780
  t
769
781
  ] })
770
782
  ] }) }),
771
- /* @__PURE__ */ n(
772
- Je,
783
+ /* @__PURE__ */ c(
784
+ Ke,
773
785
  {
774
786
  numOfColumns: o,
775
- ...!b && {
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: y
797
+ children: [
798
+ k,
799
+ u && d && /* @__PURE__ */ n(Ee, { onIsVisible: h })
800
+ ]
786
801
  },
787
- `scrollable-section__content-${s}`
802
+ `scrollable-section__content-${l}`
788
803
  ),
789
- i && v > c && !b && /* @__PURE__ */ g("div", { className: "scrollable-section__navigation", children: [
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: s === 0,
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: s + c >= v,
811
- onClick: T
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 Ke = h.div`
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 = M(
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: l = () => {
864
+ handleClick: d = () => {
849
865
  }
850
- }, f) => /* @__PURE__ */ n(
851
- Ke,
866
+ }, h) => /* @__PURE__ */ n(
867
+ Qe,
852
868
  {
853
- ref: f,
869
+ ref: h,
854
870
  maxHeight: o,
855
- onClick: l,
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 Qe = Me(be), hr = M(
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: l,
875
- onSelectCard: f = () => {
890
+ isLoading: d,
891
+ onSelectCard: h = () => {
876
892
  },
877
893
  onSelectShop: s = () => {
878
894
  },
879
- getImage: m = () => {
895
+ getImage: f = () => {
880
896
  },
881
- campaignSingleText: c,
882
- upcomingCampaignText: w,
883
- salesCampaignTypes: N = [],
884
- startsInPrefixTextPlural: I,
885
- startsinSuffixTextPlural: $,
886
- startsInPrefixTextSingular: D,
887
- startsinSuffixTextSingular: b,
888
- endsInPrefixTextPlural: v,
889
- endsinSuffixTextPlural: y,
890
- endsInPrefixTextSingular: T,
891
- endsinSuffixTextSingular: _,
892
- numOfSlides: d = 2,
893
- showNavigation: p = !0,
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: A,
896
- itemlessImageUrl: V,
897
- itemlessLink: re,
911
+ numberOfListingsTextPlural: V,
912
+ itemlessImageUrl: A,
913
+ itemlessLink: ne,
898
914
  handleItemlessLink: H = () => {
899
915
  },
900
- componentName: G
901
- }, X) => {
902
- const L = xe(), Y = Le(() => {
903
- let P = t == null ? void 0 : t.map((r, Z) => /* @__PURE__ */ n(
904
- Qe,
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: m(
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: (C, q) => f(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid, q),
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: c,
926
- upcomingCampaignText: w,
944
+ campaignSingleText: l,
945
+ upcomingCampaignText: b,
927
946
  upcoming: r == null ? void 0 : r.upcoming,
928
- salesCampaignTypes: N,
929
- startsInPrefixTextPlural: I,
930
- startsinSuffixTextPlural: $,
931
- startsInPrefixTextSingular: D,
932
- startsinSuffixTextSingular: b,
933
- endsInPrefixTextPlural: v,
934
- endsinSuffixTextPlural: y,
935
- endsInPrefixTextSingular: T,
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: A,
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 && !L ? [
946
- ...P,
964
+ return (t == null ? void 0 : t.length) < 2 && !N ? [
965
+ ...U,
947
966
  /* @__PURE__ */ n(
948
967
  ye,
949
968
  {
950
- imageUrl: V,
969
+ imageUrl: A,
951
970
  className: "campaign-item",
952
971
  handleClick: H
953
972
  },
954
973
  "itemless-campaign-section-banner"
955
974
  )
956
- ] : P;
975
+ ] : U;
957
976
  }, [t]);
958
977
  return /* @__PURE__ */ n(
959
- Ze,
978
+ qe,
960
979
  {
961
- isLoading: l,
962
- itemsCount: L ? 1 : 2,
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: d,
970
- showNavigation: p,
988
+ numOfSlides: _,
989
+ showNavigation: C,
990
+ hasNextPage: L,
991
+ handleFetchNextPage: X,
971
992
  children: Y
972
993
  },
973
- `sales-campaign-section__${L}`
994
+ `sales-campaign-section__${N}`
974
995
  )
975
996
  }
976
997
  );
977
998
  }
978
999
  );
979
1000
  export {
980
- hr as default
1001
+ pr as default
981
1002
  };