@lanaco/lnc-react-ui 4.0.160 → 4.0.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/BlogCardsSponsoredSection.cjs +4 -2
  2. package/dist/BlogCardsSponsoredSection.js +4 -2
  3. package/dist/BlogListSection.cjs +1 -1
  4. package/dist/BlogListSection.js +1 -1
  5. package/dist/BlogsSectionDetailed.cjs +1 -1
  6. package/dist/BlogsSectionDetailed.js +1 -1
  7. package/dist/BlogsSectionSimple.cjs +1 -1
  8. package/dist/BlogsSectionSimple.js +1 -1
  9. package/dist/BlogsSectionWithFilters.cjs +1 -1
  10. package/dist/BlogsSectionWithFilters.js +2 -2
  11. package/dist/DetailedProductsInfinitiveSection.cjs +2 -0
  12. package/dist/DetailedProductsInfinitiveSection.js +2 -0
  13. package/dist/DetailedProductsSection.cjs +1 -1
  14. package/dist/DetailedProductsSection.js +2 -2
  15. package/dist/FieldOfInterestsMasonrySection.cjs +20 -12
  16. package/dist/FieldOfInterestsMasonrySection.js +35 -27
  17. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +2 -0
  18. package/dist/FieldOfInterestsWithTagsCardsSection.js +5 -3
  19. package/dist/GiftCardsSection.cjs +1 -1
  20. package/dist/GiftCardsSection.js +1 -1
  21. package/dist/LocationSearchSection.cjs +1 -1
  22. package/dist/LocationSearchSection.js +1 -1
  23. package/dist/MasonryGeneralCardsSection.cjs +1 -3
  24. package/dist/MasonryGeneralCardsSection.js +9 -11
  25. package/dist/ProductsWithBannerSection.cjs +17 -24
  26. package/dist/ProductsWithBannerSection.js +60 -67
  27. package/dist/QuattroCardsSection.cjs +2 -0
  28. package/dist/QuattroCardsSection.js +2 -0
  29. package/dist/SalesCampaignsSection.cjs +35 -33
  30. package/dist/SalesCampaignsSection.js +272 -249
  31. package/dist/ShopCardsSection.cjs +3 -1
  32. package/dist/ShopCardsSection.js +2 -0
  33. package/dist/SimpleCategoriesSection.cjs +1 -1
  34. package/dist/SimpleCategoriesSection.js +1 -1
  35. package/dist/index-Be-_NM9Q.cjs +4 -0
  36. package/dist/index-BvQx3xAm.cjs +95 -0
  37. package/dist/index-C0LcDEqa.js +47 -0
  38. package/dist/index-dXWRbvgi.js +345 -0
  39. package/dist/{style-BLuyU97E.js → style-DKAOBWn3.js} +1 -0
  40. package/dist/{style-lSjkOR95.cjs → style-Db3VFbfP.cjs} +1 -0
  41. package/package.json +1 -1
  42. package/dist/index-D0xXo7W6.cjs +0 -98
  43. package/dist/index-Dweo-G3H.js +0 -384
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),c=require("react"),m=require("./emotion-styled.browser.esm-BtEseadx.cjs"),x=require("./utils-Dl9xPH4c.cjs"),P=require("./consts-goSZX3xP.cjs"),ce=require("./motion-B_VPZaJq.cjs"),s=require("./index-BpbMKBf_.cjs"),de=require("./Icon.cjs"),ne=require("./ShopAvatar-CV3lj34D.cjs"),je=require("./Badge.cjs"),Y=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),se=require("./IconButton.cjs"),ge=require("./useDetectMobile-zkbzoOGV.cjs"),Te=m.styled.div`
1
+ "use strict";const n=require("react/jsx-runtime"),c=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./utils-Dl9xPH4c.cjs"),D=require("./consts-goSZX3xP.cjs"),ce=require("./motion-B_VPZaJq.cjs"),s=require("./index-BpbMKBf_.cjs"),de=require("./Icon.cjs"),te=require("./ShopAvatar-CV3lj34D.cjs"),je=require("./Badge.cjs"),J=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),se=require("./IconButton.cjs"),ge=require("./useDetectMobile-zkbzoOGV.cjs"),$e=require("./index-Be-_NM9Q.cjs"),Te=p.styled.div`
2
2
  cursor: pointer;
3
3
  display: flex;
4
4
  gap: 1rem;
@@ -6,13 +6,13 @@
6
6
  border-radius: 1.25rem;
7
7
  border: 1px solid var(--gray-200, #e4e9f0);
8
8
 
9
- @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
9
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
10
10
  flex-direction: column;
11
11
  padding: 1rem;
12
12
  gap: 0;
13
13
  }
14
- `,Se=m.styled.div`
15
- border-radius: ${e=>x.getBorderRadiusValueWithUnits(e.theme,"edged")};
14
+ `,Pe=p.styled.div`
15
+ border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,"edged")};
16
16
  height: 13.75rem;
