Skip to content

Commit 31204a0

Browse files
authored
Merge pull request #10907 from marmelab/ra-core-primitives
Move more primitives from `ra-ui-materialui` to `ra-core`
2 parents 68d4fb8 + a064484 commit 31204a0

31 files changed

+76
-66
lines changed

packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIteratorContext.ts renamed to packages/ra-core/src/controller/input/SimpleFormIteratorContext.ts

File renamed without changes.

packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIteratorItemContext.ts renamed to packages/ra-core/src/controller/input/SimpleFormIteratorItemContext.ts

File renamed without changes.
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1-
import {
2-
getStatusForInput,
3-
getSelectedReferencesStatus,
4-
getStatusForArrayInput,
5-
} from './referenceDataStatus';
6-
1+
export * from './referenceDataStatus';
72
export * from './useReferenceArrayInputController';
83
export * from './useReferenceInputController';
94
export * from './ReferenceInputBase';
105
export * from './ReferenceArrayInputBase';
116
export * from './ArrayInputContext';
127
export * from './useArrayInput';
138
export * from './sanitizeInputRestProps';
14-
15-
export {
16-
getStatusForInput,
17-
getSelectedReferencesStatus,
18-
getStatusForArrayInput,
19-
};
9+
export * from './SimpleFormIteratorContext';
10+
export * from './SimpleFormIteratorItemContext';
11+
export * from './useSimpleFormIterator';
12+
export * from './useSimpleFormIteratorItem';

packages/ra-ui-materialui/src/input/ArrayInput/useSimpleFormIterator.ts renamed to packages/ra-core/src/controller/input/useSimpleFormIterator.ts

File renamed without changes.

packages/ra-ui-materialui/src/input/ArrayInput/useSimpleFormIteratorItem.ts renamed to packages/ra-core/src/controller/input/useSimpleFormIteratorItem.ts

File renamed without changes.
File renamed without changes.

packages/ra-core/src/controller/list/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export * from './FilterContext';
12
export * from './InfiniteListBase';
23
export * from './InfinitePaginationContext';
34
export * from './ListBase';
@@ -10,6 +11,7 @@ export * from './ListPaginationContext';
1011
export * from './ListSortContext';
1112
export * from './queryReducer';
1213
export * from './useExpanded';
14+
export * from './useFilterContext';
1315
export * from './useInfiniteListController';
1416
export * from './useInfinitePaginationContext';
1517
export * from './useList';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { useContext } from 'react';
2+
import { FilterContext, type FilterContextType } from './FilterContext';
3+
4+
export const useFilterContext = (): FilterContextType => {
5+
return useContext(FilterContext);
6+
};
File renamed without changes.

packages/ra-ui-materialui/src/layout/UserMenuContextProvider.tsx renamed to packages/ra-core/src/core/UserMenuContextProvider.tsx

File renamed without changes.

0 commit comments

Comments
 (0)