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