@refinedev/antd 5.43.0 → 5.44.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.
Files changed (97) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/components/autoSaveIndicator/index.d.cts.map +1 -1
  3. package/dist/components/autoSaveIndicator/index.d.ts.map +1 -1
  4. package/dist/components/breadcrumb/index.d.cts.map +1 -1
  5. package/dist/components/breadcrumb/index.d.ts.map +1 -1
  6. package/dist/components/buttons/clone/index.d.cts.map +1 -1
  7. package/dist/components/buttons/clone/index.d.ts.map +1 -1
  8. package/dist/components/buttons/create/index.d.cts.map +1 -1
  9. package/dist/components/buttons/create/index.d.ts.map +1 -1
  10. package/dist/components/buttons/delete/index.d.cts.map +1 -1
  11. package/dist/components/buttons/delete/index.d.ts.map +1 -1
  12. package/dist/components/buttons/edit/index.d.cts.map +1 -1
  13. package/dist/components/buttons/edit/index.d.ts.map +1 -1
  14. package/dist/components/buttons/export/index.d.cts.map +1 -1
  15. package/dist/components/buttons/export/index.d.ts.map +1 -1
  16. package/dist/components/buttons/import/index.d.cts.map +1 -1
  17. package/dist/components/buttons/import/index.d.ts.map +1 -1
  18. package/dist/components/buttons/list/index.d.cts.map +1 -1
  19. package/dist/components/buttons/list/index.d.ts.map +1 -1
  20. package/dist/components/buttons/refresh/index.d.cts.map +1 -1
  21. package/dist/components/buttons/refresh/index.d.ts.map +1 -1
  22. package/dist/components/buttons/save/index.d.cts.map +1 -1
  23. package/dist/components/buttons/save/index.d.ts.map +1 -1
  24. package/dist/components/buttons/show/index.d.cts.map +1 -1
  25. package/dist/components/buttons/show/index.d.ts.map +1 -1
  26. package/dist/components/crud/create/index.d.cts.map +1 -1
  27. package/dist/components/crud/create/index.d.ts.map +1 -1
  28. package/dist/components/crud/edit/index.d.cts.map +1 -1
  29. package/dist/components/crud/edit/index.d.ts.map +1 -1
  30. package/dist/components/crud/list/index.d.cts.map +1 -1
  31. package/dist/components/crud/list/index.d.ts.map +1 -1
  32. package/dist/components/crud/show/index.d.cts.map +1 -1
  33. package/dist/components/crud/show/index.d.ts.map +1 -1
  34. package/dist/components/fields/boolean/index.d.cts.map +1 -1
  35. package/dist/components/fields/boolean/index.d.ts.map +1 -1
  36. package/dist/components/layout/sider/index.d.cts.map +1 -1
  37. package/dist/components/layout/sider/index.d.ts.map +1 -1
  38. package/dist/components/pageHeader/index.d.cts.map +1 -1
  39. package/dist/components/pageHeader/index.d.ts.map +1 -1
  40. package/dist/components/pages/auth/components/forgotPassword/index.d.cts.map +1 -1
  41. package/dist/components/pages/auth/components/forgotPassword/index.d.ts.map +1 -1
  42. package/dist/components/pages/auth/components/login/index.d.cts.map +1 -1
  43. package/dist/components/pages/auth/components/login/index.d.ts.map +1 -1
  44. package/dist/components/pages/auth/components/register/index.d.cts.map +1 -1
  45. package/dist/components/pages/auth/components/register/index.d.ts.map +1 -1
  46. package/dist/components/pages/auth/components/updatePassword/index.d.cts.map +1 -1
  47. package/dist/components/pages/auth/components/updatePassword/index.d.ts.map +1 -1
  48. package/dist/components/pages/error/index.d.cts.map +1 -1
  49. package/dist/components/pages/error/index.d.ts.map +1 -1
  50. package/dist/components/pages/ready/index.d.cts.map +1 -1
  51. package/dist/components/pages/ready/index.d.ts.map +1 -1
  52. package/dist/components/table/components/filterDropdown/index.d.cts.map +1 -1
  53. package/dist/components/table/components/filterDropdown/index.d.ts.map +1 -1
  54. package/dist/components/themedLayout/sider/index.d.cts.map +1 -1
  55. package/dist/components/themedLayout/sider/index.d.ts.map +1 -1
  56. package/dist/components/themedLayoutV2/sider/index.d.cts.map +1 -1
  57. package/dist/components/themedLayoutV2/sider/index.d.ts.map +1 -1
  58. package/dist/components/undoableNotification/index.d.cts.map +1 -1
  59. package/dist/components/undoableNotification/index.d.ts.map +1 -1
  60. package/dist/hooks/form/useForm.d.cts.map +1 -1
  61. package/dist/hooks/form/useForm.d.ts.map +1 -1
  62. package/dist/index.cjs +1 -1
  63. package/dist/index.cjs.map +1 -1
  64. package/dist/index.mjs +1 -1
  65. package/dist/index.mjs.map +1 -1
  66. package/package.json +5 -5
  67. package/src/components/autoSaveIndicator/index.tsx +0 -4
  68. package/src/components/breadcrumb/index.tsx +0 -1
  69. package/src/components/buttons/clone/index.tsx +0 -1
  70. package/src/components/buttons/create/index.tsx +0 -1
  71. package/src/components/buttons/delete/index.tsx +0 -1
  72. package/src/components/buttons/edit/index.tsx +0 -1
  73. package/src/components/buttons/export/index.tsx +0 -1
  74. package/src/components/buttons/import/index.tsx +0 -1
  75. package/src/components/buttons/list/index.tsx +0 -1
  76. package/src/components/buttons/refresh/index.tsx +0 -1
  77. package/src/components/buttons/save/index.tsx +0 -1
  78. package/src/components/buttons/show/index.tsx +0 -1
  79. package/src/components/crud/create/index.tsx +0 -1
  80. package/src/components/crud/edit/index.tsx +0 -1
  81. package/src/components/crud/list/index.tsx +0 -1
  82. package/src/components/crud/show/index.tsx +0 -1
  83. package/src/components/fields/boolean/index.tsx +0 -2
  84. package/src/components/layout/sider/index.tsx +0 -5
  85. package/src/components/pageHeader/index.tsx +0 -1
  86. package/src/components/pages/auth/components/forgotPassword/index.tsx +4 -1
  87. package/src/components/pages/auth/components/login/index.tsx +3 -1
  88. package/src/components/pages/auth/components/register/index.tsx +3 -1
  89. package/src/components/pages/auth/components/updatePassword/index.tsx +4 -1
  90. package/src/components/pages/error/index.tsx +0 -1
  91. package/src/components/pages/ready/index.tsx +0 -3
  92. package/src/components/table/components/filterDropdown/index.tsx +0 -1
  93. package/src/components/themedLayout/sider/index.tsx +0 -7
  94. package/src/components/themedLayoutV2/sider/index.tsx +1 -7
  95. package/src/components/themedLayoutV2/sider/styles.ts +2 -2
  96. package/src/components/undoableNotification/index.tsx +0 -1
  97. package/src/hooks/form/useForm.ts +5 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refinedev/antd",
