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 over 1 year ago

Minor Changes

Patch Changes

  • #4527 ceadcd29fc9 Thanks @salihozdemir! - fix: prioritization of forgotten identifier

    If identifier is provided, it will be used instead of name.

    import { DeleteButton } from "@refinedev/mantine";
    
    <DeleteButton resource="identifier-value" recordItemId="123" />;
    

    fix: use translate keys with identifier

    Previously, the translate keys were generated using resource name. This caused issues when you had multiple resource usage with the same name. Now the translate keys are generated using identifier if it's present.

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

  • #4523 18d446b1069 Thanks @yildirayunlu! - feat: add useLoadingOvertime hook and implement primitive hooks

    If you need to do something when the loading time exceeds the specified time, refine provides the useLoadingOvertime hook. It returns the elapsed time in milliseconds.

    const { elapsedTime } = useLoadingOvertime({
        isLoading,
        interval: 1000,
        onInterval(elapsedInterval) {
            console.log("loading overtime", elapsedInterval);
        },
    });
    
    console.log(elapsedTime); // 1000, 2000, 3000, ...
    

    This hook implements the primitive data hooks:

  • #4527 ceadcd29fc9 Thanks @salihozdemir! - fix: support multiple resource usage with the same name via the identifier

    Previously, data hooks only worked with resource name. So if you had multiple resource usage with the same name, it would cause issues.

    Now the following hooks and its derivatives support identifier to distinguish between the resources:

    • useList
    • useInfiniteList
    • useOne
    • useMany
    • useCreate
    • useCreateMany
    • useUpdate
    • useUpdateMany
    • useDelete
    • useDeleteMany

    fix: generate correct queryKey's for queries with identifier

    Previously, the queryKey was generated using name. This caused issues when you had multiple resource usage with the same name. Now the queryKey's are generated using identifier if it's present.

  • #4523 18d446b1069 Thanks @yildirayunlu! - feat: add useLoadingOvertime hook

    if you need to do something when the loading time exceeds the specified time, refine provides the useLoadingOvertime hook. It returns the elapsed time in milliseconds.

    const { elapsedTime } = useLoadingOvertime({
        isLoading,
        interval: 1000,
        onInterval(elapsedInterval) {
            console.log("loading overtime", elapsedInterval);
        },
    });
    

    interval and onInterval are optional. It can be controlled globally from <Refine /> options.

    <Refine
        //...
        options={{
            //...
            overtime: {
                interval: 2000, // default 1000
                onInterval(elapsedInterval) {
                    console.log(
                        "loading overtime",
                        elapsedInterval,
                    );
                },
            },
        }}
    >
    
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

  • #4527 ceadcd29fc9 Thanks @salihozdemir! - fix: prioritization of forgotten identifier

    If identifier is provided, it will be used instead of name.

    import { DeleteButton } from "@refinedev/chakra-ui";
    
    <DeleteButton resource="identifier-value" recordItemId="123" />;
    

    fix: use translate keys with identifier

    Previously, the translate keys were generated using resource name. This caused issues when you had multiple resource usage with the same name. Now the translate keys are generated using identifier if it's present.

  • Updated dependencies [9a895ea39dc, ceadcd29fc9]:

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

Patch Changes

  • #4527 ceadcd29fc9 Thanks @salihozdemir! - fix: prioritization of forgotten identifier

    If identifier is provided, it will be used instead of name.

    import { DeleteButton } from "@refinedev/antd";
    
    <DeleteButton resource="identifier-value" recordItemId="123" />;
    

    fix: use translate keys with identifier

    Previously, the translate keys were generated using resource name. This caused issues when you had multiple resource usage with the same name. Now the translate keys are generated using identifier if it's present.

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4449 cc84d61bc5c Thanks @BatuhanW! - feat: allow access control provider to be configured globally.

    Now accessControlProvider accepts options.buttons parameter to globally configure UI buttons' behaviour.

    These configuration will be used as a fallback, if no configuration on button prop level is found.

    Default values:

    options.buttons.enableAccessControl => true
    options.buttons.hideIfUnauthorized => false

    const accessControlProvider: IAccessControlContext = {
        can: async (params: CanParams): Promise<CanReturnType> => {
            return { can: true };
        },
        options: {
            buttons: {
                enableAccessControl: true,
                hideIfUnauthorized: false,
            },
        },
    };
    

Patch Changes

  • #4521 a3c8d4f84c7 Thanks @alicanerdurmaz! - fixed: useExport's resource props is not working.
    With this fix, useExport will now work with resource props.

    useExport({
        resource: "users",
    });
    
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4449 cc84d61bc5c Thanks @BatuhanW! - feat: updated Create, List, Show, Edit, Delete, Clone buttons to respect new global accessControlProvider configuration.

    fix: Delete button's text wasn't rendered as reason field of accessControlProvider.

    Given the following can method:

    const accessControlProvider: IAccessControlContext = {
        can: async (): Promise<CanReturnType> => {
            return { can: false, reason: "Access Denied!" };
        },
    };
    

    If user is unauthorized, Delete button's text should be Access Denied! instead of default Delete.

    This is the default behaviour for Create, List, Show, Edit, Delete, Clone buttons already.

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4449 cc84d61bc5c Thanks @BatuhanW! - feat: updated Create, List, Show, Edit, Delete, Clone buttons to respect new global accessControlProvider configuration.

    fix: Delete button's text wasn't rendered as reason field of accessControlProvider.

    Given the following can method:

    const accessControlProvider: IAccessControlContext = {
        can: async (): Promise<CanReturnType> => {
            return { can: false, reason: "Access Denied!" };
        },
    };
    

    If user is unauthorized, Delete button's text should be Access Denied! instead of default Delete.

    This is the default behaviour for Create, List, Show, Edit, Delete, Clone buttons already.

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

Patch Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4449 cc84d61bc5c Thanks @BatuhanW! - feat: updated Create, List, Show, Edit, Delete, Clone buttons to respect new global accessControlProvider configuration.

    fix: Delete button's text wasn't rendered as reason field of accessControlProvider.

    Given the following can method:

    const accessControlProvider: IAccessControlContext = {
        can: async (): Promise<CanReturnType> => {
            return { can: false, reason: "Access Denied!" };
        },
    };
    

    If user is unauthorized, Delete button's text should be Access Denied! instead of default Delete.

    This is the default behaviour for Create, List, Show, Edit, Delete, Clone buttons already.

refine - [email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4518 d93747281f7 Thanks @aliemir! - Updated superplate-cli version and updated superplate runner command with environment variables.
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4449 cc84d61bc5c Thanks @BatuhanW! - feat: updated Create, List, Show, Edit, Delete, Clone buttons to respect new global accessControlProvider configuration.

    fix: Delete button's text wasn't rendered as reason field of accessControlProvider.

    Given the following can method:

    const accessControlProvider: IAccessControlContext = {
        can: async (): Promise<CanReturnType> => {
            return { can: false, reason: "Access Denied!" };
        },
    };
    

    If user is unauthorized, Delete button's text should be Access Denied! instead of default Delete.

    This is the default behaviour for Create, List, Show, Edit, Delete, Clone buttons already.

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

  • #4466 a398c19b023 Thanks @aliemir! - Fixed the unhandled nullable pathname issue returning from usePathname hook for the appDir router.
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4454 4bae8add99f Thanks @aliemir! - Updated the @mui/x-data-grid dependency to the latest version (v6). This update introduces some changes to the existing codebases which are addressed in Material UI's migration guide for @mui/x-data-grid from v5 to v6. We've created a simple migration guide to navigate refine users through the changes that might be required in their codebases. While this guide does not cover all the changes, it will help you get started with the migration process.

    Breaking Changes

    useDataGrid no longer returns page, pageSize, onPageChange and onPageSizeChange. According to the changes in the DataGrid API, useDataGrid now returns paginationModel and onPaginationModelChange props which are used to control the pagination state of the DataGrid and contains the previous logic of page, pageSize, onPageChange and onPageSizeChange.

    With this release, the peer dependency of @mui/x-data-grid is updated to ^6.6.0.

Patch Changes

  • #4454 4bae8add99f Thanks @aliemir! - Added missing @context alias to the declaration configuration, this was causing buildtime errors when creating declarations for the package.

  • #4454 4bae8add99f Thanks @aliemir! - Added overflow: auto and overflow: clip (if supported) properties to the content container of the ThemedLayoutV2 to make sure the DataGrid component doesn't break the layout.

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4454 4bae8add99f Thanks @aliemir! - According to the changes made in @refinedev/mui to support the latest version of the @mui/x-data-grid package, we've updated the @refinedev/inferencer package to support the changes in the generated codes. While the usage of the components did not change, the generated code in Material UI inferencer components have changed.

    Breaking Changes

    With this release, the peer dependency of @refinedev/mui is updated to ^5.0.0 and the peer dependency of @mui/x-data-grid is updated to ^6.6.0.

Patch Changes

  • #4454 4bae8add99f Thanks @aliemir! - Updated the ListInferencer logic to check for canDelete property in resource definitions to decide whether to include DeleteButton in the actions column of the List view or not.

  • Updated dependencies [c82006f712a]:

refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Minor Changes

  • #4448 c82006f712a Thanks @BatuhanW! - feat: useApiUrl hook tries to infer data provider from current resource. If current resource has a different data provider than the default one, it will be inferred without needing to explicitly pass data provider name.
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

  • #4454 4bae8add99f Thanks @aliemir! - The latest major update in @refinedev/mui to support @mui/x-data-grid@6 has been released. This update introduces some changes to the existing codebases that refine-v3-to-v4 codemod cannot cover or has no relation to. We've updated the codemod to install the v4 version of @refinedev/mui to avoid any issues.
refine - @refinedev/[email protected]

Published by refine-bot over 1 year ago

Patch Changes

  • #4446 5936d9cd4d4 Thanks @salihozdemir! - refactor: increase accessibility of auth page components

    add htmlFor to label elements to associate them with their inputs