@lanaco/lnc-react-ui 4.0.171 → 4.0.173

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"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),M=require("./consts-goSZX3xP.cjs"),B=require("./IconButton.cjs"),E=require("./Button.cjs"),r=require("./utils-Dl9xPH4c.cjs"),I=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-DFyV_EK2.cjs"),L=P.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),a=require("react"),M=require("./emotion-styled.browser.esm-BtEseadx.cjs"),B=require("./consts-goSZX3xP.cjs"),E=require("./IconButton.cjs"),I=require("./Button.cjs"),r=require("./utils-Dl9xPH4c.cjs"),L=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./index-CsEmnNEh.cjs"),T=M.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: ${M.MOBILE_SIZE_PX+"px"}) {
50
+ @media (max-width: ${B.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
- `,T=a.memo(g.DetailedProductCard),z=a.forwardRef((n,p)=>{const{title:l,icon:c,items:o,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:w=()=>{},onButtonAction:y=()=>{},getImage:_=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:h,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:C,onBookmark:N=()=>{},bookmarkComponent:S,componentName:j}=n,u=I.useDetectMobile(),q=a.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,D)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:D}),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:h,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:f,children:[t.jsxs("div",{className:"section__heading",children:[r.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[r.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&r.isDefinedNotEmptyString(d)&&r.isDefinedNotEmptyString(m)&&!s&&t.jsx(E,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var i;(i=e==null?void 0:e.target)==null||i.blur(),y(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:q})}),!u&&!s&&t.jsx(B,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:w})]})});module.exports=z;
73
+ `,z=a.memo(g.DetailedProductCard),R=a.forwardRef((n,p)=>{const{title:l,icon:c,items:o,limit:f=4,isLoading:s=!1,onSelectCard:b=()=>{},onLoadMore:h=()=>{},onButtonAction:w=()=>{},getImage:y=()=>{},viewAllbuttonLink:d,viewAllButonText:m="View all",negotiableText:_,freeText:k,loadMoreButtonIcon:v="angle-down",sponsoredText:C,onBookmark:N=()=>{},bookmarkComponent:S,componentName:j,hasNextPage:q=!1}=n,u=L.useDetectMobile(),P=a.useMemo(()=>o==null?void 0:o.map((e,i)=>t.jsx(z,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(U,D)=>b({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:D}),imageUrl:y(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:_,freeText:k,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,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(T,{ref:p,limit:f,children:[t.jsxs("div",{className:"section__heading",children:[r.isDefinedNotEmptyString(l)&&t.jsxs("div",{className:"section__title",children:[r.isDefinedNotEmptyString(c)&&t.jsx("i",{className:c})," ",l]}),u&&r.isDefinedNotEmptyString(d)&&r.isDefinedNotEmptyString(m)&&!s&&t.jsx(I,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var i;(i=e==null?void 0:e.target)==null||i.blur(),w(d)},borderRadius:"curved",className:"section__view-all",children:m})]}),t.jsx(g.SuspenseDetailedProductCard,{isLoading:s,keyPrefix:"detailed-product-card-skeleton",children:t.jsx("div",{className:"section__items",children:P})}),!u&&!s&&q&&t.jsx(E,{icon:v,borderRadius:"curved",btnType:"basic",color:"neutral",className:"section__show-more",onClick:h})]})});module.exports=R;
@@ -1,13 +1,13 @@
1
1
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
- import { memo as B, forwardRef as D, useMemo as I } from "react";
3
- import { s as L } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as T } from "./consts-BuFChS64.js";
5
- import z from "./IconButton.js";
6
- import E from "./Button.js";
2
+ import { memo as D, forwardRef as I, useMemo as L } from "react";
3
+ import { s as T } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as z } from "./consts-BuFChS64.js";
5
+ import E from "./IconButton.js";
6
+ import U from "./Button.js";
7
7
  import { k as i } from "./utils-DHfRApMf.js";
8
- import { u as U } from "./useDetectMobile-Bkvj0VMa.js";
9
- import { D as $, S as j } from "./index-BhBRZf4M.js";
10
- const A = L.div`
8
+ import { u as $ } from "./useDetectMobile-Bkvj0VMa.js";
9
+ import { D as j, S as A } from "./index-G6ucyCg3.js";
10
+ const F = T.div`
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  gap: 1.5rem;
@@ -56,7 +56,7 @@ const A = L.div`
56
56
  white-space: nowrap;
57
57
  }
58
58
 
59
- @media (max-width: ${T + "px"}) {
59
+ @media (max-width: ${z + "px"}) {
60
60
  gap: 1.25rem;
61
61
 
62
62
  & .section__items {
@@ -79,7 +79,7 @@ const A = L.div`
79
79
  }
80
80
  }
