From fd2e8cb46990b04139fcd4e516032271bf830b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Emir=20=C5=9Een?= Date: Mon, 28 Oct 2024 12:47:27 +0300 Subject: [PATCH 1/8] chore(chakra-ui): fix broken tsdoc links (#6429) Co-authored-by: Alican Erdurmaz --- .changeset/beige-cougars-add.md | 7 +++++++ packages/chakra-ui/src/components/fields/email/index.tsx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/beige-cougars-add.md diff --git a/.changeset/beige-cougars-add.md b/.changeset/beige-cougars-add.md new file mode 100644 index 000000000000..38e032817467 --- /dev/null +++ b/.changeset/beige-cougars-add.md @@ -0,0 +1,7 @@ +--- +"@refinedev/chakra-ui": patch +--- + +chore(tsdoc): fix broken external documentation link + +In TSDoc description of the `` component, link to the official documentation of Chakra UI was broken and couldn't be opened. This PR fixes the link by updating the URL to the correct one. diff --git a/packages/chakra-ui/src/components/fields/email/index.tsx b/packages/chakra-ui/src/components/fields/email/index.tsx index bdb7be7e44fc..faf2e55b98d4 100644 --- a/packages/chakra-ui/src/components/fields/email/index.tsx +++ b/packages/chakra-ui/src/components/fields/email/index.tsx @@ -5,7 +5,7 @@ import type { EmailFieldProps } from "../types"; /** * This field is used to display email values. It uses the {@link https://chakra-ui.com/docs/components/text `` } - * and {@link https://chakra-ui.com/docs/components/link/usage `} components from Chakra UI. + * and {@link https://www.chakra-ui.com/docs/components/link `} components from Chakra UI. * * @see {@link https://refine.dev/docs/api-reference/chakra-ui/components/fields/email} for more details. */ From 7e4144f5659883bb996635cfd44b8fb37ba23c79 Mon Sep 17 00:00:00 2001 From: SUMEET YADAV <85898941+sumeet-y@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:20:36 +0530 Subject: [PATCH 2/8] feat: export useInvalidateAuthStore hook (#6405) (resolves #6341) Co-authored-by: Batuhan Wilhelm --- .changeset/red-cups-decide.md | 9 +++++++++ packages/core/src/hooks/auth/index.ts | 1 + 2 files changed, 10 insertions(+) create mode 100644 .changeset/red-cups-decide.md diff --git a/.changeset/red-cups-decide.md b/.changeset/red-cups-decide.md new file mode 100644 index 000000000000..db0db30e5727 --- /dev/null +++ b/.changeset/red-cups-decide.md @@ -0,0 +1,9 @@ +--- +"@refinedev/core": minor +--- + +feat: exported useInvalidateAuthStore hook from auth hooks + +Now you can invalide the users identity state and force a react query refresh using this hook + +Resolves [#6341](https://github.com/refinedev/refine/issues/6341) diff --git a/packages/core/src/hooks/auth/index.ts b/packages/core/src/hooks/auth/index.ts index f5bfece761fd..cb63f4048866 100644 --- a/packages/core/src/hooks/auth/index.ts +++ b/packages/core/src/hooks/auth/index.ts @@ -8,3 +8,4 @@ export { useUpdatePassword } from "./useUpdatePassword"; export { useAuthenticated, useIsAuthenticated } from "./useIsAuthenticated"; export { useCheckError, useOnError } from "./useOnError"; export { useIsExistAuthentication } from "./useIsExistAuthentication"; +export { useInvalidateAuthStore } from "./useInvalidateAuthStore"; From 1813ef6f5acc02fbfe92e71c44553ad306b328a2 Mon Sep 17 00:00:00 2001 From: Alican Erdurmaz Date: Fri, 1 Nov 2024 10:36:31 +0300 Subject: [PATCH 3/8] feat(core): add `` (#6435) --- .changeset/ten-radios-rush.md | 7 +++ .../src/contexts/metaContext/index.spec.tsx | 44 ++++++++++++++++++ .../core/src/contexts/metaContext/index.tsx | 45 +++++++++++++++++++ packages/core/src/hooks/useMeta/index.ts | 18 +++++++- packages/core/src/index.tsx | 5 +++ 5 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 .changeset/ten-radios-rush.md create mode 100644 packages/core/src/contexts/metaContext/index.spec.tsx create mode 100644 packages/core/src/contexts/metaContext/index.tsx diff --git a/.changeset/ten-radios-rush.md b/.changeset/ten-radios-rush.md new file mode 100644 index 000000000000..448e5fe3eb7d --- /dev/null +++ b/.changeset/ten-radios-rush.md @@ -0,0 +1,7 @@ +--- +"@refinedev/core": minor +--- + +feat: Added `MetaContext` to share data between components, providers, and hooks. + +> 🚨 Designed for internal use only. diff --git a/packages/core/src/contexts/metaContext/index.spec.tsx b/packages/core/src/contexts/metaContext/index.spec.tsx new file mode 100644 index 000000000000..edb236c94422 --- /dev/null +++ b/packages/core/src/contexts/metaContext/index.spec.tsx @@ -0,0 +1,44 @@ +import React from "react"; +import { render, screen } from "@testing-library/react"; +import { MetaContextProvider, useMetaContext } from "./index"; +import "@testing-library/jest-dom"; + +describe("MetaContextProvider", () => { + it("provides the correct meta context value to child components", () => { + const TestComponent = () => { + const meta = useMetaContext(); + return
{meta.testKey}
; + }; + + render( + + + , + ); + + expect(screen.getByText("testValue")).toBeInTheDocument(); + }); + + it("merges existing context value with new value", () => { + const TestComponent = () => { + const meta = useMetaContext(); + return ( + <> +
{meta.firstKey}
+
{meta.secondKey}
+ + ); + }; + + render( + + + + + , + ); + + expect(screen.getByText("value1")).toBeInTheDocument(); + expect(screen.getByText("value2")).toBeInTheDocument(); + }); +}); diff --git a/packages/core/src/contexts/metaContext/index.tsx b/packages/core/src/contexts/metaContext/index.tsx new file mode 100644 index 000000000000..dc9102d16685 --- /dev/null +++ b/packages/core/src/contexts/metaContext/index.tsx @@ -0,0 +1,45 @@ +import React, { + type ReactNode, + createContext, + useContext, + useMemo, +} from "react"; + +type MetaContextValue = Record; + +export const MetaContext = createContext({}); + +/** + * Is used to provide meta data to the children components. + * @internal + */ +export const MetaContextProvider = ({ + children, + value, +}: { children: ReactNode; value: MetaContextValue }) => { + const currentValue = useMetaContext(); + + const metaContext = useMemo(() => { + return { + ...currentValue, + ...value, + }; + }, [currentValue, value]); + + return ( + {children} + ); +}; + +/** + * @internal + * @returns The MetaContext value. + */ +export const useMetaContext = () => { + const context = useContext(MetaContext); + if (!context) { + throw new Error("useMetaContext must be used within a MetaContextProvider"); + } + + return useContext(MetaContext); +}; diff --git a/packages/core/src/hooks/useMeta/index.ts b/packages/core/src/hooks/useMeta/index.ts index ec1f2afdb731..90bf01bfb802 100644 --- a/packages/core/src/hooks/useMeta/index.ts +++ b/packages/core/src/hooks/useMeta/index.ts @@ -1,3 +1,4 @@ +import { useMetaContext } from "@contexts/metaContext"; import { sanitizeResource } from "@definitions/helpers/sanitize-resource"; import { useParsed } from "@hooks/router"; @@ -6,12 +7,14 @@ import type { IResourceItem } from "../../contexts/resource/types"; /** * Hook that returns a function to get meta. - * The meta is a combination of the resource meta, hook meta and query params. + * The meta is a combination of the resource meta, hook meta, query params and metaContext value. * @internal */ export const useMeta = () => { const { params } = useParsed(); + const metaContext = useMetaContext(); + const getMetaFn = ({ resource, meta: metaFromProp, @@ -30,7 +33,18 @@ export const useMeta = () => { ...additionalParams } = params ?? {}; - return { ...meta, ...additionalParams, ...metaFromProp }; + const result: Record = { + ...meta, + ...additionalParams, + ...metaFromProp, + }; + + // when MultiTenancyProvider from "@refinedev-ee/multi-tenancy" is provided, we need to add tenantId to the meta + if (metaContext?.tenantId) { + result["tenantId"] = metaContext.tenantId; + } + + return result; }; return getMetaFn; diff --git a/packages/core/src/index.tsx b/packages/core/src/index.tsx index 28b47a3411c3..7642701d67a6 100644 --- a/packages/core/src/index.tsx +++ b/packages/core/src/index.tsx @@ -224,3 +224,8 @@ export { } from "./contexts/undoableQueue/types.js"; export { IUnsavedWarnContext } from "./contexts/unsavedWarn/types.js"; + +export { + MetaContextProvider, + useMetaContext, +} from "./contexts/metaContext/index.js"; From def0dd9506720e9963bb58f1e982958d91c365a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Emir=20=C5=9Een?= Date: Tue, 5 Nov 2024 13:10:32 +0300 Subject: [PATCH 4/8] chore(antd): update `@ant-design/icons` and `@ant-design/pro-layout` dependencies (#6369) (resolves #6363) Co-authored-by: Batuhan Wilhelm --- .changeset/early-pets-march.md | 15 + .changeset/hip-spies-end.md | 7 + examples/app-crm-minimal/package.json | 2 +- .../src/components/icon/TextIcon.tsx | 1 - .../layout/account-settings/index.tsx | 1 - .../components/layout/current-user/index.tsx | 1 - .../components/tags/contact-status-tag.tsx | 6 - .../src/components/tags/quote-status-tag.tsx | 3 - .../app-crm-minimal/src/config/resources.tsx | 3 - .../routes/companies/edit/contacts-table.tsx | 5 - .../src/routes/companies/list/index.tsx | 1 - .../components/deals-chart/index.tsx | 1 - .../components/latest-activities/index.tsx | 1 - .../components/total-count-card/index.tsx | 3 - .../components/upcoming-events/index.tsx | 1 - .../components/button/add-card-button.tsx | 1 - .../tasks/edit/forms/stage/stage-form.tsx | 1 - .../src/routes/tasks/edit/index.tsx | 3 - .../src/routes/tasks/list/kanban/card.tsx | 4 - .../src/routes/tasks/list/kanban/column.tsx | 3 - examples/auth-antd/package.json | 2 +- examples/auth-antd/src/App.tsx | 5 - examples/auth-otp/package.json | 2 +- examples/auth-otp/src/pages/login/login.tsx | 2 - examples/blog-invoice-generator/package.json | 2 +- examples/blog-invoice-generator/src/App.tsx | 5 - .../src/components/client/item.tsx | 3 - .../src/pages/invoice/list.tsx | 1 - examples/blog-issue-tracker/package.json | 2 +- examples/blog-issue-tracker/src/App.tsx | 1 - .../src/pages/task/filter.tsx | 1 - .../package.json | 2 +- .../src/pages/UserCreate.tsx | 2 - .../src/pages/UserEdit.tsx | 2 - .../blog-refine-digital-ocean/package.json | 2 +- .../blog-refine-digital-ocean/src/App.tsx | 3 - .../src/components/dealChart/index.tsx | 1 - .../src/components/metricCard/index.tsx | 3 - examples/blog-refine-markdown/package.json | 2 +- examples/command-palette-kbar/package.json | 2 +- examples/command-palette-kbar/src/App.tsx | 1 - .../customization-offlayout-area/package.json | 2 +- .../src/components/sider/index.tsx | 4 - .../src/components/sider/index.tsx | 5 - .../src/pages/posts/list.tsx | 1 - examples/data-provider-supabase/package.json | 2 +- examples/data-provider-supabase/src/App.tsx | 1 - examples/finefoods-antd/package.json | 2 +- examples/finefoods-antd/src/App.tsx | 7 - .../src/button/buttonSuccess.tsx | 1 - .../components/categories/status/index.tsx | 1 - .../courier/form-item-avatar/index.tsx | 1 - .../src/components/courier/status/index.tsx | 3 - .../components/customer/infoList/index.tsx | 6 - .../components/customer/userStatus/index.tsx | 1 - .../src/components/drawer/index.tsx | 1 - .../src/components/header/index.tsx | 2 - .../src/components/icons/trend.tsx | 2 - .../src/components/order/actions/index.tsx | 2 - .../order/deliveryDetails/index.tsx | 7 - .../src/components/order/status/index.tsx | 5 - .../components/product/drawer-form/index.tsx | 1 - .../components/product/drawer-show/index.tsx | 1 - .../components/product/list-card/index.tsx | 2 - .../components/product/list-table/index.tsx | 4 - .../src/components/product/status/index.tsx | 1 - .../src/components/store/form/fields.tsx | 5 - .../src/components/store/list-table/index.tsx | 4 - .../components/store/map/all-stores-map.tsx | 5 - .../src/components/store/status/index.tsx | 1 - .../components/tableActionButton/index.tsx | 1 - .../hooks/useOrderCustomKbarActions/index.tsx | 2 - .../src/pages/couriers/edit.tsx | 10 - .../src/pages/couriers/list.tsx | 5 - .../src/pages/customers/list.tsx | 2 - .../src/pages/dashboard/index.tsx | 8 - .../finefoods-antd/src/pages/orders/list.tsx | 3 - .../finefoods-antd/src/pages/orders/show.tsx | 2 - .../src/pages/products/list.tsx | 2 - .../src/pages/stores/create.tsx | 1 - .../finefoods-antd/src/pages/stores/edit.tsx | 1 - .../finefoods-antd/src/pages/stores/list.tsx | 2 - examples/i18n-nextjs/package.json | 2 +- .../src/components/header/index.tsx | 1 - examples/i18n-react/package.json | 2 +- .../src/components/header/index.tsx | 1 - examples/inferencer-antd/package.json | 2 +- .../src/components/header/index.tsx | 1 - .../inferencer-graphql-hasura/package.json | 2 +- .../form-item-editable-input-text/index.tsx | 1 - .../form/form-item-editable-select/index.tsx | 1 - .../form/form-item-editable-text/index.tsx | 2 - .../form-item-upload-logo-draggable/index.tsx | 2 - .../form/form-item-upload-logo/index.tsx | 1 - .../invoicer/src/components/header/index.tsx | 3 - .../src/components/header/search/index.tsx | 1 - examples/invoicer/src/pages/accounts/edit.tsx | 9 - examples/invoicer/src/pages/accounts/list.tsx | 4 - examples/invoicer/src/pages/clients/edit.tsx | 9 - examples/invoicer/src/pages/clients/list.tsx | 3 - .../invoicer/src/pages/invoices/create.tsx | 2 - examples/invoicer/src/pages/invoices/list.tsx | 2 - examples/invoicer/src/pages/invoices/show.tsx | 1 - examples/live-provider-ably/package.json | 2 +- .../src/components/sider/index.tsx | 5 - .../apps/blog-posts/package.json | 2 +- .../apps/categories/package.json | 2 +- .../apps/host/package.json | 2 +- .../apps/my-refine-app/package.json | 2 +- .../apps/my-refine-app/package.json | 2 +- .../apps/my-refine-app/package.json | 2 +- examples/multi-tenancy-strapi/package.json | 2 +- examples/pixels-admin/package.json | 2 +- .../pixels-admin/src/pages/users/list.tsx | 1 - examples/pixels/package.json | 2 +- examples/pixels/src/App.tsx | 1 - .../src/components/avatar/avatar-panel.tsx | 1 - .../src/components/avatar/contributors.tsx | 1 - .../src/components/layout/header/index.tsx | 3 - examples/pixels/src/pages/canvases/show.tsx | 1 - .../package.json | 2 +- .../refine-week-invoice-generator/src/App.tsx | 5 - .../src/pages/invoices/list.tsx | 1 - examples/search/package.json | 2 +- examples/search/src/components/header.tsx | 1 - examples/table-antd-table-filter/package.json | 2 +- .../src/pages/posts/list.tsx | 1 - examples/theme-antd-demo/src/App.tsx | 4 - examples/tutorial-antd/package.json | 2 +- .../src/components/sider.tsx | 1 - examples/with-nextjs-next-auth/package.json | 2 +- examples/with-nextjs/package.json | 2 +- examples/with-nx/package.json | 2 +- examples/with-web3/src/App.tsx | 1 - packages/antd/package.json | 4 +- .../components/autoSaveIndicator/index.tsx | 4 - .../antd/src/components/breadcrumb/index.tsx | 1 - .../src/components/buttons/clone/index.tsx | 1 - .../src/components/buttons/create/index.tsx | 1 - .../src/components/buttons/delete/index.tsx | 1 - .../src/components/buttons/edit/index.tsx | 1 - .../src/components/buttons/export/index.tsx | 1 - .../src/components/buttons/import/index.tsx | 1 - .../src/components/buttons/list/index.tsx | 1 - .../src/components/buttons/refresh/index.tsx | 1 - .../src/components/buttons/save/index.tsx | 1 - .../src/components/buttons/show/index.tsx | 1 - .../antd/src/components/crud/create/index.tsx | 1 - .../antd/src/components/crud/edit/index.tsx | 1 - .../antd/src/components/crud/list/index.tsx | 1 - .../antd/src/components/crud/show/index.tsx | 1 - .../src/components/fields/boolean/index.tsx | 2 - .../src/components/layout/sider/index.tsx | 5 - .../antd/src/components/pageHeader/index.tsx | 1 - .../antd/src/components/pages/error/index.tsx | 1 - .../antd/src/components/pages/ready/index.tsx | 3 - .../table/components/filterDropdown/index.tsx | 1 - .../components/themedLayout/sider/index.tsx | 7 - .../components/themedLayoutV2/sider/index.tsx | 6 - .../components/undoableNotification/index.tsx | 1 - packages/antd/src/hooks/form/useForm.ts | 11 +- packages/inferencer/package.json | 2 +- .../src/inferencers/antd/code-viewer.tsx | 5 - packages/live-previews/package.json | 2 +- pnpm-lock.yaml | 1561 +++++++++-------- 165 files changed, 913 insertions(+), 1059 deletions(-) create mode 100644 .changeset/early-pets-march.md create mode 100644 .changeset/hip-spies-end.md diff --git a/.changeset/early-pets-march.md b/.changeset/early-pets-march.md new file mode 100644 index 000000000000..ebae9ea0af46 --- /dev/null +++ b/.changeset/early-pets-march.md @@ -0,0 +1,15 @@ +--- +"@refinedev/antd": minor +--- + +chore: update `@ant-design/icons` and `@ant-design/pro-layout` versions + +Updated previously pinned versions of `@ant-design/icons` from `5.0.1` and `@ant-design/pro-layout` from `7.17.12` to latest versions. This minor update resolves the previous issues with `React@18` types and conflicting type ranges with `@ant-design/pro-layout` package. + +After `@ant-design/icons` version `5.4.0` build issues and type issues are resolved. Following this release `@ant-design/pro-layout` also updated its dependency range to match the latest `@ant-design/icons` version. + +Previously `@ant-design/icons` were pinned to `5.0.1` and recommended to pin in projects as well. After this update, you may also need to update the `@ant-design/icons` version in your project to match the latest version. (A range above `^5.5.1` is required to match `@refinedev/antd`). + +[Resolves #6363](https://github.com/refinedev/refine/issues/6363) +[Resolves #5931 - previously resolved by #5934](https://github.com/refinedev/refine/issues/5931) +[Accompanies #6354 - `@ant-design/pro-layout` also depends on `express` dependency and updated its version in the latest release](https://github.com/refinedev/refine/pull/6354) diff --git a/.changeset/hip-spies-end.md b/.changeset/hip-spies-end.md new file mode 100644 index 000000000000..70737dd7fce1 --- /dev/null +++ b/.changeset/hip-spies-end.md @@ -0,0 +1,7 @@ +--- +"@refinedev/inferencer": patch +--- + +chore: update `@ant-design/icons` version to match `@refinedev/antd`. + +This is a patch release to update the `@ant-design/icons` version to match the `@refinedev/antd` version. Previously `@ant-design/icons` were pinned to `5.0.1` version to avoid conflicts with `React@18` and `@ant-design/pro-layout` packages. After `5.4.0` these issues are resolved and we can safely update the version to latest range. diff --git a/examples/app-crm-minimal/package.json b/examples/app-crm-minimal/package.json index 0e22aa6b1d4b..721eadb79ed8 100644 --- a/examples/app-crm-minimal/package.json +++ b/examples/app-crm-minimal/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@ant-design/cssinjs": "^1.17.2", - "@ant-design/icons": "5.0.1", + "@ant-design/icons": "^5.5.1", "@ant-design/plots": "^1.2.5", "@dnd-kit/core": "^6.0.8", "@dnd-kit/modifiers": "^6.0.1", diff --git a/examples/app-crm-minimal/src/components/icon/TextIcon.tsx b/examples/app-crm-minimal/src/components/icon/TextIcon.tsx index 88c7b1df7553..9db41856abd3 100644 --- a/examples/app-crm-minimal/src/components/icon/TextIcon.tsx +++ b/examples/app-crm-minimal/src/components/icon/TextIcon.tsx @@ -28,6 +28,5 @@ export const TextIconSvg = () => ( ); export const TextIcon = (props: Partial) => ( - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 ); diff --git a/examples/app-crm-minimal/src/components/layout/account-settings/index.tsx b/examples/app-crm-minimal/src/components/layout/account-settings/index.tsx index 6a3455bdd1d1..8f65647ca97c 100644 --- a/examples/app-crm-minimal/src/components/layout/account-settings/index.tsx +++ b/examples/app-crm-minimal/src/components/layout/account-settings/index.tsx @@ -86,7 +86,6 @@ export const AccountSettings = ({ opened, setOpened, userId }: Props) => { Account Settings diff --git a/examples/finefoods-antd/src/components/icons/trend.tsx b/examples/finefoods-antd/src/components/icons/trend.tsx index f719cbc140f5..be5b61c09832 100644 --- a/examples/finefoods-antd/src/components/icons/trend.tsx +++ b/examples/finefoods-antd/src/components/icons/trend.tsx @@ -5,7 +5,6 @@ export const TrendUpIcon = () => { const { token } = theme.useToken(); return ( - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 { const { token } = theme.useToken(); return ( - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 = ({ record }) => { }} disabled={record.status.text !== "Pending"} icon={ - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 = ({ record }) => { fontWeight: 500, }} icon={ - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 { description: string; }[] = [ { - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , title: t("orders.fields.deliveryTime"), description: dayjs(order.events[0]?.date) @@ -39,31 +38,26 @@ export const OrderDeliveryDetails = ({ order }: Props) => { .format("hh:mm A"), }, { - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , title: t("orders.fields.store"), description: order.store.title, }, { - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , title: t("orders.fields.courier"), description: order.courier?.name, }, { - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , title: t("orders.fields.phone"), description: order.courier?.gsm, }, { - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , title: t("orders.fields.customer"), description: `${order.user.firstName} ${order.user.lastName}`, }, { - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , title: t("orders.fields.createdAt"), description: order.createdAt, @@ -96,7 +90,6 @@ export const OrderDeliveryDetails = ({ order }: Props) => { title={t(`enum.orderStatuses.${event.status}`)} icon={ getNotFinishedCurrentStep(order, event, index) && ( - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 ) } diff --git a/examples/finefoods-antd/src/components/order/status/index.tsx b/examples/finefoods-antd/src/components/order/status/index.tsx index 471a68cd8add..5a9cd451bbcc 100644 --- a/examples/finefoods-antd/src/components/order/status/index.tsx +++ b/examples/finefoods-antd/src/components/order/status/index.tsx @@ -20,27 +20,22 @@ export const OrderStatus: React.FC = ({ status }) => { switch (status) { case "Pending": color = "orange"; - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon = ; break; case "Ready": color = "cyan"; - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon = ; break; case "On The Way": color = "blue"; - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon = ; break; case "Delivered": color = "green"; - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon = ; break; case "Cancelled": color = "red"; - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon = ; break; } diff --git a/examples/finefoods-antd/src/components/product/drawer-form/index.tsx b/examples/finefoods-antd/src/components/product/drawer-form/index.tsx index 376c4bea277c..ef7d0437f556 100644 --- a/examples/finefoods-antd/src/components/product/drawer-form/index.tsx +++ b/examples/finefoods-antd/src/components/product/drawer-form/index.tsx @@ -142,7 +142,6 @@ export const ProductDrawerForm = (props: Props) => { alt="Product Image" /> @@ -212,7 +211,6 @@ export const DashboardPage: React.FC = () => { { { { padding: 0, }} icon={ - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 { padding: 0, }} icon={ - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 { padding: "1px 0px 0px 0px", }} icon={ - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 { padding: 0, }} icon={ - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 { )} filterIcon={(filtered) => ( - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 { dataIndex={["store", "title"]} title={t("orders.fields.store")} filterIcon={(filtered) => ( - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 { dataIndex={["user", "fullName"]} title={t("orders.fields.customer")} filterIcon={(filtered) => ( - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 { return ( <> - {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */} }>{t("orders.orders")} @@ -78,7 +77,6 @@ export const OrderShow = () => { disabled={!canRejectOrder} key="reject" danger - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon={} onClick={() => handleMutate({ diff --git a/examples/finefoods-antd/src/pages/products/list.tsx b/examples/finefoods-antd/src/pages/products/list.tsx index eb1cf7bb184f..da0b18fa52b0 100644 --- a/examples/finefoods-antd/src/pages/products/list.tsx +++ b/examples/finefoods-antd/src/pages/products/list.tsx @@ -41,13 +41,11 @@ export const ProductList = ({ children }: PropsWithChildren) => { { label: "", value: "table", - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , }, { label: "", value: "card", - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , }, ]} diff --git a/examples/finefoods-antd/src/pages/stores/create.tsx b/examples/finefoods-antd/src/pages/stores/create.tsx index ed2384b5678a..5441250f715d 100644 --- a/examples/finefoods-antd/src/pages/stores/create.tsx +++ b/examples/finefoods-antd/src/pages/stores/create.tsx @@ -10,7 +10,6 @@ export const StoreCreate = () => { return ( <> - {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */} }>{t("stores.stores")} diff --git a/examples/finefoods-antd/src/pages/stores/edit.tsx b/examples/finefoods-antd/src/pages/stores/edit.tsx index cc8f73f2cf0f..a388e0245d8b 100644 --- a/examples/finefoods-antd/src/pages/stores/edit.tsx +++ b/examples/finefoods-antd/src/pages/stores/edit.tsx @@ -11,7 +11,6 @@ export const StoreEdit = () => { return ( <> - {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */} }>{t("stores.stores")} diff --git a/examples/finefoods-antd/src/pages/stores/list.tsx b/examples/finefoods-antd/src/pages/stores/list.tsx index 973647d6bc3b..0c7d602841c3 100644 --- a/examples/finefoods-antd/src/pages/stores/list.tsx +++ b/examples/finefoods-antd/src/pages/stores/list.tsx @@ -34,13 +34,11 @@ export const StoreList = () => { { label: "", value: "table", - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , }, { label: "", value: "map", - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , }, ]} diff --git a/examples/i18n-nextjs/package.json b/examples/i18n-nextjs/package.json index d1d291e225e8..e808ec229848 100644 --- a/examples/i18n-nextjs/package.json +++ b/examples/i18n-nextjs/package.json @@ -9,7 +9,7 @@ "start": "refine start" }, "dependencies": { - "@ant-design/icons": "5.0.1", + "@ant-design/icons": "^5.5.1", "@ant-design/nextjs-registry": "^1.0.0", "@refinedev/antd": "^5.43.1", "@refinedev/cli": "^2.16.39", diff --git a/examples/i18n-nextjs/src/components/header/index.tsx b/examples/i18n-nextjs/src/components/header/index.tsx index 6b8c719705ec..023ecc55e7cf 100644 --- a/examples/i18n-nextjs/src/components/header/index.tsx +++ b/examples/i18n-nextjs/src/components/header/index.tsx @@ -78,7 +78,6 @@ export const Header: React.FC = ({ {currentLocale === "en" ? "English" : "German"} - {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */} diff --git a/examples/i18n-react/package.json b/examples/i18n-react/package.json index 7e5af0f49ac1..b8716942fd3a 100644 --- a/examples/i18n-react/package.json +++ b/examples/i18n-react/package.json @@ -22,7 +22,7 @@ ] }, "dependencies": { - "@ant-design/icons": "5.0.1", + "@ant-design/icons": "^5.5.1", "@refinedev/antd": "^5.43.1", "@refinedev/cli": "^2.16.39", "@refinedev/core": "^4.55.0", diff --git a/examples/i18n-react/src/components/header/index.tsx b/examples/i18n-react/src/components/header/index.tsx index 2361bebc1b99..fd2871f6d255 100644 --- a/examples/i18n-react/src/components/header/index.tsx +++ b/examples/i18n-react/src/components/header/index.tsx @@ -52,7 +52,6 @@ export const Header: React.FC = () => { {currentLocale === "en" ? "English" : "German"} - {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */} diff --git a/examples/inferencer-antd/package.json b/examples/inferencer-antd/package.json index 71d14782bd29..740d446a1539 100644 --- a/examples/inferencer-antd/package.json +++ b/examples/inferencer-antd/package.json @@ -22,7 +22,7 @@ ] }, "dependencies": { - "@ant-design/icons": "5.0.1", + "@ant-design/icons": "^5.5.1", "@refinedev/antd": "^5.43.1", "@refinedev/cli": "^2.16.39", "@refinedev/core": "^4.55.0", diff --git a/examples/inferencer-antd/src/components/header/index.tsx b/examples/inferencer-antd/src/components/header/index.tsx index cdd1ad051002..c46534140941 100644 --- a/examples/inferencer-antd/src/components/header/index.tsx +++ b/examples/inferencer-antd/src/components/header/index.tsx @@ -78,7 +78,6 @@ export const Header: React.FC = ({ {currentLocale === "en" ? "English" : "German"} - {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */} diff --git a/examples/inferencer-graphql-hasura/package.json b/examples/inferencer-graphql-hasura/package.json index 74b59c5800b9..84895eba648c 100644 --- a/examples/inferencer-graphql-hasura/package.json +++ b/examples/inferencer-graphql-hasura/package.json @@ -22,7 +22,7 @@ ] }, "dependencies": { - "@ant-design/icons": "5.0.1", + "@ant-design/icons": "^5.5.1", "@refinedev/antd": "^5.43.1", "@refinedev/cli": "^2.16.39", "@refinedev/core": "^4.55.0", diff --git a/examples/invoicer/src/components/form/form-item-editable-input-text/index.tsx b/examples/invoicer/src/components/form/form-item-editable-input-text/index.tsx index ef7ca8079751..d36571eb0fba 100644 --- a/examples/invoicer/src/components/form/form-item-editable-input-text/index.tsx +++ b/examples/invoicer/src/components/form/form-item-editable-input-text/index.tsx @@ -105,7 +105,6 @@ export const FormItemEditableInputText = ({ /> )} - {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */} {disabled && diff --git a/examples/refine-week-invoice-generator/package.json b/examples/refine-week-invoice-generator/package.json index 64da7567d5ca..926e0a47e0e4 100644 --- a/examples/refine-week-invoice-generator/package.json +++ b/examples/refine-week-invoice-generator/package.json @@ -22,7 +22,7 @@ ] }, "dependencies": { - "@ant-design/icons": "5.0.1", + "@ant-design/icons": "^5.5.1", "@react-pdf/renderer": "^3.1.8", "@refinedev/antd": "^5.43.1", "@refinedev/cli": "^2.16.39", diff --git a/examples/refine-week-invoice-generator/src/App.tsx b/examples/refine-week-invoice-generator/src/App.tsx index ffac0e0f5f90..6ae6a8ad5133 100644 --- a/examples/refine-week-invoice-generator/src/App.tsx +++ b/examples/refine-week-invoice-generator/src/App.tsx @@ -49,26 +49,22 @@ function App() { { name: "companies", list: "/companies", - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , }, { name: "clients", list: "/clients", - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , }, { name: "contacts", list: "/contacts", edit: "/contacts/:id/edit", - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , }, { name: "missions", list: "/missions", - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , }, { @@ -76,7 +72,6 @@ function App() { list: "/invoices", create: "/invoices/create", edit: "invoices/:id/edit", - // @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 icon: , }, ]} diff --git a/examples/refine-week-invoice-generator/src/pages/invoices/list.tsx b/examples/refine-week-invoice-generator/src/pages/invoices/list.tsx index d0822ba1fd70..7616e84f5f8f 100755 --- a/examples/refine-week-invoice-generator/src/pages/invoices/list.tsx +++ b/examples/refine-week-invoice-generator/src/pages/invoices/list.tsx @@ -96,7 +96,6 @@ export const InvoiceList: React.FC = () => { {record.company && ( @@ -72,13 +71,11 @@ export const ReadyPage: React.FC = () => { target="_blank" rel="noreferrer" > - {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */} - {/* @ts-expect-error Ant Design Icon's v5.0.1 has an issue with @types/react@^18.2.66 */} diff --git a/packages/antd/src/components/table/components/filterDropdown/index.tsx b/packages/antd/src/components/table/components/filterDropdown/index.tsx index 75e30539c502..33f63db0fe0e 100644 --- a/packages/antd/src/components/table/components/filterDropdown/index.tsx +++ b/packages/antd/src/components/table/components/filterDropdown/index.tsx @@ -94,7 +94,6 @@ export const FilterDropdown: React.FC = (props) => {
{childrenWithProps}