@mui/x-date-pickers-pro 7.9.0 → 7.11.0
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 +159 -0
- package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +3 -1
- package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +3 -1
- package/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +17 -14
- package/index.js +1 -1
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +1 -1
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +1 -1
- package/internals/utils/releaseInfo.js +1 -1
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +3 -1
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +3 -1
- package/modern/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +17 -14
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +1 -1
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +1 -1
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +2 -0
- package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -0
- package/node/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +17 -14
- package/node/index.js +1 -1
- package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +1 -1
- package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,165 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.11.0
|
|
7
|
+
|
|
8
|
+
_Jul 18, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎨 Add [color legend](https://mui.com/x/react-charts/legend/#color-legend) for charts (#13700) @alexfauquette
|
|
13
|
+
- 🌍 Improve Korean (ko-KR) locale on the Date and Time Pickers
|
|
14
|
+
- 🌍 Improve Russian (ru-RU) locale on the Date and Time Pickers and Data Grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
|
|
18
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid@7.11.0`
|
|
23
|
+
|
|
24
|
+
- [DataGrid] Expose `gridEditRowsStateSelector` (#13877) @romgrk
|
|
25
|
+
- [DataGrid] Fix `columnResizeStop` event not emitted when column is not resized (#13307) @mateuseap
|
|
26
|
+
- [DataGrid] Fix delete filter inconsistent behavior (#13353) @oukunan
|
|
27
|
+
- [DataGrid] Enable flip on preferences panel (#13803) @romgrk
|
|
28
|
+
- [DataGrid] Support `date` and `datetime-local` input types in `GridFilterInputMultipleValue` type (#13411) @karudedios
|
|
29
|
+
- [l10n] Improve Russian (ru-RU) locale (#13735) @diro-atk
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@7.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@7.11.0`.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@7.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid-pro@7.11.0`.
|
|
38
|
+
|
|
39
|
+
### Date and Time Pickers
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-date-pickers@7.11.0`
|
|
42
|
+
|
|
43
|
+
- [l10n] Improve Korean (ko-KR) locale (#13651) @100pearlcent
|
|
44
|
+
- [l10n] Improve Russian (ru-RU) locale (#13871) @Inv1x
|
|
45
|
+
- [pickers] Add more conformance tests improving API docs precision (#13800) @LukasTy
|
|
46
|
+
- [TimePicker] Add `Mui-selected` class to `TimeClock` meridiem buttons (#13848) @LukasTy
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers-pro@7.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-date-pickers@7.11.0`, plus:
|
|
51
|
+
|
|
52
|
+
- [DateRangePicker] Fix `name` prop propagation regression (#13821) @LukasTy
|
|
53
|
+
|
|
54
|
+
### Charts
|
|
55
|
+
|
|
56
|
+
#### `@mui/x-charts@7.11.0`
|
|
57
|
+
|
|
58
|
+
- [charts] Create color legend (#13700) @alexfauquette
|
|
59
|
+
- [charts] Defaultize axis on top level `useChartContainerProps` (#13817) @JCQuintas
|
|
60
|
+
- [charts] Fix charts not passing `className` to root element (#13647) @JCQuintas
|
|
61
|
+
- [charts] Generate API documentation for pro components (#13822) @alexfauquette
|
|
62
|
+
- [charts] Improve zoomed highlight behaviour (unreleased) (#13868) @JCQuintas
|
|
63
|
+
- [charts] Allow zoom on Y axis and add zoom options to configure zooming behaviour (unreleased) (#13726) @JCQuintas
|
|
64
|
+
- [charts] Disable animations while zooming (unreleased) (#13807) @JCQuintas
|
|
65
|
+
|
|
66
|
+
### Tree View
|
|
67
|
+
|
|
68
|
+
#### `@mui/x-tree-view@7.11.0`
|
|
69
|
+
|
|
70
|
+
- [TreeView] Extract some logic outside of the `useTreeView` hook (#13845) @flaviendelangle
|
|
71
|
+
|
|
72
|
+
### Docs
|
|
73
|
+
|
|
74
|
+
- [docs] Add warning about `process.env.NODE_ENV` in production (#13869) @cherniavskii
|
|
75
|
+
- [docs] Allow controlling the demo form from the example (#13796) @JCQuintas
|
|
76
|
+
- [docs] Clarify Pickers clearable behavior not working on mobile (#13786) @lnhrdt
|
|
77
|
+
- [docs] Improve the documentation of the picker's `onChange` and `onAccept` props (#13543) @flaviendelangle
|
|
78
|
+
- [docs] Replace company name with project name @oliviertassinari
|
|
79
|
+
- [docs] Sort Pickers & Charts API slots alphabetically (#13843) @LukasTy
|
|
80
|
+
|
|
81
|
+
### Core
|
|
82
|
+
|
|
83
|
+
- [core] Add MUI Internal `renovate` group (#13846) @LukasTy
|
|
84
|
+
- [core] Link GitHub issue for `import/prefer-default-export` rule @oliviertassinari
|
|
85
|
+
- [core] Normalize `...other` and test imports in charts (#13844) @JCQuintas
|
|
86
|
+
- [core] Normalize rest / other to match the most common used @oliviertassinari
|
|
87
|
+
- [code-infra] Follow `next` tag for `@mui/docs` package bumps (#13813) @LukasTy
|
|
88
|
+
- [code-infra] Use specific version for `@mui/docs` dependency (#13760) @LukasTy
|
|
89
|
+
- [internals] Move `EventManager` to `@mui/x-internals` package (#13815) @flaviendelangle
|
|
90
|
+
|
|
91
|
+
## 7.10.0
|
|
92
|
+
|
|
93
|
+
_Jul 11, 2024_
|
|
94
|
+
|
|
95
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
96
|
+
|
|
97
|
+
- 🎁 Add selectors to support showing child row count in footer in the Data Grid
|
|
98
|
+
- ✨ New APIs for retrieving current item tree and item's children IDs in the Tree View
|
|
99
|
+
- 🌍 Improve Spanish (es-ES) locale on the Data Grid
|
|
100
|
+
- 🐞 Bugfixes
|
|
101
|
+
- 📚 Documentation improvements
|
|
102
|
+
|
|
103
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
104
|
+
|
|
105
|
+
### Data Grid
|
|
106
|
+
|
|
107
|
+
#### `@mui/x-data-grid@7.10.0`
|
|
108
|
+
|
|
109
|
+
- [DataGrid] Add selectors to support showing child row count in footer (#13725) @KenanYusuf
|
|
110
|
+
- [DataGrid] Fix incorrect panels position when using a toolbar (#13474) @oukunan
|
|
111
|
+
- [DataGrid] Set default variant to `'standard'` in `GridFilterInputMultipleValue` (#13129) @tarunrajput
|
|
112
|
+
- [DataGrid] Use `readonly` on more array props (#13331) @pcorpet
|
|
113
|
+
- [l10n] Improve Spanish (es-ES) locale (#13772) @joserealdev
|
|
114
|
+
|
|
115
|
+
#### `@mui/x-data-grid-pro@7.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
116
|
+
|
|
117
|
+
Same changes as in `@mui/x-data-grid@7.10.0`, plus:
|
|
118
|
+
|
|
119
|
+
- [DataGridPro] Keep bottom pinned row at the bottom (#13313) @romgrk
|
|
120
|
+
|
|
121
|
+
#### `@mui/x-data-grid-premium@7.10.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
122
|
+
|
|
123
|
+
Same changes as in `@mui/x-data-grid-pro@7.10.0`.
|
|
124
|
+
|
|
125
|
+
### Date and Time Pickers
|
|
126
|
+
|
|
127
|
+
#### `@mui/x-date-pickers@7.10.0`
|
|
128
|
+
|
|
129
|
+
- [fields] Prevent infinite recursion when ensuring selection (#13779) @LukasTy
|
|
130
|
+
- [fields] Unify fields behavior regardless of the `readOnly` flag (#13688) @LukasTy
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-date-pickers-pro@7.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
133
|
+
|
|
134
|
+
Same changes as in `@mui/x-date-pickers@7.10.0`, plus:
|
|
135
|
+
|
|
136
|
+
- [DateRangePicker] Fix `calendarHeader` slot props propagation (#13780) @LukasTy
|
|
137
|
+
- [DateTimeRangePicker] Resolve `format` from given `views` (#13743) @LukasTy
|
|
138
|
+
|
|
139
|
+
### Charts
|
|
140
|
+
|
|
141
|
+
#### `@mui/x-charts@7.10.0`
|
|
142
|
+
|
|
143
|
+
- [charts] Fix displaying area of a `LineChart` when using the `log` scale (#13791) @alexfauquette
|
|
144
|
+
- [charts] Use correct click handler prop on pie chart `OnSeriesItemClick` documentation (#13761) @tonyhallett
|
|
145
|
+
|
|
146
|
+
### Tree View
|
|
147
|
+
|
|
148
|
+
#### `@mui/x-tree-view@7.10.0`
|
|
149
|
+
|
|
150
|
+
- [TreeView] Add `getItemTree` and `getItemOrderedChildrenIds` methods to the public API (#13804) @flaviendelangle
|
|
151
|
+
- [TreeView] Add utility function to check if an optional plugin is present (#13788) @flaviendelangle
|
|
152
|
+
|
|
153
|
+
### Docs
|
|
154
|
+
|
|
155
|
+
- [docs] Add missing default `loading` prop value (#13604) @oliviertassinari
|
|
156
|
+
- [docs] Add the `DateTimeRangePicker` to the "Commonly used components" demo (#13775) @flaviendelangle
|
|
157
|
+
- [docs] Fix Pickers customization playground overflow (#13742) @LukasTy
|
|
158
|
+
- [docs] Move Pickers dialog guidelines to accessibility page (#13778) @arthurbalduini
|
|
159
|
+
|
|
160
|
+
### Core
|
|
161
|
+
|
|
162
|
+
- [core] Sort `DATA_GRID_PROPS_DEFAULT_VALUES` alphabetically (#13783) @oliviertassinari
|
|
163
|
+
- [test] Fix split infinitive use in tests @oliviertassinari
|
|
164
|
+
|
|
6
165
|
## 7.9.0
|
|
7
166
|
|
|
8
167
|
_Jul 5, 2024_
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["openTo", "rangePosition"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { extractValidationProps, isDatePickerView, isInternalTimeView } from '@mui/x-date-pickers/internals';
|
|
6
|
+
import { extractValidationProps, isDatePickerView, isInternalTimeView, resolveDateTimeFormat, useUtils } from '@mui/x-date-pickers/internals';
|
|
7
7
|
import { resolveComponentProps } from '@mui/base/utils';
|
|
8
8
|
import { refType } from '@mui/utils';
|
|
9
9
|
import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '@mui/x-date-pickers/timeViewRenderers';
|
|
@@ -74,6 +74,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
74
74
|
* - [DesktopDateTimeRangePicker API](https://mui.com/x/api/date-pickers/desktop-date-time-range-picker/)
|
|
75
75
|
*/
|
|
76
76
|
const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function DesktopDateTimeRangePicker(inProps, ref) {
|
|
77
|
+
const utils = useUtils();
|
|
77
78
|
// Props with the default values common to all date time range pickers
|
|
78
79
|
const defaultizedProps = useDateTimeRangePickerDefaultizedProps(inProps, 'MuiDesktopDateTimeRangePicker');
|
|
79
80
|
const renderTimeView = defaultizedProps.shouldRenderTimeInASingleColumn ? renderDigitalClockTimeView : renderMultiSectionDigitalClockTimeView;
|
|
@@ -92,6 +93,7 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
|
|
|
92
93
|
const props = _extends({}, defaultizedProps, {
|
|
93
94
|
views,
|
|
94
95
|
viewRenderers,
|
|
96
|
+
format: resolveDateTimeFormat(utils, defaultizedProps),
|
|
95
97
|
// force true to correctly handle `renderTimeViewClock` as a renderer
|
|
96
98
|
ampmInClock: true,
|
|
97
99
|
calendars: defaultizedProps.calendars ?? 1,
|
|
@@ -4,7 +4,7 @@ const _excluded = ["view", "openTo", "rangePosition"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { refType } from '@mui/utils';
|
|
7
|
-
import { DIALOG_WIDTH, VIEW_HEIGHT, extractValidationProps, isInternalTimeView, isDatePickerView } from '@mui/x-date-pickers/internals';
|
|
7
|
+
import { DIALOG_WIDTH, VIEW_HEIGHT, extractValidationProps, isInternalTimeView, isDatePickerView, resolveDateTimeFormat, useUtils } from '@mui/x-date-pickers/internals';
|
|
8
8
|
import { resolveComponentProps } from '@mui/base/utils';
|
|
9
9
|
import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '@mui/x-date-pickers/timeViewRenderers';
|
|
10
10
|
import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses } from '@mui/x-date-pickers/MultiSectionDigitalClock';
|
|
@@ -82,6 +82,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
82
82
|
* - [MobileDateTimeRangePicker API](https://mui.com/x/api/date-pickers/mobile-date-time-range-picker/)
|
|
83
83
|
*/
|
|
84
84
|
const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileDateTimeRangePicker(inProps, ref) {
|
|
85
|
+
const utils = useUtils();
|
|
85
86
|
// Props with the default values common to all date time range pickers
|
|
86
87
|
const defaultizedProps = useDateTimeRangePickerDefaultizedProps(inProps, 'MuiMobileDateTimeRangePicker');
|
|
87
88
|
const renderTimeView = defaultizedProps.shouldRenderTimeInASingleColumn ? renderDigitalClockTimeView : renderMultiSectionDigitalClockTimeView;
|
|
@@ -94,6 +95,7 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
|
|
|
94
95
|
}, defaultizedProps.viewRenderers);
|
|
95
96
|
const props = _extends({}, defaultizedProps, {
|
|
96
97
|
viewRenderers,
|
|
98
|
+
format: resolveDateTimeFormat(utils, defaultizedProps),
|
|
97
99
|
// Force one calendar on mobile to avoid layout issues
|
|
98
100
|
calendars: 1,
|
|
99
101
|
// force true to correctly handle `renderTimeViewClock` as a renderer
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["calendars", "month", "monthIndex", "labelId"]
|
|
3
|
+
const _excluded = ["calendars", "month", "monthIndex", "labelId"],
|
|
4
|
+
_excluded2 = ["format", "slots", "slotProps", "currentMonth", "onMonthChange", "disableFuture", "disablePast", "minDate", "maxDate", "timezone", "reduceAnimations", "views", "view"];
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import PropTypes from 'prop-types';
|
|
6
7
|
import { styled } from '@mui/material/styles';
|
|
@@ -25,17 +26,19 @@ const PickersRangeCalendarHeader = /*#__PURE__*/React.forwardRef(function Picker
|
|
|
25
26
|
} = props,
|
|
26
27
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
27
28
|
const {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
format,
|
|
30
|
+
slots,
|
|
31
|
+
slotProps,
|
|
32
|
+
currentMonth,
|
|
33
|
+
onMonthChange,
|
|
34
|
+
disableFuture,
|
|
35
|
+
disablePast,
|
|
36
|
+
minDate,
|
|
37
|
+
maxDate,
|
|
38
|
+
timezone
|
|
39
|
+
// omit props that are not used in the PickersArrowSwitcher
|
|
40
|
+
} = other,
|
|
41
|
+
otherRangeProps = _objectWithoutPropertiesLoose(other, _excluded2);
|
|
39
42
|
const isNextMonthDisabled = useNextMonthDisabled(currentMonth, {
|
|
40
43
|
disableFuture,
|
|
41
44
|
maxDate,
|
|
@@ -54,7 +57,7 @@ const PickersRangeCalendarHeader = /*#__PURE__*/React.forwardRef(function Picker
|
|
|
54
57
|
}
|
|
55
58
|
const selectNextMonth = () => onMonthChange(utils.addMonths(currentMonth, 1), 'left');
|
|
56
59
|
const selectPreviousMonth = () => onMonthChange(utils.addMonths(currentMonth, -1), 'right');
|
|
57
|
-
return /*#__PURE__*/_jsx(PickersRangeCalendarHeaderContentMultipleCalendars, {
|
|
60
|
+
return /*#__PURE__*/_jsx(PickersRangeCalendarHeaderContentMultipleCalendars, _extends({}, otherRangeProps, {
|
|
58
61
|
ref: ref,
|
|
59
62
|
onGoToPrevious: selectPreviousMonth,
|
|
60
63
|
onGoToNext: selectNextMonth,
|
|
@@ -68,7 +71,7 @@ const PickersRangeCalendarHeader = /*#__PURE__*/React.forwardRef(function Picker
|
|
|
68
71
|
slotProps: slotProps,
|
|
69
72
|
labelId: labelId,
|
|
70
73
|
children: utils.formatByString(month, format ?? `${utils.formats.month} ${utils.formats.year}`)
|
|
71
|
-
});
|
|
74
|
+
}));
|
|
72
75
|
});
|
|
73
76
|
process.env.NODE_ENV !== "production" ? PickersRangeCalendarHeader.propTypes = {
|
|
74
77
|
// ----------------------------- Warning --------------------------------
|
package/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 = "MTcyMTI1MzYwMDAwMA==";
|
|
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
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["openTo", "rangePosition"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { extractValidationProps, isDatePickerView, isInternalTimeView } from '@mui/x-date-pickers/internals';
|
|
6
|
+
import { extractValidationProps, isDatePickerView, isInternalTimeView, resolveDateTimeFormat, useUtils } from '@mui/x-date-pickers/internals';
|
|
7
7
|
import { resolveComponentProps } from '@mui/base/utils';
|
|
8
8
|
import { refType } from '@mui/utils';
|
|
9
9
|
import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '@mui/x-date-pickers/timeViewRenderers';
|
|
@@ -74,6 +74,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
74
74
|
* - [DesktopDateTimeRangePicker API](https://mui.com/x/api/date-pickers/desktop-date-time-range-picker/)
|
|
75
75
|
*/
|
|
76
76
|
const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function DesktopDateTimeRangePicker(inProps, ref) {
|
|
77
|
+
const utils = useUtils();
|
|
77
78
|
// Props with the default values common to all date time range pickers
|
|
78
79
|
const defaultizedProps = useDateTimeRangePickerDefaultizedProps(inProps, 'MuiDesktopDateTimeRangePicker');
|
|
79
80
|
const renderTimeView = defaultizedProps.shouldRenderTimeInASingleColumn ? renderDigitalClockTimeView : renderMultiSectionDigitalClockTimeView;
|
|
@@ -92,6 +93,7 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
|
|
|
92
93
|
const props = _extends({}, defaultizedProps, {
|
|
93
94
|
views,
|
|
94
95
|
viewRenderers,
|
|
96
|
+
format: resolveDateTimeFormat(utils, defaultizedProps),
|
|
95
97
|
// force true to correctly handle `renderTimeViewClock` as a renderer
|
|
96
98
|
ampmInClock: true,
|
|
97
99
|
calendars: defaultizedProps.calendars ?? 1,
|
|
@@ -4,7 +4,7 @@ const _excluded = ["view", "openTo", "rangePosition"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { refType } from '@mui/utils';
|
|
7
|
-
import { DIALOG_WIDTH, VIEW_HEIGHT, extractValidationProps, isInternalTimeView, isDatePickerView } from '@mui/x-date-pickers/internals';
|
|
7
|
+
import { DIALOG_WIDTH, VIEW_HEIGHT, extractValidationProps, isInternalTimeView, isDatePickerView, resolveDateTimeFormat, useUtils } from '@mui/x-date-pickers/internals';
|
|
8
8
|
import { resolveComponentProps } from '@mui/base/utils';
|
|
9
9
|
import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '@mui/x-date-pickers/timeViewRenderers';
|
|
10
10
|
import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses } from '@mui/x-date-pickers/MultiSectionDigitalClock';
|
|
@@ -82,6 +82,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
82
82
|
* - [MobileDateTimeRangePicker API](https://mui.com/x/api/date-pickers/mobile-date-time-range-picker/)
|
|
83
83
|
*/
|
|
84
84
|
const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileDateTimeRangePicker(inProps, ref) {
|
|
85
|
+
const utils = useUtils();
|
|
85
86
|
// Props with the default values common to all date time range pickers
|
|
86
87
|
const defaultizedProps = useDateTimeRangePickerDefaultizedProps(inProps, 'MuiMobileDateTimeRangePicker');
|
|
87
88
|
const renderTimeView = defaultizedProps.shouldRenderTimeInASingleColumn ? renderDigitalClockTimeView : renderMultiSectionDigitalClockTimeView;
|
|
@@ -94,6 +95,7 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
|
|
|
94
95
|
}, defaultizedProps.viewRenderers);
|
|
95
96
|
const props = _extends({}, defaultizedProps, {
|
|
96
97
|
viewRenderers,
|
|
98
|
+
format: resolveDateTimeFormat(utils, defaultizedProps),
|
|
97
99
|
// Force one calendar on mobile to avoid layout issues
|
|
98
100
|
calendars: 1,
|
|
99
101
|
// force true to correctly handle `renderTimeViewClock` as a renderer
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["calendars", "month", "monthIndex", "labelId"]
|
|
3
|
+
const _excluded = ["calendars", "month", "monthIndex", "labelId"],
|
|
4
|
+
_excluded2 = ["format", "slots", "slotProps", "currentMonth", "onMonthChange", "disableFuture", "disablePast", "minDate", "maxDate", "timezone", "reduceAnimations", "views", "view"];
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import PropTypes from 'prop-types';
|
|
6
7
|
import { styled } from '@mui/material/styles';
|
|
@@ -25,17 +26,19 @@ const PickersRangeCalendarHeader = /*#__PURE__*/React.forwardRef(function Picker
|
|
|
25
26
|
} = props,
|
|
26
27
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
27
28
|
const {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
format,
|
|
30
|
+
slots,
|
|
31
|
+
slotProps,
|
|
32
|
+
currentMonth,
|
|
33
|
+
onMonthChange,
|
|
34
|
+
disableFuture,
|
|
35
|
+
disablePast,
|
|
36
|
+
minDate,
|
|
37
|
+
maxDate,
|
|
38
|
+
timezone
|
|
39
|
+
// omit props that are not used in the PickersArrowSwitcher
|
|
40
|
+
} = other,
|
|
41
|
+
otherRangeProps = _objectWithoutPropertiesLoose(other, _excluded2);
|
|
39
42
|
const isNextMonthDisabled = useNextMonthDisabled(currentMonth, {
|
|
40
43
|
disableFuture,
|
|
41
44
|
maxDate,
|
|
@@ -54,7 +57,7 @@ const PickersRangeCalendarHeader = /*#__PURE__*/React.forwardRef(function Picker
|
|
|
54
57
|
}
|
|
55
58
|
const selectNextMonth = () => onMonthChange(utils.addMonths(currentMonth, 1), 'left');
|
|
56
59
|
const selectPreviousMonth = () => onMonthChange(utils.addMonths(currentMonth, -1), 'right');
|
|
57
|
-
return /*#__PURE__*/_jsx(PickersRangeCalendarHeaderContentMultipleCalendars, {
|
|
60
|
+
return /*#__PURE__*/_jsx(PickersRangeCalendarHeaderContentMultipleCalendars, _extends({}, otherRangeProps, {
|
|
58
61
|
ref: ref,
|
|
59
62
|
onGoToPrevious: selectPreviousMonth,
|
|
60
63
|
onGoToNext: selectNextMonth,
|
|
@@ -68,7 +71,7 @@ const PickersRangeCalendarHeader = /*#__PURE__*/React.forwardRef(function Picker
|
|
|
68
71
|
slotProps: slotProps,
|
|
69
72
|
labelId: labelId,
|
|
70
73
|
children: utils.formatByString(month, format ?? `${utils.formats.month} ${utils.formats.year}`)
|
|
71
|
-
});
|
|
74
|
+
}));
|
|
72
75
|
});
|
|
73
76
|
process.env.NODE_ENV !== "production" ? PickersRangeCalendarHeader.propTypes = {
|
|
74
77
|
// ----------------------------- Warning --------------------------------
|
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 = "MTcyMTI1MzYwMDAwMA==";
|
|
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
|
|
@@ -83,6 +83,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
83
83
|
* - [DesktopDateTimeRangePicker API](https://mui.com/x/api/date-pickers/desktop-date-time-range-picker/)
|
|
84
84
|
*/
|
|
85
85
|
const DesktopDateTimeRangePicker = exports.DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function DesktopDateTimeRangePicker(inProps, ref) {
|
|
86
|
+
const utils = (0, _internals.useUtils)();
|
|
86
87
|
// Props with the default values common to all date time range pickers
|
|
87
88
|
const defaultizedProps = (0, _shared.useDateTimeRangePickerDefaultizedProps)(inProps, 'MuiDesktopDateTimeRangePicker');
|
|
88
89
|
const renderTimeView = defaultizedProps.shouldRenderTimeInASingleColumn ? _timeViewRenderers.renderDigitalClockTimeView : _timeViewRenderers.renderMultiSectionDigitalClockTimeView;
|
|
@@ -101,6 +102,7 @@ const DesktopDateTimeRangePicker = exports.DesktopDateTimeRangePicker = /*#__PUR
|
|
|
101
102
|
const props = (0, _extends2.default)({}, defaultizedProps, {
|
|
102
103
|
views,
|
|
103
104
|
viewRenderers,
|
|
105
|
+
format: (0, _internals.resolveDateTimeFormat)(utils, defaultizedProps),
|
|
104
106
|
// force true to correctly handle `renderTimeViewClock` as a renderer
|
|
105
107
|
ampmInClock: true,
|
|
106
108
|
calendars: defaultizedProps.calendars ?? 1,
|
|
@@ -91,6 +91,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
91
91
|
* - [MobileDateTimeRangePicker API](https://mui.com/x/api/date-pickers/mobile-date-time-range-picker/)
|
|
92
92
|
*/
|
|
93
93
|
const MobileDateTimeRangePicker = exports.MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileDateTimeRangePicker(inProps, ref) {
|
|
94
|
+
const utils = (0, _internals.useUtils)();
|
|
94
95
|
// Props with the default values common to all date time range pickers
|
|
95
96
|
const defaultizedProps = (0, _shared.useDateTimeRangePickerDefaultizedProps)(inProps, 'MuiMobileDateTimeRangePicker');
|
|
96
97
|
const renderTimeView = defaultizedProps.shouldRenderTimeInASingleColumn ? _timeViewRenderers.renderDigitalClockTimeView : _timeViewRenderers.renderMultiSectionDigitalClockTimeView;
|
|
@@ -103,6 +104,7 @@ const MobileDateTimeRangePicker = exports.MobileDateTimeRangePicker = /*#__PURE_
|
|
|
103
104
|
}, defaultizedProps.viewRenderers);
|
|
104
105
|
const props = (0, _extends2.default)({}, defaultizedProps, {
|
|
105
106
|
viewRenderers,
|
|
107
|
+
format: (0, _internals.resolveDateTimeFormat)(utils, defaultizedProps),
|
|
106
108
|
// Force one calendar on mobile to avoid layout issues
|
|
107
109
|
calendars: 1,
|
|
108
110
|
// force true to correctly handle `renderTimeViewClock` as a renderer
|
|
@@ -14,7 +14,8 @@ var _PickersCalendarHeader = require("@mui/x-date-pickers/PickersCalendarHeader"
|
|
|
14
14
|
var _internals = require("@mui/x-date-pickers/internals");
|
|
15
15
|
var _hooks = require("@mui/x-date-pickers/hooks");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
const _excluded = ["calendars", "month", "monthIndex", "labelId"]
|
|
17
|
+
const _excluded = ["calendars", "month", "monthIndex", "labelId"],
|
|
18
|
+
_excluded2 = ["format", "slots", "slotProps", "currentMonth", "onMonthChange", "disableFuture", "disablePast", "minDate", "maxDate", "timezone", "reduceAnimations", "views", "view"];
|
|
18
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
21
|
const PickersRangeCalendarHeaderContentMultipleCalendars = (0, _styles.styled)(_internals.PickersArrowSwitcher)({
|
|
@@ -34,17 +35,19 @@ const PickersRangeCalendarHeader = exports.PickersRangeCalendarHeader = /*#__PUR
|
|
|
34
35
|
} = props,
|
|
35
36
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
36
37
|
const {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
format,
|
|
39
|
+
slots,
|
|
40
|
+
slotProps,
|
|
41
|
+
currentMonth,
|
|
42
|
+
onMonthChange,
|
|
43
|
+
disableFuture,
|
|
44
|
+
disablePast,
|
|
45
|
+
minDate,
|
|
46
|
+
maxDate,
|
|
47
|
+
timezone
|
|
48
|
+
// omit props that are not used in the PickersArrowSwitcher
|
|
49
|
+
} = other,
|
|
50
|
+
otherRangeProps = (0, _objectWithoutPropertiesLoose2.default)(other, _excluded2);
|
|
48
51
|
const isNextMonthDisabled = (0, _internals.useNextMonthDisabled)(currentMonth, {
|
|
49
52
|
disableFuture,
|
|
50
53
|
maxDate,
|
|
@@ -63,7 +66,7 @@ const PickersRangeCalendarHeader = exports.PickersRangeCalendarHeader = /*#__PUR
|
|
|
63
66
|
}
|
|
64
67
|
const selectNextMonth = () => onMonthChange(utils.addMonths(currentMonth, 1), 'left');
|
|
65
68
|
const selectPreviousMonth = () => onMonthChange(utils.addMonths(currentMonth, -1), 'right');
|
|
66
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PickersRangeCalendarHeaderContentMultipleCalendars, {
|
|
69
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PickersRangeCalendarHeaderContentMultipleCalendars, (0, _extends2.default)({}, otherRangeProps, {
|
|
67
70
|
ref: ref,
|
|
68
71
|
onGoToPrevious: selectPreviousMonth,
|
|
69
72
|
onGoToNext: selectNextMonth,
|
|
@@ -77,7 +80,7 @@ const PickersRangeCalendarHeader = exports.PickersRangeCalendarHeader = /*#__PUR
|
|
|
77
80
|
slotProps: slotProps,
|
|
78
81
|
labelId: labelId,
|
|
79
82
|
children: utils.formatByString(month, format ?? `${utils.formats.month} ${utils.formats.year}`)
|
|
80
|
-
});
|
|
83
|
+
}));
|
|
81
84
|
});
|
|
82
85
|
process.env.NODE_ENV !== "production" ? PickersRangeCalendarHeader.propTypes = {
|
|
83
86
|
// ----------------------------- Warning --------------------------------
|
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 = "MTcyMTI1MzYwMDAwMA==";
|
|
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": "7.
|
|
3
|
+
"version": "7.11.0",
|
|
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",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"directory": "packages/x-date-pickers-pro"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@babel/runtime": "^7.24.
|
|
35
|
+
"@babel/runtime": "^7.24.8",
|
|
36
36
|
"@mui/base": "^5.0.0-beta.40",
|
|
37
|
-
"@mui/system": "^5.16.
|
|
38
|
-
"@mui/utils": "^5.16.
|
|
37
|
+
"@mui/system": "^5.16.2",
|
|
38
|
+
"@mui/utils": "^5.16.2",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"prop-types": "^15.8.1",
|
|
41
41
|
"react-transition-group": "^4.4.5",
|
|
42
|
-
"@mui/x-date-pickers": "7.
|
|
43
|
-
"@mui/x-license": "7.
|
|
42
|
+
"@mui/x-date-pickers": "7.11.0",
|
|
43
|
+
"@mui/x-license": "7.11.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@emotion/react": "^11.9.0",
|