@atomic-solutions/woocommerce-react 0.7.0 → 0.8.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/hooks/index.cjs +15 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +15 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/{index-BmWcF7aq.d.ts → index-C6OkRa8P.d.ts} +192 -2
- package/dist/{index-UkshfFwm.d.cts → index-DtuDPfTl.d.cts} +192 -2
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/provider/index.d.cts +2 -2
- package/dist/provider/index.d.ts +2 -2
- package/dist/{types-4MW3Y__g.d.cts → types-DABmdACe.d.cts} +1 -0
- package/dist/{types-4MW3Y__g.d.ts → types-DABmdACe.d.ts} +1 -0
- package/package.json +2 -2
package/dist/hooks/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AppliedCoupon, C as CartTotals,
|
|
2
|
-
export { Q as QueryKeys, p as createQueryKeys } from '../types-
|
|
1
|
+
export { A as AppliedCoupon, C as CartTotals, al as InfiniteQueryOptions, am as MutationOptions, a as PaymentMethod, b as ProcessedCartItem, c as ProcessedCategory, d as ProcessedOrderDetails, e as ProcessedOrderLineItem, f as ProcessedProduct, g as ProcessedProductDetails, h as ProductCartState, i as ProductCategoryTreeNode, an as QueryOptions, R as ReorderInputItem, j as ReorderItemView, k as ReorderUnavailableReason, S as ShippingRate, n as UseCartViewOptions, o as UseCartViewReturn, p as UseOrderViewOptions, q as UseOrderViewReturn, r as UseProductViewOptions, s as UseProductViewReturn, t as UseProductsFeedOptions, u as UseProductsFeedReturn, v as UseReorderViewOptions, w as UseReorderViewReturn, E as getOrderStatusLabel, Q as useAddManyToCart, T as useAddToCart, V as useApplyCoupon, W as useCart, X as useCartView, Y as useCheckout, Z as useInfiniteProducts, _ as useOrder, $ as useOrderView, a0 as useProcessCheckout, a1 as useProduct, a2 as useProductCategories, a3 as useProductCategoryTree, a4 as useProductTags, a5 as useProductView, a6 as useProducts, a7 as useProductsFeed, a8 as useRemoveCoupon, a9 as useRemoveFromCart, aa as useReorderView, ab as useSelectShippingRate, ac as useStore, ad as useStoreFeatures, ae as useStoreLocale, af as useStoreTheme, ag as useUpdateCartExtensions, ah as useUpdateCartItem, ai as useUpdateCustomer, aj as useWooCommerceClient, ak as useWooCommerceQueryKeys } from '../index-DtuDPfTl.cjs';
|
|
2
|
+
export { Q as QueryKeys, p as createQueryKeys } from '../types-DABmdACe.cjs';
|
|
3
3
|
export { OrderStatus } from '@atomic-solutions/woocommerce-api-client';
|
|
4
4
|
import '@tanstack/react-query';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AppliedCoupon, C as CartTotals,
|
|
2
|
-
export { Q as QueryKeys, p as createQueryKeys } from '../types-
|
|
1
|
+
export { A as AppliedCoupon, C as CartTotals, al as InfiniteQueryOptions, am as MutationOptions, a as PaymentMethod, b as ProcessedCartItem, c as ProcessedCategory, d as ProcessedOrderDetails, e as ProcessedOrderLineItem, f as ProcessedProduct, g as ProcessedProductDetails, h as ProductCartState, i as ProductCategoryTreeNode, an as QueryOptions, R as ReorderInputItem, j as ReorderItemView, k as ReorderUnavailableReason, S as ShippingRate, n as UseCartViewOptions, o as UseCartViewReturn, p as UseOrderViewOptions, q as UseOrderViewReturn, r as UseProductViewOptions, s as UseProductViewReturn, t as UseProductsFeedOptions, u as UseProductsFeedReturn, v as UseReorderViewOptions, w as UseReorderViewReturn, E as getOrderStatusLabel, Q as useAddManyToCart, T as useAddToCart, V as useApplyCoupon, W as useCart, X as useCartView, Y as useCheckout, Z as useInfiniteProducts, _ as useOrder, $ as useOrderView, a0 as useProcessCheckout, a1 as useProduct, a2 as useProductCategories, a3 as useProductCategoryTree, a4 as useProductTags, a5 as useProductView, a6 as useProducts, a7 as useProductsFeed, a8 as useRemoveCoupon, a9 as useRemoveFromCart, aa as useReorderView, ab as useSelectShippingRate, ac as useStore, ad as useStoreFeatures, ae as useStoreLocale, af as useStoreTheme, ag as useUpdateCartExtensions, ah as useUpdateCartItem, ai as useUpdateCustomer, aj as useWooCommerceClient, ak as useWooCommerceQueryKeys } from '../index-C6OkRa8P.js';
|
|
2
|
+
export { Q as QueryKeys, p as createQueryKeys } from '../types-DABmdACe.js';
|
|
3
3
|
export { OrderStatus } from '@atomic-solutions/woocommerce-api-client';
|
|
4
4
|
import '@tanstack/react-query';
|
package/dist/hooks/index.js
CHANGED
|
@@ -367,6 +367,19 @@ var useRemoveCoupon = () => {
|
|
|
367
367
|
}
|
|
368
368
|
});
|
|
369
369
|
};
|
|
370
|
+
var useUpdateCartExtensions = () => {
|
|
371
|
+
const client = useWooCommerceClient();
|
|
372
|
+
const queryKeys = useWooCommerceQueryKeys();
|
|
373
|
+
const queryClient = useQueryClient();
|
|
374
|
+
return useMutation({
|
|
375
|
+
mutationKey: queryKeys.cart.mutations.updateExtensions(),
|
|
376
|
+
mutationFn: (input) => client.cart.updateExtensions(input),
|
|
377
|
+
onSuccess: (cart) => {
|
|
378
|
+
queryClient.setQueryData(queryKeys.cart.details(), cart);
|
|
379
|
+
queryClient.invalidateQueries({ queryKey: queryKeys.cart.all });
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
};
|
|
370
383
|
var useUpdateCustomer = () => {
|
|
371
384
|
const client = useWooCommerceClient();
|
|
372
385
|
const queryKeys = useWooCommerceQueryKeys();
|
|
@@ -489,6 +502,7 @@ var createQueryKeys = (prefix = ["woocommerce"]) => ({
|
|
|
489
502
|
removeItem: () => [...prefix, "cart", "mutation", "removeItem"],
|
|
490
503
|
applyCoupon: () => [...prefix, "cart", "mutation", "applyCoupon"],
|
|
491
504
|
removeCoupon: () => [...prefix, "cart", "mutation", "removeCoupon"],
|
|
505
|
+
updateExtensions: () => [...prefix, "cart", "mutation", "updateExtensions"],
|
|
492
506
|
updateCustomer: () => [...prefix, "cart", "mutation", "updateCustomer"],
|
|
493
507
|
selectShippingRate: () => [...prefix, "cart", "mutation", "selectShippingRate"]
|
|
494
508
|
}
|
|
@@ -1271,6 +1285,6 @@ function useOrderView(input, options = {}) {
|
|
|
1271
1285
|
};
|
|
1272
1286
|
}
|
|
1273
1287
|
|
|
1274
|
-
export { createQueryKeys, getOrderStatusLabel, useAddManyToCart, useAddToCart, useApplyCoupon, useCart, useCartView, useCheckout, useInfiniteProducts, useOrder, useOrderView, useProcessCheckout, useProduct, useProductCategories, useProductCategoryTree, useProductTags, useProductView, useProducts, useProductsFeed, useRemoveCoupon, useRemoveFromCart, useReorderView, useSelectShippingRate, useStore, useStoreFeatures, useStoreLocale, useStoreTheme, useUpdateCartItem, useUpdateCustomer, useWooCommerceClient, useWooCommerceQueryKeys };
|
|
1288
|
+
export { createQueryKeys, getOrderStatusLabel, useAddManyToCart, useAddToCart, useApplyCoupon, useCart, useCartView, useCheckout, useInfiniteProducts, useOrder, useOrderView, useProcessCheckout, useProduct, useProductCategories, useProductCategoryTree, useProductTags, useProductView, useProducts, useProductsFeed, useRemoveCoupon, useRemoveFromCart, useReorderView, useSelectShippingRate, useStore, useStoreFeatures, useStoreLocale, useStoreTheme, useUpdateCartExtensions, useUpdateCartItem, useUpdateCustomer, useWooCommerceClient, useWooCommerceQueryKeys };
|
|
1275
1289
|
//# sourceMappingURL=index.js.map
|
|
1276
1290
|
//# sourceMappingURL=index.js.map
|