efficient-storefront-blocks 0.70.0 → 0.75.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 (136) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/chunks/EditorPreviewCheckout-27GNLSNR.js +4 -0
  3. package/dist/chunks/{SiteEditorProvider-3GKJZDL5.js → SiteEditorProvider-N4T55FAV.js} +1 -1
  4. package/dist/chunks/chunk-3TBLX25X.js +1 -0
  5. package/dist/chunks/chunk-4V6BLJSG.js +1 -0
  6. package/dist/chunks/{chunk-QWHNN7GF.js → chunk-K26JUDGZ.js} +1 -1
  7. package/dist/chunks/chunk-SJODSVWU.js +1 -0
  8. package/dist/chunks/chunk-WPHE7RI4.js +246 -0
  9. package/dist/chunks/{fitment-data-6GK7QQQI.js → fitment-data-5ZSHENM3.js} +1 -1
  10. package/dist/contract.js +2 -2
  11. package/dist/editor/components/CategorySource.js +1 -1
  12. package/dist/editor/components/HeaderSettingsPanel.js +1 -1
  13. package/dist/editor/components/PreviewHeader.d.ts +0 -1
  14. package/dist/editor/components/PreviewHeader.js +1 -11
  15. package/dist/editor/lib/document/blocks/service/ContactCards/fields.d.ts +2 -0
  16. package/dist/editor/lib/document/blocks/service/ContactCards/fields.js +1 -0
  17. package/dist/editor/lib/document/blocks/service/ContactRouting/fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/service/FooterMessaging/fields.d.ts +2 -0
  19. package/dist/editor/lib/document/blocks/service/FooterMessaging/fields.js +1 -0
  20. package/dist/editor/lib/document/blocks/service/FooterPayment/fields.d.ts +2 -0
  21. package/dist/editor/lib/document/blocks/service/FooterPayment/fields.js +1 -0
  22. package/dist/editor/lib/document/blocks/service/MessagingCards/fields.d.ts +2 -0
  23. package/dist/editor/lib/document/blocks/service/MessagingCards/fields.js +1 -0
  24. package/dist/editor/lib/document/blocks/service/Reviews/fields.js +1 -1
  25. package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
  26. package/dist/editor/lib/document/blocks/service/index.js +1 -1
  27. package/dist/editor/lib/document/config.d.ts +2 -0
  28. package/dist/editor/lib/document/config.js +1 -1
  29. package/dist/editor/lib/efficient-backend.js +1 -1
  30. package/dist/editor/lib/efficient-block-sources.js +1 -1
  31. package/dist/editor/lib/header-settings-source.d.ts +2 -1
  32. package/dist/editor/lib/header-settings-source.js +1 -1
  33. package/dist/editor/lib/storefront-editor-words.d.ts +19 -5
  34. package/dist/editor/lib/storefront-editor-words.js +1 -1
  35. package/dist/editor.css +1 -1
  36. package/dist/index.d.ts +0 -2
  37. package/dist/index.js +296 -200
  38. package/dist/links.d.ts +0 -2
  39. package/dist/links.js +1 -1
  40. package/dist/render/built-with.json +1 -1
  41. package/dist/render/components/CartContext.d.ts +3 -0
  42. package/dist/render/components/CartContext.js +1 -1
  43. package/dist/render/components/ChatLauncher.js +1 -1
  44. package/dist/render/components/ContactCards.d.ts +13 -0
  45. package/dist/render/components/ContactCards.js +1 -0
  46. package/dist/render/components/CopyText.d.ts +4 -0
  47. package/dist/render/components/CopyText.js +1 -0
  48. package/dist/render/components/Events.d.ts +3 -0
  49. package/dist/render/components/Events.js +1 -1
  50. package/dist/render/components/FooterMessaging.d.ts +5 -0
  51. package/dist/render/components/FooterMessaging.js +1 -0
  52. package/dist/render/components/FooterPayment.d.ts +11 -0
  53. package/dist/render/components/FooterPayment.js +1 -0
  54. package/dist/render/components/GalleryItem.js +1 -1
  55. package/dist/render/components/GalleryShowcase.js +1 -1
  56. package/dist/render/components/Header.d.ts +2 -1
  57. package/dist/render/components/Header.js +1 -1
  58. package/dist/render/components/HeaderCallButton.d.ts +9 -0
  59. package/dist/render/components/HeaderCallButton.js +1 -0
  60. package/dist/render/components/HeaderToolBlocks.d.ts +1 -2
  61. package/dist/render/components/HeaderToolBlocks.js +1 -1
  62. package/dist/render/components/MessagingCards.d.ts +9 -0
  63. package/dist/render/components/MessagingCards.js +1 -0
  64. package/dist/render/components/QrCode.d.ts +5 -0
  65. package/dist/render/components/QrCode.js +1 -0
  66. package/dist/render/components/Reviews.d.ts +14 -4
  67. package/dist/render/components/Reviews.js +1 -1
  68. package/dist/render/components/SectionGroupBody.js +1 -1
  69. package/dist/render/components/checkout/CheckoutPageClient.d.ts +2 -25
  70. package/dist/render/components/checkout/CheckoutPageClient.js +1 -3
  71. package/dist/render/components/checkout/checkout-parts.d.ts +5 -0
  72. package/dist/render/components/checkout/checkout-parts.js +1 -0
  73. package/dist/render/components/checkout/checkout-state.d.ts +174 -0
  74. package/dist/render/components/checkout/checkout-state.js +3 -0
  75. package/dist/render/lib/api/index.d.ts +1 -8
  76. package/dist/render/lib/api/index.js +1 -1
  77. package/dist/render/lib/api/types.d.ts +10 -3
  78. package/dist/render/lib/content/site.d.ts +1 -1
  79. package/dist/render/lib/document/blocks/commerce/CountrySwitchBlock/render.js +1 -1
  80. package/dist/render/lib/document/blocks/service/ContactCards/meta.d.ts +7 -0
  81. package/dist/render/lib/document/blocks/service/ContactCards/meta.js +1 -0
  82. package/dist/render/lib/document/blocks/service/ContactCards/render.d.ts +4 -0
  83. package/dist/render/lib/document/blocks/service/ContactCards/render.js +1 -0
  84. package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
  85. package/dist/render/lib/document/blocks/service/Footer/meta.js +1 -1
  86. package/dist/render/lib/document/blocks/service/FooterGroup/meta.js +1 -1
  87. package/dist/render/lib/document/blocks/service/FooterMessaging/meta.d.ts +2 -0
  88. package/dist/render/lib/document/blocks/service/FooterMessaging/meta.js +1 -0
  89. package/dist/render/lib/document/blocks/service/FooterMessaging/render.d.ts +2 -0
  90. package/dist/render/lib/document/blocks/service/FooterMessaging/render.js +1 -0
  91. package/dist/render/lib/document/blocks/service/FooterPayment/meta.d.ts +3 -0
  92. package/dist/render/lib/document/blocks/service/FooterPayment/meta.js +1 -0
  93. package/dist/render/lib/document/blocks/service/FooterPayment/render.d.ts +2 -0
  94. package/dist/render/lib/document/blocks/service/FooterPayment/render.js +1 -0
  95. package/dist/render/lib/document/blocks/service/MessagingCards/meta.d.ts +2 -0
  96. package/dist/render/lib/document/blocks/service/MessagingCards/meta.js +1 -0
  97. package/dist/render/lib/document/blocks/service/MessagingCards/render.d.ts +4 -0
  98. package/dist/render/lib/document/blocks/service/MessagingCards/render.js +1 -0
  99. package/dist/render/lib/document/blocks/service/Reviews/meta.d.ts +6 -0
  100. package/dist/render/lib/document/blocks/service/Reviews/meta.js +1 -1
  101. package/dist/render/lib/document/blocks/service/Reviews/render.js +1 -1
  102. package/dist/render/lib/document/blocks/service/metas.d.ts +4 -0
  103. package/dist/render/lib/document/blocks/service/metas.js +1 -1
  104. package/dist/render/lib/document/blocks/service/renders.d.ts +4 -0
  105. package/dist/render/lib/document/blocks/service/renders.js +1 -1
  106. package/dist/render/lib/document/blocks/text-part-shapes.json +137 -6
  107. package/dist/render/lib/document/card-templates.d.ts +2 -0
  108. package/dist/render/lib/document/card-templates.js +1 -0
  109. package/dist/render/lib/document/footer-page-blocks.d.ts +1 -0
  110. package/dist/render/lib/document/footer-page-blocks.js +1 -1
  111. package/dist/render/lib/document/lazy-draws.js +1 -1
  112. package/dist/render/lib/document/render-config.d.ts +2 -0
  113. package/dist/render/lib/document/render-config.js +1 -1
  114. package/dist/render/lib/document/section-to-box-rows-reviews.d.ts +1 -0
  115. package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -0
  116. package/dist/render/lib/links/link-rules.d.ts +1 -1
  117. package/dist/render/lib/links/link-rules.js +1 -1
  118. package/dist/render/lib/qr.d.ts +5 -0
  119. package/dist/render/lib/qr.js +1 -0
  120. package/dist/render/lib/sections/messaging.d.ts +45 -0
  121. package/dist/render/lib/sections/messaging.js +1 -0
  122. package/dist/render/lib/sections/reviews.d.ts +1 -0
  123. package/dist/render/lib/sections/reviews.js +1 -0
  124. package/dist/render/lib/wheels/catalog-default-layout.js +1 -1
  125. package/dist/render/lib/wheels/collections.js +1 -1
  126. package/dist/words.d.ts +42 -10
  127. package/dist/words.js +4 -4
  128. package/package.json +7 -4
  129. package/dist/chunks/EditorPreviewCheckout-XI4VULPL.js +0 -4
  130. package/dist/chunks/chunk-RPLNV3WM.js +0 -1
  131. package/dist/chunks/chunk-SQH6XBRG.js +0 -1
  132. package/dist/chunks/chunk-TXTTPEQA.js +0 -1
  133. package/dist/chunks/chunk-XF2ZAVNU.js +0 -262
  134. package/dist/render/components/useStorefrontReviews.d.ts +0 -2
  135. package/dist/render/components/useStorefrontReviews.js +0 -1
  136. /package/dist/chunks/{chunk-XF2ZAVNU.js.LEGAL.txt → chunk-WPHE7RI4.js.LEGAL.txt} +0 -0
