@lanaco/lnc-react-ui 4.0.194 → 4.0.195
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 +26 -25
- package/dist/DetailedProductsSection.cjs +2 -2
- package/dist/DetailedProductsSection.js +42 -40
- package/dist/UrgentSaleProductsSection.cjs +2 -2
- package/dist/UrgentSaleProductsSection.js +17 -15
- package/dist/{index-Lmz3An4A.cjs → index-CS4w87SW.cjs} +14 -14
- package/dist/{index-DqBXIFsQ.js → index-Csxc_5p0.js} +214 -211
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),c=require("react"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),h=require("./emotion-styled.browser.esm-BtEseadx.cjs"),Q=require("./consts-goSZX3xP.cjs"),G=require("./IconButton.cjs"),W=require("./Button.cjs"),a=require("./utils-RnrgDDZP.cjs"),X=require("./useDetectMobile-zkbzoOGV.cjs"),f=require("./index-CS4w87SW.cjs"),Z=require("./index-CSNxZFTX.cjs"),l=require("./style-BAcV7F53.cjs"),H=h.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.5rem;
|
|
@@ -79,4 +79,4 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
`,J=
|
|
82
|
+
`,J=h.styled(l.SkeletonRowWrapper)``,Y=({keyPrefix:o})=>t.jsxs(J,{children:[t.jsx(l.SkeletonLinePlaceholder,{width:"5rem",borderRadius:"0.75rem"},`${o}-1`),t.jsx(l.SkeletonLinePlaceholder,{width:"5rem",borderRadius:"0.75rem"},`${o}-2`),t.jsx(l.SkeletonLinePlaceholder,{width:"5rem",borderRadius:"0.75rem"},`${o}-3`)]}),x=({keyPrefix:o,isLoading:d=!1,fallbackComponent:n=t.jsx(t.Fragment,{}),children:i})=>t.jsx(c.Suspense,{fallbackComponent:n,children:d===!0?t.jsx(Y,{keyPrefix:o}):i}),ee=c.memo(f.DetailedProductCard),te=c.forwardRef((o,d)=>{const{title:n,icon:i,items:r,limit:b=4,isLoading:u=!1,onSelectCard:S=()=>{},onLoadMore:w=()=>{},onButtonAction:_=()=>{},getImage:y=()=>{},viewAllbuttonLink:m,viewAllButonText:p="View all",negotiableText:k,freeText:v,loadMoreButtonIcon:j="angle-down",sponsoredText:C,onBookmark:N=()=>{},actionComponent:L,componentName:q,hasNextPage:P=!1,LinkComponent:B,urgentText:R,options:O=[],isLoadingOptions:D=!1,selectedOption:M,onSelectOption:E=()=>{},onRemoveOption:I=()=>{},allOptionsEnabled:T=!1,allOptionsLabel:$="All",onSelectAllOptions:A=()=>{},optionLabel:F="label",optionValue:z="value",optionCode:U="code"}=o,g=X.useDetectMobile(),V=c.useMemo(()=>r==null?void 0:r.map((e,s)=>t.jsx(ee,{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:(oe,K)=>S({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:K}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:y(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:k,freeText:v,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:L,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:B,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:R,hasFreeShipping:e==null?void 0:e.hasFreeShipping},s)),[r]);return t.jsxs(H,{ref:d,limit:b,children:[t.jsxs("div",{className:"section__heading",children:[a.isDefinedNotEmptyString(n)&&t.jsxs("div",{className:"section__title",children:[a.isDefinedNotEmptyString(i)&&t.jsx("i",{className:i})," ",n]}),g&&a.isDefinedNotEmptyString(m)&&a.isDefinedNotEmptyString(p)&&!u&&t.jsx(W,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var s;(s=e==null?void 0:e.target)==null||s.blur(),_(m)},borderRadius:"curved",className:"section__view-all",children:p})]}),t.jsx(x,{isLoading:D,children:t.jsx(Z.SelectBar,{items:O,selectedIds:M,onRemove:I,onSelect:E,allButton:T,onSelectAll:A,labelKey:F,valueKey:z,codeKey:U,noMargin:!0,productsToolbarName:$,noGradient:!0,className:"section__options"})}),t.jsx(f.SuspenseDetailedProductCard,{isLoading:u,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:V})}),!g&&!u&&P&&t.jsx(G,{icon:j,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:w})]})});module.exports=te;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as o, Fragment as q } from "react/jsx-runtime";
|
|
2
2
|
import { Suspense as Q, memo as G, forwardRef as W, useMemo as X } from "react";
|
|
3
3
|
import { s as f } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as Z } from "./consts-BuFChS64.js";
|
|
5
5
|
import H from "./IconButton.js";
|
|
6
6
|
import J from "./Button.js";
|
|
7
|
-
import { k as
|
|
7
|
+
import { k as s } from "./utils-Dc5zIpaz.js";
|
|
8
8
|
import { u as Y } from "./useDetectMobile-Bkvj0VMa.js";
|
|
9
|
-
import { D as x, S as ee } from "./index-
|
|
9
|
+
import { D as x, S as ee } from "./index-Csxc_5p0.js";
|
|
10
10
|
import { S as oe } from "./index-BGiZlEQt.js";
|
|
11
11
|
import { a as te, b as m } from "./style-CXMUA6cI.js";
|
|
12
12
|
const ie = f.div`
|
|
@@ -90,7 +90,7 @@ const ie = f.div`
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
`, ne = f(te)``, re = ({ keyPrefix: t }) => /* @__PURE__ */
|
|
93
|
+
`, ne = f(te)``, re = ({ keyPrefix: t }) => /* @__PURE__ */ l(ne, { children: [
|
|
94
94
|
/* @__PURE__ */ o(
|
|
95
95
|
m,
|
|
96
96
|
{
|
|
@@ -120,18 +120,18 @@ const ie = f.div`
|
|
|
120
120
|
isLoading: c = !1,
|
|
121
121
|
fallbackComponent: i = /* @__PURE__ */ o(q, {}),
|
|
122
122
|
children: n
|
|
123
|
-
}) => /* @__PURE__ */ o(Q, { fallbackComponent: i, children: c === !0 ? /* @__PURE__ */ o(re, { keyPrefix: t }) : n }),
|
|
123
|
+
}) => /* @__PURE__ */ o(Q, { fallbackComponent: i, children: c === !0 ? /* @__PURE__ */ o(re, { keyPrefix: t }) : n }), se = G(x), _e = W((t, c) => {
|
|
124
124
|
const {
|
|
125
125
|
title: i,
|
|
126
126
|
icon: n,
|
|
127
127
|
items: r,
|
|
128
|
-
limit:
|
|
128
|
+
limit: h = 4,
|
|
129
129
|
isLoading: d = !1,
|
|
130
|
-
onSelectCard:
|
|
130
|
+
onSelectCard: b = () => {
|
|
131
131
|
},
|
|
132
|
-
onLoadMore:
|
|
132
|
+
onLoadMore: S = () => {
|
|
133
133
|
},
|
|
134
|
-
onButtonAction:
|
|
134
|
+
onButtonAction: w = () => {
|
|
135
135
|
},
|
|
136
136
|
getImage: _ = () => {
|
|
137
137
|
},
|
|
@@ -156,14 +156,14 @@ const ie = f.div`
|
|
|
156
156
|
onRemoveOption: A = () => {
|
|
157
157
|
},
|
|
158
158
|
allOptionsEnabled: D = !1,
|
|
159
|
-
allOptionsLabel:
|
|
160
|
-
onSelectAllOptions:
|
|
159
|
+
allOptionsLabel: F = "All",
|
|
160
|
+
onSelectAllOptions: z = () => {
|
|
161
161
|
},
|
|
162
|
-
optionLabel:
|
|
162
|
+
optionLabel: E = "label",
|
|
163
163
|
optionValue: U = "value",
|
|
164
164
|
optionCode: V = "code"
|
|
165
165
|
} = t, g = Y(), j = X(() => r == null ? void 0 : r.map((e, a) => /* @__PURE__ */ o(
|
|
166
|
-
|
|
166
|
+
se,
|
|
167
167
|
{
|
|
168
168
|
name: e == null ? void 0 : e.name,
|
|
169
169
|
price: e == null ? void 0 : e.price,
|
|
@@ -174,7 +174,7 @@ const ie = f.div`
|
|
|
174
174
|
uuid: e == null ? void 0 : e.uuid,
|
|
175
175
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
176
176
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
177
|
-
onSelectCard: (
|
|
177
|
+
onSelectCard: (le, K) => b({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: K }),
|
|
178
178
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
179
179
|
imageUrl: _(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
180
180
|
isFree: e == null ? void 0 : e.isFree,
|
|
@@ -201,18 +201,19 @@ const ie = f.div`
|
|
|
201
201
|
hasVariants: e == null ? void 0 : e.hasVariants,
|
|
202
202
|
LinkComponent: O,
|
|
203
203
|
activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
|
|
204
|
-
urgentText: M
|
|
204
|
+
urgentText: M,
|
|
205
|
+
hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
|
|
205
206
|
},
|
|
206
207
|
a
|
|
207
208
|
)), [r]);
|
|
208
|
-
return /* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
return /* @__PURE__ */ l(ie, { ref: c, limit: h, children: [
|
|
210
|
+
/* @__PURE__ */ l("div", { className: "section__heading", children: [
|
|
211
|
+
s(i) && /* @__PURE__ */ l("div", { className: "section__title", children: [
|
|
212
|
+
s(n) && /* @__PURE__ */ o("i", { className: n }),
|
|
212
213
|
" ",
|
|
213
214
|
i
|
|
214
215
|
] }),
|
|
215
|
-
g &&
|
|
216
|
+
g && s(u) && s(p) && !d && /* @__PURE__ */ o(
|
|
216
217
|
J,
|
|
217
218
|
{
|
|
218
219
|
type: "button",
|
|
@@ -220,7 +221,7 @@ const ie = f.div`
|
|
|
220
221
|
color: "neutral",
|
|
221
222
|
onClick: (e) => {
|
|
222
223
|
var a;
|
|
223
|
-
(a = e == null ? void 0 : e.target) == null || a.blur(),
|
|
224
|
+
(a = e == null ? void 0 : e.target) == null || a.blur(), w(u);
|
|
224
225
|
},
|
|
225
226
|
borderRadius: "curved",
|
|
226
227
|
className: "section__view-all",
|
|
@@ -236,12 +237,12 @@ const ie = f.div`
|
|
|
236
237
|
onRemove: A,
|
|
237
238
|
onSelect: I,
|
|
238
239
|
allButton: D,
|
|
239
|
-
onSelectAll:
|
|
240
|
-
labelKey:
|
|
240
|
+
onSelectAll: z,
|
|
241
|
+
labelKey: E,
|
|
241
242
|
valueKey: U,
|
|
242
243
|
codeKey: V,
|
|
243
244
|
noMargin: !0,
|
|
244
|
-
productsToolbarName:
|
|
245
|
+
productsToolbarName: F,
|
|
245
246
|
noGradient: !0,
|
|
246
247
|
className: "section__options"
|
|
247
248
|
}
|
|
@@ -262,7 +263,7 @@ const ie = f.div`
|
|
|
262
263
|
btnType: "basic",
|
|
263
264
|
color: "neutral",
|
|
264
265
|
className: "section__show-more",
|
|
265
|
-
onClick:
|
|
266
|
+
onClick: S
|
|
266
267
|
}
|
|
267
268
|
)
|
|
268
269
|
] });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),c=require("react"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),E=require("./emotion-styled.browser.esm-BtEseadx.cjs"),B=require("./consts-goSZX3xP.cjs"),R=require("./Button.cjs"),l=require("./utils-RnrgDDZP.cjs"),I=require("./useDetectMobile-zkbzoOGV.cjs"),Q=require("./style-CkcozOY6.cjs"),w=require("./index-CS4w87SW.cjs"),_=require("./index-CSNxZFTX.cjs"),$=E.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${o=>`repeat(${o.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
/* Safari and Chrome */
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`,v=c.memo(w.DetailedProductCard),O=c.forwardRef((o,
|
|
29
|
+
`,v=c.memo(w.DetailedProductCard),O=c.forwardRef((o,F)=>{const{icon:u,title:D,buttonLink:d,items:i,buttonText:m,limit:n=4,onSelectCard:g=()=>{},onButtonAction:L=()=>{},isLoading:p=!1,getImage:b=()=>{},negotiableText:k,freeText:S,options:r,onSelectOption:h=()=>{},productsToolbarName:T="All",sponsoredText:y,onBookmark:C=()=>{},actionComponent:f,componentName:N,LinkComponent:P,urgentText:q}=o,j=I.useDetectMobile(),U=c.useMemo(()=>t.jsx(t.Fragment,{children:j===!0?i==null?void 0:i.map((e,a)=>t.jsx(v,{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,nameSlug:e==null?void 0:e.nameSlug,onSelectCard:(M,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),sellerName:e==null?void 0:e.sellerName,imageUrl:b(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:k,freeText:S,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,forCart:e==null?void 0:e.forCart,sponsoredText:y,onBookmark:C,actionComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N},LinkComponent:P,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:q,hasFreeShipping:e==null?void 0:e.hasFreeShipping},a)):i==null?void 0:i.slice(0,n).map((e,a)=>t.jsx(v,{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,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(M,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),nameSlug:e==null?void 0:e.nameSlug,imageUrl:b(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:k,freeText:S,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,forCart:e==null?void 0:e.forCart,sponsoredText:y,onBookmark:C,actionComponent:f,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N},sellerName:e==null?void 0:e.sellerName,LinkComponent:P,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:q,hasFreeShipping:e==null?void 0:e.hasFreeShipping},a))}),[i,j,n]);return t.jsxs(Q.TitleWithOptionsSectionWrapper,{ref:F,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(u)&&t.jsx("i",{className:u}),t.jsx("span",{children:D})]}),l.isDefinedNotEmptyString(d)&&l.isDefinedNotEmptyString(m)&&!p&&t.jsx(R,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var a;(a=e==null?void 0:e.target)==null||a.blur(),L(d)},borderRadius:"curved",className:"button-link",children:m})]}),(r==null?void 0:r.length)>0&&t.jsx(_.SelectBar,{items:r,onRemove:e=>{h(e)},onSelect:e=>{h(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:T}),t.jsx(w.SuspenseDetailedProductCard,{isLoading:p,keyPrefix:"detailed-products-skeleton",children:t.jsx($,{limit:n,children:U})})]})});module.exports=O;
|
|
@@ -6,11 +6,11 @@ import W from "./Button.js";
|
|
|
6
6
|
import { k as m } from "./utils-Dc5zIpaz.js";
|
|
7
7
|
import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
|
|
8
8
|
import { T as j } from "./style-C7FUSHmS.js";
|
|
9
|
-
import { D as z, S as A } from "./index-
|
|
9
|
+
import { D as z, S as A } from "./index-Csxc_5p0.js";
|
|
10
10
|
import { S as K } from "./index-BGiZlEQt.js";
|
|
11
11
|
const _ = O.div`
|
|
12
12
|
display: grid;
|
|
13
|
-
grid-template-columns: ${(
|
|
13
|
+
grid-template-columns: ${(r) => `repeat(${r.limit}, minmax(0, 1fr))`};
|
|
14
14
|
gap: 1.25rem;
|
|
15
15
|
|
|
16
16
|
& .button-link {
|
|
@@ -36,36 +36,36 @@ const _ = O.div`
|
|
|
36
36
|
/* Safari and Chrome */
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`, F = E(z), te = I((r, T) => {
|
|
40
40
|
const {
|
|
41
41
|
icon: c,
|
|
42
|
-
title:
|
|
42
|
+
title: L,
|
|
43
43
|
buttonLink: d,
|
|
44
44
|
items: t,
|
|
45
45
|
buttonText: u,
|
|
46
46
|
limit: n = 4,
|
|
47
|
-
onSelectCard:
|
|
47
|
+
onSelectCard: p = () => {
|
|
48
48
|
},
|
|
49
|
-
onButtonAction:
|
|
49
|
+
onButtonAction: U = () => {
|
|
50
50
|
},
|
|
51
|
-
isLoading:
|
|
51
|
+
isLoading: g = !1,
|
|
52
52
|
getImage: k = () => {
|
|
53
53
|
},
|
|
54
54
|
negotiableText: b,
|
|
55
|
-
freeText:
|
|
56
|
-
options:
|
|
57
|
-
onSelectOption:
|
|
55
|
+
freeText: S,
|
|
56
|
+
options: i,
|
|
57
|
+
onSelectOption: f = () => {
|
|
58
58
|
},
|
|
59
|
-
productsToolbarName:
|
|
60
|
-
sponsoredText:
|
|
61
|
-
onBookmark:
|
|
59
|
+
productsToolbarName: M = "All",
|
|
60
|
+
sponsoredText: h,
|
|
61
|
+
onBookmark: y = () => {
|
|
62
62
|
},
|
|
63
|
-
actionComponent:
|
|
63
|
+
actionComponent: C,
|
|
64
64
|
componentName: N,
|
|
65
65
|
LinkComponent: P,
|
|
66
66
|
urgentText: v
|
|
67
|
-
} =
|
|
68
|
-
|
|
67
|
+
} = r, w = $(), D = Q(() => /* @__PURE__ */ a(q, { children: w === !0 ? t == null ? void 0 : t.map((e, o) => /* @__PURE__ */ a(
|
|
68
|
+
F,
|
|
69
69
|
{
|
|
70
70
|
name: e == null ? void 0 : e.name,
|
|
71
71
|
price: e == null ? void 0 : e.price,
|
|
@@ -77,7 +77,7 @@ const _ = O.div`
|
|
|
77
77
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
78
78
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
79
79
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
80
|
-
onSelectCard: (B, s) =>
|
|
80
|
+
onSelectCard: (B, s) => p({
|
|
81
81
|
uuid: e == null ? void 0 : e.uuid,
|
|
82
82
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
83
83
|
cardRef: s
|
|
@@ -87,7 +87,7 @@ const _ = O.div`
|
|
|
87
87
|
isFree: e == null ? void 0 : e.isFree,
|
|
88
88
|
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
89
89
|
negotiableText: b,
|
|
90
|
-
freeText:
|
|
90
|
+
freeText: S,
|
|
91
91
|
tags: e == null ? void 0 : e.tags,
|
|
92
92
|
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
93
93
|
condition: e == null ? void 0 : e.condition,
|
|
@@ -96,19 +96,20 @@ const _ = O.div`
|
|
|
96
96
|
status: e == null ? void 0 : e.status,
|
|
97
97
|
trade: e == null ? void 0 : e.trade,
|
|
98
98
|
forCart: e == null ? void 0 : e.forCart,
|
|
99
|
-
sponsoredText:
|
|
100
|
-
onBookmark:
|
|
101
|
-
actionComponent:
|
|
99
|
+
sponsoredText: h,
|
|
100
|
+
onBookmark: y,
|
|
101
|
+
actionComponent: C,
|
|
102
102
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
103
103
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
104
104
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: N },
|
|
105
105
|
LinkComponent: P,
|
|
106
106
|
activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
|
|
107
|
-
urgentText: v
|
|
107
|
+
urgentText: v,
|
|
108
|
+
hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
|
|
108
109
|
},
|
|
109
110
|
o
|
|
110
111
|
)) : t == null ? void 0 : t.slice(0, n).map((e, o) => /* @__PURE__ */ a(
|
|
111
|
-
|
|
112
|
+
F,
|
|
112
113
|
{
|
|
113
114
|
name: e == null ? void 0 : e.name,
|
|
114
115
|
price: e == null ? void 0 : e.price,
|
|
@@ -120,7 +121,7 @@ const _ = O.div`
|
|
|
120
121
|
location: e == null ? void 0 : e.location,
|
|
121
122
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
122
123
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
123
|
-
onSelectCard: (B, s) =>
|
|
124
|
+
onSelectCard: (B, s) => p({
|
|
124
125
|
uuid: e == null ? void 0 : e.uuid,
|
|
125
126
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
126
127
|
cardRef: s
|
|
@@ -130,7 +131,7 @@ const _ = O.div`
|
|
|
130
131
|
isFree: e == null ? void 0 : e.isFree,
|
|
131
132
|
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
132
133
|
negotiableText: b,
|
|
133
|
-
freeText:
|
|
134
|
+
freeText: S,
|
|
134
135
|
tags: e == null ? void 0 : e.tags,
|
|
135
136
|
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
136
137
|
condition: e == null ? void 0 : e.condition,
|
|
@@ -139,26 +140,27 @@ const _ = O.div`
|
|
|
139
140
|
status: e == null ? void 0 : e.status,
|
|
140
141
|
trade: e == null ? void 0 : e.trade,
|
|
141
142
|
forCart: e == null ? void 0 : e.forCart,
|
|
142
|
-
sponsoredText:
|
|
143
|
-
onBookmark:
|
|
144
|
-
actionComponent:
|
|
143
|
+
sponsoredText: h,
|
|
144
|
+
onBookmark: y,
|
|
145
|
+
actionComponent: C,
|
|
145
146
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
146
147
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
147
148
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: N },
|
|
148
149
|
sellerName: e == null ? void 0 : e.sellerName,
|
|
149
150
|
LinkComponent: P,
|
|
150
151
|
activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
|
|
151
|
-
urgentText: v
|
|
152
|
+
urgentText: v,
|
|
153
|
+
hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
|
|
152
154
|
},
|
|
153
155
|
o
|
|
154
156
|
)) }), [t, w, n]);
|
|
155
|
-
return /* @__PURE__ */ l(j, { ref:
|
|
157
|
+
return /* @__PURE__ */ l(j, { ref: T, children: [
|
|
156
158
|
/* @__PURE__ */ l("div", { className: "regular-title", children: [
|
|
157
159
|
/* @__PURE__ */ l("div", { className: "regular-title-text", children: [
|
|
158
160
|
m(c) && /* @__PURE__ */ a("i", { className: c }),
|
|
159
|
-
/* @__PURE__ */ a("span", { children:
|
|
161
|
+
/* @__PURE__ */ a("span", { children: L })
|
|
160
162
|
] }),
|
|
161
|
-
m(d) && m(u) && !
|
|
163
|
+
m(d) && m(u) && !g && /* @__PURE__ */ a(
|
|
162
164
|
W,
|
|
163
165
|
{
|
|
164
166
|
type: "button",
|
|
@@ -166,7 +168,7 @@ const _ = O.div`
|
|
|
166
168
|
color: "neutral",
|
|
167
169
|
onClick: (e) => {
|
|
168
170
|
var o;
|
|
169
|
-
(o = e == null ? void 0 : e.target) == null || o.blur(),
|
|
171
|
+
(o = e == null ? void 0 : e.target) == null || o.blur(), U(d);
|
|
170
172
|
},
|
|
171
173
|
borderRadius: "curved",
|
|
172
174
|
className: "button-link",
|
|
@@ -174,28 +176,28 @@ const _ = O.div`
|
|
|
174
176
|
}
|
|
175
177
|
)
|
|
176
178
|
] }),
|
|
177
|
-
(
|
|
179
|
+
(i == null ? void 0 : i.length) > 0 && /* @__PURE__ */ a(
|
|
178
180
|
K,
|
|
179
181
|
{
|
|
180
|
-
items:
|
|
182
|
+
items: i,
|
|
181
183
|
onRemove: (e) => {
|
|
182
|
-
|
|
184
|
+
f(e);
|
|
183
185
|
},
|
|
184
186
|
onSelect: (e) => {
|
|
185
|
-
|
|
187
|
+
f(e);
|
|
186
188
|
},
|
|
187
189
|
labelKey: "name",
|
|
188
190
|
valueKey: "code",
|
|
189
191
|
noMargin: !0,
|
|
190
|
-
productsToolbarName:
|
|
192
|
+
productsToolbarName: M
|
|
191
193
|
}
|
|
192
194
|
),
|
|
193
195
|
/* @__PURE__ */ a(
|
|
194
196
|
A,
|
|
195
197
|
{
|
|
196
|
-
isLoading:
|
|
198
|
+
isLoading: g,
|
|
197
199
|
keyPrefix: "detailed-products-skeleton",
|
|
198
|
-
children: /* @__PURE__ */ a(_, { limit: n, children:
|
|
200
|
+
children: /* @__PURE__ */ a(_, { limit: n, children: D })
|
|
199
201
|
}
|
|
200
202
|
)
|
|
201
203
|
] });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),s=require("react")
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),s=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-goSZX3xP.cjs"),$=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./Button.cjs"),P=require("./index-CS4w87SW.cjs"),I=_.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))`};
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-direction: column;
|
|
73
73
|
}
|
|
74
|
-
`,N=s.memo(P.DetailedProductCard),B=s.forwardRef((t,j)=>{const{items:r,limit:n=5,limitMobile:l=4,onSelectCard:u=()=>{},title:q="Urgent sale",showLessText:L="Show less",showMoreText:M="Show more",isLoading:g=!1,getImage:p=()=>{},negotiableText:
|
|
74
|
+
`,N=s.memo(P.DetailedProductCard),B=s.forwardRef((t,j)=>{const{items:r,limit:n=5,limitMobile:l=4,onSelectCard:u=()=>{},title:q="Urgent sale",showLessText:L="Show less",showMoreText:M="Show more",isLoading:g=!1,getImage:p=()=>{},negotiableText:h,freeText:f,onBookmark:b=()=>{},actionComponent:k,componentName:S,sponsoredText:C,LinkComponent:y}=t,d=$.useDetectMobile(),[o,U]=s.useState(!1),F=s.useMemo(()=>{var i;return a.jsx(a.Fragment,{children:d===!0?(i=r==null?void 0:r.slice(0,o===!0?r==null?void 0:r.length:l))==null?void 0:i.map((e,m)=>a.jsx(N,{sellerName:e==null?void 0:e.sellerName,name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,categoryCode:e==null?void 0:e.categoryCode,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,onSelectCard:(v,c)=>u({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:c}),nameSlug:e==null?void 0:e.nameSlug,image:e==null?void 0:e.image,imageUrl:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,imageComponent:e==null?void 0:e.imageComponent,negotiableText:h,freeText:f,onBookmark:b,actionComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:S,accessor:e==null?void 0:e.accessor},tags:e==null?void 0:e.tags,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,forCart:e==null?void 0:e.forCart,sponsoredText:C,LinkComponent:y,hasFreeShipping:e==null?void 0:e.hasFreeShipping},m)):r==null?void 0:r.slice(0,n).map((e,m)=>a.jsx(N,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,categoryCode:e==null?void 0:e.categoryCode,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,onSelectCard:(v,c)=>u({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:c}),nameSlug:e==null?void 0:e.nameSlug,image:e==null?void 0:e.image,imageUrl:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,imageComponent:e==null?void 0:e.imageComponent,negotiableText:h,freeText:f,onBookmark:b,actionComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:S,accessor:e==null?void 0:e.accessor},tags:e==null?void 0:e.tags,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,forCart:e==null?void 0:e.forCart,sponsoredText:C,sellerName:e==null?void 0:e.sellerName,LinkComponent:y,hasFreeShipping:e==null?void 0:e.hasFreeShipping},m))})},[r,d,n,l,o]);return a.jsx(P.SuspenseDetailedProductCard,{isLoading:g,keyPrefix:"urgent-sale-products-skeleton",children:a.jsxs(I,{ref:j,limit:n,children:[a.jsxs("div",{className:"urgent-tag",children:[a.jsx("i",{className:"mng mng-lnc-bolt-filled"}),a.jsx("span",{children:q})]})," ",F," ",d===!0&&l<(r==null?void 0:r.length)&&!g&&a.jsx(T,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:i=>{var e;(e=i==null?void 0:i.target)==null||e.blur(),U(!o)},children:o===!0?L:M})]})})});module.exports=B;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as o, Fragment as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsx as o, Fragment as $, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { memo as T, forwardRef as I, useState as _, useMemo as q } from "react";
|
|
3
3
|
import { s as B } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as D, S as E } from "./consts-BuFChS64.js";
|
|
5
5
|
import { u as Q } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
6
|
import j from "./Button.js";
|
|
7
|
-
import { D as z, S as A } from "./index-
|
|
7
|
+
import { D as z, S as A } from "./index-Csxc_5p0.js";
|
|
8
8
|
const G = B.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|
|
@@ -78,7 +78,7 @@ const G = B.div`
|
|
|
78
78
|
display: flex;
|
|
79
79
|
flex-direction: column;
|
|
80
80
|
}
|
|
81
|
-
`, w =
|
|
81
|
+
`, w = T(z), K = I((r, N) => {
|
|
82
82
|
const {
|
|
83
83
|
items: a,
|
|
84
84
|
limit: s = 5,
|
|
@@ -97,11 +97,11 @@ const G = B.div`
|
|
|
97
97
|
},
|
|
98
98
|
actionComponent: k,
|
|
99
99
|
componentName: b,
|
|
100
|
-
sponsoredText:
|
|
101
|
-
LinkComponent:
|
|
102
|
-
} = r, l = Q(), [i, U] = _(!1),
|
|
100
|
+
sponsoredText: S,
|
|
101
|
+
LinkComponent: C
|
|
102
|
+
} = r, l = Q(), [i, U] = _(!1), F = q(() => {
|
|
103
103
|
var t;
|
|
104
|
-
return /* @__PURE__ */ o(
|
|
104
|
+
return /* @__PURE__ */ o($, { children: l === !0 ? (t = a == null ? void 0 : a.slice(0, i === !0 ? a == null ? void 0 : a.length : n)) == null ? void 0 : t.map((e, m) => /* @__PURE__ */ o(
|
|
105
105
|
w,
|
|
106
106
|
{
|
|
107
107
|
sellerName: e == null ? void 0 : e.sellerName,
|
|
@@ -115,7 +115,7 @@ const G = B.div`
|
|
|
115
115
|
sellerUuid: e == null ? void 0 : e.sellerUuid,
|
|
116
116
|
uuid: e == null ? void 0 : e.uuid,
|
|
117
117
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
118
|
-
onSelectCard: (
|
|
118
|
+
onSelectCard: (v, d) => c({
|
|
119
119
|
uuid: e == null ? void 0 : e.uuid,
|
|
120
120
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
121
121
|
cardRef: d
|
|
@@ -138,8 +138,9 @@ const G = B.div`
|
|
|
138
138
|
status: e == null ? void 0 : e.status,
|
|
139
139
|
trade: e == null ? void 0 : e.trade,
|
|
140
140
|
forCart: e == null ? void 0 : e.forCart,
|
|
141
|
-
sponsoredText:
|
|
142
|
-
LinkComponent:
|
|
141
|
+
sponsoredText: S,
|
|
142
|
+
LinkComponent: C,
|
|
143
|
+
hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
|
|
143
144
|
},
|
|
144
145
|
m
|
|
145
146
|
)) : a == null ? void 0 : a.slice(0, s).map((e, m) => /* @__PURE__ */ o(
|
|
@@ -156,7 +157,7 @@ const G = B.div`
|
|
|
156
157
|
uuid: e == null ? void 0 : e.uuid,
|
|
157
158
|
location: e == null ? void 0 : e.location,
|
|
158
159
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
159
|
-
onSelectCard: (
|
|
160
|
+
onSelectCard: (v, d) => c({
|
|
160
161
|
uuid: e == null ? void 0 : e.uuid,
|
|
161
162
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
162
163
|
cardRef: d
|
|
@@ -179,9 +180,10 @@ const G = B.div`
|
|
|
179
180
|
status: e == null ? void 0 : e.status,
|
|
180
181
|
trade: e == null ? void 0 : e.trade,
|
|
181
182
|
forCart: e == null ? void 0 : e.forCart,
|
|
182
|
-
sponsoredText:
|
|
183
|
+
sponsoredText: S,
|
|
183
184
|
sellerName: e == null ? void 0 : e.sellerName,
|
|
184
|
-
LinkComponent:
|
|
185
|
+
LinkComponent: C,
|
|
186
|
+
hasFreeShipping: e == null ? void 0 : e.hasFreeShipping
|
|
185
187
|
},
|
|
186
188
|
m
|
|
187
189
|
)) });
|
|
@@ -197,7 +199,7 @@ const G = B.div`
|
|
|
197
199
|
/* @__PURE__ */ o("span", { children: P })
|
|
198
200
|
] }),
|
|
199
201
|
" ",
|
|
200
|
-
|
|
202
|
+
F,
|
|
201
203
|
" ",
|
|
202
204
|
l === !0 && n < (a == null ? void 0 : a.length) && !u && /* @__PURE__ */ o(
|
|
203
205
|
j,
|