@storepecker/storefront-core 2.6.0 → 2.6.1
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 +30 -26
- package/dist/api/index.d.cts +5 -1
- package/dist/api/index.d.ts +5 -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-P252YNRA.js → chunk-6NFWEJSD.js} +1 -1
- package/dist/{chunk-FU46MZTI.cjs → chunk-DY7PNIB3.cjs} +2 -2
- package/dist/{chunk-DXQX7ZIL.cjs → chunk-LZADKC4Y.cjs} +6 -0
- package/dist/{chunk-S3ZZ3ZA7.js → chunk-ME6Z7TZW.js} +6 -1
- package/dist/{chunk-F7CI6FHE.cjs → chunk-QSHOJ3NJ.cjs} +6 -6
- package/dist/{chunk-CEVCKVNX.js → chunk-VYHAWRJR.js} +1 -1
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/theme-data-initializer.d.cts +1 -1
- package/dist/components/theme-data-initializer.d.ts +1 -1
- package/dist/hooks/index.cjs +12 -12
- package/dist/hooks/index.js +3 -3
- package/dist/{pixelEvents-D8iynEYj.d.ts → pixelEvents-BEzVCIBj.d.ts} +10 -3
- package/dist/{pixelEvents-BbTa1-8B.d.cts → pixelEvents-Bob6N-g5.d.cts} +10 -3
- package/dist/store/index.cjs +5 -5
- package/dist/store/index.d.cts +1 -1
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.js +2 -2
- package/dist/utils/index.d.cts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/api/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var chunkY46EHRJQ_cjs = require('../chunk-Y46EHRJQ.cjs');
|
|
|
4
4
|
var chunkPARH5TBK_cjs = require('../chunk-PARH5TBK.cjs');
|
|
5
5
|
require('../chunk-SMHJRNCR.cjs');
|
|
6
6
|
var chunkXFOUNOKO_cjs = require('../chunk-XFOUNOKO.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkLZADKC4Y_cjs = require('../chunk-LZADKC4Y.cjs');
|
|
8
8
|
var chunkRDUT4W3B_cjs = require('../chunk-RDUT4W3B.cjs');
|
|
9
9
|
var chunkECHV2JSY_cjs = require('../chunk-ECHV2JSY.cjs');
|
|
10
10
|
require('../chunk-BBRXE57K.cjs');
|
|
@@ -249,103 +249,107 @@ Object.defineProperty(exports, "removeCoupon", {
|
|
|
249
249
|
});
|
|
250
250
|
Object.defineProperty(exports, "checkPhonepePaymentStatus", {
|
|
251
251
|
enumerable: true,
|
|
252
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkLZADKC4Y_cjs.checkPhonepePaymentStatus; }
|
|
253
253
|
});
|
|
254
254
|
Object.defineProperty(exports, "getOrderDetails", {
|
|
255
255
|
enumerable: true,
|
|
256
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunkLZADKC4Y_cjs.getOrderDetails; }
|
|
257
257
|
});
|
|
258
258
|
Object.defineProperty(exports, "getOrderDetailsByNumber", {
|
|
259
259
|
enumerable: true,
|
|
260
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunkLZADKC4Y_cjs.getOrderDetailsByNumber; }
|
|
261
261
|
});
|
|
262
262
|
Object.defineProperty(exports, "getOrderDetailsByRef", {
|
|
263
263
|
enumerable: true,
|
|
264
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunkLZADKC4Y_cjs.getOrderDetailsByRef; }
|
|
265
265
|
});
|
|
266
266
|
Object.defineProperty(exports, "getOrderDetailsByRefV2", {
|
|
267
267
|
enumerable: true,
|
|
268
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunkLZADKC4Y_cjs.getOrderDetailsByRefV2; }
|
|
269
269
|
});
|
|
270
270
|
Object.defineProperty(exports, "getOrders", {
|
|
271
271
|
enumerable: true,
|
|
272
|
-
get: function () { return
|
|
272
|
+
get: function () { return chunkLZADKC4Y_cjs.getOrders; }
|
|
273
273
|
});
|
|
274
274
|
Object.defineProperty(exports, "getPublicOrderDetailsByNumber", {
|
|
275
275
|
enumerable: true,
|
|
276
|
-
get: function () { return
|
|
276
|
+
get: function () { return chunkLZADKC4Y_cjs.getPublicOrderDetailsByNumber; }
|
|
277
|
+
});
|
|
278
|
+
Object.defineProperty(exports, "getPublicOrderDetailsByRef", {
|
|
279
|
+
enumerable: true,
|
|
280
|
+
get: function () { return chunkLZADKC4Y_cjs.getPublicOrderDetailsByRef; }
|
|
277
281
|
});
|
|
278
282
|
Object.defineProperty(exports, "getStripePaymentStatus", {
|
|
279
283
|
enumerable: true,
|
|
280
|
-
get: function () { return
|
|
284
|
+
get: function () { return chunkLZADKC4Y_cjs.getStripePaymentStatus; }
|
|
281
285
|
});
|
|
282
286
|
Object.defineProperty(exports, "getStripePaymentStatusPublic", {
|
|
283
287
|
enumerable: true,
|
|
284
|
-
get: function () { return
|
|
288
|
+
get: function () { return chunkLZADKC4Y_cjs.getStripePaymentStatusPublic; }
|
|
285
289
|
});
|
|
286
290
|
Object.defineProperty(exports, "makeCODOrder", {
|
|
287
291
|
enumerable: true,
|
|
288
|
-
get: function () { return
|
|
292
|
+
get: function () { return chunkLZADKC4Y_cjs.makeCODOrder; }
|
|
289
293
|
});
|
|
290
294
|
Object.defineProperty(exports, "phonepeOrderSuccess", {
|
|
291
295
|
enumerable: true,
|
|
292
|
-
get: function () { return
|
|
296
|
+
get: function () { return chunkLZADKC4Y_cjs.phonepeOrderSuccess; }
|
|
293
297
|
});
|
|
294
298
|
Object.defineProperty(exports, "phonepePublicOrderSuccess", {
|
|
295
299
|
enumerable: true,
|
|
296
|
-
get: function () { return
|
|
300
|
+
get: function () { return chunkLZADKC4Y_cjs.phonepePublicOrderSuccess; }
|
|
297
301
|
});
|
|
298
302
|
Object.defineProperty(exports, "placeOrder", {
|
|
299
303
|
enumerable: true,
|
|
300
|
-
get: function () { return
|
|
304
|
+
get: function () { return chunkLZADKC4Y_cjs.placeOrder; }
|
|
301
305
|
});
|
|
302
306
|
Object.defineProperty(exports, "publicMakeCODOrder", {
|
|
303
307
|
enumerable: true,
|
|
304
|
-
get: function () { return
|
|
308
|
+
get: function () { return chunkLZADKC4Y_cjs.publicMakeCODOrder; }
|
|
305
309
|
});
|
|
306
310
|
Object.defineProperty(exports, "publicPlaceOrder", {
|
|
307
311
|
enumerable: true,
|
|
308
|
-
get: function () { return
|
|
312
|
+
get: function () { return chunkLZADKC4Y_cjs.publicPlaceOrder; }
|
|
309
313
|
});
|
|
310
314
|
Object.defineProperty(exports, "razorpayOrderFail", {
|
|
311
315
|
enumerable: true,
|
|
312
|
-
get: function () { return
|
|
316
|
+
get: function () { return chunkLZADKC4Y_cjs.razorpayOrderFail; }
|
|
313
317
|
});
|
|
314
318
|
Object.defineProperty(exports, "razorpayOrderSuccess", {
|
|
315
319
|
enumerable: true,
|
|
316
|
-
get: function () { return
|
|
320
|
+
get: function () { return chunkLZADKC4Y_cjs.razorpayOrderSuccess; }
|
|
317
321
|
});
|
|
318
322
|
Object.defineProperty(exports, "razorpayPublicOrderSuccess", {
|
|
319
323
|
enumerable: true,
|
|
320
|
-
get: function () { return
|
|
324
|
+
get: function () { return chunkLZADKC4Y_cjs.razorpayPublicOrderSuccess; }
|
|
321
325
|
});
|
|
322
326
|
Object.defineProperty(exports, "stripeOrderFail", {
|
|
323
327
|
enumerable: true,
|
|
324
|
-
get: function () { return
|
|
328
|
+
get: function () { return chunkLZADKC4Y_cjs.stripeOrderFail; }
|
|
325
329
|
});
|
|
326
330
|
Object.defineProperty(exports, "stripeOrderSuccess", {
|
|
327
331
|
enumerable: true,
|
|
328
|
-
get: function () { return
|
|
332
|
+
get: function () { return chunkLZADKC4Y_cjs.stripeOrderSuccess; }
|
|
329
333
|
});
|
|
330
334
|
Object.defineProperty(exports, "stripePublicOrderSuccess", {
|
|
331
335
|
enumerable: true,
|
|
332
|
-
get: function () { return
|
|
336
|
+
get: function () { return chunkLZADKC4Y_cjs.stripePublicOrderSuccess; }
|
|
333
337
|
});
|
|
334
338
|
Object.defineProperty(exports, "updateOrder", {
|
|
335
339
|
enumerable: true,
|
|
336
|
-
get: function () { return
|
|
340
|
+
get: function () { return chunkLZADKC4Y_cjs.updateOrder; }
|
|
337
341
|
});
|
|
338
342
|
Object.defineProperty(exports, "updateOrderCustomization", {
|
|
339
343
|
enumerable: true,
|
|
340
|
-
get: function () { return
|
|
344
|
+
get: function () { return chunkLZADKC4Y_cjs.updateOrderCustomization; }
|
|
341
345
|
});
|
|
342
346
|
Object.defineProperty(exports, "uploadCustomizationImage", {
|
|
343
347
|
enumerable: true,
|
|
344
|
-
get: function () { return
|
|
348
|
+
get: function () { return chunkLZADKC4Y_cjs.uploadCustomizationImage; }
|
|
345
349
|
});
|
|
346
350
|
Object.defineProperty(exports, "verifyTabbyPayment", {
|
|
347
351
|
enumerable: true,
|
|
348
|
-
get: function () { return
|
|
352
|
+
get: function () { return chunkLZADKC4Y_cjs.verifyTabbyPayment; }
|
|
349
353
|
});
|
|
350
354
|
Object.defineProperty(exports, "addAddress", {
|
|
351
355
|
enumerable: true,
|
package/dist/api/index.d.cts
CHANGED
|
@@ -79,7 +79,11 @@ declare function getOrderDetails(orderId: number): Promise<AxiosResponse<Order.R
|
|
|
79
79
|
declare function getOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
80
80
|
declare function getOrderDetailsByRef(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
81
81
|
declare function getOrderDetailsByRefV2(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use getPublicOrderDetailsByRef instead
|
|
84
|
+
*/
|
|
82
85
|
declare function getPublicOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
86
|
+
declare function getPublicOrderDetailsByRef(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
83
87
|
declare function placeOrder(address_id: number, redirect: string, isCod?: boolean, shipping_option_id?: number, stripeRedirect?: string, tabbyRedirect?: string): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
84
88
|
interface PublicOrderDetails {
|
|
85
89
|
email: string;
|
|
@@ -180,4 +184,4 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
|
|
|
180
184
|
results: Blog.Post[];
|
|
181
185
|
}>>;
|
|
182
186
|
|
|
183
|
-
export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
|
|
187
|
+
export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
|
package/dist/api/index.d.ts
CHANGED
|
@@ -79,7 +79,11 @@ declare function getOrderDetails(orderId: number): Promise<AxiosResponse<Order.R
|
|
|
79
79
|
declare function getOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
80
80
|
declare function getOrderDetailsByRef(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
81
81
|
declare function getOrderDetailsByRefV2(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use getPublicOrderDetailsByRef instead
|
|
84
|
+
*/
|
|
82
85
|
declare function getPublicOrderDetailsByNumber(orderNumber: number): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
86
|
+
declare function getPublicOrderDetailsByRef(orderRef: string): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
83
87
|
declare function placeOrder(address_id: number, redirect: string, isCod?: boolean, shipping_option_id?: number, stripeRedirect?: string, tabbyRedirect?: string): Promise<AxiosResponse<Order.OrderSummary>>;
|
|
84
88
|
interface PublicOrderDetails {
|
|
85
89
|
email: string;
|
|
@@ -180,4 +184,4 @@ declare function getMultipleBlogsBySlugs(slugs: string): Promise<AxiosResponse<{
|
|
|
180
184
|
results: Blog.Post[];
|
|
181
185
|
}>>;
|
|
182
186
|
|
|
183
|
-
export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
|
|
187
|
+
export { type BookingFilter, type OTPCredentials, type VerifyOTPCredentials, addAddress, addReview, addToCart, addWishlist, applyCoupon, checkPhonepePaymentStatus, createBooking, deleteAddress, getAddresses, getAffiliateRedirect, getAppliedCoupon, getBlogPostBySlug, getBlogPostsList, getCart, getCartItemQuantity, getCategories, getCollection, getCountries, getCoupons, getDigitalProductDownloadLink, getFilters, getHttpService, getLoginMethod, getMultipleBlogsBySlugs, getMultipleCollections, getNewToken, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getReviewSummary, getReviews, getServerHttpService, getStripePaymentStatus, getStripePaymentStatusPublic, getSubdivisions, getUserBookings, getUserDetails, getWishlist, httpService, makeCODOrder, notifyProductStock, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, postAnalytics, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, removeCoupon, removeFromCart, removeFromWishlist, resetHttpService, sendOTP, serverHttpService, setSessionExpiredCallback, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateAddress, updateCart, updateDigitalProductDownloadLinkCount, updateOrder, updateOrderCustomization, updateUserDetails, uploadCustomizationImage, uploadReviewImages, verifyOTP, verifyTabbyPayment };
|
package/dist/api/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { getUserDetails, updateUserDetails } from '../chunk-WYXT5AAG.js';
|
|
|
2
2
|
export { addToCart, addWishlist, getCart, getCartItemQuantity, getCategories, getDigitalProductDownloadLink, getProductCategories, getProductDetail, getProductDetailBySlug, getProductList, getProducts, getWishlist, notifyProductStock, removeFromCart, removeFromWishlist, updateCart, updateDigitalProductDownloadLinkCount } from '../chunk-CUR7CHR5.js';
|
|
3
3
|
import '../chunk-QAC72HKO.js';
|
|
4
4
|
export { applyCoupon, getAppliedCoupon, getCoupons, removeCoupon } from '../chunk-7M5CVYZJ.js';
|
|
5
|
-
export { checkPhonepePaymentStatus, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPublicOrderDetailsByNumber, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment } from '../chunk-
|
|
5
|
+
export { checkPhonepePaymentStatus, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment } from '../chunk-ME6Z7TZW.js';
|
|
6
6
|
export { addAddress, deleteAddress, getAddresses, getCountries, getSubdivisions, updateAddress } from '../chunk-ZGMLOLTC.js';
|
|
7
7
|
import { http_service_default } from '../chunk-3SYYP3XV.js';
|
|
8
8
|
export { getHttpService, http_service_default as httpService, resetHttpService, setSessionExpiredCallback } from '../chunk-3SYYP3XV.js';
|
package/dist/checkout/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQSHOJ3NJ_cjs = require('../chunk-QSHOJ3NJ.cjs');
|
|
4
4
|
require('../chunk-XFOUNOKO.cjs');
|
|
5
5
|
var chunkK44JZ5NL_cjs = require('../chunk-K44JZ5NL.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkLZADKC4Y_cjs = require('../chunk-LZADKC4Y.cjs');
|
|
7
7
|
var chunkTB72NPRM_cjs = require('../chunk-TB72NPRM.cjs');
|
|
8
8
|
require('../chunk-ECHV2JSY.cjs');
|
|
9
9
|
require('../chunk-BBRXE57K.cjs');
|
|
@@ -49,7 +49,7 @@ function calculateCartTotals(cart) {
|
|
|
49
49
|
// src/checkout/payment-status.ts
|
|
50
50
|
async function checkPhonepeReturnStatus(transactionId, callbacks) {
|
|
51
51
|
try {
|
|
52
|
-
const response = await
|
|
52
|
+
const response = await chunkLZADKC4Y_cjs.checkPhonepePaymentStatus(transactionId);
|
|
53
53
|
if (response.data.success) {
|
|
54
54
|
callbacks.onSuccess(void 0);
|
|
55
55
|
} else {
|
|
@@ -62,8 +62,8 @@ async function checkPhonepeReturnStatus(transactionId, callbacks) {
|
|
|
62
62
|
async function checkPhonepeReturnStatusWithOrder(transactionId, orderNumber, callbacks) {
|
|
63
63
|
try {
|
|
64
64
|
const [paymentResponse, orderResponse] = await Promise.all([
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
chunkLZADKC4Y_cjs.checkPhonepePaymentStatus(transactionId),
|
|
66
|
+
chunkLZADKC4Y_cjs.getOrderDetailsByNumber(orderNumber)
|
|
67
67
|
]);
|
|
68
68
|
const order = orderResponse.data;
|
|
69
69
|
callbacks.onOrderLoaded?.(order);
|
|
@@ -80,12 +80,12 @@ async function checkPhonepeReturnStatusWithOrder(transactionId, orderNumber, cal
|
|
|
80
80
|
}
|
|
81
81
|
async function checkStripeReturnStatus(sessionId, orderNumber, paymentLinkUrl, callbacks, options) {
|
|
82
82
|
try {
|
|
83
|
-
const getStatus = options?.isPublic ?
|
|
83
|
+
const getStatus = options?.isPublic ? chunkLZADKC4Y_cjs.getStripePaymentStatusPublic : chunkLZADKC4Y_cjs.getStripePaymentStatus;
|
|
84
84
|
const response = await getStatus(sessionId, orderNumber, paymentLinkUrl);
|
|
85
85
|
const data = response.data;
|
|
86
86
|
if (data.payment_status === "paid" || data.status === "complete") {
|
|
87
87
|
try {
|
|
88
|
-
const orderResponse = await
|
|
88
|
+
const orderResponse = await chunkLZADKC4Y_cjs.getOrderDetailsByNumber(orderNumber);
|
|
89
89
|
const order = orderResponse.data;
|
|
90
90
|
callbacks.onOrderLoaded?.(order);
|
|
91
91
|
chunkK44JZ5NL_cjs.pixelEvents.purchase(order);
|
|
@@ -103,10 +103,10 @@ async function checkStripeReturnStatus(sessionId, orderNumber, paymentLinkUrl, c
|
|
|
103
103
|
}
|
|
104
104
|
async function checkTabbyReturnStatus(orderNumber, callbacks) {
|
|
105
105
|
try {
|
|
106
|
-
const response = await
|
|
106
|
+
const response = await chunkLZADKC4Y_cjs.verifyTabbyPayment(orderNumber);
|
|
107
107
|
if (response.data.order_status === "paid" || response.data.order_status === "confirmed") {
|
|
108
108
|
try {
|
|
109
|
-
const orderResponse = await
|
|
109
|
+
const orderResponse = await chunkLZADKC4Y_cjs.getOrderDetailsByNumber(orderNumber);
|
|
110
110
|
const order = orderResponse.data;
|
|
111
111
|
callbacks.onOrderLoaded?.(order);
|
|
112
112
|
chunkK44JZ5NL_cjs.pixelEvents.purchase(order);
|
|
@@ -125,55 +125,55 @@ async function checkTabbyReturnStatus(orderNumber, callbacks) {
|
|
|
125
125
|
|
|
126
126
|
Object.defineProperty(exports, "applyCheckoutCoupon", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkQSHOJ3NJ_cjs.applyCheckoutCoupon; }
|
|
129
129
|
});
|
|
130
130
|
Object.defineProperty(exports, "fetchAppliedCoupon", {
|
|
131
131
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkQSHOJ3NJ_cjs.fetchAppliedCoupon; }
|
|
133
133
|
});
|
|
134
134
|
Object.defineProperty(exports, "fetchAvailableCoupons", {
|
|
135
135
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkQSHOJ3NJ_cjs.fetchAvailableCoupons; }
|
|
137
137
|
});
|
|
138
138
|
Object.defineProperty(exports, "handleCODPayment", {
|
|
139
139
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkQSHOJ3NJ_cjs.handleCODPayment; }
|
|
141
141
|
});
|
|
142
142
|
Object.defineProperty(exports, "handlePhonepePayment", {
|
|
143
143
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkQSHOJ3NJ_cjs.handlePhonepePayment; }
|
|
145
145
|
});
|
|
146
146
|
Object.defineProperty(exports, "handleRazorpayFail", {
|
|
147
147
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkQSHOJ3NJ_cjs.handleRazorpayFail; }
|
|
149
149
|
});
|
|
150
150
|
Object.defineProperty(exports, "handleRazorpaySuccess", {
|
|
151
151
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkQSHOJ3NJ_cjs.handleRazorpaySuccess; }
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "handleStripePayment", {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkQSHOJ3NJ_cjs.handleStripePayment; }
|
|
157
157
|
});
|
|
158
158
|
Object.defineProperty(exports, "handleStripeSuccess", {
|
|
159
159
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkQSHOJ3NJ_cjs.handleStripeSuccess; }
|
|
161
161
|
});
|
|
162
162
|
Object.defineProperty(exports, "handleTabbyPayment", {
|
|
163
163
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkQSHOJ3NJ_cjs.handleTabbyPayment; }
|
|
165
165
|
});
|
|
166
166
|
Object.defineProperty(exports, "openRazorpayCheckout", {
|
|
167
167
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkQSHOJ3NJ_cjs.openRazorpayCheckout; }
|
|
169
169
|
});
|
|
170
170
|
Object.defineProperty(exports, "processPayment", {
|
|
171
171
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkQSHOJ3NJ_cjs.processPayment; }
|
|
173
173
|
});
|
|
174
174
|
Object.defineProperty(exports, "removeCheckoutCoupon", {
|
|
175
175
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkQSHOJ3NJ_cjs.removeCheckoutCoupon; }
|
|
177
177
|
});
|
|
178
178
|
Object.defineProperty(exports, "IP_API_CACHE_KEY", {
|
|
179
179
|
enumerable: true,
|
package/dist/checkout/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { applyCheckoutCoupon, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, openRazorpayCheckout, processPayment, removeCheckoutCoupon } from '../chunk-
|
|
1
|
+
export { applyCheckoutCoupon, fetchAppliedCoupon, fetchAvailableCoupons, handleCODPayment, handlePhonepePayment, handleRazorpayFail, handleRazorpaySuccess, handleStripePayment, handleStripeSuccess, handleTabbyPayment, openRazorpayCheckout, processPayment, removeCheckoutCoupon } from '../chunk-VYHAWRJR.js';
|
|
2
2
|
import '../chunk-7M5CVYZJ.js';
|
|
3
3
|
import { pixelEvents } from '../chunk-WFDKKOO7.js';
|
|
4
|
-
import { checkPhonepePaymentStatus, getOrderDetailsByNumber, getStripePaymentStatusPublic, getStripePaymentStatus, verifyTabbyPayment } from '../chunk-
|
|
4
|
+
import { checkPhonepePaymentStatus, getOrderDetailsByNumber, getStripePaymentStatusPublic, getStripePaymentStatus, verifyTabbyPayment } from '../chunk-ME6Z7TZW.js';
|
|
5
5
|
export { IP_API_CACHE_KEY, addressFormInitialValues, addressValidationSchema, buildAddressPayload, buildSubmitPayload, clearAddressFormSession, decodeAddress, encodeAddress, isValidPhoneNumber, loadAddressFormFromSession, parseEditAddress, sanitizePhoneNumber, saveAddressFormToSession } from '../chunk-ELP23UGF.js';
|
|
6
6
|
import '../chunk-3SYYP3XV.js';
|
|
7
7
|
import '../chunk-WEMNXIRS.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { updateCart, removeFromCart, addToCart, getCart, getCartItemQuantity } from './chunk-CUR7CHR5.js';
|
|
2
2
|
import { cart_default } from './chunk-QAC72HKO.js';
|
|
3
|
-
import { updateOrderCustomization } from './chunk-
|
|
3
|
+
import { updateOrderCustomization } from './chunk-ME6Z7TZW.js';
|
|
4
4
|
import { auth_default } from './chunk-WEMNXIRS.js';
|
|
5
5
|
import { USER_CRED_TOKEN, USER_CREDENTIALS } from './chunk-BQ256JKN.js';
|
|
6
6
|
import { create } from 'zustand';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkPARH5TBK_cjs = require('./chunk-PARH5TBK.cjs');
|
|
4
4
|
var chunkSMHJRNCR_cjs = require('./chunk-SMHJRNCR.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkLZADKC4Y_cjs = require('./chunk-LZADKC4Y.cjs');
|
|
6
6
|
var chunkBBRXE57K_cjs = require('./chunk-BBRXE57K.cjs');
|
|
7
7
|
var chunkNE3ZHELZ_cjs = require('./chunk-NE3ZHELZ.cjs');
|
|
8
8
|
var zustand = require('zustand');
|
|
@@ -142,7 +142,7 @@ var useCartStore = zustand.create((set) => ({
|
|
|
142
142
|
updateCustomization: async (customizationInputs) => {
|
|
143
143
|
set({ status: "loading" /* LOADING */ });
|
|
144
144
|
try {
|
|
145
|
-
await
|
|
145
|
+
await chunkLZADKC4Y_cjs.updateOrderCustomization({ customization_inputs: customizationInputs });
|
|
146
146
|
} catch {
|
|
147
147
|
} finally {
|
|
148
148
|
set({ status: "idle" /* IDLE */ });
|
|
@@ -32,6 +32,11 @@ async function getPublicOrderDetailsByNumber(orderNumber) {
|
|
|
32
32
|
params: { order_number: orderNumber }
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
+
async function getPublicOrderDetailsByRef(orderRef) {
|
|
36
|
+
return chunkECHV2JSY_cjs.http_service_default.get("/customer/public_order/", {
|
|
37
|
+
params: { order_ref: orderRef }
|
|
38
|
+
});
|
|
39
|
+
}
|
|
35
40
|
async function placeOrder(address_id, redirect, isCod, shipping_option_id, stripeRedirect, tabbyRedirect) {
|
|
36
41
|
return chunkECHV2JSY_cjs.http_service_default.post("/customer/order/", {
|
|
37
42
|
address_id,
|
|
@@ -126,6 +131,7 @@ exports.getOrderDetailsByRef = getOrderDetailsByRef;
|
|
|
126
131
|
exports.getOrderDetailsByRefV2 = getOrderDetailsByRefV2;
|
|
127
132
|
exports.getOrders = getOrders;
|
|
128
133
|
exports.getPublicOrderDetailsByNumber = getPublicOrderDetailsByNumber;
|
|
134
|
+
exports.getPublicOrderDetailsByRef = getPublicOrderDetailsByRef;
|
|
129
135
|
exports.getStripePaymentStatus = getStripePaymentStatus;
|
|
130
136
|
exports.getStripePaymentStatusPublic = getStripePaymentStatusPublic;
|
|
131
137
|
exports.makeCODOrder = makeCODOrder;
|
|
@@ -30,6 +30,11 @@ async function getPublicOrderDetailsByNumber(orderNumber) {
|
|
|
30
30
|
params: { order_number: orderNumber }
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
+
async function getPublicOrderDetailsByRef(orderRef) {
|
|
34
|
+
return http_service_default.get("/customer/public_order/", {
|
|
35
|
+
params: { order_ref: orderRef }
|
|
36
|
+
});
|
|
37
|
+
}
|
|
33
38
|
async function placeOrder(address_id, redirect, isCod, shipping_option_id, stripeRedirect, tabbyRedirect) {
|
|
34
39
|
return http_service_default.post("/customer/order/", {
|
|
35
40
|
address_id,
|
|
@@ -117,4 +122,4 @@ async function verifyTabbyPayment(orderNumber) {
|
|
|
117
122
|
});
|
|
118
123
|
}
|
|
119
124
|
|
|
120
|
-
export { checkPhonepePaymentStatus, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPublicOrderDetailsByNumber, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment };
|
|
125
|
+
export { checkPhonepePaymentStatus, getOrderDetails, getOrderDetailsByNumber, getOrderDetailsByRef, getOrderDetailsByRefV2, getOrders, getPublicOrderDetailsByNumber, getPublicOrderDetailsByRef, getStripePaymentStatus, getStripePaymentStatusPublic, makeCODOrder, phonepeOrderSuccess, phonepePublicOrderSuccess, placeOrder, publicMakeCODOrder, publicPlaceOrder, razorpayOrderFail, razorpayOrderSuccess, razorpayPublicOrderSuccess, stripeOrderFail, stripeOrderSuccess, stripePublicOrderSuccess, updateOrder, updateOrderCustomization, uploadCustomizationImage, verifyTabbyPayment };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkXFOUNOKO_cjs = require('./chunk-XFOUNOKO.cjs');
|
|
4
4
|
var chunkK44JZ5NL_cjs = require('./chunk-K44JZ5NL.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkLZADKC4Y_cjs = require('./chunk-LZADKC4Y.cjs');
|
|
6
6
|
var chunkN3CTXRFT_cjs = require('./chunk-N3CTXRFT.cjs');
|
|
7
7
|
var axios = require('axios');
|
|
8
8
|
|
|
@@ -69,7 +69,7 @@ function openRazorpayCheckout(order, callbacks) {
|
|
|
69
69
|
async function handleRazorpaySuccess(data, order, callbacks) {
|
|
70
70
|
try {
|
|
71
71
|
callbacks.onPaymentStart?.();
|
|
72
|
-
await
|
|
72
|
+
await chunkLZADKC4Y_cjs.razorpayOrderSuccess(data);
|
|
73
73
|
chunkK44JZ5NL_cjs.pixelEvents.purchase(order);
|
|
74
74
|
chunkK44JZ5NL_cjs.pixelEvents.checkoutCompleted(order);
|
|
75
75
|
callbacks.onCartReset();
|
|
@@ -82,7 +82,7 @@ async function handleRazorpaySuccess(data, order, callbacks) {
|
|
|
82
82
|
}
|
|
83
83
|
async function handleRazorpayFail(order, callbacks, error) {
|
|
84
84
|
try {
|
|
85
|
-
await
|
|
85
|
+
await chunkLZADKC4Y_cjs.razorpayOrderFail({
|
|
86
86
|
order_id: order.id,
|
|
87
87
|
razorpay_order_id: order.razorpay_order_id,
|
|
88
88
|
error
|
|
@@ -115,9 +115,9 @@ async function handleCODPayment(order, callbacks, options) {
|
|
|
115
115
|
callbacks.onPaymentStart?.();
|
|
116
116
|
chunkK44JZ5NL_cjs.pixelEvents.initiateCheckout(order, "cod");
|
|
117
117
|
if (options?.isPublic) {
|
|
118
|
-
await
|
|
118
|
+
await chunkLZADKC4Y_cjs.publicMakeCODOrder(order.order_number);
|
|
119
119
|
} else {
|
|
120
|
-
await
|
|
120
|
+
await chunkLZADKC4Y_cjs.makeCODOrder(order.id);
|
|
121
121
|
}
|
|
122
122
|
chunkK44JZ5NL_cjs.pixelEvents.purchase(order);
|
|
123
123
|
chunkK44JZ5NL_cjs.pixelEvents.checkoutCompleted(order);
|
|
@@ -145,7 +145,7 @@ function handleStripePayment(order, callbacks) {
|
|
|
145
145
|
async function handleStripeSuccess(order, paymentIntentId, callbacks) {
|
|
146
146
|
try {
|
|
147
147
|
callbacks.onPaymentStart?.();
|
|
148
|
-
await
|
|
148
|
+
await chunkLZADKC4Y_cjs.stripeOrderSuccess({
|
|
149
149
|
order_id: order.id,
|
|
150
150
|
payment_intent_id: paymentIntentId
|
|
151
151
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCoupons, getAppliedCoupon, applyCoupon, removeCoupon } from './chunk-7M5CVYZJ.js';
|
|
2
2
|
import { pixelEvents } from './chunk-WFDKKOO7.js';
|
|
3
|
-
import { razorpayOrderSuccess, razorpayOrderFail, publicMakeCODOrder, makeCODOrder, stripeOrderSuccess } from './chunk-
|
|
3
|
+
import { razorpayOrderSuccess, razorpayOrderFail, publicMakeCODOrder, makeCODOrder, stripeOrderSuccess } from './chunk-ME6Z7TZW.js';
|
|
4
4
|
import { getCloudFront } from './chunk-JQMLHRWL.js';
|
|
5
5
|
import { AxiosError } from 'axios';
|
|
6
6
|
|
|
@@ -12,6 +12,6 @@ import '../product-B8elBN21.cjs';
|
|
|
12
12
|
import 'react-toastify';
|
|
13
13
|
import 'react/jsx-runtime';
|
|
14
14
|
import '../orders-1vcg6whk.cjs';
|
|
15
|
-
import '../pixelEvents-
|
|
15
|
+
import '../pixelEvents-Bob6N-g5.cjs';
|
|
16
16
|
import '../cart-lJvJzaoH.cjs';
|
|
17
17
|
import '../collections-fGX_D_Mi.cjs';
|
|
@@ -12,6 +12,6 @@ import '../product-B8elBN21.js';
|
|
|
12
12
|
import 'react-toastify';
|
|
13
13
|
import 'react/jsx-runtime';
|
|
14
14
|
import '../orders-CGhcSTMg.js';
|
|
15
|
-
import '../pixelEvents-
|
|
15
|
+
import '../pixelEvents-BEzVCIBj.js';
|
|
16
16
|
import '../cart-DV1HcSC6.js';
|
|
17
17
|
import '../collections-kERS_kZw.js';
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkY46EHRJQ_cjs = require('../chunk-Y46EHRJQ.cjs');
|
|
4
4
|
var chunk2AHH3XBW_cjs = require('../chunk-2AHH3XBW.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkDY7PNIB3_cjs = require('../chunk-DY7PNIB3.cjs');
|
|
6
6
|
var chunkPARH5TBK_cjs = require('../chunk-PARH5TBK.cjs');
|
|
7
7
|
var chunkSMHJRNCR_cjs = require('../chunk-SMHJRNCR.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunkQSHOJ3NJ_cjs = require('../chunk-QSHOJ3NJ.cjs');
|
|
9
9
|
var chunkXFOUNOKO_cjs = require('../chunk-XFOUNOKO.cjs');
|
|
10
10
|
require('../chunk-K44JZ5NL.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkLZADKC4Y_cjs = require('../chunk-LZADKC4Y.cjs');
|
|
12
12
|
var chunkKLNKIQQM_cjs = require('../chunk-KLNKIQQM.cjs');
|
|
13
13
|
var chunkRDUT4W3B_cjs = require('../chunk-RDUT4W3B.cjs');
|
|
14
14
|
require('../chunk-LJUGNSQQ.cjs');
|
|
@@ -90,7 +90,7 @@ var useOrders = (filters) => {
|
|
|
90
90
|
try {
|
|
91
91
|
setIsLoading(true);
|
|
92
92
|
const url = `/customer/order/?${queryString}`;
|
|
93
|
-
const result = await
|
|
93
|
+
const result = await chunkLZADKC4Y_cjs.getOrders(url);
|
|
94
94
|
setData(result);
|
|
95
95
|
setError(null);
|
|
96
96
|
} catch (err) {
|
|
@@ -321,7 +321,7 @@ function useCheckoutPayment(options) {
|
|
|
321
321
|
const [isConfirmingPayment, setIsConfirmingPayment] = react.useState(false);
|
|
322
322
|
const [showSuccessModal, setShowSuccessModal] = react.useState(false);
|
|
323
323
|
const [showFailureModal, setShowFailureModal] = react.useState(false);
|
|
324
|
-
const resetCartCount =
|
|
324
|
+
const resetCartCount = chunkDY7PNIB3_cjs.useCartStore((s) => s.resetCartCount);
|
|
325
325
|
const callbacks = {
|
|
326
326
|
onSuccess: (order) => {
|
|
327
327
|
setOrderSummary(order);
|
|
@@ -344,7 +344,7 @@ function useCheckoutPayment(options) {
|
|
|
344
344
|
try {
|
|
345
345
|
setIsPlacingOrder(true);
|
|
346
346
|
const isCod = paymentMethod === "cod";
|
|
347
|
-
const response = await
|
|
347
|
+
const response = await chunkLZADKC4Y_cjs.placeOrder(
|
|
348
348
|
addressId,
|
|
349
349
|
options.phonepeRedirectUrl,
|
|
350
350
|
isCod,
|
|
@@ -354,7 +354,7 @@ function useCheckoutPayment(options) {
|
|
|
354
354
|
);
|
|
355
355
|
const order = response.data;
|
|
356
356
|
setOrderSummary(order);
|
|
357
|
-
|
|
357
|
+
chunkQSHOJ3NJ_cjs.processPayment(order, paymentMethod, callbacks);
|
|
358
358
|
} catch {
|
|
359
359
|
setShowFailureModal(true);
|
|
360
360
|
} finally {
|
|
@@ -384,7 +384,7 @@ function useCheckoutCoupon(options) {
|
|
|
384
384
|
const refreshCoupons = react.useCallback(async () => {
|
|
385
385
|
setIsLoading(true);
|
|
386
386
|
try {
|
|
387
|
-
const coupons = await
|
|
387
|
+
const coupons = await chunkQSHOJ3NJ_cjs.fetchAvailableCoupons();
|
|
388
388
|
setAvailableCoupons(coupons);
|
|
389
389
|
} catch {
|
|
390
390
|
} finally {
|
|
@@ -396,7 +396,7 @@ function useCheckoutCoupon(options) {
|
|
|
396
396
|
setError(null);
|
|
397
397
|
setIsApplying(true);
|
|
398
398
|
try {
|
|
399
|
-
const coupon = await
|
|
399
|
+
const coupon = await chunkQSHOJ3NJ_cjs.applyCheckoutCoupon(code, callbacks);
|
|
400
400
|
setAppliedCoupon(coupon);
|
|
401
401
|
} catch (err) {
|
|
402
402
|
setError(err instanceof Error ? err.message : "Failed to apply coupon");
|
|
@@ -409,7 +409,7 @@ function useCheckoutCoupon(options) {
|
|
|
409
409
|
const removeCouponHandler = react.useCallback(async () => {
|
|
410
410
|
if (!appliedCoupon) return;
|
|
411
411
|
try {
|
|
412
|
-
await
|
|
412
|
+
await chunkQSHOJ3NJ_cjs.removeCheckoutCoupon(appliedCoupon.coupon_code, callbacks);
|
|
413
413
|
setAppliedCoupon(null);
|
|
414
414
|
setError(null);
|
|
415
415
|
} catch {
|
|
@@ -508,8 +508,8 @@ function useVariantSelector(options) {
|
|
|
508
508
|
}
|
|
509
509
|
function useShopCheckout(options) {
|
|
510
510
|
const { product, onNavigateToCart, onToast } = options;
|
|
511
|
-
const { addToCart, setCart } =
|
|
512
|
-
const isUserAuthenticated =
|
|
511
|
+
const { addToCart, setCart } = chunkDY7PNIB3_cjs.useCartStore();
|
|
512
|
+
const isUserAuthenticated = chunkDY7PNIB3_cjs.useAuthStore((s) => s.isAuthenticated);
|
|
513
513
|
const [isWishlisted, setIsWishlisted] = react.useState(product.is_wishlisted);
|
|
514
514
|
const [isAddedToCart, setIsAddedToCart] = react.useState(false);
|
|
515
515
|
const [loading, setLoading] = react.useState(false);
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { getUserDetails } from '../chunk-WYXT5AAG.js';
|
|
2
2
|
import { findMatchingVariant, findSimilarVariant, isVariantCombinationAvailable, isColorVariantType } from '../chunk-HEFA67WK.js';
|
|
3
|
-
import { useCartStore, useAuthStore } from '../chunk-
|
|
3
|
+
import { useCartStore, useAuthStore } from '../chunk-6NFWEJSD.js';
|
|
4
4
|
import { getCart, getProductList, getProductDetail, getWishlist, notifyProductStock, getProductCategories, getCategories } from '../chunk-CUR7CHR5.js';
|
|
5
5
|
import { cart_default } from '../chunk-QAC72HKO.js';
|
|
6
|
-
import { processPayment, fetchAvailableCoupons, applyCheckoutCoupon, removeCheckoutCoupon } from '../chunk-
|
|
6
|
+
import { processPayment, fetchAvailableCoupons, applyCheckoutCoupon, removeCheckoutCoupon } from '../chunk-VYHAWRJR.js';
|
|
7
7
|
import { applyCoupon, removeCoupon, getCoupons, getAppliedCoupon } from '../chunk-7M5CVYZJ.js';
|
|
8
8
|
import '../chunk-WFDKKOO7.js';
|
|
9
|
-
import { getOrders, placeOrder } from '../chunk-
|
|
9
|
+
import { getOrders, placeOrder } from '../chunk-ME6Z7TZW.js';
|
|
10
10
|
export { useAddressForm } from '../chunk-6Q7QMPOQ.js';
|
|
11
11
|
import { getAddresses } from '../chunk-ZGMLOLTC.js';
|
|
12
12
|
import '../chunk-OSM73ETC.js';
|
|
@@ -308,14 +308,21 @@ interface ValueHighlights {
|
|
|
308
308
|
social: null | string;
|
|
309
309
|
}[];
|
|
310
310
|
}
|
|
311
|
-
|
|
312
|
-
type
|
|
311
|
+
interface Blogs {
|
|
312
|
+
type: "blogs";
|
|
313
|
+
id: string;
|
|
314
|
+
title: string;
|
|
315
|
+
slugs: string[];
|
|
316
|
+
}
|
|
317
|
+
type SectionType = "product-collection" | "categories" | "banner" | "sub-categories" | "pre-footer" | "category-highlights" | "store-review" | "product-highlight" | "image-with-text" | "collections" | "value-highlights" | "blogs";
|
|
318
|
+
type Section = ProductCollection | Category | Banner | PreFooter | StoreReview | CategoryHighlights | SubCategorySection | ProductHighlight | ImageWithText | Collections | ValueHighlights | Blogs;
|
|
313
319
|
interface Footer {
|
|
314
320
|
showSocialLinks: boolean;
|
|
315
321
|
showContactDetails: boolean;
|
|
316
322
|
showNameWithLogo: boolean;
|
|
317
323
|
showWhatsappBubble: boolean;
|
|
318
324
|
showMadeWithStorepecker: boolean;
|
|
325
|
+
showBlogLink: boolean;
|
|
319
326
|
}
|
|
320
327
|
interface SocialLinks {
|
|
321
328
|
}
|
|
@@ -368,4 +375,4 @@ declare const pixelEvents: {
|
|
|
368
375
|
pageViewed: () => void;
|
|
369
376
|
};
|
|
370
377
|
|
|
371
|
-
export { type AvailableFilter as A, type Banner as B, type Category as C,
|
|
378
|
+
export { type AvailableFilter as A, type Banner as B, type Category as C, type Theme as D, pixelEvents as E, type FilterOption as F, type preFooterContent as G, 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 Blogs as a, type CategoryHighlights as b, type Collections as c, type ColorScheme as d, type FilterType as e, type Footer as f, type Hero as g, type HomePageContents as h, type Logo as i, type NavElement as j, type NavElementOld as k, type PageMeta as l, type PageProps as m, type PagePropsFull as n, type PreFooter as o, type ProductCollection as p, type ProductHighlight as q, type RibbonMessage as r, type Section as s, type SectionType as t, type SliderSettings as u, type SocialLinks as v, type SocialMedia as w, type StoreReview as x, type SubCategory as y, type SubCategorySection as z };
|
|
@@ -308,14 +308,21 @@ interface ValueHighlights {
|
|
|
308
308
|
social: null | string;
|
|
309
309
|
}[];
|
|
310
310
|
}
|
|
311
|
-
|
|
312
|
-
type
|
|
311
|
+
interface Blogs {
|
|
312
|
+
type: "blogs";
|
|
313
|
+
id: string;
|
|
314
|
+
title: string;
|
|
315
|
+
slugs: string[];
|
|
316
|
+
}
|
|
317
|
+
type SectionType = "product-collection" | "categories" | "banner" | "sub-categories" | "pre-footer" | "category-highlights" | "store-review" | "product-highlight" | "image-with-text" | "collections" | "value-highlights" | "blogs";
|
|
318
|
+
type Section = ProductCollection | Category | Banner | PreFooter | StoreReview | CategoryHighlights | SubCategorySection | ProductHighlight | ImageWithText | Collections | ValueHighlights | Blogs;
|
|
313
319
|
interface Footer {
|
|
314
320
|
showSocialLinks: boolean;
|
|
315
321
|
showContactDetails: boolean;
|
|
316
322
|
showNameWithLogo: boolean;
|
|
317
323
|
showWhatsappBubble: boolean;
|
|
318
324
|
showMadeWithStorepecker: boolean;
|
|
325
|
+
showBlogLink: boolean;
|
|
319
326
|
}
|
|
320
327
|
interface SocialLinks {
|
|
321
328
|
}
|
|
@@ -368,4 +375,4 @@ declare const pixelEvents: {
|
|
|
368
375
|
pageViewed: () => void;
|
|
369
376
|
};
|
|
370
377
|
|
|
371
|
-
export { type AvailableFilter as A, type Banner as B, type Category as C,
|
|
378
|
+
export { type AvailableFilter as A, type Banner as B, type Category as C, type Theme as D, pixelEvents as E, type FilterOption as F, type preFooterContent as G, 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 Blogs as a, type CategoryHighlights as b, type Collections as c, type ColorScheme as d, type FilterType as e, type Footer as f, type Hero as g, type HomePageContents as h, type Logo as i, type NavElement as j, type NavElementOld as k, type PageMeta as l, type PageProps as m, type PagePropsFull as n, type PreFooter as o, type ProductCollection as p, type ProductHighlight as q, type RibbonMessage as r, type Section as s, type SectionType as t, type SliderSettings as u, type SocialLinks as v, type SocialMedia as w, type StoreReview as x, type SubCategory as y, type SubCategorySection as z };
|
package/dist/store/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDY7PNIB3_cjs = require('../chunk-DY7PNIB3.cjs');
|
|
4
4
|
var chunkPARH5TBK_cjs = require('../chunk-PARH5TBK.cjs');
|
|
5
5
|
require('../chunk-SMHJRNCR.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-LZADKC4Y.cjs');
|
|
7
7
|
var chunkDODFO744_cjs = require('../chunk-DODFO744.cjs');
|
|
8
8
|
require('../chunk-ECHV2JSY.cjs');
|
|
9
9
|
require('../chunk-BBRXE57K.cjs');
|
|
@@ -69,15 +69,15 @@ var useProductStore = zustand.create((set, get) => ({
|
|
|
69
69
|
|
|
70
70
|
Object.defineProperty(exports, "loginUser", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkDY7PNIB3_cjs.loginUser; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "useAuthStore", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkDY7PNIB3_cjs.useAuthStore; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "useCartStore", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkDY7PNIB3_cjs.useCartStore; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "useThemeData", {
|
|
83
83
|
enumerable: true,
|
package/dist/store/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import * as zustand from 'zustand';
|
|
|
2
2
|
import { a as CartState, C as Cart, U as User } from '../cart-lJvJzaoH.cjs';
|
|
3
3
|
import { W as Wishlist } from '../wishlist-BdpIFX5_.cjs';
|
|
4
4
|
import { d as Product } from '../product-B8elBN21.cjs';
|
|
5
|
-
import { P as PageHeaderProps } from '../pixelEvents-
|
|
5
|
+
import { P as PageHeaderProps } from '../pixelEvents-Bob6N-g5.cjs';
|
|
6
6
|
import 'react-toastify';
|
|
7
7
|
import '../collections-fGX_D_Mi.cjs';
|
|
8
8
|
import '../orders-1vcg6whk.cjs';
|
package/dist/store/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as zustand from 'zustand';
|
|
|
2
2
|
import { a as CartState, C as Cart, U as User } from '../cart-DV1HcSC6.js';
|
|
3
3
|
import { W as Wishlist } from '../wishlist-B-bvvOxv.js';
|
|
4
4
|
import { d as Product } from '../product-B8elBN21.js';
|
|
5
|
-
import { P as PageHeaderProps } from '../pixelEvents-
|
|
5
|
+
import { P as PageHeaderProps } from '../pixelEvents-BEzVCIBj.js';
|
|
6
6
|
import 'react-toastify';
|
|
7
7
|
import '../collections-kERS_kZw.js';
|
|
8
8
|
import '../orders-CGhcSTMg.js';
|
package/dist/store/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { loginUser, useAuthStore, useCartStore } from '../chunk-
|
|
1
|
+
export { loginUser, useAuthStore, useCartStore } from '../chunk-6NFWEJSD.js';
|
|
2
2
|
import { getWishlist, getProducts } from '../chunk-CUR7CHR5.js';
|
|
3
3
|
import '../chunk-QAC72HKO.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-ME6Z7TZW.js';
|
|
5
5
|
export { useThemeData } from '../chunk-5NUDTIQ2.js';
|
|
6
6
|
import '../chunk-3SYYP3XV.js';
|
|
7
7
|
import '../chunk-WEMNXIRS.js';
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@ import { f as ProductDetail, O as OperatingHours, T as TimeSlot, A as Attributes
|
|
|
2
2
|
export { h as ADDRESS_FORM_SESSION_KEY, i as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, j as PRODUCT_STATUSES, g as SLICE_STATUS, U as USER_CART, k as USER_CREDENTIALS, l as USER_CRED_REFRESH_TOKEN, m as USER_CRED_TOKEN, p as pathNameMap } from '../product-B8elBN21.cjs';
|
|
3
3
|
import { C as Cart } from '../cart-lJvJzaoH.cjs';
|
|
4
4
|
export { S as SnapstoreConfig, g as getApiEndpoint, a as getCloudFront, b as getConfig, c as getPhonePeApiEndpoint, d as getPublicApiEndpoint, e as getSecretKey, f as getStoreId, i as initConfig } from '../index-DTyIuLuI.cjs';
|
|
5
|
-
import { S as SectionFilters } from '../pixelEvents-
|
|
6
|
-
export { A as AvailableFilter, B as Banner, C as Category,
|
|
5
|
+
import { S as SectionFilters } from '../pixelEvents-Bob6N-g5.cjs';
|
|
6
|
+
export { A as AvailableFilter, B as Banner, a as Blogs, C as Category, b as CategoryHighlights, c as Collections, d as ColorScheme, F as FilterOption, e as FilterType, f as Footer, H as HeaderCategory, g as Hero, h as HomePageContents, I as ImageWithText, L as LocationData, i as Logo, M as Menuitem, N as NavBar, j as NavElement, k as NavElementOld, P as PageHeaderProps, l as PageMeta, m as PageProps, n as PagePropsFull, o as PreFooter, p as ProductCollection, q as ProductHighlight, R as RibbonBar, r as RibbonMessage, s as Section, t as SectionType, u as SliderSettings, v as SocialLinks, w as SocialMedia, x as StoreReview, y as SubCategory, z as SubCategorySection, T as TemplateTheme, D as Theme, V as ValueHighlights, E as pixelEvents, G as preFooterContent } from '../pixelEvents-Bob6N-g5.cjs';
|
|
7
7
|
import { AxiosResponse } from 'axios';
|
|
8
8
|
import { a as PhonePe } from '../phonepe-dWMLZel6.cjs';
|
|
9
9
|
import 'react-toastify';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { f as ProductDetail, O as OperatingHours, T as TimeSlot, A as Attributes
|
|
|
2
2
|
export { h as ADDRESS_FORM_SESSION_KEY, i as ALLOWED_COUNTRIES, D as DEFAULT_TOAST_CONFIG, j as PRODUCT_STATUSES, g as SLICE_STATUS, U as USER_CART, k as USER_CREDENTIALS, l as USER_CRED_REFRESH_TOKEN, m as USER_CRED_TOKEN, p as pathNameMap } from '../product-B8elBN21.js';
|
|
3
3
|
import { C as Cart } from '../cart-DV1HcSC6.js';
|
|
4
4
|
export { S as SnapstoreConfig, g as getApiEndpoint, a as getCloudFront, b as getConfig, c as getPhonePeApiEndpoint, d as getPublicApiEndpoint, e as getSecretKey, f as getStoreId, i as initConfig } from '../index-DTyIuLuI.js';
|
|
5
|
-
import { S as SectionFilters } from '../pixelEvents-
|
|
6
|
-
export { A as AvailableFilter, B as Banner, C as Category,
|
|
5
|
+
import { S as SectionFilters } from '../pixelEvents-BEzVCIBj.js';
|
|
6
|
+
export { A as AvailableFilter, B as Banner, a as Blogs, C as Category, b as CategoryHighlights, c as Collections, d as ColorScheme, F as FilterOption, e as FilterType, f as Footer, H as HeaderCategory, g as Hero, h as HomePageContents, I as ImageWithText, L as LocationData, i as Logo, M as Menuitem, N as NavBar, j as NavElement, k as NavElementOld, P as PageHeaderProps, l as PageMeta, m as PageProps, n as PagePropsFull, o as PreFooter, p as ProductCollection, q as ProductHighlight, R as RibbonBar, r as RibbonMessage, s as Section, t as SectionType, u as SliderSettings, v as SocialLinks, w as SocialMedia, x as StoreReview, y as SubCategory, z as SubCategorySection, T as TemplateTheme, D as Theme, V as ValueHighlights, E as pixelEvents, G as preFooterContent } from '../pixelEvents-BEzVCIBj.js';
|
|
7
7
|
import { AxiosResponse } from 'axios';
|
|
8
8
|
import { a as PhonePe } from '../phonepe-dWMLZel6.js';
|
|
9
9
|
import 'react-toastify';
|