@lanaco/lnc-react-ui 4.0.124 → 4.0.126
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 +1 -1
- package/dist/BannerSectionCarousel.js +2 -0
- package/dist/BlogExploreSection.cjs +311 -0
- package/dist/BlogExploreSection.js +634 -0
- package/dist/BlogListSection.cjs +9 -6
- package/dist/BlogListSection.js +30 -27
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +30 -24
- package/dist/FaqSection.cjs +3 -175
- package/dist/FaqSection.js +121 -314
- package/dist/SalesCampaignsSection.cjs +52 -39
- package/dist/SalesCampaignsSection.js +337 -294
- package/dist/index.cjs +1 -1
- package/dist/index.js +37 -35
- package/dist/tag-BLBeUImg.cjs +173 -0
- package/dist/tag-D6in2BG6.js +204 -0
- package/package.json +3 -2
- package/vite.config.js +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),u=require("./emotion-styled.browser.esm-BtEseadx.cjs"),_=require("./utils-CZynEOC_.cjs"),M=require("./consts-goSZX3xP.cjs"),ae=require("./motion-B_VPZaJq.cjs"),s=require("./index-BpbMKBf_.cjs"),oe=require("./Icon.cjs"),we=require("./Badge.cjs"),G=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),ee=require("./IconButton.cjs"),ie=require("./useDetectMobile-zkbzoOGV.cjs"),be=u.styled.div`
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 1rem;
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
border-radius: 20px;
|
|
7
7
|
border: 1px solid var(--gray-95008, #14161a14);
|
|
8
8
|
|
|
9
|
-
@media (max-width: ${
|
|
9
|
+
@media (max-width: ${M.MOBILE_SIZE_PX+"px"}) {
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
padding: 0;
|
|
12
12
|
gap: 0;
|
|
13
13
|
border: none;
|
|
14
14
|
border-radius: 0;
|
|
15
15
|
}
|
|
16
|
-
`,ve=
|
|
16
|
+
`,ve=u.styled.div`
|
|
17
17
|
border-radius: ${e=>_.getBorderRadiusValueWithUnits(e.theme,"edged")};
|
|
18
|
-
height:
|
|
19
|
-
width:
|
|
20
|
-
min-width:
|
|
18
|
+
height: 13.75rem;
|
|
19
|
+
width: 13.75rem;
|
|
20
|
+
min-width: 13.75rem;
|
|
21
21
|
cursor: pointer;
|
|
22
22
|
|
|
23
23
|
position: relative;
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
@media (max-width: ${
|
|
40
|
+
@media (max-width: ${M.MOBILE_SIZE_PX+"px"}) {
|
|
41
41
|
width: 100%;
|
|
42
42
|
max-width: 100dvh;
|
|
43
43
|
height: 23.438rem;
|
|
44
44
|
}
|
|
45
|
-
`,
|
|
45
|
+
`,_e=u.styled.div`
|
|
46
46
|
flex: 1;
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
font-weight: 500;
|
|
57
57
|
font-size: 0.75rem;
|
|
58
58
|
letter-spacing: 0.1rem;
|
|
59
|
-
color: var(--
|
|
59
|
+
color: var(--teal-500, #009ea8);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
& .campaign-title-text {
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
& .title-block-wrapper {
|
|
75
75
|
display: flex;
|
|
76
76
|
flex-direction: column;
|
|
77
|
+
gap: 0.1875rem;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
& .timestamp-text {
|
|
@@ -98,6 +99,10 @@
|
|
|
98
99
|
&.urgent {
|
|
99
100
|
color: var(--primary-500, #f59e0b);
|
|
100
101
|
}
|
|
102
|
+
|
|
103
|
+
&.starts-in {
|
|
104
|
+
color: var(--teal-500, #009ea8);
|
|
105
|
+
}
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
& .countdown-timer {
|
|
@@ -109,7 +114,7 @@
|
|
|
109
114
|
background-color: transparent;
|
|
110
115
|
}
|
|
111
116
|
|
|
112
|
-
@media (max-width: ${
|
|
117
|
+
@media (max-width: ${M.MOBILE_SIZE_PX+"px"}) {
|
|
113
118
|
padding: 1.25rem;
|
|
114
119
|
|
|
115
120
|
& .campaign-title {
|
|
@@ -123,13 +128,13 @@
|
|
|
123
128
|
gap: 0.25rem;
|
|
124
129
|
}
|
|
125
130
|
}
|
|
126
|
-
`,
|
|
131
|
+
`,re=(e=!1,n=!1,o=!1)=>`
|
|
127
132
|
display: flex;
|
|
128
133
|
${n?"flex-wrap: wrap;":""}
|
|
129
134
|
${n?"":"flex-wrap: nowrap;"}
|
|
130
135
|
${e?"align-items: center;":""}
|
|
131
|
-
${
|
|
132
|
-
`,Te=
|
|
136
|
+
${o?"justify-content: center;":""}
|
|
137
|
+
`,Te=u.styled(ae.motion.div)`
|
|
133
138
|
text-decoration: none;
|
|
134
139
|
${e=>e.hasPermission===!0&&"cursor: pointer"};
|
|
135
140
|
|
|
@@ -146,10 +151,10 @@
|
|
|
146
151
|
text-decoration: none;
|
|
147
152
|
}
|
|
148
153
|
|
|
149
|
-
${
|
|
154
|
+
${re(!0)}
|
|
150
155
|
gap: 0.5rem;
|
|
151
156
|
padding: 0.5rem;
|
|
152
|
-
color:
|
|
157
|
+
color: var(--gray-950);
|
|
153
158
|
font-weight: 500;
|
|
154
159
|
font-size: 0.875rem;
|
|
155
160
|
line-height: 1.25rem;
|
|
@@ -162,11 +167,9 @@
|
|
|
162
167
|
font-weight: 400;
|
|
163
168
|
}
|
|
164
169
|
& .logo-wrapper {
|
|
165
|
-
${
|
|
170
|
+
${re(!0,!1,!0)}
|
|
166
171
|
flex-shrink: 0;
|
|
167
172
|
border-radius: 999px;
|
|
168
|
-
border: 3px solid
|
|
169
|
-
${e=>e.isActive===!1?"var(--gray-300, #c4c8cf)":_e[e.themeColor]??"var(--gray-300, #c4c8cf)"};
|
|
170
173
|
|
|
171
174
|
& img,
|
|
172
175
|
.img-placeholder {
|
|
@@ -182,12 +185,6 @@
|
|
|
182
185
|
}
|
|
183
186
|
}
|
|
184
187
|
|
|
185
|
-
&.user-profile-item {
|
|
186
|
-
& .logo-wrapper {
|
|
187
|
-
border: 3px solid transparent;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
188
|
& .name {
|
|
192
189
|
flex-grow: 15;
|
|
193
190
|
font-size: 1.055rem;
|
|
@@ -207,15 +204,14 @@
|
|
|
207
204
|
&:hover {
|
|
208
205
|
cursor: pointer;
|
|
209
206
|
background-color: var(--gray-95080, #14161acc);
|
|
210
|
-
color: var(--gray-600, #676e79);
|
|
211
207
|
}
|
|
212
|
-
`,je=
|
|
208
|
+
`,je=u.styled.div`
|
|
213
209
|
position: absolute;
|
|
214
210
|
top: 0.5rem;
|
|
215
211
|
${e=>e.alignToLeft===!0?"left: 0.5rem;":"right: 0.5rem;"}
|
|
216
212
|
display: flex;
|
|
217
213
|
gap: 0.25rem;
|
|
218
|
-
|
|
214
|
+
`,$e=u.styled.div`
|
|
219
215
|
border-radius: ${e=>_.getBorderRadiusValueWithUnits(e.theme,e.borderRadius||"slight")};
|
|
220
216
|
background-color: ${e=>e==null?void 0:e.color};
|
|
221
217
|
color: white;
|
|
@@ -231,7 +227,7 @@
|
|
|
231
227
|
& i {
|
|
232
228
|
font-size: 0.813rem;
|
|
233
229
|
}
|
|
234
|
-
`,
|
|
230
|
+
`,le=e=>{const{uuid:n,hasPermission:o=!0,isUser:l,image:p,name:h,notifications:f=0,color:i="primary",size:d="large",style:g,disabled:S,onClick:b=()=>{},isActive:T,className:j,shopCategory:$,themeData:x}=e,v={theme:G.useTheme(),color:i,size:d,style:g,disabled:S};return c.createElement(Te,{onClick:I=>{I.stopPropagation(),o===!0&&(b==null||b())},...v,key:h,className:`profile-item ${j}`,hasPermission:o,isActive:T,themeColor:(x==null?void 0:x.code)||"transparent"},t.jsx("div",{className:"logo-wrapper",children:p}),t.jsxs("div",{children:[t.jsx("div",{className:"name",children:h}),!l&&t.jsx("div",{className:"description",children:$}),f>0&&t.jsx("div",{className:"notifications-number",children:t.jsx(we,{className:"badge",color:"danger",size:"small",children:f>99?"99+":f})})]}))};le.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 te=(e,n)=>{if(!e||!n)return null;const o=e.getTime()-n.getTime(),l=24*60*60*1e3;return o>=0?Math.ceil(o/l):Math.floor(o/l)},ne=e=>{if(e!==void 0){const n=new Date(e),o=n.getFullYear(),l=n.getMonth()+1;return`${String(n.getDate()).padStart(2)}. ${l}. ${o}.`}},ce=c.forwardRef((e,n)=>{var Q;const o=G.useTheme(),{shopUuid:l,title:p="",coverPhoto:h,onSelect:f,startDate:i,endDate:d,salesPackages:g,shopName:S,shopCategory:b,shopImage:T,className:j,onSelectCard:$=()=>{},onSelectShop:x=()=>{},upcoming:C=!1,upcomingCampaignText:v,campaignSingleText:I,salesCampaignTypes:y=[],startsInPrefixTextPlural:k,startsinSuffixTextPlural:E,startsInPrefixTextSingular:R,startsinSuffixTextSingular:z,endsInPrefixTextPlural:a,endsinSuffixTextPlural:m,endsInPrefixTextSingular:O,endsinSuffixTextSingular:H,themeData:U,numberOfListings:L,numberOfListingsTextSingular:B,numberOfListingsTextPlural:r,...Z}=e,Y=i?new Date(i)<=new Date:!1,ue=te(i?new Date(i):null,new Date),q=te(d?new Date(d):null,new Date),me=q!==null&&q<=2&&q>0,J=d?new Date(d).getTime():null,he=Date.now(),A=J!==null?J-he:null,W=A!==null&&A>0&&A<24*60*60*1e3,K=(P,X,w,D,N)=>w===1?`${P} ${w} ${D}`:`${X} ${w} ${N}`,pe=()=>{if(!d)return null;const P=fe,w=new Date(d).getTime()-P.getTime();if(w<=0)return null;const D=Math.floor(w/(1e3*60*60)),N=Math.floor(w%(1e3*60*60)/(1e3*60)),ye=Math.floor(w%(1e3*60)/1e3);return{hours:D,minutes:N,seconds:ye}},[fe,xe]=c.useState(new Date);c.useEffect(()=>{if(!W)return;const P=setInterval(()=>{xe(new Date)},1e3);return()=>clearInterval(P)},[W]);const V=W?pe():null;return t.jsxs(be,{ref:n,theme:o,className:j,onClick:$,...Z,children:[t.jsxs(ve,{theme:o,onClick:()=>f==null?void 0:f(),children:[t.jsx("img",{src:h}),t.jsx(je,{children:g==null?void 0:g.map((P,X)=>{var w,D;return t.jsx($e,{color:(w=y==null?void 0:y.find(N=>N.value===P))==null?void 0:w.color,theme:o,children:t.jsx(oe,{icon:(D=y==null?void 0:y.find(N=>N.value===P))==null?void 0:D.icon})},`package__${X}`)})})]}),t.jsxs(_e,{theme:o,children:[t.jsx("div",{className:"text-block-wrapper",children:t.jsxs("div",{className:"title-block-wrapper",children:[t.jsx("div",{className:"campaign-title",children:(Q=C?v:I)==null?void 0:Q.toUpperCase()}),t.jsx("div",{className:"campaign-title-text",children:p}),d&&i&&t.jsxs("div",{children:[ne(i)," - ",ne(d)]}),t.jsxs("div",{className:"timestamp-text",children:[L>0&&t.jsxs("span",{className:"listings-text",children:[L," ",L===1?B:r," ","∙"," "]}),t.jsx("span",{className:`duration-text ${me?"urgent":""} ${Y?"":"starts-in"}`,children:W&&V?t.jsxs("div",{className:"countdown-timer",children:[O," ",V.hours.toString().padStart(2,"0"),":",V.minutes.toString().padStart(2,"0"),":",V.seconds.toString().padStart(2,"0")]}):Y?K(O,a,q,H,m):K(R,k,ue,z,E)})]})]})}),t.jsx(le,{hasPermission:!0,image:t.jsx("img",{src:T,className:`${T?"":"no-image"}`}),themeData:U,isActive:!0,isUser:!1,name:S,shopCategory:b,onClick:()=>x(l)})]})]})});ce.propTypes={title:s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.element]),numberOfListings:s.PropTypes.number,dropdown:s.PropTypes.any,color:s.PropTypes.string};u.styled.div`
|
|
235
231
|
display: flex;
|
|
236
232
|
flex-direction: column;
|
|
237
233
|
gap: 1.5rem;
|
|
@@ -262,25 +258,25 @@
|
|
|
262
258
|
}
|
|
263
259
|
}
|
|
264
260
|
|
|
265
|
-
@media (max-width: ${
|
|
261
|
+
@media (max-width: ${M.MOBILE_SIZE_PX+"px"}) {
|
|
266
262
|
& .campaign-item {
|
|
267
263
|
min-width: 100%;
|
|
268
264
|
width: 100%;
|
|
269
265
|
margin-right: 0;
|
|
270
266
|
}
|
|
271
267
|
}
|
|
272
|
-
`;const
|
|
268
|
+
`;const F=u.styled.div`
|
|
273
269
|
width: ${e=>e.width||"100%"};
|
|
274
270
|
height: ${e=>(e.heightCoeff||1)*1.125}rem;
|
|
275
271
|
background-color: var(--gray-200, #dddfe4);
|
|
276
272
|
|
|
277
273
|
${_.linearGradientAnimation("-90deg")}
|
|
278
|
-
|
|
274
|
+
`,Pe=u.styled.div`
|
|
279
275
|
display: flex;
|
|
280
276
|
flex-direction: ${e=>e!=null&&e.row?"row":"column"};
|
|
281
277
|
gap: ${e=>(e==null?void 0:e.gap)??"0.5rem"};
|
|
282
278
|
width: ${e=>(e==null?void 0:e.width)??"100%"};
|
|
283
|
-
`,
|
|
279
|
+
`,se=u.styled.div`
|
|
284
280
|
border-radius: ${e=>_.getBorderRadiusValueWithUnits(e.theme,(e==null?void 0:e.borderRadius)??"regular")};
|
|
285
281
|
background: var(--gray-200, #dddfe4);
|
|
286
282
|
position: relative;
|
|
@@ -291,7 +287,7 @@
|
|
|
291
287
|
flex-shrink: 0;
|
|
292
288
|
|
|
293
289
|
${_.linearGradientAnimation()}
|
|
294
|
-
`,Se=
|
|
290
|
+
`,Se=u.styled.div`
|
|
295
291
|
background: var(--white, #fff);
|
|
296
292
|
border-radius: ${e=>_.getBorderRadiusValueWithUnits(e.theme,"edged")};
|
|
297
293
|
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
|
|
@@ -320,17 +316,17 @@
|
|
|
320
316
|
gap: 0.5rem;
|
|
321
317
|
}
|
|
322
318
|
|
|
323
|
-
@media (max-width: ${
|
|
319
|
+
@media (max-width: ${M.MOBILE_SIZE_PX+"px"}) {
|
|
324
320
|
flex-direction: column;
|
|
325
321
|
|
|
326
322
|
& .campaign__user {
|
|
327
323
|
margin-top: 1rem;
|
|
328
324
|
}
|
|
329
325
|
}
|
|
330
|
-
`,
|
|
326
|
+
`,Ce=u.styled.div`
|
|
331
327
|
display: flex;
|
|
332
328
|
gap: 1.5rem;
|
|
333
|
-
`,
|
|
329
|
+
`,Ie=c.forwardRef(({},e)=>{const n=G.useTheme();return t.jsxs(Se,{ref:e,theme:n,children:[t.jsx("div",{className:"campaign__left-section",children:t.jsx(se,{theme:n,width:"15rem",height:"15rem",borderRadius:"edged"})}),t.jsxs("div",{className:"campaign__right-section",children:[t.jsxs(Pe,{theme:n,children:[t.jsx(F,{heightCoeff:.75,theme:n,width:"35%"}),t.jsx(F,{heightCoeff:1.25,theme:n}),t.jsx(F,{heightCoeff:3,theme:n})]}),t.jsxs("div",{className:"campaign__user",children:[t.jsx(se,{theme:n,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),t.jsx(F,{theme:n,width:"75%"})]})]})]})}),Ne=({itemsCount:e=5,keyPrefix:n})=>t.jsx(Ce,{children:Array.from({length:e},(o,l)=>t.jsx(Ie,{},`${n}-skeleton-campaign-card-${l}`))}),ke=({children:e,fallbackComponent:n=t.jsx(t.Fragment,{}),isLoading:o=!1,itemsCount:l=5,keyPrefix:p})=>t.jsx(c.Suspense,{fallback:n,children:o===!0?t.jsx(Ne,{itemsCount:l,keyPrefix:p}):e}),De=u.styled.div`
|
|
334
330
|
margin: 0 auto;
|
|
335
331
|
display: flex;
|
|
336
332
|
flex-direction: column;
|
|
@@ -371,12 +367,29 @@
|
|
|
371
367
|
top: 0;
|
|
372
368
|
right: 0;
|
|
373
369
|
}
|
|
374
|
-
`,
|
|
370
|
+
`,Me=u.styled(ae.motion.div)`
|
|
375
371
|
display: grid;
|
|
376
372
|
grid-template-columns: repeat(${e=>e==null?void 0:e.numOfColumns}, 1fr);
|
|
377
373
|
gap: 1.5rem;
|
|
378
374
|
|
|
379
|
-
@media (max-width: ${
|
|
375
|
+
@media (max-width: ${M.MOBILE_SIZE_PX+"px"}) {
|
|
380
376
|
grid-template-columns: repeat(${e=>e==null?void 0:e.numOfColumnsForMobile}, 1fr);
|
|
381
377
|
}
|
|
382
|
-
`,
|
|
378
|
+
`,de=c.forwardRef(({icon:e,title:n,numOfSlides:o=2,numOfSlidesForMobile:l=1,showNavigation:p=!0,children:h},f)=>{const[i,d]=c.useState(0),[g,S]=c.useState(1),[b,T]=c.useState(null),[j,$]=c.useState(null),x=ie.useDetectMobile(),C=50,v=(h==null?void 0:h.length)??1;c.useEffect(()=>{const a=()=>{S(x?l:o)};return window.addEventListener("resize",a),a(),()=>window.removeEventListener("resize",a)},[]);const I=h==null?void 0:h.slice(i,i+g),y=a=>{var m;(m=a==null?void 0:a.target)==null||m.blur(),i+g<v&&d(i+g)},k=a=>{var m;(m=a==null?void 0:a.target)==null||m.blur(),i-g>=0&&d(i-g)},E=a=>{var m;$(null),T((m=a==null?void 0:a.targetTouches["0"])==null?void 0:m.clientX)},R=a=>{var m;$((m=a==null?void 0:a.targetTouches["0"])==null?void 0:m.clientX)},z=()=>{if(!b||!j)return;const a=b-j;a>C&&y(),a<-C&&k()};return t.jsxs(De,{ref:f,...x?{onTouchStart:E,onTouchMove:R,onTouchEnd:z}:{},children:[t.jsx("div",{className:"scrollable-section__header",children:t.jsxs("div",{className:"scrollable-section__title",children:[_.isDefinedNotEmptyString(e)&&t.jsx(oe,{icon:e,color:"primary",sizeInUnits:"1.5rem",className:"title__icon"}),_.isDefinedNotEmptyString(n)&&t.jsx("div",{className:"title__text",children:n})]})}),t.jsx(Me,{numOfColumns:o,numOfColumnsForMobile:l,animate:{x:0,opacity:1},initial:{x:10,opacity:0},children:I},`scrollable-section__content-${i}`),p&&v>g&&!x&&t.jsxs("div",{className:"scrollable-section__navigation",children:[t.jsx(ee,{icon:"angle-left",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:i===0,onClick:k}),t.jsx(ee,{icon:"angle-right",borderRadius:"curved",btnType:"tinted",color:"neutral",className:"navigation__arrow",disabled:i+g>=v,onClick:y})]})]})});de.propTypes={icon:s.PropTypes.string,title:s.PropTypes.string,numOfSlides:s.PropTypes.number,numOfSlidesForMobile:s.PropTypes.number,showNavigation:s.PropTypes.bool};const Ee=u.styled.div`
|
|
379
|
+
display: flex;
|
|
380
|
+
flex: 1;
|
|
381
|
+
width: 100%;
|
|
382
|
+
max-height: ${e=>e==null?void 0:e.maxHeight};
|
|
383
|
+
border-radius: 1.25rem;
|
|
384
|
+
|
|
385
|
+
&:hover {
|
|
386
|
+
cursor: pointer;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
& img {
|
|
390
|
+
width: 100%;
|
|
391
|
+
height: 100%;
|
|
392
|
+
border-radius: 1.25rem;
|
|
393
|
+
object-fit: cover;
|
|
394
|
+
}
|
|
395
|
+
`,ge=c.forwardRef(({sectionName:e,imageUrl:n,maxHeight:o="16.25rem",className:l="",handleClick:p=()=>{}})=>t.jsx(Ee,{maxHeight:o,onClick:p,className:`itemless-banner ${l}`,children:t.jsx("img",{src:n,alt:`itemless-banner__${e}`})}));ge.propTypes={sectionName:s.PropTypes.string,imageUrl:s.PropTypes.string,maxHeight:s.PropTypes.string,className:s.PropTypes.string,handleClick:s.PropTypes.func};const Re=c.memo(ce),ze=c.forwardRef(({sellerType:e="Shop",items:n=[],title:o,icon:l,isLoading:p,onSelectCard:h=()=>{},onSelectShop:f=()=>{},getImage:i=()=>{},campaignSingleText:d,upcomingCampaignText:g,salesCampaignTypes:S=[],startsInPrefixTextPlural:b,startsinSuffixTextPlural:T,startsInPrefixTextSingular:j,startsinSuffixTextSingular:$,endsInPrefixTextPlural:x,endsinSuffixTextPlural:C,endsInPrefixTextSingular:v,endsinSuffixTextSingular:I,numOfSlides:y=2,numOfSlidesForMobile:k=1,showNavigation:E=!0,numberOfListingsTextSingular:R,numberOfListingsTextPlural:z,itemlessImageUrl:a,itemlessLink:m,handleItemlessLink:O=()=>{}},H)=>{const U=ie.useDetectMobile(),L=c.useMemo(()=>{let B=n==null?void 0:n.map((r,Z)=>t.jsx(Re,{className:"campaign-item",coverPhoto:i(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,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(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid),onSelectShop:()=>f(r==null?void 0:r.shopUuid),campaignSingleText:d,upcomingCampaignText:g,upcoming:r==null?void 0:r.upcoming,salesCampaignTypes:S,startsInPrefixTextPlural:b,startsinSuffixTextPlural:T,startsInPrefixTextSingular:j,startsinSuffixTextSingular:$,endsInPrefixTextPlural:x,endsinSuffixTextPlural:C,endsInPrefixTextSingular:v,endsinSuffixTextSingular:I,themeData:r==null?void 0:r.themeData,numberOfListings:r==null?void 0:r.numberOfListings,numberOfListingsTextSingular:R,numberOfListingsTextPlural:z},`campaign__item__${Z}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}`));return(n==null?void 0:n.length)<2&&!U?[...B,t.jsx(ge,{imageUrl:a,className:"campaign-item",handleClick:O})]:B},[n]);return t.jsx(ke,{isLoading:p,itemsCount:U?1:2,keyPrefix:"sales-camp",children:t.jsx(de,{icon:l,title:o,numOfSlides:y,numOfSlidesForMobile:k,showNavigation:E,children:L})})});module.exports=ze;
|