81
81
  }
82
- `, F = B($), Q = D((a, p) => {
82
+ `, O = D(j), W = I((a, p) => {
83
83
  const {
84
84
  title: l,
85
85
  icon: c,
@@ -103,9 +103,10 @@ const A = L.div`
103
103
  onBookmark: C = () => {
104
104
  },
105
105
  bookmarkComponent: N,
106
- componentName: S
107
- } = a, u = U(), P = I(() => t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ o(
108
- F,
106
+ componentName: S,
107
+ hasNextPage: P = !1
108
+ } = a, u = $(), M = L(() => t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ o(
109
+ O,
109
110
  {
110
111
  name: e == null ? void 0 : e.name,
111
112
  price: e == null ? void 0 : e.price,
@@ -116,7 +117,7 @@ const A = L.div`
116
117
  uuid: e == null ? void 0 : e.uuid,
117
118
  sponsored: e == null ? void 0 : e.sponsored,
118
119
  imageComponent: e == null ? void 0 : e.imageComponent,
119
- onSelectCard: (O, M) => g({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: M }),
120
+ onSelectCard: (R, B) => g({ uuid: e == null ? void 0 : e.uuid, nameSlug: e == null ? void 0 : e.nameSlug, cardRef: B }),
120
121
  imageUrl: w(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid) || null,
121
122
  isFree: e == null ? void 0 : e.isFree,
122
123
  isNegotiable: e == null ? void 0 : e.isNegotiable,
@@ -141,7 +142,7 @@ const A = L.div`
141
142
  },
142
143
  r
143
144
  )), [t]);
144
- return /* @__PURE__ */ s(A, { ref: p, limit: f, children: [
145
+ return /* @__PURE__ */ s(F, { ref: p, limit: f, children: [
145
146
  /* @__PURE__ */ s("div", { className: "section__heading", children: [
146
147
  i(l) && /* @__PURE__ */ s("div", { className: "section__title", children: [
147
148
  i(c) && /* @__PURE__ */ o("i", { className: c }),
@@ -149,7 +150,7 @@ const A = L.div`
149
150
  l
150
151
  ] }),
151
152
  u && i(m) && i(d) && !n && /* @__PURE__ */ o(
152
- E,
153
+ U,
153
154
  {
154
155
  type: "button",
155
156
  btnType: "tinted",
@@ -165,15 +166,15 @@ const A = L.div`
165
166
  )
166
167
  ] }),
167
168
  /* @__PURE__ */ o(
168
- j,
169
+ A,
169
170
  {
170
171
  isLoading: n,
171
172
  keyPrefix: "detailed-product-card-skeleton",
172
- children: /* @__PURE__ */ o("div", { className: "section__items", children: P })
173
+ children: /* @__PURE__ */ o("div", { className: "section__items", children: M })
173
174
  }
174
175
  ),
175
- !u && !n && /* @__PURE__ */ o(
176
- z,
176
+ !u && !n && P && /* @__PURE__ */ o(
177
+ E,
177
178
  {
178
179
  icon: y,
179
180
  borderRadius: "curved",
@@ -186,5 +187,5 @@ const A = L.div`
186
187
  ] });
187
188
  });
