@storepecker/storefront-core 2.3.5 → 2.4.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/dist/api/index.cjs +28 -24
- package/dist/api/index.d.cts +2 -1
- package/dist/api/index.d.ts +2 -1
- package/dist/api/index.js +1 -1
- package/dist/checkout/index.cjs +22 -22
- package/dist/checkout/index.js +2 -2
- package/dist/{chunk-BTT3XQ32.cjs → chunk-33TWVRZE.cjs} +6 -6
- package/dist/chunk-3YRSHPM6.cjs +34 -0
- package/dist/chunk-5NUDTIQ2.js +9 -0
- package/dist/{chunk-ILVGYHNI.js → chunk-6Q7QMPOQ.js} +2 -1
- package/dist/{chunk-HTFVROIV.cjs → chunk-7UK3E7SL.cjs} +6 -0
- package/dist/chunk-B3BXKMQA.cjs +271 -0
- package/dist/chunk-BTR3HLL4.js +14 -0
- package/dist/chunk-DODFO744.cjs +11 -0
- package/dist/chunk-EGFOTJPC.js +22 -0
- package/dist/{chunk-YUPBTD4M.js → chunk-F45S7UWC.js} +1 -139
- package/dist/chunk-HAQWCNDY.cjs +24 -0
- package/dist/{chunk-Y4NGR42Z.js → chunk-HUIT4JCR.js} +1 -1
- package/dist/{chunk-TF2KMTB6.js → chunk-JRYWZMNT.js} +1 -1
- package/dist/{chunk-JCOOINQF.cjs → chunk-KLNKIQQM.cjs} +4 -3
- package/dist/chunk-L43KF3AC.js +269 -0
- package/dist/chunk-LHF5BSWO.cjs +16 -0
- package/dist/chunk-LJUGNSQQ.cjs +149 -0
- package/dist/chunk-NA5GT4D3.js +75 -0
- package/dist/chunk-OSM73ETC.js +139 -0
- package/dist/{chunk-4CVKE6CC.cjs → chunk-OTMTHA5C.cjs} +0 -147
- package/dist/{chunk-JH4JJBXE.cjs → chunk-TTIQRDHX.cjs} +2 -2
- package/dist/chunk-U7EXLQCT.js +32 -0
- package/dist/{chunk-LW3V53WJ.js → chunk-UVU7H4E6.js} +6 -1
- package/dist/chunk-V447PVRV.cjs +308 -0
- package/dist/chunk-VWQR3A7V.cjs +81 -0
- package/dist/chunk-YK4M3SFP.js +301 -0
- package/dist/components/address-form.cjs +17 -0
- package/dist/components/address-form.css +329 -0
- package/dist/components/address-form.d.cts +33 -0
- package/dist/components/address-form.d.ts +33 -0
- package/dist/components/address-form.js +11 -0
- package/dist/components/digital-product-download-modal.cjs +8 -0
- package/dist/components/digital-product-download-modal.d.cts +15 -0
- package/dist/components/digital-product-download-modal.d.ts +15 -0
- package/dist/components/digital-product-download-modal.js +2 -0
- package/dist/components/index.cjs +35 -684
- package/dist/components/index.d.cts +14 -82
- package/dist/components/index.d.ts +14 -82
- package/dist/components/index.js +11 -678
- package/dist/components/search-dropdown.cjs +7 -0
- package/dist/components/search-dropdown.css +200 -0
- package/dist/components/search-dropdown.d.cts +28 -0
- package/dist/components/search-dropdown.d.ts +28 -0
- package/dist/components/search-dropdown.js +1 -0
- package/dist/components/share-button.cjs +9 -0
- package/dist/components/share-button.d.cts +11 -0
- package/dist/components/share-button.d.ts +11 -0
- package/dist/components/share-button.js +3 -0
- package/dist/components/share-icon.cjs +7 -0
- package/dist/components/share-icon.d.cts +9 -0
- package/dist/components/share-icon.d.ts +9 -0
- package/dist/components/share-icon.js +1 -0
- package/dist/components/theme-data-initializer.cjs +8 -0
- package/dist/components/theme-data-initializer.d.cts +12 -0
- package/dist/components/theme-data-initializer.d.ts +12 -0
- package/dist/components/theme-data-initializer.js +2 -0
- package/dist/hooks/index.cjs +18 -17
- package/dist/hooks/index.js +6 -5
- package/dist/pixelEvents-Bo-VjAx8.d.ts +371 -0
- package/dist/pixelEvents-C1rFPOwb.d.cts +371 -0
- package/dist/store/index.cjs +10 -5
- package/dist/store/index.d.cts +10 -1
- package/dist/store/index.d.ts +10 -1
- package/dist/store/index.js +3 -2
- package/dist/utils/index.cjs +44 -43
- package/dist/utils/index.d.cts +7 -370
- package/dist/utils/index.d.ts +7 -370
- package/dist/utils/index.js +3 -2
- package/package.json +49 -1
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { b as Category$1, C as Cart } from './cart-y-7RPmnQ.js';
|
|
2
|
+
import { C as CollectionResponse } from './collections-BDSVfRNo.js';
|
|
3
|
+
import { O as Order } from './orders-L_8eIkUS.js';
|
|
4
|
+
import { f as ProductDetail, d as Product } from './product-DJMdi4D4.js';
|
|
5
|
+
|
|
6
|
+
interface PageProps {
|
|
7
|
+
nav_bar: NavBar;
|
|
8
|
+
store: string;
|
|
9
|
+
store_desc: string;
|
|
10
|
+
page_meta_data: PageMeta;
|
|
11
|
+
primary_color: string;
|
|
12
|
+
social_media: SocialMedia[];
|
|
13
|
+
}
|
|
14
|
+
type PageMeta = {
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
image: string;
|
|
18
|
+
url: string;
|
|
19
|
+
canonical_url: string;
|
|
20
|
+
appleTouchIcon: string;
|
|
21
|
+
twitter_card_size: string;
|
|
22
|
+
favIcon: string;
|
|
23
|
+
};
|
|
24
|
+
interface TemplateTheme {
|
|
25
|
+
primary: string;
|
|
26
|
+
secondary: string;
|
|
27
|
+
}
|
|
28
|
+
interface Logo {
|
|
29
|
+
url: string;
|
|
30
|
+
title: string;
|
|
31
|
+
}
|
|
32
|
+
interface NavElementOld {
|
|
33
|
+
title: string;
|
|
34
|
+
is_dropdown: boolean;
|
|
35
|
+
link?: string;
|
|
36
|
+
menuitems?: Menuitem[];
|
|
37
|
+
}
|
|
38
|
+
interface Menuitem {
|
|
39
|
+
id: number;
|
|
40
|
+
title: string;
|
|
41
|
+
link: string;
|
|
42
|
+
sub_categories?: SubCategory[];
|
|
43
|
+
}
|
|
44
|
+
interface SubCategory {
|
|
45
|
+
id: number;
|
|
46
|
+
title: string;
|
|
47
|
+
link: string;
|
|
48
|
+
}
|
|
49
|
+
interface SocialMedia {
|
|
50
|
+
type: string;
|
|
51
|
+
link: string;
|
|
52
|
+
}
|
|
53
|
+
interface PagePropsFull {
|
|
54
|
+
store: number;
|
|
55
|
+
theme: Theme;
|
|
56
|
+
privacy_policy: any;
|
|
57
|
+
terms_and_condition: any;
|
|
58
|
+
custom_css: string;
|
|
59
|
+
custom_js: string;
|
|
60
|
+
navbar: NavBar;
|
|
61
|
+
color_scheme: ColorScheme;
|
|
62
|
+
social_links: SocialLinks;
|
|
63
|
+
hero: Hero;
|
|
64
|
+
sections: Section[];
|
|
65
|
+
footer: Footer;
|
|
66
|
+
start_head_tag: string;
|
|
67
|
+
end_head_tag: string;
|
|
68
|
+
start_body_tag: string;
|
|
69
|
+
end_body_tag: string;
|
|
70
|
+
logo: string;
|
|
71
|
+
favicon: string;
|
|
72
|
+
store_name: string;
|
|
73
|
+
store_description: string;
|
|
74
|
+
social_image: string;
|
|
75
|
+
url: string;
|
|
76
|
+
categories: HeaderCategory[];
|
|
77
|
+
store_phone: string;
|
|
78
|
+
store_email: string;
|
|
79
|
+
store_address: string;
|
|
80
|
+
google_tag_manager_id?: string;
|
|
81
|
+
}
|
|
82
|
+
type PageHeaderProps = Pick<PagePropsFull, "navbar" | "logo" | "store_name" | "store_description" | "color_scheme" | "social_image" | "social_links" | "url" | "footer" | "categories" | "store_phone" | "store_email" | "store_address" | "start_head_tag" | "end_head_tag" | "start_body_tag" | "end_body_tag" | "google_tag_manager_id"> & {
|
|
83
|
+
currency_code: string;
|
|
84
|
+
currency_symbol: string;
|
|
85
|
+
is_cod_enabled: boolean;
|
|
86
|
+
cod_amount: number;
|
|
87
|
+
store_review_enabled: boolean;
|
|
88
|
+
product_review_enabled: boolean;
|
|
89
|
+
store_review_popup_delay: number;
|
|
90
|
+
store_review_popup_delay_unit: "hours" | "days" | "weeks" | "months" | "minutes" | "seconds";
|
|
91
|
+
popup_enabled: boolean;
|
|
92
|
+
popup_heading_text: string;
|
|
93
|
+
popup_message_text: string;
|
|
94
|
+
popup_thank_you_message: string;
|
|
95
|
+
public_checkout_enabled: boolean;
|
|
96
|
+
booking_success_message: string;
|
|
97
|
+
order_success_message: string;
|
|
98
|
+
};
|
|
99
|
+
type HomePageContents = Pick<PagePropsFull, "hero" | "sections">;
|
|
100
|
+
interface Theme {
|
|
101
|
+
id: number;
|
|
102
|
+
name: string;
|
|
103
|
+
slug: string;
|
|
104
|
+
color_scheme: ColorScheme;
|
|
105
|
+
is_active: boolean;
|
|
106
|
+
}
|
|
107
|
+
interface ColorScheme {
|
|
108
|
+
primary: string;
|
|
109
|
+
secondary: string;
|
|
110
|
+
bodyBackground: string;
|
|
111
|
+
bodyBackground1: string;
|
|
112
|
+
bodyBackgroundSecondary: string;
|
|
113
|
+
bodyBackgroundDark: string;
|
|
114
|
+
borderBackground: string;
|
|
115
|
+
textPrimary: string;
|
|
116
|
+
textPrimaryLight: string;
|
|
117
|
+
textSecondary: string;
|
|
118
|
+
btnText: string;
|
|
119
|
+
}
|
|
120
|
+
interface RibbonMessage {
|
|
121
|
+
id: string;
|
|
122
|
+
message: string;
|
|
123
|
+
link: string;
|
|
124
|
+
}
|
|
125
|
+
interface RibbonBar {
|
|
126
|
+
type: "ribbon-bar";
|
|
127
|
+
messages: RibbonMessage[];
|
|
128
|
+
textColor: string;
|
|
129
|
+
id: string;
|
|
130
|
+
position: "top" | "bottom";
|
|
131
|
+
animation: string;
|
|
132
|
+
switchInterval: number;
|
|
133
|
+
}
|
|
134
|
+
interface NavBar {
|
|
135
|
+
wishlist: boolean;
|
|
136
|
+
cart: boolean;
|
|
137
|
+
navElements: NavElement[];
|
|
138
|
+
}
|
|
139
|
+
interface NavBar {
|
|
140
|
+
wishlist: boolean;
|
|
141
|
+
cart: boolean;
|
|
142
|
+
navElements: NavElement[];
|
|
143
|
+
ribbonbar: RibbonBar;
|
|
144
|
+
logoPosition: "left" | "center";
|
|
145
|
+
}
|
|
146
|
+
interface NavElement {
|
|
147
|
+
key: string;
|
|
148
|
+
title: string;
|
|
149
|
+
is_dropdown: boolean;
|
|
150
|
+
link?: string;
|
|
151
|
+
enabled?: boolean;
|
|
152
|
+
description: string;
|
|
153
|
+
}
|
|
154
|
+
interface NavElement {
|
|
155
|
+
key: string;
|
|
156
|
+
title: string;
|
|
157
|
+
is_dropdown: boolean;
|
|
158
|
+
link?: string;
|
|
159
|
+
enabled?: boolean;
|
|
160
|
+
description: string;
|
|
161
|
+
}
|
|
162
|
+
interface HeaderCategory {
|
|
163
|
+
id: number;
|
|
164
|
+
name: string;
|
|
165
|
+
link: string;
|
|
166
|
+
slug: string;
|
|
167
|
+
children?: HeaderCategory[];
|
|
168
|
+
}
|
|
169
|
+
interface SliderSettings {
|
|
170
|
+
id: string;
|
|
171
|
+
title: string;
|
|
172
|
+
description: string;
|
|
173
|
+
cta: string;
|
|
174
|
+
ctaLink: string;
|
|
175
|
+
bannerImage: string;
|
|
176
|
+
bannerImageMobile: string;
|
|
177
|
+
showContents?: boolean;
|
|
178
|
+
}
|
|
179
|
+
interface Hero {
|
|
180
|
+
title: string;
|
|
181
|
+
cta: string;
|
|
182
|
+
ctaLink: string;
|
|
183
|
+
heroImage: string;
|
|
184
|
+
description: string;
|
|
185
|
+
heroImageMobile: string;
|
|
186
|
+
showTitle: boolean;
|
|
187
|
+
showCTA: boolean;
|
|
188
|
+
bannerLink: string;
|
|
189
|
+
enableSlider: boolean;
|
|
190
|
+
sliderSettings: SliderSettings[];
|
|
191
|
+
switchInterval: number;
|
|
192
|
+
showHeroBanner: boolean;
|
|
193
|
+
}
|
|
194
|
+
type FilterType = "category" | "badge" | "title";
|
|
195
|
+
type FilterOption = "select" | "equals" | "contain" | "startWith" | "endWith";
|
|
196
|
+
type AvailableFilter = {
|
|
197
|
+
id: number;
|
|
198
|
+
label: string;
|
|
199
|
+
value: FilterType;
|
|
200
|
+
options: FilterOption[];
|
|
201
|
+
};
|
|
202
|
+
interface SectionFilters {
|
|
203
|
+
id: string;
|
|
204
|
+
type: FilterType;
|
|
205
|
+
label: string;
|
|
206
|
+
condition: FilterOption;
|
|
207
|
+
value: string | string[];
|
|
208
|
+
}
|
|
209
|
+
interface SectionFilters {
|
|
210
|
+
id: string;
|
|
211
|
+
type: FilterType;
|
|
212
|
+
label: string;
|
|
213
|
+
condition: FilterOption;
|
|
214
|
+
value: string | string[];
|
|
215
|
+
}
|
|
216
|
+
interface ProductCollection {
|
|
217
|
+
type: "product-collection";
|
|
218
|
+
title?: string;
|
|
219
|
+
filters?: SectionFilters[];
|
|
220
|
+
id: string;
|
|
221
|
+
row_count: number;
|
|
222
|
+
}
|
|
223
|
+
interface Category {
|
|
224
|
+
type: "categories";
|
|
225
|
+
title?: string;
|
|
226
|
+
id?: string;
|
|
227
|
+
categories?: Category$1.Root[];
|
|
228
|
+
selectedCategories?: string[];
|
|
229
|
+
}
|
|
230
|
+
interface Banner {
|
|
231
|
+
type: "banner";
|
|
232
|
+
title: string;
|
|
233
|
+
description?: string;
|
|
234
|
+
bannerImage: string;
|
|
235
|
+
ctaText?: string;
|
|
236
|
+
ctaLink?: string;
|
|
237
|
+
id: string;
|
|
238
|
+
bannerLink: string;
|
|
239
|
+
showContents: boolean;
|
|
240
|
+
mobileBannerImage: string;
|
|
241
|
+
}
|
|
242
|
+
interface SubCategorySection {
|
|
243
|
+
type: "sub-categories";
|
|
244
|
+
id: number;
|
|
245
|
+
title: string;
|
|
246
|
+
category?: Category$1.Root;
|
|
247
|
+
}
|
|
248
|
+
interface preFooterContent {
|
|
249
|
+
id: string;
|
|
250
|
+
image: string;
|
|
251
|
+
title: string;
|
|
252
|
+
description: string;
|
|
253
|
+
}
|
|
254
|
+
interface PreFooter {
|
|
255
|
+
type: "pre-footer";
|
|
256
|
+
id: string;
|
|
257
|
+
contents: preFooterContent[];
|
|
258
|
+
}
|
|
259
|
+
interface CategoryHighlights {
|
|
260
|
+
type: "category-highlights";
|
|
261
|
+
title?: string;
|
|
262
|
+
id?: string;
|
|
263
|
+
categories: Category$1.Root[];
|
|
264
|
+
}
|
|
265
|
+
interface StoreReview {
|
|
266
|
+
type: "store-review";
|
|
267
|
+
id: string;
|
|
268
|
+
title: string;
|
|
269
|
+
filter: string;
|
|
270
|
+
reviewsCount: number;
|
|
271
|
+
starColor: string;
|
|
272
|
+
autoPlayEnabled: boolean;
|
|
273
|
+
}
|
|
274
|
+
interface ProductHighlight {
|
|
275
|
+
type: "product-highlight";
|
|
276
|
+
id: string;
|
|
277
|
+
title: string;
|
|
278
|
+
productSlug: string;
|
|
279
|
+
}
|
|
280
|
+
interface ImageWithText {
|
|
281
|
+
type: "image-with-text";
|
|
282
|
+
id: string;
|
|
283
|
+
title: string;
|
|
284
|
+
content: string;
|
|
285
|
+
image: string;
|
|
286
|
+
showCta: boolean;
|
|
287
|
+
ctaText: string;
|
|
288
|
+
ctaLink: string;
|
|
289
|
+
imagePosition: 'left' | 'right';
|
|
290
|
+
}
|
|
291
|
+
interface Collections {
|
|
292
|
+
type: "collections";
|
|
293
|
+
id: string;
|
|
294
|
+
slug: string;
|
|
295
|
+
title?: string;
|
|
296
|
+
description?: string;
|
|
297
|
+
variants?: CollectionResponse[];
|
|
298
|
+
}
|
|
299
|
+
interface ValueHighlights {
|
|
300
|
+
type: "value-highlights";
|
|
301
|
+
id: string;
|
|
302
|
+
title: string;
|
|
303
|
+
description: string;
|
|
304
|
+
highlights: {
|
|
305
|
+
value: string;
|
|
306
|
+
label: string;
|
|
307
|
+
image: string;
|
|
308
|
+
social: null | string;
|
|
309
|
+
}[];
|
|
310
|
+
}
|
|
311
|
+
type SectionType = "product-collection" | "categories" | "banner" | "sub-categories" | "pre-footer" | "category-highlights" | "store-review" | "product-highlight" | "image-with-text" | "collections" | "value-highlights";
|
|
312
|
+
type Section = ProductCollection | Category | Banner | PreFooter | StoreReview | CategoryHighlights | SubCategorySection | ProductHighlight | ImageWithText | Collections | ValueHighlights;
|
|
313
|
+
interface Footer {
|
|
314
|
+
showSocialLinks: boolean;
|
|
315
|
+
showContactDetails: boolean;
|
|
316
|
+
showNameWithLogo: boolean;
|
|
317
|
+
showWhatsappBubble: boolean;
|
|
318
|
+
showMadeWithStorepecker: boolean;
|
|
319
|
+
}
|
|
320
|
+
interface SocialLinks {
|
|
321
|
+
}
|
|
322
|
+
interface LocationData {
|
|
323
|
+
country_code: string;
|
|
324
|
+
city: string;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
declare global {
|
|
328
|
+
interface Window {
|
|
329
|
+
fbq: any;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
declare const pixelEvents: {
|
|
333
|
+
/**
|
|
334
|
+
* Track when a user views a product
|
|
335
|
+
*/
|
|
336
|
+
productView: (product: ProductDetail.Root) => void;
|
|
337
|
+
/**
|
|
338
|
+
* Track when a product is added to cart
|
|
339
|
+
*/
|
|
340
|
+
addToCart: (product: Product.ProductList, quantity?: number) => void;
|
|
341
|
+
removeFromCart: (product: ProductDetail.Root) => void;
|
|
342
|
+
/**
|
|
343
|
+
* Track when a product is added to wishlist
|
|
344
|
+
*/
|
|
345
|
+
addToWishlist: (product: Product.ProductList) => void;
|
|
346
|
+
/**
|
|
347
|
+
* Track when user initiates checkout
|
|
348
|
+
*/
|
|
349
|
+
initiateCheckout: (orderSummary: Order.OrderSummary, paymentMethod: string) => void;
|
|
350
|
+
/**
|
|
351
|
+
* Track successful purchases
|
|
352
|
+
*/
|
|
353
|
+
purchase: (orderSummary: Order.OrderSummary) => void;
|
|
354
|
+
/**
|
|
355
|
+
* Track search events
|
|
356
|
+
*/
|
|
357
|
+
search: (searchTerm: string, resultCount: number) => void;
|
|
358
|
+
/**
|
|
359
|
+
* Track when a user views their cart
|
|
360
|
+
*/
|
|
361
|
+
cartView: (cart: Cart.Root) => void;
|
|
362
|
+
/**
|
|
363
|
+
* Track when a user completes a checkout
|
|
364
|
+
*/
|
|
365
|
+
checkoutCompleted: (orderSummary: Order.OrderSummary) => void;
|
|
366
|
+
addressInfoSubmitted: () => void;
|
|
367
|
+
checkoutStarted: (cart: Cart.Root) => void;
|
|
368
|
+
pageViewed: () => void;
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
export { type AvailableFilter as A, type Banner as B, type Category as C, pixelEvents as D, type preFooterContent as E, type FilterOption as F, type HeaderCategory as H, type ImageWithText as I, type LocationData as L, type Menuitem as M, type NavBar as N, type PageHeaderProps as P, type RibbonBar as R, type SectionFilters as S, type TemplateTheme as T, type ValueHighlights as V, type CategoryHighlights as a, type Collections as b, type ColorScheme as c, type FilterType as d, type Footer as e, type Hero as f, type HomePageContents as g, type Logo as h, type NavElement as i, type NavElementOld as j, type PageMeta as k, type PageProps as l, type PagePropsFull as m, type PreFooter as n, type ProductCollection as o, type ProductHighlight as p, type RibbonMessage as q, type Section as r, type SectionType as s, type SliderSettings as t, type SocialLinks as u, type SocialMedia as v, type StoreReview as w, type SubCategory as x, type SubCategorySection as y, type Theme as z };
|