refine

A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.

MIT License

Downloads
1.1M
Stars
25.3K
Committers
269

Bot releases are visible (Hide)

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5737 4e8188a6652 Thanks @aliemir! - chore: updated content of README.md to include installation, usage and scaffolding instructions.

  • #5765 0c197d82393 Thanks @aliemir! - fix: dayjs imports in ESM bundles

    dayjs imports in ESM bundles were not being correctly resolved, this has been fixed by adding an esbuild plugin to replace the imports with the correct path for ESM bundles.

  • #5765 0c197d82393 Thanks @aliemir! - Fixed the lodash-es imports for ESM builds to access the exports properly.

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

    In context of @refinedev/mui these changes may cause unexpected issues due to misconfigured bundlers/compilers in some environments.

    In projects using react-scripts, you may have issues with import statements in the @refinedev/mui's ESM bundle, this should be resolved by customizing the webpack configuration of the project by allowing imports without fully specifying the extensions.

    An example configuration with @craco/craco is as follows:

    // craco.config.js
    module.exports = {
      webpack: {
        configure: {
          module: {
            rules: [
              {
                test: /.m?js$/,
                resolve: {
                  fullySpecified: false,
                },
              },
            ],
          },
        },
      },
    };
    

    In Remix projects using @refinedev/mui you may encounter issues due to ESM issues from Material UI packages, please refer to this issue if you have any problems related to this: https://github.com/mui/material-ui/issues/39765

    If the error is related with @refinedev/mui specifically, setting serverModuleFormat to "cjs" will help getting rid of the related errors.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • #5765 0c197d82393 Thanks @aliemir! - fix: broken eslint plugin for removing test ids from components

    Eslint plugin to remove test ids from components was broken and might miss some test ids to be included in the bundles.

  • #5765 0c197d82393 Thanks @aliemir! - fix: @mui/icons-material imports from ESM builds.

    @mui/icons-material imports from ESM builds were not being correctly resolved, this has been fixed by adding an esbuild plugin to replace the imports with the correct path for ESM bundles.

  • #5808 10ba9c34490 Thanks @aliemir! - refactor: moved internal logic of buttons to respective hooks from @refinedev/core

    We've moved the internal logic of buttons to their respective hooks in the @refinedev/core package to ensure consistency and reduce duplication. This change will make it easier to manage and maintain the buttons across different UI integrations of Refine. This will also benefit the users who want to customize the buttons via swizzle option or create their own buttons withouth having to duplicate the logic.

  • Updated dependencies [56ed144a0f5, 0c197d82393, 0c197d82393, 56ed144a0f5, 38f129f40ee, 404b2ef5e1b]:

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Minor Changes

  • #5761 399911617b2 Thanks @aliemir! - Migrated from outdated @tabler/icons@1 to @tabler/icons-react@3 to make sure we're using the latest available version of the library without requiring users to pin to a deprecated version.

    If your project doesn't include @tabler/icons you won't be affected by this change. If you're using @tabler/icons@1 in your project, you may need to update your dependency to latest version of @tabler/icons-react to avoid conflicting dependencies. Practically, this should not introduce any breaking changes to your project and all the icons in @tabler/icons@1 should also be available in the latest version of @tabler/icons-react.

