@lanaco/lnc-react-ui 4.0.177 → 4.0.178
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 +1 -1
- package/dist/DetailedProductsInfinitiveSection.js +13 -11
- package/dist/DetailedProductsSection.cjs +2 -2
- package/dist/DetailedProductsSection.js +49 -45
- package/dist/UrgentSaleProductsSection.cjs +2 -2
- package/dist/UrgentSaleProductsSection.js +35 -31
- package/package.json +1 -1
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
`,z=a.memo(g.DetailedProductCard),R=a.forwardRef((n,p)=>{const{title:l,icon:c,items:
|
|
73
|
+
`,z=a.memo(g.DetailedProductCard),R=a.forwardRef((n,p)=>{const{title:l,icon:c,items:i,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:h=()=>{},onButtonAction:w=()=>{},getImage:y=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:_,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:C,onBookmark:N=()=>{},actionComponent:S,componentName:j,hasNextPage:q=!1}=n,u=L.useDetectMobile(),P=a.useMemo(()=>i==null?void 0:i.map((e,o)=>t.jsx(z,{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:(U,D)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:D}),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:_,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:S,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:j},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},o)),[i]);return t.jsxs(T,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[r.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[r.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&r.isDefinedNotEmptyString(d)&&r.isDefinedNotEmptyString(m)&&!s&&t.jsx(I,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var o;(o=e==null?void 0:e.target)==null||o.blur(),w(d)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:s,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:P})}),!u&&!s&&q&&t.jsx(E,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=R;
|
|
@@ -4,7 +4,7 @@ import { s as T } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
|
4
4
|
import { M as z } from "./consts-BuFChS64.js";
|
|
5
5
|
import E from "./IconButton.js";
|
|
6
6
|
import U from "./Button.js";
|
|
7
|
-
import { k as
|
|
7
|
+
import { k as r } from "./utils-Dc5zIpaz.js";
|
|
8
8
|
import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
|
|
9
9
|
import { D as j, S as A } from "./index-DrtxDu6u.js";
|
|
10
10
|
const F = T.div`
|
|
@@ -88,9 +88,9 @@ const F = T.div`
|
|
|
88
88
|
isLoading: n = !1,
|
|
89
89
|
onSelectCard: g = () => {
|
|
90
90
|
},
|
|
91
|
-
onLoadMore:
|
|
91
|
+
onLoadMore: h = () => {
|
|
92
92
|
},
|
|
93
|
-
onButtonAction:
|
|
93
|
+
onButtonAction: b = () => {
|
|
94
94
|
},
|
|
95
95
|
getImage: w = () => {
|
|
96
96
|
},
|
|
@@ -105,7 +105,7 @@ const F = T.div`
|
|
|
105
105
|
actionComponent: N,
|
|
106
106
|
componentName: S,
|
|
107
107
|
hasNextPage: P = !1
|
|
108
|
-
} = a, u = $(), M = L(() => t == null ? void 0 : t.map((e,
|
|
108
|
+
} = a, u = $(), M = L(() => t == null ? void 0 : t.map((e, i) => /* @__PURE__ */ o(
|
|
109
109
|
O,
|
|
110
110
|
{
|
|
111
111
|
name: e == null ? void 0 : e.name,
|
|
@@ -127,6 +127,8 @@ const F = T.div`
|
|
|
127
127
|
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
128
128
|
condition: e == null ? void 0 : e.condition,
|
|
129
129
|
quantity: e == null ? void 0 : e.quantity,
|
|
130
|
+
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
131
|
+
status: e == null ? void 0 : e.status,
|
|
130
132
|
trade: e == null ? void 0 : e.trade,
|
|
131
133
|
sponsoredText: v,
|
|
132
134
|
onBookmark: C,
|
|
@@ -140,24 +142,24 @@ const F = T.div`
|
|
|
140
142
|
contactSeller: e == null ? void 0 : e.contactSeller,
|
|
141
143
|
hasVariants: e == null ? void 0 : e.hasVariants
|
|
142
144
|
},
|
|
143
|
-
|
|
145
|
+
i
|
|
144
146
|
)), [t]);
|
|
145
147
|
return /* @__PURE__ */ s(F, { ref: p, limit: f, children: [
|
|
146
148
|
/* @__PURE__ */ s("div", { className: "section__heading", children: [
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
r(l) && /* @__PURE__ */ s("div", { className: "section__title", children: [
|
|
150
|
+
r(c) && /* @__PURE__ */ o("i", { className: c }),
|
|
149
151
|
" ",
|
|
150
152
|
l
|
|
151
153
|
] }),
|
|
152
|
-
u &&
|
|
154
|
+
u && r(m) && r(d) && !n && /* @__PURE__ */ o(
|
|
153
155
|
U,
|
|
154
156
|
{
|
|
155
157
|
type: "button",
|
|
156
158
|
btnType: "tinted",
|
|
157
159
|
color: "neutral",
|
|
158
160
|
onClick: (e) => {
|
|
159
|
-
var
|
|
160
|
-
(
|
|
161
|
+
var i;
|
|
162
|
+
(i = e == null ? void 0 : e.target) == null || i.blur(), b(m);
|
|
161
163
|
},
|
|
162
164
|
borderRadius: "curved",
|
|
163
165
|
className: "section__view-all",
|
|
@@ -181,7 +183,7 @@ const F = T.div`
|
|
|
181
183
|
btnType: "basic",
|
|
182
184
|
color: "neutral",
|
|
183
185
|
className: "section__show-more",
|
|
184
|
-
onClick:
|
|
186
|
+
onClick: h
|
|
185
187
|
}
|
|
186
188
|
)
|
|
187
189
|
] });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),c=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),F=require("./Button.cjs"),l=require("./utils-RnrgDDZP.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-CkcozOY6.cjs"),w=require("./index-BeVjdODO.cjs"),I=require("./index-CSNxZFTX.cjs"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),F=require("./Button.cjs"),l=require("./utils-RnrgDDZP.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-CkcozOY6.cjs"),w=require("./index-BeVjdODO.cjs"),I=require("./index-CSNxZFTX.cjs"),Q=T.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${n=>`repeat(${n.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
/* Safari and Chrome */
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`,j=c.memo(w.DetailedProductCard)
|
|
29
|
+
`,j=c.memo(w.DetailedProductCard),_=c.forwardRef((n,P)=>{const{icon:d,title:v,buttonLink:u,items:i,buttonText:m,limit:s=4,onSelectCard:g=()=>{},onButtonAction:D=()=>{},isLoading:p=!1,getImage:b=()=>{},negotiableText:k,freeText:y,options:r,onSelectOption:h=()=>{},productsToolbarName:U="All",sponsoredText:S,onBookmark:C=()=>{},actionComponent:N,componentName:f}=n,q=B.useDetectMobile(),L=c.useMemo(()=>t.jsx(t.Fragment,{children:q===!0?i==null?void 0:i.map((e,o)=>t.jsx(j,{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:(M,a)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:a}),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:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,sponsoredText:S,onBookmark:C,actionComponent:N,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:f}},o)):i==null?void 0:i.slice(0,s).map((e,o)=>t.jsx(j,{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,a)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:a}),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:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,sponsoredText:S,onBookmark:C,actionComponent:N,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:f},sellerName:e==null?void 0:e.sellerName},o))}),[i,q,s]);return t.jsxs(R.TitleWithOptionsSectionWrapper,{ref:P,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(d)&&t.jsx("i",{className:d}),t.jsx("span",{children:v})]}),l.isDefinedNotEmptyString(u)&&l.isDefinedNotEmptyString(m)&&!p&&t.jsx(F,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var o;(o=e==null?void 0:e.target)==null||o.blur(),D(u)},borderRadius:"curved",className:"button-link",children:m})]}),(r==null?void 0:r.length)>0&&t.jsx(I.SelectBar,{items:r,onRemove:e=>{h(e)},onSelect:e=>{h(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:U}),t.jsx(w.SuspenseDetailedProductCard,{isLoading:p,keyPrefix:"detailed-products-skeleton",children:t.jsx(Q,{limit:s,children:L})})]})});module.exports=_;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, Fragment as F, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { memo as B, forwardRef as q, useMemo as E } from "react";
|
|
3
3
|
import { s as I } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
-
import { M as
|
|
5
|
-
import
|
|
4
|
+
import { M as Q } from "./consts-BuFChS64.js";
|
|
5
|
+
import O from "./Button.js";
|
|
6
6
|
import { k as m } from "./utils-Dc5zIpaz.js";
|
|
7
|
-
import { u as
|
|
8
|
-
import { T as
|
|
9
|
-
import { D as
|
|
10
|
-
import { S as
|
|
11
|
-
const
|
|
7
|
+
import { u as R } from "./useDetectMobile-Bkvj0VMa.js";
|
|
8
|
+
import { T as W } from "./style-C7FUSHmS.js";
|
|
9
|
+
import { D as $, S as j } from "./index-DrtxDu6u.js";
|
|
10
|
+
import { S as z } from "./index-BGiZlEQt.js";
|
|
11
|
+
const A = I.div`
|
|
12
12
|
display: grid;
|
|
13
13
|
grid-template-columns: ${(a) => `repeat(${a.limit}, minmax(0, 1fr))`};
|
|
14
14
|
gap: 1.25rem;
|
|
@@ -17,7 +17,7 @@ const K = I.div`
|
|
|
17
17
|
white-space: nowrap;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
@media (max-width: ${
|
|
20
|
+
@media (max-width: ${Q + "px"}) {
|
|
21
21
|
display: flex;
|
|
22
22
|
gap: 1rem;
|
|
23
23
|
overflow-x: auto;
|
|
@@ -36,12 +36,12 @@ const K = I.div`
|
|
|
36
36
|
/* Safari and Chrome */
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`, P = B(
|
|
39
|
+
`, P = B($), ee = q((a, v) => {
|
|
40
40
|
const {
|
|
41
41
|
icon: d,
|
|
42
42
|
title: T,
|
|
43
43
|
buttonLink: c,
|
|
44
|
-
items:
|
|
44
|
+
items: o,
|
|
45
45
|
buttonText: u,
|
|
46
46
|
limit: n = 4,
|
|
47
47
|
onSelectCard: p = () => {
|
|
@@ -53,16 +53,16 @@ const K = I.div`
|
|
|
53
53
|
},
|
|
54
54
|
negotiableText: k,
|
|
55
55
|
freeText: f,
|
|
56
|
-
options:
|
|
56
|
+
options: r,
|
|
57
57
|
onSelectOption: y = () => {
|
|
58
58
|
},
|
|
59
59
|
productsToolbarName: L = "All",
|
|
60
|
-
sponsoredText:
|
|
61
|
-
onBookmark:
|
|
60
|
+
sponsoredText: h,
|
|
61
|
+
onBookmark: S = () => {
|
|
62
62
|
},
|
|
63
|
-
actionComponent:
|
|
63
|
+
actionComponent: C,
|
|
64
64
|
componentName: N
|
|
65
|
-
} = a, w =
|
|
65
|
+
} = a, w = R(), M = E(() => /* @__PURE__ */ t(F, { children: w === !0 ? o == null ? void 0 : o.map((e, i) => /* @__PURE__ */ t(
|
|
66
66
|
P,
|
|
67
67
|
{
|
|
68
68
|
name: e == null ? void 0 : e.name,
|
|
@@ -74,10 +74,10 @@ const K = I.div`
|
|
|
74
74
|
uuid: e == null ? void 0 : e.uuid,
|
|
75
75
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
76
76
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
77
|
-
onSelectCard: (D,
|
|
77
|
+
onSelectCard: (D, s) => p({
|
|
78
78
|
uuid: e == null ? void 0 : e.uuid,
|
|
79
79
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
80
|
-
cardRef:
|
|
80
|
+
cardRef: s
|
|
81
81
|
}),
|
|
82
82
|
sellerName: e == null ? void 0 : e.sellerName,
|
|
83
83
|
imageUrl: b(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
@@ -89,16 +89,18 @@ const K = I.div`
|
|
|
89
89
|
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
90
90
|
condition: e == null ? void 0 : e.condition,
|
|
91
91
|
quantity: e == null ? void 0 : e.quantity,
|
|
92
|
+
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
93
|
+
status: e == null ? void 0 : e.status,
|
|
92
94
|
trade: e == null ? void 0 : e.trade,
|
|
93
|
-
sponsoredText:
|
|
94
|
-
onBookmark:
|
|
95
|
-
actionComponent:
|
|
95
|
+
sponsoredText: h,
|
|
96
|
+
onBookmark: S,
|
|
97
|
+
actionComponent: C,
|
|
96
98
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
97
99
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
98
100
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: N }
|
|
99
101
|
},
|
|
100
|
-
|
|
101
|
-
)) :
|
|
102
|
+
i
|
|
103
|
+
)) : o == null ? void 0 : o.slice(0, n).map((e, i) => /* @__PURE__ */ t(
|
|
102
104
|
P,
|
|
103
105
|
{
|
|
104
106
|
name: e == null ? void 0 : e.name,
|
|
@@ -111,10 +113,10 @@ const K = I.div`
|
|
|
111
113
|
location: e == null ? void 0 : e.location,
|
|
112
114
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
113
115
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
114
|
-
onSelectCard: (D,
|
|
116
|
+
onSelectCard: (D, s) => p({
|
|
115
117
|
uuid: e == null ? void 0 : e.uuid,
|
|
116
118
|
nameSlug: e == null ? void 0 : e.nameSlug,
|
|
117
|
-
cardRef:
|
|
119
|
+
cardRef: s
|
|
118
120
|
}),
|
|
119
121
|
imageUrl: b(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
120
122
|
isFree: e == null ? void 0 : e.isFree,
|
|
@@ -125,32 +127,34 @@ const K = I.div`
|
|
|
125
127
|
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
126
128
|
condition: e == null ? void 0 : e.condition,
|
|
127
129
|
quantity: e == null ? void 0 : e.quantity,
|
|
130
|
+
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
131
|
+
status: e == null ? void 0 : e.status,
|
|
128
132
|
trade: e == null ? void 0 : e.trade,
|
|
129
|
-
sponsoredText:
|
|
130
|
-
onBookmark:
|
|
131
|
-
actionComponent:
|
|
133
|
+
sponsoredText: h,
|
|
134
|
+
onBookmark: S,
|
|
135
|
+
actionComponent: C,
|
|
132
136
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
133
137
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
134
138
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: N },
|
|
135
139
|
sellerName: e == null ? void 0 : e.sellerName
|
|
136
140
|
},
|
|
137
|
-
|
|
138
|
-
)) }), [
|
|
139
|
-
return /* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
m(d) && /* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */
|
|
141
|
+
i
|
|
142
|
+
)) }), [o, w, n]);
|
|
143
|
+
return /* @__PURE__ */ l(W, { ref: v, children: [
|
|
144
|
+
/* @__PURE__ */ l("div", { className: "regular-title", children: [
|
|
145
|
+
/* @__PURE__ */ l("div", { className: "regular-title-text", children: [
|
|
146
|
+
m(d) && /* @__PURE__ */ t("i", { className: d }),
|
|
147
|
+
/* @__PURE__ */ t("span", { children: T })
|
|
144
148
|
] }),
|
|
145
|
-
m(c) && m(u) && !g && /* @__PURE__ */
|
|
146
|
-
|
|
149
|
+
m(c) && m(u) && !g && /* @__PURE__ */ t(
|
|
150
|
+
O,
|
|
147
151
|
{
|
|
148
152
|
type: "button",
|
|
149
153
|
btnType: "tinted",
|
|
150
154
|
color: "neutral",
|
|
151
155
|
onClick: (e) => {
|
|
152
|
-
var
|
|
153
|
-
(
|
|
156
|
+
var i;
|
|
157
|
+
(i = e == null ? void 0 : e.target) == null || i.blur(), U(c);
|
|
154
158
|
},
|
|
155
159
|
borderRadius: "curved",
|
|
156
160
|
className: "button-link",
|
|
@@ -158,10 +162,10 @@ const K = I.div`
|
|
|
158
162
|
}
|
|
159
163
|
)
|
|
160
164
|
] }),
|
|
161
|
-
(
|
|
162
|
-
|
|
165
|
+
(r == null ? void 0 : r.length) > 0 && /* @__PURE__ */ t(
|
|
166
|
+
z,
|
|
163
167
|
{
|
|
164
|
-
items:
|
|
168
|
+
items: r,
|
|
165
169
|
onRemove: (e) => {
|
|
166
170
|
y(e);
|
|
167
171
|
},
|
|
@@ -174,12 +178,12 @@ const K = I.div`
|
|
|
174
178
|
productsToolbarName: L
|
|
175
179
|
}
|
|
176
180
|
),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
181
|
+
/* @__PURE__ */ t(
|
|
182
|
+
j,
|
|
179
183
|
{
|
|
180
184
|
isLoading: g,
|
|
181
185
|
keyPrefix: "detailed-products-skeleton",
|
|
182
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ t(A, { limit: n, children: M })
|
|
183
187
|
}
|
|
184
188
|
)
|
|
185
189
|
] });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),$=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./Button.cjs"),N=require("./index-BeVjdODO.cjs"),F=_.styled.div`
|
|
2
2
|
padding: 1.75rem 3rem;
|
|
3
3
|
display: grid;
|
|
4
4
|
grid-template-columns: ${a=>`repeat(${a.limit||5}, minmax(0, 1fr))`};
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-direction: column;
|
|
73
73
|
}
|
|
74
|
-
`,S=s.memo(N.DetailedProductCard),I=s.forwardRef((a,P)=>{const{items:r,limit:n=5,limitMobile:l=4,onSelectCard:u=()=>{},title:j="Urgent sale",showLessText:q="Show less",showMoreText:L="Show more",isLoading:g=!1,getImage:p=()=>{},negotiableText:b,freeText:
|
|
74
|
+
`,S=s.memo(N.DetailedProductCard),I=s.forwardRef((a,P)=>{const{items:r,limit:n=5,limitMobile:l=4,onSelectCard:u=()=>{},title:j="Urgent sale",showLessText:q="Show less",showMoreText:L="Show more",isLoading:g=!1,getImage:p=()=>{},negotiableText:b,freeText:h,onBookmark:f=()=>{},actionComponent:k,componentName:y,sponsoredText:w}=a,d=$.useDetectMobile(),[i,M]=s.useState(!1),U=s.useMemo(()=>{var o;return t.jsx(t.Fragment,{children:d===!0?(o=r==null?void 0:r.slice(0,i===!0?r==null?void 0:r.length:l))==null?void 0:o.map((e,m)=>t.jsx(S,{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}),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:b,freeText:h,onBookmark:f,actionComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:y,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,sponsoredText:w},m)):r==null?void 0:r.slice(0,n).map((e,m)=>t.jsx(S,{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}),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:b,freeText:h,onBookmark:f,actionComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:y,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,sponsoredText:w,sellerName:e==null?void 0:e.sellerName},m))})},[r,d,n,l,i]);return t.jsx(N.SuspenseDetailedProductCard,{isLoading:g,keyPrefix:"urgent-sale-products-skeleton",children:t.jsxs(F,{ref:P,limit:n,children:[t.jsxs("div",{className:"urgent-tag",children:[t.jsx("i",{className:"mng mng-lnc-bolt-filled"}),t.jsx("span",{children:j})]})," ",U," ",d===!0&&l<(r==null?void 0:r.length)&&!g&&t.jsx(T,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:o=>{var e;(e=o==null?void 0:o.target)==null||e.blur(),M(!i)},children:i===!0?q:L})]})})});module.exports=I;
|
|
@@ -3,12 +3,12 @@ import { memo as T, forwardRef as F, useState as I, useMemo as _ } from "react";
|
|
|
3
3
|
import { s as q } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as B, S as D } from "./consts-BuFChS64.js";
|
|
5
5
|
import { u as E } from "./useDetectMobile-Bkvj0VMa.js";
|
|
6
|
-
import
|
|
7
|
-
import { D as
|
|
8
|
-
const
|
|
6
|
+
import Q from "./Button.js";
|
|
7
|
+
import { D as j, S as z } from "./index-DrtxDu6u.js";
|
|
8
|
+
const A = q.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|
|
11
|
-
grid-template-columns: ${(
|
|
11
|
+
grid-template-columns: ${(r) => `repeat(${r.limit || 5}, minmax(0, 1fr))`};
|
|
12
12
|
|
|
13
13
|
gap: 2.97rem;
|
|
14
14
|
|
|
@@ -41,7 +41,7 @@ const G = q.div`
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
& .product-card {
|
|
44
|
-
max-width: ${(
|
|
44
|
+
max-width: ${(r) => `calc(${100 / r.desktopCols}% - ${(r.desktopCols - 1) * r.columnGapRem / r.desktopCols}rem)`};
|
|
45
45
|
|
|
46
46
|
animation-duration: 0.2s;
|
|
47
47
|
animation-name: animate-fade;
|
|
@@ -78,11 +78,11 @@ const G = q.div`
|
|
|
78
78
|
display: flex;
|
|
79
79
|
flex-direction: column;
|
|
80
80
|
}
|
|
81
|
-
`, S = T(
|
|
81
|
+
`, S = T(j), J = F((r, w) => {
|
|
82
82
|
const {
|
|
83
|
-
items:
|
|
84
|
-
limit:
|
|
85
|
-
limitMobile:
|
|
83
|
+
items: a,
|
|
84
|
+
limit: s = 5,
|
|
85
|
+
limitMobile: n = 4,
|
|
86
86
|
onSelectCard: c = () => {
|
|
87
87
|
},
|
|
88
88
|
title: N = "Urgent sale",
|
|
@@ -93,14 +93,14 @@ const G = q.div`
|
|
|
93
93
|
},
|
|
94
94
|
negotiableText: p,
|
|
95
95
|
freeText: f,
|
|
96
|
-
onBookmark:
|
|
96
|
+
onBookmark: h = () => {
|
|
97
97
|
},
|
|
98
|
-
actionComponent:
|
|
99
|
-
componentName:
|
|
98
|
+
actionComponent: b,
|
|
99
|
+
componentName: k,
|
|
100
100
|
sponsoredText: y
|
|
101
|
-
} =
|
|
102
|
-
var
|
|
103
|
-
return /* @__PURE__ */ o($, { children: l === !0 ? (
|
|
101
|
+
} = r, l = E(), [i, M] = I(!1), U = _(() => {
|
|
102
|
+
var t;
|
|
103
|
+
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(
|
|
104
104
|
S,
|
|
105
105
|
{
|
|
106
106
|
sellerName: e == null ? void 0 : e.sellerName,
|
|
@@ -124,19 +124,21 @@ const G = q.div`
|
|
|
124
124
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
125
125
|
negotiableText: p,
|
|
126
126
|
freeText: f,
|
|
127
|
-
onBookmark:
|
|
128
|
-
actionComponent:
|
|
127
|
+
onBookmark: h,
|
|
128
|
+
actionComponent: b,
|
|
129
129
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
130
130
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
131
|
-
metadata: { name:
|
|
131
|
+
metadata: { name: k, accessor: e == null ? void 0 : e.accessor },
|
|
132
132
|
tags: e == null ? void 0 : e.tags,
|
|
133
133
|
condition: e == null ? void 0 : e.condition,
|
|
134
134
|
quantity: e == null ? void 0 : e.quantity,
|
|
135
|
+
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
136
|
+
status: e == null ? void 0 : e.status,
|
|
135
137
|
trade: e == null ? void 0 : e.trade,
|
|
136
138
|
sponsoredText: y
|
|
137
139
|
},
|
|
138
140
|
m
|
|
139
|
-
)) :
|
|
141
|
+
)) : a == null ? void 0 : a.slice(0, s).map((e, m) => /* @__PURE__ */ o(
|
|
140
142
|
S,
|
|
141
143
|
{
|
|
142
144
|
name: e == null ? void 0 : e.name,
|
|
@@ -160,27 +162,29 @@ const G = q.div`
|
|
|
160
162
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
161
163
|
negotiableText: p,
|
|
162
164
|
freeText: f,
|
|
163
|
-
onBookmark:
|
|
164
|
-
actionComponent:
|
|
165
|
+
onBookmark: h,
|
|
166
|
+
actionComponent: b,
|
|
165
167
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
166
168
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
167
|
-
metadata: { name:
|
|
169
|
+
metadata: { name: k, accessor: e == null ? void 0 : e.accessor },
|
|
168
170
|
tags: e == null ? void 0 : e.tags,
|
|
169
171
|
condition: e == null ? void 0 : e.condition,
|
|
170
172
|
quantity: e == null ? void 0 : e.quantity,
|
|
173
|
+
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
174
|
+
status: e == null ? void 0 : e.status,
|
|
171
175
|
trade: e == null ? void 0 : e.trade,
|
|
172
176
|
sponsoredText: y,
|
|
173
177
|
sellerName: e == null ? void 0 : e.sellerName
|
|
174
178
|
},
|
|
175
179
|
m
|
|
176
180
|
)) });
|
|
177
|
-
}, [
|
|
181
|
+
}, [a, l, s, n, i]);
|
|
178
182
|
return /* @__PURE__ */ o(
|
|
179
|
-
|
|
183
|
+
z,
|
|
180
184
|
{
|
|
181
185
|
isLoading: u,
|
|
182
186
|
keyPrefix: "urgent-sale-products-skeleton",
|
|
183
|
-
children: /* @__PURE__ */ C(
|
|
187
|
+
children: /* @__PURE__ */ C(A, { ref: w, limit: s, children: [
|
|
184
188
|
/* @__PURE__ */ C("div", { className: "urgent-tag", children: [
|
|
185
189
|
/* @__PURE__ */ o("i", { className: "mng mng-lnc-bolt-filled" }),
|
|
186
190
|
/* @__PURE__ */ o("span", { children: N })
|
|
@@ -188,18 +192,18 @@ const G = q.div`
|
|
|
188
192
|
" ",
|
|
189
193
|
U,
|
|
190
194
|
" ",
|
|
191
|
-
l === !0 &&
|
|
192
|
-
|
|
195
|
+
l === !0 && n < (a == null ? void 0 : a.length) && !u && /* @__PURE__ */ o(
|
|
196
|
+
Q,
|
|
193
197
|
{
|
|
194
198
|
className: "show-more",
|
|
195
199
|
btnType: "basic",
|
|
196
200
|
type: "button",
|
|
197
201
|
color: "neutral",
|
|
198
|
-
onClick: (
|
|
202
|
+
onClick: (t) => {
|
|
199
203
|
var e;
|
|
200
|
-
(e =
|
|
204
|
+
(e = t == null ? void 0 : t.target) == null || e.blur(), M(!i);
|
|
201
205
|
},
|
|
202
|
-
children:
|
|
206
|
+
children: i === !0 ? P : L
|
|
203
207
|
}
|
|
204
208
|
)
|
|
205
209
|
] })
|
|
@@ -207,5 +211,5 @@ const G = q.div`
|
|
|
207
211
|
);
|
|
208
212
|
});
|
|
209
213
|
export {
|
|
210
|
-
|
|
214
|
+
J as default
|
|
211
215
|
};
|