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