@@ -1 +1 @@
1
- export declare const serviceBlocks: Record<"Form" | "Footer" | "FooterGroup" | "Events" | "SiteHeader" | "SiteFooter" | "AppointmentBooking" | "BookingBox" | "SubmitBuild" | "SubmitBox" | "FooterLogo" | "FooterMenu" | "FooterDivider" | "FooterText" | "FooterEmailSignup" | "FooterSocial" | "Subscribe" | "OpeningHours" | "RateTable" | "Reviews" | "ReviewForm" | "ContactRouting" | "LegalLineBlock" | "RatingBlock" | "SubscribeBlogs", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
1
+ export declare const serviceBlocks: Record<"Form" | "Reviews" | "Footer" | "FooterGroup" | "Events" | "SiteHeader" | "SiteFooter" | "AppointmentBooking" | "BookingBox" | "SubmitBuild" | "SubmitBox" | "FooterLogo" | "FooterMenu" | "FooterDivider" | "FooterText" | "FooterEmailSignup" | "FooterSocial" | "FooterPayment" | "Subscribe" | "OpeningHours" | "RateTable" | "MessagingCards" | "FooterMessaging" | "ReviewForm" | "ContactRouting" | "LegalLineBlock" | "ContactCards" | "RatingBlock" | "SubscribeBlogs", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
@@ -1 +1 @@
1
- import{assembleBlocks as o}from"efficient-web-builder/format/lib/document/blocks/block-types";import{SITE_FOOTER_TYPE as i,SITE_HEADER_TYPE as r}from"efficient-web-builder/format/lib/document/section-groups";import{AppointmentBookingFields as e}from"./AppointmentBooking/fields.js";import{BookingBoxFields as t}from"./BookingBox/fields.js";import{ContactRoutingFields as m}from"./ContactRouting/fields.js";import{EventsFields as F}from"./Events/fields.js";import{FooterFields as l}from"./Footer/fields.js";import{FooterDividerFields as s}from"./FooterDivider/fields.js";import{FooterEmailSignupFields as p}from"./FooterEmailSignup/fields.js";import{FooterGroupFields as d}from"./FooterGroup/fields.js";import{FooterLogoFields as f}from"./FooterLogo/fields.js";import{FooterMenuFields as n}from"./FooterMenu/fields.js";import{FooterSocialFields as u}from"./FooterSocial/fields.js";import{FooterTextFields as S}from"./FooterText/fields.js";import{FormFields as g}from"./Form/fields.js";import{LegalLineBlockFields as B}from"./LegalLineBlock/fields.js";import{OpeningHoursFields as E}from"./OpeningHours/fields.js";import{RateTableFields as c}from"./RateTable/fields.js";import{RatingBlockFields as a}from"./RatingBlock/fields.js";import{ReviewFormFields as R}from"./ReviewForm/fields.js";import{ReviewsFields as b}from"./Reviews/fields.js";import{SiteFooterFields as k}from"./SiteFooter/fields.js";import{SiteHeaderFields as v}from"./SiteHeader/fields.js";import{SubmitBoxFields as T}from"./SubmitBox/fields.js";import{SubmitBuildFields as x}from"./SubmitBuild/fields.js";import{SubscribeFields as L}from"./Subscribe/fields.js";import{SubscribeBlogsFields as _}from"./SubscribeBlogs/fields.js";import{SERVICE_RENDERS as D}from"../../../../../render/lib/document/blocks/service/renders.js";const I={AppointmentBooking:e,BookingBox:t,ContactRouting:m,Events:F,Footer:l,FooterDivider:s,FooterEmailSignup:p,FooterGroup:d,FooterLogo:f,FooterMenu:n,FooterSocial:u,FooterText:S,Form:g,LegalLineBlock:B,OpeningHours:E,RateTable:c,RatingBlock:a,ReviewForm:R,Reviews:b,[i]:k,[r]:v,SubmitBox:T,SubmitBuild:x,Subscribe:L,SubscribeBlogs:_},to=o(D,I);export{to as serviceBlocks};
1
+ import{assembleBlocks as o}from"efficient-web-builder/format/lib/document/blocks/block-types";import{SITE_FOOTER_TYPE as i,SITE_HEADER_TYPE as r}from"efficient-web-builder/format/lib/document/section-groups";import{AppointmentBookingFields as e}from"./AppointmentBooking/fields.js";import{BookingBoxFields as t}from"./BookingBox/fields.js";import{ContactRoutingFields as m}from"./ContactRouting/fields.js";import{EventsFields as s}from"./Events/fields.js";import{FooterFields as F}from"./Footer/fields.js";import{FooterDividerFields as l}from"./FooterDivider/fields.js";import{FooterEmailSignupFields as p}from"./FooterEmailSignup/fields.js";import{FooterGroupFields as d}from"./FooterGroup/fields.js";import{FooterLogoFields as n}from"./FooterLogo/fields.js";import{FooterMenuFields as f}from"./FooterMenu/fields.js";import{FooterSocialFields as a}from"./FooterSocial/fields.js";import{FooterPaymentFields as g}from"./FooterPayment/fields.js";import{FooterTextFields as u}from"./FooterText/fields.js";import{FormFields as S}from"./Form/fields.js";import{LegalLineBlockFields as c}from"./LegalLineBlock/fields.js";import{OpeningHoursFields as B}from"./OpeningHours/fields.js";import{RateTableFields as E}from"./RateTable/fields.js";import{MessagingCardsFields as R}from"./MessagingCards/fields.js";import{FooterMessagingFields as b}from"./FooterMessaging/fields.js";import{ContactCardsFields as k}from"./ContactCards/fields.js";import{RatingBlockFields as C}from"./RatingBlock/fields.js";import{ReviewFormFields as v}from"./ReviewForm/fields.js";import{ReviewsFields as T}from"./Reviews/fields.js";import{SiteFooterFields as x}from"./SiteFooter/fields.js";import{SiteHeaderFields as L}from"./SiteHeader/fields.js";import{SubmitBoxFields as M}from"./SubmitBox/fields.js";import{SubmitBuildFields as _}from"./SubmitBuild/fields.js";import{SubscribeFields as D}from"./Subscribe/fields.js";import{SubscribeBlogsFields as I}from"./SubscribeBlogs/fields.js";import{SERVICE_RENDERS as w}from"../../../../../render/lib/document/blocks/service/renders.js";const H={AppointmentBooking:e,BookingBox:t,ContactRouting:m,Events:s,Footer:F,FooterDivider:l,FooterEmailSignup:p,FooterGroup:d,FooterLogo:n,FooterMenu:f,FooterSocial:a,FooterPayment:g,FooterText:u,Form:S,LegalLineBlock:c,OpeningHours:B,RateTable:E,MessagingCards:R,FooterMessaging:b,ContactCards:k,RatingBlock:C,ReviewForm:v,Reviews:T,[i]:x,[r]:L,SubmitBox:M,SubmitBuild:_,Subscribe:D,SubscribeBlogs:I},ao=o(w,H);export{ao as serviceBlocks};
@@ -1,6 +1,8 @@
1
1
  import { type Config } from "efficient-easel/blocks";
2
2
  import "../efficient-backend.js";
3
3
  import "../../../render/lib/document/slot-seeds.js";
