efficient-storefront-blocks 0.115.0 → 0.117.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 +30 -0
- package/README.md +9 -10
- package/dist/chunks/EditorPreviewCheckout-JKTRIRSH.js +4 -0
- package/dist/chunks/{SiteEditorProvider-RH2SMNYG.js → SiteEditorProvider-ZVNXSXBQ.js} +1 -1
- package/dist/chunks/{chunk-P3DTJ3CI.js → chunk-3XS3LIPN.js} +1 -1
- package/dist/chunks/chunk-JVAY6GGN.js +1 -0
- package/dist/chunks/chunk-NMYHWA3M.js +96 -0
- package/dist/chunks/chunk-XVPVTQYY.js +342 -0
- package/dist/chunks/chunk-XZPK5PGX.js +1 -0
- package/dist/chunks/{fitment-data-RALB36SU.js → fitment-data-3N56LEBE.js} +1 -1
- package/dist/contract.js +19 -3
- package/dist/editor/components/HeaderSettingsPanel.js +1 -1
- package/dist/editor/components/MenuPicker.d.ts +3 -0
- package/dist/editor/components/MenuPicker.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/Form/fields.js +1 -1
- package/dist/editor/lib/document/config.d.ts +1 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +3 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +104 -33
- package/dist/links.js +1 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/ChatContext.d.ts +1 -1
- package/dist/render/components/ChatContext.js +1 -1
- package/dist/render/components/ChatWidget.js +1 -1
- package/dist/render/components/DeliveryOptionsSource.js +1 -1
- package/dist/render/components/FormBlock.d.ts +10 -2
- package/dist/render/components/FormBlock.js +1 -1
- package/dist/render/components/GalleryCard.d.ts +1 -0
- package/dist/render/components/GalleryCard.js +1 -1
- package/dist/render/components/GalleryGrid.d.ts +3 -1
- package/dist/render/components/GalleryGrid.js +3 -3
- package/dist/render/components/GalleryItem.d.ts +3 -0
- package/dist/render/components/GalleryItem.js +1 -1
- package/dist/render/components/HeaderNavItem.js +1 -1
- package/dist/render/components/cart/drawer-parts.js +1 -1
- package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
- package/dist/render/components/checkout/checkout-parts.js +1 -1
- package/dist/render/components/checkout/checkout-state.d.ts +3 -1
- package/dist/render/components/checkout/checkout-state.js +3 -3
- package/dist/render/components/fitment/FitmentFinder.js +1 -1
- package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
- package/dist/render/components/fitment/PickerField.d.ts +2 -1
- package/dist/render/components/fitment/PickerField.js +1 -1
- package/dist/render/components/fitment/useFitmentCascade.d.ts +8 -0
- package/dist/render/components/fitment/useFitmentCascade.js +1 -1
- package/dist/render/components/fitment/useVehicleFit.js +1 -1
- package/dist/render/components/fitment/vehicle-level-state.d.ts +1 -0
- package/dist/render/components/fitment/vehicle-level-state.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.d.ts +3 -0
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
- package/dist/render/lib/api/types.d.ts +1 -0
- package/dist/render/lib/checkout/checkout-memory.d.ts +14 -6
- package/dist/render/lib/checkout/checkout-memory.js +1 -1
- package/dist/render/lib/checkout/wallet-return.d.ts +13 -2
- package/dist/render/lib/checkout/wallet-return.js +1 -1
- package/dist/render/lib/document/blocks/commerce/GalleryB/meta.d.ts +4 -0
- package/dist/render/lib/document/blocks/commerce/GalleryB/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/GalleryB/render.js +1 -1
- package/dist/render/lib/document/blocks/service/Form/render.js +1 -1
- package/dist/render/lib/document/card-templates.d.ts +2 -0
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/render-config.d.ts +1 -0
- package/dist/render/lib/document/render-config.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-gallery.d.ts +1 -0
- package/dist/render/lib/document/section-to-box-rows-gallery.js +1 -0
- package/dist/render/lib/sections/gallery-frame.d.ts +3 -0
- package/dist/render/lib/sections/gallery-frame.js +1 -0
- package/dist/render/lib/wheels/price-display.d.ts +0 -1
- package/dist/render/lib/wheels/price-display.js +1 -1
- package/dist/words.d.ts +12 -0
- package/dist/words.js +4 -4
- package/package.json +5 -4
- package/dist/chunks/EditorPreviewCheckout-KJ7WBAJJ.js +0 -4
- package/dist/chunks/chunk-25XGYFU3.js +0 -80
- package/dist/chunks/chunk-H7576DO5.js +0 -1
- package/dist/chunks/chunk-ISCYSRBG.js +0 -1
- package/dist/chunks/chunk-WWVWTSGF.js +0 -340
- /package/dist/chunks/{chunk-WWVWTSGF.js.LEGAL.txt → chunk-XVPVTQYY.js.LEGAL.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as I}from"react/jsx-runtime";import j from"efficient-web-builder/render/components/Btn";import D,{GALLERY_GRID_ATTR as F,GalleryLinksContext as K}from"../GalleryItem.js";import{SharedPartKinds as U}from"efficient-web-builder/render/components/PublishedPartStylesContext";import{renderHeadline as Z}from"efficient-web-builder/render/components/goldPhrases";import $ from"efficient-web-builder/render/components/SectionHeader";import V from"./KindGate.js";import Y from"./RecordPhotoGallery.js";import{FRAME_120 as q,framedBandPad as J,headIsEmpty as Q,withBandClasses as W}from"../../lib/sections/band-padding.js";import{galleryFrame as X,galleryTemplate as z}from"../../lib/sections/gallery-frame.js";import{SITE_COLUMN as L}from"efficient-web-builder/format/lib/content/page-width";import{PLP_KINDS as ee}from"../../lib/catalog/plp-item.js";import{useCurrentProduct as re}from"../../lib/document/current-product.js";import{SAMPLE_PICTURE_COUNT as M,SAMPLE_RECORD as te,recordPictures as ie,useCurrentRecord as oe,useDrawsOtherRecord as ae}from"../../lib/document/current-record.js";import{mediaGroupVehicle as ne}from"../../lib/content/source-values.js";import{IMAGE_ZONES as C}from"../../lib/sections/product-pictures.js";import{useSampleProduct as se}from"./useSampleProduct.js";import{say as S}from"efficient-web-builder/format/lib/editor-words";import{galleryLayoutRatio as le,resolveGalleryLayout as me}from"efficient-web-builder/format/lib/content/gallery-layout";import{HideTaker as H}from"efficient-web-builder/render/components/ViewHideRoot";const de=ee;function ce(e,o){if(!e)return[];if(o==="all")return C.flatMap(n=>e[n]??[]);const r=C.includes(o)?o:null;return r?e[r]??[]:[]}function fe(e){return ae(!!e.editing)?t(pe,{...e}):t(V,{kinds:de,type:"GalleryB",editing:e.editing,children:t(ue,{...e})})}function pe(e){const{editing:o=!1}=e,r=oe(),n=r?ie(r,{firstField:!0}).map(a=>({images:[a.url],eyebrow:a.alt&&a.alt!==r.title?a.alt:void 0,...a.video?{video:a.video}:{}})):o?Array.from({length:M},()=>({images:[""]})):[];return t(_,{...e,tiles:n,owner:{name:(r??te).title},photosOnly:!0,emptyHint:S("This record’s pictures appear here on its page. A record with no pictures draws nothing.")})}function Ce(e){const{rows:o,limit:r,layout:n,editing:a=!1,title:h}=e,d=me({layout:n}),c=typeof r=="number"&&r>0?Math.floor(r):void 0,f=o.filter(s=>typeof s.cover=="string"&&s.cover).map(s=>({images:[s.cover],...s.video?{video:s.video}:{}})),g=a&&f.length===0?Array.from({length:c??M},()=>({images:[""]})):f;return t(_,{...e,tiles:c?g.slice(0,c):g,owner:{name:(h??"").replace(/==/g,"").trim()},photosOnly:!0,tilesAcross:d?.across===3?3:4,tileRatio:d?le(d):null,emptyHint:S("The website’s pictures appear here, in the order they are put in. A website with no pictures draws nothing.")})}function ue({omitHead:e=!1,num:o,title:r,linkText:n,linkHref:a,galleryHref:h="/gallery",submitHref:d="/contact",zone:c="all",photoDisplay:f="covers",previewHover:g,display:s,displayPhone:y,styleOwner:w,editing:p=!1,pads:P,template:v,nodeId:b}){const N=re(),R=se(p&&!N),u=N?.product??R,x=ce(u?.mediaGroups,c).map(i=>({images:(i.items??[]).filter(m=>m.kind==="image").map(m=>m.url),vehicle:ne(i),finish:i.finish})).filter(i=>i.images.length>0),A=(f==="auto"?x.length>=4?"covers":"all":f)==="all"?x.flatMap(i=>i.images.map(m=>({images:[m],vehicle:i.vehicle,finish:i.finish}))):x;return t(_,{omitHead:e,num:o,title:r,linkText:n,linkHref:a,galleryHref:h,submitHref:d,previewHover:g,display:s,displayPhone:y,styleOwner:w,editing:p,pads:P,template:v,nodeId:b,tiles:u?A.map(i=>({images:i.images,eyebrow:i.vehicle||void 0,meta:i.finish})):[],owner:{name:u?.name??"",href:u?.href,process:u?.eyebrow},emptyHint:S("This product’s photos appear here on a product page. Add media groups in the product’s Media tab.")})}function _({omitHead:e=!1,num:o,title:r,linkText:n,linkHref:a,galleryHref:h="/gallery",submitHref:d="/contact",previewHover:c,display:f,displayPhone:g,styleOwner:s,editing:y=!1,tiles:w,owner:p,emptyHint:P,photosOnly:v=!1,tilesAcross:b,tileRatio:N=null,pads:R,template:u,nodeId:x}){const T=n?{text:n,href:a||"#"}:void 0,A=r?Z(r,!1):void 0,i=e?null:t($,{num:o,title:A,link:T}),m=!y&&Q(o,r,T?.text)?null:i,G=J(R,q,{noTop:e,nonNegative:!0}),E=z(u,!v),k=W(X(e,!!E),G);return w.length===0?y?t(H,{as:"section",...G.attrs,className:k,style:G.style,children:I("div",{className:L,children:[m,t("p",{className:"mt-8 border-t border-line py-6 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim",children:P})]})}):null:t(H,{as:"section",...G.attrs,className:k,style:G.style,children:I("div",{className:L,children:[m,v?t(Y,{pictures:w.map(l=>({url:l.images[0]??"",alt:l.eyebrow,video:l.video})),name:p.name,editing:y,...b?{fit:"tiles",across:b,ratio:N}:{}}):t(K.Provider,{value:{galleryHref:h,submitHref:d,previewHover:c,display:f,displayPhone:g,styleOwner:s,photosOnly:v,ownerId:x,Template:E},children:t(U,{children:t("div",{[F]:"",className:"grid grid-cols-4 gap-2 max-[1500px]:grid-cols-3 max-view-wide:grid-cols-1 max-view-wide:gap-1",children:w.map((l,B)=>t(D,{image:l.images[0],photos:l.images.slice(1).map(O=>({src:O})),href:p.href,process:p.process,eyebrow:l.eyebrow,name:p.name,meta:l.meta,editing:y},`${l.eyebrow}-${B}`))})})}),!v&&t("div",{className:"mt-12 flex flex-col items-center gap-3",children:t(j,{href:h,variant:"ghost",children:"See Gallery"})})]})})}export{Ce as SourcedGalleryGrid,fe as default,de as supportedKinds};
|
|
@@ -4,6 +4,7 @@ export declare const CHECKOUT_MEMORY_KEY = "checkout-memory-context";
|
|
|
4
4
|
export declare const PRICES_REQUOTED = "Prices have changed since this checkout started. The total shows today's prices.";
|
|
5
5
|
export declare const CHECKOUT_MEMORY_LIFE_MS: number;
|
|
6
6
|
export declare function parkLine(line: CartLine): CartLine;
|
|
7
|
+
export declare function sameGoods(a: CartLine[], b: CartLine[]): boolean;
|
|
7
8
|
export interface ParkedRequest {
|
|
8
9
|
customer: OrderRequest["customer"];
|
|
9
10
|
items: OrderRequest["items"];
|
|
@@ -41,22 +42,29 @@ interface ParkedForm {
|
|
|
41
42
|
shippingMethodId: string | null;
|
|
42
43
|
couponCode: string | null;
|
|
43
44
|
}
|
|
45
|
+
export interface ParkedPressState {
|
|
46
|
+
lastPress: ParkedPress | null;
|
|
47
|
+
keptCardKey: string | null;
|
|
48
|
+
placedShape: string | null;
|
|
49
|
+
placedRequest: ParkedRequest | null;
|
|
50
|
+
unpaidOrder: OrderConfirmation | null;
|
|
51
|
+
}
|
|
52
|
+
export declare const NO_PRESS: ParkedPressState;
|
|
44
53
|
export interface CheckoutMemory {
|
|
45
54
|
key: string;
|
|
46
55
|
authed: boolean;
|
|
47
56
|
parkedAt: number;
|
|
48
|
-
|
|
49
|
-
keptCardKey: string | null;
|
|
50
|
-
placedGoods: string | null;
|
|
51
|
-
unpaidOrder: OrderConfirmation | null;
|
|
52
|
-
placedRequest: ParkedRequest | null;
|
|
57
|
+
press: ParkedPressState;
|
|
53
58
|
lines: CartLine[];
|
|
54
59
|
form: ParkedForm | null;
|
|
55
60
|
}
|
|
56
61
|
export declare function parkForm(form: ParkedForm): ParkedForm;
|
|
57
62
|
export declare function parkOrder(order: OrderConfirmation): OrderConfirmation;
|
|
58
|
-
export declare function holdsPress(
|
|
63
|
+
export declare function holdsPress(press: ParkedPressState): boolean;
|
|
59
64
|
export declare function parkCheckoutMemory(memory: CheckoutMemory): void;
|
|
65
|
+
export declare const PARKED_PRESS_READERS: {
|
|
66
|
+
[K in keyof ParkedPressState]-?: (value: unknown) => ParkedPressState[K];
|
|
67
|
+
};
|
|
60
68
|
export declare function readCheckoutMemory(): CheckoutMemory | null;
|
|
61
69
|
export declare function clearCheckoutMemory(): void;
|
|
62
70
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{safeSessionStorage as
|
|
1
|
+
import{safeSessionStorage as i}from"efficient-web-builder/format/lib/safe-storage";import{orderLinesForSets as g}from"../commerce.js";const c="checkout-memory-context",P="Prices have changed since this checkout started. The total shows today's prices.",d=3,k=3600*1e3;function N(e){return{id:e.id,slug:e.slug,name:{lead:e.name?.lead,accent:e.name?.accent},process:e.process,positionNo:e.positionNo,config:(e.config??[]).map(t=>({label:t.label,gold:t.gold})),finishName:e.finishName,size:e.size,qty:e.qty,href:e.href,kind:e.kind,sku:e.sku,components:e.components.map(t=>({partNumber:t.partNumber,wheels:t.wheels,prices:{...t.prices},hand:t.hand}))}}const a=e=>e.map(N);function I(e,t){const n=o=>JSON.stringify(o.map(r=>[r.id,r.qty]).sort(([r],[u])=>r<u?-1:r>u?1:0));return n(e)===n(t)}function l(e){const t=e.customer;return{customer:{email:t.email,name:t.name,phone:t.phone,companyName:t.companyName,address:t.address,city:t.city,state:t.state,zipCode:t.zipCode,country:t.country},items:e.items.flatMap(n=>g([{partNumber:n.partNumber,wheels:n.quantity,prices:{}}],1)),currency:e.currency,idempotencyKey:e.idempotencyKey,shippingMethodId:e.shippingMethodId,couponCode:e.couponCode}}function K(e){return{...l(e),payFirst:!!e.checkoutFlow}}function L(e){return l(e)}const A={lastPress:null,keptCardKey:null,placedShape:null,placedRequest:null,unpaidOrder:null};function b(e){const t=n=>typeof n=="string"?n:"";return{email:t(e.email),firstName:t(e.firstName),lastName:t(e.lastName),company:t(e.company),address1:t(e.address1),address2:t(e.address2),city:t(e.city),postcode:t(e.postcode),phone:t(e.phone),country:t(e.country),subdivision:t(e.subdivision),selectedAddressId:t(e.selectedAddressId),shippingMethodId:typeof e.shippingMethodId=="string"?e.shippingMethodId:null,couponCode:typeof e.couponCode=="string"?e.couponCode:null}}function C(e){return{orderNumber:e.orderNumber,checkoutNumber:e.checkoutNumber,expiresAt:e.expiresAt,status:e.status,total:e.total,currency:e.currency,freightCharge:e.freightCharge,discountAmount:e.discountAmount,grandTotal:e.grandTotal,shippingMethod:e.shippingMethod,couponCode:e.couponCode}}function x(e){return e.lastPress!==null||e.unpaidOrder!==null||e.keptCardKey!==null}function M(e){const t=e.parkedAt+k,n=e.press.unpaidOrder,o=n&&!n.orderNumber?n.expiresAt:null,r=o?Date.parse(o):NaN;return Number.isNaN(r)?t:Math.min(t,r)}function _(e){try{const t={...e,lines:a(e.lines),press:f(e.press)};i.setItem(c,JSON.stringify({v:d,...t}))}catch{}}const s=e=>!!e&&typeof e=="object"&&!Array.isArray(e),y=e=>s(e)&&typeof e.idempotencyKey=="string"&&Array.isArray(e.items)&&e.items.every(t=>s(t)&&typeof t.partNumber=="string"&&typeof t.quantity=="number")&&s(e.customer)&&typeof e.payFirst=="boolean",p=e=>s(e)&&typeof e.id=="string"&&typeof e.qty=="number"&&Array.isArray(e.components);function O(e){return s(e)&&typeof e.key=="string"&&y(e.request)&&Array.isArray(e.lines)&&e.lines.every(p)&&Array.isArray(e.plainLines)&&e.plainLines.every(p)?{key:e.key,request:e.request,lines:a(e.lines),goods:typeof e.goods=="string"?e.goods:"",plainPressed:e.plainPressed===!0,plainLines:a(e.plainLines),plainGoods:typeof e.plainGoods=="string"?e.plainGoods:""}:null}const m=e=>typeof e=="string"?e:null,h={lastPress:O,keptCardKey:m,placedShape:m,placedRequest:e=>y(e)?e:null,unpaidOrder:e=>s(e)?C(e):null};function f(e){const t=s(e)?e:{},n={...A};for(const o of Object.keys(h))n[o]=h[o](t[o]);return n}function q(){let e;try{e=i.getItem(c)}catch{return null}if(!e)return null;try{const t=JSON.parse(e);if(t.v!==d||typeof t.key!="string"||!t.key||!Array.isArray(t.lines)||!t.lines.every(p)||typeof t.parkedAt!="number")return null;const n={key:t.key,authed:t.authed===!0,parkedAt:t.parkedAt,press:f(t.press),lines:a(t.lines),form:t.form&&typeof t.form=="object"?b(t.form):null};return Date.now()>=M(n)?(S(),null):x(n.press)?n:null}catch{return null}}function S(){try{i.removeItem(c)}catch{}}export{c as CHECKOUT_MEMORY_KEY,k as CHECKOUT_MEMORY_LIFE_MS,A as NO_PRESS,h as PARKED_PRESS_READERS,P as PRICES_REQUOTED,S as clearCheckoutMemory,x as holdsPress,_ as parkCheckoutMemory,b as parkForm,N as parkLine,C as parkOrder,K as parkRequest,q as readCheckoutMemory,I as sameGoods,L as sendableRequest};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AfterpayCaptureRequest, OrderConfirmation, PaymentOutcome, ZipCaptureRequest } from "../api/index.js";
|
|
1
|
+
import type { AfterpayCaptureRequest, GocardlessComplete, KlarnaCaptureRequest, OrderConfirmation, PaymentOutcome, ZipCaptureRequest } from "../api/index.js";
|
|
2
2
|
import type { StorageLike } from "efficient-web-builder/format/lib/safe-storage";
|
|
3
3
|
export declare const AFTERPAY_CONTEXT_KEY = "checkout-afterpay-context";
|
|
4
4
|
export declare const GOCARDLESS_CONTEXT_KEY = "checkout-gocardless-context";
|
|
@@ -32,10 +32,20 @@ export interface RedirectWallet<Request> {
|
|
|
32
32
|
legValues: readonly string[];
|
|
33
33
|
storageKey: string;
|
|
34
34
|
evidenceFrom(params: URLSearchParams, leg: string): string | null;
|
|
35
|
-
requestFrom(evidence: string): Request;
|
|
35
|
+
requestFrom(evidence: string, parked: WalletContext | null): Request;
|
|
36
|
+
keyedByParked?: true;
|
|
37
|
+
words?: Partial<WalletWords>;
|
|
38
|
+
}
|
|
39
|
+
interface WalletWords {
|
|
40
|
+
settled: string;
|
|
41
|
+
declined: string;
|
|
42
|
+
collecting: string;
|
|
43
|
+
unconfirmed: string;
|
|
36
44
|
}
|
|
37
45
|
export declare const AFTERPAY_RETURN: RedirectWallet<AfterpayCaptureRequest>;
|
|
38
46
|
export declare const ZIP_RETURN: RedirectWallet<ZipCaptureRequest>;
|
|
47
|
+
export declare const GOCARDLESS_RETURN: RedirectWallet<GocardlessComplete>;
|
|
48
|
+
export declare const KLARNA_RETURN: RedirectWallet<KlarnaCaptureRequest>;
|
|
39
49
|
export interface WalletReturnPage {
|
|
40
50
|
setConfirming(on: boolean): void;
|
|
41
51
|
land(order: LandingOrder): void;
|
|
@@ -53,3 +63,4 @@ export interface WalletReturnDeps<Request> {
|
|
|
53
63
|
page: WalletReturnPage;
|
|
54
64
|
}
|
|
55
65
|
export declare function runWalletReturn<Request>(wallet: RedirectWallet<Request>, deps: WalletReturnDeps<Request>): Promise<void>;
|
|
66
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const u="checkout-afterpay-context",s="checkout-gocardless-context",m="checkout-zip-context",d="checkout-klarna-context";function p(e){return e?.lostChange===!0}function g({evidence:e,parked:t}){return e?{action:"capture",evidence:e,parked:t}:t?{action:"settle",parked:t}:{action:"ignore"}}function f(e,t){const r=e.getItem(t);if(e.removeItem(t),!r)return null;try{return JSON.parse(r)}catch{return null}}function y(e){const t=e.words?.declined??`${e.name} declined the payment — our team will follow up on payment.`;return{settled:e.words?.settled??`The ${e.name} payment was not completed — our team will follow up on payment.`,declined:t,collecting:e.words?.collecting??t,unconfirmed:e.words?.unconfirmed??`We could not confirm the ${e.name} payment — our team will follow up on payment.`}}const k={name:"Afterpay",legParam:"afterpay",legValues:["confirm","cancel"],storageKey:u,evidenceFrom(e,t){return t==="cancel"||(e.get("status")??"").toUpperCase()==="CANCELLED"?null:e.get("orderToken")},requestFrom:e=>({token:e})},h={name:"Zip",legParam:"zip",legValues:["return"],storageKey:m,evidenceFrom(e){const t=(e.get("result")??"").toLowerCase();return t==="cancelled"||t==="declined"?null:e.get("checkoutId")},requestFrom:e=>({checkoutId:e})},w={name:"GoCardless",legParam:"gocardless",legValues:["confirm","cancel"],storageKey:s,evidenceFrom:(e,t)=>t==="confirm"?t:null,requestFrom:(e,t)=>({idempotencyKey:t?.idempotencyKey??""}),keyedByParked:!0,words:{settled:"The direct debit was not set up — our team will follow up on payment.",declined:"The direct debit was declined — our team will follow up on payment.",collecting:"Your direct debit is set up — the payment is collecting and will clear in a few days.",unconfirmed:"We could not confirm the direct debit — our team will follow up on payment."}},E={name:"Klarna",legParam:"klarna",legValues:["confirm","cancel"],storageKey:d,evidenceFrom:(e,t)=>t==="confirm"?e.get("authorization_token"):null,requestFrom:(e,t)=>({idempotencyKey:t?.idempotencyKey??"",authorizationToken:e}),keyedByParked:!0,words:{collecting:"Your Klarna payment is being reviewed — we'll confirm the outcome shortly."}};async function T(e,t){const r=new URLSearchParams(t.search),a=r.get(e.legParam);if(!a||!e.legValues.includes(a))return;const i=f(t.storage,e.storageKey),l=e.evidenceFrom(r,a);t.scrubQuery();const n=g({evidence:l,parked:i});if(n.action==="ignore"||e.keyedByParked&&!n.parked)return;const o=y(e);if(t.page.clearCart(),p(n.parked)&&t.page.lostChange(),n.action==="settle"){t.page.note(o.settled),t.page.land(n.parked.confirmation);return}t.page.setConfirming(!0);try{const c=await t.capture(e.requestFrom(n.evidence,n.parked));c.status==="paid"?t.page.markPaid():t.page.note(c.status==="collecting"?o.collecting:o.declined),t.page.land(n.parked?.confirmation??c)}catch{n.parked?(t.page.note(o.unconfirmed),t.page.land(n.parked.confirmation)):t.page.fail(`We could not confirm your ${e.name} payment. Please contact us before trying again — your payment may already have been taken.`)}finally{t.page.setConfirming(!1)}}export{u as AFTERPAY_CONTEXT_KEY,k as AFTERPAY_RETURN,s as GOCARDLESS_CONTEXT_KEY,w as GOCARDLESS_RETURN,d as KLARNA_CONTEXT_KEY,E as KLARNA_RETURN,m as ZIP_CONTEXT_KEY,h as ZIP_RETURN,p as parkedLostChange,f as readParked,g as resolveWalletReturn,T as runWalletReturn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FRAME_120 as l}from"../../../../sections/band-padding.js";import{PH as e}from"efficient-web-builder/format/lib/document/blocks/placeholders";const
|
|
1
|
+
import{FRAME_120 as l}from"../../../../sections/band-padding.js";import{PH as e}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{cardTemplateSlot as t}from"efficient-web-builder/format/lib/content/card-template";const n={num:e.sectionNumber,title:e.headingAccent,link:e.viewAll},a={items:{type:"slot",allow:["GalleryItem"]},template:t()},m={label:"Gallery",innerPadding:l,fields:a,defaultProps:{dynamic:!1,mediaZone:"all",photoDisplay:"covers",num:"",title:"",linkText:"",linkHref:"/contact",galleryHref:"/gallery",previewHover:!1,displayPhone:{tag:!1}}};export{n as GALLERY_B_PH,m as GalleryBMeta,a as GalleryBSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as g,jsx as
|
|
1
|
+
import{Fragment as g,jsx as d}from"react/jsx-runtime";import{phoneKey as H}from"efficient-easel/draw";import k,{SourcedGalleryGrid as P}from"../../../../../components/pdp-dynamic/DynamicGalleryGrid.js";import{declaredBlockSource as h,sourcedRows as x}from"efficient-web-builder/format/lib/content/block-sources";import y from"../../../../../components/GalleryGrid.js";import{PRODUCT_PICTURES_SOURCE as w,productPictureTiles as T,productPicturesLayout as v}from"../../../../sections/product-pictures.js";import{hidableText as a}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as G}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as t}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{bandPadProps as u}from"../../../../sections/band-padding.js";import{GalleryBMeta as B,GALLERY_B_PH as l}from"./meta.js";const U={...B,render:e=>{const m=G(e.headPlacement)==="own-box",i=n=>m?void 0:n,o={num:i(t(e.num,l.num,e.editor)),title:i(t(e.title,l.title,e.editor)),omitHead:m,linkText:i(t(e.linkText,l.link,e.editor)),linkHref:i(a(e.linkHref)||"/contact"),galleryHref:a(e.galleryHref)||"/gallery",previewHover:e.previewHover,display:e.display,displayPhone:e.displayPhone,styleOwner:e.id,layout:e.layout,layoutPhone:e.layoutPhone,columns:e.columns,columnsMobile:e.columnsMobile,gap:e.gap,gapPhone:e[H("gap")],pads:u(e),editing:e.editor?.isEditing,template:e.template,nodeId:typeof e.id=="string"?e.id:void 0},c=h(e);if(c===w){const n=!!e.editor?.isEditing,r=T(e,n,e.limit);return!n&&r.length===0?d(g,{}):d(y,{...o,layout:v(e),sourced:r})}if(c!==""){const n=!!e.editor?.isEditing,{rows:r,sample:f}=x(e,n);return d(P,{num:i(t(e.num,l.num,e.editor)),title:i(t(e.title,l.title,e.editor)),linkText:i(t(e.linkText,l.link,e.editor)),linkHref:i(a(e.linkHref)||"/contact"),omitHead:m,rows:f?[]:r,limit:e.limit,layout:e.layout,editing:n,pads:u(e)})}return e.dynamic?d(k,{num:i(t(e.num,l.num,e.editor)),title:i(t(e.title,l.title,e.editor)),linkText:i(t(e.linkText,l.link,e.editor)),linkHref:i(a(e.linkHref)||"/contact"),omitHead:m,galleryHref:a(e.galleryHref)||"/gallery",zone:e.mediaZone||"all",photoDisplay:e.photoDisplay||"covers",previewHover:e.previewHover,display:e.display,displayPhone:e.displayPhone,styleOwner:e.id,editing:e.editor?.isEditing,pads:u(e),template:o.template,nodeId:o.nodeId}):d(y,{...o,items:e.items})}};export{U as GalleryBRender};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import t from"../../../../../components/FormBlock.js";import{hidableText as n}from"efficient-easel/screen/lib/document/hidable";import{BUTTON_STYLE_KEYS as i}from"efficient-easel/screen/lib/content/style-keys";import{BUTTON_CORNERS_UNIT_KEY as o}from"efficient-easel/screen/lib/content/length-units";import{FormMeta as m}from"./meta.js";const g={...m,render:e=>r(t,{formSlug:n(e.formSlug)||void 0,heading:n(e.heading)||void 0,intro:n(e.intro)||void 0,submitText:n(e.submitText)||void 0,finePrint:n(e.finePrint)||void 0,form:e.form,editing:e.editor?.isEditing,buttonCorners:e[i.corners],buttonCornerSides:e[i.cornerSides],buttonCornersUnit:e[o]})};export{g as FormRender};
|
|
@@ -4,6 +4,8 @@ export declare const eventsCardSeeds: () => BlockSeed[];
|
|
|
4
4
|
export declare function withEventsTemplate(props: Record<string, unknown>): Record<string, unknown>;
|
|
5
5
|
export declare const collectionCardSeed: () => BlockSeed;
|
|
6
6
|
export declare function withCollectionsTemplate(props: Record<string, unknown>): Record<string, unknown>;
|
|
7
|
+
export declare const galleryTileSeed: () => BlockSeed;
|
|
8
|
+
export declare function withGalleryTemplate(props: Record<string, unknown>): Record<string, unknown>;
|
|
7
9
|
export declare const drawsKits: (props: Record<string, unknown>) => boolean;
|
|
8
10
|
export declare const productGridCardSeed: (props?: Record<string, unknown>) => BlockSeed;
|
|
9
11
|
export declare const STOREFRONT_CARD_TEMPLATES: readonly CardTemplateSpec[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CARD_LIST_TYPE as h,CARD_ROW_FIELD_PROP as P,CARD_ROW_LINK_PROP as c,CARD_TEMPLATE_SLOT as s,registerCardTemplates as le}from"efficient-web-builder/format/lib/content/card-template";import{DIM as d,INNER_BOX as o,TEXT as n,boxPadding as r,fillSlot as N,labelLook as A,labelStyle as D,seedNodes as w,token as E}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 oe}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as ae,EVENTS_FEATURED_DARKEN_STYLE as F,EVENTS_FEATURED_PLACEMENT as ie}from"../content/events-featured-look.js";import{COLLECTION_DARKEN as ne,COLLECTION_HOVER_DARKEN as re,COLLECTION_HOVER_ZOOM as H}from"../content/collection-card-look.js";import{COLLECTION_CARD_REGIONS as O,COLLECTION_CARD_TEXT_SIZE as se}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 de}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as Ee,withHeroPriceTemplate as Te}from"../content/hero-price-seed.js";import{HERO_BUY_SLOT as _e,HERO_BUY_SLOT_LABEL as pe,withHeroBuyTemplate as ce}from"../content/hero-buy-seed.js";import{HERO_OPTION_FIELDS as M,HERO_OPTION_SLOT as Oe,HERO_OPTION_SLOT_LABEL as me,withHeroOptionTemplate as Le}from"../content/hero-option-seed.js";import{FILTER_OPTIONS_FIELD as be,withFilterChipsTemplate as Ce,withFilterTemplate as he}from"../content/filter-card-seed.js";import{FACET_ROW_FIELDS as m,FACET_TEMPLATE_LABEL as U,FACET_TEMPLATE_SLOT as x,withFacetTemplate as v}from"../content/facet-row-seed.js";import{RAIL_HEAD_TEMPLATE_LABEL as Pe,RAIL_HEAD_TEMPLATE_SLOT as ge,RAIL_ROW_FIELDS as y,RAIL_TEMPLATE_LABEL as ye,RAIL_TEMPLATE_SLOT as Re,withRailTemplates as V}from"../content/rail-row-seed.js";import{MENU_LINK_BLOCK as Se,withMenuTemplate as ke}from"../content/menu-card-seed.js";import{CONTACT_CHANNEL_FIELDS as Y,CONTACT_CHANNEL_SLOT as fe,CONTACT_REASON_FIELDS as ue,CONTACT_REASON_SLOT as Ie,CONTACT_TOPIC_FIELDS as G,CONTACT_TOPIC_SLOT as Ne,withContactTemplates as Ae}from"../content/contact-card-seed.js";import{ARTICLE_BODY_BLOCK as De,withArticleBodyTemplate as we}from"efficient-web-builder/format/lib/document/article-body-seed";import{APPOINTMENT_BOOKING_TYPE as Be,BOOKING_BOX_TYPE as Fe,BOOKING_OPTION_FIELDS as He,BOOKING_TEMPLATE_SLOTS as Ke,withBookingTemplates as Me}from"../content/booking-card-seed.js";import{PRODUCT_BUY_BLOCK as Ue,PRODUCT_CARD_FIELDS as R,PRODUCT_COLOUR_BLOCK as xe,PRODUCT_EYEBROW_BLOCK as ve,PRODUCT_NAME_BLOCK as Ve,PRODUCT_PICTURE_BLOCK as Ye,PRODUCT_PRICE_BLOCK as Ge,PRODUCT_SIZE_BLOCK as We,PRODUCT_SPECS_BLOCK as $e,productCardSeed as Xe,withKitCardTemplate as S,withListingCardTemplate as Ze,withProductCardTemplate as k}from"../content/product-card-seed.js";import{ALLOY_WHEELS_LISTING_TYPE as je,FILTER_BLOCK_TYPE as ze,FILTER_CHIPS_TYPE as qe,MENU_BLOCK_TYPE as Qe,PRODUCT_GRID_TYPE as Je,PRODUCT_HERO_TYPE as et}from"./document-nodes.js";import{withSeededSlot as W}from"../content/seed-ids.js";const $="tags",T=A(12),X={textStyle:"heading-3",...E("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},Z={textStyle:"body-1",...E("body",14),lineHeight:1.55},tt={...X,...E("headingSmall",30)},lt={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},ot=oe.fallback,at=480,it=70,nt=()=>({type:a,props:{...o,name:"Featured",[B]:"cover",darken:ae,darkenStyle:F,darkenPhone:it,darkenStylePhone:F,placement:ie,direction:"column",gap:8,gapPhone:8,...r(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:ot,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:at,sectionHeightUnitPhone:"px",[c]:"href"},slots:{[i]:[l("meta",{...n,tag:"p"},T,!0),l("title",{...n,tag:"h3",widthFit:"fill"},tt),l("excerpt",{...d,tag:"p",widthFit:"fill",maxWidth:384},Z),l("dateLabel",{...d,tag:"p"},{...T,color:"muted"})]}}),rt=()=>({type:a,props:{...o,name:"Post",gap:0,gapPhone:0,...r(0,0,0,0),...N("surface"),shadow:!0},slots:{[i]:[{type:"ImageBlock",props:{[P]:"cover",aspect:"16/10",contained:!1}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...lt},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"},T,!0),l("dateLabel",{...d,tag:"p"},{...T,color:"muted"},!0)]}},l("title",{...n,tag:"h3",widthFit:"fill"},X),l("excerpt",{...d,tag:"p",widthFit:"fill"},Z),{type:h,props:{[P]:$},slots:{template:[{type:a,props:{...o,name:"Chip",...r(4,8,4,8),sectionBorder:{width:1}},slots:{[i]:[l("label",{...d,tag:"p"},T)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[c]:"href",...K,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(12)}}}]}}]}}),st=()=>[nt(),rt()];function dt(e){const t=["featured","post"];return W(e,s,"Events",b=>w(st(),(C,te)=>{const[f,...u]=te.split("."),I=t[Number(f)]??`card${f}`;return u.length?`${b}~${I}.${u.join(".")}`:`${b}~${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:$,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:h,label:"Card list"}],seedOnInsert:dt},_=e=>Number(/(\d+)px/.exec(e)?.[1]),p={tag:_(O.tag.builtIn),name:_(O.name.builtIn),namePhone:_(se.namePhone),body:_(O.body.builtIn),link:_(O.link.builtIn)},Tt={...A(p.tag),letterSpacing:.25},_t={textStyle:"heading-2",...E("headingMedium",p.name,p.namePhone),weight:500,lineHeight:1,letterSpacing:-.03},pt={textStyle:"body-1",...E("body",p.body),lineHeight:1.5,paragraphSpacing:12},j=()=>[l("tag",{...n,tag:"p"},Tt,!0),l("name",{...n,tag:"h3",widthFit:"fill"},_t),l("desc",{...n,tag:"p",widthFit:"fill",maxWidth:420},pt),{type:"ButtonBlock",props:{variant:"ghost",label:"Explore",href:"",[c]:"href",...K,icon:"arrow-right",iconPosition:"after",_partStyles:{label:D(p.link)}}}],z={_hidden:!0,_hiddenTablet:!0,_hiddenPhone:!1},ct=()=>({type:a,props:{...o,name:"Collection",gap:0,gapPhone:0,...r(0,0,0,0),[c]:"href"},slots:{[i]:[{type:a,props:{...o,name:"Picture",[B]:"image",boxShape:"portrait",darken:ne,placement:"bottom-left",direction:"column",gap:12,gapPhone:12,...r(32,32),hoverZoom:H,hoverDarken:re,_hiddenPhone:!0},slots:{[i]:j()}},{type:"ImageBlock",props:{[P]:"image",aspect:"4/5",contained:!1,hoverZoom:H,...z}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...r(24,24),...N("surface"),...z},slots:{[i]:j()}}]}});function Ot(e){return W(e,s,"Collections",t=>w([ct()],(b,C)=>`${t}~card${C?`.${C}`:""}`))}const mt={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:Ot},Lt=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],bt=e=>Object.fromEntries(Object.entries(e).filter(([t])=>!Lt.includes(t))),q={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:Se,label:"Menu link"}],seed:ke},Q=e=>e.dynamic===!0&&e.relationship==="bundles",Wt=(e={})=>Xe(e),L={fields:R,blocks:[{type:Ye,label:"Picture"},{type:ve,label:"Eyebrow"},{type:Ve,label:"Name"},{type:$e,label:"Specs"},{type:Ge,label:"Price"},{type:xe,label:"Colour"},{type:We,label:"Size"},{type:Ue,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return k(e);const t=g(e);return Q(e)?S(t):k(t)}},J=[{key:"label",label:"Filter name"},{key:be,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],ee=[{slot:Re,label:ye,fields:y},{slot:ge,label:Pe,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",...q},{block:Qe,...q},{block:Je,...L},{block:je,...L,slots:[{slot:s,fields:R},{slot:x,label:U,fields:m},...ee],fields:[...R,...m,...y],seed:e=>V(v(Ze(e)))},{block:"RelatedProducts",...L,seed:e=>{const t=g({...bt(e),dynamic:!0});return Q(t)?S(t):k(t,{legacyWellHonoured:!0})}},{block:"BundleOffer",...L,seed:e=>S(g({...e,columns:de(e),dynamic:!0}))},{block:et,slots:[{slot:s,fields:[]},{slot:Oe,label:me,fields:M},{slot:_e,label:pe,fields:[]}],fields:M,blocks:[{type:Ee,label:"Price"}],seed:e=>ce(Le(Te(e)))},{block:ze,slots:[{slot:s,fields:J},{slot:x,label:U,fields:m},...ee],fields:[...J,...m,...y],blocks:[{type:h,label:"Card list"}],seed:e=>V(v(he(e)))},{block:qe,fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:Ce},{block:"ContactRouting",slots:[{slot:Ne,label:"Topic card",fields:G},{slot:Ie,label:"Reason chip",fields:ue},{slot:fe,label:"Channel row",fields:Y}],fields:[...G,...Y],seed:Ae},{block:De,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:we},...[Fe,Be].map(e=>({block:e,slots:Ke,fields:He,seed:t=>Me(e,t)})),{block:"Events",...Et},{block:"Collections",...mt}];le(Ct);export{Ct as STOREFRONT_CARD_TEMPLATES,ct as collectionCardSeed,Q as drawsKits,st as eventsCardSeeds,Wt as productGridCardSeed,Ot as withCollectionsTemplate,dt as withEventsTemplate};
|
|
1
|
+
import{CARD_LIST_TYPE as R,CARD_ROW_FIELD_PROP as y,CARD_ROW_LINK_PROP as L,CARD_TEMPLATE_SLOT as d,registerCardTemplates as de}from"efficient-web-builder/format/lib/content/card-template";import{DIM as p,INNER_BOX as o,LABEL_FACE as C,TEXT as n,boxPadding as r,fillSlot as F,labelLook as _,labelStyle as K,seedNodes as k,token as E}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_SHOW_KEY as M,BOX_SHOW_ON_CARD_HOVER as x,HOVER_KEY as Ee,PICTURE_HOVER_KEYS as Y}from"efficient-web-builder/format/lib/animation/hover";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 f}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as pe}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as _e,EVENTS_FEATURED_DARKEN_STYLE as G,EVENTS_FEATURED_PLACEMENT as ce}from"../content/events-featured-look.js";import{COLLECTION_DARKEN as Te,COLLECTION_HOVER_DARKEN as Oe,COLLECTION_HOVER_ZOOM as U}from"../content/collection-card-look.js";import{COLLECTION_CARD_REGIONS as b,COLLECTION_CARD_TEXT_SIZE as me}from"efficient-web-builder/format/lib/sections/collection-card-text-regions";import{SH_LINK as V}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as t}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{withRelatedTabletColumns as S}from"../sections/product-grid-columns.js";import{bundleColumns as Le}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as be,withHeroPriceTemplate as he}from"../content/hero-price-seed.js";import{HERO_BUY_SLOT as ge,HERO_BUY_SLOT_LABEL as Pe,withHeroBuyTemplate as Re}from"../content/hero-buy-seed.js";import{HERO_OPTION_FIELDS as W,HERO_OPTION_SLOT as ye,HERO_OPTION_SLOT_LABEL as Ce,withHeroOptionTemplate as ke}from"../content/hero-option-seed.js";import{FILTER_OPTIONS_FIELD as fe,withFilterChipsTemplate as Se,withFilterTemplate as Ae}from"../content/filter-card-seed.js";import{FACET_ROW_FIELDS as h,FACET_TEMPLATE_LABEL as v,FACET_TEMPLATE_SLOT as $,withFacetTemplate as X}from"../content/facet-row-seed.js";import{RAIL_HEAD_TEMPLATE_LABEL as ue,RAIL_HEAD_TEMPLATE_SLOT as Ie,RAIL_ROW_FIELDS as A,RAIL_TEMPLATE_LABEL as Ne,RAIL_TEMPLATE_SLOT as we,withRailTemplates as Z}from"../content/rail-row-seed.js";import{MENU_LINK_BLOCK as De,withMenuTemplate as Be}from"../content/menu-card-seed.js";import{CONTACT_CHANNEL_FIELDS as j,CONTACT_CHANNEL_SLOT as He,CONTACT_REASON_FIELDS as Fe,CONTACT_REASON_SLOT as Ke,CONTACT_TOPIC_FIELDS as z,CONTACT_TOPIC_SLOT as Me,withContactTemplates as xe}from"../content/contact-card-seed.js";import{ARTICLE_BODY_BLOCK as Ye,withArticleBodyTemplate as Ge}from"efficient-web-builder/format/lib/document/article-body-seed";import{APPOINTMENT_BOOKING_TYPE as Ue,BOOKING_BOX_TYPE as Ve,BOOKING_OPTION_FIELDS as We,BOOKING_TEMPLATE_SLOTS as ve,withBookingTemplates as $e}from"../content/booking-card-seed.js";import{PRODUCT_BUY_BLOCK as Xe,PRODUCT_CARD_FIELDS as u,PRODUCT_COLOUR_BLOCK as Ze,PRODUCT_EYEBROW_BLOCK as je,PRODUCT_NAME_BLOCK as ze,PRODUCT_PICTURE_BLOCK as qe,PRODUCT_PRICE_BLOCK as Qe,PRODUCT_SIZE_BLOCK as Je,PRODUCT_SPECS_BLOCK as et,productCardSeed as tt,withKitCardTemplate as I,withListingCardTemplate as lt,withProductCardTemplate as N}from"../content/product-card-seed.js";import{ALLOY_WHEELS_LISTING_TYPE as ot,FILTER_BLOCK_TYPE as at,FILTER_CHIPS_TYPE as it,MENU_BLOCK_TYPE as nt,PRODUCT_GRID_TYPE as rt,PRODUCT_HERO_TYPE as st}from"./document-nodes.js";import{withSeededSlot as w}from"../content/seed-ids.js";const q="tags",c=_(12),Q={textStyle:"heading-3",...E("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},J={textStyle:"body-1",...E("body",14),lineHeight:1.55},dt={...Q,...E("headingSmall",30)},Et={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},pt=pe.fallback,_t=480,ct=70,Tt=()=>({type:a,props:{...o,name:"Featured",[f]:"cover",darken:_e,darkenStyle:G,darkenPhone:ct,darkenStylePhone:G,placement:ce,direction:"column",gap:8,gapPhone:8,...r(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:pt,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:_t,sectionHeightUnitPhone:"px",[L]:"href"},slots:{[i]:[t("meta",{...n,tag:"p"},c,!0),t("title",{...n,tag:"h3",widthFit:"fill"},dt),t("excerpt",{...p,tag:"p",widthFit:"fill",maxWidth:384},J),t("dateLabel",{...p,tag:"p"},{...c,color:"muted"})]}}),Ot=()=>({type:a,props:{...o,name:"Post",gap:0,gapPhone:0,...r(0,0,0,0),...F("surface"),shadow:!0},slots:{[i]:[{type:"ImageBlock",props:{[y]:"cover",aspect:"16/10",contained:!1}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...Et},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]:[t("meta",{...n,tag:"p"},c,!0),t("dateLabel",{...p,tag:"p"},{...c,color:"muted"},!0)]}},t("title",{...n,tag:"h3",widthFit:"fill"},Q),t("excerpt",{...p,tag:"p",widthFit:"fill"},J),{type:R,props:{[y]:q},slots:{template:[{type:a,props:{...o,name:"Chip",...r(4,8,4,8),sectionBorder:{width:1}},slots:{[i]:[t("label",{...p,tag:"p"},c)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[L]:"href",...V,icon:"arrow-right",iconPosition:"after",_partStyles:{label:K(12)}}}]}}]}}),mt=()=>[Tt(),Ot()];function Lt(e){const l=["featured","post"];return w(e,d,"Events",m=>k(mt(),(s,se)=>{const[D,...B]=se.split("."),H=l[Number(D)]??`card${D}`;return B.length?`${m}~${H}.${B.join(".")}`:`${m}~${H}`}))}const bt={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:q,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:R,label:"Card list"}],seedOnInsert:Lt},T=e=>Number(/(\d+)px/.exec(e)?.[1]),O={tag:T(b.tag.builtIn),name:T(b.name.builtIn),namePhone:T(me.namePhone),body:T(b.body.builtIn),link:T(b.link.builtIn)},ht={..._(O.tag),letterSpacing:.25},gt={textStyle:"heading-2",...E("headingMedium",O.name,O.namePhone),weight:500,lineHeight:1,letterSpacing:-.03},Pt={textStyle:"body-1",...E("body",O.body),lineHeight:1.5,paragraphSpacing:12},ee=()=>[t("tag",{...n,tag:"p"},ht,!0),t("name",{...n,tag:"h3",widthFit:"fill"},gt),t("desc",{...n,tag:"p",widthFit:"fill",maxWidth:420},Pt),{type:"ButtonBlock",props:{variant:"ghost",label:"Explore",href:"",[L]:"href",...V,icon:"arrow-right",iconPosition:"after",_partStyles:{label:K(O.link)}}}],te={_hidden:!0,_hiddenTablet:!0,_hiddenPhone:!1},Rt=()=>({type:a,props:{...o,name:"Collection",gap:0,gapPhone:0,...r(0,0,0,0),[L]:"href"},slots:{[i]:[{type:a,props:{...o,name:"Picture",[f]:"image",boxShape:"portrait",darken:Te,placement:"bottom-left",direction:"column",gap:12,gapPhone:12,...r(32,32),hoverZoom:U,hoverDarken:Oe,_hiddenPhone:!0},slots:{[i]:ee()}},{type:"ImageBlock",props:{[y]:"image",aspect:"4/5",contained:!1,hoverZoom:U,...te}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...r(24,24),...F("surface"),...te},slots:{[i]:ee()}}]}});function yt(e){return w(e,d,"Collections",l=>k([Rt()],(m,s)=>`${l}~card${s?`.${s}`:""}`))}const Ct={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:yt},kt=35,ft=50,St=106,At=85,ut="nextImage",It="#f5f1e8",le="#c4c1ba",oe={...C,..._(11),letterSpacing:.24,color:"main"},Nt={...oe,color:le},wt={...C,..._(12,11),color:"main"},Dt={textStyle:"heading-3",...E("headingSmall",22,16),weight:500,lineHeight:1.05,letterSpacing:-.02,color:It},Bt={...C,..._(12),letterSpacing:.12,color:le},g=r(0,0,0,0),Ht=()=>({type:a,props:{...o,name:"Tile",placement:"top-left",share:"content",gap:0,gapPhone:0,...g,[f]:"image",boxShape:"square",darken:kt,[Ee]:ut,[Y.zoom]:St,[Y.darken]:ft},slots:{[i]:[{type:a,props:{...o,name:"Top row",direction:"row",justify:"between",align:"start",share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",widthFit:"fill",gap:8,gapPhone:8,...g,sectionPaddingTop:12,sectionPaddingLeft:12,sectionPaddingRight:12,sectionPaddingTopPhone:10,sectionPaddingLeftPhone:10,sectionPaddingRightPhone:10},slots:{[i]:[{type:a,props:{...o,name:"Tag",direction:"row",share:"content",minWidth:0,...g,[M]:x},slots:{[i]:[t("tag",{...n,tag:"p",textFit:"ellipsis"},oe)]}},t("number",{...n,tag:"p",textFit:"line"},Nt)]}},{type:a,props:{...o,name:"Words",justify:"end",align:"start",placement:"bottom-left",share:"content",widthFit:"fill",sectionHeightMode:"fill",gap:8,gapPhone:8,...r(24,24,12,14),sectionPaddingTopPhone:4,darken:At,darkenStyle:"bottom",[M]:x},slots:{[i]:[{type:a,props:{...o,name:"Heading",widthFit:"fill",gap:4,gapPhone:4,...g},slots:{[i]:[t("eyebrow",{...n,tag:"p",_hiddenPhone:!0},wt),t("name",{...n,tag:"h3"},Dt)]}},t("meta",{...n,tag:"p"},Bt)]}}]}});function Ft(e){return w(e,d,"GalleryB",l=>k([Ht()],(m,s)=>`${l}~tile${s?`.${s}`:""}`))}const Kt={fields:[{key:"image",label:"Image",kind:"image",alt:"name"},{key:"tag",label:"Tag"},{key:"number",label:"Card number"},{key:"eyebrow",label:"Eyebrow"},{key:"name",label:"Title"},{key:"meta",label:"Meta"},{key:"href",label:"Product link",kind:"link"}],seedOnInsert:Ft},Mt=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],xt=e=>Object.fromEntries(Object.entries(e).filter(([l])=>!Mt.includes(l))),ae={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:De,label:"Menu link"}],seed:Be},ie=e=>e.dynamic===!0&&e.relationship==="bundles",cl=(e={})=>tt(e),P={fields:u,blocks:[{type:qe,label:"Picture"},{type:je,label:"Eyebrow"},{type:ze,label:"Name"},{type:et,label:"Specs"},{type:Qe,label:"Price"},{type:Ze,label:"Colour"},{type:Je,label:"Size"},{type:Xe,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return N(e);const l=S(e);return ie(e)?I(l):N(l)}},ne=[{key:"label",label:"Filter name"},{key:fe,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],re=[{slot:we,label:Ne,fields:A},{slot:Ie,label:ue,fields:[]}],Yt=[{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",...ae},{block:nt,...ae},{block:rt,...P},{block:ot,...P,slots:[{slot:d,fields:u},{slot:$,label:v,fields:h},...re],fields:[...u,...h,...A],seed:e=>Z(X(lt(e)))},{block:"RelatedProducts",...P,seed:e=>{const l=S({...xt(e),dynamic:!0});return ie(l)?I(l):N(l,{legacyWellHonoured:!0})}},{block:"BundleOffer",...P,seed:e=>I(S({...e,columns:Le(e),dynamic:!0}))},{block:st,slots:[{slot:d,fields:[]},{slot:ye,label:Ce,fields:W},{slot:ge,label:Pe,fields:[]}],fields:W,blocks:[{type:be,label:"Price"}],seed:e=>Re(ke(he(e)))},{block:at,slots:[{slot:d,fields:ne},{slot:$,label:v,fields:h},...re],fields:[...ne,...h,...A],blocks:[{type:R,label:"Card list"}],seed:e=>Z(X(Ae(e)))},{block:it,fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:Se},{block:"ContactRouting",slots:[{slot:Me,label:"Topic card",fields:z},{slot:Ke,label:"Reason chip",fields:Fe},{slot:He,label:"Channel row",fields:j}],fields:[...z,...j],seed:xe},{block:Ye,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:Ge},...[Ve,Ue].map(e=>({block:e,slots:ve,fields:We,seed:l=>$e(e,l)})),{block:"Events",...bt},{block:"Collections",...Ct},{block:"GalleryB",...Kt}];de(Yt);export{Yt as STOREFRONT_CARD_TEMPLATES,Rt as collectionCardSeed,ie as drawsKits,mt as eventsCardSeeds,Ht as galleryTileSeed,cl as productGridCardSeed,yt as withCollectionsTemplate,Lt as withEventsTemplate,Ft as withGalleryTemplate};
|
|
@@ -6,6 +6,7 @@ import "./section-to-box-rows-spec.js";
|
|
|
6
6
|
import "./section-to-box-rows-productgrid.js";
|
|
7
7
|
import "./section-to-box-rows-events.js";
|
|
8
8
|
import "./section-to-box-rows-collections.js";
|
|
9
|
+
import "./section-to-box-rows-gallery.js";
|
|
9
10
|
import "./section-to-box-rows-detail.js";
|
|
10
11
|
import "./section-to-box-rows-service.js";
|
|
11
12
|
import "./section-to-box-rows-listing.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as h,jsx as E}from"react/jsx-runtime";import{generalRenderMetas as g}from"efficient-web-builder/format/lib/document/blocks/general/metas";import{finishRenderRegistry as S}from"efficient-web-builder/render/lib/document/render-registry";import{buildBlockCategories as R}from"efficient-web-builder/format/lib/document/section-catalog";import{SITE_HEADER_TYPE as a}from"efficient-web-builder/format/lib/document/section-groups";import"./slot-seeds.js";import"./card-templates.js";import"./section-to-box-rows-reviews.js";import"./section-to-box-rows-spec.js";import"./section-to-box-rows-productgrid.js";import"./section-to-box-rows-events.js";import"./section-to-box-rows-collections.js";import"./section-to-box-rows-detail.js";import"./section-to-box-rows-service.js";import"./section-to-box-rows-listing.js";import{COMMERCE_METAS as _}from"./blocks/commerce/metas.js";import{SERVICE_METAS as O}from"./blocks/service/metas.js";import P from"./blocks/text-part-shapes.json";import{addPageBlocksFromFooter as b}from"./footer-page-blocks.js";import{LAZY_DRAWS as f}from"./lazy-draws.js";import{drawPublishedStorefrontRoot as k}from"./storefront-root.js";import{withShopperAddressMark as T}from"../../components/catalog/ShopperScope.js";import{SHOPPER_BLOCK_TYPES as j}from"../wheels/shopper-first-paint.js";const l=P,w=(t,e)=>{const r=Object.hasOwn(l,t)?l[t]:void 0;return{...e,...r?{textParts:r}:null}};let p=null;function d(){if(p)return p;const t={},e=g();for(const o of Object.keys(e))t[o]={...e[o],render:f[o]};const r={..._,...O};for(const o of Object.keys(r)){const m=j.has(o)?T(f[o]):f[o];t[o]=w(o,{...r[o],render:m})}b(t);const n={root:{render:k},categories:R(),components:t};return S(n),p=n,n}function x(t=d()){const e=t.components,r=Object.keys(e),n=new Set([a]),o=[a];for(;o.length;){const m=o.shift();for(const c of Object.values(e[m]?.fields??{})){if(c?.type!=="slot")continue;const u=c.allow??r.filter(s=>!c.disallow?.includes(s));for(const s of u)n.has(s)||!(s in e)||(n.add(s),o.push(s))}}return[...n]}let i=null;function
|
|
1
|
+
import{Fragment as h,jsx as E}from"react/jsx-runtime";import{generalRenderMetas as g}from"efficient-web-builder/format/lib/document/blocks/general/metas";import{finishRenderRegistry as S}from"efficient-web-builder/render/lib/document/render-registry";import{buildBlockCategories as R}from"efficient-web-builder/format/lib/document/section-catalog";import{SITE_HEADER_TYPE as a}from"efficient-web-builder/format/lib/document/section-groups";import"./slot-seeds.js";import"./card-templates.js";import"./section-to-box-rows-reviews.js";import"./section-to-box-rows-spec.js";import"./section-to-box-rows-productgrid.js";import"./section-to-box-rows-events.js";import"./section-to-box-rows-collections.js";import"./section-to-box-rows-gallery.js";import"./section-to-box-rows-detail.js";import"./section-to-box-rows-service.js";import"./section-to-box-rows-listing.js";import{COMMERCE_METAS as _}from"./blocks/commerce/metas.js";import{SERVICE_METAS as O}from"./blocks/service/metas.js";import P from"./blocks/text-part-shapes.json";import{addPageBlocksFromFooter as b}from"./footer-page-blocks.js";import{LAZY_DRAWS as f}from"./lazy-draws.js";import{drawPublishedStorefrontRoot as k}from"./storefront-root.js";import{withShopperAddressMark as T}from"../../components/catalog/ShopperScope.js";import{SHOPPER_BLOCK_TYPES as j}from"../wheels/shopper-first-paint.js";const l=P,w=(t,e)=>{const r=Object.hasOwn(l,t)?l[t]:void 0;return{...e,...r?{textParts:r}:null}};let p=null;function d(){if(p)return p;const t={},e=g();for(const o of Object.keys(e))t[o]={...e[o],render:f[o]};const r={..._,...O};for(const o of Object.keys(r)){const m=j.has(o)?T(f[o]):f[o];t[o]=w(o,{...r[o],render:m})}b(t);const n={root:{render:k},categories:R(),components:t};return S(n),p=n,n}function x(t=d()){const e=t.components,r=Object.keys(e),n=new Set([a]),o=[a];for(;o.length;){const m=o.shift();for(const c of Object.values(e[m]?.fields??{})){if(c?.type!=="slot")continue;const u=c.allow??r.filter(s=>!c.disallow?.includes(s));for(const s of u)n.has(s)||!(s in e)||(n.add(s),o.push(s))}}return[...n]}let i=null;function $(){if(i)return i;const t=d(),e=t.components;return i={...t,root:{render:({children:r})=>E(h,{children:r})},components:Object.fromEntries(x(t).map(r=>[r,e[r]]))},i}export{w as drawnBlock,$ as headerRenderConfig,d as renderConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{registerSectionToBox as o}from"efficient-web-builder/render/lib/sections/section-to-box";import{headOnlyRow as r}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-rows-head";import{CARD_TEMPLATE_SLOT as e}from"efficient-web-builder/format/lib/content/card-template";import{galleryTileSeed as t}from"./card-templates.js";import{FRAME_120 as m,FRAME_PHONE_PX as l}from"../sections/band-padding.js";o({GalleryB:r("GalleryB",{slots:{[e]:[t()]},roomBelow:{bottom:m.bottom,bottomPhone:l},pressHeading:!0})});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SlotComponent } from "efficient-easel/blocks";
|
|
2
|
+
export declare function galleryFrame(omitHead: boolean, copies: boolean): string;
|
|
3
|
+
export declare function galleryTemplate(template: SlotComponent | undefined, tilesTakeCopies: boolean): SlotComponent | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FRAME_ROOM_NO_TOP as e,FRAME_ROOM_NO_TOP_PHONE as r,FRAME_ROOM_OWN_BOX as t,FRAME_ROOM_Y as R}from"./band-padding.js";const n=`relative z-[2] bg-bg ${R}`,E=`relative z-[2] bg-bg ${t}`,o=`relative z-[2] ${e} ${r}`;function A(_,O){return _?O?o:E:n}function i(_,O){return O&&(_?.blockCount??0)>0?_:void 0}export{A as galleryFrame,i as galleryTemplate};
|
|
@@ -6,7 +6,6 @@ export declare const FROM_PREFIX = "from ";
|
|
|
6
6
|
export declare const FROM_PREFIX_START = "From ";
|
|
7
7
|
export declare const EACH_UNIT = "each";
|
|
8
8
|
export declare const FREE_PRICE = "Free";
|
|
9
|
-
export declare const FIGURE_TO_COME = "\u2026";
|
|
10
9
|
export declare const FIGURE_UPDATING = "Updating";
|
|
11
10
|
export declare function isPriced(amount: number | null | undefined): amount is number;
|
|
12
11
|
export declare function priceIn(prices: Record<string, number | null> | undefined, currency: string): number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{formatPrice as s,setPrice as P,WHEELS_PER_SET as m}from"../commerce.js";const c="Price on request",E="Request a quote",f="from ",
|
|
1
|
+
import{formatPrice as s,setPrice as P,WHEELS_PER_SET as m}from"../commerce.js";const c="Price on request",E="Request a quote",f="from ",w="From ",h="each",I="Free",_="Updating";function i(t){return typeof t=="number"&&Number.isFinite(t)&&t>0}function a(t,e){const n=t?.[e];return i(n)?n:null}function U(t,e,n,l){const r=a(t,n),o=a(e,n);return r===null&&o===null?0:r===null?1:o===null?-1:l==="asc"?r-o:o-r}function g(t,e,n,l){if(n==null&&l==null)return!0;const r=a(t,e);return!(r===null||n!=null&&r<n||l!=null&&r>l)}const T={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function x(t,e,n){if(!i(t))return T;const l=i(e)&&e>t?e:null;return{priced:!0,unit:t,was:l,onSale:l!==null,setTotal:n!=null?t*n:null}}function L(t,e,n=""){return!t.priced||t.unit==null?c:`${n}${s(t.unit,e)}`}function N(t,e){return t.was==null?null:s(t.was,e)}function F(t,e,n=1){const l=P(t,e);if(l===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};const r=t.reduce((u,p)=>u+p.wheels,0),o=Math.min(...t.map(u=>u.prices[e]));return{priced:!0,unit:o,isFrom:o*r!==l,setTotal:l*n}}const S={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function C(t,e,n,l=1){const r=x(t.prices[n],t.msrpPrices?.[n],m),o=r.setTotal==null?null:r.setTotal*l;if(!e)return{priced:r.priced,unit:r.unit,isFrom:!0,was:r.was,onSale:r.onSale,setTotal:null,fromSetTotal:o};const u=F(e.components,n,l);return u.priced?{priced:!0,unit:u.unit,isFrom:u.isFrom,was:null,onSale:!1,setTotal:u.setTotal,fromSetTotal:o}:{...S,fromSetTotal:o}}function d(t,e){return!t.priced||t.unit==null?c:`${t.isFrom?f:""}${s(t.unit,e)}`}function W(t,e){return t.was==null?null:s(t.was,e)}function $(t,e){return!t.priced||t.unit==null?E:d(t,e)}function v(t,e){const n=t.savings[e];if(n===void 0||t.components.length===0)return null;let l=0;for(const o of t.components){const u=o.prices?.[e];if(typeof u!="number")return null;l+=u*o.quantity}const r=s(l-n,e);return{was:s(l,e),amount:t.savingIsFrom?`${f}${r}`:r}}export{h as EACH_UNIT,_ as FIGURE_UPDATING,I as FREE_PRICE,f as FROM_PREFIX,w as FROM_PREFIX_START,E as SET_QUOTE_LABEL,c as UNPRICED_LABEL,v as bundlePrice,U as comparePrice,d as formatSelectionPrice,W as formatSelectionWasPrice,L as formatWheelPrice,N as formatWheelWasPrice,i as isPriced,a as priceIn,C as resolveSelectionPrice,F as resolveSetPrice,x as resolveWheelPrice,$ as setPriceLabel,g as withinPriceRange};
|
package/dist/words.d.ts
CHANGED
|
@@ -135,9 +135,11 @@ export type WebBuilderPhrase =
|
|
|
135
135
|
| "Add your answer here. Keep it clear and concise so it stays easy to scan."
|
|
136
136
|
| "Add your first question"
|
|
137
137
|
| "Add your numbers."
|
|
138
|
+
| "Add “{name}”"
|
|
138
139
|
| "Address"
|
|
139
140
|
| "After"
|
|
140
141
|
| "All"
|
|
142
|
+
| "All pages"
|
|
141
143
|
| "Alt text"
|
|
142
144
|
| "Alternating"
|
|
143
145
|
| "Alternating (zig-zag)"
|
|
@@ -208,6 +210,7 @@ export type WebBuilderPhrase =
|
|
|
208
210
|
| "Big stat"
|
|
209
211
|
| "Black and white"
|
|
210
212
|
| "Black and white logos"
|
|
213
|
+
| "Blank page"
|
|
211
214
|
| "Block"
|
|
212
215
|
| "Block gap"
|
|
213
216
|
| "Block spacing"
|
|
@@ -303,6 +306,7 @@ export type WebBuilderPhrase =
|
|
|
303
306
|
| "Chip label"
|
|
304
307
|
| "Chips"
|
|
305
308
|
| "Choose a page"
|
|
309
|
+
| "Choose a page and change the text, images and more."
|
|
306
310
|
| "Choose a popup"
|
|
307
311
|
| "Choose a post"
|
|
308
312
|
| "Choose a product"
|
|
@@ -359,6 +363,7 @@ export type WebBuilderPhrase =
|
|
|
359
363
|
| "Couldn’t delete the page — please retry."
|
|
360
364
|
| "Couldn’t duplicate the section — please retry"
|
|
361
365
|
| "Couldn’t load pages"
|
|
366
|
+
| "Couldn’t load the pages — please retry."
|
|
362
367
|
| "Couldn’t open this section."
|
|
363
368
|
| "Couldn’t reach {place}."
|
|
364
369
|
| "Count"
|
|
@@ -556,6 +561,7 @@ export type WebBuilderPhrase =
|
|
|
556
561
|
| "Frequently *asked.*"
|
|
557
562
|
| "From"
|
|
558
563
|
| "From the bottom"
|
|
564
|
+
| "From your template"
|
|
559
565
|
| "Full"
|
|
560
566
|
| "Full width"
|
|
561
567
|
| "Full-bleed intro image the next section scrolls over."
|
|
@@ -825,6 +831,7 @@ export type WebBuilderPhrase =
|
|
|
825
831
|
| "No match (gray ✕)"
|
|
826
832
|
| "No other pages"
|
|
827
833
|
| "No pages match your search"
|
|
834
|
+
| "No pages to start from"
|
|
828
835
|
| "No pages yet. Add one with + above."
|
|
829
836
|
| "No place found. Try another postcode."
|
|
830
837
|
| "No question matches your search."
|
|
@@ -912,6 +919,7 @@ export type WebBuilderPhrase =
|
|
|
912
919
|
| "Page settings for “{name}”"
|
|
913
920
|
| "Page width"
|
|
914
921
|
| "Pages"
|
|
922
|
+
| "Pages for your site"
|
|
915
923
|
| "Panel heading"
|
|
916
924
|
| "Panels & cards"
|
|
917
925
|
| "Panels and cards"
|
|
@@ -1171,6 +1179,7 @@ export type WebBuilderPhrase =
|
|
|
1171
1179
|
| "Stacked"
|
|
1172
1180
|
| "Stacks below"
|
|
1173
1181
|
| "Standard"
|
|
1182
|
+
| "Start with a blank page, then add sections."
|
|
1174
1183
|
| "Starts open"
|
|
1175
1184
|
| "Stat"
|
|
1176
1185
|
| "Stat & note"
|
|
@@ -1684,7 +1693,10 @@ export type StorefrontBlocksPhrase =
|
|
|
1684
1693
|
| "Copyright"
|
|
1685
1694
|
| "Could not load header settings."
|
|
1686
1695
|
| "Could not save. Please retry."
|
|
1696
|
+
| "Couldn’t load menus"
|
|
1697
|
+
| "Couldn’t load this site’s menus."
|
|
1687
1698
|
| "Couldn’t reach the product catalog."
|
|
1699
|
+
| "Couldn’t update the links. Try again:"
|
|
1688
1700
|
| "Country name"
|
|
1689
1701
|
| "Country selector"
|
|
1690
1702
|
| "Counts visits and pages so we can improve the site. Google Analytics and our own visit count."
|