@growupsell/react-ecommerce-core 1.0.2 → 2.0.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/README.md +35 -0
- package/dist/business-config-context.cjs +14 -0
- package/dist/business-config-context.cjs.map +1 -0
- package/dist/business-config-context.d.cts +10 -0
- package/dist/business-config-context.d.ts +10 -0
- package/dist/business-config-context.js +3 -0
- package/dist/business-config-context.js.map +1 -0
- package/dist/chunk-SP77KIKJ.js +12 -0
- package/dist/chunk-SP77KIKJ.js.map +1 -0
- package/dist/{chunk-D52TP6ZA.js → chunk-XL2AT5BD.js} +33 -148
- package/dist/chunk-XL2AT5BD.js.map +1 -0
- package/dist/index.cjs +30 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +513 -12
- package/dist/index.d.ts +513 -12
- package/dist/index.js +2 -1
- package/dist/provider.cjs +30 -142
- package/dist/provider.cjs.map +1 -1
- package/dist/provider.d.cts +4 -503
- package/dist/provider.d.ts +4 -503
- package/dist/provider.js +2 -1
- package/package.json +15 -7
- package/dist/chunk-D52TP6ZA.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,517 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import {
|
|
1
|
+
export { BusinessConfigContext } from './business-config-context.js';
|
|
2
|
+
import { LiveSupportWidgetConfig } from '@growupsell/api/api';
|
|
3
3
|
export { LiveSupportWidgetConfig } from '@growupsell/api/api';
|
|
4
|
-
import 'react/jsx-runtime';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '@growupsell/api/interface';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import React__default, { PropsWithChildren, ReactNode } from 'react';
|
|
7
6
|
|
|
8
|
-
declare const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
declare const AuthContext: React__default.Context<{
|
|
8
|
+
signIn: (data: any, rememberMe: boolean) => void;
|
|
9
|
+
signOut: () => void;
|
|
10
|
+
user: any;
|
|
11
|
+
setUser: (o: any) => void;
|
|
12
|
+
customerSession: any;
|
|
13
|
+
loadingToken: any;
|
|
14
|
+
loadingUser: any;
|
|
15
|
+
token: any;
|
|
16
|
+
}>;
|
|
17
|
+
declare const AuthProvider: (props: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
declare const useAuth: () => {
|
|
19
|
+
signIn: (data: any, rememberMe: boolean) => void;
|
|
20
|
+
signOut: () => void;
|
|
21
|
+
user: any;
|
|
22
|
+
setUser: (o: any) => void;
|
|
23
|
+
customerSession: any;
|
|
24
|
+
loadingToken: any;
|
|
25
|
+
loadingUser: any;
|
|
26
|
+
token: any;
|
|
14
27
|
};
|
|
15
28
|
|
|
16
|
-
|
|
29
|
+
declare const BusinessMediaContext: React__default.Context<{}>;
|
|
30
|
+
declare const BusinessMediaProvider: (props: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
31
|
+
declare const useBusinessMedia: () => {};
|
|
32
|
+
|
|
33
|
+
declare const BusinessConfigProvider: ({ children, data, baseURL, }: {
|
|
34
|
+
data: any;
|
|
35
|
+
children: React__default.ReactNode;
|
|
36
|
+
baseURL: string;
|
|
37
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
38
|
+
declare const useBusinessContext: () => {
|
|
39
|
+
currency: any;
|
|
40
|
+
reward_point_config: any;
|
|
41
|
+
orderConfig: any;
|
|
42
|
+
};
|
|
43
|
+
declare const useBusiness: () => {
|
|
44
|
+
currency: any;
|
|
45
|
+
reward_point_config: any;
|
|
46
|
+
orderConfig: any;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
type ORDER_TYPES = 'delivery' | 'cod';
|
|
50
|
+
declare const CartContext: React__default.Context<{
|
|
51
|
+
cartItems: any[];
|
|
52
|
+
addToCart: (sku: any, quantity: number) => void;
|
|
53
|
+
addToCartLoading: boolean;
|
|
54
|
+
addToCartError: string | null;
|
|
55
|
+
clearCart: () => void;
|
|
56
|
+
onChangeAddress: (addressId: number, addressType: string) => void;
|
|
57
|
+
onChangeTax: (tax_number: string, legal_name: string) => void;
|
|
58
|
+
onChangeOffer: (offers: number | null) => void;
|
|
59
|
+
onChangeOrderType: (type: ORDER_TYPES) => void;
|
|
60
|
+
session: any;
|
|
61
|
+
setSession: (session: any) => void;
|
|
62
|
+
removeAppliedOffer: () => void;
|
|
63
|
+
moveToWishlist: (sku: any) => void;
|
|
64
|
+
moveToWishlistLoading: boolean;
|
|
65
|
+
orderFetchLoading: boolean;
|
|
66
|
+
onChangePromoCode: (promoCode: string | null) => void;
|
|
67
|
+
onChangeGiftCard: (pin: number, code: string) => void;
|
|
68
|
+
errorMessage?: string | null;
|
|
69
|
+
}>;
|
|
70
|
+
declare const CartProvider: (props: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
71
|
+
declare const useCart: () => {
|
|
72
|
+
cartItems: any[];
|
|
73
|
+
addToCart: (sku: any, quantity: number) => void;
|
|
74
|
+
addToCartLoading: boolean;
|
|
75
|
+
addToCartError: string | null;
|
|
76
|
+
clearCart: () => void;
|
|
77
|
+
onChangeAddress: (addressId: number, addressType: string) => void;
|
|
78
|
+
onChangeTax: (tax_number: string, legal_name: string) => void;
|
|
79
|
+
onChangeOffer: (offers: number | null) => void;
|
|
80
|
+
onChangeOrderType: (type: ORDER_TYPES) => void;
|
|
81
|
+
session: any;
|
|
82
|
+
setSession: (session: any) => void;
|
|
83
|
+
removeAppliedOffer: () => void;
|
|
84
|
+
moveToWishlist: (sku: any) => void;
|
|
85
|
+
moveToWishlistLoading: boolean;
|
|
86
|
+
orderFetchLoading: boolean;
|
|
87
|
+
onChangePromoCode: (promoCode: string | null) => void;
|
|
88
|
+
onChangeGiftCard: (pin: number, code: string) => void;
|
|
89
|
+
errorMessage?: string | null;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
declare const FilterContext: React__default.Context<{
|
|
93
|
+
selectedCategoryId: number[];
|
|
94
|
+
addCategoryFilterId: (id: number) => void;
|
|
95
|
+
removeCategoryFilterId: (id: number) => void;
|
|
96
|
+
menuList: any[];
|
|
97
|
+
productLoading: boolean;
|
|
98
|
+
currentPage: number;
|
|
99
|
+
handlePageChange: (page: number) => void;
|
|
100
|
+
setMenuList: (x: any) => void;
|
|
101
|
+
filterConfig: any;
|
|
102
|
+
setSelectedSortOption: (x: string) => void;
|
|
103
|
+
seletedRattingNumber: number | undefined | string;
|
|
104
|
+
setSelectedRattingNumber: (x: any) => void;
|
|
105
|
+
selectedDiscountOff: number | undefined;
|
|
106
|
+
setSelectedDiscountOff: (x: any) => void;
|
|
107
|
+
selectedMinPrice: number;
|
|
108
|
+
selectedMaxPrice: number;
|
|
109
|
+
setSelectedMinPrice: (x: any) => void;
|
|
110
|
+
setSelectedMaxPrice: (x: any) => void;
|
|
111
|
+
brandList: any[];
|
|
112
|
+
selectedBrandId: any[];
|
|
113
|
+
updateBrandIds: (x: any) => void;
|
|
114
|
+
brandLoading: boolean;
|
|
115
|
+
variantList: any[];
|
|
116
|
+
selectedVariants: any[];
|
|
117
|
+
updateSelectedVariants: (x: any) => void;
|
|
118
|
+
variantLoading: boolean;
|
|
119
|
+
total: number;
|
|
120
|
+
limit: number;
|
|
121
|
+
offset: number;
|
|
122
|
+
}>;
|
|
123
|
+
declare const FilterProvider: (props: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
124
|
+
declare const useFilter: () => {
|
|
125
|
+
selectedCategoryId: number[];
|
|
126
|
+
addCategoryFilterId: (id: number) => void;
|
|
127
|
+
removeCategoryFilterId: (id: number) => void;
|
|
128
|
+
menuList: any[];
|
|
129
|
+
productLoading: boolean;
|
|
130
|
+
currentPage: number;
|
|
131
|
+
handlePageChange: (page: number) => void;
|
|
132
|
+
setMenuList: (x: any) => void;
|
|
133
|
+
filterConfig: any;
|
|
134
|
+
setSelectedSortOption: (x: string) => void;
|
|
135
|
+
seletedRattingNumber: number | undefined | string;
|
|
136
|
+
setSelectedRattingNumber: (x: any) => void;
|
|
137
|
+
selectedDiscountOff: number | undefined;
|
|
138
|
+
setSelectedDiscountOff: (x: any) => void;
|
|
139
|
+
selectedMinPrice: number;
|
|
140
|
+
selectedMaxPrice: number;
|
|
141
|
+
setSelectedMinPrice: (x: any) => void;
|
|
142
|
+
setSelectedMaxPrice: (x: any) => void;
|
|
143
|
+
brandList: any[];
|
|
144
|
+
selectedBrandId: any[];
|
|
145
|
+
updateBrandIds: (x: any) => void;
|
|
146
|
+
brandLoading: boolean;
|
|
147
|
+
variantList: any[];
|
|
148
|
+
selectedVariants: any[];
|
|
149
|
+
updateSelectedVariants: (x: any) => void;
|
|
150
|
+
variantLoading: boolean;
|
|
151
|
+
total: number;
|
|
152
|
+
limit: number;
|
|
153
|
+
offset: number;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
declare const ProductDetailContext: React__default.Context<{
|
|
157
|
+
selectedVariants: any[];
|
|
158
|
+
selectUnselectVariants: (type: string, value: string, id: number) => void;
|
|
159
|
+
productDetail: any;
|
|
160
|
+
waitProductLoading: boolean;
|
|
161
|
+
setSelectedVariants: (x: any) => void;
|
|
162
|
+
}>;
|
|
163
|
+
type Props$2 = {
|
|
164
|
+
productId: any;
|
|
165
|
+
selected_variants: any;
|
|
166
|
+
};
|
|
167
|
+
declare const ProductDetailProvider: (props: React__default.PropsWithChildren<Props$2>) => react_jsx_runtime.JSX.Element;
|
|
168
|
+
declare const useProductDetail: () => {
|
|
169
|
+
selectedVariants: any[];
|
|
170
|
+
selectUnselectVariants: (type: string, value: string, id: number) => void;
|
|
171
|
+
productDetail: any;
|
|
172
|
+
waitProductLoading: boolean;
|
|
173
|
+
setSelectedVariants: (x: any) => void;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
declare const ProductConfigContext: React__default.Context<{}>;
|
|
177
|
+
declare const ProductConfigProvider: (props: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
178
|
+
declare const useProductConfig: () => {};
|
|
179
|
+
|
|
180
|
+
declare const StorageContext: React__default.Context<{
|
|
181
|
+
setItem: (key: string, data: any, type: any) => null;
|
|
182
|
+
getItem: (key: string, type?: any) => null;
|
|
183
|
+
clearAll: () => null;
|
|
184
|
+
removeItem: (key: string, type?: any) => null;
|
|
185
|
+
}>;
|
|
186
|
+
type Props$1 = {
|
|
187
|
+
storage: any;
|
|
188
|
+
};
|
|
189
|
+
declare const StorageProvider: (props: React__default.PropsWithChildren<Props$1>) => react_jsx_runtime.JSX.Element;
|
|
190
|
+
declare const useStorage: () => {
|
|
191
|
+
setItem: (key: string, data: any, type: any) => null;
|
|
192
|
+
getItem: (key: string, type?: any) => null;
|
|
193
|
+
clearAll: () => null;
|
|
194
|
+
removeItem: (key: string, type?: any) => null;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
/** Options bag for platform-specific toast implementations (e.g. react-toastify). */
|
|
198
|
+
type ToastSupportOptions = Record<string, unknown>;
|
|
199
|
+
/**
|
|
200
|
+
* Pluggable toast API. Web passes the host app’s `toast` implementation (e.g. react-toastify wrapper);
|
|
201
|
+
* React Native can pass a native implementation. Defaults are no-ops.
|
|
202
|
+
*/
|
|
203
|
+
type ToastSupportApi = {
|
|
204
|
+
success: (message: string, options?: ToastSupportOptions) => void;
|
|
205
|
+
error: (message: string, options?: ToastSupportOptions) => void;
|
|
206
|
+
info: (message: string, options?: ToastSupportOptions) => void;
|
|
207
|
+
warning: (message: string, options?: ToastSupportOptions) => void;
|
|
208
|
+
default: (message: string, options?: ToastSupportOptions) => void;
|
|
209
|
+
};
|
|
210
|
+
type ToastSupportProviderProps = PropsWithChildren<{
|
|
211
|
+
/** When omitted, all toast calls from core providers are no-ops (e.g. RN until wired). */
|
|
212
|
+
value?: ToastSupportApi;
|
|
213
|
+
}>;
|
|
214
|
+
declare function ToastSupportProvider({ children, value }: ToastSupportProviderProps): react_jsx_runtime.JSX.Element;
|
|
215
|
+
declare function useToastSupport(): ToastSupportApi;
|
|
216
|
+
|
|
217
|
+
declare const CustomerConfigContext: React__default.Context<{
|
|
218
|
+
customerConfig: any;
|
|
219
|
+
}>;
|
|
220
|
+
declare const CustomerConfigProvider: (props: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
221
|
+
declare const useCustomer: () => {
|
|
222
|
+
customerConfig: any;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
declare const HomeConfigContext: React__default.Context<{
|
|
226
|
+
selectedConfig: any[];
|
|
227
|
+
setSelectedConfig: (x: any) => void;
|
|
228
|
+
addConfig: (x: any) => void;
|
|
229
|
+
updateConfig: (config: any, index: number) => void;
|
|
230
|
+
removeConfig: (index: number) => void;
|
|
231
|
+
moveConfig: (fromIndex: number, toIndex: number) => void;
|
|
232
|
+
themeConfigData: any;
|
|
233
|
+
loading: boolean;
|
|
234
|
+
}>;
|
|
235
|
+
declare const HomeConfigProvider: (props: {
|
|
236
|
+
page: string;
|
|
237
|
+
children: React__default.ReactNode;
|
|
238
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
239
|
+
declare const useHomeConfig: () => {
|
|
240
|
+
selectedConfig: any[];
|
|
241
|
+
setSelectedConfig: (x: any) => void;
|
|
242
|
+
addConfig: (x: any) => void;
|
|
243
|
+
updateConfig: (config: any, index: number) => void;
|
|
244
|
+
removeConfig: (index: number) => void;
|
|
245
|
+
moveConfig: (fromIndex: number, toIndex: number) => void;
|
|
246
|
+
themeConfigData: any;
|
|
247
|
+
loading: boolean;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
declare const CustomPageConfigContext: React__default.Context<{
|
|
251
|
+
selectedConfig: any[];
|
|
252
|
+
setSelectedConfig: (x: any) => void;
|
|
253
|
+
addConfig: (x: any) => void;
|
|
254
|
+
updateConfig: (config: any, index: number) => void;
|
|
255
|
+
removeConfig: (index: number) => void;
|
|
256
|
+
moveConfig: (fromIndex: number, toIndex: number) => void;
|
|
257
|
+
loading: boolean;
|
|
258
|
+
}>;
|
|
259
|
+
declare const CustomPageConfigProvider: (props: {
|
|
260
|
+
pageId: number;
|
|
261
|
+
children: React__default.ReactNode;
|
|
262
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
263
|
+
declare const useCustomPageConfig: () => {
|
|
264
|
+
selectedConfig: any[];
|
|
265
|
+
setSelectedConfig: (x: any) => void;
|
|
266
|
+
addConfig: (x: any) => void;
|
|
267
|
+
updateConfig: (config: any, index: number) => void;
|
|
268
|
+
removeConfig: (index: number) => void;
|
|
269
|
+
moveConfig: (fromIndex: number, toIndex: number) => void;
|
|
270
|
+
loading: boolean;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
declare const WishlistContext: React__default.Context<{
|
|
274
|
+
wishlistItems: any[];
|
|
275
|
+
addToWishlist: (sku: any) => void;
|
|
276
|
+
deleteWishlistItem: (id: number) => void;
|
|
277
|
+
moveToCart: (sku: any, quantity: number) => void;
|
|
278
|
+
fetchWishlistLoading: boolean;
|
|
279
|
+
addToWishlistLoading: boolean;
|
|
280
|
+
moveToCartLoading: boolean;
|
|
281
|
+
}>;
|
|
282
|
+
declare const WishlistProvider: (props: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
283
|
+
declare const useWishlist: () => {
|
|
284
|
+
wishlistItems: any[];
|
|
285
|
+
addToWishlist: (sku: any) => void;
|
|
286
|
+
deleteWishlistItem: (id: number) => void;
|
|
287
|
+
moveToCart: (sku: any, quantity: number) => void;
|
|
288
|
+
fetchWishlistLoading: boolean;
|
|
289
|
+
addToWishlistLoading: boolean;
|
|
290
|
+
moveToCartLoading: boolean;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
declare const CartWishlistRefreshContext: React__default.Context<{
|
|
294
|
+
refreshType: "cart" | "wishlist" | null;
|
|
295
|
+
setRefreshType: any;
|
|
296
|
+
}>;
|
|
297
|
+
declare const CartWishlistRefreshProvider: (props: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
298
|
+
declare const useCartWishlistRefresh: () => {
|
|
299
|
+
refreshType: "cart" | "wishlist" | null;
|
|
300
|
+
setRefreshType: any;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
declare const ThemeEditContext: React__default.Context<{
|
|
304
|
+
token: string;
|
|
305
|
+
isThemeEdit: boolean;
|
|
306
|
+
isHeader: boolean;
|
|
307
|
+
isFooter: boolean;
|
|
308
|
+
isAnnouncementBar: boolean;
|
|
309
|
+
}>;
|
|
310
|
+
declare const ThemeEditProvider: (props: {
|
|
311
|
+
isThemeEdit: boolean;
|
|
312
|
+
token: string;
|
|
313
|
+
isHeader: boolean;
|
|
314
|
+
isFooter: boolean;
|
|
315
|
+
isAnnouncementBar: boolean;
|
|
316
|
+
children: React__default.ReactNode;
|
|
317
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
318
|
+
declare const useThemeEdit: () => {
|
|
319
|
+
token: string;
|
|
320
|
+
isThemeEdit: boolean;
|
|
321
|
+
isHeader: boolean;
|
|
322
|
+
isFooter: boolean;
|
|
323
|
+
isAnnouncementBar: boolean;
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
interface BaseProviderProps {
|
|
327
|
+
children: React__default.ReactNode;
|
|
328
|
+
baseURL: any;
|
|
329
|
+
token?: string;
|
|
330
|
+
isEdit?: boolean;
|
|
331
|
+
businessConfig: any;
|
|
332
|
+
storage: {
|
|
333
|
+
setItem: (key: string, value: string, type?: string) => void;
|
|
334
|
+
getItem: (key: string, type?: string) => string | null;
|
|
335
|
+
clearAll: () => void;
|
|
336
|
+
removeItem: (key: string, type?: string) => void;
|
|
337
|
+
};
|
|
338
|
+
isHeader?: boolean;
|
|
339
|
+
isFooter?: boolean;
|
|
340
|
+
isAnnouncementBar?: boolean;
|
|
341
|
+
/** Referral code from URL (e.g. ?referralCode=xxx). Persisted and passed to register API. */
|
|
342
|
+
referralCodeFromUrl?: string | null;
|
|
343
|
+
/**
|
|
344
|
+
* Web: pass your host app’s toast API (e.g. Next.js `utils/toast` wrapping react-toastify) so Cart/Wishlist can notify.
|
|
345
|
+
* React Native: pass your own implementation or omit (no-ops).
|
|
346
|
+
*/
|
|
347
|
+
toast?: ToastSupportApi;
|
|
348
|
+
}
|
|
349
|
+
declare const BaseProvider: React__default.FC<BaseProviderProps>;
|
|
350
|
+
|
|
351
|
+
type ModalType = "" | "login" | "signup" | "forgot" | "otp" | "reset";
|
|
352
|
+
type ModalUserData = {
|
|
353
|
+
otp?: {
|
|
354
|
+
id: string;
|
|
355
|
+
value: string;
|
|
356
|
+
};
|
|
357
|
+
reset?: string;
|
|
358
|
+
};
|
|
359
|
+
type ModalContextType = {
|
|
360
|
+
openModal: ModalType;
|
|
361
|
+
showModal: (modal: ModalType) => void;
|
|
362
|
+
closeModal: () => void;
|
|
363
|
+
userData: ModalUserData;
|
|
364
|
+
setUserData: (data: ModalUserData) => void;
|
|
365
|
+
clearUserData: () => void;
|
|
366
|
+
};
|
|
367
|
+
declare const ModalProvider: ({ children }: {
|
|
368
|
+
children: ReactNode;
|
|
369
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
370
|
+
declare const useModal: () => ModalContextType;
|
|
371
|
+
|
|
372
|
+
declare const HomeConfigHeroSliderContext: React__default.Context<{
|
|
373
|
+
loading: boolean;
|
|
374
|
+
heroSliderConfigData: any;
|
|
375
|
+
onUpdateHeroSlider: (updatedSlides: any) => void;
|
|
376
|
+
}>;
|
|
377
|
+
declare const HomeConfigHeroSliderProvider: (props: {
|
|
378
|
+
children: React__default.ReactNode;
|
|
379
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
380
|
+
declare const useHomeConfigHeroSlider: () => {
|
|
381
|
+
loading: boolean;
|
|
382
|
+
heroSliderConfigData: any;
|
|
383
|
+
onUpdateHeroSlider: (updatedSlides: any) => void;
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
declare const HeaderFooterContext: React__default.Context<{
|
|
387
|
+
headerConfig: any;
|
|
388
|
+
footerConfig: any;
|
|
389
|
+
onUpdateThemeContent: (configToUpdate: any) => Promise<void>;
|
|
390
|
+
loading: boolean;
|
|
391
|
+
announcementConfig: any;
|
|
392
|
+
}>;
|
|
393
|
+
declare const HeaderFooterProvider: (props: {
|
|
394
|
+
page: string;
|
|
395
|
+
children: React__default.ReactNode;
|
|
396
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
397
|
+
declare const useHeaderFooter: () => {
|
|
398
|
+
headerConfig: any;
|
|
399
|
+
footerConfig: any;
|
|
400
|
+
onUpdateThemeContent: (configToUpdate: any) => Promise<void>;
|
|
401
|
+
loading: boolean;
|
|
402
|
+
announcementConfig: any;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
declare const MenuFilterContext: React__default.Context<{
|
|
406
|
+
menuList: any[];
|
|
407
|
+
categoryList: any[];
|
|
408
|
+
selectedCategoryId: number[];
|
|
409
|
+
addCategoryFilterId: (id: number) => void;
|
|
410
|
+
removeCategoryFilterId: (id: number) => void;
|
|
411
|
+
menuLoading: boolean;
|
|
412
|
+
categoryLoading: boolean;
|
|
413
|
+
isInitialLoad: boolean;
|
|
414
|
+
currentPage: number;
|
|
415
|
+
totalPages: number;
|
|
416
|
+
handlePageChange: (page: number) => void;
|
|
417
|
+
setMenuList: (x: any) => void;
|
|
418
|
+
selectedSortOption: string;
|
|
419
|
+
setSelectedSortOption: (x: string) => void;
|
|
420
|
+
selectedMinPrice: number | undefined;
|
|
421
|
+
selectedMaxPrice: number | undefined;
|
|
422
|
+
setSelectedMinPrice: (x: any) => void;
|
|
423
|
+
setSelectedMaxPrice: (x: any) => void;
|
|
424
|
+
searchQuery: string;
|
|
425
|
+
setSearchQuery: (query: string) => void;
|
|
426
|
+
selectedFoodType: string;
|
|
427
|
+
setSelectedFoodType: (type: string) => void;
|
|
428
|
+
}>;
|
|
429
|
+
declare const MenuFilterProvider: (props: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
430
|
+
declare const useMenuFilter: () => {
|
|
431
|
+
menuList: any[];
|
|
432
|
+
categoryList: any[];
|
|
433
|
+
selectedCategoryId: number[];
|
|
434
|
+
addCategoryFilterId: (id: number) => void;
|
|
435
|
+
removeCategoryFilterId: (id: number) => void;
|
|
436
|
+
menuLoading: boolean;
|
|
437
|
+
categoryLoading: boolean;
|
|
438
|
+
isInitialLoad: boolean;
|
|
439
|
+
currentPage: number;
|
|
440
|
+
totalPages: number;
|
|
441
|
+
handlePageChange: (page: number) => void;
|
|
442
|
+
setMenuList: (x: any) => void;
|
|
443
|
+
selectedSortOption: string;
|
|
444
|
+
setSelectedSortOption: (x: string) => void;
|
|
445
|
+
selectedMinPrice: number | undefined;
|
|
446
|
+
selectedMaxPrice: number | undefined;
|
|
447
|
+
setSelectedMinPrice: (x: any) => void;
|
|
448
|
+
setSelectedMaxPrice: (x: any) => void;
|
|
449
|
+
searchQuery: string;
|
|
450
|
+
setSearchQuery: (query: string) => void;
|
|
451
|
+
selectedFoodType: string;
|
|
452
|
+
setSelectedFoodType: (type: string) => void;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
declare const MenuCartContext: React__default.Context<{
|
|
456
|
+
menuCartItems: any[];
|
|
457
|
+
cartLength: number;
|
|
458
|
+
cartType: "delivery" | "pickup" | "self_dinein";
|
|
459
|
+
session: any;
|
|
460
|
+
errorMessage?: string | null;
|
|
461
|
+
menuCartLoading: boolean;
|
|
462
|
+
promoCodeLoading: boolean;
|
|
463
|
+
updateOrderType: (params: {
|
|
464
|
+
type: "delivery" | "pickup" | "self_dinein";
|
|
465
|
+
pickup_time?: string;
|
|
466
|
+
table_no?: string | number;
|
|
467
|
+
shipping_address?: number;
|
|
468
|
+
}) => void;
|
|
469
|
+
addMenuToCart: (itemId: number, quantity: number, customizeOptions?: any[]) => Promise<void>;
|
|
470
|
+
updateMenuCartItem: (id: number, quantity: number, customizeOptions?: any[]) => Promise<void>;
|
|
471
|
+
deleteMenuCartItem: (id: number) => Promise<void>;
|
|
472
|
+
updateMenuCartPromoCode: (promoCode: string | null) => Promise<void>;
|
|
473
|
+
updateMenuCartAddress: (shippingAddress: number) => Promise<void>;
|
|
474
|
+
getMenuOrderCharge: (orderId: number, body: object) => Promise<any>;
|
|
475
|
+
clearMenuCart: () => void;
|
|
476
|
+
}>;
|
|
477
|
+
declare const MenuCartProvider: (props: React__default.PropsWithChildren) => react_jsx_runtime.JSX.Element;
|
|
478
|
+
declare const useMenuCart: () => {
|
|
479
|
+
menuCartItems: any[];
|
|
480
|
+
cartLength: number;
|
|
481
|
+
cartType: "delivery" | "pickup" | "self_dinein";
|
|
482
|
+
session: any;
|
|
483
|
+
errorMessage?: string | null;
|
|
484
|
+
menuCartLoading: boolean;
|
|
485
|
+
promoCodeLoading: boolean;
|
|
486
|
+
updateOrderType: (params: {
|
|
487
|
+
type: "delivery" | "pickup" | "self_dinein";
|
|
488
|
+
pickup_time?: string;
|
|
489
|
+
table_no?: string | number;
|
|
490
|
+
shipping_address?: number;
|
|
491
|
+
}) => void;
|
|
492
|
+
addMenuToCart: (itemId: number, quantity: number, customizeOptions?: any[]) => Promise<void>;
|
|
493
|
+
updateMenuCartItem: (id: number, quantity: number, customizeOptions?: any[]) => Promise<void>;
|
|
494
|
+
deleteMenuCartItem: (id: number) => Promise<void>;
|
|
495
|
+
updateMenuCartPromoCode: (promoCode: string | null) => Promise<void>;
|
|
496
|
+
updateMenuCartAddress: (shippingAddress: number) => Promise<void>;
|
|
497
|
+
getMenuOrderCharge: (orderId: number, body: object) => Promise<any>;
|
|
498
|
+
clearMenuCart: () => void;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
declare function ReferralCodeProvider({ children, referralCodeFromUrl, }: {
|
|
502
|
+
children: React__default.ReactNode;
|
|
503
|
+
referralCodeFromUrl: string | null;
|
|
504
|
+
}): react_jsx_runtime.JSX.Element;
|
|
505
|
+
declare function useReferralCode(): string | null;
|
|
506
|
+
|
|
507
|
+
type LiveSupportWidgetContextValue = {
|
|
508
|
+
config: LiveSupportWidgetConfig | null;
|
|
509
|
+
loading: boolean;
|
|
510
|
+
};
|
|
511
|
+
type Props = {
|
|
512
|
+
children: React__default.ReactNode;
|
|
513
|
+
};
|
|
514
|
+
declare const LiveSupportWidgetProvider: React__default.FC<Props>;
|
|
515
|
+
declare const useLiveSupportWidget: () => LiveSupportWidgetContextValue;
|
|
516
|
+
|
|
517
|
+
export { AuthContext, AuthProvider, BaseProvider, BusinessConfigProvider, BusinessMediaContext, BusinessMediaProvider, CartContext, CartProvider, CartWishlistRefreshContext, CartWishlistRefreshProvider, CustomPageConfigContext, CustomPageConfigProvider, CustomerConfigContext, CustomerConfigProvider, FilterContext, FilterProvider, HeaderFooterContext, HeaderFooterProvider, HomeConfigContext, HomeConfigHeroSliderContext, HomeConfigHeroSliderProvider, HomeConfigProvider, LiveSupportWidgetProvider, MenuCartContext, MenuCartProvider, MenuFilterContext, MenuFilterProvider, ModalProvider, ProductConfigContext, ProductConfigProvider, ProductDetailContext, ProductDetailProvider, ReferralCodeProvider, StorageContext, StorageProvider, ThemeEditContext, ThemeEditProvider, type ToastSupportApi, type ToastSupportOptions, ToastSupportProvider, WishlistContext, WishlistProvider, useAuth, useBusiness, useBusinessContext, useBusinessMedia, useCart, useCartWishlistRefresh, useCustomPageConfig, useCustomer, useFilter, useHeaderFooter, useHomeConfig, useHomeConfigHeroSlider, useLiveSupportWidget, useMenuCart, useMenuFilter, useModal, useProductConfig, useProductDetail, useReferralCode, useStorage, useThemeEdit, useToastSupport, useWishlist };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { AuthContext, AuthProvider, BaseProvider,
|
|
1
|
+
export { AuthContext, AuthProvider, BaseProvider, BusinessConfigProvider, BusinessMediaContext, BusinessMediaProvider, CartContext, CartProvider, CartWishlistRefreshContext, CartWishlistRefreshProvider, CustomPageConfigContext, CustomPageConfigProvider, CustomerConfigContext, CustomerConfigProvider, FilterContext, FilterProvider, HeaderFooterContext, HeaderFooterProvider, HomeConfigContext, HomeConfigHeroSliderContext, HomeConfigHeroSliderProvider, HomeConfigProvider, LiveSupportWidgetProvider, MenuCartContext, MenuCartProvider, MenuFilterContext, MenuFilterProvider, ModalProvider, ProductConfigContext, ProductConfigProvider, ProductDetailContext, ProductDetailProvider, ReferralCodeProvider, StorageContext, StorageProvider, ThemeEditContext, ThemeEditProvider, ToastSupportProvider, WishlistContext, WishlistProvider, useAuth, useBusiness, useBusinessContext, useBusinessMedia, useCart, useCartWishlistRefresh, useCustomPageConfig, useCustomer, useFilter, useHeaderFooter, useHomeConfig, useHomeConfigHeroSlider, useLiveSupportWidget, useMenuCart, useMenuFilter, useModal, useProductConfig, useProductDetail, useReferralCode, useStorage, useThemeEdit, useToastSupport, useWishlist } from './chunk-XL2AT5BD.js';
|
|
2
|
+
export { BusinessConfigContext } from './chunk-SP77KIKJ.js';
|
|
2
3
|
//# sourceMappingURL=index.js.map
|
|
3
4
|
//# sourceMappingURL=index.js.map
|