@lanaco/lnc-react-ui 4.0.167 → 4.0.169
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 +3 -3
- package/dist/DetailedProductsInfinitiveSection.js +36 -32
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{suspense-product-card-detailed-D3DShJYk.js → suspense-product-card-detailed-CxiFuUOT.js} +163 -130
- package/dist/{suspense-product-card-detailed-2ws-KyvD.cjs → suspense-product-card-detailed-IR4sh-l4.cjs} +28 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),s=require("react"),D=require("./emotion-styled.browser.esm-BtEseadx.cjs"),M=require("./consts-goSZX3xP.cjs"),B=require("./IconButton.cjs"),I=require("./Button.cjs"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("react"),D=require("./emotion-styled.browser.esm-BtEseadx.cjs"),M=require("./consts-goSZX3xP.cjs"),B=require("./IconButton.cjs"),I=require("./Button.cjs"),n=require("./utils-Dl9xPH4c.cjs"),E=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./suspense-product-card-detailed-IR4sh-l4.cjs"),L=D.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.5rem;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
& .section__items {
|
|
25
25
|
display: grid;
|
|
26
|
-
grid-template-columns: ${
|
|
26
|
+
grid-template-columns: ${r=>`repeat(${r.limit}, minmax(0, 1fr))`};
|
|
27
27
|
gap: 2rem;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
`,T=s.memo(g.DetailedProductCard),z=s.forwardRef((
|
|
73
|
+
`,T=s.memo(g.DetailedProductCard),z=s.forwardRef((r,p)=>{const{title:a,icon:l,items:o,limit:c=4,isLoading:d=!1,onSelectCard:f=()=>{},onLoadMore:b=()=>{},onButtonAction:w=()=>{},getImage:_=()=>{},viewAllbuttonLink:m,viewAllButonText:h="View all",negotiableText:y,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:C,onBookmark:N=()=>{},bookmarkComponent:S,componentName:j}=r,u=E.useDetectMobile(),q=s.useMemo(()=>o==null?void 0:o.map((e,i)=>t.jsx(T,{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:(R,P)=>f({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:P}),imageUrl:_(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:y,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,trade:e==null?void 0:e.trade,sponsoredText:C,onBookmark:N,bookmarkComponent: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},i)),[o]);return t.jsxs(L,{ref:p,limit:c,children:[t.jsxs("div",{className:"section__heading",children:[n.isDefinedNotEmptyString(a)&&t.jsxs("div",{className:"section__title",children:[n.isDefinedNotEmptyString(l)&&t.jsx("i",{className:l})," ",a]}),u&&n.isDefinedNotEmptyString(m)&&t.jsx(I,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var i;(i=e==null?void 0:e.target)==null||i.blur(),w(m)},borderRadius:"curved",className:"section__view-all",children:h})]}),t.jsx("div",{className:"section__items",children:t.jsx(g.SuspenseDetailedProductCard,{isLoading:d,limit:c,keyPrefix:"explore-landing",children:q})}),!u&&!d&&t.jsx(B,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:b})]})});module.exports=z;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { memo as B, forwardRef as D, useMemo as I } from "react";
|
|
3
3
|
import { s as L } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as T } from "./consts-BuFChS64.js";
|
|
5
5
|
import z from "./IconButton.js";
|
|
6
6
|
import E from "./Button.js";
|
|
7
|
-
import { k as
|
|
7
|
+
import { k as n } from "./utils-BdsZgOUE.js";
|
|
8
8
|
import { u as U } from "./useDetectMobile-Bkvj0VMa.js";
|
|
9
|
-
import { D as $, S as j } from "./suspense-product-card-detailed-
|
|
9
|
+
import { D as $, S as j } from "./suspense-product-card-detailed-CxiFuUOT.js";
|
|
10
10
|
const A = L.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
@@ -32,7 +32,7 @@ const A = L.div`
|
|
|
32
32
|
|
|
33
33
|
& .section__items {
|
|
34
34
|
display: grid;
|
|
35
|
-
grid-template-columns: ${(
|
|
35
|
+
grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
|
|
36
36
|
gap: 2rem;
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -79,24 +79,24 @@ const A = L.div`
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
`, F = B($), Q = D((
|
|
82
|
+
`, F = B($), Q = D((i, p) => {
|
|
83
83
|
const {
|
|
84
84
|
title: l,
|
|
85
85
|
icon: s,
|
|
86
|
-
items:
|
|
87
|
-
limit:
|
|
88
|
-
isLoading:
|
|
89
|
-
onSelectCard:
|
|
86
|
+
items: t,
|
|
87
|
+
limit: c = 4,
|
|
88
|
+
isLoading: m = !1,
|
|
89
|
+
onSelectCard: f = () => {
|
|
90
90
|
},
|
|
91
|
-
onLoadMore:
|
|
91
|
+
onLoadMore: g = () => {
|
|
92
92
|
},
|
|
93
93
|
onButtonAction: b = () => {
|
|
94
94
|
},
|
|
95
|
-
getImage:
|
|
95
|
+
getImage: h = () => {
|
|
96
96
|
},
|
|
97
97
|
viewAllbuttonLink: d,
|
|
98
|
-
viewAllButonText:
|
|
99
|
-
negotiableText:
|
|
98
|
+
viewAllButonText: w = "View all",
|
|
99
|
+
negotiableText: _,
|
|
100
100
|
freeText: y,
|
|
101
101
|
loadMoreButtonIcon: k = "angle-down",
|
|
102
102
|
sponsoredText: v,
|
|
@@ -104,7 +104,7 @@ const A = L.div`
|
|
|
104
104
|
},
|
|
105
105
|
bookmarkComponent: N,
|
|
106
106
|
componentName: S
|
|
107
|
-
} =
|
|
107
|
+
} = i, u = U(), P = I(() => t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ o(
|
|
108
108
|
F,
|
|
109
109
|
{
|
|
110
110
|
name: e == null ? void 0 : e.name,
|
|
@@ -116,11 +116,11 @@ const A = L.div`
|
|
|
116
116
|
uuid: e == null ? void 0 : e.uuid,
|
|
117
117
|
sponsored: e == null ? void 0 : e.sponsored,
|
|
118
118
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
119
|
-
onSelectCard: (
|
|
120
|
-
imageUrl:
|
|
119
|
+
onSelectCard: (O, M) => f({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: M }),
|
|
120
|
+
imageUrl: h(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
|
|
121
121
|
isFree: e == null ? void 0 : e.isFree,
|
|
122
122
|
isNegotiable: e == null ? void 0 : e.isNegotiable,
|
|
123
|
-
negotiableText:
|
|
123
|
+
negotiableText: _,
|
|
124
124
|
freeText: y,
|
|
125
125
|
tags: e == null ? void 0 : e.tags,
|
|
126
126
|
categoryCode: e == null ? void 0 : e.categoryCode,
|
|
@@ -133,43 +133,47 @@ const A = L.div`
|
|
|
133
133
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
134
134
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
135
135
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: S },
|
|
136
|
-
sellerName: e == null ? void 0 : e.sellerName
|
|
136
|
+
sellerName: e == null ? void 0 : e.sellerName,
|
|
137
|
+
forCart: e == null ? void 0 : e.forCart,
|
|
138
|
+
forOrder: e == null ? void 0 : e.forOrder,
|
|
139
|
+
contactSeller: e == null ? void 0 : e.contactSeller,
|
|
140
|
+
hasVariants: e == null ? void 0 : e.hasVariants
|
|
137
141
|
},
|
|
138
|
-
|
|
139
|
-
)), [
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
r
|
|
143
|
+
)), [t]);
|
|
144
|
+
return /* @__PURE__ */ a(A, { ref: p, limit: c, children: [
|
|
145
|
+
/* @__PURE__ */ a("div", { className: "section__heading", children: [
|
|
146
|
+
n(l) && /* @__PURE__ */ a("div", { className: "section__title", children: [
|
|
147
|
+
n(s) && /* @__PURE__ */ o("i", { className: s }),
|
|
144
148
|
" ",
|
|
145
149
|
l
|
|
146
150
|
] }),
|
|
147
|
-
u &&
|
|
151
|
+
u && n(d) && /* @__PURE__ */ o(
|
|
148
152
|
E,
|
|
149
153
|
{
|
|
150
154
|
type: "button",
|
|
151
155
|
btnType: "tinted",
|
|
152
156
|
color: "neutral",
|
|
153
157
|
onClick: (e) => {
|
|
154
|
-
var
|
|
155
|
-
(
|
|
158
|
+
var r;
|
|
159
|
+
(r = e == null ? void 0 : e.target) == null || r.blur(), b(d);
|
|
156
160
|
},
|
|
157
161
|
borderRadius: "curved",
|
|
158
162
|
className: "section__view-all",
|
|
159
|
-
children:
|
|
163
|
+
children: w
|
|
160
164
|
}
|
|
161
165
|
)
|
|
162
166
|
] }),
|
|
163
167
|
/* @__PURE__ */ o("div", { className: "section__items", children: /* @__PURE__ */ o(
|
|
164
168
|
j,
|
|
165
169
|
{
|
|
166
|
-
isLoading:
|
|
167
|
-
limit:
|
|
170
|
+
isLoading: m,
|
|
171
|
+
limit: c,
|
|
168
172
|
keyPrefix: "explore-landing",
|
|
169
173
|
children: P
|
|
170
174
|
}
|
|
171
175
|
) }),
|
|
172
|
-
!u && !
|
|
176
|
+
!u && !m && /* @__PURE__ */ o(
|
|
173
177
|
z,
|
|
174
178
|
{
|
|
175
179
|
icon: k,
|
|
@@ -177,7 +181,7 @@ const A = L.div`
|
|
|
177
181
|
btnType: "basic",
|
|
178
182
|
color: "neutral",
|
|
179
183
|
className: "section__show-more",
|
|
180
|
-
onClick:
|
|
184
|
+
onClick: g
|
|
181
185
|
}
|
|
182
186
|
)
|
|
183
187
|
] });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),l=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),F=require("./consts-goSZX3xP.cjs"),B=require("./Button.cjs"),h=require("./utils-Dl9xPH4c.cjs"),E=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-Db3VFbfP.cjs"),q=require("./suspense-product-card-detailed-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),l=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),F=require("./consts-goSZX3xP.cjs"),B=require("./Button.cjs"),h=require("./utils-Dl9xPH4c.cjs"),E=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-Db3VFbfP.cjs"),q=require("./suspense-product-card-detailed-IR4sh-l4.cjs"),I=require("./index-BvQx3xAm.cjs"),_=T.styled.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: ${a=>`repeat(${a.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -6,7 +6,7 @@ import R from "./Button.js";
|
|
|
6
6
|
import { k as h } from "./utils-BdsZgOUE.js";
|
|
7
7
|
import { u as W } from "./useDetectMobile-Bkvj0VMa.js";
|
|
8
8
|
import { T as $ } from "./style-DKAOBWn3.js";
|
|
9
|
-
import { D as j, S as z } from "./suspense-product-card-detailed-
|
|
9
|
+
import { D as j, S as z } from "./suspense-product-card-detailed-CxiFuUOT.js";
|
|
10
10
|
import { S as A } from "./index-dXWRbvgi.js";
|
|
11
11
|
const K = I.div`
|
|
12
12
|
display: grid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),n=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),$=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./Button.cjs"),S=require("./suspense-product-card-detailed-
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),n=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),$=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./Button.cjs"),S=require("./suspense-product-card-detailed-IR4sh-l4.cjs"),D=_.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))`};
|
|
@@ -4,7 +4,7 @@ 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
6
|
import j from "./Button.js";
|
|
7
|
-
import { D as z, S as A } from "./suspense-product-card-detailed-
|
|
7
|
+
import { D as z, S as A } from "./suspense-product-card-detailed-CxiFuUOT.js";
|
|
8
8
|
const G = q.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { t as
|
|
2
|
+
import { forwardRef as W, useState as K, useRef as H, useEffect as Pe, cloneElement as Z, Suspense as $e } from "react";
|
|
3
|
+
import { t as M, p as Te, o as y, a as Ve, l as J, q as Q, G as ee } from "./utils-BdsZgOUE.js";
|
|
4
4
|
import { s as T } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
5
|
-
import { P as
|
|
5
|
+
import { P as Ee } from "./index-CF3HhgvN.js";
|
|
6
6
|
import P from "./Badge.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { u as
|
|
11
|
-
import { M as
|
|
12
|
-
const
|
|
7
|
+
import Se from "./Popover.js";
|
|
8
|
+
import Oe from "./PopoverTrigger.js";
|
|
9
|
+
import Be from "./PopoverContent.js";
|
|
10
|
+
import { u as ze } from "./useDetectMobile-Bkvj0VMa.js";
|
|
11
|
+
import { M as re } from "./consts-BuFChS64.js";
|
|
12
|
+
const oe = T.div`
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
gap: 0.5rem;
|
|
@@ -19,7 +19,7 @@ const re = T.div`
|
|
|
19
19
|
|
|
20
20
|
& .seller {
|
|
21
21
|
text-transform: uppercase;
|
|
22
|
-
${
|
|
22
|
+
${M()}
|
|
23
23
|
color: var(--gray-500);
|
|
24
24
|
font-size: 0.625rem;
|
|
25
25
|
font-weight: 400;
|
|
@@ -28,7 +28,7 @@ const re = T.div`
|
|
|
28
28
|
& .wrapper-card-1 {
|
|
29
29
|
display: flex;
|
|
30
30
|
flex-direction: column;
|
|
31
|
-
gap: 0.
|
|
31
|
+
gap: 0.12rem;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
& .wrapper-card-2 {
|
|
@@ -72,13 +72,13 @@ const re = T.div`
|
|
|
72
72
|
& .card-title {
|
|
73
73
|
font-size: 0.875rem;
|
|
74
74
|
font-weight: 600;
|
|
75
|
-
${
|
|
75
|
+
${Te(2)}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
& .price-text {
|
|
79
79
|
font-size: 1rem;
|
|
80
80
|
font-weight: 600;
|
|
81
|
-
${
|
|
81
|
+
${M()}
|
|
82
82
|
display: flex;
|
|
83
83
|
align-items: end;
|
|
84
84
|
gap: 0.5rem;
|
|
@@ -101,7 +101,7 @@ const re = T.div`
|
|
|
101
101
|
font-size: 0.75rem;
|
|
102
102
|
font-weight: 400;
|
|
103
103
|
color: var(--gray-600, #676e79);
|
|
104
|
-
${
|
|
104
|
+
${M()}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
& .tags-wrapper {
|
|
@@ -146,7 +146,7 @@ const re = T.div`
|
|
|
146
146
|
gap: 0.25rem;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
@media (max-width: ${
|
|
149
|
+
@media (max-width: ${re + "px"}) {
|
|
150
150
|
overflow: visible;
|
|
151
151
|
|
|
152
152
|
& .wrapper-card-3 {
|
|
@@ -209,7 +209,7 @@ const re = T.div`
|
|
|
209
209
|
&:hover .product-image-wrapper img {
|
|
210
210
|
transform: scale(1.1);
|
|
211
211
|
}
|
|
212
|
-
`,
|
|
212
|
+
`, Me = T.div`
|
|
213
213
|
position: relative;
|
|
214
214
|
overflow: hidden;
|
|
215
215
|
border-radius: 0.75rem;
|
|
@@ -224,6 +224,28 @@ const re = T.div`
|
|
|
224
224
|
z-index: 1;
|
|
225
225
|
|
|
226
226
|
display: none;
|
|
227
|
+
|
|
228
|
+
display: flex;
|
|
229
|
+
align-items: center;
|
|
230
|
+
justify-content: center;
|
|
231
|
+
|
|
232
|
+
width: 2.25rem;
|
|
233
|
+
height: 2.25rem;
|
|
234
|
+
border-radius: ${(s) => Ve(s.theme, "curved")};
|
|
235
|
+
border: 1px solid var(--gray-95008);
|
|
236
|
+
background-color: white;
|
|
237
|
+
color: var(--gray-950);
|
|
238
|
+
transition: transform 0.2s ease;
|
|
239
|
+
|
|
240
|
+
&:hover {
|
|
241
|
+
transform: scale(1.05);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
i {
|
|
245
|
+
color: #14161a;
|
|
246
|
+
font-size: 1.1rem;
|
|
247
|
+
line-height: 1;
|
|
248
|
+
}
|
|
227
249
|
}
|
|
228
250
|
|
|
229
251
|
&:hover {
|
|
@@ -241,7 +263,7 @@ const re = T.div`
|
|
|
241
263
|
transition: var(--transition, all 0.3s ease);
|
|
242
264
|
}
|
|
243
265
|
|
|
244
|
-
@media (max-width: ${
|
|
266
|
+
@media (max-width: ${re + "px"}) {
|
|
245
267
|
& img {
|
|
246
268
|
width: 8.875rem;
|
|
247
269
|
height: 8.875rem;
|
|
@@ -254,7 +276,7 @@ const re = T.div`
|
|
|
254
276
|
display: flex;
|
|
255
277
|
}
|
|
256
278
|
}
|
|
257
|
-
`,
|
|
279
|
+
`, We = T.div`
|
|
258
280
|
background: var(--white, #fff);
|
|
259
281
|
z-index: 1;
|
|
260
282
|
|
|
@@ -304,7 +326,7 @@ const re = T.div`
|
|
|
304
326
|
color: var(--gray-950, #14161a);
|
|
305
327
|
}
|
|
306
328
|
}
|
|
307
|
-
`,
|
|
329
|
+
`, Fe = T.div`
|
|
308
330
|
display: flex;
|
|
309
331
|
align-items: center;
|
|
310
332
|
gap: 0.25rem;
|
|
@@ -316,10 +338,10 @@ const re = T.div`
|
|
|
316
338
|
font-size: 1rem;
|
|
317
339
|
color: var(--warning-500, #F59E0B);
|
|
318
340
|
}
|
|
319
|
-
`,
|
|
341
|
+
`, Ie = W(({ sponsoredText: s = "Sponsored" }, h) => /* @__PURE__ */ t(Fe, { ref: h, className: "sponsored-line", children: [
|
|
320
342
|
/* @__PURE__ */ e("i", { className: "mng-lnc-paw2" }),
|
|
321
|
-
/* @__PURE__ */ e("span", { children:
|
|
322
|
-
] })),
|
|
343
|
+
/* @__PURE__ */ e("span", { children: s })
|
|
344
|
+
] })), je = "Vehicles_Cars", xe = "Vehicles_Motorcycles", De = "Vehicles_Trucks", Ue = "Vehicles_AgriculturalMachines_Tractors", Re = "Vehicles_ConstructionMachines", Ge = "Vehicles_Bus", Xe = "Vehicles_Campers", Le = "RealEstates_", a = {
|
|
323
345
|
Mileage: {
|
|
324
346
|
icon: "mng-lnc-road",
|
|
325
347
|
measure: "km"
|
|
@@ -420,171 +442,182 @@ const re = T.div`
|
|
|
420
442
|
icon: " mng-lnc-clock--filled",
|
|
421
443
|
measure: ""
|
|
422
444
|
}
|
|
423
|
-
},
|
|
445
|
+
}, ir = W((s, h) => {
|
|
424
446
|
const {
|
|
425
447
|
uuid: c,
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
448
|
+
sellerUuid: _,
|
|
449
|
+
name: w,
|
|
450
|
+
price: V = 0,
|
|
451
|
+
sellingPrice: C,
|
|
452
|
+
currency: N,
|
|
430
453
|
isNegotiable: E,
|
|
431
454
|
isFree: S,
|
|
432
|
-
imageUrl:
|
|
433
|
-
location:
|
|
434
|
-
sponsored:
|
|
435
|
-
imageComponent:
|
|
436
|
-
onSelectCard:
|
|
455
|
+
imageUrl: ne,
|
|
456
|
+
location: te,
|
|
457
|
+
sponsored: ae,
|
|
458
|
+
imageComponent: F,
|
|
459
|
+
onSelectCard: ie = () => {
|
|
437
460
|
},
|
|
438
|
-
freeText:
|
|
439
|
-
negotiableText:
|
|
461
|
+
freeText: se = "Free",
|
|
462
|
+
negotiableText: le = "Negotiable",
|
|
440
463
|
tags: n = [],
|
|
441
|
-
categoryCode:
|
|
442
|
-
condition:
|
|
443
|
-
quantity:
|
|
444
|
-
trade:
|
|
445
|
-
sponsoredText:
|
|
446
|
-
|
|
464
|
+
categoryCode: O,
|
|
465
|
+
condition: I,
|
|
466
|
+
quantity: j,
|
|
467
|
+
trade: x,
|
|
468
|
+
sponsoredText: ce,
|
|
469
|
+
forCart: de,
|
|
470
|
+
forOrder: me,
|
|
471
|
+
contactSeller: pe,
|
|
472
|
+
hasVariants: ge,
|
|
473
|
+
onBookmark: B = () => {
|
|
447
474
|
},
|
|
448
475
|
bookmarkComponent: b,
|
|
449
476
|
bookmarked: D,
|
|
450
|
-
bookmarkLists:
|
|
451
|
-
metadata:
|
|
452
|
-
sellerName:
|
|
453
|
-
} =
|
|
477
|
+
bookmarkLists: ue,
|
|
478
|
+
metadata: f,
|
|
479
|
+
sellerName: U
|
|
480
|
+
} = s, z = ze(), he = () => {
|
|
454
481
|
var d;
|
|
455
|
-
if (!
|
|
456
|
-
const r = b, o = (d = b == null ? void 0 : b.props) == null ? void 0 : d.children,
|
|
482
|
+
if (!J(b)) return /* @__PURE__ */ e($, {});
|
|
483
|
+
const r = b, o = (d = b == null ? void 0 : b.props) == null ? void 0 : d.children, l = Z(o, {
|
|
457
484
|
key: `bookmark_pr__${D}`,
|
|
458
485
|
bookmarked: D,
|
|
459
486
|
productUuid: c,
|
|
460
|
-
onAddToBookmark: () =>
|
|
461
|
-
onRemoveFromBookmark: () =>
|
|
462
|
-
bookmarkedUuidList:
|
|
487
|
+
onAddToBookmark: () => B(!0, c),
|
|
488
|
+
onRemoveFromBookmark: () => B(!1, c),
|
|
489
|
+
bookmarkedUuidList: ue,
|
|
490
|
+
sellerUuid: _,
|
|
491
|
+
handleBookmarking: B,
|
|
492
|
+
forCart: de,
|
|
493
|
+
forOrder: me,
|
|
494
|
+
contactSeller: pe,
|
|
495
|
+
hasVariants: ge
|
|
463
496
|
});
|
|
464
|
-
return
|
|
465
|
-
},
|
|
466
|
-
ze,
|
|
467
|
-
Be,
|
|
468
|
-
Me,
|
|
469
|
-
Fe,
|
|
470
|
-
We,
|
|
471
|
-
Ie,
|
|
497
|
+
return Z(r, void 0, l);
|
|
498
|
+
}, R = [
|
|
472
499
|
je,
|
|
473
|
-
|
|
500
|
+
xe,
|
|
501
|
+
De,
|
|
502
|
+
Ue,
|
|
503
|
+
Re,
|
|
504
|
+
Ge,
|
|
505
|
+
Xe,
|
|
506
|
+
Le
|
|
474
507
|
].some(
|
|
475
|
-
(r) =>
|
|
476
|
-
), [
|
|
477
|
-
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
}, i =
|
|
481
|
-
var d,
|
|
482
|
-
if (!(i != null && i.current) || ((d =
|
|
483
|
-
if (
|
|
484
|
-
|
|
508
|
+
(r) => O == null ? void 0 : O.includes(r)
|
|
509
|
+
), [fe, G] = K(!1), ve = () => {
|
|
510
|
+
G(!0);
|
|
511
|
+
}, we = () => {
|
|
512
|
+
G(!1);
|
|
513
|
+
}, i = H(null), g = H([]), [be, X] = K(n == null ? void 0 : n.length), ke = () => {
|
|
514
|
+
var d, v, k;
|
|
515
|
+
if (!(i != null && i.current) || ((d = g == null ? void 0 : g.current) == null ? void 0 : d.length) === 0) return;
|
|
516
|
+
if (z) {
|
|
517
|
+
X(n == null ? void 0 : n.length);
|
|
485
518
|
return;
|
|
486
519
|
}
|
|
487
|
-
const r = (
|
|
488
|
-
let o = 0,
|
|
520
|
+
const r = (v = i == null ? void 0 : i.current) == null ? void 0 : v.offsetWidth;
|
|
521
|
+
let o = 0, l = 0;
|
|
489
522
|
for (let m = 0; m < (n == null ? void 0 : n.length); m++) {
|
|
490
|
-
const
|
|
523
|
+
const u = ((k = g == null ? void 0 : g.current[m]) == null ? void 0 : k.offsetWidth) || 0, p = o + u + 4;
|
|
491
524
|
if (p <= r)
|
|
492
|
-
o += p,
|
|
525
|
+
o += p, l++;
|
|
493
526
|
else
|
|
494
527
|
break;
|
|
495
528
|
}
|
|
496
|
-
|
|
529
|
+
X(l);
|
|
497
530
|
};
|
|
498
|
-
|
|
531
|
+
Pe(() => {
|
|
499
532
|
const r = i == null ? void 0 : i.current;
|
|
500
533
|
if (!r) return;
|
|
501
534
|
const o = new ResizeObserver(() => {
|
|
502
|
-
|
|
535
|
+
ke();
|
|
503
536
|
});
|
|
504
537
|
return o.observe(r), () => {
|
|
505
538
|
o.disconnect();
|
|
506
539
|
};
|
|
507
|
-
}, [n,
|
|
508
|
-
const
|
|
540
|
+
}, [n, z]);
|
|
541
|
+
const ye = () => {
|
|
509
542
|
var r;
|
|
510
|
-
return /* @__PURE__ */ e("div", { className: "tags-popover__trigger", children: (r = n == null ? void 0 : n.slice(0,
|
|
511
|
-
var
|
|
512
|
-
const d = ((
|
|
543
|
+
return /* @__PURE__ */ e("div", { className: "tags-popover__trigger", children: (r = n == null ? void 0 : n.slice(0, be)) == null ? void 0 : r.map((o, l) => {
|
|
544
|
+
var u, p, q, A, Y;
|
|
545
|
+
const d = ((u = a == null ? void 0 : a[o == null ? void 0 : o.code]) == null ? void 0 : u.icon) ?? ((p = a == null ? void 0 : a.default) == null ? void 0 : p.icon) ?? "", v = ((q = o == null ? void 0 : o.measurementUnit) == null ? void 0 : q.symbol) ?? ((A = a == null ? void 0 : a[o == null ? void 0 : o.code]) == null ? void 0 : A.measure) ?? "", m = [(o == null ? void 0 : o.value) ?? ((Y = o == null ? void 0 : o.multiOptions) == null ? void 0 : Y[0]) ?? "", v].filter(Boolean).join(" ");
|
|
513
546
|
return /* @__PURE__ */ t(
|
|
514
547
|
P,
|
|
515
548
|
{
|
|
516
|
-
ref: (
|
|
549
|
+
ref: (Ne) => g.current[l] = Ne,
|
|
517
550
|
className: "tag",
|
|
518
551
|
children: [
|
|
519
552
|
/* @__PURE__ */ e("i", { className: d }),
|
|
520
553
|
m
|
|
521
554
|
]
|
|
522
555
|
},
|
|
523
|
-
`detailed-products-section-tag__${
|
|
556
|
+
`detailed-products-section-tag__${l + 1}`
|
|
524
557
|
);
|
|
525
558
|
}) });
|
|
526
|
-
},
|
|
527
|
-
var m,
|
|
528
|
-
const
|
|
559
|
+
}, _e = () => /* @__PURE__ */ e("div", { className: "tags-popover__content", children: n == null ? void 0 : n.map((r, o) => {
|
|
560
|
+
var m, u, p;
|
|
561
|
+
const l = ((m = r == null ? void 0 : r.measurementUnit) == null ? void 0 : m.symbol) ?? ((u = a == null ? void 0 : a[r == null ? void 0 : r.code]) == null ? void 0 : u.measure) ?? "", v = [(r == null ? void 0 : r.value) ?? ((p = r == null ? void 0 : r.multiOptions) == null ? void 0 : p[0]) ?? "", l].filter(Boolean).join(" "), k = r == null ? void 0 : r.name;
|
|
529
562
|
return /* @__PURE__ */ t("div", { children: [
|
|
530
563
|
/* @__PURE__ */ e("span", { className: "tags-popover__name", children: `${k}: ` }),
|
|
531
|
-
/* @__PURE__ */ e("span", { className: "tags-popover__value", children:
|
|
564
|
+
/* @__PURE__ */ e("span", { className: "tags-popover__value", children: v })
|
|
532
565
|
] }, `detailed-products-section-tag-dropdown__${o + 1}`);
|
|
533
|
-
}) }),
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
] }),
|
|
566
|
+
}) }), Ce = () => /* @__PURE__ */ t($, { children: [
|
|
567
|
+
I && /* @__PURE__ */ e(P, { className: "tag", children: I }, "detailed-products-section-tag__condition"),
|
|
568
|
+
j && /* @__PURE__ */ e(P, { className: "tag", children: j }, "detailed-products-section-tag__quantity"),
|
|
569
|
+
x && /* @__PURE__ */ e(P, { className: "tag", children: x }, "detailed-products-section-tag__trade")
|
|
570
|
+
] }), L = V > 0 && N && E !== !0 && S !== !0 && V !== C;
|
|
538
571
|
return (
|
|
539
572
|
// <LandingPageProductCardSkeleton />
|
|
540
573
|
/* @__PURE__ */ t(
|
|
541
|
-
|
|
574
|
+
oe,
|
|
542
575
|
{
|
|
543
576
|
ref: i,
|
|
544
577
|
className: "product-card",
|
|
545
|
-
"data-accessor":
|
|
546
|
-
name:
|
|
547
|
-
onClick: (r) =>
|
|
578
|
+
"data-accessor": f == null ? void 0 : f.accessor,
|
|
579
|
+
name: f == null ? void 0 : f.name,
|
|
580
|
+
onClick: (r) => ie(r, i),
|
|
548
581
|
children: [
|
|
549
|
-
/* @__PURE__ */ t(
|
|
550
|
-
/* @__PURE__ */ e(
|
|
551
|
-
|
|
582
|
+
/* @__PURE__ */ t(Me, { className: "product-image-wrapper", children: [
|
|
583
|
+
/* @__PURE__ */ e(he, {}),
|
|
584
|
+
J(F) ? F : /* @__PURE__ */ e(Ee, { src: ne })
|
|
552
585
|
] }),
|
|
553
586
|
/* @__PURE__ */ t("div", { className: "wrapper-card-1", children: [
|
|
554
|
-
/* @__PURE__ */ e("div", { className: "seller", title:
|
|
555
|
-
/* @__PURE__ */ e("div", { className: "card-title", children:
|
|
587
|
+
/* @__PURE__ */ e("div", { className: "seller", title: U, children: U }),
|
|
588
|
+
/* @__PURE__ */ e("div", { className: "card-title", children: w })
|
|
556
589
|
] }),
|
|
557
590
|
/* @__PURE__ */ t("div", { className: "wrapper-card-3", children: [
|
|
558
|
-
|
|
591
|
+
R && /* @__PURE__ */ e(
|
|
559
592
|
"div",
|
|
560
593
|
{
|
|
561
|
-
...
|
|
562
|
-
onMouseEnter:
|
|
563
|
-
onMouseLeave:
|
|
594
|
+
...z ? {} : {
|
|
595
|
+
onMouseEnter: ve,
|
|
596
|
+
onMouseLeave: we
|
|
564
597
|
},
|
|
565
|
-
children: /* @__PURE__ */ t(
|
|
566
|
-
/* @__PURE__ */ e(
|
|
567
|
-
/* @__PURE__ */ e(
|
|
598
|
+
children: /* @__PURE__ */ t(Se, { placement: "bottom", open: fe, children: [
|
|
599
|
+
/* @__PURE__ */ e(Oe, { children: ye() }),
|
|
600
|
+
/* @__PURE__ */ e(Be, { style: { all: "unset" }, children: /* @__PURE__ */ e(We, { children: _e() }) })
|
|
568
601
|
] })
|
|
569
602
|
}
|
|
570
603
|
),
|
|
571
|
-
!
|
|
604
|
+
!R && Ce()
|
|
572
605
|
] }),
|
|
573
606
|
/* @__PURE__ */ t("div", { className: "wrapper-card-2", children: [
|
|
574
|
-
/* @__PURE__ */ t("div", { className: `price-text ${
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
E &&
|
|
578
|
-
S &&
|
|
607
|
+
/* @__PURE__ */ t("div", { className: `price-text ${L ? "new-price" : ""}`, children: [
|
|
608
|
+
C > 0 && N && E !== !0 && S !== !0 && /* @__PURE__ */ e("div", { children: `${Q(C)} ${ee(N)}` }),
|
|
609
|
+
L && /* @__PURE__ */ e("div", { className: `${C > 0 ? "full-price" : ""}`, children: `${Q(V)} ${ee(N)}` }),
|
|
610
|
+
E && le,
|
|
611
|
+
S && se
|
|
579
612
|
] }),
|
|
580
|
-
/* @__PURE__ */ e("div", { className: "location-text", children:
|
|
613
|
+
/* @__PURE__ */ e("div", { className: "location-text", children: te })
|
|
581
614
|
] }),
|
|
582
|
-
|
|
615
|
+
ae === !0 && /* @__PURE__ */ e(Ie, { sponsoredText: ce })
|
|
583
616
|
]
|
|
584
617
|
}
|
|
585
618
|
)
|
|
586
619
|
);
|
|
587
|
-
}),
|
|
620
|
+
}), qe = W(({}, s) => /* @__PURE__ */ t(oe, { className: "product-card", children: [
|
|
588
621
|
/* @__PURE__ */ e("img", { className: "skeleton-img" }),
|
|
589
622
|
/* @__PURE__ */ t("div", { className: "wrapper-card-1", children: [
|
|
590
623
|
/* @__PURE__ */ e("div", { className: "skeleton-title" }),
|
|
@@ -594,27 +627,27 @@ const re = T.div`
|
|
|
594
627
|
/* @__PURE__ */ e("div", { className: "skeleton-price" }),
|
|
595
628
|
/* @__PURE__ */ e("div", { className: "skeleton-sponsored" })
|
|
596
629
|
] })
|
|
597
|
-
] })),
|
|
598
|
-
|
|
630
|
+
] })), Ae = ({ limit: s = 5, isLoading: h = !1, keyPrefix: c }) => /* @__PURE__ */ e($, { children: Array.from({ length: s }, (_, w) => /* @__PURE__ */ e(
|
|
631
|
+
qe,
|
|
599
632
|
{
|
|
600
|
-
isLoading:
|
|
633
|
+
isLoading: h
|
|
601
634
|
},
|
|
602
|
-
`${c}-skeleton-product-card-${
|
|
603
|
-
)) }),
|
|
604
|
-
children:
|
|
605
|
-
fallbackComponent:
|
|
635
|
+
`${c}-skeleton-product-card-${w}`
|
|
636
|
+
)) }), sr = ({
|
|
637
|
+
children: s,
|
|
638
|
+
fallbackComponent: h = /* @__PURE__ */ e($, {}),
|
|
606
639
|
isLoading: c = !1,
|
|
607
640
|
limit: _,
|
|
608
|
-
keyPrefix:
|
|
609
|
-
}) => /* @__PURE__ */ e(
|
|
610
|
-
|
|
641
|
+
keyPrefix: w
|
|
642
|
+
}) => /* @__PURE__ */ e($e, { fallbackComponent: h, children: c === !0 ? /* @__PURE__ */ e(
|
|
643
|
+
Ae,
|
|
611
644
|
{
|
|
612
645
|
isLoading: c,
|
|
613
646
|
limit: _,
|
|
614
|
-
keyPrefix:
|
|
647
|
+
keyPrefix: w
|
|
615
648
|
}
|
|
616
|
-
) :
|
|
649
|
+
) : s });
|
|
617
650
|
export {
|
|
618
|
-
|
|
619
|
-
|
|
651
|
+
ir as D,
|
|
652
|
+
sr as S
|
|
620
653
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("react"),t=require("./utils-Dl9xPH4c.cjs"),N=require("./emotion-styled.browser.esm-BtEseadx.cjs"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),a=require("react"),t=require("./utils-Dl9xPH4c.cjs"),N=require("./emotion-styled.browser.esm-BtEseadx.cjs"),fe=require("./index-BueKsXT8.cjs"),C=require("./Badge.cjs"),ve=require("./Popover.cjs"),we=require("./PopoverTrigger.cjs"),be=require("./PopoverContent.cjs"),ye=require("./useDetectMobile-zkbzoOGV.cjs"),X=require("./consts-goSZX3xP.cjs"),L=N.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 0.5rem;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
& .wrapper-card-1 {
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
|
-
gap: 0.
|
|
20
|
+
gap: 0.12rem;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
& .wrapper-card-2 {
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
&:hover .product-image-wrapper img {
|
|
199
199
|
transform: scale(1.1);
|
|
200
200
|
}
|
|
201
|
-
`,
|
|
201
|
+
`,ke=N.styled.div`
|
|
202
202
|
position: relative;
|
|
203
203
|
overflow: hidden;
|
|
204
204
|
border-radius: 0.75rem;
|
|
@@ -213,6 +213,28 @@
|
|
|
213
213
|
z-index: 1;
|
|
214
214
|
|
|
215
215
|
display: none;
|
|
216
|
+
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
justify-content: center;
|
|
220
|
+
|
|
221
|
+
width: 2.25rem;
|
|
222
|
+
height: 2.25rem;
|
|
223
|
+
border-radius: ${c=>t.getBorderRadiusValueWithUnits(c.theme,"curved")};
|
|
224
|
+
border: 1px solid var(--gray-95008);
|
|
225
|
+
background-color: white;
|
|
226
|
+
color: var(--gray-950);
|
|
227
|
+
transition: transform 0.2s ease;
|
|
228
|
+
|
|
229
|
+
&:hover {
|
|
230
|
+
transform: scale(1.05);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
i {
|
|
234
|
+
color: #14161a;
|
|
235
|
+
font-size: 1.1rem;
|
|
236
|
+
line-height: 1;
|
|
237
|
+
}
|
|
216
238
|
}
|
|
217
239
|
|
|
218
240
|
&:hover {
|
|
@@ -243,7 +265,7 @@
|
|
|
243
265
|
display: flex;
|
|
244
266
|
}
|
|
245
267
|
}
|
|
246
|
-
`,
|
|
268
|
+
`,xe=N.styled.div`
|
|
247
269
|
background: var(--white, #fff);
|
|
248
270
|
z-index: 1;
|
|
249
271
|
|
|
@@ -293,7 +315,7 @@
|
|
|
293
315
|
color: var(--gray-950, #14161a);
|
|
294
316
|
}
|
|
295
317
|
}
|
|
296
|
-
`,
|
|
318
|
+
`,je=N.styled.div`
|
|
297
319
|
display: flex;
|
|
298
320
|
align-items: center;
|
|
299
321
|
gap: 0.25rem;
|
|
@@ -305,4 +327,4 @@
|
|
|
305
327
|
font-size: 1rem;
|
|
306
328
|
color: var(--warning-500, #F59E0B);
|
|
307
329
|
}
|
|
308
|
-
`,
|
|
330
|
+
`,_e=a.forwardRef(({sponsoredText:c="Sponsored"},f)=>e.jsxs(je,{ref:f,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:c})]})),Ce="Vehicles_Cars",Ne="Vehicles_Motorcycles",Pe="Vehicles_Trucks",$e="Vehicles_AgriculturalMachines_Tractors",Se="Vehicles_ConstructionMachines",Ee="Vehicles_Bus",Te="Vehicles_Campers",Ve="RealEstates_",s={Mileage:{icon:"mng-lnc-road",measure:"km"},YearOfProduction:{icon:"mng-lnc-calendar",measure:""},Fuel:{icon:"mng-lnc-gas-station",measure:""},EnginePowerKW:{icon:"mng-lnc-engine",measure:"kW"},Transmission:{icon:"mng-lnc-transmission",measure:""},Model:{icon:"mng-lnc-application",measure:""},Brand:{icon:"mng-lnc-car--front",measure:""},SurfaceArea:{icon:"mng-lnc-right-angle",measure:""},Floor:{icon:"mng-lnc-elevator",measure:""},FurnishedCondition:{icon:"mng-lnc-sofa-01",measure:""},AdType:{icon:"mng-lnc-notes",measure:""},NumberOfRooms:{icon:"mng-lnc-meeting-room",measure:""},HeatingType:{icon:"mng-lnc-heat",measure:""},AirConditioning:{icon:"mng-lnc-air-conditioner",measure:""},Type:{icon:"mng-lnc-house-building",measure:""},Parking:{icon:"mng-lnc-parking-area-circle",measure:""},Internet:{icon:"mng-lnc-wifi-02",measure:""},State:{icon:"mng-lnc-settings-1",measure:""},NumberOfPremises:{icon:"mng-lnc-meeting-room",measure:""},Pool:{icon:"mng-lnc-pool",measure:""},Approach:{icon:"mng-lnc-driveway",measure:""},NumberOfBeds:{icon:"mng-lnc-bed",measure:""},Kitchen:{icon:"mng-lnc-fridge",measure:""},BathroomToilet:{icon:"mng-lnc-bath",measure:""},default:{icon:" mng-lnc-clock--filled",measure:""}},Oe=a.forwardRef((c,f)=>{const{uuid:d,sellerUuid:x,name:b,price:P=0,sellingPrice:j,currency:_,isNegotiable:$,isFree:S,imageUrl:Y,location:K,sponsored:Z,imageComponent:O,onSelectCard:H=()=>{},freeText:J="Free",negotiableText:Q="Negotiable",tags:n=[],categoryCode:E,condition:B,quantity:z,trade:F,sponsoredText:ee,forCart:re,forOrder:oe,contactSeller:ne,hasVariants:te,onBookmark:T=()=>{},bookmarkComponent:y,bookmarked:M,bookmarkLists:se,metadata:v,sellerName:q}=c,V=ye.useDetectMobile(),ie=()=>{var m;if(!t.isDefined(y))return e.jsx(e.Fragment,{});const r=y,o=(m=y==null?void 0:y.props)==null?void 0:m.children,l=a.cloneElement(o,{key:`bookmark_pr__${M}`,bookmarked:M,productUuid:d,onAddToBookmark:()=>T(!0,d),onRemoveFromBookmark:()=>T(!1,d),bookmarkedUuidList:se,sellerUuid:x,handleBookmarking:T,forCart:re,forOrder:oe,contactSeller:ne,hasVariants:te});return a.cloneElement(r,void 0,l)},W=[Ce,Ne,Pe,$e,Se,Ee,Te,Ve].some(r=>E==null?void 0:E.includes(r)),[ae,I]=a.useState(!1),ce=()=>{I(!0)},le=()=>{I(!1)},i=a.useRef(null),g=a.useRef([]),[de,R]=a.useState(n==null?void 0:n.length),me=()=>{var m,w,k;if(!(i!=null&&i.current)||((m=g==null?void 0:g.current)==null?void 0:m.length)===0)return;if(V){R(n==null?void 0:n.length);return}const r=(w=i==null?void 0:i.current)==null?void 0:w.offsetWidth;let o=0,l=0;for(let p=0;p<(n==null?void 0:n.length);p++){const h=((k=g==null?void 0:g.current[p])==null?void 0:k.offsetWidth)||0,u=o+h+4;if(u<=r)o+=u,l++;else break}R(l)};a.useEffect(()=>{const r=i==null?void 0:i.current;if(!r)return;const o=new ResizeObserver(()=>{me()});return o.observe(r),()=>{o.disconnect()}},[n,V]);const pe=()=>{var r;return e.jsx("div",{className:"tags-popover__trigger",children:(r=n==null?void 0:n.slice(0,de))==null?void 0:r.map((o,l)=>{var h,u,G,A,U;const m=((h=s==null?void 0:s[o==null?void 0:o.code])==null?void 0:h.icon)??((u=s==null?void 0:s.default)==null?void 0:u.icon)??"",w=((G=o==null?void 0:o.measurementUnit)==null?void 0:G.symbol)??((A=s==null?void 0:s[o==null?void 0:o.code])==null?void 0:A.measure)??"",p=[(o==null?void 0:o.value)??((U=o==null?void 0:o.multiOptions)==null?void 0:U[0])??"",w].filter(Boolean).join(" ");return e.jsxs(C,{ref:he=>g.current[l]=he,className:"tag",children:[e.jsx("i",{className:m}),p]},`detailed-products-section-tag__${l+1}`)})})},ue=()=>e.jsx("div",{className:"tags-popover__content",children:n==null?void 0:n.map((r,o)=>{var p,h,u;const l=((p=r==null?void 0:r.measurementUnit)==null?void 0:p.symbol)??((h=s==null?void 0:s[r==null?void 0:r.code])==null?void 0:h.measure)??"",w=[(r==null?void 0:r.value)??((u=r==null?void 0:r.multiOptions)==null?void 0:u[0])??"",l].filter(Boolean).join(" "),k=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${k}: `}),e.jsx("span",{className:"tags-popover__value",children:w})]},`detailed-products-section-tag-dropdown__${o+1}`)})}),ge=()=>e.jsxs(e.Fragment,{children:[B&&e.jsx(C,{className:"tag",children:B},"detailed-products-section-tag__condition"),z&&e.jsx(C,{className:"tag",children:z},"detailed-products-section-tag__quantity"),F&&e.jsx(C,{className:"tag",children:F},"detailed-products-section-tag__trade")]}),D=P>0&&_&&$!==!0&&S!==!0&&P!==j;return e.jsxs(L,{ref:i,className:"product-card","data-accessor":v==null?void 0:v.accessor,name:v==null?void 0:v.name,onClick:r=>H(r,i),children:[e.jsxs(ke,{className:"product-image-wrapper",children:[e.jsx(ie,{}),t.isDefined(O)?O:e.jsx(fe.ProductImageWrapper,{src:Y})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:q,children:q}),e.jsx("div",{className:"card-title",children:b})]}),e.jsxs("div",{className:"wrapper-card-3",children:[W&&e.jsx("div",{...V?{}:{onMouseEnter:ce,onMouseLeave:le},children:e.jsxs(ve,{placement:"bottom",open:ae,children:[e.jsx(we,{children:pe()}),e.jsx(be,{style:{all:"unset"},children:e.jsx(xe,{children:ue()})})]})}),!W&&ge()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${D?"new-price":""}`,children:[j>0&&_&&$!==!0&&S!==!0&&e.jsx("div",{children:`${t.formatPrice(j)} ${t.GetCurrencySymbol(_)}`}),D&&e.jsx("div",{className:`${j>0?"full-price":""}`,children:`${t.formatPrice(P)} ${t.GetCurrencySymbol(_)}`}),$&&Q,S&&J]}),e.jsx("div",{className:"location-text",children:K})]}),Z===!0&&e.jsx(_e,{sponsoredText:ee})]})}),Be=a.forwardRef(({},c)=>e.jsxs(L,{className:"product-card",children:[e.jsx("img",{className:"skeleton-img"}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-title"}),e.jsx("div",{className:"skeleton-tags"})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"skeleton-price"}),e.jsx("div",{className:"skeleton-sponsored"})]})]})),ze=({limit:c=5,isLoading:f=!1,keyPrefix:d})=>e.jsx(e.Fragment,{children:Array.from({length:c},(x,b)=>e.jsx(Be,{isLoading:f},`${d}-skeleton-product-card-${b}`))}),Fe=({children:c,fallbackComponent:f=e.jsx(e.Fragment,{}),isLoading:d=!1,limit:x,keyPrefix:b})=>e.jsx(a.Suspense,{fallbackComponent:f,children:d===!0?e.jsx(ze,{isLoading:d,limit:x,keyPrefix:b}):c});exports.DetailedProductCard=Oe;exports.SuspenseDetailedProductCard=Fe;
|