17
17
  width: 13.75rem;
18
18
  min-width: 13.75rem;
@@ -34,7 +34,7 @@
34
34
  transform: scale(1.25);
35
35
  }
36
36
  }
37
- `,$e=m.styled.div`
37
+ `,Se=p.styled.div`
38
38
  flex: 1;
39
39
  display: flex;
40
40
  flex-direction: column;
@@ -117,7 +117,7 @@
117
117
  color: var(--gray-600, #676e79);
118
118
  }
119
119
 
120
- @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
120
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
121
121
  padding: 1rem 0 0 0;
122
122
 
123
123
  & .campaign-title-text {
@@ -142,13 +142,13 @@
142
142
  gap: 0.25rem;
143
143
  }
144
144
  }
145
- `,ae=(e=!1,n=!1,a=!1)=>`
145
+ `,ae=(e=!1,t=!1,a=!1)=>`
146
146
  display: flex;
147
- ${n?"flex-wrap: wrap;":""}
148
- ${n?"":"flex-wrap: nowrap;"}
147
+ ${t?"flex-wrap: wrap;":""}
148
+ ${t?"":"flex-wrap: nowrap;"}
149
149
  ${e?"align-items: center;":""}
150
150
  ${a?"justify-content: center;":""}
151
- `,Pe=m.styled(ce.motion.div)`
151
+ `,Ie=p.styled(ce.motion.div)`
152
152
  text-decoration: none;
153
153
  ${e=>e.hasPermission===!0&&"cursor: pointer"};
154
154
 
@@ -172,7 +172,7 @@
172
172
  font-weight: 500;
173
173
  font-size: 1rem;
174
174
  line-height: 1.5rem;
175
- border-radius: ${e=>x.getBorderRadiusValueWithUnits(e.theme,"slight")};
175
+ border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,"slight")};
176
176
  transition: all 0.25s ease;
177
177
  & .description {
178
178
  font-size: 0.85rem;
@@ -220,18 +220,18 @@
220
220
  background-color: var(--gray-95080, #14161acc);
221
221
  }
222
222
 
223
- @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
223
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
224
224
  padding: 0;
225
225
  font-size: 0.875rem;
226
226
  }
227
- `,Ie=m.styled.div`
227
+ `,Ce=p.styled.div`
228
228
  position: absolute;
229
229
  top: 0.5rem;
230
230
  ${e=>e.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
231
231
  display: flex;
232
232
  gap: 0.25rem;
233
- `,Ce=m.styled.div`
234
- border-radius: ${e=>x.getBorderRadiusValueWithUnits(e.theme,e.borderRadius||"slight")};
233
+ `,ke=p.styled.div`
234
+ border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,e.borderRadius||"slight")};
235
235
  background-color: ${e=>e==null?void 0:e.color};
236
236
  color: white;
237
237
  height: 1.5rem;
@@ -246,7 +246,7 @@
246
246
  & i {
247
247
  font-size: 0.813rem;
248
248
  }
