@anker-in/shopify-react 0.1.1-beta.12 → 0.1.1-beta.13
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 +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +6 -4
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +6 -4
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/{index-BOsx-Rx3.d.ts → index-C77lIEQZ.d.ts} +2 -2
- package/dist/{index-D5VVTzBT.d.mts → index-CO_fgrFV.d.mts} +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -5
- 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 +1 -1
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +1 -1
- package/dist/provider/index.mjs.map +1 -1
- package/dist/{types-CUv-lzQk.d.mts → types-DpxtE_nv.d.mts} +1 -4
- package/dist/{types-CUv-lzQk.d.ts → types-DpxtE_nv.d.ts} +1 -4
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -2662,9 +2662,9 @@ function useUpdateCartDeliveryOptions(mutate, metafieldIdentifiers, options) {
|
|
|
2662
2662
|
// src/hooks/member/plus/use-update-plus-member-delivery-options.ts
|
|
2663
2663
|
var useUpdatePlusMemberDeliveryOptions = ({
|
|
2664
2664
|
options
|
|
2665
|
-
}) => {
|
|
2665
|
+
} = {}) => {
|
|
2666
2666
|
const { cart: cartContextData, mutateCart, metafieldIdentifiers } = useCartContext();
|
|
2667
|
-
const { trigger: updateCartDeliveryOptions2
|
|
2667
|
+
const { trigger: updateCartDeliveryOptions2 } = useUpdateCartDeliveryOptions(
|
|
2668
2668
|
mutateCart,
|
|
2669
2669
|
metafieldIdentifiers
|
|
2670
2670
|
);
|
|
@@ -2674,11 +2674,13 @@ var useUpdatePlusMemberDeliveryOptions = ({
|
|
|
2674
2674
|
const { deliveryData } = arg;
|
|
2675
2675
|
const firstDeliveryGroup = currentCart?.deliveryGroups?.[0];
|
|
2676
2676
|
const deliveryGroupId = firstDeliveryGroup?.id;
|
|
2677
|
-
const selectedOptionCode = deliveryData?.deliveryCustomData?.selected_delivery_option
|
|
2677
|
+
const selectedOptionCode = deliveryData?.deliveryCustomData?.selected_delivery_option;
|
|
2678
2678
|
if (!deliveryGroupId || !selectedOptionCode || selectedOptionCode === firstDeliveryGroup?.selectedDeliveryOption?.code) {
|
|
2679
2679
|
return null;
|
|
2680
2680
|
}
|
|
2681
|
-
const deliveryGroup = currentCart?.deliveryGroups?.find(
|
|
2681
|
+
const deliveryGroup = currentCart?.deliveryGroups?.find(
|
|
2682
|
+
(group) => group?.id === deliveryGroupId
|
|
2683
|
+
);
|
|
2682
2684
|
const matchedOption = deliveryGroup?.deliveryOptions?.find(
|
|
2683
2685
|
(option) => option?.code === selectedOptionCode
|
|
2684
2686
|
);
|
|
@@ -3117,7 +3119,7 @@ function CartProvider({
|
|
|
3117
3119
|
useRequest(
|
|
3118
3120
|
() => {
|
|
3119
3121
|
const newAttributes = [...attributes, ...customAttributes];
|
|
3120
|
-
const needUpdate = cart &&
|
|
3122
|
+
const needUpdate = cart && checkAttributesUpdateNeeded(
|
|
3121
3123
|
cart.customAttributes,
|
|
3122
3124
|
newAttributes,
|
|
3123
3125
|
customAttributesNeedDelete
|