@storepecker/storefront-core 2.5.2 → 2.5.4
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 +74 -45
- package/dist/api/index.d.cts +33 -7
- package/dist/api/index.d.ts +33 -7
- package/dist/api/index.js +25 -4
- package/dist/{cart-DV1HcSC6.d.ts → cart-BGIsIZdM.d.ts} +1 -1
- package/dist/{cart-lJvJzaoH.d.cts → cart-CyN2JQTw.d.cts} +1 -1
- package/dist/checkout/index.cjs +23 -23
- package/dist/checkout/index.d.cts +3 -3
- package/dist/checkout/index.d.ts +3 -3
- package/dist/checkout/index.js +3 -3
- package/dist/{chunk-PARH5TBK.cjs → chunk-5BT3MH4A.cjs} +3 -3
- package/dist/{chunk-EGFOTJPC.js → chunk-5XVHYPOC.js} +1 -1
- package/dist/{chunk-OTMTHA5C.cjs → chunk-6LS5F4R3.cjs} +80 -0
- package/dist/{chunk-F45S7UWC.js → chunk-CBKJ3Y2I.js} +80 -1
- package/dist/{chunk-QAC72HKO.js → chunk-H32TICAM.js} +14 -13
- package/dist/{chunk-6Q7QMPOQ.js → chunk-ICKTXS6B.js} +1 -1
- package/dist/{chunk-HAQWCNDY.cjs → chunk-IG4BW3ZB.cjs} +3 -3
- package/dist/{chunk-KLNKIQQM.cjs → chunk-IVKJJLG7.cjs} +2 -2
- package/dist/{chunk-SMHJRNCR.cjs → chunk-LCMJYFHC.cjs} +14 -13
- package/dist/{chunk-DXQX7ZIL.cjs → chunk-LZADKC4Y.cjs} +6 -0
- package/dist/{chunk-S3ZZ3ZA7.js → chunk-ME6Z7TZW.js} +6 -1
- package/dist/{chunk-P252YNRA.js → chunk-PGBYYKFQ.js} +6 -6
- package/dist/{chunk-PZJT2Y5B.cjs → chunk-QSHOJ3NJ.cjs} +7 -7
- package/dist/{chunk-CUR7CHR5.js → chunk-TY5NK7NW.js} +1 -1
- package/dist/{chunk-NXQIWB36.js → chunk-VYHAWRJR.js} +2 -2
- package/dist/{chunk-L43KF3AC.js → chunk-W6BDMNSU.js} +1 -1
- package/dist/{chunk-B3BXKMQA.cjs → chunk-YLLAP3H2.cjs} +2 -2
- package/dist/{chunk-FU46MZTI.cjs → chunk-ZQOESVVE.cjs} +23 -23
- package/dist/{collections-fGX_D_Mi.d.cts → collections-8YdINtUf.d.cts} +1 -1
- package/dist/{collections-kERS_kZw.d.ts → collections-ycrA2cPL.d.ts} +1 -1
- package/dist/components/address-form.cjs +5 -4
- package/dist/components/address-form.js +4 -3
- package/dist/components/digital-product-download-modal.d.cts +2 -2
- package/dist/components/digital-product-download-modal.d.ts +2 -2
- package/dist/components/index.cjs +7 -7
- package/dist/components/index.d.cts +5 -5
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.js +5 -5
- package/dist/components/share-button.cjs +4 -3
- package/dist/components/share-button.d.cts +1 -1
- package/dist/components/share-button.d.ts +1 -1
- package/dist/components/share-button.js +3 -2
- package/dist/components/theme-data-initializer.d.cts +5 -5
- package/dist/components/theme-data-initializer.d.ts +5 -5
- package/dist/hooks/index.cjs +34 -33
- package/dist/hooks/index.d.cts +6 -6
- package/dist/hooks/index.d.ts +6 -6
- package/dist/hooks/index.js +14 -13
- package/dist/{booking-Bpj3o6Av.d.cts → instagram-CqJBZ-0X.d.ts} +56 -2
- package/dist/{booking-cbb8kh2L.d.ts → instagram-D4JUT4ZU.d.cts} +56 -2
- package/dist/models/index.d.cts +6 -6
- package/dist/models/index.d.ts +6 -6
- package/dist/{orders--jclZ94W.d.cts → orders-9_scVq_M.d.cts} +7 -2
- package/dist/{orders-D1fVTlCj.d.ts → orders-C1XZr8tx.d.ts} +7 -2
- package/dist/{pixelEvents-BhKaV1r5.d.ts → pixelEvents-D0sH22Er.d.ts} +14 -7
- package/dist/{pixelEvents-CdYQsgEH.d.cts → pixelEvents-uiPHbiAQ.d.cts} +14 -7
- package/dist/{product-B8elBN21.d.ts → product-CZtFWhxO.d.cts} +3 -0
- package/dist/{product-B8elBN21.d.cts → product-CZtFWhxO.d.ts} +3 -0
- package/dist/store/index.cjs +9 -9
- package/dist/store/index.d.cts +7 -7
- package/dist/store/index.d.ts +7 -7
- package/dist/store/index.js +4 -4
- package/dist/utils/index.cjs +31 -27
- package/dist/utils/index.d.cts +13 -9
- package/dist/utils/index.d.ts +13 -9
- package/dist/utils/index.js +4 -4
- package/dist/{wishlist-B-bvvOxv.d.ts → wishlist-CRNbfFIx.d.ts} +1 -1
- package/dist/{wishlist-BdpIFX5_.d.cts → wishlist-Cx9Vrszq.d.cts} +1 -1
- package/package.json +1 -1
package/dist/hooks/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
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-
|
|
4
|
-
import { getCart, getProductList, getProductDetail, getWishlist, notifyProductStock, getProductCategories, getCategories } from '../chunk-
|
|
5
|
-
import { cart_default } from '../chunk-
|
|
6
|
-
import { processPayment, fetchAvailableCoupons, applyCheckoutCoupon, removeCheckoutCoupon } from '../chunk-
|
|
3
|
+
import { useCartStore, useAuthStore } from '../chunk-PGBYYKFQ.js';
|
|
4
|
+
import { getCart, getProductList, getProductDetail, getWishlist, notifyProductStock, getProductCategories, getCategories } from '../chunk-TY5NK7NW.js';
|
|
5
|
+
import { cart_default } from '../chunk-H32TICAM.js';
|
|
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-
|
|
10
|
-
export { useAddressForm } from '../chunk-
|
|
9
|
+
import { getOrders, placeOrder } from '../chunk-ME6Z7TZW.js';
|
|
10
|
+
export { useAddressForm } from '../chunk-ICKTXS6B.js';
|
|
11
11
|
import { getAddresses } from '../chunk-ZGMLOLTC.js';
|
|
12
12
|
import '../chunk-OSM73ETC.js';
|
|
13
|
-
import { shareLink, convertToCurrency } from '../chunk-
|
|
13
|
+
import { shareLink, convertToCurrency } from '../chunk-CBKJ3Y2I.js';
|
|
14
|
+
import '../chunk-HSF2D56O.js';
|
|
14
15
|
import '../chunk-ELP23UGF.js';
|
|
15
16
|
import '../chunk-3SYYP3XV.js';
|
|
16
17
|
import '../chunk-WEMNXIRS.js';
|
|
@@ -50,10 +51,10 @@ var useCart = (addressId) => {
|
|
|
50
51
|
const [error, setError] = useState(null);
|
|
51
52
|
const [isLoading, setIsLoading] = useState(true);
|
|
52
53
|
const fetchData = useCallback(
|
|
53
|
-
async (addrId) => {
|
|
54
|
+
async (addrId, shippingId) => {
|
|
54
55
|
try {
|
|
55
56
|
setIsLoading(true);
|
|
56
|
-
const result = await getCart("/customer/cart/", addrId ?? addressId);
|
|
57
|
+
const result = await getCart("/customer/cart/", addrId ?? addressId, shippingId);
|
|
57
58
|
setData(result);
|
|
58
59
|
setError(null);
|
|
59
60
|
} catch (err) {
|
|
@@ -68,8 +69,8 @@ var useCart = (addressId) => {
|
|
|
68
69
|
fetchData();
|
|
69
70
|
}, [fetchData]);
|
|
70
71
|
const refetchWithParams = useCallback(
|
|
71
|
-
(newAddressId) => {
|
|
72
|
-
fetchData(newAddressId);
|
|
72
|
+
(newAddressId, shippingId) => {
|
|
73
|
+
fetchData(newAddressId, shippingId);
|
|
73
74
|
},
|
|
74
75
|
[fetchData]
|
|
75
76
|
);
|
|
@@ -545,7 +546,7 @@ function useShopCheckout(options) {
|
|
|
545
546
|
setLoading(false);
|
|
546
547
|
}
|
|
547
548
|
} else {
|
|
548
|
-
cart_default.add(product);
|
|
549
|
+
cart_default.add(product, quantity);
|
|
549
550
|
const localCartItems = cart_default.get();
|
|
550
551
|
if (localCartItems) {
|
|
551
552
|
setCart(localCartItems);
|
|
@@ -591,7 +592,7 @@ function useShopCheckout(options) {
|
|
|
591
592
|
setLoading(false);
|
|
592
593
|
}
|
|
593
594
|
} else {
|
|
594
|
-
cart_default.add(product);
|
|
595
|
+
cart_default.add(product, quantity);
|
|
595
596
|
const localCartItems = cart_default.get();
|
|
596
597
|
if (localCartItems) {
|
|
597
598
|
setCart(localCartItems);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as ProductDetail } from './product-
|
|
1
|
+
import { f as ProductDetail } from './product-CZtFWhxO.js';
|
|
2
2
|
|
|
3
3
|
declare namespace Review {
|
|
4
4
|
interface ReviewPayload {
|
|
@@ -89,4 +89,58 @@ interface Booking {
|
|
|
89
89
|
service_details: ProductDetail.Root;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
declare namespace Blog {
|
|
93
|
+
interface Post {
|
|
94
|
+
id: number;
|
|
95
|
+
title: string;
|
|
96
|
+
slug: string;
|
|
97
|
+
content: string;
|
|
98
|
+
og_image?: string;
|
|
99
|
+
category?: string;
|
|
100
|
+
category_detail?: {
|
|
101
|
+
id: number;
|
|
102
|
+
name: string;
|
|
103
|
+
slug: string;
|
|
104
|
+
};
|
|
105
|
+
meta_title?: string;
|
|
106
|
+
meta_description?: string;
|
|
107
|
+
date?: string;
|
|
108
|
+
created_at: string;
|
|
109
|
+
updated_at: string;
|
|
110
|
+
status: "draft" | "published" | "scheduled";
|
|
111
|
+
author: {
|
|
112
|
+
name: string;
|
|
113
|
+
};
|
|
114
|
+
store_name: string;
|
|
115
|
+
store_logo: string;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare namespace Instagram {
|
|
120
|
+
type MediaType = "IMAGE" | "VIDEO" | "CAROUSEL_ALBUM";
|
|
121
|
+
interface MediaChild {
|
|
122
|
+
id: string;
|
|
123
|
+
media_type?: MediaType;
|
|
124
|
+
media_url?: string;
|
|
125
|
+
thumbnail_url?: string;
|
|
126
|
+
}
|
|
127
|
+
interface Media {
|
|
128
|
+
id: string;
|
|
129
|
+
caption?: string;
|
|
130
|
+
media_type: MediaType;
|
|
131
|
+
media_url?: string;
|
|
132
|
+
permalink?: string;
|
|
133
|
+
thumbnail_url?: string;
|
|
134
|
+
timestamp?: string;
|
|
135
|
+
like_count?: number;
|
|
136
|
+
comments_count?: number;
|
|
137
|
+
children?: {
|
|
138
|
+
data?: MediaChild[];
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
interface MediaRefreshResponse {
|
|
142
|
+
data: Media[];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export { Analytics as A, Blog as B, Instagram as I, Review as R, type Booking as a, type BookingDetails as b };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as ProductDetail } from './product-
|
|
1
|
+
import { f as ProductDetail } from './product-CZtFWhxO.cjs';
|
|
2
2
|
|
|
3
3
|
declare namespace Review {
|
|
4
4
|
interface ReviewPayload {
|
|
@@ -89,4 +89,58 @@ interface Booking {
|
|
|
89
89
|
service_details: ProductDetail.Root;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
declare namespace Blog {
|
|
93
|
+
interface Post {
|
|
94
|
+
id: number;
|
|
95
|
+
title: string;
|
|
96
|
+
slug: string;
|
|
97
|
+
content: string;
|
|
98
|
+
og_image?: string;
|
|
99
|
+
category?: string;
|
|
100
|
+
category_detail?: {
|
|
101
|
+
id: number;
|
|
102
|
+
name: string;
|
|
103
|
+
slug: string;
|
|
104
|
+
};
|
|
105
|
+
meta_title?: string;
|
|
106
|
+
meta_description?: string;
|
|
107
|
+
date?: string;
|
|
108
|
+
created_at: string;
|
|
109
|
+
updated_at: string;
|
|
110
|
+
status: "draft" | "published" | "scheduled";
|
|
111
|
+
author: {
|
|
112
|
+
name: string;
|
|
113
|
+
};
|
|
114
|
+
store_name: string;
|
|
115
|
+
store_logo: string;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare namespace Instagram {
|
|
120
|
+
type MediaType = "IMAGE" | "VIDEO" | "CAROUSEL_ALBUM";
|
|
121
|
+
interface MediaChild {
|
|
122
|
+
id: string;
|
|
123
|
+
media_type?: MediaType;
|
|
124
|
+
media_url?: string;
|
|
125
|
+
thumbnail_url?: string;
|
|
126
|
+
}
|
|
127
|
+
interface Media {
|
|
128
|
+
id: string;
|
|
129
|
+
caption?: string;
|
|
130
|
+
media_type: MediaType;
|
|
131
|
+
media_url?: string;
|
|
132
|
+
permalink?: string;
|
|
133
|
+
thumbnail_url?: string;
|
|
134
|
+
timestamp?: string;
|
|
135
|
+
like_count?: number;
|
|
136
|
+
comments_count?: number;
|
|
137
|
+
children?: {
|
|
138
|
+
data?: MediaChild[];
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
interface MediaRefreshResponse {
|
|
142
|
+
data: Media[];
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export { Analytics as A, Blog as B, Instagram as I, Review as R, type Booking as a, type BookingDetails as b };
|
package/dist/models/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { A as Address } from '../address-DwBZHzbI.cjs';
|
|
2
|
-
export { A as Analytics, B as
|
|
3
|
-
export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, U as User, V as ValueType } from '../cart-
|
|
4
|
-
export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-
|
|
5
|
-
export { O as Order } from '../orders
|
|
2
|
+
export { A as Analytics, B as Blog, a as Booking, b as BookingDetails, I as Instagram, R as Review } from '../instagram-D4JUT4ZU.cjs';
|
|
3
|
+
export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, U as User, V as ValueType } from '../cart-CyN2JQTw.cjs';
|
|
4
|
+
export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-8YdINtUf.cjs';
|
|
5
|
+
export { O as Order } from '../orders-9_scVq_M.cjs';
|
|
6
6
|
export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-dWMLZel6.cjs';
|
|
7
|
-
export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-
|
|
8
|
-
export { W as Wishlist } from '../wishlist-
|
|
7
|
+
export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-CZtFWhxO.cjs';
|
|
8
|
+
export { W as Wishlist } from '../wishlist-Cx9Vrszq.cjs';
|
|
9
9
|
import 'react-toastify';
|
|
10
10
|
|
|
11
11
|
declare namespace CountryModel {
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { A as Address } from '../address-DwBZHzbI.js';
|
|
2
|
-
export { A as Analytics, B as
|
|
3
|
-
export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, U as User, V as ValueType } from '../cart-
|
|
4
|
-
export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-
|
|
5
|
-
export { O as Order } from '../orders-
|
|
2
|
+
export { A as Analytics, B as Blog, a as Booking, b as BookingDetails, I as Instagram, R as Review } from '../instagram-CqJBZ-0X.js';
|
|
3
|
+
export { A as ApplicableTarget, C as Cart, a as CartState, b as Category, c as Coupon, d as CouponResponse, e as CouponStatus, f as Coupons, D as DiscountType, U as User, V as ValueType } from '../cart-BGIsIZdM.js';
|
|
4
|
+
export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-ycrA2cPL.js';
|
|
5
|
+
export { O as Order } from '../orders-C1XZr8tx.js';
|
|
6
6
|
export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-dWMLZel6.js';
|
|
7
|
-
export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-
|
|
8
|
-
export { W as Wishlist } from '../wishlist-
|
|
7
|
+
export { A as Attributes, B as BaseProduct, a as BookingService, b as BookingServiceDate, c as Brand, C as CustomField, O as OperatingHours, P as Photos, d as Product, e as ProductAttribute, f as ProductDetail, S as SpecialHours, T as TimeSlot, W as WishlistState } from '../product-CZtFWhxO.js';
|
|
8
|
+
export { W as Wishlist } from '../wishlist-CRNbfFIx.js';
|
|
9
9
|
import 'react-toastify';
|
|
10
10
|
|
|
11
11
|
declare namespace CountryModel {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Photos } from './product-
|
|
1
|
+
import { P as Photos } from './product-CZtFWhxO.cjs';
|
|
2
2
|
|
|
3
3
|
declare namespace Order {
|
|
4
4
|
interface Root {
|
|
@@ -11,6 +11,7 @@ declare namespace Order {
|
|
|
11
11
|
purchased_products: PurchasedProduct[];
|
|
12
12
|
order_status: OrderStatus;
|
|
13
13
|
order_number: number;
|
|
14
|
+
order_ref: string;
|
|
14
15
|
payment_method: string | null;
|
|
15
16
|
shipping_address: string;
|
|
16
17
|
shipping_city: string;
|
|
@@ -34,6 +35,8 @@ declare namespace Order {
|
|
|
34
35
|
total_amount: number;
|
|
35
36
|
}[];
|
|
36
37
|
is_preorder: boolean;
|
|
38
|
+
selected_shipping_option_name: string;
|
|
39
|
+
shipping_amount: number;
|
|
37
40
|
}
|
|
38
41
|
interface OrderResponse {
|
|
39
42
|
currentPage: number;
|
|
@@ -58,7 +61,7 @@ declare namespace Order {
|
|
|
58
61
|
name: string;
|
|
59
62
|
phone: string;
|
|
60
63
|
}
|
|
61
|
-
type OrderStatus = "pending" | "confirmed" | "packed" | "shipped" | "delivered" | "cancelled" | "failed" | "paid";
|
|
64
|
+
type OrderStatus = "pending" | "confirmed" | "packed" | "shipped" | "delivered" | "cancelled" | "failed" | "paid" | "payment_pending" | "refunded" | "returned";
|
|
62
65
|
interface OrderSummary {
|
|
63
66
|
id: number;
|
|
64
67
|
store: number;
|
|
@@ -69,6 +72,7 @@ declare namespace Order {
|
|
|
69
72
|
purchased_products: PurchasedProduct[];
|
|
70
73
|
order_status: string;
|
|
71
74
|
order_number: number;
|
|
75
|
+
order_ref: string;
|
|
72
76
|
payment_method: string | null;
|
|
73
77
|
shipping_address: string;
|
|
74
78
|
shipping_city: string;
|
|
@@ -122,6 +126,7 @@ declare namespace Order {
|
|
|
122
126
|
total_amount: number;
|
|
123
127
|
}[];
|
|
124
128
|
is_preorder: boolean;
|
|
129
|
+
cod_amount: number;
|
|
125
130
|
}
|
|
126
131
|
interface PurchasedProduct {
|
|
127
132
|
product_id: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Photos } from './product-
|
|
1
|
+
import { P as Photos } from './product-CZtFWhxO.js';
|
|
2
2
|
|
|
3
3
|
declare namespace Order {
|
|
4
4
|
interface Root {
|
|
@@ -11,6 +11,7 @@ declare namespace Order {
|
|
|
11
11
|
purchased_products: PurchasedProduct[];
|
|
12
12
|
order_status: OrderStatus;
|
|
13
13
|
order_number: number;
|
|
14
|
+
order_ref: string;
|
|
14
15
|
payment_method: string | null;
|
|
15
16
|
shipping_address: string;
|
|
16
17
|
shipping_city: string;
|
|
@@ -34,6 +35,8 @@ declare namespace Order {
|
|
|
34
35
|
total_amount: number;
|
|
35
36
|
}[];
|
|
36
37
|
is_preorder: boolean;
|
|
38
|
+
selected_shipping_option_name: string;
|
|
39
|
+
shipping_amount: number;
|
|
37
40
|
}
|
|
38
41
|
interface OrderResponse {
|
|
39
42
|
currentPage: number;
|
|
@@ -58,7 +61,7 @@ declare namespace Order {
|
|
|
58
61
|
name: string;
|
|
59
62
|
phone: string;
|
|
60
63
|
}
|
|
61
|
-
type OrderStatus = "pending" | "confirmed" | "packed" | "shipped" | "delivered" | "cancelled" | "failed" | "paid";
|
|
64
|
+
type OrderStatus = "pending" | "confirmed" | "packed" | "shipped" | "delivered" | "cancelled" | "failed" | "paid" | "payment_pending" | "refunded" | "returned";
|
|
62
65
|
interface OrderSummary {
|
|
63
66
|
id: number;
|
|
64
67
|
store: number;
|
|
@@ -69,6 +72,7 @@ declare namespace Order {
|
|
|
69
72
|
purchased_products: PurchasedProduct[];
|
|
70
73
|
order_status: string;
|
|
71
74
|
order_number: number;
|
|
75
|
+
order_ref: string;
|
|
72
76
|
payment_method: string | null;
|
|
73
77
|
shipping_address: string;
|
|
74
78
|
shipping_city: string;
|
|
@@ -122,6 +126,7 @@ declare namespace Order {
|
|
|
122
126
|
total_amount: number;
|
|
123
127
|
}[];
|
|
124
128
|
is_preorder: boolean;
|
|
129
|
+
cod_amount: number;
|
|
125
130
|
}
|
|
126
131
|
interface PurchasedProduct {
|
|
127
132
|
product_id: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as Category$1, C as Cart } from './cart-
|
|
2
|
-
import { C as CollectionResponse } from './collections-
|
|
3
|
-
import { O as Order } from './orders-
|
|
4
|
-
import { f as ProductDetail, d as Product } from './product-
|
|
1
|
+
import { b as Category$1, C as Cart } from './cart-BGIsIZdM.js';
|
|
2
|
+
import { C as CollectionResponse } from './collections-ycrA2cPL.js';
|
|
3
|
+
import { O as Order } from './orders-C1XZr8tx.js';
|
|
4
|
+
import { f as ProductDetail, d as Product } from './product-CZtFWhxO.js';
|
|
5
5
|
|
|
6
6
|
interface PageProps {
|
|
7
7
|
nav_bar: NavBar;
|
|
@@ -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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as Category$1, C as Cart } from './cart-
|
|
2
|
-
import { C as CollectionResponse } from './collections-
|
|
3
|
-
import { O as Order } from './orders
|
|
4
|
-
import { f as ProductDetail, d as Product } from './product-
|
|
1
|
+
import { b as Category$1, C as Cart } from './cart-CyN2JQTw.cjs';
|
|
2
|
+
import { C as CollectionResponse } from './collections-8YdINtUf.cjs';
|
|
3
|
+
import { O as Order } from './orders-9_scVq_M.cjs';
|
|
4
|
+
import { f as ProductDetail, d as Product } from './product-CZtFWhxO.cjs';
|
|
5
5
|
|
|
6
6
|
interface PageProps {
|
|
7
7
|
nav_bar: NavBar;
|
|
@@ -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 };
|
|
@@ -89,6 +89,7 @@ declare namespace Product {
|
|
|
89
89
|
status: string;
|
|
90
90
|
is_active: boolean;
|
|
91
91
|
product_variants: ProductVariant[];
|
|
92
|
+
is_whatsapp_checkout_enabled: boolean;
|
|
92
93
|
}
|
|
93
94
|
interface ProductList {
|
|
94
95
|
id: number;
|
|
@@ -129,6 +130,7 @@ declare namespace Product {
|
|
|
129
130
|
};
|
|
130
131
|
is_preorder: boolean;
|
|
131
132
|
preorder_ship_days: number;
|
|
133
|
+
is_whatsapp_checkout_enabled: boolean;
|
|
132
134
|
}
|
|
133
135
|
interface ProductResponse {
|
|
134
136
|
count: number;
|
|
@@ -245,6 +247,7 @@ declare namespace ProductDetail {
|
|
|
245
247
|
};
|
|
246
248
|
is_preorder: boolean;
|
|
247
249
|
preorder_ship_days: number;
|
|
250
|
+
is_whatsapp_checkout_enabled: boolean;
|
|
248
251
|
}
|
|
249
252
|
interface VariantAttribute {
|
|
250
253
|
[key: string]: {
|
|
@@ -89,6 +89,7 @@ declare namespace Product {
|
|
|
89
89
|
status: string;
|
|
90
90
|
is_active: boolean;
|
|
91
91
|
product_variants: ProductVariant[];
|
|
92
|
+
is_whatsapp_checkout_enabled: boolean;
|
|
92
93
|
}
|
|
93
94
|
interface ProductList {
|
|
94
95
|
id: number;
|
|
@@ -129,6 +130,7 @@ declare namespace Product {
|
|
|
129
130
|
};
|
|
130
131
|
is_preorder: boolean;
|
|
131
132
|
preorder_ship_days: number;
|
|
133
|
+
is_whatsapp_checkout_enabled: boolean;
|
|
132
134
|
}
|
|
133
135
|
interface ProductResponse {
|
|
134
136
|
count: number;
|
|
@@ -245,6 +247,7 @@ declare namespace ProductDetail {
|
|
|
245
247
|
};
|
|
246
248
|
is_preorder: boolean;
|
|
247
249
|
preorder_ship_days: number;
|
|
250
|
+
is_whatsapp_checkout_enabled: boolean;
|
|
248
251
|
}
|
|
249
252
|
interface VariantAttribute {
|
|
250
253
|
[key: string]: {
|
package/dist/store/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunkZQOESVVE_cjs = require('../chunk-ZQOESVVE.cjs');
|
|
4
|
+
var chunk5BT3MH4A_cjs = require('../chunk-5BT3MH4A.cjs');
|
|
5
|
+
require('../chunk-LCMJYFHC.cjs');
|
|
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');
|
|
@@ -21,7 +21,7 @@ var useWishlistStore = zustand.create((set) => ({
|
|
|
21
21
|
resetWishlist: () => set(initialState),
|
|
22
22
|
syncWishlist: async () => {
|
|
23
23
|
try {
|
|
24
|
-
const response = await
|
|
24
|
+
const response = await chunk5BT3MH4A_cjs.getWishlist("/customer/wishlist/");
|
|
25
25
|
if (response.data) {
|
|
26
26
|
set({
|
|
27
27
|
wishlist_count: response.data.wishlist_count,
|
|
@@ -49,7 +49,7 @@ var useProductStore = zustand.create((set, get) => ({
|
|
|
49
49
|
data: filter.page === 1 ? [] : state.data
|
|
50
50
|
}));
|
|
51
51
|
try {
|
|
52
|
-
const response = await
|
|
52
|
+
const response = await chunk5BT3MH4A_cjs.getProducts({ ...filter });
|
|
53
53
|
if (response.data) {
|
|
54
54
|
const { results, ...meta } = response.data;
|
|
55
55
|
set((state) => ({
|
|
@@ -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 chunkZQOESVVE_cjs.loginUser; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "useAuthStore", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkZQOESVVE_cjs.useAuthStore; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "useCartStore", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkZQOESVVE_cjs.useCartStore; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "useThemeData", {
|
|
83
83
|
enumerable: true,
|
package/dist/store/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as zustand from 'zustand';
|
|
2
|
-
import { a as CartState, C as Cart, U as User } from '../cart-
|
|
3
|
-
import { W as Wishlist } from '../wishlist-
|
|
4
|
-
import { d as Product } from '../product-
|
|
5
|
-
import { P as PageHeaderProps } from '../pixelEvents-
|
|
2
|
+
import { a as CartState, C as Cart, U as User } from '../cart-CyN2JQTw.cjs';
|
|
3
|
+
import { W as Wishlist } from '../wishlist-Cx9Vrszq.cjs';
|
|
4
|
+
import { d as Product } from '../product-CZtFWhxO.cjs';
|
|
5
|
+
import { P as PageHeaderProps } from '../pixelEvents-uiPHbiAQ.cjs';
|
|
6
6
|
import 'react-toastify';
|
|
7
|
-
import '../collections-
|
|
8
|
-
import '../orders
|
|
7
|
+
import '../collections-8YdINtUf.cjs';
|
|
8
|
+
import '../orders-9_scVq_M.cjs';
|
|
9
9
|
|
|
10
10
|
interface CartStore extends CartState {
|
|
11
11
|
setCart: (cart: Cart.Root) => void;
|
|
@@ -16,7 +16,7 @@ interface CartStore extends CartState {
|
|
|
16
16
|
*/
|
|
17
17
|
syncCart: (addressId?: number, shippingOptionId?: number) => Promise<void>;
|
|
18
18
|
fetchCart: (addressId?: number, shippingOptionId?: number) => Promise<void>;
|
|
19
|
-
|
|
19
|
+
fetchCartItemQuantity: () => Promise<void>;
|
|
20
20
|
/**
|
|
21
21
|
* Cart modification helpers that call the corresponding API and
|
|
22
22
|
* automatically synchronize the store afterwards.
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as zustand from 'zustand';
|
|
2
|
-
import { a as CartState, C as Cart, U as User } from '../cart-
|
|
3
|
-
import { W as Wishlist } from '../wishlist-
|
|
4
|
-
import { d as Product } from '../product-
|
|
5
|
-
import { P as PageHeaderProps } from '../pixelEvents-
|
|
2
|
+
import { a as CartState, C as Cart, U as User } from '../cart-BGIsIZdM.js';
|
|
3
|
+
import { W as Wishlist } from '../wishlist-CRNbfFIx.js';
|
|
4
|
+
import { d as Product } from '../product-CZtFWhxO.js';
|
|
5
|
+
import { P as PageHeaderProps } from '../pixelEvents-D0sH22Er.js';
|
|
6
6
|
import 'react-toastify';
|
|
7
|
-
import '../collections-
|
|
8
|
-
import '../orders-
|
|
7
|
+
import '../collections-ycrA2cPL.js';
|
|
8
|
+
import '../orders-C1XZr8tx.js';
|
|
9
9
|
|
|
10
10
|
interface CartStore extends CartState {
|
|
11
11
|
setCart: (cart: Cart.Root) => void;
|
|
@@ -16,7 +16,7 @@ interface CartStore extends CartState {
|
|
|
16
16
|
*/
|
|
17
17
|
syncCart: (addressId?: number, shippingOptionId?: number) => Promise<void>;
|
|
18
18
|
fetchCart: (addressId?: number, shippingOptionId?: number) => Promise<void>;
|
|
19
|
-
|
|
19
|
+
fetchCartItemQuantity: () => Promise<void>;
|
|
20
20
|
/**
|
|
21
21
|
* Cart modification helpers that call the corresponding API and
|
|
22
22
|
* automatically synchronize the store afterwards.
|
package/dist/store/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { loginUser, useAuthStore, useCartStore } from '../chunk-
|
|
2
|
-
import { getWishlist, getProducts } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { loginUser, useAuthStore, useCartStore } from '../chunk-PGBYYKFQ.js';
|
|
2
|
+
import { getWishlist, getProducts } from '../chunk-TY5NK7NW.js';
|
|
3
|
+
import '../chunk-H32TICAM.js';
|
|
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';
|