249
- `,ke=c.forwardRef(({src:e,...n},a)=>{const o=c.useRef();return c.useEffect(()=>{var u;const l=i=>{i.target.src=ne.DefaultShopImage,i.onerror=null};return(u=o==null?void 0:o.current)==null||u.addEventListener("error",l),()=>{var i;(i=o==null?void 0:o.current)==null||i.removeEventListener("error",l)}},[]),t.jsx(c.Fragment,{ref:a,children:x.isDefinedNotEmptyString(e)?t.jsx("img",{ref:o,src:e,...n}):t.jsx("img",{src:ne.DefaultShopImage,...n})})}),pe=e=>{const{uuid:n,hasPermission:a=!0,isUser:o,image:l,imageComponent:u,name:i,notifications:p=0,color:d="primary",size:w="large",style:I,disabled:C,onClick:j=()=>{},isActive:k,className:b,shopCategory:v,themeData:_}=e,T={theme:Y.useTheme(),color:d,size:w,style:I,disabled:C};return c.createElement(Pe,{onClick:g=>{g.stopPropagation(),a===!0&&(j==null||j())},...T,key:i,className:`profile-item ${b}`,hasPermission:a,isActive:k,themeColor:(_==null?void 0:_.code)||"transparent"},t.jsx("div",{className:"logo-wrapper",children:x.isDefined(u)?u:l}),t.jsxs("div",{children:[t.jsx("div",{className:"name",children:i}),!o&&t.jsx("div",{className:"description",children:v}),p>0&&t.jsx("div",{className:"notifications-number",children:t.jsx(je,{className:"badge",color:"danger",size:"small",children:p>99?"99+":p})})]}))};pe.propTypes={id:s.PropTypes.any,isUserProfile:s.PropTypes.bool,themeColor:s.PropTypes.string,image:s.PropTypes.any,name:s.PropTypes.string,notifications:s.PropTypes.number,style:s.PropTypes.object,className:s.PropTypes.string,color:s.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:s.PropTypes.oneOf(["large"]),onSelect:s.PropTypes.func,hasPermission:s.PropTypes.bool};const oe=(e,n)=>{if(!e||!n)return null;const a=e.getTime()-n.getTime(),o=24*60*60*1e3;return Math.floor(a/o)},ie=e=>{if(e!==void 0){const n=new Date(e),a=n.getFullYear(),o=n.getMonth()+1;return`${String(n.getDate()).padStart(2)}. ${o}. ${a}.`}},me=c.forwardRef((e,n)=>{var te;const a=Y.useTheme(),{shopUuid:o,title:l="",coverPhoto:u,onSelect:i,startDate:p,endDate:d,salesPackages:w,shopName:I,shopCategory:C,shopImage:j,shopImageComponent:k,className:b,onSelectCard:v=()=>{},onSelectShop:_=()=>{},upcoming:N=!1,upcomingCampaignText:T,campaignSingleText:g,salesCampaignTypes:h=[],startsInPrefixTextPlural:B,startsinSuffixTextPlural:q,startsInPrefixTextSingular:W,startsinSuffixTextSingular:J,endsInPrefixTextPlural:V,endsinSuffixTextPlural:F,endsInPrefixTextSingular:X,endsinSuffixTextSingular:M,themeData:Z,numberOfListings:D,numberOfListingsTextSingular:r,numberOfListingsTextPlural:A,metadata:S,...G}=e,K=c.useRef(),Q=p?new Date(p)<=new Date:!1,fe=oe(p?new Date(p):null,new Date),z=oe(d?new Date(d):null,new Date),xe=z!==null&&z<=2&&z>0,ee=d?new Date(d).getTime():null,ye=Date.now(),H=ee!==null?ee-ye:null,R=H!==null&&H>0&&H<24*60*60*1e3,re=(y,O,f,E,$)=>f===1?`${y} ${f} ${E}`:`${O} ${f} ${$}`,we=()=>{if(!d)return null;const y=be,f=new Date(d).getTime()-y.getTime();if(f<=0)return null;const E=Math.floor(f/(1e3*60*60)),$=Math.floor(f%(1e3*60*60)/(1e3*60)),_e=Math.floor(f%(1e3*60)/1e3);return{hours:E,minutes:$,seconds:_e}},[be,ve]=c.useState(new Date);c.useEffect(()=>{if(!R)return;const y=setInterval(()=>{ve(new Date)},1e3);return()=>clearInterval(y)},[R]);const L=R?we():null;return t.jsxs(Te,{ref:K,theme:a,className:b,name:S==null?void 0:S.name,"data-accessor":S==null?void 0:S.accessor,onClick:y=>v(y,K),...G,children:[t.jsxs(Se,{theme:a,onClick:()=>i==null?void 0:i(),children:[t.jsx("img",{src:u}),t.jsx(Ie,{children:w==null?void 0:w.map((y,O)=>{var f,E;return t.jsx(Ce,{color:(f=h==null?void 0:h.find($=>$.value===y))==null?void 0:f.color,theme:a,children:t.jsx(de,{icon:(E=h==null?void 0:h.find($=>$.value===y))==null?void 0:E.icon})},`package__${O}`)})})]}),t.jsxs($e,{theme:a,children:[t.jsx("div",{className:"text-block-wrapper",children:t.jsxs("div",{className:"title-block-wrapper",children:[t.jsx("div",{className:"campaign-title",children:(te=N?T:g)==null?void 0:te.toUpperCase()}),t.jsx("div",{className:"campaign-title-text",children:l}),d&&p&&t.jsxs("div",{className:"campaign-date",children:[ie(p)," - ",ie(d)]}),t.jsxs("div",{className:"timestamp-text",children:[D>0&&t.jsxs("span",{className:"listings-text",children:[D," ",D===1?r:A," ","∙"," "]}),t.jsx("span",{className:`duration-text ${xe?"urgent":""} ${Q?"":"starts-in"}`,children:R&&L?t.jsxs("div",{className:"countdown-timer",children:[X," ",L.hours.toString().padStart(2,"0"),":",L.minutes.toString().padStart(2,"0"),":",L.seconds.toString().padStart(2,"0")]}):Q?re(X,V,z,M,F):re(W,B,fe,J,q)})]})]})}),t.jsx(pe,{hasPermission:!0,image:t.jsx(ke,{src:j}),imageComponent:k,themeData:Z,isActive:!0,isUser:!1,name:I,shopCategory:C,onClick:()=>_(o)})]})]})});me.propTypes={title:s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.element]),numberOfListings:s.PropTypes.number,dropdown:s.PropTypes.any,color:s.PropTypes.string};m.styled.div`
249
+ `,De=c.forwardRef(({src:e,...t},a)=>{const o=c.useRef();return c.useEffect(()=>{var m;const d=i=>{i.target.src=te.DefaultShopImage,i.onerror=null};return(m=o==null?void 0:o.current)==null||m.addEventListener("error",d),()=>{var i;(i=o==null?void 0:o.current)==null||i.removeEventListener("error",d)}},[]),n.jsx(c.Fragment,{ref:a,children:w.isDefinedNotEmptyString(e)?n.jsx("img",{ref:o,src:e,...t}):n.jsx("img",{src:te.DefaultShopImage,...t})})}),pe=e=>{const{uuid:t,hasPermission:a=!0,isUser:o,image:d,imageComponent:m,name:i,notifications:h=0,color:l="primary",size:b="large",style:u,disabled:P,onClick:f=()=>{},isActive:v,className:S,shopCategory:I,themeData:j}=e,x={theme:J.useTheme(),color:l,size:b,style:u,disabled:P};return c.createElement(Ie,{onClick:$=>{$.stopPropagation(),a===!0&&(f==null||f())},...x,key:i,className:`profile-item ${S}`,hasPermission:a,isActive:v,themeColor:(j==null?void 0:j.code)||"transparent"},n.jsx("div",{className:"logo-wrapper",children:w.isDefined(m)?m:d}),n.jsxs("div",{children:[n.jsx("div",{className:"name",children:i}),!o&&n.jsx("div",{className:"description",children:I}),h>0&&n.jsx("div",{className:"notifications-number",children:n.jsx(je,{className:"badge",color:"danger",size:"small",children:h>99?"99+":h})})]}))};pe.propTypes={id:s.PropTypes.any,isUserProfile:s.PropTypes.bool,themeColor:s.PropTypes.string,image:s.PropTypes.any,name:s.PropTypes.string,notifications:s.PropTypes.number,style:s.PropTypes.object,className:s.PropTypes.string,color:s.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral"]),size:s.PropTypes.oneOf(["large"]),onSelect:s.PropTypes.func,hasPermission:s.PropTypes.bool};const oe=(e,t)=>{if(!e||!t)return null;const a=e.getTime()-t.getTime(),o=24*60*60*1e3;return Math.floor(a/o)},ie=e=>{if(e!==void 0){const t=new Date(e),a=t.getFullYear(),o=t.getMonth()+1;return`${String(t.getDate()).padStart(2)}. ${o}. ${a}.`}},me=c.forwardRef((e,t)=>{var ne;const a=J.useTheme(),{shopUuid:o,title:d="",coverPhoto:m,onSelect:i,startDate:h,endDate:l,salesPackages:b,shopName:u,shopCategory:P,shopImage:f,shopImageComponent:v,className:S,onSelectCard:I=()=>{},onSelectShop:j=()=>{},upcoming:g=!1,upcomingCampaignText:x,campaignSingleText:$,salesCampaignTypes:T=[],startsInPrefixTextPlural:q,startsinSuffixTextPlural:W,startsInPrefixTextSingular:V,startsinSuffixTextSingular:K,endsInPrefixTextPlural:F,endsinSuffixTextPlural:X,endsInPrefixTextSingular:E,endsinSuffixTextSingular:Z,themeData:Q,numberOfListings:C,numberOfListingsTextSingular:A,numberOfListingsTextPlural:M,metadata:r,...G}=e,H=c.useRef(),z=h?new Date(h)<=new Date:!1,fe=oe(h?new Date(h):null,new Date),R=oe(l?new Date(l):null,new Date),xe=R!==null&&R<=2&&R>0,ee=l?new Date(l).getTime():null,ye=Date.now(),Y=ee!==null?ee-ye:null,L=Y!==null&&Y>0&&Y<24*60*60*1e3,re=(_,U,y,N,k)=>y===1?`${_} ${y} ${N}`:`${U} ${y} ${k}`,we=()=>{if(!l)return null;const _=be,y=new Date(l).getTime()-_.getTime();if(y<=0)return null;const N=Math.floor(y/(1e3*60*60)),k=Math.floor(y%(1e3*60*60)/(1e3*60)),_e=Math.floor(y%(1e3*60)/1e3);return{hours:N,minutes:k,seconds:_e}},[be,ve]=c.useState(new Date);c.useEffect(()=>{if(!L)return;const _=setInterval(()=>{ve(new Date)},1e3);return()=>clearInterval(_)},[L]);const O=L?we():null;return n.jsxs(Te,{ref:H,theme:a,className:S,name:r==null?void 0:r.name,"data-accessor":r==null?void 0:r.accessor,onClick:_=>I(_,H),...G,children:[n.jsxs(Pe,{theme:a,onClick:()=>i==null?void 0:i(),children:[n.jsx("img",{src:m}),n.jsx(Ce,{children:b==null?void 0:b.map((_,U)=>{var y,N;return n.jsx(ke,{color:(y=T==null?void 0:T.find(k=>k.value===_))==null?void 0:y.color,theme:a,children:n.jsx(de,{icon:(N=T==null?void 0:T.find(k=>k.value===_))==null?void 0:N.icon})},`package__${U}`)})})]}),n.jsxs(Se,{theme:a,children:[n.jsx("div",{className:"text-block-wrapper",children:n.jsxs("div",{className:"title-block-wrapper",children:[n.jsx("div",{className:"campaign-title",children:(ne=g?x:$)==null?void 0:ne.toUpperCase()}),n.jsx("div",{className:"campaign-title-text",children:d}),l&&h&&n.jsxs("div",{className:"campaign-date",children:[ie(h)," - ",ie(l)]}),n.jsxs("div",{className:"timestamp-text",children:[C>0&&n.jsxs("span",{className:"listings-text",children:[C," ",C===1?A:M," ","∙"," "]}),n.jsx("span",{className:`duration-text ${xe?"urgent":""} ${z?"":"starts-in"}`,children:L&&O?n.jsxs("div",{className:"countdown-timer",children:[E," ",O.hours.toString().padStart(2,"0"),":",O.minutes.toString().padStart(2,"0"),":",O.seconds.toString().padStart(2,"0")]}):z?re(E,F,R,Z,X):re(V,q,fe,K,W)})]})]})}),n.jsx(pe,{hasPermission:!0,image:n.jsx(De,{src:f}),imageComponent:v,themeData:Q,isActive:!0,isUser:!1,name:u,shopCategory:P,onClick:()=>j(o)})]})]})});me.propTypes={title:s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.element]),numberOfListings:s.PropTypes.number,dropdown:s.PropTypes.any,color:s.PropTypes.string};p.styled.div`
250
250
  display: flex;
