@storepecker/storefront-core 2.4.2 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.cjs +50 -42
- package/dist/api/index.d.cts +11 -4
- package/dist/api/index.d.ts +11 -4
- package/dist/api/index.js +2 -2
- package/dist/{cart-y-7RPmnQ.d.ts → cart-CLf2ljxd.d.ts} +21 -0
- package/dist/{cart-kJoawc_Z.d.cts → cart-CuLMWnfy.d.cts} +21 -0
- package/dist/checkout/index.cjs +22 -22
- package/dist/checkout/index.d.cts +1 -1
- package/dist/checkout/index.d.ts +1 -1
- package/dist/checkout/index.js +2 -2
- package/dist/{chunk-QU53I4AA.cjs → chunk-23YAZNVF.cjs} +37 -18
- package/dist/{chunk-AOJRQMJZ.cjs → chunk-DXQX7ZIL.cjs} +8 -1
- package/dist/{chunk-Y2CPMT34.cjs → chunk-MTSMQAZR.cjs} +11 -3
- package/dist/{chunk-YFF6DWZM.js → chunk-S3ZZ3ZA7.js} +8 -2
- package/dist/{chunk-ZIALBJZK.cjs → chunk-TLNCCSTQ.cjs} +6 -6
- package/dist/{chunk-SFMTL3AQ.js → chunk-VETLYY7W.js} +1 -1
- package/dist/{chunk-BR45AXQP.js → chunk-VZAIAQZJ.js} +33 -14
- package/dist/{chunk-U25T7M6S.js → chunk-XURYZRER.js} +11 -4
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/theme-data-initializer.d.cts +2 -2
- package/dist/components/theme-data-initializer.d.ts +2 -2
- package/dist/hooks/index.cjs +22 -21
- package/dist/hooks/index.d.cts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +6 -5
- package/dist/models/index.d.cts +1 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/{pixelEvents-C1rFPOwb.d.cts → pixelEvents-CXViXGtV.d.cts} +1 -1
- package/dist/{pixelEvents-Bo-VjAx8.d.ts → pixelEvents-LqK0Ltr_.d.ts} +1 -1
- package/dist/store/index.cjs +8 -8
- package/dist/store/index.d.cts +5 -4
- package/dist/store/index.d.ts +5 -4
- package/dist/store/index.js +3 -3
- package/dist/utils/index.d.cts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/package.json +1 -1
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-
|
|
4
|
-
import { getCart, getProductList, getProductDetail, getWishlist, notifyProductStock, getProductCategories, getCategories } from '../chunk-
|
|
3
|
+
import { useCartStore, useAuthStore } from '../chunk-VZAIAQZJ.js';
|
|
4
|
+
import { getCart, getProductList, getProductDetail, getWishlist, notifyProductStock, getProductCategories, getCategories } from '../chunk-XURYZRER.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-VETLYY7W.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-S3ZZ3ZA7.js';
|
|
10
10
|
export { useAddressForm } from '../chunk-6Q7QMPOQ.js';
|
|
11
11
|
import { getAddresses } from '../chunk-ZGMLOLTC.js';
|
|
12
12
|
import '../chunk-OSM73ETC.js';
|
|
@@ -338,7 +338,7 @@ function useCheckoutPayment(options) {
|
|
|
338
338
|
onPaymentEnd: () => setIsConfirmingPayment(false)
|
|
339
339
|
};
|
|
340
340
|
const placeAndPay = useCallback(
|
|
341
|
-
async (addressId, paymentMethod) => {
|
|
341
|
+
async (addressId, paymentMethod, shippingOptionId) => {
|
|
342
342
|
try {
|
|
343
343
|
setIsPlacingOrder(true);
|
|
344
344
|
const isCod = paymentMethod === "cod";
|
|
@@ -346,6 +346,7 @@ function useCheckoutPayment(options) {
|
|
|
346
346
|
addressId,
|
|
347
347
|
options.phonepeRedirectUrl,
|
|
348
348
|
isCod,
|
|
349
|
+
shippingOptionId,
|
|
349
350
|
options.stripeRedirectUrl,
|
|
350
351
|
options.tabbyRedirectUrl
|
|
351
352
|
);
|
package/dist/models/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as Address } from '../address-DwBZHzbI.cjs';
|
|
2
2
|
export { A as Analytics, B as Booking, a as BookingDetails, R as Review } from '../booking-DX9SU_qm.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-
|
|
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-CuLMWnfy.cjs';
|
|
4
4
|
export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-WzvTO0OQ.cjs';
|
|
5
5
|
export { O as Order } from '../orders-CjNmCY5I.cjs';
|
|
6
6
|
export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-dWMLZel6.cjs';
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as Address } from '../address-DwBZHzbI.js';
|
|
2
2
|
export { A as Analytics, B as Booking, a as BookingDetails, R as Review } from '../booking-BVWe8HHh.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-
|
|
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-CLf2ljxd.js';
|
|
4
4
|
export { A as CollectionAttributes, C as CollectionResponse, s as singleCollection } from '../collections-BDSVfRNo.js';
|
|
5
5
|
export { O as Order } from '../orders-L_8eIkUS.js';
|
|
6
6
|
export { D as Data, P as PaymentInstrument, a as PhonePe } from '../phonepe-dWMLZel6.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as Category$1, C as Cart } from './cart-
|
|
1
|
+
import { b as Category$1, C as Cart } from './cart-CuLMWnfy.cjs';
|
|
2
2
|
import { C as CollectionResponse } from './collections-WzvTO0OQ.cjs';
|
|
3
3
|
import { O as Order } from './orders-CjNmCY5I.cjs';
|
|
4
4
|
import { f as ProductDetail, d as Product } from './product-DJMdi4D4.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as Category$1, C as Cart } from './cart-
|
|
1
|
+
import { b as Category$1, C as Cart } from './cart-CLf2ljxd.js';
|
|
2
2
|
import { C as CollectionResponse } from './collections-BDSVfRNo.js';
|
|
3
3
|
import { O as Order } from './orders-L_8eIkUS.js';
|
|
4
4
|
import { f as ProductDetail, d as Product } from './product-DJMdi4D4.js';
|
package/dist/store/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk23YAZNVF_cjs = require('../chunk-23YAZNVF.cjs');
|
|
4
|
+
var chunkMTSMQAZR_cjs = require('../chunk-MTSMQAZR.cjs');
|
|
5
5
|
require('../chunk-SMHJRNCR.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-DXQX7ZIL.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 chunkMTSMQAZR_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 chunkMTSMQAZR_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 chunk23YAZNVF_cjs.loginUser; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "useAuthStore", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunk23YAZNVF_cjs.useAuthStore; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "useCartStore", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunk23YAZNVF_cjs.useCartStore; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "useThemeData", {
|
|
83
83
|
enumerable: true,
|
package/dist/store/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as zustand from 'zustand';
|
|
2
|
-
import { a as CartState, C as Cart, U as User } from '../cart-
|
|
2
|
+
import { a as CartState, C as Cart, U as User } from '../cart-CuLMWnfy.cjs';
|
|
3
3
|
import { W as Wishlist } from '../wishlist-CUuCTSVJ.cjs';
|
|
4
4
|
import { d as Product } from '../product-DJMdi4D4.cjs';
|
|
5
|
-
import { P as PageHeaderProps } from '../pixelEvents-
|
|
5
|
+
import { P as PageHeaderProps } from '../pixelEvents-CXViXGtV.cjs';
|
|
6
6
|
import 'react-toastify';
|
|
7
7
|
import '../collections-WzvTO0OQ.cjs';
|
|
8
8
|
import '../orders-CjNmCY5I.cjs';
|
|
@@ -14,8 +14,9 @@ interface CartStore extends CartState {
|
|
|
14
14
|
/**
|
|
15
15
|
* Fetch latest cart from backend (or local) and update state.
|
|
16
16
|
*/
|
|
17
|
-
syncCart: (addressId?: number) => Promise<void>;
|
|
18
|
-
fetchCart: (addressId?: number) => Promise<void>;
|
|
17
|
+
syncCart: (addressId?: number, shippingOptionId?: number) => Promise<void>;
|
|
18
|
+
fetchCart: (addressId?: number, shippingOptionId?: number) => Promise<void>;
|
|
19
|
+
fetchCartQuantity: () => Promise<void>;
|
|
19
20
|
/**
|
|
20
21
|
* Cart modification helpers that call the corresponding API and
|
|
21
22
|
* automatically synchronize the store afterwards.
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as zustand from 'zustand';
|
|
2
|
-
import { a as CartState, C as Cart, U as User } from '../cart-
|
|
2
|
+
import { a as CartState, C as Cart, U as User } from '../cart-CLf2ljxd.js';
|
|
3
3
|
import { W as Wishlist } from '../wishlist-DKYFZR0s.js';
|
|
4
4
|
import { d as Product } from '../product-DJMdi4D4.js';
|
|
5
|
-
import { P as PageHeaderProps } from '../pixelEvents-
|
|
5
|
+
import { P as PageHeaderProps } from '../pixelEvents-LqK0Ltr_.js';
|
|
6
6
|
import 'react-toastify';
|
|
7
7
|
import '../collections-BDSVfRNo.js';
|
|
8
8
|
import '../orders-L_8eIkUS.js';
|
|
@@ -14,8 +14,9 @@ interface CartStore extends CartState {
|
|
|
14
14
|
/**
|
|
15
15
|
* Fetch latest cart from backend (or local) and update state.
|
|
16
16
|
*/
|
|
17
|
-
syncCart: (addressId?: number) => Promise<void>;
|
|
18
|
-
fetchCart: (addressId?: number) => Promise<void>;
|
|
17
|
+
syncCart: (addressId?: number, shippingOptionId?: number) => Promise<void>;
|
|
18
|
+
fetchCart: (addressId?: number, shippingOptionId?: number) => Promise<void>;
|
|
19
|
+
fetchCartQuantity: () => Promise<void>;
|
|
19
20
|
/**
|
|
20
21
|
* Cart modification helpers that call the corresponding API and
|
|
21
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-
|
|
1
|
+
export { loginUser, useAuthStore, useCartStore } from '../chunk-VZAIAQZJ.js';
|
|
2
|
+
import { getWishlist, getProducts } from '../chunk-XURYZRER.js';
|
|
3
3
|
import '../chunk-QAC72HKO.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-S3ZZ3ZA7.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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { f as ProductDetail, O as OperatingHours, T as TimeSlot, A as Attributes } from '../product-DJMdi4D4.cjs';
|
|
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-DJMdi4D4.cjs';
|
|
3
|
-
import { C as Cart } from '../cart-
|
|
3
|
+
import { C as Cart } from '../cart-CuLMWnfy.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, a as CategoryHighlights, b as Collections, c as ColorScheme, F as FilterOption, d as FilterType, e as Footer, H as HeaderCategory, f as Hero, g as HomePageContents, I as ImageWithText, L as LocationData, h as Logo, M as Menuitem, N as NavBar, i as NavElement, j as NavElementOld, P as PageHeaderProps, k as PageMeta, l as PageProps, m as PagePropsFull, n as PreFooter, o as ProductCollection, p as ProductHighlight, R as RibbonBar, q as RibbonMessage, r as Section, s as SectionType, t as SliderSettings, u as SocialLinks, v as SocialMedia, w as StoreReview, x as SubCategory, y as SubCategorySection, T as TemplateTheme, z as Theme, V as ValueHighlights, D as pixelEvents, E as preFooterContent } from '../pixelEvents-
|
|
5
|
+
import { S as SectionFilters } from '../pixelEvents-CXViXGtV.cjs';
|
|
6
|
+
export { A as AvailableFilter, B as Banner, C as Category, a as CategoryHighlights, b as Collections, c as ColorScheme, F as FilterOption, d as FilterType, e as Footer, H as HeaderCategory, f as Hero, g as HomePageContents, I as ImageWithText, L as LocationData, h as Logo, M as Menuitem, N as NavBar, i as NavElement, j as NavElementOld, P as PageHeaderProps, k as PageMeta, l as PageProps, m as PagePropsFull, n as PreFooter, o as ProductCollection, p as ProductHighlight, R as RibbonBar, q as RibbonMessage, r as Section, s as SectionType, t as SliderSettings, u as SocialLinks, v as SocialMedia, w as StoreReview, x as SubCategory, y as SubCategorySection, T as TemplateTheme, z as Theme, V as ValueHighlights, D as pixelEvents, E as preFooterContent } from '../pixelEvents-CXViXGtV.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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { f as ProductDetail, O as OperatingHours, T as TimeSlot, A as Attributes } from '../product-DJMdi4D4.js';
|
|
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-DJMdi4D4.js';
|
|
3
|
-
import { C as Cart } from '../cart-
|
|
3
|
+
import { C as Cart } from '../cart-CLf2ljxd.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, a as CategoryHighlights, b as Collections, c as ColorScheme, F as FilterOption, d as FilterType, e as Footer, H as HeaderCategory, f as Hero, g as HomePageContents, I as ImageWithText, L as LocationData, h as Logo, M as Menuitem, N as NavBar, i as NavElement, j as NavElementOld, P as PageHeaderProps, k as PageMeta, l as PageProps, m as PagePropsFull, n as PreFooter, o as ProductCollection, p as ProductHighlight, R as RibbonBar, q as RibbonMessage, r as Section, s as SectionType, t as SliderSettings, u as SocialLinks, v as SocialMedia, w as StoreReview, x as SubCategory, y as SubCategorySection, T as TemplateTheme, z as Theme, V as ValueHighlights, D as pixelEvents, E as preFooterContent } from '../pixelEvents-
|
|
5
|
+
import { S as SectionFilters } from '../pixelEvents-LqK0Ltr_.js';
|
|
6
|
+
export { A as AvailableFilter, B as Banner, C as Category, a as CategoryHighlights, b as Collections, c as ColorScheme, F as FilterOption, d as FilterType, e as Footer, H as HeaderCategory, f as Hero, g as HomePageContents, I as ImageWithText, L as LocationData, h as Logo, M as Menuitem, N as NavBar, i as NavElement, j as NavElementOld, P as PageHeaderProps, k as PageMeta, l as PageProps, m as PagePropsFull, n as PreFooter, o as ProductCollection, p as ProductHighlight, R as RibbonBar, q as RibbonMessage, r as Section, s as SectionType, t as SliderSettings, u as SocialLinks, v as SocialMedia, w as StoreReview, x as SubCategory, y as SubCategorySection, T as TemplateTheme, z as Theme, V as ValueHighlights, D as pixelEvents, E as preFooterContent } from '../pixelEvents-LqK0Ltr_.js';
|
|
7
7
|
import { AxiosResponse } from 'axios';
|
|
8
8
|
import { a as PhonePe } from '../phonepe-dWMLZel6.js';
|
|
9
9
|
import 'react-toastify';
|