3
- "version": "5.43.0",
3
+ "version": "5.44.0",
4
4
  "private": false,
5
5
  "description": "refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.",
6
6
  "repository": {
@@ -33,8 +33,8 @@
33
33
  "module": "dist/index.mjs",
34
34
  "typings": "dist/index.d.ts",
35
35
  "dependencies": {
36
- "@ant-design/icons": "5.0.1",
37
- "@ant-design/pro-layout": "7.17.12",
36
+ "@ant-design/icons": "^5.5.1",
37
+ "@ant-design/pro-layout": "^7.21.1",
38
38
  "@refinedev/ui-types": "^1.22.9",
39
39
  "@tanstack/react-query": "^4.10.1",
40
40
  "antd": "^5.17.0",
@@ -46,8 +46,8 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@esbuild-plugins/node-resolve": "^0.1.4",
49
- "@refinedev/cli": "^2.16.37",
50
- "@refinedev/core": "^4.54.0",
49
+ "@refinedev/cli": "^2.16.38",
50
+ "@refinedev/core": "^4.56.0",
51
51
  "@refinedev/ui-tests": "^1.14.9",
52
52
  "@testing-library/jest-dom": "^5.16.4",
53
53
  "@testing-library/react": "^13.1.1",
@@ -19,7 +19,6 @@ export const AutoSaveIndicator: React.FC<AutoSaveIndicatorProps> = ({
19
19
  <Message
20
20
  translationKey="autoSave.success"
21
21
  defaultMessage="saved"
22
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
23
22
  icon={<CheckCircleOutlined />}
24
23
  />
25
24
  ),
@@ -27,7 +26,6 @@ export const AutoSaveIndicator: React.FC<AutoSaveIndicatorProps> = ({
27
26
  <Message
28
27
  translationKey="autoSave.error"
29
28
  defaultMessage="auto save failure"
30
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
31
29
  icon={<ExclamationCircleOutlined />}
32
30
  />
33
31
  ),
@@ -35,7 +33,6 @@ export const AutoSaveIndicator: React.FC<AutoSaveIndicatorProps> = ({
35
33
  <Message
36
34
  translationKey="autoSave.loading"
37
35
  defaultMessage="saving..."
38
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
39
36
  icon={<SyncOutlined />}
40
37
  />
41
38
  ),
@@ -43,7 +40,6 @@ export const AutoSaveIndicator: React.FC<AutoSaveIndicatorProps> = ({
43
40
  <Message
44
41
  translationKey="autoSave.idle"
45
42
  defaultMessage="waiting for changes"
46
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
47
43
  icon={<EllipsisOutlined />}
48
44
  />
49
45
  ),
@@ -70,7 +70,6 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = ({
70
70
  key: "breadcrumb-item-home",
71
71
  title: (
72
72
  <ActiveLink to="/">
73
- {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */}
74
73
  {rootRouteResource?.resource?.meta?.icon ?? <HomeOutlined />}
75
74
  </ActiveLink>
76
75
  ),
@@ -52,7 +52,6 @@ export const CloneButton: React.FC<CloneButtonProps> = ({
52
52
  }}
53
53
  >
54
54
  <Button
55
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
56
55
  icon={<PlusSquareOutlined />}
57
56
  disabled={disabled}
58
57
  title={title}
@@ -52,7 +52,6 @@ export const CreateButton: React.FC<CreateButtonProps> = ({
52
52
  }}
53
53
  >
54
54
  <Button
55
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
56
55
  icon={<PlusSquareOutlined />}
57
56
  disabled={disabled}
58
57
  title={title}
@@ -76,7 +76,6 @@ export const DeleteButton: React.FC<DeleteButtonProps> = ({
76
76
  <Button
77
77
  danger
78
78
  loading={loading}
79
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
80
79
  icon={<DeleteOutlined />}
81
80
  title={title}
82
81
  disabled={disabled}
@@ -52,7 +52,6 @@ export const EditButton: React.FC<EditButtonProps> = ({
52
52
  }}
53
53
  >
54
54
  <Button
55
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
56
55
  icon={<EditOutlined />}
57
56
  disabled={disabled}
58
57
  title={title}
@@ -25,7 +25,6 @@ export const ExportButton: React.FC<ExportButtonProps> = ({
25
25
  return (
26
26
  <Button
27
27
  type="default"
28
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
29
28
  icon={<ExportOutlined />}
30
29
  data-testid={RefineButtonTestIds.ExportButton}
31
30
  className={RefineButtonClassNames.ExportButton}
@@ -28,7 +28,6 @@ export const ImportButton: React.FC<ImportButtonProps> = ({
28
28
  return (
29
29
  <Upload {...uploadProps}>
30
30
  <Button
31
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
32
31
  icon={<ImportOutlined />}
33
32
  data-testid={RefineButtonTestIds.ImportButton}
34
33
  className={RefineButtonClassNames.ImportButton}
@@ -50,7 +50,6 @@ export const ListButton: React.FC<ListButtonProps> = ({
50
50
  }}
51
51
  >
52
52
  <Button
53
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
54
53
  icon={<BarsOutlined />}
55
54
  disabled={disabled}
56
55
  title={title}
@@ -35,7 +35,6 @@ export const RefreshButton: React.FC<RefreshButtonProps> = ({
35
35
  return (
36
36
  <Button
37
37
  onClick={onClick}
38
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
39
38
  icon={<RedoOutlined spin={loading} />}
40
39
  data-testid={RefineButtonTestIds.RefreshButton}
41
40
  className={RefineButtonClassNames.RefreshButton}
@@ -25,7 +25,6 @@ export const SaveButton: React.FC<SaveButtonProps> = ({
25
25
  return (
26
26
  <Button
27
27
  type="primary"
28
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
29
28
  icon={<SaveOutlined />}
30
29
  data-testid={RefineButtonTestIds.SaveButton}
31
30
  className={RefineButtonClassNames.SaveButton}
@@ -52,7 +52,6 @@ export const ShowButton: React.FC<ShowButtonProps> = ({
52
52
  }}
53
53
  >
54
54
  <Button
55
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
56
55
  icon={<EyeOutlined />}
57
56
  disabled={disabled}
58
57
  title={title}
@@ -72,7 +72,6 @@ export const Create: React.FC<CreateProps> = ({
72
72
  return (
73
73
  <div {...(wrapperProps ?? {})}>
74
74
  <PageHeader
75
- ghost={false}
76
75
  backIcon={goBackFromProps}
77
76
  onBack={
78
77
  action !== "list" || typeof action !== "undefined"
@@ -150,7 +150,6 @@ export const Edit: React.FC<EditProps> = ({
150
150
  return (
151
151
  <div {...(wrapperProps ?? {})}>
152
152
  <PageHeader
153
- ghost={false}
154
153
  backIcon={goBackFromProps}
155
154
  onBack={
156
155
  action !== "list" && typeof action !== "undefined"
@@ -69,7 +69,6 @@ export const List: React.FC<ListProps> = ({
69
69
  return (
70
70
  <div {...(wrapperProps ?? {})}>
71
71
  <PageHeader
72
- ghost={false}
73
72
  title={
74
73
  title ??
75
74
  translate(
@@ -133,7 +133,6 @@ export const Show: React.FC<ShowProps> = ({
133
133
  return (
134
134
  <div {...(wrapperProps ?? {})}>
135
135
  <PageHeader
136
- ghost={false}
137
136
  backIcon={goBackFromProps}
138
137
  onBack={
139
138
  action !== "list" && typeof action !== "undefined"
@@ -14,9 +14,7 @@ export const BooleanField: React.FC<BooleanFieldProps> = ({
14
14
  value,
15
15
  valueLabelTrue = "true",
16
16
  valueLabelFalse = "false",
17
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
18
17
  trueIcon = <CheckOutlined />,
19
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
20
18
  falseIcon = <CloseOutlined />,
21
19
  ...rest
22
20
  }) => {
@@ -82,7 +82,6 @@ export const Sider: React.FC<RefineLayoutSiderProps> = ({
82
82
  >
83
83
  <Menu.SubMenu
84
84
  key={item.key}
85
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
86
85
  icon={icon ?? <UnorderedListOutlined />}
87
86
  title={label}
88
87
  >
@@ -110,7 +109,6 @@ export const Sider: React.FC<RefineLayoutSiderProps> = ({
110
109
  style={{
111
110
  fontWeight: isSelected ? "bold" : "normal",
112
111
  }}
113
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
114
112
  icon={icon ?? (isRoute && <UnorderedListOutlined />)}
115
113
  >
116
114
  <Link to={route ?? ""}>{label}</Link>
@@ -142,7 +140,6 @@ export const Sider: React.FC<RefineLayoutSiderProps> = ({
142
140
  };
143
141
 
144
142
  const logout = isExistAuthentication && (
145
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
146
143
  <Menu.Item key="logout" onClick={handleLogout} icon={<LogoutOutlined />}>
147
144
  {translate("buttons.logout", "Logout")}
148
145
  </Menu.Item>
@@ -154,7 +151,6 @@ export const Sider: React.FC<RefineLayoutSiderProps> = ({
154
151
  style={{
155
152
  fontWeight: selectedKey === "/" ? "bold" : "normal",
156
153
  }}
157
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
158
154
  icon={<DashboardOutlined />}
159
155
  >
160
156
  <Link to="/">{translate("dashboard.title", "Dashboard")}</Link>
@@ -230,7 +226,6 @@ export const Sider: React.FC<RefineLayoutSiderProps> = ({
230
226
  style={drawerButtonStyles}
231
227
  size="large"
232
228
  onClick={() => setDrawerOpen(true)}
233
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
234
229
  icon={<BarsOutlined />}
235
230
  />
236
231
  </>
@@ -15,7 +15,6 @@ export const PageHeader: FC<AntdPageHeaderProps> = ({ children, ...props }) => {
15
15
  const BackIcon =
16
16
  direction === "rtl" ? ArrowRightOutlined : ArrowLeftOutlined;
17
17
 
18
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
19
18
  return <Button type="text" icon={<BackIcon />} />;
20
19
  };
21
20
  const backIcon =
@@ -52,6 +52,7 @@ export const ForgotPasswordPage: React.FC<ResetPassworProps> = ({
52
52
  renderContent,
53
53
  formProps,
54
54
  title,
55
+ mutationVariables,
55
56
  }) => {
56
57
  const { token } = theme.useToken();
57
58
  const [form] = Form.useForm<ForgotPasswordFormTypes>();
@@ -104,7 +105,9 @@ export const ForgotPasswordPage: React.FC<ResetPassworProps> = ({
104
105
  <Form<ForgotPasswordFormTypes>
105
106
  layout="vertical"
106
107
  form={form}
107
- onFinish={(values) => forgotPassword(values)}
108
+ onFinish={(values) =>
109
+ forgotPassword({ ...values, ...mutationVariables })
110
+ }
108
111
  requiredMark={false}
109
112
  {...formProps}
110
113
  >
@@ -50,6 +50,7 @@ export const LoginPage: React.FC<LoginProps> = ({
50
50
  formProps,
51
51
  title,
52
52
  hideForm,
53
+ mutationVariables,
53
54
  }) => {
54
55
  const { token } = theme.useToken();
55
56
  const [form] = Form.useForm<LoginFormTypes>();
@@ -111,6 +112,7 @@ export const LoginPage: React.FC<LoginProps> = ({
111
112
  }}
112
113
  onClick={() =>
113
114
  login({
115
+ ...mutationVariables,
114
116
  providerName: provider.name,
115
117
  })
116
118
  }
@@ -152,7 +154,7 @@ export const LoginPage: React.FC<LoginProps> = ({
152
154
  <Form<LoginFormTypes>
153
155
  layout="vertical"
154
156
  form={form}
155
- onFinish={(values) => login(values)}
157
+ onFinish={(values) => login({ ...values, ...mutationVariables })}
156
158
  requiredMark={false}
157
159
  initialValues={{
158
160
  remember: false,
@@ -47,6 +47,7 @@ export const RegisterPage: React.FC<RegisterProps> = ({
47
47
  formProps,
48
48
  title,
49
49
  hideForm,
50
+ mutationVariables,
50
51
  }) => {
51
52
  const { token } = theme.useToken();
52
53
  const [form] = Form.useForm<RegisterFormTypes>();
@@ -108,6 +109,7 @@ export const RegisterPage: React.FC<RegisterProps> = ({
108
109
  }}
109
110
  onClick={() =>
110
111
  register({
112
+ ...mutationVariables,
111
113
  providerName: provider.name,
112
114
  })
113
115
  }
@@ -152,7 +154,7 @@ export const RegisterPage: React.FC<RegisterProps> = ({
152
154
  <Form<RegisterFormTypes>
153
155
  layout="vertical"
154
156
  form={form}
155
- onFinish={(values) => register(values)}
157
+ onFinish={(values) => register({ ...mutationVariables, ...values })}
156
158
  requiredMark={false}
157
159
  {...formProps}
158
160
  >
@@ -46,6 +46,7 @@ export const UpdatePasswordPage: React.FC<UpdatePasswordProps> = ({
46
46
  renderContent,
47
47
  formProps,
48
48
  title,
49
+ mutationVariables,
49
50
  }) => {
50
51
  const { token } = theme.useToken();
51
52
  const [form] = Form.useForm<UpdatePasswordFormTypes>();
@@ -96,7 +97,9 @@ export const UpdatePasswordPage: React.FC<UpdatePasswordProps> = ({
96
97
  <Form<UpdatePasswordFormTypes>
97
98
  layout="vertical"
98
99
  form={form}
99
- onFinish={(values) => updatePassword(values)}
100
+ onFinish={(values) =>
101
+ updatePassword({ ...values, ...mutationVariables })
102
+ }
100
103
  requiredMark={false}
101
104
  {...formProps}
102
105
  >
@@ -52,7 +52,6 @@ export const ErrorComponent: React.FC<RefineErrorPageProps> = () => {
52
52
  </Typography.Text>
53
53
  {errorMessage && (
54
54
  <Tooltip title={errorMessage}>
55
- {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */}
56
55
  <InfoCircleOutlined data-testid="error-component-tooltip" />
57
56
  </Tooltip>
58
57
  )}
@@ -62,7 +62,6 @@ export const ReadyPage: React.FC<RefineReadyPageProps> = () => {
62
62
  style={{ marginTop: "70px", justifyContent: "center" }}
63
63
  >
64
64
  <a href="https://refine.dev" target="_blank" rel="noreferrer">
65
- {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */}
66
65
  <Button size="large" icon={<ReadOutlined />}>
67
66
  Documentation
68
67
  </Button>
@@ -72,13 +71,11 @@ export const ReadyPage: React.FC<RefineReadyPageProps> = () => {
72
71
  target="_blank"
73
72
  rel="noreferrer"
74
73
  >
75
- {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */}
76
74
  <Button size="large" icon={<FolderOutlined />}>
77
75
  Examples
78
76
  </Button>
79
77
  </a>
80
78
  <a href="https://discord.gg/refine" target="_blank" rel="noreferrer">
81
- {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */}
82
79
  <Button size="large" icon={<TeamOutlined />}>
83
80
  Community
84
81
  </Button>
@@ -94,7 +94,6 @@ export const FilterDropdown: React.FC<FilterDropdownProps> = (props) => {
94
94
  <div style={{ marginBottom: 15 }}>{childrenWithProps}</div>
95
95
  <Space>
96
96
  <Button type="primary" size="small" onClick={() => onFilter()}>
97
- {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */}
98
97
  <FilterOutlined /> {translate("buttons.filter", "Filter")}
99
98
  </Button>
100
99
  <Button danger size="small" onClick={() => clearFilter()}>
@@ -88,7 +88,6 @@ export const ThemedSider: React.FC<RefineThemedLayoutSiderProps> = ({
88
88
  >
89
89
  <Menu.SubMenu
90
90
  key={item.key}
91
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
92
91
  icon={icon ?? <UnorderedListOutlined />}
93
92
  title={label}
94
93
  >
@@ -114,7 +113,6 @@ export const ThemedSider: React.FC<RefineThemedLayoutSiderProps> = ({
114
113
  >
115
114
  <Menu.Item
116
115
  key={item.key}
117
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
118
116
  icon={icon ?? (isRoute && <UnorderedListOutlined />)}
119
117
  >
120
118
  <Link to={route ?? ""}>{label}</Link>
@@ -149,7 +147,6 @@ export const ThemedSider: React.FC<RefineThemedLayoutSiderProps> = ({
149
147
  <Menu.Item
150
148
  key="logout"
151
149
  onClick={() => handleLogout()}
152
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
153
150
  icon={<LogoutOutlined />}
154
151
  >
155
152
  {translate("buttons.logout", "Logout")}
@@ -157,7 +154,6 @@ export const ThemedSider: React.FC<RefineThemedLayoutSiderProps> = ({
157
154
  );
158
155
 
159
156
  const dashboard = hasDashboard ? (
160
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
161
157
  <Menu.Item key="dashboard" icon={<DashboardOutlined />}>
162
158
  <Link to="/">{translate("dashboard.title", "Dashboard")}</Link>
163
159
  {!collapsed && selectedKey === "/" && (
@@ -254,7 +250,6 @@ export const ThemedSider: React.FC<RefineThemedLayoutSiderProps> = ({
254
250
  style={drawerButtonStyles}
255
251
  size="large"
256
252
  onClick={() => setDrawerOpen(true)}
257
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
258
253
  icon={<BarsOutlined />}
259
254
  />
260
255
  </>
@@ -287,14 +282,12 @@ export const ThemedSider: React.FC<RefineThemedLayoutSiderProps> = ({
287
282
  }}
288
283
  >
289
284
  {collapsed ? (
290
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
291
285
  <RightOutlined
292
286
  style={{
293
287
  color: token.colorPrimary,
294
288
  }}
295
289
  />
296
290
  ) : (
297
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
298
291
  <LeftOutlined
299
292
  style={{
300
293
  color: token.colorPrimary,
@@ -101,7 +101,6 @@ export const ThemedSiderV2: React.FC<RefineThemedLayoutV2SiderProps> = ({
101
101
  >
102
102
  <Menu.SubMenu
103
103
  key={item.key}
104
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
105
104
  icon={icon ?? <UnorderedListOutlined />}
106
105
  title={label}
107
106
  >
@@ -130,7 +129,6 @@ export const ThemedSiderV2: React.FC<RefineThemedLayoutV2SiderProps> = ({
130
129
  >
131
130
  <Menu.Item
132
131
  key={item.key}
133
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
134
132
  icon={icon ?? (isRoute && <UnorderedListOutlined />)}
135
133
  style={linkStyle}
136
134
  >
@@ -168,7 +166,6 @@ export const ThemedSiderV2: React.FC<RefineThemedLayoutV2SiderProps> = ({
168
166
  <Menu.Item
169
167
  key="logout"
170
168
  onClick={() => handleLogout()}
171
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
172
169
  icon={<LogoutOutlined />}
173
170
  >
174
171
  {translate("buttons.logout", "Logout")}
@@ -176,7 +173,6 @@ export const ThemedSiderV2: React.FC<RefineThemedLayoutV2SiderProps> = ({
176
173
  );
177
174
 
178
175
  const dashboard = hasDashboard ? (
179
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
180
176
  <Menu.Item key="dashboard" icon={<DashboardOutlined />}>
181
177
  <Link to="/">{translate("dashboard.title", "Dashboard")}</Link>
182
178
  {!siderCollapsed && selectedKey === "/" && (
@@ -232,7 +228,7 @@ export const ThemedSiderV2: React.FC<RefineThemedLayoutV2SiderProps> = ({
232
228
  <Drawer
233
229
  open={mobileSiderOpen}
234
230
  onClose={() => setMobileSiderOpen(false)}
235
- placement="left"
231
+ placement={direction === "rtl" ? "right" : "left"}
236
232
  closable={false}
237
233
  width={200}
238
234
  bodyStyle={{
@@ -269,7 +265,6 @@ export const ThemedSiderV2: React.FC<RefineThemedLayoutV2SiderProps> = ({
269
265
  style={drawerButtonStyles}
270
266
  size="large"
271
267
  onClick={() => setMobileSiderOpen(true)}
272
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
273
268
  icon={<BarsOutlined />}
274
269
  />
275
270
  </>
@@ -297,7 +292,6 @@ export const ThemedSiderV2: React.FC<RefineThemedLayoutV2SiderProps> = ({
297
292
  const CollapsedIcon = direction === "rtl" ? LeftOutlined : RightOutlined;
298
293
  const IconComponent = siderCollapsed ? CollapsedIcon : OpenIcon;
299
294
 
300
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
301
295
  return <IconComponent {...iconProps} />;
302
296
  };
303
297
 
@@ -1,8 +1,8 @@
1
1
  import type { CSSProperties } from "react";
2
2
 
3
3
  export const drawerButtonStyles: CSSProperties = {
4
- borderTopLeftRadius: 0,
5
- borderBottomLeftRadius: 0,
4
+ borderStartStartRadius: 0,
5
+ borderEndStartRadius: 0,
6
6
  position: "fixed",
7
7
  top: 64,
8
8
  zIndex: 999,
@@ -36,7 +36,6 @@ export const UndoableNotification: React.FC<UndoableNotificationProps> = ({
36
36
  style={{ flexShrink: 0 }}
37
37
  onClick={cancelMutation}
38
38
  disabled={undoableTimeout === 0}
39
- // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66
40
39
  icon={<UndoOutlined />}
41
40
  />
42
41
  </div>
@@ -179,11 +179,10 @@ export const useForm = <
179
179
  return;
180
180
  }
181
181
 
182
+ type FieldData = Parameters<typeof form.setFields>[0];
183
+ type NamePath = FieldData[number]["name"];
182
184
  // antd form expects error object to be in a specific format.
183
- let parsedErrors: {
184
- name: string | number | (string | number)[];
185
- errors?: string[] | undefined;
186
- }[] = [];
185
+ let parsedErrors: FieldData = [];
187
186
 
188
187
  // reset antd errors before setting new errors
189
188
  const fieldsValue = form.getFieldsValue() as unknown as object;
@@ -192,7 +191,7 @@ export const useForm = <
192
191
 
193
192
  parsedErrors = fields.map((field) => {
194
193
  return {
195
- name: propertyPathToArray(field),
194
+ name: propertyPathToArray(field) as NamePath,
196
195
  errors: undefined,
197
196
  };
198
197
  });
@@ -228,7 +227,7 @@ export const useForm = <
228
227
  }
229
228
 
230
229
  parsedErrors.push({
231
- name: propertyPathToArray(key),
230
+ name: propertyPathToArray(key) as NamePath,
232
231
  errors: newError,
233
232
  });
234
233
  }