@mui/x-date-pickers-pro 8.0.0-alpha.12 → 8.0.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +299 -0
- package/DateRangePicker/DateRangePicker.types.d.ts +2 -2
- package/DateTimeRangePicker/DateTimeRangePicker.types.d.ts +2 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
- package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +2 -2
- package/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
- package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -2
- package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +1 -1
- package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +1 -1
- package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +1 -1
- package/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +6 -4
- package/dateRangeViewRenderers/dateRangeViewRenderers.js +13 -8
- package/esm/DateRangePicker/DateRangePicker.types.d.ts +2 -2
- package/esm/DateTimeRangePicker/DateTimeRangePicker.types.d.ts +2 -2
- package/esm/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
- package/esm/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +2 -2
- package/esm/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
- package/esm/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -2
- package/esm/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +1 -1
- package/esm/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +1 -1
- package/esm/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +1 -1
- package/esm/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +6 -4
- package/esm/dateRangeViewRenderers/dateRangeViewRenderers.js +13 -8
- package/esm/hooks/index.d.ts +2 -1
- package/esm/hooks/useMultiInputRangeField/index.d.ts +2 -1
- package/esm/hooks/useMultiInputRangeField/useMultiInputRangeField.d.ts +37 -18
- package/esm/hooks/useMultiInputRangeField/useMultiInputRangeField.js +41 -50
- package/esm/hooks/useMultiInputRangeField/useMultiInputRangeFieldRootProps.d.ts +11 -0
- package/esm/hooks/useMultiInputRangeField/useMultiInputRangeFieldRootProps.js +25 -0
- package/esm/hooks/useMultiInputRangeField/useMultiInputRangeFieldSelectedSections.d.ts +4 -1
- package/esm/hooks/useMultiInputRangeField/useMultiInputRangeFieldSelectedSections.js +3 -2
- package/esm/hooks/useMultiInputRangeField/useTextFieldProps.d.ts +30 -0
- package/esm/hooks/useMultiInputRangeField/useTextFieldProps.js +141 -0
- package/esm/index.js +1 -1
- package/esm/internals/hooks/models/index.d.ts +1 -1
- package/esm/internals/hooks/models/useRangePicker.d.ts +1 -8
- package/esm/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +8 -75
- package/esm/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +16 -4
- package/esm/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +17 -47
- package/esm/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +17 -4
- package/esm/internals/hooks/useRangePosition.d.ts +1 -4
- package/esm/internals/hooks/useRangePosition.js +1 -18
- package/esm/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +3 -3
- package/esm/internals/utils/createMultiInputRangeField/createMultiInputRangeField.js +26 -32
- package/esm/internals/utils/createMultiInputRangeField/createMultiInputRangeField.types.d.ts +1 -1
- package/esm/internals/utils/createMultiInputRangeField/useTextFieldProps.d.ts +12 -0
- package/esm/internals/utils/createMultiInputRangeField/useTextFieldProps.js +36 -0
- package/esm/internals/utils/date-fields-utils.d.ts +4 -1
- package/esm/internals/utils/date-fields-utils.js +5 -1
- package/esm/internals/utils/releaseInfo.js +1 -1
- package/esm/managers/useDateRangeManager.js +8 -1
- package/esm/managers/useDateTimeRangeManager.js +8 -1
- package/esm/managers/useTimeRangeManager.js +10 -1
- package/esm/models/fields.d.ts +5 -18
- package/hooks/index.d.ts +2 -1
- package/hooks/useMultiInputRangeField/index.d.ts +2 -1
- package/hooks/useMultiInputRangeField/useMultiInputRangeField.d.ts +37 -18
- package/hooks/useMultiInputRangeField/useMultiInputRangeField.js +40 -51
- package/hooks/useMultiInputRangeField/useMultiInputRangeFieldRootProps.d.ts +11 -0
- package/hooks/useMultiInputRangeField/useMultiInputRangeFieldRootProps.js +31 -0
- package/hooks/useMultiInputRangeField/useMultiInputRangeFieldSelectedSections.d.ts +4 -1
- package/hooks/useMultiInputRangeField/useMultiInputRangeFieldSelectedSections.js +3 -1
- package/hooks/useMultiInputRangeField/useTextFieldProps.d.ts +30 -0
- package/hooks/useMultiInputRangeField/useTextFieldProps.js +149 -0
- package/index.js +1 -1
- package/internals/hooks/models/index.d.ts +1 -1
- package/internals/hooks/models/useRangePicker.d.ts +1 -8
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +7 -74
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +16 -4
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +17 -47
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +17 -4
- package/internals/hooks/useRangePosition.d.ts +1 -4
- package/internals/hooks/useRangePosition.js +1 -18
- package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +3 -3
- package/internals/utils/createMultiInputRangeField/createMultiInputRangeField.js +25 -31
- package/internals/utils/createMultiInputRangeField/createMultiInputRangeField.types.d.ts +1 -1
- package/internals/utils/createMultiInputRangeField/useTextFieldProps.d.ts +12 -0
- package/internals/utils/createMultiInputRangeField/useTextFieldProps.js +44 -0
- package/internals/utils/date-fields-utils.d.ts +4 -1
- package/internals/utils/date-fields-utils.js +6 -1
- package/internals/utils/releaseInfo.js +1 -1
- package/managers/useDateRangeManager.js +8 -1
- package/managers/useDateTimeRangeManager.js +8 -1
- package/managers/useTimeRangeManager.js +10 -1
- package/models/fields.d.ts +5 -18
- package/modern/DateRangePicker/DateRangePicker.types.d.ts +2 -2
- package/modern/DateTimeRangePicker/DateTimeRangePicker.types.d.ts +2 -2
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +2 -2
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +2 -2
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +2 -2
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -2
- package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +1 -1
- package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +1 -1
- package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +1 -1
- package/modern/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +6 -4
- package/modern/dateRangeViewRenderers/dateRangeViewRenderers.js +13 -8
- package/modern/hooks/index.d.ts +2 -1
- package/modern/hooks/useMultiInputRangeField/index.d.ts +2 -1
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeField.d.ts +37 -18
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeField.js +41 -50
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeFieldRootProps.d.ts +11 -0
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeFieldRootProps.js +25 -0
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeFieldSelectedSections.d.ts +4 -1
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeFieldSelectedSections.js +3 -2
- package/modern/hooks/useMultiInputRangeField/useTextFieldProps.d.ts +30 -0
- package/modern/hooks/useMultiInputRangeField/useTextFieldProps.js +141 -0
- package/modern/index.js +1 -1
- package/modern/internals/hooks/models/index.d.ts +1 -1
- package/modern/internals/hooks/models/useRangePicker.d.ts +1 -8
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +8 -75
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +16 -4
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +17 -47
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +17 -4
- package/modern/internals/hooks/useRangePosition.d.ts +1 -4
- package/modern/internals/hooks/useRangePosition.js +1 -18
- package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +3 -3
- package/modern/internals/utils/createMultiInputRangeField/createMultiInputRangeField.js +26 -32
- package/modern/internals/utils/createMultiInputRangeField/createMultiInputRangeField.types.d.ts +1 -1
- package/modern/internals/utils/createMultiInputRangeField/useTextFieldProps.d.ts +12 -0
- package/modern/internals/utils/createMultiInputRangeField/useTextFieldProps.js +36 -0
- package/modern/internals/utils/date-fields-utils.d.ts +4 -1
- package/modern/internals/utils/date-fields-utils.js +5 -1
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/modern/managers/useDateRangeManager.js +8 -1
- package/modern/managers/useDateTimeRangeManager.js +8 -1
- package/modern/managers/useTimeRangeManager.js +10 -1
- package/modern/models/fields.d.ts +5 -18
- package/package.json +4 -4
- package/tsconfig.build.tsbuildinfo +1 -1
- package/esm/hooks/useMultiInputRangeField/useMultiInputRangeFieldTextFieldProps.d.ts +0 -17
- package/esm/hooks/useMultiInputRangeField/useMultiInputRangeFieldTextFieldProps.js +0 -59
- package/esm/internals/hooks/useEnrichedRangePickerField.d.ts +0 -70
- package/esm/internals/hooks/useEnrichedRangePickerField.js +0 -236
- package/hooks/useMultiInputRangeField/useMultiInputRangeFieldTextFieldProps.d.ts +0 -17
- package/hooks/useMultiInputRangeField/useMultiInputRangeFieldTextFieldProps.js +0 -66
- package/internals/hooks/useEnrichedRangePickerField.d.ts +0 -70
- package/internals/hooks/useEnrichedRangePickerField.js +0 -245
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeFieldTextFieldProps.d.ts +0 -17
- package/modern/hooks/useMultiInputRangeField/useMultiInputRangeFieldTextFieldProps.js +0 -59
- package/modern/internals/hooks/useEnrichedRangePickerField.d.ts +0 -70
- package/modern/internals/hooks/useEnrichedRangePickerField.js +0 -236
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,305 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.0.0-alpha.13
|
|
9
|
+
|
|
10
|
+
_Feb 28, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Decouple `margin` and `axis-size`. A new API to support multiple axes (#16418) @JCQuintas
|
|
15
|
+
- 🗺️ Added Bangla (bn-BD) locale
|
|
16
|
+
- 🗺️ Improve Russian (ru-RU) and Hungarian (hu-HU) locale on the Data Grid
|
|
17
|
+
|
|
18
|
+
Special thanks go out to the community members for their contributions:
|
|
19
|
+
@denpiligrim, @lhilgert9, @noherczeg, @officialkidmax, @pcorpet.
|
|
20
|
+
Following are all team members who have contributed to this release:
|
|
21
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @MBilalShafi, @oliviertassinari, @romgrk.
|
|
22
|
+
|
|
23
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### Breaking changes
|
|
28
|
+
|
|
29
|
+
- The `slots.baseFormControl` component was removed.
|
|
30
|
+
|
|
31
|
+
- The "Reset" button in the column visibility panel now resets to the initial column visibility model. Previously it was reset to the model that was active at the time the panel was opened. The reset behavior follows these rules:
|
|
32
|
+
|
|
33
|
+
1. If an initial `columnVisibilityModel` is provided, it resets to that model.
|
|
34
|
+
2. If a controlled `columnVisibilityModel` is provided, it resets to the first model value.
|
|
35
|
+
3. When the columns are updated (via the `columns` prop or `updateColumns()` API method), the reset reference point updates to the current `columnVisibilityModel`.
|
|
36
|
+
|
|
37
|
+
To revert to the previous behavior, provide a custom component to the `slots.columnsManagement`.
|
|
38
|
+
|
|
39
|
+
- The deprecated `LicenseInfo` export has been removed from the `@mui/x-data-grid-pro` and `@mui/x-data-grid-premium` packages.
|
|
40
|
+
You have to import it from `@mui/x-license` instead:
|
|
41
|
+
|
|
42
|
+
```diff
|
|
43
|
+
- import { LicenseInfo } from '@mui/x-data-grid-pro';
|
|
44
|
+
- import { LicenseInfo } from '@mui/x-data-grid-premium';
|
|
45
|
+
+ import { LicenseInfo } from '@mui/x-license';
|
|
46
|
+
|
|
47
|
+
LicenseInfo.setLicenseKey('YOUR_LICENSE_KEY');
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- The row selection model has been changed from `GridRowId[]` to `{ type: 'include' | 'exclude'; ids: Set<GridRowId> }`.
|
|
51
|
+
Using `Set` allows for a more efficient row selection management.
|
|
52
|
+
The `exclude` selection type allows to select all rows except the ones in the `ids` set.
|
|
53
|
+
|
|
54
|
+
This change impacts the following props:
|
|
55
|
+
|
|
56
|
+
- `rowSelectionModel`
|
|
57
|
+
- `onRowSelectionModelChange`
|
|
58
|
+
- `initialState.rowSelectionModel`
|
|
59
|
+
|
|
60
|
+
```diff
|
|
61
|
+
- const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>([]);
|
|
62
|
+
+ const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>({ type: 'include', ids: new Set() });
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
This change also impacts the `gridRowSelectionStateSelector` selector.
|
|
66
|
+
For convenience, use the `gridRowSelectionManagerSelector` selector to handle both selection types:
|
|
67
|
+
|
|
68
|
+
```diff
|
|
69
|
+
- const rowSelection = gridRowSelectionStateSelector(apiRef);
|
|
70
|
+
- const isRowSelected = rowSelection.includes(rowId);
|
|
71
|
+
+ const rowSelectionManager = gridRowSelectionManagerSelector(apiRef);
|
|
72
|
+
+ const isRowSelected = rowSelectionManager.has(rowId);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
There is also a `createRowSelectionManager` utility function that can be used to manage the row selection:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
const rowSelectionManager = createRowSelectionManager({
|
|
79
|
+
type: 'include',
|
|
80
|
+
ids: new Set(),
|
|
81
|
+
});
|
|
82
|
+
rowSelectionManager.select(rowId);
|
|
83
|
+
rowSelectionManager.unselect(rowId);
|
|
84
|
+
rowSelectionManager.has(rowId);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- The `selectedIdsLookupSelector` selector has been removed. Use the `gridRowSelectionManagerSelector` or `gridRowSelectionStateSelector` selectors instead.
|
|
88
|
+
- The `selectedGridRowsSelector` has been renamed to `gridRowSelectionIdsSelector`.
|
|
89
|
+
- The `selectedGridRowsCountSelector` has been renamed to `gridRowSelectionCountSelector`.
|
|
90
|
+
|
|
91
|
+
- The data source feature and its related props are now stable.
|
|
92
|
+
|
|
93
|
+
```diff
|
|
94
|
+
<DataGridPro
|
|
95
|
+
- unstable_dataSource={dataSource}
|
|
96
|
+
- unstable_dataSourceCache={cache}
|
|
97
|
+
- unstable_lazyLoading
|
|
98
|
+
- unstable_lazyLoadingRequestThrottleMs={100}
|
|
99
|
+
+ dataSource={dataSource}
|
|
100
|
+
+ dataSourceCache={cache}
|
|
101
|
+
+ lazyLoading
|
|
102
|
+
+ lazyLoadingRequestThrottleMs={100}
|
|
103
|
+
/>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- The data source API is now stable.
|
|
107
|
+
|
|
108
|
+
```diff
|
|
109
|
+
- apiRef.current.unstable_dataSource.getRows()
|
|
110
|
+
+ apiRef.current.dataSource.getRows()
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- The signature of `unstable_onDataSourceError()` has been updated to support future use-cases.
|
|
114
|
+
|
|
115
|
+
```diff
|
|
116
|
+
<DataGrid
|
|
117
|
+
- unstable_onDataSourceError={(error: Error, params: GridGetRowsParams) => {
|
|
118
|
+
- if (params.filterModel) {
|
|
119
|
+
- // do something
|
|
120
|
+
- }
|
|
121
|
+
- }}
|
|
122
|
+
+ unstable_onDataSourceError={(error: GridGetRowsError | GridUpdateRowError) => {
|
|
123
|
+
+ if (error instanceof GridGetRowsError && error.params.filterModel) {
|
|
124
|
+
+ // do something
|
|
125
|
+
+ }
|
|
126
|
+
+ }}
|
|
127
|
+
/>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
- Fix the type of the `GridSortModel` to allow readonly arrays.
|
|
131
|
+
|
|
132
|
+
- `GridSortItem` interface is not exported anymore.
|
|
133
|
+
|
|
134
|
+
- The `showToolbar` prop is now required to display the toolbar.
|
|
135
|
+
|
|
136
|
+
It is no longer necessary to pass `GridToolbar` as a slot to display the default toolbar.
|
|
137
|
+
|
|
138
|
+
```diff
|
|
139
|
+
<DataGrid
|
|
140
|
+
+ showToolbar
|
|
141
|
+
- slots={{
|
|
142
|
+
- toolbar: GridToolbar,
|
|
143
|
+
- }}
|
|
144
|
+
/>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
#### `@mui/x-data-grid@8.0.0-alpha.13`
|
|
148
|
+
|
|
149
|
+
- [DataGrid] Add `showToolbar` prop to enable default toolbar (#16687) @KenanYusuf
|
|
150
|
+
- [DataGrid] Column Visibility: Update "Reset" button behavior (#16626) @MBilalShafi
|
|
151
|
+
- [DataGrid] Column management design updates (#16630) @KenanYusuf
|
|
152
|
+
- [DataGrid] Fix `showColumnVerticalBorder` prop (#16715) @KenanYusuf
|
|
153
|
+
- [DataGrid] Fix scrollbar overlapping cells on mount (#16639) @KenanYusuf
|
|
154
|
+
- [DataGrid] Fix: base `Select` menuprops `onClose()` (#16643) @romgrk
|
|
155
|
+
- [DataGrid] Make `GridSortItem` internal (#16732) @arminmeh
|
|
156
|
+
- [DataGrid] Make data source stable (#16710) @MBilalShafi
|
|
157
|
+
- [DataGrid] Reshape row selection model (#15651) @cherniavskii
|
|
158
|
+
- [DataGrid] Replace `sx` prop usage with `styled()` components (#16665) @KenanYusuf
|
|
159
|
+
- [DataGrid] Refactor: create base `Autocomplete` (#16390) @romgrk
|
|
160
|
+
- [DataGrid] Refactor: remove base form control (#16634) @romgrk
|
|
161
|
+
- [DataGrid] Refactor: remove base input label & adornment (#16646) @romgrk
|
|
162
|
+
- [DataGrid] Refactor: remove material containers (#16633) @romgrk
|
|
163
|
+
- [DataGrid] Refactor: theme to CSS variables (#16588) @romgrk
|
|
164
|
+
- [DataGrid] Update the signature of the `onDataSourceError()` callback (#16718) @MBilalShafi
|
|
165
|
+
- [DataGrid] Use readonly array for the `GridSortModel` (#16627) @pcorpet
|
|
166
|
+
- [DataGrid] Fix the popper focus trap (#16736) @romgrk
|
|
167
|
+
- [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
|
|
168
|
+
- [l10n] Improve Hungarian (hu-HU) locale (#16578) @noherczeg
|
|
169
|
+
- [l10n] Improve Russian (ru-RU) locale (#16591) @denpiligrim
|
|
170
|
+
|
|
171
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
172
|
+
|
|
173
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.13`, plus:
|
|
174
|
+
|
|
175
|
+
- [DataGridPro] Remove `LicenseInfo` reexports (#16671) @cherniavskii
|
|
176
|
+
|
|
177
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.13` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
178
|
+
|
|
179
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.13`, plus:
|
|
180
|
+
|
|
181
|
+
- [DataGridPremium] Use `valueGetter` to get row group keys (#16016) @cherniavskii
|
|
182
|
+
|
|
183
|
+
### Date and Time Pickers
|
|
184
|
+
|
|
185
|
+
#### Breaking changes
|
|
186
|
+
|
|
187
|
+
- The `<DateRangePicker />` now uses a `dialog` instead of a `tooltip` to render their view when used with a single input range field.
|
|
188
|
+
|
|
189
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.13`
|
|
190
|
+
|
|
191
|
+
- [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
|
|
192
|
+
- [pickers] Clean the typing of the slots on the range pickers (#16670) @flaviendelangle
|
|
193
|
+
- [pickers] Fix Time Clock meridiem button selected styles (#16681) @LukasTy
|
|
194
|
+
- [pickers] Make the single input field the default field on range pickers (#16656) @flaviendelangle
|
|
195
|
+
- [pickers] Move the opening logic to the range fields (#16175) @flaviendelangle
|
|
196
|
+
|
|
197
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
198
|
+
|
|
199
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.13`.
|
|
200
|
+
|
|
201
|
+
### Charts
|
|
202
|
+
|
|
203
|
+
#### Breaking changes
|
|
204
|
+
|
|
205
|
+
- Charts array inputs are now `readonly`. Allowing externally defined `as const` to be used as a prop value of the React component.
|
|
206
|
+
|
|
207
|
+
```tsx
|
|
208
|
+
const xAxis = [{ position: 'bottom' }] as const
|
|
209
|
+
<BarChart xAxis={xAxis} />
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
- Replace `topAxis`, `rightAxis`, `bottomAxis` and `leftAxis` props by the `position` property in the axis config.
|
|
213
|
+
If you were using them to place axis, set the `position` property to the corresponding value `'top' | 'right' | 'bottom' | 'left'`.
|
|
214
|
+
If you were disabling an axis by setting it to `null`, set its `position` to `'none'`.
|
|
215
|
+
|
|
216
|
+
```diff
|
|
217
|
+
<LineChart
|
|
218
|
+
yAxis={[
|
|
219
|
+
{
|
|
220
|
+
scaleType: 'linear',
|
|
221
|
+
+ position: 'right',
|
|
222
|
+
},
|
|
223
|
+
]}
|
|
224
|
+
series={[{ data: [1, 10, 30, 50, 70, 90, 100], label: 'linear' }]}
|
|
225
|
+
height={400}
|
|
226
|
+
- rightAxis={{}}
|
|
227
|
+
/>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
- Remove `position` prop from `ChartsXAxis` and `ChartsYAxis`.
|
|
231
|
+
The `position` prop has been removed from the `ChartsXAxis` and `ChartsYAxis` components. Configure it directly in the axis config.
|
|
232
|
+
|
|
233
|
+
```diff
|
|
234
|
+
<ChartContainer
|
|
235
|
+
yAxis={[
|
|
236
|
+
{
|
|
237
|
+
id: 'my-axis',
|
|
238
|
+
+ position: 'right',
|
|
239
|
+
},
|
|
240
|
+
]}
|
|
241
|
+
>
|
|
242
|
+
- <ChartsYAxis axisId="my-axis" position="right" />
|
|
243
|
+
+ <ChartsYAxis axisId="my-axis" />
|
|
244
|
+
</ChartContainer>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
- Add `minTickLabelGap` to x-axis, which allows users to define the minimum gap, in pixels, between two tick labels. The default value is 4px. Make sure to check your charts as the spacing between tick labels might have changed.
|
|
248
|
+
|
|
249
|
+
#### `@mui/x-charts@8.0.0-alpha.13`
|
|
250
|
+
|
|
251
|
+
- [charts] Accept component in `labelMarkType` (#16739) @bernardobelchior
|
|
252
|
+
- [charts] Add `minTickLabelGap` to x-axis (#16548) @bernardobelchior
|
|
253
|
+
- [charts] Add unit test for pie chart with empty series (#16663) @bernardobelchior
|
|
254
|
+
- [charts] Decouple `margin` and `axis-size` (#16418) @JCQuintas
|
|
255
|
+
- [charts] Display slider tooltip on demos (#16723) @JCQuintas
|
|
256
|
+
- [charts] Fix composition docs link (#16761) @bernardobelchior
|
|
257
|
+
- [charts] Fix default label measurement being off (#16635) @bernardobelchior
|
|
258
|
+
- [charts] Fix is highlighted memoization (#16592) @alexfauquette
|
|
259
|
+
- [charts] Fix missing `theme.shape` error in the tooltip (#16748) @alexfauquette
|
|
260
|
+
- [charts] Fix typo in error message (#16641) @JCQuintas
|
|
261
|
+
- [charts] Improve axis size docs (#16673) @JCQuintas
|
|
262
|
+
- [charts] Improve performance of rendering ticks in x-axis (#16536) @bernardobelchior
|
|
263
|
+
- [charts] Make `defaultizeAxis` function type-safe (#16642) @JCQuintas
|
|
264
|
+
- [charts] Make `series.data` readonly (#16645) @JCQuintas
|
|
265
|
+
- [charts] Migrate `ChartsUsageDemo` to TSX and removed NoSnap (#16686) @JCQuintas
|
|
266
|
+
- [charts] Prevent `position='none'` axes from rendering (#16727) @JCQuintas
|
|
267
|
+
- [charts] Make array inputs readonly (#16632) @JCQuintas
|
|
268
|
+
- [charts] Remove state initialization hack (#16520) @alexfauquette
|
|
269
|
+
- [charts] Remove redundant default axis (#16734) @bernardobelchior
|
|
270
|
+
|
|
271
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
272
|
+
|
|
273
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.13`, plus:
|
|
274
|
+
|
|
275
|
+
- [charts-pro] Add back zoom control (#16550) @alexfauquette
|
|
276
|
+
|
|
277
|
+
### Tree View
|
|
278
|
+
|
|
279
|
+
#### `@mui/x-tree-view@8.0.0-alpha.13`
|
|
280
|
+
|
|
281
|
+
Internal changes.
|
|
282
|
+
|
|
283
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
284
|
+
|
|
285
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.13`.
|
|
286
|
+
|
|
287
|
+
### `@mui/x-codemod@8.0.0-alpha.13`
|
|
288
|
+
|
|
289
|
+
- [codemod] Add a few Data Grid codemods (#16711) @MBilalShafi
|
|
290
|
+
- [codemod] Improve Pickers renaming codemod (#16685) @LukasTy
|
|
291
|
+
|
|
292
|
+
### Docs
|
|
293
|
+
|
|
294
|
+
- [docs] Fix charts with on bar and line pages (#16712) @alexfauquette
|
|
295
|
+
- [docs] Fix migration guide introduction for charts (#16679) @alexfauquette
|
|
296
|
+
- [docs] Fix remaining charts demos on mobile (#16728) @alexfauquette
|
|
297
|
+
- [docs] Fix scroll overflow on mobile (#16675) @oliviertassinari
|
|
298
|
+
- [docs] Improve Pickers migration page (#16682) @LukasTy
|
|
299
|
+
- [docs] Update small Pickers doc inconsistencies (#16724) @LukasTy
|
|
300
|
+
- [code-infra] Charts changes for `vitest` (#16755) @JCQuintas
|
|
301
|
+
- [code-infra] General packages changes for `vitest` (#16757) @JCQuintas
|
|
302
|
+
- [code-infra] Native Node.js ESM (#16603) @Janpot
|
|
303
|
+
- [infra] Update contributor acknowledgment wording (#16751) @michelengelen
|
|
304
|
+
- [test] Revert timeout increase for possibly slow tests (#16651) @LukasTy
|
|
305
|
+
- [x-license] Introduce usage telemetry (#13530) @hasdfa
|
|
306
|
+
|
|
8
307
|
## 8.0.0-alpha.12
|
|
9
308
|
|
|
10
309
|
_Feb 17, 2025_
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseSingleInputFieldProps
|
|
1
|
+
import { BaseSingleInputFieldProps } from '@mui/x-date-pickers/internals';
|
|
2
2
|
import { DesktopDateRangePickerProps, DesktopDateRangePickerSlots, DesktopDateRangePickerSlotProps } from "../DesktopDateRangePicker/index.js";
|
|
3
3
|
import { MobileDateRangePickerProps, MobileDateRangePickerSlots, MobileDateRangePickerSlotProps } from "../MobileDateRangePicker/index.js";
|
|
4
4
|
import { ValidateDateRangeProps } from "../validation/index.js";
|
|
@@ -30,4 +30,4 @@ export interface DateRangePickerProps<TEnableAccessibleFieldDOMStructure extends
|
|
|
30
30
|
/**
|
|
31
31
|
* Props the field can receive when used inside a date range picker (<DateRangePicker />, <DesktopDateRangePicker /> or <MobileDateRangePicker /> component).
|
|
32
32
|
*/
|
|
33
|
-
export type DateRangePickerFieldProps = ValidateDateRangeProps & BaseSingleInputFieldProps
|
|
33
|
+
export type DateRangePickerFieldProps = ValidateDateRangeProps & BaseSingleInputFieldProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseSingleInputFieldProps
|
|
1
|
+
import { BaseSingleInputFieldProps } from '@mui/x-date-pickers/internals';
|
|
2
2
|
import { DesktopDateTimeRangePickerProps, DesktopDateTimeRangePickerSlots, DesktopDateTimeRangePickerSlotProps } from "../DesktopDateTimeRangePicker/index.js";
|
|
3
3
|
import { MobileDateTimeRangePickerProps, MobileDateTimeRangePickerSlots, MobileDateTimeRangePickerSlotProps } from "../MobileDateTimeRangePicker/index.js";
|
|
4
4
|
import type { ValidateDateTimeRangeProps } from '../validation';
|
|
@@ -25,4 +25,4 @@ export interface DateTimeRangePickerProps<TEnableAccessibleFieldDOMStructure ext
|
|
|
25
25
|
/**
|
|
26
26
|
* Props the field can receive when used inside a date time range picker (<DateTimeRangePicker />, <DesktopDateTimeRangePicker /> or <MobileDateTimeRangePicker /> component).
|
|
27
27
|
*/
|
|
28
|
-
export type DateTimeRangePickerFieldProps = ValidateDateTimeRangeProps & BaseSingleInputFieldProps
|
|
28
|
+
export type DateTimeRangePickerFieldProps = ValidateDateTimeRangeProps & BaseSingleInputFieldProps;
|
|
@@ -17,7 +17,7 @@ var _utils = require("@mui/utils");
|
|
|
17
17
|
var _valueManagers = require("../internals/utils/valueManagers");
|
|
18
18
|
var _shared = require("../DateRangePicker/shared");
|
|
19
19
|
var _dateRangeViewRenderers = require("../dateRangeViewRenderers");
|
|
20
|
-
var
|
|
20
|
+
var _SingleInputDateRangeField = require("../SingleInputDateRangeField");
|
|
21
21
|
var _useDesktopRangePicker = require("../internals/hooks/useDesktopRangePicker");
|
|
22
22
|
var _validation2 = require("../validation");
|
|
23
23
|
const emptyActions = [];
|
|
@@ -48,7 +48,7 @@ const DesktopDateRangePicker = exports.DesktopDateRangePicker = /*#__PURE__*/Rea
|
|
|
48
48
|
views: ['day'],
|
|
49
49
|
openTo: 'day',
|
|
50
50
|
slots: (0, _extends2.default)({
|
|
51
|
-
field:
|
|
51
|
+
field: _SingleInputDateRangeField.SingleInputDateRangeField
|
|
52
52
|
}, defaultizedProps.slots),
|
|
53
53
|
slotProps: (0, _extends2.default)({}, defaultizedProps.slotProps, {
|
|
54
54
|
field: ownerState => (0, _extends2.default)({}, (0, _resolveComponentProps.default)(defaultizedProps.slotProps?.field, ownerState), (0, _validation.extractValidationProps)(defaultizedProps)),
|
|
@@ -25,7 +25,7 @@ var _dateRangeViewRenderers = require("../dateRangeViewRenderers");
|
|
|
25
25
|
var _useDesktopRangePicker = require("../internals/hooks/useDesktopRangePicker");
|
|
26
26
|
var _validation2 = require("../validation");
|
|
27
27
|
var _shared = require("../DateTimeRangePicker/shared");
|
|
28
|
-
var
|
|
28
|
+
var _SingleInputDateTimeRangeField = require("../SingleInputDateTimeRangeField");
|
|
29
29
|
var _DateTimeRangePickerTimeWrapper = require("../DateTimeRangePicker/DateTimeRangePickerTimeWrapper");
|
|
30
30
|
var _dimensions = require("../internals/constants/dimensions");
|
|
31
31
|
var _hooks = require("../hooks");
|
|
@@ -114,7 +114,7 @@ const DesktopDateTimeRangePicker = exports.DesktopDateTimeRangePicker = /*#__PUR
|
|
|
114
114
|
ampmInClock: true,
|
|
115
115
|
calendars: defaultizedProps.calendars ?? 1,
|
|
116
116
|
slots: (0, _extends2.default)({
|
|
117
|
-
field:
|
|
117
|
+
field: _SingleInputDateTimeRangeField.SingleInputDateTimeRangeField,
|
|
118
118
|
layout: _DesktopDateTimePicker.DesktopDateTimePickerLayout
|
|
119
119
|
}, defaultizedProps.slots),
|
|
120
120
|
slotProps: (0, _extends2.default)({}, defaultizedProps.slotProps, {
|
|
@@ -17,7 +17,7 @@ var _utils = require("@mui/utils");
|
|
|
17
17
|
var _valueManagers = require("../internals/utils/valueManagers");
|
|
18
18
|
var _shared = require("../DateRangePicker/shared");
|
|
19
19
|
var _dateRangeViewRenderers = require("../dateRangeViewRenderers");
|
|
20
|
-
var
|
|
20
|
+
var _SingleInputDateRangeField = require("../SingleInputDateRangeField");
|
|
21
21
|
var _useMobileRangePicker = require("../internals/hooks/useMobileRangePicker");
|
|
22
22
|
var _validation2 = require("../validation");
|
|
23
23
|
/**
|
|
@@ -48,7 +48,7 @@ const MobileDateRangePicker = exports.MobileDateRangePicker = /*#__PURE__*/React
|
|
|
48
48
|
views: ['day'],
|
|
49
49
|
openTo: 'day',
|
|
50
50
|
slots: (0, _extends2.default)({
|
|
51
|
-
field:
|
|
51
|
+
field: _SingleInputDateRangeField.SingleInputDateRangeField
|
|
52
52
|
}, defaultizedProps.slots),
|
|
53
53
|
slotProps: (0, _extends2.default)({}, defaultizedProps.slotProps, {
|
|
54
54
|
field: ownerState => (0, _extends2.default)({}, (0, _resolveComponentProps.default)(defaultizedProps.slotProps?.field, ownerState), (0, _validation.extractValidationProps)(defaultizedProps)),
|
|
@@ -23,7 +23,7 @@ var _dateRangeViewRenderers = require("../dateRangeViewRenderers");
|
|
|
23
23
|
var _useMobileRangePicker = require("../internals/hooks/useMobileRangePicker");
|
|
24
24
|
var _validation2 = require("../validation");
|
|
25
25
|
var _shared = require("../DateTimeRangePicker/shared");
|
|
26
|
-
var
|
|
26
|
+
var _SingleInputDateTimeRangeField = require("../SingleInputDateTimeRangeField");
|
|
27
27
|
var _DateTimeRangePickerTimeWrapper = require("../DateTimeRangePicker/DateTimeRangePickerTimeWrapper");
|
|
28
28
|
var _dimensions = require("../internals/constants/dimensions");
|
|
29
29
|
var _hooks = require("../hooks");
|
|
@@ -120,7 +120,7 @@ const MobileDateTimeRangePicker = exports.MobileDateTimeRangePicker = /*#__PURE_
|
|
|
120
120
|
// force current calendar position, since we only have one calendar
|
|
121
121
|
currentMonthCalendarPosition: 1,
|
|
122
122
|
slots: (0, _extends2.default)({
|
|
123
|
-
field:
|
|
123
|
+
field: _SingleInputDateTimeRangeField.SingleInputDateTimeRangeField
|
|
124
124
|
}, defaultizedProps.slots),
|
|
125
125
|
slotProps: (0, _extends2.default)({}, defaultizedProps.slotProps, {
|
|
126
126
|
field: ownerState => (0, _extends2.default)({}, (0, _resolveComponentProps.default)(defaultizedProps.slotProps?.field, ownerState), (0, _validation.extractValidationProps)(defaultizedProps)),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseSingleInputDateRangeFieldProps } from "./SingleInputDateRangeField.types.js";
|
|
2
|
-
export declare const useSingleInputDateRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "
|
|
2
|
+
export declare const useSingleInputDateRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "focused" | "enableAccessibleFieldDOMStructure" | "referenceDate" | "timezone" | "formatDensity" | "selectedSections" | "onSelectedSectionsChange" | "shouldRespectLeadingZeros" | "unstableFieldRef" | keyof import("@mui/x-date-pickers/internals").BaseDateValidationProps | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | "unstableStartFieldRef" | "unstableEndFieldRef" | "dateSeparator">>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseSingleInputDateTimeRangeFieldProps } from "./SingleInputDateTimeRangeField.types.js";
|
|
2
|
-
export declare const useSingleInputDateTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "
|
|
2
|
+
export declare const useSingleInputDateTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "focused" | "enableAccessibleFieldDOMStructure" | "referenceDate" | "timezone" | "formatDensity" | "selectedSections" | "onSelectedSectionsChange" | "shouldRespectLeadingZeros" | "unstableFieldRef" | "ampm" | "disableFuture" | "maxDate" | "disablePast" | "minDate" | "minTime" | "maxTime" | "minutesStep" | "shouldDisableTime" | "disableIgnoringDatePartForTimeValidation" | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | "minDateTime" | "maxDateTime" | "unstableStartFieldRef" | "unstableEndFieldRef" | "dateSeparator">>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseSingleInputTimeRangeFieldProps } from "./SingleInputTimeRangeField.types.js";
|
|
2
|
-
export declare const useSingleInputTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "
|
|
2
|
+
export declare const useSingleInputTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "focused" | "enableAccessibleFieldDOMStructure" | "referenceDate" | "timezone" | "formatDensity" | "selectedSections" | "onSelectedSectionsChange" | "shouldRespectLeadingZeros" | "unstableFieldRef" | "ampm" | keyof import("@mui/x-date-pickers/internals").BaseTimeValidationProps | keyof import("@mui/x-date-pickers/internals").TimeValidationProps | "unstableStartFieldRef" | "unstableEndFieldRef" | "dateSeparator">>;
|
|
@@ -9,6 +9,11 @@ export interface DateRangeViewRendererProps<TView extends DateOrTimeViewWithMeri
|
|
|
9
9
|
* because otherwise some unwanted props would be passed to the HTML element.
|
|
10
10
|
*/
|
|
11
11
|
export declare const renderDateRangeViewCalendar: ({
|
|
12
|
+
views,
|
|
13
|
+
view,
|
|
14
|
+
onViewChange,
|
|
15
|
+
focusedView,
|
|
16
|
+
onFocusedViewChange,
|
|
12
17
|
value,
|
|
13
18
|
defaultValue,
|
|
14
19
|
referenceDate,
|
|
@@ -40,8 +45,5 @@ export declare const renderDateRangeViewCalendar: ({
|
|
|
40
45
|
disableDragEditing,
|
|
41
46
|
displayWeekNumber,
|
|
42
47
|
timezone,
|
|
43
|
-
availableRangePositions
|
|
44
|
-
views,
|
|
45
|
-
view,
|
|
46
|
-
onViewChange
|
|
48
|
+
availableRangePositions
|
|
47
49
|
}: DateRangeViewRendererProps<"day">) => React.JSX.Element;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.renderDateRangeViewCalendar = void 0;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _internals = require("@mui/x-date-pickers/internals");
|
|
9
10
|
var _DateRangeCalendar = require("../DateRangeCalendar");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
/**
|
|
@@ -13,6 +14,11 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
13
14
|
* because otherwise some unwanted props would be passed to the HTML element.
|
|
14
15
|
*/
|
|
15
16
|
const renderDateRangeViewCalendar = ({
|
|
17
|
+
views,
|
|
18
|
+
view,
|
|
19
|
+
onViewChange,
|
|
20
|
+
focusedView,
|
|
21
|
+
onFocusedViewChange,
|
|
16
22
|
value,
|
|
17
23
|
defaultValue,
|
|
18
24
|
referenceDate,
|
|
@@ -44,11 +50,13 @@ const renderDateRangeViewCalendar = ({
|
|
|
44
50
|
disableDragEditing,
|
|
45
51
|
displayWeekNumber,
|
|
46
52
|
timezone,
|
|
47
|
-
availableRangePositions
|
|
48
|
-
views,
|
|
49
|
-
view,
|
|
50
|
-
onViewChange
|
|
53
|
+
availableRangePositions
|
|
51
54
|
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_DateRangeCalendar.DateRangeCalendar, {
|
|
55
|
+
view: view,
|
|
56
|
+
views: views,
|
|
57
|
+
onViewChange: onViewChange,
|
|
58
|
+
focusedView: focusedView && (0, _internals.isDatePickerView)(focusedView) ? focusedView : null,
|
|
59
|
+
onFocusedViewChange: onFocusedViewChange,
|
|
52
60
|
value: value,
|
|
53
61
|
defaultValue: defaultValue,
|
|
54
62
|
referenceDate: referenceDate,
|
|
@@ -80,9 +88,6 @@ const renderDateRangeViewCalendar = ({
|
|
|
80
88
|
disableDragEditing: disableDragEditing,
|
|
81
89
|
displayWeekNumber: displayWeekNumber,
|
|
82
90
|
timezone: timezone,
|
|
83
|
-
availableRangePositions: availableRangePositions
|
|
84
|
-
view: view,
|
|
85
|
-
views: views,
|
|
86
|
-
onViewChange: onViewChange
|
|
91
|
+
availableRangePositions: availableRangePositions
|
|
87
92
|
});
|
|
88
93
|
exports.renderDateRangeViewCalendar = renderDateRangeViewCalendar;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseSingleInputFieldProps
|
|
1
|
+
import { BaseSingleInputFieldProps } from '@mui/x-date-pickers/internals';
|
|
2
2
|
import { DesktopDateRangePickerProps, DesktopDateRangePickerSlots, DesktopDateRangePickerSlotProps } from "../DesktopDateRangePicker/index.js";
|
|
3
3
|
import { MobileDateRangePickerProps, MobileDateRangePickerSlots, MobileDateRangePickerSlotProps } from "../MobileDateRangePicker/index.js";
|
|
4
4
|
import { ValidateDateRangeProps } from "../validation/index.js";
|
|
@@ -30,4 +30,4 @@ export interface DateRangePickerProps<TEnableAccessibleFieldDOMStructure extends
|
|
|
30
30
|
/**
|
|
31
31
|
* Props the field can receive when used inside a date range picker (<DateRangePicker />, <DesktopDateRangePicker /> or <MobileDateRangePicker /> component).
|
|
32
32
|
*/
|
|
33
|
-
export type DateRangePickerFieldProps = ValidateDateRangeProps & BaseSingleInputFieldProps
|
|
33
|
+
export type DateRangePickerFieldProps = ValidateDateRangeProps & BaseSingleInputFieldProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseSingleInputFieldProps
|
|
1
|
+
import { BaseSingleInputFieldProps } from '@mui/x-date-pickers/internals';
|
|
2
2
|
import { DesktopDateTimeRangePickerProps, DesktopDateTimeRangePickerSlots, DesktopDateTimeRangePickerSlotProps } from "../DesktopDateTimeRangePicker/index.js";
|
|
3
3
|
import { MobileDateTimeRangePickerProps, MobileDateTimeRangePickerSlots, MobileDateTimeRangePickerSlotProps } from "../MobileDateTimeRangePicker/index.js";
|
|
4
4
|
import type { ValidateDateTimeRangeProps } from '../validation';
|
|
@@ -25,4 +25,4 @@ export interface DateTimeRangePickerProps<TEnableAccessibleFieldDOMStructure ext
|
|
|
25
25
|
/**
|
|
26
26
|
* Props the field can receive when used inside a date time range picker (<DateTimeRangePicker />, <DesktopDateTimeRangePicker /> or <MobileDateTimeRangePicker /> component).
|
|
27
27
|
*/
|
|
28
|
-
export type DateTimeRangePickerFieldProps = ValidateDateTimeRangeProps & BaseSingleInputFieldProps
|
|
28
|
+
export type DateTimeRangePickerFieldProps = ValidateDateTimeRangeProps & BaseSingleInputFieldProps;
|
|
@@ -10,7 +10,7 @@ import { refType } from '@mui/utils';
|
|
|
10
10
|
import { rangeValueManager } from "../internals/utils/valueManagers.js";
|
|
11
11
|
import { useDateRangePickerDefaultizedProps } from "../DateRangePicker/shared.js";
|
|
12
12
|
import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
|
|
13
|
-
import {
|
|
13
|
+
import { SingleInputDateRangeField } from "../SingleInputDateRangeField/index.js";
|
|
14
14
|
import { useDesktopRangePicker } from "../internals/hooks/useDesktopRangePicker/index.js";
|
|
15
15
|
import { validateDateRange } from "../validation/index.js";
|
|
16
16
|
const emptyActions = [];
|
|
@@ -41,7 +41,7 @@ const DesktopDateRangePicker = /*#__PURE__*/React.forwardRef(function DesktopDat
|
|
|
41
41
|
views: ['day'],
|
|
42
42
|
openTo: 'day',
|
|
43
43
|
slots: _extends({
|
|
44
|
-
field:
|
|
44
|
+
field: SingleInputDateRangeField
|
|
45
45
|
}, defaultizedProps.slots),
|
|
46
46
|
slotProps: _extends({}, defaultizedProps.slotProps, {
|
|
47
47
|
field: ownerState => _extends({}, resolveComponentProps(defaultizedProps.slotProps?.field, ownerState), extractValidationProps(defaultizedProps)),
|
|
@@ -19,7 +19,7 @@ import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js"
|
|
|
19
19
|
import { useDesktopRangePicker } from "../internals/hooks/useDesktopRangePicker/index.js";
|
|
20
20
|
import { validateDateTimeRange } from "../validation/index.js";
|
|
21
21
|
import { useDateTimeRangePickerDefaultizedProps } from "../DateTimeRangePicker/shared.js";
|
|
22
|
-
import {
|
|
22
|
+
import { SingleInputDateTimeRangeField } from "../SingleInputDateTimeRangeField/index.js";
|
|
23
23
|
import { DateTimeRangePickerTimeWrapper } from "../DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js";
|
|
24
24
|
import { RANGE_VIEW_HEIGHT } from "../internals/constants/dimensions.js";
|
|
25
25
|
import { usePickerRangePositionContext } from "../hooks/index.js";
|
|
@@ -107,7 +107,7 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
|
|
|
107
107
|
ampmInClock: true,
|
|
108
108
|
calendars: defaultizedProps.calendars ?? 1,
|
|
109
109
|
slots: _extends({
|
|
110
|
-
field:
|
|
110
|
+
field: SingleInputDateTimeRangeField,
|
|
111
111
|
layout: DesktopDateTimePickerLayout
|
|
112
112
|
}, defaultizedProps.slots),
|
|
113
113
|
slotProps: _extends({}, defaultizedProps.slotProps, {
|
|
@@ -10,7 +10,7 @@ import { refType } from '@mui/utils';
|
|
|
10
10
|
import { rangeValueManager } from "../internals/utils/valueManagers.js";
|
|
11
11
|
import { useDateRangePickerDefaultizedProps } from "../DateRangePicker/shared.js";
|
|
12
12
|
import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
|
|
13
|
-
import {
|
|
13
|
+
import { SingleInputDateRangeField } from "../SingleInputDateRangeField/index.js";
|
|
14
14
|
import { useMobileRangePicker } from "../internals/hooks/useMobileRangePicker/index.js";
|
|
15
15
|
import { validateDateRange } from "../validation/index.js";
|
|
16
16
|
/**
|
|
@@ -41,7 +41,7 @@ const MobileDateRangePicker = /*#__PURE__*/React.forwardRef(function MobileDateR
|
|
|
41
41
|
views: ['day'],
|
|
42
42
|
openTo: 'day',
|
|
43
43
|
slots: _extends({
|
|
44
|
-
field:
|
|
44
|
+
field: SingleInputDateRangeField
|
|
45
45
|
}, defaultizedProps.slots),
|
|
46
46
|
slotProps: _extends({}, defaultizedProps.slotProps, {
|
|
47
47
|
field: ownerState => _extends({}, resolveComponentProps(defaultizedProps.slotProps?.field, ownerState), extractValidationProps(defaultizedProps)),
|
|
@@ -17,7 +17,7 @@ import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js"
|
|
|
17
17
|
import { useMobileRangePicker } from "../internals/hooks/useMobileRangePicker/index.js";
|
|
18
18
|
import { validateDateTimeRange } from "../validation/index.js";
|
|
19
19
|
import { useDateTimeRangePickerDefaultizedProps } from "../DateTimeRangePicker/shared.js";
|
|
20
|
-
import {
|
|
20
|
+
import { SingleInputDateTimeRangeField } from "../SingleInputDateTimeRangeField/index.js";
|
|
21
21
|
import { DateTimeRangePickerTimeWrapper } from "../DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js";
|
|
22
22
|
import { RANGE_VIEW_HEIGHT } from "../internals/constants/dimensions.js";
|
|
23
23
|
import { usePickerRangePositionContext } from "../hooks/index.js";
|
|
@@ -113,7 +113,7 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
|
|
|
113
113
|
// force current calendar position, since we only have one calendar
|
|
114
114
|
currentMonthCalendarPosition: 1,
|
|
115
115
|
slots: _extends({
|
|
116
|
-
field:
|
|
116
|
+
field: SingleInputDateTimeRangeField
|
|
117
117
|
}, defaultizedProps.slots),
|
|
118
118
|
slotProps: _extends({}, defaultizedProps.slotProps, {
|
|
119
119
|
field: ownerState => _extends({}, resolveComponentProps(defaultizedProps.slotProps?.field, ownerState), extractValidationProps(defaultizedProps)),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseSingleInputDateRangeFieldProps } from "./SingleInputDateRangeField.types.js";
|
|
2
|
-
export declare const useSingleInputDateRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "
|
|
2
|
+
export declare const useSingleInputDateRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "focused" | "enableAccessibleFieldDOMStructure" | "referenceDate" | "timezone" | "formatDensity" | "selectedSections" | "onSelectedSectionsChange" | "shouldRespectLeadingZeros" | "unstableFieldRef" | keyof import("@mui/x-date-pickers/internals").BaseDateValidationProps | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | "unstableStartFieldRef" | "unstableEndFieldRef" | "dateSeparator">>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseSingleInputDateTimeRangeFieldProps } from "./SingleInputDateTimeRangeField.types.js";
|
|
2
|
-
export declare const useSingleInputDateTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "
|
|
2
|
+
export declare const useSingleInputDateTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "focused" | "enableAccessibleFieldDOMStructure" | "referenceDate" | "timezone" | "formatDensity" | "selectedSections" | "onSelectedSectionsChange" | "shouldRespectLeadingZeros" | "unstableFieldRef" | "ampm" | "disableFuture" | "maxDate" | "disablePast" | "minDate" | "minTime" | "maxTime" | "minutesStep" | "shouldDisableTime" | "disableIgnoringDatePartForTimeValidation" | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | "minDateTime" | "maxDateTime" | "unstableStartFieldRef" | "unstableEndFieldRef" | "dateSeparator">>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseSingleInputTimeRangeFieldProps } from "./SingleInputTimeRangeField.types.js";
|
|
2
|
-
export declare const useSingleInputTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "
|
|
2
|
+
export declare const useSingleInputTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps, "disabled" | "readOnly" | "value" | "defaultValue" | "autoFocus" | "onChange" | "onError" | "format" | "focused" | "enableAccessibleFieldDOMStructure" | "referenceDate" | "timezone" | "formatDensity" | "selectedSections" | "onSelectedSectionsChange" | "shouldRespectLeadingZeros" | "unstableFieldRef" | "ampm" | keyof import("@mui/x-date-pickers/internals").BaseTimeValidationProps | keyof import("@mui/x-date-pickers/internals").TimeValidationProps | "unstableStartFieldRef" | "unstableEndFieldRef" | "dateSeparator">>;
|