propro-common-components 0.1.296 → 0.1.297

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "propro-common-components",
3
- "version": "0.1.296",
3
+ "version": "0.1.297",
4
4
  "type": "module",
5
5
  "main": "dist/propro-common-components.js",
6
6
  "types": "dist/main.d.ts",
@@ -43,7 +43,8 @@
43
43
  "@radix-ui/react-switch": "^1.0.3",
44
44
  "@radix-ui/react-tabs": "^1.0.4",
45
45
  "@radix-ui/react-tooltip": "^1.1.2",
46
- "@tauri-apps/api": "^1.6.0",
46
+ "@tauri-apps/api": "^2.0.2",
47
+ "@tauri-apps/plugin-http": "^2.0.0",
47
48
  "@types/js-cookie": "^3.0.6",
48
49
  "antd": "^5.17.4",
49
50
  "axios": "^1.6.7",
@@ -97,8 +98,8 @@
97
98
  "vite-plugin-lib-inject-css": "^1.3.0"
98
99
  },
99
100
  "peerDependencies": {
100
- "@tanstack/react-query": "^5.52.4",
101
- "@tanstack/react-query-devtools": "^5.52.4",
101
+ "@tanstack/react-query": "^5.59.13",
102
+ "@tanstack/react-query-devtools": "^5.59.13",
102
103
  "axios": "^1.6.7",
103
104
  "react": "^18.2.0",
104
105
  "react-dom": "^18.2.0",
@@ -1,24 +0,0 @@
1
- import { QueryKey, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
2
- import { AxiosError, AxiosRequestConfig } from 'axios';
3
- import { ToastOptions } from 'react-toastify';
4
-
5
- declare const useMutate: <TData = object, TError = AxiosError<unknown, any>, TVariables = object, TContext = unknown>({ url, method, headers, data, invalidateAllQueries, successLog, errorLog, logURL, toastMessage, onSuccess, onError, }: {
6
- url: string | ((variables: TVariables) => string);
7
- method: 'POST' | 'PUT' | 'DELETE' | 'PATCH';
8
- headers?: AxiosRequestConfig['headers'];
9
- data?: TVariables | ((variables: TVariables) => unknown);
10
- updateKey?: QueryKey;
11
- invalidateAllQueries?: boolean;
12
- successLog?: string;
13
- errorLog?: string;
14
- logURL?: string;
15
- toastMessage?: {
16
- message: string;
17
- successMessage: string;
18
- errorMessage: string;
19
- options?: ToastOptions<unknown> | undefined;
20
- };
21
- onSuccess?: (res: TData, variables?: TVariables) => void;
22
- onError?: (err: TError, variables?: TVariables) => void;
23
- }, options?: Omit<UseMutationOptions<TData, TError, TVariables, TContext>, 'mutationFn' | 'onSuccess' | 'onError'>) => UseMutationResult<TData, TError, TVariables, TContext>;
24
- export default useMutate;