@lanaco/lnc-react-ui 4.0.155 → 4.0.156
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/DetailedProductsInfinitiveSection.cjs +2 -2
- package/dist/DetailedProductsInfinitiveSection.js +17 -17
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/SalesCampaignsSection.cjs +13 -18
- package/dist/SalesCampaignsSection.js +66 -71
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{suspense-product-card-detailed-BJ-HBkBc.js → suspense-product-card-detailed-YJVsf2-a.js} +2 -0
- package/dist/{suspense-product-card-detailed-wPRUytSf.cjs → suspense-product-card-detailed-mCJwteOy.cjs} +2 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),r=require("react"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),P=require("./consts-goSZX3xP.cjs"),N=require("./IconButton.cjs"),D=require("./Button.cjs"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),r=require("react"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),P=require("./consts-goSZX3xP.cjs"),N=require("./IconButton.cjs"),D=require("./Button.cjs"),u=require("./utils-Dl9xPH4c.cjs"),M=require("./useDetectMobile-zkbzoOGV.cjs"),m=require("./suspense-product-card-detailed-mCJwteOy.cjs"),B=j.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.5rem;
|
|
@@ -63,4 +63,4 @@
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
`,I=r.memo(
|
|
66
|
+
`,I=r.memo(m.DetailedProductCard),L=r.forwardRef((n,g)=>{const{title:s,items:o,limit:a=4,isLoading:l=!1,onSelectCard:p=()=>{},onLoadMore:b=()=>{},onButtonAction:f=()=>{},getImage:w=()=>{},viewAllbuttonLink:c,viewAllButonText:_="View all",negotiableText:h,freeText:y,loadMoreButtonIcon:k="angle-down",sponsoredText:v,onBookmark:C=()=>{},bookmarkComponent:q}=n,d=M.useDetectMobile(),S=r.useMemo(()=>o==null?void 0:o.map((e,i)=>t.jsx(I,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>p({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),imageUrl:w(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:h,freeText:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,trade:e==null?void 0:e.trade,sponsoredText:v,onBookmark:C,bookmarkComponent:q,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists},i)),[o]);return t.jsxs(B,{ref:g,limit:a,children:[t.jsxs("div",{className:"section__heading",children:[u.isDefinedNotEmptyString(s)&&t.jsx("div",{className:"section__title",children:s}),d&&u.isDefinedNotEmptyString(c)&&t.jsx(D,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var i;(i=e==null?void 0:e.target)==null||i.blur(),f(c)},borderRadius:"curved",className:"section__view-all",children:_})]}),t.jsx("div",{className:"section__items",children:t.jsx(m.SuspenseDetailedProductCard,{isLoading:l,limit:a,keyPrefix:"explore-landing",children:S})}),!d&&!l&&t.jsx(N,{icon:k,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:b})]})});module.exports=L;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { memo as P, forwardRef as M, useMemo as N } from "react";
|
|
3
3
|
import { s as B } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as D } from "./consts-BuFChS64.js";
|
|
5
5
|
import I from "./IconButton.js";
|
|
6
6
|
import L from "./Button.js";
|
|
7
|
-
import { k as
|
|
7
|
+
import { k as d } from "./utils-BdsZgOUE.js";
|
|
8
8
|
import { u as T } from "./useDetectMobile-Bkvj0VMa.js";
|
|
9
|
-
import { D as z, S as E } from "./suspense-product-card-detailed-
|
|
9
|
+
import { D as z, S as E } from "./suspense-product-card-detailed-YJVsf2-a.js";
|
|
10
10
|
const U = B.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
@@ -72,12 +72,12 @@ const U = B.div`
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`, $ = P(z), G = M((r,
|
|
75
|
+
`, $ = P(z), G = M((r, u) => {
|
|
76
76
|
const {
|
|
77
77
|
title: n,
|
|
78
78
|
items: i,
|
|
79
79
|
limit: a = 4,
|
|
80
|
-
isLoading:
|
|
80
|
+
isLoading: l = !1,
|
|
81
81
|
onSelectCard: p = () => {
|
|
82
82
|
},
|
|
83
83
|
onLoadMore: g = () => {
|
|
@@ -86,7 +86,7 @@ const U = B.div`
|
|
|
86
86
|
},
|
|
87
87
|
getImage: b = () => {
|
|
88
88
|
},
|
|
89
|
-
viewAllbuttonLink:
|
|
89
|
+
viewAllbuttonLink: s,
|
|
90
90
|
viewAllButonText: w = "View all",
|
|
91
91
|
negotiableText: _,
|
|
92
92
|
freeText: h,
|
|
@@ -95,7 +95,7 @@ const U = B.div`
|
|
|
95
95
|
onBookmark: v = () => {
|
|
96
96
|
},
|
|
97
97
|
bookmarkComponent: C
|
|
98
|
-
} = r,
|
|
98
|
+
} = r, c = T(), S = N(() => i == null ? void 0 : i.map((e, t) => /* @__PURE__ */ o(
|
|
99
99
|
$,
|
|
100
100
|
{
|
|
101
101
|
name: e == null ? void 0 : e.name,
|
|
@@ -126,10 +126,10 @@ const U = B.div`
|
|
|
126
126
|
},
|
|
127
127
|
t
|
|
128
128
|
)), [i]);
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
return /* @__PURE__ */ m(U, { ref: u, limit: a, children: [
|
|
130
|
+
/* @__PURE__ */ m("div", { className: "section__heading", children: [
|
|
131
|
+
d(n) && /* @__PURE__ */ o("div", { className: "section__title", children: n }),
|
|
132
|
+
c && d(s) && /* @__PURE__ */ o(
|
|
133
133
|
L,
|
|
134
134
|
{
|
|
135
135
|
type: "button",
|
|
@@ -137,7 +137,7 @@ const U = B.div`
|
|
|
137
137
|
color: "neutral",
|
|
138
138
|
onClick: (e) => {
|
|
139
139
|
var t;
|
|
140
|
-
(t = e == null ? void 0 : e.target) == null || t.blur(), f(
|
|
140
|
+
(t = e == null ? void 0 : e.target) == null || t.blur(), f(s);
|
|
141
141
|
},
|
|
142
142
|
borderRadius: "curved",
|
|
143
143
|
className: "section__view-all",
|
|
@@ -145,16 +145,16 @@ const U = B.div`
|
|
|
145
145
|
}
|
|
146
146
|
)
|
|
147
147
|
] }),
|
|
148
|
-
/* @__PURE__ */ o(
|
|
148
|
+
/* @__PURE__ */ o("div", { className: "section__items", children: /* @__PURE__ */ o(
|
|
149
149
|
E,
|
|
150
150
|
{
|
|
151
|
-
isLoading:
|
|
151
|
+
isLoading: l,
|
|
152
152
|
limit: a,
|
|
153
153
|
keyPrefix: "explore-landing",
|
|
154
|
-
children:
|
|
154
|
+
children: S
|
|
155
155
|
}
|
|
156
|
-
),
|
|
157
|
-
!
|
|
156
|
+
) }),
|
|
157
|
+
!c && !l && /* @__PURE__ */ o(
|
|
158
158
|
I,
|
|
159
159
|
{
|
|
160
160
|
icon: k,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),s=require("react"),U=require("./emotion-styled.browser.esm-BtEseadx.cjs"),L=require("./consts-goSZX3xP.cjs"),M=require("./Button.cjs"),S=require("./utils-Dl9xPH4c.cjs"),T=require("./useDetectMobile-zkbzoOGV.cjs"),F=require("./style-CyHewQxg.cjs"),f=require("./suspense-product-card-detailed-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),s=require("react"),U=require("./emotion-styled.browser.esm-BtEseadx.cjs"),L=require("./consts-goSZX3xP.cjs"),M=require("./Button.cjs"),S=require("./utils-Dl9xPH4c.cjs"),T=require("./useDetectMobile-zkbzoOGV.cjs"),F=require("./style-CyHewQxg.cjs"),f=require("./suspense-product-card-detailed-mCJwteOy.cjs"),B=require("./index-D0xXo7W6.cjs"),E=U.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${a=>`repeat(${a.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -6,7 +6,7 @@ import E from "./Button.js";
|
|
|
6
6
|
import { k as S } from "./utils-BdsZgOUE.js";
|
|
7
7
|
import { u as I } from "./useDetectMobile-Bkvj0VMa.js";
|
|
8
8
|
import { T as O } from "./style-DFPWLJBr.js";
|
|
9
|
-
import { D as R, S as W } from "./suspense-product-card-detailed-
|
|
9
|
+
import { D as R, S as W } from "./suspense-product-card-detailed-YJVsf2-a.js";
|
|
10
10
|
import { S as $ } from "./index-Dweo-G3H.js";
|
|
11
11
|
const j = B.div`
|
|
12
12
|
display: grid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),d=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),x=require("./utils-Dl9xPH4c.cjs")
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),d=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),x=require("./utils-Dl9xPH4c.cjs"),$=require("./consts-goSZX3xP.cjs"),se=require("./motion-B_VPZaJq.cjs"),a=require("./index-BpbMKBf_.cjs"),oe=require("./Icon.cjs"),Q=require("./ShopAvatar-CV3lj34D.cjs"),ve=require("./Badge.cjs"),Z=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),ee=require("./IconButton.cjs"),ie=require("./useDetectMobile-zkbzoOGV.cjs"),_e=p.styled.div`
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 1rem;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
border-radius: 1.25rem;
|
|
7
7
|
border: 1px solid var(--gray-200, #e4e9f0);
|
|
8
8
|
|
|
9
|
-
@media (max-width: ${
|
|
9
|
+
@media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
padding: 1rem;
|
|
12
12
|
gap: 0;
|
|
@@ -34,12 +34,7 @@
|
|
|
34
34
|
transform: scale(1.25);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
@media (max-width: ${S.MOBILE_SIZE_PX+"px"}) {
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: 100%;
|
|
41
|
-
}
|
|
42
|
-
`,Se=p.styled.div`
|
|
37
|
+
`,Te=p.styled.div`
|
|
43
38
|
flex: 1;
|
|
44
39
|
display: flex;
|
|
45
40
|
flex-direction: column;
|
|
@@ -122,7 +117,7 @@
|
|
|
122
117
|
color: var(--gray-600, #676e79);
|
|
123
118
|
}
|
|
124
119
|
|
|
125
|
-
@media (max-width: ${
|
|
120
|
+
@media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
|
|
126
121
|
padding: 1rem 0 0 0;
|
|
127
122
|
|
|
128
123
|
& .campaign-title-text {
|
|
@@ -153,7 +148,7 @@
|
|
|
153
148
|
${n?"":"flex-wrap: nowrap;"}
|
|
154
149
|
${e?"align-items: center;":""}
|
|
155
150
|
${s?"justify-content: center;":""}
|
|
156
|
-
`,
|
|
151
|
+
`,Se=p.styled(se.motion.div)`
|
|
157
152
|
text-decoration: none;
|
|
158
153
|
${e=>e.hasPermission===!0&&"cursor: pointer"};
|
|
159
154
|
|
|
@@ -225,7 +220,7 @@
|
|
|
225
220
|
background-color: var(--gray-95080, #14161acc);
|
|
226
221
|
}
|
|
227
222
|
|
|
228
|
-
@media (max-width: ${
|
|
223
|
+
@media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
|
|
229
224
|
padding: 0;
|
|
230
225
|
font-size: 0.875rem;
|
|
231
226
|
}
|
|
@@ -251,7 +246,7 @@
|
|
|
251
246
|
& i {
|
|
252
247
|
font-size: 0.813rem;
|
|
253
248
|
}
|
|
254
|
-
`,Ie=d.forwardRef(({src:e,...n},s)=>{const o=d.useRef();return d.useEffect(()=>{var u;const l=i=>{i.target.src=Q.DefaultShopImage,i.onerror=null};return(u=o==null?void 0:o.current)==null||u.addEventListener("error",l),()=>{var i;(i=o==null?void 0:o.current)==null||i.removeEventListener("error",l)}},[]),t.jsx(d.Fragment,{ref:s,children:x.isDefinedNotEmptyString(e)?t.jsx("img",{ref:o,src:e,...n}):t.jsx("img",{src:Q.DefaultShopImage,...n})})}),le=e=>{const{uuid:n,hasPermission:s=!0,isUser:o,image:l,imageComponent:u,name:i,notifications:m=0,color:c="primary",size:y="large",style:P,disabled:I,onClick:_=()=>{},isActive:C,className:w,shopCategory:b,themeData:v}=e,T={theme:
|
|
249
|
+
`,Ie=d.forwardRef(({src:e,...n},s)=>{const o=d.useRef();return d.useEffect(()=>{var u;const l=i=>{i.target.src=Q.DefaultShopImage,i.onerror=null};return(u=o==null?void 0:o.current)==null||u.addEventListener("error",l),()=>{var i;(i=o==null?void 0:o.current)==null||i.removeEventListener("error",l)}},[]),t.jsx(d.Fragment,{ref:s,children:x.isDefinedNotEmptyString(e)?t.jsx("img",{ref:o,src:e,...n}):t.jsx("img",{src:Q.DefaultShopImage,...n})})}),le=e=>{const{uuid:n,hasPermission:s=!0,isUser:o,image:l,imageComponent:u,name:i,notifications:m=0,color:c="primary",size:y="large",style:P,disabled:I,onClick:_=()=>{},isActive:C,className:w,shopCategory:b,themeData:v}=e,T={theme:Z.useTheme(),color:c,size:y,style:P,disabled:I};return d.createElement(Se,{onClick:g=>{g.stopPropagation(),s===!0&&(_==null||_())},...T,key:i,className:`profile-item ${w}`,hasPermission:s,isActive:C,themeColor:(v==null?void 0:v.code)||"transparent"},t.jsx("div",{className:"logo-wrapper",children:x.isDefined(u)?u:l}),t.jsxs("div",{children:[t.jsx("div",{className:"name",children:i}),!o&&t.jsx("div",{className:"description",children:b}),m>0&&t.jsx("div",{className:"notifications-number",children:t.jsx(ve,{className:"badge",color:"danger",size:"small",children:m>99?"99+":m})})]}))};le.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 te=(e,n)=>{if(!e||!n)return null;const s=e.getTime()-n.getTime(),o=24*60*60*1e3;return s>=0?Math.ceil(s/o):Math.floor(s/o)},ne=e=>{if(e!==void 0){const n=new Date(e),s=n.getFullYear(),o=n.getMonth()+1;return`${String(n.getDate()).padStart(2)}. ${o}. ${s}.`}},ce=d.forwardRef((e,n)=>{var K;const s=Z.useTheme(),{shopUuid:o,title:l="",coverPhoto:u,onSelect:i,startDate:m,endDate:c,salesPackages:y,shopName:P,shopCategory:I,shopImage:_,shopImageComponent:C,className:w,onSelectCard:b=()=>{},onSelectShop:v=()=>{},upcoming:k=!1,upcomingCampaignText:T,campaignSingleText:g,salesCampaignTypes:h=[],startsInPrefixTextPlural:U,startsinSuffixTextPlural:B,startsInPrefixTextSingular:q,startsinSuffixTextSingular:A,endsInPrefixTextPlural:W,endsinSuffixTextPlural:G,endsInPrefixTextSingular:N,endsinSuffixTextSingular:V,themeData:E,numberOfListings:r,numberOfListingsTextSingular:F,numberOfListingsTextPlural:me,...pe}=e,H=m?new Date(m)<=new Date:!1,he=te(m?new Date(m):null,new Date),M=te(c?new Date(c):null,new Date),ue=M!==null&&M<=2&&M>0,Y=c?new Date(c).getTime():null,fe=Date.now(),X=Y!==null?Y-fe:null,z=X!==null&&X>0&&X<24*60*60*1e3,J=(j,R,f,D,S)=>f===1?`${j} ${f} ${D}`:`${R} ${f} ${S}`,xe=()=>{if(!c)return null;const j=ye,f=new Date(c).getTime()-j.getTime();if(f<=0)return null;const D=Math.floor(f/(1e3*60*60)),S=Math.floor(f%(1e3*60*60)/(1e3*60)),be=Math.floor(f%(1e3*60)/1e3);return{hours:D,minutes:S,seconds:be}},[ye,we]=d.useState(new Date);d.useEffect(()=>{if(!z)return;const j=setInterval(()=>{we(new Date)},1e3);return()=>clearInterval(j)},[z]);const L=z?xe():null;return t.jsxs(_e,{ref:n,theme:s,className:w,onClick:b,...pe,children:[t.jsxs(je,{theme:s,onClick:()=>i==null?void 0:i(),children:[t.jsx("img",{src:u}),t.jsx($e,{children:y==null?void 0:y.map((j,R)=>{var f,D;return t.jsx(Pe,{color:(f=h==null?void 0:h.find(S=>S.value===j))==null?void 0:f.color,theme:s,children:t.jsx(oe,{icon:(D=h==null?void 0:h.find(S=>S.value===j))==null?void 0:D.icon})},`package__${R}`)})})]}),t.jsxs(Te,{theme:s,children:[t.jsx("div",{className:"text-block-wrapper",children:t.jsxs("div",{className:"title-block-wrapper",children:[t.jsx("div",{className:"campaign-title",children:(K=k?T:g)==null?void 0:K.toUpperCase()}),t.jsx("div",{className:"campaign-title-text",children:l}),c&&m&&t.jsxs("div",{className:"campaign-date",children:[ne(m)," - ",ne(c)]}),t.jsxs("div",{className:"timestamp-text",children:[r>0&&t.jsxs("span",{className:"listings-text",children:[r," ",r===1?F:me," ","∙"," "]}),t.jsx("span",{className:`duration-text ${ue?"urgent":""} ${H?"":"starts-in"}`,children:z&&L?t.jsxs("div",{className:"countdown-timer",children:[N," ",L.hours.toString().padStart(2,"0"),":",L.minutes.toString().padStart(2,"0"),":",L.seconds.toString().padStart(2,"0")]}):H?J(N,W,M,V,G):J(q,U,he,A,B)})]})]})}),t.jsx(le,{hasPermission:!0,image:t.jsx(Ie,{src:_}),imageComponent:C,themeData:E,isActive:!0,isUser:!1,name:P,shopCategory:I,onClick:()=>v(o)})]})]})});ce.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`
|
|
255
250
|
display: flex;
|
|
256
251
|
flex-direction: column;
|
|
257
252
|
gap: 1.5rem;
|
|
@@ -282,7 +277,7 @@
|
|
|
282
277
|
}
|
|
283
278
|
}
|
|
284
279
|
|
|
285
|
-
@media (max-width: ${
|
|
280
|
+
@media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
|
|
286
281
|
& .campaign-item {
|
|
287
282
|
min-width: 100%;
|
|
288
283
|
width: 100%;
|
|
@@ -340,7 +335,7 @@
|
|
|
340
335
|
gap: 0.5rem;
|
|
341
336
|
}
|
|
342
337
|
|
|
343
|
-
@media (max-width: ${
|
|
338
|
+
@media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
|
|
344
339
|
flex-direction: column;
|
|
345
340
|
|
|
346
341
|
& .campaign__user {
|
|
@@ -350,7 +345,7 @@
|
|
|
350
345
|
`,Ne=p.styled.div`
|
|
351
346
|
display: flex;
|
|
352
347
|
gap: 1.5rem;
|
|
353
|
-
`,De=d.forwardRef(({},e)=>{const n=
|
|
348
|
+
`,De=d.forwardRef(({},e)=>{const n=Z.useTheme();return t.jsxs(ke,{ref:e,theme:n,children:[t.jsx("div",{className:"campaign__left-section",children:t.jsx(ae,{theme:n,width:"15rem",height:"15rem",borderRadius:"edged"})}),t.jsxs("div",{className:"campaign__right-section",children:[t.jsxs(Ce,{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(ae,{theme:n,width:"2.5rem",height:"2.5rem",borderRadius:"curved"}),t.jsx(O,{theme:n,width:"75%"})]})]})]})}),Ee=({itemsCount:e=5,keyPrefix:n})=>t.jsx(Ne,{children:Array.from({length:e},(s,o)=>t.jsx(De,{},`${n}-skeleton-campaign-card-${o}`))}),Me=({children:e,fallbackComponent:n=t.jsx(t.Fragment,{}),isLoading:s=!1,itemsCount:o=5,keyPrefix:l})=>t.jsx(d.Suspense,{fallback:n,children:s===!0?t.jsx(Ee,{itemsCount:o,keyPrefix:l}):e}),ze=p.styled.div`
|
|
354
349
|
margin: 0 auto;
|
|
355
350
|
display: flex;
|
|
356
351
|
flex-direction: column;
|
|
@@ -389,7 +384,7 @@
|
|
|
389
384
|
right: 0;
|
|
390
385
|
}
|
|
391
386
|
|
|
392
|
-
@media (max-width: ${
|
|
387
|
+
@media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
|
|
393
388
|
& .scrollable-section__header {
|
|
394
389
|
& .scrollable-section__title {
|
|
395
390
|
& .title__text {
|
|
@@ -405,7 +400,7 @@
|
|
|
405
400
|
gap: 1.5rem;
|
|
406
401
|
width: 100%;
|
|
407
402
|
|
|
408
|
-
@media (max-width: ${
|
|
403
|
+
@media (max-width: ${$.MOBILE_SIZE_PX+"px"}) {
|
|
409
404
|
display: flex;
|
|
410
405
|
flex-wrap: nowrap;
|
|
411
406
|
overflow-x: scroll;
|
|
@@ -444,4 +439,4 @@
|
|
|
444
439
|
border-radius: 1.25rem;
|
|
445
440
|
object-fit: cover;
|
|
446
441
|
}
|
|
447
|
-
`,ge=d.forwardRef(({sectionName:e,imageUrl:n,maxHeight:s="16.25rem",className:o="",handleClick:l=()=>{}},u)=>t.jsx(Re,{ref:u,maxHeight:s,onClick:l,className:`itemless-banner ${o}`,children:t.jsx("img",{src:n,alt:`itemless-banner__${e}`})}));ge.propTypes={sectionName:a.PropTypes.string,imageUrl:a.PropTypes.string,maxHeight:a.PropTypes.string,className:a.PropTypes.string,handleClick:a.PropTypes.func};const Oe=d.memo(ce),Ue=d.forwardRef(({sellerType:e="Shop",items:n=[],title:s,icon:o,isLoading:l,onSelectCard:u=()=>{},onSelectShop:i=()=>{},getImage:m=()=>{},campaignSingleText:c,upcomingCampaignText:y,salesCampaignTypes:P=[],startsInPrefixTextPlural:I,startsinSuffixTextPlural:_,startsInPrefixTextSingular:C,startsinSuffixTextSingular:w,endsInPrefixTextPlural:b,endsinSuffixTextPlural:v,endsInPrefixTextSingular:k,endsinSuffixTextSingular:T,numOfSlides:g=2,showNavigation:h=!0,numberOfListingsTextSingular:U,numberOfListingsTextPlural:B,itemlessImageUrl:q,itemlessLink:A,handleItemlessLink:W=()=>{}},G)=>{const N=ie.useDetectMobile(),V=d.useMemo(()=>{let E=n==null?void 0:n.map((r,
|
|
442
|
+
`,ge=d.forwardRef(({sectionName:e,imageUrl:n,maxHeight:s="16.25rem",className:o="",handleClick:l=()=>{}},u)=>t.jsx(Re,{ref:u,maxHeight:s,onClick:l,className:`itemless-banner ${o}`,children:t.jsx("img",{src:n,alt:`itemless-banner__${e}`})}));ge.propTypes={sectionName:a.PropTypes.string,imageUrl:a.PropTypes.string,maxHeight:a.PropTypes.string,className:a.PropTypes.string,handleClick:a.PropTypes.func};const Oe=d.memo(ce),Ue=d.forwardRef(({sellerType:e="Shop",items:n=[],title:s,icon:o,isLoading:l,onSelectCard:u=()=>{},onSelectShop:i=()=>{},getImage:m=()=>{},campaignSingleText:c,upcomingCampaignText:y,salesCampaignTypes:P=[],startsInPrefixTextPlural:I,startsinSuffixTextPlural:_,startsInPrefixTextSingular:C,startsinSuffixTextSingular:w,endsInPrefixTextPlural:b,endsinSuffixTextPlural:v,endsInPrefixTextSingular:k,endsinSuffixTextSingular:T,numOfSlides:g=2,showNavigation:h=!0,numberOfListingsTextSingular:U,numberOfListingsTextPlural:B,itemlessImageUrl:q,itemlessLink:A,handleItemlessLink:W=()=>{}},G)=>{const N=ie.useDetectMobile(),V=d.useMemo(()=>{let E=n==null?void 0:n.map((r,F)=>t.jsx(Oe,{className:"campaign-item",coverPhoto:m(r==null?void 0:r.coverPhoto,(r==null?void 0:r.uuid)||(r==null?void 0:r.campaignUuid)),description:r==null?void 0:r.description,endDate:r==null?void 0:r.endDate,salesPackages:r==null?void 0:r.salesPackages,sellerType:e,shopImage:r==null?void 0:r.profileImage,shopImageComponent:r==null?void 0:r.profileImageComponent,shopName:r==null?void 0:r.shopName,shopUuid:r==null?void 0:r.shopUuid,shopCategory:r==null?void 0:r.shopCategory,startDate:r==null?void 0:r.startDate,title:r==null?void 0:r.name,uuid:r==null?void 0:r.campaignUuid,onSelectCard:()=>u(r==null?void 0:r.campaignUuid,r==null?void 0:r.shopUuid),onSelectShop:()=>i(r==null?void 0:r.shopUuid),campaignSingleText:c,upcomingCampaignText:y,upcoming:r==null?void 0:r.upcoming,salesCampaignTypes:P,startsInPrefixTextPlural:I,startsinSuffixTextPlural:_,startsInPrefixTextSingular:C,startsinSuffixTextSingular:w,endsInPrefixTextPlural:b,endsinSuffixTextPlural:v,endsInPrefixTextSingular:k,endsinSuffixTextSingular:T,themeData:r==null?void 0:r.themeData,numberOfListings:r==null?void 0:r.numberOfListings,numberOfListingsTextSingular:U,numberOfListingsTextPlural:B},`campaign__item__${F}__${r==null?void 0:r.startDate}___${r==null?void 0:r.endDate}`));return(n==null?void 0:n.length)<2&&!N?[...E,t.jsx(ge,{imageUrl:q,className:"campaign-item",handleClick:W})]:E},[n]);return t.jsx(Me,{isLoading:l,itemsCount:N?1:2,keyPrefix:"sales-camp",children:t.jsx(de,{icon:o,title:s,numOfSlides:g,showNavigation:h,children:V},`sales-campaign-section__${N}`)})});module.exports=Ue;
|
|
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as g, Fragment as ke } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as z, useRef as Ne, useEffect as Z, Fragment as Ie, createElement as De, useState as M, Suspense as Te, memo as Pe, useMemo as ze } from "react";
|
|
3
3
|
import { s as h } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { a as L, k as Y, l as Me, o as ce } from "./utils-BdsZgOUE.js";
|
|
5
|
-
import { M as
|
|
5
|
+
import { M as S } from "./consts-BuFChS64.js";
|
|
6
6
|
import { m as de } from "./motion-Ckekul_K.js";
|
|
7
7
|
import { P as a } from "./index-CblbdqjE.js";
|
|
8
8
|
import ge from "./Icon.js";
|
|
@@ -19,7 +19,7 @@ const Ue = h.div`
|
|
|
19
19
|
border-radius: 1.25rem;
|
|
20
20
|
border: 1px solid var(--gray-200, #e4e9f0);
|
|
21
21
|
|
|
22
|
-
@media (max-width: ${
|
|
22
|
+
@media (max-width: ${S + "px"}) {
|
|
23
23
|
flex-direction: column;
|
|
24
24
|
padding: 1rem;
|
|
25
25
|
gap: 0;
|
|
@@ -47,11 +47,6 @@ const Ue = h.div`
|
|
|
47
47
|
transform: scale(1.25);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
@media (max-width: ${_ + "px"}) {
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 100%;
|
|
54
|
-
}
|
|
55
50
|
`, Ee = h.div`
|
|
56
51
|
flex: 1;
|
|
57
52
|
display: flex;
|
|
@@ -135,7 +130,7 @@ const Ue = h.div`
|
|
|
135
130
|
color: var(--gray-600, #676e79);
|
|
136
131
|
}
|
|
137
132
|
|
|
138
|
-
@media (max-width: ${
|
|
133
|
+
@media (max-width: ${S + "px"}) {
|
|
139
134
|
padding: 1rem 0 0 0;
|
|
140
135
|
|
|
141
136
|
& .campaign-title-text {
|
|
@@ -160,12 +155,12 @@ const Ue = h.div`
|
|
|
160
155
|
gap: 0.25rem;
|
|
161
156
|
}
|
|
162
157
|
}
|
|
163
|
-
`,
|
|
158
|
+
`, oe = (e = !1, n = !1, o = !1) => `
|
|
164
159
|
display: flex;
|
|
165
160
|
${n ? "flex-wrap: wrap;" : ""}
|
|
166
161
|
${n ? "" : "flex-wrap: nowrap;"}
|
|
167
162
|
${e ? "align-items: center;" : ""}
|
|
168
|
-
${
|
|
163
|
+
${o ? "justify-content: center;" : ""}
|
|
169
164
|
`, je = h(de.div)`
|
|
170
165
|
text-decoration: none;
|
|
171
166
|
${(e) => e.hasPermission === !0 && "cursor: pointer"};
|
|
@@ -183,7 +178,7 @@ const Ue = h.div`
|
|
|
183
178
|
text-decoration: none;
|
|
184
179
|
}
|
|
185
180
|
|
|
186
|
-
${
|
|
181
|
+
${oe(!0)}
|
|
187
182
|
gap: 0.5rem;
|
|
188
183
|
padding: 0.5rem;
|
|
189
184
|
color: var(--gray-950, #14161a);
|
|
@@ -199,7 +194,7 @@ const Ue = h.div`
|
|
|
199
194
|
font-weight: 400;
|
|
200
195
|
}
|
|
201
196
|
& .logo-wrapper {
|
|
202
|
-
${
|
|
197
|
+
${oe(!0, !1, !0)}
|
|
203
198
|
flex-shrink: 0;
|
|
204
199
|
border-radius: 999px;
|
|
205
200
|
|
|
@@ -238,7 +233,7 @@ const Ue = h.div`
|
|
|
238
233
|
background-color: var(--gray-95080, #14161acc);
|
|
239
234
|
}
|
|
240
235
|
|
|
241
|
-
@media (max-width: ${
|
|
236
|
+
@media (max-width: ${S + "px"}) {
|
|
242
237
|
padding: 0;
|
|
243
238
|
font-size: 0.875rem;
|
|
244
239
|
}
|
|
@@ -264,23 +259,23 @@ const Ue = h.div`
|
|
|
264
259
|
& i {
|
|
265
260
|
font-size: 0.813rem;
|
|
266
261
|
}
|
|
267
|
-
`, Fe = z(({ src: e, ...n },
|
|
268
|
-
const
|
|
262
|
+
`, Fe = z(({ src: e, ...n }, o) => {
|
|
263
|
+
const i = Ne();
|
|
269
264
|
return Z(() => {
|
|
270
265
|
var f;
|
|
271
266
|
const l = (s) => {
|
|
272
267
|
s.target.src = ne, s.onerror = null;
|
|
273
268
|
};
|
|
274
|
-
return (f =
|
|
269
|
+
return (f = i == null ? void 0 : i.current) == null || f.addEventListener("error", l), () => {
|
|
275
270
|
var s;
|
|
276
|
-
(s =
|
|
271
|
+
(s = i == null ? void 0 : i.current) == null || s.removeEventListener("error", l);
|
|
277
272
|
};
|
|
278
|
-
}, []), /* @__PURE__ */ t(Ie, { ref:
|
|
273
|
+
}, []), /* @__PURE__ */ t(Ie, { ref: o, children: Y(e) ? /* @__PURE__ */ t("img", { ref: i, src: e, ...n }) : /* @__PURE__ */ t("img", { src: ne, ...n }) });
|
|
279
274
|
}), he = (e) => {
|
|
280
275
|
const {
|
|
281
276
|
uuid: n,
|
|
282
|
-
hasPermission:
|
|
283
|
-
isUser:
|
|
277
|
+
hasPermission: o = !0,
|
|
278
|
+
isUser: i,
|
|
284
279
|
image: l,
|
|
285
280
|
imageComponent: f,
|
|
286
281
|
name: s,
|
|
@@ -296,7 +291,7 @@ const Ue = h.div`
|
|
|
296
291
|
shopCategory: b,
|
|
297
292
|
// new
|
|
298
293
|
themeData: v
|
|
299
|
-
} = e,
|
|
294
|
+
} = e, _ = {
|
|
300
295
|
theme: q(),
|
|
301
296
|
color: c,
|
|
302
297
|
size: x,
|
|
@@ -307,19 +302,19 @@ const Ue = h.div`
|
|
|
307
302
|
je,
|
|
308
303
|
{
|
|
309
304
|
onClick: (d) => {
|
|
310
|
-
d.stopPropagation(),
|
|
305
|
+
d.stopPropagation(), o === !0 && (y == null || y());
|
|
311
306
|
},
|
|
312
|
-
...
|
|
307
|
+
..._,
|
|
313
308
|
key: s,
|
|
314
309
|
className: `profile-item ${w}`,
|
|
315
|
-
hasPermission:
|
|
310
|
+
hasPermission: o,
|
|
316
311
|
isActive: I,
|
|
317
312
|
themeColor: (v == null ? void 0 : v.code) || "transparent"
|
|
318
313
|
},
|
|
319
314
|
/* @__PURE__ */ t("div", { className: "logo-wrapper", children: Me(f) ? f : l }),
|
|
320
315
|
/* @__PURE__ */ g("div", { children: [
|
|
321
316
|
/* @__PURE__ */ t("div", { className: "name", children: s }),
|
|
322
|
-
!
|
|
317
|
+
!i && /* @__PURE__ */ t("div", { className: "description", children: b }),
|
|
323
318
|
m > 0 && /* @__PURE__ */ t("div", { className: "notifications-number", children: /* @__PURE__ */ t(Le, { className: "badge", color: "danger", size: "small", children: m > 99 ? "99+" : m }) })
|
|
324
319
|
] })
|
|
325
320
|
);
|
|
@@ -346,20 +341,20 @@ he.propTypes = {
|
|
|
346
341
|
onSelect: a.func,
|
|
347
342
|
hasPermission: a.bool
|
|
348
343
|
};
|
|
349
|
-
const
|
|
344
|
+
const ie = (e, n) => {
|
|
350
345
|
if (!e || !n) return null;
|
|
351
|
-
const
|
|
352
|
-
return
|
|
346
|
+
const o = e.getTime() - n.getTime(), i = 24 * 60 * 60 * 1e3;
|
|
347
|
+
return o >= 0 ? Math.ceil(o / i) : Math.floor(o / i);
|
|
353
348
|
}, se = (e) => {
|
|
354
349
|
if (e !== void 0) {
|
|
355
|
-
const n = new Date(e),
|
|
356
|
-
return `${String(n.getDate()).padStart(2)}. ${
|
|
350
|
+
const n = new Date(e), o = n.getFullYear(), i = n.getMonth() + 1;
|
|
351
|
+
return `${String(n.getDate()).padStart(2)}. ${i}. ${o}.`;
|
|
357
352
|
}
|
|
358
353
|
}, pe = z((e, n) => {
|
|
359
354
|
var te;
|
|
360
|
-
const
|
|
355
|
+
const o = q(), {
|
|
361
356
|
// uuid,
|
|
362
|
-
shopUuid:
|
|
357
|
+
shopUuid: i,
|
|
363
358
|
title: l = "",
|
|
364
359
|
// description,
|
|
365
360
|
// badges,
|
|
@@ -379,7 +374,7 @@ const oe = (e, n) => {
|
|
|
379
374
|
onSelectShop: v = () => {
|
|
380
375
|
},
|
|
381
376
|
upcoming: D = !1,
|
|
382
|
-
upcomingCampaignText:
|
|
377
|
+
upcomingCampaignText: _,
|
|
383
378
|
campaignSingleText: d,
|
|
384
379
|
salesCampaignTypes: p = [],
|
|
385
380
|
startsInPrefixTextPlural: F,
|
|
@@ -395,18 +390,18 @@ const oe = (e, n) => {
|
|
|
395
390
|
numberOfListingsTextSingular: G,
|
|
396
391
|
numberOfListingsTextPlural: xe,
|
|
397
392
|
...we
|
|
398
|
-
} = e, Q = m ? new Date(m) <= /* @__PURE__ */ new Date() : !1, be =
|
|
393
|
+
} = e, Q = m ? new Date(m) <= /* @__PURE__ */ new Date() : !1, be = ie(
|
|
399
394
|
m ? new Date(m) : null,
|
|
400
395
|
/* @__PURE__ */ new Date()
|
|
401
|
-
), O =
|
|
396
|
+
), O = ie(
|
|
402
397
|
c ? new Date(c) : null,
|
|
403
398
|
/* @__PURE__ */ new Date()
|
|
404
|
-
), ve = O !== null && O <= 2 && O > 0, ee = c ? new Date(c).getTime() : null, ye = Date.now(), X = ee !== null ? ee - ye : null, E = X !== null && X > 0 && X < 24 * 60 * 60 * 1e3, re = ($, R, u, P,
|
|
399
|
+
), ve = O !== null && O <= 2 && O > 0, ee = c ? new Date(c).getTime() : null, ye = Date.now(), X = ee !== null ? ee - ye : null, E = X !== null && X > 0 && X < 24 * 60 * 60 * 1e3, re = ($, R, u, P, C) => u === 1 ? `${$} ${u} ${P}` : `${R} ${u} ${C}`, $e = () => {
|
|
405
400
|
if (!c) return null;
|
|
406
401
|
const $ = _e, u = new Date(c).getTime() - $.getTime();
|
|
407
402
|
if (u <= 0) return null;
|
|
408
|
-
const P = Math.floor(u / (1e3 * 60 * 60)),
|
|
409
|
-
return { hours: P, minutes:
|
|
403
|
+
const P = Math.floor(u / (1e3 * 60 * 60)), C = Math.floor(u % (1e3 * 60 * 60) / (1e3 * 60)), Se = Math.floor(u % (1e3 * 60) / 1e3);
|
|
404
|
+
return { hours: P, minutes: C, seconds: Se };
|
|
410
405
|
}, [_e, Ce] = M(/* @__PURE__ */ new Date());
|
|
411
406
|
Z(() => {
|
|
412
407
|
if (!E) return;
|
|
@@ -420,24 +415,24 @@ const oe = (e, n) => {
|
|
|
420
415
|
Ue,
|
|
421
416
|
{
|
|
422
417
|
ref: n,
|
|
423
|
-
theme:
|
|
418
|
+
theme: o,
|
|
424
419
|
className: w,
|
|
425
420
|
onClick: b,
|
|
426
421
|
...we,
|
|
427
422
|
children: [
|
|
428
|
-
/* @__PURE__ */ g(Oe, { theme:
|
|
423
|
+
/* @__PURE__ */ g(Oe, { theme: o, onClick: () => s == null ? void 0 : s(), children: [
|
|
429
424
|
/* @__PURE__ */ t("img", { src: f }),
|
|
430
425
|
/* @__PURE__ */ t(Re, { children: x == null ? void 0 : x.map(($, R) => {
|
|
431
426
|
var u, P;
|
|
432
427
|
return /* @__PURE__ */ t(
|
|
433
428
|
Be,
|
|
434
429
|
{
|
|
435
|
-
color: (u = p == null ? void 0 : p.find((
|
|
436
|
-
theme:
|
|
430
|
+
color: (u = p == null ? void 0 : p.find((C) => C.value === $)) == null ? void 0 : u.color,
|
|
431
|
+
theme: o,
|
|
437
432
|
children: /* @__PURE__ */ t(
|
|
438
433
|
ge,
|
|
439
434
|
{
|
|
440
|
-
icon: (P = p == null ? void 0 : p.find((
|
|
435
|
+
icon: (P = p == null ? void 0 : p.find((C) => C.value === $)) == null ? void 0 : P.icon
|
|
441
436
|
}
|
|
442
437
|
)
|
|
443
438
|
},
|
|
@@ -445,9 +440,9 @@ const oe = (e, n) => {
|
|
|
445
440
|
);
|
|
446
441
|
}) })
|
|
447
442
|
] }),
|
|
448
|
-
/* @__PURE__ */ g(Ee, { theme:
|
|
443
|
+
/* @__PURE__ */ g(Ee, { theme: o, children: [
|
|
449
444
|
/* @__PURE__ */ t("div", { className: "text-block-wrapper", children: /* @__PURE__ */ g("div", { className: "title-block-wrapper", children: [
|
|
450
|
-
/* @__PURE__ */ t("div", { className: "campaign-title", children: (te = D ?
|
|
445
|
+
/* @__PURE__ */ t("div", { className: "campaign-title", children: (te = D ? _ : d) == null ? void 0 : te.toUpperCase() }),
|
|
451
446
|
/* @__PURE__ */ t("div", { className: "campaign-title-text", children: l }),
|
|
452
447
|
c && m && /* @__PURE__ */ g("div", { className: "campaign-date", children: [
|
|
453
448
|
se(m),
|
|
@@ -503,7 +498,7 @@ const oe = (e, n) => {
|
|
|
503
498
|
isUser: !1,
|
|
504
499
|
name: k,
|
|
505
500
|
shopCategory: N,
|
|
506
|
-
onClick: () => v(
|
|
501
|
+
onClick: () => v(i)
|
|
507
502
|
}
|
|
508
503
|
)
|
|
509
504
|
] })
|
|
@@ -548,7 +543,7 @@ h.div`
|
|
|
548
543
|
}
|
|
549
544
|
}
|
|
550
545
|
|
|
551
|
-
@media (max-width: ${
|
|
546
|
+
@media (max-width: ${S + "px"}) {
|
|
552
547
|
& .campaign-item {
|
|
553
548
|
min-width: 100%;
|
|
554
549
|
width: 100%;
|
|
@@ -607,7 +602,7 @@ const B = h.div`
|
|
|
607
602
|
gap: 0.5rem;
|
|
608
603
|
}
|
|
609
604
|
|
|
610
|
-
@media (max-width: ${
|
|
605
|
+
@media (max-width: ${S + "px"}) {
|
|
611
606
|
flex-direction: column;
|
|
612
607
|
|
|
613
608
|
& .campaign__user {
|
|
@@ -649,17 +644,17 @@ const B = h.div`
|
|
|
649
644
|
] })
|
|
650
645
|
] })
|
|
651
646
|
] });
|
|
652
|
-
}), Ge = ({ itemsCount: e = 5, keyPrefix: n }) => /* @__PURE__ */ t(Ve, { children: Array.from({ length: e }, (
|
|
647
|
+
}), Ge = ({ itemsCount: e = 5, keyPrefix: n }) => /* @__PURE__ */ t(Ve, { children: Array.from({ length: e }, (o, i) => /* @__PURE__ */ t(
|
|
653
648
|
He,
|
|
654
649
|
{},
|
|
655
|
-
`${n}-skeleton-campaign-card-${
|
|
650
|
+
`${n}-skeleton-campaign-card-${i}`
|
|
656
651
|
)) }), Xe = ({
|
|
657
652
|
children: e,
|
|
658
653
|
fallbackComponent: n = /* @__PURE__ */ t(ke, {}),
|
|
659
|
-
isLoading:
|
|
660
|
-
itemsCount:
|
|
654
|
+
isLoading: o = !1,
|
|
655
|
+
itemsCount: i = 5,
|
|
661
656
|
keyPrefix: l
|
|
662
|
-
}) => /* @__PURE__ */ t(Te, { fallback: n, children:
|
|
657
|
+
}) => /* @__PURE__ */ t(Te, { fallback: n, children: o === !0 ? /* @__PURE__ */ t(Ge, { itemsCount: i, keyPrefix: l }) : e }), Ye = h.div`
|
|
663
658
|
margin: 0 auto;
|
|
664
659
|
display: flex;
|
|
665
660
|
flex-direction: column;
|
|
@@ -698,7 +693,7 @@ const B = h.div`
|
|
|
698
693
|
right: 0;
|
|
699
694
|
}
|
|
700
695
|
|
|
701
|
-
@media (max-width: ${
|
|
696
|
+
@media (max-width: ${S + "px"}) {
|
|
702
697
|
& .scrollable-section__header {
|
|
703
698
|
& .scrollable-section__title {
|
|
704
699
|
& .title__text {
|
|
@@ -714,7 +709,7 @@ const B = h.div`
|
|
|
714
709
|
gap: 1.5rem;
|
|
715
710
|
width: 100%;
|
|
716
711
|
|
|
717
|
-
@media (max-width: ${
|
|
712
|
+
@media (max-width: ${S + "px"}) {
|
|
718
713
|
display: flex;
|
|
719
714
|
flex-wrap: nowrap;
|
|
720
715
|
overflow-x: scroll;
|
|
@@ -737,18 +732,18 @@ const B = h.div`
|
|
|
737
732
|
}
|
|
738
733
|
}
|
|
739
734
|
`, fe = z(
|
|
740
|
-
({ icon: e, title: n, numOfSlides:
|
|
735
|
+
({ icon: e, title: n, numOfSlides: o = 2, showNavigation: i = !0, children: l }, f) => {
|
|
741
736
|
const [s, m] = M(0), [c, x] = M(1), [k, N] = M(null), [y, I] = M(null), w = me(), b = (l == null ? void 0 : l.length) ?? 1;
|
|
742
737
|
Z(() => {
|
|
743
738
|
const d = () => {
|
|
744
|
-
x(
|
|
739
|
+
x(o);
|
|
745
740
|
};
|
|
746
741
|
return window.addEventListener("resize", d), d(), () => window.removeEventListener("resize", d);
|
|
747
742
|
}, []);
|
|
748
743
|
const v = w ? l : l == null ? void 0 : l.slice(s, s + c), D = (d) => {
|
|
749
744
|
var p;
|
|
750
745
|
(p = d == null ? void 0 : d.target) == null || p.blur(), s + c < b && m(s + c);
|
|
751
|
-
},
|
|
746
|
+
}, _ = (d) => {
|
|
752
747
|
var p;
|
|
753
748
|
(p = d == null ? void 0 : d.target) == null || p.blur(), s - c >= 0 && m(s - c);
|
|
754
749
|
};
|
|
@@ -768,7 +763,7 @@ const B = h.div`
|
|
|
768
763
|
/* @__PURE__ */ t(
|
|
769
764
|
Ze,
|
|
770
765
|
{
|
|
771
|
-
numOfColumns:
|
|
766
|
+
numOfColumns: o,
|
|
772
767
|
...!w && {
|
|
773
768
|
animate: {
|
|
774
769
|
x: 0,
|
|
@@ -783,7 +778,7 @@ const B = h.div`
|
|
|
783
778
|
},
|
|
784
779
|
`scrollable-section__content-${s}`
|
|
785
780
|
),
|
|
786
|
-
|
|
781
|
+
i && b > c && !w && /* @__PURE__ */ g("div", { className: "scrollable-section__navigation", children: [
|
|
787
782
|
/* @__PURE__ */ t(
|
|
788
783
|
ae,
|
|
789
784
|
{
|
|
@@ -793,7 +788,7 @@ const B = h.div`
|
|
|
793
788
|
color: "neutral",
|
|
794
789
|
className: "navigation__arrow",
|
|
795
790
|
disabled: s === 0,
|
|
796
|
-
onClick:
|
|
791
|
+
onClick: _
|
|
797
792
|
}
|
|
798
793
|
),
|
|
799
794
|
/* @__PURE__ */ t(
|
|
@@ -840,17 +835,17 @@ const qe = h.div`
|
|
|
840
835
|
({
|
|
841
836
|
sectionName: e,
|
|
842
837
|
imageUrl: n,
|
|
843
|
-
maxHeight:
|
|
844
|
-
className:
|
|
838
|
+
maxHeight: o = "16.25rem",
|
|
839
|
+
className: i = "",
|
|
845
840
|
handleClick: l = () => {
|
|
846
841
|
}
|
|
847
842
|
}, f) => /* @__PURE__ */ t(
|
|
848
843
|
qe,
|
|
849
844
|
{
|
|
850
845
|
ref: f,
|
|
851
|
-
maxHeight:
|
|
846
|
+
maxHeight: o,
|
|
852
847
|
onClick: l,
|
|
853
|
-
className: `itemless-banner ${
|
|
848
|
+
className: `itemless-banner ${i}`,
|
|
854
849
|
children: /* @__PURE__ */ t("img", { src: n, alt: `itemless-banner__${e}` })
|
|
855
850
|
}
|
|
856
851
|
)
|
|
@@ -866,8 +861,8 @@ const Je = Pe(pe), gr = z(
|
|
|
866
861
|
({
|
|
867
862
|
sellerType: e = "Shop",
|
|
868
863
|
items: n = [],
|
|
869
|
-
title:
|
|
870
|
-
icon:
|
|
864
|
+
title: o,
|
|
865
|
+
icon: i,
|
|
871
866
|
isLoading: l,
|
|
872
867
|
onSelectCard: f = () => {
|
|
873
868
|
},
|
|
@@ -885,7 +880,7 @@ const Je = Pe(pe), gr = z(
|
|
|
885
880
|
endsInPrefixTextPlural: b,
|
|
886
881
|
endsinSuffixTextPlural: v,
|
|
887
882
|
endsInPrefixTextSingular: D,
|
|
888
|
-
endsinSuffixTextSingular:
|
|
883
|
+
endsinSuffixTextSingular: _,
|
|
889
884
|
numOfSlides: d = 2,
|
|
890
885
|
showNavigation: p = !0,
|
|
891
886
|
numberOfListingsTextSingular: F,
|
|
@@ -929,7 +924,7 @@ const Je = Pe(pe), gr = z(
|
|
|
929
924
|
endsInPrefixTextPlural: b,
|
|
930
925
|
endsinSuffixTextPlural: v,
|
|
931
926
|
endsInPrefixTextSingular: D,
|
|
932
|
-
endsinSuffixTextSingular:
|
|
927
|
+
endsinSuffixTextSingular: _,
|
|
933
928
|
themeData: r == null ? void 0 : r.themeData,
|
|
934
929
|
numberOfListings: r == null ? void 0 : r.numberOfListings,
|
|
935
930
|
numberOfListingsTextSingular: F,
|
|
@@ -958,8 +953,8 @@ const Je = Pe(pe), gr = z(
|
|
|
958
953
|
children: /* @__PURE__ */ t(
|
|
959
954
|
fe,
|
|
960
955
|
{
|
|
961
|
-
icon:
|
|
962
|
-
title:
|
|
956
|
+
icon: i,
|
|
957
|
+
title: o,
|
|
963
958
|
numOfSlides: d,
|
|
964
959
|
showNavigation: p,
|
|
965
960
|
children: H
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),S=require("./suspense-product-card-detailed-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),n=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),k=require("./consts-goSZX3xP.cjs"),v=require("./useDetectMobile-zkbzoOGV.cjs"),q=require("./Button.cjs"),S=require("./suspense-product-card-detailed-mCJwteOy.cjs"),N=P.styled.div`
|
|
2
2
|
padding: 1.75rem 3rem;
|
|
3
3
|
display: grid;
|
|
4
4
|
grid-template-columns: ${o=>`repeat(${o.limit||5}, minmax(0, 1fr))`};
|
|
@@ -4,7 +4,7 @@ import { s as F } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
|
4
4
|
import { M as I, S as T } from "./consts-BuFChS64.js";
|
|
5
5
|
import { u as _ } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
6
|
import B from "./Button.js";
|
|
7
|
-
import { D, S as E } from "./suspense-product-card-detailed-
|
|
7
|
+
import { D, S as E } from "./suspense-product-card-detailed-YJVsf2-a.js";
|
|
8
8
|
const j = F.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|