efficient-storefront-blocks 0.84.0 → 0.86.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 +23 -0
- package/dist/chunks/{EditorPreviewCheckout-3NVDTH56.js → EditorPreviewCheckout-4LNXFNN7.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-77K7CGYZ.js → SiteEditorProvider-A2HMVDKS.js} +1 -1
- package/dist/chunks/{chunk-F3MB7QCR.js → chunk-ALMIS7CK.js} +1 -1
- package/dist/chunks/{chunk-VYOK2XBF.js → chunk-EUKK2IN6.js} +1 -1
- package/dist/chunks/chunk-FJRKNPNN.js +340 -0
- package/dist/chunks/chunk-SLRULFYY.js +1 -0
- package/dist/chunks/{chunk-VJLQXB7I.js → chunk-TGBNREUJ.js} +1 -1
- package/dist/chunks/{fitment-data-PWXEDMOA.js → fitment-data-TSYW6AFA.js} +1 -1
- package/dist/contract.js +2 -2
- package/dist/editor/lib/document/blocks/commerce/DetailRows/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/FitmentPicker/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/FitmentPicker/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/FitmentTable/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/ProductGrid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/SpecTable/fields.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/StockFitment/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/commerce/StockFitment/fields.js +1 -0
- package/dist/editor/lib/document/blocks/commerce/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/commerce/index.js +1 -1
- package/dist/editor/lib/document/blocks/commerce/page-rules.d.ts +5 -0
- package/dist/editor/lib/document/blocks/commerce/page-rules.js +1 -1
- package/dist/editor/lib/document/blocks/service/ArticleBody/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/ArticleBody/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/SiteFooter/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/service/index.js +1 -1
- package/dist/editor/lib/document/box-header.d.ts +1 -1
- package/dist/editor/lib/document/box-header.js +1 -1
- package/dist/editor/lib/document/config.d.ts +1 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/document/popup-look-fields.d.ts +4 -0
- package/dist/editor/lib/document/popup-look-fields.js +1 -0
- package/dist/editor/lib/efficient-backend.js +1 -1
- package/dist/editor/lib/efficient-block-sources.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +21 -1
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.js +134 -58
- package/dist/render/app/globals.css +156 -0
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/ArticleBody.d.ts +7 -0
- package/dist/render/components/ArticleBody.js +1 -0
- package/dist/render/components/BoxHeaderBar.d.ts +2 -1
- package/dist/render/components/BoxHeaderBar.js +1 -1
- package/dist/render/components/CartContext.d.ts +1 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/CartDrawer.d.ts +4 -3
- package/dist/render/components/CartDrawer.js +1 -4
- package/dist/render/components/DetailRows.d.ts +6 -1
- package/dist/render/components/DetailRows.js +1 -1
- package/dist/render/components/PopupFrame.d.ts +10 -1
- package/dist/render/components/PopupFrame.js +5 -1
- package/dist/render/components/ProductGridSection.d.ts +2 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/PublishedHeader.js +1 -1
- package/dist/render/components/Reviews.d.ts +1 -0
- package/dist/render/components/Reviews.js +1 -1
- package/dist/render/components/SectionBand.d.ts +2 -1
- package/dist/render/components/SectionBand.js +1 -1
- package/dist/render/components/SectionBandChoice.d.ts +2 -1
- package/dist/render/components/SectionBandChoice.js +1 -1
- package/dist/render/components/SectionGroupBody.d.ts +2 -2
- package/dist/render/components/SectionGroupBody.js +1 -1
- package/dist/render/components/SpecTable.d.ts +3 -1
- package/dist/render/components/SpecTable.js +1 -1
- package/dist/render/components/TyreSizeGrid.d.ts +17 -0
- package/dist/render/components/TyreSizeGrid.js +1 -0
- package/dist/render/components/fitment/FitmentPickerGrid.d.ts +5 -1
- package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
- package/dist/render/components/fitment/FitmentPickerPart.d.ts +8 -0
- package/dist/render/components/fitment/FitmentPickerPart.js +1 -0
- package/dist/render/components/fitment/StockFitmentPart.d.ts +4 -0
- package/dist/render/components/fitment/StockFitmentPart.js +1 -0
- package/dist/render/components/fitment/useVehicleFit.d.ts +2 -1
- package/dist/render/components/fitment/useVehicleFit.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.d.ts +2 -0
- package/dist/render/components/pdp-dynamic/DynamicDetailRows.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicFitmentTable.d.ts +5 -0
- package/dist/render/components/pdp-dynamic/DynamicFitmentTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicSpecTable.d.ts +1 -0
- package/dist/render/components/pdp-dynamic/DynamicSpecTable.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicTyreSizes.js +1 -1
- package/dist/render/components/pdp-dynamic/FitmentTableBlock.d.ts +3 -1
- package/dist/render/components/pdp-dynamic/FitmentTableBlock.js +1 -1
- package/dist/render/lib/content/article-body-seed.d.ts +9 -0
- package/dist/render/lib/content/article-body-seed.js +1 -0
- package/dist/render/lib/content/article-body.d.ts +8 -0
- package/dist/render/lib/content/article-body.js +5 -0
- package/dist/render/lib/content/article-page-seed.d.ts +12 -0
- package/dist/render/lib/content/article-page-seed.js +1 -0
- package/dist/render/lib/document/blocks/commerce/DetailRows/meta.d.ts +6 -0
- package/dist/render/lib/document/blocks/commerce/DetailRows/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/DetailRows/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/FitmentPicker/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/FitmentTable/meta.js +1 -1
- package/dist/render/lib/document/blocks/commerce/FitmentTable/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/ProductGrid/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/SpecTable/render.js +1 -1
- package/dist/render/lib/document/blocks/commerce/StockFitment/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/StockFitment/meta.js +1 -0
- package/dist/render/lib/document/blocks/commerce/StockFitment/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/StockFitment/render.js +1 -0
- package/dist/render/lib/document/blocks/commerce/metas.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/metas.js +1 -1
- package/dist/render/lib/document/blocks/commerce/renders.d.ts +2 -0
- package/dist/render/lib/document/blocks/commerce/renders.js +1 -1
- package/dist/render/lib/document/blocks/service/ArticleBody/meta.d.ts +8 -0
- package/dist/render/lib/document/blocks/service/ArticleBody/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/ArticleBody/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/ArticleBody/render.js +1 -0
- package/dist/render/lib/document/blocks/service/SiteFooter/render.js +1 -1
- package/dist/render/lib/document/blocks/service/SiteHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/service/metas.d.ts +1 -0
- package/dist/render/lib/document/blocks/service/metas.js +1 -1
- package/dist/render/lib/document/blocks/service/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/service/renders.js +1 -1
- package/dist/render/lib/document/card-templates.js +1 -1
- package/dist/render/lib/document/current-record.d.ts +4 -15
- package/dist/render/lib/document/current-record.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/render/lib/document/render-config.d.ts +1 -0
- package/dist/render/lib/document/render-config.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-detail.d.ts +2 -0
- package/dist/render/lib/document/section-to-box-rows-detail.js +1 -0
- package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-spec.js +1 -1
- package/dist/render/lib/document/storefront-root.js +1 -1
- package/dist/render/lib/sections/product-grid-columns.d.ts +5 -0
- package/dist/render/lib/sections/product-grid-columns.js +1 -0
- package/dist/render/lib/sections/section-band.d.ts +6 -0
- package/dist/render/lib/sections/section-band.js +1 -1
- package/dist/render/lib/sections/spec-table-band.d.ts +4 -0
- package/dist/render/lib/sections/spec-table-band.js +1 -0
- package/dist/render/lib/wheels/vehicle-memory.d.ts +13 -0
- package/dist/render/lib/wheels/vehicle-memory.js +1 -1
- package/dist/words.d.ts +58 -12
- package/dist/words.js +5 -5
- package/package.json +5 -4
- package/dist/chunks/chunk-5EQD5D3L.js +0 -340
- package/dist/chunks/chunk-DQFD2BJD.js +0 -1
- /package/dist/chunks/{chunk-5EQD5D3L.js.LEGAL.txt → chunk-FJRKNPNN.js.LEGAL.txt} +0 -0
package/dist/contract.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var m=["general","commerce","service"],i=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"PaymentBadges",label:"Payment Methods",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"}]}];var b={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A \u2014 shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or a shape (Big left, Big right, Bigger left, Bigger right) and its own `Columns` in the Phone view. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/document/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/document/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',Spacer:`Lewis, 2026-10-10 (section-merges.md group 19, approved): one Divider holds space and lines. Style = None (was Spacer) / Line / Stripes; the space above and below as number boxes. Retired by card [MERGE] Spacer Into Divider (2026-10-26).
|
|
1
|
+
var m=["general","commerce","service"],i=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"HeroSingle",label:"Hero Single",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"PaymentBadges",label:"Payment Methods",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{type:"DocBody",label:"Document Text",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"}]}];var b={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A \u2014 shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or Custom, and its own `Columns` in the Phone view. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/document/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/document/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',Spacer:`Lewis, 2026-10-10 (section-merges.md group 19, approved): one Divider holds space and lines. Style = None (was Spacer) / Line / Stripes; the space above and below as number boxes. Retired by card [MERGE] Spacer Into Divider (2026-10-26).
|
|
2
2
|
|
|
3
3
|
WHAT REPLACES IT: a Divider with Style set to None. It draws no line, only its space, and that space is the Divider's Padding row (top and bottom, each with its phone value): the Spacer's 24 / 48 / 96 / 160 px are None with Padding 12 + 12, 24 + 24, 48 + 48, 80 + 80. \`scripts/test-divider-holds-the-spacer.tsx\` \xA75 holds it.
|
|
4
4
|
|
|
@@ -32,4 +32,4 @@ WHAT REPLACES IT: Cards drawn from its card template, each card a Label, a Value
|
|
|
32
32
|
|
|
33
33
|
WHAT A MERCHANT LOSES (the LOOK GAPS in that file): the grid takes the Cards block's own gaps and breakpoints, not the old 40 (16 on a phone).
|
|
34
34
|
|
|
35
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Document Detail Cards still renders through it and can still be edited; no document is rewritten.`,SubscribeBlogs:"card 66396 \u2014 folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."};var C=Array.from(new Set([...i.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(b)])),O=Object.fromEntries(i.flatMap(e=>e.sections.map(t=>[t.type,t.label]))),g={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},
|
|
35
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Document Detail Cards still renders through it and can still be edited; no document is rewritten.`,SubscribeBlogs:"card 66396 \u2014 folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."};var C=Array.from(new Set([...i.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(b)])),O=Object.fromEntries(i.flatMap(e=>e.sections.map(t=>[t.type,t.label]))),g={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",Series:"general",DocMetaCards:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",DeliveryOptions:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",MenuLinkBlock:"service",ArticleBody:"service",ProductPrice:"commerce",ProductSize:"commerce",ProductColour:"commerce",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},a={...g,...Object.fromEntries(i.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function E(e){return Object.prototype.hasOwnProperty.call(a,e)?a[e]:void 0}function l(e){return Object.keys(a).filter(t=>a[t]===e).sort()}var T=l("general"),S=l("commerce"),f=l("service");var w="Box",A=`${w}es`;var h=e=>!!e&&typeof e=="object"&&!Array.isArray(e),p=e=>h(e)&&typeof e.type=="string"&&h(e.props);var s=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),c=e=>p(e)&&e.type!=="";function y(e,t,o){if(Array.isArray(e))for(let r of e)c(r)?d(r,t,o):s(r)&&typeof r.type=="string"&&r.type!==""&&t.add(r.type)}function n(e,t,o){if(Array.isArray(e)){if(o.has(e))return;o.add(e);for(let r of e)c(r)?d(r,t,o):n(r,t,o)}else if(s(e)&&!o.has(e)){o.add(e);for(let r of Object.values(e))n(r,t,o)}}function d(e,t,o){if(!o.has(e)){o.add(e),t.add(e.type);for(let r of Object.values(e.props))n(r,t,o)}}function u(e){let t=new Set,o=new Set;if(c(e))d(e,t,o);else if(s(e)){if(y(e.content,t,o),s(e.zones))for(let r of Object.values(e.zones))y(r,t,o);s(e.root)&&n(e.root,t,o)}return[...t].sort()}export{m as BLOCK_SETS,S as COMMERCE_BLOCKS,T as GENERAL_BLOCKS,f as SERVICE_BLOCKS,E as blockSetOf,u as blockTypesIn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{ProductFieldIcon as m,WordsFromIcon as n,SquareIcon as s,ImageIcon as p}from"efficient-easel/icons";import{toggle as i,withScaffold as u,upload as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{ProductFieldIcon as m,WordsFromIcon as n,SquareIcon as s,ImageIcon as p}from"efficient-easel/icons";import{toggle as i,withScaffold as u,upload as w,plainText as o,copyText as c,plainTextarea as y}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 d}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";import{withRowRules as R,withShowWhen as g}from"efficient-web-builder/render/lib/document/show-when";import{BOUND_TO_THE_RECORD as _,BOUND_TO_THE_RECORD_ROW as f,DRAWS_OTHER_RECORD as D,ON_DYNAMIC_PAGE_ROW as S,PAGE_FACTS as b}from"../page-rules.js";import{DETAILROWS_SCAFFOLD_ROWS as O,DetailRowsSlots as I}from"../../../../../../render/lib/document/blocks/commerce/DetailRows/meta.js";const P={fields:R({...I,_sDynamic:t("Product page"),dynamic:i("Connect to product data",!1,e(m,{})),rowsFrom:l("Rows from",e(n,{}),[{label:"Product story",value:"story"},{label:"Detail shots",value:"details"}],"story"),_sRows:t("Rows"),rows:u({type:"array",label:"Rows",arrayFields:{image:w("Image","image/*"),imageShape:g(l("Image shape",e(s,{}),[{label:"Square",value:"square"},{label:"Wide",value:"wide"}],"square"),{context:"node.layout",is:"narrow"}),eyebrow:o("Eyebrow"),title:c("Title"),copy:y("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}`},O),_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(p,{})),_dLayout:t("Layout"),...d("DetailRows")},[[["_sDynamic","dynamic"],S],[["rowsFrom"],{all:[f,{not:D}]}],[["_sRows","rows"],{not:_}]]),showWhenFacts:b};export{P as DetailRowsFields};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{ColumnsIcon as o,HeightIcon as t}from"efficient-easel/icons";import{phoneTwinFields as i}from"efficient-easel/screen/lib/document/box-fields";import{select as r,slider as e}from"efficient-web-builder/editor/lib/document/box-fields";const p={fields:{layout:r("Cell height",l(t,{}),[{label:"Tall",value:"tall"},{label:"Short",value:"short"}],"tall"),...i("pickerColumns",e("Columns",l(o,{}),1,4,1,4),void 0,{phoneRow:e("Columns",l(o,{}),1,4,1,1)})}};export{p as FitmentPickerFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{getFitments as a}from"../../../../../../render/lib/wheels/fitments.js";import{WHEELS as f}from"../../../../../../render/lib/wheels/wheels.js";import{ProductFieldIcon as s,BlockProductIcon as p,ProductSizeIcon as c,NoteIcon as d}from"efficient-easel/icons";import{toggle as i,text as r,textarea as l,linkField as F}from"efficient-web-builder/editor/lib/document/controls";import{group as t}from"efficient-easel/screen/lib/document/box-fields";import{select as u}from"efficient-web-builder/editor/lib/document/box-fields";import{headFieldsForPlacement as T,SPLITTABLE_SECTIONS as _}from"efficient-web-builder/format/lib/sections/section-head-placement";import{withRowRules as g}from"efficient-web-builder/render/lib/document/show-when";import{OFF_DYNAMIC_PAGE as E,ON_TYRE_TEMPLATE as h,TYRE_TEMPLATE_FACTS as L}from"../page-rules.js";import{FITMENTTABLE_PH as e}from"../../../../../../render/lib/document/blocks/commerce/FitmentTable/meta.js";const P=f.filter(o=>a(o.slug).length>0).map(o=>({value:o.slug,label:o.name})),C={fields:g({_gDynamic:t("Product page"),dynamic:i("Connect to product data",!1,n(s,{})),_gContent:t("Header"),num:r("Number",e.num),title:r("Heading",e.title),description:l("Body",e.description),_gData:t("Wheel"),wheel:u("Product",n(p,{}),P,"vector-iii"),_gOptions:t("Controls"),showFilter:i("Size-filter chips",!0,n(c,{})),tooltipDefaultOn:i("Detail tooltip on by default",!0,n(d,{})),_gFootnote:t("Footnote"),footnote:l("Footnote",e.footnote),footnoteLinkText:r("Footnote button",e.footnoteLinkText),footnoteLinkHref:F("Footnote link")},[[["_gDynamic","dynamic"],{any:[]}],[["_gData","wheel"],E],[["_gOptions","showFilter","tooltipDefaultOn","_gFootnote","footnote","footnoteLinkText","footnoteLinkHref"],{not:h}]]),resolveFields:(o,{fields:m,parent:I})=>T(m,o.props.headPlacement,_.FitmentTable.headRows),showWhenFacts:L};export{C as FitmentTableFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import T from"../../../../../components/CategorySource.js";import{headerKeysOfPlace as O,LAYOUT_FIELD_KEYS as P,SECTION_THEME_FIELD_KEYS as L,SECTION_SHAPE_FIELD_KEYS as C,SECTION_ANIM_FIELD_KEYS as g,CARD_STYLE_FIELD_KEYS as y,BOUND_CARD_MEDIA_FIELD_KEYS as R,CARD_SHOW_FIELD_KEYS as h}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 N,TextSizeIcon as G,ColumnsIcon as n,ListIcon as k,HashIcon as w}from"efficient-easel/icons";import{toggle as d,text as m,textarea as l,sourceField as U,linkField as Y,cardShowFields as K,cardMediaFields as x,cardStyleFields as B,containerGapRows as M,spacingFields as b}from"efficient-web-builder/editor/lib/document/controls";import{group as t,phoneTwinFields as j}from"efficient-easel/screen/lib/document/box-fields";import{PRODUCT_GRID_PHONE_COLUMNS as e}from"../../../../../../render/lib/sections/product-grid-columns.js";import{select as z,slider as r}from"efficient-web-builder/editor/lib/document/box-fields";import{isEditorOnDynamicPage as W}from"efficient-web-builder/format/lib/document/editor-page-context";import{productKindsField as Z}from"../shared-fields.js";import{ALL_PRODUCTS_SLUG as v}from"../../../../../../render/lib/wheels/grid-source.js";import{headFieldsForPlacement as q,SPLITTABLE_SECTIONS as J}from"efficient-web-builder/format/lib/sections/section-head-placement";import{PH as c}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 _}from"../../../../../../render/lib/document/blocks/commerce/placeholders.js";import{GRID_CARD_SHOW as V}from"../../../../../../render/lib/sections/card-show-defaults.js";import{truthy as s,withRowRules as a}from"efficient-web-builder/render/lib/document/show-when";import{BOUND_TO_THE_RECORD as X,OFF_DYNAMIC_PAGE as p,ON_DYNAMIC_PAGE_ROW as $,PAGE_FACTS as oo}from"../page-rules.js";import{ProductGridSlots as to}from"../../../../../../render/lib/document/blocks/commerce/ProductGrid/meta.js";const u=b({top:120,keys:{top:"padTop",bottom:"padBottom"},group:!1,only:"top"}),eo=new Set([...O("Content"),"_gDynamic","dynamic","_gHeader","num","title","titleSize","description","_gLayout","columns",...Object.keys(u),...P,...L,...C,...g,...y,...R,...h]),io={not:X},yo={fields:a({_gDynamic:t("Product page"),dynamic:d("Connect to product data",!1,o(N,{})),_gHeader:t("Header"),num:m("Number",_.num),title:l("Heading",c.sectionHeading),titleSize:z("Heading size",o(G,{}),A,H),description:l("Body",c.body),_gProducts:t("Products"),source:U(T),kinds:Z(),productList:Q("ProductGrid"),products:to.products,_gLink:t("Link"),linkText:m("Button",_.link),linkHref:Y("Link"),...K({defaults:V}),...x(),...B(),_gLayout:t("Grid"),...j("columns",r("Columns",o(n,{}),1,6,1,4),void 0,{phoneRow:r("Columns",o(n,{}),e.min,e.max,1,e.min,"",{clear:{phoneFollows:!1,hint:e.min}})}),showAll:d("Show all items",!1,o(k,{})),limit:r("Items to display",o(w,{}),1,12,1,8),...M("ProductGrid"),...u},[[["_gDynamic","dynamic"],$],[["kinds"],{field:"source.slug",is:v}],[["products","productList"],{not:s("source.slug")}],[["limit"],{any:[p,{not:s("showAll")}]}],[["linkHref"],{any:[p,{not:s("linkText.hidden")}]}]]),resolveFields:(E,{fields:f,parent:ro})=>{const S=f,D=E.props,i=q(S,D.headPlacement,J.ProductGrid.headRows);if(!W())return i;const I=Object.keys(i).filter(F=>!eo.has(F));return a(i,[[I,io]])},showWhenFacts:oo};export{yo as ProductGridFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{headerKeysOfPlace as P,LAYOUT_FIELD_KEYS as b,SECTION_THEME_FIELD_KEYS as L,SECTION_SHAPE_FIELD_KEYS as F,SECTION_ANIM_FIELD_KEYS as R}from"efficient-web-builder/editor/lib/document/field-groups";import{getWheelBySlug as I}from"../../../../../../render/lib/wheels/wheels.js";import A from"../../../../../components/SpecTableSource.js";import{ProductFieldIcon as N,FinishIcon as E,DiagramIcon as C}from"efficient-easel/icons";import{DisplayRow as B,toggle as u,text as H,textarea as g,sourceField as Y,plainText as d}from"efficient-web-builder/editor/lib/document/controls";import{group as i}from"efficient-easel/screen/lib/document/box-fields";import{select as f}from"efficient-web-builder/editor/lib/document/box-fields";import{isEditorOnDynamicPage as x}from"efficient-web-builder/format/lib/document/editor-page-context";import{headFieldsForPlacement as U,SPLITTABLE_SECTIONS as K}from"efficient-web-builder/format/lib/sections/section-head-placement";import{truthy as m,withRowRules as h}from"efficient-web-builder/render/lib/document/show-when";import{BOUND_TO_THE_RECORD as W,BOUND_TO_THE_RECORD_ROW as S,OFF_TYRE_TEMPLATE_FACTS as v,ON_DYNAMIC_PAGE_ROW as M,ON_TYRE_TEMPLATE_ROW as j,PAGE_FACTS as z}from"../page-rules.js";import{SPECTABLE_PH as c,SpecTableSlots as k}from"../../../../../../render/lib/document/blocks/commerce/SpecTable/meta.js";const G="Size (blank = none selected)",V=[{id:"euLabel",label:"EU tyre label"}],Z=new Set([...P("Content"),"_gDynamic","dynamic","_gHeader","num","title","description","_gDiagram","showDiagram","showEuLabel","template",...b,...L,...F,...R]),q={not:W},_={any:[{all:[m("source.slug"),m("source.spec")]},{all:[{not:m("source.slug")},m("wheel")]}]},me={fields:h({...k,_gDynamic:i("Product page"),dynamic:u("Connect to product data",!1,r(N,{})),_gHeader:i("Header"),num:H("Number",c.num),title:g("Heading",c.title),description:g("Body",c.description),_gData:i("Product"),source:Y(A),finish:f("Finish",r(E,{}),[],""),size:{type:"text",label:G},_gDiagram:i("Diagram"),showDiagram:u("Dimension diagram",!0,r(C,{})),showEuLabel:{type:"custom",render:({value:e,onChange:l})=>r(B,{parts:V,changed:e===!0,shown:()=>e===!0,onPress:(T,o)=>l(o),onReset:()=>l(!1)})},_gRows:i("Rows"),rows:{type:"array",label:"Rows",arrayFields:{label:d("Label"),value:d("Value")},defaultItemProps:{label:"Label",value:""},getItemSummary:e=>e?.label||e?.value||"Row"}},[[["_gDynamic","dynamic"],M],[["finish","size"],_],[["_gDiagram","showDiagram"],{any:[S,_]}],[["_gRows","rows"],{not:_}],[["showEuLabel"],{all:[S,j]}]]),resolveFields:(e,{fields:l,parent:T})=>{const o=e.props,D=x(),y=t=>U(t,e.props.headPlacement,K.SpecTable.headRows),s=o.source,p=!s?.slug&&typeof o.wheel=="string"?o.wheel:"";let n=l;if(!(D&&o.dynamic)&&(s?.slug&&s.spec||p)){const t=s?.slug?s.finishes.map(a=>a.name):(I(p)?.finishes??[]).map(a=>a.name),w=[{value:"",label:"Default (first finish)"},...t.map(a=>({value:a,label:a}))];n={...n,finish:f("Finish",r(E,{}),w,"")}}const O=Object.keys(n).filter(t=>!Z.has(t));return y(h(n,[[O,q]]))},showWhenFacts:{...z,...v}};export{me as SpecTableFields};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t={fields:{}};export{t as StockFitmentFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const commerceBlocks: Record<"AlloyWheelsListing" | "ProductGrid" | "CatalogFilterBar" | "ProductPrice" | "Gallery" | "GalleryB" | "Header" | "ProductHero" | "SpecTable" | "SearchBlock" | "CountrySwitchBlock" | "ThemeSwitchBlock" | "AccountBlock" | "CartBlock" | "Collections" | "CollectionCard" | "ProductRef" | "GalleryItem" | "BundleOffer" | "CompatibleTyres" | "DeliveryOptions" | "
|
|
1
|
+
export declare const commerceBlocks: Record<"AlloyWheelsListing" | "ProductGrid" | "CatalogFilterBar" | "StockFitment" | "ProductPrice" | "Gallery" | "GalleryB" | "Header" | "ProductHero" | "SpecTable" | "DetailRows" | "SearchBlock" | "CountrySwitchBlock" | "ThemeSwitchBlock" | "AccountBlock" | "CartBlock" | "Collections" | "CollectionCard" | "ProductRef" | "GalleryItem" | "BundleOffer" | "CompatibleTyres" | "DeliveryOptions" | "FitmentFinder" | "FitmentTable" | "RelatedProducts" | "TyreFitment" | "TyreSizes" | "EuTyreLabel" | "CheckoutCTA" | "EuTyreLabelBlock" | "ProductGallery" | "ProductSize" | "ProductColour" | "FitmentPicker", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assembleBlocks as o}from"efficient-web-builder/format/lib/document/blocks/block-types";import{AccountBlockFields as r}from"./AccountBlock/fields.js";import{AlloyWheelsListingFields as e}from"./AlloyWheelsListing/fields.js";import{BundleOfferFields as i}from"./BundleOffer/fields.js";import{CartBlockFields as
|
|
1
|
+
import{assembleBlocks as o}from"efficient-web-builder/format/lib/document/blocks/block-types";import{AccountBlockFields as r}from"./AccountBlock/fields.js";import{AlloyWheelsListingFields as e}from"./AlloyWheelsListing/fields.js";import{BundleOfferFields as i}from"./BundleOffer/fields.js";import{CartBlockFields as t}from"./CartBlock/fields.js";import{CatalogFilterBarFields as l}from"./CatalogFilterBar/fields.js";import{CheckoutCTAFields as m}from"./CheckoutCTA/fields.js";import{CollectionCardFields as d}from"./CollectionCard/fields.js";import{CollectionsFields as c}from"./Collections/fields.js";import{CompatibleTyresFields as s}from"./CompatibleTyres/fields.js";import{CountrySwitchBlockFields as F}from"./CountrySwitchBlock/fields.js";import{DeliveryOptionsFields as p}from"./DeliveryOptions/fields.js";import{DetailRowsFields as f}from"./DetailRows/fields.js";import{EuTyreLabelFields as a}from"./EuTyreLabel/fields.js";import{EuTyreLabelBlockFields as u}from"./EuTyreLabelBlock/fields.js";import{FitmentFinderFields as n}from"./FitmentFinder/fields.js";import{FitmentPickerFields as y}from"./FitmentPicker/fields.js";import{FitmentTableFields as C}from"./FitmentTable/fields.js";import{GalleryFields as k}from"./Gallery/fields.js";import{GalleryBFields as B}from"./GalleryB/fields.js";import{GalleryItemFields as P}from"./GalleryItem/fields.js";import{HeaderFields as T}from"./Header/fields.js";import{ProductGalleryFields as S}from"./ProductGallery/fields.js";import{ProductGridFields as h}from"./ProductGrid/fields.js";import{ProductHeroFields as b}from"./ProductHero/fields.js";import{ProductRefFields as E}from"./ProductRef/fields.js";import{RelatedProductsFields as G}from"./RelatedProducts/fields.js";import{SearchBlockFields as R}from"./SearchBlock/fields.js";import{SpecTableFields as L}from"./SpecTable/fields.js";import{ThemeSwitchBlockFields as w}from"./ThemeSwitchBlock/fields.js";import{TyreFitmentFields as A}from"./TyreFitment/fields.js";import{TyreSizesFields as D}from"./TyreSizes/fields.js";import{ProductSizeFields as O}from"./ProductSize/fields.js";import{ProductColourFields as g}from"./ProductColour/fields.js";import{ProductPriceFields as z}from"./ProductPrice/fields.js";import{StockFitmentFields as H}from"./StockFitment/fields.js";import{COMMERCE_RENDERS as M}from"../../../../../render/lib/document/blocks/commerce/renders.js";const I={AccountBlock:r,AlloyWheelsListing:e,BundleOffer:i,CartBlock:t,CatalogFilterBar:l,CheckoutCTA:m,CollectionCard:d,Collections:c,CompatibleTyres:s,CountrySwitchBlock:F,DeliveryOptions:p,DetailRows:f,EuTyreLabel:a,EuTyreLabelBlock:u,FitmentFinder:n,FitmentTable:C,Gallery:k,GalleryB:B,GalleryItem:P,Header:T,ProductGallery:S,ProductGrid:h,ProductHero:b,ProductRef:E,RelatedProducts:G,SearchBlock:R,SpecTable:L,ThemeSwitchBlock:w,TyreFitment:A,TyreSizes:D,ProductSize:O,ProductColour:g,ProductPrice:z,FitmentPicker:y,StockFitment:H},So=o(M,I);export{So as commerceBlocks};
|
|
@@ -8,3 +8,8 @@ export declare const BOUND_TO_THE_RECORD: ShowWhenRule;
|
|
|
8
8
|
export declare const BOUND_TO_THE_RECORD_ROW: ShowWhenRule;
|
|
9
9
|
export declare const DRAWS_OTHER_RECORD: ShowWhenRule;
|
|
10
10
|
export declare const PAGE_FACTS: BlockShowWhenFacts;
|
|
11
|
+
export declare function editorOnTyreTemplate(appState: unknown): boolean;
|
|
12
|
+
export declare const ON_TYRE_TEMPLATE: ShowWhenRule;
|
|
13
|
+
export declare const ON_TYRE_TEMPLATE_ROW: ShowWhenRule;
|
|
14
|
+
export declare const TYRE_TEMPLATE_FACTS: BlockShowWhenFacts;
|
|
15
|
+
export declare const OFF_TYRE_TEMPLATE_FACTS: BlockShowWhenFacts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{truthy as
|
|
1
|
+
import{truthy as a}from"efficient-web-builder/render/lib/document/show-when";import{editorTemplateProductKind as T,isEditorOnDynamicPage as o}from"efficient-web-builder/format/lib/document/editor-page-context";import{editorPageDrawsOtherRecord as c}from"../../../../../render/lib/document/current-record.js";const r={context:"dynamicPage",is:!0},i={not:r},p={not:{context:"offDynamicPage",is:!0}},n=a("dynamic"),x={all:[r,n]},R={all:[p,n]},d={context:"drawsOtherRecord",is:!0},m={offDynamicPage:()=>!o(),drawsOtherRecord:(e,t)=>c(t)};function _(e){if(!o())return!1;const t=e?.data?.root;return T(t?.props)==="tyre"}const A={context:"tyreTemplate",is:!0},f={not:{context:"offTyreTemplate",is:!0}},D={tyreTemplate:(e,{appState:t})=>_(t)},P={offTyreTemplate:(e,{appState:t})=>!_(t)};export{x as BOUND_TO_THE_RECORD,R as BOUND_TO_THE_RECORD_ROW,d as DRAWS_OTHER_RECORD,n as DYNAMIC_ON,i as OFF_DYNAMIC_PAGE,P as OFF_TYRE_TEMPLATE_FACTS,r as ON_DYNAMIC_PAGE,p as ON_DYNAMIC_PAGE_ROW,A as ON_TYRE_TEMPLATE,f as ON_TYRE_TEMPLATE_ROW,m as PAGE_FACTS,D as TYRE_TEMPLATE_FACTS,_ as editorOnTyreTemplate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ArticleBodySlots as o}from"../../../../../../render/lib/document/blocks/service/ArticleBody/meta.js";const e={fields:{...o}};export{e as ArticleBodyFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{chromeOwnWidthFields as o}from"efficient-web-builder/editor/lib/document/section-own-width-fields";import{SiteFooterSlots as t}from"../../../../../../render/lib/document/blocks/service/SiteFooter/meta.js";const s={fields:{...o(),sections:t.sections}};export{s as SiteFooterFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{chromeOwnWidthFields as a}from"efficient-web-builder/editor/lib/document/section-own-width-fields";import{CaseIcon as r,ContrastIcon as i,HeightIcon as s,LayoutIcon as n,StickyIcon as m}from"efficient-easel/icons";import{sectionThemeFields as c}from"efficient-web-builder/editor/lib/document/controls";import{segmented as o,slider as p}from"efficient-web-builder/editor/lib/document/box-fields";import{HEADER_THEME_FOLLOW as u,resolveHeaderTheme as d}from"../../../../../../render/lib/content/header-theme.js";import{HEADER_HEIGHT_PX as l}from"efficient-web-builder/render/lib/document/header-clearance";import{SiteHeaderSlots as h}from"../../../../../../render/lib/document/blocks/service/SiteHeader/meta.js";const{sectionAccent:v}=c(t=>d(t)??u,"Follow the site theme"),_={fields:{heightPx:p("Height",e(s,{}),l.min,l.max,2,l.default,"px"),...a(),sectionAccent:v,topTextColor:o("Text color at the top",e(i,{}),[{label:"Auto",value:"auto"},{label:"Light",value:"light"},{label:"Dark",value:"dark"}],"auto"),navTextCase:o("Letters",e(r,{}),[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],"uppercase"),menuRow:o("Menu row",e(n,{}),[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],"top"),sticky:o("Sticky header",e(m,{}),[{label:"None",value:"none"},{label:"Always",value:"always"},{label:"On scroll up",value:"on_scroll_up"}],"always"),sections:h.sections}};export{_ as SiteHeaderFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const serviceBlocks: Record<"Form" | "Reviews" | "Footer" | "FooterGroup" | "Events" | "MenuLinkBlock" | "FooterMenu" | "SiteHeader" | "SiteFooter" | "AppointmentBooking" | "BookingBox" | "SubmitBuild" | "SubmitBox" | "FooterLogo" | "FooterDivider" | "FooterText" | "FooterEmailSignup" | "FooterSocial" | "FooterPayment" | "Subscribe" | "OpeningHours" | "RateTable" | "MessagingCards" | "FooterMessaging" | "ReviewForm" | "ContactRouting" | "LegalLineBlock" | "ContactCards" | "RatingBlock" | "SubscribeBlogs", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
1
|
+
export declare const serviceBlocks: Record<"Form" | "Reviews" | "Footer" | "FooterGroup" | "Events" | "MenuLinkBlock" | "ArticleBody" | "FooterMenu" | "SiteHeader" | "SiteFooter" | "AppointmentBooking" | "BookingBox" | "SubmitBuild" | "SubmitBox" | "FooterLogo" | "FooterDivider" | "FooterText" | "FooterEmailSignup" | "FooterSocial" | "FooterPayment" | "Subscribe" | "OpeningHours" | "RateTable" | "MessagingCards" | "FooterMessaging" | "ReviewForm" | "ContactRouting" | "LegalLineBlock" | "ContactCards" | "RatingBlock" | "SubscribeBlogs", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assembleBlocks as o}from"efficient-web-builder/format/lib/document/blocks/block-types";import{SITE_FOOTER_TYPE as i,SITE_HEADER_TYPE as r}from"efficient-web-builder/format/lib/document/section-groups";import{AppointmentBookingFields as e}from"./AppointmentBooking/fields.js";import{BookingBoxFields as t}from"./BookingBox/fields.js";import{ContactRoutingFields as m}from"./ContactRouting/fields.js";import{EventsFields as s}from"./Events/fields.js";import{FooterFields as F}from"./Footer/fields.js";import{FooterDividerFields as l}from"./FooterDivider/fields.js";import{FooterEmailSignupFields as p}from"./FooterEmailSignup/fields.js";import{FooterGroupFields as
|
|
1
|
+
import{assembleBlocks as o}from"efficient-web-builder/format/lib/document/blocks/block-types";import{SITE_FOOTER_TYPE as i,SITE_HEADER_TYPE as r}from"efficient-web-builder/format/lib/document/section-groups";import{AppointmentBookingFields as e}from"./AppointmentBooking/fields.js";import{BookingBoxFields as t}from"./BookingBox/fields.js";import{ContactRoutingFields as m}from"./ContactRouting/fields.js";import{EventsFields as s}from"./Events/fields.js";import{FooterFields as F}from"./Footer/fields.js";import{FooterDividerFields as l}from"./FooterDivider/fields.js";import{FooterEmailSignupFields as p}from"./FooterEmailSignup/fields.js";import{FooterGroupFields as d}from"./FooterGroup/fields.js";import{FooterLogoFields as n}from"./FooterLogo/fields.js";import{FooterMenuFields as f}from"./FooterMenu/fields.js";import{ArticleBodyFields as a}from"./ArticleBody/fields.js";import{FooterSocialFields as g}from"./FooterSocial/fields.js";import{FooterPaymentFields as c}from"./FooterPayment/fields.js";import{FooterTextFields as u}from"./FooterText/fields.js";import{FormFields as B}from"./Form/fields.js";import{LegalLineBlockFields as S}from"./LegalLineBlock/fields.js";import{MenuLinkBlockFields as E}from"./MenuLinkBlock/fields.js";import{OpeningHoursFields as R}from"./OpeningHours/fields.js";import{RateTableFields as b}from"./RateTable/fields.js";import{MessagingCardsFields as k}from"./MessagingCards/fields.js";import{FooterMessagingFields as C}from"./FooterMessaging/fields.js";import{ContactCardsFields as v}from"./ContactCards/fields.js";import{RatingBlockFields as L}from"./RatingBlock/fields.js";import{ReviewFormFields as T}from"./ReviewForm/fields.js";import{ReviewsFields as M}from"./Reviews/fields.js";import{SiteFooterFields as x}from"./SiteFooter/fields.js";import{SiteHeaderFields as _}from"./SiteHeader/fields.js";import{SubmitBoxFields as A}from"./SubmitBox/fields.js";import{SubmitBuildFields as D}from"./SubmitBuild/fields.js";import{SubscribeFields as I}from"./Subscribe/fields.js";import{SubscribeBlogsFields as w}from"./SubscribeBlogs/fields.js";import{SERVICE_RENDERS as y}from"../../../../../render/lib/document/blocks/service/renders.js";const H={AppointmentBooking:e,BookingBox:t,ContactRouting:m,Events:s,Footer:F,FooterDivider:l,FooterEmailSignup:p,FooterGroup:d,FooterLogo:n,FooterMenu:f,ArticleBody:a,FooterSocial:g,FooterPayment:c,FooterText:u,Form:B,LegalLineBlock:S,MenuLinkBlock:E,OpeningHours:R,RateTable:b,MessagingCards:k,FooterMessaging:C,ContactCards:v,RatingBlock:L,ReviewForm:T,Reviews:M,[i]:x,[r]:_,SubmitBox:A,SubmitBuild:D,Subscribe:I,SubscribeBlogs:w},Bo=o(y,H);export{Bo as serviceBlocks};
|
|
@@ -39,7 +39,7 @@ export declare function boxHeaderFromRow(row: HeaderRowForBox, make: MakeNode, g
|
|
|
39
39
|
menuRow?: import("../../../render/lib/content/header-bar.js").HeaderMenuRow | undefined;
|
|
40
40
|
navTextCase?: "uppercase" | "capitalised" | undefined;
|
|
41
41
|
sectionAccent?: number | undefined;
|
|
42
|
-
|
|
42
|
+
sectionContentWidth?: string | undefined;
|
|
43
43
|
heightPx?: number | undefined;
|
|
44
44
|
sticky: "none" | "always" | "on_scroll_up";
|
|
45
45
|
topTextColor: "light" | "dark" | "auto";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveMenuRow as y}from"../../../render/lib/content/header-bar.js";import{resolveHeaderTheme as M}from"../../../render/lib/content/header-theme.js";import{buildSectionGroup as P,SITE_HEADER_TYPE as
|
|
1
|
+
import{SECTION_WIDTH_KEYS as E}from"efficient-web-builder/format/lib/content/section-width";import{resolveMenuRow as y}from"../../../render/lib/content/header-bar.js";import{resolveHeaderTheme as M}from"../../../render/lib/content/header-theme.js";import{buildSectionGroup as P,SITE_HEADER_TYPE as I}from"efficient-web-builder/format/lib/document/section-groups";import{resolveCountryShowAs as D}from"../../../render/lib/content/country-show-as.js";import{templateOnInsert as F}from"efficient-web-builder/format/lib/content/card-template";import"../../../render/lib/document/card-templates.js";const A="Flex",v=10;function N(e,n,R,{logoHeightPx:a}={}){const s=e.util_style==="text"?"text":"icon",u={...e.menu?{id:e.menu}:{},...e.menu_handle?{handle:e.menu_handle}:{},...e.menu_name?{name:e.menu_name}:{},items:(e.menu_items??[]).map(({label:t,url:o,dropdown_items:l})=>({label:t,url:o,...l?.length?{dropdown_items:l.map(b=>({label:b.label,url:b.url}))}:{}}))},p=e.search_enabled?n("SearchBlock",{style:s}):null,m=e.search_position==="left",c=[m?p:null,e.country_selector_enabled?n("CountrySwitchBlock",{showAs:D(e.country_selector_show_as)}):null,n("ThemeSwitchBlock"),e.account_enabled!==!1?n("AccountBlock",{style:s}):null,e.cart_enabled!==!1?n("CartBlock",{style:s}):null,m?null:p].filter(t=>t!==null),_=n("LogoBlock",{...a?{heightPx:a}:{},...e.reverse_logo!=null?{reverse:e.reverse_logo?"auto":"off"}:{}}),i=t=>{const o=n("MenuBlock",{menu:u,direction:"row",...t}),l=F("MenuBlock",o.props);return l===o.props?o:{...o,props:l}},T=y(e.menu_row)==="inline"?32:20,h=t=>n(A,{direction:"row",justify:"end",align:"center",share:"content",wrap:"nowrap",phoneRow:3,gap:T,content:t}),r=Math.min(Math.max(e.menu_split??3,1),4),g=e.logo_position==="center"&&u.items.length>r,d=e.menu_position==="center"?"center":e.menu_position==="beside"?"left":"right",k=!g&&d==="left"?e.menu_gap_px??32:32,S=g?[i({linkAlign:"left",linkRange:{from:1,to:r}}),_,h([i({linkAlign:"right",linkRange:{from:r+1}}),...c])]:[_,i({linkAlign:d}),...c.length?[h(c)]:[]],C=n(A,{direction:"row",justify:"between",align:"center",share:"content",wrap:"nowrap",phoneRow:3,sectionPaddingTop:v,sectionPaddingBottom:v,gap:k,content:S}),f=P(I,R,[C]),x=M(e.theme),B=y(e.menu_row);return{...f,props:{...f.props,sticky:e.sticky??"always",topTextColor:e.top_text_color??"auto",...e.height_px!=null?{heightPx:e.height_px}:{},...e.width==="full"?{[E.content]:"full"}:{},...x!==null?{sectionAccent:x}:{},...e.nav_text_case?{navTextCase:e.nav_text_case}:{},...B?{menuRow:B}:{}}}}export{N as boxHeaderFromRow};
|
|
@@ -4,6 +4,7 @@ import "../../../render/lib/document/slot-seeds.js";
|
|
|
4
4
|
import "../../../render/lib/document/card-templates.js";
|
|
5
5
|
import "../../../render/lib/document/section-to-box-rows-reviews.js";
|
|
6
6
|
import "../../../render/lib/document/section-to-box-rows-spec.js";
|
|
7
|
+
import "../../../render/lib/document/section-to-box-rows-detail.js";
|
|
7
8
|
import "./section-text-regions.js";
|
|
8
9
|
export declare const subscribePopupFields: {
|
|
9
10
|
_gBehaviour: import("efficient-easel/screen/lib/document/box-fields").BoxField<undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as l,Fragment as x,jsxs as N}from"react/jsx-runtime";import{assignSectionGroups as H,reseatBucketTabs as M}from"efficient-web-builder/editor/lib/document/field-groups";import{buildBlockCategories as G}from"efficient-web-builder/format/lib/document/section-catalog";import{FONT_ROLES as U,FONT_ROLE_LABELS as K}from"efficient-web-builder/format/lib/fonts";import{CONTAINER_DIRECTION_LABELS as B}from"efficient-web-builder/format/lib/content/container-direction";import{SITE_FOOTER_TYPE as W,SITE_HEADER_TYPE as j}from"efficient-web-builder/format/lib/document/section-groups";import Y from"../../components/MenuLinkRangeField.js";import q from"../../components/EditorPreviewChat.js";import z from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as V,POPUP_DAYS_RANGE as k,POPUP_DELAY_RANGE as E,POPUP_HIDE_AFTER as X,POPUP_SCROLL_RANGE as F,POPUP_SHOW_ON as Q,POPUP_TRIGGERS as O,SUBSCRIBE_POPUP_DEFAULTS as J,SUBSCRIBE_POPUP_KIND as Z}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as b,withRowRules as $}from"efficient-web-builder/render/lib/document/show-when";import{POPUP_KIND_PROP as ee,POPUP_TEXT_KIND_LABELS as _,POPUP_TEXT_KINDS as te}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as oe}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as re}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as ie}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as ae,CART_DRAWER_KIND as L}from"efficient-web-builder/format/lib/content/cart-drawer";import{CONSENT_BANNER_KIND as C}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as le}from"../../components/ConsentBannerLayoutTiles.js";import{CategoryIcon as ne,CheckIcon as se,ClockIcon as f,ColumnsIcon as ce,DirectionIcon as me,EyeIcon as ue,ListIcon as de,PageIcon as pe,PlacementIcon as ge,ScrollPointIcon as Pe,TriggerIcon as be}from"efficient-easel/icons";import{deviceField as v}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as fe}from"efficient-web-builder/editor/components/FieldGlyph";import{multiSelect as Se,panelNote as he,plainText as a,plainTextarea as u,sectionShapeFields as Te,sectionThemeFields as ye,textList as S,toggle as R}from"efficient-web-builder/editor/lib/document/controls";import{group as c}from"efficient-easel/screen/lib/document/box-fields";import{segmented as p,select as A,slider as h}from"efficient-web-builder/editor/lib/document/box-fields";import{blockAlignRow as Be}from"./block-align-row.js";import{formPicker as ke}from"./blocks/service/controls.js";import{SECTION_THEME_FOLLOW_LABEL as Ee}from"efficient-web-builder/editor/components/SectionThemePicker";import{nestedAccentValue as Fe}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as Oe}from"efficient-web-builder/format/lib/document/editor-page-context";import{TEMPLATE_PRODUCT_TYPE_PROP as _e}from"efficient-web-builder/format/lib/content/product-page";import{PRODUCT_KIND_OPTIONS as Le}from"../../../render/lib/catalog/plp-item.js";import{PH as T}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{textKindGlyph as Ce}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";import"../efficient-backend.js";import"../../../render/lib/document/slot-seeds.js";import"../../../render/lib/document/card-templates.js";import"../../../render/lib/document/section-to-box-rows-reviews.js";import"../../../render/lib/document/section-to-box-rows-spec.js";import"./section-text-regions.js";import{generalBlocks as e}from"efficient-web-builder/editor/lib/document/blocks/general/index";import{commerceBlocks as o}from"./blocks/commerce/index.js";import{serviceBlocks as i}from"./blocks/service/index.js";import{EditorThemedBody as ve,suppressPreviewNav as Re}from"efficient-web-builder/editor/lib/document/page-root";import Ae from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as De,PAGE_MENU_DIRECTION_DEFAULT as we}from"../../../render/lib/document/footer-page-blocks.js";import{drawPopupPage as Ie,drawPublishedStorefrontRoot as xe,drawSystemPage as Ne,StorefrontPageProviders as He}from"../../../render/lib/document/storefront-root.js";import{GENERAL_ROOT_FIELDS as Me}from"efficient-web-builder/editor/lib/document/page-root-fields";import{finishRegistry as Ge}from"efficient-web-builder/editor/lib/document/registry";const Ue="Newsletter (built in)",Yt=[{value:"00",label:T.label},{value:"00",label:T.label},{value:"00",label:T.label}],t=J,g={field:"autoOpen",is:!0},Ke={all:[b("hideAfter",X,t.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},We=[[["trigger","showOn","hideAfter"],g],[["autoOpenDelaySec"],{all:[g,b("trigger",O,t.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[g,b("trigger",O,t.trigger,["scroll"])]}],[["showOnPages"],{all:[g,b("showOn",Q,t.showOn,["chosen"])]}],[["hideDays"],{all:[g,Ke]}]],je=$({formSlug:ke(void 0,Ue),_gLeft:c("Left panel"),metaLabel:a("Meta label",t.metaLabel),issueLabel:a("Issue label",t.issueLabel),issueNumber:a("Issue number",t.issueNumber),kicker:a("Eyebrow",t.kicker),heading:u("Heading",t.heading),deck:u("Deck",t.deck),stats:{type:"array",label:"Stats",arrayFields:{label:a("Label"),value:a("Value")},getItemSummary:r=>r?.label||r?.value||"Stat"},_gForm:c("Right panel · form"),formLabel:a("Section label",t.formLabel),formHeading:a("Heading",t.formHeading),formIntro:u("Intro",t.formIntro),firstNameLabel:a("First-name label",t.firstNameLabel),firstNamePlaceholder:a("First-name placeholder",t.firstNamePlaceholder),emailLabel:a("Email label",t.emailLabel),emailPlaceholder:a("Email placeholder",t.emailPlaceholder),_gChoices:c("Right panel · choices"),interestsLabel:a("Interests label",t.interestsLabel),interests:S("Interest chips",l(fe,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:a("Frequency label",t.frequencyLabel),frequencies:S("Frequency options",l(de,{}),"Option label","verbatim"),_gActions:c("Right panel · actions"),submitText:a("Submit button",t.submitText),finePrint:a("Fine print",t.finePrint),dismissText:a("Dismiss link",t.dismissText),emailInvalidText:a("Invalid-email error",t.emailInvalidText),submitErrorText:a("Submit-failed error",t.submitErrorText),_gSuccess:c("Success state"),successHeading:a("Heading",t.successHeading),successBody:u("Message",t.successBody),keepBrowsingText:a("Dismiss button",t.keepBrowsingText),...ye(Fe,Ee),...Te(),_gTextStyle:c("Text style"),...Object.fromEntries(te.map(r=>[ee[r],A(_[r],Ce(_[r]),[{label:"Popup's own",value:""},...U.map(n=>({label:K[n],value:n}))],"")])),_gBehaviour:c("Behavior"),autoOpen:R("Show by itself",t.autoOpen,l(ue,{})),trigger:p("Trigger",l(be,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],t.trigger),autoOpenDelaySec:h("Delay",l(f,{}),E.min,E.max,1,t.autoOpenDelaySec,"s"),scrollPercent:h("Scroll",l(Pe,{}),F.min,F.max,5,t.scrollPercent,"%"),showOn:p("Pages",l(pe,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],t.showOn),showOnPages:Se("Chosen pages",[],"None"),hideAfter:p("After close",l(f,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],t.hideAfter),hideDays:h("Days",l(f,{}),k.min,k.max,1,t.hideDays),_gArrangement:c("Arrangement"),formSide:p("Form side",l(ge,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],t.formSide),_gPhone:v("mobile",c("On a phone")),valuePanelOnPhone:v("mobile",R("Left panel",t.valuePanelOnPhone,l(ce,{})))},We),D=H(je,"SubscribePopup");async function Ye(){return(await oe(ie()??"")).filter(n=>!V(n.slug)).map(n=>({label:n.label,value:re(n.slug)}))}async function qe(){return M({...D,showOnPages:{...D.showOnPages,options:await Ye().catch(()=>[])}})}const m=ae,ze={_gHeader:c("Header"),kickerBadge:a("Eyebrow badge",m.kickerBadge),kickerText:a("Eyebrow text",m.kickerText),titleLead:a("Heading",m.titleLead),titleAccent:a("Heading accent",m.titleAccent),subtitleEmpty:u("Sub-line · empty",m.subtitleEmpty),subtitleOne:u("Sub-line · one set",m.subtitleOne),subtitleMany:u("Sub-line · several sets",m.subtitleMany,"{count} becomes the number of sets"),_gStatus:c("Status rail"),leadTimeValue:a("Lead time",m.leadTimeValue),shipsToFallback:a("Ships to · fallback",m.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:c("Promise row"),promises:S("Trust markers",l(se,{}),"Marker","verbatim"),_gEmpty:c("Empty basket"),emptyKicker:a("Eyebrow",m.emptyKicker),emptyBody:u("Message",m.emptyBody)},Ve={layout:le,_nConsentWhere:he("The banner's words follow each visitor's country. Turn consent on or off, and pick the privacy page, in Admin › Storefront › Marketing › Privacy.")};function Xe({kind:r}){return l("div",{style:{padding:"14px 18px",fontFamily:"var(--font-mono, monospace)",fontSize:12,letterSpacing:"0.18em",textTransform:"uppercase",color:"var(--fg-dim)",borderBottom:"1px solid var(--site-line)"},children:r===L?"This is the cart drawer — edit its copy in the Settings panel →":r===C?"This is the cookie banner — pick its layout in the Settings panel →":"This is the site popup — edit it in the Settings panel →"})}const P={root:{fields:{...Me},resolveFields:async(r,{fields:n})=>{if(r?.props?.kind===Z)return qe();if(r?.props?.kind===L)return ze;if(r?.props?.kind===C)return Ve;const s=n;return Oe()?{[_e]:A("Product type",l(ne,{}),Le,"alloy-wheel"),...s}:s},render:r=>{const{editor:n,pageBackground:s,theme:d,fonts:w}=r;if(!n?.isEditing)return xe(r);const y=Ne(r,l(Xe,{kind:r.kind}));if(y)return y;const I=Ie(r,!0);return l(ve,{propsTheme:d,propsFonts:w,pageBackground:typeof s=="string"?s:void 0,suppressPreviewNav:Re,overlay:N(x,{children:[l(q,{}),l(z,{})]}),children:I??l(He,{rootProps:r,children:r.children})})}},categories:G(),components:{Heading:e.Heading,Text:e.Text,Eyebrow:e.Eyebrow,ImageBlock:e.ImageBlock,LogoBlock:e.LogoBlock,ButtonBlock:e.ButtonBlock,Spacer:e.Spacer,Divider:e.Divider,Grid:e.Grid,Flex:e.Flex,Breadcrumb:e.Breadcrumb,Masthead:e.Masthead,CategoryBar:e.CategoryBar,FeaturedCover:e.FeaturedCover,LongRead:e.LongRead,Series:e.Series,Subscribe:i.Subscribe,SubscribeBlogs:i.SubscribeBlogs,Banner:e.Banner,ParagraphsA:e.ParagraphsA,StatsParagraph:e.StatsParagraph,Timeline:e.Timeline,Footprint:e.Footprint,TimelineTrack:e.TimelineTrack,TitleWithButtons:e.TitleWithButtons,Stats:e.Stats,Integrations:e.Integrations,Mockup:e.Mockup,Chart:e.Chart,KeyFeatures:e.KeyFeatures,Testimonials:e.Testimonials,Reviews:i.Reviews,RatingBlock:i.RatingBlock,Prose:e.Prose,Cards:e.Cards,Logos:e.Logos,Ticker:e.Ticker,ContactRouting:i.ContactRouting,ContactLocations:e.ContactLocations,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:o.Collections,CollectionCard:o.CollectionCard,Events:i.Events,RateTable:i.RateTable,MessagingCards:i.MessagingCards,ContactCards:i.ContactCards,OpeningHours:i.OpeningHours,PostCard:e.PostCard,DocMetaCards:e.DocMetaCards,DocTabs:e.DocTabs,DocMasthead:e.DocMasthead,DocBody:e.DocBody,Contents:e.Contents,FAQ:e.FAQ,Gallery:o.Gallery,GalleryB:o.GalleryB,SpecStrip:e.SpecStrip,GalleryItem:o.GalleryItem,Manifesto:e.Manifesto,SectionHeader:e.SectionHeader,IntroBleed:e.IntroBleed,Split:e.Split,SubmitBuild:i.SubmitBuild,SubmitBox:i.SubmitBox,ReviewForm:i.ReviewForm,Form:i.Form,AppointmentBooking:i.AppointmentBooking,BookingBox:i.BookingBox,CatalogFilterBar:o.CatalogFilterBar,AlloyWheelsListing:o.AlloyWheelsListing,ProductGrid:o.ProductGrid,ProductHero:o.ProductHero,ProductGallery:o.ProductGallery,SpecTable:o.SpecTable,ProcessSteps:e.ProcessSteps,DetailRows:o.DetailRows,FitmentTable:o.FitmentTable,RelatedProducts:o.RelatedProducts,BundleOffer:o.BundleOffer,CompatibleTyres:o.CompatibleTyres,TyreSizes:o.TyreSizes,TyreFitment:o.TyreFitment,EuTyreLabel:o.EuTyreLabel,EuTyreLabelBlock:o.EuTyreLabelBlock,ProductSize:o.ProductSize,ProductColour:o.ProductColour,ProductPrice:o.ProductPrice,FitmentFinder:o.FitmentFinder,OrderSummary:e.OrderSummary,DeliveryOptions:o.DeliveryOptions,PaymentBadges:e.PaymentBadges,CheckoutCTA:o.CheckoutCTA,ProductRef:o.ProductRef,CustomHTML:e.CustomHTML,Header:o.Header,Footer:i.Footer,FooterLogo:i.FooterLogo,FooterMenu:i.FooterMenu,MenuLinkBlock:i.MenuLinkBlock,FooterDivider:i.FooterDivider,FooterGroup:i.FooterGroup,FooterText:i.FooterText,FooterEmailSignup:i.FooterEmailSignup,FooterSocial:i.FooterSocial,FooterMessaging:i.FooterMessaging,FooterPayment:i.FooterPayment,LegalLineBlock:i.LegalLineBlock,SearchBlock:o.SearchBlock,CartBlock:o.CartBlock,CountrySwitchBlock:o.CountrySwitchBlock,AccountBlock:o.AccountBlock,ThemeSwitchBlock:o.ThemeSwitchBlock,[j]:i.SiteHeader,[W]:i.SiteFooter}};De(P.components);{const r=P.components.MenuBlock;r.fields={...r.fields,direction:p("Direction",l(me,{}),[{label:B.column,value:"column"},{label:B.row,value:"row"}],we)};const n={type:"custom",render:({value:s,onChange:d})=>l(Y,{value:s,onChange:d})};r.fields=Object.fromEntries(Object.entries(r.fields).flatMap(([s,d])=>s==="menu"?[[s,d],["linkRange",n]]:[[s,d]])),r.fields={...r.fields,linkAlign:Be({label:"Link alignment"})}}{const r=P.components.Header,n=r.render;r.render=s=>s.editor?.isEditing?l(Ae,{editing:!0}):n(s)}const Qe=Ge(P),qt=Qe.sectionGroupAllow;var zt=P;export{qt as SECTION_GROUP_ALLOW,P as config,zt as default,je as subscribePopupFields};
|
|
1
|
+
import{jsx as l,Fragment as G,jsxs as U}from"react/jsx-runtime";import{assignSectionGroups as k,reseatBucketTabs as F}from"efficient-web-builder/editor/lib/document/field-groups";import{buildBlockCategories as K}from"efficient-web-builder/format/lib/document/section-catalog";import{FONT_ROLES as W,FONT_ROLE_LABELS as j}from"efficient-web-builder/format/lib/fonts";import{CONTAINER_DIRECTION_LABELS as E}from"efficient-web-builder/format/lib/content/container-direction";import{SITE_FOOTER_TYPE as Y,SITE_HEADER_TYPE as q}from"efficient-web-builder/format/lib/document/section-groups";import z from"../../components/MenuLinkRangeField.js";import V from"../../components/EditorPreviewChat.js";import X from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as Q,POPUP_DAYS_RANGE as O,POPUP_DELAY_RANGE as _,POPUP_HIDE_AFTER as J,POPUP_SCROLL_RANGE as L,POPUP_SHOW_ON as Z,POPUP_TRIGGERS as C,SUBSCRIBE_POPUP_DEFAULTS as $,SUBSCRIBE_POPUP_KIND as ee}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as b,withRowRules as te}from"efficient-web-builder/render/lib/document/show-when";import{POPUP_KIND_PROP as oe,POPUP_TEXT_KIND_LABELS as v,POPUP_TEXT_KINDS as re}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as ie}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as ae}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as le}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as ne,CART_DRAWER_KIND as f}from"efficient-web-builder/format/lib/content/cart-drawer";import{POPUP_PAGE_KIND as A}from"efficient-web-builder/format/lib/popup/look";import{popupLookFields as se}from"./popup-look-fields.js";import{CONSENT_BANNER_KIND as R}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as ce}from"../../components/ConsentBannerLayoutTiles.js";import{CategoryIcon as me,CheckIcon as ue,ClockIcon as S,ColumnsIcon as de,DirectionIcon as pe,EyeIcon as ge,ListIcon as Pe,PageIcon as be,PlacementIcon as fe,ScrollPointIcon as Se,TriggerIcon as he}from"efficient-easel/icons";import{deviceField as D}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as Te}from"efficient-web-builder/editor/components/FieldGlyph";import{multiSelect as ye,panelNote as Be,plainText as a,plainTextarea as u,sectionShapeFields as ke,sectionThemeFields as Fe,textList as h,toggle as w}from"efficient-web-builder/editor/lib/document/controls";import{group as c}from"efficient-easel/screen/lib/document/box-fields";import{segmented as p,select as I,slider as T}from"efficient-web-builder/editor/lib/document/box-fields";import{blockAlignRow as Ee}from"./block-align-row.js";import{formPicker as Oe}from"./blocks/service/controls.js";import{SECTION_THEME_FOLLOW_LABEL as _e}from"efficient-web-builder/editor/components/SectionThemePicker";import{nestedAccentValue as Le}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as Ce}from"efficient-web-builder/format/lib/document/editor-page-context";import{TEMPLATE_PRODUCT_TYPE_PROP as ve}from"efficient-web-builder/format/lib/content/product-page";import{PRODUCT_KIND_OPTIONS as Ae}from"../../../render/lib/catalog/plp-item.js";import{PH as y}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{textKindGlyph as Re}from"efficient-web-builder/editor/lib/document/blocks/shared-fields";import"../efficient-backend.js";import"../../../render/lib/document/slot-seeds.js";import"../../../render/lib/document/card-templates.js";import"../../../render/lib/document/section-to-box-rows-reviews.js";import"../../../render/lib/document/section-to-box-rows-spec.js";import"../../../render/lib/document/section-to-box-rows-detail.js";import"./section-text-regions.js";import{generalBlocks as e}from"efficient-web-builder/editor/lib/document/blocks/general/index";import{commerceBlocks as r}from"./blocks/commerce/index.js";import{serviceBlocks as i}from"./blocks/service/index.js";import{EditorThemedBody as De,suppressPreviewNav as we}from"efficient-web-builder/editor/lib/document/page-root";import Ie from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as xe,PAGE_MENU_DIRECTION_DEFAULT as Ne}from"../../../render/lib/document/footer-page-blocks.js";import{drawPopupPage as He,drawPublishedStorefrontRoot as Me,drawSystemPage as Ge,StorefrontPageProviders as Ue}from"../../../render/lib/document/storefront-root.js";import{GENERAL_ROOT_FIELDS as Ke}from"efficient-web-builder/editor/lib/document/page-root-fields";import{finishRegistry as We}from"efficient-web-builder/editor/lib/document/registry";const je="Newsletter (built in)",Zt=[{value:"00",label:y.label},{value:"00",label:y.label},{value:"00",label:y.label}],t=$,g={field:"autoOpen",is:!0},Ye={all:[b("hideAfter",J,t.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},qe=[[["trigger","showOn","hideAfter"],g],[["autoOpenDelaySec"],{all:[g,b("trigger",C,t.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[g,b("trigger",C,t.trigger,["scroll"])]}],[["showOnPages"],{all:[g,b("showOn",Z,t.showOn,["chosen"])]}],[["hideDays"],{all:[g,Ye]}]],ze=te({formSlug:Oe(void 0,je),_gLeft:c("Left panel"),metaLabel:a("Meta label",t.metaLabel),issueLabel:a("Issue label",t.issueLabel),issueNumber:a("Issue number",t.issueNumber),kicker:a("Eyebrow",t.kicker),heading:u("Heading",t.heading),deck:u("Deck",t.deck),stats:{type:"array",label:"Stats",arrayFields:{label:a("Label"),value:a("Value")},getItemSummary:o=>o?.label||o?.value||"Stat"},_gForm:c("Right panel · form"),formLabel:a("Section label",t.formLabel),formHeading:a("Heading",t.formHeading),formIntro:u("Intro",t.formIntro),firstNameLabel:a("First-name label",t.firstNameLabel),firstNamePlaceholder:a("First-name placeholder",t.firstNamePlaceholder),emailLabel:a("Email label",t.emailLabel),emailPlaceholder:a("Email placeholder",t.emailPlaceholder),_gChoices:c("Right panel · choices"),interestsLabel:a("Interests label",t.interestsLabel),interests:h("Interest chips",l(Te,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:a("Frequency label",t.frequencyLabel),frequencies:h("Frequency options",l(Pe,{}),"Option label","verbatim"),_gActions:c("Right panel · actions"),submitText:a("Submit button",t.submitText),finePrint:a("Fine print",t.finePrint),dismissText:a("Dismiss link",t.dismissText),emailInvalidText:a("Invalid-email error",t.emailInvalidText),submitErrorText:a("Submit-failed error",t.submitErrorText),_gSuccess:c("Success state"),successHeading:a("Heading",t.successHeading),successBody:u("Message",t.successBody),keepBrowsingText:a("Dismiss button",t.keepBrowsingText),...Fe(Le,_e),...ke(),_gTextStyle:c("Text style"),...Object.fromEntries(re.map(o=>[oe[o],I(v[o],Re(v[o]),[{label:"Popup's own",value:""},...W.map(n=>({label:j[n],value:n}))],"")])),_gBehaviour:c("Behavior"),autoOpen:w("Show by itself",t.autoOpen,l(ge,{})),trigger:p("Trigger",l(he,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],t.trigger),autoOpenDelaySec:T("Delay",l(S,{}),_.min,_.max,1,t.autoOpenDelaySec,"s"),scrollPercent:T("Scroll",l(Se,{}),L.min,L.max,5,t.scrollPercent,"%"),showOn:p("Pages",l(be,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],t.showOn),showOnPages:ye("Chosen pages",[],"None"),hideAfter:p("After close",l(S,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],t.hideAfter),hideDays:T("Days",l(S,{}),O.min,O.max,1,t.hideDays),_gArrangement:c("Arrangement"),formSide:p("Form side",l(fe,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],t.formSide),_gPhone:D("mobile",c("On a phone")),valuePanelOnPhone:D("mobile",w("Left panel",t.valuePanelOnPhone,l(de,{})))},qe),x=k(ze,"SubscribePopup");async function Ve(){return(await ie(le()??"")).filter(n=>!Q(n.slug)).map(n=>({label:n.label,value:ae(n.slug)}))}async function Xe(){return F({...x,showOnPages:{...x.showOnPages,options:await Ve().catch(()=>[])}})}const m=ne,Qe={_gHeader:c("Header"),kickerBadge:a("Eyebrow badge",m.kickerBadge),kickerText:a("Eyebrow text",m.kickerText),titleLead:a("Heading",m.titleLead),titleAccent:a("Heading accent",m.titleAccent),subtitleEmpty:u("Sub-line · empty",m.subtitleEmpty),subtitleOne:u("Sub-line · one set",m.subtitleOne),subtitleMany:u("Sub-line · several sets",m.subtitleMany,"{count} becomes the number of sets"),_gStatus:c("Status rail"),leadTimeValue:a("Lead time",m.leadTimeValue),shipsToFallback:a("Ships to · fallback",m.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:c("Promise row"),promises:h("Trust markers",l(ue,{}),"Marker","verbatim"),_gEmpty:c("Empty basket"),emptyKicker:a("Eyebrow",m.emptyKicker),emptyBody:u("Message",m.emptyBody)},N=(o,n,s)=>F({...o,...k(se(n),s)}),Je=N(Qe,f,"CartDrawer"),Ze={layout:ce,_nConsentWhere:Be("The banner's words follow each visitor's country. Turn consent on or off, and pick the privacy page, in Admin › Storefront › Marketing › Privacy.")};function $e({kind:o}){return l("div",{style:{padding:"14px 18px",fontFamily:"var(--font-mono, monospace)",fontSize:12,letterSpacing:"0.18em",textTransform:"uppercase",color:"var(--fg-dim)",borderBottom:"1px solid var(--site-line)"},children:o===f?"This is the cart drawer — edit its copy in the Settings panel →":o===R?"This is the cookie banner — pick its layout in the Settings panel →":"This is the site popup — edit it in the Settings panel →"})}const P={root:{fields:{...Ke},resolveFields:async(o,{fields:n})=>{if(o?.props?.kind===ee)return Xe();if(o?.props?.kind===A)return N(n,A,"PopupPage");if(o?.props?.kind===f)return Je;if(o?.props?.kind===R)return Ze;const s=n;return Ce()?{[ve]:I("Product type",l(me,{}),Ae,"alloy-wheel"),...s}:s},render:o=>{const{editor:n,pageBackground:s,theme:d,fonts:H}=o;if(!n?.isEditing)return Me(o);const B=Ge(o,l($e,{kind:o.kind}));if(B)return B;const M=He(o,!0);return l(De,{propsTheme:d,propsFonts:H,pageBackground:typeof s=="string"?s:void 0,suppressPreviewNav:we,overlay:U(G,{children:[l(V,{}),l(X,{})]}),children:M??l(Ue,{rootProps:o,children:o.children})})}},categories:K(),components:{Heading:e.Heading,Text:e.Text,Eyebrow:e.Eyebrow,ImageBlock:e.ImageBlock,LogoBlock:e.LogoBlock,ButtonBlock:e.ButtonBlock,Spacer:e.Spacer,Divider:e.Divider,Grid:e.Grid,Flex:e.Flex,Breadcrumb:e.Breadcrumb,Masthead:e.Masthead,CategoryBar:e.CategoryBar,FeaturedCover:e.FeaturedCover,LongRead:e.LongRead,Series:e.Series,Subscribe:i.Subscribe,SubscribeBlogs:i.SubscribeBlogs,Banner:e.Banner,ParagraphsA:e.ParagraphsA,StatsParagraph:e.StatsParagraph,Timeline:e.Timeline,Footprint:e.Footprint,TimelineTrack:e.TimelineTrack,TitleWithButtons:e.TitleWithButtons,Stats:e.Stats,Integrations:e.Integrations,Mockup:e.Mockup,Chart:e.Chart,KeyFeatures:e.KeyFeatures,Testimonials:e.Testimonials,Reviews:i.Reviews,RatingBlock:i.RatingBlock,Prose:e.Prose,Cards:e.Cards,Logos:e.Logos,Ticker:e.Ticker,ContactRouting:i.ContactRouting,ContactLocations:e.ContactLocations,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:r.Collections,CollectionCard:r.CollectionCard,Events:i.Events,RateTable:i.RateTable,MessagingCards:i.MessagingCards,ContactCards:i.ContactCards,OpeningHours:i.OpeningHours,PostCard:e.PostCard,DocMetaCards:e.DocMetaCards,DocTabs:e.DocTabs,DocMasthead:e.DocMasthead,DocBody:e.DocBody,Contents:e.Contents,FAQ:e.FAQ,Gallery:r.Gallery,GalleryB:r.GalleryB,SpecStrip:e.SpecStrip,GalleryItem:r.GalleryItem,Manifesto:e.Manifesto,SectionHeader:e.SectionHeader,IntroBleed:e.IntroBleed,Split:e.Split,SubmitBuild:i.SubmitBuild,SubmitBox:i.SubmitBox,ReviewForm:i.ReviewForm,Form:i.Form,AppointmentBooking:i.AppointmentBooking,BookingBox:i.BookingBox,CatalogFilterBar:r.CatalogFilterBar,AlloyWheelsListing:r.AlloyWheelsListing,ProductGrid:r.ProductGrid,ProductHero:r.ProductHero,ProductGallery:r.ProductGallery,SpecTable:r.SpecTable,ProcessSteps:e.ProcessSteps,DetailRows:r.DetailRows,FitmentTable:r.FitmentTable,RelatedProducts:r.RelatedProducts,BundleOffer:r.BundleOffer,CompatibleTyres:r.CompatibleTyres,TyreSizes:r.TyreSizes,TyreFitment:r.TyreFitment,EuTyreLabel:r.EuTyreLabel,EuTyreLabelBlock:r.EuTyreLabelBlock,ProductSize:r.ProductSize,ProductColour:r.ProductColour,ProductPrice:r.ProductPrice,FitmentFinder:r.FitmentFinder,FitmentPicker:r.FitmentPicker,StockFitment:r.StockFitment,OrderSummary:e.OrderSummary,DeliveryOptions:r.DeliveryOptions,PaymentBadges:e.PaymentBadges,CheckoutCTA:r.CheckoutCTA,ProductRef:r.ProductRef,CustomHTML:e.CustomHTML,Header:r.Header,Footer:i.Footer,FooterLogo:i.FooterLogo,FooterMenu:i.FooterMenu,ArticleBody:i.ArticleBody,MenuLinkBlock:i.MenuLinkBlock,FooterDivider:i.FooterDivider,FooterGroup:i.FooterGroup,FooterText:i.FooterText,FooterEmailSignup:i.FooterEmailSignup,FooterSocial:i.FooterSocial,FooterMessaging:i.FooterMessaging,FooterPayment:i.FooterPayment,LegalLineBlock:i.LegalLineBlock,SearchBlock:r.SearchBlock,CartBlock:r.CartBlock,CountrySwitchBlock:r.CountrySwitchBlock,AccountBlock:r.AccountBlock,ThemeSwitchBlock:r.ThemeSwitchBlock,[q]:i.SiteHeader,[Y]:i.SiteFooter}};xe(P.components);{const o=P.components.MenuBlock;o.fields={...o.fields,direction:p("Direction",l(pe,{}),[{label:E.column,value:"column"},{label:E.row,value:"row"}],Ne)};const n={type:"custom",render:({value:s,onChange:d})=>l(z,{value:s,onChange:d})};o.fields=Object.fromEntries(Object.entries(o.fields).flatMap(([s,d])=>s==="menu"?[[s,d],["linkRange",n]]:[[s,d]])),o.fields={...o.fields,linkAlign:Ee({label:"Link alignment"})}}{const o=P.components.Header,n=o.render;o.render=s=>s.editor?.isEditing?l(Ie,{editing:!0}):n(s)}const et=We(P),$t=et.sectionGroupAllow;var eo=P;export{$t as SECTION_GROUP_ALLOW,P as config,eo as default,ze as subscribePopupFields};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CART_DRAWER_KIND } from "efficient-web-builder/format/lib/content/cart-drawer";
|
|
2
|
+
import { POPUP_PAGE_KIND } from "efficient-web-builder/format/lib/popup/look";
|
|
3
|
+
export type FrameKind = typeof POPUP_PAGE_KIND | typeof CART_DRAWER_KIND;
|
|
4
|
+
export declare function popupLookFields(kind: FrameKind): Record<string, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{CloseIcon as h,CursorClickIcon as f,EyeIcon as _,FullWidthIcon as O,HeightIcon as C,OpacityIcon as I,PlacementIcon as P,WidthIcon as g}from"efficient-easel/icons";import{group as l}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as w}from"efficient-easel/screen/lib/document/device-fields";import{placementField as b,select as n,slider as c}from"efficient-web-builder/editor/lib/document/box-fields";import{colorInput as v,toggle as r}from"efficient-web-builder/editor/lib/document/controls";import{CART_DRAWER_KIND as E,resolveCartDrawerLook as R}from"efficient-web-builder/format/lib/content/cart-drawer";import{POPUP_LOOK_DEFAULTS as T,POPUP_TINT_OPACITY_RANGE as u,POPUP_WIDTH_RANGE as a}from"efficient-web-builder/format/lib/popup/look";import{withRowRules as k}from"efficient-web-builder/render/lib/document/show-when";const N={label:"Inside",value:"inside"},W={label:"None",value:"none"};function s(o){return Object.fromEntries(Object.entries(o).map(([t,e])=>[t,w("desktop",e)]))}function m(o,t){return{_gDesign:l("Color"),tintColor:v("Tint color",o),tintOpacity:c("Tint opacity",i(I,{}),u.min,u.max,5,t,"%")}}function d(o,t){return{_gBehavior:l("Behavior"),outsideClick:r("Outside click",o,i(f,{})),...t}}const A=[["outsideClick"],{not:{field:"closeButton",is:"none"}}];function p(o){return c("Width",i(g,{}),a.min,a.max,4,o,"px")}function H(o){if(o===E){const e=R(void 0);return s({_gSize:l("Width"),width:p(e.width),_gPosition:l("Placement"),placement:n("Placement",i(P,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],e.placement),...m(e.tintColor,e.tintOpacity),...d(e.outsideClick,{autoOpen:r("Auto open",e.autoOpen,i(_,{}))})})}const t=T;return k(s({_gSize:l("Width"),width:p(t.width),height:n("Height",i(C,{}),[{label:"Auto",value:"auto"},{label:"Full",value:"full"}],t.height),_gPosition:l("Placement"),placement:b("Placement",{fallback:t.placement}),fullWidth:r("Full width",t.fullWidth,i(O,{})),...m(t.tintColor,t.tintOpacity),...d(t.outsideClick,{closeButton:n("Close button",i(h,{}),[N,{label:"Outside",value:"outside"},W],t.closeButton)})}),[[["width"],{not:{field:"fullWidth",is:!0}}],A])}export{H as popupLookFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readLockHolder as M}from"efficient-easel/edit-lock";import{AmbiguousPageSlugError as U,ApiError as k,SERVER_UNREACHABLE_MESSAGE as x,STATUS_NETWORK_ERROR as F,setEditorLanguage as H,setEditorPortalAudience as K,storefrontAdmin as o}from"../../render/lib/api/index.js";import{AdminSectionTemplateStore as N}from"./api/section-templates.js";import{registerServedBlockSources as D}from"./efficient-block-sources.js";import{registerRecordTypes as G}from"efficient-web-builder/format/lib/content/record-types";import{uploadLimits as z}from"../../render/lib/api/upload-limits.js";import{SITE_FOOTER_SLUG as $}from"efficient-web-builder/format/lib/content/footer";import{SOCIAL_PLATFORMS as _,socialUrlField as E}from"efficient-web-builder/format/lib/content/social-links";import{EFFICIENT_BACKEND as V,currentEaselSession as P,provideDefaultBackend as W}from"efficient-easel/screen/lib/session";import{loadEditorSiteSlug as Y}from"efficient-web-builder/editor/lib/editor-site-slug";import{editorPreviewHref as q,originIsSiteAmbiguous as J}from"efficient-web-builder/format/lib/editor/preview-href";import{postPath as Q}from"../../render/lib/links/link-rules.js";import{absolutizeApiUrl as X,efficientMediaResolve as Z}from"efficient-web-builder/render/lib/media";import{HOME_PAGE_SLUG as ee}from"efficient-web-builder/format/lib/document/home-page";import{groupPagesForMenu as te,pageMenuLabel as T}from"../../render/lib/storefront-page-groups.js";import{PAGE_CONFLICT_CODE as L}from"efficient-easel/screen/lib/failure";import{shopRouteBase as ne}from"efficient-web-builder/format/lib/web-runtime";import{WebsiteBackendError as f,provideHostFailures as ae}from"efficient-easel/screen/lib/backend-error";const A=n=>n.layout_updated_at??n.updated_at??null,ie=["live","changed","never"],R=n=>ie.includes(n.live_state)?{live:n.live_state}:{};function se(n){if(!n||typeof n!="object")return null;const s=n;return s.code!==L?null:{savedBy:typeof s.saved_by=="string"?s.saved_by:"",savedByYou:s.saved_by_you===!0,secondsAgo:typeof s.seconds_ago=="number"?s.seconds_ago:0}}function oe(n){return n===401||n===403?"unauthorized":n===404?"not-found":n===F||n>=500?"unavailable":"invalid"}function re(n){if(!(n instanceof k))return n;if(n.status===409){const s=se(n.data);if(s)return new f("changed-elsewhere",n.message,{conflict:s,cause:n});const r=M(n.data);if(r)return new f("lock-taken",n.message,{holder:r,cause:n})}return new f(oe(n.status),n.message,{cause:n})}function le(n){if(!n||typeof n!="object"||Array.isArray(n))return null;const s=r=>{if(typeof r=="string")return r.trim()||null;const d=Array.isArray(r)?r:r&&typeof r=="object"?Object.values(r):[];for(const c of d){const m=s(c);if(m)return m}return null};for(const[r,d]of Object.entries(n)){if(r==="detail")continue;const c=s(d);if(c)return`${r}: ${c}`}return null}const I=new WeakMap;function ce(n,s){const r=ne(),d=r?new URL(r).hostname:typeof window<"u"?window.location?.hostname??null:null;let c=null;const m=s.siteId(),w=s.token();if(J(d)&&m&&w){const p=Y(w,m);I.has(p)?c=I.get(p)??null:p.then(S=>I.set(p,S))}const y=q({pageSlug:n,siteSlug:c,hostname:d});return r?`${r}${y}`:y}const ue={group:"Template pages",groupKey:"template"},B=n=>({id:n.id,slug:n.slug,label:n.title||n.slug,...ue,draft:!1});function j(n){const s=async t=>{const e=n.token();if(!e)throw new f("unauthorized","The editor has no sign-in yet.");try{return await t(e)}catch(a){throw re(a)}},r={list:t=>s(async e=>{const a=await o.listPages(e,t?.siteId);return te(a.filter(i=>i.slug!==$)).flatMap(i=>i.pages.map(l=>({id:l.id,slug:l.slug,label:T(l),group:i.group,groupKey:i.key,draft:!l.is_published,kind:l.kind??null})))}),load:t=>s(async e=>{const a="id"in t?t.id:(await o.findPageBySlug(t.slug,e,t.siteId))?.id,i=a?await o.getPageById(a,e):null;return i?{id:i.id,layout:i.layout,kind:i.kind,version:A(i),...R(i)}:null}),save:(t,e,a)=>{const{version:i}=a;return i?s(async l=>{const g=await o.saveLayout(t,e.layout,l,i,a.clientId||void 0);return{version:A(g),...R(g)}}):Promise.reject(new Error("Refusing to save this page: the editor does not know which version it is replacing. Reload the page and try again."))},version:t=>s(e=>o.getPageById(t,e).then(A)),linkTargets:t=>s(async e=>(await o.listPages(e,t?.siteId)).map(a=>({id:a.id,slug:a.slug,label:T(a),layout:a.layout??null}))),duplicate:(t,e)=>s(async a=>{const i=await o.duplicatePage(t,{title:e.title,slug:e.slug},a);return{id:i.id,slug:i.slug,label:T(i),group:i.group||null,draft:!i.is_published,kind:i.kind??null}})},d=t=>({list:()=>s(async e=>(await o.listTemplatePages(t,e)).map(B)),load:e=>s(async a=>{const i=u=>"id"in e?u.id===e.id:u.slug===e.slug,l=u=>({id:u.id,layout:u.layout,version:null}),g=await o.listTemplatePages(t,a);if(g.length)return l(g.find(i)??g[0]);const b=await o.getTemplate(t,a).catch(()=>null);try{return l(await o.createTemplatePage(t,{slug:ee,title:"Home",layout:b?.layout??{}},a))}catch{const u=await o.listTemplatePages(t,a),h=u.find(i)??u[0];return h?l(h):null}}),save:(e,a)=>s(async i=>(await o.saveTemplatePageLayout(e,a.layout,i),{version:null})),create:e=>s(async a=>B(await o.createTemplatePage(t,{slug:e.slug,title:e.title,layout:e.layout},a))),remove:(e,a)=>s(i=>o.deleteTemplatePage(e,i,a))}),c=t=>{const e=t?.siteId??n.siteId();if(!e)throw new f("not-found","This editor is not connected to a website.");return e},m=t=>({name:t.name,slug:t.slug}),w=t=>Object.fromEntries(_.map(e=>[e,t[E(e)]??""])),y={launcherColor:"launcher_color",launcherIcon:"launcher_icon",launcherPosition:"launcher_position",launcherLabel:"launcher_label",showOnPhones:"show_on_phones"},p=Object.keys(y),S=t=>{const e={enabled:t.enabled,title:t.title,subtitle:t.subtitle,greeting:t.greeting};for(const a of p){const i=t[y[a]];i!==void 0&&Object.assign(e,{[a]:i})}return e},C=t=>{const e={};for(const[a,i]of Object.entries(t))e[y[a]??a]=i;return e},O={pages:r,lock:{claim:(t,e,a)=>s(async i=>({heartbeatSeconds:(await o.claimPageEditLock(t,i,e,a)).heartbeat_seconds})),release:t=>s(e=>o.releasePageEditLock(t,e))},site:{get:t=>s(async e=>m(await o.getSite(c(t),e))),publish:t=>s(async e=>{try{const{state:a,published:i}=await o.publishSite(c(t),e);return{state:a,published:i}}catch(a){const i=a instanceof k&&a.status===400?le(a.data):null;throw i?new f("invalid",i,{cause:a}):a}}),liveState:t=>s(async e=>{const{state:a,changes:i}=await o.getSiteLiveState(c(t),e);return{state:a,changes:i}})},media:{resolve:Z,maxUploadBytes:z("POST /api/storefront/media/","file").maxSizeBytes},sectionTemplates:new N(n.token),social:{get:t=>s(async e=>w(await o.getSocialSettings(e,c(t)))),update:(t,e)=>s(async a=>{const i=Object.fromEntries(_.filter(l=>l in t).map(l=>[E(l),t[l]]));try{return w(await o.updateSocialSettings(i,a,c(e)))}catch(l){if(l instanceof k&&l.status===400){const g=l.data??{},b={};for(const u of _){const h=g[E(u)],v=Array.isArray(h)?h[0]:h;typeof v=="string"&&v.trim()&&(b[u]=v)}if(Object.keys(b).length>0)throw new f("invalid",l.message,{fields:b,cause:l})}throw l}})},theme:{get:t=>s(e=>o.getThemeSettings(e,t?.siteId)),update:(t,e)=>s(a=>o.updateThemeSettings(t,a,e?.siteId))},geocode:{locate:(t,e)=>s(async a=>{const i=await o.geocode(t,a,e?.country);if(i.status==="not_found")return null;if(i.status!=="found"||i.lat===null||i.lng===null)throw new f("unavailable","The geocoder could not answer just now.");return{lat:i.lat,lng:i.lng,label:i.label}})},chat:{get:t=>s(async e=>S(await o.getChatSettings(e,t?.siteId))),update:(t,e)=>s(async a=>S(await o.updateChatSettings(C(t),a,e?.siteId)))},blog:{posts:t=>s(async e=>(await o.listBlogPosts(e,{visibleOnly:!0,siteId:t?.siteId})).map(a=>({slug:a.slug,title:a.title,excerpt:a.excerpt,category:a.category,coverImage:a.cover_image?X(a.cover_image)??"":"",publishedAt:a.published_at,href:Q(a.slug)})))},templates:{get:t=>s(async e=>{const a=await o.getTemplate(t,e);return{id:a.id,name:a.name}}),pages:d},preview:{href:t=>ce(t,n),draftLink:t=>s(async e=>({url:(await o.createPagePreviewLink(t,e)).url??null}))}};return O[V]=!0,O}const de=["text","date"],ge=n=>n.replace(/_([a-z0-9])/g,(s,r)=>r.toUpperCase());function fe(n){if(Array.isArray(n))for(const s of n){const d=(Array.isArray(s?.fields)?s.fields:[]).filter(c=>de.includes(c.kind)).map(c=>({key:ge(c.key),label:c.label,kind:c.kind}));try{G([{key:s.key,label:s.label,fields:d}])}catch{}}}function Be(n){return P().cache("efficient:editor-offerings",()=>Promise.all([o.listBlockSources(n).then(D).catch(()=>{}),o.listRecordTypes(n).then(fe).catch(()=>{})]).then(()=>{}))}ae({read:n=>n instanceof k?{status:n.status,data:n.data,message:n.message}:null,unreachableMessage:x,loadRefusal:(n,{slug:s})=>n instanceof U?`“${s}” exists on more than one website. Open it from the site you want to edit.`:null}),W(n=>j({token:()=>n.auth.token,siteId:()=>n.siteId()}));function je(n={}){return n.portalAudience!==void 0&&K(n.portalAudience),n.language!==void 0&&H(n.language),j({token:()=>P().auth.token,siteId:()=>n.siteId??P().siteId()})}export{L as PAGE_CONFLICT_CODE,je as createEfficientBackend,R as liveOf,Be as loadEditorOfferings,A as pageVersion,le as publishRefusal,fe as registerServedRecordTypes,re as toBackendError};
|
|
1
|
+
import{readLockHolder as M}from"efficient-easel/edit-lock";import{AmbiguousPageSlugError as U,ApiError as k,SERVER_UNREACHABLE_MESSAGE as x,STATUS_NETWORK_ERROR as F,setEditorLanguage as H,setEditorPortalAudience as K,storefrontAdmin as o}from"../../render/lib/api/index.js";import{AdminSectionTemplateStore as N}from"./api/section-templates.js";import{registerServedBlockSources as D}from"./efficient-block-sources.js";import{registerRecordTypes as G}from"efficient-web-builder/format/lib/content/record-types";import{uploadLimits as z}from"../../render/lib/api/upload-limits.js";import{SITE_FOOTER_SLUG as $}from"efficient-web-builder/format/lib/content/footer";import{SOCIAL_PLATFORMS as _,socialUrlField as E}from"efficient-web-builder/format/lib/content/social-links";import{EFFICIENT_BACKEND as V,currentEaselSession as P,provideDefaultBackend as W}from"efficient-easel/screen/lib/session";import{loadEditorSiteSlug as Y}from"efficient-web-builder/editor/lib/editor-site-slug";import{editorPreviewHref as q,originIsSiteAmbiguous as J}from"efficient-web-builder/format/lib/editor/preview-href";import{postPath as Q}from"../../render/lib/links/link-rules.js";import{absolutizeApiUrl as X,efficientMediaResolve as Z}from"efficient-web-builder/render/lib/media";import{HOME_PAGE_SLUG as ee}from"efficient-web-builder/format/lib/document/home-page";import{groupPagesForMenu as te,pageMenuLabel as T}from"../../render/lib/storefront-page-groups.js";import{PAGE_CONFLICT_CODE as L}from"efficient-easel/screen/lib/failure";import{shopRouteBase as ne}from"efficient-web-builder/format/lib/web-runtime";import{WebsiteBackendError as f,provideHostFailures as ae}from"efficient-easel/screen/lib/backend-error";const A=n=>n.layout_updated_at??n.updated_at??null,ie=["live","changed","never"],R=n=>ie.includes(n.live_state)?{live:n.live_state}:{};function se(n){if(!n||typeof n!="object")return null;const s=n;return s.code!==L?null:{savedBy:typeof s.saved_by=="string"?s.saved_by:"",savedByYou:s.saved_by_you===!0,secondsAgo:typeof s.seconds_ago=="number"?s.seconds_ago:0}}function oe(n){return n===401||n===403?"unauthorized":n===404?"not-found":n===F||n>=500?"unavailable":"invalid"}function re(n){if(!(n instanceof k))return n;if(n.status===409){const s=se(n.data);if(s)return new f("changed-elsewhere",n.message,{conflict:s,cause:n});const r=M(n.data);if(r)return new f("lock-taken",n.message,{holder:r,cause:n})}return new f(oe(n.status),n.message,{cause:n})}function le(n){if(!n||typeof n!="object"||Array.isArray(n))return null;const s=r=>{if(typeof r=="string")return r.trim()||null;const d=Array.isArray(r)?r:r&&typeof r=="object"?Object.values(r):[];for(const c of d){const m=s(c);if(m)return m}return null};for(const[r,d]of Object.entries(n)){if(r==="detail")continue;const c=s(d);if(c)return`${r}: ${c}`}return null}const I=new WeakMap;function ce(n,s){const r=ne(),d=r?new URL(r).hostname:typeof window<"u"?window.location?.hostname??null:null;let c=null;const m=s.siteId(),w=s.token();if(J(d)&&m&&w){const p=Y(w,m);I.has(p)?c=I.get(p)??null:p.then(S=>I.set(p,S))}const y=q({pageSlug:n,siteSlug:c,hostname:d});return r?`${r}${y}`:y}const ue={group:"Template pages",groupKey:"template"},B=n=>({id:n.id,slug:n.slug,label:n.title||n.slug,...ue,draft:!1});function j(n){const s=async t=>{const e=n.token();if(!e)throw new f("unauthorized","The editor has no sign-in yet.");try{return await t(e)}catch(a){throw re(a)}},r={list:t=>s(async e=>{const a=await o.listPages(e,t?.siteId);return te(a.filter(i=>i.slug!==$)).flatMap(i=>i.pages.map(l=>({id:l.id,slug:l.slug,label:T(l),group:i.group,groupKey:i.key,draft:!l.is_published,kind:l.kind??null})))}),load:t=>s(async e=>{const a="id"in t?t.id:(await o.findPageBySlug(t.slug,e,t.siteId))?.id,i=a?await o.getPageById(a,e):null;return i?{id:i.id,layout:i.layout,kind:i.kind,version:A(i),...R(i)}:null}),save:(t,e,a)=>{const{version:i}=a;return i?s(async l=>{const g=await o.saveLayout(t,e.layout,l,i,a.clientId||void 0);return{version:A(g),...R(g)}}):Promise.reject(new Error("Refusing to save this page: the editor does not know which version it is replacing. Reload the page and try again."))},version:t=>s(e=>o.getPageById(t,e).then(A)),linkTargets:t=>s(async e=>(await o.listPages(e,t?.siteId)).map(a=>({id:a.id,slug:a.slug,label:T(a),layout:a.layout??null}))),duplicate:(t,e)=>s(async a=>{const i=await o.duplicatePage(t,{title:e.title,slug:e.slug},a);return{id:i.id,slug:i.slug,label:T(i),group:i.group||null,draft:!i.is_published,kind:i.kind??null}})},d=t=>({list:()=>s(async e=>(await o.listTemplatePages(t,e)).map(B)),load:e=>s(async a=>{const i=u=>"id"in e?u.id===e.id:u.slug===e.slug,l=u=>({id:u.id,layout:u.layout,version:null}),g=await o.listTemplatePages(t,a);if(g.length)return l(g.find(i)??g[0]);const b=await o.getTemplate(t,a).catch(()=>null);try{return l(await o.createTemplatePage(t,{slug:ee,title:"Home",layout:b?.layout??{}},a))}catch{const u=await o.listTemplatePages(t,a),h=u.find(i)??u[0];return h?l(h):null}}),save:(e,a)=>s(async i=>(await o.saveTemplatePageLayout(e,a.layout,i),{version:null})),create:e=>s(async a=>B(await o.createTemplatePage(t,{slug:e.slug,title:e.title,layout:e.layout},a))),remove:(e,a)=>s(i=>o.deleteTemplatePage(e,i,a))}),c=t=>{const e=t?.siteId??n.siteId();if(!e)throw new f("not-found","This editor is not connected to a website.");return e},m=t=>({name:t.name,slug:t.slug}),w=t=>Object.fromEntries(_.map(e=>[e,t[E(e)]??""])),y={launcherColor:"launcher_color",launcherIcon:"launcher_icon",launcherPosition:"launcher_position",launcherLabel:"launcher_label",showOnPhones:"show_on_phones"},p=Object.keys(y),S=t=>{const e={enabled:t.enabled,title:t.title,subtitle:t.subtitle,greeting:t.greeting};for(const a of p){const i=t[y[a]];i!==void 0&&Object.assign(e,{[a]:i})}return e},C=t=>{const e={};for(const[a,i]of Object.entries(t))e[y[a]??a]=i;return e},O={pages:r,lock:{claim:(t,e,a)=>s(async i=>({heartbeatSeconds:(await o.claimPageEditLock(t,i,e,a)).heartbeat_seconds})),release:t=>s(e=>o.releasePageEditLock(t,e))},site:{get:t=>s(async e=>m(await o.getSite(c(t),e))),publish:t=>s(async e=>{try{const{state:a,published:i}=await o.publishSite(c(t),e);return{state:a,published:i}}catch(a){const i=a instanceof k&&a.status===400?le(a.data):null;throw i?new f("invalid",i,{cause:a}):a}}),liveState:t=>s(async e=>{const{state:a,changes:i}=await o.getSiteLiveState(c(t),e);return{state:a,changes:i}})},media:{resolve:Z,maxUploadBytes:z("POST /api/storefront/media/","file").maxSizeBytes},sectionTemplates:new N(n.token),social:{get:t=>s(async e=>w(await o.getSocialSettings(e,c(t)))),update:(t,e)=>s(async a=>{const i=Object.fromEntries(_.filter(l=>l in t).map(l=>[E(l),t[l]]));try{return w(await o.updateSocialSettings(i,a,c(e)))}catch(l){if(l instanceof k&&l.status===400){const g=l.data??{},b={};for(const u of _){const h=g[E(u)],v=Array.isArray(h)?h[0]:h;typeof v=="string"&&v.trim()&&(b[u]=v)}if(Object.keys(b).length>0)throw new f("invalid",l.message,{fields:b,cause:l})}throw l}})},theme:{get:t=>s(e=>o.getThemeSettings(e,t?.siteId)),update:(t,e)=>s(a=>o.updateThemeSettings(t,a,e?.siteId))},geocode:{locate:(t,e)=>s(async a=>{const i=await o.geocode(t,a,e?.country);if(i.status==="not_found")return null;if(i.status!=="found"||i.lat===null||i.lng===null)throw new f("unavailable","The geocoder could not answer just now.");return{lat:i.lat,lng:i.lng,label:i.label}})},chat:{get:t=>s(async e=>S(await o.getChatSettings(e,t?.siteId))),update:(t,e)=>s(async a=>S(await o.updateChatSettings(C(t),a,e?.siteId)))},blog:{posts:t=>s(async e=>(await o.listBlogPosts(e,{visibleOnly:!0,siteId:t?.siteId})).map(a=>({slug:a.slug,title:a.title,excerpt:a.excerpt,category:a.category,coverImage:a.cover_image?X(a.cover_image)??"":"",publishedAt:a.published_at,href:Q(a.slug)})))},templates:{get:t=>s(async e=>{const a=await o.getTemplate(t,e);return{id:a.id,name:a.name}}),pages:d},preview:{href:t=>ce(t,n),draftLink:t=>s(async e=>({url:(await o.createPagePreviewLink(t,e)).url??null}))}};return O[V]=!0,O}const de=["text","date","images"],ge=n=>n.replace(/_([a-z0-9])/g,(s,r)=>r.toUpperCase());function fe(n){if(Array.isArray(n))for(const s of n){const d=(Array.isArray(s?.fields)?s.fields:[]).filter(c=>de.includes(c.kind)).map(c=>({key:ge(c.key),label:c.label,kind:c.kind}));try{G([{key:s.key,label:s.label,fields:d}])}catch{}}}function Be(n){return P().cache("efficient:editor-offerings",()=>Promise.all([o.listBlockSources(n).then(D).catch(()=>{}),o.listRecordTypes(n).then(fe).catch(()=>{})]).then(()=>{}))}ae({read:n=>n instanceof k?{status:n.status,data:n.data,message:n.message}:null,unreachableMessage:x,loadRefusal:(n,{slug:s})=>n instanceof U?`“${s}” exists on more than one website. Open it from the site you want to edit.`:null}),W(n=>j({token:()=>n.auth.token,siteId:()=>n.siteId()}));function je(n={}){return n.portalAudience!==void 0&&K(n.portalAudience),n.language!==void 0&&H(n.language),j({token:()=>P().auth.token,siteId:()=>n.siteId??P().siteId()})}export{L as PAGE_CONFLICT_CODE,je as createEfficientBackend,R as liveOf,Be as loadEditorOfferings,A as pageVersion,le as publishRefusal,fe as registerServedRecordTypes,re as toBackendError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerBlockSources as
|
|
1
|
+
import{registerBlockSources as p}from"efficient-web-builder/format/lib/content/block-sources";import{cardTemplateFields as u,hasCardTemplate as h}from"efficient-web-builder/format/lib/content/card-template";import{say as e}from"efficient-web-builder/format/lib/editor-words";import{OPENING_SAMPLE_WEEK as f}from"../../render/lib/sections/opening-hours.js";import{PRODUCT_REVIEWS_SOURCE as y}from"../../render/lib/sections/reviews.js";const k=[{key:"group-offices",label:"Group offices",blocks:["Footprint"]},{key:y,label:"Product reviews",blocks:["Reviews"]}];p(k);const c="+00 000 0000",S={rooms:()=>[{key:"sample-1",title:e("First room"),excerpt:e("What this room has.")},{key:"sample-2",title:e("Second room"),excerpt:e("What this room has.")},{key:"sample-3",title:e("Third room"),excerpt:e("What this room has.")}],"location-contact":()=>[{key:"location",name:e("Location name"),address:e("Street address"),state:e("State"),country:e("Country"),phone:c,hours:e("Opening hours")}],"location-cards":()=>[{key:"where",name:e("Address"),note:e("Street address")},{key:"hours",name:e("Opening hours"),note:e("A line about it appears here.")},{key:"call",name:e("Phone"),note:c}],"location-footer":()=>[{text:e("Street address")},{text:c},{text:e("Opening hours")}],"location-rate-table":()=>{const t=o=>JSON.stringify([{column:e("Standard"),amount:"$000",standard:!1},{column:e("VIP"),amount:"$000",standard:o}]);return[{group:e("In-house"),label:e("Session · 60 min"),cells:t(!1)},{group:e("In-house"),label:e("Session · 60 min · Night"),cells:t(!0)},{group:e("Away"),label:e("Session · 60 min"),cells:t(!1)}]},"location-opening":()=>[{week:f,zone:"Australia/Sydney",hours:""}],"site-messaging":()=>[{app:"wechat",name:"WeChat",handle:"yourvenue",href:"",qr:"https://u.wechat.com/yourvenue"},{app:"telegram",name:"Telegram",handle:"@yourvenue",href:"https://t.me/yourvenue",qr:"https://t.me/yourvenue"},{app:"whatsapp",name:"WhatsApp",handle:"0400 000 000",href:"https://wa.me/61400000000",qr:"https://wa.me/61400000000"},{app:"line",name:"LINE",handle:"yourvenue",href:"https://line.me/ti/p/~yourvenue",qr:"https://line.me/ti/p/~yourvenue"}],"location-payment-methods":()=>[{label:e("Cash"),kind:"cash"},{label:e("Card"),kind:"card"}],"shop-payment-methods":()=>[{label:"Visa / Mastercard / American Express",kind:"card"},{label:"PayPal",kind:""},{label:e("Bank transfer"),kind:"wire"}]},m=new Set(["Cards"]),b={name:()=>e("Name"),note:()=>e("Note"),price:()=>e("Price"),time:()=>e("Time")},g=t=>t.replace(/_([a-z0-9])/g,(o,a)=>a.toUpperCase());function E(t){const o=Array.isArray(t.blocks)?t.blocks:[];if(!o.some(n=>m.has(n))||o.some(n=>!m.has(n)&&h(n))||!Array.isArray(t.fields))return;const a=o.filter(n=>m.has(n)).flatMap(n=>u(n)),r=[];for(const n of t.fields){if(typeof n!="string"||!n.trim())continue;const s=g(n.trim());if(s==="key"||r.some(l=>l.key===s))continue;const i=a.find(l=>l.key===s),d=i?.kind==="image"||i?.kind==="link"?i.kind:void 0;r.push({key:s,label:i?.label??b[s]?.()??s,...d?{kind:d}:{}})}return r.length?r:void 0}function P(t){if(Array.isArray(t))for(const o of t){const a=typeof o?.key=="string"?S[o.key]?.():void 0;try{const r=E(o);p([{key:o.key,label:o.label,blocks:o.blocks,...a?{sample:a}:{},...r?{fields:r}:{}}])}catch{}}}export{k as EFFICIENT_BLOCK_SOURCES,P as registerServedBlockSources};
|