@refinedev/antd 5.40.0 → 5.41.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 +79 -0
- package/dist/components/autoSaveIndicator/index.d.mts.map +4 -1
- package/dist/components/breadcrumb/index.d.mts.map +6 -1
- package/dist/components/buttons/clone/index.d.mts.map +11 -1
- package/dist/components/buttons/create/index.d.mts.map +11 -1
- package/dist/components/buttons/delete/index.d.mts.map +10 -1
- package/dist/components/buttons/edit/index.d.mts.map +11 -1
- package/dist/components/buttons/export/index.d.mts.map +10 -1
- package/dist/components/buttons/import/index.d.mts.map +11 -1
- package/dist/components/buttons/index.d.mts.map +12 -1
- package/dist/components/buttons/list/index.d.mts.map +11 -1
- package/dist/components/buttons/refresh/index.d.mts.map +10 -1
- package/dist/components/buttons/save/index.d.mts.map +10 -1
- package/dist/components/buttons/show/index.d.mts.map +11 -1
- package/dist/components/buttons/types.d.mts.map +24 -1
- package/dist/components/crud/create/index.d.mts.map +10 -1
- package/dist/components/crud/edit/index.d.mts.map +10 -1
- package/dist/components/crud/index.d.mts.map +6 -1
- package/dist/components/crud/list/index.d.mts.map +10 -1
- package/dist/components/crud/show/index.d.mts.map +10 -1
- package/dist/components/crud/types.d.mts.map +10 -1
- package/dist/components/fields/boolean/index.d.mts.map +9 -1
- package/dist/components/fields/date/index.d.mts.map +9 -1
- package/dist/components/fields/email/index.d.mts.map +10 -1
- package/dist/components/fields/file/index.d.mts.map +9 -1
- package/dist/components/fields/image/index.d.mts.map +9 -1
- package/dist/components/fields/index.d.mts.map +12 -1
- package/dist/components/fields/markdown/index.d.mts.map +9 -1
- package/dist/components/fields/number/index.d.mts.map +9 -1
- package/dist/components/fields/tag/index.d.mts.map +9 -1
- package/dist/components/fields/text/index.d.mts.map +9 -1
- package/dist/components/fields/types.d.mts.map +20 -1
- package/dist/components/fields/url/index.d.mts.map +10 -1
- package/dist/components/index.d.mts.map +24 -1
- package/dist/components/layout/header/index.d.mts.map +4 -1
- package/dist/components/layout/index.d.mts.map +8 -1
- package/dist/components/layout/sider/index.d.mts.map +4 -1
- package/dist/components/layout/sider/styles.d.mts.map +3 -1
- package/dist/components/layout/title/index.d.mts.map +4 -1
- package/dist/components/layout/types.d.mts.map +3 -1
- package/dist/components/pageHeader/index.d.cts.map +1 -1
- package/dist/components/pageHeader/index.d.mts.map +5 -1
- package/dist/components/pageHeader/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/forgotPassword/index.d.mts.map +12 -1
- package/dist/components/pages/auth/components/index.d.mts.map +5 -1
- package/dist/components/pages/auth/components/login/index.d.mts.map +12 -1
- package/dist/components/pages/auth/components/register/index.d.mts.map +12 -1
- package/dist/components/pages/auth/components/styles.d.mts.map +7 -1
- package/dist/components/pages/auth/components/updatePassword/index.d.mts.map +12 -1
- package/dist/components/pages/auth/index.d.mts.map +14 -1
- package/dist/components/pages/error/index.d.mts.map +10 -1
- package/dist/components/pages/index.d.mts.map +7 -1
- package/dist/components/pages/login/index.d.mts.map +15 -1
- package/dist/components/pages/login/styles.d.mts.map +6 -1
- package/dist/components/pages/ready/index.d.mts.map +9 -1
- package/dist/components/pages/welcome/index.d.mts.map +7 -1
- package/dist/components/table/components/filterDropdown/index.d.mts.map +16 -1
- package/dist/components/table/components/index.d.mts.map +3 -1
- package/dist/components/table/index.d.mts.map +2 -1
- package/dist/components/themedLayout/header/index.d.mts.map +7 -1
- package/dist/components/themedLayout/index.d.mts.map +7 -1
- package/dist/components/themedLayout/sider/index.d.mts.map +7 -1
- package/dist/components/themedLayout/sider/styles.d.mts.map +3 -1
- package/dist/components/themedLayout/title/index.d.mts.map +7 -1
- package/dist/components/themedLayout/types.d.mts.map +3 -1
- package/dist/components/themedLayoutV2/header/index.d.mts.map +4 -1
- package/dist/components/themedLayoutV2/index.d.mts.map +4 -1
- package/dist/components/themedLayoutV2/sider/index.d.cts.map +1 -1
- package/dist/components/themedLayoutV2/sider/index.d.mts.map +4 -1
- package/dist/components/themedLayoutV2/sider/index.d.ts.map +1 -1
- package/dist/components/themedLayoutV2/sider/styles.d.mts.map +3 -1
- package/dist/components/themedLayoutV2/title/index.d.mts.map +4 -1
- package/dist/components/themedLayoutV2/types.d.mts.map +6 -1
- package/dist/components/undoableNotification/index.d.mts.map +10 -1
- package/dist/contexts/index.d.mts.map +2 -1
- package/dist/contexts/themedLayoutContext/IThemedLayoutContext.d.mts.map +7 -1
- package/dist/contexts/themedLayoutContext/index.d.mts.map +8 -1
- package/dist/definitions/filter-mappers/index.d.mts.map +29 -1
- package/dist/definitions/index.d.mts.map +5 -1
- package/dist/definitions/table/index.d.mts.map +13 -1
- package/dist/definitions/themes/index.d.mts.map +6 -1
- package/dist/definitions/upload/index.d.mts.map +4 -1
- package/dist/hooks/fields/index.d.mts.map +4 -1
- package/dist/hooks/fields/useCheckboxGroup/index.d.cts +1 -1
- package/dist/hooks/fields/useCheckboxGroup/index.d.cts.map +1 -1
- package/dist/hooks/fields/useCheckboxGroup/index.d.mts +1 -1
- package/dist/hooks/fields/useCheckboxGroup/index.d.mts.map +29 -1
- package/dist/hooks/fields/useCheckboxGroup/index.d.ts +1 -1
- package/dist/hooks/fields/useCheckboxGroup/index.d.ts.map +1 -1
- package/dist/hooks/fields/useRadioGroup/index.d.cts +1 -1
- package/dist/hooks/fields/useRadioGroup/index.d.cts.map +1 -1
- package/dist/hooks/fields/useRadioGroup/index.d.mts +1 -1
- package/dist/hooks/fields/useRadioGroup/index.d.mts.map +29 -1
- package/dist/hooks/fields/useRadioGroup/index.d.ts +1 -1
- package/dist/hooks/fields/useRadioGroup/index.d.ts.map +1 -1
- package/dist/hooks/fields/useSelect/index.d.mts.map +20 -1
- package/dist/hooks/form/index.d.mts.map +5 -1
- package/dist/hooks/form/useDrawerForm/index.d.mts.map +2 -1
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.cts +1 -2
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.cts.map +1 -1
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.mts +1 -2
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.mts.map +36 -1
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.ts +1 -2
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.ts.map +1 -1
- package/dist/hooks/form/useForm.d.cts +4 -3
- package/dist/hooks/form/useForm.d.cts.map +1 -1
- package/dist/hooks/form/useForm.d.mts +4 -3
- package/dist/hooks/form/useForm.d.mts.map +41 -1
- package/dist/hooks/form/useForm.d.ts +4 -3
- package/dist/hooks/form/useForm.d.ts.map +1 -1
- package/dist/hooks/form/useModalForm/index.d.mts.map +2 -1
- package/dist/hooks/form/useModalForm/useModalForm.d.mts.map +42 -1
- package/dist/hooks/form/useStepsForm/index.d.mts.map +2 -1
- package/dist/hooks/form/useStepsForm/useStepsForm.d.mts.map +35 -1
- package/dist/hooks/import/index.d.mts.map +18 -1
- package/dist/hooks/index.d.mts.map +10 -1
- package/dist/hooks/list/index.d.mts.map +2 -1
- package/dist/hooks/list/useSimpleList/index.d.mts.map +2 -1
- package/dist/hooks/list/useSimpleList/useSimpleList.d.mts.map +24 -1
- package/dist/hooks/modal/index.d.mts.map +2 -1
- package/dist/hooks/modal/useModal/index.d.mts.map +18 -1
- package/dist/hooks/table/index.d.mts.map +3 -1
- package/dist/hooks/table/useEditableTable/index.d.mts.map +2 -1
- package/dist/hooks/table/useEditableTable/useEditableTable.d.mts.map +40 -1
- package/dist/hooks/table/useTable/index.d.mts.map +2 -1
- package/dist/hooks/table/useTable/paginationLink.d.mts.map +8 -1
- package/dist/hooks/table/useTable/useTable.d.mts.map +24 -1
- package/dist/hooks/useFileUploadState/index.d.mts.map +7 -1
- package/dist/hooks/useSiderVisible/index.d.mts.map +11 -1
- package/dist/hooks/useThemedLayoutContext/index.d.mts.map +4 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts.map +9 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/field.d.mts.map +4 -1
- package/dist/interfaces/index.d.mts.map +19 -1
- package/dist/interfaces/upload.d.mts.map +10 -1
- package/dist/providers/index.d.mts.map +2 -1
- package/dist/providers/notificationProvider/index.d.mts.map +8 -1
- package/package.json +4 -4
- package/src/components/autoSaveIndicator/index.tsx +7 -7
- package/src/components/layout/sider/index.tsx +2 -2
- package/src/components/pageHeader/index.tsx +12 -9
- package/src/components/themedLayout/sider/index.tsx +2 -2
- package/src/components/themedLayoutV2/sider/index.tsx +23 -19
- package/src/hooks/fields/useCheckboxGroup/index.ts +2 -0
- package/src/hooks/fields/useRadioGroup/index.ts +2 -0
- package/src/hooks/form/useDrawerForm/useDrawerForm.ts +1 -2
- package/src/hooks/form/useForm.ts +12 -3
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/fields/useRadioGroup/index.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,EAGd,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,uBAAuB,CACjC,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,OAAO,SAAS,UAAU,GAAG,UAAU,IACrC;IACF,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG;QAC3E,OAAO,EAAE,OAAO,EAAE,CAAC;KACpB,CAAC;IACF,WAAW,EAAE,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;CAC1D,CAAC;AAEF,KAAK,kBAAkB,CAAC,YAAY,EAAE,MAAM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,CAkCR,CAAC"}
|
@@ -24,6 +24,6 @@ type UseRadioGroupProps<TQueryFnData, TError, TData> = Omit<UseSelectProps<TQuer
|
|
24
24
|
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
25
25
|
*
|
26
26
|
*/
|
27
|
-
export declare const useRadioGroup: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData, TOption extends BaseOption = BaseOption>({ resource, sort, sorters, filters, optionLabel, optionValue, queryOptions, fetchSize, pagination, liveMode, defaultValue, onLiveEvent, liveParams, meta, metaData, dataProviderName, }: UseRadioGroupProps<TQueryFnData, TError, TData>) => UseRadioGroupReturnType<TData, TOption>;
|
27
|
+
export declare const useRadioGroup: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData, TOption extends BaseOption = BaseOption>({ resource, sort, sorters, filters, optionLabel, optionValue, queryOptions, fetchSize, pagination, liveMode, defaultValue, selectedOptionsOrder, onLiveEvent, liveParams, meta, metaData, dataProviderName, }: UseRadioGroupProps<TQueryFnData, TError, TData>) => UseRadioGroupReturnType<TData, TOption>;
|
28
28
|
export {};
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1,29 @@
|
|
1
|
-
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { QueryObserverResult } from "@tanstack/react-query";
|
3
|
+
import type { Radio } from "antd";
|
4
|
+
import { type BaseKey, type BaseOption, type BaseRecord, type GetListResponse, type HttpError, type UseSelectProps } from "@refinedev/core";
|
5
|
+
export type UseRadioGroupReturnType<TData extends BaseRecord = BaseRecord, TOption extends BaseOption = BaseOption> = {
|
6
|
+
radioGroupProps: Omit<React.ComponentProps<typeof Radio.Group>, "options"> & {
|
7
|
+
options: TOption[];
|
8
|
+
};
|
9
|
+
queryResult: QueryObserverResult<GetListResponse<TData>>;
|
10
|
+
};
|
11
|
+
type UseRadioGroupProps<TQueryFnData, TError, TData> = Omit<UseSelectProps<TQueryFnData, TError, TData>, "defaultValue"> & {
|
12
|
+
/**
|
13
|
+
* Sets the default value
|
14
|
+
*/
|
15
|
+
defaultValue?: BaseKey;
|
16
|
+
};
|
17
|
+
/**
|
18
|
+
* `useRadioGroup` hook allows you to manage an Ant Design {@link https://ant.design/components/radio/#components-radio-demo-radiogroup-with-name Radio.Group} component when records in a resource needs to be used as radio options.
|
19
|
+
*
|
20
|
+
* @see {@link https://refine.dev/docs/api-reference/antd/hooks/field/useRadioGroup/} for more details.
|
21
|
+
*
|
22
|
+
* @typeParam TQueryFnData - Result data returned by the query function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
23
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`}
|
24
|
+
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
25
|
+
*
|
26
|
+
*/
|
27
|
+
export declare const useRadioGroup: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData, TOption extends BaseOption = BaseOption>({ resource, sort, sorters, filters, optionLabel, optionValue, queryOptions, fetchSize, pagination, liveMode, defaultValue, selectedOptionsOrder, onLiveEvent, liveParams, meta, metaData, dataProviderName, }: UseRadioGroupProps<TQueryFnData, TError, TData>) => UseRadioGroupReturnType<TData, TOption>;
|
28
|
+
export {};
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -24,6 +24,6 @@ type UseRadioGroupProps<TQueryFnData, TError, TData> = Omit<UseSelectProps<TQuer
|
|
24
24
|
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
25
25
|
*
|
26
26
|
*/
|
27
|
-
export declare const useRadioGroup: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData, TOption extends BaseOption = BaseOption>({ resource, sort, sorters, filters, optionLabel, optionValue, queryOptions, fetchSize, pagination, liveMode, defaultValue, onLiveEvent, liveParams, meta, metaData, dataProviderName, }: UseRadioGroupProps<TQueryFnData, TError, TData>) => UseRadioGroupReturnType<TData, TOption>;
|
27
|
+
export declare const useRadioGroup: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TData extends BaseRecord = TQueryFnData, TOption extends BaseOption = BaseOption>({ resource, sort, sorters, filters, optionLabel, optionValue, queryOptions, fetchSize, pagination, liveMode, defaultValue, selectedOptionsOrder, onLiveEvent, liveParams, meta, metaData, dataProviderName, }: UseRadioGroupProps<TQueryFnData, TError, TData>) => UseRadioGroupReturnType<TData, TOption>;
|
28
28
|
export {};
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/fields/useRadioGroup/index.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,EAGd,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,uBAAuB,CACjC,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,OAAO,SAAS,UAAU,GAAG,UAAU,IACrC;IACF,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG;QAC3E,OAAO,EAAE,OAAO,EAAE,CAAC;KAC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CAAC;AAEF;;;;;;;;;GASG;AAEH,eAAO,MAAM,aAAa,wXAuBvB,mBAAmB,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,KAAG,wBACnD,KAAK,EACL,OAAO,CAkCR,CAAC"}
|
@@ -1 +1,20 @@
|
|
1
|
-
{"
|
1
|
+
import type { SelectProps } from "antd/lib/select";
|
2
|
+
import type { QueryObserverResult } from "@tanstack/react-query";
|
3
|
+
import { type BaseRecord, type GetManyResponse, type GetListResponse, type HttpError, type UseSelectProps, type BaseOption } from "@refinedev/core";
|
4
|
+
export type UseSelectReturnType<TData extends BaseRecord = BaseRecord, TOption extends BaseOption = BaseOption> = {
|
5
|
+
selectProps: SelectProps<TOption>;
|
6
|
+
queryResult: QueryObserverResult<GetListResponse<TData>>;
|
7
|
+
defaultValueQueryResult: QueryObserverResult<GetManyResponse<TData>>;
|
8
|
+
};
|
9
|
+
/**
|
10
|
+
* `useSelect` hook allows you to manage an Ant Design {@link https://ant.design/components/select/ Select} component when records in a resource needs to be used as select options.
|
11
|
+
*
|
12
|
+
* @see {@link https://refine.dev/docs/api-reference/antd/hooks/field/useSelect/} for more details.
|
13
|
+
*
|
14
|
+
* @typeParam TQueryFnData - Result data returned by the query function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
15
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`}
|
16
|
+
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
17
|
+
*
|
18
|
+
*/
|
19
|
+
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, TOption>;
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1,5 @@
|
|
1
|
-
{
|
1
|
+
export { useForm, UseFormProps, UseFormReturnType } from "./useForm";
|
2
|
+
export { useModalForm, UseModalFormProps, UseModalFormReturnType, } from "./useModalForm";
|
3
|
+
export { useDrawerForm, UseDrawerFormProps, UseDrawerFormConfig, UseDrawerFormReturnType, } from "./useDrawerForm";
|
4
|
+
export { useStepsForm, UseStepsFormProps, UseStepsFormReturnType, } from "./useStepsForm";
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1,2 @@
|
|
1
|
-
{
|
1
|
+
export { useDrawerForm, UseDrawerFormProps, UseDrawerFormConfig, UseDrawerFormReturnType, } from "./useDrawerForm";
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import type { UseFormConfig } from "sunflower-antd";
|
2
1
|
import type { FormInstance, FormProps, DrawerProps, ButtonProps } from "antd";
|
3
2
|
import { type UseFormProps as UseFormPropsCore, type HttpError, type LiveModeProps, type BaseRecord, type FormWithSyncWithLocationParams, type BaseKey } from "@refinedev/core";
|
4
3
|
import { type UseFormProps, type UseFormReturnType } from "../useForm";
|
5
4
|
import type { DeleteButtonProps } from "../../../components";
|
6
|
-
export interface UseDrawerFormConfig
|
5
|
+
export interface UseDrawerFormConfig {
|
7
6
|
action: "show" | "edit" | "create" | "clone";
|
8
7
|
}
|
9
8
|
export type UseDrawerFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseDrawerFormConfig & LiveModeProps & FormWithSyncWithLocationParams & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useDrawerForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useDrawerForm/useDrawerForm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"useDrawerForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useDrawerForm/useDrawerForm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAC9E,OAAO,EAGL,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,8BAA8B,EACnC,KAAK,OAAO,EAMb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAW,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC9C;AAED,MAAM,MAAM,kBAAkB,CAC5B,YAAY,SAAS,UAAU,GAAG,UAAU,EAC5C,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,EACf,KAAK,SAAS,UAAU,GAAG,YAAY,EACvC,SAAS,SAAS,UAAU,GAAG,KAAK,EACpC,cAAc,SAAS,SAAS,GAAG,MAAM,IACvC,gBAAgB,CAClB,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,GACC,YAAY,CACV,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,GACD,mBAAmB,GACnB,aAAa,GACb,8BAA8B,GAAG;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEJ,MAAM,MAAM,uBAAuB,CACjC,YAAY,SAAS,UAAU,GAAG,UAAU,EAC5C,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,EACf,KAAK,SAAS,UAAU,GAAG,YAAY,EACvC,SAAS,SAAS,UAAU,GAAG,KAAK,EACpC,cAAc,SAAS,SAAS,GAAG,MAAM,IACvC,iBAAiB,CACnB,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,GAAG;IACF,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG;QACjC,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;KAChC,CAAC;IACF,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,WAAW,CAAC;IAC7B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,aAAa,wUAevB,mBACD,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,KAAG,wBACF,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CAyMf,CAAC"}
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import type { UseFormConfig } from "sunflower-antd";
|
2
1
|
import type { FormInstance, FormProps, DrawerProps, ButtonProps } from "antd";
|
3
2
|
import { type UseFormProps as UseFormPropsCore, type HttpError, type LiveModeProps, type BaseRecord, type FormWithSyncWithLocationParams, type BaseKey } from "@refinedev/core";
|
4
3
|
import { type UseFormProps, type UseFormReturnType } from "../useForm";
|
5
4
|
import type { DeleteButtonProps } from "../../../components";
|
6
|
-
export interface UseDrawerFormConfig
|
5
|
+
export interface UseDrawerFormConfig {
|
7
6
|
action: "show" | "edit" | "create" | "clone";
|
8
7
|
}
|
9
8
|
export type UseDrawerFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseDrawerFormConfig & LiveModeProps & FormWithSyncWithLocationParams & {
|
@@ -1 +1,36 @@
|
|
1
|
-
{
|
1
|
+
import type { FormInstance, FormProps, DrawerProps, ButtonProps } from "antd";
|
2
|
+
import { type UseFormProps as UseFormPropsCore, type HttpError, type LiveModeProps, type BaseRecord, type FormWithSyncWithLocationParams, type BaseKey } from "@refinedev/core";
|
3
|
+
import { type UseFormProps, type UseFormReturnType } from "../useForm";
|
4
|
+
import type { DeleteButtonProps } from "../../../components";
|
5
|
+
export interface UseDrawerFormConfig {
|
6
|
+
action: "show" | "edit" | "create" | "clone";
|
7
|
+
}
|
8
|
+
export type UseDrawerFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseDrawerFormConfig & LiveModeProps & FormWithSyncWithLocationParams & {
|
9
|
+
defaultVisible?: boolean;
|
10
|
+
autoSubmitClose?: boolean;
|
11
|
+
autoResetForm?: boolean;
|
12
|
+
};
|
13
|
+
export type UseDrawerFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
14
|
+
formProps: FormProps<TVariables> & {
|
15
|
+
form: FormInstance<TVariables>;
|
16
|
+
};
|
17
|
+
show: (id?: BaseKey) => void;
|
18
|
+
close: () => void;
|
19
|
+
drawerProps: DrawerProps;
|
20
|
+
saveButtonProps: ButtonProps;
|
21
|
+
deleteButtonProps: DeleteButtonProps;
|
22
|
+
formLoading: boolean;
|
23
|
+
};
|
24
|
+
/**
|
25
|
+
* `useDrawerForm` hook allows you to manage a form within a drawer. It returns Ant Design {@link https://ant.design/components/form/ Form} and {@link https://ant.design/components/drawer/ Drawer} components props.
|
26
|
+
*
|
27
|
+
* @see {@link https://refine.dev/docs/api-reference/antd/hooks/form/useDrawerForm} for more details.
|
28
|
+
*
|
29
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
30
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`}
|
31
|
+
* @typeParam TVariables - Values for params. default `{}`
|
32
|
+
*
|
33
|
+
*
|
34
|
+
*/
|
35
|
+
export declare const useDrawerForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ syncWithLocation, defaultVisible, autoSubmitClose, autoResetForm, autoSave, invalidates, ...rest }: UseDrawerFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseDrawerFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
36
|
+
//# sourceMappingURL=useDrawerForm.d.ts.map
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import type { UseFormConfig } from "sunflower-antd";
|
2
1
|
import type { FormInstance, FormProps, DrawerProps, ButtonProps } from "antd";
|
3
2
|
import { type UseFormProps as UseFormPropsCore, type HttpError, type LiveModeProps, type BaseRecord, type FormWithSyncWithLocationParams, type BaseKey } from "@refinedev/core";
|
4
3
|
import { type UseFormProps, type UseFormReturnType } from "../useForm";
|
5
4
|
import type { DeleteButtonProps } from "../../../components";
|
6
|
-
export interface UseDrawerFormConfig
|
5
|
+
export interface UseDrawerFormConfig {
|
7
6
|
action: "show" | "edit" | "create" | "clone";
|
8
7
|
}
|
9
8
|
export type UseDrawerFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseDrawerFormConfig & LiveModeProps & FormWithSyncWithLocationParams & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useDrawerForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useDrawerForm/useDrawerForm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"useDrawerForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useDrawerForm/useDrawerForm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAC9E,OAAO,EAGL,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,8BAA8B,EACnC,KAAK,OAAO,EAMb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAW,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC9C;AAED,MAAM,MAAM,kBAAkB,CAC5B,YAAY,SAAS,UAAU,GAAG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UAevB,mBACD,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,KAAG,wBACF,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CAyMf,CAAC"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { type FormInstance, type FormProps, type ButtonProps } from "antd";
|
2
|
+
import { useForm as useFormSF, type UseFormConfig } from "sunflower-antd";
|
2
3
|
import { type AutoSaveProps } from "@refinedev/core";
|
3
4
|
import { type HttpError, type BaseRecord, type UseFormReturnType as UseFormReturnTypeCore, type UseFormProps as UseFormPropsCore, type CreateResponse, type UpdateResponse } from "@refinedev/core";
|
4
5
|
export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
@@ -13,7 +14,7 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
|
|
13
14
|
* @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
|
14
15
|
*/
|
15
16
|
disableServerSideValidation?: boolean;
|
16
|
-
} & AutoSaveProps<TVariables>;
|
17
|
+
} & AutoSaveProps<TVariables> & Pick<UseFormConfig, "defaultFormValues">;
|
17
18
|
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
18
19
|
form: FormInstance<TVariables>;
|
19
20
|
formProps: FormProps<TVariables>;
|
@@ -21,7 +22,7 @@ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TErr
|
|
21
22
|
onClick: () => void;
|
22
23
|
};
|
23
24
|
onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
|
24
|
-
}
|
25
|
+
} & Pick<ReturnType<typeof useFormSF<TResponse, TVariables>>, "defaultFormValuesLoading">;
|
25
26
|
/**
|
26
27
|
* `useForm` is used to manage forms. It uses Ant Design {@link https://ant.design/components/form/ Form} data scope management under the hood and returns the required props for managing the form actions.
|
27
28
|
*
|
@@ -36,5 +37,5 @@ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TErr
|
|
36
37
|
*
|
37
38
|
*
|
38
39
|
*/
|
39
|
-
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError: onMutationErrorProp, autoSave, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, optimisticUpdateMap, disableServerSideValidation: disableServerSideValidationProp, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
40
|
+
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError: onMutationErrorProp, autoSave, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, optimisticUpdateMap, defaultFormValues, disableServerSideValidation: disableServerSideValidationProp, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
40
41
|
//# sourceMappingURL=useForm.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../src/hooks/form/useForm.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,WAAW,EACjB,MAAM,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../src/hooks/form/useForm.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,WAAW,EACjB,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,SAAS,EACd,KAAK,UAAU,EAEf,KAAK,iBAAiB,IAAI,qBAAqB,EAE/C,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,cAAc,EACnB,KAAK,cAAc,EAIpB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,YAAY,CACtB,YAAY,SAAS,UAAU,GAAG,UAAU,EAC5C,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,EACf,KAAK,SAAS,UAAU,GAAG,YAAY,EACvC,SAAS,SAAS,UAAU,GAAG,KAAK,EACpC,cAAc,SAAS,SAAS,GAAG,MAAM,IACvC,gBAAgB,CAClB,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,GAAG;IACF,aAAa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{ type FormInstance, type FormProps, type ButtonProps } from "antd";
|
2
|
+
import { useForm as useFormSF, type UseFormConfig } from "sunflower-antd";
|
2
3
|
import { type AutoSaveProps } from "@refinedev/core";
|
3
4
|
import { type HttpError, type BaseRecord, type UseFormReturnType as UseFormReturnTypeCore, type UseFormProps as UseFormPropsCore, type CreateResponse, type UpdateResponse } from "@refinedev/core";
|
4
5
|
export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
@@ -13,7 +14,7 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
|
|
13
14
|
* @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
|
14
15
|
*/
|
15
16
|
disableServerSideValidation?: boolean;
|
16
|
-
} & AutoSaveProps<TVariables>;
|
17
|
+
} & AutoSaveProps<TVariables> & Pick<UseFormConfig, "defaultFormValues">;
|
17
18
|
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
18
19
|
form: FormInstance<TVariables>;
|
19
20
|
formProps: FormProps<TVariables>;
|
@@ -21,7 +22,7 @@ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TErr
|
|
21
22
|
onClick: () => void;
|
22
23
|
};
|
23
24
|
onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
|
24
|
-
}
|
25
|
+
} & Pick<ReturnType<typeof useFormSF<TResponse, TVariables>>, "defaultFormValuesLoading">;
|
25
26
|
/**
|
26
27
|
* `useForm` is used to manage forms. It uses Ant Design {@link https://ant.design/components/form/ Form} data scope management under the hood and returns the required props for managing the form actions.
|
27
28
|
*
|
@@ -36,5 +37,5 @@ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TErr
|
|
36
37
|
*
|
37
38
|
*
|
38
39
|
*/
|
39
|
-
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError: onMutationErrorProp, autoSave, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, optimisticUpdateMap, disableServerSideValidation: disableServerSideValidationProp, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
40
|
+
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError: onMutationErrorProp, autoSave, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, optimisticUpdateMap, defaultFormValues, disableServerSideValidation: disableServerSideValidationProp, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
40
41
|
//# sourceMappingURL=useForm.d.ts.map
|
@@ -1 +1,41 @@
|
|
1
|
-
{
|
1
|
+
import { type FormInstance, type FormProps, type ButtonProps } from "antd";
|
2
|
+
import { useForm as useFormSF, type UseFormConfig } from "sunflower-antd";
|
3
|
+
import { type AutoSaveProps } from "@refinedev/core";
|
4
|
+
import { type HttpError, type BaseRecord, type UseFormReturnType as UseFormReturnTypeCore, type UseFormProps as UseFormPropsCore, type CreateResponse, type UpdateResponse } from "@refinedev/core";
|
5
|
+
export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
6
|
+
submitOnEnter?: boolean;
|
7
|
+
/**
|
8
|
+
* Shows notification when unsaved changes exist
|
9
|
+
*/
|
10
|
+
warnWhenUnsavedChanges?: boolean;
|
11
|
+
/**
|
12
|
+
* Disables server-side validation
|
13
|
+
* @default false
|
14
|
+
* @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
|
15
|
+
*/
|
16
|
+
disableServerSideValidation?: boolean;
|
17
|
+
} & AutoSaveProps<TVariables> & Pick<UseFormConfig, "defaultFormValues">;
|
18
|
+
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
19
|
+
form: FormInstance<TVariables>;
|
20
|
+
formProps: FormProps<TVariables>;
|
21
|
+
saveButtonProps: ButtonProps & {
|
22
|
+
onClick: () => void;
|
23
|
+
};
|
24
|
+
onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
|
25
|
+
} & Pick<ReturnType<typeof useFormSF<TResponse, TVariables>>, "defaultFormValuesLoading">;
|
26
|
+
/**
|
27
|
+
* `useForm` is used to manage forms. It uses Ant Design {@link https://ant.design/components/form/ Form} data scope management under the hood and returns the required props for managing the form actions.
|
28
|
+
*
|
29
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/useForm} for more details.
|
30
|
+
*
|
31
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
32
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`}
|
33
|
+
* @typeParam TVariables - Values for params. default `{}`
|
34
|
+
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
35
|
+
* @typeParam TResponse - Result data returned by the mutation function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TData`
|
36
|
+
* @typeParam TResponseError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`}. Defaults to `TError`
|
37
|
+
*
|
38
|
+
*
|
39
|
+
*/
|
40
|
+
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError: onMutationErrorProp, autoSave, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, optimisticUpdateMap, defaultFormValues, disableServerSideValidation: disableServerSideValidationProp, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
41
|
+
//# sourceMappingURL=useForm.d.ts.map
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { type FormInstance, type FormProps, type ButtonProps } from "antd";
|
2
|
+
import { useForm as useFormSF, type UseFormConfig } from "sunflower-antd";
|
2
3
|
import { type AutoSaveProps } from "@refinedev/core";
|
3
4
|
import { type HttpError, type BaseRecord, type UseFormReturnType as UseFormReturnTypeCore, type UseFormProps as UseFormPropsCore, type CreateResponse, type UpdateResponse } from "@refinedev/core";
|
4
5
|
export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
@@ -13,7 +14,7 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
|
|
13
14
|
* @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
|
14
15
|
*/
|
15
16
|
disableServerSideValidation?: boolean;
|
16
|
-
} & AutoSaveProps<TVariables>;
|
17
|
+
} & AutoSaveProps<TVariables> & Pick<UseFormConfig, "defaultFormValues">;
|
17
18
|
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
18
19
|
form: FormInstance<TVariables>;
|
19
20
|
formProps: FormProps<TVariables>;
|
@@ -21,7 +22,7 @@ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TErr
|
|
21
22
|
onClick: () => void;
|
22
23
|
};
|
23
24
|
onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
|
24
|
-
}
|
25
|
+
} & Pick<ReturnType<typeof useFormSF<TResponse, TVariables>>, "defaultFormValuesLoading">;
|
25
26
|
/**
|
26
27
|
* `useForm` is used to manage forms. It uses Ant Design {@link https://ant.design/components/form/ Form} data scope management under the hood and returns the required props for managing the form actions.
|
27
28
|
*
|
@@ -36,5 +37,5 @@ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TErr
|
|
36
37
|
*
|
37
38
|
*
|
38
39
|
*/
|
39
|
-
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError: onMutationErrorProp, autoSave, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, optimisticUpdateMap, disableServerSideValidation: disableServerSideValidationProp, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
40
|
+
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError: onMutationErrorProp, autoSave, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, optimisticUpdateMap, defaultFormValues, disableServerSideValidation: disableServerSideValidationProp, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
40
41
|
//# sourceMappingURL=useForm.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../src/hooks/form/useForm.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,WAAW,EACjB,MAAM,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../src/hooks/form/useForm.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,WAAW,EACjB,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,SAAS,EACd,KAAK,UAAU,EAEf,KAAK,iBAAiB,IAAI,qBAAqB,EAE/C,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,cAAc,EACnB,KAAK,cAAc,EAIpB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,YAAY,CACtB,YAAY,SAAS,UAAU,GAAG,UAAU,EAC5C,MAAM,SAAS,SAAS,GAAG,SAAS,EACpC,UAAU,GAAG,EAAE,EACf,KAAK,SAAS,UAAU,GAAG,YAAY,EACvC,SAAS,SAAS,UAAU,GAAG,KAAK,EACpC,cAAc,SAAS,SAAS,GAAG,MAAM,IACvC,gBAAgB,CAClB,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,GAAG;IACF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;OAIG;IAC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 -1 +1,42 @@
|
|
1
|
-
{
|
1
|
+
import type { FormInstance, FormProps, ModalProps } from "antd";
|
2
|
+
import { type HttpError, type UseFormProps as UseFormPropsCore, type BaseRecord, type LiveModeProps, type BaseKey, type FormWithSyncWithLocationParams } from "@refinedev/core";
|
3
|
+
import { type UseFormProps, type UseFormReturnType } from "../useForm";
|
4
|
+
export type useModalFormFromSFReturnType<TResponse, TVariables> = {
|
5
|
+
open: boolean;
|
6
|
+
form: FormInstance<TVariables>;
|
7
|
+
show: (id?: BaseKey) => void;
|
8
|
+
close: () => void;
|
9
|
+
modalProps: ModalProps;
|
10
|
+
formProps: FormProps<TVariables>;
|
11
|
+
formLoading: boolean;
|
12
|
+
defaultFormValuesLoading: boolean;
|
13
|
+
formValues: {};
|
14
|
+
initialValues: {};
|
15
|
+
formResult: undefined;
|
16
|
+
submit: (values?: TVariables) => Promise<TResponse>;
|
17
|
+
/** @deprecated Please use `open` instead. */
|
18
|
+
visible: boolean;
|
19
|
+
};
|
20
|
+
type useModalFormConfig = {
|
21
|
+
action: "show" | "edit" | "create" | "clone";
|
22
|
+
};
|
23
|
+
export type UseModalFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = Omit<UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>, "saveButtonProps" | "deleteButtonProps"> & useModalFormFromSFReturnType<TResponse, TVariables>;
|
24
|
+
export type UseModalFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & useModalFormConfig & LiveModeProps & FormWithSyncWithLocationParams & {
|
25
|
+
defaultVisible?: boolean;
|
26
|
+
autoSubmitClose?: boolean;
|
27
|
+
autoResetForm?: boolean;
|
28
|
+
};
|
29
|
+
/**
|
30
|
+
* `useModalForm` hook allows you to manage a form within a modal. It returns Ant Design {@link https://ant.design/components/form/ Form} and {@link https://ant.design/components/modal/ Modal} components props.
|
31
|
+
*
|
32
|
+
* @see {@link https://refine.dev/docs/api-reference/antd/hooks/form/useModalForm} for more details.
|
33
|
+
*
|
34
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
35
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`}
|
36
|
+
* @typeParam TVariables - Values for params. default `{}`
|
37
|
+
*
|
38
|
+
*
|
39
|
+
*/
|
40
|
+
export declare const useModalForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ syncWithLocation, defaultVisible, autoSubmitClose, autoResetForm, autoSave, invalidates, ...rest }: UseModalFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseModalFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
41
|
+
export {};
|
42
|
+
//# sourceMappingURL=useModalForm.d.ts.map
|
@@ -1 +1,2 @@
|
|
1
|
-
{
|
1
|
+
export { useStepsForm, UseStepsFormProps, UseStepsFormReturnType, } from "./useStepsForm";
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1,35 @@
|
|
1
|
-
{"
|
1
|
+
import { type UseStepsFormConfig } from "sunflower-antd";
|
2
|
+
import type { FormInstance, FormProps } from "antd";
|
3
|
+
import type { HttpError, UseFormProps as UseFormPropsCore, BaseRecord } from "@refinedev/core";
|
4
|
+
import { type UseFormProps, type UseFormReturnType } from "../useForm";
|
5
|
+
export type UseStepsFormFromSFReturnType<TResponse, TVariables> = {
|
6
|
+
current: number;
|
7
|
+
gotoStep: (step: number) => Promise<TVariables> | true;
|
8
|
+
stepsProps: {
|
9
|
+
current: number;
|
10
|
+
onChange: (currentStep: number) => void;
|
11
|
+
};
|
12
|
+
formProps: FormProps<TVariables>;
|
13
|
+
formLoading: boolean;
|
14
|
+
defaultFormValuesLoading: boolean;
|
15
|
+
formValues: {};
|
16
|
+
initialValues: {};
|
17
|
+
formResult: undefined;
|
18
|
+
form: FormInstance<TVariables>;
|
19
|
+
submit: (values?: TVariables) => Promise<TResponse>;
|
20
|
+
};
|
21
|
+
export type UseStepsFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseStepsFormFromSFReturnType<TResponse, TVariables>;
|
22
|
+
export type UseStepsFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & UseStepsFormConfig;
|
23
|
+
/**
|
24
|
+
* `useStepsForm` hook allows you to split your form under an Ant Design based {@link https://ant.design/components/steps/ Steps} component and provides you with a few useful functionalities that will help you manage your form.
|
25
|
+
*
|
26
|
+
* @see {@link https://refine.dev/docs/api-reference/antd/hooks/form/useStepsForm} for more details.
|
27
|
+
*
|
28
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
29
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`}
|
30
|
+
* @typeParam TVariables - Values for params. default `{}`
|
31
|
+
*
|
32
|
+
*
|
33
|
+
*/
|
34
|
+
export declare const useStepsForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = {}, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>(props?: UseStepsFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseStepsFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
35
|
+
//# sourceMappingURL=useStepsForm.d.ts.map
|
@@ -1 +1,18 @@
|
|
1
|
-
{
|
1
|
+
import { type ButtonProps, type UploadProps } from "antd";
|
2
|
+
import { type BaseRecord, type HttpError, type UseImportReturnType, type ImportOptions } from "@refinedev/core";
|
3
|
+
/**
|
4
|
+
* `useImport` hook allows you to handle your csv import logic easily.
|
5
|
+
*
|
6
|
+
* @see {@link https://refine.dev/docs/api-reference/antd/hooks/import/useImport} for more details.
|
7
|
+
*
|
8
|
+
* @typeParam TItem - Interface of parsed csv data
|
9
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
10
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`}
|
11
|
+
* @typeParam TVariables - Values for mutation function
|
12
|
+
*
|
13
|
+
*/
|
14
|
+
export declare const useImport: <TItem = any, TData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables = any>({ resource: resourceFromProp, resourceName, mapData, paparseOptions, batchSize, onFinish, meta, metaData, dataProviderName, onProgress: onProgressFromProp, }?: ImportOptions<TItem, TVariables, TData>) => Omit<UseImportReturnType<TData, TVariables, TError>, "handleChange" | "inputProps"> & {
|
15
|
+
uploadProps: UploadProps;
|
16
|
+
buttonProps: ButtonProps;
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1,10 @@
|
|
1
|
-
|
1
|
+
export * from "./form";
|
2
|
+
export * from "./table";
|
3
|
+
export * from "./fields";
|
4
|
+
export * from "./import";
|
5
|
+
export * from "./list";
|
6
|
+
export * from "./useFileUploadState";
|
7
|
+
export * from "./modal";
|
8
|
+
export * from "./useSiderVisible";
|
9
|
+
export * from "./useThemedLayoutContext";
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
export * from "./useSimpleList";
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1,2 @@
|
|
1
|
-
{"
|
1
|
+
export { useSimpleList } from "./useSimpleList";
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1,24 @@
|
|
1
|
-
{
|
1
|
+
import { type ListProps, type FormProps } from "antd";
|
2
|
+
import { type BaseRecord, type CrudFilters, type HttpError, type useTableProps as useTablePropsCore, type useTableReturnType } from "@refinedev/core";
|
3
|
+
export type useSimpleListProps<TQueryFnData, TError, TSearchVariables, TData> = useTablePropsCore<TQueryFnData, TError, TData> & {
|
4
|
+
onSearch?: (data: TSearchVariables) => CrudFilters | Promise<CrudFilters>;
|
5
|
+
};
|
6
|
+
export type useSimpleListReturnType<TQueryFnData extends BaseRecord = BaseRecord, TSearchVariables = unknown, TData extends BaseRecord = TQueryFnData> = Omit<useTableReturnType<TData>, "tableQueryResult"> & {
|
7
|
+
listProps: ListProps<TData>;
|
8
|
+
queryResult: useTableReturnType["tableQueryResult"];
|
9
|
+
searchFormProps: FormProps<TSearchVariables>;
|
10
|
+
};
|
11
|
+
/**
|
12
|
+
* By using `useSimpleList` you get props for your records from API in accordance with Ant Design {@link https://ant.design/components/list/ `<List>`} component.
|
13
|
+
* All features such as pagination, sorting come out of the box.
|
14
|
+
*
|
15
|
+
* @see {@link https://refine.dev/docs/api-reference/antd/hooks/list/useSimpleList} for more details.
|
16
|
+
*
|
17
|
+
* @typeParam TQueryFnData - Result data returned by the query function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
18
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`}
|
19
|
+
* @typeParam TSearchVariables - Antd form values
|
20
|
+
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
21
|
+
*
|
22
|
+
*/
|
23
|
+
export declare const useSimpleList: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TSearchVariables = unknown, TData extends BaseRecord = TQueryFnData>({ resource, initialCurrent, initialPageSize, pagination, hasPagination, initialSorter, permanentSorter, initialFilter, permanentFilter, defaultSetFilterBehavior, filters: filtersFromProp, sorters: sortersFromProp, onSearch, queryOptions, syncWithLocation, successNotification, errorNotification, liveMode: liveModeFromProp, onLiveEvent, liveParams, meta, metaData, dataProviderName, }?: useSimpleListProps<TQueryFnData, TError, TSearchVariables, TData>) => useSimpleListReturnType<TData, TSearchVariables>;
|
24
|
+
//# sourceMappingURL=useSimpleList.d.ts.map
|
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
export * from "./useModal";
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|