@lanaco/lnc-react-ui 4.0.117 → 4.0.119
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/FaqSection.cjs +9 -9
- package/dist/FaqSection.js +132 -128
- package/dist/SalesCampaignsSection.cjs +49 -32
- package/dist/SalesCampaignsSection.js +325 -278
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { createElement as
|
|
3
|
-
import { s as
|
|
4
|
-
import { a as
|
|
5
|
-
import { M as
|
|
6
|
-
import { m as
|
|
1
|
+
import { jsx as t, jsxs as c, Fragment as be } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as ye, forwardRef as V, useState as z, useEffect as te, Suspense as $e, memo as De, useMemo as Ce } from "react";
|
|
3
|
+
import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { a as A, o as ne, k as H } from "./utils-BbgAIA9N.js";
|
|
5
|
+
import { M as F } from "./consts-BuFChS64.js";
|
|
6
|
+
import { m as ae } from "./motion-Ckekul_K.js";
|
|
7
7
|
import { P as o } from "./index-CblbdqjE.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { u as
|
|
11
|
-
import
|
|
12
|
-
import { u as
|
|
13
|
-
const
|
|
8
|
+
import oe from "./Icon.js";
|
|
9
|
+
import _e from "./Badge.js";
|
|
10
|
+
import { u as Y } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
11
|
+
import J from "./IconButton.js";
|
|
12
|
+
import { u as ie } from "./useDetectMobile-Bkvj0VMa.js";
|
|
13
|
+
const Se = m.div`
|
|
14
14
|
cursor: pointer;
|
|
15
15
|
display: flex;
|
|
16
16
|
gap: 1rem;
|
|
@@ -18,15 +18,15 @@ const _e = h.div`
|
|
|
18
18
|
border-radius: 20px;
|
|
19
19
|
border: 1px solid var(--gray-95008, #14161a14);
|
|
20
20
|
|
|
21
|
-
@media (max-width: ${
|
|
21
|
+
@media (max-width: ${F + "px"}) {
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
padding: 0;
|
|
24
24
|
gap: 0;
|
|
25
25
|
border: none;
|
|
26
26
|
border-radius: 0;
|
|
27
27
|
}
|
|
28
|
-
`,
|
|
29
|
-
border-radius: ${(e) =>
|
|
28
|
+
`, Te = m.div`
|
|
29
|
+
border-radius: ${(e) => A(e.theme, "edged")};
|
|
30
30
|
height: 15rem;
|
|
31
31
|
width: 15rem;
|
|
32
32
|
min-width: 15rem;
|
|
@@ -49,12 +49,12 @@ const _e = h.div`
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
@media (max-width: ${
|
|
52
|
+
@media (max-width: ${F + "px"}) {
|
|
53
53
|
width: 100%;
|
|
54
54
|
max-width: 100dvh;
|
|
55
55
|
height: 23.438rem;
|
|
56
56
|
}
|
|
57
|
-
`,
|
|
57
|
+
`, ke = m.div`
|
|
58
58
|
flex: 1;
|
|
59
59
|
display: flex;
|
|
60
60
|
flex-direction: column;
|
|
@@ -93,13 +93,30 @@ const _e = h.div`
|
|
|
93
93
|
font-weight: 500;
|
|
94
94
|
padding-top: 0.75rem;
|
|
95
95
|
color: var(--gray-700, #4e555f);
|
|
96
|
+
|
|
97
|
+
& .listings-text {
|
|
98
|
+
color: var(--gray-700, #4e555f);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
& .duration-text {
|
|
102
|
+
color: var(--gray-700, #4e555f);
|
|
103
|
+
|
|
104
|
+
&.urgent {
|
|
105
|
+
color: var(--primary-500, #f59e0b);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
& .countdown-timer {
|
|
110
|
+
color: var(--primary-500, #f59e0b);
|
|
111
|
+
font-weight: 600;
|
|
112
|
+
}
|
|
96
113
|
}
|
|
97
114
|
|
|
98
115
|
& .profile-item:hover {
|
|
99
116
|
background-color: transparent;
|
|
100
117
|
}
|
|
101
118
|
|
|
102
|
-
@media (max-width: ${
|
|
119
|
+
@media (max-width: ${F + "px"}) {
|
|
103
120
|
padding: 1.25rem;
|
|
104
121
|
|
|
105
122
|
& .campaign-title {
|
|
@@ -113,7 +130,7 @@ const _e = h.div`
|
|
|
113
130
|
gap: 0.25rem;
|
|
114
131
|
}
|
|
115
132
|
}
|
|
116
|
-
`,
|
|
133
|
+
`, Ne = {
|
|
117
134
|
"#ADE3EB": "#76D0DB",
|
|
118
135
|
"#DDD6FE": "#C4B5FD",
|
|
119
136
|
"#FDE68A": "#FCD34D",
|
|
@@ -125,13 +142,13 @@ const _e = h.div`
|
|
|
125
142
|
"#E7E5E4": "#D6D3D1",
|
|
126
143
|
"#FED7AA": "#FDBA74",
|
|
127
144
|
default: "#C4C8CF"
|
|
128
|
-
},
|
|
145
|
+
}, K = (e = !1, n = !1, i = !1) => `
|
|
129
146
|
display: flex;
|
|
130
|
-
${
|
|
131
|
-
${
|
|
147
|
+
${n ? "flex-wrap: wrap;" : ""}
|
|
148
|
+
${n ? "" : "flex-wrap: nowrap;"}
|
|
132
149
|
${e ? "align-items: center;" : ""}
|
|
133
150
|
${i ? "justify-content: center;" : ""}
|
|
134
|
-
`,
|
|
151
|
+
`, Ie = m(ae.div)`
|
|
135
152
|
text-decoration: none;
|
|
136
153
|
${(e) => e.hasPermission === !0 && "cursor: pointer"};
|
|
137
154
|
|
|
@@ -148,14 +165,14 @@ const _e = h.div`
|
|
|
148
165
|
text-decoration: none;
|
|
149
166
|
}
|
|
150
167
|
|
|
151
|
-
${
|
|
168
|
+
${K(!0)}
|
|
152
169
|
gap: 0.5rem;
|
|
153
170
|
padding: 0.5rem;
|
|
154
171
|
color: ${(e) => e.isActive === !1 ? "var(--gray-900)" : "var(--primary-600)"};
|
|
155
172
|
font-weight: 500;
|
|
156
173
|
font-size: 0.875rem;
|
|
157
174
|
line-height: 1.25rem;
|
|
158
|
-
border-radius: ${(e) =>
|
|
175
|
+
border-radius: ${(e) => A(e.theme, "slight")};
|
|
159
176
|
transition: all 0.25s ease;
|
|
160
177
|
& .description {
|
|
161
178
|
font-size: 0.85rem;
|
|
@@ -164,11 +181,11 @@ const _e = h.div`
|
|
|
164
181
|
font-weight: 400;
|
|
165
182
|
}
|
|
166
183
|
& .logo-wrapper {
|
|
167
|
-
${
|
|
184
|
+
${K(!0, !1, !0)}
|
|
168
185
|
flex-shrink: 0;
|
|
169
186
|
border-radius: 999px;
|
|
170
187
|
border: 3px solid
|
|
171
|
-
${(e) => e.isActive === !1 ? "var(--gray-300, #c4c8cf)" :
|
|
188
|
+
${(e) => e.isActive === !1 ? "var(--gray-300, #c4c8cf)" : Ne[e.themeColor] ?? "var(--gray-300, #c4c8cf)"};
|
|
172
189
|
|
|
173
190
|
& img,
|
|
174
191
|
.img-placeholder {
|
|
@@ -211,14 +228,14 @@ const _e = h.div`
|
|
|
211
228
|
background-color: var(--gray-95080, #14161acc);
|
|
212
229
|
color: var(--gray-600, #676e79);
|
|
213
230
|
}
|
|
214
|
-
`,
|
|
231
|
+
`, Pe = m.div`
|
|
215
232
|
position: absolute;
|
|
216
233
|
top: 0.5rem;
|
|
217
234
|
${(e) => e.alignToLeft === !0 ? "left: 0.5rem;" : "right: 0.5rem;"}
|
|
218
235
|
display: flex;
|
|
219
236
|
gap: 0.25rem;
|
|
220
|
-
`,
|
|
221
|
-
border-radius: ${(e) =>
|
|
237
|
+
`, Ee = m.div`
|
|
238
|
+
border-radius: ${(e) => A(e.theme, e.borderRadius || "slight")};
|
|
222
239
|
background-color: ${(e) => e == null ? void 0 : e.color};
|
|
223
240
|
color: white;
|
|
224
241
|
height: 1.5rem;
|
|
@@ -233,54 +250,54 @@ const _e = h.div`
|
|
|
233
250
|
& i {
|
|
234
251
|
font-size: 0.813rem;
|
|
235
252
|
}
|
|
236
|
-
`,
|
|
253
|
+
`, se = (e) => {
|
|
237
254
|
const {
|
|
238
|
-
uuid:
|
|
255
|
+
uuid: n,
|
|
239
256
|
hasPermission: i = !0,
|
|
240
257
|
isUser: l,
|
|
241
|
-
image:
|
|
242
|
-
name:
|
|
243
|
-
notifications:
|
|
244
|
-
color:
|
|
245
|
-
size:
|
|
246
|
-
style:
|
|
258
|
+
image: f,
|
|
259
|
+
name: h,
|
|
260
|
+
notifications: p = 0,
|
|
261
|
+
color: s = "primary",
|
|
262
|
+
size: u = "large",
|
|
263
|
+
style: d,
|
|
247
264
|
disabled: S,
|
|
248
|
-
onClick:
|
|
265
|
+
onClick: b = () => {
|
|
249
266
|
},
|
|
250
|
-
isActive:
|
|
251
|
-
className:
|
|
252
|
-
shopCategory:
|
|
267
|
+
isActive: $,
|
|
268
|
+
className: D,
|
|
269
|
+
shopCategory: C,
|
|
253
270
|
// new
|
|
254
271
|
themeData: x
|
|
255
|
-
} = e,
|
|
256
|
-
theme:
|
|
257
|
-
color:
|
|
258
|
-
size:
|
|
259
|
-
style:
|
|
272
|
+
} = e, y = {
|
|
273
|
+
theme: Y(),
|
|
274
|
+
color: s,
|
|
275
|
+
size: u,
|
|
276
|
+
style: d,
|
|
260
277
|
disabled: S
|
|
261
278
|
};
|
|
262
|
-
return /* @__PURE__ */
|
|
263
|
-
|
|
279
|
+
return /* @__PURE__ */ ye(
|
|
280
|
+
Ie,
|
|
264
281
|
{
|
|
265
|
-
onClick: (
|
|
266
|
-
|
|
282
|
+
onClick: (k) => {
|
|
283
|
+
k.stopPropagation(), i === !0 && (b == null || b());
|
|
267
284
|
},
|
|
268
|
-
...
|
|
269
|
-
key:
|
|
270
|
-
className: `profile-item ${
|
|
285
|
+
...y,
|
|
286
|
+
key: h,
|
|
287
|
+
className: `profile-item ${D}`,
|
|
271
288
|
hasPermission: i,
|
|
272
|
-
isActive:
|
|
289
|
+
isActive: $,
|
|
273
290
|
themeColor: (x == null ? void 0 : x.code) || "transparent"
|
|
274
291
|
},
|
|
275
|
-
/* @__PURE__ */ t("div", { className: "logo-wrapper", children:
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */ t("div", { className: "name", children:
|
|
278
|
-
!l && /* @__PURE__ */ t("div", { className: "description", children:
|
|
279
|
-
|
|
292
|
+
/* @__PURE__ */ t("div", { className: "logo-wrapper", children: f }),
|
|
293
|
+
/* @__PURE__ */ c("div", { children: [
|
|
294
|
+
/* @__PURE__ */ t("div", { className: "name", children: h }),
|
|
295
|
+
!l && /* @__PURE__ */ t("div", { className: "description", children: C }),
|
|
296
|
+
p > 0 && /* @__PURE__ */ t("div", { className: "notifications-number", children: /* @__PURE__ */ t(_e, { className: "badge", color: "danger", size: "small", children: p > 99 ? "99+" : p }) })
|
|
280
297
|
] })
|
|
281
298
|
);
|
|
282
299
|
};
|
|
283
|
-
|
|
300
|
+
se.propTypes = {
|
|
284
301
|
id: o.any,
|
|
285
302
|
isUserProfile: o.bool,
|
|
286
303
|
themeColor: o.string,
|
|
@@ -302,123 +319,153 @@ te.propTypes = {
|
|
|
302
319
|
onSelect: o.func,
|
|
303
320
|
hasPermission: o.bool
|
|
304
321
|
};
|
|
305
|
-
const
|
|
306
|
-
if (!e || !
|
|
307
|
-
let i = Math.floor((e == null ? void 0 : e.getTime()) - (
|
|
308
|
-
return Math.
|
|
309
|
-
},
|
|
322
|
+
const Q = (e, n) => {
|
|
323
|
+
if (!e || !n) return null;
|
|
324
|
+
let i = Math.floor((e == null ? void 0 : e.getTime()) - (n == null ? void 0 : n.getTime())), l = 1e3 * 60 * 60 * 24;
|
|
325
|
+
return Math.floor(i / l);
|
|
326
|
+
}, ee = (e) => {
|
|
310
327
|
if (e !== void 0) {
|
|
311
|
-
const
|
|
312
|
-
return `${String(
|
|
313
|
-
}
|
|
314
|
-
},
|
|
315
|
-
var
|
|
316
|
-
const i =
|
|
317
|
-
uuid
|
|
318
|
-
shopUuid:
|
|
319
|
-
title:
|
|
320
|
-
description
|
|
321
|
-
badges
|
|
322
|
-
coverPhoto:
|
|
323
|
-
onSelect:
|
|
324
|
-
status
|
|
328
|
+
const n = new Date(e), i = n.getFullYear(), l = n.getMonth() + 1;
|
|
329
|
+
return `${String(n.getDate()).padStart(2)}. ${l}. ${i}.`;
|
|
330
|
+
}
|
|
331
|
+
}, le = V((e, n) => {
|
|
332
|
+
var q;
|
|
333
|
+
const i = Y(), {
|
|
334
|
+
// uuid,
|
|
335
|
+
shopUuid: l,
|
|
336
|
+
title: f = "",
|
|
337
|
+
// description,
|
|
338
|
+
// badges,
|
|
339
|
+
coverPhoto: h,
|
|
340
|
+
onSelect: p,
|
|
341
|
+
// status,
|
|
325
342
|
startDate: s,
|
|
326
|
-
endDate:
|
|
327
|
-
salesPackages:
|
|
328
|
-
shopName:
|
|
329
|
-
shopCategory:
|
|
330
|
-
shopImage:
|
|
331
|
-
className:
|
|
332
|
-
onSelectCard:
|
|
343
|
+
endDate: u,
|
|
344
|
+
salesPackages: d,
|
|
345
|
+
shopName: S,
|
|
346
|
+
shopCategory: b,
|
|
347
|
+
shopImage: $,
|
|
348
|
+
className: D,
|
|
349
|
+
onSelectCard: C = () => {
|
|
333
350
|
},
|
|
334
|
-
onSelectShop:
|
|
351
|
+
onSelectShop: x = () => {
|
|
335
352
|
},
|
|
336
|
-
upcoming:
|
|
337
|
-
upcomingCampaignText:
|
|
338
|
-
campaignSingleText:
|
|
353
|
+
upcoming: T = !1,
|
|
354
|
+
upcomingCampaignText: y,
|
|
355
|
+
campaignSingleText: k,
|
|
339
356
|
salesCampaignTypes: v = [],
|
|
340
|
-
startsInPrefixTextPlural:
|
|
341
|
-
startsinSuffixTextPlural:
|
|
342
|
-
startsInPrefixTextSingular:
|
|
343
|
-
startsinSuffixTextSingular:
|
|
344
|
-
endsInPrefixTextPlural:
|
|
345
|
-
endsinSuffixTextPlural:
|
|
346
|
-
endsInPrefixTextSingular:
|
|
347
|
-
endsinSuffixTextSingular:
|
|
348
|
-
themeData:
|
|
349
|
-
numberOfListings:
|
|
357
|
+
startsInPrefixTextPlural: P,
|
|
358
|
+
startsinSuffixTextPlural: M,
|
|
359
|
+
startsInPrefixTextSingular: O,
|
|
360
|
+
startsinSuffixTextSingular: L,
|
|
361
|
+
endsInPrefixTextPlural: a,
|
|
362
|
+
endsinSuffixTextPlural: g,
|
|
363
|
+
endsInPrefixTextSingular: U,
|
|
364
|
+
endsinSuffixTextSingular: r,
|
|
365
|
+
themeData: X,
|
|
366
|
+
numberOfListings: G,
|
|
350
367
|
numberOfListingsTextSingular: de,
|
|
351
368
|
numberOfListingsTextPlural: ge,
|
|
352
369
|
...me
|
|
353
|
-
} = e, he = s ? new Date(s) <= /* @__PURE__ */ new Date() : !1
|
|
354
|
-
V(
|
|
355
|
-
f ? new Date(f) : null,
|
|
356
|
-
s ? new Date(s) : null
|
|
357
|
-
);
|
|
358
|
-
const ue = V(
|
|
370
|
+
} = e, he = s ? new Date(s) <= /* @__PURE__ */ new Date() : !1, ue = Q(
|
|
359
371
|
s ? new Date(s) : null,
|
|
360
372
|
/* @__PURE__ */ new Date()
|
|
361
|
-
),
|
|
362
|
-
|
|
373
|
+
), N = Q(
|
|
374
|
+
u ? new Date(u) : null,
|
|
363
375
|
/* @__PURE__ */ new Date()
|
|
364
|
-
),
|
|
365
|
-
|
|
366
|
-
|
|
376
|
+
), fe = N !== null && N <= 3 && N > 0, B = N !== null && N <= 1 && N >= 0, Z = (_, j, w, E, I) => w === 1 ? `${_} ${w} ${E}` : `${j} ${w} ${I}`, pe = () => {
|
|
377
|
+
if (!u) return null;
|
|
378
|
+
const _ = xe, w = new Date(u).getTime() - _.getTime();
|
|
379
|
+
if (w <= 0) return null;
|
|
380
|
+
const E = Math.floor(w / (1e3 * 60 * 60)), I = Math.floor(w % (1e3 * 60 * 60) / (1e3 * 60)), we = Math.floor(w % (1e3 * 60) / 1e3);
|
|
381
|
+
return { hours: E, minutes: I, seconds: we };
|
|
382
|
+
}, [xe, ve] = z(/* @__PURE__ */ new Date());
|
|
383
|
+
te(() => {
|
|
384
|
+
if (!B) return;
|
|
385
|
+
const _ = setInterval(() => {
|
|
386
|
+
ve(/* @__PURE__ */ new Date());
|
|
387
|
+
}, 1e3);
|
|
388
|
+
return () => clearInterval(_);
|
|
389
|
+
}, [B]);
|
|
390
|
+
const R = B ? pe() : null;
|
|
391
|
+
return /* @__PURE__ */ c(
|
|
392
|
+
Se,
|
|
367
393
|
{
|
|
368
|
-
ref:
|
|
394
|
+
ref: n,
|
|
369
395
|
theme: i,
|
|
370
|
-
className:
|
|
371
|
-
onClick:
|
|
396
|
+
className: D,
|
|
397
|
+
onClick: C,
|
|
372
398
|
...me,
|
|
373
399
|
children: [
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */ t("img", { src:
|
|
376
|
-
/* @__PURE__ */ t(
|
|
377
|
-
var
|
|
400
|
+
/* @__PURE__ */ c(Te, { theme: i, onClick: () => p == null ? void 0 : p(), children: [
|
|
401
|
+
/* @__PURE__ */ t("img", { src: h }),
|
|
402
|
+
/* @__PURE__ */ t(Pe, { children: d == null ? void 0 : d.map((_, j) => {
|
|
403
|
+
var w, E;
|
|
378
404
|
return /* @__PURE__ */ t(
|
|
379
|
-
|
|
405
|
+
Ee,
|
|
380
406
|
{
|
|
381
|
-
color: (
|
|
407
|
+
color: (w = v == null ? void 0 : v.find((I) => I.value === _)) == null ? void 0 : w.color,
|
|
382
408
|
theme: i,
|
|
383
409
|
children: /* @__PURE__ */ t(
|
|
384
|
-
|
|
410
|
+
oe,
|
|
385
411
|
{
|
|
386
|
-
icon: (
|
|
412
|
+
icon: (E = v == null ? void 0 : v.find((I) => I.value === _)) == null ? void 0 : E.icon
|
|
387
413
|
}
|
|
388
414
|
)
|
|
389
415
|
},
|
|
390
|
-
`package__${
|
|
416
|
+
`package__${j}`
|
|
391
417
|
);
|
|
392
418
|
}) })
|
|
393
419
|
] }),
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */ t("div", { className: "text-block-wrapper", children: /* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */ t("div", { className: "campaign-title", children: (
|
|
397
|
-
/* @__PURE__ */ t("div", { className: "campaign-title-text", children:
|
|
398
|
-
|
|
399
|
-
|
|
420
|
+
/* @__PURE__ */ c(ke, { theme: i, children: [
|
|
421
|
+
/* @__PURE__ */ t("div", { className: "text-block-wrapper", children: /* @__PURE__ */ c("div", { className: "title-block-wrapper", children: [
|
|
422
|
+
/* @__PURE__ */ t("div", { className: "campaign-title", children: (q = T ? y : k) == null ? void 0 : q.toUpperCase() }),
|
|
423
|
+
/* @__PURE__ */ t("div", { className: "campaign-title-text", children: f }),
|
|
424
|
+
u && s && /* @__PURE__ */ c("div", { children: [
|
|
425
|
+
ee(s),
|
|
400
426
|
" - ",
|
|
401
|
-
|
|
427
|
+
ee(u)
|
|
402
428
|
] }),
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
)
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
429
|
+
/* @__PURE__ */ c("div", { className: "timestamp-text", children: [
|
|
430
|
+
G > 0 && /* @__PURE__ */ c("span", { className: "listings-text", children: [
|
|
431
|
+
G,
|
|
432
|
+
" ",
|
|
433
|
+
G === 1 ? de : ge,
|
|
434
|
+
" ",
|
|
435
|
+
"∙",
|
|
436
|
+
" "
|
|
437
|
+
] }),
|
|
438
|
+
/* @__PURE__ */ t(
|
|
439
|
+
"span",
|
|
440
|
+
{
|
|
441
|
+
className: `duration-text ${fe ? "urgent" : ""}`,
|
|
442
|
+
children: B && R ? /* @__PURE__ */ c("div", { className: "countdown-timer", children: [
|
|
443
|
+
U,
|
|
444
|
+
" ",
|
|
445
|
+
R.hours.toString().padStart(2, "0"),
|
|
446
|
+
":",
|
|
447
|
+
R.minutes.toString().padStart(2, "0"),
|
|
448
|
+
":",
|
|
449
|
+
R.seconds.toString().padStart(2, "0")
|
|
450
|
+
] }) : he ? Z(
|
|
451
|
+
U,
|
|
452
|
+
a,
|
|
453
|
+
N,
|
|
454
|
+
r,
|
|
455
|
+
g
|
|
456
|
+
) : Z(
|
|
457
|
+
O,
|
|
458
|
+
P,
|
|
459
|
+
ue,
|
|
460
|
+
L,
|
|
461
|
+
M
|
|
462
|
+
)
|
|
463
|
+
}
|
|
417
464
|
)
|
|
418
465
|
] })
|
|
419
466
|
] }) }),
|
|
420
467
|
/* @__PURE__ */ t(
|
|
421
|
-
|
|
468
|
+
se,
|
|
422
469
|
{
|
|
423
470
|
hasPermission: !0,
|
|
424
471
|
image: (
|
|
@@ -431,17 +478,17 @@ const V = (e, a) => {
|
|
|
431
478
|
/* @__PURE__ */ t(
|
|
432
479
|
"img",
|
|
433
480
|
{
|
|
434
|
-
src:
|
|
435
|
-
className: `${
|
|
481
|
+
src: $,
|
|
482
|
+
className: `${$ ? "" : "no-image"}`
|
|
436
483
|
}
|
|
437
484
|
)
|
|
438
485
|
),
|
|
439
|
-
themeData:
|
|
486
|
+
themeData: X,
|
|
440
487
|
isActive: !0,
|
|
441
488
|
isUser: !1,
|
|
442
|
-
name:
|
|
443
|
-
shopCategory:
|
|
444
|
-
onClick: () =>
|
|
489
|
+
name: S,
|
|
490
|
+
shopCategory: b,
|
|
491
|
+
onClick: () => x(l)
|
|
445
492
|
}
|
|
446
493
|
)
|
|
447
494
|
] })
|
|
@@ -449,13 +496,13 @@ const V = (e, a) => {
|
|
|
449
496
|
}
|
|
450
497
|
);
|
|
451
498
|
});
|
|
452
|
-
|
|
499
|
+
le.propTypes = {
|
|
453
500
|
title: o.oneOfType([o.string, o.element]),
|
|
454
501
|
numberOfListings: o.number,
|
|
455
502
|
dropdown: o.any,
|
|
456
503
|
color: o.string
|
|
457
504
|
};
|
|
458
|
-
|
|
505
|
+
m.div`
|
|
459
506
|
display: flex;
|
|
460
507
|
flex-direction: column;
|
|
461
508
|
gap: 1.5rem;
|
|
@@ -486,7 +533,7 @@ h.div`
|
|
|
486
533
|
}
|
|
487
534
|
}
|
|
488
535
|
|
|
489
|
-
@media (max-width: ${
|
|
536
|
+
@media (max-width: ${F + "px"}) {
|
|
490
537
|
& .campaign-item {
|
|
491
538
|
min-width: 100%;
|
|
492
539
|
width: 100%;
|
|
@@ -494,19 +541,19 @@ h.div`
|
|
|
494
541
|
}
|
|
495
542
|
}
|
|
496
543
|
`;
|
|
497
|
-
const
|
|
544
|
+
const W = m.div`
|
|
498
545
|
width: ${(e) => e.width || "100%"};
|
|
499
546
|
height: ${(e) => (e.heightCoeff || 1) * 1.125}rem;
|
|
500
547
|
background-color: var(--gray-200, #dddfe4);
|
|
501
548
|
|
|
502
|
-
${
|
|
503
|
-
`,
|
|
549
|
+
${ne("-90deg")}
|
|
550
|
+
`, Fe = m.div`
|
|
504
551
|
display: flex;
|
|
505
552
|
flex-direction: ${(e) => e != null && e.row ? "row" : "column"};
|
|
506
553
|
gap: ${(e) => (e == null ? void 0 : e.gap) ?? "0.5rem"};
|
|
507
554
|
width: ${(e) => (e == null ? void 0 : e.width) ?? "100%"};
|
|
508
|
-
`,
|
|
509
|
-
border-radius: ${(e) =>
|
|
555
|
+
`, re = m.div`
|
|
556
|
+
border-radius: ${(e) => A(e.theme, (e == null ? void 0 : e.borderRadius) ?? "regular")};
|
|
510
557
|
background: var(--gray-200, #dddfe4);
|
|
511
558
|
position: relative;
|
|
512
559
|
max-height: ${(e) => (e == null ? void 0 : e.height) ?? "5rem"};
|
|
@@ -515,10 +562,10 @@ const U = h.div`
|
|
|
515
562
|
width: ${(e) => (e == null ? void 0 : e.width) ?? "5rem"};
|
|
516
563
|
flex-shrink: 0;
|
|
517
564
|
|
|
518
|
-
${
|
|
519
|
-
`,
|
|
565
|
+
${ne()}
|
|
566
|
+
`, ze = m.div`
|
|
520
567
|
background: var(--white, #fff);
|
|
521
|
-
border-radius: ${(e) =>
|
|
568
|
+
border-radius: ${(e) => A(e.theme, "edged")};
|
|
522
569
|
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
|
|
523
570
|
border: 1px solid var(--gray-95012, #14161a1f);
|
|
524
571
|
|
|
@@ -545,59 +592,59 @@ const U = h.div`
|
|
|
545
592
|
gap: 0.5rem;
|
|
546
593
|
}
|
|
547
594
|
|
|
548
|
-
@media (max-width: ${
|
|
595
|
+
@media (max-width: ${F + "px"}) {
|
|
549
596
|
flex-direction: column;
|
|
550
597
|
|
|
551
598
|
& .campaign__user {
|
|
552
599
|
margin-top: 1rem;
|
|
553
600
|
}
|
|
554
601
|
}
|
|
555
|
-
`,
|
|
602
|
+
`, Ae = m.div`
|
|
556
603
|
display: flex;
|
|
557
604
|
gap: 1.5rem;
|
|
558
|
-
`,
|
|
559
|
-
const
|
|
560
|
-
return /* @__PURE__ */
|
|
605
|
+
`, Me = V(({}, e) => {
|
|
606
|
+
const n = Y();
|
|
607
|
+
return /* @__PURE__ */ c(ze, { ref: e, theme: n, children: [
|
|
561
608
|
/* @__PURE__ */ t("div", { className: "campaign__left-section", children: /* @__PURE__ */ t(
|
|
562
|
-
|
|
609
|
+
re,
|
|
563
610
|
{
|
|
564
|
-
theme:
|
|
611
|
+
theme: n,
|
|
565
612
|
width: "15rem",
|
|
566
613
|
height: "15rem",
|
|
567
614
|
borderRadius: "edged"
|
|
568
615
|
}
|
|
569
616
|
) }),
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */
|
|
572
|
-
/* @__PURE__ */ t(
|
|
573
|
-
/* @__PURE__ */ t(
|
|
574
|
-
/* @__PURE__ */ t(
|
|
617
|
+
/* @__PURE__ */ c("div", { className: "campaign__right-section", children: [
|
|
618
|
+
/* @__PURE__ */ c(Fe, { theme: n, children: [
|
|
619
|
+
/* @__PURE__ */ t(W, { heightCoeff: 0.75, theme: n, width: "35%" }),
|
|
620
|
+
/* @__PURE__ */ t(W, { heightCoeff: 1.25, theme: n }),
|
|
621
|
+
/* @__PURE__ */ t(W, { heightCoeff: 3, theme: n })
|
|
575
622
|
] }),
|
|
576
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ c("div", { className: "campaign__user", children: [
|
|
577
624
|
/* @__PURE__ */ t(
|
|
578
|
-
|
|
625
|
+
re,
|
|
579
626
|
{
|
|
580
|
-
theme:
|
|
627
|
+
theme: n,
|
|
581
628
|
width: "2.5rem",
|
|
582
629
|
height: "2.5rem",
|
|
583
630
|
borderRadius: "curved"
|
|
584
631
|
}
|
|
585
632
|
),
|
|
586
|
-
/* @__PURE__ */ t(
|
|
633
|
+
/* @__PURE__ */ t(W, { theme: n, width: "75%" })
|
|
587
634
|
] })
|
|
588
635
|
] })
|
|
589
636
|
] });
|
|
590
|
-
}),
|
|
591
|
-
|
|
637
|
+
}), Oe = ({ itemsCount: e = 5, keyPrefix: n }) => /* @__PURE__ */ t(Ae, { children: Array.from({ length: e }, (i, l) => /* @__PURE__ */ t(
|
|
638
|
+
Me,
|
|
592
639
|
{},
|
|
593
|
-
`${
|
|
594
|
-
)) }),
|
|
640
|
+
`${n}-skeleton-campaign-card-${l}`
|
|
641
|
+
)) }), Le = ({
|
|
595
642
|
children: e,
|
|
596
|
-
fallbackComponent:
|
|
643
|
+
fallbackComponent: n = /* @__PURE__ */ t(be, {}),
|
|
597
644
|
isLoading: i = !1,
|
|
598
645
|
itemsCount: l = 5,
|
|
599
|
-
keyPrefix:
|
|
600
|
-
}) => /* @__PURE__ */ t(
|
|
646
|
+
keyPrefix: f
|
|
647
|
+
}) => /* @__PURE__ */ t($e, { fallback: n, children: i === !0 ? /* @__PURE__ */ t(Oe, { itemsCount: l, keyPrefix: f }) : e }), Ue = m.div`
|
|
601
648
|
margin: 0 auto;
|
|
602
649
|
display: flex;
|
|
603
650
|
flex-direction: column;
|
|
@@ -638,56 +685,56 @@ const U = h.div`
|
|
|
638
685
|
top: 0;
|
|
639
686
|
right: 0;
|
|
640
687
|
}
|
|
641
|
-
`,
|
|
688
|
+
`, Be = m(ae.div)`
|
|
642
689
|
display: grid;
|
|
643
690
|
grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumns}, 1fr);
|
|
644
691
|
gap: 1.5rem;
|
|
645
692
|
|
|
646
|
-
@media (max-width: ${
|
|
693
|
+
@media (max-width: ${F + "px"}) {
|
|
647
694
|
grid-template-columns: repeat(${(e) => e == null ? void 0 : e.numOfColumnsForMobile}, 1fr);
|
|
648
695
|
}
|
|
649
|
-
`,
|
|
696
|
+
`, ce = V(
|
|
650
697
|
({
|
|
651
698
|
icon: e,
|
|
652
|
-
title:
|
|
699
|
+
title: n,
|
|
653
700
|
numOfSlides: i = 2,
|
|
654
701
|
numOfSlidesForMobile: l = 1,
|
|
655
|
-
showNavigation:
|
|
656
|
-
children:
|
|
657
|
-
},
|
|
658
|
-
const [
|
|
659
|
-
|
|
660
|
-
const
|
|
702
|
+
showNavigation: f = !0,
|
|
703
|
+
children: h
|
|
704
|
+
}, p) => {
|
|
705
|
+
const [s, u] = z(0), [d, S] = z(1), [b, $] = z(null), [D, C] = z(null), x = ie(), T = 50, y = (h == null ? void 0 : h.length) ?? 1;
|
|
706
|
+
te(() => {
|
|
707
|
+
const a = () => {
|
|
661
708
|
S(x ? l : i);
|
|
662
709
|
};
|
|
663
|
-
return window.addEventListener("resize",
|
|
710
|
+
return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
|
|
664
711
|
}, []);
|
|
665
|
-
const
|
|
666
|
-
var
|
|
667
|
-
(
|
|
668
|
-
},
|
|
669
|
-
var
|
|
670
|
-
(
|
|
712
|
+
const k = h == null ? void 0 : h.slice(s, s + d), v = (a) => {
|
|
713
|
+
var g;
|
|
714
|
+
(g = a == null ? void 0 : a.target) == null || g.blur(), s + d < y && u(s + d);
|
|
715
|
+
}, P = (a) => {
|
|
716
|
+
var g;
|
|
717
|
+
(g = a == null ? void 0 : a.target) == null || g.blur(), s - d >= 0 && u(s - d);
|
|
671
718
|
};
|
|
672
|
-
return /* @__PURE__ */
|
|
673
|
-
|
|
719
|
+
return /* @__PURE__ */ c(
|
|
720
|
+
Ue,
|
|
674
721
|
{
|
|
675
|
-
ref:
|
|
676
|
-
...x ? { onTouchStart: (
|
|
677
|
-
var
|
|
678
|
-
|
|
679
|
-
}, onTouchMove: (
|
|
680
|
-
var
|
|
681
|
-
|
|
722
|
+
ref: p,
|
|
723
|
+
...x ? { onTouchStart: (a) => {
|
|
724
|
+
var g;
|
|
725
|
+
C(null), $((g = a == null ? void 0 : a.targetTouches["0"]) == null ? void 0 : g.clientX);
|
|
726
|
+
}, onTouchMove: (a) => {
|
|
727
|
+
var g;
|
|
728
|
+
C((g = a == null ? void 0 : a.targetTouches["0"]) == null ? void 0 : g.clientX);
|
|
682
729
|
}, onTouchEnd: () => {
|
|
683
|
-
if (!
|
|
684
|
-
const
|
|
685
|
-
|
|
730
|
+
if (!b || !D) return;
|
|
731
|
+
const a = b - D;
|
|
732
|
+
a > T && v(), a < -T && P();
|
|
686
733
|
} } : {},
|
|
687
734
|
children: [
|
|
688
|
-
/* @__PURE__ */ t("div", { className: "scrollable-section__header", children: /* @__PURE__ */
|
|
689
|
-
|
|
690
|
-
|
|
735
|
+
/* @__PURE__ */ t("div", { className: "scrollable-section__header", children: /* @__PURE__ */ c("div", { className: "scrollable-section__title", children: [
|
|
736
|
+
H(e) && /* @__PURE__ */ t(
|
|
737
|
+
oe,
|
|
691
738
|
{
|
|
692
739
|
icon: e,
|
|
693
740
|
color: "primary",
|
|
@@ -695,10 +742,10 @@ const U = h.div`
|
|
|
695
742
|
className: "title__icon"
|
|
696
743
|
}
|
|
697
744
|
),
|
|
698
|
-
|
|
745
|
+
H(n) && /* @__PURE__ */ t("div", { className: "title__text", children: n })
|
|
699
746
|
] }) }),
|
|
700
747
|
/* @__PURE__ */ t(
|
|
701
|
-
|
|
748
|
+
Be,
|
|
702
749
|
{
|
|
703
750
|
numOfColumns: i,
|
|
704
751
|
numOfColumnsForMobile: l,
|
|
@@ -710,33 +757,33 @@ const U = h.div`
|
|
|
710
757
|
x: 10,
|
|
711
758
|
opacity: 0
|
|
712
759
|
},
|
|
713
|
-
children:
|
|
760
|
+
children: k
|
|
714
761
|
},
|
|
715
|
-
`scrollable-section__content-${
|
|
762
|
+
`scrollable-section__content-${s}`
|
|
716
763
|
),
|
|
717
|
-
|
|
764
|
+
f && y > d && !x && /* @__PURE__ */ c("div", { className: "scrollable-section__navigation", children: [
|
|
718
765
|
/* @__PURE__ */ t(
|
|
719
|
-
|
|
766
|
+
J,
|
|
720
767
|
{
|
|
721
768
|
icon: "angle-left",
|
|
722
769
|
borderRadius: "curved",
|
|
723
770
|
btnType: "tinted",
|
|
724
771
|
color: "neutral",
|
|
725
772
|
className: "navigation__arrow",
|
|
726
|
-
disabled:
|
|
727
|
-
onClick:
|
|
773
|
+
disabled: s === 0,
|
|
774
|
+
onClick: P
|
|
728
775
|
}
|
|
729
776
|
),
|
|
730
777
|
/* @__PURE__ */ t(
|
|
731
|
-
|
|
778
|
+
J,
|
|
732
779
|
{
|
|
733
780
|
icon: "angle-right",
|
|
734
781
|
borderRadius: "curved",
|
|
735
782
|
btnType: "tinted",
|
|
736
783
|
color: "neutral",
|
|
737
784
|
className: "navigation__arrow",
|
|
738
|
-
disabled:
|
|
739
|
-
onClick:
|
|
785
|
+
disabled: s + d >= y,
|
|
786
|
+
onClick: v
|
|
740
787
|
}
|
|
741
788
|
)
|
|
742
789
|
] })
|
|
@@ -745,48 +792,48 @@ const U = h.div`
|
|
|
745
792
|
);
|
|
746
793
|
}
|
|
747
794
|
);
|
|
748
|
-
|
|
795
|
+
ce.propTypes = {
|
|
749
796
|
icon: o.string,
|
|
750
797
|
title: o.string,
|
|
751
798
|
numOfSlides: o.number,
|
|
752
799
|
numOfSlidesForMobile: o.number,
|
|
753
800
|
showNavigation: o.bool
|
|
754
801
|
};
|
|
755
|
-
const
|
|
802
|
+
const Re = De(le), er = V(
|
|
756
803
|
({
|
|
757
804
|
sellerType: e = "Shop",
|
|
758
|
-
items:
|
|
805
|
+
items: n = [],
|
|
759
806
|
title: i,
|
|
760
807
|
icon: l,
|
|
761
|
-
isLoading:
|
|
762
|
-
onSelectCard:
|
|
808
|
+
isLoading: f,
|
|
809
|
+
onSelectCard: h = () => {
|
|
763
810
|
},
|
|
764
|
-
onSelectShop:
|
|
811
|
+
onSelectShop: p = () => {
|
|
765
812
|
},
|
|
766
|
-
getImage:
|
|
813
|
+
getImage: s = () => {
|
|
767
814
|
},
|
|
768
|
-
campaignSingleText:
|
|
769
|
-
upcomingCampaignText:
|
|
815
|
+
campaignSingleText: u,
|
|
816
|
+
upcomingCampaignText: d,
|
|
770
817
|
salesCampaignTypes: S = [],
|
|
771
|
-
startsInPrefixTextPlural:
|
|
772
|
-
startsinSuffixTextPlural:
|
|
773
|
-
startsInPrefixTextSingular:
|
|
774
|
-
startsinSuffixTextSingular:
|
|
818
|
+
startsInPrefixTextPlural: b,
|
|
819
|
+
startsinSuffixTextPlural: $,
|
|
820
|
+
startsInPrefixTextSingular: D,
|
|
821
|
+
startsinSuffixTextSingular: C,
|
|
775
822
|
endsInPrefixTextPlural: x,
|
|
776
|
-
endsinSuffixTextPlural:
|
|
777
|
-
endsInPrefixTextSingular:
|
|
778
|
-
endsinSuffixTextSingular:
|
|
779
|
-
numOfSlides:
|
|
780
|
-
numOfSlidesForMobile:
|
|
781
|
-
showNavigation:
|
|
782
|
-
numberOfListingsTextSingular:
|
|
783
|
-
numberOfListingsTextPlural:
|
|
784
|
-
},
|
|
785
|
-
const
|
|
786
|
-
|
|
823
|
+
endsinSuffixTextPlural: T,
|
|
824
|
+
endsInPrefixTextSingular: y,
|
|
825
|
+
endsinSuffixTextSingular: k,
|
|
826
|
+
numOfSlides: v = 2,
|
|
827
|
+
numOfSlidesForMobile: P = 1,
|
|
828
|
+
showNavigation: M = !0,
|
|
829
|
+
numberOfListingsTextSingular: O,
|
|
830
|
+
numberOfListingsTextPlural: L
|
|
831
|
+
}, a) => {
|
|
832
|
+
const g = ie(), U = Ce(() => n == null ? void 0 : n.map((r, X) => /* @__PURE__ */ t(
|
|
833
|
+
Re,
|
|
787
834
|
{
|
|
788
835
|
className: "campaign-item",
|
|
789
|
-
coverPhoto:
|
|
836
|
+
coverPhoto: s(
|
|
790
837
|
r == null ? void 0 : r.coverPhoto,
|
|
791
838
|
(r == null ? void 0 : r.uuid) || (r == null ? void 0 : r.campaignUuid)
|
|
792
839
|
),
|
|
@@ -801,42 +848,42 @@ const Ue = ve(ne), Je = B(
|
|
|
801
848
|
startDate: r == null ? void 0 : r.startDate,
|
|
802
849
|
title: r == null ? void 0 : r.name,
|
|
803
850
|
uuid: r == null ? void 0 : r.campaignUuid,
|
|
804
|
-
onSelectCard: () =>
|
|
805
|
-
onSelectShop: () =>
|
|
806
|
-
campaignSingleText:
|
|
807
|
-
upcomingCampaignText:
|
|
851
|
+
onSelectCard: () => h(r == null ? void 0 : r.campaignUuid, r == null ? void 0 : r.shopUuid),
|
|
852
|
+
onSelectShop: () => p(r == null ? void 0 : r.shopUuid),
|
|
853
|
+
campaignSingleText: u,
|
|
854
|
+
upcomingCampaignText: d,
|
|
808
855
|
upcoming: r == null ? void 0 : r.upcoming,
|
|
809
856
|
salesCampaignTypes: S,
|
|
810
|
-
startsInPrefixTextPlural:
|
|
811
|
-
startsinSuffixTextPlural:
|
|
812
|
-
startsInPrefixTextSingular:
|
|
813
|
-
startsinSuffixTextSingular:
|
|
857
|
+
startsInPrefixTextPlural: b,
|
|
858
|
+
startsinSuffixTextPlural: $,
|
|
859
|
+
startsInPrefixTextSingular: D,
|
|
860
|
+
startsinSuffixTextSingular: C,
|
|
814
861
|
endsInPrefixTextPlural: x,
|
|
815
|
-
endsinSuffixTextPlural:
|
|
816
|
-
endsInPrefixTextSingular:
|
|
817
|
-
endsinSuffixTextSingular:
|
|
862
|
+
endsinSuffixTextPlural: T,
|
|
863
|
+
endsInPrefixTextSingular: y,
|
|
864
|
+
endsinSuffixTextSingular: k,
|
|
818
865
|
themeData: r == null ? void 0 : r.themeData,
|
|
819
866
|
numberOfListings: r == null ? void 0 : r.numberOfListings,
|
|
820
|
-
numberOfListingsTextSingular:
|
|
821
|
-
numberOfListingsTextPlural:
|
|
867
|
+
numberOfListingsTextSingular: O,
|
|
868
|
+
numberOfListingsTextPlural: L
|
|
822
869
|
},
|
|
823
|
-
`campaign__item__${
|
|
824
|
-
)), [
|
|
870
|
+
`campaign__item__${X}__${r == null ? void 0 : r.startDate}___${r == null ? void 0 : r.endDate}`
|
|
871
|
+
)), [n]);
|
|
825
872
|
return /* @__PURE__ */ t(
|
|
826
|
-
|
|
873
|
+
Le,
|
|
827
874
|
{
|
|
828
|
-
isLoading:
|
|
829
|
-
itemsCount:
|
|
875
|
+
isLoading: f,
|
|
876
|
+
itemsCount: g ? 1 : 2,
|
|
830
877
|
keyPrefix: "sales-camp",
|
|
831
878
|
children: /* @__PURE__ */ t(
|
|
832
|
-
|
|
879
|
+
ce,
|
|
833
880
|
{
|
|
834
881
|
icon: l,
|
|
835
882
|
title: i,
|
|
836
|
-
numOfSlides:
|
|
837
|
-
numOfSlidesForMobile:
|
|
838
|
-
showNavigation:
|
|
839
|
-
children:
|
|
883
|
+
numOfSlides: v,
|
|
884
|
+
numOfSlidesForMobile: P,
|
|
885
|
+
showNavigation: M,
|
|
886
|
+
children: U
|
|
840
887
|
}
|
|
841
888
|
)
|
|
842
889
|
}
|
|
@@ -844,5 +891,5 @@ const Ue = ve(ne), Je = B(
|
|
|
844
891
|
}
|
|
845
892
|
);
|
|
846
893
|
export {
|
|
847
|
-
|
|
894
|
+
er as default
|
|
848
895
|
};
|