@lanaco/lnc-react-ui 4.0.217 → 4.0.219
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/BlogExploreSection.cjs +4 -4
- package/dist/BlogExploreSection.js +103 -102
- package/dist/DetailedProductsInfinitiveSection.cjs +1 -1
- package/dist/DetailedProductsInfinitiveSection.js +1 -1
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{index-rYUwBlpp.js → index-DDShXLaW.js} +29 -28
- package/dist/{index-BEgD9vNo.cjs → index-DZFKpq77.cjs} +9 -8
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),x=require("react"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),x=require("react"),ce=require("./useDetectMobile-DYV6V1yw.cjs"),M=require("./utils-CITgSxXe.cjs"),oe=require("./TextInput.cjs"),S=require("./Icon.cjs"),le=require("./Link.cjs"),L=require("./IconButton.cjs"),V=require("./DropdownMenu.cjs"),W=require("./DropdownItem.cjs"),de=require("./tag-DSnhWWHE.cjs"),me=require("./BlogProductCardsSection.cjs"),F=require("./emotion-styled.browser.esm-BtEseadx.cjs"),_e=require("./index-DsINTjQk.cjs"),T=require("./BlogListSection.cjs"),he=require("./breakpoints-CcVm-gVm.cjs"),ue=F.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
`,
|
|
82
|
+
`,fe=x.forwardRef(({perPageOptions:o=[{code:10,name:"Show 10 items"},{code:25,name:"Show 25 items"},{code:50,name:"Show 50 items"}],perPage:u,handlePerPage:g=()=>{},page:a=1,handlePage:l=()=>{},totalPage:t},_)=>{var d,b;const f=()=>{a>1&&(l==null||l(a-1))},p=()=>{a<t&&(l==null||l(a+1))},h=(()=>{const r=[];if(t<=7)for(let i=1;i<=t;i++)r.push(i);else a<=3?r.push(1,2,3,"...",t):a>=t-2?r.push(1,"...",t-2,t-1,t):r.push(1,2,3,"...",t);return r==null?void 0:r.map((i,v)=>i==="..."?e.jsx("div",{className:"pagination__page ellipsis",children:i},`pagination-ellipsis__${v}`):e.jsx("div",{onClick:()=>l(i),className:`pagination__page ${a===i?"active":""}`,children:i},`pagination-page__${v}`))})();return e.jsxs(ue,{className:"pagination",children:[e.jsx(V,{color:"neutral",control:((d=o==null?void 0:o.find(r=>(r==null?void 0:r.code)===u))==null?void 0:d.name)||((b=o[0])==null?void 0:b.name),placement:"bottom",zIndex:1001,className:"pagination__per-page",children:o==null?void 0:o.map((r,i)=>e.jsx(W,{active:(r==null?void 0:r.code)===(u==null?void 0:u.code),className:"sort-by__item",onClick:()=>g(r),children:r==null?void 0:r.name},`blog-epxlore-section-per-page-option__${i+1}`))}),(h==null?void 0:h.length)>1&&e.jsxs("div",{className:"pagination__pages",children:[e.jsx("div",{className:`pagination__page ${a===1?"disabled":""}`,onClick:f,children:e.jsx(S,{icon:" mng-lnc-chevron--left"})}),h,e.jsx("div",{className:`pagination__page ${a===t?"disabled":""}`,onClick:p,children:e.jsx(S,{icon:" mng-lnc-chevron--right"})})]})]})}),xe=F.styled.div`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: flex-start;
|
|
85
85
|
gap: 2rem;
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
@media ${
|
|
303
|
+
@media ${he.down("S")} {
|
|
304
304
|
flex-direction: column;
|
|
305
305
|
|
|
306
306
|
& .landing__main-content {
|
|
@@ -352,4 +352,4 @@
|
|
|
352
352
|
display: none;
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
|
-
`,
|
|
355
|
+
`,ve=x.forwardRef(({mainTitle:o,sideTitle:u,tags:g,selectedTag:a,handleSelectTag:l=()=>{},blogs:t,miniBlogs:_,products:f,blogsLoading:p=!1,productsLoading:q=!1,sortingOptions:h,sortBy:d,handleSortBy:b=()=>{},allTagText:r="All",searchPlaceholderText:i="Search blogs",timeToReadText:v="{0} min read",getBlogImageUrl:w=()=>{},handleSelectBlog:y=()=>{},handleSelectBlogTag:C=()=>{},handleShareBlog:z=()=>{},showAllButtonLink:R,showAllButtonText:E="Show all products",viewAllButtonText:H="View all (11)",handleViewAll:G=()=>{},handleShowAll:J=()=>{},handleSelectProduct:K=()=>{},getProductImageUrl:Q=()=>{},page:U,handlePage:j=()=>{},perPage:X,handlePerPage:Y=()=>{},totalPage:$=0,perPageOptions:Z,handleSearch:O=()=>{},onBookmark:D=()=>{},bookmarkComponent:A=e.jsx(e.Fragment,{}),componentName:N,LinkComponent:k,showPerPage:B=!1},P)=>{const ee=n=>{document.getElementById("landing__container").scrollIntoView({behavior:"smooth",block:"start"}),j==null||j(n)},s=x.useRef(null),ne=ce.useDetectMobile(),[m,te]=x.useState({arrowsVisible:!1,leftArrowDisabled:!1,rightArrowDisabled:!1});x.useEffect(()=>{const n=s==null?void 0:s.current;if(!n)return;const c=()=>{const ae=n.scrollWidth-n.clientWidth;te(se=>({...se,arrowsVisible:n.clientWidth<n.scrollWidth,leftArrowDisabled:n.scrollLeft<=0,rightArrowDisabled:n.scrollLeft>=ae}))},I=new ResizeObserver(c);return I.observe(n),c(),n.addEventListener("scroll",c),()=>{I.disconnect(),n.removeEventListener("scroll",c)}},[]);const re=()=>{var n;(n=s==null?void 0:s.current)==null||n.scrollBy({left:100,behavior:"smooth"})},ie=()=>{var n;(n=s==null?void 0:s.current)==null||n.scrollBy({left:-100,behavior:"smooth"})};return e.jsxs(xe,{ref:P,id:"landing__container",children:[e.jsxs("div",{className:"landing__main-content",children:[e.jsxs("div",{className:"main-content__heading",children:[e.jsx("div",{className:"main-content__title",children:o}),!ne&&(m==null?void 0:m.arrowsVisible)&&e.jsxs("div",{className:"main-content__tags-nav",children:[e.jsx(L,{icon:"chevron-left",borderRadius:"curved",btnType:"tinted",color:"neutral",disabled:m==null?void 0:m.leftArrowDisabled,className:"main-content__tag-nav",onClick:ie}),e.jsx(L,{icon:"chevron-right",borderRadius:"curved",btnType:"tinted",color:"neutral",disabled:m==null?void 0:m.rightArrowDisabled,className:"main-content__tag-nav",onClick:re})]})]}),g&&e.jsx(de.FaqSectionTags,{ref:s,tags:g,allTagText:r,selectedTagCode:a,onSelectTag:l}),e.jsxs("div",{className:"main-content__actions",children:[e.jsx(oe,{className:"main-content__search",placeholder:i,debounceTime:200,prefix:e.jsx(S,{icon:" mng-lnc-search",sizeInUnits:"1.25rem",className:"main-content__search-prefix"}),color:"neutral",onChange:O}),e.jsx(V,{color:"neutral",control:d==null?void 0:d.name,zIndex:1001,className:"main-content__sort-by",children:h==null?void 0:h.map((n,c)=>e.jsx(W,{active:(n==null?void 0:n.code)===(d==null?void 0:d.code),className:"sort-by__item",onClick:()=>b(n),children:n==null?void 0:n.name},`blog-epxlore-section-sorting-option__${c+1}`))})]}),e.jsxs("div",{className:"main-content__items",children:[t&&(t==null?void 0:t.length)>0&&e.jsx(T,{timeToReadText:v,items:t==null?void 0:t.slice(0,5),isLoading:p,getImage:w,onSelectCard:y,onSelectOption:C,onShare:z,onBookmark:D,bookmarkComponent:A,componentName:N,LinkComponent:k}),e.jsx("div",{className:"main-content__divider"}),f&&(f==null?void 0:f.length)>0&&e.jsx(me,{buttonText:E,buttonLink:R,onButtonAction:J,onSelectCard:K,items:f,isLoading:q,getImage:Q,isHighlight:!0,componentName:N,LinkComponent:k}),e.jsx("div",{className:"main-content__divider"}),t&&(t==null?void 0:t.length)>0&&e.jsx(T,{timeToReadText:v,items:t==null?void 0:t.slice(5),isLoading:p,getImage:w,onSelectCard:y,onSelectOption:C,onShare:z,onBookmark:D,bookmarkComponent:A,componentName:N,LinkComponent:k})]}),($>1||B)&&e.jsx(fe,{perPageOptions:Z,perPage:X,handlePerPage:Y,page:U,handlePage:ee,totalPage:$})]}),e.jsxs("div",{className:"landing__side-content",children:[u&&e.jsx("div",{className:"side-content__title",children:u}),_&&(_==null?void 0:_.length)>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"side-content__items",children:_==null?void 0:_.map((n,c)=>e.jsx(x.Fragment,{children:e.jsxs("div",{className:"side-content__item",onClick:()=>y(n),children:[e.jsx(_e.ProductImageWrapper,{src:w(n==null?void 0:n.imageUrl,n==null?void 0:n.uuid)||null,alt:`Mini blog ${c+1}`,className:"item__image"}),e.jsxs("div",{className:"item__content",children:[e.jsx("div",{className:"item__title",children:n==null?void 0:n.title}),e.jsx("div",{className:"item__description",children:M.formatLocaleDateString(n==null?void 0:n.publishedAt)})]})]})},`mini_blg_${c}`))}),e.jsx(le,{onClick:G,className:"side-content__link",children:H})]})]})]})});module.exports=ve;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsxs as a, jsx as n, Fragment as I } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as W, useRef as
|
|
3
|
-
import { u as
|
|
4
|
-
import { n as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import { forwardRef as W, useRef as le, useState as se, useEffect as de, Fragment as me } from "react";
|
|
3
|
+
import { u as he } from "./useDetectMobile-CcVo3PNi.js";
|
|
4
|
+
import { n as _e, q as fe } from "./utils-B2fsQ6PS.js";
|
|
5
|
+
import ue from "./TextInput.js";
|
|
6
|
+
import C from "./Icon.js";
|
|
7
|
+
import ve from "./Link.js";
|
|
8
8
|
import F from "./IconButton.js";
|
|
9
9
|
import M from "./DropdownMenu.js";
|
|
10
10
|
import q from "./DropdownItem.js";
|
|
11
|
-
import { F as
|
|
12
|
-
import
|
|
11
|
+
import { F as pe } from "./tag-Bi8gg6hJ.js";
|
|
12
|
+
import ge from "./BlogProductCardsSection.js";
|
|
13
13
|
import { s as E } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
14
|
-
import { P as
|
|
14
|
+
import { P as xe } from "./index-BvMY2TbK.js";
|
|
15
15
|
import V from "./BlogListSection.js";
|
|
16
|
-
import { d as
|
|
17
|
-
const
|
|
16
|
+
import { d as we } from "./breakpoints-ff0SIcV3.js";
|
|
17
|
+
const be = E.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
justify-content: space-between;
|
|
20
20
|
align-items: center;
|
|
@@ -95,40 +95,40 @@ const we = E.div`
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
`,
|
|
98
|
+
`, ye = W(
|
|
99
99
|
({
|
|
100
100
|
perPageOptions: s = [
|
|
101
101
|
{ code: 10, name: "Show 10 items" },
|
|
102
102
|
{ code: 25, name: "Show 25 items" },
|
|
103
103
|
{ code: 50, name: "Show 50 items" }
|
|
104
104
|
],
|
|
105
|
-
perPage:
|
|
106
|
-
handlePerPage:
|
|
105
|
+
perPage: u,
|
|
106
|
+
handlePerPage: g = () => {
|
|
107
107
|
},
|
|
108
108
|
page: c = 1,
|
|
109
109
|
handlePage: d = () => {
|
|
110
110
|
},
|
|
111
111
|
totalPage: t
|
|
112
112
|
}, _) => {
|
|
113
|
-
var
|
|
114
|
-
const
|
|
113
|
+
var m, w;
|
|
114
|
+
const v = () => {
|
|
115
115
|
c > 1 && (d == null || d(c - 1));
|
|
116
|
-
},
|
|
116
|
+
}, x = () => {
|
|
117
117
|
c < t && (d == null || d(c + 1));
|
|
118
|
-
},
|
|
118
|
+
}, f = (() => {
|
|
119
119
|
const r = [];
|
|
120
120
|
if (t <= 7)
|
|
121
121
|
for (let i = 1; i <= t; i++)
|
|
122
122
|
r.push(i);
|
|
123
123
|
else
|
|
124
124
|
c <= 3 ? r.push(1, 2, 3, "...", t) : c >= t - 2 ? r.push(1, "...", t - 2, t - 1, t) : r.push(1, 2, 3, "...", t);
|
|
125
|
-
return r == null ? void 0 : r.map((i,
|
|
125
|
+
return r == null ? void 0 : r.map((i, p) => i === "..." ? /* @__PURE__ */ n(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
128
|
className: "pagination__page ellipsis",
|
|
129
129
|
children: i
|
|
130
130
|
},
|
|
131
|
-
`pagination-ellipsis__${
|
|
131
|
+
`pagination-ellipsis__${p}`
|
|
132
132
|
) : /* @__PURE__ */ n(
|
|
133
133
|
"div",
|
|
134
134
|
{
|
|
@@ -136,52 +136,52 @@ const we = E.div`
|
|
|
136
136
|
className: `pagination__page ${c === i ? "active" : ""}`,
|
|
137
137
|
children: i
|
|
138
138
|
},
|
|
139
|
-
`pagination-page__${
|
|
139
|
+
`pagination-page__${p}`
|
|
140
140
|
));
|
|
141
|
-
};
|
|
142
|
-
return /* @__PURE__ */ a(
|
|
141
|
+
})();
|
|
142
|
+
return /* @__PURE__ */ a(be, { className: "pagination", children: [
|
|
143
143
|
/* @__PURE__ */ n(
|
|
144
144
|
M,
|
|
145
145
|
{
|
|
146
146
|
color: "neutral",
|
|
147
|
-
control: ((
|
|
147
|
+
control: ((m = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.code) === u)) == null ? void 0 : m.name) || ((w = s[0]) == null ? void 0 : w.name),
|
|
148
148
|
placement: "bottom",
|
|
149
149
|
zIndex: 1001,
|
|
150
150
|
className: "pagination__per-page",
|
|
151
151
|
children: s == null ? void 0 : s.map((r, i) => /* @__PURE__ */ n(
|
|
152
152
|
q,
|
|
153
153
|
{
|
|
154
|
-
active: (r == null ? void 0 : r.code) === (
|
|
154
|
+
active: (r == null ? void 0 : r.code) === (u == null ? void 0 : u.code),
|
|
155
155
|
className: "sort-by__item",
|
|
156
|
-
onClick: () =>
|
|
156
|
+
onClick: () => g(r),
|
|
157
157
|
children: r == null ? void 0 : r.name
|
|
158
158
|
},
|
|
159
159
|
`blog-epxlore-section-per-page-option__${i + 1}`
|
|
160
160
|
))
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
|
-
/* @__PURE__ */ a("div", { className: "pagination__pages", children: [
|
|
163
|
+
(f == null ? void 0 : f.length) > 1 && /* @__PURE__ */ a("div", { className: "pagination__pages", children: [
|
|
164
164
|
/* @__PURE__ */ n(
|
|
165
165
|
"div",
|
|
166
166
|
{
|
|
167
167
|
className: `pagination__page ${c === 1 ? "disabled" : ""}`,
|
|
168
|
-
onClick:
|
|
169
|
-
children: /* @__PURE__ */ n(
|
|
168
|
+
onClick: v,
|
|
169
|
+
children: /* @__PURE__ */ n(C, { icon: " mng-lnc-chevron--left" })
|
|
170
170
|
}
|
|
171
171
|
),
|
|
172
|
-
|
|
172
|
+
f,
|
|
173
173
|
/* @__PURE__ */ n(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: `pagination__page ${c === t ? "disabled" : ""}`,
|
|
177
|
-
onClick:
|
|
178
|
-
children: /* @__PURE__ */ n(
|
|
177
|
+
onClick: x,
|
|
178
|
+
children: /* @__PURE__ */ n(C, { icon: " mng-lnc-chevron--right" })
|
|
179
179
|
}
|
|
180
180
|
)
|
|
181
181
|
] })
|
|
182
182
|
] });
|
|
183
183
|
}
|
|
184
|
-
),
|
|
184
|
+
), Ne = E.div`
|
|
185
185
|
display: flex;
|
|
186
186
|
align-items: flex-start;
|
|
187
187
|
gap: 2rem;
|
|
@@ -387,7 +387,7 @@ const we = E.div`
|
|
|
387
387
|
font-style: normal;
|
|
388
388
|
font-weight: 500;
|
|
389
389
|
line-height: 1.25rem;
|
|
390
|
-
${
|
|
390
|
+
${_e(2)}
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
& .item__description {
|
|
@@ -402,7 +402,7 @@ const we = E.div`
|
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
@media ${
|
|
405
|
+
@media ${we("S")} {
|
|
406
406
|
flex-direction: column;
|
|
407
407
|
|
|
408
408
|
& .landing__main-content {
|
|
@@ -454,33 +454,33 @@ const we = E.div`
|
|
|
454
454
|
display: none;
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
`,
|
|
457
|
+
`, Ee = W(
|
|
458
458
|
({
|
|
459
459
|
mainTitle: s,
|
|
460
|
-
sideTitle:
|
|
461
|
-
tags:
|
|
460
|
+
sideTitle: u,
|
|
461
|
+
tags: g,
|
|
462
462
|
selectedTag: c,
|
|
463
463
|
handleSelectTag: d = () => {
|
|
464
464
|
},
|
|
465
465
|
blogs: t,
|
|
466
466
|
miniBlogs: _,
|
|
467
|
-
products:
|
|
468
|
-
blogsLoading:
|
|
469
|
-
productsLoading:
|
|
470
|
-
sortingOptions:
|
|
467
|
+
products: v,
|
|
468
|
+
blogsLoading: x = !1,
|
|
469
|
+
productsLoading: z = !1,
|
|
470
|
+
sortingOptions: f,
|
|
471
471
|
sortBy: m,
|
|
472
|
-
handleSortBy:
|
|
472
|
+
handleSortBy: w = () => {
|
|
473
473
|
},
|
|
474
|
-
allTagText:
|
|
475
|
-
searchPlaceholderText:
|
|
476
|
-
timeToReadText:
|
|
474
|
+
allTagText: r = "All",
|
|
475
|
+
searchPlaceholderText: i = "Search blogs",
|
|
476
|
+
timeToReadText: p = "{0} min read",
|
|
477
477
|
getBlogImageUrl: b = () => {
|
|
478
478
|
},
|
|
479
479
|
handleSelectBlog: y = () => {
|
|
480
480
|
},
|
|
481
|
-
handleSelectBlogTag:
|
|
481
|
+
handleSelectBlogTag: $ = () => {
|
|
482
482
|
},
|
|
483
|
-
handleShareBlog:
|
|
483
|
+
handleShareBlog: A = () => {
|
|
484
484
|
},
|
|
485
485
|
// handleBookmarkBlog = () => {},
|
|
486
486
|
showAllButtonLink: H,
|
|
@@ -501,51 +501,52 @@ const we = E.div`
|
|
|
501
501
|
perPage: Y,
|
|
502
502
|
handlePerPage: Z = () => {
|
|
503
503
|
},
|
|
504
|
-
totalPage:
|
|
504
|
+
totalPage: D = 0,
|
|
505
505
|
perPageOptions: O,
|
|
506
506
|
handleSearch: B = () => {
|
|
507
507
|
},
|
|
508
508
|
onBookmark: L = () => {
|
|
509
509
|
},
|
|
510
510
|
bookmarkComponent: T = /* @__PURE__ */ n(I, {}),
|
|
511
|
-
componentName:
|
|
512
|
-
LinkComponent:
|
|
513
|
-
|
|
514
|
-
|
|
511
|
+
componentName: k,
|
|
512
|
+
LinkComponent: S,
|
|
513
|
+
showPerPage: P = !1
|
|
514
|
+
}, ee) => {
|
|
515
|
+
const ne = (e) => {
|
|
515
516
|
document.getElementById("landing__container").scrollIntoView({ behavior: "smooth", block: "start" }), N == null || N(e);
|
|
516
|
-
}, o =
|
|
517
|
+
}, o = le(null), te = he(), [h, re] = se({
|
|
517
518
|
arrowsVisible: !1,
|
|
518
519
|
leftArrowDisabled: !1,
|
|
519
520
|
rightArrowDisabled: !1
|
|
520
521
|
});
|
|
521
|
-
|
|
522
|
+
de(() => {
|
|
522
523
|
const e = o == null ? void 0 : o.current;
|
|
523
524
|
if (!e) return;
|
|
524
525
|
const l = () => {
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
...
|
|
526
|
+
const ce = e.scrollWidth - e.clientWidth;
|
|
527
|
+
re((oe) => ({
|
|
528
|
+
...oe,
|
|
528
529
|
arrowsVisible: e.clientWidth < e.scrollWidth,
|
|
529
530
|
leftArrowDisabled: e.scrollLeft <= 0,
|
|
530
|
-
rightArrowDisabled: e.scrollLeft >=
|
|
531
|
+
rightArrowDisabled: e.scrollLeft >= ce
|
|
531
532
|
}));
|
|
532
533
|
}, j = new ResizeObserver(l);
|
|
533
534
|
return j.observe(e), l(), e.addEventListener("scroll", l), () => {
|
|
534
535
|
j.disconnect(), e.removeEventListener("scroll", l);
|
|
535
536
|
};
|
|
536
537
|
}, []);
|
|
537
|
-
const
|
|
538
|
+
const ie = () => {
|
|
538
539
|
var e;
|
|
539
540
|
(e = o == null ? void 0 : o.current) == null || e.scrollBy({ left: 100, behavior: "smooth" });
|
|
540
|
-
},
|
|
541
|
+
}, ae = () => {
|
|
541
542
|
var e;
|
|
542
543
|
(e = o == null ? void 0 : o.current) == null || e.scrollBy({ left: -100, behavior: "smooth" });
|
|
543
544
|
};
|
|
544
|
-
return /* @__PURE__ */ a(
|
|
545
|
+
return /* @__PURE__ */ a(Ne, { ref: ee, id: "landing__container", children: [
|
|
545
546
|
/* @__PURE__ */ a("div", { className: "landing__main-content", children: [
|
|
546
547
|
/* @__PURE__ */ a("div", { className: "main-content__heading", children: [
|
|
547
548
|
/* @__PURE__ */ n("div", { className: "main-content__title", children: s }),
|
|
548
|
-
!
|
|
549
|
+
!te && (h == null ? void 0 : h.arrowsVisible) && /* @__PURE__ */ a("div", { className: "main-content__tags-nav", children: [
|
|
549
550
|
/* @__PURE__ */ n(
|
|
550
551
|
F,
|
|
551
552
|
{
|
|
@@ -555,7 +556,7 @@ const we = E.div`
|
|
|
555
556
|
color: "neutral",
|
|
556
557
|
disabled: h == null ? void 0 : h.leftArrowDisabled,
|
|
557
558
|
className: "main-content__tag-nav",
|
|
558
|
-
onClick:
|
|
559
|
+
onClick: ae
|
|
559
560
|
}
|
|
560
561
|
),
|
|
561
562
|
/* @__PURE__ */ n(
|
|
@@ -567,30 +568,30 @@ const we = E.div`
|
|
|
567
568
|
color: "neutral",
|
|
568
569
|
disabled: h == null ? void 0 : h.rightArrowDisabled,
|
|
569
570
|
className: "main-content__tag-nav",
|
|
570
|
-
onClick:
|
|
571
|
+
onClick: ie
|
|
571
572
|
}
|
|
572
573
|
)
|
|
573
574
|
] })
|
|
574
575
|
] }),
|
|
575
|
-
|
|
576
|
-
|
|
576
|
+
g && /* @__PURE__ */ n(
|
|
577
|
+
pe,
|
|
577
578
|
{
|
|
578
579
|
ref: o,
|
|
579
|
-
tags:
|
|
580
|
-
allTagText:
|
|
580
|
+
tags: g,
|
|
581
|
+
allTagText: r,
|
|
581
582
|
selectedTagCode: c,
|
|
582
583
|
onSelectTag: d
|
|
583
584
|
}
|
|
584
585
|
),
|
|
585
586
|
/* @__PURE__ */ a("div", { className: "main-content__actions", children: [
|
|
586
587
|
/* @__PURE__ */ n(
|
|
587
|
-
|
|
588
|
+
ue,
|
|
588
589
|
{
|
|
589
590
|
className: "main-content__search",
|
|
590
|
-
placeholder:
|
|
591
|
+
placeholder: i,
|
|
591
592
|
debounceTime: 200,
|
|
592
593
|
prefix: /* @__PURE__ */ n(
|
|
593
|
-
|
|
594
|
+
C,
|
|
594
595
|
{
|
|
595
596
|
icon: " mng-lnc-search",
|
|
596
597
|
sizeInUnits: "1.25rem",
|
|
@@ -608,12 +609,12 @@ const we = E.div`
|
|
|
608
609
|
control: m == null ? void 0 : m.name,
|
|
609
610
|
zIndex: 1001,
|
|
610
611
|
className: "main-content__sort-by",
|
|
611
|
-
children:
|
|
612
|
+
children: f == null ? void 0 : f.map((e, l) => /* @__PURE__ */ n(
|
|
612
613
|
q,
|
|
613
614
|
{
|
|
614
615
|
active: (e == null ? void 0 : e.code) === (m == null ? void 0 : m.code),
|
|
615
616
|
className: "sort-by__item",
|
|
616
|
-
onClick: () =>
|
|
617
|
+
onClick: () => w(e),
|
|
617
618
|
children: e == null ? void 0 : e.name
|
|
618
619
|
},
|
|
619
620
|
`blog-epxlore-section-sorting-option__${l + 1}`
|
|
@@ -625,76 +626,76 @@ const we = E.div`
|
|
|
625
626
|
t && (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ n(
|
|
626
627
|
V,
|
|
627
628
|
{
|
|
628
|
-
timeToReadText:
|
|
629
|
+
timeToReadText: p,
|
|
629
630
|
items: t == null ? void 0 : t.slice(0, 5),
|
|
630
|
-
isLoading:
|
|
631
|
+
isLoading: x,
|
|
631
632
|
getImage: b,
|
|
632
633
|
onSelectCard: y,
|
|
633
|
-
onSelectOption:
|
|
634
|
-
onShare:
|
|
634
|
+
onSelectOption: $,
|
|
635
|
+
onShare: A,
|
|
635
636
|
onBookmark: L,
|
|
636
637
|
bookmarkComponent: T,
|
|
637
|
-
componentName:
|
|
638
|
-
LinkComponent:
|
|
638
|
+
componentName: k,
|
|
639
|
+
LinkComponent: S
|
|
639
640
|
}
|
|
640
641
|
),
|
|
641
642
|
/* @__PURE__ */ n("div", { className: "main-content__divider" }),
|
|
642
|
-
|
|
643
|
-
|
|
643
|
+
v && (v == null ? void 0 : v.length) > 0 && /* @__PURE__ */ n(
|
|
644
|
+
ge,
|
|
644
645
|
{
|
|
645
646
|
buttonText: R,
|
|
646
647
|
buttonLink: H,
|
|
647
648
|
onButtonAction: K,
|
|
648
649
|
onSelectCard: Q,
|
|
649
|
-
items:
|
|
650
|
-
isLoading:
|
|
650
|
+
items: v,
|
|
651
|
+
isLoading: z,
|
|
651
652
|
getImage: U,
|
|
652
653
|
isHighlight: !0,
|
|
653
|
-
componentName:
|
|
654
|
-
LinkComponent:
|
|
654
|
+
componentName: k,
|
|
655
|
+
LinkComponent: S
|
|
655
656
|
}
|
|
656
657
|
),
|
|
657
658
|
/* @__PURE__ */ n("div", { className: "main-content__divider" }),
|
|
658
659
|
t && (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ n(
|
|
659
660
|
V,
|
|
660
661
|
{
|
|
661
|
-
timeToReadText:
|
|
662
|
+
timeToReadText: p,
|
|
662
663
|
items: t == null ? void 0 : t.slice(5),
|
|
663
|
-
isLoading:
|
|
664
|
+
isLoading: x,
|
|
664
665
|
getImage: b,
|
|
665
666
|
onSelectCard: y,
|
|
666
|
-
onSelectOption:
|
|
667
|
-
onShare:
|
|
667
|
+
onSelectOption: $,
|
|
668
|
+
onShare: A,
|
|
668
669
|
onBookmark: L,
|
|
669
670
|
bookmarkComponent: T,
|
|
670
|
-
componentName:
|
|
671
|
-
LinkComponent:
|
|
671
|
+
componentName: k,
|
|
672
|
+
LinkComponent: S
|
|
672
673
|
}
|
|
673
674
|
)
|
|
674
675
|
] }),
|
|
675
|
-
|
|
676
|
-
|
|
676
|
+
(D > 1 || P) && /* @__PURE__ */ n(
|
|
677
|
+
ye,
|
|
677
678
|
{
|
|
678
679
|
perPageOptions: O,
|
|
679
680
|
perPage: Y,
|
|
680
681
|
handlePerPage: Z,
|
|
681
682
|
page: X,
|
|
682
|
-
handlePage:
|
|
683
|
-
totalPage:
|
|
683
|
+
handlePage: ne,
|
|
684
|
+
totalPage: D
|
|
684
685
|
}
|
|
685
686
|
)
|
|
686
687
|
] }),
|
|
687
688
|
/* @__PURE__ */ a("div", { className: "landing__side-content", children: [
|
|
688
|
-
|
|
689
|
+
u && /* @__PURE__ */ n("div", { className: "side-content__title", children: u }),
|
|
689
690
|
_ && (_ == null ? void 0 : _.length) > 0 && /* @__PURE__ */ a(I, { children: [
|
|
690
|
-
/* @__PURE__ */ n("div", { className: "side-content__items", children: _ == null ? void 0 : _.map((e, l) => /* @__PURE__ */ n(
|
|
691
|
+
/* @__PURE__ */ n("div", { className: "side-content__items", children: _ == null ? void 0 : _.map((e, l) => /* @__PURE__ */ n(me, { children: /* @__PURE__ */ a(
|
|
691
692
|
"div",
|
|
692
693
|
{
|
|
693
694
|
className: "side-content__item",
|
|
694
695
|
onClick: () => y(e),
|
|
695
696
|
children: [
|
|
696
697
|
/* @__PURE__ */ n(
|
|
697
|
-
|
|
698
|
+
xe,
|
|
698
699
|
{
|
|
699
700
|
src: b(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
700
701
|
alt: `Mini blog ${l + 1}`,
|
|
@@ -703,17 +704,17 @@ const we = E.div`
|
|
|
703
704
|
),
|
|
704
705
|
/* @__PURE__ */ a("div", { className: "item__content", children: [
|
|
705
706
|
/* @__PURE__ */ n("div", { className: "item__title", children: e == null ? void 0 : e.title }),
|
|
706
|
-
/* @__PURE__ */ n("div", { className: "item__description", children:
|
|
707
|
+
/* @__PURE__ */ n("div", { className: "item__description", children: fe(e == null ? void 0 : e.publishedAt) })
|
|
707
708
|
] })
|
|
708
709
|
]
|
|
709
710
|
}
|
|
710
711
|
) }, `mini_blg_${l}`)) }),
|
|
711
|
-
/* @__PURE__ */ n(
|
|
712
|
+
/* @__PURE__ */ n(ve, { onClick: J, className: "side-content__link", children: G })
|
|
712
713
|
] })
|
|
713
714
|
] })
|
|
714
715
|
] });
|
|
715
716
|
}
|
|
716
717
|
);
|
|
717
718
|
export {
|
|
718
|
-
|
|
719
|
+
Ee as default
|
|
719
720
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),l=require("react"),K=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./breakpoints-CcVm-gVm.cjs"),Q=require("./IconButton.cjs"),G=require("./Button.cjs"),r=require("./utils-CITgSxXe.cjs"),H=require("./useDetectMobile-DYV6V1yw.cjs"),f=require("./index-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),l=require("react"),K=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./breakpoints-CcVm-gVm.cjs"),Q=require("./IconButton.cjs"),G=require("./Button.cjs"),r=require("./utils-CITgSxXe.cjs"),H=require("./useDetectMobile-DYV6V1yw.cjs"),f=require("./index-DZFKpq77.cjs"),J=require("./index-vQOR22Py.cjs"),W=require("./index-oYE1Pl7q.cjs"),X=K.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.5rem;
|
|
@@ -6,7 +6,7 @@ import H from "./IconButton.js";
|
|
|
6
6
|
import J from "./Button.js";
|
|
7
7
|
import { l as n } from "./utils-B2fsQ6PS.js";
|
|
8
8
|
import { u as W } from "./useDetectMobile-CcVo3PNi.js";
|
|
9
|
-
import { D as X, S as Y } from "./index-
|
|
9
|
+
import { D as X, S as Y } from "./index-DDShXLaW.js";
|
|
10
10
|
import { S as Z } from "./index-BzSWu-7v.js";
|
|
11
11
|
import { S as x } from "./index-4wvppFLx.js";
|
|
12
12
|
const ee = G.div`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),c=require("react"),K=require("./emotion-styled.browser.esm-BtEseadx.cjs"),j=require("./breakpoints-CcVm-gVm.cjs"),W=require("./Button.cjs"),l=require("./utils-CITgSxXe.cjs"),z=require("./useDetectMobile-DYV6V1yw.cjs"),G=require("./style-DC05rdyx.cjs"),P=require("./index-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),K=require("./emotion-styled.browser.esm-BtEseadx.cjs"),j=require("./breakpoints-CcVm-gVm.cjs"),W=require("./Button.cjs"),l=require("./utils-CITgSxXe.cjs"),z=require("./useDetectMobile-DYV6V1yw.cjs"),G=require("./style-DC05rdyx.cjs"),P=require("./index-DZFKpq77.cjs"),V=require("./index-vQOR22Py.cjs"),H=require("./index-oYE1Pl7q.cjs"),J=K.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${n=>`repeat(${n.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -6,7 +6,7 @@ import V from "./Button.js";
|
|
|
6
6
|
import { l as c } from "./utils-B2fsQ6PS.js";
|
|
7
7
|
import { u as H } from "./useDetectMobile-CcVo3PNi.js";
|
|
8
8
|
import { T as J } from "./style-BUyFad_y.js";
|
|
9
|
-
import { D as X, S as Y } from "./index-
|
|
9
|
+
import { D as X, S as Y } from "./index-DDShXLaW.js";
|
|
10
10
|
import { S as Z } from "./index-BzSWu-7v.js";
|
|
11
11
|
import { S as x } from "./index-4wvppFLx.js";
|
|
12
12
|
const ee = G.div`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),s=require("react"),L=require("./emotion-styled.browser.esm-BtEseadx.cjs"),u=require("./breakpoints-CcVm-gVm.cjs"),T=require("./useDetectMobile-DYV6V1yw.cjs"),D=require("./Button.cjs"),j=require("./index-
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),s=require("react"),L=require("./emotion-styled.browser.esm-BtEseadx.cjs"),u=require("./breakpoints-CcVm-gVm.cjs"),T=require("./useDetectMobile-DYV6V1yw.cjs"),D=require("./Button.cjs"),j=require("./index-DZFKpq77.cjs"),Q=L.styled.div`
|
|
2
2
|
padding: 1.75rem 3rem;
|
|
3
3
|
display: grid;
|
|
4
4
|
grid-template-columns: ${t=>`repeat(${t.limit||5}, minmax(0, 1fr))`};
|
|
@@ -4,7 +4,7 @@ import { s as z } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
|
4
4
|
import { d as c } from "./breakpoints-ff0SIcV3.js";
|
|
5
5
|
import { u as A } from "./useDetectMobile-CcVo3PNi.js";
|
|
6
6
|
import B from "./Button.js";
|
|
7
|
-
import { D as G, S as R } from "./index-
|
|
7
|
+
import { D as G, S as R } from "./index-DDShXLaW.js";
|
|
8
8
|
const I = z.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as n, jsx as e, Fragment as
|
|
1
|
+
import { jsxs as n, jsx as e, Fragment as U } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as ce, useState as ne, useRef as ie, useEffect as Me, cloneElement as te, Suspense as Le } from "react";
|
|
3
3
|
import { s as S } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { d as L } from "./breakpoints-ff0SIcV3.js";
|
|
5
|
-
import { t as
|
|
5
|
+
import { t as I, n as xe, b as Te, m as M, p as ae, G as se, l as le } from "./utils-B2fsQ6PS.js";
|
|
6
6
|
import { P as qe } from "./index-BvMY2TbK.js";
|
|
7
|
-
import
|
|
7
|
+
import O from "./Badge.js";
|
|
8
8
|
import Ae from "./Popover.js";
|
|
9
9
|
import Xe from "./PopoverTrigger.js";
|
|
10
10
|
import Ye from "./PopoverContent.js";
|
|
@@ -28,7 +28,7 @@ const Ke = S.a`
|
|
|
28
28
|
}
|
|
29
29
|
& .seller {
|
|
30
30
|
text-transform: uppercase;
|
|
31
|
-
${
|
|
31
|
+
${I()}
|
|
32
32
|
color: var(--gray-500);
|
|
33
33
|
font-size: 0.625rem;
|
|
34
34
|
font-weight: 400;
|
|
@@ -87,7 +87,7 @@ const Ke = S.a`
|
|
|
87
87
|
& .price-text {
|
|
88
88
|
font-size: 1rem;
|
|
89
89
|
font-weight: 600;
|
|
90
|
-
${
|
|
90
|
+
${I()}
|
|
91
91
|
display: flex;
|
|
92
92
|
align-items: end;
|
|
93
93
|
gap: 0.5rem;
|
|
@@ -103,6 +103,7 @@ const Ke = S.a`
|
|
|
103
103
|
font-weight: 400;
|
|
104
104
|
padding-bottom: 0.125rem;
|
|
105
105
|
color: var(--gray-600, #676e79);
|
|
106
|
+
${I()}
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
|
|
@@ -110,7 +111,7 @@ const Ke = S.a`
|
|
|
110
111
|
font-size: 0.75rem;
|
|
111
112
|
font-weight: 400;
|
|
112
113
|
color: var(--gray-600, #676e79);
|
|
113
|
-
${
|
|
114
|
+
${I()}
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
& .tags-wrapper {
|
|
@@ -482,7 +483,7 @@ const Ke = S.a`
|
|
|
482
483
|
}, kr = ce((a, P) => {
|
|
483
484
|
const {
|
|
484
485
|
uuid: m,
|
|
485
|
-
sellerUuid:
|
|
486
|
+
sellerUuid: B,
|
|
486
487
|
name: me,
|
|
487
488
|
price: E = 0,
|
|
488
489
|
sellingPrice: R,
|
|
@@ -499,7 +500,7 @@ const Ke = S.a`
|
|
|
499
500
|
categoryCode: V,
|
|
500
501
|
categoryName: be,
|
|
501
502
|
condition: T,
|
|
502
|
-
quantity:
|
|
503
|
+
quantity: W,
|
|
503
504
|
trade: q,
|
|
504
505
|
sponsoredText: ve,
|
|
505
506
|
forCart: we,
|
|
@@ -508,7 +509,7 @@ const Ke = S.a`
|
|
|
508
509
|
hasVariants: _e,
|
|
509
510
|
hasQuantities: Ne,
|
|
510
511
|
status: Re,
|
|
511
|
-
onBookmark:
|
|
512
|
+
onBookmark: D = () => {
|
|
512
513
|
},
|
|
513
514
|
actionComponent: w,
|
|
514
515
|
bookmarked: A,
|
|
@@ -522,24 +523,24 @@ const Ke = S.a`
|
|
|
522
523
|
urgentText: Se = "Urgent",
|
|
523
524
|
LinkComponent: Y,
|
|
524
525
|
hasFreeShipping: Pe
|
|
525
|
-
} = a, Ee = Y || "a",
|
|
526
|
+
} = a, Ee = Y || "a", j = He(), Fe = () => {
|
|
526
527
|
var c;
|
|
527
|
-
if (!M(w)) return /* @__PURE__ */ e(
|
|
528
|
+
if (!M(w)) return /* @__PURE__ */ e(U, {});
|
|
528
529
|
const r = w, o = (c = w == null ? void 0 : w.props) == null ? void 0 : c.children, s = te(o, {
|
|
529
530
|
key: `bookmark_pr__${A}`,
|
|
530
531
|
bookmarked: A,
|
|
531
532
|
productUuid: m,
|
|
532
|
-
onAddToBookmark: () =>
|
|
533
|
-
onRemoveFromBookmark: () =>
|
|
533
|
+
onAddToBookmark: () => D(!0, m),
|
|
534
|
+
onRemoveFromBookmark: () => D(!1, m),
|
|
534
535
|
bookmarkedUuidList: ke,
|
|
535
|
-
sellerUuid:
|
|
536
|
-
handleBookmarking:
|
|
536
|
+
sellerUuid: B,
|
|
537
|
+
handleBookmarking: D,
|
|
537
538
|
forCart: we,
|
|
538
539
|
forOrder: Ce,
|
|
539
540
|
contactSeller: ye,
|
|
540
541
|
hasVariants: _e,
|
|
541
542
|
status: Re,
|
|
542
|
-
quantity:
|
|
543
|
+
quantity: W,
|
|
543
544
|
hasQuantities: Ne,
|
|
544
545
|
productBasicInfo: {
|
|
545
546
|
uuid: m,
|
|
@@ -571,7 +572,7 @@ const Ke = S.a`
|
|
|
571
572
|
}, d = ie(null), f = ie([]), [Ie, Q] = ne(t == null ? void 0 : t.length), Oe = () => {
|
|
572
573
|
var c, y, $;
|
|
573
574
|
if (!(d != null && d.current) || ((c = f == null ? void 0 : f.current) == null ? void 0 : c.length) === 0) return;
|
|
574
|
-
if (
|
|
575
|
+
if (j) {
|
|
575
576
|
Q(t == null ? void 0 : t.length);
|
|
576
577
|
return;
|
|
577
578
|
}
|
|
@@ -595,14 +596,14 @@ const Ke = S.a`
|
|
|
595
596
|
return o.observe(r), () => {
|
|
596
597
|
o.disconnect();
|
|
597
598
|
};
|
|
598
|
-
}, [t,
|
|
599
|
+
}, [t, j]);
|
|
599
600
|
const Ue = () => {
|
|
600
601
|
var r;
|
|
601
602
|
return /* @__PURE__ */ e("div", { className: "tags-popover__trigger", children: (r = t == null ? void 0 : t.slice(0, Ie)) == null ? void 0 : r.map((o, s) => {
|
|
602
603
|
var b, p, ee, re, oe;
|
|
603
604
|
const c = ((b = l == null ? void 0 : l[o == null ? void 0 : o.code]) == null ? void 0 : b.icon) ?? ((p = l == null ? void 0 : l.default) == null ? void 0 : p.icon) ?? "", y = ((ee = o == null ? void 0 : o.measurementUnit) == null ? void 0 : ee.symbol) ?? ((re = l == null ? void 0 : l[o == null ? void 0 : o.code]) == null ? void 0 : re.measure) ?? "", g = [(o == null ? void 0 : o.value) ?? ((oe = o == null ? void 0 : o.multiOptions) == null ? void 0 : oe[0]) ?? "", y].filter(Boolean).join(" ");
|
|
604
605
|
return /* @__PURE__ */ n(
|
|
605
|
-
|
|
606
|
+
O,
|
|
606
607
|
{
|
|
607
608
|
ref: (je) => f.current[s] = je,
|
|
608
609
|
className: "tag",
|
|
@@ -621,10 +622,10 @@ const Ke = S.a`
|
|
|
621
622
|
/* @__PURE__ */ e("span", { className: "tags-popover__name", children: `${$}: ` }),
|
|
622
623
|
/* @__PURE__ */ e("span", { className: "tags-popover__value", children: y })
|
|
623
624
|
] }, `detailed-products-section-tag-dropdown__${o + 1}`);
|
|
624
|
-
}) }), We = () => /* @__PURE__ */ n(
|
|
625
|
-
T && /* @__PURE__ */ e(
|
|
626
|
-
|
|
627
|
-
q && /* @__PURE__ */ e(
|
|
625
|
+
}) }), We = () => /* @__PURE__ */ n(U, { children: [
|
|
626
|
+
T && /* @__PURE__ */ e(O, { className: "tag", children: T }, "detailed-products-section-tag__condition"),
|
|
627
|
+
W && /* @__PURE__ */ e(O, { className: "tag", children: W }, "detailed-products-section-tag__quantity"),
|
|
628
|
+
q && /* @__PURE__ */ e(O, { className: "tag", children: q }, "detailed-products-section-tag__trade")
|
|
628
629
|
] }), J = E > 0 && k && F !== !0 && z !== !0 && E !== R, De = h == null ? void 0 : h.some(
|
|
629
630
|
(r) => (r == null ? void 0 : r.salesPackageCode) === "FreeShipping"
|
|
630
631
|
), Z = Pe === !0 && !De;
|
|
@@ -674,7 +675,7 @@ const Ke = S.a`
|
|
|
674
675
|
sizeInUnits: "1rem"
|
|
675
676
|
}
|
|
676
677
|
),
|
|
677
|
-
(r == null ? void 0 : r.salesPackageCode) === "Urgent" && /* @__PURE__ */ e(
|
|
678
|
+
(r == null ? void 0 : r.salesPackageCode) === "Urgent" && /* @__PURE__ */ e(U, { children: Se })
|
|
678
679
|
]
|
|
679
680
|
},
|
|
680
681
|
o
|
|
@@ -696,7 +697,7 @@ const Ke = S.a`
|
|
|
696
697
|
H && /* @__PURE__ */ e(
|
|
697
698
|
"div",
|
|
698
699
|
{
|
|
699
|
-
...
|
|
700
|
+
...j ? {} : {
|
|
700
701
|
onMouseEnter: Ve,
|
|
701
702
|
onMouseLeave: Ge
|
|
702
703
|
},
|
|
@@ -872,9 +873,9 @@ const Ke = S.a`
|
|
|
872
873
|
] }), $r = ({
|
|
873
874
|
keyPrefix: a,
|
|
874
875
|
isLoading: P = !1,
|
|
875
|
-
fallbackComponent: m = /* @__PURE__ */ e(
|
|
876
|
-
children:
|
|
877
|
-
}) => /* @__PURE__ */ e(Le, { fallbackComponent: m, children: P === !0 ? /* @__PURE__ */ e(cr, { keyPrefix: a }) :
|
|
876
|
+
fallbackComponent: m = /* @__PURE__ */ e(U, {}),
|
|
877
|
+
children: B
|
|
878
|
+
}) => /* @__PURE__ */ e(Le, { fallbackComponent: m, children: P === !0 ? /* @__PURE__ */ e(cr, { keyPrefix: a }) : B });
|
|
878
879
|
export {
|
|
879
880
|
kr as D,
|
|
880
881
|
$r as S
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),m=require("react"),y=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./breakpoints-CcVm-gVm.cjs"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),m=require("react"),y=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./breakpoints-CcVm-gVm.cjs"),i=require("./utils-CITgSxXe.cjs"),Ne=require("./index-DsINTjQk.cjs"),W=require("./Badge.cjs"),$e=require("./Popover.cjs"),Le=require("./PopoverTrigger.cjs"),We=require("./PopoverContent.cjs"),Ee=require("./useDetectMobile-DYV6V1yw.cjs"),J=require("./Icon.cjs"),n=require("./style-BAcV7F53.cjs"),Fe=y.styled.a`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 0.5rem;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
& .seller {
|
|
17
17
|
text-transform: uppercase;
|
|
18
|
-
${
|
|
18
|
+
${i.truncateText()}
|
|
19
19
|
color: var(--gray-500);
|
|
20
20
|
font-size: 0.625rem;
|
|
21
21
|
font-weight: 400;
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
& .card-title {
|
|
69
69
|
font-size: 0.875rem;
|
|
70
70
|
font-weight: 600;
|
|
71
|
-
${
|
|
71
|
+
${i.truncateTextInRows(2)}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
& .price-text {
|
|
75
75
|
font-size: 1rem;
|
|
76
76
|
font-weight: 600;
|
|
77
|
-
${
|
|
77
|
+
${i.truncateText()}
|
|
78
78
|
display: flex;
|
|
79
79
|
align-items: end;
|
|
80
80
|
gap: 0.5rem;
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
font-weight: 400;
|
|
91
91
|
padding-bottom: 0.125rem;
|
|
92
92
|
color: var(--gray-600, #676e79);
|
|
93
|
+
${i.truncateText()}
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
|
|
@@ -97,7 +98,7 @@
|
|
|
97
98
|
font-size: 0.75rem;
|
|
98
99
|
font-weight: 400;
|
|
99
100
|
color: var(--gray-600, #676e79);
|
|
100
|
-
${
|
|
101
|
+
${i.truncateText()}
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
& .tags-wrapper {
|
|
@@ -247,7 +248,7 @@
|
|
|
247
248
|
|
|
248
249
|
width: 2.25rem;
|
|
249
250
|
height: 2.25rem;
|
|
250
|
-
border-radius: ${i
|
|
251
|
+
border-radius: ${s=>i.getBorderRadiusValueWithUnits(s.theme,"curved")};
|
|
251
252
|
border: 1px solid var(--gray-95008);
|
|
252
253
|
background-color: white;
|
|
253
254
|
color: var(--gray-950);
|
|
@@ -356,7 +357,7 @@
|
|
|
356
357
|
font-size: 1rem;
|
|
357
358
|
color: var(--warning-500, #F59E0B);
|
|
358
359
|
}
|
|
359
|
-
`,Ve=m.forwardRef(({sponsoredText:
|
|
360
|
+
`,Ve=m.forwardRef(({sponsoredText:s="Sponsored"},P)=>e.jsxs(De,{ref:P,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:s})]})),Ge="Vehicles_Cars",Ie="Vehicles_Motorcycles",Oe="Vehicles_Trucks",Ue="Vehicles_AgriculturalMachines_Tractors",Be="Vehicles_ConstructionMachines",Me="Vehicles_Bus",Te="Vehicles_Campers",Ae="RealEstates_",l={Mileage:{icon:"mng-lnc-road",measure:"km"},YearOfProduction:{icon:"mng-lnc-calendar",measure:""},Fuel:{icon:"mng-lnc-gas-station",measure:""},EnginePowerKW:{icon:"mng-lnc-engine",measure:"kW"},Transmission:{icon:"mng-lnc-transmission",measure:""},Model:{icon:"mng-lnc-application",measure:""},Brand:{icon:"mng-lnc-car--front",measure:""},SurfaceArea:{icon:"mng-lnc-right-angle",measure:""},Floor:{icon:"mng-lnc-elevator",measure:""},FurnishedCondition:{icon:"mng-lnc-sofa-01",measure:""},AdType:{icon:"mng-lnc-notes",measure:""},NumberOfRooms:{icon:"mng-lnc-meeting-room",measure:""},HeatingType:{icon:"mng-lnc-heat",measure:""},AirConditioning:{icon:"mng-lnc-air-conditioner",measure:""},Type:{icon:"mng-lnc-house-building",measure:""},Parking:{icon:"mng-lnc-parking-area-circle",measure:""},Internet:{icon:"mng-lnc-wifi-02",measure:""},State:{icon:"mng-lnc-settings-1",measure:""},NumberOfPremises:{icon:"mng-lnc-meeting-room",measure:""},Pool:{icon:"mng-lnc-pool",measure:""},Approach:{icon:"mng-lnc-driveway",measure:""},NumberOfBeds:{icon:"mng-lnc-bed",measure:""},Kitchen:{icon:"mng-lnc-fridge",measure:""},BathroomToilet:{icon:"mng-lnc-bath",measure:""},default:{icon:" mng-lnc-clock--filled",measure:""}},x={ADDDISCOUNT:" mng-lnc-percentage",URGENT:" mng-lnc-flash",FREEQUANTITY:" mng-lnc-3d-software",INCLUDEGIFTS:" mng-lnc-gift",FREESHIPPING:" mng-lnc-delivery--parcel"},Xe=m.forwardRef((s,P)=>{const{uuid:h,sellerUuid:E,name:Z,price:R=0,sellingPrice:S,currency:k,isNegotiable:_,isFree:N,imageUrl:ee,location:re,sponsored:ne,imageComponent:V,freeText:oe="Free",negotiableText:te="Negotiable",tags:t=[],categoryCode:$,categoryName:ie,condition:G,quantity:F,trade:I,sponsoredText:se,forCart:ae,forOrder:le,contactSeller:ce,hasVariants:de,hasQuantities:me,status:he,onBookmark:q=()=>{},actionComponent:w,bookmarked:O,bookmarkLists:ue,metadata:v,sellerName:U,nameSlug:L,onSelectCard:pe=()=>{},activeSalesPackages:u,urgentText:ge="Urgent",LinkComponent:B,hasFreeShipping:fe}=s,be=B||"a",z=Ee.useDetectMobile(),we=()=>{var d;if(!i.isDefined(w))return e.jsx(e.Fragment,{});const r=w,o=(d=w==null?void 0:w.props)==null?void 0:d.children,a=m.cloneElement(o,{key:`bookmark_pr__${O}`,bookmarked:O,productUuid:h,onAddToBookmark:()=>q(!0,h),onRemoveFromBookmark:()=>q(!1,h),bookmarkedUuidList:ue,sellerUuid:E,handleBookmarking:q,forCart:ae,forOrder:le,contactSeller:ce,hasVariants:de,status:he,quantity:F,hasQuantities:me,productBasicInfo:{uuid:h,price:R,sellingPrice:S,categoryCode:$,categoryName:ie,currency:k,isNegotiable:_,isFree:N}});return m.cloneElement(r,void 0,a)},M=[Ge,Ie,Oe,Ue,Be,Me,Te,Ae].some(r=>$==null?void 0:$.includes(r)),[ve,T]=m.useState(!1),je=()=>{T(!0)},xe=()=>{T(!1)},c=m.useRef(null),f=m.useRef([]),[Se,A]=m.useState(t==null?void 0:t.length),ke=()=>{var d,j,C;if(!(c!=null&&c.current)||((d=f==null?void 0:f.current)==null?void 0:d.length)===0)return;if(z){A(t==null?void 0:t.length);return}const r=(j=c==null?void 0:c.current)==null?void 0:j.offsetWidth;let o=0,a=0;for(let p=0;p<(t==null?void 0:t.length);p++){const b=((C=f==null?void 0:f.current[p])==null?void 0:C.offsetWidth)||0,g=o+b+4;if(g<=r)o+=g,a++;else break}A(a)};m.useEffect(()=>{const r=c==null?void 0:c.current;if(!r)return;const o=new ResizeObserver(()=>{ke()});return o.observe(r),()=>{o.disconnect()}},[t,z]);const Ce=()=>{var r;return e.jsx("div",{className:"tags-popover__trigger",children:(r=t==null?void 0:t.slice(0,Se))==null?void 0:r.map((o,a)=>{var b,g,H,K,Q;const d=((b=l==null?void 0:l[o==null?void 0:o.code])==null?void 0:b.icon)??((g=l==null?void 0:l.default)==null?void 0:g.icon)??"",j=((H=o==null?void 0:o.measurementUnit)==null?void 0:H.symbol)??((K=l==null?void 0:l[o==null?void 0:o.code])==null?void 0:K.measure)??"",p=[(o==null?void 0:o.value)??((Q=o==null?void 0:o.multiOptions)==null?void 0:Q[0])??"",j].filter(Boolean).join(" ");return e.jsxs(W,{ref:_e=>f.current[a]=_e,className:"tag",children:[e.jsx("i",{className:d}),p]},`detailed-products-section-tag__${a+1}`)})})},ye=()=>e.jsx("div",{className:"tags-popover__content",children:t==null?void 0:t.map((r,o)=>{var p,b,g;const a=((p=r==null?void 0:r.measurementUnit)==null?void 0:p.symbol)??((b=l==null?void 0:l[r==null?void 0:r.code])==null?void 0:b.measure)??"",j=[(r==null?void 0:r.value)??((g=r==null?void 0:r.multiOptions)==null?void 0:g[0])??"",a].filter(Boolean).join(" "),C=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${C}: `}),e.jsx("span",{className:"tags-popover__value",children:j})]},`detailed-products-section-tag-dropdown__${o+1}`)})}),Pe=()=>e.jsxs(e.Fragment,{children:[G&&e.jsx(W,{className:"tag",children:G},"detailed-products-section-tag__condition"),F&&e.jsx(W,{className:"tag",children:F},"detailed-products-section-tag__quantity"),I&&e.jsx(W,{className:"tag",children:I},"detailed-products-section-tag__trade")]}),X=R>0&&k&&_!==!0&&N!==!0&&R!==S,Re=u==null?void 0:u.some(r=>(r==null?void 0:r.salesPackageCode)==="FreeShipping"),Y=fe===!0&&!Re;return e.jsxs(Fe,{ref:c,className:"product-card","data-accessor":v==null?void 0:v.accessor,name:v==null?void 0:v.name,onClick:r=>pe(r,c),as:be,...B?{to:`/product/${i.isDefinedNotEmptyString(L)?`${L}-`:""}${h}`}:{href:`/product/${i.isDefinedNotEmptyString(L)?`${L}-`:""}${h}`},children:[e.jsxs(qe,{className:"product-image-wrapper",children:[i.isDefined(w)&&e.jsx("div",{className:"prevent-el",onClick:r=>{r==null||r.preventDefault(),r==null||r.stopPropagation()},children:e.jsx(we,{})}),i.isDefined(V)?V:e.jsx(Ne.ProductImageWrapper,{src:ee})]}),(Y||u&&u.length>0)&&e.jsxs("div",{className:"campaign-badges",children:[Y&&e.jsx("div",{className:"campaign-badge campaign-badge-freeshipping",children:e.jsx(J,{icon:x==null?void 0:x.FREESHIPPING,sizeInUnits:"1rem"})}),u==null?void 0:u.map((r,o)=>{var a,d;return e.jsxs("div",{className:`campaign-badge campaign-badge-${(a=r==null?void 0:r.salesPackageCode)==null?void 0:a.toLowerCase()}`,children:[(r==null?void 0:r.salesPackageCode)!=="Urgent"&&e.jsx(J,{icon:x==null?void 0:x[(d=r==null?void 0:r.salesPackageCode)==null?void 0:d.toUpperCase()],sizeInUnits:"1rem"}),(r==null?void 0:r.salesPackageCode)==="Urgent"&&e.jsx(e.Fragment,{children:ge})]},o)})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:U,children:U}),e.jsx("div",{className:"card-title",children:Z})]}),e.jsxs("div",{className:"wrapper-card-3",onClick:r=>{r==null||r.preventDefault(),r==null||r.stopPropagation()},children:[M&&e.jsx("div",{...z?{}:{onMouseEnter:je,onMouseLeave:xe},children:e.jsxs($e,{placement:"bottom",open:ve,children:[e.jsx(Le,{children:Ce()}),e.jsx(We,{style:{all:"unset"},children:e.jsx(ze,{children:ye()})})]})}),!M&&Pe()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${X?"new-price":""}`,children:[S>0&&k&&_!==!0&&N!==!0&&e.jsx("div",{children:`${i.formatPrice(S)} ${i.GetCurrencySymbol(k)}`}),X&&e.jsx("div",{className:`${S>0?"full-price":""}`,children:`${i.formatPrice(R)} ${i.GetCurrencySymbol(k)}`}),_&&te,N&&oe]}),e.jsx("div",{className:"location-text",children:re})]}),ne===!0&&e.jsx(Ve,{sponsoredText:se})]})}),Ye=y.styled(n.SkeletonRowWrapper)`
|
|
360
361
|
@media ${D.down("S")} {
|
|
361
362
|
& > div {
|
|
362
363
|
&:nth-of-type(even) {
|
|
@@ -364,4 +365,4 @@
|
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
367
|
}
|
|
367
|
-
`,He=({keyPrefix:
|
|
368
|
+
`,He=({keyPrefix:s})=>e.jsxs(Ye,{children:[e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonColumnWrapper,{height:"1rem",children:e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"})}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonColumnWrapper,{height:"2rem",children:e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})})]},`${s}-1`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${s}-2`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${s}-3`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${s}-4`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${s}-5`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${s}-6`)]}),Ke=({keyPrefix:s,isLoading:P=!1,fallbackComponent:h=e.jsx(e.Fragment,{}),children:E})=>e.jsx(m.Suspense,{fallbackComponent:h,children:P===!0?e.jsx(He,{keyPrefix:s}):E});exports.DetailedProductCard=Xe;exports.SuspenseDetailedProductCard=Ke;
|