@mui/x-date-pickers-pro 8.0.0-alpha.3 → 8.0.0-alpha.5
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 +377 -0
- package/DateRangePicker/DateRangePickerToolbar.js +7 -9
- package/DateTimeRangePicker/DateTimeRangePickerToolbar.d.ts +1 -2
- package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +32 -57
- package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +1 -2
- package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +1 -2
- package/README.md +1 -1
- package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +1 -1
- package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +1 -1
- package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +1 -1
- package/index.js +1 -1
- package/internals/hooks/models/useRangePicker.d.ts +2 -2
- package/internals/utils/releaseInfo.js +1 -1
- package/modern/DateRangePicker/DateRangePickerToolbar.js +7 -9
- package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +32 -57
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +1 -2
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +1 -2
- package/modern/index.js +1 -1
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/node/DateRangePicker/DateRangePickerToolbar.js +6 -8
- package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +31 -56
- package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +1 -2
- package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +1 -2
- package/node/index.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,236 @@
|
|
|
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.5
|
|
9
|
+
|
|
10
|
+
_Dec 19, 2024_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🌍 Improve Korean (ko-KR) locale on the Data Grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
18
|
+
@good-jinu, @k-rajat19.
|
|
19
|
+
Following are all team members who have contributed to this release:
|
|
20
|
+
@alexfauquette, @cherniavskii, @flaviendelangle, @KenanYusuf, @LukasTy, @MBilalShafi, @romgrk.
|
|
21
|
+
|
|
22
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
23
|
+
|
|
24
|
+
### Data Grid
|
|
25
|
+
|
|
26
|
+
#### Breaking changes
|
|
27
|
+
|
|
28
|
+
- Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`.
|
|
29
|
+
|
|
30
|
+
- For `.root` element, use `slotProps.root`.
|
|
31
|
+
- For `.main` element (the one with `role="grid"`), use `slotProps.main`.
|
|
32
|
+
|
|
33
|
+
- `detailPanelExpandedRowIds` and `onDetailPanelExpandedRowIdsChange` props use a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array:
|
|
34
|
+
|
|
35
|
+
```diff
|
|
36
|
+
-detailPanelExpandedRowIds?: GridRowId[];
|
|
37
|
+
+detailPanelExpandedRowIds?: Set<GridRowId>;
|
|
38
|
+
|
|
39
|
+
-onDetailPanelExpandedRowIdsChange?: (ids: GridRowId[], details: GridCallbackDetails) => void;
|
|
40
|
+
+onDetailPanelExpandedRowIdsChange?: (ids: Set<GridRowId>, details: GridCallbackDetails) => void;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- `apiRef.current.getExpandedDetailPanels` and `apiRef.current.setExpandedDetailPanels` methods receive and return a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array.
|
|
44
|
+
- `gridDetailPanelExpandedRowIdsSelector` returns a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array.
|
|
45
|
+
- `gridDetailPanelExpandedRowsHeightCacheSelector` was removed.
|
|
46
|
+
|
|
47
|
+
#### `@mui/x-data-grid@8.0.0-alpha.5`
|
|
48
|
+
|
|
49
|
+
- [DataGrid] Consider `columnGroupHeaderHeight` prop in `getTotalHeaderHeight` method (#15915) @k-rajat19
|
|
50
|
+
- [DataGrid] Fix autosizing with virtualized columns (#15116) @k-rajat19
|
|
51
|
+
- [DataGrid] Move `<Badge />` to leaf import (#15879) @romgrk
|
|
52
|
+
- [DataGrid] Move `<ListItemText />` and `<ListItemIcon />` to leaf import (#15869) @romgrk
|
|
53
|
+
- [DataGrid] Remove the Joy UI demo (#15913) @romgrk
|
|
54
|
+
- [DataGrid] Update quick filter input variant (#15909) @KenanYusuf
|
|
55
|
+
- [DataGrid] Use `slotProps` to forward props to `.main` and `.root` elements (#15870) @MBilalShafi
|
|
56
|
+
- [l10n] Improve Korean(ko-KR) locale (#15878) @good-jinu
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
59
|
+
|
|
60
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.5`, plus:
|
|
61
|
+
|
|
62
|
+
- [DataGridPro] Use `Set` for `detailPanelExpandedRowIds` (#15835) @cherniavskii
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.5`.
|
|
67
|
+
|
|
68
|
+
### Date and Time Pickers
|
|
69
|
+
|
|
70
|
+
#### Breaking changes
|
|
71
|
+
|
|
72
|
+
- The `<PickersMonth />` component has been moved inside the Month Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#month-calendar).
|
|
73
|
+
|
|
74
|
+
- The `<PickersYear />` component has been moved inside the Year Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#year-calendar).
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.5`
|
|
77
|
+
|
|
78
|
+
- [pickers] Add verification to disable skipped hours in spring forward DST (#15849) @flaviendelangle
|
|
79
|
+
- [pickers] Remove `PickersMonth` and `PickersYear` from the theme and remove the `div` wrapping each button (#15806) @flaviendelangle
|
|
80
|
+
- [pickers] Use the new `ownerState` object on the `<PickersTextField />` component (#15863) @flaviendelangle
|
|
81
|
+
|
|
82
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
83
|
+
|
|
84
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.5`.
|
|
85
|
+
|
|
86
|
+
### Charts
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-charts@8.0.0-alpha.5`
|
|
89
|
+
|
|
90
|
+
- [charts] Fix `<ScatterChart />` value type if `null` (#15917) @alexfauquette
|
|
91
|
+
|
|
92
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
93
|
+
|
|
94
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.5`.
|
|
95
|
+
|
|
96
|
+
### Tree View
|
|
97
|
+
|
|
98
|
+
#### `@mui/x-tree-view@8.0.0-alpha.5`
|
|
99
|
+
|
|
100
|
+
No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.4`.
|
|
101
|
+
|
|
102
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
103
|
+
|
|
104
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.5`.
|
|
105
|
+
|
|
106
|
+
### Core
|
|
107
|
+
|
|
108
|
+
- [code-infra] Remove `@mui/material-nextjs` dependency (#15925) @LukasTy
|
|
109
|
+
|
|
110
|
+
## 8.0.0-alpha.4
|
|
111
|
+
|
|
112
|
+
_Dec 13, 2024_
|
|
113
|
+
|
|
114
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
115
|
+
|
|
116
|
+
- 🌍 Improve Romanian locale on the Data Grid and Pickers
|
|
117
|
+
- 📚 Documentation improvements
|
|
118
|
+
- 🐞 Bugfixes
|
|
119
|
+
|
|
120
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
121
|
+
@k-rajat19, @nusr, @rares985, @zivl.
|
|
122
|
+
Following are all team members who have contributed to this release:
|
|
123
|
+
@alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi.
|
|
124
|
+
|
|
125
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
126
|
+
|
|
127
|
+
### Data Grid
|
|
128
|
+
|
|
129
|
+
#### Breaking changes
|
|
130
|
+
|
|
131
|
+
- The selectors signature has been updated due to the support of arguments in the selectors. Pass `undefined` as `arguments` if the selector doesn't use any arguments.
|
|
132
|
+
|
|
133
|
+
```diff
|
|
134
|
+
-mySelector(state, instanceId)
|
|
135
|
+
+mySelector(state, arguments, instanceId)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
- The `useGridSelector` signature has been updated due to the introduction of arguments parameter in the selectors. Pass `undefined` as `arguments` if the selector doesn't use any arguments.
|
|
139
|
+
|
|
140
|
+
```diff
|
|
141
|
+
-const output = useGridSelector(apiRef, selector, equals)
|
|
142
|
+
+const output = useGridSelector(apiRef, selector, arguments, equals)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
- The default variant for text fields and selects in the filter panel has been changed to `outlined`.
|
|
146
|
+
- The "row spanning" feature is now stable.
|
|
147
|
+
```diff
|
|
148
|
+
<DataGrid
|
|
149
|
+
- unstable_rowSpanning
|
|
150
|
+
+ rowSpanning
|
|
151
|
+
/>
|
|
152
|
+
```
|
|
153
|
+
- Selected row is now deselected when clicked again.
|
|
154
|
+
|
|
155
|
+
#### `@mui/x-data-grid@8.0.0-alpha.4`
|
|
156
|
+
|
|
157
|
+
- [DataGrid] Deselect selected row on click (#15509) @k-rajat19
|
|
158
|
+
- [DataGrid] Fix "No rows" displaying when all rows are pinned (#15335) @nusr
|
|
159
|
+
- [DataGrid] Make row spanning feature stable (#15742) @MBilalShafi
|
|
160
|
+
- [DataGrid] Round dimensions to avoid subpixel rendering error (#15850) @KenanYusuf
|
|
161
|
+
- [DataGrid] Toggle menu on click in `<GridActionsCell />` (#15867) @k-rajat19
|
|
162
|
+
- [DataGrid] Trigger row spanning computation on rows update (#15858) @MBilalShafi
|
|
163
|
+
- [DataGrid] Update filter panel input variant (#15807) @KenanYusuf
|
|
164
|
+
- [DataGrid] Use `columnsManagement` slot (#15817) @k-rajat19
|
|
165
|
+
- [DataGrid] Use new selector signature (#15200) @MBilalShafi
|
|
166
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15745) @rares985
|
|
167
|
+
|
|
168
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
169
|
+
|
|
170
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.4`, plus:
|
|
171
|
+
|
|
172
|
+
- [DataGridPro] Make row reordering work with pagination (#15355) @k-rajat19
|
|
173
|
+
|
|
174
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
175
|
+
|
|
176
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.4`, plus:
|
|
177
|
+
|
|
178
|
+
- [DataGridPremium] Fix group column ignoring `valueOptions` for `singleSelect` column type (#15739) @arminmeh
|
|
179
|
+
|
|
180
|
+
### Date and Time Pickers
|
|
181
|
+
|
|
182
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.4`
|
|
183
|
+
|
|
184
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15745) @rares985
|
|
185
|
+
- [pickers] Clean `usePicker` logic (#15763) @flaviendelangle
|
|
186
|
+
- [pickers] Rename layout `ownerState` property from `isRtl` to `layoutDirection` (#15803) @flaviendelangle
|
|
187
|
+
- [pickers] Use the new `ownerState` in `useClearableField` (#15776) @flaviendelangle
|
|
188
|
+
- [pickers] Use the new `ownerState` in the toolbar components (#15777) @flaviendelangle
|
|
189
|
+
- [pickers] Use the new `ownerState` object for the clock components and the desktop / mobile wrappers (#15669) @flaviendelangle
|
|
190
|
+
|
|
191
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
192
|
+
|
|
193
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.4`.
|
|
194
|
+
|
|
195
|
+
### Charts
|
|
196
|
+
|
|
197
|
+
#### Breaking changes
|
|
198
|
+
|
|
199
|
+
- The default styling of the charts tooltip has been updated.
|
|
200
|
+
|
|
201
|
+
#### `@mui/x-charts@8.0.0-alpha.4`
|
|
202
|
+
|
|
203
|
+
- [charts] Fix hydration missmatch (#15647) @alexfauquette
|
|
204
|
+
- [charts] Fix internal spelling typo (#15805) @zivl
|
|
205
|
+
- [charts] Fix scatter dataset with missing data (#15802) @alexfauquette
|
|
206
|
+
- [charts] HTML Labels (#15813) @JCQuintas
|
|
207
|
+
- [charts] Only access store values by using hooks (#15764) @alexfauquette
|
|
208
|
+
- [charts] Update Tooltip style (#15630) @alexfauquette
|
|
209
|
+
|
|
210
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
211
|
+
|
|
212
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.4`.
|
|
213
|
+
|
|
214
|
+
### Tree View
|
|
215
|
+
|
|
216
|
+
#### `@mui/x-tree-view@8.0.0-alpha.4`
|
|
217
|
+
|
|
218
|
+
No changes, releasing to keep the versions in sync.
|
|
219
|
+
|
|
220
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
221
|
+
|
|
222
|
+
Releasing to benefit from license package fix (#15814).
|
|
223
|
+
|
|
224
|
+
### Docs
|
|
225
|
+
|
|
226
|
+
- [docs] Clean Joy and Browser custom field demos (#15707) @flaviendelangle
|
|
227
|
+
- [docs] Fix outdated link to handbook (#15855) @oliviertassinari
|
|
228
|
+
- [docs] Improve Pickers accessible DOM migration section description (#15596) @LukasTy
|
|
229
|
+
- [docs] Use `updateRows` method for list view demos (#15732) @KenanYusuf
|
|
230
|
+
- [docs] Use date library version from package dev dependencies for sandboxes (#15762) @LukasTy
|
|
231
|
+
|
|
232
|
+
### Core
|
|
233
|
+
|
|
234
|
+
- [code-infra] Add Charts sandbox generation (#15830) @JCQuintas
|
|
235
|
+
- [code-infra] Remove redundant `@type/react-test-renderer` dep (#15766) @LukasTy
|
|
236
|
+
- [license] Use `console.log` for the error message on Codesandbox to avoid rendering error (#15814) @arminmeh
|
|
237
|
+
|
|
8
238
|
## 8.0.0-alpha.3
|
|
9
239
|
|
|
10
240
|
_Dec 5, 2024_
|
|
@@ -567,6 +797,153 @@ Same changes as in `@mui/x-charts@8.0.0-alpha.0`.
|
|
|
567
797
|
- [release] v8 preparation (#15054) @michelengelen
|
|
568
798
|
- [test] Fix advanced list view regression test snapshot (#15260) @KenanYusuf
|
|
569
799
|
|
|
800
|
+
## 7.23.2
|
|
801
|
+
|
|
802
|
+
_Dec 12, 2024_
|
|
803
|
+
|
|
804
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
805
|
+
|
|
806
|
+
- 🌍 Improve Romanian and Turkish locales on the Data Grid
|
|
807
|
+
- 🌍 Improve Romanian locale on the Pickers
|
|
808
|
+
- 📚 Documentation improvements
|
|
809
|
+
- 🐞 Bugfixes
|
|
810
|
+
|
|
811
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
812
|
+
@ihsanberkozcan, @k-rajat19, @lhilgert9, @nusr, @rares985.
|
|
813
|
+
|
|
814
|
+
Following are all team members who have contributed to this release:
|
|
815
|
+
@alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy.
|
|
816
|
+
|
|
817
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
818
|
+
|
|
819
|
+
### Data Grid
|
|
820
|
+
|
|
821
|
+
#### `@mui/x-data-grid@7.23.2`
|
|
822
|
+
|
|
823
|
+
- [DataGrid] Fix "No rows" displaying when all rows are pinned (#15851) @nusr
|
|
824
|
+
- [DataGrid] Use `columnsManagement` slot (#15821) @k-rajat19
|
|
825
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15751) @rares985
|
|
826
|
+
- [l10n] Improve Turkish (tr-TR) locale (#15748) @ihsanberkozcan
|
|
827
|
+
|
|
828
|
+
#### `@mui/x-data-grid-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
829
|
+
|
|
830
|
+
Same changes as in `@mui/x-data-grid@7.23.2`, plus:
|
|
831
|
+
|
|
832
|
+
- [DataGridPro] Make Row reordering work with pagination (#15782) @k-rajat19
|
|
833
|
+
|
|
834
|
+
#### `@mui/x-data-grid-premium@7.23.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
835
|
+
|
|
836
|
+
Same changes as in `@mui/x-data-grid-pro@7.23.2`, plus:
|
|
837
|
+
|
|
838
|
+
- [DataGridPremium] Fix group column ignoring `valueOptions` for `singleSelect` column type (#15754) @arminmeh
|
|
839
|
+
|
|
840
|
+
### Date and Time Pickers
|
|
841
|
+
|
|
842
|
+
#### `@mui/x-date-pickers@7.23.2`
|
|
843
|
+
|
|
844
|
+
- [l10n] Improve Romanian (ro-RO) locale (#15751) @rares985
|
|
845
|
+
|
|
846
|
+
#### `@mui/x-date-pickers-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
847
|
+
|
|
848
|
+
Same changes as in `@mui/x-date-pickers@7.23.2`.
|
|
849
|
+
|
|
850
|
+
### Charts
|
|
851
|
+
|
|
852
|
+
#### `@mui/x-charts@7.23.2`
|
|
853
|
+
|
|
854
|
+
- [charts] Fix key generation for the ChartsGrid (#15864) @alexfauquette
|
|
855
|
+
- [charts] Fix scatter dataset with missing data (#15804) @alexfauquette
|
|
856
|
+
|
|
857
|
+
#### `@mui/x-charts-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
858
|
+
|
|
859
|
+
Same changes as in `@mui/x-charts@7.23.2`.
|
|
860
|
+
|
|
861
|
+
#### `@mui/x-tree-view@v7.23.2`
|
|
862
|
+
|
|
863
|
+
No changes, releasing to keep the versions in sync.
|
|
864
|
+
|
|
865
|
+
#### `@mui/x-tree-view-pro@7.23.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
866
|
+
|
|
867
|
+
Releasing to benefit from license package fix (#15818).
|
|
868
|
+
|
|
869
|
+
### Docs
|
|
870
|
+
|
|
871
|
+
- [docs] Fix typo in charts axis documentation (#15746) @JCQuintas
|
|
872
|
+
- [docs] Improve Pickers accessible DOM structure description (#15752) @LukasTy
|
|
873
|
+
- [docs] Use `updateRows` method for list view demos (#15824) @KenanYusuf
|
|
874
|
+
- [docs] Use date library version from package dev dependencies for sandboxes (#15767) @LukasTy
|
|
875
|
+
|
|
876
|
+
### Core
|
|
877
|
+
|
|
878
|
+
- [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15747) @flaviendelangle
|
|
879
|
+
- [license] Use `console.log` for the error message on Codesandbox to avoid rendering error (#15818) @arminmeh
|
|
880
|
+
|
|
881
|
+
## 7.23.1
|
|
882
|
+
|
|
883
|
+
_Dec 5, 2024_
|
|
884
|
+
|
|
885
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
886
|
+
|
|
887
|
+
- 🌍 Improve German locale on the Data Grid component
|
|
888
|
+
- 🐞 Bugfixes
|
|
889
|
+
|
|
890
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
891
|
+
@lhilgert9.
|
|
892
|
+
|
|
893
|
+
Following are all team members who have contributed to this release:
|
|
894
|
+
@arthurbalduini, @cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy and @MBilalShafi.
|
|
895
|
+
|
|
896
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
897
|
+
|
|
898
|
+
### Data Grid
|
|
899
|
+
|
|
900
|
+
#### `@mui/x-data-grid@7.23.1`
|
|
901
|
+
|
|
902
|
+
- [DataGrid] Make column autosizing work with flex columns (#15712) @cherniavskii
|
|
903
|
+
- [l10n] Improve German (de-DE) locale (#15641) @lhilgert9
|
|
904
|
+
|
|
905
|
+
#### `@mui/x-data-grid-pro@7.23.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
906
|
+
|
|
907
|
+
Same changes as in `@mui/x-data-grid@7.23.1`, plus:
|
|
908
|
+
|
|
909
|
+
- [DataGridPro] Cleanup pinned rows on removal (#15702) @cherniavskii
|
|
910
|
+
|
|
911
|
+
#### `@mui/x-data-grid-premium@7.23.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
912
|
+
|
|
913
|
+
Same changes as in `@mui/x-data-grid-pro@7.23.1`.
|
|
914
|
+
|
|
915
|
+
### Date and Time Pickers
|
|
916
|
+
|
|
917
|
+
#### `@mui/x-date-pickers@7.23.1`
|
|
918
|
+
|
|
919
|
+
- [TimePicker] Prevent mouse events after `touchend` event (#15430) @arthurbalduini
|
|
920
|
+
|
|
921
|
+
#### `@mui/x-date-pickers-pro@7.23.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
922
|
+
|
|
923
|
+
Same changes as in `@mui/x-date-pickers@7.23.1`.
|
|
924
|
+
|
|
925
|
+
### Charts
|
|
926
|
+
|
|
927
|
+
#### `@mui/x-charts@7.23.1`
|
|
928
|
+
|
|
929
|
+
- [charts] Improve SVG `pattern` and `gradient` support (#15724) @JCQuintas
|
|
930
|
+
|
|
931
|
+
#### `@mui/x-charts-pro@7.23.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
932
|
+
|
|
933
|
+
Same changes as in `@mui/x-charts@7.23.1`.
|
|
934
|
+
|
|
935
|
+
### Docs
|
|
936
|
+
|
|
937
|
+
- [docs] Fix Pickers theme augmentation example (#15675) @LukasTy
|
|
938
|
+
- [docs] Remove duplicated warning (#15715) @cherniavskii
|
|
939
|
+
- [test] Force hover in headless Chrome (#15711) @cherniavskii
|
|
940
|
+
- [docs-infra] Bump `@mui/internal-markdown` to support nested demo imports (#15738) @alexfauquette
|
|
941
|
+
- [docs] Improve SEO titles for the Data Grid (#15695) @MBilalShafi
|
|
942
|
+
|
|
943
|
+
### Core
|
|
944
|
+
|
|
945
|
+
- [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15747) @flaviendelangle
|
|
946
|
+
|
|
570
947
|
## 7.23.0
|
|
571
948
|
|
|
572
949
|
_Nov 29, 2024_
|
|
@@ -2,21 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["value", "rangePosition", "onRangePositionChange", "toolbarFormat", "className", "onViewChange", "view", "views"];
|
|
5
|
+
const _excluded = ["value", "rangePosition", "onRangePositionChange", "toolbarFormat", "className", "classes", "onViewChange", "view", "views"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import Typography from '@mui/material/Typography';
|
|
10
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
11
11
|
import composeClasses from '@mui/utils/composeClasses';
|
|
12
|
-
import { PickersToolbar, PickersToolbarButton, useUtils } from '@mui/x-date-pickers/internals';
|
|
12
|
+
import { PickersToolbar, PickersToolbarButton, useUtils, useToolbarOwnerState } from '@mui/x-date-pickers/internals';
|
|
13
13
|
import { usePickerTranslations } from '@mui/x-date-pickers/hooks';
|
|
14
14
|
import { getDateRangePickerToolbarUtilityClass } from "./dateRangePickerToolbarClasses.js";
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
const useUtilityClasses =
|
|
17
|
-
const {
|
|
18
|
-
classes
|
|
19
|
-
} = ownerState;
|
|
16
|
+
const useUtilityClasses = classes => {
|
|
20
17
|
const slots = {
|
|
21
18
|
root: ['root'],
|
|
22
19
|
container: ['container']
|
|
@@ -56,14 +53,15 @@ const DateRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateRangeP
|
|
|
56
53
|
rangePosition,
|
|
57
54
|
onRangePositionChange,
|
|
58
55
|
toolbarFormat,
|
|
59
|
-
className
|
|
56
|
+
className,
|
|
57
|
+
classes: classesProp
|
|
60
58
|
} = props,
|
|
61
59
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
62
60
|
const translations = usePickerTranslations();
|
|
61
|
+
const ownerState = useToolbarOwnerState();
|
|
62
|
+
const classes = useUtilityClasses(classesProp);
|
|
63
63
|
const startDateValue = start ? utils.formatByString(start, toolbarFormat || utils.formats.shortDate) : translations.start;
|
|
64
64
|
const endDateValue = end ? utils.formatByString(end, toolbarFormat || utils.formats.shortDate) : translations.end;
|
|
65
|
-
const ownerState = props;
|
|
66
|
-
const classes = useUtilityClasses(ownerState);
|
|
67
65
|
return /*#__PURE__*/_jsx(DateRangePickerToolbarRoot, _extends({}, other, {
|
|
68
66
|
toolbarTitle: translations.dateRangePickerToolbarTitle,
|
|
69
67
|
isLandscape: false,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BaseToolbarProps, ExportedBaseToolbarProps, DateOrTimeViewWithMeridiem,
|
|
2
|
+
import { BaseToolbarProps, ExportedBaseToolbarProps, DateOrTimeViewWithMeridiem, PickerRangeValue } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { UseRangePositionResponse } from '../internals/hooks/useRangePosition';
|
|
4
4
|
import { DateTimeRangePickerToolbarClasses } from './dateTimeRangePickerToolbarClasses';
|
|
5
5
|
type DateTimeRangeViews = Exclude<DateOrTimeViewWithMeridiem, 'year' | 'month'>;
|
|
6
6
|
export interface DateTimeRangePickerToolbarProps extends BaseToolbarProps<PickerRangeValue, DateTimeRangeViews>, Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'>, ExportedDateTimeRangePickerToolbarProps {
|
|
7
7
|
ampm?: boolean;
|
|
8
|
-
toolbarVariant?: PickerVariant;
|
|
9
8
|
}
|
|
10
9
|
export interface ExportedDateTimeRangePickerToolbarProps extends ExportedBaseToolbarProps {
|
|
11
10
|
/**
|
|
@@ -2,22 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["value", "rangePosition", "onRangePositionChange", "className", "
|
|
5
|
+
const _excluded = ["value", "rangePosition", "onRangePositionChange", "className", "classes", "onViewChange", "onChange", "classes", "view", "isLandscape", "views", "ampm", "hidden", "toolbarFormat", "toolbarPlaceholder", "titleId", "sx"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
10
10
|
import composeClasses from '@mui/utils/composeClasses';
|
|
11
|
-
import { useUtils } from '@mui/x-date-pickers/internals';
|
|
11
|
+
import { useUtils, useToolbarOwnerState, DateTimePickerToolbarForceDesktopVariant } from '@mui/x-date-pickers/internals';
|
|
12
12
|
import { usePickerContext, usePickerTranslations } from '@mui/x-date-pickers/hooks';
|
|
13
13
|
import { DateTimePickerToolbar } from '@mui/x-date-pickers/DateTimePicker';
|
|
14
14
|
import { getDateTimeRangePickerToolbarUtilityClass } from "./dateTimeRangePickerToolbarClasses.js";
|
|
15
15
|
import { calculateRangeChange } from "../internals/utils/date-range-manager.js";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
const useUtilityClasses =
|
|
18
|
-
const {
|
|
19
|
-
classes
|
|
20
|
-
} = ownerState;
|
|
17
|
+
const useUtilityClasses = classes => {
|
|
21
18
|
const slots = {
|
|
22
19
|
root: ['root'],
|
|
23
20
|
startToolbar: ['startToolbar'],
|
|
@@ -39,36 +36,13 @@ const DateTimeRangePickerToolbarStart = styled(DateTimePickerToolbar, {
|
|
|
39
36
|
overridesResolver: (_, styles) => styles.startToolbar
|
|
40
37
|
})({
|
|
41
38
|
borderBottom: 'none',
|
|
42
|
-
|
|
43
|
-
props: ({
|
|
44
|
-
toolbarVariant
|
|
45
|
-
}) => toolbarVariant !== 'desktop',
|
|
46
|
-
style: {
|
|
47
|
-
padding: '12px 8px 0 12px'
|
|
48
|
-
}
|
|
49
|
-
}, {
|
|
50
|
-
props: {
|
|
51
|
-
toolbarVariant: 'desktop'
|
|
52
|
-
},
|
|
53
|
-
style: {
|
|
54
|
-
paddingBottom: 0
|
|
55
|
-
}
|
|
56
|
-
}]
|
|
39
|
+
paddingBottom: 0
|
|
57
40
|
});
|
|
58
41
|
const DateTimeRangePickerToolbarEnd = styled(DateTimePickerToolbar, {
|
|
59
42
|
name: 'MuiDateTimeRangePickerToolbar',
|
|
60
43
|
slot: 'EndToolbar',
|
|
61
44
|
overridesResolver: (_, styles) => styles.endToolbar
|
|
62
|
-
})({
|
|
63
|
-
variants: [{
|
|
64
|
-
props: ({
|
|
65
|
-
toolbarVariant
|
|
66
|
-
}) => toolbarVariant !== 'desktop',
|
|
67
|
-
style: {
|
|
68
|
-
padding: '12px 8px 12px 12px'
|
|
69
|
-
}
|
|
70
|
-
}]
|
|
71
|
-
});
|
|
45
|
+
})({});
|
|
72
46
|
const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTimeRangePickerToolbar(inProps, ref) {
|
|
73
47
|
const props = useThemeProps({
|
|
74
48
|
props: inProps,
|
|
@@ -80,6 +54,7 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
80
54
|
rangePosition,
|
|
81
55
|
onRangePositionChange,
|
|
82
56
|
className,
|
|
57
|
+
classes: classesProp,
|
|
83
58
|
onViewChange,
|
|
84
59
|
onChange,
|
|
85
60
|
view,
|
|
@@ -97,6 +72,9 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
97
72
|
disabled,
|
|
98
73
|
readOnly
|
|
99
74
|
} = usePickerContext();
|
|
75
|
+
const translations = usePickerTranslations();
|
|
76
|
+
const ownerState = useToolbarOwnerState();
|
|
77
|
+
const classes = useUtilityClasses(classesProp);
|
|
100
78
|
const commonToolbarProps = {
|
|
101
79
|
isLandscape,
|
|
102
80
|
views,
|
|
@@ -107,9 +85,6 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
107
85
|
toolbarFormat,
|
|
108
86
|
toolbarPlaceholder
|
|
109
87
|
};
|
|
110
|
-
const translations = usePickerTranslations();
|
|
111
|
-
const ownerState = props;
|
|
112
|
-
const classes = useUtilityClasses(ownerState);
|
|
113
88
|
const handleStartRangeViewChange = React.useCallback(newView => {
|
|
114
89
|
if (newView === 'year' || newView === 'month') {
|
|
115
90
|
return;
|
|
@@ -145,33 +120,34 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
145
120
|
if (hidden) {
|
|
146
121
|
return null;
|
|
147
122
|
}
|
|
148
|
-
return /*#__PURE__*/
|
|
123
|
+
return /*#__PURE__*/_jsx(DateTimeRangePickerToolbarRoot, _extends({
|
|
149
124
|
className: clsx(classes.root, className),
|
|
150
125
|
ownerState: ownerState,
|
|
151
126
|
ref: ref,
|
|
152
127
|
sx: sx
|
|
153
128
|
}, other, {
|
|
154
|
-
children:
|
|
155
|
-
value:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
129
|
+
children: /*#__PURE__*/_jsxs(DateTimePickerToolbarForceDesktopVariant.Provider, {
|
|
130
|
+
value: true,
|
|
131
|
+
children: [/*#__PURE__*/_jsx(DateTimeRangePickerToolbarStart, _extends({
|
|
132
|
+
value: start,
|
|
133
|
+
onViewChange: handleStartRangeViewChange,
|
|
134
|
+
toolbarTitle: translations.start,
|
|
135
|
+
ownerState: ownerState,
|
|
136
|
+
view: rangePosition === 'start' ? view : undefined,
|
|
137
|
+
className: classes.startToolbar,
|
|
138
|
+
onChange: handleOnChange,
|
|
139
|
+
titleId: titleId ? `${titleId}-start-toolbar` : undefined
|
|
140
|
+
}, commonToolbarProps)), /*#__PURE__*/_jsx(DateTimeRangePickerToolbarEnd, _extends({
|
|
141
|
+
value: end,
|
|
142
|
+
onViewChange: handleEndRangeViewChange,
|
|
143
|
+
toolbarTitle: translations.end,
|
|
144
|
+
ownerState: ownerState,
|
|
145
|
+
view: rangePosition === 'end' ? view : undefined,
|
|
146
|
+
className: classes.endToolbar,
|
|
147
|
+
onChange: handleOnChange,
|
|
148
|
+
titleId: titleId ? `${titleId}-end-toolbar` : undefined
|
|
149
|
+
}, commonToolbarProps))]
|
|
150
|
+
})
|
|
175
151
|
}));
|
|
176
152
|
});
|
|
177
153
|
process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
|
|
@@ -214,7 +190,6 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
|
|
|
214
190
|
* @default "––"
|
|
215
191
|
*/
|
|
216
192
|
toolbarPlaceholder: PropTypes.node,
|
|
217
|
-
toolbarVariant: PropTypes.oneOf(['desktop', 'mobile']),
|
|
218
193
|
value: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
219
194
|
/**
|
|
220
195
|
* Currently visible picker view.
|
|
@@ -112,8 +112,7 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
|
|
|
112
112
|
hidden: true
|
|
113
113
|
}, defaultizedProps.slotProps?.tabs),
|
|
114
114
|
toolbar: _extends({
|
|
115
|
-
hidden: true
|
|
116
|
-
toolbarVariant: 'desktop'
|
|
115
|
+
hidden: true
|
|
117
116
|
}, defaultizedProps.slotProps?.toolbar),
|
|
118
117
|
actionBar: ownerState => _extends({
|
|
119
118
|
actions: actionBarActions
|
|
@@ -114,8 +114,7 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
|
|
|
114
114
|
hidden: false
|
|
115
115
|
}, defaultizedProps.slotProps?.tabs),
|
|
116
116
|
toolbar: _extends({
|
|
117
|
-
hidden: false
|
|
118
|
-
toolbarVariant: 'mobile'
|
|
117
|
+
hidden: false
|
|
119
118
|
}, defaultizedProps.slotProps?.toolbar)
|
|
120
119
|
})
|
|
121
120
|
});
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# MUI X Date Pickers Pro
|
|
2
2
|
|
|
3
3
|
This package is the Pro plan edition of the Date and Time Picker Components.
|
|
4
|
-
It's part of [MUI X](https://mui.com/x/), an open-core extension of
|
|
4
|
+
It's part of [MUI X](https://mui.com/x/), an open-core extension of our Core libraries, with advanced components.
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseSingleInputDateRangeFieldProps } from './SingleInputDateRangeField.types';
|
|
2
|
-
export declare const useSingleInputDateRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseSingleInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedDateFieldBaseProps> & Required<Pick<UseSingleInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedDateFieldBaseProps>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "
|
|
2
|
+
export declare const useSingleInputDateRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseSingleInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedDateFieldBaseProps> & Required<Pick<UseSingleInputDateRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedDateFieldBaseProps>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "referenceDate" | "timezone" | "formatDensity" | "enableAccessibleFieldDOMStructure" | "selectedSections" | "onSelectedSectionsChange" | "shouldRespectLeadingZeros" | "unstableFieldRef" | keyof import("@mui/x-date-pickers/internals").BaseDateValidationProps | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | "dateSeparator">>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseSingleInputDateTimeRangeFieldProps } from './SingleInputDateTimeRangeField.types';
|
|
2
|
-
export declare const useSingleInputDateTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseSingleInputDateTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedDateTimeFieldBaseProps> & Required<Pick<UseSingleInputDateTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedDateTimeFieldBaseProps>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "
|
|
2
|
+
export declare const useSingleInputDateTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputDateTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseSingleInputDateTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedDateTimeFieldBaseProps> & Required<Pick<UseSingleInputDateTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedDateTimeFieldBaseProps>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "referenceDate" | "timezone" | "formatDensity" | "enableAccessibleFieldDOMStructure" | "selectedSections" | "onSelectedSectionsChange" | "shouldRespectLeadingZeros" | "unstableFieldRef" | "ampm" | "disableFuture" | "maxDate" | "disablePast" | "minDate" | "minTime" | "maxTime" | "minutesStep" | "shouldDisableTime" | "disableIgnoringDatePartForTimeValidation" | "minDateTime" | "maxDateTime" | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | "dateSeparator">>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UseSingleInputTimeRangeFieldProps } from './SingleInputTimeRangeField.types';
|
|
2
|
-
export declare const useSingleInputTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseSingleInputTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedTimeFieldBaseProps> & Required<Pick<UseSingleInputTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedTimeFieldBaseProps>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "
|
|
2
|
+
export declare const useSingleInputTimeRangeField: <TEnableAccessibleFieldDOMStructure extends boolean, TAllProps extends UseSingleInputTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>>(inProps: TAllProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<TEnableAccessibleFieldDOMStructure, Omit<TAllProps & Omit<UseSingleInputTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedTimeFieldBaseProps> & Required<Pick<UseSingleInputTimeRangeFieldProps<TEnableAccessibleFieldDOMStructure>, keyof import("@mui/x-date-pickers/internals/hooks/defaultizedFieldProps").UseDefaultizedTimeFieldBaseProps>>, "disabled" | "format" | "onChange" | "onError" | "defaultValue" | "value" | "readOnly" | "referenceDate" | "timezone" | "formatDensity" | "enableAccessibleFieldDOMStructure" | "selectedSections" | "onSelectedSectionsChange" | "shouldRespectLeadingZeros" | "unstableFieldRef" | "ampm" | keyof import("@mui/x-date-pickers/internals").BaseTimeValidationProps | keyof import("@mui/x-date-pickers/internals").TimeValidationProps | "dateSeparator">>;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UsePickerParams, BasePickerProps, ExportedBaseToolbarProps, UsePickerViewsProps, BaseNonStaticPickerProps, UsePickerValueNonStaticProps,
|
|
1
|
+
import { UsePickerParams, BasePickerProps, ExportedBaseToolbarProps, UsePickerViewsProps, BaseNonStaticPickerProps, UsePickerValueNonStaticProps, UsePickerProviderNonStaticProps, DateOrTimeViewWithMeridiem, ExportedBaseTabsProps, PickerRangeValue } from '@mui/x-date-pickers/internals';
|
|
2
2
|
import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps } from '@mui/x-date-pickers/PickersLayout';
|
|
3
3
|
import { BaseRangeNonStaticPickerProps } from '../../models';
|
|
4
4
|
import { UseRangePositionProps, UseRangePositionResponse } from '../useRangePosition';
|
|
@@ -9,7 +9,7 @@ export interface UseRangePickerSlotProps<TView extends DateOrTimeViewWithMeridie
|
|
|
9
9
|
tabs?: ExportedBaseTabsProps;
|
|
10
10
|
toolbar?: ExportedBaseToolbarProps;
|
|
11
11
|
}
|
|
12
|
-
export interface RangeOnlyPickerProps extends BaseNonStaticPickerProps, UsePickerValueNonStaticProps,
|
|
12
|
+
export interface RangeOnlyPickerProps extends BaseNonStaticPickerProps, UsePickerValueNonStaticProps, UsePickerProviderNonStaticProps, BaseRangeNonStaticPickerProps, UseRangePositionProps {
|
|
13
13
|
}
|
|
14
14
|
export interface UseRangePickerProps<TView extends DateOrTimeViewWithMeridiem, TError, TExternalProps extends UsePickerViewsProps<any, TView, any, any>, TAdditionalViewProps extends {}> extends RangeOnlyPickerProps, BasePickerProps<PickerRangeValue, TView, TError, TExternalProps, TAdditionalViewProps> {
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTczNDU2NjQwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -2,21 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["value", "rangePosition", "onRangePositionChange", "toolbarFormat", "className", "onViewChange", "view", "views"];
|
|
5
|
+
const _excluded = ["value", "rangePosition", "onRangePositionChange", "toolbarFormat", "className", "classes", "onViewChange", "view", "views"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import Typography from '@mui/material/Typography';
|
|
10
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
11
11
|
import composeClasses from '@mui/utils/composeClasses';
|
|
12
|
-
import { PickersToolbar, PickersToolbarButton, useUtils } from '@mui/x-date-pickers/internals';
|
|
12
|
+
import { PickersToolbar, PickersToolbarButton, useUtils, useToolbarOwnerState } from '@mui/x-date-pickers/internals';
|
|
13
13
|
import { usePickerTranslations } from '@mui/x-date-pickers/hooks';
|
|
14
14
|
import { getDateRangePickerToolbarUtilityClass } from "./dateRangePickerToolbarClasses.js";
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
const useUtilityClasses =
|
|
17
|
-
const {
|
|
18
|
-
classes
|
|
19
|
-
} = ownerState;
|
|
16
|
+
const useUtilityClasses = classes => {
|
|
20
17
|
const slots = {
|
|
21
18
|
root: ['root'],
|
|
22
19
|
container: ['container']
|
|
@@ -56,14 +53,15 @@ const DateRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateRangeP
|
|
|
56
53
|
rangePosition,
|
|
57
54
|
onRangePositionChange,
|
|
58
55
|
toolbarFormat,
|
|
59
|
-
className
|
|
56
|
+
className,
|
|
57
|
+
classes: classesProp
|
|
60
58
|
} = props,
|
|
61
59
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
62
60
|
const translations = usePickerTranslations();
|
|
61
|
+
const ownerState = useToolbarOwnerState();
|
|
62
|
+
const classes = useUtilityClasses(classesProp);
|
|
63
63
|
const startDateValue = start ? utils.formatByString(start, toolbarFormat || utils.formats.shortDate) : translations.start;
|
|
64
64
|
const endDateValue = end ? utils.formatByString(end, toolbarFormat || utils.formats.shortDate) : translations.end;
|
|
65
|
-
const ownerState = props;
|
|
66
|
-
const classes = useUtilityClasses(ownerState);
|
|
67
65
|
return /*#__PURE__*/_jsx(DateRangePickerToolbarRoot, _extends({}, other, {
|
|
68
66
|
toolbarTitle: translations.dateRangePickerToolbarTitle,
|
|
69
67
|
isLandscape: false,
|
|
@@ -2,22 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["value", "rangePosition", "onRangePositionChange", "className", "
|
|
5
|
+
const _excluded = ["value", "rangePosition", "onRangePositionChange", "className", "classes", "onViewChange", "onChange", "classes", "view", "isLandscape", "views", "ampm", "hidden", "toolbarFormat", "toolbarPlaceholder", "titleId", "sx"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
10
10
|
import composeClasses from '@mui/utils/composeClasses';
|
|
11
|
-
import { useUtils } from '@mui/x-date-pickers/internals';
|
|
11
|
+
import { useUtils, useToolbarOwnerState, DateTimePickerToolbarForceDesktopVariant } from '@mui/x-date-pickers/internals';
|
|
12
12
|
import { usePickerContext, usePickerTranslations } from '@mui/x-date-pickers/hooks';
|
|
13
13
|
import { DateTimePickerToolbar } from '@mui/x-date-pickers/DateTimePicker';
|
|
14
14
|
import { getDateTimeRangePickerToolbarUtilityClass } from "./dateTimeRangePickerToolbarClasses.js";
|
|
15
15
|
import { calculateRangeChange } from "../internals/utils/date-range-manager.js";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
const useUtilityClasses =
|
|
18
|
-
const {
|
|
19
|
-
classes
|
|
20
|
-
} = ownerState;
|
|
17
|
+
const useUtilityClasses = classes => {
|
|
21
18
|
const slots = {
|
|
22
19
|
root: ['root'],
|
|
23
20
|
startToolbar: ['startToolbar'],
|
|
@@ -39,36 +36,13 @@ const DateTimeRangePickerToolbarStart = styled(DateTimePickerToolbar, {
|
|
|
39
36
|
overridesResolver: (_, styles) => styles.startToolbar
|
|
40
37
|
})({
|
|
41
38
|
borderBottom: 'none',
|
|
42
|
-
|
|
43
|
-
props: ({
|
|
44
|
-
toolbarVariant
|
|
45
|
-
}) => toolbarVariant !== 'desktop',
|
|
46
|
-
style: {
|
|
47
|
-
padding: '12px 8px 0 12px'
|
|
48
|
-
}
|
|
49
|
-
}, {
|
|
50
|
-
props: {
|
|
51
|
-
toolbarVariant: 'desktop'
|
|
52
|
-
},
|
|
53
|
-
style: {
|
|
54
|
-
paddingBottom: 0
|
|
55
|
-
}
|
|
56
|
-
}]
|
|
39
|
+
paddingBottom: 0
|
|
57
40
|
});
|
|
58
41
|
const DateTimeRangePickerToolbarEnd = styled(DateTimePickerToolbar, {
|
|
59
42
|
name: 'MuiDateTimeRangePickerToolbar',
|
|
60
43
|
slot: 'EndToolbar',
|
|
61
44
|
overridesResolver: (_, styles) => styles.endToolbar
|
|
62
|
-
})({
|
|
63
|
-
variants: [{
|
|
64
|
-
props: ({
|
|
65
|
-
toolbarVariant
|
|
66
|
-
}) => toolbarVariant !== 'desktop',
|
|
67
|
-
style: {
|
|
68
|
-
padding: '12px 8px 12px 12px'
|
|
69
|
-
}
|
|
70
|
-
}]
|
|
71
|
-
});
|
|
45
|
+
})({});
|
|
72
46
|
const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTimeRangePickerToolbar(inProps, ref) {
|
|
73
47
|
const props = useThemeProps({
|
|
74
48
|
props: inProps,
|
|
@@ -80,6 +54,7 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
80
54
|
rangePosition,
|
|
81
55
|
onRangePositionChange,
|
|
82
56
|
className,
|
|
57
|
+
classes: classesProp,
|
|
83
58
|
onViewChange,
|
|
84
59
|
onChange,
|
|
85
60
|
view,
|
|
@@ -97,6 +72,9 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
97
72
|
disabled,
|
|
98
73
|
readOnly
|
|
99
74
|
} = usePickerContext();
|
|
75
|
+
const translations = usePickerTranslations();
|
|
76
|
+
const ownerState = useToolbarOwnerState();
|
|
77
|
+
const classes = useUtilityClasses(classesProp);
|
|
100
78
|
const commonToolbarProps = {
|
|
101
79
|
isLandscape,
|
|
102
80
|
views,
|
|
@@ -107,9 +85,6 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
107
85
|
toolbarFormat,
|
|
108
86
|
toolbarPlaceholder
|
|
109
87
|
};
|
|
110
|
-
const translations = usePickerTranslations();
|
|
111
|
-
const ownerState = props;
|
|
112
|
-
const classes = useUtilityClasses(ownerState);
|
|
113
88
|
const handleStartRangeViewChange = React.useCallback(newView => {
|
|
114
89
|
if (newView === 'year' || newView === 'month') {
|
|
115
90
|
return;
|
|
@@ -145,33 +120,34 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
|
|
|
145
120
|
if (hidden) {
|
|
146
121
|
return null;
|
|
147
122
|
}
|
|
148
|
-
return /*#__PURE__*/
|
|
123
|
+
return /*#__PURE__*/_jsx(DateTimeRangePickerToolbarRoot, _extends({
|
|
149
124
|
className: clsx(classes.root, className),
|
|
150
125
|
ownerState: ownerState,
|
|
151
126
|
ref: ref,
|
|
152
127
|
sx: sx
|
|
153
128
|
}, other, {
|
|
154
|
-
children:
|
|
155
|
-
value:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
129
|
+
children: /*#__PURE__*/_jsxs(DateTimePickerToolbarForceDesktopVariant.Provider, {
|
|
130
|
+
value: true,
|
|
131
|
+
children: [/*#__PURE__*/_jsx(DateTimeRangePickerToolbarStart, _extends({
|
|
132
|
+
value: start,
|
|
133
|
+
onViewChange: handleStartRangeViewChange,
|
|
134
|
+
toolbarTitle: translations.start,
|
|
135
|
+
ownerState: ownerState,
|
|
136
|
+
view: rangePosition === 'start' ? view : undefined,
|
|
137
|
+
className: classes.startToolbar,
|
|
138
|
+
onChange: handleOnChange,
|
|
139
|
+
titleId: titleId ? `${titleId}-start-toolbar` : undefined
|
|
140
|
+
}, commonToolbarProps)), /*#__PURE__*/_jsx(DateTimeRangePickerToolbarEnd, _extends({
|
|
141
|
+
value: end,
|
|
142
|
+
onViewChange: handleEndRangeViewChange,
|
|
143
|
+
toolbarTitle: translations.end,
|
|
144
|
+
ownerState: ownerState,
|
|
145
|
+
view: rangePosition === 'end' ? view : undefined,
|
|
146
|
+
className: classes.endToolbar,
|
|
147
|
+
onChange: handleOnChange,
|
|
148
|
+
titleId: titleId ? `${titleId}-end-toolbar` : undefined
|
|
149
|
+
}, commonToolbarProps))]
|
|
150
|
+
})
|
|
175
151
|
}));
|
|
176
152
|
});
|
|
177
153
|
process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
|
|
@@ -214,7 +190,6 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
|
|
|
214
190
|
* @default "––"
|
|
215
191
|
*/
|
|
216
192
|
toolbarPlaceholder: PropTypes.node,
|
|
217
|
-
toolbarVariant: PropTypes.oneOf(['desktop', 'mobile']),
|
|
218
193
|
value: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
219
194
|
/**
|
|
220
195
|
* Currently visible picker view.
|
|
@@ -112,8 +112,7 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
|
|
|
112
112
|
hidden: true
|
|
113
113
|
}, defaultizedProps.slotProps?.tabs),
|
|
114
114
|
toolbar: _extends({
|
|
115
|
-
hidden: true
|
|
116
|
-
toolbarVariant: 'desktop'
|
|
115
|
+
hidden: true
|
|
117
116
|
}, defaultizedProps.slotProps?.toolbar),
|
|
118
117
|
actionBar: ownerState => _extends({
|
|
119
118
|
actions: actionBarActions
|
|
@@ -114,8 +114,7 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
|
|
|
114
114
|
hidden: false
|
|
115
115
|
}, defaultizedProps.slotProps?.tabs),
|
|
116
116
|
toolbar: _extends({
|
|
117
|
-
hidden: false
|
|
118
|
-
toolbarVariant: 'mobile'
|
|
117
|
+
hidden: false
|
|
119
118
|
}, defaultizedProps.slotProps?.toolbar)
|
|
120
119
|
})
|
|
121
120
|
});
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTczNDU2NjQwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -19,11 +19,8 @@ var _internals = require("@mui/x-date-pickers/internals");
|
|
|
19
19
|
var _hooks = require("@mui/x-date-pickers/hooks");
|
|
20
20
|
var _dateRangePickerToolbarClasses = require("./dateRangePickerToolbarClasses");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
const _excluded = ["value", "rangePosition", "onRangePositionChange", "toolbarFormat", "className", "onViewChange", "view", "views"];
|
|
23
|
-
const useUtilityClasses =
|
|
24
|
-
const {
|
|
25
|
-
classes
|
|
26
|
-
} = ownerState;
|
|
22
|
+
const _excluded = ["value", "rangePosition", "onRangePositionChange", "toolbarFormat", "className", "classes", "onViewChange", "view", "views"];
|
|
23
|
+
const useUtilityClasses = classes => {
|
|
27
24
|
const slots = {
|
|
28
25
|
root: ['root'],
|
|
29
26
|
container: ['container']
|
|
@@ -63,14 +60,15 @@ const DateRangePickerToolbar = exports.DateRangePickerToolbar = /*#__PURE__*/Rea
|
|
|
63
60
|
rangePosition,
|
|
64
61
|
onRangePositionChange,
|
|
65
62
|
toolbarFormat,
|
|
66
|
-
className
|
|
63
|
+
className,
|
|
64
|
+
classes: classesProp
|
|
67
65
|
} = props,
|
|
68
66
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
69
67
|
const translations = (0, _hooks.usePickerTranslations)();
|
|
68
|
+
const ownerState = (0, _internals.useToolbarOwnerState)();
|
|
69
|
+
const classes = useUtilityClasses(classesProp);
|
|
70
70
|
const startDateValue = start ? utils.formatByString(start, toolbarFormat || utils.formats.shortDate) : translations.start;
|
|
71
71
|
const endDateValue = end ? utils.formatByString(end, toolbarFormat || utils.formats.shortDate) : translations.end;
|
|
72
|
-
const ownerState = props;
|
|
73
|
-
const classes = useUtilityClasses(ownerState);
|
|
74
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DateRangePickerToolbarRoot, (0, _extends2.default)({}, other, {
|
|
75
73
|
toolbarTitle: translations.dateRangePickerToolbarTitle,
|
|
76
74
|
isLandscape: false,
|
|
@@ -20,11 +20,8 @@ var _DateTimePicker = require("@mui/x-date-pickers/DateTimePicker");
|
|
|
20
20
|
var _dateTimeRangePickerToolbarClasses = require("./dateTimeRangePickerToolbarClasses");
|
|
21
21
|
var _dateRangeManager = require("../internals/utils/date-range-manager");
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
-
const _excluded = ["value", "rangePosition", "onRangePositionChange", "className", "
|
|
24
|
-
const useUtilityClasses =
|
|
25
|
-
const {
|
|
26
|
-
classes
|
|
27
|
-
} = ownerState;
|
|
23
|
+
const _excluded = ["value", "rangePosition", "onRangePositionChange", "className", "classes", "onViewChange", "onChange", "classes", "view", "isLandscape", "views", "ampm", "hidden", "toolbarFormat", "toolbarPlaceholder", "titleId", "sx"];
|
|
24
|
+
const useUtilityClasses = classes => {
|
|
28
25
|
const slots = {
|
|
29
26
|
root: ['root'],
|
|
30
27
|
startToolbar: ['startToolbar'],
|
|
@@ -46,36 +43,13 @@ const DateTimeRangePickerToolbarStart = (0, _styles.styled)(_DateTimePicker.Date
|
|
|
46
43
|
overridesResolver: (_, styles) => styles.startToolbar
|
|
47
44
|
})({
|
|
48
45
|
borderBottom: 'none',
|
|
49
|
-
|
|
50
|
-
props: ({
|
|
51
|
-
toolbarVariant
|
|
52
|
-
}) => toolbarVariant !== 'desktop',
|
|
53
|
-
style: {
|
|
54
|
-
padding: '12px 8px 0 12px'
|
|
55
|
-
}
|
|
56
|
-
}, {
|
|
57
|
-
props: {
|
|
58
|
-
toolbarVariant: 'desktop'
|
|
59
|
-
},
|
|
60
|
-
style: {
|
|
61
|
-
paddingBottom: 0
|
|
62
|
-
}
|
|
63
|
-
}]
|
|
46
|
+
paddingBottom: 0
|
|
64
47
|
});
|
|
65
48
|
const DateTimeRangePickerToolbarEnd = (0, _styles.styled)(_DateTimePicker.DateTimePickerToolbar, {
|
|
66
49
|
name: 'MuiDateTimeRangePickerToolbar',
|
|
67
50
|
slot: 'EndToolbar',
|
|
68
51
|
overridesResolver: (_, styles) => styles.endToolbar
|
|
69
|
-
})({
|
|
70
|
-
variants: [{
|
|
71
|
-
props: ({
|
|
72
|
-
toolbarVariant
|
|
73
|
-
}) => toolbarVariant !== 'desktop',
|
|
74
|
-
style: {
|
|
75
|
-
padding: '12px 8px 12px 12px'
|
|
76
|
-
}
|
|
77
|
-
}]
|
|
78
|
-
});
|
|
52
|
+
})({});
|
|
79
53
|
const DateTimeRangePickerToolbar = exports.DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTimeRangePickerToolbar(inProps, ref) {
|
|
80
54
|
const props = (0, _styles.useThemeProps)({
|
|
81
55
|
props: inProps,
|
|
@@ -87,6 +61,7 @@ const DateTimeRangePickerToolbar = exports.DateTimeRangePickerToolbar = /*#__PUR
|
|
|
87
61
|
rangePosition,
|
|
88
62
|
onRangePositionChange,
|
|
89
63
|
className,
|
|
64
|
+
classes: classesProp,
|
|
90
65
|
onViewChange,
|
|
91
66
|
onChange,
|
|
92
67
|
view,
|
|
@@ -104,6 +79,9 @@ const DateTimeRangePickerToolbar = exports.DateTimeRangePickerToolbar = /*#__PUR
|
|
|
104
79
|
disabled,
|
|
105
80
|
readOnly
|
|
106
81
|
} = (0, _hooks.usePickerContext)();
|
|
82
|
+
const translations = (0, _hooks.usePickerTranslations)();
|
|
83
|
+
const ownerState = (0, _internals.useToolbarOwnerState)();
|
|
84
|
+
const classes = useUtilityClasses(classesProp);
|
|
107
85
|
const commonToolbarProps = {
|
|
108
86
|
isLandscape,
|
|
109
87
|
views,
|
|
@@ -114,9 +92,6 @@ const DateTimeRangePickerToolbar = exports.DateTimeRangePickerToolbar = /*#__PUR
|
|
|
114
92
|
toolbarFormat,
|
|
115
93
|
toolbarPlaceholder
|
|
116
94
|
};
|
|
117
|
-
const translations = (0, _hooks.usePickerTranslations)();
|
|
118
|
-
const ownerState = props;
|
|
119
|
-
const classes = useUtilityClasses(ownerState);
|
|
120
95
|
const handleStartRangeViewChange = React.useCallback(newView => {
|
|
121
96
|
if (newView === 'year' || newView === 'month') {
|
|
122
97
|
return;
|
|
@@ -152,33 +127,34 @@ const DateTimeRangePickerToolbar = exports.DateTimeRangePickerToolbar = /*#__PUR
|
|
|
152
127
|
if (hidden) {
|
|
153
128
|
return null;
|
|
154
129
|
}
|
|
155
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
130
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DateTimeRangePickerToolbarRoot, (0, _extends2.default)({
|
|
156
131
|
className: (0, _clsx.default)(classes.root, className),
|
|
157
132
|
ownerState: ownerState,
|
|
158
133
|
ref: ref,
|
|
159
134
|
sx: sx
|
|
160
135
|
}, other, {
|
|
161
|
-
children:
|
|
162
|
-
value:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
136
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.DateTimePickerToolbarForceDesktopVariant.Provider, {
|
|
137
|
+
value: true,
|
|
138
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DateTimeRangePickerToolbarStart, (0, _extends2.default)({
|
|
139
|
+
value: start,
|
|
140
|
+
onViewChange: handleStartRangeViewChange,
|
|
141
|
+
toolbarTitle: translations.start,
|
|
142
|
+
ownerState: ownerState,
|
|
143
|
+
view: rangePosition === 'start' ? view : undefined,
|
|
144
|
+
className: classes.startToolbar,
|
|
145
|
+
onChange: handleOnChange,
|
|
146
|
+
titleId: titleId ? `${titleId}-start-toolbar` : undefined
|
|
147
|
+
}, commonToolbarProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(DateTimeRangePickerToolbarEnd, (0, _extends2.default)({
|
|
148
|
+
value: end,
|
|
149
|
+
onViewChange: handleEndRangeViewChange,
|
|
150
|
+
toolbarTitle: translations.end,
|
|
151
|
+
ownerState: ownerState,
|
|
152
|
+
view: rangePosition === 'end' ? view : undefined,
|
|
153
|
+
className: classes.endToolbar,
|
|
154
|
+
onChange: handleOnChange,
|
|
155
|
+
titleId: titleId ? `${titleId}-end-toolbar` : undefined
|
|
156
|
+
}, commonToolbarProps))]
|
|
157
|
+
})
|
|
182
158
|
}));
|
|
183
159
|
});
|
|
184
160
|
process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
|
|
@@ -221,7 +197,6 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
|
|
|
221
197
|
* @default "––"
|
|
222
198
|
*/
|
|
223
199
|
toolbarPlaceholder: _propTypes.default.node,
|
|
224
|
-
toolbarVariant: _propTypes.default.oneOf(['desktop', 'mobile']),
|
|
225
200
|
value: _propTypes.default.arrayOf(_propTypes.default.object).isRequired,
|
|
226
201
|
/**
|
|
227
202
|
* Currently visible picker view.
|
|
@@ -119,8 +119,7 @@ const DesktopDateTimeRangePicker = exports.DesktopDateTimeRangePicker = /*#__PUR
|
|
|
119
119
|
hidden: true
|
|
120
120
|
}, defaultizedProps.slotProps?.tabs),
|
|
121
121
|
toolbar: (0, _extends2.default)({
|
|
122
|
-
hidden: true
|
|
123
|
-
toolbarVariant: 'desktop'
|
|
122
|
+
hidden: true
|
|
124
123
|
}, defaultizedProps.slotProps?.toolbar),
|
|
125
124
|
actionBar: ownerState => (0, _extends2.default)({
|
|
126
125
|
actions: actionBarActions
|
|
@@ -121,8 +121,7 @@ const MobileDateTimeRangePicker = exports.MobileDateTimeRangePicker = /*#__PURE_
|
|
|
121
121
|
hidden: false
|
|
122
122
|
}, defaultizedProps.slotProps?.tabs),
|
|
123
123
|
toolbar: (0, _extends2.default)({
|
|
124
|
-
hidden: false
|
|
125
|
-
toolbarVariant: 'mobile'
|
|
124
|
+
hidden: false
|
|
126
125
|
}, defaultizedProps.slotProps?.toolbar)
|
|
127
126
|
})
|
|
128
127
|
});
|
package/node/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getReleaseInfo = void 0;
|
|
7
7
|
var _utils = require("@mui/utils");
|
|
8
8
|
const getReleaseInfo = () => {
|
|
9
|
-
const releaseInfo = "
|
|
9
|
+
const releaseInfo = "MTczNDU2NjQwMDAwMA==";
|
|
10
10
|
if (process.env.NODE_ENV !== 'production') {
|
|
11
11
|
// A simple hack to set the value in the test environment (has no build step).
|
|
12
12
|
// eslint-disable-next-line no-useless-concat
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-date-pickers-pro",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.5",
|
|
4
4
|
"description": "The Pro plan edition of the Date and Time Picker components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"clsx": "^2.1.1",
|
|
38
38
|
"prop-types": "^15.8.1",
|
|
39
39
|
"react-transition-group": "^4.4.5",
|
|
40
|
-
"@mui/x-date-pickers": "8.0.0-alpha.
|
|
41
|
-
"@mui/x-
|
|
42
|
-
"@mui/x-
|
|
40
|
+
"@mui/x-date-pickers": "8.0.0-alpha.5",
|
|
41
|
+
"@mui/x-license": "8.0.0-alpha.5",
|
|
42
|
+
"@mui/x-internals": "8.0.0-alpha.5"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@emotion/react": "^11.9.0",
|