188
189
  export {
189
- Q as default
190
+ W as default
190
191
  };
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("react/jsx-runtime"),c=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),F=require("./Button.cjs"),l=require("./utils-Dl9xPH4c.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-Db3VFbfP.cjs"),w=require("./index-DFyV_EK2.cjs"),I=require("./index-BvQx3xAm.cjs"),_=T.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),F=require("./Button.cjs"),l=require("./utils-Dl9xPH4c.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-Db3VFbfP.cjs"),w=require("./index-CsEmnNEh.cjs"),I=require("./index-BvQx3xAm.cjs"),_=T.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${n=>`repeat(${n.limit}, minmax(0, 1fr))`};
4
4
  gap: 1.25rem;
@@ -6,7 +6,7 @@ import R from "./Button.js";
6
6
  import { k as m } from "./utils-DHfRApMf.js";
7
7
  import { u as W } from "./useDetectMobile-Bkvj0VMa.js";
8
8
  import { T as $ } from "./style-D3pIrH3v.js";
9
- import { D as j, S as z } from "./index-BhBRZf4M.js";
9
+ import { D as j, S as z } from "./index-G6ucyCg3.js";
10
10
  import { S as A } from "./index-BMOLVn8O.js";
11
11
  const K = I.div`
12
12
  display: grid;
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("react/jsx-runtime"),s=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),$=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./Button.cjs"),N=require("./index-DFyV_EK2.cjs"),F=_.styled.div`
1
+ "use strict";const o=require("react/jsx-runtime"),s=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-goSZX3xP.cjs"),$=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./Button.cjs"),N=require("./index-CsEmnNEh.cjs"),F=_.styled.div`
2
2
  padding: 1.75rem 3rem;
3
3
  display: grid;
4
4
  grid-template-columns: ${a=>`repeat(${a.limit||5}, minmax(0, 1fr))`};
@@ -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 "./index-BhBRZf4M.js";
7
+ import { D as z, S as A } from "./index-G6ucyCg3.js";
8
8
  const G = q.div`
9
9
  padding: 1.75rem 3rem;
10
10
  display: grid;
@@ -230,6 +230,8 @@
230
230
 
231
231
  & .bookmarking-btn {
232
232
  display: flex;
233
+ bottom: 0.5rem;
234
+ top: unset;
233
235
  }
234
236
  }
235
237
  `,Se=k.styled.div`
@@ -294,7 +296,7 @@
294
296
  font-size: 1rem;
295
297
  color: var(--warning-500, #F59E0B);
296
298
  }
