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 - [email protected]

Published by refine-bot over 1 year ago

Minor Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4430 cf07d59587f Thanks @aliemir! - Added queryMeta and mutationMeta properties to the useForm hook. These properties are used to pass specific meta values to the query or mutation. This is useful when you have overlapping values in your data provider's getOne and update methods. For example, you may want to change the method of the mutation to PATCH but if you pass it in the meta property, you'll end up changing the method of the getOne request as well.

    queryMeta and mutationMeta has precedence over meta. This means that if you have the same property in queryMeta and meta, the value in queryMeta will be used.

    Usage

    import { useForm } from "@refinedev/core";
    
    export const MyEditPage = () => {
        const form = useForm({
            // this is passed both to the mutation and the query requests
            meta: {
                myValue: "myValue",
            },
            // this is only passed to the query request
            queryMeta: {
                propertyOnlyWorksForQuery: "propertyOnlyWorksForQuery",
            },
            // this is only passed to the mutation request
            mutationMeta: {
                propertyOnlyWorksForMutation: "propertyOnlyWorksForMutation",
            },
        });
    };
    

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4430 cf07d59587f Thanks @aliemir! - Updated the useForm, useModalForm, useDrawerForm and useStepsForm to accept queryMeta and mutationMeta properties of the useForm hook of @refinedev/core. These properties are used to pass specific meta values to the query or mutation. This is useful when you have overlapping values in your data provider's getOne and update methods. For example, you may want to change the method of the mutation to PATCH but if you pass it in the meta property, you'll end up changing the method of the getOne request as well.

    queryMeta and mutationMeta has precedence over meta. This means that if you have the same property in queryMeta and meta, the value in queryMeta will be used.

    Usage

    import { useForm } from "@refinedev/core";
    
    export const MyEditPage = () => {
        const form = useForm({
            // this is passed both to the mutation and the query requests
            meta: {
                myValue: "myValue",
            },
            // this is only passed to the query request
            queryMeta: {
                propertyOnlyWorksForQuery: "propertyOnlyWorksForQuery",
            },
            // this is only passed to the mutation request
            mutationMeta: {
                propertyOnlyWorksForMutation: "propertyOnlyWorksForMutation",
            },
        });
    };
    

