@mui/x-date-pickers-pro 6.18.1 → 7.0.0-alpha.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 +149 -0
- package/DateRangeCalendar/DateRangeCalendar.js +4 -20
- package/DateRangeCalendar/DateRangeCalendar.types.d.ts +4 -16
- package/DateRangePicker/DateRangePicker.js +0 -12
- package/DateRangePicker/DateRangePicker.types.d.ts +1 -14
- package/DateRangePicker/shared.d.ts +3 -15
- package/DateRangePicker/shared.js +7 -15
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -12
- package/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +3 -15
- package/MobileDateRangePicker/MobileDateRangePicker.js +0 -12
- package/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +3 -15
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +6 -22
- package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +4 -17
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +4 -20
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +4 -17
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +4 -20
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +4 -17
- package/SingleInputDateRangeField/SingleInputDateRangeField.js +5 -21
- package/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +3 -15
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +5 -21
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +3 -15
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -21
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +3 -15
- package/StaticDateRangePicker/StaticDateRangePicker.js +0 -12
- package/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +2 -14
- package/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +1 -1
- package/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -4
- package/index.js +1 -1
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +2 -2
- package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +6 -6
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +2 -2
- package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +9 -3
- package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +2 -2
- package/internals/utils/releaseInfo.js +1 -1
- package/legacy/DateRangeCalendar/DateRangeCalendar.js +4 -20
- package/legacy/DateRangePicker/DateRangePicker.js +0 -12
- package/legacy/DateRangePicker/shared.js +7 -13
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -12
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +0 -12
- package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +6 -22
- package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +4 -20
- package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +4 -20
- package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +5 -21
- package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +5 -21
- package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -21
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +0 -12
- package/legacy/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -4
- package/legacy/index.js +1 -1
- package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +9 -3
- package/legacy/internals/utils/releaseInfo.js +1 -1
- package/modern/DateRangeCalendar/DateRangeCalendar.js +4 -20
- package/modern/DateRangePicker/DateRangePicker.js +0 -12
- package/modern/DateRangePicker/shared.js +6 -14
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -12
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +0 -12
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +5 -21
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +4 -20
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +4 -20
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +4 -20
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +4 -20
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +4 -20
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +0 -12
- package/modern/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -4
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +9 -3
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/node/DateRangeCalendar/DateRangeCalendar.js +3 -19
- package/node/DateRangePicker/DateRangePicker.js +0 -12
- package/node/DateRangePicker/shared.js +5 -13
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -12
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +0 -12
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +4 -20
- package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +3 -19
- package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +3 -19
- package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +4 -20
- package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +4 -20
- package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +4 -20
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +0 -12
- package/node/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -4
- package/node/index.js +1 -1
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +9 -3
- package/node/internals/utils/releaseInfo.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,155 @@
|
|
|
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.0.0-alpha.0
|
|
7
|
+
|
|
8
|
+
_Nov 10, 2023_
|
|
9
|
+
|
|
10
|
+
We're thrilled to announce the first alpha release of our next major version, v7.
|
|
11
|
+
This release introduces a few breaking changes, paving the way for the upcoming features like Pivoting and DateTimeRangePicker.
|
|
12
|
+
|
|
13
|
+
A special shoutout to thank the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
14
|
+
|
|
15
|
+
- 🚀 First v7 alpha release
|
|
16
|
+
- ✨ Fix aggregation label not showing when `renderHeader` is used (#10961) @cherniavskii
|
|
17
|
+
- 📘 Server side data source [early documentation](https://mui.com/x/react-data-grid/server-side-data/)
|
|
18
|
+
- 💫 New recipes added for the data grid
|
|
19
|
+
- 📈 `<ChartsReferenceLine />` component is now available
|
|
20
|
+
- 🌍 Add Basque (eu) locale, improve Czech (cs-CZ) and Spanish (es-ES) locales
|
|
21
|
+
- 🐞 Bugfixes
|
|
22
|
+
- 📚 Documentation improvements
|
|
23
|
+
|
|
24
|
+
### Data Grid
|
|
25
|
+
|
|
26
|
+
#### Breaking changes
|
|
27
|
+
|
|
28
|
+
- The deprecated `components` and `componentsProps` props have been removed. Use `slots` and `slotProps` instead. See [components section](/x/react-data-grid/components/) for more details.
|
|
29
|
+
- The print export will now only print the selected rows if there are any.
|
|
30
|
+
If there are no selected rows, it will print all rows. This makes the print export consistent with the other exports.
|
|
31
|
+
You can [customize the rows to export by using the `getRowsToExport` function](/x/react-data-grid/export/#customizing-the-rows-to-export).
|
|
32
|
+
- The `getApplyFilterFnV7` in `GridFilterOperator` was renamed to `getApplyFilterFn`.
|
|
33
|
+
If you use `getApplyFilterFnV7` directly - rename it to `getApplyFilterFn`.
|
|
34
|
+
- The signature of the function returned by `getApplyFilterFn` has changed for performance reasons:
|
|
35
|
+
|
|
36
|
+
```diff
|
|
37
|
+
const getApplyFilterFn: GetApplyFilterFn<any, unknown> = (filterItem) => {
|
|
38
|
+
if (!filterItem.value) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const filterRegex = new RegExp(escapeRegExp(filterItem.value), 'i');
|
|
42
|
+
- return (cellParams) => {
|
|
43
|
+
- const { value } = cellParams;
|
|
44
|
+
+ return (value, row, colDef, apiRef) => {
|
|
45
|
+
return value != null ? filterRegex.test(String(value)) : false;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- The `getApplyQuickFilterFnV7` in `GridColDef` was renamed to `getApplyQuickFilterFn`.
|
|
51
|
+
If you use `getApplyQuickFilterFnV7` directly - rename it to `getApplyQuickFilterFn`.
|
|
52
|
+
- The signature of the function returned by `getApplyQuickFilterFn` has changed for performance reasons:
|
|
53
|
+
|
|
54
|
+
```diff
|
|
55
|
+
const getGridStringQuickFilterFn: GetApplyQuickFilterFn<any, unknown> = (value) => {
|
|
56
|
+
if (!value) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const filterRegex = new RegExp(escapeRegExp(value), 'i');
|
|
60
|
+
- return (cellParams) => {
|
|
61
|
+
- const { formattedValue } = cellParams;
|
|
62
|
+
+ return (value, row, column, apiRef) => {
|
|
63
|
+
+ let formattedValue = apiRef.current.getRowFormattedValue(row, column);
|
|
64
|
+
return formattedValue != null ? filterRegex.test(formattedValue.toString()) : false;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### `@mui/x-data-grid@7.0.0-alpha.0`
|
|
70
|
+
|
|
71
|
+
- [DataGrid] Fix for error thrown when removing skeleton rows, after sorting is applied (#10807) @benjaminbialy
|
|
72
|
+
- [DataGrid] Fix: `undefined` slot value (#10937) @romgrk
|
|
73
|
+
- [DataGrid] Print selected rows by default (#10846) @cherniavskii
|
|
74
|
+
- [DataGrid] Remove deprecated `components` and `componentsProps` (#10911) @MBilalShafi
|
|
75
|
+
- [DataGrid] Remove legacy filtering API (#10897) @cherniavskii
|
|
76
|
+
- [DataGrid] Fix keyboard navigation for actions cell with disabled buttons (#10882) @michelengelen
|
|
77
|
+
- [DataGrid] Added a recipe for using non-native select in filter panel (#10916) @michelengelen
|
|
78
|
+
- [DataGrid] Added a recipe to style cells without impacting the aggregation cells (#10913) @michelengelen
|
|
79
|
+
- [l10n] Improve Czech (cs-CZ) locale (#10949) @luborepka
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
82
|
+
|
|
83
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.0`, plus:
|
|
84
|
+
|
|
85
|
+
- [DataGridPro] Autosize Columns - Fix headers being cut off (#10666) @gitstart
|
|
86
|
+
- [DataGridPro] Add data source interface and basic documentation (#10543) @MBilalShafi
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
89
|
+
|
|
90
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.0`, plus:
|
|
91
|
+
|
|
92
|
+
- [DataGridPremium] Render aggregation label when `renderHeader` is used (#10936) @cherniavskii
|
|
93
|
+
|
|
94
|
+
### Date Pickers
|
|
95
|
+
|
|
96
|
+
#### Breaking changes
|
|
97
|
+
|
|
98
|
+
- The deprecated `components` and `componentsProps` props have been removed. Use `slots` and `slotProps` instead.
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.0`
|
|
101
|
+
|
|
102
|
+
- [pickers] Escape non tokens words (#10400) @alexfauquette
|
|
103
|
+
- [fields] Fix `MultiInputTimeRangeField` section selection (#10922) @noraleonte
|
|
104
|
+
- [pickers] Refine `referenceDate` behavior in views (#10863) @LukasTy
|
|
105
|
+
- [pickers] Remove `components` and `componentsProps` props (#10700) @alexfauquette
|
|
106
|
+
- [l10n] Add Basque (eu) locale and improve Spanish (es-ES) locale (#10819) @lajtomekadimon
|
|
107
|
+
- [pickers] Add short weekdays token (#10988) @alexfauquette
|
|
108
|
+
|
|
109
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
110
|
+
|
|
111
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.0`.
|
|
112
|
+
|
|
113
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.0`
|
|
114
|
+
|
|
115
|
+
#### Breaking changes
|
|
116
|
+
|
|
117
|
+
Types for `slots` and `slotProps` got renamed by removing the "Component" which is meaningless for charts.
|
|
118
|
+
Unless you imported those types, to create a wrapper, you should not be impacted by this breaking change.
|
|
119
|
+
|
|
120
|
+
Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
121
|
+
|
|
122
|
+
```diff
|
|
123
|
+
-ChartsTooltipSlotsComponent
|
|
124
|
+
+ChartsTooltipSlots
|
|
125
|
+
|
|
126
|
+
-ChartsTooltipSlotComponentProps
|
|
127
|
+
+ChartsTooltipSlotProps
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
- [charts] Add `<ChartsReferenceLine />` component (#10597) (#10946) @alexfauquette
|
|
131
|
+
- [charts] Improve properties JSDoc (#10931) (#10955) @alexfauquette
|
|
132
|
+
- [charts] Rename `slots` and `slotProps` types (#10875) @alexfauquette
|
|
133
|
+
|
|
134
|
+
### `@mui/x-codemod@7.0.0-alpha.0`
|
|
135
|
+
|
|
136
|
+
- [codemod] Add `v7.0.0/preset-safe` (#10973) @LukasTy
|
|
137
|
+
|
|
138
|
+
### Docs
|
|
139
|
+
|
|
140
|
+
- [docs] Add `@next` tag to the installation instructions (#10963) @MBilalShafi
|
|
141
|
+
- [docs] Document how to hide the legend (#10951) @alexfauquette
|
|
142
|
+
- [docs] Fix typo in the migration guide (#10972) @flaviendelangle
|
|
143
|
+
|
|
144
|
+
### Core
|
|
145
|
+
|
|
146
|
+
- [core] Adds migration docs for charts, pickers and tree view (#10926) @michelengelen
|
|
147
|
+
- [core] Bump monorepo (#10959) @LukasTy
|
|
148
|
+
- [core] Changed prettier branch value to next (#10917) @michelengelen
|
|
149
|
+
- [core] Fix GitHub title tag consistency @oliviertassinari
|
|
150
|
+
- [core] Fixed wrong package names in migration docs (#10953) @michelengelen
|
|
151
|
+
- [core] Merge `master` into `next` (#10929) @cherniavskii
|
|
152
|
+
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
153
|
+
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
154
|
+
|
|
6
155
|
## 6.18.1
|
|
7
156
|
|
|
8
157
|
_Nov 9, 2023_
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["value", "defaultValue", "referenceDate", "onChange", "className", "disableFuture", "disablePast", "minDate", "maxDate", "shouldDisableDate", "reduceAnimations", "onMonthChange", "defaultCalendarMonth", "rangePosition", "defaultRangePosition", "onRangePositionChange", "calendars", "currentMonthCalendarPosition", "
|
|
3
|
+
const _excluded = ["value", "defaultValue", "referenceDate", "onChange", "className", "disableFuture", "disablePast", "minDate", "maxDate", "shouldDisableDate", "reduceAnimations", "onMonthChange", "defaultCalendarMonth", "rangePosition", "defaultRangePosition", "onRangePositionChange", "calendars", "currentMonthCalendarPosition", "slots", "slotProps", "loading", "renderLoading", "disableHighlightToday", "readOnly", "disabled", "showDaysOutsideCurrentMonth", "dayOfWeekFormatter", "disableAutoMonthSwitching", "autoFocus", "fixedWeekNumber", "disableDragEditing", "displayWeekNumber", "timezone"],
|
|
4
4
|
_excluded2 = ["isDragging", "rangeDragDay", "draggingDatePosition"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
@@ -12,7 +12,7 @@ import { styled, useThemeProps } from '@mui/material/styles';
|
|
|
12
12
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
13
13
|
import { Watermark } from '@mui/x-license-pro';
|
|
14
14
|
import { PickersCalendarHeader } from '@mui/x-date-pickers/PickersCalendarHeader';
|
|
15
|
-
import { applyDefaultDate, DAY_MARGIN, DayCalendar, useDefaultReduceAnimations, PickersArrowSwitcher, useCalendarState, useDefaultDates, useLocaleText, useNextMonthDisabled, usePreviousMonthDisabled, useUtils, useNow,
|
|
15
|
+
import { applyDefaultDate, DAY_MARGIN, DayCalendar, useDefaultReduceAnimations, PickersArrowSwitcher, useCalendarState, useDefaultDates, useLocaleText, useNextMonthDisabled, usePreviousMonthDisabled, useUtils, useNow, DEFAULT_DESKTOP_MODE_MEDIA_QUERY, buildWarning, useControlledValueWithTimezone } from '@mui/x-date-pickers/internals';
|
|
16
16
|
import { getReleaseInfo } from '../internals/utils/releaseInfo';
|
|
17
17
|
import { dateRangeCalendarClasses, getDateRangeCalendarUtilityClass } from './dateRangeCalendarClasses';
|
|
18
18
|
import { isEndOfRange, isRangeValid, isStartOfRange, isWithinRange } from '../internals/utils/date-utils';
|
|
@@ -143,10 +143,8 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
|
|
|
143
143
|
onRangePositionChange: inOnRangePositionChange,
|
|
144
144
|
calendars,
|
|
145
145
|
currentMonthCalendarPosition = 1,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
slots: innerSlots,
|
|
149
|
-
slotProps: innerSlotProps,
|
|
146
|
+
slots,
|
|
147
|
+
slotProps,
|
|
150
148
|
loading,
|
|
151
149
|
renderLoading,
|
|
152
150
|
disableHighlightToday,
|
|
@@ -177,8 +175,6 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
|
|
|
177
175
|
const utils = useUtils();
|
|
178
176
|
const localeText = useLocaleText();
|
|
179
177
|
const now = useNow(timezone);
|
|
180
|
-
const slots = innerSlots != null ? innerSlots : uncapitalizeObjectKeys(components);
|
|
181
|
-
const slotProps = innerSlotProps != null ? innerSlotProps : componentsProps;
|
|
182
178
|
const {
|
|
183
179
|
rangePosition,
|
|
184
180
|
onRangePositionChange
|
|
@@ -500,18 +496,6 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
|
|
|
500
496
|
calendars: PropTypes.oneOf([1, 2, 3]),
|
|
501
497
|
classes: PropTypes.object,
|
|
502
498
|
className: PropTypes.string,
|
|
503
|
-
/**
|
|
504
|
-
* Overridable components.
|
|
505
|
-
* @default {}
|
|
506
|
-
* @deprecated Please use `slots`.
|
|
507
|
-
*/
|
|
508
|
-
components: PropTypes.object,
|
|
509
|
-
/**
|
|
510
|
-
* The props used for each component slot.
|
|
511
|
-
* @default {}
|
|
512
|
-
* @deprecated Please use `slotProps`.
|
|
513
|
-
*/
|
|
514
|
-
componentsProps: PropTypes.object,
|
|
515
499
|
/**
|
|
516
500
|
* Position the current month is rendered in.
|
|
517
501
|
* @default 1
|
|
@@ -4,19 +4,19 @@ import { SlotComponentProps } from '@mui/base/utils';
|
|
|
4
4
|
import { Theme } from '@mui/material/styles';
|
|
5
5
|
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
6
6
|
import { PickersCalendarHeaderSlotsComponent, PickersCalendarHeaderSlotsComponentsProps } from '@mui/x-date-pickers/PickersCalendarHeader';
|
|
7
|
-
import { BaseDateValidationProps, DefaultizedProps, ExportedDayCalendarProps, DayCalendarSlotsComponent, DayCalendarSlotsComponentsProps, PickersArrowSwitcherSlotsComponent, PickersArrowSwitcherSlotsComponentsProps, PickerSelectionState, DayCalendarProps, ExportedUseViewsOptions
|
|
7
|
+
import { BaseDateValidationProps, DefaultizedProps, ExportedDayCalendarProps, DayCalendarSlotsComponent, DayCalendarSlotsComponentsProps, PickersArrowSwitcherSlotsComponent, PickersArrowSwitcherSlotsComponentsProps, PickerSelectionState, DayCalendarProps, ExportedUseViewsOptions } from '@mui/x-date-pickers/internals';
|
|
8
8
|
import { DateRange, DayRangeValidationProps } from '../internals/models';
|
|
9
9
|
import { DateRangeCalendarClasses } from './dateRangeCalendarClasses';
|
|
10
10
|
import { DateRangePickerDay, DateRangePickerDayProps } from '../DateRangePickerDay';
|
|
11
11
|
import { UseRangePositionProps } from '../internals/hooks/useRangePosition';
|
|
12
12
|
export type DateRangePosition = 'start' | 'end';
|
|
13
|
-
export interface DateRangeCalendarSlotsComponent<TDate> extends PickersArrowSwitcherSlotsComponent, Omit<DayCalendarSlotsComponent<TDate>, '
|
|
13
|
+
export interface DateRangeCalendarSlotsComponent<TDate> extends PickersArrowSwitcherSlotsComponent, Omit<DayCalendarSlotsComponent<TDate>, 'day'>, PickersCalendarHeaderSlotsComponent {
|
|
14
14
|
/**
|
|
15
15
|
* Custom component for day in range pickers.
|
|
16
16
|
* Check the [DateRangePickersDay](https://mui.com/x/api/date-pickers/date-range-picker-day/) component.
|
|
17
17
|
* @default DateRangePickersDay
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
day?: React.ElementType<DateRangePickerDayProps<TDate>>;
|
|
20
20
|
}
|
|
21
21
|
export interface DateRangeCalendarSlotsComponentsProps<TDate> extends PickersArrowSwitcherSlotsComponentsProps, Omit<DayCalendarSlotsComponentsProps<TDate>, 'day'>, PickersCalendarHeaderSlotsComponentsProps<TDate> {
|
|
22
22
|
day?: SlotComponentProps<typeof DateRangePickerDay, {}, DayCalendarProps<TDate> & {
|
|
@@ -100,23 +100,11 @@ export interface DateRangeCalendarProps<TDate> extends ExportedDateRangeCalendar
|
|
|
100
100
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
101
101
|
*/
|
|
102
102
|
sx?: SxProps<Theme>;
|
|
103
|
-
/**
|
|
104
|
-
* Overridable components.
|
|
105
|
-
* @default {}
|
|
106
|
-
* @deprecated Please use `slots`.
|
|
107
|
-
*/
|
|
108
|
-
components?: DateRangeCalendarSlotsComponent<TDate>;
|
|
109
|
-
/**
|
|
110
|
-
* The props used for each component slot.
|
|
111
|
-
* @default {}
|
|
112
|
-
* @deprecated Please use `slotProps`.
|
|
113
|
-
*/
|
|
114
|
-
componentsProps?: DateRangeCalendarSlotsComponentsProps<TDate>;
|
|
115
103
|
/**
|
|
116
104
|
* Overridable component slots.
|
|
117
105
|
* @default {}
|
|
118
106
|
*/
|
|
119
|
-
slots?:
|
|
107
|
+
slots?: DateRangeCalendarSlotsComponent<TDate>;
|
|
120
108
|
/**
|
|
121
109
|
* The props used for each component slot.
|
|
122
110
|
* @default {}
|
|
@@ -68,18 +68,6 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
|
68
68
|
* @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
|
|
69
69
|
*/
|
|
70
70
|
closeOnSelect: PropTypes.bool,
|
|
71
|
-
/**
|
|
72
|
-
* Overridable components.
|
|
73
|
-
* @default {}
|
|
74
|
-
* @deprecated Please use `slots`.
|
|
75
|
-
*/
|
|
76
|
-
components: PropTypes.object,
|
|
77
|
-
/**
|
|
78
|
-
* The props used for each component slot.
|
|
79
|
-
* @default {}
|
|
80
|
-
* @deprecated Please use `slotProps`.
|
|
81
|
-
*/
|
|
82
|
-
componentsProps: PropTypes.object,
|
|
83
71
|
/**
|
|
84
72
|
* Position the current month is rendered in.
|
|
85
73
|
* @default 1
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { UncapitalizeObjectKeys } from '@mui/x-date-pickers/internals';
|
|
2
1
|
import { DesktopDateRangePickerProps, DesktopDateRangePickerSlotsComponent, DesktopDateRangePickerSlotsComponentsProps } from '../DesktopDateRangePicker';
|
|
3
2
|
import { MobileDateRangePickerProps, MobileDateRangePickerSlotsComponent, MobileDateRangePickerSlotsComponentsProps } from '../MobileDateRangePicker';
|
|
4
3
|
export interface DateRangePickerSlotsComponents<TDate> extends DesktopDateRangePickerSlotsComponent<TDate>, MobileDateRangePickerSlotsComponent<TDate> {
|
|
@@ -12,23 +11,11 @@ export interface DateRangePickerProps<TDate> extends DesktopDateRangePickerProps
|
|
|
12
11
|
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
13
12
|
*/
|
|
14
13
|
desktopModeMediaQuery?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Overridable components.
|
|
17
|
-
* @default {}
|
|
18
|
-
* @deprecated Please use `slots`.
|
|
19
|
-
*/
|
|
20
|
-
components?: DateRangePickerSlotsComponents<TDate>;
|
|
21
|
-
/**
|
|
22
|
-
* The props used for each component slot.
|
|
23
|
-
* @default {}
|
|
24
|
-
* @deprecated Please use `slotProps`.
|
|
25
|
-
*/
|
|
26
|
-
componentsProps?: DateRangePickerSlotsComponentsProps<TDate>;
|
|
27
14
|
/**
|
|
28
15
|
* Overridable component slots.
|
|
29
16
|
* @default {}
|
|
30
17
|
*/
|
|
31
|
-
slots?:
|
|
18
|
+
slots?: DateRangePickerSlotsComponents<TDate>;
|
|
32
19
|
/**
|
|
33
20
|
* The props used for each component slot.
|
|
34
21
|
* @default {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { LocalizedComponent } from '@mui/x-date-pickers/locales';
|
|
3
|
-
import { DefaultizedProps, BaseDateValidationProps, BasePickerInputProps, PickerViewRendererLookup
|
|
3
|
+
import { DefaultizedProps, BaseDateValidationProps, BasePickerInputProps, PickerViewRendererLookup } from '@mui/x-date-pickers/internals';
|
|
4
4
|
import { DateRangeValidationError } from '../models';
|
|
5
5
|
import { DateRange } from '../internals/models';
|
|
6
6
|
import { DateRangeCalendarSlotsComponent, DateRangeCalendarSlotsComponentsProps, ExportedDateRangeCalendarProps } from '../DateRangeCalendar';
|
|
@@ -11,29 +11,17 @@ export interface BaseDateRangePickerSlotsComponent<TDate> extends DateRangeCalen
|
|
|
11
11
|
* Custom component for the toolbar rendered above the views.
|
|
12
12
|
* @default DateTimePickerToolbar
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
toolbar?: React.JSXElementConstructor<DateRangePickerToolbarProps<TDate>>;
|
|
15
15
|
}
|
|
16
16
|
export interface BaseDateRangePickerSlotsComponentsProps<TDate> extends DateRangeCalendarSlotsComponentsProps<TDate> {
|
|
17
17
|
toolbar?: ExportedDateRangePickerToolbarProps;
|
|
18
18
|
}
|
|
19
19
|
export interface BaseDateRangePickerProps<TDate> extends Omit<BasePickerInputProps<DateRange<TDate>, TDate, 'day', DateRangeValidationError>, 'view' | 'views' | 'openTo' | 'onViewChange' | 'orientation'>, ExportedDateRangeCalendarProps<TDate>, BaseDateValidationProps<TDate> {
|
|
20
|
-
/**
|
|
21
|
-
* Overridable components.
|
|
22
|
-
* @default {}
|
|
23
|
-
* @deprecated Please use `slots`.
|
|
24
|
-
*/
|
|
25
|
-
components?: BaseDateRangePickerSlotsComponent<TDate>;
|
|
26
|
-
/**
|
|
27
|
-
* The props used for each component slot.
|
|
28
|
-
* @default {}
|
|
29
|
-
* @deprecated Please use `slotProps`.
|
|
30
|
-
*/
|
|
31
|
-
componentsProps?: BaseDateRangePickerSlotsComponentsProps<TDate>;
|
|
32
20
|
/**
|
|
33
21
|
* Overridable component slots.
|
|
34
22
|
* @default {}
|
|
35
23
|
*/
|
|
36
|
-
slots?:
|
|
24
|
+
slots?: BaseDateRangePickerSlotsComponent<TDate>;
|
|
37
25
|
/**
|
|
38
26
|
* The props used for each component slot.
|
|
39
27
|
* @default {}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["components", "componentsProps"];
|
|
4
2
|
import * as React from 'react';
|
|
5
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
6
|
-
import { useDefaultDates, useUtils, applyDefaultDate
|
|
4
|
+
import { useDefaultDates, useUtils, applyDefaultDate } from '@mui/x-date-pickers/internals';
|
|
7
5
|
import { DateRangePickerToolbar } from './DateRangePickerToolbar';
|
|
8
6
|
export function useDateRangePickerDefaultizedProps(props, name) {
|
|
9
|
-
var _themeProps$disableFu, _themeProps$disablePa
|
|
7
|
+
var _themeProps$disableFu, _themeProps$disablePa;
|
|
10
8
|
const utils = useUtils();
|
|
11
9
|
const defaultDates = useDefaultDates();
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
components,
|
|
18
|
-
componentsProps
|
|
19
|
-
} = _useThemeProps,
|
|
20
|
-
themeProps = _objectWithoutPropertiesLoose(_useThemeProps, _excluded);
|
|
10
|
+
const themeProps = useThemeProps({
|
|
11
|
+
props,
|
|
12
|
+
name
|
|
13
|
+
});
|
|
21
14
|
const localeText = React.useMemo(() => {
|
|
22
15
|
var _themeProps$localeTex;
|
|
23
16
|
if (((_themeProps$localeTex = themeProps.localeText) == null ? void 0 : _themeProps$localeTex.toolbarTitle) == null) {
|
|
@@ -35,7 +28,6 @@ export function useDateRangePickerDefaultizedProps(props, name) {
|
|
|
35
28
|
maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate),
|
|
36
29
|
slots: _extends({
|
|
37
30
|
toolbar: DateRangePickerToolbar
|
|
38
|
-
},
|
|
39
|
-
slotProps: (_themeProps$slotProps = themeProps.slotProps) != null ? _themeProps$slotProps : componentsProps
|
|
31
|
+
}, themeProps.slots)
|
|
40
32
|
});
|
|
41
33
|
}
|
|
@@ -83,18 +83,6 @@ DesktopDateRangePicker.propTypes = {
|
|
|
83
83
|
* @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
|
|
84
84
|
*/
|
|
85
85
|
closeOnSelect: PropTypes.bool,
|
|
86
|
-
/**
|
|
87
|
-
* Overridable components.
|
|
88
|
-
* @default {}
|
|
89
|
-
* @deprecated Please use `slots`.
|
|
90
|
-
*/
|
|
91
|
-
components: PropTypes.object,
|
|
92
|
-
/**
|
|
93
|
-
* The props used for each component slot.
|
|
94
|
-
* @default {}
|
|
95
|
-
* @deprecated Please use `slotProps`.
|
|
96
|
-
*/
|
|
97
|
-
componentsProps: PropTypes.object,
|
|
98
86
|
/**
|
|
99
87
|
* Position the current month is rendered in.
|
|
100
88
|
* @default 1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MakeOptional
|
|
1
|
+
import { MakeOptional } from '@mui/x-date-pickers/internals';
|
|
2
2
|
import { UseDesktopRangePickerSlotsComponent, UseDesktopRangePickerSlotsComponentsProps, DesktopRangeOnlyPickerProps } from '../internals/hooks/useDesktopRangePicker';
|
|
3
3
|
import { BaseDateRangePickerProps, BaseDateRangePickerSlotsComponent, BaseDateRangePickerSlotsComponentsProps } from '../DateRangePicker/shared';
|
|
4
|
-
export interface DesktopDateRangePickerSlotsComponent<TDate> extends BaseDateRangePickerSlotsComponent<TDate>, MakeOptional<UseDesktopRangePickerSlotsComponent<TDate, 'day'>, '
|
|
4
|
+
export interface DesktopDateRangePickerSlotsComponent<TDate> extends BaseDateRangePickerSlotsComponent<TDate>, MakeOptional<UseDesktopRangePickerSlotsComponent<TDate, 'day'>, 'field'> {
|
|
5
5
|
}
|
|
6
6
|
export interface DesktopDateRangePickerSlotsComponentsProps<TDate> extends BaseDateRangePickerSlotsComponentsProps<TDate>, UseDesktopRangePickerSlotsComponentsProps<TDate, 'day'> {
|
|
7
7
|
}
|
|
@@ -11,23 +11,11 @@ export interface DesktopDateRangePickerProps<TDate> extends BaseDateRangePickerP
|
|
|
11
11
|
* @default 2
|
|
12
12
|
*/
|
|
13
13
|
calendars?: 1 | 2 | 3;
|
|
14
|
-
/**
|
|
15
|
-
* Overridable components.
|
|
16
|
-
* @default {}
|
|
17
|
-
* @deprecated Please use `slots`.
|
|
18
|
-
*/
|
|
19
|
-
components?: DesktopDateRangePickerSlotsComponent<TDate>;
|
|
20
|
-
/**
|
|
21
|
-
* The props used for each component slot.
|
|
22
|
-
* @default {}
|
|
23
|
-
* @deprecated Please use `slotProps`.
|
|
24
|
-
*/
|
|
25
|
-
componentsProps?: DesktopDateRangePickerSlotsComponentsProps<TDate>;
|
|
26
14
|
/**
|
|
27
15
|
* Overridable component slots.
|
|
28
16
|
* @default {}
|
|
29
17
|
*/
|
|
30
|
-
slots?:
|
|
18
|
+
slots?: DesktopDateRangePickerSlotsComponent<TDate>;
|
|
31
19
|
/**
|
|
32
20
|
* The props used for each component slot.
|
|
33
21
|
* @default {}
|
|
@@ -83,18 +83,6 @@ MobileDateRangePicker.propTypes = {
|
|
|
83
83
|
* @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
|
|
84
84
|
*/
|
|
85
85
|
closeOnSelect: PropTypes.bool,
|
|
86
|
-
/**
|
|
87
|
-
* Overridable components.
|
|
88
|
-
* @default {}
|
|
89
|
-
* @deprecated Please use `slots`.
|
|
90
|
-
*/
|
|
91
|
-
components: PropTypes.object,
|
|
92
|
-
/**
|
|
93
|
-
* The props used for each component slot.
|
|
94
|
-
* @default {}
|
|
95
|
-
* @deprecated Please use `slotProps`.
|
|
96
|
-
*/
|
|
97
|
-
componentsProps: PropTypes.object,
|
|
98
86
|
/**
|
|
99
87
|
* Position the current month is rendered in.
|
|
100
88
|
* @default 1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MakeOptional
|
|
1
|
+
import { MakeOptional } from '@mui/x-date-pickers/internals';
|
|
2
2
|
import { UseMobileRangePickerSlotsComponent, UseMobileRangePickerSlotsComponentsProps, MobileRangeOnlyPickerProps } from '../internals/hooks/useMobileRangePicker';
|
|
3
3
|
import { BaseDateRangePickerProps, BaseDateRangePickerSlotsComponent, BaseDateRangePickerSlotsComponentsProps } from '../DateRangePicker/shared';
|
|
4
|
-
export interface MobileDateRangePickerSlotsComponent<TDate> extends BaseDateRangePickerSlotsComponent<TDate>, MakeOptional<UseMobileRangePickerSlotsComponent<TDate, 'day'>, '
|
|
4
|
+
export interface MobileDateRangePickerSlotsComponent<TDate> extends BaseDateRangePickerSlotsComponent<TDate>, MakeOptional<UseMobileRangePickerSlotsComponent<TDate, 'day'>, 'field'> {
|
|
5
5
|
}
|
|
6
6
|
export interface MobileDateRangePickerSlotsComponentsProps<TDate> extends BaseDateRangePickerSlotsComponentsProps<TDate>, UseMobileRangePickerSlotsComponentsProps<TDate, 'day'> {
|
|
7
7
|
}
|
|
@@ -11,23 +11,11 @@ export interface MobileDateRangePickerProps<TDate> extends BaseDateRangePickerPr
|
|
|
11
11
|
* @default 2
|
|
12
12
|
*/
|
|
13
13
|
calendars?: 1 | 2 | 3;
|
|
14
|
-
/**
|
|
15
|
-
* Overridable components.
|
|
16
|
-
* @default {}
|
|
17
|
-
* @deprecated Please use `slots`.
|
|
18
|
-
*/
|
|
19
|
-
components?: MobileDateRangePickerSlotsComponent<TDate>;
|
|
20
|
-
/**
|
|
21
|
-
* The props used for each component slot.
|
|
22
|
-
* @default {}
|
|
23
|
-
* @deprecated Please use `slotProps`.
|
|
24
|
-
*/
|
|
25
|
-
componentsProps?: MobileDateRangePickerSlotsComponentsProps<TDate>;
|
|
26
14
|
/**
|
|
27
15
|
* Overridable component slots.
|
|
28
16
|
* @default {}
|
|
29
17
|
*/
|
|
30
|
-
slots?:
|
|
18
|
+
slots?: MobileDateRangePickerSlotsComponent<TDate>;
|
|
31
19
|
/**
|
|
32
20
|
* The props used for each component slot.
|
|
33
21
|
* @default {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["slots", "slotProps", "
|
|
3
|
+
const _excluded = ["slots", "slotProps", "disabled", "autoFocus", "unstableStartFieldRef", "unstableEndFieldRef", "className"],
|
|
4
4
|
_excluded2 = ["onKeyDown", "ref", "readOnly", "inputMode"],
|
|
5
5
|
_excluded3 = ["onKeyDown", "ref", "readOnly", "inputMode"];
|
|
6
6
|
import * as React from 'react';
|
|
@@ -12,7 +12,7 @@ import Typography from '@mui/material/Typography';
|
|
|
12
12
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
13
13
|
import { useSlotProps } from '@mui/base/utils';
|
|
14
14
|
import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
15
|
-
import { splitFieldInternalAndForwardedProps
|
|
15
|
+
import { splitFieldInternalAndForwardedProps } from '@mui/x-date-pickers/internals';
|
|
16
16
|
import { useMultiInputDateRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField';
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -59,7 +59,7 @@ const MultiInputDateRangeFieldSeparator = styled(props => {
|
|
|
59
59
|
* - [MultiInputDateRangeField API](https://mui.com/x/api/multi-input-date-range-field/)
|
|
60
60
|
*/
|
|
61
61
|
const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInputDateRangeField(inProps, ref) {
|
|
62
|
-
var _slots$root, _slots$textField, _slots$separator
|
|
62
|
+
var _slots$root, _slots$textField, _slots$separator;
|
|
63
63
|
const themeProps = useThemeProps({
|
|
64
64
|
props: inProps,
|
|
65
65
|
name: 'MuiMultiInputDateRangeField'
|
|
@@ -69,10 +69,8 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
69
69
|
forwardedProps
|
|
70
70
|
} = splitFieldInternalAndForwardedProps(themeProps, 'date');
|
|
71
71
|
const {
|
|
72
|
-
slots
|
|
73
|
-
slotProps
|
|
74
|
-
components,
|
|
75
|
-
componentsProps,
|
|
72
|
+
slots,
|
|
73
|
+
slotProps,
|
|
76
74
|
disabled,
|
|
77
75
|
autoFocus,
|
|
78
76
|
unstableStartFieldRef,
|
|
@@ -80,8 +78,6 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
80
78
|
className
|
|
81
79
|
} = forwardedProps,
|
|
82
80
|
otherForwardedProps = _objectWithoutPropertiesLoose(forwardedProps, _excluded);
|
|
83
|
-
const slots = innerSlots != null ? innerSlots : uncapitalizeObjectKeys(components);
|
|
84
|
-
const slotProps = innerSlotProps != null ? innerSlotProps : componentsProps;
|
|
85
81
|
const ownerState = themeProps;
|
|
86
82
|
const classes = useUtilityClasses(ownerState);
|
|
87
83
|
const Root = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : MultiInputDateRangeFieldRoot;
|
|
@@ -116,7 +112,7 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
116
112
|
const Separator = (_slots$separator = slots == null ? void 0 : slots.separator) != null ? _slots$separator : MultiInputDateRangeFieldSeparator;
|
|
117
113
|
const separatorProps = useSlotProps({
|
|
118
114
|
elementType: Separator,
|
|
119
|
-
externalSlotProps:
|
|
115
|
+
externalSlotProps: slotProps == null ? void 0 : slotProps.separator,
|
|
120
116
|
ownerState,
|
|
121
117
|
className: classes.separator
|
|
122
118
|
});
|
|
@@ -186,18 +182,6 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
186
182
|
classes: PropTypes.object,
|
|
187
183
|
className: PropTypes.string,
|
|
188
184
|
component: PropTypes.elementType,
|
|
189
|
-
/**
|
|
190
|
-
* Overridable components.
|
|
191
|
-
* @default {}
|
|
192
|
-
* @deprecated Please use `slots`.
|
|
193
|
-
*/
|
|
194
|
-
components: PropTypes.object,
|
|
195
|
-
/**
|
|
196
|
-
* The props used for each component slot.
|
|
197
|
-
* @default {}
|
|
198
|
-
* @deprecated Please use `slotProps`.
|
|
199
|
-
*/
|
|
200
|
-
componentsProps: PropTypes.object,
|
|
201
185
|
/**
|
|
202
186
|
* The default value. Use when the component is not controlled.
|
|
203
187
|
*/
|
|
@@ -4,7 +4,6 @@ import Typography from '@mui/material/Typography';
|
|
|
4
4
|
import Stack, { StackProps } from '@mui/material/Stack';
|
|
5
5
|
import TextField from '@mui/material/TextField';
|
|
6
6
|
import { FieldRef } from '@mui/x-date-pickers/models';
|
|
7
|
-
import { UncapitalizeObjectKeys } from '@mui/x-date-pickers/internals';
|
|
8
7
|
import { UseDateRangeFieldProps } from '../internals/models/dateRange';
|
|
9
8
|
import { RangePosition } from '../internals/models/range';
|
|
10
9
|
import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
@@ -22,23 +21,11 @@ export interface MultiInputDateRangeFieldProps<TDate> extends UseMultiInputDateR
|
|
|
22
21
|
* Override or extend the styles applied to the component.
|
|
23
22
|
*/
|
|
24
23
|
classes?: Partial<MultiInputRangeFieldClasses>;
|
|
25
|
-
/**
|
|
26
|
-
* Overridable components.
|
|
27
|
-
* @default {}
|
|
28
|
-
* @deprecated Please use `slots`.
|
|
29
|
-
*/
|
|
30
|
-
components?: MultiInputDateRangeFieldSlotsComponent;
|
|
31
|
-
/**
|
|
32
|
-
* The props used for each component slot.
|
|
33
|
-
* @default {}
|
|
34
|
-
* @deprecated Please use `slotProps`.
|
|
35
|
-
*/
|
|
36
|
-
componentsProps?: MultiInputDateRangeFieldSlotsComponentsProps<TDate>;
|
|
37
24
|
/**
|
|
38
25
|
* Overridable component slots.
|
|
39
26
|
* @default {}
|
|
40
27
|
*/
|
|
41
|
-
slots?:
|
|
28
|
+
slots?: MultiInputDateRangeFieldSlotsComponent;
|
|
42
29
|
/**
|
|
43
30
|
* The props used for each component slot.
|
|
44
31
|
* @default {}
|
|
@@ -51,19 +38,19 @@ export interface MultiInputDateRangeFieldSlotsComponent {
|
|
|
51
38
|
* Element rendered at the root.
|
|
52
39
|
* @default MultiInputDateRangeFieldRoot
|
|
53
40
|
*/
|
|
54
|
-
|
|
41
|
+
root?: React.ElementType;
|
|
55
42
|
/**
|
|
56
43
|
* Form control with an input to render a date.
|
|
57
44
|
* It is rendered twice: once for the start date and once for the end date.
|
|
58
45
|
* Receives the same props as `@mui/material/TextField`.
|
|
59
46
|
* @default TextField from '@mui/material'
|
|
60
47
|
*/
|
|
61
|
-
|
|
48
|
+
textField?: React.ElementType;
|
|
62
49
|
/**
|
|
63
50
|
* Element rendered between the two inputs.
|
|
64
51
|
* @default MultiInputDateRangeFieldSeparator
|
|
65
52
|
*/
|
|
66
|
-
|
|
53
|
+
separator?: React.ElementType;
|
|
67
54
|
}
|
|
68
55
|
export interface MultiInputDateRangeFieldSlotsComponentsProps<TDate> {
|
|
69
56
|
root?: SlotComponentProps<typeof Stack, {}, MultiInputDateRangeFieldOwnerState<TDate>>;
|