Patch Changes

  • #5737 4e8188a6652 Thanks @aliemir! - chore: updated content of README.md to include installation, usage and scaffolding instructions.

  • #5765 0c197d82393 Thanks @aliemir! - fix: @tabler/icons-react imports in CJS builds

    imports from @tabler/icons-react end up requiring the ESM build in CJS environments, to prevent this we've added added an esbuild plugin to replace the imports with the correct path for CJS bundles.

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5765 0c197d82393 Thanks @aliemir! - fix: dayjs imports in ESM bundles

    dayjs imports in ESM bundles were not being correctly resolved, this has been fixed by adding an esbuild plugin to replace the imports with the correct path for ESM bundles.

  • #5765 0c197d82393 Thanks @aliemir! - Fixed the lodash-es imports for ESM builds to access the exports properly.

  • #5714 38f129f40ee Thanks @aliemir! - Due to the bug fix made in the @refinedev/core, onFinishAutoSave's returned promise can now reject and should be handled accordingly. Updated useForm's auto save handler to catch the rejection without breaking the application.

    Additionally due to the same changes, onFinish should also be handled accordingly. Updated useForm's saveButtonProps.onClick to catch the rejection without breaking the application.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • #5765 0c197d82393 Thanks @aliemir! - fix: broken eslint plugin for removing test ids from components

    Eslint plugin to remove test ids from components was broken and might miss some test ids to be included in the bundles.

  • #5808 10ba9c34490 Thanks @aliemir! - refactor: moved internal logic of buttons to respective hooks from @refinedev/core

    We've moved the internal logic of buttons to their respective hooks in the @refinedev/core package to ensure consistency and reduce duplication. This change will make it easier to manage and maintain the buttons across different UI integrations of Refine. This will also benefit the users who want to customize the buttons via swizzle option or create their own buttons withouth having to duplicate the logic.

  • #5755 404b2ef5e1b Thanks @BatuhanW! - fix: incorrect type imports

  • Updated dependencies [0c197d82393, 56ed144a0f5]:

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Minor Changes

  • #5761 399911617b2 Thanks @aliemir! - Migrated from outdated @tabler/icons@1 to @tabler/icons-react@3 to make sure we're using the latest available version of the library without requiring users to pin to a deprecated version.

    If your project doesn't include @tabler/icons you won't be affected by this change. If you're using @tabler/icons@1 in your project, you may need to update your dependency to latest version of @tabler/icons-react to avoid conflicting dependencies. Practically, this should not introduce any breaking changes to your project and all the icons in @tabler/icons@1 should also be available in the latest version of @tabler/icons-react.

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - fix: @tabler/icons-react imports in CJS builds

    imports from @tabler/icons-react end up requiring the ESM build in CJS environments, to prevent this we've added added an esbuild plugin to replace the imports with the correct path for CJS bundles.

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5765 0c197d82393 Thanks @aliemir! - Fixed the lodash-es imports for ESM builds to access the exports properly.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • #5739 e9bbb1aa5af Thanks @aliemir! - Removed redundant usage of IResourceComponentsProps type in generated components. This type only works with legacy routers and <RefineRoutes /> component, its usage outside of these scopes are unnecessary.

  • #5765 0c197d82393 Thanks @aliemir! - fix: broken eslint plugin for removing test ids from components

    Eslint plugin to remove test ids from components was broken and might miss some test ids to be included in the bundles.

  • Updated dependencies [4e8188a6652, 10ba9c34490, 2b5ac6f5409, 0c197d82393, 0c197d82393, 404b2ef5e1b, 56ed144a0f5, 0c197d82393, 10ba9c34490, 38f129f40ee, f32512b9042]:

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Minor Changes

  • #5723 c498239e90a Thanks @rilrom! - feat: implement _not operator in hasura filters #5689

    Hasura users can now use the _not operator as a conditional filter.

    Resolves #5689

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5765 0c197d82393 Thanks @aliemir! - Fixed the lodash-es imports for ESM builds to access the exports properly.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Minor Changes

  • #5742 028ba6a11d0 Thanks @alicanerdurmaz! - feat: add gqlQuery and gqlMutation support. #5743

    Previously, @refinedev/graphql package only supported GraphQL operations through meta.fields.

    Now we've added gqlQuery and gqlMutation fields in meta object.

    You can utilize these fields along with graphql-tag package to build your queries/mutations.

    See the updated documentation for more information: https://refine.dev/docs/packages/data-providers/graphql

    Query Example:

    import { useList } from "@refinedev/core";
    import gql from "graphql-tag";
    
    const POSTS_LIST_QUERY = gql`
      query PostList($where: JSON, $sort: String) {
        posts(where: $where, sort: $sort) {
          id
          title
          content
          category {
            id
          }
        }
      }
    `;
    
    const { data } = useList({
      resource: "posts",
      meta: { gqlQuery: POSTS_QUERY },
    });
    

    Mutation Example:

    import { useForm } from "@refinedev/core";
    import gql from "graphql-tag";
    
    const POST_CREATE_MUTATION = gql`
      mutation createPost($input: createPostInput!) {
        createPost(input: $input) {
          id
          title
          content
          category {
            id
          }
        }
      }
    `;
    
    const { formProps } = useForm({
      resource: "posts",
      meta: { gqlMutation: CREATE_POST_MUTATION },
    });
    

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • Updated dependencies [0c197d82393, 56ed144a0f5]:

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5807 b20a18e4dfc Thanks @BatuhanW! - chore: update jscodeshift version to 0.15.2

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5749 51f368eab1a Thanks @alicanerdurmaz! - chore: Vite upgraded to v5.x.x. #5749

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • Updated dependencies [0c197d82393, 56ed144a0f5]:

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • Updated dependencies [0c197d82393, 56ed144a0f5]:

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • Updated dependencies [b20a18e4dfc, 0c197d82393, 51f368eab1a, 33a8a80d80f, 56ed144a0f5, e9bbb1aa5af]:

refine - [email protected]