251
251
  flex-direction: column;
252
252
  gap: 1.5rem;
@@ -277,26 +277,26 @@
277
277
  }
278
278
  }
279
279
 
280
- @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
280
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
281
281
  & .campaign-item {
282
282
  min-width: 100%;
283
283
  width: 100%;
284
284
  margin-right: 0;
285
285
  }
286
286
  }
287
- `;const U=m.styled.div`
287
+ `;const B=p.styled.div`
288
288
  width: ${e=>e.width||"100%"};
289
289
  height: ${e=>(e.heightCoeff||1)*1.125}rem;
290
290
  background-color: var(--gray-200, #dddfe4);
291
291
 
292
- ${x.linearGradientAnimation("-90deg")}
293
- `,Ne=m.styled.div`
292
+ ${w.linearGradientAnimation("-90deg")}
293
+ `,Ne=p.styled.div`
294
294
  display: flex;
295
295
  flex-direction: ${e=>e!=null&&e.row?"row":"column"};
296
296
  gap: ${e=>(e==null?void 0:e.gap)??"0.5rem"};
297
297
  width: ${e=>(e==null?void 0:e.width)??"100%"};
298
- `,le=m.styled.div`
299
- border-radius: ${e=>x.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
298
+ `,le=p.styled.div`
299
+ border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
300
300
  background: var(--gray-200, #dddfe4);
301
301
  position: relative;
302
302
  max-height: ${e=>(e==null?void 0:e.height)??"5rem"};
@@ -305,10 +305,10 @@
305
305
  width: ${e=>(e==null?void 0:e.width)??"5rem"};
306
306
  flex-shrink: 0;
307
307
 
308
- ${x.linearGradientAnimation()}
309
- `,De=m.styled.div`
308
+ ${w.linearGradientAnimation()}
309
+ `,Ee=p.styled.div`
310
310
  background: var(--white, #fff);
311
- border-radius: ${e=>x.getBorderRadiusValueWithUnits(e.theme,"edged")};
311
+ border-radius: ${e=>w.getBorderRadiusValueWithUnits(e.theme,"edged")};
312
312
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
313
313
  border: 1px solid var(--gray-95012, #14161a1f);
314
314
 
@@ -335,17 +335,17 @@
335
335
  gap: 0.5rem;
336
336
  }
337
337
 
338
- @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
338
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
339
339
  flex-direction: column;
340
340
 
341
341
  & .campaign__user {
342
342
  margin-top: 1rem;
343
343
  }
344
344
  }
345
- `,Ee=m.styled.div`
345
+ `,Me=p.styled.div`
346
346
  display: flex;
347
347
  gap: 1.5rem;
348
- `,Me=c.forwardRef(({},e)=>{const n=Y.useTheme();return t.jsxs(De,{ref:e,theme:n,children:[t.jsx("div",{className:"campaign__left-section",children:t.jsx(le,{theme:n,width:"15rem",height:"15rem",borderRadius:"edged"})}),t.jsxs("div",{className:"campaign__right-section",children:[t.jsxs(Ne,{theme:n,children:[t.jsx(U,{heightCoeff:.75,theme:n,width:"35%"}),t.jsx(U,{heightCoeff:1.25,theme:n}),t.jsx(U,{heightCoeff:3,theme:n})]}),t.jsxs("div",{className:"campaign__user",children:[t.jsx(le,{theme:n,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),t.jsx(U,{theme:n,width:"75%"})]})]})]})}),ze=({itemsCount:e=5,keyPrefix:n})=>t.jsx(Ee,{children:Array.from({length:e},(a,o)=>t.jsx(Me,{},`${n}-skeleton-campaign-card-${o}`))}),Re=({children:e,fallbackComponent:n=t.jsx(t.Fragment,{}),isLoading:a=!1,itemsCount:o=5,keyPrefix:l})=>t.jsx(c.Suspense,{fallback:n,children:a===!0?t.jsx(ze,{itemsCount:o,keyPrefix:l}):e}),Le=m.styled.div`
348
+ `,ze=c.forwardRef(({},e)=>{const t=J.useTheme();return n.jsxs(Ee,{ref:e,theme:t,children:[n.jsx("div",{className:"campaign__left-section",children:n.jsx(le,{theme:t,width:"15rem",height:"15rem",borderRadius:"edged"})}),n.jsxs("div",{className:"campaign__right-section",children:[n.jsxs(Ne,{theme:t,children:[n.jsx(B,{heightCoeff:.75,theme:t,width:"35%"}),n.jsx(B,{heightCoeff:1.25,theme:t}),n.jsx(B,{heightCoeff:3,theme:t})]}),n.jsxs("div",{className:"campaign__user",children:[n.jsx(le,{theme:t,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),n.jsx(B,{theme:t,width:"75%"})]})]})]})}),Re=({itemsCount:e=5,keyPrefix:t})=>n.jsx(Me,{children:Array.from({length:e},(a,o)=>n.jsx(ze,{},`${t}-skeleton-campaign-card-${o}`))}),Le=({children:e,fallbackComponent:t=n.jsx(n.Fragment,{}),isLoading:a=!1,itemsCount:o=5,keyPrefix:d})=>n.jsx(c.Suspense,{fallback:t,children:a===!0?n.jsx(Re,{itemsCount:o,keyPrefix:d}):e}),Oe=p.styled.div`
349
349
  margin: 0 auto;
350
350
  display: flex;
351
351
  flex-direction: column;
@@ -384,7 +384,9 @@
384
384
  right: 0;
385
385
  }
386
386
 
387
- @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
387
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
388
+ gap: 1.25rem;
389
+
388
390
  & .scrollable-section__header {
389
391
  & .scrollable-section__title {
390
392
  & .title__text {
@@ -394,13 +396,13 @@
394
396
  }
395
397
  }
396
398
  }
397
- `,Oe=m.styled(ce.motion.div)`
399
+ `,Ue=p.styled(ce.motion.div)`
398
400
  display: grid;
399
401
  grid-template-columns: repeat(${e=>e==null?void 0:e.numOfColumns}, 1fr);
400
402
  gap: 1.5rem;
401
403
  width: 100%;
402
404
 
403
- @media (max-width: ${P.MOBILE_SIZE_PX+"px"}) {
405
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
404
406
  display: flex;
405
407
  flex-wrap: nowrap;
406
408
  overflow-x: scroll;
@@ -422,7 +424,7 @@
422
424
  /* Safari and Chrome */
423
425
  }
424
426
  }
425
- `,he=c.forwardRef(({icon:e,title:n,numOfSlides:a=2,showNavigation:o=!0,children:l},u)=>{const[i,p]=c.useState(0),[d,w]=c.useState(1),[I,C]=c.useState(null),[j,k]=c.useState(null),b=ge.useDetectMobile(),v=(l==null?void 0:l.length)??1;c.useEffect(()=>{const g=()=>{w(a)};return window.addEventListener("resize",g),g(),()=>window.removeEventListener("resize",g)},[]);const _=b?l:l==null?void 0:l.slice(i,i+d),N=g=>{var h;(h=g==null?void 0:g.target)==null||h.blur(),i+d<v&&p(i+d)},T=g=>{var h;(h=g==null?void 0:g.target)==null||h.blur(),i-d>=0&&p(i-d)};return t.jsxs(Le,{ref:u,children:[t.jsx("div",{className:"scrollable-section__header",children:t.jsxs("div",{className:"scrollable-section__title",children:[x.isDefinedNotEmptyString(e)&&t.jsx(de,{icon:e,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),x.isDefinedNotEmptyString(n)&&t.jsxs("div",{className:"title__text",children:[" ",n]})]})}),t.jsx(Oe,{numOfColumns:a,...!b&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},children:_},`scrollable-section__content-${i}`),o&&v>d&&!b&&t.jsxs("div",{className:"scrollable-section__navigation",children:[t.jsx(se,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:i===0,onClick:T}),t.jsx(se,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:i+d>=v,onClick:N})]})]})});he.propTypes={icon:s.PropTypes.string,title:s.PropTypes.string,numOfSlides:s.PropTypes.number,numOfSlidesForMobile:s.PropTypes.number,showNavigation:s.PropTypes.bool};const Ue=m.styled.div`
427
+ `,he=c.forwardRef(({icon:e,title:t,numOfSlides:a=2,showNavigation:o=!0,hasNextPage:d=!1,handleFetchNextPage:m=()=>{},children:i},h)=>{const[l,b]=c.useState(0),[u,P]=c.useState(1),f=ge.useDetectMobile(),v=(i==null?void 0:i.length)??1;c.useEffect(()=>{const g=()=>{P(a)};return window.addEventListener("resize",g),g(),()=>window.removeEventListener("resize",g)},[]);const S=f?i:i==null?void 0:i.slice(l,l+u),I=g=>{var $;($=g==null?void 0:g.target)==null||$.blur();const x=l+u;x<v&&b(x),x+u>=v&&d&&m()},j=g=>{var x;(x=g==null?void 0:g.target)==null||x.blur(),l-u>=0&&b(l-u)};return n.jsxs(Oe,{ref:h,children:[n.jsx("div",{className:"scrollable-section__header",children:n.jsxs("div",{className:"scrollable-section__title",children:[w.isDefinedNotEmptyString(e)&&n.jsx(de,{icon:e,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),w.isDefinedNotEmptyString(t)&&n.jsxs("div",{className:"title__text",children:[" ",t]})]})}),n.jsxs(Ue,{numOfColumns:a,...!f&&{animate:{x:0,opacity:1},initial:{x:10,opacity:0}},children:[S,f&&d&&n.jsx($e.InfiniteScrollEndElement,{onIsVisible:m})]},`scrollable-section__content-${l}`),o&&v>u&&!f&&n.jsxs("div",{className:"scrollable-section__navigation",children:[n.jsx(se,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:l===0,onClick:j}),n.jsx(se,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:l+u>=v,onClick:I})]})]})});he.propTypes={icon:s.PropTypes.string,title:s.PropTypes.string,numOfSlides:s.PropTypes.number,numOfSlidesForMobile:s.PropTypes.number,handleFetchNextPage:s.PropTypes.func,showNavigation:s.PropTypes.bool};const Be=p.styled.div`
426
428
  display: flex;
427
429
  flex: 1;
428
430
  width: 100%;
@@ -439,4 +441,4 @@
439
441
  border-radius: 1.25rem;
440
442
  object-fit: cover;
441
443
  }
