efficient-storefront-blocks 0.85.0 → 0.86.0
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 +10 -0
- package/dist/chunks/{EditorPreviewCheckout-4XHYYAT2.js → EditorPreviewCheckout-4LNXFNN7.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-X4YKBAJ4.js → SiteEditorProvider-A2HMVDKS.js} +1 -1
- package/dist/chunks/{chunk-Y5LB56KB.js → chunk-EUKK2IN6.js} +1 -1
- package/dist/chunks/chunk-FJRKNPNN.js +340 -0
- package/dist/chunks/{chunk-VG4SUIRK.js → chunk-SLRULFYY.js} +1 -1
- package/dist/chunks/{chunk-NFXV7HDB.js → chunk-TGBNREUJ.js} +1 -1
- package/dist/chunks/{fitment-data-2I2FDPXW.js → fitment-data-TSYW6AFA.js} +1 -1
- package/dist/contract.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/FitmentPicker/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/FitmentPicker/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/FitmentTable/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductGrid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/SpecTable/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/StockFitment/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/StockFitment/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/page-rules.d.ts +5 -0
- package/dist/editor/lib/document/blocks/commerce/page-rules.js +1 -1
- package/dist/editor/lib/document/blocks/service/ArticleBody/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/ArticleBody/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/SiteFooter/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/service/index.js +1 -1
- package/dist/editor/lib/document/box-header.d.ts +1 -1
- package/dist/editor/lib/document/box-header.js +1 -1
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/efficient-block-sources.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +13 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.js +41 -37
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/ArticleBody.d.ts +7 -0
- package/dist/render/components/ArticleBody.js +1 -0
- package/dist/render/components/BoxHeaderBar.d.ts +2 -1
- package/dist/render/components/BoxHeaderBar.js +1 -1
- package/dist/render/components/ProductGridSection.d.ts +2 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/PublishedHeader.js +1 -1
- package/dist/render/components/SectionBand.d.ts +2 -1
- package/dist/render/components/SectionBand.js +1 -1
- package/dist/render/components/SectionBandChoice.d.ts +2 -1
- package/dist/render/components/SectionBandChoice.js +1 -1
- package/dist/render/components/SectionGroupBody.d.ts +2 -2
- package/dist/render/components/SectionGroupBody.js +1 -1
- package/dist/render/components/SpecTable.d.ts +3 -1
- package/dist/render/components/SpecTable.js +1 -1
- package/dist/render/components/TyreSizeGrid.d.ts +17 -0
- package/dist/render/components/TyreSizeGrid.js +1 -0
- package/dist/render/components/fitment/FitmentPickerGrid.d.ts +5 -1
- package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
- package/dist/render/components/fitment/FitmentPickerPart.d.ts +8 -0
- package/dist/render/components/fitment/FitmentPickerPart.js +1 -0
- package/dist/render/components/fitment/StockFitmentPart.d.ts +4 -0
- package/dist/render/components/fitment/StockFitmentPart.js +1 -0
- package/dist/render/components/fitment/useVehicleFit.d.ts +2 -1
- package/dist/render/components/fitment/useVehicleFit.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicFitmentTable.d.ts +5 -0
- package/dist/render/components/pdp-dynamic/DynamicFitmentTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicSpecTable.d.ts +1 -0
- package/dist/render/components/pdp-dynamic/DynamicSpecTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicTyreSizes.js +1 -1
- package/dist/render/components/pdp-dynamic/FitmentTableBlock.d.ts +3 -1
- package/dist/render/components/pdp-dynamic/FitmentTableBlock.js +1 -1
- package/dist/render/lib/content/article-body-seed.d.ts +9 -0
- package/dist/render/lib/content/article-body-seed.js +1 -0
- package/dist/render/lib/content/article-body.d.ts +8 -0
- package/dist/render/lib/content/article-body.js +5 -0
- package/dist/render/lib/content/article-page-seed.d.ts +12 -0
- package/dist/render/lib/content/article-page-seed.js +1 -0
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/FitmentTable/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/FitmentTable/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/SpecTable/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/StockFitment/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/StockFitment/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/StockFitment/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/StockFitment/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/metas.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/metas.js +1 -1
- package/dist/render/lib/document/blocks/commerce/renders.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/renders.js +1 -1
- package/dist/render/lib/document/blocks/service/ArticleBody/meta.d.ts +8 -0
- package/dist/render/lib/document/blocks/service/ArticleBody/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/ArticleBody/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/ArticleBody/render.js +1 -0
- package/dist/render/lib/document/blocks/service/SiteFooter/render.js +1 -1
- package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/service/metas.d.ts +1 -0
- package/dist/render/lib/document/blocks/service/metas.js +1 -1
- package/dist/render/lib/document/blocks/service/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/service/renders.js +1 -1
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/render/lib/sections/product-grid-columns.d.ts +5 -0
- package/dist/render/lib/sections/product-grid-columns.js +1 -0
- package/dist/render/lib/wheels/vehicle-memory.d.ts +13 -0
- package/dist/render/lib/wheels/vehicle-memory.js +1 -1
- package/dist/words.d.ts +24 -0
- package/dist/words.js +5 -5
- package/package.json +4 -4
- package/dist/chunks/chunk-NNBMZAW4.js +0 -340
- /package/dist/chunks/{chunk-KKKMX6LH.js → chunk-ALMIS7CK.js} +0 -0
- /package/dist/chunks/{chunk-NNBMZAW4.js.LEGAL.txt → chunk-FJRKNPNN.js.LEGAL.txt} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SlotComponent } from "efficient-easel/blocks";
|
|
2
|
+
export interface ArticleBodyProps {
|
|
3
|
+
id: string;
|
|
4
|
+
template?: SlotComponent;
|
|
5
|
+
editing?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export default function ArticleBody({ id, template, editing }: ArticleBodyProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as o}from"react/jsx-runtime";import{CardTemplateRows as i}from"efficient-web-builder/render/components/CardRowContext";import{useCurrentRecordOf as n}from"../lib/document/current-record.js";import{ARTICLE_BODY_FIELD as f,BLOG_POST_RECORD_TYPE as m,articleRows as a,sampleArticleRows as d}from"../lib/content/article-body.js";function p({id:l,template:t,editing:s}){const e=n(m),r=e?a(e.fields[f]):s?d():[];return r.length?o(i,{ownerId:l,ownerType:"ArticleBody",Template:t,rows:r,fallback:null,children:c=>o("div",{className:"flex flex-col",children:c})}):null}export{p as default};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type HeaderStickyMode } from "./useHeaderBar.js";
|
|
3
3
|
export declare const resolveStickyMode: (v: unknown) => HeaderStickyMode;
|
|
4
|
-
export default function BoxHeaderBar({ sticky, topTextColor, heightPx, theme, children, }: {
|
|
4
|
+
export default function BoxHeaderBar({ sticky, topTextColor, heightPx, theme, bandCapped, children, }: {
|
|
5
5
|
sticky?: unknown;
|
|
6
6
|
topTextColor?: unknown;
|
|
7
7
|
heightPx?: unknown;
|
|
8
8
|
theme?: unknown;
|
|
9
|
+
bandCapped?: boolean;
|
|
9
10
|
children: ReactNode;
|
|
10
11
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as _}from"react/jsx-runtime";import{useEffect as k,useState as E}from"react";import{useRootIsDark as v}from"efficient-shell/theme";import{usePathname as y}from"next/navigation";import{useHeaderBar as D}from"./useHeaderBar.js";import{headerSolidBackground as I,isProductPage as R,resolveHeaderHeightPx as T}from"../lib/content/header-bar.js";import{headerThemeWrap as P}from"../lib/content/header-theme.js";import{HEADER_SET_HEIGHT_VAR as S}from"efficient-web-builder/render/lib/document/header-clearance";import{HEADER_INK_OVERRIDE_ATTR as A,resolveHeaderInkMode as B}from"efficient-web-builder/render/lib/document/header-ink";import{centredCap as j,SITE_WIDTH_CAP as w}from"efficient-web-builder/format/lib/content/page-width";const M=["none","always","on_scroll_up"],C=e=>M.includes(e)?e:"always";function N({sticky:e,topTextColor:i,heightPx:u,theme:f,bandCapped:m=!1,children:h}){const t=C(e),n=T(u),{headerRef:o,scrolled:a,navHidden:p}=D({stickyMode:t,heightPx:n}),s=B(i),g=s==="auto"?null:{[A]:s},r=P(f),d=R(y()),[b,x]=E(null);k(()=>x(o.current?.ownerDocument??null),[o]);const H=!v({doc:b,whenUnset:!0}),l=a||d,c=I(H,d);return _("header",{ref:o,"data-scrolled":a||void 0,"data-box-header":"",...g,className:["sf-site-header",...r?[r.className]:[],"flex flex-col justify-center",t==="none"?"absolute":"fixed","inset-x-0 top-0 z-50",l?"border-b border-line backdrop-blur-md":"border-b border-transparent","transition-[background,border-color,transform] duration-300 ease-out"].join(" "),style:{...r?r.style:null,minHeight:`var(${S}, ${n}px)`,...m?j(w):null,...p?{transform:"translateY(-100%)"}:null,...l?{background:c,color:"var(--fg)","--sf-header-ground":c}:{color:"var(--sf-header-overlay-fg)","--sf-header-ground":"var(--sf-header-overlay-ground)"}},children:h})}export{N as default,C as resolveStickyMode};
|
|
@@ -45,6 +45,7 @@ interface Props {
|
|
|
45
45
|
catalog?: ProductSummary[];
|
|
46
46
|
kinds?: string[];
|
|
47
47
|
columns?: number;
|
|
48
|
+
columnsPhone?: unknown;
|
|
48
49
|
limit?: number;
|
|
49
50
|
editing?: boolean;
|
|
50
51
|
contentCapped?: boolean;
|
|
@@ -62,5 +63,5 @@ interface Props {
|
|
|
62
63
|
showCardBuy?: boolean;
|
|
63
64
|
showCardPage?: boolean;
|
|
64
65
|
}
|
|
65
|
-
export default function ProductGridSection({ num, catalog, kinds, title, titleSize, padTop, description, link, products: Products, wheels, source, columns, limit, editing, contentCapped, imageBackground, hover, coverIndex, indexBadge, outline, showBadge, fieldUsage, showCardPrice, showCardFinishes, showCardSizes, showCardBuy, showCardPage, cardImage, gap: gapProp, gapPhone, }: Props): import("react").JSX.Element | null;
|
|
66
|
+
export default function ProductGridSection({ num, catalog, kinds, title, titleSize, padTop, description, link, products: Products, wheels, source, columns, columnsPhone, limit, editing, contentCapped, imageBackground, hover, coverIndex, indexBadge, outline, showBadge, fieldUsage, showCardPrice, showCardFinishes, showCardSizes, showCardBuy, showCardPage, cardImage, gap: gapProp, gapPhone, }: Props): import("react").JSX.Element | null;
|
|
66
67
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as x,Fragment as
|
|
1
|
+
"use client";import{jsx as r,jsxs as x,Fragment as De}from"react/jsx-runtime";import{GRID_CARD_SHOW as D}from"../lib/sections/card-show-defaults.js";import{useScopeClass as He}from"../lib/use-scope-class.js";import{useEffect as _,useMemo as p,useState as Ue}from"react";import{CARD_IMAGE_BG_OFF as je,resolveCardImageBackground as We}from"efficient-web-builder/format/lib/content/card-image-background";import{cardImageShapeTokens as Xe}from"efficient-web-builder/format/lib/content/card-image-shape";import{containerGapProps as Ke,GAP_ZONE_CLASS as Ze}from"efficient-web-builder/format/lib/content/container-gap";import qe from"next/link";import Ve from"./ProductCard.js";import{CARD_ROWS_GRID_CLASS as Ye,cardRowsGap as Je,cardRowsGridStyle as Qe}from"./WheelCardFrame.js";import{ProductCardChromeProvider as er}from"./ProductCardChrome.js";import{gridClassImageSizes as rr}from"../lib/sections/card-image-sizes.js";import{fillRowCss as tr}from"../lib/sections/fill-row.js";import{noHoleBands as re,noHoleCss as te,showsASetCard as ne}from"../lib/sections/grid-no-hole.js";import{setIsWide as nr,summarySetBuild as sr}from"../lib/wheels/set-mode.js";import{answersForKind as se}from"../lib/content/field-usage.js";import{wheelCardEyebrowShows as or}from"./ProductCardEyebrow.js";import ar from"./NoCurrencyNote.js";import{DEFAULT_CARD_OUTLINE as ir,cardIndexCss as lr,parseCardIndexFormat as dr}from"efficient-web-builder/format/lib/sections/product-card-style";import{DEFAULT_COVER_INDEX as mr}from"../lib/wheels/cover-rendering.js";import{SITE_WIDTH_CAP as cr,centredCap as pr}from"efficient-web-builder/format/lib/content/page-width";import{ProductCatalogProvider as ur,SectionWheelsProvider as gr}from"./ProductRef.js";import{useCurrency as hr}from"./CurrencyContext.js";import{COLLECTION_ATTR as fr,useCatalogFilter as xr}from"./catalog/CatalogFilterContext.js";import wr from"./SectionBand.js";import{useInsideBox as vr,useInsideSiteGutter as yr}from"efficient-web-builder/render/components/SiteGutterFrame";import{productGridColumnsClass as Cr}from"../lib/sections/product-grid-columns.js";import{renderGold as H,renderHeadline as br}from"efficient-web-builder/render/components/goldPhrases";import{applyCatalogFilters as Sr}from"../lib/wheels/catalog-filters.js";import{normalizeCatalogRows as $r}from"../lib/wheels/wheel-summary-casing.js";import Mr from"./TyreSummaryCard.js";import{itemKind as U,plpKindNoun as Nr}from"../lib/catalog/plp-item.js";import{filterBarCategoryOf as _r,gridKindsOf as Er,gridRowsOf as Tr}from"../lib/wheels/grid-source.js";import{useUnifiedProductCatalog as zr}from"./useProductCatalog.js";import{STICKY_UNDERHEADER_CLASS as Ir}from"efficient-web-builder/render/lib/document/header-clearance";import{finishFamiliesOf as Lr}from"../lib/wheels/finish-defaults.js";import{lugCountsOf as Ar}from"../lib/wheels/lug-count.js";import{diametersOf as Br}from"../lib/wheels/size-range.js";import{say as Pr}from"efficient-web-builder/format/lib/editor-words";import{DEFAULT_TITLE_SIZE as Rr}from"../lib/sections/product-grid-title.js";const s={headingMediumUpTo800Xs:"max-view-wide:text-[length:var(--size-headingMedium,28px)]",headingMediumUpTo800Small:"max-view-wide:text-[length:var(--size-headingMedium,32px)]",headingMediumUpTo800Large:"max-view-wide:text-[length:var(--size-headingMedium,36px)]",headingMediumUpTo800Xl:"max-view-wide:text-[length:var(--size-headingMedium,40px)]",body:"text-[length:var(--size-body,13px)]",headingMedium1:"text-[length:var(--size-headingMedium,40px)]",headingMedium2:"text-[length:var(--size-headingMedium,48px)]",headingMedium3:"text-[length:var(--size-headingMedium,56px)]",headingMedium4:"text-[length:var(--size-headingMedium,64px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"},oe=[{value:"para",label:"Paragraph size — 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${s.labelLarge}`},{value:"sm",label:"Small — 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium1} ${s.headingMediumUpTo800Xs}`},{value:"md",label:"Medium — 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium2} ${s.headingMediumUpTo800Small}`},{value:"lg",label:"Large — 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium3} ${s.headingMediumUpTo800Large}`},{value:"xl",label:"Extra large — 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${s.headingMedium4} ${s.headingMediumUpTo800Xl}`}];function Fr(w){return(oe.find(u=>u.value===w)??oe.find(u=>u.value===Rr)).cls}function Or({num:w,catalog:u,kinds:E,title:T,titleSize:ae,padTop:j,description:C,link:v,products:ie,wheels:le,source:d,columns:de,columnsPhone:me,limit:o,editing:y,contentCapped:ce=!1,imageBackground:pe,hover:ue,coverIndex:ge,indexBadge:he,outline:fe,showBadge:xe,fieldUsage:g,showCardPrice:we,showCardFinishes:ve,showCardSizes:ye,showCardBuy:Ce,showCardPage:be,cardImage:Se,gap:$e,gapPhone:Me}){const z=p(()=>g?se(g,"alloy-wheel"):void 0,[g]),Ne=p(()=>g?se(g,"tyre"):void 0,[g]),e=He("pg"),m=Cr(de,me),W=typeof o=="number"&&o>0,X=ce,_e=yr(),Ee=vr(),Te=_e||Ee,K=zr(y===!0&&!!d),i=p(()=>d?$r(Tr(d,E,K??u??[])):null,[u,K,d,E]),c=_r(d),h=c!==null,{filters:b,reportCount:I,reportLugs:L,reportSizes:A,reportFinishes:B,reportCategories:P,vehicle:Z}=xr(),{currency:R}=hr(),F=h&&!!b.process&&b.process!==c,t=p(()=>i?h?Sr(i,b,R,Z.fit):i:null,[i,h,b,R,Z.fit]);_(()=>(P(e,c===null?[]:[c]),()=>P(e,[])),[c,P,e]),_(()=>{if(h)return I(e,F?0:t?.length??0),()=>I(e,0)},[h,F,t,I,e]);const ze=p(()=>{const n=(t??[]).filter(l=>U(l)!=="tyre");if(n.length===0)return!1;const a=n.some(l=>!!l.process);return n.some(l=>!!l.setWords)||or({kind:!1,brand:!1,process:a},z??[])},[t,z]),S=p(()=>({lugs:Ar(i??[]),sizes:Br(i??[]),finishes:Lr(i??[])}),[i]);_(()=>(L(e,S.lugs),A(e,S.sizes),B(e,S.finishes),()=>{L(e,[]),A(e,[]),B(e,[])}),[S,L,A,B,e]);const f=Ke("ProductGrid",$e,"both",Me),q=f.className.includes(Ze),O=`${e} grid${f.className} bg-[var(--catalog-grid-bg)] ${m}`,Ie=q?`${O} ${Ye}`:O,Le=q?{...f.style,...Qe(Je(f))}:f.style,Ae=t?t.length>0?r("div",{className:Ie,style:Le,children:t.map((n,a)=>U(n)==="tyre"?r(Mr,{item:n,currency:R,editing:y,fieldUsage:Ne},`tyre:${n.slug}-${a}`):r(Ve,{wheel:n,variant:"catalog"},`${n.slug}-${a}`))}):y?r("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",children:r("span",{className:`font-mono ${s.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:Pr("No products in “{name}” yet",{name:d?.name??""})})}):null:r(ie,{className:O,style:f.style,minEmptyHeight:320}),$=t?t.length:null,V=Nr(Er(d,E)),Be=w||T||C||v?x("div",{className:`${Ir} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-view-wide:flex-wrap max-view-wide:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${X||Te?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[x("div",{className:"flex min-w-0 items-end gap-6 max-view-wide:flex-col max-view-wide:items-stretch max-view-wide:gap-3",children:[w&&r("span",{className:`font-mono ${s.labelLarge} leading-none uppercase tracking-[0.22em] text-fg-dim`,children:H(w)}),T&&r("h2",{className:`${Fr(ae)} leading-none text-fg max-view-wide:leading-[1] [&>span]:block`,children:br(T,!1)})]}),(C||v||$!==null)&&x("div",{className:"flex items-center gap-5 max-view-wide:gap-3 view-wide:grow view-wide:justify-end",children:[C&&r("span",{className:`max-w-[340px] truncate font-display ${s.body} leading-[1.4] text-fg-dim max-view-wide:hidden view-wide:w-0 view-wide:grow view-wide:text-right`,children:H(C)}),v&&x(qe,{href:v.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${s.labelLarge} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[H(v.text),r("span",{"aria-hidden":!0,children:"→"})]}),$!==null&&x("span",{className:`whitespace-nowrap font-mono ${s.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:[$," ",$===1?V.one:V.many]})]})]}):null,Pe=typeof j=="number"?{"--pg-pt":`${j}px`}:{},Y=dr(he),M=p(()=>{if(!t)return null;const n=t.map(a=>U(a)!=="tyre"&&nr(sr(a))?2:1);return ne(n,o)?re(m,n,o):null},[t,m,o]),[Re,Fe]=Ue("");_(()=>{if(t)return;const n=document.querySelector(`.${e}`);if(!n)return;const a=()=>{const l=[...n.children].map(ke=>ke.classList.contains("col-span-2")?2:1);Fe(ne(l,o)?te(e,re(m,l,o,!1),l.length):"")};a();const k=new MutationObserver(a);return k.observe(n,{childList:!0}),()=>k.disconnect()},[t,e,m,o]);const Oe=M?M[0].tracks:t?W?Math.min(t.length,o):t.length:void 0,N=M?te(e,M,t.length):Re,J=N?"":tr(e,m,{limit:o,cards:t?.length}),Q=lr(e,Y),ee=x(De,{children:[W&&!N&&r("style",{children:`.${e} > *:nth-child(n+${o+1}){display:none}`}),N&&r("style",{children:N}),J&&r("style",{children:J}),Q&&r("style",{children:Q}),Be,Ae,r(ar,{editing:y})]});if(F)return null;const G=r(wr,{attrs:h&&c!==null?{[fr]:c}:void 0,className:"relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] pt-[var(--pg-pt)] pb-[120px] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))] max-view-wide:pt-[70px] max-view-wide:pb-[70px]",column:null,inAnyBox:!0,style:{...Pe,...Xe(Se)},defaults:{"--pg-pt":"120px"},children:X?r("div",{style:pr(cr),children:ee}):ee}),Ge=i?G:y?r(ur,{children:G}):r(gr,{wheels:le,children:G});return r(er,{imageSizes:rr(m,Oe),imageBackgroundFill:We(pe,je),hover:ue,coverIndex:ge??mr,indexBadge:Y,outline:fe??ir,showBadge:xe??!0,fieldUsage:z,reserveEyebrow:ze,showCardPrice:we??!0,showCardFinishes:ve??!0,showCardSizes:ye??D.showCardSizes,showCardBuy:Ce??D.showCardBuy,showCardPage:be??D.showCardPage,children:Ge})}export{oe as TITLE_SIZES,Or as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t}from"react/jsx-runtime";import{Render as
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{Render as n}from"efficient-easel/render";import i from"./BoxHeaderBar.js";import{headerRenderConfig as p}from"../lib/document/render-config.js";import{migrateRenamedProps as m}from"efficient-web-builder/format/lib/document/renamed-props";import{chromeOwnWidth as s}from"efficient-web-builder/format/lib/content/section-width";function a({group:e}){const r=m({root:{props:{}},content:[e],zones:{}}),o=e.props??{};return t(i,{sticky:o.sticky,topTextColor:o.topTextColor,heightPx:o.heightPx,theme:o.sectionAccent,bandCapped:s(e.props??{}).background==="content",children:t(n,{config:p(),data:r})})}export{a as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from "react";
|
|
2
2
|
export { BAND_CAP } from "../lib/sections/section-band.js";
|
|
3
|
-
export default function SectionBand({ className, capped, column, style, defaults, id, attrs, children, }: {
|
|
3
|
+
export default function SectionBand({ className, capped, column, style, defaults, id, attrs, inAnyBox, children, }: {
|
|
4
4
|
className: string;
|
|
5
5
|
capped?: boolean;
|
|
6
6
|
column?: string | null;
|
|
@@ -8,5 +8,6 @@ export default function SectionBand({ className, capped, column, style, defaults
|
|
|
8
8
|
defaults?: CSSProperties;
|
|
9
9
|
id?: string;
|
|
10
10
|
attrs?: Record<string, string>;
|
|
11
|
+
inAnyBox?: boolean;
|
|
11
12
|
children?: ReactNode;
|
|
12
13
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{EDITORIAL_COLUMN as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{EDITORIAL_COLUMN as A}from"efficient-web-builder/format/lib/content/page-width";import{BAND_CAP as C,bandClassesInBox as d}from"../lib/sections/section-band.js";import N from"./SectionBandChoice.js";import{BAND_CAP as v}from"../lib/sections/section-band.js";function _({className:e,capped:f=!1,column:n=A,style:i,defaults:s,id:a,attrs:r,inAnyBox:p=!1,children:t}){const l=d(e),c=n===null?"":d(n),m=o("section",{...r,className:l||void 0,style:i,id:a,children:c?o("div",{className:c,children:t}):t}),x=s?{...s,...i}:i,B=o("section",{...r,className:f?`${C} ${e}`:e,style:x,id:a,children:n===null?t:o("div",{className:n,children:t})});return o(N,{inBox:m,atTop:B,anyBox:p})}export{v as BAND_CAP,_ as default};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
export default function SectionBandChoice({ inBox, atTop }: {
|
|
2
|
+
export default function SectionBandChoice({ inBox, atTop, anyBox }: {
|
|
3
3
|
inBox: ReactNode;
|
|
4
4
|
atTop: ReactNode;
|
|
5
|
+
anyBox?: boolean;
|
|
5
6
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as o,jsx as r}from"react/jsx-runtime";import{useInsideBox as u,useInsideSiteGutter as a}from"efficient-web-builder/render/components/SiteGutterFrame";function c({inBox:e,atTop:t,anyBox:n=!1}){const i=a(),s=u();return r(o,{children:i||n&&s?e:t})}export{c as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { SlotComponent } from "efficient-easel/blocks";
|
|
2
|
-
export default function SectionGroupBody({ place, sections: Sections, editing,
|
|
2
|
+
export default function SectionGroupBody({ place, sections: Sections, editing, widths, navTextCase, menuRow, }: {
|
|
3
3
|
place: "header" | "footer";
|
|
4
4
|
sections: SlotComponent;
|
|
5
5
|
editing?: boolean;
|
|
6
|
-
|
|
6
|
+
widths: Readonly<Record<string, unknown>>;
|
|
7
7
|
navTextCase?: unknown;
|
|
8
8
|
menuRow?: unknown;
|
|
9
9
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{PhoneMenuToolsProvider as m}from"efficient-web-builder/render/components/PhoneMenuTools";import{SectionGroupWidthsProvider as h}from"efficient-web-builder/render/components/SiteGutterFrame";import{chromeOwnWidth as p}from"efficient-web-builder/format/lib/content/section-width";import{centredCap as g,SITE_WIDTH_CAP as v}from"efficient-web-builder/format/lib/content/page-width";import{resolveMenuRow as x,resolveNavTextCase as b}from"../lib/content/header-bar.js";function w({place:o,sections:d,editing:l=!1,widths:c,navTextCase:u,menuRow:i}){const a=o==="footer"?"footer":"div",n=p(c),t=n.content==="full"?"100vw":n.contentMax===null?null:`${n.contentMax}px`,r=o==="footer"&&n.background==="content"?g(v):null,f=t===null&&r===null?void 0:{...r,...t===null?null:{"--sf-site-width":t}},s=e(a,{"data-section-group":o,...o==="header"?{"data-header-nav-case":b(u),"data-header-menu-row":x(i)??"top"}:null,className:l&&o==="footer"?"sf-theme-surfaces bg-bg text-fg":void 0,style:f,children:e(h,{value:{background:n.background,content:n.content==="content"?"content":null},children:e(d,{minEmptyHeight:120})})});return o==="header"?e(m,{children:s}):s}export{w as default};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import type { SpecDiagram } from "../lib/wheels/spec-sheet.js";
|
|
2
3
|
export interface SpecRow {
|
|
3
4
|
label?: string;
|
|
@@ -16,5 +17,6 @@ export interface SpecTableProps {
|
|
|
16
17
|
omitHead?: boolean;
|
|
17
18
|
template?: unknown;
|
|
18
19
|
capped?: boolean;
|
|
20
|
+
footer?: ReactNode;
|
|
19
21
|
}
|
|
20
|
-
export default function SpecTable({ num, title, description, rows, builtInLabels, diagram, editing, omitHead, nodeId, capped, template, }: SpecTableProps): import("react").JSX.Element;
|
|
22
|
+
export default function SpecTable({ num, title, description, rows, builtInLabels, diagram, editing, omitHead, nodeId, capped, template, footer, }: SpecTableProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as C,jsx as e,jsxs as l}from"react/jsx-runtime";import I from"./SectionBand.js";import{SPEC_TABLE_BAND as y}from"../lib/sections/spec-table-band.js";import{useScopeClass as B}from"../lib/use-scope-class.js";import{useState as D}from"react";import R from"efficient-web-builder/render/components/SectionHeader";import{CardTemplateRows as j}from"efficient-web-builder/render/components/CardRowContext";import A from"./WheelSvg.js";import{renderGold as _,renderHeadline as V}from"efficient-web-builder/render/components/goldPhrases";import{inchLabel as T}from"../lib/wheels/spec-format.js";import W from"./DimensionArrowMarkers.js";import P from"./SpecTablePartBridge.js";import{SPEC_REGION_ATTR as M}from"efficient-web-builder/format/lib/sections/spec-table-regions";import{say as $}from"efficient-web-builder/format/lib/editor-words";import{applyShopMark as G}from"efficient-web-builder/format/lib/markup";import{useEnglish as H}from"./EnglishVariant.js";import{sizedImage as O}from"efficient-web-builder/format/lib/sized-image";const E={between:"[&>*+*]:border-t [&>*+*]:border-line",every:"[&>*]:border-t [&>*]:border-line"},L="[&_sup.text-accent.tracking-normal]:static [&_sup.text-accent.tracking-normal]:align-baseline [&_sup.text-accent.tracking-normal]:[font-size:inherit] [&_sup.text-accent.tracking-normal]:text-current [&_sup.text-accent.tracking-normal]:tracking-[inherit]",F="(max-width: 1100px) 80vw, 290px",d={labelSmall:"text-[length:var(--size-label,11px)]",label:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,14px)]"};function r(i,a){return i?{[M]:a}:{}}function Y({editing:i,nodeId:a,children:n}){return!i||!a?e(C,{children:n}):e(P,{nodeId:a,children:n})}function z({row:i,topBorder:a,editing:n}){return l("div",{className:`flex items-baseline justify-between gap-6 py-4 font-mono ${d.labelLarge} tracking-[0.05em] ${a?"border-t border-line":""}`,children:[e("span",{...r(n,"rowLabel"),className:"uppercase text-fg-dim",children:i.label}),e("span",{...r(n,"rowValue"),className:`text-right ${i.accent?"text-accent":"text-fg"}`,children:i.value})]})}function Z({diagram:i,editing:a}){const[n,b]=D(!1),c=B("spec"),{wheelName:p,imageSrc:s,diameter:f,width:g,offset:v,holes:N,pcd:u,spokes:h,mesh:o,bore:m}=i,S=!!s&&!n;return l("div",{className:"sf-card bg-surface p-6 max-view-desktop:mt-8",children:[e("div",{...r(a,"diagramTitle"),className:`mb-3 font-mono ${d.label} uppercase tracking-[0.25em] text-fg-dim`,children:"Wheel Dimension Diagram"}),l("div",{className:"relative flex aspect-square items-center justify-center",children:[l("svg",{viewBox:"0 0 320 320",className:"absolute inset-0 h-full w-full text-fg-dim",fill:"none",stroke:"currentColor",children:[e("line",{x1:40,y1:20,x2:280,y2:20,strokeWidth:1,markerStart:`url(#${c}-L)`,markerEnd:`url(#${c}-R)`}),e("line",{x1:40,y1:15,x2:40,y2:25,strokeWidth:1}),e("line",{x1:280,y1:15,x2:280,y2:25,strokeWidth:1}),e(W,{id:c})]}),S?e("img",{...O(s,{fallbackWidth:960}),sizes:F,alt:`${p} — face`,onError:()=>b(!0),loading:"lazy",className:"relative z-[1] block h-[80%] w-[80%] object-contain"}):e(A,{spokes:h,mesh:o,className:"relative z-[1] block h-[72%] w-[72%] text-accent"}),l("span",{...r(a,"diagramCallout"),className:`absolute top-1.5 left-1/2 z-20 -translate-x-1/2 bg-surface px-2 font-mono ${d.label} tracking-[0.2em] text-accent`,children:["⌀ ",T(f)]}),l("span",{...r(a,"diagramCallout"),className:`absolute bottom-1.5 left-1/2 z-20 -translate-x-1/2 bg-surface px-2 font-mono ${d.label} tracking-[0.2em] text-fg`,children:["WIDTH ",T(g)]})]}),l("div",{className:`mt-4 grid grid-cols-5 gap-3 font-mono ${d.labelSmall} uppercase tracking-[0.2em] text-fg-dim max-[480px]:grid-cols-3`,children:[l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"Holes"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:N})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"PCD"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:u})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"Spokes"}),l("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:[h,o?" + Mesh":""]})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"Bore"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-fg",children:m})]}),l("div",{children:[e("div",{...r(a,"diagramStatLabel"),className:"text-fg-dim/60",children:"ET"}),e("div",{...r(a,"diagramStatValue"),className:"mt-1 text-accent",children:v})]})]})]})}function q({num:i,title:a,description:n,rows:b,builtInLabels:c=!1,diagram:p,editing:s=!1,omitHead:f=!1,nodeId:g,capped:v=!0,template:N,footer:u}){const h=H(),o=(b??[]).filter(t=>(t?.label??"").trim()||(t?.value??"").trim()).map(t=>c&&t.label?{...t,label:h(t.label)}:t),m=o.length>0?o:s?[{label:$("Label"),value:$("Value")}]:[],S=m.map(t=>({label:t.label??"",value:t.accent&&t.value?G(t.value,0,t.value.length,"highlight").text:t.value??""})),w=t=>p?l("div",{className:"grid grid-cols-[1fr_400px] gap-12 max-view-desktop:grid-cols-1",children:[e("div",{className:t?`${E.between} ${L}`:void 0,children:t??m.map((k,x)=>e(z,{row:k,topBorder:x>0,editing:s},x))}),e(Z,{diagram:p,editing:s})]}):e("div",{className:`grid grid-cols-2 gap-x-16 max-[900px]:grid-cols-1${t?` ${E.every} ${L}`:""}`,children:t??m.map((k,x)=>e(z,{row:k,topBorder:!0,editing:s},x))});return e(I,{className:f?y.ownBox:y.inline,capped:v,children:l(Y,{editing:s,nodeId:g,children:[f?null:e(R,{num:i?_(i):void 0,title:a?V(a,!1):void 0,description:n?_(n):void 0,accent:!0}),e(j,{ownerId:g??"",ownerType:"SpecTable",Template:N,rows:S,fallback:w(),children:t=>w(t)}),u===void 0?null:e("div",{className:"mt-12 empty:hidden",children:u})]})})}export{q as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FieldUsageAnswer } from "../lib/content/field-usage.js";
|
|
2
|
+
import type { TyreVariant } from "../lib/api/index.js";
|
|
3
|
+
export declare const TYRE_SIZES_HEAD: {
|
|
4
|
+
readonly title: "Available *sizes.*";
|
|
5
|
+
readonly description: "Every size this tyre is made in, with its own price and stock.";
|
|
6
|
+
};
|
|
7
|
+
export interface TyreSizesContentProps {
|
|
8
|
+
variants: readonly TyreVariant[];
|
|
9
|
+
fieldUsage: readonly FieldUsageAnswer[];
|
|
10
|
+
num?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
editing?: boolean;
|
|
14
|
+
omitHead?: boolean;
|
|
15
|
+
keepHiddenHead?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function TyreSizesContent({ variants, fieldUsage, num, title, description, editing, omitHead, keepHiddenHead, }: TyreSizesContentProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as r,jsxs as f}from"react/jsx-runtime";import u from"./SectionBand.js";import w from"./SectionFootnote.js";import T from"efficient-web-builder/render/components/SectionHeader";import _ from"./TyreCard.js";import{useCurrency as k}from"./CurrencyContext.js";import{renderGold as x,renderHeadline as z}from"efficient-web-builder/render/components/goldPhrases";import{TYRE_ILLUSTRATION_NOTE as E}from"../lib/wheels/tyre-render.js";import{say as A}from"efficient-web-builder/format/lib/editor-words";const g="border-b border-line py-[120px] max-view-desktop:py-20",h="border-b border-line pt-0 pb-[120px] max-view-desktop:pt-0 max-view-desktop:pb-20",b={title:"Available *sizes.*",description:"Every size this tyre is made in, with its own price and stock."};function P({variants:i,fieldUsage:s,num:o,title:n,description:e,editing:y=!1,omitHead:c=!1,keepHiddenHead:N=!1}){const d=(t,a)=>N?t===""?void 0:t??a:t||a,p=d(n,b.title),l=d(e,b.description),m=c?null:r(T,{num:o?x(o):void 0,title:p!=null?z(p,!1):void 0,description:l!=null?x(l):void 0,accent:!0});if(i.length===0)return y?f(u,{className:c?h:g,children:[m,r("p",{className:"border-t border-line py-6 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:A("This product’s sizes appear here on a product page.")})]}):null;const S=i.some(t=>!t.image);return f(u,{className:c?h:g,children:[m,r(D,{variants:i,fieldUsage:s}),r(w,{text:S?E:""})]})}function D({variants:i,fieldUsage:s}){const{currency:o,formatPrice:n}=k();return r("div",{className:"grid grid-cols-3 gap-2 max-view-desktop:grid-cols-2 max-view-tablet:grid-cols-1",children:i.map(e=>r(_,{fieldUsage:s,size:e.size,specs:e.specs,prices:e.prices,image:e.image,inStock:e.inStock,currency:o,formatPrice:n},e.sku))})}export{b as TYRE_SIZES_HEAD,P as TyreSizesContent};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { FitmentCascade } from "./useFitmentCascade.js";
|
|
2
|
-
export
|
|
2
|
+
export type PickerColumns = 1 | 2 | 3 | 4;
|
|
3
|
+
export declare function pickerGridColumns(compact: boolean, columns?: unknown, columnsPhone?: unknown): string;
|
|
4
|
+
export default function FitmentPickerGrid({ cascade, compact, editing, columns, columnsPhone, }: {
|
|
3
5
|
cascade: FitmentCascade;
|
|
4
6
|
compact?: boolean;
|
|
5
7
|
editing?: boolean;
|
|
8
|
+
columns?: unknown;
|
|
9
|
+
columnsPhone?: unknown;
|
|
6
10
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{PickerField as t}from"./PickerField.js";import{vehicleLevelStates as p}from"./vehicle-level-state.js";import{VEHICLE_FIELD_LABEL as a}from"../../lib/wheels/vehicle-field-focus.js";const b={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"},u={1:"max-view-tablet:grid-cols-1",2:"max-view-tablet:grid-cols-2",3:"max-view-tablet:grid-cols-3",4:"max-view-tablet:grid-cols-4"},g=e=>e===1||e===2||e===3||e===4?e:void 0;function f(e,i,r){const d=g(i),n=g(r);if(d===void 0&&n===void 0)return e?"grid-cols-1 @min-[20rem]:grid-cols-2 @min-[39rem]:grid-cols-4":"grid-cols-4 max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1";const l=d!==void 0?b[d]:e?"grid-cols-1 @min-[20rem]:grid-cols-2 @min-[39rem]:grid-cols-4":"grid-cols-4 max-view-desktop:grid-cols-2";return n!==void 0?`${l} ${u[n]}`:l}function h({cascade:e,compact:i=!1,editing:r=!1,columns:d,columnsPhone:n}){const{vehicle:l}=e,o=p(e),m=c("div",{className:["grid gap-[2px] border border-line bg-line",f(i,d,n)].join(" "),children:[s(t,{label:a.make,placeholder:o.make.placeholder,disabled:o.make.disabled,value:l.make,options:e.makeOptions,onChange:e.setMake,compact:i,editing:r}),s(t,{label:a.model,placeholder:o.model.placeholder,disabled:o.model.disabled,value:l.model,options:e.modelOptions,onChange:e.setModel,compact:i,editing:r}),s(t,{label:a.year,placeholder:o.year.placeholder,disabled:o.year.disabled,value:l.year!==null?String(l.year):"",options:e.yearOptions,onChange:e.setYear,compact:i,editing:r}),s(t,{label:a.trim,placeholder:o.trim.placeholder,disabled:o.trim.disabled,value:l.modification,options:e.modOptions,onChange:e.setModification,compact:i,editing:r})]});return i?s("div",{className:"@container",children:m}):m}export{h as default,f as pickerGridColumns};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type FitmentPickerLayout = "tall" | "short";
|
|
2
|
+
export interface FitmentPickerPartProps {
|
|
3
|
+
layout?: FitmentPickerLayout;
|
|
4
|
+
pickerColumns?: unknown;
|
|
5
|
+
pickerColumnsPhone?: unknown;
|
|
6
|
+
editing?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export default function FitmentPickerPart({ layout, pickerColumns, pickerColumnsPhone, editing, }: FitmentPickerPartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as s}from"react/jsx-runtime";import i from"./FitmentPickerGrid.js";import{useVehicleFit as a}from"./useVehicleFit.js";function m({layout:e,pickerColumns:r,pickerColumnsPhone:o,editing:t=!1}){const{cascade:c}=a({editing:t,autoApply:!0,shareStock:!0});return s(i,{cascade:c,compact:e==="short",editing:t,columns:r,columnsPhone:o})}export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import{useSyncExternalStore as i}from"react";import{say as n}from"efficient-web-builder/format/lib/editor-words";import s from"./StockFitmentCard.js";import{storefrontVehicleMemory as o}from"../../lib/wheels/vehicle-memory.js";const c=()=>null;function m({editing:e=!1,label:a="Stock fitment"}){const t=i(o.subscribeStock,o.readStock,c);return t?r(s,{loading:t.loading,error:t.error,data:t.stock}):e?r("div",{"data-host-part-sample":"",className:"opacity-60",children:n(a)}):null}export{m as default};
|
|
@@ -21,9 +21,10 @@ export interface VehicleFit {
|
|
|
21
21
|
appliedName: string;
|
|
22
22
|
restored: boolean;
|
|
23
23
|
}
|
|
24
|
-
export declare function useVehicleFit({ initialMakes, editing, enabled, autoApply, }?: {
|
|
24
|
+
export declare function useVehicleFit({ initialMakes, editing, enabled, autoApply, shareStock, }?: {
|
|
25
25
|
initialMakes?: FitmentMake[];
|
|
26
26
|
editing?: boolean;
|
|
27
27
|
enabled?: boolean;
|
|
28
28
|
autoApply?: boolean;
|
|
29
|
+
shareStock?: boolean;
|
|
29
30
|
}): VehicleFit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useCallback as
|
|
1
|
+
"use client";import{useCallback as k,useEffect as h,useMemo as x,useRef as F,useState as S}from"react";import{useFitmentCascade as M}from"./useFitmentCascade.js";import{DEFAULT_VEHICLE as L}from"../../lib/wheels/fitment-options.js";import{vehicleFitmentFromStock as P}from"../../lib/wheels/plp-fitment-match.js";import{clearAppliedVehicle as j}from"../../lib/wheels/applied-vehicle.js";import{isCompleteVehicle as p,vehicleFromParams as B}from"../../lib/wheels/plp-vehicle-params.js";import{storefrontVehicleMemory as a}from"../../lib/wheels/vehicle-memory.js";function b(t,c,r){return t!==c?t:r||c}function D(t,c){return t.make===c.make&&t.model===c.model&&t.modification===c.modification}function m(t,c){return t.make===c.make&&t.model===c.model&&t.year===c.year&&t.modification===c.modification}function z({initialMakes:t=[],editing:c=!1,enabled:r=!0,autoApply:N=!1,shareStock:y=!1}={}){const e=M(t,r),{setVehicle:n}=e,[l,f]=S(null),[C,w]=S(!1),u=k(()=>({make:e.makeName,model:e.modelName,modification:e.modName}),[e.makeName,e.modelName,e.modName]);h(()=>{if(c||!r){w(!0);return}const o=B(new URLSearchParams(window.location.search)),s=o?null:a.read(),i=o??s?.vehicle??null;i&&(n(i),f({vehicle:i,labels:s?.labels??{make:i.make,model:i.model,modification:i.modification},stock:null})),w(!0)},[c,r,n]),h(()=>{if(!(c||!r))return a.subscribe(()=>{const o=a.read();f(i=>o?i&&m(i.vehicle,o.vehicle)?D(i.labels,o.labels)?i:{...i,labels:o.labels}:{vehicle:o.vehicle,labels:o.labels,stock:null}:null);const s=o?.vehicle??L;n(i=>m(i,s)?i:s)})},[c,r,n]),h(()=>{!N||!p(e.vehicle)||l&&m(l.vehicle,e.vehicle)||f({vehicle:e.vehicle,labels:u(),stock:e.stock})},[N,l,e.vehicle,e.stock,u]),h(()=>{if(!l||!m(e.vehicle,l.vehicle))return;const o={make:b(e.makeName,e.vehicle.make,l.labels.make),model:b(e.modelName,e.vehicle.model,l.labels.model),modification:b(e.modName,e.vehicle.modification,l.labels.modification)};(l.stock!==e.stock||l.labels.make!==o.make||l.labels.model!==o.model||l.labels.modification!==o.modification)&&f(i=>i&&m(e.vehicle,i.vehicle)?{...i,stock:e.stock,labels:o}:i)},[l,e.vehicle,e.stock,e.makeName,e.modelName,e.modName]);const d=F("");h(()=>{if(!(c||!r))try{if(!l){d.current!==""&&(a.clear(),d.current="");return}const o=JSON.stringify({vehicle:l.vehicle,labels:l.labels});if(o===d.current)return;a.write({vehicle:l.vehicle,labels:l.labels}),d.current=o}catch{}},[l,c,r]);const v=F(!1);h(()=>{if(!y||!r)return;if(!l){v.current&&a.writeStock(null),v.current=!1;return}if(!m(e.vehicle,l.vehicle))return;const o=e.loading.stock!==!1,s=a.readStock();s&&m(s.vehicle,l.vehicle)&&s.stock===e.stock&&s.loading===o&&s.error===e.cascadeError||(a.writeStock({vehicle:l.vehicle,stock:e.stock,loading:o,error:e.cascadeError}),v.current=!0)},[y,r,l,e.vehicle,e.stock,e.loading.stock,e.cascadeError]);const A=k(()=>{p(e.vehicle)&&f({vehicle:e.vehicle,labels:u(),stock:e.stock})},[e.vehicle,e.stock,u]),R=k(()=>{f(null),n(L),!c&&r&&j()},[c,r,n]),E=x(()=>P(l?.stock),[l?.stock]),V=!!l&&m(e.vehicle,l.vehicle)&&e.loading.stock!==!1,U=l?[l.vehicle.year,l.labels.make,l.labels.model,l.labels.modification].filter(Boolean).join(" "):"";return{cascade:e,applied:l,fit:E,resolving:V,unresolved:!!l&&E===null&&!V,apply:A,clear:R,canApply:p(e.vehicle),appliedName:U,restored:C}}export{z as useVehicleFit};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { ProductKind } from "../../lib/api/index.js";
|
|
2
2
|
export declare const supportedKinds: readonly ProductKind[];
|
|
3
|
+
export interface TyreHead {
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
3
7
|
interface Props {
|
|
8
|
+
tyreHead?: TyreHead;
|
|
4
9
|
num?: string;
|
|
5
10
|
title?: string;
|
|
6
11
|
description?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as n}from"react/jsx-runtime";import g from"../FitmentTable.js";import k from"./KindGate.js";import{TyreSizesContent as x}from"../TyreSizeGrid.js";import{useCurrentProduct as w}from"../../lib/document/current-product.js";import{useSampleProduct as F}from"./useSampleProduct.js";const U=["alloy-wheel","tyre"],b=[];function h(t){return n(k,{kinds:U,type:"FitmentTable",editing:t.editing,children:n(y,{...t})})}function y({num:t,title:s,description:l,showFilter:m,tooltipDefaultOn:a,footnote:d,footnoteLinkText:c,footnoteLinkHref:u,editing:r=!1,omitHead:f=!1,tyreHead:e}){const o=w(),p=F(r&&!o),i=o?.product??p;if(i?.kind==="tyre")return n(x,{variants:i.source.variants,fieldUsage:o?.fieldUsage??b,num:t,title:e?e.title:s,description:e?e.description:l,editing:r,omitHead:f,keepHiddenHead:e!=null});const T=i?.kind==="alloy-wheel"?i.source.fitments??[]:[];return n(g,{num:t,title:s,description:l,rows:T,showFilter:m,tooltipDefaultOn:a,footnote:d,footnoteLinkText:c,footnoteLinkHref:u,editing:r,omitHead:f,fieldUsage:o?.fieldUsage})}export{h as default,U as supportedKinds};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as a}from"react/jsx-runtime";import b from"../SpecTable.js";import k from"./KindGate.js";import{DynamicEuTyreLabelBlock as v}from"./DynamicEuTyreLabel.js";import{buildSpecSheet as z,sourceFromWheel as E}from"../../lib/wheels/spec-sheet.js";import{buildTyreSpecSheet as I}from"../../lib/tyres/spec-sheet.js";import{partVariant as L}from"../../lib/catalog/from-wheel.js";import{useCurrentProduct as P}from"../../lib/document/current-product.js";import{applySpecAnswers as h}from"../../lib/content/field-usage.js";import{useSampleProduct as j}from"./useSampleProduct.js";const A=["alloy-wheel","tyre"],B=[];function D(t,r,i){const o=t.variants??[];return(r?o.find(n=>n.sku===r):void 0)??(i?o.find(n=>n.size===i):void 0)??o[0]??null}function G(t){return a(k,{kinds:A,type:"SpecTable",editing:t.editing,children:a(K,{...t})})}function K({num:t,title:r,description:i,showDiagram:o=!0,editing:n=!1,nodeId:d,omitHead:u=!1,template:p,showEuLabel:y=!1}){const e=P(),w=j(n&&!e),l=e?.product??w,c=l?.kind==="tyre"?l.source:null,m=e?.fieldUsage??B;if(c){const T=D(c,e?.selection.part?.id,e?.selection.shown.size),x=I({brand:c.brand,variant:T});return a(b,{capped:!1,builtInLabels:!0,num:t,title:r,description:i,rows:h(x.rows,m),diagram:null,editing:n,nodeId:d,omitHead:u,template:p,footer:y?a(v,{editing:n}):void 0})}const s=l?.kind==="alloy-wheel"?l.source:null,S=e?e.selection.shown.finish:s?.finishes[0]?.name,g=e&&s?L(s,e.selection.part)?.size??void 0:void 0,f=s?z(E(s),S,g):{rows:[],diagram:null};return a(b,{capped:!1,builtInLabels:!0,num:t,title:r,description:i,rows:h(f.rows,m),diagram:o?f.diagram:null,editing:n,nodeId:d,omitHead:u,template:p})}export{G as default,A as supportedKinds};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";import u from"./KindGate.js";import{TyreSizesContent as m}from"../TyreSizeGrid.js";import{useCurrentProduct as p}from"../../lib/document/current-product.js";import{useSampleProduct as f}from"./useSampleProduct.js";const l=[],y=["tyre"];function S(t){return r(u,{kinds:y,type:"TyreSizes",editing:t.editing,children:r(x,{...t})})}function x({num:t,title:o,description:s,editing:i=!1,omitHead:c=!1}){const e=p(),d=f(i&&!e),n=e?.product??d,a=n?.kind==="tyre"?n.source.variants:[];return r(m,{variants:a,fieldUsage:e?.fieldUsage??l,num:t,title:o,description:s,editing:i,omitHead:c})}export{S as default,y as supportedKinds};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { type TyreHead } from "./DynamicFitmentTable.js";
|
|
1
2
|
import { type FitmentTableProps } from "../FitmentTable.js";
|
|
2
3
|
interface Props extends Omit<FitmentTableProps, "rows"> {
|
|
3
4
|
dynamic?: unknown;
|
|
4
5
|
wheel?: unknown;
|
|
6
|
+
tyreHead?: TyreHead;
|
|
5
7
|
}
|
|
6
|
-
export default function FitmentTableBlock({ dynamic, wheel, omitHead, ...rest }: Props): import("react").JSX.Element;
|
|
8
|
+
export default function FitmentTableBlock({ dynamic, wheel, omitHead, tyreHead, ...rest }: Props): import("react").JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as m}from"react/jsx-runtime";import
|
|
1
|
+
"use client";import{jsx as m}from"react/jsx-runtime";import a from"./DynamicFitmentTable.js";import f from"../FitmentTable.js";import{useCurrentProduct as s}from"../../lib/document/current-product.js";import{isEditorOnDynamicPage as c}from"efficient-web-builder/format/lib/document/editor-page-context";import{fitmentTableIsDynamic as l}from"../../lib/document/fitment-table-dynamic.js";import{getFitments as p}from"../../lib/wheels/fitments.js";function u({dynamic:r,wheel:t,omitHead:i=!1,tyreHead:n,...o}){const e=s()!==null||!!o.editing&&c();return l({dynamic:r,wheel:t},e)?m(a,{...o,omitHead:i,tyreHead:n}):m(f,{...o,omitHead:i,rows:p(typeof t=="string"?t:"")})}export{u as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type SeededNode } from "efficient-web-builder/format/lib/document/seed-parts";
|
|
2
|
+
type Props = Record<string, unknown>;
|
|
3
|
+
export declare const ARTICLE_BODY_BLOCK = "ArticleBody";
|
|
4
|
+
export declare const ARTICLE_HEADING_LOOK: Props;
|
|
5
|
+
export declare const ARTICLE_PARAGRAPH_LOOK: Props;
|
|
6
|
+
export declare const ARTICLE_MEASURE = 640;
|
|
7
|
+
export declare function articleBodySeed(nodeId: string): SeededNode[];
|
|
8
|
+
export declare function withArticleBodyTemplate(props: Props): Props;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CARDS_BODY_LOOK as a,rowFieldTextSeed as n}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{DIM as o,TEXT as d,seedNodes as c,token as g}from"efficient-web-builder/format/lib/document/seed-parts";const l="ArticleBody",h={textStyle:"heading-3",...g("headingSmall",20),weight:500,lineHeight:1.4,align:"center"},A={...a,align:"center"},i=640,m=[n("heading",{...d,tag:"h2",align:"center",maxWidth:i},h),n("paragraph",{...o,tag:"p",align:"center",maxWidth:i},A)];function x(e){return c(m,(t,r)=>`${e}~${r==="0"?"heading":"paragraph"}`)}function O(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:l;return{...e,template:x(t)}}export{l as ARTICLE_BODY_BLOCK,h as ARTICLE_HEADING_LOOK,i as ARTICLE_MEASURE,A as ARTICLE_PARAGRAPH_LOOK,x as articleBodySeed,O as withArticleBodyTemplate};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const BLOG_POST_RECORD_TYPE = "blog-post";
|
|
2
|
+
export declare const ARTICLE_BODY_FIELD = "body";
|
|
3
|
+
export type ArticleRow = {
|
|
4
|
+
heading: string;
|
|
5
|
+
paragraph: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function articleRows(body: unknown): ArticleRow[];
|
|
8
|
+
export declare function sampleArticleRows(): ArticleRow[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{say as t}from"efficient-web-builder/format/lib/editor-words";import{sanitizeHtml as o}from"efficient-web-builder/render/lib/document/sanitize";const g="blog-post",l="body",p={"&":"&","<":"<",">":">",""":'"',"'":"'","'":"'"," ":" ","’":"’","‘":"‘","“":"“","”":"”","—":"—","–":"–","…":"…"};function n(r){return r.replace(/&[a-z]+;|&#\d+;/gi,a=>p[a.toLowerCase()]??a)}function i(r){return r?(/<[a-z][\s\S]*?>/i.test(r)?r.replace(/<\/(p|div|h[1-6]|li|blockquote|section|article|ul|ol)>/gi,`
|
|
2
|
+
|
|
3
|
+
`).replace(/<br\s*\/?>/gi,`
|
|
4
|
+
|
|
5
|
+
`).replace(/<[^>]+>/g,""):r).split(/\n{2,}/).map(e=>n(e).replace(/[ \t]+/g," ").trim()).filter(Boolean):[]}function s(r){return r.length<60&&/^[A-Z][^.]*\.$/.test(r.trim())}function u(r){return typeof r!="string"||!r.trim()?[]:i(o(r)).map(a=>s(a)?{heading:a,paragraph:""}:{heading:"",paragraph:a})}function d(){return[{heading:t("A subhead."),paragraph:""},{heading:"",paragraph:t("Each paragraph of the post's body is drawn by the card template.")},{heading:"",paragraph:t("Another paragraph.")}]}export{l as ARTICLE_BODY_FIELD,g as BLOG_POST_RECORD_TYPE,u as articleRows,d as sampleArticleRows};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CARD_ROW_FIELD_PROP as s}from"efficient-web-builder/format/lib/content/card-template";import{RECORD_TITLE_FIELD as m}from"efficient-web-builder/format/lib/content/record-row";import{TEMPLATE_RECORD_TYPE_PROP as _}from"efficient-web-builder/format/lib/content/record-types";import{BOX_TYPE as n,CONTAINER_BLOCKS_SLOT as r}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX as g,DIM as c,TEXT as E,boxPadding as p,seedNodes as O,token as d}from"efficient-web-builder/format/lib/document/seed-parts";import{BLOG_POST_RECORD_TYPE as P}from"./article-body.js";import{ARTICLE_BODY_BLOCK as l,ARTICLE_HEADING_LOOK as T,ARTICLE_MEASURE as y,ARTICLE_PARAGRAPH_LOOK as R,articleBodySeed as B}from"./article-body-seed.js";const a={...g,direction:"column",align:"center"},i=(e,o,t)=>({type:"Text",props:{...o,text:"",[s]:e,align:"center",maxWidth:y,_partStyles:{text:{...t,align:"center"}}}}),L=[{type:n,props:{...a,name:"Title",gap:16,...p(64,32,40,20),sectionPaddingBottom:16,sectionPaddingBottomPhone:16},slots:{[r]:[i("category",{...c,tag:"p"},{textStyle:"body-1",...d("label",13),case:"upper",letterSpacing:.2}),i(m,{...E,tag:"h1"},T),i("excerpt",{...c,tag:"p"},R)]}},{type:n,props:{...a,align:"stretch",name:"Cover",...p(0,0,0,0)},slots:{[r]:[{type:"ImageBlock",props:{[s]:"cover",aspect:"16/9",contained:!0,widthMode:"page",...p(0,32,0,20)}}]}},{type:n,props:{...a,name:"Body",...p(0,32,0,20),sectionPaddingBottom:64,sectionPaddingBottomPhone:40},slots:{[r]:[{type:l,props:{}}]}},{type:n,props:{...a,align:"stretch",name:"Breadcrumb",...p(0,0,0,0)},slots:{[r]:[{type:"Breadcrumb",props:{items:[{label:"Home",href:"/"},{label:"Journal",href:"/journal"}],meta:"",[s]:m}}]}}];function x(){const e=O(L,(o,t)=>`article-${o}-${t.replace(/\./g,"-")}`).map(u);return{root:{props:{[_]:P}},content:e,zones:{}}}function u(e){const o=e.props[r];return Array.isArray(o)?{...e,props:{...e.props,[r]:o.map(t=>t.type===l?{...t,props:{...t.props,template:B(String(t.props.id))}}:t)}}:e}export{x as articlePageDocument};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={label:"Fitment picker",defaultProps:{}};export{e as FitmentPickerMeta};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import i from"../../../../../components/fitment/FitmentPickerPart.js";import{phoneKey as o}from"efficient-easel/draw";import{FitmentPickerMeta as r}from"./meta.js";const s={...r,render:e=>t(i,{layout:e.layout==="short"?"short":"tall",pickerColumns:e.pickerColumns,pickerColumnsPhone:e[o("pickerColumns")],editing:!!e.editor?.isEditing})};export{s as FitmentPickerRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PH as t}from"efficient-web-builder/format/lib/document/blocks/placeholders";const
|
|
1
|
+
import{PH as t}from"efficient-web-builder/format/lib/document/blocks/placeholders";const e={num:t.sectionNumber,title:"Specifications *table.*",description:t.body,footnote:"Add a short footnote here.",footnoteLinkText:"Contact us"},n={label:"Sizes",defaultProps:{dynamic:!1,num:"",title:"",description:"",wheel:"",showFilter:!0,tooltipDefaultOn:!0,footnote:"",footnoteLinkText:"",footnoteLinkHref:""}};export{e as FITMENTTABLE_PH,n as FitmentTableMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import r from"../../../../../components/pdp-dynamic/FitmentTableBlock.js";import{TYRE_SIZES_HEAD as d}from"../../../../../components/TyreSizeGrid.js";import{hidableText as a}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as c}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as e,phHideDefault as m}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{FitmentTableMeta as T,FITMENTTABLE_PH as i}from"./meta.js";const F={...T,render:t=>{const o=c(t.headPlacement)==="own-box",n=f=>o?void 0:f;return l(r,{dynamic:t.dynamic,wheel:t.wheel,num:n(e(t.num,i.num,t.editor)),title:n(e(t.title,i.title,t.editor)),description:n(e(t.description,i.description,t.editor)),tyreHead:o?void 0:{title:m(t.title,d.title,t.editor),description:m(t.description,d.description,t.editor)},omitHead:o,showFilter:t.showFilter,tooltipDefaultOn:t.tooltipDefaultOn,footnote:e(t.footnote,i.footnote,t.editor),footnoteLinkText:e(t.footnoteLinkText,i.footnoteLinkText,t.editor),footnoteLinkHref:a(t.footnoteLinkHref),editing:t.editor?.isEditing})}};export{F as FitmentTableRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as m}from"react/jsx-runtime";import{phoneKey as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{phoneKey as c}from"efficient-easel/draw";import f from"../../../../../components/pdp-dynamic/DynamicRelatedProducts.js";import{DEFAULT_RELATIONSHIP as C}from"../../../../catalog/relationships.js";import{resolveWidth as s}from"efficient-web-builder/format/lib/content/section-width";import P from"../../../../../components/ProductGridSection.js";import{resolveBoundCardImageBackground as B}from"efficient-web-builder/format/lib/content/card-image-background";import{hidableText as x}from"efficient-easel/screen/lib/document/hidable";import{parseCoverIndex as k}from"../../../../wheels/cover-rendering.js";import{cardHoverOf as u}from"efficient-web-builder/format/lib/animation/hover";import{parseSectionHeadPlacement as I}from"efficient-web-builder/format/lib/sections/section-head-placement";import{parseCardOutline as g,parseCardIndexFormat as h}from"efficient-web-builder/format/lib/sections/product-card-style";import{PH as t}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{phHide as i}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{PRODUCTGRID_PH as n}from"../placeholders.js";import{ProductGridMeta as y}from"./meta.js";const K={...y,render:e=>{if(e.dynamic)return m(f,{num:i(e.num,n.num,e.editor),title:i(e.title,t.sectionHeading,e.editor),description:i(e.description,t.body,e.editor),columns:typeof e.columns=="number"?e.columns:3,relationship:C,cardImage:e.cardImage,outline:g(e.outline),indexBadge:h(e.indexBadge),showBadge:e.showBadge??!0,hover:u(e,"ProductGrid"),imageBackground:B(e.imageBackground),showCardPrice:e.showCardPrice,showCardFinishes:e.showCardFinishes,showCardSizes:e.showCardSizes,showCardBuy:e.showCardBuy,showCardPage:e.showCardPage,editing:e.editor?.isEditing});const a=i(e.linkText,n.link,e.editor),o=e.source,l=s(e,"full"),r=I(e.headPlacement)==="own-box",d=w=>r?void 0:w;return m(P,{gap:e.gap,gapPhone:e[c("gap")],contentCapped:l.mode==="page",num:d(i(e.num,n.num,e.editor)),title:d(i(e.title,t.sectionHeading,e.editor)),titleSize:e.titleSize,padTop:r?0:e.padTop,description:d(i(e.description,t.body,e.editor)),link:d(a?{text:a,href:x(e.linkHref)||"#"}:void 0),products:e.products,wheels:e.wheels,source:o?.slug?o:void 0,catalog:e.catalog,kinds:e.kinds,fieldUsage:e.fieldUsage,columns:e.columns,columnsPhone:e[c("columns")],limit:e.showAll?void 0:e.limit,editing:e.editor?.isEditing,imageBackground:e.imageBackground,cardImage:e.cardImage,hover:u(e,"ProductGrid"),coverIndex:k(e.coverIndex),outline:g(e.outline),indexBadge:h(e.indexBadge),showBadge:e.showBadge??!0,showCardPrice:e.showCardPrice,showCardFinishes:e.showCardFinishes,showCardSizes:e.showCardSizes,showCardBuy:e.showCardBuy,showCardPage:e.showCardPage})}};export{K as ProductGridRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as g}from"react/jsx-runtime";import h from"../../../../../components/pdp-dynamic/DynamicSpecTable.js";import w from"../../../../../components/SpecTable.js";import{buildSpecSheet as b,buildLegacySpecSheet as y}from"../../../../wheels/spec-sheet.js";import{parseSectionHeadPlacement as S}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as n}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{SpecTableMeta as
|
|
1
|
+
import{jsx as g}from"react/jsx-runtime";import h from"../../../../../components/pdp-dynamic/DynamicSpecTable.js";import w from"../../../../../components/SpecTable.js";import{buildSpecSheet as b,buildLegacySpecSheet as y}from"../../../../wheels/spec-sheet.js";import{parseSectionHeadPlacement as S}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as n}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{SpecTableMeta as E,SPECTABLE_PH as a}from"./meta.js";const z={...E,render:e=>{const m=S(e.headPlacement)==="own-box",t=i=>m?void 0:i;if(e.dynamic)return g(h,{nodeId:typeof e.id=="string"?e.id:void 0,num:t(n(e.num,a.num,e.editor)),title:t(n(e.title,a.title,e.editor)),description:t(n(e.description,a.description,e.editor)),showDiagram:e.showDiagram!==!1,omitHead:m,editing:e.editor?.isEditing,template:e.template,showEuLabel:e.showEuLabel===!0});const l=e.source??null,o=e.wheel,s=!l?.slug&&typeof o=="string"?o:"",r=typeof e.finish=="string"?e.finish:"",u=typeof e.size=="string"?e.size:"";let d,f=!0,c=null;if(l?.slug&&l.spec){const i=b(l,r,u);d=i.rows,c=e.showDiagram===!1?null:i.diagram}else if(s){const i=y(s,r,u);d=i.rows,c=e.showDiagram===!1?null:i.diagram}else d=e.rows??[],f=!1;return g(w,{capped:!1,nodeId:typeof e.id=="string"?e.id:void 0,num:t(n(e.num,a.num,e.editor)),title:t(n(e.title,a.title,e.editor)),description:t(n(e.description,a.description,e.editor)),rows:d,builtInLabels:f,diagram:c,omitHead:m,editing:e.editor?.isEditing,template:e.template})}};export{z as SpecTableRender};
|