propro-common-components 0.3.12 → 0.3.14
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/api/useGet.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
|
|
3
|
-
declare const useGet: <TQueryFnData = unknown, TError =
|
|
3
|
+
declare const useGet: <TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(key: TQueryKey, endpoint: string, options?: UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> | DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> | UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>) => UseQueryResult<TData, TError> | DefinedUseQueryResult<TData, TError> | UseQueryResult<TData, TError>;
|
|
4
4
|
export default useGet;
|
package/dist/api/useMutate.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
2
1
|
import { AxiosError, AxiosRequestConfig } from 'axios';
|
|
3
2
|
import { ToastOptions } from 'react-toastify';
|
|
4
3
|
|
|
@@ -18,5 +17,5 @@ declare const useMutateWithKeepAlive: ({ url, method, headers, invalidateAllQuer
|
|
|
18
17
|
};
|
|
19
18
|
onSuccess?: (res: unknown) => void;
|
|
20
19
|
onError?: (err: AxiosError) => void;
|
|
21
|
-
}, options?:
|
|
20
|
+
}, options?: any) => UseMutationResult<unknown, AxiosError<unknown, any>, unknown, unknown>;
|
|
22
21
|
export default useMutateWithKeepAlive;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const useUpdateAvatar: () =>
|
|
2
|
-
declare const useUpdateProfile: () =>
|
|
3
|
-
declare const useChangePassword: () =>
|
|
4
|
-
declare const useUserLogout: () =>
|
|
1
|
+
declare const useUpdateAvatar: () => UseMutationResult<TData, TError, TVariables, TContext>;
|
|
2
|
+
declare const useUpdateProfile: () => UseMutationResult<TData, TError, TVariables, TContext>;
|
|
3
|
+
declare const useChangePassword: () => UseMutationResult<TData, TError, TVariables, TContext>;
|
|
4
|
+
declare const useUserLogout: () => UseMutationResult<TData, TError, TVariables, TContext>;
|
|
5
5
|
export { useChangePassword, useUpdateAvatar, useUpdateProfile, useUserLogout };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
function o(r, e = !1) {
|
|
2
|
+
return window.__TAURI_INTERNALS__.transformCallback(r, e);
|
|
3
|
+
}
|
|
4
|
+
async function n(r, e = {}, i) {
|
|
5
|
+
return window.__TAURI_INTERNALS__.invoke(r, e, i);
|
|
6
|
+
}
|
|
7
|
+
var a;
|
|
8
|
+
(function(r) {
|
|
9
|
+
r.WINDOW_RESIZED = "tauri://resize", r.WINDOW_MOVED = "tauri://move", r.WINDOW_CLOSE_REQUESTED = "tauri://close-requested", r.WINDOW_DESTROYED = "tauri://destroyed", r.WINDOW_FOCUS = "tauri://focus", r.WINDOW_BLUR = "tauri://blur", r.WINDOW_SCALE_FACTOR_CHANGED = "tauri://scale-change", r.WINDOW_THEME_CHANGED = "tauri://theme-changed", r.WINDOW_CREATED = "tauri://window-created", r.WEBVIEW_CREATED = "tauri://webview-created", r.DRAG_ENTER = "tauri://drag-enter", r.DRAG_OVER = "tauri://drag-over", r.DRAG_DROP = "tauri://drag-drop", r.DRAG_LEAVE = "tauri://drag-leave";
|
|
10
|
+
})(a || (a = {}));
|
|
11
|
+
async function _(r, e) {
|
|
12
|
+
window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(r, e), await n("plugin:event|unlisten", {
|
|
13
|
+
event: r,
|
|
14
|
+
eventId: e
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
async function c(r, e, i) {
|
|
18
|
+
var t;
|
|
19
|
+
const u = (t = void 0) !== null && t !== void 0 ? t : { kind: "Any" };
|
|
20
|
+
return n("plugin:event|listen", {
|
|
21
|
+
event: r,
|
|
22
|
+
target: u,
|
|
23
|
+
handler: o(e)
|
|
24
|
+
}).then((s) => async () => _(r, s));
|
|
25
|
+
}
|
|
26
|
+
async function d() {
|
|
27
|
+
return await n("plugin:deep-link|get_current");
|
|
28
|
+
}
|
|
29
|
+
async function l(r) {
|
|
30
|
+
return await n("plugin:deep-link|register", { protocol: r });
|
|
31
|
+
}
|
|
32
|
+
async function p(r) {
|
|
33
|
+
return await n("plugin:deep-link|unregister", { protocol: r });
|
|
34
|
+
}
|
|
35
|
+
async function D(r) {
|
|
36
|
+
return await n("plugin:deep-link|is_registered", { protocol: r });
|
|
37
|
+
}
|
|
38
|
+
async function g(r) {
|
|
39
|
+
return await c("deep-link://new-url", (e) => {
|
|
40
|
+
r(e.payload);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
d as getCurrent,
|
|
45
|
+
D as isRegistered,
|
|
46
|
+
g as onOpenUrl,
|
|
47
|
+
l as register,
|
|
48
|
+
p as unregister
|
|
49
|
+
};
|