From f09dfdaf0b677198f91f8ea0bf232e43970f4a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Necati=20=C3=96zmen?= Date: Tue, 28 May 2024 09:57:45 +0300 Subject: [PATCH 1/4] docs(blog): update JS currying post (#5991) --- ...md => 2024-05-27-js-currying-functions.md} | 156 +++++++++++++++--- 1 file changed, 130 insertions(+), 26 deletions(-) rename documentation/blog/{2022-08-28-js-currying-functions.md => 2024-05-27-js-currying-functions.md} (61%) diff --git a/documentation/blog/2022-08-28-js-currying-functions.md b/documentation/blog/2024-05-27-js-currying-functions.md similarity index 61% rename from documentation/blog/2022-08-28-js-currying-functions.md rename to documentation/blog/2024-05-27-js-currying-functions.md index c066554b621f..f10982318840 100644 --- a/documentation/blog/2022-08-28-js-currying-functions.md +++ b/documentation/blog/2024-05-27-js-currying-functions.md @@ -4,11 +4,12 @@ description: Deep dive into variadic currying in JavaScript with examples slug: javascript-variadic-currying authors: abdullah_numan tags: [javascript] -image: https://refine.ams3.cdn.digitaloceanspaces.com/blog/2022-08-28-js-currying-functions/social.png -featured_image: https://refine.ams3.cdn.digitaloceanspaces.com/blog/2022-08-28-js-currying-functions/featured.png +image: https://refine.ams3.cdn.digitaloceanspaces.com/blog/2022-08-28-js-currying-functions/social-2.png hide_table_of_contents: false --- +**_This article was last updated on May 27, 2024 to add new sections on advanced usage, explanations and performance consideration on JavaScript Currying_** + ## Introduction In this post, we first look at the confusion around currying in JavaScript, especially with respect to polyadic partial application. We find out that we're not really doing currying in the real sense that it is implemented in Haskell, rather in a much limited capacity. @@ -17,13 +18,78 @@ In the later part, we delve into variadic currying in a stricter sense with an e Steps we'll cover: +- [What is JavaScript Currying?](#what-is-javascript-currying) +- [What is Variadic Currying?](#what-is-variadic-currying) + - [Benefits of Variadic Currying](#benefits-of-variadic-currying) - [Variadic Partial Application](#variadic-partial-application) - [Using `Function.prototype` Methods](#using-functionprototype-methods) - [Variadic Currying with Termination](#variadic-currying-with-termination) +- [Performance Consideration when Using Javascript Currying](#performance-consideration-when-using-javascript-currying) +- [Bonus: Advanced JavaScript Currying Techniques](#bonus-advanced-javascript-currying-techniques) This post is about variadic currying in JavaScript. It is the fifth part of the series titled [Curry Functions in JavaScript](https://dev.to/anewman15/curry-functions-in-javascript-4jpa). -### Variadic Partial Application +## What is JavaScript Currying? + +Currying is a way of transforming a multi-argument function into a sequence of functions with a single argument. In other words, if a function will generally receive multiple arguments, it can be represented as a series of functions in which the first one receives one argument and then returns another function to which the next argument is passed as an argument, and so on. This way, we build more modular functions, hence reusable. + +As an instance here is a function that adds two numbers : + +```javascript +function add(a, b) { + return a + b; +} +``` + +Using currying, we can transform this into: + +```javascript +function add(a) { + return function (b) { + return a + b; + }; +} +``` + +Now `add(2)(3)` would produce `5`. That is pretty useful when we want to build partially applied functions for a better readability/maintainability of the code. + +This property of currying also supports the development of higher-order functions and hence can be used to make function compositions easier in a way that makes the code more graceful and functional. + +Currying is very powerful stuff in terms of writing reusable code and empowering our functions with a lot of flexibility. It may take a bit of time to get used to, but when one sees the patterns, it is soon recognized as a very useful tool in our JavaScript toolkit. + +## What is Variadic Currying? + +Variadic currying is an advanced concept in functional programming. It is an extension of the idea of currying for functions that are supposed to handle variable arguments. In the case of currying with n arguments, the function gets converted into a succession of n functions where each function takes a single argument. Variadic currying extends that concept to handle functions when the number of function arguments is not fixed. + +In the case of variadic currying, the function receives plural arguments in the first call and in all subsequent calls, but a requirement of each partial application is to still be able to receive a plural number of preferences. This allows the function to be called with plural arguments and made flexible to be useful and reusable with a dynamic number of parameters. + +```javascript +function concatenate(...strings) { + return strings.join(" "); +} + +function curry(f) { + return function curried(...args) { + if (args.length >= f.length) return f(...args); + return function (...nextArgs) { + return curried(...args, ...nextArgs); + }; + }; +} + +const curriedConcatenate = curry(concatenate); +console.log(curriedConcatenate("Hello")("world!")("How", "are", "you?")()); // Outputs: "Hello world! How are you?" +``` + +### Benefits of Variadic Currying + +**Flexibility**: Being able to partially apply functions regardless of the number of arguments, they lean more toward flexibility, molding them in various use cases. + +**Reusability**: Functions can be modularized and then reused with different sets of arguments without developing the core logic again and again. + +**Modularity**: It allows functions to be used in more modular ways, making the code modular + +## Variadic Partial Application In the previous article titled [Auto-currying in JavaScript](https://dev.to/anewman15/auto-currying-in-javascript-17il), we focused on the **unarity** of curried functions, because that's what a curried function ought to be. @@ -132,7 +198,7 @@ So basically, what we've done is allow the accumulator to take multiple argument But now our `curry()` function is much more powerful. We can pass any number of arguments to an accumulator, as long as that is returned. And it is common to implement this with native JavaScript `Function.prototype` methods. -### Using `Function.prototype` Methods +## Using `Function.prototype` Methods We can re-write the `curry()` function with `Function.prototype.apply`, and with `Function.prototype.bind`: @@ -292,36 +358,74 @@ Notice also that since we focused on unary implementation of variadic currying, Currying a variadic function is quite different from currying functions with fixed arity in terms of the logic, especially with respect to how termination is achieved by passing an empty argument. Without termination, it can take infinite number of arguments. In the next article, we'll see an example of infinitely curried function that does not require termination at all. -## Conclusion +## Performance Consideration when Using Javascript Currying -In this post, we found out that deviating from unary currying in leads to variadic partial application in JavaScript, which turns out to be more powerful. We also saw how currying an existing variadic function follows a different logic than those with fixed arity with a unary implementation. +It, however, does have a bright side; the curried code could be much more readable and modular. On the flip side, however, there are issues related to performance. When a curried function is created, at least two functions are abstracted at that point in time to wrap around each other. This reinstates extra overhead, especially if the function is called from inside a performance-critical section or very frequently. Each level of currying adds a new level of function calling to the stack so, when the program is executed, unless that is well controlled, it's slower. -
-
- - discord banner - -
+For instance, a simple curried addition function: ---- +```javascript +function add(a) { + return function (b) { + return a + b; + }; +} +``` + +That may look clean enough, but heavy use in a loop or in a performance-heavy application introduces a very noticeable latency compared to what a simple addition function would do. + +Be cautious when using currying so that poor performance is avoided, especially in performance-critical paths. Prefer a direct usage style when currying in such paths. Besides, modern JavaScript engines try to optimize a lot around function calls. Knowledge about the trade-offs in the different ways those optimizations can be turned on or off will help you be sure to make a better decision when and where to apply currying. + +While currying really helps to make the code readable and flexible, during such process we must not suffer much from performance at critical sections of our application. Striking the right balance between clean code and efficient execution is important. -## Build your React-based CRUD applications without constraints +## Bonus: Advanced JavaScript Currying Techniques -Building CRUD applications involves many repetitive task consuming your precious development time. If you are starting from scratch, you also have to implement custom solutions for critical parts of your application like authentication, authorization, state management and networking. +Beyond the most basic kind of currying that we've already seen, there's a host of more sophisticated tricks to be played. One of them is **partial application**, in which we pre-fill some of the function's arguments, so as to create a more specialised version of the function, but without actually running it. That can be used, in particular, to 'configure' functions with common settings. -Check out [Refine](https://github.com/refinedev/refine), if you are interested in a headless framework with robust architecture and full of industry best practices for your next CRUD project. +For example: -
- - refine blog logo - -
+```javascript +function multiply(a, b) { + return a * b; +} +const double = multiply.bind(null, 2); +console.log(double(5)); // Outputs 10 +``` + +Another operation is **function composition** which allows to combine several functions into a new one. Function composition is a way to make it easier to tap into the power of currying when transforming and passing data through a pipeline of functions. One can do that with a little help of utility functions from libraries like lodash and Ramda. -
+For instance: -**Refine** is an open-source React-based framework for building CRUD applications **without constraints.** -It can speed up your development time up to **3X** without compromising freedom on **styling**, **customization** and **project workflow.** +```javascript +const compose = + (...fns) => + (x) => + fns.reduceRight((y, f) => f(y), x); +const add = (a) => (b) => a + b; +const square = (x) => x * x; + +const addAndSquare = compose(square, add(2)); +console.log(addAndSquare(3)); // Outputs 25 +``` -**Refine** is headless by design and it connects **30+** backend services out-of-the-box including custom REST and GraphQL API’s. +We can also consider **infinite currying**; a function can continue to curry forever, holding its arguments, until enough arguments have been received, at which point it would carry out its computation. This is an attractive feature for function definition, but it needs to be used with care. -Visit [Refine GitHub repository](https://github.com/refinedev/refine) for more information, demos, tutorials, and example projects. +```javascript +function infiniteCurry(fn, seed) { + const reduceValue = (args, arg) => fn.apply(null, args.concat(arg)); + const next = + (...args) => + (arg) => + arg ? next(...args, arg) : args.reduce(reduceValue, seed); + return next(); +} + +const sum = infiniteCurry((a, b) => a + b, 0); +console.log(sum(1)(2)(3)()); // Outputs 6 +``` + +These advanced feature additions can significantly enhance our functional programming capabilities within JavaScript. It is a great way to write cleaner, more modular, and reusable code in dealing with big codebases. + +## Conclusion + +In this post, we found out that deviating from unary currying in leads to variadic partial application in JavaScript, which turns out to be more powerful. We also saw how currying an existing variadic function follows a different logic than those with fixed arity with a unary implementation. From 9ca8251c622d37fcbd12ef87dede301150f7af1a Mon Sep 17 00:00:00 2001 From: Alican Erdurmaz Date: Tue, 28 May 2024 12:13:55 +0300 Subject: [PATCH 2/4] chore(biome) enable use import type rule (#5985) --- .changeset/weak-trees-cough.md | 42 +++++++++++++++++++ biome.json | 3 +- cypress/support/commands/intercepts/hasura.ts | 2 +- .../support/commands/intercepts/supabase.ts | 2 +- cypress/support/types/index.ts | 4 +- documentation/src/assets/examples.tsx | 2 +- .../src/assets/integration-icons/ably.tsx | 2 +- .../src/assets/integration-icons/airtable.tsx | 2 +- .../src/assets/integration-icons/antd.tsx | 2 +- .../src/assets/integration-icons/appwrite.tsx | 2 +- .../assets/integration-icons/atlassian.tsx | 2 +- .../src/assets/integration-icons/auth-js.tsx | 2 +- .../src/assets/integration-icons/auth0.tsx | 2 +- .../assets/integration-icons/aws-cognito.tsx | 2 +- .../azure-active-directory.tsx | 2 +- .../src/assets/integration-icons/chakra.tsx | 2 +- .../src/assets/integration-icons/clerk.tsx | 2 +- .../assets/integration-icons/custom-auth.tsx | 2 +- .../src/assets/integration-icons/directus.tsx | 2 +- .../src/assets/integration-icons/dp.tsx | 2 +- .../integration-icons/elide-graphql.tsx | 2 +- .../src/assets/integration-icons/elide.tsx | 2 +- .../assets/integration-icons/entrefine.tsx | 2 +- .../src/assets/integration-icons/expo.tsx | 2 +- .../src/assets/integration-icons/firebase.tsx | 2 +- .../src/assets/integration-icons/google.tsx | 2 +- .../src/assets/integration-icons/graphql.tsx | 2 +- .../src/assets/integration-icons/hasura.tsx | 2 +- .../src/assets/integration-icons/headless.tsx | 2 +- .../assets/integration-icons/hook-form.tsx | 2 +- .../src/assets/integration-icons/hygraph.tsx | 2 +- .../src/assets/integration-icons/json-api.tsx | 2 +- .../src/assets/integration-icons/kbar.tsx | 2 +- .../src/assets/integration-icons/kinde.tsx | 2 +- .../src/assets/integration-icons/mantine.tsx | 2 +- .../src/assets/integration-icons/medusa.tsx | 2 +- .../src/assets/integration-icons/mongodb.tsx | 2 +- .../integration-icons/ms-sql-server.tsx | 2 +- .../src/assets/integration-icons/mui.tsx | 2 +- .../src/assets/integration-icons/mysql.tsx | 2 +- .../assets/integration-icons/nest-query.tsx | 2 +- .../src/assets/integration-icons/nest.tsx | 2 +- .../src/assets/integration-icons/nextjs.tsx | 2 +- .../src/assets/integration-icons/okta.tsx | 2 +- .../src/assets/integration-icons/oracle.tsx | 2 +- .../assets/integration-icons/pocketbase.tsx | 2 +- .../assets/integration-icons/postgresql.tsx | 2 +- .../src/assets/integration-icons/react.tsx | 2 +- .../src/assets/integration-icons/remix.tsx | 2 +- .../integration-icons/rest-without-text.tsx | 2 +- .../src/assets/integration-icons/rest.tsx | 2 +- .../src/assets/integration-icons/sanity.tsx | 2 +- .../assets/integration-icons/shadcn-ui.tsx | 2 +- .../src/assets/integration-icons/slack.tsx | 2 +- .../src/assets/integration-icons/sqlite.tsx | 2 +- .../integration-icons/strapi-with-text.tsx | 2 +- .../src/assets/integration-icons/strapi.tsx | 2 +- .../integration-icons/supabase-with-text.tsx | 2 +- .../src/assets/integration-icons/supabase.tsx | 2 +- .../assets/integration-icons/usegenerated.tsx | 2 +- .../src/assets/integration-icons/vite.tsx | 2 +- documentation/src/assets/integrations.ts | 2 +- documentation/src/assets/nav-menu.ts | 2 +- .../src/assets/popover-icons/about-us.tsx | 2 +- .../src/assets/popover-icons/awesome.tsx | 2 +- .../src/assets/popover-icons/chevron-down.tsx | 2 +- .../src/assets/popover-icons/contribute.tsx | 2 +- .../src/assets/popover-icons/documents.tsx | 2 +- .../src/assets/popover-icons/examples.tsx | 2 +- .../src/assets/popover-icons/expert.tsx | 2 +- .../src/assets/popover-icons/integrations.tsx | 2 +- .../src/assets/popover-icons/refine-store.tsx | 2 +- .../src/assets/popover-icons/refine-week.tsx | 2 +- .../src/assets/popover-icons/refine.tsx | 2 +- .../src/assets/popover-icons/right-arrow.tsx | 2 +- .../src/assets/popover-icons/tutorial.tsx | 2 +- .../assets/popover-icons/ui-frameworks.tsx | 2 +- .../src/assets/popover-icons/use-cases.tsx | 2 +- .../src/assets/week-of-refine/constants.ts | 2 +- .../src/assets/week-of-refine/icons/date.tsx | 2 +- .../icons/refine-week-logo-xl.tsx | 2 +- .../week-of-refine/icons/refine-week-logo.tsx | 2 +- .../src/components/banner/banner-examples.tsx | 2 +- .../banner/banner-image-with-text.tsx | 2 +- .../src/components/banner/banner-modal.tsx | 2 +- .../components/integrations/card/index.tsx | 2 +- .../landing/icons/access-control-icon.tsx | 2 +- .../components/landing/icons/amazon-icon.tsx | 2 +- .../landing/icons/atlassian-icon.tsx | 2 +- .../landing/icons/authentication-icon.tsx | 2 +- .../landing/icons/autodesk-icon.tsx | 2 +- .../landing/icons/best-practices-icon.tsx | 2 +- .../landing/icons/black-box-icon.tsx | 2 +- .../components/landing/icons/charts-icon.tsx | 2 +- .../components/landing/icons/cisco-icon.tsx | 2 +- .../landing/icons/components-icon.tsx | 2 +- .../landing/icons/datatables-icon.tsx | 2 +- .../landing/icons/deloitte-icon.tsx | 2 +- .../components/landing/icons/forms-icon.tsx | 2 +- .../src/components/landing/icons/ibm-icon.tsx | 2 +- .../landing/icons/identity-icon.tsx | 2 +- .../icons/infinite-scalability-icon.tsx | 2 +- .../components/landing/icons/intel-icon.tsx | 2 +- .../landing/icons/interfaces-icon.tsx | 2 +- .../landing/icons/jp-morgan-icon.tsx | 2 +- .../components/landing/icons/list-icon.tsx | 2 +- .../components/landing/icons/meta-icon.tsx | 2 +- .../components/landing/icons/monitor-icon.tsx | 2 +- .../landing/icons/no-vendor-lockin-icon.tsx | 2 +- .../components/landing/icons/oracle-icon.tsx | 2 +- .../landing/icons/pro-services-icon.tsx | 2 +- .../landing/icons/providers-icon.tsx | 2 +- .../components/landing/icons/routes-icon.tsx | 2 +- .../landing/icons/salesforce-icon.tsx | 2 +- .../landing/icons/security-icon.tsx | 2 +- .../landing/icons/self-hosted-icon.tsx | 2 +- .../components/landing/icons/support-icon.tsx | 2 +- .../components/landing/icons/upwork-icon.tsx | 2 +- .../landing/icons/utilities-icon.tsx.tsx | 2 +- .../components/landing/icons/wizards-icon.tsx | 2 +- .../components/live-preview-context/index.tsx | 2 +- .../src/components/props-table/index.tsx | 2 +- .../refine-week/cover-bg-shadow.tsx | 2 +- .../components/refine-week/day-indicator.tsx | 2 +- .../refine-week/refine-week-desktop.tsx | 2 +- .../refine-week/refine-week-mobile.tsx | 2 +- .../select-tutorial-framework/index.tsx | 2 +- .../src/components/tooltip/index.tsx | 2 +- .../src/components/tutorial-toc/index.tsx | 4 +- .../src/components/ui-conditional/index.tsx | 2 +- .../src/context/CommunityStats/index.tsx | 2 +- documentation/src/hooks/use-dynamic-import.ts | 2 +- documentation/src/hooks/use-keydown.ts | 2 +- documentation/src/hooks/use-outside-click.ts | 2 +- .../src/pages/integrations/index.tsx | 2 +- documentation/src/pages/templates/index.tsx | 2 +- .../npm-scripts/install-packages-commands.tsx | 2 +- .../src/refine-theme/blog-footer.tsx | 2 +- documentation/src/refine-theme/blog-hero.tsx | 3 +- .../common-circle-chevron-down.tsx | 2 +- .../common-circle-chevron-left.tsx | 2 +- .../refine-theme/common-circle-chevron-up.tsx | 2 +- .../src/refine-theme/common-drawer.tsx | 2 +- .../refine-theme/common-header/menu-item.tsx | 2 +- .../src/refine-theme/common-header/menu.tsx | 2 +- .../common-header/mobile-menu-modal.tsx | 4 +- .../common-header/navbar-item.tsx | 2 +- .../common-header/navbar-popover-item.tsx | 2 +- .../src/refine-theme/common-themed-image.tsx | 2 +- .../src/refine-theme/doc-survey-widget.tsx | 2 +- .../doc-thumbs-up-down-feedback-widget.tsx | 8 ++-- .../src/refine-theme/doc-version-dropdown.tsx | 2 +- .../refine-theme/enterprise-data-source.tsx | 7 +++- .../enterprise-get-in-touch-button.tsx | 2 +- .../enterprise-get-in-touch-cta.tsx | 2 +- .../refine-theme/enterprise-iam-services.tsx | 7 +++- .../src/refine-theme/icons/calendar.tsx | 2 +- .../src/refine-theme/icons/check-circle.tsx | 2 +- .../src/refine-theme/icons/close.tsx | 2 +- .../src/refine-theme/icons/cross-circle.tsx | 2 +- .../src/refine-theme/icons/footer-discord.tsx | 2 +- .../src/refine-theme/icons/footer-github.tsx | 2 +- .../refine-theme/icons/footer-linkedin.tsx | 2 +- .../src/refine-theme/icons/footer-reddit.tsx | 2 +- .../src/refine-theme/icons/footer-twitter.tsx | 2 +- .../src/refine-theme/icons/hamburger.tsx | 2 +- .../src/refine-theme/icons/heart-outlined.tsx | 2 +- .../icons/landing-authorization.tsx | 2 +- .../refine-theme/icons/landing-automate.tsx | 2 +- .../refine-theme/icons/landing-clipboard.tsx | 2 +- .../refine-theme/icons/landing-feather.tsx | 2 +- .../icons/landing-fingerprint.tsx | 2 +- .../icons/landing-integration.tsx | 2 +- .../src/refine-theme/icons/landing-key.tsx | 2 +- .../src/refine-theme/icons/landing-react.tsx | 2 +- .../src/refine-theme/icons/landing-share.tsx | 2 +- .../icons/landing-stats-discord.tsx | 2 +- .../icons/landing-stats-github.tsx | 2 +- .../icons/landing-stats-twitter.tsx | 2 +- .../refine-theme/icons/landing-subtract.tsx | 2 +- .../src/refine-theme/icons/landing-table.tsx | 2 +- .../icons/landing-tile-honeycomb.tsx | 2 +- .../refine-theme/icons/landing-tile-list.tsx | 2 +- .../refine-theme/icons/landing-tile-sides.tsx | 2 +- .../src/refine-theme/icons/landing-world.tsx | 2 +- .../src/refine-theme/icons/magnifier.tsx | 2 +- .../icons/new-badge-shiny-blue.tsx | 2 +- .../icons/new-badge-shiny-cyan.tsx | 2 +- .../refine-theme/icons/new-badge-shiny.tsx | 2 +- .../refine-theme/icons/refine-logo-seal.tsx | 2 +- .../icons/refine-logo-shiny-blue.tsx | 2 +- .../icons/refine-logo-shiny-cyan.tsx | 2 +- .../refine-theme/icons/refine-logo-shiny.tsx | 2 +- .../src/refine-theme/icons/thumbs-down.tsx | 2 +- .../src/refine-theme/icons/thumbs-up.tsx | 2 +- .../refine-theme/landing-already-invented.tsx | 2 +- .../src/refine-theme/landing-community.tsx | 2 +- .../landing-copy-command-button.tsx | 2 +- .../landing-enterprise-developers.tsx | 2 +- .../landing-hero-animation-item.tsx | 2 +- .../src/refine-theme/landing-packages.tsx | 8 ++-- .../refine-theme/landing-pure-react-code.tsx | 2 +- .../refine-theme/landing-rainbow-button.tsx | 5 ++- .../landing-section-cta-button.tsx | 2 +- .../landing-sliding-highlights.tsx | 2 +- .../src/refine-theme/landing-sweet-spot.tsx | 2 +- .../src/refine-theme/landing-testimonial.tsx | 2 +- .../landing-trusted-by-developers.tsx | 2 +- .../src/refine-theme/template-detail.tsx | 2 +- .../refine-theme/templates-filter-button.tsx | 2 +- .../src/refine-theme/templates-filters.tsx | 2 +- .../src/refine-theme/templates-hero.tsx | 2 +- .../src/refine-theme/templates-list.tsx | 2 +- .../src/refine-theme/top-announcement.tsx | 2 +- .../src/refine-theme/tutorial-navigation.tsx | 2 +- .../src/refine-theme/tutorial-paginator.tsx | 2 +- .../tutorial-parameter-dropdown.tsx | 2 +- documentation/src/theme/Root.tsx | 2 +- .../src/utils/remove-active-from-files.ts | 2 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/categories/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/users/create.tsx | 2 +- .../src/pages/users/edit.tsx | 2 +- .../src/pages/users/list.tsx | 2 +- .../src/pages/users/show.tsx | 2 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/categories/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/users/create.tsx | 2 +- .../src/pages/users/edit.tsx | 2 +- .../src/pages/users/list.tsx | 2 +- .../src/pages/users/show.tsx | 2 +- .../src/authz/permifyClient.ts | 2 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/categories/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/users/create.tsx | 2 +- .../src/pages/users/edit.tsx | 2 +- .../src/pages/users/list.tsx | 2 +- .../src/pages/users/show.tsx | 2 +- .../layout/account-settings/index.tsx | 6 +-- .../src/components/layout/gh-banner/index.tsx | 2 +- .../components/tags/contact-status-tag.tsx | 4 +- .../src/components/tags/quote-status-tag.tsx | 2 +- .../src/components/tags/user-tag.tsx | 2 +- .../app-crm-minimal/src/providers/auth.ts | 4 +- .../src/providers/data/fetch-wrapper.ts | 2 +- .../routes/companies/edit/contacts-table.tsx | 4 +- .../src/routes/companies/edit/form.tsx | 12 ++++-- .../routes/companies/list/create-modal.tsx | 6 +-- .../src/routes/companies/list/index.tsx | 6 +-- .../components/deals-chart/index.tsx | 6 +-- .../dashboard/components/deals-chart/utils.ts | 4 +- .../components/latest-activities/index.tsx | 4 +- .../components/total-count-card/index.tsx | 2 +- .../components/upcoming-events/index.tsx | 4 +- .../src/routes/dashboard/index.tsx | 2 +- .../forms/description/description-form.tsx | 8 ++-- .../forms/description/description-header.tsx | 2 +- .../edit/forms/due-date/duedate-form.tsx | 8 ++-- .../edit/forms/due-date/duedate-header.tsx | 2 +- .../tasks/edit/forms/stage/stage-form.tsx | 6 +-- .../tasks/edit/forms/title/title-form.tsx | 8 ++-- .../tasks/edit/forms/users/users-form.tsx | 6 +-- .../tasks/edit/forms/users/users-header.tsx | 2 +- .../src/routes/tasks/edit/index.tsx | 2 +- .../src/routes/tasks/list/index.tsx | 15 ++++--- .../src/routes/tasks/list/kanban/board.tsx | 2 +- .../src/routes/tasks/list/kanban/card.tsx | 2 +- .../src/routes/tasks/list/kanban/column.tsx | 2 +- .../src/routes/tasks/list/kanban/item.tsx | 2 +- .../calendar/upcoming-events/event/index.tsx | 4 +- .../calendar/upcoming-events/index.tsx | 4 +- .../app-crm/src/components/custom-avatar.tsx | 2 +- .../layout/account-settings/index.tsx | 6 +-- .../layout/algolia-search/index.tsx | 4 +- .../layout/algolia-search/wrapper.tsx | 2 +- .../src/components/layout/gh-banner/index.tsx | 2 +- .../layout/notification-message.tsx | 7 +++- .../src/components/layout/notifications.tsx | 7 +++- .../app-crm/src/components/layout/sider.tsx | 4 +- .../src/components/list-title-button.tsx | 2 +- .../src/components/pagination-total.tsx | 2 +- .../src/components/participants/index.tsx | 6 +-- .../components/select-option-with-avatar.tsx | 2 +- .../components/tags/contact-status-tag.tsx | 4 +- .../src/components/tags/quote-status-tag.tsx | 4 +- .../app-crm/src/components/tags/user-tag.tsx | 6 +-- examples/app-crm/src/components/text.tsx | 2 +- .../app-crm/src/hooks/useCompaniesSelect.tsx | 4 +- .../app-crm/src/hooks/useContactsSelect.tsx | 6 +-- .../app-crm/src/hooks/useDealStagesSelect.tsx | 4 +- examples/app-crm/src/hooks/useUsersSelect.tsx | 4 +- examples/app-crm/src/providers/auth.ts | 2 +- examples/app-crm/src/providers/data/axios.ts | 2 +- .../src/providers/data/refresh-token.ts | 4 +- .../src/routes/administration/audit-log.tsx | 14 +++++-- .../administration/components/action-cell.tsx | 2 +- .../components/role-tag/index.tsx | 4 +- .../src/routes/administration/settings.tsx | 4 +- .../components/calendar/full-calendar.tsx | 4 +- .../calendar/components/calendar/index.tsx | 6 +-- .../calendar/components/categories/index.tsx | 4 +- .../categories/manage-categories/index.tsx | 6 +-- .../routes/calendar/components/form/index.tsx | 8 ++-- .../app-crm/src/routes/calendar/create.tsx | 4 +- examples/app-crm/src/routes/calendar/edit.tsx | 4 +- examples/app-crm/src/routes/calendar/show.tsx | 4 +- .../companies/components/avatar-group.tsx | 4 +- .../components/card-view/card/card.tsx | 6 +-- .../companies/components/card-view/index.tsx | 8 ++-- .../companies/components/contacts-table.tsx | 10 ++--- .../companies/components/deals-table.tsx | 6 +-- .../routes/companies/components/info-form.tsx | 10 +++-- .../src/routes/companies/components/notes.tsx | 10 ++--- .../companies/components/quotes-table.tsx | 8 ++-- .../companies/components/table-view.tsx | 14 ++++--- .../components/title-form/title-form.tsx | 8 ++-- .../app-crm/src/routes/companies/create.tsx | 8 ++-- .../app-crm/src/routes/companies/list.tsx | 8 ++-- .../routes/contacts/components/card-view.tsx | 6 +-- .../routes/contacts/components/card/card.tsx | 6 +-- .../components/comment/comment-form.tsx | 8 ++-- .../components/comment/comment-list.tsx | 8 ++-- .../contacts/components/status/index.tsx | 6 +-- .../routes/contacts/components/table-view.tsx | 10 +++-- .../app-crm/src/routes/contacts/create.tsx | 4 +- examples/app-crm/src/routes/contacts/list.tsx | 6 +-- .../src/routes/contacts/show/index.tsx | 4 +- .../components/companies-map/map.tsx | 2 +- .../dashboard/components/deals-chart.tsx | 6 +-- .../components/latest-activities/index.tsx | 4 +- .../dashboard/components/tasks-chart.tsx | 6 +-- .../components/total-count-card/index.tsx | 4 +- .../components/total-revenue-chart/index.tsx | 6 +-- .../app-crm/src/routes/dashboard/index.tsx | 2 +- .../quotes/components/form-modal/index.tsx | 12 ++++-- .../routes/quotes/components/pdf-export.tsx | 4 +- .../quotes/components/products-services.tsx | 12 +++--- .../quotes/components/show-description.tsx | 4 +- .../components/status-indicator/index.tsx | 6 +-- examples/app-crm/src/routes/quotes/create.tsx | 2 +- examples/app-crm/src/routes/quotes/edit.tsx | 2 +- examples/app-crm/src/routes/quotes/list.tsx | 10 ++--- .../app-crm/src/routes/quotes/show/index.tsx | 2 +- .../scrumboard/components/accordion.tsx | 2 +- .../scrumboard/components/add-card-button.tsx | 2 +- .../components/add-stage-button.tsx | 4 +- .../scrumboard/components/board/index.tsx | 4 +- .../scrumboard/components/checklist-input.tsx | 2 +- .../scrumboard/components/column/index.tsx | 6 +-- .../scrumboard/components/comment-list.tsx | 8 ++-- .../components/deal-kanban-card/index.tsx | 6 +-- .../deal-kanban-won-lost-drop/index.tsx | 2 +- .../components/forms/checklist-form.tsx | 4 +- .../components/forms/comment-form.tsx | 6 +-- .../components/forms/description-form.tsx | 6 +-- .../components/forms/duedate-form.tsx | 4 +- .../components/forms/stage-form.tsx | 11 +++-- .../components/forms/title-form.tsx | 4 +- .../components/forms/users-form.tsx | 6 +-- .../components/headers/accordion-header.tsx | 2 +- .../components/headers/checklist-header.tsx | 2 +- .../components/headers/description-header.tsx | 2 +- .../components/headers/duedate-header.tsx | 2 +- .../components/headers/users-header.tsx | 4 +- .../scrumboard/components/item/index.tsx | 4 +- .../components/project-kanban-card/index.tsx | 2 +- .../routes/scrumboard/kanban/create-stage.tsx | 4 +- .../src/routes/scrumboard/kanban/create.tsx | 4 +- .../routes/scrumboard/kanban/edit-stage.tsx | 4 +- .../src/routes/scrumboard/kanban/edit.tsx | 4 +- .../src/routes/scrumboard/kanban/list.tsx | 14 +++---- .../src/routes/scrumboard/sales/create.tsx | 10 ++--- .../src/routes/scrumboard/sales/edit.tsx | 8 ++-- .../routes/scrumboard/sales/finalize-deal.tsx | 6 +-- .../src/routes/scrumboard/sales/list.tsx | 10 ++--- .../src/components/history.tsx | 6 +-- .../src/pages/posts/list.tsx | 2 +- examples/auth-antd/src/App.tsx | 2 +- examples/auth-antd/src/pages/posts/edit.tsx | 2 +- examples/auth-antd/src/pages/posts/list.tsx | 2 +- examples/auth-antd/src/pages/posts/show.tsx | 2 +- examples/auth-auth0/src/App.tsx | 2 +- .../auth-auth0/src/pages/posts/create.tsx | 2 +- examples/auth-auth0/src/pages/posts/edit.tsx | 2 +- examples/auth-auth0/src/pages/posts/list.tsx | 2 +- examples/auth-auth0/src/pages/posts/show.tsx | 2 +- examples/auth-chakra-ui/src/App.tsx | 2 +- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../auth-chakra-ui/src/interfaces/index.d.ts | 2 +- .../auth-chakra-ui/src/pages/posts/create.tsx | 2 +- .../auth-chakra-ui/src/pages/posts/edit.tsx | 2 +- .../auth-chakra-ui/src/pages/posts/list.tsx | 6 +-- .../auth-chakra-ui/src/pages/posts/show.tsx | 2 +- examples/auth-google-login/src/App.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- examples/auth-headless/src/App.tsx | 2 +- .../src/components/layout/index.tsx | 2 +- .../auth-headless/src/pages/posts/list.tsx | 4 +- examples/auth-keycloak/src/App.tsx | 2 +- .../auth-keycloak/src/pages/posts/create.tsx | 2 +- .../auth-keycloak/src/pages/posts/edit.tsx | 2 +- .../auth-keycloak/src/pages/posts/list.tsx | 2 +- .../auth-keycloak/src/pages/posts/show.tsx | 2 +- examples/auth-kinde/src/pages/posts/list.tsx | 2 +- examples/auth-mantine/src/App.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../auth-mantine/src/interfaces/index.d.ts | 2 +- .../auth-mantine/src/pages/posts/edit.tsx | 2 +- .../auth-mantine/src/pages/posts/list.tsx | 6 +-- .../auth-mantine/src/pages/posts/show.tsx | 2 +- examples/auth-material-ui/src/App.tsx | 2 +- .../src/pages/posts/create.tsx | 4 +- .../auth-material-ui/src/pages/posts/edit.tsx | 4 +- .../auth-material-ui/src/pages/posts/list.tsx | 4 +- examples/auth-otp/src/App.tsx | 2 +- examples/auth-otp/src/pages/posts/create.tsx | 2 +- examples/auth-otp/src/pages/posts/edit.tsx | 2 +- examples/auth-otp/src/pages/posts/list.tsx | 2 +- examples/auth-otp/src/pages/posts/show.tsx | 2 +- examples/base-antd/src/pages/posts/create.tsx | 2 +- examples/base-antd/src/pages/posts/edit.tsx | 2 +- examples/base-antd/src/pages/posts/list.tsx | 2 +- examples/base-antd/src/pages/posts/show.tsx | 2 +- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../base-chakra-ui/src/interfaces/index.d.ts | 2 +- .../base-chakra-ui/src/pages/posts/create.tsx | 2 +- .../base-chakra-ui/src/pages/posts/edit.tsx | 2 +- .../base-chakra-ui/src/pages/posts/list.tsx | 6 +-- .../base-chakra-ui/src/pages/posts/show.tsx | 2 +- .../base-headless/src/pages/posts/list.tsx | 4 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../base-mantine/src/interfaces/index.d.ts | 2 +- .../base-mantine/src/pages/posts/create.tsx | 2 +- .../base-mantine/src/pages/posts/edit.tsx | 2 +- .../base-mantine/src/pages/posts/list.tsx | 6 +-- .../base-mantine/src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 4 +- .../base-material-ui/src/pages/posts/edit.tsx | 4 +- .../base-material-ui/src/pages/posts/list.tsx | 4 +- examples/blog-ecommerce/pages/_app.tsx | 2 +- examples/blog-ecommerce/pages/index.tsx | 6 +-- .../blog-ecommerce/src/components/layout.tsx | 2 +- .../src/authProvider.ts | 2 +- .../src/components/client/create.tsx | 8 ++-- .../src/components/client/edit.tsx | 6 +-- .../src/components/client/item.tsx | 4 +- .../src/components/company/create.tsx | 9 +++- .../src/components/company/edit.tsx | 9 +++- .../src/components/company/item.tsx | 2 +- .../src/components/contacts/create.tsx | 9 +++- .../src/components/mission/create.tsx | 9 +++- .../src/components/mission/edit.tsx | 9 +++- .../src/components/pdf/pdfLayout.tsx | 2 +- .../src/pages/client/list.tsx | 4 +- .../src/pages/company/list.tsx | 4 +- .../src/pages/contacts/edit.tsx | 2 +- .../src/pages/contacts/list.tsx | 2 +- .../src/pages/invoice/create.tsx | 2 +- .../src/pages/invoice/edit.tsx | 2 +- .../src/pages/invoice/list.tsx | 2 +- .../src/pages/mission/list.tsx | 2 +- .../blog-issue-tracker/src/authProvider.ts | 2 +- .../src/pages/dashboard/index.tsx | 2 +- .../src/pages/task/create.tsx | 2 +- .../src/pages/task/edit.tsx | 2 +- .../src/pages/task/filter.tsx | 4 +- .../src/pages/task/list.tsx | 4 +- .../src/pages/task/show.tsx | 2 +- .../src/pages/user/list.tsx | 2 +- .../src/pages/companies/create.tsx | 2 +- .../src/pages/companies/edit.tsx | 2 +- .../src/pages/companies/list.tsx | 2 +- .../src/pages/companies/show.tsx | 2 +- .../src/pages/jobs/create.tsx | 2 +- .../blog-job-posting/src/pages/jobs/edit.tsx | 2 +- .../blog-job-posting/src/pages/jobs/list.tsx | 2 +- .../blog-job-posting/src/pages/jobs/show.tsx | 2 +- .../src/components/header/index.tsx | 5 ++- .../src/components/layout/index.tsx | 2 +- .../src/contexts/color-mode/index.tsx | 2 +- .../src/pages/employees.tsx | 2 +- examples/blog-material-ui/src/authProvider.ts | 2 +- .../src/pages/posts/create.tsx | 4 +- .../blog-material-ui/src/pages/posts/edit.tsx | 4 +- .../blog-material-ui/src/pages/posts/list.tsx | 4 +- .../blog-material-ui/src/reportWebVitals.ts | 2 +- examples/blog-next-refine-pwa/pages/_app.tsx | 2 +- examples/blog-next-refine-pwa/pages/index.tsx | 4 +- .../src/components/Layout.tsx | 2 +- .../src/authProvider.ts | 2 +- .../src/components/column-filter/index.tsx | 2 +- .../src/components/column-sorter/index.tsx | 2 +- .../src/components/pagination/index.tsx | 2 +- .../src/pages/posts/list.tsx | 4 +- .../blog-react-aria/src/components/Button.tsx | 4 +- .../blog-react-aria/src/components/Header.tsx | 4 +- .../blog-react-aria/src/components/Input.tsx | 4 +- .../blog-react-aria/src/components/Layout.tsx | 2 +- .../blog-react-aria/src/components/Modal.tsx | 10 +++-- .../src/pages/category/create.tsx | 2 +- .../src/pages/category/list.tsx | 2 +- .../blog-react-aria/src/reportWebVitals.ts | 2 +- .../src/components/constants/models.ts | 2 +- .../src/components/constants/useData.ts | 2 +- .../blog-react-dnd/src/contexts/index.tsx | 2 +- .../blog-react-dnd/src/pages/posts/create.tsx | 2 +- .../blog-react-dnd/src/pages/posts/edit.tsx | 2 +- .../blog-react-dnd/src/pages/posts/list.tsx | 2 +- .../blog-react-dnd/src/pages/posts/show.tsx | 2 +- .../blog-react-dnd/src/reportWebVitals.ts | 2 +- .../src/pages/userEdit.tsx | 2 +- .../src/pages/userList.tsx | 2 +- .../src/reportWebVitals.ts | 2 +- .../src/components/layout/index.tsx | 2 +- .../src/providers/notificationProvider.tsx | 2 +- .../src/components/layout/index.tsx | 2 +- .../src/providers/notificationProvider.tsx | 2 +- .../src/components/Layout.tsx | 2 +- .../src/pages/post/list.tsx | 6 +-- .../src/pages/post/show.tsx | 2 +- .../src/reportWebVitals.ts | 2 +- .../src/reportWebVitals.ts | 2 +- .../src/components/dashboard/RecentSales.tsx | 2 +- .../dashboard/ResponsiveAreaChart.tsx | 2 +- .../dashboard/ResponsiveBarChart.tsx | 2 +- .../src/components/dashboard/Stats.tsx | 4 +- .../src/components/dashboard/TabView.tsx | 2 +- .../src/components/layout/index.tsx | 2 +- .../src/pages/categories/list.tsx | 4 +- .../src/pages/categories/show.tsx | 2 +- .../src/pages/dashboard/index.tsx | 4 +- .../src/pages/products/list.tsx | 2 +- .../src/pages/products/show.tsx | 2 +- .../src/components/dealChart/index.tsx | 2 +- .../src/components/metricCard/index.tsx | 4 +- .../src/contexts/color-mode/index.tsx | 7 +++- .../src/pages/companies/list.tsx | 2 +- .../src/pages/contacts/list.tsx | 2 +- .../blog-refine-mantine-strapi/src/App.tsx | 4 +- .../src/authProvider.ts | 2 +- .../src/components/header/index.tsx | 4 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 4 +- .../src/contexts/color-mode/index.tsx | 7 +++- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/components/charts/AreaGraph.tsx | 2 +- .../src/components/charts/BarChart.tsx | 2 +- .../src/components/header/index.tsx | 7 +++- .../src/components/kpi-card/index.tsx | 4 +- .../src/components/recent-sales/index.tsx | 4 +- .../src/contexts/color-mode/index.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/dashboard/Dashboard.tsx | 2 +- .../src/pages/products/list.tsx | 2 +- .../components/charts/DisplayAreaGraph.tsx | 2 +- .../src/components/charts/DisplayBarChart.tsx | 2 +- .../src/components/layout/index.tsx | 2 +- .../src/components/modal/index.tsx | 2 +- .../src/components/table/RecentSalesTable.tsx | 6 +-- .../src/pages/categories/create.tsx | 4 +- .../src/pages/categories/edit.tsx | 4 +- .../src/pages/categories/list.tsx | 6 +-- .../src/pages/categories/show.tsx | 2 +- .../src/pages/dashboard/DashboardPage.tsx | 2 +- .../src/pages/products/create.tsx | 4 +- .../src/pages/products/edit.tsx | 4 +- .../src/pages/products/list.tsx | 6 +-- .../src/pages/products/show.tsx | 2 +- .../src/components/breadcrumb/index.tsx | 2 +- .../components/dashboard/chartView/index.tsx | 4 +- .../dashboard/recentSales/index.tsx | 2 +- .../src/components/layout/index.tsx | 2 +- .../src/components/menu/index.tsx | 2 +- .../src/pages/categories/create.tsx | 4 +- .../src/pages/categories/edit.tsx | 4 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/categories/show.tsx | 2 +- .../src/pages/dashboard/index.tsx | 2 +- .../src/pages/products/create.tsx | 4 +- .../src/pages/products/edit.tsx | 4 +- .../src/pages/products/list.tsx | 2 +- .../src/pages/products/show.tsx | 2 +- .../src/pages/create.tsx | 2 +- .../src/reportWebVitals.ts | 2 +- .../src/components/layout/index.tsx | 2 +- .../src/components/ui/form.tsx | 8 ++-- .../src/components/ui/pagination.tsx | 2 +- .../src/pages/blog-posts/create.tsx | 2 +- .../src/pages/blog-posts/edit.tsx | 2 +- .../src/pages/blog-posts/list.tsx | 6 +-- .../src/pages/blog-posts/show.tsx | 2 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 4 +- .../src/pages/categories/show.tsx | 2 +- .../src/authProvider.ts | 2 +- .../src/pages/Layout.tsx | 2 +- .../src/reportWebVitals.ts | 2 +- .../src/components/layout/index.tsx | 2 +- .../src/pages/dashboard/details/index.tsx | 4 +- .../src/pages/dashboard/kpiCard/index.tsx | 2 +- .../src/components/Layout.tsx | 2 +- .../src/reportWebVitals.ts | 2 +- examples/blog-win95/src/authProvider.ts | 2 +- .../src/components/layout/index.tsx | 2 +- .../blog-win95/src/pages/categories/list.tsx | 2 +- examples/blog-win95/src/pages/posts/list.tsx | 4 +- .../calendar-app/src/pages/calendar/index.tsx | 6 +-- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/components/layout/index.tsx | 4 +- .../src/pages/posts/list.tsx | 2 +- examples/customization-login/src/App.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/components/layout/index.tsx | 2 +- .../src/components/sider/index.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/components/sider/index.tsx | 4 +- .../src/components/sider/styles.ts | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/components/Header/index.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../customization-theme-mantine/src/App.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/contexts/index.tsx | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 4 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/blog-posts/create.tsx | 2 +- .../src/pages/blog-posts/edit.tsx | 2 +- .../src/pages/blog-posts/list.tsx | 2 +- .../src/pages/blog-posts/show.tsx | 2 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/utility/authProvider.ts | 4 +- .../src/utility/normalize.ts | 2 +- examples/data-provider-appwrite/src/App.tsx | 4 +- .../src/pages/posts/create.tsx | 6 +-- .../src/pages/posts/edit.tsx | 6 +-- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/utility/normalize.ts | 2 +- .../src/pages/categories/create.tsx | 6 +-- .../src/pages/categories/edit.tsx | 6 +-- .../src/pages/categories/list.tsx | 4 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 10 +++-- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 4 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/categories/create.tsx | 4 +- .../src/pages/categories/edit.tsx | 4 +- .../src/pages/categories/list.tsx | 4 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 6 +-- .../src/pages/posts/list.tsx | 4 +- .../src/pages/posts/show.tsx | 4 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/utility/normalize.ts | 2 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- examples/data-provider-strapi-v4/src/App.tsx | 2 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- examples/data-provider-strapi/src/App.tsx | 2 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- examples/data-provider-supabase/src/App.tsx | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/utility/normalize.ts | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 4 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 10 ++++- .../src/pages/posts/edit.tsx | 10 ++++- .../src/pages/posts/list.tsx | 4 +- examples/finefoods-antd/src/authProvider.ts | 2 +- .../src/button/buttonSuccess.tsx | 2 +- .../src/components/card/index.tsx | 2 +- .../components/categories/status/index.tsx | 2 +- .../categories/tableColumnProducts/index.tsx | 4 +- .../courier/form-item-avatar/index.tsx | 4 +- .../components/courier/review-table/index.tsx | 2 +- .../src/components/courier/status/index.tsx | 2 +- .../courier/tableColumnRating/index.tsx | 2 +- .../components/customer/infoList/index.tsx | 2 +- .../components/customer/infoSummary/index.tsx | 2 +- .../customer/orderHistory/index.tsx | 4 +- .../components/customer/userStatus/index.tsx | 2 +- .../dashboard/allOrdersMap/index.tsx | 2 +- .../dashboard/dailyOrders/index.tsx | 2 +- .../dashboard/dailyRevenue/index.tsx | 2 +- .../dashboard/newCustomers/index.tsx | 2 +- .../dashboard/orderTimeline/index.tsx | 2 +- .../dashboard/recentOrders/index.tsx | 2 +- .../dashboard/trendingMenu/index.tsx | 4 +- .../src/components/drawer/index.tsx | 4 +- .../form/form-item-editable/index.tsx | 4 +- .../form/form-item-horizontal/index.tsx | 11 ++++- .../src/components/header/index.tsx | 4 +- .../src/components/icons/basic-marker.tsx | 2 +- .../src/components/icons/rank-1.tsx | 2 +- .../src/components/icons/rank-2.tsx | 2 +- .../src/components/icons/rank-3.tsx | 2 +- .../src/components/icons/rank-4.tsx | 2 +- .../src/components/icons/rank-5.tsx | 2 +- .../src/components/map/advanced-marker.tsx | 10 ++++- .../finefoods-antd/src/components/map/map.tsx | 8 ++-- .../src/components/order/actions/index.tsx | 2 +- .../order/deliveryDetails/index.tsx | 2 +- .../components/order/deliveryMap/index.tsx | 2 +- .../src/components/order/products/index.tsx | 2 +- .../order/tableColumnProducts/index.tsx | 2 +- .../src/components/paginationTotal/index.tsx | 2 +- .../components/product/drawer-form/index.tsx | 4 +- .../components/product/drawer-show/index.tsx | 6 +-- .../components/product/list-card/index.tsx | 4 +- .../components/product/list-table/index.tsx | 4 +- .../src/components/product/status/index.tsx | 2 +- .../components/store/courier-table/index.tsx | 2 +- .../src/components/store/form/fields.tsx | 14 ++++--- .../src/components/store/form/index.tsx | 2 +- .../components/store/form/useStoreForm.tsx | 6 +-- .../src/components/store/list-table/index.tsx | 2 +- .../components/store/map/all-stores-map.tsx | 2 +- .../src/components/store/map/store-map.tsx | 2 +- .../src/components/store/status/index.tsx | 2 +- .../src/context/configProvider/index.tsx | 8 +++- .../hooks/useOrderCustomKbarActions/index.tsx | 4 +- .../finefoods-antd/src/interfaces/index.d.ts | 2 +- .../finefoods-antd/src/pages/auth/index.tsx | 2 +- .../src/pages/categories/list.tsx | 4 +- .../src/pages/couriers/create.tsx | 6 +-- .../src/pages/couriers/edit.tsx | 4 +- .../src/pages/couriers/list.tsx | 4 +- .../src/pages/customers/list.tsx | 6 +-- .../src/pages/customers/show.tsx | 2 +- .../src/pages/dashboard/index.tsx | 4 +- .../finefoods-antd/src/pages/orders/list.tsx | 8 +++- .../finefoods-antd/src/pages/orders/show.tsx | 2 +- .../src/pages/products/list.tsx | 2 +- .../src/app/categories/[id]/layout.tsx | 6 +-- .../src/app/categories/[id]/page.tsx | 4 +- examples/finefoods-client/src/app/layout.tsx | 2 +- .../src/app/orders/[id]/page.tsx | 4 +- .../components/categories/nav-links/index.tsx | 4 +- .../src/components/icons/BasketIcon.tsx | 2 +- .../src/components/icons/ChevronDownIcon.tsx | 2 +- .../src/components/icons/ChevronLeftIcon.tsx | 2 +- .../src/components/icons/ChevronRightIcon.tsx | 2 +- .../src/components/icons/ChevronUpIcon.tsx | 3 +- .../src/components/icons/CloseIcon.tsx | 3 +- .../components/icons/DividerVerticalIcon.tsx | 2 +- .../components/icons/FastMotocycleIcon.tsx | 3 +- .../src/components/icons/FinefoodsIcon.tsx | 2 +- .../src/components/icons/MotorcycleIcon.tsx | 2 +- .../src/components/icons/OrderIcon.tsx | 2 +- .../src/components/icons/PlusSquareIcon.tsx | 2 +- .../src/components/icons/RefineIcon.tsx | 2 +- .../src/components/layout/layout.tsx | 2 +- .../src/components/orders/detail/index.tsx | 4 +- .../src/components/orders/modal/index.tsx | 2 +- .../src/components/products/table/table.tsx | 6 +-- .../src/context/basketContextProvider.tsx | 8 +++- .../context/ordersModalContextProvider.tsx | 2 +- .../src/hooks/useEventListener.ts | 2 +- .../src/hooks/useOnClickOutside.ts | 2 +- .../finefoods-material-ui/src/authProvider.ts | 2 +- .../src/components/card/index.tsx | 8 ++-- .../src/components/category/status/index.tsx | 4 +- .../components/courier/image-upload/index.tsx | 2 +- .../src/components/courier/rating/index.tsx | 2 +- .../src/components/courier/status/index.tsx | 4 +- .../courier/table-reviews/index.tsx | 4 +- .../src/components/customer/status/index.tsx | 4 +- .../dashboard/chartTooltip/index.tsx | 2 +- .../dashboard/dailyOrders/index.tsx | 2 +- .../dashboard/dailyRevenue/index.tsx | 2 +- .../dashboard/deliveryMap/index.tsx | 2 +- .../dashboard/newCustomers/index.tsx | 2 +- .../dashboard/orderTimeline/index.tsx | 2 +- .../dashboard/recentOrders/index.tsx | 8 +++- .../dashboard/trendingMenu/index.tsx | 4 +- .../src/components/drawer/drawer/index.tsx | 4 +- .../src/components/header/index.tsx | 9 ++-- .../src/components/icons/basic-marker.tsx | 2 +- .../src/components/icons/fine-foods.tsx | 2 +- .../src/components/icons/rank-1.tsx | 2 +- .../src/components/icons/rank-2.tsx | 2 +- .../src/components/icons/rank-3.tsx | 2 +- .../src/components/icons/rank-4.tsx | 2 +- .../src/components/icons/rank-5.tsx | 2 +- .../src/components/icons/trend-icon.tsx | 2 +- .../src/components/map/advanced-marker.tsx | 10 ++++- .../src/components/map/map.tsx | 8 ++-- .../src/components/order/details/index.tsx | 4 +- .../src/components/order/map/index.tsx | 2 +- .../src/components/order/products/index.tsx | 4 +- .../order/tableColumnProducts/index.tsx | 2 +- .../components/product/drawer-form/index.tsx | 4 +- .../components/product/image-upload/index.tsx | 2 +- .../components/product/list-card/index.tsx | 4 +- .../components/product/list-table/index.tsx | 6 +-- .../src/components/product/status/index.tsx | 4 +- .../src/components/refine-list-view/index.tsx | 2 +- .../components/store/courier-table/index.tsx | 4 +- .../src/components/store/form/index.tsx | 2 +- .../components/store/form/useStoreForm.tsx | 6 +-- .../src/components/store/info-card/index.tsx | 6 +-- .../components/store/map/all-stores-map.tsx | 2 +- .../src/components/store/map/store-map.tsx | 2 +- .../src/components/store/status/index.tsx | 4 +- .../src/components/store/table/index.tsx | 4 +- .../src/contexts/index.tsx | 2 +- .../hooks/useOrderCustomKbarActions/index.tsx | 4 +- .../src/pages/auth/index.tsx | 2 +- .../src/pages/categories/list.tsx | 6 +-- .../src/pages/couriers/create.tsx | 6 +-- .../src/pages/couriers/edit.tsx | 4 +- .../src/pages/couriers/list.tsx | 6 +-- .../src/pages/customers/list.tsx | 8 ++-- .../src/pages/customers/show.tsx | 6 +-- .../src/pages/dashboard/index.tsx | 2 +- .../src/pages/orders/list.tsx | 10 +++-- .../src/pages/orders/show.tsx | 2 +- .../src/pages/products/list.tsx | 4 +- .../src/utils/use-image-upload/index.ts | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- examples/form-antd-mutation-mode/src/App.tsx | 2 +- .../components/mutation-mode-picker/index.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../form-chakra-ui-mutation-mode/src/App.tsx | 2 +- .../components/mutation-mode-picker/index.tsx | 2 +- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/components/createPostDrawer/index.tsx | 6 +-- .../src/components/editPostDrawer/index.tsx | 6 +-- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/components/createPostModal/index.tsx | 4 +- .../src/components/editPostModal/index.tsx | 4 +- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../form-mantine-mutation-mode/src/App.tsx | 2 +- .../components/mutation-mode-picker/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/components/createPostDrawer.tsx | 4 +- .../src/components/editPostDrawer.tsx | 4 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/components/createPostModal.tsx | 4 +- .../src/components/editPostModal.tsx | 4 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/App.tsx | 2 +- .../components/mutation-mode-picker/index.tsx | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 4 +- .../src/components/createPostDrawer.tsx | 6 +-- .../src/components/editPostDrawer.tsx | 6 +-- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 4 +- .../src/components/createPostModal.tsx | 6 +-- .../src/components/editPostModal.tsx | 6 +-- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 4 +- .../src/pages/posts/list.tsx | 2 +- .../src/components/post/create.tsx | 6 +-- .../src/components/post/edit.tsx | 6 +-- .../src/pages/posts/list.tsx | 4 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../i18n-nextjs/src/app/_refine_context.tsx | 2 +- .../i18n-nextjs/src/app/blog-posts/page.tsx | 2 +- .../i18n-nextjs/src/app/categories/page.tsx | 2 +- examples/i18n-nextjs/src/app/layout.tsx | 2 +- .../src/components/header/index.tsx | 2 +- .../src/contexts/color-mode/index.tsx | 2 +- .../src/components/header/index.tsx | 2 +- .../i18n-react/src/pages/posts/create.tsx | 2 +- examples/i18n-react/src/pages/posts/edit.tsx | 2 +- examples/i18n-react/src/pages/posts/list.tsx | 2 +- examples/i18n-react/src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/list.tsx | 4 +- examples/inferencer-antd/src/authProvider.ts | 2 +- .../src/components/header/index.tsx | 2 +- .../src/contexts/color-mode/index.tsx | 7 +++- .../inferencer-chakra-ui/src/authProvider.ts | 2 +- .../src/components/header/index.tsx | 4 +- .../src/contexts/color-mode/index.tsx | 7 +++- .../inferencer-headless/src/authProvider.ts | 2 +- .../src/components/layout/index.tsx | 2 +- examples/inferencer-mantine/src/App.tsx | 2 +- .../inferencer-mantine/src/authProvider.ts | 2 +- .../src/components/header/index.tsx | 4 +- .../src/authProvider.ts | 2 +- .../src/components/header/index.tsx | 5 ++- .../src/contexts/color-mode/index.tsx | 2 +- .../input-custom/src/pages/posts/create.tsx | 2 +- .../input-custom/src/pages/posts/edit.tsx | 2 +- .../input-custom/src/pages/posts/list.tsx | 2 +- .../input-custom/src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../form-item-editable-input-text/index.tsx | 2 +- .../src/components/icons/icon-invoicer.tsx | 2 +- examples/invoicer/src/pages/accounts/edit.tsx | 4 +- examples/invoicer/src/pages/clients/list.tsx | 2 +- examples/invoicer/src/pages/invoices/list.tsx | 2 +- examples/invoicer/src/types/index.ts | 4 +- .../src/components/sider/index.tsx | 4 +- .../src/components/sider/styles.ts | 2 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/categories/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../loading-overtime/src/pages/posts/edit.tsx | 2 +- .../loading-overtime/src/pages/posts/list.tsx | 2 +- .../loading-overtime/src/pages/posts/show.tsx | 2 +- examples/mern-dashboard-client/src/App.tsx | 4 +- .../src/components/agent/AgentCard.tsx | 2 +- .../src/components/charts/PieChart.tsx | 2 +- .../src/components/charts/chart.config.ts | 2 +- .../src/components/common/CustomButton.tsx | 2 +- .../src/components/common/Form.tsx | 2 +- .../src/components/common/Profile.tsx | 2 +- .../src/components/common/PropertyCard.tsx | 2 +- .../src/components/layout/layout/index.tsx | 2 +- .../src/components/layout/sider/index.tsx | 4 +- .../src/components/layout/title/index.tsx | 2 +- .../src/contexts/index.tsx | 2 +- .../src/interfaces/agent.d.ts | 2 +- .../src/interfaces/property.d.ts | 2 +- .../src/pages/create-property.tsx | 2 +- .../src/pages/edit-property.tsx | 2 +- .../mern-dashboard-client/src/pages/login.tsx | 2 +- .../src/reportWebVitals.ts | 2 +- .../src/utils/parse-jwt.ts | 2 +- .../src/pages/blog-posts/create.tsx | 2 +- .../blog-posts/src/pages/blog-posts/edit.tsx | 2 +- .../blog-posts/src/pages/blog-posts/list.tsx | 2 +- .../blog-posts/src/pages/blog-posts/show.tsx | 2 +- .../src/pages/categories/create.tsx | 2 +- .../categories/src/pages/categories/edit.tsx | 2 +- .../categories/src/pages/categories/list.tsx | 2 +- .../categories/src/pages/categories/show.tsx | 2 +- .../apps/host/src/App.tsx | 2 +- .../apps/host/src/authProvider.ts | 2 +- .../host/src/contexts/color-mode/index.tsx | 7 +++- .../apps/my-refine-app/src/authProvider.ts | 2 +- .../src/contexts/color-mode/index.tsx | 7 +++- .../apps/my-refine-app/src/authProvider.ts | 2 +- .../src/contexts/color-mode/index.tsx | 7 +++- .../apps/my-refine-app/src/authProvider.ts | 2 +- .../src/contexts/color-mode/index.tsx | 7 +++- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../multi-level-menu/src/pages/posts/edit.tsx | 2 +- .../multi-level-menu/src/pages/posts/list.tsx | 2 +- .../multi-level-menu/src/pages/posts/show.tsx | 2 +- .../src/pages/users/create.tsx | 2 +- .../multi-level-menu/src/pages/users/edit.tsx | 2 +- .../multi-level-menu/src/pages/users/list.tsx | 2 +- .../multi-level-menu/src/pages/users/show.tsx | 2 +- .../src/authProvider.ts | 4 +- .../src/components/header/index.tsx | 2 +- .../src/components/product/create.tsx | 11 ++++- .../src/components/product/edit.tsx | 11 ++++- .../src/components/product/item.tsx | 2 +- .../src/components/product/show.tsx | 2 +- .../src/components/select/index.tsx | 2 +- .../src/pages/orders/create.tsx | 4 +- .../src/pages/orders/edit.tsx | 2 +- .../src/pages/orders/list.tsx | 2 +- .../src/pages/products/list.tsx | 4 +- .../src/utility/normalize.ts | 2 +- .../multi-tenancy-strapi/src/authProvider.ts | 2 +- .../src/components/header/index.tsx | 2 +- .../src/components/product/create.tsx | 9 +++- .../src/components/product/edit.tsx | 9 +++- .../src/components/product/item.tsx | 2 +- .../src/components/select/index.tsx | 2 +- .../src/pages/order/create.tsx | 4 +- .../src/pages/order/edit.tsx | 4 +- .../src/pages/order/list.tsx | 2 +- .../src/pages/product/list.tsx | 4 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/components/canvas/item.tsx | 2 +- .../src/components/layout/title/index.tsx | 2 +- .../pixels-admin/src/components/logs/list.tsx | 2 +- .../pixels-admin/src/pages/auth/index.tsx | 2 +- .../pixels-admin/src/pages/canvases/list.tsx | 2 +- .../pixels-admin/src/pages/users/list.tsx | 2 +- .../src/providers/accessControlProvider.ts | 2 +- .../src/providers/auditLogProvider.ts | 2 +- .../src/providers/authProvider.ts | 2 +- examples/pixels-admin/src/types/canvas.ts | 2 +- .../src/components/avatar/avatar-panel.tsx | 2 +- .../src/components/avatar/contributors.tsx | 2 +- .../pixels/src/components/canvas/create.tsx | 11 ++++- .../pixels/src/components/canvas/display.tsx | 6 +-- .../pixels/src/components/canvas/item.tsx | 2 +- .../pixels/src/components/canvas/tile.tsx | 2 +- .../src/components/layout/header/index.tsx | 2 +- .../src/components/layout/layout/index.tsx | 2 +- examples/pixels/src/pages/auth/index.tsx | 2 +- .../src/pages/canvases/featured-list.tsx | 2 +- examples/pixels/src/pages/canvases/list.tsx | 2 +- examples/pixels/src/pages/canvases/show.tsx | 4 +- .../pixels/src/providers/auditLogProvider.ts | 2 +- examples/pixels/src/providers/authProvider.ts | 2 +- .../get-unique-contributors-avatar-url.ts | 2 +- .../pixels/src/utility/get-user-query-ids.ts | 2 +- .../src/authProvider.ts | 2 +- .../src/components/client/create.tsx | 8 ++-- .../src/components/client/edit.tsx | 8 ++-- .../src/components/company/create.tsx | 10 ++++- .../src/components/company/edit.tsx | 10 ++++- .../src/components/contact/create.tsx | 10 ++++- .../src/components/mission/create.tsx | 9 +++- .../src/components/mission/edit.tsx | 9 +++- .../src/components/pdf/pdfLayout.tsx | 2 +- .../src/contexts/color-mode/index.tsx | 7 +++- .../src/pages/clients/list.tsx | 4 +- .../src/pages/companies/list.tsx | 4 +- .../src/pages/contacts/edit.tsx | 2 +- .../src/pages/contacts/list.tsx | 2 +- .../src/pages/invoices/create.tsx | 2 +- .../src/pages/invoices/edit.tsx | 2 +- .../src/pages/invoices/list.tsx | 2 +- .../src/pages/missions/list.tsx | 2 +- examples/search/src/components/header.tsx | 2 +- .../search/src/pages/categories/create.tsx | 2 +- examples/search/src/pages/categories/edit.tsx | 2 +- examples/search/src/pages/categories/list.tsx | 2 +- examples/search/src/pages/categories/show.tsx | 2 +- examples/search/src/pages/posts/create.tsx | 2 +- examples/search/src/pages/posts/edit.tsx | 2 +- examples/search/src/pages/posts/list.tsx | 2 +- examples/search/src/pages/posts/show.tsx | 2 +- .../src/App.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/App.tsx | 2 +- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/App.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/App.tsx | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 4 +- examples/store/pages/_app.tsx | 8 ++-- examples/store/pages/account/addresses.tsx | 2 +- examples/store/pages/account/index.tsx | 2 +- examples/store/pages/account/orders.tsx | 4 +- examples/store/pages/index.tsx | 12 ++++-- examples/store/pages/order/confirmed/[id].tsx | 2 +- examples/store/pages/order/details/[id].tsx | 2 +- examples/store/pages/product/[handle].tsx | 6 +-- .../account/AccountInfo/AccountInfo.tsx | 2 +- .../account/AccountLayout/AccountLayout.tsx | 4 +- .../OverviewTemplate/OverviewTemplate.tsx | 2 +- .../address/AddAddress/AddAddress.tsx | 2 +- .../address/AddressBook/AddressBook.tsx | 2 +- .../AddressTemplate/AddressTemplate.tsx | 2 +- .../address/EditAddress/EditAddress.tsx | 2 +- .../store/src/components/auth/LoginView.tsx | 2 +- .../store/src/components/auth/SignUpView.tsx | 2 +- .../src/components/cart/CartItem/CartItem.tsx | 4 +- .../CheckoutCartItem/CheckoutCartItem.tsx | 4 +- .../checkout/AddressSelect/AddressSelect.tsx | 2 +- .../BillingAddress/BillingAddress.tsx | 2 +- .../checkout/CardTotals/CardTotals.tsx | 2 +- .../components/checkout/CartItems/index.tsx | 2 +- .../checkout/DiscountCode/DiscountCode.tsx | 2 +- .../components/checkout/GiftCard/GiftCard.tsx | 2 +- .../checkout/PaymentButton/PaymentButton.tsx | 2 +- .../PaymentContainer/PaymentContainer.tsx | 2 +- .../checkout/PaymentStripe/PaymentStripe.tsx | 2 +- .../PaymentWrapper/PaymentWrapper.tsx | 6 +-- .../components/checkout/Shipping/Shipping.tsx | 2 +- .../ShippingAddress/ShippingAddress.tsx | 4 +- .../src/components/common/Avatar/Avatar.tsx | 2 +- .../common/CountrySelect/CountrySelect.tsx | 2 +- .../src/components/common/Layout/Layout.tsx | 2 +- .../LineItemOptions/LineItemOptions.tsx | 2 +- .../common/LineItemPrice/LineItemPrice.tsx | 4 +- .../common/NativeSelect/NativeSelect.tsx | 2 +- .../store/src/components/common/SEO/SEO.tsx | 2 +- .../common/SidebarLayout/SidebarLayout.tsx | 2 +- .../components/common/Thumbnail/Thumbnail.tsx | 2 +- .../src/components/common/UserNav/UserNav.tsx | 2 +- .../store/src/components/icons/ArrowRight.tsx | 2 +- examples/store/src/components/icons/Bag.tsx | 2 +- examples/store/src/components/icons/Check.tsx | 2 +- .../src/components/icons/ChevronDown.tsx | 2 +- examples/store/src/components/icons/Edit.tsx | 2 +- examples/store/src/components/icons/Info.tsx | 2 +- .../store/src/components/icons/MapPin.tsx | 2 +- examples/store/src/components/icons/Menu.tsx | 2 +- examples/store/src/components/icons/Minus.tsx | 2 +- examples/store/src/components/icons/Moon.tsx | 2 +- .../store/src/components/icons/Package.tsx | 2 +- .../src/components/icons/PlaceholderImage.tsx | 2 +- examples/store/src/components/icons/Plus.tsx | 2 +- .../store/src/components/icons/Spinner.tsx | 2 +- examples/store/src/components/icons/Trash.tsx | 2 +- examples/store/src/components/icons/User.tsx | 2 +- .../src/components/orders/Items/Items.tsx | 2 +- .../components/orders/OrderCard/OrderCard.tsx | 2 +- .../OrderCompletedTemplate.tsx | 2 +- .../orders/OrderDetails/OrderDetails.tsx | 2 +- .../OrderDetailsTemplate.tsx | 2 +- .../orders/OrderOverview/OrderOverview.tsx | 2 +- .../orders/OrderSummary/OrderSummary.tsx | 2 +- .../orders/PaymentDetails/PaymentDetails.tsx | 2 +- .../ShippingDetails/ShippingDetails.tsx | 2 +- .../store/src/components/product/helpers.ts | 8 +++- .../components/product/product-grid-item.tsx | 2 +- .../product/product-option-picker.tsx | 2 +- .../src/components/product/product-slider.tsx | 2 +- .../ProfileBillingAddress.tsx | 2 +- .../profile/ProfileEmail/ProfileEmail.tsx | 2 +- .../profile/ProfileName/ProfileName.tsx | 2 +- .../ProfilePassword/ProfilePassword.tsx | 2 +- .../profile/ProfilePhone/ProfilePhone.tsx | 2 +- .../store/src/components/ui/Button/Button.tsx | 4 +- .../store/src/components/ui/Link/Link.tsx | 4 +- .../store/src/components/ui/Logo/Logo.tsx | 2 +- .../store/src/components/ui/Modal/Modal.tsx | 2 +- .../src/components/ui/Sidebar/Sidebar.tsx | 2 +- examples/store/src/lib/context/cart.tsx | 4 +- examples/store/src/lib/context/checkout.tsx | 4 +- examples/store/src/lib/context/ui.tsx | 7 +++- .../src/lib/hooks/useEnrichedLineItems.ts | 4 +- .../store/src/lib/hooks/useProductPrice.ts | 4 +- examples/store/src/types/medusa.ts | 2 +- .../src/pages/categories/create.tsx | 2 +- .../src/pages/categories/edit.tsx | 2 +- .../src/pages/categories/list.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/list.tsx | 4 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../table-handson/src/pages/posts/list.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/dataGrid/index.tsx | 8 ++-- .../src/pages/table/index.tsx | 6 +-- .../src/pages/posts/list.tsx | 4 +- .../src/rest-data-provider/index.ts | 4 +- .../src/pages/posts/list.tsx | 8 ++-- .../src/pages/posts/list.tsx | 10 ++--- .../src/pages/posts/list.tsx | 8 ++-- .../src/pages/posts/list.tsx | 10 ++--- .../src/pages/posts/list.tsx | 10 ++--- .../src/pages/posts/list.tsx | 6 +-- .../src/react-table-config.d.ts | 2 +- .../src/pages/posts/list.tsx | 4 +- .../template-chakra-ui/src/reportWebVitals.ts | 2 +- .../src/components/layout/index.tsx | 2 +- .../template-headless/src/reportWebVitals.ts | 2 +- .../template-mantine/src/reportWebVitals.ts | 2 +- .../src/reportWebVitals.ts | 2 +- examples/theme-antd-demo/src/App.tsx | 2 +- .../src/components/theme-settings/index.tsx | 4 +- .../src/pages/posts/create.tsx | 2 +- .../theme-antd-demo/src/pages/posts/edit.tsx | 2 +- .../theme-antd-demo/src/pages/posts/list.tsx | 2 +- .../theme-antd-demo/src/pages/posts/show.tsx | 2 +- .../theme-antd-demo/src/utils/authProvider.ts | 2 +- .../theme-chakra-ui-demo/src/authProvider.ts | 2 +- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/components/theme-settings/index.tsx | 4 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- examples/theme-mantine-demo/src/App.tsx | 2 +- .../theme-mantine-demo/src/authProvider.ts | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/components/theme-settings/index.tsx | 4 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/authProvider.ts | 2 +- .../src/components/theme-settings/index.tsx | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 4 +- .../src/pages/blog-posts/list.tsx | 2 +- examples/tutorial-antd/src/reportWebVitals.ts | 2 +- .../src/components/table/ColumnFilter.tsx | 2 +- .../src/components/table/ColumnSorter.tsx | 2 +- .../src/pages/blog-posts/list.tsx | 4 +- .../tutorial-chakra-ui/src/reportWebVitals.ts | 2 +- .../src/components/layout/index.tsx | 2 +- .../src/pages/blog-posts/list.tsx | 4 +- .../tutorial-headless/src/reportWebVitals.ts | 2 +- .../src/components/table/ColumnFilter.tsx | 2 +- .../src/components/table/ColumnSorter.tsx | 2 +- .../src/pages/blog-posts/list.tsx | 4 +- .../tutorial-mantine/src/reportWebVitals.ts | 2 +- .../src/pages/blog-posts/list.tsx | 2 +- .../src/reportWebVitals.ts | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/users/create.tsx | 4 +- .../src/pages/users/edit.tsx | 4 +- .../src/pages/users/list.tsx | 2 +- .../src/pages/users/show.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/components/pagination/index.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 10 +++-- .../src/pages/posts/edit.tsx | 10 +++-- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/components/table/columnFilter.tsx | 2 +- .../src/components/table/columnSorter.tsx | 2 +- .../src/interfaces/index.d.ts | 2 +- .../src/pages/posts/create.tsx | 10 +++-- .../src/pages/posts/edit.tsx | 10 +++-- .../src/pages/posts/list.tsx | 6 +-- .../src/pages/posts/show.tsx | 2 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 4 +- .../src/pages/posts/create.tsx | 4 +- .../src/pages/posts/edit.tsx | 4 +- .../src/pages/posts/list.tsx | 4 +- examples/use-infinite-list/src/App.tsx | 2 +- .../src/github-data-provider/index.ts | 4 +- .../src/github-data-provider/utils/axios.ts | 2 +- .../src/pages/posts/list.tsx | 2 +- .../use-modal-antd/src/pages/posts/list.tsx | 2 +- .../src/pages/posts/list.tsx | 6 +-- .../win95/src/components/browser/index.tsx | 2 +- .../src/components/icons/chevron-left.tsx | 2 +- .../src/components/icons/chevron-right.tsx | 2 +- examples/win95/src/components/icons/close.tsx | 2 +- .../win95/src/components/icons/minimize.tsx | 2 +- .../icons/pagination-go-to-first.tsx | 2 +- .../icons/pagination-go-to-last.tsx | 2 +- .../src/components/icons/pagination-next.tsx | 2 +- .../src/components/icons/pagination-prev.tsx | 2 +- .../win95/src/components/icons/question.tsx | 2 +- .../src/components/image-pixelated/index.tsx | 4 +- .../win95/src/components/layout/app/index.tsx | 7 +++- .../src/components/layout/common/index.tsx | 2 +- .../components/layout/video-club/layout.tsx | 2 +- .../layout/video-club/subpage-layout.tsx | 2 +- .../components/link-double-click/index.tsx | 2 +- .../src/components/media-player/player.tsx | 2 +- .../src/components/notification/index.tsx | 4 +- .../win95/src/components/pagination/index.tsx | 2 +- .../src/components/rvc-website/catalog.tsx | 2 +- .../src/components/rvc-website/layout.tsx | 2 +- .../src/components/table-members/index.tsx | 2 +- .../win95/src/components/tooltip/index.tsx | 4 +- .../unsupported-resolution-handler/index.tsx | 2 +- .../src/providers/auth-provider/index.ts | 2 +- .../providers/notification-provider/index.tsx | 2 +- .../src/providers/theme-provider/index.tsx | 2 +- .../win95/src/routes/login-page/index.tsx | 2 +- .../win95/src/routes/rvc-website/home.tsx | 4 +- .../src/routes/rvc-website/title-detail.tsx | 2 +- .../src/routes/video-club/members/create.tsx | 6 +-- .../src/routes/video-club/members/edit.tsx | 6 +-- .../src/routes/video-club/members/list.tsx | 2 +- .../src/routes/video-club/members/show.tsx | 2 +- .../src/routes/video-club/report/index.tsx | 2 +- .../src/routes/video-club/tapes/rent.tsx | 4 +- .../src/routes/video-club/tapes/return.tsx | 2 +- .../routes/video-club/tapes/select-member.tsx | 2 +- .../routes/video-club/tapes/select-title.tsx | 2 +- .../src/routes/video-club/titles/create.tsx | 6 +-- .../src/routes/video-club/titles/list.tsx | 2 +- .../src/routes/video-club/titles/show.tsx | 2 +- .../win95/src/utils/get-title-by-tmdb-id.ts | 2 +- examples/win95/src/utils/has-active-rental.ts | 2 +- examples/win95/src/utils/tmdb-to-title.ts | 2 +- examples/with-custom-pages/src/App.tsx | 2 +- .../src/pages/post-review/post-review.tsx | 2 +- .../src/pages/posts/create.tsx | 2 +- .../src/pages/posts/edit.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/posts/show.tsx | 2 +- .../src/pages/posts/list.tsx | 2 +- .../src/pages/users/list.tsx | 2 +- .../src/rest-data-provider/index.ts | 2 +- .../src/rest-data-provider/utils/axios.ts | 2 +- .../utils/generateFilter.ts | 2 +- .../rest-data-provider/utils/generateSort.ts | 2 +- .../rest-data-provider/utils/mapOperator.ts | 2 +- .../src/app/_refine_context.tsx | 2 +- .../src/app/api/auth/[...nextauth]/options.ts | 2 +- .../src/app/blog-posts/page.tsx | 2 +- .../src/app/categories/page.tsx | 2 +- .../with-nextjs-next-auth/src/app/layout.tsx | 2 +- .../src/contexts/color-mode/index.tsx | 2 +- .../types/next-auth.d.ts | 2 +- .../with-nextjs/src/app/blog-posts/page.tsx | 2 +- .../with-nextjs/src/app/categories/page.tsx | 2 +- examples/with-nextjs/src/app/layout.tsx | 2 +- .../src/contexts/color-mode/index.tsx | 2 +- .../auth-provider/auth-provider.server.ts | 2 +- .../providers/auth-provider/auth-provider.ts | 2 +- examples/with-nx/src/authProvider.ts | 2 +- .../with-nx/src/contexts/color-mode/index.tsx | 7 +++- .../src/pages/posts/list.tsx | 4 +- .../src/pages/posts/list.tsx | 4 +- .../src/providers/notificationProvider.tsx | 2 +- examples/with-remix-antd/app/authProvider.ts | 2 +- examples/with-remix-antd/app/routes/_auth.tsx | 2 +- .../app/routes/_protected.posts._index.tsx | 4 +- .../app/routes/_protected.posts.create.tsx | 2 +- .../app/routes/_protected.posts.edit.$id.tsx | 4 +- .../app/routes/_protected.posts.show.$id.tsx | 4 +- .../with-remix-antd/app/routes/_protected.tsx | 2 +- examples/with-remix-auth/app/root.tsx | 8 +++- examples/with-remix-auth/app/routes/_auth.tsx | 2 +- .../app/routes/auth.$provider._index.tsx | 2 +- .../with-remix-headless/app/authProvider.ts | 2 +- .../app/components/layout/index.tsx | 2 +- .../app/pages/posts/list.tsx | 2 +- .../with-remix-headless/app/routes/_auth.tsx | 2 +- .../app/routes/_protected.posts._index.tsx | 6 +-- .../app/routes/_protected.posts.create.tsx | 2 +- .../app/routes/_protected.posts.edit.$id.tsx | 4 +- .../app/routes/_protected.tsx | 2 +- .../app/authProvider.ts | 2 +- .../app/components/header/index.tsx | 5 ++- .../app/contexts/ColorModeContext.tsx | 2 +- .../app/authProvider.ts | 2 +- .../app/components/layout/index.tsx | 2 +- .../app/pages/posts/list.tsx | 2 +- .../app/routes/_auth.tsx | 2 +- .../app/routes/_protected.posts._index.tsx | 6 +-- .../app/routes/_protected.posts.create.tsx | 2 +- .../app/routes/_protected.posts.edit.$id.tsx | 4 +- .../app/routes/_protected.tsx | 2 +- .../src/stories/crud/List.stories.tsx | 2 +- .../src/stories/table/editable.stories.tsx | 4 +- .../src/stories/table/search.stories.tsx | 8 ++-- .../src/stories/table/table.stories.tsx | 2 +- .../src/authProvider.ts | 2 +- .../stories/autocomplete/basic.stories.tsx | 4 +- .../src/stories/buttons/Buttons.stories.tsx | 2 +- .../src/stories/crud/Create.stories.tsx | 2 +- .../src/stories/crud/Edit.stories.tsx | 2 +- .../src/stories/crud/List.stories.tsx | 2 +- .../src/stories/crud/Show.stories.tsx | 2 +- .../src/stories/dataGrid/basic.stories.tsx | 6 +-- .../src/stories/dataGrid/editable.stories.tsx | 4 +- .../dataGrid/selection/deleteMany.stories.tsx | 8 +++- .../dataGrid/selection/updateMany.stories.tsx | 8 +++- .../stories/fields/BooleanField.stories.tsx | 2 +- .../src/stories/fields/DateField.stories.tsx | 2 +- .../src/stories/fields/EmailField.stories.tsx | 2 +- .../src/stories/fields/FileField.stories.tsx | 2 +- .../src/stories/fields/TagField.stories.tsx | 2 +- .../src/stories/fields/UrlField.stories.tsx | 4 +- .../src/stories/layout/Layout.stories.tsx | 2 +- .../stories/modalForm/createForm.stories.tsx | 4 +- .../stories/modalForm/editForm.stories.tsx | 4 +- .../src/stories/pages/Error.stories.tsx | 2 +- .../src/stories/pages/Login.stories.tsx | 2 +- .../src/stories/pages/Ready.stories.tsx | 2 +- .../stories/stepsForm/createForm.stories.tsx | 4 +- .../stories/stepsForm/editForm.stories.tsx | 4 +- examples/with-web3/src/authProvider.ts | 2 +- examples/with-web3/src/pages/posts/create.tsx | 2 +- examples/with-web3/src/pages/posts/edit.tsx | 2 +- examples/with-web3/src/pages/posts/list.tsx | 2 +- examples/with-web3/src/pages/posts/show.tsx | 2 +- packages/ably/src/index.ts | 2 +- packages/airtable/src/utils/generateFilter.ts | 2 +- .../src/utils/generateFilterFormula.ts | 4 +- .../src/utils/generateLogicalFilterFormula.ts | 4 +- packages/airtable/src/utils/generateSort.ts | 2 +- .../airtable/src/utils/isSimpleOperator.ts | 2 +- packages/airtable/test/getList/index.spec.ts | 2 +- .../test/utils/generateFilter.spec.ts | 2 +- .../test/utils/generateFilterFormula.spec.ts | 2 +- .../generateLogicalFilterFormula.spec.ts | 4 +- .../airtable/test/utils/generateSort.spec.ts | 2 +- .../components/autoSaveIndicator/index.tsx | 2 +- .../src/components/breadcrumb/index.spec.tsx | 4 +- .../antd/src/components/breadcrumb/index.tsx | 4 +- .../src/components/buttons/edit/index.tsx | 2 +- .../src/components/buttons/export/index.tsx | 2 +- .../src/components/buttons/import/index.tsx | 2 +- .../src/components/buttons/list/index.tsx | 2 +- .../src/components/buttons/refresh/index.tsx | 2 +- .../src/components/buttons/save/index.tsx | 2 +- .../src/components/buttons/show/index.tsx | 2 +- packages/antd/src/components/buttons/types.ts | 4 +- .../src/components/crud/create/index.spec.tsx | 2 +- .../antd/src/components/crud/create/index.tsx | 4 +- .../src/components/crud/edit/index.spec.tsx | 6 +-- .../antd/src/components/crud/edit/index.tsx | 10 ++--- .../src/components/crud/list/index.spec.tsx | 2 +- .../antd/src/components/crud/list/index.tsx | 4 +- .../src/components/crud/show/index.spec.tsx | 4 +- .../antd/src/components/crud/show/index.tsx | 10 ++--- packages/antd/src/components/crud/types.ts | 8 ++-- .../src/components/fields/boolean/index.tsx | 2 +- .../antd/src/components/fields/date/index.tsx | 2 +- .../src/components/fields/email/index.tsx | 2 +- .../antd/src/components/fields/file/index.tsx | 2 +- .../src/components/fields/image/index.tsx | 2 +- .../src/components/fields/markdown/index.tsx | 2 +- .../src/components/fields/number/index.tsx | 2 +- .../antd/src/components/fields/tag/index.tsx | 2 +- .../antd/src/components/fields/text/index.tsx | 2 +- packages/antd/src/components/fields/types.ts | 14 +++---- .../antd/src/components/fields/url/index.tsx | 2 +- .../src/components/layout/header/index.tsx | 2 +- packages/antd/src/components/layout/index.tsx | 2 +- .../src/components/layout/sider/index.tsx | 4 +- .../src/components/layout/sider/styles.ts | 2 +- .../src/components/layout/title/index.tsx | 2 +- .../antd/src/components/pageHeader/index.tsx | 4 +- .../auth/components/forgotPassword/index.tsx | 10 ++--- .../pages/auth/components/login/index.tsx | 10 ++--- .../pages/auth/components/register/index.tsx | 10 ++--- .../pages/auth/components/styles.ts | 2 +- .../auth/components/updatePassword/index.tsx | 10 ++--- .../antd/src/components/pages/auth/index.tsx | 4 +- .../antd/src/components/pages/error/index.tsx | 2 +- .../antd/src/components/pages/login/index.tsx | 2 +- .../antd/src/components/pages/login/styles.ts | 2 +- .../antd/src/components/pages/ready/index.tsx | 2 +- .../components/filterDropdown/index.spec.tsx | 2 +- .../table/components/filterDropdown/index.tsx | 2 +- .../components/themedLayout/header/index.tsx | 2 +- .../src/components/themedLayout/index.tsx | 2 +- .../components/themedLayout/sider/index.tsx | 4 +- .../components/themedLayout/sider/styles.ts | 2 +- .../components/themedLayout/title/index.tsx | 2 +- .../themedLayoutV2/header/index.tsx | 2 +- .../src/components/themedLayoutV2/index.tsx | 2 +- .../themedLayoutV2/sider/index.spec.tsx | 2 +- .../components/themedLayoutV2/sider/index.tsx | 4 +- .../components/themedLayoutV2/sider/styles.ts | 2 +- .../components/themedLayoutV2/title/index.tsx | 2 +- .../undoableNotification/index.spec.tsx | 2 +- .../components/undoableNotification/index.tsx | 2 +- .../contexts/themedLayoutContext/index.tsx | 4 +- .../antd/src/definitions/table/index.spec.ts | 2 +- packages/antd/src/definitions/table/index.ts | 14 +++---- packages/antd/src/definitions/themes/index.ts | 2 +- .../hooks/fields/useCheckboxGroup/index.ts | 14 +++---- .../src/hooks/fields/useRadioGroup/index.ts | 14 +++---- .../antd/src/hooks/fields/useSelect/index.ts | 16 +++---- .../hooks/form/useDrawerForm/useDrawerForm.ts | 20 ++++----- packages/antd/src/hooks/form/useForm.spec.tsx | 2 +- packages/antd/src/hooks/form/useForm.ts | 21 ++++++---- .../hooks/form/useModalForm/useModalForm.ts | 16 +++---- .../form/useStepsForm/useStepsForm.spec.tsx | 2 +- .../hooks/form/useStepsForm/useStepsForm.ts | 8 ++-- packages/antd/src/hooks/import/index.spec.ts | 2 +- packages/antd/src/hooks/import/index.tsx | 15 ++++--- .../hooks/list/useSimpleList/useSimpleList.ts | 14 +++---- .../antd/src/hooks/modal/useModal/index.tsx | 4 +- .../useEditableTable/useEditableTable.ts | 13 ++++-- .../hooks/table/useTable/paginationLink.tsx | 2 +- .../hooks/table/useTable/useTable.spec.tsx | 2 +- .../antd/src/hooks/table/useTable/useTable.ts | 20 +++++---- .../src/hooks/useFileUploadState/index.ts | 2 +- .../src/hooks/useThemedLayoutContext/index.ts | 2 +- packages/antd/src/interfaces/index.ts | 2 +- .../notificationProvider/index.spec.tsx | 2 +- .../providers/notificationProvider/index.tsx | 2 +- packages/antd/src/types/sunflower.d.ts | 4 +- packages/antd/test/dataMocks.ts | 2 +- packages/antd/test/index.tsx | 20 ++++----- packages/appwrite/src/dataProvider.ts | 10 ++++- packages/appwrite/src/liveProvider.ts | 4 +- packages/appwrite/src/utils/generateFilter.ts | 2 +- .../appwrite/src/utils/getAppwriteFilters.ts | 2 +- .../appwrite/src/utils/getAppwriteSorting.ts | 2 +- packages/appwrite/src/utils/getRefineEvent.ts | 2 +- .../appwrite/test/liveProvider/index.spec.ts | 2 +- .../test/utils/generateFilter.spec.ts | 2 +- .../test/utils/getAppwriteFilters.spec.ts | 2 +- .../appwrite/test/utils/getAppwriteSorting.ts | 2 +- .../components/autoSaveIndicator/index.tsx | 2 +- .../src/components/breadcrumb/index.spec.tsx | 4 +- .../src/components/breadcrumb/index.tsx | 4 +- .../src/components/buttons/clone/index.tsx | 2 +- .../src/components/buttons/create/index.tsx | 2 +- .../src/components/buttons/delete/index.tsx | 2 +- .../src/components/buttons/edit/index.tsx | 2 +- .../src/components/buttons/export/index.tsx | 2 +- .../src/components/buttons/import/index.tsx | 2 +- .../src/components/buttons/list/index.tsx | 2 +- .../src/components/buttons/refresh/index.tsx | 2 +- .../src/components/buttons/save/index.tsx | 2 +- .../src/components/buttons/show/index.tsx | 2 +- .../chakra-ui/src/components/buttons/types.ts | 8 ++-- .../src/components/crud/create/index.tsx | 4 +- .../src/components/crud/edit/index.spec.tsx | 6 +-- .../src/components/crud/edit/index.tsx | 10 ++--- .../src/components/crud/list/index.spec.tsx | 2 +- .../src/components/crud/list/index.tsx | 4 +- .../src/components/crud/show/index.spec.tsx | 4 +- .../src/components/crud/show/index.tsx | 10 ++--- .../chakra-ui/src/components/crud/types.ts | 6 +-- .../src/components/fields/boolean/index.tsx | 2 +- .../src/components/fields/date/index.tsx | 2 +- .../src/components/fields/email/index.tsx | 2 +- .../src/components/fields/file/index.tsx | 2 +- .../src/components/fields/markdown/index.tsx | 2 +- .../src/components/fields/number/index.tsx | 2 +- .../src/components/fields/tag/index.tsx | 2 +- .../src/components/fields/text/index.tsx | 2 +- .../chakra-ui/src/components/fields/types.ts | 13 ++++-- .../src/components/fields/url/index.tsx | 2 +- .../components/layout/header/index.spec.tsx | 2 +- .../src/components/layout/header/index.tsx | 2 +- .../chakra-ui/src/components/layout/index.tsx | 2 +- .../src/components/layout/sider/index.tsx | 6 +-- .../src/components/layout/title/index.tsx | 2 +- .../auth/components/forgotPassword/index.tsx | 12 +++--- .../pages/auth/components/login/index.tsx | 12 +++--- .../pages/auth/components/register/index.tsx | 12 +++--- .../pages/auth/components/styles.ts | 2 +- .../auth/components/updatePassword/index.tsx | 12 +++--- .../src/components/pages/auth/index.tsx | 6 +-- .../src/components/pages/error/index.spec.tsx | 3 +- .../src/components/pages/error/index.tsx | 2 +- .../src/components/pages/ready/index.tsx | 2 +- .../themedLayout/header/index.spec.tsx | 2 +- .../components/themedLayout/header/index.tsx | 2 +- .../src/components/themedLayout/index.tsx | 2 +- .../components/themedLayout/sider/index.tsx | 6 +-- .../components/themedLayout/title/index.tsx | 2 +- .../themedLayoutV2/hamburgerMenu/index.tsx | 2 +- .../themedLayoutV2/header/index.spec.tsx | 2 +- .../themedLayoutV2/header/index.tsx | 4 +- .../src/components/themedLayoutV2/index.tsx | 2 +- .../components/themedLayoutV2/sider/index.tsx | 8 ++-- .../components/themedLayoutV2/title/index.tsx | 2 +- .../components/undoableNotification/index.tsx | 2 +- .../contexts/themedLayoutContext/index.tsx | 4 +- .../src/hooks/useThemedLayoutContext/index.ts | 2 +- .../src/providers/notificationProvider.tsx | 2 +- packages/chakra-ui/src/theme/index.ts | 4 +- packages/chakra-ui/test/dataMocks.ts | 2 +- packages/chakra-ui/test/index.tsx | 14 +++---- packages/cli/src/commands/add/index.ts | 2 +- packages/cli/src/commands/add/prompt.ts | 6 +-- .../integration/packages/ant-design.ts | 2 +- .../integration/packages/index.ts | 2 +- .../integration/packages/react-router.ts | 2 +- .../add/sub-commands/integration/prompt.ts | 2 +- .../integration/utils/prettify-choice.ts | 2 +- .../add/sub-commands/provider/command.ts | 2 +- .../sub-commands/provider/create-providers.ts | 6 ++- .../add/sub-commands/provider/prompt.ts | 2 +- .../src/commands/check-updates/index.test.tsx | 2 +- .../cli/src/commands/check-updates/index.tsx | 4 +- .../cli/src/commands/create-resource/index.ts | 2 +- packages/cli/src/commands/devtools/index.ts | 2 +- packages/cli/src/commands/proxy/index.ts | 4 +- packages/cli/src/commands/runner/dev/index.ts | 2 +- packages/cli/src/commands/runner/run/index.ts | 2 +- .../cli/src/commands/runner/start/index.ts | 2 +- packages/cli/src/commands/swizzle/index.tsx | 4 +- packages/cli/src/commands/update/index.ts | 4 +- .../src/commands/update/interactive/index.ts | 2 +- packages/cli/src/commands/whoami/index.ts | 2 +- .../components/update-warning-table/table.ts | 2 +- .../cli/src/components/version-table/index.ts | 2 +- packages/cli/src/telemetry/index.ts | 4 +- .../transformers/add-devtools-component.ts | 2 +- .../integrations/ant-design.spec.tsx | 2 +- .../transformers/integrations/ant-design.ts | 2 +- .../integrations/react-router.spec.tsx | 2 +- .../transformers/integrations/react-router.ts | 2 +- packages/cli/src/transformers/resource.ts | 2 +- packages/cli/src/update-notifier/index.tsx | 2 +- packages/cli/src/utils/announcement/index.tsx | 2 +- packages/cli/src/utils/codeshift/index.ts | 2 +- packages/cli/src/utils/env/index.ts | 2 +- .../cli/src/utils/swizzle/getPathPrefix.ts | 2 +- packages/cli/src/utils/swizzle/index.ts | 2 +- .../codemod/src/helpers/separate-imports.ts | 2 +- .../src/transformations/antd4-to-antd5.ts | 2 +- .../src/transformations/refine1-to-refine2.ts | 2 +- .../src/transformations/refine2-to-refine3.ts | 2 +- .../src/transformations/refine3-to-refine4.ts | 2 +- .../transformations/use-data-grid-columns.ts | 2 +- ...thProviderCompatible-true-to-auth-hooks.ts | 2 +- .../v4/authProvider-to-legacyAuthProvider.ts | 2 +- .../transformations/v4/fix-v4-deprecations.ts | 2 +- .../transformations/v4/metadata-to-meta.ts | 2 +- .../v4/move-deprecated-access-control.ts | 2 +- .../replace-pankod-imports-with-refinedev.ts | 2 +- .../v4/resourceName-to-resource.ts | 2 +- .../v4/router-to-legacy-router.ts | 2 +- .../v4/separate-imports-antd.ts | 2 +- .../v4/separate-imports-chakra.ts | 2 +- .../v4/separate-imports-mantine.ts | 2 +- .../v4/separate-imports-mui.ts | 2 +- .../v4/separate-imports-react-hook-form.ts | 2 +- .../v4/separate-imports-react-query.ts | 2 +- .../v4/separate-imports-react-router-v6.ts | 2 +- .../v4/separate-imports-react-table.ts | 2 +- .../transformations/v4/use-menu-to-core.ts | 2 +- packages/codemod/test/list.tsx | 4 +- .../components/authenticated/index.spec.tsx | 4 +- .../src/components/authenticated/index.tsx | 2 +- .../components/autoSaveIndicator/index.tsx | 6 +-- .../core/src/components/canAccess/index.tsx | 8 ++-- .../components/containers/refine/index.tsx | 2 +- .../core/src/components/gh-banner/index.tsx | 2 +- .../layoutWrapper/defaultLayout/index.tsx | 2 +- .../components/layoutWrapper/index.spec.tsx | 2 +- .../src/components/layoutWrapper/index.tsx | 2 +- .../components/forgotPassword/index.spec.tsx | 2 +- .../auth/components/forgotPassword/index.tsx | 7 +++- .../auth/components/login/index.spec.tsx | 2 +- .../pages/auth/components/login/index.tsx | 4 +- .../auth/components/register/index.spec.tsx | 2 +- .../pages/auth/components/register/index.tsx | 4 +- .../components/updatePassword/index.spec.tsx | 2 +- .../auth/components/updatePassword/index.tsx | 7 +++- .../core/src/components/pages/auth/index.tsx | 8 ++-- .../core/src/components/pages/auth/types.tsx | 2 +- .../core/src/components/telemetry/index.tsx | 2 +- .../src/components/undoableQueue/index.tsx | 2 +- .../core/src/contexts/accessControl/index.tsx | 4 +- .../core/src/contexts/accessControl/types.ts | 6 +-- packages/core/src/contexts/auditLog/index.tsx | 4 +- packages/core/src/contexts/auditLog/types.ts | 2 +- packages/core/src/contexts/auth/index.tsx | 4 +- packages/core/src/contexts/auth/types.ts | 2 +- packages/core/src/contexts/data/index.tsx | 4 +- packages/core/src/contexts/data/types.ts | 6 +-- packages/core/src/contexts/i18n/index.tsx | 4 +- packages/core/src/contexts/live/index.tsx | 4 +- packages/core/src/contexts/live/types.ts | 2 +- .../core/src/contexts/notification/index.tsx | 4 +- packages/core/src/contexts/refine/index.tsx | 2 +- packages/core/src/contexts/refine/types.ts | 28 ++++++------- packages/core/src/contexts/resource/index.tsx | 2 +- packages/core/src/contexts/resource/types.ts | 6 +-- packages/core/src/contexts/router/index.tsx | 4 +- .../core/src/contexts/router/legacy/index.tsx | 4 +- .../core/src/contexts/router/legacy/types.ts | 2 +- packages/core/src/contexts/router/types.ts | 4 +- .../core/src/contexts/undoableQueue/index.tsx | 12 +++++- .../core/src/contexts/undoableQueue/types.ts | 2 +- .../core/src/contexts/unsavedWarn/index.tsx | 4 +- .../helpers/check-router-prop-misuse/index.ts | 4 +- .../helpers/generateDocumentTitle/index.ts | 2 +- .../helpers/handlePaginationParams/index.ts | 2 +- .../helpers/handleRefineOptions/index.spec.ts | 2 +- .../helpers/handleRefineOptions/index.ts | 8 ++-- .../helpers/importCSVMapper/index.ts | 2 +- .../src/definitions/helpers/keys/index.ts | 2 +- .../legacy-resource-transform/index.ts | 5 ++- .../helpers/menu/create-resource-key.ts | 2 +- .../definitions/helpers/menu/create-tree.ts | 2 +- .../helpers/pick-resource/index.ts | 2 +- .../helpers/pickDataProvider/index.spec.ts | 2 +- .../helpers/pickDataProvider/index.ts | 2 +- .../definitions/helpers/queryKeys/index.ts | 4 +- .../helpers/redirectPage/index.spec.ts | 4 +- .../definitions/helpers/redirectPage/index.ts | 6 +-- .../helpers/routeGenerator/index.spec.ts | 2 +- .../helpers/routeGenerator/index.ts | 2 +- .../helpers/router/compose-route.ts | 4 +- .../router/get-action-routes-from-resource.ts | 4 +- .../helpers/router/get-default-action-path.ts | 2 +- .../router/get-parent-prefix-for-resource.ts | 2 +- .../helpers/router/get-parent-resource.ts | 2 +- .../router/match-resource-from-route.ts | 4 +- .../helpers/router/pick-matched-route.ts | 2 +- .../helpers/sanitize-resource/index.ts | 2 +- .../treeView/createTreeView/index.spec.ts | 5 ++- .../helpers/treeView/createTreeView/index.ts | 2 +- .../helpers/useInfinitePagination/index.ts | 2 +- .../core/src/definitions/table/index.spec.ts | 2 +- packages/core/src/definitions/table/index.ts | 4 +- .../src/hooks/accessControl/useCan/index.ts | 6 +-- .../hooks/accessControl/useCanWithoutCache.ts | 2 +- .../src/hooks/auditLog/useLog/index.spec.ts | 4 +- .../core/src/hooks/auditLog/useLog/index.ts | 8 ++-- .../src/hooks/auditLog/useLogList/index.ts | 6 +-- .../src/hooks/auth/useForgotPassword/index.ts | 10 ++--- .../src/hooks/auth/useGetIdentity/index.ts | 6 +-- .../hooks/auth/useIsAuthenticated/index.ts | 4 +- .../core/src/hooks/auth/useLogin/index.ts | 10 ++--- .../core/src/hooks/auth/useLogout/index.ts | 10 ++--- .../src/hooks/auth/useOnError/index.spec.ts | 2 +- .../core/src/hooks/auth/useOnError/index.ts | 4 +- .../src/hooks/auth/usePermissions/index.ts | 6 +-- .../core/src/hooks/auth/useRegister/index.ts | 10 ++--- .../auth/useUpdatePassword/index.spec.ts | 2 +- .../src/hooks/auth/useUpdatePassword/index.ts | 12 +++--- .../core/src/hooks/breadcrumb/index.spec.tsx | 2 +- packages/core/src/hooks/breadcrumb/index.ts | 2 +- packages/core/src/hooks/data/useCreate.ts | 12 +++--- packages/core/src/hooks/data/useCreateMany.ts | 12 +++--- packages/core/src/hooks/data/useCustom.ts | 12 +++--- .../core/src/hooks/data/useCustomMutation.ts | 12 +++--- .../core/src/hooks/data/useDataProvider.tsx | 2 +- packages/core/src/hooks/data/useDelete.ts | 12 +++--- packages/core/src/hooks/data/useDeleteMany.ts | 12 +++--- .../src/hooks/data/useInfiniteList.spec.tsx | 4 +- .../core/src/hooks/data/useInfiniteList.ts | 16 +++---- packages/core/src/hooks/data/useList.spec.tsx | 2 +- packages/core/src/hooks/data/useList.ts | 14 +++---- packages/core/src/hooks/data/useMany.spec.tsx | 2 +- packages/core/src/hooks/data/useMany.ts | 14 +++---- packages/core/src/hooks/data/useOne.spec.tsx | 2 +- packages/core/src/hooks/data/useOne.ts | 14 +++---- packages/core/src/hooks/data/useUpdate.ts | 12 +++--- packages/core/src/hooks/data/useUpdateMany.ts | 12 +++--- packages/core/src/hooks/export/index.spec.ts | 2 +- packages/core/src/hooks/export/index.ts | 4 +- packages/core/src/hooks/export/types.ts | 2 +- packages/core/src/hooks/form/index.ts | 2 +- packages/core/src/hooks/form/types.ts | 21 ++++++---- packages/core/src/hooks/import/index.spec.tsx | 2 +- packages/core/src/hooks/import/index.tsx | 12 ++++-- .../core/src/hooks/invalidate/index.spec.tsx | 2 +- packages/core/src/hooks/invalidate/index.tsx | 6 +-- .../src/hooks/live/useLiveMode/index.spec.ts | 2 +- .../core/src/hooks/live/useLiveMode/index.ts | 4 +- .../core/src/hooks/live/usePublish/index.ts | 2 +- .../useResourceSubscription/index.spec.ts | 2 +- .../live/useResourceSubscription/index.ts | 6 +-- .../src/hooks/live/useSubscription/index.ts | 4 +- packages/core/src/hooks/menu/useMenu.tsx | 2 +- .../core/src/hooks/navigation/index.spec.tsx | 2 +- packages/core/src/hooks/navigation/index.ts | 4 +- .../useCancelNotification/index.tsx | 2 +- .../useHandleNotification/index.spec.tsx | 2 +- .../useHandleNotification/index.ts | 2 +- .../notification/useNotification/index.ts | 2 +- .../core/src/hooks/redirection/index.spec.tsx | 2 +- packages/core/src/hooks/redirection/index.ts | 6 +-- .../core/src/hooks/refine/useMutationMode.ts | 2 +- .../src/hooks/refine/useSyncWithLocation.ts | 2 +- packages/core/src/hooks/refine/useTitle.tsx | 2 +- .../hooks/refine/useWarnAboutChange/index.ts | 4 +- .../src/hooks/resource/useResource/index.ts | 8 ++-- .../resource/useResourceWithRoute/index.ts | 2 +- .../src/hooks/router/use-get-to-path/index.ts | 4 +- .../src/hooks/router/use-go/index.spec.tsx | 2 +- .../core/src/hooks/router/use-go/index.tsx | 6 +-- .../core/src/hooks/router/use-parse/index.tsx | 5 ++- .../router/use-router-misuse-warning/index.ts | 2 +- .../src/hooks/router/use-to-path/index.ts | 4 +- packages/core/src/hooks/show/index.spec.tsx | 2 +- packages/core/src/hooks/show/index.ts | 2 +- packages/core/src/hooks/show/types.ts | 6 +-- packages/core/src/hooks/show/useShow.ts | 15 ++++--- .../src/hooks/use-resource-params/index.ts | 8 ++-- .../use-resource-params/use-action/index.tsx | 4 +- .../use-resource-params/use-id/index.tsx | 4 +- packages/core/src/hooks/useMeta/index.ts | 4 +- .../core/src/hooks/useSelect/index.spec.ts | 2 +- packages/core/src/hooks/useSelect/index.ts | 17 ++++---- .../core/src/hooks/useTable/index.spec.ts | 6 ++- packages/core/src/hooks/useTable/index.ts | 17 ++++---- .../src/hooks/useTelemetryData/index.spec.ts | 2 +- .../core/src/hooks/useTelemetryData/index.ts | 2 +- packages/core/test/dataMocks.ts | 17 ++++---- packages/core/test/index.tsx | 27 ++++++------ .../src/create-identifier.ts | 4 +- .../src/get-resource-path.ts | 6 +-- packages/devtools-internal/src/get-trace.ts | 2 +- packages/devtools-internal/src/get-xray.ts | 2 +- packages/devtools-internal/src/listeners.ts | 4 +- .../src/use-query-subscription.tsx | 2 +- packages/devtools-server/src/create-db.ts | 2 +- packages/devtools-server/src/feed/get-feed.ts | 2 +- packages/devtools-server/src/index.ts | 2 +- .../src/packages/get-all-packages.ts | 2 +- .../src/packages/get-available-packages.ts | 2 +- .../src/project-id/transform.ts | 4 +- packages/devtools-server/src/serve-api.ts | 4 +- .../src/serve-open-in-editor.ts | 2 +- packages/devtools-server/src/serve-proxy.ts | 2 +- packages/devtools-server/src/serve-ws.ts | 2 +- packages/devtools-shared/src/event-types.ts | 4 +- packages/devtools-shared/src/receive.ts | 2 +- packages/devtools-shared/src/send.ts | 2 +- .../src/components/add-package-drawer.tsx | 2 +- .../src/components/add-package.item.tsx | 2 +- .../devtools-ui/src/components/feed-item.tsx | 2 +- .../src/components/header-auth-status.tsx | 2 +- .../devtools-ui/src/components/highlight.tsx | 5 ++- .../monitor-applied-filter-group.tsx | 2 +- .../src/components/monitor-details.tsx | 4 +- .../src/components/monitor-filters.tsx | 2 +- .../src/components/monitor-table.tsx | 4 +- .../devtools-ui/src/components/owners.tsx | 2 +- .../src/components/package-item.tsx | 2 +- .../devtools-ui/src/components/packages.tsx | 2 +- .../src/components/resource-value.tsx | 2 +- .../devtools-ui/src/components/status.tsx | 2 +- .../devtools-ui/src/components/trace-list.tsx | 2 +- .../devtools-ui/src/interfaces/activity.ts | 2 +- packages/devtools-ui/src/pages/login.tsx | 2 +- packages/devtools-ui/src/pages/monitor.tsx | 12 +++--- packages/devtools-ui/src/pages/onboarding.tsx | 2 +- packages/devtools-ui/src/utils/get-owners.ts | 2 +- .../src/utils/get-resource-value.ts | 2 +- packages/devtools-ui/src/utils/me.ts | 2 +- packages/devtools-ui/src/utils/packages.ts | 2 +- packages/devtools-ui/src/utils/project-id.ts | 2 +- .../src/components/icons/arrow-union-icon.tsx | 2 +- .../src/components/icons/devtools-icon.tsx | 2 +- .../src/components/resizable-pane.tsx | 2 +- packages/devtools/src/panel.tsx | 2 +- packages/devtools/src/utilities/index.ts | 2 +- packages/graphql/src/dataProvider/index.ts | 2 +- packages/graphql/src/liveProvider/index.ts | 4 +- packages/graphql/src/utils/generateFilter.ts | 2 +- packages/graphql/src/utils/generateSort.ts | 2 +- .../src/utils/generateUseListSubscription.ts | 2 +- .../src/utils/generateUseManySubscription.ts | 2 +- .../src/utils/generateUseOneSubscription.ts | 2 +- packages/graphql/src/utils/graphql.ts | 4 +- .../graphql/test/utils/generateFilter.spec.ts | 2 +- .../graphql/test/utils/generateSort.spec.ts | 2 +- .../utils/generateUseListSubscription.spec.ts | 2 +- packages/hasura/src/dataProvider/index.ts | 2 +- packages/hasura/src/liveProvider/index.ts | 4 +- packages/hasura/src/utils/generateFilters.ts | 4 +- packages/hasura/src/utils/generateSorting.ts | 2 +- .../src/utils/generateUseListSubscription.ts | 4 +- .../src/utils/generateUseManySubscription.ts | 2 +- .../src/utils/generateUseOneSubscription.ts | 2 +- packages/hasura/src/utils/graphql.ts | 4 +- .../hasura/test/utils/generateFilters.spec.ts | 4 +- .../hasura/test/utils/generateSorting.spec.ts | 2 +- .../utils/generateUseListSubscription.spec.ts | 4 +- .../utils/generateUseManySubscription.spec.ts | 2 +- .../utils/generateUseOneSubscription.spec.ts | 2 +- .../inferencer/src/components/live/index.tsx | 8 +++- .../components/shared-code-viewer/index.tsx | 4 +- .../src/compose-inferencers/index.ts | 2 +- .../src/compose-transformers/index.ts | 2 +- .../src/create-inferencer/index.tsx | 2 +- .../inferencer/src/field-inferencers/array.ts | 2 +- .../src/field-inferencers/boolean.ts | 2 +- .../inferencer/src/field-inferencers/date.ts | 2 +- .../inferencer/src/field-inferencers/email.ts | 2 +- .../inferencer/src/field-inferencers/image.ts | 2 +- .../src/field-inferencers/nullish.ts | 2 +- .../src/field-inferencers/number.ts | 2 +- .../src/field-inferencers/object.ts | 2 +- .../src/field-inferencers/relation.ts | 2 +- .../src/field-inferencers/richtext.ts | 2 +- .../inferencer/src/field-inferencers/text.ts | 2 +- .../inferencer/src/field-inferencers/url.ts | 2 +- .../field-transformers/basic-to-relation.ts | 2 +- .../src/field-transformers/image-by-key.ts | 2 +- .../relation-by-resource.ts | 2 +- .../relation-to-fieldable.ts | 2 +- .../src/inferencers/antd/code-viewer.tsx | 2 +- .../src/inferencers/antd/create.tsx | 2 +- .../inferencer/src/inferencers/antd/edit.tsx | 2 +- .../inferencer/src/inferencers/antd/error.tsx | 2 +- .../inferencer/src/inferencers/antd/list.tsx | 2 +- .../src/inferencers/antd/loading.tsx | 2 +- .../inferencer/src/inferencers/antd/show.tsx | 2 +- .../src/inferencers/chakra-ui/code-viewer.tsx | 2 +- .../src/inferencers/chakra-ui/create.tsx | 2 +- .../src/inferencers/chakra-ui/edit.tsx | 2 +- .../src/inferencers/chakra-ui/error.tsx | 2 +- .../src/inferencers/chakra-ui/list.tsx | 2 +- .../src/inferencers/chakra-ui/loading.tsx | 2 +- .../src/inferencers/chakra-ui/show.tsx | 2 +- .../src/inferencers/headless/code-viewer.tsx | 2 +- .../src/inferencers/headless/create.tsx | 2 +- .../src/inferencers/headless/edit.tsx | 2 +- .../src/inferencers/headless/error.tsx | 2 +- .../src/inferencers/headless/list.tsx | 2 +- .../src/inferencers/headless/loading.tsx | 2 +- .../src/inferencers/headless/show.tsx | 2 +- .../src/inferencers/mantine/code-viewer.tsx | 2 +- .../src/inferencers/mantine/create.tsx | 2 +- .../src/inferencers/mantine/edit.tsx | 2 +- .../src/inferencers/mantine/error.tsx | 2 +- .../src/inferencers/mantine/list.tsx | 2 +- .../src/inferencers/mantine/loading.tsx | 2 +- .../src/inferencers/mantine/show.tsx | 2 +- .../src/inferencers/mui/code-viewer.tsx | 2 +- .../inferencer/src/inferencers/mui/create.tsx | 2 +- .../inferencer/src/inferencers/mui/edit.tsx | 2 +- .../inferencer/src/inferencers/mui/error.tsx | 2 +- .../inferencer/src/inferencers/mui/list.tsx | 2 +- .../src/inferencers/mui/loading.tsx | 2 +- .../inferencer/src/inferencers/mui/show.tsx | 2 +- packages/inferencer/src/types/index.ts | 2 +- .../inferencer/src/use-infer-fetch/index.tsx | 4 +- .../src/use-relation-fetch/index.ts | 2 +- .../src/utilities/accessor/index.ts | 2 +- .../utilities/get-meta-props/index.test.ts | 4 +- .../src/utilities/get-meta-props/index.ts | 2 +- .../src/utilities/get-option-label/index.ts | 2 +- .../utilities/pick-data-provider/index.tsx | 2 +- .../utilities/pick-inferred-field/index.ts | 2 +- .../src/utilities/print-imports/index.test.ts | 2 +- .../src/utilities/print-imports/index.ts | 2 +- .../utilities/resource-from-inferred/index.ts | 4 +- .../translate-action-title/index.test.ts | 2 +- .../utilities/translate-action-title/index.ts | 2 +- .../translate-pretty-string/index.test.ts | 4 +- .../translate-pretty-string/index.ts | 4 +- packages/inferencer/test/dataMocks.ts | 2 +- packages/inferencer/test/index.tsx | 14 +++---- .../src/components/renderResults/index.tsx | 2 +- .../kbar/src/components/resultItem/index.tsx | 2 +- .../src/hooks/useRefineKbar/index.spec.tsx | 2 +- .../kbar/src/hooks/useRefineKbar/index.tsx | 4 +- packages/kbar/src/index.tsx | 4 +- packages/kbar/test/index.tsx | 4 +- .../components/autoSaveIndicator/index.tsx | 2 +- .../src/components/breadcrumb/index.spec.tsx | 4 +- .../src/components/breadcrumb/index.tsx | 4 +- .../src/components/buttons/clone/index.tsx | 2 +- .../src/components/buttons/create/index.tsx | 2 +- .../src/components/buttons/delete/index.tsx | 2 +- .../src/components/buttons/edit/index.tsx | 2 +- .../src/components/buttons/export/index.tsx | 2 +- .../src/components/buttons/import/index.tsx | 2 +- .../src/components/buttons/list/index.tsx | 2 +- .../src/components/buttons/refresh/index.tsx | 2 +- .../src/components/buttons/save/index.tsx | 2 +- .../src/components/buttons/show/index.tsx | 2 +- .../mantine/src/components/buttons/types.ts | 8 ++-- .../src/components/crud/create/index.spec.tsx | 2 +- .../src/components/crud/create/index.tsx | 4 +- .../src/components/crud/edit/index.spec.tsx | 6 +-- .../src/components/crud/edit/index.tsx | 10 ++--- .../src/components/crud/list/index.spec.tsx | 2 +- .../src/components/crud/list/index.tsx | 4 +- .../src/components/crud/show/index.spec.tsx | 4 +- .../src/components/crud/show/index.tsx | 10 ++--- packages/mantine/src/components/crud/types.ts | 6 +-- .../src/components/fields/boolean/index.tsx | 2 +- .../src/components/fields/date/index.tsx | 2 +- .../src/components/fields/email/index.tsx | 2 +- .../src/components/fields/file/index.tsx | 2 +- .../src/components/fields/markdown/index.tsx | 2 +- .../src/components/fields/number/index.tsx | 2 +- .../src/components/fields/tag/index.tsx | 2 +- .../src/components/fields/text/index.tsx | 2 +- .../mantine/src/components/fields/types.ts | 17 +++++--- .../src/components/fields/url/index.tsx | 2 +- .../src/components/layout/header/index.tsx | 2 +- .../mantine/src/components/layout/index.tsx | 2 +- .../src/components/layout/sider/index.tsx | 12 +++--- .../src/components/layout/title/index.tsx | 2 +- .../auth/components/forgotPassword/index.tsx | 10 ++--- .../pages/auth/components/login/index.tsx | 10 ++--- .../pages/auth/components/register/index.tsx | 10 ++--- .../pages/auth/components/styles.ts | 2 +- .../auth/components/updatePassword/index.tsx | 10 ++--- .../src/components/pages/auth/index.tsx | 6 +-- .../src/components/pages/error/index.spec.tsx | 5 ++- .../src/components/pages/error/index.tsx | 2 +- .../src/components/pages/ready/index.tsx | 2 +- .../themedLayout/header/index.spec.tsx | 2 +- .../components/themedLayout/header/index.tsx | 2 +- .../src/components/themedLayout/index.tsx | 2 +- .../components/themedLayout/sider/index.tsx | 12 +++--- .../components/themedLayout/title/index.tsx | 2 +- .../themedLayoutV2/header/index.spec.tsx | 2 +- .../themedLayoutV2/header/index.tsx | 4 +- .../src/components/themedLayoutV2/index.tsx | 2 +- .../components/themedLayoutV2/sider/index.tsx | 14 +++---- .../components/themedLayoutV2/title/index.tsx | 2 +- .../contexts/themedLayoutContext/index.tsx | 4 +- .../mantine/src/definitions/button/index.ts | 2 +- .../src/hooks/form/useForm/index.spec.tsx | 2 +- .../mantine/src/hooks/form/useForm/index.ts | 12 +++--- .../src/hooks/form/useModalForm/index.ts | 12 +++--- .../src/hooks/form/useStepsForm/index.ts | 4 +- packages/mantine/src/hooks/useSelect/index.ts | 18 ++++---- .../src/hooks/useThemedLayoutContext/index.ts | 2 +- .../src/providers/notificationProvider.tsx | 2 +- packages/mantine/src/theme/index.ts | 2 +- packages/mantine/test/dataMocks.ts | 2 +- packages/mantine/test/index.tsx | 20 ++++----- packages/medusa/src/authProvider/index.ts | 2 +- packages/medusa/src/dataProvider/index.ts | 6 +-- packages/medusa/src/utils/axios.ts | 2 +- packages/medusa/src/utils/generateFilter.ts | 2 +- packages/medusa/src/utils/mapOperator.ts | 2 +- .../medusa/test/utils/generateFilter.spec.ts | 2 +- .../medusa/test/utils/mapOperator.spec.ts | 2 +- .../components/autoSaveIndicator/index.tsx | 2 +- .../src/components/breadcrumb/index.spec.tsx | 4 +- .../mui/src/components/breadcrumb/index.tsx | 2 +- .../src/components/buttons/clone/index.tsx | 2 +- .../src/components/buttons/create/index.tsx | 2 +- .../src/components/buttons/delete/index.tsx | 2 +- .../mui/src/components/buttons/edit/index.tsx | 2 +- .../src/components/buttons/export/index.tsx | 2 +- .../src/components/buttons/import/index.tsx | 2 +- .../mui/src/components/buttons/list/index.tsx | 2 +- .../src/components/buttons/refresh/index.tsx | 2 +- .../mui/src/components/buttons/save/index.tsx | 2 +- .../mui/src/components/buttons/show/index.tsx | 2 +- packages/mui/src/components/buttons/types.ts | 4 +- .../mui/src/components/crud/create/index.tsx | 4 +- .../src/components/crud/edit/index.spec.tsx | 6 +-- .../mui/src/components/crud/edit/index.tsx | 10 ++--- .../src/components/crud/list/index.spec.tsx | 2 +- .../mui/src/components/crud/list/index.tsx | 4 +- .../src/components/crud/show/index.spec.tsx | 4 +- .../mui/src/components/crud/show/index.tsx | 10 ++--- packages/mui/src/components/crud/types.ts | 4 +- .../src/components/fields/boolean/index.tsx | 2 +- .../mui/src/components/fields/date/index.tsx | 2 +- .../mui/src/components/fields/email/index.tsx | 2 +- .../mui/src/components/fields/file/index.tsx | 2 +- .../src/components/fields/markdown/index.tsx | 2 +- .../src/components/fields/number/index.tsx | 2 +- .../mui/src/components/fields/tag/index.tsx | 2 +- .../mui/src/components/fields/text/index.tsx | 2 +- packages/mui/src/components/fields/types.ts | 4 +- .../mui/src/components/fields/url/index.tsx | 2 +- .../src/components/layout/header/index.tsx | 2 +- packages/mui/src/components/layout/index.tsx | 2 +- .../mui/src/components/layout/sider/index.tsx | 4 +- .../mui/src/components/layout/title/index.tsx | 2 +- .../auth/components/forgotPassword/index.tsx | 8 ++-- .../pages/auth/components/login/index.tsx | 10 ++--- .../pages/auth/components/register/index.tsx | 10 ++--- .../pages/auth/components/styles.ts | 2 +- .../auth/components/updatePassword/index.tsx | 10 ++--- .../mui/src/components/pages/auth/index.tsx | 4 +- .../src/components/pages/error/index.spec.tsx | 3 +- .../mui/src/components/pages/error/index.tsx | 2 +- .../mui/src/components/pages/login/index.tsx | 9 +++- .../mui/src/components/pages/ready/index.tsx | 2 +- .../components/themedLayout/header/index.tsx | 2 +- .../mui/src/components/themedLayout/index.tsx | 2 +- .../components/themedLayout/sider/index.tsx | 4 +- .../components/themedLayout/title/index.tsx | 2 +- .../themedLayoutV2/header/index.spec.tsx | 2 +- .../themedLayoutV2/header/index.tsx | 2 +- .../src/components/themedLayoutV2/index.tsx | 2 +- .../components/themedLayoutV2/sider/index.tsx | 6 +-- .../components/themedLayoutV2/title/index.tsx | 2 +- .../contexts/themedLayoutContext/index.tsx | 4 +- .../src/definitions/dataGrid/index.spec.ts | 2 +- .../mui/src/definitions/dataGrid/index.ts | 2 +- .../mui/src/hooks/useAutocomplete/index.ts | 8 ++-- .../mui/src/hooks/useDataGrid/index.spec.ts | 2 +- packages/mui/src/hooks/useDataGrid/index.ts | 14 +++---- .../src/hooks/useThemedLayoutContext/index.ts | 2 +- .../notificationProvider/index.spec.tsx | 2 +- .../providers/notificationProvider/index.tsx | 2 +- packages/mui/test/dataMocks.ts | 2 +- packages/mui/test/index.tsx | 14 +++---- .../nestjs-query/src/dataProvider/index.ts | 6 +-- .../nestjs-query/src/liveProvider/index.ts | 4 +- packages/nestjs-query/src/utils/graphql.ts | 7 +++- packages/nestjs-query/src/utils/index.ts | 6 +-- .../nestjs-query/test/custom/index.spec.ts | 2 +- packages/nestjsx-crud/src/provider.ts | 4 +- packages/nestjsx-crud/src/utils/axios.ts | 2 +- .../nestjsx-crud/src/utils/handleFilter.ts | 4 +- packages/nestjsx-crud/src/utils/handleJoin.ts | 2 +- .../src/utils/handlePagination.ts | 4 +- packages/nestjsx-crud/src/utils/handleSort.ts | 4 +- .../nestjsx-crud/src/utils/mapOperator.ts | 4 +- .../src/utils/transformHttpError.ts | 2 +- .../test/utils/handleFilter.spec.ts | 4 +- .../test/utils/handleJoin.spec.ts | 6 +-- .../test/utils/handlePagination.spec.ts | 2 +- .../test/utils/handleSort.spec.ts | 4 +- .../test/utils/mapOperator.spec.ts | 4 +- packages/nextjs-router/src/app/bindings.tsx | 8 ++-- packages/nextjs-router/src/pages/bindings.tsx | 8 ++-- .../src/pages/document-title-handler.tsx | 4 +- packages/nextjs-router/tsup.config.ts | 2 +- .../src/useForm/index.spec.tsx | 2 +- packages/react-hook-form/src/useForm/index.ts | 18 ++++---- .../react-hook-form/src/useModalForm/index.ts | 12 +++--- .../react-hook-form/src/useStepsForm/index.ts | 6 +-- packages/react-hook-form/test/dataMocks.ts | 2 +- packages/react-hook-form/test/index.tsx | 10 ++--- packages/react-router-v6/src/bindings.tsx | 8 ++-- .../src/create-resource-routes.tsx | 2 +- .../src/document-title-handler.tsx | 4 +- packages/react-router-v6/src/legacy/index.ts | 6 +-- .../src/legacy/routeProvider.tsx | 4 +- .../src/legacy/routerComponent.tsx | 6 +-- .../src/navigate-to-resource.tsx | 2 +- .../react-table/src/useTable/index.spec.ts | 2 +- packages/react-table/src/useTable/index.ts | 14 +++---- .../index.spec.ts | 2 +- .../column-filters-to-crud-filters/index.ts | 4 +- .../index.spec.ts | 4 +- .../crud-filters-to-column-filters/index.ts | 4 +- .../utils/get-removed-filters/index.spec.ts | 2 +- .../src/utils/get-removed-filters/index.ts | 2 +- packages/react-table/test/dataMocks.ts | 2 +- packages/react-table/test/index.tsx | 4 +- packages/remix-router/src/bindings.tsx | 8 ++-- .../src/legacy/checkAuthentication.ts | 2 +- .../src/legacy/routeComponent.tsx | 2 +- .../remix-router/src/legacy/routerProvider.ts | 2 +- packages/remix-router/src/legacy/useParams.ts | 6 +-- .../remix-router/src/navigate-to-resource.ts | 2 +- packages/shared/dayjs-esm-replace-plugin.ts | 2 +- packages/shared/lodash-replace-plugin.ts | 2 +- .../mui-icons-material-esm-replace-plugin.ts | 2 +- packages/shared/next-js-esm-replace-plugin.ts | 2 +- ...ism-react-renderer-theme-replace-plugin.ts | 2 +- packages/shared/remove-test-ids-plugin.ts | 2 +- .../shared/replace-core-version-plugin.ts | 2 +- packages/shared/tabler-cjs-replace-plugin.ts | 2 +- packages/simple-rest/src/provider.ts | 4 +- packages/simple-rest/src/utils/axios.ts | 2 +- .../simple-rest/src/utils/generateFilter.ts | 2 +- .../simple-rest/src/utils/generateSort.ts | 2 +- packages/simple-rest/src/utils/mapOperator.ts | 2 +- .../test/utils/generateFilter.spec.ts | 2 +- .../test/utils/generateSort.spec.ts | 2 +- .../test/utils/mapOperator.spec.ts | 2 +- packages/strapi-v4/src/dataProvider.ts | 4 +- packages/strapi-v4/src/helpers/auth.ts | 2 +- packages/strapi-v4/src/utils/axios.ts | 2 +- .../strapi-v4/src/utils/generateFilter.ts | 6 ++- packages/strapi-v4/src/utils/generateSort.ts | 2 +- packages/strapi-v4/src/utils/mapOperator.ts | 2 +- .../strapi-v4/src/utils/transformHttpError.ts | 2 +- .../test/utils/generateFilter.spec.ts | 2 +- .../strapi-v4/test/utils/generateSort.spec.ts | 2 +- .../strapi-v4/test/utils/mapOperator.spec.ts | 2 +- .../test/utils/transformHttpError.spec.ts | 2 +- packages/strapi/src/dataProvider.ts | 4 +- packages/supabase/src/dataProvider/index.ts | 4 +- packages/supabase/src/liveProvider/index.ts | 4 +- packages/supabase/src/types/index.ts | 2 +- packages/supabase/src/utils/generateFilter.ts | 2 +- packages/supabase/src/utils/handleError.ts | 4 +- packages/supabase/src/utils/mapOperator.ts | 2 +- packages/supabase/test/getList/index.spec.ts | 2 +- .../test/utils/generateFilter.spec.ts | 2 +- .../supabase/test/utils/handleError.spec.ts | 4 +- .../supabase/test/utils/mapOperator.spec.ts | 2 +- packages/ui-tests/src/test/dataMocks.tsx | 2 +- packages/ui-tests/src/test/index.tsx | 4 +- .../ui-tests/src/tests/autoSaveIndicator.tsx | 2 +- packages/ui-tests/src/tests/breadcrumb.tsx | 4 +- packages/ui-tests/src/tests/buttons/clone.tsx | 2 +- .../ui-tests/src/tests/buttons/create.tsx | 2 +- .../ui-tests/src/tests/buttons/delete.tsx | 2 +- packages/ui-tests/src/tests/buttons/edit.tsx | 2 +- .../ui-tests/src/tests/buttons/export.tsx | 2 +- .../ui-tests/src/tests/buttons/import.tsx | 2 +- packages/ui-tests/src/tests/buttons/list.tsx | 2 +- .../ui-tests/src/tests/buttons/refresh.tsx | 2 +- packages/ui-tests/src/tests/buttons/save.tsx | 2 +- packages/ui-tests/src/tests/buttons/show.tsx | 2 +- packages/ui-tests/src/tests/crud/create.tsx | 4 +- packages/ui-tests/src/tests/crud/edit.tsx | 9 ++-- packages/ui-tests/src/tests/crud/list.tsx | 17 ++++++-- packages/ui-tests/src/tests/crud/show.tsx | 9 ++-- .../ui-tests/src/tests/fields/boolean.tsx | 2 +- packages/ui-tests/src/tests/fields/date.tsx | 4 +- packages/ui-tests/src/tests/fields/email.tsx | 4 +- packages/ui-tests/src/tests/fields/file.tsx | 2 +- packages/ui-tests/src/tests/fields/image.tsx | 2 +- .../ui-tests/src/tests/fields/markdown.tsx | 2 +- packages/ui-tests/src/tests/fields/number.tsx | 4 +- packages/ui-tests/src/tests/fields/tag.tsx | 4 +- packages/ui-tests/src/tests/fields/text.tsx | 4 +- packages/ui-tests/src/tests/fields/url.tsx | 2 +- packages/ui-tests/src/tests/layout/footer.tsx | 2 +- packages/ui-tests/src/tests/layout/header.tsx | 4 +- packages/ui-tests/src/tests/layout/layout.tsx | 2 +- packages/ui-tests/src/tests/layout/sider.tsx | 4 +- packages/ui-tests/src/tests/layout/title.tsx | 2 +- .../src/tests/pages/auth/authPage.tsx | 4 +- .../src/tests/pages/auth/forgotPassword.tsx | 4 +- .../ui-tests/src/tests/pages/auth/login.tsx | 4 +- .../src/tests/pages/auth/register.tsx | 4 +- .../src/tests/pages/auth/updatePassword.tsx | 4 +- packages/ui-tests/src/tests/pages/error.tsx | 2 +- packages/ui-tests/src/tests/pages/ready.tsx | 2 +- packages/ui-types/src/types/button.tsx | 4 +- packages/ui-types/src/types/crud.tsx | 8 +++- packages/ui-types/src/types/field.tsx | 4 +- packages/ui-types/src/types/layout.tsx | 2 +- 2456 files changed, 4328 insertions(+), 3819 deletions(-) create mode 100644 .changeset/weak-trees-cough.md diff --git a/.changeset/weak-trees-cough.md b/.changeset/weak-trees-cough.md new file mode 100644 index 000000000000..b09eaec98c24 --- /dev/null +++ b/.changeset/weak-trees-cough.md @@ -0,0 +1,42 @@ +--- +"@refinedev/ably": patch +"@refinedev/airtable": patch +"@refinedev/antd": patch +"@refinedev/appwrite": patch +"@refinedev/chakra-ui": patch +"@refinedev/cli": patch +"@refinedev/codemod": patch +"@refinedev/core": patch +"@refinedev/devtools": patch +"@refinedev/devtools-internal": patch +"@refinedev/devtools-server": patch +"@refinedev/devtools-shared": patch +"@refinedev/devtools-ui": patch +"@refinedev/graphql": patch +"@refinedev/hasura": patch +"@refinedev/inferencer": patch +"@refinedev/kbar": patch +"@refinedev/mantine": patch +"@refinedev/medusa": patch +"@refinedev/mui": patch +"@refinedev/nestjs-query": patch +"@refinedev/nestjsx-crud": patch +"@refinedev/nextjs-router": patch +"@refinedev/react-hook-form": patch +"@refinedev/react-router-v6": patch +"@refinedev/react-table": patch +"@refinedev/remix-router": patch +"@refinedev/simple-rest": patch +"@refinedev/strapi": patch +"@refinedev/strapi-v4": patch +"@refinedev/supabase": patch +"@refinedev/ui-tests": patch +"@refinedev/ui-types": patch +--- + +chore: added `type` qualifier to imports used as type only. + +```diff +- import { A } from "./example.ts"; ++ import type { A } from "./example.ts"; +``` diff --git a/biome.json b/biome.json index 1d7cc4a5dea7..22e8668494ae 100644 --- a/biome.json +++ b/biome.json @@ -18,6 +18,7 @@ "lineWidth": 80 }, "javascript": { + "jsxRuntime": "reactClassic", "formatter": { "arrowParentheses": "always", "quoteStyle": "double", @@ -93,7 +94,7 @@ "useSelfClosingElements": "error", "useSingleVarDeclarator": "error", "useTemplate": "error", - "useImportType": "off", + "useImportType": "error", "useNodejsImportProtocol": "off" }, "suspicious": { diff --git a/cypress/support/commands/intercepts/hasura.ts b/cypress/support/commands/intercepts/hasura.ts index 68009e633e60..830898ffb469 100644 --- a/cypress/support/commands/intercepts/hasura.ts +++ b/cypress/support/commands/intercepts/hasura.ts @@ -1,4 +1,4 @@ -import { CyHttpMessages } from "cypress/types/net-stubbing"; +import type { CyHttpMessages } from "cypress/types/net-stubbing"; import hasuraBlogPosts from "../../../fixtures/hasura-blog-posts.json"; import hasuraCategories from "../../../fixtures/hasura-categories.json"; diff --git a/cypress/support/commands/intercepts/supabase.ts b/cypress/support/commands/intercepts/supabase.ts index df1ce361bdc2..f2ee7d37822a 100644 --- a/cypress/support/commands/intercepts/supabase.ts +++ b/cypress/support/commands/intercepts/supabase.ts @@ -1,7 +1,7 @@ /// /// -import { ICategory, IPost } from "../../types"; +import type { ICategory, IPost } from "../../types"; const HOSTNAME = "iwdfzvfqbtokqetmbmbp.supabase.co"; const BASE_PATH = "/rest/v1"; diff --git a/cypress/support/types/index.ts b/cypress/support/types/index.ts index 04bbbfb28b4c..2a71798979fc 100644 --- a/cypress/support/types/index.ts +++ b/cypress/support/types/index.ts @@ -1,5 +1,5 @@ -import posts from "../../fixtures/posts.json"; -import categories from "../../fixtures/categories.json"; +import type posts from "../../fixtures/posts.json"; +import type categories from "../../fixtures/categories.json"; export type IPost = (typeof posts)[number]; export type ICategory = (typeof categories)[number]; diff --git a/documentation/src/assets/examples.tsx b/documentation/src/assets/examples.tsx index 2bc5350f18bf..b197b441ecae 100644 --- a/documentation/src/assets/examples.tsx +++ b/documentation/src/assets/examples.tsx @@ -1,7 +1,7 @@ import { PageIcon } from "@site/src/refine-theme/icons/page"; import { ShareIcon } from "@site/src/refine-theme/icons/share"; import React from "react"; -import { Examples } from "../types/examples"; +import type { Examples } from "../types/examples"; export const SHOW_CASES: Examples = [ { diff --git a/documentation/src/assets/integration-icons/ably.tsx b/documentation/src/assets/integration-icons/ably.tsx index 6f1602a8e3bc..de8d0821c3db 100644 --- a/documentation/src/assets/integration-icons/ably.tsx +++ b/documentation/src/assets/integration-icons/ably.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; const SvgAbly = (props: SVGProps) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => { return ( diff --git a/documentation/src/assets/week-of-refine/icons/refine-week-logo-xl.tsx b/documentation/src/assets/week-of-refine/icons/refine-week-logo-xl.tsx index b44fb9135d0d..033b5adcadd6 100644 --- a/documentation/src/assets/week-of-refine/icons/refine-week-logo-xl.tsx +++ b/documentation/src/assets/week-of-refine/icons/refine-week-logo-xl.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const RefineWeekLogoXL = (props: SVGProps) => ( ) => ( ) => ( ) => ( ) => ( ) => { return ( diff --git a/documentation/src/components/landing/icons/autodesk-icon.tsx b/documentation/src/components/landing/icons/autodesk-icon.tsx index 9d534366f446..d3a09b31d8ac 100644 --- a/documentation/src/components/landing/icons/autodesk-icon.tsx +++ b/documentation/src/components/landing/icons/autodesk-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const AutodeskIcon = (props: SVGProps) => ( ) => ( ) => ( ) => { return ( diff --git a/documentation/src/components/landing/icons/cisco-icon.tsx b/documentation/src/components/landing/icons/cisco-icon.tsx index 3bd8d49f7061..d11f22769db6 100644 --- a/documentation/src/components/landing/icons/cisco-icon.tsx +++ b/documentation/src/components/landing/icons/cisco-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const CiscoIcon = (props: SVGProps) => ( ) => { diff --git a/documentation/src/components/landing/icons/datatables-icon.tsx b/documentation/src/components/landing/icons/datatables-icon.tsx index edfbf614c0e6..40922a88e0ef 100644 --- a/documentation/src/components/landing/icons/datatables-icon.tsx +++ b/documentation/src/components/landing/icons/datatables-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const DataTablesIcon = (props: SVGProps) => { return ( diff --git a/documentation/src/components/landing/icons/deloitte-icon.tsx b/documentation/src/components/landing/icons/deloitte-icon.tsx index af03b7f39272..b398f1678eaa 100644 --- a/documentation/src/components/landing/icons/deloitte-icon.tsx +++ b/documentation/src/components/landing/icons/deloitte-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const DeloitteIcon = (props: SVGProps) => ( ) => { return ( diff --git a/documentation/src/components/landing/icons/ibm-icon.tsx b/documentation/src/components/landing/icons/ibm-icon.tsx index cfc0b07001be..9095dd426d5a 100644 --- a/documentation/src/components/landing/icons/ibm-icon.tsx +++ b/documentation/src/components/landing/icons/ibm-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const IbmIcon = (props: SVGProps) => ( ) => ( ) => ( ) => ( ) => { diff --git a/documentation/src/components/landing/icons/jp-morgan-icon.tsx b/documentation/src/components/landing/icons/jp-morgan-icon.tsx index 19f57ef32531..06242642c409 100644 --- a/documentation/src/components/landing/icons/jp-morgan-icon.tsx +++ b/documentation/src/components/landing/icons/jp-morgan-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const JpMorganIcon = (props: SVGProps) => ( ) => { return ( diff --git a/documentation/src/components/landing/icons/meta-icon.tsx b/documentation/src/components/landing/icons/meta-icon.tsx index 639aec581bda..aca4bef74149 100644 --- a/documentation/src/components/landing/icons/meta-icon.tsx +++ b/documentation/src/components/landing/icons/meta-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const MetaIcon = (props: SVGProps) => ( ) => ( ) => ( ) => ( ) => ( ) => { diff --git a/documentation/src/components/landing/icons/routes-icon.tsx b/documentation/src/components/landing/icons/routes-icon.tsx index 4557ed59a57f..003880172e97 100644 --- a/documentation/src/components/landing/icons/routes-icon.tsx +++ b/documentation/src/components/landing/icons/routes-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; import { useColorMode } from "@docusaurus/theme-common"; export const RoutesIcon = (props: SVGProps) => { diff --git a/documentation/src/components/landing/icons/salesforce-icon.tsx b/documentation/src/components/landing/icons/salesforce-icon.tsx index 0fe776fc8188..031507a65f84 100644 --- a/documentation/src/components/landing/icons/salesforce-icon.tsx +++ b/documentation/src/components/landing/icons/salesforce-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const SalesforceIcon = (props: SVGProps) => ( ) => ( ) => ( ) => ( ) => ( ) => { diff --git a/documentation/src/components/landing/icons/wizards-icon.tsx b/documentation/src/components/landing/icons/wizards-icon.tsx index 41dcdfb4604a..4243fde6bc8d 100644 --- a/documentation/src/components/landing/icons/wizards-icon.tsx +++ b/documentation/src/components/landing/icons/wizards-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const WizardsIcon = (props: SVGProps) => { return ( diff --git a/documentation/src/components/live-preview-context/index.tsx b/documentation/src/components/live-preview-context/index.tsx index 561ba50b0d55..ccc6fb02ec78 100644 --- a/documentation/src/components/live-preview-context/index.tsx +++ b/documentation/src/components/live-preview-context/index.tsx @@ -1,4 +1,4 @@ -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; export type LivePreviewContextType = { shared: string | undefined; diff --git a/documentation/src/components/props-table/index.tsx b/documentation/src/components/props-table/index.tsx index c2032a786e48..934c18cb8b25 100644 --- a/documentation/src/components/props-table/index.tsx +++ b/documentation/src/components/props-table/index.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from "react"; import ReactMarkdown from "react-markdown"; import { - DeclarationType, + type DeclarationType, useDynamicImport, } from "../../hooks/use-dynamic-import"; import PropTag from "../prop-tag"; diff --git a/documentation/src/components/refine-week/cover-bg-shadow.tsx b/documentation/src/components/refine-week/cover-bg-shadow.tsx index 46318c01e918..458bb0cbc8a6 100644 --- a/documentation/src/components/refine-week/cover-bg-shadow.tsx +++ b/documentation/src/components/refine-week/cover-bg-shadow.tsx @@ -1,6 +1,6 @@ import clsx from "clsx"; import React from "react"; -import { WeekVariants } from "./data"; +import type { WeekVariants } from "./data"; type Props = { variant: WeekVariants; diff --git a/documentation/src/components/refine-week/day-indicator.tsx b/documentation/src/components/refine-week/day-indicator.tsx index 2834ca3cf853..3dec74d9ae21 100644 --- a/documentation/src/components/refine-week/day-indicator.tsx +++ b/documentation/src/components/refine-week/day-indicator.tsx @@ -1,6 +1,6 @@ import clsx from "clsx"; import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; type Props = SVGProps & { id?: string; diff --git a/documentation/src/components/refine-week/refine-week-desktop.tsx b/documentation/src/components/refine-week/refine-week-desktop.tsx index 3e2ad2612108..02064f645858 100644 --- a/documentation/src/components/refine-week/refine-week-desktop.tsx +++ b/documentation/src/components/refine-week/refine-week-desktop.tsx @@ -1,6 +1,6 @@ import React from "react"; import clsx from "clsx"; -import { WeekData, WeekVariants } from "./data"; +import type { WeekData, WeekVariants } from "./data"; import { RefineWeekLogo } from "@site/src/assets/week-of-refine/icons"; import { LetsStartButton } from "./lets-start-button"; import { TwitterButton } from "./twitter-button"; diff --git a/documentation/src/components/refine-week/refine-week-mobile.tsx b/documentation/src/components/refine-week/refine-week-mobile.tsx index c00e8ba0c2f7..4825289d0faa 100644 --- a/documentation/src/components/refine-week/refine-week-mobile.tsx +++ b/documentation/src/components/refine-week/refine-week-mobile.tsx @@ -1,6 +1,6 @@ import React from "react"; import clsx from "clsx"; -import { WeekData, WeekVariants } from "./data"; +import type { WeekData, WeekVariants } from "./data"; import { RefineWeekLogo } from "@site/src/assets/week-of-refine/icons"; import { LetsStartButton } from "./lets-start-button"; import { TwitterButton } from "./twitter-button"; diff --git a/documentation/src/components/select-tutorial-framework/index.tsx b/documentation/src/components/select-tutorial-framework/index.tsx index 8e5684741a3d..3dcc913f093e 100644 --- a/documentation/src/components/select-tutorial-framework/index.tsx +++ b/documentation/src/components/select-tutorial-framework/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - PreferredUIPackage, + type PreferredUIPackage, availableUIPackages, UIPackageIcons, } from "../../context/TutorialUIPackageContext/index"; diff --git a/documentation/src/components/tooltip/index.tsx b/documentation/src/components/tooltip/index.tsx index 438b6c1ce187..91b8c60e30b1 100644 --- a/documentation/src/components/tooltip/index.tsx +++ b/documentation/src/components/tooltip/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, PropsWithChildren, ReactNode } from "react"; +import React, { type FC, type PropsWithChildren, type ReactNode } from "react"; import styles from "./styles.module.css"; type Props = { diff --git a/documentation/src/components/tutorial-toc/index.tsx b/documentation/src/components/tutorial-toc/index.tsx index c74ed9b12c5f..ce0d04d55590 100644 --- a/documentation/src/components/tutorial-toc/index.tsx +++ b/documentation/src/components/tutorial-toc/index.tsx @@ -1,4 +1,4 @@ -import React, { HTMLAttributes, useState } from "react"; +import React, { type HTMLAttributes, useState } from "react"; import snarkdown from "snarkdown"; import useBaseUrl from "@docusaurus/useBaseUrl"; // @ts-expect-error no types @@ -10,7 +10,7 @@ import { useCurrentTutorial } from "../../hooks/use-current-tutorial"; import { UnitCircle } from "../unit-circle"; import { TutorialCircle } from "../tutorial-circle"; import { useTutorialUIPackage } from "../../hooks/use-tutorial-ui-package"; -import { PreferredUIPackage } from "../../context/TutorialUIPackageContext"; +import type { PreferredUIPackage } from "../../context/TutorialUIPackageContext"; const uiNames: Record = { headless: "Headless", diff --git a/documentation/src/components/ui-conditional/index.tsx b/documentation/src/components/ui-conditional/index.tsx index df7cb532670d..e655b4cef3d9 100644 --- a/documentation/src/components/ui-conditional/index.tsx +++ b/documentation/src/components/ui-conditional/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { PreferredUIPackage } from "../../context/TutorialUIPackageContext/index"; +import type { PreferredUIPackage } from "../../context/TutorialUIPackageContext/index"; import { useTutorialUIPackage } from "../../hooks/use-tutorial-ui-package"; type Props = { diff --git a/documentation/src/context/CommunityStats/index.tsx b/documentation/src/context/CommunityStats/index.tsx index faf2e53e5b08..19fd4ecc3d2c 100644 --- a/documentation/src/context/CommunityStats/index.tsx +++ b/documentation/src/context/CommunityStats/index.tsx @@ -1,6 +1,6 @@ import React, { createContext, - FC, + type FC, useCallback, useContext, useEffect, diff --git a/documentation/src/hooks/use-dynamic-import.ts b/documentation/src/hooks/use-dynamic-import.ts index a3afec692c69..0b27f45b4d59 100644 --- a/documentation/src/hooks/use-dynamic-import.ts +++ b/documentation/src/hooks/use-dynamic-import.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import { ComponentDoc, PropItem } from "react-docgen-typescript"; +import type { ComponentDoc, PropItem } from "react-docgen-typescript"; export interface StringIndexedObject { [key: string]: T; diff --git a/documentation/src/hooks/use-keydown.ts b/documentation/src/hooks/use-keydown.ts index 877fa12dabad..e2c3f021a0fe 100644 --- a/documentation/src/hooks/use-keydown.ts +++ b/documentation/src/hooks/use-keydown.ts @@ -1,4 +1,4 @@ -import { RefObject } from "react"; +import type { RefObject } from "react"; import React from "react"; diff --git a/documentation/src/hooks/use-outside-click.ts b/documentation/src/hooks/use-outside-click.ts index 62c31c91211b..b11a4cb59f36 100644 --- a/documentation/src/hooks/use-outside-click.ts +++ b/documentation/src/hooks/use-outside-click.ts @@ -1,4 +1,4 @@ -import { RefObject } from "react"; +import type { RefObject } from "react"; import React from "react"; diff --git a/documentation/src/pages/integrations/index.tsx b/documentation/src/pages/integrations/index.tsx index 5c4705901d4b..7c5771b565db 100644 --- a/documentation/src/pages/integrations/index.tsx +++ b/documentation/src/pages/integrations/index.tsx @@ -2,7 +2,7 @@ import clsx from "clsx"; import React, { useMemo } from "react"; import IntegrationsLayout from "@site/src/components/integrations/layout"; -import { Integration } from "@site/src/types/integrations"; +import type { Integration } from "@site/src/types/integrations"; import { integrations as integrationsData } from "../../assets/integrations"; import Card from "../../components/integrations/card"; diff --git a/documentation/src/pages/templates/index.tsx b/documentation/src/pages/templates/index.tsx index 122fa88aa3ce..5d2e3cbe2dfa 100644 --- a/documentation/src/pages/templates/index.tsx +++ b/documentation/src/pages/templates/index.tsx @@ -1,5 +1,5 @@ import Head from "@docusaurus/Head"; -import React, { SVGProps } from "react"; +import React, { type SVGProps } from "react"; import { CommonHeader } from "@site/src/refine-theme/common-header"; import { CommonLayout } from "@site/src/refine-theme/common-layout"; import { LandingFooter } from "@site/src/refine-theme/landing-footer"; diff --git a/documentation/src/partials/npm-scripts/install-packages-commands.tsx b/documentation/src/partials/npm-scripts/install-packages-commands.tsx index b6e19a5e1613..c747fb710c25 100644 --- a/documentation/src/partials/npm-scripts/install-packages-commands.tsx +++ b/documentation/src/partials/npm-scripts/install-packages-commands.tsx @@ -1,4 +1,4 @@ -import React, { FC, PropsWithChildren } from "react"; +import React, { type FC, type PropsWithChildren } from "react"; import Tabs from "@site/src/refine-theme/common-tabs"; import { CodeBlock } from "@site/src/theme/CodeBlock/base"; diff --git a/documentation/src/refine-theme/blog-footer.tsx b/documentation/src/refine-theme/blog-footer.tsx index b8abd853da3f..338a09e107a9 100644 --- a/documentation/src/refine-theme/blog-footer.tsx +++ b/documentation/src/refine-theme/blog-footer.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { LandingFooter, Props } from "./landing-footer"; +import { LandingFooter, type Props } from "./landing-footer"; export const BlogFooter = (props: Props) => { return ; diff --git a/documentation/src/refine-theme/blog-hero.tsx b/documentation/src/refine-theme/blog-hero.tsx index 7fd80bc68d55..1f151799a77e 100644 --- a/documentation/src/refine-theme/blog-hero.tsx +++ b/documentation/src/refine-theme/blog-hero.tsx @@ -1,6 +1,5 @@ import clsx from "clsx"; -import React, { FC } from "react"; -import { CommonThemedImage } from "./common-themed-image"; +import React, { type FC } from "react"; type Props = { className?: string }; diff --git a/documentation/src/refine-theme/common-circle-chevron-down.tsx b/documentation/src/refine-theme/common-circle-chevron-down.tsx index c8280033f697..5ed1140dbc74 100644 --- a/documentation/src/refine-theme/common-circle-chevron-down.tsx +++ b/documentation/src/refine-theme/common-circle-chevron-down.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const CommonCircleChevronDown = (props: SVGProps) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => ( ) => { return ( diff --git a/documentation/src/refine-theme/icons/new-badge-shiny-cyan.tsx b/documentation/src/refine-theme/icons/new-badge-shiny-cyan.tsx index 36409bbe33d9..992c5e2191f1 100644 --- a/documentation/src/refine-theme/icons/new-badge-shiny-cyan.tsx +++ b/documentation/src/refine-theme/icons/new-badge-shiny-cyan.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const NewBadgeShinyCyan = (props: SVGProps) => { return ( diff --git a/documentation/src/refine-theme/icons/new-badge-shiny.tsx b/documentation/src/refine-theme/icons/new-badge-shiny.tsx index f93e7c609190..cf2a83034b4f 100644 --- a/documentation/src/refine-theme/icons/new-badge-shiny.tsx +++ b/documentation/src/refine-theme/icons/new-badge-shiny.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; import { useColorMode } from "@docusaurus/theme-common"; import { NewBadgeShinyCyan } from "./new-badge-shiny-cyan"; import { NewBadgeShinyBlue } from "./new-badge-shiny-blue"; diff --git a/documentation/src/refine-theme/icons/refine-logo-seal.tsx b/documentation/src/refine-theme/icons/refine-logo-seal.tsx index 515d3616f524..9083e91702e0 100644 --- a/documentation/src/refine-theme/icons/refine-logo-seal.tsx +++ b/documentation/src/refine-theme/icons/refine-logo-seal.tsx @@ -1,4 +1,4 @@ -import React, { SVGProps } from "react"; +import React, { type SVGProps } from "react"; export const RefineLogoSeal = (props: SVGProps) => ( ) => ( ) => ( ) => ( ) => ( { return ( diff --git a/documentation/src/refine-theme/tutorial-navigation.tsx b/documentation/src/refine-theme/tutorial-navigation.tsx index 346a6f7f4cb7..9848d537001d 100644 --- a/documentation/src/refine-theme/tutorial-navigation.tsx +++ b/documentation/src/refine-theme/tutorial-navigation.tsx @@ -10,7 +10,7 @@ import { TriangleDownIcon } from "./icons/triangle-down"; import { CommonCircleChevronLeft } from "./common-circle-chevron-left"; import { useTutorialParameters } from "../context/tutorial-parameter-context"; import { - DocElement, + type DocElement, findUnitByItemId, getNext, getPathFromId, diff --git a/documentation/src/refine-theme/tutorial-paginator.tsx b/documentation/src/refine-theme/tutorial-paginator.tsx index 2260cf097d7a..4bb38450af14 100644 --- a/documentation/src/refine-theme/tutorial-paginator.tsx +++ b/documentation/src/refine-theme/tutorial-paginator.tsx @@ -6,7 +6,7 @@ import { ArrowRightIcon } from "./icons/arrow-right"; import { useDoc } from "@docusaurus/theme-common/internal"; import { - DocElement, + type DocElement, getNext, getPathFromId, getPrevious, diff --git a/documentation/src/refine-theme/tutorial-parameter-dropdown.tsx b/documentation/src/refine-theme/tutorial-parameter-dropdown.tsx index 5ef122ca7de4..b1dd28a56609 100644 --- a/documentation/src/refine-theme/tutorial-parameter-dropdown.tsx +++ b/documentation/src/refine-theme/tutorial-parameter-dropdown.tsx @@ -1,5 +1,5 @@ import clsx from "clsx"; -import React, { SVGProps } from "react"; +import React, { type SVGProps } from "react"; import { TriangleDownIcon } from "@site/src/refine-theme/icons/triangle-down"; import { Menu, Transition } from "@headlessui/react"; diff --git a/documentation/src/theme/Root.tsx b/documentation/src/theme/Root.tsx index d1b085d72932..49ee1b7fff85 100644 --- a/documentation/src/theme/Root.tsx +++ b/documentation/src/theme/Root.tsx @@ -1,4 +1,4 @@ -import React, { FC } from "react"; +import React, { type FC } from "react"; import { CommunityStatsProvider } from "../context/CommunityStats"; diff --git a/documentation/src/utils/remove-active-from-files.ts b/documentation/src/utils/remove-active-from-files.ts index a70afd5dd848..d7d9745c8e69 100644 --- a/documentation/src/utils/remove-active-from-files.ts +++ b/documentation/src/utils/remove-active-from-files.ts @@ -1,4 +1,4 @@ -import { SandpackFile, SandpackFiles } from "@codesandbox/sandpack-react"; +import type { SandpackFile, SandpackFiles } from "@codesandbox/sandpack-react"; export const removeActiveFromFiles = (files: SandpackFiles) => { const newFiles = Object.keys(files).reduce((acc, file) => { diff --git a/examples/access-control-casbin/src/pages/categories/create.tsx b/examples/access-control-casbin/src/pages/categories/create.tsx index 69e4977dc7f2..abf44730ab3b 100644 --- a/examples/access-control-casbin/src/pages/categories/create.tsx +++ b/examples/access-control-casbin/src/pages/categories/create.tsx @@ -2,7 +2,7 @@ import { Create, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-casbin/src/pages/categories/edit.tsx b/examples/access-control-casbin/src/pages/categories/edit.tsx index 5de0a6150c8b..f7b3b323c867 100644 --- a/examples/access-control-casbin/src/pages/categories/edit.tsx +++ b/examples/access-control-casbin/src/pages/categories/edit.tsx @@ -2,7 +2,7 @@ import { Edit, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryEdit = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-casbin/src/pages/categories/list.tsx b/examples/access-control-casbin/src/pages/categories/list.tsx index 220f7073d15f..4d585b1b4958 100644 --- a/examples/access-control-casbin/src/pages/categories/list.tsx +++ b/examples/access-control-casbin/src/pages/categories/list.tsx @@ -8,7 +8,7 @@ import { import { Table, Space } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryList = () => { const { tableProps } = useTable(); diff --git a/examples/access-control-casbin/src/pages/categories/show.tsx b/examples/access-control-casbin/src/pages/categories/show.tsx index b7292084d5f2..f2a84b98ef7d 100644 --- a/examples/access-control-casbin/src/pages/categories/show.tsx +++ b/examples/access-control-casbin/src/pages/categories/show.tsx @@ -4,7 +4,7 @@ import { Show } from "@refinedev/antd"; import { Typography } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/access-control-casbin/src/pages/posts/create.tsx b/examples/access-control-casbin/src/pages/posts/create.tsx index 1584d39ac3e3..2bcf74182b56 100644 --- a/examples/access-control-casbin/src/pages/posts/create.tsx +++ b/examples/access-control-casbin/src/pages/posts/create.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-casbin/src/pages/posts/edit.tsx b/examples/access-control-casbin/src/pages/posts/edit.tsx index 71fb6a382e09..a7ac2428084d 100644 --- a/examples/access-control-casbin/src/pages/posts/edit.tsx +++ b/examples/access-control-casbin/src/pages/posts/edit.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/access-control-casbin/src/pages/posts/list.tsx b/examples/access-control-casbin/src/pages/posts/list.tsx index a217e5d111ed..ef7cfbcfc41f 100644 --- a/examples/access-control-casbin/src/pages/posts/list.tsx +++ b/examples/access-control-casbin/src/pages/posts/list.tsx @@ -14,7 +14,7 @@ import { import { Table, Space, Select, Radio } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList: React.FC = () => { const { tableProps } = useTable(); diff --git a/examples/access-control-casbin/src/pages/posts/show.tsx b/examples/access-control-casbin/src/pages/posts/show.tsx index 3d3678bad3c3..dfd179a4d431 100644 --- a/examples/access-control-casbin/src/pages/posts/show.tsx +++ b/examples/access-control-casbin/src/pages/posts/show.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/access-control-casbin/src/pages/users/create.tsx b/examples/access-control-casbin/src/pages/users/create.tsx index 16b9df56f6c7..693c110a61dc 100644 --- a/examples/access-control-casbin/src/pages/users/create.tsx +++ b/examples/access-control-casbin/src/pages/users/create.tsx @@ -4,7 +4,7 @@ import { Create, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const UserCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-casbin/src/pages/users/edit.tsx b/examples/access-control-casbin/src/pages/users/edit.tsx index 732c22424a34..7d4af475d991 100644 --- a/examples/access-control-casbin/src/pages/users/edit.tsx +++ b/examples/access-control-casbin/src/pages/users/edit.tsx @@ -4,7 +4,7 @@ import { Edit, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const UserEdit = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-casbin/src/pages/users/list.tsx b/examples/access-control-casbin/src/pages/users/list.tsx index 454ab78e297e..876bb05c8cdb 100644 --- a/examples/access-control-casbin/src/pages/users/list.tsx +++ b/examples/access-control-casbin/src/pages/users/list.tsx @@ -9,7 +9,7 @@ import { import { Table, Space } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const UserList = () => { const { tableProps } = useTable(); diff --git a/examples/access-control-casbin/src/pages/users/show.tsx b/examples/access-control-casbin/src/pages/users/show.tsx index 5f6c5664bdde..32e7a1573c4b 100644 --- a/examples/access-control-casbin/src/pages/users/show.tsx +++ b/examples/access-control-casbin/src/pages/users/show.tsx @@ -4,7 +4,7 @@ import { Show, EmailField, ImageField } from "@refinedev/antd"; import { Typography, Space } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/access-control-cerbos/src/pages/categories/create.tsx b/examples/access-control-cerbos/src/pages/categories/create.tsx index 69e4977dc7f2..abf44730ab3b 100644 --- a/examples/access-control-cerbos/src/pages/categories/create.tsx +++ b/examples/access-control-cerbos/src/pages/categories/create.tsx @@ -2,7 +2,7 @@ import { Create, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-cerbos/src/pages/categories/edit.tsx b/examples/access-control-cerbos/src/pages/categories/edit.tsx index 5de0a6150c8b..f7b3b323c867 100644 --- a/examples/access-control-cerbos/src/pages/categories/edit.tsx +++ b/examples/access-control-cerbos/src/pages/categories/edit.tsx @@ -2,7 +2,7 @@ import { Edit, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryEdit = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-cerbos/src/pages/categories/list.tsx b/examples/access-control-cerbos/src/pages/categories/list.tsx index f8a71f215034..460e7fa7c8fb 100644 --- a/examples/access-control-cerbos/src/pages/categories/list.tsx +++ b/examples/access-control-cerbos/src/pages/categories/list.tsx @@ -10,7 +10,7 @@ import { import { Table, Space } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryList = () => { const { tableProps } = useTable(); diff --git a/examples/access-control-cerbos/src/pages/categories/show.tsx b/examples/access-control-cerbos/src/pages/categories/show.tsx index b7292084d5f2..f2a84b98ef7d 100644 --- a/examples/access-control-cerbos/src/pages/categories/show.tsx +++ b/examples/access-control-cerbos/src/pages/categories/show.tsx @@ -4,7 +4,7 @@ import { Show } from "@refinedev/antd"; import { Typography } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/access-control-cerbos/src/pages/posts/create.tsx b/examples/access-control-cerbos/src/pages/posts/create.tsx index 1584d39ac3e3..2bcf74182b56 100644 --- a/examples/access-control-cerbos/src/pages/posts/create.tsx +++ b/examples/access-control-cerbos/src/pages/posts/create.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-cerbos/src/pages/posts/edit.tsx b/examples/access-control-cerbos/src/pages/posts/edit.tsx index 71fb6a382e09..a7ac2428084d 100644 --- a/examples/access-control-cerbos/src/pages/posts/edit.tsx +++ b/examples/access-control-cerbos/src/pages/posts/edit.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/access-control-cerbos/src/pages/posts/list.tsx b/examples/access-control-cerbos/src/pages/posts/list.tsx index 7adcc0ad30de..f6b31fe8768c 100644 --- a/examples/access-control-cerbos/src/pages/posts/list.tsx +++ b/examples/access-control-cerbos/src/pages/posts/list.tsx @@ -14,7 +14,7 @@ import { import { Table, Space, Select, Radio } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps } = useTable(); diff --git a/examples/access-control-cerbos/src/pages/posts/show.tsx b/examples/access-control-cerbos/src/pages/posts/show.tsx index 3d3678bad3c3..dfd179a4d431 100644 --- a/examples/access-control-cerbos/src/pages/posts/show.tsx +++ b/examples/access-control-cerbos/src/pages/posts/show.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/access-control-cerbos/src/pages/users/create.tsx b/examples/access-control-cerbos/src/pages/users/create.tsx index 16b9df56f6c7..693c110a61dc 100644 --- a/examples/access-control-cerbos/src/pages/users/create.tsx +++ b/examples/access-control-cerbos/src/pages/users/create.tsx @@ -4,7 +4,7 @@ import { Create, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const UserCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-cerbos/src/pages/users/edit.tsx b/examples/access-control-cerbos/src/pages/users/edit.tsx index 732c22424a34..7d4af475d991 100644 --- a/examples/access-control-cerbos/src/pages/users/edit.tsx +++ b/examples/access-control-cerbos/src/pages/users/edit.tsx @@ -4,7 +4,7 @@ import { Edit, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const UserEdit = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-cerbos/src/pages/users/list.tsx b/examples/access-control-cerbos/src/pages/users/list.tsx index 757f1a52788e..e4fb5ca55944 100644 --- a/examples/access-control-cerbos/src/pages/users/list.tsx +++ b/examples/access-control-cerbos/src/pages/users/list.tsx @@ -11,7 +11,7 @@ import { import { Table, Space } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const UserList = () => { const { tableProps } = useTable(); diff --git a/examples/access-control-cerbos/src/pages/users/show.tsx b/examples/access-control-cerbos/src/pages/users/show.tsx index 5f6c5664bdde..32e7a1573c4b 100644 --- a/examples/access-control-cerbos/src/pages/users/show.tsx +++ b/examples/access-control-cerbos/src/pages/users/show.tsx @@ -4,7 +4,7 @@ import { Show, EmailField, ImageField } from "@refinedev/antd"; import { Typography, Space } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/access-control-permify/src/authz/permifyClient.ts b/examples/access-control-permify/src/authz/permifyClient.ts index 68316e21ecf1..19be39a66368 100644 --- a/examples/access-control-permify/src/authz/permifyClient.ts +++ b/examples/access-control-permify/src/authz/permifyClient.ts @@ -1,4 +1,4 @@ -import { BaseKey } from "@refinedev/core"; +import type { BaseKey } from "@refinedev/core"; export class PermifyClient { private instance: string; diff --git a/examples/access-control-permify/src/pages/categories/create.tsx b/examples/access-control-permify/src/pages/categories/create.tsx index 69e4977dc7f2..abf44730ab3b 100644 --- a/examples/access-control-permify/src/pages/categories/create.tsx +++ b/examples/access-control-permify/src/pages/categories/create.tsx @@ -2,7 +2,7 @@ import { Create, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-permify/src/pages/categories/edit.tsx b/examples/access-control-permify/src/pages/categories/edit.tsx index 5de0a6150c8b..f7b3b323c867 100644 --- a/examples/access-control-permify/src/pages/categories/edit.tsx +++ b/examples/access-control-permify/src/pages/categories/edit.tsx @@ -2,7 +2,7 @@ import { Edit, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryEdit = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-permify/src/pages/categories/list.tsx b/examples/access-control-permify/src/pages/categories/list.tsx index f8a71f215034..460e7fa7c8fb 100644 --- a/examples/access-control-permify/src/pages/categories/list.tsx +++ b/examples/access-control-permify/src/pages/categories/list.tsx @@ -10,7 +10,7 @@ import { import { Table, Space } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryList = () => { const { tableProps } = useTable(); diff --git a/examples/access-control-permify/src/pages/categories/show.tsx b/examples/access-control-permify/src/pages/categories/show.tsx index b7292084d5f2..f2a84b98ef7d 100644 --- a/examples/access-control-permify/src/pages/categories/show.tsx +++ b/examples/access-control-permify/src/pages/categories/show.tsx @@ -4,7 +4,7 @@ import { Show } from "@refinedev/antd"; import { Typography } from "antd"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/access-control-permify/src/pages/posts/create.tsx b/examples/access-control-permify/src/pages/posts/create.tsx index 74a91ce620fa..7177fc7b9599 100644 --- a/examples/access-control-permify/src/pages/posts/create.tsx +++ b/examples/access-control-permify/src/pages/posts/create.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-permify/src/pages/posts/edit.tsx b/examples/access-control-permify/src/pages/posts/edit.tsx index cb964b4c8ced..8d66194f97b3 100644 --- a/examples/access-control-permify/src/pages/posts/edit.tsx +++ b/examples/access-control-permify/src/pages/posts/edit.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/access-control-permify/src/pages/posts/list.tsx b/examples/access-control-permify/src/pages/posts/list.tsx index b877bef8df0d..398bfb968132 100644 --- a/examples/access-control-permify/src/pages/posts/list.tsx +++ b/examples/access-control-permify/src/pages/posts/list.tsx @@ -14,7 +14,7 @@ import { import { Table, Space, Select, Radio } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps } = useTable(); diff --git a/examples/access-control-permify/src/pages/posts/show.tsx b/examples/access-control-permify/src/pages/posts/show.tsx index 3d3678bad3c3..dfd179a4d431 100644 --- a/examples/access-control-permify/src/pages/posts/show.tsx +++ b/examples/access-control-permify/src/pages/posts/show.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/access-control-permify/src/pages/users/create.tsx b/examples/access-control-permify/src/pages/users/create.tsx index 16b9df56f6c7..693c110a61dc 100644 --- a/examples/access-control-permify/src/pages/users/create.tsx +++ b/examples/access-control-permify/src/pages/users/create.tsx @@ -4,7 +4,7 @@ import { Create, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const UserCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-permify/src/pages/users/edit.tsx b/examples/access-control-permify/src/pages/users/edit.tsx index 732c22424a34..7d4af475d991 100644 --- a/examples/access-control-permify/src/pages/users/edit.tsx +++ b/examples/access-control-permify/src/pages/users/edit.tsx @@ -4,7 +4,7 @@ import { Edit, useForm } from "@refinedev/antd"; import { Form, Input } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const UserEdit = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/access-control-permify/src/pages/users/list.tsx b/examples/access-control-permify/src/pages/users/list.tsx index 757f1a52788e..e4fb5ca55944 100644 --- a/examples/access-control-permify/src/pages/users/list.tsx +++ b/examples/access-control-permify/src/pages/users/list.tsx @@ -11,7 +11,7 @@ import { import { Table, Space } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const UserList = () => { const { tableProps } = useTable(); diff --git a/examples/access-control-permify/src/pages/users/show.tsx b/examples/access-control-permify/src/pages/users/show.tsx index 5f6c5664bdde..32e7a1573c4b 100644 --- a/examples/access-control-permify/src/pages/users/show.tsx +++ b/examples/access-control-permify/src/pages/users/show.tsx @@ -4,7 +4,7 @@ import { Show, EmailField, ImageField } from "@refinedev/antd"; import { Typography, Space } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; const { Title, Text } = Typography; 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 db99ef6e8c4c..f60eecb56813 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 @@ -1,11 +1,11 @@ import { SaveButton, useForm } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; -import { GetFields, GetVariables } from "@refinedev/nestjs-query"; +import type { HttpError } from "@refinedev/core"; +import type { GetFields, GetVariables } from "@refinedev/nestjs-query"; import { CloseOutlined } from "@ant-design/icons"; import { Button, Card, Drawer, Form, Input, Spin } from "antd"; -import { +import type { UpdateUserMutation, UpdateUserMutationVariables, } from "@/graphql/types"; diff --git a/examples/app-crm-minimal/src/components/layout/gh-banner/index.tsx b/examples/app-crm-minimal/src/components/layout/gh-banner/index.tsx index 8f25c2d4dec7..ae78a853fc95 100644 --- a/examples/app-crm-minimal/src/components/layout/gh-banner/index.tsx +++ b/examples/app-crm-minimal/src/components/layout/gh-banner/index.tsx @@ -1,4 +1,4 @@ -import React, { SVGProps, useEffect } from "react"; +import React, { type SVGProps, useEffect } from "react"; import { CSSRules } from "./styles"; diff --git a/examples/app-crm-minimal/src/components/tags/contact-status-tag.tsx b/examples/app-crm-minimal/src/components/tags/contact-status-tag.tsx index 7fd7b424c525..186b06da243b 100644 --- a/examples/app-crm-minimal/src/components/tags/contact-status-tag.tsx +++ b/examples/app-crm-minimal/src/components/tags/contact-status-tag.tsx @@ -6,9 +6,9 @@ import { PlayCircleFilled, PlayCircleOutlined, } from "@ant-design/icons"; -import { Tag, TagProps } from "antd"; +import { Tag, type TagProps } from "antd"; -import { ContactStatus } from "@/graphql/schema.types"; +import type { ContactStatus } from "@/graphql/schema.types"; type Props = { status: ContactStatus; diff --git a/examples/app-crm-minimal/src/components/tags/quote-status-tag.tsx b/examples/app-crm-minimal/src/components/tags/quote-status-tag.tsx index 9ac729dbd2a3..07fb7d74b411 100644 --- a/examples/app-crm-minimal/src/components/tags/quote-status-tag.tsx +++ b/examples/app-crm-minimal/src/components/tags/quote-status-tag.tsx @@ -7,7 +7,7 @@ import { } from "@ant-design/icons"; import { Tag } from "antd"; -import { QuoteStatus } from "@/graphql/schema.types"; +import type { QuoteStatus } from "@/graphql/schema.types"; const variant: Record< QuoteStatus, diff --git a/examples/app-crm-minimal/src/components/tags/user-tag.tsx b/examples/app-crm-minimal/src/components/tags/user-tag.tsx index c529b0bd02a5..bda31b2be655 100644 --- a/examples/app-crm-minimal/src/components/tags/user-tag.tsx +++ b/examples/app-crm-minimal/src/components/tags/user-tag.tsx @@ -1,6 +1,6 @@ import { Space, Tag } from "antd"; -import { User } from "@/graphql/schema.types"; +import type { User } from "@/graphql/schema.types"; import { CustomAvatar } from "../custom-avatar"; diff --git a/examples/app-crm-minimal/src/providers/auth.ts b/examples/app-crm-minimal/src/providers/auth.ts index b5f00dfd7b77..19a1e9139481 100644 --- a/examples/app-crm-minimal/src/providers/auth.ts +++ b/examples/app-crm-minimal/src/providers/auth.ts @@ -1,6 +1,6 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; -import { User } from "@/graphql/schema.types"; +import type { User } from "@/graphql/schema.types"; import { API_URL, dataProvider } from "./data"; diff --git a/examples/app-crm-minimal/src/providers/data/fetch-wrapper.ts b/examples/app-crm-minimal/src/providers/data/fetch-wrapper.ts index 887967014346..df685ae5f602 100644 --- a/examples/app-crm-minimal/src/providers/data/fetch-wrapper.ts +++ b/examples/app-crm-minimal/src/providers/data/fetch-wrapper.ts @@ -1,4 +1,4 @@ -import { GraphQLFormattedError } from "graphql"; +import type { GraphQLFormattedError } from "graphql"; type Error = { message: string; diff --git a/examples/app-crm-minimal/src/routes/companies/edit/contacts-table.tsx b/examples/app-crm-minimal/src/routes/companies/edit/contacts-table.tsx index d0a7e4337572..6d2db7b29b60 100644 --- a/examples/app-crm-minimal/src/routes/companies/edit/contacts-table.tsx +++ b/examples/app-crm-minimal/src/routes/companies/edit/contacts-table.tsx @@ -1,7 +1,7 @@ import { useParams } from "react-router-dom"; import { FilterDropdown, useTable } from "@refinedev/antd"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { MailOutlined, @@ -12,7 +12,7 @@ import { import { Button, Card, Input, Select, Space, Table } from "antd"; import { ContactStatusTag, CustomAvatar, Text } from "@/components"; -import { CompanyContactsTableQuery } from "@/graphql/types"; +import type { CompanyContactsTableQuery } from "@/graphql/types"; import { COMPANY_CONTACTS_TABLE_QUERY } from "./queries"; diff --git a/examples/app-crm-minimal/src/routes/companies/edit/form.tsx b/examples/app-crm-minimal/src/routes/companies/edit/form.tsx index 514edd5d2383..23c9f3c126a4 100644 --- a/examples/app-crm-minimal/src/routes/companies/edit/form.tsx +++ b/examples/app-crm-minimal/src/routes/companies/edit/form.tsx @@ -1,6 +1,6 @@ import { Edit, useForm, useSelect } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; -import { +import type { HttpError } from "@refinedev/core"; +import type { GetFields, GetFieldsFromList, GetVariables, @@ -10,8 +10,12 @@ import { Form, Input, InputNumber, Select } from "antd"; import { CustomAvatar, SelectOptionWithAvatar } from "@/components"; import { USERS_SELECT_QUERY } from "@/graphql/queries"; -import { BusinessType, CompanySize, Industry } from "@/graphql/schema.types"; -import { +import type { + BusinessType, + CompanySize, + Industry, +} from "@/graphql/schema.types"; +import type { UpdateCompanyMutation, UpdateCompanyMutationVariables, UsersSelectQuery, diff --git a/examples/app-crm-minimal/src/routes/companies/list/create-modal.tsx b/examples/app-crm-minimal/src/routes/companies/list/create-modal.tsx index 8866961280ab..da79395842cd 100644 --- a/examples/app-crm-minimal/src/routes/companies/list/create-modal.tsx +++ b/examples/app-crm-minimal/src/routes/companies/list/create-modal.tsx @@ -1,6 +1,6 @@ import { useModalForm, useSelect } from "@refinedev/antd"; -import { HttpError, useGo } from "@refinedev/core"; -import { +import { type HttpError, useGo } from "@refinedev/core"; +import type { GetFields, GetFieldsFromList, GetVariables, @@ -10,7 +10,7 @@ import { Form, Input, Modal, Select } from "antd"; import { SelectOptionWithAvatar } from "@/components"; import { USERS_SELECT_QUERY } from "@/graphql/queries"; -import { +import type { CreateCompanyMutation, CreateCompanyMutationVariables, UsersSelectQuery, diff --git a/examples/app-crm-minimal/src/routes/companies/list/index.tsx b/examples/app-crm-minimal/src/routes/companies/list/index.tsx index 018be4b797e7..5aa30def4909 100644 --- a/examples/app-crm-minimal/src/routes/companies/list/index.tsx +++ b/examples/app-crm-minimal/src/routes/companies/list/index.tsx @@ -8,14 +8,14 @@ import { List, useTable, } from "@refinedev/antd"; -import { getDefaultFilter, HttpError, useGo } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import { getDefaultFilter, type HttpError, useGo } from "@refinedev/core"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { SearchOutlined } from "@ant-design/icons"; import { Input, Space, Table } from "antd"; import { CustomAvatar, PaginationTotal, Text } from "@/components"; -import { CompaniesListQuery } from "@/graphql/types"; +import type { CompaniesListQuery } from "@/graphql/types"; import { currencyNumber } from "@/utilities"; import { COMPANIES_LIST_QUERY } from "./queries"; diff --git a/examples/app-crm-minimal/src/routes/dashboard/components/deals-chart/index.tsx b/examples/app-crm-minimal/src/routes/dashboard/components/deals-chart/index.tsx index ae92cdf9d87a..d398c66d3480 100644 --- a/examples/app-crm-minimal/src/routes/dashboard/components/deals-chart/index.tsx +++ b/examples/app-crm-minimal/src/routes/dashboard/components/deals-chart/index.tsx @@ -1,14 +1,14 @@ import React from "react"; import { useList } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { DollarOutlined } from "@ant-design/icons"; -import { Area, AreaConfig } from "@ant-design/plots"; +import { Area, type AreaConfig } from "@ant-design/plots"; import { Card } from "antd"; import { Text } from "@/components"; -import { DashboardDealsChartQuery } from "@/graphql/types"; +import type { DashboardDealsChartQuery } from "@/graphql/types"; import { DASHBOARD_DEALS_CHART_QUERY } from "./queries"; import { mapDealsData } from "./utils"; diff --git a/examples/app-crm-minimal/src/routes/dashboard/components/deals-chart/utils.ts b/examples/app-crm-minimal/src/routes/dashboard/components/deals-chart/utils.ts index c245580f85fe..da9dadae5d3f 100644 --- a/examples/app-crm-minimal/src/routes/dashboard/components/deals-chart/utils.ts +++ b/examples/app-crm-minimal/src/routes/dashboard/components/deals-chart/utils.ts @@ -1,8 +1,8 @@ -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import dayjs from "dayjs"; -import { DashboardDealsChartQuery } from "@/graphql/types"; +import type { DashboardDealsChartQuery } from "@/graphql/types"; type DealStage = GetFieldsFromList; diff --git a/examples/app-crm-minimal/src/routes/dashboard/components/latest-activities/index.tsx b/examples/app-crm-minimal/src/routes/dashboard/components/latest-activities/index.tsx index 9c99443fb029..192d2ac5b6f7 100644 --- a/examples/app-crm-minimal/src/routes/dashboard/components/latest-activities/index.tsx +++ b/examples/app-crm-minimal/src/routes/dashboard/components/latest-activities/index.tsx @@ -1,12 +1,12 @@ import { useList } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { UnorderedListOutlined } from "@ant-design/icons"; import { Card, List, Skeleton as AntdSkeleton, Space } from "antd"; import dayjs from "dayjs"; import { CustomAvatar, Text } from "@/components"; -import { +import type { DashboardLatestActivitiesAuditsQuery, DashboardLatestActivitiesDealsQuery, } from "@/graphql/types"; diff --git a/examples/app-crm-minimal/src/routes/dashboard/components/total-count-card/index.tsx b/examples/app-crm-minimal/src/routes/dashboard/components/total-count-card/index.tsx index 8b58e366af9b..311c8babaa68 100644 --- a/examples/app-crm-minimal/src/routes/dashboard/components/total-count-card/index.tsx +++ b/examples/app-crm-minimal/src/routes/dashboard/components/total-count-card/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { AuditOutlined, ShopOutlined, TeamOutlined } from "@ant-design/icons"; -import { Area, AreaConfig } from "@ant-design/plots"; +import { Area, type AreaConfig } from "@ant-design/plots"; import { Card, Skeleton } from "antd"; import { Text } from "@/components"; diff --git a/examples/app-crm-minimal/src/routes/dashboard/components/upcoming-events/index.tsx b/examples/app-crm-minimal/src/routes/dashboard/components/upcoming-events/index.tsx index df6beeae5cb6..d2dc0394b91d 100644 --- a/examples/app-crm-minimal/src/routes/dashboard/components/upcoming-events/index.tsx +++ b/examples/app-crm-minimal/src/routes/dashboard/components/upcoming-events/index.tsx @@ -1,12 +1,12 @@ import { useList } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { CalendarOutlined } from "@ant-design/icons"; import { Badge, Card, List, Skeleton as AntdSkeleton } from "antd"; import dayjs from "dayjs"; import { Text } from "@/components"; -import { DashboardCalendarUpcomingEventsQuery } from "@/graphql/types"; +import type { DashboardCalendarUpcomingEventsQuery } from "@/graphql/types"; import { DASHBORAD_CALENDAR_UPCOMING_EVENTS_QUERY } from "./queries"; diff --git a/examples/app-crm-minimal/src/routes/dashboard/index.tsx b/examples/app-crm-minimal/src/routes/dashboard/index.tsx index ee6e8ac6a773..2884f79576dd 100644 --- a/examples/app-crm-minimal/src/routes/dashboard/index.tsx +++ b/examples/app-crm-minimal/src/routes/dashboard/index.tsx @@ -2,7 +2,7 @@ import { useCustom } from "@refinedev/core"; import { Col, Row } from "antd"; -import { DashboardTotalCountsQuery } from "@/graphql/types"; +import type { DashboardTotalCountsQuery } from "@/graphql/types"; import { CalendarUpcomingEvents, diff --git a/examples/app-crm-minimal/src/routes/tasks/edit/forms/description/description-form.tsx b/examples/app-crm-minimal/src/routes/tasks/edit/forms/description/description-form.tsx index 66eff0a294bb..440f807d2a9a 100644 --- a/examples/app-crm-minimal/src/routes/tasks/edit/forms/description/description-form.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/edit/forms/description/description-form.tsx @@ -1,12 +1,12 @@ import { useForm } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; -import { GetFields, GetVariables } from "@refinedev/nestjs-query"; +import type { HttpError } from "@refinedev/core"; +import type { GetFields, GetVariables } from "@refinedev/nestjs-query"; import MDEditor from "@uiw/react-md-editor"; import { Button, Form, Space } from "antd"; -import { Task } from "@/graphql/schema.types"; -import { +import type { Task } from "@/graphql/schema.types"; +import type { UpdateTaskMutation, UpdateTaskMutationVariables, } from "@/graphql/types"; diff --git a/examples/app-crm-minimal/src/routes/tasks/edit/forms/description/description-header.tsx b/examples/app-crm-minimal/src/routes/tasks/edit/forms/description/description-header.tsx index d86652ded2b0..a7150673930c 100644 --- a/examples/app-crm-minimal/src/routes/tasks/edit/forms/description/description-header.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/edit/forms/description/description-header.tsx @@ -2,7 +2,7 @@ import { MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { Task } from "@/graphql/schema.types"; +import type { Task } from "@/graphql/schema.types"; type Props = { description?: Task["description"]; diff --git a/examples/app-crm-minimal/src/routes/tasks/edit/forms/due-date/duedate-form.tsx b/examples/app-crm-minimal/src/routes/tasks/edit/forms/due-date/duedate-form.tsx index 1d4d8c1c6e02..062912395f3c 100644 --- a/examples/app-crm-minimal/src/routes/tasks/edit/forms/due-date/duedate-form.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/edit/forms/due-date/duedate-form.tsx @@ -1,12 +1,12 @@ import { useForm } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; -import { GetFields, GetVariables } from "@refinedev/nestjs-query"; +import type { HttpError } from "@refinedev/core"; +import type { GetFields, GetVariables } from "@refinedev/nestjs-query"; import { Button, DatePicker, Form, Space } from "antd"; import dayjs from "dayjs"; -import { Task } from "@/graphql/schema.types"; -import { +import type { Task } from "@/graphql/schema.types"; +import type { UpdateTaskMutation, UpdateTaskMutationVariables, } from "@/graphql/types"; diff --git a/examples/app-crm-minimal/src/routes/tasks/edit/forms/due-date/duedate-header.tsx b/examples/app-crm-minimal/src/routes/tasks/edit/forms/due-date/duedate-header.tsx index 4a3e9e763c39..cf1388fbc233 100644 --- a/examples/app-crm-minimal/src/routes/tasks/edit/forms/due-date/duedate-header.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/edit/forms/due-date/duedate-header.tsx @@ -2,7 +2,7 @@ import { Space, Tag, Typography } from "antd"; import dayjs from "dayjs"; import { Text } from "@/components"; -import { Task } from "@/graphql/schema.types"; +import type { Task } from "@/graphql/schema.types"; import { getDateColor } from "@/utilities"; type Props = { diff --git a/examples/app-crm-minimal/src/routes/tasks/edit/forms/stage/stage-form.tsx b/examples/app-crm-minimal/src/routes/tasks/edit/forms/stage/stage-form.tsx index 91d650c44799..9ae6c715cea3 100644 --- a/examples/app-crm-minimal/src/routes/tasks/edit/forms/stage/stage-form.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/edit/forms/stage/stage-form.tsx @@ -1,6 +1,6 @@ import { useForm, useSelect } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; -import { +import type { HttpError } from "@refinedev/core"; +import type { GetFields, GetFieldsFromList, GetVariables, @@ -11,7 +11,7 @@ import { Checkbox, Form, Select, Space } from "antd"; import { AccordionHeaderSkeleton } from "@/components"; import { TASK_STAGES_SELECT_QUERY } from "@/graphql/queries"; -import { +import type { TaskStagesSelectQuery, UpdateTaskMutation, UpdateTaskMutationVariables, diff --git a/examples/app-crm-minimal/src/routes/tasks/edit/forms/title/title-form.tsx b/examples/app-crm-minimal/src/routes/tasks/edit/forms/title/title-form.tsx index 29808c067f79..daf288baec39 100644 --- a/examples/app-crm-minimal/src/routes/tasks/edit/forms/title/title-form.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/edit/forms/title/title-form.tsx @@ -1,14 +1,14 @@ import React from "react"; import { useForm } from "@refinedev/antd"; -import { HttpError, useInvalidate } from "@refinedev/core"; -import { GetFields, GetVariables } from "@refinedev/nestjs-query"; +import { type HttpError, useInvalidate } from "@refinedev/core"; +import type { GetFields, GetVariables } from "@refinedev/nestjs-query"; import { Form, Skeleton } from "antd"; import { Text } from "@/components"; -import { Task } from "@/graphql/schema.types"; -import { +import type { Task } from "@/graphql/schema.types"; +import type { UpdateTaskMutation, UpdateTaskMutationVariables, } from "@/graphql/types"; diff --git a/examples/app-crm-minimal/src/routes/tasks/edit/forms/users/users-form.tsx b/examples/app-crm-minimal/src/routes/tasks/edit/forms/users/users-form.tsx index 6b33840680ca..831f0ab5ea99 100644 --- a/examples/app-crm-minimal/src/routes/tasks/edit/forms/users/users-form.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/edit/forms/users/users-form.tsx @@ -1,6 +1,6 @@ import { useForm, useSelect } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; -import { +import type { HttpError } from "@refinedev/core"; +import type { GetFields, GetFieldsFromList, GetVariables, @@ -9,7 +9,7 @@ import { import { Button, Form, Select, Space } from "antd"; import { USERS_SELECT_QUERY } from "@/graphql/queries"; -import { +import type { UpdateTaskMutation, UpdateTaskMutationVariables, UsersSelectQuery, diff --git a/examples/app-crm-minimal/src/routes/tasks/edit/forms/users/users-header.tsx b/examples/app-crm-minimal/src/routes/tasks/edit/forms/users/users-header.tsx index f9af82e1bb3f..95b04679405a 100644 --- a/examples/app-crm-minimal/src/routes/tasks/edit/forms/users/users-header.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/edit/forms/users/users-header.tsx @@ -1,7 +1,7 @@ import { Space, Typography } from "antd"; import { UserTag } from "@/components"; -import { Task } from "@/graphql/schema.types"; +import type { Task } from "@/graphql/schema.types"; type Props = { users?: Task["users"]; diff --git a/examples/app-crm-minimal/src/routes/tasks/edit/index.tsx b/examples/app-crm-minimal/src/routes/tasks/edit/index.tsx index 38f650285281..58c9c7abd353 100644 --- a/examples/app-crm-minimal/src/routes/tasks/edit/index.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/edit/index.tsx @@ -11,7 +11,7 @@ import { import { Modal } from "antd"; import { Accordion } from "@/components"; -import { Task } from "@/graphql/schema.types"; +import type { Task } from "@/graphql/schema.types"; import { DescriptionForm } from "./forms/description/description-form"; import { DescriptionHeader } from "./forms/description/description-header"; diff --git a/examples/app-crm-minimal/src/routes/tasks/list/index.tsx b/examples/app-crm-minimal/src/routes/tasks/list/index.tsx index 52e1c4e6729d..f7fa47b00620 100644 --- a/examples/app-crm-minimal/src/routes/tasks/list/index.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/list/index.tsx @@ -1,12 +1,17 @@ import React from "react"; -import { HttpError, useList, useNavigation, useUpdate } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import { + type HttpError, + useList, + useNavigation, + useUpdate, +} from "@refinedev/core"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; -import { DragEndEvent } from "@dnd-kit/core"; +import type { DragEndEvent } from "@dnd-kit/core"; -import { TaskUpdateInput } from "@/graphql/schema.types"; -import { TasksQuery, TaskStagesQuery } from "@/graphql/types"; +import type { TaskUpdateInput } from "@/graphql/schema.types"; +import type { TasksQuery, TaskStagesQuery } from "@/graphql/types"; import { KanbanAddCardButton } from "../components"; import { KanbanBoard, KanbanBoardContainer } from "./kanban/board"; diff --git a/examples/app-crm-minimal/src/routes/tasks/list/kanban/board.tsx b/examples/app-crm-minimal/src/routes/tasks/list/kanban/board.tsx index 501425da2aae..a1ebab7d667b 100644 --- a/examples/app-crm-minimal/src/routes/tasks/list/kanban/board.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/list/kanban/board.tsx @@ -2,7 +2,7 @@ import React from "react"; import { DndContext, - DragEndEvent, + type DragEndEvent, MouseSensor, TouchSensor, useSensor, diff --git a/examples/app-crm-minimal/src/routes/tasks/list/kanban/card.tsx b/examples/app-crm-minimal/src/routes/tasks/list/kanban/card.tsx index 4973cb277b11..f080afa5c17f 100644 --- a/examples/app-crm-minimal/src/routes/tasks/list/kanban/card.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/list/kanban/card.tsx @@ -23,7 +23,7 @@ import { import dayjs from "dayjs"; import { CustomAvatar, Text, TextIcon } from "@/components"; -import { User } from "@/graphql/schema.types"; +import type { User } from "@/graphql/schema.types"; import { getDateColor } from "@/utilities"; type ProjectCardProps = { diff --git a/examples/app-crm-minimal/src/routes/tasks/list/kanban/column.tsx b/examples/app-crm-minimal/src/routes/tasks/list/kanban/column.tsx index bf835078d659..d66a5ee9abf5 100644 --- a/examples/app-crm-minimal/src/routes/tasks/list/kanban/column.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/list/kanban/column.tsx @@ -1,7 +1,7 @@ import React from "react"; import { MoreOutlined, PlusOutlined } from "@ant-design/icons"; -import { useDroppable, UseDroppableArguments } from "@dnd-kit/core"; +import { useDroppable, type UseDroppableArguments } from "@dnd-kit/core"; import { Badge, Button, Skeleton, Space } from "antd"; import { Text } from "@/components"; diff --git a/examples/app-crm-minimal/src/routes/tasks/list/kanban/item.tsx b/examples/app-crm-minimal/src/routes/tasks/list/kanban/item.tsx index dd5eef786613..de148c271464 100644 --- a/examples/app-crm-minimal/src/routes/tasks/list/kanban/item.tsx +++ b/examples/app-crm-minimal/src/routes/tasks/list/kanban/item.tsx @@ -3,7 +3,7 @@ import React from "react"; import { DragOverlay, useDraggable, - UseDraggableArguments, + type UseDraggableArguments, } from "@dnd-kit/core"; interface Props { diff --git a/examples/app-crm/src/components/calendar/upcoming-events/event/index.tsx b/examples/app-crm/src/components/calendar/upcoming-events/event/index.tsx index a9e5ba4fc13f..c38a21edb737 100644 --- a/examples/app-crm/src/components/calendar/upcoming-events/event/index.tsx +++ b/examples/app-crm/src/components/calendar/upcoming-events/event/index.tsx @@ -1,12 +1,12 @@ import React from "react"; import { useNavigation } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { Badge } from "antd"; import dayjs from "dayjs"; -import { UpcomingEventsQuery } from "@/graphql/types"; +import type { UpcomingEventsQuery } from "@/graphql/types"; import { Text } from "../../../text"; import styles from "../index.module.css"; diff --git a/examples/app-crm/src/components/calendar/upcoming-events/index.tsx b/examples/app-crm/src/components/calendar/upcoming-events/index.tsx index d73f68556254..6d148ba6bb19 100644 --- a/examples/app-crm/src/components/calendar/upcoming-events/index.tsx +++ b/examples/app-crm/src/components/calendar/upcoming-events/index.tsx @@ -1,14 +1,14 @@ import React from "react"; import { useList, useNavigation } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { CalendarOutlined, RightCircleOutlined } from "@ant-design/icons"; import type { CardProps } from "antd"; import { Button, Card, Skeleton as AntdSkeleton } from "antd"; import dayjs from "dayjs"; -import { UpcomingEventsQuery } from "@/graphql/types"; +import type { UpcomingEventsQuery } from "@/graphql/types"; import { Text } from "../../text"; import { CalendarUpcomingEvent } from "./event"; diff --git a/examples/app-crm/src/components/custom-avatar.tsx b/examples/app-crm/src/components/custom-avatar.tsx index 14b20bc79fbe..3ebbcb4cacd7 100644 --- a/examples/app-crm/src/components/custom-avatar.tsx +++ b/examples/app-crm/src/components/custom-avatar.tsx @@ -1,4 +1,4 @@ -import { FC, memo } from "react"; +import { type FC, memo } from "react"; import type { AvatarProps } from "antd"; import { Avatar as AntdAvatar } from "antd"; diff --git a/examples/app-crm/src/components/layout/account-settings/index.tsx b/examples/app-crm/src/components/layout/account-settings/index.tsx index 8e0c900f01ff..803f95ef204f 100644 --- a/examples/app-crm/src/components/layout/account-settings/index.tsx +++ b/examples/app-crm/src/components/layout/account-settings/index.tsx @@ -1,7 +1,7 @@ import { useState } from "react"; -import { HttpError, useOne, useUpdate } from "@refinedev/core"; -import { GetFields, GetVariables } from "@refinedev/nestjs-query"; +import { type HttpError, useOne, useUpdate } from "@refinedev/core"; +import type { GetFields, GetVariables } from "@refinedev/nestjs-query"; import { CloseOutlined, @@ -25,7 +25,7 @@ import { } from "antd"; import { TimezoneEnum } from "@/enums"; -import { +import type { AccountSettingsGetUserQuery, AccountSettingsUpdateUserMutation, AccountSettingsUpdateUserMutationVariables, diff --git a/examples/app-crm/src/components/layout/algolia-search/index.tsx b/examples/app-crm/src/components/layout/algolia-search/index.tsx index c1db0d1f6a7c..8323bb30cf8f 100644 --- a/examples/app-crm/src/components/layout/algolia-search/index.tsx +++ b/examples/app-crm/src/components/layout/algolia-search/index.tsx @@ -1,4 +1,4 @@ -import { FC, useState } from "react"; +import { type FC, useState } from "react"; import { useHits, useSearchBox } from "react-instantsearch"; import { Link } from "react-router-dom"; @@ -8,7 +8,7 @@ import { SearchOutlined } from "@ant-design/icons"; import { Input, List, Popover, Tag, Typography } from "antd"; import cn from "classnames"; -import { +import type { Company, Contact, Deal, diff --git a/examples/app-crm/src/components/layout/algolia-search/wrapper.tsx b/examples/app-crm/src/components/layout/algolia-search/wrapper.tsx index 8cc789153fb2..0931177009e4 100644 --- a/examples/app-crm/src/components/layout/algolia-search/wrapper.tsx +++ b/examples/app-crm/src/components/layout/algolia-search/wrapper.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { InstantSearch } from "react-instantsearch"; import { indexName, searchClient } from "@/providers"; diff --git a/examples/app-crm/src/components/layout/gh-banner/index.tsx b/examples/app-crm/src/components/layout/gh-banner/index.tsx index 3c7f068af2e1..4495a2cd2220 100644 --- a/examples/app-crm/src/components/layout/gh-banner/index.tsx +++ b/examples/app-crm/src/components/layout/gh-banner/index.tsx @@ -1,4 +1,4 @@ -import React, { SVGProps, useEffect } from "react"; +import React, { type SVGProps, useEffect } from "react"; import { CSSRules } from "./styles"; diff --git a/examples/app-crm/src/components/layout/notification-message.tsx b/examples/app-crm/src/components/layout/notification-message.tsx index 0cc709305bd0..f0c14f9a83ff 100644 --- a/examples/app-crm/src/components/layout/notification-message.tsx +++ b/examples/app-crm/src/components/layout/notification-message.tsx @@ -1,6 +1,9 @@ -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; -import { NotificationsDealsQuery, NotificationsQuery } from "@/graphql/types"; +import type { + NotificationsDealsQuery, + NotificationsQuery, +} from "@/graphql/types"; import { Text } from "../text"; diff --git a/examples/app-crm/src/components/layout/notifications.tsx b/examples/app-crm/src/components/layout/notifications.tsx index 68af13ec45f2..409399d56982 100644 --- a/examples/app-crm/src/components/layout/notifications.tsx +++ b/examples/app-crm/src/components/layout/notifications.tsx @@ -1,13 +1,16 @@ import React, { useState } from "react"; import { useList, useMany } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { BellOutlined } from "@ant-design/icons"; import { Badge, Button, Divider, Popover, Space, Spin } from "antd"; import dayjs from "dayjs"; -import { NotificationsDealsQuery, NotificationsQuery } from "@/graphql/types"; +import type { + NotificationsDealsQuery, + NotificationsQuery, +} from "@/graphql/types"; import { CustomAvatar } from "../custom-avatar"; import { Text } from "../text"; diff --git a/examples/app-crm/src/components/layout/sider.tsx b/examples/app-crm/src/components/layout/sider.tsx index d0c654f51937..49ab502af1e0 100644 --- a/examples/app-crm/src/components/layout/sider.tsx +++ b/examples/app-crm/src/components/layout/sider.tsx @@ -1,9 +1,9 @@ -import React, { CSSProperties } from "react"; +import React, { type CSSProperties } from "react"; import { useThemedLayoutContext } from "@refinedev/antd"; import { CanAccess, - ITreeMenu, + type ITreeMenu, pickNotDeprecated, useLink, useMenu, diff --git a/examples/app-crm/src/components/list-title-button.tsx b/examples/app-crm/src/components/list-title-button.tsx index dfdd0c6c20d3..9bda5648564f 100644 --- a/examples/app-crm/src/components/list-title-button.tsx +++ b/examples/app-crm/src/components/list-title-button.tsx @@ -1,4 +1,4 @@ -import { FC } from "react"; +import type { FC } from "react"; import { useLocation } from "react-router-dom"; import { useGo, useNavigation } from "@refinedev/core"; diff --git a/examples/app-crm/src/components/pagination-total.tsx b/examples/app-crm/src/components/pagination-total.tsx index 5cd020681dc4..b5f48f05fc53 100644 --- a/examples/app-crm/src/components/pagination-total.tsx +++ b/examples/app-crm/src/components/pagination-total.tsx @@ -1,4 +1,4 @@ -import { FC } from "react"; +import type { FC } from "react"; type PaginationTotalProps = { total: number; diff --git a/examples/app-crm/src/components/participants/index.tsx b/examples/app-crm/src/components/participants/index.tsx index 1f79b0c9ff9e..1efc935ca737 100644 --- a/examples/app-crm/src/components/participants/index.tsx +++ b/examples/app-crm/src/components/participants/index.tsx @@ -1,11 +1,11 @@ -import { FC } from "react"; +import type { FC } from "react"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { PlusCircleOutlined } from "@ant-design/icons"; import { Space, Tooltip } from "antd"; -import { UsersSelectQuery } from "@/graphql/types"; +import type { UsersSelectQuery } from "@/graphql/types"; import { CustomAvatar } from "../custom-avatar"; diff --git a/examples/app-crm/src/components/select-option-with-avatar.tsx b/examples/app-crm/src/components/select-option-with-avatar.tsx index 61e56cb00109..1d66d8f54bce 100644 --- a/examples/app-crm/src/components/select-option-with-avatar.tsx +++ b/examples/app-crm/src/components/select-option-with-avatar.tsx @@ -1,4 +1,4 @@ -import { FC } from "react"; +import type { FC } from "react"; import { Space } from "antd"; diff --git a/examples/app-crm/src/components/tags/contact-status-tag.tsx b/examples/app-crm/src/components/tags/contact-status-tag.tsx index 6db6dacf08f8..8a643f83f8b1 100644 --- a/examples/app-crm/src/components/tags/contact-status-tag.tsx +++ b/examples/app-crm/src/components/tags/contact-status-tag.tsx @@ -6,9 +6,9 @@ import { PlayCircleFilled, PlayCircleOutlined, } from "@ant-design/icons"; -import { Tag, TagProps } from "antd"; +import { Tag, type TagProps } from "antd"; -import { ContactStatus } from "@/graphql/schema.types"; +import type { ContactStatus } from "@/graphql/schema.types"; export const ContactStatusTag: React.FC<{ status: ContactStatus }> = ({ status, diff --git a/examples/app-crm/src/components/tags/quote-status-tag.tsx b/examples/app-crm/src/components/tags/quote-status-tag.tsx index dd6b2ef4eed6..2b7ddf129f9e 100644 --- a/examples/app-crm/src/components/tags/quote-status-tag.tsx +++ b/examples/app-crm/src/components/tags/quote-status-tag.tsx @@ -1,4 +1,4 @@ -import { FC, ReactElement } from "react"; +import type { FC, ReactElement } from "react"; import { CheckCircleOutlined, @@ -7,7 +7,7 @@ import { } from "@ant-design/icons"; import { Tag } from "antd"; -import { QuoteStatus } from "@/graphql/schema.types"; +import type { QuoteStatus } from "@/graphql/schema.types"; const variant: Record = { DRAFT: { diff --git a/examples/app-crm/src/components/tags/user-tag.tsx b/examples/app-crm/src/components/tags/user-tag.tsx index 1b25aea6066d..4f42af196975 100644 --- a/examples/app-crm/src/components/tags/user-tag.tsx +++ b/examples/app-crm/src/components/tags/user-tag.tsx @@ -1,10 +1,10 @@ -import { FC } from "react"; +import type { FC } from "react"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { Space, Tag } from "antd"; -import { UsersSelectQuery } from "@/graphql/types"; +import type { UsersSelectQuery } from "@/graphql/types"; import { CustomAvatar } from "../custom-avatar"; diff --git a/examples/app-crm/src/components/text.tsx b/examples/app-crm/src/components/text.tsx index 17cd73424535..b6e7fe13122b 100644 --- a/examples/app-crm/src/components/text.tsx +++ b/examples/app-crm/src/components/text.tsx @@ -1,4 +1,4 @@ -import { FC } from "react"; +import type { FC } from "react"; import { ConfigProvider, Typography } from "antd"; diff --git a/examples/app-crm/src/hooks/useCompaniesSelect.tsx b/examples/app-crm/src/hooks/useCompaniesSelect.tsx index e7c2c64597d5..4b9765e1e4bd 100644 --- a/examples/app-crm/src/hooks/useCompaniesSelect.tsx +++ b/examples/app-crm/src/hooks/useCompaniesSelect.tsx @@ -1,9 +1,9 @@ import { useSelect } from "@refinedev/antd"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import gql from "graphql-tag"; -import { CompaniesSelectQuery } from "@/graphql/types"; +import type { CompaniesSelectQuery } from "@/graphql/types"; const COMPANIES_SELECT_QUERY = gql` query CompaniesSelect( diff --git a/examples/app-crm/src/hooks/useContactsSelect.tsx b/examples/app-crm/src/hooks/useContactsSelect.tsx index a5395a968d2f..1beddcb045c2 100644 --- a/examples/app-crm/src/hooks/useContactsSelect.tsx +++ b/examples/app-crm/src/hooks/useContactsSelect.tsx @@ -1,10 +1,10 @@ import { useSelect } from "@refinedev/antd"; -import { CrudFilters } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { CrudFilters } from "@refinedev/core"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import gql from "graphql-tag"; -import { ContactsSelectQuery } from "@/graphql/types"; +import type { ContactsSelectQuery } from "@/graphql/types"; const CONTACTS_SELECT_QUERY = gql` query ContactsSelect( diff --git a/examples/app-crm/src/hooks/useDealStagesSelect.tsx b/examples/app-crm/src/hooks/useDealStagesSelect.tsx index 069d371dcceb..858f02c86d3d 100644 --- a/examples/app-crm/src/hooks/useDealStagesSelect.tsx +++ b/examples/app-crm/src/hooks/useDealStagesSelect.tsx @@ -1,9 +1,9 @@ import { useSelect } from "@refinedev/antd"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import gql from "graphql-tag"; -import { DealStagesSelectQuery } from "@/graphql/types"; +import type { DealStagesSelectQuery } from "@/graphql/types"; const DEAL_STAGES_SELECT_QUERY = gql` query DealStagesSelect( diff --git a/examples/app-crm/src/hooks/useUsersSelect.tsx b/examples/app-crm/src/hooks/useUsersSelect.tsx index 065192735df6..89af62a06775 100644 --- a/examples/app-crm/src/hooks/useUsersSelect.tsx +++ b/examples/app-crm/src/hooks/useUsersSelect.tsx @@ -1,9 +1,9 @@ import { useSelect } from "@refinedev/antd"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import gql from "graphql-tag"; -import { UsersSelectQuery } from "@/graphql/types"; +import type { UsersSelectQuery } from "@/graphql/types"; const USERS_SELECT_QUERY = gql` query UsersSelect( diff --git a/examples/app-crm/src/providers/auth.ts b/examples/app-crm/src/providers/auth.ts index 9168df3cd01f..28a136547a7e 100644 --- a/examples/app-crm/src/providers/auth.ts +++ b/examples/app-crm/src/providers/auth.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import type { User } from "@/graphql/schema.types"; import { disableAutoLogin, enableAutoLogin } from "@/hooks"; diff --git a/examples/app-crm/src/providers/data/axios.ts b/examples/app-crm/src/providers/data/axios.ts index 47af69f93c2d..18fc5765e0fe 100644 --- a/examples/app-crm/src/providers/data/axios.ts +++ b/examples/app-crm/src/providers/data/axios.ts @@ -1,4 +1,4 @@ -import axios, { AxiosRequestConfig, AxiosResponse } from "axios"; +import axios, { type AxiosRequestConfig, type AxiosResponse } from "axios"; import { refreshTokens, shouldRefreshToken } from "./refresh-token"; diff --git a/examples/app-crm/src/providers/data/refresh-token.ts b/examples/app-crm/src/providers/data/refresh-token.ts index cfcd86b71067..318df7bd23b8 100644 --- a/examples/app-crm/src/providers/data/refresh-token.ts +++ b/examples/app-crm/src/providers/data/refresh-token.ts @@ -1,8 +1,8 @@ import { request } from "@refinedev/nestjs-query"; -import { AxiosResponse } from "axios"; +import type { AxiosResponse } from "axios"; -import { RefreshTokenMutation } from "@/graphql/types"; +import type { RefreshTokenMutation } from "@/graphql/types"; import { REFRESH_TOKEN_MUTATION } from "./queries"; diff --git a/examples/app-crm/src/routes/administration/audit-log.tsx b/examples/app-crm/src/routes/administration/audit-log.tsx index b0fe6ca134ab..124c485c8820 100644 --- a/examples/app-crm/src/routes/administration/audit-log.tsx +++ b/examples/app-crm/src/routes/administration/audit-log.tsx @@ -7,13 +7,21 @@ import { useTable, } from "@refinedev/antd"; import { getDefaultFilter } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { SearchOutlined } from "@ant-design/icons"; -import { DatePicker, Input, Radio, Space, Table, Tag, TagProps } from "antd"; +import { + DatePicker, + Input, + Radio, + Space, + Table, + Tag, + type TagProps, +} from "antd"; import { CustomAvatar, PaginationTotal, Text } from "@/components"; -import { AdministrationAuditLogsQuery } from "@/graphql/types"; +import type { AdministrationAuditLogsQuery } from "@/graphql/types"; import { ActionCell } from "./components"; import { ADMINISTRATION_AUDIT_LOGS_QUERY } from "./queries"; diff --git a/examples/app-crm/src/routes/administration/components/action-cell.tsx b/examples/app-crm/src/routes/administration/components/action-cell.tsx index 8f619c32d6bf..c02188c85d06 100644 --- a/examples/app-crm/src/routes/administration/components/action-cell.tsx +++ b/examples/app-crm/src/routes/administration/components/action-cell.tsx @@ -5,7 +5,7 @@ import { Button, Modal, Table } from "antd"; import type { ColumnsType } from "antd/es/table"; import { Text } from "@/components"; -import { Audit } from ".."; +import type { Audit } from ".."; export const ActionCell = ({ record }: { record: Audit }) => { const [opened, setOpened] = useState(false); diff --git a/examples/app-crm/src/routes/administration/components/role-tag/index.tsx b/examples/app-crm/src/routes/administration/components/role-tag/index.tsx index 9ca97e92ab1a..da7d393c15a2 100644 --- a/examples/app-crm/src/routes/administration/components/role-tag/index.tsx +++ b/examples/app-crm/src/routes/administration/components/role-tag/index.tsx @@ -1,9 +1,9 @@ -import React, { FC } from "react"; +import React, { type FC } from "react"; import { CrownOutlined, StarOutlined, UserOutlined } from "@ant-design/icons"; import { Tag, type TagProps } from "antd"; -import { User } from "@/graphql/schema.types"; +import type { User } from "@/graphql/schema.types"; type Props = { role: User["role"]; diff --git a/examples/app-crm/src/routes/administration/settings.tsx b/examples/app-crm/src/routes/administration/settings.tsx index 77abea5da298..e1d285ae9aea 100644 --- a/examples/app-crm/src/routes/administration/settings.tsx +++ b/examples/app-crm/src/routes/administration/settings.tsx @@ -1,6 +1,6 @@ import { FilterDropdown, useTable } from "@refinedev/antd"; import { getDefaultFilter } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { EnvironmentOutlined, @@ -15,7 +15,7 @@ import { Card, Col, Input, Row, Select, Space, Table } from "antd"; import cn from "classnames"; import { CustomAvatar, Logo, Text } from "@/components"; -import { AdministrationUsersQuery } from "@/graphql/types"; +import type { AdministrationUsersQuery } from "@/graphql/types"; import { RoleTag } from "./components"; import { ADMINISTRATION_USERS_QUERY } from "./queries"; diff --git a/examples/app-crm/src/routes/calendar/components/calendar/full-calendar.tsx b/examples/app-crm/src/routes/calendar/components/calendar/full-calendar.tsx index f282381e7578..1e1bff80703b 100644 --- a/examples/app-crm/src/routes/calendar/components/calendar/full-calendar.tsx +++ b/examples/app-crm/src/routes/calendar/components/calendar/full-calendar.tsx @@ -1,11 +1,11 @@ -import { Dispatch, FC, RefObject, SetStateAction } from "react"; +import type { Dispatch, FC, RefObject, SetStateAction } from "react"; import dayGridPlugin from "@fullcalendar/daygrid"; import listPlugin from "@fullcalendar/list"; import FullCalendar from "@fullcalendar/react"; import timeGridPlugin from "@fullcalendar/timegrid"; -import { Event } from "@/graphql/schema.types"; +import type { Event } from "@/graphql/schema.types"; type FullCalendarWrapperProps = { calendarRef: RefObject; diff --git a/examples/app-crm/src/routes/calendar/components/calendar/index.tsx b/examples/app-crm/src/routes/calendar/components/calendar/index.tsx index c11a48eec841..3b0febbd081d 100644 --- a/examples/app-crm/src/routes/calendar/components/calendar/index.tsx +++ b/examples/app-crm/src/routes/calendar/components/calendar/index.tsx @@ -1,15 +1,15 @@ import React, { lazy, Suspense, useEffect, useRef, useState } from "react"; import { useList } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { LeftOutlined, RightOutlined } from "@ant-design/icons"; -import FullCalendar from "@fullcalendar/react"; +import type FullCalendar from "@fullcalendar/react"; import { Button, Card, Grid, Radio } from "antd"; import dayjs from "dayjs"; import { Text } from "@/components"; -import { CalendarEventsQuery } from "@/graphql/types"; +import type { CalendarEventsQuery } from "@/graphql/types"; import styles from "./index.module.css"; import { CALENDAR_EVENTS_QUERY } from "./queries"; diff --git a/examples/app-crm/src/routes/calendar/components/categories/index.tsx b/examples/app-crm/src/routes/calendar/components/categories/index.tsx index 69801d9f221e..26db55de2f4d 100644 --- a/examples/app-crm/src/routes/calendar/components/categories/index.tsx +++ b/examples/app-crm/src/routes/calendar/components/categories/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import { useModal } from "@refinedev/antd"; import { useList } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { FlagOutlined, SettingOutlined } from "@ant-design/icons"; import { Button, Card, Checkbox, Skeleton, theme } from "antd"; @@ -10,7 +10,7 @@ import type { CheckboxChangeEvent } from "antd/es/checkbox"; import { Text } from "@/components"; import { EVENT_CATEGORIES_QUERY } from "@/graphql/queries"; -import { EventCategoriesQuery } from "@/graphql/types"; +import type { EventCategoriesQuery } from "@/graphql/types"; import styles from "./index.module.css"; import { CalendarManageCategories } from "./manage-categories"; diff --git a/examples/app-crm/src/routes/calendar/components/categories/manage-categories/index.tsx b/examples/app-crm/src/routes/calendar/components/categories/manage-categories/index.tsx index 7f7badedad7f..0c11a4fa97fc 100644 --- a/examples/app-crm/src/routes/calendar/components/categories/manage-categories/index.tsx +++ b/examples/app-crm/src/routes/calendar/components/categories/manage-categories/index.tsx @@ -1,14 +1,14 @@ import React from "react"; import { useCreateMany, useDelete, useList } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { DeleteOutlined, PlusOutlined } from "@ant-design/icons"; -import { Button, Form, Input, Modal, ModalProps, Popconfirm } from "antd"; +import { Button, Form, Input, Modal, type ModalProps, Popconfirm } from "antd"; import { Text } from "@/components"; import { EVENT_CATEGORIES_QUERY } from "@/graphql/queries"; -import { EventCategoriesQuery } from "@/graphql/types"; +import type { EventCategoriesQuery } from "@/graphql/types"; import styles from "./index.module.css"; import { CALENDAR_CREATE_EVENT_CATEGORIES_MUTATION } from "./queries"; diff --git a/examples/app-crm/src/routes/calendar/components/form/index.tsx b/examples/app-crm/src/routes/calendar/components/form/index.tsx index e969ce4adf6c..f447ebbf0926 100644 --- a/examples/app-crm/src/routes/calendar/components/form/index.tsx +++ b/examples/app-crm/src/routes/calendar/components/form/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useSelect } from "@refinedev/antd"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { Checkbox, @@ -9,8 +9,8 @@ import { ColorPicker, DatePicker, Form, - FormInstance, - FormProps, + type FormInstance, + type FormProps, Input, Row, Select, @@ -19,7 +19,7 @@ import { import dayjs from "dayjs"; import { EVENT_CATEGORIES_QUERY } from "@/graphql/queries"; -import { EventCategoriesQuery } from "@/graphql/types"; +import type { EventCategoriesQuery } from "@/graphql/types"; import { useUsersSelect } from "@/hooks/useUsersSelect"; type CalendarFormProps = { diff --git a/examples/app-crm/src/routes/calendar/create.tsx b/examples/app-crm/src/routes/calendar/create.tsx index 2a6a891eb4fb..fe0f2f66ab20 100644 --- a/examples/app-crm/src/routes/calendar/create.tsx +++ b/examples/app-crm/src/routes/calendar/create.tsx @@ -1,12 +1,12 @@ import React, { useState } from "react"; import { useForm } from "@refinedev/antd"; -import { HttpError, useNavigation } from "@refinedev/core"; +import { type HttpError, useNavigation } from "@refinedev/core"; import { Modal } from "antd"; import dayjs from "dayjs"; -import { Event, EventCreateInput } from "@/graphql/schema.types"; +import type { Event, EventCreateInput } from "@/graphql/schema.types"; import { CalendarForm } from "./components"; diff --git a/examples/app-crm/src/routes/calendar/edit.tsx b/examples/app-crm/src/routes/calendar/edit.tsx index 7311f5003433..8434c0631c5d 100644 --- a/examples/app-crm/src/routes/calendar/edit.tsx +++ b/examples/app-crm/src/routes/calendar/edit.tsx @@ -8,8 +8,8 @@ import dayjs from "dayjs"; import { CalendarForm } from "./components"; import { CALENDAR_UPDATE_EVENT_MUTATION } from "./queries"; -import { GetFields } from "@refinedev/nestjs-query"; -import { UpdateEventMutation } from "../../graphql/types"; +import type { GetFields } from "@refinedev/nestjs-query"; +import type { UpdateEventMutation } from "../../graphql/types"; type Event = GetFields; diff --git a/examples/app-crm/src/routes/calendar/show.tsx b/examples/app-crm/src/routes/calendar/show.tsx index 98b10a847692..e87227e08ec0 100644 --- a/examples/app-crm/src/routes/calendar/show.tsx +++ b/examples/app-crm/src/routes/calendar/show.tsx @@ -16,8 +16,8 @@ import dayjs from "dayjs"; import { Text, UserTag } from "@/components"; import { CALENDAR_GET_EVENT_QUERY } from "./queries"; -import { GetFields } from "@refinedev/nestjs-query"; -import { GetEventQuery } from "../../graphql/types"; +import type { GetFields } from "@refinedev/nestjs-query"; +import type { GetEventQuery } from "../../graphql/types"; type Event = GetFields; diff --git a/examples/app-crm/src/routes/companies/components/avatar-group.tsx b/examples/app-crm/src/routes/companies/components/avatar-group.tsx index 0ce263456b0d..16baf9e55c5d 100644 --- a/examples/app-crm/src/routes/companies/components/avatar-group.tsx +++ b/examples/app-crm/src/routes/companies/components/avatar-group.tsx @@ -1,6 +1,6 @@ -import { FC } from "react"; +import type { FC } from "react"; -import { AvatarProps, Space, Tooltip } from "antd"; +import { type AvatarProps, Space, Tooltip } from "antd"; import { CustomAvatar, Text } from "@/components"; diff --git a/examples/app-crm/src/routes/companies/components/card-view/card/card.tsx b/examples/app-crm/src/routes/companies/components/card-view/card/card.tsx index d5aefab09509..6a0bf230129e 100644 --- a/examples/app-crm/src/routes/companies/components/card-view/card/card.tsx +++ b/examples/app-crm/src/routes/companies/components/card-view/card/card.tsx @@ -1,13 +1,13 @@ -import { FC } from "react"; +import type { FC } from "react"; import { useDelete, useNavigation } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { DeleteOutlined, EyeOutlined, MoreOutlined } from "@ant-design/icons"; import { Button, Card, Dropdown, Space, Tooltip } from "antd"; import { CustomAvatar, Text } from "@/components"; -import { CompaniesTableQuery } from "@/graphql/types"; +import type { CompaniesTableQuery } from "@/graphql/types"; import { currencyNumber } from "@/utilities"; import { AvatarGroup } from "../../avatar-group"; diff --git a/examples/app-crm/src/routes/companies/components/card-view/index.tsx b/examples/app-crm/src/routes/companies/components/card-view/index.tsx index 50198f0a9410..42229a0bd8a7 100644 --- a/examples/app-crm/src/routes/companies/components/card-view/index.tsx +++ b/examples/app-crm/src/routes/companies/components/card-view/index.tsx @@ -1,11 +1,11 @@ -import { FC, useMemo } from "react"; +import { type FC, useMemo } from "react"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; -import { List, ListProps, TableProps } from "antd"; +import { List, type ListProps, type TableProps } from "antd"; import { PaginationTotal } from "@/components"; -import { CompaniesTableQuery } from "@/graphql/types"; +import type { CompaniesTableQuery } from "@/graphql/types"; import { CompanyCard, CompanyCardSkeleton } from "./card"; diff --git a/examples/app-crm/src/routes/companies/components/contacts-table.tsx b/examples/app-crm/src/routes/companies/components/contacts-table.tsx index 72ed292b2b9c..5f9483da700c 100644 --- a/examples/app-crm/src/routes/companies/components/contacts-table.tsx +++ b/examples/app-crm/src/routes/companies/components/contacts-table.tsx @@ -1,4 +1,4 @@ -import { FC, useMemo } from "react"; +import { type FC, useMemo } from "react"; import { useParams } from "react-router-dom"; import { @@ -7,8 +7,8 @@ import { ShowButton, useTable, } from "@refinedev/antd"; -import { HttpError, useCreateMany, useOne } from "@refinedev/core"; -import { GetFields, GetFieldsFromList } from "@refinedev/nestjs-query"; +import { type HttpError, useCreateMany, useOne } from "@refinedev/core"; +import type { GetFields, GetFieldsFromList } from "@refinedev/nestjs-query"; import { DeleteOutlined, @@ -33,8 +33,8 @@ import { } from "antd"; import { ContactStatusTag, CustomAvatar, Text } from "@/components"; -import { ContactCreateInput } from "@/graphql/schema.types"; -import { +import type { ContactCreateInput } from "@/graphql/schema.types"; +import type { CompanyContactsGetCompanyQuery, CompanyContactsTableQuery, } from "@/graphql/types"; diff --git a/examples/app-crm/src/routes/companies/components/deals-table.tsx b/examples/app-crm/src/routes/companies/components/deals-table.tsx index a1b09d8b01c1..eb064fefc905 100644 --- a/examples/app-crm/src/routes/companies/components/deals-table.tsx +++ b/examples/app-crm/src/routes/companies/components/deals-table.tsx @@ -1,9 +1,9 @@ -import { FC, useMemo } from "react"; +import { type FC, useMemo } from "react"; import { Link, useParams } from "react-router-dom"; import { EditButton, FilterDropdown, useTable } from "@refinedev/antd"; import { useNavigation, useOne } from "@refinedev/core"; -import { GetFields, GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFields, GetFieldsFromList } from "@refinedev/nestjs-query"; import { AuditOutlined, @@ -14,7 +14,7 @@ import { import { Button, Card, Input, Select, Skeleton, Space, Table, Tag } from "antd"; import { Participants, Text } from "@/components"; -import { +import type { CompanyDealsTableQuery, CompanyTotalDealsAmountQuery, } from "@/graphql/types"; diff --git a/examples/app-crm/src/routes/companies/components/info-form.tsx b/examples/app-crm/src/routes/companies/components/info-form.tsx index fe463e2f3886..4e70b95bd768 100644 --- a/examples/app-crm/src/routes/companies/components/info-form.tsx +++ b/examples/app-crm/src/routes/companies/components/info-form.tsx @@ -1,7 +1,7 @@ import { useState } from "react"; import { useShow } from "@refinedev/core"; -import { GetFields } from "@refinedev/nestjs-query"; +import type { GetFields } from "@refinedev/nestjs-query"; import { ApiOutlined, @@ -14,8 +14,12 @@ import { import { Card, Input, InputNumber, Select, Space } from "antd"; import { SingleElementForm, Text } from "@/components"; -import { BusinessType, CompanySize, Industry } from "@/graphql/schema.types"; -import { CompanyInfoQuery } from "@/graphql/types"; +import type { + BusinessType, + CompanySize, + Industry, +} from "@/graphql/schema.types"; +import type { CompanyInfoQuery } from "@/graphql/types"; import { currencyNumber } from "@/utilities"; import { COMPANY_INFO_QUERY } from "./queries"; diff --git a/examples/app-crm/src/routes/companies/components/notes.tsx b/examples/app-crm/src/routes/companies/components/notes.tsx index 4177377e224a..c3b742340f29 100644 --- a/examples/app-crm/src/routes/companies/components/notes.tsx +++ b/examples/app-crm/src/routes/companies/components/notes.tsx @@ -1,23 +1,23 @@ -import { FC } from "react"; +import type { FC } from "react"; import { useParams } from "react-router-dom"; import { DeleteButton, useForm } from "@refinedev/antd"; import { - HttpError, + type HttpError, useGetIdentity, useInvalidate, useList, useParsed, } from "@refinedev/core"; -import { GetFieldsFromList, GetVariables } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList, GetVariables } from "@refinedev/nestjs-query"; import { LoadingOutlined } from "@ant-design/icons"; import { Button, Card, Form, Input, Space, Typography } from "antd"; import dayjs from "dayjs"; import { CustomAvatar, Text, TextIcon } from "@/components"; -import { User } from "@/graphql/schema.types"; -import { +import type { User } from "@/graphql/schema.types"; +import type { CompanyCompanyNotesQuery, CompanyCreateCompanyNoteMutationVariables, } from "@/graphql/types"; diff --git a/examples/app-crm/src/routes/companies/components/quotes-table.tsx b/examples/app-crm/src/routes/companies/components/quotes-table.tsx index a93ff64253b9..482238519288 100644 --- a/examples/app-crm/src/routes/companies/components/quotes-table.tsx +++ b/examples/app-crm/src/routes/companies/components/quotes-table.tsx @@ -1,9 +1,9 @@ -import { FC, useMemo } from "react"; +import { type FC, useMemo } from "react"; import { Link, useParams } from "react-router-dom"; import { FilterDropdown, ShowButton, useTable } from "@refinedev/antd"; import { useNavigation } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { ContainerOutlined, @@ -14,8 +14,8 @@ import { import { Button, Card, Input, Select, Space, Table } from "antd"; import { Participants, QuoteStatusTag, Text } from "@/components"; -import { QuoteStatus } from "@/graphql/schema.types"; -import { CompanyQuotesTableQuery } from "@/graphql/types"; +import type { QuoteStatus } from "@/graphql/schema.types"; +import type { CompanyQuotesTableQuery } from "@/graphql/types"; import { useUsersSelect } from "@/hooks/useUsersSelect"; import { currencyNumber } from "@/utilities"; diff --git a/examples/app-crm/src/routes/companies/components/table-view.tsx b/examples/app-crm/src/routes/companies/components/table-view.tsx index 423a89c942e2..ae15e97825f1 100644 --- a/examples/app-crm/src/routes/companies/components/table-view.tsx +++ b/examples/app-crm/src/routes/companies/components/table-view.tsx @@ -1,14 +1,18 @@ -import { FC } from "react"; +import type { FC } from "react"; import { DeleteButton, EditButton, FilterDropdown } from "@refinedev/antd"; -import { CrudFilters, CrudSorting, getDefaultFilter } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import { + type CrudFilters, + type CrudSorting, + getDefaultFilter, +} from "@refinedev/core"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { EyeOutlined, SearchOutlined } from "@ant-design/icons"; -import { Input, Select, Space, Table, TableProps } from "antd"; +import { Input, Select, Space, Table, type TableProps } from "antd"; import { CustomAvatar, PaginationTotal, Text } from "@/components"; -import { CompaniesTableQuery } from "@/graphql/types"; +import type { CompaniesTableQuery } from "@/graphql/types"; import { useContactsSelect } from "@/hooks/useContactsSelect"; import { useUsersSelect } from "@/hooks/useUsersSelect"; import { currencyNumber } from "@/utilities"; diff --git a/examples/app-crm/src/routes/companies/components/title-form/title-form.tsx b/examples/app-crm/src/routes/companies/components/title-form/title-form.tsx index 4c8790063576..ac0d5eb50346 100644 --- a/examples/app-crm/src/routes/companies/components/title-form/title-form.tsx +++ b/examples/app-crm/src/routes/companies/components/title-form/title-form.tsx @@ -1,15 +1,15 @@ import { useState } from "react"; import { useForm } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; -import { GetFields, GetVariables } from "@refinedev/nestjs-query"; +import type { HttpError } from "@refinedev/core"; +import type { GetFields, GetVariables } from "@refinedev/nestjs-query"; import { EditOutlined } from "@ant-design/icons"; import { Button, Form, Select, Skeleton, Space } from "antd"; import { CustomAvatar, SelectOptionWithAvatar, Text } from "@/components"; -import { User } from "@/graphql/schema.types"; -import { +import type { User } from "@/graphql/schema.types"; +import type { CompanyTitleFormMutation, CompanyTitleFormMutationVariables, } from "@/graphql/types"; diff --git a/examples/app-crm/src/routes/companies/create.tsx b/examples/app-crm/src/routes/companies/create.tsx index 93cab07c49cc..ad92ced75ad8 100644 --- a/examples/app-crm/src/routes/companies/create.tsx +++ b/examples/app-crm/src/routes/companies/create.tsx @@ -2,13 +2,13 @@ import { useLocation, useSearchParams } from "react-router-dom"; import { useModalForm } from "@refinedev/antd"; import { - CreateResponse, - HttpError, + type CreateResponse, + type HttpError, useCreateMany, useGetToPath, useGo, } from "@refinedev/core"; -import { GetFields, GetVariables } from "@refinedev/nestjs-query"; +import type { GetFields, GetVariables } from "@refinedev/nestjs-query"; import { DeleteOutlined, @@ -30,7 +30,7 @@ import { } from "antd"; import { SelectOptionWithAvatar } from "@/components"; -import { +import type { CreateCompanyMutation, CreateCompanyMutationVariables, } from "@/graphql/types"; diff --git a/examples/app-crm/src/routes/companies/list.tsx b/examples/app-crm/src/routes/companies/list.tsx index 333ec0ca0e6a..93caf8e69635 100644 --- a/examples/app-crm/src/routes/companies/list.tsx +++ b/examples/app-crm/src/routes/companies/list.tsx @@ -1,8 +1,8 @@ -import { FC, PropsWithChildren, useState } from "react"; +import { type FC, type PropsWithChildren, useState } from "react"; import { List, useTable } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { HttpError } from "@refinedev/core"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { AppstoreOutlined, @@ -13,7 +13,7 @@ import { Form, Grid, Input, Radio, Space, Spin } from "antd"; import debounce from "lodash/debounce"; import { ListTitleButton } from "@/components"; -import { CompaniesTableQuery } from "@/graphql/types"; +import type { CompaniesTableQuery } from "@/graphql/types"; import { CompaniesCardView, CompaniesTableView } from "./components"; import { COMPANIES_TABLE_QUERY } from "./queries"; diff --git a/examples/app-crm/src/routes/contacts/components/card-view.tsx b/examples/app-crm/src/routes/contacts/components/card-view.tsx index ba2bfb781495..211932430e4e 100644 --- a/examples/app-crm/src/routes/contacts/components/card-view.tsx +++ b/examples/app-crm/src/routes/contacts/components/card-view.tsx @@ -1,12 +1,12 @@ import { useMemo } from "react"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { List, type ListProps, type TableProps } from "antd"; import { PaginationTotal } from "@/components"; -import { Contact } from "@/graphql/schema.types"; -import { ContactsListQuery } from "@/graphql/types"; +import type { Contact } from "@/graphql/schema.types"; +import type { ContactsListQuery } from "@/graphql/types"; import { ContactCard, ContactCardSkeleton } from "./card"; diff --git a/examples/app-crm/src/routes/contacts/components/card/card.tsx b/examples/app-crm/src/routes/contacts/components/card/card.tsx index 22e3fc29b678..4636a25a70d5 100644 --- a/examples/app-crm/src/routes/contacts/components/card/card.tsx +++ b/examples/app-crm/src/routes/contacts/components/card/card.tsx @@ -1,17 +1,17 @@ import React from "react"; import { useDelete, useNavigation } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { DeleteOutlined, EllipsisOutlined, EyeOutlined, } from "@ant-design/icons"; -import { Button, Dropdown, MenuProps } from "antd"; +import { Button, Dropdown, type MenuProps } from "antd"; import { ContactStatusTag, CustomAvatar, Text } from "@/components"; -import { ContactsListQuery } from "@/graphql/types"; +import type { ContactsListQuery } from "@/graphql/types"; import styles from "./index.module.css"; import { ContactCardSkeleton } from "./skeleton"; diff --git a/examples/app-crm/src/routes/contacts/components/comment/comment-form.tsx b/examples/app-crm/src/routes/contacts/components/comment/comment-form.tsx index 9ecd44ffaf19..603293e81f59 100644 --- a/examples/app-crm/src/routes/contacts/components/comment/comment-form.tsx +++ b/examples/app-crm/src/routes/contacts/components/comment/comment-form.tsx @@ -1,13 +1,13 @@ import { useForm } from "@refinedev/antd"; -import { HttpError, useGetIdentity, useParsed } from "@refinedev/core"; -import { GetFields, GetVariables } from "@refinedev/nestjs-query"; +import { type HttpError, useGetIdentity, useParsed } from "@refinedev/core"; +import type { GetFields, GetVariables } from "@refinedev/nestjs-query"; import { LoadingOutlined } from "@ant-design/icons"; import { Form, Input } from "antd"; import { CustomAvatar } from "@/components"; -import { User } from "@/graphql/schema.types"; -import { +import type { User } from "@/graphql/schema.types"; +import type { ContactsCreateContactNoteMutation, ContactsCreateContactNoteMutationVariables, } from "@/graphql/types"; diff --git a/examples/app-crm/src/routes/contacts/components/comment/comment-list.tsx b/examples/app-crm/src/routes/contacts/components/comment/comment-list.tsx index 33b4c5e3b8c9..899c11a3f748 100644 --- a/examples/app-crm/src/routes/contacts/components/comment/comment-list.tsx +++ b/examples/app-crm/src/routes/contacts/components/comment/comment-list.tsx @@ -1,19 +1,19 @@ import { DeleteButton, useForm } from "@refinedev/antd"; import { - HttpError, + type HttpError, useGetIdentity, useInvalidate, useList, useParsed, } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { Button, Form, Input, Space, Typography } from "antd"; import dayjs from "dayjs"; import { CustomAvatar, Text } from "@/components"; -import { User } from "@/graphql/schema.types"; -import { ContactsContactNotesListQuery } from "@/graphql/types"; +import type { User } from "@/graphql/schema.types"; +import type { ContactsContactNotesListQuery } from "@/graphql/types"; import { CONTACTS_CONTACT_NOTES_LIST_QUERY, diff --git a/examples/app-crm/src/routes/contacts/components/status/index.tsx b/examples/app-crm/src/routes/contacts/components/status/index.tsx index 3c6fb9b09123..33f2b530732f 100644 --- a/examples/app-crm/src/routes/contacts/components/status/index.tsx +++ b/examples/app-crm/src/routes/contacts/components/status/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useUpdate } from "@refinedev/core"; -import { GetFields } from "@refinedev/nestjs-query"; +import type { GetFields } from "@refinedev/nestjs-query"; import { CheckCircleFilled, @@ -14,8 +14,8 @@ import { Dropdown } from "antd"; import { Text } from "@/components"; import { ContactStageEnum, ContactStatusEnum } from "@/enums"; -import { ContactStatus as ContactStatusType } from "@/graphql/schema.types"; -import { ContactShowQuery } from "@/graphql/types"; +import type { ContactStatus as ContactStatusType } from "@/graphql/schema.types"; +import type { ContactShowQuery } from "@/graphql/types"; import styles from "./index.module.css"; diff --git a/examples/app-crm/src/routes/contacts/components/table-view.tsx b/examples/app-crm/src/routes/contacts/components/table-view.tsx index 3114476c0ef9..b81c73669513 100644 --- a/examples/app-crm/src/routes/contacts/components/table-view.tsx +++ b/examples/app-crm/src/routes/contacts/components/table-view.tsx @@ -4,8 +4,12 @@ import { getDefaultSortOrder, ShowButton, } from "@refinedev/antd"; -import { CrudFilters, CrudSorting, getDefaultFilter } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import { + type CrudFilters, + type CrudSorting, + getDefaultFilter, +} from "@refinedev/core"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { PhoneOutlined } from "@ant-design/icons"; import { Button, Input, Select, Space, Table, type TableProps } from "antd"; @@ -17,7 +21,7 @@ import { Text, } from "@/components"; import { ContactStatusEnum } from "@/enums"; -import { ContactsListQuery } from "@/graphql/types"; +import type { ContactsListQuery } from "@/graphql/types"; import { useCompaniesSelect } from "@/hooks/useCompaniesSelect"; type Contact = GetFieldsFromList; diff --git a/examples/app-crm/src/routes/contacts/create.tsx b/examples/app-crm/src/routes/contacts/create.tsx index 7c8037f51015..b88bf937d795 100644 --- a/examples/app-crm/src/routes/contacts/create.tsx +++ b/examples/app-crm/src/routes/contacts/create.tsx @@ -1,4 +1,4 @@ -import React, { PropsWithChildren, useEffect } from "react"; +import React, { type PropsWithChildren, useEffect } from "react"; import { useLocation, useSearchParams } from "react-router-dom"; import { useForm } from "@refinedev/antd"; @@ -8,7 +8,7 @@ import { PlusCircleOutlined } from "@ant-design/icons"; import { Button, Form, Input, Modal, Select } from "antd"; import { SelectOptionWithAvatar } from "@/components"; -import { User } from "@/graphql/schema.types"; +import type { User } from "@/graphql/schema.types"; import { useCompaniesSelect } from "@/hooks/useCompaniesSelect"; export const ContactCreatePage: React.FC = ({ diff --git a/examples/app-crm/src/routes/contacts/list.tsx b/examples/app-crm/src/routes/contacts/list.tsx index 8b4beceb668e..73d40ff99736 100644 --- a/examples/app-crm/src/routes/contacts/list.tsx +++ b/examples/app-crm/src/routes/contacts/list.tsx @@ -1,8 +1,8 @@ import React, { useState } from "react"; import { List, useTable } from "@refinedev/antd"; -import { HttpError, getDefaultFilter } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import { type HttpError, getDefaultFilter } from "@refinedev/core"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { AppstoreOutlined, @@ -13,7 +13,7 @@ import { Form, Grid, Input, Radio, Space, Spin } from "antd"; import debounce from "lodash/debounce"; import { ListTitleButton } from "@/components"; -import { ContactsListQuery } from "@/graphql/types"; +import type { ContactsListQuery } from "@/graphql/types"; import { CardView, TableView } from "./components"; import { CONTACTS_LIST_QUERY } from "./queries"; diff --git a/examples/app-crm/src/routes/contacts/show/index.tsx b/examples/app-crm/src/routes/contacts/show/index.tsx index b1daa7f74a40..0f229c47c8b1 100644 --- a/examples/app-crm/src/routes/contacts/show/index.tsx +++ b/examples/app-crm/src/routes/contacts/show/index.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { useDelete, useNavigation, useShow, useUpdate } from "@refinedev/core"; -import { GetFields } from "@refinedev/nestjs-query"; +import type { GetFields } from "@refinedev/nestjs-query"; import { CloseOutlined, @@ -36,7 +36,7 @@ import { } from "@/components"; import { TimezoneEnum } from "@/enums"; import type { Contact } from "@/graphql/schema.types"; -import { ContactShowQuery } from "@/graphql/types"; +import type { ContactShowQuery } from "@/graphql/types"; import { useCompaniesSelect } from "@/hooks/useCompaniesSelect"; import { useUsersSelect } from "@/hooks/useUsersSelect"; diff --git a/examples/app-crm/src/routes/dashboard/components/companies-map/map.tsx b/examples/app-crm/src/routes/dashboard/components/companies-map/map.tsx index f2c4671d0eca..a3696966ac26 100644 --- a/examples/app-crm/src/routes/dashboard/components/companies-map/map.tsx +++ b/examples/app-crm/src/routes/dashboard/components/companies-map/map.tsx @@ -1,7 +1,7 @@ import { MapContainer, Marker, TileLayer } from "react-leaflet"; import MarkerClusterGroup from "react-leaflet-cluster"; -import { divIcon, LatLngExpression, point } from "leaflet"; +import { divIcon, type LatLngExpression, point } from "leaflet"; import Markers from "./markers.json"; diff --git a/examples/app-crm/src/routes/dashboard/components/deals-chart.tsx b/examples/app-crm/src/routes/dashboard/components/deals-chart.tsx index 53be98050142..833f5e1fd4cb 100644 --- a/examples/app-crm/src/routes/dashboard/components/deals-chart.tsx +++ b/examples/app-crm/src/routes/dashboard/components/deals-chart.tsx @@ -1,15 +1,15 @@ import React, { lazy, Suspense, useMemo } from "react"; import { useList, useNavigation } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { DollarOutlined, RightCircleOutlined } from "@ant-design/icons"; -import { AreaConfig } from "@ant-design/plots"; +import type { AreaConfig } from "@ant-design/plots"; import { Button, Card } from "antd"; import dayjs from "dayjs"; import { Text } from "@/components"; -import { DashboardDealsChartQuery } from "@/graphql/types"; +import type { DashboardDealsChartQuery } from "@/graphql/types"; import { DASHBOARD_DEALS_CHART_QUERY } from "./queries"; diff --git a/examples/app-crm/src/routes/dashboard/components/latest-activities/index.tsx b/examples/app-crm/src/routes/dashboard/components/latest-activities/index.tsx index 44a80b82fa72..8332772c183b 100644 --- a/examples/app-crm/src/routes/dashboard/components/latest-activities/index.tsx +++ b/examples/app-crm/src/routes/dashboard/components/latest-activities/index.tsx @@ -1,14 +1,14 @@ import React from "react"; import { useList } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { UnorderedListOutlined } from "@ant-design/icons"; import { Card, Skeleton as AntdSkeleton } from "antd"; import dayjs from "dayjs"; import { CustomAvatar, Text } from "@/components"; -import { +import type { LatestActivitiesAuditsQuery, LatestActivitiesDealsQuery, } from "@/graphql/types"; diff --git a/examples/app-crm/src/routes/dashboard/components/tasks-chart.tsx b/examples/app-crm/src/routes/dashboard/components/tasks-chart.tsx index 1e912dfb4a46..b2f1a0d2ef1b 100644 --- a/examples/app-crm/src/routes/dashboard/components/tasks-chart.tsx +++ b/examples/app-crm/src/routes/dashboard/components/tasks-chart.tsx @@ -1,14 +1,14 @@ import React, { lazy, Suspense, useMemo } from "react"; import { useList, useNavigation } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { ProjectOutlined, RightCircleOutlined } from "@ant-design/icons"; -import { PieConfig } from "@ant-design/plots"; +import type { PieConfig } from "@ant-design/plots"; import { Button, Card } from "antd"; import { Text } from "@/components"; -import { DashboardTasksChartQuery } from "@/graphql/types"; +import type { DashboardTasksChartQuery } from "@/graphql/types"; import { DASHBOARD_TASKS_CHART_QUERY } from "./queries"; diff --git a/examples/app-crm/src/routes/dashboard/components/total-count-card/index.tsx b/examples/app-crm/src/routes/dashboard/components/total-count-card/index.tsx index 42752a5d636b..3ef6633ca23a 100644 --- a/examples/app-crm/src/routes/dashboard/components/total-count-card/index.tsx +++ b/examples/app-crm/src/routes/dashboard/components/total-count-card/index.tsx @@ -1,7 +1,7 @@ -import React, { FC, PropsWithChildren, Suspense } from "react"; +import React, { type FC, type PropsWithChildren, Suspense } from "react"; import { AuditOutlined, ShopOutlined, TeamOutlined } from "@ant-design/icons"; -import { AreaConfig } from "@ant-design/plots"; +import type { AreaConfig } from "@ant-design/plots"; import { Card, Skeleton } from "antd"; import { Text } from "@/components"; diff --git a/examples/app-crm/src/routes/dashboard/components/total-revenue-chart/index.tsx b/examples/app-crm/src/routes/dashboard/components/total-revenue-chart/index.tsx index 335a0629dc4a..db1ba6acd5b0 100644 --- a/examples/app-crm/src/routes/dashboard/components/total-revenue-chart/index.tsx +++ b/examples/app-crm/src/routes/dashboard/components/total-revenue-chart/index.tsx @@ -1,14 +1,14 @@ import React, { Suspense } from "react"; import { useList } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { DollarOutlined } from "@ant-design/icons"; -import { GaugeConfig } from "@ant-design/plots"; +import type { GaugeConfig } from "@ant-design/plots"; import { Card, Skeleton, Space } from "antd"; import { Text } from "@/components"; -import { DashboardTotalRevenueQuery } from "@/graphql/types"; +import type { DashboardTotalRevenueQuery } from "@/graphql/types"; import { currencyNumber } from "@/utilities"; import { DASHBOARD_TOTAL_REVENUE_QUERY } from "./queries"; diff --git a/examples/app-crm/src/routes/dashboard/index.tsx b/examples/app-crm/src/routes/dashboard/index.tsx index 02182bc317a1..4cc60dd9ea48 100644 --- a/examples/app-crm/src/routes/dashboard/index.tsx +++ b/examples/app-crm/src/routes/dashboard/index.tsx @@ -5,7 +5,7 @@ import { useCustom } from "@refinedev/core"; import { Col, Row } from "antd"; import { CalendarUpcomingEvents } from "@/components"; -import { DashboardTotalCountsQuery } from "@/graphql/types"; +import type { DashboardTotalCountsQuery } from "@/graphql/types"; import { CompaniesMap, diff --git a/examples/app-crm/src/routes/quotes/components/form-modal/index.tsx b/examples/app-crm/src/routes/quotes/components/form-modal/index.tsx index 197bab634e82..12271aff5df3 100644 --- a/examples/app-crm/src/routes/quotes/components/form-modal/index.tsx +++ b/examples/app-crm/src/routes/quotes/components/form-modal/index.tsx @@ -1,14 +1,18 @@ -import { FC } from "react"; +import type { FC } from "react"; import { useLocation, useParams, useSearchParams } from "react-router-dom"; import { useModalForm } from "@refinedev/antd"; -import { HttpError, RedirectAction, useNavigation } from "@refinedev/core"; -import { GetFields, GetVariables } from "@refinedev/nestjs-query"; +import { + type HttpError, + type RedirectAction, + useNavigation, +} from "@refinedev/core"; +import type { GetFields, GetVariables } from "@refinedev/nestjs-query"; import { PlusCircleOutlined } from "@ant-design/icons"; import { Button, Form, Input, Modal, Select, Spin } from "antd"; -import { +import type { QuotesCreateQuoteMutation, QuotesCreateQuoteMutationVariables, } from "@/graphql/types"; diff --git a/examples/app-crm/src/routes/quotes/components/pdf-export.tsx b/examples/app-crm/src/routes/quotes/components/pdf-export.tsx index e04c190165b8..ee97ed6e6aa5 100644 --- a/examples/app-crm/src/routes/quotes/components/pdf-export.tsx +++ b/examples/app-crm/src/routes/quotes/components/pdf-export.tsx @@ -2,7 +2,7 @@ import { useParams } from "react-router-dom"; import { useModal } from "@refinedev/antd"; import { useOne } from "@refinedev/core"; -import { GetFields } from "@refinedev/nestjs-query"; +import type { GetFields } from "@refinedev/nestjs-query"; import { FilePdfOutlined } from "@ant-design/icons"; import { @@ -16,7 +16,7 @@ import { } from "@react-pdf/renderer"; import { Button, Modal } from "antd"; -import { QuotesGetQuoteQuery } from "@/graphql/types"; +import type { QuotesGetQuoteQuery } from "@/graphql/types"; import { currencyNumber } from "@/utilities"; import { QUOTES_GET_QUOTE_QUERY } from "../queries"; diff --git a/examples/app-crm/src/routes/quotes/components/products-services.tsx b/examples/app-crm/src/routes/quotes/components/products-services.tsx index 632d31717f05..8c2003955c06 100644 --- a/examples/app-crm/src/routes/quotes/components/products-services.tsx +++ b/examples/app-crm/src/routes/quotes/components/products-services.tsx @@ -1,8 +1,8 @@ import { useParams } from "react-router-dom"; import { AutoSaveIndicator, useForm } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; -import { GetFields, GetVariables } from "@refinedev/nestjs-query"; +import type { HttpError } from "@refinedev/core"; +import type { GetFields, GetVariables } from "@refinedev/nestjs-query"; import { DeleteOutlined, PlusCircleOutlined } from "@ant-design/icons"; import { @@ -11,16 +11,16 @@ import { Form, Input, InputNumber, - InputNumberProps, - InputProps, + type InputNumberProps, + type InputProps, Row, Skeleton, Spin, } from "antd"; import { FullScreenLoading, Text } from "@/components"; -import { Quote, QuoteUpdateInput } from "@/graphql/schema.types"; -import { +import type { Quote, QuoteUpdateInput } from "@/graphql/schema.types"; +import type { QuotesUpdateQuoteMutation, QuotesUpdateQuoteMutationVariables, } from "@/graphql/types"; diff --git a/examples/app-crm/src/routes/quotes/components/show-description.tsx b/examples/app-crm/src/routes/quotes/components/show-description.tsx index fb9544f6eb99..e64ab70739b2 100644 --- a/examples/app-crm/src/routes/quotes/components/show-description.tsx +++ b/examples/app-crm/src/routes/quotes/components/show-description.tsx @@ -2,11 +2,11 @@ import { lazy, Suspense } from "react"; import { useParams } from "react-router-dom"; import { useForm } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { Form, Spin } from "antd"; -import { Quote, QuoteUpdateInput } from "@/graphql/schema.types"; +import type { Quote, QuoteUpdateInput } from "@/graphql/schema.types"; import { QUOTES_UPDATE_QUOTE_MUTATION } from "../queries"; diff --git a/examples/app-crm/src/routes/quotes/components/status-indicator/index.tsx b/examples/app-crm/src/routes/quotes/components/status-indicator/index.tsx index eeda116c945d..dab633479514 100644 --- a/examples/app-crm/src/routes/quotes/components/status-indicator/index.tsx +++ b/examples/app-crm/src/routes/quotes/components/status-indicator/index.tsx @@ -1,10 +1,10 @@ -import React, { FC } from "react"; +import React, { type FC } from "react"; -import { HttpError, useUpdate } from "@refinedev/core"; +import { type HttpError, useUpdate } from "@refinedev/core"; import cn from "classnames"; -import { Quote, QuoteUpdateInput } from "@/graphql/schema.types"; +import type { Quote, QuoteUpdateInput } from "@/graphql/schema.types"; import { QUOTES_UPDATE_QUOTE_MUTATION } from "../../queries"; import styles from "./index.module.css"; diff --git a/examples/app-crm/src/routes/quotes/create.tsx b/examples/app-crm/src/routes/quotes/create.tsx index dd5d2c2ceaa9..56a3428ddda8 100644 --- a/examples/app-crm/src/routes/quotes/create.tsx +++ b/examples/app-crm/src/routes/quotes/create.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from "react"; +import type { FC, PropsWithChildren } from "react"; import { QuotesFormModal } from "./components"; diff --git a/examples/app-crm/src/routes/quotes/edit.tsx b/examples/app-crm/src/routes/quotes/edit.tsx index a1c63d4ef397..d167506d1d4f 100644 --- a/examples/app-crm/src/routes/quotes/edit.tsx +++ b/examples/app-crm/src/routes/quotes/edit.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from "react"; +import type { FC, PropsWithChildren } from "react"; import { QuotesFormModal } from "./components"; diff --git a/examples/app-crm/src/routes/quotes/list.tsx b/examples/app-crm/src/routes/quotes/list.tsx index b6bb55b95913..5ba7771ff326 100644 --- a/examples/app-crm/src/routes/quotes/list.tsx +++ b/examples/app-crm/src/routes/quotes/list.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from "react"; +import type { FC, PropsWithChildren } from "react"; import { DeleteButton, @@ -9,8 +9,8 @@ import { ShowButton, useTable, } from "@refinedev/antd"; -import { getDefaultFilter, HttpError } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import { getDefaultFilter, type HttpError } from "@refinedev/core"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { SearchOutlined } from "@ant-design/icons"; import { Form, Grid, Input, Select, Space, Spin, Table } from "antd"; @@ -25,8 +25,8 @@ import { QuoteStatusTag, Text, } from "@/components"; -import { QuoteStatus } from "@/graphql/schema.types"; -import { QuotesTableQuery } from "@/graphql/types"; +import type { QuoteStatus } from "@/graphql/schema.types"; +import type { QuotesTableQuery } from "@/graphql/types"; import { useCompaniesSelect } from "@/hooks/useCompaniesSelect"; import { useUsersSelect } from "@/hooks/useUsersSelect"; import { currencyNumber } from "@/utilities"; diff --git a/examples/app-crm/src/routes/quotes/show/index.tsx b/examples/app-crm/src/routes/quotes/show/index.tsx index a55ed1245762..aa1d8ae5c845 100644 --- a/examples/app-crm/src/routes/quotes/show/index.tsx +++ b/examples/app-crm/src/routes/quotes/show/index.tsx @@ -7,7 +7,7 @@ import { EditOutlined, LeftOutlined } from "@ant-design/icons"; import { Button, Space } from "antd"; import { CustomAvatar, FullScreenLoading, Text } from "@/components"; -import { Quote } from "@/graphql/schema.types"; +import type { Quote } from "@/graphql/schema.types"; import { ProductsServices, diff --git a/examples/app-crm/src/routes/scrumboard/components/accordion.tsx b/examples/app-crm/src/routes/scrumboard/components/accordion.tsx index 277a4396c143..a050d8cebc76 100644 --- a/examples/app-crm/src/routes/scrumboard/components/accordion.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/accordion.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren, ReactNode } from "react"; +import type { PropsWithChildren, ReactNode } from "react"; import { Text } from "@/components"; diff --git a/examples/app-crm/src/routes/scrumboard/components/add-card-button.tsx b/examples/app-crm/src/routes/scrumboard/components/add-card-button.tsx index 45d716d609eb..8b3914e18def 100644 --- a/examples/app-crm/src/routes/scrumboard/components/add-card-button.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/add-card-button.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from "react"; +import type { FC, PropsWithChildren } from "react"; import { PlusSquareOutlined } from "@ant-design/icons"; import { Button } from "antd"; diff --git a/examples/app-crm/src/routes/scrumboard/components/add-stage-button.tsx b/examples/app-crm/src/routes/scrumboard/components/add-stage-button.tsx index 537ea291af30..d9d288d9b4c5 100644 --- a/examples/app-crm/src/routes/scrumboard/components/add-stage-button.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/add-stage-button.tsx @@ -1,7 +1,7 @@ -import { FC, PropsWithChildren } from "react"; +import type { FC, PropsWithChildren } from "react"; import { PlusSquareOutlined } from "@ant-design/icons"; -import { Button, ButtonProps } from "antd"; +import { Button, type ButtonProps } from "antd"; import { Text } from "@/components"; diff --git a/examples/app-crm/src/routes/scrumboard/components/board/index.tsx b/examples/app-crm/src/routes/scrumboard/components/board/index.tsx index 1d1834d6c1f1..5645d172dc7b 100644 --- a/examples/app-crm/src/routes/scrumboard/components/board/index.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/board/index.tsx @@ -1,8 +1,8 @@ -import { FC, PropsWithChildren } from "react"; +import type { FC, PropsWithChildren } from "react"; import { DndContext, - DragEndEvent, + type DragEndEvent, MouseSensor, TouchSensor, useSensor, diff --git a/examples/app-crm/src/routes/scrumboard/components/checklist-input.tsx b/examples/app-crm/src/routes/scrumboard/components/checklist-input.tsx index 5c61ed0a8709..6167d77c8e8a 100644 --- a/examples/app-crm/src/routes/scrumboard/components/checklist-input.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/checklist-input.tsx @@ -1,6 +1,6 @@ import { Checkbox, Input } from "antd"; -import { CheckListItem } from "@/graphql/schema.types"; +import type { CheckListItem } from "@/graphql/schema.types"; type Props = { value?: CheckListItem; diff --git a/examples/app-crm/src/routes/scrumboard/components/column/index.tsx b/examples/app-crm/src/routes/scrumboard/components/column/index.tsx index ddcbcb3e5121..b0d7e8ab2759 100644 --- a/examples/app-crm/src/routes/scrumboard/components/column/index.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/column/index.tsx @@ -1,8 +1,8 @@ -import { FC, PropsWithChildren, ReactNode } from "react"; +import type { FC, PropsWithChildren, ReactNode } from "react"; import { MoreOutlined, PlusOutlined } from "@ant-design/icons"; -import { useDroppable, UseDroppableArguments } from "@dnd-kit/core"; -import { Button, Dropdown, MenuProps, Skeleton } from "antd"; +import { useDroppable, type UseDroppableArguments } from "@dnd-kit/core"; +import { Button, Dropdown, type MenuProps, Skeleton } from "antd"; import cn from "classnames"; import { Text } from "@/components"; diff --git a/examples/app-crm/src/routes/scrumboard/components/comment-list.tsx b/examples/app-crm/src/routes/scrumboard/components/comment-list.tsx index 966c9f145794..9bdd832ff72f 100644 --- a/examples/app-crm/src/routes/scrumboard/components/comment-list.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/comment-list.tsx @@ -1,19 +1,19 @@ import { DeleteButton, useForm } from "@refinedev/antd"; import { - HttpError, + type HttpError, useGetIdentity, useInvalidate, useList, useParsed, } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { Button, Form, Input, Space, Typography } from "antd"; import dayjs from "dayjs"; import { CustomAvatar, Text } from "@/components"; -import { User } from "@/graphql/schema.types"; -import { KanbanTaskCommentsQuery } from "@/graphql/types"; +import type { User } from "@/graphql/schema.types"; +import type { KanbanTaskCommentsQuery } from "@/graphql/types"; import { KANBAN_TASK_COMMENTS_QUERY } from "../kanban/queries"; diff --git a/examples/app-crm/src/routes/scrumboard/components/deal-kanban-card/index.tsx b/examples/app-crm/src/routes/scrumboard/components/deal-kanban-card/index.tsx index 72be919de9de..46d14ecaf232 100644 --- a/examples/app-crm/src/routes/scrumboard/components/deal-kanban-card/index.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/deal-kanban-card/index.tsx @@ -1,4 +1,4 @@ -import { FC, memo, useMemo } from "react"; +import { type FC, memo, useMemo } from "react"; import { useDelete, useNavigation } from "@refinedev/core"; @@ -8,14 +8,14 @@ import { Card, ConfigProvider, Dropdown, - MenuProps, + type MenuProps, Skeleton, Tooltip, } from "antd"; import dayjs from "dayjs"; import { CustomAvatar, Text } from "@/components"; -import { User } from "@/graphql/schema.types"; +import type { User } from "@/graphql/schema.types"; type Props = { id: string; diff --git a/examples/app-crm/src/routes/scrumboard/components/deal-kanban-won-lost-drop/index.tsx b/examples/app-crm/src/routes/scrumboard/components/deal-kanban-won-lost-drop/index.tsx index 41a6d04e2696..0c55c26f551e 100644 --- a/examples/app-crm/src/routes/scrumboard/components/deal-kanban-won-lost-drop/index.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/deal-kanban-won-lost-drop/index.tsx @@ -1,4 +1,4 @@ -import { FC, useState } from "react"; +import { type FC, useState } from "react"; import { useDndMonitor, useDroppable } from "@dnd-kit/core"; import cn from "classnames"; diff --git a/examples/app-crm/src/routes/scrumboard/components/forms/checklist-form.tsx b/examples/app-crm/src/routes/scrumboard/components/forms/checklist-form.tsx index 5dc4897ce3db..b11547afb922 100644 --- a/examples/app-crm/src/routes/scrumboard/components/forms/checklist-form.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/forms/checklist-form.tsx @@ -1,12 +1,12 @@ import { useEffect } from "react"; import { useForm } from "@refinedev/antd"; -import { HttpError, useInvalidate } from "@refinedev/core"; +import { type HttpError, useInvalidate } from "@refinedev/core"; import { DeleteOutlined, PlusOutlined } from "@ant-design/icons"; import { Button, Form } from "antd"; -import { Task, TaskUpdateInput } from "@/graphql/schema.types"; +import type { Task, TaskUpdateInput } from "@/graphql/schema.types"; import { KANBAN_UPDATE_TASK_MUTATION } from "../../kanban/queries"; import { AccordionHeaderSkeleton, ChecklistHeader, CheckListInput } from "../"; diff --git a/examples/app-crm/src/routes/scrumboard/components/forms/comment-form.tsx b/examples/app-crm/src/routes/scrumboard/components/forms/comment-form.tsx index 90113386f4e9..3edfb7475f9e 100644 --- a/examples/app-crm/src/routes/scrumboard/components/forms/comment-form.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/forms/comment-form.tsx @@ -1,7 +1,7 @@ import { useForm } from "@refinedev/antd"; import { - BaseKey, - HttpError, + type BaseKey, + type HttpError, useGetIdentity, useInvalidate, useParsed, @@ -11,7 +11,7 @@ import { LoadingOutlined } from "@ant-design/icons"; import { Form, Input } from "antd"; import { CustomAvatar } from "@/components"; -import { TaskComment, User } from "@/graphql/schema.types"; +import type { TaskComment, User } from "@/graphql/schema.types"; type FormValues = TaskComment & { taskId: BaseKey; diff --git a/examples/app-crm/src/routes/scrumboard/components/forms/description-form.tsx b/examples/app-crm/src/routes/scrumboard/components/forms/description-form.tsx index 5a750640f703..01558ba139fe 100644 --- a/examples/app-crm/src/routes/scrumboard/components/forms/description-form.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/forms/description-form.tsx @@ -1,13 +1,13 @@ import { lazy, Suspense } from "react"; import { useForm } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { Button, Form, Space } from "antd"; import { KANBAN_UPDATE_TASK_MUTATION } from "../../kanban/queries"; -import { GetFields } from "@refinedev/nestjs-query"; -import { KanbanUpdateTaskMutation } from "../../../../graphql/types"; +import type { GetFields } from "@refinedev/nestjs-query"; +import type { KanbanUpdateTaskMutation } from "../../../../graphql/types"; const MDEditor = lazy(() => import("@uiw/react-md-editor")); diff --git a/examples/app-crm/src/routes/scrumboard/components/forms/duedate-form.tsx b/examples/app-crm/src/routes/scrumboard/components/forms/duedate-form.tsx index 472370631398..562b5d6313cb 100644 --- a/examples/app-crm/src/routes/scrumboard/components/forms/duedate-form.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/forms/duedate-form.tsx @@ -1,10 +1,10 @@ import { useForm } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { Button, DatePicker, Form, Space } from "antd"; import dayjs from "dayjs"; -import { Task } from "@/graphql/schema.types"; +import type { Task } from "@/graphql/schema.types"; import { KANBAN_UPDATE_TASK_MUTATION } from "../../kanban/queries"; diff --git a/examples/app-crm/src/routes/scrumboard/components/forms/stage-form.tsx b/examples/app-crm/src/routes/scrumboard/components/forms/stage-form.tsx index 3712965753fe..8d7833117158 100644 --- a/examples/app-crm/src/routes/scrumboard/components/forms/stage-form.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/forms/stage-form.tsx @@ -1,14 +1,17 @@ import { useEffect } from "react"; import { useForm, useSelect } from "@refinedev/antd"; -import { HttpError, useInvalidate } from "@refinedev/core"; -import { GetFields, GetFieldsFromList } from "@refinedev/nestjs-query"; +import { type HttpError, useInvalidate } from "@refinedev/core"; +import type { GetFields, GetFieldsFromList } from "@refinedev/nestjs-query"; import { FlagOutlined } from "@ant-design/icons"; import { Checkbox, Form, Select, Space } from "antd"; -import { Task } from "@/graphql/schema.types"; -import { KanbanGetTaskQuery, TaskStagesSelectQuery } from "@/graphql/types"; +import type { Task } from "@/graphql/schema.types"; +import type { + KanbanGetTaskQuery, + TaskStagesSelectQuery, +} from "@/graphql/types"; import { AccordionHeaderSkeleton } from "../accordion-header-skeleton"; import { TASK_STAGES_SELECT_QUERY } from "./queries"; diff --git a/examples/app-crm/src/routes/scrumboard/components/forms/title-form.tsx b/examples/app-crm/src/routes/scrumboard/components/forms/title-form.tsx index 5cdaf272e233..ae2aaf26eda0 100644 --- a/examples/app-crm/src/routes/scrumboard/components/forms/title-form.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/forms/title-form.tsx @@ -1,12 +1,12 @@ import { useEffect } from "react"; import { useForm } from "@refinedev/antd"; -import { HttpError, useInvalidate } from "@refinedev/core"; +import { type HttpError, useInvalidate } from "@refinedev/core"; import { Form, Skeleton } from "antd"; import { Text } from "@/components"; -import { Task, TaskUpdateInput } from "@/graphql/schema.types"; +import type { Task, TaskUpdateInput } from "@/graphql/schema.types"; import { KANBAN_UPDATE_TASK_MUTATION } from "../../kanban/queries"; diff --git a/examples/app-crm/src/routes/scrumboard/components/forms/users-form.tsx b/examples/app-crm/src/routes/scrumboard/components/forms/users-form.tsx index 39d546089f2c..0b57ea6c7e92 100644 --- a/examples/app-crm/src/routes/scrumboard/components/forms/users-form.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/forms/users-form.tsx @@ -1,13 +1,13 @@ import { useForm } from "@refinedev/antd"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { Button, Form, Select, Space } from "antd"; import { useUsersSelect } from "@/hooks/useUsersSelect"; import { KANBAN_UPDATE_TASK_MUTATION } from "../../kanban/queries"; -import { GetFields } from "@refinedev/nestjs-query"; -import { KanbanUpdateTaskMutation } from "../../../../graphql/types"; +import type { GetFields } from "@refinedev/nestjs-query"; +import type { KanbanUpdateTaskMutation } from "../../../../graphql/types"; type Task = GetFields; diff --git a/examples/app-crm/src/routes/scrumboard/components/headers/accordion-header.tsx b/examples/app-crm/src/routes/scrumboard/components/headers/accordion-header.tsx index c7e0e09fc7df..a7757264b48d 100644 --- a/examples/app-crm/src/routes/scrumboard/components/headers/accordion-header.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/headers/accordion-header.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren, ReactNode } from "react"; +import type { PropsWithChildren, ReactNode } from "react"; import { Space } from "antd"; diff --git a/examples/app-crm/src/routes/scrumboard/components/headers/checklist-header.tsx b/examples/app-crm/src/routes/scrumboard/components/headers/checklist-header.tsx index 7703d890800b..d9d191b2fcab 100644 --- a/examples/app-crm/src/routes/scrumboard/components/headers/checklist-header.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/headers/checklist-header.tsx @@ -2,7 +2,7 @@ import { CheckSquareOutlined } from "@ant-design/icons"; import { Space } from "antd"; import { Text } from "@/components"; -import { Task } from "@/graphql/schema.types"; +import type { Task } from "@/graphql/schema.types"; type Props = { checklist?: Task["checklist"]; diff --git a/examples/app-crm/src/routes/scrumboard/components/headers/description-header.tsx b/examples/app-crm/src/routes/scrumboard/components/headers/description-header.tsx index d86652ded2b0..a7150673930c 100644 --- a/examples/app-crm/src/routes/scrumboard/components/headers/description-header.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/headers/description-header.tsx @@ -2,7 +2,7 @@ import { MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { Task } from "@/graphql/schema.types"; +import type { Task } from "@/graphql/schema.types"; type Props = { description?: Task["description"]; diff --git a/examples/app-crm/src/routes/scrumboard/components/headers/duedate-header.tsx b/examples/app-crm/src/routes/scrumboard/components/headers/duedate-header.tsx index 4a3e9e763c39..cf1388fbc233 100644 --- a/examples/app-crm/src/routes/scrumboard/components/headers/duedate-header.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/headers/duedate-header.tsx @@ -2,7 +2,7 @@ import { Space, Tag, Typography } from "antd"; import dayjs from "dayjs"; import { Text } from "@/components"; -import { Task } from "@/graphql/schema.types"; +import type { Task } from "@/graphql/schema.types"; import { getDateColor } from "@/utilities"; type Props = { diff --git a/examples/app-crm/src/routes/scrumboard/components/headers/users-header.tsx b/examples/app-crm/src/routes/scrumboard/components/headers/users-header.tsx index a5bb8932d62d..280e4ab99316 100644 --- a/examples/app-crm/src/routes/scrumboard/components/headers/users-header.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/headers/users-header.tsx @@ -1,9 +1,9 @@ -import { GetFields } from "@refinedev/nestjs-query"; +import type { GetFields } from "@refinedev/nestjs-query"; import { Space, Typography } from "antd"; import { UserTag } from "@/components"; -import { KanbanGetTaskQuery } from "@/graphql/types"; +import type { KanbanGetTaskQuery } from "@/graphql/types"; type Props = { users?: GetFields["users"]; diff --git a/examples/app-crm/src/routes/scrumboard/components/item/index.tsx b/examples/app-crm/src/routes/scrumboard/components/item/index.tsx index 58214a173877..61eb7a640b94 100644 --- a/examples/app-crm/src/routes/scrumboard/components/item/index.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/item/index.tsx @@ -1,9 +1,9 @@ -import { FC, PropsWithChildren } from "react"; +import type { FC, PropsWithChildren } from "react"; import { DragOverlay, useDraggable, - UseDraggableArguments, + type UseDraggableArguments, } from "@dnd-kit/core"; interface Props { diff --git a/examples/app-crm/src/routes/scrumboard/components/project-kanban-card/index.tsx b/examples/app-crm/src/routes/scrumboard/components/project-kanban-card/index.tsx index ece0ed489722..d86f3a9be41b 100644 --- a/examples/app-crm/src/routes/scrumboard/components/project-kanban-card/index.tsx +++ b/examples/app-crm/src/routes/scrumboard/components/project-kanban-card/index.tsx @@ -25,7 +25,7 @@ import { import dayjs from "dayjs"; import { CustomAvatar, Text, TextIcon } from "@/components"; -import { User } from "@/graphql/schema.types"; +import type { User } from "@/graphql/schema.types"; import { getDateColor } from "@/utilities"; type ProjectCardProps = { diff --git a/examples/app-crm/src/routes/scrumboard/kanban/create-stage.tsx b/examples/app-crm/src/routes/scrumboard/kanban/create-stage.tsx index 81a9e741493c..f5d52d97c3f9 100644 --- a/examples/app-crm/src/routes/scrumboard/kanban/create-stage.tsx +++ b/examples/app-crm/src/routes/scrumboard/kanban/create-stage.tsx @@ -1,10 +1,10 @@ import { useModalForm } from "@refinedev/antd"; import { useInvalidate, useNavigation } from "@refinedev/core"; -import { GetFields } from "@refinedev/nestjs-query"; +import type { GetFields } from "@refinedev/nestjs-query"; import { Form, Input, Modal } from "antd"; -import { KanbanCreateStageMutation } from "@/graphql/types"; +import type { KanbanCreateStageMutation } from "@/graphql/types"; import { KANBAN_CREATE_STAGE_MUTATION } from "./queries"; diff --git a/examples/app-crm/src/routes/scrumboard/kanban/create.tsx b/examples/app-crm/src/routes/scrumboard/kanban/create.tsx index 97aaf3c45da6..aafcd67994ee 100644 --- a/examples/app-crm/src/routes/scrumboard/kanban/create.tsx +++ b/examples/app-crm/src/routes/scrumboard/kanban/create.tsx @@ -2,11 +2,11 @@ import { useSearchParams } from "react-router-dom"; import { useModalForm } from "@refinedev/antd"; import { useNavigation } from "@refinedev/core"; -import { GetFields } from "@refinedev/nestjs-query"; +import type { GetFields } from "@refinedev/nestjs-query"; import { Form, Input, Modal } from "antd"; -import { KanbanCreateTaskMutation } from "@/graphql/types"; +import type { KanbanCreateTaskMutation } from "@/graphql/types"; import { KANBAN_CREATE_TASK_MUTATION } from "./queries"; diff --git a/examples/app-crm/src/routes/scrumboard/kanban/edit-stage.tsx b/examples/app-crm/src/routes/scrumboard/kanban/edit-stage.tsx index 037b279438f6..579c50b73995 100644 --- a/examples/app-crm/src/routes/scrumboard/kanban/edit-stage.tsx +++ b/examples/app-crm/src/routes/scrumboard/kanban/edit-stage.tsx @@ -1,10 +1,10 @@ import { useModalForm } from "@refinedev/antd"; import { useInvalidate, useNavigation } from "@refinedev/core"; -import { GetFields } from "@refinedev/nestjs-query"; +import type { GetFields } from "@refinedev/nestjs-query"; import { Form, Input, Modal } from "antd"; -import { KanbanUpdateStageMutation } from "@/graphql/types"; +import type { KanbanUpdateStageMutation } from "@/graphql/types"; import { KANBAN_UPDATE_STAGE_MUTATION } from "./queries"; diff --git a/examples/app-crm/src/routes/scrumboard/kanban/edit.tsx b/examples/app-crm/src/routes/scrumboard/kanban/edit.tsx index 3143d675c098..a4335f7c8175 100644 --- a/examples/app-crm/src/routes/scrumboard/kanban/edit.tsx +++ b/examples/app-crm/src/routes/scrumboard/kanban/edit.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; import { useModal } from "@refinedev/antd"; import { useNavigation, useShow } from "@refinedev/core"; -import { GetFields } from "@refinedev/nestjs-query"; +import type { GetFields } from "@refinedev/nestjs-query"; import { AlignLeftOutlined, @@ -11,7 +11,7 @@ import { } from "@ant-design/icons"; import { Modal } from "antd"; -import { KanbanGetTaskQuery } from "@/graphql/types"; +import type { KanbanGetTaskQuery } from "@/graphql/types"; import { Accordion, diff --git a/examples/app-crm/src/routes/scrumboard/kanban/list.tsx b/examples/app-crm/src/routes/scrumboard/kanban/list.tsx index f88285bf456d..8a77bb21aad5 100644 --- a/examples/app-crm/src/routes/scrumboard/kanban/list.tsx +++ b/examples/app-crm/src/routes/scrumboard/kanban/list.tsx @@ -1,21 +1,21 @@ -import { FC, PropsWithChildren, useMemo } from "react"; +import { type FC, type PropsWithChildren, useMemo } from "react"; import { - HttpError, + type HttpError, useDelete, useList, useNavigation, useUpdate, useUpdateMany, } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { ClearOutlined, DeleteOutlined, EditOutlined } from "@ant-design/icons"; -import { DragEndEvent } from "@dnd-kit/core"; -import { MenuProps } from "antd"; +import type { DragEndEvent } from "@dnd-kit/core"; +import type { MenuProps } from "antd"; -import { TaskUpdateInput } from "@/graphql/schema.types"; -import { KanbanTasksQuery, KanbanTaskStagesQuery } from "@/graphql/types"; +import type { TaskUpdateInput } from "@/graphql/schema.types"; +import type { KanbanTasksQuery, KanbanTaskStagesQuery } from "@/graphql/types"; import { KanbanAddCardButton, diff --git a/examples/app-crm/src/routes/scrumboard/sales/create.tsx b/examples/app-crm/src/routes/scrumboard/sales/create.tsx index 1e366007d08d..7d32fb37c493 100644 --- a/examples/app-crm/src/routes/scrumboard/sales/create.tsx +++ b/examples/app-crm/src/routes/scrumboard/sales/create.tsx @@ -1,14 +1,14 @@ -import { FC, PropsWithChildren, useEffect } from "react"; +import { type FC, type PropsWithChildren, useEffect } from "react"; import { useLocation, useSearchParams } from "react-router-dom"; import { useModalForm, useSelect } from "@refinedev/antd"; import { - HttpError, + type HttpError, useCreate, useGetIdentity, useNavigation, } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { DollarOutlined, @@ -28,8 +28,8 @@ import { } from "antd"; import { SelectOptionWithAvatar } from "@/components"; -import { Contact, Deal, User } from "@/graphql/schema.types"; -import { SalesCompaniesSelectQuery } from "@/graphql/types"; +import type { Contact, Deal, User } from "@/graphql/schema.types"; +import type { SalesCompaniesSelectQuery } from "@/graphql/types"; import { useDealStagesSelect } from "@/hooks/useDealStagesSelect"; import { useUsersSelect } from "@/hooks/useUsersSelect"; diff --git a/examples/app-crm/src/routes/scrumboard/sales/edit.tsx b/examples/app-crm/src/routes/scrumboard/sales/edit.tsx index aeb8b837d365..7dede78be762 100644 --- a/examples/app-crm/src/routes/scrumboard/sales/edit.tsx +++ b/examples/app-crm/src/routes/scrumboard/sales/edit.tsx @@ -1,15 +1,15 @@ import { useEffect } from "react"; import { useModalForm, useSelect } from "@refinedev/antd"; -import { HttpError, useNavigation } from "@refinedev/core"; -import { GetFields, GetFieldsFromList } from "@refinedev/nestjs-query"; +import { type HttpError, useNavigation } from "@refinedev/core"; +import type { GetFields, GetFieldsFromList } from "@refinedev/nestjs-query"; import { DollarOutlined } from "@ant-design/icons"; import { Col, Form, Input, InputNumber, Modal, Row, Select } from "antd"; import { SelectOptionWithAvatar } from "@/components"; -import { DealUpdateInput } from "@/graphql/schema.types"; -import { +import type { DealUpdateInput } from "@/graphql/schema.types"; +import type { SalesCompaniesSelectQuery, SalesUpdateDealMutation, } from "@/graphql/types"; diff --git a/examples/app-crm/src/routes/scrumboard/sales/finalize-deal.tsx b/examples/app-crm/src/routes/scrumboard/sales/finalize-deal.tsx index 4335c95f394a..dbb9ffc5d283 100644 --- a/examples/app-crm/src/routes/scrumboard/sales/finalize-deal.tsx +++ b/examples/app-crm/src/routes/scrumboard/sales/finalize-deal.tsx @@ -1,14 +1,14 @@ import { useEffect } from "react"; import { useModalForm } from "@refinedev/antd"; -import { HttpError, useInvalidate, useNavigation } from "@refinedev/core"; +import { type HttpError, useInvalidate, useNavigation } from "@refinedev/core"; import { DatePicker, Form, Input, Modal } from "antd"; import dayjs from "dayjs"; import { SALES_FINALIZE_DEAL_MUTATION } from "./queries"; -import { GetFields } from "@refinedev/nestjs-query"; -import { SalesFinalizeDealMutation } from "../../../graphql/types"; +import type { GetFields } from "@refinedev/nestjs-query"; +import type { SalesFinalizeDealMutation } from "../../../graphql/types"; type Deal = GetFields; diff --git a/examples/app-crm/src/routes/scrumboard/sales/list.tsx b/examples/app-crm/src/routes/scrumboard/sales/list.tsx index 72e2cb47b739..e8c1c7512df5 100644 --- a/examples/app-crm/src/routes/scrumboard/sales/list.tsx +++ b/examples/app-crm/src/routes/scrumboard/sales/list.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren, useMemo } from "react"; +import { type FC, type PropsWithChildren, useMemo } from "react"; import { useDelete, @@ -7,14 +7,14 @@ import { useUpdate, useUpdateMany, } from "@refinedev/core"; -import { GetFieldsFromList } from "@refinedev/nestjs-query"; +import type { GetFieldsFromList } from "@refinedev/nestjs-query"; import { ClearOutlined, DeleteOutlined, EditOutlined } from "@ant-design/icons"; -import { DragEndEvent } from "@dnd-kit/core"; -import { MenuProps } from "antd"; +import type { DragEndEvent } from "@dnd-kit/core"; +import type { MenuProps } from "antd"; import { Text } from "@/components"; -import { SalesDealsQuery, SalesDealStagesQuery } from "@/graphql/types"; +import type { SalesDealsQuery, SalesDealStagesQuery } from "@/graphql/types"; import { currencyNumber } from "@/utilities"; import { diff --git a/examples/audit-log-provider/src/components/history.tsx b/examples/audit-log-provider/src/components/history.tsx index 3bbe767c3562..7bfa29935944 100644 --- a/examples/audit-log-provider/src/components/history.tsx +++ b/examples/audit-log-provider/src/components/history.tsx @@ -1,7 +1,7 @@ -import { FC } from "react"; -import { BaseKey, useLogList } from "@refinedev/core"; +import type { FC } from "react"; +import { type BaseKey, useLogList } from "@refinedev/core"; -import { ILog } from "../interfaces"; +import type { ILog } from "../interfaces"; type HistoryProps = { resource: string; diff --git a/examples/audit-log-provider/src/pages/posts/list.tsx b/examples/audit-log-provider/src/pages/posts/list.tsx index 8ed152764de5..1d298a9c9f1c 100644 --- a/examples/audit-log-provider/src/pages/posts/list.tsx +++ b/examples/audit-log-provider/src/pages/posts/list.tsx @@ -3,7 +3,7 @@ import { useState } from "react"; import { Modal } from "../../components/modal"; import { History } from "../../components/history"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostList: React.FC = () => { const { show, close, visible } = useModal(); diff --git a/examples/auth-antd/src/App.tsx b/examples/auth-antd/src/App.tsx index 027ffa23594a..c17f8d39db18 100644 --- a/examples/auth-antd/src/App.tsx +++ b/examples/auth-antd/src/App.tsx @@ -1,7 +1,7 @@ import { GitHubBanner, Refine, - AuthProvider, + type AuthProvider, Authenticated, } from "@refinedev/core"; import { diff --git a/examples/auth-antd/src/pages/posts/edit.tsx b/examples/auth-antd/src/pages/posts/edit.tsx index 71fb6a382e09..a7ac2428084d 100644 --- a/examples/auth-antd/src/pages/posts/edit.tsx +++ b/examples/auth-antd/src/pages/posts/edit.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/auth-antd/src/pages/posts/list.tsx b/examples/auth-antd/src/pages/posts/list.tsx index 605972a021c8..a72ebcd74254 100644 --- a/examples/auth-antd/src/pages/posts/list.tsx +++ b/examples/auth-antd/src/pages/posts/list.tsx @@ -10,7 +10,7 @@ import { import { Table, Space } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps } = useTable(); diff --git a/examples/auth-antd/src/pages/posts/show.tsx b/examples/auth-antd/src/pages/posts/show.tsx index 3d3678bad3c3..dfd179a4d431 100644 --- a/examples/auth-antd/src/pages/posts/show.tsx +++ b/examples/auth-antd/src/pages/posts/show.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/auth-auth0/src/App.tsx b/examples/auth-auth0/src/App.tsx index 5861f426feb5..e9e387dfb42d 100644 --- a/examples/auth-auth0/src/App.tsx +++ b/examples/auth-auth0/src/App.tsx @@ -1,7 +1,7 @@ import { GitHubBanner, Refine, - AuthProvider, + type AuthProvider, Authenticated, } from "@refinedev/core"; import { diff --git a/examples/auth-auth0/src/pages/posts/create.tsx b/examples/auth-auth0/src/pages/posts/create.tsx index 1584d39ac3e3..2bcf74182b56 100644 --- a/examples/auth-auth0/src/pages/posts/create.tsx +++ b/examples/auth-auth0/src/pages/posts/create.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/auth-auth0/src/pages/posts/edit.tsx b/examples/auth-auth0/src/pages/posts/edit.tsx index 71fb6a382e09..a7ac2428084d 100644 --- a/examples/auth-auth0/src/pages/posts/edit.tsx +++ b/examples/auth-auth0/src/pages/posts/edit.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/auth-auth0/src/pages/posts/list.tsx b/examples/auth-auth0/src/pages/posts/list.tsx index 186964b58fb8..d9375a4d46a5 100644 --- a/examples/auth-auth0/src/pages/posts/list.tsx +++ b/examples/auth-auth0/src/pages/posts/list.tsx @@ -10,7 +10,7 @@ import { import { Table, Space } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps } = useTable(); diff --git a/examples/auth-auth0/src/pages/posts/show.tsx b/examples/auth-auth0/src/pages/posts/show.tsx index 3d3678bad3c3..dfd179a4d431 100644 --- a/examples/auth-auth0/src/pages/posts/show.tsx +++ b/examples/auth-auth0/src/pages/posts/show.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/auth-chakra-ui/src/App.tsx b/examples/auth-chakra-ui/src/App.tsx index b0038c3a2fd9..95e0c5664461 100644 --- a/examples/auth-chakra-ui/src/App.tsx +++ b/examples/auth-chakra-ui/src/App.tsx @@ -1,5 +1,5 @@ import { - AuthProvider, + type AuthProvider, Authenticated, GitHubBanner, Refine, diff --git a/examples/auth-chakra-ui/src/components/pagination/index.tsx b/examples/auth-chakra-ui/src/components/pagination/index.tsx index 2d2fc2239993..1f3c65d6ebb0 100644 --- a/examples/auth-chakra-ui/src/components/pagination/index.tsx +++ b/examples/auth-chakra-ui/src/components/pagination/index.tsx @@ -1,4 +1,4 @@ -import { FC } from "react"; +import type { FC } from "react"; import { HStack, Button, Box } from "@chakra-ui/react"; import { IconChevronRight, IconChevronLeft } from "@tabler/icons-react"; import { usePagination } from "@refinedev/chakra-ui"; diff --git a/examples/auth-chakra-ui/src/components/table/columnFilter.tsx b/examples/auth-chakra-ui/src/components/table/columnFilter.tsx index 381c1ba966f8..23dd9b37808e 100644 --- a/examples/auth-chakra-ui/src/components/table/columnFilter.tsx +++ b/examples/auth-chakra-ui/src/components/table/columnFilter.tsx @@ -10,7 +10,7 @@ import { } from "@chakra-ui/react"; import { IconFilter, IconX, IconCheck } from "@tabler/icons-react"; -import { ColumnButtonProps } from "../../interfaces"; +import type { ColumnButtonProps } from "../../interfaces"; export const ColumnFilter: React.FC = ({ column }) => { // eslint-disable-next-line diff --git a/examples/auth-chakra-ui/src/components/table/columnSorter.tsx b/examples/auth-chakra-ui/src/components/table/columnSorter.tsx index 14dd2dc838ed..5773baaef80e 100644 --- a/examples/auth-chakra-ui/src/components/table/columnSorter.tsx +++ b/examples/auth-chakra-ui/src/components/table/columnSorter.tsx @@ -6,7 +6,7 @@ import { } from "@tabler/icons-react"; import type { SortDirection } from "@tanstack/react-table"; -import { ColumnButtonProps } from "../../interfaces"; +import type { ColumnButtonProps } from "../../interfaces"; export const ColumnSorter: React.FC = ({ column }) => { if (!column.getCanSort()) { diff --git a/examples/auth-chakra-ui/src/interfaces/index.d.ts b/examples/auth-chakra-ui/src/interfaces/index.d.ts index 582a7731788a..1e9dc13d2385 100644 --- a/examples/auth-chakra-ui/src/interfaces/index.d.ts +++ b/examples/auth-chakra-ui/src/interfaces/index.d.ts @@ -1,4 +1,4 @@ -import { Column } from "@tanstack/react-table"; +import type { Column } from "@tanstack/react-table"; export interface ICategory { id: number; diff --git a/examples/auth-chakra-ui/src/pages/posts/create.tsx b/examples/auth-chakra-ui/src/pages/posts/create.tsx index d72bdddf9449..9e63292412d6 100644 --- a/examples/auth-chakra-ui/src/pages/posts/create.tsx +++ b/examples/auth-chakra-ui/src/pages/posts/create.tsx @@ -9,7 +9,7 @@ import { import { useSelect } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostCreate = () => { const { diff --git a/examples/auth-chakra-ui/src/pages/posts/edit.tsx b/examples/auth-chakra-ui/src/pages/posts/edit.tsx index 57d5fed1eeb4..8d5596c118c3 100644 --- a/examples/auth-chakra-ui/src/pages/posts/edit.tsx +++ b/examples/auth-chakra-ui/src/pages/posts/edit.tsx @@ -10,7 +10,7 @@ import { import { useSelect } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostEdit = () => { const { diff --git a/examples/auth-chakra-ui/src/pages/posts/list.tsx b/examples/auth-chakra-ui/src/pages/posts/list.tsx index b50f8a030e19..06469f9de383 100644 --- a/examples/auth-chakra-ui/src/pages/posts/list.tsx +++ b/examples/auth-chakra-ui/src/pages/posts/list.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; -import { GetManyResponse, useMany } from "@refinedev/core"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; +import { type GetManyResponse, useMany } from "@refinedev/core"; import { List, ShowButton, @@ -25,7 +25,7 @@ import { import { ColumnFilter, ColumnSorter } from "../../components/table"; import { Pagination } from "../../components/pagination"; -import { FilterElementProps, ICategory, IPost } from "../../interfaces"; +import type { FilterElementProps, ICategory, IPost } from "../../interfaces"; export const PostList: React.FC = () => { const columns = React.useMemo[]>( diff --git a/examples/auth-chakra-ui/src/pages/posts/show.tsx b/examples/auth-chakra-ui/src/pages/posts/show.tsx index ce9f525855d1..0959476f6458 100644 --- a/examples/auth-chakra-ui/src/pages/posts/show.tsx +++ b/examples/auth-chakra-ui/src/pages/posts/show.tsx @@ -3,7 +3,7 @@ import { Show, MarkdownField } from "@refinedev/chakra-ui"; import { Heading, Text, Spacer } from "@chakra-ui/react"; -import { ICategory, IPost } from "../../interfaces"; +import type { ICategory, IPost } from "../../interfaces"; export const PostShow: React.FC = () => { const { queryResult } = useShow(); diff --git a/examples/auth-google-login/src/App.tsx b/examples/auth-google-login/src/App.tsx index c1e846f83874..ed7510765931 100644 --- a/examples/auth-google-login/src/App.tsx +++ b/examples/auth-google-login/src/App.tsx @@ -1,7 +1,7 @@ import { GitHubBanner, Refine, - AuthProvider, + type AuthProvider, Authenticated, } from "@refinedev/core"; import { diff --git a/examples/auth-google-login/src/pages/posts/create.tsx b/examples/auth-google-login/src/pages/posts/create.tsx index 1584d39ac3e3..2bcf74182b56 100644 --- a/examples/auth-google-login/src/pages/posts/create.tsx +++ b/examples/auth-google-login/src/pages/posts/create.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/auth-google-login/src/pages/posts/edit.tsx b/examples/auth-google-login/src/pages/posts/edit.tsx index 71fb6a382e09..a7ac2428084d 100644 --- a/examples/auth-google-login/src/pages/posts/edit.tsx +++ b/examples/auth-google-login/src/pages/posts/edit.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/auth-google-login/src/pages/posts/list.tsx b/examples/auth-google-login/src/pages/posts/list.tsx index 605972a021c8..a72ebcd74254 100644 --- a/examples/auth-google-login/src/pages/posts/list.tsx +++ b/examples/auth-google-login/src/pages/posts/list.tsx @@ -10,7 +10,7 @@ import { import { Table, Space } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps } = useTable(); diff --git a/examples/auth-google-login/src/pages/posts/show.tsx b/examples/auth-google-login/src/pages/posts/show.tsx index 3d3678bad3c3..dfd179a4d431 100644 --- a/examples/auth-google-login/src/pages/posts/show.tsx +++ b/examples/auth-google-login/src/pages/posts/show.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/auth-headless/src/App.tsx b/examples/auth-headless/src/App.tsx index 7a2f0ac03ffa..1f61518f17fa 100644 --- a/examples/auth-headless/src/App.tsx +++ b/examples/auth-headless/src/App.tsx @@ -1,6 +1,6 @@ import { AuthPage, - AuthProvider, + type AuthProvider, GitHubBanner, Refine, Authenticated, diff --git a/examples/auth-headless/src/components/layout/index.tsx b/examples/auth-headless/src/components/layout/index.tsx index f6f489fe2e87..330edd006fc0 100644 --- a/examples/auth-headless/src/components/layout/index.tsx +++ b/examples/auth-headless/src/components/layout/index.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { Menu } from "../menu"; import { Breadcrumb } from "../breadcrumb"; diff --git a/examples/auth-headless/src/pages/posts/list.tsx b/examples/auth-headless/src/pages/posts/list.tsx index 9e7ebae6f451..f7bff439f08b 100644 --- a/examples/auth-headless/src/pages/posts/list.tsx +++ b/examples/auth-headless/src/pages/posts/list.tsx @@ -1,9 +1,9 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { useNavigation } from "@refinedev/core"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostList: React.FC = () => { const { edit, create } = useNavigation(); diff --git a/examples/auth-keycloak/src/App.tsx b/examples/auth-keycloak/src/App.tsx index 75f83374d064..04a314412b72 100644 --- a/examples/auth-keycloak/src/App.tsx +++ b/examples/auth-keycloak/src/App.tsx @@ -1,7 +1,7 @@ import { GitHubBanner, Refine, - AuthProvider, + type AuthProvider, Authenticated, } from "@refinedev/core"; import { diff --git a/examples/auth-keycloak/src/pages/posts/create.tsx b/examples/auth-keycloak/src/pages/posts/create.tsx index 1584d39ac3e3..2bcf74182b56 100644 --- a/examples/auth-keycloak/src/pages/posts/create.tsx +++ b/examples/auth-keycloak/src/pages/posts/create.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/auth-keycloak/src/pages/posts/edit.tsx b/examples/auth-keycloak/src/pages/posts/edit.tsx index 71fb6a382e09..a7ac2428084d 100644 --- a/examples/auth-keycloak/src/pages/posts/edit.tsx +++ b/examples/auth-keycloak/src/pages/posts/edit.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/auth-keycloak/src/pages/posts/list.tsx b/examples/auth-keycloak/src/pages/posts/list.tsx index 186964b58fb8..d9375a4d46a5 100644 --- a/examples/auth-keycloak/src/pages/posts/list.tsx +++ b/examples/auth-keycloak/src/pages/posts/list.tsx @@ -10,7 +10,7 @@ import { import { Table, Space } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps } = useTable(); diff --git a/examples/auth-keycloak/src/pages/posts/show.tsx b/examples/auth-keycloak/src/pages/posts/show.tsx index 3d3678bad3c3..dfd179a4d431 100644 --- a/examples/auth-keycloak/src/pages/posts/show.tsx +++ b/examples/auth-keycloak/src/pages/posts/show.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/auth-kinde/src/pages/posts/list.tsx b/examples/auth-kinde/src/pages/posts/list.tsx index 4d6479bff926..ac3ba7a7595e 100644 --- a/examples/auth-kinde/src/pages/posts/list.tsx +++ b/examples/auth-kinde/src/pages/posts/list.tsx @@ -4,7 +4,7 @@ import { List, TextField, useTable } from "@refinedev/antd"; import { Table } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps } = useTable(); diff --git a/examples/auth-mantine/src/App.tsx b/examples/auth-mantine/src/App.tsx index 632973db0ee6..9bfdc49fe158 100644 --- a/examples/auth-mantine/src/App.tsx +++ b/examples/auth-mantine/src/App.tsx @@ -1,5 +1,5 @@ import { - AuthProvider, + type AuthProvider, Authenticated, GitHubBanner, Refine, diff --git a/examples/auth-mantine/src/components/table/columnFilter.tsx b/examples/auth-mantine/src/components/table/columnFilter.tsx index 86cad3cb69c0..17c6939949f5 100644 --- a/examples/auth-mantine/src/components/table/columnFilter.tsx +++ b/examples/auth-mantine/src/components/table/columnFilter.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import { TextInput, Menu, ActionIcon, Stack, Group } from "@mantine/core"; import { IconFilter, IconX, IconCheck } from "@tabler/icons-react"; -import { ColumnButtonProps } from "../../interfaces"; +import type { ColumnButtonProps } from "../../interfaces"; export const ColumnFilter: React.FC = ({ column }) => { // eslint-disable-next-line diff --git a/examples/auth-mantine/src/components/table/columnSorter.tsx b/examples/auth-mantine/src/components/table/columnSorter.tsx index f71ed1bbd4ec..b2a74d55a35e 100644 --- a/examples/auth-mantine/src/components/table/columnSorter.tsx +++ b/examples/auth-mantine/src/components/table/columnSorter.tsx @@ -5,7 +5,7 @@ import { IconChevronUp, } from "@tabler/icons-react"; -import { ColumnButtonProps } from "../../interfaces"; +import type { ColumnButtonProps } from "../../interfaces"; export const ColumnSorter: React.FC = ({ column }) => { if (!column.getCanSort()) { diff --git a/examples/auth-mantine/src/interfaces/index.d.ts b/examples/auth-mantine/src/interfaces/index.d.ts index 582a7731788a..1e9dc13d2385 100644 --- a/examples/auth-mantine/src/interfaces/index.d.ts +++ b/examples/auth-mantine/src/interfaces/index.d.ts @@ -1,4 +1,4 @@ -import { Column } from "@tanstack/react-table"; +import type { Column } from "@tanstack/react-table"; export interface ICategory { id: number; diff --git a/examples/auth-mantine/src/pages/posts/edit.tsx b/examples/auth-mantine/src/pages/posts/edit.tsx index 7c545b16ef09..909fc47d41bd 100644 --- a/examples/auth-mantine/src/pages/posts/edit.tsx +++ b/examples/auth-mantine/src/pages/posts/edit.tsx @@ -2,7 +2,7 @@ import { Edit, useForm, useSelect } from "@refinedev/mantine"; import { Select, TextInput, Text } from "@mantine/core"; import MDEditor from "@uiw/react-md-editor"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const PostEdit: React.FC = () => { const { diff --git a/examples/auth-mantine/src/pages/posts/list.tsx b/examples/auth-mantine/src/pages/posts/list.tsx index 98ccc47eff7f..984b95a9a310 100644 --- a/examples/auth-mantine/src/pages/posts/list.tsx +++ b/examples/auth-mantine/src/pages/posts/list.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; -import { GetManyResponse, useMany } from "@refinedev/core"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; +import { type GetManyResponse, useMany } from "@refinedev/core"; import { List, ShowButton, @@ -20,7 +20,7 @@ import { } from "@mantine/core"; import { ColumnFilter, ColumnSorter } from "../../components/table"; -import { FilterElementProps, ICategory, IPost } from "../../interfaces"; +import type { FilterElementProps, ICategory, IPost } from "../../interfaces"; export const PostList: React.FC = () => { const columns = React.useMemo[]>( diff --git a/examples/auth-mantine/src/pages/posts/show.tsx b/examples/auth-mantine/src/pages/posts/show.tsx index 109d90abdc0d..1dd1b40850b1 100644 --- a/examples/auth-mantine/src/pages/posts/show.tsx +++ b/examples/auth-mantine/src/pages/posts/show.tsx @@ -3,7 +3,7 @@ import { Show, MarkdownField } from "@refinedev/mantine"; import { Title, Text } from "@mantine/core"; -import { ICategory, IPost } from "../../interfaces"; +import type { ICategory, IPost } from "../../interfaces"; export const PostShow: React.FC = () => { const { queryResult } = useShow(); diff --git a/examples/auth-material-ui/src/App.tsx b/examples/auth-material-ui/src/App.tsx index 246319970454..149ece6cd16b 100644 --- a/examples/auth-material-ui/src/App.tsx +++ b/examples/auth-material-ui/src/App.tsx @@ -1,7 +1,7 @@ import { GitHubBanner, Refine, - AuthProvider, + type AuthProvider, Authenticated, } from "@refinedev/core"; import { diff --git a/examples/auth-material-ui/src/pages/posts/create.tsx b/examples/auth-material-ui/src/pages/posts/create.tsx index 151ef37a38e6..016d5ab39d0a 100644 --- a/examples/auth-material-ui/src/pages/posts/create.tsx +++ b/examples/auth-material-ui/src/pages/posts/create.tsx @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { Create, useAutocomplete } from "@refinedev/mui"; import Box from "@mui/material/Box"; import TextField from "@mui/material/TextField"; @@ -7,7 +7,7 @@ import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; -import { IPost, ICategory, IStatus, Nullable } from "../../interfaces"; +import type { IPost, ICategory, IStatus, Nullable } from "../../interfaces"; export const PostCreate: React.FC = () => { const { diff --git a/examples/auth-material-ui/src/pages/posts/edit.tsx b/examples/auth-material-ui/src/pages/posts/edit.tsx index 8700e3699726..0d36a26b115c 100644 --- a/examples/auth-material-ui/src/pages/posts/edit.tsx +++ b/examples/auth-material-ui/src/pages/posts/edit.tsx @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { Edit, useAutocomplete } from "@refinedev/mui"; import Box from "@mui/material/Box"; import TextField from "@mui/material/TextField"; @@ -7,7 +7,7 @@ import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; -import { IPost, ICategory, IStatus, Nullable } from "../../interfaces"; +import type { IPost, ICategory, IStatus, Nullable } from "../../interfaces"; export const PostEdit: React.FC = () => { const { diff --git a/examples/auth-material-ui/src/pages/posts/list.tsx b/examples/auth-material-ui/src/pages/posts/list.tsx index 3ae186633700..019ac589494f 100644 --- a/examples/auth-material-ui/src/pages/posts/list.tsx +++ b/examples/auth-material-ui/src/pages/posts/list.tsx @@ -2,9 +2,9 @@ import { useMany } from "@refinedev/core"; import { EditButton, List, useDataGrid } from "@refinedev/mui"; import React from "react"; -import { DataGrid, GridColDef } from "@mui/x-data-grid"; +import { DataGrid, type GridColDef } from "@mui/x-data-grid"; -import { ICategory, IPost } from "../../interfaces"; +import type { ICategory, IPost } from "../../interfaces"; export const PostList: React.FC = () => { const { dataGridProps } = useDataGrid(); diff --git a/examples/auth-otp/src/App.tsx b/examples/auth-otp/src/App.tsx index e872fdeebfef..ce266416d43f 100644 --- a/examples/auth-otp/src/App.tsx +++ b/examples/auth-otp/src/App.tsx @@ -1,5 +1,5 @@ import { - AuthProvider, + type AuthProvider, Authenticated, GitHubBanner, Refine, diff --git a/examples/auth-otp/src/pages/posts/create.tsx b/examples/auth-otp/src/pages/posts/create.tsx index 1584d39ac3e3..2bcf74182b56 100644 --- a/examples/auth-otp/src/pages/posts/create.tsx +++ b/examples/auth-otp/src/pages/posts/create.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/auth-otp/src/pages/posts/edit.tsx b/examples/auth-otp/src/pages/posts/edit.tsx index 71fb6a382e09..a7ac2428084d 100644 --- a/examples/auth-otp/src/pages/posts/edit.tsx +++ b/examples/auth-otp/src/pages/posts/edit.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/auth-otp/src/pages/posts/list.tsx b/examples/auth-otp/src/pages/posts/list.tsx index 605972a021c8..a72ebcd74254 100644 --- a/examples/auth-otp/src/pages/posts/list.tsx +++ b/examples/auth-otp/src/pages/posts/list.tsx @@ -10,7 +10,7 @@ import { import { Table, Space } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps } = useTable(); diff --git a/examples/auth-otp/src/pages/posts/show.tsx b/examples/auth-otp/src/pages/posts/show.tsx index 3d3678bad3c3..dfd179a4d431 100644 --- a/examples/auth-otp/src/pages/posts/show.tsx +++ b/examples/auth-otp/src/pages/posts/show.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/base-antd/src/pages/posts/create.tsx b/examples/base-antd/src/pages/posts/create.tsx index e7ee90ca3ada..22d417d9f12f 100644 --- a/examples/base-antd/src/pages/posts/create.tsx +++ b/examples/base-antd/src/pages/posts/create.tsx @@ -5,7 +5,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm({ diff --git a/examples/base-antd/src/pages/posts/edit.tsx b/examples/base-antd/src/pages/posts/edit.tsx index cf1a5b8e4c21..9061a282576a 100644 --- a/examples/base-antd/src/pages/posts/edit.tsx +++ b/examples/base-antd/src/pages/posts/edit.tsx @@ -5,7 +5,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult, autoSaveProps } = diff --git a/examples/base-antd/src/pages/posts/list.tsx b/examples/base-antd/src/pages/posts/list.tsx index 2275c43b6160..f6f17f51995e 100644 --- a/examples/base-antd/src/pages/posts/list.tsx +++ b/examples/base-antd/src/pages/posts/list.tsx @@ -13,7 +13,7 @@ import { import { Table, Space, Select, Radio } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps, filters } = useTable({ diff --git a/examples/base-antd/src/pages/posts/show.tsx b/examples/base-antd/src/pages/posts/show.tsx index ca5932bbb1c5..65573501d8d4 100644 --- a/examples/base-antd/src/pages/posts/show.tsx +++ b/examples/base-antd/src/pages/posts/show.tsx @@ -3,7 +3,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/base-chakra-ui/src/components/pagination/index.tsx b/examples/base-chakra-ui/src/components/pagination/index.tsx index 2d2fc2239993..1f3c65d6ebb0 100644 --- a/examples/base-chakra-ui/src/components/pagination/index.tsx +++ b/examples/base-chakra-ui/src/components/pagination/index.tsx @@ -1,4 +1,4 @@ -import { FC } from "react"; +import type { FC } from "react"; import { HStack, Button, Box } from "@chakra-ui/react"; import { IconChevronRight, IconChevronLeft } from "@tabler/icons-react"; import { usePagination } from "@refinedev/chakra-ui"; diff --git a/examples/base-chakra-ui/src/components/table/columnFilter.tsx b/examples/base-chakra-ui/src/components/table/columnFilter.tsx index 381c1ba966f8..23dd9b37808e 100644 --- a/examples/base-chakra-ui/src/components/table/columnFilter.tsx +++ b/examples/base-chakra-ui/src/components/table/columnFilter.tsx @@ -10,7 +10,7 @@ import { } from "@chakra-ui/react"; import { IconFilter, IconX, IconCheck } from "@tabler/icons-react"; -import { ColumnButtonProps } from "../../interfaces"; +import type { ColumnButtonProps } from "../../interfaces"; export const ColumnFilter: React.FC = ({ column }) => { // eslint-disable-next-line diff --git a/examples/base-chakra-ui/src/components/table/columnSorter.tsx b/examples/base-chakra-ui/src/components/table/columnSorter.tsx index 78e0fcec2d7b..1abdead5e884 100644 --- a/examples/base-chakra-ui/src/components/table/columnSorter.tsx +++ b/examples/base-chakra-ui/src/components/table/columnSorter.tsx @@ -5,7 +5,7 @@ import { IconSelector, } from "@tabler/icons-react"; -import { ColumnButtonProps } from "../../interfaces"; +import type { ColumnButtonProps } from "../../interfaces"; import type { SortDirection } from "@tanstack/react-table"; export const ColumnSorter: React.FC = ({ column }) => { diff --git a/examples/base-chakra-ui/src/interfaces/index.d.ts b/examples/base-chakra-ui/src/interfaces/index.d.ts index d57cb1a6fd8d..4ebdc7c91fa7 100644 --- a/examples/base-chakra-ui/src/interfaces/index.d.ts +++ b/examples/base-chakra-ui/src/interfaces/index.d.ts @@ -1,4 +1,4 @@ -import { Column } from "@tanstack/react-table"; +import type { Column } from "@tanstack/react-table"; export interface ICategory { id: number; diff --git a/examples/base-chakra-ui/src/pages/posts/create.tsx b/examples/base-chakra-ui/src/pages/posts/create.tsx index ef2c3b05f9b1..4393387821d4 100644 --- a/examples/base-chakra-ui/src/pages/posts/create.tsx +++ b/examples/base-chakra-ui/src/pages/posts/create.tsx @@ -10,7 +10,7 @@ import { import { useSelect } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostCreate = () => { const { diff --git a/examples/base-chakra-ui/src/pages/posts/edit.tsx b/examples/base-chakra-ui/src/pages/posts/edit.tsx index e88644ec1050..cfd2ad214f24 100644 --- a/examples/base-chakra-ui/src/pages/posts/edit.tsx +++ b/examples/base-chakra-ui/src/pages/posts/edit.tsx @@ -11,7 +11,7 @@ import { import { useSelect } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostEdit = () => { const { diff --git a/examples/base-chakra-ui/src/pages/posts/list.tsx b/examples/base-chakra-ui/src/pages/posts/list.tsx index af36dcc5dfdb..d898c0509dd9 100644 --- a/examples/base-chakra-ui/src/pages/posts/list.tsx +++ b/examples/base-chakra-ui/src/pages/posts/list.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; -import { GetManyResponse, useMany } from "@refinedev/core"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; +import { type GetManyResponse, useMany } from "@refinedev/core"; import { List, ShowButton, @@ -25,7 +25,7 @@ import { import { ColumnFilter, ColumnSorter } from "../../components/table"; import { Pagination } from "../../components/pagination"; -import { FilterElementProps, ICategory, IPost } from "../../interfaces"; +import type { FilterElementProps, ICategory, IPost } from "../../interfaces"; export const PostList: React.FC = () => { const columns = React.useMemo[]>( diff --git a/examples/base-chakra-ui/src/pages/posts/show.tsx b/examples/base-chakra-ui/src/pages/posts/show.tsx index ce9f525855d1..0959476f6458 100644 --- a/examples/base-chakra-ui/src/pages/posts/show.tsx +++ b/examples/base-chakra-ui/src/pages/posts/show.tsx @@ -3,7 +3,7 @@ import { Show, MarkdownField } from "@refinedev/chakra-ui"; import { Heading, Text, Spacer } from "@chakra-ui/react"; -import { ICategory, IPost } from "../../interfaces"; +import type { ICategory, IPost } from "../../interfaces"; export const PostShow: React.FC = () => { const { queryResult } = useShow(); diff --git a/examples/base-headless/src/pages/posts/list.tsx b/examples/base-headless/src/pages/posts/list.tsx index 9e7ebae6f451..f7bff439f08b 100644 --- a/examples/base-headless/src/pages/posts/list.tsx +++ b/examples/base-headless/src/pages/posts/list.tsx @@ -1,9 +1,9 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { useNavigation } from "@refinedev/core"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostList: React.FC = () => { const { edit, create } = useNavigation(); diff --git a/examples/base-mantine/src/components/table/columnFilter.tsx b/examples/base-mantine/src/components/table/columnFilter.tsx index 86cad3cb69c0..17c6939949f5 100644 --- a/examples/base-mantine/src/components/table/columnFilter.tsx +++ b/examples/base-mantine/src/components/table/columnFilter.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import { TextInput, Menu, ActionIcon, Stack, Group } from "@mantine/core"; import { IconFilter, IconX, IconCheck } from "@tabler/icons-react"; -import { ColumnButtonProps } from "../../interfaces"; +import type { ColumnButtonProps } from "../../interfaces"; export const ColumnFilter: React.FC = ({ column }) => { // eslint-disable-next-line diff --git a/examples/base-mantine/src/components/table/columnSorter.tsx b/examples/base-mantine/src/components/table/columnSorter.tsx index f71ed1bbd4ec..b2a74d55a35e 100644 --- a/examples/base-mantine/src/components/table/columnSorter.tsx +++ b/examples/base-mantine/src/components/table/columnSorter.tsx @@ -5,7 +5,7 @@ import { IconChevronUp, } from "@tabler/icons-react"; -import { ColumnButtonProps } from "../../interfaces"; +import type { ColumnButtonProps } from "../../interfaces"; export const ColumnSorter: React.FC = ({ column }) => { if (!column.getCanSort()) { diff --git a/examples/base-mantine/src/interfaces/index.d.ts b/examples/base-mantine/src/interfaces/index.d.ts index 61e172973540..d8dbff1142b2 100644 --- a/examples/base-mantine/src/interfaces/index.d.ts +++ b/examples/base-mantine/src/interfaces/index.d.ts @@ -1,4 +1,4 @@ -import { Column } from "@tanstack/react-table"; +import type { Column } from "@tanstack/react-table"; export interface ITag { id: number; diff --git a/examples/base-mantine/src/pages/posts/create.tsx b/examples/base-mantine/src/pages/posts/create.tsx index 0d517eecbe69..b4b77234b835 100644 --- a/examples/base-mantine/src/pages/posts/create.tsx +++ b/examples/base-mantine/src/pages/posts/create.tsx @@ -1,7 +1,7 @@ import { Create, useForm, useSelect } from "@refinedev/mantine"; import { Select, TextInput, Text, MultiSelect } from "@mantine/core"; import MDEditor from "@uiw/react-md-editor"; -import { ITag } from "../../interfaces"; +import type { ITag } from "../../interfaces"; export const PostCreate: React.FC = () => { const { saveButtonProps, getInputProps, errors } = useForm({ diff --git a/examples/base-mantine/src/pages/posts/edit.tsx b/examples/base-mantine/src/pages/posts/edit.tsx index a72946bb7f61..cf821d2b6e40 100644 --- a/examples/base-mantine/src/pages/posts/edit.tsx +++ b/examples/base-mantine/src/pages/posts/edit.tsx @@ -2,7 +2,7 @@ import { Edit, useForm, useSelect } from "@refinedev/mantine"; import { Select, TextInput, Text, MultiSelect } from "@mantine/core"; import MDEditor from "@uiw/react-md-editor"; -import { ICategory, ITag } from "../../interfaces"; +import type { ICategory, ITag } from "../../interfaces"; export const PostEdit: React.FC = () => { const { diff --git a/examples/base-mantine/src/pages/posts/list.tsx b/examples/base-mantine/src/pages/posts/list.tsx index 98ccc47eff7f..984b95a9a310 100644 --- a/examples/base-mantine/src/pages/posts/list.tsx +++ b/examples/base-mantine/src/pages/posts/list.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; -import { GetManyResponse, useMany } from "@refinedev/core"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; +import { type GetManyResponse, useMany } from "@refinedev/core"; import { List, ShowButton, @@ -20,7 +20,7 @@ import { } from "@mantine/core"; import { ColumnFilter, ColumnSorter } from "../../components/table"; -import { FilterElementProps, ICategory, IPost } from "../../interfaces"; +import type { FilterElementProps, ICategory, IPost } from "../../interfaces"; export const PostList: React.FC = () => { const columns = React.useMemo[]>( diff --git a/examples/base-mantine/src/pages/posts/show.tsx b/examples/base-mantine/src/pages/posts/show.tsx index 908925df943c..90a0a0a8eafb 100644 --- a/examples/base-mantine/src/pages/posts/show.tsx +++ b/examples/base-mantine/src/pages/posts/show.tsx @@ -3,7 +3,7 @@ import { Show, MarkdownField } from "@refinedev/mantine"; import { Title, Text, Badge, Flex } from "@mantine/core"; -import { ICategory, IPost, ITag } from "../../interfaces"; +import type { ICategory, IPost, ITag } from "../../interfaces"; export const PostShow: React.FC = () => { const { queryResult } = useShow(); diff --git a/examples/base-material-ui/src/pages/posts/create.tsx b/examples/base-material-ui/src/pages/posts/create.tsx index 7b8466a2de05..e39120cfdaf8 100644 --- a/examples/base-material-ui/src/pages/posts/create.tsx +++ b/examples/base-material-ui/src/pages/posts/create.tsx @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { Create, useAutocomplete } from "@refinedev/mui"; import Box from "@mui/material/Box"; import TextField from "@mui/material/TextField"; @@ -7,7 +7,7 @@ import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; -import { IPost, ICategory, Nullable, IStatus } from "../../interfaces"; +import type { IPost, ICategory, Nullable, IStatus } from "../../interfaces"; export const PostCreate: React.FC = () => { const { diff --git a/examples/base-material-ui/src/pages/posts/edit.tsx b/examples/base-material-ui/src/pages/posts/edit.tsx index 814ce15711ac..9a49279331b6 100644 --- a/examples/base-material-ui/src/pages/posts/edit.tsx +++ b/examples/base-material-ui/src/pages/posts/edit.tsx @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { Edit, useAutocomplete } from "@refinedev/mui"; import Box from "@mui/material/Box"; import TextField from "@mui/material/TextField"; @@ -7,7 +7,7 @@ import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; -import { IPost, ICategory, Nullable, IStatus } from "../../interfaces"; +import type { IPost, ICategory, Nullable, IStatus } from "../../interfaces"; export const PostEdit: React.FC = () => { const { diff --git a/examples/base-material-ui/src/pages/posts/list.tsx b/examples/base-material-ui/src/pages/posts/list.tsx index 0ac9294f0689..8da7958905e0 100644 --- a/examples/base-material-ui/src/pages/posts/list.tsx +++ b/examples/base-material-ui/src/pages/posts/list.tsx @@ -2,9 +2,9 @@ import { useMany } from "@refinedev/core"; import { EditButton, List, ShowButton, useDataGrid } from "@refinedev/mui"; import React from "react"; -import { DataGrid, GridColDef } from "@mui/x-data-grid"; +import { DataGrid, type GridColDef } from "@mui/x-data-grid"; -import { ICategory, IPost } from "../../interfaces"; +import type { ICategory, IPost } from "../../interfaces"; export const PostList: React.FC = () => { const { dataGridProps } = useDataGrid(); diff --git a/examples/blog-ecommerce/pages/_app.tsx b/examples/blog-ecommerce/pages/_app.tsx index a38813f585c6..48a7eeff4a2e 100644 --- a/examples/blog-ecommerce/pages/_app.tsx +++ b/examples/blog-ecommerce/pages/_app.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { AppProps } from "next/app"; +import type { AppProps } from "next/app"; import Head from "next/head"; import { GitHubBanner, Refine } from "@refinedev/core"; import routerProvider, { diff --git a/examples/blog-ecommerce/pages/index.tsx b/examples/blog-ecommerce/pages/index.tsx index fa535747611a..e7c692d6ad4c 100644 --- a/examples/blog-ecommerce/pages/index.tsx +++ b/examples/blog-ecommerce/pages/index.tsx @@ -1,10 +1,10 @@ -import { GetServerSideProps } from "next"; -import { GetListResponse, useTable } from "@refinedev/core"; +import type { GetServerSideProps } from "next"; +import { type GetListResponse, useTable } from "@refinedev/core"; import { DataProvider } from "@refinedev/strapi-v4"; import { Button, SimpleGrid, Flex, Text } from "@chakra-ui/react"; import { API_URL } from "src/constants"; -import { IProduct, IStore } from "src/interfaces"; +import type { IProduct, IStore } from "src/interfaces"; import { ProductCard, FilterButton } from "src/components"; type ItemProps = { diff --git a/examples/blog-ecommerce/src/components/layout.tsx b/examples/blog-ecommerce/src/components/layout.tsx index c2ccf4887236..fea046cd47f7 100644 --- a/examples/blog-ecommerce/src/components/layout.tsx +++ b/examples/blog-ecommerce/src/components/layout.tsx @@ -1,4 +1,4 @@ -import { LayoutProps } from "@refinedev/core"; +import type { LayoutProps } from "@refinedev/core"; import { Box, Container, Flex, Image, Button } from "@chakra-ui/react"; export const Layout: React.FC = ({ children }) => { diff --git a/examples/blog-invoice-generator/src/authProvider.ts b/examples/blog-invoice-generator/src/authProvider.ts index f55a4afeb7f7..9653d7f5a306 100644 --- a/examples/blog-invoice-generator/src/authProvider.ts +++ b/examples/blog-invoice-generator/src/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import { AuthHelper } from "@refinedev/strapi-v4"; import { TOKEN_KEY, API_URL } from "./constants"; diff --git a/examples/blog-invoice-generator/src/components/client/create.tsx b/examples/blog-invoice-generator/src/components/client/create.tsx index 30aa9d996d82..c9fb464b5c77 100644 --- a/examples/blog-invoice-generator/src/components/client/create.tsx +++ b/examples/blog-invoice-generator/src/components/client/create.tsx @@ -2,17 +2,17 @@ import { Create, useSelect, useModalForm } from "@refinedev/antd"; import { Drawer, - DrawerProps, + type DrawerProps, Form, - FormProps, + type FormProps, Input, - ButtonProps, + type ButtonProps, Grid, Select, Button, } from "antd"; -import { IContact } from "interfaces"; +import type { IContact } from "interfaces"; import { CreateContact } from "@/components/contacts"; type CreateClientProps = { diff --git a/examples/blog-invoice-generator/src/components/client/edit.tsx b/examples/blog-invoice-generator/src/components/client/edit.tsx index fe23335e3f26..6039d1cbc774 100644 --- a/examples/blog-invoice-generator/src/components/client/edit.tsx +++ b/examples/blog-invoice-generator/src/components/client/edit.tsx @@ -2,11 +2,11 @@ import { Edit, useSelect } from "@refinedev/antd"; import { Drawer, - DrawerProps, + type DrawerProps, Form, - FormProps, + type FormProps, Input, - ButtonProps, + type ButtonProps, Grid, Select, } from "antd"; diff --git a/examples/blog-invoice-generator/src/components/client/item.tsx b/examples/blog-invoice-generator/src/components/client/item.tsx index 3afab7a076c6..272a463317aa 100644 --- a/examples/blog-invoice-generator/src/components/client/item.tsx +++ b/examples/blog-invoice-generator/src/components/client/item.tsx @@ -2,9 +2,9 @@ import { useDelete } from "@refinedev/core"; import { TagField } from "@refinedev/antd"; import { FormOutlined, DeleteOutlined, MoreOutlined } from "@ant-design/icons"; -import { Card, Typography, Dropdown, MenuProps } from "antd"; +import { Card, Typography, Dropdown, type MenuProps } from "antd"; -import { IClient } from "interfaces"; +import type { IClient } from "interfaces"; const { Title, Text } = Typography; diff --git a/examples/blog-invoice-generator/src/components/company/create.tsx b/examples/blog-invoice-generator/src/components/company/create.tsx index 43791becee1d..f8d5539f718c 100644 --- a/examples/blog-invoice-generator/src/components/company/create.tsx +++ b/examples/blog-invoice-generator/src/components/company/create.tsx @@ -1,4 +1,11 @@ -import { Modal, Form, Input, ModalProps, FormProps, Upload } from "antd"; +import { + Modal, + Form, + Input, + type ModalProps, + type FormProps, + Upload, +} from "antd"; import { getValueProps, mediaUploadMapper } from "@refinedev/strapi-v4"; diff --git a/examples/blog-invoice-generator/src/components/company/edit.tsx b/examples/blog-invoice-generator/src/components/company/edit.tsx index ff390a962433..33c6509b40ba 100644 --- a/examples/blog-invoice-generator/src/components/company/edit.tsx +++ b/examples/blog-invoice-generator/src/components/company/edit.tsx @@ -1,4 +1,11 @@ -import { Modal, Form, Input, ModalProps, FormProps, Upload } from "antd"; +import { + Modal, + Form, + Input, + type ModalProps, + type FormProps, + Upload, +} from "antd"; import { getValueProps, mediaUploadMapper } from "@refinedev/strapi-v4"; import { TOKEN_KEY, API_URL } from "../../constants"; diff --git a/examples/blog-invoice-generator/src/components/company/item.tsx b/examples/blog-invoice-generator/src/components/company/item.tsx index c3f9b2f599af..43b56f1ddcd7 100644 --- a/examples/blog-invoice-generator/src/components/company/item.tsx +++ b/examples/blog-invoice-generator/src/components/company/item.tsx @@ -7,7 +7,7 @@ import { import { Card, Typography } from "antd"; -import { ICompany } from "interfaces"; +import type { ICompany } from "interfaces"; import { API_URL } from "../../constants"; const { Title, Text } = Typography; diff --git a/examples/blog-invoice-generator/src/components/contacts/create.tsx b/examples/blog-invoice-generator/src/components/contacts/create.tsx index 79873c354b81..93f4ad06557a 100644 --- a/examples/blog-invoice-generator/src/components/contacts/create.tsx +++ b/examples/blog-invoice-generator/src/components/contacts/create.tsx @@ -1,6 +1,13 @@ import { useSelect } from "@refinedev/antd"; -import { Form, Modal, Input, ModalProps, FormProps, Select } from "antd"; +import { + Form, + Modal, + Input, + type ModalProps, + type FormProps, + Select, +} from "antd"; type CreateContactProps = { modalProps: ModalProps; diff --git a/examples/blog-invoice-generator/src/components/mission/create.tsx b/examples/blog-invoice-generator/src/components/mission/create.tsx index bd03d4939098..6c307f0a323c 100644 --- a/examples/blog-invoice-generator/src/components/mission/create.tsx +++ b/examples/blog-invoice-generator/src/components/mission/create.tsx @@ -1,4 +1,11 @@ -import { Form, Input, ModalProps, FormProps, Modal, InputNumber } from "antd"; +import { + Form, + Input, + type ModalProps, + type FormProps, + Modal, + InputNumber, +} from "antd"; type CreateMissionProps = { modalProps: ModalProps; diff --git a/examples/blog-invoice-generator/src/components/mission/edit.tsx b/examples/blog-invoice-generator/src/components/mission/edit.tsx index fb0fc26934ab..df86ea6a4724 100644 --- a/examples/blog-invoice-generator/src/components/mission/edit.tsx +++ b/examples/blog-invoice-generator/src/components/mission/edit.tsx @@ -1,4 +1,11 @@ -import { Form, Input, ModalProps, FormProps, Modal, InputNumber } from "antd"; +import { + Form, + Input, + type ModalProps, + type FormProps, + Modal, + InputNumber, +} from "antd"; type EditMissionProps = { modalProps: ModalProps; diff --git a/examples/blog-invoice-generator/src/components/pdf/pdfLayout.tsx b/examples/blog-invoice-generator/src/components/pdf/pdfLayout.tsx index b3dcd30f0c3c..a2ceaaebbaf0 100644 --- a/examples/blog-invoice-generator/src/components/pdf/pdfLayout.tsx +++ b/examples/blog-invoice-generator/src/components/pdf/pdfLayout.tsx @@ -7,7 +7,7 @@ import { Text, PDFViewer, } from "@react-pdf/renderer"; -import { IInvoice } from "interfaces"; +import type { IInvoice } from "interfaces"; import { API_URL } from "../../constants"; type PdfProps = { diff --git a/examples/blog-invoice-generator/src/pages/client/list.tsx b/examples/blog-invoice-generator/src/pages/client/list.tsx index a651ec216ab5..1f02939a10c6 100644 --- a/examples/blog-invoice-generator/src/pages/client/list.tsx +++ b/examples/blog-invoice-generator/src/pages/client/list.tsx @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { useSimpleList, @@ -9,7 +9,7 @@ import { import { List as AntdList } from "antd"; -import { IClient } from "interfaces"; +import type { IClient } from "interfaces"; import { ClientItem, CreateClient, EditClient } from "@/components/client"; export const ClientList = () => { diff --git a/examples/blog-invoice-generator/src/pages/company/list.tsx b/examples/blog-invoice-generator/src/pages/company/list.tsx index d5cf9b90ab6f..6d026521ef6e 100644 --- a/examples/blog-invoice-generator/src/pages/company/list.tsx +++ b/examples/blog-invoice-generator/src/pages/company/list.tsx @@ -1,10 +1,10 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { useSimpleList, List, useModalForm } from "@refinedev/antd"; import { List as AntdList } from "antd"; -import { ICompany } from "interfaces"; +import type { ICompany } from "interfaces"; import { CompanyItem, CreateCompany, EditCompany } from "@/components/company"; export const CompanyList = () => { diff --git a/examples/blog-invoice-generator/src/pages/contacts/edit.tsx b/examples/blog-invoice-generator/src/pages/contacts/edit.tsx index abcc206b179d..580146675eea 100644 --- a/examples/blog-invoice-generator/src/pages/contacts/edit.tsx +++ b/examples/blog-invoice-generator/src/pages/contacts/edit.tsx @@ -2,7 +2,7 @@ import { Edit, useForm, useSelect } from "@refinedev/antd"; import { Form, Select, Input } from "antd"; -import { IContact } from "interfaces"; +import type { IContact } from "interfaces"; export const ContactEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm({ diff --git a/examples/blog-invoice-generator/src/pages/contacts/list.tsx b/examples/blog-invoice-generator/src/pages/contacts/list.tsx index aadb6a46e179..a3e4ce1967dd 100644 --- a/examples/blog-invoice-generator/src/pages/contacts/list.tsx +++ b/examples/blog-invoice-generator/src/pages/contacts/list.tsx @@ -10,7 +10,7 @@ import { import { Table, Space } from "antd"; -import { IContact } from "interfaces"; +import type { IContact } from "interfaces"; import { CreateContact } from "@/components/contacts"; export const ContactsList: React.FC = () => { diff --git a/examples/blog-invoice-generator/src/pages/invoice/create.tsx b/examples/blog-invoice-generator/src/pages/invoice/create.tsx index b7d09840551e..cee7e54c7c38 100644 --- a/examples/blog-invoice-generator/src/pages/invoice/create.tsx +++ b/examples/blog-invoice-generator/src/pages/invoice/create.tsx @@ -2,7 +2,7 @@ import { Create, useForm, useSelect } from "@refinedev/antd"; import { Form, Input, Select, DatePicker } from "antd"; -import { ICompany, IContact, IMission, IInvoice } from "interfaces"; +import type { ICompany, IContact, IMission, IInvoice } from "interfaces"; export const InvoiceCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/blog-invoice-generator/src/pages/invoice/edit.tsx b/examples/blog-invoice-generator/src/pages/invoice/edit.tsx index 1d28dc9f277b..9e402a9ee343 100644 --- a/examples/blog-invoice-generator/src/pages/invoice/edit.tsx +++ b/examples/blog-invoice-generator/src/pages/invoice/edit.tsx @@ -2,7 +2,7 @@ import { useForm, useSelect, Edit } from "@refinedev/antd"; import { Form, Input, Select } from "antd"; -import { IInvoice } from "interfaces"; +import type { IInvoice } from "interfaces"; export const InvoiceEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm({ diff --git a/examples/blog-invoice-generator/src/pages/invoice/list.tsx b/examples/blog-invoice-generator/src/pages/invoice/list.tsx index 99c71406d388..ee281eb4700c 100644 --- a/examples/blog-invoice-generator/src/pages/invoice/list.tsx +++ b/examples/blog-invoice-generator/src/pages/invoice/list.tsx @@ -13,7 +13,7 @@ import { import { FilePdfOutlined } from "@ant-design/icons"; import { Table, Space, Button, Modal } from "antd"; -import { IInvoice, IMission } from "interfaces"; +import type { IInvoice, IMission } from "interfaces"; import { PdfLayout } from "@/components/pdf"; export const InvoiceList: React.FC = () => { diff --git a/examples/blog-invoice-generator/src/pages/mission/list.tsx b/examples/blog-invoice-generator/src/pages/mission/list.tsx index a698d1d35819..285050737862 100644 --- a/examples/blog-invoice-generator/src/pages/mission/list.tsx +++ b/examples/blog-invoice-generator/src/pages/mission/list.tsx @@ -8,7 +8,7 @@ import { import { Table } from "antd"; -import { IMission } from "interfaces"; +import type { IMission } from "interfaces"; import { CreateMission, EditMission } from "@/components/mission"; export const MissionList: React.FC = () => { diff --git a/examples/blog-issue-tracker/src/authProvider.ts b/examples/blog-issue-tracker/src/authProvider.ts index 527241fc8e09..5d31e79cda45 100644 --- a/examples/blog-issue-tracker/src/authProvider.ts +++ b/examples/blog-issue-tracker/src/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import { supabaseClient } from "utility"; diff --git a/examples/blog-issue-tracker/src/pages/dashboard/index.tsx b/examples/blog-issue-tracker/src/pages/dashboard/index.tsx index ecf9ce787651..576d696c9a97 100644 --- a/examples/blog-issue-tracker/src/pages/dashboard/index.tsx +++ b/examples/blog-issue-tracker/src/pages/dashboard/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useList, useMany } from "@refinedev/core"; import { Row, Col, Card } from "antd"; -import { ITask, ILabel, IPriority, IStatus, IAuthUser } from "interfaces"; +import type { ITask, ILabel, IPriority, IStatus, IAuthUser } from "interfaces"; import { TaskChart } from "components/task/pie"; import { groupBy } from "helper"; diff --git a/examples/blog-issue-tracker/src/pages/task/create.tsx b/examples/blog-issue-tracker/src/pages/task/create.tsx index 16b98b1c13d3..3788701ea39d 100644 --- a/examples/blog-issue-tracker/src/pages/task/create.tsx +++ b/examples/blog-issue-tracker/src/pages/task/create.tsx @@ -2,7 +2,7 @@ import { useForm, Create, useSelect } from "@refinedev/antd"; import { Form, Input, Select, DatePicker } from "antd"; -import { ITask, ILabel, IPriority, IStatus, IAuthUser } from "interfaces"; +import type { ITask, ILabel, IPriority, IStatus, IAuthUser } from "interfaces"; export const TaskCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/blog-issue-tracker/src/pages/task/edit.tsx b/examples/blog-issue-tracker/src/pages/task/edit.tsx index 1902cb2fb0d6..75bf9eb13373 100644 --- a/examples/blog-issue-tracker/src/pages/task/edit.tsx +++ b/examples/blog-issue-tracker/src/pages/task/edit.tsx @@ -2,7 +2,7 @@ import { useForm, Edit, useSelect } from "@refinedev/antd"; import { Form, Input, Select } from "antd"; -import { ITask, IPriority, IStatus, IAuthUser } from "interfaces"; +import type { ITask, IPriority, IStatus, IAuthUser } from "interfaces"; export const TaskEdit = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/blog-issue-tracker/src/pages/task/filter.tsx b/examples/blog-issue-tracker/src/pages/task/filter.tsx index ff359e755fc4..5ac61ccab066 100644 --- a/examples/blog-issue-tracker/src/pages/task/filter.tsx +++ b/examples/blog-issue-tracker/src/pages/task/filter.tsx @@ -2,9 +2,9 @@ import React from "react"; import { useSelect } from "@refinedev/antd"; import { SearchOutlined } from "@ant-design/icons"; -import { Form, FormProps, Input, Select, DatePicker, Button } from "antd"; +import { Form, type FormProps, Input, Select, DatePicker, Button } from "antd"; -import { ITask, IPriority, IStatus, IAuthUser } from "interfaces"; +import type { ITask, IPriority, IStatus, IAuthUser } from "interfaces"; const { RangePicker } = DatePicker; diff --git a/examples/blog-issue-tracker/src/pages/task/list.tsx b/examples/blog-issue-tracker/src/pages/task/list.tsx index 72258e61613a..986e9045ab4f 100644 --- a/examples/blog-issue-tracker/src/pages/task/list.tsx +++ b/examples/blog-issue-tracker/src/pages/task/list.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { useMany, HttpError, CrudFilters } from "@refinedev/core"; +import { useMany, type HttpError, type CrudFilters } from "@refinedev/core"; import { useTable, @@ -14,7 +14,7 @@ import { import { Table, Space, Row, Col, Card } from "antd"; -import { +import type { ILabel, IPriority, ITask, diff --git a/examples/blog-issue-tracker/src/pages/task/show.tsx b/examples/blog-issue-tracker/src/pages/task/show.tsx index 379733e4c3db..ea9844254a57 100644 --- a/examples/blog-issue-tracker/src/pages/task/show.tsx +++ b/examples/blog-issue-tracker/src/pages/task/show.tsx @@ -1,7 +1,7 @@ import { useShow, useOne } from "@refinedev/core"; import { Show, DateField } from "@refinedev/antd"; import { Typography, Tag } from "antd"; -import { ITask, ILabel, IPriority, IStatus, IAuthUser } from "interfaces"; +import type { ITask, ILabel, IPriority, IStatus, IAuthUser } from "interfaces"; const { Title, Text } = Typography; diff --git a/examples/blog-issue-tracker/src/pages/user/list.tsx b/examples/blog-issue-tracker/src/pages/user/list.tsx index db12ac50735a..61d18b4e371f 100644 --- a/examples/blog-issue-tracker/src/pages/user/list.tsx +++ b/examples/blog-issue-tracker/src/pages/user/list.tsx @@ -4,7 +4,7 @@ import { useTable, List } from "@refinedev/antd"; import { Table } from "antd"; -import { IAuthUser } from "interfaces"; +import type { IAuthUser } from "interfaces"; export const UserList = () => { const { tableProps } = useTable(); diff --git a/examples/blog-job-posting/src/pages/companies/create.tsx b/examples/blog-job-posting/src/pages/companies/create.tsx index 874c2cb660bb..66f4d71603ef 100644 --- a/examples/blog-job-posting/src/pages/companies/create.tsx +++ b/examples/blog-job-posting/src/pages/companies/create.tsx @@ -2,7 +2,7 @@ import { Create, useForm } from "@refinedev/antd"; import { Form, Input, Checkbox, Typography, Row, Col } from "antd"; -import { ICompany } from "interfaces"; +import type { ICompany } from "interfaces"; export const CompanyCreate = () => { const { Title } = Typography; diff --git a/examples/blog-job-posting/src/pages/companies/edit.tsx b/examples/blog-job-posting/src/pages/companies/edit.tsx index a2f5e68cf92e..22bbadea362d 100644 --- a/examples/blog-job-posting/src/pages/companies/edit.tsx +++ b/examples/blog-job-posting/src/pages/companies/edit.tsx @@ -2,7 +2,7 @@ import { Edit, useForm } from "@refinedev/antd"; import { Form, Input, Row, Col, Checkbox, Typography } from "antd"; -import { ICompany } from "interfaces"; +import type { ICompany } from "interfaces"; export const CompanyEdit = () => { const { Title } = Typography; diff --git a/examples/blog-job-posting/src/pages/companies/list.tsx b/examples/blog-job-posting/src/pages/companies/list.tsx index bc1e293d8e5c..f9b22986374f 100644 --- a/examples/blog-job-posting/src/pages/companies/list.tsx +++ b/examples/blog-job-posting/src/pages/companies/list.tsx @@ -11,7 +11,7 @@ import { import { Table, Space } from "antd"; -import { ICompany } from "interfaces"; +import type { ICompany } from "interfaces"; export const CompanyList = () => { const { tableProps, sorter } = useTable({ diff --git a/examples/blog-job-posting/src/pages/companies/show.tsx b/examples/blog-job-posting/src/pages/companies/show.tsx index 35ef2ad6938b..cee30b9c3007 100644 --- a/examples/blog-job-posting/src/pages/companies/show.tsx +++ b/examples/blog-job-posting/src/pages/companies/show.tsx @@ -3,7 +3,7 @@ import { Show } from "@refinedev/antd"; import { Typography } from "antd"; -import { ICompany } from "interfaces"; +import type { ICompany } from "interfaces"; const { Title, Text, Paragraph } = Typography; diff --git a/examples/blog-job-posting/src/pages/jobs/create.tsx b/examples/blog-job-posting/src/pages/jobs/create.tsx index 88a9d0072d10..527914e2c3a7 100644 --- a/examples/blog-job-posting/src/pages/jobs/create.tsx +++ b/examples/blog-job-posting/src/pages/jobs/create.tsx @@ -4,7 +4,7 @@ import { Form, Input, Checkbox, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { ICompany } from "interfaces"; +import type { ICompany } from "interfaces"; export const JobCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/blog-job-posting/src/pages/jobs/edit.tsx b/examples/blog-job-posting/src/pages/jobs/edit.tsx index 9bb778e8dbe1..ec875ea655b1 100644 --- a/examples/blog-job-posting/src/pages/jobs/edit.tsx +++ b/examples/blog-job-posting/src/pages/jobs/edit.tsx @@ -4,7 +4,7 @@ import { Form, Input, Checkbox, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { ICompany } from "interfaces"; +import type { ICompany } from "interfaces"; export const JobEdit = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/blog-job-posting/src/pages/jobs/list.tsx b/examples/blog-job-posting/src/pages/jobs/list.tsx index fff9def1c013..c441b5543428 100644 --- a/examples/blog-job-posting/src/pages/jobs/list.tsx +++ b/examples/blog-job-posting/src/pages/jobs/list.tsx @@ -14,7 +14,7 @@ import { import { Table, Space } from "antd"; -import { ICompany, IJob } from "interfaces"; +import type { ICompany, IJob } from "interfaces"; export const JobList = () => { const { tableProps, sorter } = useTable({ diff --git a/examples/blog-job-posting/src/pages/jobs/show.tsx b/examples/blog-job-posting/src/pages/jobs/show.tsx index 35ef2ad6938b..cee30b9c3007 100644 --- a/examples/blog-job-posting/src/pages/jobs/show.tsx +++ b/examples/blog-job-posting/src/pages/jobs/show.tsx @@ -3,7 +3,7 @@ import { Show } from "@refinedev/antd"; import { Typography } from "antd"; -import { ICompany } from "interfaces"; +import type { ICompany } from "interfaces"; const { Title, Text, Paragraph } = Typography; diff --git a/examples/blog-material-ui-datagrid/src/components/header/index.tsx b/examples/blog-material-ui-datagrid/src/components/header/index.tsx index 0a2bd9ac9195..688be306417f 100644 --- a/examples/blog-material-ui-datagrid/src/components/header/index.tsx +++ b/examples/blog-material-ui-datagrid/src/components/header/index.tsx @@ -7,7 +7,10 @@ import Stack from "@mui/material/Stack"; import Toolbar from "@mui/material/Toolbar"; import Typography from "@mui/material/Typography"; import { useGetIdentity } from "@refinedev/core"; -import { HamburgerMenu, RefineThemedLayoutV2HeaderProps } from "@refinedev/mui"; +import { + HamburgerMenu, + type RefineThemedLayoutV2HeaderProps, +} from "@refinedev/mui"; import React, { useContext } from "react"; import { ColorModeContext } from "../../contexts/color-mode"; diff --git a/examples/blog-material-ui-datagrid/src/components/layout/index.tsx b/examples/blog-material-ui-datagrid/src/components/layout/index.tsx index 9e5c542a541a..df6fb2401755 100644 --- a/examples/blog-material-ui-datagrid/src/components/layout/index.tsx +++ b/examples/blog-material-ui-datagrid/src/components/layout/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { LayoutProps } from "@refinedev/core"; +import type { LayoutProps } from "@refinedev/core"; import styled from "styled-components"; import { Header } from "../header"; diff --git a/examples/blog-material-ui-datagrid/src/contexts/color-mode/index.tsx b/examples/blog-material-ui-datagrid/src/contexts/color-mode/index.tsx index c07dfd514580..f0eae3c75de6 100644 --- a/examples/blog-material-ui-datagrid/src/contexts/color-mode/index.tsx +++ b/examples/blog-material-ui-datagrid/src/contexts/color-mode/index.tsx @@ -1,5 +1,5 @@ import React, { - PropsWithChildren, + type PropsWithChildren, createContext, useEffect, useState, diff --git a/examples/blog-material-ui-datagrid/src/pages/employees.tsx b/examples/blog-material-ui-datagrid/src/pages/employees.tsx index fff0bbc2deb5..d46cac83ffbd 100644 --- a/examples/blog-material-ui-datagrid/src/pages/employees.tsx +++ b/examples/blog-material-ui-datagrid/src/pages/employees.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useDataGrid, List } from "@refinedev/mui"; -import { DataGrid, GridColDef, GridToolbar } from "@mui/x-data-grid"; +import { DataGrid, type GridColDef, GridToolbar } from "@mui/x-data-grid"; import FormControlLabel from "@mui/material/FormControlLabel"; import Checkbox from "@mui/material/Checkbox"; diff --git a/examples/blog-material-ui/src/authProvider.ts b/examples/blog-material-ui/src/authProvider.ts index e6f42aa516db..c6753bbded7d 100644 --- a/examples/blog-material-ui/src/authProvider.ts +++ b/examples/blog-material-ui/src/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import { AuthHelper } from "@refinedev/strapi-v4"; import { TOKEN_KEY, API_URL } from "./constants"; diff --git a/examples/blog-material-ui/src/pages/posts/create.tsx b/examples/blog-material-ui/src/pages/posts/create.tsx index b5753c548bd5..234ad504c46b 100644 --- a/examples/blog-material-ui/src/pages/posts/create.tsx +++ b/examples/blog-material-ui/src/pages/posts/create.tsx @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { useAutocomplete, Create } from "@refinedev/mui"; import Box from "@mui/material/Box"; import TextField from "@mui/material/TextField"; @@ -7,7 +7,7 @@ import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; -import { IPost, ICategory, Nullable } from "interfaces"; +import type { IPost, ICategory, Nullable } from "interfaces"; export const PostCreate: React.FC = () => { const { diff --git a/examples/blog-material-ui/src/pages/posts/edit.tsx b/examples/blog-material-ui/src/pages/posts/edit.tsx index 4ddc626ee1aa..d76a37db722e 100644 --- a/examples/blog-material-ui/src/pages/posts/edit.tsx +++ b/examples/blog-material-ui/src/pages/posts/edit.tsx @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; import { Edit, useAutocomplete } from "@refinedev/mui"; @@ -7,7 +7,7 @@ import Box from "@mui/material/Box"; import TextField from "@mui/material/TextField"; import Autocomplete from "@mui/material/Autocomplete"; -import { IPost, ICategory, Nullable } from "interfaces"; +import type { IPost, ICategory, Nullable } from "interfaces"; export const PostEdit: React.FC = () => { const { diff --git a/examples/blog-material-ui/src/pages/posts/list.tsx b/examples/blog-material-ui/src/pages/posts/list.tsx index 17baed02c44f..91238051e678 100644 --- a/examples/blog-material-ui/src/pages/posts/list.tsx +++ b/examples/blog-material-ui/src/pages/posts/list.tsx @@ -8,9 +8,9 @@ import { import React from "react"; import Stack from "@mui/material/Stack"; -import { DataGrid, GridColDef } from "@mui/x-data-grid"; +import { DataGrid, type GridColDef } from "@mui/x-data-grid"; -import { IPost } from "interfaces"; +import type { IPost } from "interfaces"; export const PostList: React.FC = () => { const { dataGridProps } = useDataGrid({ diff --git a/examples/blog-material-ui/src/reportWebVitals.ts b/examples/blog-material-ui/src/reportWebVitals.ts index 5fa3583b7500..ad7f32fc1dee 100644 --- a/examples/blog-material-ui/src/reportWebVitals.ts +++ b/examples/blog-material-ui/src/reportWebVitals.ts @@ -1,4 +1,4 @@ -import { ReportHandler } from "web-vitals"; +import type { ReportHandler } from "web-vitals"; const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { diff --git a/examples/blog-next-refine-pwa/pages/_app.tsx b/examples/blog-next-refine-pwa/pages/_app.tsx index 1ab85d4888b2..ccb222536267 100644 --- a/examples/blog-next-refine-pwa/pages/_app.tsx +++ b/examples/blog-next-refine-pwa/pages/_app.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { AppProps } from "next/app"; +import type { AppProps } from "next/app"; import { GitHubBanner, Refine } from "@refinedev/core"; import routerProvider, { UnsavedChangesNotifier, diff --git a/examples/blog-next-refine-pwa/pages/index.tsx b/examples/blog-next-refine-pwa/pages/index.tsx index 6b0705b83dc8..ffebbd581cd0 100644 --- a/examples/blog-next-refine-pwa/pages/index.tsx +++ b/examples/blog-next-refine-pwa/pages/index.tsx @@ -1,6 +1,6 @@ -import { GetServerSideProps } from "next"; +import type { GetServerSideProps } from "next"; import dataProvider from "@refinedev/simple-rest"; -import { GetListResponse, useTable } from "@refinedev/core"; +import { type GetListResponse, useTable } from "@refinedev/core"; import ProductCards from "@components/ProductCards"; diff --git a/examples/blog-next-refine-pwa/src/components/Layout.tsx b/examples/blog-next-refine-pwa/src/components/Layout.tsx index 8491adecbf85..527d7fb61c56 100644 --- a/examples/blog-next-refine-pwa/src/components/Layout.tsx +++ b/examples/blog-next-refine-pwa/src/components/Layout.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { LayoutProps } from "@refinedev/core"; +import type { LayoutProps } from "@refinedev/core"; export const Layout: React.FC = ({ children }) => { return ( diff --git a/examples/blog-ra-chakra-tutorial/src/authProvider.ts b/examples/blog-ra-chakra-tutorial/src/authProvider.ts index 84d2a13b6da4..c0e73b5ca2bb 100644 --- a/examples/blog-ra-chakra-tutorial/src/authProvider.ts +++ b/examples/blog-ra-chakra-tutorial/src/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import { AuthHelper } from "@refinedev/strapi-v4"; import { API_URL, TOKEN_KEY } from "./constants"; diff --git a/examples/blog-ra-chakra-tutorial/src/components/column-filter/index.tsx b/examples/blog-ra-chakra-tutorial/src/components/column-filter/index.tsx index 74764fa10bd0..03bc087cfff2 100644 --- a/examples/blog-ra-chakra-tutorial/src/components/column-filter/index.tsx +++ b/examples/blog-ra-chakra-tutorial/src/components/column-filter/index.tsx @@ -9,7 +9,7 @@ import { HStack, } from "@chakra-ui/react"; import { IconFilter, IconX, IconCheck } from "@tabler/icons-react"; -import { Column } from "@tanstack/react-table"; +import type { Column } from "@tanstack/react-table"; export const ColumnFilter: React.FC<{ column: Column }> = ({ column, diff --git a/examples/blog-ra-chakra-tutorial/src/components/column-sorter/index.tsx b/examples/blog-ra-chakra-tutorial/src/components/column-sorter/index.tsx index ccaa26d8a02b..f80254064f01 100644 --- a/examples/blog-ra-chakra-tutorial/src/components/column-sorter/index.tsx +++ b/examples/blog-ra-chakra-tutorial/src/components/column-sorter/index.tsx @@ -4,7 +4,7 @@ import { IconSelector, IconChevronUp, } from "@tabler/icons-react"; -import { Column } from "@tanstack/react-table"; +import type { Column } from "@tanstack/react-table"; export const ColumnSorter: React.FC<{ column: Column }> = ({ column, diff --git a/examples/blog-ra-chakra-tutorial/src/components/pagination/index.tsx b/examples/blog-ra-chakra-tutorial/src/components/pagination/index.tsx index 2d2fc2239993..1f3c65d6ebb0 100644 --- a/examples/blog-ra-chakra-tutorial/src/components/pagination/index.tsx +++ b/examples/blog-ra-chakra-tutorial/src/components/pagination/index.tsx @@ -1,4 +1,4 @@ -import { FC } from "react"; +import type { FC } from "react"; import { HStack, Button, Box } from "@chakra-ui/react"; import { IconChevronRight, IconChevronLeft } from "@tabler/icons-react"; import { usePagination } from "@refinedev/chakra-ui"; diff --git a/examples/blog-ra-chakra-tutorial/src/pages/posts/list.tsx b/examples/blog-ra-chakra-tutorial/src/pages/posts/list.tsx index 87acce89e205..211b90138cfe 100644 --- a/examples/blog-ra-chakra-tutorial/src/pages/posts/list.tsx +++ b/examples/blog-ra-chakra-tutorial/src/pages/posts/list.tsx @@ -17,11 +17,11 @@ import { TableContainer, HStack, } from "@chakra-ui/react"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { Pagination } from "../../components/pagination"; import { ColumnSorter } from "../../components/column-sorter"; import { ColumnFilter } from "../../components/column-filter"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostList = () => { const columns = React.useMemo[]>( diff --git a/examples/blog-react-aria/src/components/Button.tsx b/examples/blog-react-aria/src/components/Button.tsx index 7f9b4d60ca4c..368b08840626 100644 --- a/examples/blog-react-aria/src/components/Button.tsx +++ b/examples/blog-react-aria/src/components/Button.tsx @@ -1,6 +1,6 @@ -import React, { ElementType, RefObject } from "react"; +import React, { type ElementType, type RefObject } from "react"; import { useButton } from "@react-aria/button"; -import { AriaButtonProps } from "react-aria"; +import type { AriaButtonProps } from "react-aria"; // eslint-disable-next-line export default function Button(props: AriaButtonProps | any) { diff --git a/examples/blog-react-aria/src/components/Header.tsx b/examples/blog-react-aria/src/components/Header.tsx index e8e3498f0b94..83c59c581000 100644 --- a/examples/blog-react-aria/src/components/Header.tsx +++ b/examples/blog-react-aria/src/components/Header.tsx @@ -1,6 +1,6 @@ -import React, { ElementType } from "react"; +import React, { type ElementType } from "react"; import { useHover } from "@react-aria/interactions"; -import { AriaButtonProps } from "react-aria"; +import type { AriaButtonProps } from "react-aria"; // eslint-disable-next-line export default function Header(props: AriaButtonProps | any) { diff --git a/examples/blog-react-aria/src/components/Input.tsx b/examples/blog-react-aria/src/components/Input.tsx index 93a371ef25df..3d13be91d1d4 100644 --- a/examples/blog-react-aria/src/components/Input.tsx +++ b/examples/blog-react-aria/src/components/Input.tsx @@ -1,6 +1,6 @@ -import React, { RefObject } from "react"; +import React, { type RefObject } from "react"; import { useTextField } from "@react-aria/textfield"; -import { AriaTextFieldProps } from "react-aria"; +import type { AriaTextFieldProps } from "react-aria"; export default function Input(props: AriaTextFieldProps) { // eslint-disable-next-line diff --git a/examples/blog-react-aria/src/components/Layout.tsx b/examples/blog-react-aria/src/components/Layout.tsx index 87c778c382cc..b71d5686d4c0 100644 --- a/examples/blog-react-aria/src/components/Layout.tsx +++ b/examples/blog-react-aria/src/components/Layout.tsx @@ -1,4 +1,4 @@ -import { useMenu, useNavigation, LayoutProps } from "@refinedev/core"; +import { useMenu, useNavigation, type LayoutProps } from "@refinedev/core"; export const Layout: React.FC = ({ children }) => { const { menuItems } = useMenu(); diff --git a/examples/blog-react-aria/src/components/Modal.tsx b/examples/blog-react-aria/src/components/Modal.tsx index 2cd99a7b6b81..b0d24b71dd1f 100644 --- a/examples/blog-react-aria/src/components/Modal.tsx +++ b/examples/blog-react-aria/src/components/Modal.tsx @@ -1,5 +1,9 @@ -import React, { ElementType, RefObject, PropsWithChildren } from "react"; -import { OverlayTriggerState } from "@react-stately/overlays"; +import React, { + type ElementType, + type RefObject, + type PropsWithChildren, +} from "react"; +import type { OverlayTriggerState } from "@react-stately/overlays"; import { useOverlay, usePreventScroll, @@ -8,7 +12,7 @@ import { } from "@react-aria/overlays"; import { useDialog } from "@react-aria/dialog"; import { FocusScope } from "@react-aria/focus"; -import { AriaButtonProps, OverlayProvider } from "react-aria"; +import { type AriaButtonProps, OverlayProvider } from "react-aria"; // eslint-disable-next-line function ModalDialog(props: AriaButtonProps | any) { diff --git a/examples/blog-react-aria/src/pages/category/create.tsx b/examples/blog-react-aria/src/pages/category/create.tsx index e30816dd42ad..5a3d658a538e 100644 --- a/examples/blog-react-aria/src/pages/category/create.tsx +++ b/examples/blog-react-aria/src/pages/category/create.tsx @@ -1,6 +1,6 @@ import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { useOverlayTriggerState } from "@react-stately/overlays"; import Modal from "../../components/Modal"; diff --git a/examples/blog-react-aria/src/pages/category/list.tsx b/examples/blog-react-aria/src/pages/category/list.tsx index d76154004a36..dc92b0860e16 100644 --- a/examples/blog-react-aria/src/pages/category/list.tsx +++ b/examples/blog-react-aria/src/pages/category/list.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { CategoryCreate } from "./create"; export const CategoryList: React.FC = () => { diff --git a/examples/blog-react-aria/src/reportWebVitals.ts b/examples/blog-react-aria/src/reportWebVitals.ts index 5fa3583b7500..ad7f32fc1dee 100644 --- a/examples/blog-react-aria/src/reportWebVitals.ts +++ b/examples/blog-react-aria/src/reportWebVitals.ts @@ -1,4 +1,4 @@ -import { ReportHandler } from "web-vitals"; +import type { ReportHandler } from "web-vitals"; const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { diff --git a/examples/blog-react-dnd/src/components/constants/models.ts b/examples/blog-react-dnd/src/components/constants/models.ts index 23dbfaa4dd4c..fa6e2918bbeb 100644 --- a/examples/blog-react-dnd/src/components/constants/models.ts +++ b/examples/blog-react-dnd/src/components/constants/models.ts @@ -1,4 +1,4 @@ -import { ColumnTypes } from "./enums"; +import type { ColumnTypes } from "./enums"; export interface OrderProps { id: number; diff --git a/examples/blog-react-dnd/src/components/constants/useData.ts b/examples/blog-react-dnd/src/components/constants/useData.ts index 2550f9fdc099..ec45a1f77dcd 100644 --- a/examples/blog-react-dnd/src/components/constants/useData.ts +++ b/examples/blog-react-dnd/src/components/constants/useData.ts @@ -1,6 +1,6 @@ import React from "react"; import { ColumnTypes } from "./enums"; -import { IProduct } from "components/constants/models"; +import type { IProduct } from "components/constants/models"; import { useList } from "@refinedev/core"; function useData() { diff --git a/examples/blog-react-dnd/src/contexts/index.tsx b/examples/blog-react-dnd/src/contexts/index.tsx index 4e7d11093b55..469c5c0eac00 100644 --- a/examples/blog-react-dnd/src/contexts/index.tsx +++ b/examples/blog-react-dnd/src/contexts/index.tsx @@ -1,5 +1,5 @@ import React, { - PropsWithChildren, + type PropsWithChildren, createContext, useEffect, useState, diff --git a/examples/blog-react-dnd/src/pages/posts/create.tsx b/examples/blog-react-dnd/src/pages/posts/create.tsx index 82adbeb1583a..42d39e4a72a3 100644 --- a/examples/blog-react-dnd/src/pages/posts/create.tsx +++ b/examples/blog-react-dnd/src/pages/posts/create.tsx @@ -3,7 +3,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "interfaces"; +import type { IPost, ICategory } from "interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/blog-react-dnd/src/pages/posts/edit.tsx b/examples/blog-react-dnd/src/pages/posts/edit.tsx index 5328e0266f69..f824a86f7a06 100644 --- a/examples/blog-react-dnd/src/pages/posts/edit.tsx +++ b/examples/blog-react-dnd/src/pages/posts/edit.tsx @@ -3,7 +3,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost } from "interfaces"; +import type { IPost } from "interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/blog-react-dnd/src/pages/posts/list.tsx b/examples/blog-react-dnd/src/pages/posts/list.tsx index 2c44e7c8e5c9..06a7b9838722 100644 --- a/examples/blog-react-dnd/src/pages/posts/list.tsx +++ b/examples/blog-react-dnd/src/pages/posts/list.tsx @@ -14,7 +14,7 @@ import { } from "@refinedev/antd"; import { Form, Input, Select, Table, Space } from "antd"; -import { IPost, ICategory } from "interfaces"; +import type { IPost, ICategory } from "interfaces"; export const PostList = () => { const { tableProps, sorter } = useTable({ diff --git a/examples/blog-react-dnd/src/pages/posts/show.tsx b/examples/blog-react-dnd/src/pages/posts/show.tsx index 2e49409e2da6..19c21ed8b8eb 100644 --- a/examples/blog-react-dnd/src/pages/posts/show.tsx +++ b/examples/blog-react-dnd/src/pages/posts/show.tsx @@ -2,7 +2,7 @@ import { useOne, useShow } from "@refinedev/core"; import { Show, MarkdownField } from "@refinedev/antd"; import { Typography, Tag } from "antd"; -import { IPost, ICategory } from "interfaces"; +import type { IPost, ICategory } from "interfaces"; const { Title, Text } = Typography; diff --git a/examples/blog-react-dnd/src/reportWebVitals.ts b/examples/blog-react-dnd/src/reportWebVitals.ts index 5fa3583b7500..ad7f32fc1dee 100644 --- a/examples/blog-react-dnd/src/reportWebVitals.ts +++ b/examples/blog-react-dnd/src/reportWebVitals.ts @@ -1,4 +1,4 @@ -import { ReportHandler } from "web-vitals"; +import type { ReportHandler } from "web-vitals"; const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { diff --git a/examples/blog-react-hook-dynamic-form/src/pages/userEdit.tsx b/examples/blog-react-hook-dynamic-form/src/pages/userEdit.tsx index 33bb41fe942d..a5a660d70086 100644 --- a/examples/blog-react-hook-dynamic-form/src/pages/userEdit.tsx +++ b/examples/blog-react-hook-dynamic-form/src/pages/userEdit.tsx @@ -6,7 +6,7 @@ import DeleteIcon from "@mui/icons-material/Delete"; import { useForm } from "@refinedev/react-hook-form"; import { Controller, useFieldArray } from "react-hook-form"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; interface IPost { firstName: string; diff --git a/examples/blog-react-hook-dynamic-form/src/pages/userList.tsx b/examples/blog-react-hook-dynamic-form/src/pages/userList.tsx index 81473898edb1..c7c42ace7e61 100644 --- a/examples/blog-react-hook-dynamic-form/src/pages/userList.tsx +++ b/examples/blog-react-hook-dynamic-form/src/pages/userList.tsx @@ -2,7 +2,7 @@ import { DeleteButton, EditButton, List, useDataGrid } from "@refinedev/mui"; import React from "react"; import Stack from "@mui/material/Stack"; -import { DataGrid, GridColDef } from "@mui/x-data-grid"; +import { DataGrid, type GridColDef } from "@mui/x-data-grid"; interface IPost { firstName: string; diff --git a/examples/blog-react-hook-dynamic-form/src/reportWebVitals.ts b/examples/blog-react-hook-dynamic-form/src/reportWebVitals.ts index 5fa3583b7500..ad7f32fc1dee 100644 --- a/examples/blog-react-hook-dynamic-form/src/reportWebVitals.ts +++ b/examples/blog-react-hook-dynamic-form/src/reportWebVitals.ts @@ -1,4 +1,4 @@ -import { ReportHandler } from "web-vitals"; +import type { ReportHandler } from "web-vitals"; const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { diff --git a/examples/blog-react-hot-toast/src/components/layout/index.tsx b/examples/blog-react-hot-toast/src/components/layout/index.tsx index d6cef81f094a..1f1ec3a36ee8 100644 --- a/examples/blog-react-hot-toast/src/components/layout/index.tsx +++ b/examples/blog-react-hot-toast/src/components/layout/index.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { Breadcrumb } from "../breadcrumb"; import { Menu } from "../menu"; diff --git a/examples/blog-react-hot-toast/src/providers/notificationProvider.tsx b/examples/blog-react-hot-toast/src/providers/notificationProvider.tsx index bdf542f28f3c..8df9ed0018a2 100644 --- a/examples/blog-react-hot-toast/src/providers/notificationProvider.tsx +++ b/examples/blog-react-hot-toast/src/providers/notificationProvider.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { NotificationProvider } from "@refinedev/core"; +import type { NotificationProvider } from "@refinedev/core"; import toast from "react-hot-toast"; export const notificationProvider: NotificationProvider = { diff --git a/examples/blog-react-toastify/src/components/layout/index.tsx b/examples/blog-react-toastify/src/components/layout/index.tsx index d6cef81f094a..1f1ec3a36ee8 100644 --- a/examples/blog-react-toastify/src/components/layout/index.tsx +++ b/examples/blog-react-toastify/src/components/layout/index.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { Breadcrumb } from "../breadcrumb"; import { Menu } from "../menu"; diff --git a/examples/blog-react-toastify/src/providers/notificationProvider.tsx b/examples/blog-react-toastify/src/providers/notificationProvider.tsx index 42ff8e0738f6..8d4ad09f1e99 100644 --- a/examples/blog-react-toastify/src/providers/notificationProvider.tsx +++ b/examples/blog-react-toastify/src/providers/notificationProvider.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { NotificationProvider } from "@refinedev/core"; +import type { NotificationProvider } from "@refinedev/core"; import { toast } from "react-toastify"; import { UndoableNotification } from "../components/undoable-notification"; diff --git a/examples/blog-refine-airtable-crud/src/components/Layout.tsx b/examples/blog-refine-airtable-crud/src/components/Layout.tsx index 903ec8ed0967..4dec820ad506 100644 --- a/examples/blog-refine-airtable-crud/src/components/Layout.tsx +++ b/examples/blog-refine-airtable-crud/src/components/Layout.tsx @@ -1,4 +1,4 @@ -import { useMenu, useNavigation, LayoutProps } from "@refinedev/core"; +import { useMenu, useNavigation, type LayoutProps } from "@refinedev/core"; import routerProvider from "@refinedev/react-router-v6/legacy"; const { Link } = routerProvider; diff --git a/examples/blog-refine-airtable-crud/src/pages/post/list.tsx b/examples/blog-refine-airtable-crud/src/pages/post/list.tsx index 88ed536e8eea..dc7abbb1f6cc 100644 --- a/examples/blog-refine-airtable-crud/src/pages/post/list.tsx +++ b/examples/blog-refine-airtable-crud/src/pages/post/list.tsx @@ -1,11 +1,11 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; -import { ICategory, IPost } from "../../interfaces/post"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; +import type { ICategory, IPost } from "../../interfaces/post"; import { useNavigation, useDelete, - GetManyResponse, + type GetManyResponse, useMany, } from "@refinedev/core"; diff --git a/examples/blog-refine-airtable-crud/src/pages/post/show.tsx b/examples/blog-refine-airtable-crud/src/pages/post/show.tsx index 223eb978c7af..765344f8c252 100644 --- a/examples/blog-refine-airtable-crud/src/pages/post/show.tsx +++ b/examples/blog-refine-airtable-crud/src/pages/post/show.tsx @@ -1,6 +1,6 @@ import { useShow } from "@refinedev/core"; -import { IPost } from "../../interfaces/post"; +import type { IPost } from "../../interfaces/post"; export const PostShow: React.FC = () => { const { queryResult } = useShow(); diff --git a/examples/blog-refine-airtable-crud/src/reportWebVitals.ts b/examples/blog-refine-airtable-crud/src/reportWebVitals.ts index 5fa3583b7500..ad7f32fc1dee 100644 --- a/examples/blog-refine-airtable-crud/src/reportWebVitals.ts +++ b/examples/blog-refine-airtable-crud/src/reportWebVitals.ts @@ -1,4 +1,4 @@ -import { ReportHandler } from "web-vitals"; +import type { ReportHandler } from "web-vitals"; const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { diff --git a/examples/blog-refine-antd-dynamic-form/src/reportWebVitals.ts b/examples/blog-refine-antd-dynamic-form/src/reportWebVitals.ts index 5fa3583b7500..ad7f32fc1dee 100644 --- a/examples/blog-refine-antd-dynamic-form/src/reportWebVitals.ts +++ b/examples/blog-refine-antd-dynamic-form/src/reportWebVitals.ts @@ -1,4 +1,4 @@ -import { ReportHandler } from "web-vitals"; +import type { ReportHandler } from "web-vitals"; const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { diff --git a/examples/blog-refine-daisyui/src/components/dashboard/RecentSales.tsx b/examples/blog-refine-daisyui/src/components/dashboard/RecentSales.tsx index 757cc56032be..a7b072114873 100644 --- a/examples/blog-refine-daisyui/src/components/dashboard/RecentSales.tsx +++ b/examples/blog-refine-daisyui/src/components/dashboard/RecentSales.tsx @@ -1,7 +1,7 @@ import React, { useMemo, useRef } from "react"; import { getDefaultFilter } from "@refinedev/core"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { FunnelIcon, BarsArrowDownIcon, diff --git a/examples/blog-refine-daisyui/src/components/dashboard/ResponsiveAreaChart.tsx b/examples/blog-refine-daisyui/src/components/dashboard/ResponsiveAreaChart.tsx index 4e0e5521665c..c338e5aa4649 100644 --- a/examples/blog-refine-daisyui/src/components/dashboard/ResponsiveAreaChart.tsx +++ b/examples/blog-refine-daisyui/src/components/dashboard/ResponsiveAreaChart.tsx @@ -9,7 +9,7 @@ import { Area, } from "recharts"; import { ChartTooltip } from "../../components/dashboard/ChartTooltip"; -import { IChartDatum } from "../../interfaces"; +import type { IChartDatum } from "../../interfaces"; type TResponsiveAreaChartProps = { kpi: string; diff --git a/examples/blog-refine-daisyui/src/components/dashboard/ResponsiveBarChart.tsx b/examples/blog-refine-daisyui/src/components/dashboard/ResponsiveBarChart.tsx index fdd789ee9e6b..8455a2a8192f 100644 --- a/examples/blog-refine-daisyui/src/components/dashboard/ResponsiveBarChart.tsx +++ b/examples/blog-refine-daisyui/src/components/dashboard/ResponsiveBarChart.tsx @@ -9,7 +9,7 @@ import { Bar, } from "recharts"; import { ChartTooltip } from "../../components/dashboard/ChartTooltip"; -import { IChartDatum } from "../../interfaces"; +import type { IChartDatum } from "../../interfaces"; type TResponsiveBarChartProps = { kpi: string; diff --git a/examples/blog-refine-daisyui/src/components/dashboard/Stats.tsx b/examples/blog-refine-daisyui/src/components/dashboard/Stats.tsx index 7a1e6b409ad3..1d5e7812af19 100644 --- a/examples/blog-refine-daisyui/src/components/dashboard/Stats.tsx +++ b/examples/blog-refine-daisyui/src/components/dashboard/Stats.tsx @@ -1,12 +1,12 @@ import React from "react"; import { KpiCard } from "./KpiCard"; -import { IChartDatum } from "../../interfaces"; +import type { IChartDatum } from "../../interfaces"; import { CurrencyDollarIcon, ShoppingCartIcon, UserGroupIcon, } from "@heroicons/react/24/outline"; -import { GetListResponse } from "@refinedev/core"; +import type { GetListResponse } from "@refinedev/core"; type TStats = { dailyRevenue?: GetListResponse; diff --git a/examples/blog-refine-daisyui/src/components/dashboard/TabView.tsx b/examples/blog-refine-daisyui/src/components/dashboard/TabView.tsx index f9408327303c..fe705716394d 100644 --- a/examples/blog-refine-daisyui/src/components/dashboard/TabView.tsx +++ b/examples/blog-refine-daisyui/src/components/dashboard/TabView.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { TabItem } from "./TabItem"; import { TabPanel } from "./TabPanel"; -import { TTab } from "../../interfaces"; +import type { TTab } from "../../interfaces"; type TTabViewProps = { tabs: TTab[]; diff --git a/examples/blog-refine-daisyui/src/components/layout/index.tsx b/examples/blog-refine-daisyui/src/components/layout/index.tsx index 9a4a04036e73..98a6dc3e5da9 100644 --- a/examples/blog-refine-daisyui/src/components/layout/index.tsx +++ b/examples/blog-refine-daisyui/src/components/layout/index.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { Breadcrumb } from "../breadcrumb"; import { Menu } from "../menu"; diff --git a/examples/blog-refine-daisyui/src/pages/categories/list.tsx b/examples/blog-refine-daisyui/src/pages/categories/list.tsx index e41b06c337c0..0e4a0485bac9 100644 --- a/examples/blog-refine-daisyui/src/pages/categories/list.tsx +++ b/examples/blog-refine-daisyui/src/pages/categories/list.tsx @@ -1,7 +1,7 @@ import React, { useRef } from "react"; import { getDefaultFilter, useDelete, useNavigation } from "@refinedev/core"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { PlusIcon } from "@heroicons/react/20/solid"; import { FunnelIcon, @@ -11,7 +11,7 @@ import { BarsArrowDownIcon, BarsArrowUpIcon, } from "@heroicons/react/24/outline"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryList = () => { const filterForm: any = useRef(null); diff --git a/examples/blog-refine-daisyui/src/pages/categories/show.tsx b/examples/blog-refine-daisyui/src/pages/categories/show.tsx index 68046a8bb7b2..21d97c420716 100644 --- a/examples/blog-refine-daisyui/src/pages/categories/show.tsx +++ b/examples/blog-refine-daisyui/src/pages/categories/show.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useShow, useNavigation } from "@refinedev/core"; import { ArrowLeftIcon, PencilSquareIcon } from "@heroicons/react/24/outline"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryShow = () => { const { edit, list } = useNavigation(); diff --git a/examples/blog-refine-daisyui/src/pages/dashboard/index.tsx b/examples/blog-refine-daisyui/src/pages/dashboard/index.tsx index a04b2b2aad3b..fe2aa33c6cc4 100644 --- a/examples/blog-refine-daisyui/src/pages/dashboard/index.tsx +++ b/examples/blog-refine-daisyui/src/pages/dashboard/index.tsx @@ -1,12 +1,12 @@ import React, { useMemo } from "react"; -import { CrudFilter, useList } from "@refinedev/core"; +import { type CrudFilter, useList } from "@refinedev/core"; import dayjs from "dayjs"; import Stats from "../../components/dashboard/Stats"; import { ResponsiveAreaChart } from "../../components/dashboard/ResponsiveAreaChart"; import { ResponsiveBarChart } from "../../components/dashboard/ResponsiveBarChart"; import { TabView } from "../../components/dashboard/TabView"; import { RecentSales } from "../../components/dashboard/RecentSales"; -import { IChartDatum, TTab } from "../../interfaces"; +import type { IChartDatum, TTab } from "../../interfaces"; const filters: CrudFilter[] = [ { diff --git a/examples/blog-refine-daisyui/src/pages/products/list.tsx b/examples/blog-refine-daisyui/src/pages/products/list.tsx index a574fe559073..b3b54bcd0c56 100644 --- a/examples/blog-refine-daisyui/src/pages/products/list.tsx +++ b/examples/blog-refine-daisyui/src/pages/products/list.tsx @@ -1,7 +1,7 @@ import React, { useRef } from "react"; import { getDefaultFilter, useDelete, useNavigation } from "@refinedev/core"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { PlusIcon } from "@heroicons/react/20/solid"; import { FunnelIcon, diff --git a/examples/blog-refine-daisyui/src/pages/products/show.tsx b/examples/blog-refine-daisyui/src/pages/products/show.tsx index 0901b47301a2..5c4ef873d6c0 100644 --- a/examples/blog-refine-daisyui/src/pages/products/show.tsx +++ b/examples/blog-refine-daisyui/src/pages/products/show.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useShow, useNavigation } from "@refinedev/core"; import { ArrowLeftIcon, PencilSquareIcon } from "@heroicons/react/24/outline"; -import { IProduct } from "../../interfaces"; +import type { IProduct } from "../../interfaces"; export const ProductShow = () => { const { edit, list } = useNavigation(); diff --git a/examples/blog-refine-digital-ocean/src/components/dealChart/index.tsx b/examples/blog-refine-digital-ocean/src/components/dealChart/index.tsx index cf74996e7c09..ca982b11d0e6 100644 --- a/examples/blog-refine-digital-ocean/src/components/dealChart/index.tsx +++ b/examples/blog-refine-digital-ocean/src/components/dealChart/index.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from "react"; import { useList } from "@refinedev/core"; import { Card, Typography } from "antd"; -import { Area, AreaConfig } from "@ant-design/plots"; +import { Area, type AreaConfig } from "@ant-design/plots"; import { DollarOutlined } from "@ant-design/icons"; import dayjs from "dayjs"; diff --git a/examples/blog-refine-digital-ocean/src/components/metricCard/index.tsx b/examples/blog-refine-digital-ocean/src/components/metricCard/index.tsx index 8b5b91545b47..cde1b95f0661 100644 --- a/examples/blog-refine-digital-ocean/src/components/metricCard/index.tsx +++ b/examples/blog-refine-digital-ocean/src/components/metricCard/index.tsx @@ -1,7 +1,7 @@ -import React, { FC, PropsWithChildren } from "react"; +import React, { type FC, type PropsWithChildren } from "react"; import { Card, Skeleton, Typography } from "antd"; import { useList } from "@refinedev/core"; -import { Area, AreaConfig } from "@ant-design/plots"; +import { Area, type AreaConfig } from "@ant-design/plots"; import { AuditOutlined, ShopOutlined, TeamOutlined } from "@ant-design/icons"; type MetricType = "companies" | "contacts" | "deals"; diff --git a/examples/blog-refine-digital-ocean/src/contexts/color-mode/index.tsx b/examples/blog-refine-digital-ocean/src/contexts/color-mode/index.tsx index caf346b6f5ed..fd9141b77702 100644 --- a/examples/blog-refine-digital-ocean/src/contexts/color-mode/index.tsx +++ b/examples/blog-refine-digital-ocean/src/contexts/color-mode/index.tsx @@ -1,4 +1,9 @@ -import { PropsWithChildren, createContext, useEffect, useState } from "react"; +import { + type PropsWithChildren, + createContext, + useEffect, + useState, +} from "react"; import { ConfigProvider, theme } from "antd"; import { RefineThemes } from "@refinedev/antd"; diff --git a/examples/blog-refine-digital-ocean/src/pages/companies/list.tsx b/examples/blog-refine-digital-ocean/src/pages/companies/list.tsx index a3333fcf5457..7cfd7cbe56c4 100644 --- a/examples/blog-refine-digital-ocean/src/pages/companies/list.tsx +++ b/examples/blog-refine-digital-ocean/src/pages/companies/list.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { BaseRecord } from "@refinedev/core"; +import type { BaseRecord } from "@refinedev/core"; import { useTable, List, diff --git a/examples/blog-refine-digital-ocean/src/pages/contacts/list.tsx b/examples/blog-refine-digital-ocean/src/pages/contacts/list.tsx index d7b63b229fb4..0ccbc81b6432 100644 --- a/examples/blog-refine-digital-ocean/src/pages/contacts/list.tsx +++ b/examples/blog-refine-digital-ocean/src/pages/contacts/list.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { BaseRecord } from "@refinedev/core"; +import type { BaseRecord } from "@refinedev/core"; import { useTable, List, diff --git a/examples/blog-refine-mantine-strapi/src/App.tsx b/examples/blog-refine-mantine-strapi/src/App.tsx index 191de1180bf8..49cde7261518 100644 --- a/examples/blog-refine-mantine-strapi/src/App.tsx +++ b/examples/blog-refine-mantine-strapi/src/App.tsx @@ -18,7 +18,7 @@ import { MantineProvider, Global, ColorSchemeProvider, - ColorScheme, + type ColorScheme, } from "@mantine/core"; import { NotificationsProvider } from "@mantine/notifications"; import { useLocalStorage } from "@mantine/hooks"; @@ -27,7 +27,7 @@ import { MantineCreateInferencer, MantineEditInferencer, MantineShowInferencer, - InferField, + type InferField, } from "@refinedev/inferencer/mantine"; import { Header } from "./components/header"; diff --git a/examples/blog-refine-mantine-strapi/src/authProvider.ts b/examples/blog-refine-mantine-strapi/src/authProvider.ts index a9e444f46333..bfb705126b06 100644 --- a/examples/blog-refine-mantine-strapi/src/authProvider.ts +++ b/examples/blog-refine-mantine-strapi/src/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import { AuthHelper } from "@refinedev/strapi-v4"; import { TOKEN_KEY, API_URL } from "./constants"; diff --git a/examples/blog-refine-mantine-strapi/src/components/header/index.tsx b/examples/blog-refine-mantine-strapi/src/components/header/index.tsx index 5b4fe1d39e16..9c00528c2aae 100644 --- a/examples/blog-refine-mantine-strapi/src/components/header/index.tsx +++ b/examples/blog-refine-mantine-strapi/src/components/header/index.tsx @@ -4,7 +4,7 @@ import { Flex, Group, Header as MantineHeader, - Sx, + type Sx, Title, useMantineColorScheme, useMantineTheme, @@ -12,7 +12,7 @@ import { import { useGetIdentity } from "@refinedev/core"; import { HamburgerMenu, - RefineThemedLayoutV2HeaderProps, + type RefineThemedLayoutV2HeaderProps, } from "@refinedev/mantine"; import { IconMoonStars, IconSun } from "@tabler/icons-react"; import React from "react"; diff --git a/examples/blog-refine-mantine-strapi/src/pages/posts/create.tsx b/examples/blog-refine-mantine-strapi/src/pages/posts/create.tsx index 4a3e83b7579b..829d2dd7fa42 100644 --- a/examples/blog-refine-mantine-strapi/src/pages/posts/create.tsx +++ b/examples/blog-refine-mantine-strapi/src/pages/posts/create.tsx @@ -1,7 +1,7 @@ import { Create, useForm, useSelect } from "@refinedev/mantine"; import { TextInput, Select } from "@mantine/core"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const PostCreate = () => { const { diff --git a/examples/blog-refine-mantine-strapi/src/pages/posts/edit.tsx b/examples/blog-refine-mantine-strapi/src/pages/posts/edit.tsx index ff0bd626927c..f28cffd91a12 100644 --- a/examples/blog-refine-mantine-strapi/src/pages/posts/edit.tsx +++ b/examples/blog-refine-mantine-strapi/src/pages/posts/edit.tsx @@ -1,7 +1,7 @@ import { Edit, useForm, useSelect } from "@refinedev/mantine"; import { TextInput, Select } from "@mantine/core"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const PostEdit = () => { const { diff --git a/examples/blog-refine-mantine-strapi/src/pages/posts/list.tsx b/examples/blog-refine-mantine-strapi/src/pages/posts/list.tsx index 9fd8b6df1a4c..fec1c7346584 100644 --- a/examples/blog-refine-mantine-strapi/src/pages/posts/list.tsx +++ b/examples/blog-refine-mantine-strapi/src/pages/posts/list.tsx @@ -1,10 +1,10 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { List, DateField, EditButton, DeleteButton } from "@refinedev/mantine"; import { Table, Pagination, Group } from "@mantine/core"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostList: React.FC = () => { const columns = React.useMemo[]>( diff --git a/examples/blog-refine-markdown/src/contexts/color-mode/index.tsx b/examples/blog-refine-markdown/src/contexts/color-mode/index.tsx index 1396121b4a0a..03734b60727f 100644 --- a/examples/blog-refine-markdown/src/contexts/color-mode/index.tsx +++ b/examples/blog-refine-markdown/src/contexts/color-mode/index.tsx @@ -1,6 +1,11 @@ import { RefineThemes } from "@refinedev/antd"; import { ConfigProvider, theme } from "antd"; -import { PropsWithChildren, createContext, useEffect, useState } from "react"; +import { + type PropsWithChildren, + createContext, + useEffect, + useState, +} from "react"; type ColorModeContextType = { mode: string; diff --git a/examples/blog-refine-markdown/src/pages/posts/create.tsx b/examples/blog-refine-markdown/src/pages/posts/create.tsx index fb9594b4b850..7dbf8cb7ceb8 100644 --- a/examples/blog-refine-markdown/src/pages/posts/create.tsx +++ b/examples/blog-refine-markdown/src/pages/posts/create.tsx @@ -3,7 +3,7 @@ import { Create, useForm, useSelect } from "@refinedev/antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/blog-refine-markdown/src/pages/posts/edit.tsx b/examples/blog-refine-markdown/src/pages/posts/edit.tsx index cd0ce24c7937..379dd1c6a05c 100644 --- a/examples/blog-refine-markdown/src/pages/posts/edit.tsx +++ b/examples/blog-refine-markdown/src/pages/posts/edit.tsx @@ -4,7 +4,7 @@ import { Form, Select, Input } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/blog-refine-markdown/src/pages/posts/list.tsx b/examples/blog-refine-markdown/src/pages/posts/list.tsx index 025e8c00c64c..979875b0fc9c 100644 --- a/examples/blog-refine-markdown/src/pages/posts/list.tsx +++ b/examples/blog-refine-markdown/src/pages/posts/list.tsx @@ -14,7 +14,7 @@ import { ShowButton, } from "@refinedev/antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps, sorter } = useTable({ diff --git a/examples/blog-refine-markdown/src/pages/posts/show.tsx b/examples/blog-refine-markdown/src/pages/posts/show.tsx index 6d5200d348fb..cb79e4a7d030 100644 --- a/examples/blog-refine-markdown/src/pages/posts/show.tsx +++ b/examples/blog-refine-markdown/src/pages/posts/show.tsx @@ -1,7 +1,7 @@ import { useOne, useShow } from "@refinedev/core"; import { Show, MarkdownField } from "@refinedev/antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; import { Tag, Typography } from "antd"; const { Title, Text } = Typography; diff --git a/examples/blog-refine-mui/src/components/charts/AreaGraph.tsx b/examples/blog-refine-mui/src/components/charts/AreaGraph.tsx index a9d5b2f5e812..c68431f8d906 100644 --- a/examples/blog-refine-mui/src/components/charts/AreaGraph.tsx +++ b/examples/blog-refine-mui/src/components/charts/AreaGraph.tsx @@ -9,7 +9,7 @@ import { ResponsiveContainer, } from "recharts"; -import { IAreaGraphProps } from "../../interfaces"; +import type { IAreaGraphProps } from "../../interfaces"; export const formatDate = new Intl.DateTimeFormat("en-US", { month: "short", diff --git a/examples/blog-refine-mui/src/components/charts/BarChart.tsx b/examples/blog-refine-mui/src/components/charts/BarChart.tsx index 055e8eed5e34..ba174f805681 100644 --- a/examples/blog-refine-mui/src/components/charts/BarChart.tsx +++ b/examples/blog-refine-mui/src/components/charts/BarChart.tsx @@ -9,7 +9,7 @@ import { ResponsiveContainer, } from "recharts"; -import { IBarChartProps } from "../../interfaces"; +import type { IBarChartProps } from "../../interfaces"; const formatDate = new Intl.DateTimeFormat("en-US", { month: "short", diff --git a/examples/blog-refine-mui/src/components/header/index.tsx b/examples/blog-refine-mui/src/components/header/index.tsx index 6b6ae9bc8385..3bb8587f70b3 100644 --- a/examples/blog-refine-mui/src/components/header/index.tsx +++ b/examples/blog-refine-mui/src/components/header/index.tsx @@ -10,12 +10,15 @@ import Stack from "@mui/material/Stack"; import Toolbar from "@mui/material/Toolbar"; import Typography from "@mui/material/Typography"; import { useGetIdentity, useGetLocale, useSetLocale } from "@refinedev/core"; -import { HamburgerMenu, RefineThemedLayoutV2HeaderProps } from "@refinedev/mui"; +import { + HamburgerMenu, + type RefineThemedLayoutV2HeaderProps, +} from "@refinedev/mui"; import i18n from "i18next"; import React, { useContext } from "react"; import { ColorModeContext } from "../../contexts/color-mode"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const Header: React.FC = ({ sticky = true, diff --git a/examples/blog-refine-mui/src/components/kpi-card/index.tsx b/examples/blog-refine-mui/src/components/kpi-card/index.tsx index 7a53f6154b00..f9baaea3e49b 100644 --- a/examples/blog-refine-mui/src/components/kpi-card/index.tsx +++ b/examples/blog-refine-mui/src/components/kpi-card/index.tsx @@ -8,10 +8,10 @@ import Chip from "@mui/material/Chip"; import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward"; import ArrowDownwardIcon from "@mui/icons-material/ArrowDownward"; import LinearProgress, { - LinearProgressProps, + type LinearProgressProps, } from "@mui/material/LinearProgress"; -import { KpiCardProps, DeltaType } from "../../interfaces"; +import type { KpiCardProps, DeltaType } from "../../interfaces"; const getColor = (num: number): DeltaType => { switch (true) { diff --git a/examples/blog-refine-mui/src/components/recent-sales/index.tsx b/examples/blog-refine-mui/src/components/recent-sales/index.tsx index a35fb4b267ad..109914af0a06 100644 --- a/examples/blog-refine-mui/src/components/recent-sales/index.tsx +++ b/examples/blog-refine-mui/src/components/recent-sales/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { DataGrid, GridColTypeDef } from "@mui/x-data-grid"; +import { DataGrid, type GridColTypeDef } from "@mui/x-data-grid"; import { useDataGrid } from "@refinedev/mui"; import Card from "@mui/material/Card"; @@ -11,7 +11,7 @@ import InputAdornment from "@mui/material/InputAdornment"; import SearchIcon from "@mui/icons-material/Search"; import { getDefaultFilter } from "@refinedev/core"; -import { IOrder, IOrderStatus } from "../../interfaces"; +import type { IOrder, IOrderStatus } from "../../interfaces"; export function RecentSales() { const { dataGridProps, setCurrent, setFilters, filters } = diff --git a/examples/blog-refine-mui/src/contexts/color-mode/index.tsx b/examples/blog-refine-mui/src/contexts/color-mode/index.tsx index 0f93a7260e63..57db39240b39 100644 --- a/examples/blog-refine-mui/src/contexts/color-mode/index.tsx +++ b/examples/blog-refine-mui/src/contexts/color-mode/index.tsx @@ -2,7 +2,7 @@ import { ThemeProvider } from "@mui/material/styles"; import { RefineThemes } from "@refinedev/mui"; import React, { createContext, - PropsWithChildren, + type PropsWithChildren, useEffect, useState, } from "react"; diff --git a/examples/blog-refine-mui/src/pages/categories/list.tsx b/examples/blog-refine-mui/src/pages/categories/list.tsx index b9c8496c3f92..351922fe1a0f 100644 --- a/examples/blog-refine-mui/src/pages/categories/list.tsx +++ b/examples/blog-refine-mui/src/pages/categories/list.tsx @@ -7,7 +7,7 @@ import { List, } from "@refinedev/mui"; -import { DataGrid, GridColDef } from "@mui/x-data-grid"; +import { DataGrid, type GridColDef } from "@mui/x-data-grid"; import { useTranslate } from "@refinedev/core"; export const CategoryList = () => { diff --git a/examples/blog-refine-mui/src/pages/dashboard/Dashboard.tsx b/examples/blog-refine-mui/src/pages/dashboard/Dashboard.tsx index 55467474cd84..3a88669bf1ac 100644 --- a/examples/blog-refine-mui/src/pages/dashboard/Dashboard.tsx +++ b/examples/blog-refine-mui/src/pages/dashboard/Dashboard.tsx @@ -16,7 +16,7 @@ import TabPanel from "@mui/lab/TabPanel"; import KpiCard from "../../components/kpi-card"; import { AreaGraph, BarChart } from "../../components/charts"; import { RecentSales } from "../../components/recent-sales"; -import { IChart } from "../../interfaces"; +import type { IChart } from "../../interfaces"; const Responsive = styled("div")(({ theme }) => ({ [theme.breakpoints.down("md")]: { diff --git a/examples/blog-refine-mui/src/pages/products/list.tsx b/examples/blog-refine-mui/src/pages/products/list.tsx index 12f7e9526975..4af60185c6de 100644 --- a/examples/blog-refine-mui/src/pages/products/list.tsx +++ b/examples/blog-refine-mui/src/pages/products/list.tsx @@ -7,7 +7,7 @@ import { List, MarkdownField, } from "@refinedev/mui"; -import { DataGrid, GridColDef } from "@mui/x-data-grid"; +import { DataGrid, type GridColDef } from "@mui/x-data-grid"; import { useTranslate, useMany } from "@refinedev/core"; diff --git a/examples/blog-refine-nextui/src/components/charts/DisplayAreaGraph.tsx b/examples/blog-refine-nextui/src/components/charts/DisplayAreaGraph.tsx index b763a58ab329..b37624aa9680 100644 --- a/examples/blog-refine-nextui/src/components/charts/DisplayAreaGraph.tsx +++ b/examples/blog-refine-nextui/src/components/charts/DisplayAreaGraph.tsx @@ -9,7 +9,7 @@ import { ResponsiveContainer, } from "recharts"; -import { IDisplayAreaGraphProps } from "../../interfaces"; +import type { IDisplayAreaGraphProps } from "../../interfaces"; import { formatDate } from "./DisplayBarChart"; export const DisplayAreaGraph: React.FC = ({ diff --git a/examples/blog-refine-nextui/src/components/charts/DisplayBarChart.tsx b/examples/blog-refine-nextui/src/components/charts/DisplayBarChart.tsx index adf977d2208d..a0c64427da73 100644 --- a/examples/blog-refine-nextui/src/components/charts/DisplayBarChart.tsx +++ b/examples/blog-refine-nextui/src/components/charts/DisplayBarChart.tsx @@ -9,7 +9,7 @@ import { ResponsiveContainer, } from "recharts"; -import { IDisplayBarChartProps } from "../../interfaces"; +import type { IDisplayBarChartProps } from "../../interfaces"; export const formatDate = new Intl.DateTimeFormat("en-US", { month: "short", diff --git a/examples/blog-refine-nextui/src/components/layout/index.tsx b/examples/blog-refine-nextui/src/components/layout/index.tsx index 8a6a9cdd11df..1d0eacfbe580 100644 --- a/examples/blog-refine-nextui/src/components/layout/index.tsx +++ b/examples/blog-refine-nextui/src/components/layout/index.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { Breadcrumb } from "../breadcrumb"; import { Menu } from "../menu"; diff --git a/examples/blog-refine-nextui/src/components/modal/index.tsx b/examples/blog-refine-nextui/src/components/modal/index.tsx index 9ee7ea43ff2e..7e840d3ac95d 100644 --- a/examples/blog-refine-nextui/src/components/modal/index.tsx +++ b/examples/blog-refine-nextui/src/components/modal/index.tsx @@ -8,7 +8,7 @@ import { Button, } from "@nextui-org/react"; -import { IDeleteModalProps } from "../../interfaces"; +import type { IDeleteModalProps } from "../../interfaces"; export const DeleteModal: React.FC = ({ isOpen, diff --git a/examples/blog-refine-nextui/src/components/table/RecentSalesTable.tsx b/examples/blog-refine-nextui/src/components/table/RecentSalesTable.tsx index eb0561e3ca4a..4b8230901f79 100644 --- a/examples/blog-refine-nextui/src/components/table/RecentSalesTable.tsx +++ b/examples/blog-refine-nextui/src/components/table/RecentSalesTable.tsx @@ -9,15 +9,15 @@ import { Button, Chip, Pagination, - SortDescriptor, + type SortDescriptor, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, } from "@nextui-org/react"; -import { useTable, getDefaultFilter, CrudSort } from "@refinedev/core"; -import { IOrder } from "../../interfaces"; +import { useTable, getDefaultFilter, type CrudSort } from "@refinedev/core"; +import type { IOrder } from "../../interfaces"; import { useCallback, useState } from "react"; import { MagnifyingGlassIcon } from "@heroicons/react/24/outline"; diff --git a/examples/blog-refine-nextui/src/pages/categories/create.tsx b/examples/blog-refine-nextui/src/pages/categories/create.tsx index 87f05b7ed1d7..702798d2dcb7 100644 --- a/examples/blog-refine-nextui/src/pages/categories/create.tsx +++ b/examples/blog-refine-nextui/src/pages/categories/create.tsx @@ -1,4 +1,4 @@ -import { HttpError, useBack } from "@refinedev/core"; +import { type HttpError, useBack } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; @@ -6,7 +6,7 @@ import { Button, Card, Input } from "@nextui-org/react"; import { ArrowLongLeftIcon } from "@heroicons/react/24/outline"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryCreate = () => { const goBack = useBack(); diff --git a/examples/blog-refine-nextui/src/pages/categories/edit.tsx b/examples/blog-refine-nextui/src/pages/categories/edit.tsx index 3e07ef638a96..fcb336a7389f 100644 --- a/examples/blog-refine-nextui/src/pages/categories/edit.tsx +++ b/examples/blog-refine-nextui/src/pages/categories/edit.tsx @@ -1,4 +1,4 @@ -import { HttpError, useBack } from "@refinedev/core"; +import { type HttpError, useBack } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; @@ -6,7 +6,7 @@ import { Button, Card, Input } from "@nextui-org/react"; import { ArrowLongLeftIcon } from "@heroicons/react/24/outline"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryEdit = () => { const goBack = useBack(); diff --git a/examples/blog-refine-nextui/src/pages/categories/list.tsx b/examples/blog-refine-nextui/src/pages/categories/list.tsx index 31eb43afc206..0615630bc9cf 100644 --- a/examples/blog-refine-nextui/src/pages/categories/list.tsx +++ b/examples/blog-refine-nextui/src/pages/categories/list.tsx @@ -3,7 +3,7 @@ import { getDefaultFilter, useNavigation, useDelete, - CrudSort, + type CrudSort, } from "@refinedev/core"; import { Table, @@ -16,7 +16,7 @@ import { Input, Button, useDisclosure, - SortDescriptor, + type SortDescriptor, Dropdown, DropdownTrigger, DropdownMenu, @@ -31,7 +31,7 @@ import { PlusIcon, } from "@heroicons/react/24/outline"; -import { IProduct } from "../../interfaces"; +import type { IProduct } from "../../interfaces"; import { DeleteModal } from "../../components/modal"; import { useState, useCallback } from "react"; diff --git a/examples/blog-refine-nextui/src/pages/categories/show.tsx b/examples/blog-refine-nextui/src/pages/categories/show.tsx index 771bb6411c72..9283d1d29953 100644 --- a/examples/blog-refine-nextui/src/pages/categories/show.tsx +++ b/examples/blog-refine-nextui/src/pages/categories/show.tsx @@ -1,5 +1,5 @@ import { useBack, useShow } from "@refinedev/core"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; import { Button, Card, CardHeader, CardBody, Image } from "@nextui-org/react"; import { ArrowLongLeftIcon } from "@heroicons/react/24/outline"; diff --git a/examples/blog-refine-nextui/src/pages/dashboard/DashboardPage.tsx b/examples/blog-refine-nextui/src/pages/dashboard/DashboardPage.tsx index 0c86782ad64b..9c31584f7003 100644 --- a/examples/blog-refine-nextui/src/pages/dashboard/DashboardPage.tsx +++ b/examples/blog-refine-nextui/src/pages/dashboard/DashboardPage.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Tabs, Tab, Card, CardBody } from "@nextui-org/react"; import { useApiUrl, useCustom } from "@refinedev/core"; -import { IChart } from "../../interfaces"; +import type { IChart } from "../../interfaces"; import { KpiCard } from "../../components/kpiCard"; import { DisplayAreaGraph, DisplayBarChart } from "../../components/charts"; diff --git a/examples/blog-refine-nextui/src/pages/products/create.tsx b/examples/blog-refine-nextui/src/pages/products/create.tsx index 23a0e7f9ce23..2f3744e639b3 100644 --- a/examples/blog-refine-nextui/src/pages/products/create.tsx +++ b/examples/blog-refine-nextui/src/pages/products/create.tsx @@ -1,4 +1,4 @@ -import { HttpError, useBack, useSelect } from "@refinedev/core"; +import { type HttpError, useBack, useSelect } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; @@ -15,7 +15,7 @@ import { import { ArrowLongLeftIcon } from "@heroicons/react/24/outline"; -import { IProduct, IProductCategory } from "../../interfaces"; +import type { IProduct, IProductCategory } from "../../interfaces"; export const ProductCreate = () => { const goBack = useBack(); diff --git a/examples/blog-refine-nextui/src/pages/products/edit.tsx b/examples/blog-refine-nextui/src/pages/products/edit.tsx index cb54c82eeb5a..9c8794ad99f9 100644 --- a/examples/blog-refine-nextui/src/pages/products/edit.tsx +++ b/examples/blog-refine-nextui/src/pages/products/edit.tsx @@ -1,4 +1,4 @@ -import { HttpError, useBack, useSelect } from "@refinedev/core"; +import { type HttpError, useBack, useSelect } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; @@ -15,7 +15,7 @@ import { import { ArrowLongLeftIcon } from "@heroicons/react/24/outline"; -import { IProduct, IProductCategory } from "../../interfaces"; +import type { IProduct, IProductCategory } from "../../interfaces"; export const ProductEdit = () => { const goBack = useBack(); diff --git a/examples/blog-refine-nextui/src/pages/products/list.tsx b/examples/blog-refine-nextui/src/pages/products/list.tsx index 38a4b0fee585..99bb43d60ac1 100644 --- a/examples/blog-refine-nextui/src/pages/products/list.tsx +++ b/examples/blog-refine-nextui/src/pages/products/list.tsx @@ -4,7 +4,7 @@ import { useNavigation, useDelete, useMany, - CrudSort, + type CrudSort, } from "@refinedev/core"; import { Table, @@ -17,7 +17,7 @@ import { Input, Button, useDisclosure, - SortDescriptor, + type SortDescriptor, Dropdown, DropdownTrigger, DropdownMenu, @@ -32,7 +32,7 @@ import { PlusIcon, } from "@heroicons/react/24/outline"; -import { ICategory, IProduct } from "../../interfaces"; +import type { ICategory, IProduct } from "../../interfaces"; import { DeleteModal } from "../../components/modal"; import { useState, useCallback } from "react"; diff --git a/examples/blog-refine-nextui/src/pages/products/show.tsx b/examples/blog-refine-nextui/src/pages/products/show.tsx index e82d00addfe8..dc64ade54b8e 100644 --- a/examples/blog-refine-nextui/src/pages/products/show.tsx +++ b/examples/blog-refine-nextui/src/pages/products/show.tsx @@ -1,5 +1,5 @@ import { useBack, useOne, useShow } from "@refinedev/core"; -import { ICategory, IProduct } from "../../interfaces"; +import type { ICategory, IProduct } from "../../interfaces"; import { Button, Card, CardHeader, CardBody, Image } from "@nextui-org/react"; import { ArrowLongLeftIcon } from "@heroicons/react/24/outline"; diff --git a/examples/blog-refine-primereact/src/components/breadcrumb/index.tsx b/examples/blog-refine-primereact/src/components/breadcrumb/index.tsx index 771fd7f62895..09e044adb854 100644 --- a/examples/blog-refine-primereact/src/components/breadcrumb/index.tsx +++ b/examples/blog-refine-primereact/src/components/breadcrumb/index.tsx @@ -2,7 +2,7 @@ import { useBreadcrumb } from "@refinedev/core"; import { Link } from "react-router-dom"; import { BreadCrumb } from "primereact/breadcrumb"; -import { MenuItem } from "primereact/menuitem"; +import type { MenuItem } from "primereact/menuitem"; import { classNames } from "primereact/utils"; export const Breadcrumb = () => { diff --git a/examples/blog-refine-primereact/src/components/dashboard/chartView/index.tsx b/examples/blog-refine-primereact/src/components/dashboard/chartView/index.tsx index 95f6202357b1..8048bf49c5f6 100644 --- a/examples/blog-refine-primereact/src/components/dashboard/chartView/index.tsx +++ b/examples/blog-refine-primereact/src/components/dashboard/chartView/index.tsx @@ -2,9 +2,9 @@ import { Card } from "primereact/card"; import { Chart } from "primereact/chart"; import { TabView, TabPanel } from "primereact/tabview"; -import { ChartData, ChartOptions } from "chart.js"; +import type { ChartData, ChartOptions } from "chart.js"; -import { IChartDatum } from "../../../interfaces"; +import type { IChartDatum } from "../../../interfaces"; interface ChartViewProps { revenue: IChartDatum[]; diff --git a/examples/blog-refine-primereact/src/components/dashboard/recentSales/index.tsx b/examples/blog-refine-primereact/src/components/dashboard/recentSales/index.tsx index 275e70187bde..705af5bd6fe3 100644 --- a/examples/blog-refine-primereact/src/components/dashboard/recentSales/index.tsx +++ b/examples/blog-refine-primereact/src/components/dashboard/recentSales/index.tsx @@ -7,7 +7,7 @@ import { Tag } from "primereact/tag"; import { Button } from "primereact/button"; import { InputText } from "primereact/inputtext"; -import { IOrder, IOrderStatus } from "../../../interfaces"; +import type { IOrder, IOrderStatus } from "../../../interfaces"; export const RecentSales = () => { const { diff --git a/examples/blog-refine-primereact/src/components/layout/index.tsx b/examples/blog-refine-primereact/src/components/layout/index.tsx index 5f1662ad6278..c988a57e4563 100644 --- a/examples/blog-refine-primereact/src/components/layout/index.tsx +++ b/examples/blog-refine-primereact/src/components/layout/index.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { Menu } from "../menu"; import { Breadcrumb } from "../breadcrumb"; diff --git a/examples/blog-refine-primereact/src/components/menu/index.tsx b/examples/blog-refine-primereact/src/components/menu/index.tsx index 21891a2fc96a..309fb3dad415 100644 --- a/examples/blog-refine-primereact/src/components/menu/index.tsx +++ b/examples/blog-refine-primereact/src/components/menu/index.tsx @@ -2,7 +2,7 @@ import { useMenu } from "@refinedev/core"; import { Link } from "react-router-dom"; import { TabMenu } from "primereact/tabmenu"; -import { MenuItem } from "primereact/menuitem"; +import type { MenuItem } from "primereact/menuitem"; import { classNames } from "primereact/utils"; export const Menu = () => { diff --git a/examples/blog-refine-primereact/src/pages/categories/create.tsx b/examples/blog-refine-primereact/src/pages/categories/create.tsx index 102f4773c5a0..c16b71792d3d 100644 --- a/examples/blog-refine-primereact/src/pages/categories/create.tsx +++ b/examples/blog-refine-primereact/src/pages/categories/create.tsx @@ -1,4 +1,4 @@ -import { HttpError, useBack } from "@refinedev/core"; +import { type HttpError, useBack } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; @@ -7,7 +7,7 @@ import { Card } from "primereact/card"; import { InputText } from "primereact/inputtext"; import { classNames } from "primereact/utils"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryCreate = () => { const goBack = useBack(); diff --git a/examples/blog-refine-primereact/src/pages/categories/edit.tsx b/examples/blog-refine-primereact/src/pages/categories/edit.tsx index 05743f55e2a4..88cf8295701c 100644 --- a/examples/blog-refine-primereact/src/pages/categories/edit.tsx +++ b/examples/blog-refine-primereact/src/pages/categories/edit.tsx @@ -1,4 +1,4 @@ -import { HttpError, useBack } from "@refinedev/core"; +import { type HttpError, useBack } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; @@ -7,7 +7,7 @@ import { Card } from "primereact/card"; import { InputText } from "primereact/inputtext"; import { classNames } from "primereact/utils"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryEdit = () => { const goBack = useBack(); diff --git a/examples/blog-refine-primereact/src/pages/categories/list.tsx b/examples/blog-refine-primereact/src/pages/categories/list.tsx index fe82212e35e2..428052561e0c 100644 --- a/examples/blog-refine-primereact/src/pages/categories/list.tsx +++ b/examples/blog-refine-primereact/src/pages/categories/list.tsx @@ -12,7 +12,7 @@ import { Button } from "primereact/button"; import { InputText } from "primereact/inputtext"; import { confirmDialog } from "primereact/confirmdialog"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryList = () => { const { diff --git a/examples/blog-refine-primereact/src/pages/categories/show.tsx b/examples/blog-refine-primereact/src/pages/categories/show.tsx index ee6434e939d7..a4a433761b76 100644 --- a/examples/blog-refine-primereact/src/pages/categories/show.tsx +++ b/examples/blog-refine-primereact/src/pages/categories/show.tsx @@ -3,7 +3,7 @@ import { useBack, useShow } from "@refinedev/core"; import { Card } from "primereact/card"; import { Button } from "primereact/button"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export const CategoryShow = () => { const goBack = useBack(); diff --git a/examples/blog-refine-primereact/src/pages/dashboard/index.tsx b/examples/blog-refine-primereact/src/pages/dashboard/index.tsx index fa035a8fa51d..76127c3f5f55 100644 --- a/examples/blog-refine-primereact/src/pages/dashboard/index.tsx +++ b/examples/blog-refine-primereact/src/pages/dashboard/index.tsx @@ -6,7 +6,7 @@ import { KpiCard } from "../../components/dashboard/kpiCard"; import { ChartView } from "../../components/dashboard/chartView"; import { RecentSales } from "../../components/dashboard/recentSales"; -import { IChart } from "../../interfaces"; +import type { IChart } from "../../interfaces"; const query = { start: dayjs().subtract(7, "days").startOf("day"), diff --git a/examples/blog-refine-primereact/src/pages/products/create.tsx b/examples/blog-refine-primereact/src/pages/products/create.tsx index 374171b8bdb9..f3b7dcbb6f93 100644 --- a/examples/blog-refine-primereact/src/pages/products/create.tsx +++ b/examples/blog-refine-primereact/src/pages/products/create.tsx @@ -1,4 +1,4 @@ -import { HttpError, useBack, useSelect } from "@refinedev/core"; +import { type HttpError, useBack, useSelect } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; @@ -10,7 +10,7 @@ import { InputNumber } from "primereact/inputnumber"; import { Dropdown } from "primereact/dropdown"; import { InputTextarea } from "primereact/inputtextarea"; -import { IProduct } from "../../interfaces"; +import type { IProduct } from "../../interfaces"; export const ProductCreate = () => { const goBack = useBack(); diff --git a/examples/blog-refine-primereact/src/pages/products/edit.tsx b/examples/blog-refine-primereact/src/pages/products/edit.tsx index 4e16aaf6bed1..87f3417e3f7e 100644 --- a/examples/blog-refine-primereact/src/pages/products/edit.tsx +++ b/examples/blog-refine-primereact/src/pages/products/edit.tsx @@ -1,4 +1,4 @@ -import { HttpError, useBack, useSelect } from "@refinedev/core"; +import { type HttpError, useBack, useSelect } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import { Controller } from "react-hook-form"; @@ -10,7 +10,7 @@ import { InputNumber } from "primereact/inputnumber"; import { Dropdown } from "primereact/dropdown"; import { InputTextarea } from "primereact/inputtextarea"; -import { IProduct } from "../../interfaces"; +import type { IProduct } from "../../interfaces"; export const ProductEdit = () => { const goBack = useBack(); diff --git a/examples/blog-refine-primereact/src/pages/products/list.tsx b/examples/blog-refine-primereact/src/pages/products/list.tsx index 1a1e3b654de0..fd97ba9664eb 100644 --- a/examples/blog-refine-primereact/src/pages/products/list.tsx +++ b/examples/blog-refine-primereact/src/pages/products/list.tsx @@ -13,7 +13,7 @@ import { Button } from "primereact/button"; import { InputText } from "primereact/inputtext"; import { confirmDialog } from "primereact/confirmdialog"; -import { ICategory, IProduct } from "../../interfaces"; +import type { ICategory, IProduct } from "../../interfaces"; const formatCurrency = (value: number) => { return value.toLocaleString("en-US", { diff --git a/examples/blog-refine-primereact/src/pages/products/show.tsx b/examples/blog-refine-primereact/src/pages/products/show.tsx index 751dbab213a0..ef454cefe894 100644 --- a/examples/blog-refine-primereact/src/pages/products/show.tsx +++ b/examples/blog-refine-primereact/src/pages/products/show.tsx @@ -3,7 +3,7 @@ import { useBack, useOne, useShow } from "@refinedev/core"; import { Card } from "primereact/card"; import { Button } from "primereact/button"; -import { ICategory, IProduct } from "../../interfaces"; +import type { ICategory, IProduct } from "../../interfaces"; export const ProductShow = () => { const goBack = useBack(); diff --git a/examples/blog-refine-react-hook-form/src/pages/create.tsx b/examples/blog-refine-react-hook-form/src/pages/create.tsx index e3b7ae1e9844..3ab25214a14c 100644 --- a/examples/blog-refine-react-hook-form/src/pages/create.tsx +++ b/examples/blog-refine-react-hook-form/src/pages/create.tsx @@ -9,7 +9,7 @@ import { Controller } from "react-hook-form"; import { useForm } from "@refinedev/react-hook-form"; import * as Yup from "yup"; import { yupResolver } from "@hookform/resolvers/yup"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; interface IFormValue { firstname: string; diff --git a/examples/blog-refine-react-hook-form/src/reportWebVitals.ts b/examples/blog-refine-react-hook-form/src/reportWebVitals.ts index 5fa3583b7500..ad7f32fc1dee 100644 --- a/examples/blog-refine-react-hook-form/src/reportWebVitals.ts +++ b/examples/blog-refine-react-hook-form/src/reportWebVitals.ts @@ -1,4 +1,4 @@ -import { ReportHandler } from "web-vitals"; +import type { ReportHandler } from "web-vitals"; const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { diff --git a/examples/blog-refine-shadcn/src/components/layout/index.tsx b/examples/blog-refine-shadcn/src/components/layout/index.tsx index d6cef81f094a..1f1ec3a36ee8 100644 --- a/examples/blog-refine-shadcn/src/components/layout/index.tsx +++ b/examples/blog-refine-shadcn/src/components/layout/index.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { Breadcrumb } from "../breadcrumb"; import { Menu } from "../menu"; diff --git a/examples/blog-refine-shadcn/src/components/ui/form.tsx b/examples/blog-refine-shadcn/src/components/ui/form.tsx index 497718a9f141..785d0d048754 100644 --- a/examples/blog-refine-shadcn/src/components/ui/form.tsx +++ b/examples/blog-refine-shadcn/src/components/ui/form.tsx @@ -1,11 +1,11 @@ import * as React from "react"; -import * as LabelPrimitive from "@radix-ui/react-label"; +import type * as LabelPrimitive from "@radix-ui/react-label"; import { Slot } from "@radix-ui/react-slot"; import { Controller, - ControllerProps, - FieldPath, - FieldValues, + type ControllerProps, + type FieldPath, + type FieldValues, FormProvider, useFormContext, } from "react-hook-form"; diff --git a/examples/blog-refine-shadcn/src/components/ui/pagination.tsx b/examples/blog-refine-shadcn/src/components/ui/pagination.tsx index e7be623a740d..a29ad824bc0c 100644 --- a/examples/blog-refine-shadcn/src/components/ui/pagination.tsx +++ b/examples/blog-refine-shadcn/src/components/ui/pagination.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"; import { cn } from "@/lib/utils"; -import { ButtonProps, buttonVariants } from "@/components/ui/button"; +import { type ButtonProps, buttonVariants } from "@/components/ui/button"; const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
) => ( ) => ( ) => ( ) => ( ) => ( { const navigate = useNavigate(); diff --git a/examples/win95/src/components/rvc-website/layout.tsx b/examples/win95/src/components/rvc-website/layout.tsx index c84c4803c082..a5d6c9842303 100644 --- a/examples/win95/src/components/rvc-website/layout.tsx +++ b/examples/win95/src/components/rvc-website/layout.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import styled from "styled-components"; import { RVCWebsiteLinks } from "@/components/rvc-website"; import { getImagesUrl } from "@/utils/get-cdn-url"; diff --git a/examples/win95/src/components/table-members/index.tsx b/examples/win95/src/components/table-members/index.tsx index 6f2224bc2568..70d9bf7344c3 100644 --- a/examples/win95/src/components/table-members/index.tsx +++ b/examples/win95/src/components/table-members/index.tsx @@ -14,7 +14,7 @@ import { TableFilterInputLabel, TableFilterInputText, } from "@/components/table"; -import { ExtendedMember } from "@/types"; +import type { ExtendedMember } from "@/types"; import { hasActiveRental } from "@/utils/has-active-rental"; import { Pagination } from "@/components/pagination"; import { DangerIcon } from "@/components/icons"; diff --git a/examples/win95/src/components/tooltip/index.tsx b/examples/win95/src/components/tooltip/index.tsx index c1e0cd5a646f..d7d2220fe066 100644 --- a/examples/win95/src/components/tooltip/index.tsx +++ b/examples/win95/src/components/tooltip/index.tsx @@ -1,5 +1,5 @@ -import { PropsWithChildren, ReactNode } from "react"; -import { Tooltip, TooltipProps } from "react95"; +import type { PropsWithChildren, ReactNode } from "react"; +import { Tooltip, type TooltipProps } from "react95"; type Props = { content: ReactNode; diff --git a/examples/win95/src/components/unsupported-resolution-handler/index.tsx b/examples/win95/src/components/unsupported-resolution-handler/index.tsx index 2619da0f7f31..1d2625314228 100644 --- a/examples/win95/src/components/unsupported-resolution-handler/index.tsx +++ b/examples/win95/src/components/unsupported-resolution-handler/index.tsx @@ -1,5 +1,5 @@ import { MINIMUM_APP_HEIGHT, MINIMUM_APP_WIDTH } from "@/utils/app-settings"; -import { PropsWithChildren, useEffect, useState } from "react"; +import { type PropsWithChildren, useEffect, useState } from "react"; function getWindowDimensions() { const { innerWidth: width, innerHeight: height } = window; diff --git a/examples/win95/src/providers/auth-provider/index.ts b/examples/win95/src/providers/auth-provider/index.ts index 2f2e6f3528b4..803016189cb8 100644 --- a/examples/win95/src/providers/auth-provider/index.ts +++ b/examples/win95/src/providers/auth-provider/index.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import { supabaseClient } from "@/supabase-client"; export const authProvider: AuthProvider = { diff --git a/examples/win95/src/providers/notification-provider/index.tsx b/examples/win95/src/providers/notification-provider/index.tsx index 3bba89c8666a..0bc4eada78e8 100644 --- a/examples/win95/src/providers/notification-provider/index.tsx +++ b/examples/win95/src/providers/notification-provider/index.tsx @@ -1,4 +1,4 @@ -import { NotificationProvider } from "@refinedev/core"; +import type { NotificationProvider } from "@refinedev/core"; import toast from "react-hot-toast"; import { Notification } from "@/components/notification"; diff --git a/examples/win95/src/providers/theme-provider/index.tsx b/examples/win95/src/providers/theme-provider/index.tsx index 7803daffc122..6bada9c6b150 100644 --- a/examples/win95/src/providers/theme-provider/index.tsx +++ b/examples/win95/src/providers/theme-provider/index.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { createGlobalStyle, diff --git a/examples/win95/src/routes/login-page/index.tsx b/examples/win95/src/routes/login-page/index.tsx index 9194b2b4a97e..11cf2184c98a 100644 --- a/examples/win95/src/routes/login-page/index.tsx +++ b/examples/win95/src/routes/login-page/index.tsx @@ -1,5 +1,5 @@ import { useLogin } from "@refinedev/core"; -import { FormEvent } from "react"; +import type { FormEvent } from "react"; import { Button, TextInput, diff --git a/examples/win95/src/routes/rvc-website/home.tsx b/examples/win95/src/routes/rvc-website/home.tsx index d76c2b10f4b1..12d7ad76da24 100644 --- a/examples/win95/src/routes/rvc-website/home.tsx +++ b/examples/win95/src/routes/rvc-website/home.tsx @@ -5,14 +5,14 @@ import { Link, useNavigate } from "react-router-dom"; import { Counter } from "react95"; import { Controller } from "swiper/modules"; import { Swiper, SwiperSlide } from "swiper/react"; -import { Swiper as ISwiper } from "swiper/types"; +import type { Swiper as ISwiper } from "swiper/types"; import "swiper/css"; import { Browser } from "@/components/browser"; import { ImagePixelated } from "@/components/image-pixelated"; import { RVCWebsiteLayout, CatalogsList } from "@/components/rvc-website"; import { RefineBanner } from "@/components/refine-banner"; import { getTMDBImgLink } from "@/utils/get-tmdb-img-link"; -import { VideoTitle } from "@/types"; +import type { VideoTitle } from "@/types"; import { getImagesUrl } from "@/utils/get-cdn-url"; export const RVCWebsitePageHome = () => { diff --git a/examples/win95/src/routes/rvc-website/title-detail.tsx b/examples/win95/src/routes/rvc-website/title-detail.tsx index 892f4a3cc82c..7f2ca39460b5 100644 --- a/examples/win95/src/routes/rvc-website/title-detail.tsx +++ b/examples/win95/src/routes/rvc-website/title-detail.tsx @@ -13,7 +13,7 @@ import { MediaPlayer } from "@/components/media-player/player"; import { getTMDBImgLink } from "@/utils/get-tmdb-img-link"; import { getImagesUrl } from "@/utils/get-cdn-url"; import { getHourFromMinutes } from "@/utils/get-hour-from-minutes"; -import { VideoTitle } from "@/types"; +import type { VideoTitle } from "@/types"; export const RVCWebsitePageTitleDetails = () => { const { titleId } = useParams(); diff --git a/examples/win95/src/routes/video-club/members/create.tsx b/examples/win95/src/routes/video-club/members/create.tsx index ac7cc0fd136b..fd604bfec402 100644 --- a/examples/win95/src/routes/video-club/members/create.tsx +++ b/examples/win95/src/routes/video-club/members/create.tsx @@ -1,9 +1,9 @@ import { useNavigate } from "react-router-dom"; import styled from "styled-components"; import { Button, Frame, Separator, TextInput } from "react95"; -import { CSSProperties, useState } from "react"; +import { type CSSProperties, useState } from "react"; import { useForm } from "@refinedev/react-hook-form"; -import { Controller, FieldValues } from "react-hook-form"; +import { Controller, type FieldValues } from "react-hook-form"; import { VideoClubLayoutSubPage } from "@/components/layout"; import { ArrowGreenPixelatedIcon } from "@/components/icons"; import { ImagePixelated } from "@/components/image-pixelated"; @@ -11,7 +11,7 @@ import { supabaseClient } from "@/supabase-client"; import { DEPOSIT } from "@/utils/app-settings"; import { convertToUSD } from "@/utils/convert-to-usd"; import { getImagesUrl } from "@/utils/get-cdn-url"; -import { Member } from "@/types"; +import type { Member } from "@/types"; export const VideoClubMemberPageCreate = () => { const [memberPhoto, setMemberPhoto] = useState(null); diff --git a/examples/win95/src/routes/video-club/members/edit.tsx b/examples/win95/src/routes/video-club/members/edit.tsx index 237c38ac9f83..6b6b8609f441 100644 --- a/examples/win95/src/routes/video-club/members/edit.tsx +++ b/examples/win95/src/routes/video-club/members/edit.tsx @@ -1,15 +1,15 @@ import { useNavigate } from "react-router-dom"; import styled from "styled-components"; import { Button, Separator, TextInput } from "react95"; -import { CSSProperties, useState } from "react"; +import { type CSSProperties, useState } from "react"; import { useForm } from "@refinedev/react-hook-form"; import { useNavigation } from "@refinedev/core"; -import { Controller, FieldValues } from "react-hook-form"; +import { Controller, type FieldValues } from "react-hook-form"; import { VideoClubLayoutSubPage } from "@/components/layout"; import { ArrowGreenPixelatedIcon } from "@/components/icons"; import { ImagePixelated } from "@/components/image-pixelated"; import { supabaseClient } from "@/supabase-client"; -import { Member } from "@/types"; +import type { Member } from "@/types"; export const VideoClubMemberPageEdit = () => { const [memberPhoto, setMemberPhoto] = useState(null); diff --git a/examples/win95/src/routes/video-club/members/list.tsx b/examples/win95/src/routes/video-club/members/list.tsx index ccac77db8f15..1ad3d79d8037 100644 --- a/examples/win95/src/routes/video-club/members/list.tsx +++ b/examples/win95/src/routes/video-club/members/list.tsx @@ -18,7 +18,7 @@ import { import { Pagination } from "@/components/pagination"; import { DangerIcon } from "@/components/icons"; import { VideoClubLayoutSubPage } from "@/components/layout"; -import { ExtendedMember } from "@/types"; +import type { ExtendedMember } from "@/types"; import { hasActiveRental } from "@/utils/has-active-rental"; export const VideoClubMemberPageList = () => { diff --git a/examples/win95/src/routes/video-club/members/show.tsx b/examples/win95/src/routes/video-club/members/show.tsx index b720ecd4e1b9..64d54f583047 100644 --- a/examples/win95/src/routes/video-club/members/show.tsx +++ b/examples/win95/src/routes/video-club/members/show.tsx @@ -16,7 +16,7 @@ import { import { ImagePixelated } from "@/components/image-pixelated"; import { NIGHTLY_RENTAL_FEE } from "@/utils/app-settings"; import { convertToUSD } from "@/utils/convert-to-usd"; -import { ExtendedMember } from "@/types"; +import type { ExtendedMember } from "@/types"; export const VideoClubMemberPageShow: React.FC = () => { const { id } = useParams(); diff --git a/examples/win95/src/routes/video-club/report/index.tsx b/examples/win95/src/routes/video-club/report/index.tsx index 33936f0fc3b1..4135d0bc1722 100644 --- a/examples/win95/src/routes/video-club/report/index.tsx +++ b/examples/win95/src/routes/video-club/report/index.tsx @@ -16,7 +16,7 @@ import { VideoClubLayoutSubPage } from "@/components/layout"; import { NIGHTLY_RENTAL_FEE } from "@/utils/app-settings"; import { convertToUSD } from "@/utils/convert-to-usd"; import { getImagesUrl } from "@/utils/get-cdn-url"; -import { Rental } from "@/types"; +import type { Rental } from "@/types"; import { getToday } from "@/utils/get-today"; const today = getToday(); diff --git a/examples/win95/src/routes/video-club/tapes/rent.tsx b/examples/win95/src/routes/video-club/tapes/rent.tsx index 0c1547e18f07..2126a922bb53 100644 --- a/examples/win95/src/routes/video-club/tapes/rent.tsx +++ b/examples/win95/src/routes/video-club/tapes/rent.tsx @@ -3,7 +3,7 @@ import { useState, useEffect } from "react"; import styled from "styled-components"; import { Button, GroupBox, Select, Separator, TextInput } from "react95"; import { useForm } from "@refinedev/react-hook-form"; -import { Controller, FieldValues } from "react-hook-form"; +import { Controller, type FieldValues } from "react-hook-form"; import { Navigate, useNavigate, useParams } from "react-router-dom"; import dayjs from "dayjs"; import { VideoClubPageTapeSelectTitle } from "@/routes/video-club/tapes/select-title"; @@ -21,7 +21,7 @@ import { DangerIcon, IconChevronLeft } from "@/components/icons"; import { ArrowGreenPixelatedIcon } from "@/components/icons/arrow-green-pixelated"; import { NIGHTLY_RENTAL_FEE } from "@/utils/app-settings"; import { convertToUSD } from "@/utils/convert-to-usd"; -import { +import type { CreateRental, ExtendedMember, ExtendedVideoTitle, diff --git a/examples/win95/src/routes/video-club/tapes/return.tsx b/examples/win95/src/routes/video-club/tapes/return.tsx index c93d7ed56435..61f27abd5679 100644 --- a/examples/win95/src/routes/video-club/tapes/return.tsx +++ b/examples/win95/src/routes/video-club/tapes/return.tsx @@ -30,7 +30,7 @@ import { IconChevronLeft, ArrowGreenPixelatedIcon } from "@/components/icons"; import { ImagePixelated } from "@/components/image-pixelated"; import { NIGHTLY_RENTAL_FEE } from "@/utils/app-settings"; import { convertToUSD } from "@/utils/convert-to-usd"; -import { ExtendedMember, ExtendedRental } from "@/types"; +import type { ExtendedMember, ExtendedRental } from "@/types"; export const VideoClubPageTapeReturn = () => { const [selectedRentals, setSelectedRentals] = useState([]); diff --git a/examples/win95/src/routes/video-club/tapes/select-member.tsx b/examples/win95/src/routes/video-club/tapes/select-member.tsx index cb666b7c0509..fb6f3d166c47 100644 --- a/examples/win95/src/routes/video-club/tapes/select-member.tsx +++ b/examples/win95/src/routes/video-club/tapes/select-member.tsx @@ -25,7 +25,7 @@ import { } from "@/components/icons"; import { hasActiveRental } from "@/utils/has-active-rental"; import { getImagesUrl } from "@/utils/get-cdn-url"; -import { ExtendedMember } from "@/types"; +import type { ExtendedMember } from "@/types"; type Props = { variant: "rent" | "return"; diff --git a/examples/win95/src/routes/video-club/tapes/select-title.tsx b/examples/win95/src/routes/video-club/tapes/select-title.tsx index efb1d955fdbd..dec036c5a4dd 100644 --- a/examples/win95/src/routes/video-club/tapes/select-title.tsx +++ b/examples/win95/src/routes/video-club/tapes/select-title.tsx @@ -30,7 +30,7 @@ import { } from "@/components/icons"; import { OPTIONS_YEAR } from "@/utils/options-year"; import { getImagesUrl } from "@/utils/get-cdn-url"; -import { ExtendedVideoTitle } from "@/types"; +import type { ExtendedVideoTitle } from "@/types"; type Props = { selectedTitle?: ExtendedVideoTitle | null; diff --git a/examples/win95/src/routes/video-club/titles/create.tsx b/examples/win95/src/routes/video-club/titles/create.tsx index 3de7026355df..7f8009f5b52d 100644 --- a/examples/win95/src/routes/video-club/titles/create.tsx +++ b/examples/win95/src/routes/video-club/titles/create.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { useNavigate } from "react-router-dom"; import { - HttpError, + type HttpError, useCreate, useCreateMany, useNavigation, @@ -20,12 +20,12 @@ import { VideoClubLayoutSubPage } from "@/components/layout"; import { MediaPlayerModal } from "@/components/media-player"; import { ImagePixelated } from "@/components/image-pixelated"; import { - TitleByTmdbIdResponse, + type TitleByTmdbIdResponse, getTitleByTmdbId, } from "@/utils/get-title-by-tmdb-id"; import { parseTmdbIdFromUrl } from "@/utils/parse-tmdb-id-from-url"; import { getImagesUrl } from "@/utils/get-cdn-url"; -import { Tape, VideoTitle } from "@/types"; +import type { Tape, VideoTitle } from "@/types"; export const VideoClubPageCreateTitle = () => { const navigate = useNavigate(); diff --git a/examples/win95/src/routes/video-club/titles/list.tsx b/examples/win95/src/routes/video-club/titles/list.tsx index 1b4842baad3c..7ffb54178254 100644 --- a/examples/win95/src/routes/video-club/titles/list.tsx +++ b/examples/win95/src/routes/video-club/titles/list.tsx @@ -17,7 +17,7 @@ import { VideoClubLayoutSubPage } from "@/components/layout"; import { Pagination } from "@/components/pagination"; import { DangerIcon } from "@/components/icons"; import { OPTIONS_YEAR } from "@/utils/options-year"; -import { ExtendedVideoTitle } from "@/types"; +import type { ExtendedVideoTitle } from "@/types"; export const VideoClubPageBrowseTitles = () => { const navigate = useNavigate(); diff --git a/examples/win95/src/routes/video-club/titles/show.tsx b/examples/win95/src/routes/video-club/titles/show.tsx index 31a1979189fc..372a0ece57e9 100644 --- a/examples/win95/src/routes/video-club/titles/show.tsx +++ b/examples/win95/src/routes/video-club/titles/show.tsx @@ -19,7 +19,7 @@ import { MediaPlayerModal } from "@/components/media-player"; import { getTMDBImgLink } from "@/utils/get-tmdb-img-link"; import { getImagesUrl } from "@/utils/get-cdn-url"; import { NIGHTLY_RENTAL_FEE } from "@/utils/app-settings"; -import { ExtendedVideoTitle, Member, Rental } from "@/types"; +import type { ExtendedVideoTitle, Member, Rental } from "@/types"; export const VideoClubPageShowTitle = () => { const [trailer, setTrailer] = useState(false); diff --git a/examples/win95/src/utils/get-title-by-tmdb-id.ts b/examples/win95/src/utils/get-title-by-tmdb-id.ts index dbea67fd2a9b..123460661905 100644 --- a/examples/win95/src/utils/get-title-by-tmdb-id.ts +++ b/examples/win95/src/utils/get-title-by-tmdb-id.ts @@ -1,5 +1,5 @@ import { dataProvider, supabaseClient } from "@/supabase-client"; -import { TMDBMovieResponse, VideoTitle } from "@/types"; +import type { TMDBMovieResponse, VideoTitle } from "@/types"; import { tmdbToTitle } from "@/utils/tmdb-to-title"; export type TitleByTmdbIdResponse = { diff --git a/examples/win95/src/utils/has-active-rental.ts b/examples/win95/src/utils/has-active-rental.ts index 7f5cb49232fb..6badba230b27 100644 --- a/examples/win95/src/utils/has-active-rental.ts +++ b/examples/win95/src/utils/has-active-rental.ts @@ -1,4 +1,4 @@ -import { ExtendedMember } from "@/types"; +import type { ExtendedMember } from "@/types"; type Props = { member: ExtendedMember; diff --git a/examples/win95/src/utils/tmdb-to-title.ts b/examples/win95/src/utils/tmdb-to-title.ts index 9bfb8ca52ee3..791b4d9c4cda 100644 --- a/examples/win95/src/utils/tmdb-to-title.ts +++ b/examples/win95/src/utils/tmdb-to-title.ts @@ -1,4 +1,4 @@ -import { TMDBMovieResponse, VideoTitle } from "@/types"; +import type { TMDBMovieResponse, VideoTitle } from "@/types"; export const tmdbToTitle = ( tmdbBody: TMDBMovieResponse, diff --git a/examples/with-custom-pages/src/App.tsx b/examples/with-custom-pages/src/App.tsx index 430842361d80..ef23334ad562 100644 --- a/examples/with-custom-pages/src/App.tsx +++ b/examples/with-custom-pages/src/App.tsx @@ -2,7 +2,7 @@ import { GitHubBanner, Refine, Authenticated, - AuthProvider, + type AuthProvider, } from "@refinedev/core"; import { useNotificationProvider, diff --git a/examples/with-custom-pages/src/pages/post-review/post-review.tsx b/examples/with-custom-pages/src/pages/post-review/post-review.tsx index 759a8ba04ac2..1dd77c9e5d24 100644 --- a/examples/with-custom-pages/src/pages/post-review/post-review.tsx +++ b/examples/with-custom-pages/src/pages/post-review/post-review.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography, Button, Space } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/with-custom-pages/src/pages/posts/create.tsx b/examples/with-custom-pages/src/pages/posts/create.tsx index 1584d39ac3e3..2bcf74182b56 100644 --- a/examples/with-custom-pages/src/pages/posts/create.tsx +++ b/examples/with-custom-pages/src/pages/posts/create.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/with-custom-pages/src/pages/posts/edit.tsx b/examples/with-custom-pages/src/pages/posts/edit.tsx index 71fb6a382e09..a7ac2428084d 100644 --- a/examples/with-custom-pages/src/pages/posts/edit.tsx +++ b/examples/with-custom-pages/src/pages/posts/edit.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/with-custom-pages/src/pages/posts/list.tsx b/examples/with-custom-pages/src/pages/posts/list.tsx index 70e0b66903f8..cf273b24b2a4 100644 --- a/examples/with-custom-pages/src/pages/posts/list.tsx +++ b/examples/with-custom-pages/src/pages/posts/list.tsx @@ -11,7 +11,7 @@ import { import { Table, Space, Button } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps } = useTable(); diff --git a/examples/with-custom-pages/src/pages/posts/show.tsx b/examples/with-custom-pages/src/pages/posts/show.tsx index 3d3678bad3c3..dfd179a4d431 100644 --- a/examples/with-custom-pages/src/pages/posts/show.tsx +++ b/examples/with-custom-pages/src/pages/posts/show.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/examples/with-meta-properties/src/pages/posts/list.tsx b/examples/with-meta-properties/src/pages/posts/list.tsx index 7288b1f9ba6c..62ce103f40a0 100644 --- a/examples/with-meta-properties/src/pages/posts/list.tsx +++ b/examples/with-meta-properties/src/pages/posts/list.tsx @@ -1,7 +1,7 @@ import { List, FilterDropdown, TagField, useTable } from "@refinedev/antd"; import { Table, Radio } from "antd"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostList: React.FC = () => { const { tableProps } = useTable({ diff --git a/examples/with-meta-properties/src/pages/users/list.tsx b/examples/with-meta-properties/src/pages/users/list.tsx index 05752ad5194c..a95a9a5ce2ea 100644 --- a/examples/with-meta-properties/src/pages/users/list.tsx +++ b/examples/with-meta-properties/src/pages/users/list.tsx @@ -1,7 +1,7 @@ import { List, useTable, EmailField } from "@refinedev/antd"; import { Table } from "antd"; -import { IUser } from "../../interfaces"; +import type { IUser } from "../../interfaces"; export const UserList: React.FC = () => { const { tableProps } = useTable({ diff --git a/examples/with-meta-properties/src/rest-data-provider/index.ts b/examples/with-meta-properties/src/rest-data-provider/index.ts index d01dc83fc38d..0457d74db78e 100644 --- a/examples/with-meta-properties/src/rest-data-provider/index.ts +++ b/examples/with-meta-properties/src/rest-data-provider/index.ts @@ -1,4 +1,4 @@ -import { DataProvider } from "@refinedev/core"; +import type { DataProvider } from "@refinedev/core"; import dataProvider, { stringify } from "@refinedev/simple-rest"; import { axiosInstance, generateSort, generateFilter } from "./utils"; diff --git a/examples/with-meta-properties/src/rest-data-provider/utils/axios.ts b/examples/with-meta-properties/src/rest-data-provider/utils/axios.ts index 3b7eadb855f9..452a16bf99f7 100644 --- a/examples/with-meta-properties/src/rest-data-provider/utils/axios.ts +++ b/examples/with-meta-properties/src/rest-data-provider/utils/axios.ts @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; // "axios" package should be installed to customize the http client import axios from "axios"; diff --git a/examples/with-meta-properties/src/rest-data-provider/utils/generateFilter.ts b/examples/with-meta-properties/src/rest-data-provider/utils/generateFilter.ts index 2a2a659de31a..1732a6047856 100644 --- a/examples/with-meta-properties/src/rest-data-provider/utils/generateFilter.ts +++ b/examples/with-meta-properties/src/rest-data-provider/utils/generateFilter.ts @@ -1,4 +1,4 @@ -import { CrudFilters } from "@refinedev/core"; +import type { CrudFilters } from "@refinedev/core"; import { mapOperator } from "./mapOperator"; export const generateFilter = (filters?: CrudFilters) => { diff --git a/examples/with-meta-properties/src/rest-data-provider/utils/generateSort.ts b/examples/with-meta-properties/src/rest-data-provider/utils/generateSort.ts index 0d7d7935211c..044dc22a9519 100644 --- a/examples/with-meta-properties/src/rest-data-provider/utils/generateSort.ts +++ b/examples/with-meta-properties/src/rest-data-provider/utils/generateSort.ts @@ -1,4 +1,4 @@ -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; export const generateSort = (sorters?: CrudSorting) => { if (sorters && sorters.length > 0) { diff --git a/examples/with-meta-properties/src/rest-data-provider/utils/mapOperator.ts b/examples/with-meta-properties/src/rest-data-provider/utils/mapOperator.ts index 87f47c163025..5f6239d15144 100644 --- a/examples/with-meta-properties/src/rest-data-provider/utils/mapOperator.ts +++ b/examples/with-meta-properties/src/rest-data-provider/utils/mapOperator.ts @@ -1,4 +1,4 @@ -import { CrudOperators } from "@refinedev/core"; +import type { CrudOperators } from "@refinedev/core"; export const mapOperator = (operator: CrudOperators): string => { switch (operator) { diff --git a/examples/with-nextjs-next-auth/src/app/_refine_context.tsx b/examples/with-nextjs-next-auth/src/app/_refine_context.tsx index 180268b536a5..fa35b798b64d 100644 --- a/examples/with-nextjs-next-auth/src/app/_refine_context.tsx +++ b/examples/with-nextjs-next-auth/src/app/_refine_context.tsx @@ -1,7 +1,7 @@ "use client"; import { useNotificationProvider } from "@refinedev/antd"; -import { AuthBindings, GitHubBanner, Refine } from "@refinedev/core"; +import { type AuthBindings, GitHubBanner, Refine } from "@refinedev/core"; import { RefineKbar, RefineKbarProvider } from "@refinedev/kbar"; import routerProvider from "@refinedev/nextjs-router"; import { SessionProvider, signIn, signOut, useSession } from "next-auth/react"; diff --git a/examples/with-nextjs-next-auth/src/app/api/auth/[...nextauth]/options.ts b/examples/with-nextjs-next-auth/src/app/api/auth/[...nextauth]/options.ts index 6d985a2cb700..5c1062b90276 100644 --- a/examples/with-nextjs-next-auth/src/app/api/auth/[...nextauth]/options.ts +++ b/examples/with-nextjs-next-auth/src/app/api/auth/[...nextauth]/options.ts @@ -2,7 +2,7 @@ import GoogleProvider from "next-auth/providers/google"; import Auth0Provider from "next-auth/providers/auth0"; import KeycloakProvider from "next-auth/providers/keycloak"; import CredentialsProvider from "next-auth/providers/credentials"; -import { Awaitable, User } from "next-auth"; +import type { Awaitable, User } from "next-auth"; const authOptions = { // Configure one or more authentication providers diff --git a/examples/with-nextjs-next-auth/src/app/blog-posts/page.tsx b/examples/with-nextjs-next-auth/src/app/blog-posts/page.tsx index e8d51404b8b2..926d1a69d4f1 100644 --- a/examples/with-nextjs-next-auth/src/app/blog-posts/page.tsx +++ b/examples/with-nextjs-next-auth/src/app/blog-posts/page.tsx @@ -9,7 +9,7 @@ import { ShowButton, useTable, } from "@refinedev/antd"; -import { BaseRecord, useMany } from "@refinedev/core"; +import { type BaseRecord, useMany } from "@refinedev/core"; import { Space, Table } from "antd"; export default function BlogPostList() { diff --git a/examples/with-nextjs-next-auth/src/app/categories/page.tsx b/examples/with-nextjs-next-auth/src/app/categories/page.tsx index 9f7703da7ef7..637aac49f2a6 100644 --- a/examples/with-nextjs-next-auth/src/app/categories/page.tsx +++ b/examples/with-nextjs-next-auth/src/app/categories/page.tsx @@ -7,7 +7,7 @@ import { ShowButton, useTable, } from "@refinedev/antd"; -import { BaseRecord } from "@refinedev/core"; +import type { BaseRecord } from "@refinedev/core"; import { Space, Table } from "antd"; export default function CategoryList() { diff --git a/examples/with-nextjs-next-auth/src/app/layout.tsx b/examples/with-nextjs-next-auth/src/app/layout.tsx index a1d55f1827d7..2168bc4fa9e2 100644 --- a/examples/with-nextjs-next-auth/src/app/layout.tsx +++ b/examples/with-nextjs-next-auth/src/app/layout.tsx @@ -1,4 +1,4 @@ -import { Metadata } from "next"; +import type { Metadata } from "next"; import React, { Suspense } from "react"; import { RefineContext } from "./_refine_context"; import { AntdRegistry } from "@ant-design/nextjs-registry"; diff --git a/examples/with-nextjs-next-auth/src/contexts/color-mode/index.tsx b/examples/with-nextjs-next-auth/src/contexts/color-mode/index.tsx index 9fe7ec2fde6d..0aaca316a860 100644 --- a/examples/with-nextjs-next-auth/src/contexts/color-mode/index.tsx +++ b/examples/with-nextjs-next-auth/src/contexts/color-mode/index.tsx @@ -4,7 +4,7 @@ import { RefineThemes } from "@refinedev/antd"; import { App as AntdApp, ConfigProvider, theme } from "antd"; import Cookies from "js-cookie"; import React, { - PropsWithChildren, + type PropsWithChildren, createContext, useEffect, useState, diff --git a/examples/with-nextjs-next-auth/types/next-auth.d.ts b/examples/with-nextjs-next-auth/types/next-auth.d.ts index 32cb76fa5755..31d28d59e92f 100644 --- a/examples/with-nextjs-next-auth/types/next-auth.d.ts +++ b/examples/with-nextjs-next-auth/types/next-auth.d.ts @@ -1,4 +1,4 @@ -import { DefaultSession } from "types/next-auth"; +import type { DefaultSession } from "types/next-auth"; declare module "next-auth" { /** diff --git a/examples/with-nextjs/src/app/blog-posts/page.tsx b/examples/with-nextjs/src/app/blog-posts/page.tsx index e8d51404b8b2..926d1a69d4f1 100644 --- a/examples/with-nextjs/src/app/blog-posts/page.tsx +++ b/examples/with-nextjs/src/app/blog-posts/page.tsx @@ -9,7 +9,7 @@ import { ShowButton, useTable, } from "@refinedev/antd"; -import { BaseRecord, useMany } from "@refinedev/core"; +import { type BaseRecord, useMany } from "@refinedev/core"; import { Space, Table } from "antd"; export default function BlogPostList() { diff --git a/examples/with-nextjs/src/app/categories/page.tsx b/examples/with-nextjs/src/app/categories/page.tsx index 9f7703da7ef7..637aac49f2a6 100644 --- a/examples/with-nextjs/src/app/categories/page.tsx +++ b/examples/with-nextjs/src/app/categories/page.tsx @@ -7,7 +7,7 @@ import { ShowButton, useTable, } from "@refinedev/antd"; -import { BaseRecord } from "@refinedev/core"; +import type { BaseRecord } from "@refinedev/core"; import { Space, Table } from "antd"; export default function CategoryList() { diff --git a/examples/with-nextjs/src/app/layout.tsx b/examples/with-nextjs/src/app/layout.tsx index b9fb0f1e3ca5..3ecab51c1455 100644 --- a/examples/with-nextjs/src/app/layout.tsx +++ b/examples/with-nextjs/src/app/layout.tsx @@ -3,7 +3,7 @@ import { useNotificationProvider } from "@refinedev/antd"; import { GitHubBanner, Refine } from "@refinedev/core"; import { RefineKbar, RefineKbarProvider } from "@refinedev/kbar"; import routerProvider from "@refinedev/nextjs-router"; -import { Metadata } from "next"; +import type { Metadata } from "next"; import { cookies } from "next/headers"; import React, { Suspense } from "react"; diff --git a/examples/with-nextjs/src/contexts/color-mode/index.tsx b/examples/with-nextjs/src/contexts/color-mode/index.tsx index 4e0bc7f41eb0..9cb15d967a04 100644 --- a/examples/with-nextjs/src/contexts/color-mode/index.tsx +++ b/examples/with-nextjs/src/contexts/color-mode/index.tsx @@ -4,7 +4,7 @@ import { RefineThemes } from "@refinedev/antd"; import { App as AntdApp, ConfigProvider, theme } from "antd"; import Cookies from "js-cookie"; import React, { - PropsWithChildren, + type PropsWithChildren, createContext, useEffect, useLayoutEffect, diff --git a/examples/with-nextjs/src/providers/auth-provider/auth-provider.server.ts b/examples/with-nextjs/src/providers/auth-provider/auth-provider.server.ts index 5f1f974313d5..12b93657127c 100644 --- a/examples/with-nextjs/src/providers/auth-provider/auth-provider.server.ts +++ b/examples/with-nextjs/src/providers/auth-provider/auth-provider.server.ts @@ -1,4 +1,4 @@ -import { AuthBindings } from "@refinedev/core"; +import type { AuthBindings } from "@refinedev/core"; import { cookies } from "next/headers"; export const authProviderServer: Pick = { diff --git a/examples/with-nextjs/src/providers/auth-provider/auth-provider.ts b/examples/with-nextjs/src/providers/auth-provider/auth-provider.ts index 6ff1579fc743..9a1cb1e5fbae 100644 --- a/examples/with-nextjs/src/providers/auth-provider/auth-provider.ts +++ b/examples/with-nextjs/src/providers/auth-provider/auth-provider.ts @@ -1,6 +1,6 @@ "use client"; -import { AuthBindings } from "@refinedev/core"; +import type { AuthBindings } from "@refinedev/core"; import Cookies from "js-cookie"; const mockUsers = [ diff --git a/examples/with-nx/src/authProvider.ts b/examples/with-nx/src/authProvider.ts index 2e46d253a7a4..21e3414c77cf 100644 --- a/examples/with-nx/src/authProvider.ts +++ b/examples/with-nx/src/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; export const TOKEN_KEY = "refine-auth"; diff --git a/examples/with-nx/src/contexts/color-mode/index.tsx b/examples/with-nx/src/contexts/color-mode/index.tsx index e6a039c4d284..5da7d3d9fb81 100644 --- a/examples/with-nx/src/contexts/color-mode/index.tsx +++ b/examples/with-nx/src/contexts/color-mode/index.tsx @@ -1,4 +1,9 @@ -import { PropsWithChildren, createContext, useEffect, useState } from "react"; +import { + type PropsWithChildren, + createContext, + useEffect, + useState, +} from "react"; import { ConfigProvider, theme } from "antd"; import { RefineThemes } from "@refinedev/antd"; diff --git a/examples/with-persist-query/src/pages/posts/list.tsx b/examples/with-persist-query/src/pages/posts/list.tsx index 18dd4c2639c9..83df4b94fad3 100644 --- a/examples/with-persist-query/src/pages/posts/list.tsx +++ b/examples/with-persist-query/src/pages/posts/list.tsx @@ -1,9 +1,9 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { useNavigation } from "@refinedev/core"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostList: React.FC = () => { const { edit, create } = useNavigation(); diff --git a/examples/with-react-toastify/src/pages/posts/list.tsx b/examples/with-react-toastify/src/pages/posts/list.tsx index faa2eb3b822c..15f7cd86232d 100644 --- a/examples/with-react-toastify/src/pages/posts/list.tsx +++ b/examples/with-react-toastify/src/pages/posts/list.tsx @@ -1,9 +1,9 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { useNavigation } from "@refinedev/core"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostList: React.FC = () => { const { edit, create } = useNavigation(); diff --git a/examples/with-react-toastify/src/providers/notificationProvider.tsx b/examples/with-react-toastify/src/providers/notificationProvider.tsx index 4ad9147c95ae..efb18816d59b 100644 --- a/examples/with-react-toastify/src/providers/notificationProvider.tsx +++ b/examples/with-react-toastify/src/providers/notificationProvider.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { NotificationProvider } from "@refinedev/core"; +import type { NotificationProvider } from "@refinedev/core"; import { toast } from "react-toastify"; import { UndoableNotification } from "../components/undoableNotification"; diff --git a/examples/with-remix-antd/app/authProvider.ts b/examples/with-remix-antd/app/authProvider.ts index 2ba48cfc71c8..4924e70d46ac 100644 --- a/examples/with-remix-antd/app/authProvider.ts +++ b/examples/with-remix-antd/app/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import Cookies from "js-cookie"; import * as cookie from "cookie"; diff --git a/examples/with-remix-antd/app/routes/_auth.tsx b/examples/with-remix-antd/app/routes/_auth.tsx index d1490cd84aa6..da9ab763d349 100644 --- a/examples/with-remix-antd/app/routes/_auth.tsx +++ b/examples/with-remix-antd/app/routes/_auth.tsx @@ -1,5 +1,5 @@ import { Outlet } from "@remix-run/react"; -import { LoaderFunctionArgs, redirect } from "@remix-run/node"; +import { type LoaderFunctionArgs, redirect } from "@remix-run/node"; import { authProvider } from "~/authProvider"; diff --git a/examples/with-remix-antd/app/routes/_protected.posts._index.tsx b/examples/with-remix-antd/app/routes/_protected.posts._index.tsx index e929a6673a67..edd569f1691c 100644 --- a/examples/with-remix-antd/app/routes/_protected.posts._index.tsx +++ b/examples/with-remix-antd/app/routes/_protected.posts._index.tsx @@ -7,11 +7,11 @@ import { } from "@refinedev/antd"; import { Table, Space } from "antd"; import { useLoaderData } from "@remix-run/react"; -import { json, LoaderFunctionArgs } from "@remix-run/node"; +import { json, type LoaderFunctionArgs } from "@remix-run/node"; import dataProvider from "@refinedev/simple-rest"; import { parseTableParams } from "@refinedev/remix-router"; -import { IPost } from "../interfaces"; +import type { IPost } from "../interfaces"; import { API_URL } from "~/constants"; const PostList: React.FC = () => { diff --git a/examples/with-remix-antd/app/routes/_protected.posts.create.tsx b/examples/with-remix-antd/app/routes/_protected.posts.create.tsx index 2cac852035ce..39985b2bae22 100644 --- a/examples/with-remix-antd/app/routes/_protected.posts.create.tsx +++ b/examples/with-remix-antd/app/routes/_protected.posts.create.tsx @@ -1,7 +1,7 @@ import { useForm, useSelect, Create } from "@refinedev/antd"; import { Form, Select, Input } from "antd"; -import { IPost } from "../interfaces"; +import type { IPost } from "../interfaces"; const PostCreate: React.FC = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/with-remix-antd/app/routes/_protected.posts.edit.$id.tsx b/examples/with-remix-antd/app/routes/_protected.posts.edit.$id.tsx index 6fb8ac2d9472..530a577166c5 100644 --- a/examples/with-remix-antd/app/routes/_protected.posts.edit.$id.tsx +++ b/examples/with-remix-antd/app/routes/_protected.posts.edit.$id.tsx @@ -1,11 +1,11 @@ import { useForm, useSelect, Edit } from "@refinedev/antd"; import dataProvider from "@refinedev/simple-rest"; -import { json, LoaderFunctionArgs } from "@remix-run/node"; +import { json, type LoaderFunctionArgs } from "@remix-run/node"; import { useLoaderData } from "@remix-run/react"; import { Form, Input, Select } from "antd"; import { API_URL } from "~/constants"; -import { IPost } from "../interfaces"; +import type { IPost } from "../interfaces"; const PostEdit: React.FC = () => { const { initialData } = useLoaderData(); diff --git a/examples/with-remix-antd/app/routes/_protected.posts.show.$id.tsx b/examples/with-remix-antd/app/routes/_protected.posts.show.$id.tsx index 3b36f2685212..06ff461fc026 100644 --- a/examples/with-remix-antd/app/routes/_protected.posts.show.$id.tsx +++ b/examples/with-remix-antd/app/routes/_protected.posts.show.$id.tsx @@ -3,9 +3,9 @@ import { Show } from "@refinedev/antd"; import { Typography, Tag } from "antd"; import dataProvider from "@refinedev/simple-rest"; import { useLoaderData } from "@remix-run/react"; -import { json, LoaderFunctionArgs } from "@remix-run/node"; +import { json, type LoaderFunctionArgs } from "@remix-run/node"; -import { ICategory, IPost } from "../interfaces"; +import type { ICategory, IPost } from "../interfaces"; import { API_URL } from "~/constants"; const { Title, Text } = Typography; diff --git a/examples/with-remix-antd/app/routes/_protected.tsx b/examples/with-remix-antd/app/routes/_protected.tsx index 744271764af0..8cefb8ca2579 100644 --- a/examples/with-remix-antd/app/routes/_protected.tsx +++ b/examples/with-remix-antd/app/routes/_protected.tsx @@ -1,6 +1,6 @@ import { ThemedLayoutV2 } from "@refinedev/antd"; import { Outlet } from "@remix-run/react"; -import { LoaderFunctionArgs, redirect } from "@remix-run/node"; +import { type LoaderFunctionArgs, redirect } from "@remix-run/node"; import { authProvider } from "~/authProvider"; diff --git a/examples/with-remix-auth/app/root.tsx b/examples/with-remix-auth/app/root.tsx index 4a9f04525a2c..312570e81335 100644 --- a/examples/with-remix-auth/app/root.tsx +++ b/examples/with-remix-auth/app/root.tsx @@ -1,4 +1,8 @@ -import { json, LoaderFunctionArgs, MetaFunction } from "@remix-run/node"; +import { + json, + type LoaderFunctionArgs, + type MetaFunction, +} from "@remix-run/node"; import { Links, LiveReload, @@ -8,7 +12,7 @@ import { ScrollRestoration, useLoaderData, } from "@remix-run/react"; -import { AuthProvider, GitHubBanner, Refine } from "@refinedev/core"; +import { type AuthProvider, GitHubBanner, Refine } from "@refinedev/core"; import { useNotificationProvider, RefineThemes } from "@refinedev/antd"; import dataProvider from "@refinedev/simple-rest"; import routerProvider, { diff --git a/examples/with-remix-auth/app/routes/_auth.tsx b/examples/with-remix-auth/app/routes/_auth.tsx index 146a26ecb3df..7e5d2e3b4243 100644 --- a/examples/with-remix-auth/app/routes/_auth.tsx +++ b/examples/with-remix-auth/app/routes/_auth.tsx @@ -1,5 +1,5 @@ import { Outlet } from "@remix-run/react"; -import { LoaderFunctionArgs, redirect } from "@remix-run/node"; +import { type LoaderFunctionArgs, redirect } from "@remix-run/node"; import { authenticator } from "~/utils/auth.server"; export default function AuthLayout() { diff --git a/examples/with-remix-auth/app/routes/auth.$provider._index.tsx b/examples/with-remix-auth/app/routes/auth.$provider._index.tsx index 8d64dfd816cd..f17fa685c949 100644 --- a/examples/with-remix-auth/app/routes/auth.$provider._index.tsx +++ b/examples/with-remix-auth/app/routes/auth.$provider._index.tsx @@ -1,4 +1,4 @@ -import { LoaderFunctionArgs, ActionFunctionArgs } from "@remix-run/node"; +import type { LoaderFunctionArgs, ActionFunctionArgs } from "@remix-run/node"; import { authenticator } from "~/utils/auth.server"; export const action = async ({ request }: ActionFunctionArgs) => { diff --git a/examples/with-remix-headless/app/authProvider.ts b/examples/with-remix-headless/app/authProvider.ts index 76453ea741d0..7eca6aaf558d 100644 --- a/examples/with-remix-headless/app/authProvider.ts +++ b/examples/with-remix-headless/app/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import Cookies from "js-cookie"; import * as cookie from "cookie"; diff --git a/examples/with-remix-headless/app/components/layout/index.tsx b/examples/with-remix-headless/app/components/layout/index.tsx index f6f489fe2e87..330edd006fc0 100644 --- a/examples/with-remix-headless/app/components/layout/index.tsx +++ b/examples/with-remix-headless/app/components/layout/index.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { Menu } from "../menu"; import { Breadcrumb } from "../breadcrumb"; diff --git a/examples/with-remix-headless/app/pages/posts/list.tsx b/examples/with-remix-headless/app/pages/posts/list.tsx index 625f81475cb4..e522a9bac9ab 100644 --- a/examples/with-remix-headless/app/pages/posts/list.tsx +++ b/examples/with-remix-headless/app/pages/posts/list.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { useNavigation } from "@refinedev/core"; export interface IPost { diff --git a/examples/with-remix-headless/app/routes/_auth.tsx b/examples/with-remix-headless/app/routes/_auth.tsx index 9911794eb7c8..a8b64ea46d7b 100644 --- a/examples/with-remix-headless/app/routes/_auth.tsx +++ b/examples/with-remix-headless/app/routes/_auth.tsx @@ -1,5 +1,5 @@ import { Outlet } from "@remix-run/react"; -import { LoaderFunctionArgs, redirect } from "@remix-run/node"; +import { type LoaderFunctionArgs, redirect } from "@remix-run/node"; import { authProvider } from "~/authProvider"; diff --git a/examples/with-remix-headless/app/routes/_protected.posts._index.tsx b/examples/with-remix-headless/app/routes/_protected.posts._index.tsx index 5f22ac5bb4ce..ebe4669d0c54 100644 --- a/examples/with-remix-headless/app/routes/_protected.posts._index.tsx +++ b/examples/with-remix-headless/app/routes/_protected.posts._index.tsx @@ -1,14 +1,14 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { useNavigation } from "@refinedev/core"; import { useLoaderData } from "@remix-run/react"; -import { json, LoaderFunctionArgs } from "@remix-run/node"; +import { json, type LoaderFunctionArgs } from "@remix-run/node"; import dataProvider from "@refinedev/simple-rest"; import { parseTableParams } from "@refinedev/remix-router"; import { API_URL } from "~/constants"; -import { IPost } from "~/interfaces"; +import type { IPost } from "~/interfaces"; const PostList: React.FC = () => { const { initialData } = useLoaderData(); diff --git a/examples/with-remix-headless/app/routes/_protected.posts.create.tsx b/examples/with-remix-headless/app/routes/_protected.posts.create.tsx index 7c0c65fe0ee1..303470115c1d 100644 --- a/examples/with-remix-headless/app/routes/_protected.posts.create.tsx +++ b/examples/with-remix-headless/app/routes/_protected.posts.create.tsx @@ -1,6 +1,6 @@ import { useForm } from "@refinedev/react-hook-form"; import { useSelect } from "@refinedev/core"; -import { LoaderFunctionArgs } from "@remix-run/node"; +import type { LoaderFunctionArgs } from "@remix-run/node"; const PostCreate: React.FC = () => { const { diff --git a/examples/with-remix-headless/app/routes/_protected.posts.edit.$id.tsx b/examples/with-remix-headless/app/routes/_protected.posts.edit.$id.tsx index 8e272fc529c2..57a86a2f7409 100644 --- a/examples/with-remix-headless/app/routes/_protected.posts.edit.$id.tsx +++ b/examples/with-remix-headless/app/routes/_protected.posts.edit.$id.tsx @@ -2,11 +2,11 @@ import { useEffect } from "react"; import { useForm } from "@refinedev/react-hook-form"; import { useSelect } from "@refinedev/core"; import { useLoaderData } from "@remix-run/react"; -import { json, LoaderFunctionArgs } from "@remix-run/node"; +import { json, type LoaderFunctionArgs } from "@remix-run/node"; import dataProvider from "@refinedev/simple-rest"; import { API_URL } from "~/constants"; -import { IPost } from "~/interfaces"; +import type { IPost } from "~/interfaces"; const PostEdit: React.FC = () => { const { initialData } = useLoaderData(); diff --git a/examples/with-remix-headless/app/routes/_protected.tsx b/examples/with-remix-headless/app/routes/_protected.tsx index ecd2f1012b2e..ff09ca52eb41 100644 --- a/examples/with-remix-headless/app/routes/_protected.tsx +++ b/examples/with-remix-headless/app/routes/_protected.tsx @@ -1,5 +1,5 @@ import { Outlet } from "@remix-run/react"; -import { LoaderFunctionArgs, redirect } from "@remix-run/node"; +import { type LoaderFunctionArgs, redirect } from "@remix-run/node"; import { authProvider } from "~/authProvider"; import { Layout } from "~/components/layout"; diff --git a/examples/with-remix-material-ui/app/authProvider.ts b/examples/with-remix-material-ui/app/authProvider.ts index 2ba48cfc71c8..4924e70d46ac 100644 --- a/examples/with-remix-material-ui/app/authProvider.ts +++ b/examples/with-remix-material-ui/app/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import Cookies from "js-cookie"; import * as cookie from "cookie"; diff --git a/examples/with-remix-material-ui/app/components/header/index.tsx b/examples/with-remix-material-ui/app/components/header/index.tsx index d9f53e871662..4cce37d23859 100644 --- a/examples/with-remix-material-ui/app/components/header/index.tsx +++ b/examples/with-remix-material-ui/app/components/header/index.tsx @@ -7,7 +7,10 @@ import Stack from "@mui/material/Stack"; import Toolbar from "@mui/material/Toolbar"; import Typography from "@mui/material/Typography"; import { useGetIdentity } from "@refinedev/core"; -import { HamburgerMenu, RefineThemedLayoutV2HeaderProps } from "@refinedev/mui"; +import { + HamburgerMenu, + type RefineThemedLayoutV2HeaderProps, +} from "@refinedev/mui"; import React, { useContext } from "react"; import { ColorModeContext } from "~/contexts/ColorModeContext"; diff --git a/examples/with-remix-material-ui/app/contexts/ColorModeContext.tsx b/examples/with-remix-material-ui/app/contexts/ColorModeContext.tsx index c2edfd71e178..4f6842451cc0 100644 --- a/examples/with-remix-material-ui/app/contexts/ColorModeContext.tsx +++ b/examples/with-remix-material-ui/app/contexts/ColorModeContext.tsx @@ -3,7 +3,7 @@ import { ThemeProvider } from "@mui/material/styles"; import { RefineThemes } from "@refinedev/mui"; import { parseCookies, setCookie } from "nookies"; import React, { - PropsWithChildren, + type PropsWithChildren, createContext, useEffect, useState, diff --git a/examples/with-remix-vite-headless/app/authProvider.ts b/examples/with-remix-vite-headless/app/authProvider.ts index 76453ea741d0..7eca6aaf558d 100644 --- a/examples/with-remix-vite-headless/app/authProvider.ts +++ b/examples/with-remix-vite-headless/app/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import Cookies from "js-cookie"; import * as cookie from "cookie"; diff --git a/examples/with-remix-vite-headless/app/components/layout/index.tsx b/examples/with-remix-vite-headless/app/components/layout/index.tsx index f6f489fe2e87..330edd006fc0 100644 --- a/examples/with-remix-vite-headless/app/components/layout/index.tsx +++ b/examples/with-remix-vite-headless/app/components/layout/index.tsx @@ -1,4 +1,4 @@ -import { PropsWithChildren } from "react"; +import type { PropsWithChildren } from "react"; import { Menu } from "../menu"; import { Breadcrumb } from "../breadcrumb"; diff --git a/examples/with-remix-vite-headless/app/pages/posts/list.tsx b/examples/with-remix-vite-headless/app/pages/posts/list.tsx index 625f81475cb4..e522a9bac9ab 100644 --- a/examples/with-remix-vite-headless/app/pages/posts/list.tsx +++ b/examples/with-remix-vite-headless/app/pages/posts/list.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { useNavigation } from "@refinedev/core"; export interface IPost { diff --git a/examples/with-remix-vite-headless/app/routes/_auth.tsx b/examples/with-remix-vite-headless/app/routes/_auth.tsx index 9911794eb7c8..a8b64ea46d7b 100644 --- a/examples/with-remix-vite-headless/app/routes/_auth.tsx +++ b/examples/with-remix-vite-headless/app/routes/_auth.tsx @@ -1,5 +1,5 @@ import { Outlet } from "@remix-run/react"; -import { LoaderFunctionArgs, redirect } from "@remix-run/node"; +import { type LoaderFunctionArgs, redirect } from "@remix-run/node"; import { authProvider } from "~/authProvider"; diff --git a/examples/with-remix-vite-headless/app/routes/_protected.posts._index.tsx b/examples/with-remix-vite-headless/app/routes/_protected.posts._index.tsx index 5f22ac5bb4ce..ebe4669d0c54 100644 --- a/examples/with-remix-vite-headless/app/routes/_protected.posts._index.tsx +++ b/examples/with-remix-vite-headless/app/routes/_protected.posts._index.tsx @@ -1,14 +1,14 @@ import React from "react"; import { useTable } from "@refinedev/react-table"; -import { ColumnDef, flexRender } from "@tanstack/react-table"; +import { type ColumnDef, flexRender } from "@tanstack/react-table"; import { useNavigation } from "@refinedev/core"; import { useLoaderData } from "@remix-run/react"; -import { json, LoaderFunctionArgs } from "@remix-run/node"; +import { json, type LoaderFunctionArgs } from "@remix-run/node"; import dataProvider from "@refinedev/simple-rest"; import { parseTableParams } from "@refinedev/remix-router"; import { API_URL } from "~/constants"; -import { IPost } from "~/interfaces"; +import type { IPost } from "~/interfaces"; const PostList: React.FC = () => { const { initialData } = useLoaderData(); diff --git a/examples/with-remix-vite-headless/app/routes/_protected.posts.create.tsx b/examples/with-remix-vite-headless/app/routes/_protected.posts.create.tsx index 7c0c65fe0ee1..303470115c1d 100644 --- a/examples/with-remix-vite-headless/app/routes/_protected.posts.create.tsx +++ b/examples/with-remix-vite-headless/app/routes/_protected.posts.create.tsx @@ -1,6 +1,6 @@ import { useForm } from "@refinedev/react-hook-form"; import { useSelect } from "@refinedev/core"; -import { LoaderFunctionArgs } from "@remix-run/node"; +import type { LoaderFunctionArgs } from "@remix-run/node"; const PostCreate: React.FC = () => { const { diff --git a/examples/with-remix-vite-headless/app/routes/_protected.posts.edit.$id.tsx b/examples/with-remix-vite-headless/app/routes/_protected.posts.edit.$id.tsx index 8e272fc529c2..57a86a2f7409 100644 --- a/examples/with-remix-vite-headless/app/routes/_protected.posts.edit.$id.tsx +++ b/examples/with-remix-vite-headless/app/routes/_protected.posts.edit.$id.tsx @@ -2,11 +2,11 @@ import { useEffect } from "react"; import { useForm } from "@refinedev/react-hook-form"; import { useSelect } from "@refinedev/core"; import { useLoaderData } from "@remix-run/react"; -import { json, LoaderFunctionArgs } from "@remix-run/node"; +import { json, type LoaderFunctionArgs } from "@remix-run/node"; import dataProvider from "@refinedev/simple-rest"; import { API_URL } from "~/constants"; -import { IPost } from "~/interfaces"; +import type { IPost } from "~/interfaces"; const PostEdit: React.FC = () => { const { initialData } = useLoaderData(); diff --git a/examples/with-remix-vite-headless/app/routes/_protected.tsx b/examples/with-remix-vite-headless/app/routes/_protected.tsx index ecd2f1012b2e..ff09ca52eb41 100644 --- a/examples/with-remix-vite-headless/app/routes/_protected.tsx +++ b/examples/with-remix-vite-headless/app/routes/_protected.tsx @@ -1,5 +1,5 @@ import { Outlet } from "@remix-run/react"; -import { LoaderFunctionArgs, redirect } from "@remix-run/node"; +import { type LoaderFunctionArgs, redirect } from "@remix-run/node"; import { authProvider } from "~/authProvider"; import { Layout } from "~/components/layout"; diff --git a/examples/with-storybook-antd/src/stories/crud/List.stories.tsx b/examples/with-storybook-antd/src/stories/crud/List.stories.tsx index 7957b739bc53..54767b4a8668 100644 --- a/examples/with-storybook-antd/src/stories/crud/List.stories.tsx +++ b/examples/with-storybook-antd/src/stories/crud/List.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { List as AntdList } from "@refinedev/antd"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-antd/src/stories/table/editable.stories.tsx b/examples/with-storybook-antd/src/stories/table/editable.stories.tsx index 88b1306dd0fe..fec3590155b7 100644 --- a/examples/with-storybook-antd/src/stories/table/editable.stories.tsx +++ b/examples/with-storybook-antd/src/stories/table/editable.stories.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { ComponentMeta } from "@storybook/react"; +import type { ComponentMeta } from "@storybook/react"; import { EditButton, List, @@ -11,7 +11,7 @@ import { } from "@refinedev/antd"; import { Button, Form, Input, Select, Space, Table } from "antd"; import { useMany, useDeleteMany } from "@refinedev/core"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; import MDEditor from "@uiw/react-md-editor"; diff --git a/examples/with-storybook-antd/src/stories/table/search.stories.tsx b/examples/with-storybook-antd/src/stories/table/search.stories.tsx index 4b3648ef9217..5eb8cbf6c895 100644 --- a/examples/with-storybook-antd/src/stories/table/search.stories.tsx +++ b/examples/with-storybook-antd/src/stories/table/search.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentMeta } from "@storybook/react"; +import type { ComponentMeta } from "@storybook/react"; import { DateField, EditButton, @@ -16,7 +16,7 @@ import { Col, DatePicker, Form, - FormProps, + type FormProps, Input, Row, Select, @@ -25,8 +25,8 @@ import { Tag, } from "antd"; -import { HttpError, CrudFilters, useMany } from "@refinedev/core"; -import { IPost, IPostFilterVariables, ICategory } from "../../interfaces"; +import { type HttpError, type CrudFilters, useMany } from "@refinedev/core"; +import type { IPost, IPostFilterVariables, ICategory } from "../../interfaces"; import { RefineWithLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-antd/src/stories/table/table.stories.tsx b/examples/with-storybook-antd/src/stories/table/table.stories.tsx index 5301c7bb494e..9b608c8743ba 100644 --- a/examples/with-storybook-antd/src/stories/table/table.stories.tsx +++ b/examples/with-storybook-antd/src/stories/table/table.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentMeta } from "@storybook/react"; +import type { ComponentMeta } from "@storybook/react"; import { List, useTable } from "@refinedev/antd"; import { Table } from "antd"; diff --git a/examples/with-storybook-material-ui/src/authProvider.ts b/examples/with-storybook-material-ui/src/authProvider.ts index b21c2d344d16..46b657434939 100644 --- a/examples/with-storybook-material-ui/src/authProvider.ts +++ b/examples/with-storybook-material-ui/src/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; export const TOKEN_KEY = "refine-auth"; diff --git a/examples/with-storybook-material-ui/src/stories/autocomplete/basic.stories.tsx b/examples/with-storybook-material-ui/src/stories/autocomplete/basic.stories.tsx index 1141a4d1513f..376cc50d328e 100644 --- a/examples/with-storybook-material-ui/src/stories/autocomplete/basic.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/autocomplete/basic.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { useAutocomplete } from "@refinedev/mui"; import Autocomplete from "@mui/material/Autocomplete"; @@ -10,7 +10,7 @@ import CheckBoxOutlineBlankIcon from "@mui/icons-material/CheckBoxOutlineBlank"; import CheckBoxIcon from "@mui/icons-material/CheckBox"; import { RefineWithoutLayout } from "../../../.storybook/preview"; -import { ICategory } from "../../interfaces"; +import type { ICategory } from "../../interfaces"; export default { title: "Hooks / Autocomplete", diff --git a/examples/with-storybook-material-ui/src/stories/buttons/Buttons.stories.tsx b/examples/with-storybook-material-ui/src/stories/buttons/Buttons.stories.tsx index 4849dc54d7d2..a66dda43d708 100644 --- a/examples/with-storybook-material-ui/src/stories/buttons/Buttons.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/buttons/Buttons.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { CreateButton, CloneButton, diff --git a/examples/with-storybook-material-ui/src/stories/crud/Create.stories.tsx b/examples/with-storybook-material-ui/src/stories/crud/Create.stories.tsx index cda840beaed9..069b6bd54be7 100644 --- a/examples/with-storybook-material-ui/src/stories/crud/Create.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/crud/Create.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { Create } from "@refinedev/mui"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/crud/Edit.stories.tsx b/examples/with-storybook-material-ui/src/stories/crud/Edit.stories.tsx index 79e2b6f7393c..dc9d648eff05 100644 --- a/examples/with-storybook-material-ui/src/stories/crud/Edit.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/crud/Edit.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { Edit } from "@refinedev/mui"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/crud/List.stories.tsx b/examples/with-storybook-material-ui/src/stories/crud/List.stories.tsx index 47e7319f2984..2c885cf2c5e4 100644 --- a/examples/with-storybook-material-ui/src/stories/crud/List.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/crud/List.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { List } from "@refinedev/mui"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/crud/Show.stories.tsx b/examples/with-storybook-material-ui/src/stories/crud/Show.stories.tsx index 6461e3bf6b9d..d6822863f22c 100644 --- a/examples/with-storybook-material-ui/src/stories/crud/Show.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/crud/Show.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { Show } from "@refinedev/mui"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/dataGrid/basic.stories.tsx b/examples/with-storybook-material-ui/src/stories/dataGrid/basic.stories.tsx index 18e3187222c2..0b41bdb3717d 100644 --- a/examples/with-storybook-material-ui/src/stories/dataGrid/basic.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/dataGrid/basic.stories.tsx @@ -1,10 +1,10 @@ -import { DataGrid, GridColDef } from "@mui/x-data-grid"; +import { DataGrid, type GridColDef } from "@mui/x-data-grid"; import { useMany } from "@refinedev/core"; import { useDataGrid } from "@refinedev/mui"; -import { ComponentMeta, ComponentStory } from "@storybook/react"; +import type { ComponentMeta, ComponentStory } from "@storybook/react"; import React from "react"; -import { ICategory, IPost } from "../../interfaces"; +import type { ICategory, IPost } from "../../interfaces"; import { RefineWithoutLayout } from "../../../.storybook/preview"; export default { diff --git a/examples/with-storybook-material-ui/src/stories/dataGrid/editable.stories.tsx b/examples/with-storybook-material-ui/src/stories/dataGrid/editable.stories.tsx index 106075923ddd..05a63b98e1a0 100644 --- a/examples/with-storybook-material-ui/src/stories/dataGrid/editable.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/dataGrid/editable.stories.tsx @@ -1,7 +1,7 @@ -import { DataGrid, GridColDef } from "@mui/x-data-grid"; +import { DataGrid, type GridColDef } from "@mui/x-data-grid"; import { useUpdate } from "@refinedev/core"; import { useDataGrid } from "@refinedev/mui"; -import { ComponentMeta, ComponentStory } from "@storybook/react"; +import type { ComponentMeta, ComponentStory } from "@storybook/react"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/dataGrid/selection/deleteMany.stories.tsx b/examples/with-storybook-material-ui/src/stories/dataGrid/selection/deleteMany.stories.tsx index 16c3ecbb48f1..8091369521a5 100644 --- a/examples/with-storybook-material-ui/src/stories/dataGrid/selection/deleteMany.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/dataGrid/selection/deleteMany.stories.tsx @@ -1,9 +1,13 @@ import Box from "@mui/material/Box"; import Button from "@mui/material/Button"; -import { DataGrid, GridColDef, GridRowSelectionModel } from "@mui/x-data-grid"; +import { + DataGrid, + type GridColDef, + type GridRowSelectionModel, +} from "@mui/x-data-grid"; import { useDeleteMany } from "@refinedev/core"; import { useDataGrid } from "@refinedev/mui"; -import { ComponentMeta, ComponentStory } from "@storybook/react"; +import type { ComponentMeta, ComponentStory } from "@storybook/react"; import { useState } from "react"; import { RefineWithoutLayout } from "../../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/dataGrid/selection/updateMany.stories.tsx b/examples/with-storybook-material-ui/src/stories/dataGrid/selection/updateMany.stories.tsx index aaca30dfb02a..61922191a08d 100644 --- a/examples/with-storybook-material-ui/src/stories/dataGrid/selection/updateMany.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/dataGrid/selection/updateMany.stories.tsx @@ -1,9 +1,13 @@ import Box from "@mui/material/Box"; import Button from "@mui/material/Button"; -import { DataGrid, GridColDef, GridRowSelectionModel } from "@mui/x-data-grid"; +import { + DataGrid, + type GridColDef, + type GridRowSelectionModel, +} from "@mui/x-data-grid"; import { useUpdateMany } from "@refinedev/core"; import { useDataGrid } from "@refinedev/mui"; -import { ComponentMeta, ComponentStory } from "@storybook/react"; +import type { ComponentMeta, ComponentStory } from "@storybook/react"; import { useState } from "react"; import { RefineWithoutLayout } from "../../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/fields/BooleanField.stories.tsx b/examples/with-storybook-material-ui/src/stories/fields/BooleanField.stories.tsx index d55d56971e55..a04edfd9235e 100644 --- a/examples/with-storybook-material-ui/src/stories/fields/BooleanField.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/fields/BooleanField.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { BooleanField } from "@refinedev/mui"; diff --git a/examples/with-storybook-material-ui/src/stories/fields/DateField.stories.tsx b/examples/with-storybook-material-ui/src/stories/fields/DateField.stories.tsx index fae06e316d56..13b85cda00bb 100644 --- a/examples/with-storybook-material-ui/src/stories/fields/DateField.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/fields/DateField.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { DateField } from "@refinedev/mui"; diff --git a/examples/with-storybook-material-ui/src/stories/fields/EmailField.stories.tsx b/examples/with-storybook-material-ui/src/stories/fields/EmailField.stories.tsx index 19fb85eadf9d..6e46d3851bc2 100644 --- a/examples/with-storybook-material-ui/src/stories/fields/EmailField.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/fields/EmailField.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { EmailField, diff --git a/examples/with-storybook-material-ui/src/stories/fields/FileField.stories.tsx b/examples/with-storybook-material-ui/src/stories/fields/FileField.stories.tsx index da3198a5e9d8..01d792817bc9 100644 --- a/examples/with-storybook-material-ui/src/stories/fields/FileField.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/fields/FileField.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { FileField } from "@refinedev/mui"; diff --git a/examples/with-storybook-material-ui/src/stories/fields/TagField.stories.tsx b/examples/with-storybook-material-ui/src/stories/fields/TagField.stories.tsx index a2c072e6c09d..a09ff62fe69b 100644 --- a/examples/with-storybook-material-ui/src/stories/fields/TagField.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/fields/TagField.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { TagField } from "@refinedev/mui"; diff --git a/examples/with-storybook-material-ui/src/stories/fields/UrlField.stories.tsx b/examples/with-storybook-material-ui/src/stories/fields/UrlField.stories.tsx index 12c1363a860e..65c7804a4352 100644 --- a/examples/with-storybook-material-ui/src/stories/fields/UrlField.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/fields/UrlField.stories.tsx @@ -1,6 +1,6 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; -import { FileField, UrlField } from "@refinedev/mui"; +import { type FileField, UrlField } from "@refinedev/mui"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/layout/Layout.stories.tsx b/examples/with-storybook-material-ui/src/stories/layout/Layout.stories.tsx index beca02429f43..113447081e07 100644 --- a/examples/with-storybook-material-ui/src/stories/layout/Layout.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/layout/Layout.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { ThemedLayoutV2 } from "@refinedev/mui"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/modalForm/createForm.stories.tsx b/examples/with-storybook-material-ui/src/stories/modalForm/createForm.stories.tsx index 6a280adecfc8..dc3a91e679b9 100644 --- a/examples/with-storybook-material-ui/src/stories/modalForm/createForm.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/modalForm/createForm.stories.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { CreateButton } from "@refinedev/mui"; import TextField from "@mui/material/TextField"; @@ -17,7 +17,7 @@ import Select from "@mui/material/Select"; import { useModalForm } from "@refinedev/react-hook-form"; import { RefineWithoutLayout } from "../../../.storybook/preview"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export default { title: "Hooks / Modal Form", diff --git a/examples/with-storybook-material-ui/src/stories/modalForm/editForm.stories.tsx b/examples/with-storybook-material-ui/src/stories/modalForm/editForm.stories.tsx index 325eed4dde50..ff9543fa0736 100644 --- a/examples/with-storybook-material-ui/src/stories/modalForm/editForm.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/modalForm/editForm.stories.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { EditButton } from "@refinedev/mui"; import TextField from "@mui/material/TextField"; @@ -17,7 +17,7 @@ import Select from "@mui/material/Select"; import { useModalForm } from "@refinedev/react-hook-form"; import { RefineWithoutLayout } from "../../../.storybook/preview"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export default { title: "Hooks / Modal Form", diff --git a/examples/with-storybook-material-ui/src/stories/pages/Error.stories.tsx b/examples/with-storybook-material-ui/src/stories/pages/Error.stories.tsx index 23396982878c..ba53a47f1027 100644 --- a/examples/with-storybook-material-ui/src/stories/pages/Error.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/pages/Error.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { ErrorComponent } from "@refinedev/mui"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/pages/Login.stories.tsx b/examples/with-storybook-material-ui/src/stories/pages/Login.stories.tsx index 81d759bb607b..2656f0624c51 100644 --- a/examples/with-storybook-material-ui/src/stories/pages/Login.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/pages/Login.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { LoginPage } from "@refinedev/mui"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/pages/Ready.stories.tsx b/examples/with-storybook-material-ui/src/stories/pages/Ready.stories.tsx index 8d642eb5ace2..e1de5ae3e4a6 100644 --- a/examples/with-storybook-material-ui/src/stories/pages/Ready.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/pages/Ready.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentStory, ComponentMeta } from "@storybook/react"; +import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { ReadyPage } from "@refinedev/mui"; import { RefineWithoutLayout } from "../../../.storybook/preview"; diff --git a/examples/with-storybook-material-ui/src/stories/stepsForm/createForm.stories.tsx b/examples/with-storybook-material-ui/src/stories/stepsForm/createForm.stories.tsx index 089a5d81980b..f84544ae9de6 100644 --- a/examples/with-storybook-material-ui/src/stories/stepsForm/createForm.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/stepsForm/createForm.stories.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { Create, SaveButton } from "@refinedev/mui"; import TextField from "@mui/material/TextField"; import MenuItem from "@mui/material/MenuItem"; @@ -12,7 +12,7 @@ import { useStepsForm } from "@refinedev/react-hook-form"; import { RefineWithoutLayout } from "../../../.storybook/preview"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export default { title: "Hooks / Steps Form", diff --git a/examples/with-storybook-material-ui/src/stories/stepsForm/editForm.stories.tsx b/examples/with-storybook-material-ui/src/stories/stepsForm/editForm.stories.tsx index b0b73e68f09f..13708c5e6884 100644 --- a/examples/with-storybook-material-ui/src/stories/stepsForm/editForm.stories.tsx +++ b/examples/with-storybook-material-ui/src/stories/stepsForm/editForm.stories.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { Edit, SaveButton } from "@refinedev/mui"; import TextField from "@mui/material/TextField"; import MenuItem from "@mui/material/MenuItem"; @@ -12,7 +12,7 @@ import { useStepsForm } from "@refinedev/react-hook-form"; import { RefineWithoutLayout } from "../../../.storybook/preview"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export default { title: "Hooks / Steps Form", diff --git a/examples/with-web3/src/authProvider.ts b/examples/with-web3/src/authProvider.ts index bd2a047a7908..b4d45505e0df 100644 --- a/examples/with-web3/src/authProvider.ts +++ b/examples/with-web3/src/authProvider.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import Web3 from "web3"; import Web3Modal from "web3modal"; diff --git a/examples/with-web3/src/pages/posts/create.tsx b/examples/with-web3/src/pages/posts/create.tsx index 1f6b3e37e0ab..aaada77672c0 100644 --- a/examples/with-web3/src/pages/posts/create.tsx +++ b/examples/with-web3/src/pages/posts/create.tsx @@ -6,7 +6,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostCreate = () => { const { formProps, saveButtonProps } = useForm(); diff --git a/examples/with-web3/src/pages/posts/edit.tsx b/examples/with-web3/src/pages/posts/edit.tsx index 41a5e5218a6d..d83eb326e4e4 100644 --- a/examples/with-web3/src/pages/posts/edit.tsx +++ b/examples/with-web3/src/pages/posts/edit.tsx @@ -5,7 +5,7 @@ import { Form, Input, Select } from "antd"; import MDEditor from "@uiw/react-md-editor"; -import { IPost } from "../../interfaces"; +import type { IPost } from "../../interfaces"; export const PostEdit = () => { const { formProps, saveButtonProps, queryResult } = useForm(); diff --git a/examples/with-web3/src/pages/posts/list.tsx b/examples/with-web3/src/pages/posts/list.tsx index 6aa7f5a21f70..b0586cb30ddb 100644 --- a/examples/with-web3/src/pages/posts/list.tsx +++ b/examples/with-web3/src/pages/posts/list.tsx @@ -16,7 +16,7 @@ import { import { Table, Space, Select } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; export const PostList = () => { const { tableProps, sorter } = useTable({ diff --git a/examples/with-web3/src/pages/posts/show.tsx b/examples/with-web3/src/pages/posts/show.tsx index bad48491cbc3..e46d6d53c6f0 100644 --- a/examples/with-web3/src/pages/posts/show.tsx +++ b/examples/with-web3/src/pages/posts/show.tsx @@ -4,7 +4,7 @@ import { Show, MarkdownField } from "@refinedev/antd"; import { Typography, Tag } from "antd"; -import { IPost, ICategory } from "../../interfaces"; +import type { IPost, ICategory } from "../../interfaces"; const { Title, Text } = Typography; diff --git a/packages/ably/src/index.ts b/packages/ably/src/index.ts index d9b4a216fd64..22fdea28e8e0 100644 --- a/packages/ably/src/index.ts +++ b/packages/ably/src/index.ts @@ -1,4 +1,4 @@ -import { LiveProvider, LiveEvent } from "@refinedev/core"; +import type { LiveProvider, LiveEvent } from "@refinedev/core"; import Ably from "ably/promises"; import type { Types } from "ably"; interface MessageType extends Types.Message { diff --git a/packages/airtable/src/utils/generateFilter.ts b/packages/airtable/src/utils/generateFilter.ts index 1d494541870f..8951fa293181 100644 --- a/packages/airtable/src/utils/generateFilter.ts +++ b/packages/airtable/src/utils/generateFilter.ts @@ -1,4 +1,4 @@ -import { CrudFilters } from "@refinedev/core"; +import type { CrudFilters } from "@refinedev/core"; import { compile } from "@qualifyze/airtable-formulator"; import { generateFilterFormula } from "./generateFilterFormula"; diff --git a/packages/airtable/src/utils/generateFilterFormula.ts b/packages/airtable/src/utils/generateFilterFormula.ts index 3b9eb8530693..1913b5aef78f 100644 --- a/packages/airtable/src/utils/generateFilterFormula.ts +++ b/packages/airtable/src/utils/generateFilterFormula.ts @@ -1,5 +1,5 @@ -import { CrudFilters, LogicalFilter } from "@refinedev/core"; -import { Formula } from "@qualifyze/airtable-formulator"; +import type { CrudFilters, LogicalFilter } from "@refinedev/core"; +import type { Formula } from "@qualifyze/airtable-formulator"; import { generateLogicalFilterFormula } from "./generateLogicalFilterFormula"; export const generateFilterFormula = (filters: CrudFilters): Formula[] => { diff --git a/packages/airtable/src/utils/generateLogicalFilterFormula.ts b/packages/airtable/src/utils/generateLogicalFilterFormula.ts index 2ad892102322..654b93b1b74f 100644 --- a/packages/airtable/src/utils/generateLogicalFilterFormula.ts +++ b/packages/airtable/src/utils/generateLogicalFilterFormula.ts @@ -1,7 +1,7 @@ -import { LogicalFilter } from "@refinedev/core"; +import type { LogicalFilter } from "@refinedev/core"; import { isContainsOperator, isContainssOperator } from "./isContainsOperator"; import { isSimpleOperator, simpleOperatorMapping } from "./isSimpleOperator"; -import { Formula } from "@qualifyze/airtable-formulator"; +import type { Formula } from "@qualifyze/airtable-formulator"; export const generateLogicalFilterFormula = ( filter: LogicalFilter, diff --git a/packages/airtable/src/utils/generateSort.ts b/packages/airtable/src/utils/generateSort.ts index 83db1ec13c7e..1dcaee941707 100644 --- a/packages/airtable/src/utils/generateSort.ts +++ b/packages/airtable/src/utils/generateSort.ts @@ -1,4 +1,4 @@ -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; export const generateSort = (sorters?: CrudSorting) => { return sorters?.map((item) => ({ diff --git a/packages/airtable/src/utils/isSimpleOperator.ts b/packages/airtable/src/utils/isSimpleOperator.ts index c7ccadd4b8f6..fb7aceeb321e 100644 --- a/packages/airtable/src/utils/isSimpleOperator.ts +++ b/packages/airtable/src/utils/isSimpleOperator.ts @@ -1,5 +1,5 @@ export type SimpleOperators = "eq" | "ne" | "lt" | "lte" | "gt" | "gte"; -import { OperatorSymbol } from "@qualifyze/airtable-formulator"; +import type { OperatorSymbol } from "@qualifyze/airtable-formulator"; export const simpleOperatorMapping: Record = { eq: "=", diff --git a/packages/airtable/test/getList/index.spec.ts b/packages/airtable/test/getList/index.spec.ts index ca13f092dd38..b10bc71d7903 100644 --- a/packages/airtable/test/getList/index.spec.ts +++ b/packages/airtable/test/getList/index.spec.ts @@ -1,4 +1,4 @@ -import { ConditionalFilter } from "@refinedev/core"; +import type { ConditionalFilter } from "@refinedev/core"; import dataProvider from "../../src/index"; import "./index.mock"; diff --git a/packages/airtable/test/utils/generateFilter.spec.ts b/packages/airtable/test/utils/generateFilter.spec.ts index 09f37fee9aee..ac7ee32400bc 100644 --- a/packages/airtable/test/utils/generateFilter.spec.ts +++ b/packages/airtable/test/utils/generateFilter.spec.ts @@ -1,4 +1,4 @@ -import { CrudFilters } from "@refinedev/core"; +import type { CrudFilters } from "@refinedev/core"; import { generateFilter } from "../../src/utils"; describe("generateFilter", () => { diff --git a/packages/airtable/test/utils/generateFilterFormula.spec.ts b/packages/airtable/test/utils/generateFilterFormula.spec.ts index 6f0618037ab3..5ecfe1b1245b 100644 --- a/packages/airtable/test/utils/generateFilterFormula.spec.ts +++ b/packages/airtable/test/utils/generateFilterFormula.spec.ts @@ -1,4 +1,4 @@ -import { CrudFilters } from "@refinedev/core"; +import type { CrudFilters } from "@refinedev/core"; import { generateFilterFormula } from "../../src/utils"; describe("generateFilterFormula", () => { diff --git a/packages/airtable/test/utils/generateLogicalFilterFormula.spec.ts b/packages/airtable/test/utils/generateLogicalFilterFormula.spec.ts index 5647f6e676a9..76d9974e722f 100644 --- a/packages/airtable/test/utils/generateLogicalFilterFormula.spec.ts +++ b/packages/airtable/test/utils/generateLogicalFilterFormula.spec.ts @@ -1,7 +1,7 @@ -import { CrudFilter } from "@refinedev/core"; +import type { CrudFilter } from "@refinedev/core"; import { generateLogicalFilterFormula } from "../../src/utils"; -import { LogicalFilter } from "@refinedev/core"; +import type { LogicalFilter } from "@refinedev/core"; describe("generateLogicalFilterFormula", () => { it("should generate a formula for simple operators", () => { diff --git a/packages/airtable/test/utils/generateSort.spec.ts b/packages/airtable/test/utils/generateSort.spec.ts index 00157d61ef76..1bdb645e2a35 100644 --- a/packages/airtable/test/utils/generateSort.spec.ts +++ b/packages/airtable/test/utils/generateSort.spec.ts @@ -1,4 +1,4 @@ -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; import { generateSort } from "../../src/utils"; describe("generateSort", () => { diff --git a/packages/antd/src/components/autoSaveIndicator/index.tsx b/packages/antd/src/components/autoSaveIndicator/index.tsx index 3839062285e0..a7676fa12ddd 100644 --- a/packages/antd/src/components/autoSaveIndicator/index.tsx +++ b/packages/antd/src/components/autoSaveIndicator/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - AutoSaveIndicatorProps, + type AutoSaveIndicatorProps, useTranslate, AutoSaveIndicator as AutoSaveIndicatorCore, } from "@refinedev/core"; diff --git a/packages/antd/src/components/breadcrumb/index.spec.tsx b/packages/antd/src/components/breadcrumb/index.spec.tsx index f66f4cb4962a..787a6fdfd983 100644 --- a/packages/antd/src/components/breadcrumb/index.spec.tsx +++ b/packages/antd/src/components/breadcrumb/index.spec.tsx @@ -1,8 +1,8 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { Route, Routes } from "react-router-dom"; import { breadcrumbTests } from "@refinedev/ui-tests"; -import { render, TestWrapper, ITestWrapperProps, act } from "@test"; +import { render, TestWrapper, type ITestWrapperProps, act } from "@test"; import { Breadcrumb } from "./"; const renderBreadcrumb = ( diff --git a/packages/antd/src/components/breadcrumb/index.tsx b/packages/antd/src/components/breadcrumb/index.tsx index 03b046a33e8d..c09fccd1652e 100644 --- a/packages/antd/src/components/breadcrumb/index.tsx +++ b/packages/antd/src/components/breadcrumb/index.tsx @@ -8,11 +8,11 @@ import { useResource, matchResourceFromRoute, } from "@refinedev/core"; -import { RefineBreadcrumbProps } from "@refinedev/ui-types"; +import type { RefineBreadcrumbProps } from "@refinedev/ui-types"; import { Breadcrumb as AntdBreadcrumb, - BreadcrumbProps as AntdBreadcrumbProps, + type BreadcrumbProps as AntdBreadcrumbProps, } from "antd"; import { HomeOutlined } from "@ant-design/icons"; diff --git a/packages/antd/src/components/buttons/edit/index.tsx b/packages/antd/src/components/buttons/edit/index.tsx index dc148c5913a7..6ab3a93adae7 100644 --- a/packages/antd/src/components/buttons/edit/index.tsx +++ b/packages/antd/src/components/buttons/edit/index.tsx @@ -7,7 +7,7 @@ import { RefineButtonTestIds, } from "@refinedev/ui-types"; -import { EditButtonProps } from "../types"; +import type { EditButtonProps } from "../types"; /** * `` uses Ant Design's {@link https://ant.design/components/button/ `
{children}
; diff --git a/packages/core/src/components/layoutWrapper/index.spec.tsx b/packages/core/src/components/layoutWrapper/index.spec.tsx index e748345a148d..8550cb518036 100644 --- a/packages/core/src/components/layoutWrapper/index.spec.tsx +++ b/packages/core/src/components/layoutWrapper/index.spec.tsx @@ -11,7 +11,7 @@ import { render, } from "@test"; -import { +import type { IRefineContextProvider, LayoutProps, } from "../../contexts/refine/types"; diff --git a/packages/core/src/components/layoutWrapper/index.tsx b/packages/core/src/components/layoutWrapper/index.tsx index 72533178f142..784c8dcf7655 100644 --- a/packages/core/src/components/layoutWrapper/index.tsx +++ b/packages/core/src/components/layoutWrapper/index.tsx @@ -7,7 +7,7 @@ import { useWarnAboutChange, } from "@hooks"; -import { LayoutProps, TitleProps } from "../../contexts/refine/types"; +import type { LayoutProps, TitleProps } from "../../contexts/refine/types"; export interface LayoutWrapperProps { /** diff --git a/packages/core/src/components/pages/auth/components/forgotPassword/index.spec.tsx b/packages/core/src/components/pages/auth/components/forgotPassword/index.spec.tsx index 4f0c2df41157..5c6d9a8860ae 100644 --- a/packages/core/src/components/pages/auth/components/forgotPassword/index.spec.tsx +++ b/packages/core/src/components/pages/auth/components/forgotPassword/index.spec.tsx @@ -5,7 +5,7 @@ import { fireEvent, render, waitFor } from "@testing-library/react"; import { TestWrapper, mockLegacyRouterProvider } from "@test/index"; import { ForgotPasswordPage } from "."; -import { AuthProvider } from "../../../../../contexts/auth/types"; +import type { AuthProvider } from "../../../../../contexts/auth/types"; const mockAuthProvider: AuthProvider = { login: async () => ({ success: true }), diff --git a/packages/core/src/components/pages/auth/components/forgotPassword/index.tsx b/packages/core/src/components/pages/auth/components/forgotPassword/index.tsx index f70c0550d414..e7e1a4fd6dfd 100644 --- a/packages/core/src/components/pages/auth/components/forgotPassword/index.tsx +++ b/packages/core/src/components/pages/auth/components/forgotPassword/index.tsx @@ -8,8 +8,11 @@ import { useTranslate, } from "@hooks"; -import { DivPropsType, FormPropsType } from "../.."; -import { ForgotPasswordFormTypes, ForgotPasswordPageProps } from "../../types"; +import type { DivPropsType, FormPropsType } from "../.."; +import type { + ForgotPasswordFormTypes, + ForgotPasswordPageProps, +} from "../../types"; type ForgotPasswordProps = ForgotPasswordPageProps< DivPropsType, diff --git a/packages/core/src/components/pages/auth/components/login/index.spec.tsx b/packages/core/src/components/pages/auth/components/login/index.spec.tsx index 4f843a0d0f38..22e72c38e022 100644 --- a/packages/core/src/components/pages/auth/components/login/index.spec.tsx +++ b/packages/core/src/components/pages/auth/components/login/index.spec.tsx @@ -5,7 +5,7 @@ import { fireEvent, render, waitFor } from "@testing-library/react"; import { TestWrapper, mockLegacyRouterProvider } from "@test/index"; import { LoginPage } from "."; -import { AuthProvider } from "../../../../../contexts/auth/types"; +import type { AuthProvider } from "../../../../../contexts/auth/types"; const mockAuthProvider: AuthProvider = { login: async () => ({ success: true }), diff --git a/packages/core/src/components/pages/auth/components/login/index.tsx b/packages/core/src/components/pages/auth/components/login/index.tsx index 46a476f67c8e..90daab4e2bc4 100644 --- a/packages/core/src/components/pages/auth/components/login/index.tsx +++ b/packages/core/src/components/pages/auth/components/login/index.tsx @@ -4,8 +4,8 @@ import { useActiveAuthProvider } from "@definitions/helpers"; import { useLink, useLogin, useRouterContext, useRouterType } from "@hooks"; import { useTranslate } from "@hooks/i18n"; -import { DivPropsType, FormPropsType } from "../.."; -import { LoginFormTypes, LoginPageProps } from "../../types"; +import type { DivPropsType, FormPropsType } from "../.."; +import type { LoginFormTypes, LoginPageProps } from "../../types"; type LoginProps = LoginPageProps; diff --git a/packages/core/src/components/pages/auth/components/register/index.spec.tsx b/packages/core/src/components/pages/auth/components/register/index.spec.tsx index 6f07e255e872..ed8a69d58c36 100644 --- a/packages/core/src/components/pages/auth/components/register/index.spec.tsx +++ b/packages/core/src/components/pages/auth/components/register/index.spec.tsx @@ -5,7 +5,7 @@ import { fireEvent, render, waitFor } from "@testing-library/react"; import { TestWrapper, mockLegacyRouterProvider } from "@test/index"; import { RegisterPage } from "."; -import { AuthProvider } from "../../../../../contexts/auth/types"; +import type { AuthProvider } from "../../../../../contexts/auth/types"; const mockAuthProvider: AuthProvider = { login: async () => ({ success: true }), diff --git a/packages/core/src/components/pages/auth/components/register/index.tsx b/packages/core/src/components/pages/auth/components/register/index.tsx index c26457748894..46d02542b21a 100644 --- a/packages/core/src/components/pages/auth/components/register/index.tsx +++ b/packages/core/src/components/pages/auth/components/register/index.tsx @@ -10,8 +10,8 @@ import { import { useActiveAuthProvider } from "@definitions/helpers"; -import { DivPropsType, FormPropsType } from "../.."; -import { RegisterPageProps } from "../../types"; +import type { DivPropsType, FormPropsType } from "../.."; +import type { RegisterPageProps } from "../../types"; type RegisterProps = RegisterPageProps< DivPropsType, diff --git a/packages/core/src/components/pages/auth/components/updatePassword/index.spec.tsx b/packages/core/src/components/pages/auth/components/updatePassword/index.spec.tsx index ce232a406613..a73484563cd1 100644 --- a/packages/core/src/components/pages/auth/components/updatePassword/index.spec.tsx +++ b/packages/core/src/components/pages/auth/components/updatePassword/index.spec.tsx @@ -5,7 +5,7 @@ import { fireEvent, render, waitFor } from "@testing-library/react"; import { TestWrapper } from "@test/index"; import { UpdatePasswordPage } from "."; -import { AuthProvider } from "../../../../../contexts/auth/types"; +import type { AuthProvider } from "../../../../../contexts/auth/types"; const mockAuthProvider: AuthProvider = { login: async () => ({ success: true }), diff --git a/packages/core/src/components/pages/auth/components/updatePassword/index.tsx b/packages/core/src/components/pages/auth/components/updatePassword/index.tsx index 92c931f457f5..79acc6e61a1f 100644 --- a/packages/core/src/components/pages/auth/components/updatePassword/index.tsx +++ b/packages/core/src/components/pages/auth/components/updatePassword/index.tsx @@ -3,8 +3,11 @@ import React, { useState } from "react"; import { useActiveAuthProvider } from "@definitions/helpers"; import { useTranslate, useUpdatePassword } from "@hooks"; -import { DivPropsType, FormPropsType } from "../.."; -import { UpdatePasswordFormTypes, UpdatePasswordPageProps } from "../../types"; +import type { DivPropsType, FormPropsType } from "../.."; +import type { + UpdatePasswordFormTypes, + UpdatePasswordPageProps, +} from "../../types"; type UpdatePasswordProps = UpdatePasswordPageProps< DivPropsType, diff --git a/packages/core/src/components/pages/auth/index.tsx b/packages/core/src/components/pages/auth/index.tsx index 1648b9a4507f..3bea848f7e07 100644 --- a/packages/core/src/components/pages/auth/index.tsx +++ b/packages/core/src/components/pages/auth/index.tsx @@ -1,7 +1,7 @@ import React, { - DetailedHTMLProps, - HTMLAttributes, - FormHTMLAttributes, + type DetailedHTMLProps, + type HTMLAttributes, + type FormHTMLAttributes, } from "react"; import { @@ -11,7 +11,7 @@ import { UpdatePasswordPage, } from "./components"; -import { AuthPageProps } from "./types"; +import type { AuthPageProps } from "./types"; export type DivPropsType = DetailedHTMLProps< HTMLAttributes, diff --git a/packages/core/src/components/pages/auth/types.tsx b/packages/core/src/components/pages/auth/types.tsx index d5de82ca8021..026a70615019 100644 --- a/packages/core/src/components/pages/auth/types.tsx +++ b/packages/core/src/components/pages/auth/types.tsx @@ -1,4 +1,4 @@ -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; export type OAuthProvider = { name: string; diff --git a/packages/core/src/components/telemetry/index.tsx b/packages/core/src/components/telemetry/index.tsx index 58493fbaefe2..76dd7e045f44 100644 --- a/packages/core/src/components/telemetry/index.tsx +++ b/packages/core/src/components/telemetry/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import { useTelemetryData } from "@hooks/useTelemetryData"; -import { ITelemetryData } from "./types"; +import type { ITelemetryData } from "./types"; const encode = (payload: ITelemetryData): string | undefined => { try { diff --git a/packages/core/src/components/undoableQueue/index.tsx b/packages/core/src/components/undoableQueue/index.tsx index 1a503b888071..e07fd6c1cd66 100644 --- a/packages/core/src/components/undoableQueue/index.tsx +++ b/packages/core/src/components/undoableQueue/index.tsx @@ -5,7 +5,7 @@ import { useCancelNotification, useNotification, useTranslate } from "@hooks"; import { userFriendlySecond } from "@definitions/helpers"; import { ActionTypes, - IUndoableQueue, + type IUndoableQueue, } from "../../contexts/undoableQueue/types"; export const UndoableQueue: React.FC<{ diff --git a/packages/core/src/contexts/accessControl/index.tsx b/packages/core/src/contexts/accessControl/index.tsx index f2c215b75c88..df062475ce89 100644 --- a/packages/core/src/contexts/accessControl/index.tsx +++ b/packages/core/src/contexts/accessControl/index.tsx @@ -1,6 +1,6 @@ -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; -import { +import type { IAccessControlContext, IAccessControlContextReturnType, } from "./types"; diff --git a/packages/core/src/contexts/accessControl/types.ts b/packages/core/src/contexts/accessControl/types.ts index 832dbf678fd9..a39b2c3ef139 100644 --- a/packages/core/src/contexts/accessControl/types.ts +++ b/packages/core/src/contexts/accessControl/types.ts @@ -18,10 +18,10 @@ * This may also apply to `resource.icon` property. * */ -import { UseQueryOptions } from "@tanstack/react-query"; +import type { UseQueryOptions } from "@tanstack/react-query"; -import { BaseKey } from "../data/types"; -import { IResourceItem, ITreeMenu } from "../resource/types"; +import type { BaseKey } from "../data/types"; +import type { IResourceItem, ITreeMenu } from "../resource/types"; export type CanResponse = { can: boolean; diff --git a/packages/core/src/contexts/auditLog/index.tsx b/packages/core/src/contexts/auditLog/index.tsx index 8b43f5b7dd88..2eba9c485d4c 100644 --- a/packages/core/src/contexts/auditLog/index.tsx +++ b/packages/core/src/contexts/auditLog/index.tsx @@ -1,6 +1,6 @@ -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; -import { IAuditLogContext } from "./types"; +import type { IAuditLogContext } from "./types"; export const AuditLogContext = React.createContext({}); diff --git a/packages/core/src/contexts/auditLog/types.ts b/packages/core/src/contexts/auditLog/types.ts index b64b7f22415a..a91f0433d0ac 100644 --- a/packages/core/src/contexts/auditLog/types.ts +++ b/packages/core/src/contexts/auditLog/types.ts @@ -1,4 +1,4 @@ -import { BaseKey, MetaDataQuery } from "../data/types"; +import type { BaseKey, MetaDataQuery } from "../data/types"; export type ILog = { id: BaseKey; diff --git a/packages/core/src/contexts/auth/index.tsx b/packages/core/src/contexts/auth/index.tsx index d290d55d3030..8f873d8afb71 100644 --- a/packages/core/src/contexts/auth/index.tsx +++ b/packages/core/src/contexts/auth/index.tsx @@ -1,8 +1,8 @@ -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; import { useNavigation } from "@hooks"; -import { IAuthContext, ILegacyAuthContext } from "./types"; +import type { IAuthContext, ILegacyAuthContext } from "./types"; /** * @deprecated `LegacyAuthContext` is deprecated with refine@4, use `AuthBindingsContext` instead, however, we still support `LegacyAuthContext` for backward compatibility. diff --git a/packages/core/src/contexts/auth/types.ts b/packages/core/src/contexts/auth/types.ts index c59d6704de3b..2acdc97d9706 100644 --- a/packages/core/src/contexts/auth/types.ts +++ b/packages/core/src/contexts/auth/types.ts @@ -31,7 +31,7 @@ * Same goes for `onError` function, it should always resolve. */ -import { RefineError } from "../data/types"; +import type { RefineError } from "../data/types"; export type CheckResponse = { authenticated: boolean; diff --git a/packages/core/src/contexts/data/index.tsx b/packages/core/src/contexts/data/index.tsx index f7866978bc86..38d8a8e6e1d3 100644 --- a/packages/core/src/contexts/data/index.tsx +++ b/packages/core/src/contexts/data/index.tsx @@ -1,6 +1,6 @@ -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; -import { DataProvider, DataProviders, IDataContext } from "./types"; +import type { DataProvider, DataProviders, IDataContext } from "./types"; export const defaultDataProvider: DataProviders = { default: {} as DataProvider, diff --git a/packages/core/src/contexts/data/types.ts b/packages/core/src/contexts/data/types.ts index 3c09dd74abb2..23cfeea1612a 100644 --- a/packages/core/src/contexts/data/types.ts +++ b/packages/core/src/contexts/data/types.ts @@ -1,7 +1,7 @@ -import { QueryFunctionContext, QueryKey } from "@tanstack/react-query"; -import { DocumentNode } from "graphql"; +import type { QueryFunctionContext, QueryKey } from "@tanstack/react-query"; +import type { DocumentNode } from "graphql"; -import { UseListConfig } from "../../hooks/data/useList"; +import type { UseListConfig } from "../../hooks/data/useList"; export type Prettify = { [K in keyof T]: T[K]; diff --git a/packages/core/src/contexts/i18n/index.tsx b/packages/core/src/contexts/i18n/index.tsx index 41a9a3732d3b..c86d15620bf9 100644 --- a/packages/core/src/contexts/i18n/index.tsx +++ b/packages/core/src/contexts/i18n/index.tsx @@ -1,6 +1,6 @@ -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; -import { I18nProvider, II18nContext } from "./types"; +import type { I18nProvider, II18nContext } from "./types"; /** @deprecated default value for translation context has no use and is an empty object. */ export const defaultProvider: Partial = {}; diff --git a/packages/core/src/contexts/live/index.tsx b/packages/core/src/contexts/live/index.tsx index 00e39e557ce4..6590a3fec7c5 100644 --- a/packages/core/src/contexts/live/index.tsx +++ b/packages/core/src/contexts/live/index.tsx @@ -1,6 +1,6 @@ -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; -import { ILiveContext } from "./types"; +import type { ILiveContext } from "./types"; export const LiveContext = React.createContext({}); diff --git a/packages/core/src/contexts/live/types.ts b/packages/core/src/contexts/live/types.ts index 33e1cbb9bf40..12103f1a115c 100644 --- a/packages/core/src/contexts/live/types.ts +++ b/packages/core/src/contexts/live/types.ts @@ -1,4 +1,4 @@ -import { +import type { BaseKey, CrudFilter, CrudSort, diff --git a/packages/core/src/contexts/notification/index.tsx b/packages/core/src/contexts/notification/index.tsx index db4a51c54ae8..497bb4bb8293 100644 --- a/packages/core/src/contexts/notification/index.tsx +++ b/packages/core/src/contexts/notification/index.tsx @@ -1,6 +1,6 @@ -import React, { createContext, PropsWithChildren } from "react"; +import React, { createContext, type PropsWithChildren } from "react"; -import { INotificationContext } from "./types"; +import type { INotificationContext } from "./types"; /** @deprecated default value for notification context has no use and is an empty object. */ export const defaultNotificationProvider: INotificationContext = {}; diff --git a/packages/core/src/contexts/refine/index.tsx b/packages/core/src/contexts/refine/index.tsx index 8184813abe49..aa76518259ef 100644 --- a/packages/core/src/contexts/refine/index.tsx +++ b/packages/core/src/contexts/refine/index.tsx @@ -5,7 +5,7 @@ import pluralize from "pluralize"; import { DefaultLayout } from "@components/layoutWrapper/defaultLayout"; import { humanizeString } from "../../definitions/helpers/humanizeString"; -import { +import type { IRefineContext, IRefineContextOptions, IRefineContextProvider, diff --git a/packages/core/src/contexts/refine/types.ts b/packages/core/src/contexts/refine/types.ts index 070d188c5e51..f11542b56527 100644 --- a/packages/core/src/contexts/refine/types.ts +++ b/packages/core/src/contexts/refine/types.ts @@ -1,19 +1,19 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; -import { QueryClient, QueryClientConfig } from "@tanstack/react-query"; +import type { QueryClient, QueryClientConfig } from "@tanstack/react-query"; -import { RedirectAction } from "../../hooks/form/types"; -import { UseLoadingOvertimeRefineContext } from "../../hooks/useLoadingOvertime"; -import { AccessControlProvider } from "../accessControl/types"; -import { AuditLogProvider } from "../auditLog/types"; -import { AuthProvider, LegacyAuthProvider } from "../auth/types"; -import { DataProvider, DataProviders, MutationMode } from "../data/types"; -import { I18nProvider } from "../i18n/types"; -import { LiveModeProps, LiveProvider } from "../live/types"; -import { NotificationProvider } from "../notification/types"; -import { ResourceProps } from "../resource/types"; -import { LegacyRouterProvider } from "../router/legacy/types"; -import { RouterProvider } from "../router/types"; +import type { RedirectAction } from "../../hooks/form/types"; +import type { UseLoadingOvertimeRefineContext } from "../../hooks/useLoadingOvertime"; +import type { AccessControlProvider } from "../accessControl/types"; +import type { AuditLogProvider } from "../auditLog/types"; +import type { AuthProvider, LegacyAuthProvider } from "../auth/types"; +import type { DataProvider, DataProviders, MutationMode } from "../data/types"; +import type { I18nProvider } from "../i18n/types"; +import type { LiveModeProps, LiveProvider } from "../live/types"; +import type { NotificationProvider } from "../notification/types"; +import type { ResourceProps } from "../resource/types"; +import type { LegacyRouterProvider } from "../router/legacy/types"; +import type { RouterProvider } from "../router/types"; export type TitleProps = { collapsed: boolean; diff --git a/packages/core/src/contexts/resource/index.tsx b/packages/core/src/contexts/resource/index.tsx index fb72d8b91fb8..11d055f8aa4a 100644 --- a/packages/core/src/contexts/resource/index.tsx +++ b/packages/core/src/contexts/resource/index.tsx @@ -3,7 +3,7 @@ import React from "react"; import { legacyResourceTransform } from "@definitions/helpers"; import { useDeepMemo } from "@hooks/deepMemo"; -import { IResourceContext, IResourceItem, ResourceProps } from "./types"; +import type { IResourceContext, IResourceItem, ResourceProps } from "./types"; export const ResourceContext = React.createContext({ resources: [], diff --git a/packages/core/src/contexts/resource/types.ts b/packages/core/src/contexts/resource/types.ts index 51ec7a45ff7f..babfed22770f 100644 --- a/packages/core/src/contexts/resource/types.ts +++ b/packages/core/src/contexts/resource/types.ts @@ -1,8 +1,8 @@ -import { ComponentType, ReactNode } from "react"; +import type { ComponentType, ReactNode } from "react"; -import { UseQueryResult } from "@tanstack/react-query"; +import type { UseQueryResult } from "@tanstack/react-query"; -import { ILogData } from "../auditLog/types"; +import type { ILogData } from "../auditLog/types"; /** * Resource route components diff --git a/packages/core/src/contexts/router/index.tsx b/packages/core/src/contexts/router/index.tsx index b8523685e5e7..0ff3e49987f7 100644 --- a/packages/core/src/contexts/router/index.tsx +++ b/packages/core/src/contexts/router/index.tsx @@ -1,5 +1,5 @@ -import React, { createContext, PropsWithChildren } from "react"; -import { RouterProvider } from "./types"; +import React, { createContext, type PropsWithChildren } from "react"; +import type { RouterProvider } from "./types"; const defaultRouterProvider = {}; diff --git a/packages/core/src/contexts/router/legacy/index.tsx b/packages/core/src/contexts/router/legacy/index.tsx index 70a019b568e0..949c5b41deff 100644 --- a/packages/core/src/contexts/router/legacy/index.tsx +++ b/packages/core/src/contexts/router/legacy/index.tsx @@ -1,6 +1,6 @@ -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; -import { ILegacyRouterContext } from "./types"; +import type { ILegacyRouterContext } from "./types"; export const defaultProvider: ILegacyRouterContext = { useHistory: () => false, diff --git a/packages/core/src/contexts/router/legacy/types.ts b/packages/core/src/contexts/router/legacy/types.ts index ff8c66c454fd..7f36658426f6 100644 --- a/packages/core/src/contexts/router/legacy/types.ts +++ b/packages/core/src/contexts/router/legacy/types.ts @@ -1,6 +1,6 @@ import React from "react"; -import { Action } from "../types"; +import type { Action } from "../types"; export interface LegacyRouterProvider { useHistory: () => { diff --git a/packages/core/src/contexts/router/types.ts b/packages/core/src/contexts/router/types.ts index d2fae5330081..d32753a8b802 100644 --- a/packages/core/src/contexts/router/types.ts +++ b/packages/core/src/contexts/router/types.ts @@ -26,8 +26,8 @@ * `useGo`, `useBack` and `useParsed` */ -import { BaseKey, CrudFilter, CrudSort } from "../data/types"; -import { IResourceItem } from "../resource/types"; +import type { BaseKey, CrudFilter, CrudSort } from "../data/types"; +import type { IResourceItem } from "../resource/types"; export type Action = "create" | "edit" | "list" | "show" | "clone"; diff --git a/packages/core/src/contexts/undoableQueue/index.tsx b/packages/core/src/contexts/undoableQueue/index.tsx index 2e65554f4f83..87aedb2743f3 100644 --- a/packages/core/src/contexts/undoableQueue/index.tsx +++ b/packages/core/src/contexts/undoableQueue/index.tsx @@ -1,9 +1,17 @@ -import React, { createContext, useReducer, PropsWithChildren } from "react"; +import React, { + createContext, + useReducer, + type PropsWithChildren, +} from "react"; import isEqual from "lodash/isEqual"; import { UndoableQueue } from "../../components"; -import { ActionTypes, IUndoableQueue, IUndoableQueueContext } from "./types"; +import { + ActionTypes, + type IUndoableQueue, + type IUndoableQueueContext, +} from "./types"; export const UndoableQueueContext = createContext({ notifications: [], diff --git a/packages/core/src/contexts/undoableQueue/types.ts b/packages/core/src/contexts/undoableQueue/types.ts index 139ff08af531..1760f81a6b96 100644 --- a/packages/core/src/contexts/undoableQueue/types.ts +++ b/packages/core/src/contexts/undoableQueue/types.ts @@ -1,4 +1,4 @@ -import { BaseKey } from "../data/types"; +import type { BaseKey } from "../data/types"; export enum ActionTypes { ADD = "ADD", diff --git a/packages/core/src/contexts/unsavedWarn/index.tsx b/packages/core/src/contexts/unsavedWarn/index.tsx index a555b3ca802a..98c681895810 100644 --- a/packages/core/src/contexts/unsavedWarn/index.tsx +++ b/packages/core/src/contexts/unsavedWarn/index.tsx @@ -1,6 +1,6 @@ -import React, { useState, PropsWithChildren } from "react"; +import React, { useState, type PropsWithChildren } from "react"; -import { IUnsavedWarnContext } from "./types"; +import type { IUnsavedWarnContext } from "./types"; export const UnsavedWarnContext = React.createContext({}); diff --git a/packages/core/src/definitions/helpers/check-router-prop-misuse/index.ts b/packages/core/src/definitions/helpers/check-router-prop-misuse/index.ts index 4a926fb6a97b..b567921b8ddd 100644 --- a/packages/core/src/definitions/helpers/check-router-prop-misuse/index.ts +++ b/packages/core/src/definitions/helpers/check-router-prop-misuse/index.ts @@ -1,5 +1,5 @@ -import { LegacyRouterProvider } from "../../../contexts/router/legacy/types"; -import { RouterProvider } from "../../../contexts/router/types"; +import type { LegacyRouterProvider } from "../../../contexts/router/legacy/types"; +import type { RouterProvider } from "../../../contexts/router/types"; export const checkRouterPropMisuse = ( value: LegacyRouterProvider | RouterProvider, diff --git a/packages/core/src/definitions/helpers/generateDocumentTitle/index.ts b/packages/core/src/definitions/helpers/generateDocumentTitle/index.ts index f860e698540f..f8eecbd2d58f 100644 --- a/packages/core/src/definitions/helpers/generateDocumentTitle/index.ts +++ b/packages/core/src/definitions/helpers/generateDocumentTitle/index.ts @@ -1,6 +1,6 @@ import type { useTranslate } from "@hooks/i18n"; -import { IResourceItem } from "../../../contexts/resource/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; import { safeTranslate } from "../safe-translate"; import { userFriendlyResourceName } from "../userFriendlyResourceName"; diff --git a/packages/core/src/definitions/helpers/handlePaginationParams/index.ts b/packages/core/src/definitions/helpers/handlePaginationParams/index.ts index 986a09c71ed2..74dc978374d2 100644 --- a/packages/core/src/definitions/helpers/handlePaginationParams/index.ts +++ b/packages/core/src/definitions/helpers/handlePaginationParams/index.ts @@ -1,4 +1,4 @@ -import { Pagination } from "../../../contexts/data/types"; +import type { Pagination } from "../../../contexts/data/types"; import { pickNotDeprecated } from "../pickNotDeprecated"; type HandlePaginationParamsProps = { diff --git a/packages/core/src/definitions/helpers/handleRefineOptions/index.spec.ts b/packages/core/src/definitions/helpers/handleRefineOptions/index.spec.ts index 99fa9c3378e2..8f03e2653b0e 100644 --- a/packages/core/src/definitions/helpers/handleRefineOptions/index.spec.ts +++ b/packages/core/src/definitions/helpers/handleRefineOptions/index.spec.ts @@ -3,7 +3,7 @@ import { QueryClient } from "@tanstack/react-query"; import { defaultRefineOptions } from "@contexts/refine"; import { handleRefineOptions } from "."; -import { IRefineOptions } from "../../../contexts/refine/types"; +import type { IRefineOptions } from "../../../contexts/refine/types"; describe("handleRefineOptions", () => { it("should return the default options if no options are provided", () => { diff --git a/packages/core/src/definitions/helpers/handleRefineOptions/index.ts b/packages/core/src/definitions/helpers/handleRefineOptions/index.ts index 47c4f099bc05..2c6ade8e2359 100644 --- a/packages/core/src/definitions/helpers/handleRefineOptions/index.ts +++ b/packages/core/src/definitions/helpers/handleRefineOptions/index.ts @@ -1,10 +1,10 @@ -import { QueryClient, QueryClientConfig } from "@tanstack/react-query"; +import type { QueryClient, QueryClientConfig } from "@tanstack/react-query"; import { defaultRefineOptions } from "@contexts/refine"; -import { MutationMode } from "../../../contexts/data/types"; -import { LiveModeProps } from "../../../contexts/live/types"; -import { +import type { MutationMode } from "../../../contexts/data/types"; +import type { LiveModeProps } from "../../../contexts/live/types"; +import type { IRefineContextOptions, IRefineOptions, } from "../../../contexts/refine/types"; diff --git a/packages/core/src/definitions/helpers/importCSVMapper/index.ts b/packages/core/src/definitions/helpers/importCSVMapper/index.ts index 6c8685edc12e..a7f8213df547 100644 --- a/packages/core/src/definitions/helpers/importCSVMapper/index.ts +++ b/packages/core/src/definitions/helpers/importCSVMapper/index.ts @@ -1,7 +1,7 @@ import fromPairs from "lodash/fromPairs"; import zip from "lodash/zip"; -import { MapDataFn } from "../../../hooks/export/types"; +import type { MapDataFn } from "../../../hooks/export/types"; export const importCSVMapper = ( data: any[][], diff --git a/packages/core/src/definitions/helpers/keys/index.ts b/packages/core/src/definitions/helpers/keys/index.ts index 9fdcfbdbd456..61b8fa1dc0ed 100644 --- a/packages/core/src/definitions/helpers/keys/index.ts +++ b/packages/core/src/definitions/helpers/keys/index.ts @@ -1,4 +1,4 @@ -import { BaseKey } from "../../../contexts/data/types"; +import type { BaseKey } from "../../../contexts/data/types"; type ParametrizedDataActions = "list" | "infinite"; type IdRequiredDataActions = "one"; diff --git a/packages/core/src/definitions/helpers/legacy-resource-transform/index.ts b/packages/core/src/definitions/helpers/legacy-resource-transform/index.ts index 16705c53cb2f..9fbfb79c9759 100644 --- a/packages/core/src/definitions/helpers/legacy-resource-transform/index.ts +++ b/packages/core/src/definitions/helpers/legacy-resource-transform/index.ts @@ -1,4 +1,7 @@ -import { IResourceItem, ResourceProps } from "../../../contexts/resource/types"; +import type { + IResourceItem, + ResourceProps, +} from "../../../contexts/resource/types"; import { routeGenerator } from "../routeGenerator"; /** diff --git a/packages/core/src/definitions/helpers/menu/create-resource-key.ts b/packages/core/src/definitions/helpers/menu/create-resource-key.ts index b111510ec02b..a22cb68d39b7 100644 --- a/packages/core/src/definitions/helpers/menu/create-resource-key.ts +++ b/packages/core/src/definitions/helpers/menu/create-resource-key.ts @@ -1,4 +1,4 @@ -import { IResourceItem } from "../../../contexts/resource/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; import { getParentResource, removeLeadingTrailingSlashes, diff --git a/packages/core/src/definitions/helpers/menu/create-tree.ts b/packages/core/src/definitions/helpers/menu/create-tree.ts index 4a48a082ade7..3bbe93ec8d01 100644 --- a/packages/core/src/definitions/helpers/menu/create-tree.ts +++ b/packages/core/src/definitions/helpers/menu/create-tree.ts @@ -1,4 +1,4 @@ -import { IResourceItem } from "../../../contexts/resource/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; import { getParentResource } from "../router"; import { createResourceKey } from "./create-resource-key"; diff --git a/packages/core/src/definitions/helpers/pick-resource/index.ts b/packages/core/src/definitions/helpers/pick-resource/index.ts index f57b4b107d8f..63424f38a977 100644 --- a/packages/core/src/definitions/helpers/pick-resource/index.ts +++ b/packages/core/src/definitions/helpers/pick-resource/index.ts @@ -1,4 +1,4 @@ -import { IResourceItem } from "../../../contexts/resource/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; import { removeLeadingTrailingSlashes } from "../router/remove-leading-trailing-slashes"; /** diff --git a/packages/core/src/definitions/helpers/pickDataProvider/index.spec.ts b/packages/core/src/definitions/helpers/pickDataProvider/index.spec.ts index 17c1a863fd47..945dcab559f1 100644 --- a/packages/core/src/definitions/helpers/pickDataProvider/index.spec.ts +++ b/packages/core/src/definitions/helpers/pickDataProvider/index.spec.ts @@ -1,5 +1,5 @@ import { pickDataProvider } from "."; -import { IResourceItem } from "../../../contexts/resource/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; describe("pickDataProvider", () => { it("should return the dataProvider from the params", () => { diff --git a/packages/core/src/definitions/helpers/pickDataProvider/index.ts b/packages/core/src/definitions/helpers/pickDataProvider/index.ts index 5b3f698310f2..38ce643a0be6 100644 --- a/packages/core/src/definitions/helpers/pickDataProvider/index.ts +++ b/packages/core/src/definitions/helpers/pickDataProvider/index.ts @@ -1,4 +1,4 @@ -import { IResourceItem } from "../../../contexts/resource/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; import { pickResource } from "../pick-resource"; import { pickNotDeprecated } from "../pickNotDeprecated"; diff --git a/packages/core/src/definitions/helpers/queryKeys/index.ts b/packages/core/src/definitions/helpers/queryKeys/index.ts index ff9ee6203222..1afaa94461be 100644 --- a/packages/core/src/definitions/helpers/queryKeys/index.ts +++ b/packages/core/src/definitions/helpers/queryKeys/index.ts @@ -1,6 +1,6 @@ -import { QueryKey } from "@tanstack/react-query"; +import type { QueryKey } from "@tanstack/react-query"; -import { IQueryKeys, MetaQuery } from "../../../contexts/data/types"; +import type { IQueryKeys, MetaQuery } from "../../../contexts/data/types"; import { keys as newKeys } from "../keys"; import { pickNotDeprecated } from "../pickNotDeprecated"; diff --git a/packages/core/src/definitions/helpers/redirectPage/index.spec.ts b/packages/core/src/definitions/helpers/redirectPage/index.spec.ts index 3ac8c14d2d09..703604816802 100644 --- a/packages/core/src/definitions/helpers/redirectPage/index.spec.ts +++ b/packages/core/src/definitions/helpers/redirectPage/index.spec.ts @@ -1,6 +1,6 @@ import { redirectPage } from "."; -import { IRefineContextOptions } from "../../../contexts/refine/types"; -import { RedirectAction } from "../../../hooks/form/types"; +import type { IRefineContextOptions } from "../../../contexts/refine/types"; +import type { RedirectAction } from "../../../hooks/form/types"; describe("redirectPath", () => { it.each(["edit", "list", "show", false] as RedirectAction[])( diff --git a/packages/core/src/definitions/helpers/redirectPage/index.ts b/packages/core/src/definitions/helpers/redirectPage/index.ts index fc5d697128b2..bccaa7a4c726 100644 --- a/packages/core/src/definitions/helpers/redirectPage/index.ts +++ b/packages/core/src/definitions/helpers/redirectPage/index.ts @@ -1,6 +1,6 @@ -import { IRefineContextOptions } from "../../../contexts/refine/types"; -import { Action } from "../../../contexts/router/types"; -import { RedirectAction } from "../../../hooks/form/types"; +import type { IRefineContextOptions } from "../../../contexts/refine/types"; +import type { Action } from "../../../contexts/router/types"; +import type { RedirectAction } from "../../../hooks/form/types"; type RedirectPageProps = { redirectFromProps?: RedirectAction; diff --git a/packages/core/src/definitions/helpers/routeGenerator/index.spec.ts b/packages/core/src/definitions/helpers/routeGenerator/index.spec.ts index 4e270c9cacef..35c42b8f0307 100644 --- a/packages/core/src/definitions/helpers/routeGenerator/index.spec.ts +++ b/packages/core/src/definitions/helpers/routeGenerator/index.spec.ts @@ -1,5 +1,5 @@ import { routeGenerator } from "."; -import { ResourceProps } from "../../../contexts/resource/types"; +import type { ResourceProps } from "../../../contexts/resource/types"; const mockResources: ResourceProps[] = [ { name: "posts" }, diff --git a/packages/core/src/definitions/helpers/routeGenerator/index.ts b/packages/core/src/definitions/helpers/routeGenerator/index.ts index ef8fa7e27bfa..7128dd7d634a 100644 --- a/packages/core/src/definitions/helpers/routeGenerator/index.ts +++ b/packages/core/src/definitions/helpers/routeGenerator/index.ts @@ -1,4 +1,4 @@ -import { ResourceProps } from "../../../contexts/resource/types"; +import type { ResourceProps } from "../../../contexts/resource/types"; import { pickNotDeprecated } from "../pickNotDeprecated"; import { getParentPrefixForResource } from "../router"; diff --git a/packages/core/src/definitions/helpers/router/compose-route.ts b/packages/core/src/definitions/helpers/router/compose-route.ts index 67eddce919b0..ef68f0ee3cbb 100644 --- a/packages/core/src/definitions/helpers/router/compose-route.ts +++ b/packages/core/src/definitions/helpers/router/compose-route.ts @@ -1,5 +1,5 @@ -import { MetaQuery } from "../../../contexts/data/types"; -import { ParseResponse } from "../../../contexts/router/types"; +import type { MetaQuery } from "../../../contexts/data/types"; +import type { ParseResponse } from "../../../contexts/router/types"; import { pickRouteParams } from "./pick-route-params"; import { prepareRouteParams } from "./prepare-route-params"; diff --git a/packages/core/src/definitions/helpers/router/get-action-routes-from-resource.ts b/packages/core/src/definitions/helpers/router/get-action-routes-from-resource.ts index a4b124ee4092..ffd4543e6c5e 100644 --- a/packages/core/src/definitions/helpers/router/get-action-routes-from-resource.ts +++ b/packages/core/src/definitions/helpers/router/get-action-routes-from-resource.ts @@ -1,5 +1,5 @@ -import { IResourceItem } from "../../../contexts/resource/types"; -import { Action } from "../../../contexts/router/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; +import type { Action } from "../../../contexts/router/types"; import { getDefaultActionPath } from "./get-default-action-path"; import { getParentPrefixForResource } from "./get-parent-prefix-for-resource"; diff --git a/packages/core/src/definitions/helpers/router/get-default-action-path.ts b/packages/core/src/definitions/helpers/router/get-default-action-path.ts index 3c756e34047f..253c4343ba43 100644 --- a/packages/core/src/definitions/helpers/router/get-default-action-path.ts +++ b/packages/core/src/definitions/helpers/router/get-default-action-path.ts @@ -1,4 +1,4 @@ -import { Action } from "../../../contexts/router/types"; +import type { Action } from "../../../contexts/router/types"; import { removeLeadingTrailingSlashes } from "./remove-leading-trailing-slashes"; /** diff --git a/packages/core/src/definitions/helpers/router/get-parent-prefix-for-resource.ts b/packages/core/src/definitions/helpers/router/get-parent-prefix-for-resource.ts index 566c664f64d4..3d5be01808de 100644 --- a/packages/core/src/definitions/helpers/router/get-parent-prefix-for-resource.ts +++ b/packages/core/src/definitions/helpers/router/get-parent-prefix-for-resource.ts @@ -1,4 +1,4 @@ -import { ResourceProps } from "../../../contexts/resource/types"; +import type { ResourceProps } from "../../../contexts/resource/types"; import { getParentResource } from "./get-parent-resource"; import { removeLeadingTrailingSlashes } from "./remove-leading-trailing-slashes"; diff --git a/packages/core/src/definitions/helpers/router/get-parent-resource.ts b/packages/core/src/definitions/helpers/router/get-parent-resource.ts index 62aaa456a446..16c3c03d9c7e 100644 --- a/packages/core/src/definitions/helpers/router/get-parent-resource.ts +++ b/packages/core/src/definitions/helpers/router/get-parent-resource.ts @@ -1,4 +1,4 @@ -import { IResourceItem } from "../../../contexts/resource/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; import { pickNotDeprecated } from "../pickNotDeprecated"; /** diff --git a/packages/core/src/definitions/helpers/router/match-resource-from-route.ts b/packages/core/src/definitions/helpers/router/match-resource-from-route.ts index 6f5c0231cab1..49128fb893e1 100644 --- a/packages/core/src/definitions/helpers/router/match-resource-from-route.ts +++ b/packages/core/src/definitions/helpers/router/match-resource-from-route.ts @@ -1,5 +1,5 @@ -import { IResourceItem } from "../../../contexts/resource/types"; -import { Action } from "../../../contexts/router/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; +import type { Action } from "../../../contexts/router/types"; import { checkBySegments } from "./check-by-segments"; import { getActionRoutesFromResource } from "./get-action-routes-from-resource"; import { pickMatchedRoute } from "./pick-matched-route"; diff --git a/packages/core/src/definitions/helpers/router/pick-matched-route.ts b/packages/core/src/definitions/helpers/router/pick-matched-route.ts index 0f2810a5c6bf..68693d8d1a15 100644 --- a/packages/core/src/definitions/helpers/router/pick-matched-route.ts +++ b/packages/core/src/definitions/helpers/router/pick-matched-route.ts @@ -1,4 +1,4 @@ -import { ResourceActionRoute } from "./get-action-routes-from-resource"; +import type { ResourceActionRoute } from "./get-action-routes-from-resource"; import { isParameter } from "./is-parameter"; import { removeLeadingTrailingSlashes } from "./remove-leading-trailing-slashes"; import { splitToSegments } from "./split-to-segments"; diff --git a/packages/core/src/definitions/helpers/sanitize-resource/index.ts b/packages/core/src/definitions/helpers/sanitize-resource/index.ts index 658912f93418..1729013e4ae7 100644 --- a/packages/core/src/definitions/helpers/sanitize-resource/index.ts +++ b/packages/core/src/definitions/helpers/sanitize-resource/index.ts @@ -1,4 +1,4 @@ -import { IResourceItem } from "../../../contexts/resource/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; /** * Remove all properties that are non-serializable from a resource object. diff --git a/packages/core/src/definitions/helpers/treeView/createTreeView/index.spec.ts b/packages/core/src/definitions/helpers/treeView/createTreeView/index.spec.ts index fb22f87d41ef..4f83121ac4a8 100644 --- a/packages/core/src/definitions/helpers/treeView/createTreeView/index.spec.ts +++ b/packages/core/src/definitions/helpers/treeView/createTreeView/index.spec.ts @@ -1,5 +1,8 @@ import { createTreeView } from "."; -import { IResourceItem, ITreeMenu } from "../../../../contexts/resource/types"; +import type { + IResourceItem, + ITreeMenu, +} from "../../../../contexts/resource/types"; const mockResources: IResourceItem[] = [ { diff --git a/packages/core/src/definitions/helpers/treeView/createTreeView/index.ts b/packages/core/src/definitions/helpers/treeView/createTreeView/index.ts index 4a964e84f353..bb686da40f71 100644 --- a/packages/core/src/definitions/helpers/treeView/createTreeView/index.ts +++ b/packages/core/src/definitions/helpers/treeView/createTreeView/index.ts @@ -1,6 +1,6 @@ import { pickNotDeprecated } from "@definitions/helpers/pickNotDeprecated"; -import { +import type { IMenuItem, IResourceItem, ITreeMenu, diff --git a/packages/core/src/definitions/helpers/useInfinitePagination/index.ts b/packages/core/src/definitions/helpers/useInfinitePagination/index.ts index 45a58580ba3f..7d6c72dc954e 100644 --- a/packages/core/src/definitions/helpers/useInfinitePagination/index.ts +++ b/packages/core/src/definitions/helpers/useInfinitePagination/index.ts @@ -1,4 +1,4 @@ -import { GetListResponse } from "../../../contexts/data/types"; +import type { GetListResponse } from "../../../contexts/data/types"; export const getNextPageParam = (lastPage: GetListResponse) => { const { pagination, cursor } = lastPage; diff --git a/packages/core/src/definitions/table/index.spec.ts b/packages/core/src/definitions/table/index.spec.ts index b21e0bc65f6d..d17fa05fd141 100644 --- a/packages/core/src/definitions/table/index.spec.ts +++ b/packages/core/src/definitions/table/index.spec.ts @@ -1,4 +1,4 @@ -import { CrudFilter, CrudSort } from "../../contexts/data/types"; +import type { CrudFilter, CrudSort } from "../../contexts/data/types"; import { compareFilters, compareSorters, diff --git a/packages/core/src/definitions/table/index.ts b/packages/core/src/definitions/table/index.ts index 3d93a90eedbc..1fd8eba3267a 100644 --- a/packages/core/src/definitions/table/index.ts +++ b/packages/core/src/definitions/table/index.ts @@ -1,11 +1,11 @@ import differenceWith from "lodash/differenceWith"; import unionWith from "lodash/unionWith"; -import qs, { IStringifyOptions } from "qs"; +import qs, { type IStringifyOptions } from "qs"; import warnOnce from "warn-once"; import { pickNotDeprecated } from "@definitions/helpers"; -import { +import type { CrudFilter, CrudOperators, CrudSort, diff --git a/packages/core/src/hooks/accessControl/useCan/index.ts b/packages/core/src/hooks/accessControl/useCan/index.ts index 65301b0079af..d80ac681ee77 100644 --- a/packages/core/src/hooks/accessControl/useCan/index.ts +++ b/packages/core/src/hooks/accessControl/useCan/index.ts @@ -2,15 +2,15 @@ import { useContext } from "react"; import { getXRay } from "@refinedev/devtools-internal"; import { - UseQueryOptions, - UseQueryResult, + type UseQueryOptions, + type UseQueryResult, useQuery, } from "@tanstack/react-query"; import { AccessControlContext } from "@contexts/accessControl"; import { sanitizeResource } from "@definitions/helpers/sanitize-resource"; import { useKeys } from "@hooks/useKeys"; -import { +import type { CanParams, CanReturnType, } from "../../../contexts/accessControl/types"; diff --git a/packages/core/src/hooks/accessControl/useCanWithoutCache.ts b/packages/core/src/hooks/accessControl/useCanWithoutCache.ts index d6bb3335163d..844aa4e22ffc 100644 --- a/packages/core/src/hooks/accessControl/useCanWithoutCache.ts +++ b/packages/core/src/hooks/accessControl/useCanWithoutCache.ts @@ -3,7 +3,7 @@ import React from "react"; import { AccessControlContext } from "@contexts/accessControl"; import { sanitizeResource } from "@definitions/helpers/sanitize-resource"; -import { IAccessControlContext } from "../../contexts/accessControl/types"; +import type { IAccessControlContext } from "../../contexts/accessControl/types"; export const useCanWithoutCache = (): IAccessControlContext => { const { can: canFromContext } = React.useContext(AccessControlContext); diff --git a/packages/core/src/hooks/auditLog/useLog/index.spec.ts b/packages/core/src/hooks/auditLog/useLog/index.spec.ts index 866290989e06..51bac51aedad 100644 --- a/packages/core/src/hooks/auditLog/useLog/index.spec.ts +++ b/packages/core/src/hooks/auditLog/useLog/index.spec.ts @@ -3,8 +3,8 @@ import { renderHook, waitFor } from "@testing-library/react"; import { TestWrapper, mockAuthProvider, mockLegacyAuthProvider } from "@test"; import { useLog } from "."; -import { LogParams } from "../../../contexts/auditLog/types"; -import { ResourceProps } from "../../../contexts/resource/types"; +import type { LogParams } from "../../../contexts/auditLog/types"; +import type { ResourceProps } from "../../../contexts/resource/types"; import * as hasPermission from "../../../definitions/helpers/hasPermission"; const auditLogProviderCreateMock = jest.fn(); diff --git a/packages/core/src/hooks/auditLog/useLog/index.ts b/packages/core/src/hooks/auditLog/useLog/index.ts index 2cc8c2abf000..72dfdb8e4029 100644 --- a/packages/core/src/hooks/auditLog/useLog/index.ts +++ b/packages/core/src/hooks/auditLog/useLog/index.ts @@ -2,8 +2,8 @@ import { useContext } from "react"; import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, useQueryClient, } from "@tanstack/react-query"; @@ -16,8 +16,8 @@ import { pickResource } from "@definitions/helpers/pick-resource"; import { useGetIdentity } from "@hooks/auth"; import { useKeys } from "@hooks/useKeys"; -import { LogParams } from "../../../contexts/auditLog/types"; -import { BaseKey } from "../../../contexts/data/types"; +import type { LogParams } from "../../../contexts/auditLog/types"; +import type { BaseKey } from "../../../contexts/data/types"; type LogRenameData = | { diff --git a/packages/core/src/hooks/auditLog/useLogList/index.ts b/packages/core/src/hooks/auditLog/useLogList/index.ts index aa70d1b59a37..87e296a3b9b0 100644 --- a/packages/core/src/hooks/auditLog/useLogList/index.ts +++ b/packages/core/src/hooks/auditLog/useLogList/index.ts @@ -2,15 +2,15 @@ import { useContext } from "react"; import { getXRay } from "@refinedev/devtools-internal"; import { - UseQueryOptions, - UseQueryResult, + type UseQueryOptions, + type UseQueryResult, useQuery, } from "@tanstack/react-query"; import { AuditLogContext } from "@contexts/auditLog"; import { useKeys } from "@hooks/useKeys"; -import { HttpError, MetaQuery } from "../../../contexts/data/types"; +import type { HttpError, MetaQuery } from "../../../contexts/data/types"; export type UseLogProps = { resource: string; diff --git a/packages/core/src/hooks/auth/useForgotPassword/index.ts b/packages/core/src/hooks/auth/useForgotPassword/index.ts index 0063730e5430..3d7f4d1acd57 100644 --- a/packages/core/src/hooks/auth/useForgotPassword/index.ts +++ b/packages/core/src/hooks/auth/useForgotPassword/index.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, } from "@tanstack/react-query"; @@ -14,13 +14,13 @@ import { useRouterType, } from "@hooks"; -import { +import type { AuthActionResponse, SuccessNotificationResponse, TForgotPasswordData, } from "../../../contexts/auth/types"; -import { RefineError } from "../../../contexts/data/types"; -import { OpenNotificationParams } from "../../../contexts/notification/types"; +import type { RefineError } from "../../../contexts/data/types"; +import type { OpenNotificationParams } from "../../../contexts/notification/types"; export type UseForgotPasswordLegacyProps = { v3LegacyAuthProviderCompatible: true; diff --git a/packages/core/src/hooks/auth/useGetIdentity/index.ts b/packages/core/src/hooks/auth/useGetIdentity/index.ts index f90183cb9f48..f5f7dceb9d6c 100644 --- a/packages/core/src/hooks/auth/useGetIdentity/index.ts +++ b/packages/core/src/hooks/auth/useGetIdentity/index.ts @@ -1,14 +1,14 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseQueryOptions, - UseQueryResult, + type UseQueryOptions, + type UseQueryResult, useQuery, } from "@tanstack/react-query"; import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth"; import { useKeys } from "@hooks/useKeys"; -import { IdentityResponse } from "../../../contexts/auth/types"; +import type { IdentityResponse } from "../../../contexts/auth/types"; export type UseGetIdentityLegacyProps = { v3LegacyAuthProviderCompatible: true; diff --git a/packages/core/src/hooks/auth/useIsAuthenticated/index.ts b/packages/core/src/hooks/auth/useIsAuthenticated/index.ts index f479b9829ea1..a65b1a13225d 100644 --- a/packages/core/src/hooks/auth/useIsAuthenticated/index.ts +++ b/packages/core/src/hooks/auth/useIsAuthenticated/index.ts @@ -1,10 +1,10 @@ import { getXRay } from "@refinedev/devtools-internal"; -import { UseQueryResult, useQuery } from "@tanstack/react-query"; +import { type UseQueryResult, useQuery } from "@tanstack/react-query"; import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth"; import { useKeys } from "@hooks/useKeys"; -import { CheckResponse } from "../../../contexts/auth/types"; +import type { CheckResponse } from "../../../contexts/auth/types"; export type UseIsAuthenticatedLegacyProps = { v3LegacyAuthProviderCompatible: true; diff --git a/packages/core/src/hooks/auth/useLogin/index.ts b/packages/core/src/hooks/auth/useLogin/index.ts index 3e49d1a8eff3..4c7740285ee1 100644 --- a/packages/core/src/hooks/auth/useLogin/index.ts +++ b/packages/core/src/hooks/auth/useLogin/index.ts @@ -2,8 +2,8 @@ import React from "react"; import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, } from "@tanstack/react-query"; import qs from "qs"; @@ -19,13 +19,13 @@ import { useRouterType, } from "@hooks"; -import { +import type { AuthActionResponse, SuccessNotificationResponse, TLoginData, } from "../../../contexts/auth/types"; -import { RefineError } from "../../../contexts/data/types"; -import { OpenNotificationParams } from "../../../contexts/notification/types"; +import type { RefineError } from "../../../contexts/data/types"; +import type { OpenNotificationParams } from "../../../contexts/notification/types"; import { useInvalidateAuthStore } from "../useInvalidateAuthStore"; export type UseLoginLegacyProps = { diff --git a/packages/core/src/hooks/auth/useLogout/index.ts b/packages/core/src/hooks/auth/useLogout/index.ts index cdd65463f419..297f00e66341 100644 --- a/packages/core/src/hooks/auth/useLogout/index.ts +++ b/packages/core/src/hooks/auth/useLogout/index.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, } from "@tanstack/react-query"; @@ -14,13 +14,13 @@ import { useRouterType, } from "@hooks"; -import { +import type { AuthActionResponse, SuccessNotificationResponse, TLogoutData, } from "../../../contexts/auth/types"; -import { RefineError } from "../../../contexts/data/types"; -import { OpenNotificationParams } from "../../../contexts/notification/types"; +import type { RefineError } from "../../../contexts/data/types"; +import type { OpenNotificationParams } from "../../../contexts/notification/types"; import { useInvalidateAuthStore } from "../useInvalidateAuthStore"; type Variables = { diff --git a/packages/core/src/hooks/auth/useOnError/index.spec.ts b/packages/core/src/hooks/auth/useOnError/index.spec.ts index a628ebb85cb1..6317378fa5f0 100644 --- a/packages/core/src/hooks/auth/useOnError/index.spec.ts +++ b/packages/core/src/hooks/auth/useOnError/index.spec.ts @@ -8,7 +8,7 @@ import { } from "@test"; import { useOnError } from "."; -import { LegacyRouterProvider } from "../../../contexts/router/legacy/types"; +import type { LegacyRouterProvider } from "../../../contexts/router/legacy/types"; const mockReplace = jest.fn(); const mockPush = jest.fn(); diff --git a/packages/core/src/hooks/auth/useOnError/index.ts b/packages/core/src/hooks/auth/useOnError/index.ts index 01296b3c941e..969f1122b952 100644 --- a/packages/core/src/hooks/auth/useOnError/index.ts +++ b/packages/core/src/hooks/auth/useOnError/index.ts @@ -1,11 +1,11 @@ import { getXRay } from "@refinedev/devtools-internal"; -import { UseMutationResult, useMutation } from "@tanstack/react-query"; +import { type UseMutationResult, useMutation } from "@tanstack/react-query"; import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth"; import { useGo, useLogout, useNavigation, useRouterType } from "@hooks"; import { useKeys } from "@hooks/useKeys"; -import { OnErrorResponse } from "../../../contexts/auth/types"; +import type { OnErrorResponse } from "../../../contexts/auth/types"; export type UseOnErrorLegacyProps = { v3LegacyAuthProviderCompatible: true; diff --git a/packages/core/src/hooks/auth/usePermissions/index.ts b/packages/core/src/hooks/auth/usePermissions/index.ts index 2a0abc14be43..2a59d01b7845 100644 --- a/packages/core/src/hooks/auth/usePermissions/index.ts +++ b/packages/core/src/hooks/auth/usePermissions/index.ts @@ -1,14 +1,14 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseQueryOptions, - UseQueryResult, + type UseQueryOptions, + type UseQueryResult, useQuery, } from "@tanstack/react-query"; import { useAuthBindingsContext, useLegacyAuthContext } from "@contexts/auth"; import { useKeys } from "@hooks/useKeys"; -import { PermissionResponse } from "../../../contexts/auth/types"; +import type { PermissionResponse } from "../../../contexts/auth/types"; export type UsePermissionsLegacyProps< TData = any, diff --git a/packages/core/src/hooks/auth/useRegister/index.ts b/packages/core/src/hooks/auth/useRegister/index.ts index 8ad5f8ccbb4e..48c5ea760e0d 100644 --- a/packages/core/src/hooks/auth/useRegister/index.ts +++ b/packages/core/src/hooks/auth/useRegister/index.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, } from "@tanstack/react-query"; @@ -14,14 +14,14 @@ import { useRouterType, } from "@hooks"; -import { +import type { AuthActionResponse, SuccessNotificationResponse, TLoginData, TRegisterData, } from "../../../contexts/auth/types"; -import { RefineError } from "../../../contexts/data/types"; -import { OpenNotificationParams } from "../../../contexts/notification/types"; +import type { RefineError } from "../../../contexts/data/types"; +import type { OpenNotificationParams } from "../../../contexts/notification/types"; import { useInvalidateAuthStore } from "../useInvalidateAuthStore"; export type UseRegisterLegacyProps = { diff --git a/packages/core/src/hooks/auth/useUpdatePassword/index.spec.ts b/packages/core/src/hooks/auth/useUpdatePassword/index.spec.ts index 80b2fa5abe3c..68427d8a8a67 100644 --- a/packages/core/src/hooks/auth/useUpdatePassword/index.spec.ts +++ b/packages/core/src/hooks/auth/useUpdatePassword/index.spec.ts @@ -9,7 +9,7 @@ import { queryClient, } from "@test"; -import { LegacyRouterProvider } from "../../../contexts/router/legacy/types"; +import type { LegacyRouterProvider } from "../../../contexts/router/legacy/types"; import { useUpdatePassword } from "./"; const mockFn = jest.fn(); diff --git a/packages/core/src/hooks/auth/useUpdatePassword/index.ts b/packages/core/src/hooks/auth/useUpdatePassword/index.ts index 977fff50f422..848fe3c7d285 100644 --- a/packages/core/src/hooks/auth/useUpdatePassword/index.ts +++ b/packages/core/src/hooks/auth/useUpdatePassword/index.ts @@ -2,8 +2,8 @@ import React from "react"; import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, } from "@tanstack/react-query"; import qs from "qs"; @@ -19,14 +19,14 @@ import { useRouterType, } from "@hooks"; -import { UpdatePasswordFormTypes } from "../../../components/pages/auth/types"; -import { +import type { UpdatePasswordFormTypes } from "../../../components/pages/auth/types"; +import type { AuthActionResponse, SuccessNotificationResponse, TUpdatePasswordData, } from "../../../contexts/auth/types"; -import { RefineError } from "../../../contexts/data/types"; -import { OpenNotificationParams } from "../../../contexts/notification/types"; +import type { RefineError } from "../../../contexts/data/types"; +import type { OpenNotificationParams } from "../../../contexts/notification/types"; export type UseUpdatePasswordLegacyProps< TVariables extends UpdatePasswordFormTypes, diff --git a/packages/core/src/hooks/breadcrumb/index.spec.tsx b/packages/core/src/hooks/breadcrumb/index.spec.tsx index 4b49a06fca37..0425186dd0b5 100644 --- a/packages/core/src/hooks/breadcrumb/index.spec.tsx +++ b/packages/core/src/hooks/breadcrumb/index.spec.tsx @@ -2,7 +2,7 @@ import React from "react"; import { renderHook } from "@testing-library/react"; -import { ITestWrapperProps, TestWrapper, mockRouterProvider } from "@test"; +import { type ITestWrapperProps, TestWrapper, mockRouterProvider } from "@test"; import { useBreadcrumb } from "."; diff --git a/packages/core/src/hooks/breadcrumb/index.ts b/packages/core/src/hooks/breadcrumb/index.ts index d53a4a376c45..762e7b9a1630 100644 --- a/packages/core/src/hooks/breadcrumb/index.ts +++ b/packages/core/src/hooks/breadcrumb/index.ts @@ -10,7 +10,7 @@ import { composeRoute } from "@definitions/helpers/router/compose-route"; import { useRefineContext, useResource, useTranslate } from "@hooks"; import { useParsed } from "@hooks/router/use-parsed"; -import { IResourceItem } from "../../contexts/resource/types"; +import type { IResourceItem } from "../../contexts/resource/types"; import { pickResource } from "../../definitions/helpers/pick-resource/index"; export type BreadcrumbsType = { diff --git a/packages/core/src/hooks/data/useCreate.ts b/packages/core/src/hooks/data/useCreate.ts index ca822dd1982e..9c267a2a18e3 100644 --- a/packages/core/src/hooks/data/useCreate.ts +++ b/packages/core/src/hooks/data/useCreate.ts @@ -5,8 +5,8 @@ import { } from "@definitions/helpers"; import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, } from "@tanstack/react-query"; @@ -24,17 +24,17 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseRecord, CreateResponse, HttpError, IQueryKeys, MetaQuery, } from "../../contexts/data/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useCreateMany.ts b/packages/core/src/hooks/data/useCreateMany.ts index 1a93c281484c..2cdde811891d 100644 --- a/packages/core/src/hooks/data/useCreateMany.ts +++ b/packages/core/src/hooks/data/useCreateMany.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, } from "@tanstack/react-query"; @@ -23,17 +23,17 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseRecord, CreateManyResponse, HttpError, IQueryKeys, MetaQuery, } from "../../contexts/data/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useCustom.ts b/packages/core/src/hooks/data/useCustom.ts index e571e6b7dab6..41bf2c0ed4a8 100644 --- a/packages/core/src/hooks/data/useCustom.ts +++ b/packages/core/src/hooks/data/useCustom.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - QueryObserverResult, - UseQueryOptions, + type QueryObserverResult, + type UseQueryOptions, useQuery, } from "@tanstack/react-query"; @@ -19,7 +19,7 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseRecord, CrudFilter, CrudSort, @@ -28,10 +28,10 @@ import { MetaQuery, Prettify, } from "../../contexts/data/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useCustomMutation.ts b/packages/core/src/hooks/data/useCustomMutation.ts index 8084a5b7fd0e..a39c89e34e7e 100644 --- a/packages/core/src/hooks/data/useCustomMutation.ts +++ b/packages/core/src/hooks/data/useCustomMutation.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, } from "@tanstack/react-query"; @@ -15,17 +15,17 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseRecord, CreateResponse, HttpError, MetaQuery, Prettify, } from "../../contexts/data/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useDataProvider.tsx b/packages/core/src/hooks/data/useDataProvider.tsx index 1fca4e2d85a4..e4ed3cfb8bc6 100644 --- a/packages/core/src/hooks/data/useDataProvider.tsx +++ b/packages/core/src/hooks/data/useDataProvider.tsx @@ -1,7 +1,7 @@ import { useCallback, useContext } from "react"; import { DataContext } from "@contexts/data"; -import { DataProvider, IDataContext } from "../../contexts/data/types"; +import { type DataProvider, IDataContext } from "../../contexts/data/types"; export const useDataProvider = (): (( /** * The name of the `data provider` you want to access diff --git a/packages/core/src/hooks/data/useDelete.ts b/packages/core/src/hooks/data/useDelete.ts index 48383cd11fd0..2cecc9f8a1b4 100644 --- a/packages/core/src/hooks/data/useDelete.ts +++ b/packages/core/src/hooks/data/useDelete.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, useQueryClient, } from "@tanstack/react-query"; @@ -28,7 +28,7 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseKey, BaseRecord, DeleteOneResponse, @@ -40,11 +40,11 @@ import { PrevContext as DeleteContext, PreviousQuery, } from "../../contexts/data/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { ActionTypes } from "../../contexts/undoableQueue/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useDeleteMany.ts b/packages/core/src/hooks/data/useDeleteMany.ts index 7afa305cbaa4..49152d83ad41 100644 --- a/packages/core/src/hooks/data/useDeleteMany.ts +++ b/packages/core/src/hooks/data/useDeleteMany.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, useQueryClient, } from "@tanstack/react-query"; @@ -29,7 +29,7 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseKey, BaseRecord, DeleteManyResponse, @@ -41,11 +41,11 @@ import { PrevContext as DeleteContext, PreviousQuery, } from "../../contexts/data/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { ActionTypes } from "../../contexts/undoableQueue/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useInfiniteList.spec.tsx b/packages/core/src/hooks/data/useInfiniteList.spec.tsx index 9acff5cd1d10..f68231f5ed79 100644 --- a/packages/core/src/hooks/data/useInfiniteList.spec.tsx +++ b/packages/core/src/hooks/data/useInfiniteList.spec.tsx @@ -3,8 +3,8 @@ import { renderHook, waitFor } from "@testing-library/react"; import { defaultRefineOptions } from "@contexts/refine"; import { MockJSONServer, TestWrapper, queryClient } from "@test"; -import { DataProviders } from "../../contexts/data/types"; -import { IRefineContextProvider } from "../../contexts/refine/types"; +import type { DataProviders } from "../../contexts/data/types"; +import type { IRefineContextProvider } from "../../contexts/refine/types"; import { useInfiniteList } from "./useInfiniteList"; const mockRefineProvider: IRefineContextProvider = { diff --git a/packages/core/src/hooks/data/useInfiniteList.ts b/packages/core/src/hooks/data/useInfiniteList.ts index e08832893493..f7fc38b04fc9 100644 --- a/packages/core/src/hooks/data/useInfiniteList.ts +++ b/packages/core/src/hooks/data/useInfiniteList.ts @@ -1,8 +1,8 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - InfiniteData, - InfiniteQueryObserverResult, - UseInfiniteQueryOptions, + type InfiniteData, + type InfiniteQueryObserverResult, + type UseInfiniteQueryOptions, useInfiniteQuery, } from "@tanstack/react-query"; @@ -26,7 +26,7 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseRecord, CrudFilter, CrudSort, @@ -36,11 +36,11 @@ import { Pagination, Prettify, } from "../../contexts/data/types"; -import { LiveModeProps } from "../../contexts/live/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { LiveModeProps } from "../../contexts/live/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useList.spec.tsx b/packages/core/src/hooks/data/useList.spec.tsx index 1c5400b767ee..5f2c85169f38 100644 --- a/packages/core/src/hooks/data/useList.spec.tsx +++ b/packages/core/src/hooks/data/useList.spec.tsx @@ -9,7 +9,7 @@ import { import { defaultRefineOptions } from "@contexts/refine"; -import { IRefineContextProvider } from "../../contexts/refine/types"; +import type { IRefineContextProvider } from "../../contexts/refine/types"; import { useList } from "./useList"; const mockRefineProvider: IRefineContextProvider = { diff --git a/packages/core/src/hooks/data/useList.ts b/packages/core/src/hooks/data/useList.ts index 2e9c569e71cd..0984d4775078 100644 --- a/packages/core/src/hooks/data/useList.ts +++ b/packages/core/src/hooks/data/useList.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - QueryObserverResult, - UseQueryOptions, + type QueryObserverResult, + type UseQueryOptions, useQuery, } from "@tanstack/react-query"; @@ -23,7 +23,7 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseRecord, CrudFilter, CrudSort, @@ -33,11 +33,11 @@ import { Pagination, Prettify, } from "../../contexts/data/types"; -import { LiveModeProps } from "../../contexts/live/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { LiveModeProps } from "../../contexts/live/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useMany.spec.tsx b/packages/core/src/hooks/data/useMany.spec.tsx index 02b0dc33a39a..441e0a05f023 100644 --- a/packages/core/src/hooks/data/useMany.spec.tsx +++ b/packages/core/src/hooks/data/useMany.spec.tsx @@ -8,7 +8,7 @@ import { queryClient, } from "@test"; -import { IRefineContextProvider } from "../../contexts/refine/types"; +import type { IRefineContextProvider } from "../../contexts/refine/types"; import { useMany } from "./useMany"; const mockRefineProvider: IRefineContextProvider = { diff --git a/packages/core/src/hooks/data/useMany.ts b/packages/core/src/hooks/data/useMany.ts index 8014ddfd7a61..e27639630972 100644 --- a/packages/core/src/hooks/data/useMany.ts +++ b/packages/core/src/hooks/data/useMany.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - QueryObserverResult, - UseQueryOptions, + type QueryObserverResult, + type UseQueryOptions, useQuery, } from "@tanstack/react-query"; @@ -23,18 +23,18 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseKey, BaseRecord, GetManyResponse, HttpError, MetaQuery, } from "../../contexts/data/types"; -import { LiveModeProps } from "../../contexts/live/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { LiveModeProps } from "../../contexts/live/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useOne.spec.tsx b/packages/core/src/hooks/data/useOne.spec.tsx index 4baedc9ce602..ba3d3e63498f 100644 --- a/packages/core/src/hooks/data/useOne.spec.tsx +++ b/packages/core/src/hooks/data/useOne.spec.tsx @@ -8,7 +8,7 @@ import { queryClient, } from "@test"; -import { IRefineContextProvider } from "../../contexts/refine/types"; +import type { IRefineContextProvider } from "../../contexts/refine/types"; import { useOne } from "./useOne"; const mockRefineProvider: IRefineContextProvider = { diff --git a/packages/core/src/hooks/data/useOne.ts b/packages/core/src/hooks/data/useOne.ts index bc62f061526c..fa47d6380f76 100644 --- a/packages/core/src/hooks/data/useOne.ts +++ b/packages/core/src/hooks/data/useOne.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - QueryObserverResult, - UseQueryOptions, + type QueryObserverResult, + type UseQueryOptions, useQuery, } from "@tanstack/react-query"; @@ -22,7 +22,7 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseKey, BaseRecord, GetOneResponse, @@ -30,11 +30,11 @@ import { MetaQuery, Prettify, } from "../../contexts/data/types"; -import { LiveModeProps } from "../../contexts/live/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { LiveModeProps } from "../../contexts/live/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useUpdate.ts b/packages/core/src/hooks/data/useUpdate.ts index 734afaa4c98c..57485022b66c 100644 --- a/packages/core/src/hooks/data/useUpdate.ts +++ b/packages/core/src/hooks/data/useUpdate.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, useQueryClient, } from "@tanstack/react-query"; @@ -28,7 +28,7 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseKey, BaseRecord, GetListResponse, @@ -42,11 +42,11 @@ import { PreviousQuery, UpdateResponse, } from "../../contexts/data/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { ActionTypes } from "../../contexts/undoableQueue/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/data/useUpdateMany.ts b/packages/core/src/hooks/data/useUpdateMany.ts index f55de79a546e..c2fbbaffa578 100644 --- a/packages/core/src/hooks/data/useUpdateMany.ts +++ b/packages/core/src/hooks/data/useUpdateMany.ts @@ -1,7 +1,7 @@ import { getXRay } from "@refinedev/devtools-internal"; import { - UseMutationOptions, - UseMutationResult, + type UseMutationOptions, + type UseMutationResult, useMutation, useQueryClient, } from "@tanstack/react-query"; @@ -29,7 +29,7 @@ import { useTranslate, } from "@hooks"; -import { +import type { BaseKey, BaseRecord, GetListResponse, @@ -44,12 +44,12 @@ import { UpdateManyResponse, } from "../../contexts/data/types"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { ActionTypes } from "../../contexts/undoableQueue/types"; export type OptimisticUpdateManyMapType = { diff --git a/packages/core/src/hooks/export/index.spec.ts b/packages/core/src/hooks/export/index.spec.ts index 6a197f8d1508..697918a28d3c 100644 --- a/packages/core/src/hooks/export/index.spec.ts +++ b/packages/core/src/hooks/export/index.spec.ts @@ -6,7 +6,7 @@ import { mockRouterProvider, posts } from "@test/dataMocks"; import { downloadInBrowser } from "../../definitions/helpers/downloadInBrowser"; import * as pickDataProvider from "../../definitions/helpers/pickDataProvider"; -import { ExportOptions, useExport } from "./"; +import { type ExportOptions, useExport } from "./"; const testCsv = "col1,col2\r\ncell1,cell2"; jest.mock("papaparse", () => ({ diff --git a/packages/core/src/hooks/export/index.ts b/packages/core/src/hooks/export/index.ts index 5f303d658ec2..3edfbf25ef24 100644 --- a/packages/core/src/hooks/export/index.ts +++ b/packages/core/src/hooks/export/index.ts @@ -11,13 +11,13 @@ import { } from "@definitions"; import { useDataProvider, useMeta, useResource } from "@hooks"; -import { +import type { BaseRecord, CrudFilter, CrudSort, MetaQuery, } from "../../contexts/data/types"; -import { MapDataFn } from "./types"; +import type { MapDataFn } from "./types"; // Old options interface taken from export-to-csv-fix-source-map@0.2.1 // Kept here to ensure backward compatibility diff --git a/packages/core/src/hooks/export/types.ts b/packages/core/src/hooks/export/types.ts index 324403726970..fc4a4a20041a 100644 --- a/packages/core/src/hooks/export/types.ts +++ b/packages/core/src/hooks/export/types.ts @@ -1,4 +1,4 @@ -import { MouseEventHandler } from "react"; +import type { MouseEventHandler } from "react"; export type MapDataFn = ( item: TItem, diff --git a/packages/core/src/hooks/form/index.ts b/packages/core/src/hooks/form/index.ts index fbc35dba0e83..ea37389e8083 100644 --- a/packages/core/src/hooks/form/index.ts +++ b/packages/core/src/hooks/form/index.ts @@ -25,7 +25,7 @@ import { import type { UpdateParams } from "../data/useUpdate"; import type { UseCreateParams } from "../data/useCreate"; import type { UseFormProps, UseFormReturnType } from "./types"; -import { +import type { BaseKey, BaseRecord, CreateResponse, diff --git a/packages/core/src/hooks/form/types.ts b/packages/core/src/hooks/form/types.ts index c4f20bc72d27..bd98b8201403 100644 --- a/packages/core/src/hooks/form/types.ts +++ b/packages/core/src/hooks/form/types.ts @@ -1,17 +1,20 @@ -import { Dispatch, SetStateAction } from "react"; -import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query"; +import type { Dispatch, SetStateAction } from "react"; +import type { + QueryObserverResult, + UseQueryOptions, +} from "@tanstack/react-query"; -import { +import type { OptimisticUpdateMapType, UseUpdateProps, UseUpdateReturnType, } from "../data/useUpdate"; -import { UseCreateProps, UseCreateReturnType } from "../data/useCreate"; -import { +import type { UseCreateProps, UseCreateReturnType } from "../data/useCreate"; +import type { UseLoadingOvertimeOptionsProps, UseLoadingOvertimeReturnType, } from "../useLoadingOvertime"; -import { +import type { BaseKey, BaseRecord, CreateResponse, @@ -22,9 +25,9 @@ import { MutationMode, UpdateResponse, } from "../../contexts/data/types"; -import { LiveModeProps } from "../../contexts/live/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; -import { Action } from "../../contexts/router/types"; +import type { LiveModeProps } from "../../contexts/live/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { Action } from "../../contexts/router/types"; export type FormAction = Extract; diff --git a/packages/core/src/hooks/import/index.spec.tsx b/packages/core/src/hooks/import/index.spec.tsx index ab54383bf25a..7703651ef152 100644 --- a/packages/core/src/hooks/import/index.spec.tsx +++ b/packages/core/src/hooks/import/index.spec.tsx @@ -5,7 +5,7 @@ import { act } from "react-dom/test-utils"; import { MockJSONServer, TestWrapper, mockRouterProvider } from "@test"; import { useImport } from "."; -import { DataProviders, HttpError } from "../../contexts/data/types"; +import type { DataProviders, HttpError } from "../../contexts/data/types"; jest.mock("papaparse", () => { return { diff --git a/packages/core/src/hooks/import/index.tsx b/packages/core/src/hooks/import/index.tsx index 2ef27c79a914..0071c372b68e 100644 --- a/packages/core/src/hooks/import/index.tsx +++ b/packages/core/src/hooks/import/index.tsx @@ -10,10 +10,14 @@ import { } from "@definitions"; import { useCreate, useCreateMany, useMeta, useResource } from "@hooks"; -import { BaseRecord, HttpError, MetaQuery } from "../../contexts/data/types"; -import { UseCreateReturnType } from "../../hooks/data/useCreate"; -import { UseCreateManyReturnType } from "../../hooks/data/useCreateMany"; -import { MapDataFn } from "../export/types"; +import type { + BaseRecord, + HttpError, + MetaQuery, +} from "../../contexts/data/types"; +import type { UseCreateReturnType } from "../../hooks/data/useCreate"; +import type { UseCreateManyReturnType } from "../../hooks/data/useCreateMany"; +import type { MapDataFn } from "../export/types"; export type ImportSuccessResult = { request: TVariables[]; diff --git a/packages/core/src/hooks/invalidate/index.spec.tsx b/packages/core/src/hooks/invalidate/index.spec.tsx index 956e67b701d0..330827aa9bf9 100644 --- a/packages/core/src/hooks/invalidate/index.spec.tsx +++ b/packages/core/src/hooks/invalidate/index.spec.tsx @@ -4,7 +4,7 @@ import { renderHook } from "@testing-library/react"; import { TestWrapper } from "@test"; import { useInvalidate } from "."; -import { IQueryKeys } from "../../contexts/data/types"; +import type { IQueryKeys } from "../../contexts/data/types"; describe("useInvalidate", () => { it("with empty invalidations array", async () => { diff --git a/packages/core/src/hooks/invalidate/index.tsx b/packages/core/src/hooks/invalidate/index.tsx index 7c43ae887f2e..dc6c1538d89f 100644 --- a/packages/core/src/hooks/invalidate/index.tsx +++ b/packages/core/src/hooks/invalidate/index.tsx @@ -1,15 +1,15 @@ import { useCallback } from "react"; import { - InvalidateOptions, - InvalidateQueryFilters, + type InvalidateOptions, + type InvalidateQueryFilters, useQueryClient, } from "@tanstack/react-query"; import { pickDataProvider } from "@definitions"; import { useKeys, useResource } from "@hooks"; -import { BaseKey, IQueryKeys } from "../../contexts/data/types"; +import type { BaseKey, IQueryKeys } from "../../contexts/data/types"; export type UseInvalidateProp = { resource?: string; diff --git a/packages/core/src/hooks/live/useLiveMode/index.spec.ts b/packages/core/src/hooks/live/useLiveMode/index.spec.ts index eba54fe1d3a5..495531af8cae 100644 --- a/packages/core/src/hooks/live/useLiveMode/index.spec.ts +++ b/packages/core/src/hooks/live/useLiveMode/index.spec.ts @@ -3,7 +3,7 @@ import { renderHook } from "@testing-library/react"; import { defaultRefineOptions } from "@contexts/refine"; import { TestWrapper } from "@test"; -import { IRefineContextProvider } from "../../../contexts/refine/types"; +import type { IRefineContextProvider } from "../../../contexts/refine/types"; import { useLiveMode } from "./"; const mockRefineProvider: IRefineContextProvider = { diff --git a/packages/core/src/hooks/live/useLiveMode/index.ts b/packages/core/src/hooks/live/useLiveMode/index.ts index b72c824b87a7..c2f167caf2a5 100644 --- a/packages/core/src/hooks/live/useLiveMode/index.ts +++ b/packages/core/src/hooks/live/useLiveMode/index.ts @@ -2,8 +2,8 @@ import { useContext } from "react"; import { RefineContext } from "@contexts/refine"; -import { LiveModeProps } from "../../../contexts/live/types"; -import { IRefineContext } from "../../../contexts/refine/types"; +import type { LiveModeProps } from "../../../contexts/live/types"; +import type { IRefineContext } from "../../../contexts/refine/types"; export const useLiveMode = ( liveMode: LiveModeProps["liveMode"], diff --git a/packages/core/src/hooks/live/usePublish/index.ts b/packages/core/src/hooks/live/usePublish/index.ts index 09bd75ab47b7..ba9a8427cd8b 100644 --- a/packages/core/src/hooks/live/usePublish/index.ts +++ b/packages/core/src/hooks/live/usePublish/index.ts @@ -1,7 +1,7 @@ import { useContext } from "react"; import { LiveContext } from "@contexts/live"; -import { LiveProvider } from "../../../contexts/live/types"; +import type { LiveProvider } from "../../../contexts/live/types"; export const usePublish: () => NonNullable["publish"] = () => { const { liveProvider } = useContext(LiveContext); diff --git a/packages/core/src/hooks/live/useResourceSubscription/index.spec.ts b/packages/core/src/hooks/live/useResourceSubscription/index.spec.ts index 591f6e30d359..6f002e3808ec 100644 --- a/packages/core/src/hooks/live/useResourceSubscription/index.spec.ts +++ b/packages/core/src/hooks/live/useResourceSubscription/index.spec.ts @@ -3,7 +3,7 @@ import { renderHook } from "@testing-library/react"; import { TestWrapper } from "@test"; import { defaultRefineOptions } from "@contexts/refine"; -import { IRefineContextProvider } from "../../../contexts/refine/types"; +import type { IRefineContextProvider } from "../../../contexts/refine/types"; import { useResourceSubscription } from "./"; const invalidateQueriesMock = jest.fn(); diff --git a/packages/core/src/hooks/live/useResourceSubscription/index.ts b/packages/core/src/hooks/live/useResourceSubscription/index.ts index b792c4460fec..3d80b089943a 100644 --- a/packages/core/src/hooks/live/useResourceSubscription/index.ts +++ b/packages/core/src/hooks/live/useResourceSubscription/index.ts @@ -5,15 +5,15 @@ import { RefineContext } from "@contexts/refine"; import { useInvalidate } from "@hooks/invalidate"; import { useResource } from "@hooks/resource"; -import { +import type { BaseKey, CrudFilter, CrudSort, MetaQuery, Pagination, } from "../../../contexts/data/types"; -import { LiveEvent, LiveModeProps } from "../../../contexts/live/types"; -import { IRefineContext } from "../../../contexts/refine/types"; +import type { LiveEvent, LiveModeProps } from "../../../contexts/live/types"; +import type { IRefineContext } from "../../../contexts/refine/types"; export type UseResourceSubscriptionProps = { channel: string; diff --git a/packages/core/src/hooks/live/useSubscription/index.ts b/packages/core/src/hooks/live/useSubscription/index.ts index 7f966c623db1..f916f7474d71 100644 --- a/packages/core/src/hooks/live/useSubscription/index.ts +++ b/packages/core/src/hooks/live/useSubscription/index.ts @@ -2,14 +2,14 @@ import { useContext, useEffect } from "react"; import { LiveContext } from "@contexts/live"; -import { +import type { BaseKey, CrudFilter, CrudSort, MetaQuery, Pagination, } from "../../../contexts/data/types"; -import { LiveEvent } from "../../../contexts/live/types"; +import type { LiveEvent } from "../../../contexts/live/types"; export type UseSubscriptionProps = { /** diff --git a/packages/core/src/hooks/menu/useMenu.tsx b/packages/core/src/hooks/menu/useMenu.tsx index fd939b4ccea9..4e0c79c8959a 100644 --- a/packages/core/src/hooks/menu/useMenu.tsx +++ b/packages/core/src/hooks/menu/useMenu.tsx @@ -7,7 +7,7 @@ import { useParsed, useResource, useRouterContext, useTranslate } from ".."; import { useRouterType } from "../../contexts/router/picker"; import { createResourceKey } from "../../definitions/helpers/menu/create-resource-key"; import { - FlatTreeItem, + type FlatTreeItem, createTree, } from "../../definitions/helpers/menu/create-tree"; import { useGetToPath } from "../router/use-get-to-path/index"; diff --git a/packages/core/src/hooks/navigation/index.spec.tsx b/packages/core/src/hooks/navigation/index.spec.tsx index 84f7b6886fd7..f4ad19f8761c 100644 --- a/packages/core/src/hooks/navigation/index.spec.tsx +++ b/packages/core/src/hooks/navigation/index.spec.tsx @@ -8,7 +8,7 @@ import { } from "@test"; import { useNavigation } from "."; -import { LegacyRouterProvider } from "../../contexts/router/legacy/types"; +import type { LegacyRouterProvider } from "../../contexts/router/legacy/types"; const legacyPushMock = jest.fn(); const legacyReplaceMock = jest.fn(); diff --git a/packages/core/src/hooks/navigation/index.ts b/packages/core/src/hooks/navigation/index.ts index 1c1e77d37ab3..7ea0e1c1bf50 100644 --- a/packages/core/src/hooks/navigation/index.ts +++ b/packages/core/src/hooks/navigation/index.ts @@ -7,8 +7,8 @@ import { useBack } from "@hooks/router/use-back"; import { useGo } from "@hooks/router/use-go"; import { useParsed } from "@hooks/router/use-parsed"; -import { BaseKey, MetaDataQuery } from "../../contexts/data/types"; -import { IResourceItem } from "../../contexts/resource/types"; +import type { BaseKey, MetaDataQuery } from "../../contexts/data/types"; +import type { IResourceItem } from "../../contexts/resource/types"; export type HistoryType = "push" | "replace"; diff --git a/packages/core/src/hooks/notification/useCancelNotification/index.tsx b/packages/core/src/hooks/notification/useCancelNotification/index.tsx index 0ff9cad829f6..b0e857499ec2 100644 --- a/packages/core/src/hooks/notification/useCancelNotification/index.tsx +++ b/packages/core/src/hooks/notification/useCancelNotification/index.tsx @@ -1,7 +1,7 @@ import { useContext } from "react"; import { UndoableQueueContext } from "@contexts/undoableQueue"; -import { IUndoableQueue } from "../../../contexts/undoableQueue/types"; +import type { IUndoableQueue } from "../../../contexts/undoableQueue/types"; export type UseCancelNotificationType = () => { notifications: IUndoableQueue[]; diff --git a/packages/core/src/hooks/notification/useHandleNotification/index.spec.tsx b/packages/core/src/hooks/notification/useHandleNotification/index.spec.tsx index bce07ec34def..af568c5e83a5 100644 --- a/packages/core/src/hooks/notification/useHandleNotification/index.spec.tsx +++ b/packages/core/src/hooks/notification/useHandleNotification/index.spec.tsx @@ -2,7 +2,7 @@ import { renderHook } from "@testing-library/react"; import { TestWrapper } from "@test"; -import { OpenNotificationParams } from "../../../contexts/notification/types"; +import type { OpenNotificationParams } from "../../../contexts/notification/types"; import { useHandleNotification } from "./"; const dummyNotification: OpenNotificationParams = { diff --git a/packages/core/src/hooks/notification/useHandleNotification/index.ts b/packages/core/src/hooks/notification/useHandleNotification/index.ts index c248c3bfcbf7..bc96e24a694e 100644 --- a/packages/core/src/hooks/notification/useHandleNotification/index.ts +++ b/packages/core/src/hooks/notification/useHandleNotification/index.ts @@ -2,7 +2,7 @@ import { useCallback } from "react"; import { useNotification } from "@hooks"; -import { OpenNotificationParams } from "../../../contexts/notification/types"; +import type { OpenNotificationParams } from "../../../contexts/notification/types"; export const useHandleNotification = (): typeof handleNotification => { const { open } = useNotification(); diff --git a/packages/core/src/hooks/notification/useNotification/index.ts b/packages/core/src/hooks/notification/useNotification/index.ts index 078e06fbb95f..fa866ca49927 100644 --- a/packages/core/src/hooks/notification/useNotification/index.ts +++ b/packages/core/src/hooks/notification/useNotification/index.ts @@ -1,7 +1,7 @@ import { useContext } from "react"; import { NotificationContext } from "@contexts/notification"; -import { INotificationContext } from "../../../contexts/notification/types"; +import type { INotificationContext } from "../../../contexts/notification/types"; export const useNotification = (): INotificationContext => { const { open, close } = useContext(NotificationContext); diff --git a/packages/core/src/hooks/redirection/index.spec.tsx b/packages/core/src/hooks/redirection/index.spec.tsx index 404a98f4d568..b549840e5f96 100644 --- a/packages/core/src/hooks/redirection/index.spec.tsx +++ b/packages/core/src/hooks/redirection/index.spec.tsx @@ -2,7 +2,7 @@ import { renderHook } from "@testing-library/react"; import { MockJSONServer, TestWrapper, mockLegacyRouterProvider } from "@test"; -import { LegacyRouterProvider } from "../../contexts/router/legacy/types"; +import type { LegacyRouterProvider } from "../../contexts/router/legacy/types"; import { useRedirectionAfterSubmission } from "../redirection"; const legacyPushMock = jest.fn(); diff --git a/packages/core/src/hooks/redirection/index.ts b/packages/core/src/hooks/redirection/index.ts index 5988aa68695b..ea243334db15 100644 --- a/packages/core/src/hooks/redirection/index.ts +++ b/packages/core/src/hooks/redirection/index.ts @@ -2,9 +2,9 @@ import { useCallback } from "react"; import { useNavigation } from "@hooks"; -import { BaseKey, MetaDataQuery } from "../../contexts/data/types"; -import { IResourceItem } from "../../contexts/resource/types"; -import { RedirectAction } from "../form/types"; +import type { BaseKey, MetaDataQuery } from "../../contexts/data/types"; +import type { IResourceItem } from "../../contexts/resource/types"; +import type { RedirectAction } from "../form/types"; export type UseRedirectionAfterSubmissionType = () => (options: { redirect: RedirectAction; diff --git a/packages/core/src/hooks/refine/useMutationMode.ts b/packages/core/src/hooks/refine/useMutationMode.ts index edd11882a1af..336afd9b03a1 100644 --- a/packages/core/src/hooks/refine/useMutationMode.ts +++ b/packages/core/src/hooks/refine/useMutationMode.ts @@ -1,7 +1,7 @@ import { useContext } from "react"; import { RefineContext } from "@contexts/refine"; -import { IRefineContextOptions } from "../../contexts/refine/types"; +import type { IRefineContextOptions } from "../../contexts/refine/types"; import type { MutationMode } from "../../contexts/data/types"; type UseMutationModeType = ( diff --git a/packages/core/src/hooks/refine/useSyncWithLocation.ts b/packages/core/src/hooks/refine/useSyncWithLocation.ts index 4d56c616b872..2339d2097488 100644 --- a/packages/core/src/hooks/refine/useSyncWithLocation.ts +++ b/packages/core/src/hooks/refine/useSyncWithLocation.ts @@ -1,7 +1,7 @@ import { useContext } from "react"; import { RefineContext } from "@contexts/refine"; -import { IRefineContextOptions } from "../../contexts/refine/types"; +import type { IRefineContextOptions } from "../../contexts/refine/types"; type UseSyncWithLocationType = () => { syncWithLocation: IRefineContextOptions["syncWithLocation"]; diff --git a/packages/core/src/hooks/refine/useTitle.tsx b/packages/core/src/hooks/refine/useTitle.tsx index 76ceb59219b7..84473025f08b 100644 --- a/packages/core/src/hooks/refine/useTitle.tsx +++ b/packages/core/src/hooks/refine/useTitle.tsx @@ -2,7 +2,7 @@ import { useContext } from "react"; import { RefineContext } from "@contexts/refine"; -import { TitleProps } from "../../contexts/refine/types"; +import type { TitleProps } from "../../contexts/refine/types"; /** * `useTitle` returns a component that calls the `` passed to the `<Refine>`. diff --git a/packages/core/src/hooks/refine/useWarnAboutChange/index.ts b/packages/core/src/hooks/refine/useWarnAboutChange/index.ts index 216cf51738ad..8d2ab2166226 100644 --- a/packages/core/src/hooks/refine/useWarnAboutChange/index.ts +++ b/packages/core/src/hooks/refine/useWarnAboutChange/index.ts @@ -2,8 +2,8 @@ import { useContext } from "react"; import { RefineContext } from "@contexts/refine"; import { UnsavedWarnContext } from "@contexts/unsavedWarn"; -import { IRefineContextOptions } from "../../../contexts/refine/types"; -import { IUnsavedWarnContext } from "../../../contexts/unsavedWarn/types"; +import type { IRefineContextOptions } from "../../../contexts/refine/types"; +import type { IUnsavedWarnContext } from "../../../contexts/unsavedWarn/types"; type UseWarnAboutChangeType = () => { warnWhenUnsavedChanges: IRefineContextOptions["warnWhenUnsavedChanges"]; diff --git a/packages/core/src/hooks/resource/useResource/index.ts b/packages/core/src/hooks/resource/useResource/index.ts index 0859b7902f8b..de0ce097a198 100644 --- a/packages/core/src/hooks/resource/useResource/index.ts +++ b/packages/core/src/hooks/resource/useResource/index.ts @@ -3,11 +3,11 @@ import { useContext } from "react"; import { ResourceContext } from "@contexts/resource"; import { useResourceWithRoute, useRouterContext } from "@hooks"; -import { BaseKey } from "../../../contexts/data/types"; -import { IResourceItem } from "../../../contexts/resource/types"; -import { ResourceRouterParams } from "../../../contexts/router/legacy/types"; +import type { BaseKey } from "../../../contexts/data/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; +import type { ResourceRouterParams } from "../../../contexts/router/legacy/types"; import { useRouterType } from "../../../contexts/router/picker"; -import { Action } from "../../../contexts/router/types"; +import type { Action } from "../../../contexts/router/types"; import { pickResource } from "../../../definitions/helpers/pick-resource"; import { useParsed } from "../../router/use-parsed"; diff --git a/packages/core/src/hooks/resource/useResourceWithRoute/index.ts b/packages/core/src/hooks/resource/useResourceWithRoute/index.ts index 4c62b269d1b8..567854df0b8b 100644 --- a/packages/core/src/hooks/resource/useResourceWithRoute/index.ts +++ b/packages/core/src/hooks/resource/useResourceWithRoute/index.ts @@ -3,7 +3,7 @@ import { useCallback, useContext } from "react"; import { ResourceContext } from "@contexts/resource"; import { pickResource } from "@definitions/helpers/pick-resource"; -import { IResourceItem } from "../../../contexts/resource/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; export type UseResourceWithRouteReturnType = (route: string) => IResourceItem; diff --git a/packages/core/src/hooks/router/use-get-to-path/index.ts b/packages/core/src/hooks/router/use-get-to-path/index.ts index 958deddab9f0..6d5e390054c1 100644 --- a/packages/core/src/hooks/router/use-get-to-path/index.ts +++ b/packages/core/src/hooks/router/use-get-to-path/index.ts @@ -1,8 +1,8 @@ import React from "react"; -import { IResourceItem } from "../../../contexts/resource/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; import { useRouterType } from "../../../contexts/router/picker"; -import { Action } from "../../../contexts/router/types"; +import type { Action } from "../../../contexts/router/types"; import { getActionRoutesFromResource } from "../../../definitions/helpers/router"; import { composeRoute } from "../../../definitions/helpers/router/compose-route"; import { useResource } from "../../resource"; diff --git a/packages/core/src/hooks/router/use-go/index.spec.tsx b/packages/core/src/hooks/router/use-go/index.spec.tsx index 679c5fa70c7a..ac1e456e98a8 100644 --- a/packages/core/src/hooks/router/use-go/index.spec.tsx +++ b/packages/core/src/hooks/router/use-go/index.spec.tsx @@ -4,7 +4,7 @@ import { act, renderHook } from "@testing-library/react"; import { MockJSONServer, TestWrapper, mockRouterProvider } from "@test"; -import { Resource, handleResourceErrors, useGo } from "./"; +import { type Resource, handleResourceErrors, useGo } from "./"; describe("useGo Hook", () => { it("should return routerProvider go function", () => { diff --git a/packages/core/src/hooks/router/use-go/index.tsx b/packages/core/src/hooks/router/use-go/index.tsx index 97ef7d164383..c1f506e60bd6 100644 --- a/packages/core/src/hooks/router/use-go/index.tsx +++ b/packages/core/src/hooks/router/use-go/index.tsx @@ -3,9 +3,9 @@ import React, { useCallback, useContext } from "react"; import { RouterContext } from "@contexts/router"; import { useResource } from "@hooks/resource"; -import { BaseKey } from "../../../contexts/data/types"; -import { IResourceItem } from "../../../contexts/resource/types"; -import { +import type { BaseKey } from "../../../contexts/data/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; +import type { Action, GoConfig as GoConfigBase, } from "../../../contexts/router/types"; diff --git a/packages/core/src/hooks/router/use-parse/index.tsx b/packages/core/src/hooks/router/use-parse/index.tsx index 295f6b208477..54791d887a1a 100644 --- a/packages/core/src/hooks/router/use-parse/index.tsx +++ b/packages/core/src/hooks/router/use-parse/index.tsx @@ -1,6 +1,9 @@ import { RouterContext } from "@contexts/router"; import React, { useContext } from "react"; -import { ParseFunction, ParseResponse } from "../../../contexts/router/types"; +import type { + ParseFunction, + ParseResponse, +} from "../../../contexts/router/types"; type UseParseType = () => < TParams extends Record<string, any> = Record<string, any>, diff --git a/packages/core/src/hooks/router/use-router-misuse-warning/index.ts b/packages/core/src/hooks/router/use-router-misuse-warning/index.ts index 90a2f160c5db..21fd679dd89e 100644 --- a/packages/core/src/hooks/router/use-router-misuse-warning/index.ts +++ b/packages/core/src/hooks/router/use-router-misuse-warning/index.ts @@ -1,6 +1,6 @@ import { checkRouterPropMisuse } from "@definitions/helpers/check-router-prop-misuse"; import React from "react"; -import { RouterProvider } from "../../../contexts/router/types"; +import type { RouterProvider } from "../../../contexts/router/types"; export const useRouterMisuseWarning = (value?: RouterProvider) => { const warned = React.useRef(false); diff --git a/packages/core/src/hooks/router/use-to-path/index.ts b/packages/core/src/hooks/router/use-to-path/index.ts index dcbf7950cf96..86d79d2dc3f6 100644 --- a/packages/core/src/hooks/router/use-to-path/index.ts +++ b/packages/core/src/hooks/router/use-to-path/index.ts @@ -1,5 +1,5 @@ -import { IResourceItem } from "../../../contexts/resource/types"; -import { Action } from "../../../contexts/router/types"; +import type { IResourceItem } from "../../../contexts/resource/types"; +import type { Action } from "../../../contexts/router/types"; import { useGetToPath } from "../use-get-to-path"; type UseToPathParams = { diff --git a/packages/core/src/hooks/show/index.spec.tsx b/packages/core/src/hooks/show/index.spec.tsx index 5c0ddec692cc..1c6c5b787ac1 100644 --- a/packages/core/src/hooks/show/index.spec.tsx +++ b/packages/core/src/hooks/show/index.spec.tsx @@ -11,7 +11,7 @@ import { } from "@test"; import { posts } from "@test/dataMocks"; -import { IResourceItem } from "../../contexts/resource/types"; +import type { IResourceItem } from "../../contexts/resource/types"; import * as pickResource from "../../definitions/helpers/pick-resource"; import * as useResourceWithRoute from "../resource/useResourceWithRoute"; diff --git a/packages/core/src/hooks/show/index.ts b/packages/core/src/hooks/show/index.ts index dc1a446ea415..33c2db691fd7 100644 --- a/packages/core/src/hooks/show/index.ts +++ b/packages/core/src/hooks/show/index.ts @@ -3,7 +3,7 @@ import { useMeta, useOne, useResourceParams, useLoadingOvertime } from "@hooks"; import { pickNotDeprecated } from "@definitions/helpers"; import type { UseShowProps, UseShowReturnType } from "./types"; -import { BaseKey, BaseRecord, HttpError } from "../../contexts/data/types"; +import type { BaseKey, BaseRecord, HttpError } from "../../contexts/data/types"; export type { UseShowProps, diff --git a/packages/core/src/hooks/show/types.ts b/packages/core/src/hooks/show/types.ts index 464c7d5b7d76..7e6c4bc22a88 100644 --- a/packages/core/src/hooks/show/types.ts +++ b/packages/core/src/hooks/show/types.ts @@ -9,7 +9,7 @@ import type { UseLoadingOvertimeOptionsProps, UseLoadingOvertimeReturnType, } from "../useLoadingOvertime"; -import { +import type { BaseKey, BaseRecord, GetOneResponse, @@ -17,8 +17,8 @@ import { MetaQuery, Prettify, } from "../../contexts/data/types"; -import { LiveModeProps } from "../../contexts/live/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { LiveModeProps } from "../../contexts/live/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; export type UseShowReturnType< TData extends BaseRecord = BaseRecord, diff --git a/packages/core/src/hooks/show/useShow.ts b/packages/core/src/hooks/show/useShow.ts index 1b6a5c54454a..2658804fd3f0 100644 --- a/packages/core/src/hooks/show/useShow.ts +++ b/packages/core/src/hooks/show/useShow.ts @@ -1,12 +1,15 @@ import React, { useState } from "react"; -import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query"; +import type { + QueryObserverResult, + UseQueryOptions, +} from "@tanstack/react-query"; import warnOnce from "warn-once"; import { pickNotDeprecated } from "@definitions/helpers"; import { useMeta, useOne } from "@hooks"; -import { +import type { BaseKey, BaseRecord, GetOneResponse, @@ -14,12 +17,12 @@ import { MetaQuery, Prettify, } from "../../contexts/data/types"; -import { LiveModeProps } from "../../contexts/live/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { LiveModeProps } from "../../contexts/live/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; import { useResource } from "../resource/useResource"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/use-resource-params/index.ts b/packages/core/src/hooks/use-resource-params/index.ts index 63db8e309eea..c2b959d522e5 100644 --- a/packages/core/src/hooks/use-resource-params/index.ts +++ b/packages/core/src/hooks/use-resource-params/index.ts @@ -3,10 +3,10 @@ import React from "react"; import { useId } from "./use-id"; import { useAction } from "./use-action"; import { useResource } from "../resource"; -import { BaseKey } from "../../contexts/data/types"; -import { IResourceItem } from "../../contexts/resource/types"; -import { Action } from "../../contexts/router/types"; -import { FormAction } from "../form/types"; +import type { BaseKey } from "../../contexts/data/types"; +import type { IResourceItem } from "../../contexts/resource/types"; +import type { Action } from "../../contexts/router/types"; +import type { FormAction } from "../form/types"; type Props = { id?: BaseKey; diff --git a/packages/core/src/hooks/use-resource-params/use-action/index.tsx b/packages/core/src/hooks/use-resource-params/use-action/index.tsx index e8c2a304e9a2..5316d58515d2 100644 --- a/packages/core/src/hooks/use-resource-params/use-action/index.tsx +++ b/packages/core/src/hooks/use-resource-params/use-action/index.tsx @@ -1,8 +1,8 @@ import { useParsed } from "../../router/use-parsed"; import { useRouterContext } from "../../legacy-router/useRouterContext"; -import { Action } from "../../../contexts/router/types"; +import type { Action } from "../../../contexts/router/types"; import { useRouterType } from "../../../contexts/router/picker"; -import { ResourceRouterParams } from "../../../contexts/router/legacy/types"; +import type { ResourceRouterParams } from "../../../contexts/router/legacy/types"; /** * Returns the action from the router regardless of the router type. diff --git a/packages/core/src/hooks/use-resource-params/use-id/index.tsx b/packages/core/src/hooks/use-resource-params/use-id/index.tsx index 871c66ebeda0..b0212f5a5876 100644 --- a/packages/core/src/hooks/use-resource-params/use-id/index.tsx +++ b/packages/core/src/hooks/use-resource-params/use-id/index.tsx @@ -1,8 +1,8 @@ import { useParsed } from "../../router/use-parsed"; import { useRouterContext } from "../../legacy-router/useRouterContext"; -import { BaseKey } from "../../../contexts/data/types"; +import type { BaseKey } from "../../../contexts/data/types"; import { useRouterType } from "../../../contexts/router/picker"; -import { ResourceRouterParams } from "../../../contexts/router/legacy/types"; +import type { ResourceRouterParams } from "../../../contexts/router/legacy/types"; /** * Returns the id from the router regardless of the router type. diff --git a/packages/core/src/hooks/useMeta/index.ts b/packages/core/src/hooks/useMeta/index.ts index 9526fb0e537c..ec1f2afdb731 100644 --- a/packages/core/src/hooks/useMeta/index.ts +++ b/packages/core/src/hooks/useMeta/index.ts @@ -1,8 +1,8 @@ import { sanitizeResource } from "@definitions/helpers/sanitize-resource"; import { useParsed } from "@hooks/router"; -import { MetaQuery } from "../../contexts/data/types"; -import { IResourceItem } from "../../contexts/resource/types"; +import type { MetaQuery } from "../../contexts/data/types"; +import type { IResourceItem } from "../../contexts/resource/types"; /** * Hook that returns a function to get meta. diff --git a/packages/core/src/hooks/useSelect/index.spec.ts b/packages/core/src/hooks/useSelect/index.spec.ts index 74b113999df9..aa6f85a2b4fc 100644 --- a/packages/core/src/hooks/useSelect/index.spec.ts +++ b/packages/core/src/hooks/useSelect/index.spec.ts @@ -3,7 +3,7 @@ import { renderHook } from "@testing-library/react-hooks"; import { MockJSONServer, TestWrapper, act, mockRouterProvider } from "@test"; -import { +import type { CrudFilter, DataProviders, IDataContext, diff --git a/packages/core/src/hooks/useSelect/index.ts b/packages/core/src/hooks/useSelect/index.ts index 3aa0181affb7..ffde0140b813 100644 --- a/packages/core/src/hooks/useSelect/index.ts +++ b/packages/core/src/hooks/useSelect/index.ts @@ -1,6 +1,9 @@ import { useCallback, useMemo, useState } from "react"; -import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query"; +import type { + QueryObserverResult, + UseQueryOptions, +} from "@tanstack/react-query"; import debounce from "lodash/debounce"; import get from "lodash/get"; import uniqBy from "lodash/uniqBy"; @@ -8,7 +11,7 @@ import uniqBy from "lodash/uniqBy"; import { pickNotDeprecated } from "@definitions/helpers"; import { useList, useMany, useMeta } from "@hooks"; -import { +import type { BaseKey, BaseOption, BaseRecord, @@ -21,13 +24,13 @@ import { Pagination, Prettify, } from "../../contexts/data/types"; -import { LiveModeProps } from "../../contexts/live/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; -import { BaseListProps } from "../data/useList"; +import type { LiveModeProps } from "../../contexts/live/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { BaseListProps } from "../data/useList"; import { useResource } from "../resource/useResource/index"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/useTable/index.spec.ts b/packages/core/src/hooks/useTable/index.spec.ts index f09c52116a25..b535306aa200 100644 --- a/packages/core/src/hooks/useTable/index.spec.ts +++ b/packages/core/src/hooks/useTable/index.spec.ts @@ -9,7 +9,11 @@ import { } from "@test"; import { useTable } from "."; -import { CrudFilter, CrudSort, Pagination } from "../../contexts/data/types"; +import type { + CrudFilter, + CrudSort, + Pagination, +} from "../../contexts/data/types"; import * as useRouterType from "../../contexts/router/picker"; const defaultPagination = { diff --git a/packages/core/src/hooks/useTable/index.ts b/packages/core/src/hooks/useTable/index.ts index 4051ddc46410..9a3462aa2071 100644 --- a/packages/core/src/hooks/useTable/index.ts +++ b/packages/core/src/hooks/useTable/index.ts @@ -1,6 +1,9 @@ import React, { useState, useEffect } from "react"; -import { QueryObserverResult, UseQueryOptions } from "@tanstack/react-query"; +import type { + QueryObserverResult, + UseQueryOptions, +} from "@tanstack/react-query"; import differenceWith from "lodash/differenceWith"; import isEqual from "lodash/isEqual"; import qs from "qs"; @@ -28,7 +31,7 @@ import { useSyncWithLocation, } from "@hooks"; -import { +import type { BaseRecord, CrudFilter, CrudSort, @@ -38,12 +41,12 @@ import { Pagination, Prettify, } from "../../contexts/data/types"; -import { LiveModeProps } from "../../contexts/live/types"; -import { SuccessErrorNotification } from "../../contexts/notification/types"; -import { BaseListProps } from "../data/useList"; +import type { LiveModeProps } from "../../contexts/live/types"; +import type { SuccessErrorNotification } from "../../contexts/notification/types"; +import type { BaseListProps } from "../data/useList"; import { - UseLoadingOvertimeOptionsProps, - UseLoadingOvertimeReturnType, + type UseLoadingOvertimeOptionsProps, + type UseLoadingOvertimeReturnType, useLoadingOvertime, } from "../useLoadingOvertime"; diff --git a/packages/core/src/hooks/useTelemetryData/index.spec.ts b/packages/core/src/hooks/useTelemetryData/index.spec.ts index 16db2009ccdb..6d95ce4f37c8 100644 --- a/packages/core/src/hooks/useTelemetryData/index.spec.ts +++ b/packages/core/src/hooks/useTelemetryData/index.spec.ts @@ -4,7 +4,7 @@ import { defaultRefineOptions } from "@contexts/refine"; import { MockJSONServer, TestWrapper, mockLegacyRouterProvider } from "@test"; import { useTelemetryData } from "."; -import { IRefineContextProvider } from "../../contexts/refine/types"; +import type { IRefineContextProvider } from "../../contexts/refine/types"; describe("useTelemetryData Hook", () => { describe("authProvider", () => { diff --git a/packages/core/src/hooks/useTelemetryData/index.ts b/packages/core/src/hooks/useTelemetryData/index.ts index 86c17e015832..6a84bf25caec 100644 --- a/packages/core/src/hooks/useTelemetryData/index.ts +++ b/packages/core/src/hooks/useTelemetryData/index.ts @@ -10,7 +10,7 @@ import { LegacyRouterContext } from "@contexts/router/legacy"; import { useResource } from "@hooks/resource"; import { useIsExistAuthentication, useRefineContext } from ".."; -import { ITelemetryData } from "../../components/telemetry/types"; +import type { ITelemetryData } from "../../components/telemetry/types"; // It reads and updates from package.json during build. ref: tsup.config.ts const REFINE_VERSION = "1.0.0"; diff --git a/packages/core/test/dataMocks.ts b/packages/core/test/dataMocks.ts index 4241c79e30d3..0f8fc74010a4 100644 --- a/packages/core/test/dataMocks.ts +++ b/packages/core/test/dataMocks.ts @@ -1,10 +1,13 @@ -import { AccessControlProvider } from "../src/contexts/accessControl/types"; -import { AuthProvider, LegacyAuthProvider } from "../src/contexts/auth/types"; -import { DataProviders } from "../src/contexts/data/types"; -import { LiveProvider } from "../src/contexts/live/types"; -import { IResourceItem } from "../src/contexts/resource/types"; -import { LegacyRouterProvider } from "../src/contexts/router/legacy/types"; -import { +import type { AccessControlProvider } from "../src/contexts/accessControl/types"; +import type { + AuthProvider, + LegacyAuthProvider, +} from "../src/contexts/auth/types"; +import type { DataProviders } from "../src/contexts/data/types"; +import type { LiveProvider } from "../src/contexts/live/types"; +import type { IResourceItem } from "../src/contexts/resource/types"; +import type { LegacyRouterProvider } from "../src/contexts/router/legacy/types"; +import type { Action, ParsedParams, RouterProvider, diff --git a/packages/core/test/index.tsx b/packages/core/test/index.tsx index a8f27216209f..4a7c32b70331 100644 --- a/packages/core/test/index.tsx +++ b/packages/core/test/index.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; @@ -13,23 +13,26 @@ import { I18nContextProvider } from "@contexts/i18n"; import { LiveContextProvider } from "@contexts/live"; import { NotificationContextProvider } from "@contexts/notification"; import { RefineContextProvider } from "@contexts/refine"; -import { IRefineContextProvider } from "@contexts/refine/types"; +import type { IRefineContextProvider } from "@contexts/refine/types"; import { ResourceContextProvider } from "@contexts/resource"; import { RouterContextProvider } from "@contexts/router"; import { LegacyRouterContextProvider } from "@contexts/router/legacy"; import { RouterPickerProvider } from "@contexts/router/picker"; import { UndoableQueueContextProvider } from "@contexts/undoableQueue"; -import { AccessControlProvider } from "../src/contexts/accessControl/types"; -import { AuditLogProvider } from "../src/contexts/auditLog/types"; -import { AuthProvider, ILegacyAuthContext } from "../src/contexts/auth/types"; -import { DataProvider, DataProviders } from "../src/contexts/data/types"; -import { I18nProvider } from "../src/contexts/i18n/types"; -import { LiveProvider } from "../src/contexts/live/types"; -import { NotificationProvider } from "../src/contexts/notification/types"; -import { IResourceItem } from "../src/contexts/resource/types"; -import { LegacyRouterProvider } from "../src/contexts/router/legacy/types"; -import { RouterProvider } from "../src/contexts/router/types"; +import type { AccessControlProvider } from "../src/contexts/accessControl/types"; +import type { AuditLogProvider } from "../src/contexts/auditLog/types"; +import type { + AuthProvider, + ILegacyAuthContext, +} from "../src/contexts/auth/types"; +import type { DataProvider, DataProviders } from "../src/contexts/data/types"; +import type { I18nProvider } from "../src/contexts/i18n/types"; +import type { LiveProvider } from "../src/contexts/live/types"; +import type { NotificationProvider } from "../src/contexts/notification/types"; +import type { IResourceItem } from "../src/contexts/resource/types"; +import type { LegacyRouterProvider } from "../src/contexts/router/legacy/types"; +import type { RouterProvider } from "../src/contexts/router/types"; export const queryClient = new QueryClient({ logger: { diff --git a/packages/devtools-internal/src/create-identifier.ts b/packages/devtools-internal/src/create-identifier.ts index 99d212b29425..52aae6abcbb2 100644 --- a/packages/devtools-internal/src/create-identifier.ts +++ b/packages/devtools-internal/src/create-identifier.ts @@ -1,5 +1,5 @@ -import { TraceType } from "@refinedev/devtools-shared"; -import { MutationKey, QueryKey } from "@tanstack/react-query"; +import type { TraceType } from "@refinedev/devtools-shared"; +import type { MutationKey, QueryKey } from "@tanstack/react-query"; export const createIdentifier = ( key?: QueryKey | MutationKey, diff --git a/packages/devtools-internal/src/get-resource-path.ts b/packages/devtools-internal/src/get-resource-path.ts index ed1cae3f6e02..1bef8f0d0617 100644 --- a/packages/devtools-internal/src/get-resource-path.ts +++ b/packages/devtools-internal/src/get-resource-path.ts @@ -1,7 +1,7 @@ import { - DevtoolsEvent, - DevtoolsEventPayloads, - RefineHook, + type DevtoolsEvent, + type DevtoolsEventPayloads, + type RefineHook, scopes, } from "@refinedev/devtools-shared"; diff --git a/packages/devtools-internal/src/get-trace.ts b/packages/devtools-internal/src/get-trace.ts index 69c237c7d476..a35509270746 100644 --- a/packages/devtools-internal/src/get-trace.ts +++ b/packages/devtools-internal/src/get-trace.ts @@ -2,7 +2,7 @@ import ErrorStackParser from "error-stack-parser"; import { cleanStack } from "./clean-stack"; import { isRefineStack } from "./is-refine-stack"; import { getPackageNameFromFilename } from "./get-package-name-from-filename"; -import { TraceType } from "@refinedev/devtools-shared"; +import type { TraceType } from "@refinedev/devtools-shared"; export function getTrace(excludeFromTrace?: string[]) { if (__DEV_CONDITION__ !== "development") { diff --git a/packages/devtools-internal/src/get-xray.ts b/packages/devtools-internal/src/get-xray.ts index 0794d31c1acf..5c64648664fd 100644 --- a/packages/devtools-internal/src/get-xray.ts +++ b/packages/devtools-internal/src/get-xray.ts @@ -1,4 +1,4 @@ -import { RefineHook, TraceType } from "@refinedev/devtools-shared"; +import type { RefineHook, TraceType } from "@refinedev/devtools-shared"; import { getTrace } from "./get-trace"; import { getResourcePath } from "./get-resource-path"; diff --git a/packages/devtools-internal/src/listeners.ts b/packages/devtools-internal/src/listeners.ts index 4a928aaea3f2..6a61779b3c11 100644 --- a/packages/devtools-internal/src/listeners.ts +++ b/packages/devtools-internal/src/listeners.ts @@ -1,8 +1,8 @@ import { DevtoolsEvent, send } from "@refinedev/devtools-shared"; -import { Mutation, Query } from "@tanstack/react-query"; +import type { Mutation, Query } from "@tanstack/react-query"; import { createIdentifier } from "./create-identifier"; -import { XRayResponse } from "./get-xray"; +import type { XRayResponse } from "./get-xray"; export const createMutationListener = (ws: WebSocket) => (mutation?: Mutation) => { diff --git a/packages/devtools-internal/src/use-query-subscription.tsx b/packages/devtools-internal/src/use-query-subscription.tsx index f0634ff948b5..183e4f2a4e4a 100644 --- a/packages/devtools-internal/src/use-query-subscription.tsx +++ b/packages/devtools-internal/src/use-query-subscription.tsx @@ -3,7 +3,7 @@ import { DevtoolsEvent, receive, } from "@refinedev/devtools-shared"; -import { QueryClient } from "@tanstack/react-query"; +import type { QueryClient } from "@tanstack/react-query"; import React, { useContext } from "react"; import { createQueryListener, createMutationListener } from "./listeners"; diff --git a/packages/devtools-server/src/create-db.ts b/packages/devtools-server/src/create-db.ts index ce8ca2608762..76a0698930ba 100644 --- a/packages/devtools-server/src/create-db.ts +++ b/packages/devtools-server/src/create-db.ts @@ -1,4 +1,4 @@ -import { +import type { DevtoolsEvent, DevtoolsEventPayloads, } from "@refinedev/devtools-shared"; diff --git a/packages/devtools-server/src/feed/get-feed.ts b/packages/devtools-server/src/feed/get-feed.ts index 1e7a81de98ee..01bcf05e301e 100644 --- a/packages/devtools-server/src/feed/get-feed.ts +++ b/packages/devtools-server/src/feed/get-feed.ts @@ -3,7 +3,7 @@ import matter from "gray-matter"; import { marked } from "marked"; import sanitizeHtml from "sanitize-html"; -import { Feed, FeedSection } from "@refinedev/devtools-shared"; +import type { Feed, FeedSection } from "@refinedev/devtools-shared"; import { FEED_MD_URL } from "src/constants"; diff --git a/packages/devtools-server/src/index.ts b/packages/devtools-server/src/index.ts index 41f305ace23d..6c8f31f810fe 100644 --- a/packages/devtools-server/src/index.ts +++ b/packages/devtools-server/src/index.ts @@ -6,7 +6,7 @@ import { serveClient } from "./serve-client"; import { serveWs } from "./serve-ws"; import { reloadOnChange } from "./reload-on-change"; import { setupServer } from "./setup-server"; -import { Activity, createDb } from "./create-db"; +import { type Activity, createDb } from "./create-db"; import { serveApi } from "./serve-api"; import { serveProxy } from "./serve-proxy"; import { serveOpenInEditor } from "./serve-open-in-editor"; diff --git a/packages/devtools-server/src/packages/get-all-packages.ts b/packages/devtools-server/src/packages/get-all-packages.ts index b78e0710eb03..3051b6ee7567 100644 --- a/packages/devtools-server/src/packages/get-all-packages.ts +++ b/packages/devtools-server/src/packages/get-all-packages.ts @@ -1,4 +1,4 @@ -import { PackageType } from "@refinedev/devtools-shared"; +import type { PackageType } from "@refinedev/devtools-shared"; import { getInstalledPackageData } from "./get-installed-package-data"; import { getPackagesFromPackageJSON } from "./get-packages-from-package-json"; import { getChangelog } from "./get-changelog"; diff --git a/packages/devtools-server/src/packages/get-available-packages.ts b/packages/devtools-server/src/packages/get-available-packages.ts index 24bc80f1d885..811d926160d1 100644 --- a/packages/devtools-server/src/packages/get-available-packages.ts +++ b/packages/devtools-server/src/packages/get-available-packages.ts @@ -1,4 +1,4 @@ -import { AvailablePackageType } from "@refinedev/devtools-shared"; +import type { AvailablePackageType } from "@refinedev/devtools-shared"; import dedent from "dedent"; import { getPackagesFromPackageJSON } from "./get-packages-from-package-json"; diff --git a/packages/devtools-server/src/project-id/transform.ts b/packages/devtools-server/src/project-id/transform.ts index e5390c7f1f81..07d96a79893a 100644 --- a/packages/devtools-server/src/project-id/transform.ts +++ b/packages/devtools-server/src/project-id/transform.ts @@ -1,5 +1,5 @@ -import { namedTypes } from "ast-types"; -import { +import type { namedTypes } from "ast-types"; +import type { API, ASTPath, Collection, diff --git a/packages/devtools-server/src/serve-api.ts b/packages/devtools-server/src/serve-api.ts index 1ce89bdbd672..b9ba39cfe004 100644 --- a/packages/devtools-server/src/serve-api.ts +++ b/packages/devtools-server/src/serve-api.ts @@ -1,13 +1,13 @@ import type { Express } from "express"; import { json } from "express"; import uniq from "lodash/uniq"; -import { +import type { AvailablePackageType, Feed, PackageType, } from "@refinedev/devtools-shared"; -import { Data } from "./create-db"; +import type { Data } from "./create-db"; import { getFeed } from "./feed/get-feed"; import { getAllPackages } from "./packages/get-all-packages"; import { getAvailablePackages } from "./packages/get-available-packages"; diff --git a/packages/devtools-server/src/serve-open-in-editor.ts b/packages/devtools-server/src/serve-open-in-editor.ts index a0f999ecae45..00a1b1b8b54b 100644 --- a/packages/devtools-server/src/serve-open-in-editor.ts +++ b/packages/devtools-server/src/serve-open-in-editor.ts @@ -1,4 +1,4 @@ -import { Express } from "express"; +import type { Express } from "express"; import path from "path"; export const serveOpenInEditor = (app: Express, basePath: string) => { diff --git a/packages/devtools-server/src/serve-proxy.ts b/packages/devtools-server/src/serve-proxy.ts index 7dd2f58f7792..add49fafb506 100644 --- a/packages/devtools-server/src/serve-proxy.ts +++ b/packages/devtools-server/src/serve-proxy.ts @@ -1,6 +1,6 @@ import { readJSON, writeJSON } from "fs-extra"; import { FrontendApi } from "@ory/client"; -import { createProxyMiddleware, Options } from "http-proxy-middleware"; +import { createProxyMiddleware, type Options } from "http-proxy-middleware"; import path from "path"; import { REFINE_API_URL, SERVER_PORT } from "./constants"; import { getProjectIdFromPackageJson } from "./project-id/get-project-id-from-package-json"; diff --git a/packages/devtools-server/src/serve-ws.ts b/packages/devtools-server/src/serve-ws.ts index 4c95d14fef15..5874a4226641 100644 --- a/packages/devtools-server/src/serve-ws.ts +++ b/packages/devtools-server/src/serve-ws.ts @@ -2,7 +2,7 @@ import WebSocket from "ws"; import { SERVER_PORT } from "./constants"; import { DevtoolsEvent, send } from "@refinedev/devtools-shared"; import { bold, cyanBright } from "chalk"; -import http from "http"; +import type http from "http"; export const serveWs = ( server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>, diff --git a/packages/devtools-shared/src/event-types.ts b/packages/devtools-shared/src/event-types.ts index e9b74cab5b9c..f78799cd6d6e 100644 --- a/packages/devtools-shared/src/event-types.ts +++ b/packages/devtools-shared/src/event-types.ts @@ -1,4 +1,4 @@ -import { +import type { Mutation, MutationKey, MutationStatus, @@ -6,7 +6,7 @@ import { QueryState, QueryStatus, } from "@tanstack/react-query"; -import { TraceType } from "./trace"; +import type { TraceType } from "./trace"; export enum DevtoolsEvent { RELOAD = "devtools:reload", diff --git a/packages/devtools-shared/src/receive.ts b/packages/devtools-shared/src/receive.ts index f0aad6b67cb7..866c14d4e0e9 100644 --- a/packages/devtools-shared/src/receive.ts +++ b/packages/devtools-shared/src/receive.ts @@ -1,6 +1,6 @@ // receive ws message by adding a listener to the ws object -import { DevtoolsEvent, DevtoolsEventPayloads } from "./event-types"; +import type { DevtoolsEvent, DevtoolsEventPayloads } from "./event-types"; export function receive<T extends DevtoolsEvent>( ws: WebSocket, diff --git a/packages/devtools-shared/src/send.ts b/packages/devtools-shared/src/send.ts index faf870d16b4b..38d51f128516 100644 --- a/packages/devtools-shared/src/send.ts +++ b/packages/devtools-shared/src/send.ts @@ -1,4 +1,4 @@ -import { DevtoolsEvent, DevtoolsEventPayloads } from "./event-types"; +import type { DevtoolsEvent, DevtoolsEventPayloads } from "./event-types"; export async function send<T extends DevtoolsEvent>( ws: WebSocket, diff --git a/packages/devtools-ui/src/components/add-package-drawer.tsx b/packages/devtools-ui/src/components/add-package-drawer.tsx index 55f74ce45855..386405144d14 100644 --- a/packages/devtools-ui/src/components/add-package-drawer.tsx +++ b/packages/devtools-ui/src/components/add-package-drawer.tsx @@ -1,6 +1,6 @@ import React from "react"; import clsx from "clsx"; -import { AvailablePackageType } from "@refinedev/devtools-shared"; +import type { AvailablePackageType } from "@refinedev/devtools-shared"; import { CloseIcon } from "./icons/close"; import { SearchIcon } from "./icons/search"; diff --git a/packages/devtools-ui/src/components/add-package.item.tsx b/packages/devtools-ui/src/components/add-package.item.tsx index 6d7c66c5ff16..9617f8844c2c 100644 --- a/packages/devtools-ui/src/components/add-package.item.tsx +++ b/packages/devtools-ui/src/components/add-package.item.tsx @@ -2,7 +2,7 @@ import React from "react"; import clsx from "clsx"; import { Button } from "./button"; import { PlusCircleIcon } from "./icons/plus-circle"; -import { AvailablePackageType } from "@refinedev/devtools-shared"; +import type { AvailablePackageType } from "@refinedev/devtools-shared"; type PackageItemProps = { onInstall?: () => void; diff --git a/packages/devtools-ui/src/components/feed-item.tsx b/packages/devtools-ui/src/components/feed-item.tsx index 3f9d1da424c9..fa2e9db07c1b 100644 --- a/packages/devtools-ui/src/components/feed-item.tsx +++ b/packages/devtools-ui/src/components/feed-item.tsx @@ -2,7 +2,7 @@ import React from "react"; import dayjs from "dayjs"; import clsx from "clsx"; -import { FeedSection } from "@refinedev/devtools-shared"; +import type { FeedSection } from "@refinedev/devtools-shared"; type Props = { item: FeedSection; diff --git a/packages/devtools-ui/src/components/header-auth-status.tsx b/packages/devtools-ui/src/components/header-auth-status.tsx index 90c56681c3ca..d14f26a4e1ef 100644 --- a/packages/devtools-ui/src/components/header-auth-status.tsx +++ b/packages/devtools-ui/src/components/header-auth-status.tsx @@ -4,7 +4,7 @@ import Gravatar from "react-gravatar"; import { getMe } from "src/utils/me"; -import { MeResponse } from "src/interfaces/api"; +import type { MeResponse } from "src/interfaces/api"; import { logoutUser } from "src/utils/auth"; import { useNavigate } from "react-router-dom"; diff --git a/packages/devtools-ui/src/components/highlight.tsx b/packages/devtools-ui/src/components/highlight.tsx index 294ce2c75875..1182eef369d4 100644 --- a/packages/devtools-ui/src/components/highlight.tsx +++ b/packages/devtools-ui/src/components/highlight.tsx @@ -1,5 +1,8 @@ import React from "react"; -import HighlightPrism, { Language, defaultProps } from "prism-react-renderer"; +import HighlightPrism, { + type Language, + defaultProps, +} from "prism-react-renderer"; import theme from "prism-react-renderer/themes/nightOwl"; type Props = { diff --git a/packages/devtools-ui/src/components/monitor-applied-filter-group.tsx b/packages/devtools-ui/src/components/monitor-applied-filter-group.tsx index 5fc1a80ce917..f966cfceb2ac 100644 --- a/packages/devtools-ui/src/components/monitor-applied-filter-group.tsx +++ b/packages/devtools-ui/src/components/monitor-applied-filter-group.tsx @@ -1,6 +1,6 @@ import React from "react"; import clsx from "clsx"; -import { Filters } from "./monitor-filters"; +import type { Filters } from "./monitor-filters"; import { CloseIcon } from "./icons/close"; type Props = { diff --git a/packages/devtools-ui/src/components/monitor-details.tsx b/packages/devtools-ui/src/components/monitor-details.tsx index c2b950a798b7..54e67299ef31 100644 --- a/packages/devtools-ui/src/components/monitor-details.tsx +++ b/packages/devtools-ui/src/components/monitor-details.tsx @@ -1,7 +1,7 @@ import React from "react"; import clsx from "clsx"; -import { Activity } from "src/interfaces/activity"; +import type { Activity } from "src/interfaces/activity"; import { Status } from "./status"; import { TraceList } from "./trace-list"; import dayjs from "dayjs"; @@ -13,7 +13,7 @@ import { getResourceValue } from "src/utils/get-resource-value"; import { ResourceValue } from "./resource-value"; import { DevToolsContext, - RefineHook, + type RefineHook, scopes, } from "@refinedev/devtools-shared"; import { getOwners } from "src/utils/get-owners"; diff --git a/packages/devtools-ui/src/components/monitor-filters.tsx b/packages/devtools-ui/src/components/monitor-filters.tsx index 306e1e1f0972..ffc5814a06bd 100644 --- a/packages/devtools-ui/src/components/monitor-filters.tsx +++ b/packages/devtools-ui/src/components/monitor-filters.tsx @@ -8,7 +8,7 @@ import { FilterField } from "./filter-field"; import { CheckboxGroup } from "./checkbox-group"; import { scopes } from "@refinedev/devtools-shared"; import { MonitorAppliedFilterGroup } from "./monitor-applied-filter-group"; -import { Activity } from "src/interfaces/activity"; +import type { Activity } from "src/interfaces/activity"; export type Filters = { scope: string[]; diff --git a/packages/devtools-ui/src/components/monitor-table.tsx b/packages/devtools-ui/src/components/monitor-table.tsx index 2ab99bbe8af8..73bca4e38dd4 100644 --- a/packages/devtools-ui/src/components/monitor-table.tsx +++ b/packages/devtools-ui/src/components/monitor-table.tsx @@ -1,7 +1,7 @@ import React from "react"; import clsx from "clsx"; -import { ColumnDef, Table, flexRender } from "@tanstack/react-table"; -import { Activity } from "src/interfaces/activity"; +import { type ColumnDef, type Table, flexRender } from "@tanstack/react-table"; +import type { Activity } from "src/interfaces/activity"; import { ChevronDownIcon } from "./icons/chevron-down"; type Props = { diff --git a/packages/devtools-ui/src/components/owners.tsx b/packages/devtools-ui/src/components/owners.tsx index 9b634f000801..9da140e02908 100644 --- a/packages/devtools-ui/src/components/owners.tsx +++ b/packages/devtools-ui/src/components/owners.tsx @@ -1,6 +1,6 @@ import React from "react"; import { cleanFilePath } from "src/utils/clean-file-path"; -import { Activity } from "src/interfaces/activity"; +import type { Activity } from "src/interfaces/activity"; import clsx from "clsx"; import { getOwners } from "src/utils/get-owners"; import { DevToolsContext } from "@refinedev/devtools-shared"; diff --git a/packages/devtools-ui/src/components/package-item.tsx b/packages/devtools-ui/src/components/package-item.tsx index cc3300c9e109..1c76ec51f26d 100644 --- a/packages/devtools-ui/src/components/package-item.tsx +++ b/packages/devtools-ui/src/components/package-item.tsx @@ -1,7 +1,7 @@ import React from "react"; import clsx from "clsx"; -import { +import type { PackageLatestVersionType, PackageType, } from "@refinedev/devtools-shared"; diff --git a/packages/devtools-ui/src/components/packages.tsx b/packages/devtools-ui/src/components/packages.tsx index 0e408578579c..a88566c3ba00 100644 --- a/packages/devtools-ui/src/components/packages.tsx +++ b/packages/devtools-ui/src/components/packages.tsx @@ -2,7 +2,7 @@ import React from "react"; import clsx from "clsx"; import { Fireworks } from "@fireworks-js/react"; import type { FireworksHandlers } from "@fireworks-js/react"; -import { PackageType } from "@refinedev/devtools-shared"; +import type { PackageType } from "@refinedev/devtools-shared"; import { getInstalledPackages, installPackages } from "src/utils/packages"; import { PackageItem } from "src/components/package-item"; diff --git a/packages/devtools-ui/src/components/resource-value.tsx b/packages/devtools-ui/src/components/resource-value.tsx index 4ab22a45de73..35759a3f2378 100644 --- a/packages/devtools-ui/src/components/resource-value.tsx +++ b/packages/devtools-ui/src/components/resource-value.tsx @@ -1,4 +1,4 @@ -import { Scopes } from "@refinedev/devtools-shared"; +import type { Scopes } from "@refinedev/devtools-shared"; import clsx from "clsx"; import React from "react"; diff --git a/packages/devtools-ui/src/components/status.tsx b/packages/devtools-ui/src/components/status.tsx index 30ed30c3ec7a..9e0dc4d2b364 100644 --- a/packages/devtools-ui/src/components/status.tsx +++ b/packages/devtools-ui/src/components/status.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Activity } from "src/interfaces/activity"; +import type { Activity } from "src/interfaces/activity"; export const Status = ({ activity }: { activity: Activity }) => { const status = activity.status; diff --git a/packages/devtools-ui/src/components/trace-list.tsx b/packages/devtools-ui/src/components/trace-list.tsx index 76244d028eea..b124e2e1636e 100644 --- a/packages/devtools-ui/src/components/trace-list.tsx +++ b/packages/devtools-ui/src/components/trace-list.tsx @@ -1,7 +1,7 @@ import React from "react"; import clsx from "clsx"; -import { TraceType } from "@refinedev/devtools-shared"; +import type { TraceType } from "@refinedev/devtools-shared"; export const TraceList = ({ trace }: { trace?: TraceType[] }) => { return ( diff --git a/packages/devtools-ui/src/interfaces/activity.ts b/packages/devtools-ui/src/interfaces/activity.ts index 8ed212df2135..aa116aea1f28 100644 --- a/packages/devtools-ui/src/interfaces/activity.ts +++ b/packages/devtools-ui/src/interfaces/activity.ts @@ -1,4 +1,4 @@ -import { +import type { DevtoolsEvent, DevtoolsEventPayloads, } from "@refinedev/devtools-shared"; diff --git a/packages/devtools-ui/src/pages/login.tsx b/packages/devtools-ui/src/pages/login.tsx index 0b671f3615c9..65959986ddbc 100644 --- a/packages/devtools-ui/src/pages/login.tsx +++ b/packages/devtools-ui/src/pages/login.tsx @@ -1,4 +1,4 @@ -import { LoginFlow } from "@ory/client"; +import type { LoginFlow } from "@ory/client"; import { DevToolsContext, DevtoolsEvent, diff --git a/packages/devtools-ui/src/pages/monitor.tsx b/packages/devtools-ui/src/pages/monitor.tsx index 1adaa42ccaf6..6786bbec5d61 100644 --- a/packages/devtools-ui/src/pages/monitor.tsx +++ b/packages/devtools-ui/src/pages/monitor.tsx @@ -5,14 +5,14 @@ import { DevtoolsEvent, receive, hooksByScope, - RefineHook, - Scopes, + type RefineHook, + type Scopes, scopes, } from "@refinedev/devtools-shared"; import { - Cell, - ColumnDef, - SortingState, + type Cell, + type ColumnDef, + type SortingState, getCoreRowModel, getPaginationRowModel, getSortedRowModel, @@ -26,7 +26,7 @@ import { Status } from "src/components/status"; import { MonitorDetails } from "src/components/monitor-details"; import { TraceList } from "src/components/trace-list"; import { MonitorTable } from "src/components/monitor-table"; -import { Filters, MonitorFilters } from "src/components/monitor-filters"; +import { type Filters, MonitorFilters } from "src/components/monitor-filters"; import { useSearchParams } from "react-router-dom"; import { getResourceValue } from "src/utils/get-resource-value"; import { ResourceValue } from "src/components/resource-value"; diff --git a/packages/devtools-ui/src/pages/onboarding.tsx b/packages/devtools-ui/src/pages/onboarding.tsx index ac303af62ce8..b223809bc43a 100644 --- a/packages/devtools-ui/src/pages/onboarding.tsx +++ b/packages/devtools-ui/src/pages/onboarding.tsx @@ -5,7 +5,7 @@ import { Button } from "src/components/button"; import { LogoIcon } from "src/components/icons/logo"; import { Input } from "src/components/input"; import { FeatureSlide, FeatureSlideMobile } from "src/components/feature-slide"; -import { MeUpdateVariables } from "src/interfaces/api"; +import type { MeUpdateVariables } from "src/interfaces/api"; import { getMe, updateMe } from "src/utils/me"; export const Onboarding = () => { diff --git a/packages/devtools-ui/src/utils/get-owners.ts b/packages/devtools-ui/src/utils/get-owners.ts index bfac256acf8d..f6824a74eb52 100644 --- a/packages/devtools-ui/src/utils/get-owners.ts +++ b/packages/devtools-ui/src/utils/get-owners.ts @@ -1,4 +1,4 @@ -import { Activity } from "src/interfaces/activity"; +import type { Activity } from "src/interfaces/activity"; export const getOwners = (activity: Activity) => { return activity.trace?.filter((t) => !t.isRefine) ?? []; diff --git a/packages/devtools-ui/src/utils/get-resource-value.ts b/packages/devtools-ui/src/utils/get-resource-value.ts index d3f1c51813b9..c99d3766ba2a 100644 --- a/packages/devtools-ui/src/utils/get-resource-value.ts +++ b/packages/devtools-ui/src/utils/get-resource-value.ts @@ -1,4 +1,4 @@ -import { Activity } from "src/interfaces/activity"; +import type { Activity } from "src/interfaces/activity"; import get from "lodash/get"; export const getResourceValue = (activity: Activity): string => { diff --git a/packages/devtools-ui/src/utils/me.ts b/packages/devtools-ui/src/utils/me.ts index 036155c1423d..79321f3a6568 100644 --- a/packages/devtools-ui/src/utils/me.ts +++ b/packages/devtools-ui/src/utils/me.ts @@ -1,4 +1,4 @@ -import { +import type { MeResponse, MeUpdateVariables, RaffleResponse, diff --git a/packages/devtools-ui/src/utils/packages.ts b/packages/devtools-ui/src/utils/packages.ts index a3e309c2f389..3a22d4477f6c 100644 --- a/packages/devtools-ui/src/utils/packages.ts +++ b/packages/devtools-ui/src/utils/packages.ts @@ -1,4 +1,4 @@ -import { +import type { AvailablePackageType, PackageLatestVersionType, PackageType, diff --git a/packages/devtools-ui/src/utils/project-id.ts b/packages/devtools-ui/src/utils/project-id.ts index 6ecf5c83fdd1..9b50965d518c 100644 --- a/packages/devtools-ui/src/utils/project-id.ts +++ b/packages/devtools-ui/src/utils/project-id.ts @@ -1,4 +1,4 @@ -import { ProjectIdResponse } from "src/interfaces/api"; +import type { ProjectIdResponse } from "src/interfaces/api"; export const fetchNewProjectId = async () => { try { diff --git a/packages/devtools/src/components/icons/arrow-union-icon.tsx b/packages/devtools/src/components/icons/arrow-union-icon.tsx index 43bc8df894c1..173fabeefb23 100644 --- a/packages/devtools/src/components/icons/arrow-union-icon.tsx +++ b/packages/devtools/src/components/icons/arrow-union-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const ArrowUnionIcon = (props: SVGProps<SVGSVGElement>) => ( <svg diff --git a/packages/devtools/src/components/icons/devtools-icon.tsx b/packages/devtools/src/components/icons/devtools-icon.tsx index b9a55ee98292..217c456c6276 100644 --- a/packages/devtools/src/components/icons/devtools-icon.tsx +++ b/packages/devtools/src/components/icons/devtools-icon.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { SVGProps } from "react"; +import type { SVGProps } from "react"; export const DevtoolsIcon = (props: SVGProps<SVGSVGElement>) => ( <svg diff --git a/packages/devtools/src/components/resizable-pane.tsx b/packages/devtools/src/components/resizable-pane.tsx index 653f7cc73fb3..b8555a841364 100644 --- a/packages/devtools/src/components/resizable-pane.tsx +++ b/packages/devtools/src/components/resizable-pane.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Placement } from "src/interfaces/placement"; +import type { Placement } from "src/interfaces/placement"; import { getDefaultPanelSize, getMaxPanelHeight, diff --git a/packages/devtools/src/panel.tsx b/packages/devtools/src/panel.tsx index d77e2fd98810..6513cb3f5122 100644 --- a/packages/devtools/src/panel.tsx +++ b/packages/devtools/src/panel.tsx @@ -8,7 +8,7 @@ import { send, } from "@refinedev/devtools-shared"; -import { Placement } from "./interfaces/placement"; +import type { Placement } from "./interfaces/placement"; export const DevtoolsPanel = __DEV_CONDITION__ !== "development" diff --git a/packages/devtools/src/utilities/index.ts b/packages/devtools/src/utilities/index.ts index cdac809cfa6d..36438e5bbc10 100644 --- a/packages/devtools/src/utilities/index.ts +++ b/packages/devtools/src/utilities/index.ts @@ -1,4 +1,4 @@ -import { Placement } from "src/interfaces/placement"; +import type { Placement } from "src/interfaces/placement"; export const getPanelToggleTransforms = (visible: boolean) => { return visible ? "scaleX(1) translateY(0)" : "scaleX(0) translateY(25vw)"; diff --git a/packages/graphql/src/dataProvider/index.ts b/packages/graphql/src/dataProvider/index.ts index 520b3a191e22..510e62216922 100644 --- a/packages/graphql/src/dataProvider/index.ts +++ b/packages/graphql/src/dataProvider/index.ts @@ -1,4 +1,4 @@ -import { DataProvider, BaseRecord } from "@refinedev/core"; +import type { DataProvider, BaseRecord } from "@refinedev/core"; import { GraphQLClient } from "graphql-request"; import * as gql from "gql-query-builder"; import pluralize from "pluralize"; diff --git a/packages/graphql/src/liveProvider/index.ts b/packages/graphql/src/liveProvider/index.ts index 02ef1bcefe5e..6e794567a67a 100644 --- a/packages/graphql/src/liveProvider/index.ts +++ b/packages/graphql/src/liveProvider/index.ts @@ -1,5 +1,5 @@ -import { LiveProvider } from "@refinedev/core"; -import { Client } from "graphql-ws"; +import type { LiveProvider } from "@refinedev/core"; +import type { Client } from "graphql-ws"; import { generateUseListSubscription, diff --git a/packages/graphql/src/utils/generateFilter.ts b/packages/graphql/src/utils/generateFilter.ts index 203373c63ea7..9fd6bcbedff0 100644 --- a/packages/graphql/src/utils/generateFilter.ts +++ b/packages/graphql/src/utils/generateFilter.ts @@ -1,4 +1,4 @@ -import { CrudFilters, LogicalFilter } from "@refinedev/core"; +import type { CrudFilters, LogicalFilter } from "@refinedev/core"; export const generateFilter = (filters?: CrudFilters) => { const queryFilters: { [key: string]: any } = {}; diff --git a/packages/graphql/src/utils/generateSort.ts b/packages/graphql/src/utils/generateSort.ts index f096a33ed061..ad76f05e64cc 100644 --- a/packages/graphql/src/utils/generateSort.ts +++ b/packages/graphql/src/utils/generateSort.ts @@ -1,4 +1,4 @@ -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; export const generateSort = (sorters?: CrudSorting) => { if (sorters && sorters.length > 0) { diff --git a/packages/graphql/src/utils/generateUseListSubscription.ts b/packages/graphql/src/utils/generateUseListSubscription.ts index 5fff1b7a232d..b1ac72ec8fc4 100644 --- a/packages/graphql/src/utils/generateUseListSubscription.ts +++ b/packages/graphql/src/utils/generateUseListSubscription.ts @@ -1,4 +1,4 @@ -import { +import type { MetaQuery, Pagination, CrudSorting, diff --git a/packages/graphql/src/utils/generateUseManySubscription.ts b/packages/graphql/src/utils/generateUseManySubscription.ts index dbdcbae5e0ca..e5334db61f2c 100644 --- a/packages/graphql/src/utils/generateUseManySubscription.ts +++ b/packages/graphql/src/utils/generateUseManySubscription.ts @@ -1,4 +1,4 @@ -import { BaseKey, MetaQuery } from "@refinedev/core"; +import type { BaseKey, MetaQuery } from "@refinedev/core"; import * as gql from "gql-query-builder"; import camelCase from "camelcase"; diff --git a/packages/graphql/src/utils/generateUseOneSubscription.ts b/packages/graphql/src/utils/generateUseOneSubscription.ts index 940db5122fb4..4feb13059acd 100644 --- a/packages/graphql/src/utils/generateUseOneSubscription.ts +++ b/packages/graphql/src/utils/generateUseOneSubscription.ts @@ -1,4 +1,4 @@ -import { MetaQuery, BaseKey } from "@refinedev/core"; +import type { MetaQuery, BaseKey } from "@refinedev/core"; import * as gql from "gql-query-builder"; import pluralize from "pluralize"; import camelCase from "camelcase"; diff --git a/packages/graphql/src/utils/graphql.ts b/packages/graphql/src/utils/graphql.ts index adc5fea3bbd3..5f589da9a441 100644 --- a/packages/graphql/src/utils/graphql.ts +++ b/packages/graphql/src/utils/graphql.ts @@ -1,5 +1,5 @@ -import { MetaQuery } from "@refinedev/core"; -import { DocumentNode, visit, SelectionSetNode } from "graphql"; +import type { MetaQuery } from "@refinedev/core"; +import { type DocumentNode, visit, type SelectionSetNode } from "graphql"; export const getOperationFields = (documentNode: DocumentNode) => { const fieldLines: string[] = []; diff --git a/packages/graphql/test/utils/generateFilter.spec.ts b/packages/graphql/test/utils/generateFilter.spec.ts index 15cdda401c57..e1663b365af5 100644 --- a/packages/graphql/test/utils/generateFilter.spec.ts +++ b/packages/graphql/test/utils/generateFilter.spec.ts @@ -1,4 +1,4 @@ -import { CrudFilters } from "@refinedev/core"; +import type { CrudFilters } from "@refinedev/core"; import { generateFilter } from "../../src/utils"; describe("generateFilter", () => { diff --git a/packages/graphql/test/utils/generateSort.spec.ts b/packages/graphql/test/utils/generateSort.spec.ts index 3a42bd60add7..ce8153c98b21 100644 --- a/packages/graphql/test/utils/generateSort.spec.ts +++ b/packages/graphql/test/utils/generateSort.spec.ts @@ -1,4 +1,4 @@ -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; import { generateSort, genereteSort } from "../../src/utils"; describe("generateSort", () => { diff --git a/packages/graphql/test/utils/generateUseListSubscription.spec.ts b/packages/graphql/test/utils/generateUseListSubscription.spec.ts index a51d9edafcf3..9e7b30319a42 100644 --- a/packages/graphql/test/utils/generateUseListSubscription.spec.ts +++ b/packages/graphql/test/utils/generateUseListSubscription.spec.ts @@ -1,4 +1,4 @@ -import { +import type { CrudFilters, CrudSorting, MetaQuery, diff --git a/packages/hasura/src/dataProvider/index.ts b/packages/hasura/src/dataProvider/index.ts index 3eab29263722..da18ab27cf03 100644 --- a/packages/hasura/src/dataProvider/index.ts +++ b/packages/hasura/src/dataProvider/index.ts @@ -1,4 +1,4 @@ -import { BaseRecord, DataProvider } from "@refinedev/core"; +import type { BaseRecord, DataProvider } from "@refinedev/core"; import camelCase from "camelcase"; import * as gql from "gql-query-builder"; import { GraphQLClient } from "graphql-request"; diff --git a/packages/hasura/src/liveProvider/index.ts b/packages/hasura/src/liveProvider/index.ts index 2be963f3d2cc..c91978dff81a 100644 --- a/packages/hasura/src/liveProvider/index.ts +++ b/packages/hasura/src/liveProvider/index.ts @@ -1,5 +1,5 @@ -import { LiveProvider } from "@refinedev/core"; -import { Client } from "graphql-ws"; +import type { LiveProvider } from "@refinedev/core"; +import type { Client } from "graphql-ws"; import { generateUseManySubscription, diff --git a/packages/hasura/src/utils/generateFilters.ts b/packages/hasura/src/utils/generateFilters.ts index cd95b3d43523..96c54d829ce6 100644 --- a/packages/hasura/src/utils/generateFilters.ts +++ b/packages/hasura/src/utils/generateFilters.ts @@ -1,11 +1,11 @@ -import { +import type { ConditionalFilter, CrudOperators, LogicalFilter, } from "@refinedev/core"; import camelcase from "camelcase"; import setWith from "lodash/setWith"; -import { NamingConvention } from "src/dataProvider"; +import type { NamingConvention } from "src/dataProvider"; export type HasuraFilterCondition = | "_and" diff --git a/packages/hasura/src/utils/generateSorting.ts b/packages/hasura/src/utils/generateSorting.ts index d6c870222fcb..b79c3a9f987c 100644 --- a/packages/hasura/src/utils/generateSorting.ts +++ b/packages/hasura/src/utils/generateSorting.ts @@ -1,4 +1,4 @@ -import { CrudSort, CrudSorting } from "@refinedev/core"; +import type { CrudSort, CrudSorting } from "@refinedev/core"; import setWith from "lodash/setWith"; export type HasuraSortOrder = "asc" | "desc"; diff --git a/packages/hasura/src/utils/generateUseListSubscription.ts b/packages/hasura/src/utils/generateUseListSubscription.ts index 7f37ffeae1ea..8a129919289a 100644 --- a/packages/hasura/src/utils/generateUseListSubscription.ts +++ b/packages/hasura/src/utils/generateUseListSubscription.ts @@ -1,7 +1,7 @@ -import { CrudSorting, MetaQuery, Pagination } from "@refinedev/core"; +import type { CrudSorting, MetaQuery, Pagination } from "@refinedev/core"; import * as gql from "gql-query-builder"; -import { HasuraCrudFilters, generateFilters } from "./generateFilters"; +import { type HasuraCrudFilters, generateFilters } from "./generateFilters"; import { generateSorting } from "./generateSorting"; import { getOperationFields } from "./graphql"; diff --git a/packages/hasura/src/utils/generateUseManySubscription.ts b/packages/hasura/src/utils/generateUseManySubscription.ts index cd6b853b5862..6009117a99c3 100644 --- a/packages/hasura/src/utils/generateUseManySubscription.ts +++ b/packages/hasura/src/utils/generateUseManySubscription.ts @@ -1,4 +1,4 @@ -import { MetaQuery, BaseKey } from "@refinedev/core"; +import type { MetaQuery, BaseKey } from "@refinedev/core"; import * as gql from "gql-query-builder"; import { getOperationFields } from "./graphql"; diff --git a/packages/hasura/src/utils/generateUseOneSubscription.ts b/packages/hasura/src/utils/generateUseOneSubscription.ts index 1e3aad8a0bdb..a1c0155ae626 100644 --- a/packages/hasura/src/utils/generateUseOneSubscription.ts +++ b/packages/hasura/src/utils/generateUseOneSubscription.ts @@ -1,4 +1,4 @@ -import { MetaQuery, BaseKey } from "@refinedev/core"; +import type { MetaQuery, BaseKey } from "@refinedev/core"; import * as gql from "gql-query-builder"; import { getOperationFields } from "./graphql"; diff --git a/packages/hasura/src/utils/graphql.ts b/packages/hasura/src/utils/graphql.ts index adc5fea3bbd3..5f589da9a441 100644 --- a/packages/hasura/src/utils/graphql.ts +++ b/packages/hasura/src/utils/graphql.ts @@ -1,5 +1,5 @@ -import { MetaQuery } from "@refinedev/core"; -import { DocumentNode, visit, SelectionSetNode } from "graphql"; +import type { MetaQuery } from "@refinedev/core"; +import { type DocumentNode, visit, type SelectionSetNode } from "graphql"; export const getOperationFields = (documentNode: DocumentNode) => { const fieldLines: string[] = []; diff --git a/packages/hasura/test/utils/generateFilters.spec.ts b/packages/hasura/test/utils/generateFilters.spec.ts index 511ddf37675c..09ef8048ab8a 100644 --- a/packages/hasura/test/utils/generateFilters.spec.ts +++ b/packages/hasura/test/utils/generateFilters.spec.ts @@ -1,6 +1,6 @@ import { - HasuraCrudFilters, - HasuraCrudOperators, + type HasuraCrudFilters, + type HasuraCrudOperators, generateFilters, handleFilterValue, } from "../../src/utils"; diff --git a/packages/hasura/test/utils/generateSorting.spec.ts b/packages/hasura/test/utils/generateSorting.spec.ts index 321e17b4ccbc..7a58cb4ab050 100644 --- a/packages/hasura/test/utils/generateSorting.spec.ts +++ b/packages/hasura/test/utils/generateSorting.spec.ts @@ -1,4 +1,4 @@ -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; import { generateSorting } from "../../src/utils"; describe("generateSorting", () => { diff --git a/packages/hasura/test/utils/generateUseListSubscription.spec.ts b/packages/hasura/test/utils/generateUseListSubscription.spec.ts index 396eeaffc890..e1f46d1070ec 100644 --- a/packages/hasura/test/utils/generateUseListSubscription.spec.ts +++ b/packages/hasura/test/utils/generateUseListSubscription.spec.ts @@ -1,6 +1,6 @@ -import { MetaQuery, Pagination, CrudSorting } from "@refinedev/core"; +import type { MetaQuery, Pagination, CrudSorting } from "@refinedev/core"; import { - HasuraCrudFilters, + type HasuraCrudFilters, generateUseListSubscription, genereteUseListSubscription, } from "../../src/utils"; diff --git a/packages/hasura/test/utils/generateUseManySubscription.spec.ts b/packages/hasura/test/utils/generateUseManySubscription.spec.ts index acf2e8e9ea8e..d58b5fff2f19 100644 --- a/packages/hasura/test/utils/generateUseManySubscription.spec.ts +++ b/packages/hasura/test/utils/generateUseManySubscription.spec.ts @@ -1,4 +1,4 @@ -import { MetaQuery } from "@refinedev/core"; +import type { MetaQuery } from "@refinedev/core"; import { generateUseManySubscription, genereteUseManySubscription, diff --git a/packages/hasura/test/utils/generateUseOneSubscription.spec.ts b/packages/hasura/test/utils/generateUseOneSubscription.spec.ts index ae22aa1f66af..a7d36a26628e 100644 --- a/packages/hasura/test/utils/generateUseOneSubscription.spec.ts +++ b/packages/hasura/test/utils/generateUseOneSubscription.spec.ts @@ -2,7 +2,7 @@ import { generateUseOneSubscription, genereteUseOneSubscription, } from "../../src/utils"; -import { MetaQuery } from "@refinedev/core"; +import type { MetaQuery } from "@refinedev/core"; describe("genereteUseOneSubscription (deprecated)", () => { const resource = "post"; diff --git a/packages/inferencer/src/components/live/index.tsx b/packages/inferencer/src/components/live/index.tsx index 077846981e75..270717181124 100644 --- a/packages/inferencer/src/components/live/index.tsx +++ b/packages/inferencer/src/components/live/index.tsx @@ -2,10 +2,14 @@ import React from "react"; import * as RefineCore from "@refinedev/core"; import * as gql from "graphql-tag"; -import { LivePreview, LiveProvider, ContextProps } from "@aliemir/react-live"; +import { + LivePreview, + LiveProvider, + type ContextProps, +} from "@aliemir/react-live"; import { replaceImports, replaceExports } from "../../utilities"; -import { AdditionalScopeType, LiveComponentProps } from "../../types"; +import type { AdditionalScopeType, LiveComponentProps } from "../../types"; const defaultScope: Array<AdditionalScopeType> = [ ["react", "React", React], diff --git a/packages/inferencer/src/components/shared-code-viewer/index.tsx b/packages/inferencer/src/components/shared-code-viewer/index.tsx index 69e99b448615..92e911e2eefa 100644 --- a/packages/inferencer/src/components/shared-code-viewer/index.tsx +++ b/packages/inferencer/src/components/shared-code-viewer/index.tsx @@ -1,8 +1,8 @@ -import React, { SVGProps } from "react"; +import React, { type SVGProps } from "react"; import Highlight, { defaultProps } from "prism-react-renderer"; import theme from "prism-react-renderer/themes/vsDark"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; import { prettierFormat } from "../../utilities"; export const SharedCodeViewer: CreateInferencerConfig["codeViewerComponent"] = diff --git a/packages/inferencer/src/compose-inferencers/index.ts b/packages/inferencer/src/compose-inferencers/index.ts index 975e65becbf3..bc6cfce018e2 100644 --- a/packages/inferencer/src/compose-inferencers/index.ts +++ b/packages/inferencer/src/compose-inferencers/index.ts @@ -1,4 +1,4 @@ -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; import { pickInferredField } from "../utilities"; /** diff --git a/packages/inferencer/src/compose-transformers/index.ts b/packages/inferencer/src/compose-transformers/index.ts index 5033ef829b34..28aa11e6aae4 100644 --- a/packages/inferencer/src/compose-transformers/index.ts +++ b/packages/inferencer/src/compose-transformers/index.ts @@ -1,4 +1,4 @@ -import { FieldTransformer } from "../types"; +import type { FieldTransformer } from "../types"; /** * Compose multiple field transformers into one diff --git a/packages/inferencer/src/create-inferencer/index.tsx b/packages/inferencer/src/create-inferencer/index.tsx index 4d38a6cc9bd7..87cfeb74437a 100644 --- a/packages/inferencer/src/create-inferencer/index.tsx +++ b/packages/inferencer/src/create-inferencer/index.tsx @@ -1,7 +1,7 @@ import React, { useContext } from "react"; import { useResource, TranslationContext } from "@refinedev/core"; -import { +import type { CreateInferencer, InferencerComponentProps, InferencerResultComponent, diff --git a/packages/inferencer/src/field-inferencers/array.ts b/packages/inferencer/src/field-inferencers/array.ts index 50770a653ed1..2fd6f76c2c10 100644 --- a/packages/inferencer/src/field-inferencers/array.ts +++ b/packages/inferencer/src/field-inferencers/array.ts @@ -1,4 +1,4 @@ -import { FieldInferencer, InferType } from "../types"; +import type { FieldInferencer, InferType } from "../types"; export const arrayInfer: FieldInferencer = ( key, diff --git a/packages/inferencer/src/field-inferencers/boolean.ts b/packages/inferencer/src/field-inferencers/boolean.ts index a1652bc373b2..93ede69bff7a 100644 --- a/packages/inferencer/src/field-inferencers/boolean.ts +++ b/packages/inferencer/src/field-inferencers/boolean.ts @@ -1,4 +1,4 @@ -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; export const booleanInfer: FieldInferencer = (key, value) => { const isBoolean = typeof value === "boolean"; diff --git a/packages/inferencer/src/field-inferencers/date.ts b/packages/inferencer/src/field-inferencers/date.ts index 05b4be1664e5..8c254be8f189 100644 --- a/packages/inferencer/src/field-inferencers/date.ts +++ b/packages/inferencer/src/field-inferencers/date.ts @@ -1,5 +1,5 @@ import dayjs from "dayjs"; -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; const dateSuffixRegexp = /(_at|_on|At|On|AT|ON)(\[\])?$/; diff --git a/packages/inferencer/src/field-inferencers/email.ts b/packages/inferencer/src/field-inferencers/email.ts index 79d5e2132880..2b0538481071 100644 --- a/packages/inferencer/src/field-inferencers/email.ts +++ b/packages/inferencer/src/field-inferencers/email.ts @@ -1,4 +1,4 @@ -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; const emailRegexp = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; diff --git a/packages/inferencer/src/field-inferencers/image.ts b/packages/inferencer/src/field-inferencers/image.ts index d4b752c6207b..61a88d99e0d0 100644 --- a/packages/inferencer/src/field-inferencers/image.ts +++ b/packages/inferencer/src/field-inferencers/image.ts @@ -1,4 +1,4 @@ -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; const imageRegexp = /\.(gif|jpe?g|tiff?|png|webp|bmp|svg)$/i; diff --git a/packages/inferencer/src/field-inferencers/nullish.ts b/packages/inferencer/src/field-inferencers/nullish.ts index f40717bf1981..32449a7959fe 100644 --- a/packages/inferencer/src/field-inferencers/nullish.ts +++ b/packages/inferencer/src/field-inferencers/nullish.ts @@ -1,4 +1,4 @@ -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; export const nullishInfer: FieldInferencer = (key, value) => { const isUndefined = typeof value === "undefined"; diff --git a/packages/inferencer/src/field-inferencers/number.ts b/packages/inferencer/src/field-inferencers/number.ts index 5a4f2f94de43..368b67bd3ab8 100644 --- a/packages/inferencer/src/field-inferencers/number.ts +++ b/packages/inferencer/src/field-inferencers/number.ts @@ -1,4 +1,4 @@ -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; export const numberInfer: FieldInferencer = (key, value) => { const isNonEmptyString = typeof value === "string" && value.length > 0; diff --git a/packages/inferencer/src/field-inferencers/object.ts b/packages/inferencer/src/field-inferencers/object.ts index a5283609fb42..57e2a640d63f 100644 --- a/packages/inferencer/src/field-inferencers/object.ts +++ b/packages/inferencer/src/field-inferencers/object.ts @@ -1,5 +1,5 @@ import { getFieldableKeys } from "../utilities"; -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; const idPropertyRegexp = /id$/i; diff --git a/packages/inferencer/src/field-inferencers/relation.ts b/packages/inferencer/src/field-inferencers/relation.ts index 91bf11d25968..5fbf50597b32 100644 --- a/packages/inferencer/src/field-inferencers/relation.ts +++ b/packages/inferencer/src/field-inferencers/relation.ts @@ -1,4 +1,4 @@ -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; export const relationRegexp = /(-id|-ids|_id|_ids|Id|Ids|ID|IDs)(\[\])?$/; diff --git a/packages/inferencer/src/field-inferencers/richtext.ts b/packages/inferencer/src/field-inferencers/richtext.ts index c95031214a36..a498025e3380 100644 --- a/packages/inferencer/src/field-inferencers/richtext.ts +++ b/packages/inferencer/src/field-inferencers/richtext.ts @@ -1,4 +1,4 @@ -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; export const richtextInfer: FieldInferencer = (key, value) => { const isLongText = typeof value === "string" && value.length > 100; diff --git a/packages/inferencer/src/field-inferencers/text.ts b/packages/inferencer/src/field-inferencers/text.ts index 67af6b545075..2d27871276ed 100644 --- a/packages/inferencer/src/field-inferencers/text.ts +++ b/packages/inferencer/src/field-inferencers/text.ts @@ -1,4 +1,4 @@ -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; export const textInfer: FieldInferencer = (key, value) => { const isText = typeof value === "string"; diff --git a/packages/inferencer/src/field-inferencers/url.ts b/packages/inferencer/src/field-inferencers/url.ts index 794cad149727..e7fad374e816 100644 --- a/packages/inferencer/src/field-inferencers/url.ts +++ b/packages/inferencer/src/field-inferencers/url.ts @@ -1,4 +1,4 @@ -import { FieldInferencer } from "../types"; +import type { FieldInferencer } from "../types"; const urlRegexp = /^(https?|ftp):\/\/(-\.)?([^\s/?\.#-]+\.?)+(\/[^\s]*)?$/i; diff --git a/packages/inferencer/src/field-transformers/basic-to-relation.ts b/packages/inferencer/src/field-transformers/basic-to-relation.ts index 6af3a8214014..5b39f3caffaa 100644 --- a/packages/inferencer/src/field-transformers/basic-to-relation.ts +++ b/packages/inferencer/src/field-transformers/basic-to-relation.ts @@ -1,4 +1,4 @@ -import { FieldTransformer, InferField } from "../types"; +import type { FieldTransformer, InferField } from "../types"; export const basicToRelation: FieldTransformer = ( fields, diff --git a/packages/inferencer/src/field-transformers/image-by-key.ts b/packages/inferencer/src/field-transformers/image-by-key.ts index d72c35eccfd2..ecdbbeb42e7f 100644 --- a/packages/inferencer/src/field-transformers/image-by-key.ts +++ b/packages/inferencer/src/field-transformers/image-by-key.ts @@ -1,4 +1,4 @@ -import { FieldTransformer, InferField } from "../types"; +import type { FieldTransformer, InferField } from "../types"; const imageFieldLikeRegexp = /(image|photo|avatar|cover|thumbnail|icon)/i; diff --git a/packages/inferencer/src/field-transformers/relation-by-resource.ts b/packages/inferencer/src/field-transformers/relation-by-resource.ts index 6b577ad64902..ac9048fb6712 100644 --- a/packages/inferencer/src/field-transformers/relation-by-resource.ts +++ b/packages/inferencer/src/field-transformers/relation-by-resource.ts @@ -1,5 +1,5 @@ import { resourceFromInferred } from "../utilities"; -import { FieldTransformer, InferField } from "../types"; +import type { FieldTransformer, InferField } from "../types"; export const relationByResource: FieldTransformer = ( fields, diff --git a/packages/inferencer/src/field-transformers/relation-to-fieldable.ts b/packages/inferencer/src/field-transformers/relation-to-fieldable.ts index b1ae2017abd1..ffcf6efccc07 100644 --- a/packages/inferencer/src/field-transformers/relation-to-fieldable.ts +++ b/packages/inferencer/src/field-transformers/relation-to-fieldable.ts @@ -1,4 +1,4 @@ -import { FieldTransformer, InferField } from "../types"; +import type { FieldTransformer, InferField } from "../types"; export const relationToFieldable: FieldTransformer = ( fields, diff --git a/packages/inferencer/src/inferencers/antd/code-viewer.tsx b/packages/inferencer/src/inferencers/antd/code-viewer.tsx index 2b9f4a1e7b7f..b5dd8110dc47 100644 --- a/packages/inferencer/src/inferencers/antd/code-viewer.tsx +++ b/packages/inferencer/src/inferencers/antd/code-viewer.tsx @@ -3,7 +3,7 @@ import * as Icons from "@ant-design/icons"; import { Button, Modal, Space } from "antd"; import { prettierFormat } from "../../utilities"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; import { CodeHighlight } from "../../components"; /** diff --git a/packages/inferencer/src/inferencers/antd/create.tsx b/packages/inferencer/src/inferencers/antd/create.tsx index 50de27360512..d40332ffa995 100644 --- a/packages/inferencer/src/inferencers/antd/create.tsx +++ b/packages/inferencer/src/inferencers/antd/create.tsx @@ -23,7 +23,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/antd/edit.tsx b/packages/inferencer/src/inferencers/antd/edit.tsx index 456b498e944b..c1073ac92d6b 100644 --- a/packages/inferencer/src/inferencers/antd/edit.tsx +++ b/packages/inferencer/src/inferencers/antd/edit.tsx @@ -23,7 +23,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/antd/error.tsx b/packages/inferencer/src/inferencers/antd/error.tsx index ec07e3ec46e3..41c0a2fdca3c 100644 --- a/packages/inferencer/src/inferencers/antd/error.tsx +++ b/packages/inferencer/src/inferencers/antd/error.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Alert, Row, Col } from "antd"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; export const ErrorComponent: CreateInferencerConfig["errorComponent"] = ({ error, diff --git a/packages/inferencer/src/inferencers/antd/list.tsx b/packages/inferencer/src/inferencers/antd/list.tsx index e9b951870991..658d9703ff45 100644 --- a/packages/inferencer/src/inferencers/antd/list.tsx +++ b/packages/inferencer/src/inferencers/antd/list.tsx @@ -31,7 +31,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/antd/loading.tsx b/packages/inferencer/src/inferencers/antd/loading.tsx index cddc4ac84055..0fc83e498393 100644 --- a/packages/inferencer/src/inferencers/antd/loading.tsx +++ b/packages/inferencer/src/inferencers/antd/loading.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Spin, Row, Col } from "antd"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; export const LoadingComponent: CreateInferencerConfig["loadingComponent"] = () => { diff --git a/packages/inferencer/src/inferencers/antd/show.tsx b/packages/inferencer/src/inferencers/antd/show.tsx index 45c456086021..78bfaf263608 100644 --- a/packages/inferencer/src/inferencers/antd/show.tsx +++ b/packages/inferencer/src/inferencers/antd/show.tsx @@ -31,7 +31,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/chakra-ui/code-viewer.tsx b/packages/inferencer/src/inferencers/chakra-ui/code-viewer.tsx index 2201128814ac..b0e6ff681110 100644 --- a/packages/inferencer/src/inferencers/chakra-ui/code-viewer.tsx +++ b/packages/inferencer/src/inferencers/chakra-ui/code-viewer.tsx @@ -18,7 +18,7 @@ import { } from "@tabler/icons-react"; import { prettierFormat } from "../../utilities"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; import { CodeHighlight } from "../../components"; /** diff --git a/packages/inferencer/src/inferencers/chakra-ui/create.tsx b/packages/inferencer/src/inferencers/chakra-ui/create.tsx index 3e86a42efc4d..172ecdfcc386 100644 --- a/packages/inferencer/src/inferencers/chakra-ui/create.tsx +++ b/packages/inferencer/src/inferencers/chakra-ui/create.tsx @@ -30,7 +30,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/chakra-ui/edit.tsx b/packages/inferencer/src/inferencers/chakra-ui/edit.tsx index b682c4ec1f06..b4b403f0b9fd 100644 --- a/packages/inferencer/src/inferencers/chakra-ui/edit.tsx +++ b/packages/inferencer/src/inferencers/chakra-ui/edit.tsx @@ -31,7 +31,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/chakra-ui/error.tsx b/packages/inferencer/src/inferencers/chakra-ui/error.tsx index 0c2e0fc39b1c..b1286da19beb 100644 --- a/packages/inferencer/src/inferencers/chakra-ui/error.tsx +++ b/packages/inferencer/src/inferencers/chakra-ui/error.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Center, Alert, AlertIcon, AlertDescription } from "@chakra-ui/react"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; export const ErrorComponent: CreateInferencerConfig["errorComponent"] = ({ error, diff --git a/packages/inferencer/src/inferencers/chakra-ui/list.tsx b/packages/inferencer/src/inferencers/chakra-ui/list.tsx index 01ab8443af6e..e4ffb3998288 100644 --- a/packages/inferencer/src/inferencers/chakra-ui/list.tsx +++ b/packages/inferencer/src/inferencers/chakra-ui/list.tsx @@ -47,7 +47,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { ImportElement, InferencerResultComponent, InferField, diff --git a/packages/inferencer/src/inferencers/chakra-ui/loading.tsx b/packages/inferencer/src/inferencers/chakra-ui/loading.tsx index 15535e583392..6cb439ec17e3 100644 --- a/packages/inferencer/src/inferencers/chakra-ui/loading.tsx +++ b/packages/inferencer/src/inferencers/chakra-ui/loading.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Box, Spinner } from "@chakra-ui/react"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; export const LoadingComponent: CreateInferencerConfig["loadingComponent"] = () => { diff --git a/packages/inferencer/src/inferencers/chakra-ui/show.tsx b/packages/inferencer/src/inferencers/chakra-ui/show.tsx index 58f5582644af..7c51b0cfeaf0 100644 --- a/packages/inferencer/src/inferencers/chakra-ui/show.tsx +++ b/packages/inferencer/src/inferencers/chakra-ui/show.tsx @@ -29,7 +29,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { ImportElement, InferencerResultComponent, InferField, diff --git a/packages/inferencer/src/inferencers/headless/code-viewer.tsx b/packages/inferencer/src/inferencers/headless/code-viewer.tsx index 42f0da2078d0..016a0c1e6685 100644 --- a/packages/inferencer/src/inferencers/headless/code-viewer.tsx +++ b/packages/inferencer/src/inferencers/headless/code-viewer.tsx @@ -7,7 +7,7 @@ import { } from "@tabler/icons-react"; import { prettierFormat } from "../../utilities"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; import { CodeHighlight } from "../../components"; type ModalProps = { diff --git a/packages/inferencer/src/inferencers/headless/create.tsx b/packages/inferencer/src/inferencers/headless/create.tsx index e398b699c65d..f7392f4fc4ff 100644 --- a/packages/inferencer/src/inferencers/headless/create.tsx +++ b/packages/inferencer/src/inferencers/headless/create.tsx @@ -23,7 +23,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/headless/edit.tsx b/packages/inferencer/src/inferencers/headless/edit.tsx index 9d0388ff3c4f..cf1da9e8500e 100644 --- a/packages/inferencer/src/inferencers/headless/edit.tsx +++ b/packages/inferencer/src/inferencers/headless/edit.tsx @@ -24,7 +24,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/headless/error.tsx b/packages/inferencer/src/inferencers/headless/error.tsx index de7b93a724b9..36350b9d2390 100644 --- a/packages/inferencer/src/inferencers/headless/error.tsx +++ b/packages/inferencer/src/inferencers/headless/error.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; export const ErrorComponent: CreateInferencerConfig["errorComponent"] = ({ error, diff --git a/packages/inferencer/src/inferencers/headless/list.tsx b/packages/inferencer/src/inferencers/headless/list.tsx index cb366c6f6cb0..51f2c9b66d97 100644 --- a/packages/inferencer/src/inferencers/headless/list.tsx +++ b/packages/inferencer/src/inferencers/headless/list.tsx @@ -21,7 +21,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/headless/loading.tsx b/packages/inferencer/src/inferencers/headless/loading.tsx index ac89f9a6c3cd..a3b93e26e142 100644 --- a/packages/inferencer/src/inferencers/headless/loading.tsx +++ b/packages/inferencer/src/inferencers/headless/loading.tsx @@ -1,6 +1,6 @@ import React from "react"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; export const LoadingComponent: CreateInferencerConfig["loadingComponent"] = () => { diff --git a/packages/inferencer/src/inferencers/headless/show.tsx b/packages/inferencer/src/inferencers/headless/show.tsx index 48b0de159ab7..2d210abaedaa 100644 --- a/packages/inferencer/src/inferencers/headless/show.tsx +++ b/packages/inferencer/src/inferencers/headless/show.tsx @@ -18,7 +18,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { ImportElement, InferencerResultComponent, InferField, diff --git a/packages/inferencer/src/inferencers/mantine/code-viewer.tsx b/packages/inferencer/src/inferencers/mantine/code-viewer.tsx index 3167a65cbb61..2356711feb4a 100644 --- a/packages/inferencer/src/inferencers/mantine/code-viewer.tsx +++ b/packages/inferencer/src/inferencers/mantine/code-viewer.tsx @@ -9,7 +9,7 @@ import { } from "@tabler/icons-react"; import { prettierFormat } from "../../utilities"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; import { CodeHighlight } from "../../components"; /** diff --git a/packages/inferencer/src/inferencers/mantine/create.tsx b/packages/inferencer/src/inferencers/mantine/create.tsx index def14e8967f3..5722132a44b3 100644 --- a/packages/inferencer/src/inferencers/mantine/create.tsx +++ b/packages/inferencer/src/inferencers/mantine/create.tsx @@ -27,7 +27,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, RendererContext, diff --git a/packages/inferencer/src/inferencers/mantine/edit.tsx b/packages/inferencer/src/inferencers/mantine/edit.tsx index 09900f8f7495..35a6ec84e638 100644 --- a/packages/inferencer/src/inferencers/mantine/edit.tsx +++ b/packages/inferencer/src/inferencers/mantine/edit.tsx @@ -30,7 +30,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, RendererContext, diff --git a/packages/inferencer/src/inferencers/mantine/error.tsx b/packages/inferencer/src/inferencers/mantine/error.tsx index fe7d9225da6e..4beaa9ea6ac4 100644 --- a/packages/inferencer/src/inferencers/mantine/error.tsx +++ b/packages/inferencer/src/inferencers/mantine/error.tsx @@ -3,7 +3,7 @@ import React from "react"; import { Alert, Center } from "@mantine/core"; import { IconAlertCircle } from "@tabler/icons-react"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; export const ErrorComponent: CreateInferencerConfig["errorComponent"] = ({ error, diff --git a/packages/inferencer/src/inferencers/mantine/list.tsx b/packages/inferencer/src/inferencers/mantine/list.tsx index 43cc4a3ce08c..2fe9504489c6 100644 --- a/packages/inferencer/src/inferencers/mantine/list.tsx +++ b/packages/inferencer/src/inferencers/mantine/list.tsx @@ -32,7 +32,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { ImportElement, InferencerResultComponent, InferField, diff --git a/packages/inferencer/src/inferencers/mantine/loading.tsx b/packages/inferencer/src/inferencers/mantine/loading.tsx index 7d3a9bfe5f79..554a9735509f 100644 --- a/packages/inferencer/src/inferencers/mantine/loading.tsx +++ b/packages/inferencer/src/inferencers/mantine/loading.tsx @@ -2,7 +2,7 @@ import React from "react"; import { LoadingOverlay } from "@mantine/core"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; export const LoadingComponent: CreateInferencerConfig["loadingComponent"] = () => { diff --git a/packages/inferencer/src/inferencers/mantine/show.tsx b/packages/inferencer/src/inferencers/mantine/show.tsx index f2539c893ef1..8edf54bd091a 100644 --- a/packages/inferencer/src/inferencers/mantine/show.tsx +++ b/packages/inferencer/src/inferencers/mantine/show.tsx @@ -30,7 +30,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { ImportElement, InferencerResultComponent, InferField, diff --git a/packages/inferencer/src/inferencers/mui/code-viewer.tsx b/packages/inferencer/src/inferencers/mui/code-viewer.tsx index d67f8c17bc05..f1b0bdfe9c93 100644 --- a/packages/inferencer/src/inferencers/mui/code-viewer.tsx +++ b/packages/inferencer/src/inferencers/mui/code-viewer.tsx @@ -14,7 +14,7 @@ import { } from "@tabler/icons-react"; import { prettierFormat } from "../../utilities"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; import { CodeHighlight } from "../../components"; /** diff --git a/packages/inferencer/src/inferencers/mui/create.tsx b/packages/inferencer/src/inferencers/mui/create.tsx index 0fd579baf0eb..0933b2dbf39a 100644 --- a/packages/inferencer/src/inferencers/mui/create.tsx +++ b/packages/inferencer/src/inferencers/mui/create.tsx @@ -30,7 +30,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/mui/edit.tsx b/packages/inferencer/src/inferencers/mui/edit.tsx index d9a260a31d3d..32272e2fc272 100644 --- a/packages/inferencer/src/inferencers/mui/edit.tsx +++ b/packages/inferencer/src/inferencers/mui/edit.tsx @@ -29,7 +29,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/inferencers/mui/error.tsx b/packages/inferencer/src/inferencers/mui/error.tsx index b5c6dd762fcd..9fac5927798a 100644 --- a/packages/inferencer/src/inferencers/mui/error.tsx +++ b/packages/inferencer/src/inferencers/mui/error.tsx @@ -4,7 +4,7 @@ import Alert from "@mui/material/Alert"; import AlertTitle from "@mui/material/AlertTitle"; import Box from "@mui/material/Box"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; export const ErrorComponent: CreateInferencerConfig["errorComponent"] = ({ error, diff --git a/packages/inferencer/src/inferencers/mui/list.tsx b/packages/inferencer/src/inferencers/mui/list.tsx index d8ecd7b66732..1b4de0c28d48 100644 --- a/packages/inferencer/src/inferencers/mui/list.tsx +++ b/packages/inferencer/src/inferencers/mui/list.tsx @@ -33,7 +33,7 @@ import { SharedCodeViewer } from "../../components/shared-code-viewer"; import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; -import { +import type { ImportElement, InferencerResultComponent, InferField, diff --git a/packages/inferencer/src/inferencers/mui/loading.tsx b/packages/inferencer/src/inferencers/mui/loading.tsx index ca8ab3b5e09f..87696773f4ba 100644 --- a/packages/inferencer/src/inferencers/mui/loading.tsx +++ b/packages/inferencer/src/inferencers/mui/loading.tsx @@ -3,7 +3,7 @@ import React from "react"; import Box from "@mui/material/Box"; import CircularProgress from "@mui/material/CircularProgress"; -import { CreateInferencerConfig } from "../../types"; +import type { CreateInferencerConfig } from "../../types"; export const LoadingComponent: CreateInferencerConfig["loadingComponent"] = () => { diff --git a/packages/inferencer/src/inferencers/mui/show.tsx b/packages/inferencer/src/inferencers/mui/show.tsx index c641130d2140..2f08c70c0bdf 100644 --- a/packages/inferencer/src/inferencers/mui/show.tsx +++ b/packages/inferencer/src/inferencers/mui/show.tsx @@ -31,7 +31,7 @@ import { ErrorComponent } from "./error"; import { LoadingComponent } from "./loading"; import { SharedCodeViewer } from "../../components/shared-code-viewer"; -import { +import type { InferencerResultComponent, InferField, ImportElement, diff --git a/packages/inferencer/src/types/index.ts b/packages/inferencer/src/types/index.ts index b51689aca68e..f415c10c1b78 100644 --- a/packages/inferencer/src/types/index.ts +++ b/packages/inferencer/src/types/index.ts @@ -1,4 +1,4 @@ -import { IResourceItem, DataProvider } from "@refinedev/core"; +import type { IResourceItem, DataProvider } from "@refinedev/core"; import React from "react"; export type InferType = diff --git a/packages/inferencer/src/use-infer-fetch/index.tsx b/packages/inferencer/src/use-infer-fetch/index.tsx index 2c3cb0ba5017..0168f79ce91b 100644 --- a/packages/inferencer/src/use-infer-fetch/index.tsx +++ b/packages/inferencer/src/use-infer-fetch/index.tsx @@ -1,8 +1,8 @@ import React from "react"; -import { useDataProvider, useResource, BaseKey } from "@refinedev/core"; +import { useDataProvider, useResource, type BaseKey } from "@refinedev/core"; import { pickDataProvider, dataProviderFromResource } from "../utilities"; -import { InferencerComponentProps } from "../types"; +import type { InferencerComponentProps } from "../types"; import { pickMeta } from "../utilities/get-meta-props"; /** diff --git a/packages/inferencer/src/use-relation-fetch/index.ts b/packages/inferencer/src/use-relation-fetch/index.ts index 11350141d109..74abb2aa62a1 100644 --- a/packages/inferencer/src/use-relation-fetch/index.ts +++ b/packages/inferencer/src/use-relation-fetch/index.ts @@ -7,7 +7,7 @@ import { toPlural, toSingular, } from "../utilities"; -import { +import type { FieldInferencer, InferField, InferencerComponentProps, diff --git a/packages/inferencer/src/utilities/accessor/index.ts b/packages/inferencer/src/utilities/accessor/index.ts index 64fef229f558..ab2dbcd6d8d2 100644 --- a/packages/inferencer/src/utilities/accessor/index.ts +++ b/packages/inferencer/src/utilities/accessor/index.ts @@ -1,4 +1,4 @@ -import { InferField } from "../../types"; +import type { InferField } from "../../types"; const dotAccessableRegex = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/; diff --git a/packages/inferencer/src/utilities/get-meta-props/index.test.ts b/packages/inferencer/src/utilities/get-meta-props/index.test.ts index b6361ea4d325..f1c0100abd83 100644 --- a/packages/inferencer/src/utilities/get-meta-props/index.test.ts +++ b/packages/inferencer/src/utilities/get-meta-props/index.test.ts @@ -1,6 +1,6 @@ import gql from "graphql-tag"; -import { Action, getMetaProps } from "."; -import { InferencerComponentProps } from "@/types"; +import { type Action, getMetaProps } from "."; +import type { InferencerComponentProps } from "@/types"; // remove all indentation, newlines, empty spaces const getMetaPropsForTest = ( diff --git a/packages/inferencer/src/utilities/get-meta-props/index.ts b/packages/inferencer/src/utilities/get-meta-props/index.ts index 4a57862ea0dc..aba76f4b840e 100644 --- a/packages/inferencer/src/utilities/get-meta-props/index.ts +++ b/packages/inferencer/src/utilities/get-meta-props/index.ts @@ -1,4 +1,4 @@ -import { InferencerComponentProps } from "../../types"; +import type { InferencerComponentProps } from "../../types"; export type Action = keyof NonNullable< InferencerComponentProps["meta"] diff --git a/packages/inferencer/src/utilities/get-option-label/index.ts b/packages/inferencer/src/utilities/get-option-label/index.ts index 9f53cf77e7d2..55c0b5f4d77a 100644 --- a/packages/inferencer/src/utilities/get-option-label/index.ts +++ b/packages/inferencer/src/utilities/get-option-label/index.ts @@ -1,4 +1,4 @@ -import { InferField } from "../../types"; +import type { InferField } from "../../types"; export const getOptionLabel = (field: InferField) => { if (!field.relationInfer) return ""; diff --git a/packages/inferencer/src/utilities/pick-data-provider/index.tsx b/packages/inferencer/src/utilities/pick-data-provider/index.tsx index e61068e778a0..aa177943ce5d 100644 --- a/packages/inferencer/src/utilities/pick-data-provider/index.tsx +++ b/packages/inferencer/src/utilities/pick-data-provider/index.tsx @@ -1,4 +1,4 @@ -import { IResourceItem } from "@refinedev/core"; +import type { IResourceItem } from "@refinedev/core"; import { pickNotDeprecated } from "@refinedev/core"; /** diff --git a/packages/inferencer/src/utilities/pick-inferred-field/index.ts b/packages/inferencer/src/utilities/pick-inferred-field/index.ts index 9bc9e8ccf333..1f7bb49eb9f7 100644 --- a/packages/inferencer/src/utilities/pick-inferred-field/index.ts +++ b/packages/inferencer/src/utilities/pick-inferred-field/index.ts @@ -1,4 +1,4 @@ -import { InferField } from "../../types"; +import type { InferField } from "../../types"; /** * Each field inferencer will run with every property of a record and output a result. diff --git a/packages/inferencer/src/utilities/print-imports/index.test.ts b/packages/inferencer/src/utilities/print-imports/index.test.ts index 4abe1751c156..c0f5b05fdc59 100644 --- a/packages/inferencer/src/utilities/print-imports/index.test.ts +++ b/packages/inferencer/src/utilities/print-imports/index.test.ts @@ -1,4 +1,4 @@ -import { ImportElement } from "@/types"; +import type { ImportElement } from "@/types"; import { printImports } from "."; describe("printImports", () => { diff --git a/packages/inferencer/src/utilities/print-imports/index.ts b/packages/inferencer/src/utilities/print-imports/index.ts index 61f2237cfb83..19eacc7d6cdf 100644 --- a/packages/inferencer/src/utilities/print-imports/index.ts +++ b/packages/inferencer/src/utilities/print-imports/index.ts @@ -1,4 +1,4 @@ -import { ImportElement } from "../../types"; +import type { ImportElement } from "../../types"; export const printImports = (imports: Array<ImportElement>) => { const byModule = imports.reduce( diff --git a/packages/inferencer/src/utilities/resource-from-inferred/index.ts b/packages/inferencer/src/utilities/resource-from-inferred/index.ts index 0f572567270d..808bc0e80c09 100644 --- a/packages/inferencer/src/utilities/resource-from-inferred/index.ts +++ b/packages/inferencer/src/utilities/resource-from-inferred/index.ts @@ -1,7 +1,7 @@ import pluralize from "pluralize"; -import { IResourceItem } from "@refinedev/core"; +import type { IResourceItem } from "@refinedev/core"; -import { InferField } from "../../types"; +import type { InferField } from "../../types"; import { removeRelationSuffix } from "../remove-relation-suffix"; diff --git a/packages/inferencer/src/utilities/translate-action-title/index.test.ts b/packages/inferencer/src/utilities/translate-action-title/index.test.ts index 3fb5bfa15ee5..a6b26bb3ed7f 100644 --- a/packages/inferencer/src/utilities/translate-action-title/index.test.ts +++ b/packages/inferencer/src/utilities/translate-action-title/index.test.ts @@ -1,4 +1,4 @@ -import { IResourceItem } from "@refinedev/core"; +import type { IResourceItem } from "@refinedev/core"; import { translateActionTitle } from "."; import { prettyString } from "../pretty-string"; import { toSingular } from "../to-singular"; diff --git a/packages/inferencer/src/utilities/translate-action-title/index.ts b/packages/inferencer/src/utilities/translate-action-title/index.ts index 3aea2fba2150..c2229d220e20 100644 --- a/packages/inferencer/src/utilities/translate-action-title/index.ts +++ b/packages/inferencer/src/utilities/translate-action-title/index.ts @@ -1,4 +1,4 @@ -import { IResourceItem } from "@refinedev/core"; +import type { IResourceItem } from "@refinedev/core"; import { prettyString } from "../pretty-string"; import { toSingular } from "../to-singular"; import { toPlural } from "../to-plural"; diff --git a/packages/inferencer/src/utilities/translate-pretty-string/index.test.ts b/packages/inferencer/src/utilities/translate-pretty-string/index.test.ts index 122ddcaeee22..ee563ab90bad 100644 --- a/packages/inferencer/src/utilities/translate-pretty-string/index.test.ts +++ b/packages/inferencer/src/utilities/translate-pretty-string/index.test.ts @@ -1,6 +1,6 @@ -import { IResourceItem } from "@refinedev/core"; +import type { IResourceItem } from "@refinedev/core"; import { translatePrettyString } from "."; -import { InferField } from "@/types"; +import type { InferField } from "@/types"; describe("translatePrettyString", () => { const resource: IResourceItem = { diff --git a/packages/inferencer/src/utilities/translate-pretty-string/index.ts b/packages/inferencer/src/utilities/translate-pretty-string/index.ts index 7471f381d160..0f7bbd0eed9f 100644 --- a/packages/inferencer/src/utilities/translate-pretty-string/index.ts +++ b/packages/inferencer/src/utilities/translate-pretty-string/index.ts @@ -1,6 +1,6 @@ -import { IResourceItem } from "@refinedev/core"; +import type { IResourceItem } from "@refinedev/core"; import { prettyString } from "../pretty-string"; -import { InferField } from "../../types"; +import type { InferField } from "../../types"; export const translatePrettyString = (payload: { resource: IResourceItem; diff --git a/packages/inferencer/test/dataMocks.ts b/packages/inferencer/test/dataMocks.ts index e5f0ff11f58d..f063d5b6f66d 100644 --- a/packages/inferencer/test/dataMocks.ts +++ b/packages/inferencer/test/dataMocks.ts @@ -1,4 +1,4 @@ -import { DataProvider } from "@refinedev/core"; +import type { DataProvider } from "@refinedev/core"; import { Link, useLocation, useNavigate, useParams } from "react-router-dom"; /* import { diff --git a/packages/inferencer/test/index.tsx b/packages/inferencer/test/index.tsx index 5cdfb810ad03..e42c4176a225 100644 --- a/packages/inferencer/test/index.tsx +++ b/packages/inferencer/test/index.tsx @@ -3,13 +3,13 @@ import { BrowserRouter } from "react-router-dom"; import { Refine, - I18nProvider, - AccessControlProvider, - LegacyAuthProvider, - DataProvider, - NotificationProvider, - IResourceItem, - AuthProvider, + type I18nProvider, + type AccessControlProvider, + type LegacyAuthProvider, + type DataProvider, + type NotificationProvider, + type IResourceItem, + type AuthProvider, } from "@refinedev/core"; import { MockRouterProvider, MockJSONServer } from "@test"; diff --git a/packages/kbar/src/components/renderResults/index.tsx b/packages/kbar/src/components/renderResults/index.tsx index 60b41ec2eb47..02905b77de44 100644 --- a/packages/kbar/src/components/renderResults/index.tsx +++ b/packages/kbar/src/components/renderResults/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { ActionId, KBarResults, useMatches } from "kbar"; +import { type ActionId, KBarResults, useMatches } from "kbar"; import { ResultItem } from "@components"; diff --git a/packages/kbar/src/components/resultItem/index.tsx b/packages/kbar/src/components/resultItem/index.tsx index 4c4939d9ca75..3ebcc1966a99 100644 --- a/packages/kbar/src/components/resultItem/index.tsx +++ b/packages/kbar/src/components/resultItem/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { ActionImpl, ActionId } from "kbar"; +import type { ActionImpl, ActionId } from "kbar"; interface IResultITemProps { action: ActionImpl; diff --git a/packages/kbar/src/hooks/useRefineKbar/index.spec.tsx b/packages/kbar/src/hooks/useRefineKbar/index.spec.tsx index ca8eda8e11c2..03498214de35 100644 --- a/packages/kbar/src/hooks/useRefineKbar/index.spec.tsx +++ b/packages/kbar/src/hooks/useRefineKbar/index.spec.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { AccessControlProvider, IResourceItem } from "@refinedev/core"; +import type { AccessControlProvider, IResourceItem } from "@refinedev/core"; import { Route, Routes } from "react-router-dom"; import { act, TestWrapper, renderHook } from "@test"; diff --git a/packages/kbar/src/hooks/useRefineKbar/index.tsx b/packages/kbar/src/hooks/useRefineKbar/index.tsx index cdaaa8258214..197567b1a444 100644 --- a/packages/kbar/src/hooks/useRefineKbar/index.tsx +++ b/packages/kbar/src/hooks/useRefineKbar/index.tsx @@ -4,7 +4,7 @@ import { useDelete, useTranslate, useResource, - IResourceItem, + type IResourceItem, useCanWithoutCache, useUserFriendlyName, useRouterType, @@ -13,7 +13,7 @@ import { import { useRegisterActions, createAction, - Action, + type Action, KBarContext, VisualState, } from "kbar"; diff --git a/packages/kbar/src/index.tsx b/packages/kbar/src/index.tsx index ffb084505e67..b2724e425d7d 100644 --- a/packages/kbar/src/index.tsx +++ b/packages/kbar/src/index.tsx @@ -1,7 +1,7 @@ import React, { createContext } from "react"; -import { KBarProvider, KBarProviderProps } from "kbar"; +import { KBarProvider, type KBarProviderProps } from "kbar"; -import { CommandBar } from "./components/index.js"; +import type { CommandBar } from "./components/index.js"; interface IKBarProviderProps extends KBarProviderProps { commandBarProps?: React.ComponentProps<typeof CommandBar>; diff --git a/packages/kbar/test/index.tsx b/packages/kbar/test/index.tsx index 22992375e33e..fa3eed2474ba 100644 --- a/packages/kbar/test/index.tsx +++ b/packages/kbar/test/index.tsx @@ -1,10 +1,10 @@ import React from "react"; import { BrowserRouter } from "react-router-dom"; -import { AuthProvider, Refine } from "@refinedev/core"; +import { type AuthProvider, Refine } from "@refinedev/core"; import { MockRouterProvider, MockJSONServer } from "@test"; -import { +import type { I18nProvider, AccessControlProvider, LegacyAuthProvider, diff --git a/packages/mantine/src/components/autoSaveIndicator/index.tsx b/packages/mantine/src/components/autoSaveIndicator/index.tsx index be8bd4fc7972..036c64227408 100644 --- a/packages/mantine/src/components/autoSaveIndicator/index.tsx +++ b/packages/mantine/src/components/autoSaveIndicator/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - AutoSaveIndicatorProps, + type AutoSaveIndicatorProps, useTranslate, AutoSaveIndicator as AutoSaveIndicatorCore, } from "@refinedev/core"; diff --git a/packages/mantine/src/components/breadcrumb/index.spec.tsx b/packages/mantine/src/components/breadcrumb/index.spec.tsx index cd4c26f61fd7..602b7438cd38 100644 --- a/packages/mantine/src/components/breadcrumb/index.spec.tsx +++ b/packages/mantine/src/components/breadcrumb/index.spec.tsx @@ -1,10 +1,10 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { Route, Routes } from "react-router-dom"; import { render, TestWrapper, - ITestWrapperProps, + type ITestWrapperProps, act, MockLegacyRouterProvider, } from "@test"; diff --git a/packages/mantine/src/components/breadcrumb/index.tsx b/packages/mantine/src/components/breadcrumb/index.tsx index 336c5f740348..e7d6f2469723 100644 --- a/packages/mantine/src/components/breadcrumb/index.tsx +++ b/packages/mantine/src/components/breadcrumb/index.tsx @@ -8,12 +8,12 @@ import { useRouterContext, useRouterType, } from "@refinedev/core"; -import { RefineBreadcrumbProps } from "@refinedev/ui-types"; +import type { RefineBreadcrumbProps } from "@refinedev/ui-types"; import { Text, Breadcrumbs, - BreadcrumbsProps as MantineBreadcrumbProps, + type BreadcrumbsProps as MantineBreadcrumbProps, Anchor, Group, } from "@mantine/core"; diff --git a/packages/mantine/src/components/buttons/clone/index.tsx b/packages/mantine/src/components/buttons/clone/index.tsx index 28d2f9d6d601..f2a6121a62a9 100644 --- a/packages/mantine/src/components/buttons/clone/index.tsx +++ b/packages/mantine/src/components/buttons/clone/index.tsx @@ -8,7 +8,7 @@ import { ActionIcon, Anchor, Button } from "@mantine/core"; import { IconSquarePlus } from "@tabler/icons-react"; import { mapButtonVariantToActionIconVariant } from "@definitions/button"; -import { CloneButtonProps } from "../types"; +import type { CloneButtonProps } from "../types"; /** * `<CloneButton>` uses Mantine {@link https://mantine.dev/core/button `<Button> component`}. diff --git a/packages/mantine/src/components/buttons/create/index.tsx b/packages/mantine/src/components/buttons/create/index.tsx index 200c9dc57df8..687355fc7b72 100644 --- a/packages/mantine/src/components/buttons/create/index.tsx +++ b/packages/mantine/src/components/buttons/create/index.tsx @@ -8,7 +8,7 @@ import { ActionIcon, Anchor, Button } from "@mantine/core"; import { IconSquarePlus } from "@tabler/icons-react"; import { mapButtonVariantToActionIconVariant } from "@definitions/button"; -import { CreateButtonProps } from "../types"; +import type { CreateButtonProps } from "../types"; export const CreateButton: React.FC<CreateButtonProps> = ({ resource: resourceNameFromProps, diff --git a/packages/mantine/src/components/buttons/delete/index.tsx b/packages/mantine/src/components/buttons/delete/index.tsx index 13f865340474..31a8868ad973 100644 --- a/packages/mantine/src/components/buttons/delete/index.tsx +++ b/packages/mantine/src/components/buttons/delete/index.tsx @@ -8,7 +8,7 @@ import { Group, Text, Button, Popover, ActionIcon } from "@mantine/core"; import { IconTrash } from "@tabler/icons-react"; import { mapButtonVariantToActionIconVariant } from "@definitions/button"; -import { DeleteButtonProps } from "../types"; +import type { DeleteButtonProps } from "../types"; /** * `<DeleteButton>` uses Mantine {@link https://mantine.dev/core/button `<Button>`} and {@link https://mantine.dev/core/modal `<Modal>`} components. diff --git a/packages/mantine/src/components/buttons/edit/index.tsx b/packages/mantine/src/components/buttons/edit/index.tsx index 7d5184aa34da..5aaeb1811f0c 100644 --- a/packages/mantine/src/components/buttons/edit/index.tsx +++ b/packages/mantine/src/components/buttons/edit/index.tsx @@ -8,7 +8,7 @@ import { ActionIcon, Anchor, Button } from "@mantine/core"; import { IconPencil } from "@tabler/icons-react"; import { mapButtonVariantToActionIconVariant } from "@definitions/button"; -import { EditButtonProps } from "../types"; +import type { EditButtonProps } from "../types"; /** * `<EditButton>` uses Mantine {@link https://mantine.dev/core/button `<Button> component`}. diff --git a/packages/mantine/src/components/buttons/export/index.tsx b/packages/mantine/src/components/buttons/export/index.tsx index fa894558106d..3a80d7daa0e6 100644 --- a/packages/mantine/src/components/buttons/export/index.tsx +++ b/packages/mantine/src/components/buttons/export/index.tsx @@ -8,7 +8,7 @@ import { ActionIcon, Button } from "@mantine/core"; import { IconFileExport } from "@tabler/icons-react"; import { mapButtonVariantToActionIconVariant } from "@definitions/button"; -import { ExportButtonProps } from "../types"; +import type { ExportButtonProps } from "../types"; /** * `<ExportButton>` uses Mantine {@link https://mantine.dev/core/button `<Button> `} component with a default export icon and a default text with "Export". diff --git a/packages/mantine/src/components/buttons/import/index.tsx b/packages/mantine/src/components/buttons/import/index.tsx index 634e53109a53..0f482f196c2e 100644 --- a/packages/mantine/src/components/buttons/import/index.tsx +++ b/packages/mantine/src/components/buttons/import/index.tsx @@ -8,7 +8,7 @@ import { ActionIcon, Button } from "@mantine/core"; import { IconFileImport } from "@tabler/icons-react"; import { mapButtonVariantToActionIconVariant } from "@definitions/button"; -import { ImportButtonProps } from "../types"; +import type { ImportButtonProps } from "../types"; /** * `<ImportButton>` is compatible with the {@link https://refine.dev/docs/api-reference/core/hooks/import-export/useImport/ `useImport`} core hook. diff --git a/packages/mantine/src/components/buttons/list/index.tsx b/packages/mantine/src/components/buttons/list/index.tsx index c79d80054202..ad31d58e7c2a 100644 --- a/packages/mantine/src/components/buttons/list/index.tsx +++ b/packages/mantine/src/components/buttons/list/index.tsx @@ -8,7 +8,7 @@ import { ActionIcon, Anchor, Button } from "@mantine/core"; import { IconList } from "@tabler/icons-react"; import { mapButtonVariantToActionIconVariant } from "@definitions/button"; -import { ListButtonProps } from "../types"; +import type { ListButtonProps } from "../types"; /** * `<ListButton>` is using uses Mantine {@link https://mantine.dev/core/button `<Button> `} component. diff --git a/packages/mantine/src/components/buttons/refresh/index.tsx b/packages/mantine/src/components/buttons/refresh/index.tsx index 76d6479a3716..4be6daecfa2b 100644 --- a/packages/mantine/src/components/buttons/refresh/index.tsx +++ b/packages/mantine/src/components/buttons/refresh/index.tsx @@ -8,7 +8,7 @@ import { ActionIcon, Button } from "@mantine/core"; import { IconRefresh } from "@tabler/icons-react"; import { mapButtonVariantToActionIconVariant } from "@definitions/button"; -import { RefreshButtonProps } from "../types"; +import type { RefreshButtonProps } from "../types"; /** * `<RefreshButton>` uses Mantine {@link https://mantine.dev/core/button `<Button> `} component. diff --git a/packages/mantine/src/components/buttons/save/index.tsx b/packages/mantine/src/components/buttons/save/index.tsx index f142a2b7f0e3..ae06f57dae60 100644 --- a/packages/mantine/src/components/buttons/save/index.tsx +++ b/packages/mantine/src/components/buttons/save/index.tsx @@ -8,7 +8,7 @@ import { ActionIcon, Button } from "@mantine/core"; import { IconDeviceFloppy } from "@tabler/icons-react"; import { mapButtonVariantToActionIconVariant } from "@definitions/button"; -import { SaveButtonProps } from "../types"; +import type { SaveButtonProps } from "../types"; /** * `<SaveButton>` uses Mantine {@link https://mantine.dev/core/button `<Button> `}. diff --git a/packages/mantine/src/components/buttons/show/index.tsx b/packages/mantine/src/components/buttons/show/index.tsx index 968f816cfdb4..b39a02a0c570 100644 --- a/packages/mantine/src/components/buttons/show/index.tsx +++ b/packages/mantine/src/components/buttons/show/index.tsx @@ -8,7 +8,7 @@ import { ActionIcon, Anchor, Button } from "@mantine/core"; import { IconEye } from "@tabler/icons-react"; import { mapButtonVariantToActionIconVariant } from "@definitions/button"; -import { ShowButtonProps } from "../types"; +import type { ShowButtonProps } from "../types"; /** * `<ShowButton>` uses Mantine {@link https://mantine.dev/core/button `<Button> `} component. diff --git a/packages/mantine/src/components/buttons/types.ts b/packages/mantine/src/components/buttons/types.ts index e388e6e58e7d..112b94d5878f 100644 --- a/packages/mantine/src/components/buttons/types.ts +++ b/packages/mantine/src/components/buttons/types.ts @@ -1,6 +1,6 @@ -import { ButtonProps } from "@mantine/core"; -import { UseImportInputPropsType } from "@refinedev/core"; -import { +import type { ButtonProps } from "@mantine/core"; +import type { UseImportInputPropsType } from "@refinedev/core"; +import type { RefineCloneButtonProps, RefineCreateButtonProps, RefineDeleteButtonProps, @@ -12,7 +12,7 @@ import { RefineSaveButtonProps, RefineShowButtonProps, } from "@refinedev/ui-types"; -import { IconProps } from "@tabler/icons-react"; +import type { IconProps } from "@tabler/icons-react"; export type ShowButtonProps = RefineShowButtonProps< ButtonProps, diff --git a/packages/mantine/src/components/crud/create/index.spec.tsx b/packages/mantine/src/components/crud/create/index.spec.tsx index 4291cba1535d..66af3a8dc44a 100644 --- a/packages/mantine/src/components/crud/create/index.spec.tsx +++ b/packages/mantine/src/components/crud/create/index.spec.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { Route, Routes } from "react-router-dom"; diff --git a/packages/mantine/src/components/crud/create/index.tsx b/packages/mantine/src/components/crud/create/index.tsx index 18a35780274b..5a5ce72f475e 100644 --- a/packages/mantine/src/components/crud/create/index.tsx +++ b/packages/mantine/src/components/crud/create/index.tsx @@ -18,8 +18,8 @@ import { useTranslate, } from "@refinedev/core"; import { IconArrowLeft } from "@tabler/icons-react"; -import { SaveButton, Breadcrumb, SaveButtonProps } from "@components"; -import { CreateProps } from "../types"; +import { SaveButton, Breadcrumb, type SaveButtonProps } from "@components"; +import type { CreateProps } from "../types"; import { RefinePageHeaderClassNames } from "@refinedev/ui-types"; export const Create: React.FC<CreateProps> = (props) => { diff --git a/packages/mantine/src/components/crud/edit/index.spec.tsx b/packages/mantine/src/components/crud/edit/index.spec.tsx index 74246c69e669..bfc66ac8ca05 100644 --- a/packages/mantine/src/components/crud/edit/index.spec.tsx +++ b/packages/mantine/src/components/crud/edit/index.spec.tsx @@ -1,12 +1,12 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { Route, Routes } from "react-router-dom"; -import { AccessControlProvider } from "@refinedev/core"; +import type { AccessControlProvider } from "@refinedev/core"; import { MockLegacyRouterProvider, act, fireEvent, - ITestWrapperProps, + type ITestWrapperProps, MockJSONServer, render, TestWrapper, diff --git a/packages/mantine/src/components/crud/edit/index.tsx b/packages/mantine/src/components/crud/edit/index.tsx index b647173a0ebf..cc50c9600a16 100644 --- a/packages/mantine/src/components/crud/edit/index.tsx +++ b/packages/mantine/src/components/crud/edit/index.tsx @@ -27,13 +27,13 @@ import { RefreshButton, SaveButton, Breadcrumb, - ListButtonProps, - RefreshButtonProps, - DeleteButtonProps, - SaveButtonProps, + type ListButtonProps, + type RefreshButtonProps, + type DeleteButtonProps, + type SaveButtonProps, AutoSaveIndicator, } from "@components"; -import { EditProps } from "../types"; +import type { EditProps } from "../types"; import { RefinePageHeaderClassNames } from "@refinedev/ui-types"; export const Edit: React.FC<EditProps> = (props) => { diff --git a/packages/mantine/src/components/crud/list/index.spec.tsx b/packages/mantine/src/components/crud/list/index.spec.tsx index 1f7c963649c2..07256ac324de 100644 --- a/packages/mantine/src/components/crud/list/index.spec.tsx +++ b/packages/mantine/src/components/crud/list/index.spec.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { crudListTests } from "@refinedev/ui-tests"; import { RefineButtonTestIds } from "@refinedev/ui-types"; import { Route, Routes } from "react-router-dom"; diff --git a/packages/mantine/src/components/crud/list/index.tsx b/packages/mantine/src/components/crud/list/index.tsx index 18b5a57f388c..06812a6b8aa2 100644 --- a/packages/mantine/src/components/crud/list/index.tsx +++ b/packages/mantine/src/components/crud/list/index.tsx @@ -8,8 +8,8 @@ import { useTranslate, } from "@refinedev/core"; -import { CreateButton, Breadcrumb, CreateButtonProps } from "@components"; -import { ListProps } from "../types"; +import { CreateButton, Breadcrumb, type CreateButtonProps } from "@components"; +import type { ListProps } from "../types"; import { RefinePageHeaderClassNames } from "@refinedev/ui-types"; export const List: React.FC<ListProps> = (props) => { diff --git a/packages/mantine/src/components/crud/show/index.spec.tsx b/packages/mantine/src/components/crud/show/index.spec.tsx index 2a7c07e396cc..415a15d350db 100644 --- a/packages/mantine/src/components/crud/show/index.spec.tsx +++ b/packages/mantine/src/components/crud/show/index.spec.tsx @@ -1,6 +1,6 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { Route, Routes } from "react-router-dom"; -import { AccessControlProvider } from "@refinedev/core"; +import type { AccessControlProvider } from "@refinedev/core"; import { crudShowTests } from "@refinedev/ui-tests"; import { MockLegacyRouterProvider, render, TestWrapper, waitFor } from "@test"; diff --git a/packages/mantine/src/components/crud/show/index.tsx b/packages/mantine/src/components/crud/show/index.tsx index 50ad0075660f..2fbc5525c8e5 100644 --- a/packages/mantine/src/components/crud/show/index.tsx +++ b/packages/mantine/src/components/crud/show/index.tsx @@ -27,12 +27,12 @@ import { ListButton, RefreshButton, Breadcrumb, - ListButtonProps, - EditButtonProps, - DeleteButtonProps, - RefreshButtonProps, + type ListButtonProps, + type EditButtonProps, + type DeleteButtonProps, + type RefreshButtonProps, } from "@components"; -import { ShowProps } from "../types"; +import type { ShowProps } from "../types"; import { RefinePageHeaderClassNames } from "@refinedev/ui-types"; export const Show: React.FC<ShowProps> = (props) => { diff --git a/packages/mantine/src/components/crud/types.ts b/packages/mantine/src/components/crud/types.ts index 5362c9e0ca64..5b28f108f90c 100644 --- a/packages/mantine/src/components/crud/types.ts +++ b/packages/mantine/src/components/crud/types.ts @@ -1,4 +1,4 @@ -import { +import type { CreateButtonProps, DeleteButtonProps, EditButtonProps, @@ -6,8 +6,8 @@ import { RefreshButtonProps, SaveButtonProps, } from "../buttons/types"; -import { BoxProps, CardProps, GroupProps } from "@mantine/core"; -import { +import type { BoxProps, CardProps, GroupProps } from "@mantine/core"; +import type { RefineCrudCreateProps, RefineCrudEditProps, RefineCrudListProps, diff --git a/packages/mantine/src/components/fields/boolean/index.tsx b/packages/mantine/src/components/fields/boolean/index.tsx index fe5c9d29d9a0..4df49f8c4e56 100644 --- a/packages/mantine/src/components/fields/boolean/index.tsx +++ b/packages/mantine/src/components/fields/boolean/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Tooltip } from "@mantine/core"; import { IconX, IconCheck } from "@tabler/icons-react"; -import { BooleanFieldProps } from "../types"; +import type { BooleanFieldProps } from "../types"; /** * This field is used to display boolean values. It uses the {@link https://mantine.dev/core/tooltip `<Tooltip>`} values from Mantine. diff --git a/packages/mantine/src/components/fields/date/index.tsx b/packages/mantine/src/components/fields/date/index.tsx index cebd18a33cc0..8c634683808b 100644 --- a/packages/mantine/src/components/fields/date/index.tsx +++ b/packages/mantine/src/components/fields/date/index.tsx @@ -9,7 +9,7 @@ dayjs.extend(LocalizedFormat); const defaultLocale = dayjs.locale(); -import { DateFieldProps } from "../types"; +import type { DateFieldProps } from "../types"; /** * This field is used to display dates. It uses {@link https://day.js.org/docs/en/display/format `Day.js`} to display date format and diff --git a/packages/mantine/src/components/fields/email/index.tsx b/packages/mantine/src/components/fields/email/index.tsx index f75d413bd008..fbb5ccc3674c 100644 --- a/packages/mantine/src/components/fields/email/index.tsx +++ b/packages/mantine/src/components/fields/email/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Anchor } from "@mantine/core"; -import { EmailFieldProps } from "../types"; +import type { EmailFieldProps } from "../types"; /** * This field is used to display email values. It uses the {@link https://mantine.dev/core/text `<Text>` } diff --git a/packages/mantine/src/components/fields/file/index.tsx b/packages/mantine/src/components/fields/file/index.tsx index 887d7e5ed558..c5d2206602bd 100644 --- a/packages/mantine/src/components/fields/file/index.tsx +++ b/packages/mantine/src/components/fields/file/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import { UrlField } from "@components"; -import { FileFieldProps } from "../types"; +import type { FileFieldProps } from "../types"; export const FileField: React.FC<FileFieldProps> = ({ title, diff --git a/packages/mantine/src/components/fields/markdown/index.tsx b/packages/mantine/src/components/fields/markdown/index.tsx index 278710344843..d99fd5090746 100644 --- a/packages/mantine/src/components/fields/markdown/index.tsx +++ b/packages/mantine/src/components/fields/markdown/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import ReactMarkdown from "react-markdown"; import gfm from "remark-gfm"; -import { MarkdownFieldProps } from "../types"; +import type { MarkdownFieldProps } from "../types"; /** * This field lets you display markdown content. It supports {@link https://github.github.com/gfm/ GitHub Flavored Markdown}. diff --git a/packages/mantine/src/components/fields/number/index.tsx b/packages/mantine/src/components/fields/number/index.tsx index b6116a507d04..f79e11c6028f 100644 --- a/packages/mantine/src/components/fields/number/index.tsx +++ b/packages/mantine/src/components/fields/number/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Text } from "@mantine/core"; -import { NumberFieldProps } from "../types"; +import type { NumberFieldProps } from "../types"; function toLocaleStringSupportsOptions() { return !!( diff --git a/packages/mantine/src/components/fields/tag/index.tsx b/packages/mantine/src/components/fields/tag/index.tsx index 93d99be05647..ebb0e973dc85 100644 --- a/packages/mantine/src/components/fields/tag/index.tsx +++ b/packages/mantine/src/components/fields/tag/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Chip } from "@mantine/core"; -import { TagFieldProps } from "../types"; +import type { TagFieldProps } from "../types"; /** * This field lets you display a value in a tag. It uses Mantine {@link https://mantine.dev/core/chip `<Chip>`} component. diff --git a/packages/mantine/src/components/fields/text/index.tsx b/packages/mantine/src/components/fields/text/index.tsx index ce4d02eba35f..ad85a1a50284 100644 --- a/packages/mantine/src/components/fields/text/index.tsx +++ b/packages/mantine/src/components/fields/text/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Text } from "@mantine/core"; -import { TextFieldProps } from "../types"; +import type { TextFieldProps } from "../types"; /** * This field lets you show basic text. It uses Mantine {@link https://mantine.dev/core/text `<Text>`} component. diff --git a/packages/mantine/src/components/fields/types.ts b/packages/mantine/src/components/fields/types.ts index ccbe16be7367..603e1e0d6c10 100644 --- a/packages/mantine/src/components/fields/types.ts +++ b/packages/mantine/src/components/fields/types.ts @@ -1,6 +1,11 @@ -import { ReactChild, ReactNode } from "react"; -import { AnchorProps, ChipProps, TextProps, TooltipProps } from "@mantine/core"; -import { +import type { ReactChild, ReactNode } from "react"; +import type { + AnchorProps, + ChipProps, + TextProps, + TooltipProps, +} from "@mantine/core"; +import type { RefineFieldBooleanProps, RefineFieldDateProps, RefineFieldEmailProps, @@ -11,9 +16,9 @@ import { RefineFieldTextProps, RefineFieldUrlProps, } from "@refinedev/ui-types"; -import { IconProps } from "@tabler/icons-react"; -import { ConfigType } from "dayjs"; -import { ReactMarkdownOptions } from "react-markdown"; +import type { IconProps } from "@tabler/icons-react"; +import type { ConfigType } from "dayjs"; +import type { ReactMarkdownOptions } from "react-markdown"; export type BooleanFieldProps = RefineFieldBooleanProps< unknown, diff --git a/packages/mantine/src/components/fields/url/index.tsx b/packages/mantine/src/components/fields/url/index.tsx index bfca23995219..f3745d8a7ee6 100644 --- a/packages/mantine/src/components/fields/url/index.tsx +++ b/packages/mantine/src/components/fields/url/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Anchor } from "@mantine/core"; -import { UrlFieldProps } from "../types"; +import type { UrlFieldProps } from "../types"; /** * This field is used to display email values. It uses the {@link https://mantine.dev/core/text `<Text>` } diff --git a/packages/mantine/src/components/layout/header/index.tsx b/packages/mantine/src/components/layout/header/index.tsx index 83c9d55b7264..9574fa29ea8c 100644 --- a/packages/mantine/src/components/layout/header/index.tsx +++ b/packages/mantine/src/components/layout/header/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import { useGetIdentity, useActiveAuthProvider } from "@refinedev/core"; import { Avatar, Group, Header as MantineHeader, Title } from "@mantine/core"; -import { RefineLayoutHeaderProps } from "../types"; +import type { RefineLayoutHeaderProps } from "../types"; export const Header: React.FC<RefineLayoutHeaderProps> = () => { const authProvider = useActiveAuthProvider(); diff --git a/packages/mantine/src/components/layout/index.tsx b/packages/mantine/src/components/layout/index.tsx index 759702f02a21..bdc19afd91e6 100644 --- a/packages/mantine/src/components/layout/index.tsx +++ b/packages/mantine/src/components/layout/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Box } from "@mantine/core"; -import { RefineLayoutLayoutProps } from "./types"; +import type { RefineLayoutLayoutProps } from "./types"; import { Sider as DefaultSider } from "./sider"; import { Header as DefaultHeader } from "./header"; diff --git a/packages/mantine/src/components/layout/sider/index.tsx b/packages/mantine/src/components/layout/sider/index.tsx index 2f92715d1151..b4148c070752 100644 --- a/packages/mantine/src/components/layout/sider/index.tsx +++ b/packages/mantine/src/components/layout/sider/index.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { CanAccess, - ITreeMenu, + type ITreeMenu, useIsExistAuthentication, useLink, useLogout, @@ -20,14 +20,14 @@ import { Drawer, Navbar, NavLink, - NavLinkStylesNames, - NavLinkStylesParams, + type NavLinkStylesNames, + type NavLinkStylesParams, ScrollArea, MediaQuery, Button, Tooltip, - TooltipProps, - Styles, + type TooltipProps, + type Styles, } from "@mantine/core"; import { IconList, @@ -37,7 +37,7 @@ import { IconPower, IconDashboard, } from "@tabler/icons-react"; -import { RefineLayoutSiderProps } from "../types"; +import type { RefineLayoutSiderProps } from "../types"; import { RefineTitle as DefaultTitle } from "@components"; diff --git a/packages/mantine/src/components/layout/title/index.tsx b/packages/mantine/src/components/layout/title/index.tsx index edb3227a489c..de12aa07819b 100644 --- a/packages/mantine/src/components/layout/title/index.tsx +++ b/packages/mantine/src/components/layout/title/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useRouterContext, - TitleProps, + type TitleProps, useRouterType, useLink, } from "@refinedev/core"; diff --git a/packages/mantine/src/components/pages/auth/components/forgotPassword/index.tsx b/packages/mantine/src/components/pages/auth/components/forgotPassword/index.tsx index 99cfdf2dc149..7cfbb3a9a163 100644 --- a/packages/mantine/src/components/pages/auth/components/forgotPassword/index.tsx +++ b/packages/mantine/src/components/pages/auth/components/forgotPassword/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { - ForgotPasswordPageProps, - ForgotPasswordFormTypes, + type ForgotPasswordPageProps, + type ForgotPasswordFormTypes, useRouterType, useLink, } from "@refinedev/core"; @@ -19,8 +19,8 @@ import { Anchor, Button, Text, - BoxProps, - CardProps, + type BoxProps, + type CardProps, Group, useMantineTheme, } from "@mantine/core"; @@ -33,7 +33,7 @@ import { titleStyles, pageTitleStyles, } from "../styles"; -import { FormPropsType } from "../.."; +import type { FormPropsType } from "../.."; type ResetPassworProps = ForgotPasswordPageProps< BoxProps, diff --git a/packages/mantine/src/components/pages/auth/components/login/index.tsx b/packages/mantine/src/components/pages/auth/components/login/index.tsx index 3f044bdc59f0..85071dc1716a 100644 --- a/packages/mantine/src/components/pages/auth/components/login/index.tsx +++ b/packages/mantine/src/components/pages/auth/components/login/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { - LoginPageProps, - LoginFormTypes, + type LoginPageProps, + type LoginFormTypes, useRouterType, useLink, useActiveAuthProvider, @@ -20,8 +20,8 @@ import { Text, Divider, Stack, - BoxProps, - CardProps, + type BoxProps, + type CardProps, useMantineTheme, } from "@mantine/core"; @@ -33,7 +33,7 @@ import { titleStyles, pageTitleStyles, } from "../styles"; -import { FormPropsType } from "../.."; +import type { FormPropsType } from "../.."; type LoginProps = LoginPageProps<BoxProps, CardProps, FormPropsType>; diff --git a/packages/mantine/src/components/pages/auth/components/register/index.tsx b/packages/mantine/src/components/pages/auth/components/register/index.tsx index 152827935d9a..6f44f1a46491 100644 --- a/packages/mantine/src/components/pages/auth/components/register/index.tsx +++ b/packages/mantine/src/components/pages/auth/components/register/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { - RegisterPageProps, - RegisterFormTypes, + type RegisterPageProps, + type RegisterFormTypes, useActiveAuthProvider, } from "@refinedev/core"; import { @@ -21,8 +21,8 @@ import { Anchor, Button, Text, - BoxProps, - CardProps, + type BoxProps, + type CardProps, Group, Stack, Divider, @@ -37,7 +37,7 @@ import { titleStyles, pageTitleStyles, } from "../styles"; -import { FormPropsType } from "../.."; +import type { FormPropsType } from "../.."; type RegisterProps = RegisterPageProps<BoxProps, CardProps, FormPropsType>; diff --git a/packages/mantine/src/components/pages/auth/components/styles.ts b/packages/mantine/src/components/pages/auth/components/styles.ts index d28ddca43cd7..9468fcf9836b 100644 --- a/packages/mantine/src/components/pages/auth/components/styles.ts +++ b/packages/mantine/src/components/pages/auth/components/styles.ts @@ -1,4 +1,4 @@ -import { CSSProperties } from "react"; +import type { CSSProperties } from "react"; export const layoutStyles: CSSProperties = { display: "flex", diff --git a/packages/mantine/src/components/pages/auth/components/updatePassword/index.tsx b/packages/mantine/src/components/pages/auth/components/updatePassword/index.tsx index 14d637b02cc0..8505428d6acd 100644 --- a/packages/mantine/src/components/pages/auth/components/updatePassword/index.tsx +++ b/packages/mantine/src/components/pages/auth/components/updatePassword/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { - UpdatePasswordPageProps, - UpdatePasswordFormTypes, + type UpdatePasswordPageProps, + type UpdatePasswordFormTypes, useActiveAuthProvider, } from "@refinedev/core"; import { useUpdatePassword, useTranslate } from "@refinedev/core"; @@ -12,8 +12,8 @@ import { TextInput, Title, Button, - BoxProps, - CardProps, + type BoxProps, + type CardProps, useMantineTheme, } from "@mantine/core"; @@ -24,7 +24,7 @@ import { titleStyles, pageTitleStyles, } from "../styles"; -import { FormPropsType } from "../.."; +import type { FormPropsType } from "../.."; import { ThemedTitleV2 } from "@components"; type UpdatePassworProps = UpdatePasswordPageProps< diff --git a/packages/mantine/src/components/pages/auth/index.tsx b/packages/mantine/src/components/pages/auth/index.tsx index 2e45fb75e108..49240cbcf673 100644 --- a/packages/mantine/src/components/pages/auth/index.tsx +++ b/packages/mantine/src/components/pages/auth/index.tsx @@ -1,7 +1,7 @@ import React from "react"; -import { AuthPageProps } from "@refinedev/core"; -import { BoxProps, CardProps } from "@mantine/core"; -import { UseFormInput } from "@mantine/form/lib/types"; +import type { AuthPageProps } from "@refinedev/core"; +import type { BoxProps, CardProps } from "@mantine/core"; +import type { UseFormInput } from "@mantine/form/lib/types"; import { LoginPage, diff --git a/packages/mantine/src/components/pages/error/index.spec.tsx b/packages/mantine/src/components/pages/error/index.spec.tsx index f45379bf86e0..eccbaadbb351 100644 --- a/packages/mantine/src/components/pages/error/index.spec.tsx +++ b/packages/mantine/src/components/pages/error/index.spec.tsx @@ -1,6 +1,7 @@ import React from "react"; import { pageErrorTests } from "@refinedev/ui-tests"; -import ReactRouterDom, { Route, Routes } from "react-router-dom"; +import type ReactRouterDom from "react-router-dom"; +import { Route, Routes } from "react-router-dom"; import userEvent from "@testing-library/user-event"; import { ErrorComponent } from "."; @@ -9,7 +10,7 @@ import { fireEvent, TestWrapper as BaseTestWrapper, MockLegacyRouterProvider, - ITestWrapperProps, + type ITestWrapperProps, } from "@test"; const mHistory = jest.fn(); diff --git a/packages/mantine/src/components/pages/error/index.tsx b/packages/mantine/src/components/pages/error/index.tsx index 03cc78994ccc..856a5995c0e3 100644 --- a/packages/mantine/src/components/pages/error/index.tsx +++ b/packages/mantine/src/components/pages/error/index.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { RefineErrorPageProps } from "@refinedev/ui-types"; +import type { RefineErrorPageProps } from "@refinedev/ui-types"; import { useNavigation, useTranslate, diff --git a/packages/mantine/src/components/pages/ready/index.tsx b/packages/mantine/src/components/pages/ready/index.tsx index 5f9c51169bb0..438cf3e57fcf 100644 --- a/packages/mantine/src/components/pages/ready/index.tsx +++ b/packages/mantine/src/components/pages/ready/index.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { RefineReadyPageProps } from "@refinedev/ui-types"; +import type { RefineReadyPageProps } from "@refinedev/ui-types"; import { BackgroundImage, Code, diff --git a/packages/mantine/src/components/themedLayout/header/index.spec.tsx b/packages/mantine/src/components/themedLayout/header/index.spec.tsx index 135825f22d2d..ca29284ee57a 100644 --- a/packages/mantine/src/components/themedLayout/header/index.spec.tsx +++ b/packages/mantine/src/components/themedLayout/header/index.spec.tsx @@ -1,7 +1,7 @@ import React from "react"; import { render, TestWrapper } from "@test"; import { ThemedHeader } from "./index"; -import { AuthProvider, LegacyAuthProvider } from "@refinedev/core"; +import type { AuthProvider, LegacyAuthProvider } from "@refinedev/core"; const mockLegacyAuthProvider: LegacyAuthProvider = { login: () => Promise.resolve(), diff --git a/packages/mantine/src/components/themedLayout/header/index.tsx b/packages/mantine/src/components/themedLayout/header/index.tsx index cd260a8703b6..ad8f16f252cf 100644 --- a/packages/mantine/src/components/themedLayout/header/index.tsx +++ b/packages/mantine/src/components/themedLayout/header/index.tsx @@ -8,7 +8,7 @@ import { useMantineTheme, } from "@mantine/core"; -import { RefineThemedLayoutHeaderProps } from "../types"; +import type { RefineThemedLayoutHeaderProps } from "../types"; /** * @deprecated It is recommended to use the improved `ThemedLayoutV2`. Review migration guidelines. https://refine.dev/docs/api-reference/mantine/components/mantine-themed-layout/#migrate-themedlayout-to-themedlayoutv2 diff --git a/packages/mantine/src/components/themedLayout/index.tsx b/packages/mantine/src/components/themedLayout/index.tsx index a21ab9739077..9483e2825aba 100644 --- a/packages/mantine/src/components/themedLayout/index.tsx +++ b/packages/mantine/src/components/themedLayout/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Box } from "@mantine/core"; -import { RefineThemedLayoutProps } from "./types"; +import type { RefineThemedLayoutProps } from "./types"; import { ThemedSider as DefaultSider } from "./sider"; import { ThemedHeader as DefaultHeader } from "./header"; diff --git a/packages/mantine/src/components/themedLayout/sider/index.tsx b/packages/mantine/src/components/themedLayout/sider/index.tsx index 8f0ca30ec9ba..a7477779d445 100644 --- a/packages/mantine/src/components/themedLayout/sider/index.tsx +++ b/packages/mantine/src/components/themedLayout/sider/index.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { CanAccess, - ITreeMenu, + type ITreeMenu, useIsExistAuthentication, useLink, useLogout, @@ -20,14 +20,14 @@ import { Drawer, Navbar, NavLink, - NavLinkStylesNames, - NavLinkStylesParams, + type NavLinkStylesNames, + type NavLinkStylesParams, ScrollArea, MediaQuery, Button, Tooltip, - TooltipProps, - Styles, + type TooltipProps, + type Styles, useMantineTheme, Flex, } from "@mantine/core"; @@ -39,7 +39,7 @@ import { IconPower, IconDashboard, } from "@tabler/icons-react"; -import { RefineThemedLayoutSiderProps } from "../types"; +import type { RefineThemedLayoutSiderProps } from "../types"; import { ThemedTitle as DefaultTitle } from "@components"; diff --git a/packages/mantine/src/components/themedLayout/title/index.tsx b/packages/mantine/src/components/themedLayout/title/index.tsx index 1af222b850d9..120826c230da 100644 --- a/packages/mantine/src/components/themedLayout/title/index.tsx +++ b/packages/mantine/src/components/themedLayout/title/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useRouterContext, useRouterType, useLink } from "@refinedev/core"; import { Center, Text, useMantineTheme } from "@mantine/core"; -import { RefineLayoutThemedTitleProps } from "../types"; +import type { RefineLayoutThemedTitleProps } from "../types"; const defaultText = "Refine Project"; diff --git a/packages/mantine/src/components/themedLayoutV2/header/index.spec.tsx b/packages/mantine/src/components/themedLayoutV2/header/index.spec.tsx index f9475c62b542..f1ac8e1a352c 100644 --- a/packages/mantine/src/components/themedLayoutV2/header/index.spec.tsx +++ b/packages/mantine/src/components/themedLayoutV2/header/index.spec.tsx @@ -1,7 +1,7 @@ import React from "react"; import { render, TestWrapper, waitFor } from "@test"; import { ThemedHeaderV2 } from "./index"; -import { AuthProvider, LegacyAuthProvider } from "@refinedev/core"; +import type { AuthProvider, LegacyAuthProvider } from "@refinedev/core"; const mockLegacyAuthProvider: LegacyAuthProvider = { login: () => Promise.resolve(), diff --git a/packages/mantine/src/components/themedLayoutV2/header/index.tsx b/packages/mantine/src/components/themedLayoutV2/header/index.tsx index bc29dd670846..64db3031e46d 100644 --- a/packages/mantine/src/components/themedLayoutV2/header/index.tsx +++ b/packages/mantine/src/components/themedLayoutV2/header/index.tsx @@ -8,12 +8,12 @@ import { Avatar, Flex, Header as MantineHeader, - Sx, + type Sx, Title, useMantineTheme, } from "@mantine/core"; -import { RefineThemedLayoutV2HeaderProps } from "../types"; +import type { RefineThemedLayoutV2HeaderProps } from "../types"; import { HamburgerMenu } from "../hamburgerMenu"; export const ThemedHeaderV2: React.FC<RefineThemedLayoutV2HeaderProps> = ({ diff --git a/packages/mantine/src/components/themedLayoutV2/index.tsx b/packages/mantine/src/components/themedLayoutV2/index.tsx index f1787158651e..4e68c1f60c00 100644 --- a/packages/mantine/src/components/themedLayoutV2/index.tsx +++ b/packages/mantine/src/components/themedLayoutV2/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Box } from "@mantine/core"; -import { RefineThemedLayoutV2Props } from "./types"; +import type { RefineThemedLayoutV2Props } from "./types"; import { ThemedSiderV2 as DefaultSider } from "./sider"; import { ThemedHeaderV2 as DefaultHeader } from "./header"; import { ThemedLayoutContextProvider } from "../../contexts"; diff --git a/packages/mantine/src/components/themedLayoutV2/sider/index.tsx b/packages/mantine/src/components/themedLayoutV2/sider/index.tsx index 2f98ff9e9930..c430295eadfb 100644 --- a/packages/mantine/src/components/themedLayoutV2/sider/index.tsx +++ b/packages/mantine/src/components/themedLayoutV2/sider/index.tsx @@ -1,7 +1,7 @@ -import React, { CSSProperties } from "react"; +import React, { type CSSProperties } from "react"; import { CanAccess, - ITreeMenu, + type ITreeMenu, useIsExistAuthentication, useLink, useLogout, @@ -19,13 +19,13 @@ import { Drawer, Navbar, NavLink, - NavLinkStylesNames, - NavLinkStylesParams, + type NavLinkStylesNames, + type NavLinkStylesParams, ScrollArea, MediaQuery, Tooltip, - TooltipProps, - Styles, + type TooltipProps, + type Styles, useMantineTheme, Flex, } from "@mantine/core"; @@ -34,7 +34,7 @@ import { IconList, IconPower, IconDashboard } from "@tabler/icons-react"; import { ThemedTitleV2 as DefaultTitle } from "@components"; import { useThemedLayoutContext } from "@hooks"; -import { RefineThemedLayoutV2SiderProps } from "../types"; +import type { RefineThemedLayoutV2SiderProps } from "../types"; const defaultNavIcon = <IconList size={20} />; diff --git a/packages/mantine/src/components/themedLayoutV2/title/index.tsx b/packages/mantine/src/components/themedLayoutV2/title/index.tsx index 6514178332f2..68b33cfb7a6b 100644 --- a/packages/mantine/src/components/themedLayoutV2/title/index.tsx +++ b/packages/mantine/src/components/themedLayoutV2/title/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useRouterContext, useRouterType, useLink } from "@refinedev/core"; import { Center, Text, useMantineTheme } from "@mantine/core"; -import { RefineLayoutThemedTitleProps } from "../types"; +import type { RefineLayoutThemedTitleProps } from "../types"; const defaultText = "Refine Project"; diff --git a/packages/mantine/src/contexts/themedLayoutContext/index.tsx b/packages/mantine/src/contexts/themedLayoutContext/index.tsx index d193fa8f6208..cedb65c6a300 100644 --- a/packages/mantine/src/contexts/themedLayoutContext/index.tsx +++ b/packages/mantine/src/contexts/themedLayoutContext/index.tsx @@ -1,6 +1,6 @@ -import React, { ReactNode, useState } from "react"; +import React, { type ReactNode, useState } from "react"; -import { IThemedLayoutContext } from "./IThemedLayoutContext"; +import type { IThemedLayoutContext } from "./IThemedLayoutContext"; export const ThemedLayoutContext = React.createContext<IThemedLayoutContext>({ siderCollapsed: false, diff --git a/packages/mantine/src/definitions/button/index.ts b/packages/mantine/src/definitions/button/index.ts index 741aa32e781a..0646393a229f 100644 --- a/packages/mantine/src/definitions/button/index.ts +++ b/packages/mantine/src/definitions/button/index.ts @@ -1,4 +1,4 @@ -import { ActionIconVariant, ButtonVariant } from "@mantine/core"; +import type { ActionIconVariant, ButtonVariant } from "@mantine/core"; export const mapButtonVariantToActionIconVariant = ( variant?: ButtonVariant, diff --git a/packages/mantine/src/hooks/form/useForm/index.spec.tsx b/packages/mantine/src/hooks/form/useForm/index.spec.tsx index 3ad83453c89f..372c1017ac69 100644 --- a/packages/mantine/src/hooks/form/useForm/index.spec.tsx +++ b/packages/mantine/src/hooks/form/useForm/index.spec.tsx @@ -5,7 +5,7 @@ import { useForm } from "."; import { Select, TextInput } from "@mantine/core"; import { useSelect } from "@hooks/useSelect"; import { Edit } from "@components/crud"; -import { IRefineOptions, HttpError } from "@refinedev/core"; +import type { IRefineOptions, HttpError } from "@refinedev/core"; import { act } from "react-dom/test-utils"; const renderForm = ({ diff --git a/packages/mantine/src/hooks/form/useForm/index.ts b/packages/mantine/src/hooks/form/useForm/index.ts index 82f0d80d0d03..6b1f082a1ef5 100644 --- a/packages/mantine/src/hooks/form/useForm/index.ts +++ b/packages/mantine/src/hooks/form/useForm/index.ts @@ -1,19 +1,19 @@ import React, { useEffect } from "react"; import { useForm as useMantineForm, - UseFormReturnType as UseMantineFormReturnType, + type UseFormReturnType as UseMantineFormReturnType, } from "@mantine/form"; import get from "lodash/get"; import has from "lodash/has"; import set from "lodash/set"; -import { UseFormInput } from "@mantine/form/lib/types"; +import type { UseFormInput } from "@mantine/form/lib/types"; import { - BaseRecord, - HttpError, + type BaseRecord, + type HttpError, useForm as useFormCore, useWarnAboutChange, - UseFormProps as UseFormCoreProps, - UseFormReturnType as UseFormReturnTypeCore, + type UseFormProps as UseFormCoreProps, + type UseFormReturnType as UseFormReturnTypeCore, useTranslate, useRefineContext, flattenObjectKeys, diff --git a/packages/mantine/src/hooks/form/useModalForm/index.ts b/packages/mantine/src/hooks/form/useModalForm/index.ts index db3bbbb8379b..be19001f0582 100644 --- a/packages/mantine/src/hooks/form/useModalForm/index.ts +++ b/packages/mantine/src/hooks/form/useModalForm/index.ts @@ -1,9 +1,9 @@ import { useCallback } from "react"; import { - BaseKey, - BaseRecord, - FormWithSyncWithLocationParams, - HttpError, + type BaseKey, + type BaseRecord, + type FormWithSyncWithLocationParams, + type HttpError, useGo, useModal, useParsed, @@ -14,8 +14,8 @@ import { useInvalidate, } from "@refinedev/core"; -import { useForm, UseFormProps, UseFormReturnType } from "../useForm"; -import { UseFormInput } from "@mantine/form/lib/types"; +import { useForm, type UseFormProps, type UseFormReturnType } from "../useForm"; +import type { UseFormInput } from "@mantine/form/lib/types"; import React from "react"; export type UseModalFormReturnType< diff --git a/packages/mantine/src/hooks/form/useStepsForm/index.ts b/packages/mantine/src/hooks/form/useStepsForm/index.ts index 169da19d9f5d..40db63ef9c39 100644 --- a/packages/mantine/src/hooks/form/useStepsForm/index.ts +++ b/packages/mantine/src/hooks/form/useStepsForm/index.ts @@ -1,7 +1,7 @@ import { useState } from "react"; -import { BaseRecord, HttpError } from "@refinedev/core"; +import type { BaseRecord, HttpError } from "@refinedev/core"; -import { useForm, UseFormProps, UseFormReturnType } from "../useForm"; +import { useForm, type UseFormProps, type UseFormReturnType } from "../useForm"; export type UseStepsFormReturnType< TQueryFnData extends BaseRecord = BaseRecord, diff --git a/packages/mantine/src/hooks/useSelect/index.ts b/packages/mantine/src/hooks/useSelect/index.ts index d4bff5243d21..aee44da753d7 100644 --- a/packages/mantine/src/hooks/useSelect/index.ts +++ b/packages/mantine/src/hooks/useSelect/index.ts @@ -1,15 +1,15 @@ -import { SelectProps } from "@mantine/core"; -import { QueryObserverResult } from "@tanstack/react-query"; +import type { SelectProps } from "@mantine/core"; +import type { QueryObserverResult } from "@tanstack/react-query"; import { useSelect as useSelectCore, - BaseRecord, - GetManyResponse, - GetListResponse, - HttpError, - UseSelectProps, - BaseOption, - Prettify, + type BaseRecord, + type GetManyResponse, + type GetListResponse, + type HttpError, + type UseSelectProps, + type BaseOption, + type Prettify, } from "@refinedev/core"; export type UseSelectReturnType< diff --git a/packages/mantine/src/hooks/useThemedLayoutContext/index.ts b/packages/mantine/src/hooks/useThemedLayoutContext/index.ts index 729fef9497e1..84d06582e86b 100644 --- a/packages/mantine/src/hooks/useThemedLayoutContext/index.ts +++ b/packages/mantine/src/hooks/useThemedLayoutContext/index.ts @@ -1,7 +1,7 @@ import { useContext } from "react"; import { ThemedLayoutContext } from "@contexts"; -import { IThemedLayoutContext } from "@contexts/themedLayoutContext/IThemedLayoutContext"; +import type { IThemedLayoutContext } from "@contexts/themedLayoutContext/IThemedLayoutContext"; export type UseThemedLayoutContextType = IThemedLayoutContext; diff --git a/packages/mantine/src/providers/notificationProvider.tsx b/packages/mantine/src/providers/notificationProvider.tsx index ca3231ed5cc5..d4caf5b1e3d6 100644 --- a/packages/mantine/src/providers/notificationProvider.tsx +++ b/packages/mantine/src/providers/notificationProvider.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { NotificationProvider } from "@refinedev/core"; +import type { NotificationProvider } from "@refinedev/core"; import { showNotification, updateNotification, diff --git a/packages/mantine/src/theme/index.ts b/packages/mantine/src/theme/index.ts index 80ad85e2f73a..f90cb8da9b48 100644 --- a/packages/mantine/src/theme/index.ts +++ b/packages/mantine/src/theme/index.ts @@ -1,4 +1,4 @@ -import { MantineTheme, MantineThemeOverride } from "@mantine/core"; +import type { MantineTheme, MantineThemeOverride } from "@mantine/core"; const commonThemeProperties: Partial<MantineThemeOverride> = { fontFamily: [ diff --git a/packages/mantine/test/dataMocks.ts b/packages/mantine/test/dataMocks.ts index bdb69c96c79a..27d53b3f056f 100644 --- a/packages/mantine/test/dataMocks.ts +++ b/packages/mantine/test/dataMocks.ts @@ -1,4 +1,4 @@ -import { +import type { Action, AuthProvider, IResourceItem, diff --git a/packages/mantine/test/index.tsx b/packages/mantine/test/index.tsx index 37a918e90651..2e70e7c60596 100644 --- a/packages/mantine/test/index.tsx +++ b/packages/mantine/test/index.tsx @@ -3,16 +3,16 @@ import { BrowserRouter } from "react-router-dom"; import { Refine, - I18nProvider, - AccessControlProvider, - LegacyAuthProvider, - DataProvider, - NotificationProvider, - IResourceItem, - AuthProvider, - IRouterProvider, - RouterBindings, - IRefineOptions, + type I18nProvider, + type AccessControlProvider, + type LegacyAuthProvider, + type DataProvider, + type NotificationProvider, + type IResourceItem, + type AuthProvider, + type IRouterProvider, + type RouterBindings, + type IRefineOptions, } from "@refinedev/core"; import { mockRouterBindings, MockJSONServer } from "@test"; diff --git a/packages/medusa/src/authProvider/index.ts b/packages/medusa/src/authProvider/index.ts index a38ee31182eb..b910b98042af 100644 --- a/packages/medusa/src/authProvider/index.ts +++ b/packages/medusa/src/authProvider/index.ts @@ -1,4 +1,4 @@ -import { AuthProvider, HttpError } from "@refinedev/core"; +import type { AuthProvider, HttpError } from "@refinedev/core"; import axios from "axios"; export const authProvider = (API_URL: string): AuthProvider => { diff --git a/packages/medusa/src/dataProvider/index.ts b/packages/medusa/src/dataProvider/index.ts index 0eb77d206012..011152c64ec0 100644 --- a/packages/medusa/src/dataProvider/index.ts +++ b/packages/medusa/src/dataProvider/index.ts @@ -1,6 +1,6 @@ -import { DataProvider as DataProviderType } from "@refinedev/core"; -import { AxiosInstance } from "axios"; -import { stringify, StringifyOptions } from "query-string"; +import type { DataProvider as DataProviderType } from "@refinedev/core"; +import type { AxiosInstance } from "axios"; +import { stringify, type StringifyOptions } from "query-string"; import { axiosInstance, generateFilter } from "../utils"; const DataProvider = ( diff --git a/packages/medusa/src/utils/axios.ts b/packages/medusa/src/utils/axios.ts index 641864871cc1..1d754a17d617 100644 --- a/packages/medusa/src/utils/axios.ts +++ b/packages/medusa/src/utils/axios.ts @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import axios from "axios"; export const axiosInstance = axios.create(); diff --git a/packages/medusa/src/utils/generateFilter.ts b/packages/medusa/src/utils/generateFilter.ts index a4d32ff609a6..93f3dc5ba497 100644 --- a/packages/medusa/src/utils/generateFilter.ts +++ b/packages/medusa/src/utils/generateFilter.ts @@ -1,4 +1,4 @@ -import { CrudFilter } from "@refinedev/core"; +import type { CrudFilter } from "@refinedev/core"; import { mapOperator } from "./mapOperator"; export const generateFilter = (filters?: CrudFilter[]) => { diff --git a/packages/medusa/src/utils/mapOperator.ts b/packages/medusa/src/utils/mapOperator.ts index 22312b209b70..4db3d8071da8 100644 --- a/packages/medusa/src/utils/mapOperator.ts +++ b/packages/medusa/src/utils/mapOperator.ts @@ -1,4 +1,4 @@ -import { CrudOperators } from "@refinedev/core"; +import type { CrudOperators } from "@refinedev/core"; export const mapOperator = (operator: CrudOperators): string => { switch (operator) { diff --git a/packages/medusa/test/utils/generateFilter.spec.ts b/packages/medusa/test/utils/generateFilter.spec.ts index fc6d6fd8941d..a91a1c7310d2 100644 --- a/packages/medusa/test/utils/generateFilter.spec.ts +++ b/packages/medusa/test/utils/generateFilter.spec.ts @@ -1,4 +1,4 @@ -import { CrudFilters } from "@refinedev/core"; +import type { CrudFilters } from "@refinedev/core"; import { generateFilter } from "../../src/utils"; describe("generateFilter", () => { diff --git a/packages/medusa/test/utils/mapOperator.spec.ts b/packages/medusa/test/utils/mapOperator.spec.ts index b4c2c00765cf..2a4d8be6e5b2 100644 --- a/packages/medusa/test/utils/mapOperator.spec.ts +++ b/packages/medusa/test/utils/mapOperator.spec.ts @@ -1,4 +1,4 @@ -import { CrudOperators } from "@refinedev/core"; +import type { CrudOperators } from "@refinedev/core"; import { mapOperator } from "../../src/utils"; describe("mapOperator", () => { diff --git a/packages/mui/src/components/autoSaveIndicator/index.tsx b/packages/mui/src/components/autoSaveIndicator/index.tsx index 8d08b99664da..ff2e887bc5e2 100644 --- a/packages/mui/src/components/autoSaveIndicator/index.tsx +++ b/packages/mui/src/components/autoSaveIndicator/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - AutoSaveIndicatorProps, + type AutoSaveIndicatorProps, useTranslate, AutoSaveIndicator as AutoSaveIndicatorCore, } from "@refinedev/core"; diff --git a/packages/mui/src/components/breadcrumb/index.spec.tsx b/packages/mui/src/components/breadcrumb/index.spec.tsx index f417ed643bd8..9689d8178a0e 100644 --- a/packages/mui/src/components/breadcrumb/index.spec.tsx +++ b/packages/mui/src/components/breadcrumb/index.spec.tsx @@ -1,7 +1,7 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { Route, Routes } from "react-router-dom"; -import { render, TestWrapper, ITestWrapperProps, act } from "@test"; +import { render, TestWrapper, type ITestWrapperProps, act } from "@test"; import { Breadcrumb } from "./"; import { breadcrumbTests } from "@refinedev/ui-tests"; diff --git a/packages/mui/src/components/breadcrumb/index.tsx b/packages/mui/src/components/breadcrumb/index.tsx index 89e0ded60b1c..861b8a131c17 100644 --- a/packages/mui/src/components/breadcrumb/index.tsx +++ b/packages/mui/src/components/breadcrumb/index.tsx @@ -8,7 +8,7 @@ import { useRouterContext, useRouterType, } from "@refinedev/core"; -import { RefineBreadcrumbProps } from "@refinedev/ui-types"; +import type { RefineBreadcrumbProps } from "@refinedev/ui-types"; import Breadcrumbs from "@mui/material/Breadcrumbs"; import Typography from "@mui/material/Typography"; diff --git a/packages/mui/src/components/buttons/clone/index.tsx b/packages/mui/src/components/buttons/clone/index.tsx index 08a3a1c44b01..41299bc33471 100644 --- a/packages/mui/src/components/buttons/clone/index.tsx +++ b/packages/mui/src/components/buttons/clone/index.tsx @@ -8,7 +8,7 @@ import { import Button from "@mui/material/Button"; import AddBoxOutlined from "@mui/icons-material/AddBoxOutlined"; -import { CloneButtonProps } from "../types"; +import type { CloneButtonProps } from "../types"; /** * `<CloneButton>` uses Material UI {@link https://mui.com/components/buttons/ `<Button> component`}. diff --git a/packages/mui/src/components/buttons/create/index.tsx b/packages/mui/src/components/buttons/create/index.tsx index f521d8db945c..16d975df337c 100644 --- a/packages/mui/src/components/buttons/create/index.tsx +++ b/packages/mui/src/components/buttons/create/index.tsx @@ -8,7 +8,7 @@ import { import Button from "@mui/material/Button"; import AddBoxOutlined from "@mui/icons-material/AddBoxOutlined"; -import { CreateButtonProps } from "../types"; +import type { CreateButtonProps } from "../types"; /** * <CreateButton> uses Material UI {@link https://mui.com/components/buttons/ `<Button> component`}. diff --git a/packages/mui/src/components/buttons/delete/index.tsx b/packages/mui/src/components/buttons/delete/index.tsx index 5276414dc7e8..211d4209c00d 100644 --- a/packages/mui/src/components/buttons/delete/index.tsx +++ b/packages/mui/src/components/buttons/delete/index.tsx @@ -14,7 +14,7 @@ import LoadingButton from "@mui/lab/LoadingButton"; import DeleteOutline from "@mui/icons-material/DeleteOutline"; -import { DeleteButtonProps } from "../types"; +import type { DeleteButtonProps } from "../types"; /** * `<DeleteButton>` uses Material UI {@link https://mui.com/material-ui/api/loading-button/#main-content `<LoadingButton>`} and {@link https://mui.com/material-ui/react-dialog/#main-content `<Dialog>`} components. diff --git a/packages/mui/src/components/buttons/edit/index.tsx b/packages/mui/src/components/buttons/edit/index.tsx index 2c0b97800dbc..c7b335f10db1 100644 --- a/packages/mui/src/components/buttons/edit/index.tsx +++ b/packages/mui/src/components/buttons/edit/index.tsx @@ -8,7 +8,7 @@ import { import Button from "@mui/material/Button"; import EditOutlined from "@mui/icons-material/EditOutlined"; -import { EditButtonProps } from "../types"; +import type { EditButtonProps } from "../types"; /** * `<EditButton>` uses uses Material UI {@link https://mui.com/components/buttons/ `<Button>`} component. diff --git a/packages/mui/src/components/buttons/export/index.tsx b/packages/mui/src/components/buttons/export/index.tsx index 6aa2ce2db051..e76a4467624d 100644 --- a/packages/mui/src/components/buttons/export/index.tsx +++ b/packages/mui/src/components/buttons/export/index.tsx @@ -8,7 +8,7 @@ import { import LoadingButton from "@mui/lab/LoadingButton"; import ImportExportOutlined from "@mui/icons-material/ImportExportOutlined"; -import { ExportButtonProps } from "../types"; +import type { ExportButtonProps } from "../types"; /** * `<ExportButton>` uses Material UI {@link https://mui.com/material-ui/api/loading-button/#main-content `<LoadingButton>`} with a default export icon and a default text with "Export". diff --git a/packages/mui/src/components/buttons/import/index.tsx b/packages/mui/src/components/buttons/import/index.tsx index 797312febf64..956acd7b0de6 100644 --- a/packages/mui/src/components/buttons/import/index.tsx +++ b/packages/mui/src/components/buttons/import/index.tsx @@ -8,7 +8,7 @@ import { import LoadingButton from "@mui/lab/LoadingButton"; import ImportExportOutlined from "@mui/icons-material/ImportExportOutlined"; -import { ImportButtonProps } from "../types"; +import type { ImportButtonProps } from "../types"; /** * `<ImportButton>` is compatible with the {@link https://refine.dev/docs/api-reference/core/hooks/import-export/useImport/ `useImport`} core hook. diff --git a/packages/mui/src/components/buttons/list/index.tsx b/packages/mui/src/components/buttons/list/index.tsx index bf3c99083303..26decbeb582f 100644 --- a/packages/mui/src/components/buttons/list/index.tsx +++ b/packages/mui/src/components/buttons/list/index.tsx @@ -8,7 +8,7 @@ import { import Button from "@mui/material/Button"; import ListOutlined from "@mui/icons-material/ListOutlined"; -import { ListButtonProps } from "../types"; +import type { ListButtonProps } from "../types"; /** * `<ListButton>` is using uses Material UI {@link https://mui.com/components/buttons/ `<Button>`} component. diff --git a/packages/mui/src/components/buttons/refresh/index.tsx b/packages/mui/src/components/buttons/refresh/index.tsx index 23774879e863..eb8284d22863 100644 --- a/packages/mui/src/components/buttons/refresh/index.tsx +++ b/packages/mui/src/components/buttons/refresh/index.tsx @@ -8,7 +8,7 @@ import { import LoadingButton from "@mui/lab/LoadingButton"; import RefreshOutlined from "@mui/icons-material/RefreshOutlined"; -import { RefreshButtonProps } from "../types"; +import type { RefreshButtonProps } from "../types"; /** * `<RefreshButton>` uses uses Material UI {@link https://mui.com/material-ui/api/loading-button/#main-content `<LoadingButton>`} component diff --git a/packages/mui/src/components/buttons/save/index.tsx b/packages/mui/src/components/buttons/save/index.tsx index 075039b016b0..ca91cd47fc3c 100644 --- a/packages/mui/src/components/buttons/save/index.tsx +++ b/packages/mui/src/components/buttons/save/index.tsx @@ -8,7 +8,7 @@ import { import LoadingButton from "@mui/lab/LoadingButton"; import SaveOutlined from "@mui/icons-material/SaveOutlined"; -import { SaveButtonProps } from "../types"; +import type { SaveButtonProps } from "../types"; /** * `<SaveButton>` uses Material UI {@link https://mui.com/material-ui/api/loading-button/#main-content `<LoadingButton>`} component. diff --git a/packages/mui/src/components/buttons/show/index.tsx b/packages/mui/src/components/buttons/show/index.tsx index 657cbb0018d0..6c2b6229ef3e 100644 --- a/packages/mui/src/components/buttons/show/index.tsx +++ b/packages/mui/src/components/buttons/show/index.tsx @@ -8,7 +8,7 @@ import { import Button from "@mui/material/Button"; import VisibilityOutlined from "@mui/icons-material/VisibilityOutlined"; -import { ShowButtonProps } from "../types"; +import type { ShowButtonProps } from "../types"; /** * `<ShowButton>` uses uses Material UI {@link https://mui.com/components/buttons/ `<Button>`} component. diff --git a/packages/mui/src/components/buttons/types.ts b/packages/mui/src/components/buttons/types.ts index 64364c715980..a06b36f1f1d9 100644 --- a/packages/mui/src/components/buttons/types.ts +++ b/packages/mui/src/components/buttons/types.ts @@ -1,6 +1,6 @@ -import { UseImportInputPropsType } from "@refinedev/core"; +import type { UseImportInputPropsType } from "@refinedev/core"; -import { +import type { RefineCloneButtonProps, RefineCreateButtonProps, RefineDeleteButtonProps, diff --git a/packages/mui/src/components/crud/create/index.tsx b/packages/mui/src/components/crud/create/index.tsx index 90f2fdf850a2..589d08bc0adc 100644 --- a/packages/mui/src/components/crud/create/index.tsx +++ b/packages/mui/src/components/crud/create/index.tsx @@ -20,8 +20,8 @@ import Box from "@mui/material/Box"; import ArrowBackIcon from "@mui/icons-material/ArrowBack"; -import { Breadcrumb, SaveButton, SaveButtonProps } from "@components"; -import { CreateProps } from "../types"; +import { Breadcrumb, SaveButton, type SaveButtonProps } from "@components"; +import type { CreateProps } from "../types"; import { RefinePageHeaderClassNames } from "@refinedev/ui-types"; /** diff --git a/packages/mui/src/components/crud/edit/index.spec.tsx b/packages/mui/src/components/crud/edit/index.spec.tsx index 0ebc960b14de..2d487f5300f3 100644 --- a/packages/mui/src/components/crud/edit/index.spec.tsx +++ b/packages/mui/src/components/crud/edit/index.spec.tsx @@ -1,12 +1,12 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { Route, Routes } from "react-router-dom"; -import { AccessControlProvider } from "@refinedev/core"; +import type { AccessControlProvider } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import { act, fireEvent, - ITestWrapperProps, + type ITestWrapperProps, MockJSONServer, render, TestWrapper, diff --git a/packages/mui/src/components/crud/edit/index.tsx b/packages/mui/src/components/crud/edit/index.tsx index bf0a65b85886..ace01db5fefa 100644 --- a/packages/mui/src/components/crud/edit/index.tsx +++ b/packages/mui/src/components/crud/edit/index.tsx @@ -29,13 +29,13 @@ import { ListButton, SaveButton, Breadcrumb, - ListButtonProps, - RefreshButtonProps, - DeleteButtonProps, - SaveButtonProps, + type ListButtonProps, + type RefreshButtonProps, + type DeleteButtonProps, + type SaveButtonProps, AutoSaveIndicator, } from "@components"; -import { EditProps } from "../types"; +import type { EditProps } from "../types"; import { RefinePageHeaderClassNames } from "@refinedev/ui-types"; /** diff --git a/packages/mui/src/components/crud/list/index.spec.tsx b/packages/mui/src/components/crud/list/index.spec.tsx index 1900e86a9ca5..8738afbdd3ae 100644 --- a/packages/mui/src/components/crud/list/index.spec.tsx +++ b/packages/mui/src/components/crud/list/index.spec.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { crudListTests } from "@refinedev/ui-tests"; import { RefineButtonTestIds } from "@refinedev/ui-types"; import { Route, Routes } from "react-router-dom"; diff --git a/packages/mui/src/components/crud/list/index.tsx b/packages/mui/src/components/crud/list/index.tsx index 5eb9525063fa..0cab713bc2a6 100644 --- a/packages/mui/src/components/crud/list/index.tsx +++ b/packages/mui/src/components/crud/list/index.tsx @@ -14,9 +14,9 @@ import CardContent from "@mui/material/CardContent"; import Typography from "@mui/material/Typography"; import Box from "@mui/material/Box"; -import { CreateButton, Breadcrumb, CreateButtonProps } from "@components"; +import { CreateButton, Breadcrumb, type CreateButtonProps } from "@components"; -import { ListProps } from "../types"; +import type { ListProps } from "../types"; import { RefinePageHeaderClassNames } from "@refinedev/ui-types"; /** diff --git a/packages/mui/src/components/crud/show/index.spec.tsx b/packages/mui/src/components/crud/show/index.spec.tsx index d694d040a35a..adb95b049ec3 100644 --- a/packages/mui/src/components/crud/show/index.spec.tsx +++ b/packages/mui/src/components/crud/show/index.spec.tsx @@ -1,6 +1,6 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { Route, Routes } from "react-router-dom"; -import { AccessControlProvider } from "@refinedev/core"; +import type { AccessControlProvider } from "@refinedev/core"; import { crudShowTests } from "@refinedev/ui-tests"; import { render, TestWrapper, waitFor } from "@test"; diff --git a/packages/mui/src/components/crud/show/index.tsx b/packages/mui/src/components/crud/show/index.tsx index 7701053df759..0e10b5ba0a3c 100644 --- a/packages/mui/src/components/crud/show/index.tsx +++ b/packages/mui/src/components/crud/show/index.tsx @@ -27,12 +27,12 @@ import { ListButton, EditButton, Breadcrumb, - ListButtonProps, - EditButtonProps, - DeleteButtonProps, - RefreshButtonProps, + type ListButtonProps, + type EditButtonProps, + type DeleteButtonProps, + type RefreshButtonProps, } from "@components"; -import { ShowProps } from "../types"; +import type { ShowProps } from "../types"; import { RefinePageHeaderClassNames } from "@refinedev/ui-types"; /** diff --git a/packages/mui/src/components/crud/types.ts b/packages/mui/src/components/crud/types.ts index 81720c59620e..057d4abbd034 100644 --- a/packages/mui/src/components/crud/types.ts +++ b/packages/mui/src/components/crud/types.ts @@ -1,4 +1,4 @@ -import { +import type { CreateButtonProps, DeleteButtonProps, EditButtonProps, @@ -13,7 +13,7 @@ import type { CardContentProps } from "@mui/material/CardContent"; import type { CardHeaderProps } from "@mui/material/CardHeader"; import type { CardProps } from "@mui/material/Card"; -import { +import type { RefineCrudCreateProps, RefineCrudEditProps, RefineCrudListProps, diff --git a/packages/mui/src/components/fields/boolean/index.tsx b/packages/mui/src/components/fields/boolean/index.tsx index 74ef1d0542a5..06e82eb57f52 100644 --- a/packages/mui/src/components/fields/boolean/index.tsx +++ b/packages/mui/src/components/fields/boolean/index.tsx @@ -4,7 +4,7 @@ import Tooltip from "@mui/material/Tooltip"; import CheckOutlined from "@mui/icons-material/CheckOutlined"; import CloseOutlined from "@mui/icons-material/CloseOutlined"; -import { BooleanFieldProps } from "../types"; +import type { BooleanFieldProps } from "../types"; /** * This field is used to display boolean values. It uses the {@link https://mui.com/material-ui/react-tooltip/#main-content `<Tooltip>`} values from Materila UI. diff --git a/packages/mui/src/components/fields/date/index.tsx b/packages/mui/src/components/fields/date/index.tsx index 325de8653ce6..b7fd14541a99 100644 --- a/packages/mui/src/components/fields/date/index.tsx +++ b/packages/mui/src/components/fields/date/index.tsx @@ -6,7 +6,7 @@ import LocalizedFormat from "dayjs/plugin/localizedFormat"; import Typography from "@mui/material/Typography"; -import { DateFieldProps } from "../types"; +import type { DateFieldProps } from "../types"; dayjs.extend(LocalizedFormat); diff --git a/packages/mui/src/components/fields/email/index.tsx b/packages/mui/src/components/fields/email/index.tsx index be3aa1b4cf04..47426a5fb421 100644 --- a/packages/mui/src/components/fields/email/index.tsx +++ b/packages/mui/src/components/fields/email/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import Typography from "@mui/material/Typography"; import Link from "@mui/material/Link"; -import { EmailFieldProps } from "../types"; +import type { EmailFieldProps } from "../types"; /** * This field is used to display email values. It uses the {@link https://mui.com/material-ui/react-typography/#main-content `<Typography>` } diff --git a/packages/mui/src/components/fields/file/index.tsx b/packages/mui/src/components/fields/file/index.tsx index 5b90f6e37174..351635210a82 100644 --- a/packages/mui/src/components/fields/file/index.tsx +++ b/packages/mui/src/components/fields/file/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import { UrlField } from "@components"; -import { FileFieldProps } from "../types"; +import type { FileFieldProps } from "../types"; /** * This field is used to display files and uses Material UI {@link https://mui.com/material-ui/react-typography/#main-content `<Typography>`} and {@link https://mui.com/material-ui/react-link/#main-content `<Link>`} components. diff --git a/packages/mui/src/components/fields/markdown/index.tsx b/packages/mui/src/components/fields/markdown/index.tsx index 999f2f233e6d..6f20e1192125 100644 --- a/packages/mui/src/components/fields/markdown/index.tsx +++ b/packages/mui/src/components/fields/markdown/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import ReactMarkdown from "react-markdown"; import gfm from "remark-gfm"; -import { MarkdownFieldProps } from "../types"; +import type { MarkdownFieldProps } from "../types"; /** * This field lets you display markdown content. It supports {@link https://github.github.com/gfm/ GitHub Flavored Markdown}. diff --git a/packages/mui/src/components/fields/number/index.tsx b/packages/mui/src/components/fields/number/index.tsx index 72c74d526306..a1bdb8ba5c4f 100644 --- a/packages/mui/src/components/fields/number/index.tsx +++ b/packages/mui/src/components/fields/number/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import Typography from "@mui/material/Typography"; -import { NumberFieldProps } from "../types"; +import type { NumberFieldProps } from "../types"; function toLocaleStringSupportsOptions() { return !!( diff --git a/packages/mui/src/components/fields/tag/index.tsx b/packages/mui/src/components/fields/tag/index.tsx index bb384be1f403..d9cd6743a5b0 100644 --- a/packages/mui/src/components/fields/tag/index.tsx +++ b/packages/mui/src/components/fields/tag/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import Chip from "@mui/material/Chip"; -import { TagFieldProps } from "../types"; +import type { TagFieldProps } from "../types"; /** * This field lets you display a value in a tag. It uses Material UI {@link https://mui.com/material-ui/react-chip/#main-content `<Chip>`} component. diff --git a/packages/mui/src/components/fields/text/index.tsx b/packages/mui/src/components/fields/text/index.tsx index dd73ed39d23a..d53a4e7166ac 100644 --- a/packages/mui/src/components/fields/text/index.tsx +++ b/packages/mui/src/components/fields/text/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import Typography from "@mui/material/Typography"; -import { TextFieldProps } from "../types"; +import type { TextFieldProps } from "../types"; /** * This field lets you show basic text. It uses Materail UI {@link https://mui.com/material-ui/react-typography/#main-content `<Typography>`} component. diff --git a/packages/mui/src/components/fields/types.ts b/packages/mui/src/components/fields/types.ts index d8d3dcc938fd..62a5bf0bc3a7 100644 --- a/packages/mui/src/components/fields/types.ts +++ b/packages/mui/src/components/fields/types.ts @@ -1,4 +1,4 @@ -import { ReactChild, ReactNode } from "react"; +import type { ReactChild, ReactNode } from "react"; import type { ChipProps } from "@mui/material/Chip"; import type { LinkProps } from "@mui/material/Link"; @@ -6,7 +6,7 @@ import type { SvgIconProps } from "@mui/material/SvgIcon"; import type { TooltipProps } from "@mui/material/Tooltip"; import type { TypographyProps } from "@mui/material/Typography"; -import { +import type { RefineFieldBooleanProps, RefineFieldDateProps, RefineFieldEmailProps, diff --git a/packages/mui/src/components/fields/url/index.tsx b/packages/mui/src/components/fields/url/index.tsx index d6e1ce5ecab2..b152deb7ee9e 100644 --- a/packages/mui/src/components/fields/url/index.tsx +++ b/packages/mui/src/components/fields/url/index.tsx @@ -2,7 +2,7 @@ import React from "react"; import Link from "@mui/material/Link"; import Typography from "@mui/material/Typography"; -import { UrlFieldProps } from "../types"; +import type { UrlFieldProps } from "../types"; /** * This field lets you embed a link.It uses the {@link https://mui.com/material-ui/react-typography/#main-content `<Typography>` } diff --git a/packages/mui/src/components/layout/header/index.tsx b/packages/mui/src/components/layout/header/index.tsx index e8234a4fec00..562e0143d29a 100644 --- a/packages/mui/src/components/layout/header/index.tsx +++ b/packages/mui/src/components/layout/header/index.tsx @@ -7,7 +7,7 @@ import Toolbar from "@mui/material/Toolbar"; import Typography from "@mui/material/Typography"; import Avatar from "@mui/material/Avatar"; -import { RefineLayoutHeaderProps } from "../types"; +import type { RefineLayoutHeaderProps } from "../types"; export const Header: React.FC<RefineLayoutHeaderProps> = () => { const authProvider = useActiveAuthProvider(); diff --git a/packages/mui/src/components/layout/index.tsx b/packages/mui/src/components/layout/index.tsx index 5bc6eeb96275..05854247e498 100644 --- a/packages/mui/src/components/layout/index.tsx +++ b/packages/mui/src/components/layout/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import Box from "@mui/material/Box"; -import { RefineLayoutLayoutProps } from "./types"; +import type { RefineLayoutLayoutProps } from "./types"; import { Sider as DefaultSider } from "./sider"; import { Header as DefaultHeader } from "./header"; diff --git a/packages/mui/src/components/layout/sider/index.tsx b/packages/mui/src/components/layout/sider/index.tsx index de09770ad776..b764b6839631 100644 --- a/packages/mui/src/components/layout/sider/index.tsx +++ b/packages/mui/src/components/layout/sider/index.tsx @@ -22,7 +22,7 @@ import Dashboard from "@mui/icons-material/Dashboard"; import { CanAccess, - ITreeMenu, + type ITreeMenu, useIsExistAuthentication, useLogout, useTitle, @@ -37,7 +37,7 @@ import { useWarnAboutChange, } from "@refinedev/core"; -import { RefineLayoutSiderProps } from "../types"; +import type { RefineLayoutSiderProps } from "../types"; import { Title as DefaultTitle } from "@components"; diff --git a/packages/mui/src/components/layout/title/index.tsx b/packages/mui/src/components/layout/title/index.tsx index 5e835817925c..5176f8be29b0 100644 --- a/packages/mui/src/components/layout/title/index.tsx +++ b/packages/mui/src/components/layout/title/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useRouterContext, - TitleProps, + type TitleProps, useLink, useRouterType, } from "@refinedev/core"; diff --git a/packages/mui/src/components/pages/auth/components/forgotPassword/index.tsx b/packages/mui/src/components/pages/auth/components/forgotPassword/index.tsx index 354519c6148e..73ea8bd9be96 100644 --- a/packages/mui/src/components/pages/auth/components/forgotPassword/index.tsx +++ b/packages/mui/src/components/pages/auth/components/forgotPassword/index.tsx @@ -10,7 +10,7 @@ import MuiLink from "@mui/material/Link"; import type { BoxProps } from "@mui/material/Box"; import type { CardContentProps } from "@mui/material/CardContent"; -import { +import type { ForgotPasswordFormTypes, ForgotPasswordPageProps, } from "@refinedev/core"; @@ -18,8 +18,8 @@ import { useForm } from "@refinedev/react-hook-form"; import * as React from "react"; import { - BaseRecord, - HttpError, + type BaseRecord, + type HttpError, useForgotPassword, useLink, useRouterContext, @@ -28,7 +28,7 @@ import { } from "@refinedev/core"; import { ThemedTitleV2 } from "@components"; -import { FormPropsType } from "../../index"; +import type { FormPropsType } from "../../index"; import { layoutStyles, titleStyles } from "../styles"; type ForgotPasswordProps = ForgotPasswordPageProps< diff --git a/packages/mui/src/components/pages/auth/components/login/index.tsx b/packages/mui/src/components/pages/auth/components/login/index.tsx index 750d479de65d..269098147496 100644 --- a/packages/mui/src/components/pages/auth/components/login/index.tsx +++ b/packages/mui/src/components/pages/auth/components/login/index.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { - LoginPageProps, - LoginFormTypes, + type LoginPageProps, + type LoginFormTypes, useActiveAuthProvider, } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; @@ -24,8 +24,8 @@ import type { BoxProps } from "@mui/material/Box"; import type { CardContentProps } from "@mui/material/CardContent"; import { - BaseRecord, - HttpError, + type BaseRecord, + type HttpError, useLogin, useTranslate, useRouterContext, @@ -34,7 +34,7 @@ import { } from "@refinedev/core"; import { layoutStyles, titleStyles } from "../styles"; -import { FormPropsType } from "../../index"; +import type { FormPropsType } from "../../index"; import { ThemedTitleV2 } from "@components"; type LoginProps = LoginPageProps<BoxProps, CardContentProps, FormPropsType>; diff --git a/packages/mui/src/components/pages/auth/components/register/index.tsx b/packages/mui/src/components/pages/auth/components/register/index.tsx index d815e5d7bec9..664264a094cb 100644 --- a/packages/mui/src/components/pages/auth/components/register/index.tsx +++ b/packages/mui/src/components/pages/auth/components/register/index.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { - RegisterFormTypes, - RegisterPageProps, + type RegisterFormTypes, + type RegisterPageProps, useActiveAuthProvider, } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; @@ -21,8 +21,8 @@ import type { BoxProps } from "@mui/material/Box"; import type { CardContentProps } from "@mui/material/CardContent"; import { - BaseRecord, - HttpError, + type BaseRecord, + type HttpError, useTranslate, useRouterContext, useRouterType, @@ -31,7 +31,7 @@ import { } from "@refinedev/core"; import { layoutStyles, titleStyles } from "../styles"; -import { FormPropsType } from "../../index"; +import type { FormPropsType } from "../../index"; import { ThemedTitleV2 } from "@components"; type RegisterProps = RegisterPageProps< diff --git a/packages/mui/src/components/pages/auth/components/styles.ts b/packages/mui/src/components/pages/auth/components/styles.ts index 24a21b3c7a29..aba35d367f75 100644 --- a/packages/mui/src/components/pages/auth/components/styles.ts +++ b/packages/mui/src/components/pages/auth/components/styles.ts @@ -1,4 +1,4 @@ -import { CSSProperties } from "react"; +import type { CSSProperties } from "react"; export const layoutStyles: CSSProperties = {}; diff --git a/packages/mui/src/components/pages/auth/components/updatePassword/index.tsx b/packages/mui/src/components/pages/auth/components/updatePassword/index.tsx index 92a1f97e8aa6..8618bffef058 100644 --- a/packages/mui/src/components/pages/auth/components/updatePassword/index.tsx +++ b/packages/mui/src/components/pages/auth/components/updatePassword/index.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { - UpdatePasswordFormTypes, - UpdatePasswordPageProps, + type UpdatePasswordFormTypes, + type UpdatePasswordPageProps, useActiveAuthProvider, } from "@refinedev/core"; @@ -19,14 +19,14 @@ import type { BoxProps } from "@mui/material/Box"; import type { CardContentProps } from "@mui/material/CardContent"; import { - BaseRecord, - HttpError, + type BaseRecord, + type HttpError, useTranslate, useUpdatePassword, } from "@refinedev/core"; import { layoutStyles, titleStyles } from "../styles"; -import { FormPropsType } from "../../index"; +import type { FormPropsType } from "../../index"; import { ThemedTitleV2 } from "@components"; type UpdatePasswordProps = UpdatePasswordPageProps< diff --git a/packages/mui/src/components/pages/auth/index.tsx b/packages/mui/src/components/pages/auth/index.tsx index f8f27900ee44..9f4cedc0a08d 100644 --- a/packages/mui/src/components/pages/auth/index.tsx +++ b/packages/mui/src/components/pages/auth/index.tsx @@ -2,9 +2,9 @@ import React from "react"; import type { BoxProps } from "@mui/material/Box"; import type { CardProps } from "@mui/material/Card"; -import { AuthPageProps, RegisterFormTypes } from "@refinedev/core"; +import type { AuthPageProps, RegisterFormTypes } from "@refinedev/core"; -import { UseFormProps } from "@refinedev/react-hook-form"; +import type { UseFormProps } from "@refinedev/react-hook-form"; import { LoginPage, diff --git a/packages/mui/src/components/pages/error/index.spec.tsx b/packages/mui/src/components/pages/error/index.spec.tsx index 1ea8688e4422..f7ed1283831b 100644 --- a/packages/mui/src/components/pages/error/index.spec.tsx +++ b/packages/mui/src/components/pages/error/index.spec.tsx @@ -1,6 +1,7 @@ import React from "react"; import { pageErrorTests } from "@refinedev/ui-tests"; -import ReactRouterDom, { Route, Routes } from "react-router-dom"; +import type ReactRouterDom from "react-router-dom"; +import { Route, Routes } from "react-router-dom"; import { ErrorComponent } from "."; import { render, fireEvent, TestWrapper, act } from "@test"; diff --git a/packages/mui/src/components/pages/error/index.tsx b/packages/mui/src/components/pages/error/index.tsx index 8c73e54c6d69..b4b4aa434738 100644 --- a/packages/mui/src/components/pages/error/index.tsx +++ b/packages/mui/src/components/pages/error/index.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import { useGo, useResource, useRouterType } from "@refinedev/core"; -import { RefineErrorPageProps } from "@refinedev/ui-types"; +import type { RefineErrorPageProps } from "@refinedev/ui-types"; import { useNavigation, useTranslate } from "@refinedev/core"; import Stack from "@mui/material/Stack"; diff --git a/packages/mui/src/components/pages/login/index.tsx b/packages/mui/src/components/pages/login/index.tsx index ec49cdb6e861..8db5467c4352 100644 --- a/packages/mui/src/components/pages/login/index.tsx +++ b/packages/mui/src/components/pages/login/index.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { LoginPageProps, useActiveAuthProvider } from "@refinedev/core"; +import { type LoginPageProps, useActiveAuthProvider } from "@refinedev/core"; import { useForm } from "@refinedev/react-hook-form"; import Button from "@mui/material/Button"; @@ -13,7 +13,12 @@ import Container from "@mui/material/Container"; import Card from "@mui/material/Card"; import CardContent from "@mui/material/CardContent"; -import { BaseRecord, HttpError, useLogin, useTranslate } from "@refinedev/core"; +import { + type BaseRecord, + type HttpError, + useLogin, + useTranslate, +} from "@refinedev/core"; type ILoginForm = { username: string; diff --git a/packages/mui/src/components/pages/ready/index.tsx b/packages/mui/src/components/pages/ready/index.tsx index ca86cee95497..712f1c93b77e 100644 --- a/packages/mui/src/components/pages/ready/index.tsx +++ b/packages/mui/src/components/pages/ready/index.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { RefineReadyPageProps } from "@refinedev/ui-types"; +import type { RefineReadyPageProps } from "@refinedev/ui-types"; import Stack from "@mui/material/Stack"; import Grid from "@mui/material/Grid"; diff --git a/packages/mui/src/components/themedLayout/header/index.tsx b/packages/mui/src/components/themedLayout/header/index.tsx index 0c9536f465f1..7f3faca5a73a 100644 --- a/packages/mui/src/components/themedLayout/header/index.tsx +++ b/packages/mui/src/components/themedLayout/header/index.tsx @@ -10,7 +10,7 @@ import IconButton from "@mui/material/IconButton"; import Menu from "@mui/icons-material/Menu"; -import { RefineThemedLayoutHeaderProps } from "../types"; +import type { RefineThemedLayoutHeaderProps } from "../types"; /** * @deprecated It is recommended to use the improved `ThemedLayoutV2`. Review migration guidelines. https://refine.dev/docs/api-reference/mui/components/mui-themed-layout/#migrate-themedlayout-to-themedlayoutv2 diff --git a/packages/mui/src/components/themedLayout/index.tsx b/packages/mui/src/components/themedLayout/index.tsx index 0e914ee95056..bb6df1dd124b 100644 --- a/packages/mui/src/components/themedLayout/index.tsx +++ b/packages/mui/src/components/themedLayout/index.tsx @@ -3,7 +3,7 @@ import Box from "@mui/material/Box"; import { ThemedSider as DefaultSider } from "./sider"; import { ThemedHeader as DefaultHeader } from "./header"; -import { RefineThemedLayoutProps } from "./types"; +import type { RefineThemedLayoutProps } from "./types"; /** * @deprecated It is recommended to use the improved `ThemedLayoutV2`. Review migration guidelines. https://refine.dev/docs/api-reference/mui/components/mui-themed-layout/#migrate-themedlayout-to-themedlayoutv2 diff --git a/packages/mui/src/components/themedLayout/sider/index.tsx b/packages/mui/src/components/themedLayout/sider/index.tsx index d28acb1251d1..7d4921798c65 100644 --- a/packages/mui/src/components/themedLayout/sider/index.tsx +++ b/packages/mui/src/components/themedLayout/sider/index.tsx @@ -21,7 +21,7 @@ import Dashboard from "@mui/icons-material/Dashboard"; import { CanAccess, - ITreeMenu, + type ITreeMenu, useIsExistAuthentication, useLogout, useTitle, @@ -36,7 +36,7 @@ import { useWarnAboutChange, } from "@refinedev/core"; -import { RefineThemedLayoutSiderProps } from "../types"; +import type { RefineThemedLayoutSiderProps } from "../types"; import { ThemedTitle as DefaultTitle } from "@components"; diff --git a/packages/mui/src/components/themedLayout/title/index.tsx b/packages/mui/src/components/themedLayout/title/index.tsx index a8afffcb267d..5287a1cfb7ff 100644 --- a/packages/mui/src/components/themedLayout/title/index.tsx +++ b/packages/mui/src/components/themedLayout/title/index.tsx @@ -5,7 +5,7 @@ import MuiLink from "@mui/material/Link"; import SvgIcon from "@mui/material/SvgIcon"; import Typography from "@mui/material/Typography"; -import { RefineLayoutThemedTitleProps } from "../types"; +import type { RefineLayoutThemedTitleProps } from "../types"; const defaultText = "Refine Project"; diff --git a/packages/mui/src/components/themedLayoutV2/header/index.spec.tsx b/packages/mui/src/components/themedLayoutV2/header/index.spec.tsx index f9475c62b542..f1ac8e1a352c 100644 --- a/packages/mui/src/components/themedLayoutV2/header/index.spec.tsx +++ b/packages/mui/src/components/themedLayoutV2/header/index.spec.tsx @@ -1,7 +1,7 @@ import React from "react"; import { render, TestWrapper, waitFor } from "@test"; import { ThemedHeaderV2 } from "./index"; -import { AuthProvider, LegacyAuthProvider } from "@refinedev/core"; +import type { AuthProvider, LegacyAuthProvider } from "@refinedev/core"; const mockLegacyAuthProvider: LegacyAuthProvider = { login: () => Promise.resolve(), diff --git a/packages/mui/src/components/themedLayoutV2/header/index.tsx b/packages/mui/src/components/themedLayoutV2/header/index.tsx index 18b06289d3eb..6aa8e84d6ce8 100644 --- a/packages/mui/src/components/themedLayoutV2/header/index.tsx +++ b/packages/mui/src/components/themedLayoutV2/header/index.tsx @@ -11,7 +11,7 @@ import Toolbar from "@mui/material/Toolbar"; import Typography from "@mui/material/Typography"; import Avatar from "@mui/material/Avatar"; -import { RefineThemedLayoutV2HeaderProps } from "../types"; +import type { RefineThemedLayoutV2HeaderProps } from "../types"; import { HamburgerMenu } from "../hamburgerMenu"; diff --git a/packages/mui/src/components/themedLayoutV2/index.tsx b/packages/mui/src/components/themedLayoutV2/index.tsx index 82a0f9f5757e..1084a4273e8d 100644 --- a/packages/mui/src/components/themedLayoutV2/index.tsx +++ b/packages/mui/src/components/themedLayoutV2/index.tsx @@ -5,7 +5,7 @@ import Box from "@mui/material/Box"; import { ThemedLayoutContextProvider } from "@contexts"; import { ThemedSiderV2 as DefaultSider } from "./sider"; import { ThemedHeaderV2 as DefaultHeader } from "./header"; -import { RefineThemedLayoutV2Props } from "./types"; +import type { RefineThemedLayoutV2Props } from "./types"; export const ThemedLayoutV2: React.FC<RefineThemedLayoutV2Props> = ({ Sider, diff --git a/packages/mui/src/components/themedLayoutV2/sider/index.tsx b/packages/mui/src/components/themedLayoutV2/sider/index.tsx index 4a248ff084e8..0c133ea3157d 100644 --- a/packages/mui/src/components/themedLayoutV2/sider/index.tsx +++ b/packages/mui/src/components/themedLayoutV2/sider/index.tsx @@ -1,4 +1,4 @@ -import React, { CSSProperties, useState } from "react"; +import React, { type CSSProperties, useState } from "react"; import Box from "@mui/material/Box"; import Drawer from "@mui/material/Drawer"; @@ -20,7 +20,7 @@ import Dashboard from "@mui/icons-material/Dashboard"; import { CanAccess, - ITreeMenu, + type ITreeMenu, useIsExistAuthentication, useLogout, useTitle, @@ -34,7 +34,7 @@ import { pickNotDeprecated, useWarnAboutChange, } from "@refinedev/core"; -import { RefineThemedLayoutV2SiderProps } from "../types"; +import type { RefineThemedLayoutV2SiderProps } from "../types"; import { ThemedTitleV2 as DefaultTitle } from "@components"; import { useThemedLayoutContext } from "@hooks"; diff --git a/packages/mui/src/components/themedLayoutV2/title/index.tsx b/packages/mui/src/components/themedLayoutV2/title/index.tsx index cf8ee349cfce..c4c2e1c70808 100644 --- a/packages/mui/src/components/themedLayoutV2/title/index.tsx +++ b/packages/mui/src/components/themedLayoutV2/title/index.tsx @@ -5,7 +5,7 @@ import MuiLink from "@mui/material/Link"; import SvgIcon from "@mui/material/SvgIcon"; import Typography from "@mui/material/Typography"; -import { RefineLayoutThemedTitleProps } from "../types"; +import type { RefineLayoutThemedTitleProps } from "../types"; const defaultText = "Refine Project"; diff --git a/packages/mui/src/contexts/themedLayoutContext/index.tsx b/packages/mui/src/contexts/themedLayoutContext/index.tsx index d193fa8f6208..cedb65c6a300 100644 --- a/packages/mui/src/contexts/themedLayoutContext/index.tsx +++ b/packages/mui/src/contexts/themedLayoutContext/index.tsx @@ -1,6 +1,6 @@ -import React, { ReactNode, useState } from "react"; +import React, { type ReactNode, useState } from "react"; -import { IThemedLayoutContext } from "./IThemedLayoutContext"; +import type { IThemedLayoutContext } from "./IThemedLayoutContext"; export const ThemedLayoutContext = React.createContext<IThemedLayoutContext>({ siderCollapsed: false, diff --git a/packages/mui/src/definitions/dataGrid/index.spec.ts b/packages/mui/src/definitions/dataGrid/index.spec.ts index 996648539f5a..c86b3efc3593 100644 --- a/packages/mui/src/definitions/dataGrid/index.spec.ts +++ b/packages/mui/src/definitions/dataGrid/index.spec.ts @@ -1,6 +1,6 @@ import type { GridFilterModel, GridSortModel } from "@mui/x-data-grid"; import { GridLogicOperator } from "@mui/x-data-grid"; -import { CrudFilters, CrudSorting } from "@refinedev/core"; +import type { CrudFilters, CrudSorting } from "@refinedev/core"; import { transformCrudFiltersToFilterModel, diff --git a/packages/mui/src/definitions/dataGrid/index.ts b/packages/mui/src/definitions/dataGrid/index.ts index 915f14217627..1b1388ac8e36 100644 --- a/packages/mui/src/definitions/dataGrid/index.ts +++ b/packages/mui/src/definitions/dataGrid/index.ts @@ -5,7 +5,7 @@ import type { } from "@mui/x-data-grid"; import { GridLogicOperator } from "@mui/x-data-grid"; -import { +import type { CrudFilters, CrudOperators, CrudSorting, diff --git a/packages/mui/src/hooks/useAutocomplete/index.ts b/packages/mui/src/hooks/useAutocomplete/index.ts index f796b3346801..2e88377e6955 100644 --- a/packages/mui/src/hooks/useAutocomplete/index.ts +++ b/packages/mui/src/hooks/useAutocomplete/index.ts @@ -1,9 +1,9 @@ import { useSelect as useSelectCore, - HttpError, - UseSelectProps, - UseSelectReturnType, - BaseRecord, + type HttpError, + type UseSelectProps, + type UseSelectReturnType, + type BaseRecord, } from "@refinedev/core"; import type { AutocompleteProps } from "@mui/material/Autocomplete"; diff --git a/packages/mui/src/hooks/useDataGrid/index.spec.ts b/packages/mui/src/hooks/useDataGrid/index.spec.ts index fbff01c09943..cb109274e3d4 100644 --- a/packages/mui/src/hooks/useDataGrid/index.spec.ts +++ b/packages/mui/src/hooks/useDataGrid/index.spec.ts @@ -3,7 +3,7 @@ import { renderHook, waitFor } from "@testing-library/react"; import { MockJSONServer, TestWrapper } from "@test"; import { useDataGrid } from "./"; -import { CrudFilters } from "@refinedev/core"; +import type { CrudFilters } from "@refinedev/core"; import { act } from "react-dom/test-utils"; describe("useDataGrid Hook", () => { diff --git a/packages/mui/src/hooks/useDataGrid/index.ts b/packages/mui/src/hooks/useDataGrid/index.ts index 6dbcc8769bea..f7b3373f161c 100644 --- a/packages/mui/src/hooks/useDataGrid/index.ts +++ b/packages/mui/src/hooks/useDataGrid/index.ts @@ -1,14 +1,14 @@ import { - BaseRecord, - CrudFilters, - HttpError, - Pagination, + type BaseRecord, + type CrudFilters, + type HttpError, + type Pagination, pickNotDeprecated, - Prettify, + type Prettify, useLiveMode, useTable as useTableCore, - useTableProps as useTablePropsCore, - useTableReturnType as useTableReturnTypeCore, + type useTableProps as useTablePropsCore, + type useTableReturnType as useTableReturnTypeCore, } from "@refinedev/core"; import { useState } from "react"; diff --git a/packages/mui/src/hooks/useThemedLayoutContext/index.ts b/packages/mui/src/hooks/useThemedLayoutContext/index.ts index c40890697615..3412274907cb 100644 --- a/packages/mui/src/hooks/useThemedLayoutContext/index.ts +++ b/packages/mui/src/hooks/useThemedLayoutContext/index.ts @@ -1,7 +1,7 @@ import { useContext } from "react"; import { ThemedLayoutContext } from "../../contexts"; -import { IThemedLayoutContext } from "../../contexts/themedLayoutContext/IThemedLayoutContext"; +import type { IThemedLayoutContext } from "../../contexts/themedLayoutContext/IThemedLayoutContext"; export type UseThemedLayoutContextType = IThemedLayoutContext; diff --git a/packages/mui/src/providers/notificationProvider/index.spec.tsx b/packages/mui/src/providers/notificationProvider/index.spec.tsx index b5ad1a6583c9..ccb52e3a389e 100644 --- a/packages/mui/src/providers/notificationProvider/index.spec.tsx +++ b/packages/mui/src/providers/notificationProvider/index.spec.tsx @@ -1,7 +1,7 @@ import React from "react"; import * as Snack from "notistack"; -import { OpenNotificationParams } from "@refinedev/core"; +import type { OpenNotificationParams } from "@refinedev/core"; import { CircularDeterminate } from "@components/circularDeterminate"; diff --git a/packages/mui/src/providers/notificationProvider/index.tsx b/packages/mui/src/providers/notificationProvider/index.tsx index 949f41d2e8d0..8f7786ff1d32 100644 --- a/packages/mui/src/providers/notificationProvider/index.tsx +++ b/packages/mui/src/providers/notificationProvider/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { NotificationProvider } from "@refinedev/core"; +import type { NotificationProvider } from "@refinedev/core"; import { useSnackbar } from "notistack"; diff --git a/packages/mui/test/dataMocks.ts b/packages/mui/test/dataMocks.ts index 30ea3b7fe41b..b89ace2ee0b7 100644 --- a/packages/mui/test/dataMocks.ts +++ b/packages/mui/test/dataMocks.ts @@ -1,4 +1,4 @@ -import { AuthProvider } from "@refinedev/core"; +import type { AuthProvider } from "@refinedev/core"; import { useParams, useLocation, Link, useNavigate } from "react-router-dom"; /* import { diff --git a/packages/mui/test/index.tsx b/packages/mui/test/index.tsx index f6cd1503146c..778f3ef685aa 100644 --- a/packages/mui/test/index.tsx +++ b/packages/mui/test/index.tsx @@ -2,14 +2,14 @@ import React from "react"; import { BrowserRouter } from "react-router-dom"; import { - AuthProvider, + type AuthProvider, Refine, - I18nProvider, - AccessControlProvider, - LegacyAuthProvider, - DataProvider, - NotificationProvider, - IResourceItem, + type I18nProvider, + type AccessControlProvider, + type LegacyAuthProvider, + type DataProvider, + type NotificationProvider, + type IResourceItem, } from "@refinedev/core"; import { MockRouterProvider, MockJSONServer } from "@test"; diff --git a/packages/nestjs-query/src/dataProvider/index.ts b/packages/nestjs-query/src/dataProvider/index.ts index 51fbfda0ee7a..bc1f29b4b4c2 100644 --- a/packages/nestjs-query/src/dataProvider/index.ts +++ b/packages/nestjs-query/src/dataProvider/index.ts @@ -1,9 +1,9 @@ -import { BaseRecord, DataProvider, LogicalFilter } from "@refinedev/core"; +import type { BaseRecord, DataProvider, LogicalFilter } from "@refinedev/core"; import camelcase from "camelcase"; import * as gql from "gql-query-builder"; -import VariableOptions from "gql-query-builder/build/VariableOptions"; -import { GraphQLClient } from "graphql-request"; +import type VariableOptions from "gql-query-builder/build/VariableOptions"; +import type { GraphQLClient } from "graphql-request"; import gqlTag from "graphql-tag"; import { singular } from "pluralize"; diff --git a/packages/nestjs-query/src/liveProvider/index.ts b/packages/nestjs-query/src/liveProvider/index.ts index de25b90c3ff7..078d1a2bf98a 100644 --- a/packages/nestjs-query/src/liveProvider/index.ts +++ b/packages/nestjs-query/src/liveProvider/index.ts @@ -1,6 +1,6 @@ -import { LiveProvider } from "@refinedev/core"; +import type { LiveProvider } from "@refinedev/core"; -import { Client } from "graphql-ws"; +import type { Client } from "graphql-ws"; import { generateSubscription } from "../utils"; diff --git a/packages/nestjs-query/src/utils/graphql.ts b/packages/nestjs-query/src/utils/graphql.ts index d59599c17b82..ecbd99d5753c 100644 --- a/packages/nestjs-query/src/utils/graphql.ts +++ b/packages/nestjs-query/src/utils/graphql.ts @@ -1,4 +1,9 @@ -import { FieldNode, DocumentNode, visit, SelectionSetNode } from "graphql"; +import { + type FieldNode, + type DocumentNode, + visit, + type SelectionSetNode, +} from "graphql"; const getChildNodesField = (node: FieldNode): FieldNode | undefined => { return node?.selectionSet?.selections?.find( diff --git a/packages/nestjs-query/src/utils/index.ts b/packages/nestjs-query/src/utils/index.ts index 3e8bb8f95732..81b5990bcd29 100644 --- a/packages/nestjs-query/src/utils/index.ts +++ b/packages/nestjs-query/src/utils/index.ts @@ -1,4 +1,4 @@ -import { +import type { CrudFilter, CrudOperators, CrudSorting, @@ -8,8 +8,8 @@ import { import camelcase from "camelcase"; import * as gql from "gql-query-builder"; -import VariableOptions from "gql-query-builder/build/VariableOptions"; -import { Client } from "graphql-ws"; +import type VariableOptions from "gql-query-builder/build/VariableOptions"; +import type { Client } from "graphql-ws"; import set from "lodash/set"; import { singular } from "pluralize"; diff --git a/packages/nestjs-query/test/custom/index.spec.ts b/packages/nestjs-query/test/custom/index.spec.ts index 0723156cf25b..9f675ec4d411 100644 --- a/packages/nestjs-query/test/custom/index.spec.ts +++ b/packages/nestjs-query/test/custom/index.spec.ts @@ -1,4 +1,4 @@ -import { BaseRecord } from "@refinedev/core"; +import type { BaseRecord } from "@refinedev/core"; import dataProvider from "../../src/index"; import client from "../gqlClient"; diff --git a/packages/nestjsx-crud/src/provider.ts b/packages/nestjsx-crud/src/provider.ts index d104c3321353..3bce540517ae 100644 --- a/packages/nestjsx-crud/src/provider.ts +++ b/packages/nestjsx-crud/src/provider.ts @@ -1,6 +1,6 @@ import { CondOperator, RequestQueryBuilder } from "@nestjsx/crud-request"; -import { DataProvider, HttpError } from "@refinedev/core"; -import { AxiosInstance } from "axios"; +import type { DataProvider, HttpError } from "@refinedev/core"; +import type { AxiosInstance } from "axios"; import { stringify } from "query-string"; import { axiosInstance, diff --git a/packages/nestjsx-crud/src/utils/axios.ts b/packages/nestjsx-crud/src/utils/axios.ts index 641864871cc1..1d754a17d617 100644 --- a/packages/nestjsx-crud/src/utils/axios.ts +++ b/packages/nestjsx-crud/src/utils/axios.ts @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import axios from "axios"; export const axiosInstance = axios.create(); diff --git a/packages/nestjsx-crud/src/utils/handleFilter.ts b/packages/nestjsx-crud/src/utils/handleFilter.ts index 22eeaf99d0a1..2f650865009f 100644 --- a/packages/nestjsx-crud/src/utils/handleFilter.ts +++ b/packages/nestjsx-crud/src/utils/handleFilter.ts @@ -1,5 +1,5 @@ -import { CrudFilters, CrudFilter } from "@refinedev/core"; -import { RequestQueryBuilder, SCondition } from "@nestjsx/crud-request"; +import type { CrudFilters, CrudFilter } from "@refinedev/core"; +import type { RequestQueryBuilder, SCondition } from "@nestjsx/crud-request"; import { mapOperator } from "./mapOperator"; export const generateSearchFilter = (filters: CrudFilters): SCondition => { diff --git a/packages/nestjsx-crud/src/utils/handleJoin.ts b/packages/nestjsx-crud/src/utils/handleJoin.ts index b6e374a204c6..e40e42def2fd 100644 --- a/packages/nestjsx-crud/src/utils/handleJoin.ts +++ b/packages/nestjsx-crud/src/utils/handleJoin.ts @@ -1,4 +1,4 @@ -import { +import type { RequestQueryBuilder, QueryJoin, QueryJoinArr, diff --git a/packages/nestjsx-crud/src/utils/handlePagination.ts b/packages/nestjsx-crud/src/utils/handlePagination.ts index 7cf3511e1338..e9496903afde 100644 --- a/packages/nestjsx-crud/src/utils/handlePagination.ts +++ b/packages/nestjsx-crud/src/utils/handlePagination.ts @@ -1,5 +1,5 @@ -import { RequestQueryBuilder } from "@nestjsx/crud-request"; -import { Pagination } from "@refinedev/core"; +import type { RequestQueryBuilder } from "@nestjsx/crud-request"; +import type { Pagination } from "@refinedev/core"; export const handlePagination = ( query: RequestQueryBuilder, diff --git a/packages/nestjsx-crud/src/utils/handleSort.ts b/packages/nestjsx-crud/src/utils/handleSort.ts index b53ff1124d08..c0dd5b7825b2 100644 --- a/packages/nestjsx-crud/src/utils/handleSort.ts +++ b/packages/nestjsx-crud/src/utils/handleSort.ts @@ -1,10 +1,10 @@ -import { +import type { RequestQueryBuilder, QuerySort, QuerySortArr, QuerySortOperator, } from "@nestjsx/crud-request"; -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; export type SortBy = QuerySort | QuerySortArr | Array<QuerySort | QuerySortArr>; diff --git a/packages/nestjsx-crud/src/utils/mapOperator.ts b/packages/nestjsx-crud/src/utils/mapOperator.ts index c9630246359e..2ddb80049add 100644 --- a/packages/nestjsx-crud/src/utils/mapOperator.ts +++ b/packages/nestjsx-crud/src/utils/mapOperator.ts @@ -1,5 +1,5 @@ -import { ComparisonOperator, CondOperator } from "@nestjsx/crud-request"; -import { CrudOperators } from "@refinedev/core"; +import { type ComparisonOperator, CondOperator } from "@nestjsx/crud-request"; +import type { CrudOperators } from "@refinedev/core"; export const mapOperator = (operator: CrudOperators): ComparisonOperator => { switch (operator) { diff --git a/packages/nestjsx-crud/src/utils/transformHttpError.ts b/packages/nestjsx-crud/src/utils/transformHttpError.ts index 9dfe5a506443..981019f5acf2 100644 --- a/packages/nestjsx-crud/src/utils/transformHttpError.ts +++ b/packages/nestjsx-crud/src/utils/transformHttpError.ts @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { transformErrorMessages } from "./transformErrorMessages"; diff --git a/packages/nestjsx-crud/test/utils/handleFilter.spec.ts b/packages/nestjsx-crud/test/utils/handleFilter.spec.ts index 38d931c70c22..67baf5c8247e 100644 --- a/packages/nestjsx-crud/test/utils/handleFilter.spec.ts +++ b/packages/nestjsx-crud/test/utils/handleFilter.spec.ts @@ -1,5 +1,5 @@ -import { RequestQueryBuilder, SCondition } from "@nestjsx/crud-request"; -import { CrudFilters, CrudSorting, CrudFilter } from "@refinedev/core"; +import { RequestQueryBuilder, type SCondition } from "@nestjsx/crud-request"; +import type { CrudFilters, CrudSorting, CrudFilter } from "@refinedev/core"; import { handleFilter, handleSort, diff --git a/packages/nestjsx-crud/test/utils/handleJoin.spec.ts b/packages/nestjsx-crud/test/utils/handleJoin.spec.ts index 72008774e3ad..77ea35e72506 100644 --- a/packages/nestjsx-crud/test/utils/handleJoin.spec.ts +++ b/packages/nestjsx-crud/test/utils/handleJoin.spec.ts @@ -1,10 +1,10 @@ import { RequestQueryBuilder, - QueryJoin, - QueryJoinArr, + type QueryJoin, + type QueryJoinArr, } from "@nestjsx/crud-request"; import { handleFilter, handleJoin, handleSort } from "../../src/utils"; -import { CrudFilters, CrudSorting } from "@refinedev/core"; +import type { CrudFilters, CrudSorting } from "@refinedev/core"; describe("handleJoin", () => { it("should apply join to the query", () => { diff --git a/packages/nestjsx-crud/test/utils/handlePagination.spec.ts b/packages/nestjsx-crud/test/utils/handlePagination.spec.ts index be415b5e4821..21854c7655a8 100644 --- a/packages/nestjsx-crud/test/utils/handlePagination.spec.ts +++ b/packages/nestjsx-crud/test/utils/handlePagination.spec.ts @@ -1,6 +1,6 @@ import { RequestQueryBuilder } from "@nestjsx/crud-request"; import { handleFilter, handlePagination, handleSort } from "../../src/utils"; -import { CrudFilters, CrudSorting, Pagination } from "@refinedev/core"; +import type { CrudFilters, CrudSorting, Pagination } from "@refinedev/core"; describe("handlePagination", () => { it("should apply pagination for server mode", () => { diff --git a/packages/nestjsx-crud/test/utils/handleSort.spec.ts b/packages/nestjsx-crud/test/utils/handleSort.spec.ts index f6d7782345c4..01e283783e4c 100644 --- a/packages/nestjsx-crud/test/utils/handleSort.spec.ts +++ b/packages/nestjsx-crud/test/utils/handleSort.spec.ts @@ -1,5 +1,5 @@ -import { RequestQueryBuilder, QuerySort } from "@nestjsx/crud-request"; -import { CrudFilters, CrudSorting } from "@refinedev/core"; +import { RequestQueryBuilder, type QuerySort } from "@nestjsx/crud-request"; +import type { CrudFilters, CrudSorting } from "@refinedev/core"; import { handleFilter, generateSort, handleSort } from "../../src/utils"; describe("handleSort", () => { diff --git a/packages/nestjsx-crud/test/utils/mapOperator.spec.ts b/packages/nestjsx-crud/test/utils/mapOperator.spec.ts index 999eb4900e62..aa73e1be0197 100644 --- a/packages/nestjsx-crud/test/utils/mapOperator.spec.ts +++ b/packages/nestjsx-crud/test/utils/mapOperator.spec.ts @@ -1,5 +1,5 @@ -import { ComparisonOperator, CondOperator } from "@nestjsx/crud-request"; -import { CrudOperators } from "@refinedev/core"; +import { type ComparisonOperator, CondOperator } from "@nestjsx/crud-request"; +import type { CrudOperators } from "@refinedev/core"; import { mapOperator } from "../../src/utils"; describe("mapOperator", () => { diff --git a/packages/nextjs-router/src/app/bindings.tsx b/packages/nextjs-router/src/app/bindings.tsx index 79702e574d49..409af7c9ff26 100644 --- a/packages/nextjs-router/src/app/bindings.tsx +++ b/packages/nextjs-router/src/app/bindings.tsx @@ -1,14 +1,14 @@ import { - GoConfig, - RouterBindings, + type GoConfig, + type RouterBindings, ResourceContext, matchResourceFromRoute, - ParseResponse, + type ParseResponse, } from "@refinedev/core"; import { useRouter, usePathname, useSearchParams } from "next/navigation"; import Link from "next/link"; import qs from "qs"; -import React, { ComponentProps, useContext } from "react"; +import React, { type ComponentProps, useContext } from "react"; import { paramsFromCurrentPath } from "../common/params-from-current-path"; import { convertToNumberIfPossible } from "src/common/convert-to-number-if-possible"; diff --git a/packages/nextjs-router/src/pages/bindings.tsx b/packages/nextjs-router/src/pages/bindings.tsx index 70ab770f640a..a6f4d7716dfa 100644 --- a/packages/nextjs-router/src/pages/bindings.tsx +++ b/packages/nextjs-router/src/pages/bindings.tsx @@ -1,14 +1,14 @@ import { - GoConfig, - RouterBindings, + type GoConfig, + type RouterBindings, ResourceContext, matchResourceFromRoute, - ParseResponse, + type ParseResponse, } from "@refinedev/core"; import { useRouter } from "next/router"; import Link from "next/link"; import qs from "qs"; -import React, { ComponentProps, useContext } from "react"; +import React, { type ComponentProps, useContext } from "react"; import { paramsFromCurrentPath } from "../common/params-from-current-path"; import { convertToNumberIfPossible } from "src/common/convert-to-number-if-possible"; diff --git a/packages/nextjs-router/src/pages/document-title-handler.tsx b/packages/nextjs-router/src/pages/document-title-handler.tsx index c7dc0dbf1304..85bfd6eca0f6 100644 --- a/packages/nextjs-router/src/pages/document-title-handler.tsx +++ b/packages/nextjs-router/src/pages/document-title-handler.tsx @@ -1,7 +1,7 @@ import React from "react"; import { - Action, - IResourceItem, + type Action, + type IResourceItem, generateDefaultDocumentTitle, useParsed, useTranslate, diff --git a/packages/nextjs-router/tsup.config.ts b/packages/nextjs-router/tsup.config.ts index 0352c05c12f1..5063c5a40e91 100644 --- a/packages/nextjs-router/tsup.config.ts +++ b/packages/nextjs-router/tsup.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, Options } from "tsup"; +import { defineConfig, type Options } from "tsup"; import { NodeResolvePlugin } from "@esbuild-plugins/node-resolve"; import { nextJsEsmReplacePlugin } from "../shared/next-js-esm-replace-plugin"; diff --git a/packages/react-hook-form/src/useForm/index.spec.tsx b/packages/react-hook-form/src/useForm/index.spec.tsx index fc814bb755b1..32453adf2cb0 100644 --- a/packages/react-hook-form/src/useForm/index.spec.tsx +++ b/packages/react-hook-form/src/useForm/index.spec.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useForm } from "."; -import { IRefineOptions, HttpError } from "@refinedev/core"; +import type { IRefineOptions, HttpError } from "@refinedev/core"; import { MockJSONServer, TestWrapper, act, render, waitFor } from "../../test"; import { Route, Routes } from "react-router-dom"; diff --git a/packages/react-hook-form/src/useForm/index.ts b/packages/react-hook-form/src/useForm/index.ts index 600ef42d0be5..a8ce06f839ce 100644 --- a/packages/react-hook-form/src/useForm/index.ts +++ b/packages/react-hook-form/src/useForm/index.ts @@ -4,19 +4,19 @@ import has from "lodash/has"; import { useForm as useHookForm, - UseFormProps as UseHookFormProps, - UseFormReturn, - FieldValues, - UseFormHandleSubmit, - Path, + type UseFormProps as UseHookFormProps, + type UseFormReturn, + type FieldValues, + type UseFormHandleSubmit, + type Path, } from "react-hook-form"; import { - BaseRecord, - HttpError, + type BaseRecord, + type HttpError, useForm as useFormCore, useWarnAboutChange, - UseFormProps as UseFormCoreProps, - UseFormReturnType as UseFormReturnTypeCore, + type UseFormProps as UseFormCoreProps, + type UseFormReturnType as UseFormReturnTypeCore, useTranslate, useRefineContext, flattenObjectKeys, diff --git a/packages/react-hook-form/src/useModalForm/index.ts b/packages/react-hook-form/src/useModalForm/index.ts index fb1e61c5900c..b8258b0abcd7 100644 --- a/packages/react-hook-form/src/useModalForm/index.ts +++ b/packages/react-hook-form/src/useModalForm/index.ts @@ -1,9 +1,9 @@ import { useCallback } from "react"; import { - BaseKey, - BaseRecord, - FormWithSyncWithLocationParams, - HttpError, + type BaseKey, + type BaseRecord, + type FormWithSyncWithLocationParams, + type HttpError, useGo, useModal, useParsed, @@ -13,9 +13,9 @@ import { useWarnAboutChange, useInvalidate, } from "@refinedev/core"; -import { FieldValues } from "react-hook-form"; +import type { FieldValues } from "react-hook-form"; -import { useForm, UseFormProps, UseFormReturnType } from "../useForm"; +import { useForm, type UseFormProps, type UseFormReturnType } from "../useForm"; import React from "react"; export type UseModalFormReturnType< diff --git a/packages/react-hook-form/src/useStepsForm/index.ts b/packages/react-hook-form/src/useStepsForm/index.ts index 1c834233ca0a..2bbc9fb04a3c 100644 --- a/packages/react-hook-form/src/useStepsForm/index.ts +++ b/packages/react-hook-form/src/useStepsForm/index.ts @@ -1,9 +1,9 @@ import { useEffect, useState } from "react"; -import { FieldValues, Path } from "react-hook-form"; -import { BaseRecord, HttpError } from "@refinedev/core"; +import type { FieldValues, Path } from "react-hook-form"; +import type { BaseRecord, HttpError } from "@refinedev/core"; import get from "lodash/get"; -import { useForm, UseFormProps, UseFormReturnType } from "../useForm"; +import { useForm, type UseFormProps, type UseFormReturnType } from "../useForm"; export type UseStepsFormReturnType< TQueryFnData extends BaseRecord = BaseRecord, diff --git a/packages/react-hook-form/test/dataMocks.ts b/packages/react-hook-form/test/dataMocks.ts index 3569348359d3..dc4fc299251d 100644 --- a/packages/react-hook-form/test/dataMocks.ts +++ b/packages/react-hook-form/test/dataMocks.ts @@ -1,4 +1,4 @@ -import { +import type { ParsedParams, IResourceItem, Action, diff --git a/packages/react-hook-form/test/index.tsx b/packages/react-hook-form/test/index.tsx index 00b5357eda98..6c20683bcd24 100644 --- a/packages/react-hook-form/test/index.tsx +++ b/packages/react-hook-form/test/index.tsx @@ -1,11 +1,11 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { MemoryRouter } from "react-router-dom"; import { Refine, - DataProvider, - IResourceItem, - I18nProvider, - IRefineOptions, + type DataProvider, + type IResourceItem, + type I18nProvider, + type IRefineOptions, } from "@refinedev/core"; import { MockJSONServer, mockRouterBindings } from "./dataMocks"; diff --git a/packages/react-router-v6/src/bindings.tsx b/packages/react-router-v6/src/bindings.tsx index e68ea35989ff..c1c1320f5c91 100644 --- a/packages/react-router-v6/src/bindings.tsx +++ b/packages/react-router-v6/src/bindings.tsx @@ -1,8 +1,8 @@ -import React, { ComponentProps } from "react"; +import React, { type ComponentProps } from "react"; import { - GoConfig, - ParseResponse, - RouterBindings, + type GoConfig, + type ParseResponse, + type RouterBindings, matchResourceFromRoute, ResourceContext, } from "@refinedev/core"; diff --git a/packages/react-router-v6/src/create-resource-routes.tsx b/packages/react-router-v6/src/create-resource-routes.tsx index 30f956d4f8b6..068fee540299 100644 --- a/packages/react-router-v6/src/create-resource-routes.tsx +++ b/packages/react-router-v6/src/create-resource-routes.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Action, ResourceProps } from "@refinedev/core"; +import type { Action, ResourceProps } from "@refinedev/core"; import { Route } from "react-router-dom"; diff --git a/packages/react-router-v6/src/document-title-handler.tsx b/packages/react-router-v6/src/document-title-handler.tsx index 1b1bdad43212..bb984fd264a7 100644 --- a/packages/react-router-v6/src/document-title-handler.tsx +++ b/packages/react-router-v6/src/document-title-handler.tsx @@ -1,6 +1,6 @@ import { - Action, - IResourceItem, + type Action, + type IResourceItem, useParsed, useTranslate, generateDefaultDocumentTitle, diff --git a/packages/react-router-v6/src/legacy/index.ts b/packages/react-router-v6/src/legacy/index.ts index c67eeb4e5960..bb7c30b457e5 100644 --- a/packages/react-router-v6/src/legacy/index.ts +++ b/packages/react-router-v6/src/legacy/index.ts @@ -1,11 +1,11 @@ import React from "react"; -import { handleUseParams, IRouterProvider } from "@refinedev/core"; +import { handleUseParams, type IRouterProvider } from "@refinedev/core"; import { useLocation, useParams, Link, - RouteProps, - BrowserRouterProps, + type RouteProps, + type BrowserRouterProps, useNavigate, } from "react-router-dom"; diff --git a/packages/react-router-v6/src/legacy/routeProvider.tsx b/packages/react-router-v6/src/legacy/routeProvider.tsx index 5e7bdb087e91..17d9eda3cfb4 100644 --- a/packages/react-router-v6/src/legacy/routeProvider.tsx +++ b/packages/react-router-v6/src/legacy/routeProvider.tsx @@ -8,11 +8,11 @@ import { useRefineContext, useRouterContext, CanAccess, - ResourceRouterParams, + type ResourceRouterParams, useActiveAuthProvider, useIsAuthenticated, } from "@refinedev/core"; -import { RefineRouteProps } from "./index"; +import type { RefineRouteProps } from "./index"; const ResourceComponent: React.FC<{ route: string }> = ({ route }) => { const { catchAll } = useRefineContext(); diff --git a/packages/react-router-v6/src/legacy/routerComponent.tsx b/packages/react-router-v6/src/legacy/routerComponent.tsx index 1aa591fe1c64..69b6184d2e69 100644 --- a/packages/react-router-v6/src/legacy/routerComponent.tsx +++ b/packages/react-router-v6/src/legacy/routerComponent.tsx @@ -1,11 +1,11 @@ import React from "react"; import { BrowserRouter, - BrowserRouterProps, + type BrowserRouterProps, MemoryRouter, - MemoryRouterProps, + type MemoryRouterProps, HashRouter, - HashRouterProps, + type HashRouterProps, } from "react-router-dom"; import { RouteProvider } from "./routeProvider"; diff --git a/packages/react-router-v6/src/navigate-to-resource.tsx b/packages/react-router-v6/src/navigate-to-resource.tsx index 9ab805b2c94a..8f82aa9bc506 100644 --- a/packages/react-router-v6/src/navigate-to-resource.tsx +++ b/packages/react-router-v6/src/navigate-to-resource.tsx @@ -1,5 +1,5 @@ import { useResource, useGetToPath } from "@refinedev/core"; -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; import { Navigate } from "react-router-dom"; type NavigateToResourceProps = PropsWithChildren<{ diff --git a/packages/react-table/src/useTable/index.spec.ts b/packages/react-table/src/useTable/index.spec.ts index 60117704105f..c07eba90791a 100644 --- a/packages/react-table/src/useTable/index.spec.ts +++ b/packages/react-table/src/useTable/index.spec.ts @@ -1,6 +1,6 @@ import { renderHook, waitFor } from "@testing-library/react"; import { act } from "react-dom/test-utils"; -import { ColumnDef } from "@tanstack/react-table"; +import type { ColumnDef } from "@tanstack/react-table"; import { TestWrapper } from "../../test"; import { useTable } from "./index"; diff --git a/packages/react-table/src/useTable/index.ts b/packages/react-table/src/useTable/index.ts index 9c567ac0aa7f..07a0ff1419c2 100644 --- a/packages/react-table/src/useTable/index.ts +++ b/packages/react-table/src/useTable/index.ts @@ -1,19 +1,19 @@ import { useEffect } from "react"; import { - BaseRecord, + type BaseRecord, ConditionalFilter, - CrudFilter, + type CrudFilter, CrudOperators, - HttpError, + type HttpError, LogicalFilter, useTable as useTableCore, - useTableProps as useTablePropsCore, - useTableReturnType as useTableReturnTypeCore, + type useTableProps as useTablePropsCore, + type useTableReturnType as useTableReturnTypeCore, } from "@refinedev/core"; import { useReactTable, - TableOptions, - Table, + type TableOptions, + type Table, getCoreRowModel, ColumnFilter, getSortedRowModel, diff --git a/packages/react-table/src/utils/column-filters-to-crud-filters/index.spec.ts b/packages/react-table/src/utils/column-filters-to-crud-filters/index.spec.ts index 856c4a93c4db..4f78b6a2ec16 100644 --- a/packages/react-table/src/utils/column-filters-to-crud-filters/index.spec.ts +++ b/packages/react-table/src/utils/column-filters-to-crud-filters/index.spec.ts @@ -1,4 +1,4 @@ -import { ColumnDef, ColumnFilter } from "@tanstack/react-table"; +import type { ColumnDef, ColumnFilter } from "@tanstack/react-table"; import { columnFiltersToCrudFilters } from "."; describe("columnFiltersToCrudFilters", () => { diff --git a/packages/react-table/src/utils/column-filters-to-crud-filters/index.ts b/packages/react-table/src/utils/column-filters-to-crud-filters/index.ts index 8d556ad4e549..a4858db0f94f 100644 --- a/packages/react-table/src/utils/column-filters-to-crud-filters/index.ts +++ b/packages/react-table/src/utils/column-filters-to-crud-filters/index.ts @@ -1,10 +1,10 @@ -import { +import type { ConditionalFilter, CrudFilter, CrudOperators, LogicalFilter, } from "@refinedev/core"; -import { +import type { ColumnDef, ColumnFilter, ColumnFiltersState, diff --git a/packages/react-table/src/utils/crud-filters-to-column-filters/index.spec.ts b/packages/react-table/src/utils/crud-filters-to-column-filters/index.spec.ts index a2be55097268..2263914e0ff8 100644 --- a/packages/react-table/src/utils/crud-filters-to-column-filters/index.spec.ts +++ b/packages/react-table/src/utils/crud-filters-to-column-filters/index.spec.ts @@ -1,6 +1,6 @@ -import { ColumnDef, ColumnFilter } from "@tanstack/react-table"; +import { type ColumnDef, ColumnFilter } from "@tanstack/react-table"; import { crudFiltersToColumnFilters } from "."; -import { CrudFilter } from "@refinedev/core"; +import type { CrudFilter } from "@refinedev/core"; describe("crudFiltersToColumnFilters", () => { it("should return with ColumnFilter type", () => { diff --git a/packages/react-table/src/utils/crud-filters-to-column-filters/index.ts b/packages/react-table/src/utils/crud-filters-to-column-filters/index.ts index f5292fefc2fc..fad915430ea2 100644 --- a/packages/react-table/src/utils/crud-filters-to-column-filters/index.ts +++ b/packages/react-table/src/utils/crud-filters-to-column-filters/index.ts @@ -1,5 +1,5 @@ -import { CrudFilter, LogicalFilter } from "@refinedev/core"; -import { ColumnDef, ColumnFilter } from "@tanstack/react-table"; +import type { CrudFilter, LogicalFilter } from "@refinedev/core"; +import type { ColumnDef, ColumnFilter } from "@tanstack/react-table"; type Params = { columns: ColumnDef<any, any>[]; diff --git a/packages/react-table/src/utils/get-removed-filters/index.spec.ts b/packages/react-table/src/utils/get-removed-filters/index.spec.ts index 3243ee4ec04e..41781ea0ea1d 100644 --- a/packages/react-table/src/utils/get-removed-filters/index.spec.ts +++ b/packages/react-table/src/utils/get-removed-filters/index.spec.ts @@ -1,4 +1,4 @@ -import { CrudFilter } from "@refinedev/core"; +import type { CrudFilter } from "@refinedev/core"; import { getRemovedFilters } from "."; describe("getRemovedFilters", () => { diff --git a/packages/react-table/src/utils/get-removed-filters/index.ts b/packages/react-table/src/utils/get-removed-filters/index.ts index 9c194e03378e..2877aa7e3bb5 100644 --- a/packages/react-table/src/utils/get-removed-filters/index.ts +++ b/packages/react-table/src/utils/get-removed-filters/index.ts @@ -1,4 +1,4 @@ -import { CrudFilter, LogicalFilter } from "@refinedev/core"; +import type { CrudFilter, LogicalFilter } from "@refinedev/core"; type Params = { nextFilters: CrudFilter[]; diff --git a/packages/react-table/test/dataMocks.ts b/packages/react-table/test/dataMocks.ts index a2c8be11a931..d656a3afaac0 100644 --- a/packages/react-table/test/dataMocks.ts +++ b/packages/react-table/test/dataMocks.ts @@ -1,4 +1,4 @@ -import { LegacyRouterProvider } from "@refinedev/core"; +import type { LegacyRouterProvider } from "@refinedev/core"; import { useParams, useLocation, Link, useNavigate } from "react-router-dom"; export const posts = [ diff --git a/packages/react-table/test/index.tsx b/packages/react-table/test/index.tsx index 53f8dc8f9f17..55542d4eed5f 100644 --- a/packages/react-table/test/index.tsx +++ b/packages/react-table/test/index.tsx @@ -1,6 +1,6 @@ -import React, { ReactNode } from "react"; +import React, { type ReactNode } from "react"; import { MemoryRouter } from "react-router-dom"; -import { Refine, DataProvider, IResourceItem } from "@refinedev/core"; +import { Refine, type DataProvider, type IResourceItem } from "@refinedev/core"; import { MockRouterProvider, MockJSONServer } from "./dataMocks"; diff --git a/packages/remix-router/src/bindings.tsx b/packages/remix-router/src/bindings.tsx index 7968bdd4d7e0..b283b78131b0 100644 --- a/packages/remix-router/src/bindings.tsx +++ b/packages/remix-router/src/bindings.tsx @@ -1,13 +1,13 @@ import { - GoConfig, - RouterBindings, + type GoConfig, + type RouterBindings, ResourceContext, matchResourceFromRoute, - ParseResponse, + type ParseResponse, } from "@refinedev/core"; import { useParams, useLocation, useNavigate, Link } from "@remix-run/react"; import qs from "qs"; -import React, { ComponentProps, useCallback, useContext } from "react"; +import React, { type ComponentProps, useCallback, useContext } from "react"; import { paramsFromCurrentPath } from "./params-from-current-path"; import { convertToNumberIfPossible } from "./convert-to-number-if-possible"; diff --git a/packages/remix-router/src/legacy/checkAuthentication.ts b/packages/remix-router/src/legacy/checkAuthentication.ts index a2b3bf9779e0..3f24f48c49a7 100644 --- a/packages/remix-router/src/legacy/checkAuthentication.ts +++ b/packages/remix-router/src/legacy/checkAuthentication.ts @@ -1,4 +1,4 @@ -import { LegacyAuthProvider } from "@refinedev/core"; +import type { LegacyAuthProvider } from "@refinedev/core"; import { redirect } from "@remix-run/node"; export const checkAuthentication = async ( diff --git a/packages/remix-router/src/legacy/routeComponent.tsx b/packages/remix-router/src/legacy/routeComponent.tsx index 133573ce0d11..00d0a533a76e 100644 --- a/packages/remix-router/src/legacy/routeComponent.tsx +++ b/packages/remix-router/src/legacy/routeComponent.tsx @@ -1,4 +1,4 @@ -import React, { PropsWithChildren, useEffect } from "react"; +import React, { type PropsWithChildren, useEffect } from "react"; import { useLoaderData } from "@remix-run/react"; import { diff --git a/packages/remix-router/src/legacy/routerProvider.ts b/packages/remix-router/src/legacy/routerProvider.ts index 940ccd739e85..a08e2d414263 100644 --- a/packages/remix-router/src/legacy/routerProvider.ts +++ b/packages/remix-router/src/legacy/routerProvider.ts @@ -1,4 +1,4 @@ -import { IRouterProvider } from "@refinedev/core"; +import type { IRouterProvider } from "@refinedev/core"; import { Link, useLocation, useNavigate } from "@remix-run/react"; import { Prompt } from "./prompt"; diff --git a/packages/remix-router/src/legacy/useParams.ts b/packages/remix-router/src/legacy/useParams.ts index eb12eddcfced..9baabb505b6b 100644 --- a/packages/remix-router/src/legacy/useParams.ts +++ b/packages/remix-router/src/legacy/useParams.ts @@ -1,8 +1,8 @@ import { handleUseParams, - IRouterProvider, - ResourceRouterParams, - RouteAction, + type IRouterProvider, + type ResourceRouterParams, + type RouteAction, } from "@refinedev/core"; import { useParams as useRemixParams } from "@remix-run/react"; diff --git a/packages/remix-router/src/navigate-to-resource.ts b/packages/remix-router/src/navigate-to-resource.ts index 34a9700b6795..ae8228b4a515 100644 --- a/packages/remix-router/src/navigate-to-resource.ts +++ b/packages/remix-router/src/navigate-to-resource.ts @@ -1,5 +1,5 @@ import { useResource, useGetToPath } from "@refinedev/core"; -import React, { PropsWithChildren } from "react"; +import React, { type PropsWithChildren } from "react"; import { useNavigate } from "@remix-run/react"; type NavigateToResourceProps = PropsWithChildren<{ diff --git a/packages/shared/dayjs-esm-replace-plugin.ts b/packages/shared/dayjs-esm-replace-plugin.ts index 4644fe90dc83..d8fc11631426 100644 --- a/packages/shared/dayjs-esm-replace-plugin.ts +++ b/packages/shared/dayjs-esm-replace-plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "esbuild"; +import type { Plugin } from "esbuild"; export const dayJsEsmReplacePlugin: Plugin = { name: "dayJsEsmReplace", diff --git a/packages/shared/lodash-replace-plugin.ts b/packages/shared/lodash-replace-plugin.ts index 458354b63a90..5ba839713237 100644 --- a/packages/shared/lodash-replace-plugin.ts +++ b/packages/shared/lodash-replace-plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "esbuild"; +import type { Plugin } from "esbuild"; import * as fs from "fs"; import path from "path"; diff --git a/packages/shared/mui-icons-material-esm-replace-plugin.ts b/packages/shared/mui-icons-material-esm-replace-plugin.ts index f7fae6fa8acb..2dce64c3e3e7 100644 --- a/packages/shared/mui-icons-material-esm-replace-plugin.ts +++ b/packages/shared/mui-icons-material-esm-replace-plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "esbuild"; +import type { Plugin } from "esbuild"; export const muiIconsMaterialEsmReplacePlugin: Plugin = { name: "muiIconsMaterialEsmReplace", diff --git a/packages/shared/next-js-esm-replace-plugin.ts b/packages/shared/next-js-esm-replace-plugin.ts index 0f9ec2477e96..2235252dd1f1 100644 --- a/packages/shared/next-js-esm-replace-plugin.ts +++ b/packages/shared/next-js-esm-replace-plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "esbuild"; +import type { Plugin } from "esbuild"; export const nextJsEsmReplacePlugin: Plugin = { name: "nextJsEsmReplace", diff --git a/packages/shared/prism-react-renderer-theme-replace-plugin.ts b/packages/shared/prism-react-renderer-theme-replace-plugin.ts index ba02092756dd..7299e52a2ad4 100644 --- a/packages/shared/prism-react-renderer-theme-replace-plugin.ts +++ b/packages/shared/prism-react-renderer-theme-replace-plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "esbuild"; +import type { Plugin } from "esbuild"; export const prismReactRendererThemeReplacePlugin: Plugin = { name: "prismReactRendererThemeReplace", diff --git a/packages/shared/remove-test-ids-plugin.ts b/packages/shared/remove-test-ids-plugin.ts index d4e38083aad6..49015ce09457 100644 --- a/packages/shared/remove-test-ids-plugin.ts +++ b/packages/shared/remove-test-ids-plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "esbuild"; +import type { Plugin } from "esbuild"; export const removeTestIdsPlugin: Plugin = { name: "react-remove-testids", diff --git a/packages/shared/replace-core-version-plugin.ts b/packages/shared/replace-core-version-plugin.ts index 23a74b07f868..355169c53c05 100644 --- a/packages/shared/replace-core-version-plugin.ts +++ b/packages/shared/replace-core-version-plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "esbuild"; +import type { Plugin } from "esbuild"; import * as fs from "fs"; import path from "path"; diff --git a/packages/shared/tabler-cjs-replace-plugin.ts b/packages/shared/tabler-cjs-replace-plugin.ts index 5b2d77bd5771..94c0943963ad 100644 --- a/packages/shared/tabler-cjs-replace-plugin.ts +++ b/packages/shared/tabler-cjs-replace-plugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "esbuild"; +import type { Plugin } from "esbuild"; import * as fs from "fs"; import path from "path"; diff --git a/packages/simple-rest/src/provider.ts b/packages/simple-rest/src/provider.ts index 873cbbd50d71..7bb55f3c841c 100644 --- a/packages/simple-rest/src/provider.ts +++ b/packages/simple-rest/src/provider.ts @@ -1,6 +1,6 @@ -import { AxiosInstance } from "axios"; +import type { AxiosInstance } from "axios"; import { stringify } from "query-string"; -import { DataProvider } from "@refinedev/core"; +import type { DataProvider } from "@refinedev/core"; import { axiosInstance, generateSort, generateFilter } from "./utils"; type MethodTypes = "get" | "delete" | "head" | "options"; diff --git a/packages/simple-rest/src/utils/axios.ts b/packages/simple-rest/src/utils/axios.ts index 22d10bcf0d03..94a654e93890 100644 --- a/packages/simple-rest/src/utils/axios.ts +++ b/packages/simple-rest/src/utils/axios.ts @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import axios from "axios"; const axiosInstance = axios.create(); diff --git a/packages/simple-rest/src/utils/generateFilter.ts b/packages/simple-rest/src/utils/generateFilter.ts index 2a2a659de31a..1732a6047856 100644 --- a/packages/simple-rest/src/utils/generateFilter.ts +++ b/packages/simple-rest/src/utils/generateFilter.ts @@ -1,4 +1,4 @@ -import { CrudFilters } from "@refinedev/core"; +import type { CrudFilters } from "@refinedev/core"; import { mapOperator } from "./mapOperator"; export const generateFilter = (filters?: CrudFilters) => { diff --git a/packages/simple-rest/src/utils/generateSort.ts b/packages/simple-rest/src/utils/generateSort.ts index 0d7d7935211c..044dc22a9519 100644 --- a/packages/simple-rest/src/utils/generateSort.ts +++ b/packages/simple-rest/src/utils/generateSort.ts @@ -1,4 +1,4 @@ -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; export const generateSort = (sorters?: CrudSorting) => { if (sorters && sorters.length > 0) { diff --git a/packages/simple-rest/src/utils/mapOperator.ts b/packages/simple-rest/src/utils/mapOperator.ts index 87f47c163025..5f6239d15144 100644 --- a/packages/simple-rest/src/utils/mapOperator.ts +++ b/packages/simple-rest/src/utils/mapOperator.ts @@ -1,4 +1,4 @@ -import { CrudOperators } from "@refinedev/core"; +import type { CrudOperators } from "@refinedev/core"; export const mapOperator = (operator: CrudOperators): string => { switch (operator) { diff --git a/packages/simple-rest/test/utils/generateFilter.spec.ts b/packages/simple-rest/test/utils/generateFilter.spec.ts index 5cd59f5c9808..89d2079d3645 100644 --- a/packages/simple-rest/test/utils/generateFilter.spec.ts +++ b/packages/simple-rest/test/utils/generateFilter.spec.ts @@ -1,4 +1,4 @@ -import { CrudFilters } from "@refinedev/core"; +import type { CrudFilters } from "@refinedev/core"; import { generateFilter } from "../../src/utils/generateFilter"; describe("generateFilter", () => { diff --git a/packages/simple-rest/test/utils/generateSort.spec.ts b/packages/simple-rest/test/utils/generateSort.spec.ts index 1cd860b95096..cc0308995619 100644 --- a/packages/simple-rest/test/utils/generateSort.spec.ts +++ b/packages/simple-rest/test/utils/generateSort.spec.ts @@ -1,4 +1,4 @@ -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; import { generateSort } from "../../src/utils"; describe("generateSort", () => { diff --git a/packages/simple-rest/test/utils/mapOperator.spec.ts b/packages/simple-rest/test/utils/mapOperator.spec.ts index e4ad6ba735e7..ef0ef7144d5c 100644 --- a/packages/simple-rest/test/utils/mapOperator.spec.ts +++ b/packages/simple-rest/test/utils/mapOperator.spec.ts @@ -1,4 +1,4 @@ -import { CrudOperators } from "@refinedev/core"; +import type { CrudOperators } from "@refinedev/core"; import { mapOperator } from "../../src/utils"; describe("mapOperator", () => { diff --git a/packages/strapi-v4/src/dataProvider.ts b/packages/strapi-v4/src/dataProvider.ts index bef6b9fb2e3f..ac288ff1a9ef 100644 --- a/packages/strapi-v4/src/dataProvider.ts +++ b/packages/strapi-v4/src/dataProvider.ts @@ -1,5 +1,5 @@ -import { DataProvider as IDataProvider, HttpError } from "@refinedev/core"; -import { AxiosInstance } from "axios"; +import type { DataProvider as IDataProvider, HttpError } from "@refinedev/core"; +import type { AxiosInstance } from "axios"; import qs from "qs"; import { axiosInstance, diff --git a/packages/strapi-v4/src/helpers/auth.ts b/packages/strapi-v4/src/helpers/auth.ts index 2831b91a3c05..d8b8f2f0604e 100644 --- a/packages/strapi-v4/src/helpers/auth.ts +++ b/packages/strapi-v4/src/helpers/auth.ts @@ -1,4 +1,4 @@ -import { MetaQuery, pickNotDeprecated } from "@refinedev/core"; +import { type MetaQuery, pickNotDeprecated } from "@refinedev/core"; import axios from "axios"; import qs from "qs"; diff --git a/packages/strapi-v4/src/utils/axios.ts b/packages/strapi-v4/src/utils/axios.ts index b8fdfc5ef5bb..cd28191f3f67 100644 --- a/packages/strapi-v4/src/utils/axios.ts +++ b/packages/strapi-v4/src/utils/axios.ts @@ -1,5 +1,5 @@ import axios from "axios"; -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; export const axiosInstance = axios.create(); diff --git a/packages/strapi-v4/src/utils/generateFilter.ts b/packages/strapi-v4/src/utils/generateFilter.ts index 1ce30c46d6ce..a93bec27cdaf 100644 --- a/packages/strapi-v4/src/utils/generateFilter.ts +++ b/packages/strapi-v4/src/utils/generateFilter.ts @@ -1,4 +1,8 @@ -import { CrudFilters, LogicalFilter, ConditionalFilter } from "@refinedev/core"; +import type { + CrudFilters, + LogicalFilter, + ConditionalFilter, +} from "@refinedev/core"; import { mapOperator } from "./mapOperator"; import qs from "qs"; diff --git a/packages/strapi-v4/src/utils/generateSort.ts b/packages/strapi-v4/src/utils/generateSort.ts index 878d407dd40a..a71d31031bd4 100644 --- a/packages/strapi-v4/src/utils/generateSort.ts +++ b/packages/strapi-v4/src/utils/generateSort.ts @@ -1,4 +1,4 @@ -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; export const generateSort = (sorters?: CrudSorting) => { const _sort: string[] = []; diff --git a/packages/strapi-v4/src/utils/mapOperator.ts b/packages/strapi-v4/src/utils/mapOperator.ts index 15e927e6cedd..c8fa6ba0a260 100644 --- a/packages/strapi-v4/src/utils/mapOperator.ts +++ b/packages/strapi-v4/src/utils/mapOperator.ts @@ -1,4 +1,4 @@ -import { CrudOperators } from "@refinedev/core"; +import type { CrudOperators } from "@refinedev/core"; export const mapOperator = (operator: CrudOperators) => { switch (operator) { diff --git a/packages/strapi-v4/src/utils/transformHttpError.ts b/packages/strapi-v4/src/utils/transformHttpError.ts index 2540f14e44e5..145d9426e80c 100644 --- a/packages/strapi-v4/src/utils/transformHttpError.ts +++ b/packages/strapi-v4/src/utils/transformHttpError.ts @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { transformErrorMessages } from "./transformErrorMessages"; export const transformHttpError = (err: any): HttpError => { diff --git a/packages/strapi-v4/test/utils/generateFilter.spec.ts b/packages/strapi-v4/test/utils/generateFilter.spec.ts index bd40abd0de7a..7ee8d49377b4 100644 --- a/packages/strapi-v4/test/utils/generateFilter.spec.ts +++ b/packages/strapi-v4/test/utils/generateFilter.spec.ts @@ -1,4 +1,4 @@ -import { CrudFilters } from "@refinedev/core"; +import type { CrudFilters } from "@refinedev/core"; import { generateFilter, generateNestedFilterField } from "../../src/utils"; describe("generateFilter", () => { diff --git a/packages/strapi-v4/test/utils/generateSort.spec.ts b/packages/strapi-v4/test/utils/generateSort.spec.ts index a95f52be4385..775b8ad68a68 100644 --- a/packages/strapi-v4/test/utils/generateSort.spec.ts +++ b/packages/strapi-v4/test/utils/generateSort.spec.ts @@ -1,4 +1,4 @@ -import { CrudSorting } from "@refinedev/core"; +import type { CrudSorting } from "@refinedev/core"; import { generateSort } from "../../src/utils"; describe("generateSort", () => { diff --git a/packages/strapi-v4/test/utils/mapOperator.spec.ts b/packages/strapi-v4/test/utils/mapOperator.spec.ts index 10312ca8d33a..b2db82dba300 100644 --- a/packages/strapi-v4/test/utils/mapOperator.spec.ts +++ b/packages/strapi-v4/test/utils/mapOperator.spec.ts @@ -1,4 +1,4 @@ -import { CrudOperators } from "@refinedev/core"; +import type { CrudOperators } from "@refinedev/core"; import { mapOperator } from "../../src/utils"; describe("mapOperator", () => { diff --git a/packages/strapi-v4/test/utils/transformHttpError.spec.ts b/packages/strapi-v4/test/utils/transformHttpError.spec.ts index 0fd525cd9eb1..a712e968129c 100644 --- a/packages/strapi-v4/test/utils/transformHttpError.spec.ts +++ b/packages/strapi-v4/test/utils/transformHttpError.spec.ts @@ -1,4 +1,4 @@ -import { HttpError } from "@refinedev/core"; +import type { HttpError } from "@refinedev/core"; import { transformHttpError } from "../../src/utils/transformHttpError"; import * as _transformErrorMessages from "../../src/utils/transformErrorMessages"; diff --git a/packages/strapi/src/dataProvider.ts b/packages/strapi/src/dataProvider.ts index 378a948fdb83..10d0e6fe3cd2 100644 --- a/packages/strapi/src/dataProvider.ts +++ b/packages/strapi/src/dataProvider.ts @@ -1,4 +1,4 @@ -import { +import type { BaseKey, CrudFilters, CrudSorting, @@ -6,7 +6,7 @@ import { HttpError, LogicalFilter, } from "@refinedev/core"; -import axios, { AxiosInstance } from "axios"; +import axios, { type AxiosInstance } from "axios"; import { stringify } from "query-string"; const axiosInstance = axios.create(); diff --git a/packages/supabase/src/dataProvider/index.ts b/packages/supabase/src/dataProvider/index.ts index f8cde1309aa0..6a624f84180d 100644 --- a/packages/supabase/src/dataProvider/index.ts +++ b/packages/supabase/src/dataProvider/index.ts @@ -1,5 +1,5 @@ -import { DataProvider } from "@refinedev/core"; -import { SupabaseClient } from "@supabase/supabase-js"; +import type { DataProvider } from "@refinedev/core"; +import type { SupabaseClient } from "@supabase/supabase-js"; import { generateFilter, handleError } from "../utils"; export const dataProvider = ( diff --git a/packages/supabase/src/liveProvider/index.ts b/packages/supabase/src/liveProvider/index.ts index 1451605dd3b4..19200da1de4c 100644 --- a/packages/supabase/src/liveProvider/index.ts +++ b/packages/supabase/src/liveProvider/index.ts @@ -1,5 +1,5 @@ -import { LiveProvider, CrudFilter, CrudFilters } from "@refinedev/core"; -import { +import type { LiveProvider, CrudFilter, CrudFilters } from "@refinedev/core"; +import type { RealtimeChannel, RealtimePostgresChangesPayload, SupabaseClient, diff --git a/packages/supabase/src/types/index.ts b/packages/supabase/src/types/index.ts index 52036bd8ff6c..09e02a5e05ee 100644 --- a/packages/supabase/src/types/index.ts +++ b/packages/supabase/src/types/index.ts @@ -1,4 +1,4 @@ -import { LiveEvent } from "@refinedev/core"; +import type { LiveEvent } from "@refinedev/core"; import { REALTIME_POSTGRES_CHANGES_LISTEN_EVENT } from "@supabase/supabase-js"; export const liveTypes: Record< diff --git a/packages/supabase/src/utils/generateFilter.ts b/packages/supabase/src/utils/generateFilter.ts index be50a79dfe17..9c43d9e3ce33 100644 --- a/packages/supabase/src/utils/generateFilter.ts +++ b/packages/supabase/src/utils/generateFilter.ts @@ -1,4 +1,4 @@ -import { CrudFilter } from "@refinedev/core"; +import type { CrudFilter } from "@refinedev/core"; import { mapOperator } from "./mapOperator"; export const generateFilter = (filter: CrudFilter, query: any) => { diff --git a/packages/supabase/src/utils/handleError.ts b/packages/supabase/src/utils/handleError.ts index 131830a5d55e..8c334ae22e7f 100644 --- a/packages/supabase/src/utils/handleError.ts +++ b/packages/supabase/src/utils/handleError.ts @@ -1,5 +1,5 @@ -import { HttpError } from "@refinedev/core"; -import { PostgrestError } from "@supabase/supabase-js"; +import type { HttpError } from "@refinedev/core"; +import type { PostgrestError } from "@supabase/supabase-js"; export const handleError = (error: PostgrestError) => { const customError: HttpError = { diff --git a/packages/supabase/src/utils/mapOperator.ts b/packages/supabase/src/utils/mapOperator.ts index 50d17e2dc3d7..c9539cf8a72b 100644 --- a/packages/supabase/src/utils/mapOperator.ts +++ b/packages/supabase/src/utils/mapOperator.ts @@ -1,4 +1,4 @@ -import { CrudOperators } from "@refinedev/core"; +import type { CrudOperators } from "@refinedev/core"; export const mapOperator = (operator: CrudOperators) => { switch (operator) { diff --git a/packages/supabase/test/getList/index.spec.ts b/packages/supabase/test/getList/index.spec.ts index d869222b611c..39c5910827c8 100644 --- a/packages/supabase/test/getList/index.spec.ts +++ b/packages/supabase/test/getList/index.spec.ts @@ -1,4 +1,4 @@ -import { SupabaseClient } from "@supabase/supabase-js"; +import type { SupabaseClient } from "@supabase/supabase-js"; import { dataProvider } from "../../src/index"; import supabaseClient from "../supabaseClient"; import "./index.mock"; diff --git a/packages/supabase/test/utils/generateFilter.spec.ts b/packages/supabase/test/utils/generateFilter.spec.ts index efaac6f2d79a..efe5133260a1 100644 --- a/packages/supabase/test/utils/generateFilter.spec.ts +++ b/packages/supabase/test/utils/generateFilter.spec.ts @@ -1,4 +1,4 @@ -import { CrudFilter } from "@refinedev/core"; +import type { CrudFilter } from "@refinedev/core"; import { generateFilter } from "../../src/utils"; describe("generateFilter", () => { diff --git a/packages/supabase/test/utils/handleError.spec.ts b/packages/supabase/test/utils/handleError.spec.ts index 2a586edd78ac..ba81471a0694 100644 --- a/packages/supabase/test/utils/handleError.spec.ts +++ b/packages/supabase/test/utils/handleError.spec.ts @@ -1,6 +1,6 @@ import { handleError } from "../../src/utils"; -import { PostgrestError } from "@supabase/supabase-js"; -import { HttpError } from "@refinedev/core"; +import type { PostgrestError } from "@supabase/supabase-js"; +import type { HttpError } from "@refinedev/core"; describe("handleError", () => { it("should transform PostgrestError into HttpError and reject the promise", async () => { diff --git a/packages/supabase/test/utils/mapOperator.spec.ts b/packages/supabase/test/utils/mapOperator.spec.ts index 38b13ab79882..2f6e2c3bb260 100644 --- a/packages/supabase/test/utils/mapOperator.spec.ts +++ b/packages/supabase/test/utils/mapOperator.spec.ts @@ -1,5 +1,5 @@ import { mapOperator } from "../../src/utils"; -import { CrudOperators } from "@refinedev/core"; +import type { CrudOperators } from "@refinedev/core"; describe("mapOperator", () => { it("should correctly map CrudOperators to their corresponding string values", () => { diff --git a/packages/ui-tests/src/test/dataMocks.tsx b/packages/ui-tests/src/test/dataMocks.tsx index 90f61e7196fe..6e01274b7aa8 100644 --- a/packages/ui-tests/src/test/dataMocks.tsx +++ b/packages/ui-tests/src/test/dataMocks.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { +import type { ParsedParams, IResourceItem, Action, diff --git a/packages/ui-tests/src/test/index.tsx b/packages/ui-tests/src/test/index.tsx index 98ae569fa524..725c12ff90f0 100644 --- a/packages/ui-tests/src/test/index.tsx +++ b/packages/ui-tests/src/test/index.tsx @@ -1,10 +1,10 @@ import React from "react"; import { BrowserRouter } from "react-router-dom"; -import { AuthProvider, Refine } from "@refinedev/core"; +import { type AuthProvider, Refine } from "@refinedev/core"; import { MockRouterProvider, MockJSONServer } from "@test"; -import { +import type { I18nProvider, AccessControlProvider, LegacyAuthProvider, diff --git a/packages/ui-tests/src/tests/autoSaveIndicator.tsx b/packages/ui-tests/src/tests/autoSaveIndicator.tsx index 085506fe33b9..f12c99f5e407 100644 --- a/packages/ui-tests/src/tests/autoSaveIndicator.tsx +++ b/packages/ui-tests/src/tests/autoSaveIndicator.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { AutoSaveIndicatorProps } from "@refinedev/core"; +import type { AutoSaveIndicatorProps } from "@refinedev/core"; import { render } from "@test"; export const autoSaveIndicatorTests = ( diff --git a/packages/ui-tests/src/tests/breadcrumb.tsx b/packages/ui-tests/src/tests/breadcrumb.tsx index 3eb7f3810d5c..1dd60e041c88 100644 --- a/packages/ui-tests/src/tests/breadcrumb.tsx +++ b/packages/ui-tests/src/tests/breadcrumb.tsx @@ -1,8 +1,8 @@ import React from "react"; import { Route, Routes } from "react-router-dom"; -import { RefineBreadcrumbProps } from "@refinedev/ui-types"; +import type { RefineBreadcrumbProps } from "@refinedev/ui-types"; -import { act, ITestWrapperProps, render, TestWrapper } from "@test"; +import { act, type ITestWrapperProps, render, TestWrapper } from "@test"; const renderBreadcrumb = ( children: React.ReactNode, diff --git a/packages/ui-tests/src/tests/buttons/clone.tsx b/packages/ui-tests/src/tests/buttons/clone.tsx index b3f558d8cf45..d66b219090d1 100644 --- a/packages/ui-tests/src/tests/buttons/clone.tsx +++ b/packages/ui-tests/src/tests/buttons/clone.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Route, Routes } from "react-router-dom"; import { - RefineCloneButtonProps, + type RefineCloneButtonProps, RefineButtonTestIds, } from "@refinedev/ui-types"; diff --git a/packages/ui-tests/src/tests/buttons/create.tsx b/packages/ui-tests/src/tests/buttons/create.tsx index 15ed064ad9f2..8153e269ecfc 100644 --- a/packages/ui-tests/src/tests/buttons/create.tsx +++ b/packages/ui-tests/src/tests/buttons/create.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Route, Routes } from "react-router-dom"; import { - RefineCreateButtonProps, + type RefineCreateButtonProps, RefineButtonTestIds, } from "@refinedev/ui-types"; diff --git a/packages/ui-tests/src/tests/buttons/delete.tsx b/packages/ui-tests/src/tests/buttons/delete.tsx index 0f984789480f..2634c8d9848e 100644 --- a/packages/ui-tests/src/tests/buttons/delete.tsx +++ b/packages/ui-tests/src/tests/buttons/delete.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - RefineDeleteButtonProps, + type RefineDeleteButtonProps, RefineButtonTestIds, } from "@refinedev/ui-types"; diff --git a/packages/ui-tests/src/tests/buttons/edit.tsx b/packages/ui-tests/src/tests/buttons/edit.tsx index 29e956b069de..8442644e409c 100644 --- a/packages/ui-tests/src/tests/buttons/edit.tsx +++ b/packages/ui-tests/src/tests/buttons/edit.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - RefineEditButtonProps, + type RefineEditButtonProps, RefineButtonTestIds, } from "@refinedev/ui-types"; diff --git a/packages/ui-tests/src/tests/buttons/export.tsx b/packages/ui-tests/src/tests/buttons/export.tsx index 64924f0997ff..3143d6fab0ea 100644 --- a/packages/ui-tests/src/tests/buttons/export.tsx +++ b/packages/ui-tests/src/tests/buttons/export.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - RefineExportButtonProps, + type RefineExportButtonProps, RefineButtonTestIds, } from "@refinedev/ui-types"; diff --git a/packages/ui-tests/src/tests/buttons/import.tsx b/packages/ui-tests/src/tests/buttons/import.tsx index ee688abd42b0..4790bfb7651c 100644 --- a/packages/ui-tests/src/tests/buttons/import.tsx +++ b/packages/ui-tests/src/tests/buttons/import.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - RefineImportButtonProps, + type RefineImportButtonProps, RefineButtonTestIds, } from "@refinedev/ui-types"; diff --git a/packages/ui-tests/src/tests/buttons/list.tsx b/packages/ui-tests/src/tests/buttons/list.tsx index 52ffdbc56a05..641d0cf29876 100644 --- a/packages/ui-tests/src/tests/buttons/list.tsx +++ b/packages/ui-tests/src/tests/buttons/list.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - RefineListButtonProps, + type RefineListButtonProps, RefineButtonTestIds, } from "@refinedev/ui-types"; diff --git a/packages/ui-tests/src/tests/buttons/refresh.tsx b/packages/ui-tests/src/tests/buttons/refresh.tsx index ee55b4ee4b85..bdeaef97d7e1 100644 --- a/packages/ui-tests/src/tests/buttons/refresh.tsx +++ b/packages/ui-tests/src/tests/buttons/refresh.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - RefineRefreshButtonProps, + type RefineRefreshButtonProps, RefineButtonTestIds, } from "@refinedev/ui-types"; diff --git a/packages/ui-tests/src/tests/buttons/save.tsx b/packages/ui-tests/src/tests/buttons/save.tsx index 40c9aaa7ff5b..2ece7379b97e 100644 --- a/packages/ui-tests/src/tests/buttons/save.tsx +++ b/packages/ui-tests/src/tests/buttons/save.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - RefineSaveButtonProps, + type RefineSaveButtonProps, RefineButtonTestIds, } from "@refinedev/ui-types"; diff --git a/packages/ui-tests/src/tests/buttons/show.tsx b/packages/ui-tests/src/tests/buttons/show.tsx index b2d07fa8457e..d97d486324ac 100644 --- a/packages/ui-tests/src/tests/buttons/show.tsx +++ b/packages/ui-tests/src/tests/buttons/show.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - RefineShowButtonProps, + type RefineShowButtonProps, RefineButtonTestIds, } from "@refinedev/ui-types"; diff --git a/packages/ui-tests/src/tests/crud/create.tsx b/packages/ui-tests/src/tests/crud/create.tsx index 41647e902e72..9d1c4611e5c5 100644 --- a/packages/ui-tests/src/tests/crud/create.tsx +++ b/packages/ui-tests/src/tests/crud/create.tsx @@ -1,11 +1,11 @@ import React from "react"; import { Route, Routes } from "react-router-dom"; import { - RefineCrudCreateProps, + type RefineCrudCreateProps, RefineButtonTestIds, } from "@refinedev/ui-types"; -import { ITestWrapperProps, render, TestWrapper } from "@test"; +import { type ITestWrapperProps, render, TestWrapper } from "@test"; const renderCreate = ( create: React.ReactNode, diff --git a/packages/ui-tests/src/tests/crud/edit.tsx b/packages/ui-tests/src/tests/crud/edit.tsx index 4bbbcefb9a3f..5d713e9f07b1 100644 --- a/packages/ui-tests/src/tests/crud/edit.tsx +++ b/packages/ui-tests/src/tests/crud/edit.tsx @@ -1,9 +1,12 @@ import React from "react"; import { Route, Routes } from "react-router-dom"; -import { RefineCrudEditProps, RefineButtonTestIds } from "@refinedev/ui-types"; -import { AccessControlProvider } from "@refinedev/core"; +import { + type RefineCrudEditProps, + RefineButtonTestIds, +} from "@refinedev/ui-types"; +import type { AccessControlProvider } from "@refinedev/core"; -import { ITestWrapperProps, render, TestWrapper } from "@test"; +import { type ITestWrapperProps, render, TestWrapper } from "@test"; const renderEdit = ( edit: React.ReactNode, diff --git a/packages/ui-tests/src/tests/crud/list.tsx b/packages/ui-tests/src/tests/crud/list.tsx index 178552906489..a363b331dfd1 100644 --- a/packages/ui-tests/src/tests/crud/list.tsx +++ b/packages/ui-tests/src/tests/crud/list.tsx @@ -1,9 +1,18 @@ import React from "react"; -import { AccessControlProvider } from "@refinedev/core"; +import type { AccessControlProvider } from "@refinedev/core"; import { Route, Routes } from "react-router-dom"; -import { RefineCrudListProps, RefineButtonTestIds } from "@refinedev/ui-types"; - -import { act, ITestWrapperProps, render, TestWrapper, waitFor } from "@test"; +import { + type RefineCrudListProps, + RefineButtonTestIds, +} from "@refinedev/ui-types"; + +import { + act, + type ITestWrapperProps, + render, + TestWrapper, + waitFor, +} from "@test"; const renderList = ( list: React.ReactNode, diff --git a/packages/ui-tests/src/tests/crud/show.tsx b/packages/ui-tests/src/tests/crud/show.tsx index c920f213d70d..8eb374a5de1c 100644 --- a/packages/ui-tests/src/tests/crud/show.tsx +++ b/packages/ui-tests/src/tests/crud/show.tsx @@ -1,9 +1,12 @@ import React from "react"; import { Route, Routes } from "react-router-dom"; -import { RefineCrudShowProps, RefineButtonTestIds } from "@refinedev/ui-types"; -import { AccessControlProvider } from "@refinedev/core"; +import { + type RefineCrudShowProps, + RefineButtonTestIds, +} from "@refinedev/ui-types"; +import type { AccessControlProvider } from "@refinedev/core"; -import { ITestWrapperProps, render, TestWrapper } from "@test"; +import { type ITestWrapperProps, render, TestWrapper } from "@test"; const renderShow = ( show: React.ReactNode, diff --git a/packages/ui-tests/src/tests/fields/boolean.tsx b/packages/ui-tests/src/tests/fields/boolean.tsx index 30d3c6ad4d6a..040582ed2523 100644 --- a/packages/ui-tests/src/tests/fields/boolean.tsx +++ b/packages/ui-tests/src/tests/fields/boolean.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { RefineFieldBooleanProps } from "@refinedev/ui-types"; +import type { RefineFieldBooleanProps } from "@refinedev/ui-types"; import { act, fireEvent, render } from "@test"; diff --git a/packages/ui-tests/src/tests/fields/date.tsx b/packages/ui-tests/src/tests/fields/date.tsx index d0ea50bb6790..67f570095a5b 100644 --- a/packages/ui-tests/src/tests/fields/date.tsx +++ b/packages/ui-tests/src/tests/fields/date.tsx @@ -1,7 +1,7 @@ import React from "react"; -import { ConfigType } from "dayjs"; +import type { ConfigType } from "dayjs"; -import { RefineFieldDateProps } from "@refinedev/ui-types"; +import type { RefineFieldDateProps } from "@refinedev/ui-types"; import { render } from "@test"; diff --git a/packages/ui-tests/src/tests/fields/email.tsx b/packages/ui-tests/src/tests/fields/email.tsx index 058b92f2687e..a646b5f87d7b 100644 --- a/packages/ui-tests/src/tests/fields/email.tsx +++ b/packages/ui-tests/src/tests/fields/email.tsx @@ -1,5 +1,5 @@ -import React, { ReactNode } from "react"; -import { RefineFieldEmailProps } from "@refinedev/ui-types"; +import React, { type ReactNode } from "react"; +import type { RefineFieldEmailProps } from "@refinedev/ui-types"; import { render } from "@test"; diff --git a/packages/ui-tests/src/tests/fields/file.tsx b/packages/ui-tests/src/tests/fields/file.tsx index b71d5bfd8d85..471271300931 100644 --- a/packages/ui-tests/src/tests/fields/file.tsx +++ b/packages/ui-tests/src/tests/fields/file.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { RefineFieldFileProps } from "@refinedev/ui-types"; +import type { RefineFieldFileProps } from "@refinedev/ui-types"; import { render } from "@test"; diff --git a/packages/ui-tests/src/tests/fields/image.tsx b/packages/ui-tests/src/tests/fields/image.tsx index a7b89f37683a..9701fbc23697 100644 --- a/packages/ui-tests/src/tests/fields/image.tsx +++ b/packages/ui-tests/src/tests/fields/image.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { RefineFieldImageProps } from "@refinedev/ui-types"; +import type { RefineFieldImageProps } from "@refinedev/ui-types"; import { render } from "@test"; diff --git a/packages/ui-tests/src/tests/fields/markdown.tsx b/packages/ui-tests/src/tests/fields/markdown.tsx index 4972d0f9b514..50a92cc7f11c 100644 --- a/packages/ui-tests/src/tests/fields/markdown.tsx +++ b/packages/ui-tests/src/tests/fields/markdown.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { RefineFieldMarkdownProps } from "@refinedev/ui-types"; +import type { RefineFieldMarkdownProps } from "@refinedev/ui-types"; import { render } from "@test"; diff --git a/packages/ui-tests/src/tests/fields/number.tsx b/packages/ui-tests/src/tests/fields/number.tsx index 8c1221b105c3..8509e052c6f5 100644 --- a/packages/ui-tests/src/tests/fields/number.tsx +++ b/packages/ui-tests/src/tests/fields/number.tsx @@ -1,5 +1,5 @@ -import React, { ReactChild } from "react"; -import { RefineFieldNumberProps } from "@refinedev/ui-types"; +import React, { type ReactChild } from "react"; +import type { RefineFieldNumberProps } from "@refinedev/ui-types"; import { render } from "@test"; diff --git a/packages/ui-tests/src/tests/fields/tag.tsx b/packages/ui-tests/src/tests/fields/tag.tsx index 4035f589f2ac..88069042ff7f 100644 --- a/packages/ui-tests/src/tests/fields/tag.tsx +++ b/packages/ui-tests/src/tests/fields/tag.tsx @@ -1,5 +1,5 @@ -import React, { ReactNode } from "react"; -import { RefineFieldTagProps } from "@refinedev/ui-types"; +import React, { type ReactNode } from "react"; +import type { RefineFieldTagProps } from "@refinedev/ui-types"; import { render } from "@test"; diff --git a/packages/ui-tests/src/tests/fields/text.tsx b/packages/ui-tests/src/tests/fields/text.tsx index b1fc2b7eed06..4ef654ef4451 100644 --- a/packages/ui-tests/src/tests/fields/text.tsx +++ b/packages/ui-tests/src/tests/fields/text.tsx @@ -1,5 +1,5 @@ -import React, { ReactNode } from "react"; -import { RefineFieldTextProps } from "@refinedev/ui-types"; +import React, { type ReactNode } from "react"; +import type { RefineFieldTextProps } from "@refinedev/ui-types"; import { render } from "@test"; diff --git a/packages/ui-tests/src/tests/fields/url.tsx b/packages/ui-tests/src/tests/fields/url.tsx index a763ef54303b..e50282df0686 100644 --- a/packages/ui-tests/src/tests/fields/url.tsx +++ b/packages/ui-tests/src/tests/fields/url.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { RefineFieldUrlProps } from "@refinedev/ui-types"; +import type { RefineFieldUrlProps } from "@refinedev/ui-types"; import { render } from "@test"; diff --git a/packages/ui-tests/src/tests/layout/footer.tsx b/packages/ui-tests/src/tests/layout/footer.tsx index ccb6794ee844..346293d3b786 100644 --- a/packages/ui-tests/src/tests/layout/footer.tsx +++ b/packages/ui-tests/src/tests/layout/footer.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { RefineLayoutFooterProps } from "@refinedev/ui-types"; +import type { RefineLayoutFooterProps } from "@refinedev/ui-types"; import { act, render, TestWrapper } from "@test"; diff --git a/packages/ui-tests/src/tests/layout/header.tsx b/packages/ui-tests/src/tests/layout/header.tsx index 923ee225cc3b..eee2da57e433 100644 --- a/packages/ui-tests/src/tests/layout/header.tsx +++ b/packages/ui-tests/src/tests/layout/header.tsx @@ -1,7 +1,7 @@ import React from "react"; -import { AuthProvider } from "@refinedev/core"; -import { RefineLayoutHeaderProps } from "@refinedev/ui-types"; +import type { AuthProvider } from "@refinedev/core"; +import type { RefineLayoutHeaderProps } from "@refinedev/ui-types"; import { render, TestWrapper } from "@test"; diff --git a/packages/ui-tests/src/tests/layout/layout.tsx b/packages/ui-tests/src/tests/layout/layout.tsx index 9a30cfd9f897..972002f0ac29 100644 --- a/packages/ui-tests/src/tests/layout/layout.tsx +++ b/packages/ui-tests/src/tests/layout/layout.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { RefineLayoutLayoutProps } from "@refinedev/ui-types"; +import type { RefineLayoutLayoutProps } from "@refinedev/ui-types"; import { act, render, TestWrapper } from "@test"; diff --git a/packages/ui-tests/src/tests/layout/sider.tsx b/packages/ui-tests/src/tests/layout/sider.tsx index 9a6176c123c0..3dbc3ae5f0b1 100644 --- a/packages/ui-tests/src/tests/layout/sider.tsx +++ b/packages/ui-tests/src/tests/layout/sider.tsx @@ -1,8 +1,8 @@ import React from "react"; -import { RefineThemedLayoutV2SiderProps } from "@refinedev/ui-types"; +import type { RefineThemedLayoutV2SiderProps } from "@refinedev/ui-types"; import { act, mockRouterBindings, render, TestWrapper, waitFor } from "@test"; -import { AuthProvider, LegacyAuthProvider } from "@refinedev/core"; +import type { AuthProvider, LegacyAuthProvider } from "@refinedev/core"; import { Route, Router, Routes } from "react-router-dom"; const mockLegacyAuthProvider: LegacyAuthProvider & { isProvided: boolean } = { diff --git a/packages/ui-tests/src/tests/layout/title.tsx b/packages/ui-tests/src/tests/layout/title.tsx index e29074e19a6a..2e99f5ed9c28 100644 --- a/packages/ui-tests/src/tests/layout/title.tsx +++ b/packages/ui-tests/src/tests/layout/title.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { RefineLayoutTitleProps } from "@refinedev/ui-types"; +import type { RefineLayoutTitleProps } from "@refinedev/ui-types"; import { render, TestWrapper } from "@test"; diff --git a/packages/ui-tests/src/tests/pages/auth/authPage.tsx b/packages/ui-tests/src/tests/pages/auth/authPage.tsx index 8408b950f99e..2babba342f28 100644 --- a/packages/ui-tests/src/tests/pages/auth/authPage.tsx +++ b/packages/ui-tests/src/tests/pages/auth/authPage.tsx @@ -1,5 +1,5 @@ -import React, { FC } from "react"; -import { AuthPageProps } from "@refinedev/core"; +import React, { type FC } from "react"; +import type { AuthPageProps } from "@refinedev/core"; import { render, TestWrapper } from "@test"; diff --git a/packages/ui-tests/src/tests/pages/auth/forgotPassword.tsx b/packages/ui-tests/src/tests/pages/auth/forgotPassword.tsx index 3c0284004242..2c3dab024363 100644 --- a/packages/ui-tests/src/tests/pages/auth/forgotPassword.tsx +++ b/packages/ui-tests/src/tests/pages/auth/forgotPassword.tsx @@ -1,5 +1,5 @@ -import React, { FC } from "react"; -import { ForgotPasswordPageProps } from "@refinedev/core"; +import React, { type FC } from "react"; +import type { ForgotPasswordPageProps } from "@refinedev/core"; import { fireEvent, diff --git a/packages/ui-tests/src/tests/pages/auth/login.tsx b/packages/ui-tests/src/tests/pages/auth/login.tsx index 8b565f29ffe4..c2d8e7fede01 100644 --- a/packages/ui-tests/src/tests/pages/auth/login.tsx +++ b/packages/ui-tests/src/tests/pages/auth/login.tsx @@ -1,4 +1,4 @@ -import React, { FC } from "react"; +import React, { type FC } from "react"; import { fireEvent, @@ -8,7 +8,7 @@ import { TestWrapper, waitFor, } from "@test"; -import { LoginPageProps } from "@refinedev/core"; +import type { LoginPageProps } from "@refinedev/core"; export const pageLoginTests = ( LoginPage: FC<LoginPageProps<any, any, any>>, diff --git a/packages/ui-tests/src/tests/pages/auth/register.tsx b/packages/ui-tests/src/tests/pages/auth/register.tsx index 02e89007ac1b..f246857f012c 100644 --- a/packages/ui-tests/src/tests/pages/auth/register.tsx +++ b/packages/ui-tests/src/tests/pages/auth/register.tsx @@ -1,4 +1,4 @@ -import React, { FC } from "react"; +import React, { type FC } from "react"; import { fireEvent, @@ -8,7 +8,7 @@ import { TestWrapper, waitFor, } from "@test"; -import { RegisterPageProps } from "@refinedev/core"; +import type { RegisterPageProps } from "@refinedev/core"; export const pageRegisterTests = ( RegisterPage: FC<RegisterPageProps<any, any, any>>, diff --git a/packages/ui-tests/src/tests/pages/auth/updatePassword.tsx b/packages/ui-tests/src/tests/pages/auth/updatePassword.tsx index ee525c6242ac..3a75deaff5d1 100644 --- a/packages/ui-tests/src/tests/pages/auth/updatePassword.tsx +++ b/packages/ui-tests/src/tests/pages/auth/updatePassword.tsx @@ -1,4 +1,4 @@ -import React, { FC } from "react"; +import React, { type FC } from "react"; import { fireEvent, @@ -8,7 +8,7 @@ import { TestWrapper, waitFor, } from "@test"; -import { UpdatePasswordPageProps } from "@refinedev/core"; +import type { UpdatePasswordPageProps } from "@refinedev/core"; export const pageUpdatePasswordTests = ( UpdatePasswordPage: FC<UpdatePasswordPageProps<any, any, any>>, diff --git a/packages/ui-tests/src/tests/pages/error.tsx b/packages/ui-tests/src/tests/pages/error.tsx index bf3798781fcb..b97c235be0bc 100644 --- a/packages/ui-tests/src/tests/pages/error.tsx +++ b/packages/ui-tests/src/tests/pages/error.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { RefineErrorPageProps } from "@refinedev/ui-types"; +import type { RefineErrorPageProps } from "@refinedev/ui-types"; import { fireEvent, diff --git a/packages/ui-tests/src/tests/pages/ready.tsx b/packages/ui-tests/src/tests/pages/ready.tsx index 6d4af4478f7f..5e1d0349e5da 100644 --- a/packages/ui-tests/src/tests/pages/ready.tsx +++ b/packages/ui-tests/src/tests/pages/ready.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { RefineReadyPageProps } from "@refinedev/ui-types"; +import type { RefineReadyPageProps } from "@refinedev/ui-types"; import { render, TestWrapper } from "@test"; diff --git a/packages/ui-types/src/types/button.tsx b/packages/ui-types/src/types/button.tsx index 170404f3b55e..9d860e7162f0 100644 --- a/packages/ui-types/src/types/button.tsx +++ b/packages/ui-types/src/types/button.tsx @@ -1,5 +1,5 @@ -import { PropsWithChildren } from "react"; -import { +import type { PropsWithChildren } from "react"; +import type { BaseKey, DeleteOneResponse, IQueryKeys, diff --git a/packages/ui-types/src/types/crud.tsx b/packages/ui-types/src/types/crud.tsx index 545214f3fc03..396dbe720dec 100644 --- a/packages/ui-types/src/types/crud.tsx +++ b/packages/ui-types/src/types/crud.tsx @@ -1,5 +1,9 @@ -import { PropsWithChildren } from "react"; -import { AutoSaveIndicatorProps, BaseKey, MutationMode } from "@refinedev/core"; +import type { PropsWithChildren } from "react"; +import type { + AutoSaveIndicatorProps, + BaseKey, + MutationMode, +} from "@refinedev/core"; export type ActionButtonRenderer< TExtraProps extends {} = Record<keyof any, unknown>, diff --git a/packages/ui-types/src/types/field.tsx b/packages/ui-types/src/types/field.tsx index 5be6135b481c..14eff66f03bb 100644 --- a/packages/ui-types/src/types/field.tsx +++ b/packages/ui-types/src/types/field.tsx @@ -1,5 +1,5 @@ -import { ReactNode } from "react"; -import { ConfigType } from "dayjs"; +import type { ReactNode } from "react"; +import type { ConfigType } from "dayjs"; export type RefineFieldCommonProps<T = unknown> = { /** diff --git a/packages/ui-types/src/types/layout.tsx b/packages/ui-types/src/types/layout.tsx index 12bb41af9e2d..fcbe27ec026b 100644 --- a/packages/ui-types/src/types/layout.tsx +++ b/packages/ui-types/src/types/layout.tsx @@ -1,4 +1,4 @@ -import { TitleProps, LayoutProps } from "@refinedev/core"; +import type { TitleProps, LayoutProps } from "@refinedev/core"; export type SiderRenderProps = { /** From 84adce30b3f0cbdb333c262d1aa5693427bba3fc Mon Sep 17 00:00:00 2001 From: Yeldar <57894795+issa012@users.noreply.github.com> Date: Wed, 29 May 2024 11:46:59 +0500 Subject: [PATCH 3/4] feat(nestjs-query): implement getApiUrl (#5983) Co-authored-by: Alican Erdurmaz <alicanerdurmaz@gmail.com> --- .changeset/thick-doors-draw.md | 7 +++++++ packages/nestjs-query/src/dataProvider/index.ts | 2 +- packages/nestjs-query/test/gqlClient.ts | 2 +- packages/nestjs-query/test/useApiUrl/index.spec.ts | 12 ++++++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .changeset/thick-doors-draw.md create mode 100644 packages/nestjs-query/test/useApiUrl/index.spec.ts diff --git a/.changeset/thick-doors-draw.md b/.changeset/thick-doors-draw.md new file mode 100644 index 000000000000..4b5114cf0c99 --- /dev/null +++ b/.changeset/thick-doors-draw.md @@ -0,0 +1,7 @@ +--- +"@refinedev/nestjs-query": minor +--- + +feat(nestjs-query): implemented getApiUrl + +resolves #5606 diff --git a/packages/nestjs-query/src/dataProvider/index.ts b/packages/nestjs-query/src/dataProvider/index.ts index bc1f29b4b4c2..433c7bbbdf92 100644 --- a/packages/nestjs-query/src/dataProvider/index.ts +++ b/packages/nestjs-query/src/dataProvider/index.ts @@ -416,7 +416,7 @@ const dataProvider = (client: GraphQLClient): Required<DataProvider> => { }; }, getApiUrl: () => { - throw Error("Not implemented on refine-nestjs-query data provider."); + return (client as any).url; // url field in GraphQLClient is private }, custom: async ({ url, method, headers, meta }) => { if (url) { diff --git a/packages/nestjs-query/test/gqlClient.ts b/packages/nestjs-query/test/gqlClient.ts index efe169f9e0ed..18f16cea484b 100644 --- a/packages/nestjs-query/test/gqlClient.ts +++ b/packages/nestjs-query/test/gqlClient.ts @@ -1,7 +1,7 @@ import { GraphQLClient } from "graphql-request"; // const API_URL = "https://api.nestjs-query.refine.dev/graphql"; -const API_URL = "http://localhost:3003/graphql"; +export const API_URL = "http://localhost:3003/graphql"; const client = new GraphQLClient(API_URL); diff --git a/packages/nestjs-query/test/useApiUrl/index.spec.ts b/packages/nestjs-query/test/useApiUrl/index.spec.ts new file mode 100644 index 000000000000..1388d9df1a68 --- /dev/null +++ b/packages/nestjs-query/test/useApiUrl/index.spec.ts @@ -0,0 +1,12 @@ +import dataProvider from "../../src/index"; +import client, { API_URL } from "../gqlClient"; + +describe("getApiUrl", () => { + describe("should return API URL from client", () => { + it("correct response with getApiUrl", async () => { + const apiURL = dataProvider(client).getApiUrl(); + + expect(apiURL).toEqual(API_URL); + }); + }); +}); From a2e53d28174bbc584cae20621e481afff550ac40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Emir=20=C5=9Een?= <senaliemir@gmail.com> Date: Wed, 29 May 2024 09:48:47 +0300 Subject: [PATCH 4/4] fix(devtools-internal): fix `NODE_ENV` conditional (#5992) --- .changeset/tall-doors-ring.md | 7 +++++++ packages/devtools-internal/src/use-query-subscription.tsx | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/tall-doors-ring.md diff --git a/.changeset/tall-doors-ring.md b/.changeset/tall-doors-ring.md new file mode 100644 index 000000000000..668cd45064c5 --- /dev/null +++ b/.changeset/tall-doors-ring.md @@ -0,0 +1,7 @@ +--- +"@refinedev/devtools-internal": patch +--- + +fix(devtools-internal): broken env conditional in useQuerySubscription hook + +When using Refine with React Native, `process.env.NODE_ENV !== "development" ? () => ({}) : () => {...}` conditional in `useQuerySubscription` hook was causing a syntax error. This PR fixes the issue by explicitly returning an empty object on non-development environments. diff --git a/packages/devtools-internal/src/use-query-subscription.tsx b/packages/devtools-internal/src/use-query-subscription.tsx index 183e4f2a4e4a..a79908551d53 100644 --- a/packages/devtools-internal/src/use-query-subscription.tsx +++ b/packages/devtools-internal/src/use-query-subscription.tsx @@ -9,7 +9,9 @@ import { createQueryListener, createMutationListener } from "./listeners"; export const useQuerySubscription = __DEV_CONDITION__ !== "development" - ? () => ({}) + ? () => { + return {}; + } : (queryClient: QueryClient) => { const { ws } = useContext(DevToolsContext); const queryCacheSubscription = React.useRef<() => void>();