efficient-storefront-blocks 0.130.0 → 0.130.1
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/CHANGELOG.md +16 -0
- package/dist/index.js +24 -24
- package/dist/render/components/CompatibleTyres.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicRelatedProducts.js +1 -1
- package/dist/render/lib/document/blocks/commerce/BundleOffer/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/CompatibleTyres/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/RelatedProducts/meta.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as h}from"react/jsx-runtime";import I from"./SectionBand.js";import{SPEC_TABLE_BAND as x}from"../lib/sections/spec-table-band.js";import{useScopeClass as L}from"../lib/use-scope-class.js";import O from"efficient-web-builder/render/components/SectionHeader";import z from"./SectionFootnote.js";import B from"./TyreCard.js";import D from"./ViewMoreLink.js";import{renderGold as T,renderHeadline as F}from"efficient-web-builder/render/components/goldPhrases";import{useCurrency as P}from"./CurrencyContext.js";import{tyrePagePath as R}from"../lib/tyres/tyre-page-path.js";import{TYRE_ILLUSTRATION_NOTE as H}from"../lib/wheels/tyre-render.js";import{cardImageShapeTokens as $}from"efficient-web-builder/format/lib/content/card-image-shape";import{DEFAULT_CARD_INDEX_FORMAT as U,cardIndexCss as Y}from"efficient-web-builder/format/lib/sections/product-card-style";import{say as G}from"efficient-web-builder/format/lib/editor-words";function b({frameClassName:i,omitHead:t,style:o,children:n}){return i!==void 0?e("section",{className:i,style:o,children:n}):e(I,{className:t?x.ownBox:x.inline,style:o,children:n})}const m={2:"grid grid-cols-2 gap-2 max-view-tablet:grid-cols-1",3:"grid grid-cols-3 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1",4:"grid grid-cols-4 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1"};function V({num:i,title:t,description:o,tyres:n,footnote:k,footnoteLinkText:w,footnoteLinkHref:y,viewMore:s,editing:N=!1,frameClassName:d,omitHead:a=!1,columns:f=3,cardImage:S,outline:_,indexBadge:C}){const{currency:v,formatPrice:E}=P(),l=n??[],p=L("ct"),u=C??U,c=Y(p,u),j=l.some(r=>!r.image),A=[k,j?H:null].filter(Boolean).join(" "),g=a?null:e(O,{num:i!=null?T(i):void 0,title:t!=null?F(t,!1):void 0,description:o!=null?T(o):void 0,accent:!0});return l.length===0?N?h(b,{frameClassName:d,omitHead:a,children:[g,e("p",{className:"border-t border-line py-6 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:G("No compatible tyres found for this wheel’s sizes yet — tyres appear automatically when a matching size is active and priced in the catalog.")})]}):null:h(b,{frameClassName:d,omitHead:a,style:$(S),children:[c&&e("style",{children:c}),g,e("div",{className:`${c?`${p} `:""}${(Object.hasOwn(m,f)?m[f]:void 0)??m[3]}`,children:l.map(r=>e(B,{outline:_,showIndex:u!=="off",size:r.size,specs:r.specs,prices:r.prices,image:r.image,inStock:r.inStock,href:R(r.slug),currency:v,formatPrice:E},r.sku))}),s&&e("div",{className:"mt-10 flex",children:e(D,{href:s.href,label:s.label})}),e(z,{text:A,linkText:w,linkHref:y})]})}export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as $}from"react/jsx-runtime";import
|
|
1
|
+
"use client";import{jsx as e,jsxs as $}from"react/jsx-runtime";import A from"../SectionBand.js";import{useScopeClass as q}from"../../lib/use-scope-class.js";import{useEffect as J,useState as Q}from"react";import{cardHoverOf as Y}from"efficient-web-builder/format/lib/animation/hover";const ee=Y({},"ProductGrid");import re from"../CompatibleTyres.js";import{cardRowsGrid as te,GridBundleCards as oe,GridCardProvider as ne,GridCards as le,gridIndexCss as se}from"../GridCardTemplate.js";import{productGridColumnsClass as ie}from"../../lib/sections/product-grid-columns.js";import{containerGapProps as H}from"efficient-web-builder/format/lib/content/container-gap";import{SPEC_TABLE_BAND as S}from"../../lib/sections/spec-table-band.js";import{cardImageShapeTokens as M}from"efficient-web-builder/format/lib/content/card-image-shape";import{NO_FIELD_ANSWERS as ae}from"../../lib/content/field-usage.js";import{gridClassImageSizes as de}from"../../lib/sections/card-image-sizes.js";import{fillRowCss as ce}from"../../lib/sections/fill-row.js";import pe from"efficient-web-builder/render/components/SectionHeader";import ue from"../ViewMoreLink.js";import{useSiteMenuLinks as me}from"../catalog/SiteMenuLinks.js";import{renderGold as O,renderHeadline as fe}from"efficient-web-builder/render/components/goldPhrases";import he from"./KindGate.js";import{loadProductCatalog as ge}from"../useProductCatalog.js";import{PLP_KINDS as be}from"../../lib/catalog/plp-item.js";import{relatedCardCount as we,relatedViewMore as ye}from"../../lib/catalog/related-cards.js";import{answersWithProducts as j,DEFAULT_RELATIONSHIP as xe,relationshipApplies as K,relationshipByKey as Ce}from"../../lib/catalog/relationships.js";import{useCurrentProduct as ke}from"../../lib/document/current-product.js";import{PLACEHOLDER_RELATED as W}from"../../lib/wheels/placeholder-wheel.js";import{say as v}from"efficient-web-builder/format/lib/editor-words";const z={label:"text-[length:var(--size-label,13px)]"},Ee=be;function Pe(o){return e(he,{kinds:Ee,type:"RelatedProducts",editing:o.editing,children:e(Se,{...o})})}function Se({num:o,title:r,description:s,columns:d=3,cardCount:N,relationship:L=xe,footnote:w,footnoteLinkText:y,footnoteLinkHref:G,editing:n=!1,omitHead:a=!1,hover:R,ownerId:T="",template:c,cardImage:i,outline:p,indexBadge:x,columnsPhone:m,columnsTablet:C,gap:k,gapPhone:E}){const f={columns:d,columnsPhone:m,columnsTablet:C,gap:k,gapPhone:E,hover:R,ownerId:T,template:c,editing:n,omitHead:a},l=ke(),U=me(),P=we(N),t=Ce(L),I=t?j(t):!1,[Z,D]=Q([]);if(J(()=>{if(l||!n||!I)return;let u=!1;return ge().then(b=>{const X=b.length>0?b:W;u||D(X)}).catch(()=>{u||D(W)}),()=>{u=!0}},[l,n,I]),!t)return null;const h=a?null:e(pe,{num:o?O(o):void 0,title:fe(r||t.heading,!1),description:s?O(s):void 0,accent:!0});if(!j(t)){if(l&&!K(t,l.product.kind))return n?e(V,{relationship:t,cardImage:i}):null;const u=l?t.resolve(l.product,l.relatedWheels):null,b=u?.kind==="bundle"?u.bundles.slice(0,P):[];return b.length===0?n?e(F,{header:h,omitHead:a,cardImage:i,words:v("Bundles containing this product appear here on a product page.")}):null:e(B,{header:h,cards:{bundles:b},...f})}const _=ye(t,U);if(!l)return n?e(B,{header:h,cards:{wheels:Z.slice(0,P)},viewMore:_,...f}):null;if(!K(t,l.product.kind))return n?e(V,{relationship:t,cardImage:i}):null;const g=t.resolve(l.product,l.relatedWheels);return g.kind==="tyre"?e(re,{omitHead:a,columns:d,cardImage:i,outline:p,indexBadge:x,num:o,title:r||t.heading,description:s,tyres:[...g.tyres].slice(0,P),footnote:w,footnoteLinkText:y,footnoteLinkHref:G,viewMore:_,editing:n}):g.kind!=="alloy-wheel"?null:g.wheels.length===0?n?e(F,{header:h,omitHead:a,cardImage:i,words:v("Related products appear here on a product page.")}):null:e(B,{header:h,cards:{wheels:[...g.wheels].slice(0,P)},viewMore:_,...f})}function V({relationship:o,cardImage:r}){return e(A,{className:"border-b border-line py-14 max-view-desktop:py-10",style:M(r),children:e("p",{className:`font-mono ${z.label} uppercase tracking-[0.18em] text-fg-dim`,children:v("“{relationship}” does not apply to this product. It is hidden on the live page.",{relationship:v(o.label)})})})}function F({header:o,omitHead:r,cardImage:s,words:d}){return $(A,{className:r?S.ownBox:S.inline,style:M(s),children:[o,e("p",{className:`border-t border-line py-6 font-mono ${z.label} uppercase tracking-[0.18em] text-fg-dim`,children:d})]})}function B({header:o,cards:r,viewMore:s,columns:d,columnsPhone:N,columnsTablet:L,gap:w,gapPhone:y,hover:G,ownerId:n,template:a,editing:R,omitHead:T}){const c=q("rp"),i="wheels"in r?r.wheels.length:r.bundles.length;if(i===0)return null;const p=ie(d,N,L),x="bundles"in r,m=x?H("ProductGrid",w,"both",y):te(H("ProductGrid",w,"both",y)),C=se(c),k=ce(c,p,{cards:i}),E=f=>e("div",{className:x?`${c} mt-10 grid${m.className} ${p}`:`${c} grid${m.className} bg-[var(--catalog-grid-bg)] ${p}`,style:m.style,children:f});return $(A,{className:T?S.ownBox:S.inline,children:[C&&e("style",{children:C}),k&&e("style",{children:k}),o,e(ne,{value:{ownerId:n,Template:a,hover:G??ee,imageSizes:de(p,i),fieldUsage:ae,reserveEyebrow:!1,editing:R},children:"wheels"in r?e(le,{wheels:r.wheels,children:E}):e(oe,{bundles:r.bundles,children:E})}),s?e("div",{className:"mt-10 flex",children:e(ue,{href:s.href,label:s.label})}):null]})}export{Se as RelatedProductsBody,Pe as default,Ee as supportedKinds};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ProductGridSlots as t}from"../ProductGrid/meta.js";import{
|
|
1
|
+
import{ProductGridSlots as t}from"../ProductGrid/meta.js";import{BAND_120_OWN as e}from"../../../../content/block-own-pads.js";const r={ownPad:e,label:"Bundle Products",fields:{template:t.template},defaultProps:{num:"",title:"",description:"",columns:3}};export{r as BundleOfferMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PH as o}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{
|
|
1
|
+
import{PH as o}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{BAND_120_OWN as t}from"../../../../content/block-own-pads.js";const i={num:o.sectionNumber,title:"Compatible *tyres.*",description:o.body,footnote:"Tyres shown are fitment-matched companions.",footnoteLinkText:"Enquire about tyres"},r={ownPad:t,label:"Compatible Tyres",defaultProps:{num:"",title:"",description:"",footnote:"",footnoteLinkText:"",footnoteLinkHref:""}};export{i as COMPATIBLETYRES_PH,r as CompatibleTyresMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{RELATED_CARDS_DEFAULT as t}from"../../../../catalog/related-cards.js";import{DEFAULT_RELATIONSHIP as o}from"../../../../catalog/relationships.js";import{ProductGridSlots as r}from"../ProductGrid/meta.js";import{
|
|
1
|
+
import{RELATED_CARDS_DEFAULT as t}from"../../../../catalog/related-cards.js";import{DEFAULT_RELATIONSHIP as o}from"../../../../catalog/relationships.js";import{ProductGridSlots as r}from"../ProductGrid/meta.js";import{BAND_120_OWN as e}from"../../../../content/block-own-pads.js";const a={ownPad:e,label:"Related Products",fields:{template:r.template},defaultProps:{num:"",title:"",description:"",cardCount:t,columns:3,relationship:o}};export{a as RelatedProductsMeta};
|