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