efficient-storefront-blocks 0.93.0 → 0.95.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 +45 -0
- package/README.md +1 -0
- package/dist/chunks/{EditorPreviewCheckout-FSEFJZSO.js → EditorPreviewCheckout-3F3CP5MR.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-N76XROIW.js → SiteEditorProvider-HN7TFLUJ.js} +1 -1
- package/dist/chunks/chunk-7SMQDDLZ.js +1 -0
- package/dist/chunks/{chunk-ITIVEB2I.js → chunk-CYLLSHDF.js} +1 -1
- package/dist/chunks/chunk-SUKEQRMP.js +389 -0
- package/dist/chunks/{chunk-NSW5PCGW.js → chunk-WLMM7L6N.js} +1 -1
- package/dist/chunks/{fitment-data-2SHEWSDK.js → fitment-data-Z62WUQGC.js} +1 -1
- package/dist/editor/components/GalleryPicturesSource.js +1 -1
- package/dist/editor/components/GalleryProductBinding.js +1 -1
- package/dist/editor/components/GalleryShowcaseSource.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/AlloyWheelsListing/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductHero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +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/storefront-document.js +1 -1
- package/dist/editor/lib/storefront-editor-words-kept.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +4 -1
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.js +32 -32
- package/dist/links.js +1 -1
- package/dist/render/app/globals.css +37 -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/DefaultProductHero.d.ts +12 -0
- package/dist/render/components/DefaultProductHero.js +1 -0
- package/dist/render/components/FooterMenu.js +1 -1
- package/dist/render/components/GridCardTemplate.d.ts +7 -4
- package/dist/render/components/GridCardTemplate.js +1 -1
- package/dist/render/components/MenuLinkBlock.js +1 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/ProductHeroPanel.d.ts +2 -1
- package/dist/render/components/ProductHeroPanel.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/card-pieces/CardBuyButton.js +1 -1
- package/dist/render/components/card-pieces/CardName.js +1 -1
- package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
- package/dist/render/components/card-pieces/CardSizes.d.ts +10 -2
- package/dist/render/components/card-pieces/CardSizes.js +1 -1
- package/dist/render/components/card-pieces/CardSpecs.d.ts +2 -0
- package/dist/render/components/card-pieces/CardSpecs.js +1 -1
- package/dist/render/components/card-pieces/ProductCardState.d.ts +14 -4
- package/dist/render/components/card-pieces/ProductCardState.js +1 -1
- package/dist/render/components/catalog/ShopperChips.js +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.d.ts +2 -1
- 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 +31 -0
- package/dist/render/lib/content/booking-card-seed.js +1 -0
- package/dist/render/lib/content/contact-card-seed.d.ts +11 -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/hero-option-seed.d.ts +28 -0
- package/dist/render/lib/content/hero-option-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/commerce/ProductEyebrow/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductHero/meta.d.ts +4 -0
- package/dist/render/lib/document/blocks/commerce/ProductHero/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductSpecs/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/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 +15 -0
- package/dist/render/lib/sections/filter-option-rows.js +1 -1
- package/dist/render/lib/sections/product-pictures.d.ts +2 -2
- package/dist/render/lib/sections/product-pictures.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/render/lib/wheels/plp-hydrate.d.ts +4 -1
- package/dist/render/lib/wheels/plp-hydrate.js +1 -1
- package/dist/words.d.ts +16 -1
- package/dist/words.js +5 -5
- package/package.json +3 -3
- package/dist/chunks/chunk-IZEIMAJI.js +0 -1
- package/dist/chunks/chunk-OERUEODX.js +0 -388
- package/dist/render/components/TyrePlpCard.d.ts +0 -20
- package/dist/render/components/TyrePlpCard.js +0 -1
- package/dist/render/components/TyreSummaryCard.d.ts +0 -12
- package/dist/render/components/TyreSummaryCard.js +0 -1
- /package/dist/chunks/{chunk-XYG76Y4H.js → chunk-GW5M2ATK.js} +0 -0
- /package/dist/chunks/{chunk-OERUEODX.js.LEGAL.txt → chunk-SUKEQRMP.js.LEGAL.txt} +0 -0
|
@@ -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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CARD_ROW_FIELD_PROP as
|
|
1
|
+
import{CARD_LIST_TYPE as T,CARD_ROW_FIELD_PROP as y,CARD_ROW_LINK_PROP as h,CARD_TEMPLATE_SLOT as P,registerCardTemplates as w}from"efficient-web-builder/format/lib/content/card-template";import{DIM as o,INNER_BOX as a,TEXT as s,boxPadding as d,fillSlot as B,labelLook as I,labelStyle as D,seedNodes as F,token as E}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as i,CONTAINER_BLOCKS_SLOT as n}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX_ROW_IMAGE_PROP as K}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as H}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as U,EVENTS_FEATURED_DARKEN_STYLE as u,EVENTS_FEATURED_PLACEMENT as M}from"../content/events-featured-look.js";import{SH_LINK as x}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 V}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as v,withHeroPriceTemplate as G}from"../content/hero-price-seed.js";import{HERO_OPTION_FIELDS as W,HERO_OPTION_SLOT as Y,HERO_OPTION_SLOT_LABEL as X,withHeroOptionTemplate as $}from"../content/hero-option-seed.js";import{FILTER_OPTIONS_FIELD as j,withFilterChipsTemplate as z,withFilterTemplate as q}from"../content/filter-card-seed.js";import{FACET_ROW_FIELDS as Q,FACET_TEMPLATE_LABEL as Z,FACET_TEMPLATE_SLOT as J,withFacetTemplate as ee}from"../content/facet-row-seed.js";import{MENU_LINK_BLOCK as te,withMenuTemplate as le}from"../content/menu-card-seed.js";import{CONTACT_CHANNEL_SLOT as oe,CONTACT_REASON_SLOT as ae,CONTACT_TOPIC_SLOT as ie,withContactTemplates as ne}from"../content/contact-card-seed.js";import{ARTICLE_BODY_BLOCK as re,withArticleBodyTemplate as se}from"../content/article-body-seed.js";import{APPOINTMENT_BOOKING_TYPE as de,BOOKING_BOX_TYPE as ce,BOOKING_OPTION_FIELDS as Te,BOOKING_TEMPLATE_SLOTS as Ee,withBookingTemplates as pe}from"../content/booking-card-seed.js";import{PRODUCT_BUY_BLOCK as be,PRODUCT_CARD_FIELDS as C,PRODUCT_COLOUR_BLOCK as _e,PRODUCT_EYEBROW_BLOCK as me,PRODUCT_NAME_BLOCK as Oe,PRODUCT_PICTURE_BLOCK as ke,PRODUCT_PRICE_BLOCK as ye,PRODUCT_SIZE_BLOCK as he,PRODUCT_SPECS_BLOCK as Pe,productCardSeed as ue,withKitCardTemplate as b,withListingCardTemplate as Ce,withProductCardTemplate as _}from"../content/product-card-seed.js";const L="tags",r=I(12),g={textStyle:"heading-3",...E("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},R={textStyle:"body-1",...E("body",14),lineHeight:1.55},Le={...g,...E("headingSmall",30)},ge={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},Re=H.fallback,Se=480,fe=70,Ne=()=>({type:i,props:{...a,name:"Featured",[K]:"cover",darken:U,darkenStyle:u,darkenPhone:fe,darkenStylePhone:u,placement:M,direction:"column",gap:8,gapPhone:8,...d(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:Re,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:Se,sectionHeightUnitPhone:"px",[h]:"href"},slots:{[n]:[l("meta",{...s,tag:"p"},r,!0),l("title",{...s,tag:"h3",widthFit:"fill"},Le),l("excerpt",{...o,tag:"p",widthFit:"fill",maxWidth:384},R),l("dateLabel",{...o,tag:"p"},{...r,color:"muted"})]}}),Ae=()=>({type:i,props:{...a,name:"Post",gap:0,gapPhone:0,...d(0,0,0,0),...B("surface"),shadow:!0},slots:{[n]:[{type:"ImageBlock",props:{[y]:"cover",aspect:"16/10",contained:!1}},{type:i,props:{...a,name:"Words",gap:12,gapPhone:12,...ge},slots:{[n]:[{type:i,props:{...a,name:"Meta",direction:"row",wrap:!0,share:"content",sharePhone:"content",phoneRow:2,gap:12,gapPhone:12,...d(0,0,0,0)},slots:{[n]:[l("meta",{...s,tag:"p"},r,!0),l("dateLabel",{...o,tag:"p"},{...r,color:"muted"},!0)]}},l("title",{...s,tag:"h3",widthFit:"fill"},g),l("excerpt",{...o,tag:"p",widthFit:"fill"},R),{type:T,props:{[y]:L},slots:{template:[{type:i,props:{...a,name:"Chip",...d(4,8,4,8),sectionBorder:{width:1}},slots:{[n]:[l("label",{...o,tag:"p"},r)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[h]:"href",...x,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(12)}}}]}}]}}),we=()=>[Ne(),Ae()];function Be(e){if(e.template!==void 0)return e;const t=typeof e.id=="string"&&e.id.trim()?e.id:"Events",N=["featured","post"];return{...e,template:F(we(),(He,A)=>{const[m,...O]=A.split("."),k=N[Number(m)]??`card${m}`;return O.length?`${t}~${k}.${O.join(".")}`:`${t}~${k}`})}}const Ie={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:L,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:T,label:"Card list"}],seedOnInsert:Be},De=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],Fe=e=>Object.fromEntries(Object.entries(e).filter(([t])=>!De.includes(t))),S={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:te,label:"Menu link"}],seed:le},f=e=>e.dynamic===!0&&e.relationship==="bundles",ot=(e={})=>ue(e),c={fields:C,blocks:[{type:ke,label:"Picture"},{type:me,label:"Eyebrow"},{type:Oe,label:"Name"},{type:Pe,label:"Specs"},{type:ye,label:"Price"},{type:_e,label:"Colour"},{type:he,label:"Size"},{type:be,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return _(e);const t=p(e);return f(e)?b(t):_(t)}},Ke=[{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",...S},{block:"MenuBlock",...S},{block:"ProductGrid",...c},{block:"AlloyWheelsListing",...c,slots:[{slot:P},{slot:J,label:Z}],fields:[...C,...Q],seed:e=>ee(Ce(e))},{block:"RelatedProducts",...c,seed:e=>{const t=p({...Fe(e),dynamic:!0});return f(t)?b(t):_(t,{legacyWellHonoured:!0})}},{block:"BundleOffer",...c,seed:e=>b(p({...e,columns:V(e),dynamic:!0}))},{block:"ProductHero",slots:[{slot:P},{slot:Y,label:X}],fields:W,blocks:[{type:v,label:"Price"}],seed:e=>$(G(e))},{block:"FilterBlock",fields:[{key:"label",label:"Filter name"},{key:j,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],blocks:[{type:T,label:"Card list"}],seed:q},{block:"FilterChipsBlock",fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:z},{block:"ContactRouting",slots:[{slot:ie,label:"Topic card"},{slot:ae,label:"Reason chip"},{slot:oe,label:"Channel row"}],fields:[{key:"eyebrow",label:"Eyebrow",plain:!0},{key:"title",label:"Title",plain:!0},{key:"copy",label:"Body",multiline:!0},{key:"response",label:"Response time"},{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"}],seed:ne},{block:re,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:se},...[ce,de].map(e=>({block:e,slots:Ee,fields:Te,seed:t=>pe(e,t)})),{block:"Events",...Ie}];w(Ke);export{Ke as STOREFRONT_CARD_TEMPLATES,f as drawsKits,we as eventsCardSeeds,ot as productGridCardSeed,Be as withEventsTemplate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as c}from"react/jsx-runtime";import{CatalogFilterProvider as u}from"../../components/catalog/CatalogFilterContext.js";import a from"../../components/CartDrawer.js";import{CartProvider as f}from"../../components/CartContext.js";import{CurrencyProvider as p}from"../../components/CurrencyContext.js";import{SubscribePopupView as s}from"../../components/SubscribePopup.js";import{ConsentBannerPreview as g}from"../../components/ConsentBanner.js";import{CART_DRAWER_KIND as h,resolveCartDrawerContent as v,resolveCartDrawerLook as P}from"efficient-web-builder/format/lib/content/cart-drawer";import{CONSENT_BANNER_KIND as k,resolveConsentBannerContent as b}from"efficient-web-builder/format/lib/content/consent-banner";import{SITE_FOOTER_KIND as y}from"efficient-web-builder/format/lib/content/footer";import{isPageBackgroundAuthored as C}from"efficient-web-builder/format/lib/content/page-background";import{templateProductKind as _}from"efficient-web-builder/format/lib/content/product-page";import{resolveSubscribeContent as w,SUBSCRIBE_POPUP_KIND as D}from"efficient-web-builder/format/lib/content/subscribe";import{DeclaredRecordTypeProvider as R}from"./current-record.js";import{declaredRecordType as B}from"efficient-web-builder/format/lib/content/record-types";import{PublishedPageFrame as N}from"efficient-web-builder/render/lib/document/page-frame";import{POPUP_PAGE_KIND as S,resolvePopupLook as x}from"efficient-web-builder/format/lib/popup/look";import E from"../../components/PopupFrame.js";import{PreviewProductProvider as K}from"./preview-product.js";import{TemplateProductKindProvider as I}from"./template-product-kind.js";import{selectedRangesOf as T}from"../wheels/selected-ranges.js";function O(r,n){const{kind:t}=r;if(t===D){const i=w(r);return c("div",{style:{background:"var(--bg)",minHeight:"100%"},children:[n??null,e(s,{inline:!0,content:i})]})}if(t===h){const i=v(r);return c("div",{style:{background:"var(--bg)",minHeight:"100%"},children:[n??null,e(p,{children:e(f,{preview:!0,children:e(a,{content:i,look:P(r)})})})]})}return t===k?c("div",{style:{background:"var(--bg)",minHeight:"100%"},children:[n??null,e(g,{layout:b(r).layout})]}):null}function A(r,n){if(r.kind!==S)return null;const t=e(m,{rootProps:r,children:r.children});if(!n)return t;const i=typeof r.title=="string"&&r.title.trim()?r.title:"Popup";return e(E,{inline:!0,look:x(r),label:i,children:t})}function m({rootProps:r,children:n}){const{kind:t,editor:i,previewProduct:o}=r,d=!!i?.isEditing,l=_(typeof t=="string"?t:"",r);return e(R,{type:B(r),children:e(I,{kind:l,children:e(K,{slug:d?o:null,children:e(u,{address:T(r),editing:d,children:n})})})})}function ir(r){const n=A(r,!1);if(n)return n;const t=O(r);if(t)return t;const{children:i,pageBackground:o,kind:d}=r,l=d===y;return e(N,{pageBackground:o,inheritBackground:l&&!C(o),chrome:l,children:e(m,{rootProps:r,children:i})})}export{m as StorefrontPageProviders,A as drawPopupPage,ir as drawPublishedStorefrontRoot,O as drawSystemPage};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare function isLabelOnlyMenuUrl(url: string | null | undefined): boolean;
|
|
2
2
|
export type MenuLinkKind = "none" | "off-site" | "app" | "page";
|
|
3
3
|
export declare function menuLinkKind(url: string | null | undefined): MenuLinkKind;
|
|
4
|
+
export declare function regionSwitchHref(url: string | null | undefined, base: string): string | null;
|
|
4
5
|
export interface FooterMenuItem {
|
|
5
6
|
label: string;
|
|
6
7
|
url: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function o(r){const t=(r??"").trim();return t===""||t==="#"}function i(r){const t=(r??"").trim();return o(t)?"none":/^(?:https?:)?\/\//i.test(t)?"off-site":/^[a-z][a-z0-9+.-]*:/i.test(t)?"app":"page"}function u(r,t){const e=(r??"").replace(/[\t\r\n]/g,"").trim();if(!e)return null;try{const n=new URL(e,t);return n.protocol==="http:"||n.protocol==="https:"?n.href:null}catch{return null}}export{o as isLabelOnlyMenuUrl,i as menuLinkKind,u as regionSwitchHref};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CardItemAction } from "efficient-web-builder/format/lib/content/card-state";
|
|
1
2
|
import { plpActiveChips, type PlpChip, type PlpFacetKey, type PlpFilterState } from "../wheels/plp-filters.js";
|
|
2
3
|
export declare const FILTER_IN_STOCK_KEY: "inStock";
|
|
3
4
|
export declare const FILTER_IN_STOCK_LABEL = "Availability";
|
|
@@ -34,4 +35,18 @@ export declare function filterOptionSelected(state: PlpFilterState, key: FilterG
|
|
|
34
35
|
export declare function filterGroupItems(groups: readonly FacetLike[], state: PlpFilterState, inStock: number | null): FilterGroupItem[];
|
|
35
36
|
export declare function filterChipItems(state: PlpFilterState, currency: Parameters<typeof plpActiveChips>[1], formatMoney: Parameters<typeof plpActiveChips>[2]): FilterChipItem[];
|
|
36
37
|
export declare function filterStateWithoutChip(state: PlpFilterState, chip: Pick<FilterChipItem, "key" | "value">): PlpFilterState;
|
|
38
|
+
export interface OptionCardRows<I> {
|
|
39
|
+
items: I[];
|
|
40
|
+
states: {
|
|
41
|
+
selected: boolean;
|
|
42
|
+
}[];
|
|
43
|
+
actions: CardItemAction[];
|
|
44
|
+
}
|
|
45
|
+
export declare function optionCardRows<T, I>(options: readonly T[], { item, selected, press, label, disabled }: {
|
|
46
|
+
item: (option: T, index: number) => I;
|
|
47
|
+
selected: (option: T, index: number) => boolean;
|
|
48
|
+
press: (option: T, index: number) => () => void;
|
|
49
|
+
label?: (option: T, index: number) => string;
|
|
50
|
+
disabled?: (option: T, index: number) => boolean;
|
|
51
|
+
}): OptionCardRows<I>;
|
|
37
52
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{plpActiveChips as
|
|
1
|
+
import{plpActiveChips as c}from"../wheels/plp-filters.js";import{STOCK_WORDS as p}from"../content/stock-words.js";const s="inStock",f="Availability",S="price";function o(r,e,t){if(e===s)return r.inStockOnly===!0;if(e===S)return!1;if(e==="lugs")return(r.lugs??[]).map(String).includes(t);const n=r[e];return Array.isArray(n)&&n.map(String).includes(t)}function y(r,e,t){const n=r.map(l=>({key:l.key,label:l.label,options:l.options.map(i=>({value:i.value,label:i.label,count:String(i.count),state:{selected:o(e,l.key,i.value)}}))}));return t!==null&&n.push({key:s,label:f,options:[{value:s,label:p.inStock,count:String(t),state:{selected:o(e,s,s)}}]}),n}function d(r,e,t){return c(r,e,t).map(n=>({key:n.key,value:String(n.value),label:n.label}))}function g(r,e){const t={...r,page:1};switch(e.key){case"price":return{...t,priceMax:null};case"priceMin":return{...t,priceMin:null};case"inStock":return{...t,inStockOnly:!1};case"kind":return{...t,kind:null};case"lugs":return{...t,lugs:(r.lugs??[]).filter(n=>String(n)!==e.value)};default:{const n=r[e.key].filter(l=>String(l)!==e.value);return{...t,[e.key]:n}}}}function x(r,{item:e,selected:t,press:n,label:l,disabled:i}){return{items:r.map(e),states:r.map((u,a)=>({selected:t(u,a)})),actions:r.map((u,a)=>({press:n(u,a),...l?{label:l(u,a)}:null,...i?{disabled:i(u,a)}:null}))}}export{s as FILTER_IN_STOCK_KEY,f as FILTER_IN_STOCK_LABEL,S as FILTER_PRICE_KEY,d as filterChipItems,y as filterGroupItems,o as filterOptionSelected,g as filterStateWithoutChip,x as optionCardRows};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type GalleryLayoutKey } from "efficient-web-builder/format/lib/content/gallery-layout";
|
|
2
|
-
import { type
|
|
2
|
+
import { type MediaZone } from "efficient-easel/screen/lib/content/media-zones";
|
|
3
3
|
import type { ProductSourceOptions } from "./product-source.js";
|
|
4
4
|
export declare const PRODUCT_PICTURES_SOURCE = "product-pictures";
|
|
5
5
|
export declare const EVERY_IMAGE_ZONE = "all";
|
|
6
|
-
export type ImageZone = Exclude<
|
|
6
|
+
export type ImageZone = Exclude<MediaZone, "rendering" | "videos">;
|
|
7
7
|
export declare const IMAGE_ZONES: readonly ImageZone[];
|
|
8
8
|
export interface ProductPicturesOptions extends ProductSourceOptions {
|
|
9
9
|
mediaZone?: string;
|
|
@@ -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{
|
|
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 i=t.key||`row-${m+1}`;if(l.has(i))return;l.add(i);const a=P(y,t,m)??[],h=a[0]===r?a.slice(1):a.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:i,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};
|
|
@@ -51,6 +51,10 @@ export interface PlpFacetGroup {
|
|
|
51
51
|
label: string;
|
|
52
52
|
options: PlpFacetOption[];
|
|
53
53
|
}
|
|
54
|
+
export declare const isDeadPlpOption: (option: {
|
|
55
|
+
count: number;
|
|
56
|
+
checked: boolean;
|
|
57
|
+
}) => boolean;
|
|
54
58
|
export declare const PLP_FACET_LABELS: Record<PlpFacetKey, string>;
|
|
55
59
|
export declare function buildPlpFacets(items: readonly PlpItem[], f: PlpFilterState, currency: Currency, kinds?: readonly ProductKind[], fieldUsage?: readonly FieldUsageAnswer[], otherKinds?: "fail" | "pass"): PlpFacetGroup[];
|
|
56
60
|
export declare const PLP_ONE_VALUE_MAX = 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{answerOrder as G,answersForKind as k,facetFieldKey as L,keepForFilter as H,NO_FIELD_ANSWERS as J,orderByAnswers as Q}from"../content/field-usage.js";import{STOCK_WORDS as ee}from"../content/stock-words.js";import{parseOption as te}from"efficient-web-builder/format/lib/parse-option";import{comparePrice as R,FROM_PREFIX_START as ne,priceIn as re,withinPriceRange as
|
|
1
|
+
import{answerOrder as G,answersForKind as k,facetFieldKey as L,keepForFilter as H,NO_FIELD_ANSWERS as J,orderByAnswers as Q}from"../content/field-usage.js";import{STOCK_WORDS as ee}from"../content/stock-words.js";import{parseOption as te}from"efficient-web-builder/format/lib/parse-option";import{comparePrice as R,FROM_PREFIX_START as ne,priceIn as re,withinPriceRange as se}from"./price-display.js";import{trimDecimal as ie,wheelSizeLabel as oe}from"./spec-format.js";import{itemLugs as le,lugFilterLabel as ce}from"./lug-count.js";import{itemBrand as z,itemCollections as ae,itemDiameters as ue,itemFinishFamilies as pe,itemFinishes as fe,itemInStock as F,itemIsNew as E,itemKind as M,itemName as O,itemPcds as de,itemPrices as g,itemSpeedRatings as me,itemTyreSizes as _,itemTyreTypes as he,PLP_ANY_TYPE_LABEL as Se,PLP_KIND_LABELS as N,PLP_KINDS as ye}from"../catalog/plp-item.js";import{parseTyreSize as ge,tyreSizeLabel as v,tyreSizeLabels as Pe,TYRE_SIZE_PARTS as S,TYRE_SIZE_PART_LABELS as xe}from"../tyres/tyre-size.js";const we={recommended:"Recommended","price-asc":"Price · low to high","price-desc":"Price · high to low",new:"Newest",name:"Name A–Z"},I=Object.keys(we);function B(e){return te(I,"recommended",e)}function be(e){return I.filter(t=>t!=="recommended"||e.length<=1)}function Ke(e,t){const r=B(e);return be(t).includes(r)?r:"name"}const P=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],T={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},Me={diameters:"tyreSizes"};function C(e){if(e.length===0)return[];const t=P.filter(r=>e.every(n=>T[r].includes(n)));return t.filter(r=>{const n=Me[r];return!n||!t.includes(n)})}function De(e,t){return t&&e.includes(t)?[t]:[...e]}function K(e){const t=new Set;for(const r of e)t.add(M(r));return[...t]}const Ye={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function $e(e){return`${_e(e.width)}×${e.diameter}`}function We(e){return[...new Set((e.sizePairs??[]).map(t=>oe(t.diameter,t.width)))]}function _e(e){return ie(e)}function x(e,t,r,n=null,i="fail"){const s=M(e),o=l=>i==="fail"||(l==="lugs"?s==="alloy-wheel":T[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=le(e);if(l===null||!t.lugs.includes(l))return!1}return!(n!=="price"&&!se(g(e),r,t.priceMin??null,t.priceMax)||n!=="inStock"&&t.inStockOnly&&!F(e))}function Ze(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)=>R(g(o),g(l),r,"asc"));case"price-desc":return n.sort((o,l)=>R(g(o),g(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 je(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 Ue(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 Ve=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(Pe))];case"brands":return z(e)?[z(e)]:[];case"finishes":return pe(e);case"diameters":return ue(e).map(String);case"collections":return ae(e);case"pcds":return de(e);case"tyreTypes":return he(e);case"speedRatings":return me(e)}}function Ae(e){const t=new Map;for(const r of e)for(const n of fe(r))n.color&&!t.has(n.family)&&t.set(n.family,n.color);return t}function Xe(e,t,r,n=K(e),i=J,s="fail"){const o=c=>ke(c,n,i),l=Ae(e),f=(s==="pass"?P.filter(c=>n.some(y=>T[c].includes(y))):C(n)).filter(c=>c!=="tyreSizes").filter(o).map(c=>{const y=t[c].map(String),A=new Set,b=new Map,w=new Map;for(const p of e){const h=Y(p,c);for(const d of h)A.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))b.set(d,(b.get(d)??0)+1)}const X=[...A].map(p=>({value:p,label:c==="diameters"?`${p}″`:p,count:b.get(p)??0,checked:y.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:X}}).filter(c=>c.options.length>$),u=[];for(const c of f){const y=Le(c.key,n,i);y!==void 0&&u.push({fieldKey:c.key,filterOrder:y})}return[...Q(f,c=>c.key,u,"filterOrder")]}const $=1;function Ge(e){return e.showCollection===!1?["collections"]:[]}function ke(e,t,r){return t.length===0||r.length===0?!0:t.some(n=>H(k(r,n))(L(e,n)))}function Le(e,t,r){if(r.length===0)return;let n;for(const i of t){const s=G(k(r,i),"filter")(L(e,i));s!==void 0&&(n===void 0||s<n)&&(n=s)}return n}function Re(e){const t=new Set;for(const r of e)for(const n of _(r))t.add(v(n));return t.size}function He(e,t){return C(t).includes("tyreSizes")?Re(e)>$:!1}function W(e){const t=ge(e);if(t)return t;const[r,n]=e.split("/");return{width:r?Number(r):void 0,profile:n?Number(n):void 0}}function ze(e,t,r){return S.slice(0,S.indexOf(r)).every(n=>{const i=t[n];return i==null||e[n]===i})}function Je(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=>ze(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:xe[s],value:n[s]??null,options:l}})}function Qe(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 v(i)}function et(e,t,r,n){if(t.length<2)return[];const i=e.filter(s=>x(s,r,n,"kind"));return[{kind:null,label:Se,count:i.length,checked:r.kind===null},...t.map(s=>({kind:s,label:N[s],count:i.filter(o=>M(o)===s).length,checked:r.kind===s}))]}function tt(e,t){if(e.length===0)return null;const r=e.map(s=>re(g(s),t)).filter(s=>s!==null);if(r.length===0)return null;const n=Math.floor(Math.min(...r)),i=Math.ceil(Math.max(...r));return i>n?{min:n,max:i}:null}function nt(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:ee.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:ce(i)});return e.priceMin!=null&&n.push({key:"priceMin",value:"",label:`${ne}${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"},Z="type",j="maxPrice",q="inStock",U="sort",V="page";function rt(e){const t=s=>e.getAll(s).flatMap(o=>o.split(",")).filter(Boolean),r=Number(e.get(j)),n=Number(e.get(V)),i=e.get(Z);return{tyreSizes:t(m.tyreSizes),brands:t(m.brands),finishes:t(m.finishes),diameters:t(m.diameters).map(Number).filter(Number.isFinite),collections:t(m.collections),pcds:t(m.pcds),tyreTypes:t(m.tyreTypes),speedRatings:t(m.speedRatings),priceMax:Number.isFinite(r)&&r>0?r:null,inStockOnly:e.get(q)==="1",kind:ye.find(s=>s===i)??null,sort:B(e.get(U)),page:Number.isFinite(n)&&n>=1?Math.floor(n):1}}function st(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.priceMax!=null&&t.set(j,String(e.priceMax)),e.inStockOnly&&t.set(q,"1"),e.kind&&t.set(Z,e.kind),e.sort!=="recommended"&&t.set(U,e.sort),e.page>1&&t.set(V,String(e.page)),t}function it(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 ot(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{Ye as EMPTY_PLP_FILTERS,P as PLP_FACET_KEYS,Te as PLP_FACET_LABELS,$ as PLP_ONE_VALUE_MAX,m as PLP_PARAM,we as PLP_SORT_LABELS,Z as PLP_TYPE_PARAM,je as applyPlpFilters,qe as applyShopperFilters,B as asPlpSortKey,Xe as buildPlpFacets,et as buildPlpTypeOptions,Je as buildTyreSizeBoxes,ke as facetWantedByAnyKind,_e as formatWidth,Ue as hasActivePlpFilters,Ve as isDeadPlpOption,x as itemMatchesPlp,Ge as listingHiddenFacets,ot as paginatePlp,Qe as pickTyreSize,nt as plpActiveChips,C as plpFacetKeysFor,rt as plpFiltersFromParams,st as plpFiltersToParams,Ze as plpInStockCount,Ke as plpOpeningSort,it as plpPageSequence,tt as plpPriceBounds,De as plpShownKinds,be as plpSortKeysFor,He as plpTyreSizeBoxesShown,Re as plpTyreSizeCount,$e as sizePairLabel,D as sortPlpItems,We as wheelSizeLabels};
|
|
@@ -22,7 +22,10 @@ export declare function hydrateFieldUsage(data: Data, answers: readonly FieldUsa
|
|
|
22
22
|
export declare function listingCatalogKinds(data: Data | null | undefined): ProductKind[];
|
|
23
23
|
export declare function listingCatalogBound(data: Data | null | undefined): number | undefined;
|
|
24
24
|
export declare function listingWantsWheelsOnly(kinds: readonly ProductKind[]): boolean;
|
|
25
|
-
export declare function hydrateWheelsListing(data: Data, products: ProductSummary[] | WheelSummary[]): Data;
|
|
25
|
+
export declare function hydrateWheelsListing(data: Data, products: ProductSummary[] | WheelSummary[], { everyHoverPhoto }?: HydrateOptions): Data;
|
|
26
|
+
export interface HydrateOptions {
|
|
27
|
+
everyHoverPhoto?: boolean;
|
|
28
|
+
}
|
|
26
29
|
export declare function stampListingQuery(data: Data, query: string): Data;
|
|
27
30
|
export declare function dehydrateWheelsListing(data: Data): Data;
|
|
28
31
|
export declare function dehydrateWheelsListingNode<T extends ContentNode>(stamped: T): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cardHoverOf as
|
|
1
|
+
import{cardHoverOf as G}from"efficient-web-builder/format/lib/animation/hover";import{resolvePlpKinds as k}from"../catalog/plp-item.js";import{gridPagingOf as I}from"../sections/product-grid-pages.js";import{gridKindsOf as L,gridRowsOf as W,isAllProductsSource as v,isLinkedSource as C}from"./grid-source.js";import{FILTER_BLOCK_TYPE as O,PRODUCT_GRID_TYPE as R,documentNodes as N,mapDocumentNodes as U}from"../document/document-nodes.js";import{selectedRangesOf as D,stripSelectedRanges as h}from"./selected-ranges.js";import{withShopperFirstPaint as H,withoutShopperFirstPaint as Y,withoutShopperFirstPaintNode as T}from"./shopper-first-paint.js";const u="AlloyWheelsListing",m="catalog",w="catalogTotal",B=12,K="CatalogFilterBar",f="fieldUsage",S="requestQuery";function l(e){return e.props?.source}function p(e){return e?.type===R&&C(l(e))}function a(e){return e?.type===K||e?.type===O}function A(e,r){if(r)return;const{limit:t,cap:n}=I(e.props??{});return n?Math.ceil(t)+B:void 0}function _(e){return e?.type===u||p(e)||a(e)}const c=e=>N(e);function M(e){return e?c(e).some(r=>r?.type===u||p(r)):!1}function re(e){return e?M(e)||c(e).some(r=>T(r)!==r)||h(e)!==e:!1}function ne(e){return e?c(e).some(_):!1}function oe(e,r){return r.length===0?e:d(e,_,t=>({...t,props:{...t.props??{},[f]:r}}))}function Q(e){if(!e)return[];const r=new Set;for(const t of c(e)){if(t?.type!==u&&!p(t))continue;const n=t.props?.kinds;for(const o of p(t)?L(l(t),n):k(n))r.add(o)}return[...r]}function se(e){if(!e)return;const r=c(e);if(r.some(a))return;const t=Q(e).length;let n;for(const o of r){if(o?.type===u)return;if(!p(o))continue;const s=A(o,!1),i=o.props??{},g=new Set(L(l(o),i.kinds)),F=["num","title","description","linkText"].some(x=>typeof i[x]=="string"&&i[x]!=="");if(s===void 0||!v(l(o))||g.size!==t||F)return;n=Math.max(n??0,s)}return n}function ie(e){return e.length===1&&e[0]==="alloy-wheel"}function pe(e,r,{everyHoverPhoto:t=!1}={}){const n=D(e.root?.props),o=c(e).some(a),s=t?q:z;return H(V(e,i=>p(i)?b(i,r,A(i,o),s):{...i,props:{...y(i).props,products:s(i,r)}}),n)}const q=(e,r)=>[...r];function z(e,r){const t=G(e.props??{},e.type??""),n=t.kind==="nextImage"&&t.media&&t.media.kind!=="renderings"?t.media.kind:null;return r.map(o=>{const{hoverMedia:s,...i}=o;return s===void 0?o:n&&s?.[n]?{...i,hoverMedia:{[n]:s[n]}}:i})}function b(e,r,t,n){const o=n(e,W(l(e),e.props?.kinds,r)),s={...P(e).props};return t!==void 0&&o.length>t?(s[m]=o.slice(0,t),s[w]=o.length):s[m]=o,{...e,props:s}}function ue(e,r){const t=r.replace(/^\?/,"");return t?d(e,n=>n?.type===u,n=>({...n,props:{...n.props??{},[S]:t}})):e}function ce(e){return Y(d(h(e),_,r=>a(r)?E(r):p(r)?P(r):y(r)))}function E(e){if(!e.props||!(f in e.props))return e;const{[f]:r,...t}=e.props;return{...e,props:t}}function P(e){const{[m]:r,[w]:t,[f]:n,...o}=e.props??{},s=o.source;if(s&&"wheels"in s){const{wheels:i,...g}=s;o.source=g}return{...e,props:o}}function fe(e){const r=h({content:[e]}).content[0],t=T(r);return p(t)?P(t):a(t)?E(t):t?.type===u?y(t):t}function y(e){const{wheels:r,products:t,[f]:n,[S]:o,...s}=e.props??{};return{...e,props:s}}function V(e,r){return d(e,t=>t?.type===u||p(t),r)}function d(e,r,t){return U(e,n=>r(n)?t(n):n)}export{u as ALLOY_WHEELS_LISTING_TYPE,K as CATALOG_FILTER_BAR_TYPE,f as FIELD_USAGE_PROP,O as FILTER_BLOCK_TYPE,m as GRID_CATALOG_PROP,w as GRID_CATALOG_TOTAL_PROP,B as GRID_TOP_UP_SPARE,S as LISTING_QUERY_PROP,R as PRODUCT_GRID_TYPE,ce as dehydrateWheelsListing,fe as dehydrateWheelsListingNode,oe as hydrateFieldUsage,pe as hydrateWheelsListing,se as listingCatalogBound,Q as listingCatalogKinds,ie as listingWantsWheelsOnly,re as pageHasHydratedValues,M as pageHasWheelsListing,ne as pageReadsFieldUsage,ue as stampListingQuery};
|
package/dist/words.d.ts
CHANGED
|
@@ -483,6 +483,8 @@ export type WebBuilderPhrase =
|
|
|
483
483
|
| "Eyebrow style"
|
|
484
484
|
| "Facebook"
|
|
485
485
|
| "Fade"
|
|
486
|
+
| "Fade in"
|
|
487
|
+
| "Fade out"
|
|
486
488
|
| "Feature"
|
|
487
489
|
| "Feature Banner"
|
|
488
490
|
| "Feature Rows"
|
|
@@ -788,6 +790,8 @@ export type WebBuilderPhrase =
|
|
|
788
790
|
| "Month DD, YYYY"
|
|
789
791
|
| "More"
|
|
790
792
|
| "Most popular"
|
|
793
|
+
| "Move down"
|
|
794
|
+
| "Move up"
|
|
791
795
|
| "Multi-column container for blocks."
|
|
792
796
|
| "Muted"
|
|
793
797
|
| "Name"
|
|
@@ -896,6 +900,7 @@ export type WebBuilderPhrase =
|
|
|
896
900
|
| "Panorama 21:9"
|
|
897
901
|
| "Paragraph"
|
|
898
902
|
| "Paragraph size — 13px"
|
|
903
|
+
| "Parallax"
|
|
899
904
|
| "Part of {name}"
|
|
900
905
|
| "Paste a link to each profile. A platform left empty shows nothing on the site."
|
|
901
906
|
| "Payment Logos"
|
|
@@ -912,6 +917,7 @@ export type WebBuilderPhrase =
|
|
|
912
917
|
| "Pick who to reach, then a form that routes the message."
|
|
913
918
|
| "Picture"
|
|
914
919
|
| "Picture first"
|
|
920
|
+
| "Pin while scrolling"
|
|
915
921
|
| "Pinterest"
|
|
916
922
|
| "Place"
|
|
917
923
|
| "Placement"
|
|
@@ -947,6 +953,7 @@ export type WebBuilderPhrase =
|
|
|
947
953
|
| "Product photos"
|
|
948
954
|
| "Product record"
|
|
949
955
|
| "Product record (spec tiles)"
|
|
956
|
+
| "Product renderings"
|
|
950
957
|
| "Product tiles"
|
|
951
958
|
| "Products, prices and forms always show as they are now."
|
|
952
959
|
| "Promotions & sign-ups"
|
|
@@ -1022,6 +1029,8 @@ export type WebBuilderPhrase =
|
|
|
1022
1029
|
| "Scale"
|
|
1023
1030
|
| "Screen"
|
|
1024
1031
|
| "Screen 16:10"
|
|
1032
|
+
| "Screens"
|
|
1033
|
+
| "Scroll"
|
|
1025
1034
|
| "Scroll-Over Text"
|
|
1026
1035
|
| "Scrolling Bar"
|
|
1027
1036
|
| "Search"
|
|
@@ -1371,6 +1380,7 @@ export type WebBuilderPhrase =
|
|
|
1371
1380
|
| "What this card does when a shopper points at it, or taps it on a phone. Highlight fills it with the surface color and turns its text the main color."
|
|
1372
1381
|
| "What this does when a shopper points at it, or taps it on a phone."
|
|
1373
1382
|
| "What this picture does when a shopper points at it. Black and white shows it in grey until then. A phone shows its colour."
|
|
1383
|
+
| "What this picture does when a shopper points at the card. Show next image covers the card or the picture with this product's photos, with arrows; a phone shows the picture as it is. Black and white shows it in grey until then."
|
|
1374
1384
|
| "What this picture does when a shopper points at the card. Show next image fades to the card's next photo. Black and white shows it in grey until then. A phone shows the first photo in colour."
|
|
1375
1385
|
| "What we count."
|
|
1376
1386
|
| "WhatsApp"
|
|
@@ -1418,6 +1428,8 @@ export type WebBuilderPhrase =
|
|
|
1418
1428
|
| "Your unpublished changes are kept"
|
|
1419
1429
|
| "Zigzag"
|
|
1420
1430
|
| "Zoom"
|
|
1431
|
+
| "Zoom in"
|
|
1432
|
+
| "Zoom out"
|
|
1421
1433
|
| "all theme colors"
|
|
1422
1434
|
| "arrangement"
|
|
1423
1435
|
| "body text"
|
|
@@ -1709,6 +1721,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1709
1721
|
| "Filter by brand, colour, size and fitment to find your set."
|
|
1710
1722
|
| "Filter by name"
|
|
1711
1723
|
| "Filter chips"
|
|
1724
|
+
| "Filter option template"
|
|
1712
1725
|
| "Filters"
|
|
1713
1726
|
| "Filters button"
|
|
1714
1727
|
| "Filters shown"
|
|
@@ -1747,6 +1760,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1747
1760
|
| "Frequency options"
|
|
1748
1761
|
| "From our *customers.*"
|
|
1749
1762
|
| "Gallery A"
|
|
1763
|
+
| "Gallery A comes from the product’s Lifestyle photos, Gallery B from its Product photos and the Others gallery from its Others — edit those in the product’s Media tab and refresh. Each media group is a card: the car set on the group is the eyebrow (a card keeps its caption when the group has no car), its finish the meta line; the card’s title is the product name and its tag the category. Headings, intro copy and stats stay yours."
|
|
1750
1764
|
| "Gallery A comes from the product’s Relative / lifestyle photos, Gallery B from its Product photos and the Others gallery from its Others — edit those in the product’s Media tab and refresh. Each media group is a card: its name is the eyebrow, its finish the meta line; the card’s title is the product name and its tag the category. Headings, intro copy and stats stay yours."
|
|
1751
1765
|
| "Gallery A comes from the product’s Relative / lifestyle photos, Gallery B from its Product photos and the Others gallery from its Others — edit those in the product’s Media tab and refresh. Each media group is a card: the car set on the group is the eyebrow (a card keeps its caption when the group has no car), its finish the meta line; the card’s title is the product name and its tag the category. Headings, intro copy and stats stay yours."
|
|
1752
1766
|
| "Gallery B"
|
|
@@ -1929,6 +1943,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1929
1943
|
| "Open now badge"
|
|
1930
1944
|
| "Opening sort"
|
|
1931
1945
|
| "Option label"
|
|
1946
|
+
| "Option template"
|
|
1932
1947
|
| "Options"
|
|
1933
1948
|
| "Others gallery"
|
|
1934
1949
|
| "Outside"
|
|
@@ -1958,6 +1973,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1958
1973
|
| "Picture fit"
|
|
1959
1974
|
| "Pills"
|
|
1960
1975
|
| "Pinning one overrides the section’s Cover image."
|
|
1976
|
+
| "Pools every product’s grouped media: each one’s Lifestyle photos feed Gallery A, its Product photos Gallery B and its Others the Others gallery. Every media group becomes a card, attributed to its own product (title, link and tag). Narrow the set with the Category filter above. Headings, intro copy and stats stay yours."
|
|
1961
1977
|
| "Pools every product’s grouped media: each one’s Relative / lifestyle photos feed Gallery A, its Product photos Gallery B and its Others the Others gallery. Every media group becomes a card, attributed to its own product (title, link and tag). Narrow the set with the Category filter above. Headings, intro copy and stats stay yours."
|
|
1962
1978
|
| "Popup's own"
|
|
1963
1979
|
| "Popups"
|
|
@@ -2025,7 +2041,6 @@ export type StorefrontBlocksPhrase =
|
|
|
2025
2041
|
| "Sample reviewer"
|
|
2026
2042
|
| "Save this address to my account"
|
|
2027
2043
|
| "Saving…"
|
|
2028
|
-
| "Scroll"
|
|
2029
2044
|
| "Search forms…"
|
|
2030
2045
|
| "Search your catalog…"
|
|
2031
2046
|
| "Second card"
|