Patch Changes

  • #4429 63daabcb703 Thanks @aliemir! - Fixed the issue of formLoading property in return values of useStepsForm hook which was not being toggled correctly when the form was submitted or the form data was being fetched.

  • #4431 c29a3618cf6 Thanks @aliemir! - Updated the TSDoc comments to fix the broken links in the documentation.

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4404 f67967e8c87 Thanks @salihozdemir! - refactor: fix name and state inconsistency in <ThemedLayoutV2>

    useSiderVisible is deprecated, instead we created a new hook useThemedLayoutContext for it. useThemedLayoutContext similar to useSiderVisible but it returns more meaningful state names. However, useSiderVisible is still available for backward compatibility.

    Updated Sider and HamburgerMenu components using useThemedLayoutContext.

    import { useThemedLayoutContext } from "@refinedev/mantine";
    
    const {
        siderCollapsed,
        setSiderCollapsed,
        mobileSiderOpen,
        setMobileSiderOpen,
    } = useThemedLayoutContext();
    
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4404 f67967e8c87 Thanks @salihozdemir! - refactor: fix name and state inconsistency in <ThemedLayoutV2>

    useSiderVisible is deprecated, instead we created a new hook useThemedLayoutContext for it. useThemedLayoutContext similar to useSiderVisible but it returns more meaningful state names. However, useSiderVisible is still available for backward compatibility.

    Updated Sider and HamburgerMenu components using useThemedLayoutContext.

    import { useThemedLayoutContext } from "@refinedev/mui";
    
    const {
        siderCollapsed,
        setSiderCollapsed,
        mobileSiderOpen,
        setMobileSiderOpen,
    } = useThemedLayoutContext();
    
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4404 f67967e8c87 Thanks @salihozdemir! - refactor: fix name and state inconsistency in <ThemedLayoutV2>

    useSiderVisible is deprecated, instead we created a new hook useThemedLayoutContext for it. useThemedLayoutContext similar to useSiderVisible but it returns more meaningful state names. However, useSiderVisible is still available for backward compatibility.

    Updated Sider and HamburgerMenu components using useThemedLayoutContext.

    import { useThemedLayoutContext } from "@refinedev/chakra-ui";
    
    const {
        siderCollapsed,
        setSiderCollapsed,
        mobileSiderOpen,
        setMobileSiderOpen,
    } = useThemedLayoutContext();
    
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4404 f67967e8c87 Thanks @salihozdemir! - refactor: fix name and state inconsistency in <ThemedLayoutV2>

    useSiderVisible is deprecated, instead we created a new hook useThemedLayoutContext for it. useThemedLayoutContext similar to useSiderVisible but it returns more meaningful state names. However, useSiderVisible is still available for backward compatibility.

    Updated Sider and HamburgerMenu components using useThemedLayoutContext.

    import { useThemedLayoutContext } from "@refinedev/antd";
    
    const {
        siderCollapsed,
        setSiderCollapsed,
        mobileSiderOpen,
        setMobileSiderOpen,
    } = useThemedLayoutContext();
    
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

  • #4406 ad1856f741f Thanks @aliemir! - Fix the issue of matchPath when the resource action is defined as a function or an object. Switched to using matched route string instead of using the route value from the resource definition.
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

  • #4407 473bbe5b31d Thanks @aliemir! - Added missing clone action for document title generation. This fixes the issue of the document title not being generated when the clone action is used.

    This change introduces the documentTitle.{resourceName}.clone key to the list of i18n keys that are used to generate the document title.

    Default title for the clone action is "#{{id}} Clone {{resourceName}} | refine".

  • #4407 473bbe5b31d Thanks @aliemir! - Fixed the issue of label not taken into account with auto generated document titles. label will be prioritized over the resource name when generating the document title and the label will not be capitalized.

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

  • #4398 8a424c227a8 Thanks @aliemir! - Updated the type imports in the files to get the tsc working for the type definitions in the dist folder. This will fix the issue with the components not being properly typed in user projects.
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4313 28fe67047a0 Thanks @abdellah711! - feat: dynamic window title

    This feature enables users to generate document titles for each page. To activate it, users need to include the DocumentTitleHandler component within the <Refine> component. By default, the DocumentTitleHandler will generate titles using the generateDefaultDocumentTitle exported from @refinedev/core.

    The DocumentTitleHandler component accepts an optional prop called handler, which is a callback function. This function is triggered whenever the pathname changes and receives an object with the following parameters:

    {
        resource, // 'posts'
            action, // 'create'
            params, // {id: 1}
            pathname, // '/posts/create'
            autoGeneratedTitle; // 'Create new Post | refine'
    }
    

    The handler callback should return the new title based on the provided parameters.
    To update the title in a child component, the user can use the useDocumentTitle hook. It accepts either a string representing the new title or an object with the property i18nKey if the app supports multiple languages.

    useDocumentTitle({ i18nKey: "documentTitle.default" });
    
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4313 28fe67047a0 Thanks @abdellah711! - feat: dynamic window title for NextJS pages directory

    This feature enables users to generate document titles for each page in NextJS pages directory. To activate it, users need to include the DocumentTitleHandler component within the <Refine> component. By default, the DocumentTitleHandler will generate titles using the generateDefaultDocumentTitle exported from @refinedev/core.

    The DocumentTitleHandler component accepts an optional prop called handler, which is a callback function. This function is triggered whenever the pathname changes and receives an object with the following parameters:

    {
        resource, // 'posts'
            action, // 'create'
            params, // {id: 1}
            pathname, // '/posts/create'
            autoGeneratedTitle; // 'Create new Post | refine'
    }
    

    The handler callback should return the new title based on the provided parameters.

    To update the title in a child component, the user can use the useDocumentTitle hook. It accepts either a string representing the new title or an object with the property i18nKey if the app supports multiple languages.

    useDocumentTitle({ i18nKey: "documentTitle.default" });
    

    Note that this hook doesn't support SSR, and it will generate the titles in the client-side only.

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes