Skip to content

Commit 2fa8a27

Browse files
committed
Merge branch 'master' into fix/array-input-reset
2 parents 4a8d31e + 9c5e3bb commit 2fa8a27

File tree

348 files changed

+16108
-3980
lines changed

Some content is hidden

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

348 files changed

+16108
-3980
lines changed

CHANGELOG.md

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

3+
## 5.8.1
4+
5+
* Fix `<Confirm>` ignore simple string `title` and `content` props ([#10723](https://github.com/marmelab/react-admin/pull/10723)) ([djhi](https://github.com/djhi))
6+
* Fix `<AutocompleteInput>` and `<SelectInput>` renders undefined instead of the `createLabel` when `optionText` is a function or a `recordRepresentation` is set ([#10715](https://github.com/marmelab/react-admin/pull/10715)) ([slax57](https://github.com/slax57))
7+
* [Doc] Fix documentation build ([#10730](https://github.com/marmelab/react-admin/pull/10730)) ([djhi](https://github.com/djhi))
8+
* [Doc] Fix documentation deployment for previous versions navigation ([#10725](https://github.com/marmelab/react-admin/pull/10725)) ([djhi](https://github.com/djhi))
9+
* [DOC] Rewrite select array input create doc ([#10711](https://github.com/marmelab/react-admin/pull/10711)) ([Cimanel](https://github.com/Cimanel))
10+
* [DOC] selectInput create example + storie ([#10710](https://github.com/marmelab/react-admin/pull/10710)) ([Cimanel](https://github.com/Cimanel))
11+
* [Demo] Fix theme switching ([#10732](https://github.com/marmelab/react-admin/pull/10732)) ([djhi](https://github.com/djhi))
12+
* [chore] Upgrade vite ([#10660](https://github.com/marmelab/react-admin/pull/10660)) ([djhi](https://github.com/djhi))
13+
* Bump vite from 6.2.6 to 6.2.7 ([#10726](https://github.com/marmelab/react-admin/pull/10726)) ([dependabot[bot]](https://github.com/apps/dependabot))
14+
15+
## 5.8.0
16+
17+
* Add `<InPlaceEditor>` for edit-in-place ([#10690](https://github.com/marmelab/react-admin/pull/10690)) ([fzaninotto](https://github.com/fzaninotto))
18+
* Add `<DataTable>` component ([#10597](https://github.com/marmelab/react-admin/pull/10597)) ([fzaninotto](https://github.com/fzaninotto))
19+
* Add `<AuthLayout>` to share layout of login page with register & forgot password pages ([#10640](https://github.com/marmelab/react-admin/pull/10640)) ([djhi](https://github.com/djhi))
20+
* Add support for defaultProps override via theme ([#10655](https://github.com/marmelab/react-admin/pull/10655)) ([djhi](https://github.com/djhi))
21+
* Add support for MUI v7 ([#10639](https://github.com/marmelab/react-admin/pull/10639)) ([djhi](https://github.com/djhi))
22+
* Add ability to configure `<Loading>` timeout ([#10689](https://github.com/marmelab/react-admin/pull/10689)) ([WiXSL](https://github.com/WiXSL))
23+
* Improve `<DeleteButton>` and `<UpdateButton>` confirmation wording using record representation ([#10654](https://github.com/marmelab/react-admin/pull/10654)) ([djhi](https://github.com/djhi))
24+
* [Doc] Rewrite `<AutocompleteArrayInput>` create doc example ([#10700](https://github.com/marmelab/react-admin/pull/10700)) ([Cimanel](https://github.com/Cimanel))
25+
* [chore] create-react-admin: Remove sourcemaps from production build ([#10693](https://github.com/marmelab/react-admin/pull/10693)) ([slax57](https://github.com/slax57))
26+
* Bump json-graphql-server to 3.2.0 ([#10713](https://github.com/marmelab/react-admin/pull/10713)) ([fzaninotto](https://github.com/fzaninotto))
27+
* Bump react-router from 7.1.1 to 7.5.3 ([#10712](https://github.com/marmelab/react-admin/pull/10712)) ([fzaninotto](https://github.com/fzaninotto))
28+
29+
## 5.7.4
30+
31+
* Fix `<FilterLiveForm>` compatibility with react-hook-form 7.55.0, part 2 ([#10697](https://github.com/marmelab/react-admin/pull/10697)) ([slax57](https://github.com/slax57))
32+
* Fix `<SelectInput>` shows gap in border when using no label with outlined variant ([#10692](https://github.com/marmelab/react-admin/pull/10692)) ([fzaninotto](https://github.com/fzaninotto))
33+
* Fix `canAccess` is called even when `disableAuthentication` is `true` ([#10691](https://github.com/marmelab/react-admin/pull/10691)) ([slax57](https://github.com/slax57))
34+
* [Doc] improve AutocompleteInput create example ([#10696](https://github.com/marmelab/react-admin/pull/10696)) ([Cimanel](https://github.com/Cimanel))
35+
* [Demo] Fix unneeded check in CRM demo ([#10694](https://github.com/marmelab/react-admin/pull/10694)) ([afilp](https://github.com/afilp))
36+
* [chore] ESLint: (re)enable import rules ([#10685](https://github.com/marmelab/react-admin/pull/10685)) ([slax57](https://github.com/slax57))
37+
38+
## 5.7.3
39+
40+
* Fix `<ShowGuesser>` print incorrect code for reference arrays ([#10682](https://github.com/marmelab/react-admin/pull/10682)) ([djhi](https://github.com/djhi))
41+
* Fix `<RichTextField>` should render `emptyText` when value is an empty string ([#10670](https://github.com/marmelab/react-admin/pull/10670)) ([slax57](https://github.com/slax57))
42+
* Fix TS error when using `EditGuesser` in module's default export ([#10669](https://github.com/marmelab/react-admin/pull/10669)) ([slax57](https://github.com/slax57))
43+
* Fix `useInput` default value overrides `null` ([#10665](https://github.com/marmelab/react-admin/pull/10665)) ([djhi](https://github.com/djhi))
44+
* [Doc] Fix `useNotify` custom notification with close example ([#10683](https://github.com/marmelab/react-admin/pull/10683)) ([djhi](https://github.com/djhi))
45+
* [doc] Add `AutoPersistInStore` doc page ([#10681](https://github.com/marmelab/react-admin/pull/10681)) ([erwanMarmelab](https://github.com/erwanMarmelab))
46+
* [Doc] Fix docs anchors ([#10675](https://github.com/marmelab/react-admin/pull/10675)) ([WiXSL](https://github.com/WiXSL))
47+
* [Doc] Fix Dialog Forms examples regarding `hasCreate` ([#10671](https://github.com/marmelab/react-admin/pull/10671)) ([slax57](https://github.com/slax57))
48+
* [Doc] Explain how React admin handles empty values ([#10666](https://github.com/marmelab/react-admin/pull/10666)) ([djhi](https://github.com/djhi))
49+
* [Doc] Update NextJS integration ([#10664](https://github.com/marmelab/react-admin/pull/10664)) ([djhi](https://github.com/djhi))
50+
* [Doc] Document how to setup Remix for production debugging ([#10663](https://github.com/marmelab/react-admin/pull/10663)) ([djhi](https://github.com/djhi))
51+
* [Demo] Use Echarts instead of rechart ([#10677](https://github.com/marmelab/react-admin/pull/10677)) ([fzaninotto](https://github.com/fzaninotto))
52+
* [Demo] Fix order chart currency ([#10668](https://github.com/marmelab/react-admin/pull/10668)) ([fzaninotto](https://github.com/fzaninotto))
53+
* Bump vite from 5.4.16 to 5.4.17 ([#10659](https://github.com/marmelab/react-admin/pull/10659)) ([dependabot[bot]](https://github.com/apps/dependabot))
54+
355
## 5.7.2
456

557
* Fix `<FilterLiveForm>` compatibility with react-hook-form 7.55.0 ([#10657](https://github.com/marmelab/react-admin/pull/10657)) ([slax57](https://github.com/slax57))

cypress/e2e/list.cy.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ describe('List Page', () => {
254254
.should(el => expect(el).to.have.attr('aria-expanded', 'true'))
255255
.should(el => expect(el).to.have.attr('aria-label', 'Close'));
256256

257-
cy.get('#13-expand').should(el =>
257+
cy.get('#posts-13-expand').should(el =>
258258
expect(el).to.contain(
259259
'Curabitur eu odio ullamcorper, pretium sem at, blandit libero. Nulla sodales facilisis libero, eu gravida tellus ultrices nec. In ut gravida mi. Vivamus finibus tortor tempus egestas lacinia. Cras eu arcu nisl. Donec pretium dolor ipsum, eget feugiat urna iaculis ut.'
260260
)
@@ -269,7 +269,7 @@ describe('List Page', () => {
269269
.should(el => expect(el).to.have.attr('aria-expanded', 'true'))
270270
.should(el => expect(el).to.have.attr('aria-label', 'Close'));
271271

272-
cy.get('#13-expand').should(el => expect(el).to.exist);
272+
cy.get('#posts-13-expand').should(el => expect(el).to.exist);
273273
cy.wait(500); // Ensure animations are done
274274

275275
cy.get('[aria-label="Expand"]')
@@ -278,7 +278,7 @@ describe('List Page', () => {
278278
.should(el => expect(el).to.have.attr('aria-expanded', 'true'))
279279
.should(el => expect(el).to.have.attr('aria-label', 'Close'));
280280

281-
cy.get('#12-expand').should(el => expect(el).to.exist);
281+
cy.get('#posts-12-expand').should(el => expect(el).to.exist);
282282

283283
let all_labels = [13, 12, 11, 10, 9, 8, 7, 6, 4, 2];
284284

@@ -294,7 +294,9 @@ describe('List Page', () => {
294294
cy.get('[aria-label="Expand"]').eq(0).click();
295295

296296
all_labels.forEach(label => {
297-
cy.get(`#${label}-expand`).should(el => expect(el).to.exist);
297+
cy.get(`#posts-${label}-expand`).should(
298+
el => expect(el).to.exist
299+
);
298300
});
299301
});
300302
});

cypress/support/ListPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export default url => ({
1313
nextPage: "button[aria-label='Go to next page']",
1414
previousPage: "button[aria-label='Go to previous page']",
1515
pageNumber: n => `button[aria-label='Go to page ${n}']`,
16-
recordRows: '.datagrid-body tr',
17-
viewsColumn: '.datagrid-body tr td:nth-child(8)',
16+
recordRows: '.datatable-body tr.RaDataTable-row',
17+
viewsColumn: '.datatable-body tr td:nth-child(8)',
1818
datagridHeaders: 'th',
1919
sortBy: name => `th span[data-field="${name}"]`,
2020
svg: (name, criteria = '') =>

docs/AppTheme.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,24 @@ const theme = deepmerge(defaultTheme, {
356356
});
357357
```
358358

359+
This also works with many React Admin components. For instance, here's how to change the icon for all `<SaveButton>`:
360+
361+
```tsx
362+
import { defaultTheme } from 'react-admin';
363+
import { deepmerge } from '@mui/utils';
364+
import CheckIcon from '@mui/icons-material/Check';
365+
366+
const theme = deepmerge(defaultTheme, {
367+
components: {
368+
RaSaveButton: {
369+
defaultProps: {
370+
icon: <CheckIcon />,
371+
},
372+
},
373+
}
374+
});
375+
```
376+
359377
## Customizing The Sidebar Width
360378

361379
You can specify the `Sidebar` width by setting the `width` and `closedWidth` properties on your custom Material UI theme:
@@ -423,10 +441,11 @@ A `theme` object can contain the following keys:
423441

424442
**Tip**: Check [Material UI default theme documentation](https://mui.com/material-ui/customization/default-theme/) to see the default values and meaning for these keys.
425443

426-
```jsx
444+
```tsx
427445
import { lime, purple } from '@mui/material/colors';
446+
import type { ThemeOptions } from '@mui/material';
428447

429-
const theme = {
448+
const theme: ThemeOptions = {
430449
palette: {
431450
primary: {
432451
main: '#FF5733',
@@ -514,10 +533,10 @@ const myTheme = deepmerge(defaultTheme, {
514533
Here is the default theme:
515534

516535
```tsx
517-
import { RaThemeOptions } from './types';
536+
import type { ThemeOptions } from '@mui/material';
518537
import { deepmerge } from '@mui/utils';
519538

520-
const defaultThemeInvariants = {
539+
const defaultThemeInvariants: ThemeOptions = {
521540
typography: {
522541
h6: {
523542
fontWeight: 400,
@@ -578,7 +597,7 @@ const defaultThemeInvariants = {
578597
},
579598
};
580599

581-
export const defaultLightTheme: RaThemeOptions = deepmerge(
600+
export const defaultLightTheme: ThemeOptions = deepmerge(
582601
defaultThemeInvariants,
583602
{
584603
palette: {
@@ -607,7 +626,7 @@ export const defaultLightTheme: RaThemeOptions = deepmerge(
607626
}
608627
);
609628

610-
export const defaultDarkTheme: RaThemeOptions = deepmerge(
629+
export const defaultDarkTheme: ThemeOptions = deepmerge(
611630
defaultThemeInvariants,
612631
{
613632
palette: {
@@ -623,5 +642,4 @@ export const defaultDarkTheme: RaThemeOptions = deepmerge(
623642
);
624643

625644
export const defaultTheme = defaultLightTheme;
626-
627645
```

docs/Architecture.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ const DeleteButton = () => {
246246
loading={isPending}
247247
title="ra.message.delete_title"
248248
content="ra.message.delete_content"
249-
translateOptions={{
249+
titleTranslateOptions={{
250+
name: resource,
251+
id: record.id,
252+
}}
253+
contentTranslateOptions={{
250254
name: resource,
251255
id: record.id,
252256
}}

docs/AutoPersistInStore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "The AutoPersistInStore Component"
55

66
# `<AutoPersistInStore>`
77

8-
This [Enterprise Edition](https://react-admin-ee.marmelab.com)<img class="icon" src="./img/premium.svg" alt="React Admin Enterprise Edition icon" /> prevents data loss in forms by automatically saving the form data in the store when users navigate away from the page. When users return to the page, it reapplies the saved data to the form.
8+
This [Enterprise Edition](https://react-admin-ee.marmelab.com)<img class="icon" src="./img/premium.svg" alt="React Admin Enterprise Edition icon" /> component prevents data loss in forms by automatically saving the form data in the store when users navigate away from the page. When users return to the page, it reapplies the saved data to the form.
99

1010
<video controls autoplay playsinline muted loop>
1111
<source src="./img/AutoPersistInStore.mp4" type="video/mp4"/>

0 commit comments

Comments
 (0)