@atomic-solutions/woocommerce-react 0.6.2 → 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 +35 -3
- 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 +34 -4
- package/dist/hooks/index.js.map +1 -1
- package/dist/{index-Dmlapl9c.d.ts → index-C6OkRa8P.d.ts} +202 -5
- package/dist/{index-DEvJWFSF.d.cts → index-DtuDPfTl.d.cts} +202 -5
- package/dist/index.cjs +35 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +34 -4
- 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-Dnq60zh-.d.cts → types-DABmdACe.d.cts} +3 -1
- package/dist/{types-Dnq60zh-.d.ts → types-DABmdACe.d.ts} +3 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { j as StoreConfig, Q as QueryKeys, k as StoreContextValue } from '../types-
|
|
5
|
-
export { D as DEFAULT_STORE_CONFIG, I as ImageUrlTransformer, R as RateLimitConfig, l as StoreFeatures, m as StoreGuardrails, S as StoreLocale, n as StoreTheme, a as StoreValidationResult } from '../types-
|
|
4
|
+
import { j as StoreConfig, Q as QueryKeys, k as StoreContextValue } from '../types-DABmdACe.cjs';
|
|
5
|
+
export { D as DEFAULT_STORE_CONFIG, I as ImageUrlTransformer, R as RateLimitConfig, l as StoreFeatures, m as StoreGuardrails, S as StoreLocale, n as StoreTheme, a as StoreValidationResult } from '../types-DABmdACe.cjs';
|
|
6
6
|
import '@atomic-solutions/woocommerce-api-client';
|
|
7
7
|
|
|
8
8
|
interface WooCommerceStoreProviderProps {
|
package/dist/provider/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { j as StoreConfig, Q as QueryKeys, k as StoreContextValue } from '../types-
|
|
5
|
-
export { D as DEFAULT_STORE_CONFIG, I as ImageUrlTransformer, R as RateLimitConfig, l as StoreFeatures, m as StoreGuardrails, S as StoreLocale, n as StoreTheme, a as StoreValidationResult } from '../types-
|
|
4
|
+
import { j as StoreConfig, Q as QueryKeys, k as StoreContextValue } from '../types-DABmdACe.js';
|
|
5
|
+
export { D as DEFAULT_STORE_CONFIG, I as ImageUrlTransformer, R as RateLimitConfig, l as StoreFeatures, m as StoreGuardrails, S as StoreLocale, n as StoreTheme, a as StoreValidationResult } from '../types-DABmdACe.js';
|
|
6
6
|
import '@atomic-solutions/woocommerce-api-client';
|
|
7
7
|
|
|
8
8
|
interface WooCommerceStoreProviderProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cart, WooCommerceApiError, CartItem, Checkout, StoreApiOrder, ProductParams } from '@atomic-solutions/woocommerce-api-client';
|
|
1
|
+
import { Cart, WooCommerceApiError, CartItem, Checkout, StoreApiOrder, ProductParams, ProductTagsParams } from '@atomic-solutions/woocommerce-api-client';
|
|
2
2
|
|
|
3
3
|
type WooCommerceEventType = 'cart:item_added' | 'cart:item_removed' | 'cart:item_updated' | 'cart:coupon_applied' | 'cart:coupon_removed' | 'cart:customer_updated' | 'cart:shipping_selected' | 'checkout:processed' | 'order:fetched';
|
|
4
4
|
interface BaseSuccessEvent<T extends WooCommerceEventType, D> {
|
|
@@ -93,6 +93,7 @@ declare const createQueryKeys: (prefix?: string[]) => {
|
|
|
93
93
|
details: () => readonly [...string[], "products", "detail"];
|
|
94
94
|
detail: (id: number) => readonly [...string[], "products", "detail", number];
|
|
95
95
|
categories: () => readonly [...string[], "products", "categories"];
|
|
96
|
+
tags: (params?: ProductTagsParams) => readonly [...string[], "products", "tags", ProductTagsParams | undefined];
|
|
96
97
|
};
|
|
97
98
|
cart: {
|
|
98
99
|
all: readonly [...string[], "cart"];
|
|
@@ -104,6 +105,7 @@ declare const createQueryKeys: (prefix?: string[]) => {
|
|
|
104
105
|
removeItem: () => readonly [...string[], "cart", "mutation", "removeItem"];
|
|
105
106
|
applyCoupon: () => readonly [...string[], "cart", "mutation", "applyCoupon"];
|
|
106
107
|
removeCoupon: () => readonly [...string[], "cart", "mutation", "removeCoupon"];
|
|
108
|
+
updateExtensions: () => readonly [...string[], "cart", "mutation", "updateExtensions"];
|
|
107
109
|
updateCustomer: () => readonly [...string[], "cart", "mutation", "updateCustomer"];
|
|
108
110
|
selectShippingRate: () => readonly [...string[], "cart", "mutation", "selectShippingRate"];
|
|
109
111
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cart, WooCommerceApiError, CartItem, Checkout, StoreApiOrder, ProductParams } from '@atomic-solutions/woocommerce-api-client';
|
|
1
|
+
import { Cart, WooCommerceApiError, CartItem, Checkout, StoreApiOrder, ProductParams, ProductTagsParams } from '@atomic-solutions/woocommerce-api-client';
|
|
2
2
|
|
|
3
3
|
type WooCommerceEventType = 'cart:item_added' | 'cart:item_removed' | 'cart:item_updated' | 'cart:coupon_applied' | 'cart:coupon_removed' | 'cart:customer_updated' | 'cart:shipping_selected' | 'checkout:processed' | 'order:fetched';
|
|
4
4
|
interface BaseSuccessEvent<T extends WooCommerceEventType, D> {
|
|
@@ -93,6 +93,7 @@ declare const createQueryKeys: (prefix?: string[]) => {
|
|
|
93
93
|
details: () => readonly [...string[], "products", "detail"];
|
|
94
94
|
detail: (id: number) => readonly [...string[], "products", "detail", number];
|
|
95
95
|
categories: () => readonly [...string[], "products", "categories"];
|
|
96
|
+
tags: (params?: ProductTagsParams) => readonly [...string[], "products", "tags", ProductTagsParams | undefined];
|
|
96
97
|
};
|
|
97
98
|
cart: {
|
|
98
99
|
all: readonly [...string[], "cart"];
|
|
@@ -104,6 +105,7 @@ declare const createQueryKeys: (prefix?: string[]) => {
|
|
|
104
105
|
removeItem: () => readonly [...string[], "cart", "mutation", "removeItem"];
|
|
105
106
|
applyCoupon: () => readonly [...string[], "cart", "mutation", "applyCoupon"];
|
|
106
107
|
removeCoupon: () => readonly [...string[], "cart", "mutation", "removeCoupon"];
|
|
108
|
+
updateExtensions: () => readonly [...string[], "cart", "mutation", "updateExtensions"];
|
|
107
109
|
updateCustomer: () => readonly [...string[], "cart", "mutation", "updateCustomer"];
|
|
108
110
|
selectShippingRate: () => readonly [...string[], "cart", "mutation", "selectShippingRate"];
|
|
109
111
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomic-solutions/woocommerce-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "React Query hooks and provider for WooCommerce Store API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@atomic-solutions/woocommerce-api-client": "0.
|
|
53
|
+
"@atomic-solutions/woocommerce-api-client": "0.7.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@tanstack/react-query": ">=5.0.0",
|