@lanaco/lnc-react-ui 4.0.191 → 4.0.193

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),a=require("react"),B=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),I=require("./IconButton.cjs"),L=require("./Button.cjs"),n=require("./utils-RnrgDDZP.cjs"),T=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-Coo0aVuh.cjs"),z=B.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),a=require("react"),E=require("./emotion-styled.browser.esm-BtEseadx.cjs"),I=require("./consts-goSZX3xP.cjs"),L=require("./IconButton.cjs"),T=require("./Button.cjs"),n=require("./utils-RnrgDDZP.cjs"),z=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-Lmz3An4A.cjs"),R=E.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.5rem;
@@ -47,7 +47,7 @@
47
47
  white-space: nowrap;
48
48
  }
49
49
 
50
- @media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
50
+ @media (max-width: ${I.MOBILE_SIZE_PX+"px"}) {
51
51
  gap: 1.25rem;
52
52
 
53
53
  & .section__items {
@@ -70,4 +70,4 @@
70
70
  }
71
71
  }
72
72
  }
73
- `,R=a.memo(g.DetailedProductCard),U=a.forwardRef((r,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:S=()=>{},actionComponent:N,componentName:j,hasNextPage:q=!1,LinkComponent:P}=r,u=T.useDetectMobile(),D=a.useMemo(()=>i==null?void 0:i.map((e,o)=>t.jsx(R,{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:(A,M)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:M}),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:_,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:S,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: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,LinkComponent:P},o)),[i]);return t.jsxs(z,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[n.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[n.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&n.isDefinedNotEmptyString(d)&&n.isDefinedNotEmptyString(m)&&!s&&t.jsx(L,{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:D})}),!u&&!s&&q&&t.jsx(I,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=U;
73
+ `,U=a.memo(g.DetailedProductCard),A=a.forwardRef((r,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:S,onBookmark:C=()=>{},actionComponent:N,componentName:P,hasNextPage:j=!1,LinkComponent:q,urgentText:D}=r,u=z.useDetectMobile(),M=a.useMemo(()=>i==null?void 0:i.map((e,o)=>t.jsx(U,{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:(F,B)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:B}),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:_,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: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:P},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:q,activeSalesPackages:e==null?void 0:e.activeSalesPackages,urgentText:D},o)),[i]);return t.jsxs(R,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[n.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[n.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&n.isDefinedNotEmptyString(d)&&n.isDefinedNotEmptyString(m)&&!s&&t.jsx(T,{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:M})}),!u&&!s&&j&&t.jsx(L,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=A;
@@ -1,13 +1,13 @@
1
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
- import { memo as D, forwardRef as I, useMemo as T } from "react";
3
- import { s as z } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as E } from "./consts-BuFChS64.js";
5
- import U from "./IconButton.js";
6
- import $ from "./Button.js";
1
+ import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
+ import { memo as D, forwardRef as I, useMemo as z } from "react";
3
+ import { s as E } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as U } from "./consts-BuFChS64.js";
5
+ import $ from "./IconButton.js";
6
+ import j from "./Button.js";
7
7
  import { k as r } from "./utils-Dc5zIpaz.js";
8
- import { u as j } from "./useDetectMobile-Bkvj0VMa.js";
9
- import { D as A, S as F } from "./index-PhMLWAC1.js";
10
- const O = z.div`
8
+ import { u as A } from "./useDetectMobile-Bkvj0VMa.js";
9
+ import { D as F, S as O } from "./index-DqBXIFsQ.js";
10
+ const R = E.div`
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  gap: 1.5rem;
@@ -56,7 +56,7 @@ const O = z.div`
56
56
  white-space: nowrap;
57
57
  }
58
58
 
59
- @media (max-width: ${E + "px"}) {
59
+ @media (max-width: ${U + "px"}) {
60
60
  gap: 1.25rem;
61
61
 
62
62
  & .section__items {
@@ -79,14 +79,14 @@ const O = z.div`
79
79
  }
80
80
  }
81
81
  }
82
- `, R = D(A), Y = I((a, p) => {
82
+ `, V = D(F), x = I((a, p) => {
83
83
  const {
84
84
  title: l,
85
85
  icon: c,
86
- items: t,
87
- limit: f = 4,
86
+ items: o,
87
+ limit: g = 4,
88
88
  isLoading: n = !1,
89
- onSelectCard: g = () => {
89
+ onSelectCard: f = () => {
90
90
  },
91
91
  onLoadMore: h = () => {
92
92
  },
@@ -97,17 +97,18 @@ const O = z.div`
97
97
  viewAllbuttonLink: m,
98
98
  viewAllButonText: d = "View all",
99
99
  negotiableText: _,
100
- freeText: y,
101
- loadMoreButtonIcon: k = "angle-down",
100
+ freeText: k,
101
+ loadMoreButtonIcon: y = "angle-down",
102
102
  sponsoredText: v,
103
103
  onBookmark: C = () => {
104
104
  },
105
105
  actionComponent: S,
106
106
  componentName: N,
107
107
  hasNextPage: P = !1,
108
- LinkComponent: M
109
- } = a, u = j(), B = T(() => t == null ? void 0 : t.map((e, i) => /* @__PURE__ */ o(
110
- R,
108
+ LinkComponent: M,
109
+ urgentText: B
110
+ } = a, u = A(), L = z(() => o == null ? void 0 : o.map((e, i) => /* @__PURE__ */ t(
111
+ V,
111
112
  {
112
113
  name: e == null ? void 0 : e.name,
113
114
  price: e == null ? void 0 : e.price,
@@ -118,13 +119,13 @@ const O = z.div`
118
119
  uuid: e == null ? void 0 : e.uuid,
119
120
  sponsored: e == null ? void 0 : e.sponsored,
120
121
  imageComponent: e == null ? void 0 : e.imageComponent,
121
- onSelectCard: (V, L) => g({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: L }),
122
+ onSelectCard: (q, T) => f({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: T }),
122
123
  nameSlug: e == null ? void 0 : e.nameSlug,
123
124
  imageUrl: w(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
124
125
  isFree: e == null ? void 0 : e.isFree,
125
126
  isNegotiable: e == null ? void 0 : e.isNegotiable,
126
127
  negotiableText: _,
127
- freeText: y,
128
+ freeText: k,
128
129
  tags: e == null ? void 0 : e.tags,
129
130
  categoryCode: e == null ? void 0 : e.categoryCode,
130
131
  condition: e == null ? void 0 : e.condition,
@@ -143,19 +144,21 @@ const O = z.div`
143
144
  forOrder: e == null ? void 0 : e.forOrder,
144
145
  contactSeller: e == null ? void 0 : e.contactSeller,
145
146
  hasVariants: e == null ? void 0 : e.hasVariants,
146
- LinkComponent: M
147
+ LinkComponent: M,
148
+ activeSalesPackages: e == null ? void 0 : e.activeSalesPackages,
149
+ urgentText: B
147
150
  },
148
151
  i
149
- )), [t]);
150
- return /* @__PURE__ */ s(O, { ref: p, limit: f, children: [
152
+ )), [o]);
153
+ return /* @__PURE__ */ s(R, { ref: p, limit: g, children: [
151
154
  /* @__PURE__ */ s("div", { className: "section__heading", children: [
152
155
  r(l) && /* @__PURE__ */ s("div", { className: "section__title", children: [
153
- r(c) && /* @__PURE__ */ o("i", { className: c }),
156
+ r(c) && /* @__PURE__ */ t("i", { className: c }),
154
157
  " ",
155
158
  l
156
159
  ] }),
157
- u && r(m) && r(d) && !n && /* @__PURE__ */ o(
158
- $,
160
+ u && r(m) && r(d) && !n && /* @__PURE__ */ t(
161
+ j,
159
162
  {
160
163
  type: "button",
161
164
  btnType: "tinted",
@@ -170,18 +173,18 @@ const O = z.div`
170
173
  }
171
174
  )
172
175
  ] }),
