Skip to content

Commit 22a9fab

Browse files
author
React-Admin CI
committed
Merge branch 'master' into better-list-url-management
2 parents 5501615 + e89d57c commit 22a9fab

488 files changed

Lines changed: 15341 additions & 3302 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ cypress/downloads
2626
!.yarn/versions
2727
.env
2828
.claude/settings.local.json
29+
.npmrc

CHANGELOG.md

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

3+
## 5.14.0
4+
5+
* Add router abstraction and TanStack Router adapter ([#11102](https://github.com/marmelab/react-admin/pull/11102)) ([fzaninotto](https://github.com/fzaninotto))
6+
* Update `<ExportButton>` to make in work in every list ([#11119](https://github.com/marmelab/react-admin/pull/11119)) ([WiXSL](https://github.com/WiXSL))
7+
* Add forwardRef to react-admin buttons to support tooltips ([#11122](https://github.com/marmelab/react-admin/pull/11122)) ([WiXSL](https://github.com/WiXSL))
8+
* Allow disabling auto focusing the first input of newly added row with `<SimpleFormIterator disableAutoFocus>` ([#11101](https://github.com/marmelab/react-admin/pull/11101)) ([AarishMansur](https://github.com/AarishMansur))
9+
* Add `Store.listItems` method ([#11096](https://github.com/marmelab/react-admin/pull/11096)) ([djhi](https://github.com/djhi))
10+
* Add `useSupportCreateSuggestions` primitives to ra-core ([#11094](https://github.com/marmelab/react-admin/pull/11094)) ([slax57](https://github.com/slax57))
11+
* Move `genericMemo` to ra-core ([#11093](https://github.com/marmelab/react-admin/pull/11093)) ([slax57](https://github.com/slax57))
12+
* Add `useSavedQueries` primitives to ra-core ([#11092](https://github.com/marmelab/react-admin/pull/11092)) ([slax57](https://github.com/slax57))
13+
* Fix `ColumnsSelector` search input should stay fixed above menu list ([#11114](https://github.com/marmelab/react-admin/pull/11114)) ([WiXSL](https://github.com/WiXSL))
14+
* [Doc] Fix Inputs doc code example ([#11125](https://github.com/marmelab/react-admin/pull/11125)) ([gartner](https://github.com/gartner))
15+
* [Doc] Add deleteMany method to README and source code docs for json-server Data Provider ([#11118](https://github.com/marmelab/react-admin/pull/11118)) ([femrek](https://github.com/femrek))
16+
* [Chore] Update Cypress ([#11127](https://github.com/marmelab/react-admin/pull/11127)) ([fzaninotto](https://github.com/fzaninotto))
17+
* [chore] Stabilize flaky tests ([#11121](https://github.com/marmelab/react-admin/pull/11121)) ([WiXSL](https://github.com/WiXSL))
18+
* Bump lodash from 4.17.21 to 4.17.23 ([#11129](https://github.com/marmelab/react-admin/pull/11129)) ([dependabot[bot]](https://github.com/apps/dependabot))
19+
* Bump lodash-es from 4.17.21 to 4.17.23 ([#11128](https://github.com/marmelab/react-admin/pull/11128)) ([dependabot[bot]](https://github.com/apps/dependabot))
20+
* Bump diff from 5.2.0 to 5.2.2 ([#11126](https://github.com/marmelab/react-admin/pull/11126)) ([dependabot[bot]](https://github.com/apps/dependabot))
21+
22+
## 5.13.6
23+
24+
* [Doc] Update link to marmelab blog ([#11117](https://github.com/marmelab/react-admin/pull/11117)) ([WiXSL](https://github.com/WiXSL))
25+
* [Doc] Update `<AutoPersistInStore>` documentation ([#11110](https://github.com/marmelab/react-admin/pull/11110)) ([djhi](https://github.com/djhi))
26+
* [Doc] Update Soft Delete headless documentation ([#11109](https://github.com/marmelab/react-admin/pull/11109)) ([jonathanarnault](https://github.com/jonathanarnault))
27+
* [Doc] Fix `Validation` section position ([#11107](https://github.com/marmelab/react-admin/pull/11107)) ([WiXSL](https://github.com/WiXSL))
28+
* Bump h3 from 1.15.4 to 1.15.5 ([#11116](https://github.com/marmelab/react-admin/pull/11116)) ([dependabot[bot]](https://github.com/apps/dependabot))
29+
* Bump devalue from 5.5.0 to 5.6.2 ([#11115](https://github.com/marmelab/react-admin/pull/11115)) ([dependabot[bot]](https://github.com/apps/dependabot))
30+
31+
## 5.13.5
32+
33+
* Fix `<Form>` ignores `resetOptions` when record changes ([#11099](https://github.com/marmelab/react-admin/pull/11099)) ([Jszigeti](https://github.com/Jszigeti))
34+
* Fix `<ColumnsSelector>` cannot hide `<DataTable.Col>` items with no `source` ([#11088](https://github.com/marmelab/react-admin/pull/11088)) ([fzaninotto](https://github.com/fzaninotto))
35+
* [Doc] Clarify validation prop usage on `<ReferenceInput>` / `<ReferenceArrayInput>` ([#11104](https://github.com/marmelab/react-admin/pull/11104)) ([WiXSL](https://github.com/WiXSL))
36+
* [Doc] Add tutorial for React Router Framework ([#11100](https://github.com/marmelab/react-admin/pull/11100)) ([djhi](https://github.com/djhi))
37+
* [Doc] Update `<DatagridAG>` docs following `ra-datagrid-ag` 7.0.0 release ([#11097](https://github.com/marmelab/react-admin/pull/11097)) ([slax57](https://github.com/slax57))
38+
* [Doc] Update `AdapterDateFns` imports for MUIX v8 ([#11090](https://github.com/marmelab/react-admin/pull/11090)) ([djhi](https://github.com/djhi))
39+
* [Doc] Document `<FilterValue>` ([#11086](https://github.com/marmelab/react-admin/pull/11086)) ([djhi](https://github.com/djhi))
40+
* [chore] Fix security vulnerabilities in `qs` and `systeminformation` ([#11103](https://github.com/marmelab/react-admin/pull/11103)) ([slax57](https://github.com/slax57))
41+
* Bump react-router from 6.28.1 to 6.30.2 ([#11106](https://github.com/marmelab/react-admin/pull/11106)) ([dependabot[bot]](https://github.com/apps/dependabot))
42+
* Bump storybook from 8.6.11 to 8.6.15 ([#11098](https://github.com/marmelab/react-admin/pull/11098)) ([dependabot[bot]](https://github.com/apps/dependabot))
43+
44+
## 5.13.4
45+
46+
* Fix `useAugmentedForm` resets the form one too many time ([#11085](https://github.com/marmelab/react-admin/pull/11085)) ([slax57](https://github.com/slax57))
47+
* Fix `<BulkDeleteWithConfirmButton>`: prevent `mutationOptions` from being passed to DOM ([#11077](https://github.com/marmelab/react-admin/pull/11077)) ([devserkan](https://github.com/devserkan))
48+
* Fix regression in `memoryStore` ([#11075](https://github.com/marmelab/react-admin/pull/11075)) ([djhi](https://github.com/djhi))
49+
* [Doc] Update RA Core EE documentation ([#11078](https://github.com/marmelab/react-admin/pull/11078)) ([jonathanarnault](https://github.com/jonathanarnault))
50+
* [Doc] Fix `<ReferenceOneField>` doc incorrectly mentions one of `children` or `render` is required ([#11072](https://github.com/marmelab/react-admin/pull/11072)) ([slax57](https://github.com/slax57))
51+
* Bump @tiptap/extension-link from 2.0.3 to 2.10.4 ([#11074](https://github.com/marmelab/react-admin/pull/11074)) ([dependabot[bot]](https://github.com/apps/dependabot))
52+
53+
## 5.13.3
54+
55+
* Replace deprecated `<ListItemSecondaryAction>` component by `secondaryAction` prop ([#11033](https://github.com/marmelab/react-admin/pull/11033)) ([smeng9](https://github.com/smeng9))
56+
* Fix `memoryStore` does not support nested-looking keys ([#11070](https://github.com/marmelab/react-admin/pull/11070)) ([slax57](https://github.com/slax57))
57+
* Fix `<Datagrid>` does not show the correct number of selected items ([#11069](https://github.com/marmelab/react-admin/pull/11069)) ([djhi](https://github.com/djhi))
58+
* Fix values from location are not applied on Forms ([#11067](https://github.com/marmelab/react-admin/pull/11067)) ([djhi](https://github.com/djhi))
59+
60+
## 5.13.2
61+
62+
* Fix `<SelectAllButton>` ignores the `storeKey` ([#11060](https://github.com/marmelab/react-admin/pull/11060)) ([slax57](https://github.com/slax57))
63+
* Fix package exports ([#11059](https://github.com/marmelab/react-admin/pull/11059)) ([djhi](https://github.com/djhi))
64+
* Fix `<DataTable>` may duplicate ids in its selection state ([#11047](https://github.com/marmelab/react-admin/pull/11047)) ([Jszigeti](https://github.com/Jszigeti))
65+
* [Doc] Update `<ReferenceManyInputBase>` props table ([#11055](https://github.com/marmelab/react-admin/pull/11055)) ([jonathanarnault](https://github.com/jonathanarnault))
66+
* [Doc] Fix Youtube integrations ([#11053](https://github.com/marmelab/react-admin/pull/11053)) ([slax57](https://github.com/slax57))
67+
* [Doc] Fix headless FormDataConsumer doc still references react-admin, and mention SimpleFormIteratorBase ([#11050](https://github.com/marmelab/react-admin/pull/11050)) ([slax57](https://github.com/slax57))
68+
* [Doc] Update RA Core EE documentation ([#11037](https://github.com/marmelab/react-admin/pull/11037)) ([jonathanarnault](https://github.com/jonathanarnault))
69+
* [TypeScript] Fix usage of `ReactElement` when it should be `ReactNode` ([#11046](https://github.com/marmelab/react-admin/pull/11046)) ([djhi](https://github.com/djhi))
70+
* [website] Remove banner to announce Shadcn Admin Kit - master ([#11048](https://github.com/marmelab/react-admin/pull/11048)) ([slax57](https://github.com/slax57))
71+
* [chore] Bump astro from 5.15.6 to 5.15.9 ([#11057](https://github.com/marmelab/react-admin/pull/11057)) ([dependabot[bot]](https://github.com/apps/dependabot))
72+
* [chore] Stabilize flaky unit tests ([#11056](https://github.com/marmelab/react-admin/pull/11056)) ([djhi](https://github.com/djhi))
73+
74+
## 5.13.1
75+
76+
* Fix imports from directory ([#11039](https://github.com/marmelab/react-admin/pull/11039)) ([djhi](https://github.com/djhi))
77+
* Fix `<ReferenceFieldBase>` considers zero-index reference as empty ([#11042](https://github.com/marmelab/react-admin/pull/11042)) ([fzaninotto](https://github.com/fzaninotto))
78+
* [Storybook] Fix `<ArrayInputBase>` story issue when adding back a removed item ([#11041](https://github.com/marmelab/react-admin/pull/11041)) ([djhi](https://github.com/djhi))
79+
* [Storybook] Fix `<SaveButton>` Dirty story ([#11040](https://github.com/marmelab/react-admin/pull/11040)) ([djhi](https://github.com/djhi))
80+
* Bump astro from 5.15.3 to 5.15.6 ([#11043](https://github.com/marmelab/react-admin/pull/11043)) ([dependabot[bot]](https://github.com/apps/dependabot))
81+
* [chore] Fix release script copies invalid node_modules subfolder ([#11038](https://github.com/marmelab/react-admin/pull/11038)) ([slax57](https://github.com/slax57))
82+
83+
## 5.13.0
84+
85+
* Introduce `<ArrayInputBase>`, `<SimpleFomIteratorBase>` and `<SimpleFormIteratorItemBase>` ([#10955](https://github.com/marmelab/react-admin/pull/10955)) ([djhi](https://github.com/djhi))
86+
* Introduce separate selection states for lists with distinct `storeKey` ([#10953](https://github.com/marmelab/react-admin/pull/10953)) ([mikhail-fedosenko](https://github.com/mikhail-fedosenko))
87+
* Speed up ArrayInput ([#10926](https://github.com/marmelab/react-admin/pull/10926)) ([fzaninotto](https://github.com/fzaninotto))
88+
* Improve packages exports ([#10995](https://github.com/marmelab/react-admin/pull/10995)) ([djhi](https://github.com/djhi))
89+
* Export guessers views ([#10981](https://github.com/marmelab/react-admin/pull/10981)) ([djhi](https://github.com/djhi))
90+
* Add empty property to ListBase and InfiniteListBase ([#10940](https://github.com/marmelab/react-admin/pull/10940)) ([Madeorsk](https://github.com/Madeorsk))
91+
* Fix `useExpanded` does not have a stable `defaultValue` ([#11028](https://github.com/marmelab/react-admin/pull/11028)) ([djhi](https://github.com/djhi))
92+
* [Doc] Explain how to set up Jest for RA 5.13 ([#11036](https://github.com/marmelab/react-admin/pull/11036)) ([slax57](https://github.com/slax57))
93+
* [Doc] Fix data provider options in Create React Admin documentation ([#11032](https://github.com/marmelab/react-admin/pull/11032)) ([slax57](https://github.com/slax57))
94+
* [Doc] Update README to use React 18 createRoot API ([#11031](https://github.com/marmelab/react-admin/pull/11031)) ([hamed-zeidabadi](https://github.com/hamed-zeidabadi))
95+
* [Doc] Update RA Core EE documentation ([#11023](https://github.com/marmelab/react-admin/pull/11023)) ([jonathanarnault](https://github.com/jonathanarnault))
96+
* [Doc] Fix `<LockOnMount>` invalid example ([#11019](https://github.com/marmelab/react-admin/pull/11019)) ([djhi](https://github.com/djhi))
97+
* [Doc] Fix incorrect documentation of EditInDialogButton ([#10943](https://github.com/marmelab/react-admin/pull/10943)) ([Madeorsk](https://github.com/Madeorsk))
98+
* [TypeScript] Fix usage of `ReactElement` when it should be `ReactNode` ([#11030](https://github.com/marmelab/react-admin/pull/11030)) ([djhi](https://github.com/djhi))
99+
* [Demo] Update lists to allow sorting by reference ([#11021](https://github.com/marmelab/react-admin/pull/11021)) ([fzaninotto](https://github.com/fzaninotto))
100+
* [Storybook] Fix array input stories ([#11002](https://github.com/marmelab/react-admin/pull/11002)) ([djhi](https://github.com/djhi))
101+
* [chore] Update `ra-core` Test UI ([#11020](https://github.com/marmelab/react-admin/pull/11020)) ([djhi](https://github.com/djhi))
102+
* [Chore]: Update react-admin to use ReactNode instead of ReactElement where applicable ([#10996](https://github.com/marmelab/react-admin/pull/10996)) ([jonathanarnault](https://github.com/jonathanarnault))
103+
* Bump min-document from 2.19.0 to 2.19.1 ([#11029](https://github.com/marmelab/react-admin/pull/11029)) ([dependabot[bot]](https://github.com/apps/dependabot))
104+
* Bump vite from 6.3.6 to 6.4.1 ([#11026](https://github.com/marmelab/react-admin/pull/11026)) ([dependabot[bot]](https://github.com/apps/dependabot))
105+
* Bump astro from 5.13.7 to 5.14.3 ([#11025](https://github.com/marmelab/react-admin/pull/11025)) ([dependabot[bot]](https://github.com/apps/dependabot))
106+
107+
### React-hook-form version bump
108+
109+
This release bumps the minimum required version of `react-hook-form` to `7.65.0`.
110+
111+
### Jest configuration update
112+
113+
This release changed the way react-admin exports its modules to be fully compatible with ESM (PR [#10995](https://github.com/marmelab/react-admin/pull/10995)). This may require you to update your Jest configuration if you are using Jest in CJS mode (the default).
114+
115+
See https://marmelab.com/react-admin/UnitTesting.html#working-with-jest for more details.
116+
117+
### Webpack configuration update
118+
119+
If you use MUI v5 or MUI v6, you may need to update your Webpack config by adding the following rules:
120+
121+
```js
122+
{
123+
// Your config
124+
modules: {
125+
rules: [
126+
// Your other rules
127+
{
128+
test: /\.m?js/,
129+
type: "javascript/auto",
130+
},
131+
{
132+
test: /\.m?js/,
133+
resolve: {
134+
fullySpecified: false,
135+
},
136+
},
137+
]
138+
}
139+
}
140+
```
141+
142+
### Vite configuration update
143+
144+
If you use MUI v5, you may have to add the following alias:
145+
146+
```js
147+
export default defineConfig(({ mode }) => ({
148+
// Your config
149+
resolve: {
150+
// Your resolve config
151+
alias: [
152+
// Your other aliases
153+
{
154+
find: /^@mui\/icons-material\/(.*)/,
155+
replacement: "@mui/icons-material/esm/$1",
156+
},
157+
]
158+
}
159+
});
160+
```
161+
3162
## 5.12.3
4163

5164
* Fix optimistic query invalidation and avoid invalidating the same query twice ([#11017](https://github.com/marmelab/react-admin/pull/11017)) ([slax57](https://github.com/slax57))

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ build-ra-core:
4343
@echo "Transpiling ra-core files...";
4444
@cd ./packages/ra-core && yarn build
4545

46+
build-ra-router-tanstack:
47+
@echo "Transpiling ra-router-tanstack files...";
48+
@cd ./packages/ra-router-tanstack && yarn build
49+
4650
build-ra-ui-materialui:
4751
@echo "Transpiling ra-ui-materialui files...";
4852
@cd ./packages/ra-ui-materialui && yarn build
@@ -112,7 +116,11 @@ build-create-react-admin:
112116
@echo "Transpiling create-react-admin files...";
113117
@cd ./packages/create-react-admin && yarn build
114118

115-
build: build-ra-core build-ra-data-fakerest build-ra-ui-materialui build-ra-data-json-server build-ra-data-local-forage build-ra-data-local-storage build-ra-data-simple-rest build-ra-data-graphql build-ra-data-graphql-simple build-ra-input-rich-text build-data-generator build-ra-language-english build-ra-language-french build-ra-i18n-i18next build-ra-i18n-polyglot build-react-admin build-ra-no-code build-create-react-admin ## compile ES6 files to JS
119+
update-package-exports: ## Update the package.json "exports" field for all packages
120+
@echo "Updating package exports..."
121+
@yarn tsx ./scripts/update-package-exports.ts
122+
123+
build: build-ra-core build-ra-router-tanstack build-ra-data-fakerest build-ra-ui-materialui build-ra-data-json-server build-ra-data-local-forage build-ra-data-local-storage build-ra-data-simple-rest build-ra-data-graphql build-ra-data-graphql-simple build-ra-input-rich-text build-data-generator build-ra-language-english build-ra-language-french build-ra-i18n-i18next build-ra-i18n-polyglot build-react-admin build-ra-no-code build-create-react-admin update-package-exports ## compile ES6 files to JS
116124

117125
doc: ## compile doc as html and launch doc web server
118126
@yarn doc

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A frontend Framework for building single-page applications running in the browser on top of REST/GraphQL APIs, using TypeScript, [React](https://facebook.github.io/react/) and [Material Design](https://material.io/). Open sourced and maintained by [marmelab](https://marmelab.com/).
44

5-
[Home page](https://marmelab.com/react-admin/) - [Documentation](https://marmelab.com/react-admin/documentation.html) - [Examples](#examples) - [Blog](https://marmelab.com/en/blog/#react-admin) - [Releases](https://github.com/marmelab/react-admin/releases) - [Support](#support)
5+
[Home page](https://marmelab.com/react-admin/) - [Documentation](https://marmelab.com/react-admin/documentation.html) - [Examples](#examples) - [Blog](https://marmelab.com/blog/tags/react-admin) - [Releases](https://github.com/marmelab/react-admin/releases) - [Support](#support)
66

77
[![react-admin-demo](https://marmelab.com/react-admin/img/react-admin-demo-still.png)](https://www.youtube.com/watch?v=bJEo1O1oT6o)
88

@@ -47,13 +47,13 @@ yarn add react-admin
4747
```jsx
4848
// in app.js
4949
import * as React from "react";
50-
import ReactDOM from 'react-dom';
50+
import { createRoot } from 'react-dom/client';
5151
import { Admin, Resource } from 'react-admin';
5252
import restProvider from 'ra-data-simple-rest';
5353

5454
import { PostList, PostEdit, PostCreate, PostIcon } from './posts';
5555

56-
ReactDOM.createRoot(document.getElementById('root')!).render(
56+
createRoot(document.getElementById('root')!).render(
5757
<Admin dataProvider={restProvider('http://localhost:3000')}>
5858
<Resource name="posts" list={PostList} edit={PostEdit} create={PostCreate} icon={PostIcon} />
5959
</Admin>

cypress/e2e/edit.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ describe('Edit Page', () => {
215215
);
216216
});
217217

218-
it('should intialize the form correctly when cloning from edit', () => {
218+
it('should initialize the form correctly when cloning from edit', () => {
219219
EditPostPage.navigate();
220220
cy.get(EditPostPage.elements.input('title')).should(el =>
221221
expect(el).to.have.value('Sed quo et et fugiat modi')

cypress/e2e/list.cy.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,37 @@ describe('List Page', () => {
170170
);
171171
});
172172

173+
it('should not create duplicate selections when checking page after individual selections', () => {
174+
cy.contains('1-10 of 13'); // wait for data
175+
cy.get('input[type="checkbox"]').eq(1).click();
176+
cy.get('input[type="checkbox"]').eq(2).click();
177+
cy.contains('2 items selected');
178+
ListPagePosts.toggleSelectAll();
179+
cy.contains('10 items selected');
180+
cy.get(ListPagePosts.elements.selectedItem).should(els =>
181+
expect(els).to.have.length(10)
182+
);
183+
});
184+
185+
it('should handle uncheck and recheck without duplicates', () => {
186+
cy.contains('1-10 of 13'); // wait for data
187+
cy.get('input[type="checkbox"]').eq(1).click();
188+
cy.get('input[type="checkbox"]').eq(2).click();
189+
cy.get('input[type="checkbox"]').eq(3).click();
190+
cy.contains('3 items selected');
191+
ListPagePosts.toggleSelectAll();
192+
cy.contains('10 items selected');
193+
ListPagePosts.toggleSelectAll();
194+
cy.get(ListPagePosts.elements.bulkActionsToolbar).should(
195+
'not.be.visible'
196+
);
197+
ListPagePosts.toggleSelectAll();
198+
cy.contains('10 items selected');
199+
cy.get(ListPagePosts.elements.selectedItem).should(els =>
200+
expect(els).to.have.length(10)
201+
);
202+
});
203+
173204
it('should allow to trigger a custom bulk action on selected items', () => {
174205
cy.contains('1-10 of 13'); // wait for data
175206
ListPagePosts.toggleSelectAll();

cypress/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"test": "yarn node ./start.js"
88
},
99
"devDependencies": {
10-
"cypress": "^15.0.0",
10+
"cypress": "^15.8.1",
1111
"cypress-vite": "^1.7.0",
12-
"express": "^4.20.0"
12+
"express": "^4.22.1"
1313
}
1414
}

0 commit comments

Comments
 (0)