Skip to content

Commit 3f5bb81

Browse files
committed
Merge remote-tracking branch 'origin/next' into headless-doc-content
2 parents 19ec28a + 704ad2c commit 3f5bb81

File tree

215 files changed

+6159
-1533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+6159
-1533
lines changed

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
# Changelog
22

3+
## 5.11.0
4+
5+
* Add ability to use a `ReactNode` as create label in `<AutocompleteInput>` and `<SelectInput>` ([#10883](https://github.com/marmelab/react-admin/pull/10883)) ([Madeorsk](https://github.com/Madeorsk))
6+
* Add `<SelectArrayInput InputLabelProps>` prop to support label configuration ([#10872](https://github.com/marmelab/react-admin/pull/10872)) ([antoinefricker](https://github.com/antoinefricker))
7+
* Add support for embedded resources in ra-data-simple-rest ([#10898](https://github.com/marmelab/react-admin/pull/10898)) ([fzaninotto](https://github.com/fzaninotto))
8+
* Use bulk export ([#10908](https://github.com/marmelab/react-admin/pull/10908)) ([djhi](https://github.com/djhi))
9+
* Introduce `useDeleteController` ([#10876](https://github.com/marmelab/react-admin/pull/10876)) ([djhi](https://github.com/djhi))
10+
* Move more primitives from `ra-ui-materialui` to `ra-core` ([#10907](https://github.com/marmelab/react-admin/pull/10907)) ([djhi](https://github.com/djhi))
11+
* Make all mutations react to their declaration time options changes ([#10857](https://github.com/marmelab/react-admin/pull/10857)) ([djhi](https://github.com/djhi))
12+
* Add offline support to `<ReferenceManyCountBase>` and `<ReferenceManyCount>` ([#10903](https://github.com/marmelab/react-admin/pull/10903)) ([djhi](https://github.com/djhi))
13+
* Add offline support to `<ReferenceManyFieldBase>` and `<ReferenceManyField>` ([#10902](https://github.com/marmelab/react-admin/pull/10902)) ([djhi](https://github.com/djhi))
14+
* Add offline support to `<ReferenceArrayFieldBase>` and `<ReferenceArrayField>` ([#10901](https://github.com/marmelab/react-admin/pull/10901)) ([djhi](https://github.com/djhi))
15+
* Add offline support to `<ListBase>` and `<List>` ([#10896](https://github.com/marmelab/react-admin/pull/10896)) ([djhi](https://github.com/djhi))
16+
* Add offline support to `<ReferenceArrayInputBase>` and `<ReferenceArrayInput>` ([#10895](https://github.com/marmelab/react-admin/pull/10895)) ([djhi](https://github.com/djhi))
17+
* Add offline support to `<ReferenceManyFieldBase>` ([#10865](https://github.com/marmelab/react-admin/pull/10865)) ([djhi](https://github.com/djhi))
18+
* Add offline support to `<ReferenceInputBase>`, `<ReferenceInput>` and `<AutocompleteInput>` ([#10864](https://github.com/marmelab/react-admin/pull/10864)) ([djhi](https://github.com/djhi))
19+
* Add offline support to `<ReferenceOneFieldBase>` and `<ReferenceOneField>` ([#10861](https://github.com/marmelab/react-admin/pull/10861)) ([djhi](https://github.com/djhi))
20+
* Add offline support to `<ReferenceFieldBase>` and `<ReferenceField>` ([#10860](https://github.com/marmelab/react-admin/pull/10860)) ([djhi](https://github.com/djhi))
21+
* Add offline support to `<EditBase>` and `<Edit>` ([#10858](https://github.com/marmelab/react-admin/pull/10858)) ([djhi](https://github.com/djhi))
22+
* Add offline support to `<ShowBase>` and `<Show>` ([#10852](https://github.com/marmelab/react-admin/pull/10852)) ([djhi](https://github.com/djhi))
23+
* Improve offline detection in Edit, Show, ReferenceField and ReferenceOneField ([#10899](https://github.com/marmelab/react-admin/pull/10899)) ([djhi](https://github.com/djhi))
24+
* Add `mutationKey` to all mutations to allow offline mutations ([#10851](https://github.com/marmelab/react-admin/pull/10851)) ([djhi](https://github.com/djhi))
25+
* Fix `<Link>` cannot be styled through MUI theme ([#10905](https://github.com/marmelab/react-admin/pull/10905)) ([djhi](https://github.com/djhi))
26+
* Fix regression regarding `disableAuthentication` in `EditBase` and `ShowBase` ([#10906](https://github.com/marmelab/react-admin/pull/10906)) ([djhi](https://github.com/djhi))
27+
* Fix security vulnerabilities affecting `devalue` and `form-data` ([#10911](https://github.com/marmelab/react-admin/pull/10911)) ([slax57](https://github.com/slax57))
28+
* [Doc] Fix `<ListBase>` is missing the `storeKey` prop ([#10894](https://github.com/marmelab/react-admin/pull/10894)) ([slax57](https://github.com/slax57))
29+
* [TypeScript] Export `ValidationMessageFuncParams` and `ValidationMessageFunc` types ([#10867](https://github.com/marmelab/react-admin/pull/10867)) ([djhi](https://github.com/djhi))
30+
* [chore] move `sanitizeFieldRestProps` and `sanitizeInputRestProps` to `ra-core` ([#10874](https://github.com/marmelab/react-admin/pull/10874)) ([jonathanarnault](https://github.com/jonathanarnault))
31+
* [Chore] Move `ArrayInputContext` to `ra-core` ([#10873](https://github.com/marmelab/react-admin/pull/10873)) ([jonathanarnault](https://github.com/jonathanarnault))
32+
* [chore] Fix CRM demo cannot load MSW when deployed on a sub URL ([#10897](https://github.com/marmelab/react-admin/pull/10897)) ([djhi](https://github.com/djhi))
33+
* [chore] Revert MSW usage on simple example ([#10893](https://github.com/marmelab/react-admin/pull/10893)) ([djhi](https://github.com/djhi))
34+
35+
## 5.10.2
36+
37+
* Add warning when using `queryOptions` to add a `meta` in `<Edit>` and `<EditBase>` ([#10882](https://github.com/marmelab/react-admin/pull/10882)) ([Madeorsk](https://github.com/Madeorsk))
38+
* Fix error when authProvider check methods are not async ([#10890](https://github.com/marmelab/react-admin/pull/10890)) ([fzaninotto](https://github.com/fzaninotto))
39+
* Fix `ChipField` consider zero to be empty ([#10877](https://github.com/marmelab/react-admin/pull/10877)) ([djhi](https://github.com/djhi))
40+
* [Doc] Add Apisix OIDC auth provider ([#10888](https://github.com/marmelab/react-admin/pull/10888)) ([fzaninotto](https://github.com/fzaninotto))
41+
* [Doc] Add details about Datagrid to DataTable migration ([#10884](https://github.com/marmelab/react-admin/pull/10884)) ([Madeorsk](https://github.com/Madeorsk))
42+
43+
## 5.10.1
44+
45+
* Fix `<ColumnsButton>` cannot be used with keyboard ([#10869](https://github.com/marmelab/react-admin/pull/10869)) ([djhi](https://github.com/djhi))
46+
* Fix unused imports ([#10866](https://github.com/marmelab/react-admin/pull/10866)) ([Madeorsk](https://github.com/Madeorsk))
47+
* Fix `<ReferenceArrayInput>` does not accept `alwaysOn` prop ([#10863](https://github.com/marmelab/react-admin/pull/10863)) ([djhi](https://github.com/djhi))
48+
* Fix `DateInput` JSDoc formatting and example ([#10855](https://github.com/marmelab/react-admin/pull/10855)) ([ogroppo](https://github.com/ogroppo))
49+
* Fix B&W theme label is invisible for inputs with `standard` variant ([#10854](https://github.com/marmelab/react-admin/pull/10854)) ([djhi](https://github.com/djhi))
50+
* Fix Show and Edit controllers can trigger a redirect loop with react-router v7 if getOne rejects ([#10850](https://github.com/marmelab/react-admin/pull/10850)) ([slax57](https://github.com/slax57))
51+
* [Demo] Migrate from `fetch-mock` to `msw` ([#10844](https://github.com/marmelab/react-admin/pull/10844)) ([erwanMarmelab](https://github.com/erwanMarmelab))
52+
* Bump linkifyjs from 4.1.1 to 4.3.2 ([#10868](https://github.com/marmelab/react-admin/pull/10868)) ([dependabot[bot]](https://github.com/apps/dependabot))
53+
354
## 5.10.0
455

556
* Add filter input to `<ColumnsButton>` when there are many columns ([#10848](https://github.com/marmelab/react-admin/pull/10848)) ([slax57](https://github.com/slax57))

context7.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://context7.com/schema/context7.json",
3+
"projectTitle": "React-admin",
4+
"description": "A frontend Framework for building single-page applications running in the browser on top of REST/GraphQL APIs, using TypeScript, React, react-router, react-hook-form, react-query, and Material Design.",
5+
"folders": ["docs"],
6+
"excludeFolders": ["src"],
7+
"excludeFiles": ["*.html","*.js","*.css"],
8+
"previousVersions": [
9+
{
10+
"tag": "v4.16.0",
11+
"title": "version 4.16"
12+
},
13+
{
14+
"tag": "v3.19.0",
15+
"title": "version 3.19"
16+
},
17+
{
18+
"tag": "v2.9.0",
19+
"title": "version 2.9"
20+
}
21+
]
22+
}

docs/AuthProviderList.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ title: "Supported Auth Provider Backends"
88
It's very common that your auth logic is so specific that you'll need to write your own `authProvider`. However, the community has built a few open-source Auth Providers that may fit your need:
99

1010
<div class="providers-list" markdown="1">
11+
- ![Apisix logo](./img/backend-logos/apisix.svg "Apisix logo")**[Apache Apisix OIDC](https://apisix.apache.org/)**: [@arte/ra-apisix-oidc](https://www.npmjs.com/package/@arte/ra-apisix-oidc)
1112
- ![Appwrite Logo](./img/backend-logos/appwrite.svg "Appwrite Logo")**[Appwrite](https://appwrite.io/)**: [marmelab/ra-appwrite](https://github.com/marmelab/ra-appwrite)
1213
- ![auth0 Logo](./img/backend-logos/auth0.svg "auth0 Logo")**[Auth0 by Okta](https://auth0.com/)**: [marmelab/ra-auth-auth0](https://github.com/marmelab/ra-auth-auth0/blob/main/packages/ra-auth-auth0/Readme.md)
1314
- ![amplify Logo](./img/backend-logos/amplify.svg "amplify Logo")**[AWS Amplify](https://docs.amplify.aws)**: [MrHertal/react-admin-amplify](https://github.com/MrHertal/react-admin-amplify)

docs/AutocompleteArrayInput.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ The form value for the source must be an array of the selected values, e.g.
6868
| `filterToQuery` | Optional | `string` => `Object` | `q => ({ q })` | How to transform the searchText into a parameter for the data provider |
6969
| `inputText` | Optional | `Function` | `-` | Required if `optionText` is a custom Component, this function must return the text displayed for the current selection. |
7070
| `matchSuggestion` | Optional | `Function` | `-` | Required if `optionText` is a React element. Function returning a boolean indicating whether a choice matches the filter. `(filter, choice) => boolean` |
71+
| `offline` | Optional | `ReactNode` | - | What to render when there is no network connectivity when fetching the choices |
7172
| `onChange` | Optional | `Function` | `-` | A function called with the new value, along with the selected records, when the input value changes |
7273
| `onCreate` | Optional | `Function` | `-` | A function called with the current filter value when users choose to create a new choice. |
7374
| `optionText` | Optional | `string` &#124; `Function` &#124; `Component` | `name` | Field name of record to display in the suggestion item or function which accepts the correct record as argument (`(record)=> {string}`) |
@@ -323,6 +324,27 @@ const filterToQuery = searchText => ({ name_ilike: `%${searchText}%` });
323324
</ReferenceArrayInput>
324325
```
325326

327+
## `offline`
328+
329+
`<AutocompleteArrayInput>` can display a custom message when it can't fetch the choices because there is no network connectivity, thanks to the `offline` prop.
330+
331+
```jsx
332+
<ReferenceArrayInput source="tag_ids" reference="tags">
333+
<AutocompleteArrayInput offline={<span>No network, could not fetch data</span>} />
334+
</ReferenceArrayInput>
335+
```
336+
337+
You can pass either a React element or a string to the `offline` prop:
338+
339+
```jsx
340+
<ReferenceArrayInput source="tag_ids" reference="tags">
341+
<AutocompleteArrayInput offline={<span>No network, could not fetch data</span>} />
342+
</ReferenceArrayInput>
343+
<ReferenceArrayInput source="tag_ids" reference="tags">
344+
<AutocompleteArrayInput offline="No network, could not fetch data" />
345+
</ReferenceArrayInput>
346+
```
347+
326348
## `onChange`
327349

328350
Use the `onChange` prop to get notified when the input value changes.

0 commit comments

Comments
 (0)