@mui/x-date-pickers 8.0.0-alpha.4 → 8.0.0-alpha.6
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 +182 -0
- package/DatePicker/DatePickerToolbar.d.ts +1 -2
- package/DatePicker/DatePickerToolbar.js +6 -17
- package/DateTimePicker/DateTimePicker.types.d.ts +2 -2
- package/DateTimePicker/DateTimePickerTabs.d.ts +2 -5
- package/DateTimePicker/DateTimePickerTabs.js +6 -13
- package/DateTimePicker/DateTimePickerToolbar.d.ts +8 -4
- package/DateTimePicker/DateTimePickerToolbar.js +13 -24
- package/DateTimePicker/shared.d.ts +2 -2
- package/DesktopDatePicker/DesktopDatePicker.types.d.ts +2 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +2 -2
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.ts +1 -2
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -11
- package/DesktopTimePicker/DesktopTimePicker.types.d.ts +2 -2
- package/MobileDatePicker/MobileDatePicker.types.d.ts +2 -3
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +4 -4
- package/MobileTimePicker/MobileTimePicker.types.d.ts +4 -4
- package/MonthCalendar/MonthCalendar.d.ts +1 -1
- package/MonthCalendar/MonthCalendar.js +31 -11
- package/MonthCalendar/MonthCalendar.types.d.ts +2 -2
- package/MonthCalendar/MonthCalendarButton.d.ts +24 -0
- package/MonthCalendar/{PickersMonth.js → MonthCalendarButton.js} +20 -61
- package/MonthCalendar/index.d.ts +0 -3
- package/MonthCalendar/index.js +1 -2
- package/MonthCalendar/monthCalendarClasses.d.ts +7 -1
- package/MonthCalendar/monthCalendarClasses.js +1 -1
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -0
- package/PickersActionBar/PickersActionBar.d.ts +0 -4
- package/PickersActionBar/PickersActionBar.js +12 -13
- package/PickersLayout/PickersLayout.d.ts +2 -2
- package/PickersLayout/PickersLayout.js +1 -11
- package/PickersLayout/PickersLayout.types.d.ts +12 -14
- package/PickersLayout/usePickerLayout.d.ts +2 -2
- package/PickersLayout/usePickerLayout.js +3 -18
- package/PickersSectionList/PickersSectionList.js +21 -16
- package/PickersSectionList/PickersSectionList.types.d.ts +13 -6
- package/PickersTextField/PickersFilledInput/PickersFilledInput.d.ts +7 -0
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +34 -28
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +1 -1
- package/PickersTextField/PickersInput/PickersInput.js +20 -14
- package/PickersTextField/PickersInput/pickersInputClasses.d.ts +3 -2
- package/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
- package/PickersTextField/PickersInputBase/PickersInputBase.d.ts +3 -6
- package/PickersTextField/PickersInputBase/PickersInputBase.js +36 -37
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +1 -0
- package/PickersTextField/PickersOutlinedInput/Outline.d.ts +0 -1
- package/PickersTextField/PickersOutlinedInput/Outline.js +13 -10
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +8 -14
- package/PickersTextField/PickersTextField.js +75 -62
- package/PickersTextField/PickersTextField.types.d.ts +43 -4
- package/PickersTextField/usePickerTextFieldOwnerState.d.ts +4 -0
- package/PickersTextField/usePickerTextFieldOwnerState.js +11 -0
- package/StaticDatePicker/StaticDatePicker.types.d.ts +2 -3
- package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +2 -2
- package/StaticTimePicker/StaticTimePicker.types.d.ts +2 -2
- package/TimeClock/Clock.d.ts +4 -0
- package/TimeClock/Clock.js +9 -6
- package/TimeClock/TimeClock.js +21 -4
- package/TimePicker/TimePicker.types.d.ts +2 -2
- package/TimePicker/TimePickerToolbar.d.ts +2 -2
- package/TimePicker/TimePickerToolbar.js +6 -20
- package/YearCalendar/YearCalendar.js +46 -13
- package/YearCalendar/YearCalendar.types.d.ts +2 -2
- package/YearCalendar/YearCalendarButton.d.ts +23 -0
- package/YearCalendar/{PickersYear.js → YearCalendarButton.js} +20 -59
- package/YearCalendar/index.d.ts +0 -3
- package/YearCalendar/index.js +1 -2
- package/YearCalendar/yearCalendarClasses.d.ts +7 -1
- package/YearCalendar/yearCalendarClasses.js +1 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +2 -1
- package/hooks/usePickerActionsContext.d.ts +5 -0
- package/hooks/usePickerActionsContext.js +16 -0
- package/hooks/usePickerContext.d.ts +3 -1
- package/hooks/usePickerContext.js +0 -1
- package/index.js +1 -1
- package/internals/components/PickerProvider.d.ts +11 -6
- package/internals/components/PickerProvider.js +12 -6
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +3 -3
- package/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.types.d.ts +1 -1
- package/internals/components/PickersModalDialog.d.ts +1 -3
- package/internals/components/PickersModalDialog.js +9 -3
- package/internals/components/PickersPopper.d.ts +1 -3
- package/internals/components/PickersPopper.js +11 -6
- package/internals/components/PickersToolbar.d.ts +3 -3
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -9
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +5 -5
- package/internals/hooks/useFieldOwnerState.d.ts +1 -0
- package/internals/hooks/useFieldOwnerState.js +6 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.js +8 -7
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +5 -5
- package/internals/hooks/usePicker/usePicker.js +1 -3
- package/internals/hooks/usePicker/usePicker.types.d.ts +2 -2
- package/internals/hooks/usePicker/usePickerProvider.js +5 -4
- package/internals/hooks/usePicker/usePickerValue.js +46 -64
- package/internals/hooks/usePicker/usePickerValue.types.d.ts +38 -17
- package/internals/hooks/usePicker/usePickerViews.d.ts +15 -4
- package/internals/hooks/usePicker/usePickerViews.js +9 -7
- package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +4 -4
- package/internals/index.d.ts +4 -4
- package/internals/index.js +1 -1
- package/internals/models/props/tabs.d.ts +0 -13
- package/internals/models/props/toolbar.d.ts +1 -16
- package/models/fields.d.ts +11 -1
- package/modern/DatePicker/DatePickerToolbar.js +6 -17
- package/modern/DateTimePicker/DateTimePickerTabs.js +6 -13
- package/modern/DateTimePicker/DateTimePickerToolbar.js +13 -24
- package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -11
- package/modern/MonthCalendar/MonthCalendar.js +31 -11
- package/modern/MonthCalendar/{PickersMonth.js → MonthCalendarButton.js} +20 -61
- package/modern/MonthCalendar/index.js +1 -2
- package/modern/MonthCalendar/monthCalendarClasses.js +1 -1
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -0
- package/modern/PickersActionBar/PickersActionBar.js +12 -13
- package/modern/PickersLayout/PickersLayout.js +1 -11
- package/modern/PickersLayout/usePickerLayout.js +3 -18
- package/modern/PickersSectionList/PickersSectionList.js +21 -16
- package/modern/PickersTextField/PickersFilledInput/PickersFilledInput.js +34 -28
- package/modern/PickersTextField/PickersInput/PickersInput.js +20 -14
- package/modern/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
- package/modern/PickersTextField/PickersInputBase/PickersInputBase.js +36 -37
- package/modern/PickersTextField/PickersOutlinedInput/Outline.js +13 -10
- package/modern/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +8 -14
- package/modern/PickersTextField/PickersTextField.js +75 -62
- package/modern/PickersTextField/usePickerTextFieldOwnerState.js +11 -0
- package/modern/TimeClock/Clock.js +9 -6
- package/modern/TimeClock/TimeClock.js +21 -4
- package/modern/TimePicker/TimePickerToolbar.js +6 -20
- package/modern/YearCalendar/YearCalendar.js +46 -13
- package/modern/YearCalendar/{PickersYear.js → YearCalendarButton.js} +20 -59
- package/modern/YearCalendar/index.js +1 -2
- package/modern/YearCalendar/yearCalendarClasses.js +1 -1
- package/modern/hooks/index.js +2 -1
- package/modern/hooks/usePickerActionsContext.js +16 -0
- package/modern/hooks/usePickerContext.js +0 -1
- package/modern/index.js +1 -1
- package/modern/internals/components/PickerProvider.js +12 -6
- package/modern/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +3 -3
- package/modern/internals/components/PickersModalDialog.js +9 -3
- package/modern/internals/components/PickersPopper.js +11 -6
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -9
- package/modern/internals/hooks/useFieldOwnerState.js +6 -2
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +8 -7
- package/modern/internals/hooks/usePicker/usePicker.js +1 -3
- package/modern/internals/hooks/usePicker/usePickerProvider.js +5 -4
- package/modern/internals/hooks/usePicker/usePickerValue.js +46 -64
- package/modern/internals/hooks/usePicker/usePickerViews.js +9 -7
- package/modern/internals/index.js +1 -1
- package/node/DatePicker/DatePickerToolbar.js +6 -17
- package/node/DateTimePicker/DateTimePickerTabs.js +6 -13
- package/node/DateTimePicker/DateTimePickerToolbar.js +14 -25
- package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +1 -11
- package/node/MonthCalendar/MonthCalendar.js +31 -11
- package/node/MonthCalendar/{PickersMonth.js → MonthCalendarButton.js} +20 -61
- package/node/MonthCalendar/index.js +1 -8
- package/node/MonthCalendar/monthCalendarClasses.js +1 -1
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -0
- package/node/PickersActionBar/PickersActionBar.js +12 -13
- package/node/PickersLayout/PickersLayout.js +1 -11
- package/node/PickersLayout/usePickerLayout.js +3 -18
- package/node/PickersSectionList/PickersSectionList.js +21 -16
- package/node/PickersTextField/PickersFilledInput/PickersFilledInput.js +34 -28
- package/node/PickersTextField/PickersInput/PickersInput.js +20 -14
- package/node/PickersTextField/PickersInput/pickersInputClasses.js +1 -1
- package/node/PickersTextField/PickersInputBase/PickersInputBase.js +36 -37
- package/node/PickersTextField/PickersOutlinedInput/Outline.js +13 -10
- package/node/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +8 -14
- package/node/PickersTextField/PickersTextField.js +75 -62
- package/node/PickersTextField/usePickerTextFieldOwnerState.js +18 -0
- package/node/TimeClock/Clock.js +9 -6
- package/node/TimeClock/TimeClock.js +21 -4
- package/node/TimePicker/TimePickerToolbar.js +6 -20
- package/node/YearCalendar/YearCalendar.js +45 -12
- package/node/YearCalendar/{PickersYear.js → YearCalendarButton.js} +20 -59
- package/node/YearCalendar/index.js +1 -8
- package/node/YearCalendar/yearCalendarClasses.js +1 -1
- package/node/hooks/index.js +8 -1
- package/node/hooks/usePickerActionsContext.js +22 -0
- package/node/index.js +1 -1
- package/node/internals/components/PickerProvider.js +13 -7
- package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +3 -3
- package/node/internals/components/PickersModalDialog.js +9 -3
- package/node/internals/components/PickersPopper.js +11 -6
- package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -9
- package/node/internals/hooks/useFieldOwnerState.js +6 -2
- package/node/internals/hooks/useMobilePicker/useMobilePicker.js +8 -7
- package/node/internals/hooks/usePicker/usePicker.js +1 -3
- package/node/internals/hooks/usePicker/usePickerProvider.js +5 -4
- package/node/internals/hooks/usePicker/usePickerValue.js +46 -64
- package/node/internals/hooks/usePicker/usePickerViews.js +9 -7
- package/node/internals/index.js +2 -2
- package/package.json +3 -3
- package/themeAugmentation/components.d.ts +0 -8
- package/themeAugmentation/overrides.d.ts +2 -4
- package/themeAugmentation/props.d.ts +4 -7
- package/MonthCalendar/PickersMonth.d.ts +0 -28
- package/MonthCalendar/pickersMonthClasses.d.ts +0 -13
- package/MonthCalendar/pickersMonthClasses.js +0 -5
- package/YearCalendar/PickersYear.d.ts +0 -27
- package/YearCalendar/pickersYearClasses.d.ts +0 -13
- package/YearCalendar/pickersYearClasses.js +0 -5
- package/modern/MonthCalendar/pickersMonthClasses.js +0 -5
- package/modern/YearCalendar/pickersYearClasses.js +0 -5
- package/node/MonthCalendar/pickersMonthClasses.js +0 -12
- package/node/YearCalendar/pickersYearClasses.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,187 @@
|
|
|
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.6
|
|
9
|
+
|
|
10
|
+
_Dec 26, 2024_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🏎️ Improve Data Grid scrolling performance
|
|
15
|
+
- 🌍 Improve Dutch (nl-NL) locale on the Data Grid
|
|
16
|
+
- 🐞 Bugfixes
|
|
17
|
+
|
|
18
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
19
|
+
@JoepVerkoelen, @k-rajat19, @lauri865.
|
|
20
|
+
Following are all team members who have contributed to this release:
|
|
21
|
+
@flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @romgrk.
|
|
22
|
+
|
|
23
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### Breaking changes
|
|
28
|
+
|
|
29
|
+
- The `sanitizeFilterItemValue()` utility is not exported anymore.
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid@8.0.0-alpha.6`
|
|
32
|
+
|
|
33
|
+
- [DataGrid] Avoid subscribing to `renderContext` state in grid root for better scroll performance (#15986) @lauri865
|
|
34
|
+
- [DataGrid] Fix header filters showing clear button while empty (#15829) @k-rajat19
|
|
35
|
+
- [DataGrid] Improve test coverage of server side data source (#15942) @MBilalShafi
|
|
36
|
+
- [DataGrid] Move progress components to leaf import (#15914) @romgrk
|
|
37
|
+
- [DataGrid] Move skeleton to leaf import (#15931) @romgrk
|
|
38
|
+
- [DataGrid] Replace `forwardRef` with a shim for forward compatibility (#15955) @lauri865
|
|
39
|
+
- [l10n] Improve Dutch (nl-NL) locale (#15994) @JoepVerkoelen
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
42
|
+
|
|
43
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.6`.
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.6` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.6`, plus:
|
|
48
|
+
|
|
49
|
+
- [DataGridPremium] Fix column unpinning with row grouping (#15908) @k-rajat19
|
|
50
|
+
|
|
51
|
+
### Date and Time Pickers
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.6`
|
|
54
|
+
|
|
55
|
+
- [pickers] Use `usePickerContext()` and `usePickerActionsContext()` to get the actions in the `actionBar` slot and in internal components (#15843) @flaviendelangle
|
|
56
|
+
- [pickers] Use `usePickerContext()` to get the view-related props in the layout, toolbar and tabs slots (#15606) @flaviendelangle
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
59
|
+
|
|
60
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.6`.
|
|
61
|
+
|
|
62
|
+
### Charts
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-charts@8.0.0-alpha.6`
|
|
65
|
+
|
|
66
|
+
No changes since `@mui/x-charts@v8.0.0-alpha.5`.
|
|
67
|
+
|
|
68
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
69
|
+
|
|
70
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.6`.
|
|
71
|
+
|
|
72
|
+
### Tree View
|
|
73
|
+
|
|
74
|
+
#### `@mui/x-tree-view@8.0.0-alpha.6`
|
|
75
|
+
|
|
76
|
+
No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.5`.
|
|
77
|
+
|
|
78
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
79
|
+
|
|
80
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.6`.
|
|
81
|
+
|
|
82
|
+
### Docs
|
|
83
|
+
|
|
84
|
+
- [docs] Remove production profiler from docs build (#15959) @lauri865
|
|
85
|
+
- [code-infra] Add new `next-env.d.ts` changes (#15947) @JCQuintas
|
|
86
|
+
|
|
87
|
+
## 8.0.0-alpha.5
|
|
88
|
+
|
|
89
|
+
_Dec 19, 2024_
|
|
90
|
+
|
|
91
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
92
|
+
|
|
93
|
+
- 🌍 Improve Korean (ko-KR) locale on the Data Grid
|
|
94
|
+
- 🐞 Bugfixes
|
|
95
|
+
|
|
96
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
97
|
+
@good-jinu, @k-rajat19.
|
|
98
|
+
Following are all team members who have contributed to this release:
|
|
99
|
+
@alexfauquette, @cherniavskii, @flaviendelangle, @KenanYusuf, @LukasTy, @MBilalShafi, @romgrk.
|
|
100
|
+
|
|
101
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
102
|
+
|
|
103
|
+
### Data Grid
|
|
104
|
+
|
|
105
|
+
#### Breaking changes
|
|
106
|
+
|
|
107
|
+
- Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`.
|
|
108
|
+
|
|
109
|
+
- For `.root` element, use `slotProps.root`.
|
|
110
|
+
- For `.main` element (the one with `role="grid"`), use `slotProps.main`.
|
|
111
|
+
|
|
112
|
+
- `detailPanelExpandedRowIds` and `onDetailPanelExpandedRowIdsChange` props use a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array:
|
|
113
|
+
|
|
114
|
+
```diff
|
|
115
|
+
-detailPanelExpandedRowIds?: GridRowId[];
|
|
116
|
+
+detailPanelExpandedRowIds?: Set<GridRowId>;
|
|
117
|
+
|
|
118
|
+
-onDetailPanelExpandedRowIdsChange?: (ids: GridRowId[], details: GridCallbackDetails) => void;
|
|
119
|
+
+onDetailPanelExpandedRowIdsChange?: (ids: Set<GridRowId>, details: GridCallbackDetails) => void;
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
- `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.
|
|
123
|
+
- `gridDetailPanelExpandedRowIdsSelector` returns a [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instead of an array.
|
|
124
|
+
- `gridDetailPanelExpandedRowsHeightCacheSelector` was removed.
|
|
125
|
+
|
|
126
|
+
#### `@mui/x-data-grid@8.0.0-alpha.5`
|
|
127
|
+
|
|
128
|
+
- [DataGrid] Consider `columnGroupHeaderHeight` prop in `getTotalHeaderHeight` method (#15915) @k-rajat19
|
|
129
|
+
- [DataGrid] Fix autosizing with virtualized columns (#15116) @k-rajat19
|
|
130
|
+
- [DataGrid] Move `<Badge />` to leaf import (#15879) @romgrk
|
|
131
|
+
- [DataGrid] Move `<ListItemText />` and `<ListItemIcon />` to leaf import (#15869) @romgrk
|
|
132
|
+
- [DataGrid] Remove the Joy UI demo (#15913) @romgrk
|
|
133
|
+
- [DataGrid] Update quick filter input variant (#15909) @KenanYusuf
|
|
134
|
+
- [DataGrid] Use `slotProps` to forward props to `.main` and `.root` elements (#15870) @MBilalShafi
|
|
135
|
+
- [l10n] Improve Korean(ko-KR) locale (#15878) @good-jinu
|
|
136
|
+
|
|
137
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
138
|
+
|
|
139
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.5`, plus:
|
|
140
|
+
|
|
141
|
+
- [DataGridPro] Use `Set` for `detailPanelExpandedRowIds` (#15835) @cherniavskii
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
144
|
+
|
|
145
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.5`.
|
|
146
|
+
|
|
147
|
+
### Date and Time Pickers
|
|
148
|
+
|
|
149
|
+
#### Breaking changes
|
|
150
|
+
|
|
151
|
+
- The `<PickersMonth />` component has been moved inside the Month Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#month-calendar).
|
|
152
|
+
|
|
153
|
+
- The `<PickersYear />` component has been moved inside the Year Calendar component — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#year-calendar).
|
|
154
|
+
|
|
155
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.5`
|
|
156
|
+
|
|
157
|
+
- [pickers] Add verification to disable skipped hours in spring forward DST (#15849) @flaviendelangle
|
|
158
|
+
- [pickers] Remove `PickersMonth` and `PickersYear` from the theme and remove the `div` wrapping each button (#15806) @flaviendelangle
|
|
159
|
+
- [pickers] Use the new `ownerState` object on the `<PickersTextField />` component (#15863) @flaviendelangle
|
|
160
|
+
|
|
161
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
162
|
+
|
|
163
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.5`.
|
|
164
|
+
|
|
165
|
+
### Charts
|
|
166
|
+
|
|
167
|
+
#### `@mui/x-charts@8.0.0-alpha.5`
|
|
168
|
+
|
|
169
|
+
- [charts] Fix `<ScatterChart />` value type if `null` (#15917) @alexfauquette
|
|
170
|
+
|
|
171
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
172
|
+
|
|
173
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.5`.
|
|
174
|
+
|
|
175
|
+
### Tree View
|
|
176
|
+
|
|
177
|
+
#### `@mui/x-tree-view@8.0.0-alpha.5`
|
|
178
|
+
|
|
179
|
+
No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.4`.
|
|
180
|
+
|
|
181
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
182
|
+
|
|
183
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.5`.
|
|
184
|
+
|
|
185
|
+
### Core
|
|
186
|
+
|
|
187
|
+
- [code-infra] Remove `@mui/material-nextjs` dependency (#15925) @LukasTy
|
|
188
|
+
|
|
8
189
|
## 8.0.0-alpha.4
|
|
9
190
|
|
|
10
191
|
_Dec 13, 2024_
|
|
@@ -39,6 +220,7 @@ Following are all team members who have contributed to this release:
|
|
|
39
220
|
-const output = useGridSelector(apiRef, selector, equals)
|
|
40
221
|
+const output = useGridSelector(apiRef, selector, arguments, equals)
|
|
41
222
|
```
|
|
223
|
+
|
|
42
224
|
- The default variant for text fields and selects in the filter panel has been changed to `outlined`.
|
|
43
225
|
- The "row spanning" feature is now stable.
|
|
44
226
|
```diff
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseToolbarProps, ExportedBaseToolbarProps } from '../internals/models/props/toolbar';
|
|
3
|
-
import { DateView } from '../models';
|
|
4
3
|
import { DatePickerToolbarClasses } from './datePickerToolbarClasses';
|
|
5
4
|
import { PickerValue } from '../internals/models';
|
|
6
|
-
export interface DatePickerToolbarProps extends BaseToolbarProps<PickerValue
|
|
5
|
+
export interface DatePickerToolbarProps extends BaseToolbarProps<PickerValue>, ExportedDatePickerToolbarProps {
|
|
7
6
|
}
|
|
8
7
|
export interface ExportedDatePickerToolbarProps extends ExportedBaseToolbarProps {
|
|
9
8
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
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", "isLandscape", "onChange", "toolbarFormat", "toolbarPlaceholder", "
|
|
5
|
+
const _excluded = ["value", "isLandscape", "onChange", "toolbarFormat", "toolbarPlaceholder", "className", "classes"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
@@ -15,6 +15,7 @@ import { useUtils } from "../internals/hooks/useUtils.js";
|
|
|
15
15
|
import { getDatePickerToolbarUtilityClass } from "./datePickerToolbarClasses.js";
|
|
16
16
|
import { resolveDateFormat } from "../internals/utils/date-utils.js";
|
|
17
17
|
import { useToolbarOwnerState } from "../internals/hooks/useToolbarOwnerState.js";
|
|
18
|
+
import { usePickerContext } from "../hooks/index.js";
|
|
18
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
20
|
const useUtilityClasses = classes => {
|
|
20
21
|
const slots = {
|
|
@@ -62,12 +63,14 @@ export const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePick
|
|
|
62
63
|
isLandscape,
|
|
63
64
|
toolbarFormat,
|
|
64
65
|
toolbarPlaceholder = '––',
|
|
65
|
-
views,
|
|
66
66
|
className,
|
|
67
67
|
classes: classesProp
|
|
68
68
|
} = props,
|
|
69
69
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
70
70
|
const utils = useUtils();
|
|
71
|
+
const {
|
|
72
|
+
views
|
|
73
|
+
} = usePickerContext();
|
|
71
74
|
const translations = usePickerTranslations();
|
|
72
75
|
const ownerState = useToolbarOwnerState();
|
|
73
76
|
const classes = useUtilityClasses(classesProp);
|
|
@@ -113,12 +116,6 @@ process.env.NODE_ENV !== "production" ? DatePickerToolbar.propTypes = {
|
|
|
113
116
|
hidden: PropTypes.bool,
|
|
114
117
|
isLandscape: PropTypes.bool.isRequired,
|
|
115
118
|
onChange: PropTypes.func.isRequired,
|
|
116
|
-
/**
|
|
117
|
-
* Callback called when a toolbar is clicked
|
|
118
|
-
* @template TView
|
|
119
|
-
* @param {TView} view The view to open
|
|
120
|
-
*/
|
|
121
|
-
onViewChange: PropTypes.func.isRequired,
|
|
122
119
|
/**
|
|
123
120
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
124
121
|
*/
|
|
@@ -133,13 +130,5 @@ process.env.NODE_ENV !== "production" ? DatePickerToolbar.propTypes = {
|
|
|
133
130
|
* @default "––"
|
|
134
131
|
*/
|
|
135
132
|
toolbarPlaceholder: PropTypes.node,
|
|
136
|
-
value: PropTypes.object
|
|
137
|
-
/**
|
|
138
|
-
* Currently visible picker view.
|
|
139
|
-
*/
|
|
140
|
-
view: PropTypes.oneOf(['day', 'month', 'year']).isRequired,
|
|
141
|
-
/**
|
|
142
|
-
* Available views.
|
|
143
|
-
*/
|
|
144
|
-
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired).isRequired
|
|
133
|
+
value: PropTypes.object
|
|
145
134
|
} : void 0;
|
|
@@ -4,9 +4,9 @@ import { MobileDateTimePickerProps, MobileDateTimePickerSlots, MobileDateTimePic
|
|
|
4
4
|
import { DateTimeValidationError } from '../models';
|
|
5
5
|
import { ValidateDateTimeProps } from '../validation';
|
|
6
6
|
import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types';
|
|
7
|
-
export interface DateTimePickerSlots extends DesktopDateTimePickerSlots, MobileDateTimePickerSlots
|
|
7
|
+
export interface DateTimePickerSlots extends DesktopDateTimePickerSlots, MobileDateTimePickerSlots {
|
|
8
8
|
}
|
|
9
|
-
export interface DateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends DesktopDateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure>, MobileDateTimePickerSlotProps<
|
|
9
|
+
export interface DateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends DesktopDateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure>, MobileDateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure> {
|
|
10
10
|
}
|
|
11
11
|
export interface DateTimePickerProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends DesktopDateTimePickerProps<TEnableAccessibleFieldDOMStructure>, ExportedYearCalendarProps, Omit<MobileDateTimePickerProps<DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure>, 'views'> {
|
|
12
12
|
/**
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DateOrTimeViewWithMeridiem } from '../internals/models';
|
|
3
2
|
import { DateTimePickerTabsClasses } from './dateTimePickerTabsClasses';
|
|
4
|
-
import {
|
|
5
|
-
export interface
|
|
3
|
+
import { ExportedBaseTabsProps } from '../internals/models/props/tabs';
|
|
4
|
+
export interface DateTimePickerTabsProps extends ExportedBaseTabsProps {
|
|
6
5
|
/**
|
|
7
6
|
* Toggles visibility of the tabs allowing view switching.
|
|
8
7
|
* @default `window.innerHeight < 667` for `DesktopDateTimePicker` and `MobileDateTimePicker`, `displayStaticWrapperAs === 'desktop'` for `StaticDateTimePicker`
|
|
@@ -23,8 +22,6 @@ export interface ExportedDateTimePickerTabsProps extends ExportedBaseTabsProps {
|
|
|
23
22
|
*/
|
|
24
23
|
classes?: Partial<DateTimePickerTabsClasses>;
|
|
25
24
|
}
|
|
26
|
-
export interface DateTimePickerTabsProps extends ExportedDateTimePickerTabsProps, BaseTabsProps<DateOrTimeViewWithMeridiem> {
|
|
27
|
-
}
|
|
28
25
|
/**
|
|
29
26
|
* Demos:
|
|
30
27
|
*
|
|
@@ -12,6 +12,7 @@ import { usePickerTranslations } from "../hooks/usePickerTranslations.js";
|
|
|
12
12
|
import { getDateTimePickerTabsUtilityClass } from "./dateTimePickerTabsClasses.js";
|
|
13
13
|
import { isDatePickerView } from "../internals/utils/date-utils.js";
|
|
14
14
|
import { usePickerPrivateContext } from "../internals/hooks/usePickerPrivateContext.js";
|
|
15
|
+
import { usePickerContext } from "../hooks/index.js";
|
|
15
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
17
|
const viewToTab = view => {
|
|
17
18
|
if (isDatePickerView(view)) {
|
|
@@ -65,9 +66,7 @@ const DateTimePickerTabs = function DateTimePickerTabs(inProps) {
|
|
|
65
66
|
});
|
|
66
67
|
const {
|
|
67
68
|
dateIcon = /*#__PURE__*/_jsx(DateRangeIcon, {}),
|
|
68
|
-
onViewChange,
|
|
69
69
|
timeIcon = /*#__PURE__*/_jsx(TimeIcon, {}),
|
|
70
|
-
view,
|
|
71
70
|
hidden = typeof window === 'undefined' || window.innerHeight < 667,
|
|
72
71
|
className,
|
|
73
72
|
classes: classesProp,
|
|
@@ -77,6 +76,10 @@ const DateTimePickerTabs = function DateTimePickerTabs(inProps) {
|
|
|
77
76
|
const {
|
|
78
77
|
ownerState
|
|
79
78
|
} = usePickerPrivateContext();
|
|
79
|
+
const {
|
|
80
|
+
view,
|
|
81
|
+
onViewChange
|
|
82
|
+
} = usePickerContext();
|
|
80
83
|
const classes = useUtilityClasses(classesProp);
|
|
81
84
|
const handleChange = (event, value) => {
|
|
82
85
|
onViewChange(tabToView(value));
|
|
@@ -126,12 +129,6 @@ process.env.NODE_ENV !== "production" ? DateTimePickerTabs.propTypes = {
|
|
|
126
129
|
* @default `window.innerHeight < 667` for `DesktopDateTimePicker` and `MobileDateTimePicker`, `displayStaticWrapperAs === 'desktop'` for `StaticDateTimePicker`
|
|
127
130
|
*/
|
|
128
131
|
hidden: PropTypes.bool,
|
|
129
|
-
/**
|
|
130
|
-
* Callback called when a tab is clicked.
|
|
131
|
-
* @template TView
|
|
132
|
-
* @param {TView} view The view to open
|
|
133
|
-
*/
|
|
134
|
-
onViewChange: PropTypes.func.isRequired,
|
|
135
132
|
/**
|
|
136
133
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
137
134
|
*/
|
|
@@ -140,10 +137,6 @@ process.env.NODE_ENV !== "production" ? DateTimePickerTabs.propTypes = {
|
|
|
140
137
|
* Time tab icon.
|
|
141
138
|
* @default Time
|
|
142
139
|
*/
|
|
143
|
-
timeIcon: PropTypes.node
|
|
144
|
-
/**
|
|
145
|
-
* Currently visible picker view.
|
|
146
|
-
*/
|
|
147
|
-
view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']).isRequired
|
|
140
|
+
timeIcon: PropTypes.node
|
|
148
141
|
} : void 0;
|
|
149
142
|
export { DateTimePickerTabs };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { MakeOptional } from '@mui/x-internals/types';
|
|
3
2
|
import { BaseToolbarProps, ExportedBaseToolbarProps } from '../internals/models/props/toolbar';
|
|
4
3
|
import { DateTimePickerToolbarClasses } from './dateTimePickerToolbarClasses';
|
|
5
4
|
import { DateOrTimeViewWithMeridiem, PickerValue } from '../internals/models';
|
|
@@ -9,7 +8,7 @@ export interface ExportedDateTimePickerToolbarProps extends ExportedBaseToolbarP
|
|
|
9
8
|
*/
|
|
10
9
|
classes?: Partial<DateTimePickerToolbarClasses>;
|
|
11
10
|
}
|
|
12
|
-
export interface DateTimePickerToolbarProps extends ExportedDateTimePickerToolbarProps,
|
|
11
|
+
export interface DateTimePickerToolbarProps extends ExportedDateTimePickerToolbarProps, BaseToolbarProps<PickerValue> {
|
|
13
12
|
/**
|
|
14
13
|
* If provided, it will be used instead of `dateTimePickerToolbarTitle` from localization.
|
|
15
14
|
*/
|
|
@@ -18,10 +17,15 @@ export interface DateTimePickerToolbarProps extends ExportedDateTimePickerToolba
|
|
|
18
17
|
ampmInClock?: boolean;
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
21
|
-
* If
|
|
20
|
+
* If `forceDesktopVariant` is set to `true`, the toolbar will always be rendered in the desktop mode.
|
|
21
|
+
* If `onViewChange` is defined, the toolbar will call it instead of calling the default handler from `usePickerContext`.
|
|
22
22
|
* This is used by the Date Time Range Picker Toolbar.
|
|
23
23
|
*/
|
|
24
|
-
export declare const
|
|
24
|
+
export declare const DateTimePickerToolbarOverrideContext: React.Context<{
|
|
25
|
+
forceDesktopVariant: boolean;
|
|
26
|
+
onViewChange: (view: DateOrTimeViewWithMeridiem) => void;
|
|
27
|
+
view: DateOrTimeViewWithMeridiem | null;
|
|
28
|
+
} | null>;
|
|
25
29
|
/**
|
|
26
30
|
* Demos:
|
|
27
31
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
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 = ["ampm", "ampmInClock", "value", "onChange", "
|
|
5
|
+
const _excluded = ["ampm", "ampmInClock", "value", "onChange", "isLandscape", "toolbarFormat", "toolbarPlaceholder", "toolbarTitle", "className", "classes"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
@@ -206,10 +206,11 @@ const DateTimePickerToolbarAmPmSelection = styled('div', {
|
|
|
206
206
|
});
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
* If
|
|
209
|
+
* If `forceDesktopVariant` is set to `true`, the toolbar will always be rendered in the desktop mode.
|
|
210
|
+
* If `onViewChange` is defined, the toolbar will call it instead of calling the default handler from `usePickerContext`.
|
|
210
211
|
* This is used by the Date Time Range Picker Toolbar.
|
|
211
212
|
*/
|
|
212
|
-
export const
|
|
213
|
+
export const DateTimePickerToolbarOverrideContext = /*#__PURE__*/React.createContext(null);
|
|
213
214
|
|
|
214
215
|
/**
|
|
215
216
|
* Demos:
|
|
@@ -231,12 +232,9 @@ function DateTimePickerToolbar(inProps) {
|
|
|
231
232
|
ampmInClock,
|
|
232
233
|
value,
|
|
233
234
|
onChange,
|
|
234
|
-
view,
|
|
235
235
|
isLandscape,
|
|
236
|
-
onViewChange,
|
|
237
236
|
toolbarFormat,
|
|
238
237
|
toolbarPlaceholder = '––',
|
|
239
|
-
views,
|
|
240
238
|
toolbarTitle: inToolbarTitle,
|
|
241
239
|
className,
|
|
242
240
|
classes: classesProp
|
|
@@ -245,7 +243,10 @@ function DateTimePickerToolbar(inProps) {
|
|
|
245
243
|
const {
|
|
246
244
|
disabled,
|
|
247
245
|
readOnly,
|
|
248
|
-
variant
|
|
246
|
+
variant,
|
|
247
|
+
view: viewCtx,
|
|
248
|
+
onViewChange: onViewChangeCtx,
|
|
249
|
+
views
|
|
249
250
|
} = usePickerContext();
|
|
250
251
|
const ownerState = useToolbarOwnerState();
|
|
251
252
|
const classes = useUtilityClasses(classesProp, ownerState);
|
|
@@ -255,11 +256,13 @@ function DateTimePickerToolbar(inProps) {
|
|
|
255
256
|
handleMeridiemChange
|
|
256
257
|
} = useMeridiemMode(value, ampm, onChange);
|
|
257
258
|
const translations = usePickerTranslations();
|
|
258
|
-
const
|
|
259
|
-
const toolbarVariant = forceDesktopVariant ? 'desktop' : variant;
|
|
259
|
+
const overrides = React.useContext(DateTimePickerToolbarOverrideContext);
|
|
260
|
+
const toolbarVariant = overrides?.forceDesktopVariant ? 'desktop' : variant;
|
|
260
261
|
const isDesktop = toolbarVariant === 'desktop';
|
|
261
262
|
const showAmPmControl = Boolean(ampm && !ampmInClock);
|
|
262
263
|
const toolbarTitle = inToolbarTitle ?? translations.dateTimePickerToolbarTitle;
|
|
264
|
+
const view = overrides ? overrides.view : viewCtx;
|
|
265
|
+
const onViewChange = overrides ? overrides.onViewChange : onViewChangeCtx;
|
|
263
266
|
const formatHours = time => ampm ? utils.format(time, 'hours12h') : utils.format(time, 'hours24h');
|
|
264
267
|
const dateText = React.useMemo(() => {
|
|
265
268
|
if (!value) {
|
|
@@ -384,12 +387,6 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
|
|
|
384
387
|
hidden: PropTypes.bool,
|
|
385
388
|
isLandscape: PropTypes.bool.isRequired,
|
|
386
389
|
onChange: PropTypes.func.isRequired,
|
|
387
|
-
/**
|
|
388
|
-
* Callback called when a toolbar is clicked
|
|
389
|
-
* @template TView
|
|
390
|
-
* @param {TView} view The view to open
|
|
391
|
-
*/
|
|
392
|
-
onViewChange: PropTypes.func.isRequired,
|
|
393
390
|
/**
|
|
394
391
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
395
392
|
*/
|
|
@@ -408,14 +405,6 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
|
|
|
408
405
|
* If provided, it will be used instead of `dateTimePickerToolbarTitle` from localization.
|
|
409
406
|
*/
|
|
410
407
|
toolbarTitle: PropTypes.node,
|
|
411
|
-
value: PropTypes.object
|
|
412
|
-
/**
|
|
413
|
-
* Currently visible picker view.
|
|
414
|
-
*/
|
|
415
|
-
view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']),
|
|
416
|
-
/**
|
|
417
|
-
* Available views.
|
|
418
|
-
*/
|
|
419
|
-
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']).isRequired).isRequired
|
|
408
|
+
value: PropTypes.object
|
|
420
409
|
} : void 0;
|
|
421
410
|
export { DateTimePickerToolbar };
|
|
@@ -4,7 +4,7 @@ import { DateTimeValidationError } from '../models';
|
|
|
4
4
|
import { DateCalendarSlots, DateCalendarSlotProps, ExportedDateCalendarProps } from '../DateCalendar/DateCalendar.types';
|
|
5
5
|
import { TimeClockSlots, TimeClockSlotProps } from '../TimeClock/TimeClock.types';
|
|
6
6
|
import { BasePickerInputProps } from '../internals/models/props/basePickerProps';
|
|
7
|
-
import { DateTimePickerTabsProps
|
|
7
|
+
import { DateTimePickerTabsProps } from './DateTimePickerTabs';
|
|
8
8
|
import { LocalizedComponent } from '../locales/utils/pickersLocaleTextApi';
|
|
9
9
|
import { DateTimePickerToolbarProps, ExportedDateTimePickerToolbarProps } from './DateTimePickerToolbar';
|
|
10
10
|
import { PickerViewRendererLookup } from '../internals/hooks/usePicker/usePickerViews';
|
|
@@ -29,7 +29,7 @@ export interface BaseDateTimePickerSlotProps extends DateCalendarSlotProps, Time
|
|
|
29
29
|
/**
|
|
30
30
|
* Props passed down to the tabs component.
|
|
31
31
|
*/
|
|
32
|
-
tabs?:
|
|
32
|
+
tabs?: DateTimePickerTabsProps;
|
|
33
33
|
/**
|
|
34
34
|
* Props passed down to the toolbar component.
|
|
35
35
|
*/
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { MakeOptional } from '@mui/x-internals/types';
|
|
2
2
|
import { UseDesktopPickerSlots, ExportedUseDesktopPickerSlotProps, DesktopOnlyPickerProps } from '../internals/hooks/useDesktopPicker';
|
|
3
3
|
import { BaseDatePickerProps, BaseDatePickerSlots, BaseDatePickerSlotProps } from '../DatePicker/shared';
|
|
4
|
-
import { DateView } from '../models';
|
|
5
4
|
import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types';
|
|
6
|
-
export interface DesktopDatePickerSlots extends BaseDatePickerSlots, MakeOptional<UseDesktopPickerSlots
|
|
5
|
+
export interface DesktopDatePickerSlots extends BaseDatePickerSlots, MakeOptional<UseDesktopPickerSlots, 'field' | 'openPickerIcon'> {
|
|
7
6
|
}
|
|
8
|
-
export interface DesktopDatePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDatePickerSlotProps, ExportedUseDesktopPickerSlotProps<
|
|
7
|
+
export interface DesktopDatePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDatePickerSlotProps, ExportedUseDesktopPickerSlotProps<TEnableAccessibleFieldDOMStructure> {
|
|
9
8
|
}
|
|
10
9
|
export interface DesktopDatePickerProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends BaseDatePickerProps, DesktopOnlyPickerProps, ExportedYearCalendarProps {
|
|
11
10
|
/**
|
|
@@ -7,9 +7,9 @@ import { DateOrTimeViewWithMeridiem } from '../internals/models';
|
|
|
7
7
|
import { MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from '../MultiSectionDigitalClock';
|
|
8
8
|
import { DigitalClockSlots, DigitalClockSlotProps } from '../DigitalClock';
|
|
9
9
|
import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types';
|
|
10
|
-
export interface DesktopDateTimePickerSlots extends BaseDateTimePickerSlots, MakeOptional<UseDesktopPickerSlots
|
|
10
|
+
export interface DesktopDateTimePickerSlots extends BaseDateTimePickerSlots, MakeOptional<UseDesktopPickerSlots, 'field' | 'openPickerIcon'>, DigitalClockSlots, MultiSectionDigitalClockSlots {
|
|
11
11
|
}
|
|
12
|
-
export interface DesktopDateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateTimePickerSlotProps, ExportedUseDesktopPickerSlotProps<
|
|
12
|
+
export interface DesktopDateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateTimePickerSlotProps, ExportedUseDesktopPickerSlotProps<TEnableAccessibleFieldDOMStructure>, DigitalClockSlotProps, MultiSectionDigitalClockSlotProps {
|
|
13
13
|
}
|
|
14
14
|
export interface DesktopDateTimePickerProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends BaseDateTimePickerProps<DateOrTimeViewWithMeridiem>, DesktopOnlyPickerProps, DesktopOnlyTimePickerProps, ExportedYearCalendarProps {
|
|
15
15
|
/**
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PickersLayoutProps } from '../PickersLayout';
|
|
3
|
-
import { DateOrTimeViewWithMeridiem } from '../internals/models/common';
|
|
4
3
|
import { PickerValidValue } from '../internals/models';
|
|
5
|
-
type DesktopDateTimePickerLayoutComponent = (<TValue extends PickerValidValue
|
|
4
|
+
type DesktopDateTimePickerLayoutComponent = (<TValue extends PickerValidValue>(props: PickersLayoutProps<TValue> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
6
5
|
propTypes?: any;
|
|
7
6
|
};
|
|
8
7
|
/**
|
|
@@ -66,16 +66,8 @@ process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes =
|
|
|
66
66
|
classes: PropTypes.object,
|
|
67
67
|
className: PropTypes.string,
|
|
68
68
|
isValid: PropTypes.func.isRequired,
|
|
69
|
-
onAccept: PropTypes.func.isRequired,
|
|
70
|
-
onCancel: PropTypes.func.isRequired,
|
|
71
69
|
onChange: PropTypes.func.isRequired,
|
|
72
|
-
onClear: PropTypes.func.isRequired,
|
|
73
|
-
onClose: PropTypes.func.isRequired,
|
|
74
|
-
onDismiss: PropTypes.func.isRequired,
|
|
75
|
-
onOpen: PropTypes.func.isRequired,
|
|
76
70
|
onSelectShortcut: PropTypes.func.isRequired,
|
|
77
|
-
onSetToday: PropTypes.func.isRequired,
|
|
78
|
-
onViewChange: PropTypes.func.isRequired,
|
|
79
71
|
/**
|
|
80
72
|
* The props used for each component slot.
|
|
81
73
|
* @default {}
|
|
@@ -90,8 +82,6 @@ process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes =
|
|
|
90
82
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
91
83
|
*/
|
|
92
84
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
93
|
-
value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
|
|
94
|
-
view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']),
|
|
95
|
-
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']).isRequired).isRequired
|
|
85
|
+
value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
|
|
96
86
|
} : void 0;
|
|
97
87
|
export { DesktopDateTimePickerLayout };
|
|
@@ -6,9 +6,9 @@ import { DesktopOnlyTimePickerProps } from '../internals/models/props/time';
|
|
|
6
6
|
import { DigitalClockSlots, DigitalClockSlotProps } from '../DigitalClock';
|
|
7
7
|
import { MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from '../MultiSectionDigitalClock';
|
|
8
8
|
import { TimeView } from '../models';
|
|
9
|
-
export interface DesktopTimePickerSlots extends BaseTimePickerSlots, MakeOptional<UseDesktopPickerSlots
|
|
9
|
+
export interface DesktopTimePickerSlots extends BaseTimePickerSlots, MakeOptional<UseDesktopPickerSlots, 'field' | 'openPickerIcon'>, DigitalClockSlots, MultiSectionDigitalClockSlots {
|
|
10
10
|
}
|
|
11
|
-
export interface DesktopTimePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseTimePickerSlotProps, ExportedUseDesktopPickerSlotProps<
|
|
11
|
+
export interface DesktopTimePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseTimePickerSlotProps, ExportedUseDesktopPickerSlotProps<TEnableAccessibleFieldDOMStructure>, DigitalClockSlotProps, MultiSectionDigitalClockSlotProps {
|
|
12
12
|
}
|
|
13
13
|
export interface DesktopTimePickerProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends BaseTimePickerProps<TimeViewWithMeridiem>, DesktopOnlyPickerProps, DesktopOnlyTimePickerProps {
|
|
14
14
|
/**
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { MakeOptional } from '@mui/x-internals/types';
|
|
2
2
|
import { UseMobilePickerSlots, MobileOnlyPickerProps, ExportedUseMobilePickerSlotProps } from '../internals/hooks/useMobilePicker';
|
|
3
3
|
import { BaseDatePickerProps, BaseDatePickerSlots, BaseDatePickerSlotProps } from '../DatePicker/shared';
|
|
4
|
-
|
|
5
|
-
export interface MobileDatePickerSlots extends BaseDatePickerSlots, MakeOptional<UseMobilePickerSlots<DateView>, 'field'> {
|
|
4
|
+
export interface MobileDatePickerSlots extends BaseDatePickerSlots, MakeOptional<UseMobilePickerSlots, 'field'> {
|
|
6
5
|
}
|
|
7
|
-
export interface MobileDatePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDatePickerSlotProps, ExportedUseMobilePickerSlotProps<
|
|
6
|
+
export interface MobileDatePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDatePickerSlotProps, ExportedUseMobilePickerSlotProps<TEnableAccessibleFieldDOMStructure> {
|
|
8
7
|
}
|
|
9
8
|
export interface MobileDatePickerProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends BaseDatePickerProps, MobileOnlyPickerProps {
|
|
10
9
|
/**
|
|
@@ -3,19 +3,19 @@ import { UseMobilePickerSlots, ExportedUseMobilePickerSlotProps, MobileOnlyPicke
|
|
|
3
3
|
import { BaseDateTimePickerProps, BaseDateTimePickerSlots, BaseDateTimePickerSlotProps } from '../DateTimePicker/shared';
|
|
4
4
|
import { DateOrTimeView } from '../models';
|
|
5
5
|
import { DateOrTimeViewWithMeridiem } from '../internals/models';
|
|
6
|
-
export interface MobileDateTimePickerSlots
|
|
6
|
+
export interface MobileDateTimePickerSlots extends BaseDateTimePickerSlots, MakeOptional<UseMobilePickerSlots, 'field'> {
|
|
7
7
|
}
|
|
8
|
-
export interface MobileDateTimePickerSlotProps<
|
|
8
|
+
export interface MobileDateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateTimePickerSlotProps, ExportedUseMobilePickerSlotProps<TEnableAccessibleFieldDOMStructure> {
|
|
9
9
|
}
|
|
10
10
|
export interface MobileDateTimePickerProps<TView extends DateOrTimeViewWithMeridiem = DateOrTimeView, TEnableAccessibleFieldDOMStructure extends boolean = true> extends BaseDateTimePickerProps<TView>, MobileOnlyPickerProps {
|
|
11
11
|
/**
|
|
12
12
|
* Overridable component slots.
|
|
13
13
|
* @default {}
|
|
14
14
|
*/
|
|
15
|
-
slots?: MobileDateTimePickerSlots
|
|
15
|
+
slots?: MobileDateTimePickerSlots;
|
|
16
16
|
/**
|
|
17
17
|
* The props used for each component slot.
|
|
18
18
|
* @default {}
|
|
19
19
|
*/
|
|
20
|
-
slotProps?: MobileDateTimePickerSlotProps<
|
|
20
|
+
slotProps?: MobileDateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure>;
|
|
21
21
|
}
|
|
@@ -3,19 +3,19 @@ import { UseMobilePickerSlots, ExportedUseMobilePickerSlotProps, MobileOnlyPicke
|
|
|
3
3
|
import { BaseTimePickerProps, BaseTimePickerSlots, BaseTimePickerSlotProps } from '../TimePicker/shared';
|
|
4
4
|
import { TimeView } from '../models';
|
|
5
5
|
import { TimeViewWithMeridiem } from '../internals/models';
|
|
6
|
-
export interface MobileTimePickerSlots
|
|
6
|
+
export interface MobileTimePickerSlots extends BaseTimePickerSlots, MakeOptional<UseMobilePickerSlots, 'field'> {
|
|
7
7
|
}
|
|
8
|
-
export interface MobileTimePickerSlotProps<
|
|
8
|
+
export interface MobileTimePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseTimePickerSlotProps, ExportedUseMobilePickerSlotProps<TEnableAccessibleFieldDOMStructure> {
|
|
9
9
|
}
|
|
10
10
|
export interface MobileTimePickerProps<TView extends TimeViewWithMeridiem = TimeView, TEnableAccessibleFieldDOMStructure extends boolean = true> extends BaseTimePickerProps<TView>, MobileOnlyPickerProps {
|
|
11
11
|
/**
|
|
12
12
|
* Overridable component slots.
|
|
13
13
|
* @default {}
|
|
14
14
|
*/
|
|
15
|
-
slots?: MobileTimePickerSlots
|
|
15
|
+
slots?: MobileTimePickerSlots;
|
|
16
16
|
/**
|
|
17
17
|
* The props used for each component slot.
|
|
18
18
|
* @default {}
|
|
19
19
|
*/
|
|
20
|
-
slotProps?: MobileTimePickerSlotProps<
|
|
20
|
+
slotProps?: MobileTimePickerSlotProps<TEnableAccessibleFieldDOMStructure>;
|
|
21
21
|
}
|