efficient-storefront-blocks 0.74.0 → 0.76.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 +48 -0
- package/dist/chunks/EditorPreviewCheckout-ANI7HUYX.js +4 -0
- package/dist/chunks/{SiteEditorProvider-Z33JB5BA.js → SiteEditorProvider-AJUWZYHT.js} +1 -1
- package/dist/chunks/chunk-3IQQNZIM.js +311 -0
- package/dist/chunks/chunk-4F5CAFXO.js +1 -0
- package/dist/chunks/{chunk-5OFEWRWI.js → chunk-5NXOTPHK.js} +1 -1
- package/dist/chunks/chunk-YAYHH5GY.js +1 -0
- package/dist/chunks/{chunk-QJDTP7K6.js → chunk-YFPWVNDB.js} +1 -1
- package/dist/chunks/{fitment-data-DHKRLKNI.js → fitment-data-IZYCNTET.js} +1 -1
- package/dist/contract.js +2 -2
- package/dist/editor/components/BlogSource.js +1 -1
- package/dist/editor/components/CategoryProductFields.d.ts +22 -0
- package/dist/editor/components/CategoryProductFields.js +1 -0
- package/dist/editor/components/CategorySource.d.ts +12 -0
- package/dist/editor/components/CategorySource.js +1 -1
- package/dist/editor/components/CollectionPicker.js +1 -1
- package/dist/editor/components/CountryShowAsTiles.js +1 -1
- package/dist/editor/components/EditorPreviewChat.js +1 -11
- package/dist/editor/components/EditorPreviewSurface.js +1 -1
- package/dist/editor/components/GalleryProductBinding.js +1 -1
- package/dist/editor/components/GalleryShowcaseSource.js +1 -1
- package/dist/editor/components/HeaderSettingsPanel.d.ts +8 -4
- package/dist/editor/components/HeaderSettingsPanel.js +1 -1
- package/dist/editor/components/MenuPicker.js +1 -1
- package/dist/editor/components/PreviewProductPicker.js +1 -1
- package/dist/editor/components/ProductHeroSource.js +1 -1
- package/dist/editor/components/ProductPicker.js +1 -1
- package/dist/editor/components/SocialLinksDoor.js +1 -1
- package/dist/editor/components/SpecTableSource.js +1 -1
- package/dist/editor/lib/document/block-align-row.d.ts +2 -0
- package/dist/editor/lib/document/block-align-row.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/AccountBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/AlloyWheelsListing/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/BundleOffer/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/CartBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/CatalogFilterBar/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/CheckoutCTA/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/CollectionCard/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/Collections/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/CompatibleTyres/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/CountrySwitchBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/DeliveryOptions/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/DetailRows/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/EuTyreLabel/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/FitmentFinder/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/FitmentTable/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/Gallery/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/GalleryB/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/GalleryItem/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductGallery/fields.d.ts +2 -2
- package/dist/editor/lib/document/blocks/commerce/ProductGallery/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductGrid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductHero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/RelatedProducts/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/SearchBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/SpecTable/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/TyreFitment/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/TyreSizes/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/shared-fields.d.ts +1 -0
- package/dist/editor/lib/document/blocks/commerce/shared-fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/AppointmentBooking/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/BookingBox/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/ContactCards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/ContactRouting/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/Events/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/Footer/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterDivider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterEmailSignup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterGroup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterLogo/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterMenu/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterMessaging/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterPayment/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterSocial/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterText/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/Form/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/blocks/service/RatingBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/ReviewForm/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/Reviews/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/SubmitBox/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/SubmitBuild/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/Subscribe/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/SubscribeBlogs/fields.js +1 -1
- package/dist/editor/lib/document/box-header.js +1 -1
- package/dist/editor/lib/document/config.d.ts +16 -16
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/editor-currency-source.js +1 -1
- package/dist/editor/lib/efficient-backend.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +12 -16
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +413 -724
- package/dist/links.js +1 -1
- package/dist/render/app/globals.css +32 -79
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/BoxHeaderBar.js +1 -1
- package/dist/render/components/CartContext.d.ts +4 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/CartDrawer.js +2 -2
- package/dist/render/components/CatalogFilterBarSection.d.ts +1 -1
- package/dist/render/components/CatalogFilterBarSection.js +1 -1
- package/dist/render/components/Collections.js +1 -1
- package/dist/render/components/CompatibleTyres.js +1 -1
- package/dist/render/components/ConsentPanel.js +1 -1
- package/dist/render/components/ContactRouting.js +1 -1
- package/dist/render/components/CouponField.js +1 -1
- package/dist/render/components/CurrencyContext.js +1 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FitmentTable.js +1 -1
- package/dist/render/components/FooterGroup.d.ts +1 -1
- package/dist/render/components/FooterGroup.js +1 -1
- package/dist/render/components/FooterLogo.d.ts +2 -1
- package/dist/render/components/FooterMenu.js +1 -1
- package/dist/render/components/FooterPayment.d.ts +1 -2
- package/dist/render/components/FooterPayment.js +1 -1
- package/dist/render/components/FooterSocial.d.ts +1 -2
- package/dist/render/components/FooterSocial.js +1 -1
- package/dist/render/components/FormBlock.js +1 -1
- package/dist/render/components/GalleryItem.js +1 -1
- package/dist/render/components/GalleryShowcase.js +1 -1
- package/dist/render/components/Header.js +1 -1
- package/dist/render/components/HeaderToolBlocks.d.ts +1 -2
- package/dist/render/components/HeaderToolBlocks.js +1 -1
- package/dist/render/components/HeaderTools.js +1 -1
- package/dist/render/components/Lightbox.d.ts +2 -2
- package/dist/render/components/Lightbox.js +1 -1
- package/dist/render/components/LinkedProductHero.d.ts +2 -0
- package/dist/render/components/PopupFrame.d.ts +17 -4
- package/dist/render/components/PopupFrame.js +1 -1
- package/dist/render/components/ProductGallery.js +1 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/ProductHeroPanel.d.ts +3 -1
- package/dist/render/components/ProductHeroPanel.js +1 -1
- package/dist/render/components/ProductLightbox.js +1 -1
- package/dist/render/components/ReviewForm.js +1 -1
- package/dist/render/components/SectionGroupBody.js +1 -1
- package/dist/render/components/SpecTable.d.ts +2 -1
- package/dist/render/components/SpecTable.js +1 -1
- package/dist/render/components/SubscribePopup.js +2 -2
- package/dist/render/components/TyreRenderSvg.js +1 -1
- package/dist/render/components/booking/BookingRegions.js +1 -1
- package/dist/render/components/catalog/CatalogFilterBar.d.ts +4 -4
- package/dist/render/components/catalog/CatalogFilterBar.js +1 -1
- package/dist/render/components/catalog/CatalogFilterContext.d.ts +5 -3
- package/dist/render/components/catalog/CatalogFilterContext.js +1 -1
- package/dist/render/components/catalog/FilterPill.d.ts +3 -1
- package/dist/render/components/catalog/FilterPill.js +1 -1
- package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
- package/dist/render/components/checkout/checkout-parts.js +1 -1
- package/dist/render/components/checkout/checkout-state.d.ts +19 -2
- package/dist/render/components/checkout/checkout-state.js +3 -3
- package/dist/render/components/fitment/StockFitmentCard.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicProductGallery.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicProductHero.d.ts +2 -0
- package/dist/render/components/pdp-dynamic/DynamicRelatedProducts.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicSpecTable.js +1 -1
- package/dist/render/components/pdp-dynamic/RecordPhotoGallery.js +1 -1
- package/dist/render/components/product-hero/TyreHeroFitment.js +1 -1
- package/dist/render/components/product-hero/VehicleQuestion.d.ts +1 -2
- package/dist/render/components/product-hero/VehicleQuestion.js +1 -1
- package/dist/render/components/product-hero/WheelHeroFitment.js +1 -1
- package/dist/render/components/product-hero/trust-bullets.d.ts +5 -0
- package/dist/render/components/product-hero/trust-bullets.js +1 -0
- package/dist/render/components/useModalDismiss.d.ts +2 -1
- package/dist/render/components/useModalDismiss.js +1 -1
- package/dist/render/components/wheels-plp/AlloyWheelsListing.js +1 -1
- package/dist/render/components/wheels-plp/PlpNotifyMeDialog.js +1 -1
- package/dist/render/lib/api/index.d.ts +0 -8
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/api/types.d.ts +7 -3
- package/dist/render/lib/booking/appointment-time.d.ts +2 -0
- package/dist/render/lib/booking/appointment-time.js +1 -0
- package/dist/render/lib/catalog/from-wheel.js +1 -1
- package/dist/render/lib/catalog/plp-item.js +1 -1
- package/dist/render/lib/checkout/stripe-appearance.d.ts +10 -0
- package/dist/render/lib/checkout/stripe-appearance.js +1 -0
- package/dist/render/lib/checkout/wallet-return.d.ts +1 -1
- package/dist/render/lib/commerce.d.ts +1 -0
- package/dist/render/lib/commerce.js +1 -1
- package/dist/render/lib/content/legacy-block-align.d.ts +2 -0
- package/dist/render/lib/content/legacy-block-align.js +1 -0
- package/dist/render/lib/content/menu-row.d.ts +0 -3
- package/dist/render/lib/content/menu-row.js +1 -1
- package/dist/render/lib/content/site.d.ts +1 -1
- package/dist/render/lib/document/blocks/commerce/AlloyWheelsListing/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/BundleOffer/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/CheckoutCTA/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/Collections/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/CompatibleTyres/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/CountrySwitchBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/DeliveryOptions/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/DetailRows/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/EuTyreLabel/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/FitmentFinder/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/FitmentTable/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductHero/meta.d.ts +6 -0
- package/dist/render/lib/document/blocks/commerce/ProductHero/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductHero/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/RelatedProducts/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/SpecTable/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/SpecTable/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/TyreFitment/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/TyreSizes/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/ContactCards/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/ContactRouting/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/FooterPayment/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/FooterSocial/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/MessagingCards/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/OpeningHours/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/RateTable/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/SubmitBuild/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/Subscribe/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/SubscribeBlogs/meta.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/render/lib/document/render-client.d.ts +8 -3
- package/dist/render/lib/document/render-client.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -1
- package/dist/render/lib/document/storefront-root.d.ts +0 -2
- package/dist/render/lib/document/storefront-root.js +1 -1
- package/dist/render/lib/field-input.d.ts +1 -0
- package/dist/render/lib/field-input.js +1 -0
- package/dist/render/lib/sections/content-cap-gutter.d.ts +1 -0
- package/dist/render/lib/sections/content-cap-gutter.js +1 -0
- package/dist/render/lib/sections/hero-trust-bullets.d.ts +2 -0
- package/dist/render/lib/sections/hero-trust-bullets.js +1 -0
- package/dist/render/lib/tyres/spec-sheet.d.ts +17 -0
- package/dist/render/lib/tyres/spec-sheet.js +1 -1
- package/dist/render/lib/use-scope-class.d.ts +1 -0
- package/dist/render/lib/use-scope-class.js +1 -0
- package/dist/render/lib/wheels/catalog-default-layout.d.ts +3 -3
- package/dist/render/lib/wheels/catalog-default-layout.js +1 -1
- package/dist/render/lib/wheels/catalog-filters.d.ts +2 -2
- package/dist/render/lib/wheels/catalog-filters.js +1 -1
- package/dist/render/lib/wheels/grid-source.d.ts +7 -1
- package/dist/render/lib/wheels/grid-source.js +1 -1
- package/dist/render/lib/wheels/plp-hydrate.js +1 -1
- package/dist/words.d.ts +48 -48
- package/dist/words.js +6 -6
- package/package.json +7 -4
- package/dist/chunks/EditorPreviewCheckout-YQ3F5MSG.js +0 -4
- package/dist/chunks/chunk-BZDVZUF4.js +0 -1
- package/dist/chunks/chunk-UGXNUQRA.js +0 -246
- package/dist/chunks/chunk-UJW4B64R.js +0 -1
- package/dist/render/components/product-hero/hero-content.d.ts +0 -7
- package/dist/render/components/product-hero/hero-content.js +0 -1
- package/dist/render/components/useIsLightTheme.d.ts +0 -1
- package/dist/render/components/useIsLightTheme.js +0 -1
- package/dist/render/lib/content/product-hero.d.ts +0 -14
- package/dist/render/lib/content/product-hero.js +0 -1
- package/dist/render/lib/wheels/collections.d.ts +0 -22
- package/dist/render/lib/wheels/collections.js +0 -1
- /package/dist/chunks/{chunk-UGXNUQRA.js.LEGAL.txt → chunk-3IQQNZIM.js.LEGAL.txt} +0 -0
|
@@ -19,10 +19,14 @@ interface Props {
|
|
|
19
19
|
onOpenWebsiteSettings?: () => void;
|
|
20
20
|
}
|
|
21
21
|
export default function HeaderSettingsPanel({ tokenRef, siteId, onClose, onAuthExpired, inline, placeholderMode, websiteName, onOpenWebsiteSettings, }: Props): import("react").JSX.Element;
|
|
22
|
-
export declare function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
export declare function PxSlider({ labelledBy, value, min, max, step, onPreview, onCommit, }: {
|
|
23
|
+
labelledBy: string;
|
|
24
|
+
value: number;
|
|
25
|
+
min: number;
|
|
26
|
+
max: number;
|
|
27
|
+
step: number;
|
|
28
|
+
onPreview: (px: number) => void;
|
|
29
|
+
onCommit?: (px: number) => void;
|
|
26
30
|
}): import("react").JSX.Element;
|
|
27
31
|
export declare const HEADER_SEGMENTED: {
|
|
28
32
|
readonly logoPosition: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as r,Fragment as B}from"react/jsx-runtime";import{useCallback as k,useEffect as V,useRef as le,useState as E}from"react";import{ApiError as He,storefrontAdmin as A}from"../../render/lib/api/index.js";import{requestMediaPick as Te}from"efficient-easel/screen/lib/media-picker";import{refreshSiteLiveState as Ee}from"efficient-web-builder/editor/lib/site-live-state";import{useEaselHost as fe}from"efficient-easel/screen/lib/host";import{onHeaderMenusChanged as Ae}from"efficient-web-builder/format/lib/editor-events";import{loadAllSitesMenus as Pe,refreshAllSitesMenus as Oe}from"../../render/lib/menu-source.js";import{headerMenuMissingWarning as Me}from"../../render/lib/content/menu-placeholder.js";import{say as l,sayCount as Re}from"efficient-web-builder/format/lib/editor-words";import{sayWith as ne}from"../lib/say-with.js";import{NEUTRAL_SITE_NAME as De}from"../../render/lib/content/site.js";import{SECTION_WIDTH_CHOICES as Ie,WIDTH_CHOICE_LABEL as ze}from"efficient-web-builder/format/lib/content/section-width";import{usePreviewHeader as Be}from"efficient-web-builder/render/components/PreviewHeaderContext";import{HEADER_LOGO_PX as ge,HEADER_LOGO_PX_MIN as Ge,HEADER_LOGO_PX_MAX as We}from"efficient-web-builder/render/components/Logo";import{HEADER_HEIGHT_PX as $,HEADER_MENU_GAP_PX as K}from"efficient-web-builder/render/lib/document/header-clearance";import Fe from"efficient-web-builder/editor/components/SectionThemePicker";import{HEADER_THEME_FOLLOW as be}from"../../render/lib/content/header-theme.js";import{resolveHeaderInkMode as Ue}from"efficient-web-builder/render/lib/document/header-ink";import{absolutizeApiUrl as je}from"efficient-web-builder/render/lib/media";import{loadHeaderSettings as Xe,primeHeaderSettings as Ve,clearHeaderSettingsCache as Ke,toPreviewHeaderSettings as qe}from"../lib/header-settings-source.js";import{Banner as Ye,Button as oe,Drawer as $e,InputNumber as Ze,LoadingSpinner as Je,MediaUploadField as Qe,ShowWhen as q,Slider as et,Tabs as tt,tabButtonId as lt,tabPanelId as nt}from"efficient-shell/ui";import{CountryShowAsTiles as ot}from"./CountryShowAsTiles.js";import{truthy as at,visibleFields as it}from"efficient-web-builder/render/lib/document/show-when";const st={field:"country_selector_enabled",is:!0},ae={not:{context:"placeholderMode",is:!0}},rt={field:"menu_position",is:"beside"},ct={all:[{field:"logo_position",is:"center"},{not:{field:"menu_position",is:"center"}}]},dt={all:[ae,at("country_selector_enabled")]};import{SettingsDefaultReset as ie,SettingsSwitch as W}from"efficient-easel/panel";import{FieldSelect as se}from"efficient-easel/fields";import{useEaselStrings as ut}from"efficient-easel/strings";import{ListIcon as ht,LogoIcon as mt,SettingsIcon as pt,StylesIcon as ft}from"efficient-easel/icons";import{GroupLabel as gt,Segmented as P}from"efficient-web-builder/editor/lib/document/controls";import{HintsToggle as re,SHOW_HINTS_DEFAULT as bt}from"efficient-web-builder/editor/components/WebsiteSettingsPanel";const ce="sf-header",_e="sf-header-size-label",xe="sf-header-gap-label",ve="sf-header-height-label",we=[{id:"logo",label:"Logo",icon:e(mt,{})},{id:"menu",label:"Menu",icon:e(ht,{}),showWhen:ae},{id:"tools",label:"Tools",icon:e(pt,{})},{id:"look",label:"Look",icon:e(ft,{})}];function _t({tokenRef:o,siteId:a,onClose:b,onAuthExpired:x,inline:O,placeholderMode:C,websiteName:v,onOpenWebsiteSettings:L}){const m=fe(),M=ut(),[n,_]=E(null),[R,S]=E(null),[D,Y]=E(!1),[u,N]=E(we[0].id),[c,T]=E(bt),F=n,Z={placeholderMode:C},J=Object.values(it(Object.fromEntries(we.map(t=>[t.id,t])),F,Z)),I=J.find(t=>t.id===u)??J[0],[Se,ye]=E(0),{setSettings:ue}=Be(),U=le(null),j=le(null),X=le(null);V(()=>{let t=!1,s=null,h=null;const d=3,H=(G,z=0)=>{t||S(null),Xe(G,a,z>0).then(Ne=>!t&&_(Ne)).catch(()=>{t||(z+1<d?h=setTimeout(()=>H(G,z+1),600*(z+1)):S(l("Could not load header settings.")))})},pe=o.current;if(pe)H(pe);else{let G=0;s=setInterval(()=>{const z=o.current;if(z){s&&clearInterval(s),s=null,t||S(null),H(z);return}G+=250,G===5e3&&!t&&S(l("Waiting for editor authorization…")),G>=3e4&&(s&&clearInterval(s),s=null,t||S(l("Not authorized yet — reopen once the editor has loaded.")))},250)}return()=>{t=!0,s&&clearInterval(s),h&&clearTimeout(h)}},[o,Se,a]),V(()=>{n&&ue(qe(n))},[n,ue]),V(()=>()=>{U.current&&clearTimeout(U.current),j.current&&clearTimeout(j.current),X.current&&clearTimeout(X.current)},[]);const g=k(async(t,s)=>{const h=o.current;if(!h||!n)return;const d=n;s&&_({...n,...s}),Y(!0),S(null);try{const H=await t(h);_(H),Ve(H,a),Ee()}catch(H){_(d),H instanceof He&&H.status===401?(Ke(a),x?.(),S(l("Authorization expired — try again in a moment."))):S(l("Could not save. Please retry."))}finally{Y(!1)}},[n,o,x,a]),p=k(t=>g(s=>A.updateHeaderSettings(t,s,a??void 0),t),[g,a]),he=k(t=>{g(s=>A.setHeaderLogoFromAsset(t,s,a??void 0))},[g,a]),Ce=k(()=>{Te(m,{accept:"image/svg+xml",title:l("Logo (SVG)")}).then(t=>{t&&he(t.id)})},[he]),Q=k((t,s=!0)=>{_(d=>d&&{...d,logo_size_px:t}),U.current&&clearTimeout(U.current);const h=()=>{g(d=>A.updateHeaderSettings({logo_size_px:t},d,a??void 0))};s?h():U.current=setTimeout(h,400)},[g,a]),ee=k((t,s=!0)=>{_(d=>d&&{...d,height_px:t}),j.current&&clearTimeout(j.current);const h=()=>{g(d=>A.updateHeaderSettings({height_px:t},d,a??void 0))};s?h():j.current=setTimeout(h,400)},[g,a]),te=k((t,s=!0)=>{_(d=>d&&{...d,menu_gap_px:t}),X.current&&clearTimeout(X.current);const h=()=>{g(d=>A.updateHeaderSettings({menu_gap_px:t},d,a??void 0))};s?h():X.current=setTimeout(h,400)},[g,a]),Le=k(()=>{g(async t=>{const s=await A.clearHeaderLogo(t,a??void 0);return s.reverse_logo?A.updateHeaderSettings({reverse_logo:!1},t,a??void 0):s})},[g,a]),ke=k(t=>{_(s=>s&&{...s,menu:t?.id??null,menu_handle:t?.handle??null,menu_name:t?.name??null,menu_items:t?t.items.map(h=>({label:h.label,url:h.url,dropdown_menu:h.dropdown_menu??null,dropdown_items:h.dropdown_items??[]})):[]}),g(s=>A.updateHeaderSettings({menu:t?.id??null},s,a??void 0))},[g,a]),me=r(B,{children:[R&&e(Ye,{tone:"danger",className:"mx-4 mt-3",action:n?void 0:e(oe,{variant:"secondary",size:"md",onClick:()=>ye(t=>t+1),children:l("Retry")}),children:R}),n?r(B,{children:[e(Et,{tabs:J,activeId:I.id,onSelect:N}),r("div",{id:nt(ce,I.id),role:"tabpanel","aria-labelledby":lt(ce,I.id),className:"flex flex-col p-4 [&>*+*]:mt-3",children:[I.id==="logo"&&r(B,{children:[e(w,{label:"Image"}),e(q,{rule:ae,values:F,context:Z,children:e(xt,{settings:n,websiteName:v,onPick:Ce,onClear:Le,showHint:c})}),e(f,{label:"Reverse the Logo",children:e(W,{checked:n.reverse_logo,onChange:t=>p({reverse_logo:t}),ariaLabel:l("Reverse the Logo")})}),e(y,{shown:c,children:l("Keeps the logo readable on any header — flips just its black & white parts to contrast the bar behind it (in both light and dark themes). Any other colors are kept as-is.")}),e(w,{label:"Placement"}),e(wt,{label:i.logoPosition.label,value:i.logoPosition.options.find(t=>t.value===i.logoPosition.choose(n.logo_position))?.label,children:e(P,{value:i.logoPosition.choose(n.logo_position),options:i.logoPosition.options,onChange:t=>p({logo_position:t}),ariaLabel:i.logoPosition.label})}),r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{id:_e,className:"text-xs text-[var(--ink-muted)]",children:l("Size")}),r("span",{className:"flex items-center gap-1",children:[r("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":n.logo_size_px!=null||void 0,children:[n.logo_size_px??ge[n.logo_size],"px"]}),e(ie,{label:l("Size"),words:M.panel,changed:n.logo_size_px!=null,onReset:()=>Q(null)})]})]}),e(de,{labelledBy:_e,min:Ge,max:We,step:2,value:n.logo_size_px??ge[n.logo_size],onPreview:t=>Q(t,!1),onCommit:t=>Q(t,!0)}),e(y,{shown:c,children:l("Sets the logo’s height; the width follows the logo’s own proportions.")})]}),e(re,{shown:c,onChange:T})]}),I.id==="menu"&&r(B,{children:[e(w,{label:"Links"}),e(vt,{token:o.current,menuId:n.menu,menuName:n.menu_name,itemCount:n.menu_items?.length??0,onPick:ke}),e(f,{label:i.menuAlign.label,children:e(P,{value:i.menuAlign.choose(n.menu_position),options:i.menuAlign.options.filter(t=>t.value!=="beside"||n.logo_position!=="center"),onChange:t=>p({menu_position:t}),ariaLabel:i.menuAlign.label})}),e(q,{rule:rt,values:F,children:r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{id:xe,className:"text-xs text-[var(--ink-muted)]",children:l("Space from the logo")}),r("span",{className:"flex items-center gap-1",children:[r("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":n.menu_gap_px!=null||void 0,children:[n.menu_gap_px??K.default,"px"]}),e(ie,{label:l("Space from the logo"),words:M.panel,changed:n.menu_gap_px!=null,onReset:()=>te(null)})]})]}),e(de,{labelledBy:xe,min:K.min,max:K.max,step:K.step,value:n.menu_gap_px??K.default,onPreview:t=>te(t,!1),onCommit:t=>te(t,!0)}),e(y,{shown:c,children:l("How much room the menu leaves the logo. Only the logo moves away; the space between the menu words stays as it is.")})]})}),e(f,{label:i.menuRow.label,children:e(P,{value:i.menuRow.choose(n.menu_row),options:i.menuRow.options,onChange:t=>p({menu_row:t}),ariaLabel:i.menuRow.label})}),e(q,{rule:ct,values:F,children:e(f,{label:"Left items",children:e("div",{className:"w-16",children:e(se,{value:n.menu_split??3,ariaLabel:l("Left items"),onChange:t=>p({menu_split:t}),options:[1,2,3,4].map(t=>({label:String(t),value:t}))})})})}),e(f,{label:i.navTextCase.label,children:e(P,{value:i.navTextCase.choose(n.nav_text_case),options:i.navTextCase.options,onChange:t=>p({nav_text_case:t}),ariaLabel:i.navTextCase.label})}),e(y,{shown:c,children:ne(l("{uppercase} draws SEARCH and BAG; {capitalised} draws Search and Bag. It covers the menu links and the Tools words together, and it leaves a name like FusionForge exactly as you typed it."),{uppercase:e("strong",{children:l("Uppercase")}),capitalised:e("strong",{children:l("Capitalised")})})})]}),I.id==="tools"&&r(B,{children:[e(w,{label:"Style"}),e(f,{label:i.utilStyle.label,children:e(P,{value:i.utilStyle.choose(n.util_style),options:i.utilStyle.options,onChange:t=>p({util_style:t}),ariaLabel:i.utilStyle.label})}),e(y,{shown:c,children:ne(l("{text} draws the words — Search, Account, Bag — instead of the little pictures. It changes how they look, not whether they are shown: that stays with the switches below."),{text:e("strong",{children:l("Text")})})}),e(w,{label:"Search"}),e(f,{label:"Search",children:e(W,{checked:n.search_enabled,onChange:t=>p({search_enabled:t}),ariaLabel:l("Search")})}),e(f,{label:i.searchPosition.label,children:e(P,{value:i.searchPosition.choose(n.search_position),options:i.searchPosition.options,onChange:t=>p({search_position:t}),ariaLabel:i.searchPosition.label})}),e(w,{label:"Country selector"}),e(f,{label:"Show selector",children:e(W,{checked:n.country_selector_enabled,onChange:t=>p({country_selector_enabled:t}),ariaLabel:l("Show selector")})}),e(q,{rule:st,values:{country_selector_enabled:n.country_selector_enabled},children:e(f,{label:"Show as",stacked:!0,children:e(ot,{value:n.country_selector_show_as,onChange:t=>p({country_selector_show_as:t})})})}),e(q,{rule:dt,values:F,context:Z,children:e(y,{shown:c,children:ne(l("Which countries this website serves — and each region's own URL — is set in the admin console under {place}. Whether the picker is SHOWN stays here: that is header chrome, but the served-country list has tax consequences and belongs with commerce configuration."),{place:e("strong",{children:l("Storefront › Settings › Regions & currencies")})})})}),e(w,{label:"Account and cart"}),e(f,{label:"Account",children:e(W,{checked:n.account_enabled??!0,onChange:t=>p({account_enabled:t}),ariaLabel:l("Account")})}),e(f,{label:"Cart",children:e(W,{checked:n.cart_enabled??!0,onChange:t=>p({cart_enabled:t}),ariaLabel:l("Cart")})}),e(w,{label:"Call"}),e(f,{label:"Call button",children:e(W,{checked:n.call_button??!1,onChange:t=>p({call_button:t}),ariaLabel:l("Call button")})}),e(y,{shown:c,children:l("Calls the phone of the location this website shows, as its Set-up keeps it. With no phone there, the button is not shown.")}),e(re,{shown:c,onChange:T})]}),I.id==="look"&&r(B,{children:[e(w,{label:"Dimensions"}),e(f,{label:i.width.label,children:e(P,{value:i.width.choose(n.width),options:i.width.options,onChange:t=>p({width:t}),ariaLabel:i.width.label})}),r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{id:ve,className:"text-xs text-[var(--ink-muted)]",children:l("Height")}),r("span",{className:"flex items-center gap-1",children:[r("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":n.height_px!=null||void 0,children:[n.height_px??$.default,"px"]}),e(ie,{label:l("Height"),words:M.panel,changed:n.height_px!=null,onReset:()=>ee(null)})]})]}),e(de,{labelledBy:ve,min:$.min,max:$.max,step:2,value:n.height_px??$.default,onPreview:t=>ee(t,!1),onCommit:t=>ee(t,!0)}),e(y,{shown:c,children:l("Sets how tall the header bar is; the content below it shifts down to match.")})]}),e(f,{label:"Border thickness",children:e("div",{className:"w-24",children:e(Ze,{value:n.border_thickness,min:0,max:20,precision:0,size:"md",suffix:"px","aria-label":l("Border thickness"),onChange:t=>p({border_thickness:Math.max(0,t??0)})})})}),e(w,{label:"Color"}),e(f,{label:"Theme",children:e(Fe,{value:n.theme??be,onChange:t=>p({theme:t===be?null:t}),followLabel:l("Follow the site theme")})}),e(y,{shown:c,children:l("The color the bar paints once it is solid — after any scroll, and on every product page from the first paint. Follow the site theme keeps it on whatever palette the site is on.")}),e(f,{label:i.topTextColor.label,children:e(P,{value:i.topTextColor.choose(n.top_text_color),options:i.topTextColor.options,onChange:t=>p({top_text_color:t}),ariaLabel:i.topTextColor.label})}),e(y,{shown:c,children:l("Auto reads what the first section on each page says it is — dark, light or accent — and picks the text that can be read on it. Set Light or Dark to decide it yourself when Auto reads a page wrong.")}),e(w,{label:"Behavior"}),e(f,{label:"Sticky header",children:e("div",{className:"w-32",children:e(se,{value:n.sticky,ariaLabel:l("Sticky header"),onChange:t=>p({sticky:t}),options:[{label:l("None"),value:"none"},{label:l("Always"),value:"always"},{label:l("On scroll up"),value:"on_scroll_up"}]})})}),L&&r(B,{children:[e(w,{label:"Display mode"}),e("p",{className:"text-[12px] text-[var(--ink-faint)]",children:l("Set the default Light / Dark / Auto mode and show or hide the light↔dark switch in Appearance.")}),e(oe,{variant:"link",size:"sm",className:"self-start",onClick:L,children:l("Set up display mode →")})]}),e(re,{shown:c,onChange:T})]})]})]}):R?null:e(Je,{size:"sm",padding:"p-4",label:l("Loading…")})]});return O?r("div",{className:"flex flex-col",children:[D&&e("div",{className:"px-4 pt-2 text-[11px] text-[var(--ink-faintest)]",children:l("Saving…")}),me]}):r($e,{open:!0,onClose:b??(()=>{}),side:"right",size:"sm",title:l("Header"),children:[D&&e("div",{className:"pb-2 text-[11px] text-[var(--ink-faintest)]",children:l("Saving…")}),me]})}function xt({settings:o,websiteName:a,onPick:b,onClear:x,showHint:O}){const C=!!o.logo_url,v=!C&&!!o.default_logo_url,L=je(o.effective_logo_url),m=a&&a.trim()?a.trim():De;return r("div",{className:"flex flex-col gap-2",children:[e(Qe,{value:L||"",onChange:M=>{M||x()},onPick:b,accept:"image/svg+xml,.svg",acceptHint:"SVG",fit:"contain",height:80,placeholder:l("No logo — “{name}” wordmark shown",{name:m}),replaceLabel:C?l("Replace SVG logo"):l("Upload SVG logo"),allowRemove:C,removeLabel:l("Use company default")}),e(y,{shown:O,children:C?l("Custom SVG logo uploaded for this store."):v?l("Using your company logo from the database."):l("No company logo on file — upload an SVG or the wordmark is used.")})]})}function vt({token:o,menuId:a,menuName:b,itemCount:x,onPick:O}){const C=fe(),[v,L]=E(null),[m,M]=E(!1),n=k(u=>{L(u),M(!0)},[]);V(()=>{let u=!1;return Pe(o).then(N=>!u&&n(N)).catch(()=>!u&&L([])),()=>{u=!0}},[o,n]),V(()=>{let u=!1;const N=Ae(()=>{Oe(o).then(c=>!u&&n(c)).catch(()=>{})});return()=>{u=!0,N()}},[o,n]);const _=v===null,R=!_&&(v?.length??0)===0,S=!_&&(v??[]).some(u=>u.id===a),D=S?a:"",Y=m&&!!a&&!S;return r("div",{className:"flex flex-col gap-2",children:[e(f,{label:"Menu",children:e("div",{className:"w-[170px] max-w-full",children:e(se,{value:D,ariaLabel:l("Menu"),readOnly:_||R,onChange:u=>{const N=u?(v??[]).find(c=>c.id===u):null;O(N?{...N,items:N.items.map(c=>({...c,dropdown_items:(v??[]).find(T=>T.id===c.dropdown_menu)?.items.map(T=>({label:T.label,url:T.url}))??[]}))}:null)},options:[{label:_?l("Loading…"):R?l("No menus"):l("Default links"),value:""},...(v??[]).map(u=>({label:`${u.name} (${u.item_count??u.items.length})`,value:u.id}))]})})}),Y?e("p",{className:"text-[12px] text-[var(--sf-warning,#b45309)]",children:Me()}):e("p",{className:"text-[12px] text-[var(--ink-faint)]",children:D?Re("Header shows “{name}” — {n} link.","Header shows “{name}” — {n} links.",x,{name:b??l("the linked menu")}):R?l("No menus yet. Create one in {place}, then pick it here.",{place:l("Storefront → Menus")}):l("Pick a menu to drive the header links, or keep the built-in default links.")}),e(oe,{variant:"link",size:"sm",className:"self-start",onClick:()=>C.send("storefront-editor:open-menus",{menuId:D||null}),children:D?l("Edit menu →"):l("Manage menus →")})]})}function y({shown:o,children:a}){return o?e("p",{className:"text-[11px] text-[var(--sf-muted)]",children:a}):null}function de({labelledBy:o,value:a,min:b,max:x,step:O,onPreview:C,onCommit:v}){const L=m=>{m instanceof HTMLInputElement&&m.type==="range"&&v(Number(m.value))};return e("div",{onPointerUp:m=>L(m.target),onKeyUp:m=>{/^(Arrow|Home|End|Page)/.test(m.key)&&L(m.target)},children:e(et,{value:a,min:b,max:x,step:O,showInput:!1,size:"sm","aria-labelledby":o,valueText:m=>l("{n} pixels",{n:m}),onChange:m=>{m!=null&&C(m)}})})}function wt({label:o,value:a,children:b}){return r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-center justify-between",children:[e("span",{className:"text-xs text-[var(--ink-muted)]",children:l(o)}),a&&e("span",{className:"text-[12px] text-[var(--ink-faint)]",children:l(a)})]}),b]})}function w({label:o}){return e(gt,{label:o})}function f({label:o,children:a,stacked:b=!1}){return b?r("div",{className:"flex flex-col gap-y-2",children:[e("span",{className:"text-xs text-[var(--sf-text-secondary)]",children:l(o)}),a]}):r("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-2",children:[e("span",{className:"text-xs text-[var(--sf-text-secondary)]",children:l(o)}),e("div",{className:"flex flex-shrink-0 grow justify-end",children:a})]})}const St=[{label:"Left",value:"left"},{label:"Center",value:"center"}],yt=[{label:"Left",value:"left"},{label:"Right",value:"right"}],Ct=[{label:"Right",value:"left"},{label:"Centered",value:"center"},{label:"Beside logo",value:"beside"}],Lt=[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],kt=Ie.map(o=>({label:ze[o],value:o})),Nt=[{label:"Icon",value:"icon"},{label:"Text",value:"text"}],Ht=[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],Tt=[{label:"Auto",value:"auto"},{label:"Light",value:"light"},{label:"Dark",value:"dark"}],i={logoPosition:{label:"Position",options:St,choose:o=>o==="right"?"center":o},menuAlign:{label:"Alignment",options:Ct,choose:o=>o==="center"?"center":o==="beside"?"beside":"left"},menuRow:{label:"Row",options:Lt,choose:o=>o==="inline"?"inline":"top"},searchPosition:{label:"Position",options:yt,choose:o=>o},width:{label:"Width",options:kt,choose:o=>o},navTextCase:{label:"Letters",options:Ht,choose:o=>o==="capitalised"?"capitalised":"uppercase"},utilStyle:{label:"Show as",options:Nt,choose:o=>o==="text"?"text":"icon"},topTextColor:{label:"Text color at the top",options:Tt,choose:o=>Ue(o)}};function Et({tabs:o,activeId:a,onSelect:b}){return e("div",{className:"es-insp-tabs",children:e(tt,{variant:"underline",block:!0,labelsFit:!0,"aria-label":l("Header settings"),idPrefix:ce,value:a,onChange:b,items:o.map(x=>({id:x.id,icon:x.icon,label:l(x.label)}))})})}export{f as Field,i as HEADER_SEGMENTED,we as HEADER_TABS,ce as HEADER_TABS_ID_PREFIX,Et as HeaderTabStrip,ae as OFF_PLACEHOLDER,_t as default};
|
|
1
|
+
"use client";import{jsx as e,jsxs as u,Fragment as B}from"react/jsx-runtime";import{useCallback as C,useEffect as W,useRef as Y,useState as P}from"react";import{ApiError as Pe,storefrontAdmin as N}from"../../render/lib/api/index.js";import{requestMediaPick as Ne}from"efficient-easel/screen/lib/media-picker";import{refreshSiteLiveState as Ie}from"efficient-web-builder/editor/lib/site-live-state";import{useEaselHost as ge}from"efficient-easel/screen/lib/host";import{onHeaderMenusChanged as Oe}from"efficient-web-builder/format/lib/editor-events";import{loadAllSitesMenus as Me,refreshAllSitesMenus as Re}from"../../render/lib/menu-source.js";import{headerMenuMissingWarning as De}from"../../render/lib/content/menu-placeholder.js";import{say as n,sayCount as Be}from"efficient-web-builder/format/lib/editor-words";import{sayWith as te}from"../lib/say-with.js";import{NEUTRAL_SITE_NAME as ze}from"../../render/lib/content/site.js";import{SECTION_WIDTH_CHOICES as Ge,WIDTH_CHOICE_LABEL as We}from"efficient-web-builder/format/lib/content/section-width";import{usePreviewHeader as Fe}from"efficient-web-builder/render/components/PreviewHeaderContext";import{HEADER_LOGO_PX as be,HEADER_LOGO_PX_MIN as Ue,HEADER_LOGO_PX_MAX as Xe}from"efficient-web-builder/render/components/Logo";import{HEADER_HEIGHT_PX as Z,HEADER_MENU_GAP_PX as $}from"efficient-web-builder/render/lib/document/header-clearance";import Ve from"efficient-web-builder/editor/components/SectionThemePicker";import{HEADER_THEME_FOLLOW as fe}from"../../render/lib/content/header-theme.js";import{resolveHeaderInkMode as je}from"efficient-web-builder/render/lib/document/header-ink";import{absolutizeApiUrl as $e}from"efficient-web-builder/render/lib/media";import{loadHeaderSettings as Ke,primeHeaderSettings as qe,clearHeaderSettingsCache as Ye,toPreviewHeaderSettings as Ze}from"../lib/header-settings-source.js";import{Banner as Je,Button as le,Drawer as Qe,InputNumber as eo,LoadingSpinner as oo,MediaUploadField as no,ShowWhen as K,Slider as to,Tabs as lo,tabButtonId as ao,tabPanelId as io}from"efficient-shell/ui";import{CountryShowAsTiles as ro}from"./CountryShowAsTiles.js";import{truthy as so,visibleFields as co}from"efficient-web-builder/render/lib/document/show-when";const uo={field:"country_selector_enabled",is:!0},ae={not:{context:"placeholderMode",is:!0}},ho={field:"menu_position",is:"beside"},mo={all:[{field:"logo_position",is:"center"},{not:{field:"menu_position",is:"center"}}]},po={all:[ae,so("country_selector_enabled")]};import{SettingsDefaultReset as ie,SettingsField as s,SettingsSwitch as F}from"efficient-easel/panel";import{FieldSelect as re}from"efficient-easel/fields";import{useEaselStrings as go}from"efficient-easel/strings";import{AccountIcon as bo,AlignLeftIcon as fo,AlignSeparateIcon as _o,BorderAllIcon as vo,CartIcon as wo,CaseIcon as xo,FullWidthIcon as So,GapIcon as yo,GlobeIcon as Co,GridIcon as Lo,HeightIcon as _e,LayoutIcon as Eo,ListIcon as Ho,LogoIcon as To,MenuIcon as ko,PhoneIcon as Ao,PlacementIcon as ve,SearchIcon as Po,SettingsIcon as No,StickyIcon as Io,StylesIcon as we,SwapIcon as Oo,TextColorIcon as Mo}from"efficient-easel/icons";import{PanelBand as Ro}from"efficient-web-builder/editor/lib/document/controls";import{Segmented as I}from"efficient-web-builder/editor/lib/document/box-fields";import{HintsToggle as se,SHOW_HINTS_DEFAULT as Do}from"efficient-web-builder/editor/components/WebsiteSettingsPanel";const ce="sf-header",xe="sf-header-size-label",Se="sf-header-gap-label",ye="sf-header-height-label",Ce=[{id:"logo",label:"Logo",icon:e(To,{})},{id:"menu",label:"Menu",icon:e(Ho,{}),showWhen:ae},{id:"tools",label:"Tools",icon:e(No,{})},{id:"look",label:"Look",icon:e(we,{})}];function Bo({tokenRef:l,siteId:a,onClose:L,onAuthExpired:v,inline:O,placeholderMode:y,websiteName:_,onOpenWebsiteSettings:x}){const k=ge(),p=go(),[t,b]=P(null),[E,S]=P(null),[M,q]=P(!1),[h,H]=P(Ce[0].id),[c,A]=P(Do),U=t,J={placeholderMode:y},Q=Object.values(co(Object.fromEntries(Ce.map(o=>[o.id,o])),U,J)),R=Q.find(o=>o.id===h)??Q[0],[Le,Ee]=P(0),{setSettings:ue}=Fe(),X=Y(null),V=Y(null),j=Y(null);W(()=>{let o=!1,i=null,m=null;const d=3,T=(G,D=0)=>{o||S(null),Ke(G,a,D>0).then(Ae=>!o&&b(Ae)).catch(()=>{o||(D+1<d?m=setTimeout(()=>T(G,D+1),600*(D+1)):S(n("Could not load header settings.")))})},pe=l.current;if(pe)T(pe);else{let G=0;i=setInterval(()=>{const D=l.current;if(D){i&&clearInterval(i),i=null,o||S(null),T(D);return}G+=250,G===5e3&&!o&&S(n("Waiting for editor authorization…")),G>=3e4&&(i&&clearInterval(i),i=null,o||S(n("Not authorized yet — reopen once the editor has loaded.")))},250)}return()=>{o=!0,i&&clearInterval(i),m&&clearTimeout(m)}},[l,Le,a]),W(()=>{t&&ue(Ze(t))},[t,ue]),W(()=>()=>{X.current&&clearTimeout(X.current),V.current&&clearTimeout(V.current),j.current&&clearTimeout(j.current)},[]);const f=C(async(o,i)=>{const m=l.current;if(!m||!t)return;const d=t;i&&b({...t,...i}),q(!0),S(null);try{const T=await o(m);b(T),qe(T,a),Ie()}catch(T){b(d),T instanceof Pe&&T.status===401?(Ye(a),v?.(),S(n("Authorization expired — try again in a moment."))):S(n("Could not save. Please retry."))}finally{q(!1)}},[t,l,v,a]),g=C(o=>f(i=>N.updateHeaderSettings(o,i,a??void 0),o),[f,a]),he=C(o=>{f(i=>N.setHeaderLogoFromAsset(o,i,a??void 0))},[f,a]),He=C(()=>{Ne(k,{accept:"image/svg+xml",title:n("Logo (SVG)")}).then(o=>{o&&he(o.id)})},[he]),ee=C((o,i=!0)=>{b(d=>d&&{...d,logo_size_px:o}),X.current&&clearTimeout(X.current);const m=()=>{f(d=>N.updateHeaderSettings({logo_size_px:o},d,a??void 0))};i?m():X.current=setTimeout(m,400)},[f,a]),oe=C((o,i=!0)=>{b(d=>d&&{...d,height_px:o}),V.current&&clearTimeout(V.current);const m=()=>{f(d=>N.updateHeaderSettings({height_px:o},d,a??void 0))};i?m():V.current=setTimeout(m,400)},[f,a]),ne=C((o,i=!0)=>{b(d=>d&&{...d,menu_gap_px:o}),j.current&&clearTimeout(j.current);const m=()=>{f(d=>N.updateHeaderSettings({menu_gap_px:o},d,a??void 0))};i?m():j.current=setTimeout(m,400)},[f,a]),Te=C(()=>{f(async o=>{const i=await N.clearHeaderLogo(o,a??void 0);return i.reverse_logo?N.updateHeaderSettings({reverse_logo:!1},o,a??void 0):i})},[f,a]),ke=C(o=>{b(i=>i&&{...i,menu:o?.id??null,menu_handle:o?.handle??null,menu_name:o?.name??null,menu_items:o?o.items.map(m=>({label:m.label,url:m.url,dropdown_menu:m.dropdown_menu??null,dropdown_items:m.dropdown_items??[]})):[]}),f(i=>N.updateHeaderSettings({menu:o?.id??null},i,a??void 0))},[f,a]),me=u(B,{children:[E&&e(Je,{tone:"danger",className:"mx-4 mt-3",action:t?void 0:e(le,{variant:"secondary",size:"md",onClick:()=>Ee(o=>o+1),children:n("Retry")}),children:E}),t?u(B,{children:[e(qo,{tabs:Q,activeId:R.id,onSelect:H}),u("div",{id:io(ce,R.id),role:"tabpanel","aria-labelledby":ao(ce,R.id),className:"es-insp-body flex flex-col py-4 [&>*+*]:mt-3",children:[R.id==="logo"&&u(B,{children:[u(w,{label:"Image",children:[e(K,{rule:ae,values:U,context:J,children:e(zo,{settings:t,websiteName:_,onPick:He,onClear:Te,showHint:c})}),e(s,{label:n("Reverse the Logo"),icon:e(Oo,{}),action:e(F,{checked:t.reverse_logo,onChange:o=>g({reverse_logo:o}),ariaLabel:n("Reverse the Logo")})}),e(z,{shown:c,children:n("Keeps the logo readable on any header — flips just its black & white parts to contrast the bar behind it (in both light and dark themes). Any other colors are kept as-is.")})]}),u(w,{label:"Placement",children:[e(s,{label:n("Position"),icon:e(ve,{}),value:(()=>{const o=r.logoPosition.options.find(i=>i.value===r.logoPosition.choose(t.logo_position))?.label;return o?n(o):void 0})(),children:e(I,{value:r.logoPosition.choose(t.logo_position),options:r.logoPosition.options,onChange:o=>g({logo_position:o}),ariaLabel:r.logoPosition.label})}),e(s,{label:n("Size"),icon:e(_e,{}),labelId:xe,value:`${t.logo_size_px??be[t.logo_size]}px`,changed:t.logo_size_px!=null,action:e(ie,{label:n("Size"),words:p.panel,changed:t.logo_size_px!=null,onReset:()=>ee(null)}),hint:c?n("Sets the logo’s height; the width follows the logo’s own proportions."):void 0,children:e(de,{labelledBy:xe,min:Ue,max:Xe,step:2,value:t.logo_size_px??be[t.logo_size],onCommit:o=>ee(o,!0),onPreview:o=>ee(o,!1)})})]}),e(se,{shown:c,onChange:A})]}),R.id==="menu"&&e(B,{children:u(w,{label:"Links",children:[e(Go,{token:l.current,menuId:t.menu,menuName:t.menu_name,itemCount:t.menu_items?.length??0,onPick:ke}),e(s,{label:n(r.menuAlign.label),icon:e(fo,{}),children:e(I,{value:r.menuAlign.choose(t.menu_position),options:r.menuAlign.options.filter(o=>o.value!=="beside"||t.logo_position!=="center"),onChange:o=>g({menu_position:o}),ariaLabel:r.menuAlign.label})}),e(K,{rule:ho,values:U,children:e(s,{label:n("Space from the logo"),icon:e(yo,{}),labelId:Se,value:`${t.menu_gap_px??$.default}px`,changed:t.menu_gap_px!=null,action:e(ie,{label:n("Space from the logo"),words:p.panel,changed:t.menu_gap_px!=null,onReset:()=>ne(null)}),hint:c?n("How much room the menu leaves the logo. Only the logo moves away; the space between the menu words stays as it is."):void 0,children:e(de,{labelledBy:Se,min:$.min,max:$.max,step:$.step,value:t.menu_gap_px??$.default,onCommit:o=>ne(o,!0),onPreview:o=>ne(o,!1)})})}),e(s,{label:n(r.menuRow.label),icon:e(Eo,{}),children:e(I,{value:r.menuRow.choose(t.menu_row),options:r.menuRow.options,onChange:o=>g({menu_row:o}),ariaLabel:r.menuRow.label})}),e(K,{rule:mo,values:U,children:e(s,{label:n("Left items"),icon:e(_o,{}),children:e("div",{className:"w-16",children:e(re,{value:t.menu_split??3,ariaLabel:n("Left items"),onChange:o=>g({menu_split:o}),options:[1,2,3,4].map(o=>({label:String(o),value:o}))})})})}),e(s,{label:n(r.navTextCase.label),icon:e(xo,{}),children:e(I,{value:r.navTextCase.choose(t.nav_text_case),options:r.navTextCase.options,onChange:o=>g({nav_text_case:o}),ariaLabel:r.navTextCase.label})}),e(z,{shown:c,children:te(n("{uppercase} draws SEARCH and BAG; {capitalised} draws Search and Bag. It covers the menu links and the Tools words together, and it leaves a name like FusionForge exactly as you typed it."),{uppercase:e("strong",{children:n("Uppercase")}),capitalised:e("strong",{children:n("Capitalised")})})})]})}),R.id==="tools"&&u(B,{children:[u(w,{label:"Style",children:[e(s,{label:n(r.utilStyle.label),icon:e(we,{}),children:e(I,{value:r.utilStyle.choose(t.util_style),options:r.utilStyle.options,onChange:o=>g({util_style:o}),ariaLabel:r.utilStyle.label})}),e(z,{shown:c,children:te(n("{text} draws the words — Search, Account, Bag — instead of the little pictures. It changes how they look, not whether they are shown: that stays with the switches below."),{text:e("strong",{children:n("Text")})})})]}),u(w,{label:"Search",children:[e(s,{label:n("Search"),icon:e(Po,{}),action:e(F,{checked:t.search_enabled,onChange:o=>g({search_enabled:o}),ariaLabel:n("Search")})}),e(s,{label:n(r.searchPosition.label),icon:e(ve,{}),children:e(I,{value:r.searchPosition.choose(t.search_position),options:r.searchPosition.options,onChange:o=>g({search_position:o}),ariaLabel:r.searchPosition.label})})]}),u(w,{label:"Country selector",children:[e(s,{label:n("Show selector"),icon:e(Co,{}),action:e(F,{checked:t.country_selector_enabled,onChange:o=>g({country_selector_enabled:o}),ariaLabel:n("Show selector")})}),e(K,{rule:uo,values:{country_selector_enabled:t.country_selector_enabled},children:e(s,{label:n("Show as"),icon:e(Lo,{}),children:e(ro,{value:t.country_selector_show_as,onChange:o=>g({country_selector_show_as:o})})})}),e(K,{rule:po,values:U,context:J,children:e(z,{shown:c,children:te(n("Which countries this website serves — and each region's own URL — is set in the admin console under {place}. Whether the picker is SHOWN stays here: that is header chrome, but the served-country list has tax consequences and belongs with commerce configuration."),{place:e("strong",{children:n("Storefront › Settings › Regions & currencies")})})})})]}),u(w,{label:"Account and cart",children:[e(s,{label:n("Account"),icon:e(bo,{}),action:e(F,{checked:t.account_enabled??!0,onChange:o=>g({account_enabled:o}),ariaLabel:n("Account")})}),e(s,{label:n("Cart"),icon:e(wo,{}),action:e(F,{checked:t.cart_enabled??!0,onChange:o=>g({cart_enabled:o}),ariaLabel:n("Cart")})})]}),u(w,{label:"Call",children:[e(s,{label:n("Call button"),icon:e(Ao,{}),action:e(F,{checked:t.call_button??!1,onChange:o=>g({call_button:o}),ariaLabel:n("Call button")})}),e(z,{shown:c,children:n("Calls the phone of the location this website shows, as its Set-up keeps it. With no phone there, the button is not shown.")})]}),e(se,{shown:c,onChange:A})]}),R.id==="look"&&u(B,{children:[u(w,{label:"Dimensions",children:[e(s,{label:n(r.width.label),icon:e(So,{}),children:e(I,{value:r.width.choose(t.width),options:r.width.options,onChange:o=>g({width:o}),ariaLabel:r.width.label})}),e(s,{label:n("Height"),icon:e(_e,{}),labelId:ye,value:`${t.height_px??Z.default}px`,changed:t.height_px!=null,action:e(ie,{label:n("Height"),words:p.panel,changed:t.height_px!=null,onReset:()=>oe(null)}),hint:c?n("Sets how tall the header bar is; the content below it shifts down to match."):void 0,children:e(de,{labelledBy:ye,min:Z.min,max:Z.max,step:2,value:t.height_px??Z.default,onCommit:o=>oe(o,!0),onPreview:o=>oe(o,!1)})}),e(s,{label:n("Border thickness"),icon:e(vo,{}),children:e("div",{className:"w-24",children:e(eo,{value:t.border_thickness,min:0,max:20,precision:0,size:"md",suffix:"px","aria-label":n("Border thickness"),onChange:o=>g({border_thickness:Math.max(0,o??0)})})})})]}),u(w,{label:"Color",children:[e(Ve,{value:t.theme??fe,onChange:o=>g({theme:o===fe?null:o}),followLabel:n("Follow the site theme"),hint:c?n("The color the bar paints once it is solid — after any scroll, and on every product page from the first paint. Follow the site theme keeps it on whatever palette the site is on."):void 0}),e(s,{label:n(r.topTextColor.label),icon:e(Mo,{}),children:e(I,{value:r.topTextColor.choose(t.top_text_color),options:r.topTextColor.options,onChange:o=>g({top_text_color:o}),ariaLabel:r.topTextColor.label})}),e(z,{shown:c,children:n("Auto reads what the first section on each page says it is — dark, light or accent — and picks the text that can be read on it. Set Light or Dark to decide it yourself when Auto reads a page wrong.")})]}),e(w,{label:"Behavior",children:e(s,{label:n("Sticky header"),icon:e(Io,{}),children:e("div",{className:"w-32",children:e(re,{value:t.sticky,ariaLabel:n("Sticky header"),onChange:o=>g({sticky:o}),options:[{label:n("None"),value:"none"},{label:n("Always"),value:"always"},{label:n("On scroll up"),value:"on_scroll_up"}]})})})}),x&&e(B,{children:u(w,{label:"Display mode",children:[e("p",{className:"text-[12px] text-[var(--ink-faint)]",children:n("Set the default Light / Dark / Auto mode and show or hide the light↔dark switch in Appearance.")}),e(le,{variant:"link",size:"sm",className:"self-start",onClick:x,children:n("Set up display mode →")})]})}),e(se,{shown:c,onChange:A})]})]})]}):E?null:e(oo,{size:"sm",padding:"p-4",label:n("Loading…")})]});return O?u("div",{className:"flex flex-col",children:[M&&e("div",{className:"px-4 pt-2 text-[11px] text-[var(--ink-faintest)]",children:n("Saving…")}),me]}):u(Qe,{open:!0,onClose:L??(()=>{}),side:"right",size:"sm",title:n("Header"),children:[M&&e("div",{className:"pb-2 text-[11px] text-[var(--ink-faintest)]",children:n("Saving…")}),me]})}function zo({settings:l,websiteName:a,onPick:L,onClear:v,showHint:O}){const y=!!l.logo_url,_=!y&&!!l.default_logo_url,x=$e(l.effective_logo_url),k=a&&a.trim()?a.trim():ze;return u("div",{className:"flex flex-col gap-2",children:[e(no,{value:x||"",onChange:p=>{p||v()},onPick:L,accept:"image/svg+xml,.svg",acceptHint:"SVG",fit:"contain",height:80,placeholder:n("No logo — “{name}” wordmark shown",{name:k}),replaceLabel:y?n("Replace SVG logo"):n("Upload SVG logo"),allowRemove:y,removeLabel:n("Use company default")}),e(z,{shown:O,children:y?n("Custom SVG logo uploaded for this store."):_?n("Using your company logo from the database."):n("No company logo on file — upload an SVG or the wordmark is used.")})]})}function Go({token:l,menuId:a,menuName:L,itemCount:v,onPick:O}){const y=ge(),[_,x]=P(null),[k,p]=P(!1),t=C(h=>{x(h),p(!0)},[]);W(()=>{let h=!1;return Me(l).then(H=>!h&&t(H)).catch(()=>!h&&x([])),()=>{h=!0}},[l,t]),W(()=>{let h=!1;const H=Oe(()=>{Re(l).then(c=>!h&&t(c)).catch(()=>{})});return()=>{h=!0,H()}},[l,t]);const b=_===null,E=!b&&(_?.length??0)===0,S=!b&&(_??[]).some(h=>h.id===a),M=S?a:"",q=k&&!!a&&!S;return u("div",{className:"flex flex-col gap-2",children:[e(s,{label:n("Menu"),icon:e(ko,{}),children:e("div",{className:"w-[170px] max-w-full",children:e(re,{value:M,ariaLabel:n("Menu"),readOnly:b||E,onChange:h=>{const H=h?(_??[]).find(c=>c.id===h):null;O(H?{...H,items:H.items.map(c=>({...c,dropdown_items:(_??[]).find(A=>A.id===c.dropdown_menu)?.items.map(A=>({label:A.label,url:A.url}))??[]}))}:null)},options:[{label:b?n("Loading…"):E?n("No menus"):n("Default links"),value:""},...(_??[]).map(h=>({label:`${h.name} (${h.item_count??h.items.length})`,value:h.id}))]})})}),q?e("p",{className:"text-[12px] text-[var(--warning-text)]",children:De()}):e("p",{className:"text-[12px] text-[var(--ink-faint)]",children:M?Be("Header shows “{name}” — {n} link.","Header shows “{name}” — {n} links.",v,{name:L??n("the linked menu")}):E?n("No menus yet. Create one in {place}, then pick it here.",{place:n("Storefront → Menus")}):n("Pick a menu to drive the header links, or keep the built-in default links.")}),e(le,{variant:"link",size:"sm",className:"self-start",onClick:()=>y.send("storefront-editor:open-menus",{menuId:M||null}),children:M?n("Edit menu →"):n("Manage menus →")})]})}function z({shown:l,children:a}){return l?e("p",{className:"text-[11px] text-[var(--sf-muted)]",children:a}):null}function de({labelledBy:l,value:a,min:L,max:v,step:O,onPreview:y,onCommit:_}){const x=`${l}-range`,k=Y(_);return k.current=_,W(()=>{const p=document.getElementById(x);if(!(p instanceof HTMLInputElement))return;const t=()=>k.current?.(Number(p.value)),b=E=>{/^(Arrow|Home|End|Page)/.test(E.key)&&t()};return p.addEventListener("pointerup",t),p.addEventListener("keyup",b),()=>{p.removeEventListener("pointerup",t),p.removeEventListener("keyup",b)}},[x]),e(to,{id:x,value:a,min:L,max:v,step:O,showInput:!1,size:"sm",className:"sf-slider","aria-labelledby":l,valueText:p=>n("{n} pixels",{n:p}),onChange:p=>{p!=null&&y(p)}})}function w({label:l,children:a}){return e(Ro,{title:n(l),children:e("div",{className:"flex flex-col gap-3",children:a})})}const Wo=[{label:"Left",value:"left"},{label:"Center",value:"center"}],Fo=[{label:"Left",value:"left"},{label:"Right",value:"right"}],Uo=[{label:"Right",value:"left"},{label:"Centered",value:"center"},{label:"Beside logo",value:"beside"}],Xo=[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],Vo=Ge.map(l=>({label:We[l],value:l})),jo=[{label:"Icon",value:"icon"},{label:"Text",value:"text"}],$o=[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],Ko=[{label:"Auto",value:"auto"},{label:"Light",value:"light"},{label:"Dark",value:"dark"}],r={logoPosition:{label:"Position",options:Wo,choose:l=>l==="right"?"center":l},menuAlign:{label:"Alignment",options:Uo,choose:l=>l==="center"?"center":l==="beside"?"beside":"left"},menuRow:{label:"Row",options:Xo,choose:l=>l==="inline"?"inline":"top"},searchPosition:{label:"Position",options:Fo,choose:l=>l},width:{label:"Width",options:Vo,choose:l=>l},navTextCase:{label:"Letters",options:$o,choose:l=>l==="capitalised"?"capitalised":"uppercase"},utilStyle:{label:"Show as",options:jo,choose:l=>l==="text"?"text":"icon"},topTextColor:{label:"Text color at the top",options:Ko,choose:l=>je(l)}};function qo({tabs:l,activeId:a,onSelect:L}){return e("div",{className:"es-insp-tabs",children:e(lo,{variant:"underline",block:!0,labelsFit:!0,"aria-label":n("Header settings"),idPrefix:ce,value:a,onChange:L,items:l.map(v=>({id:v.id,icon:v.icon,label:n(v.label)}))})})}export{r as HEADER_SEGMENTED,Ce as HEADER_TABS,ce as HEADER_TABS_ID_PREFIX,qo as HeaderTabStrip,ae as OFF_PLACEHOLDER,de as PxSlider,Bo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as s,jsxs as
|
|
1
|
+
"use client";import{jsx as s,jsxs as b}from"react/jsx-runtime";import{Button as C}from"efficient-shell/ui";import{SettingsField as P}from"efficient-easel/panel";import{FieldSelect as R}from"efficient-easel/fields";import{MenuIcon as U}from"efficient-easel/icons";import{useCallback as B,useEffect as M,useState as c}from"react";import{say as i,sayCount as E}from"efficient-web-builder/format/lib/editor-words";import{getEditorToken as u}from"efficient-web-builder/render/lib/editor-auth";import{onHeaderMenusChanged as F}from"efficient-web-builder/format/lib/editor-events";import{findLinkedMenu as f,loadMenus as L,refreshMenus as I}from"../../render/lib/menu-source.js";import{menuPickerMissingWarning as T,menuPickerUnlinkedWarning as W}from"../../render/lib/content/menu-placeholder.js";function $({value:l,onChange:p}){const[t,h]=c(null),[w,y]=c(!1),a=B(e=>{h(e),y(!0)},[]);M(()=>{let e=!1;return L(u()).then(n=>{e||a(n)}).catch(()=>{e||h([])}),()=>{e=!0}},[a]),M(()=>{let e=!1;const n=F(()=>{I(u()).then(r=>{e||a(r)}).catch(()=>{})});return()=>{e=!0,n()}},[a]);const d=t===null,o=!!(l?.id||l?.handle),m=w&&o&&!f(t??[],l),N=!o&&(l?.items?.length??0)>0,S=m?"":f(t??[],l)?.id??"",g=e=>p({id:e.id,handle:e.handle,name:e.name,items:e.items.map(n=>({label:n.label,url:n.url,...n.dropdown_items?.length?{dropdown_items:n.dropdown_items.map(r=>({label:r.label,url:r.url}))}:{}}))}),_=e=>{if(!e){p(null);return}const n=(t??[]).find(r=>r.id===e);n&&g(n)},[k,x]=c(!1),j=()=>{o&&(x(!0),L(u(),!0).then(e=>{a(e);const n=f(e,l);n&&g(n)}).catch(()=>{}).finally(()=>x(!1)))};return b("div",{children:[s(P,{label:i("Menu"),icon:s(U,{}),hint:!d&&t&&t.length===0?i("Create menus in {place}, then pick one here.",{place:i("Storefront → Menus")}):void 0,children:s(R,{value:S,ariaLabel:i("Menu"),onChange:_,readOnly:d||(t?.length??0)===0,options:[{label:d?i("Loading menus…"):t&&t.length===0?i("No menus found"):i("Select a menu…"),value:""},...(t??[]).map(e=>({label:`${e.name} (${e.item_count??e.items.length})`,value:e.id}))]})}),N?s("p",{className:"mt-2 text-[12px] text-[var(--warning-text)]",children:W()}):null,m?s("p",{className:"mt-2 text-[12px] text-[var(--warning-text)]",children:T(l?.name??i("The linked menu"))}):null,o&&!m?b("div",{className:"mt-2 flex items-center justify-between gap-2",children:[s("p",{className:"text-[12px] text-fg-dim",children:E("Linked to “{name}” — {n} link. Re-pull after editing the menu:","Linked to “{name}” — {n} links. Re-pull after editing the menu:",l?.items?.length??0,{name:l?.name??""})}),s(C,{variant:"link",size:"sm",className:"shrink-0",onClick:j,disabled:k,children:k?i("Updating…"):i("Update links")})]}):null]})}export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as k,Fragment as x}from"react/jsx-runtime";import{useEffect as v,useMemo as w,useState as _}from"react";import{SettingsField as A}from"efficient-easel/panel";import{FieldSelect as B}from"efficient-easel/fields";import{iconOf as C,noGlyph as I}from"efficient-
|
|
1
|
+
"use client";import{jsx as k,Fragment as x}from"react/jsx-runtime";import{useEffect as v,useMemo as w,useState as _}from"react";import{SettingsField as A}from"efficient-easel/panel";import{FieldSelect as B}from"efficient-easel/fields";import{iconOf as C,noGlyph as I}from"efficient-easel/screen/lib/document/box-fields";import{formatPrice as K}from"../../render/lib/commerce.js";import{resolveWheelPrice as N}from"../../render/lib/wheels/price-display.js";import{loadUnifiedProductCatalog as O}from"../../render/components/useProductCatalog.js";import{useCurrency as R}from"../../render/components/CurrencyContext.js";import F from"efficient-web-builder/editor/components/SearchSelectField";import{PREVIEWABLE_KINDS as G}from"../../render/components/pdp-dynamic/useSampleProduct.js";import{PLP_ALL_TYPES_LABEL as D,PLP_KINDS as V,PLP_KIND_LABELS as S}from"../../render/lib/catalog/plp-item.js";import{currentPreviewPickKey as W,useCurrentPreviewPick as T,writePreviewPick as U}from"../../render/lib/document/preview-pick.js";import{say as r}from"efficient-web-builder/format/lib/editor-words";const p="__all__",L="";function Y(o){return(o??[]).filter(n=>G.includes(n.kind))}const j=I("one row per level from one list — the gutter would repeat one mark down the column and say nothing; the group heading carries it once GG, 2026-09-23"),g=o=>typeof o.brand=="string"?o.brand.trim():"";function E(o,n){if(o.kind!=="alloy-wheel"||!n)return;const l=o,i=N(l.prices?.[n],l.msrpPrices?.[n]);return i.priced?K(i.unit,n):void 0}function H({rows:o,brand:n,kind:l,slug:i,loading:d=!1,currency:m=""}){const f=o??[],s=[...new Set(f.map(g).filter(Boolean))].sort((t,y)=>t.localeCompare(y)),u=n===p?f:f.filter(t=>g(t)===n),c=V.filter(t=>u.some(y=>y.kind===t)),b=l===p?u:u.filter(t=>t.kind===l),h=new Set(b.map(t=>t.kind)).size>1,e=b.map(t=>({value:t.slug,label:t.name,...h?{group:r(S[t.kind])}:{},thumb:t.coverImage??null,...E(t,m)?{meta:E(t,m)}:{}})),a=i&&!b.some(t=>t.slug===i)?[{value:i,label:d?i:r("{slug} (not in this list)",{slug:i})}]:[],P=[];return s.length>1&&P.push({key:"brand",label:r("Brand"),options:[{value:p,label:r("All brands")},...s.map(t=>({value:t,label:t}))]}),c.length>1&&P.push({key:"kind",label:r("Product type"),options:[{value:p,label:r(D)},...c.map(t=>({value:t,label:r(S[t])}))]}),P.push({key:"product",label:r("Product"),options:[{value:L,label:d?r("Loading…"):r("Generic placeholder")},...a,...e]}),P}function M(){const[o,n]=_(null),[l,i]=_(p),[d,m]=_(p),f=W(),s=T()??L;v(()=>{let e=!1;return O().then(a=>{e||n(a)}).catch(()=>{e||n([])}),()=>{e=!0}},[]);const{currency:u}=R(),c=w(()=>Y(o),[o]);v(()=>{const e=c.find(a=>a.slug===s);e&&g(e)&&i(g(e))},[s,c]);const b=w(()=>H({rows:c,brand:l,kind:d,slug:s,loading:o===null,currency:u}),[c,l,d,s,o,u]),h={brand:e=>{i(e),m(p)},kind:m,product:e=>U(f,e)};return k(x,{children:b.map(e=>k(A,{label:e.label,icon:C(j),hint:e.key==="product"?r(z):void 0,children:e.key==="product"?k(F,{bare:!0,label:e.label,options:e.options,fallback:L,value:s,onChange:h.product,placeholder:r("Search your catalog…")}):k(B,{value:e.key==="brand"?l:d,ariaLabel:e.label,onChange:a=>h[e.key](a),options:e.options.map(a=>({label:a.label,value:a.value}))})},e.key))})}const z="Only for looking at while you design. Shoppers always see the product they opened.";export{p as ANY_VALUE,L as NO_PRODUCT,M as default,H as previewPickerLevels,Y as previewableRows};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as y,jsxs as I}from"react/jsx-runtime";import{useEffect as $,useMemo as C,useState as z}from"react";import{useEaselHost as N}from"efficient-easel/screen/lib/host";import{formatPrice as w}from"../../render/lib/commerce.js";import{resolveWheelPrice as K}from"../../render/lib/wheels/price-display.js";import{isRenderableFinish as O}from"../../render/lib/wheels/renderable-finishes.js";import{loadUnifiedProductCatalog as W}from"../../render/components/useProductCatalog.js";import{loadStorefrontCategories as _}from"./useStorefrontCategories.js";import{filterByCategory as M,useCategoryFilter as U}from"./useCategoryFilter.js";import{CategoryField as V}from"./CategoryProductFields.js";import{useSnapshotSource as q}from"efficient-web-builder/editor/components/useSnapshotSource";import{useCurrency as D}from"../../render/components/CurrencyContext.js";import G from"efficient-web-builder/editor/components/SearchSelectField";import J from"efficient-web-builder/editor/components/SourceStatus";import{say as s,sayCount as Q}from"efficient-web-builder/format/lib/editor-words";const S=e=>e.kind==="tyre"?"tyre":"alloy-wheel",u=e=>`${e.kind}:${e.slug}`;function P(e){return e.kind==="tyre"?{kind:"tyre",slug:e.slug,name:e.name,description:e.description??"",eyebrow:e.brand??"",image:e.coverImage??null,finishes:[],prices:e.prices,href:`/tyres/${e.slug}`}:{kind:"wheel",slug:e.slug,name:e.name,description:e.description??"",eyebrow:e.process,image:e.coverImage??null,finishes:e.finishes.filter(O).map(r=>({name:r.name,color:r.color,src:r.src})),prices:e.prices,href:`/wheels/${e.slug}`}}function x(e,r){const n=S(r);return e.find(o=>o.kind===n&&o.slug===r.slug)}function X(e){return L(e)?s("Category — wheels only"):s("Category")}const L=e=>!!(e?.some(r=>r.kind==="tyre")&&e.some(r=>r.kind==="alloy-wheel")),Y=e=>Q("{n} size","{n} sizes",e);function Z({rows:e,category:r,value:n,loading:o,currency:i}){const a=e??[],c=a.filter(t=>t.kind==="alloy-wheel"),m=a.filter(t=>t.kind==="tyre"),p=c.length>0&&m.length>0,k={value:"",label:o?s("Loading…"):s("Pick a product…")},h=n&&!(e!==null&&x(e,n))?[{value:u({kind:S(n),slug:n.slug}),label:o?n.name:s("{name} (unavailable)",{name:n.name})}]:[],d=M(c,r).map(t=>{const g=K(t.prices[i],t.msrpPrices?.[i]);return{value:u({kind:"alloy-wheel",slug:t.slug}),label:t.name,...p?{group:s("Wheels")}:{},thumb:t.coverImage??null,...g.priced?{meta:w(g.unit,i)}:{}}}),b=m.map(t=>({value:u(t),label:t.name,...p?{group:s("Tyres")}:{},thumb:t.coverImage??null,meta:Y(t.variantCount)}));return[k,...h,...d,...b]}function v({value:e,onChange:r}){const n=N(),{rows:o,loading:i,refreshing:a,errored:c,refresh:m}=q({load:W,resolve:x,snapshot:P,value:e,onChange:r}),[p,k]=z(null);$(()=>{let l=!1;return _().then(f=>{l||k(f)}),()=>{l=!0}},[]);const{currency:h}=D(),d=C(()=>o&&e?x(o,e)??null:null,[o,e]),b=C(()=>(o??[]).filter(l=>l.kind==="alloy-wheel"),[o]),{category:t,setCategory:g,categoryNames:R}=U(b,p,d?.kind==="alloy-wheel"?d:null),T=!!e?.slug&&o!==null&&!d,E=C(()=>Z({rows:o,category:t,value:e,loading:i,currency:h}),[o,t,e,i,h]),j=l=>{if(!l){r(null);return}const f=(o??[]).find(H=>u(H)===l);f&&r(P(f))},A=()=>{e?.slug&&n.send("storefront-editor:open-product",{slug:e.slug,name:e.name})},B=c?"error":a?"loading":"idle",F=c?s("Couldn’t reach the product catalog."):a?s("Syncing from the catalog…"):T?s("Linked to “{name}” — no longer in the catalog.",{name:e?.name??""}):s("Linked to “{name}” · title, description, category, price & image follow the product.",{name:e?.name??""});return I("div",{children:[y(G,{label:"Product",options:E,fallback:"",value:e?u({kind:S(e),slug:e.slug}):"",onChange:j,placeholder:"Search products…"}),y(V,{label:X(o),allLabel:L(o)?s("All wheel categories"):s("All products"),category:t,onChange:g,categoryNames:R,readOnly:i}),e?.slug?y(J,{status:B,statusText:F,onRefresh:m,busy:a,edit:{label:s("Edit product ✎"),onClick:A},hint:s("The whole hero comes from the product record — title, price, pictures, options and Add to Cart. Edit the product in the Products database and this hero updates to match.")}):y("p",{className:"es-field-hint sf-hint-keep",style:{marginTop:7},children:s("This hero always shows a real product. Pick one to fill the title, price, pictures, options and Add to Cart from the catalog.")})]})}export{v as default,X as heroCategoryLabel,Z as heroPickerOptions,x as heroResolve,P as heroSnapshot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as c,jsxs as C}from"react/jsx-runtime";import{useEffect as N,useMemo as P,useState as d}from"react";import{loadProductCatalog as x}from"../../render/components/useProductCatalog.js";import{loadStorefrontCategories as b}from"./useStorefrontCategories.js";import{useCategoryFilter as j}from"./useCategoryFilter.js";import S from"./CategoryProductFields.js";import{useGridSourceLock as L}from"./useGridSourceLock.js";import{say as o}from"efficient-web-builder/format/lib/editor-words";import{sayWith as T}from"../lib/say-with.js";function W({value:r,onChange:u}){const[e,m]=d(null),[f,g]=d(null);N(()=>{let t=!1;return x().then(n=>{t||m(n)}),b().then(n=>{t||g(n)}),()=>{t=!0}},[]);const h=P(()=>e&&r?e.find(t=>t.slug===r)??null:null,[e,r]),{category:p,setCategory:y,categoryNames:k,filtered:a}=j(e,f,h),l=e===null,i=L(),s=i!==null;return C("div",{children:[s&&c("p",{className:"es-field-hint sf-hint-keep",style:{marginBottom:8},children:T(o("Disabled because this grid’s {source} is set to “{name}”. The grid fills itself from that source automatically. To pick wheels here, set {source} back to “Manual”.",{name:i??""}),{source:c("strong",{children:o("Product content")})})}),c("div",{className:s?"sf-locked":void 0,children:c(S,{category:p,onChange:y,categoryNames:k,readOnly:l||s,products:a,product:r??"",onProductChange:u,productReadOnly:l||s,emptyLabel:l?o("Loading…"):a.length===0?o("No products in this category"):o("Select a product…")})})]})}export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,
|
|
1
|
+
"use client";import{jsx as e,jsxs as s,Fragment as t}from"react/jsx-runtime";import{Button as o}from"efficient-shell/ui";import{usePreviewSocial as r}from"efficient-web-builder/render/components/PreviewSocialContext";import{say as i}from"efficient-web-builder/format/lib/editor-words";import{PanelBand as l}from"efficient-web-builder/editor/lib/document/controls";function a(){const{openPanel:n}=r();return e(t,{children:s(l,{title:i("Social links"),children:[e("p",{className:"es-field-hint sf-hint-keep",children:i("The links are typed once for the whole website, in Site settings.")}),e(o,{variant:"link",size:"sm",onClick:n,children:i("Edit social links →")})]})})}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as c,jsxs as N}from"react/jsx-runtime";import{useEffect as j,useMemo as T,useState as F}from"react";import{resolveMedia as O}from"efficient-web-builder/render/lib/media";import{useEaselHost as B}from"efficient-easel/screen/lib/host";import{loadProductCatalog as H}from"../../render/components/useProductCatalog.js";import{loadStorefrontCategories as M}from"./useStorefrontCategories.js";import{useCategoryFilter as R}from"./useCategoryFilter.js";import _ from"./CategoryProductFields.js";import{useSnapshotSource as z}from"efficient-web-builder/editor/components/useSnapshotSource";import W from"efficient-web-builder/editor/components/SourceStatus";import{say as t}from"efficient-web-builder/format/lib/editor-words";function p(e){return{slug:e.slug,name:e.name,process:e.process,spokes:e.spokes,mesh:e.mesh,spec:e.spec,finishes:e.finishes.map(s=>({name:s.name,image:O(s.angles?.[0]??s.src)??null}))}}function Y({value:e,onChange:s}){const f=B(),{rows:r,loading:a,refreshing:i,errored:u,refresh:g}=z({load:H,resolve:(o,n)=>o.find(l=>l.slug===n.slug),snapshot:p,value:e,onChange:s}),[h,y]=F(null);j(()=>{let o=!1;return M().then(n=>{o||y(n)}),()=>{o=!0}},[]);const d=T(()=>r&&e?.slug?r.find(o=>o.slug===e.slug)??null:null,[r,e?.slug]),{category:b,setCategory:k,categoryNames:S,filtered:x}=R(r,h,d),m=!!e?.slug&&r!==null&&!d,C=o=>{if(!o){s(null);return}const n=(r??[]).find(l=>l.slug===o);n&&s(p(n))},P=()=>{e?.slug&&f.send("storefront-editor:open-product",{slug:e.slug,name:e.name})},w=!!e?.spec,E=u?"error":i?"loading":"idle",L=u?t("Couldn’t reach the product catalog."):i?t("Syncing from the catalog…"):m?t("Linked to “{name}” — no longer in the catalog.",{name:e?.name??""}):w?t("Linked to “{name}” · every spec row follows the product.",{name:e?.name??""}):t("Linked to “{name}” — this product has no spec data yet.",{name:e?.name??""});return N("div",{children:[c(_,{category:b,onChange:k,categoryNames:S,readOnly:a,products:x,product:e?.slug??"",onProductChange:C,productReadOnly:a,emptyLabel:a?t("Loading…"):t("None (write the rows yourself)"),extraOptions:m?[{label:t("{name} (unavailable)",{name:e.name}),value:e.slug}]:[]}),e?.slug?c(W,{status:E,statusText:L,onRefresh:g,busy:i,edit:{label:t("Edit product ✎"),onClick:P},hint:t("Every spec row (lug count, bolt pattern, offset, center bore, load rating, bump profile…) comes from the product record — edit its part numbers in the Products database and this table updates to match. You still choose which finish to picture and an optional size.")}):c("p",{className:"es-field-hint sf-hint-keep",style:{marginTop:7},children:t("Pick a product to fill the spec table from the catalog, or keep “None” to write the rows yourself.")})]})}export{Y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{blockAlignmentField as o}from"efficient-easel/screen/lib/document/box-fields";import{legacyBlockAlignOf as r}from"../../../render/lib/content/legacy-block-align.js";function c(n){const l=o(n);return{...l,render:e=>l.render({...e,value:r(e.value)??e.value})}}export{c as blockAlignRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{StylesIcon as t}from"efficient-easel/icons";import{group as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{StylesIcon as t}from"efficient-easel/icons";import{group as r}from"efficient-easel/screen/lib/document/box-fields";import{segmented as m}from"efficient-web-builder/editor/lib/document/box-fields";import{TOOL_STYLE_OPTIONS as e}from"../shared-fields.js";const f={fields:{_gStyle:r("Style"),style:m("Show as",o(t,{}),e,"icon")}};export{f as AccountBlockFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import _ from"efficient-web-builder/editor/components/MultiSelectField";import L from"../../../../../components/WheelsPerRowField.js";import{PLP_GATE_DEFAULTS as u}from"../../../../../../render/components/wheels-plp/AlloyWheelsListing.js";import{LISTING_CARD_SHOW as y}from"../../../../../../render/lib/sections/card-show-defaults.js";import{SortIcon as C,CarIcon as v,HashIcon as T}from"efficient-easel/icons";import{useEasel as w}from"efficient-easel/easel";import{text as O,textarea as k,panelNote as E,toggle as H,copyText as f,plainTextarea as g,cardShowFields as x,cardMediaFields as b,cardStyleFields as A}from"efficient-web-builder/editor/lib/document/controls";import{group as l}from"efficient-easel/screen/lib/document/box-fields";import{select as W,slider as N}from"efficient-web-builder/editor/lib/document/box-fields";import{noControlField as R,NoControlMark as G}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{PLP_SORT_LABELS as D}from"../../../../../../render/lib/wheels/plp-filters.js";import{resolvePlpKinds as j}from"../../../../../../render/lib/catalog/plp-item.js";import{productKindsField as z}from"../shared-fields.js";import{plpVehicleCopy as K}from"../../../../../../render/lib/catalog/plp-vehicle-copy.js";import{ALLOYWHEELSLISTING_PH as h}from"../../../../../../render/lib/document/blocks/commerce/AlloyWheelsListing/meta.js";import{say as M}from"efficient-web-builder/format/lib/editor-words";const s=[{value:"showInStock",label:"In stock"},{value:"showCollection",label:"Collection"},{value:"showPrice",label:"Price"}],B="Brand, Color, Size and PCD follow the product type. Set them in Product types.",F="root:default-zone";function V(){const{appState:o,dispatch:t}=w(e=>e),r=o.ui.itemSelector,P=o.data.content??[],a=r&&(r.zone===void 0||r.zone===F)?r.index:-1,i=a>=0?P[a]:void 0,d=i?.props??{},S=s.filter(e=>d[e.value]!==!1).map(e=>e.value);return n(_,{label:"Filters",options:s.map(e=>({...e,label:M(e.label)})),value:S,onChange:e=>{if(!i||i.type!=="AlloyWheelsListing")return;const p={};for(const c of s){const m=e.includes(c.value);d[c.value]!==!1!==m&&(p[c.value]=m)}Object.keys(p).length&&t({type:"replace",destinationZone:F,destinationIndex:a,data:{...i,props:{...i.props,...p}}})}})}const I=()=>R({type:"custom",render:()=>n(G,{})},"always"),pe={fields:{_gHeader:l("Header"),heading:O("Heading",h.heading),intro:k("Intro",h.intro),_gResults:l("Products"),kinds:z(),defaultSort:W("Opening sort",n(C,{}),Object.entries(D).map(([o,t])=>({value:o,label:t})),"recommended"),_gFilters:l("Filters"),showInStock:{type:"custom",label:"Filters",options:s,render:()=>n(V,{})},showCollection:I(),showPrice:I(),_nFieldFilters:E(B),_gVehicle:l("Car prompt"),askForCar:H("Ask for the car first",!0,n(v,{})),gateHeading:f("Welcome heading",u.heading),gateIntro:g("Welcome intro",u.intro),...x({defaults:y}),...b({coverHint:"A card's opening picture — picking another color opens that color's first picture.",spinDefault:!1}),...A(),_gGrid:l("Grid"),columns:{type:"custom",render:({value:o,onChange:t})=>n(L,{value:o,onChange:t})},perPage:N("Products per page",n(T,{}),8,60,4,24)},resolveFields:(o,{fields:t})=>{const r=K(j(o.props.kinds));return{...t,gateHeading:f("Welcome heading",r.gateHeading),gateIntro:g("Welcome intro",r.gateIntro)}}};export{pe as AlloyWheelsListingFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import{ColumnsIcon as i}from"efficient-easel/icons";import{text as a,textarea as e,cardImageField as s}from"efficient-web-builder/editor/lib/document/controls";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{slider as l}from"efficient-web-builder/editor/lib/document/box-fields";import{headFieldsForPlacement as n,SPLITTABLE_SECTIONS as f}from"efficient-web-builder/format/lib/sections/section-head-placement";import{PH as r}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{PRODUCTGRID_PH as p}from"../../../../../../render/lib/document/blocks/commerce/placeholders.js";const y={fields:{_gHeader:o("Header"),num:a("Number",p.num),title:e("Heading",r.sectionHeading),description:e("Body",r.body),_gLayout:o("Layout"),columns:l("Columns",d(i,{}),2,3,1,3),cardImage:s()},resolveFields:(m,{fields:t,parent:u})=>n(t,m.props.headPlacement,f.BundleOffer.headRows)};export{y as BundleOfferFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{StylesIcon as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{StylesIcon as r}from"efficient-easel/icons";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{segmented as m}from"efficient-web-builder/editor/lib/document/box-fields";import{TOOL_STYLE_OPTIONS as e}from"../shared-fields.js";const S={fields:{_gStyle:t("Style"),style:m("Show as",o(r,{}),e,"icon")}};export{S as CartBlockFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{HashIcon as l,SortIcon as u,LayoutIcon as i}from"efficient-easel/icons";import{toggle as o,plainText as c,linkField as a,panelNote as _}from"efficient-web-builder/editor/lib/document/controls";import{group as r}from"efficient-easel/screen/lib/document/box-fields";import{select as m}from"efficient-web-builder/editor/lib/document/box-fields";import{facetToggle as t,facetNote as n}from"../controls.js";import{RESULTS_LINK_BLOCKED_NOTE as L}from"../../../../../../render/lib/wheels/catalog-filters-to-listing.js";import{FILTER_BAR_LAYOUT_OPTIONS as f,DEFAULT_FILTER_BAR_LAYOUT as p}from"../../../../../../render/lib/sections/catalog-filter-layout.js";import{withRowRules as h}from"efficient-web-builder/render/lib/document/show-when";const F="follow the product type. Set them in Product types.",s={field:"showLugs",is:!0,default:!0},R={not:s},N={fields:h({_gPills:r("Filters shown"),showProcess:t("process",!0),showLugs:t("lugs",!0),showPrice:t("price",!0),showVehicle:t("vehicle",!0),_nFieldFilters:n(["size","finish"],F),_gBar:r("Bar"),showCount:o("Result count",!0,e(l,{})),showSort:o("Sort + Clear all",!0,e(u,{})),resultsLabel:c("Results button","See all results"),resultsHref:a("Results link"),resultsBlocked:_(L),layout:m("Layout",e(i,{}),f,p)},[[["resultsHref","resultsLabel"],R],[["resultsBlocked"],s]])};export{N as CatalogFilterBarFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{text as t,textarea as e,linkField as i}from"efficient-web-builder/editor/lib/document/controls";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{PH as r}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{ctaField as d}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";import{CHECKOUT_CTA_PH as n}from"../../../../../../render/lib/document/blocks/commerce/CheckoutCTA/meta.js";const f={fields:{_gContent:o("Content"),eyebrow:t("Eyebrow",r.eyebrow),title:e("Heading",n.title),body:e("Body",r.body),_gButton:o("Button"),...d,secondaryText:t("Secondary button",n.secondary),secondaryHref:i("Secondary link"),_gLayout:o("Layout")}};export{f as CheckoutCTAFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import r from"../../../../../components/CollectionPicker.js";import{withIdentifier as n,copyText as l,text as m,linkField as a}from"efficient-web-builder/editor/lib/document/controls";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{PH as p}from"efficient-web-builder/format/lib/document/blocks/placeholders";const C={fields:{_gContent:o("Content"),collection:{type:"custom",render:({value:e,onChange:t})=>i(r,{value:e,onChange:t})},altName:n(l("Alt name")),tag:m("Tag",p.eyebrow),_gLink:o("Link"),href:a("Link")}};export{C as CollectionCardFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{ColumnsIcon as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{ColumnsIcon as l,HashIcon as m}from"efficient-easel/icons";import{text as n,textarea as a}from"efficient-web-builder/editor/lib/document/controls";import{group as e}from"efficient-easel/screen/lib/document/box-fields";import{slider as t}from"efficient-web-builder/editor/lib/document/box-fields";import{headFieldsForPlacement as d,SPLITTABLE_SECTIONS as c}from"efficient-web-builder/format/lib/sections/section-head-placement";import{PH as r}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{slotRowsField as p}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";import{CollectionsSlots as f}from"../../../../../../render/lib/document/blocks/commerce/Collections/meta.js";const I={fields:{_gContent:e("Content"),eyebrow:n("Eyebrow",r.sectionNumber),heading:a("Heading",r.sectionHeading),cardList:p("Collections","Cards"),cards:f.cards,_gLayout:e("Layout"),columns:t("Columns",o(l,{}),2,5,1,3),limit:t("Collections to display",o(m,{}),1,8,1,6)},resolveFields:(s,{fields:i,parent:C})=>d(i,s.props.headPlacement,c.Collections.headRows)};export{I as CollectionsFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{text as e,textarea as n,linkField as d,cardImageField as a}from"efficient-web-builder/editor/lib/document/controls";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{headFieldsForPlacement as m,SPLITTABLE_SECTIONS as l}from"efficient-web-builder/format/lib/sections/section-head-placement";import{COMPATIBLETYRES_PH as o}from"../../../../../../render/lib/document/blocks/commerce/CompatibleTyres/meta.js";const c={fields:{_gContent:t("Header"),num:e("Number",o.num),title:e("Heading",o.title),description:n("Body",o.description),_gFootnote:t("Footnote"),footnote:n("Footnote",o.footnote),footnoteLinkText:e("Footnote button",o.footnoteLinkText),footnoteLinkHref:d("Footnote link"),_gCards:t("Cards"),cardImage:a()},resolveFields:(r,{fields:i,parent:s})=>m(i,r.props.headPlacement,l.CompatibleTyres.headRows)};export{c as CompatibleTyresFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{SettingsField as n}from"efficient-easel/panel";import{StylesIcon as l}from"efficient-easel/icons";import{CountryShowAsTiles as m}from"../../../../../components/CountryShowAsTiles.js";import{say as t}from"efficient-web-builder/format/lib/editor-words";import{group as S}from"efficient-
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{SettingsField as n}from"efficient-easel/panel";import{StylesIcon as l}from"efficient-easel/icons";import{CountryShowAsTiles as m}from"../../../../../components/CountryShowAsTiles.js";import{say as t}from"efficient-web-builder/format/lib/editor-words";import{group as S}from"efficient-easel/screen/lib/document/box-fields";import{COUNTRY_SHOW_AS as c,COUNTRY_SHOW_AS_LABEL as f,resolveCountryShowAs as p}from"../../../../../../render/lib/content/country-show-as.js";const d={type:"custom",render:({value:e,onChange:s})=>{const r=c.find(i=>i.value===p(e));return o(n,{label:t(f),icon:o(l,{}),value:r?t(r.label):void 0,children:o(m,{value:e,onChange:s})})}},w={fields:{_gStyle:S("Style"),showAs:d}};export{w as CountrySwitchBlockFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{SettingsIcon as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{SettingsIcon as s,AccentIcon as d}from"efficient-easel/icons";import{text as r,textarea as a,toggle as l,copyText as o,plainTextarea as g}from"efficient-web-builder/editor/lib/document/controls";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{headFieldsForPlacement as y,SPLITTABLE_SECTIONS as h}from"efficient-web-builder/format/lib/sections/section-head-placement";import{PH as n}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{DELIVERY_PH as m}from"../../../../../../render/lib/document/blocks/commerce/DeliveryOptions/meta.js";const O={fields:{_gContent:t("Content"),eyebrow:r("Eyebrow",n.eyebrow),title:a("Heading",m.title),body:a("Body",n.body),_gOptions:t("Options"),live:l("Use my real delivery options",!0,i(s,{})),options:{type:"array",label:"Delivery options",arrayFields:{name:o("Name"),eta:o("Window"),price:o("Price"),blurb:g("Body"),highlighted:l("Highlight",!1,i(d,{}))},getItemSummary:e=>e.name||"Option"},highlightBadge:r("Highlight badge",m.badge),_gLayout:t("Layout")},resolveFields:(e,{fields:p})=>y(p,e.props.headPlacement,h.DeliveryOptions.headRows)};export{O as DeliveryOptionsFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{ProductFieldIcon as n,WordsFromIcon as p,SquareIcon as s,ImageIcon as u}from"efficient-easel/icons";import{
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{ProductFieldIcon as n,WordsFromIcon as p,SquareIcon as s,ImageIcon as u}from"efficient-easel/icons";import{toggle as i,withScaffold as c,upload as w,plainText as o,copyText as y,plainTextarea as d}from"efficient-web-builder/editor/lib/document/controls";import{section as t}from"efficient-easel/screen/lib/document/box-fields";import{segmented as l}from"efficient-web-builder/editor/lib/document/box-fields";import{innerSpacingFields as g}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";import{withRowRules as f,withShowWhen as R}from"efficient-web-builder/render/lib/document/show-when";import{BOUND_TO_THE_RECORD as m,DRAWS_OTHER_RECORD as _,ON_DYNAMIC_PAGE as b,PAGE_FACTS as S}from"../page-rules.js";import{DETAILROWS_SCAFFOLD_ROWS as D}from"../../../../../../render/lib/document/blocks/commerce/DetailRows/meta.js";const P={fields:f({_sDynamic:t("Product page"),dynamic:i("Connect to product data",!1,e(n,{})),rowsFrom:l("Rows from",e(p,{}),[{label:"Product story",value:"story"},{label:"Detail shots",value:"details"}],"story"),_sRows:t("Rows"),rows:c({type:"array",label:"Rows",arrayFields:{image:w("Image","image/*"),imageShape:R(l("Image shape",e(s,{}),[{label:"Square",value:"square"},{label:"Wide",value:"wide"}],"square"),{context:"node.layout",is:"narrow"}),eyebrow:o("Eyebrow"),title:y("Title"),copy:d("Body"),specs:{type:"array",label:"Specs",arrayFields:{label:o("Label","Offset"),value:o("Value","ET -10")},defaultItemProps:{label:"",value:""},getItemSummary:(a,r)=>a?.label||`Spec ${(r??0)+1}`,max:8},tag:o("Image tag")},defaultItemProps:{image:"",imageShape:"square",eyebrow:"",title:"",copy:"",specs:[],tag:""},getItemSummary:(a,r)=>a?.title||a?.eyebrow||`Row ${(r??0)+1}`},D),_dDesign:t("Design"),layout:l("Row shape",e(s,{}),[{label:"Even columns",value:"even"},{label:"Narrow image",value:"narrow"}],"even"),startLeft:i("First image on the left",!1,e(u,{})),_dLayout:t("Layout"),...g("DetailRows")},[[["_sDynamic","dynamic"],b],[["rowsFrom"],{all:[m,{not:_}]}],[["_sRows","rows"],{not:m}]]),showWhenFacts:S};export{P as DetailRowsFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{text as r}from"efficient-web-builder/editor/lib/document/controls";import{group as e}from"efficient-easel/screen/lib/document/box-fields";import{PRODUCTGRID_PH as m}from"../../../../../../render/lib/document/blocks/commerce/placeholders.js";const p={fields:{_gHeader:e("Header"),num:r("Number",m.num)}};export{p as EuTyreLabelFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{SquareIcon as l}from"efficient-easel/icons";import{text as t,textarea as m,linkField as n}from"efficient-web-builder/editor/lib/document/controls";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{segmented as d}from"efficient-web-builder/editor/lib/document/box-fields";import{headFieldsForPlacement as s,SPLITTABLE_SECTIONS as p}from"efficient-web-builder/format/lib/sections/section-head-placement";import{withRowRules as c}from"efficient-web-builder/render/lib/document/show-when";import{FITMENTFINDER_PH as e}from"../../../../../../render/lib/document/blocks/commerce/FitmentFinder/meta.js";const b={fields:c({_gHeader:o("Header"),num:t("Number",e.num),title:t("Heading",e.title),description:m("Body",e.description),_gCta:o("Call to action"),ctaText:t("Button",e.ctaText),ctaHref:n("Button link"),_gStyle:o("Style"),layout:d("Section shape",i(l,{}),[{label:"Stacked",value:"full"},{label:"One row",value:"bar"}],"full")},[[["_gCta","ctaText","ctaHref"],{not:{field:"layout",is:"bar"}}]]),resolveFields:(r,{fields:a,parent:f})=>s(a,r.props?.headPlacement,p.FitmentFinder.headRows)};export{b as FitmentFinderFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{getFitments as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{getFitments as a}from"../../../../../../render/lib/wheels/fitments.js";import{WHEELS as c}from"../../../../../../render/lib/wheels/wheels.js";import{ProductFieldIcon as p,BlockProductIcon as d,ProductSizeIcon as s,NoteIcon as f}from"efficient-easel/icons";import{toggle as n,text as r,textarea as l,linkField as u}from"efficient-web-builder/editor/lib/document/controls";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{select as F}from"efficient-web-builder/editor/lib/document/box-fields";import{headFieldsForPlacement as g,SPLITTABLE_SECTIONS as _}from"efficient-web-builder/format/lib/sections/section-head-placement";import{withRowRules as T}from"efficient-web-builder/render/lib/document/show-when";import{OFF_DYNAMIC_PAGE as h}from"../page-rules.js";import{FITMENTTABLE_PH as e}from"../../../../../../render/lib/document/blocks/commerce/FitmentTable/meta.js";const E=c.filter(o=>a(o.slug).length>0).map(o=>({value:o.slug,label:o.name})),C={fields:T({_gDynamic:t("Product page"),dynamic:n("Connect to product data",!1,i(p,{})),_gContent:t("Header"),num:r("Number",e.num),title:r("Heading",e.title),description:l("Body",e.description),_gData:t("Wheel"),wheel:F("Product",i(d,{}),E,"vector-iii"),_gOptions:t("Controls"),showFilter:n("Size-filter chips",!0,i(s,{})),tooltipDefaultOn:n("Detail tooltip on by default",!0,i(f,{})),_gFootnote:t("Footnote"),footnote:l("Footnote",e.footnote),footnoteLinkText:r("Footnote button",e.footnoteLinkText),footnoteLinkHref:u("Footnote link")},[[["_gDynamic","dynamic"],{any:[]}],[["_gData","wheel"],h]]),resolveFields:(o,{fields:m,parent:P})=>g(m,o.props.headPlacement,_.FitmentTable.headRows)};export{C as FitmentTableFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{EDITOR_ONLY_GROUP as u}from"efficient-web-builder/editor/lib/document/field-groups";import w from"../../../../../components/GalleryShowcaseSource.js";import{EyeIcon as _,TabsIcon as c,BreadcrumbIcon as v,HashIcon as g,SortIcon as S}from"efficient-easel/icons";import{FieldGlyph as b}from"efficient-web-builder/editor/components/FieldGlyph";import{
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{EDITOR_ONLY_GROUP as u}from"efficient-web-builder/editor/lib/document/field-groups";import w from"../../../../../components/GalleryShowcaseSource.js";import{EyeIcon as _,TabsIcon as c,BreadcrumbIcon as v,HashIcon as g,SortIcon as S}from"efficient-easel/icons";import{FieldGlyph as b}from"efficient-web-builder/editor/components/FieldGlyph";import{text as p,plainText as y,sourceField as C,textarea as o,copyText as a,upload as i,linkField as d,toggle as s}from"efficient-web-builder/editor/lib/document/controls";import{section as h,group as l}from"efficient-easel/screen/lib/document/box-fields";import{segmented as n}from"efficient-web-builder/editor/lib/document/box-fields";import{withRowRules as T}from"efficient-web-builder/render/lib/document/show-when";import{GALLERY_PH as r}from"../../../../../../render/lib/document/blocks/commerce/Gallery/meta.js";const B=["_sVehicle","_gVehicleContent","vehicleTabLabel","vehicleTitle","vehicleBody1","vehicleBody2","_gVehicleStats","vehicleStats","_gVehicleCards","vehicleCards"],I=["_sWheel","_gWheelContent","wheelTabLabel","wheelTitle","wheelBody1","wheelBody2","_gWheelStats","wheelStats","_gWheelCards","wheelCards"],x={fields:T({_sSetup:h("Setup"),_gGallery:l("Gallery"),mode:n("Show",t(_,{}),[{label:"Gallery A",value:"vehicles"},{label:"Gallery B",value:"wheels"},{label:"Others",value:"others"},{label:"Both",value:"both"}],"both"),kicker:p("Eyebrow",r.kicker),breadcrumbLabel:y("Breadcrumb label","Gallery"),_gSource:l("Source product"),source:C(w),_sPreview:h("Preview"),_gPreview:l(u),previewTab:n("Show tab",t(c,{}),[{label:"Gallery A",value:"vehicles"},{label:"Gallery B",value:"wheels"}],"vehicles"),_sVehicle:h("Gallery A"),_gVehicleContent:l("Content"),vehicleTabLabel:y("Tab label","Gallery A"),vehicleTitle:o("Heading",r.vehicleTitle),vehicleBody1:o("Intro",r.vehicleBody1),vehicleBody2:o("Body",r.vehicleBody2),_gVehicleStats:l("Stats"),vehicleStats:{type:"array",label:"Stats",arrayFields:{value:a("Value"),label:a("Label")},getItemSummary:e=>e.label||e.value||"stat"},_gVehicleCards:l("Cards"),vehicleCards:{type:"array",label:"Cards",arrayFields:{image:i("Cover image","image/*"),photos:{type:"array",label:"More images",arrayFields:{src:i("Image","image/*")},getItemSummary:(e,m)=>`Image ${(m??0)+1}`},href:d("Product link"),process:a("Tag"),eyebrow:a("Eyebrow"),name:a("Title"),meta:a("Meta line")},getItemSummary:e=>e.name||e.eyebrow||"card"},_sWheel:h("Gallery B"),_gWheelContent:l("Content"),wheelTabLabel:y("Tab label","Gallery B"),wheelTitle:o("Heading",r.wheelTitle),wheelBody1:o("Intro",r.wheelBody1),wheelBody2:o("Body",r.wheelBody2),_gWheelStats:l("Stats"),wheelStats:{type:"array",label:"Stats",arrayFields:{value:a("Value"),label:a("Label")},getItemSummary:e=>e.label||e.value||"stat"},_gWheelCards:l("Cards"),wheelCards:{type:"array",label:"Cards",arrayFields:{image:i("Cover image","image/*"),photos:{type:"array",label:"More images",arrayFields:{src:i("Image","image/*")},getItemSummary:(e,m)=>`Image ${(m??0)+1}`},href:d("Product link"),process:a("Tag"),eyebrow:a("Eyebrow"),name:a("Title"),meta:a("Meta line")},getItemSummary:e=>e.name||e.eyebrow||"card"},_sOthers:h("Others gallery"),_gOthersContent:l("Content"),othersTitle:o("Heading",r.othersTitle),othersBody1:o("Intro",r.othersBody1),othersBody2:o("Body",r.othersBody2),_gOthersStats:l("Stats"),othersStats:{type:"array",label:"Stats",arrayFields:{value:a("Value"),label:a("Label")},getItemSummary:e=>e.label||e.value||"stat"},_gOthersCards:l("Cards"),othersCards:{type:"array",label:"Cards",arrayFields:{image:i("Cover image","image/*"),photos:{type:"array",label:"More images",arrayFields:{src:i("Image","image/*")},getItemSummary:(e,m)=>`Image ${(m??0)+1}`},href:d("Product link"),process:a("Tag"),eyebrow:a("Eyebrow"),name:a("Title"),meta:a("Meta line")},getItemSummary:e=>e.name||e.eyebrow||"card"},_sVisibility:h("Visibility"),_gElements:l("Show / hide elements"),showBreadcrumb:s("Breadcrumb",!0,t(v,{})),showStats:s("Stats",!0,t(g,{})),showIntro:s("Intro text",!0,t(b,{noun:"intro"})),showTabs:s("Tab switcher",!0,t(c,{})),showFilters:s("Tag filters",!0,t(b,{noun:"tag"})),showCount:s("Result count",!0,t(g,{})),showSort:s("Sort control",!0,t(S,{}))},[[["_sPreview","_gPreview","previewTab"],{field:"mode",is:"both",default:"both"}],[I,{not:{field:"mode",is:"vehicles"}}],[B,{not:{field:"mode",is:"wheels"}}],[["_gVehicleCards","vehicleCards","_gWheelCards","wheelCards","_gOthersCards","othersCards"],{not:{field:"source.slug",set:!0}}]])};export{x as GalleryFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";import{ProductFieldIcon as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{ProductFieldIcon as n,ImageIcon as c,EyeIcon as d,HashIcon as p}from"efficient-easel/icons";import{toggle as g,text as t,textarea as u,linkField as i,galleryLayoutField as _,containerGapField as y,displayFields as f}from"efficient-web-builder/editor/lib/document/controls";import{group as e}from"efficient-easel/screen/lib/document/box-fields";import{select as s,slider as L}from"efficient-web-builder/editor/lib/document/box-fields";import{blockSourceField as h,blockSourceFields as A,NO_BLOCK_SOURCE as E}from"efficient-web-builder/editor/lib/document/block-source-fields";import{GALLERY_TILE_PARTS as I}from"../../../../../../render/components/GalleryItem.js";import{headFieldsForPlacement as S,SPLITTABLE_SECTIONS as G}from"efficient-web-builder/format/lib/sections/section-head-placement";import{slotRowsField as R}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";import{withRowRules as v}from"efficient-web-builder/render/lib/document/show-when";import{BOUND_TO_THE_RECORD as o,DRAWS_OTHER_RECORD as F,ON_DYNAMIC_PAGE as H,PAGE_FACTS as O}from"../page-rules.js";import{GALLERY_B_PH as a,GalleryBSlots as b}from"../../../../../../render/lib/document/blocks/commerce/GalleryB/meta.js";const k=[{label:"All media groups",value:"all"},{label:"Lifestyle photos",value:"lifestyle"},{label:"Product photos",value:"photos"},{label:"Accessories",value:"accessories"},{label:"Others",value:"others"}],B=[{label:"Group covers",value:"covers"},{label:"Every photo",value:"all"},{label:"Auto (covers if 4+ groups)",value:"auto"}],K={fields:v({_gDynamic:e("Product page"),dynamic:g("Connect to product data",!1,l(n,{})),mediaZone:s("Images from",l(c,{}),k,"all"),photoDisplay:s("Show",l(d,{}),B,"covers"),_gHeader:e("Header"),num:t("Section number",a.num),title:u("Heading",a.title),_gHeaderLink:e("Header link"),linkText:t("Header button",a.link),linkHref:i("Header link"),_gImages:e("Images"),imageList:R("GalleryB"),items:b.items,...f(I),dataSource:h("Image source","Images typed here"),limit:L("Images to show",l(p,{}),1,24,1,24),_gGalleryLink:e("Gallery link"),galleryHref:i("“See gallery” link"),_gArrangement:e("Arrangement"),layout:_(),gap:y("GalleryB")},[[["_gDynamic","dynamic"],H],[["mediaZone","photoDisplay"],{all:[o,{not:F}]}],[["_gImages"],{not:o}],[["items","imageList"],{all:[{not:o},E]}],[["limit"],{field:"dataSource",set:!0}]]),resolveFields:(r,{fields:m,parent:P})=>S(A("GalleryB",m,r.props),r.props.headPlacement,G.GalleryB.headRows),showWhenFacts:O};export{K as GalleryBFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import u from"../../../../../components/GalleryProductBinding.js";import{ProductFieldIcon as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import u from"../../../../../components/GalleryProductBinding.js";import{ProductFieldIcon as p,SquareIcon as s,PlacementIcon as n}from"efficient-easel/icons";import{toggle as c,upload as l,text as o,linkField as d}from"efficient-web-builder/editor/lib/document/controls";import{group as a}from"efficient-easel/screen/lib/document/box-fields";import{select as i}from"efficient-web-builder/editor/lib/document/box-fields";import{withRowRules as g}from"efficient-web-builder/render/lib/document/show-when";const m={field:"fromProduct",is:!0},P={fields:g({_gSource:a("Content source"),fromProduct:c("Fill from a product",!1,e(p,{})),product:{type:"custom",render:({value:t,onChange:r})=>e(u,{value:t,onChange:r})},_gMedia:a("Media"),image:l("Cover image","image/*"),photos:{type:"array",label:"More images",arrayFields:{src:l("Image","image/*")},getItemSummary:(t,r)=>`Image ${(r??0)+1}`},_gText:a("Text"),process:o("Tag"),eyebrow:o("Eyebrow"),name:o("Title"),meta:o("Meta"),_gLink:a("Link"),href:d("Product link"),ratio:i("Shape",e(s,{}),[{label:"Square",value:"square"},{label:"Wide (2:1)",value:"wide"},{label:"Landscape (4:3)",value:"landscape"},{label:"Portrait (4:5)",value:"portrait"},{label:"The photo's own shape",value:"auto"}],"square"),captionPlace:i("Card text",e(n,{}),[{label:"On the photo",value:"overlay"},{label:"Below the photo",value:"below"}],"overlay")},[[["_gMedia","image","photos","_gText","process","eyebrow","name","meta","_gLink","href"],{not:m}],[["product"],m]])};export{P as GalleryItemFields};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlockFields } from "efficient-web-builder/format/lib/document/blocks/block-types";
|
|
2
2
|
export declare const PRODUCT_GALLERY_ROWS: {
|
|
3
|
-
galleryMode: import("efficient-
|
|
4
|
-
imageFit: import("efficient-
|
|
3
|
+
galleryMode: import("efficient-easel/screen/lib/document/box-fields").BoxField<string>;
|
|
4
|
+
imageFit: import("efficient-easel/screen/lib/document/box-fields").BoxField<string>;
|
|
5
5
|
};
|
|
6
6
|
export declare const ProductGalleryFields: BlockFields;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{IMAGE_FIT_ROW_LABEL as o}from"efficient-web-builder/format/lib/content/image-fit";import{GridIcon as r,ImageIcon as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{IMAGE_FIT_ROW_LABEL as o}from"efficient-web-builder/format/lib/content/image-fit";import{GridIcon as r,ImageIcon as m}from"efficient-easel/icons";import{group as a}from"efficient-easel/screen/lib/document/box-fields";import{segmented as l}from"efficient-web-builder/editor/lib/document/box-fields";import{DEFAULT_HERO_GALLERY_MODE as i,heroImageFitOptions as t,DEFAULT_HERO_IMAGE_FIT as _}from"../../../../../../render/lib/sections/hero-gallery.js";const s={galleryMode:l("Gallery",e(r,{}),[{label:"Main only",value:"main"},{label:"Main + thumbs",value:"thumbs"},{label:"Tiled",value:"tiled"}],i),imageFit:l(o,e(m,{}),t(),_)},G={fields:{_gImageGallery:a("Image gallery"),...s}};export{s as PRODUCT_GALLERY_ROWS,G as ProductGalleryFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import I from"../../../../../components/CategorySource.js";import{headerKeysOfPlace as F,LAYOUT_FIELD_KEYS as L,SECTION_THEME_FIELD_KEYS as T,SECTION_SHAPE_FIELD_KEYS as P,SECTION_ANIM_FIELD_KEYS as g,CARD_STYLE_FIELD_KEYS as O,BOUND_CARD_MEDIA_FIELD_KEYS as y,CARD_SHOW_FIELD_KEYS as C}from"efficient-web-builder/editor/lib/document/field-groups";import{TITLE_SIZES as A}from"../../../../../../render/components/ProductGridSection.js";import{DEFAULT_TITLE_SIZE as H}from"../../../../../../render/lib/sections/product-grid-title.js";import{ProductFieldIcon as R,TextSizeIcon as N,ColumnsIcon as h,ListIcon as k,HashIcon as G}from"efficient-easel/icons";import{toggle as e,text as s,textarea as d,sourceField as Y,linkField as K,cardShowFields as U,cardMediaFields as w,cardStyleFields as x,containerGapField as B,spacingFields as M}from"efficient-web-builder/editor/lib/document/controls";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{select as b,slider as n}from"efficient-web-builder/editor/lib/document/box-fields";import{isEditorOnDynamicPage as j}from"efficient-web-builder/format/lib/document/editor-page-context";import{productKindsField as z}from"../shared-fields.js";import{ALL_PRODUCTS_SLUG as W}from"../../../../../../render/lib/wheels/grid-source.js";import{headFieldsForPlacement as Z,SPLITTABLE_SECTIONS as v}from"efficient-web-builder/format/lib/sections/section-head-placement";import{PH as m}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{slotRowsField as q}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";import{PRODUCTGRID_PH as l}from"../../../../../../render/lib/document/blocks/commerce/placeholders.js";import{GRID_CARD_SHOW as J}from"../../../../../../render/lib/sections/card-show-defaults.js";import{truthy as r,withRowRules as c}from"efficient-web-builder/render/lib/document/show-when";import{BOUND_TO_THE_RECORD as Q,OFF_DYNAMIC_PAGE as a,ON_DYNAMIC_PAGE as V}from"../page-rules.js";import{ProductGridSlots as X}from"../../../../../../render/lib/document/blocks/commerce/ProductGrid/meta.js";const _=M({top:120,keys:{top:"padTop",bottom:"padBottom"},group:!1,only:"top"}),$=new Set([...F("Content"),"_gDynamic","dynamic","_gHeader","num","title","titleSize","description","_gLayout","columns",...Object.keys(_),...L,...T,...P,...g,...O,...y,...C]),oo={not:Q},Po={fields:c({_gDynamic:t("Product page"),dynamic:e("Connect to product data",!1,o(R,{})),_gHeader:t("Header"),num:s("Number",l.num),title:d("Heading",m.sectionHeading),titleSize:b("Heading size",o(N,{}),A,H),description:d("Body",m.body),_gProducts:t("Products"),source:Y(I),kinds:z(),productList:q("ProductGrid"),products:X.products,_gLink:t("Link"),linkText:s("Button",l.link),linkHref:K("Link"),...U({defaults:J}),...w(),...x(),_gLayout:t("Grid"),columns:n("Columns",o(h,{}),1,6,1,4),showAll:e("Show all items",!1,o(k,{})),limit:n("Items to display",o(G,{}),1,12,1,8),gap:B("ProductGrid"),..._},[[["_gDynamic","dynamic"],V],[["kinds"],{field:"source.slug",is:W}],[["products","productList"],{not:r("source.slug")}],[["limit"],{any:[a,{not:r("showAll")}]}],[["linkHref"],{any:[a,{not:r("linkText.hidden")}]}]]),resolveFields:(p,{fields:u,parent:to})=>{const E=u,f=p.props,i=Z(E,f.headPlacement,v.ProductGrid.headRows);if(!j())return i;const S=Object.keys(i).filter(D=>!$.has(D));return c(i,[[S,oo]])}};export{Po as ProductGridFields};
|