A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.
MIT License
Bot releases are visible (Hide)
Published by refine-bot 9 months ago
61215d3b41
Thanks @aliemir! - Updated index exports to provide appropriate types for the exported elements. Resolves #5548Published by refine-bot 9 months ago
#5568 f1244819ad
Thanks @alicanerdurmaz! - feat: notificationProvider
is deprecated due to consistent naming convention between UI libraries. Please use useNotificationProvider
export as your notification provider. #5567
#5564 1bb7d30888
Thanks @alicanerdurmaz! - feat: <ThemedTitleV2 />'s
default icon updated.
Published by refine-bot 9 months ago
#5546 10570ec06c
Thanks @alicanerdurmaz! - feat: "nnull"
operator added for filters. #4805
From now on, data hooks can use "nnull"
operator to filter null values.
import { useTable } from "@refinedev/core";
useTable({
filters: {
permanent: [
{
field: "title",
operator: "nnull",
value: true,
},
],
},
});
Published by refine-bot 9 months ago
ee0f7867c3
]:
Published by refine-bot 9 months ago
#5550 e0eabf799f
Thanks @aliemir! - Updated type exports in package.json
and included them in the exports
field. Resolves #5528.
#5498 fff41caae9
Thanks @alicanerdurmaz! - feat: meta.gqlQuery
and meta.gqlMutation
support added to inferencer #5497.
Updated dependencies [b91de14ac8
, e2355e4179
, 5e65f71ecd
, b094b50c51
, 4b4d34208c
, 71148278cb
]:
Published by refine-bot 9 months ago
#5538 b91de14ac8
Thanks @Conqxeror! - feat: ability to configure useCan's queryOptions globally and through CanAccess component. #5472
#5522 71148278cb
Thanks @Conqxeror! - feat(core): add success notification support for auth provider methods #5473
Updated the core and added successNotification field to AuthActionResponse and Updated relevant hooks to show success notification when successNotification object is provided and added specs.
#5525 e2355e4179
Thanks @aliemir! - Updated <WelcomePage />
component to use RefineContext
to determine if the context is defined or not. It will show an error dialog if the context is not defined. If the error is showing, it means that <Refine />
component is not mounted or <WelcomePage />
component is used outside of <Refine />
component.
#5332 5e65f71ecd
Thanks @vikavorkin! - fix: replace export-to-csv-fix-source-map with papaparse #5317
Replace usage of export-to-csv-fix-source-map
to papaparse
, fixing issues with useExport
hook.
#5526 b094b50c51
Thanks @aliemir! - Marked dataProvider
prop of <Refine />
component as optional. This will allow users to setup Refine gradually without having to provide a data provider.
#5503 4b4d34208c
Thanks @BatuhanW! - refactor(core): re-export AuthBindings type as AuthProvider for consistency.
Published by refine-bot 9 months ago
#5478 24d81ca854
Thanks @alicanerdurmaz! - feat: add gqlQuery
and gqlMutation
support. #5489
Previously, @refinedev/hasura
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/data/packages/hasura/
Query Example:
import { useList } from "@refinedev/core";
import gql from "graphql-tag";
const PRODUCTS_QUERY = gql`
query ProductsList(
$offset: Int!
$limit: Int!
$order_by: [products_order_by!]
where: $where
) {
products(offset: $paging, limit: $filter, order_by: $order_by, where: $where) {
id
name
}
categories_aggregate(where: $where) {
aggregate {
count
}
}
}
`;
const { data } = useList({
resource: "products",
meta: { gqlQuery: PRODUCTS_QUERY },
});
Mutation Example:
import { useForm } from "@refinedev/core";
import gql from "graphql-tag";
const CREATE_PRODUCT_MUTATION = gql`
mutation CreateProduct($object: posts_insert_input!) {
createOneProduct(object: $object) {
id
name
}
}
`;
const { formProps } = useForm({
resource: "products",
meta: { gqlMutation: CREATE_PRODUCT_MUTATION },
});
Published by refine-bot 9 months ago
ee0f7867c3
Thanks @BatuhanW! - chore: upgrade @ory/client package version to 1.5.2 #5530Published by refine-bot 9 months ago
#5574 ee0f7867c3
Thanks @BatuhanW! - chore: upgrade @ory/client package version to 1.5.2 #5530
Updated dependencies [ee0f7867c3
]:
Published by refine-bot 9 months ago
1bb7d30888
Thanks @alicanerdurmaz! - feat: <ThemedTitleV2 />'s
default icon updated.Published by refine-bot 9 months ago
5701439e36
Thanks @BatuhanW! - chore: update superplate-cli dependency to 1.19.0Published by refine-bot 9 months ago
#5568 f1244819ad
Thanks @alicanerdurmaz! - feat: notificationProvider
is deprecated due to consistent naming convention between UI libraries. Please use useNotificationProvider
export as your notification provider. #5567
#5480 2a2269ac70
Thanks @ShivamDureja! - fix: issue with Chakra-UI sider that overflows when collapsed #5475
When we try to collapse the sider it overflows so changed overflow-x property to hidden whereas overflow-y remains auto.
#5564 1bb7d30888
Thanks @alicanerdurmaz! - feat: <ThemedTitleV2 />'s
default icon updated.
Published by refine-bot 9 months ago
ee0f7867c3
]:
Published by refine-bot 10 months ago
#5430 cfe78749ff
Thanks @alicanerdurmaz! - fix: useNotification.close("notification-key")
not working. Resolves #5431
#5465 00e00cbd98
Thanks @aliemir! - Fixed the type issue between remark-gfm
and react-markdown
. #5463
Published by refine-bot 10 months ago
#5423 75bb61dd3b
Thanks @aliemir! - Updated flattenObjectKeys
method to support both nested and non-nested variables when propagating server side errors to form fields. Resolves #5461
#5401 93e00fd770
Thanks @alicanerdurmaz! - fix: queryKey
is not overrideable. To fix this, useQuery
overloads refactored with single argument objects.
- useQuery(queryKey, queryFn, options);
+ useQuery({ queryKey, queryFn, ...options });
From now on, you can pass queryKey
as an object property.
// all data hooks can be used with this syntax.
useList({
queryOptions: {
queryKey: ["my-query-key"],
},
});
#5406 e5888b6b9c
Thanks @aliemir! - useMenu
hook was using outdated meta
and router params
due to missing dependency of the callback function. This was causing dynamic menu items to use wrong paths as links. (Resolves #5432)
#5452 b621223bfb
Thanks @aliemir! - Added the ability to pass meta
properties when using useGo
's go
function with to
as a resource object. This allows you to pass additional path parameters to the path defined in the resources array within the <Refine />
component. Resolves #5451
Assume we have the following resource defined in the <Refine />
component:
{
name: "posts",
list: "/posts",
edit: "/:foo/posts/:id/edit",
}
import { useGo } from "@refinedev/core";
const MyButton = () => {
const go = useGo();
return (
<Button
onClick={() => {
go({
to: {
resource: "posts",
action: "edit",
id: "1",
meta: {
foo: "bar",
},
},
type: "push",
});
// generated path will be "/bar/posts/1/edit"
}}
>
Go Posts
</Button>
);
};
#5381 19ceffbe9f
Thanks @aberhamm! - fix: Missing loginLink
attribute in AuthPageProps
for <AuthPage type="register" />
. #5381
Published by refine-bot 10 months ago
124a035cb7
Thanks @jimsmart! - fix: Support multiple events on Supabase's liveProvider's subscribe method. #5357Published by refine-bot 10 months ago
#5355 5acc257f8b
Thanks @rodbs! - Upgrade to Remix v2
Upgraded @refinedev/remix-router
to use Remix v2
. This version change does not contain any breaking changes on the @refinedev/remix-router
side.
Depending on your project's status, if you decide to upgrade to Remix v2
, you may or may not need to make necessary changes to your project. Please refer to the Remix v2 upgrade guide for more information.
If your project is created with create-refine-app
which already initializes Remix projects using the v2 routing convention, you'll need to make the below changes to get rid of the warnings:
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
- future: {
- v2_routeConvention: true,
- },
};
Due to the change in its default value, you may also need to set serverModuleFormat
to "cjs"
in your remix.config.js
file:
/** @type {import('@remix-run/dev').RemixConfig */
module.exports = {
+ serverModuleFormat: "cjs",
};
Other than the changes mentioned above, @refinedev/remix-router
and rest of the Refine packages should work as expected without requiring any changes.
Migration Guide for @refinedev/remix-router
Install the latest version of @refinedev/remix-router
and @refinedev/cli
:
npm i @refinedev/remix-router@latest @refinedev/cli@latest
You'll also need to update your remix dependencies:
npm i @remix-run/node@latest @remix-run/react@latest @remix-run/serve@latest
Please refer to the Remix v2 upgrade guide for more information.
You may also receive a warning when you try to build and run your production build on your local. This is because @remix-run/serve
requires a built path to be passed to it. @refinedev/cli
will provide a fallback value for this which may work for your app but CLI will still warn you about it. You can either ignore the warning or provide a built path to start
command.
{
"scripts": {
- "start": "refine start",
+ "start": "refine start ./build/index.js",
},
}
There should be no changes necessary regarding @refinedev/remix-router
but your app may need to be updated according to the changes in Remix v2
. Please refer to the Remix v2 upgrade guide for more information.
Published by refine-bot 10 months ago
#5429 3bc130e475
Thanks @alicanerdurmaz! - fix: useNotification.close("notification-key")
not working. Resolves #5433
#5465 00e00cbd98
Thanks @aliemir! - Fixed the type issue between remark-gfm
and react-markdown
. #5463
Published by refine-bot 10 months ago
#5373 dff476ca41
Thanks @aliemir! - Show and List type inferencers were failing to provide a preview when there's a relational property without a presentational key. Updated generated code blocks to handle fields with no accessor keys and display a placeholder message instead. Fixes #5184
#5373 dff476ca41
Thanks @aliemir! - Fixed the issue of wrongfully assuming id
key of relational fields in Chakra UI and Headless edit inferencers. Fixes #5274
#5373 dff476ca41
Thanks @aliemir! - Even though id
is required for Refine to work properly, in some list queries there may not be an id
field. Material UI Datagrid requires an identifier for each row, if there's no id
field, we're fallbacking to the first key of the row. Fixes the errors thrown for this case in Material UI List inferencers.
#5373 dff476ca41
Thanks @aliemir! - Updated the object field inferencer to check for fields end with name
and label
and use them as the display name for the field. Previously the check was done for a predefined set of properties, now it's done for any property that ends with name
or label
which results with more accurate code generation.
Updated dependencies [75bb61dd3b
, 93e00fd770
, e5888b6b9c
, b621223bfb
, 19ceffbe9f
]:
Published by refine-bot 10 months ago
#5398 fda3494215
Thanks @alicanerdurmaz! - fix: Remix v2 requires build path as argument for remix-serve
but Refine CLI was not passing it.
From now on, Refine CLI will pass the build path as argument to remix-serve
command and uses the default ./build/index.js
if not provided.
You can pass the build path as argument to refine start
command.
// package.json
{
"scripts": {
"start": "refine start ./build/index.js"
}
}