442
- `,ue=c.forwardRef(({sectionName:e,imageUrl:n,maxHeight:a="16.25rem",className:o="",handleClick:l=()=>{}},u)=>t.jsx(Ue,{ref:u,maxHeight:a,onClick:l,className:`itemless-banner ${o}`,children:t.jsx("img",{src:n,alt:`itemless-banner__${e}`})}));ue.propTypes={sectionName:s.PropTypes.string,imageUrl:s.PropTypes.string,maxHeight:s.PropTypes.string,className:s.PropTypes.string,handleClick:s.PropTypes.func};const Be=c.memo(me),qe=c.forwardRef(({sellerType:e="Shop",items:n=[],title:a,icon:o,isLoading:l,onSelectCard:u=()=>{},onSelectShop:i=()=>{},getImage:p=()=>{},campaignSingleText:d,upcomingCampaignText:w,salesCampaignTypes:I=[],startsInPrefixTextPlural:C,startsinSuffixTextPlural:j,startsInPrefixTextSingular:k,startsinSuffixTextSingular:b,endsInPrefixTextPlural:v,endsinSuffixTextPlural:_,endsInPrefixTextSingular:N,endsinSuffixTextSingular:T,numOfSlides:g=2,showNavigation:h=!0,numberOfListingsTextSingular:B,numberOfListingsTextPlural:q,itemlessImageUrl:W,itemlessLink:J,handleItemlessLink:V=()=>{},componentName:F},X)=>{const M=ge.useDetectMobile(),Z=c.useMemo(()=>{let D=n==null?void 0:n.map((r,A)=>t.jsx(Be,{className:"campaign-item",coverPhoto:p(r==null?void 0:r.coverPhoto,(r==null?void 0:r.uuid)||(r==null?void 0:r.campaignUuid)),description:r==null?void 0:r.description,endDate:r==null?void 0:r.endDate,salesPackages:r==null?void 0:r.salesPackages,sellerType:e,shopImage:r==null?void 0:r.profileImage,shopImageComponent:r==null?void 0:r.profileImageComponent,shopName:r==null?void 0:r.shopName,shopUuid:r==null?void 0:r.shopUuid,shopCategory:r==null?void 0:r.shopCategory,startDate:r==null?void 0:r.startDate,title:r==null?void 0:r.name,uuid:r==null?void 0:r.campaignUuid,onSelectCard:(S,G)=>u(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid,G),onSelectShop:()=>i(r==null?void 0:r.shopUuid),campaignSingleText:d,upcomingCampaignText:w,upcoming:r==null?void 0:r.upcoming,salesCampaignTypes:I,startsInPrefixTextPlural:C,startsinSuffixTextPlural:j,startsInPrefixTextSingular:k,startsinSuffixTextSingular:b,endsInPrefixTextPlural:v,endsinSuffixTextPlural:_,endsInPrefixTextSingular:N,endsinSuffixTextSingular:T,themeData:r==null?void 0:r.themeData,numberOfListings:r==null?void 0:r.numberOfListings,numberOfListingsTextSingular:B,numberOfListingsTextPlural:q,metadata:{name:F,accessor:r==null?void 0:r.accessor}},`campaign__item__${A}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}`));return(n==null?void 0:n.length)<2&&!M?[...D,t.jsx(ue,{imageUrl:W,className:"campaign-item",handleClick:V},"itemless-campaign-section-banner")]:D},[n]);return t.jsx(Re,{isLoading:l,itemsCount:M?1:2,keyPrefix:"sales-camp",children:t.jsx(he,{icon:o,title:a,numOfSlides:g,showNavigation:h,children:Z},`sales-campaign-section__${M}`)})});module.exports=qe;
444
+ `,ue=c.forwardRef(({sectionName:e,imageUrl:t,maxHeight:a="16.25rem",className:o="",handleClick:d=()=>{}},m)=>n.jsx(Be,{ref:m,maxHeight:a,onClick:d,className:`itemless-banner ${o}`,children:n.jsx("img",{src:t,alt:`itemless-banner__${e}`})}));ue.propTypes={sectionName:s.PropTypes.string,imageUrl:s.PropTypes.string,maxHeight:s.PropTypes.string,className:s.PropTypes.string,handleClick:s.PropTypes.func};const qe=c.memo(me),We=c.forwardRef(({sellerType:e="Shop",items:t=[],title:a,icon:o,isLoading:d,onSelectCard:m=()=>{},onSelectShop:i=()=>{},getImage:h=()=>{},campaignSingleText:l,upcomingCampaignText:b,salesCampaignTypes:u=[],startsInPrefixTextPlural:P,startsinSuffixTextPlural:f,startsInPrefixTextSingular:v,startsinSuffixTextSingular:S,endsInPrefixTextPlural:I,endsinSuffixTextPlural:j,endsInPrefixTextSingular:g,endsinSuffixTextSingular:x,numOfSlides:$=2,showNavigation:T=!0,numberOfListingsTextSingular:q,numberOfListingsTextPlural:W,itemlessImageUrl:V,itemlessLink:K,handleItemlessLink:F=()=>{},componentName:X,hasNextPage:E=!1,handleFetchNextPage:Z=()=>{}},Q)=>{const C=ge.useDetectMobile(),A=c.useMemo(()=>{let M=t==null?void 0:t.map((r,G)=>n.jsx(qe,{className:"campaign-item",coverPhoto:h(r==null?void 0:r.coverPhoto,(r==null?void 0:r.uuid)||(r==null?void 0:r.campaignUuid)),description:r==null?void 0:r.description,endDate:r==null?void 0:r.endDate,salesPackages:r==null?void 0:r.salesPackages,sellerType:e,shopImage:r==null?void 0:r.profileImage,shopImageComponent:r==null?void 0:r.profileImageComponent,shopName:r==null?void 0:r.shopName,shopUuid:r==null?void 0:r.shopUuid,shopCategory:r==null?void 0:r.shopCategory,startDate:r==null?void 0:r.startDate,title:r==null?void 0:r.name,uuid:r==null?void 0:r.campaignUuid,onSelectCard:(H,z)=>m(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid,z),onSelectShop:()=>i(r==null?void 0:r.shopUuid),campaignSingleText:l,upcomingCampaignText:b,upcoming:r==null?void 0:r.upcoming,salesCampaignTypes:u,startsInPrefixTextPlural:P,startsinSuffixTextPlural:f,startsInPrefixTextSingular:v,startsinSuffixTextSingular:S,endsInPrefixTextPlural:I,endsinSuffixTextPlural:j,endsInPrefixTextSingular:g,endsinSuffixTextSingular:x,themeData:r==null?void 0:r.themeData,numberOfListings:r==null?void 0:r.numberOfListings,numberOfListingsTextSingular:q,numberOfListingsTextPlural:W,metadata:{name:X,accessor:r==null?void 0:r.accessor}},`campaign__item__${G}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}`));return(t==null?void 0:t.length)<2&&!C?[...M,n.jsx(ue,{imageUrl:V,className:"campaign-item",handleClick:F},"itemless-campaign-section-banner")]:M},[t]);return n.jsx(Le,{isLoading:d,itemsCount:C?1:2,keyPrefix:"sales-camp",children:n.jsx(he,{icon:o,title:a,numOfSlides:$,showNavigation:T,hasNextPage:E,handleFetchNextPage:Z,children:A},`sales-campaign-section__${C}`)})});module.exports=We;