@refinedev/antd 5.37.5 → 5.37.6
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 +33 -0
- package/README.md +109 -17
- package/dist/components/autoSaveIndicator/index.d.cts +4 -0
- package/dist/components/autoSaveIndicator/index.d.cts.map +1 -0
- package/dist/components/autoSaveIndicator/index.d.mts +4 -0
- package/dist/components/autoSaveIndicator/index.d.mts.map +1 -0
- package/dist/components/breadcrumb/index.d.cts +6 -0
- package/dist/components/breadcrumb/index.d.cts.map +1 -0
- package/dist/components/breadcrumb/index.d.mts +6 -0
- package/dist/components/breadcrumb/index.d.mts.map +1 -0
- package/dist/components/breadcrumb/index.d.ts +1 -1
- package/dist/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/components/buttons/clone/index.d.cts +11 -0
- package/dist/components/buttons/clone/index.d.cts.map +1 -0
- package/dist/components/buttons/clone/index.d.mts +11 -0
- package/dist/components/buttons/clone/index.d.mts.map +1 -0
- package/dist/components/buttons/clone/index.d.ts +1 -1
- package/dist/components/buttons/clone/index.d.ts.map +1 -1
- package/dist/components/buttons/create/index.d.cts +11 -0
- package/dist/components/buttons/create/index.d.cts.map +1 -0
- package/dist/components/buttons/create/index.d.mts +11 -0
- package/dist/components/buttons/create/index.d.mts.map +1 -0
- package/dist/components/buttons/create/index.d.ts +1 -1
- package/dist/components/buttons/create/index.d.ts.map +1 -1
- package/dist/components/buttons/delete/index.d.cts +10 -0
- package/dist/components/buttons/delete/index.d.cts.map +1 -0
- package/dist/components/buttons/delete/index.d.mts +10 -0
- package/dist/components/buttons/delete/index.d.mts.map +1 -0
- package/dist/components/buttons/delete/index.d.ts +1 -1
- package/dist/components/buttons/delete/index.d.ts.map +1 -1
- package/dist/components/buttons/edit/index.d.cts +11 -0
- package/dist/components/buttons/edit/index.d.cts.map +1 -0
- package/dist/components/buttons/edit/index.d.mts +11 -0
- package/dist/components/buttons/edit/index.d.mts.map +1 -0
- package/dist/components/buttons/edit/index.d.ts.map +1 -1
- package/dist/components/buttons/export/index.d.cts +10 -0
- package/dist/components/buttons/export/index.d.cts.map +1 -0
- package/dist/components/buttons/export/index.d.mts +10 -0
- package/dist/components/buttons/export/index.d.mts.map +1 -0
- package/dist/components/buttons/import/index.d.cts +11 -0
- package/dist/components/buttons/import/index.d.cts.map +1 -0
- package/dist/components/buttons/import/index.d.mts +11 -0
- package/dist/components/buttons/import/index.d.mts.map +1 -0
- package/dist/components/buttons/import/index.d.ts.map +1 -1
- package/dist/components/buttons/index.d.cts +12 -0
- package/dist/components/buttons/index.d.cts.map +1 -0
- package/dist/components/buttons/index.d.mts +12 -0
- package/dist/components/buttons/index.d.mts.map +1 -0
- package/dist/components/buttons/list/index.d.cts +11 -0
- package/dist/components/buttons/list/index.d.cts.map +1 -0
- package/dist/components/buttons/list/index.d.mts +11 -0
- package/dist/components/buttons/list/index.d.mts.map +1 -0
- package/dist/components/buttons/list/index.d.ts.map +1 -1
- package/dist/components/buttons/refresh/index.d.cts +10 -0
- package/dist/components/buttons/refresh/index.d.cts.map +1 -0
- package/dist/components/buttons/refresh/index.d.mts +10 -0
- package/dist/components/buttons/refresh/index.d.mts.map +1 -0
- package/dist/components/buttons/refresh/index.d.ts.map +1 -1
- package/dist/components/buttons/save/index.d.cts +10 -0
- package/dist/components/buttons/save/index.d.cts.map +1 -0
- package/dist/components/buttons/save/index.d.mts +10 -0
- package/dist/components/buttons/save/index.d.mts.map +1 -0
- package/dist/components/buttons/show/index.d.cts +11 -0
- package/dist/components/buttons/show/index.d.cts.map +1 -0
- package/dist/components/buttons/show/index.d.mts +11 -0
- package/dist/components/buttons/show/index.d.mts.map +1 -0
- package/dist/components/buttons/show/index.d.ts.map +1 -1
- package/dist/components/buttons/types.d.cts +24 -0
- package/dist/components/buttons/types.d.cts.map +1 -0
- package/dist/components/buttons/types.d.mts +24 -0
- package/dist/components/buttons/types.d.mts.map +1 -0
- package/dist/components/buttons/types.d.ts +10 -10
- package/dist/components/buttons/types.d.ts.map +1 -1
- package/dist/components/crud/create/index.d.cts +10 -0
- package/dist/components/crud/create/index.d.cts.map +1 -0
- package/dist/components/crud/create/index.d.mts +10 -0
- package/dist/components/crud/create/index.d.mts.map +1 -0
- package/dist/components/crud/edit/index.d.cts +10 -0
- package/dist/components/crud/edit/index.d.cts.map +1 -0
- package/dist/components/crud/edit/index.d.mts +10 -0
- package/dist/components/crud/edit/index.d.mts.map +1 -0
- package/dist/components/crud/index.d.cts +6 -0
- package/dist/components/crud/index.d.cts.map +1 -0
- package/dist/components/crud/index.d.mts +6 -0
- package/dist/components/crud/index.d.mts.map +1 -0
- package/dist/components/crud/list/index.d.cts +10 -0
- package/dist/components/crud/list/index.d.cts.map +1 -0
- package/dist/components/crud/list/index.d.mts +10 -0
- package/dist/components/crud/list/index.d.mts.map +1 -0
- package/dist/components/crud/show/index.d.cts +10 -0
- package/dist/components/crud/show/index.d.cts.map +1 -0
- package/dist/components/crud/show/index.d.mts +10 -0
- package/dist/components/crud/show/index.d.mts.map +1 -0
- package/dist/components/crud/types.d.cts +10 -0
- package/dist/components/crud/types.d.cts.map +1 -0
- package/dist/components/crud/types.d.mts +10 -0
- package/dist/components/crud/types.d.mts.map +1 -0
- package/dist/components/crud/types.d.ts +4 -4
- package/dist/components/crud/types.d.ts.map +1 -1
- package/dist/components/fields/boolean/index.d.cts +9 -0
- package/dist/components/fields/boolean/index.d.cts.map +1 -0
- package/dist/components/fields/boolean/index.d.mts +9 -0
- package/dist/components/fields/boolean/index.d.mts.map +1 -0
- package/dist/components/fields/date/index.d.cts +9 -0
- package/dist/components/fields/date/index.d.cts.map +1 -0
- package/dist/components/fields/date/index.d.mts +9 -0
- package/dist/components/fields/date/index.d.mts.map +1 -0
- package/dist/components/fields/email/index.d.cts +10 -0
- package/dist/components/fields/email/index.d.cts.map +1 -0
- package/dist/components/fields/email/index.d.mts +10 -0
- package/dist/components/fields/email/index.d.mts.map +1 -0
- package/dist/components/fields/file/index.d.cts +9 -0
- package/dist/components/fields/file/index.d.cts.map +1 -0
- package/dist/components/fields/file/index.d.mts +9 -0
- package/dist/components/fields/file/index.d.mts.map +1 -0
- package/dist/components/fields/image/index.d.cts +9 -0
- package/dist/components/fields/image/index.d.cts.map +1 -0
- package/dist/components/fields/image/index.d.mts +9 -0
- package/dist/components/fields/image/index.d.mts.map +1 -0
- package/dist/components/fields/index.d.cts +12 -0
- package/dist/components/fields/index.d.cts.map +1 -0
- package/dist/components/fields/index.d.mts +12 -0
- package/dist/components/fields/index.d.mts.map +1 -0
- package/dist/components/fields/markdown/index.d.cts +9 -0
- package/dist/components/fields/markdown/index.d.cts.map +1 -0
- package/dist/components/fields/markdown/index.d.mts +9 -0
- package/dist/components/fields/markdown/index.d.mts.map +1 -0
- package/dist/components/fields/number/index.d.cts +9 -0
- package/dist/components/fields/number/index.d.cts.map +1 -0
- package/dist/components/fields/number/index.d.mts +9 -0
- package/dist/components/fields/number/index.d.mts.map +1 -0
- package/dist/components/fields/tag/index.d.cts +9 -0
- package/dist/components/fields/tag/index.d.cts.map +1 -0
- package/dist/components/fields/tag/index.d.mts +9 -0
- package/dist/components/fields/tag/index.d.mts.map +1 -0
- package/dist/components/fields/text/index.d.cts +9 -0
- package/dist/components/fields/text/index.d.cts.map +1 -0
- package/dist/components/fields/text/index.d.mts +9 -0
- package/dist/components/fields/text/index.d.mts.map +1 -0
- package/dist/components/fields/types.d.cts +20 -0
- package/dist/components/fields/types.d.cts.map +1 -0
- package/dist/components/fields/types.d.mts +20 -0
- package/dist/components/fields/types.d.mts.map +1 -0
- package/dist/components/fields/types.d.ts +10 -10
- package/dist/components/fields/types.d.ts.map +1 -1
- package/dist/components/fields/url/index.d.cts +10 -0
- package/dist/components/fields/url/index.d.cts.map +1 -0
- package/dist/components/fields/url/index.d.mts +10 -0
- package/dist/components/fields/url/index.d.mts.map +1 -0
- package/dist/components/index.d.cts +24 -0
- package/dist/components/index.d.cts.map +1 -0
- package/dist/components/index.d.mts +24 -0
- package/dist/components/index.d.mts.map +1 -0
- package/dist/components/layout/header/index.d.cts +4 -0
- package/dist/components/layout/header/index.d.cts.map +1 -0
- package/dist/components/layout/header/index.d.mts +4 -0
- package/dist/components/layout/header/index.d.mts.map +1 -0
- package/dist/components/layout/index.d.cts +8 -0
- package/dist/components/layout/index.d.cts.map +1 -0
- package/dist/components/layout/index.d.mts +8 -0
- package/dist/components/layout/index.d.mts.map +1 -0
- package/dist/components/layout/sider/index.d.cts +4 -0
- package/dist/components/layout/sider/index.d.cts.map +1 -0
- package/dist/components/layout/sider/index.d.mts +4 -0
- package/dist/components/layout/sider/index.d.mts.map +1 -0
- package/dist/components/layout/sider/styles.d.cts +3 -0
- package/dist/components/layout/sider/styles.d.cts.map +1 -0
- package/dist/components/layout/sider/styles.d.mts +3 -0
- package/dist/components/layout/sider/styles.d.mts.map +1 -0
- package/dist/components/layout/title/index.d.cts +4 -0
- package/dist/components/layout/title/index.d.cts.map +1 -0
- package/dist/components/layout/title/index.d.mts +4 -0
- package/dist/components/layout/title/index.d.mts.map +1 -0
- package/dist/components/layout/types.d.cts +3 -0
- package/dist/components/layout/types.d.cts.map +1 -0
- package/dist/components/layout/types.d.mts +3 -0
- package/dist/components/layout/types.d.mts.map +1 -0
- package/dist/components/pageHeader/index.d.cts +5 -0
- package/dist/components/pageHeader/index.d.cts.map +1 -0
- package/dist/components/pageHeader/index.d.mts +5 -0
- package/dist/components/pageHeader/index.d.mts.map +1 -0
- package/dist/components/pageHeader/index.d.ts +1 -1
- package/dist/components/pageHeader/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/forgotPassword/index.d.cts +12 -0
- package/dist/components/pages/auth/components/forgotPassword/index.d.cts.map +1 -0
- package/dist/components/pages/auth/components/forgotPassword/index.d.mts +12 -0
- package/dist/components/pages/auth/components/forgotPassword/index.d.mts.map +1 -0
- package/dist/components/pages/auth/components/forgotPassword/index.d.ts +1 -1
- package/dist/components/pages/auth/components/forgotPassword/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/index.d.cts +5 -0
- package/dist/components/pages/auth/components/index.d.cts.map +1 -0
- package/dist/components/pages/auth/components/index.d.mts +5 -0
- package/dist/components/pages/auth/components/index.d.mts.map +1 -0
- package/dist/components/pages/auth/components/login/index.d.cts +12 -0
- package/dist/components/pages/auth/components/login/index.d.cts.map +1 -0
- package/dist/components/pages/auth/components/login/index.d.mts +12 -0
- package/dist/components/pages/auth/components/login/index.d.mts.map +1 -0
- package/dist/components/pages/auth/components/login/index.d.ts +1 -1
- package/dist/components/pages/auth/components/login/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/register/index.d.cts +12 -0
- package/dist/components/pages/auth/components/register/index.d.cts.map +1 -0
- package/dist/components/pages/auth/components/register/index.d.mts +12 -0
- package/dist/components/pages/auth/components/register/index.d.mts.map +1 -0
- package/dist/components/pages/auth/components/register/index.d.ts +1 -1
- package/dist/components/pages/auth/components/register/index.d.ts.map +1 -1
- package/dist/components/pages/auth/components/styles.d.cts +7 -0
- package/dist/components/pages/auth/components/styles.d.cts.map +1 -0
- package/dist/components/pages/auth/components/styles.d.mts +7 -0
- package/dist/components/pages/auth/components/styles.d.mts.map +1 -0
- package/dist/components/pages/auth/components/updatePassword/index.d.cts +12 -0
- package/dist/components/pages/auth/components/updatePassword/index.d.cts.map +1 -0
- package/dist/components/pages/auth/components/updatePassword/index.d.mts +12 -0
- package/dist/components/pages/auth/components/updatePassword/index.d.mts.map +1 -0
- package/dist/components/pages/auth/components/updatePassword/index.d.ts +1 -1
- package/dist/components/pages/auth/components/updatePassword/index.d.ts.map +1 -1
- package/dist/components/pages/auth/index.d.cts +14 -0
- package/dist/components/pages/auth/index.d.cts.map +1 -0
- package/dist/components/pages/auth/index.d.mts +14 -0
- package/dist/components/pages/auth/index.d.mts.map +1 -0
- package/dist/components/pages/auth/index.d.ts +1 -1
- package/dist/components/pages/auth/index.d.ts.map +1 -1
- package/dist/components/pages/error/index.d.cts +10 -0
- package/dist/components/pages/error/index.d.cts.map +1 -0
- package/dist/components/pages/error/index.d.mts +10 -0
- package/dist/components/pages/error/index.d.mts.map +1 -0
- package/dist/components/pages/index.d.cts +7 -0
- package/dist/components/pages/index.d.cts.map +1 -0
- package/dist/components/pages/index.d.mts +7 -0
- package/dist/components/pages/index.d.mts.map +1 -0
- package/dist/components/pages/login/index.d.cts +15 -0
- package/dist/components/pages/login/index.d.cts.map +1 -0
- package/dist/components/pages/login/index.d.mts +15 -0
- package/dist/components/pages/login/index.d.mts.map +1 -0
- package/dist/components/pages/login/styles.d.cts +6 -0
- package/dist/components/pages/login/styles.d.cts.map +1 -0
- package/dist/components/pages/login/styles.d.mts +6 -0
- package/dist/components/pages/login/styles.d.mts.map +1 -0
- package/dist/components/pages/ready/index.d.cts +9 -0
- package/dist/components/pages/ready/index.d.cts.map +1 -0
- package/dist/components/pages/ready/index.d.mts +9 -0
- package/dist/components/pages/ready/index.d.mts.map +1 -0
- package/dist/components/pages/welcome/index.d.cts +7 -0
- package/dist/components/pages/welcome/index.d.cts.map +1 -0
- package/dist/components/pages/welcome/index.d.mts +7 -0
- package/dist/components/pages/welcome/index.d.mts.map +1 -0
- package/dist/components/table/components/filterDropdown/index.d.cts +13 -0
- package/dist/components/table/components/filterDropdown/index.d.cts.map +1 -0
- package/dist/components/table/components/filterDropdown/index.d.mts +13 -0
- package/dist/components/table/components/filterDropdown/index.d.mts.map +1 -0
- package/dist/components/table/components/filterDropdown/index.d.ts +2 -2
- package/dist/components/table/components/filterDropdown/index.d.ts.map +1 -1
- package/dist/components/table/components/index.d.cts +2 -0
- package/dist/components/table/components/index.d.cts.map +1 -0
- package/dist/components/table/components/index.d.mts +2 -0
- package/dist/components/table/components/index.d.mts.map +1 -0
- package/dist/components/table/index.d.cts +2 -0
- package/dist/components/table/index.d.cts.map +1 -0
- package/dist/components/table/index.d.mts +2 -0
- package/dist/components/table/index.d.mts.map +1 -0
- package/dist/components/themedLayout/header/index.d.cts +7 -0
- package/dist/components/themedLayout/header/index.d.cts.map +1 -0
- package/dist/components/themedLayout/header/index.d.mts +7 -0
- package/dist/components/themedLayout/header/index.d.mts.map +1 -0
- package/dist/components/themedLayout/index.d.cts +7 -0
- package/dist/components/themedLayout/index.d.cts.map +1 -0
- package/dist/components/themedLayout/index.d.mts +7 -0
- package/dist/components/themedLayout/index.d.mts.map +1 -0
- package/dist/components/themedLayout/sider/index.d.cts +7 -0
- package/dist/components/themedLayout/sider/index.d.cts.map +1 -0
- package/dist/components/themedLayout/sider/index.d.mts +7 -0
- package/dist/components/themedLayout/sider/index.d.mts.map +1 -0
- package/dist/components/themedLayout/sider/styles.d.cts +3 -0
- package/dist/components/themedLayout/sider/styles.d.cts.map +1 -0
- package/dist/components/themedLayout/sider/styles.d.mts +3 -0
- package/dist/components/themedLayout/sider/styles.d.mts.map +1 -0
- package/dist/components/themedLayout/title/index.d.cts +7 -0
- package/dist/components/themedLayout/title/index.d.cts.map +1 -0
- package/dist/components/themedLayout/title/index.d.mts +7 -0
- package/dist/components/themedLayout/title/index.d.mts.map +1 -0
- package/dist/components/themedLayout/types.d.cts +3 -0
- package/dist/components/themedLayout/types.d.cts.map +1 -0
- package/dist/components/themedLayout/types.d.mts +3 -0
- package/dist/components/themedLayout/types.d.mts.map +1 -0
- package/dist/components/themedLayoutV2/header/index.d.cts +4 -0
- package/dist/components/themedLayoutV2/header/index.d.cts.map +1 -0
- package/dist/components/themedLayoutV2/header/index.d.mts +4 -0
- package/dist/components/themedLayoutV2/header/index.d.mts.map +1 -0
- package/dist/components/themedLayoutV2/index.d.cts +4 -0
- package/dist/components/themedLayoutV2/index.d.cts.map +1 -0
- package/dist/components/themedLayoutV2/index.d.mts +4 -0
- package/dist/components/themedLayoutV2/index.d.mts.map +1 -0
- package/dist/components/themedLayoutV2/sider/index.d.cts +4 -0
- package/dist/components/themedLayoutV2/sider/index.d.cts.map +1 -0
- package/dist/components/themedLayoutV2/sider/index.d.mts +4 -0
- package/dist/components/themedLayoutV2/sider/index.d.mts.map +1 -0
- package/dist/components/themedLayoutV2/sider/styles.d.cts +3 -0
- package/dist/components/themedLayoutV2/sider/styles.d.cts.map +1 -0
- package/dist/components/themedLayoutV2/sider/styles.d.mts +3 -0
- package/dist/components/themedLayoutV2/sider/styles.d.mts.map +1 -0
- package/dist/components/themedLayoutV2/title/index.d.cts +4 -0
- package/dist/components/themedLayoutV2/title/index.d.cts.map +1 -0
- package/dist/components/themedLayoutV2/title/index.d.mts +4 -0
- package/dist/components/themedLayoutV2/title/index.d.mts.map +1 -0
- package/dist/components/themedLayoutV2/types.d.cts +6 -0
- package/dist/components/themedLayoutV2/types.d.cts.map +1 -0
- package/dist/components/themedLayoutV2/types.d.mts +6 -0
- package/dist/components/themedLayoutV2/types.d.mts.map +1 -0
- package/dist/components/themedLayoutV2/types.d.ts +1 -1
- package/dist/components/themedLayoutV2/types.d.ts.map +1 -1
- package/dist/components/undoableNotification/index.d.cts +10 -0
- package/dist/components/undoableNotification/index.d.cts.map +1 -0
- package/dist/components/undoableNotification/index.d.mts +10 -0
- package/dist/components/undoableNotification/index.d.mts.map +1 -0
- package/dist/components/undoableNotification/index.d.ts +1 -1
- package/dist/components/undoableNotification/index.d.ts.map +1 -1
- package/dist/contexts/index.d.cts +2 -0
- package/dist/contexts/index.d.cts.map +1 -0
- package/dist/contexts/index.d.mts +2 -0
- package/dist/contexts/index.d.mts.map +1 -0
- package/dist/contexts/themedLayoutContext/IThemedLayoutContext.d.cts +7 -0
- package/dist/contexts/themedLayoutContext/IThemedLayoutContext.d.cts.map +1 -0
- package/dist/contexts/themedLayoutContext/IThemedLayoutContext.d.mts +7 -0
- package/dist/contexts/themedLayoutContext/IThemedLayoutContext.d.mts.map +1 -0
- package/dist/contexts/themedLayoutContext/index.d.cts +8 -0
- package/dist/contexts/themedLayoutContext/index.d.cts.map +1 -0
- package/dist/contexts/themedLayoutContext/index.d.mts +8 -0
- package/dist/contexts/themedLayoutContext/index.d.mts.map +1 -0
- package/dist/definitions/index.d.cts +4 -0
- package/dist/definitions/index.d.cts.map +1 -0
- package/dist/definitions/index.d.mts +4 -0
- package/dist/definitions/index.d.mts.map +1 -0
- package/dist/definitions/table/index.d.cts +13 -0
- package/dist/definitions/table/index.d.cts.map +1 -0
- package/dist/definitions/table/index.d.mts +13 -0
- package/dist/definitions/table/index.d.mts.map +1 -0
- package/dist/definitions/table/index.d.ts +6 -3
- package/dist/definitions/table/index.d.ts.map +1 -1
- package/dist/definitions/themes/index.d.cts +6 -0
- package/dist/definitions/themes/index.d.cts.map +1 -0
- package/dist/definitions/themes/index.d.mts +6 -0
- package/dist/definitions/themes/index.d.mts.map +1 -0
- package/dist/definitions/themes/index.d.ts +2 -2
- package/dist/definitions/themes/index.d.ts.map +1 -1
- package/dist/definitions/upload/index.d.cts +4 -0
- package/dist/definitions/upload/index.d.cts.map +1 -0
- package/dist/definitions/upload/index.d.mts +4 -0
- package/dist/definitions/upload/index.d.mts.map +1 -0
- package/dist/hooks/fields/index.d.cts +4 -0
- package/dist/hooks/fields/index.d.cts.map +1 -0
- package/dist/hooks/fields/index.d.mts +4 -0
- package/dist/hooks/fields/index.d.mts.map +1 -0
- package/dist/hooks/fields/useCheckboxGroup/index.d.cts +29 -0
- package/dist/hooks/fields/useCheckboxGroup/index.d.cts.map +1 -0
- package/dist/hooks/fields/useCheckboxGroup/index.d.mts +29 -0
- package/dist/hooks/fields/useCheckboxGroup/index.d.mts.map +1 -0
- package/dist/hooks/fields/useCheckboxGroup/index.d.ts +2 -2
- package/dist/hooks/fields/useCheckboxGroup/index.d.ts.map +1 -1
- package/dist/hooks/fields/useRadioGroup/index.d.cts +29 -0
- package/dist/hooks/fields/useRadioGroup/index.d.cts.map +1 -0
- package/dist/hooks/fields/useRadioGroup/index.d.mts +29 -0
- package/dist/hooks/fields/useRadioGroup/index.d.mts.map +1 -0
- package/dist/hooks/fields/useRadioGroup/index.d.ts +2 -2
- package/dist/hooks/fields/useRadioGroup/index.d.ts.map +1 -1
- package/dist/hooks/fields/useSelect/index.d.cts +20 -0
- package/dist/hooks/fields/useSelect/index.d.cts.map +1 -0
- package/dist/hooks/fields/useSelect/index.d.mts +20 -0
- package/dist/hooks/fields/useSelect/index.d.mts.map +1 -0
- package/dist/hooks/fields/useSelect/index.d.ts +1 -1
- package/dist/hooks/fields/useSelect/index.d.ts.map +1 -1
- package/dist/hooks/form/index.d.cts +5 -0
- package/dist/hooks/form/index.d.cts.map +1 -0
- package/dist/hooks/form/index.d.mts +5 -0
- package/dist/hooks/form/index.d.mts.map +1 -0
- package/dist/hooks/form/useDrawerForm/index.d.cts +2 -0
- package/dist/hooks/form/useDrawerForm/index.d.cts.map +1 -0
- package/dist/hooks/form/useDrawerForm/index.d.mts +2 -0
- package/dist/hooks/form/useDrawerForm/index.d.mts.map +1 -0
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.cts +37 -0
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.cts.map +1 -0
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.mts +37 -0
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.mts.map +1 -0
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.ts +2 -2
- package/dist/hooks/form/useDrawerForm/useDrawerForm.d.ts.map +1 -1
- package/dist/hooks/form/useForm.d.cts +40 -0
- package/dist/hooks/form/useForm.d.cts.map +1 -0
- package/dist/hooks/form/useForm.d.mts +40 -0
- package/dist/hooks/form/useForm.d.mts.map +1 -0
- package/dist/hooks/form/useForm.d.ts +2 -2
- package/dist/hooks/form/useForm.d.ts.map +1 -1
- package/dist/hooks/form/useModalForm/index.d.cts +2 -0
- package/dist/hooks/form/useModalForm/index.d.cts.map +1 -0
- package/dist/hooks/form/useModalForm/index.d.mts +2 -0
- package/dist/hooks/form/useModalForm/index.d.mts.map +1 -0
- package/dist/hooks/form/useModalForm/useModalForm.d.cts +42 -0
- package/dist/hooks/form/useModalForm/useModalForm.d.cts.map +1 -0
- package/dist/hooks/form/useModalForm/useModalForm.d.mts +42 -0
- package/dist/hooks/form/useModalForm/useModalForm.d.mts.map +1 -0
- package/dist/hooks/form/useModalForm/useModalForm.d.ts +4 -4
- package/dist/hooks/form/useModalForm/useModalForm.d.ts.map +1 -1
- package/dist/hooks/form/useStepsForm/index.d.cts +2 -0
- package/dist/hooks/form/useStepsForm/index.d.cts.map +1 -0
- package/dist/hooks/form/useStepsForm/index.d.mts +2 -0
- package/dist/hooks/form/useStepsForm/index.d.mts.map +1 -0
- package/dist/hooks/form/useStepsForm/useStepsForm.d.cts +35 -0
- package/dist/hooks/form/useStepsForm/useStepsForm.d.cts.map +1 -0
- package/dist/hooks/form/useStepsForm/useStepsForm.d.mts +35 -0
- package/dist/hooks/form/useStepsForm/useStepsForm.d.mts.map +1 -0
- package/dist/hooks/form/useStepsForm/useStepsForm.d.ts +3 -3
- package/dist/hooks/form/useStepsForm/useStepsForm.d.ts.map +1 -1
- package/dist/hooks/import/index.d.cts +18 -0
- package/dist/hooks/import/index.d.cts.map +1 -0
- package/dist/hooks/import/index.d.mts +18 -0
- package/dist/hooks/import/index.d.mts.map +1 -0
- package/dist/hooks/import/index.d.ts.map +1 -1
- package/dist/hooks/index.d.cts +10 -0
- package/dist/hooks/index.d.cts.map +1 -0
- package/dist/hooks/index.d.mts +10 -0
- package/dist/hooks/index.d.mts.map +1 -0
- package/dist/hooks/list/index.d.cts +2 -0
- package/dist/hooks/list/index.d.cts.map +1 -0
- package/dist/hooks/list/index.d.mts +2 -0
- package/dist/hooks/list/index.d.mts.map +1 -0
- package/dist/hooks/list/useSimpleList/index.d.cts +2 -0
- package/dist/hooks/list/useSimpleList/index.d.cts.map +1 -0
- package/dist/hooks/list/useSimpleList/index.d.mts +2 -0
- package/dist/hooks/list/useSimpleList/index.d.mts.map +1 -0
- package/dist/hooks/list/useSimpleList/useSimpleList.d.cts +24 -0
- package/dist/hooks/list/useSimpleList/useSimpleList.d.cts.map +1 -0
- package/dist/hooks/list/useSimpleList/useSimpleList.d.mts +24 -0
- package/dist/hooks/list/useSimpleList/useSimpleList.d.mts.map +1 -0
- package/dist/hooks/list/useSimpleList/useSimpleList.d.ts +3 -3
- package/dist/hooks/list/useSimpleList/useSimpleList.d.ts.map +1 -1
- package/dist/hooks/modal/index.d.cts +2 -0
- package/dist/hooks/modal/index.d.cts.map +1 -0
- package/dist/hooks/modal/index.d.mts +2 -0
- package/dist/hooks/modal/index.d.mts.map +1 -0
- package/dist/hooks/modal/useModal/index.d.cts +18 -0
- package/dist/hooks/modal/useModal/index.d.cts.map +1 -0
- package/dist/hooks/modal/useModal/index.d.mts +18 -0
- package/dist/hooks/modal/useModal/index.d.mts.map +1 -0
- package/dist/hooks/modal/useModal/index.d.ts +2 -2
- package/dist/hooks/modal/useModal/index.d.ts.map +1 -1
- package/dist/hooks/table/index.d.cts +3 -0
- package/dist/hooks/table/index.d.cts.map +1 -0
- package/dist/hooks/table/index.d.mts +3 -0
- package/dist/hooks/table/index.d.mts.map +1 -0
- package/dist/hooks/table/useEditableTable/index.d.cts +2 -0
- package/dist/hooks/table/useEditableTable/index.d.cts.map +1 -0
- package/dist/hooks/table/useEditableTable/index.d.mts +2 -0
- package/dist/hooks/table/useEditableTable/index.d.mts.map +1 -0
- package/dist/hooks/table/useEditableTable/useEditableTable.d.cts +40 -0
- package/dist/hooks/table/useEditableTable/useEditableTable.d.cts.map +1 -0
- package/dist/hooks/table/useEditableTable/useEditableTable.d.mts +40 -0
- package/dist/hooks/table/useEditableTable/useEditableTable.d.mts.map +1 -0
- package/dist/hooks/table/useEditableTable/useEditableTable.d.ts +2 -2
- package/dist/hooks/table/useEditableTable/useEditableTable.d.ts.map +1 -1
- package/dist/hooks/table/useTable/index.d.cts +2 -0
- package/dist/hooks/table/useTable/index.d.cts.map +1 -0
- package/dist/hooks/table/useTable/index.d.mts +2 -0
- package/dist/hooks/table/useTable/index.d.mts.map +1 -0
- package/dist/hooks/table/useTable/paginationLink.d.cts +8 -0
- package/dist/hooks/table/useTable/paginationLink.d.cts.map +1 -0
- package/dist/hooks/table/useTable/paginationLink.d.mts +8 -0
- package/dist/hooks/table/useTable/paginationLink.d.mts.map +1 -0
- package/dist/hooks/table/useTable/useTable.d.cts +24 -0
- package/dist/hooks/table/useTable/useTable.d.cts.map +1 -0
- package/dist/hooks/table/useTable/useTable.d.mts +24 -0
- package/dist/hooks/table/useTable/useTable.d.mts.map +1 -0
- package/dist/hooks/table/useTable/useTable.d.ts +2 -2
- package/dist/hooks/table/useTable/useTable.d.ts.map +1 -1
- package/dist/hooks/useFileUploadState/index.d.cts +7 -0
- package/dist/hooks/useFileUploadState/index.d.cts.map +1 -0
- package/dist/hooks/useFileUploadState/index.d.mts +7 -0
- package/dist/hooks/useFileUploadState/index.d.mts.map +1 -0
- package/dist/hooks/useFileUploadState/index.d.ts +1 -1
- package/dist/hooks/useFileUploadState/index.d.ts.map +1 -1
- package/dist/hooks/useSiderVisible/index.d.cts +11 -0
- package/dist/hooks/useSiderVisible/index.d.cts.map +1 -0
- package/dist/hooks/useSiderVisible/index.d.mts +11 -0
- package/dist/hooks/useSiderVisible/index.d.mts.map +1 -0
- package/dist/hooks/useSiderVisible/index.d.ts +1 -1
- package/dist/hooks/useSiderVisible/index.d.ts.map +1 -1
- package/dist/hooks/useThemedLayoutContext/index.d.cts +4 -0
- package/dist/hooks/useThemedLayoutContext/index.d.cts.map +1 -0
- package/dist/hooks/useThemedLayoutContext/index.d.mts +4 -0
- package/dist/hooks/useThemedLayoutContext/index.d.mts.map +1 -0
- package/dist/hooks/useThemedLayoutContext/index.d.ts +1 -1
- package/dist/hooks/useThemedLayoutContext/index.d.ts.map +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -0
- package/dist/interfaces/field.d.cts +4 -0
- package/dist/interfaces/field.d.cts.map +1 -0
- package/dist/interfaces/field.d.mts +4 -0
- package/dist/interfaces/field.d.mts.map +1 -0
- package/dist/interfaces/field.d.ts +1 -1
- package/dist/interfaces/field.d.ts.map +1 -1
- package/dist/interfaces/index.d.cts +19 -0
- package/dist/interfaces/index.d.cts.map +1 -0
- package/dist/interfaces/index.d.mts +19 -0
- package/dist/interfaces/index.d.mts.map +1 -0
- package/dist/interfaces/index.d.ts +3 -3
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/upload.d.cts +10 -0
- package/dist/interfaces/upload.d.cts.map +1 -0
- package/dist/interfaces/upload.d.mts +10 -0
- package/dist/interfaces/upload.d.mts.map +1 -0
- package/dist/providers/index.d.cts +2 -0
- package/dist/providers/index.d.cts.map +1 -0
- package/dist/providers/index.d.mts +2 -0
- package/dist/providers/index.d.mts.map +1 -0
- package/dist/providers/notificationProvider/index.d.cts +8 -0
- package/dist/providers/notificationProvider/index.d.cts.map +1 -0
- package/dist/providers/notificationProvider/index.d.mts +8 -0
- package/dist/providers/notificationProvider/index.d.mts.map +1 -0
- package/package.json +31 -14
- package/src/components/buttons/clone/index.tsx +16 -67
- package/src/components/buttons/create/index.tsx +17 -66
- package/src/components/buttons/delete/index.tsx +35 -90
- package/src/components/buttons/edit/index.tsx +15 -67
- package/src/components/buttons/export/index.tsx +3 -3
- package/src/components/buttons/import/index.tsx +5 -3
- package/src/components/buttons/list/index.tsx +14 -86
- package/src/components/buttons/refresh/index.tsx +8 -38
- package/src/components/buttons/save/index.tsx +3 -3
- package/src/components/buttons/show/index.tsx +15 -66
- package/src/components/table/components/filterDropdown/index.tsx +2 -2
- package/src/definitions/table/index.ts +15 -3
- package/src/hooks/form/useForm.ts +3 -1
- package/src/hooks/table/useTable/useTable.ts +3 -7
- package/tsconfig.json +5 -1
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +0 -1
- package/dist/iife/index.js +0 -72
- package/dist/iife/index.js.map +0 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
@@ -0,0 +1,29 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { QueryObserverResult } from "@tanstack/react-query";
|
3
|
+
import type { Radio } from "antd";
|
4
|
+
import { BaseKey, BaseOption, BaseRecord, GetListResponse, HttpError, 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, onLiveEvent, liveParams, meta, metaData, dataProviderName, }: UseRadioGroupProps<TQueryFnData, TError, TData>) => UseRadioGroupReturnType<TData, TOption>;
|
28
|
+
export {};
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/fields/useRadioGroup/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,eAAe,EACf,SAAS,EAGT,cAAc,EACf,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,EAAE,KAAK,IAAI,IAAI,CACzD,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAC3C,cAAc,CACf,GAAG;IACF;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;;;;;GASG;AAEH,eAAO,MAAM,aAAa,kWAsBvB,mBAAmB,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,KAAG,wBACnD,KAAK,EACL,OAAO,CAiCR,CAAC"}
|
@@ -2,13 +2,13 @@
|
|
2
2
|
import { QueryObserverResult } from "@tanstack/react-query";
|
3
3
|
import type { Radio } from "antd";
|
4
4
|
import { BaseKey, BaseOption, BaseRecord, GetListResponse, HttpError, UseSelectProps } from "@refinedev/core";
|
5
|
-
export
|
5
|
+
export type UseRadioGroupReturnType<TData extends BaseRecord = BaseRecord, TOption extends BaseOption = BaseOption> = {
|
6
6
|
radioGroupProps: Omit<React.ComponentProps<typeof Radio.Group>, "options"> & {
|
7
7
|
options: TOption[];
|
8
8
|
};
|
9
9
|
queryResult: QueryObserverResult<GetListResponse<TData>>;
|
10
10
|
};
|
11
|
-
|
11
|
+
type UseRadioGroupProps<TQueryFnData, TError, TData> = Omit<UseSelectProps<TQueryFnData, TError, TData>, "defaultValue"> & {
|
12
12
|
/**
|
13
13
|
* Sets the default value
|
14
14
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/fields/useRadioGroup/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,eAAe,EACf,SAAS,EAGT,cAAc,EACf,MAAM,iBAAiB,CAAC;AAEzB,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/fields/useRadioGroup/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EACL,OAAO,EACP,UAAU,EACV,UAAU,EACV,eAAe,EACf,SAAS,EAGT,cAAc,EACf,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,EAAE,KAAK,IAAI,IAAI,CACzD,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAC3C,cAAc,CACf,GAAG;IACF;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;;;;;GASG;AAEH,eAAO,MAAM,aAAa,kWAsBvB,mBAAmB,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,KAAG,wBACnD,KAAK,EACL,OAAO,CAiCR,CAAC"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { SelectProps } from "antd/lib/select";
|
2
|
+
import { QueryObserverResult } from "@tanstack/react-query";
|
3
|
+
import { BaseRecord, GetManyResponse, GetListResponse, HttpError, UseSelectProps, 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
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/fields/useSelect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAEL,UAAU,EACV,eAAe,EACf,eAAe,EACf,SAAS,EACT,cAAc,EACd,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,mBAAmB,CAC7B,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,OAAO,SAAS,UAAU,GAAG,UAAU,IACrC;IACF,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC,WAAW,EAAE,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;IACzD,uBAAuB,EAAE,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;CACtE,CAAC;AAEF;;;;;;;;;GASG;AAEH,eAAO,MAAM,SAAS,gLAMb,eAAe,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,KACjD,oBAAoB,KAAK,EAAE,OAAO,CAepC,CAAC"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { SelectProps } from "antd/lib/select";
|
2
|
+
import { QueryObserverResult } from "@tanstack/react-query";
|
3
|
+
import { BaseRecord, GetManyResponse, GetListResponse, HttpError, UseSelectProps, 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
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/fields/useSelect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAEL,UAAU,EACV,eAAe,EACf,eAAe,EACf,SAAS,EACT,cAAc,EACd,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,mBAAmB,CAC7B,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,OAAO,SAAS,UAAU,GAAG,UAAU,IACrC;IACF,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC,WAAW,EAAE,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;IACzD,uBAAuB,EAAE,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;CACtE,CAAC;AAEF;;;;;;;;;GASG;AAEH,eAAO,MAAM,SAAS,gLAMb,eAAe,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,KACjD,oBAAoB,KAAK,EAAE,OAAO,CAepC,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { SelectProps } from "antd/lib/select";
|
2
2
|
import { QueryObserverResult } from "@tanstack/react-query";
|
3
3
|
import { BaseRecord, GetManyResponse, GetListResponse, HttpError, UseSelectProps, BaseOption } from "@refinedev/core";
|
4
|
-
export
|
4
|
+
export type UseSelectReturnType<TData extends BaseRecord = BaseRecord, TOption extends BaseOption = BaseOption> = {
|
5
5
|
selectProps: SelectProps<TOption>;
|
6
6
|
queryResult: QueryObserverResult<GetListResponse<TData>>;
|
7
7
|
defaultValueQueryResult: QueryObserverResult<GetManyResponse<TData>>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/fields/useSelect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAEL,UAAU,EACV,eAAe,EACf,eAAe,EACf,SAAS,EACT,cAAc,EACd,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/fields/useSelect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAEL,UAAU,EACV,eAAe,EACf,eAAe,EACf,SAAS,EACT,cAAc,EACd,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,mBAAmB,CAC7B,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,OAAO,SAAS,UAAU,GAAG,UAAU,IACrC;IACF,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC,WAAW,EAAE,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;IACzD,uBAAuB,EAAE,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;CACtE,CAAC;AAEF;;;;;;;;;GASG;AAEH,eAAO,MAAM,SAAS,gLAMb,eAAe,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,KACjD,oBAAoB,KAAK,EAAE,OAAO,CAepC,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useDrawerForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useDrawerForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { UseFormConfig } from "sunflower-antd";
|
2
|
+
import { FormInstance, FormProps, DrawerProps, ButtonProps } from "antd";
|
3
|
+
import { UseFormProps as UseFormPropsCore, HttpError, LiveModeProps, BaseRecord, FormWithSyncWithLocationParams, BaseKey } from "@refinedev/core";
|
4
|
+
import { UseFormProps, UseFormReturnType } from "../useForm";
|
5
|
+
import { DeleteButtonProps } from "../../../components";
|
6
|
+
export interface UseDrawerFormConfig extends UseFormConfig {
|
7
|
+
action: "show" | "edit" | "create" | "clone";
|
8
|
+
}
|
9
|
+
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 & {
|
10
|
+
defaultVisible?: boolean;
|
11
|
+
autoSubmitClose?: boolean;
|
12
|
+
autoResetForm?: boolean;
|
13
|
+
};
|
14
|
+
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> & {
|
15
|
+
formProps: FormProps<TVariables> & {
|
16
|
+
form: FormInstance<TVariables>;
|
17
|
+
};
|
18
|
+
show: (id?: BaseKey) => void;
|
19
|
+
close: () => void;
|
20
|
+
drawerProps: DrawerProps;
|
21
|
+
saveButtonProps: ButtonProps;
|
22
|
+
deleteButtonProps: DeleteButtonProps;
|
23
|
+
formLoading: boolean;
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
* `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.
|
27
|
+
*
|
28
|
+
* @see {@link https://refine.dev/docs/api-reference/antd/hooks/form/useDrawerForm} for more details.
|
29
|
+
*
|
30
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
31
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`}
|
32
|
+
* @typeParam TVariables - Values for params. default `{}`
|
33
|
+
*
|
34
|
+
*
|
35
|
+
*/
|
36
|
+
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>;
|
37
|
+
//# sourceMappingURL=useDrawerForm.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useDrawerForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useDrawerForm/useDrawerForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACzE,OAAO,EAGL,YAAY,IAAI,gBAAgB,EAChC,SAAS,EACT,aAAa,EACb,UAAU,EACV,8BAA8B,EAC9B,OAAO,EAMR,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAW,Y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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"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { UseFormConfig } from "sunflower-antd";
|
2
|
+
import { FormInstance, FormProps, DrawerProps, ButtonProps } from "antd";
|
3
|
+
import { UseFormProps as UseFormPropsCore, HttpError, LiveModeProps, BaseRecord, FormWithSyncWithLocationParams, BaseKey } from "@refinedev/core";
|
4
|
+
import { UseFormProps, UseFormReturnType } from "../useForm";
|
5
|
+
import { DeleteButtonProps } from "../../../components";
|
6
|
+
export interface UseDrawerFormConfig extends UseFormConfig {
|
7
|
+
action: "show" | "edit" | "create" | "clone";
|
8
|
+
}
|
9
|
+
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 & {
|
10
|
+
defaultVisible?: boolean;
|
11
|
+
autoSubmitClose?: boolean;
|
12
|
+
autoResetForm?: boolean;
|
13
|
+
};
|
14
|
+
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> & {
|
15
|
+
formProps: FormProps<TVariables> & {
|
16
|
+
form: FormInstance<TVariables>;
|
17
|
+
};
|
18
|
+
show: (id?: BaseKey) => void;
|
19
|
+
close: () => void;
|
20
|
+
drawerProps: DrawerProps;
|
21
|
+
saveButtonProps: ButtonProps;
|
22
|
+
deleteButtonProps: DeleteButtonProps;
|
23
|
+
formLoading: boolean;
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
* `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.
|
27
|
+
*
|
28
|
+
* @see {@link https://refine.dev/docs/api-reference/antd/hooks/form/useDrawerForm} for more details.
|
29
|
+
*
|
30
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
31
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`}
|
32
|
+
* @typeParam TVariables - Values for params. default `{}`
|
33
|
+
*
|
34
|
+
*
|
35
|
+
*/
|
36
|
+
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>;
|
37
|
+
//# sourceMappingURL=useDrawerForm.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useDrawerForm.d.ts","sourceRoot":"","sources":["../../../../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f,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"}
|
@@ -6,12 +6,12 @@ import { DeleteButtonProps } from "../../../components";
|
|
6
6
|
export interface UseDrawerFormConfig extends UseFormConfig {
|
7
7
|
action: "show" | "edit" | "create" | "clone";
|
8
8
|
}
|
9
|
-
export
|
9
|
+
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 & {
|
10
10
|
defaultVisible?: boolean;
|
11
11
|
autoSubmitClose?: boolean;
|
12
12
|
autoResetForm?: boolean;
|
13
13
|
};
|
14
|
-
export
|
14
|
+
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> & {
|
15
15
|
formProps: FormProps<TVariables> & {
|
16
16
|
form: FormInstance<TVariables>;
|
17
17
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useDrawerForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useDrawerForm/useDrawerForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACzE,OAAO,EAGL,YAAY,IAAI,gBAAgB,EAChC,SAAS,EACT,aAAa,EACb,UAAU,EACV,8BAA8B,EAC9B,OAAO,EAMR,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAW,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC9C;AAED,
|
1
|
+
{"version":3,"file":"useDrawerForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useDrawerForm/useDrawerForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACzE,OAAO,EAGL,YAAY,IAAI,gBAAgB,EAChC,SAAS,E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AAC,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"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { FormInstance, FormProps, ButtonProps } from "antd";
|
2
|
+
import { AutoSaveProps } from "@refinedev/core";
|
3
|
+
import { HttpError, BaseRecord, UseFormReturnType as UseFormReturnTypeCore, UseFormProps as UseFormPropsCore, CreateResponse, UpdateResponse } from "@refinedev/core";
|
4
|
+
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> & {
|
5
|
+
submitOnEnter?: boolean;
|
6
|
+
/**
|
7
|
+
* Shows notification when unsaved changes exist
|
8
|
+
*/
|
9
|
+
warnWhenUnsavedChanges?: boolean;
|
10
|
+
/**
|
11
|
+
* Disables server-side validation
|
12
|
+
* @default false
|
13
|
+
* @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
|
14
|
+
*/
|
15
|
+
disableServerSideValidation?: boolean;
|
16
|
+
} & AutoSaveProps<TVariables>;
|
17
|
+
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
|
+
form: FormInstance<TVariables>;
|
19
|
+
formProps: FormProps<TVariables>;
|
20
|
+
saveButtonProps: ButtonProps & {
|
21
|
+
onClick: () => void;
|
22
|
+
};
|
23
|
+
onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
* `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
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/useForm} for more details.
|
29
|
+
*
|
30
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
31
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`}
|
32
|
+
* @typeParam TVariables - Values for params. default `{}`
|
33
|
+
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
34
|
+
* @typeParam TResponse - Result data returned by the mutation function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TData`
|
35
|
+
* @typeParam TResponseError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`}. Defaults to `TError`
|
36
|
+
*
|
37
|
+
*
|
38
|
+
*/
|
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
|
+
//# sourceMappingURL=useForm.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../src/hooks/form/useForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAQ,WAAW,EAAE,MAAM,MAAM,CAAC;AAElE,OAAO,EACL,aAAa,EAGd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,SAAS,EACT,UAAU,EAEV,iBAAiB,IAAI,qBAAqB,EAE1C,YAAY,IAAI,gBAAgB,EAChC,cAAc,EACd,cAAc,EAIf,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;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;AAE9B,MAAM,MAAM,iBAAiB,CAC3B,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,qBAAqB,CACvB,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,GAAG;IACF,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAC/B,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACjC,eAAe,EAAE,WAAW,GAAG;QAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC;IACF,QAAQ,EAAE,CACR,MAAM,CAAC,EAAE,UAAU,KAChB,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;CAC5E,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO,owBAoCjB,aACD,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,KAAQ,kBACP,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CA6Kf,CAAC"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { FormInstance, FormProps, ButtonProps } from "antd";
|
2
|
+
import { AutoSaveProps } from "@refinedev/core";
|
3
|
+
import { HttpError, BaseRecord, UseFormReturnType as UseFormReturnTypeCore, UseFormProps as UseFormPropsCore, CreateResponse, UpdateResponse } from "@refinedev/core";
|
4
|
+
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> & {
|
5
|
+
submitOnEnter?: boolean;
|
6
|
+
/**
|
7
|
+
* Shows notification when unsaved changes exist
|
8
|
+
*/
|
9
|
+
warnWhenUnsavedChanges?: boolean;
|
10
|
+
/**
|
11
|
+
* Disables server-side validation
|
12
|
+
* @default false
|
13
|
+
* @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
|
14
|
+
*/
|
15
|
+
disableServerSideValidation?: boolean;
|
16
|
+
} & AutoSaveProps<TVariables>;
|
17
|
+
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
|
+
form: FormInstance<TVariables>;
|
19
|
+
formProps: FormProps<TVariables>;
|
20
|
+
saveButtonProps: ButtonProps & {
|
21
|
+
onClick: () => void;
|
22
|
+
};
|
23
|
+
onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
* `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
|
+
* @see {@link https://refine.dev/docs/api-reference/core/hooks/useForm} for more details.
|
29
|
+
*
|
30
|
+
* @typeParam TData - Result data of the query extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}
|
31
|
+
* @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences/#httperror `HttpError`}
|
32
|
+
* @typeParam TVariables - Values for params. default `{}`
|
33
|
+
* @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData`
|
34
|
+
* @typeParam TResponse - Result data returned by the mutation function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TData`
|
35
|
+
* @typeParam TResponseError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`}. Defaults to `TError`
|
36
|
+
*
|
37
|
+
*
|
38
|
+
*/
|
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
|
+
//# sourceMappingURL=useForm.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../src/hooks/form/useForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAQ,WAAW,EAAE,MAAM,MAAM,CAAC;AAElE,OAAO,EACL,aAAa,EAGd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,SAAS,EACT,UAAU,EAEV,iBAAiB,IAAI,qBAAqB,EAE1C,YAAY,IAAI,gBAAgB,EAChC,cAAc,EACd,cAAc,EAIf,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,YAAY,CAC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AAK,EACL,SAAS,EACT,cAAc,CACf,KAAQ,kBACP,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CA6Kf,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { FormInstance, FormProps, ButtonProps } from "antd";
|
2
2
|
import { AutoSaveProps } from "@refinedev/core";
|
3
3
|
import { HttpError, BaseRecord, UseFormReturnType as UseFormReturnTypeCore, UseFormProps as UseFormPropsCore, CreateResponse, UpdateResponse } from "@refinedev/core";
|
4
|
-
export
|
4
|
+
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> & {
|
5
5
|
submitOnEnter?: boolean;
|
6
6
|
/**
|
7
7
|
* Shows notification when unsaved changes exist
|
@@ -14,7 +14,7 @@ export declare type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, T
|
|
14
14
|
*/
|
15
15
|
disableServerSideValidation?: boolean;
|
16
16
|
} & AutoSaveProps<TVariables>;
|
17
|
-
export
|
17
|
+
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
18
|
form: FormInstance<TVariables>;
|
19
19
|
formProps: FormProps<TVariables>;
|
20
20
|
saveButtonProps: ButtonProps & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../../src/hooks/form/useForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAQ,WAAW,EAAE,MAAM,MAAM,CAAC;AAElE,OAAO,EACL,aAAa,EAG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AAS,SAAS,GAAG,MAAM,IACvC,qBAAqB,CACvB,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,GAAG;IACF,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAC/B,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACjC,eAAe,EAAE,WAAW,GAAG;QAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC;IACF,QAAQ,EAAE,CACR,MAAM,CAAC,EAAE,UAAU,KAChB,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;CAC5E,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO,owBAoCjB,aACD,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,KAAQ,kBACP,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CA6Kf,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useModalForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useModalForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC"}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { FormInstance, FormProps, ModalProps } from "antd";
|
2
|
+
import { HttpError, UseFormProps as UseFormPropsCore, BaseRecord, LiveModeProps, BaseKey, FormWithSyncWithLocationParams } from "@refinedev/core";
|
3
|
+
import { UseFormProps, 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
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useModalForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useModalForm/useModalForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE3D,OAAO,EAGL,SAAS,EACT,YAAY,IAAI,gBAAgB,EAChC,UAAU,EACV,aAAa,EACb,OAAO,EAGP,8BAA8B,EAI/B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAW,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGtE,MAAM,MAAM,4BAA4B,CAAC,SAAS,EAAE,UAAU,IAAI;IAChE,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAC/B,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC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EACT,cAAc,CACf,GACC,YAAY,CACV,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,GACD,kBAAkB,GAClB,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;AACJ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,wUAetB,kBACD,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,KAAG,uBACF,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CAmOf,CAAC"}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { FormInstance, FormProps, ModalProps } from "antd";
|
2
|
+
import { HttpError, UseFormProps as UseFormPropsCore, BaseRecord, LiveModeProps, BaseKey, FormWithSyncWithLocationParams } from "@refinedev/core";
|
3
|
+
import { UseFormProps, 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
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useModalForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useModalForm/useModalForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE3D,OAAO,EAGL,SAAS,EACT,YAAY,IAAI,gBAAgB,EAChC,UAAU,EACV,aAAa,EACb,OAAO,EAGP,8BAA8B,EAI/B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAW,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGtE,MAAM,MAAM,4BAA4B,CAAC,SAAS,EAAE,UAAU,IAAI;IAChE,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAC/B,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,wBAAwB,EAAE,OAAO,CAAC;IAClC,UAAU,EAAE,EAAE,CAAC;IACf,aAAa,EAAE,EAAE,CAAC;IAClB,UAAU,EAAE,SAAS,CAAC;IACtB,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,UAAU,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACpD,6CAA6C;IAC7C,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,sBAAsB,CAChC,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,IAAI,CACN,iBAAiB,CACf,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,EACD,iBAAiB,GAAG,mBAAmB,CACxC,GACC,4BAA4B,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAEtD,MAAM,MAAM,iBAAiB,CAC3B,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,kBAAkB,GAClB,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;AACJ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,wUAetB,kBACD,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CACf,KAAG,uBACF,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,cAAc,CAmOf,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { FormInstance, FormProps, ModalProps } from "antd";
|
2
2
|
import { HttpError, UseFormProps as UseFormPropsCore, BaseRecord, LiveModeProps, BaseKey, FormWithSyncWithLocationParams } from "@refinedev/core";
|
3
3
|
import { UseFormProps, UseFormReturnType } from "../useForm";
|
4
|
-
export
|
4
|
+
export type useModalFormFromSFReturnType<TResponse, TVariables> = {
|
5
5
|
open: boolean;
|
6
6
|
form: FormInstance<TVariables>;
|
7
7
|
show: (id?: BaseKey) => void;
|
@@ -17,11 +17,11 @@ export declare type useModalFormFromSFReturnType<TResponse, TVariables> = {
|
|
17
17
|
/** @deprecated Please use `open` instead. */
|
18
18
|
visible: boolean;
|
19
19
|
};
|
20
|
-
|
20
|
+
type useModalFormConfig = {
|
21
21
|
action: "show" | "edit" | "create" | "clone";
|
22
22
|
};
|
23
|
-
export
|
24
|
-
export
|
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
25
|
defaultVisible?: boolean;
|
26
26
|
autoSubmitClose?: boolean;
|
27
27
|
autoResetForm?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useModalForm.d.ts","sourceRoot":"","sources":["../../../../src/hooks/form/useModalForm/useModalForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAA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