efficient-storefront-blocks 0.94.0 → 0.96.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 +38 -0
- package/README.md +1 -0
- package/dist/chunks/{EditorPreviewCheckout-OPDSFBJH.js → EditorPreviewCheckout-BXTY7X47.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-ZP6NAWYT.js → SiteEditorProvider-JF3MS6J7.js} +1 -1
- package/dist/chunks/{chunk-ATCBSW73.js → chunk-KJQS4BOV.js} +1 -1
- package/dist/chunks/chunk-QNBU3FGY.js +1 -0
- package/dist/chunks/{chunk-CEFKTE5A.js → chunk-YCB5WS3U.js} +1 -1
- package/dist/chunks/chunk-Z2TVM6MN.js +389 -0
- package/dist/chunks/{fitment-data-IPAMN5IH.js → fitment-data-KWJP5ZQB.js} +1 -1
- package/dist/editor/lib/document/blocks/commerce/AlloyWheelsListing/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/AppointmentBooking/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/BookingBox/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/ContactRouting/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
- package/dist/editor/lib/document/config.d.ts +1 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +6 -1
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.js +33 -33
- package/dist/links.js +1 -1
- package/dist/render/app/globals.css +11 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/AppointmentBooking.d.ts +3 -1
- package/dist/render/components/AppointmentBooking.js +1 -1
- package/dist/render/components/ContactRouting.d.ts +9 -1
- package/dist/render/components/ContactRouting.js +1 -1
- package/dist/render/components/CountrySelect.js +1 -1
- package/dist/render/components/FooterMenu.js +1 -1
- package/dist/render/components/MenuLinkBlock.js +1 -1
- package/dist/render/components/SpecTable.js +1 -1
- package/dist/render/components/booking/BookingBox.d.ts +5 -1
- package/dist/render/components/booking/BookingBox.js +1 -1
- package/dist/render/components/booking/BookingFormState.d.ts +9 -0
- package/dist/render/components/booking/BookingFormState.js +1 -1
- package/dist/render/components/booking/BookingRegions.d.ts +9 -1
- package/dist/render/components/booking/BookingRegions.js +1 -1
- package/dist/render/components/card-ground-cell.d.ts +2 -0
- package/dist/render/components/card-ground-cell.js +1 -0
- package/dist/render/components/wheels-plp/AlloyWheelsListing.d.ts +3 -2
- package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
- package/dist/render/components/wheels-plp/PlpFacetRows.d.ts +14 -0
- package/dist/render/components/wheels-plp/PlpFacetRows.js +1 -0
- package/dist/render/components/wheels-plp/PlpSidebar.d.ts +7 -1
- package/dist/render/components/wheels-plp/PlpSidebar.js +1 -1
- package/dist/render/components/wheels-plp/PlpTypePicker.d.ts +8 -2
- package/dist/render/components/wheels-plp/PlpTypePicker.js +1 -1
- package/dist/render/lib/booking/appointment-time.d.ts +1 -0
- package/dist/render/lib/booking/appointment-time.js +1 -1
- package/dist/render/lib/content/booking-card-seed.d.ts +35 -0
- package/dist/render/lib/content/booking-card-seed.js +1 -0
- package/dist/render/lib/content/contact-card-seed.d.ts +15 -0
- package/dist/render/lib/content/contact-card-seed.js +1 -0
- package/dist/render/lib/content/copy-mark.d.ts +1 -0
- package/dist/render/lib/content/copy-mark.js +1 -0
- package/dist/render/lib/content/facet-row-seed.d.ts +139 -0
- package/dist/render/lib/content/facet-row-seed.js +1 -0
- package/dist/render/lib/content/tab-strip.d.ts +3 -2
- package/dist/render/lib/content/tab-strip.js +1 -1
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/meta.d.ts +4 -0
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/render.js +1 -1
- package/dist/render/lib/document/blocks/service/AppointmentBooking/meta.d.ts +8 -0
- package/dist/render/lib/document/blocks/service/AppointmentBooking/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/AppointmentBooking/render.js +1 -1
- package/dist/render/lib/document/blocks/service/BookingBox/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/BookingBox/render.js +1 -1
- package/dist/render/lib/document/blocks/service/ContactRouting/meta.d.ts +14 -0
- package/dist/render/lib/document/blocks/service/ContactRouting/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/ContactRouting/render.js +1 -1
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/render-config.d.ts +1 -0
- package/dist/render/lib/document/render-config.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-listing.d.ts +2 -0
- package/dist/render/lib/document/section-to-box-rows-listing.js +1 -0
- package/dist/render/lib/document/storefront-root.js +1 -1
- package/dist/render/lib/menu-link.d.ts +1 -0
- package/dist/render/lib/menu-link.js +1 -1
- package/dist/render/lib/sections/filter-option-rows.d.ts +5 -4
- package/dist/render/lib/sections/filter-option-rows.js +1 -1
- package/dist/render/lib/wheels/plp-filters.d.ts +4 -0
- package/dist/render/lib/wheels/plp-filters.js +1 -1
- package/dist/words.d.ts +23 -1
- package/dist/words.js +5 -5
- package/package.json +4 -3
- package/dist/chunks/chunk-JKJ76CRT.js +0 -388
- package/dist/chunks/chunk-JTDOMQMQ.js +0 -1
- /package/dist/chunks/{chunk-LRLOANKA.js → chunk-KNUGQTUV.js} +0 -0
- /package/dist/chunks/{chunk-JKJ76CRT.js.LEGAL.txt → chunk-Z2TVM6MN.js.LEGAL.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as p,Fragment as
|
|
1
|
+
"use client";import{jsx as r,jsxs as p,Fragment as $e}from"react/jsx-runtime";import{useScopeClass as He}from"../../lib/use-scope-class.js";import{useCallback as d,useEffect as Ye,useMemo as i,useRef as qe,useState as Je}from"react";import{cardHoverOf as Qe}from"efficient-web-builder/format/lib/animation/hover";import{SHARED_ROWS_LIST_CLASS as Ue}from"efficient-web-builder/render/lib/content/box-shared-columns";import{NO_FIELD_ANSWERS as Xe,answersForKind as ne}from"../../lib/content/field-usage.js";import{useCurrency as Ze}from"../CurrencyContext.js";import et from"../NoCurrencyNote.js";import{usePreviewDevice as tt}from"efficient-easel/screen/components/PreviewDeviceContext";import{renderGold as ot,renderHeadline as rt}from"efficient-web-builder/render/components/goldPhrases";import{useUnifiedProductCatalog as nt}from"../useProductCatalog.js";import{scrollBehavior as st}from"efficient-web-builder/render/components/useReducedMotion";import{normalizePlpColumns as it,PLP_GRID_GAP_VAR as se,plpGridVars as lt}from"../../lib/wheels/plp-grid.js";import{plpCardImageSizes as at}from"../../lib/sections/card-image-sizes.js";import{CARD_ROWS_GRID_CLASS as ct,cardRowsGridStyle as pt}from"../WheelCardFrame.js";import{applyPlpFilters as dt,buildPlpFacets as mt,buildPlpTypeOptions as ut,buildTyreSizeBoxes as ht,EMPTY_PLP_FILTERS as ie,hasActivePlpFilters as ft,paginatePlp as gt,pickTyreSize as yt,plpTyreSizeBoxesShown as St,plpInStockCount as xt,plpOpeningSort as wt,plpPriceBounds as bt,plpShownKinds as vt,plpSortKeysFor as Pt,PLP_SORT_LABELS as kt}from"../../lib/wheels/plp-filters.js";import{itemKind as z,itemSlug as Nt,itemTyreSizes as Ct,plpBrandVaries as Tt,plpProcessVaries as _t,plpItemsOfKinds as At,plpKindNoun as le,resolvePlpKinds as zt}from"../../lib/catalog/plp-item.js";import{plpGateWords as Lt,plpVehicleCopy as Ot}from"../../lib/catalog/plp-vehicle-copy.js";import{oemBadgeSize as Rt,oemTyreSizes as Ft}from"../../lib/tyres/tyre-vehicle-fitment.js";import{wheelsFittingVehicle as Gt}from"../../lib/wheels/plp-fitment-match.js";import It from"./PlpActiveChips.js";import{GridCardProvider as Vt,GridMixedCards as Et,gridIndexCss as Kt,LISTING_CARD_RULES as jt}from"../GridCardTemplate.js";import{wheelCardEyebrowShows as Bt}from"../ProductCardEyebrow.js";import Mt from"./PlpPagination.js";import Dt from"./PlpSidebar.js";import{PlpResultRange as Wt,PlpToolbar as $t}from"./PlpToolbar.js";import Ht from"../catalog/SortSelect.js";import Yt from"./PlpVehicleBar.js";import qt from"./PlpVehicleGate.js";import{useVehicleCatalog as Jt}from"./useVehicleCatalog.js";import{useVehicleFit as Qt}from"../fitment/useVehicleFit.js";import{usePlpFiltersInUrl as Ut}from"./usePlpFiltersInUrl.js";import{say as I}from"efficient-web-builder/format/lib/editor-words";const Go={heading:"Let's find wheels that fit your car.",intro:"Tell us what you drive and we'll show you every set that bolts straight on — bolt pattern, offset and hub bore checked for you."};function Xt({level:v,className:P,children:k}){return r(v===2?"h2":"h1",{className:P,children:k})}const Zt=Qe({},"AlloyWheelsListing");function eo({heading:v="",intro:P="",askForCar:k=!0,gateHeading:V="",gateIntro:ae="",perPage:E=24,columns:ce,defaultSort:pe="recommended",hiddenFacets:de=[],fieldUsage:f=Xe,showPrice:K=!0,showInStock:me=!0,kinds:ue,products:he,wheels:fe,requestQuery:ge,editing:m=!1,ownerId:j="",template:ye,facetTemplate:Se,hover:xe=Zt,titleLevel:we,omitHead:B=!1}){const{currency:a}=Ze(),u=zt(ue),M=tt(),D=it(ce),be=lt(D,m?M:null),ve=at(D,m?M:null),W=He("plp"),Pe=Kt(W),ke=nt(),$=he??fe??ke??[],H=i(()=>At($,u),[$,u.join(",")]),o=Qt({editing:m,enabled:k,autoApply:!0}),[Ne,L]=Je(!1),Ce=wt(pe,u),g=o.applied?.vehicle??null,[e,x]=Ut({editing:m,openingSort:Ce,appliedVehicle:g,vehicleRestored:o.restored,requestQuery:ge}),c=vt(u,e.kind),s=d(t=>x(t),[x]),Y=d((t,h)=>{const l=e[t],De=l.map(String).includes(h)?l.filter(We=>String(We)!==h):[...l,t==="diameters"?Number(h):h];s({...e,[t]:De,page:1})},[e,s]),q=d(t=>s({...e,priceMax:t,page:1}),[e,s]),J=d(t=>s({...e,inStockOnly:t,page:1}),[e,s]),Q=d(t=>s({...ie,kind:t,inStockOnly:e.inStockOnly,priceMax:e.priceMax,sort:e.sort}),[e.inStockOnly,e.priceMax,e.sort,s]),Te=d(t=>s({...e,sort:t,page:1}),[e,s]),_e=d(t=>{s({...e,page:t}),typeof window<"u"&&window.scrollTo({top:0,behavior:st()})},[e,s]),U=d(()=>s({...ie,sort:e.sort}),[e.sort,s]),{clear:C}=o,X=d(()=>{C(),L(!0),x(t=>({...t,page:1}))},[C]),Ae=d(()=>{C(),L(!1),x(t=>({...t,page:1}))},[C]),T=g?[g.make,g.model,g.year,g.modification].join("|"):"",_=qe(null);Ye(()=>{if(o.restored){if(_.current===null){_.current=T;return}_.current!==T&&(_.current=T,x(t=>t.page===1?t:{...t,page:1}))}},[o.restored,T,x]);const A=Jt({catalog:H,shownKinds:u,vehicle:g,editing:m}),n=i(()=>{if(!o.fit)return A;const t=A.filter(l=>z(l)==="alloy-wheel"),h=new Set(Gt(t,o.fit).map(l=>l.slug));return A.filter(l=>z(l)!=="alloy-wheel"||h.has(Nt(l)))},[A,o.fit]),w=de.join(","),ze=i(()=>{const t=new Set(w?w.split(","):[]);return mt(n,e,a,c,f).filter(h=>!t.has(h.key))},[n,e,a,w,c.join(","),f]),y=i(()=>dt(n,e,a),[n,e,a]),Le=c.length>1,Z=i(()=>ne(f,"alloy-wheel"),[f]),Oe=i(()=>ne(f,"tyre"),[f]),O=i(()=>Tt(y),[y]),R=i(()=>_t(y),[y]),F=Le?le(["alloy-wheel"]).one:null,Re=i(()=>({kindLabel:F,brand:O,process:R}),[F,O,R]),Fe=Bt({kind:!!F,brand:O,process:R},Z),Ge=i(()=>K?bt(n,a):null,[n,a,K]),Ie=i(()=>xt(n,e,a),[n,e,a]),Ve=i(()=>ut(n,u,e,a),[n,u.join(","),e,a]),Ee=d((t,h)=>{const l=yt(n.flatMap(Ct),e.tyreSizes[0]??"",t,h);s({...e,tyreSizes:l?[l]:[],page:1})},[n,e,s]),Ke=i(()=>{const t=new Set(w?w.split(","):[]);return!St(n,c)||t.has("tyreSizes")?null:ht(n,e,a)},[n,e,a,w,c.join(","),f]),S=i(()=>gt(y,e.page,E),[y,e.page,E]),b=le(c),G=Ot(c),ee=Lt(V,ae,c,u),te=c.length===1&&c[0]==="tyre",oe=o.applied?.stock??null,N=i(()=>Ft(oe),[oe]),je=i(()=>n.filter(t=>c.includes(z(t))).length,[n,c.join(",")]),re=H.length===0,Be=!re&&n.length===0,Me=k&&!m&&!o.applied&&!Ne;return u.length===0?null:p("section",{children:[k&&r(Yt,{cascade:o.cascade,appliedName:o.appliedName,fit:o.fit,fitSummary:te&&N.length>0?`Takes ${N.join(" · ")}`:null,resolving:o.resolving,unresolved:te?!!o.applied&&!o.resolving&&N.length===0:o.unresolved,matchCount:je,copy:G,onAmend:Ae,onClear:X}),Me&&r(qt,{cascade:o.cascade,heading:ee.heading,intro:ee.intro,ready:o.restored,copy:G,onSkip:()=>L(!0)}),p("div",{className:B?void 0:"px-5 py-10 md:px-[max(2.5rem,calc((100%_-_var(--sf-content-cap,100%))/2_+_2.5rem))]",children:[!B&&(v||P)&&p("header",{className:"mb-6",children:[v&&r(Xt,{level:we,className:"font-display text-[clamp(28px,4vw,40px)] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] leading-[1.05] tracking-[-0.02em]",children:rt(v,!1)}),P&&r("p",{className:"mt-2 max-w-[60ch] text-[15px] text-fg-dim",children:ot(P)})]}),p("div",{className:"flex flex-col gap-8 lg:flex-row lg:items-start",children:[r(Dt,{facets:ze,filters:e,typeOptions:Ve,sizeBoxes:Ke,sizeMatches:e.tyreSizes.length>0?y.length:null,noun:b,priceBounds:Ge,inStockCount:me?Ie:null,onToggle:Y,onPickType:Q,onPickSize:Ee,onPriceMax:q,onInStockOnly:J,onClearAll:U,owner:{id:j,facetTemplate:Se},editing:m}),p("div",{className:"min-w-0 flex-1",children:[r($t,{className:"mb-4",start:p($e,{children:[r(Wt,{total:S.total,range:{from:S.from,to:S.to},noun:b}),r(It,{filters:e,onToggle:Y,onPriceMax:q,onInStockOnly:J,onPickType:Q})]}),end:r(Ht,{value:e.sort,keys:Pt(u),labels:kt,onChange:Te})}),re?r("div",{className:"border border-dashed border-line p-10",children:r("p",{className:"font-mono text-[12px] uppercase tracking-[0.16em] text-fg-dim",children:m?b.many==="wheels"?I("No wheels in this website's catalog yet — curate products to see them here."):b.many==="tyres"?I("No tyres in this website's catalog yet — curate products to see them here."):I("No products in this website's catalog yet — curate products to see them here."):"Our catalog is being updated. Please check back shortly."})}):Be?p("div",{className:"border border-line p-10",children:[p("h3",{className:"font-display text-[22px] font-medium uppercase tracking-[-0.01em]",children:["No confirmed fit for your ",o.appliedName]}),r("p",{className:"mt-2 max-w-[52ch] text-[14px] text-fg-dim",children:G.nothingFits}),p("button",{type:"button",onClick:X,className:"mt-4 cursor-pointer bg-btn px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-btn-ink hover:bg-fg",children:["Show all ",b.many]})]}):S.total===0?p("div",{className:"border border-line p-10",children:[p("h3",{className:"font-display text-[22px] font-medium uppercase tracking-[-0.01em]",children:["No ",b.many," match those filters"]}),r("p",{className:"mt-2 max-w-[46ch] text-[14px] text-fg-dim",children:"Try widening the price range or clearing a filter."}),ft(e)&&r("button",{type:"button",onClick:U,className:"mt-4 cursor-pointer bg-btn px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-btn-ink hover:bg-fg",children:"Clear all filters"})]}):p(Vt,{value:{ownerId:j,ownerType:"AlloyWheelsListing",Template:ye,hover:xe,imageSizes:ve,fieldUsage:Z,tyreFieldUsage:Oe,reserveEyebrow:Fe,editing:m,eyebrow:Re,fit:o.fit,colours:e.finishes,setGridGap:`var(${se})`,rules:jt},children:[r("style",{children:Pe}),r("div",{className:`plp-card-grid ${W} ${ct} ${Ue}`,style:{...be,...pt(`var(${se})`)},children:r(Et,{items:S.items,tyreOf:t=>z(t)==="tyre"?t:null,tyreFit:t=>N.length>0?Rt(t.sizes,N):null})})]}),r(Mt,{page:S.page,pageCount:S.pageCount,onPage:_e}),r(et,{editing:m})]})]})]})]})}export{Go as PLP_GATE_DEFAULTS,eo as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SlotComponent } from "efficient-easel/blocks";
|
|
2
|
+
import { type FacetRow } from "../../lib/content/facet-row-seed.js";
|
|
3
|
+
import type { OptionCardRows } from "../../lib/sections/filter-option-rows.js";
|
|
4
|
+
export default function PlpFacetRows({ owner, rows, dead, label, className, editing, }: {
|
|
5
|
+
owner: {
|
|
6
|
+
id: string;
|
|
7
|
+
facetTemplate?: SlotComponent;
|
|
8
|
+
};
|
|
9
|
+
rows: OptionCardRows<FacetRow>;
|
|
10
|
+
dead: readonly boolean[];
|
|
11
|
+
label?: string;
|
|
12
|
+
className: string;
|
|
13
|
+
editing: boolean;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{CardTemplateRows as n}from"efficient-web-builder/render/components/CardRowContext";import{InsideSiteColumn as c}from"efficient-web-builder/render/components/SiteGutterFrame";import{COPY_MARK as T}from"../../lib/content/copy-mark.js";import{FACET_TEMPLATE_SLOT as p,FACET_TICK as C,FACET_TICK_INK_CLASS as d,FACET_TICK_VAR as f}from"../../lib/content/facet-row-seed.js";const _={[f]:`url("${C}")`};function u({owner:i,rows:l,dead:a,label:o,className:s,editing:r}){return e("ul",{className:`flex flex-col ${s} ${T} ${d}`,style:_,"aria-label":o,children:e(c,{children:e(n,{ownerId:i.id,ownerType:"AlloyWheelsListing",slot:p,Template:i.facetTemplate,rows:l.items,states:l.states,actions:r?void 0:l.actions,fallback:null,wrapCopy:(t,m)=>e("li",{className:a[m.index]?"-mx-3 opacity-40":"-mx-3",children:t}),children:t=>t})})})}export{u as default};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { SlotComponent } from "efficient-easel/blocks";
|
|
1
2
|
import type { ProductKind } from "../../lib/api/index.js";
|
|
2
3
|
import type { TyreSizePart } from "../../lib/tyres/tyre-size.js";
|
|
3
4
|
import { type PlpFacetGroup, type PlpFacetKey, type PlpFilterState, type PlpTypeOption, type PlpTyreSizeBox } from "../../lib/wheels/plp-filters.js";
|
|
4
|
-
export default function PlpSidebar({ facets, filters, typeOptions, sizeBoxes, sizeMatches, noun, priceBounds, inStockCount, onToggle, onPickType, onPickSize, onPriceMax, onInStockOnly, onClearAll, }: {
|
|
5
|
+
export default function PlpSidebar({ facets, filters, typeOptions, sizeBoxes, sizeMatches, noun, priceBounds, inStockCount, onToggle, onPickType, onPickSize, onPriceMax, onInStockOnly, onClearAll, owner, editing, }: {
|
|
5
6
|
facets: PlpFacetGroup[];
|
|
6
7
|
filters: PlpFilterState;
|
|
7
8
|
typeOptions: PlpTypeOption[];
|
|
@@ -22,4 +23,9 @@ export default function PlpSidebar({ facets, filters, typeOptions, sizeBoxes, si
|
|
|
22
23
|
onPriceMax: (value: number | null) => void;
|
|
23
24
|
onInStockOnly: (value: boolean) => void;
|
|
24
25
|
onClearAll: () => void;
|
|
26
|
+
owner: {
|
|
27
|
+
id: string;
|
|
28
|
+
facetTemplate?: SlotComponent;
|
|
29
|
+
};
|
|
30
|
+
editing?: boolean;
|
|
25
31
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as a,jsxs as r}from"react/jsx-runtime";import z from"../catalog/ClearAllButton.js";import{useState as T}from"react";import{useCurrency as E}from"../CurrencyContext.js";import{useEnglish as F}from"../EnglishVariant.js";import{formatPrice as u}from"../../lib/commerce.js";import{facetRow as A}from"../../lib/content/facet-row-seed.js";import{optionCardRows as _}from"../../lib/sections/filter-option-rows.js";import{hasActivePlpFilters as L,isDeadPlpOption as g,PLP_FACET_LABELS as M}from"../../lib/wheels/plp-filters.js";import R from"./PlpFacetRows.js";import O from"./PlpInStockToggle.js";import D from"./PlpTypePicker.js";import I from"./PlpTyreSizeBoxes.js";function U({facets:o,filters:t,typeOptions:c,sizeBoxes:m,sizeMatches:k,noun:s,priceBounds:n,inStockCount:f,onToggle:N,onPickType:w,onPickSize:P,onPriceMax:S,onInStockOnly:C,onClearAll:$,owner:x,editing:h=!1}){const{currency:y}=E(),p=F(),[d,b]=T({});return r("aside",{className:"-mx-3 w-[calc(100%+1.5rem)] flex-none px-3 lg:sticky lg:[--sf-plp-rail-gap:16px] lg:[--sf-plp-rail-top:calc(var(--sf-header-h,88px)+var(--sf-plp-rail-gap))] lg:top-[var(--sf-plp-rail-top)] lg:max-h-[calc(100svh-var(--sf-plp-rail-top)-var(--sf-plp-rail-gap))] lg:w-[292px] lg:overflow-y-auto lg:overscroll-contain lg:pr-[22px]",children:[r("div",{className:"flex items-center justify-between pb-2",children:[a("h2",{className:"font-display text-[18px] font-medium uppercase tracking-[-0.01em]",children:"Filter"}),L(t)&&a(z,{onClick:$,size:"text-[11px]"})]}),c.length>0&&a("div",{className:"pb-1 pt-1",children:a(D,{options:c,noun:s.many,onPick:w,owner:x,editing:h})}),f!==null&&a("div",{className:"border-t border-line py-2",children:a(O,{checked:t.inStockOnly,count:f,noun:s.many,onChange:C})}),m&&a(v,{label:p(M.tyreSizes),open:!d.tyreSizes,onToggle:()=>b(e=>({...e,tyreSizes:!e.tyreSizes})),children:!d.tyreSizes&&a("div",{className:"pb-3",children:a(I,{boxes:m,composed:t.tyreSizes[0]??"",matches:k,noun:s.many,onPick:P})})}),o.map(e=>{if(e.options.length===0)return null;const i=!d[e.key],j=_(e.options,{item:l=>A(l,l.checked),selected:l=>l.checked,press:l=>()=>N(e.key,l.value),label:l=>`${p(e.label)}: ${l.label} (${l.count} ${s.many})`,disabled:g});return a(v,{label:p(e.label),open:i,onToggle:()=>b(l=>({...l,[e.key]:!l[e.key]})),children:i&&a(R,{owner:x,rows:j,dead:e.options.map(g),label:p(e.label),className:"pb-3",editing:h})},e.key)}),n&&r("div",{className:"border-t border-line py-3",children:[r("span",{className:"font-mono text-[11px] uppercase tracking-[0.2em]",children:["Price · per ",s.one]}),a("input",{type:"range",min:n.min,max:n.max,step:5,value:t.priceMax??n.max,onChange:e=>{const i=Number(e.target.value);S(i>=n.max?null:i)},className:"mt-2 w-full accent-[var(--accent)]","aria-label":`Maximum price per ${s.one}`}),r("div",{className:"mt-1.5 flex justify-between font-mono text-[11px] tabular-nums",children:[a("span",{className:"text-fg-dim",children:u(n.min,y)}),r("span",{children:["Up to ",u(t.priceMax??n.max,y)]})]})]})]})}function v({label:o,open:t,onToggle:c,children:m}){return r("div",{className:"border-t border-line",children:[r("button",{type:"button",onClick:c,"aria-expanded":t,"aria-label":`${t?"Collapse":"Expand"} ${o} filters`,className:"flex w-full cursor-pointer items-center justify-between py-3 text-left",children:[a("span",{className:"font-mono text-[11px] uppercase tracking-[0.2em]",children:o}),a("span",{"aria-hidden":"true",className:`font-mono text-[10px] text-fg-dim transition-transform ${t?"rotate-180":""}`,children:"▾"})]}),m]})}export{U as default};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SlotComponent } from "efficient-easel/blocks";
|
|
2
|
+
import { type PlpTypeOption } from "../../lib/wheels/plp-filters.js";
|
|
2
3
|
import type { ProductKind } from "../../lib/api/index.js";
|
|
3
|
-
export default function PlpTypePicker({ options, noun, onPick, }: {
|
|
4
|
+
export default function PlpTypePicker({ options, noun, onPick, owner, editing, }: {
|
|
4
5
|
options: PlpTypeOption[];
|
|
5
6
|
noun: string;
|
|
6
7
|
onPick: (kind: ProductKind | null) => void;
|
|
8
|
+
owner: {
|
|
9
|
+
id: string;
|
|
10
|
+
facetTemplate?: SlotComponent;
|
|
11
|
+
};
|
|
12
|
+
editing?: boolean;
|
|
7
13
|
}): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{isDeadPlpOption as s}from"../../lib/wheels/plp-filters.js";import{typeRow as p}from"../../lib/content/facet-row-seed.js";import{optionCardRows as i}from"../../lib/sections/filter-option-rows.js";import m from"./PlpFacetRows.js";function f({options:r,noun:c,onPick:a,owner:l,editing:o=!1}){if(r.length===0)return null;const d=i(r,{item:e=>p(e,e.checked),selected:e=>e.checked,press:e=>()=>a(e.kind),label:e=>`${e.label} (${e.count} ${c})`,disabled:s});return n("fieldset",{className:"rounded-lg border border-accent/35 bg-accent/[0.05] px-3 pb-3 pt-3",children:[t("legend",{className:"px-0 font-mono text-[11px] uppercase tracking-[0.2em] text-accent",children:"Product type"}),t(m,{owner:l,rows:d,dead:r.map(s),className:"pt-2",editing:o})]})}export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i=void 0,r={hour:"numeric",minute:"2-digit"},o={weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"};function a(t,e){try{return new Intl.DateTimeFormat(void 0,{...r,timeZone:e}).format(new Date(t))}catch{return new Date(t).toLocaleTimeString([],r)}}function m(t,e){try{return new Intl.DateTimeFormat(void 0,{...o,timeZone:e}).format(new Date(t))}catch{return new Date(t).toLocaleString()}}function c(t,e){const n=Date.parse(t);return Number.isFinite(n)&&n<=e}export{m as formatAppointment,a as formatAppointmentTime,c as startHasPassed};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type CardRowFieldSpec } from "efficient-web-builder/format/lib/content/card-template";
|
|
2
|
+
import { type SeededNode } from "efficient-web-builder/format/lib/document/seed-parts";
|
|
3
|
+
type Props = Record<string, unknown>;
|
|
4
|
+
export declare const BOOKING_SERVICE_SLOT = "serviceTemplate";
|
|
5
|
+
export declare const BOOKING_TIME_SLOT = "timeTemplate";
|
|
6
|
+
export declare const BOOKING_SERVICE_FIELDS: readonly CardRowFieldSpec[];
|
|
7
|
+
export declare const BOOKING_TIME_FIELDS: readonly CardRowFieldSpec[];
|
|
8
|
+
export declare const BOOKING_TEMPLATE_SLOTS: readonly [{
|
|
9
|
+
readonly slot: "serviceTemplate";
|
|
10
|
+
readonly label: "Service template";
|
|
11
|
+
readonly fields: readonly CardRowFieldSpec[];
|
|
12
|
+
}, {
|
|
13
|
+
readonly slot: "timeTemplate";
|
|
14
|
+
readonly label: "Time template";
|
|
15
|
+
readonly fields: readonly CardRowFieldSpec[];
|
|
16
|
+
}];
|
|
17
|
+
export declare const BOOKING_OPTION_FIELDS: readonly CardRowFieldSpec[];
|
|
18
|
+
export declare const BOOKING_OPTION_ALLOW: readonly ["Text", "Flex"];
|
|
19
|
+
export declare const BOOKING_TEMPLATE_SLOT_FIELDS: {
|
|
20
|
+
serviceTemplate: {
|
|
21
|
+
type: "slot";
|
|
22
|
+
allow: ("Flex" | "Text")[];
|
|
23
|
+
};
|
|
24
|
+
timeTemplate: {
|
|
25
|
+
type: "slot";
|
|
26
|
+
allow: ("Flex" | "Text")[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare const BOOKING_BOX_TYPE = "BookingBox";
|
|
30
|
+
export declare const APPOINTMENT_BOOKING_TYPE = "AppointmentBooking";
|
|
31
|
+
export declare function bookingServiceSeed(nodeId: string, props?: Props): SeededNode[];
|
|
32
|
+
export declare function bookingTimeSeed(nodeId: string, props?: Props): SeededNode[];
|
|
33
|
+
export declare function drawsBookingStep(type: string, props: Props): boolean;
|
|
34
|
+
export declare function withBookingTemplates(type: string, props: Props): Props;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{BOX_HIDE_WHEN_ROW_EMPTY as g}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as s}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as l}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as T,DIM as u,INNER_BOX as d,TEXT as _,boxPadding as f,seedNodes as S}from"efficient-web-builder/format/lib/document/seed-parts";import{parseSectionHeadPlacement as b}from"efficient-web-builder/format/lib/sections/section-head-placement";import{BOOKING_KIND_PROP as P,bookingKindRole as k}from"../booking/text-kinds.js";const p="serviceTemplate",O="timeTemplate",B=[{key:"name",label:"Service"},{key:"meta",label:"Duration · price"},{key:"description",label:"Service description",multiline:!0}],E=[{key:"time",label:"Time"},{key:"businessTime",label:"Business time"}],F=[{slot:p,label:"Service template",fields:B},{slot:O,label:"Time template",fields:E}],C=[...B,...E],I=["Text",o],W={[p]:{type:"slot",allow:[...I]},[O]:{type:"slot",allow:[...I]}},y="BookingBox",L="AppointmentBooking",a=(e,t,n={})=>({fontRole:e,size:t,...n});function c(e,t,n,i=!1){const r=k(n[P[t]]);if(!r)return e;const{fontRole:D,size:N,...x}=e;return{...x,role:r,...i?{size:N}:{}}}const m={lineHeight:1.5};function h(e){return{type:o,props:{...T,direction:"column",name:"Service",justify:"center",gap:12,gapPhone:12,...f(16,16),sectionBorder:{width:1}},slots:{[s]:[{type:o,props:{...d,name:"Words",gap:4,gapPhone:4},slots:{[s]:[l("name",{..._,tag:"span"},c(a("heading",18,{weight:500,...m}),"name",e)),l("meta",{...u,tag:"span"},c(a("label",11,{case:"upper",letterSpacing:.14,...m}),"value",e))]}},{type:o,props:{...d,name:"Description",[g]:["description"]},slots:{[s]:[l("description",{...u,tag:"span"},c(a("heading",14,m),"note",e))]}}]}}}function K(e){return{type:o,props:{...T,direction:"column",name:"Time",align:"center",justify:"center",gap:2,gapPhone:2,...f(8,12),sectionBorder:{width:1},sectionHeightMode:"fixed",sectionHeightValue:44,sectionHeightUnit:"px"},slots:{[s]:[l("time",{..._,tag:"span"},c(a("label",12,{weight:600,case:"upper",letterSpacing:.12,align:"center",...m}),"value",e)),{type:o,props:{...d,name:"Business time",align:"center",[g]:["businessTime"]},slots:{[s]:[l("businessTime",{...u,tag:"span"},c(a("label",9,{case:"upper",letterSpacing:.08,align:"center",...m}),"value",e,!0))]}}]}}}function v(e,t={}){return S([h(t)],(n,i)=>i==="0"?`${e}~service`:`${e}~service.${i.slice(2)}`)}function G(e,t={}){return S([K(t)],(n,i)=>i==="0"?`${e}~time`:`${e}~time.${i.slice(2)}`)}function w(e,t){return e===y?t.region==="booking":e===L?t.layout!=="boxes"||b(t.headPlacement)==="own-box":!1}function Y(e,t){if(!w(e,t))return t;const n=t[p]===void 0,i=t[O]===void 0;if(!n&&!i)return t;const r=typeof t.id=="string"&&t.id.trim()?t.id:e;return{...t,...n?{[p]:v(r,t)}:{},...i?{[O]:G(r,t)}:{}}}export{L as APPOINTMENT_BOOKING_TYPE,y as BOOKING_BOX_TYPE,I as BOOKING_OPTION_ALLOW,C as BOOKING_OPTION_FIELDS,B as BOOKING_SERVICE_FIELDS,p as BOOKING_SERVICE_SLOT,F as BOOKING_TEMPLATE_SLOTS,W as BOOKING_TEMPLATE_SLOT_FIELDS,E as BOOKING_TIME_FIELDS,O as BOOKING_TIME_SLOT,v as bookingServiceSeed,G as bookingTimeSeed,w as drawsBookingStep,Y as withBookingTemplates};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type CardRowFieldSpec } from "efficient-web-builder/format/lib/content/card-template";
|
|
2
|
+
import { type BlockSeed } from "efficient-web-builder/format/lib/document/seed-parts";
|
|
3
|
+
type Props = Record<string, unknown>;
|
|
4
|
+
export declare const CONTACT_TOPIC_SLOT = "template";
|
|
5
|
+
export declare const CONTACT_REASON_SLOT = "reasonTemplate";
|
|
6
|
+
export declare const CONTACT_CHANNEL_SLOT = "channelTemplate";
|
|
7
|
+
export declare const CONTACT_TOPIC_FIELDS: readonly CardRowFieldSpec[];
|
|
8
|
+
export declare const CONTACT_REASON_FIELDS: readonly CardRowFieldSpec[];
|
|
9
|
+
export declare const CONTACT_CHANNEL_FIELDS: readonly CardRowFieldSpec[];
|
|
10
|
+
export declare const CONTACT_TEMPLATE_ALLOW: readonly ["Text", "ImageBlock", "Flex"];
|
|
11
|
+
export declare const contactTopicSeed: () => BlockSeed;
|
|
12
|
+
export declare const contactReasonSeed: () => BlockSeed;
|
|
13
|
+
export declare const contactChannelSeed: () => BlockSeed;
|
|
14
|
+
export declare function withContactTemplates(props: Props): Props;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{BOX_HIDE_WHEN_ROW_EMPTY as E,CARD_ROW_LINK_PROP as u}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as l}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as n}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as b,DIM as r,INNER_BOX as S,LABEL_FACE as N,TEXT as c,boxPadding as d,seedNodes as f,token as T}from"efficient-web-builder/format/lib/document/seed-parts";const _="template",h="reasonTemplate",L="channelTemplate",y={key:"title",label:"Title",plain:!0},$=[{key:"eyebrow",label:"Eyebrow",plain:!0},y,{key:"copy",label:"Body",multiline:!0},{key:"response",label:"Response time"}],M=[y],V=[{key:"label",label:"Label",plain:!0},{key:"value",label:"Value",plain:!0},{key:"sub",label:"Sub line",plain:!0},{key:"href",label:"Link",kind:"link"}],Y=["Text","ImageBlock",o],p=(e,t)=>({...N,...T("label",e),letterSpacing:t,lineHeight:1.5}),m={...p(12,.24),color:"main"},P={textStyle:"heading-3",...T("headingSmall",26),weight:500,case:"upper",lineHeight:1.05,letterSpacing:-.02},x={textStyle:"heading-1",...T("body",14),weight:400,case:"none",lineHeight:1.5,letterSpacing:0,color:"muted"},C=p(12,.22),A=p(12,.2),w={...p(12,.3),color:"main"},R={textStyle:"heading-3",...T("headingSmall",24),weight:500,case:"none",lineHeight:1.2,letterSpacing:-.02},H={...p(12,.2),color:"muted"},s=(e,t,i={})=>({...S,name:e,gap:t,gapPhone:t,...i}),B=()=>({type:o,props:s("Topic",16,{justify:"between",...d(40,32),sectionHeightMode:"fixed",sectionHeightValue:240,sectionHeightUnit:"px"}),slots:{[l]:[{type:o,props:s("Head",16),slots:{[l]:[n("eyebrow",{...c,tag:"p",widthFit:"fill"},m),n("title",{...c,tag:"h3",widthFit:"fill"},P)]}},{type:o,props:s("Foot",24),slots:{[l]:[n("copy",{...r,tag:"p",widthFit:"fill"},x),{type:o,props:{...b,name:"Response",direction:"row",justify:"between",align:"center",gap:16,gapPhone:16,phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",...d(0,0),sectionPaddingTop:16,sectionPaddingTopPhone:16,sectionBorder:{top:1},[E]:["response"]},slots:{[l]:[{type:"Text",props:{...r,tag:"p",text:"Response",_partStyles:{text:C}}},n("response",{...c,tag:"p"},C)]}}]}}]}}),I=()=>({type:o,props:{...s("Reason",0),...d(12,16),sectionBorder:{width:1}},slots:{[l]:[n("title",{...r,tag:"p"},A)]}}),k=()=>({type:o,props:{...s("Channel",12),...d(32,20,20,20),sectionPaddingLeft:22,sectionPaddingTopTablet:20,sectionPaddingRightTablet:20,sectionPaddingBottomTablet:20,sectionPaddingLeftTablet:20,sectionBorder:{bottom:1}},slots:{[l]:[n("label",{...c,tag:"p",widthFit:"fill"},w),{type:o,props:{...s("Value",0),[u]:"href"},slots:{[l]:[n("value",{...c,tag:"p",widthFit:"fill"},R)]}},n("sub",{...r,tag:"p",widthFit:"fill"},H)]}});function g(e,t,i){return f([e],(O,a)=>a==="0"?`${t}~${i}`:`${t}~${i}.${a.slice(2)}`)}const F=e=>typeof e.id=="string"&&e.id.trim()?e.id:"ContactRouting";function U(e){const t=e[_]===void 0,i=e[h]===void 0,O=e[L]===void 0;if(!t&&!i&&!O)return e;const a=F(e);return{...e,...t?{[_]:g(B(),a,"topic")}:{},...i?{[h]:g(I(),a,"reason")}:{},...O?{[L]:g(k(),a,"channel")}:{}}}export{V as CONTACT_CHANNEL_FIELDS,L as CONTACT_CHANNEL_SLOT,M as CONTACT_REASON_FIELDS,h as CONTACT_REASON_SLOT,Y as CONTACT_TEMPLATE_ALLOW,$ as CONTACT_TOPIC_FIELDS,_ as CONTACT_TOPIC_SLOT,k as contactChannelSeed,I as contactReasonSeed,B as contactTopicSeed,U as withContactTemplates};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COPY_MARK: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="[&_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]";export{t as COPY_MARK};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { type SeededNode } from "efficient-web-builder/format/lib/document/seed-parts";
|
|
2
|
+
type Props = Record<string, unknown>;
|
|
3
|
+
export declare const FACET_TEMPLATE_SLOT = "facetTemplate";
|
|
4
|
+
export declare const FACET_TEMPLATE_LABEL = "Filter option template";
|
|
5
|
+
export declare const FACET_ROW_FIELDS: readonly [{
|
|
6
|
+
readonly key: "facetLabel";
|
|
7
|
+
readonly label: "Filter option";
|
|
8
|
+
}, {
|
|
9
|
+
readonly key: "facetName";
|
|
10
|
+
readonly label: "Type name";
|
|
11
|
+
}, {
|
|
12
|
+
readonly key: "facetCount";
|
|
13
|
+
readonly label: "Option count";
|
|
14
|
+
}, {
|
|
15
|
+
readonly key: "facetColour";
|
|
16
|
+
readonly label: "Option colour";
|
|
17
|
+
readonly kind: "colour";
|
|
18
|
+
}, {
|
|
19
|
+
readonly key: "facetTickFill";
|
|
20
|
+
readonly label: "Tick box fill";
|
|
21
|
+
readonly kind: "colour";
|
|
22
|
+
}, {
|
|
23
|
+
readonly key: "facetTick";
|
|
24
|
+
readonly label: "Tick mark";
|
|
25
|
+
readonly kind: "image";
|
|
26
|
+
}, {
|
|
27
|
+
readonly key: "facetTickMark";
|
|
28
|
+
readonly label: "Tick box shown";
|
|
29
|
+
}, {
|
|
30
|
+
readonly key: "facetRadioMark";
|
|
31
|
+
readonly label: "Round mark shown";
|
|
32
|
+
}, {
|
|
33
|
+
readonly key: "facetDot";
|
|
34
|
+
readonly label: "Round mark dot";
|
|
35
|
+
readonly kind: "colour";
|
|
36
|
+
}];
|
|
37
|
+
export declare const FACET_TICK_MARK = "sf-facet-tick-picture";
|
|
38
|
+
export declare const FACET_TICK: string;
|
|
39
|
+
export declare const FACET_TICK_VAR = "--sf-facet-tick";
|
|
40
|
+
export declare const FACET_TICK_INK_CLASS: string;
|
|
41
|
+
export type FacetRow = Record<(typeof FACET_ROW_FIELDS)[number]["key"], string>;
|
|
42
|
+
export declare function facetRow(option: {
|
|
43
|
+
label: string;
|
|
44
|
+
count: number;
|
|
45
|
+
swatch: string | null;
|
|
46
|
+
}, picked: boolean): FacetRow;
|
|
47
|
+
export declare function typeRow(option: {
|
|
48
|
+
label: string;
|
|
49
|
+
count: number;
|
|
50
|
+
}, picked: boolean): FacetRow;
|
|
51
|
+
export declare const FACET_TEMPLATE_ALLOW: readonly ["Text", "ImageBlock", "Flex"];
|
|
52
|
+
export declare const NAMED_EXCEPTIONS: readonly [{
|
|
53
|
+
readonly part: "facetLabel";
|
|
54
|
+
readonly kind: "size";
|
|
55
|
+
readonly value: 13;
|
|
56
|
+
readonly reason: "The old rail's option words were 13 px; kept so no facet word moves.";
|
|
57
|
+
readonly owner: "storefront sections owner";
|
|
58
|
+
readonly due: "2026-12-18";
|
|
59
|
+
}, {
|
|
60
|
+
readonly part: "facetName";
|
|
61
|
+
readonly kind: "size";
|
|
62
|
+
readonly value: 13;
|
|
63
|
+
readonly reason: "A type's name takes the facet words' 13 px, so the type picker has the same rail look.";
|
|
64
|
+
readonly owner: "storefront sections owner";
|
|
65
|
+
readonly due: "2026-12-18";
|
|
66
|
+
}, {
|
|
67
|
+
readonly part: "Option";
|
|
68
|
+
readonly kind: "gap";
|
|
69
|
+
readonly value: 10;
|
|
70
|
+
readonly reason: "The old rail's 10 px between the option and its count; kept so no word moves.";
|
|
71
|
+
readonly owner: "storefront sections owner";
|
|
72
|
+
readonly due: "2026-12-18";
|
|
73
|
+
}, {
|
|
74
|
+
readonly part: "Choice";
|
|
75
|
+
readonly kind: "gap";
|
|
76
|
+
readonly value: 10;
|
|
77
|
+
readonly reason: "The old rail's 10 px between tick box, dot and words; kept so no word moves.";
|
|
78
|
+
readonly owner: "storefront sections owner";
|
|
79
|
+
readonly due: "2026-12-18";
|
|
80
|
+
}, {
|
|
81
|
+
readonly part: "Tick box";
|
|
82
|
+
readonly kind: "padding";
|
|
83
|
+
readonly value: 1;
|
|
84
|
+
readonly reason: "The 1 px ring round the tick box, drawn as the Box's own Fill inside 1 px padding.";
|
|
85
|
+
readonly owner: "storefront sections owner";
|
|
86
|
+
readonly due: "2026-12-18";
|
|
87
|
+
}, {
|
|
88
|
+
readonly part: "Radio";
|
|
89
|
+
readonly kind: "padding";
|
|
90
|
+
readonly value: 1;
|
|
91
|
+
readonly reason: "The 1 px ring round the round mark, drawn as the Box's own Fill inside 1 px padding.";
|
|
92
|
+
readonly owner: "storefront sections owner";
|
|
93
|
+
readonly due: "2026-12-18";
|
|
94
|
+
}, {
|
|
95
|
+
readonly part: "Radio ground";
|
|
96
|
+
readonly kind: "padding";
|
|
97
|
+
readonly value: 3;
|
|
98
|
+
readonly reason: "The 3 px between the round mark's ring and its 8 px dot, as the browser's own radio.";
|
|
99
|
+
readonly owner: "storefront sections owner";
|
|
100
|
+
readonly due: "2026-12-18";
|
|
101
|
+
}, {
|
|
102
|
+
readonly part: "Tick";
|
|
103
|
+
readonly kind: "box";
|
|
104
|
+
readonly value: 14;
|
|
105
|
+
readonly reason: "The tick box's ground inside its 1 px ring: 16 px less the ring each side, the browser's own checkbox size.";
|
|
106
|
+
readonly owner: "storefront sections owner";
|
|
107
|
+
readonly due: "2026-12-18";
|
|
108
|
+
}, {
|
|
109
|
+
readonly part: "Radio ground";
|
|
110
|
+
readonly kind: "box";
|
|
111
|
+
readonly value: 14;
|
|
112
|
+
readonly reason: "The round mark's ground inside its 1 px ring: 16 px less the ring each side, the browser's own radio size.";
|
|
113
|
+
readonly owner: "storefront sections owner";
|
|
114
|
+
readonly due: "2026-12-18";
|
|
115
|
+
}, {
|
|
116
|
+
readonly part: "Ring";
|
|
117
|
+
readonly kind: "box";
|
|
118
|
+
readonly value: 13;
|
|
119
|
+
readonly reason: "The colour dot's 1 px ring as the old rail drew it (13 px round); kept so no swatch or word moves.";
|
|
120
|
+
readonly owner: "storefront sections owner";
|
|
121
|
+
readonly due: "2026-12-18";
|
|
122
|
+
}, {
|
|
123
|
+
readonly part: "Colour";
|
|
124
|
+
readonly kind: "box";
|
|
125
|
+
readonly value: 11;
|
|
126
|
+
readonly reason: "The colour dot inside its 1 px ring (13 px less the ring each side), as the old rail drew it.";
|
|
127
|
+
readonly owner: "storefront sections owner";
|
|
128
|
+
readonly due: "2026-12-18";
|
|
129
|
+
}, {
|
|
130
|
+
readonly part: "aside";
|
|
131
|
+
readonly kind: "padding";
|
|
132
|
+
readonly value: 22;
|
|
133
|
+
readonly reason: "The rail box's right padding at lg (PlpSidebar lg:pr-[22px]): 12 px room for the picked frame plus main's 10 px scrollbar room, so the content stays main's 258 px wide.";
|
|
134
|
+
readonly owner: "storefront sections owner";
|
|
135
|
+
readonly due: "2026-12-18";
|
|
136
|
+
}];
|
|
137
|
+
export declare function facetRowSeed(nodeId: string): SeededNode[];
|
|
138
|
+
export declare function withFacetTemplate(props: Props): Props;
|
|
139
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{BOX_SWATCH_PROP as d}from"efficient-web-builder/format/lib/content/box-background";import{BOX_ROW_IMAGE_PROP as x}from"efficient-web-builder/format/lib/content/box-card-rule";import{BOX_HIDE_WHEN_ROW_EMPTY as p}from"efficient-web-builder/format/lib/content/card-template";import{BOX_TYPE as t,CONTAINER_BLOCKS_SLOT as n}from"efficient-web-builder/format/lib/document/container-blocks";import{rowFieldTextSeed as k}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{BOX as _,DIM as C,INNER_BOX as s,TEXT as m,boxPadding as c,seedNodes as b}from"efficient-web-builder/format/lib/document/seed-parts";const T="facetTemplate",I="Filter option template",B=[{key:"facetLabel",label:"Filter option"},{key:"facetName",label:"Type name"},{key:"facetCount",label:"Option count"},{key:"facetColour",label:"Option colour",kind:"colour"},{key:"facetTickFill",label:"Tick box fill",kind:"colour"},{key:"facetTick",label:"Tick mark",kind:"image"},{key:"facetTickMark",label:"Tick box shown"},{key:"facetRadioMark",label:"Round mark shown"},{key:"facetDot",label:"Round mark dot",kind:"colour"}],y="sf-facet-tick-picture",E="data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%271%200.75%2014%2014%27%20id%3D%27"+y+"%27%3E%3Cpath%20d%3D%27M3.2%208%206.4%2011.2%2012.8%203.2%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.56%27%2F%3E%3C%2Fsvg%3E",W="--sf-facet-tick",K="[&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[background-image:none]! [&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[background-color:var(--accent-ink)]! [&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[-webkit-mask:var(--sf-facet-tick)_center/cover_no-repeat] [&_[data-sf-card-state~=selected]_.sf-card[style*=sf-facet-tick-picture]]:[mask:var(--sf-facet-tick)_center/cover_no-repeat]";function X(e,r){return{facetLabel:e.label,facetName:"",facetCount:String(e.count),facetColour:e.swatch??"",facetTickFill:r?"main":"",facetTick:r?E:"",facetTickMark:"tick",facetRadioMark:"",facetDot:""}}function H(e,r){return{facetLabel:"",facetName:e.label,facetCount:String(e.count),facetColour:"",facetTickFill:r?"main":"",facetTick:"",facetTickMark:"",facetRadioMark:"radio",facetDot:r?"main":""}}const z=["Text","ImageBlock",t],h={..._,direction:"row",align:"center",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap"},i=(e,r)=>({...s,widthFit:"fixed",width:e,minWidth:e,sectionHeightMode:"fixed",sectionHeightValue:e,sectionHeightUnit:"px",...r}),f=13,l=10,o="2026-12-18",a="storefront sections owner",G=[{part:"facetLabel",kind:"size",value:f,reason:"The old rail's option words were 13 px; kept so no facet word moves.",owner:a,due:o},{part:"facetName",kind:"size",value:f,reason:"A type's name takes the facet words' 13 px, so the type picker has the same rail look.",owner:a,due:o},{part:"Option",kind:"gap",value:l,reason:"The old rail's 10 px between the option and its count; kept so no word moves.",owner:a,due:o},{part:"Choice",kind:"gap",value:l,reason:"The old rail's 10 px between tick box, dot and words; kept so no word moves.",owner:a,due:o},{part:"Tick box",kind:"padding",value:1,reason:"The 1 px ring round the tick box, drawn as the Box's own Fill inside 1 px padding.",owner:a,due:o},{part:"Radio",kind:"padding",value:1,reason:"The 1 px ring round the round mark, drawn as the Box's own Fill inside 1 px padding.",owner:a,due:o},{part:"Radio ground",kind:"padding",value:3,reason:"The 3 px between the round mark's ring and its 8 px dot, as the browser's own radio.",owner:a,due:o},{part:"Tick",kind:"box",value:14,reason:"The tick box's ground inside its 1 px ring: 16 px less the ring each side, the browser's own checkbox size.",owner:a,due:o},{part:"Radio ground",kind:"box",value:14,reason:"The round mark's ground inside its 1 px ring: 16 px less the ring each side, the browser's own radio size.",owner:a,due:o},{part:"Ring",kind:"box",value:13,reason:"The colour dot's 1 px ring as the old rail drew it (13 px round); kept so no swatch or word moves.",owner:a,due:o},{part:"Colour",kind:"box",value:11,reason:"The colour dot inside its 1 px ring (13 px less the ring each side), as the old rail drew it.",owner:a,due:o},{part:"aside",kind:"padding",value:22,reason:"The rail box's right padding at lg (PlpSidebar lg:pr-[22px]): 12 px room for the picked frame plus main's 10 px scrollbar room, so the content stays main's 258 px wide.",owner:a,due:o}],R={size:f,case:"capitalize",lineHeight:1.5},O={size:f,case:"none",lineHeight:1.5},A={textStyle:"body-5",size:11,case:"none",letterSpacing:0,lineHeight:1.5},w="muted",g="surface",F=()=>({type:t,props:{...h,name:"Option",justify:"between",gap:l,gapPhone:l,...c(4,12)},slots:{[n]:[{type:t,props:{...h,name:"Choice",gap:l,gapPhone:l,minWidth:0},slots:{[n]:[{type:t,props:{...s,name:"Tick mark",[p]:["facetTickMark"]},slots:{[n]:[{type:t,props:{...i(16,{sectionCorners:2,fillColor:w,[d]:"facetTickFill",...c(1,1)}),name:"Tick box"},slots:{[n]:[{type:t,props:{...i(14,{sectionCorners:1,fillColor:g,[d]:"facetTickFill",[x]:"facetTick",...c(0,0)}),name:"Tick"}}]}}]}},{type:t,props:{...s,name:"Round mark",[p]:["facetRadioMark"]},slots:{[n]:[{type:t,props:{...i(16,{sectionCorners:8,fillColor:w,[d]:"facetTickFill",...c(1,1)}),name:"Radio"},slots:{[n]:[{type:t,props:{...i(14,{sectionCorners:7,fillColor:g,...c(3,3)}),name:"Radio ground"},slots:{[n]:[{type:t,props:{...i(8,{sectionCorners:4,[d]:"facetDot",...c(0,0)}),name:"Dot"}}]}}]}}]}},{type:t,props:{...s,name:"Swatch",[p]:["facetColour"]},slots:{[n]:[{type:t,props:{...i(13,{sectionCorners:7,sectionBorder:{width:1}}),name:"Ring"},slots:{[n]:[{type:t,props:{...i(11,{sectionCorners:6,[d]:"facetColour"}),name:"Colour"}}]}}]}},{type:t,props:{...s,name:"Label",[p]:["facetLabel"]},slots:{[n]:[k("facetLabel",{...m,tag:"span",minWidth:0},R)]}},{type:t,props:{...s,name:"Name",[p]:["facetName"]},slots:{[n]:[k("facetName",{...m,tag:"span",minWidth:0},O)]}}]}},k("facetCount",{...C,tag:"span"},A)]}});function L(e){return b([F()],(r,u)=>u==="0"?`${e}~facet`:`${e}~facet.${u.slice(2)}`)}function U(e){if(e[T]!==void 0)return e;const r=typeof e.id=="string"&&e.id.trim()?e.id:"AlloyWheelsListing";return{...e,[T]:L(r)}}export{B as FACET_ROW_FIELDS,z as FACET_TEMPLATE_ALLOW,I as FACET_TEMPLATE_LABEL,T as FACET_TEMPLATE_SLOT,E as FACET_TICK,K as FACET_TICK_INK_CLASS,y as FACET_TICK_MARK,W as FACET_TICK_VAR,G as NAMED_EXCEPTIONS,X as facetRow,L as facetRowSeed,H as typeRow,U as withFacetTemplate};
|
|
@@ -5,8 +5,8 @@ export declare const CURRENT_LINE: {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const TAB_CELLS: {
|
|
7
7
|
readonly list: "m-0 flex list-none items-stretch gap-0 overflow-auto p-0 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";
|
|
8
|
-
readonly item:
|
|
9
|
-
readonly tab: (
|
|
8
|
+
readonly item: (first: boolean, editing: boolean) => string;
|
|
9
|
+
readonly tab: (current: boolean) => string;
|
|
10
10
|
readonly underline: "absolute inset-x-0 -bottom-px h-[2px] bg-accent";
|
|
11
11
|
};
|
|
12
12
|
export declare const TAB_PILLS: {
|
|
@@ -15,3 +15,4 @@ export declare const TAB_PILLS: {
|
|
|
15
15
|
readonly tab: (current: boolean) => string;
|
|
16
16
|
};
|
|
17
17
|
export declare function currentLinkIndex(hrefs: readonly string[], pagePath: string | null | undefined): number;
|
|
18
|
+
export declare function showCurrentTab(strip: HTMLElement | null, behavior: ScrollBehavior): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{normalizePath as
|
|
1
|
+
import{normalizePath as l}from"efficient-web-builder/format/lib/popup/rules";import{menuLinkKind as a}from"../menu-link.js";const c="[scrollbar-width:none] [&::-webkit-scrollbar]:hidden",x="text-[length:var(--size-label,13px)]",s={rowLink:"relative opacity-100",row:"pointer-events-none absolute inset-x-0 -bottom-2 h-[2px] bg-accent",tab:"absolute inset-x-0 -bottom-px h-[2px] bg-accent"},f={list:`m-0 flex list-none items-stretch gap-0 overflow-auto p-0 ${c}`,item:(e,o)=>[`relative isolate flex whitespace-nowrap border-r border-line px-[26px] py-[18px] font-mono ${x} uppercase tracking-[0.22em]`,e?"border-l border-line":"",o?"":"[&_*]:pointer-events-none [&_a]:pointer-events-auto"].join(" "),tab:e=>["block transition-colors after:absolute after:inset-0 after:-z-1",e?"text-fg":"text-fg-dim hover:text-fg"].join(" "),underline:s.tab},d={nav:"-mx-1 [scrollbar-width:none] max-view-wide:overflow-x-auto [&::-webkit-scrollbar]:hidden",list:"flex flex-wrap gap-2 px-1 pb-1 max-view-wide:min-w-max max-view-wide:flex-nowrap",tab:e=>`flex flex-col gap-0.5 rounded-[var(--sf-button-radius,999px)] border px-5 py-2.5 transition-colors ${e?"border-accent bg-accent text-accent-ink":"border-line text-fg hover:border-accent hover:text-accent"}`};function m(e,o){if(!o)return-1;const t=l(o);return e.findIndex(n=>a(n)==="page"&&l(n)===t)}function u(e,o){let t=e?.querySelector('[aria-current="page"]')??null;if(!e||!t)return;for(;t.parentElement&&t.parentElement!==e;)t=t.parentElement;const n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=r.left<n.left?r.left-n.left:r.right>n.right?Math.min(r.right-n.right,r.left-n.left):0;i!==0&&e.scrollBy({left:i,behavior:o})}export{s as CURRENT_LINE,f as TAB_CELLS,d as TAB_PILLS,m as currentLinkIndex,u as showCurrentTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PLP_DEFAULT_KINDS as t}from"../../../../catalog/plp-item.js";import{PLP_COLUMNS_DEFAULT as
|
|
1
|
+
import{PLP_DEFAULT_KINDS as t}from"../../../../catalog/plp-item.js";import{PLP_COLUMNS_DEFAULT as o}from"../../../../wheels/plp-grid.js";import{ProductGridSlots as e}from"../ProductGrid/meta.js";import{FACET_TEMPLATE_ALLOW as r,FACET_TEMPLATE_SLOT as l}from"../../../../content/facet-row-seed.js";const i={template:e.template,[l]:{type:"slot",allow:[...r]}},d={heading:"Alloy wheels",intro:"Filter by brand, colour, size and fitment to find your set."},m={label:"List",fields:i,defaultProps:{heading:"",intro:"",askForCar:!0,gateHeading:"",gateIntro:"",kinds:[...t],perPage:24,columns:o,defaultSort:"recommended",showInStock:!0,showCollection:!0,showPrice:!0}};export{d as ALLOYWHEELSLISTING_PH,m as AlloyWheelsListingMeta,i as AlloyWheelsListingSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import r from"../../../../../components/wheels-plp/AlloyWheelsListing.js";import{hidableText as n}from"efficient-easel/screen/lib/document/hidable";import{asPlpSortKey as m,listingHiddenFacets as g}from"../../../../wheels/plp-filters.js";import{cardHoverOf as f}from"efficient-web-builder/format/lib/animation/hover";import{phHide as a}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{headInOwnBox as h}from"efficient-web-builder/render/lib/sections/section-to-box";import{FACET_TEMPLATE_SLOT as c}from"../../../../content/facet-row-seed.js";import{AlloyWheelsListingMeta as s,ALLOYWHEELSLISTING_PH as d}from"./meta.js";const k={...s,render:e=>{const t=h(e),i=o=>t?void 0:o;return l(r,{titleLevel:e.titleLevel,heading:i(a(e.heading,d.heading,e.editor)),intro:i(a(e.intro,d.intro,e.editor)),omitHead:t,askForCar:e.askForCar!==!1,gateHeading:n(e.gateHeading),gateIntro:n(e.gateIntro),perPage:e.perPage,columns:e.columns,defaultSort:m(e.defaultSort),ownerId:typeof e.id=="string"?e.id:"",template:e.template,facetTemplate:e[c],hover:f(e,"AlloyWheelsListing"),hiddenFacets:g(e),showPrice:e.showPrice,showInStock:e.showInStock!==!1,kinds:e.kinds,products:e.products,wheels:e.wheels,fieldUsage:e.fieldUsage,editing:e.editor?.isEditing})}};export{k as AlloyWheelsListingRender};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { BlockRender } from "efficient-web-builder/format/lib/document/blocks/block-types";
|
|
2
2
|
export declare const AppointmentBookingSlots: {
|
|
3
|
+
serviceTemplate: {
|
|
4
|
+
type: "slot";
|
|
5
|
+
allow: ("Flex" | "Text")[];
|
|
6
|
+
};
|
|
7
|
+
timeTemplate: {
|
|
8
|
+
type: "slot";
|
|
9
|
+
allow: ("Flex" | "Text")[];
|
|
10
|
+
};
|
|
3
11
|
boxes: {
|
|
4
12
|
type: "slot";
|
|
5
13
|
allow: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{BOOKING_TEMPLATE_SLOT_FIELDS as o}from"../../../../content/booking-card-seed.js";const e={boxes:{type:"slot",allow:["BookingBox"]},...o},n={label:"Booking Form",fields:e,defaultProps:{eyebrow:"",heading:"",intro:"",buttonLabel:"",successMessage:""}};export{n as AppointmentBookingMeta,e as AppointmentBookingSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as m}from"react/jsx-runtime";import a from"../../../../../components/AppointmentBooking.js";import{PH as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import a from"../../../../../components/AppointmentBooking.js";import{PH as t}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{parseSectionHeadPlacement as r}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as i}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{AppointmentBookingMeta as b}from"./meta.js";const s={...b,render:e=>{const o=r(e.headPlacement)==="own-box",n=d=>o?void 0:d;return m(a,{eyebrow:n(i(e.eyebrow,t.eyebrow,e.editor)),heading:n(i(e.heading,t.heading,e.editor)),intro:n(i(e.intro,t.body,e.editor)),omitHead:o,buttonLabel:i(e.buttonLabel,t.button,e.editor),successMessage:i(e.successMessage,t.bookingConfirmation,e.editor),boxes:e.boxes,serviceTemplate:e.serviceTemplate,timeTemplate:e.timeTemplate,inBoxes:e.layout==="boxes",nodeId:typeof e.id=="string"?e.id:void 0,editing:e.editor?.isEditing})}};export{s as AppointmentBookingRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{BOOKING_TEMPLATE_SLOT_FIELDS as o}from"../../../../content/booking-card-seed.js";const t={label:"Booking box",fields:o,defaultProps:{}};export{t as BookingBoxMeta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import n from"../../../../../components/booking/BookingBox.js";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{BookingBoxMeta as d}from"./meta.js";const r={...d,render:e=>o(n,{region:typeof e.region=="string"?e.region:void 0,nodeId:typeof e.id=="string"?e.id:void 0,serviceTemplate:e.serviceTemplate,timeTemplate:e.timeTemplate,eyebrow:i(e.eyebrow,t.eyebrow,e.editor),heading:i(e.heading,t.heading,e.editor),intro:i(e.intro,t.body,e.editor),buttonLabel:i(e.buttonLabel,t.button,e.editor),successMessage:i(e.successMessage,t.bookingConfirmation,e.editor),styleStep:e.styleStep,styleName:e.styleName,styleValue:e.styleValue,styleNote:e.styleNote})};export{r as BookingBoxRender};
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
import type { BlockRender } from "efficient-web-builder/format/lib/document/blocks/block-types";
|
|
2
|
+
export declare const ContactRoutingSlots: {
|
|
3
|
+
template: {
|
|
4
|
+
type: "slot";
|
|
5
|
+
allow: ("Flex" | "Text" | "ImageBlock")[];
|
|
6
|
+
};
|
|
7
|
+
reasonTemplate: {
|
|
8
|
+
type: "slot";
|
|
9
|
+
allow: ("Flex" | "Text" | "ImageBlock")[];
|
|
10
|
+
};
|
|
11
|
+
channelTemplate: {
|
|
12
|
+
type: "slot";
|
|
13
|
+
allow: ("Flex" | "Text" | "ImageBlock")[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
2
16
|
export declare const ContactRoutingMeta: Omit<BlockRender, "render">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONTACT_ROUTING_DEFAULTS as t}from"efficient-web-builder/format/lib/content/contact";const r={label:"Contact Form",defaultProps:{routingNumber:t.routingNumber,routingTagline:t.routingTagline,groups:t.groups,formSlug:"",formNumber:t.formNumber,formHeading:t.formHeading,metaItems:t.metaLines.map(e=>({text:e})),showOther:t.showOther,otherLabel:t.otherLabel,otherNoteTitle:t.otherNoteTitle,otherNoteBody:t.otherNoteBody,buttonText:t.buttonText,consent:t.consent,channels:t.channels}};export{
|
|
1
|
+
import{CONTACT_ROUTING_DEFAULTS as t}from"efficient-web-builder/format/lib/content/contact";import{CONTACT_CHANNEL_SLOT as r,CONTACT_REASON_SLOT as n,CONTACT_TEMPLATE_ALLOW as o,CONTACT_TOPIC_SLOT as T}from"../../../../content/contact-card-seed.js";const l={[T]:{type:"slot",allow:[...o]},[n]:{type:"slot",allow:[...o]},[r]:{type:"slot",allow:[...o]}},s={label:"Contact Form",fields:l,defaultProps:{routingNumber:t.routingNumber,routingTagline:t.routingTagline,groups:t.groups,formSlug:"",formNumber:t.formNumber,formHeading:t.formHeading,metaItems:t.metaLines.map(e=>({text:e})),showOther:t.showOther,otherLabel:t.otherLabel,otherNoteTitle:t.otherNoteTitle,otherNoteBody:t.otherNoteBody,buttonText:t.buttonText,consent:t.consent,channels:t.channels}};export{s as ContactRoutingMeta,l as ContactRoutingSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import d from"../../../../../components/ContactRouting.js";import{CONTACT_ROUTING_DEFAULTS as t}from"efficient-web-builder/format/lib/content/contact";import{hidableText as i}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as u}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as o}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import d from"../../../../../components/ContactRouting.js";import{CONTACT_ROUTING_DEFAULTS as t}from"efficient-web-builder/format/lib/content/contact";import{hidableText as i}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as u}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as o}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{CONTACT_CHANNEL_SLOT as T,CONTACT_REASON_SLOT as g,CONTACT_TOPIC_SLOT as f}from"../../../../content/contact-card-seed.js";import{ContactRoutingMeta as h}from"./meta.js";const S={...h,render:e=>{const r=u(e.headPlacement)==="own-box",m=n=>r?void 0:n;return a(d,{routingNumber:m(o(e.routingNumber,t.routingNumber,e.editor)),routingTagline:m(o(e.routingTagline,t.routingTagline,e.editor)),omitHead:r,templates:{ownerId:String(e.id??""),topic:e[f],reason:e[g],channel:e[T]},groups:e.groups??[],formNumber:o(e.formNumber,t.formNumber,e.editor),formHeading:o(e.formHeading,t.formHeading,e.editor),metaLines:(e.metaItems??[]).map(n=>n?.text??"").filter(Boolean),showOther:e.showOther,otherLabel:i(e.otherLabel)||t.otherLabel,otherNoteTitle:o(e.otherNoteTitle,t.otherNoteTitle,e.editor),otherNoteBody:o(e.otherNoteBody,t.otherNoteBody,e.editor),buttonText:i(e.buttonText)||t.buttonText,consent:o(e.consent,t.consent,e.editor),channels:e.channels??[],formSlug:i(e.formSlug)||void 0,form:e.form,editing:e.editor?.isEditing})}};export{S as ContactRoutingRender};
|