efficient-storefront-blocks 0.130.14 → 0.131.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-WDJYQRZA.js → CustomHtmlCodeWindow-JINOMDUB.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-DZWAHBAZ.js → EditorPreviewCheckout-B5B4BHEG.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-CJRYE2LF.js +1 -0
  5. package/dist/chunks/{chunk-KCZDH44S.js → chunk-3QCDDPXL.js} +2 -2
  6. package/dist/chunks/{chunk-HEKC2QYZ.js → chunk-43XANC6T.js} +1 -1
  7. package/dist/chunks/{chunk-QAUFSKVD.js → chunk-7W33H2GG.js} +1 -1
  8. package/dist/chunks/{chunk-TQIJVK3T.js → chunk-GVSVEV2H.js} +8 -8
  9. package/dist/chunks/{chunk-3SIVGMSB.js → chunk-PJVO662Y.js} +1 -1
  10. package/dist/chunks/chunk-QYTBEMMG.js +337 -0
  11. package/dist/chunks/{chunk-4J3EMW4L.js → chunk-R5FDAR72.js} +1 -1
  12. package/dist/chunks/{chunk-NOV6LTTJ.js → chunk-SV3VVDBH.js} +1 -1
  13. package/dist/chunks/{fitment-data-JY77OFQP.js → fitment-data-FRSLYOCL.js} +1 -1
  14. package/dist/chunks/{section-css-style-TB33NIO4.js → section-css-style-3IQWMPDP.js} +1 -1
  15. package/dist/editor/lib/document/config.js +1 -1
  16. package/dist/index.js +26 -26
  17. package/dist/links.js +1 -1
  18. package/dist/render/built-with.json +1 -1
  19. package/dist/render/components/card-pieces/CardProductPicture.d.ts +2 -0
  20. package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
  21. package/dist/render/lib/document/blocks/commerce/ProductPicture/render.js +1 -1
  22. package/dist/routine-index.json +1 -1
  23. package/dist/value-index.json +1 -1
  24. package/dist/words.d.ts +8 -0
  25. package/dist/words.js +4 -4
  26. package/package.json +4 -4
  27. package/dist/chunks/SiteEditorProvider-JT4ASGS5.js +0 -1
  28. package/dist/chunks/chunk-7QM6BBAM.js +0 -337
  29. /package/dist/chunks/{chunk-HEKC2QYZ.js.LEGAL.txt → chunk-43XANC6T.js.LEGAL.txt} +0 -0
  30. /package/dist/chunks/{chunk-5OXXOEE7.js → chunk-FVHAKC6L.js} +0 -0
  31. /package/dist/chunks/{chunk-7QM6BBAM.js.LEGAL.txt → chunk-QYTBEMMG.js.LEGAL.txt} +0 -0
  32. /package/dist/chunks/{chunk-RCXMXKPT.js → chunk-T5PQ7BY4.js} +0 -0
  33. /package/dist/chunks/{chunk-3DKV2YJ6.js → chunk-TICXZI44.js} +0 -0