297
- `,Pe=c.forwardRef(({sponsoredText:i="Sponsored"},x)=>e.jsxs(ye,{ref:x,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),_e="Vehicles_Cars",Ce="Vehicles_Motorcycles",Re="Vehicles_Trucks",Le="Vehicles_AgriculturalMachines_Tractors",Ne="Vehicles_ConstructionMachines",We="Vehicles_Bus",$e="Vehicles_Campers",Ee="RealEstates_",a={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:""}},Te=c.forwardRef((i,x)=>{const{uuid:w,sellerUuid:_,name:Y,price:C=0,sellingPrice:S,currency:y,isNegotiable:R,isFree:L,imageUrl:Z,location:K,sponsored:A,imageComponent:T,onSelectCard:H=()=>{},freeText:J="Free",negotiableText:Q="Negotiable",tags:t=[],categoryCode:N,condition:q,quantity:O,trade:V,sponsoredText:ee,forCart:re,forOrder:oe,contactSeller:ne,hasVariants:te,onBookmark:W=()=>{},bookmarkComponent:v,bookmarked:B,bookmarkLists:ie,metadata:f,sellerName:z}=i,$=je.useDetectMobile(),ae=()=>{var m;if(!l.isDefined(v))return e.jsx(e.Fragment,{});const o=v,n=(m=v==null?void 0:v.props)==null?void 0:m.children,d=c.cloneElement(n,{key:`bookmark_pr__${B}`,bookmarked:B,productUuid:w,onAddToBookmark:()=>W(!0,w),onRemoveFromBookmark:()=>W(!1,w),bookmarkedUuidList:ie,sellerUuid:_,handleBookmarking:W,forCart:re,forOrder:oe,contactSeller:ne,hasVariants:te});return c.cloneElement(o,void 0,d)},M=[_e,Ce,Re,Le,Ne,We,$e,Ee].some(o=>N==null?void 0:N.includes(o)),[se,F]=c.useState(!1),le=()=>{F(!0)},ce=()=>{F(!1)},s=c.useRef(null),u=c.useRef([]),[de,G]=c.useState(t==null?void 0:t.length),me=()=>{var m,b,j;if(!(s!=null&&s.current)||((m=u==null?void 0:u.current)==null?void 0:m.length)===0)return;if($){G(t==null?void 0:t.length);return}const o=(b=s==null?void 0:s.current)==null?void 0:b.offsetWidth;let n=0,d=0;for(let h=0;h<(t==null?void 0:t.length);h++){const g=((j=u==null?void 0:u.current[h])==null?void 0:j.offsetWidth)||0,p=n+g+4;if(p<=o)n+=p,d++;else break}G(d)};c.useEffect(()=>{const o=s==null?void 0:s.current;if(!o)return;const n=new ResizeObserver(()=>{me()});return n.observe(o),()=>{n.disconnect()}},[t,$]);const he=()=>{var o;return e.jsx("div",{className:"tags-popover__trigger",children:(o=t==null?void 0:t.slice(0,de))==null?void 0:o.map((n,d)=>{var g,p,D,U,X;const m=((g=a==null?void 0:a[n==null?void 0:n.code])==null?void 0:g.icon)??((p=a==null?void 0:a.default)==null?void 0:p.icon)??"",b=((D=n==null?void 0:n.measurementUnit)==null?void 0:D.symbol)??((U=a==null?void 0:a[n==null?void 0:n.code])==null?void 0:U.measure)??"",h=[(n==null?void 0:n.value)??((X=n==null?void 0:n.multiOptions)==null?void 0:X[0])??"",b].filter(Boolean).join(" ");return e.jsxs(P,{ref:ge=>u.current[d]=ge,className:"tag",children:[e.jsx("i",{className:m}),h]},`detailed-products-section-tag__${d+1}`)})})},pe=()=>e.jsx("div",{className:"tags-popover__content",children:t==null?void 0:t.map((o,n)=>{var h,g,p;const d=((h=o==null?void 0:o.measurementUnit)==null?void 0:h.symbol)??((g=a==null?void 0:a[o==null?void 0:o.code])==null?void 0:g.measure)??"",b=[(o==null?void 0:o.value)??((p=o==null?void 0:o.multiOptions)==null?void 0:p[0])??"",d].filter(Boolean).join(" "),j=o==null?void 0:o.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${j}: `}),e.jsx("span",{className:"tags-popover__value",children:b})]},`detailed-products-section-tag-dropdown__${n+1}`)})}),ue=()=>e.jsxs(e.Fragment,{children:[q&&e.jsx(P,{className:"tag",children:q},"detailed-products-section-tag__condition"),O&&e.jsx(P,{className:"tag",children:O},"detailed-products-section-tag__quantity"),V&&e.jsx(P,{className:"tag",children:V},"detailed-products-section-tag__trade")]}),I=C>0&&y&&R!==!0&&L!==!0&&C!==S;return e.jsxs(ke,{ref:s,className:"product-card","data-accessor":f==null?void 0:f.accessor,name:f==null?void 0:f.name,onClick:o=>H(o,s),children:[e.jsxs(xe,{className:"product-image-wrapper",children:[e.jsx(ae,{}),l.isDefined(T)?T:e.jsx(fe.ProductImageWrapper,{src:Z})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:z,children:z}),e.jsx("div",{className:"card-title",children:Y})]}),e.jsxs("div",{className:"wrapper-card-3",children:[M&&e.jsx("div",{...$?{}:{onMouseEnter:le,onMouseLeave:ce},children:e.jsxs(be,{placement:"bottom",open:se,children:[e.jsx(we,{children:he()}),e.jsx(ve,{style:{all:"unset"},children:e.jsx(Se,{children:pe()})})]})}),!M&&ue()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${I?"new-price":""}`,children:[S>0&&y&&R!==!0&&L!==!0&&e.jsx("div",{children:`${l.formatPrice(S)} ${l.GetCurrencySymbol(y)}`}),I&&e.jsx("div",{className:`${S>0?"full-price":""}`,children:`${l.formatPrice(C)} ${l.GetCurrencySymbol(y)}`}),R&&Q,L&&J]}),e.jsx("div",{className:"location-text",children:K})]}),A===!0&&e.jsx(Pe,{sponsoredText:ee})]})}),qe=k.styled(r.SkeletonRowWrapper)`
299
+ `,Pe=c.forwardRef(({sponsoredText:i="Sponsored"},x)=>e.jsxs(ye,{ref:x,className:"sponsored-line",children:[e.jsx("i",{className:"mng-lnc-paw2"}),e.jsx("span",{children:i})]})),_e="Vehicles_Cars",Ce="Vehicles_Motorcycles",Re="Vehicles_Trucks",Le="Vehicles_AgriculturalMachines_Tractors",Ne="Vehicles_ConstructionMachines",We="Vehicles_Bus",$e="Vehicles_Campers",Ee="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:""}},Te=c.forwardRef((i,x)=>{const{uuid:w,sellerUuid:_,name:Y,price:C=0,sellingPrice:S,currency:y,isNegotiable:R,isFree:L,imageUrl:Z,location:K,sponsored:A,imageComponent:T,onSelectCard:H=()=>{},freeText:J="Free",negotiableText:Q="Negotiable",tags:t=[],categoryCode:N,condition:q,quantity:O,trade:V,sponsoredText:ee,forCart:re,forOrder:oe,contactSeller:ne,hasVariants:te,onBookmark:W=()=>{},bookmarkComponent:v,bookmarked:B,bookmarkLists:ie,metadata:f,sellerName:z}=i,$=je.useDetectMobile(),se=()=>{var m;if(!l.isDefined(v))return e.jsx(e.Fragment,{});const o=v,n=(m=v==null?void 0:v.props)==null?void 0:m.children,d=c.cloneElement(n,{key:`bookmark_pr__${B}`,bookmarked:B,productUuid:w,onAddToBookmark:()=>W(!0,w),onRemoveFromBookmark:()=>W(!1,w),bookmarkedUuidList:ie,sellerUuid:_,handleBookmarking:W,forCart:re,forOrder:oe,contactSeller:ne,hasVariants:te});return c.cloneElement(o,void 0,d)},M=[_e,Ce,Re,Le,Ne,We,$e,Ee].some(o=>N==null?void 0:N.includes(o)),[ae,F]=c.useState(!1),le=()=>{F(!0)},ce=()=>{F(!1)},a=c.useRef(null),u=c.useRef([]),[de,G]=c.useState(t==null?void 0:t.length),me=()=>{var m,b,j;if(!(a!=null&&a.current)||((m=u==null?void 0:u.current)==null?void 0:m.length)===0)return;if($){G(t==null?void 0:t.length);return}const o=(b=a==null?void 0:a.current)==null?void 0:b.offsetWidth;let n=0,d=0;for(let h=0;h<(t==null?void 0:t.length);h++){const g=((j=u==null?void 0:u.current[h])==null?void 0:j.offsetWidth)||0,p=n+g+4;if(p<=o)n+=p,d++;else break}G(d)};c.useEffect(()=>{const o=a==null?void 0:a.current;if(!o)return;const n=new ResizeObserver(()=>{me()});return n.observe(o),()=>{n.disconnect()}},[t,$]);const he=()=>{var o;return e.jsx("div",{className:"tags-popover__trigger",children:(o=t==null?void 0:t.slice(0,de))==null?void 0:o.map((n,d)=>{var g,p,D,U,X;const m=((g=s==null?void 0:s[n==null?void 0:n.code])==null?void 0:g.icon)??((p=s==null?void 0:s.default)==null?void 0:p.icon)??"",b=((D=n==null?void 0:n.measurementUnit)==null?void 0:D.symbol)??((U=s==null?void 0:s[n==null?void 0:n.code])==null?void 0:U.measure)??"",h=[(n==null?void 0:n.value)??((X=n==null?void 0:n.multiOptions)==null?void 0:X[0])??"",b].filter(Boolean).join(" ");return e.jsxs(P,{ref:ge=>u.current[d]=ge,className:"tag",children:[e.jsx("i",{className:m}),h]},`detailed-products-section-tag__${d+1}`)})})},pe=()=>e.jsx("div",{className:"tags-popover__content",children:t==null?void 0:t.map((o,n)=>{var h,g,p;const d=((h=o==null?void 0:o.measurementUnit)==null?void 0:h.symbol)??((g=s==null?void 0:s[o==null?void 0:o.code])==null?void 0:g.measure)??"",b=[(o==null?void 0:o.value)??((p=o==null?void 0:o.multiOptions)==null?void 0:p[0])??"",d].filter(Boolean).join(" "),j=o==null?void 0:o.name;return e.jsxs("div",{children:[e.jsx("span",{className:"tags-popover__name",children:`${j}: `}),e.jsx("span",{className:"tags-popover__value",children:b})]},`detailed-products-section-tag-dropdown__${n+1}`)})}),ue=()=>e.jsxs(e.Fragment,{children:[q&&e.jsx(P,{className:"tag",children:q},"detailed-products-section-tag__condition"),O&&e.jsx(P,{className:"tag",children:O},"detailed-products-section-tag__quantity"),V&&e.jsx(P,{className:"tag",children:V},"detailed-products-section-tag__trade")]}),I=C>0&&y&&R!==!0&&L!==!0&&C!==S;return e.jsxs(ke,{ref:a,className:"product-card","data-accessor":f==null?void 0:f.accessor,name:f==null?void 0:f.name,onClick:o=>H(o,a),children:[e.jsxs(xe,{className:"product-image-wrapper",children:[e.jsx(se,{}),l.isDefined(T)?T:e.jsx(fe.ProductImageWrapper,{src:Z})]}),e.jsxs("div",{className:"wrapper-card-1",children:[e.jsx("div",{className:"seller",title:z,children:z}),e.jsx("div",{className:"card-title",children:Y})]}),e.jsxs("div",{className:"wrapper-card-3",children:[M&&e.jsx("div",{...$?{}:{onMouseEnter:le,onMouseLeave:ce},children:e.jsxs(be,{placement:"bottom",open:ae,children:[e.jsx(we,{children:he()}),e.jsx(ve,{style:{all:"unset"},children:e.jsx(Se,{children:pe()})})]})}),!M&&ue()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${I?"new-price":""}`,children:[S>0&&y&&R!==!0&&L!==!0&&e.jsx("div",{children:`${l.formatPrice(S)} ${l.GetCurrencySymbol(y)}`}),I&&e.jsx("div",{className:`${S>0?"full-price":""}`,children:`${l.formatPrice(C)} ${l.GetCurrencySymbol(y)}`}),R&&Q,L&&J]}),e.jsx("div",{className:"location-text",children:K})]}),A===!0&&e.jsx(Pe,{sponsoredText:ee})]})}),qe=k.styled(r.SkeletonRowWrapper)`
298
300
  @media (max-width: ${E.MOBILE_SIZE_PX+"px"}) {
299
301
  & > div {
300
302
  &:nth-of-type(even) {
@@ -242,6 +242,8 @@ const Ge = C.div`
242
242
 
243
243
  & .bookmarking-btn {
244
244
  display: flex;
245
+ bottom: 0.5rem;
246
+ top: unset;
245
247
  }
246
248
  }
247
249
  `, Fe = C.div`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.171",
3
+ "version": "4.0.173",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [