@mui/x-date-pickers 8.17.0 → 8.19.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 +213 -0
- package/DatePicker/DatePicker.js +8 -2
- package/DateTimePicker/DateTimePicker.js +8 -2
- package/DateTimePicker/DateTimePickerToolbar.js +2 -1
- package/DesktopDatePicker/DesktopDatePicker.js +8 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +8 -2
- package/DesktopTimePicker/DesktopTimePicker.js +8 -2
- package/MobileDatePicker/MobileDatePicker.js +8 -2
- package/MobileDateTimePicker/MobileDateTimePicker.js +8 -2
- package/MobileTimePicker/MobileTimePicker.js +8 -2
- package/PickersShortcuts/PickersShortcuts.js +2 -1
- package/StaticDatePicker/StaticDatePicker.js +8 -2
- package/StaticDateTimePicker/StaticDateTimePicker.js +8 -2
- package/StaticTimePicker/StaticTimePicker.js +8 -2
- package/TimePicker/TimePicker.js +8 -2
- package/TimePicker/TimePickerToolbar.js +2 -1
- package/esm/DatePicker/DatePicker.js +8 -2
- package/esm/DateTimePicker/DateTimePicker.js +8 -2
- package/esm/DateTimePicker/DateTimePickerToolbar.js +2 -1
- package/esm/DesktopDatePicker/DesktopDatePicker.js +8 -2
- package/esm/DesktopDateTimePicker/DesktopDateTimePicker.js +8 -2
- package/esm/DesktopTimePicker/DesktopTimePicker.js +8 -2
- package/esm/MobileDatePicker/MobileDatePicker.js +8 -2
- package/esm/MobileDateTimePicker/MobileDateTimePicker.js +8 -2
- package/esm/MobileTimePicker/MobileTimePicker.js +8 -2
- package/esm/PickersShortcuts/PickersShortcuts.js +2 -1
- package/esm/StaticDatePicker/StaticDatePicker.js +8 -2
- package/esm/StaticDateTimePicker/StaticDateTimePicker.js +8 -2
- package/esm/StaticTimePicker/StaticTimePicker.js +8 -2
- package/esm/TimePicker/TimePicker.js +8 -2
- package/esm/TimePicker/TimePickerToolbar.js +2 -1
- package/esm/index.js +1 -1
- package/esm/internals/components/PickerProvider.d.ts +8 -0
- package/esm/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -2
- package/esm/internals/hooks/useField/useFieldState.js +19 -10
- package/esm/internals/hooks/useField/useFieldV6TextField.js +1 -0
- package/esm/internals/hooks/useMobilePicker/useMobilePicker.js +2 -2
- package/esm/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +14 -2
- package/esm/internals/hooks/usePicker/usePicker.js +13 -5
- package/esm/internals/hooks/usePicker/usePicker.types.d.ts +8 -2
- package/esm/models/pickers.d.ts +8 -0
- package/index.js +1 -1
- package/internals/components/PickerProvider.d.ts +8 -0
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -2
- package/internals/hooks/useField/useFieldState.js +19 -10
- package/internals/hooks/useField/useFieldV6TextField.js +1 -0
- package/internals/hooks/useMobilePicker/useMobilePicker.js +2 -2
- package/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +14 -2
- package/internals/hooks/usePicker/usePicker.js +13 -5
- package/internals/hooks/usePicker/usePicker.types.d.ts +8 -2
- package/models/pickers.d.ts +8 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,219 @@
|
|
|
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.19.0
|
|
9
|
+
|
|
10
|
+
_Nov 20, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🔎 Add pan on `wheel` to the charts zoom
|
|
15
|
+
- ⌨️ Allow opt-in to [tab navigation](https://mui.com/x/react-data-grid/accessibility/#tab-navigation) inside the Data Grid.
|
|
16
|
+
- ⚙️ New way of defining [action columns](https://mui.com/x/react-data-grid/column-definition/#ActionsWithModalGrid.tsx) in the Data Grid that makes it easier to keep `columns` prop stable.
|
|
17
|
+
- 🐞 Bugfixes
|
|
18
|
+
- 📚 Documentation improvements
|
|
19
|
+
|
|
20
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
21
|
+
@lauri865, @noobyogi0010, @sai6855
|
|
22
|
+
|
|
23
|
+
The following team members contributed to this release:
|
|
24
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @mj12albert, @noraleonte, @rita-codes, @siriwatknp, @ZeeshanTamboli
|
|
25
|
+
|
|
26
|
+
### Data Grid
|
|
27
|
+
|
|
28
|
+
#### `@mui/x-data-grid@8.19.0`
|
|
29
|
+
|
|
30
|
+
- [DataGrid] Add `tabNavigation` prop to control tab navigation in the grid (#20286) @arminmeh
|
|
31
|
+
- [DataGrid] Allow to focus disabled checkbox cells (#19959) @mj12albert
|
|
32
|
+
- [DataGrid] Alternative actions column definition API (#15041) @cherniavskii
|
|
33
|
+
- [DataGrid] Fix failing tests (#20332) @cherniavskii
|
|
34
|
+
- [DataGrid] Prevent Safari 26 error in the event handler (#20369) @arminmeh
|
|
35
|
+
- [DataGrid] Undeprecate the `autoHeight` prop (#20363) @cherniavskii
|
|
36
|
+
- [DataGrid] Fix print export grid dimensions with dynamic row height and print styles (#19835) @cherniavskii
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-pro@8.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid@8.19.0`.
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-premium@8.19.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid-pro@8.19.0`, plus:
|
|
45
|
+
|
|
46
|
+
- [DataGridPremium] Fix aggregation with sorting (#19892) @lauri865
|
|
47
|
+
- [DataGridPremium] Lock `ExcelJS` version (#20329) @cherniavskii
|
|
48
|
+
|
|
49
|
+
### Date and Time Pickers
|
|
50
|
+
|
|
51
|
+
#### `@mui/x-date-pickers@8.19.0`
|
|
52
|
+
|
|
53
|
+
- [pickers] Do not loose `slotProps.field.slotProps` (#20322) @flaviendelangle
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-date-pickers-pro@8.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
56
|
+
|
|
57
|
+
Same changes as in `@mui/x-date-pickers@8.19.0`.
|
|
58
|
+
|
|
59
|
+
### Charts
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-charts@8.19.0`
|
|
62
|
+
|
|
63
|
+
- [charts] Expose `niceDomain` utility (#20250) @bernardobelchior
|
|
64
|
+
- [charts] Fix benchmark regression by downgrading to JSDOM v26 (#20405) @bernardobelchior
|
|
65
|
+
- [charts] Fix Pie Chart keyboard focus highlight (#20358) @JCQuintas
|
|
66
|
+
- [charts] Memoize series selectors (#20326) @JCQuintas
|
|
67
|
+
- [charts] Relax dataset type (#20294) @bernardobelchior
|
|
68
|
+
- [charts] Remove `touch-action: pan-y` when zoom is disabled (#20204) @bernardobelchior
|
|
69
|
+
- [charts] Use `getBBox()` for correct SVG sizes in firefox (#20309) @JCQuintas
|
|
70
|
+
- [charts] Use directly selector from `@mui/x-internals` (#20365) @alexfauquette
|
|
71
|
+
- [charts] Fix unnecessary errors in dev mode (#20380) @JCQuintas
|
|
72
|
+
|
|
73
|
+
#### `@mui/x-charts-pro@8.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
74
|
+
|
|
75
|
+
Same changes as in `@mui/x-charts@8.19.0`, plus:
|
|
76
|
+
|
|
77
|
+
- [charts-pro] Add pan on `wheel` to zoom (#19998) @JCQuintas
|
|
78
|
+
- [charts-pro] Fix zoom slider preview having an opaque background in dark mode (#20367) @bernardobelchior
|
|
79
|
+
|
|
80
|
+
#### `@mui/x-charts-premium@8.19.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
81
|
+
|
|
82
|
+
Same changes as in `@mui/x-charts-pro@8.19.0`.
|
|
83
|
+
|
|
84
|
+
### Tree View
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-tree-view@8.19.0`
|
|
87
|
+
|
|
88
|
+
- [tree view] Enable lazy load when children count is not know in tree view (#18680) @noobyogi0010
|
|
89
|
+
- [tree view] Fix unwanted behaviors on the item re-ordering (#20368) @flaviendelangle
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-tree-view-pro@8.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
92
|
+
|
|
93
|
+
Same changes as in `@mui/x-tree-view@8.19.0`.
|
|
94
|
+
|
|
95
|
+
### Codemod
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-codemod@8.19.0`
|
|
98
|
+
|
|
99
|
+
Internal changes.
|
|
100
|
+
|
|
101
|
+
### Docs
|
|
102
|
+
|
|
103
|
+
- [docs] Add minimum Typescript version to migration guide (#20320) @siriwatknp
|
|
104
|
+
- [docs] Fix Autosizing documentation (#20348) @siriwatknp
|
|
105
|
+
- [docs] Fix separator opacity in demo (#20293) @sai6855
|
|
106
|
+
- [docs] Replace deprecated `LoadingButton` with `Button` component (#20208) @Janpot
|
|
107
|
+
|
|
108
|
+
### Core
|
|
109
|
+
|
|
110
|
+
- [code-infra] Add new broken links checker (#20120) @Janpot
|
|
111
|
+
- [code-infra] Disable Codspeed pipeline (#20370) @JCQuintas
|
|
112
|
+
- [code-infra] Optimize `checkMaterialVersion` (#20307) @Janpot
|
|
113
|
+
- [code-infra] Use utils from code-infra for changelog and PR creation (#20406) @brijeshb42
|
|
114
|
+
- [docs-infra] Revert `@docsearch/react` (#20313) @Janpot
|
|
115
|
+
|
|
116
|
+
### Miscellaneous
|
|
117
|
+
|
|
118
|
+
- [test] Fix browser tests skipping some projects (#20318) @cherniavskii
|
|
119
|
+
- [test] Update `use-react-version` pnpm script (#20319) @cherniavskii
|
|
120
|
+
|
|
121
|
+
## 8.18.0
|
|
122
|
+
|
|
123
|
+
<!-- generated comparing v8.17.0..master -->
|
|
124
|
+
|
|
125
|
+
_Nov 13, 2025_
|
|
126
|
+
|
|
127
|
+
We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
128
|
+
|
|
129
|
+
- Add `barLabelPlacement` property to customize the bar label position in bar charts, enabling labels to be placed above bars.
|
|
130
|
+
|
|
131
|
+

|
|
132
|
+
|
|
133
|
+
- Add `source` property to the date/time picker lifecycle and event handler context, enabling clearer differentiation between changes initiated by the picker UI and those from direct field input.
|
|
134
|
+
- 🐞 Bugfixes
|
|
135
|
+
- 📚 Documentation improvements
|
|
136
|
+
|
|
137
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
138
|
+
@htollefsen, @sai6855, @Sigdriv
|
|
139
|
+
|
|
140
|
+
The following team members contributed to this release:
|
|
141
|
+
@arminmeh, @bernardobelchior, @brijeshb42, @cherniavskii, @flaviendelangle, @JCQuintas, @michelengelen, @noraleonte, @prakhargupta1, @rita-codes, @siriwatknp
|
|
142
|
+
|
|
143
|
+
### Data Grid
|
|
144
|
+
|
|
145
|
+
#### `@mui/x-data-grid@8.18.0`
|
|
146
|
+
|
|
147
|
+
- [DataGrid] Allow default event in the column action cell item click event handler (#20272) @arminmeh
|
|
148
|
+
- [DataGrid] Remove unnecessary generic from `useGridApiRef` (#20277) @cherniavskii
|
|
149
|
+
|
|
150
|
+
#### `@mui/x-data-grid-pro@8.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
151
|
+
|
|
152
|
+
Same changes as in `@mui/x-data-grid@8.18.0`.
|
|
153
|
+
|
|
154
|
+
#### `@mui/x-data-grid-premium@8.18.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
155
|
+
|
|
156
|
+
Same changes as in `@mui/x-data-grid-pro@8.18.0`, plus:
|
|
157
|
+
|
|
158
|
+
- [DataGridPremium] Return the correct `cellParams` value from the aggregation cells (#20224) @arminmeh
|
|
159
|
+
|
|
160
|
+
### Date and Time Pickers
|
|
161
|
+
|
|
162
|
+
#### `@mui/x-date-pickers@8.18.0`
|
|
163
|
+
|
|
164
|
+
- [pickers] Keep invalid date state consistent (#20040) @michelengelen
|
|
165
|
+
- [pickers] Adds new `source` property to `onChange` and `onAccept` context object (#20234) @michelengelen
|
|
166
|
+
|
|
167
|
+
#### `@mui/x-date-pickers-pro@8.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
168
|
+
|
|
169
|
+
Same changes as in `@mui/x-date-pickers@8.18.0`.
|
|
170
|
+
|
|
171
|
+
### Charts
|
|
172
|
+
|
|
173
|
+
#### `@mui/x-charts@8.18.0`
|
|
174
|
+
|
|
175
|
+
- [charts] Add prop for positioning a bar label (#20194) @Sigdriv
|
|
176
|
+
- [charts] Fix applying dark mode styles in `ChartAxisZoomSliderThumb` (#20232) @sai6855
|
|
177
|
+
|
|
178
|
+
#### `@mui/x-charts-pro@8.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
179
|
+
|
|
180
|
+
Same changes as in `@mui/x-charts@8.18.0`, plus:
|
|
181
|
+
|
|
182
|
+
- [charts-pro] Allow specifying Content Security Policy nonce on export (#20053) @bernardobelchior
|
|
183
|
+
- [charts-pro] Fix applying dark mode styles to slider (#20220) @sai6855
|
|
184
|
+
- [charts-pro] Sankey should respect node order (#20065) @JCQuintas
|
|
185
|
+
|
|
186
|
+
#### `@mui/x-charts-premium@8.18.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
187
|
+
|
|
188
|
+
Same changes as in `@mui/x-charts-pro@8.18.0`.
|
|
189
|
+
|
|
190
|
+
### Tree View
|
|
191
|
+
|
|
192
|
+
#### `@mui/x-tree-view@8.18.0`
|
|
193
|
+
|
|
194
|
+
- [tree view] Prepare tests for the new store structure (#20225) @flaviendelangle
|
|
195
|
+
- [tree view] Prepare the item plugin files for the store migration (#20240) @flaviendelangle
|
|
196
|
+
- [tree view] Use `TreeItemId` type instead of raw string (#20233) @flaviendelangle
|
|
197
|
+
|
|
198
|
+
#### `@mui/x-tree-view-pro@8.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
199
|
+
|
|
200
|
+
Same changes as in `@mui/x-tree-view@8.18.0`.
|
|
201
|
+
|
|
202
|
+
### Codemod
|
|
203
|
+
|
|
204
|
+
#### `@mui/x-codemod@8.18.0`
|
|
205
|
+
|
|
206
|
+
Internal changes.
|
|
207
|
+
|
|
208
|
+
### Docs
|
|
209
|
+
|
|
210
|
+
- [charts] Add a demo for a custom tick label (#20073) @prakhargupta1
|
|
211
|
+
- [charts] Create `useAxes()` hook documentation page (#20229) @JCQuintas
|
|
212
|
+
- [charts] Fix logo alignment (#20228) @JCQuintas
|
|
213
|
+
- [charts] Fixes typo in import example (#20236) @htollefsen
|
|
214
|
+
- [Data Grid] Add recipe for cursor pagination with data source (#19700) @siriwatknp
|
|
215
|
+
- [Data Grid] Add a demo for pinned rows aggregation (#20198) @cherniavskii
|
|
216
|
+
|
|
217
|
+
### Core
|
|
218
|
+
|
|
219
|
+
- [docs-infra] Use deployment config from docs-infra package (#20243) @brijeshb42
|
|
220
|
+
|
|
8
221
|
## 8.17.0
|
|
9
222
|
|
|
10
223
|
_Nov 5, 2025_
|
package/DatePicker/DatePicker.js
CHANGED
|
@@ -183,7 +183,10 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
183
183
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
184
184
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
185
185
|
* @param {TValue} value The value that was just accepted.
|
|
186
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
186
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
187
|
+
* - `validationError`: validation result of the current value
|
|
188
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
189
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
187
190
|
*/
|
|
188
191
|
onAccept: _propTypes.default.func,
|
|
189
192
|
/**
|
|
@@ -191,7 +194,10 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
191
194
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
192
195
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
193
196
|
* @param {TValue} value The new value.
|
|
194
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
197
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
198
|
+
* - `validationError`: validation result of the current value
|
|
199
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
200
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
195
201
|
*/
|
|
196
202
|
onChange: _propTypes.default.func,
|
|
197
203
|
/**
|
|
@@ -221,7 +221,10 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
221
221
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
222
222
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
223
223
|
* @param {TValue} value The value that was just accepted.
|
|
224
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
224
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
225
|
+
* - `validationError`: validation result of the current value
|
|
226
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
227
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
225
228
|
*/
|
|
226
229
|
onAccept: _propTypes.default.func,
|
|
227
230
|
/**
|
|
@@ -229,7 +232,10 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
229
232
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
230
233
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
231
234
|
* @param {TValue} value The new value.
|
|
232
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
235
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
236
|
+
* - `validationError`: validation result of the current value
|
|
237
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
238
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
233
239
|
*/
|
|
234
240
|
onChange: _propTypes.default.func,
|
|
235
241
|
/**
|
|
@@ -264,7 +264,8 @@ function DateTimePickerToolbar(inProps) {
|
|
|
264
264
|
meridiemMode,
|
|
265
265
|
handleMeridiemChange
|
|
266
266
|
} = (0, _dateHelpersHooks.useMeridiemMode)(value, ampm, newValue => setValue(newValue, {
|
|
267
|
-
changeImportance: 'set'
|
|
267
|
+
changeImportance: 'set',
|
|
268
|
+
source: 'view'
|
|
268
269
|
}));
|
|
269
270
|
const toolbarVariant = overrides?.forceDesktopVariant ? 'desktop' : variant;
|
|
270
271
|
const isDesktop = toolbarVariant === 'desktop';
|
|
@@ -194,7 +194,10 @@ DesktopDatePicker.propTypes = {
|
|
|
194
194
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
195
195
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
196
196
|
* @param {TValue} value The value that was just accepted.
|
|
197
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
197
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
198
|
+
* - `validationError`: validation result of the current value
|
|
199
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
200
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
198
201
|
*/
|
|
199
202
|
onAccept: _propTypes.default.func,
|
|
200
203
|
/**
|
|
@@ -202,7 +205,10 @@ DesktopDatePicker.propTypes = {
|
|
|
202
205
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
203
206
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
204
207
|
* @param {TValue} value The new value.
|
|
205
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
208
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
209
|
+
* - `validationError`: validation result of the current value
|
|
210
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
211
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
206
212
|
*/
|
|
207
213
|
onChange: _propTypes.default.func,
|
|
208
214
|
/**
|
|
@@ -316,7 +316,10 @@ DesktopDateTimePicker.propTypes = {
|
|
|
316
316
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
317
317
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
318
318
|
* @param {TValue} value The value that was just accepted.
|
|
319
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
319
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
320
|
+
* - `validationError`: validation result of the current value
|
|
321
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
322
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
320
323
|
*/
|
|
321
324
|
onAccept: _propTypes.default.func,
|
|
322
325
|
/**
|
|
@@ -324,7 +327,10 @@ DesktopDateTimePicker.propTypes = {
|
|
|
324
327
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
325
328
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
326
329
|
* @param {TValue} value The new value.
|
|
327
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
330
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
331
|
+
* - `validationError`: validation result of the current value
|
|
332
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
333
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
328
334
|
*/
|
|
329
335
|
onChange: _propTypes.default.func,
|
|
330
336
|
/**
|
|
@@ -198,7 +198,10 @@ DesktopTimePicker.propTypes = {
|
|
|
198
198
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
199
199
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
200
200
|
* @param {TValue} value The value that was just accepted.
|
|
201
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
201
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
202
|
+
* - `validationError`: validation result of the current value
|
|
203
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
204
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
202
205
|
*/
|
|
203
206
|
onAccept: _propTypes.default.func,
|
|
204
207
|
/**
|
|
@@ -206,7 +209,10 @@ DesktopTimePicker.propTypes = {
|
|
|
206
209
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
207
210
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
208
211
|
* @param {TValue} value The new value.
|
|
209
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
212
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
213
|
+
* - `validationError`: validation result of the current value
|
|
214
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
215
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
210
216
|
*/
|
|
211
217
|
onChange: _propTypes.default.func,
|
|
212
218
|
/**
|
|
@@ -192,7 +192,10 @@ MobileDatePicker.propTypes = {
|
|
|
192
192
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
193
193
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
194
194
|
* @param {TValue} value The value that was just accepted.
|
|
195
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
195
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
196
|
+
* - `validationError`: validation result of the current value
|
|
197
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
198
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
196
199
|
*/
|
|
197
200
|
onAccept: _propTypes.default.func,
|
|
198
201
|
/**
|
|
@@ -200,7 +203,10 @@ MobileDatePicker.propTypes = {
|
|
|
200
203
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
201
204
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
202
205
|
* @param {TValue} value The new value.
|
|
203
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
206
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
207
|
+
* - `validationError`: validation result of the current value
|
|
208
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
209
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
204
210
|
*/
|
|
205
211
|
onChange: _propTypes.default.func,
|
|
206
212
|
/**
|
|
@@ -282,7 +282,10 @@ MobileDateTimePicker.propTypes = {
|
|
|
282
282
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
283
283
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
284
284
|
* @param {TValue} value The value that was just accepted.
|
|
285
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
285
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
286
|
+
* - `validationError`: validation result of the current value
|
|
287
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
288
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
286
289
|
*/
|
|
287
290
|
onAccept: _propTypes.default.func,
|
|
288
291
|
/**
|
|
@@ -290,7 +293,10 @@ MobileDateTimePicker.propTypes = {
|
|
|
290
293
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
291
294
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
292
295
|
* @param {TValue} value The new value.
|
|
293
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
296
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
297
|
+
* - `validationError`: validation result of the current value
|
|
298
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
299
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
294
300
|
*/
|
|
295
301
|
onChange: _propTypes.default.func,
|
|
296
302
|
/**
|
|
@@ -183,7 +183,10 @@ MobileTimePicker.propTypes = {
|
|
|
183
183
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
184
184
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
185
185
|
* @param {TValue} value The value that was just accepted.
|
|
186
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
186
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
187
|
+
* - `validationError`: validation result of the current value
|
|
188
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
189
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
187
190
|
*/
|
|
188
191
|
onAccept: _propTypes.default.func,
|
|
189
192
|
/**
|
|
@@ -191,7 +194,10 @@ MobileTimePicker.propTypes = {
|
|
|
191
194
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
192
195
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
193
196
|
* @param {TValue} value The new value.
|
|
194
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
197
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
198
|
+
* - `validationError`: validation result of the current value
|
|
199
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
200
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
195
201
|
*/
|
|
196
202
|
onChange: _propTypes.default.func,
|
|
197
203
|
/**
|
|
@@ -149,7 +149,10 @@ StaticDatePicker.propTypes = {
|
|
|
149
149
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
150
150
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
151
151
|
* @param {TValue} value The value that was just accepted.
|
|
152
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
152
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
153
|
+
* - `validationError`: validation result of the current value
|
|
154
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
155
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
153
156
|
*/
|
|
154
157
|
onAccept: _propTypes.default.func,
|
|
155
158
|
/**
|
|
@@ -157,7 +160,10 @@ StaticDatePicker.propTypes = {
|
|
|
157
160
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
158
161
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
159
162
|
* @param {TValue} value The new value.
|
|
160
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
163
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
164
|
+
* - `validationError`: validation result of the current value
|
|
165
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
166
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
161
167
|
*/
|
|
162
168
|
onChange: _propTypes.default.func,
|
|
163
169
|
/**
|
|
@@ -236,7 +236,10 @@ StaticDateTimePicker.propTypes = {
|
|
|
236
236
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
237
237
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
238
238
|
* @param {TValue} value The value that was just accepted.
|
|
239
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
239
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
240
|
+
* - `validationError`: validation result of the current value
|
|
241
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
242
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
240
243
|
*/
|
|
241
244
|
onAccept: _propTypes.default.func,
|
|
242
245
|
/**
|
|
@@ -244,7 +247,10 @@ StaticDateTimePicker.propTypes = {
|
|
|
244
247
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
245
248
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
246
249
|
* @param {TValue} value The new value.
|
|
247
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
250
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
251
|
+
* - `validationError`: validation result of the current value
|
|
252
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
253
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
248
254
|
*/
|
|
249
255
|
onChange: _propTypes.default.func,
|
|
250
256
|
/**
|
|
@@ -139,7 +139,10 @@ StaticTimePicker.propTypes = {
|
|
|
139
139
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
140
140
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
141
141
|
* @param {TValue} value The value that was just accepted.
|
|
142
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
142
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
143
|
+
* - `validationError`: validation result of the current value
|
|
144
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
145
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
143
146
|
*/
|
|
144
147
|
onAccept: _propTypes.default.func,
|
|
145
148
|
/**
|
|
@@ -147,7 +150,10 @@ StaticTimePicker.propTypes = {
|
|
|
147
150
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
148
151
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
149
152
|
* @param {TValue} value The new value.
|
|
150
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
153
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
154
|
+
* - `validationError`: validation result of the current value
|
|
155
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
156
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
151
157
|
*/
|
|
152
158
|
onChange: _propTypes.default.func,
|
|
153
159
|
/**
|
package/TimePicker/TimePicker.js
CHANGED
|
@@ -171,7 +171,10 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
|
|
|
171
171
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
172
172
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
173
173
|
* @param {TValue} value The value that was just accepted.
|
|
174
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
174
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
175
|
+
* - `validationError`: validation result of the current value
|
|
176
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
177
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
175
178
|
*/
|
|
176
179
|
onAccept: _propTypes.default.func,
|
|
177
180
|
/**
|
|
@@ -179,7 +182,10 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
|
|
|
179
182
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
180
183
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
181
184
|
* @param {TValue} value The new value.
|
|
182
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
185
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
186
|
+
* - `validationError`: validation result of the current value
|
|
187
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
188
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
183
189
|
*/
|
|
184
190
|
onChange: _propTypes.default.func,
|
|
185
191
|
/**
|
|
@@ -145,7 +145,8 @@ function TimePickerToolbar(inProps) {
|
|
|
145
145
|
meridiemMode,
|
|
146
146
|
handleMeridiemChange
|
|
147
147
|
} = (0, _dateHelpersHooks.useMeridiemMode)(value, ampm, newValue => setValue(newValue, {
|
|
148
|
-
changeImportance: 'set'
|
|
148
|
+
changeImportance: 'set',
|
|
149
|
+
source: 'view'
|
|
149
150
|
}));
|
|
150
151
|
const formatSection = format => {
|
|
151
152
|
if (!adapter.isValid(value)) {
|
|
@@ -176,7 +176,10 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
176
176
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
177
177
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
178
178
|
* @param {TValue} value The value that was just accepted.
|
|
179
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
179
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
180
|
+
* - `validationError`: validation result of the current value
|
|
181
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
182
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
180
183
|
*/
|
|
181
184
|
onAccept: PropTypes.func,
|
|
182
185
|
/**
|
|
@@ -184,7 +187,10 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
184
187
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
185
188
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
186
189
|
* @param {TValue} value The new value.
|
|
187
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
190
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
191
|
+
* - `validationError`: validation result of the current value
|
|
192
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
193
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
188
194
|
*/
|
|
189
195
|
onChange: PropTypes.func,
|
|
190
196
|
/**
|
|
@@ -214,7 +214,10 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
214
214
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
215
215
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
216
216
|
* @param {TValue} value The value that was just accepted.
|
|
217
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
217
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
|
|
218
|
+
* - `validationError`: validation result of the current value
|
|
219
|
+
* - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
|
|
220
|
+
* - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
|
|
218
221
|
*/
|
|
219
222
|
onAccept: PropTypes.func,
|
|
220
223
|
/**
|
|
@@ -222,7 +225,10 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
222
225
|
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
|
223
226
|
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
|
224
227
|
* @param {TValue} value The new value.
|
|
225
|
-
* @param {FieldChangeHandlerContext<TError>} context
|
|
228
|
+
* @param {FieldChangeHandlerContext<TError>} context Context about this change:
|
|
229
|
+
* - `validationError`: validation result of the current value
|
|
230
|
+
* - `source`: source of the change. One of 'field' | 'view' | 'unknown'
|
|
231
|
+
* - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
|
|
226
232
|
*/
|
|
227
233
|
onChange: PropTypes.func,
|
|
228
234
|
/**
|
|
@@ -256,7 +256,8 @@ function DateTimePickerToolbar(inProps) {
|
|
|
256
256
|
meridiemMode,
|
|
257
257
|
handleMeridiemChange
|
|
258
258
|
} = useMeridiemMode(value, ampm, newValue => setValue(newValue, {
|
|
259
|
-
changeImportance: 'set'
|
|
259
|
+
changeImportance: 'set',
|
|
260
|
+
source: 'view'
|
|
260
261
|
}));
|
|
261
262
|
const toolbarVariant = overrides?.forceDesktopVariant ? 'desktop' : variant;
|
|
262
263
|
const isDesktop = toolbarVariant === 'desktop';
|