@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,167 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query";
|
|
3
|
+
import type { BaseRecord, CrudFilter, CrudSort, GetListResponse, HttpError, MetaQuery, Pagination, Prettify } from "../../contexts/data/types";
|
|
4
|
+
import type { LiveModeProps } from "../../contexts/live/types";
|
|
5
|
+
import type { SuccessErrorNotification } from "../../contexts/notification/types";
|
|
6
|
+
import type { BaseListProps } from "../data/useList";
|
|
7
|
+
import { type UseLoadingOvertimeOptionsProps, type UseLoadingOvertimeReturnType } from "../useLoadingOvertime";
|
|
8
|
+
type SetFilterBehavior = "merge" | "replace";
|
|
9
|
+
export type useTableProps<TQueryFnData, TError, TData> = {
|
|
10
|
+
/**
|
|
11
|
+
* Resource name for API data interactions
|
|
12
|
+
* @default Resource name that it reads from route
|
|
13
|
+
*/
|
|
14
|
+
resource?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Configuration for pagination
|
|
17
|
+
*/
|
|
18
|
+
pagination?: Pagination;
|
|
19
|
+
/**
|
|
20
|
+
* Initial page index
|
|
21
|
+
* @default 1
|
|
22
|
+
* @deprecated `initialCurrent` property is deprecated. Use `pagination.current` instead.
|
|
23
|
+
*/
|
|
24
|
+
initialCurrent?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Initial number of items per page
|
|
27
|
+
* @default 10
|
|
28
|
+
* @deprecated `initialPageSize` property is deprecated. Use `pagination.pageSize` instead.
|
|
29
|
+
*/
|
|
30
|
+
initialPageSize?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Sort configs
|
|
33
|
+
*/
|
|
34
|
+
sorters?: {
|
|
35
|
+
/**
|
|
36
|
+
* Initial sorter state
|
|
37
|
+
*/
|
|
38
|
+
initial?: CrudSort[];
|
|
39
|
+
/**
|
|
40
|
+
* Default and unchangeable sorter state
|
|
41
|
+
* @default `[]`
|
|
42
|
+
*/
|
|
43
|
+
permanent?: CrudSort[];
|
|
44
|
+
/**
|
|
45
|
+
* Whether to use server side sorting or not.
|
|
46
|
+
* @default "server"
|
|
47
|
+
*/
|
|
48
|
+
mode?: "server" | "off";
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Initial sorter state
|
|
52
|
+
* @deprecated `initialSorter` property is deprecated. Use `sorters.initial` instead.
|
|
53
|
+
*/
|
|
54
|
+
initialSorter?: CrudSort[];
|
|
55
|
+
/**
|
|
56
|
+
* Default and unchangeable sorter state
|
|
57
|
+
* @default `[]`
|
|
58
|
+
* @deprecated `permanentSorter` property is deprecated. Use `sorters.permanent` instead.
|
|
59
|
+
*/
|
|
60
|
+
permanentSorter?: CrudSort[];
|
|
61
|
+
/**
|
|
62
|
+
* Filter configs
|
|
63
|
+
*/
|
|
64
|
+
filters?: {
|
|
65
|
+
/**
|
|
66
|
+
* Initial filter state
|
|
67
|
+
*/
|
|
68
|
+
initial?: CrudFilter[];
|
|
69
|
+
/**
|
|
70
|
+
* Default and unchangeable filter state
|
|
71
|
+
* @default `[]`
|
|
72
|
+
*/
|
|
73
|
+
permanent?: CrudFilter[];
|
|
74
|
+
/**
|
|
75
|
+
* Default behavior of the `setFilters` function
|
|
76
|
+
* @default `"merge"`
|
|
77
|
+
*/
|
|
78
|
+
defaultBehavior?: SetFilterBehavior;
|
|
79
|
+
/**
|
|
80
|
+
* Whether to use server side filter or not.
|
|
81
|
+
* @default "server"
|
|
82
|
+
*/
|
|
83
|
+
mode?: "server" | "off";
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Initial filter state
|
|
87
|
+
* @deprecated `initialFilter` property is deprecated. Use `filters.initial` instead.
|
|
88
|
+
*/
|
|
89
|
+
initialFilter?: CrudFilter[];
|
|
90
|
+
/**
|
|
91
|
+
* Default and unchangeable filter state
|
|
92
|
+
* @default `[]`
|
|
93
|
+
* @deprecated `permanentFilter` property is deprecated. Use `filters.permanent` instead.
|
|
94
|
+
*/
|
|
95
|
+
permanentFilter?: CrudFilter[];
|
|
96
|
+
/**
|
|
97
|
+
* Default behavior of the `setFilters` function
|
|
98
|
+
* @default `"merge"`
|
|
99
|
+
* @deprecated `defaultSetFilterBehavior` property is deprecated. Use `filters.defaultBehavior` instead.
|
|
100
|
+
*/
|
|
101
|
+
defaultSetFilterBehavior?: SetFilterBehavior;
|
|
102
|
+
/**
|
|
103
|
+
* Whether to use server side pagination or not.
|
|
104
|
+
* @default `true`
|
|
105
|
+
* @deprecated `hasPagination` property is deprecated. Use `pagination.mode` instead.
|
|
106
|
+
*/
|
|
107
|
+
hasPagination?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Sortings, filters, page index and records shown per page are tracked by browser history
|
|
110
|
+
* @default Value set in [Refine](/docs/api-reference/core/components/refine-config/#syncwithlocation). If a custom resource is given, it will be `false`
|
|
111
|
+
*/
|
|
112
|
+
syncWithLocation?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* react-query's [useQuery](https://tanstack.com/query/v4/docs/reference/useQuery) options
|
|
115
|
+
*/
|
|
116
|
+
queryOptions?: UseQueryOptions<GetListResponse<TQueryFnData>, TError, GetListResponse<TData>>;
|
|
117
|
+
/**
|
|
118
|
+
* Metadata query for dataProvider
|
|
119
|
+
*/
|
|
120
|
+
meta?: MetaQuery;
|
|
121
|
+
/**
|
|
122
|
+
* Metadata query for dataProvider
|
|
123
|
+
* @deprecated `metaData` is deprecated with refine@4, refine will pass `meta` instead, however, we still support `metaData` for backward compatibility.
|
|
124
|
+
*/
|
|
125
|
+
metaData?: MetaQuery;
|
|
126
|
+
/**
|
|
127
|
+
* If there is more than one `dataProvider`, you should use the `dataProviderName` that you will use.
|
|
128
|
+
*/
|
|
129
|
+
dataProviderName?: string;
|
|
130
|
+
} & SuccessErrorNotification<GetListResponse<TData>, TError, Prettify<BaseListProps>> & LiveModeProps & UseLoadingOvertimeOptionsProps;
|
|
131
|
+
type ReactSetState<T> = React.Dispatch<React.SetStateAction<T>>;
|
|
132
|
+
type SyncWithLocationParams = {
|
|
133
|
+
pagination: {
|
|
134
|
+
current?: number;
|
|
135
|
+
pageSize?: number;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated `sorter` is deprecated. Use `sorters` instead.
|
|
139
|
+
*/
|
|
140
|
+
sorter?: CrudSort[];
|
|
141
|
+
sorters: CrudSort[];
|
|
142
|
+
filters: CrudFilter[];
|
|
143
|
+
};
|
|
144
|
+
export type useTableReturnType<TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError> = {
|
|
145
|
+
tableQueryResult: QueryObserverResult<GetListResponse<TData>, TError>;
|
|
146
|
+
/**
|
|
147
|
+
* @deprecated `sorter` is deprecated. Use `sorters` instead.
|
|
148
|
+
*/
|
|
149
|
+
sorter: CrudSort[];
|
|
150
|
+
sorters: CrudSort[];
|
|
151
|
+
/**
|
|
152
|
+
* @deprecated `setSorter` is deprecated. Use `setSorters` instead.
|
|
153
|
+
*/
|
|
154
|
+
setSorter: (sorter: CrudSort[]) => void;
|
|
155
|
+
setSorters: (sorter: CrudSort[]) => void;
|
|
156
|
+
filters: CrudFilter[];
|
|
157
|
+
setFilters: ((filters: CrudFilter[], behavior?: SetFilterBehavior) => void) & ((setter: (prevFilters: CrudFilter[]) => CrudFilter[]) => void);
|
|
158
|
+
createLinkForSyncWithLocation: (params: SyncWithLocationParams) => string;
|
|
159
|
+
current: number;
|
|
160
|
+
setCurrent: ReactSetState<useTableReturnType["current"]>;
|
|
161
|
+
pageSize: number;
|
|
162
|
+
setPageSize: ReactSetState<useTableReturnType["pageSize"]>;
|
|
163
|
+
pageCount: number;
|
|
164
|
+
} & UseLoadingOvertimeReturnType;
|
|
165
|
+
export declare function useTable<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData>({ initialCurrent, initialPageSize, hasPagination, pagination, initialSorter, permanentSorter, defaultSetFilterBehavior, initialFilter, permanentFilter, filters: filtersFromProp, sorters: sortersFromProp, syncWithLocation: syncWithLocationProp, resource: resourceFromProp, successNotification, errorNotification, queryOptions, liveMode: liveModeFromProp, onLiveEvent, liveParams, meta, metaData, dataProviderName, overtimeOptions, }?: useTableProps<TQueryFnData, TError, TData>): useTableReturnType<TData, TError>;
|
|
166
|
+
export {};
|
|
167
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
{"
|
|
1
|
+
import type { ITelemetryData } from "../../components/telemetry/types";
|
|
2
|
+
export declare const useTelemetryData: () => ITelemetryData;
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|