efficient-storefront-blocks 0.65.0 → 0.66.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 +59 -0
- package/README.md +0 -1
- package/dist/chunks/EditorPreviewCheckout-HAUEGHGC.js +4 -0
- package/dist/chunks/{SiteEditorProvider-ZYGNRWSB.js → SiteEditorProvider-KOPR3UDU.js} +1 -1
- package/dist/chunks/{chunk-I7BIOONR.js → chunk-S66TL4Z3.js} +1 -1
- package/dist/chunks/{chunk-YAO6XQYA.js → chunk-TAGGXC3A.js} +1 -1
- package/dist/chunks/chunk-VEI75RPM.js +1 -0
- package/dist/chunks/{chunk-OU2WWXMT.js → chunk-Z7PJKX2P.js} +1 -1
- package/dist/chunks/{fitment-data-IKFCBT6E.js → fitment-data-UQDOQP66.js} +1 -1
- package/dist/consent.js +1 -1
- package/dist/editor/components/CollectionPicker.js +1 -1
- package/dist/editor/components/EditProductLink.js +1 -1
- package/dist/editor/components/FormPicker.js +1 -1
- package/dist/editor/components/GalleryProductBinding.d.ts +1 -1
- package/dist/editor/components/GalleryProductBinding.js +1 -1
- package/dist/editor/components/GalleryShowcaseSource.d.ts +1 -1
- package/dist/editor/components/GalleryShowcaseSource.js +1 -1
- package/dist/editor/components/HeaderSettingsPanel.js +1 -1
- package/dist/editor/components/MenuLinkRangeField.js +1 -1
- package/dist/editor/components/PerViewStepperField.js +1 -1
- package/dist/editor/lib/puck/blocks/service/ContactRouting/fields.js +1 -1
- package/dist/editor/lib/puck/config.d.ts +0 -4
- package/dist/editor/lib/puck/config.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +2 -4
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.js +43 -43
- package/dist/render/app/globals.css +18 -4
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/CartContext.d.ts +5 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/ContactRouting.d.ts +11 -1
- package/dist/render/components/ContactRouting.js +1 -1
- package/dist/render/components/DetailRows.d.ts +2 -0
- package/dist/render/components/DetailRows.js +1 -1
- package/dist/render/components/Events.d.ts +11 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/GalleryGrid.d.ts +4 -1
- package/dist/render/components/GalleryGrid.js +1 -1
- package/dist/render/components/GalleryItem.d.ts +1 -0
- package/dist/render/components/GalleryItem.js +1 -1
- package/dist/render/components/ProductGallery.js +1 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/checkout/CheckoutPageClient.js +3 -3
- package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
- package/dist/render/components/fitment/PickerField.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.d.ts +2 -0
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
- package/dist/render/components/pdp-dynamic/RecordPhotoGallery.d.ts +12 -0
- package/dist/render/components/pdp-dynamic/RecordPhotoGallery.js +1 -0
- package/dist/render/lib/api/types.d.ts +1 -0
- package/dist/render/lib/checkout/match-subdivision.d.ts +2 -0
- package/dist/render/lib/checkout/match-subdivision.js +1 -0
- package/dist/render/lib/consent/choice.d.ts +0 -2
- package/dist/render/lib/consent/choice.js +1 -1
- package/dist/render/lib/consent/rules.d.ts +0 -1
- package/dist/render/lib/consent/rules.js +1 -1
- package/dist/render/lib/content/source-values.d.ts +4 -0
- package/dist/render/lib/content/source-values.js +1 -0
- package/dist/render/lib/content/stock-words.d.ts +0 -4
- package/dist/render/lib/content/stock-words.js +1 -1
- package/dist/render/lib/puck/blocks/commerce/GalleryB/render.js +1 -1
- package/dist/render/lib/puck/blocks/commerce/GalleryItem/render.js +1 -1
- package/dist/render/lib/puck/blocks/service/Events/render.js +1 -1
- package/dist/render/lib/puck/blocks/text-part-shapes.json +6 -3
- package/dist/render/lib/puck/current-record.d.ts +1 -0
- package/dist/render/lib/puck/current-record.js +1 -1
- package/dist/render/lib/sections/fill-row.d.ts +8 -0
- package/dist/render/lib/sections/fill-row.js +1 -1
- package/dist/render/lib/sections/grid-no-hole.d.ts +12 -0
- package/dist/render/lib/sections/grid-no-hole.js +1 -0
- package/dist/render/lib/sections/own-padding.d.ts +3 -0
- package/dist/render/lib/sections/own-padding.js +1 -0
- package/dist/render/lib/wheels/catalog-filters-to-listing.d.ts +0 -1
- package/dist/render/lib/wheels/catalog-filters-to-listing.js +1 -1
- package/dist/render/lib/wheels/catalog-filters.d.ts +0 -1
- package/dist/render/lib/wheels/catalog-filters.js +1 -1
- package/dist/words.d.ts +3 -4
- package/dist/words.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/EditorPreviewCheckout-4KZCYPQT.js +0 -4
- package/dist/chunks/chunk-GR7OHU32.js +0 -1
- /package/dist/chunks/{chunk-B44XQA2J.js → chunk-IHYVLVY3.js} +0 -0
- /package/dist/chunks/{chunk-YAO6XQYA.js.LEGAL.txt → chunk-TAGGXC3A.js.LEGAL.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as d,jsxs as
|
|
1
|
+
"use client";import{jsx as d,jsxs as Q}from"react/jsx-runtime";import{mediaGroupVehicle as U}from"../../render/lib/content/source-values.js";import{SettingsField as N}from"efficient-easel/panel";import{FieldSelect as H}from"efficient-easel/fields";import{BlockProductIcon as X,CategoryIcon as Y}from"efficient-easel/icons";import{useEffect as L,useMemo as Z,useRef as w,useState as P}from"react";import{storefrontAdmin as v}from"../../render/lib/api/index.js";import{useEaselHost as ee}from"efficient-easel/screen/lib/host";import{getEditorToken as te}from"efficient-web-builder/render/lib/editor-auth";import{getEditorSiteId as re}from"efficient-web-builder/render/lib/editor-site";import{loadProductCatalog as I}from"../../render/components/useProductCatalog.js";import{loadStorefrontCategories as oe}from"./useStorefrontCategories.js";import{useCategoryFilter as se}from"./useCategoryFilter.js";import{snapshotChanged as ne}from"efficient-web-builder/editor/components/useSnapshotSource";import ae from"efficient-web-builder/editor/components/SourceStatus";import{say as n,sayCount as T}from"efficient-web-builder/format/lib/editor-words";const a="__all__";function ie(e,r){return r===a?e:e.filter(s=>s.process===r)}function p(e,r){return e.map(s=>({image:s.items[0]?.url,photos:s.items.map(o=>({src:o.url})),href:`/wheels/${r.slug}`,process:r.process,eyebrow:U(s),name:r.name,meta:s.finish})).filter(s=>!!s.image)}function W(e){const r=te();return r?v.getWheelDetail(r,e,{siteId:re()}):Promise.reject(new Error("editor not authenticated"))}async function le(e){const r=await W(e),s={slug:r.slug,name:r.name,process:r.process},o=r.mediaGroups??{photos:[],lifestyle:[],videos:[],accessories:[],others:[]};return{...s,vehicleCards:p(o.lifestyle??[],s),wheelCards:p(o.photos??[],s),othersCards:p(o.others??[],s)}}async function ce(e,r){const s=await Promise.all(e.map(i=>W(i.slug).catch(()=>null))),o=[],h=[],g=[];for(const i of s){if(!i)continue;const c={slug:i.slug,name:i.name,process:i.process},m=i.mediaGroups??{photos:[],lifestyle:[],videos:[],accessories:[],others:[]};o.push(...p(m.lifestyle??[],c)),h.push(...p(m.photos??[],c)),g.push(...p(m.others??[],c))}return{slug:a,name:r===a?"All products":r,process:"",vehicleCards:o,wheelCards:h,othersCards:g,category:r}}function ue({value:e,onChange:r}){const s=ee(),[o,h]=P(null),[g,i]=P(null),[c,m]=P(!1),[R,A]=P(!1),u=w(!0),y=w(e);y.current=e;const B=w(r);B.current=r;const F=(t,f=!1)=>{m(!0),f||A(!1),t().then(x=>{u.current&&(ne(x,y.current)&&B.current(x),A(!1))}).catch(()=>{u.current&&!f&&A(!0)}).finally(()=>{u.current&&m(!1)})},S=(t,f=!1)=>F(()=>le(t),f),C=(t,f=!1)=>F(()=>ce(ie(o??[],t),t),f);L(()=>(u.current=!0,I().then(t=>{u.current&&h(t)}),oe().then(t=>{u.current&&i(t)}),()=>{u.current=!1}),[]);const b=w(!1);L(()=>{if(b.current)return;const t=y.current;if(!t?.slug){b.current=!0;return}if(t.slug===a){if(o===null)return;b.current=!0,C(t.category??a,!0)}else b.current=!0,S(t.slug,!0)},[o]);const l=e?.slug===a,k=Z(()=>o&&e?.slug&&!l?o.find(t=>t.slug===e.slug)??null:null,[o,e?.slug,l]),{category:O,setCategory:E,categoryNames:D,filtered:M}=se(o,g);L(()=>{l?e?.category&&E(e.category):k?.process&&E(k.process)},[k,l,e?.category]);const G=o===null,_=!!e?.slug&&!l&&o!==null&&!k,V=t=>{if(!t){r(null);return}if(t===a){C(O);return}S(t)},$=t=>{E(t),y.current?.slug===a&&C(t)},q=()=>{e?.slug&&(I(!0).then(t=>{u.current&&h(t)}),l?C(e.category??a):S(e.slug))},z=()=>{e?.slug&&s.send("storefront-editor:open-product",{slug:e.slug,name:e.name})},j=(e?.vehicleCards.length??0)+(e?.wheelCards.length??0)+(e?.othersCards?.length??0),J=R?"error":c?"loading":"idle",K=R?n("Couldn’t reach the product catalog."):c?n("Syncing media from the catalog…"):_?n("Linked to “{name}” — no longer in the catalog.",{name:e?.name??""}):l?T("Linked to “{name}” · {n} card from all products’ media groups.","Linked to “{name}” · {n} cards from all products’ media groups.",j,{name:e?.name??""}):T("Linked to “{name}” · {n} card from its media groups.","Linked to “{name}” · {n} cards from its media groups.",j,{name:e?.name??""});return Q("div",{children:[d(N,{label:n("Category"),icon:d(Y,{}),children:d(H,{value:O,ariaLabel:n("Category"),onChange:$,readOnly:G,options:[{label:n("All products"),value:a},...D.map(t=>({label:t,value:t}))]})}),d(N,{label:n("Product"),icon:d(X,{}),children:d(H,{value:e?.slug??"",ariaLabel:n("Product"),onChange:V,readOnly:G||c,options:[{label:G?n("Loading…"):n("None (write the cards yourself)"),value:""},{label:n("All products"),value:a},..._?[{label:n("{name} (unavailable)",{name:e.name}),value:e.slug}]:[],...M.map(t=>({label:t.name,value:t.slug}))]})}),e?.slug?d(ae,{status:J,statusText:K,onRefresh:q,busy:c,edit:l?void 0:{label:n("Edit product ✎"),onClick:z},hint:l?n("Pools every product’s grouped media: each one’s Relative / lifestyle photos feed Gallery A, its Product photos Gallery B and its Others the Others gallery. Every media group becomes a card, attributed to its own product (title, link and tag). Narrow the set with the Category filter above. Headings, intro copy and stats stay yours."):n("Gallery A comes from the product’s Relative / lifestyle photos, Gallery B from its Product photos and the Others gallery from its Others — edit those in the product’s Media tab and refresh. Each media group is a card: its name is the eyebrow, its finish the meta line; the card’s title is the product name and its tag the category. Headings, intro copy and stats stay yours.")}):d("p",{className:"es-field-hint sf-hint-keep",style:{marginTop:7},children:n("Pick a product — or All products — to build the galleries from media groups, or keep “None” to author the cards yourself.")})]})}export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as r,Fragment as G}from"react/jsx-runtime";import{useCallback as L,useEffect as X,useRef as le,useState as E}from"react";import{ApiError as Te,storefrontAdmin as A}from"../../render/lib/api/index.js";import{requestMediaPick as Ee}from"efficient-easel/screen/lib/media-picker";import{refreshSiteLiveState as Ae}from"efficient-web-builder/editor/lib/site-live-state";import{useEaselHost as fe}from"efficient-easel/screen/lib/host";import{onHeaderMenusChanged as Pe}from"efficient-web-builder/format/lib/editor-events";import{loadAllSitesMenus as Oe,refreshAllSitesMenus as Me}from"../../render/lib/menu-source.js";import{headerMenuMissingWarning as Re}from"../../render/lib/content/menu-placeholder.js";import{say as l,sayCount as De}from"efficient-web-builder/format/lib/editor-words";import{sayWith as ne}from"../lib/say-with.js";import{NEUTRAL_SITE_NAME as ze}from"../../render/lib/content/site.js";import{WIDTH_CHOICE_LABEL as ge}from"efficient-web-builder/format/lib/content/section-width";import{usePreviewHeader as Be}from"efficient-web-builder/render/components/PreviewHeaderContext";import{HEADER_LOGO_PX as be,HEADER_LOGO_PX_MIN as Ge,HEADER_LOGO_PX_MAX as Ie}from"efficient-web-builder/render/components/Logo";import{HEADER_HEIGHT_PX as $,HEADER_MENU_GAP_PX as V}from"efficient-web-builder/render/lib/puck/header-clearance";import Fe from"efficient-web-builder/editor/components/SectionThemePicker";import{HEADER_THEME_FOLLOW as xe}from"../../render/lib/content/header-theme.js";import{resolveHeaderInkMode as We}from"efficient-web-builder/render/lib/puck/header-ink";import{absolutizeApiUrl as Ue}from"efficient-web-builder/render/lib/media";import{loadHeaderSettings as je,primeHeaderSettings as Xe,clearHeaderSettingsCache as Ve,toPreviewHeaderSettings as Ke}from"../lib/header-settings-source.js";import{Banner as qe,Button as ae,Drawer as Ye,InputNumber as $e,LoadingSpinner as Ze,MediaUploadField as Je,ShowWhen as K,Slider as Qe,Tabs as et,tabButtonId as tt,tabPanelId as lt}from"efficient-shell/ui";import{CountryShowAsTiles as nt}from"./CountryShowAsTiles.js";import{truthy as at,visibleFields as ot}from"efficient-web-builder/render/lib/puck/show-when";const it={field:"country_selector_enabled",is:!0},oe={not:{context:"placeholderMode",is:!0}},st={field:"menu_position",is:"beside"},rt={all:[{field:"logo_position",is:"center"},{not:{field:"menu_position",is:"center"}}]},ct={all:[oe,at("country_selector_enabled")]};import{SettingsDefaultReset as ie,SettingsSwitch as q}from"efficient-easel/panel";import{FieldSelect as se}from"efficient-easel/fields";import{useEaselStrings as dt}from"efficient-easel/strings";import{ListIcon as ut,LogoIcon as ht,SettingsIcon as mt,StylesIcon as pt}from"efficient-easel/icons";import{GroupLabel as ft,Segmented as P}from"efficient-web-builder/editor/lib/puck/controls";import{HintsToggle as re,SHOW_HINTS_DEFAULT as gt}from"efficient-web-builder/editor/components/WebsiteSettingsPanel";const ce="sf-header",_e="sf-header-size-label",ve="sf-header-gap-label",we="sf-header-height-label",Se=[{id:"logo",label:"Logo",icon:e(ht,{})},{id:"menu",label:"Menu",icon:e(ut,{}),showWhen:oe},{id:"tools",label:"Tools",icon:e(mt,{})},{id:"look",label:"Look",icon:e(pt,{})}];function bt({tokenRef:a,siteId:o,onClose:b,onAuthExpired:_,inline:O,placeholderMode:y,websiteName:v,onOpenWebsiteSettings:C}){const m=fe(),M=dt(),[n,x]=E(null),[R,w]=E(null),[D,Y]=E(!1),[d,k]=E(Se[0].id),[u,T]=E(gt),F=n,Z={placeholderMode:y},J=Object.values(ot(Object.fromEntries(Se.map(t=>[t.id,t])),F,Z)),z=J.find(t=>t.id===d)??J[0],[ye,Ce]=E(0),{setSettings:ue}=Be(),W=le(null),U=le(null),j=le(null);X(()=>{let t=!1,s=null,h=null;const c=3,H=(I,B=0)=>{t||w(null),je(I,o,B>0).then(He=>!t&&x(He)).catch(()=>{t||(B+1<c?h=setTimeout(()=>H(I,B+1),600*(B+1)):w(l("Could not load header settings.")))})},pe=a.current;if(pe)H(pe);else{let I=0;s=setInterval(()=>{const B=a.current;if(B){s&&clearInterval(s),s=null,t||w(null),H(B);return}I+=250,I===5e3&&!t&&w(l("Waiting for editor authorization…")),I>=3e4&&(s&&clearInterval(s),s=null,t||w(l("Not authorized yet — reopen once the editor has loaded.")))},250)}return()=>{t=!0,s&&clearInterval(s),h&&clearTimeout(h)}},[a,ye,o]),X(()=>{n&&ue(Ke(n))},[n,ue]),X(()=>()=>{W.current&&clearTimeout(W.current),U.current&&clearTimeout(U.current),j.current&&clearTimeout(j.current)},[]);const g=L(async(t,s)=>{const h=a.current;if(!h||!n)return;const c=n;s&&x({...n,...s}),Y(!0),w(null);try{const H=await t(h);x(H),Xe(H,o),Ae()}catch(H){x(c),H instanceof Te&&H.status===401?(Ve(o),_?.(),w(l("Authorization expired — try again in a moment."))):w(l("Could not save. Please retry."))}finally{Y(!1)}},[n,a,_,o]),p=L(t=>g(s=>A.updateHeaderSettings(t,s,o??void 0),t),[g,o]),he=L(t=>{g(s=>A.setHeaderLogoFromAsset(t,s,o??void 0))},[g,o]),Le=L(()=>{Ee(m,{accept:"image/svg+xml",title:l("Logo (SVG)")}).then(t=>{t&&he(t.id)})},[he]),Q=L((t,s=!0)=>{x(c=>c&&{...c,logo_size_px:t}),W.current&&clearTimeout(W.current);const h=()=>{g(c=>A.updateHeaderSettings({logo_size_px:t},c,o??void 0))};s?h():W.current=setTimeout(h,400)},[g,o]),ee=L((t,s=!0)=>{x(c=>c&&{...c,height_px:t}),U.current&&clearTimeout(U.current);const h=()=>{g(c=>A.updateHeaderSettings({height_px:t},c,o??void 0))};s?h():U.current=setTimeout(h,400)},[g,o]),te=L((t,s=!0)=>{x(c=>c&&{...c,menu_gap_px:t}),j.current&&clearTimeout(j.current);const h=()=>{g(c=>A.updateHeaderSettings({menu_gap_px:t},c,o??void 0))};s?h():j.current=setTimeout(h,400)},[g,o]),Ne=L(()=>{g(async t=>{const s=await A.clearHeaderLogo(t,o??void 0);return s.reverse_logo?A.updateHeaderSettings({reverse_logo:!1},t,o??void 0):s})},[g,o]),ke=L(t=>{x(s=>s&&{...s,menu:t?.id??null,menu_handle:t?.handle??null,menu_name:t?.name??null,menu_items:t?t.items.map(h=>({label:h.label,url:h.url,dropdown_menu:h.dropdown_menu??null,dropdown_items:h.dropdown_items??[]})):[]}),g(s=>A.updateHeaderSettings({menu:t?.id??null},s,o??void 0))},[g,o]),me=r(G,{children:[R&&e(qe,{tone:"danger",className:"mx-4 mt-3",action:n?void 0:e(ae,{variant:"secondary",size:"sm",onClick:()=>Ce(t=>t+1),children:l("Retry")}),children:R}),n?r(G,{children:[e(Tt,{tabs:J,activeId:z.id,onSelect:k}),r("div",{id:lt(ce,z.id),role:"tabpanel","aria-labelledby":tt(ce,z.id),className:"flex flex-col p-4 [&>*+*]:mt-3",children:[z.id==="logo"&&r(G,{children:[e(S,{label:"Image"}),e(K,{rule:oe,values:F,context:Z,children:e(xt,{settings:n,websiteName:v,onPick:Le,onClear:Ne,showHint:u})}),e(f,{label:"Reverse the Logo",children:e(q,{checked:n.reverse_logo,onChange:t=>p({reverse_logo:t}),ariaLabel:l("Reverse the Logo")})}),e(N,{shown:u,children:l("Keeps the logo readable on any header — flips just its black & white parts to contrast the bar behind it (in both light and dark themes). Any other colors are kept as-is.")}),e(S,{label:"Placement"}),e(vt,{label:i.logoPosition.label,value:i.logoPosition.options.find(t=>t.value===i.logoPosition.choose(n.logo_position))?.label,children:e(P,{value:i.logoPosition.choose(n.logo_position),options:i.logoPosition.options,onChange:t=>p({logo_position:t}),ariaLabel:i.logoPosition.label})}),r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{id:_e,className:"text-xs text-[var(--ink-muted)]",children:l("Size")}),r("span",{className:"flex items-center gap-1",children:[r("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":n.logo_size_px!=null||void 0,children:[n.logo_size_px??be[n.logo_size],"px"]}),e(ie,{label:l("Size"),words:M.panel,changed:n.logo_size_px!=null,onReset:()=>Q(null)})]})]}),e(de,{labelledBy:_e,min:Ge,max:Ie,step:2,value:n.logo_size_px??be[n.logo_size],onPreview:t=>Q(t,!1),onCommit:t=>Q(t,!0)}),e(N,{shown:u,children:l("Sets the logo’s height; the width follows the logo’s own proportions.")})]}),e(re,{shown:u,onChange:T})]}),z.id==="menu"&&r(G,{children:[e(S,{label:"Links"}),e(_t,{token:a.current,menuId:n.menu,menuName:n.menu_name,itemCount:n.menu_items?.length??0,onPick:ke}),e(f,{label:i.menuAlign.label,children:e(P,{value:i.menuAlign.choose(n.menu_position),options:i.menuAlign.options.filter(t=>t.value!=="beside"||n.logo_position!=="center"),onChange:t=>p({menu_position:t}),ariaLabel:i.menuAlign.label})}),e(K,{rule:st,values:F,children:r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{id:ve,className:"text-xs text-[var(--ink-muted)]",children:l("Space from the logo")}),r("span",{className:"flex items-center gap-1",children:[r("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":n.menu_gap_px!=null||void 0,children:[n.menu_gap_px??V.default,"px"]}),e(ie,{label:l("Space from the logo"),words:M.panel,changed:n.menu_gap_px!=null,onReset:()=>te(null)})]})]}),e(de,{labelledBy:ve,min:V.min,max:V.max,step:V.step,value:n.menu_gap_px??V.default,onPreview:t=>te(t,!1),onCommit:t=>te(t,!0)}),e(N,{shown:u,children:l("How much room the menu leaves the logo. Only the logo moves away; the space between the menu words stays as it is.")})]})}),e(f,{label:i.menuRow.label,children:e(P,{value:i.menuRow.choose(n.menu_row),options:i.menuRow.options,onChange:t=>p({menu_row:t}),ariaLabel:i.menuRow.label})}),e(K,{rule:rt,values:F,children:e(f,{label:"Left items",children:e("div",{className:"w-16",children:e(se,{value:n.menu_split??3,ariaLabel:l("Left items"),onChange:t=>p({menu_split:t}),options:[1,2,3,4].map(t=>({label:String(t),value:t}))})})})}),e(f,{label:i.navTextCase.label,children:e(P,{value:i.navTextCase.choose(n.nav_text_case),options:i.navTextCase.options,onChange:t=>p({nav_text_case:t}),ariaLabel:i.navTextCase.label})}),e(N,{shown:u,children:ne(l("{uppercase} draws SEARCH and BAG; {capitalised} draws Search and Bag. It covers the menu links and the Tools words together, and it leaves a name like FusionForge exactly as you typed it."),{uppercase:e("strong",{children:l("Uppercase")}),capitalised:e("strong",{children:l("Capitalised")})})})]}),z.id==="tools"&&r(G,{children:[e(S,{label:"Style"}),e(f,{label:i.utilStyle.label,children:e(P,{value:i.utilStyle.choose(n.util_style),options:i.utilStyle.options,onChange:t=>p({util_style:t}),ariaLabel:i.utilStyle.label})}),e(N,{shown:u,children:ne(l("{text} draws the words — Search, Account, Bag — instead of the little pictures. It changes how they look, not whether they are shown: that stays with the switches below."),{text:e("strong",{children:l("Text")})})}),e(S,{label:"Search"}),e(f,{label:"Search",children:e(q,{checked:n.search_enabled,onChange:t=>p({search_enabled:t}),ariaLabel:l("Search")})}),e(f,{label:i.searchPosition.label,children:e(P,{value:i.searchPosition.choose(n.search_position),options:i.searchPosition.options,onChange:t=>p({search_position:t}),ariaLabel:i.searchPosition.label})}),e(S,{label:"Country selector"}),e(f,{label:"Show selector",children:e(q,{checked:n.country_selector_enabled,onChange:t=>p({country_selector_enabled:t}),ariaLabel:l("Show selector")})}),e(K,{rule:it,values:{country_selector_enabled:n.country_selector_enabled},children:e(f,{label:"Show as",stacked:!0,children:e(nt,{value:n.country_selector_show_as,onChange:t=>p({country_selector_show_as:t})})})}),e(K,{rule:ct,values:F,context:Z,children:e(N,{shown:u,children:ne(l("Which countries this website serves — and each region's own URL — is set in the admin console under {place}. Whether the picker is SHOWN stays here: that is header chrome, but the served-country list has tax consequences and belongs with commerce configuration."),{place:e("strong",{children:l("Storefront › Settings › Regions & currencies")})})})}),e(S,{label:"Account and cart"}),e(f,{label:"Account",children:e(q,{checked:n.account_enabled??!0,onChange:t=>p({account_enabled:t}),ariaLabel:l("Account")})}),e(f,{label:"Cart",children:e(q,{checked:n.cart_enabled??!0,onChange:t=>p({cart_enabled:t}),ariaLabel:l("Cart")})}),e(re,{shown:u,onChange:T})]}),z.id==="look"&&r(G,{children:[e(S,{label:"Dimensions"}),e(f,{label:i.width.label,children:e(P,{value:i.width.choose(n.width),options:i.width.options,onChange:t=>p({width:t}),ariaLabel:i.width.label})}),r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{id:we,className:"text-xs text-[var(--ink-muted)]",children:l("Height")}),r("span",{className:"flex items-center gap-1",children:[r("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":n.height_px!=null||void 0,children:[n.height_px??$.default,"px"]}),e(ie,{label:l("Height"),words:M.panel,changed:n.height_px!=null,onReset:()=>ee(null)})]})]}),e(de,{labelledBy:we,min:$.min,max:$.max,step:2,value:n.height_px??$.default,onPreview:t=>ee(t,!1),onCommit:t=>ee(t,!0)}),e(N,{shown:u,children:l("Sets how tall the header bar is; the content below it shifts down to match.")})]}),e(f,{label:"Border thickness",children:e("div",{className:"w-24",children:e($e,{value:n.border_thickness,min:0,max:20,precision:0,size:"sm",suffix:"px","aria-label":l("Border thickness"),onChange:t=>p({border_thickness:Math.max(0,t??0)})})})}),e(S,{label:"Color"}),e(f,{label:"Theme",children:e(Fe,{value:n.theme??xe,onChange:t=>p({theme:t===xe?null:t}),followLabel:l("Follow the site theme")})}),e(N,{shown:u,children:l("The color the bar paints once it is solid — after any scroll, and on every product page from the first paint. Follow the site theme keeps it on whatever palette the site is on.")}),e(f,{label:i.topTextColor.label,children:e(P,{value:i.topTextColor.choose(n.top_text_color),options:i.topTextColor.options,onChange:t=>p({top_text_color:t}),ariaLabel:i.topTextColor.label})}),e(N,{shown:u,children:l("Auto reads what the first section on each page says it is — dark, light or accent — and picks the text that can be read on it. Set Light or Dark to decide it yourself when Auto reads a page wrong.")}),e(S,{label:"Behavior"}),e(f,{label:"Sticky header",children:e("div",{className:"w-32",children:e(se,{value:n.sticky,ariaLabel:l("Sticky header"),onChange:t=>p({sticky:t}),options:[{label:l("None"),value:"none"},{label:l("Always"),value:"always"},{label:l("On scroll up"),value:"on_scroll_up"}]})})}),C&&r(G,{children:[e(S,{label:"Display mode"}),e("p",{className:"text-[12px] text-[var(--ink-faint)]",children:l("Set the default Light / Dark / Auto mode and show or hide the light↔dark switch in Appearance.")}),e(ae,{variant:"link",size:"sm",className:"self-start",onClick:C,children:l("Set up display mode →")})]}),e(re,{shown:u,onChange:T})]})]})]}):R?null:e(Ze,{size:"sm",padding:"p-4",label:l("Loading…")})]});return O?r("div",{className:"flex flex-col",children:[D&&e("div",{className:"px-4 pt-2 text-[11px] text-[var(--ink-faintest)]",children:l("Saving…")}),me]}):r(Ye,{open:!0,onClose:b??(()=>{}),side:"right",size:"sm",title:l("Header"),children:[D&&e("div",{className:"pb-2 text-[11px] text-[var(--ink-faintest)]",children:l("Saving…")}),me]})}function xt({settings:a,websiteName:o,onPick:b,onClear:_,showHint:O}){const y=!!a.logo_url,v=!y&&!!a.default_logo_url,C=Ue(a.effective_logo_url),m=o&&o.trim()?o.trim():ze;return r("div",{className:"flex flex-col gap-2",children:[e(Je,{value:C||"",onChange:M=>{M||_()},onPick:b,accept:"image/svg+xml,.svg",acceptHint:"SVG",fit:"contain",height:80,placeholder:l("No logo — “{name}” wordmark shown",{name:m}),replaceLabel:y?l("Replace SVG logo"):l("Upload SVG logo"),allowRemove:y,removeLabel:l("Use company default")}),e(N,{shown:O,children:y?l("Custom SVG logo uploaded for this store."):v?l("Using your company logo from the database."):l("No company logo on file — upload an SVG or the wordmark is used.")})]})}function _t({token:a,menuId:o,menuName:b,itemCount:_,onPick:O}){const y=fe(),[v,C]=E(null),[m,M]=E(!1),n=L(d=>{C(d),M(!0)},[]);X(()=>{let d=!1;return Oe(a).then(k=>!d&&n(k)).catch(()=>!d&&C([])),()=>{d=!0}},[a,n]),X(()=>{let d=!1;const k=Pe(()=>{Me(a).then(u=>!d&&n(u)).catch(()=>{})});return()=>{d=!0,k()}},[a,n]);const x=v===null,R=!x&&(v?.length??0)===0,w=!x&&(v??[]).some(d=>d.id===o),D=w?o:"",Y=m&&!!o&&!w;return r("div",{className:"flex flex-col gap-2",children:[e(f,{label:"Menu",children:e("div",{className:"w-[170px] max-w-full",children:e(se,{value:D,ariaLabel:l("Menu"),readOnly:x||R,onChange:d=>{const k=d?(v??[]).find(u=>u.id===d):null;O(k?{...k,items:k.items.map(u=>({...u,dropdown_items:(v??[]).find(T=>T.id===u.dropdown_menu)?.items.map(T=>({label:T.label,url:T.url}))??[]}))}:null)},options:[{label:x?l("Loading…"):R?l("No menus"):l("Default links"),value:""},...(v??[]).map(d=>({label:`${d.name} (${d.item_count??d.items.length})`,value:d.id}))]})})}),Y?e("p",{className:"text-[12px] text-[var(--sf-warning,#b45309)]",children:Re()}):e("p",{className:"text-[12px] text-[var(--ink-faint)]",children:D?De("Header shows “{name}” — {n} link.","Header shows “{name}” — {n} links.",_,{name:b??l("the linked menu")}):R?l("No menus yet. Create one in {place}, then pick it here.",{place:l("Storefront → Menus")}):l("Pick a menu to drive the header links, or keep the built-in default links.")}),e(ae,{variant:"link",size:"sm",className:"self-start",onClick:()=>y.send("storefront-editor:open-menus",{menuId:D||null}),children:D?l("Edit menu →"):l("Manage menus →")})]})}function N({shown:a,children:o}){return a?e("p",{className:"text-[11px] text-[var(--sf-muted)]",children:o}):null}function de({labelledBy:a,value:o,min:b,max:_,step:O,onPreview:y,onCommit:v}){const C=m=>{m instanceof HTMLInputElement&&m.type==="range"&&v(Number(m.value))};return e("div",{onPointerUp:m=>C(m.target),onKeyUp:m=>{/^(Arrow|Home|End|Page)/.test(m.key)&&C(m.target)},children:e(Qe,{value:o,min:b,max:_,step:O,showInput:!1,size:"sm","aria-labelledby":a,valueText:m=>l("{n} pixels",{n:m}),onChange:m=>{m!=null&&y(m)}})})}function vt({label:a,value:o,children:b}){return r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{className:"text-xs text-[var(--ink-muted)]",children:l(a)}),o&&e("span",{className:"text-[12px] text-[var(--ink-faint)]",children:l(o)})]}),b]})}function S({label:a}){return e(ft,{label:a})}function f({label:a,children:o,stacked:b=!1}){return b?r("div",{className:"flex flex-col gap-y-2",children:[e("span",{className:"text-xs text-[var(--sf-text-secondary)]",children:l(a)}),o]}):r("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-2",children:[e("span",{className:"text-xs text-[var(--sf-text-secondary)]",children:l(a)}),e("div",{className:"flex-shrink-0",children:o})]})}const wt=[{label:"Left",value:"left"},{label:"Center",value:"center"}],St=[{label:"Left",value:"left"},{label:"Right",value:"right"}],yt=[{label:"Right",value:"left"},{label:"Centered",value:"center"},{label:"Beside logo",value:"beside"}],Ct=[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],Lt=[{label:ge.page,value:"page"},{label:ge.full,value:"full"}],Nt=[{label:"Icon",value:"icon"},{label:"Text",value:"text"}],kt=[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],Ht=[{label:"Auto",value:"auto"},{label:"Light",value:"light"},{label:"Dark",value:"dark"}],i={logoPosition:{label:"Position",options:wt,choose:a=>a==="right"?"center":a},menuAlign:{label:"Alignment",options:yt,choose:a=>a==="center"?"center":a==="beside"?"beside":"left"},menuRow:{label:"Row",options:Ct,choose:a=>a==="inline"?"inline":"top"},searchPosition:{label:"Position",options:St,choose:a=>a},width:{label:"Width",options:Lt,choose:a=>a},navTextCase:{label:"Letters",options:kt,choose:a=>a==="capitalised"?"capitalised":"uppercase"},utilStyle:{label:"Show as",options:Nt,choose:a=>a==="text"?"text":"icon"},topTextColor:{label:"Text color at the top",options:Ht,choose:a=>We(a)}};function Tt({tabs:a,activeId:o,onSelect:b}){return e("div",{className:"es-insp-tabs",children:e(et,{variant:"underline",block:!0,labelsFit:!0,"aria-label":l("Header settings"),idPrefix:ce,value:o,onChange:b,items:a.map(_=>({id:_.id,icon:_.icon,label:l(_.label)}))})})}export{f as Field,i as HEADER_SEGMENTED,Se as HEADER_TABS,ce as HEADER_TABS_ID_PREFIX,Tt as HeaderTabStrip,oe as OFF_PLACEHOLDER,bt as default};
|
|
1
|
+
"use client";import{jsx as e,jsxs as r,Fragment as G}from"react/jsx-runtime";import{useCallback as L,useEffect as X,useRef as le,useState as E}from"react";import{ApiError as Te,storefrontAdmin as A}from"../../render/lib/api/index.js";import{requestMediaPick as Ee}from"efficient-easel/screen/lib/media-picker";import{refreshSiteLiveState as Ae}from"efficient-web-builder/editor/lib/site-live-state";import{useEaselHost as fe}from"efficient-easel/screen/lib/host";import{onHeaderMenusChanged as Pe}from"efficient-web-builder/format/lib/editor-events";import{loadAllSitesMenus as Oe,refreshAllSitesMenus as Me}from"../../render/lib/menu-source.js";import{headerMenuMissingWarning as Re}from"../../render/lib/content/menu-placeholder.js";import{say as l,sayCount as De}from"efficient-web-builder/format/lib/editor-words";import{sayWith as ne}from"../lib/say-with.js";import{NEUTRAL_SITE_NAME as ze}from"../../render/lib/content/site.js";import{WIDTH_CHOICE_LABEL as ge}from"efficient-web-builder/format/lib/content/section-width";import{usePreviewHeader as Be}from"efficient-web-builder/render/components/PreviewHeaderContext";import{HEADER_LOGO_PX as be,HEADER_LOGO_PX_MIN as Ge,HEADER_LOGO_PX_MAX as Ie}from"efficient-web-builder/render/components/Logo";import{HEADER_HEIGHT_PX as $,HEADER_MENU_GAP_PX as V}from"efficient-web-builder/render/lib/puck/header-clearance";import Fe from"efficient-web-builder/editor/components/SectionThemePicker";import{HEADER_THEME_FOLLOW as xe}from"../../render/lib/content/header-theme.js";import{resolveHeaderInkMode as We}from"efficient-web-builder/render/lib/puck/header-ink";import{absolutizeApiUrl as Ue}from"efficient-web-builder/render/lib/media";import{loadHeaderSettings as je,primeHeaderSettings as Xe,clearHeaderSettingsCache as Ve,toPreviewHeaderSettings as Ke}from"../lib/header-settings-source.js";import{Banner as qe,Button as ae,Drawer as Ye,InputNumber as $e,LoadingSpinner as Ze,MediaUploadField as Je,ShowWhen as K,Slider as Qe,Tabs as et,tabButtonId as tt,tabPanelId as lt}from"efficient-shell/ui";import{CountryShowAsTiles as nt}from"./CountryShowAsTiles.js";import{truthy as at,visibleFields as ot}from"efficient-web-builder/render/lib/puck/show-when";const it={field:"country_selector_enabled",is:!0},oe={not:{context:"placeholderMode",is:!0}},st={field:"menu_position",is:"beside"},rt={all:[{field:"logo_position",is:"center"},{not:{field:"menu_position",is:"center"}}]},ct={all:[oe,at("country_selector_enabled")]};import{SettingsDefaultReset as ie,SettingsSwitch as q}from"efficient-easel/panel";import{FieldSelect as se}from"efficient-easel/fields";import{useEaselStrings as dt}from"efficient-easel/strings";import{ListIcon as ut,LogoIcon as ht,SettingsIcon as mt,StylesIcon as pt}from"efficient-easel/icons";import{GroupLabel as ft,Segmented as P}from"efficient-web-builder/editor/lib/puck/controls";import{HintsToggle as re,SHOW_HINTS_DEFAULT as gt}from"efficient-web-builder/editor/components/WebsiteSettingsPanel";const ce="sf-header",_e="sf-header-size-label",ve="sf-header-gap-label",we="sf-header-height-label",Se=[{id:"logo",label:"Logo",icon:e(ht,{})},{id:"menu",label:"Menu",icon:e(ut,{}),showWhen:oe},{id:"tools",label:"Tools",icon:e(mt,{})},{id:"look",label:"Look",icon:e(pt,{})}];function bt({tokenRef:a,siteId:o,onClose:b,onAuthExpired:_,inline:O,placeholderMode:y,websiteName:v,onOpenWebsiteSettings:C}){const m=fe(),M=dt(),[n,x]=E(null),[R,w]=E(null),[D,Y]=E(!1),[d,k]=E(Se[0].id),[u,T]=E(gt),F=n,Z={placeholderMode:y},J=Object.values(ot(Object.fromEntries(Se.map(t=>[t.id,t])),F,Z)),z=J.find(t=>t.id===d)??J[0],[ye,Ce]=E(0),{setSettings:ue}=Be(),W=le(null),U=le(null),j=le(null);X(()=>{let t=!1,s=null,h=null;const c=3,H=(I,B=0)=>{t||w(null),je(I,o,B>0).then(He=>!t&&x(He)).catch(()=>{t||(B+1<c?h=setTimeout(()=>H(I,B+1),600*(B+1)):w(l("Could not load header settings.")))})},pe=a.current;if(pe)H(pe);else{let I=0;s=setInterval(()=>{const B=a.current;if(B){s&&clearInterval(s),s=null,t||w(null),H(B);return}I+=250,I===5e3&&!t&&w(l("Waiting for editor authorization…")),I>=3e4&&(s&&clearInterval(s),s=null,t||w(l("Not authorized yet — reopen once the editor has loaded.")))},250)}return()=>{t=!0,s&&clearInterval(s),h&&clearTimeout(h)}},[a,ye,o]),X(()=>{n&&ue(Ke(n))},[n,ue]),X(()=>()=>{W.current&&clearTimeout(W.current),U.current&&clearTimeout(U.current),j.current&&clearTimeout(j.current)},[]);const g=L(async(t,s)=>{const h=a.current;if(!h||!n)return;const c=n;s&&x({...n,...s}),Y(!0),w(null);try{const H=await t(h);x(H),Xe(H,o),Ae()}catch(H){x(c),H instanceof Te&&H.status===401?(Ve(o),_?.(),w(l("Authorization expired — try again in a moment."))):w(l("Could not save. Please retry."))}finally{Y(!1)}},[n,a,_,o]),p=L(t=>g(s=>A.updateHeaderSettings(t,s,o??void 0),t),[g,o]),he=L(t=>{g(s=>A.setHeaderLogoFromAsset(t,s,o??void 0))},[g,o]),Le=L(()=>{Ee(m,{accept:"image/svg+xml",title:l("Logo (SVG)")}).then(t=>{t&&he(t.id)})},[he]),Q=L((t,s=!0)=>{x(c=>c&&{...c,logo_size_px:t}),W.current&&clearTimeout(W.current);const h=()=>{g(c=>A.updateHeaderSettings({logo_size_px:t},c,o??void 0))};s?h():W.current=setTimeout(h,400)},[g,o]),ee=L((t,s=!0)=>{x(c=>c&&{...c,height_px:t}),U.current&&clearTimeout(U.current);const h=()=>{g(c=>A.updateHeaderSettings({height_px:t},c,o??void 0))};s?h():U.current=setTimeout(h,400)},[g,o]),te=L((t,s=!0)=>{x(c=>c&&{...c,menu_gap_px:t}),j.current&&clearTimeout(j.current);const h=()=>{g(c=>A.updateHeaderSettings({menu_gap_px:t},c,o??void 0))};s?h():j.current=setTimeout(h,400)},[g,o]),Ne=L(()=>{g(async t=>{const s=await A.clearHeaderLogo(t,o??void 0);return s.reverse_logo?A.updateHeaderSettings({reverse_logo:!1},t,o??void 0):s})},[g,o]),ke=L(t=>{x(s=>s&&{...s,menu:t?.id??null,menu_handle:t?.handle??null,menu_name:t?.name??null,menu_items:t?t.items.map(h=>({label:h.label,url:h.url,dropdown_menu:h.dropdown_menu??null,dropdown_items:h.dropdown_items??[]})):[]}),g(s=>A.updateHeaderSettings({menu:t?.id??null},s,o??void 0))},[g,o]),me=r(G,{children:[R&&e(qe,{tone:"danger",className:"mx-4 mt-3",action:n?void 0:e(ae,{variant:"secondary",size:"md",onClick:()=>Ce(t=>t+1),children:l("Retry")}),children:R}),n?r(G,{children:[e(Tt,{tabs:J,activeId:z.id,onSelect:k}),r("div",{id:lt(ce,z.id),role:"tabpanel","aria-labelledby":tt(ce,z.id),className:"flex flex-col p-4 [&>*+*]:mt-3",children:[z.id==="logo"&&r(G,{children:[e(S,{label:"Image"}),e(K,{rule:oe,values:F,context:Z,children:e(xt,{settings:n,websiteName:v,onPick:Le,onClear:Ne,showHint:u})}),e(f,{label:"Reverse the Logo",children:e(q,{checked:n.reverse_logo,onChange:t=>p({reverse_logo:t}),ariaLabel:l("Reverse the Logo")})}),e(N,{shown:u,children:l("Keeps the logo readable on any header — flips just its black & white parts to contrast the bar behind it (in both light and dark themes). Any other colors are kept as-is.")}),e(S,{label:"Placement"}),e(vt,{label:i.logoPosition.label,value:i.logoPosition.options.find(t=>t.value===i.logoPosition.choose(n.logo_position))?.label,children:e(P,{value:i.logoPosition.choose(n.logo_position),options:i.logoPosition.options,onChange:t=>p({logo_position:t}),ariaLabel:i.logoPosition.label})}),r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{id:_e,className:"text-xs text-[var(--ink-muted)]",children:l("Size")}),r("span",{className:"flex items-center gap-1",children:[r("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":n.logo_size_px!=null||void 0,children:[n.logo_size_px??be[n.logo_size],"px"]}),e(ie,{label:l("Size"),words:M.panel,changed:n.logo_size_px!=null,onReset:()=>Q(null)})]})]}),e(de,{labelledBy:_e,min:Ge,max:Ie,step:2,value:n.logo_size_px??be[n.logo_size],onPreview:t=>Q(t,!1),onCommit:t=>Q(t,!0)}),e(N,{shown:u,children:l("Sets the logo’s height; the width follows the logo’s own proportions.")})]}),e(re,{shown:u,onChange:T})]}),z.id==="menu"&&r(G,{children:[e(S,{label:"Links"}),e(_t,{token:a.current,menuId:n.menu,menuName:n.menu_name,itemCount:n.menu_items?.length??0,onPick:ke}),e(f,{label:i.menuAlign.label,children:e(P,{value:i.menuAlign.choose(n.menu_position),options:i.menuAlign.options.filter(t=>t.value!=="beside"||n.logo_position!=="center"),onChange:t=>p({menu_position:t}),ariaLabel:i.menuAlign.label})}),e(K,{rule:st,values:F,children:r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{id:ve,className:"text-xs text-[var(--ink-muted)]",children:l("Space from the logo")}),r("span",{className:"flex items-center gap-1",children:[r("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":n.menu_gap_px!=null||void 0,children:[n.menu_gap_px??V.default,"px"]}),e(ie,{label:l("Space from the logo"),words:M.panel,changed:n.menu_gap_px!=null,onReset:()=>te(null)})]})]}),e(de,{labelledBy:ve,min:V.min,max:V.max,step:V.step,value:n.menu_gap_px??V.default,onPreview:t=>te(t,!1),onCommit:t=>te(t,!0)}),e(N,{shown:u,children:l("How much room the menu leaves the logo. Only the logo moves away; the space between the menu words stays as it is.")})]})}),e(f,{label:i.menuRow.label,children:e(P,{value:i.menuRow.choose(n.menu_row),options:i.menuRow.options,onChange:t=>p({menu_row:t}),ariaLabel:i.menuRow.label})}),e(K,{rule:rt,values:F,children:e(f,{label:"Left items",children:e("div",{className:"w-16",children:e(se,{value:n.menu_split??3,ariaLabel:l("Left items"),onChange:t=>p({menu_split:t}),options:[1,2,3,4].map(t=>({label:String(t),value:t}))})})})}),e(f,{label:i.navTextCase.label,children:e(P,{value:i.navTextCase.choose(n.nav_text_case),options:i.navTextCase.options,onChange:t=>p({nav_text_case:t}),ariaLabel:i.navTextCase.label})}),e(N,{shown:u,children:ne(l("{uppercase} draws SEARCH and BAG; {capitalised} draws Search and Bag. It covers the menu links and the Tools words together, and it leaves a name like FusionForge exactly as you typed it."),{uppercase:e("strong",{children:l("Uppercase")}),capitalised:e("strong",{children:l("Capitalised")})})})]}),z.id==="tools"&&r(G,{children:[e(S,{label:"Style"}),e(f,{label:i.utilStyle.label,children:e(P,{value:i.utilStyle.choose(n.util_style),options:i.utilStyle.options,onChange:t=>p({util_style:t}),ariaLabel:i.utilStyle.label})}),e(N,{shown:u,children:ne(l("{text} draws the words — Search, Account, Bag — instead of the little pictures. It changes how they look, not whether they are shown: that stays with the switches below."),{text:e("strong",{children:l("Text")})})}),e(S,{label:"Search"}),e(f,{label:"Search",children:e(q,{checked:n.search_enabled,onChange:t=>p({search_enabled:t}),ariaLabel:l("Search")})}),e(f,{label:i.searchPosition.label,children:e(P,{value:i.searchPosition.choose(n.search_position),options:i.searchPosition.options,onChange:t=>p({search_position:t}),ariaLabel:i.searchPosition.label})}),e(S,{label:"Country selector"}),e(f,{label:"Show selector",children:e(q,{checked:n.country_selector_enabled,onChange:t=>p({country_selector_enabled:t}),ariaLabel:l("Show selector")})}),e(K,{rule:it,values:{country_selector_enabled:n.country_selector_enabled},children:e(f,{label:"Show as",stacked:!0,children:e(nt,{value:n.country_selector_show_as,onChange:t=>p({country_selector_show_as:t})})})}),e(K,{rule:ct,values:F,context:Z,children:e(N,{shown:u,children:ne(l("Which countries this website serves — and each region's own URL — is set in the admin console under {place}. Whether the picker is SHOWN stays here: that is header chrome, but the served-country list has tax consequences and belongs with commerce configuration."),{place:e("strong",{children:l("Storefront › Settings › Regions & currencies")})})})}),e(S,{label:"Account and cart"}),e(f,{label:"Account",children:e(q,{checked:n.account_enabled??!0,onChange:t=>p({account_enabled:t}),ariaLabel:l("Account")})}),e(f,{label:"Cart",children:e(q,{checked:n.cart_enabled??!0,onChange:t=>p({cart_enabled:t}),ariaLabel:l("Cart")})}),e(re,{shown:u,onChange:T})]}),z.id==="look"&&r(G,{children:[e(S,{label:"Dimensions"}),e(f,{label:i.width.label,children:e(P,{value:i.width.choose(n.width),options:i.width.options,onChange:t=>p({width:t}),ariaLabel:i.width.label})}),r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{id:we,className:"text-xs text-[var(--ink-muted)]",children:l("Height")}),r("span",{className:"flex items-center gap-1",children:[r("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":n.height_px!=null||void 0,children:[n.height_px??$.default,"px"]}),e(ie,{label:l("Height"),words:M.panel,changed:n.height_px!=null,onReset:()=>ee(null)})]})]}),e(de,{labelledBy:we,min:$.min,max:$.max,step:2,value:n.height_px??$.default,onPreview:t=>ee(t,!1),onCommit:t=>ee(t,!0)}),e(N,{shown:u,children:l("Sets how tall the header bar is; the content below it shifts down to match.")})]}),e(f,{label:"Border thickness",children:e("div",{className:"w-24",children:e($e,{value:n.border_thickness,min:0,max:20,precision:0,size:"md",suffix:"px","aria-label":l("Border thickness"),onChange:t=>p({border_thickness:Math.max(0,t??0)})})})}),e(S,{label:"Color"}),e(f,{label:"Theme",children:e(Fe,{value:n.theme??xe,onChange:t=>p({theme:t===xe?null:t}),followLabel:l("Follow the site theme")})}),e(N,{shown:u,children:l("The color the bar paints once it is solid — after any scroll, and on every product page from the first paint. Follow the site theme keeps it on whatever palette the site is on.")}),e(f,{label:i.topTextColor.label,children:e(P,{value:i.topTextColor.choose(n.top_text_color),options:i.topTextColor.options,onChange:t=>p({top_text_color:t}),ariaLabel:i.topTextColor.label})}),e(N,{shown:u,children:l("Auto reads what the first section on each page says it is — dark, light or accent — and picks the text that can be read on it. Set Light or Dark to decide it yourself when Auto reads a page wrong.")}),e(S,{label:"Behavior"}),e(f,{label:"Sticky header",children:e("div",{className:"w-32",children:e(se,{value:n.sticky,ariaLabel:l("Sticky header"),onChange:t=>p({sticky:t}),options:[{label:l("None"),value:"none"},{label:l("Always"),value:"always"},{label:l("On scroll up"),value:"on_scroll_up"}]})})}),C&&r(G,{children:[e(S,{label:"Display mode"}),e("p",{className:"text-[12px] text-[var(--ink-faint)]",children:l("Set the default Light / Dark / Auto mode and show or hide the light↔dark switch in Appearance.")}),e(ae,{variant:"link",size:"sm",className:"self-start",onClick:C,children:l("Set up display mode →")})]}),e(re,{shown:u,onChange:T})]})]})]}):R?null:e(Ze,{size:"sm",padding:"p-4",label:l("Loading…")})]});return O?r("div",{className:"flex flex-col",children:[D&&e("div",{className:"px-4 pt-2 text-[11px] text-[var(--ink-faintest)]",children:l("Saving…")}),me]}):r(Ye,{open:!0,onClose:b??(()=>{}),side:"right",size:"sm",title:l("Header"),children:[D&&e("div",{className:"pb-2 text-[11px] text-[var(--ink-faintest)]",children:l("Saving…")}),me]})}function xt({settings:a,websiteName:o,onPick:b,onClear:_,showHint:O}){const y=!!a.logo_url,v=!y&&!!a.default_logo_url,C=Ue(a.effective_logo_url),m=o&&o.trim()?o.trim():ze;return r("div",{className:"flex flex-col gap-2",children:[e(Je,{value:C||"",onChange:M=>{M||_()},onPick:b,accept:"image/svg+xml,.svg",acceptHint:"SVG",fit:"contain",height:80,placeholder:l("No logo — “{name}” wordmark shown",{name:m}),replaceLabel:y?l("Replace SVG logo"):l("Upload SVG logo"),allowRemove:y,removeLabel:l("Use company default")}),e(N,{shown:O,children:y?l("Custom SVG logo uploaded for this store."):v?l("Using your company logo from the database."):l("No company logo on file — upload an SVG or the wordmark is used.")})]})}function _t({token:a,menuId:o,menuName:b,itemCount:_,onPick:O}){const y=fe(),[v,C]=E(null),[m,M]=E(!1),n=L(d=>{C(d),M(!0)},[]);X(()=>{let d=!1;return Oe(a).then(k=>!d&&n(k)).catch(()=>!d&&C([])),()=>{d=!0}},[a,n]),X(()=>{let d=!1;const k=Pe(()=>{Me(a).then(u=>!d&&n(u)).catch(()=>{})});return()=>{d=!0,k()}},[a,n]);const x=v===null,R=!x&&(v?.length??0)===0,w=!x&&(v??[]).some(d=>d.id===o),D=w?o:"",Y=m&&!!o&&!w;return r("div",{className:"flex flex-col gap-2",children:[e(f,{label:"Menu",children:e("div",{className:"w-[170px] max-w-full",children:e(se,{value:D,ariaLabel:l("Menu"),readOnly:x||R,onChange:d=>{const k=d?(v??[]).find(u=>u.id===d):null;O(k?{...k,items:k.items.map(u=>({...u,dropdown_items:(v??[]).find(T=>T.id===u.dropdown_menu)?.items.map(T=>({label:T.label,url:T.url}))??[]}))}:null)},options:[{label:x?l("Loading…"):R?l("No menus"):l("Default links"),value:""},...(v??[]).map(d=>({label:`${d.name} (${d.item_count??d.items.length})`,value:d.id}))]})})}),Y?e("p",{className:"text-[12px] text-[var(--sf-warning,#b45309)]",children:Re()}):e("p",{className:"text-[12px] text-[var(--ink-faint)]",children:D?De("Header shows “{name}” — {n} link.","Header shows “{name}” — {n} links.",_,{name:b??l("the linked menu")}):R?l("No menus yet. Create one in {place}, then pick it here.",{place:l("Storefront → Menus")}):l("Pick a menu to drive the header links, or keep the built-in default links.")}),e(ae,{variant:"link",size:"sm",className:"self-start",onClick:()=>y.send("storefront-editor:open-menus",{menuId:D||null}),children:D?l("Edit menu →"):l("Manage menus →")})]})}function N({shown:a,children:o}){return a?e("p",{className:"text-[11px] text-[var(--sf-muted)]",children:o}):null}function de({labelledBy:a,value:o,min:b,max:_,step:O,onPreview:y,onCommit:v}){const C=m=>{m instanceof HTMLInputElement&&m.type==="range"&&v(Number(m.value))};return e("div",{onPointerUp:m=>C(m.target),onKeyUp:m=>{/^(Arrow|Home|End|Page)/.test(m.key)&&C(m.target)},children:e(Qe,{value:o,min:b,max:_,step:O,showInput:!1,size:"sm","aria-labelledby":a,valueText:m=>l("{n} pixels",{n:m}),onChange:m=>{m!=null&&y(m)}})})}function vt({label:a,value:o,children:b}){return r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{className:"text-xs text-[var(--ink-muted)]",children:l(a)}),o&&e("span",{className:"text-[12px] text-[var(--ink-faint)]",children:l(o)})]}),b]})}function S({label:a}){return e(ft,{label:a})}function f({label:a,children:o,stacked:b=!1}){return b?r("div",{className:"flex flex-col gap-y-2",children:[e("span",{className:"text-xs text-[var(--sf-text-secondary)]",children:l(a)}),o]}):r("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-2",children:[e("span",{className:"text-xs text-[var(--sf-text-secondary)]",children:l(a)}),e("div",{className:"flex flex-shrink-0 grow justify-end",children:o})]})}const wt=[{label:"Left",value:"left"},{label:"Center",value:"center"}],St=[{label:"Left",value:"left"},{label:"Right",value:"right"}],yt=[{label:"Right",value:"left"},{label:"Centered",value:"center"},{label:"Beside logo",value:"beside"}],Ct=[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],Lt=[{label:ge.page,value:"page"},{label:ge.full,value:"full"}],Nt=[{label:"Icon",value:"icon"},{label:"Text",value:"text"}],kt=[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],Ht=[{label:"Auto",value:"auto"},{label:"Light",value:"light"},{label:"Dark",value:"dark"}],i={logoPosition:{label:"Position",options:wt,choose:a=>a==="right"?"center":a},menuAlign:{label:"Alignment",options:yt,choose:a=>a==="center"?"center":a==="beside"?"beside":"left"},menuRow:{label:"Row",options:Ct,choose:a=>a==="inline"?"inline":"top"},searchPosition:{label:"Position",options:St,choose:a=>a},width:{label:"Width",options:Lt,choose:a=>a},navTextCase:{label:"Letters",options:kt,choose:a=>a==="capitalised"?"capitalised":"uppercase"},utilStyle:{label:"Show as",options:Nt,choose:a=>a==="text"?"text":"icon"},topTextColor:{label:"Text color at the top",options:Ht,choose:a=>We(a)}};function Tt({tabs:a,activeId:o,onSelect:b}){return e("div",{className:"es-insp-tabs",children:e(et,{variant:"underline",block:!0,labelsFit:!0,"aria-label":l("Header settings"),idPrefix:ce,value:o,onChange:b,items:a.map(_=>({id:_.id,icon:_.icon,label:l(_.label)}))})})}export{f as Field,i as HEADER_SEGMENTED,Se as HEADER_TABS,ce as HEADER_TABS_ID_PREFIX,Tt as HeaderTabStrip,oe as OFF_PLACEHOLDER,bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as o,jsxs as c}from"react/jsx-runtime";import{Inline as u,InputNumber as l}from"efficient-shell/ui";import{SettingsField as h}from"efficient-easel/panel";import{ListIcon as d}from"efficient-easel/icons";import{say as n}from"efficient-web-builder/format/lib/editor-words";import{resolveMenuLinkRange as m}from"../../render/lib/content/menu-row.js";function g({value:a,onChange:p}){const i=m(a),r=i?.from??1,s=i?.to??null,t=(e,f)=>p(m({from:e??1,to:f??void 0}));return o(h,{label:n("Show links"),icon:o(d,{}),changed:i!==null,hint:n("The links this menu shows on a computer. Empty To means to the end."),children:c(u,{gap:2,wrap:!1,children:[o(l,{size:"
|
|
1
|
+
"use client";import{jsx as o,jsxs as c}from"react/jsx-runtime";import{Inline as u,InputNumber as l}from"efficient-shell/ui";import{SettingsField as h}from"efficient-easel/panel";import{ListIcon as d}from"efficient-easel/icons";import{say as n}from"efficient-web-builder/format/lib/editor-words";import{resolveMenuLinkRange as m}from"../../render/lib/content/menu-row.js";function g({value:a,onChange:p}){const i=m(a),r=i?.from??1,s=i?.to??null,t=(e,f)=>p(m({from:e??1,to:f??void 0}));return o(h,{label:n("Show links"),icon:o(d,{}),changed:i!==null,hint:n("The links this menu shows on a computer. Empty To means to the end."),children:c(u,{gap:2,wrap:!1,children:[o(l,{size:"md",prefix:n("From"),min:1,precision:0,value:r,"aria-label":n("Show links from"),onChange:e=>t(e,s)}),o(l,{size:"md",prefix:n("To"),min:1,precision:0,placeholder:n("End"),value:s,"aria-label":n("Show links to"),onChange:e=>t(r,e)})]})})}export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as d,Fragment as v}from"react/jsx-runtime";import{IconButton as u}from"efficient-shell/ui";import{SettingsField as x}from"efficient-easel/panel";import{ColumnsIcon as g}from"efficient-easel/icons";import{usePreviewDevice as b}from"efficient-easel/screen/components/PreviewDeviceContext";import{VIEW_TIER_LABEL as f}from"efficient-easel/screen/lib/content/view-tiers";import{say as i}from"efficient-web-builder/format/lib/editor-words";import{sayWith as F}from"../lib/say-with.js";function _(r,t,e,a){const s=e.indexOf(r[t]),l=s>=0?s:0,c=e[Math.min(Math.max(l+a,0),e.length-1)];return{...r,[t]:c}}function j({label:r,unit:t,steps:e,value:a,onChange:s,format:l=String,note:c}){const o=b(),h=e.indexOf(a[o]),m=h>=0?h:0,p=w=>s(_(a,o,e,w));return n(x,{label:i(r),icon:n(g,{}),action:d("div",{className:"sf-colstep",children:[n(u,{variant:"secondary",size:"
|
|
1
|
+
"use client";import{jsx as n,jsxs as d,Fragment as v}from"react/jsx-runtime";import{IconButton as u}from"efficient-shell/ui";import{SettingsField as x}from"efficient-easel/panel";import{ColumnsIcon as g}from"efficient-easel/icons";import{usePreviewDevice as b}from"efficient-easel/screen/components/PreviewDeviceContext";import{VIEW_TIER_LABEL as f}from"efficient-easel/screen/lib/content/view-tiers";import{say as i}from"efficient-web-builder/format/lib/editor-words";import{sayWith as F}from"../lib/say-with.js";function _(r,t,e,a){const s=e.indexOf(r[t]),l=s>=0?s:0,c=e[Math.min(Math.max(l+a,0),e.length-1)];return{...r,[t]:c}}function j({label:r,unit:t,steps:e,value:a,onChange:s,format:l=String,note:c}){const o=b(),h=e.indexOf(a[o]),m=h>=0?h:0,p=w=>s(_(a,o,e,w));return n(x,{label:i(r),icon:n(g,{}),action:d("div",{className:"sf-colstep",children:[n(u,{variant:"secondary",size:"md","aria-label":i("Fewer {unit} on {view}",{unit:t,view:i(f[o])}),disabled:m<=0,onClick:()=>p(-1),children:"−"}),n("span",{className:"sf-colstep-value","aria-live":"polite",children:l(e[m])}),n(u,{variant:"secondary",size:"md","aria-label":i("More {unit} on {view}",{unit:t,view:i(f[o])}),disabled:m>=e.length-1,onClick:()=>p(1),children:"+"})]}),hint:d(v,{children:[F(i("Sets the {view} view — switch views in the top bar to set each one."),{view:n("strong",{children:i(f[o])})}),c?d(v,{children:[" ",c]}):null]})})}export{j as default,_ as stepPerView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as s}from"react/jsx-runtime";import{CONTACT_ROUTING_DEFAULTS as t,slugifyGroupId as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{CONTACT_ROUTING_DEFAULTS as t,slugifyGroupId as y}from"efficient-web-builder/format/lib/content/contact";import{EyeIcon as S,LinkIcon as c,EyeOffIcon as w}from"efficient-easel/icons";import{FieldGlyph as I}from"efficient-web-builder/editor/components/FieldGlyph";import{group as u,text as p,plainText as a,plainTextarea as f,textarea as b,textList as O,toggle as N,withOffPage as v,select as T}from"efficient-web-builder/editor/lib/puck/controls";import{formPicker as x}from"../controls.js";import{CHANNEL_HINTS as h}from"../../../../../../render/components/ContactRouting.js";import{say as m}from"efficient-web-builder/format/lib/editor-words";const R={fields:{_gTop:u("Routing groups"),routingNumber:p("Section number",t.routingNumber),routingTagline:p("Eyebrow",t.routingTagline),groups:{type:"array",label:"Groups",arrayFields:{eyebrow:a("Eyebrow"),title:f("Title"),copy:f("Body"),response:a("Response time")},getItemSummary:e=>e?.title||e?.eyebrow||m("Group")},_gForm:u("Message form"),formSlug:x(),formNumber:p("Section number",t.formNumber),formHeading:b("Heading",t.formHeading),metaItems:O("Meta lines",s(I,{noun:"meta"}),"Encrypted in transit","verbatim"),_gOther:u("“Other” reason"),showOther:N("Show “Other” reason",t.showOther,s(S,{})),otherLabel:a("“Other” chip label",t.otherLabel),otherNoteTitle:p("“Other” note title",t.otherNoteTitle),otherNoteBody:b("“Other” note body",t.otherNoteBody),_gSubmit:u("Submit button"),buttonText:a("Submit button",t.buttonText),consent:b("Consent line",t.consent),_gChannels:u("Contact info"),channels:{type:"array",label:"Channels",arrayFields:{label:a("Label",h.label),value:a("Value",h.value),href:v(a("Link")),sub:a("Sub line",h.sub),groupId:T("Link to group",s(c,{}),[{label:"— Not linked —",value:""},...t.groups.map(e=>({label:e.title,value:e.id}))],""),hidden:N("Hidden",!1,s(w,{}))},getItemSummary:e=>{const n=e?.label||e?.value||m("Channel");return e?.hidden?m("{name} · hidden",{name:n}):n}}},resolveData:e=>{const n=e.props.groups??[];if(!n.some(o=>!o?.id))return e;const i=new Set,d=n.map((o,l)=>{if(o?.id)return i.add(o.id),o;let r=y(o?.title)||`group-${l+1}`;for(;i.has(r);)r=`${r}-${l+1}`;return i.add(r),{...o,id:r}});return{...e,props:{...e.props,groups:d}}},resolveFields:(e,{fields:n})=>{const i=e.props.groups??[],d=[{label:"— Not linked —",value:""},...i.map((r,g)=>({label:r?.title||r?.eyebrow||m("Group {n}",{n:g+1}),value:r?.id||y(r?.title)||`group-${g+1}`}))],o=n,l=o.channels;return l?.type==="array"&&l.arrayFields&&(o.channels={...l,arrayFields:{...l.arrayFields,groupId:T("Link to group",s(c,{}),d,"")}}),n}};export{R as ContactRoutingFields};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { type Config } from "efficient-easel/blocks";
|
|
2
2
|
import "../efficient-backend.js";
|
|
3
3
|
import "../../../render/lib/puck/slot-seeds.js";
|
|
4
|
-
export declare const HERO_SINGLE_PH: {
|
|
5
|
-
eyebrow: string;
|
|
6
|
-
titleTop: string;
|
|
7
|
-
};
|
|
8
4
|
export declare const subscribePopupFields: {
|
|
9
5
|
_gBehaviour: import("efficient-web-builder/editor/lib/puck/controls").CustomField<undefined>;
|
|
10
6
|
autoOpen: import("efficient-web-builder/editor/lib/puck/controls").CustomField<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,Fragment as G,jsxs as U}from"react/jsx-runtime";import{assignSectionGroups as W,reseatBucketTabs as K}from"efficient-web-builder/editor/lib/puck/field-groups";import{buildPuckCategories as Y}from"efficient-web-builder/format/lib/puck/section-catalog";import{FONT_ROLES as j,FONT_ROLE_LABELS as q}from"efficient-web-builder/format/lib/fonts";import{CONTAINER_DIRECTION_LABELS as B}from"efficient-web-builder/format/lib/content/container-direction";import{SITE_FOOTER_TYPE as V,SITE_HEADER_TYPE as X}from"efficient-web-builder/format/lib/puck/section-groups";import z from"../../components/MenuLinkRangeField.js";import Q from"../../components/EditorPreviewChat.js";import J from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as Z,POPUP_DAYS_RANGE as E,POPUP_DELAY_RANGE as _,POPUP_HIDE_AFTER as $,POPUP_SCROLL_RANGE as L,POPUP_SHOW_ON as ee,POPUP_TRIGGERS as k,SUBSCRIBE_POPUP_DEFAULTS as te,SUBSCRIBE_POPUP_KIND as oe}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as P,withRowRules as re}from"efficient-web-builder/render/lib/puck/show-when";import{POPUP_KIND_PROP as ie,POPUP_TEXT_KIND_LABELS as O,POPUP_TEXT_KINDS as ae}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as le}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as ne}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as se}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as ce,CART_DRAWER_KIND as F}from"efficient-web-builder/format/lib/content/cart-drawer";import{CONSENT_BANNER_KIND as v}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as me}from"../../components/ConsentBannerLayoutTiles.js";import{AlignLeftIcon as ue,CategoryIcon as de,CheckIcon as C,ClockIcon as h,ColumnsIcon as pe,DirectionIcon as ge,EyeIcon as Pe,ListIcon as be,PageIcon as he,PlacementIcon as Se,ScrollPointIcon as fe,TriggerIcon as Te}from"efficient-easel/icons";import{FieldGlyph as ye}from"efficient-web-builder/editor/components/FieldGlyph";import{group as s,multiSelect as Be,panelNote as R,plainText as i,plainTextarea as u,sectionShapeFields as Ee,sectionThemeFields as _e,segmented as d,select as A,slider as S,textList as b,toggle as w}from"efficient-web-builder/editor/lib/puck/controls";import{formPicker as Le}from"./blocks/service/controls.js";import{SECTION_THEME_FOLLOW_LABEL as ke}from"efficient-web-builder/editor/components/SectionThemePicker";import{nestedAccentValue as Oe}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as Fe}from"efficient-web-builder/format/lib/puck/editor-page-context";import{PRODUCT_HERO_BULLETS_PROP as ve,HERO_BULLET_EXAMPLE as Ce,heroBulletLine as Re}from"../../../render/lib/content/product-hero.js";import{TEMPLATE_PRODUCT_TYPE_PROP as Ae}from"efficient-web-builder/format/lib/content/product-page";import{PRODUCT_KIND_OPTIONS as we}from"../../../render/lib/catalog/plp-item.js";import{PH as f}from"efficient-web-builder/format/lib/puck/blocks/placeholders";import{textKindGlyph as De}from"efficient-web-builder/editor/lib/puck/blocks/shared-fields";import"../efficient-backend.js";import"../../../render/lib/puck/slot-seeds.js";import{generalBlocks as e}from"efficient-web-builder/editor/lib/puck/blocks/general/index";import{commerceBlocks as r}from"./blocks/commerce/index.js";import{serviceBlocks as l}from"./blocks/service/index.js";import{EditorThemedBody as Ie,suppressPreviewNav as xe}from"efficient-web-builder/editor/lib/puck/page-root";import He from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as Ne,PAGE_MENU_DIRECTION_DEFAULT as Me}from"../../../render/lib/puck/footer-page-blocks.js";import{drawPopupPage as Ge,drawPublishedStorefrontRoot as Ue,drawSystemPage as We,StorefrontPageProviders as Ke}from"../../../render/lib/puck/storefront-root.js";import{GENERAL_ROOT_FIELDS as Ye}from"efficient-web-builder/editor/lib/puck/page-root-fields";import{finishRegistry as je}from"efficient-web-builder/editor/lib/puck/registry";const qe="Newsletter (built in)",Kt={eyebrow:"About us",titleTop:"Main heading & *highlight*"},Yt=[{value:"00",label:f.label},{value:"00",label:f.label},{value:"00",label:f.label}],t=te,p={field:"autoOpen",is:!0},Ve={all:[P("hideAfter",$,t.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},Xe=[[["trigger","showOn","hideAfter"],p],[["autoOpenDelaySec"],{all:[p,P("trigger",k,t.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[p,P("trigger",k,t.trigger,["scroll"])]}],[["showOnPages"],{all:[p,P("showOn",ee,t.showOn,["chosen"])]}],[["hideDays"],{all:[p,Ve]}]],ze=re({formSlug:Le(void 0,qe),_gLeft:s("Left panel"),metaLabel:i("Meta label",t.metaLabel),issueLabel:i("Issue label",t.issueLabel),issueNumber:i("Issue number",t.issueNumber),kicker:i("Eyebrow",t.kicker),heading:u("Heading",t.heading),deck:u("Deck",t.deck),stats:{type:"array",label:"Stats",arrayFields:{label:i("Label"),value:i("Value")},getItemSummary:o=>o?.label||o?.value||"Stat"},_gForm:s("Right panel · form"),formLabel:i("Section label",t.formLabel),formHeading:i("Heading",t.formHeading),formIntro:u("Intro",t.formIntro),firstNameLabel:i("First-name label",t.firstNameLabel),firstNamePlaceholder:i("First-name placeholder",t.firstNamePlaceholder),emailLabel:i("Email label",t.emailLabel),emailPlaceholder:i("Email placeholder",t.emailPlaceholder),_gChoices:s("Right panel · choices"),interestsLabel:i("Interests label",t.interestsLabel),interests:b("Interest chips",a(ye,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:i("Frequency label",t.frequencyLabel),frequencies:b("Frequency options",a(be,{}),"Option label","verbatim"),_gActions:s("Right panel · actions"),submitText:i("Submit button",t.submitText),finePrint:i("Fine print",t.finePrint),dismissText:i("Dismiss link",t.dismissText),emailInvalidText:i("Invalid-email error",t.emailInvalidText),submitErrorText:i("Submit-failed error",t.submitErrorText),_gSuccess:s("Success state"),successHeading:i("Heading",t.successHeading),successBody:u("Message",t.successBody),keepBrowsingText:i("Dismiss button",t.keepBrowsingText),..._e(Oe,ke),...Ee(),_gTextStyle:s("Text style"),...Object.fromEntries(ae.map(o=>[ie[o],A(O[o],De(O[o]),[{label:"Popup's own",value:""},...j.map(n=>({label:q[n],value:n}))],"")])),_gBehaviour:s("Behavior"),autoOpen:w("Show by itself",t.autoOpen,a(Pe,{})),trigger:d("Trigger",a(Te,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],t.trigger),autoOpenDelaySec:S("Delay",a(h,{}),_.min,_.max,1,t.autoOpenDelaySec,"s"),scrollPercent:S("Scroll",a(fe,{}),L.min,L.max,5,t.scrollPercent,"%"),showOn:d("Pages",a(he,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],t.showOn),showOnPages:Be("Chosen pages",[],"None"),hideAfter:d("After close",a(h,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],t.hideAfter),hideDays:S("Days",a(h,{}),E.min,E.max,1,t.hideDays),_gArrangement:s("Arrangement"),formSide:d("Form side",a(Se,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],t.formSide),_gPhone:s("On a phone"),valuePanelOnPhone:w("Left panel",t.valuePanelOnPhone,a(pe,{}))},Xe),D=W(ze,"SubscribePopup");async function Qe(){return(await le(se()??"")).filter(n=>!Z(n.slug)).map(n=>({label:n.label,value:ne(n.slug)}))}async function Je(){return K({...D,showOnPages:{...D.showOnPages,options:await Qe().catch(()=>[])}})}const c=ce,Ze={_gHeader:s("Header"),kickerBadge:i("Eyebrow badge",c.kickerBadge),kickerText:i("Eyebrow text",c.kickerText),titleLead:i("Heading",c.titleLead),titleAccent:i("Heading accent",c.titleAccent),subtitleEmpty:u("Sub-line · empty",c.subtitleEmpty),subtitleOne:u("Sub-line · one set",c.subtitleOne),subtitleMany:u("Sub-line · several sets",c.subtitleMany,"{count} becomes the number of sets"),_gStatus:s("Status rail"),leadTimeValue:i("Lead time",c.leadTimeValue),shipsToFallback:i("Ships to · fallback",c.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:s("Promise row"),promises:b("Trust markers",a(C,{}),"Marker","verbatim"),_gEmpty:s("Empty basket"),emptyKicker:i("Eyebrow",c.emptyKicker),emptyBody:u("Message",c.emptyBody)},$e={layout:me,_nConsentWhere:R("The banner's words follow each visitor's country. Turn consent on or off, and pick the privacy page, in Admin › Storefront › Marketing › Privacy.")};function et({kind:o}){return a("div",{style:{padding:"14px 18px",fontFamily:"var(--font-mono, monospace)",fontSize:12,letterSpacing:"0.18em",textTransform:"uppercase",color:"var(--fg-dim)",borderBottom:"1px solid var(--site-line)"},children:o===F?"This is the cart drawer — edit its copy in the Settings panel →":o===v?"This is the cookie banner — pick its layout in the Settings panel →":"This is the site popup — edit it in the Settings panel →"})}const g={root:{fields:{...Ye},resolveFields:async(o,{fields:n})=>{if(o?.props?.kind===oe)return Je();if(o?.props?.kind===F)return Ze;if(o?.props?.kind===v)return $e;const m=n;return Fe()?{[Ae]:A("Product type",a(de,{}),we,"alloy-wheel"),...m,_gHeroBullets:s("Product hero"),_nHeroBullets:R("The promises under Add to Cart. Text before the · is bold. Leave the list empty to show no promises at all."),[ve]:b("Trust bullets",a(C,{}),Re(Ce),"verbatim")}:m},render:o=>{const{puck:n,widthMode:m,fullWidth:I,pageWidth:x,pageBackground:T,theme:H,fonts:N}=o;if(!n?.isEditing)return Ue(o);const y=We(o,a(et,{kind:o.kind}));if(y)return y;const M=Ge(o,!0);return a(Ie,{propsTheme:H,propsFonts:N,widthMode:m,fullWidth:I,pageWidth:x,pageBackground:typeof T=="string"?T:void 0,suppressPreviewNav:xe,overlay:U(G,{children:[a(Q,{}),a(J,{})]}),children:M??a(Ke,{rootProps:o,children:o.children})})}},categories:Y(),components:{Heading:e.Heading,Text:e.Text,Eyebrow:e.Eyebrow,ImageBlock:e.ImageBlock,LogoBlock:e.LogoBlock,ButtonBlock:e.ButtonBlock,Spacer:e.Spacer,Divider:e.Divider,Grid:e.Grid,Flex:e.Flex,Breadcrumb:e.Breadcrumb,Masthead:e.Masthead,CategoryBar:e.CategoryBar,FeaturedCover:e.FeaturedCover,LongRead:e.LongRead,Series:e.Series,Subscribe:l.Subscribe,SubscribeBlogs:l.SubscribeBlogs,Banner:e.Banner,ParagraphsA:e.ParagraphsA,StatsParagraph:e.StatsParagraph,Timeline:e.Timeline,Footprint:e.Footprint,TimelineTrack:e.TimelineTrack,TitleWithButtons:e.TitleWithButtons,Stats:e.Stats,Integrations:e.Integrations,Mockup:e.Mockup,Chart:e.Chart,KeyFeatures:e.KeyFeatures,Testimonials:e.Testimonials,Reviews:l.Reviews,RatingBlock:l.RatingBlock,Prose:e.Prose,Cards:e.Cards,Logos:e.Logos,Ticker:e.Ticker,ContactRouting:l.ContactRouting,ContactLocations:e.ContactLocations,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:r.Collections,CollectionCard:r.CollectionCard,Events:l.Events,PostCard:e.PostCard,DocMetaCards:e.DocMetaCards,DocTabs:e.DocTabs,DocMasthead:e.DocMasthead,DocBody:e.DocBody,FAQ:e.FAQ,Gallery:r.Gallery,GalleryB:r.GalleryB,SpecStrip:e.SpecStrip,GalleryItem:r.GalleryItem,Manifesto:e.Manifesto,SectionHeader:e.SectionHeader,IntroBleed:e.IntroBleed,Split:e.Split,SubmitBuild:l.SubmitBuild,SubmitBox:l.SubmitBox,ReviewForm:l.ReviewForm,Form:l.Form,AppointmentBooking:l.AppointmentBooking,BookingBox:l.BookingBox,CatalogFilterBar:r.CatalogFilterBar,AlloyWheelsListing:r.AlloyWheelsListing,ProductGrid:r.ProductGrid,ProductHero:r.ProductHero,ProductGallery:r.ProductGallery,SpecTable:r.SpecTable,ProcessSteps:e.ProcessSteps,DetailRows:r.DetailRows,FitmentTable:r.FitmentTable,RelatedProducts:r.RelatedProducts,BundleOffer:r.BundleOffer,CompatibleTyres:r.CompatibleTyres,TyreSizes:r.TyreSizes,TyreFitment:r.TyreFitment,EuTyreLabel:r.EuTyreLabel,EuTyreLabelBlock:r.EuTyreLabelBlock,FitmentFinder:r.FitmentFinder,OrderSummary:e.OrderSummary,DeliveryOptions:r.DeliveryOptions,PaymentBadges:e.PaymentBadges,CheckoutCTA:r.CheckoutCTA,ProductRef:r.ProductRef,CustomHTML:e.CustomHTML,Header:r.Header,Footer:l.Footer,FooterLogo:l.FooterLogo,FooterMenu:l.FooterMenu,FooterDivider:l.FooterDivider,FooterGroup:l.FooterGroup,FooterText:l.FooterText,FooterEmailSignup:l.FooterEmailSignup,FooterSocial:l.FooterSocial,LegalLineBlock:l.LegalLineBlock,SearchBlock:r.SearchBlock,CartBlock:r.CartBlock,CountrySwitchBlock:r.CountrySwitchBlock,AccountBlock:r.AccountBlock,ThemeSwitchBlock:r.ThemeSwitchBlock,[X]:l.SiteHeader,[V]:l.SiteFooter}};Ne(g.components);{const o=g.components.MenuBlock;o.fields={...o.fields,direction:d("Direction",a(ge,{}),[{label:B.column,value:"column"},{label:B.row,value:"row"}],Me)},o.fields={...o.fields,linkAlign:d("Link alignment",a(ue,{}),[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"}],"start"),linkRange:{type:"custom",render:({value:n,onChange:m})=>a(z,{value:n,onChange:m})}}}{const o=g.components.Header,n=o.render;o.render=m=>m.puck?.isEditing?a(He,{editing:!0}):n(m)}const tt=je(g),jt=tt.sectionGroupAllow;var qt=g;export{Kt as HERO_SINGLE_PH,jt as SECTION_GROUP_ALLOW,g as config,qt as default,ze as subscribePopupFields};
|
|
1
|
+
import{jsx as a,Fragment as G,jsxs as U}from"react/jsx-runtime";import{assignSectionGroups as W,reseatBucketTabs as K}from"efficient-web-builder/editor/lib/puck/field-groups";import{buildPuckCategories as Y}from"efficient-web-builder/format/lib/puck/section-catalog";import{FONT_ROLES as j,FONT_ROLE_LABELS as q}from"efficient-web-builder/format/lib/fonts";import{CONTAINER_DIRECTION_LABELS as B}from"efficient-web-builder/format/lib/content/container-direction";import{SITE_FOOTER_TYPE as V,SITE_HEADER_TYPE as X}from"efficient-web-builder/format/lib/puck/section-groups";import z from"../../components/MenuLinkRangeField.js";import Q from"../../components/EditorPreviewChat.js";import J from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as Z,POPUP_DAYS_RANGE as E,POPUP_DELAY_RANGE as _,POPUP_HIDE_AFTER as $,POPUP_SCROLL_RANGE as L,POPUP_SHOW_ON as ee,POPUP_TRIGGERS as k,SUBSCRIBE_POPUP_DEFAULTS as te,SUBSCRIBE_POPUP_KIND as oe}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as P,withRowRules as re}from"efficient-web-builder/render/lib/puck/show-when";import{POPUP_KIND_PROP as ie,POPUP_TEXT_KIND_LABELS as O,POPUP_TEXT_KINDS as ae}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as le}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as ne}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as se}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as ce,CART_DRAWER_KIND as F}from"efficient-web-builder/format/lib/content/cart-drawer";import{CONSENT_BANNER_KIND as v}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as me}from"../../components/ConsentBannerLayoutTiles.js";import{AlignLeftIcon as ue,CategoryIcon as de,CheckIcon as C,ClockIcon as f,ColumnsIcon as pe,DirectionIcon as ge,EyeIcon as Pe,ListIcon as be,PageIcon as fe,PlacementIcon as he,ScrollPointIcon as Se,TriggerIcon as Te}from"efficient-easel/icons";import{FieldGlyph as ye}from"efficient-web-builder/editor/components/FieldGlyph";import{group as s,multiSelect as Be,panelNote as R,plainText as i,plainTextarea as u,sectionShapeFields as Ee,sectionThemeFields as _e,segmented as d,select as A,slider as h,textList as b,toggle as D}from"efficient-web-builder/editor/lib/puck/controls";import{formPicker as Le}from"./blocks/service/controls.js";import{SECTION_THEME_FOLLOW_LABEL as ke}from"efficient-web-builder/editor/components/SectionThemePicker";import{nestedAccentValue as Oe}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as Fe}from"efficient-web-builder/format/lib/puck/editor-page-context";import{PRODUCT_HERO_BULLETS_PROP as ve,HERO_BULLET_EXAMPLE as Ce,heroBulletLine as Re}from"../../../render/lib/content/product-hero.js";import{TEMPLATE_PRODUCT_TYPE_PROP as Ae}from"efficient-web-builder/format/lib/content/product-page";import{PRODUCT_KIND_OPTIONS as De}from"../../../render/lib/catalog/plp-item.js";import{PH as S}from"efficient-web-builder/format/lib/puck/blocks/placeholders";import{textKindGlyph as we}from"efficient-web-builder/editor/lib/puck/blocks/shared-fields";import"../efficient-backend.js";import"../../../render/lib/puck/slot-seeds.js";import{generalBlocks as e}from"efficient-web-builder/editor/lib/puck/blocks/general/index";import{commerceBlocks as r}from"./blocks/commerce/index.js";import{serviceBlocks as l}from"./blocks/service/index.js";import{EditorThemedBody as Ie,suppressPreviewNav as xe}from"efficient-web-builder/editor/lib/puck/page-root";import He from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as Ne,PAGE_MENU_DIRECTION_DEFAULT as Me}from"../../../render/lib/puck/footer-page-blocks.js";import{drawPopupPage as Ge,drawPublishedStorefrontRoot as Ue,drawSystemPage as We,StorefrontPageProviders as Ke}from"../../../render/lib/puck/storefront-root.js";import{GENERAL_ROOT_FIELDS as Ye}from"efficient-web-builder/editor/lib/puck/page-root-fields";import{finishRegistry as je}from"efficient-web-builder/editor/lib/puck/registry";const qe="Newsletter (built in)",Kt=[{value:"00",label:S.label},{value:"00",label:S.label},{value:"00",label:S.label}],t=te,p={field:"autoOpen",is:!0},Ve={all:[P("hideAfter",$,t.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},Xe=[[["trigger","showOn","hideAfter"],p],[["autoOpenDelaySec"],{all:[p,P("trigger",k,t.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[p,P("trigger",k,t.trigger,["scroll"])]}],[["showOnPages"],{all:[p,P("showOn",ee,t.showOn,["chosen"])]}],[["hideDays"],{all:[p,Ve]}]],ze=re({formSlug:Le(void 0,qe),_gLeft:s("Left panel"),metaLabel:i("Meta label",t.metaLabel),issueLabel:i("Issue label",t.issueLabel),issueNumber:i("Issue number",t.issueNumber),kicker:i("Eyebrow",t.kicker),heading:u("Heading",t.heading),deck:u("Deck",t.deck),stats:{type:"array",label:"Stats",arrayFields:{label:i("Label"),value:i("Value")},getItemSummary:o=>o?.label||o?.value||"Stat"},_gForm:s("Right panel · form"),formLabel:i("Section label",t.formLabel),formHeading:i("Heading",t.formHeading),formIntro:u("Intro",t.formIntro),firstNameLabel:i("First-name label",t.firstNameLabel),firstNamePlaceholder:i("First-name placeholder",t.firstNamePlaceholder),emailLabel:i("Email label",t.emailLabel),emailPlaceholder:i("Email placeholder",t.emailPlaceholder),_gChoices:s("Right panel · choices"),interestsLabel:i("Interests label",t.interestsLabel),interests:b("Interest chips",a(ye,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:i("Frequency label",t.frequencyLabel),frequencies:b("Frequency options",a(be,{}),"Option label","verbatim"),_gActions:s("Right panel · actions"),submitText:i("Submit button",t.submitText),finePrint:i("Fine print",t.finePrint),dismissText:i("Dismiss link",t.dismissText),emailInvalidText:i("Invalid-email error",t.emailInvalidText),submitErrorText:i("Submit-failed error",t.submitErrorText),_gSuccess:s("Success state"),successHeading:i("Heading",t.successHeading),successBody:u("Message",t.successBody),keepBrowsingText:i("Dismiss button",t.keepBrowsingText),..._e(Oe,ke),...Ee(),_gTextStyle:s("Text style"),...Object.fromEntries(ae.map(o=>[ie[o],A(O[o],we(O[o]),[{label:"Popup's own",value:""},...j.map(n=>({label:q[n],value:n}))],"")])),_gBehaviour:s("Behavior"),autoOpen:D("Show by itself",t.autoOpen,a(Pe,{})),trigger:d("Trigger",a(Te,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],t.trigger),autoOpenDelaySec:h("Delay",a(f,{}),_.min,_.max,1,t.autoOpenDelaySec,"s"),scrollPercent:h("Scroll",a(Se,{}),L.min,L.max,5,t.scrollPercent,"%"),showOn:d("Pages",a(fe,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],t.showOn),showOnPages:Be("Chosen pages",[],"None"),hideAfter:d("After close",a(f,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],t.hideAfter),hideDays:h("Days",a(f,{}),E.min,E.max,1,t.hideDays),_gArrangement:s("Arrangement"),formSide:d("Form side",a(he,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],t.formSide),_gPhone:s("On a phone"),valuePanelOnPhone:D("Left panel",t.valuePanelOnPhone,a(pe,{}))},Xe),w=W(ze,"SubscribePopup");async function Qe(){return(await le(se()??"")).filter(n=>!Z(n.slug)).map(n=>({label:n.label,value:ne(n.slug)}))}async function Je(){return K({...w,showOnPages:{...w.showOnPages,options:await Qe().catch(()=>[])}})}const c=ce,Ze={_gHeader:s("Header"),kickerBadge:i("Eyebrow badge",c.kickerBadge),kickerText:i("Eyebrow text",c.kickerText),titleLead:i("Heading",c.titleLead),titleAccent:i("Heading accent",c.titleAccent),subtitleEmpty:u("Sub-line · empty",c.subtitleEmpty),subtitleOne:u("Sub-line · one set",c.subtitleOne),subtitleMany:u("Sub-line · several sets",c.subtitleMany,"{count} becomes the number of sets"),_gStatus:s("Status rail"),leadTimeValue:i("Lead time",c.leadTimeValue),shipsToFallback:i("Ships to · fallback",c.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:s("Promise row"),promises:b("Trust markers",a(C,{}),"Marker","verbatim"),_gEmpty:s("Empty basket"),emptyKicker:i("Eyebrow",c.emptyKicker),emptyBody:u("Message",c.emptyBody)},$e={layout:me,_nConsentWhere:R("The banner's words follow each visitor's country. Turn consent on or off, and pick the privacy page, in Admin › Storefront › Marketing › Privacy.")};function et({kind:o}){return a("div",{style:{padding:"14px 18px",fontFamily:"var(--font-mono, monospace)",fontSize:12,letterSpacing:"0.18em",textTransform:"uppercase",color:"var(--fg-dim)",borderBottom:"1px solid var(--site-line)"},children:o===F?"This is the cart drawer — edit its copy in the Settings panel →":o===v?"This is the cookie banner — pick its layout in the Settings panel →":"This is the site popup — edit it in the Settings panel →"})}const g={root:{fields:{...Ye},resolveFields:async(o,{fields:n})=>{if(o?.props?.kind===oe)return Je();if(o?.props?.kind===F)return Ze;if(o?.props?.kind===v)return $e;const m=n;return Fe()?{[Ae]:A("Product type",a(de,{}),De,"alloy-wheel"),...m,_gHeroBullets:s("Product hero"),_nHeroBullets:R("The promises under Add to Cart. Text before the · is bold. Leave the list empty to show no promises at all."),[ve]:b("Trust bullets",a(C,{}),Re(Ce),"verbatim")}:m},render:o=>{const{puck:n,widthMode:m,fullWidth:I,pageWidth:x,pageBackground:T,theme:H,fonts:N}=o;if(!n?.isEditing)return Ue(o);const y=We(o,a(et,{kind:o.kind}));if(y)return y;const M=Ge(o,!0);return a(Ie,{propsTheme:H,propsFonts:N,widthMode:m,fullWidth:I,pageWidth:x,pageBackground:typeof T=="string"?T:void 0,suppressPreviewNav:xe,overlay:U(G,{children:[a(Q,{}),a(J,{})]}),children:M??a(Ke,{rootProps:o,children:o.children})})}},categories:Y(),components:{Heading:e.Heading,Text:e.Text,Eyebrow:e.Eyebrow,ImageBlock:e.ImageBlock,LogoBlock:e.LogoBlock,ButtonBlock:e.ButtonBlock,Spacer:e.Spacer,Divider:e.Divider,Grid:e.Grid,Flex:e.Flex,Breadcrumb:e.Breadcrumb,Masthead:e.Masthead,CategoryBar:e.CategoryBar,FeaturedCover:e.FeaturedCover,LongRead:e.LongRead,Series:e.Series,Subscribe:l.Subscribe,SubscribeBlogs:l.SubscribeBlogs,Banner:e.Banner,ParagraphsA:e.ParagraphsA,StatsParagraph:e.StatsParagraph,Timeline:e.Timeline,Footprint:e.Footprint,TimelineTrack:e.TimelineTrack,TitleWithButtons:e.TitleWithButtons,Stats:e.Stats,Integrations:e.Integrations,Mockup:e.Mockup,Chart:e.Chart,KeyFeatures:e.KeyFeatures,Testimonials:e.Testimonials,Reviews:l.Reviews,RatingBlock:l.RatingBlock,Prose:e.Prose,Cards:e.Cards,Logos:e.Logos,Ticker:e.Ticker,ContactRouting:l.ContactRouting,ContactLocations:e.ContactLocations,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:r.Collections,CollectionCard:r.CollectionCard,Events:l.Events,PostCard:e.PostCard,DocMetaCards:e.DocMetaCards,DocTabs:e.DocTabs,DocMasthead:e.DocMasthead,DocBody:e.DocBody,FAQ:e.FAQ,Gallery:r.Gallery,GalleryB:r.GalleryB,SpecStrip:e.SpecStrip,GalleryItem:r.GalleryItem,Manifesto:e.Manifesto,SectionHeader:e.SectionHeader,IntroBleed:e.IntroBleed,Split:e.Split,SubmitBuild:l.SubmitBuild,SubmitBox:l.SubmitBox,ReviewForm:l.ReviewForm,Form:l.Form,AppointmentBooking:l.AppointmentBooking,BookingBox:l.BookingBox,CatalogFilterBar:r.CatalogFilterBar,AlloyWheelsListing:r.AlloyWheelsListing,ProductGrid:r.ProductGrid,ProductHero:r.ProductHero,ProductGallery:r.ProductGallery,SpecTable:r.SpecTable,ProcessSteps:e.ProcessSteps,DetailRows:r.DetailRows,FitmentTable:r.FitmentTable,RelatedProducts:r.RelatedProducts,BundleOffer:r.BundleOffer,CompatibleTyres:r.CompatibleTyres,TyreSizes:r.TyreSizes,TyreFitment:r.TyreFitment,EuTyreLabel:r.EuTyreLabel,EuTyreLabelBlock:r.EuTyreLabelBlock,FitmentFinder:r.FitmentFinder,OrderSummary:e.OrderSummary,DeliveryOptions:r.DeliveryOptions,PaymentBadges:e.PaymentBadges,CheckoutCTA:r.CheckoutCTA,ProductRef:r.ProductRef,CustomHTML:e.CustomHTML,Header:r.Header,Footer:l.Footer,FooterLogo:l.FooterLogo,FooterMenu:l.FooterMenu,FooterDivider:l.FooterDivider,FooterGroup:l.FooterGroup,FooterText:l.FooterText,FooterEmailSignup:l.FooterEmailSignup,FooterSocial:l.FooterSocial,LegalLineBlock:l.LegalLineBlock,SearchBlock:r.SearchBlock,CartBlock:r.CartBlock,CountrySwitchBlock:r.CountrySwitchBlock,AccountBlock:r.AccountBlock,ThemeSwitchBlock:r.ThemeSwitchBlock,[X]:l.SiteHeader,[V]:l.SiteFooter}};Ne(g.components);{const o=g.components.MenuBlock;o.fields={...o.fields,direction:d("Direction",a(ge,{}),[{label:B.column,value:"column"},{label:B.row,value:"row"}],Me)},o.fields={...o.fields,linkAlign:d("Link alignment",a(ue,{}),[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"}],"start"),linkRange:{type:"custom",render:({value:n,onChange:m})=>a(z,{value:n,onChange:m})}}}{const o=g.components.Header,n=o.render;o.render=m=>m.puck?.isEditing?a(He,{editing:!0}):n(m)}const tt=je(g),Yt=tt.sectionGroupAllow;var jt=g;export{Yt as SECTION_GROUP_ALLOW,g as config,jt as default,ze as subscribePopupFields};
|
|
@@ -16,7 +16,6 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
|
|
|
16
16
|
readonly "A short description of your newsletter or publication.": "A short description of your newsletter or publication.";
|
|
17
17
|
readonly "A short summary of the post appears here.": "A short summary of the post appears here.";
|
|
18
18
|
readonly "A third": "A third";
|
|
19
|
-
readonly "About us": "About us";
|
|
20
19
|
readonly Accessories: "Accessories";
|
|
21
20
|
readonly "Account and cart": "Account and cart";
|
|
22
21
|
readonly "Add a line of footer text.": "Add a line of footer text.";
|
|
@@ -269,7 +268,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
|
|
|
269
268
|
readonly Issues: "Issues";
|
|
270
269
|
readonly "Item name": "Item name";
|
|
271
270
|
readonly "Items to display": "Items to display";
|
|
272
|
-
readonly "Its
|
|
271
|
+
readonly "Its photos become the card cover and lightbox, and its car fills the Vehicle below. No group \u2192 the product\u2019s cover image.": "Its photos become the card cover and lightbox, and its car fills the Vehicle below. No group → the product’s cover image.";
|
|
273
272
|
readonly "Join our email list": "Join our email list";
|
|
274
273
|
readonly "Joins the \u201C{audience}\u201D audience": "Joins the “{audience}” audience";
|
|
275
274
|
readonly "Joins the \u201C{audience}\u201D audience, but only when the consent box is ticked": "Joins the “{audience}” audience, but only when the consent box is ticked";
|
|
@@ -317,7 +316,6 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
|
|
|
317
316
|
readonly Lugs: "Lugs";
|
|
318
317
|
readonly M: "M";
|
|
319
318
|
readonly "Main + thumbs": "Main + thumbs";
|
|
320
|
-
readonly "Main heading & *highlight*": "Main heading & *highlight*";
|
|
321
319
|
readonly "Main only": "Main only";
|
|
322
320
|
readonly Make: "Make";
|
|
323
321
|
readonly "Manage menus \u2192": "Manage menus →";
|
|
@@ -419,7 +417,6 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
|
|
|
419
417
|
readonly "Posts to display": "Posts to display";
|
|
420
418
|
readonly "Price / quote": "Price / quote";
|
|
421
419
|
readonly "Price and details come from the product record \u2014 edit them in the Products database and this block updates to match. The name follows the product\u2019s design name unless it\u2019s overridden per storefront in {place}.": "Price and details come from the product record — edit them in the Products database and this block updates to match. The name follows the product’s design name unless it’s overridden per storefront in {place}.";
|
|
422
|
-
readonly "Price from": "Price from";
|
|
423
420
|
readonly "Price on request": "Price on request";
|
|
424
421
|
readonly "Price position": "Price position";
|
|
425
422
|
readonly "Price \u00B7 High": "Price · High";
|
|
@@ -637,6 +634,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
|
|
|
637
634
|
readonly "Use company default": "Use company default";
|
|
638
635
|
readonly "Use my real delivery options": "Use my real delivery options";
|
|
639
636
|
readonly "Using your company logo from the database.": "Using your company logo from the database.";
|
|
637
|
+
readonly Vehicle: "Vehicle";
|
|
640
638
|
readonly "Vehicle catalog unavailable in this preview \u2014 the picker fills from the live fitment API on the published site.": "Vehicle catalog unavailable in this preview — the picker fills from the live fitment API on the published site.";
|
|
641
639
|
readonly "Vehicle fitment": "Vehicle fitment";
|
|
642
640
|
readonly "Vehicle list unavailable": "Vehicle list unavailable";
|