@anker-in/shopify-react 0.1.1-beta.42 → 0.1.1-beta.43
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/hooks/index.d.mts +57 -150
- package/dist/hooks/index.d.ts +57 -150
- package/dist/hooks/index.js +63 -246
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +64 -245
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +63 -246
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -245
- package/dist/index.mjs.map +1 -1
- package/dist/provider/index.d.mts +1 -1
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.js +35 -46
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +35 -46
- package/dist/provider/index.mjs.map +1 -1
- package/dist/{types-DntkHhf8.d.mts → types-CMMWxyUF.d.mts} +2 -6
- package/dist/{types-DntkHhf8.d.ts → types-CMMWxyUF.d.ts} +2 -6
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useMemo, useContext, useRef, useState, useEffect, useCallback } from 'react';
|
|
2
|
-
import { createShopifyClient, getProductsByHandles, createCart, updateCartCodes, addCartLines, updateCartLines, removeCartLines, updateCartAttributes, getLocalStorage, getProduct, getAllProducts, getCollection, getAllCollections, getCollections, getBlog, getAllBlogs, getArticle, getArticles, getArticlesInBlog, getCart, setLocalStorage
|
|
2
|
+
import { createShopifyClient, getProductsByHandles, createCart, updateCartCodes, addCartLines, updateCartLines, removeCartLines, updateCartAttributes, getLocalStorage, getProduct, getAllProducts, getCollection, getAllCollections, getCollections, getBlog, getAllBlogs, getArticle, getArticles, getArticlesInBlog, getCart, setLocalStorage } from '@anker-in/shopify-sdk';
|
|
3
3
|
export * from '@anker-in/shopify-sdk';
|
|
4
4
|
import Cookies5 from 'js-cookie';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1565,36 +1565,46 @@ var useCalcOrderDiscount = (cart, orderDiscountConfig, customer) => {
|
|
|
1565
1565
|
isLoading: isCustomerLoading
|
|
1566
1566
|
};
|
|
1567
1567
|
};
|
|
1568
|
-
function
|
|
1568
|
+
function hasPlusMemberInCart({
|
|
1569
1569
|
memberSetting,
|
|
1570
1570
|
cart
|
|
1571
1571
|
}) {
|
|
1572
1572
|
const { plus_monthly_product, plus_annual_product } = memberSetting || {};
|
|
1573
|
-
|
|
1574
|
-
if (!cart?.lineItems) {
|
|
1575
|
-
return {
|
|
1576
|
-
hasPlusMember: false,
|
|
1577
|
-
hasMonthlyPlus: false,
|
|
1578
|
-
hasAnnualPlus: false
|
|
1579
|
-
};
|
|
1580
|
-
}
|
|
1581
|
-
const monthlyPlusItem = cart.lineItems.find(
|
|
1582
|
-
(item) => item.product?.handle === plus_monthly_product?.handle && item.variant?.sku === plus_monthly_product?.sku
|
|
1583
|
-
);
|
|
1584
|
-
const annualPlusItem = cart.lineItems.find(
|
|
1585
|
-
(item) => item.product?.handle === plus_annual_product?.handle && item.variant?.sku === plus_annual_product?.sku
|
|
1586
|
-
);
|
|
1587
|
-
const hasMonthlyPlus = !!monthlyPlusItem;
|
|
1588
|
-
const hasAnnualPlus = !!annualPlusItem;
|
|
1589
|
-
const hasPlusMember = hasMonthlyPlus || hasAnnualPlus;
|
|
1573
|
+
if (!cart?.lineItems) {
|
|
1590
1574
|
return {
|
|
1591
|
-
hasPlusMember,
|
|
1592
|
-
hasMonthlyPlus,
|
|
1593
|
-
hasAnnualPlus
|
|
1594
|
-
monthlyPlusItem,
|
|
1595
|
-
annualPlusItem
|
|
1575
|
+
hasPlusMember: false,
|
|
1576
|
+
hasMonthlyPlus: false,
|
|
1577
|
+
hasAnnualPlus: false
|
|
1596
1578
|
};
|
|
1597
|
-
}
|
|
1579
|
+
}
|
|
1580
|
+
const monthlyPlusItem = cart.lineItems.find(
|
|
1581
|
+
(item) => item.product?.handle === plus_monthly_product?.handle && item.variant?.sku === plus_monthly_product?.sku
|
|
1582
|
+
);
|
|
1583
|
+
const annualPlusItem = cart.lineItems.find(
|
|
1584
|
+
(item) => item.product?.handle === plus_annual_product?.handle && item.variant?.sku === plus_annual_product?.sku
|
|
1585
|
+
);
|
|
1586
|
+
const hasMonthlyPlus = !!monthlyPlusItem;
|
|
1587
|
+
const hasAnnualPlus = !!annualPlusItem;
|
|
1588
|
+
const hasPlusMember = hasMonthlyPlus || hasAnnualPlus;
|
|
1589
|
+
return {
|
|
1590
|
+
hasPlusMember,
|
|
1591
|
+
hasMonthlyPlus,
|
|
1592
|
+
hasAnnualPlus,
|
|
1593
|
+
monthlyPlusItem,
|
|
1594
|
+
annualPlusItem
|
|
1595
|
+
};
|
|
1596
|
+
}
|
|
1597
|
+
function useHasPlusMemberInCart({
|
|
1598
|
+
memberSetting,
|
|
1599
|
+
cart
|
|
1600
|
+
}) {
|
|
1601
|
+
return useMemo(
|
|
1602
|
+
() => hasPlusMemberInCart({
|
|
1603
|
+
memberSetting,
|
|
1604
|
+
cart
|
|
1605
|
+
}),
|
|
1606
|
+
[memberSetting, cart]
|
|
1607
|
+
);
|
|
1598
1608
|
}
|
|
1599
1609
|
var getReferralAttributes = () => {
|
|
1600
1610
|
const inviteCode = getLocalStorage("inviteCode") || Cookies5.get("inviteCode");
|
|
@@ -2573,28 +2583,13 @@ var ShippingMethodMode = /* @__PURE__ */ ((ShippingMethodMode2) => {
|
|
|
2573
2583
|
return ShippingMethodMode2;
|
|
2574
2584
|
})(ShippingMethodMode || {});
|
|
2575
2585
|
var createInitialValue = () => ({
|
|
2576
|
-
zipCode: "",
|
|
2577
2586
|
plusMemberMetafields: {},
|
|
2578
|
-
setZipCode: () => {
|
|
2579
|
-
},
|
|
2580
|
-
allowNextDayDelivery: false,
|
|
2581
|
-
setAllowNextDayDelivery: () => {
|
|
2582
|
-
},
|
|
2583
|
-
allowThirdDayDelivery: false,
|
|
2584
|
-
setAllowThirdDayDelivery: () => {
|
|
2585
|
-
},
|
|
2586
2587
|
selectedPlusMemberMode: "free",
|
|
2587
2588
|
setSelectedPlusMemberMode: () => {
|
|
2588
2589
|
},
|
|
2589
|
-
showAreaCheckModal: false,
|
|
2590
|
-
setShowAreaCheckModal: () => {
|
|
2591
|
-
},
|
|
2592
2590
|
selectedShippingMethod: void 0,
|
|
2593
2591
|
setSelectedShippingMethod: () => {
|
|
2594
2592
|
},
|
|
2595
|
-
showTip: false,
|
|
2596
|
-
setShowTip: () => {
|
|
2597
|
-
},
|
|
2598
2593
|
showMoreShippingMethod: false,
|
|
2599
2594
|
setShowMoreShippingMethod: () => {
|
|
2600
2595
|
},
|
|
@@ -2610,16 +2605,10 @@ var createInitialValue = () => ({
|
|
|
2610
2605
|
isLoadingCoupon: false
|
|
2611
2606
|
},
|
|
2612
2607
|
selectedPlusMemberVariant: void 0,
|
|
2613
|
-
monthlyVariant: void 0,
|
|
2614
|
-
annualVariant: void 0,
|
|
2615
2608
|
showPlusMemberBenefit: false,
|
|
2616
2609
|
setShowPlusMemberBenefit: () => {
|
|
2617
2610
|
},
|
|
2618
|
-
|
|
2619
|
-
setDeleteMarginBottom: () => {
|
|
2620
|
-
},
|
|
2621
|
-
profile: void 0,
|
|
2622
|
-
locale: void 0
|
|
2611
|
+
profile: void 0
|
|
2623
2612
|
});
|
|
2624
2613
|
var PlusMemberContext = createContext(createInitialValue());
|
|
2625
2614
|
function usePlusMemberContext() {
|
|
@@ -2679,9 +2668,9 @@ var useAvailableDeliveryCoupon = ({
|
|
|
2679
2668
|
|
|
2680
2669
|
// src/hooks/member/plus/use-shipping-methods.ts
|
|
2681
2670
|
function useShippingMethods(options) {
|
|
2682
|
-
const { variant, plusMemberMetafields, selectedPlusMemberMode,
|
|
2671
|
+
const { variant, plusMemberMetafields, selectedPlusMemberMode, profile } = options;
|
|
2672
|
+
const isPlus = profile?.isPlus || false;
|
|
2683
2673
|
const { nddCoupon, tddCoupon, isLoading } = useAvailableDeliveryCoupon({ profile });
|
|
2684
|
-
console.log("nddCoupon", nddCoupon);
|
|
2685
2674
|
const { plus_shipping, shippingMethod } = plusMemberMetafields || {};
|
|
2686
2675
|
const nddOverweight = useMemo(() => {
|
|
2687
2676
|
return (variant?.weight || 0) > (shippingMethod?.overWeight_ndd || Infinity);
|
|
@@ -2808,69 +2797,6 @@ function useShippingMethods(options) {
|
|
|
2808
2797
|
isLoadingCoupon: isLoading
|
|
2809
2798
|
};
|
|
2810
2799
|
}
|
|
2811
|
-
function useShippingMethodAvailableCheck() {
|
|
2812
|
-
const {
|
|
2813
|
-
zipCode,
|
|
2814
|
-
allowNextDayDelivery,
|
|
2815
|
-
allowThirdDayDelivery,
|
|
2816
|
-
selectedShippingMethod,
|
|
2817
|
-
setSelectedShippingMethod,
|
|
2818
|
-
setShowTip,
|
|
2819
|
-
shippingMethodsContext
|
|
2820
|
-
} = usePlusMemberContext();
|
|
2821
|
-
useEffect(() => {
|
|
2822
|
-
const freeShippingMethod = shippingMethodsContext.freeShippingMethods[0];
|
|
2823
|
-
const standardShippingMethod = shippingMethodsContext.freeShippingMethods?.find(
|
|
2824
|
-
(item) => item.__mode === "free" /* FREE */
|
|
2825
|
-
);
|
|
2826
|
-
const freeTDD = shippingMethodsContext.freeShippingMethods.find(
|
|
2827
|
-
(item) => item.__mode === "tdd" /* TDD */
|
|
2828
|
-
);
|
|
2829
|
-
const paymentTDD = shippingMethodsContext.paymentShippingMethods.find(
|
|
2830
|
-
(item) => item.__mode === "tdd" /* TDD */
|
|
2831
|
-
);
|
|
2832
|
-
if (zipCode) {
|
|
2833
|
-
console.log(
|
|
2834
|
-
"allowNextDayDelivery, allowThirdDayDelivery:",
|
|
2835
|
-
allowNextDayDelivery,
|
|
2836
|
-
allowThirdDayDelivery
|
|
2837
|
-
);
|
|
2838
|
-
if (!allowNextDayDelivery && !allowThirdDayDelivery) {
|
|
2839
|
-
setShowTip(true);
|
|
2840
|
-
setSelectedShippingMethod(standardShippingMethod);
|
|
2841
|
-
} else {
|
|
2842
|
-
if (selectedShippingMethod?.__mode === "ndd" /* NDD */ && !allowNextDayDelivery) {
|
|
2843
|
-
setShowTip(true);
|
|
2844
|
-
if (allowThirdDayDelivery) {
|
|
2845
|
-
if (selectedShippingMethod.useCoupon) {
|
|
2846
|
-
const method = freeTDD || freeShippingMethod;
|
|
2847
|
-
if (method) setSelectedShippingMethod(method);
|
|
2848
|
-
} else {
|
|
2849
|
-
const method = paymentTDD || freeShippingMethod;
|
|
2850
|
-
if (method) setSelectedShippingMethod(method);
|
|
2851
|
-
}
|
|
2852
|
-
} else {
|
|
2853
|
-
if (freeShippingMethod) setSelectedShippingMethod(freeShippingMethod);
|
|
2854
|
-
}
|
|
2855
|
-
} else if (
|
|
2856
|
-
// TDD 无法使用
|
|
2857
|
-
selectedShippingMethod?.__mode === "tdd" /* TDD */ && !allowThirdDayDelivery
|
|
2858
|
-
) {
|
|
2859
|
-
setShowTip(true);
|
|
2860
|
-
if (freeShippingMethod) setSelectedShippingMethod(freeShippingMethod);
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
}
|
|
2864
|
-
}, [
|
|
2865
|
-
allowNextDayDelivery,
|
|
2866
|
-
allowThirdDayDelivery,
|
|
2867
|
-
zipCode,
|
|
2868
|
-
shippingMethodsContext,
|
|
2869
|
-
selectedShippingMethod,
|
|
2870
|
-
setSelectedShippingMethod,
|
|
2871
|
-
setShowTip
|
|
2872
|
-
]);
|
|
2873
|
-
}
|
|
2874
2800
|
var useReplaceCartPlusMember = () => {
|
|
2875
2801
|
const { plusMemberMetafields, selectedPlusMemberMode } = usePlusMemberContext();
|
|
2876
2802
|
const { trigger: removeCartLines2 } = useRemoveCartLines();
|
|
@@ -2902,129 +2828,45 @@ var useReplaceCartPlusMember = () => {
|
|
|
2902
2828
|
]);
|
|
2903
2829
|
return handler;
|
|
2904
2830
|
};
|
|
2905
|
-
var usePlusMemberDeliveryCodes = ({
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
return useMemo(
|
|
2909
|
-
() => deliveryData?.deliveryCustomData?.discount_code,
|
|
2910
|
-
[deliveryData]
|
|
2911
|
-
);
|
|
2912
|
-
};
|
|
2913
|
-
function useUpdateCartDeliveryOptions(mutate, metafieldIdentifiers, options) {
|
|
2914
|
-
const { client, locale, cartCookieAdapter } = useShopify();
|
|
2915
|
-
const updateDeliveryOptions = useCallback(
|
|
2916
|
-
async (_key, { arg }) => {
|
|
2917
|
-
const updatedCart = await updateCartDeliveryOptions(client, {
|
|
2918
|
-
...arg,
|
|
2919
|
-
metafieldIdentifiers,
|
|
2920
|
-
cookieAdapter: cartCookieAdapter
|
|
2921
|
-
});
|
|
2922
|
-
console.log("useUpdateCartDeliveryOptions updatedCart", updatedCart);
|
|
2923
|
-
if (updatedCart) {
|
|
2924
|
-
mutate(updatedCart);
|
|
2925
|
-
}
|
|
2926
|
-
return updatedCart;
|
|
2927
|
-
},
|
|
2928
|
-
[client, locale, cartCookieAdapter, mutate, metafieldIdentifiers]
|
|
2929
|
-
);
|
|
2930
|
-
return useSWRMutation("update-cart-delivery-options", updateDeliveryOptions, options);
|
|
2931
|
-
}
|
|
2932
|
-
|
|
2933
|
-
// src/hooks/member/plus/use-update-plus-member-delivery-options.ts
|
|
2934
|
-
var useUpdatePlusMemberDeliveryOptions = ({
|
|
2935
|
-
options
|
|
2936
|
-
} = {}) => {
|
|
2937
|
-
const { cart: cartContextData, mutateCart, metafieldIdentifiers } = useCartContext();
|
|
2938
|
-
const { trigger: updateCartDeliveryOptions2 } = useUpdateCartDeliveryOptions(
|
|
2939
|
-
mutateCart,
|
|
2940
|
-
metafieldIdentifiers
|
|
2941
|
-
);
|
|
2942
|
-
const handler = useCallback(
|
|
2943
|
-
async (_, { arg }) => {
|
|
2944
|
-
const currentCart = arg?.cart || cartContextData;
|
|
2945
|
-
const { deliveryData } = arg;
|
|
2946
|
-
const firstDeliveryGroup = currentCart?.deliveryGroups?.[0];
|
|
2947
|
-
const deliveryGroupId = firstDeliveryGroup?.id;
|
|
2948
|
-
const selectedOptionCode = deliveryData?.deliveryCustomData?.selected_delivery_option?.code;
|
|
2949
|
-
if (!deliveryGroupId || !selectedOptionCode || selectedOptionCode === firstDeliveryGroup?.selectedDeliveryOption?.code) {
|
|
2950
|
-
return null;
|
|
2951
|
-
}
|
|
2952
|
-
const deliveryGroup = currentCart?.deliveryGroups?.find(
|
|
2953
|
-
(group) => group?.id === deliveryGroupId
|
|
2954
|
-
);
|
|
2955
|
-
const matchedOption = deliveryGroup?.deliveryOptions?.find(
|
|
2956
|
-
(option) => option?.code === selectedOptionCode
|
|
2957
|
-
);
|
|
2958
|
-
if (!matchedOption?.handle) {
|
|
2959
|
-
return null;
|
|
2960
|
-
}
|
|
2961
|
-
const deliveryOptions = [
|
|
2962
|
-
{
|
|
2963
|
-
deliveryGroupId,
|
|
2964
|
-
deliveryOptionHandle: matchedOption.handle
|
|
2965
|
-
}
|
|
2966
|
-
];
|
|
2967
|
-
const updatedCart = await updateCartDeliveryOptions2({
|
|
2968
|
-
selectedDeliveryOptions: deliveryOptions,
|
|
2969
|
-
cartId: currentCart?.id
|
|
2970
|
-
});
|
|
2971
|
-
if (updatedCart && mutateCart) {
|
|
2972
|
-
mutateCart(updatedCart);
|
|
2973
|
-
}
|
|
2974
|
-
return updatedCart;
|
|
2975
|
-
},
|
|
2976
|
-
[cartContextData, updateCartDeliveryOptions2, mutateCart]
|
|
2977
|
-
);
|
|
2978
|
-
return useSWRMutation("update-cart-delivery-options", handler, options);
|
|
2979
|
-
};
|
|
2980
|
-
var usePlusMemberItemCustomAttributes = ({
|
|
2981
|
-
deliveryData
|
|
2982
|
-
}) => {
|
|
2983
|
-
const { deliveryCustomData } = deliveryData || {};
|
|
2984
|
-
return useMemo(() => {
|
|
2985
|
-
const itemCustomAttributes = [];
|
|
2986
|
-
if (deliveryCustomData?.is_presale) {
|
|
2987
|
-
itemCustomAttributes.push({
|
|
2988
|
-
key: "_is_presale",
|
|
2989
|
-
value: "true"
|
|
2990
|
-
});
|
|
2991
|
-
}
|
|
2992
|
-
return itemCustomAttributes;
|
|
2993
|
-
}, [deliveryCustomData]);
|
|
2831
|
+
var usePlusMemberDeliveryCodes = () => {
|
|
2832
|
+
const { selectedShippingMethod } = usePlusMemberContext();
|
|
2833
|
+
return useMemo(() => [selectedShippingMethod?.coupon], [selectedShippingMethod?.coupon]);
|
|
2994
2834
|
};
|
|
2995
2835
|
var usePlusMemberCheckoutCustomAttributes = ({
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
variant,
|
|
2999
|
-
isShowShippingBenefits
|
|
2836
|
+
disableShipping = false,
|
|
2837
|
+
isPresaleContains = false
|
|
3000
2838
|
}) => {
|
|
3001
|
-
const {
|
|
3002
|
-
const { profile } = usePlusMemberContext();
|
|
2839
|
+
const { profile, selectedShippingMethod, selectedPlusMemberMode } = usePlusMemberContext();
|
|
3003
2840
|
return useMemo(() => {
|
|
3004
2841
|
const checkoutCustomAttributes = [
|
|
3005
|
-
// _last_url: 付费会员结算完成之后 checkout 有一个继续购买的按钮, 用于跳转到继续购买的页面
|
|
3006
2842
|
{
|
|
3007
2843
|
key: "_last_url",
|
|
3008
2844
|
value: typeof window !== "undefined" ? window.location.origin + window.location.pathname : ""
|
|
3009
2845
|
}
|
|
3010
2846
|
];
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
2847
|
+
checkoutCustomAttributes.push({
|
|
2848
|
+
key: "_checkout_delivery_custom",
|
|
2849
|
+
value: JSON.stringify({
|
|
2850
|
+
allow_nextday_delivery: true,
|
|
2851
|
+
allow_thirdday_delivery: true,
|
|
2852
|
+
selected_delivery_option: {
|
|
2853
|
+
code: selectedShippingMethod?.__code,
|
|
2854
|
+
mode: selectedShippingMethod?.__mode
|
|
2855
|
+
},
|
|
2856
|
+
is_presale: isPresaleContains,
|
|
2857
|
+
discount_code: selectedShippingMethod?.coupon ? [selectedShippingMethod.coupon] : [],
|
|
2858
|
+
plus_type: profile?.isPlus ? "free" /* FREE */ : selectedPlusMemberMode,
|
|
2859
|
+
is_prime: profile?.isPlus
|
|
2860
|
+
})
|
|
2861
|
+
});
|
|
2862
|
+
if (disableShipping) {
|
|
3021
2863
|
checkoutCustomAttributes.push({
|
|
3022
2864
|
key: "_hide_shipping",
|
|
3023
2865
|
value: "true"
|
|
3024
2866
|
});
|
|
3025
2867
|
}
|
|
3026
2868
|
return checkoutCustomAttributes;
|
|
3027
|
-
}, [
|
|
2869
|
+
}, [profile, selectedShippingMethod, selectedPlusMemberMode, isPresaleContains]);
|
|
3028
2870
|
};
|
|
3029
2871
|
function useAutoRemovePlusMemberInCart({
|
|
3030
2872
|
cart,
|
|
@@ -3091,25 +2933,17 @@ var PlusMemberProvider = ({
|
|
|
3091
2933
|
profile,
|
|
3092
2934
|
children
|
|
3093
2935
|
}) => {
|
|
3094
|
-
const { locale } = useShopify();
|
|
3095
|
-
const [zipCode, setZipCode] = useState("");
|
|
3096
|
-
const [showTip, setShowTip] = useState(false);
|
|
3097
2936
|
const [selectedPlusMemberMode, setSelectedPlusMemberMode] = useState(
|
|
3098
2937
|
initialSelectedPlusMemberMode
|
|
3099
2938
|
);
|
|
3100
2939
|
const [selectedShippingMethod, setSelectedShippingMethod] = useState();
|
|
3101
|
-
const [allowNextDayDelivery, setAllowNextDayDelivery] = useState(false);
|
|
3102
|
-
const [allowThirdDayDelivery, setAllowThirdDayDelivery] = useState(false);
|
|
3103
|
-
const [showAreaCheckModal, setShowAreaCheckModal] = useState(false);
|
|
3104
2940
|
const [showMoreShippingMethod, setShowMoreShippingMethod] = useState(false);
|
|
3105
2941
|
const [showPlusMemberBenefit, setShowPlusMemberBenefit] = useState(false);
|
|
3106
|
-
const [deleteMarginBottom, setDeleteMarginBottom] = useState(false);
|
|
3107
2942
|
const shippingMethodsContext = useShippingMethods({
|
|
3108
2943
|
variant,
|
|
3109
2944
|
plusMemberMetafields: memberSetting,
|
|
3110
2945
|
selectedPlusMemberMode,
|
|
3111
|
-
profile
|
|
3112
|
-
isPlus: profile?.isPlus || false
|
|
2946
|
+
profile
|
|
3113
2947
|
});
|
|
3114
2948
|
const { monthlyVariant, annualVariant } = usePlusMemberVariants({
|
|
3115
2949
|
memberSetting
|
|
@@ -3125,34 +2959,19 @@ var PlusMemberProvider = ({
|
|
|
3125
2959
|
{
|
|
3126
2960
|
value: {
|
|
3127
2961
|
variant,
|
|
3128
|
-
zipCode,
|
|
3129
|
-
setZipCode,
|
|
3130
|
-
allowNextDayDelivery,
|
|
3131
|
-
setAllowNextDayDelivery,
|
|
3132
|
-
allowThirdDayDelivery,
|
|
3133
|
-
setAllowThirdDayDelivery,
|
|
3134
2962
|
plusMemberMetafields: memberSetting,
|
|
3135
2963
|
selectedPlusMemberMode,
|
|
3136
2964
|
setSelectedPlusMemberMode,
|
|
3137
|
-
showAreaCheckModal,
|
|
3138
|
-
setShowAreaCheckModal,
|
|
3139
2965
|
selectedShippingMethod,
|
|
3140
2966
|
setSelectedShippingMethod,
|
|
3141
2967
|
shippingMethodsContext,
|
|
3142
|
-
showTip,
|
|
3143
|
-
setShowTip,
|
|
3144
2968
|
showMoreShippingMethod,
|
|
3145
2969
|
setShowMoreShippingMethod,
|
|
3146
2970
|
selectedPlusMemberVariant,
|
|
3147
|
-
monthlyVariant,
|
|
3148
|
-
annualVariant,
|
|
3149
2971
|
product,
|
|
3150
2972
|
showPlusMemberBenefit,
|
|
3151
2973
|
setShowPlusMemberBenefit,
|
|
3152
|
-
|
|
3153
|
-
setDeleteMarginBottom,
|
|
3154
|
-
profile,
|
|
3155
|
-
locale
|
|
2974
|
+
profile
|
|
3156
2975
|
},
|
|
3157
2976
|
children
|
|
3158
2977
|
}
|
|
@@ -3566,6 +3385,6 @@ function useCartContext(options) {
|
|
|
3566
3385
|
return context;
|
|
3567
3386
|
}
|
|
3568
3387
|
|
|
3569
|
-
export { BrowserPerformanceAdapter, BuyRuleType, CODE_AMOUNT_KEY, CUSTOMER_ATTRIBUTE_KEY, CUSTOMER_SCRIPT_GIFT_KEY, CartProvider, DeliveryPlusType, MAIN_PRODUCT_CODE, MEMBER_PRICE_ATTRIBUTE_KEY, OrderBasePriceType, OrderDiscountType, PLUS_MEMBER_TYPE, PlusMemberContext, PlusMemberMode, PlusMemberProvider, PriceBasePriceType, PriceDiscountType, RuleType, SCRIPT_CODE_AMOUNT_KEY, ShippingMethodMode, ShopifyContext, ShopifyProvider, SpendMoneyType, browserCartCookieAdapter, browserCookieAdapter, checkAttributesUpdateNeeded, clearGeoLocationCache, createMockCartFromLines, currencyCodeMapping, defaultSWRMutationConfiguration, formatFunctionAutoFreeGift, formatScriptAutoFreeGift, gaTrack, getCachedGeoLocation, getDiscountEnvAttributeValue, getMatchedMainProductSubTotal, getQuery, getReferralAttributes, normalizeAddToCartLines, preCheck, safeParse, trackAddToCartFBQ, trackAddToCartGA, trackBeginCheckoutGA, trackBuyNowFBQ, trackBuyNowGA, useAddCartLines, useAddToCart, useAllBlogs, useAllCollections, useAllProducts, useApplyCartCodes, useArticle, useArticles, useArticlesInBlog, useAutoRemovePlusMemberInCart, useAvailableDeliveryCoupon, useBlog, useBuyNow, useCalcAutoFreeGift, useCalcGiftsFromLines, useCalcOrderDiscount, useCartAttributes, useCartContext, useCartItemQuantityLimit, useCollection, useCollections, useCreateCart, useExposure, useGeoLocation, useHasPlusMemberInCart, useIntersection, usePlusMemberCheckoutCustomAttributes, usePlusMemberContext, usePlusMemberDeliveryCodes,
|
|
3388
|
+
export { BrowserPerformanceAdapter, BuyRuleType, CODE_AMOUNT_KEY, CUSTOMER_ATTRIBUTE_KEY, CUSTOMER_SCRIPT_GIFT_KEY, CartProvider, DeliveryPlusType, MAIN_PRODUCT_CODE, MEMBER_PRICE_ATTRIBUTE_KEY, OrderBasePriceType, OrderDiscountType, PLUS_MEMBER_TYPE, PlusMemberContext, PlusMemberMode, PlusMemberProvider, PriceBasePriceType, PriceDiscountType, RuleType, SCRIPT_CODE_AMOUNT_KEY, ShippingMethodMode, ShopifyContext, ShopifyProvider, SpendMoneyType, browserCartCookieAdapter, browserCookieAdapter, checkAttributesUpdateNeeded, clearGeoLocationCache, createMockCartFromLines, currencyCodeMapping, defaultSWRMutationConfiguration, formatFunctionAutoFreeGift, formatScriptAutoFreeGift, gaTrack, getCachedGeoLocation, getDiscountEnvAttributeValue, getMatchedMainProductSubTotal, getQuery, getReferralAttributes, hasPlusMemberInCart, normalizeAddToCartLines, preCheck, safeParse, trackAddToCartFBQ, trackAddToCartGA, trackBeginCheckoutGA, trackBuyNowFBQ, trackBuyNowGA, useAddCartLines, useAddToCart, useAllBlogs, useAllCollections, useAllProducts, useApplyCartCodes, useArticle, useArticles, useArticlesInBlog, useAutoRemovePlusMemberInCart, useAvailableDeliveryCoupon, useBlog, useBuyNow, useCalcAutoFreeGift, useCalcGiftsFromLines, useCalcOrderDiscount, useCartAttributes, useCartContext, useCartItemQuantityLimit, useCollection, useCollections, useCreateCart, useExposure, useGeoLocation, useHasPlusMemberInCart, useIntersection, usePlusMemberCheckoutCustomAttributes, usePlusMemberContext, usePlusMemberDeliveryCodes, usePlusMemberNeedAddToCart, usePlusMemberVariants, usePrice, useProduct, useProductUrl, useProductsByHandles, useRemoveCartCodes, useRemoveCartLines, useReplaceCartPlusMember, useScriptAutoFreeGift, useSearch, useSelectedOptions, useShippingMethods, useShopify, useSite, useUpdateCartAttributes, useUpdateCartLines, useUpdateLineCodeAmountAttributes, useUpdateVariantQuery, useVariant, useVariantMedia };
|
|
3570
3389
|
//# sourceMappingURL=index.mjs.map
|
|
3571
3390
|
//# sourceMappingURL=index.mjs.map
|