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