@@ -1 +1 @@
1
- import{jsx as l,Fragment as j,jsxs as q}from"react/jsx-runtime";import{textKindStyleRows as z}from"./text-kind-style-rows.js";import{assignSectionGroups as A,reseatBucketTabs as R}from"efficient-web-builder/editor/lib/document/field-groups";import{buildBlockCategories as V}from"efficient-web-builder/format/lib/document/section-catalog";import{CONTAINER_DIRECTION_LABELS as v}from"efficient-web-builder/format/lib/content/container-direction";import{SITE_FOOTER_TYPE as X,SITE_HEADER_TYPE as Q}from"efficient-web-builder/format/lib/document/section-groups";import J from"../../components/MenuLinkRangeField.js";import Z from"../../components/EditorPreviewChat.js";import $ from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as ee,POPUP_DAYS_RANGE as D,POPUP_DELAY_RANGE as w,POPUP_HIDE_AFTER as te,POPUP_SCROLL_RANGE as I,POPUP_SHOW_ON as oe,POPUP_TRIGGERS as N,SUBSCRIBE_POPUP_DEFAULTS as re,SUBSCRIBE_POPUP_KIND as ie}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as y,withRowRules as ae,withShowWhen as g}from"efficient-web-builder/render/lib/document/show-when";import{POPUP_KIND_PROP as le,POPUP_TEXT_KIND_LABELS as ne,POPUP_TEXT_KINDS as se}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as ce}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as me}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as ue}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as de,CART_DRAWER_KIND as B}from"efficient-web-builder/format/lib/content/cart-drawer";import{POPUP_PAGE_KIND as x}from"efficient-web-builder/format/lib/popup/look";import{menuPanelLookFields as pe,popupLookFields as ge}from"./popup-look-fields.js";import{MENU_PANEL_TINT_OPACITY_DEFAULT as Pe,MENU_PANEL_WIDTH_DEFAULT as fe,MENU_STYLE_BUTTON as H,MENU_STYLE_PLAIN as k,MENU_STYLE_TABS as E}from"../../../render/lib/content/menu-row.js";import{CONSENT_BANNER_KIND as M}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as Se}from"../../components/ConsentBannerLayoutTiles.js";import{CategoryIcon as be,CheckIcon as Te,ClockIcon as F,ColumnsIcon as he,DirectionIcon as ye,EyeIcon as ke,ListIcon as Be,PageIcon as Ee,PlacementIcon as Fe,ScrollPointIcon as _e,TabsIcon as Le,TriggerIcon as Oe}from"efficient-easel/icons";import{deviceField as U}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as Ce}from"efficient-web-builder/editor/components/FieldGlyph";import{DisplayRow as Ae,multiSelect as Re,panelNote as ve,plainText as a,plainTextarea as p,sectionShapeFields as De,sectionThemeFields as we,textList as _,toggle as G}from"efficient-web-builder/editor/lib/document/controls";import{group as u,phoneTwinFields as Ie}from"efficient-easel/screen/lib/document/box-fields";import{segmented as P,select as Ne,slider as L}from"efficient-web-builder/editor/lib/document/box-fields";import{blockAlignRow as xe}from"./block-align-row.js";import{formPicker as He}from"./blocks/service/controls.js";import{SECTION_THEME_FOLLOW_LABEL as Me}from"efficient-web-builder/editor/components/SectionThemePicker";import{nestedAccentValue as Ue}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as Ge}from"efficient-web-builder/format/lib/document/editor-page-context";import{TEMPLATE_PRODUCT_TYPE_PROP as Ke}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 O}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{NO_BLOCK_SOURCE as Ye,blockSourceField as je,blockSourceFields as qe}from"efficient-web-builder/editor/lib/document/block-source-fields";import{menuTemplateFollowsContent as ze}from"../../../render/lib/content/menu-card-seed.js";import"../efficient-backend.js";import"../../../render/lib/document/slot-seeds.js";import"../../../render/lib/document/card-templates.js";import"../../../render/lib/document/section-to-box-rows-reviews.js";import"../../../render/lib/document/section-to-box-rows-spec.js";import"../../../render/lib/document/section-to-box-rows-productgrid.js";import"../../../render/lib/document/section-to-box-rows-events.js";import"../../../render/lib/document/section-to-box-rows-collections.js";import"../../../render/lib/document/section-to-box-rows-gallery.js";import"../../../render/lib/document/section-to-box-rows-producthero.js";import"../../../render/lib/document/section-to-box-rows-fitment.js";import"../../../render/lib/document/section-to-box-rows-detail.js";import"../../../render/lib/document/section-to-box-rows-service.js";import"../../../render/lib/document/section-to-box-rows-listing.js";import"./section-text-regions.js";import{generalBlocks as e}from"efficient-web-builder/editor/lib/document/blocks/general/index";import{commerceBlocks as t}from"./blocks/commerce/index.js";import{serviceBlocks as i}from"./blocks/service/index.js";import{EditorThemedBody as Ve,suppressPreviewNav as Xe}from"efficient-web-builder/editor/lib/document/page-root";import Qe from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as Je,PAGE_MENU_DIRECTION_DEFAULT as C}from"../../../render/lib/document/footer-page-blocks.js";import{drawPopupPage as Ze,drawPublishedStorefrontRoot as $e,drawSystemPage as et,StorefrontPageProviders as tt}from"../../../render/lib/document/storefront-root.js";import ot from"../../components/PostListStartsFromPage.js";import{GENERAL_ROOT_FIELDS as rt}from"efficient-web-builder/editor/lib/document/page-root-fields";import{finishRegistry as it}from"efficient-web-builder/editor/lib/document/registry";import{MENU_BLOCK_TYPE as at}from"../../../render/lib/document/document-nodes.js";const lt="Newsletter (built in)",nt=[{id:"currentPage",label:"Current page"}],Co=[{value:"00",label:O.label},{value:"00",label:O.label},{value:"00",label:O.label}],r=re,S={field:"autoOpen",is:!0},st={all:[y("hideAfter",te,r.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},ct=[[["trigger","showOn","hideAfter"],S],[["autoOpenDelaySec"],{all:[S,y("trigger",N,r.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[S,y("trigger",N,r.trigger,["scroll"])]}],[["showOnPages"],{all:[S,y("showOn",oe,r.showOn,["chosen"])]}],[["hideDays"],{all:[S,st]}]],mt=ae({formSlug:He(void 0,lt),_gLeft:u("Left panel"),metaLabel:a("Meta label",r.metaLabel),issueLabel:a("Issue label",r.issueLabel),issueNumber:a("Issue number",r.issueNumber),kicker:a("Eyebrow",r.kicker),heading:p("Heading",r.heading),deck:p("Deck",r.deck),stats:{type:"array",label:"Stats",arrayFields:{label:a("Label"),value:a("Value")},getItemSummary:o=>o?.label||o?.value||"Stat"},_gForm:u("Right panel · form"),formLabel:a("Section label",r.formLabel),formHeading:a("Heading",r.formHeading),formIntro:p("Intro",r.formIntro),firstNameLabel:a("First-name label",r.firstNameLabel),firstNamePlaceholder:a("First-name placeholder",r.firstNamePlaceholder),emailLabel:a("Email label",r.emailLabel),emailPlaceholder:a("Email placeholder",r.emailPlaceholder),_gChoices:u("Right panel · choices"),interestsLabel:a("Interests label",r.interestsLabel),interests:_("Interest chips",l(Ce,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:a("Frequency label",r.frequencyLabel),frequencies:_("Frequency options",l(Be,{}),"Option label","verbatim"),_gActions:u("Right panel · actions"),submitText:a("Submit button",r.submitText),finePrint:a("Fine print",r.finePrint),dismissText:a("Dismiss link",r.dismissText),emailInvalidText:a("Invalid-email error",r.emailInvalidText),submitErrorText:a("Submit-failed error",r.submitErrorText),_gSuccess:u("Success state"),successHeading:a("Heading",r.successHeading),successBody:p("Message",r.successBody),keepBrowsingText:a("Dismiss button",r.keepBrowsingText),...we(Ue,Me),...De(),...z(se,le,ne,{unsetLabel:"Popup's own"}),_gBehaviour:u("Behavior"),autoOpen:G("Show by itself",r.autoOpen,l(ke,{})),trigger:P("Trigger",l(Oe,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],r.trigger),autoOpenDelaySec:L("Delay",l(F,{}),w.min,w.max,1,r.autoOpenDelaySec,"s"),scrollPercent:L("Scroll",l(_e,{}),I.min,I.max,5,r.scrollPercent,"%"),showOn:P("Pages",l(Ee,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],r.showOn),showOnPages:Re("Chosen pages",[],"None"),hideAfter:P("After close",l(F,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],r.hideAfter),hideDays:L("Days",l(F,{}),D.min,D.max,1,r.hideDays),_gArrangement:u("Arrangement"),formSide:P("Form side",l(Fe,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],r.formSide),_gPhone:U("mobile",u("On a phone")),valuePanelOnPhone:U("mobile",G("Left panel",r.valuePanelOnPhone,l(he,{})))},ct),K=A(mt,"SubscribePopup");async function ut(){return(await ce(ue()??"")).filter(c=>!ee(c.slug)).map(c=>({label:c.label,value:me(c.slug)}))}async function dt(){return R({...K,showOnPages:{...K.showOnPages,options:await ut().catch(()=>[])}})}const d=de,pt={_gHeader:u("Header"),kickerBadge:a("Eyebrow badge",d.kickerBadge),kickerText:a("Eyebrow text",d.kickerText),titleLead:a("Heading",d.titleLead),titleAccent:a("Heading accent",d.titleAccent),subtitleEmpty:p("Sub-line · empty",d.subtitleEmpty),subtitleOne:p("Sub-line · one set",d.subtitleOne),subtitleMany:p("Sub-line · several sets",d.subtitleMany,"{count} becomes the number of sets"),_gStatus:u("Status rail"),leadTimeValue:a("Lead time",d.leadTimeValue),shipsToFallback:a("Ships to · fallback",d.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:u("Promise row"),promises:_("Trust markers",l(Te,{}),"Marker","verbatim"),_gEmpty:u("Empty basket"),emptyKicker:a("Eyebrow",d.emptyKicker),emptyBody:p("Message",d.emptyBody)},W=(o,c,m)=>R({...o,...A(ge(c),m)}),gt=W(pt,B,"CartDrawer"),Pt={layout:Se,_nConsentWhere:ve("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 ft({kind:o}){return l("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===B?"This is the cart drawer — edit its copy in the Settings panel →":o===M?"This is the cookie banner — pick its layout in the Settings panel →":"This is the site popup — edit it in the Settings panel →"})}const b={root:{fields:{...rt},resolveFields:async(o,{fields:c})=>{if(o?.props?.kind===ie)return dt();if(o?.props?.kind===x)return W(c,x,"PopupPage");if(o?.props?.kind===B)return gt;if(o?.props?.kind===M)return Pt;const m=c;return Ge()?{[Ke]:Ne("Product type",l(be,{}),We,"alloy-wheel"),...m}:m},render:o=>{const{editor:c,pageBackground:m,theme:T,fonts:h}=o;if(!c?.isEditing)return $e(o);const f=et(o,l(ft,{kind:o.kind}));if(f)return f;const n=Ze(o,!0);return l(Ve,{propsTheme:T,propsFonts:h,pageBackground:typeof m=="string"?m:void 0,suppressPreviewNav:Xe,overlay:q(j,{children:[l(Z,{}),l($,{})]}),children:l(ot,{children:n??l(tt,{rootProps:o,children:o.children})})})}},categories:V(),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:i.Subscribe,SubscribeBlogs:i.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:i.Reviews,RatingBlock:i.RatingBlock,Prose:e.Prose,Cards:e.Cards,Logos:e.Logos,Ticker:e.Ticker,ContactRouting:i.ContactRouting,ContactLocations:e.ContactLocations,DealerFinder:i.DealerFinder,SignUp:i.SignUp,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:t.Collections,CollectionCard:t.CollectionCard,Events:i.Events,RateTable:i.RateTable,MessagingCards:i.MessagingCards,ContactCards:i.ContactCards,OpeningHours:i.OpeningHours,PostCard:e.PostCard,DocMetaCards:e.DocMetaCards,DocTabs:e.DocTabs,DocMasthead:e.DocMasthead,DocBody:e.DocBody,Contents:e.Contents,ListSearch:e.ListSearch,FAQ:e.FAQ,Gallery:t.Gallery,GalleryB:t.GalleryB,SpecStrip:e.SpecStrip,GalleryItem:t.GalleryItem,Manifesto:e.Manifesto,SectionHeader:e.SectionHeader,IntroBleed:e.IntroBleed,Split:e.Split,SubmitBuild:i.SubmitBuild,SubmitBox:i.SubmitBox,ReviewForm:i.ReviewForm,Form:i.Form,AppointmentBooking:i.AppointmentBooking,BookingBox:i.BookingBox,CatalogFilterBar:t.CatalogFilterBar,AlloyWheelsListing:t.AlloyWheelsListing,ProductGrid:t.ProductGrid,ProductHero:t.ProductHero,ProductGallery:t.ProductGallery,SpecTable:t.SpecTable,ProcessSteps:e.ProcessSteps,DetailRows:t.DetailRows,FitmentTable:t.FitmentTable,RelatedProducts:t.RelatedProducts,BundleOffer:t.BundleOffer,CompatibleTyres:t.CompatibleTyres,TyreSizes:t.TyreSizes,TyreFitment:t.TyreFitment,EuTyreLabel:t.EuTyreLabel,EuTyreLabelBlock:t.EuTyreLabelBlock,WheelDiagram:t.WheelDiagram,ProductSize:t.ProductSize,ProductColour:t.ProductColour,ProductPrice:t.ProductPrice,ProductBuyButton:t.ProductBuyButton,FilterBlock:t.FilterBlock,FilterChipsBlock:t.FilterChipsBlock,ProductPicture:t.ProductPicture,ProductSpecs:t.ProductSpecs,ProductBuy:t.ProductBuy,ProductEyebrow:t.ProductEyebrow,ProductName:t.ProductName,ProductSku:t.ProductSku,FitmentFinder:t.FitmentFinder,FitmentPicker:t.FitmentPicker,StockFitment:t.StockFitment,OrderSummary:e.OrderSummary,DeliveryOptions:t.DeliveryOptions,PaymentBadges:e.PaymentBadges,CheckoutCTA:t.CheckoutCTA,ProductRef:t.ProductRef,CustomHTML:e.CustomHTML,CardList:e.CardList,HostPart:e.HostPart,Header:t.Header,Footer:i.Footer,FooterLogo:i.FooterLogo,FooterMenu:i.FooterMenu,ArticleBody:i.ArticleBody,MenuLinkBlock:i.MenuLinkBlock,FooterDivider:i.FooterDivider,FooterGroup:i.FooterGroup,FooterText:i.FooterText,FooterEmailSignup:i.FooterEmailSignup,FooterSocial:i.FooterSocial,FooterMessaging:i.FooterMessaging,FooterPayment:i.FooterPayment,LegalLineBlock:i.LegalLineBlock,SearchBlock:t.SearchBlock,CartBlock:t.CartBlock,CountrySwitchBlock:t.CountrySwitchBlock,AccountBlock:t.AccountBlock,ThemeSwitchBlock:t.ThemeSwitchBlock,[Q]:i.SiteHeader,[X]:i.SiteFooter}};Je(b.components);{const o=b.components.MenuBlock;o.fields={...o.fields,direction:P("Direction",l(ye,{}),[{label:v.column,value:"column"},{label:v.row,value:"row"}],C)};const c={type:"custom",render:({value:n,onChange:s})=>l(J,{value:n,onChange:s})},m=g({type:"custom",render:({value:n,onChange:s})=>l(Ae,{parts:nt,changed:n===!0,shown:()=>n===!0,onPress:(bt,Y)=>s(Y),onReset:()=>s(void 0)})},{not:{field:"direction",is:"column",default:C}});o.fields=Object.fromEntries(Object.entries(o.fields).flatMap(([n,s])=>n==="menu"?[["dataSource",je("Menu content","Manual")],[n,s],["linkRange",c],["currentPage",m]]:[[n,s]]));const T=o;T.resolveFields=(n,{fields:s})=>qe(at,s,n.props,{hides:["menu"]}),T.resolveData=n=>{const s=ze(n.props);return s===n.props?n:{...n,props:s}},o.fields={...o.fields,linkAlign:xe({label:"Link alignment"}),...Object.fromEntries(Object.entries(Ie("menuStyle",P("Menu style",l(Le,{}),[{label:"Plain",value:k},{label:"Tabs",value:E},{label:"Menu button",value:H}],k))).map(([n,s])=>[n,g(s,{not:{field:"direction",is:"column",default:C}})])),...Object.fromEntries(Object.entries(pe(fe,Pe)).map(([n,s])=>[n,g(s,{all:[{not:{field:"menuStyle",is:k,default:k}},{not:{field:"menuStyle",is:E}}]})]))};const h={not:{field:"menuStyle",is:E}},f={not:{field:"menuStyle",is:H}};o.fields.linkRange=g(o.fields.linkRange,{all:[h,Ye]}),o.fields.linkAlign=g(o.fields.linkAlign,{all:[h,f]}),o.fields.direction=g(o.fields.direction,f)}{const o=b.components.Header,c=o.render;o.render=m=>m.editor?.isEditing?l(Qe,{editing:!0}):c(m)}const St=it(b),Ao=St.sectionGroupAllow;var Ro=b;export{Ao as SECTION_GROUP_ALLOW,b as config,Ro as default,mt as subscribePopupFields};
1
+ import{jsx as l,Fragment as V,jsxs as q}from"react/jsx-runtime";import{textKindStyleRows as X}from"./text-kind-style-rows.js";import{assignSectionGroups as R,reseatBucketTabs as A}from"efficient-web-builder/editor/lib/document/field-groups";import{buildBlockCategories as Q}from"efficient-web-builder/format/lib/document/section-catalog";import{CONTAINER_DIRECTION_LABELS as v}from"efficient-web-builder/format/lib/content/container-direction";import{SITE_FOOTER_TYPE as J,SITE_HEADER_TYPE as Z}from"efficient-web-builder/format/lib/document/section-groups";import $ from"../../components/MenuLinkRangeField.js";import ee from"../../components/EditorPreviewChat.js";import te from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as oe,POPUP_DAYS_RANGE as D,POPUP_DELAY_RANGE as w,POPUP_HIDE_AFTER as re,POPUP_SCROLL_RANGE as I,POPUP_SHOW_ON as ie,POPUP_TRIGGERS as N,SUBSCRIBE_POPUP_DEFAULTS as ae,SUBSCRIBE_POPUP_KIND as le}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as y,withRowRules as ne,withShowWhen as P}from"efficient-web-builder/render/lib/document/show-when";import{POPUP_KIND_PROP as se,POPUP_TEXT_KIND_LABELS as ce,POPUP_TEXT_KINDS as me}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as ue}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as de}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as pe}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as Pe,CART_DRAWER_KIND as E}from"efficient-web-builder/format/lib/content/cart-drawer";import{POPUP_PAGE_KIND as H}from"efficient-web-builder/format/lib/popup/look";import{menuPanelLookFields as ge,popupLookFields as fe}from"./popup-look-fields.js";import{MENU_PANEL_TINT_OPACITY_DEFAULT as Se,MENU_PANEL_WIDTH_DEFAULT as be,MENU_STYLE_BUTTON as x,MENU_STYLE_PLAIN as k,MENU_STYLE_TABS as B}from"../../../render/lib/content/menu-row.js";import{CONSENT_BANNER_KIND as M}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as Te}from"../../components/ConsentBannerLayoutTiles.js";import{CategoryIcon as he,CheckIcon as ye,ClockIcon as F,ColumnsIcon as ke,DirectionIcon as Ee,EyeIcon as Be,ListIcon as Fe,PageIcon as _e,PlacementIcon as Le,ScrollPointIcon as Oe,TabsIcon as Ce,TriggerIcon as Re}from"efficient-easel/icons";import{deviceField as U}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as Ae}from"efficient-web-builder/editor/components/FieldGlyph";import{DisplayRow as ve,multiSelect as De,panelNote as we,plainText as a,plainTextarea as p,sectionShapeFields as Ie,sectionThemeFields as Ne,textList as _,toggle as G}from"efficient-web-builder/editor/lib/document/controls";import{group as u,phoneTwinFields as He}from"efficient-easel/screen/lib/document/box-fields";import{segmented as g,select as xe,slider as L}from"efficient-web-builder/editor/lib/document/box-fields";import{blockAlignRow as Me}from"./block-align-row.js";import{formPicker as Ue}from"./blocks/service/controls.js";import{SECTION_THEME_FOLLOW_LABEL as Ge}from"efficient-web-builder/editor/components/SectionThemePicker";import{nestedAccentValue as Ke}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as We}from"efficient-web-builder/format/lib/document/editor-page-context";import{TEMPLATE_PRODUCT_TYPE_PROP as Ye}from"efficient-web-builder/format/lib/content/product-page";import{PRODUCT_KIND_OPTIONS as je}from"../../../render/lib/catalog/plp-item.js";import{PH as O}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{NO_BLOCK_SOURCE as ze,blockSourceField as Ve,blockSourceFields as qe}from"efficient-web-builder/editor/lib/document/block-source-fields";import{menuTemplateFollowsContent as Xe}from"../../../render/lib/content/menu-card-seed.js";import"../efficient-backend.js";import"../../../render/lib/document/slot-seeds.js";import"../../../render/lib/document/card-templates.js";import"../../../render/lib/document/section-to-box-rows-reviews.js";import"../../../render/lib/document/section-to-box-rows-spec.js";import"../../../render/lib/document/section-to-box-rows-productgrid.js";import"../../../render/lib/document/section-to-box-rows-events.js";import"../../../render/lib/document/section-to-box-rows-collections.js";import"../../../render/lib/document/section-to-box-rows-gallery.js";import"../../../render/lib/document/section-to-box-rows-producthero.js";import"../../../render/lib/document/section-to-box-rows-fitment.js";import"../../../render/lib/document/section-to-box-rows-detail.js";import"../../../render/lib/document/section-to-box-rows-service.js";import"../../../render/lib/document/section-to-box-rows-listing.js";import"./section-text-regions.js";import{generalBlocks as e}from"efficient-web-builder/editor/lib/document/blocks/general/index";import{commerceBlocks as t}from"./blocks/commerce/index.js";import{serviceBlocks as i}from"./blocks/service/index.js";import{EditorThemedBody as Qe,suppressPreviewNav as Je}from"efficient-web-builder/editor/lib/document/page-root";import Ze from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as $e,PAGE_MENU_DIRECTION_DEFAULT as C}from"../../../render/lib/document/footer-page-blocks.js";import{drawPopupPage as et,drawPublishedStorefrontRoot as tt,drawSystemPage as ot,StorefrontPageProviders as rt}from"../../../render/lib/document/storefront-root.js";import it from"../../components/PostListStartsFromPage.js";import{GENERAL_ROOT_FIELDS as at}from"efficient-web-builder/editor/lib/document/page-root-fields";import{finishRegistry as lt}from"efficient-web-builder/editor/lib/document/registry";import{pictureHoverFields as nt}from"efficient-web-builder/editor/lib/animation/hover-fields";import{HOVER_GROUP_KEY as K,PICTURE_HOVER_KEYS as W}from"efficient-web-builder/format/lib/animation/hover";import{MENU_BLOCK_TYPE as st}from"../../../render/lib/document/document-nodes.js";const ct="Newsletter (built in)",mt=[{id:"currentPage",label:"Current page"}],wo=[{value:"00",label:O.label},{value:"00",label:O.label},{value:"00",label:O.label}],r=ae,b={field:"autoOpen",is:!0},ut={all:[y("hideAfter",re,r.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},dt=[[["trigger","showOn","hideAfter"],b],[["autoOpenDelaySec"],{all:[b,y("trigger",N,r.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[b,y("trigger",N,r.trigger,["scroll"])]}],[["showOnPages"],{all:[b,y("showOn",ie,r.showOn,["chosen"])]}],[["hideDays"],{all:[b,ut]}]],pt=ne({formSlug:Ue(void 0,ct),_gLeft:u("Left panel"),metaLabel:a("Meta label",r.metaLabel),issueLabel:a("Issue label",r.issueLabel),issueNumber:a("Issue number",r.issueNumber),kicker:a("Eyebrow",r.kicker),heading:p("Heading",r.heading),deck:p("Deck",r.deck),stats:{type:"array",label:"Stats",arrayFields:{label:a("Label"),value:a("Value")},getItemSummary:o=>o?.label||o?.value||"Stat"},_gForm:u("Right panel · form"),formLabel:a("Section label",r.formLabel),formHeading:a("Heading",r.formHeading),formIntro:p("Intro",r.formIntro),firstNameLabel:a("First-name label",r.firstNameLabel),firstNamePlaceholder:a("First-name placeholder",r.firstNamePlaceholder),emailLabel:a("Email label",r.emailLabel),emailPlaceholder:a("Email placeholder",r.emailPlaceholder),_gChoices:u("Right panel · choices"),interestsLabel:a("Interests label",r.interestsLabel),interests:_("Interest chips",l(Ae,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:a("Frequency label",r.frequencyLabel),frequencies:_("Frequency options",l(Fe,{}),"Option label","verbatim"),_gActions:u("Right panel · actions"),submitText:a("Submit button",r.submitText),finePrint:a("Fine print",r.finePrint),dismissText:a("Dismiss link",r.dismissText),emailInvalidText:a("Invalid-email error",r.emailInvalidText),submitErrorText:a("Submit-failed error",r.submitErrorText),_gSuccess:u("Success state"),successHeading:a("Heading",r.successHeading),successBody:p("Message",r.successBody),keepBrowsingText:a("Dismiss button",r.keepBrowsingText),...Ne(Ke,Ge),...Ie(),...X(me,se,ce,{unsetLabel:"Popup's own"}),_gBehaviour:u("Behavior"),autoOpen:G("Show by itself",r.autoOpen,l(Be,{})),trigger:g("Trigger",l(Re,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],r.trigger),autoOpenDelaySec:L("Delay",l(F,{}),w.min,w.max,1,r.autoOpenDelaySec,"s"),scrollPercent:L("Scroll",l(Oe,{}),I.min,I.max,5,r.scrollPercent,"%"),showOn:g("Pages",l(_e,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],r.showOn),showOnPages:De("Chosen pages",[],"None"),hideAfter:g("After close",l(F,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],r.hideAfter),hideDays:L("Days",l(F,{}),D.min,D.max,1,r.hideDays),_gArrangement:u("Arrangement"),formSide:g("Form side",l(Le,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],r.formSide),_gPhone:U("mobile",u("On a phone")),valuePanelOnPhone:U("mobile",G("Left panel",r.valuePanelOnPhone,l(ke,{})))},dt),Y=R(pt,"SubscribePopup");async function Pt(){return(await ue(pe()??"")).filter(s=>!oe(s.slug)).map(s=>({label:s.label,value:de(s.slug)}))}async function gt(){return A({...Y,showOnPages:{...Y.showOnPages,options:await Pt().catch(()=>[])}})}const d=Pe,ft={_gHeader:u("Header"),kickerBadge:a("Eyebrow badge",d.kickerBadge),kickerText:a("Eyebrow text",d.kickerText),titleLead:a("Heading",d.titleLead),titleAccent:a("Heading accent",d.titleAccent),subtitleEmpty:p("Sub-line · empty",d.subtitleEmpty),subtitleOne:p("Sub-line · one set",d.subtitleOne),subtitleMany:p("Sub-line · several sets",d.subtitleMany,"{count} becomes the number of sets"),_gStatus:u("Status rail"),leadTimeValue:a("Lead time",d.leadTimeValue),shipsToFallback:a("Ships to · fallback",d.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:u("Promise row"),promises:_("Trust markers",l(ye,{}),"Marker","verbatim"),_gEmpty:u("Empty basket"),emptyKicker:a("Eyebrow",d.emptyKicker),emptyBody:p("Message",d.emptyBody)},j=(o,s,m)=>A({...o,...R(fe(s),m)}),St=j(ft,E,"CartDrawer"),bt={layout:Te,_nConsentWhere:we("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 Tt({kind:o}){return l("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===E?"This is the cart drawer — edit its copy in the Settings panel →":o===M?"This is the cookie banner — pick its layout in the Settings panel →":"This is the site popup — edit it in the Settings panel →"})}const f={root:{fields:{...at},resolveFields:async(o,{fields:s})=>{if(o?.props?.kind===le)return gt();if(o?.props?.kind===H)return j(s,H,"PopupPage");if(o?.props?.kind===E)return St;if(o?.props?.kind===M)return bt;const m=s;return We()?{[Ye]:xe("Product type",l(he,{}),je,"alloy-wheel"),...m}:m},render:o=>{const{editor:s,pageBackground:m,theme:T,fonts:h}=o;if(!s?.isEditing)return tt(o);const S=ot(o,l(Tt,{kind:o.kind}));if(S)return S;const n=et(o,!0);return l(Qe,{propsTheme:T,propsFonts:h,pageBackground:typeof m=="string"?m:void 0,suppressPreviewNav:Je,overlay:q(V,{children:[l(ee,{}),l(te,{})]}),children:l(it,{children:n??l(rt,{rootProps:o,children:o.children})})})}},categories:Q(),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:i.Subscribe,SubscribeBlogs:i.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:i.Reviews,RatingBlock:i.RatingBlock,Prose:e.Prose,Cards:e.Cards,Logos:e.Logos,Ticker:e.Ticker,ContactRouting:i.ContactRouting,ContactLocations:e.ContactLocations,DealerFinder:i.DealerFinder,SignUp:i.SignUp,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:t.Collections,CollectionCard:t.CollectionCard,Events:i.Events,RateTable:i.RateTable,MessagingCards:i.MessagingCards,ContactCards:i.ContactCards,OpeningHours:i.OpeningHours,PostCard:e.PostCard,DocMetaCards:e.DocMetaCards,DocTabs:e.DocTabs,DocMasthead:e.DocMasthead,DocBody:e.DocBody,Contents:e.Contents,ListSearch:e.ListSearch,FAQ:e.FAQ,Gallery:t.Gallery,GalleryB:t.GalleryB,SpecStrip:e.SpecStrip,GalleryItem:t.GalleryItem,Manifesto:e.Manifesto,SectionHeader:e.SectionHeader,IntroBleed:e.IntroBleed,Split:e.Split,SubmitBuild:i.SubmitBuild,SubmitBox:i.SubmitBox,ReviewForm:i.ReviewForm,Form:i.Form,AppointmentBooking:i.AppointmentBooking,BookingBox:i.BookingBox,CatalogFilterBar:t.CatalogFilterBar,AlloyWheelsListing:t.AlloyWheelsListing,ProductGrid:t.ProductGrid,ProductHero:t.ProductHero,ProductGallery:t.ProductGallery,SpecTable:t.SpecTable,ProcessSteps:e.ProcessSteps,DetailRows:t.DetailRows,FitmentTable:t.FitmentTable,RelatedProducts:t.RelatedProducts,BundleOffer:t.BundleOffer,CompatibleTyres:t.CompatibleTyres,TyreSizes:t.TyreSizes,TyreFitment:t.TyreFitment,EuTyreLabel:t.EuTyreLabel,EuTyreLabelBlock:t.EuTyreLabelBlock,WheelDiagram:t.WheelDiagram,ProductSize:t.ProductSize,ProductColour:t.ProductColour,ProductPrice:t.ProductPrice,ProductBuyButton:t.ProductBuyButton,FilterBlock:t.FilterBlock,FilterChipsBlock:t.FilterChipsBlock,ProductPicture:t.ProductPicture,ProductSpecs:t.ProductSpecs,ProductBuy:t.ProductBuy,ProductEyebrow:t.ProductEyebrow,ProductName:t.ProductName,ProductSku:t.ProductSku,FitmentFinder:t.FitmentFinder,FitmentPicker:t.FitmentPicker,StockFitment:t.StockFitment,OrderSummary:e.OrderSummary,DeliveryOptions:t.DeliveryOptions,PaymentBadges:e.PaymentBadges,CheckoutCTA:t.CheckoutCTA,ProductRef:t.ProductRef,CustomHTML:e.CustomHTML,CardList:e.CardList,HostPart:e.HostPart,Header:t.Header,Footer:i.Footer,FooterLogo:i.FooterLogo,FooterMenu:i.FooterMenu,ArticleBody:i.ArticleBody,MenuLinkBlock:i.MenuLinkBlock,FooterDivider:i.FooterDivider,FooterGroup:i.FooterGroup,FooterText:i.FooterText,FooterEmailSignup:i.FooterEmailSignup,FooterSocial:i.FooterSocial,FooterMessaging:i.FooterMessaging,FooterPayment:i.FooterPayment,LegalLineBlock:i.LegalLineBlock,SearchBlock:t.SearchBlock,CartBlock:t.CartBlock,CountrySwitchBlock:t.CountrySwitchBlock,AccountBlock:t.AccountBlock,ThemeSwitchBlock:t.ThemeSwitchBlock,[Z]:i.SiteHeader,[J]:i.SiteFooter}};$e(f.components);{const o=f.components.MenuBlock;o.fields={...o.fields,direction:g("Direction",l(Ee,{}),[{label:v.column,value:"column"},{label:v.row,value:"row"}],C)};const s={type:"custom",render:({value:n,onChange:c})=>l($,{value:n,onChange:c})},m=P({type:"custom",render:({value:n,onChange:c})=>l(ve,{parts:mt,changed:n===!0,shown:()=>n===!0,onPress:(yt,z)=>c(z),onReset:()=>c(void 0)})},{not:{field:"direction",is:"column",default:C}});o.fields=Object.fromEntries(Object.entries(o.fields).flatMap(([n,c])=>n==="menu"?[["dataSource",Ve("Menu content","Manual")],[n,c],["linkRange",s],["currentPage",m]]:[[n,c]]));const T=o;T.resolveFields=(n,{fields:c})=>qe(st,c,n.props,{hides:["menu"]}),T.resolveData=n=>{const c=Xe(n.props);return c===n.props?n:{...n,props:c}},o.fields={...o.fields,linkAlign:Me({label:"Link alignment"}),...Object.fromEntries(Object.entries(He("menuStyle",g("Menu style",l(Ce,{}),[{label:"Plain",value:k},{label:"Tabs",value:B},{label:"Menu button",value:x}],k))).map(([n,c])=>[n,P(c,{not:{field:"direction",is:"column",default:C}})])),...Object.fromEntries(Object.entries(ge(be,Se)).map(([n,c])=>[n,P(c,{all:[{not:{field:"menuStyle",is:k,default:k}},{not:{field:"menuStyle",is:B}}]})]))};const h={not:{field:"menuStyle",is:B}},S={not:{field:"menuStyle",is:x}};o.fields.linkRange=P(o.fields.linkRange,{all:[h,ze]}),o.fields.linkAlign=P(o.fields.linkAlign,{all:[h,S]}),o.fields.direction=P(o.fields.direction,S)}{const o=f.components.Header,s=o.render;o.render=m=>m.editor?.isEditing?l(Ze,{editing:!0}):s(m)}const ht=lt(f);{const o=nt("none","ProductPicture",!0),s=f.components.ProductPicture;s.fields={...s.fields,[K]:o[K],[W.zoom]:o[W.zoom]}}const Io=ht.sectionGroupAllow;var No=f;export{Io as SECTION_GROUP_ALLOW,f as config,No as default,pt as subscribePopupFields};