@lanaco/lnc-react-ui 4.0.223 → 4.0.225
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),x=require("react"),oe=require("./useDetectMobile-DYV6V1yw.cjs"),M=require("./utils-CITgSxXe.cjs"),le=require("./TextInput.cjs"),k=require("./Icon.cjs"),de=require("./Link.cjs"),T=require("./IconButton.cjs"),V=require("./DropdownMenu.cjs"),W=require("./DropdownItem.cjs"),me=require("./tag-DSnhWWHE.cjs"),he=require("./BlogProductCardsSection.cjs"),F=require("./emotion-styled.browser.esm-BtEseadx.cjs"),_e=require("./index-DsINTjQk.cjs"),L=require("./BlogListSection.cjs"),ue=require("./breakpoints-CcVm-gVm.cjs"),fe=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
|
+
`,xe=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:p=()=>{},page:a=1,handlePage:l=()=>{},totalPage:t},h)=>{var d,y;const f=()=>{a>1&&(l==null||l(a-1))},w=()=>{a<t&&(l==null||l(a+1))},_=(()=>{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==="..."?n.jsx("div",{className:"pagination__page ellipsis",children:i},`pagination-ellipsis__${v}`):n.jsx("div",{onClick:()=>l(i),className:`pagination__page ${a===i?"active":""}`,children:i},`pagination-page__${v}`))})();return n.jsxs(fe,{className:"pagination",children:[n.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)||((y=o[0])==null?void 0:y.name),placement:"bottom",zIndex:1001,className:"pagination__per-page",children:o==null?void 0:o.map((r,i)=>n.jsx(W,{active:(r==null?void 0:r.code)===(u==null?void 0:u.code),className:"sort-by__item",onClick:()=>p(r),children:r==null?void 0:r.name},`blog-epxlore-section-per-page-option__${i+1}`))}),(_==null?void 0:_.length)>1&&n.jsxs("div",{className:"pagination__pages",children:[n.jsx("div",{className:`pagination__page ${a===1?"disabled":""}`,onClick:f,children:n.jsx(k,{icon:" mng-lnc-chevron--left"})}),_,n.jsx("div",{className:`pagination__page ${a===t?"disabled":""}`,onClick:w,children:n.jsx(k,{icon:" mng-lnc-chevron--right"})})]})]})}),ve=F.styled.div`
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: flex-start;
|
|
85
85
|
gap: 2rem;
|
|
@@ -259,6 +259,7 @@
|
|
|
259
259
|
align-items: flex-start;
|
|
260
260
|
gap: 1rem;
|
|
261
261
|
align-self: stretch;
|
|
262
|
+
text-decoration: none;
|
|
262
263
|
|
|
263
264
|
&:hover {
|
|
264
265
|
cursor: pointer;
|
|
@@ -300,7 +301,7 @@
|
|
|
300
301
|
}
|
|
301
302
|
}
|
|
302
303
|
|
|
303
|
-
@media ${
|
|
304
|
+
@media ${ue.down("S")} {
|
|
304
305
|
flex-direction: column;
|
|
305
306
|
|
|
306
307
|
& .landing__main-content {
|
|
@@ -352,4 +353,4 @@
|
|
|
352
353
|
display: none;
|
|
353
354
|
}
|
|
354
355
|
}
|
|
355
|
-
`,
|
|
356
|
+
`,ge=x.forwardRef(({mainTitle:o,sideTitle:u,tags:p,selectedTag:a,handleSelectTag:l=()=>{},blogs:t,miniBlogs:h,products:f,blogsLoading:w=!1,productsLoading:q=!1,sortingOptions:_,sortBy:d,handleSortBy:y=()=>{},allTagText:r="All",searchPlaceholderText:i="Search blogs",timeToReadText:v="{0} min read",getBlogImageUrl:b=()=>{},handleSelectBlog:j=()=>{},handleSelectBlogTag:C=()=>{},handleShareBlog:$=()=>{},showAllButtonLink:R,showAllButtonText:E="Show all products",viewAllButtonText:H="View all (11)",handleViewAll:G=()=>{},handleShowAll:J=()=>{},handleSelectProduct:K=()=>{},getProductImageUrl:Q=()=>{},page:U,handlePage:N=()=>{},perPage:X,handlePerPage:Y=()=>{},totalPage:z=0,perPageOptions:Z,handleSearch:O=()=>{},onBookmark:D=()=>{},bookmarkComponent:A=n.jsx(n.Fragment,{}),componentName:S,LinkComponent:g,showPerPage:B=!1},P)=>{const ee=e=>{document.getElementById("landing__container").scrollIntoView({behavior:"smooth",block:"start"}),N==null||N(e)},s=x.useRef(null),ne=oe.useDetectMobile(),[m,te]=x.useState({arrowsVisible:!1,leftArrowDisabled:!1,rightArrowDisabled:!1});x.useEffect(()=>{const e=s==null?void 0:s.current;if(!e)return;const c=()=>{const se=e.scrollWidth-e.clientWidth;te(ce=>({...ce,arrowsVisible:e.clientWidth<e.scrollWidth,leftArrowDisabled:e.scrollLeft<=0,rightArrowDisabled:e.scrollLeft>=se}))},I=new ResizeObserver(c);return I.observe(e),c(),e.addEventListener("scroll",c),()=>{I.disconnect(),e.removeEventListener("scroll",c)}},[]);const re=()=>{var e;(e=s==null?void 0:s.current)==null||e.scrollBy({left:100,behavior:"smooth"})},ie=()=>{var e;(e=s==null?void 0:s.current)==null||e.scrollBy({left:-100,behavior:"smooth"})},ae=g||"a";return n.jsxs(ve,{ref:P,id:"landing__container",children:[n.jsxs("div",{className:"landing__main-content",children:[n.jsxs("div",{className:"main-content__heading",children:[n.jsx("div",{className:"main-content__title",children:o}),!ne&&(m==null?void 0:m.arrowsVisible)&&n.jsxs("div",{className:"main-content__tags-nav",children:[n.jsx(T,{icon:"chevron-left",borderRadius:"curved",btnType:"tinted",color:"neutral",disabled:m==null?void 0:m.leftArrowDisabled,className:"main-content__tag-nav",onClick:ie}),n.jsx(T,{icon:"chevron-right",borderRadius:"curved",btnType:"tinted",color:"neutral",disabled:m==null?void 0:m.rightArrowDisabled,className:"main-content__tag-nav",onClick:re})]})]}),p&&n.jsx(me.FaqSectionTags,{ref:s,tags:p,allTagText:r,selectedTagCode:a,onSelectTag:l}),n.jsxs("div",{className:"main-content__actions",children:[n.jsx(le,{className:"main-content__search",placeholder:i,debounceTime:200,prefix:n.jsx(k,{icon:" mng-lnc-search",sizeInUnits:"1.25rem",className:"main-content__search-prefix"}),color:"neutral",onChange:O}),n.jsx(V,{color:"neutral",control:d==null?void 0:d.name,zIndex:1001,className:"main-content__sort-by",children:_==null?void 0:_.map((e,c)=>n.jsx(W,{active:(e==null?void 0:e.code)===(d==null?void 0:d.code),className:"sort-by__item",onClick:()=>y(e),children:e==null?void 0:e.name},`blog-epxlore-section-sorting-option__${c+1}`))})]}),n.jsxs("div",{className:"main-content__items",children:[t&&(t==null?void 0:t.length)>0&&n.jsx(L,{timeToReadText:v,items:t==null?void 0:t.slice(0,5),isLoading:w,getImage:b,onSelectCard:j,onSelectOption:C,onShare:$,onBookmark:D,bookmarkComponent:A,componentName:S,LinkComponent:g}),n.jsx("div",{className:"main-content__divider"}),f&&(f==null?void 0:f.length)>0&&n.jsx(he,{buttonText:E,buttonLink:R,onButtonAction:J,onSelectCard:K,items:f,isLoading:q,getImage:Q,isHighlight:!0,componentName:S,LinkComponent:g}),n.jsx("div",{className:"main-content__divider"}),t&&(t==null?void 0:t.length)>0&&n.jsx(L,{timeToReadText:v,items:t==null?void 0:t.slice(5),isLoading:w,getImage:b,onSelectCard:j,onSelectOption:C,onShare:$,onBookmark:D,bookmarkComponent:A,componentName:S,LinkComponent:g})]}),(z>1||B)&&n.jsx(xe,{perPageOptions:Z,perPage:X,handlePerPage:Y,page:U,handlePage:ee,totalPage:z})]}),n.jsxs("div",{className:"landing__side-content",children:[u&&n.jsx("div",{className:"side-content__title",children:u}),h&&(h==null?void 0:h.length)>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"side-content__items",children:h==null?void 0:h.map((e,c)=>n.jsx(x.Fragment,{children:n.jsxs(ae,{className:"side-content__item",onClick:()=>j(e),...g?{to:`/blog/${e==null?void 0:e.titleSlug}`}:{href:`/blog/${e==null?void 0:e.titleSlug}`},children:[n.jsx(_e.ProductImageWrapper,{src:b(e==null?void 0:e.imageUrl,e==null?void 0:e.uuid)||null,alt:`Mini blog ${c+1}`,className:"item__image"}),n.jsxs("div",{className:"item__content",children:[n.jsx("div",{className:"item__title",children:e==null?void 0:e.title}),n.jsx("div",{className:"item__description",children:M.formatLocaleDateString(e==null?void 0:e.publishedAt)})]})]})},`mini_blg_${c}`))}),n.jsx(de,{onClick:G,className:"side-content__link",children:H})]})]})]})});module.exports=ge;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as a, jsx as n, Fragment as
|
|
2
|
-
import { forwardRef as W, useRef as
|
|
3
|
-
import { u as
|
|
4
|
-
import { n as
|
|
5
|
-
import
|
|
1
|
+
import { jsxs as a, jsx as n, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as W, useRef as se, useState as de, useEffect as me, Fragment as he } from "react";
|
|
3
|
+
import { u as _e } from "./useDetectMobile-CcVo3PNi.js";
|
|
4
|
+
import { n as fe, q as ue } from "./utils-B2fsQ6PS.js";
|
|
5
|
+
import ve from "./TextInput.js";
|
|
6
6
|
import C from "./Icon.js";
|
|
7
|
-
import
|
|
7
|
+
import pe 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 ge } from "./tag-Bi8gg6hJ.js";
|
|
12
|
+
import xe from "./BlogProductCardsSection.js";
|
|
13
13
|
import { s as E } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
14
|
-
import { P as
|
|
14
|
+
import { P as we } from "./index-BvMY2TbK.js";
|
|
15
15
|
import V from "./BlogListSection.js";
|
|
16
|
-
import { d as
|
|
16
|
+
import { d as ye } from "./breakpoints-ff0SIcV3.js";
|
|
17
17
|
const be = E.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
justify-content: space-between;
|
|
@@ -95,7 +95,7 @@ const be = E.div`
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
`,
|
|
98
|
+
`, Ne = W(
|
|
99
99
|
({
|
|
100
100
|
perPageOptions: s = [
|
|
101
101
|
{ code: 10, name: "Show 10 items" },
|
|
@@ -103,17 +103,17 @@ const be = E.div`
|
|
|
103
103
|
{ code: 50, name: "Show 50 items" }
|
|
104
104
|
],
|
|
105
105
|
perPage: u,
|
|
106
|
-
handlePerPage:
|
|
106
|
+
handlePerPage: x = () => {
|
|
107
107
|
},
|
|
108
108
|
page: c = 1,
|
|
109
109
|
handlePage: d = () => {
|
|
110
110
|
},
|
|
111
111
|
totalPage: t
|
|
112
112
|
}, _) => {
|
|
113
|
-
var m,
|
|
113
|
+
var m, y;
|
|
114
114
|
const v = () => {
|
|
115
115
|
c > 1 && (d == null || d(c - 1));
|
|
116
|
-
},
|
|
116
|
+
}, w = () => {
|
|
117
117
|
c < t && (d == null || d(c + 1));
|
|
118
118
|
}, f = (() => {
|
|
119
119
|
const r = [];
|
|
@@ -144,7 +144,7 @@ const be = E.div`
|
|
|
144
144
|
M,
|
|
145
145
|
{
|
|
146
146
|
color: "neutral",
|
|
147
|
-
control: ((m = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.code) === u)) == null ? void 0 : m.name) || ((
|
|
147
|
+
control: ((m = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.code) === u)) == null ? void 0 : m.name) || ((y = s[0]) == null ? void 0 : y.name),
|
|
148
148
|
placement: "bottom",
|
|
149
149
|
zIndex: 1001,
|
|
150
150
|
className: "pagination__per-page",
|
|
@@ -153,7 +153,7 @@ const be = E.div`
|
|
|
153
153
|
{
|
|
154
154
|
active: (r == null ? void 0 : r.code) === (u == null ? void 0 : u.code),
|
|
155
155
|
className: "sort-by__item",
|
|
156
|
-
onClick: () =>
|
|
156
|
+
onClick: () => x(r),
|
|
157
157
|
children: r == null ? void 0 : r.name
|
|
158
158
|
},
|
|
159
159
|
`blog-epxlore-section-per-page-option__${i + 1}`
|
|
@@ -174,14 +174,14 @@ const be = E.div`
|
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: `pagination__page ${c === t ? "disabled" : ""}`,
|
|
177
|
-
onClick:
|
|
177
|
+
onClick: w,
|
|
178
178
|
children: /* @__PURE__ */ n(C, { icon: " mng-lnc-chevron--right" })
|
|
179
179
|
}
|
|
180
180
|
)
|
|
181
181
|
] })
|
|
182
182
|
] });
|
|
183
183
|
}
|
|
184
|
-
),
|
|
184
|
+
), Se = E.div`
|
|
185
185
|
display: flex;
|
|
186
186
|
align-items: flex-start;
|
|
187
187
|
gap: 2rem;
|
|
@@ -361,6 +361,7 @@ const be = E.div`
|
|
|
361
361
|
align-items: flex-start;
|
|
362
362
|
gap: 1rem;
|
|
363
363
|
align-self: stretch;
|
|
364
|
+
text-decoration: none;
|
|
364
365
|
|
|
365
366
|
&:hover {
|
|
366
367
|
cursor: pointer;
|
|
@@ -387,7 +388,7 @@ const be = E.div`
|
|
|
387
388
|
font-style: normal;
|
|
388
389
|
font-weight: 500;
|
|
389
390
|
line-height: 1.25rem;
|
|
390
|
-
${
|
|
391
|
+
${fe(2)}
|
|
391
392
|
}
|
|
392
393
|
|
|
393
394
|
& .item__description {
|
|
@@ -402,7 +403,7 @@ const be = E.div`
|
|
|
402
403
|
}
|
|
403
404
|
}
|
|
404
405
|
|
|
405
|
-
@media ${
|
|
406
|
+
@media ${ye("S")} {
|
|
406
407
|
flex-direction: column;
|
|
407
408
|
|
|
408
409
|
& .landing__main-content {
|
|
@@ -454,31 +455,31 @@ const be = E.div`
|
|
|
454
455
|
display: none;
|
|
455
456
|
}
|
|
456
457
|
}
|
|
457
|
-
`,
|
|
458
|
+
`, He = W(
|
|
458
459
|
({
|
|
459
460
|
mainTitle: s,
|
|
460
461
|
sideTitle: u,
|
|
461
|
-
tags:
|
|
462
|
+
tags: x,
|
|
462
463
|
selectedTag: c,
|
|
463
464
|
handleSelectTag: d = () => {
|
|
464
465
|
},
|
|
465
466
|
blogs: t,
|
|
466
467
|
miniBlogs: _,
|
|
467
468
|
products: v,
|
|
468
|
-
blogsLoading:
|
|
469
|
-
productsLoading:
|
|
469
|
+
blogsLoading: w = !1,
|
|
470
|
+
productsLoading: $ = !1,
|
|
470
471
|
sortingOptions: f,
|
|
471
472
|
sortBy: m,
|
|
472
|
-
handleSortBy:
|
|
473
|
+
handleSortBy: y = () => {
|
|
473
474
|
},
|
|
474
475
|
allTagText: r = "All",
|
|
475
476
|
searchPlaceholderText: i = "Search blogs",
|
|
476
477
|
timeToReadText: p = "{0} min read",
|
|
477
478
|
getBlogImageUrl: b = () => {
|
|
478
479
|
},
|
|
479
|
-
handleSelectBlog:
|
|
480
|
+
handleSelectBlog: N = () => {
|
|
480
481
|
},
|
|
481
|
-
handleSelectBlogTag:
|
|
482
|
+
handleSelectBlogTag: z = () => {
|
|
482
483
|
},
|
|
483
484
|
handleShareBlog: A = () => {
|
|
484
485
|
},
|
|
@@ -496,7 +497,7 @@ const be = E.div`
|
|
|
496
497
|
getProductImageUrl: U = () => {
|
|
497
498
|
},
|
|
498
499
|
page: X,
|
|
499
|
-
handlePage:
|
|
500
|
+
handlePage: S = () => {
|
|
500
501
|
},
|
|
501
502
|
perPage: Y,
|
|
502
503
|
handlePerPage: Z = () => {
|
|
@@ -505,34 +506,34 @@ const be = E.div`
|
|
|
505
506
|
perPageOptions: O,
|
|
506
507
|
handleSearch: B = () => {
|
|
507
508
|
},
|
|
508
|
-
onBookmark:
|
|
509
|
+
onBookmark: T = () => {
|
|
509
510
|
},
|
|
510
|
-
bookmarkComponent:
|
|
511
|
+
bookmarkComponent: j = /* @__PURE__ */ n(L, {}),
|
|
511
512
|
componentName: k,
|
|
512
|
-
LinkComponent:
|
|
513
|
+
LinkComponent: g,
|
|
513
514
|
showPerPage: P = !1
|
|
514
515
|
}, ee) => {
|
|
515
516
|
const ne = (e) => {
|
|
516
|
-
document.getElementById("landing__container").scrollIntoView({ behavior: "smooth", block: "start" }),
|
|
517
|
-
}, o =
|
|
517
|
+
document.getElementById("landing__container").scrollIntoView({ behavior: "smooth", block: "start" }), S == null || S(e);
|
|
518
|
+
}, o = se(null), te = _e(), [h, re] = de({
|
|
518
519
|
arrowsVisible: !1,
|
|
519
520
|
leftArrowDisabled: !1,
|
|
520
521
|
rightArrowDisabled: !1
|
|
521
522
|
});
|
|
522
|
-
|
|
523
|
+
me(() => {
|
|
523
524
|
const e = o == null ? void 0 : o.current;
|
|
524
525
|
if (!e) return;
|
|
525
526
|
const l = () => {
|
|
526
|
-
const
|
|
527
|
-
re((
|
|
528
|
-
...
|
|
527
|
+
const oe = e.scrollWidth - e.clientWidth;
|
|
528
|
+
re((le) => ({
|
|
529
|
+
...le,
|
|
529
530
|
arrowsVisible: e.clientWidth < e.scrollWidth,
|
|
530
531
|
leftArrowDisabled: e.scrollLeft <= 0,
|
|
531
|
-
rightArrowDisabled: e.scrollLeft >=
|
|
532
|
+
rightArrowDisabled: e.scrollLeft >= oe
|
|
532
533
|
}));
|
|
533
|
-
},
|
|
534
|
-
return
|
|
535
|
-
|
|
534
|
+
}, I = new ResizeObserver(l);
|
|
535
|
+
return I.observe(e), l(), e.addEventListener("scroll", l), () => {
|
|
536
|
+
I.disconnect(), e.removeEventListener("scroll", l);
|
|
536
537
|
};
|
|
537
538
|
}, []);
|
|
538
539
|
const ie = () => {
|
|
@@ -541,8 +542,8 @@ const be = E.div`
|
|
|
541
542
|
}, ae = () => {
|
|
542
543
|
var e;
|
|
543
544
|
(e = o == null ? void 0 : o.current) == null || e.scrollBy({ left: -100, behavior: "smooth" });
|
|
544
|
-
};
|
|
545
|
-
return /* @__PURE__ */ a(
|
|
545
|
+
}, ce = g || "a";
|
|
546
|
+
return /* @__PURE__ */ a(Se, { ref: ee, id: "landing__container", children: [
|
|
546
547
|
/* @__PURE__ */ a("div", { className: "landing__main-content", children: [
|
|
547
548
|
/* @__PURE__ */ a("div", { className: "main-content__heading", children: [
|
|
548
549
|
/* @__PURE__ */ n("div", { className: "main-content__title", children: s }),
|
|
@@ -573,11 +574,11 @@ const be = E.div`
|
|
|
573
574
|
)
|
|
574
575
|
] })
|
|
575
576
|
] }),
|
|
576
|
-
|
|
577
|
-
|
|
577
|
+
x && /* @__PURE__ */ n(
|
|
578
|
+
ge,
|
|
578
579
|
{
|
|
579
580
|
ref: o,
|
|
580
|
-
tags:
|
|
581
|
+
tags: x,
|
|
581
582
|
allTagText: r,
|
|
582
583
|
selectedTagCode: c,
|
|
583
584
|
onSelectTag: d
|
|
@@ -585,7 +586,7 @@ const be = E.div`
|
|
|
585
586
|
),
|
|
586
587
|
/* @__PURE__ */ a("div", { className: "main-content__actions", children: [
|
|
587
588
|
/* @__PURE__ */ n(
|
|
588
|
-
|
|
589
|
+
ve,
|
|
589
590
|
{
|
|
590
591
|
className: "main-content__search",
|
|
591
592
|
placeholder: i,
|
|
@@ -614,7 +615,7 @@ const be = E.div`
|
|
|
614
615
|
{
|
|
615
616
|
active: (e == null ? void 0 : e.code) === (m == null ? void 0 : m.code),
|
|
616
617
|
className: "sort-by__item",
|
|
617
|
-
onClick: () =>
|
|
618
|
+
onClick: () => y(e),
|
|
618
619
|
children: e == null ? void 0 : e.name
|
|
619
620
|
},
|
|
620
621
|
`blog-epxlore-section-sorting-option__${l + 1}`
|
|
@@ -628,31 +629,31 @@ const be = E.div`
|
|
|
628
629
|
{
|
|
629
630
|
timeToReadText: p,
|
|
630
631
|
items: t == null ? void 0 : t.slice(0, 5),
|
|
631
|
-
isLoading:
|
|
632
|
+
isLoading: w,
|
|
632
633
|
getImage: b,
|
|
633
|
-
onSelectCard:
|
|
634
|
-
onSelectOption:
|
|
634
|
+
onSelectCard: N,
|
|
635
|
+
onSelectOption: z,
|
|
635
636
|
onShare: A,
|
|
636
|
-
onBookmark:
|
|
637
|
-
bookmarkComponent:
|
|
637
|
+
onBookmark: T,
|
|
638
|
+
bookmarkComponent: j,
|
|
638
639
|
componentName: k,
|
|
639
|
-
LinkComponent:
|
|
640
|
+
LinkComponent: g
|
|
640
641
|
}
|
|
641
642
|
),
|
|
642
643
|
/* @__PURE__ */ n("div", { className: "main-content__divider" }),
|
|
643
644
|
v && (v == null ? void 0 : v.length) > 0 && /* @__PURE__ */ n(
|
|
644
|
-
|
|
645
|
+
xe,
|
|
645
646
|
{
|
|
646
647
|
buttonText: R,
|
|
647
648
|
buttonLink: H,
|
|
648
649
|
onButtonAction: K,
|
|
649
650
|
onSelectCard: Q,
|
|
650
651
|
items: v,
|
|
651
|
-
isLoading:
|
|
652
|
+
isLoading: $,
|
|
652
653
|
getImage: U,
|
|
653
654
|
isHighlight: !0,
|
|
654
655
|
componentName: k,
|
|
655
|
-
LinkComponent:
|
|
656
|
+
LinkComponent: g
|
|
656
657
|
}
|
|
657
658
|
),
|
|
658
659
|
/* @__PURE__ */ n("div", { className: "main-content__divider" }),
|
|
@@ -661,20 +662,20 @@ const be = E.div`
|
|
|
661
662
|
{
|
|
662
663
|
timeToReadText: p,
|
|
663
664
|
items: t == null ? void 0 : t.slice(5),
|
|
664
|
-
isLoading:
|
|
665
|
+
isLoading: w,
|
|
665
666
|
getImage: b,
|
|
666
|
-
onSelectCard:
|
|
667
|
-
onSelectOption:
|
|
667
|
+
onSelectCard: N,
|
|
668
|
+
onSelectOption: z,
|
|
668
669
|
onShare: A,
|
|
669
|
-
onBookmark:
|
|
670
|
-
bookmarkComponent:
|
|
670
|
+
onBookmark: T,
|
|
671
|
+
bookmarkComponent: j,
|
|
671
672
|
componentName: k,
|
|
672
|
-
LinkComponent:
|
|
673
|
+
LinkComponent: g
|
|
673
674
|
}
|
|
674
675
|
)
|
|
675
676
|
] }),
|
|
676
677
|
(D > 1 || P) && /* @__PURE__ */ n(
|
|
677
|
-
|
|
678
|
+
Ne,
|
|
678
679
|
{
|
|
679
680
|
perPageOptions: O,
|
|
680
681
|
perPage: Y,
|
|
@@ -687,15 +688,16 @@ const be = E.div`
|
|
|
687
688
|
] }),
|
|
688
689
|
/* @__PURE__ */ a("div", { className: "landing__side-content", children: [
|
|
689
690
|
u && /* @__PURE__ */ n("div", { className: "side-content__title", children: u }),
|
|
690
|
-
_ && (_ == null ? void 0 : _.length) > 0 && /* @__PURE__ */ a(
|
|
691
|
-
/* @__PURE__ */ n("div", { className: "side-content__items", children: _ == null ? void 0 : _.map((e, l) => /* @__PURE__ */ n(
|
|
692
|
-
|
|
691
|
+
_ && (_ == null ? void 0 : _.length) > 0 && /* @__PURE__ */ a(L, { children: [
|
|
692
|
+
/* @__PURE__ */ n("div", { className: "side-content__items", children: _ == null ? void 0 : _.map((e, l) => /* @__PURE__ */ n(he, { children: /* @__PURE__ */ a(
|
|
693
|
+
ce,
|
|
693
694
|
{
|
|
694
695
|
className: "side-content__item",
|
|
695
|
-
onClick: () =>
|
|
696
|
+
onClick: () => N(e),
|
|
697
|
+
...g ? { to: `/blog/${e == null ? void 0 : e.titleSlug}` } : { href: `/blog/${e == null ? void 0 : e.titleSlug}` },
|
|
696
698
|
children: [
|
|
697
699
|
/* @__PURE__ */ n(
|
|
698
|
-
|
|
700
|
+
we,
|
|
699
701
|
{
|
|
700
702
|
src: b(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null,
|
|
701
703
|
alt: `Mini blog ${l + 1}`,
|
|
@@ -704,17 +706,17 @@ const be = E.div`
|
|
|
704
706
|
),
|
|
705
707
|
/* @__PURE__ */ a("div", { className: "item__content", children: [
|
|
706
708
|
/* @__PURE__ */ n("div", { className: "item__title", children: e == null ? void 0 : e.title }),
|
|
707
|
-
/* @__PURE__ */ n("div", { className: "item__description", children:
|
|
709
|
+
/* @__PURE__ */ n("div", { className: "item__description", children: ue(e == null ? void 0 : e.publishedAt) })
|
|
708
710
|
] })
|
|
709
711
|
]
|
|
710
712
|
}
|
|
711
713
|
) }, `mini_blg_${l}`)) }),
|
|
712
|
-
/* @__PURE__ */ n(
|
|
714
|
+
/* @__PURE__ */ n(pe, { onClick: J, className: "side-content__link", children: G })
|
|
713
715
|
] })
|
|
714
716
|
] })
|
|
715
717
|
] });
|
|
716
718
|
}
|
|
717
719
|
);
|
|
718
720
|
export {
|
|
719
|
-
|
|
721
|
+
He as default
|
|
720
722
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),l=require("react"),K=require("./emotion-styled.browser.esm-BtEseadx.cjs"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),l=require("react"),K=require("./emotion-styled.browser.esm-BtEseadx.cjs"),p=require("./breakpoints-CcVm-gVm.cjs"),Q=require("./IconButton.cjs"),G=require("./Button.cjs"),r=require("./utils-CITgSxXe.cjs"),H=require("./useDetectMobile-DYV6V1yw.cjs"),g=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;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
gap: 2rem;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
@media ${
|
|
39
|
+
@media ${p.down("M")} {
|
|
40
40
|
& .section__items {
|
|
41
41
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
42
42
|
}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
white-space: nowrap;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
@media ${
|
|
65
|
+
@media ${p.down("S")} {
|
|
66
66
|
gap: 1.25rem;
|
|
67
67
|
|
|
68
68
|
& .section__items {
|
|
@@ -85,4 +85,4 @@
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
`,Y=l.memo(
|
|
88
|
+
`,Y=l.memo(g.DetailedProductCard),Z=l.forwardRef((s,f)=>{const{title:c,icon:d,items:i,limit:b=4,isLoading:a=!1,onSelectCard:h=()=>{},onLoadMore:_=()=>{},onButtonAction:y=()=>{},getImage:S=()=>{},viewAllbuttonLink:u,viewAllButonText:m="View all",negotiableText:w,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:C,onBookmark:N=()=>{},actionComponent:j,componentName:q,hasNextPage:P=!1,LinkComponent:L,urgentText:B,options:o=[],isLoadingOptions:D=!1,selectedOption:M,onSelectOption:O=()=>{},onRemoveOption:T=()=>{},allOptionsEnabled:R=!1,allOptionsLabel:A="All",onSelectAllOptions:E=()=>{},optionLabel:I="label",optionValue:$="value",optionCode:z="code"}=s,F=H.useDetectMobile(),U=l.useMemo(()=>i==null?void 0:i.map((e,n)=>t.jsx(Y,{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:(x,V)=>h({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:V}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:S(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:w,freeText:k,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,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,sponsoredText:C,onBookmark:N,actionComponent:j,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:q},sellerName:e==null?void 0:e.sellerName,forCart:e==null?void 0:e.forCart,forOrder:e==null?void 0:e.forOrder,contactSeller:e==null?void 0:e.contactSeller,hasVariants:e==null?void 0:e.hasVariants,LinkComponent:L,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:B,hasFreeShipping:e==null?void 0:e.hasFreeShipping},n)),[i]);return t.jsxs(X,{ref:f,limit:b,children:[t.jsxs("div",{className:"section__heading",children:[r.isDefinedNotEmptyString(c)&&t.jsxs("div",{className:"section__title",children:[r.isDefinedNotEmptyString(d)&&t.jsx("i",{className:d})," ",c]}),r.isDefinedNotEmptyString(u)&&r.isDefinedNotEmptyString(m)&&!a&&t.jsx(G,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var n;(n=e==null?void 0:e.target)==null||n.blur(),y(u)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(W.SuspenseSelectBar,{isLoading:D,children:o&&(o==null?void 0:o.length)>0&&t.jsx(J.SelectBar,{items:o,selectedIds:M,onRemove:T,onSelect:O,allButton:R,onSelectAll:E,labelKey:I,valueKey:$,codeKey:z,noMargin:!0,productsToolbarName:A,noGradient:!0,className:"section__options"})}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:a,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:U})}),!F&&!a&&P&&t.jsx(Q,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:_})]})});module.exports=Z;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { memo as K, forwardRef as q, useMemo as Q } from "react";
|
|
3
3
|
import { s as G } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
-
import { d as
|
|
4
|
+
import { d as p } from "./breakpoints-ff0SIcV3.js";
|
|
5
5
|
import H from "./IconButton.js";
|
|
6
6
|
import J from "./Button.js";
|
|
7
7
|
import { l as n } from "./utils-B2fsQ6PS.js";
|
|
@@ -47,7 +47,7 @@ const ee = G.div`
|
|
|
47
47
|
gap: 2rem;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
@media ${
|
|
50
|
+
@media ${p("M")} {
|
|
51
51
|
& .section__items {
|
|
52
52
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
53
53
|
}
|
|
@@ -73,7 +73,7 @@ const ee = G.div`
|
|
|
73
73
|
white-space: nowrap;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
@media ${
|
|
76
|
+
@media ${p("S")} {
|
|
77
77
|
gap: 1.25rem;
|
|
78
78
|
|
|
79
79
|
& .section__items {
|
|
@@ -96,49 +96,49 @@ const ee = G.div`
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
`, oe = K(X), ge = q((r,
|
|
99
|
+
`, oe = K(X), ge = q((r, g) => {
|
|
100
100
|
const {
|
|
101
101
|
title: c,
|
|
102
102
|
icon: m,
|
|
103
103
|
items: i,
|
|
104
|
-
limit:
|
|
104
|
+
limit: f = 4,
|
|
105
105
|
isLoading: l = !1,
|
|
106
|
-
onSelectCard:
|
|
106
|
+
onSelectCard: b = () => {
|
|
107
107
|
},
|
|
108
|
-
onLoadMore:
|
|
108
|
+
onLoadMore: h = () => {
|
|
109
109
|
},
|
|
110
|
-
onButtonAction:
|
|
110
|
+
onButtonAction: _ = () => {
|
|
111
111
|
},
|
|
112
|
-
getImage:
|
|
112
|
+
getImage: S = () => {
|
|
113
113
|
},
|
|
114
114
|
viewAllbuttonLink: d,
|
|
115
115
|
viewAllButonText: u = "View all",
|
|
116
|
-
negotiableText:
|
|
117
|
-
freeText:
|
|
118
|
-
loadMoreButtonIcon:
|
|
119
|
-
sponsoredText:
|
|
120
|
-
onBookmark:
|
|
116
|
+
negotiableText: w,
|
|
117
|
+
freeText: y,
|
|
118
|
+
loadMoreButtonIcon: v = "angle-down",
|
|
119
|
+
sponsoredText: k,
|
|
120
|
+
onBookmark: C = () => {
|
|
121
121
|
},
|
|
122
|
-
actionComponent:
|
|
123
|
-
componentName:
|
|
124
|
-
hasNextPage:
|
|
125
|
-
LinkComponent:
|
|
126
|
-
urgentText:
|
|
122
|
+
actionComponent: N,
|
|
123
|
+
componentName: P,
|
|
124
|
+
hasNextPage: L = !1,
|
|
125
|
+
LinkComponent: B,
|
|
126
|
+
urgentText: O,
|
|
127
127
|
options: t = [],
|
|
128
|
-
isLoadingOptions:
|
|
129
|
-
selectedOption:
|
|
130
|
-
onSelectOption:
|
|
128
|
+
isLoadingOptions: M = !1,
|
|
129
|
+
selectedOption: T,
|
|
130
|
+
onSelectOption: A = () => {
|
|
131
131
|
},
|
|
132
|
-
onRemoveOption:
|
|
132
|
+
onRemoveOption: D = () => {
|
|
133
133
|
},
|
|
134
|
-
allOptionsEnabled:
|
|
135
|
-
allOptionsLabel:
|
|
136
|
-
onSelectAllOptions:
|
|
134
|
+
allOptionsEnabled: z = !1,
|
|
135
|
+
allOptionsLabel: F = "All",
|
|
136
|
+
onSelectAllOptions: I = () => {
|
|
137
137
|
},
|
|
138
|
-
optionLabel:
|
|
139
|
-
optionValue:
|
|
140
|
-
optionCode:
|
|
141
|
-
} = r,
|
|
138
|
+
optionLabel: R = "label",
|
|
139
|
+
optionValue: $ = "value",
|
|
140
|
+
optionCode: U = "code"
|
|
141
|
+
} = r, V = W(), j = Q(() => i == null ? void 0 : i.map((e, a) => /* @__PURE__ */ o(
|
|
142
142
|
oe,
|
|
143
143
|
{
|
|
144
144
|
name: e == null ? void 0 : e.name,
|
|
@@ -150,13 +150,13 @@ const ee = G.div`
|
|
|
150
150
|
uuid: e == null ? void 0 : e.uuid,
|
|
151
151
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
152
152
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
153
|
-
onSelectCard: (te, E) =>
|
|
153
|
+
onSelectCard: (te, E) => b({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: E }),
|
|
154
154
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
155
|
-
imageUrl:
|
|
155
|
+
imageUrl: S(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
156
156
|
isFree: e == null ? void 0 : e.isFree,
|
|
157
157
|
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
158
|
-
negotiableText:
|
|
159
|
-
freeText:
|
|
158
|
+
negotiableText: w,
|
|
159
|
+
freeText: y,
|
|
160
160
|
tags: e == null ? void 0 : e.tags,
|
|
161
161
|
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
162
162
|
condition: e == null ? void 0 : e.condition,
|
|
@@ -164,32 +164,32 @@ const ee = G.div`
|
|
|
164
164
|
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
165
165
|
status: e == null ? void 0 : e.status,
|
|
166
166
|
trade: e == null ? void 0 : e.trade,
|
|
167
|
-
sponsoredText:
|
|
168
|
-
onBookmark:
|
|
169
|
-
actionComponent:
|
|
167
|
+
sponsoredText: k,
|
|
168
|
+
onBookmark: C,
|
|
169
|
+
actionComponent: N,
|
|
170
170
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
171
171
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
172
|
-
metadata: { accessor: e == null ? void 0 : e.accessor, name:
|
|
172
|
+
metadata: { accessor: e == null ? void 0 : e.accessor, name: P },
|
|
173
173
|
sellerName: e == null ? void 0 : e.sellerName,
|
|
174
174
|
forCart: e == null ? void 0 : e.forCart,
|
|
175
175
|
forOrder: e == null ? void 0 : e.forOrder,
|
|
176
176
|
contactSeller: e == null ? void 0 : e.contactSeller,
|
|
177
177
|
hasVariants: e == null ? void 0 : e.hasVariants,
|
|
178
|
-
LinkComponent:
|
|
178
|
+
LinkComponent: B,
|
|
179
179
|
activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
|
|
180
|
-
urgentText:
|
|
180
|
+
urgentText: O,
|
|
181
181
|
hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
|
|
182
182
|
},
|
|
183
183
|
a
|
|
184
184
|
)), [i]);
|
|
185
|
-
return /* @__PURE__ */ s(ee, { ref:
|
|
185
|
+
return /* @__PURE__ */ s(ee, { ref: g, limit: f, children: [
|
|
186
186
|
/* @__PURE__ */ s("div", { className: "section__heading", children: [
|
|
187
187
|
n(c) && /* @__PURE__ */ s("div", { className: "section__title", children: [
|
|
188
188
|
n(m) && /* @__PURE__ */ o("i", { className: m }),
|
|
189
189
|
" ",
|
|
190
190
|
c
|
|
191
191
|
] }),
|
|
192
|
-
|
|
192
|
+
n(d) && n(u) && !l && /* @__PURE__ */ o(
|
|
193
193
|
J,
|
|
194
194
|
{
|
|
195
195
|
type: "button",
|
|
@@ -197,7 +197,7 @@ const ee = G.div`
|
|
|
197
197
|
color: "neutral",
|
|
198
198
|
onClick: (e) => {
|
|
199
199
|
var a;
|
|
200
|
-
(a = e == null ? void 0 : e.target) == null || a.blur(),
|
|
200
|
+
(a = e == null ? void 0 : e.target) == null || a.blur(), _(d);
|
|
201
201
|
},
|
|
202
202
|
borderRadius: "curved",
|
|
203
203
|
className: "section__view-all",
|
|
@@ -205,20 +205,20 @@ const ee = G.div`
|
|
|
205
205
|
}
|
|
206
206
|
)
|
|
207
207
|
] }),
|
|
208
|
-
/* @__PURE__ */ o(x, { isLoading:
|
|
208
|
+
/* @__PURE__ */ o(x, { isLoading: M, children: t && (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ o(
|
|
209
209
|
Z,
|
|
210
210
|
{
|
|
211
211
|
items: t,
|
|
212
|
-
selectedIds:
|
|
213
|
-
onRemove:
|
|
214
|
-
onSelect:
|
|
215
|
-
allButton:
|
|
216
|
-
onSelectAll:
|
|
217
|
-
labelKey:
|
|
218
|
-
valueKey:
|
|
219
|
-
codeKey:
|
|
212
|
+
selectedIds: T,
|
|
213
|
+
onRemove: D,
|
|
214
|
+
onSelect: A,
|
|
215
|
+
allButton: z,
|
|
216
|
+
onSelectAll: I,
|
|
217
|
+
labelKey: R,
|
|
218
|
+
valueKey: $,
|
|
219
|
+
codeKey: U,
|
|
220
220
|
noMargin: !0,
|
|
221
|
-
productsToolbarName:
|
|
221
|
+
productsToolbarName: F,
|
|
222
222
|
noGradient: !0,
|
|
223
223
|
className: "section__options"
|
|
224
224
|
}
|
|
@@ -231,15 +231,15 @@ const ee = G.div`
|
|
|
231
231
|
children: /* @__PURE__ */ o("div", { className: "section__items", children: j })
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
|
-
!
|
|
234
|
+
!V && !l && L && /* @__PURE__ */ o(
|
|
235
235
|
H,
|
|
236
236
|
{
|
|
237
|
-
icon:
|
|
237
|
+
icon: v,
|
|
238
238
|
borderRadius: "curved",
|
|
239
239
|
btnType: "basic",
|
|
240
240
|
color: "neutral",
|
|
241
241
|
className: "section__show-more",
|
|
242
|
-
onClick:
|
|
242
|
+
onClick: h
|
|
243
243
|
}
|
|
244
244
|
)
|
|
245
245
|
] });
|