efficient-storefront-blocks 0.117.1 → 0.117.2
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 +20 -0
- package/dist/editor/lib/document/blocks/commerce/FitmentTable/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/config.d.ts +1 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +2 -0
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.js +30 -30
- package/dist/render/components/FitmentTable.d.ts +5 -1
- package/dist/render/components/FitmentTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicFitmentTable.d.ts +4 -0
- package/dist/render/components/pdp-dynamic/DynamicFitmentTable.js +1 -1
- package/dist/render/lib/content/fitment-row-seed.d.ts +15 -0
- package/dist/render/lib/content/fitment-row-seed.js +1 -0
- package/dist/render/lib/document/blocks/commerce/FitmentTable/meta.d.ts +10 -0
- package/dist/render/lib/document/blocks/commerce/FitmentTable/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/FitmentTable/render.js +1 -1
- package/dist/render/lib/document/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-fitment.d.ts +1 -0
- package/dist/render/lib/document/section-to-box-rows-fitment.js +1 -0
- package/dist/words.d.ts +2 -0
- package/dist/words.js +1 -1
- package/package.json +2 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SlotComponent } from "efficient-easel/blocks";
|
|
1
2
|
import type { FitmentRow } from "../lib/wheels/fitments.js";
|
|
2
3
|
import { type FieldUsageAnswer } from "../lib/content/field-usage.js";
|
|
3
4
|
export interface FitmentTableProps {
|
|
@@ -13,5 +14,8 @@ export interface FitmentTableProps {
|
|
|
13
14
|
editing?: boolean;
|
|
14
15
|
omitHead?: boolean;
|
|
15
16
|
fieldUsage?: readonly FieldUsageAnswer[];
|
|
17
|
+
template?: SlotComponent;
|
|
18
|
+
headTemplate?: SlotComponent;
|
|
19
|
+
nodeId?: string;
|
|
16
20
|
}
|
|
17
|
-
export default function FitmentTable({ num, title, description, rows, showFilter, tooltipDefaultOn, footnote, footnoteLinkText, footnoteLinkHref, editing, omitHead, fieldUsage, }: FitmentTableProps): import("react").JSX.Element | null;
|
|
21
|
+
export default function FitmentTable({ num, title, description, rows, showFilter, tooltipDefaultOn, footnote, footnoteLinkText, footnoteLinkHref, editing, omitHead, fieldUsage, template, headTemplate, nodeId, }: FitmentTableProps): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as l,Fragment as
|
|
1
|
+
"use client";import{jsx as t,jsxs as l,Fragment as re}from"react/jsx-runtime";import L from"./SectionBand.js";import{useEffect as oe,useState as R}from"react";import{CardTemplateRows as B}from"efficient-web-builder/render/components/CardRowContext";import{BOX_HOLDS_NO_GUTTER_CLASS as ae}from"efficient-web-builder/format/lib/content/page-width";import{SPEC_TABLE_BAND as I}from"../lib/sections/spec-table-band.js";import{FITMENT_HEAD_TEMPLATE_SLOT as ie,fitmentCardRow as se,fitmentHeadRow as ce}from"../lib/content/fitment-row-seed.js";import O from"efficient-web-builder/render/components/SectionHeader";import de from"./SectionFootnote.js";import{renderGold as b,renderHeadline as X}from"efficient-web-builder/render/components/goldPhrases";import me from"./fitment/FitmentRowFit.js";import{useVehicleFit as pe}from"./fitment/useVehicleFit.js";import{fitmentRowAnswer as ue}from"../lib/wheels/fitment-row-fit.js";import{fitmentColumns as fe,loadUnitFor as be}from"../lib/wheels/fitment-columns.js";import{useActiveCountry as he}from"./CurrencyContext.js";import{NO_FIELD_ANSWERS as xe}from"../lib/content/field-usage.js";import{say as H}from"efficient-web-builder/format/lib/editor-words";import{useEnglish as ge}from"./EnglishVariant.js";const a={body:"text-[length:var(--size-body,12px)]",labelXs:"text-[length:var(--size-label,11px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]",labelXl:"text-[length:var(--size-label,14px)]"},we="whitespace-nowrap border-b border-line px-4 py-4",j=`relative cursor-pointer border-2 px-4 py-2 font-mono ${a.labelSmall} font-semibold uppercase tracking-[0.18em] text-fg transition-colors`,P=I.inline,D=I.ownBox,h={scroll:"-mx-1 overflow-x-auto",table:`min-w-[600px] ${ae}`,head:"border-b border-line bg-surface",row:"group relative border-b border-line transition-colors hover:bg-surface"},G={background:"color-mix(in oklab, var(--accent) 14%, transparent)"},y=(i,s,c)=>s.map(x=>x.cell(i,c)).join("|");function ve({num:i,title:s,description:c,rows:x,showFilter:W=!0,tooltipDefaultOn:g=!0,footnote:K,footnoteLinkText:M,footnoteLinkHref:U,editing:S=!1,omitHead:f=!1,fieldUsage:V=xe,template:Z,headTemplate:q,nodeId:T}){const k=x??[],r=fe(V),_=ge(),u=be(he()),[w,E]=R(null),[o,$]=R(g);oe(()=>$(g),[g]);const J=pe({editing:S}),C=r.length===0;if(k.length===0||C)return S?l(L,{className:f?D:P,children:[f?null:t(O,{num:i!=null?b(i):void 0,title:s!=null?X(s,!1):void 0,description:c!=null?b(c):void 0,accent:!0}),t("p",{className:`border-t border-line py-6 font-mono ${a.labelLarge} uppercase tracking-[0.18em] text-fg-dim`,children:C?H("Every fitment column is hidden in Product Types — show one to draw this table."):H("No fitment data for this wheel — pick a wheel with fitment specs.")})]}):null;const A=new Set,v=k.filter(e=>{const n=y(e,r,u);return A.has(n)?!1:(A.add(n),!0)}),N=Array.from(new Set(v.map(e=>e.diameter))).sort((e,n)=>e-n),d=w!==null&&N.includes(w)?w:null,m=d===null?v:v.filter(e=>e.diameter===d),Q=W&&N.length>1,Y=e=>{if(e===0)return!1;const n=m[e-1],p=m[e];return n.diameter!==p.diameter||n.width!==p.width},F=e=>o?t("span",{role:"tooltip",className:`pointer-events-none absolute top-1/2 right-0 z-20 hidden w-[520px] -translate-y-1/2 whitespace-normal bg-[var(--tooltip-bg)] px-3 py-2 text-right font-mono ${a.labelXs} normal-case tracking-[0.12em] text-fg shadow-lg group-hover:block max-view-tablet:!hidden`,children:t(me,{answer:ue(e,J)})}):null,ee=(e,n)=>l("div",{className:h.row,children:[e,m[n.index]?F(m[n.index]):null]}),te=t("div",{className:"-mx-1 overflow-x-auto",children:l("table",{className:`w-full border-collapse font-mono ${a.labelXl} tracking-[0.06em] text-fg`,children:[t("thead",{children:t("tr",{children:r.map(({header:e},n)=>t("th",{className:`whitespace-nowrap border-b border-line bg-surface px-4 py-4 text-left ${a.body} font-normal uppercase tracking-[0.22em] text-fg-dim`,children:_(e)},n))})}),t("tbody",{children:m.map((e,n)=>t("tr",{className:`group transition-colors hover:[&>td]:bg-surface ${Y(n)?"[&>td]:border-t [&>td]:border-line":""}`,children:r.map((p,ne)=>{const z=ne===r.length-1,le=p.fieldKey==="diameter";return l("td",{className:`${z?"relative ":""}${we}${le?" text-accent":""}`,children:[p.cell(e,u),z?F(e):null]},p.fieldKey)})},y(e,r,u)))})]})});return l(L,{className:f?D:P,children:[f?null:t(O,{num:i!=null?b(i):void 0,title:s!=null?X(s,!1):void 0,description:c!=null?b(c):void 0,accent:!0}),l("div",{className:"mb-6 flex flex-wrap items-center gap-x-2 gap-y-3",children:[Q&&l(re,{children:[t("span",{className:`mr-2 font-mono ${a.labelSmall} uppercase tracking-[0.24em] text-fg-dim max-view-tablet:mr-0 max-view-tablet:mb-1 max-view-tablet:w-full`,children:"Filter by size:"}),l("button",{type:"button",onClick:()=>E(null),className:`${j} ${d===null?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-fg-dim/50 hover:border-accent"}`,style:d===null?G:void 0,children:[d===null&&t("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),"All"]}),N.map(e=>{const n=e===d;return l("button",{type:"button",onClick:()=>E(n?null:e),className:`${j} ${n?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-fg-dim/50 hover:border-accent"}`,style:n?G:void 0,children:[n&&t("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),e,'"']},e)})]}),l("button",{type:"button",onClick:()=>$(e=>!e),"aria-pressed":o,"aria-label":o?"Hide vehicle tooltip":"Show vehicle tooltip",className:`ml-auto inline-flex items-center gap-3 font-mono ${a.labelSmall} uppercase tracking-[0.24em] text-fg-dim transition-colors hover:text-fg max-view-tablet:hidden`,children:[t("span",{children:"Vehicle tooltip"}),t("span",{className:`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 transition-colors ${o?"border-accent":"border-fg-dim/50"}`,style:o?{background:"color-mix(in oklab, var(--accent) 30%, transparent)"}:void 0,"aria-hidden":!0,children:t("span",{className:`block h-3 w-3 rounded-full transition-transform ${o?"translate-x-[18px] bg-accent":"translate-x-[2px] bg-fg-dim"}`})}),t("span",{className:o?"text-accent":"text-fg-dim",children:o?"On":"Off"})]})]}),t(B,{ownerId:T??"",ownerType:"FitmentTable",Template:Z,rows:m.map(e=>se(e,r,u,y(e,r,u))),wrapCopy:ee,fallback:te,children:e=>t("div",{className:h.scroll,children:l("div",{className:h.table,children:[t(B,{ownerId:T??"",ownerType:"FitmentTable",slot:ie,Template:q,rows:[ce(r,_)],fallback:null,children:n=>t("div",{className:h.head,children:n})}),e]})})}),t(de,{text:K,linkText:M,linkHref:U})]})}export{ve as default};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ProductKind } from "../../lib/api/index.js";
|
|
2
|
+
import type { SlotComponent } from "efficient-easel/blocks";
|
|
2
3
|
export declare const supportedKinds: readonly ProductKind[];
|
|
3
4
|
export interface TyreHead {
|
|
4
5
|
title?: string;
|
|
@@ -16,6 +17,9 @@ interface Props {
|
|
|
16
17
|
footnoteLinkHref?: string;
|
|
17
18
|
editing?: boolean;
|
|
18
19
|
omitHead?: boolean;
|
|
20
|
+
template?: SlotComponent;
|
|
21
|
+
headTemplate?: SlotComponent;
|
|
22
|
+
nodeId?: string;
|
|
19
23
|
}
|
|
20
24
|
export default function DynamicFitmentTable(props: Props): import("react").JSX.Element;
|
|
21
25
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n}from"react/jsx-runtime";import
|
|
1
|
+
"use client";import{jsx as n}from"react/jsx-runtime";import F from"../FitmentTable.js";import h from"./KindGate.js";import{TyreSizesContent as w}from"../TyreSizeGrid.js";import{useCurrentProduct as b}from"../../lib/document/current-product.js";import{NO_FIELD_ANSWERS as y}from"../../lib/content/field-usage.js";import{useSampleProduct as S}from"./useSampleProduct.js";const U=["alloy-wheel","tyre"];function D(t){return n(h,{kinds:U,type:"FitmentTable",editing:t.editing,children:n(L,{...t})})}function L({num:t,title:s,description:l,showFilter:a,tooltipDefaultOn:d,footnote:f,footnoteLinkText:p,footnoteLinkHref:u,editing:r=!1,omitHead:m=!1,tyreHead:e,template:c,headTemplate:T,nodeId:g}){const o=b(),k=S(r&&!o),i=o?.product??k;if(i?.kind==="tyre")return n(w,{variants:i.source.variants,fieldUsage:o?.fieldUsage??y,num:t,title:e?e.title:s,description:e?e.description:l,editing:r,omitHead:m,keepHiddenHead:e!=null});const x=i?.kind==="alloy-wheel"?i.source.fitments??[]:[];return n(F,{num:t,title:s,description:l,rows:x,showFilter:a,tooltipDefaultOn:d,footnote:f,footnoteLinkText:p,footnoteLinkHref:u,editing:r,omitHead:m,fieldUsage:o?.fieldUsage,template:c,headTemplate:T,nodeId:g})}export{D as default,U as supportedKinds};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type CardRowFieldSpec } from "efficient-web-builder/format/lib/content/card-template";
|
|
2
|
+
import { type BlockSeed } from "efficient-web-builder/format/lib/document/seed-parts";
|
|
3
|
+
import type { SourceRow } from "efficient-web-builder/format/lib/content/block-sources";
|
|
4
|
+
import { type FitmentColumn, type LoadUnit } from "../wheels/fitment-columns.js";
|
|
5
|
+
import type { FitmentRow } from "../wheels/fitments.js";
|
|
6
|
+
export declare const FITMENT_ROW_TEMPLATE_SLOT = "template";
|
|
7
|
+
export declare const FITMENT_ROW_TEMPLATE_LABEL = "Row template";
|
|
8
|
+
export declare const FITMENT_HEAD_TEMPLATE_SLOT = "headTemplate";
|
|
9
|
+
export declare const FITMENT_HEAD_TEMPLATE_LABEL = "Head template";
|
|
10
|
+
export declare const FITMENT_ROW_FIELDS: readonly CardRowFieldSpec[];
|
|
11
|
+
export declare const FITMENT_HEAD_FIELDS: readonly CardRowFieldSpec[];
|
|
12
|
+
export declare const fitmentRowSeed: () => BlockSeed;
|
|
13
|
+
export declare const fitmentHeadSeed: () => BlockSeed;
|
|
14
|
+
export declare function fitmentCardRow(row: FitmentRow, shown: readonly FitmentColumn[], unit: LoadUnit, key: string): SourceRow;
|
|
15
|
+
export declare function fitmentHeadRow(shown: readonly FitmentColumn[], english: (word: string) => string): SourceRow;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CARD_TEMPLATE_SLOT as L}from"efficient-web-builder/format/lib/content/card-template";import{rowFieldTextSeed as E}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{DIM as h,INNER_BOX as O,LABEL_FACE as T,TEXT as c,boxPadding as y,token as d}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_TYPE as S,CONTAINER_BLOCKS_SLOT as w}from"efficient-web-builder/format/lib/document/container-blocks";import{phoneKey as r}from"efficient-easel/draw";import{FITMENT_COLUMNS as a}from"../wheels/fitment-columns.js";const K=L,u="Row template",C="headTemplate",D="Head template",B=a.map(e=>({key:e.fieldKey,label:e.header})),p=e=>`head_${e.fieldKey}`,P=a.map(e=>({key:p(e),label:`${e.header} heading`})),A="diameter",l={textStyle:T.textStyle,...d("label",14),letterSpacing:.06,lineHeight:1.5},N={...T,...d("body",12),letterSpacing:.22,weight:400,lineHeight:1.5},_=a.filter(e=>e.shownByDefault),x={...O,direction:"row",justify:"start",align:"start",share:"equal",phoneRow:2,[r("share")]:"content",[r("wrap")]:"nowrap",widthFit:"fill",gap:32,gapPhone:16,...y(16,16)},m={[r("widthFit")]:"fixed",[r("width")]:120},s=(e,o)=>({type:S,props:{...x,name:e},slots:{[w]:o}}),b=()=>s("Row",_.map(e=>E(e.fieldKey,{...c,name:e.header,tag:"p",...m},e.fieldKey===A?{...l,color:"main"}:l))),W=()=>s("Head",_.map(e=>E(p(e),{...h,name:e.header,tag:"p",...m},N)));function f(e,o,n){const i=new Set(e.map(t=>t.fieldKey));return Object.fromEntries(a.map(t=>[o(t),i.has(t.fieldKey)?n(t):""]))}function k(e,o,n,i){return{key:i,...f(o,t=>t.fieldKey,t=>String(t.cell(e,n)))}}function X(e,o){return{key:"head",...f(e,p,n=>o(n.header))}}export{P as FITMENT_HEAD_FIELDS,D as FITMENT_HEAD_TEMPLATE_LABEL,C as FITMENT_HEAD_TEMPLATE_SLOT,B as FITMENT_ROW_FIELDS,u as FITMENT_ROW_TEMPLATE_LABEL,K as FITMENT_ROW_TEMPLATE_SLOT,k as fitmentCardRow,X as fitmentHeadRow,W as fitmentHeadSeed,b as fitmentRowSeed};
|
|
@@ -6,4 +6,14 @@ export declare const FITMENTTABLE_PH: {
|
|
|
6
6
|
footnote: string;
|
|
7
7
|
footnoteLinkText: string;
|
|
8
8
|
};
|
|
9
|
+
export declare const FitmentTableSlots: {
|
|
10
|
+
headTemplate: {
|
|
11
|
+
type: "slot";
|
|
12
|
+
allow: string[];
|
|
13
|
+
};
|
|
14
|
+
template: {
|
|
15
|
+
type: "slot";
|
|
16
|
+
allow: string[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
9
19
|
export declare const FitmentTableMeta: Omit<BlockRender, "render">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cardTemplateSlot as t}from"efficient-web-builder/format/lib/content/card-template";import{PH as o}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{FITMENT_HEAD_TEMPLATE_SLOT as e}from"../../../../content/fitment-row-seed.js";const a={num:o.sectionNumber,title:"Specifications *table.*",description:o.body,footnote:"Add a short footnote here.",footnoteLinkText:"Contact us"},i={[e]:t(),template:t()},f={label:"Sizes",fields:i,defaultProps:{dynamic:!1,num:"",title:"",description:"",wheel:"",showFilter:!0,tooltipDefaultOn:!0,footnote:"",footnoteLinkText:"",footnoteLinkHref:""}};export{a as FITMENTTABLE_PH,f as FitmentTableMeta,i as FitmentTableSlots};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import f from"../../../../../components/pdp-dynamic/FitmentTableBlock.js";import{TYRE_SIZES_HEAD as d}from"../../../../../components/TyreSizeGrid.js";import{hidableText as r}from"efficient-easel/screen/lib/document/hidable";import{parseSectionHeadPlacement as c}from"efficient-web-builder/format/lib/sections/section-head-placement";import{phHide as t,phHideDefault as m}from"efficient-web-builder/render/lib/document/blocks/scaffold";import{FitmentTableMeta as T,FITMENTTABLE_PH as i}from"./meta.js";const F={...T,render:e=>{const n=c(e.headPlacement)==="own-box",o=l=>n?void 0:l;return a(f,{dynamic:e.dynamic,wheel:e.wheel,num:o(t(e.num,i.num,e.editor)),title:o(t(e.title,i.title,e.editor)),description:o(t(e.description,i.description,e.editor)),tyreHead:n?void 0:{title:m(e.title,d.title,e.editor),description:m(e.description,d.description,e.editor)},omitHead:n,showFilter:e.showFilter,tooltipDefaultOn:e.tooltipDefaultOn,footnote:t(e.footnote,i.footnote,e.editor),footnoteLinkText:t(e.footnoteLinkText,i.footnoteLinkText,e.editor),footnoteLinkHref:r(e.footnoteLinkHref),editing:e.editor?.isEditing,template:e.template,headTemplate:e.headTemplate,nodeId:typeof e.id=="string"?e.id:void 0})}};export{F as FitmentTableRender};
|
|
@@ -1 +1 @@
|
|
|
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};
|
|
1
|
+
import{CARD_LIST_TYPE as R,CARD_ROW_FIELD_PROP as y,CARD_ROW_LINK_PROP as m,CARD_TEMPLATE_SLOT as E,registerCardTemplates as de}from"efficient-web-builder/format/lib/content/card-template";import{DIM as d,INNER_BOX as o,LABEL_FACE as C,TEXT as n,boxPadding as r,fillSlot as H,labelLook as T,labelStyle as K,seedNodes as f,token as _}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 Te,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 k}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 ce,EVENTS_FEATURED_DARKEN_STYLE as G,EVENTS_FEATURED_PLACEMENT as Oe}from"../content/events-featured-look.js";import{COLLECTION_DARKEN as Le,COLLECTION_HOVER_DARKEN as me,COLLECTION_HOVER_ZOOM as U}from"../content/collection-card-look.js";import{COLLECTION_CARD_REGIONS as b,COLLECTION_CARD_TEXT_SIZE as be}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 he}from"../sections/bundle-to-grid.js";import{HERO_PRICE_BLOCK as ge,withHeroPriceTemplate as Pe}from"../content/hero-price-seed.js";import{HERO_BUY_SLOT as Re,HERO_BUY_SLOT_LABEL as ye,withHeroBuyTemplate as Ce}from"../content/hero-buy-seed.js";import{HERO_OPTION_FIELDS as W,HERO_OPTION_SLOT as fe,HERO_OPTION_SLOT_LABEL as ke,withHeroOptionTemplate as Se}from"../content/hero-option-seed.js";import{FILTER_OPTIONS_FIELD as Ae,withFilterChipsTemplate as Ie,withFilterTemplate as ue}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 Ne,RAIL_HEAD_TEMPLATE_SLOT as De,RAIL_ROW_FIELDS as A,RAIL_TEMPLATE_LABEL as we,RAIL_TEMPLATE_SLOT as Be,withRailTemplates as Z}from"../content/rail-row-seed.js";import{MENU_LINK_BLOCK as Fe,withMenuTemplate as He}from"../content/menu-card-seed.js";import{CONTACT_CHANNEL_FIELDS as j,CONTACT_CHANNEL_SLOT as Ke,CONTACT_REASON_FIELDS as Me,CONTACT_REASON_SLOT as xe,CONTACT_TOPIC_FIELDS as z,CONTACT_TOPIC_SLOT as Ye,withContactTemplates as Ge}from"../content/contact-card-seed.js";import{ARTICLE_BODY_BLOCK as Ue,withArticleBodyTemplate as Ve}from"efficient-web-builder/format/lib/document/article-body-seed";import{APPOINTMENT_BOOKING_TYPE as We,BOOKING_BOX_TYPE as ve,BOOKING_OPTION_FIELDS as $e,BOOKING_TEMPLATE_SLOTS as Xe,withBookingTemplates as Ze}from"../content/booking-card-seed.js";import{PRODUCT_BUY_BLOCK as je,PRODUCT_CARD_FIELDS as I,PRODUCT_COLOUR_BLOCK as ze,PRODUCT_EYEBROW_BLOCK as qe,PRODUCT_NAME_BLOCK as Qe,PRODUCT_PICTURE_BLOCK as Je,PRODUCT_PRICE_BLOCK as et,PRODUCT_SIZE_BLOCK as tt,PRODUCT_SPECS_BLOCK as lt,productCardSeed as ot,withKitCardTemplate as u,withListingCardTemplate as at,withProductCardTemplate as N}from"../content/product-card-seed.js";import{ALLOY_WHEELS_LISTING_TYPE as it,FILTER_BLOCK_TYPE as nt,FILTER_CHIPS_TYPE as rt,MENU_BLOCK_TYPE as st,PRODUCT_GRID_TYPE as Et,PRODUCT_HERO_TYPE as _t}from"./document-nodes.js";import{withSeededSlot as D}from"../content/seed-ids.js";import{FITMENT_HEAD_FIELDS as q,FITMENT_HEAD_TEMPLATE_LABEL as dt,FITMENT_HEAD_TEMPLATE_SLOT as Tt,FITMENT_ROW_FIELDS as Q,FITMENT_ROW_TEMPLATE_LABEL as pt,FITMENT_ROW_TEMPLATE_SLOT as ct}from"../content/fitment-row-seed.js";const J="tags",p=T(12),ee={textStyle:"heading-3",..._("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},te={textStyle:"body-1",..._("body",14),lineHeight:1.55},Ot={...ee,..._("headingSmall",30)},Lt={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},mt=pe.fallback,bt=480,ht=70,gt=()=>({type:a,props:{...o,name:"Featured",[k]:"cover",darken:ce,darkenStyle:G,darkenPhone:ht,darkenStylePhone:G,placement:Oe,direction:"column",gap:8,gapPhone:8,...r(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:mt,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:bt,sectionHeightUnitPhone:"px",[m]:"href"},slots:{[i]:[t("meta",{...n,tag:"p"},p,!0),t("title",{...n,tag:"h3",widthFit:"fill"},Ot),t("excerpt",{...d,tag:"p",widthFit:"fill",maxWidth:384},te),t("dateLabel",{...d,tag:"p"},{...p,color:"muted"})]}}),Pt=()=>({type:a,props:{...o,name:"Post",gap:0,gapPhone:0,...r(0,0,0,0),...H("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,...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]:[t("meta",{...n,tag:"p"},p,!0),t("dateLabel",{...d,tag:"p"},{...p,color:"muted"},!0)]}},t("title",{...n,tag:"h3",widthFit:"fill"},ee),t("excerpt",{...d,tag:"p",widthFit:"fill"},te),{type:R,props:{[y]:J},slots:{template:[{type:a,props:{...o,name:"Chip",...r(4,8,4,8),sectionBorder:{width:1}},slots:{[i]:[t("label",{...d,tag:"p"},p)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[m]:"href",...V,icon:"arrow-right",iconPosition:"after",_partStyles:{label:K(12)}}}]}}]}}),Rt=()=>[gt(),Pt()];function yt(e){const l=["featured","post"];return D(e,E,"Events",L=>f(Rt(),(s,_e)=>{const[w,...B]=_e.split("."),F=l[Number(w)]??`card${w}`;return B.length?`${L}~${F}.${B.join(".")}`:`${L}~${F}`}))}const Ct={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:J,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:R,label:"Card list"}],seedOnInsert:yt},c=e=>Number(/(\d+)px/.exec(e)?.[1]),O={tag:c(b.tag.builtIn),name:c(b.name.builtIn),namePhone:c(be.namePhone),body:c(b.body.builtIn),link:c(b.link.builtIn)},ft={...T(O.tag),letterSpacing:.25},kt={textStyle:"heading-2",..._("headingMedium",O.name,O.namePhone),weight:500,lineHeight:1,letterSpacing:-.03},St={textStyle:"body-1",..._("body",O.body),lineHeight:1.5,paragraphSpacing:12},le=()=>[t("tag",{...n,tag:"p"},ft,!0),t("name",{...n,tag:"h3",widthFit:"fill"},kt),t("desc",{...n,tag:"p",widthFit:"fill",maxWidth:420},St),{type:"ButtonBlock",props:{variant:"ghost",label:"Explore",href:"",[m]:"href",...V,icon:"arrow-right",iconPosition:"after",_partStyles:{label:K(O.link)}}}],oe={_hidden:!0,_hiddenTablet:!0,_hiddenPhone:!1},At=()=>({type:a,props:{...o,name:"Collection",gap:0,gapPhone:0,...r(0,0,0,0),[m]:"href"},slots:{[i]:[{type:a,props:{...o,name:"Picture",[k]:"image",boxShape:"portrait",darken:Le,placement:"bottom-left",direction:"column",gap:12,gapPhone:12,...r(32,32),hoverZoom:U,hoverDarken:me,_hiddenPhone:!0},slots:{[i]:le()}},{type:"ImageBlock",props:{[y]:"image",aspect:"4/5",contained:!1,hoverZoom:U,...oe}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...r(24,24),...H("surface"),...oe},slots:{[i]:le()}}]}});function It(e){return D(e,E,"Collections",l=>f([At()],(L,s)=>`${l}~card${s?`.${s}`:""}`))}const ut={fields:[{key:"tag",label:"Eyebrow"},{key:"name",label:"Title"},{key:"desc",label:"Description",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"name"},{key:"href",label:"Link",kind:"link"}],seedOnInsert:It},Nt=35,Dt=50,wt=106,Bt=85,Ft="nextImage",Ht="#f5f1e8",ae="#c4c1ba",ie={...C,...T(11),letterSpacing:.24,color:"main"},Kt={...ie,color:ae},Mt={...C,...T(12,11),color:"main"},xt={textStyle:"heading-3",..._("headingSmall",22,16),weight:500,lineHeight:1.05,letterSpacing:-.02,color:Ht},Yt={...C,...T(12),letterSpacing:.12,color:ae},g=r(0,0,0,0),Gt=()=>({type:a,props:{...o,name:"Tile",placement:"top-left",share:"content",gap:0,gapPhone:0,...g,[k]:"image",boxShape:"square",darken:Nt,[Te]:Ft,[Y.zoom]:wt,[Y.darken]:Dt},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"},ie)]}},t("number",{...n,tag:"p",textFit:"line"},Kt)]}},{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:Bt,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},Mt),t("name",{...n,tag:"h3"},xt)]}},t("meta",{...n,tag:"p"},Yt)]}}]}});function Ut(e){return D(e,E,"GalleryB",l=>f([Gt()],(L,s)=>`${l}~tile${s?`.${s}`:""}`))}const Vt={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:Ut},Wt=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],vt=e=>Object.fromEntries(Object.entries(e).filter(([l])=>!Wt.includes(l))),ne={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:Fe,label:"Menu link"}],seed:He},re=e=>e.dynamic===!0&&e.relationship==="bundles",gl=(e={})=>ot(e),P={fields:I,blocks:[{type:Je,label:"Picture"},{type:qe,label:"Eyebrow"},{type:Qe,label:"Name"},{type:lt,label:"Specs"},{type:et,label:"Price"},{type:ze,label:"Colour"},{type:tt,label:"Size"},{type:je,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return N(e);const l=S(e);return re(e)?u(l):N(l)}},se=[{key:"label",label:"Filter name"},{key:Ae,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],Ee=[{slot:Be,label:we,fields:A},{slot:De,label:Ne,fields:[]}],$t=[{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",...ne},{block:st,...ne},{block:Et,...P},{block:it,...P,slots:[{slot:E,fields:I},{slot:$,label:v,fields:h},...Ee],fields:[...I,...h,...A],seed:e=>Z(X(at(e)))},{block:"RelatedProducts",...P,seed:e=>{const l=S({...vt(e),dynamic:!0});return re(l)?u(l):N(l,{legacyWellHonoured:!0})}},{block:"BundleOffer",...P,seed:e=>u(S({...e,columns:he(e),dynamic:!0}))},{block:_t,slots:[{slot:E,fields:[]},{slot:fe,label:ke,fields:W},{slot:Re,label:ye,fields:[]}],fields:W,blocks:[{type:ge,label:"Price"}],seed:e=>Ce(Se(Pe(e)))},{block:nt,slots:[{slot:E,fields:se},{slot:$,label:v,fields:h},...Ee],fields:[...se,...h,...A],blocks:[{type:R,label:"Card list"}],seed:e=>Z(X(ue(e)))},{block:rt,fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:Ie},{block:"ContactRouting",slots:[{slot:Ye,label:"Topic card",fields:z},{slot:xe,label:"Reason chip",fields:Me},{slot:Ke,label:"Channel row",fields:j}],fields:[...z,...j],seed:Ge},{block:Ue,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:Ve},...[ve,We].map(e=>({block:e,slots:Xe,fields:$e,seed:l=>Ze(e,l)})),{block:"Events",...Ct},{block:"Collections",...ut},{block:"GalleryB",...Vt},{block:"FitmentTable",fields:[...q,...Q],slots:[{slot:Tt,label:dt,fields:q},{slot:ct,label:pt,fields:Q}]}];de($t);export{$t as STOREFRONT_CARD_TEMPLATES,At as collectionCardSeed,re as drawsKits,Rt as eventsCardSeeds,Gt as galleryTileSeed,gl as productGridCardSeed,It as withCollectionsTemplate,yt as withEventsTemplate,Ut as withGalleryTemplate};
|
|
@@ -7,6 +7,7 @@ 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
9
|
import "./section-to-box-rows-gallery.js";
|
|
10
|
+
import "./section-to-box-rows-fitment.js";
|
|
10
11
|
import "./section-to-box-rows-detail.js";
|
|
11
12
|
import "./section-to-box-rows-service.js";
|
|
12
13
|
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-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
|
|
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-fitment.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 p}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 f=null;function d(){if(f)return f;const t={},e=g();for(const o of Object.keys(e))t[o]={...e[o],render:p[o]};const r={..._,...O};for(const o of Object.keys(r)){const m=j.has(o)?T(p[o]):p[o];t[o]=w(o,{...r[o],render:m})}b(t);const n={root:{render:k},categories:R(),components:t};return S(n),f=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 oo(){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,oo as headerRenderConfig,d as renderConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{registerSectionToBox as t}from"efficient-web-builder/render/lib/sections/section-to-box";import{headOnlyRow as e}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-rows-head";import{lineSides as m}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{FITMENT_HEAD_TEMPLATE_SLOT as r,FITMENT_ROW_TEMPLATE_SLOT as i,fitmentHeadSeed as n,fitmentRowSeed as T}from"../content/fitment-row-seed.js";import{bandRoomBelow as E}from"../sections/section-band.js";import{SPEC_TABLE_BAND as b}from"../sections/spec-table-band.js";const o=E(b.ownBox);t({FitmentTable:e("FitmentTable",{slots:{[i]:[T()],[r]:[n()]},roomBelow:{bottom:o.bottom,bottomPhone:o.bottomPhone},boxProps:o.line?{sectionBorder:m({bottom:1})}:{},pressHeading:!0})});
|
package/dist/words.d.ts
CHANGED
|
@@ -1833,6 +1833,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1833
1833
|
| "Group covers"
|
|
1834
1834
|
| "Group {n}"
|
|
1835
1835
|
| "Groups"
|
|
1836
|
+
| "Head template"
|
|
1836
1837
|
| "Header button"
|
|
1837
1838
|
| "Header link"
|
|
1838
1839
|
| "Header settings"
|
|
@@ -2095,6 +2096,7 @@ export type StorefrontBlocksPhrase =
|
|
|
2095
2096
|
| "Rim Profile"
|
|
2096
2097
|
| "Routing groups"
|
|
2097
2098
|
| "Row shape"
|
|
2099
|
+
| "Row template"
|
|
2098
2100
|
| "Row {n}"
|
|
2099
2101
|
| "Rows from"
|
|
2100
2102
|
| "S"
|