@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,31 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./auth";
|
|
2
|
+
export * from "./data";
|
|
3
|
+
export * from "./live";
|
|
4
|
+
export * from "./resource";
|
|
5
|
+
export * from "./notification";
|
|
6
|
+
export * from "./i18n";
|
|
7
|
+
export * from "./refine";
|
|
8
|
+
export * from "./export";
|
|
9
|
+
export * from "./form";
|
|
10
|
+
export * from "./redirection";
|
|
11
|
+
export * from "./navigation";
|
|
12
|
+
export * from "./show";
|
|
13
|
+
export * from "./import";
|
|
14
|
+
export * from "./modal";
|
|
15
|
+
export * from "./router";
|
|
16
|
+
export { useRouterType } from "../contexts/router/picker";
|
|
17
|
+
export * from "./legacy-router";
|
|
18
|
+
export * from "./accessControl";
|
|
19
|
+
export * from "./useSelect";
|
|
20
|
+
export * from "./useTable";
|
|
21
|
+
export * from "./auditLog";
|
|
22
|
+
export * from "./invalidate";
|
|
23
|
+
export * from "./breadcrumb";
|
|
24
|
+
export * from "./menu";
|
|
25
|
+
export * from "./useMeta";
|
|
26
|
+
export * from "./useLoadingOvertime";
|
|
27
|
+
export * from "./useKeys";
|
|
28
|
+
export * from "./use-refine-options";
|
|
29
|
+
export * from "./use-resource-params";
|
|
30
|
+
export * from "./button";
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
{
|
|
1
|
+
import { type InvalidateOptions, type InvalidateQueryFilters } from "@tanstack/react-query";
|
|
2
|
+
import type { BaseKey, IQueryKeys } from "../../contexts/data/types";
|
|
3
|
+
export type UseInvalidateProp = {
|
|
4
|
+
resource?: string;
|
|
5
|
+
id?: BaseKey;
|
|
6
|
+
dataProviderName?: string;
|
|
7
|
+
invalidates: Array<keyof IQueryKeys> | false;
|
|
8
|
+
invalidationFilters?: InvalidateQueryFilters;
|
|
9
|
+
invalidationOptions?: InvalidateOptions;
|
|
10
|
+
};
|
|
11
|
+
export declare const useInvalidate: () => ((props: UseInvalidateProp) => Promise<void>);
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./useRouterContext";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const useRouterContext: () => {
|
|
3
|
+
useHistory: () => any;
|
|
4
|
+
useLocation: () => any;
|
|
5
|
+
useParams: <Params extends { [K in keyof Params]?: string | undefined; } = {}>() => Params;
|
|
6
|
+
Prompt: import("react").FC<import("../..").PromptProps>;
|
|
7
|
+
Link: import("react").FC<any>;
|
|
8
|
+
routes: any;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useRouterContext.d.ts.map
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./useResourceSubscription";
|
|
2
|
+
export * from "./useLiveMode";
|
|
3
|
+
export * from "./useSubscription";
|
|
4
|
+
export * from "./usePublish";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { LiveModeProps } from "../../../contexts/live/types";
|
|
2
|
+
export declare const useLiveMode: (liveMode: LiveModeProps["liveMode"]) => LiveModeProps["liveMode"];
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { LiveProvider } from "../../../contexts/live/types";
|
|
2
|
+
export declare const usePublish: () => NonNullable<LiveProvider>["publish"];
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,43 @@
|
|
|
1
|
-
{
|
|
1
|
+
import type { BaseKey, CrudFilter, CrudSort, MetaQuery, Pagination } from "../../../contexts/data/types";
|
|
2
|
+
import type { LiveEvent, LiveModeProps } from "../../../contexts/live/types";
|
|
3
|
+
export type UseResourceSubscriptionProps = {
|
|
4
|
+
channel: string;
|
|
5
|
+
params?: {
|
|
6
|
+
ids?: BaseKey[];
|
|
7
|
+
id?: BaseKey;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated `params.meta` is depcerated. Use `meta` directly from the root level instead.
|
|
10
|
+
*/
|
|
11
|
+
meta?: MetaQuery;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
14
|
+
*/
|
|
15
|
+
metaData?: MetaQuery;
|
|
16
|
+
pagination?: Pagination;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated `hasPagination` is deprecated, use `pagination.mode` instead.
|
|
19
|
+
*/
|
|
20
|
+
hasPagination?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated `sort` is deprecated. Use `sorters` instead.
|
|
23
|
+
*/
|
|
24
|
+
sort?: CrudSort[];
|
|
25
|
+
sorters?: CrudSort[];
|
|
26
|
+
filters?: CrudFilter[];
|
|
27
|
+
subscriptionType: "useList" | "useOne" | "useMany";
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
};
|
|
30
|
+
types: LiveEvent["type"][];
|
|
31
|
+
resource?: string;
|
|
32
|
+
enabled?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated use `meta.dataProviderName` instead.
|
|
35
|
+
*/
|
|
36
|
+
dataProviderName?: string;
|
|
37
|
+
meta?: MetaQuery & {
|
|
38
|
+
dataProviderName?: string;
|
|
39
|
+
};
|
|
40
|
+
} & LiveModeProps;
|
|
41
|
+
export type PublishType = (event: LiveEvent) => void;
|
|
42
|
+
export declare const useResourceSubscription: ({ resource: resourceFromProp, params, channel, types, enabled, liveMode: liveModeFromProp, onLiveEvent, dataProviderName: dataProviderNameFromProps, meta, }: UseResourceSubscriptionProps) => void;
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,57 @@
|
|
|
1
|
-
{
|
|
1
|
+
import type { BaseKey, CrudFilter, CrudSort, MetaQuery, Pagination } from "../../../contexts/data/types";
|
|
2
|
+
import type { LiveEvent } from "../../../contexts/live/types";
|
|
3
|
+
export type UseSubscriptionProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Channel name to subscribe.
|
|
6
|
+
*/
|
|
7
|
+
channel: string;
|
|
8
|
+
/**
|
|
9
|
+
* Callback that is run when new events from subscription arrive.
|
|
10
|
+
*/
|
|
11
|
+
onLiveEvent: (event: LiveEvent) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Type of events to subscribe. `"*"` means all events.
|
|
14
|
+
* @type Array<"deleted" | "updated" | "created" | "*" | string>
|
|
15
|
+
*/
|
|
16
|
+
types?: LiveEvent["type"][];
|
|
17
|
+
/**
|
|
18
|
+
* Determines subscription should subscribe or not.
|
|
19
|
+
* @type Array<"deleted" | "updated" | "created" | "*" | string>
|
|
20
|
+
*/
|
|
21
|
+
enabled?: boolean;
|
|
22
|
+
params?: {
|
|
23
|
+
ids?: BaseKey[];
|
|
24
|
+
id?: BaseKey;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated `params.meta` is depcerated. Use `meta` directly from the root level instead.
|
|
27
|
+
*/
|
|
28
|
+
meta?: MetaQuery;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
31
|
+
*/
|
|
32
|
+
metaData?: MetaQuery;
|
|
33
|
+
pagination?: Pagination;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated `hasPagination` is deprecated, use `pagination.mode` instead.
|
|
36
|
+
*/
|
|
37
|
+
hasPagination?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated `sort` is deprecated, use `sorters` instead.
|
|
40
|
+
*/
|
|
41
|
+
sort?: CrudSort[];
|
|
42
|
+
sorters?: CrudSort[];
|
|
43
|
+
filters?: CrudFilter[];
|
|
44
|
+
subscriptionType?: "useList" | "useOne" | "useMany";
|
|
45
|
+
resource?: string;
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated use `meta.dataProviderName` instead.
|
|
50
|
+
*/
|
|
51
|
+
dataProviderName?: string;
|
|
52
|
+
meta?: MetaQuery & {
|
|
53
|
+
dataProviderName?: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export declare const useSubscription: ({ params, channel, types, enabled, onLiveEvent, dataProviderName, meta, }: UseSubscriptionProps) => void;
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Hook that memoizes the given value with deep equality.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const useMemoized: <T = unknown>(value: T) => T;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
{"
|
|
1
|
+
export { useMenu } from "./useMenu";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type FlatTreeItem } from "../../definitions/helpers/menu/create-tree";
|
|
3
|
+
type UseMenuReturnType = {
|
|
4
|
+
defaultOpenKeys: string[];
|
|
5
|
+
selectedKey: string;
|
|
6
|
+
menuItems: TreeMenuItem[];
|
|
7
|
+
};
|
|
8
|
+
export type UseMenuProps = {
|
|
9
|
+
meta?: Record<string, any>;
|
|
10
|
+
hideOnMissingParameter?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type TreeMenuItem = FlatTreeItem & {
|
|
13
|
+
route?: string;
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
label?: string;
|
|
16
|
+
children: TreeMenuItem[];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* `useMenu` is used to get menu items of the default sidebar.
|
|
20
|
+
* These items include a link to dashboard page (if it exists) and links to the user defined resources
|
|
21
|
+
* (passed as children to {@link https://refine.dev/docs/core/components/refine-config `<Refine>`}).
|
|
22
|
+
* This hook can also be used to build custom menus, which is also used by default sidebar to show menu items.
|
|
23
|
+
*
|
|
24
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/ui/useMenu} for more details.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useMenu: ({ meta, hideOnMissingParameter }?: UseMenuProps) => UseMenuReturnType;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=useMenu.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./useModal";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
{
|
|
1
|
+
export type useModalReturnType = {
|
|
2
|
+
visible: boolean;
|
|
3
|
+
show: () => void;
|
|
4
|
+
close: () => void;
|
|
5
|
+
};
|
|
6
|
+
export type useModalProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Initial state of the modal
|
|
9
|
+
*/
|
|
10
|
+
defaultVisible?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const useModal: ({ defaultVisible, }?: useModalProps) => useModalReturnType;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
{
|
|
1
|
+
import type { BaseKey, MetaDataQuery } from "../../contexts/data/types";
|
|
2
|
+
import type { IResourceItem } from "../../contexts/resource/types";
|
|
3
|
+
export type HistoryType = "push" | "replace";
|
|
4
|
+
/**
|
|
5
|
+
* `refine` uses {@link https://reactrouter.com/en/hooks/use-navigate `React Router`} and comes with all redirects out of the box.
|
|
6
|
+
* It allows you to manage your routing operations in refine.
|
|
7
|
+
* Using this hook, you can manage all the routing operations of your application very easily.
|
|
8
|
+
*
|
|
9
|
+
* @internal This is an internal hook of refine. Do not use it directly.
|
|
10
|
+
*
|
|
11
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/navigation/useNavigation} for more details.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useNavigation: () => {
|
|
14
|
+
create: (resource: string | IResourceItem, type?: HistoryType, meta?: MetaDataQuery) => void;
|
|
15
|
+
createUrl: (resource: string | IResourceItem, meta?: MetaDataQuery) => string;
|
|
16
|
+
edit: (resource: string | IResourceItem, id: BaseKey, type?: HistoryType, meta?: MetaDataQuery) => void;
|
|
17
|
+
editUrl: (resource: string | IResourceItem, id: BaseKey, meta?: MetaDataQuery) => string;
|
|
18
|
+
clone: (resource: string | IResourceItem, id: BaseKey, type?: HistoryType, meta?: MetaDataQuery) => void;
|
|
19
|
+
cloneUrl: (resource: string | IResourceItem, id: BaseKey, meta?: MetaDataQuery) => string;
|
|
20
|
+
show: (resource: string | IResourceItem, id: BaseKey, type?: HistoryType, meta?: MetaDataQuery) => void;
|
|
21
|
+
showUrl: (resource: string | IResourceItem, id: BaseKey, meta?: MetaDataQuery) => string;
|
|
22
|
+
list: (resource: string | IResourceItem, type?: HistoryType, meta?: MetaDataQuery) => void;
|
|
23
|
+
listUrl: (resource: string | IResourceItem, meta?: MetaDataQuery) => string;
|
|
24
|
+
push: (path: string, ...rest: unknown[]) => void;
|
|
25
|
+
replace: (path: string, ...rest: unknown[]) => void;
|
|
26
|
+
goBack: () => void;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./useCancelNotification";
|
|
2
|
+
export * from "./useNotification";
|
|
3
|
+
export * from "./useHandleNotification";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { IUndoableQueue } from "../../../contexts/undoableQueue/types";
|
|
3
|
+
export type UseCancelNotificationType = () => {
|
|
4
|
+
notifications: IUndoableQueue[];
|
|
5
|
+
notificationDispatch: React.Dispatch<any>;
|
|
6
|
+
};
|
|
7
|
+
export declare const useCancelNotification: UseCancelNotificationType;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { OpenNotificationParams } from "../../../contexts/notification/types";
|
|
2
|
+
export declare const useHandleNotification: () => (notification: OpenNotificationParams | false | undefined, fallbackNotification?: OpenNotificationParams) => void;
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { INotificationContext } from "../../../contexts/notification/types";
|
|
2
|
+
export declare const useNotification: () => INotificationContext;
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{
|
|
1
|
+
import type { BaseKey, MetaDataQuery } from "../../contexts/data/types";
|
|
2
|
+
import type { IResourceItem } from "../../contexts/resource/types";
|
|
3
|
+
import type { RedirectAction } from "../form/types";
|
|
4
|
+
export type UseRedirectionAfterSubmissionType = () => (options: {
|
|
5
|
+
redirect: RedirectAction;
|
|
6
|
+
resource?: IResourceItem;
|
|
7
|
+
id?: BaseKey;
|
|
8
|
+
meta?: MetaDataQuery;
|
|
9
|
+
}) => void;
|
|
10
|
+
export declare const useRedirectionAfterSubmission: UseRedirectionAfterSubmissionType;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{"
|
|
1
|
+
export { useMutationMode } from "./useMutationMode";
|
|
2
|
+
export { useWarnAboutChange } from "./useWarnAboutChange";
|
|
3
|
+
export { useSyncWithLocation } from "./useSyncWithLocation";
|
|
4
|
+
export { useTitle } from "./useTitle";
|
|
5
|
+
export { useRefineContext } from "./useRefineContext";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { IRefineContextOptions } from "../../contexts/refine/types";
|
|
2
|
+
import type { MutationMode } from "../../contexts/data/types";
|
|
3
|
+
type UseMutationModeType = (preferredMutationMode?: MutationMode, preferredUndoableTimeout?: number) => {
|
|
4
|
+
mutationMode: IRefineContextOptions["mutationMode"];
|
|
5
|
+
undoableTimeout: IRefineContextOptions["undoableTimeout"];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Mutation mode determines which mode the mutation runs with.
|
|
9
|
+
* Mutations can run under three different modes: `pessimistic`, `optimistic` and `undoable`.
|
|
10
|
+
* Each mode corresponds to a different type of user experience.
|
|
11
|
+
*
|
|
12
|
+
* @see {@link https://refine.dev/docs/guides-and-concepts/mutation-mode} for more details.
|
|
13
|
+
*/
|
|
14
|
+
export declare const useMutationMode: UseMutationModeType;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=useMutationMode.d.ts.map
|
|
@@ -12,7 +12,7 @@ export declare const useRefineContext: () => {
|
|
|
12
12
|
syncWithLocation: boolean;
|
|
13
13
|
undoableTimeout: number;
|
|
14
14
|
warnWhenUnsavedChanges: boolean;
|
|
15
|
-
DashboardPage: import("react").FC<import("
|
|
15
|
+
DashboardPage: import("react").FC<import("../..").DashboardPageProps<any>> | undefined;
|
|
16
16
|
LoginPage: false | import("react").FC<{}> | undefined;
|
|
17
17
|
catchAll: import("react").ReactNode;
|
|
18
18
|
options: import("../..").IRefineContextOptions;
|
|
@@ -12,7 +12,7 @@ export declare const useRefineContext: () => {
|
|
|
12
12
|
syncWithLocation: boolean;
|
|
13
13
|
undoableTimeout: number;
|
|
14
14
|
warnWhenUnsavedChanges: boolean;
|
|
15
|
-
DashboardPage: import("react").FC<import("
|
|
15
|
+
DashboardPage: import("react").FC<import("../..").DashboardPageProps<any>> | undefined;
|
|
16
16
|
LoginPage: false | import("react").FC<{}> | undefined;
|
|
17
17
|
catchAll: import("react").ReactNode;
|
|
18
18
|
options: import("../..").IRefineContextOptions;
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const useRefineContext: () => {
|
|
3
|
+
__initialized: boolean | undefined;
|
|
4
|
+
Footer: import("react").FC<{}> | undefined;
|
|
5
|
+
Header: import("react").FC<{}> | undefined;
|
|
6
|
+
Layout: import("react").FC<import("../..").LayoutProps>;
|
|
7
|
+
OffLayoutArea: import("react").FC<{}> | undefined;
|
|
8
|
+
Sider: import("react").FC<{}> | undefined;
|
|
9
|
+
Title: import("react").FC<import("../..").TitleProps> | undefined;
|
|
10
|
+
hasDashboard: boolean;
|
|
11
|
+
mutationMode: import("../..").MutationMode;
|
|
12
|
+
syncWithLocation: boolean;
|
|
13
|
+
undoableTimeout: number;
|
|
14
|
+
warnWhenUnsavedChanges: boolean;
|
|
15
|
+
DashboardPage: import("react").FC<import("../..").DashboardPageProps<any>> | undefined;
|
|
16
|
+
LoginPage: false | import("react").FC<{}> | undefined;
|
|
17
|
+
catchAll: import("react").ReactNode;
|
|
18
|
+
options: import("../..").IRefineContextOptions;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=useRefineContext.d.ts.map
|
|
@@ -12,7 +12,7 @@ export declare const useRefineContext: () => {
|
|
|
12
12
|
syncWithLocation: boolean;
|
|
13
13
|
undoableTimeout: number;
|
|
14
14
|
warnWhenUnsavedChanges: boolean;
|
|
15
|
-
DashboardPage: import("react").FC<import("
|
|
15
|
+
DashboardPage: import("react").FC<import("../..").DashboardPageProps<any>> | undefined;
|
|
16
16
|
LoginPage: false | import("react").FC<{}> | undefined;
|
|
17
17
|
catchAll: import("react").ReactNode;
|
|
18
18
|
options: import("../..").IRefineContextOptions;
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { IRefineContextOptions } from "../../contexts/refine/types";
|
|
2
|
+
type UseSyncWithLocationType = () => {
|
|
3
|
+
syncWithLocation: IRefineContextOptions["syncWithLocation"];
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* List query parameter values can be edited manually by typing directly in the URL.
|
|
7
|
+
* To activate this feature `syncWithLocation` needs to be set to `true`.
|
|
8
|
+
*
|
|
9
|
+
* @see {@link https://refine.dev/docs/api-reference/core/components/refine-config/#syncwithlocation} for more details.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useSyncWithLocation: UseSyncWithLocationType;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=useSyncWithLocation.d.ts.map
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TitleProps } from "../../contexts/refine/types";
|
|
3
|
+
/**
|
|
4
|
+
* `useTitle` returns a component that calls the `<Title>` passed to the `<Refine>`.
|
|
5
|
+
* In this way, it becomes easier for us to access this component in various parts of the application.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/refine/useTitle} for more details.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useTitle: () => React.FC<TitleProps> | undefined;
|
|
10
|
+
//# sourceMappingURL=useTitle.d.ts.map
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { IRefineContextOptions } from "../../../contexts/refine/types";
|
|
2
|
+
import type { IUnsavedWarnContext } from "../../../contexts/unsavedWarn/types";
|
|
3
|
+
type UseWarnAboutChangeType = () => {
|
|
4
|
+
warnWhenUnsavedChanges: IRefineContextOptions["warnWhenUnsavedChanges"];
|
|
5
|
+
warnWhen: NonNullable<IUnsavedWarnContext["warnWhen"]>;
|
|
6
|
+
setWarnWhen: NonNullable<IUnsavedWarnContext["setWarnWhen"]>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* When you have unsaved changes and try to leave the current page, **refine** shows a confirmation modal box.
|
|
10
|
+
* To activate this feature, set the `warnWhenUnsavedChanges` to `true`.
|
|
11
|
+
*
|
|
12
|
+
* @see {@link https://refine.dev/docs/api-reference/core/components/refine-config#warnwhenunsavedchanges} for more details.
|
|
13
|
+
*/
|
|
14
|
+
export declare const useWarnAboutChange: UseWarnAboutChangeType;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./useResource";
|
|
2
|
+
export * from "./useResourceWithRoute";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,63 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { BaseKey } from "../../../contexts/data/types";
|
|
2
|
+
import type { IResourceItem } from "../../../contexts/resource/types";
|
|
3
|
+
import type { Action } from "../../../contexts/router/types";
|
|
4
|
+
export type UseResourceLegacyProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Determines which resource to use for redirection
|
|
7
|
+
* @deprecated resourceName deprecated. Use resourceNameOrRouteName instead # https://github.com/refinedev/refine/issues/1618
|
|
8
|
+
*/
|
|
9
|
+
resourceName?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Determines which resource to use for redirection
|
|
12
|
+
* @default Resource name that it reads from route
|
|
13
|
+
*/
|
|
14
|
+
resourceNameOrRouteName?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Adds id to the end of the URL
|
|
17
|
+
* @deprecated resourceName deprecated. Use resourceNameOrRouteName instead # https://github.com/refinedev/refine/issues/1618
|
|
18
|
+
*/
|
|
19
|
+
recordItemId?: BaseKey;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Matches the resource by identifier.
|
|
23
|
+
* If not provided, the resource from the route will be returned.
|
|
24
|
+
* If your resource does not explicitly define an identifier, the resource name will be used.
|
|
25
|
+
*/
|
|
26
|
+
export type UseResourceParam = string | undefined;
|
|
27
|
+
type SelectReturnType<T extends boolean> = T extends true ? {
|
|
28
|
+
resource: IResourceItem;
|
|
29
|
+
identifier: string;
|
|
30
|
+
} : {
|
|
31
|
+
resource: IResourceItem;
|
|
32
|
+
identifier: string;
|
|
33
|
+
} | undefined;
|
|
34
|
+
export type UseResourceReturnType = {
|
|
35
|
+
resources: IResourceItem[];
|
|
36
|
+
resource?: IResourceItem;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Use `resource.name` instead when you need to get the resource name.
|
|
39
|
+
*/
|
|
40
|
+
resourceName?: string;
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated This value may not always reflect the correct "id" value. Use `useResourceParams` to obtain the calculated "id"` or `useParsed` to obtain the id from the route instead.
|
|
43
|
+
*/
|
|
44
|
+
id?: BaseKey;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated This value may not always reflect the correct "action" value. Use `useResourceParams` to obtain the calculated "action" or `useParsed` to obtain the action from the route instead.
|
|
47
|
+
*/
|
|
48
|
+
action?: Action;
|
|
49
|
+
select: <T extends boolean = true>(resourceName: string, force?: T) => SelectReturnType<T>;
|
|
50
|
+
identifier?: string;
|
|
51
|
+
};
|
|
52
|
+
type UseResourceReturnTypeWithResource = UseResourceReturnType & {
|
|
53
|
+
resource: IResourceItem;
|
|
54
|
+
identifier: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Use `useResource` with `identifier` property instead. (`identifier` does not check by route name in new router)
|
|
58
|
+
*/
|
|
59
|
+
export declare function useResource(props: UseResourceLegacyProps): UseResourceReturnType;
|
|
60
|
+
export declare function useResource(): UseResourceReturnType;
|
|
61
|
+
export declare function useResource<TIdentifier = UseResourceParam>(identifier: TIdentifier): TIdentifier extends NonNullable<UseResourceParam> ? UseResourceReturnTypeWithResource : UseResourceReturnType;
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { IResourceItem } from "../../../contexts/resource/types";
|
|
2
|
+
export type UseResourceWithRouteReturnType = (route: string) => IResourceItem;
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `useResource` hook instead.
|
|
5
|
+
* @internal This hook is for internal use only. And is kept for backward compatibility.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useResourceWithRoute: () => UseResourceWithRouteReturnType;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
{"
|
|
1
|
+
export { useGo } from "./use-go";
|
|
2
|
+
export { useBack } from "./use-back";
|
|
3
|
+
export { useParse } from "./use-parse";
|
|
4
|
+
export { useParsed } from "./use-parsed";
|
|
5
|
+
export { useGetToPath } from "./use-get-to-path";
|
|
6
|
+
export { useToPath } from "./use-to-path";
|
|
7
|
+
export { useLink } from "./use-link";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const useBack: () => import("../../..").BackFunction;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,19 @@
|
|
|
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
|
+
type GetToPathFn = (params: UseToPathParams) => string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a function to get the route for a given action and resource.
|
|
12
|
+
* If resource is not provided, it will use the resource from the route.
|
|
13
|
+
* If the resource is not found, it will return undefined.
|
|
14
|
+
* If the action is not found, it will return undefined.
|
|
15
|
+
* `meta` can be provided to compose the routes with parameters. (Can be used for nested routes.)
|
|
16
|
+
*/
|
|
17
|
+
export declare const useGetToPath: () => GetToPathFn;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|