efficient-storefront-blocks 0.100.0 → 0.101.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 +31 -0
- package/dist/chunks/{EditorPreviewCheckout-OLTXWUGM.js → EditorPreviewCheckout-JMBBJSI7.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-4XV2T5MD.js → SiteEditorProvider-BKZW7KVN.js} +1 -1
- package/dist/chunks/chunk-AF5TRBQB.js +1 -0
- package/dist/chunks/chunk-GJZGQCDM.js +1 -0
- package/dist/chunks/chunk-KV3EHFHB.js +339 -0
- package/dist/chunks/chunk-YSKMBJ7V.js +74 -0
- package/dist/chunks/{fitment-data-ZWKG2FFA.js → fitment-data-HMD5DDDB.js} +1 -1
- package/dist/consent.js +1 -1
- package/dist/editor/lib/api/section-templates.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/AlloyWheelsListing/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductGrid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/service/Subscribe/fields.js +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 +1 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +35 -30
- package/dist/links.js +1 -1
- package/dist/render/app/globals.css +122 -16
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/ChatWidget.js +1 -1
- package/dist/render/components/Collections.js +1 -1
- package/dist/render/components/ConsentContext.d.ts +6 -0
- package/dist/render/components/ConsentContext.js +1 -1
- package/dist/render/components/ConsentPanel.d.ts +6 -0
- package/dist/render/components/ConsentPanel.js +1 -1
- package/dist/render/components/ConsentProvider.js +1 -1
- package/dist/render/components/CouponField.js +1 -1
- package/dist/render/components/DealerFinderSection.js +1 -1
- package/dist/render/components/EmailCaptureForm.js +1 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FooterEmailSignup.js +1 -1
- package/dist/render/components/FooterLogo.d.ts +1 -1
- package/dist/render/components/FooterLogo.js +1 -1
- package/dist/render/components/FooterMenu.d.ts +2 -1
- package/dist/render/components/FooterMenu.js +1 -1
- package/dist/render/components/GalleryGrid.d.ts +2 -1
- package/dist/render/components/GalleryGrid.js +3 -3
- package/dist/render/components/LegalLine.d.ts +10 -0
- package/dist/render/components/LegalLine.js +1 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/ProductHeroPanel.js +1 -1
- package/dist/render/components/SiteLegalContext.d.ts +19 -0
- package/dist/render/components/SiteLegalContext.js +1 -0
- package/dist/render/components/Subscribe.d.ts +9 -1
- package/dist/render/components/Subscribe.js +1 -1
- package/dist/render/components/booking/BookingFormState.js +1 -1
- package/dist/render/components/fitment/FitmentFinder.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.d.ts +2 -2
- package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
- package/dist/render/components/wheels-plp/PlpFacetRows.js +1 -1
- package/dist/render/components/wheels-plp/PlpSidebar.js +1 -1
- package/dist/render/components/wheels-plp/usePlpFiltersInUrl.d.ts +3 -2
- package/dist/render/components/wheels-plp/usePlpFiltersInUrl.js +1 -1
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/api/list-rows.d.ts +3 -0
- package/dist/render/lib/api/list-rows.js +1 -0
- package/dist/render/lib/api/types.d.ts +4 -0
- package/dist/render/lib/cache-evict.d.ts +1 -0
- package/dist/render/lib/cache-evict.js +1 -1
- package/dist/render/lib/chrome-cache.js +1 -1
- package/dist/render/lib/consent/rules.d.ts +7 -0
- package/dist/render/lib/consent/rules.js +1 -1
- package/dist/render/lib/content/collection-card-look.d.ts +0 -4
- package/dist/render/lib/content/collection-card-look.js +1 -1
- package/dist/render/lib/content/facet-row-seed.js +1 -1
- package/dist/render/lib/content/product-card-seed.js +1 -1
- package/dist/render/lib/content/rail-row-seed.js +1 -1
- package/dist/render/lib/content/site.d.ts +4 -0
- package/dist/render/lib/content/site.js +1 -1
- package/dist/render/lib/content/tab-strip.d.ts +3 -1
- package/dist/render/lib/content/tab-strip.js +1 -1
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/GalleryB/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
- package/dist/render/lib/document/blocks/service/Subscribe/render.js +1 -1
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/document-nodes.d.ts +2 -0
- package/dist/render/lib/document/document-nodes.js +1 -1
- package/dist/render/lib/document/footer-page-blocks.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-listing.js +1 -1
- package/dist/render/lib/field-input.d.ts +2 -0
- package/dist/render/lib/field-input.js +1 -1
- package/dist/render/lib/links/link-rules.d.ts +5 -0
- package/dist/render/lib/links/link-rules.js +1 -1
- package/dist/render/lib/sections/band-padding.d.ts +17 -1
- package/dist/render/lib/sections/band-padding.js +1 -1
- package/dist/render/lib/sections/gallery-toolbar.d.ts +2 -2
- package/dist/render/lib/sections/gallery-toolbar.js +1 -1
- package/dist/render/lib/sections/product-pictures.js +1 -1
- package/dist/render/lib/wheels/catalog-filters-to-listing.js +1 -1
- package/dist/render/lib/wheels/plp-filters.d.ts +2 -1
- package/dist/render/lib/wheels/plp-filters.js +1 -1
- package/dist/render/lib/wheels/plp-hydrate.d.ts +0 -3
- package/dist/render/lib/wheels/plp-hydrate.js +1 -1
- package/dist/render/lib/wheels/selected-ranges.d.ts +1 -0
- package/dist/render/lib/wheels/selected-ranges.js +1 -1
- package/dist/words.d.ts +1 -0
- package/dist/words.js +1 -1
- package/package.json +4 -4
- package/dist/chunks/chunk-4SYZK3TW.js +0 -1
- package/dist/chunks/chunk-G6OVBAOA.js +0 -74
- package/dist/chunks/chunk-OWUMH5VC.js +0 -339
- package/dist/chunks/chunk-WN7SFD3N.js +0 -1
- /package/dist/chunks/{chunk-OWUMH5VC.js.LEGAL.txt → chunk-KV3EHFHB.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-SCTOV5CT.js → chunk-XNUK2QNK.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CARD_LIST_TYPE as L,CARD_ROW_FIELD_PROP as h,CARD_ROW_LINK_PROP as _,CARD_TEMPLATE_SLOT as C,registerCardTemplates as te}from"efficient-web-builder/format/lib/content/card-template";import{DIM as s,INNER_BOX as o,TEXT as n,boxPadding as r,fillSlot as N,labelLook as A,labelStyle as D,seedNodes as w,token as d}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as a,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX_ROW_IMAGE_PROP as B}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as le}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as oe,EVENTS_FEATURED_DARKEN_STYLE as F,EVENTS_FEATURED_PLACEMENT as ae}from"../content/events-featured-look.js";import{COLLECTION_DARKEN as ie,COLLECTION_HOVER_DARKEN as ne,COLLECTION_HOVER_ZOOM as H}from"../content/collection-card-look.js";import{COLLECTION_CARD_REGIONS as p,COLLECTION_CARD_TEXT_SIZE as re}from"efficient-web-builder/format/lib/sections/collection-card-text-regions";import{SH_LINK as K}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as l}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{withRelatedTabletColumns as g}from"../sections/product-grid-columns.js";import{bundleColumns as se}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as de,withHeroPriceTemplate as ce}from"../content/hero-price-seed.js";import{HERO_OPTION_FIELDS as M,HERO_OPTION_SLOT as Ee,HERO_OPTION_SLOT_LABEL as Te,withHeroOptionTemplate as _e}from"../content/hero-option-seed.js";import{FILTER_OPTIONS_FIELD as pe,withFilterChipsTemplate as Oe,withFilterTemplate as me}from"../content/filter-card-seed.js";import{FACET_ROW_FIELDS as O,FACET_TEMPLATE_LABEL as x,FACET_TEMPLATE_SLOT as U,withFacetTemplate as v}from"../content/facet-row-seed.js";import{RAIL_HEAD_TEMPLATE_LABEL as be,RAIL_HEAD_TEMPLATE_SLOT as Le,RAIL_ROW_FIELDS as P,RAIL_TEMPLATE_LABEL as he,RAIL_TEMPLATE_SLOT as Ce,withRailTemplates as V}from"../content/rail-row-seed.js";import{MENU_LINK_BLOCK as ge,withMenuTemplate as Pe}from"../content/menu-card-seed.js";import{CONTACT_CHANNEL_FIELDS as G,CONTACT_CHANNEL_SLOT as ye,CONTACT_REASON_FIELDS as ke,CONTACT_REASON_SLOT as fe,CONTACT_TOPIC_FIELDS as W,CONTACT_TOPIC_SLOT as ue,withContactTemplates as Re}from"../content/contact-card-seed.js";import{ARTICLE_BODY_BLOCK as Se,withArticleBodyTemplate as Ie}from"../content/article-body-seed.js";import{APPOINTMENT_BOOKING_TYPE as Ne,BOOKING_BOX_TYPE as Ae,BOOKING_OPTION_FIELDS as De,BOOKING_TEMPLATE_SLOTS as we,withBookingTemplates as Be}from"../content/booking-card-seed.js";import{PRODUCT_BUY_BLOCK as Fe,PRODUCT_CARD_FIELDS as y,PRODUCT_COLOUR_BLOCK as He,PRODUCT_EYEBROW_BLOCK as Ke,PRODUCT_NAME_BLOCK as Me,PRODUCT_PICTURE_BLOCK as xe,PRODUCT_PRICE_BLOCK as Ue,PRODUCT_SIZE_BLOCK as ve,PRODUCT_SPECS_BLOCK as Ve,productCardSeed as Ge,withKitCardTemplate as k,withListingCardTemplate as We,withProductCardTemplate as f}from"../content/product-card-seed.js";const Y="tags",c=A(12),$={textStyle:"heading-3",...d("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},X={textStyle:"body-1",...d("body",14),lineHeight:1.55},Ye={...$,...d("headingSmall",30)},$e={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},Xe=le.fallback,Ze=480,je=70,ze=()=>({type:a,props:{...o,name:"Featured",[B]:"cover",darken:oe,darkenStyle:F,darkenPhone:je,darkenStylePhone:F,placement:ae,direction:"column",gap:8,gapPhone:8,...r(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:Xe,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:Ze,sectionHeightUnitPhone:"px",[_]:"href"},slots:{[i]:[l("meta",{...n,tag:"p"},c,!0),l("title",{...n,tag:"h3",widthFit:"fill"},Ye),l("excerpt",{...s,tag:"p",widthFit:"fill",maxWidth:384},X),l("dateLabel",{...s,tag:"p"},{...c,color:"muted"})]}}),qe=()=>({type:a,props:{...o,name:"Post",gap:0,gapPhone:0,...r(0,0,0,0),...N("surface"),shadow:!0},slots:{[i]:[{type:"ImageBlock",props:{[h]:"cover",aspect:"16/10",contained:!1}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...$e},slots:{[i]:[{type:a,props:{...o,name:"Meta",direction:"row",wrap:!0,share:"content",sharePhone:"content",phoneRow:2,gap:12,gapPhone:12,...r(0,0,0,0)},slots:{[i]:[l("meta",{...n,tag:"p"},c,!0),l("dateLabel",{...s,tag:"p"},{...c,color:"muted"},!0)]}},l("title",{...n,tag:"h3",widthFit:"fill"},$),l("excerpt",{...s,tag:"p",widthFit:"fill"},X),{type:L,props:{[h]:Y},slots:{template:[{type:a,props:{...o,name:"Chip",...r(4,8,4,8),sectionBorder:{width:1}},slots:{[i]:[l("label",{...s,tag:"p"},c)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[_]:"href",...K,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(12)}}}]}}]}}),Qe=()=>[ze(),qe()];function Je(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Events",u=["featured","post"];return{...e,template:w(Qe(),(b,ee)=>{const[R,...S]=ee.split("."),I=u[Number(R)]??`card${R}`;return S.length?`${t}~${I}.${S.join(".")}`:`${t}~${I}`})}}const et={fields:[{key:"cover",label:"Cover",kind:"image",alt:"title"},{key:"meta",label:"Eyebrow"},{key:"dateLabel",label:"Date"},{key:"title",label:"Title"},{key:"excerpt",label:"Excerpt",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:Y,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:L,label:"Card list"}],seedOnInsert:Je},E=e=>Number(/(\d+)px/.exec(e)?.[1]),T={tag:E(p.tag.builtIn),name:E(p.name.builtIn),namePhone:E(re.namePhone),body:E(p.body.builtIn),link:E(p.link.builtIn)},tt={...A(T.tag),letterSpacing:.25},lt={textStyle:"heading-2",...d("headingMedium",T.name,T.namePhone),weight:500,lineHeight:1,letterSpacing:-.03},ot={textStyle:"body-1",...d("body",T.body),lineHeight:1.5,paragraphSpacing:12},Z=()=>[l("tag",{...n,tag:"p"},tt,!0),l("name",{...n,tag:"h3",widthFit:"fill"},lt),l("desc",{...n,tag:"p",widthFit:"fill",maxWidth:420},ot),{type:"ButtonBlock",props:{variant:"ghost",label:"Explore",href:"",[_]:"href",...K,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(T.link)}}}],j={_hidden:!0,_hiddenTablet:!0,_hiddenPhone:!1},at=()=>({type:a,props:{...o,name:"Collection",gap:0,gapPhone:0,...r(0,0,0,0),[_]:"href"},slots:{[i]:[{type:a,props:{...o,name:"Picture",[B]:"image",boxShape:"portrait",darken:ie,placement:"bottom-left",direction:"column",gap:12,gapPhone:12,...r(32,32),hoverZoom:H,hoverDarken:ne,_hiddenPhone:!0},slots:{[i]:Z()}},{type:"ImageBlock",props:{[h]:"image",aspect:"4/5",contained:!1,hoverZoom:H,...j}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...r(24,24),...N("surface"),...j},slots:{[i]:Z()}}]}});function it(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Collections";return{...e,template:w([at()],(u,b)=>`${t}~card${b?`.${b}`:""}`)}}const nt={fields:[{key:"tag",label:"Eyebrow"},{key:"name",label:"Title"},{key:"desc",label:"Description",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"name"},{key:"href",label:"Link",kind:"link"}],seedOnInsert:it},rt=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],st=e=>Object.fromEntries(Object.entries(e).filter(([t])=>!rt.includes(t))),z={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:ge,label:"Menu link"}],seed:Pe},q=e=>e.dynamic===!0&&e.relationship==="bundles",Dt=(e={})=>Ge(e),m={fields:y,blocks:[{type:xe,label:"Picture"},{type:Ke,label:"Eyebrow"},{type:Me,label:"Name"},{type:Ve,label:"Specs"},{type:Ue,label:"Price"},{type:He,label:"Colour"},{type:ve,label:"Size"},{type:Fe,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return f(e);const t=g(e);return q(e)?k(t):f(t)}},Q=[{key:"label",label:"Filter name"},{key:pe,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],J=[{slot:Ce,label:he,fields:P},{slot:Le,label:be,fields:[]}],dt=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}],blocks:[{type:"RatingBlock",label:"Rating"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"DetailRows",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"}]},{block:"FooterMenu",...z},{block:"MenuBlock",...z},{block:"ProductGrid",...m},{block:"AlloyWheelsListing",...m,slots:[{slot:C,fields:y},{slot:U,label:x,fields:O},...J],fields:[...y,...O,...P],seed:e=>V(v(We(e)))},{block:"RelatedProducts",...m,seed:e=>{const t=g({...st(e),dynamic:!0});return q(t)?k(t):f(t,{legacyWellHonoured:!0})}},{block:"BundleOffer",...m,seed:e=>k(g({...e,columns:se(e),dynamic:!0}))},{block:"ProductHero",slots:[{slot:C,fields:[]},{slot:Ee,label:Te,fields:M}],fields:M,blocks:[{type:de,label:"Price"}],seed:e=>_e(ce(e))},{block:"FilterBlock",slots:[{slot:C,fields:Q},{slot:U,label:x,fields:O},...J],fields:[...Q,...O,...P],blocks:[{type:L,label:"Card list"}],seed:e=>V(v(me(e)))},{block:"FilterChipsBlock",fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:Oe},{block:"ContactRouting",slots:[{slot:ue,label:"Topic card",fields:W},{slot:fe,label:"Reason chip",fields:ke},{slot:ye,label:"Channel row",fields:G}],fields:[...W,...G],seed:Re},{block:Se,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:Ie},...[Ae,Ne].map(e=>({block:e,slots:we,fields:De,seed:t=>Be(e,t)})),{block:"Events",...et},{block:"Collections",...nt}];te(dt);export{dt as STOREFRONT_CARD_TEMPLATES,at as collectionCardSeed,q as drawsKits,Qe as eventsCardSeeds,Dt as productGridCardSeed,it as withCollectionsTemplate,Je as withEventsTemplate};
|
|
1
|
+
import{CARD_LIST_TYPE as L,CARD_ROW_FIELD_PROP as h,CARD_ROW_LINK_PROP as _,CARD_TEMPLATE_SLOT as C,registerCardTemplates as te}from"efficient-web-builder/format/lib/content/card-template";import{DIM as s,INNER_BOX as o,TEXT as n,boxPadding as r,fillSlot as N,labelLook as A,labelStyle as D,seedNodes as w,token as d}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as a,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX_ROW_IMAGE_PROP as B}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as le}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as oe,EVENTS_FEATURED_DARKEN_STYLE as F,EVENTS_FEATURED_PLACEMENT as ae}from"../content/events-featured-look.js";import{COLLECTION_DARKEN as ie,COLLECTION_HOVER_DARKEN as ne,COLLECTION_HOVER_ZOOM as H}from"../content/collection-card-look.js";import{COLLECTION_CARD_REGIONS as p,COLLECTION_CARD_TEXT_SIZE as re}from"efficient-web-builder/format/lib/sections/collection-card-text-regions";import{SH_LINK as K}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as l}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{withRelatedTabletColumns as P}from"../sections/product-grid-columns.js";import{bundleColumns as se}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as de,withHeroPriceTemplate as Ee}from"../content/hero-price-seed.js";import{HERO_OPTION_FIELDS as M,HERO_OPTION_SLOT as ce,HERO_OPTION_SLOT_LABEL as Te,withHeroOptionTemplate as _e}from"../content/hero-option-seed.js";import{FILTER_OPTIONS_FIELD as pe,withFilterChipsTemplate as Oe,withFilterTemplate as me}from"../content/filter-card-seed.js";import{FACET_ROW_FIELDS as O,FACET_TEMPLATE_LABEL as x,FACET_TEMPLATE_SLOT as U,withFacetTemplate as v}from"../content/facet-row-seed.js";import{RAIL_HEAD_TEMPLATE_LABEL as be,RAIL_HEAD_TEMPLATE_SLOT as Le,RAIL_ROW_FIELDS as g,RAIL_TEMPLATE_LABEL as he,RAIL_TEMPLATE_SLOT as Ce,withRailTemplates as V}from"../content/rail-row-seed.js";import{MENU_LINK_BLOCK as Pe,withMenuTemplate as ge}from"../content/menu-card-seed.js";import{CONTACT_CHANNEL_FIELDS as G,CONTACT_CHANNEL_SLOT as ye,CONTACT_REASON_FIELDS as ke,CONTACT_REASON_SLOT as fe,CONTACT_TOPIC_FIELDS as W,CONTACT_TOPIC_SLOT as Se,withContactTemplates as Re}from"../content/contact-card-seed.js";import{ARTICLE_BODY_BLOCK as ue,withArticleBodyTemplate as Ie}from"../content/article-body-seed.js";import{APPOINTMENT_BOOKING_TYPE as Ne,BOOKING_BOX_TYPE as Ae,BOOKING_OPTION_FIELDS as De,BOOKING_TEMPLATE_SLOTS as we,withBookingTemplates as Be}from"../content/booking-card-seed.js";import{PRODUCT_BUY_BLOCK as Fe,PRODUCT_CARD_FIELDS as y,PRODUCT_COLOUR_BLOCK as He,PRODUCT_EYEBROW_BLOCK as Ke,PRODUCT_NAME_BLOCK as Me,PRODUCT_PICTURE_BLOCK as xe,PRODUCT_PRICE_BLOCK as Ue,PRODUCT_SIZE_BLOCK as ve,PRODUCT_SPECS_BLOCK as Ve,productCardSeed as Ge,withKitCardTemplate as k,withListingCardTemplate as We,withProductCardTemplate as f}from"../content/product-card-seed.js";import{ALLOY_WHEELS_LISTING_TYPE as Ye,MENU_BLOCK_TYPE as $e}from"./document-nodes.js";const Y="tags",E=A(12),$={textStyle:"heading-3",...d("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},X={textStyle:"body-1",...d("body",14),lineHeight:1.55},Xe={...$,...d("headingSmall",30)},Ze={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},je=le.fallback,ze=480,qe=70,Qe=()=>({type:a,props:{...o,name:"Featured",[B]:"cover",darken:oe,darkenStyle:F,darkenPhone:qe,darkenStylePhone:F,placement:ae,direction:"column",gap:8,gapPhone:8,...r(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:je,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:ze,sectionHeightUnitPhone:"px",[_]:"href"},slots:{[i]:[l("meta",{...n,tag:"p"},E,!0),l("title",{...n,tag:"h3",widthFit:"fill"},Xe),l("excerpt",{...s,tag:"p",widthFit:"fill",maxWidth:384},X),l("dateLabel",{...s,tag:"p"},{...E,color:"muted"})]}}),Je=()=>({type:a,props:{...o,name:"Post",gap:0,gapPhone:0,...r(0,0,0,0),...N("surface"),shadow:!0},slots:{[i]:[{type:"ImageBlock",props:{[h]:"cover",aspect:"16/10",contained:!1}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...Ze},slots:{[i]:[{type:a,props:{...o,name:"Meta",direction:"row",wrap:!0,share:"content",sharePhone:"content",phoneRow:2,gap:12,gapPhone:12,...r(0,0,0,0)},slots:{[i]:[l("meta",{...n,tag:"p"},E,!0),l("dateLabel",{...s,tag:"p"},{...E,color:"muted"},!0)]}},l("title",{...n,tag:"h3",widthFit:"fill"},$),l("excerpt",{...s,tag:"p",widthFit:"fill"},X),{type:L,props:{[h]:Y},slots:{template:[{type:a,props:{...o,name:"Chip",...r(4,8,4,8),sectionBorder:{width:1}},slots:{[i]:[l("label",{...s,tag:"p"},E)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[_]:"href",...K,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(12)}}}]}}]}}),et=()=>[Qe(),Je()];function tt(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Events",S=["featured","post"];return{...e,template:w(et(),(b,ee)=>{const[R,...u]=ee.split("."),I=S[Number(R)]??`card${R}`;return u.length?`${t}~${I}.${u.join(".")}`:`${t}~${I}`})}}const lt={fields:[{key:"cover",label:"Cover",kind:"image",alt:"title"},{key:"meta",label:"Eyebrow"},{key:"dateLabel",label:"Date"},{key:"title",label:"Title"},{key:"excerpt",label:"Excerpt",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:Y,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:L,label:"Card list"}],seedOnInsert:tt},c=e=>Number(/(\d+)px/.exec(e)?.[1]),T={tag:c(p.tag.builtIn),name:c(p.name.builtIn),namePhone:c(re.namePhone),body:c(p.body.builtIn),link:c(p.link.builtIn)},ot={...A(T.tag),letterSpacing:.25},at={textStyle:"heading-2",...d("headingMedium",T.name,T.namePhone),weight:500,lineHeight:1,letterSpacing:-.03},it={textStyle:"body-1",...d("body",T.body),lineHeight:1.5,paragraphSpacing:12},Z=()=>[l("tag",{...n,tag:"p"},ot,!0),l("name",{...n,tag:"h3",widthFit:"fill"},at),l("desc",{...n,tag:"p",widthFit:"fill",maxWidth:420},it),{type:"ButtonBlock",props:{variant:"ghost",label:"Explore",href:"",[_]:"href",...K,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(T.link)}}}],j={_hidden:!0,_hiddenTablet:!0,_hiddenPhone:!1},nt=()=>({type:a,props:{...o,name:"Collection",gap:0,gapPhone:0,...r(0,0,0,0),[_]:"href"},slots:{[i]:[{type:a,props:{...o,name:"Picture",[B]:"image",boxShape:"portrait",darken:ie,placement:"bottom-left",direction:"column",gap:12,gapPhone:12,...r(32,32),hoverZoom:H,hoverDarken:ne,_hiddenPhone:!0},slots:{[i]:Z()}},{type:"ImageBlock",props:{[h]:"image",aspect:"4/5",contained:!1,hoverZoom:H,...j}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...r(24,24),...N("surface"),...j},slots:{[i]:Z()}}]}});function rt(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Collections";return{...e,template:w([nt()],(S,b)=>`${t}~card${b?`.${b}`:""}`)}}const st={fields:[{key:"tag",label:"Eyebrow"},{key:"name",label:"Title"},{key:"desc",label:"Description",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"name"},{key:"href",label:"Link",kind:"link"}],seedOnInsert:rt},dt=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],Et=e=>Object.fromEntries(Object.entries(e).filter(([t])=>!dt.includes(t))),z={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:Pe,label:"Menu link"}],seed:ge},q=e=>e.dynamic===!0&&e.relationship==="bundles",Ft=(e={})=>Ge(e),m={fields:y,blocks:[{type:xe,label:"Picture"},{type:Ke,label:"Eyebrow"},{type:Me,label:"Name"},{type:Ve,label:"Specs"},{type:Ue,label:"Price"},{type:He,label:"Colour"},{type:ve,label:"Size"},{type:Fe,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return f(e);const t=P(e);return q(e)?k(t):f(t)}},Q=[{key:"label",label:"Filter name"},{key:pe,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],J=[{slot:Ce,label:he,fields:g},{slot:Le,label:be,fields:[]}],ct=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}],blocks:[{type:"RatingBlock",label:"Rating"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"DetailRows",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"}]},{block:"FooterMenu",...z},{block:$e,...z},{block:"ProductGrid",...m},{block:Ye,...m,slots:[{slot:C,fields:y},{slot:U,label:x,fields:O},...J],fields:[...y,...O,...g],seed:e=>V(v(We(e)))},{block:"RelatedProducts",...m,seed:e=>{const t=P({...Et(e),dynamic:!0});return q(t)?k(t):f(t,{legacyWellHonoured:!0})}},{block:"BundleOffer",...m,seed:e=>k(P({...e,columns:se(e),dynamic:!0}))},{block:"ProductHero",slots:[{slot:C,fields:[]},{slot:ce,label:Te,fields:M}],fields:M,blocks:[{type:de,label:"Price"}],seed:e=>_e(Ee(e))},{block:"FilterBlock",slots:[{slot:C,fields:Q},{slot:U,label:x,fields:O},...J],fields:[...Q,...O,...g],blocks:[{type:L,label:"Card list"}],seed:e=>V(v(me(e)))},{block:"FilterChipsBlock",fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:Oe},{block:"ContactRouting",slots:[{slot:Se,label:"Topic card",fields:W},{slot:fe,label:"Reason chip",fields:ke},{slot:ye,label:"Channel row",fields:G}],fields:[...W,...G],seed:Re},{block:ue,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:Ie},...[Ae,Ne].map(e=>({block:e,slots:we,fields:De,seed:t=>Be(e,t)})),{block:"Events",...lt},{block:"Collections",...st}];te(ct);export{ct as STOREFRONT_CARD_TEMPLATES,nt as collectionCardSeed,q as drawsKits,et as eventsCardSeeds,Ft as productGridCardSeed,rt as withCollectionsTemplate,tt as withEventsTemplate};
|
|
@@ -2,6 +2,8 @@ import type { Data } from "efficient-easel/blocks";
|
|
|
2
2
|
export declare const FILTER_BLOCK_TYPE = "FilterBlock";
|
|
3
3
|
export declare const FILTER_CHIPS_TYPE = "FilterChipsBlock";
|
|
4
4
|
export declare const PRODUCT_GRID_TYPE = "ProductGrid";
|
|
5
|
+
export declare const ALLOY_WHEELS_LISTING_TYPE = "AlloyWheelsListing";
|
|
6
|
+
export declare const MENU_BLOCK_TYPE = "MenuBlock";
|
|
5
7
|
export type DocNode = {
|
|
6
8
|
type: string;
|
|
7
9
|
props: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const E="FilterBlock",_="FilterChipsBlock",O="ProductGrid",T="AlloyWheelsListing",d="MenuBlock";function l(e){const t=e;return!!t&&typeof t=="object"&&typeof t.type=="string"&&!!t.props&&typeof t.props=="object"}function y(e){return Object.entries(e.props??{}).filter(t=>Array.isArray(t[1])&&t[1].length>0&&t[1].every(l))}function A(e){const t=e??{},c=[];Array.isArray(t.content)&&c.push(t.content);for(const s of Object.values(t.zones??{}))Array.isArray(s)&&c.push(s);return c}function L(e){const t=[],c=(s,p)=>{const f=[s,...p];for(const i of s)if(l(i)){t.push({node:i,order:t.length,lists:f});for(const[,o]of y(i))c(o,f)}};for(const s of A(e))c(s,[]);return t}function h(e){return L(e).map(t=>t.node)}function P(e,t){const c=o=>{let n=o;for(const[r,u]of y(o)){const a=u.map(c);a.some((m,x)=>m!==u[x])&&(n={...n,props:{...n.props,[r]:a}})}return t(n,o)},s=o=>{const n=o.map(r=>l(r)?c(r):r);return n.some((r,u)=>r!==o[u])?n:o},p=e;let f=null;const i=()=>f??={...e};if(Array.isArray(p.content)){const o=s(p.content);o!==p.content&&(i().content=o)}if(p.zones){const o=Object.fromEntries(Object.entries(p.zones).map(([n,r])=>[n,Array.isArray(r)?s(r):r]));Object.keys(o).some(n=>o[n]!==p.zones[n])&&(i().zones=o)}return f??e}export{T as ALLOY_WHEELS_LISTING_TYPE,E as FILTER_BLOCK_TYPE,_ as FILTER_CHIPS_TYPE,d as MENU_BLOCK_TYPE,O as PRODUCT_GRID_TYPE,h as documentNodes,l as isDocNode,P as mapDocumentNodes,L as placedDocumentNodes,y as slotListsOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as B}from"react/jsx-runtime";import{declaredBlockSource as
|
|
1
|
+
import{jsx as B}from"react/jsx-runtime";import{declaredBlockSource as O,sourcedRows as k}from"efficient-web-builder/format/lib/content/block-sources";import _ from"../../components/FooterMenu.js";import{addressQueryOf as M}from"../wheels/selected-ranges.js";import{menuLayoutOf as S}from"../content/tab-strip.js";import{MENU_BLOCK_TYPE as i}from"./document-nodes.js";const L={[i]:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",PaymentLogosBlock:"FooterPayment"},T="column";function w({id:e,template:o,menu:r,dataSource:n,dataRows:l,heading:u,accordionMobile:a,showDividers:m,direction:d,linkAlign:c,linkRange:s,menuStyle:f,currentPage:g,menuStylePhone:p,menuPanelWidth:P,menuPanelTintColor:y,menuPanelTintOpacity:E,editor:t,...F}){return B(_,{owner:{id:String(e??""),type:i,template:o},menu:r,served:O({dataSource:n})?k({dataSource:n,dataRows:l},!!t?.isEditing).rows:void 0,heading:u||void 0,accordionMobile:a,showDividers:m,layout:S(d),linkAlign:c,linkRange:s,menuStyle:f,currentPage:g,pageQuery:M(F)||void 0,menuStylePhone:p,menuPanelWidth:P,menuPanelTintColor:y,menuPanelTintOpacity:E,editing:t?.isEditing})}function j(e){for(const[r,n]of Object.entries(L))e[r]={...e[n]};const o=e.MenuBlock;o.defaultProps={...o.defaultProps,direction:T},o.render=w}export{L as PAGE_BLOCKS_FROM_FOOTER,T as PAGE_MENU_DIRECTION_DEFAULT,j as addPageBlocksFromFooter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerSectionToBox as d}from"efficient-web-builder/render/lib/sections/section-to-box";import{DIM as m,DROP_COMMON as
|
|
1
|
+
import{registerSectionToBox as d}from"efficient-web-builder/render/lib/sections/section-to-box";import{DIM as m,DROP_COMMON as E,DROP_SIDE_PADDING as T,FOLLOW_THE_BOX as _,INNER_BOX as h,SAME_KEYS as L,SECTION_BOX as O,TEXT as r,wrapperPad as g,wrapperPadKeys as l}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{token as S}from"efficient-web-builder/format/lib/document/seed-parts";import{fluidToken as P}from"efficient-web-builder/render/lib/document/blocks/general/section-head-looks";import{PAGE_TITLE_LEVEL_PROP as y,pageTitleDemoted as n}from"efficient-web-builder/format/lib/document/one-h1";import{CARD_TEMPLATE_SLOT as A,templateOnInsert as I,templateOnRead as c}from"efficient-web-builder/format/lib/content/card-template";import{FACET_TEMPLATE_SLOT as f}from"../content/facet-row-seed.js";import{RAIL_HEAD_TEMPLATE_SLOT as k,RAIL_TEMPLATE_SLOT as b}from"../content/rail-row-seed.js";import"./card-templates.js";import{ALLOY_WHEELS_LISTING_TYPE as D}from"./document-nodes.js";const p={top:40,bottom:40,topPhone:40,bottomPhone:40},i={textStyle:"heading-1",...P("headingMedium",28,4,40),lineHeight:1.05,letterSpacing:-.02},x=["heading","intro"],s=[A,f,b,k];function N(e,t){const a=(t?I:c)(D,e);return Object.fromEntries(s.map(o=>[o,a[o]]))}const M=()=>({name:"List",boxProps:e=>({...O,direction:"column",gap:24,gapPhone:24,...g(e,p)}),box:[...L,...l(p)],parts:[{kind:"group",name:"Heading",props:{...h,gap:8,gapPhone:8},parts:[{kind:"text",key:"heading",role:"heading",props:{...r,tag:"h1"},style:i,when:e=>!n(e)},{kind:"text",key:"heading",role:"heading",props:{...r,tag:"h2"},style:i,when:n},{kind:"text",key:"intro",role:"body",props:m,style:{textStyle:"body-1",...S("body",15)}}]},{kind:"core",keep:"rest",props:_,derive:{reads:[...s],props:(e,t)=>N(e,t.press===!0)}}],pressKeepsEmpty:x,drop:{...E,...T,[y]:"read by the heading part's `when`: 2 (set by lib/document/one-h1 on a later opener) makes the Text an h2, anything else an h1"}});d({AlloyWheelsListing:M()});export{x as LISTING_HEAD_ROWS};
|
|
@@ -1 +1,3 @@
|
|
|
1
1
|
export declare const FIELD_INPUT_CLASS = "w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";
|
|
2
|
+
export declare const ROW_INPUT_CLASS = "w-0 min-w-0 flex-1";
|
|
3
|
+
export declare const ROW_INPUT_WRAP_CLASS = "w-0 min-w-[7rem] flex-1";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";export{e as FIELD_INPUT_CLASS};
|
|
1
|
+
const e="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent",o="w-0 min-w-0 flex-1",t="w-0 min-w-[7rem] flex-1";export{e as FIELD_INPUT_CLASS,o as ROW_INPUT_CLASS,t as ROW_INPUT_WRAP_CLASS};
|
|
@@ -19,6 +19,11 @@ export type ListingFilter = {
|
|
|
19
19
|
param: string;
|
|
20
20
|
value: string;
|
|
21
21
|
} | null;
|
|
22
|
+
export declare function linkParts(url: string): {
|
|
23
|
+
path: string;
|
|
24
|
+
query: string;
|
|
25
|
+
hash: string;
|
|
26
|
+
};
|
|
22
27
|
export declare function readListingFilter(url: string): ListingFilter;
|
|
23
28
|
export declare function withListingFilter(url: string, filter: ListingFilter): string;
|
|
24
29
|
export declare function listingTarget(url: string, listingPaths: readonly string[]): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isSafeLinkHref as
|
|
1
|
+
import{isSafeLinkHref as x}from"efficient-shell/markup";import{itemKind as m,PLP_KIND_LABELS as I,PLP_KINDS as A,resolvePlpKinds as y}from"../catalog/plp-item.js";import{inferLinkKind as F,linkPickerSetup as S}from"efficient-web-builder/format/lib/links/link-picker-setup";import{pagePath as u,wheelPath as E}from"efficient-web-builder/format/lib/links/page-link-rules";import{buildPlpFacets as T,EMPTY_PLP_FILTERS as R,listingHiddenFacets as b,PLP_PARAM as P,PLP_TYPE_PARAM as g}from"../wheels/plp-filters.js";import{ALLOY_WHEELS_LISTING_TYPE as U,FILTER_BLOCK_TYPE as v,documentNodes as N}from"../document/document-nodes.js";import{LINK_KINDS as te,anchorPath as ne,linkPagePath as re,linkKindsFor as ie,pageAnchors as oe,pagePath as se,postPath as le,wheelPath as ae}from"efficient-web-builder/format/lib/links/page-link-rules";function C(e){return x(e.trim())}const f="/wheels",p="Products";function K(e,t){return t>1?`${p} · ${e}`:p}function L(...e){for(const t of[U,v])for(const r of e){const n=N({content:r?.content}).find(i=>i.type===t);if(n)return n.props??{}}return null}function d(...e){return L(...e)!==null}function O(e,t){const r=e.filter(n=>d(...n.docs)).map(n=>u(n.slug));return t.fallback&&!r.includes(f)?[...r,f]:r}const h=[g,...Object.entries(P).filter(([e])=>e!=="tyreSizes").map(([,e])=>e)];function _(e){const t=e.indexOf("#"),r=t===-1?"":e.slice(t),n=t===-1?e:e.slice(0,t),i=n.indexOf("?");return{path:i===-1?n:n.slice(0,i),query:i===-1?"":n.slice(i+1),hash:r}}function $(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function Y(e){const t=new URLSearchParams(_(e).query);for(const r of h){const n=t.get(r);if(n)return{param:r,value:n}}return null}function k(e,t){const{path:r,query:n,hash:i}=_(e),l=n.split("&").filter(s=>s&&!h.includes($(s.split("=")[0])));return t?.value&&l.push(`${encodeURIComponent(t.param)}=${encodeURIComponent(t.value)}`),`${r}${l.length?`?${l.join("&")}`:""}${i}`}function D(e,t){const r=k(e,null);return t.includes(r)?r:e}function Q(e,t,r=[]){return F(e,t,{listingPaths:r,targetOf:n=>D(n,r)})}function V(e){return Array.isArray(e)?e.filter(t=>typeof t?.kind=="string"&&typeof t.field_key=="string").map(t=>({kind:t.kind,fieldKey:t.field_key,...typeof t.filter=="boolean"?{filter:t.filter}:{},filterOrder:t.filter_order??null})):[]}const B="Product type",G="AUD";function q(e,t){const r=t.listing??{},n=y(r.kinds),i=e.filter(o=>n.includes(m(o))),l=b(r),s=T(i,R,G,n,t.fieldUsage).filter(o=>!l.includes(o.key)).map(o=>({param:P[o.key],label:o.label,values:o.options.filter(c=>!c.value.includes(",")).map(c=>({value:c.value,label:c.label}))})).filter(o=>o.values.length>0),a=A.filter(o=>n.includes(o)&&i.some(c=>m(c)===o));return a.length>1&&s.unshift({param:g,label:B,values:a.map(o=>({value:o,label:I[o]}))}),s}function H(e){return t=>{const r=O(t,{fallback:e.offersCommerce}),n=t.filter(i=>d(...i.docs)).length;return{listingPaths:r,pageOptions:i=>{const l=i.map(s=>{const a=t.find(o=>u(o.slug)===s.value);return a&&d(...a.docs)?{...s,label:K(a.title,n)}:s});return n===0&&e.offersCommerce&&!l.some(s=>s.value===f)&&l.push({value:f,label:p}),l},filtersFor:i=>{if(!r.includes(i))return null;const l=t.find(s=>u(s.slug)===i);return q(e.catalogue,{listing:l?L(...l.docs):null,fieldUsage:e.fieldUsage})},readFilter:Y,withFilter:k}}}function X(e){const t=H({catalogue:e.catalogue,fieldUsage:e.fieldUsage,offersCommerce:e.offers.offersCommerce})(e.pages),r=S({pages:e.pages,posts:e.posts,products:e.products.map(n=>({href:E(n.slug),name:n.name||n.slug})),offers:e.offers},t);return{...r,rules:{...r.rules,isSafe:C},filtersFor:r.filtersFor??(()=>null)}}export{f as BUILT_IN_LISTING_PATH,te as LINK_KINDS,h as LISTING_FILTER_PARAMS,p as LISTING_PAGE_LABEL,B as PRODUCT_TYPE_FILTER_LABEL,ne as anchorPath,V as fieldUsageFromAdminRows,Q as inferLinkKind,d as isProductListingPage,C as isSafeLink,ie as linkKindsFor,re as linkPagePath,_ as linkParts,X as linkPickerSetup,q as listingFilterFields,L as listingNode,K as listingPageLabel,D as listingTarget,oe as pageAnchors,se as pagePath,le as postPath,O as productListingPaths,Y as readListingFilter,H as storefrontLinkFilters,ae as wheelPath,k as withListingFilter};
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { type BandPad } from "efficient-web-builder/render/lib/content/section-padding";
|
|
2
|
+
export declare const FRAME_ROOM_DESKTOP_Y = "py-[120px]";
|
|
3
|
+
export declare const FRAME_ROOM_DESKTOP_BOTTOM = "pb-[120px]";
|
|
4
|
+
export declare const FRAME_PHONE_PX = 70;
|
|
5
|
+
export declare const FRAME_ROOM_PHONE_Y = "max-view-wide:py-[70px]";
|
|
6
|
+
export declare const FRAME_ROOM_PHONE_BOTTOM = "max-view-wide:pb-[70px]";
|
|
7
|
+
export declare const FRAME_ROOM_NO_TOP = "pt-0";
|
|
8
|
+
export declare const FRAME_ROOM_NO_TOP_PHONE = "max-view-wide:pt-0";
|
|
9
|
+
export declare const FRAME_ROOM_Y = "py-[120px] max-view-wide:py-[70px]";
|
|
10
|
+
export declare const FRAME_ROOM_OWN_BOX = "pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]";
|
|
11
|
+
export declare const FRAME_ROOM_PRODUCT_GRID = "pt-[var(--pg-pt)] pb-[120px]";
|
|
12
|
+
export declare const FRAME_ROOM_PRODUCT_GRID_PHONE = "max-view-wide:pt-[70px] max-view-wide:pb-[70px]";
|
|
13
|
+
export declare const FRAME_ROOM_COUNT = "py-[32px] max-view-wide:py-[24px]";
|
|
2
14
|
export declare const DETAIL_ROWS_ROOM: {
|
|
3
15
|
readonly top: 100;
|
|
4
16
|
readonly bottom: 100;
|
|
@@ -12,12 +24,16 @@ export declare const FRAME_120: {
|
|
|
12
24
|
readonly bottom: 120;
|
|
13
25
|
};
|
|
14
26
|
export declare function bandPadProps(props: Record<string, unknown>): Record<string, unknown>;
|
|
27
|
+
type FramedBandPad = BandPad & {
|
|
28
|
+
attrs: Record<string, string>;
|
|
29
|
+
};
|
|
15
30
|
export declare function framedBandPad(pads: Record<string, unknown> | undefined, frame: {
|
|
16
31
|
top: number;
|
|
17
32
|
bottom: number;
|
|
18
33
|
}, opts?: {
|
|
19
34
|
noTop?: boolean;
|
|
20
35
|
nonNegative?: boolean;
|
|
21
|
-
}):
|
|
36
|
+
}): FramedBandPad;
|
|
22
37
|
export declare function withBandClasses(className: string, pad: BandPad): string;
|
|
23
38
|
export declare function headIsEmpty(num: unknown, title: unknown, linkText: unknown): boolean;
|
|
39
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BAND_PAD_KEYS as
|
|
1
|
+
import{BAND_PAD_KEYS as r,BAND_TO_SECTION_PAD as m,SECTION_PAD_KEYS as c,bandPadAttrs as a}from"efficient-web-builder/render/lib/content/section-padding";import{finiteNumber as p}from"efficient-web-builder/format/lib/finite-number";import{EDGE_LINE_ATTRS as A}from"efficient-web-builder/format/lib/content/view-lines";const P="py-[120px]",R="pb-[120px]",l=70,T="max-view-wide:py-[70px]",u="max-view-wide:pt-[70px]",E="max-view-wide:pb-[70px]",N="pt-0",b="max-view-wide:pt-0",I=`${P} ${T}`,S=`${N} ${R} ${b} ${E}`,B=`pt-[var(--pg-pt)] ${R}`,C=`${u} ${E}`,H="py-[32px] max-view-wide:py-[24px]",g={top:100,bottom:100},Y={top:120,bottom:120},k={top:120,bottom:120},O={top:c.top,bottom:c.bottom},D=[...m.map(([t])=>t),O.top,O.bottom];function v(t){const o={};for(const n of D)t[n]!==void 0&&(o[n]=t[n]);return o}function G(t,o,n={}){const e=n.nonNegative?F(t??{}):t??{},d={top:p(e[O.top])===void 0?void 0:o.top,bottom:p(e[O.bottom])===void 0?void 0:o.bottom},s=n.noTop&&p(e[r.top])===void 0,_=a(e,d,{noTop:s}),x=Object.fromEntries(Object.entries(_.style).filter(([f,M])=>M!==void 0&&!(s&&f==="paddingTop")));return{..._,style:x,attrs:_.className?A:{}}}function F(t){const o={...t};for(const n of[r.top,r.bottom]){const e=p(o[n]);e!==void 0&&e<0&&delete o[n]}return o}function K(t,o){return o.className?`${t} ${o.className}`:t}function i(t){return t==null||t===!1||typeof t=="string"&&!t.trim()}function U(t,o,n){return i(t)&&i(o)&&i(n)}export{g as DETAIL_ROWS_ROOM,k as FRAME_120,l as FRAME_PHONE_PX,H as FRAME_ROOM_COUNT,R as FRAME_ROOM_DESKTOP_BOTTOM,P as FRAME_ROOM_DESKTOP_Y,N as FRAME_ROOM_NO_TOP,b as FRAME_ROOM_NO_TOP_PHONE,S as FRAME_ROOM_OWN_BOX,E as FRAME_ROOM_PHONE_BOTTOM,T as FRAME_ROOM_PHONE_Y,B as FRAME_ROOM_PRODUCT_GRID,C as FRAME_ROOM_PRODUCT_GRID_PHONE,I as FRAME_ROOM_Y,Y as PRODUCT_GRID_ROOM,v as bandPadProps,G as framedBandPad,U as headIsEmpty,K as withBandClasses};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type GalleryLayout } from "efficient-web-builder/format/lib/content/gallery-layout";
|
|
2
2
|
export interface GalleryTile {
|
|
3
3
|
id: string;
|
|
4
4
|
tag: string;
|
|
@@ -22,6 +22,6 @@ export interface WallSpan {
|
|
|
22
22
|
colPhone: number;
|
|
23
23
|
rowPhone: number;
|
|
24
24
|
}
|
|
25
|
-
export declare function wallSpanAt(
|
|
25
|
+
export declare function wallSpanAt(layout: GalleryLayout, at: number, count: number): WallSpan;
|
|
26
26
|
export declare const WALL_PLACED_CELL = "sf-wall-placed";
|
|
27
27
|
export declare const WALL_PLACED_CSS: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{galleryTailSpan as w}from"efficient-web-builder/format/lib/content/gallery-layout";const A=["newest","name"],h={newest:"Newest",name:"Name A–Z"},_={tag:null,sort:"newest"};function L(n){const t=[];for(const e of n){const r=e.tag.trim();r&&!t.includes(r)&&t.push(r)}return t}function m(n,t){return n!==null&&L(t).includes(n)?n:null}function E(n,t){return m(n.tag,t)===null&&n.sort==="newest"}function S(n,t){const e=m(t.tag,n),r=e===null?[...n]:n.filter(o=>o.tag.trim()===e);return t.sort==="name"&&r.sort((o,a)=>o.name.localeCompare(a.name)),r.map(o=>o.id)}function T(n,t,e){const r=s=>{const l=(s?n.leadPhone:n.lead)??[],c=s?n.phone:n.desktop;if(t<l.length)return[l[t][0],l[t][1]];const p=(e-l.length)%c.length;if(p>0&&t>=e-p)return[w(n,s),1];const i=c[(t-l.length)%c.length];return[i[0],i[1]]},[o,a]=r(!1),[f,g]=r(!0);return{col:o,row:a,colPhone:f,rowPhone:g}}const u="sf-wall-placed",R=`.${u}{grid-column:span var(--sf-wall-c) !important;grid-row:span var(--sf-wall-r) !important}@media (max-width:800px){.${u}{grid-column:span var(--sf-wall-cp) !important;grid-row:span var(--sf-wall-rp) !important}}`;export{_ as EMPTY_GALLERY_TOOLBAR,A as GALLERY_SORT_KEYS,h as GALLERY_SORT_LABELS,u as WALL_PLACED_CELL,R as WALL_PLACED_CSS,m as clampGalleryTag,S as galleryShownIds,L as galleryTags,E as galleryToolbarIdle,T as wallSpanAt};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sourcedRows as E}from"efficient-web-builder/format/lib/content/block-sources";import{say as s}from"efficient-web-builder/format/lib/editor-words";import{resolveGalleryLayout as _}from"efficient-web-builder/format/lib/content/gallery-layout";import{MEDIA_ZONES as O}from"efficient-easel/screen/lib/content/media-zones";import{servedListOf as P,servedRowLists as T,servedWords as R}from"../content/served-lists.js";const U="product-pictures",b="all",D=O.filter(e=>e!=="rendering"&&e!=="videos"),S="twoThenThreesPhoto";function G(e){const o=typeof e.layout=="string"&&e.layout?e.layout:void 0;return o&&_(o)||e.columns!=null&&e.columns!==""?o:S}const v=12,x=4,A=e=>Array.from({length:e},(o,n)=>({key:`sample-${n+1}`,process:s("Category"),eyebrow:s("Vehicle"),name:s("Product name"),meta:s("Finish")}));function N(e,o,n){const c=typeof n=="number"&&n>0?Math.floor(n):void 0,{rows:p,sample:f}=E(e,o,A(c??x)),y=f?null:T(e,t=>R(t.photos,v)),l=new Set,u=[];return p.forEach((t,m)=>{const r=t.cover??"";if(!f&&!r)return;const
|
|
1
|
+
import{sourcedRows as E}from"efficient-web-builder/format/lib/content/block-sources";import{say as s}from"efficient-web-builder/format/lib/editor-words";import{resolveGalleryLayout as _}from"efficient-web-builder/format/lib/content/gallery-layout";import{MEDIA_ZONES as O}from"efficient-easel/screen/lib/content/media-zones";import{servedListOf as P,servedRowLists as T,servedWords as R}from"../content/served-lists.js";const U="product-pictures",b="all",D=O.filter(e=>e!=="rendering"&&e!=="videos"),S="twoThenThreesPhoto";function G(e){const o=typeof e.layout=="string"&&e.layout?e.layout:void 0;return o&&_({layout:o})||e.columns!=null&&e.columns!==""?o:S}const v=12,x=4,A=e=>Array.from({length:e},(o,n)=>({key:`sample-${n+1}`,process:s("Category"),eyebrow:s("Vehicle"),name:s("Product name"),meta:s("Finish")}));function N(e,o,n){const c=typeof n=="number"&&n>0?Math.floor(n):void 0,{rows:p,sample:f}=E(e,o,A(c??x)),y=f?null:T(e,t=>R(t.photos,v)),l=new Set,u=[];return p.forEach((t,m)=>{const r=t.cover??"";if(!f&&!r)return;const a=t.key||`row-${m+1}`;if(l.has(a))return;l.add(a);const i=P(y,t,m)??[],h=i[0]===r?i.slice(1):i.filter(d=>d!==r);u.push({image:r,photos:h.map(d=>({src:d})),href:t.href||void 0,process:t.process||void 0,eyebrow:t.eyebrow||void 0,name:t.name||void 0,meta:t.meta||void 0,tile:{id:a,tag:t.process??"",name:t.name??""}})}),c?u.slice(0,c):u}export{b as EVERY_IMAGE_ZONE,D as IMAGE_ZONES,S as PRODUCT_PICTURES_LAYOUT,U as PRODUCT_PICTURES_SOURCE,N as productPictureTiles,G as productPicturesLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EMPTY_PLP_FILTERS as
|
|
1
|
+
import{EMPTY_PLP_FILTERS as u,plpFiltersToParams as p}from"./plp-filters.js";import{appendVehicleParams as h}from"./plp-vehicle-params.js";import{linkParts as f}from"../links/link-rules.js";const F="The results link is off while the Lugs filter is on. The product listing page filters on bolt pattern and has no lug filter, so a shopper's lug choice could not be carried across — they would land on a wider set of products than they asked for. Turn Lugs off to use the results link.";function P(e){const t=[];return e.lugs!=null&&t.push("lugs"),t}function g(e){return e==="default"?"recommended":e}function m(e){return{...u,collections:e.process?[e.process]:[],diameters:e.size!=null?[e.size]:[],finishes:e.finish?[e.finish]:[],priceMin:e.priceMin,priceMax:e.priceMax,sort:g(e.sort)}}function k(e,t,o){const{path:i,query:n,hash:l}=f(e),r=new URLSearchParams(n);for(const[a,c]of p(m(t)))r.set(a,c);h(r,o);const s=r.toString();return`${i}${s?`?${s}`:""}${l}`}export{F as RESULTS_LINK_BLOCKED_NOTE,m as catalogFiltersToListingFilters,k as listingLinkFromCatalogFilters,P as unmappableCatalogFacets};
|
|
@@ -98,8 +98,9 @@ export interface PlpChip {
|
|
|
98
98
|
export declare function plpActiveChips(f: PlpFilterState, currency: Currency, formatMoney: (amount: number, currency: Currency) => string): PlpChip[];
|
|
99
99
|
export declare const PLP_PARAM: Record<PlpFacetKey, string>;
|
|
100
100
|
export declare const PLP_TYPE_PARAM = "type";
|
|
101
|
-
export declare function plpFiltersFromParams(
|
|
101
|
+
export declare function plpFiltersFromParams(query: string | URLSearchParams): PlpFilterState;
|
|
102
102
|
export declare function plpFiltersToParams(f: PlpFilterState): URLSearchParams;
|
|
103
|
+
export declare function plpFilterQuery(query: string | URLSearchParams): string;
|
|
103
104
|
export declare function plpPageSequence(pageCount: number, page: number): (number | null)[];
|
|
104
105
|
export interface PlpPageResult<T extends PlpItem = PlpItem> {
|
|
105
106
|
items: T[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{answerOrder as
|
|
1
|
+
import{answerOrder as Q,answersForKind as R,facetFieldKey as k,keepForFilter as q,NO_FIELD_ANSWERS as J,orderByAnswers as ee}from"../content/field-usage.js";import{STOCK_WORDS as te}from"../content/stock-words.js";import{parseOption as ne}from"efficient-web-builder/format/lib/parse-option";import{comparePrice as L,FROM_PREFIX_START as re,priceIn as ie,withinPriceRange as se}from"./price-display.js";import{trimDecimal as oe,wheelSizeLabel as le}from"./spec-format.js";import{itemLugs as ce,lugFilterLabel as ae}from"./lug-count.js";import{itemBrand as z,itemCollections as ue,itemDiameters as pe,itemFinishFamilies as fe,itemFinishes as de,itemInStock as F,itemIsNew as E,itemKind as b,itemName as O,itemPcds as me,itemPrices as y,itemSpeedRatings as he,itemTyreSizes as _,itemTyreTypes as Se,PLP_ANY_TYPE_LABEL as ge,PLP_KIND_LABELS as N,PLP_KINDS as ye}from"../catalog/plp-item.js";import{parseTyreSize as Pe,tyreSizeLabel as I,tyreSizeLabels as xe,TYRE_SIZE_PARTS as S,TYRE_SIZE_PART_LABELS as we}from"../tyres/tyre-size.js";const Me={recommended:"Recommended","price-asc":"Price · low to high","price-desc":"Price · high to low",new:"Newest",name:"Name A–Z"},v=Object.keys(Me);function B(e){return ne(v,"recommended",e)}function be(e){return v.filter(t=>t!=="recommended"||e.length<=1)}function Ue(e,t){const r=B(e);return be(t).includes(r)?r:"name"}const P=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],A={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},_e={diameters:"tyreSizes"};function C(e){if(e.length===0)return[];const t=P.filter(r=>e.every(n=>A[r].includes(n)));return t.filter(r=>{const n=_e[r];return!n||!t.includes(n)})}function Ze(e,t){return t&&e.includes(t)?[t]:[...e]}function K(e){const t=new Set;for(const r of e)t.add(b(r));return[...t]}const je={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,priceMin:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function Ve(e){return`${Ae(e.width)}×${e.diameter}`}function Xe(e){return[...new Set((e.sizePairs??[]).map(t=>le(t.diameter,t.width)))]}function Ae(e){return oe(e)}function x(e,t,r,n=null,i="fail"){const s=b(e),o=l=>i==="fail"||(l==="lugs"?s==="alloy-wheel":A[l].includes(s));if(n!=="kind"&&t.kind&&s!==t.kind)return!1;for(const l of P){if(n===l)continue;const a=t[l];if(a.length===0||!o(l))continue;const f=a.map(String);if(!Y(e,l).some(u=>f.includes(u)))return!1}if(n!=="lugs"&&t.lugs&&t.lugs.length>0&&o("lugs")){const l=ce(e);if(l===null||!t.lugs.includes(l))return!1}return!(n!=="price"&&!se(y(e),r,t.priceMin??null,t.priceMax)||n!=="inStock"&&t.inStockOnly&&!F(e))}function Ge(e,t,r){return e.filter(n=>F(n)&&x(n,t,r,"inStock")).length}function D(e,t,r){const n=[...e],i=(o,l)=>O(o).localeCompare(O(l)),s=K(e).length>1;switch(t){case"price-asc":return n.sort((o,l)=>L(y(o),y(l),r,"asc"));case"price-desc":return n.sort((o,l)=>L(y(o),y(l),r,"desc"));case"name":return n.sort(i);case"new":return n.sort((o,l)=>{const a=(E(l)?1:0)-(E(o)?1:0);return a!==0||!s?a:i(o,l)});default:return n}}function He(e,t,r){return D(e.filter(n=>x(n,t,r)),t.sort,r)}function Qe(e,t,r){return D(e.filter(n=>x(n,t,r,null,"pass")),t.sort,r)}function qe(e){return P.some(t=>e[t].length>0)||(e.lugs?.length??0)>0||e.priceMin!=null||e.priceMax!=null||e.inStockOnly||e.kind!=null}const Je=e=>e.count===0&&!e.checked,Te={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size · diameter",collections:"Collection",pcds:"PCD · fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function Y(e,t){switch(t){case"tyreSizes":return[...new Set(_(e).flatMap(xe))];case"brands":return z(e)?[z(e)]:[];case"finishes":return fe(e);case"diameters":return pe(e).map(String);case"collections":return ue(e);case"pcds":return me(e);case"tyreTypes":return Se(e);case"speedRatings":return he(e)}}function Re(e){const t=new Map;for(const r of e)for(const n of de(r))n.color&&!t.has(n.family)&&t.set(n.family,n.color);return t}function et(e,t,r,n=K(e),i=J,s="fail"){const o=c=>ke(c,n,i),l=Re(e),f=(s==="pass"?P.filter(c=>n.some(g=>A[c].includes(g))):C(n)).filter(c=>c!=="tyreSizes").filter(o).map(c=>{const g=t[c].map(String),T=new Set,M=new Map,w=new Map;for(const p of e){const h=Y(p,c);for(const d of h)T.add(d);for(const d of new Set(h))w.set(d,(w.get(d)??0)+1);if(x(p,t,r,c,s))for(const d of new Set(h))M.set(d,(M.get(d)??0)+1)}const H=[...T].map(p=>({value:p,label:c==="diameters"?`${p}″`:p,count:M.get(p)??0,checked:g.includes(p),swatch:c==="finishes"?l.get(p)??null:null})).sort((p,h)=>{if(c==="diameters")return Number(p.value)-Number(h.value);const d=(w.get(h.value)??0)-(w.get(p.value)??0);return d!==0?d:p.value.localeCompare(h.value)});return{key:c,label:Te[c],options:H}}).filter(c=>c.options.length>$),u=[];for(const c of f){const g=Le(c.key,n,i);g!==void 0&&u.push({fieldKey:c.key,filterOrder:g})}return[...ee(f,c=>c.key,u,"filterOrder")]}const $=1;function tt(e){return e.showCollection===!1?["collections"]:[]}function ke(e,t,r){return t.length===0||r.length===0?!0:t.some(n=>q(R(r,n))(k(e,n)))}function Le(e,t,r){if(r.length===0)return;let n;for(const i of t){const s=Q(R(r,i),"filter")(k(e,i));s!==void 0&&(n===void 0||s<n)&&(n=s)}return n}function ze(e){const t=new Set;for(const r of e)for(const n of _(r))t.add(I(n));return t.size}function nt(e,t){return C(t).includes("tyreSizes")?ze(e)>$:!1}function W(e){const t=Pe(e);if(t)return t;const[r,n]=e.split("/");return{width:r?Number(r):void 0,profile:n?Number(n):void 0}}function Fe(e,t,r){return S.slice(0,S.indexOf(r)).every(n=>{const i=t[n];return i==null||e[n]===i})}function rt(e,t,r){const n=W(t.tyreSizes[0]??""),i=new Set(e.filter(s=>x(s,t,r,"tyreSizes")));return S.map(s=>{const o=new Map;for(const a of e){const f=_(a).filter(u=>Fe(u,n,s));for(const u of new Set(f.map(c=>c[s])))o.has(u)||o.set(u,0),i.has(a)&&o.set(u,(o.get(u)??0)+1)}const l=[...o.keys()].sort((a,f)=>a-f).map(a=>({value:a,label:s==="rim"?`R${a}`:String(a),count:o.get(a)??0}));return{part:s,label:we[s],value:n[s]??null,options:l}})}function it(e,t,r,n){const i={...W(t)},s=S.indexOf(r);i[r]=n??void 0;for(const o of S.slice(s+1))i[o]!=null&&e.some(f=>S.slice(0,S.indexOf(o)+1).every(u=>i[u]==null||f[u]===i[u]))||(i[o]=void 0);return I(i)}function st(e,t,r,n){if(t.length<2)return[];const i=e.filter(s=>x(s,r,n,"kind"));return[{kind:null,label:ge,count:i.length,checked:r.kind===null},...t.map(s=>({kind:s,label:N[s],count:i.filter(o=>b(o)===s).length,checked:r.kind===s}))]}function Ee(e,t){return e.map(r=>ie(y(r),t)).filter(r=>r!==null)}function Oe(e){if(e.length===0)return null;const t=Math.floor(Math.min(...e)),r=Math.ceil(Math.max(...e));return r>t?{min:t,max:r}:null}function ot(e,t){return Oe(Ee(e,t))}function lt(e,t,r){const n=[];e.kind&&n.push({key:"kind",value:e.kind,label:N[e.kind]}),e.inStockOnly&&n.push({key:"inStock",value:"",label:te.inStock});for(const i of P)for(const s of e[i]){const o=String(s);n.push({key:i,value:o,label:i==="diameters"?`${o}″`:i==="pcds"?`PCD ${o}`:o})}for(const i of e.lugs??[])n.push({key:"lugs",value:String(i),label:ae(i)});return e.priceMin!=null&&n.push({key:"priceMin",value:"",label:`${re}${r(e.priceMin,t)}`}),e.priceMax!=null&&n.push({key:"price",value:"",label:`Up to ${r(e.priceMax,t)}`}),n}const m={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},U="type",Z="maxPrice",j="minPrice",V="inStock",X="sort",G="page";function Ne(e){const t=typeof e=="string"?new URLSearchParams(e):e,r=l=>t.getAll(l).flatMap(a=>a.split(",")).filter(Boolean),n=Number(t.get(Z)),i=Number(t.get(j)),s=Number(t.get(G)),o=t.get(U);return{tyreSizes:r(m.tyreSizes),brands:r(m.brands),finishes:r(m.finishes),diameters:r(m.diameters).map(Number).filter(Number.isFinite),collections:r(m.collections),pcds:r(m.pcds),tyreTypes:r(m.tyreTypes),speedRatings:r(m.speedRatings),priceMax:Number.isFinite(n)&&n>0?n:null,priceMin:Number.isFinite(i)&&i>0?i:null,inStockOnly:t.get(V)==="1",kind:ye.find(l=>l===o)??null,sort:B(t.get(X)),page:Number.isFinite(s)&&s>=1?Math.floor(s):1}}function Ie(e){const t=new URLSearchParams;for(const r of P){const n=e[r];n.length>0&&t.set(m[r],n.join(","))}return e.priceMin!=null&&t.set(j,String(e.priceMin)),e.priceMax!=null&&t.set(Z,String(e.priceMax)),e.inStockOnly&&t.set(V,"1"),e.kind&&t.set(U,e.kind),e.sort!=="recommended"&&t.set(X,e.sort),e.page>1&&t.set(G,String(e.page)),t}function ct(e){return Ie(Ne(e)).toString()}function at(e,t){if(e<=7)return Array.from({length:e},(s,o)=>o+1);const r=[1],n=Math.max(2,t-1),i=Math.min(e-1,t+1);n>2&&r.push(null);for(let s=n;s<=i;s++)r.push(s);return i<e-1&&r.push(null),r.push(e),r}function ut(e,t,r){const n=e.length,i=Math.max(1,Math.floor(r)),s=Math.max(1,Math.ceil(n/i)),o=Math.min(Math.max(1,Math.floor(t)),s),l=(o-1)*i;return{items:e.slice(l,l+i),page:o,pageCount:s,total:n,from:n===0?0:l+1,to:Math.min(l+i,n)}}export{je as EMPTY_PLP_FILTERS,P as PLP_FACET_KEYS,Te as PLP_FACET_LABELS,$ as PLP_ONE_VALUE_MAX,m as PLP_PARAM,Me as PLP_SORT_LABELS,U as PLP_TYPE_PARAM,He as applyPlpFilters,Qe as applyShopperFilters,B as asPlpSortKey,et as buildPlpFacets,st as buildPlpTypeOptions,rt as buildTyreSizeBoxes,ke as facetWantedByAnyKind,Ae as formatWidth,qe as hasActivePlpFilters,Je as isDeadPlpOption,x as itemMatchesPlp,tt as listingHiddenFacets,ut as paginatePlp,it as pickTyreSize,lt as plpActiveChips,C as plpFacetKeysFor,ct as plpFilterQuery,Ne as plpFiltersFromParams,Ie as plpFiltersToParams,Ge as plpInStockCount,Ue as plpOpeningSort,at as plpPageSequence,ot as plpPriceBounds,Oe as plpPriceBoundsOf,Ee as plpPricedAmounts,Ze as plpShownKinds,be as plpSortKeysFor,nt as plpTyreSizeBoxesShown,ze as plpTyreSizeCount,Ve as sizePairLabel,D as sortPlpItems,Xe as wheelSizeLabels};
|
|
@@ -2,14 +2,12 @@ import type { Data } from "efficient-easel/blocks";
|
|
|
2
2
|
import type { ProductKind, ProductSummary, WheelSummary } from "../api/index.js";
|
|
3
3
|
import type { FieldUsageAnswer } from "../content/field-usage.js";
|
|
4
4
|
import { FILTER_BLOCK_TYPE, PRODUCT_GRID_TYPE } from "../document/document-nodes.js";
|
|
5
|
-
export declare const ALLOY_WHEELS_LISTING_TYPE = "AlloyWheelsListing";
|
|
6
5
|
export { PRODUCT_GRID_TYPE };
|
|
7
6
|
export declare const GRID_CATALOG_PROP = "catalog";
|
|
8
7
|
export declare const GRID_CATALOG_TOTAL_PROP = "catalogTotal";
|
|
9
8
|
export declare const GRID_TOP_UP_SPARE = 12;
|
|
10
9
|
export declare const CATALOG_FILTER_BAR_TYPE = "CatalogFilterBar";
|
|
11
10
|
export declare const FIELD_USAGE_PROP = "fieldUsage";
|
|
12
|
-
export declare const LISTING_QUERY_PROP = "requestQuery";
|
|
13
11
|
export { FILTER_BLOCK_TYPE };
|
|
14
12
|
interface ContentNode {
|
|
15
13
|
type?: string;
|
|
@@ -26,6 +24,5 @@ export declare function hydrateWheelsListing(data: Data, products: ProductSummar
|
|
|
26
24
|
export interface HydrateOptions {
|
|
27
25
|
everyHoverPhoto?: boolean;
|
|
28
26
|
}
|
|
29
|
-
export declare function stampListingQuery(data: Data, query: string): Data;
|
|
30
27
|
export declare function dehydrateWheelsListing(data: Data): Data;
|
|
31
28
|
export declare function dehydrateWheelsListingNode<T extends ContentNode>(stamped: T): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cardHoverOf as
|
|
1
|
+
import{cardHoverOf as A}from"efficient-web-builder/format/lib/animation/hover";import{resolvePlpKinds as E}from"../catalog/plp-item.js";import{gridPagingOf as G}from"../sections/product-grid-pages.js";import{gridKindsOf as L,gridRowsOf as I,isAllProductsSource as W,isLinkedSource as v}from"./grid-source.js";import{ALLOY_WHEELS_LISTING_TYPE as u,FILTER_BLOCK_TYPE as O,PRODUCT_GRID_TYPE as T,documentNodes as C,mapDocumentNodes as N}from"../document/document-nodes.js";import{selectedRangesOf as U,stripSelectedRanges as g}from"./selected-ranges.js";import{withShopperFirstPaint as D,withoutShopperFirstPaint as H,withoutShopperFirstPaintNode as R}from"./shopper-first-paint.js";const h="catalog",w="catalogTotal",B=12,K="CatalogFilterBar",f="fieldUsage";function l(e){return e.props?.source}function p(e){return e?.type===T&&v(l(e))}function a(e){return e?.type===K||e?.type===O}function F(e,t){if(t)return;const{limit:r,cap:o}=G(e.props??{});return o?Math.ceil(r)+B:void 0}function m(e){return e?.type===u||p(e)||a(e)}const c=e=>C(e);function Y(e){return e?c(e).some(t=>t?.type===u||p(t)):!1}function te(e){return e?Y(e)||c(e).some(t=>R(t)!==t)||g(e)!==e:!1}function re(e){return e?c(e).some(m):!1}function ne(e,t){return t.length===0?e:x(e,m,r=>({...r,props:{...r.props??{},[f]:t}}))}function M(e){if(!e)return[];const t=new Set;for(const r of c(e)){if(r?.type!==u&&!p(r))continue;const o=r.props?.kinds;for(const n of p(r)?L(l(r),o):E(o))t.add(n)}return[...t]}function oe(e){if(!e)return;const t=c(e);if(t.some(a))return;const r=M(e).length;let o;for(const n of t){if(n?.type===u)return;if(!p(n))continue;const s=F(n,!1),i=n.props??{},d=new Set(L(l(n),i.kinds)),k=["num","title","description","linkText"].some(y=>typeof i[y]=="string"&&i[y]!=="");if(s===void 0||!W(l(n))||d.size!==r||k)return;o=Math.max(o??0,s)}return o}function se(e){return e.length===1&&e[0]==="alloy-wheel"}function ie(e,t,{everyHoverPhoto:r=!1}={}){const o=U(e.root?.props),n=c(e).some(a),s=r?z:b;return D(j(e,i=>p(i)?V(i,t,F(i,n),s):{...i,props:{...P(i).props,products:s(i,t)}}),o)}const z=(e,t)=>[...t];function b(e,t){const r=A(e.props??{},e.type??""),o=r.kind==="nextImage"&&r.media&&r.media.kind!=="renderings"?r.media.kind:null;return t.map(n=>{const{hoverMedia:s,...i}=n;return s===void 0?n:o&&s?.[o]?{...i,hoverMedia:{[o]:s[o]}}:i})}function V(e,t,r,o){const n=o(e,I(l(e),e.props?.kinds,t)),s={..._(e).props};return r!==void 0&&n.length>r?(s[h]=n.slice(0,r),s[w]=n.length):s[h]=n,{...e,props:s}}function pe(e){return H(x(g(e),m,t=>a(t)?S(t):p(t)?_(t):P(t)))}function S(e){if(!e.props||!(f in e.props))return e;const{[f]:t,...r}=e.props;return{...e,props:r}}function _(e){const{[h]:t,[w]:r,[f]:o,...n}=e.props??{},s=n.source;if(s&&"wheels"in s){const{wheels:i,...d}=s;n.source=d}return{...e,props:n}}function ue(e){const t=g({content:[e]}).content[0],r=R(t);return p(r)?_(r):a(r)?S(r):r?.type===u?P(r):r}function P(e){const{wheels:t,products:r,[f]:o,...n}=e.props??{};return{...e,props:n}}function j(e,t){return x(e,r=>r?.type===u||p(r),t)}function x(e,t,r){return N(e,o=>t(o)?r(o):o)}export{K as CATALOG_FILTER_BAR_TYPE,f as FIELD_USAGE_PROP,O as FILTER_BLOCK_TYPE,h as GRID_CATALOG_PROP,w as GRID_CATALOG_TOTAL_PROP,B as GRID_TOP_UP_SPARE,T as PRODUCT_GRID_TYPE,pe as dehydrateWheelsListing,ue as dehydrateWheelsListingNode,ne as hydrateFieldUsage,ie as hydrateWheelsListing,oe as listingCatalogBound,M as listingCatalogKinds,se as listingWantsWheelsOnly,te as pageHasHydratedValues,Y as pageHasWheelsListing,re as pageReadsFieldUsage};
|
|
@@ -3,6 +3,7 @@ import type { SelectedRanges } from "efficient-web-builder/render/lib/content/bo
|
|
|
3
3
|
import { type PlpSortKey } from "./plp-filters.js";
|
|
4
4
|
export declare const SELECTED_RANGES_PROP = "selectedRanges";
|
|
5
5
|
export declare const SHOPPER_ADDRESS_PROP = "shopperAddress";
|
|
6
|
+
export declare function addressQueryOf(props: Readonly<Record<string, unknown>> | null | undefined): string;
|
|
6
7
|
export interface ShopperAddressMark {
|
|
7
8
|
writes: boolean;
|
|
8
9
|
sort: PlpSortKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SHOW_FOR_PROP as
|
|
1
|
+
import{SHOW_FOR_PROP as E,showForOf as O}from"efficient-web-builder/format/lib/content/box-show-for-choices";import{asPlpSortKey as S,plpFilterQuery as A,plpFiltersFromParams as h}from"./plp-filters.js";import{marksCurrentLink as k,menuLayoutOf as L}from"../content/tab-strip.js";import{ALLOY_WHEELS_LISTING_TYPE as x,FILTER_BLOCK_TYPE as D,MENU_BLOCK_TYPE as R,documentNodes as g,mapDocumentNodes as y}from"../document/document-nodes.js";import{documentShopperScopes as F,pageReachFilterOf as T}from"./shopper-first-paint.js";const u="selectedRanges",i="shopperAddress",m="addressQuery",N=[x,R];function P(e){return N.includes(e.type)?e.type===R?k(L(e.props.direction),e.props.currentPage):!0:!1}function I(e){const r=e?.[m];return typeof r=="string"?r:""}function _(e){if(typeof e=="string")return new URLSearchParams(e.replace(/^\?/,""));if(e instanceof URLSearchParams)return e;const r=new URLSearchParams;for(const[s,t]of Object.entries(e))if(typeof t=="string")r.append(s,t);else if(Array.isArray(t))for(const o of t)typeof o=="string"&&r.append(s,o);return r}function U(e,r){const s=new Set(r),t=[];for(const o of h(_(e)).collections)s.has(o)&&!t.includes(o)&&t.push(o);return t}function K(e){const r=e?.[u];if(!r||!Array.isArray(r.selected)||!Array.isArray(r.known))return null;const s=o=>o.filter(n=>typeof n=="string"),t=s(r.known);return{selected:s(r.selected).filter(o=>t.includes(o)),known:t}}function M(e){const r=e?.[i];return!r||typeof r!="object"?null:{writes:r.writes===!0,sort:S(typeof r.sort=="string"?r.sort:void 0)}}function j(e,r,s){const t=[...new Set(s)],o={selected:U(r,t),known:t},n=T(e),c=new Map;if(n){const p=S(typeof n.props?.openingSort=="string"?n.props.openingSort:void 0);c.set(n,{[i]:{writes:!0,sort:p}});for(const[a,w]of F(e))w===n&&c.set(a,{[i]:{writes:!1,sort:p}})}const l=A(_(r));if(l)for(const p of g(e))P(p)&&c.set(p,{...c.get(p),[m]:l});const f=c.size?y(e,(p,a)=>c.has(a)?{...p,props:{...p.props,...c.get(a)}}:p):e,d=f.root??{};return{...f,root:{...d,props:{...d.props??{},[u]:o}}}}function v(e){const r=y(e,n=>{if(!(i in n.props)&&!(m in n.props))return n;const{[i]:c,[m]:l,...f}=n.props;return{...n,props:f}}),s=r.root;if(!s?.props||!(u in s.props))return r;const{[u]:t,...o}=s.props;return{...r,root:{...s,props:o}}}function B(e){return e?g(e).some(r=>r.type===D||P(r)||O(r.props[E])!==void 0):!1}export{u as SELECTED_RANGES_PROP,i as SHOPPER_ADDRESS_PROP,I as addressQueryOf,B as pageReadsSelectedRanges,U as readSelectedRanges,K as selectedRangesOf,M as shopperAddressMarkOf,j as stampSelectedRanges,v as stripSelectedRanges};
|
package/dist/words.d.ts
CHANGED
|
@@ -1999,6 +1999,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1999
1999
|
| "PNG · JPG · SVG · WEBP · MP4"
|
|
2000
2000
|
| "PNG · JPG · WEBP"
|
|
2001
2001
|
| "Pair"
|
|
2002
|
+
| "Panel"
|
|
2002
2003
|
| "Photo cards"
|
|
2003
2004
|
| "Pick a category from {place} to fill this card’s name, description and image. That content is edited in the category."
|
|
2004
2005
|
| "Pick a form to show here, or build a new one. Forms are made once in {place} and can be shown on any number of pages."
|