@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,33 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { BaseKey } from "../../../contexts/data/types";
|
|
2
|
+
import type { IResourceItem } from "../../../contexts/resource/types";
|
|
3
|
+
import type { Action, GoConfig as GoConfigBase } from "../../../contexts/router/types";
|
|
4
|
+
type ResourceWithoutId = {
|
|
5
|
+
/**
|
|
6
|
+
* The name or identifier of the resource.
|
|
7
|
+
*/
|
|
8
|
+
resource: string;
|
|
9
|
+
action: Extract<Action, "create" | "list">;
|
|
10
|
+
id?: never;
|
|
11
|
+
meta?: Record<string, unknown>;
|
|
12
|
+
};
|
|
13
|
+
type ResourceWithId = {
|
|
14
|
+
/**
|
|
15
|
+
* The name or identifier of the resource.
|
|
16
|
+
*/
|
|
17
|
+
resource: string;
|
|
18
|
+
action: Extract<Action, "edit" | "show" | "clone">;
|
|
19
|
+
id: BaseKey;
|
|
20
|
+
meta?: Record<string, unknown>;
|
|
21
|
+
};
|
|
22
|
+
export type Resource = ResourceWithoutId | ResourceWithId;
|
|
23
|
+
export type GoConfigWithResource = Omit<GoConfigBase, "to"> & {
|
|
24
|
+
to?: GoConfigBase["to"] | Resource;
|
|
25
|
+
};
|
|
26
|
+
export declare const useGo: () => (config: GoConfigWithResource | GoConfigBase) => string | void;
|
|
27
|
+
/**
|
|
28
|
+
* handle errors for resource
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare const handleResourceErrors: (to: Resource, resource: IResourceItem) => void;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const useLink: () => React.ComponentType<React.PropsWithChildren<{
|
|
3
|
+
[prop: string]: any;
|
|
4
|
+
to: string;
|
|
5
|
+
}>>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { ParseResponse } from "../../../contexts/router/types";
|
|
2
|
+
type UseParseType = () => <TParams extends Record<string, any> = Record<string, any>>() => ParseResponse<TParams>;
|
|
3
|
+
export declare const useParse: UseParseType;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const useParsed: <TParams extends Record<string, any> = Record<string, any>>() => import("../../..").ParseResponse<TParams>;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { RouterProvider } from "../../../contexts/router/types";
|
|
2
|
+
export declare const useRouterMisuseWarning: (value?: RouterProvider) => void;
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { IResourceItem } from "../../../contexts/resource/types";
|
|
2
|
+
import type { Action } from "../../../contexts/router/types";
|
|
3
|
+
type UseToPathParams = {
|
|
4
|
+
resource?: IResourceItem;
|
|
5
|
+
action: Action;
|
|
6
|
+
meta?: Record<string, unknown>;
|
|
7
|
+
legacy?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Returns the route for a given action and resource.
|
|
11
|
+
* If resource is not provided, it will use the resource from the route.
|
|
12
|
+
* If the resource is not found, it will return undefined.
|
|
13
|
+
* If the action is not found, it will return undefined.
|
|
14
|
+
* `meta` can be provided to compose the routes with parameters. (Can be used for nested routes.)
|
|
15
|
+
*/
|
|
16
|
+
export declare const useToPath: ({ resource, action, meta, legacy, }: UseToPathParams) => string | undefined;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
{
|
|
1
|
+
import type { UseShowProps, UseShowReturnType } from "./types";
|
|
2
|
+
import type { BaseRecord, HttpError } from "../../contexts/data/types";
|
|
3
|
+
export type { UseShowProps, UseShowReturnType, useShowProps, useShowReturnType, } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* `useShow` hook allows you to fetch the desired record.
|
|
6
|
+
* It uses `getOne` method as query function from the dataProvider that is
|
|
7
|
+
* passed to {@link https://refine.dev/docs/core/refine-component `<Refine>`}.
|
|
8
|
+
*
|
|
9
|
+
* @see {@link https://refine.dev/docs/data/hooks/use-show} for more details.
|
|
10
|
+
*
|
|
11
|
+
* @typeParam TQueryFnData - Result data returned by the query function. Extends {@link https://refine.dev/docs/core/interface-references/#baserecord `BaseRecord`}
|
|
12
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/core/interface-references/#httperror `HttpError`}
|
|
13
|
+
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/core/interface-references/#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export declare const useShow: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData>({ resource: resourceFromProp, id, meta, metaData, queryOptions, overtimeOptions, ...useOneProps }?: UseShowProps<TQueryFnData, TError, TData>) => UseShowReturnType<TData, TError>;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query";
|
|
3
|
+
import type { UseLoadingOvertimeOptionsProps, UseLoadingOvertimeReturnType } from "../useLoadingOvertime";
|
|
4
|
+
import type { BaseKey, BaseRecord, GetOneResponse, HttpError, MetaQuery, Prettify } from "../../contexts/data/types";
|
|
5
|
+
import type { LiveModeProps } from "../../contexts/live/types";
|
|
6
|
+
import type { SuccessErrorNotification } from "../../contexts/notification/types";
|
|
7
|
+
export type UseShowReturnType<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError> = {
|
|
8
|
+
queryResult: QueryObserverResult<GetOneResponse<TData>, TError>;
|
|
9
|
+
showId?: BaseKey;
|
|
10
|
+
setShowId: React.Dispatch<React.SetStateAction<BaseKey | undefined>>;
|
|
11
|
+
} & UseLoadingOvertimeReturnType;
|
|
12
|
+
export type UseShowProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData> = {
|
|
13
|
+
/**
|
|
14
|
+
* Resource name for API data interactions
|
|
15
|
+
* @default Reads `:resource` from the URL
|
|
16
|
+
*/
|
|
17
|
+
resource?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Data item ID for API data interactions
|
|
20
|
+
* @default Reads `:id` from the URL
|
|
21
|
+
*/
|
|
22
|
+
id?: BaseKey;
|
|
23
|
+
/**
|
|
24
|
+
* react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options
|
|
25
|
+
*/
|
|
26
|
+
queryOptions?: UseQueryOptions<GetOneResponse<TQueryFnData>, TError, GetOneResponse<TData>>;
|
|
27
|
+
/**
|
|
28
|
+
* Additional meta data to pass to the data provider's `getOne`
|
|
29
|
+
*/
|
|
30
|
+
meta?: MetaQuery;
|
|
31
|
+
/**
|
|
32
|
+
* Additional meta data to pass to the data provider's `getOne`
|
|
33
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
34
|
+
*/
|
|
35
|
+
metaData?: MetaQuery;
|
|
36
|
+
/**
|
|
37
|
+
* Target data provider name for API call to be made
|
|
38
|
+
* @default `"default"`
|
|
39
|
+
*/
|
|
40
|
+
dataProviderName?: string;
|
|
41
|
+
} & LiveModeProps & SuccessErrorNotification<GetOneResponse<TData>, TError, Prettify<{
|
|
42
|
+
id?: BaseKey;
|
|
43
|
+
} & MetaQuery>> & UseLoadingOvertimeOptionsProps;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated use `UseShowReturnType` instead
|
|
46
|
+
*/
|
|
47
|
+
export type useShowReturnType<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError> = UseShowReturnType<TData, TError>;
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated use `UseShowProps` instead
|
|
50
|
+
*/
|
|
51
|
+
export type useShowProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData> = UseShowProps<TQueryFnData, TError, TData>;
|
|
52
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query";
|
|
3
|
+
import type { BaseKey, BaseRecord, GetOneResponse, HttpError, MetaQuery, Prettify } from "../../contexts/data/types";
|
|
4
|
+
import type { LiveModeProps } from "../../contexts/live/types";
|
|
5
|
+
import type { SuccessErrorNotification } from "../../contexts/notification/types";
|
|
6
|
+
import { type UseLoadingOvertimeOptionsProps, type UseLoadingOvertimeReturnType } from "../useLoadingOvertime";
|
|
7
|
+
export type useShowReturnType<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError> = {
|
|
8
|
+
queryResult: QueryObserverResult<GetOneResponse<TData>, TError>;
|
|
9
|
+
showId?: BaseKey;
|
|
10
|
+
setShowId: React.Dispatch<React.SetStateAction<BaseKey | undefined>>;
|
|
11
|
+
} & UseLoadingOvertimeReturnType;
|
|
12
|
+
export type useShowProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData> = {
|
|
13
|
+
/**
|
|
14
|
+
* Resource name for API data interactions
|
|
15
|
+
* @default Reads `:resource` from the URL
|
|
16
|
+
*/
|
|
17
|
+
resource?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Data item ID for API data interactions
|
|
20
|
+
* @default Reads `:id` from the URL
|
|
21
|
+
*/
|
|
22
|
+
id?: BaseKey;
|
|
23
|
+
/**
|
|
24
|
+
* react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options
|
|
25
|
+
*/
|
|
26
|
+
queryOptions?: UseQueryOptions<GetOneResponse<TQueryFnData>, TError, GetOneResponse<TData>>;
|
|
27
|
+
/**
|
|
28
|
+
* Additional meta data to pass to the data provider's `getOne`
|
|
29
|
+
*/
|
|
30
|
+
meta?: MetaQuery;
|
|
31
|
+
/**
|
|
32
|
+
* Additional meta data to pass to the data provider's `getOne`
|
|
33
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
34
|
+
*/
|
|
35
|
+
metaData?: MetaQuery;
|
|
36
|
+
/**
|
|
37
|
+
* Target data provider name for API call to be made
|
|
38
|
+
* @default `"default"`
|
|
39
|
+
*/
|
|
40
|
+
dataProviderName?: string;
|
|
41
|
+
} & LiveModeProps & SuccessErrorNotification<GetOneResponse<TData>, TError, Prettify<{
|
|
42
|
+
id?: BaseKey;
|
|
43
|
+
} & MetaQuery>> & UseLoadingOvertimeOptionsProps;
|
|
44
|
+
/**
|
|
45
|
+
* `useShow` hook allows you to fetch the desired record.
|
|
46
|
+
* It uses `getOne` method as query function from the dataProvider that is
|
|
47
|
+
* passed to {@link https://refine.dev/docs/api-reference/core/components/refine-config/ `<Refine>`}.
|
|
48
|
+
*
|
|
49
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/show/useShow} for more details.
|
|
50
|
+
*
|
|
51
|
+
* @typeParam TQueryFnData - Result data returned by the query function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
|
52
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`}
|
|
53
|
+
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
export declare const useShow: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData>({ resource: resourceFromProp, id, successNotification, errorNotification, meta, metaData, liveMode, onLiveEvent, dataProviderName, queryOptions, overtimeOptions, }?: useShowProps<TQueryFnData, TError, TData>) => useShowReturnType<TData, TError>;
|
|
57
|
+
//# sourceMappingURL=useShow.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const useRefineOptions: () => import("../..").IRefineContextOptions;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { BaseKey } from "../../contexts/data/types";
|
|
3
|
+
import type { IResourceItem } from "../../contexts/resource/types";
|
|
4
|
+
import type { Action } from "../../contexts/router/types";
|
|
5
|
+
import type { FormAction } from "../form/types";
|
|
6
|
+
type Props = {
|
|
7
|
+
id?: BaseKey;
|
|
8
|
+
resource?: string;
|
|
9
|
+
action?: Action;
|
|
10
|
+
};
|
|
11
|
+
type ResourceParams = {
|
|
12
|
+
id?: BaseKey;
|
|
13
|
+
setId: React.Dispatch<React.SetStateAction<BaseKey | undefined>>;
|
|
14
|
+
resource?: IResourceItem;
|
|
15
|
+
action?: Action;
|
|
16
|
+
identifier?: string;
|
|
17
|
+
formAction: FormAction;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Interactions in Refine has 3 main parameters: resource, action and id.
|
|
21
|
+
*
|
|
22
|
+
* This hook is used to manage these parameters based on below conditions and outputs the final parameters.
|
|
23
|
+
*
|
|
24
|
+
* `resource`: The resource to be used. (either the identifier or the name of the resource)
|
|
25
|
+
* - If a `resource` is provided, it will be used (even if it's not defined in the <Refine/> component)
|
|
26
|
+
* - If a `resource` is not provided, it will be inferred from the route.
|
|
27
|
+
* `id`: The `id` of the record to be used.
|
|
28
|
+
* - If an `id` is provided, it will be used.
|
|
29
|
+
* - If an `id` is not provided, it will either be inferred from the route or will be `undefined`.
|
|
30
|
+
* -- If a custom resource is provided and it's different from the inferred resource, the id will be undefined.
|
|
31
|
+
* -- If a custom resource is provided and it's same as the inferred resource, the id will be inferred from the route.
|
|
32
|
+
* -- If a custom resource is not provided, the id will be inferred from the route.
|
|
33
|
+
* `action`: The action to be used.
|
|
34
|
+
* - If an `action` is provided, it will be used.
|
|
35
|
+
* - If an `action` is not provided, it will be inferred from the route.
|
|
36
|
+
* `formAction`: The action to be used in the form.
|
|
37
|
+
* - `formAction` can only be "edit", "clone" or "create".
|
|
38
|
+
* - If action is "edit" or "clone", `formAction` will be the same as action.
|
|
39
|
+
* - Same as `id`, if passed resource is different from inferred resource, `formAction` will fallback to "create" and ignore the action from the route.
|
|
40
|
+
*/
|
|
41
|
+
export declare function useResourceParams(props?: Props): ResourceParams;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { Action } from "../../../contexts/router/types";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the action from the router regardless of the router type.
|
|
4
|
+
* In legacy routers, `useParsed` won't work and in the new router bindings, `useParams` won't work.
|
|
5
|
+
* To make it easier to get the action from the router, this hook can be used.
|
|
6
|
+
*
|
|
7
|
+
* Additionally, if an action is provided as a parameter, it will be used instead of the inferred action.
|
|
8
|
+
*
|
|
9
|
+
* @internal usage only
|
|
10
|
+
*/
|
|
11
|
+
export declare const useAction: (action?: Action) => Action | undefined;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { BaseKey } from "../../../contexts/data/types";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the id from the router regardless of the router type.
|
|
4
|
+
* In legacy routers, `useParsed` won't work and in the new router bindings, `useParams` won't work.
|
|
5
|
+
* To make it easier to get the id from the router, this hook can be used.
|
|
6
|
+
*
|
|
7
|
+
* Additionally, if an id is provided as a parameter, it will be used instead of the inferred id.
|
|
8
|
+
*
|
|
9
|
+
* @internal usage only
|
|
10
|
+
*/
|
|
11
|
+
export declare const useId: (id?: BaseKey) => BaseKey | undefined;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const useKeys: () => {
|
|
2
|
+
keys: () => import("@definitions/index").KeyBuilder;
|
|
3
|
+
preferLegacyKeys: boolean;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
export type UseLoadingOvertimeRefineContext = Omit<UseLoadingOvertimeCoreProps, "isLoading" | "interval"> & Required<Pick<UseLoadingOvertimeCoreProps, "interval">>;
|
|
2
|
+
export type UseLoadingOvertimeOptionsProps = {
|
|
3
|
+
overtimeOptions?: UseLoadingOvertimeCoreOptions;
|
|
4
|
+
};
|
|
5
|
+
export type UseLoadingOvertimeReturnType = {
|
|
6
|
+
overtime: {
|
|
7
|
+
elapsedTime?: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type UseLoadingOvertimeCoreOptions = Omit<UseLoadingOvertimeCoreProps, "isLoading">;
|
|
11
|
+
type UseLoadingOvertimeCoreReturnType = {
|
|
12
|
+
elapsedTime?: number;
|
|
13
|
+
};
|
|
14
|
+
export type UseLoadingOvertimeCoreProps = {
|
|
15
|
+
/**
|
|
16
|
+
* The loading state. If true, the elapsed time will be calculated.
|
|
17
|
+
*/
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The interval in milliseconds. If the loading time exceeds this time, the `onInterval` callback will be called.
|
|
21
|
+
* If not specified, the `interval` value from the `overtime` option of the `RefineProvider` will be used.
|
|
22
|
+
*
|
|
23
|
+
* @default: 1000 (1 second)
|
|
24
|
+
*/
|
|
25
|
+
interval?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The callback function that will be called when the loading time exceeds the specified time.
|
|
28
|
+
* If not specified, the `onInterval` value from the `overtime` option of the `RefineProvider` will be used.
|
|
29
|
+
*
|
|
30
|
+
* @param elapsedInterval The elapsed time in milliseconds.
|
|
31
|
+
*/
|
|
32
|
+
onInterval?: (elapsedInterval: number) => void;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* if you need to do something when the loading time exceeds the specified time, refine provides the `useLoadingOvertime` hook.
|
|
36
|
+
* It returns the elapsed time in milliseconds.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* const { elapsedTime } = useLoadingOvertime({
|
|
40
|
+
* isLoading,
|
|
41
|
+
* interval: 1000,
|
|
42
|
+
* onInterval(elapsedInterval) {
|
|
43
|
+
* console.log("loading overtime", elapsedInterval);
|
|
44
|
+
* },
|
|
45
|
+
* });
|
|
46
|
+
*/
|
|
47
|
+
export declare const useLoadingOvertime: ({ isLoading, interval: intervalProp, onInterval: onIntervalProp, }: UseLoadingOvertimeCoreProps) => UseLoadingOvertimeCoreReturnType;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { MetaQuery } from "../../contexts/data/types";
|
|
2
|
+
import type { IResourceItem } from "../../contexts/resource/types";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that returns a function to get meta.
|
|
5
|
+
* The meta is a combination of the resource meta, hook meta and query params.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const useMeta: () => ({ resource, meta: metaFromProp, }?: {
|
|
9
|
+
resource?: IResourceItem;
|
|
10
|
+
meta?: MetaQuery;
|
|
11
|
+
}) => {
|
|
12
|
+
queryContext?: Omit<import("@tanstack/query-core").QueryFunctionContext<import("@tanstack/query-core").QueryKey, any>, "meta"> | undefined;
|
|
13
|
+
operation?: string | undefined;
|
|
14
|
+
fields?: import("../../contexts/data/types").Fields | undefined;
|
|
15
|
+
variables?: import("../../contexts/data/types").VariableOptions | undefined;
|
|
16
|
+
gqlQuery?: import("graphql").DocumentNode | undefined;
|
|
17
|
+
gqlMutation?: import("graphql").DocumentNode | undefined;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -4,6 +4,7 @@ import type { LiveModeProps } from "../../contexts/live/types";
|
|
|
4
4
|
import type { SuccessErrorNotification } from "../../contexts/notification/types";
|
|
5
5
|
import type { BaseListProps } from "../data/useList";
|
|
6
6
|
import { type UseLoadingOvertimeOptionsProps, type UseLoadingOvertimeReturnType } from "../useLoadingOvertime";
|
|
7
|
+
export type SelectedOptionsOrder = "in-place" | "selected-first";
|
|
7
8
|
export type UseSelectProps<TQueryFnData, TError, TData> = {
|
|
8
9
|
/**
|
|
9
10
|
* Resource name for API data interactions
|
|
@@ -50,6 +51,11 @@ export type UseSelectProps<TQueryFnData, TError, TData> = {
|
|
|
50
51
|
* Adds extra `options`
|
|
51
52
|
*/
|
|
52
53
|
defaultValue?: BaseKey | BaseKey[];
|
|
54
|
+
/**
|
|
55
|
+
* Allow us to sort the selection options
|
|
56
|
+
* @default `in-place`
|
|
57
|
+
*/
|
|
58
|
+
selectedOptionsOrder?: SelectedOptionsOrder;
|
|
53
59
|
/**
|
|
54
60
|
* The number of milliseconds to delay
|
|
55
61
|
* @default `300`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSelect/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,EACR,eAAe,EACf,eAAe,EACf,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACT,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EAElC,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI;IACxD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,KAAK,SAAS,MAAM,GACpC,MAAM,KAAK,GACX,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC,CAAC;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,KAAK,SAAS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|
4
4
|
import type { SuccessErrorNotification } from "../../contexts/notification/types";
|
|
5
5
|
import type { BaseListProps } from "../data/useList";
|
|
6
6
|
import { type UseLoadingOvertimeOptionsProps, type UseLoadingOvertimeReturnType } from "../useLoadingOvertime";
|
|
7
|
+
export type SelectedOptionsOrder = "in-place" | "selected-first";
|
|
7
8
|
export type UseSelectProps<TQueryFnData, TError, TData> = {
|
|
8
9
|
/**
|
|
9
10
|
* Resource name for API data interactions
|
|
@@ -50,6 +51,11 @@ export type UseSelectProps<TQueryFnData, TError, TData> = {
|
|
|
50
51
|
* Adds extra `options`
|
|
51
52
|
*/
|
|
52
53
|
defaultValue?: BaseKey | BaseKey[];
|
|
54
|
+
/**
|
|
55
|
+
* Allow us to sort the selection options
|
|
56
|
+
* @default `in-place`
|
|
57
|
+
*/
|
|
58
|
+
selectedOptionsOrder?: SelectedOptionsOrder;
|
|
53
59
|
/**
|
|
54
60
|
* The number of milliseconds to delay
|
|
55
61
|
* @default `300`
|
|
@@ -1 +1,137 @@
|
|
|
1
|
-
{
|
|
1
|
+
import type { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import type { BaseKey, BaseOption, BaseRecord, CrudFilter, CrudSort, GetListResponse, GetManyResponse, HttpError, MetaQuery, Pagination, Prettify } from "../../contexts/data/types";
|
|
3
|
+
import type { LiveModeProps } from "../../contexts/live/types";
|
|
4
|
+
import type { SuccessErrorNotification } from "../../contexts/notification/types";
|
|
5
|
+
import type { BaseListProps } from "../data/useList";
|
|
6
|
+
import { type UseLoadingOvertimeOptionsProps, type UseLoadingOvertimeReturnType } from "../useLoadingOvertime";
|
|
7
|
+
export type SelectedOptionsOrder = "in-place" | "selected-first";
|
|
8
|
+
export type UseSelectProps<TQueryFnData, TError, TData> = {
|
|
9
|
+
/**
|
|
10
|
+
* Resource name for API data interactions
|
|
11
|
+
*/
|
|
12
|
+
resource: string;
|
|
13
|
+
/**
|
|
14
|
+
* Set the option's label value
|
|
15
|
+
* @default `"title"`
|
|
16
|
+
*/
|
|
17
|
+
optionLabel?: keyof TData extends string ? keyof TData : never | ((item: TData) => string);
|
|
18
|
+
/**
|
|
19
|
+
* Set the option's value
|
|
20
|
+
* @default `"id"`
|
|
21
|
+
*/
|
|
22
|
+
optionValue?: keyof TData extends string ? keyof TData : never | ((item: TData) => string);
|
|
23
|
+
/**
|
|
24
|
+
* Field name to search for.
|
|
25
|
+
* @description If provided `optionLabel` is a string, uses `optionLabel`'s value.
|
|
26
|
+
* @default `"title"`
|
|
27
|
+
* @example
|
|
28
|
+
* // when optionLabel is string.
|
|
29
|
+
* useSelect({ optionLabel: "name" })
|
|
30
|
+
* // uses `name` field.
|
|
31
|
+
* @example
|
|
32
|
+
* // when optionLabel is function.
|
|
33
|
+
* useSelect({ optionLabel: (field) => field.description })
|
|
34
|
+
* // uses `title`, since `optionLabel` is a function.
|
|
35
|
+
*/
|
|
36
|
+
searchField?: keyof TData extends string ? keyof TData : never;
|
|
37
|
+
/**
|
|
38
|
+
* Allow us to sort the options
|
|
39
|
+
* @deprecated Use `sorters` instead
|
|
40
|
+
*/
|
|
41
|
+
sort?: CrudSort[];
|
|
42
|
+
/**
|
|
43
|
+
* Allow us to sort the options
|
|
44
|
+
*/
|
|
45
|
+
sorters?: CrudSort[];
|
|
46
|
+
/**
|
|
47
|
+
* Resource name for API data interactions
|
|
48
|
+
*/
|
|
49
|
+
filters?: CrudFilter[];
|
|
50
|
+
/**
|
|
51
|
+
* Adds extra `options`
|
|
52
|
+
*/
|
|
53
|
+
defaultValue?: BaseKey | BaseKey[];
|
|
54
|
+
/**
|
|
55
|
+
* Allow us to sort the selection options
|
|
56
|
+
* @default `in-place`
|
|
57
|
+
*/
|
|
58
|
+
selectedOptionsOrder?: SelectedOptionsOrder;
|
|
59
|
+
/**
|
|
60
|
+
* The number of milliseconds to delay
|
|
61
|
+
* @default `300`
|
|
62
|
+
*/
|
|
63
|
+
debounce?: number;
|
|
64
|
+
/**
|
|
65
|
+
* react-query [useQuery](https://react-query.tanstack.com/reference/useQuery) options
|
|
66
|
+
*/
|
|
67
|
+
queryOptions?: UseQueryOptions<GetListResponse<TQueryFnData>, TError, GetListResponse<TData>>;
|
|
68
|
+
/**
|
|
69
|
+
* Pagination option from [`useList()`](/docs/api-reference/core/hooks/data/useList/)
|
|
70
|
+
* @type { current?: number; pageSize?: number;}
|
|
71
|
+
* @default `undefined`
|
|
72
|
+
*/
|
|
73
|
+
pagination?: Prettify<Omit<Pagination, "mode"> & {
|
|
74
|
+
/**
|
|
75
|
+
* Whether to use server side pagination or not.
|
|
76
|
+
* @default "off"
|
|
77
|
+
*/
|
|
78
|
+
mode?: Pagination["mode"];
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Disabling pagination option from [`useList()`](/docs/api-reference/core/hooks/data/useList/)
|
|
82
|
+
* @type boolean
|
|
83
|
+
* @default `false`
|
|
84
|
+
* @deprecated `hasPagination` is deprecated, use `pagination.mode` instead.
|
|
85
|
+
*/
|
|
86
|
+
hasPagination?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* react-query [useQuery](https://react-query.tanstack.com/reference/useQuery) options
|
|
89
|
+
*/
|
|
90
|
+
defaultValueQueryOptions?: UseQueryOptions<GetManyResponse<TQueryFnData>, TError>;
|
|
91
|
+
/**
|
|
92
|
+
* If defined, this callback allows us to override all filters for every search request.
|
|
93
|
+
* @default `undefined`
|
|
94
|
+
*/
|
|
95
|
+
onSearch?: (value: string) => CrudFilter[];
|
|
96
|
+
/**
|
|
97
|
+
* Additional meta data to pass to the `useMany` from the data provider
|
|
98
|
+
*/
|
|
99
|
+
meta?: MetaQuery;
|
|
100
|
+
/**
|
|
101
|
+
* Additional meta data to pass to the `useMany` from the data provider
|
|
102
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
103
|
+
*/
|
|
104
|
+
metaData?: MetaQuery;
|
|
105
|
+
/**
|
|
106
|
+
* If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use.
|
|
107
|
+
* @default `default`
|
|
108
|
+
*/
|
|
109
|
+
dataProviderName?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Amount of records to fetch in select box list.
|
|
112
|
+
* @deprecated use [`pagination`](https://refine.dev/docs/api-reference/core/interfaceReferences/#pagination) instead
|
|
113
|
+
* @default `undefined`
|
|
114
|
+
*/
|
|
115
|
+
fetchSize?: number;
|
|
116
|
+
} & SuccessErrorNotification<GetListResponse<TData>, TError, Prettify<BaseListProps>> & LiveModeProps & UseLoadingOvertimeOptionsProps;
|
|
117
|
+
export type UseSelectReturnType<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TOption extends BaseOption = BaseOption> = {
|
|
118
|
+
queryResult: QueryObserverResult<GetListResponse<TData>, TError>;
|
|
119
|
+
defaultValueQueryResult: QueryObserverResult<GetManyResponse<TData>>;
|
|
120
|
+
onSearch: (value: string) => void;
|
|
121
|
+
options: TOption[];
|
|
122
|
+
} & UseLoadingOvertimeReturnType;
|
|
123
|
+
/**
|
|
124
|
+
* `useSelect` hook is used to fetch data from the dataProvider and return the options for the select box.
|
|
125
|
+
*
|
|
126
|
+
* It uses `getList` method as query function from the dataProvider that is
|
|
127
|
+
* passed to {@link https://refine.dev/docs/api-reference/core/components/refine-config/ `<Refine>`}.
|
|
128
|
+
*
|
|
129
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/useSelect} for more details.
|
|
130
|
+
*
|
|
131
|
+
* @typeParam TQueryFnData - Result data returned by the query function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
|
132
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`}
|
|
133
|
+
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
|
134
|
+
*
|
|
135
|
+
*/
|
|
136
|
+
export declare const useSelect: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData, TOption extends BaseOption = BaseOption>(props: UseSelectProps<TQueryFnData, TError, TData>) => UseSelectReturnType<TData, TError, TOption>;
|
|
137
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -4,6 +4,7 @@ import type { LiveModeProps } from "../../contexts/live/types";
|
|
|
4
4
|
import type { SuccessErrorNotification } from "../../contexts/notification/types";
|
|
5
5
|
import type { BaseListProps } from "../data/useList";
|
|
6
6
|
import { type UseLoadingOvertimeOptionsProps, type UseLoadingOvertimeReturnType } from "../useLoadingOvertime";
|
|
7
|
+
export type SelectedOptionsOrder = "in-place" | "selected-first";
|
|
7
8
|
export type UseSelectProps<TQueryFnData, TError, TData> = {
|
|
8
9
|
/**
|
|
9
10
|
* Resource name for API data interactions
|
|
@@ -50,6 +51,11 @@ export type UseSelectProps<TQueryFnData, TError, TData> = {
|
|
|
50
51
|
* Adds extra `options`
|
|
51
52
|
*/
|
|
52
53
|
defaultValue?: BaseKey | BaseKey[];
|
|
54
|
+
/**
|
|
55
|
+
* Allow us to sort the selection options
|
|
56
|
+
* @default `in-place`
|
|
57
|
+
*/
|
|
58
|
+
selectedOptionsOrder?: SelectedOptionsOrder;
|
|
53
59
|
/**
|
|
54
60
|
* The number of milliseconds to delay
|
|
55
61
|
* @default `300`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSelect/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,EACR,eAAe,EACf,eAAe,EACf,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACT,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,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