efficient-storefront-blocks 0.78.0 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/chunks/EditorPreviewCheckout-6S2Q3GXI.js +4 -0
- package/dist/chunks/{SiteEditorProvider-YTZPWUDV.js → SiteEditorProvider-B6JGOUMX.js} +1 -1
- package/dist/chunks/chunk-IL5OJ6VZ.js +1 -0
- package/dist/chunks/chunk-NE47RYTU.js +320 -0
- package/dist/chunks/{chunk-4O66UMLS.js → chunk-WYNB6IMA.js} +1 -1
- package/dist/chunks/chunk-ZA227AIS.js +1 -0
- package/dist/chunks/{fitment-data-VU5A7VKV.js → fitment-data-KCPZ77HO.js} +1 -1
- package/dist/contract.js +1 -1
- package/dist/editor/lib/document/blocks/service/ContactCards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterEmailSignup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterMessaging/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/MessagingCards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/OpeningHours/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/RateTable/fields.js +1 -1
- package/dist/editor/lib/document/box-header.d.ts +1 -1
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +28 -34
- package/dist/links.js +1 -1
- package/dist/render/app/globals.css +39 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/checkout/checkout-state.js +3 -3
- package/dist/render/lib/api/index.d.ts +3 -0
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/api/types.d.ts +46 -0
- package/dist/render/lib/checkout/pay-first.d.ts +5 -1
- package/dist/render/lib/checkout/pay-first.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/words.d.ts +11 -0
- package/dist/words.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/EditorPreviewCheckout-IEFQC4T3.js +0 -4
- package/dist/chunks/chunk-LZTJCQ4A.js +0 -311
- package/dist/chunks/chunk-MZPZ4B7Y.js +0 -1
- package/dist/chunks/chunk-WC4XIVX3.js +0 -1
- /package/dist/chunks/{chunk-LZTJCQ4A.js.LEGAL.txt → chunk-NE47RYTU.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-TI4ZGDSG.js → chunk-PBU5KHED.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{ClockIcon as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{ClockIcon as i}from"efficient-easel/icons";import{textarea as s}from"efficient-web-builder/editor/lib/document/controls";import{select as t}from"efficient-web-builder/editor/lib/document/box-fields";import{blockSourceField as m,blockSourceFields as p}from"efficient-web-builder/editor/lib/document/block-source-fields";import{OPENING_HOURS_SHOWS as l,OPENING_HOURS_SHOW_FALLBACK as n}from"../../../../../../render/lib/document/blocks/service/OpeningHours/meta.js";const u={fields:{show:t("Show",e(i,{}),l,n),title:s("Heading","Opening hours"),dataSource:m("Hours from","None")},resolveFields:(o,{fields:r})=>p("OpeningHours",r,o.props)};export{u as OpeningHoursFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{textarea as e}from"efficient-web-builder/editor/lib/document/controls";import{
|
|
1
|
+
import{textarea as e}from"efficient-web-builder/editor/lib/document/controls";import{blockSourceField as a,blockSourceFields as i}from"efficient-web-builder/editor/lib/document/block-source-fields";const l={fields:{title:e("Heading","Rates"),description:e("Body","What a visit costs."),dataSource:a("Rates from","None")},resolveFields:(o,{fields:t})=>i("RateTable",t,o.props)};export{l as RateTableFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as l,Fragment as x,jsxs as N}from"react/jsx-runtime";import{assignSectionGroups as H,reseatBucketTabs as M}from"efficient-web-builder/editor/lib/document/field-groups";import{buildBlockCategories as G}from"efficient-web-builder/format/lib/document/section-catalog";import{FONT_ROLES as U,FONT_ROLE_LABELS as K}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 W,SITE_HEADER_TYPE as j}from"efficient-web-builder/format/lib/document/section-groups";import Y from"../../components/MenuLinkRangeField.js";import q from"../../components/EditorPreviewChat.js";import V from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as z,POPUP_DAYS_RANGE as E,POPUP_DELAY_RANGE as F,POPUP_HIDE_AFTER as X,POPUP_SCROLL_RANGE as k,POPUP_SHOW_ON as Q,POPUP_TRIGGERS as O,SUBSCRIBE_POPUP_DEFAULTS as J,SUBSCRIBE_POPUP_KIND as Z}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as P,withRowRules as $}from"efficient-web-builder/render/lib/document/show-when";import{POPUP_KIND_PROP as ee,POPUP_TEXT_KIND_LABELS as _,POPUP_TEXT_KINDS as te}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as oe}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as re}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as ie}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as ae,CART_DRAWER_KIND as L}from"efficient-web-builder/format/lib/content/cart-drawer";import{CONSENT_BANNER_KIND as C}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as le}from"../../components/ConsentBannerLayoutTiles.js";import{CategoryIcon as ne,CheckIcon as se,ClockIcon as f,ColumnsIcon as ce,DirectionIcon as me,EyeIcon as ue,ListIcon as de,PageIcon as pe,PlacementIcon as ge,ScrollPointIcon as be,TriggerIcon as Pe}from"efficient-easel/icons";import{deviceField as v}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as fe}from"efficient-web-builder/editor/components/FieldGlyph";import{multiSelect as Se,panelNote as he,plainText as a,plainTextarea as u,sectionShapeFields as Te,sectionThemeFields as ye,textList as S,toggle as R}from"efficient-web-builder/editor/lib/document/controls";import{group as c}from"efficient-easel/screen/lib/document/box-fields";import{segmented as p,select as A,slider as h}from"efficient-web-builder/editor/lib/document/box-fields";import{blockAlignRow as Be}from"./block-align-row.js";import{formPicker as Ee}from"./blocks/service/controls.js";import{SECTION_THEME_FOLLOW_LABEL as Fe}from"efficient-web-builder/editor/components/SectionThemePicker";import{nestedAccentValue as ke}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as Oe}from"efficient-web-builder/format/lib/document/editor-page-context";import{TEMPLATE_PRODUCT_TYPE_PROP as _e}from"efficient-web-builder/format/lib/content/product-page";import{PRODUCT_KIND_OPTIONS as Le}from"../../../render/lib/catalog/plp-item.js";import{PH as T}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{textKindGlyph as Ce}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";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{generalBlocks as e}from"efficient-web-builder/editor/lib/document/blocks/general/index";import{commerceBlocks as r}from"./blocks/commerce/index.js";import{serviceBlocks as i}from"./blocks/service/index.js";import{EditorThemedBody as ve,suppressPreviewNav as Re}from"efficient-web-builder/editor/lib/document/page-root";import Ae from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as De,PAGE_MENU_DIRECTION_DEFAULT as we}from"../../../render/lib/document/footer-page-blocks.js";import{drawPopupPage as Ie,drawPublishedStorefrontRoot as xe,drawSystemPage as Ne,StorefrontPageProviders as He}from"../../../render/lib/document/storefront-root.js";import{GENERAL_ROOT_FIELDS as Me}from"efficient-web-builder/editor/lib/document/page-root-fields";import{finishRegistry as Ge}from"efficient-web-builder/editor/lib/document/registry";const Ue="Newsletter (built in)",Wt=[{value:"00",label:T.label},{value:"00",label:T.label},{value:"00",label:T.label}],t=J,g={field:"autoOpen",is:!0},Ke={all:[P("hideAfter",X,t.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},We=[[["trigger","showOn","hideAfter"],g],[["autoOpenDelaySec"],{all:[g,P("trigger",O,t.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[g,P("trigger",O,t.trigger,["scroll"])]}],[["showOnPages"],{all:[g,P("showOn",Q,t.showOn,["chosen"])]}],[["hideDays"],{all:[g,Ke]}]],je=$({formSlug:Ee(void 0,Ue),_gLeft:c("Left panel"),metaLabel:a("Meta label",t.metaLabel),issueLabel:a("Issue label",t.issueLabel),issueNumber:a("Issue number",t.issueNumber),kicker:a("Eyebrow",t.kicker),heading:u("Heading",t.heading),deck:u("Deck",t.deck),stats:{type:"array",label:"Stats",arrayFields:{label:a("Label"),value:a("Value")},getItemSummary:o=>o?.label||o?.value||"Stat"},_gForm:c("Right panel · form"),formLabel:a("Section label",t.formLabel),formHeading:a("Heading",t.formHeading),formIntro:u("Intro",t.formIntro),firstNameLabel:a("First-name label",t.firstNameLabel),firstNamePlaceholder:a("First-name placeholder",t.firstNamePlaceholder),emailLabel:a("Email label",t.emailLabel),emailPlaceholder:a("Email placeholder",t.emailPlaceholder),_gChoices:c("Right panel · choices"),interestsLabel:a("Interests label",t.interestsLabel),interests:S("Interest chips",l(fe,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:a("Frequency label",t.frequencyLabel),frequencies:S("Frequency options",l(de,{}),"Option label","verbatim"),_gActions:c("Right panel · actions"),submitText:a("Submit button",t.submitText),finePrint:a("Fine print",t.finePrint),dismissText:a("Dismiss link",t.dismissText),emailInvalidText:a("Invalid-email error",t.emailInvalidText),submitErrorText:a("Submit-failed error",t.submitErrorText),_gSuccess:c("Success state"),successHeading:a("Heading",t.successHeading),successBody:u("Message",t.successBody),keepBrowsingText:a("Dismiss button",t.keepBrowsingText),...ye(ke,Fe),...Te(),_gTextStyle:c("Text style"),...Object.fromEntries(te.map(o=>[ee[o],A(_[o],Ce(_[o]),[{label:"Popup's own",value:""},...U.map(n=>({label:K[n],value:n}))],"")])),_gBehaviour:c("Behavior"),autoOpen:R("Show by itself",t.autoOpen,l(ue,{})),trigger:p("Trigger",l(Pe,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],t.trigger),autoOpenDelaySec:h("Delay",l(f,{}),F.min,F.max,1,t.autoOpenDelaySec,"s"),scrollPercent:h("Scroll",l(be,{}),k.min,k.max,5,t.scrollPercent,"%"),showOn:p("Pages",l(pe,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],t.showOn),showOnPages:Se("Chosen pages",[],"None"),hideAfter:p("After close",l(f,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],t.hideAfter),hideDays:h("Days",l(f,{}),E.min,E.max,1,t.hideDays),_gArrangement:c("Arrangement"),formSide:p("Form side",l(ge,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],t.formSide),_gPhone:v("mobile",c("On a phone")),valuePanelOnPhone:v("mobile",R("Left panel",t.valuePanelOnPhone,l(ce,{})))},We),D=H(je,"SubscribePopup");async function Ye(){return(await oe(ie()??"")).filter(n=>!z(n.slug)).map(n=>({label:n.label,value:re(n.slug)}))}async function qe(){return M({...D,showOnPages:{...D.showOnPages,options:await Ye().catch(()=>[])}})}const m=ae,Ve={_gHeader:c("Header"),kickerBadge:a("Eyebrow badge",m.kickerBadge),kickerText:a("Eyebrow text",m.kickerText),titleLead:a("Heading",m.titleLead),titleAccent:a("Heading accent",m.titleAccent),subtitleEmpty:u("Sub-line · empty",m.subtitleEmpty),subtitleOne:u("Sub-line · one set",m.subtitleOne),subtitleMany:u("Sub-line · several sets",m.subtitleMany,"{count} becomes the number of sets"),_gStatus:c("Status rail"),leadTimeValue:a("Lead time",m.leadTimeValue),shipsToFallback:a("Ships to · fallback",m.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:c("Promise row"),promises:S("Trust markers",l(se,{}),"Marker","verbatim"),_gEmpty:c("Empty basket"),emptyKicker:a("Eyebrow",m.emptyKicker),emptyBody:u("Message",m.emptyBody)},ze={layout:le,_nConsentWhere:he("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 Xe({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===L?"This is the cart drawer — edit its copy in the Settings panel →":o===C?"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:{...Me},resolveFields:async(o,{fields:n})=>{if(o?.props?.kind===Z)return qe();if(o?.props?.kind===L)return Ve;if(o?.props?.kind===C)return ze;const s=n;return Oe()?{[_e]:A("Product type",l(ne,{}),Le,"alloy-wheel"),...s}:s},render:o=>{const{editor:n,pageBackground:s,theme:d,fonts:w}=o;if(!n?.isEditing)return xe(o);const y=Ne(o,l(Xe,{kind:o.kind}));if(y)return y;const I=Ie(o,!0);return l(ve,{propsTheme:d,propsFonts:w,pageBackground:typeof s=="string"?s:void 0,suppressPreviewNav:Re,overlay:N(x,{children:[l(q,{}),l(V,{})]}),children:I??l(He,{rootProps:o,children:o.children})})}},categories:G(),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,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:r.Collections,CollectionCard:r.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,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:i.SubmitBuild,SubmitBox:i.SubmitBox,ReviewForm:i.ReviewForm,Form:i.Form,AppointmentBooking:i.AppointmentBooking,BookingBox:i.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:i.Footer,FooterLogo:i.FooterLogo,FooterMenu:i.FooterMenu,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:r.SearchBlock,CartBlock:r.CartBlock,CountrySwitchBlock:r.CountrySwitchBlock,AccountBlock:r.AccountBlock,ThemeSwitchBlock:r.ThemeSwitchBlock,[j]:i.SiteHeader,[W]:i.SiteFooter}};De(b.components);{const o=b.components.MenuBlock;o.fields={...o.fields,direction:p("Direction",l(me,{}),[{label:B.column,value:"column"},{label:B.row,value:"row"}],we)};const n={type:"custom",render:({value:s,onChange:d})=>l(Y,{value:s,onChange:d})};o.fields=Object.fromEntries(Object.entries(o.fields).flatMap(([s,d])=>s==="menu"?[[s,d],["linkRange",n]]:[[s,d]])),o.fields={...o.fields,linkAlign:Be({label:"Link alignment"})}}{const o=b.components.Header,n=o.render;o.render=s=>s.editor?.isEditing?l(Ae,{editing:!0}):n(s)}const Qe=Ge(b),jt=Qe.sectionGroupAllow;var Yt=b;export{jt as SECTION_GROUP_ALLOW,b as config,Yt as default,je as subscribePopupFields};
|
|
1
|
+
import{jsx as l,Fragment as x,jsxs as N}from"react/jsx-runtime";import{assignSectionGroups as H,reseatBucketTabs as M}from"efficient-web-builder/editor/lib/document/field-groups";import{buildBlockCategories as G}from"efficient-web-builder/format/lib/document/section-catalog";import{FONT_ROLES as U,FONT_ROLE_LABELS as K}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 W,SITE_HEADER_TYPE as j}from"efficient-web-builder/format/lib/document/section-groups";import Y from"../../components/MenuLinkRangeField.js";import q from"../../components/EditorPreviewChat.js";import V from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as z,POPUP_DAYS_RANGE as E,POPUP_DELAY_RANGE as F,POPUP_HIDE_AFTER as X,POPUP_SCROLL_RANGE as k,POPUP_SHOW_ON as Q,POPUP_TRIGGERS as O,SUBSCRIBE_POPUP_DEFAULTS as J,SUBSCRIBE_POPUP_KIND as Z}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as P,withRowRules as $}from"efficient-web-builder/render/lib/document/show-when";import{POPUP_KIND_PROP as ee,POPUP_TEXT_KIND_LABELS as _,POPUP_TEXT_KINDS as te}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as oe}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as re}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as ie}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as ae,CART_DRAWER_KIND as L}from"efficient-web-builder/format/lib/content/cart-drawer";import{CONSENT_BANNER_KIND as C}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as le}from"../../components/ConsentBannerLayoutTiles.js";import{CategoryIcon as ne,CheckIcon as se,ClockIcon as f,ColumnsIcon as ce,DirectionIcon as me,EyeIcon as ue,ListIcon as de,PageIcon as pe,PlacementIcon as ge,ScrollPointIcon as be,TriggerIcon as Pe}from"efficient-easel/icons";import{deviceField as v}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as fe}from"efficient-web-builder/editor/components/FieldGlyph";import{multiSelect as Se,panelNote as he,plainText as a,plainTextarea as u,sectionShapeFields as Te,sectionThemeFields as ye,textList as S,toggle as R}from"efficient-web-builder/editor/lib/document/controls";import{group as c}from"efficient-easel/screen/lib/document/box-fields";import{segmented as p,select as A,slider as h}from"efficient-web-builder/editor/lib/document/box-fields";import{blockAlignRow as Be}from"./block-align-row.js";import{formPicker as Ee}from"./blocks/service/controls.js";import{SECTION_THEME_FOLLOW_LABEL as Fe}from"efficient-web-builder/editor/components/SectionThemePicker";import{nestedAccentValue as ke}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as Oe}from"efficient-web-builder/format/lib/document/editor-page-context";import{TEMPLATE_PRODUCT_TYPE_PROP as _e}from"efficient-web-builder/format/lib/content/product-page";import{PRODUCT_KIND_OPTIONS as Le}from"../../../render/lib/catalog/plp-item.js";import{PH as T}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{textKindGlyph as Ce}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";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{generalBlocks as e}from"efficient-web-builder/editor/lib/document/blocks/general/index";import{commerceBlocks as r}from"./blocks/commerce/index.js";import{serviceBlocks as i}from"./blocks/service/index.js";import{EditorThemedBody as ve,suppressPreviewNav as Re}from"efficient-web-builder/editor/lib/document/page-root";import Ae from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as De,PAGE_MENU_DIRECTION_DEFAULT as we}from"../../../render/lib/document/footer-page-blocks.js";import{drawPopupPage as Ie,drawPublishedStorefrontRoot as xe,drawSystemPage as Ne,StorefrontPageProviders as He}from"../../../render/lib/document/storefront-root.js";import{GENERAL_ROOT_FIELDS as Me}from"efficient-web-builder/editor/lib/document/page-root-fields";import{finishRegistry as Ge}from"efficient-web-builder/editor/lib/document/registry";const Ue="Newsletter (built in)",Wt=[{value:"00",label:T.label},{value:"00",label:T.label},{value:"00",label:T.label}],t=J,g={field:"autoOpen",is:!0},Ke={all:[P("hideAfter",X,t.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},We=[[["trigger","showOn","hideAfter"],g],[["autoOpenDelaySec"],{all:[g,P("trigger",O,t.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[g,P("trigger",O,t.trigger,["scroll"])]}],[["showOnPages"],{all:[g,P("showOn",Q,t.showOn,["chosen"])]}],[["hideDays"],{all:[g,Ke]}]],je=$({formSlug:Ee(void 0,Ue),_gLeft:c("Left panel"),metaLabel:a("Meta label",t.metaLabel),issueLabel:a("Issue label",t.issueLabel),issueNumber:a("Issue number",t.issueNumber),kicker:a("Eyebrow",t.kicker),heading:u("Heading",t.heading),deck:u("Deck",t.deck),stats:{type:"array",label:"Stats",arrayFields:{label:a("Label"),value:a("Value")},getItemSummary:o=>o?.label||o?.value||"Stat"},_gForm:c("Right panel · form"),formLabel:a("Section label",t.formLabel),formHeading:a("Heading",t.formHeading),formIntro:u("Intro",t.formIntro),firstNameLabel:a("First-name label",t.firstNameLabel),firstNamePlaceholder:a("First-name placeholder",t.firstNamePlaceholder),emailLabel:a("Email label",t.emailLabel),emailPlaceholder:a("Email placeholder",t.emailPlaceholder),_gChoices:c("Right panel · choices"),interestsLabel:a("Interests label",t.interestsLabel),interests:S("Interest chips",l(fe,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:a("Frequency label",t.frequencyLabel),frequencies:S("Frequency options",l(de,{}),"Option label","verbatim"),_gActions:c("Right panel · actions"),submitText:a("Submit button",t.submitText),finePrint:a("Fine print",t.finePrint),dismissText:a("Dismiss link",t.dismissText),emailInvalidText:a("Invalid-email error",t.emailInvalidText),submitErrorText:a("Submit-failed error",t.submitErrorText),_gSuccess:c("Success state"),successHeading:a("Heading",t.successHeading),successBody:u("Message",t.successBody),keepBrowsingText:a("Dismiss button",t.keepBrowsingText),...ye(ke,Fe),...Te(),_gTextStyle:c("Text style"),...Object.fromEntries(te.map(o=>[ee[o],A(_[o],Ce(_[o]),[{label:"Popup's own",value:""},...U.map(n=>({label:K[n],value:n}))],"")])),_gBehaviour:c("Behavior"),autoOpen:R("Show by itself",t.autoOpen,l(ue,{})),trigger:p("Trigger",l(Pe,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],t.trigger),autoOpenDelaySec:h("Delay",l(f,{}),F.min,F.max,1,t.autoOpenDelaySec,"s"),scrollPercent:h("Scroll",l(be,{}),k.min,k.max,5,t.scrollPercent,"%"),showOn:p("Pages",l(pe,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],t.showOn),showOnPages:Se("Chosen pages",[],"None"),hideAfter:p("After close",l(f,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],t.hideAfter),hideDays:h("Days",l(f,{}),E.min,E.max,1,t.hideDays),_gArrangement:c("Arrangement"),formSide:p("Form side",l(ge,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],t.formSide),_gPhone:v("mobile",c("On a phone")),valuePanelOnPhone:v("mobile",R("Left panel",t.valuePanelOnPhone,l(ce,{})))},We),D=H(je,"SubscribePopup");async function Ye(){return(await oe(ie()??"")).filter(n=>!z(n.slug)).map(n=>({label:n.label,value:re(n.slug)}))}async function qe(){return M({...D,showOnPages:{...D.showOnPages,options:await Ye().catch(()=>[])}})}const m=ae,Ve={_gHeader:c("Header"),kickerBadge:a("Eyebrow badge",m.kickerBadge),kickerText:a("Eyebrow text",m.kickerText),titleLead:a("Heading",m.titleLead),titleAccent:a("Heading accent",m.titleAccent),subtitleEmpty:u("Sub-line · empty",m.subtitleEmpty),subtitleOne:u("Sub-line · one set",m.subtitleOne),subtitleMany:u("Sub-line · several sets",m.subtitleMany,"{count} becomes the number of sets"),_gStatus:c("Status rail"),leadTimeValue:a("Lead time",m.leadTimeValue),shipsToFallback:a("Ships to · fallback",m.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:c("Promise row"),promises:S("Trust markers",l(se,{}),"Marker","verbatim"),_gEmpty:c("Empty basket"),emptyKicker:a("Eyebrow",m.emptyKicker),emptyBody:u("Message",m.emptyBody)},ze={layout:le,_nConsentWhere:he("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 Xe({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===L?"This is the cart drawer — edit its copy in the Settings panel →":o===C?"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:{...Me},resolveFields:async(o,{fields:n})=>{if(o?.props?.kind===Z)return qe();if(o?.props?.kind===L)return Ve;if(o?.props?.kind===C)return ze;const s=n;return Oe()?{[_e]:A("Product type",l(ne,{}),Le,"alloy-wheel"),...s}:s},render:o=>{const{editor:n,pageBackground:s,theme:d,fonts:w}=o;if(!n?.isEditing)return xe(o);const y=Ne(o,l(Xe,{kind:o.kind}));if(y)return y;const I=Ie(o,!0);return l(ve,{propsTheme:d,propsFonts:w,pageBackground:typeof s=="string"?s:void 0,suppressPreviewNav:Re,overlay:N(x,{children:[l(q,{}),l(V,{})]}),children:I??l(He,{rootProps:o,children:o.children})})}},categories:G(),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,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:r.Collections,CollectionCard:r.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,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:i.SubmitBuild,SubmitBox:i.SubmitBox,ReviewForm:i.ReviewForm,Form:i.Form,AppointmentBooking:i.AppointmentBooking,BookingBox:i.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:i.Footer,FooterLogo:i.FooterLogo,FooterMenu:i.FooterMenu,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:r.SearchBlock,CartBlock:r.CartBlock,CountrySwitchBlock:r.CountrySwitchBlock,AccountBlock:r.AccountBlock,ThemeSwitchBlock:r.ThemeSwitchBlock,[j]:i.SiteHeader,[W]:i.SiteFooter}};De(b.components);{const o=b.components.MenuBlock;o.fields={...o.fields,direction:p("Direction",l(me,{}),[{label:B.column,value:"column"},{label:B.row,value:"row"}],we)};const n={type:"custom",render:({value:s,onChange:d})=>l(Y,{value:s,onChange:d})};o.fields=Object.fromEntries(Object.entries(o.fields).flatMap(([s,d])=>s==="menu"?[[s,d],["linkRange",n]]:[[s,d]])),o.fields={...o.fields,linkAlign:Be({label:"Link alignment"})}}{const o=b.components.Header,n=o.render;o.render=s=>s.editor?.isEditing?l(Ae,{editing:!0}):n(s)}const Qe=Ge(b),jt=Qe.sectionGroupAllow;var Yt=b;export{jt as SECTION_GROUP_ALLOW,b as config,Yt as default,je as subscribePopupFields};
|
package/dist/index.d.ts
CHANGED
|
@@ -475,7 +475,9 @@ export interface SiteThemeRow {
|
|
|
475
475
|
heading_max_px?: number | null;
|
|
476
476
|
site_width?: number | null;
|
|
477
477
|
site_gutter?: number | null;
|
|
478
|
+
site_gutter_phone?: number | null;
|
|
478
479
|
block_gap?: number | null;
|
|
480
|
+
block_gap_phone?: number | null;
|
|
479
481
|
hero_background_follows_width?: boolean | null;
|
|
480
482
|
section_background_width?: "full" | "content" | null;
|
|
481
483
|
section_content_width?: "full" | "content" | null;
|