efficient-storefront-blocks 0.64.0 → 0.66.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 +51 -0
- package/README.md +0 -1
- package/dist/chunks/{EditorPreviewCheckout-WYXRKJ6R.js → EditorPreviewCheckout-EXU5CRJ2.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-ZYGNRWSB.js → SiteEditorProvider-KOPR3UDU.js} +1 -1
- package/dist/chunks/{chunk-I7BIOONR.js → chunk-S66TL4Z3.js} +1 -1
- package/dist/chunks/{chunk-YAO6XQYA.js → chunk-TAGGXC3A.js} +1 -1
- package/dist/chunks/{chunk-FTBCGDXD.js → chunk-VWO54PMT.js} +1 -1
- package/dist/chunks/{chunk-OU2WWXMT.js → chunk-Z7PJKX2P.js} +1 -1
- package/dist/chunks/{fitment-data-IKFCBT6E.js → fitment-data-UQDOQP66.js} +1 -1
- package/dist/editor/components/CollectionPicker.js +1 -1
- package/dist/editor/components/EditProductLink.js +1 -1
- package/dist/editor/components/FormPicker.js +1 -1
- package/dist/editor/components/GalleryProductBinding.d.ts +1 -1
- package/dist/editor/components/GalleryProductBinding.js +1 -1
- package/dist/editor/components/GalleryShowcaseSource.d.ts +1 -1
- package/dist/editor/components/GalleryShowcaseSource.js +1 -1
- package/dist/editor/components/HeaderSettingsPanel.js +1 -1
- package/dist/editor/components/MenuLinkRangeField.js +1 -1
- package/dist/editor/components/PerViewStepperField.js +1 -1
- package/dist/editor/lib/puck/blocks/service/ContactRouting/fields.js +1 -1
- package/dist/editor/lib/puck/config.d.ts +0 -4
- package/dist/editor/lib/puck/config.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +5 -5
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.js +43 -43
- package/dist/render/app/globals.css +18 -4
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/ConsentPanel.js +1 -1
- package/dist/render/components/ContactRouting.d.ts +11 -1
- package/dist/render/components/ContactRouting.js +1 -1
- package/dist/render/components/DetailRows.js +1 -1
- package/dist/render/components/GalleryGrid.js +1 -1
- package/dist/render/components/GalleryItem.d.ts +1 -0
- package/dist/render/components/GalleryItem.js +1 -1
- package/dist/render/components/Header.js +1 -1
- package/dist/render/components/HeaderToolBlocks.d.ts +1 -1
- package/dist/render/components/HeaderToolBlocks.js +1 -1
- package/dist/render/components/ProductGallery.js +1 -1
- package/dist/render/components/ProductGridSection.js +1 -1
- package/dist/render/components/fitment/FitmentPickerGrid.js +1 -1
- package/dist/render/components/fitment/PickerField.js +1 -1
- package/dist/render/components/pdp-dynamic/DynamicGalleryGrid.js +1 -1
- package/dist/render/lib/api/types.d.ts +1 -0
- package/dist/render/lib/consent/choice.d.ts +0 -2
- package/dist/render/lib/consent/choice.js +1 -1
- package/dist/render/lib/consent/rules.d.ts +4 -3
- package/dist/render/lib/consent/rules.js +1 -1
- package/dist/render/lib/content/english-variant.js +1 -1
- package/dist/render/lib/content/source-values.d.ts +4 -0
- package/dist/render/lib/content/source-values.js +1 -0
- package/dist/render/lib/content/stock-words.d.ts +0 -4
- package/dist/render/lib/content/stock-words.js +1 -1
- package/dist/render/lib/puck/blocks/commerce/GalleryItem/render.js +1 -1
- package/dist/render/lib/puck/blocks/text-part-shapes.json +6 -3
- package/dist/render/lib/sections/fill-row.d.ts +8 -0
- package/dist/render/lib/sections/fill-row.js +1 -1
- package/dist/render/lib/sections/grid-no-hole.d.ts +12 -0
- package/dist/render/lib/sections/grid-no-hole.js +1 -0
- package/dist/render/lib/wheels/catalog-filters-to-listing.d.ts +0 -1
- package/dist/render/lib/wheels/catalog-filters-to-listing.js +1 -1
- package/dist/render/lib/wheels/catalog-filters.d.ts +0 -1
- package/dist/render/lib/wheels/catalog-filters.js +1 -1
- package/dist/words.d.ts +6 -5
- package/dist/words.js +2 -2
- package/package.json +1 -1
- /package/dist/chunks/{chunk-B44XQA2J.js → chunk-IHYVLVY3.js} +0 -0
- /package/dist/chunks/{chunk-YAO6XQYA.js.LEGAL.txt → chunk-TAGGXC3A.js.LEGAL.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const m=1,s="Ads on. Shopper can opt out.",i="Ads and analytics off until Accept",r={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:s,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:i,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:s,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:s,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:i,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:i,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:i,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}},p="Honoured: ads off",l=new Set(["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO"]),c={US:"us",PR:"us",GU:"us",VI:"us",AS:"us",MP:"us",CA:"ca",AU:"au",NZ:"nz",GB:"uk"};function u(o){const e=(o??"").trim().toUpperCase();return e?c[e]?c[e]:l.has(e)?"eu":"other":"other"}const h=new Set(["Pacific/Honolulu","Pacific/Guam","Pacific/Saipan","Pacific/Pago_Pago","America/Puerto_Rico","America/St_Thomas"]),d=new Set(["New_York","Chicago","Denver","Los_Angeles","Phoenix","Anchorage","Adak","Boise","Detroit","Juneau","Sitka","Metlakatla","Yakutat","Nome","Menominee","Indianapolis","Louisville","Fort_Wayne","Knox_IN"]),f=new Set(["Toronto","Vancouver","Edmonton","Winnipeg","Halifax","St_Johns","Regina","Montreal","Moncton","Glace_Bay","Goose_Bay","Iqaluit","Whitehorse","Dawson","Dawson_Creek","Fort_Nelson","Creston","Cambridge_Bay","Inuvik","Rankin_Inlet","Resolute","Swift_Current","Atikokan","Blanc-Sablon","Nipigon","Thunder_Bay","Rainy_River","Pangnirtung","Yellowknife","Coral_Harbour"]);function y(o){const e=(o??"").trim();if(!e)return"other";if(e==="Europe/London"||e==="Europe/Belfast"||e==="GB"||e==="GB-Eire"||e==="Europe/Guernsey"||e==="Europe/Jersey"||e==="Europe/Isle_of_Man")return"uk";if(e.startsWith("Europe/")||e==="Atlantic/Canary"||e==="Atlantic/Madeira"||e==="Atlantic/Azores"||e==="Atlantic/Reykjavik"||e==="Atlantic/Faroe")return"eu";if(e.startsWith("Australia/")||e==="Antarctica/Macquarie")return"au";if(e==="Pacific/Auckland"||e==="Pacific/Chatham"||e==="NZ"||e==="NZ-CHAT")return"nz";if(e.startsWith("US/")||h.has(e))return"us";if(e.startsWith("Canada/"))return"ca";if(e.startsWith("America/")){const n=e.slice(8),t=n.split("/")[0];if(t==="Indiana"||t==="Kentucky"||t==="North_Dakota"||d.has(n))return"us";if(f.has(n))return"ca"}return"other"}function C(o,e){const n=y(o);if(!e)return n;const t=u(e);return r[n].model==="opt-in"?n:(r[t].model==="opt-in",t)}function A(o){const e=new Set,n=[];for(const t of o){const a=u(t);a==="other"||e.has(a)||(e.add(a),n.push(r[a]))}return n.push(r.other),n}function g(o){const e=[...o.googleAds?["Google"]:[],...o.meta?["Facebook","Instagram"]:[]];return e.length<=1?e.join(""):`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}function k(o,e,n){const t=g(n),a=t?`We use cookies to count visits and to show you ${e} ads on ${t}.`:"We use cookies to count visits.";return o.model==="opt-in"?{heading:t?"Cookies and ads":"Cookies",before:`${a} Nothing loads until you choose. You can change this at any time with `,link:o.footerLink,after:" at the bottom of every page."}:{heading:t?"Cookies and ads":"Cookies",before:`${a} You can say no at any time: choose Privacy choices, or use `,link:o.footerLink,after:" at the bottom of every page."}}const w={necessary:{name:"Necessary",body:"Cart, checkout, your country and currency, sign-in, and this choice. The site cannot work without them.",bodyNoSale:"What the site needs to work, such as remembering this choice. The site cannot work without them."},analytics:{name:"Analytics",body:"Counts visits and pages so we can improve the site. Google Analytics and our own visit count."},ads:{body:"Google Ads and Meta (Facebook, Instagram) tags, and the order details we send to them to measure our ads.",bodyNoSale:"Google Ads and Meta (Facebook, Instagram) tags, which measure our ads."}},E={title:"Opt-out request honoured",body:"Your browser sent a Global Privacy Control signal. We have turned off sale and sharing of your information for ads."},P={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on"};export{P as CONSENT_BUTTONS,p as CONSENT_GPC_RULE,r as CONSENT_RULES,m as CONSENT_RULES_VERSION,E as GPC_HONOURED,w as PANEL_ROWS,g as adPlaces,k as bannerWords,u as regionOfCountry,y as regionOfTimeZone,A as rulesForCountries,C as visitorRegion};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t={tyre:"tire",tyres:"tires",colour:"color",colours:"colors",centre:"center",centres:"centers",catalogue:"catalog",catalogues:"catalogs",enquire:"inquire",enquiry:"inquiry",enquiries:"inquiries",aluminium:"aluminum",honour:"honor",honoured:"honored"},i=new RegExp(`\\b(${Object.keys(t).sort((e,r)=>r.length-e.length).join("|")})\\b`,"gi");function s(e){return e==="us"?"us":"international"}function o(e,r){return e===e.toUpperCase()?r.toUpperCase():e[0]===e[0].toUpperCase()?r[0].toUpperCase()+r.slice(1):r}function u(e,r){return r!=="us"?e:e.replace(i,n=>o(n,t[n.toLowerCase()]))}export{t as US_SPELLING,u as inEnglish,s as normalizeEnglishVariant};
|
|
@@ -35,9 +35,13 @@ export interface GalleryProductValue {
|
|
|
35
35
|
href?: string;
|
|
36
36
|
cover?: string;
|
|
37
37
|
photos?: string[];
|
|
38
|
+
vehicle?: string;
|
|
38
39
|
eyebrow?: string;
|
|
39
40
|
hideName?: boolean;
|
|
40
41
|
hideProcess?: boolean;
|
|
41
42
|
hideEyebrow?: boolean;
|
|
42
43
|
hideFinish?: boolean;
|
|
43
44
|
}
|
|
45
|
+
export declare function mediaGroupVehicle(group: {
|
|
46
|
+
vehicle?: string | null;
|
|
47
|
+
} | null | undefined): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function i(e){return(e?.vehicle??"").trim()}export{i as mediaGroupVehicle};
|
|
@@ -3,8 +3,4 @@ export declare const STOCK_WORDS: {
|
|
|
3
3
|
readonly outOfStock: "Out of stock";
|
|
4
4
|
readonly notInStockHere: "Not in stock here";
|
|
5
5
|
};
|
|
6
|
-
export declare function unitsInStock(n: number): string;
|
|
7
|
-
export declare function setsInStock(n: number): string;
|
|
8
|
-
export declare function pickupAt(place: string): string;
|
|
9
|
-
export declare function pickupAtCount(n: number): string;
|
|
10
6
|
export declare function stockWord(inStock: boolean): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o={inStock:"In stock",outOfStock:"Out of stock",notInStockHere:"Not in stock here"};function
|
|
1
|
+
const o={inStock:"In stock",outOfStock:"Out of stock",notInStockHere:"Not in stock here"};function c(t){return t?o.inStock:o.outOfStock}export{o as STOCK_WORDS,c as stockWord};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as c}from"react/jsx-runtime";import d,{GALLERY_ITEM_HINTS as
|
|
1
|
+
import{jsx as c}from"react/jsx-runtime";import d,{GALLERY_ITEM_HINTS as n}from"../../../../../components/GalleryItem.js";import{phHide as r}from"efficient-web-builder/render/lib/puck/blocks/scaffold";import{GalleryItemMeta as f}from"./meta.js";function o(e,t){if(typeof e=="string")return e.trim()===t?"":e;if(e&&typeof e=="object"){const i=e;if(typeof i.text=="string"&&i.text.trim()===t)return{...i,text:""}}return e}const s={...f,render:e=>{const t=e.product??{},i=e.fromProduct===!0&&!!t.code;return c(d,{image:i?t.cover:e.image,photos:i?(t.photos??[]).map(m=>({src:m})):e.photos,href:i?t.href:e.href,process:i?t.hideProcess?void 0:t.category:r(o(e.process,n.process),n.process,e.puck),eyebrow:i?t.hideEyebrow?void 0:t.vehicle||void 0:r(o(e.eyebrow,n.eyebrow),n.eyebrow,e.puck),name:i?t.hideName?void 0:t.name:r(o(e.name,n.name),n.name,e.puck),meta:i?t.hideFinish?void 0:t.finish:r(o(e.meta,n.meta),n.meta,e.puck),previewHover:e.previewHover,ratio:e.ratio,captionPlace:e.captionPlace,editing:e.puck?.isEditing})}};export{s as GalleryItemRender};
|
|
@@ -1131,14 +1131,16 @@
|
|
|
1131
1131
|
"type": "custom",
|
|
1132
1132
|
"__text": {
|
|
1133
1133
|
"control": "plainText",
|
|
1134
|
-
"label": "Label"
|
|
1134
|
+
"label": "Label",
|
|
1135
|
+
"placeholder": "Label"
|
|
1135
1136
|
}
|
|
1136
1137
|
},
|
|
1137
1138
|
"value": {
|
|
1138
1139
|
"type": "custom",
|
|
1139
1140
|
"__text": {
|
|
1140
1141
|
"control": "plainText",
|
|
1141
|
-
"label": "Value"
|
|
1142
|
+
"label": "Value",
|
|
1143
|
+
"placeholder": "Value"
|
|
1142
1144
|
}
|
|
1143
1145
|
},
|
|
1144
1146
|
"href": {
|
|
@@ -1152,7 +1154,8 @@
|
|
|
1152
1154
|
"type": "custom",
|
|
1153
1155
|
"__text": {
|
|
1154
1156
|
"control": "plainText",
|
|
1155
|
-
"label": "Sub line"
|
|
1157
|
+
"label": "Sub line",
|
|
1158
|
+
"placeholder": "Sub line"
|
|
1156
1159
|
}
|
|
1157
1160
|
}
|
|
1158
1161
|
}
|
|
@@ -9,8 +9,16 @@ export interface GridColumns {
|
|
|
9
9
|
export declare function gridColumnsOf(gridClass: string): GridColumns;
|
|
10
10
|
export declare function fillRowColumns(columns: number, cards: number): number;
|
|
11
11
|
export declare function fillRow(grid: GridColumns, cards: number): GridColumns;
|
|
12
|
+
export declare const gridTracks: (n: number) => string;
|
|
12
13
|
export interface FillRowCards {
|
|
13
14
|
limit?: number;
|
|
14
15
|
cards?: number;
|
|
15
16
|
}
|
|
16
17
|
export declare function fillRowCss(cls: string, gridClass: string, { limit, cards }?: FillRowCards): string;
|
|
18
|
+
export interface GridBand {
|
|
19
|
+
min?: number;
|
|
20
|
+
max?: number;
|
|
21
|
+
columns: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function gridBands({ base, steps }: GridColumns): GridBand[];
|
|
24
|
+
export declare function inBand(band: GridBand, rules: readonly string[]): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a(n){const o=/(?:^|\s)grid-cols-(\d+)(?=\s|$)/.exec(n);if(!o)throw new Error(`gridColumnsOf: no base grid-cols-N in "${n}"`);const e=[...n.matchAll(/(?:^|\s)max-\[(\d+)px\]:grid-cols-(\d+)(?=\s|$)/g)].map(t=>({below:Number(t[1]),columns:Number(t[2])})).sort((t,u)=>u.below-t.below);return{base:Number(o[1]),steps:e}}function f(n,o){return Math.max(1,Math.min(n,Math.floor(o)))}function w(n,o){return{base:f(n.base,o),steps:n.steps.map(e=>({below:e.below,columns:f(e.columns,o)}))}}const d=n=>`grid-template-columns:repeat(${n},minmax(0,1fr))`;function $(n,o,{limit:e,cards:t}={}){const u=a(o),r=typeof e=="number"&&e>0?e:void 0,p=Math.max(u.base,...u.steps.map(i=>i.columns));if(t!==void 0&&Math.min(t,r??1/0)>=p)return"";const l=[];for(const i of x(u)){const s=r===void 0?i.columns:f(i.columns,r),c=[];s<i.columns&&c.push(`.${n}.${n}{${d(s)}}`);for(let m=s-1;m>=1;m--)c.push(`.${n}:not(:has(> :nth-child(${m+1}))){${d(m)}}`);l.push(h(i,c))}return l.join("")}function x({base:n,steps:o}){return[{min:o[0]?.below,max:void 0,columns:n},...o.map((e,t)=>({min:o[t+1]?.below,max:e.below,columns:e.columns}))]}function h(n,o){if(o.length===0)return"";const e=n.min!==void 0&&n.max!==void 0?`(${n.min}px <= width < ${n.max}px)`:n.max!==void 0?`(width < ${n.max}px)`:n.min!==void 0?`(width >= ${n.min}px)`:void 0;return e?`@media ${e}{${o.join("")}}`:o.join("")}export{w as fillRow,f as fillRowColumns,$ as fillRowCss,x as gridBands,a as gridColumnsOf,d as gridTracks,h as inBand};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type GridBand } from "./fill-row.js";
|
|
2
|
+
export declare const SET_CARD_SINGLE_BELOW = 800;
|
|
3
|
+
export declare function packsFull(spans: readonly number[], columns: number): boolean;
|
|
4
|
+
export declare function cardsWithoutHole(spans: readonly number[], columns: number, limit: number | undefined, topUp?: boolean): number;
|
|
5
|
+
export interface NoHoleBand {
|
|
6
|
+
band: GridBand;
|
|
7
|
+
cards: number;
|
|
8
|
+
tracks: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function noHoleBands(gridClass: string, spans: readonly number[], limit: number | undefined, topUp?: boolean): NoHoleBand[];
|
|
11
|
+
export declare function showsASetCard(spans: readonly number[], limit: number | undefined): boolean;
|
|
12
|
+
export declare function noHoleCss(cls: string, bands: readonly NoHoleBand[], cards: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{gridBands as l,gridColumnsOf as h,gridTracks as d,inBand as x}from"./fill-row.js";const m=800;function p(t,r){const n=[],f=(o,e,i)=>{for(let c=e;c<e+i;c++)if(n[o][c])return!1;return!0};for(const o of t){const e=Math.max(1,Math.min(r,o));for(let i=0;;i++){n[i]??=Array(r).fill(!1);let c=0;for(;c+e<=r&&!f(i,c,e);)c++;if(!(c+e>r)){for(let s=c;s<c+e;s++)n[i][s]=!0;break}}}return n.every(o=>o.every(Boolean))}const a=(t,r)=>t.reduce((n,f)=>n+Math.max(1,Math.min(r,f)),0),u=(t,r)=>p(t,Math.min(r,Math.max(1,a(t,r))));function w(t,r,n,f=!0){const o=Math.min(t.length,n&&n>0?n:t.length);if(o===0||u(t.slice(0,o),r))return o;if(f){for(let e=o+1;e<=t.length;e++)if(u(t.slice(0,e),r))return e}for(let e=o-1;e>=1;e--)if(u(t.slice(0,e),r))return e;return o}const M=(t,r)=>r.max!==void 0&&r.max<=m?t.map(()=>1):t;function k(t,r,n,f=!0){return l(h(t)).map(o=>{const e=M(r,o),i=w(e,o.columns,n,f),c=a(e.slice(0,i),o.columns);return{band:o,cards:i,tracks:Math.min(o.columns,Math.max(1,c))}})}function $(t,r){return t.slice(0,r&&r>0?r:t.length).some(n=>n>1)}function B(t,r,n){const f=[`.${t}{grid-auto-flow:row dense}`];for(const{band:o,cards:e,tracks:i}of r){const c=[];e<n&&c.push(`.${t} > *:nth-child(n+${e+1}){display:none}`),i<o.columns&&c.push(`.${t}.${t}{${d(i)}}`),f.push(x(o,c))}return f.join("")}export{m as SET_CARD_SINGLE_BELOW,w as cardsWithoutHole,k as noHoleBands,B as noHoleCss,p as packsFull,$ as showsASetCard};
|
|
@@ -2,7 +2,6 @@ import { type PlpFilterState } from "./plp-filters.js";
|
|
|
2
2
|
import type { CatalogFilterState } from "./catalog-filters.js";
|
|
3
3
|
import type { VehicleSelection } from "./fitment-options.js";
|
|
4
4
|
export type UnmappableCatalogFacet = "lugs" | "priceMin";
|
|
5
|
-
export declare const UNMAPPABLE_FACET_LABELS: Record<UnmappableCatalogFacet, string>;
|
|
6
5
|
export declare const RESULTS_LINK_BLOCKED_NOTE: string;
|
|
7
6
|
export declare function unmappableCatalogFacets(f: CatalogFilterState): UnmappableCatalogFacet[];
|
|
8
7
|
export declare function catalogFiltersToListingFilters(f: CatalogFilterState): PlpFilterState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{EMPTY_PLP_FILTERS as h,plpFiltersToParams as
|
|
1
|
+
import{EMPTY_PLP_FILTERS as h,plpFiltersToParams as d}from"./plp-filters.js";import{appendVehicleParams as g}from"./plp-vehicle-params.js";const x="The results link is off while the Lugs filter is on. The product listing page filters on bolt pattern and has no lug filter, so a shopper's lug choice could not be carried across — they would land on a wider set of products than they asked for. Turn Lugs off to use the results link.";function F(s){const t=[];return s.lugs!=null&&t.push("lugs"),s.priceMin!=null&&t.push("priceMin"),t}function f(s){return s==="default"?"recommended":s}function m(s){return{...h,collections:s.process?[s.process]:[],diameters:s.size!=null?[s.size]:[],finishes:s.finish?[s.finish]:[],priceMax:s.priceMax,sort:f(s.sort)}}function P(s,t,l){const e=s.indexOf("#"),a=e===-1?"":s.slice(e),o=e===-1?s:s.slice(0,e),i=o.indexOf("?"),c=i===-1?o:o.slice(0,i),n=new URLSearchParams(i===-1?"":o.slice(i+1));for(const[u,p]of d(m(t)))n.set(u,p);g(n,l);const r=n.toString();return`${c}${r?`?${r}`:""}${a}`}export{x as RESULTS_LINK_BLOCKED_NOTE,m as catalogFiltersToListingFilters,P as listingLinkFromCatalogFilters,F as unmappableCatalogFacets};
|
|
@@ -16,4 +16,3 @@ export declare const EMPTY_FILTERS: CatalogFilterState;
|
|
|
16
16
|
export declare function wheelMatchesFilters(wheel: WheelSummary, f: CatalogFilterState, currency: Currency): boolean;
|
|
17
17
|
export declare function sortWheels(wheels: WheelSummary[], sort: SortKey, currency: Currency): WheelSummary[];
|
|
18
18
|
export declare function applyCatalogFilters(wheels: WheelSummary[], f: CatalogFilterState, currency: Currency, fit?: VehicleFitment | null): WheelSummary[];
|
|
19
|
-
export declare function hasActiveFilters(f: CatalogFilterState): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wheelsFittingVehicle as l}from"./plp-fitment-match.js";import{comparePrice as n,withinPriceRange as
|
|
1
|
+
import{wheelsFittingVehicle as l}from"./plp-fitment-match.js";import{comparePrice as n,withinPriceRange as o}from"./price-display.js";import{itemLugs as u}from"./lug-count.js";const d={default:"Sort · Featured",new:"Newest","price-asc":"Price · Low","price-desc":"Price · High",name:"Name A–Z"},h={process:null,size:null,lugs:null,finish:null,priceMin:null,priceMax:null,sort:"default"};function a(r,e,i){return!(e.process&&r.process!==e.process||e.size&&!r.sizes.includes(e.size)||e.lugs!=null&&u(r)!==e.lugs||e.finish&&!r.finishes.some(s=>s.family===e.finish)||!o(r.prices,i,e.priceMin,e.priceMax))}function p(r,e,i){return[...r].sort((s,t)=>{switch(e){case"price-asc":return n(s.prices,t.prices,i,"asc");case"price-desc":return n(s.prices,t.prices,i,"desc");case"name":return s.name.localeCompare(t.name);case"new":return(t.badge==="new"?1:0)-(s.badge==="new"?1:0);default:return 0}})}function x(r,e,i,s=null){const t=l(r,s);return p(t.filter(c=>a(c,e,i)),e.sort,i)}export{h as EMPTY_FILTERS,d as SORT_LABELS,x as applyCatalogFilters,p as sortWheels,a as wheelMatchesFilters};
|
package/dist/words.d.ts
CHANGED
|
@@ -599,6 +599,7 @@ export type WebBuilderPhrase =
|
|
|
599
599
|
| "Image stage"
|
|
600
600
|
| "Image tint"
|
|
601
601
|
| "Image width"
|
|
602
|
+
| "Image — set a path"
|
|
602
603
|
| "In its own box"
|
|
603
604
|
| "In progress (accent)"
|
|
604
605
|
| "In the product"
|
|
@@ -1343,7 +1344,6 @@ export type StorefrontBlocksPhrase =
|
|
|
1343
1344
|
| "A short description of your newsletter or publication."
|
|
1344
1345
|
| "A short summary of the post appears here."
|
|
1345
1346
|
| "A third"
|
|
1346
|
-
| "About us"
|
|
1347
1347
|
| "Accessories"
|
|
1348
1348
|
| "Account and cart"
|
|
1349
1349
|
| "Add a line of footer text."
|
|
@@ -1409,7 +1409,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1409
1409
|
| "Car prompt"
|
|
1410
1410
|
| "Card text"
|
|
1411
1411
|
| "Cards to show"
|
|
1412
|
-
| "Cart, checkout, your country and currency, sign-in, and this choice. The
|
|
1412
|
+
| "Cart, checkout, your country and currency, sign-in, and this choice. The site cannot work without them."
|
|
1413
1413
|
| "Cash"
|
|
1414
1414
|
| "Categories"
|
|
1415
1415
|
| "Category — wheels only"
|
|
@@ -1556,6 +1556,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1556
1556
|
| "Globe and code"
|
|
1557
1557
|
| "Goes to {place}"
|
|
1558
1558
|
| "Google Ads and Meta (Facebook, Instagram) tags, and the order details we send to them to measure our ads."
|
|
1559
|
+
| "Google Ads and Meta (Facebook, Instagram) tags, which measure our ads."
|
|
1559
1560
|
| "Group covers"
|
|
1560
1561
|
| "Group {n}"
|
|
1561
1562
|
| "Groups"
|
|
@@ -1595,7 +1596,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1595
1596
|
| "Issues"
|
|
1596
1597
|
| "Item name"
|
|
1597
1598
|
| "Items to display"
|
|
1598
|
-
| "Its
|
|
1599
|
+
| "Its photos become the card cover and lightbox, and its car fills the Vehicle below. No group → the product’s cover image."
|
|
1599
1600
|
| "Join our email list"
|
|
1600
1601
|
| "Joins the “{audience}” audience"
|
|
1601
1602
|
| "Joins the “{audience}” audience, but only when the consent box is ticked"
|
|
@@ -1643,7 +1644,6 @@ export type StorefrontBlocksPhrase =
|
|
|
1643
1644
|
| "Lugs"
|
|
1644
1645
|
| "M"
|
|
1645
1646
|
| "Main + thumbs"
|
|
1646
|
-
| "Main heading & *highlight*"
|
|
1647
1647
|
| "Main only"
|
|
1648
1648
|
| "Make"
|
|
1649
1649
|
| "Manage menus →"
|
|
@@ -1745,7 +1745,6 @@ export type StorefrontBlocksPhrase =
|
|
|
1745
1745
|
| "Posts to display"
|
|
1746
1746
|
| "Price / quote"
|
|
1747
1747
|
| "Price and details come from the product record — edit them in the Products database and this block updates to match. The name follows the product’s design name unless it’s overridden per storefront in {place}."
|
|
1748
|
-
| "Price from"
|
|
1749
1748
|
| "Price on request"
|
|
1750
1749
|
| "Price position"
|
|
1751
1750
|
| "Price · High"
|
|
@@ -1963,6 +1962,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1963
1962
|
| "Use company default"
|
|
1964
1963
|
| "Use my real delivery options"
|
|
1965
1964
|
| "Using your company logo from the database."
|
|
1965
|
+
| "Vehicle"
|
|
1966
1966
|
| "Vehicle catalog unavailable in this preview — the picker fills from the live fitment API on the published site."
|
|
1967
1967
|
| "Vehicle fitment"
|
|
1968
1968
|
| "Vehicle list unavailable"
|
|
@@ -1974,6 +1974,7 @@ export type StorefrontBlocksPhrase =
|
|
|
1974
1974
|
| "Waiting for editor authorization…"
|
|
1975
1975
|
| "Welcome heading"
|
|
1976
1976
|
| "Welcome intro"
|
|
1977
|
+
| "What the site needs to work, such as remembering this choice. The site cannot work without them."
|
|
1977
1978
|
| "What this room has."
|
|
1978
1979
|
| "What would you like to cover?"
|
|
1979
1980
|
| "Wheel"
|