@lanaco/lnc-react-ui 4.0.169 → 4.0.170
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DetailedProductsInfinitiveSection.cjs +1 -1
- package/dist/DetailedProductsInfinitiveSection.js +1 -1
- 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-CxiFuUOT.js → suspense-product-card-detailed-BU6DPCvJ.js} +0 -1
- package/dist/{suspense-product-card-detailed-IR4sh-l4.cjs → suspense-product-card-detailed-BbvQuPOP.cjs} +3 -4
- 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"),n=require("./utils-Dl9xPH4c.cjs"),E=require("./useDetectMobile-zkbzoOGV.cjs"),g=require("./suspense-product-card-detailed-
|
|
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-BbvQuPOP.cjs"),L=D.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.5rem;
|
|
@@ -6,7 +6,7 @@ import z from "./IconButton.js";
|
|
|
6
6
|
import E from "./Button.js";
|
|
7
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-BU6DPCvJ.js";
|
|
10
10
|
const A = L.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
@@ -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-BbvQuPOP.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-BU6DPCvJ.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-BbvQuPOP.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-BU6DPCvJ.js";
|
|
8
8
|
const G = q.div`
|
|
9
9
|
padding: 1.75rem 3rem;
|
|
10
10
|
display: grid;
|
|
@@ -214,7 +214,6 @@
|
|
|
214
214
|
|
|
215
215
|
display: none;
|
|
216
216
|
|
|
217
|
-
display: flex;
|
|
218
217
|
align-items: center;
|
|
219
218
|
justify-content: center;
|
|
220
219
|
|
|
@@ -265,7 +264,7 @@
|
|
|
265
264
|
display: flex;
|
|
266
265
|
}
|
|
267
266
|
}
|
|
268
|
-
`,
|
|
267
|
+
`,je=N.styled.div`
|
|
269
268
|
background: var(--white, #fff);
|
|
270
269
|
z-index: 1;
|
|
271
270
|
|
|
@@ -315,7 +314,7 @@
|
|
|
315
314
|
color: var(--gray-950, #14161a);
|
|
316
315
|
}
|
|
317
316
|
}
|
|
318
|
-
`,
|
|
317
|
+
`,xe=N.styled.div`
|
|
319
318
|
display: flex;
|
|
320
319
|
align-items: center;
|
|
321
320
|
gap: 0.25rem;
|
|
@@ -327,4 +326,4 @@
|
|
|
327
326
|
font-size: 1rem;
|
|
328
327
|
color: var(--warning-500, #F59E0B);
|
|
329
328
|
}
|
|
330
|
-
`,_e=a.forwardRef(({sponsoredText:c="Sponsored"},f)=>e.jsxs(
|
|
329
|
+
`,_e=a.forwardRef(({sponsoredText:c="Sponsored"},f)=>e.jsxs(xe,{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:j,name:b,price:P=0,sellingPrice:x,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:j,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!==x;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(je,{children:ue()})})]})}),!W&&ge()]}),e.jsxs("div",{className:"wrapper-card-2",children:[e.jsxs("div",{className:`price-text ${D?"new-price":""}`,children:[x>0&&_&&$!==!0&&S!==!0&&e.jsx("div",{children:`${t.formatPrice(x)} ${t.GetCurrencySymbol(_)}`}),D&&e.jsx("div",{className:`${x>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},(j,b)=>e.jsx(Be,{isLoading:f},`${d}-skeleton-product-card-${b}`))}),Fe=({children:c,fallbackComponent:f=e.jsx(e.Fragment,{}),isLoading:d=!1,limit:j,keyPrefix:b})=>e.jsx(a.Suspense,{fallbackComponent:f,children:d===!0?e.jsx(ze,{isLoading:d,limit:j,keyPrefix:b}):c});exports.DetailedProductCard=Oe;exports.SuspenseDetailedProductCard=Fe;
|