4
+ import "../../../render/lib/document/card-templates.js";
5
+ import "../../../render/lib/document/section-to-box-rows-reviews.js";
4
6
  export declare const subscribePopupFields: {
5
7
  _gBehaviour: import("efficient-web-builder/editor/lib/document/controls").CustomField<undefined>;
6
8
  autoOpen: import("efficient-web-builder/editor/lib/document/controls").CustomField<boolean>;
@@ -1 +1 @@
1
- import{jsx as l,Fragment as U,jsxs as W}from"react/jsx-runtime";import{assignSectionGroups as K,reseatBucketTabs as j}from"efficient-web-builder/editor/lib/document/field-groups";import{buildBlockCategories as Y}from"efficient-web-builder/format/lib/document/section-catalog";import{FONT_ROLES as q,FONT_ROLE_LABELS as V}from"efficient-web-builder/format/lib/fonts";import{CONTAINER_DIRECTION_LABELS as E}from"efficient-web-builder/format/lib/content/container-direction";import{SITE_FOOTER_TYPE as X,SITE_HEADER_TYPE as z}from"efficient-web-builder/format/lib/document/section-groups";import Q from"../../components/MenuLinkRangeField.js";import J from"../../components/EditorPreviewChat.js";import Z from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as $,POPUP_DAYS_RANGE as _,POPUP_DELAY_RANGE as O,POPUP_HIDE_AFTER as ee,POPUP_SCROLL_RANGE as L,POPUP_SHOW_ON as te,POPUP_TRIGGERS as k,SUBSCRIBE_POPUP_DEFAULTS as oe,SUBSCRIBE_POPUP_KIND as re}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as P,withRowRules as ie}from"efficient-web-builder/render/lib/document/show-when";import{POPUP_KIND_PROP as ae,POPUP_TEXT_KIND_LABELS as F,POPUP_TEXT_KINDS as le}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as ne}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as se}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as ce}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as me,CART_DRAWER_KIND as v}from"efficient-web-builder/format/lib/content/cart-drawer";import{CONSENT_BANNER_KIND as R}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as ue}from"../../components/ConsentBannerLayoutTiles.js";import{AlignLeftIcon as de,CategoryIcon as pe,CheckIcon as C,ClockIcon as h,ColumnsIcon as ge,DirectionIcon as be,EyeIcon as Pe,ListIcon as fe,PageIcon as he,PlacementIcon as Se,ScrollPointIcon as Te,TriggerIcon as ye}from"efficient-easel/icons";import{deviceField as A}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as Be}from"efficient-web-builder/editor/components/FieldGlyph";import{group as s,multiSelect as Ee,panelNote as D,plainText as i,plainTextarea as u,sectionShapeFields as _e,sectionThemeFields as Oe,segmented as p,select as w,slider as S,textList as f,toggle as I}from"efficient-web-builder/editor/lib/document/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 Fe}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as ve}from"efficient-web-builder/format/lib/document/editor-page-context";import{PRODUCT_HERO_BULLETS_PROP as Re,HERO_BULLET_EXAMPLE as Ce,heroBulletLine as Ae}from"../../../render/lib/content/product-hero.js";import{TEMPLATE_PRODUCT_TYPE_PROP as De}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 T}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{textKindGlyph as Ie}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";import"../efficient-backend.js";import"../../../render/lib/document/slot-seeds.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 a}from"./blocks/service/index.js";import{EditorThemedBody as xe,suppressPreviewNav as He}from"efficient-web-builder/editor/lib/document/page-root";import Ne from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as Me,PAGE_MENU_DIRECTION_DEFAULT as Ge}from"../../../render/lib/document/footer-page-blocks.js";import{drawPopupPage as Ue,drawPublishedStorefrontRoot as We,drawSystemPage as Ke,StorefrontPageProviders as je}from"../../../render/lib/document/storefront-root.js";import{GENERAL_ROOT_FIELDS as Ye}from"efficient-web-builder/editor/lib/document/page-root-fields";import{finishRegistry as qe}from"efficient-web-builder/editor/lib/document/registry";const Ve="Newsletter (built in)",Yt=[{value:"00",label:T.label},{value:"00",label:T.label},{value:"00",label:T.label}],t=oe,g={field:"autoOpen",is:!0},Xe={all:[P("hideAfter",ee,t.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},ze=[[["trigger","showOn","hideAfter"],g],[["autoOpenDelaySec"],{all:[g,P("trigger",k,t.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[g,P("trigger",k,t.trigger,["scroll"])]}],[["showOnPages"],{all:[g,P("showOn",te,t.showOn,["chosen"])]}],[["hideDays"],{all:[g,Xe]}]],Qe=ie({formSlug:Le(void 0,Ve),_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:f("Interest chips",l(Be,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:i("Frequency label",t.frequencyLabel),frequencies:f("Frequency options",l(fe,{}),"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),...Oe(Fe,ke),..._e(),_gTextStyle:s("Text style"),...Object.fromEntries(le.map(o=>[ae[o],w(F[o],Ie(F[o]),[{label:"Popup's own",value:""},...q.map(n=>({label:V[n],value:n}))],"")])),_gBehaviour:s("Behavior"),autoOpen:I("Show by itself",t.autoOpen,l(Pe,{})),trigger:p("Trigger",l(ye,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],t.trigger),autoOpenDelaySec:S("Delay",l(h,{}),O.min,O.max,1,t.autoOpenDelaySec,"s"),scrollPercent:S("Scroll",l(Te,{}),L.min,L.max,5,t.scrollPercent,"%"),showOn:p("Pages",l(he,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],t.showOn),showOnPages:Ee("Chosen pages",[],"None"),hideAfter:p("After close",l(h,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],t.hideAfter),hideDays:S("Days",l(h,{}),_.min,_.max,1,t.hideDays),_gArrangement:s("Arrangement"),formSide:p("Form side",l(Se,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],t.formSide),_gPhone:A("mobile",s("On a phone")),valuePanelOnPhone:A("mobile",I("Left panel",t.valuePanelOnPhone,l(ge,{})))},ze),x=K(Qe,"SubscribePopup");async function Je(){return(await ne(ce()??"")).filter(n=>!$(n.slug)).map(n=>({label:n.label,value:se(n.slug)}))}async function Ze(){return j({...x,showOnPages:{...x.showOnPages,options:await Je().catch(()=>[])}})}const m=me,$e={_gHeader:s("Header"),kickerBadge:i("Eyebrow badge",m.kickerBadge),kickerText:i("Eyebrow text",m.kickerText),titleLead:i("Heading",m.titleLead),titleAccent:i("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:s("Status rail"),leadTimeValue:i("Lead time",m.leadTimeValue),shipsToFallback:i("Ships to · fallback",m.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:s("Promise row"),promises:f("Trust markers",l(C,{}),"Marker","verbatim"),_gEmpty:s("Empty basket"),emptyKicker:i("Eyebrow",m.emptyKicker),emptyBody:u("Message",m.emptyBody)},et={layout:ue,_nConsentWhere:D("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===v?"This is the cart drawer — edit its copy in the Settings panel →":o===R?"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:{...Ye},resolveFields:async(o,{fields:n})=>{if(o?.props?.kind===re)return Ze();if(o?.props?.kind===v)return $e;if(o?.props?.kind===R)return et;const c=n;return ve()?{[De]:w("Product type",l(pe,{}),we,"alloy-wheel"),...c,_gHeroBullets:s("Product hero"),_nHeroBullets:D("The promises under Add to Cart. Text before the · is bold. Leave the list empty to show no promises at all."),[Re]:f("Trust bullets",l(C,{}),Ae(Ce),"verbatim")}:c},render:o=>{const{editor:n,widthMode:c,fullWidth:d,pageWidth:H,pageBackground:y,theme:N,fonts:M}=o;if(!n?.isEditing)return We(o);const B=Ke(o,l(tt,{kind:o.kind}));if(B)return B;const G=Ue(o,!0);return l(xe,{propsTheme:N,propsFonts:M,widthMode:c,fullWidth:d,pageWidth:H,pageBackground:typeof y=="string"?y:void 0,suppressPreviewNav:He,overlay:W(U,{children:[l(J,{}),l(Z,{})]}),children:G??l(je,{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:a.Subscribe,SubscribeBlogs:a.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:a.Reviews,RatingBlock:a.RatingBlock,Prose:e.Prose,Cards:e.Cards,Logos:e.Logos,Ticker:e.Ticker,ContactRouting:a.ContactRouting,ContactLocations:e.ContactLocations,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:r.Collections,CollectionCard:r.CollectionCard,Events:a.Events,RateTable:a.RateTable,OpeningHours:a.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:a.SubmitBuild,SubmitBox:a.SubmitBox,ReviewForm:a.ReviewForm,Form:a.Form,AppointmentBooking:a.AppointmentBooking,BookingBox:a.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:a.Footer,FooterLogo:a.FooterLogo,FooterMenu:a.FooterMenu,FooterDivider:a.FooterDivider,FooterGroup:a.FooterGroup,FooterText:a.FooterText,FooterEmailSignup:a.FooterEmailSignup,FooterSocial:a.FooterSocial,LegalLineBlock:a.LegalLineBlock,SearchBlock:r.SearchBlock,CartBlock:r.CartBlock,CountrySwitchBlock:r.CountrySwitchBlock,AccountBlock:r.AccountBlock,ThemeSwitchBlock:r.ThemeSwitchBlock,[z]:a.SiteHeader,[X]:a.SiteFooter}};Me(b.components);{const o=b.components.MenuBlock;o.fields={...o.fields,direction:p("Direction",l(be,{}),[{label:E.column,value:"column"},{label:E.row,value:"row"}],Ge)};const n={type:"custom",render:({value:c,onChange:d})=>l(Q,{value:c,onChange:d})};o.fields=Object.fromEntries(Object.entries(o.fields).flatMap(([c,d])=>c==="menu"?[[c,d],["linkRange",n]]:[[c,d]])),o.fields={...o.fields,linkAlign:p("Link alignment",l(de,{}),[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"}],"start")}}{const o=b.components.Header,n=o.render;o.render=c=>c.editor?.isEditing?l(Ne,{editing:!0}):n(c)}const ot=qe(b),qt=ot.sectionGroupAllow;var Vt=b;export{qt as SECTION_GROUP_ALLOW,b as config,Vt as default,Qe as subscribePopupFields};
1
+ import{jsx as l,Fragment as U,jsxs as W}from"react/jsx-runtime";import{assignSectionGroups as K,reseatBucketTabs as j}from"efficient-web-builder/editor/lib/document/field-groups";import{buildBlockCategories as Y}from"efficient-web-builder/format/lib/document/section-catalog";import{FONT_ROLES as q,FONT_ROLE_LABELS as V}from"efficient-web-builder/format/lib/fonts";import{CONTAINER_DIRECTION_LABELS as E}from"efficient-web-builder/format/lib/content/container-direction";import{SITE_FOOTER_TYPE as X,SITE_HEADER_TYPE as z}from"efficient-web-builder/format/lib/document/section-groups";import Q from"../../components/MenuLinkRangeField.js";import J from"../../components/EditorPreviewChat.js";import Z from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as $,POPUP_DAYS_RANGE as _,POPUP_DELAY_RANGE as O,POPUP_HIDE_AFTER as ee,POPUP_SCROLL_RANGE as L,POPUP_SHOW_ON as te,POPUP_TRIGGERS as F,SUBSCRIBE_POPUP_DEFAULTS as oe,SUBSCRIBE_POPUP_KIND as re}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as P,withRowRules as ie}from"efficient-web-builder/render/lib/document/show-when";import{POPUP_KIND_PROP as ae,POPUP_TEXT_KIND_LABELS as k,POPUP_TEXT_KINDS as le}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as ne}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as se}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as ce}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as me,CART_DRAWER_KIND as v}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 ue}from"../../components/ConsentBannerLayoutTiles.js";import{AlignLeftIcon as de,CategoryIcon as pe,CheckIcon as R,ClockIcon as h,ColumnsIcon as ge,DirectionIcon as be,EyeIcon as Pe,ListIcon as fe,PageIcon as he,PlacementIcon as Se,ScrollPointIcon as Te,TriggerIcon as ye}from"efficient-easel/icons";import{deviceField as A}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as Be}from"efficient-web-builder/editor/components/FieldGlyph";import{group as s,multiSelect as Ee,panelNote as D,plainText as a,plainTextarea as u,sectionShapeFields as _e,sectionThemeFields as Oe,segmented as p,select as w,slider as S,textList as f,toggle as I}from"efficient-web-builder/editor/lib/document/controls";import{formPicker as Le}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 ve}from"efficient-web-builder/format/lib/document/editor-page-context";import{PRODUCT_HERO_BULLETS_PROP as Ce,HERO_BULLET_EXAMPLE as Re,heroBulletLine as Ae}from"../../../render/lib/content/product-hero.js";import{TEMPLATE_PRODUCT_TYPE_PROP as De}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 T}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{textKindGlyph as Ie}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 xe,suppressPreviewNav as He}from"efficient-web-builder/editor/lib/document/page-root";import Ne from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as Me,PAGE_MENU_DIRECTION_DEFAULT as Ge}from"../../../render/lib/document/footer-page-blocks.js";import{drawPopupPage as Ue,drawPublishedStorefrontRoot as We,drawSystemPage as Ke,StorefrontPageProviders as je}from"../../../render/lib/document/storefront-root.js";import{GENERAL_ROOT_FIELDS as Ye}from"efficient-web-builder/editor/lib/document/page-root-fields";import{finishRegistry as qe}from"efficient-web-builder/editor/lib/document/registry";const Ve="Newsletter (built in)",Vt=[{value:"00",label:T.label},{value:"00",label:T.label},{value:"00",label:T.label}],t=oe,g={field:"autoOpen",is:!0},Xe={all:[P("hideAfter",ee,t.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},ze=[[["trigger","showOn","hideAfter"],g],[["autoOpenDelaySec"],{all:[g,P("trigger",F,t.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[g,P("trigger",F,t.trigger,["scroll"])]}],[["showOnPages"],{all:[g,P("showOn",te,t.showOn,["chosen"])]}],[["hideDays"],{all:[g,Xe]}]],Qe=ie({formSlug:Le(void 0,Ve),_gLeft:s("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:s("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:s("Right panel · choices"),interestsLabel:a("Interests label",t.interestsLabel),interests:f("Interest chips",l(Be,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:a("Frequency label",t.frequencyLabel),frequencies:f("Frequency options",l(fe,{}),"Option label","verbatim"),_gActions:s("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:s("Success state"),successHeading:a("Heading",t.successHeading),successBody:u("Message",t.successBody),keepBrowsingText:a("Dismiss button",t.keepBrowsingText),...Oe(ke,Fe),..._e(),_gTextStyle:s("Text style"),...Object.fromEntries(le.map(o=>[ae[o],w(k[o],Ie(k[o]),[{label:"Popup's own",value:""},...q.map(n=>({label:V[n],value:n}))],"")])),_gBehaviour:s("Behavior"),autoOpen:I("Show by itself",t.autoOpen,l(Pe,{})),trigger:p("Trigger",l(ye,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],t.trigger),autoOpenDelaySec:S("Delay",l(h,{}),O.min,O.max,1,t.autoOpenDelaySec,"s"),scrollPercent:S("Scroll",l(Te,{}),L.min,L.max,5,t.scrollPercent,"%"),showOn:p("Pages",l(he,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],t.showOn),showOnPages:Ee("Chosen pages",[],"None"),hideAfter:p("After close",l(h,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],t.hideAfter),hideDays:S("Days",l(h,{}),_.min,_.max,1,t.hideDays),_gArrangement:s("Arrangement"),formSide:p("Form side",l(Se,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],t.formSide),_gPhone:A("mobile",s("On a phone")),valuePanelOnPhone:A("mobile",I("Left panel",t.valuePanelOnPhone,l(ge,{})))},ze),x=K(Qe,"SubscribePopup");async function Je(){return(await ne(ce()??"")).filter(n=>!$(n.slug)).map(n=>({label:n.label,value:se(n.slug)}))}async function Ze(){return j({...x,showOnPages:{...x.showOnPages,options:await Je().catch(()=>[])}})}const m=me,$e={_gHeader:s("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:s("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:s("Promise row"),promises:f("Trust markers",l(R,{}),"Marker","verbatim"),_gEmpty:s("Empty basket"),emptyKicker:a("Eyebrow",m.emptyKicker),emptyBody:u("Message",m.emptyBody)},et={layout:ue,_nConsentWhere:D("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===v?"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:{...Ye},resolveFields:async(o,{fields:n})=>{if(o?.props?.kind===re)return Ze();if(o?.props?.kind===v)return $e;if(o?.props?.kind===C)return et;const c=n;return ve()?{[De]:w("Product type",l(pe,{}),we,"alloy-wheel"),...c,_gHeroBullets:s("Product hero"),_nHeroBullets:D("The promises under Add to Cart. Text before the · is bold. Leave the list empty to show no promises at all."),[Ce]:f("Trust bullets",l(R,{}),Ae(Re),"verbatim")}:c},render:o=>{const{editor:n,widthMode:c,fullWidth:d,pageWidth:H,pageBackground:y,theme:N,fonts:M}=o;if(!n?.isEditing)return We(o);const B=Ke(o,l(tt,{kind:o.kind}));if(B)return B;const G=Ue(o,!0);return l(xe,{propsTheme:N,propsFonts:M,widthMode:c,fullWidth:d,pageWidth:H,pageBackground:typeof y=="string"?y:void 0,suppressPreviewNav:He,overlay:W(U,{children:[l(J,{}),l(Z,{})]}),children:G??l(je,{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: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,[z]:i.SiteHeader,[X]:i.SiteFooter}};Me(b.components);{const o=b.components.MenuBlock;o.fields={...o.fields,direction:p("Direction",l(be,{}),[{label:E.column,value:"column"},{label:E.row,value:"row"}],Ge)};const n={type:"custom",render:({value:c,onChange:d})=>l(Q,{value:c,onChange:d})};o.fields=Object.fromEntries(Object.entries(o.fields).flatMap(([c,d])=>c==="menu"?[[c,d],["linkRange",n]]:[[c,d]])),o.fields={...o.fields,linkAlign:p("Link alignment",l(de,{}),[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"}],"start")}}{const o=b.components.Header,n=o.render;o.render=c=>c.editor?.isEditing?l(Ne,{editing:!0}):n(c)}const ot=qe(b),Xt=ot.sectionGroupAllow;var zt=b;export{Xt as SECTION_GROUP_ALLOW,b as config,zt as default,Qe as subscribePopupFields};
@@ -1 +1 @@
1
- import{readLockHolder as M}from"efficient-easel/edit-lock";import{AmbiguousPageSlugError as U,ApiError as S,SERVER_UNREACHABLE_MESSAGE as x,STATUS_NETWORK_ERROR as F,setEditorLanguage as K,setEditorPortalAudience as H,storefrontAdmin as o}from"../../render/lib/api/index.js";import{AdminSectionTemplateStore as N}from"./api/section-templates.js";import{registerServedBlockSources as D}from"./efficient-block-sources.js";import{registerRecordTypes as G}from"efficient-web-builder/format/lib/content/record-types";import{uploadLimits as z}from"../../render/lib/api/upload-limits.js";import{SITE_FOOTER_SLUG as $}from"efficient-web-builder/format/lib/content/footer";import{SOCIAL_PLATFORMS as v,socialUrlField as E}from"efficient-web-builder/format/lib/content/social-links";import{EFFICIENT_BACKEND as V,currentEaselSession as A,provideDefaultBackend as W}from"efficient-easel/screen/lib/session";import{loadEditorSiteSlug as Y}from"efficient-web-builder/editor/lib/editor-site-slug";import{editorPreviewHref as q,originIsSiteAmbiguous as J}from"efficient-web-builder/format/lib/editor/preview-href";import{postPath as Q}from"../../render/lib/links/link-rules.js";import{absolutizeApiUrl as X,efficientMediaResolve as Z}from"efficient-web-builder/render/lib/media";import{HOME_PAGE_SLUG as ee}from"efficient-web-builder/format/lib/document/home-page";import{groupPagesForMenu as te,pageMenuLabel as P}from"../../render/lib/storefront-page-groups.js";import{PAGE_CONFLICT_CODE as L}from"efficient-easel/screen/lib/failure";import{shopRouteBase as ae}from"efficient-web-builder/format/lib/web-runtime";import{WebsiteBackendError as m,provideHostFailures as ne}from"efficient-easel/screen/lib/backend-error";const T=a=>a.layout_updated_at??a.updated_at??null,ie=["live","changed","never"],R=a=>ie.includes(a.live_state)?{live:a.live_state}:{};function se(a){if(!a||typeof a!="object")return null;const s=a;return s.code!==L?null:{savedBy:typeof s.saved_by=="string"?s.saved_by:"",savedByYou:s.saved_by_you===!0,secondsAgo:typeof s.seconds_ago=="number"?s.seconds_ago:0}}function oe(a){return a===401||a===403?"unauthorized":a===404?"not-found":a===F||a>=500?"unavailable":"invalid"}function re(a){if(!(a instanceof S))return a;if(a.status===409){const s=se(a.data);if(s)return new m("changed-elsewhere",a.message,{conflict:s,cause:a});const r=M(a.data);if(r)return new m("lock-taken",a.message,{holder:r,cause:a})}return new m(oe(a.status),a.message,{cause:a})}function le(a){if(!a||typeof a!="object"||Array.isArray(a))return null;const s=r=>{if(typeof r=="string")return r.trim()||null;const d=Array.isArray(r)?r:r&&typeof r=="object"?Object.values(r):[];for(const c of d){const g=s(c);if(g)return g}return null};for(const[r,d]of Object.entries(a)){if(r==="detail")continue;const c=s(d);if(c)return`${r}: ${c}`}return null}const I=new WeakMap;function ce(a,s){const r=ae(),d=r?new URL(r).hostname:typeof window<"u"?window.location?.hostname??null:null;let c=null;const g=s.siteId(),w=s.token();if(J(d)&&g&&w){const y=Y(w,g);I.has(y)?c=I.get(y)??null:y.then(k=>I.set(y,k))}const p=q({pageSlug:a,siteSlug:c,hostname:d});return r?`${r}${p}`:p}const ue={group:"Template pages",groupKey:"template"},B=a=>({id:a.id,slug:a.slug,label:a.title||a.slug,...ue,draft:!1});function j(a){const s=async e=>{const t=a.token();if(!t)throw new m("unauthorized","The editor has no sign-in yet.");try{return await e(t)}catch(n){throw re(n)}},r={list:e=>s(async t=>{const n=await o.listPages(t,e?.siteId);return te(n.filter(i=>i.slug!==$)).flatMap(i=>i.pages.map(l=>({id:l.id,slug:l.slug,label:P(l),group:i.group,groupKey:i.key,draft:!l.is_published,kind:l.kind??null})))}),load:e=>s(async t=>{const n="id"in e?e.id:(await o.findPageBySlug(e.slug,t,e.siteId))?.id,i=n?await o.getPageById(n,t):null;return i?{id:i.id,layout:i.layout,kind:i.kind,version:T(i),...R(i)}:null}),save:(e,t,n)=>{const{version:i}=n;return i?s(async l=>{const f=await o.saveLayout(e,t.layout,l,i,n.clientId||void 0);return{version:T(f),...R(f)}}):Promise.reject(new Error("Refusing to save this page: the editor does not know which version it is replacing. Reload the page and try again."))},version:e=>s(t=>o.getPageById(e,t).then(T)),linkTargets:e=>s(async t=>(await o.listPages(t,e?.siteId)).map(n=>({id:n.id,slug:n.slug,label:P(n),layout:n.layout??null}))),duplicate:(e,t)=>s(async n=>{const i=await o.duplicatePage(e,{title:t.title,slug:t.slug},n);return{id:i.id,slug:i.slug,label:P(i),group:i.group||null,draft:!i.is_published,kind:i.kind??null}})},d=e=>({list:()=>s(async t=>(await o.listTemplatePages(e,t)).map(B)),load:t=>s(async n=>{const i=u=>"id"in t?u.id===t.id:u.slug===t.slug,l=u=>({id:u.id,layout:u.layout,version:null}),f=await o.listTemplatePages(e,n);if(f.length)return l(f.find(i)??f[0]);const b=await o.getTemplate(e,n).catch(()=>null);try{return l(await o.createTemplatePage(e,{slug:ee,title:"Home",layout:b?.layout??{}},n))}catch{const u=await o.listTemplatePages(e,n),h=u.find(i)??u[0];return h?l(h):null}}),save:(t,n)=>s(async i=>(await o.saveTemplatePageLayout(t,n.layout,i),{version:null})),create:t=>s(async n=>B(await o.createTemplatePage(e,{slug:t.slug,title:t.title,layout:t.layout},n))),remove:(t,n)=>s(i=>o.deleteTemplatePage(t,i,n))}),c=e=>{const t=e?.siteId??a.siteId();if(!t)throw new m("not-found","This editor is not connected to a website.");return t},g=e=>({name:e.name,slug:e.slug,mapsApiKey:e.maps_api_key,mapsMapId:e.maps_map_id}),w=e=>Object.fromEntries(v.map(t=>[t,e[E(t)]??""])),p={launcherColor:"launcher_color",launcherIcon:"launcher_icon",launcherPosition:"launcher_position",launcherLabel:"launcher_label",showOnPhones:"show_on_phones"},y=Object.keys(p),k=e=>{const t={enabled:e.enabled,title:e.title,subtitle:e.subtitle,greeting:e.greeting};for(const n of y){const i=e[p[n]];i!==void 0&&Object.assign(t,{[n]:i})}return t},C=e=>{const t={};for(const[n,i]of Object.entries(e))t[p[n]??n]=i;return t},O={pages:r,lock:{claim:(e,t,n)=>s(async i=>({heartbeatSeconds:(await o.claimPageEditLock(e,i,t,n)).heartbeat_seconds})),release:e=>s(t=>o.releasePageEditLock(e,t))},site:{get:e=>s(async t=>g(await o.getSite(c(e),t))),update:(e,t)=>s(async n=>g(await o.updateSite(c(t),e.mapsApiKey===void 0?{}:{maps_api_key:e.mapsApiKey},n))),publish:e=>s(async t=>{try{const{state:n,published:i}=await o.publishSite(c(e),t);return{state:n,published:i}}catch(n){const i=n instanceof S&&n.status===400?le(n.data):null;throw i?new m("invalid",i,{cause:n}):n}}),liveState:e=>s(async t=>{const{state:n,changes:i}=await o.getSiteLiveState(c(e),t);return{state:n,changes:i}})},media:{resolve:Z,maxUploadBytes:z("POST /api/storefront/media/","file").maxSizeBytes},sectionTemplates:new N(a.token),social:{get:e=>s(async t=>w(await o.getSocialSettings(t,c(e)))),update:(e,t)=>s(async n=>{const i=Object.fromEntries(v.filter(l=>l in e).map(l=>[E(l),e[l]]));try{return w(await o.updateSocialSettings(i,n,c(t)))}catch(l){if(l instanceof S&&l.status===400){const f=l.data??{},b={};for(const u of v){const h=f[E(u)],_=Array.isArray(h)?h[0]:h;typeof _=="string"&&_.trim()&&(b[u]=_)}if(Object.keys(b).length>0)throw new m("invalid",l.message,{fields:b,cause:l})}throw l}})},theme:{get:e=>s(t=>o.getThemeSettings(t,e?.siteId)),update:(e,t)=>s(n=>o.updateThemeSettings(e,n,t?.siteId))},geocode:{locate:(e,t)=>s(async n=>{const i=await o.geocode(e,n,t?.country);if(i.status==="not_found")return null;if(i.status!=="found"||i.lat===null||i.lng===null)throw new m("unavailable","The geocoder could not answer just now.");return{lat:i.lat,lng:i.lng,label:i.label}})},chat:{get:e=>s(async t=>k(await o.getChatSettings(t,e?.siteId))),update:(e,t)=>s(async n=>k(await o.updateChatSettings(C(e),n,t?.siteId)))},blog:{posts:e=>s(async t=>(await o.listBlogPosts(t,{visibleOnly:!0,siteId:e?.siteId})).map(n=>({slug:n.slug,title:n.title,excerpt:n.excerpt,category:n.category,coverImage:n.cover_image?X(n.cover_image)??"":"",publishedAt:n.published_at,href:Q(n.slug)})))},templates:{get:e=>s(async t=>{const n=await o.getTemplate(e,t);return{id:n.id,name:n.name}}),pages:d},preview:{href:e=>ce(e,a),draftLink:e=>s(async t=>({url:(await o.createPagePreviewLink(e,t)).url??null}))}};return O[V]=!0,O}const de=["text","date"],ge=a=>a.replace(/_([a-z0-9])/g,(s,r)=>r.toUpperCase());function fe(a){if(Array.isArray(a))for(const s of a){const d=(Array.isArray(s?.fields)?s.fields:[]).filter(c=>de.includes(c.kind)).map(c=>({key:ge(c.key),label:c.label,kind:c.kind}));try{G([{key:s.key,label:s.label,fields:d}])}catch{}}}function Be(a){return A().cache("efficient:editor-offerings",()=>Promise.all([o.listBlockSources(a).then(D).catch(()=>{}),o.listRecordTypes(a).then(fe).catch(()=>{})]).then(()=>{}))}ne({read:a=>a instanceof S?{status:a.status,data:a.data,message:a.message}:null,unreachableMessage:x,loadRefusal:(a,{slug:s})=>a instanceof U?`“${s}” exists on more than one website. Open it from the site you want to edit.`:null}),W(a=>j({token:()=>a.auth.token,siteId:()=>a.siteId()}));function je(a={}){return a.portalAudience!==void 0&&H(a.portalAudience),a.language!==void 0&&K(a.language),j({token:()=>A().auth.token,siteId:()=>a.siteId??A().siteId()})}export{L as PAGE_CONFLICT_CODE,je as createEfficientBackend,R as liveOf,Be as loadEditorOfferings,T as pageVersion,le as publishRefusal,fe as registerServedRecordTypes,re as toBackendError};
1
+ import{readLockHolder as M}from"efficient-easel/edit-lock";import{AmbiguousPageSlugError as U,ApiError as k,SERVER_UNREACHABLE_MESSAGE as x,STATUS_NETWORK_ERROR as F,setEditorLanguage as H,setEditorPortalAudience as K,storefrontAdmin as o}from"../../render/lib/api/index.js";import{AdminSectionTemplateStore as N}from"./api/section-templates.js";import{registerServedBlockSources as D}from"./efficient-block-sources.js";import{registerRecordTypes as G}from"efficient-web-builder/format/lib/content/record-types";import{uploadLimits as z}from"../../render/lib/api/upload-limits.js";import{SITE_FOOTER_SLUG as $}from"efficient-web-builder/format/lib/content/footer";import{SOCIAL_PLATFORMS as _,socialUrlField as E}from"efficient-web-builder/format/lib/content/social-links";import{EFFICIENT_BACKEND as V,currentEaselSession as P,provideDefaultBackend as W}from"efficient-easel/screen/lib/session";import{loadEditorSiteSlug as Y}from"efficient-web-builder/editor/lib/editor-site-slug";import{editorPreviewHref as q,originIsSiteAmbiguous as J}from"efficient-web-builder/format/lib/editor/preview-href";import{postPath as Q}from"../../render/lib/links/link-rules.js";import{absolutizeApiUrl as X,efficientMediaResolve as Z}from"efficient-web-builder/render/lib/media";import{HOME_PAGE_SLUG as ee}from"efficient-web-builder/format/lib/document/home-page";import{groupPagesForMenu as te,pageMenuLabel as T}from"../../render/lib/storefront-page-groups.js";import{PAGE_CONFLICT_CODE as L}from"efficient-easel/screen/lib/failure";import{shopRouteBase as ne}from"efficient-web-builder/format/lib/web-runtime";import{WebsiteBackendError as f,provideHostFailures as ae}from"efficient-easel/screen/lib/backend-error";const A=n=>n.layout_updated_at??n.updated_at??null,ie=["live","changed","never"],R=n=>ie.includes(n.live_state)?{live:n.live_state}:{};function se(n){if(!n||typeof n!="object")return null;const s=n;return s.code!==L?null:{savedBy:typeof s.saved_by=="string"?s.saved_by:"",savedByYou:s.saved_by_you===!0,secondsAgo:typeof s.seconds_ago=="number"?s.seconds_ago:0}}function oe(n){return n===401||n===403?"unauthorized":n===404?"not-found":n===F||n>=500?"unavailable":"invalid"}function re(n){if(!(n instanceof k))return n;if(n.status===409){const s=se(n.data);if(s)return new f("changed-elsewhere",n.message,{conflict:s,cause:n});const r=M(n.data);if(r)return new f("lock-taken",n.message,{holder:r,cause:n})}return new f(oe(n.status),n.message,{cause:n})}function le(n){if(!n||typeof n!="object"||Array.isArray(n))return null;const s=r=>{if(typeof r=="string")return r.trim()||null;const d=Array.isArray(r)?r:r&&typeof r=="object"?Object.values(r):[];for(const c of d){const m=s(c);if(m)return m}return null};for(const[r,d]of Object.entries(n)){if(r==="detail")continue;const c=s(d);if(c)return`${r}: ${c}`}return null}const I=new WeakMap;function ce(n,s){const r=ne(),d=r?new URL(r).hostname:typeof window<"u"?window.location?.hostname??null:null;let c=null;const m=s.siteId(),w=s.token();if(J(d)&&m&&w){const p=Y(w,m);I.has(p)?c=I.get(p)??null:p.then(S=>I.set(p,S))}const y=q({pageSlug:n,siteSlug:c,hostname:d});return r?`${r}${y}`:y}const ue={group:"Template pages",groupKey:"template"},B=n=>({id:n.id,slug:n.slug,label:n.title||n.slug,...ue,draft:!1});function j(n){const s=async t=>{const e=n.token();if(!e)throw new f("unauthorized","The editor has no sign-in yet.");try{return await t(e)}catch(a){throw re(a)}},r={list:t=>s(async e=>{const a=await o.listPages(e,t?.siteId);return te(a.filter(i=>i.slug!==$)).flatMap(i=>i.pages.map(l=>({id:l.id,slug:l.slug,label:T(l),group:i.group,groupKey:i.key,draft:!l.is_published,kind:l.kind??null})))}),load:t=>s(async e=>{const a="id"in t?t.id:(await o.findPageBySlug(t.slug,e,t.siteId))?.id,i=a?await o.getPageById(a,e):null;return i?{id:i.id,layout:i.layout,kind:i.kind,version:A(i),...R(i)}:null}),save:(t,e,a)=>{const{version:i}=a;return i?s(async l=>{const g=await o.saveLayout(t,e.layout,l,i,a.clientId||void 0);return{version:A(g),...R(g)}}):Promise.reject(new Error("Refusing to save this page: the editor does not know which version it is replacing. Reload the page and try again."))},version:t=>s(e=>o.getPageById(t,e).then(A)),linkTargets:t=>s(async e=>(await o.listPages(e,t?.siteId)).map(a=>({id:a.id,slug:a.slug,label:T(a),layout:a.layout??null}))),duplicate:(t,e)=>s(async a=>{const i=await o.duplicatePage(t,{title:e.title,slug:e.slug},a);return{id:i.id,slug:i.slug,label:T(i),group:i.group||null,draft:!i.is_published,kind:i.kind??null}})},d=t=>({list:()=>s(async e=>(await o.listTemplatePages(t,e)).map(B)),load:e=>s(async a=>{const i=u=>"id"in e?u.id===e.id:u.slug===e.slug,l=u=>({id:u.id,layout:u.layout,version:null}),g=await o.listTemplatePages(t,a);if(g.length)return l(g.find(i)??g[0]);const b=await o.getTemplate(t,a).catch(()=>null);try{return l(await o.createTemplatePage(t,{slug:ee,title:"Home",layout:b?.layout??{}},a))}catch{const u=await o.listTemplatePages(t,a),h=u.find(i)??u[0];return h?l(h):null}}),save:(e,a)=>s(async i=>(await o.saveTemplatePageLayout(e,a.layout,i),{version:null})),create:e=>s(async a=>B(await o.createTemplatePage(t,{slug:e.slug,title:e.title,layout:e.layout},a))),remove:(e,a)=>s(i=>o.deleteTemplatePage(e,i,a))}),c=t=>{const e=t?.siteId??n.siteId();if(!e)throw new f("not-found","This editor is not connected to a website.");return e},m=t=>({name:t.name,slug:t.slug}),w=t=>Object.fromEntries(_.map(e=>[e,t[E(e)]??""])),y={launcherColor:"launcher_color",launcherIcon:"launcher_icon",launcherPosition:"launcher_position",launcherLabel:"launcher_label",showOnPhones:"show_on_phones"},p=Object.keys(y),S=t=>{const e={enabled:t.enabled,title:t.title,subtitle:t.subtitle,greeting:t.greeting};for(const a of p){const i=t[y[a]];i!==void 0&&Object.assign(e,{[a]:i})}return e},C=t=>{const e={};for(const[a,i]of Object.entries(t))e[y[a]??a]=i;return e},O={pages:r,lock:{claim:(t,e,a)=>s(async i=>({heartbeatSeconds:(await o.claimPageEditLock(t,i,e,a)).heartbeat_seconds})),release:t=>s(e=>o.releasePageEditLock(t,e))},site:{get:t=>s(async e=>m(await o.getSite(c(t),e))),publish:t=>s(async e=>{try{const{state:a,published:i}=await o.publishSite(c(t),e);return{state:a,published:i}}catch(a){const i=a instanceof k&&a.status===400?le(a.data):null;throw i?new f("invalid",i,{cause:a}):a}}),liveState:t=>s(async e=>{const{state:a,changes:i}=await o.getSiteLiveState(c(t),e);return{state:a,changes:i}})},media:{resolve:Z,maxUploadBytes:z("POST /api/storefront/media/","file").maxSizeBytes},sectionTemplates:new N(n.token),social:{get:t=>s(async e=>w(await o.getSocialSettings(e,c(t)))),update:(t,e)=>s(async a=>{const i=Object.fromEntries(_.filter(l=>l in t).map(l=>[E(l),t[l]]));try{return w(await o.updateSocialSettings(i,a,c(e)))}catch(l){if(l instanceof k&&l.status===400){const g=l.data??{},b={};for(const u of _){const h=g[E(u)],v=Array.isArray(h)?h[0]:h;typeof v=="string"&&v.trim()&&(b[u]=v)}if(Object.keys(b).length>0)throw new f("invalid",l.message,{fields:b,cause:l})}throw l}})},theme:{get:t=>s(e=>o.getThemeSettings(e,t?.siteId)),update:(t,e)=>s(a=>o.updateThemeSettings(t,a,e?.siteId))},geocode:{locate:(t,e)=>s(async a=>{const i=await o.geocode(t,a,e?.country);if(i.status==="not_found")return null;if(i.status!=="found"||i.lat===null||i.lng===null)throw new f("unavailable","The geocoder could not answer just now.");return{lat:i.lat,lng:i.lng,label:i.label}})},chat:{get:t=>s(async e=>S(await o.getChatSettings(e,t?.siteId))),update:(t,e)=>s(async a=>S(await o.updateChatSettings(C(t),a,e?.siteId)))},blog:{posts:t=>s(async e=>(await o.listBlogPosts(e,{visibleOnly:!0,siteId:t?.siteId})).map(a=>({slug:a.slug,title:a.title,excerpt:a.excerpt,category:a.category,coverImage:a.cover_image?X(a.cover_image)??"":"",publishedAt:a.published_at,href:Q(a.slug)})))},templates:{get:t=>s(async e=>{const a=await o.getTemplate(t,e);return{id:a.id,name:a.name}}),pages:d},preview:{href:t=>ce(t,n),draftLink:t=>s(async e=>({url:(await o.createPagePreviewLink(t,e)).url??null}))}};return O[V]=!0,O}const de=["text","date"],ge=n=>n.replace(/_([a-z0-9])/g,(s,r)=>r.toUpperCase());function fe(n){if(Array.isArray(n))for(const s of n){const d=(Array.isArray(s?.fields)?s.fields:[]).filter(c=>de.includes(c.kind)).map(c=>({key:ge(c.key),label:c.label,kind:c.kind}));try{G([{key:s.key,label:s.label,fields:d}])}catch{}}}function Be(n){return P().cache("efficient:editor-offerings",()=>Promise.all([o.listBlockSources(n).then(D).catch(()=>{}),o.listRecordTypes(n).then(fe).catch(()=>{})]).then(()=>{}))}ae({read:n=>n instanceof k?{status:n.status,data:n.data,message:n.message}:null,unreachableMessage:x,loadRefusal:(n,{slug:s})=>n instanceof U?`“${s}” exists on more than one website. Open it from the site you want to edit.`:null}),W(n=>j({token:()=>n.auth.token,siteId:()=>n.siteId()}));function je(n={}){return n.portalAudience!==void 0&&K(n.portalAudience),n.language!==void 0&&H(n.language),j({token:()=>P().auth.token,siteId:()=>n.siteId??P().siteId()})}export{L as PAGE_CONFLICT_CODE,je as createEfficientBackend,R as liveOf,Be as loadEditorOfferings,A as pageVersion,le as publishRefusal,fe as registerServedRecordTypes,re as toBackendError};
@@ -1 +1 @@
1
- import{registerBlockSources as a}from"efficient-web-builder/format/lib/content/block-sources";import{say as e}from"efficient-web-builder/format/lib/editor-words";import{OPENING_SAMPLE_WEEK as n}from"../../render/lib/sections/opening-hours.js";const l=[{key:"group-offices",label:"Group offices",blocks:["Footprint"]}];a(l);const r="+00 000 0000",i={rooms:()=>[{key:"sample-1",title:e("First room"),excerpt:e("What this room has.")},{key:"sample-2",title:e("Second room"),excerpt:e("What this room has.")},{key:"sample-3",title:e("Third room"),excerpt:e("What this room has.")}],"location-contact":()=>[{key:"location",name:e("Location name"),address:e("Street address"),state:e("State"),country:e("Country"),phone:r,hours:e("Opening hours")}],"location-cards":()=>[{key:"where",name:e("Address"),note:e("Street address")},{key:"hours",name:e("Opening hours"),note:e("A line about it appears here.")},{key:"call",name:e("Phone"),note:r}],"location-footer":()=>[{text:e("Street address")},{text:r},{text:e("Opening hours")}],"location-rate-table":()=>{const t=o=>JSON.stringify([{column:e("Standard"),amount:"$000",standard:!1},{column:e("VIP"),amount:"$000",standard:o}]);return[{group:e("In-house"),label:e("Session · 60 min"),cells:t(!1)},{group:e("In-house"),label:e("Session · 60 min · Night"),cells:t(!0)},{group:e("Away"),label:e("Session · 60 min"),cells:t(!1)}]},"location-opening":()=>[{week:n,zone:"Australia/Sydney",hours:""}],"location-payment-methods":()=>[{label:e("Cash")},{label:e("Card")}]};function p(t){if(Array.isArray(t))for(const o of t){const s=typeof o?.key=="string"?i[o.key]?.():void 0;try{a([{key:o.key,label:o.label,blocks:o.blocks,...s?{sample:s}:{}}])}catch{}}}export{l as EFFICIENT_BLOCK_SOURCES,p as registerServedBlockSources};
1
+ import{registerBlockSources as n}from"efficient-web-builder/format/lib/content/block-sources";import{say as e}from"efficient-web-builder/format/lib/editor-words";import{OPENING_SAMPLE_WEEK as s}from"../../render/lib/sections/opening-hours.js";import{PRODUCT_REVIEWS_SOURCE as l}from"../../render/lib/sections/reviews.js";const i=[{key:"group-offices",label:"Group offices",blocks:["Footprint"]},{key:l,label:"Product reviews",blocks:["Reviews"]}];n(i);const a="+00 000 0000",c={rooms:()=>[{key:"sample-1",title:e("First room"),excerpt:e("What this room has.")},{key:"sample-2",title:e("Second room"),excerpt:e("What this room has.")},{key:"sample-3",title:e("Third room"),excerpt:e("What this room has.")}],"location-contact":()=>[{key:"location",name:e("Location name"),address:e("Street address"),state:e("State"),country:e("Country"),phone:a,hours:e("Opening hours")}],"location-cards":()=>[{key:"where",name:e("Address"),note:e("Street address")},{key:"hours",name:e("Opening hours"),note:e("A line about it appears here.")},{key:"call",name:e("Phone"),note:a}],"location-footer":()=>[{text:e("Street address")},{text:a},{text:e("Opening hours")}],"location-rate-table":()=>{const o=t=>JSON.stringify([{column:e("Standard"),amount:"$000",standard:!1},{column:e("VIP"),amount:"$000",standard:t}]);return[{group:e("In-house"),label:e("Session · 60 min"),cells:o(!1)},{group:e("In-house"),label:e("Session · 60 min · Night"),cells:o(!0)},{group:e("Away"),label:e("Session · 60 min"),cells:o(!1)}]},"location-opening":()=>[{week:s,zone:"Australia/Sydney",hours:""}],"site-messaging":()=>[{app:"wechat",name:"WeChat",handle:"yourvenue",href:"",qr:"https://u.wechat.com/yourvenue"},{app:"telegram",name:"Telegram",handle:"@yourvenue",href:"https://t.me/yourvenue",qr:"https://t.me/yourvenue"},{app:"whatsapp",name:"WhatsApp",handle:"0400 000 000",href:"https://wa.me/61400000000",qr:"https://wa.me/61400000000"},{app:"line",name:"LINE",handle:"yourvenue",href:"https://line.me/ti/p/~yourvenue",qr:"https://line.me/ti/p/~yourvenue"}],"location-payment-methods":()=>[{label:e("Cash"),kind:"cash"},{label:e("Card"),kind:"card"}],"shop-payment-methods":()=>[{label:"Visa / Mastercard / American Express",kind:"card"},{label:"PayPal",kind:""},{label:e("Bank transfer"),kind:"wire"}]};function d(o){if(Array.isArray(o))for(const t of o){const r=typeof t?.key=="string"?c[t.key]?.():void 0;try{n([{key:t.key,label:t.label,blocks:t.blocks,...r?{sample:r}:{}}])}catch{}}}export{i as EFFICIENT_BLOCK_SOURCES,d as registerServedBlockSources};
@@ -1,7 +1,8 @@
1
1
  import { type AdminHeaderSettings } from "../../render/lib/api/index.js";
2
2
  import type { PreviewHeaderSettings } from "efficient-web-builder/format/lib/preview-header-settings";
3
+ import type { HeaderCall } from "../../render/components/HeaderCallButton.js";
3
4
  export type { PreviewHeaderSettings };
4
5
  export declare function loadHeaderSettings(token: string, siteId?: string | null, force?: boolean): Promise<AdminHeaderSettings>;
5
6
  export declare function primeHeaderSettings(s: AdminHeaderSettings, siteId?: string | null): void;
6
7
  export declare function clearHeaderSettingsCache(siteId?: string | null): void;
7
- export declare function toPreviewHeaderSettings(s: AdminHeaderSettings): PreviewHeaderSettings;
8
+ export declare function toPreviewHeaderSettings(s: AdminHeaderSettings): PreviewHeaderSettings & HeaderCall;
@@ -1 +1 @@
1
- import{storefrontAdmin as a}from"../../render/lib/api/index.js";import{absolutizeApiUrl as c}from"efficient-web-builder/render/lib/media";const t=new Map,i=e=>e??"";function s(e,n,l=!1){const r=i(n);l&&t.delete(r);let o=t.get(r);return o||(o=a.getHeaderSettings(e,n??void 0),t.set(r,o),o.catch(()=>{t.get(r)===o&&t.delete(r)})),o}function p(e,n){t.set(i(n),Promise.resolve(e))}function g(e){t.delete(i(e))}function m(e){return{logoUrl:c(e.effective_logo_url),reverseLogo:e.reverse_logo,logoPosition:e.logo_position,logoSize:e.logo_size,logoSizePx:e.logo_size_px,menuItems:e.menu_items??[],menuSplit:e.menu_split??3,menuPosition:e.menu_position,menuRow:e.menu_row,menuGapPx:e.menu_gap_px??null,searchEnabled:e.search_enabled,searchPosition:e.search_position,searchRow:e.search_row,countrySelectorEnabled:e.country_selector_enabled,countrySelectorShowAs:e.country_selector_show_as,countryUrls:e.country_urls??{},accountEnabled:e.account_enabled??!0,cartEnabled:e.cart_enabled??!0,utilStyle:e.util_style,navTextCase:e.nav_text_case,lightReverseText:e.light_reverse_text,topTextColor:e.top_text_color,transparentTop:e.transparent_top,surface:e.surface,theme:e.theme,width:e.width,heightPx:e.height_px,sticky:e.sticky}}export{g as clearHeaderSettingsCache,s as loadHeaderSettings,p as primeHeaderSettings,m as toPreviewHeaderSettings};
1
+ import{storefrontAdmin as a}from"../../render/lib/api/index.js";import{absolutizeApiUrl as c}from"efficient-web-builder/render/lib/media";const t=new Map,i=e=>e??"";function s(e,n,l=!1){const r=i(n);l&&t.delete(r);let o=t.get(r);return o||(o=a.getHeaderSettings(e,n??void 0),t.set(r,o),o.catch(()=>{t.get(r)===o&&t.delete(r)})),o}function p(e,n){t.set(i(n),Promise.resolve(e))}function g(e){t.delete(i(e))}function m(e){return{logoUrl:c(e.effective_logo_url),reverseLogo:e.reverse_logo,logoPosition:e.logo_position,logoSize:e.logo_size,logoSizePx:e.logo_size_px,menuItems:e.menu_items??[],menuSplit:e.menu_split??3,menuPosition:e.menu_position,menuRow:e.menu_row,menuGapPx:e.menu_gap_px??null,searchEnabled:e.search_enabled,searchPosition:e.search_position,searchRow:e.search_row,countrySelectorEnabled:e.country_selector_enabled,countrySelectorShowAs:e.country_selector_show_as,countryUrls:e.country_urls??{},accountEnabled:e.account_enabled??!0,cartEnabled:e.cart_enabled??!0,utilStyle:e.util_style,navTextCase:e.nav_text_case,lightReverseText:e.light_reverse_text,topTextColor:e.top_text_color,transparentTop:e.transparent_top,surface:e.surface,theme:e.theme,width:e.width,heightPx:e.height_px,sticky:e.sticky,callButton:e.call_button??!1}}export{g as clearHeaderSettingsCache,s as loadHeaderSettings,p as primeHeaderSettings,m as toPreviewHeaderSettings};
@@ -13,6 +13,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
13
13
  readonly "A few quick picks and we show the right option for you.": "A few quick picks and we show the right option for you.";
14
14
  readonly "A line about it appears here.": "A line about it appears here.";
15
15
  readonly "A note about how these are matched.": "A note about how these are matched.";
16
+ readonly "A number, @name or an ID": "A number, @name or an ID";
16
17
  readonly "A short description of your newsletter or publication.": "A short description of your newsletter or publication.";
17
18
  readonly "A short summary of the post appears here.": "A short summary of the post appears here.";
18
19
  readonly "A third": "A third";
@@ -27,6 +28,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
27
28
  readonly "Add card": "Add card";
28
29
  readonly "Add image": "Add image";
29
30
  readonly "Add product": "Add product";
31
+ readonly "Add the ways you take payment": "Add the ways you take payment";
30
32
  readonly "Add your social links": "Add your social links";
31
33
  readonly "Address label": "Address label";
32
34
  readonly "Address line 1": "Address line 1";
@@ -45,6 +47,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
45
47
  readonly "Another sample": "Another sample";
46
48
  readonly "Approved customer reviews appear here automatically \u2014 this card is only a preview of the section's shape.": "Approved customer reviews appear here automatically — this card is only a preview of the section's shape.";
47
49
  readonly "Approx. 1 email per week \u00B7 Unsubscribe in one click": "Approx. 1 email per week · Unsubscribe in one click";
50
+ readonly "Apps from": "Apps from";
48
51
  readonly "Archive button": "Archive button";
49
52
  readonly "Archive link": "Archive link";
50
53
  readonly Arrangement: "Arrangement";
@@ -76,14 +79,16 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
76
79
  readonly "Bump Profile": "Bump Profile";
77
80
  readonly "Bundles containing this product appear here on a product page.": "Bundles containing this product appear here on a product page.";
78
81
  readonly CSV: "CSV";
82
+ readonly Call: "Call";
83
+ readonly "Call button": "Call button";
79
84
  readonly "Call to action": "Call to action";
85
+ readonly "Calls the phone of the location this website shows, as its Set-up keeps it. With no phone there, the button is not shown.": "Calls the phone of the location this website shows, as its Set-up keeps it. With no phone there, the button is not shown.";
80
86
  readonly "Cap Code": "Cap Code";
81
87
  readonly Capitalised: "Capitalised";
82
88
  readonly "Car prompt": "Car prompt";
83
89
  readonly "Card text": "Card text";
84
90
  readonly "Cards to show": "Cards to show";
85
91
  readonly "Cart, checkout, your country and currency, sign-in, and this choice. The site cannot work without them.": "Cart, checkout, your country and currency, sign-in, and this choice. The site cannot work without them.";
86
- readonly Cash: "Cash";
87
92
  readonly Categories: "Categories";
88
93
  readonly "Category \u2014 wheels only": "Category — wheels only";
89
94
  readonly Centered: "Centered";
@@ -110,8 +115,10 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
110
115
  readonly "Confirmation message": "Confirmation message";
111
116
  readonly "Connect to product data": "Connect to product data";
112
117
  readonly "Consent line": "Consent line";
118
+ readonly "Contact cards": "Contact cards";
113
119
  readonly "Contact info": "Contact info";
114
120
  readonly "Contact us": "Contact us";
121
+ readonly Contacts: "Contacts";
115
122
  readonly "Content source": "Content source";
116
123
  readonly Controls: "Controls";
117
124
  readonly Copyright: "Copyright";
@@ -330,6 +337,9 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
330
337
  readonly "Menu Item": "Menu Item";
331
338
  readonly "Menu row": "Menu row";
332
339
  readonly "Message form": "Message form";
340
+ readonly "Message us": "Message us";
341
+ readonly "Messaging Strip": "Messaging Strip";
342
+ readonly "Messaging cards": "Messaging cards";
333
343
  readonly Meta: "Meta";
334
344
  readonly "Meta label": "Meta label";
335
345
  readonly "Meta lines": "Meta lines";
@@ -366,7 +376,6 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
366
376
  readonly "No products in this category": "No products in this category";
367
377
  readonly "No products in this website's catalog yet \u2014 curate products to see them here.": "No products in this website's catalog yet — curate products to see them here.";
368
378
  readonly "No products in \u201C{name}\u201D yet": "No products in “{name}” yet";
369
- readonly "No regions yet": "No regions yet";
370
379
  readonly "No trims listed": "No trims listed";
371
380
  readonly "No tyres in this website's catalog yet \u2014 curate products to see them here.": "No tyres in this website's catalog yet — curate products to see them here.";
372
381
  readonly "No wheels in this website's catalog yet \u2014 curate products to see them here.": "No wheels in this website's catalog yet — curate products to see them here.";
@@ -377,6 +386,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
377
386
  readonly "None \u2014 this section will be empty": "None — this section will be empty";
378
387
  readonly "Not authorized yet \u2014 reopen once the editor has loaded.": "Not authorized yet — reopen once the editor has loaded.";
379
388
  readonly "Not your size": "Not your size";
389
+ readonly "Number or ID": "Number or ID";
380
390
  readonly "OEM front": "OEM front";
381
391
  readonly "OEM rear": "OEM rear";
382
392
  readonly Offset: "Offset";
@@ -447,6 +457,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
447
457
  readonly "Rate table": "Rate table";
448
458
  readonly Rates: "Rates";
449
459
  readonly "Rates from": "Rates from";
460
+ readonly "Reach by": "Reach by";
450
461
  readonly "Read all posts \u2192": "Read all posts →";
451
462
  readonly "Ready when *you are.*": "Ready when *you are.*";
452
463
  readonly "Recent issues": "Recent issues";
@@ -462,6 +473,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
462
473
  readonly "Results link": "Results link";
463
474
  readonly Retry: "Retry";
464
475
  readonly "Reverse the Logo": "Reverse the Logo";
476
+ readonly "Review content": "Review content";
465
477
  readonly "Review title (optional)": "Review title (optional)";
466
478
  readonly "Reviews are collected by the Review Form section and wait for your approval before they show.": "Reviews are collected by the Review Form section and wait for your approval before they show.";
467
479
  readonly "Reviews to display": "Reviews to display";
@@ -513,6 +525,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
513
525
  readonly Settings: "Settings";
514
526
  readonly Setup: "Setup";
515
527
  readonly Shipping: "Shipping";
528
+ readonly "Shipping cannot be calculated right now. Please try again.": "Shipping cannot be calculated right now. Please try again.";
516
529
  readonly "Ships to": "Ships to";
517
530
  readonly "Ships to \u00B7 fallback": "Ships to · fallback";
518
531
  readonly Shop: "Shop";
@@ -539,8 +552,6 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
539
552
  readonly Site: "Site";
540
553
  readonly "Site Footer": "Site Footer";
541
554
  readonly "Site Header": "Site Header";
542
- readonly "Site footer \u2014 below every page": "Site footer — below every page";
543
- readonly "Site header \u2014 above every page": "Site header — above every page";
544
555
  readonly "Size (blank = none selected)": "Size (blank = none selected)";
545
556
  readonly "Size \u00B7 diameter": "Size · diameter";
546
557
  readonly "Size-filter chips": "Size-filter chips";
@@ -586,7 +597,6 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
586
597
  readonly Tag: "Tag";
587
598
  readonly "Tag filters": "Tag filters";
588
599
  readonly "Tell readers what they get and how often. One email, straight to the inbox. We will never sell your address.": "Tell readers what they get and how often. One email, straight to the inbox. We will never sell your address.";
589
- readonly Template: "Template";
590
600
  readonly "Template pages": "Template pages";
591
601
  readonly "Text color at the top": "Text color at the top";
592
602
  readonly "Text from": "Text from";
@@ -622,6 +632,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
622
632
  readonly "This record\u2019s pictures appear here on its page. A record with no pictures draws nothing.": "This record’s pictures appear here on its page. A record with no pictures draws nothing.";
623
633
  readonly "This section points at \u201C{slug}\u201D, and this website has no form with that name. Pick one from the list above, or leave it \u2014 nothing has been changed.": "This section points at “{slug}”, and this website has no form with that name. Pick one from the list above, or leave it — nothing has been changed.";
624
634
  readonly "This section still points at \u201C{slug}\u201D, and that is unchanged.": "This section still points at “{slug}”, and that is unchanged.";
635
+ readonly "This shop does not take payment online yet. Please contact the shop to order.": "This shop does not take payment online yet. Please contact the shop to order.";
625
636
  readonly "This visit": "This visit";
626
637
  readonly "This website has no currency yet. Add one in {place} and these cards will price. Only you can see this line.": "This website has no currency yet. Add one in {place} and these cards will price. Only you can see this line.";
627
638
  readonly "This website\u2019s forms couldn\u2019t be loaded, so there is nothing to choose from yet.": "This website’s forms couldn’t be loaded, so there is nothing to choose from yet.";
@@ -635,6 +646,7 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
635
646
  readonly Trim: "Trim";
636
647
  readonly "Trust bullets": "Trust bullets";
637
648
  readonly "Trust markers": "Trust markers";
649
+ readonly "Typed reviews": "Typed reviews";
638
650
  readonly "Tyre type": "Tyre type";
639
651
  readonly Tyres: "Tyres";
640
652
  readonly "Tyres shown are fitment-matched companions.": "Tyres shown are fitment-matched companions.";
@@ -672,6 +684,8 @@ export declare const STOREFRONT_BLOCKS_WORDS: {
672
684
  readonly "Where the answers go": "Where the answers go";
673
685
  readonly "Whether the footer's blocks sit on the page's column, or run edge to edge. The background always spans the screen.": "Whether the footer's blocks sit on the page's column, or run edge to edge. The background always spans the screen.";
674
686
  readonly "Which countries this website serves \u2014 and each region's own URL \u2014 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.": "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.";
687
+ readonly "Who to ask": "Who to ask";
688
+ readonly "Who to ask for": "Who to ask for";
675
689
  readonly Wide: "Wide";
676
690
  readonly "Will it fit *your car?*": "Will it fit *your car?*";
677
691
  readonly Window: "Window";