173
- /* @__PURE__ */ o(
174
- F,
176
+ /* @__PURE__ */ t(
177
+ O,
175
178
  {
176
179
  isLoading: n,
177
180
  keyPrefix: "detailed-product-card-skeleton",
178
- children: /* @__PURE__ */ o("div", { className: "section__items", children: B })
181
+ children: /* @__PURE__ */ t("div", { className: "section__items", children: L })
179
182
  }
180
183
  ),
181
- !u && !n && P && /* @__PURE__ */ o(
182
- U,
184
+ !u && !n && P && /* @__PURE__ */ t(
185
+ $,
183
186
  {
184
- icon: k,
187
+ icon: y,
185
188
  borderRadius: "curved",
186
189
  btnType: "basic",
187
190
  color: "neutral",
@@ -192,5 +195,5 @@ const O = z.div`
192
195
  ] });
193
196
  });
194
197
  export {
195
- Y as default
198
+ x as default
196
199
  };
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),c=require("react"),F=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-Coo0aVuh.cjs"),_=require("./index-CSNxZFTX.cjs"),$=F.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("react"),F=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-Lmz3An4A.cjs"),_=require("./index-CSNxZFTX.cjs"),$=F.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${o=>`repeat(${o.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
@@ -6,7 +6,7 @@ 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-PhMLWAC1.js";
9
+ import { D as z, S as A } from "./index-DqBXIFsQ.js";
10
10
  import { S as K } from "./index-BGiZlEQt.js";
11
11
  const _ = O.div`
12
12
  display: grid;
@@ -1,4 +1,4 @@
1
- "use strict";const a=require("react/jsx-runtime"),s=require("react"),$=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-goSZX3xP.cjs"),T=require("./useDetectMobile-zkbzoOGV.cjs"),F=require("./Button.cjs"),P=require("./index-Coo0aVuh.cjs"),I=$.styled.div`
1
+ "use strict";const a=require("react/jsx-runtime"),s=require("react"),$=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-goSZX3xP.cjs"),T=require("./useDetectMobile-zkbzoOGV.cjs"),F=require("./Button.cjs"),P=require("./index-Lmz3An4A.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))`};
@@ -4,7 +4,7 @@ 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-PhMLWAC1.js";
7
+ import { D as z, S as A } from "./index-DqBXIFsQ.js";
8
8
  const G = B.div`
9
9
  padding: 1.75rem 3rem;
10
10
  display: grid;
@@ -1,8 +1,8 @@
1
1
  import { jsxs as n, jsx as e, Fragment as O } from "react/jsx-runtime";
2
- import { forwardRef as le, useState as re, useRef as oe, useEffect as Fe, cloneElement as ne, Suspense as We } from "react";
3
- import { s as N } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as x } from "./consts-BuFChS64.js";
5
- import { t as D, o as De, a as Me, l as te, p as ie, G as ae, k as se } from "./utils-Dc5zIpaz.js";
2
+ import { forwardRef as le, useState as oe, useRef as ne, useEffect as Fe, cloneElement as te, Suspense as We } from "react";
3
+ import { s as k } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as j } from "./consts-BuFChS64.js";
5
+ import { t as D, o as De, a as Me, l as M, p as ie, G as ae, k as se } from "./utils-Dc5zIpaz.js";
6
6
  import { P as xe } from "./index-C_NnINik.js";
7
7
  import I from "./Badge.js";
8
8
  import je from "./Popover.js";
@@ -10,8 +10,8 @@ import Le from "./PopoverTrigger.js";
10
10
  import Te from "./PopoverContent.js";
11
11
  import { u as Xe } from "./useDetectMobile-Bkvj0VMa.js";
12
12
  import qe from "./Icon.js";
13
- import { a as b, S as p, c as C, b as t } from "./style-CXMUA6cI.js";
14
- const Ae = N.a`
13
+ import { a as b, S as p, c as y, b as t } from "./style-CXMUA6cI.js";
14
+ const Ae = k.a`
15
15
  display: flex;
16
16
  flex-direction: column;
17
17
  gap: 0.5rem;
@@ -21,6 +21,11 @@ const Ae = N.a`
21
21
  text-decoration: none;
22
22
  color: var(--gray-950, #14161a);
23
23
  position: relative;
24
+
25
+ & .prevent-el {
26
+ height: 0;
27
+ width: 0;
28
+ }
24
29
  & .seller {
25
30
  text-transform: uppercase;
26
31
  ${D()}
@@ -171,7 +176,7 @@ const Ae = N.a`
171
176
  padding-inline: 0.5rem;
172
177
  }
173
178
 
174
- @media (max-width: ${x + "px"}) {
179
+ @media (max-width: ${j + "px"}) {
175
180
  overflow: visible;
176
181
 
177
182
  & .wrapper-card-3 {
@@ -234,7 +239,7 @@ const Ae = N.a`
234
239
  &:hover .product-image-wrapper img {
235
240
  transform: scale(1.1);
236
241
  }
237
- `, Ye = N.div`
242
+ `, Ye = k.div`
238
243
  position: relative;
239
244
  overflow: hidden;
240
245
  border-radius: 0.75rem;
@@ -287,7 +292,7 @@ const Ae = N.a`
287
292
  transition: var(--transition, all 0.3s ease);
288
293
  }
289
294
 
290
- @media (max-width: ${x + "px"}) {
295
+ @media (max-width: ${j + "px"}) {
291
296
  & img {
292
297
  width: 8.875rem;
293
298
  height: 8.875rem;
@@ -302,7 +307,7 @@ const Ae = N.a`
302
307
  top: unset;
303
308
  }
304
309
  }
305
- `, He = N.div`
310
+ `, He = k.div`
306
311
  background: var(--white, #fff);
307
312
  z-index: 1;
308
313
 
@@ -352,7 +357,7 @@ const Ae = N.a`
352
357
  color: var(--gray-950, #14161a);
353
358
  }
354
359
  }
355
- `, Ke = N.div`
360
+ `, Ke = k.div`
356
361
  display: flex;
357
362
  align-items: center;
358
363
  gap: 0.25rem;
@@ -468,7 +473,7 @@ const Ae = N.a`
468
473
  icon: " mng-lnc-clock--filled",
469
474
  measure: ""
470
475
  }
471
- }, M = {
476
+ }, x = {
472
477
  ADDDISCOUNT: " mng-lnc-percentage",
473
478
  URGENT: " mng-lnc-flash",
474
479
  FREEQUANTITY: " mng-lnc-3d-software",
@@ -480,22 +485,22 @@ const Ae = N.a`
480
485
  sellerUuid: G,
481
486
  name: ce,
482
487
  price: P = 0,
483
- sellingPrice: y,
484
- currency: _,
488
+ sellingPrice: _,
489
+ currency: R,
485
490
  isNegotiable: S,
486
491
  isFree: E,
487
492
  imageUrl: de,
488
493
  location: me,
489
494
  sponsored: he,
490
- imageComponent: j,
495
+ imageComponent: L,
491
496
  freeText: ge = "Free",
492
497
  negotiableText: pe = "Negotiable",
493
498
  tags: i = [],
494
499
  categoryCode: V,
495
500
  categoryName: ue,
496
- condition: L,
501
+ condition: T,
497
502
  quantity: B,
498
- trade: T,
503
+ trade: X,
499
504
  sponsoredText: fe,
500
505
  forCart: be,
501
506
  forOrder: ve,
@@ -505,23 +510,23 @@ const Ae = N.a`
505
510
  status: _e,
506
511
  onBookmark: U = () => {
507
512
  },
508
- actionComponent: R,
509
- bookmarked: X,
513
+ actionComponent: v,
514
+ bookmarked: q,
510
515
  bookmarkLists: Re,
511
- metadata: v,
512
- sellerName: q,
516
+ metadata: w,
517
+ sellerName: A,
513
518
  nameSlug: z,
514
- onSelectCard: ke = () => {
519
+ onSelectCard: Ne = () => {
515
520
  },
516
521
  activeSalesPackages: F,
517
- urgentText: Ne = "Urgent",
518
- LinkComponent: A
519
- } = a, $e = A || "a", W = Xe(), Pe = () => {
522
+ urgentText: ke = "Urgent",
523
+ LinkComponent: Y
524
+ } = a, $e = Y || "a", W = Xe(), Pe = () => {
520
525
  var d;
521
- if (!te(R)) return /* @__PURE__ */ e(O, {});
522
- const r = R, o = (d = R == null ? void 0 : R.props) == null ? void 0 : d.children, s = ne(o, {
523
- key: `bookmark_pr__${X}`,
524
- bookmarked: X,
526
+ if (!M(v)) return /* @__PURE__ */ e(O, {});
527
+ const r = v, o = (d = v == null ? void 0 : v.props) == null ? void 0 : d.children, s = te(o, {
528
+ key: `bookmark_pr__${q}`,
529
+ bookmarked: q,
525
530
  productUuid: m,
526
531
  onAddToBookmark: () => U(!0, m),
527
532
  onRemoveFromBookmark: () => U(!1, m),
@@ -538,16 +543,16 @@ const Ae = N.a`
538
543
  productBasicInfo: {
539
544
  uuid: m,
540
545
  price: P,
541
- sellingPrice: y,
546
+ sellingPrice: _,
542
547
  categoryCode: V,
543
548
  categoryName: ue,
544
- currency: _,
549
+ currency: R,
545
550
  isNegotiable: S,
546
551
  isFree: E
547
552
  }
548
553
  });
549
- return ne(r, void 0, s);
550
- }, Y = [
554
+ return te(r, void 0, s);
555
+ }, H = [
551
556
  Ze,
552
557
  Je,
553
558
  er,
@@ -558,27 +563,27 @@ const Ae = N.a`
558
563
  ir
559
564
  ].some(
560
565
  (r) => V == null ? void 0 : V.includes(r)
561
- ), [Se, H] = re(!1), Ee = () => {
562
- H(!0);
566
+ ), [Se, K] = oe(!1), Ee = () => {
567
+ K(!0);
563
568
  }, Ve = () => {
564
- H(!1);
565
- }, c = oe(null), u = oe([]), [ze, K] = re(i == null ? void 0 : i.length), Ie = () => {
566
- var d, w, k;
569
+ K(!1);
570
+ }, c = ne(null), u = ne([]), [ze, Q] = oe(i == null ? void 0 : i.length), Ie = () => {
571
+ var d, C, N;
567
572
  if (!(c != null && c.current) || ((d = u == null ? void 0 : u.current) == null ? void 0 : d.length) === 0) return;
568
573
  if (W) {
569
- K(i == null ? void 0 : i.length);
574
+ Q(i == null ? void 0 : i.length);
570
575
  return;
571
576
  }
572
- const r = (w = c == null ? void 0 : c.current) == null ? void 0 : w.offsetWidth;
577
+ const r = (C = c == null ? void 0 : c.current) == null ? void 0 : C.offsetWidth;
573
578
  let o = 0, s = 0;
574
579
  for (let h = 0; h < (i == null ? void 0 : i.length); h++) {
575
- const f = ((k = u == null ? void 0 : u.current[h]) == null ? void 0 : k.offsetWidth) || 0, g = o + f + 4;
580
+ const f = ((N = u == null ? void 0 : u.current[h]) == null ? void 0 : N.offsetWidth) || 0, g = o + f + 4;
576
581
  if (g <= r)
577
582
  o += g, s++;
578
583
  else
579
584
  break;
580
585
  }
581
- K(s);
586
+ Q(s);
582
587
  };
583
588
  Fe(() => {
584
589
  const r = c == null ? void 0 : c.current;
@@ -593,8 +598,8 @@ const Ae = N.a`
593
598
  const Oe = () => {
594
599
  var r;
595
600
  return /* @__PURE__ */ e("div", { className: "tags-popover__trigger", children: (r = i == null ? void 0 : i.slice(0, ze)) == null ? void 0 : r.map((o, s) => {
596
- var f, g, Z, J, ee;
597
- const d = ((f = l == null ? void 0 : l[o == null ? void 0 : o.code]) == null ? void 0 : f.icon) ?? ((g = l == null ? void 0 : l.default) == null ? void 0 : g.icon) ?? "", w = ((Z = o == null ? void 0 : o.measurementUnit) == null ? void 0 : Z.symbol) ?? ((J = l == null ? void 0 : l[o == null ? void 0 : o.code]) == null ? void 0 : J.measure) ?? "", h = [(o == null ? void 0 : o.value) ?? ((ee = o == null ? void 0 : o.multiOptions) == null ? void 0 : ee[0]) ?? "", w].filter(Boolean).join(" ");
601
+ var f, g, J, ee, re;
602
+ const d = ((f = l == null ? void 0 : l[o == null ? void 0 : o.code]) == null ? void 0 : f.icon) ?? ((g = l == null ? void 0 : l.default) == null ? void 0 : g.icon) ?? "", C = ((J = o == null ? void 0 : o.measurementUnit) == null ? void 0 : J.symbol) ?? ((ee = l == null ? void 0 : l[o == null ? void 0 : o.code]) == null ? void 0 : ee.measure) ?? "", h = [(o == null ? void 0 : o.value) ?? ((re = o == null ? void 0 : o.multiOptions) == null ? void 0 : re[0]) ?? "", C].filter(Boolean).join(" ");
598
603
  return /* @__PURE__ */ n(
599
604
  I,
600
605
  {
@@ -610,16 +615,16 @@ const Ae = N.a`
610
615
  }) });
611
616
  }, Ge = () => /* @__PURE__ */ e("div", { className: "tags-popover__content", children: i == null ? void 0 : i.map((r, o) => {
612
617
  var h, f, g;
613
- const s = ((h = r == null ? void 0 : r.measurementUnit) == null ? void 0 : h.symbol) ?? ((f = l == null ? void 0 : l[r == null ? void 0 : r.code]) == null ? void 0 : f.measure) ?? "", w = [(r == null ? void 0 : r.value) ?? ((g = r == null ? void 0 : r.multiOptions) == null ? void 0 : g[0]) ?? "", s].filter(Boolean).join(" "), k = r == null ? void 0 : r.name;
618
+ const s = ((h = r == null ? void 0 : r.measurementUnit) == null ? void 0 : h.symbol) ?? ((f = l == null ? void 0 : l[r == null ? void 0 : r.code]) == null ? void 0 : f.measure) ?? "", C = [(r == null ? void 0 : r.value) ?? ((g = r == null ? void 0 : r.multiOptions) == null ? void 0 : g[0]) ?? "", s].filter(Boolean).join(" "), N = r == null ? void 0 : r.name;
614
619
  return /* @__PURE__ */ n("div", { children: [
615
- /* @__PURE__ */ e("span", { className: "tags-popover__name", children: `${k}: ` }),
616
- /* @__PURE__ */ e("span", { className: "tags-popover__value", children: w })
620
+ /* @__PURE__ */ e("span", { className: "tags-popover__name", children: `${N}: ` }),
621
+ /* @__PURE__ */ e("span", { className: "tags-popover__value", children: C })
617
622
  ] }, `detailed-products-section-tag-dropdown__${o + 1}`);
618
623
  }) }), Be = () => /* @__PURE__ */ n(O, { children: [
619
- L && /* @__PURE__ */ e(I, { className: "tag", children: L }, "detailed-products-section-tag__condition"),
624
+ T && /* @__PURE__ */ e(I, { className: "tag", children: T }, "detailed-products-section-tag__condition"),
620
625
  B && /* @__PURE__ */ e(I, { className: "tag", children: B }, "detailed-products-section-tag__quantity"),
621
- T && /* @__PURE__ */ e(I, { className: "tag", children: T }, "detailed-products-section-tag__trade")
622
- ] }), Q = P > 0 && _ && S !== !0 && E !== !0 && P !== y;
626
+ X && /* @__PURE__ */ e(I, { className: "tag", children: X }, "detailed-products-section-tag__trade")
627
+ ] }), Z = P > 0 && R && S !== !0 && E !== !0 && P !== _;
623
628
  return (
624
629
  // <LandingPageProductCardSkeleton />
625
630
  /* @__PURE__ */ n(
@@ -627,27 +632,28 @@ const Ae = N.a`
627
632
  {
628
633
  ref: c,
629
634
  className: "product-card",
630
- "data-accessor": v == null ? void 0 : v.accessor,
631
- name: v == null ? void 0 : v.name,
632
- onClick: (r) => ke(r, c),
635
+ "data-accessor": w == null ? void 0 : w.accessor,
636
+ name: w == null ? void 0 : w.name,
637
+ onClick: (r) => Ne(r, c),
633
638
  as: $e,
634
- ...A ? {
639
+ ...Y ? {
635
640
  to: `/product/${se(z) ? `${z}-` : ""}${m}`
636
641
  } : {
637
642
  href: `/product/${se(z) ? `${z}-` : ""}${m}`
638
643
  },
639
644
  children: [
640
645
  /* @__PURE__ */ n(Ye, { className: "product-image-wrapper", children: [
641
- /* @__PURE__ */ e(
646
+ M(v) && /* @__PURE__ */ e(
642
647
  "div",
643
648
  {
649
+ className: "prevent-el",
644
650
  onClick: (r) => {
645
651
  r == null || r.preventDefault(), r == null || r.stopPropagation();
646
652
  },
647
653
  children: /* @__PURE__ */ e(Pe, {})
648
654
  }
649
655
  ),
650
- te(j) ? j : /* @__PURE__ */ e(xe, { src: de })
656
+ M(L) ? L : /* @__PURE__ */ e(xe, { src: de })
651
657
  ] }),
652
658
  F && F.length > 0 && /* @__PURE__ */ e("div", { className: "campaign-badges", children: F.map((r, o) => {
653
659
  var s, d;
@@ -659,13 +665,13 @@ const Ae = N.a`
659
665
  (r == null ? void 0 : r.salesPackageCode) !== "Urgent" && /* @__PURE__ */ e(
660
666
  qe,
661
667
  {
662
- icon: M == null ? void 0 : M[(d = r == null ? void 0 : r.salesPackageCode) == null ? void 0 : d.toUpperCase()],
668
+ icon: x == null ? void 0 : x[(d = r == null ? void 0 : r.salesPackageCode) == null ? void 0 : d.toUpperCase()],
663
669
  sizeInUnits: "1rem"
664
670
  }
665
671
  ),
666
672
  (r == null ? void 0 : r.salesPackageCode) === "Urgent" && /* @__PURE__ */ n(O, { children: [
667
673
  " ",
668
- Ne
674
+ ke
669
675
  ] })
670
676
  ]
671
677
  },
@@ -673,7 +679,7 @@ const Ae = N.a`
673
679
  );
674
680
  }) }),
675
681
  /* @__PURE__ */ n("div", { className: "wrapper-card-1", children: [
676
- /* @__PURE__ */ e("div", { className: "seller", title: q, children: q }),
682
+ /* @__PURE__ */ e("div", { className: "seller", title: A, children: A }),
677
683
  /* @__PURE__ */ e("div", { className: "card-title", children: ce })
678
684
  ] }),
679
685
  /* @__PURE__ */ n(
@@ -684,7 +690,7 @@ const Ae = N.a`
684
690
  r == null || r.preventDefault(), r == null || r.stopPropagation();
685
691
  },
686
692
  children: [
687
- Y && /* @__PURE__ */ e(
693
+ H && /* @__PURE__ */ e(
688
694
  "div",
689
695
  {
690
696
  ...W ? {} : {
@@ -697,14 +703,14 @@ const Ae = N.a`
697
703
  ] })
698
704
  }
699
705
  ),
700
- !Y && Be()
706
+ !H && Be()
701
707
  ]
702
708
  }
703
709
  ),
704
710
  /* @__PURE__ */ n("div", { className: "wrapper-card-2", children: [
705
- /* @__PURE__ */ n("div", { className: `price-text ${Q ? "new-price" : ""}`, children: [
706
- y > 0 && _ && S !== !0 && E !== !0 && /* @__PURE__ */ e("div", { children: `${ie(y)} ${ae(_)}` }),
707
- Q && /* @__PURE__ */ e("div", { className: `${y > 0 ? "full-price" : ""}`, children: `${ie(P)} ${ae(_)}` }),
711
+ /* @__PURE__ */ n("div", { className: `price-text ${Z ? "new-price" : ""}`, children: [
712
+ _ > 0 && R && S !== !0 && E !== !0 && /* @__PURE__ */ e("div", { children: `${ie(_)} ${ae(R)}` }),
713
+ Z && /* @__PURE__ */ e("div", { className: `${_ > 0 ? "full-price" : ""}`, children: `${ie(P)} ${ae(R)}` }),
708
714
  S && pe,
709
715
  E && ge
710
716
  ] }),
@@ -715,8 +721,8 @@ const Ae = N.a`
715
721
  }
716
722
  )
717
723
  );
718
- }), ar = N(b)`
719
- @media (max-width: ${x + "px"}) {
724
+ }), ar = k(b)`
725
+ @media (max-width: ${j + "px"}) {
720
726
  & > div {
721
727
  &:nth-of-type(even) {
722
728
  display: none;
@@ -726,7 +732,7 @@ const Ae = N.a`
726
732
  `, sr = ({ keyPrefix: a }) => /* @__PURE__ */ n(ar, { children: [
727
733
  /* @__PURE__ */ n(p, { gap: "0.5rem", children: [
728
734
  /* @__PURE__ */ e(
729
- C,
735
+ y,
730
736
  {
731
737
  height: "100%",
732
738
  width: "100%",
@@ -747,7 +753,7 @@ const Ae = N.a`
747
753
  noGradient: !0,
748
754
  children: [
749
755
  /* @__PURE__ */ e(
750
- C,
756
+ y,
751
757
  {
752
758
  height: "100%",
753
759
  width: "100%",
@@ -771,7 +777,7 @@ const Ae = N.a`
771
777
  noGradient: !0,
772
778
  children: [
773
779
  /* @__PURE__ */ e(
774
- C,
780
+ y,
775
781
  {
776
782
  height: "100%",
777
783
  width: "100%",
@@ -795,7 +801,7 @@ const Ae = N.a`
795
801
  noGradient: !0,
796
802
  children: [
797
803
  /* @__PURE__ */ e(
798
- C,
804
+ y,
799
805
  {
800
806
  height: "100%",
801
807
  width: "100%",
@@ -819,7 +825,7 @@ const Ae = N.a`
819
825
  noGradient: !0,
820
826
  children: [
821
827
  /* @__PURE__ */ e(
822
- C,
828
+ y,
823
829
  {
824
830
  height: "100%",
825
831
  width: "100%",
@@ -843,7 +849,7 @@ const Ae = N.a`
843
849
  noGradient: !0,
844
850
  children: [
845
851
  /* @__PURE__ */ e(
846
- C,
852
+ y,
847
853
  {
848
854
  height: "100%",
849
855
  width: "100%",
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),m=require("react"),k=require("./emotion-styled.browser.esm-BtEseadx.cjs"),V=require("./consts-goSZX3xP.cjs"),a=require("./utils-RnrgDDZP.cjs"),Pe=require("./index-uwl7BjRF.cjs"),L=require("./Badge.cjs"),ye=require("./Popover.cjs"),Re=require("./PopoverTrigger.cjs"),_e=require("./PopoverContent.cjs"),Ne=require("./useDetectMobile-zkbzoOGV.cjs"),Le=require("./Icon.cjs"),o=require("./style-BAcV7F53.cjs"),$e=k.styled.a`
1
+ "use strict";const e=require("react/jsx-runtime"),m=require("react"),k=require("./emotion-styled.browser.esm-BtEseadx.cjs"),D=require("./consts-goSZX3xP.cjs"),a=require("./utils-RnrgDDZP.cjs"),Pe=require("./index-uwl7BjRF.cjs"),L=require("./Badge.cjs"),ye=require("./Popover.cjs"),Re=require("./PopoverTrigger.cjs"),_e=require("./PopoverContent.cjs"),Ne=require("./useDetectMobile-zkbzoOGV.cjs"),Le=require("./Icon.cjs"),n=require("./style-BAcV7F53.cjs"),$e=k.styled.a`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 0.5rem;
@@ -8,6 +8,11 @@
8
8
  text-decoration: none;
9
9
  color: var(--gray-950, #14161a);
10
10
  position: relative;
11
+
12
+ & .prevent-el {
13
+ height: 0;
14
+ width: 0;
15
+ }
11
16
  & .seller {
12
17
  text-transform: uppercase;
13
18
  ${a.truncateText()}
@@ -158,7 +163,7 @@
158
163
  padding-inline: 0.5rem;
159
164
  }
160
165
 
161
- @media (max-width: ${V.MOBILE_SIZE_PX+"px"}) {
166
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
162
167
  overflow: visible;
163
168
 
164
169
  & .wrapper-card-3 {
@@ -274,7 +279,7 @@
274
279
  transition: var(--transition, all 0.3s ease);
275
280
  }
276
281
 
277
- @media (max-width: ${V.MOBILE_SIZE_PX+"px"}) {
282
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
278
283
  & img {
279
284
  width: 8.875rem;
280
285
  height: 8.875rem;
@@ -351,12 +356,12 @@
351
356
  font-size: 1rem;
352
357
  color: var(--warning-500, #F59E0B);
353
358
  }
354
- `,Ie=m.forwardRef(({sponsoredText:i="Sponsored"},C)=>e.jsxs(qe,{ref:C,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),Oe="Vehicles_Cars",Ve="Vehicles_Motorcycles",ze="Vehicles_Trucks",Be="Vehicles_AgriculturalMachines_Tractors",De="Vehicles_ConstructionMachines",Fe="Vehicles_Bus",Ge="Vehicles_Campers",Ue="RealEstates_",l={Mileage:{icon:"mng-lnc-road",measure:"km"},YearOfProduction:{icon:"mng-lnc-calendar",measure:""},Fuel:{icon:"mng-lnc-gas-station",measure:""},EnginePowerKW:{icon:"mng-lnc-engine",measure:"kW"},Transmission:{icon:"mng-lnc-transmission",measure:""},Model:{icon:"mng-lnc-application",measure:""},Brand:{icon:"mng-lnc-car--front",measure:""},SurfaceArea:{icon:"mng-lnc-right-angle",measure:""},Floor:{icon:"mng-lnc-elevator",measure:""},FurnishedCondition:{icon:"mng-lnc-sofa-01",measure:""},AdType:{icon:"mng-lnc-notes",measure:""},NumberOfRooms:{icon:"mng-lnc-meeting-room",measure:""},HeatingType:{icon:"mng-lnc-heat",measure:""},AirConditioning:{icon:"mng-lnc-air-conditioner",measure:""},Type:{icon:"mng-lnc-house-building",measure:""},Parking:{icon:"mng-lnc-parking-area-circle",measure:""},Internet:{icon:"mng-lnc-wifi-02",measure:""},State:{icon:"mng-lnc-settings-1",measure:""},NumberOfPremises:{icon:"mng-lnc-meeting-room",measure:""},Pool:{icon:"mng-lnc-pool",measure:""},Approach:{icon:"mng-lnc-driveway",measure:""},NumberOfBeds:{icon:"mng-lnc-bed",measure:""},Kitchen:{icon:"mng-lnc-fridge",measure:""},BathroomToilet:{icon:"mng-lnc-bath",measure:""},default:{icon:" mng-lnc-clock--filled",measure:""}},O={ADDDISCOUNT:" mng-lnc-percentage",URGENT:" mng-lnc-flash",FREEQUANTITY:" mng-lnc-3d-software",INCLUDEGIFTS:" mng-lnc-gift",FREESHIPPING:" mng-lnc-delivery--parcel"},Me=m.forwardRef((i,C)=>{const{uuid:h,sellerUuid:$,name:K,price:P=0,sellingPrice:v,currency:x,isNegotiable:y,isFree:R,imageUrl:Q,location:J,sponsored:ee,imageComponent:z,freeText:re="Free",negotiableText:oe="Negotiable",tags:t=[],categoryCode:_,categoryName:ne,condition:B,quantity:E,trade:D,sponsoredText:te,forCart:ie,forOrder:ae,contactSeller:se,hasVariants:le,hasQuantities:ce,status:de,onBookmark:W=()=>{},actionComponent:j,bookmarked:F,bookmarkLists:me,metadata:b,sellerName:G,nameSlug:N,onSelectCard:he=()=>{},activeSalesPackages:q,urgentText:ue="Urgent",LinkComponent:U}=i,ge=U||"a",I=Ne.useDetectMobile(),pe=()=>{var d;if(!a.isDefined(j))return e.jsx(e.Fragment,{});const r=j,n=(d=j==null?void 0:j.props)==null?void 0:d.children,s=m.cloneElement(n,{key:`bookmark_pr__${F}`,bookmarked:F,productUuid:h,onAddToBookmark:()=>W(!0,h),onRemoveFromBookmark:()=>W(!1,h),bookmarkedUuidList:me,sellerUuid:$,handleBookmarking:W,forCart:ie,forOrder:ae,contactSeller:se,hasVariants:le,status:de,quantity:E,hasQuantities:ce,productBasicInfo:{uuid:h,price:P,sellingPrice:v,categoryCode:_,categoryName:ne,currency:x,isNegotiable:y,isFree:R}});return m.cloneElement(r,void 0,s)},M=[Oe,Ve,ze,Be,De,Fe,Ge,Ue].some(r=>_==null?void 0:_.includes(r)),[fe,T]=m.useState(!1),be=()=>{T(!0)},we=()=>{T(!1)},c=m.useRef(null),p=m.useRef([]),[ve,X]=m.useState(t==null?void 0:t.length),xe=()=>{var d,w,S;if(!(c!=null&&c.current)||((d=p==null?void 0:p.current)==null?void 0:d.length)===0)return;if(I){X(t==null?void 0:t.length);return}const r=(w=c==null?void 0:c.current)==null?void 0:w.offsetWidth;let n=0,s=0;for(let u=0;u<(t==null?void 0:t.length);u++){const f=((S=p==null?void 0:p.current[u])==null?void 0:S.offsetWidth)||0,g=n+f+4;if(g<=r)n+=g,s++;else break}X(s)};m.useEffect(()=>{const r=c==null?void 0:c.current;if(!r)return;const n=new ResizeObserver(()=>{xe()});return n.observe(r),()=>{n.disconnect()}},[t,I]);const je=()=>{var r;return e.jsx("div",{className:"tags-popover__trigger",children:(r=t==null?void 0:t.slice(0,ve))==null?void 0:r.map((n,s)=>{var f,g,Y,Z,H;const d=((f=l==null?void 0:l[n==null?void 0:n.code])==null?void 0:f.icon)??((g=l==null?void 0:l.default)==null?void 0:g.icon)??"",w=((Y=n==null?void 0:n.measurementUnit)==null?void 0:Y.symbol)??((Z=l==null?void 0:l[n==null?void 0:n.code])==null?void 0:Z.measure)??"",u=[(n==null?void 0:n.value)??((H=n==null?void 0:n.multiOptions)==null?void 0:H[0])??"",w].filter(Boolean).join(" ");return e.jsxs(L,{ref:Ce=>p.current[s]=Ce,className:"tag",children:[e.jsx("i",{className:d}),u]},`detailed-products-section-tag__${s+1}`)})})},Se=()=>e.jsx("div",{className:"tags-popover__content",children:t==null?void 0:t.map((r,n)=>{var u,f,g;const s=((u=r==null?void 0:r.measurementUnit)==null?void 0:u.symbol)??((f=l==null?void 0:l[r==null?void 0:r.code])==null?void 0:f.measure)??"",w=[(r==null?void 0:r.value)??((g=r==null?void 0:r.multiOptions)==null?void 0:g[0])??"",s].filter(Boolean).join(" "),S=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${S}: `}),e.jsx("span",{className:"tags-popover__value",children:w})]},`detailed-products-section-tag-dropdown__${n+1}`)})}),ke=()=>e.jsxs(e.Fragment,{children:[B&&e.jsx(L,{className:"tag",children:B},"detailed-products-section-tag__condition"),E&&e.jsx(L,{className:"tag",children:E},"detailed-products-section-tag__quantity"),D&&e.jsx(L,{className:"tag",children:D},"detailed-products-section-tag__trade")]}),A=P>0&&x&&y!==!0&&R!==!0&&P!==v;return e.jsxs($e,{ref:c,className:"product-card","data-accessor":b==null?void 0:b.accessor,name:b==null?void 0:b.name,onClick:r=>he(r,c),as:ge,...U?{to:`/product/${a.isDefinedNotEmptyString(N)?`${N}-`:""}${h}`}:{href:`/product/${a.isDefinedNotEmptyString(N)?`${N}-`:""}${h}`},children:[e.jsxs(Ee,{className:"product-image-wrapper",children:[e.jsx("div",{onClick:r=>{r==null||r.preventDefault(),r==null||r.stopPropagation()},children:e.jsx(pe,{})}),a.isDefined(z)?z:e.jsx(Pe.ProductImageWrapper,{src:Q})]}),q&&q.length>0&&e.jsx("div",{className:"campaign-badges",children:q.map((r,n)=>{var s,d;return e.jsxs("div",{className:`campaign-badge campaign-badge-${(s=r==null?void 0:r.salesPackageCode)==null?void 0:s.toLowerCase()}`,children:[(r==null?void 0:r.salesPackageCode)!=="Urgent"&&e.jsx(Le,{icon:O==null?void 0:O[(d=r==null?void 0:r.salesPackageCode)==null?void 0:d.toUpperCase()],sizeInUnits:"1rem"}),(r==null?void 0:r.salesPackageCode)==="Urgent"&&e.jsxs(e.Fragment,{children:[" ",ue]})]},n)})}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:G,children:G}),e.jsx("div",{className:"card-title",children:K})]}),e.jsxs("div",{className:"wrapper-card-3",onClick:r=>{r==null||r.preventDefault(),r==null||r.stopPropagation()},children:[M&&e.jsx("div",{...I?{}:{onMouseEnter:be,onMouseLeave:we},children:e.jsxs(ye,{placement:"bottom",open:fe,children:[e.jsx(Re,{children:je()}),e.jsx(_e,{style:{all:"unset"},children:e.jsx(We,{children:Se()})})]})}),!M&&ke()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${A?"new-price":""}`,children:[v>0&&x&&y!==!0&&R!==!0&&e.jsx("div",{children:`${a.formatPrice(v)} ${a.GetCurrencySymbol(x)}`}),A&&e.jsx("div",{className:`${v>0?"full-price":""}`,children:`${a.formatPrice(P)} ${a.GetCurrencySymbol(x)}`}),y&&oe,R&&re]}),e.jsx("div",{className:"location-text",children:J})]}),ee===!0&&e.jsx(Ie,{sponsoredText:te})]})}),Te=k.styled(o.SkeletonRowWrapper)`
355
- @media (max-width: ${V.MOBILE_SIZE_PX+"px"}) {
359
+ `,Ie=m.forwardRef(({sponsoredText:i="Sponsored"},C)=>e.jsxs(qe,{ref:C,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),Oe="Vehicles_Cars",De="Vehicles_Motorcycles",Ve="Vehicles_Trucks",ze="Vehicles_AgriculturalMachines_Tractors",Be="Vehicles_ConstructionMachines",Fe="Vehicles_Bus",Ge="Vehicles_Campers",Ue="RealEstates_",l={Mileage:{icon:"mng-lnc-road",measure:"km"},YearOfProduction:{icon:"mng-lnc-calendar",measure:""},Fuel:{icon:"mng-lnc-gas-station",measure:""},EnginePowerKW:{icon:"mng-lnc-engine",measure:"kW"},Transmission:{icon:"mng-lnc-transmission",measure:""},Model:{icon:"mng-lnc-application",measure:""},Brand:{icon:"mng-lnc-car--front",measure:""},SurfaceArea:{icon:"mng-lnc-right-angle",measure:""},Floor:{icon:"mng-lnc-elevator",measure:""},FurnishedCondition:{icon:"mng-lnc-sofa-01",measure:""},AdType:{icon:"mng-lnc-notes",measure:""},NumberOfRooms:{icon:"mng-lnc-meeting-room",measure:""},HeatingType:{icon:"mng-lnc-heat",measure:""},AirConditioning:{icon:"mng-lnc-air-conditioner",measure:""},Type:{icon:"mng-lnc-house-building",measure:""},Parking:{icon:"mng-lnc-parking-area-circle",measure:""},Internet:{icon:"mng-lnc-wifi-02",measure:""},State:{icon:"mng-lnc-settings-1",measure:""},NumberOfPremises:{icon:"mng-lnc-meeting-room",measure:""},Pool:{icon:"mng-lnc-pool",measure:""},Approach:{icon:"mng-lnc-driveway",measure:""},NumberOfBeds:{icon:"mng-lnc-bed",measure:""},Kitchen:{icon:"mng-lnc-fridge",measure:""},BathroomToilet:{icon:"mng-lnc-bath",measure:""},default:{icon:" mng-lnc-clock--filled",measure:""}},O={ADDDISCOUNT:" mng-lnc-percentage",URGENT:" mng-lnc-flash",FREEQUANTITY:" mng-lnc-3d-software",INCLUDEGIFTS:" mng-lnc-gift",FREESHIPPING:" mng-lnc-delivery--parcel"},Me=m.forwardRef((i,C)=>{const{uuid:h,sellerUuid:$,name:K,price:P=0,sellingPrice:x,currency:j,isNegotiable:y,isFree:R,imageUrl:Q,location:J,sponsored:ee,imageComponent:V,freeText:re="Free",negotiableText:ne="Negotiable",tags:t=[],categoryCode:_,categoryName:oe,condition:z,quantity:E,trade:B,sponsoredText:te,forCart:ie,forOrder:ae,contactSeller:se,hasVariants:le,hasQuantities:ce,status:de,onBookmark:W=()=>{},actionComponent:b,bookmarked:F,bookmarkLists:me,metadata:w,sellerName:G,nameSlug:N,onSelectCard:he=()=>{},activeSalesPackages:q,urgentText:ue="Urgent",LinkComponent:U}=i,ge=U||"a",I=Ne.useDetectMobile(),pe=()=>{var d;if(!a.isDefined(b))return e.jsx(e.Fragment,{});const r=b,o=(d=b==null?void 0:b.props)==null?void 0:d.children,s=m.cloneElement(o,{key:`bookmark_pr__${F}`,bookmarked:F,productUuid:h,onAddToBookmark:()=>W(!0,h),onRemoveFromBookmark:()=>W(!1,h),bookmarkedUuidList:me,sellerUuid:$,handleBookmarking:W,forCart:ie,forOrder:ae,contactSeller:se,hasVariants:le,status:de,quantity:E,hasQuantities:ce,productBasicInfo:{uuid:h,price:P,sellingPrice:x,categoryCode:_,categoryName:oe,currency:j,isNegotiable:y,isFree:R}});return m.cloneElement(r,void 0,s)},M=[Oe,De,Ve,ze,Be,Fe,Ge,Ue].some(r=>_==null?void 0:_.includes(r)),[fe,T]=m.useState(!1),be=()=>{T(!0)},we=()=>{T(!1)},c=m.useRef(null),p=m.useRef([]),[ve,X]=m.useState(t==null?void 0:t.length),xe=()=>{var d,v,S;if(!(c!=null&&c.current)||((d=p==null?void 0:p.current)==null?void 0:d.length)===0)return;if(I){X(t==null?void 0:t.length);return}const r=(v=c==null?void 0:c.current)==null?void 0:v.offsetWidth;let o=0,s=0;for(let u=0;u<(t==null?void 0:t.length);u++){const f=((S=p==null?void 0:p.current[u])==null?void 0:S.offsetWidth)||0,g=o+f+4;if(g<=r)o+=g,s++;else break}X(s)};m.useEffect(()=>{const r=c==null?void 0:c.current;if(!r)return;const o=new ResizeObserver(()=>{xe()});return o.observe(r),()=>{o.disconnect()}},[t,I]);const je=()=>{var r;return e.jsx("div",{className:"tags-popover__trigger",children:(r=t==null?void 0:t.slice(0,ve))==null?void 0:r.map((o,s)=>{var f,g,Y,Z,H;const d=((f=l==null?void 0:l[o==null?void 0:o.code])==null?void 0:f.icon)??((g=l==null?void 0:l.default)==null?void 0:g.icon)??"",v=((Y=o==null?void 0:o.measurementUnit)==null?void 0:Y.symbol)??((Z=l==null?void 0:l[o==null?void 0:o.code])==null?void 0:Z.measure)??"",u=[(o==null?void 0:o.value)??((H=o==null?void 0:o.multiOptions)==null?void 0:H[0])??"",v].filter(Boolean).join(" ");return e.jsxs(L,{ref:Ce=>p.current[s]=Ce,className:"tag",children:[e.jsx("i",{className:d}),u]},`detailed-products-section-tag__${s+1}`)})})},Se=()=>e.jsx("div",{className:"tags-popover__content",children:t==null?void 0:t.map((r,o)=>{var u,f,g;const s=((u=r==null?void 0:r.measurementUnit)==null?void 0:u.symbol)??((f=l==null?void 0:l[r==null?void 0:r.code])==null?void 0:f.measure)??"",v=[(r==null?void 0:r.value)??((g=r==null?void 0:r.multiOptions)==null?void 0:g[0])??"",s].filter(Boolean).join(" "),S=r==null?void 0:r.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${S}: `}),e.jsx("span",{className:"tags-popover__value",children:v})]},`detailed-products-section-tag-dropdown__${o+1}`)})}),ke=()=>e.jsxs(e.Fragment,{children:[z&&e.jsx(L,{className:"tag",children:z},"detailed-products-section-tag__condition"),E&&e.jsx(L,{className:"tag",children:E},"detailed-products-section-tag__quantity"),B&&e.jsx(L,{className:"tag",children:B},"detailed-products-section-tag__trade")]}),A=P>0&&j&&y!==!0&&R!==!0&&P!==x;return e.jsxs($e,{ref:c,className:"product-card","data-accessor":w==null?void 0:w.accessor,name:w==null?void 0:w.name,onClick:r=>he(r,c),as:ge,...U?{to:`/product/${a.isDefinedNotEmptyString(N)?`${N}-`:""}${h}`}:{href:`/product/${a.isDefinedNotEmptyString(N)?`${N}-`:""}${h}`},children:[e.jsxs(Ee,{className:"product-image-wrapper",children:[a.isDefined(b)&&e.jsx("div",{className:"prevent-el",onClick:r=>{r==null||r.preventDefault(),r==null||r.stopPropagation()},children:e.jsx(pe,{})}),a.isDefined(V)?V:e.jsx(Pe.ProductImageWrapper,{src:Q})]}),q&&q.length>0&&e.jsx("div",{className:"campaign-badges",children:q.map((r,o)=>{var s,d;return e.jsxs("div",{className:`campaign-badge campaign-badge-${(s=r==null?void 0:r.salesPackageCode)==null?void 0:s.toLowerCase()}`,children:[(r==null?void 0:r.salesPackageCode)!=="Urgent"&&e.jsx(Le,{icon:O==null?void 0:O[(d=r==null?void 0:r.salesPackageCode)==null?void 0:d.toUpperCase()],sizeInUnits:"1rem"}),(r==null?void 0:r.salesPackageCode)==="Urgent"&&e.jsxs(e.Fragment,{children:[" ",ue]})]},o)})}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:G,children:G}),e.jsx("div",{className:"card-title",children:K})]}),e.jsxs("div",{className:"wrapper-card-3",onClick:r=>{r==null||r.preventDefault(),r==null||r.stopPropagation()},children:[M&&e.jsx("div",{...I?{}:{onMouseEnter:be,onMouseLeave:we},children:e.jsxs(ye,{placement:"bottom",open:fe,children:[e.jsx(Re,{children:je()}),e.jsx(_e,{style:{all:"unset"},children:e.jsx(We,{children:Se()})})]})}),!M&&ke()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${A?"new-price":""}`,children:[x>0&&j&&y!==!0&&R!==!0&&e.jsx("div",{children:`${a.formatPrice(x)} ${a.GetCurrencySymbol(j)}`}),A&&e.jsx("div",{className:`${x>0?"full-price":""}`,children:`${a.formatPrice(P)} ${a.GetCurrencySymbol(j)}`}),y&&ne,R&&re]}),e.jsx("div",{className:"location-text",children:J})]}),ee===!0&&e.jsx(Ie,{sponsoredText:te})]})}),Te=k.styled(n.SkeletonRowWrapper)`
360
+ @media (max-width: ${D.MOBILE_SIZE_PX+"px"}) {
356
361
  & > div {
357
362
  &:nth-of-type(even) {
358
363
  display: none;
359
364
  }
360
365
  }
361
366
  }
362
- `,Xe=({keyPrefix:i})=>e.jsxs(Te,{children:[e.jsxs(o.SkeletonColumnWrapper,{gap:"0.5rem",children:[e.jsx(o.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(o.SkeletonColumnWrapper,{height:"1rem",children:e.jsx(o.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"})}),e.jsxs(o.SkeletonRowWrapper,{gap:"0.5rem",children:[e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(o.SkeletonColumnWrapper,{height:"2rem",children:e.jsx(o.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})})]},`${i}-1`),e.jsxs(o.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(o.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(o.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(o.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-2`),e.jsxs(o.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(o.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(o.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(o.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-3`),e.jsxs(o.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(o.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(o.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(o.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-4`),e.jsxs(o.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(o.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(o.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(o.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-5`),e.jsxs(o.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(o.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(o.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(o.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(o.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-6`)]}),Ae=({keyPrefix:i,isLoading:C=!1,fallbackComponent:h=e.jsx(e.Fragment,{}),children:$})=>e.jsx(m.Suspense,{fallbackComponent:h,children:C===!0?e.jsx(Xe,{keyPrefix:i}):$});exports.DetailedProductCard=Me;exports.SuspenseDetailedProductCard=Ae;
367
+ `,Xe=({keyPrefix:i})=>e.jsxs(Te,{children:[e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonColumnWrapper,{height:"1rem",children:e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"})}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonColumnWrapper,{height:"2rem",children:e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})})]},`${i}-1`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-2`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-3`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-4`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-5`),e.jsxs(n.SkeletonColumnWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonSquarePlaceholder,{height:"100%",width:"100%",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1rem",borderRadius:"0.75rem"}),e.jsxs(n.SkeletonRowWrapper,{gap:"0.5rem",noGradient:!0,children:[e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"}),e.jsx(n.SkeletonLinePlaceholder,{height:"1.5rem",borderRadius:"0.75rem"})]}),e.jsx(n.SkeletonLinePlaceholder,{height:"2rem",borderRadius:"0.75rem"})]},`${i}-6`)]}),Ae=({keyPrefix:i,isLoading:C=!1,fallbackComponent:h=e.jsx(e.Fragment,{}),children:$})=>e.jsx(m.Suspense,{fallbackComponent:h,children:C===!0?e.jsx(Xe,{keyPrefix:i}):$});exports.DetailedProductCard=Me;exports.SuspenseDetailedProductCard=Ae;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.191",
3
+ "version": "4.0.193",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [