@lanaco/lnc-react-ui 4.0.186 → 4.0.188
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BannerSectionCarousel.cjs +4 -4
- package/dist/BannerSectionCarousel.js +150 -158
- package/dist/BlogCardsSponsoredSection.cjs +5 -5
- package/dist/BlogCardsSponsoredSection.js +55 -51
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +1 -1
- package/dist/BlogExploreSection.cjs +5 -5
- package/dist/BlogExploreSection.js +182 -215
- package/dist/BlogListSection.cjs +6 -6
- package/dist/BlogListSection.js +134 -116
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +26 -24
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.cjs +3 -3
- package/dist/BlogSingleSection.js +21 -19
- package/dist/BlogsSectionDetailed.cjs +4 -4
- package/dist/BlogsSectionDetailed.js +81 -76
- package/dist/BlogsSectionLarge.cjs +6 -6
- package/dist/BlogsSectionLarge.js +34 -31
- package/dist/BlogsSectionSimple.cjs +8 -8
- package/dist/BlogsSectionSimple.js +68 -63
- package/dist/BlogsSectionSimpleCentered.cjs +9 -9
- package/dist/BlogsSectionSimpleCentered.js +67 -54
- package/dist/BlogsSectionWithFilters.cjs +9 -9
- package/dist/BlogsSectionWithFilters.js +98 -84
- package/dist/BrandHitsSection.cjs +7 -7
- package/dist/BrandHitsSection.js +50 -32
- package/dist/{CategorySimpleCard-DRQuoxXu.js → CategorySimpleCard-CEzArySG.js} +18 -17
- package/dist/{CategorySimpleCard-D5N8cx0Z.cjs → CategorySimpleCard-COGlTj06.cjs} +5 -5
- package/dist/DetailedProductsInfinitiveSection.cjs +4 -4
- package/dist/DetailedProductsInfinitiveSection.js +23 -21
- package/dist/DetailedProductsSection.cjs +3 -3
- package/dist/DetailedProductsSection.js +38 -35
- package/dist/FieldOfInterestsMasonrySection.cjs +12 -12
- package/dist/FieldOfInterestsMasonrySection.js +87 -83
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +7 -7
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +47 -43
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +6 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +87 -62
- package/dist/GeneralWithTagsCardsSection.cjs +4 -4
- package/dist/GeneralWithTagsCardsSection.js +83 -46
- package/dist/GiftCardsSection.cjs +7 -7
- package/dist/GiftCardsSection.js +56 -47
- package/dist/MasonryGeneralCardsSection.cjs +9 -9
- package/dist/MasonryGeneralCardsSection.js +82 -68
- package/dist/OverlayGeneralCardsSection.cjs +5 -5
- package/dist/OverlayGeneralCardsSection.js +58 -50
- package/dist/ProductsWithBannerSection.cjs +10 -10
- package/dist/ProductsWithBannerSection.js +79 -70
- package/dist/QuattroCardsSection.cjs +8 -8
- package/dist/QuattroCardsSection.js +62 -40
- package/dist/ReviewsSection.cjs +8 -8
- package/dist/ReviewsSection.js +92 -67
- package/dist/SalesCampaignsSection.cjs +18 -18
- package/dist/SalesCampaignsSection.js +304 -298
- package/dist/ShopCardsSection.cjs +3 -3
- package/dist/ShopCardsSection.js +25 -23
- package/dist/SimpleCategoriesSection.cjs +4 -4
- package/dist/SimpleCategoriesSection.js +25 -22
- package/dist/SimpleProductsSection.cjs +3 -3
- package/dist/SimpleProductsSection.js +53 -50
- package/dist/UrgentSaleProductsSection.cjs +4 -4
- package/dist/UrgentSaleProductsSection.js +41 -38
- package/dist/{index-CA59z2ge.js → index-9inVkeN6.js} +46 -40
- package/dist/{index-C8QkdNHi.js → index-BB63Jo6p.js} +42 -36
- package/dist/{index-DHV9awrE.cjs → index-BFc3nxYZ.cjs} +3 -3
- package/dist/{index-MiN854X_.cjs → index-BWE-RCPy.cjs} +6 -6
- package/dist/{index-Bmr3IeZ_.cjs → index-DBokGIps.cjs} +14 -14
- package/dist/{index-BipuzfLW.js → index-DMHtIdm-.js} +39 -29
- package/dist/{index-0p_3g3pT.cjs → index-D_5jNP-o.cjs} +3 -3
- package/dist/{index-DZ8515cZ.js → index-DdUC0zgY.js} +211 -192
- 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"),d=require("react"),S=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./utils-RnrgDDZP.cjs"),z=require("./consts-goSZX3xP.cjs"),me=require("./Icon.cjs"),de=require("./ShopAvatar-CV3lj34D.cjs"),$e=require("./Badge.cjs"),o=require("./index-BpbMKBf_.cjs"),ue=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),pe=require("./IconButton.cjs"),fe=require("./useDetectMobile-zkbzoOGV.cjs"),Te=require("./index-Be-_NM9Q.cjs"),Ie=require("./motion-B_VPZaJq.cjs"),i=require("./style-BAcV7F53.cjs"),Ce=S.styled.a`
|
|
2
2
|
text-decoration: none;
|
|
3
3
|
color: var(--gray-950);
|
|
4
4
|
cursor: pointer;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
padding: 1rem;
|
|
14
14
|
gap: 0;
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
17
|
-
border-radius: ${n=>
|
|
16
|
+
`,Ne=S.styled.div`
|
|
17
|
+
border-radius: ${n=>w.getBorderRadiusValueWithUnits(n.theme,"edged")};
|
|
18
18
|
height: 13.75rem;
|
|
19
19
|
width: 13.75rem;
|
|
20
20
|
min-width: 13.75rem;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
transform: scale(1.25);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,De=S.styled.div`
|
|
40
40
|
flex: 1;
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
@@ -144,13 +144,13 @@
|
|
|
144
144
|
gap: 0.25rem;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
`,
|
|
147
|
+
`,ge=(n=!1,t=!1,a=!1)=>`
|
|
148
148
|
display: flex;
|
|
149
149
|
${t?"flex-wrap: wrap;":""}
|
|
150
150
|
${t?"":"flex-wrap: nowrap;"}
|
|
151
151
|
${n?"align-items: center;":""}
|
|
152
|
-
${
|
|
153
|
-
`,
|
|
152
|
+
${a?"justify-content: center;":""}
|
|
153
|
+
`,Le=S.styled.a`
|
|
154
154
|
text-decoration: none;
|
|
155
155
|
color: var(--gray-950);
|
|
156
156
|
${n=>n.hasPermission===!0&&"cursor: pointer"};
|
|
@@ -168,14 +168,14 @@
|
|
|
168
168
|
text-decoration: none;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
${
|
|
171
|
+
${ge(!0)}
|
|
172
172
|
gap: 0.5rem;
|
|
173
173
|
padding: 0.5rem;
|
|
174
174
|
color: var(--gray-950, #14161a);
|
|
175
175
|
font-weight: 500;
|
|
176
176
|
font-size: 1rem;
|
|
177
177
|
line-height: 1.5rem;
|
|
178
|
-
border-radius: ${n=>
|
|
178
|
+
border-radius: ${n=>w.getBorderRadiusValueWithUnits(n.theme,"slight")};
|
|
179
179
|
transition: all 0.25s ease;
|
|
180
180
|
& .description {
|
|
181
181
|
font-size: 0.85rem;
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
font-weight: 400;
|
|
185
185
|
}
|
|
186
186
|
& .logo-wrapper {
|
|
187
|
-
${
|
|
187
|
+
${ge(!0,!1,!0)}
|
|
188
188
|
flex-shrink: 0;
|
|
189
189
|
border-radius: 999px;
|
|
190
190
|
|
|
@@ -227,14 +227,14 @@
|
|
|
227
227
|
padding: 0;
|
|
228
228
|
font-size: 0.875rem;
|
|
229
229
|
}
|
|
230
|
-
`,
|
|
230
|
+
`,Ee=S.styled.div`
|
|
231
231
|
position: absolute;
|
|
232
232
|
top: 0.5rem;
|
|
233
233
|
${n=>n.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
|
|
234
234
|
display: flex;
|
|
235
235
|
gap: 0.25rem;
|
|
236
|
-
`,
|
|
237
|
-
border-radius: ${n=>
|
|
236
|
+
`,ze=S.styled.div`
|
|
237
|
+
border-radius: ${n=>w.getBorderRadiusValueWithUnits(n.theme,n.borderRadius||"slight")};
|
|
238
238
|
background-color: ${n=>n==null?void 0:n.color};
|
|
239
239
|
color: white;
|
|
240
240
|
height: 1.5rem;
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
& i {
|
|
250
250
|
font-size: 0.813rem;
|
|
251
251
|
}
|
|
252
|
-
`,
|
|
252
|
+
`,Re=d.forwardRef(({src:n,...t},a)=>{const s=d.useRef();return d.useEffect(()=>{var m;const p=l=>{l.target.src=de.DefaultShopImage,l.onerror=null};return(m=s==null?void 0:s.current)==null||m.addEventListener("error",p),()=>{var l;(l=s==null?void 0:s.current)==null||l.removeEventListener("error",p)}},[]),r.jsx(d.Fragment,{ref:a,children:w.isDefinedNotEmptyString(n)?r.jsx("img",{ref:s,src:n,...t}):r.jsx("img",{src:de.DefaultShopImage,...t})})}),xe=n=>{const{uuid:t,hasPermission:a=!0,isUser:s,image:p,imageComponent:m,name:l,notifications:_=0,color:g="primary",size:u="large",style:h,disabled:$,onClick:x=()=>{},isActive:v,className:T,shopCategory:I,themeData:j,LinkComponent:c}=n,y=c||"a",R={theme:ue.useTheme(),color:g,size:u,style:h,disabled:$};return d.createElement(Le,{onClick:f=>{f==null||f.preventDefault(),f.stopPropagation(),a===!0&&(x==null||x())},...R,key:l,className:`profile-item ${T}`,hasPermission:a,isActive:v,themeColor:(j==null?void 0:j.code)||"transparent",as:y,...c?{to:`/${s?"user":"shop"}/${t}`}:{href:`/${s?"user":"shop"}/${t}`}},r.jsx("div",{className:"logo-wrapper",children:w.isDefined(m)?m:p}),r.jsxs("div",{children:[r.jsx("div",{className:"name",children:l}),!s&&r.jsx("div",{className:"description",children:I}),_>0&&r.jsx("div",{className:"notifications-number",children:r.jsx($e,{className:"badge",color:"danger",size:"small",children:_>99?"99+":_})})]}))};xe.propTypes={id:o.PropTypes.any,isUserProfile:o.PropTypes.bool,themeColor:o.PropTypes.string,image:o.PropTypes.any,name:o.PropTypes.string,notifications:o.PropTypes.number,style:o.PropTypes.object,className:o.PropTypes.string,color:o.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:o.PropTypes.oneOf(["large"]),onSelect:o.PropTypes.func,hasPermission:o.PropTypes.bool};const he=n=>{if(n!==void 0){const t=new Date(n),a=t.getFullYear(),s=t.getMonth()+1;return`${String(t.getDate()).padStart(2)}. ${s}. ${a}.`}},Me=d.forwardRef((n,t)=>{var ce;const a=ue.useTheme(),{uuid:s,shopUuid:p,title:m="",coverPhoto:l,onSelect:_,startDate:g,endDate:u,salesPackages:h,shopName:$,shopCategory:x,shopImage:v,shopImageComponent:T,className:I,onSelectCard:j=()=>{},onSelectShop:c=()=>{},upcoming:y=!1,upcomingCampaignText:C,campaignSingleText:R,salesCampaignTypes:f=[],startsInPrefixTextPlural:V,startsinSuffixTextPlural:Z,startsInPrefixTextSingular:F,startsinSuffixTextSingular:ne,endsInPrefixTextPlural:X,endsinSuffixTextPlural:G,endsInPrefixTextSingular:U,endsinSuffixTextSingular:A,endedText:H,themeData:te,numberOfListings:D,numberOfListingsTextSingular:Y,numberOfListingsTextPlural:q,metadata:e,LinkComponent:O,...se}=n,J=O||"a",oe=d.useRef(),M=w.getDayNumberPrecise(g,u),K=M!==-1&&(M==null?void 0:M.isEnded)===!0,Q=M!==-1&&!K,ee=w.calcDaysUntil(g),L=w.calcDaysRemaining(u),be=L!==null&&L<=2&&L>0,ae=w.normalizeDate(u),ie=ae?new Date(ae):null,ve=new Date,re=ie?ie.getTime()-ve.getTime():null,B=re!==null&&re>0&&re<24*60*60*1e3,le=(b,E,k,P,N)=>k===1?`${b} ${k} ${P}`:`${E} ${k} ${N}`,Se=()=>{if(!u)return null;const b=w.normalizeDate(u),E=b?new Date(b):null;if(!E)return null;const k=je,P=E.getTime()-k.getTime();if(P<=0)return null;const N=Math.floor(P/(1e3*60*60)),_e=Math.floor(P%(1e3*60*60)/(1e3*60)),ke=Math.floor(P%(1e3*60)/1e3);return{hours:N,minutes:_e,seconds:ke}},[je,Pe]=d.useState(new Date);d.useEffect(()=>{if(!B)return;const b=setInterval(()=>{Pe(new Date)},1e3);return()=>clearInterval(b)},[B]);const W=B?Se():null;return r.jsxs(Ce,{ref:oe,theme:a,className:I,name:e==null?void 0:e.name,"data-accessor":e==null?void 0:e.accessor,onClick:b=>j(b,oe),as:J,...O?{to:`/shop/${p}/campaign/${s}`}:{href:`/shop/${p}/campaign/${s}`},...se,children:[r.jsxs(Ne,{theme:a,children:[r.jsx("img",{src:l}),r.jsx(Ee,{children:h==null?void 0:h.map((b,E)=>{var k,P;return r.jsx(ze,{color:(k=f==null?void 0:f.find(N=>N.value===b))==null?void 0:k.color,theme:a,children:r.jsx(me,{icon:(P=f==null?void 0:f.find(N=>N.value===b))==null?void 0:P.icon})},`package__${E}`)})})]}),r.jsxs(De,{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:(ce=y?C:R)==null?void 0:ce.toUpperCase()}),r.jsx("div",{className:"campaign-title-text",children:m}),u&&g&&r.jsxs("div",{className:"campaign-date",children:[he(g)," - ",he(u)]}),r.jsxs("div",{className:"timestamp-text",children:[D>0&&r.jsxs("span",{className:"listings-text",children:[D," ",D===1?Y:q," ","∙"," "]}),r.jsx("span",{className:`duration-text ${be?"urgent":""} ${Q?"":"starts-in"}`,children:B&&W?r.jsxs("div",{className:"countdown-timer",children:[U," ",W.hours.toString().padStart(2,"0"),":",W.minutes.toString().padStart(2,"0"),":",W.seconds.toString().padStart(2,"0")]}):Q&&!K&&L!==null&&L>0?le(U,X,L,A,G):K?H||"Završena":!Q&&ee!==null&&ee>0?le(F,V,ee,ne,Z):null})]})]})}),r.jsx(xe,{hasPermission:!0,image:r.jsx(Re,{src:v}),imageComponent:T,themeData:te,isActive:!0,isUser:!1,name:$,shopCategory:x,uuid:p,onClick:()=>c(p)})]})]})}),Ue=S.styled.div`
|
|
253
253
|
margin: 0 auto;
|
|
254
254
|
display: flex;
|
|
255
255
|
flex-direction: column;
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
`,
|
|
303
|
+
`,qe=S.styled(Ie.motion.div)`
|
|
304
304
|
display: grid;
|
|
305
305
|
grid-template-columns: repeat(${n=>n==null?void 0:n.numOfColumns}, 1fr);
|
|
306
306
|
gap: 1.5rem;
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
/* Safari and Chrome */
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
`,
|
|
331
|
+
`,ye=d.forwardRef(({icon:n,title:t,numOfSlides:a=2,showNavigation:s=!0,hasNextPage:p=!1,handleFetchNextPage:m=()=>{},children:l},_)=>{const[g,u]=d.useState(0),[h,$]=d.useState(1),x=fe.useDetectMobile(),v=(l==null?void 0:l.length)??1;d.useEffect(()=>{const c=()=>{$(a)};return window.addEventListener("resize",c),c(),()=>window.removeEventListener("resize",c)},[]);const T=x?l:l==null?void 0:l.slice(g,g+h),I=c=>{var C;(C=c==null?void 0:c.target)==null||C.blur();const y=g+h;y<v&&u(y),y+h>=v&&p&&m()},j=c=>{var y;(y=c==null?void 0:c.target)==null||y.blur(),g-h>=0&&u(g-h)};return r.jsxs(Ue,{ref:_,children:[r.jsx("div",{className:"scrollable-section__header",children:r.jsxs("div",{className:"scrollable-section__title",children:[w.isDefinedNotEmptyString(n)&&r.jsx(me,{icon:n,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),w.isDefinedNotEmptyString(t)&&r.jsxs("div",{className:"title__text",children:[" ",t]})]})}),r.jsxs(qe,{numOfColumns:a,...!x&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},children:[T,x&&p&&r.jsx(Te.InfiniteScrollEndElement,{onIsVisible:m})]},`scrollable-section__content-${g}`),s&&v>h&&!x&&r.jsxs("div",{className:"scrollable-section__navigation",children:[r.jsx(pe,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:g===0,onClick:j}),r.jsx(pe,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:g+h>=v,onClick:I})]})]})});ye.propTypes={icon:o.PropTypes.string,title:o.PropTypes.string,numOfSlides:o.PropTypes.number,numOfSlidesForMobile:o.PropTypes.number,handleFetchNextPage:o.PropTypes.func,showNavigation:o.PropTypes.bool};const Oe=S.styled.div`
|
|
332
332
|
display: flex;
|
|
333
333
|
flex: 1;
|
|
334
334
|
width: 100%;
|
|
@@ -345,7 +345,7 @@
|
|
|
345
345
|
border-radius: 1.25rem;
|
|
346
346
|
object-fit: cover;
|
|
347
347
|
}
|
|
348
|
-
`,
|
|
348
|
+
`,we=d.forwardRef(({sectionName:n,imageUrl:t,maxHeight:a="16.25rem",className:s="",handleClick:p=()=>{}},m)=>r.jsx(Oe,{ref:m,maxHeight:a,onClick:p,className:`itemless-banner ${s}`,children:r.jsx("img",{src:t,alt:`itemless-banner__${n}`})}));we.propTypes={sectionName:o.PropTypes.string,imageUrl:o.PropTypes.string,maxHeight:o.PropTypes.string,className:o.PropTypes.string,handleClick:o.PropTypes.func};const Be=S.styled(i.SkeletonRowWrapper)`
|
|
349
349
|
@media (max-width: ${z.MOBILE_SIZE_PX+"px"}) {
|
|
350
350
|
flex-direction: column;
|
|
351
351
|
|
|
@@ -360,4 +360,4 @@
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
`,
|
|
363
|
+
`,We=({keyPrefix:n})=>r.jsxs(Be,{children:[r.jsxs(i.SkeletonRowWrapper,{children:[r.jsx(i.SkeletonSquarePlaceholder,{width:"13.75rem",height:"13.75rem",className:"skeleton__image"},`${n}-1`),r.jsxs(i.SkeletonColumnWrapper,{noGradient:!0,children:[r.jsx(i.SkeletonLinePlaceholder,{height:"1rem"}),r.jsx(i.SkeletonLinePlaceholder,{height:"1.75rem"}),r.jsx(i.SkeletonLinePlaceholder,{height:"1.25rem"}),r.jsx(i.SkeletonLinePlaceholder,{height:"2rem"}),r.jsxs(i.SkeletonRowWrapper,{alignItems:"center",noGradient:!0,children:[r.jsx(i.SkeletonCirclePlaceholder,{width:"2.5rem",height:"2.5rem"}),r.jsx(i.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]}),r.jsxs(i.SkeletonRowWrapper,{noGradient:!0,children:[r.jsx(i.SkeletonSquarePlaceholder,{width:"13.75rem",height:"13.75rem",className:"skeleton__image"},`${n}-2`),r.jsxs(i.SkeletonColumnWrapper,{noGradient:!0,children:[r.jsx(i.SkeletonLinePlaceholder,{height:"1rem"}),r.jsx(i.SkeletonLinePlaceholder,{height:"1.75rem"}),r.jsx(i.SkeletonLinePlaceholder,{height:"1.25rem"}),r.jsx(i.SkeletonLinePlaceholder,{height:"2rem"}),r.jsxs(i.SkeletonRowWrapper,{alignItems:"center",noGradient:!0,children:[r.jsx(i.SkeletonCirclePlaceholder,{width:"2.5rem",height:"2.5rem"}),r.jsx(i.SkeletonLinePlaceholder,{width:"5rem",height:"1.25rem"})]})]})]})]}),Ve=({keyPrefix:n,isLoading:t=!1,fallbackComponent:a=r.jsx(r.Fragment,{}),children:s})=>r.jsx(d.Suspense,{fallbackComponent:a,children:t===!0?r.jsx(We,{keyPrefix:n}):s}),Ze=d.memo(Me),Fe=d.forwardRef(({sellerType:n="Shop",items:t=[],title:a,icon:s,isLoading:p,onSelectCard:m=()=>{},onSelectShop:l=()=>{},getImage:_=()=>{},campaignSingleText:g,upcomingCampaignText:u,salesCampaignTypes:h=[],startsInPrefixTextPlural:$,startsinSuffixTextPlural:x,startsInPrefixTextSingular:v,startsinSuffixTextSingular:T,endsInPrefixTextPlural:I,endsinSuffixTextPlural:j,endsInPrefixTextSingular:c,endsinSuffixTextSingular:y,endedText:C,numOfSlides:R=2,showNavigation:f=!0,numberOfListingsTextSingular:V,numberOfListingsTextPlural:Z,itemlessImageUrl:F,itemlessLink:ne,handleItemlessLink:X=()=>{},componentName:G,hasNextPage:U=!1,handleFetchNextPage:A=()=>{},LinkComponent:H},te)=>{const D=fe.useDetectMobile(),Y=d.useMemo(()=>{let q=t==null?void 0:t.map((e,O)=>r.jsx(Ze,{className:"campaign-item",coverPhoto:_(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:(se,J)=>m(e==null?void 0:e.campaignUuid,e==null?void 0:e.shopUuid,J),onSelectShop:()=>l(e==null?void 0:e.shopUuid),campaignSingleText:g,upcomingCampaignText:u,upcoming:e==null?void 0:e.upcoming,salesCampaignTypes:h,startsInPrefixTextPlural:$,startsinSuffixTextPlural:x,startsInPrefixTextSingular:v,startsinSuffixTextSingular:T,endsInPrefixTextPlural:I,endsinSuffixTextPlural:j,endsInPrefixTextSingular:c,endsinSuffixTextSingular:y,endedText:C,themeData:e==null?void 0:e.themeData,numberOfListings:e==null?void 0:e.numberOfListings,numberOfListingsTextSingular:V,numberOfListingsTextPlural:Z,metadata:{name:G,accessor:e==null?void 0:e.accessor},LinkComponent:H},`campaign__item__${O}__${e==null?void 0:e.startDate}___${e==null?void 0:e.endDate}`));return(t==null?void 0:t.length)<2&&!D?[...q,r.jsx(we,{imageUrl:F,className:"campaign-item",handleClick:X},"itemless-campaign-section-banner")]:q},[t]);return r.jsx(Ve,{isLoading:p,keyPrefix:"sales-campaign-skeleton",children:r.jsx(ye,{icon:s,title:a,numOfSlides:R,showNavigation:f,hasNextPage:U,handleFetchNextPage:A,children:Y},`sales-campaign-section__${D}`)})});module.exports=Fe;
|