Published by refine-bot 7 months ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Minor Changes

  • #5751 f32512b9042 Thanks @aliemir! - Added useResourceParams hook. This hook initially works similarly to useResource but it correctly handles the id and action params per active route and explicit parameters. In @refinedev/core and other Refine packages there was a common logic of handling the id since its inference is dependent on the active resource and route. The same also applies to the action parameter of forms. This hook handles these cases and provides a more consistent API to share the same logic without duplicating it.

    • id and action values returned from useResource is deprecated in favor of useResourceParams.
    • useForm hook is updated to use useResourceParams under the hood.
    • useShow hook is updated to use useResourceParams under the hood.
    • <CanAccess /> component is updated to use useResourceParams under the hood.

Patch Changes

  • #5737 4e8188a6652 Thanks @aliemir! - chore: updated content of README.md to include installation, usage and scaffolding instructions.

  • #5808 10ba9c34490 Thanks @aliemir! - chore: improved useMutationMode hooks usage by accepting explicit values to be passed for mutationMode and undoableTimeout, handling the precedence of the values inside the hook rather than outside to avoid repetition

  • #5733 2b5ac6f5409 Thanks @alicanerdurmaz! - feat: added useTranslation hook. It combines useTranslate, useSetLocale and useGetLocale hooks and returns translate, changeLocale and getLocale methods from that hooks for better developer experience.

    It returns all i18nProvider methods in one hook. It can be used to translate texts, change the locale, and get the current locale in your own components.

    import { useTranslation } from "@refinedev/core";
    
    export const MyComponent = () => {
      const { translate, getLocale, changeLocale } = useTranslation();
      const currentLocale = getLocale();
    
      return (
        <div>
          <h1>{translate("languages")}</h1>
          <button
            onClick={() => changeLocale("en")}
            disabled={currentLocale === "en"}
          >
            English
          </button>
          <button
            onClick={() => changeLocale("de")}
            disabled={currentLocale === "de"}
          >
            German
          </button>
        </div>
      );
    };
    

    Example of combining useTranslation with useTranslate, useSetLocale and useGetLocale hooks.

    import {
    -  useGetLocale,
    -  useSetLocale,
    -  useTranslate,
    +  useTranslation,
    } from "@refinedev/core";
    
    export const MyComponent = () => {
    -  const changeLocale = useSetLocale();
    -  const getLocale = useGetLocale();
    -  const translate = useTranslate();
    
    +  const { translate, getLocale, changeLocale } = useTranslation();
    
      return <div>{/* ... */}</div>;
    };
    
  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5765 0c197d82393 Thanks @aliemir! - Fixed the lodash-es imports for ESM builds to access the exports properly.

  • #5755 404b2ef5e1b Thanks @BatuhanW! - feat: refactor TS typings.

    Type definitions in src/interfaces folder moved to their main consumer's folder under types.ts files.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • #5765 0c197d82393 Thanks @aliemir! - Update papaparse imports to fix ESM exports to work properly

  • #5808 10ba9c34490 Thanks @aliemir! - feat: added headless button hooks

    We've added a new set of hooks to make it easier to create and manage UI buttons of Refine. There's a hook for each type of button which previously had duplicated logic across the codebase between UI integrations of Refine. Now all these buttons will be powered by the same hooks maintained in the @refinedev/core package to ensure consistency and reduce duplication.

    New Hooks:

    • useListButton: A navigation button that navigates to the list page of a resource.
    • useCreateButton: A navigation button that navigates to the create page of a resource.
    • useShowButton: A navigation button that navigates to the show page of a record.
    • useEditButton: A navigation button that navigates to the edit page of a record.
    • useCloneButton: A navigation button that navigates to the clone page of a record.
    • useRefreshButton: A button that triggers an invalidation of the cache of a record.
    • useDeleteButton: A button that triggers a delete mutation on a record.
    • useSaveButton: A button to be used inside a form to trigger a save mutation.
    • useExportButton: A button to be used with useExport to trigger an export bulk data of a resource.
    • useImportButton: A button to be used with useImport to trigger an import bulk data for a resource.
  • #5714 38f129f40ee Thanks @aliemir! - Refactored the internal logic of useForm to be more efficient and readable, along with few bug fixes and improvements to the useForm hook.

    These changes are related to the issue #5702 and resolves #5460.

    • onFinish now rejects when; - values is not provided, - resource is not defined, - id is required but not provided.
      previously these cases were silently ignored.
    • Same changes also applies to onFinishAutoSave.
    • onFinishAutoSave had an issue with returning the appropriate promise after being called. This resulted in unhandled promise rejections and uncontrollable resolved promises. Now it is fixed, onFinishAutoSave will resolve and reject based on the response of the mutation.
    • When using auto save, debounced calls will now be cancelled and the respective promises will be rejected with "cancelled by debounce" message. These changes might require an update to the code bases that uses onFinishAutoSave to handle the rejection of the promise to avoid unhandled promise rejections.
    • Combined the separated submit functions into one for sake of simplicity and consistency. (internal)
    • onFinish rejects and resolved regardless of the onMutationSuccess and onMutationError hooks are provided or not. (Resolves #5460)
    • meta values were concatenated multiple times causing confusion and unexpected behavior, now it is fixed. (internal)
    • Moved the id determination/inference logic to a separate hook. (internal)
  • Updated dependencies [0c197d82393, 56ed144a0f5]:

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5807 b20a18e4dfc Thanks @BatuhanW! - chore: update jscodeshift version to 0.15.2

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5799 33a8a80d80f Thanks @BatuhanW! - chore: update semver package version to 7.5.2.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • #5739 e9bbb1aa5af Thanks @aliemir! - Removed redundant usage of IResourceComponentsProps type in component templates of add resource command. This type only works with legacy routers and <RefineRoutes /> component, its usage outside of these scopes are unnecessary.

  • Updated dependencies [b20a18e4dfc, 0c197d82393, 51f368eab1a, 56ed144a0f5]:

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Minor Changes

  • #5761 399911617b2 Thanks @aliemir! - Migrated from outdated @tabler/icons@1 to @tabler/icons-react@3 to make sure we're using the latest available version of the library without requiring users to pin to a deprecated version.

    If your project doesn't include @tabler/icons you won't be affected by this change. If you're using @tabler/icons@1 in your project, you may need to update your dependency to latest version of @tabler/icons-react to avoid conflicting dependencies. Practically, this should not introduce any breaking changes to your project and all the icons in @tabler/icons@1 should also be available in the latest version of @tabler/icons-react.

Patch Changes

  • #5737 4e8188a6652 Thanks @aliemir! - chore: updated content of README.md to include installation, usage and scaffolding instructions.

  • #5765 0c197d82393 Thanks @aliemir! - fix: @tabler/icons-react imports in CJS builds

    imports from @tabler/icons-react end up requiring the ESM build in CJS environments, to prevent this we've added added an esbuild plugin to replace the imports with the correct path for CJS bundles.

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5765 0c197d82393 Thanks @aliemir! - fix: dayjs imports in ESM bundles

    dayjs imports in ESM bundles were not being correctly resolved, this has been fixed by adding an esbuild plugin to replace the imports with the correct path for ESM bundles.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • #5765 0c197d82393 Thanks @aliemir! - fix: broken eslint plugin for removing test ids from components

    Eslint plugin to remove test ids from components was broken and might miss some test ids to be included in the bundles.

  • #5808 10ba9c34490 Thanks @aliemir! - refactor: moved internal logic of buttons to respective hooks from @refinedev/core

    We've moved the internal logic of buttons to their respective hooks in the @refinedev/core package to ensure consistency and reduce duplication. This change will make it easier to manage and maintain the buttons across different UI integrations of Refine. This will also benefit the users who want to customize the buttons via swizzle option or create their own buttons withouth having to duplicate the logic.

  • Updated dependencies [56ed144a0f5, 0c197d82393, 0c197d82393, 56ed144a0f5, 38f129f40ee, 404b2ef5e1b]:

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5737 4e8188a6652 Thanks @aliemir! - chore: updated content of README.md to include installation, usage and scaffolding instructions.

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5765 0c197d82393 Thanks @aliemir! - fix: dayjs imports in ESM bundles

    dayjs imports in ESM bundles were not being correctly resolved, this has been fixed by adding an esbuild plugin to replace the imports with the correct path for ESM bundles.

  • #5765 0c197d82393 Thanks @aliemir! - fix: broken eslint plugin for removing test ids from components

    Eslint plugin to remove test ids from components was broken and might miss some test ids to be included in the bundles.

  • #5808 10ba9c34490 Thanks @aliemir! - refactor: moved internal logic of buttons to respective hooks from @refinedev/core

    We've moved the internal logic of buttons to their respective hooks in the @refinedev/core package to ensure consistency and reduce duplication. This change will make it easier to manage and maintain the buttons across different UI integrations of Refine. This will also benefit the users who want to customize the buttons via swizzle option or create their own buttons withouth having to duplicate the logic.

  • #5714 38f129f40ee Thanks @aliemir! - Due to the bug fix made in the @refinedev/core, onFinishAutoSave's returned promise can now reject and should be handled accordingly. Updated useForm's auto save handler to catch the rejection without breaking the application.

  • #5755 404b2ef5e1b Thanks @BatuhanW! - fix: incorrect type imports

  • Updated dependencies [0c197d82393, 56ed144a0f5]:

refine - @refinedev/[email protected]

Published by refine-bot 7 months ago

Patch Changes

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

    fixed: Some type errors are fixed due to the TypeScript upgrade.

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.