@refinedev/core 4.51.0 → 4.52.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/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/dist/components/authenticated/index.d.mts.map +75 -1
- package/dist/components/autoSaveIndicator/index.d.cts.map +1 -1
- package/dist/components/autoSaveIndicator/index.d.mts.map +24 -1
- package/dist/components/autoSaveIndicator/index.d.ts.map +1 -1
- package/dist/components/canAccess/index.d.mts.map +52 -1
- package/dist/components/containers/index.d.mts.map +2 -1
- package/dist/components/containers/refine/index.d.mts.map +11 -1
- package/dist/components/gh-banner/index.d.mts.map +7 -1
- package/dist/components/gh-banner/styles.d.mts.map +2 -1
- package/dist/components/index.d.mts.map +10 -1
- package/dist/components/layoutWrapper/defaultLayout/index.d.mts.map +4 -1
- package/dist/components/layoutWrapper/index.d.mts.map +46 -1
- package/dist/components/pages/auth/components/forgotPassword/index.d.mts.map +7 -1
- package/dist/components/pages/auth/components/index.d.mts.map +5 -1
- package/dist/components/pages/auth/components/login/index.d.mts.map +7 -1
- package/dist/components/pages/auth/components/register/index.d.mts.map +7 -1
- package/dist/components/pages/auth/components/updatePassword/index.d.mts.map +7 -1
- package/dist/components/pages/auth/index.d.mts.map +12 -1
- package/dist/components/pages/auth/types.d.mts.map +179 -1
- package/dist/components/pages/config-error/index.d.mts.map +3 -1
- package/dist/components/pages/config-success/index.d.mts.map +6 -1
- package/dist/components/pages/error/index.d.mts.map +9 -1
- package/dist/components/pages/index.d.mts.map +7 -1
- package/dist/components/pages/login/index.d.mts.map +13 -1
- package/dist/components/pages/ready/index.d.mts.map +8 -1
- package/dist/components/pages/welcome/index.d.mts.map +3 -1
- package/dist/components/routeChangeHandler/index.d.mts.map +3 -1
- package/dist/components/telemetry/index.d.mts.map +3 -1
- package/dist/components/telemetry/types.d.mts.map +16 -1
- package/dist/components/undoableQueue/index.d.mts.map +6 -1
- package/dist/contexts/accessControl/index.d.mts.map +7 -1
- package/dist/contexts/accessControl/types.d.mts.map +84 -1
- package/dist/contexts/auditLog/index.d.mts.map +5 -1
- package/dist/contexts/auditLog/types.d.mts.map +41 -1
- package/dist/contexts/auth/index.d.mts.map +18 -1
- package/dist/contexts/auth/types.d.mts.map +101 -1
- package/dist/contexts/data/index.d.mts.map +10 -1
- package/dist/contexts/data/types.d.mts.map +347 -1
- package/dist/contexts/i18n/index.d.mts.map +7 -1
- package/dist/contexts/i18n/types.d.mts.map +13 -1
- package/dist/contexts/live/index.d.mts.map +5 -1
- package/dist/contexts/live/types.d.mts.map +96 -1
- package/dist/contexts/notification/index.d.mts.map +7 -1
- package/dist/contexts/notification/types.d.mts.map +27 -1
- package/dist/contexts/refine/index.d.mts.map +6 -1
- package/dist/contexts/refine/types.d.mts.map +325 -1
- package/dist/contexts/resource/index.d.mts.map +7 -1
- package/dist/contexts/resource/types.d.mts.map +168 -1
- package/dist/contexts/router/index.d.mts.map +7 -1
- package/dist/contexts/router/legacy/index.d.mts.map +6 -1
- package/dist/contexts/router/legacy/types.d.mts.map +47 -1
- package/dist/contexts/router/picker/index.d.mts.map +15 -1
- package/dist/contexts/router/types.d.mts.map +67 -1
- package/dist/contexts/undoableQueue/index.d.mts.map +6 -1
- package/dist/contexts/undoableQueue/types.d.mts.map +21 -1
- package/dist/contexts/unsavedWarn/index.d.mts.map +5 -1
- package/dist/contexts/unsavedWarn/types.d.mts.map +5 -1
- package/dist/definitions/helpers/async-debounce/index.d.mts.map +18 -1
- package/dist/definitions/helpers/check-router-prop-misuse/index.d.mts.map +4 -1
- package/dist/definitions/helpers/defer-execution/index.d.mts.map +9 -1
- package/dist/definitions/helpers/downloadInBrowser/index.d.mts.map +2 -1
- package/dist/definitions/helpers/flatten-object-keys/index.d.mts.map +4 -1
- package/dist/definitions/helpers/generateDocumentTitle/index.d.mts.map +7 -1
- package/dist/definitions/helpers/handleMultiple/index.d.mts.map +6 -1
- package/dist/definitions/helpers/handlePaginationParams/index.d.mts.map +9 -1
- package/dist/definitions/helpers/handleRefineOptions/index.d.mts.map +26 -1
- package/dist/definitions/helpers/handleUseParams/index.d.mts.map +2 -1
- package/dist/definitions/helpers/hasPermission/index.d.mts.map +2 -1
- package/dist/definitions/helpers/humanizeString/index.d.mts.map +2 -1
- package/dist/definitions/helpers/importCSVMapper/index.d.mts.map +3 -1
- package/dist/definitions/helpers/index.d.mts.map +34 -1
- package/dist/definitions/helpers/keys/index.d.mts.map +64 -1
- package/dist/definitions/helpers/legacy-resource-transform/index.d.mts.map +9 -1
- package/dist/definitions/helpers/menu/create-resource-key.d.mts.map +3 -1
- package/dist/definitions/helpers/menu/create-tree.d.mts.map +13 -1
- package/dist/definitions/helpers/pick-resource/index.d.mts.map +8 -1
- package/dist/definitions/helpers/pickDataProvider/index.d.mts.map +6 -1
- package/dist/definitions/helpers/pickNotDeprecated/index.d.mts.map +2 -1
- package/dist/definitions/helpers/prepare-query-context/index.d.mts.map +3 -1
- package/dist/definitions/helpers/property-path-to-array/index.d.mts.map +2 -1
- package/dist/definitions/helpers/queryKeys/index.d.mts.map +7 -1
- package/dist/definitions/helpers/redirectPage/index.d.mts.map +11 -1
- package/dist/definitions/helpers/routeGenerator/index.d.mts.map +7 -1
- package/dist/definitions/helpers/router/check-by-segments.d.mts.map +9 -1
- package/dist/definitions/helpers/router/compose-route.d.mts.map +11 -1
- package/dist/definitions/helpers/router/get-action-routes-from-resource.d.mts.map +16 -1
- package/dist/definitions/helpers/router/get-default-action-path.d.mts.map +8 -1
- package/dist/definitions/helpers/router/get-parent-prefix-for-resource.d.mts.map +7 -1
- package/dist/definitions/helpers/router/get-parent-resource.d.mts.map +7 -1
- package/dist/definitions/helpers/router/index.d.mts.map +10 -1
- package/dist/definitions/helpers/router/is-parameter.d.mts.map +5 -1
- package/dist/definitions/helpers/router/is-segment-counts-same.d.mts.map +5 -1
- package/dist/definitions/helpers/router/match-resource-from-route.d.mts.map +15 -1
- package/dist/definitions/helpers/router/pick-matched-route.d.mts.map +8 -1
- package/dist/definitions/helpers/router/pick-route-params.d.mts.map +6 -1
- package/dist/definitions/helpers/router/prepare-route-params.d.mts.map +8 -1
- package/dist/definitions/helpers/router/remove-leading-trailing-slashes.d.mts.map +5 -1
- package/dist/definitions/helpers/router/split-to-segments.d.mts.map +5 -1
- package/dist/definitions/helpers/safe-translate/index.d.mts.map +3 -1
- package/dist/definitions/helpers/sanitize-resource/index.d.mts.map +8 -1
- package/dist/definitions/helpers/sequentialPromises/index.d.mts.map +5 -1
- package/dist/definitions/helpers/treeView/createTreeView/index.d.mts.map +6 -1
- package/dist/definitions/helpers/treeView/index.d.mts.map +2 -1
- package/dist/definitions/helpers/useActiveAuthProvider/index.d.cts +7 -7
- package/dist/definitions/helpers/useActiveAuthProvider/index.d.mts +7 -7
- package/dist/definitions/helpers/useActiveAuthProvider/index.d.mts.map +34 -1
- package/dist/definitions/helpers/useActiveAuthProvider/index.d.ts +7 -7
- package/dist/definitions/helpers/useInfinitePagination/index.d.mts.map +4 -1
- package/dist/definitions/helpers/useMediaQuery/index.d.mts.map +2 -1
- package/dist/definitions/helpers/useUserFriendlyName/index.d.mts.map +6 -1
- package/dist/definitions/helpers/userFriendlyResourceName/index.d.mts.map +7 -1
- package/dist/definitions/helpers/userFriendlySeconds/index.d.mts.map +2 -1
- package/dist/definitions/index.d.mts.map +4 -1
- package/dist/definitions/table/index.d.mts.map +34 -1
- package/dist/definitions/upload/file2Base64/index.d.mts.map +2 -1
- package/dist/definitions/upload/index.d.mts.map +2 -1
- package/dist/hooks/accessControl/index.d.mts.map +3 -1
- package/dist/hooks/accessControl/useCan/index.d.mts.map +18 -1
- package/dist/hooks/accessControl/useCanWithoutCache.d.mts.map +3 -1
- package/dist/hooks/auditLog/index.d.mts.map +3 -1
- package/dist/hooks/auditLog/useLog/index.d.mts.map +27 -1
- package/dist/hooks/auditLog/useLogList/index.d.mts.map +22 -1
- package/dist/hooks/auth/index.d.mts.map +11 -1
- package/dist/hooks/auth/useForgotPassword/index.d.mts.map +22 -1
- package/dist/hooks/auth/useGetIdentity/index.d.mts.map +21 -1
- package/dist/hooks/auth/useInvalidateAuthStore/index.d.mts.map +2 -1
- package/dist/hooks/auth/useIsAuthenticated/index.d.mts.map +25 -1
- package/dist/hooks/auth/useIsExistAuthentication/index.d.mts.map +6 -1
- package/dist/hooks/auth/useLogin/index.d.mts.map +22 -1
- package/dist/hooks/auth/useLogout/index.d.mts.map +26 -1
- package/dist/hooks/auth/useOnError/index.d.mts.map +22 -1
- package/dist/hooks/auth/usePermissions/index.d.mts.map +24 -1
- package/dist/hooks/auth/useRegister/index.d.mts.map +22 -1
- package/dist/hooks/auth/useUpdatePassword/index.d.mts.map +23 -1
- package/dist/hooks/breadcrumb/index.d.mts.map +18 -1
- package/dist/hooks/button/actionable-button/index.d.mts.map +8 -1
- package/dist/hooks/button/button-can-access/index.d.mts.map +22 -1
- package/dist/hooks/button/delete-button/index.d.mts.map +28 -1
- package/dist/hooks/button/index.d.mts.map +13 -1
- package/dist/hooks/button/navigation-button/index.d.mts.map +28 -1
- package/dist/hooks/button/refresh-button/index.d.mts.map +14 -1
- package/dist/hooks/data/index.d.cts +12 -12
- package/dist/hooks/data/index.d.cts.map +1 -1
- package/dist/hooks/data/index.d.mts +12 -12
- package/dist/hooks/data/index.d.mts.map +15 -1
- package/dist/hooks/data/index.d.ts +12 -12
- package/dist/hooks/data/index.d.ts.map +1 -1
- package/dist/hooks/data/useApiUrl.d.mts.map +2 -1
- package/dist/hooks/data/useCreate.d.mts.map +49 -1
- package/dist/hooks/data/useCreateMany.d.mts.map +31 -1
- package/dist/hooks/data/useCustom.d.mts.map +63 -1
- package/dist/hooks/data/useCustomMutation.d.mts.map +42 -1
- package/dist/hooks/data/useDataProvider.d.mts.map +7 -1
- package/dist/hooks/data/useDelete.d.mts.map +65 -1
- package/dist/hooks/data/useDeleteMany.d.mts.map +65 -1
- package/dist/hooks/data/useInfiniteList.d.mts.map +74 -1
- package/dist/hooks/data/useList.d.mts.map +73 -1
- package/dist/hooks/data/useMany.d.mts.map +48 -1
- package/dist/hooks/data/useOne.d.mts.map +50 -1
- package/dist/hooks/data/useUpdate.d.mts.map +83 -1
- package/dist/hooks/data/useUpdateMany.d.cts +1 -1
- package/dist/hooks/data/useUpdateMany.d.cts.map +1 -1
- package/dist/hooks/data/useUpdateMany.d.mts +1 -1
- package/dist/hooks/data/useUpdateMany.d.mts.map +84 -1
- package/dist/hooks/data/useUpdateMany.d.ts +1 -1
- package/dist/hooks/data/useUpdateMany.d.ts.map +1 -1
- package/dist/hooks/deepMemo/index.d.mts.map +7 -1
- package/dist/hooks/export/index.d.mts.map +99 -1
- package/dist/hooks/export/types.d.mts.map +21 -1
- package/dist/hooks/form/index.d.mts.map +18 -1
- package/dist/hooks/form/types.d.mts.map +146 -1
- package/dist/hooks/i18n/index.d.mts.map +5 -1
- package/dist/hooks/i18n/useGetLocale.d.mts.map +9 -1
- package/dist/hooks/i18n/useSetLocale.d.mts.map +8 -1
- package/dist/hooks/i18n/useTranslate.d.mts.map +11 -1
- package/dist/hooks/i18n/useTranslation.d.mts.map +18 -1
- package/dist/hooks/import/index.d.mts.map +101 -1
- package/dist/hooks/index.d.mts.map +31 -1
- package/dist/hooks/invalidate/index.d.mts.map +12 -1
- package/dist/hooks/legacy-router/index.d.mts.map +2 -1
- package/dist/hooks/legacy-router/useRouterContext.d.mts.map +10 -1
- package/dist/hooks/live/index.d.mts.map +5 -1
- package/dist/hooks/live/useLiveMode/index.d.mts.map +3 -1
- package/dist/hooks/live/usePublish/index.d.mts.map +3 -1
- package/dist/hooks/live/useResourceSubscription/index.d.mts.map +43 -1
- package/dist/hooks/live/useSubscription/index.d.mts.map +57 -1
- package/dist/hooks/memoized/index.d.mts.map +6 -1
- package/dist/hooks/menu/index.d.mts.map +2 -1
- package/dist/hooks/menu/useMenu.d.mts.map +28 -1
- package/dist/hooks/modal/index.d.mts.map +2 -1
- package/dist/hooks/modal/useModal/index.d.mts.map +13 -1
- package/dist/hooks/navigation/index.d.mts.map +28 -1
- package/dist/hooks/notification/index.d.mts.map +4 -1
- package/dist/hooks/notification/useCancelNotification/index.d.mts.map +8 -1
- package/dist/hooks/notification/useHandleNotification/index.d.mts.map +3 -1
- package/dist/hooks/notification/useNotification/index.d.mts.map +3 -1
- package/dist/hooks/redirection/index.d.mts.map +11 -1
- package/dist/hooks/refine/index.d.mts.map +6 -1
- package/dist/hooks/refine/useMutationMode.d.mts.map +16 -1
- package/dist/hooks/refine/useRefineContext.d.cts +1 -1
- package/dist/hooks/refine/useRefineContext.d.mts +1 -1
- package/dist/hooks/refine/useRefineContext.d.mts.map +20 -1
- package/dist/hooks/refine/useRefineContext.d.ts +1 -1
- package/dist/hooks/refine/useSyncWithLocation.d.mts.map +13 -1
- package/dist/hooks/refine/useTitle.d.mts.map +10 -1
- package/dist/hooks/refine/useWarnAboutChange/index.d.mts.map +16 -1
- package/dist/hooks/resource/index.d.mts.map +3 -1
- package/dist/hooks/resource/useResource/index.d.mts.map +63 -1
- package/dist/hooks/resource/useResourceWithRoute/index.d.mts.map +8 -1
- package/dist/hooks/router/index.d.mts.map +8 -1
- package/dist/hooks/router/use-back/index.d.mts.map +2 -1
- package/dist/hooks/router/use-get-to-path/index.d.mts.map +19 -1
- package/dist/hooks/router/use-go/index.d.mts.map +33 -1
- package/dist/hooks/router/use-link/index.d.mts.map +6 -1
- package/dist/hooks/router/use-parse/index.d.mts.map +5 -1
- package/dist/hooks/router/use-parsed/index.d.mts.map +2 -1
- package/dist/hooks/router/use-router-misuse-warning/index.d.mts.map +3 -1
- package/dist/hooks/router/use-to-path/index.d.mts.map +18 -1
- package/dist/hooks/show/index.d.mts.map +17 -1
- package/dist/hooks/show/types.d.mts.map +52 -1
- package/dist/hooks/show/useShow.d.mts.map +57 -1
- package/dist/hooks/use-refine-options/index.d.mts.map +2 -1
- package/dist/hooks/use-resource-params/index.d.mts.map +43 -1
- package/dist/hooks/use-resource-params/use-action/index.d.mts.map +12 -1
- package/dist/hooks/use-resource-params/use-id/index.d.mts.map +12 -1
- package/dist/hooks/useKeys/index.d.mts.map +5 -1
- package/dist/hooks/useLoadingOvertime/index.d.mts.map +49 -1
- package/dist/hooks/useMeta/index.d.mts.map +19 -1
- package/dist/hooks/useSelect/index.d.cts +6 -0
- package/dist/hooks/useSelect/index.d.cts.map +1 -1
- package/dist/hooks/useSelect/index.d.mts +6 -0
- package/dist/hooks/useSelect/index.d.mts.map +137 -1
- package/dist/hooks/useSelect/index.d.ts +6 -0
- package/dist/hooks/useSelect/index.d.ts.map +1 -1
- package/dist/hooks/useTable/index.d.mts.map +167 -1
- package/dist/hooks/useTelemetryData/index.d.mts.map +3 -1
- package/dist/index.cjs +18 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -7
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +8 -7
- package/dist/index.d.mts.map +25 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +18 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -13
- package/src/components/autoSaveIndicator/index.tsx +21 -7
- package/src/hooks/data/index.ts +28 -12
- package/src/hooks/data/useUpdateMany.ts +1 -1
- package/src/hooks/useSelect/index.ts +15 -1
- package/src/index.tsx +39 -0
|
@@ -1 +1,22 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { OnErrorResponse } from "../../../contexts/auth/types";
|
|
3
|
+
export type UseOnErrorLegacyProps = {
|
|
4
|
+
v3LegacyAuthProviderCompatible: true;
|
|
5
|
+
};
|
|
6
|
+
export type UseOnErrorProps = {
|
|
7
|
+
v3LegacyAuthProviderCompatible?: false;
|
|
8
|
+
};
|
|
9
|
+
export type UseOnErrorCombinedProps = {
|
|
10
|
+
v3LegacyAuthProviderCompatible: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type UseOnErrorLegacyReturnType = UseMutationResult<void, string | undefined, any, unknown>;
|
|
13
|
+
export type UseOnErrorReturnType = UseMutationResult<OnErrorResponse, unknown, unknown, unknown>;
|
|
14
|
+
export type UseOnErrorCombinedReturnType = UseMutationResult<OnErrorResponse | void, unknown, unknown, unknown>;
|
|
15
|
+
export declare function useOnError(props: UseOnErrorLegacyProps): UseOnErrorLegacyReturnType;
|
|
16
|
+
export declare function useOnError(props?: UseOnErrorProps): UseOnErrorReturnType;
|
|
17
|
+
export declare function useOnError(props?: UseOnErrorCombinedProps): UseOnErrorCombinedReturnType;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated `useCheckError` is deprecated with refine@4, use `useOnError` instead, however, we still support `useCheckError` for backward compatibility.
|
|
20
|
+
*/
|
|
21
|
+
export declare const useCheckError: typeof useOnError;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseQueryOptions, type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import type { PermissionResponse } from "../../../contexts/auth/types";
|
|
3
|
+
export type UsePermissionsLegacyProps<TData = any, TParams extends Record<string, any> = Record<string, any>> = {
|
|
4
|
+
v3LegacyAuthProviderCompatible: true;
|
|
5
|
+
options?: UseQueryOptions<TData>;
|
|
6
|
+
params?: TParams;
|
|
7
|
+
};
|
|
8
|
+
export type UsePermissionsProps<TData = PermissionResponse, TParams extends Record<string, any> = Record<string, any>> = {
|
|
9
|
+
v3LegacyAuthProviderCompatible?: false;
|
|
10
|
+
options?: UseQueryOptions<TData>;
|
|
11
|
+
params?: TParams;
|
|
12
|
+
};
|
|
13
|
+
export type UsePermissionsCombinedProps<TData = any, TParams extends Record<string, any> = Record<string, any>> = {
|
|
14
|
+
v3LegacyAuthProviderCompatible: boolean;
|
|
15
|
+
options?: UseQueryOptions<TData> | UseQueryOptions<PermissionResponse>;
|
|
16
|
+
params?: TParams;
|
|
17
|
+
};
|
|
18
|
+
export type UsePermissionsLegacyReturnType<TData = any> = UseQueryResult<TData, unknown>;
|
|
19
|
+
export type UsePermissionsReturnType<TData = PermissionResponse> = UseQueryResult<TData, unknown>;
|
|
20
|
+
export type UsePermissionsCombinedReturnType<TData = any> = UseQueryResult<TData, unknown> | UseQueryResult<PermissionResponse, unknown>;
|
|
21
|
+
export declare function usePermissions<TData = any, TParams extends Record<string, any> = Record<string, any>>(props: UsePermissionsLegacyProps<TData, TParams>): UsePermissionsLegacyReturnType<TData>;
|
|
22
|
+
export declare function usePermissions<TData = PermissionResponse, TParams extends Record<string, any> = Record<string, any>>(props?: UsePermissionsProps<TData, TParams>): UsePermissionsReturnType<TData>;
|
|
23
|
+
export declare function usePermissions<TData = any, TParams extends Record<string, any> = Record<string, any>>(props?: UsePermissionsCombinedProps<TData, TParams>): UsePermissionsCombinedReturnType<TData>;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { AuthActionResponse, TLoginData, TRegisterData } from "../../../contexts/auth/types";
|
|
3
|
+
import type { RefineError } from "../../../contexts/data/types";
|
|
4
|
+
export type UseRegisterLegacyProps<TVariables> = {
|
|
5
|
+
v3LegacyAuthProviderCompatible: true;
|
|
6
|
+
mutationOptions?: Omit<UseMutationOptions<TRegisterData, Error | RefineError, TVariables, unknown>, "mutationFn" | "onError" | "onSuccess">;
|
|
7
|
+
};
|
|
8
|
+
export type UseRegisterProps<TVariables> = {
|
|
9
|
+
v3LegacyAuthProviderCompatible?: false;
|
|
10
|
+
mutationOptions?: Omit<UseMutationOptions<AuthActionResponse, Error | RefineError, TVariables, unknown>, "mutationFn">;
|
|
11
|
+
};
|
|
12
|
+
export type UseRegisterCombinedProps<TVariables> = {
|
|
13
|
+
v3LegacyAuthProviderCompatible: boolean;
|
|
14
|
+
mutationOptions?: Omit<UseMutationOptions<AuthActionResponse | TRegisterData, Error | RefineError, TVariables, unknown>, "mutationFn">;
|
|
15
|
+
};
|
|
16
|
+
export type UseRegisterLegacyReturnType<TVariables> = UseMutationResult<TRegisterData, Error | RefineError, TVariables, unknown>;
|
|
17
|
+
export type UseRegisterReturnType<TVariables> = UseMutationResult<AuthActionResponse, Error | RefineError, TVariables, unknown>;
|
|
18
|
+
export type UseRegisterCombinedReturnType<TVariables> = UseMutationResult<AuthActionResponse | TLoginData, Error | RefineError, TVariables, unknown>;
|
|
19
|
+
export declare function useRegister<TVariables = {}>(props: UseRegisterLegacyProps<TVariables>): UseRegisterLegacyReturnType<TVariables>;
|
|
20
|
+
export declare function useRegister<TVariables = {}>(props?: UseRegisterProps<TVariables>): UseRegisterReturnType<TVariables>;
|
|
21
|
+
export declare function useRegister<TVariables = {}>(props?: UseRegisterCombinedProps<TVariables>): UseRegisterCombinedReturnType<TVariables>;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { UpdatePasswordFormTypes } from "../../../components/pages/auth/types";
|
|
3
|
+
import type { AuthActionResponse, TUpdatePasswordData } from "../../../contexts/auth/types";
|
|
4
|
+
import type { RefineError } from "../../../contexts/data/types";
|
|
5
|
+
export type UseUpdatePasswordLegacyProps<TVariables extends UpdatePasswordFormTypes> = {
|
|
6
|
+
v3LegacyAuthProviderCompatible: true;
|
|
7
|
+
mutationOptions?: Omit<UseMutationOptions<TUpdatePasswordData, Error | RefineError, TVariables, unknown>, "mutationFn" | "onError" | "onSuccess">;
|
|
8
|
+
};
|
|
9
|
+
export type UseUpdatePasswordProps<TVariables extends UpdatePasswordFormTypes> = {
|
|
10
|
+
v3LegacyAuthProviderCompatible?: false;
|
|
11
|
+
mutationOptions?: Omit<UseMutationOptions<AuthActionResponse, Error | RefineError, TVariables, unknown>, "mutationFn">;
|
|
12
|
+
};
|
|
13
|
+
export type UseUpdatePasswordCombinedProps<TVariables extends UpdatePasswordFormTypes> = {
|
|
14
|
+
v3LegacyAuthProviderCompatible: boolean;
|
|
15
|
+
mutationOptions?: Omit<UseMutationOptions<AuthActionResponse | TUpdatePasswordData, Error | RefineError, TVariables, unknown>, "mutationFn">;
|
|
16
|
+
};
|
|
17
|
+
export type UseUpdatePasswordLegacyReturnType<TVariables extends UpdatePasswordFormTypes> = UseMutationResult<TUpdatePasswordData, Error | RefineError, TVariables, unknown>;
|
|
18
|
+
export type UseUpdatePasswordReturnType<TVariables extends UpdatePasswordFormTypes> = UseMutationResult<AuthActionResponse, Error | RefineError, TVariables, unknown>;
|
|
19
|
+
export type UseUpdatePasswordCombinedReturnType<TVariables extends UpdatePasswordFormTypes> = UseMutationResult<AuthActionResponse | TUpdatePasswordData, Error | RefineError, TVariables, unknown>;
|
|
20
|
+
export declare function useUpdatePassword<TVariables extends UpdatePasswordFormTypes>(props: UseUpdatePasswordLegacyProps<TVariables>): UseUpdatePasswordLegacyReturnType<TVariables>;
|
|
21
|
+
export declare function useUpdatePassword<TVariables extends UpdatePasswordFormTypes>(props?: UseUpdatePasswordProps<TVariables>): UseUpdatePasswordReturnType<TVariables>;
|
|
22
|
+
export declare function useUpdatePassword<TVariables extends UpdatePasswordFormTypes>(props?: UseUpdatePasswordCombinedProps<TVariables>): UseUpdatePasswordCombinedReturnType<TVariables>;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type BreadcrumbsType = {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
type UseBreadcrumbReturnType = {
|
|
8
|
+
breadcrumbs: BreadcrumbsType[];
|
|
9
|
+
};
|
|
10
|
+
type UseBreadcrumbProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Additional params to be used in the route generation process.
|
|
13
|
+
*/
|
|
14
|
+
meta?: Record<string, string | number>;
|
|
15
|
+
};
|
|
16
|
+
export declare const useBreadcrumb: ({ meta: metaFromProps, }?: UseBreadcrumbProps) => UseBreadcrumbReturnType;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
{
|
|
1
|
+
export type ActionableButtonProps = {
|
|
2
|
+
type: "save" | "export" | "import";
|
|
3
|
+
};
|
|
4
|
+
export type ActionableButtonValues = {
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function useActionableButton({ type, }: ActionableButtonProps): ActionableButtonValues;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { CanReturnType } from "../../../contexts/accessControl/types";
|
|
2
|
+
import type { IResourceItem } from "../../../contexts/resource/types";
|
|
3
|
+
import type { Action } from "../../../contexts/router/types";
|
|
4
|
+
import type { BaseKey } from "../../../contexts/data/types";
|
|
5
|
+
type ButtonCanAccessProps = {
|
|
6
|
+
action: Action | "delete";
|
|
7
|
+
resource?: IResourceItem;
|
|
8
|
+
id?: BaseKey;
|
|
9
|
+
accessControl?: {
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
hideIfUnauthorized?: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type ButtonCanAccessValues = {
|
|
15
|
+
title: string;
|
|
16
|
+
hidden: boolean;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
canAccess: CanReturnType | undefined;
|
|
19
|
+
};
|
|
20
|
+
export declare const useButtonCanAccess: (props: ButtonCanAccessProps) => ButtonCanAccessValues;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
{
|
|
1
|
+
import type { BaseKey, DeleteOneResponse } from "../../../contexts/data/types";
|
|
2
|
+
import type { CanReturnType } from "../../../contexts/accessControl/types";
|
|
3
|
+
import type { DeleteParams } from "../../data/useDelete";
|
|
4
|
+
export type DeleteButtonProps = {
|
|
5
|
+
resource?: string;
|
|
6
|
+
id?: BaseKey;
|
|
7
|
+
dataProviderName?: string;
|
|
8
|
+
meta?: Record<string, unknown>;
|
|
9
|
+
accessControl?: {
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
hideIfUnauthorized?: boolean;
|
|
12
|
+
};
|
|
13
|
+
onSuccess?: (value: DeleteOneResponse) => void;
|
|
14
|
+
} & Pick<DeleteParams<any, any, any>, "mutationMode" | "successNotification" | "errorNotification" | "invalidates">;
|
|
15
|
+
export type DeleteButtonValues = {
|
|
16
|
+
label: string;
|
|
17
|
+
title: string;
|
|
18
|
+
hidden: boolean;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
canAccess: CanReturnType | undefined;
|
|
22
|
+
confirmOkLabel: string;
|
|
23
|
+
cancelLabel: string;
|
|
24
|
+
confirmTitle: string;
|
|
25
|
+
onConfirm: () => void;
|
|
26
|
+
};
|
|
27
|
+
export declare function useDeleteButton(props: DeleteButtonProps): DeleteButtonValues;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { NavigationButtonProps } from "./navigation-button";
|
|
2
|
+
import type { Prettify } from "../../contexts/data/types";
|
|
3
|
+
export { useDeleteButton } from "./delete-button";
|
|
4
|
+
export { useRefreshButton } from "./refresh-button";
|
|
5
|
+
export declare const useShowButton: (props: Prettify<Omit<NavigationButtonProps, "action">>) => import("./navigation-button").NavigationButtonValues;
|
|
6
|
+
export declare const useEditButton: (props: Prettify<Omit<NavigationButtonProps, "action">>) => import("./navigation-button").NavigationButtonValues;
|
|
7
|
+
export declare const useCloneButton: (props: Prettify<Omit<NavigationButtonProps, "action">>) => import("./navigation-button").NavigationButtonValues;
|
|
8
|
+
export declare const useCreateButton: (props: Prettify<Omit<NavigationButtonProps, "action" | "id">>) => import("./navigation-button").NavigationButtonValues;
|
|
9
|
+
export declare const useListButton: (props: Prettify<Omit<NavigationButtonProps, "action" | "id">>) => import("./navigation-button").NavigationButtonValues;
|
|
10
|
+
export declare const useSaveButton: () => import("./actionable-button").ActionableButtonValues;
|
|
11
|
+
export declare const useExportButton: () => import("./actionable-button").ActionableButtonValues;
|
|
12
|
+
export declare const useImportButton: () => import("./actionable-button").ActionableButtonValues;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { BaseKey } from "../../../contexts/data/types";
|
|
3
|
+
import type { Action } from "../../../contexts/router/types";
|
|
4
|
+
import type { CanReturnType } from "../../../contexts/accessControl/types";
|
|
5
|
+
export type NavigationButtonProps = {
|
|
6
|
+
action: Action;
|
|
7
|
+
id?: BaseKey;
|
|
8
|
+
resource?: string;
|
|
9
|
+
meta?: Record<string, unknown>;
|
|
10
|
+
accessControl?: {
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
hideIfUnauthorized?: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type NavigationButtonValues = {
|
|
16
|
+
to: string;
|
|
17
|
+
label: string;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
title: string;
|
|
20
|
+
hidden: boolean;
|
|
21
|
+
canAccess: CanReturnType | undefined;
|
|
22
|
+
LinkComponent: React.ComponentType<React.PropsWithChildren<{
|
|
23
|
+
[prop: string]: any;
|
|
24
|
+
to: string;
|
|
25
|
+
}>>;
|
|
26
|
+
};
|
|
27
|
+
export declare function useNavigationButton(props: NavigationButtonProps): NavigationButtonValues;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { BaseKey } from "../../../contexts/data/types";
|
|
2
|
+
export type RefreshButtonProps = {
|
|
3
|
+
resource?: string;
|
|
4
|
+
id?: BaseKey;
|
|
5
|
+
dataProviderName?: string;
|
|
6
|
+
meta?: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
export type RefreshButtonValues = {
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
label: string;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function useRefreshButton(props: RefreshButtonProps): RefreshButtonValues;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { useList } from "./useList";
|
|
2
|
-
export { useOne } from "./useOne";
|
|
3
|
-
export { useMany } from "./useMany";
|
|
4
|
-
export { useUpdate } from "./useUpdate";
|
|
5
|
-
export { useCreate, UseCreateReturnType } from "./useCreate";
|
|
6
|
-
export { useDelete } from "./useDelete";
|
|
7
|
-
export { useCreateMany, UseCreateManyReturnType } from "./useCreateMany";
|
|
8
|
-
export { useUpdateMany } from "./useUpdateMany";
|
|
9
|
-
export { useDeleteMany } from "./useDeleteMany";
|
|
1
|
+
export { useList, UseListProps } from "./useList";
|
|
2
|
+
export { useOne, UseOneProps } from "./useOne";
|
|
3
|
+
export { useMany, UseManyProps } from "./useMany";
|
|
4
|
+
export { useUpdate, UseUpdateProps, UseUpdateReturnType } from "./useUpdate";
|
|
5
|
+
export { useCreate, UseCreateProps, UseCreateReturnType } from "./useCreate";
|
|
6
|
+
export { useDelete, UseDeleteProps, UseDeleteReturnType } from "./useDelete";
|
|
7
|
+
export { useCreateMany, UseCreateManyProps, UseCreateManyReturnType, } from "./useCreateMany";
|
|
8
|
+
export { useUpdateMany, UseUpdateManyProps, UseUpdateManyReturnType, } from "./useUpdateMany";
|
|
9
|
+
export { useDeleteMany, UseDeleteManyProps, UseDeleteManyReturnType, } from "./useDeleteMany";
|
|
10
10
|
export { useApiUrl } from "./useApiUrl";
|
|
11
|
-
export { useCustom } from "./useCustom";
|
|
12
|
-
export { useCustomMutation } from "./useCustomMutation";
|
|
11
|
+
export { useCustom, UseCustomProps } from "./useCustom";
|
|
12
|
+
export { useCustomMutation, UseCustomMutationProps, UseCustomMutationReturnType, } from "./useCustomMutation";
|
|
13
13
|
export { useDataProvider } from "./useDataProvider";
|
|
14
|
-
export { useInfiniteList } from "./useInfiniteList";
|
|
14
|
+
export { useInfiniteList, UseInfiniteListProps } from "./useInfiniteList";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { useList } from "./useList";
|
|
2
|
-
export { useOne } from "./useOne";
|
|
3
|
-
export { useMany } from "./useMany";
|
|
4
|
-
export { useUpdate } from "./useUpdate";
|
|
5
|
-
export { useCreate, UseCreateReturnType } from "./useCreate";
|
|
6
|
-
export { useDelete } from "./useDelete";
|
|
7
|
-
export { useCreateMany, UseCreateManyReturnType } from "./useCreateMany";
|
|
8
|
-
export { useUpdateMany } from "./useUpdateMany";
|
|
9
|
-
export { useDeleteMany } from "./useDeleteMany";
|
|
1
|
+
export { useList, UseListProps } from "./useList";
|
|
2
|
+
export { useOne, UseOneProps } from "./useOne";
|
|
3
|
+
export { useMany, UseManyProps } from "./useMany";
|
|
4
|
+
export { useUpdate, UseUpdateProps, UseUpdateReturnType } from "./useUpdate";
|
|
5
|
+
export { useCreate, UseCreateProps, UseCreateReturnType } from "./useCreate";
|
|
6
|
+
export { useDelete, UseDeleteProps, UseDeleteReturnType } from "./useDelete";
|
|
7
|
+
export { useCreateMany, UseCreateManyProps, UseCreateManyReturnType, } from "./useCreateMany";
|
|
8
|
+
export { useUpdateMany, UseUpdateManyProps, UseUpdateManyReturnType, } from "./useUpdateMany";
|
|
9
|
+
export { useDeleteMany, UseDeleteManyProps, UseDeleteManyReturnType, } from "./useDeleteMany";
|
|
10
10
|
export { useApiUrl } from "./useApiUrl";
|
|
11
|
-
export { useCustom } from "./useCustom";
|
|
12
|
-
export { useCustomMutation } from "./useCustomMutation";
|
|
11
|
+
export { useCustom, UseCustomProps } from "./useCustom";
|
|
12
|
+
export { useCustomMutation, UseCustomMutationProps, UseCustomMutationReturnType, } from "./useCustomMutation";
|
|
13
13
|
export { useDataProvider } from "./useDataProvider";
|
|
14
|
-
export { useInfiniteList } from "./useInfiniteList";
|
|
14
|
+
export { useInfiniteList, UseInfiniteListProps } from "./useInfiniteList";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
{
|
|
1
|
+
export { useList, UseListProps } from "./useList";
|
|
2
|
+
export { useOne, UseOneProps } from "./useOne";
|
|
3
|
+
export { useMany, UseManyProps } from "./useMany";
|
|
4
|
+
export { useUpdate, UseUpdateProps, UseUpdateReturnType } from "./useUpdate";
|
|
5
|
+
export { useCreate, UseCreateProps, UseCreateReturnType } from "./useCreate";
|
|
6
|
+
export { useDelete, UseDeleteProps, UseDeleteReturnType } from "./useDelete";
|
|
7
|
+
export { useCreateMany, UseCreateManyProps, UseCreateManyReturnType, } from "./useCreateMany";
|
|
8
|
+
export { useUpdateMany, UseUpdateManyProps, UseUpdateManyReturnType, } from "./useUpdateMany";
|
|
9
|
+
export { useDeleteMany, UseDeleteManyProps, UseDeleteManyReturnType, } from "./useDeleteMany";
|
|
10
|
+
export { useApiUrl } from "./useApiUrl";
|
|
11
|
+
export { useCustom, UseCustomProps } from "./useCustom";
|
|
12
|
+
export { useCustomMutation, UseCustomMutationProps, UseCustomMutationReturnType, } from "./useCustomMutation";
|
|
13
|
+
export { useDataProvider } from "./useDataProvider";
|
|
14
|
+
export { useInfiniteList, UseInfiniteListProps } from "./useInfiniteList";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { useList } from "./useList";
|
|
2
|
-
export { useOne } from "./useOne";
|
|
3
|
-
export { useMany } from "./useMany";
|
|
4
|
-
export { useUpdate } from "./useUpdate";
|
|
5
|
-
export { useCreate, UseCreateReturnType } from "./useCreate";
|
|
6
|
-
export { useDelete } from "./useDelete";
|
|
7
|
-
export { useCreateMany, UseCreateManyReturnType } from "./useCreateMany";
|
|
8
|
-
export { useUpdateMany } from "./useUpdateMany";
|
|
9
|
-
export { useDeleteMany } from "./useDeleteMany";
|
|
1
|
+
export { useList, UseListProps } from "./useList";
|
|
2
|
+
export { useOne, UseOneProps } from "./useOne";
|
|
3
|
+
export { useMany, UseManyProps } from "./useMany";
|
|
4
|
+
export { useUpdate, UseUpdateProps, UseUpdateReturnType } from "./useUpdate";
|
|
5
|
+
export { useCreate, UseCreateProps, UseCreateReturnType } from "./useCreate";
|
|
6
|
+
export { useDelete, UseDeleteProps, UseDeleteReturnType } from "./useDelete";
|
|
7
|
+
export { useCreateMany, UseCreateManyProps, UseCreateManyReturnType, } from "./useCreateMany";
|
|
8
|
+
export { useUpdateMany, UseUpdateManyProps, UseUpdateManyReturnType, } from "./useUpdateMany";
|
|
9
|
+
export { useDeleteMany, UseDeleteManyProps, UseDeleteManyReturnType, } from "./useDeleteMany";
|
|
10
10
|
export { useApiUrl } from "./useApiUrl";
|
|
11
|
-
export { useCustom } from "./useCustom";
|
|
12
|
-
export { useCustomMutation } from "./useCustomMutation";
|
|
11
|
+
export { useCustom, UseCustomProps } from "./useCustom";
|
|
12
|
+
export { useCustomMutation, UseCustomMutationProps, UseCustomMutationReturnType, } from "./useCustomMutation";
|
|
13
13
|
export { useDataProvider } from "./useDataProvider";
|
|
14
|
-
export { useInfiniteList } from "./useInfiniteList";
|
|
14
|
+
export { useInfiniteList, UseInfiniteListProps } from "./useInfiniteList";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const useApiUrl: (dataProviderName?: string) => string;
|
|
2
|
+
//# sourceMappingURL=useApiUrl.d.ts.map
|
|
@@ -1 +1,49 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { BaseRecord, CreateResponse, HttpError, IQueryKeys, MetaQuery } from "../../contexts/data/types";
|
|
3
|
+
import type { SuccessErrorNotification } from "../../contexts/notification/types";
|
|
4
|
+
import { type UseLoadingOvertimeOptionsProps, type UseLoadingOvertimeReturnType } from "../useLoadingOvertime";
|
|
5
|
+
export type UseCreateParams<TData, TError, TVariables> = {
|
|
6
|
+
/**
|
|
7
|
+
* Resource name for API data interactions
|
|
8
|
+
*/
|
|
9
|
+
resource: string;
|
|
10
|
+
/**
|
|
11
|
+
* Values for mutation function
|
|
12
|
+
*/
|
|
13
|
+
values: TVariables;
|
|
14
|
+
/**
|
|
15
|
+
* Meta data for `dataProvider`
|
|
16
|
+
*/
|
|
17
|
+
meta?: MetaQuery;
|
|
18
|
+
/**
|
|
19
|
+
* Meta data for `dataProvider`
|
|
20
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
21
|
+
*/
|
|
22
|
+
metaData?: MetaQuery;
|
|
23
|
+
/**
|
|
24
|
+
* If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use.
|
|
25
|
+
*/
|
|
26
|
+
dataProviderName?: string;
|
|
27
|
+
/**
|
|
28
|
+
* You can use it to manage the invalidations that will occur at the end of the mutation.
|
|
29
|
+
*/
|
|
30
|
+
invalidates?: Array<keyof IQueryKeys>;
|
|
31
|
+
} & SuccessErrorNotification<CreateResponse<TData>, TError, TVariables>;
|
|
32
|
+
export type UseCreateReturnType<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = UseMutationResult<CreateResponse<TData>, TError, UseCreateParams<TData, TError, TVariables>, unknown>;
|
|
33
|
+
export type UseCreateProps<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = {
|
|
34
|
+
mutationOptions?: Omit<UseMutationOptions<CreateResponse<TData>, TError, UseCreateParams<TData, TError, TVariables>, unknown>, "mutationFn" | "onError" | "onSuccess">;
|
|
35
|
+
} & UseLoadingOvertimeOptionsProps;
|
|
36
|
+
/**
|
|
37
|
+
* `useCreate` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/reference/useMutation `useMutation`} for create mutations.
|
|
38
|
+
*
|
|
39
|
+
* It uses `create` method as mutation function from the `dataProvider` which is passed to `<Refine>`.
|
|
40
|
+
*
|
|
41
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/data/useCreate} for more details.
|
|
42
|
+
*
|
|
43
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
|
44
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`}
|
|
45
|
+
* @typeParam TVariables - Values for mutation function
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
export declare const useCreate: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}>({ mutationOptions, overtimeOptions, }?: UseCreateProps<TData, TError, TVariables>) => UseCreateReturnType<TData, TError, TVariables> & UseLoadingOvertimeReturnType;
|
|
49
|
+
//# sourceMappingURL=useCreate.d.ts.map
|
|
@@ -1 +1,31 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type UseMutationOptions, type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { BaseRecord, CreateManyResponse, HttpError, IQueryKeys, MetaQuery } from "../../contexts/data/types";
|
|
3
|
+
import type { SuccessErrorNotification } from "../../contexts/notification/types";
|
|
4
|
+
import { type UseLoadingOvertimeOptionsProps, type UseLoadingOvertimeReturnType } from "../useLoadingOvertime";
|
|
5
|
+
type useCreateManyParams<TData, TError, TVariables> = {
|
|
6
|
+
resource: string;
|
|
7
|
+
values: TVariables[];
|
|
8
|
+
meta?: MetaQuery;
|
|
9
|
+
metaData?: MetaQuery;
|
|
10
|
+
dataProviderName?: string;
|
|
11
|
+
invalidates?: Array<keyof IQueryKeys>;
|
|
12
|
+
} & SuccessErrorNotification<CreateManyResponse<TData>, TError, TVariables[]>;
|
|
13
|
+
export type UseCreateManyReturnType<TData extends BaseRecord = BaseRecord, TError = HttpError, TVariables = {}> = UseMutationResult<CreateManyResponse<TData>, TError, useCreateManyParams<TData, TError, TVariables>, unknown>;
|
|
14
|
+
export type UseCreateManyProps<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}> = {
|
|
15
|
+
mutationOptions?: Omit<UseMutationOptions<CreateManyResponse<TData>, TError, useCreateManyParams<TData, TError, TVariables>>, "mutationFn" | "onError" | "onSuccess">;
|
|
16
|
+
} & UseLoadingOvertimeOptionsProps;
|
|
17
|
+
/**
|
|
18
|
+
* `useCreateMany` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/reference/useMutation `useMutation`} for multiple create mutations.
|
|
19
|
+
*
|
|
20
|
+
* It uses `createMany` method as mutation function from the `dataProvider` which is passed to `<Refine>`.
|
|
21
|
+
*
|
|
22
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/data/useCreateMany} for more details.
|
|
23
|
+
*
|
|
24
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/core/interfaceReferences#baserecord `BaseRecord`}
|
|
25
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/core/interfaceReferences#httperror `HttpError`}
|
|
26
|
+
* @typeParam TVariables - Values for mutation function
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare const useCreateMany: <TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}>({ mutationOptions, overtimeOptions, }?: UseCreateManyProps<TData, TError, TVariables>) => UseCreateManyReturnType<TData, TError, TVariables> & UseLoadingOvertimeReturnType;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=useCreateMany.d.ts.map
|
|
@@ -1 +1,63 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type QueryObserverResult, type UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import type { BaseRecord, CrudFilter, CrudSort, CustomResponse, HttpError, MetaQuery, Prettify } from "../../contexts/data/types";
|
|
3
|
+
import type { SuccessErrorNotification } from "../../contexts/notification/types";
|
|
4
|
+
import { type UseLoadingOvertimeOptionsProps, type UseLoadingOvertimeReturnType } from "../useLoadingOvertime";
|
|
5
|
+
interface UseCustomConfig<TQuery, TPayload> {
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated `sort` is deprecated, use `sorters` instead.
|
|
8
|
+
*/
|
|
9
|
+
sort?: CrudSort[];
|
|
10
|
+
sorters?: CrudSort[];
|
|
11
|
+
filters?: CrudFilter[];
|
|
12
|
+
query?: TQuery;
|
|
13
|
+
payload?: TPayload;
|
|
14
|
+
headers?: {};
|
|
15
|
+
}
|
|
16
|
+
export type UseCustomProps<TQueryFnData, TError, TQuery, TPayload, TData> = {
|
|
17
|
+
/**
|
|
18
|
+
* request's URL
|
|
19
|
+
*/
|
|
20
|
+
url: string;
|
|
21
|
+
/**
|
|
22
|
+
* request's method (`GET`, `POST`, etc.)
|
|
23
|
+
*/
|
|
24
|
+
method: "get" | "delete" | "head" | "options" | "post" | "put" | "patch";
|
|
25
|
+
/**
|
|
26
|
+
* The config of your request. You can send headers, payload, query, filters and sorters using this field
|
|
27
|
+
*/
|
|
28
|
+
config?: UseCustomConfig<TQuery, TPayload>;
|
|
29
|
+
/**
|
|
30
|
+
* react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options"
|
|
31
|
+
*/
|
|
32
|
+
queryOptions?: UseQueryOptions<CustomResponse<TQueryFnData>, TError, CustomResponse<TData>>;
|
|
33
|
+
/**
|
|
34
|
+
* meta data for `dataProvider`
|
|
35
|
+
*/
|
|
36
|
+
meta?: MetaQuery;
|
|
37
|
+
/**
|
|
38
|
+
* meta data for `dataProvider`
|
|
39
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
40
|
+
*/
|
|
41
|
+
metaData?: MetaQuery;
|
|
42
|
+
/**
|
|
43
|
+
* If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use.
|
|
44
|
+
*/
|
|
45
|
+
dataProviderName?: string;
|
|
46
|
+
} & SuccessErrorNotification<CustomResponse<TData>, TError, Prettify<UseCustomConfig<TQuery, TPayload> & MetaQuery>> & UseLoadingOvertimeOptionsProps;
|
|
47
|
+
/**
|
|
48
|
+
* `useCustom` is a modified version of `react-query`'s {@link https://react-query.tanstack.com/guides/queries `useQuery`} used for custom requests.
|
|
49
|
+
*
|
|
50
|
+
* It uses the `custom` method from the `dataProvider` which is passed to `<Refine>`.
|
|
51
|
+
*
|
|
52
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/data/useCustom} for more details.
|
|
53
|
+
*
|
|
54
|
+
* @typeParam TQueryFnData - Result data returned by the query function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
|
55
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`}
|
|
56
|
+
* @typeParam TQuery - Values for query params
|
|
57
|
+
* @typeParam TPayload - Values for params
|
|
58
|
+
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export declare const useCustom: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TQuery = unknown, TPayload = unknown, TData extends BaseRecord = TQueryFnData>({ url, method, config, queryOptions, successNotification, errorNotification, meta, metaData, dataProviderName, overtimeOptions, }: UseCustomProps<TQueryFnData, TError, TQuery, TPayload, TData>) => QueryObserverResult<CustomResponse<TData>, TError> & UseLoadingOvertimeReturnType;
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=useCustom.d.ts.map
|