@mui/x-date-pickers 7.3.1 → 7.4.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/AdapterDateFnsJalali/AdapterDateFnsJalali.js +3 -0
- package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.d.ts +104 -0
- package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +545 -0
- package/AdapterDateFnsJalaliV3/index.d.ts +1 -0
- package/AdapterDateFnsJalaliV3/index.js +1 -0
- package/AdapterDateFnsJalaliV3/package.json +6 -0
- package/CHANGELOG.md +141 -5
- package/DatePicker/DatePicker.js +1 -1
- package/DatePicker/shared.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.js +1 -1
- package/DateTimePicker/shared.d.ts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
- package/DesktopTimePicker/DesktopTimePicker.js +1 -1
- package/MobileDatePicker/MobileDatePicker.js +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/MobileTimePicker/MobileTimePicker.js +1 -1
- package/PickersShortcuts/PickersShortcuts.d.ts +5 -0
- package/PickersShortcuts/PickersShortcuts.js +4 -3
- package/StaticDatePicker/StaticDatePicker.js +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/StaticTimePicker/StaticTimePicker.js +1 -1
- package/TimePicker/TimePicker.js +1 -1
- package/TimePicker/shared.d.ts +1 -1
- package/index.js +1 -1
- package/internals/hooks/useField/useField.js +0 -5
- package/internals/hooks/useField/useFieldV7TextField.js +5 -0
- package/internals/hooks/usePicker/usePickerViews.d.ts +1 -1
- package/locales/heIL.js +14 -17
- package/locales/huHU.js +15 -18
- package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.js +3 -0
- package/modern/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +545 -0
- package/modern/AdapterDateFnsJalaliV3/index.js +1 -0
- package/modern/DatePicker/DatePicker.js +1 -1
- package/modern/DateTimePicker/DateTimePicker.js +1 -1
- package/modern/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
- package/modern/DesktopTimePicker/DesktopTimePicker.js +1 -1
- package/modern/MobileDatePicker/MobileDatePicker.js +1 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/modern/MobileTimePicker/MobileTimePicker.js +1 -1
- package/modern/PickersShortcuts/PickersShortcuts.js +4 -3
- package/modern/StaticDatePicker/StaticDatePicker.js +1 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/modern/StaticTimePicker/StaticTimePicker.js +1 -1
- package/modern/TimePicker/TimePicker.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useField/useField.js +0 -5
- package/modern/internals/hooks/useField/useFieldV7TextField.js +5 -0
- package/modern/locales/heIL.js +14 -17
- package/modern/locales/huHU.js +15 -18
- package/node/AdapterDateFnsJalali/AdapterDateFnsJalali.js +3 -0
- package/node/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.js +554 -0
- package/node/AdapterDateFnsJalaliV3/index.js +12 -0
- package/node/DatePicker/DatePicker.js +1 -1
- package/node/DateTimePicker/DateTimePicker.js +1 -1
- package/node/DesktopDatePicker/DesktopDatePicker.js +1 -1
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -1
- package/node/DesktopTimePicker/DesktopTimePicker.js +1 -1
- package/node/MobileDatePicker/MobileDatePicker.js +1 -1
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +1 -1
- package/node/MobileTimePicker/MobileTimePicker.js +1 -1
- package/node/PickersShortcuts/PickersShortcuts.js +4 -3
- package/node/StaticDatePicker/StaticDatePicker.js +1 -1
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/node/StaticTimePicker/StaticTimePicker.js +1 -1
- package/node/TimePicker/TimePicker.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/hooks/useField/useField.js +0 -5
- package/node/internals/hooks/useField/useFieldV7TextField.js +5 -0
- package/node/locales/heIL.js +14 -17
- package/node/locales/huHU.js +15 -18
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,142 @@
|
|
|
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.4.0
|
|
7
|
+
|
|
8
|
+
_May 10, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- ✨ Add optional `id` attribute on shortcut items of the Date and Time Pickers
|
|
13
|
+
- 🎁 Add support for `date-fns-jalali` v3 in the Date and Time Pickers
|
|
14
|
+
- 🚀 Support rounded corners on `BarChart`
|
|
15
|
+
- 🌍 Add accessibility page to TreeView docs
|
|
16
|
+
- 🐞 Bugfixes
|
|
17
|
+
- 📚 Documentation improvements
|
|
18
|
+
|
|
19
|
+
### Data Grid
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid@7.4.0`
|
|
22
|
+
|
|
23
|
+
- [DataGrid] Fix error when focus moves from column header to `svg` element (#13028) @oukunan
|
|
24
|
+
- [DataGrid] Fix error on column groups change (#12965) @romgrk
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-pro@7.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid@7.4.0`.
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-premium@7.4.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid-pro@7.4.0`.
|
|
33
|
+
|
|
34
|
+
### Date and Time Pickers
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-date-pickers@7.4.0`
|
|
37
|
+
|
|
38
|
+
- [fields] Fix regression preventing form submit on "Enter" click (#13065) @LukasTy
|
|
39
|
+
- [pickers] Add `AdapterDateFnsJalaliV3` adapter (#12891) @smmoosavi
|
|
40
|
+
- [pickers] Add optional `id` attribute on shortcut items (#12976) @noraleonte
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-date-pickers-pro@7.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-date-pickers@7.4.0`.
|
|
45
|
+
|
|
46
|
+
### Charts
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-charts@7.4.0`
|
|
49
|
+
|
|
50
|
+
- [charts] Add `ChartsGrid` to `themeAugmentation` (#13026) @noraleonte
|
|
51
|
+
- [charts] Support rounded corners on `BarChart` (#12834) @JCQuintas
|
|
52
|
+
|
|
53
|
+
### Tree View
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-tree-view@7.4.0`
|
|
56
|
+
|
|
57
|
+
- [TreeView] Fix props propagation and theme entry in `TreeItem2` (#12889) @flaviendelangle
|
|
58
|
+
|
|
59
|
+
### Docs
|
|
60
|
+
|
|
61
|
+
- [docs] Add accessibility page to TreeView docs (#12845) @noraleonte
|
|
62
|
+
- [docs] Fix Charts styling typos (#13061) @oliviertassinari
|
|
63
|
+
- [docs] Fix legal link to EULA free trial (#13013) @oliviertassinari
|
|
64
|
+
- [docs] Update interface name in pinned columns docs (#13070) @cherniavskii
|
|
65
|
+
|
|
66
|
+
### Core
|
|
67
|
+
|
|
68
|
+
- [core] Improve release process docs (#12977) @JCQuintas
|
|
69
|
+
- [core] Prepare React 19 (#12991) @oliviertassinari
|
|
70
|
+
- [docs-infra] Fix Netlify PR preview path (#12993) @oliviertassinari
|
|
71
|
+
- [infra] Automation: Add release PR reviewers (#12982) @michelengelen
|
|
72
|
+
|
|
73
|
+
## 7.3.2
|
|
74
|
+
|
|
75
|
+
_May 2, 2024_
|
|
76
|
+
|
|
77
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
78
|
+
|
|
79
|
+
- 🎁 Add "no data" and "loading" states to charts, allowing users to create [custom visualizations for each state](https://mui.com/x/react-charts/styling/#overlay)
|
|
80
|
+
- 🌍 Improve Hebrew (he-IL) and Hungarian (hu-HU) locales on the Date and Time Pickers
|
|
81
|
+
- 🌍 Improve Danish (da-DK) and Slovak (sk-SK) locales on the Data Grid
|
|
82
|
+
- 📝 Fix a [typo](https://github.com/mui/mui-x/pull/12941/files/4bf4bffbc2799a01a96bc7458a17318cf41c1722#diff-26c31cc69d6f51110f89e339578ef9b3d4a3551f79077fff73f7babb81c5099f) in the auto-generated Charts gradient `id` attribute.
|
|
83
|
+
It should not affect you, but if you were relying on the gradient `id` attribute, please update your usage.
|
|
84
|
+
- 🐞 Bugfixes
|
|
85
|
+
- 📚 Documentation improvements
|
|
86
|
+
|
|
87
|
+
### Data Grid
|
|
88
|
+
|
|
89
|
+
#### `@mui/x-data-grid@7.3.2`
|
|
90
|
+
|
|
91
|
+
- [DataGrid] Allow to change reset text in the columns management panel (#12972) @MBilalShafi
|
|
92
|
+
- [DataGrid] Derive `formattedValue` from the edit value when passing to `renderEditCell` (#12870) @cherniavskii
|
|
93
|
+
- [DataGrid] Fix rows not being recomputed on `props.rowCount` change (#12833) @MBilalShafi
|
|
94
|
+
- [l10n] Improve Danish (da-DK) locale (#12844) @fosterbuster
|
|
95
|
+
- [l10n] Improve Slovak (sk-SK) locale (#12949) @stefikp
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-data-grid-pro@7.3.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
98
|
+
|
|
99
|
+
Same changes as in `@mui/x-data-grid@7.3.2`.
|
|
100
|
+
|
|
101
|
+
#### `@mui/x-data-grid-premium@7.3.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
102
|
+
|
|
103
|
+
Same changes as in `@mui/x-data-grid-pro@7.3.2`, plus:
|
|
104
|
+
|
|
105
|
+
- [DataGridPremium] Fix print export not working with row grouping (#12957) @MBilalShafi
|
|
106
|
+
|
|
107
|
+
### Date and Time Pickers
|
|
108
|
+
|
|
109
|
+
#### `@mui/x-date-pickers@7.3.2`
|
|
110
|
+
|
|
111
|
+
- [l10n] Improve Hebrew (he-IL) locale (#12910) @michaelNXT1
|
|
112
|
+
- [l10n] Improve Hungarian (hu-HU) locale (#12930) @noherczeg
|
|
113
|
+
- [pickers] Fix typo on the `viewRenderers` prop description (#12915) @flaviendelangle
|
|
114
|
+
- [pickers] Improve TypeScript performance in `PickersDay` (#12920) @flaviendelangle
|
|
115
|
+
|
|
116
|
+
#### `@mui/x-date-pickers-pro@7.3.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
117
|
+
|
|
118
|
+
Same changes as in `@mui/x-date-pickers@7.3.2`.
|
|
119
|
+
|
|
120
|
+
### Charts
|
|
121
|
+
|
|
122
|
+
#### `@mui/x-charts@7.3.2`
|
|
123
|
+
|
|
124
|
+
- [charts] Add an overlay for "no data" or "loading" states (#12817) @alexfauquette
|
|
125
|
+
- [charts] Fix typos in documentation, translations and errors (#12941) @JCQuintas
|
|
126
|
+
- [charts] Fix `prop.slots` and `prop.slotProps` not passed to `<ChartsTooltip />` (#12939) @JCQuintas
|
|
127
|
+
|
|
128
|
+
### Docs
|
|
129
|
+
|
|
130
|
+
- [docs] Improve Data Grid migration guide (#12969) @MBilalShafi
|
|
131
|
+
- [docs] Polish references to the plans (#12922) @oliviertassinari
|
|
132
|
+
|
|
133
|
+
### Core
|
|
134
|
+
|
|
135
|
+
- [core] Fix dependencies (#12951) @LukasTy
|
|
136
|
+
- [core] Remove inconsistent blank lines (#12966) @oliviertassinari
|
|
137
|
+
- [code-infra] Bump node image used by CI in docker (#12961) @LukasTy
|
|
138
|
+
- [docs-infra] Remove no longer needed `next.config` settings (#12861) @oliviertassinari
|
|
139
|
+
- [docs-infra] Use the `@mui/docs/HighlightedCode` (#12848) @alexfauquette
|
|
140
|
+
- [test] Restore `t` command (#12948) @LukasTy
|
|
141
|
+
|
|
6
142
|
## 7.3.1
|
|
7
143
|
|
|
8
144
|
_Apr 26, 2024_
|
|
@@ -305,7 +441,7 @@ Same changes as in `@mui/x-date-pickers@7.1.1`, plus:
|
|
|
305
441
|
|
|
306
442
|
- [TreeView] Add JSDoc to all `publicAPI` methods (#12649) @flaviendelangle
|
|
307
443
|
- [TreeView] Create `RichTreeViewPro` component (not released yet) (#12610) @flaviendelangle
|
|
308
|
-
- [TreeView] Create
|
|
444
|
+
- [TreeView] Create Pro package (not released yet) (#12240) @flaviendelangle
|
|
309
445
|
- [TreeView] Fix typo in errors (#12623) @alissa-tung
|
|
310
446
|
- [TreeView] New API method: `setItemExpansion` (#12595) @flaviendelangle
|
|
311
447
|
|
|
@@ -2517,7 +2653,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.3`.
|
|
|
2517
2653
|
- [core] Make `@mui/system` a direct dependency (#11128) @LukasTy
|
|
2518
2654
|
- [core] Remove blank lines, coding style @oliviertassinari
|
|
2519
2655
|
- [core] Remove outdated `ENABLE_AD` env variable (#11181) @oliviertassinari
|
|
2520
|
-
- [github] Do not add `plan: Pro` and `plan: Premium` labels on
|
|
2656
|
+
- [github] Do not add `plan: Pro` and `plan: Premium` labels on Pro / Premium issue templates (#10183) @flaviendelangle
|
|
2521
2657
|
|
|
2522
2658
|
## 7.0.0-alpha.2
|
|
2523
2659
|
|
|
@@ -3440,10 +3576,10 @@ Same changes as in `@mui/x-date-pickers@6.19.5`.
|
|
|
3440
3576
|
- [docs] Fix the Treemap illustration (#12189) @danilo-leal
|
|
3441
3577
|
- [docs] Fix typo for `AdapterDateFnsV3` (#12037) @flaviendelangle
|
|
3442
3578
|
- [docs] Improve performance on Charts entry point @oliviertassinari
|
|
3443
|
-
- [docs] Move Heatmap to
|
|
3579
|
+
- [docs] Move Heatmap to Pro (#12170) @alexfauquette
|
|
3444
3580
|
- [docs] Remove Charts installation next tag call-out (#12133) @LukasTy
|
|
3445
3581
|
- [docs] Removed `focused` prop from demo (#12126) @michelengelen
|
|
3446
|
-
- [docs] Add missing Heatmap
|
|
3582
|
+
- [docs] Add missing Heatmap Pro icon @oliviertassinari
|
|
3447
3583
|
- [docs] Add more illustrations to the Overview page (#12041) @danilo-leal
|
|
3448
3584
|
- [docs] Avoid use of shorthand (#12009) @oliviertassinari
|
|
3449
3585
|
|
|
@@ -6170,7 +6306,7 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
6170
6306
|
- [docs] Create examples of pickers with custom fields (#8034) @flaviendelangle
|
|
6171
6307
|
- [docs] Fix 301 redirections @oliviertassinari
|
|
6172
6308
|
- [docs] Fix link to React's docs @oliviertassinari
|
|
6173
|
-
- [docs] Fix
|
|
6309
|
+
- [docs] Fix Pro license links to point to the same page (#8303) @LukasTy
|
|
6174
6310
|
- [docs] Give an incentive to upgrade (#8269) @oliviertassinari
|
|
6175
6311
|
- [docs] Improve contrast on data grid navigation (#8239) @oliviertassinari
|
|
6176
6312
|
- [docs] Update shortcuts page to use slotProps (#8288) @dcorb
|
package/DatePicker/DatePicker.js
CHANGED
|
@@ -334,7 +334,7 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
|
|
|
334
334
|
/**
|
|
335
335
|
* Define custom view renderers for each section.
|
|
336
336
|
* If `null`, the section will only have field editing.
|
|
337
|
-
* If `undefined`, internally defined view will be
|
|
337
|
+
* If `undefined`, internally defined view will be used.
|
|
338
338
|
*/
|
|
339
339
|
viewRenderers: PropTypes.shape({
|
|
340
340
|
day: PropTypes.func,
|
package/DatePicker/shared.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface BaseDatePickerProps<TDate extends PickerValidDate> extends Base
|
|
|
33
33
|
/**
|
|
34
34
|
* Define custom view renderers for each section.
|
|
35
35
|
* If `null`, the section will only have field editing.
|
|
36
|
-
* If `undefined`, internally defined view will be
|
|
36
|
+
* If `undefined`, internally defined view will be used.
|
|
37
37
|
*/
|
|
38
38
|
viewRenderers?: Partial<DatePickerViewRenderers<TDate, DateView>>;
|
|
39
39
|
}
|
|
@@ -401,7 +401,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
|
|
|
401
401
|
/**
|
|
402
402
|
* Define custom view renderers for each section.
|
|
403
403
|
* If `null`, the section will only have field editing.
|
|
404
|
-
* If `undefined`, internally defined view will be
|
|
404
|
+
* If `undefined`, internally defined view will be used.
|
|
405
405
|
*/
|
|
406
406
|
viewRenderers: PropTypes.shape({
|
|
407
407
|
day: PropTypes.func,
|
|
@@ -55,7 +55,7 @@ export interface BaseDateTimePickerProps<TDate extends PickerValidDate, TView ex
|
|
|
55
55
|
/**
|
|
56
56
|
* Define custom view renderers for each section.
|
|
57
57
|
* If `null`, the section will only have field editing.
|
|
58
|
-
* If `undefined`, internally defined view will be
|
|
58
|
+
* If `undefined`, internally defined view will be used.
|
|
59
59
|
*/
|
|
60
60
|
viewRenderers?: Partial<DateTimePickerViewRenderers<TDate, TView>>;
|
|
61
61
|
}
|
|
@@ -349,7 +349,7 @@ DesktopDatePicker.propTypes = {
|
|
|
349
349
|
/**
|
|
350
350
|
* Define custom view renderers for each section.
|
|
351
351
|
* If `null`, the section will only have field editing.
|
|
352
|
-
* If `undefined`, internally defined view will be
|
|
352
|
+
* If `undefined`, internally defined view will be used.
|
|
353
353
|
*/
|
|
354
354
|
viewRenderers: PropTypes.shape({
|
|
355
355
|
day: PropTypes.func,
|
|
@@ -501,7 +501,7 @@ DesktopDateTimePicker.propTypes = {
|
|
|
501
501
|
/**
|
|
502
502
|
* Define custom view renderers for each section.
|
|
503
503
|
* If `null`, the section will only have field editing.
|
|
504
|
-
* If `undefined`, internally defined view will be
|
|
504
|
+
* If `undefined`, internally defined view will be used.
|
|
505
505
|
*/
|
|
506
506
|
viewRenderers: PropTypes.shape({
|
|
507
507
|
day: PropTypes.func,
|
|
@@ -336,7 +336,7 @@ DesktopTimePicker.propTypes = {
|
|
|
336
336
|
/**
|
|
337
337
|
* Define custom view renderers for each section.
|
|
338
338
|
* If `null`, the section will only have field editing.
|
|
339
|
-
* If `undefined`, internally defined view will be
|
|
339
|
+
* If `undefined`, internally defined view will be used.
|
|
340
340
|
*/
|
|
341
341
|
viewRenderers: PropTypes.shape({
|
|
342
342
|
hours: PropTypes.func,
|
|
@@ -346,7 +346,7 @@ MobileDatePicker.propTypes = {
|
|
|
346
346
|
/**
|
|
347
347
|
* Define custom view renderers for each section.
|
|
348
348
|
* If `null`, the section will only have field editing.
|
|
349
|
-
* If `undefined`, internally defined view will be
|
|
349
|
+
* If `undefined`, internally defined view will be used.
|
|
350
350
|
*/
|
|
351
351
|
viewRenderers: PropTypes.shape({
|
|
352
352
|
day: PropTypes.func,
|
|
@@ -402,7 +402,7 @@ MobileDateTimePicker.propTypes = {
|
|
|
402
402
|
/**
|
|
403
403
|
* Define custom view renderers for each section.
|
|
404
404
|
* If `null`, the section will only have field editing.
|
|
405
|
-
* If `undefined`, internally defined view will be
|
|
405
|
+
* If `undefined`, internally defined view will be used.
|
|
406
406
|
*/
|
|
407
407
|
viewRenderers: PropTypes.shape({
|
|
408
408
|
day: PropTypes.func,
|
|
@@ -294,7 +294,7 @@ MobileTimePicker.propTypes = {
|
|
|
294
294
|
/**
|
|
295
295
|
* Define custom view renderers for each section.
|
|
296
296
|
* If `null`, the section will only have field editing.
|
|
297
|
-
* If `undefined`, internally defined view will be
|
|
297
|
+
* If `undefined`, internally defined view will be used.
|
|
298
298
|
*/
|
|
299
299
|
viewRenderers: PropTypes.shape({
|
|
300
300
|
hours: PropTypes.func,
|
|
@@ -6,6 +6,11 @@ interface PickersShortcutsItemGetValueParams<TValue> {
|
|
|
6
6
|
export interface PickersShortcutsItem<TValue> {
|
|
7
7
|
label: string;
|
|
8
8
|
getValue: (params: PickersShortcutsItemGetValueParams<TValue>) => TValue;
|
|
9
|
+
/**
|
|
10
|
+
* Identifier of the shortcut.
|
|
11
|
+
* If provided, it will be used as the key of the shortcut.
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
9
14
|
}
|
|
10
15
|
export type PickersShortcutsItemContext = Omit<PickersShortcutsItem<unknown>, 'getValue'>;
|
|
11
16
|
export type PickerShortcutChangeImportance = 'set' | 'accept';
|
|
@@ -37,13 +37,13 @@ function PickersShortcuts(props) {
|
|
|
37
37
|
const newValue = getValue({
|
|
38
38
|
isValid
|
|
39
39
|
});
|
|
40
|
-
return {
|
|
40
|
+
return _extends({}, item, {
|
|
41
41
|
label: item.label,
|
|
42
42
|
onClick: () => {
|
|
43
43
|
onChange(newValue, changeImportance, item);
|
|
44
44
|
},
|
|
45
45
|
disabled: !isValid(newValue)
|
|
46
|
-
};
|
|
46
|
+
});
|
|
47
47
|
});
|
|
48
48
|
return /*#__PURE__*/_jsx(List, _extends({
|
|
49
49
|
dense: true,
|
|
@@ -56,7 +56,7 @@ function PickersShortcuts(props) {
|
|
|
56
56
|
children: resolvedItems.map(item => {
|
|
57
57
|
return /*#__PURE__*/_jsx(ListItem, {
|
|
58
58
|
children: /*#__PURE__*/_jsx(Chip, _extends({}, item))
|
|
59
|
-
}, item.label);
|
|
59
|
+
}, item.id ?? item.label);
|
|
60
60
|
})
|
|
61
61
|
}));
|
|
62
62
|
}
|
|
@@ -95,6 +95,7 @@ process.env.NODE_ENV !== "production" ? PickersShortcuts.propTypes = {
|
|
|
95
95
|
*/
|
|
96
96
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
97
97
|
getValue: PropTypes.func.isRequired,
|
|
98
|
+
id: PropTypes.string,
|
|
98
99
|
label: PropTypes.string.isRequired
|
|
99
100
|
})),
|
|
100
101
|
onChange: PropTypes.func.isRequired,
|
|
@@ -276,7 +276,7 @@ StaticDatePicker.propTypes = {
|
|
|
276
276
|
/**
|
|
277
277
|
* Define custom view renderers for each section.
|
|
278
278
|
* If `null`, the section will only have field editing.
|
|
279
|
-
* If `undefined`, internally defined view will be
|
|
279
|
+
* If `undefined`, internally defined view will be used.
|
|
280
280
|
*/
|
|
281
281
|
viewRenderers: PropTypes.shape({
|
|
282
282
|
day: PropTypes.func,
|
|
@@ -332,7 +332,7 @@ StaticDateTimePicker.propTypes = {
|
|
|
332
332
|
/**
|
|
333
333
|
* Define custom view renderers for each section.
|
|
334
334
|
* If `null`, the section will only have field editing.
|
|
335
|
-
* If `undefined`, internally defined view will be
|
|
335
|
+
* If `undefined`, internally defined view will be used.
|
|
336
336
|
*/
|
|
337
337
|
viewRenderers: PropTypes.shape({
|
|
338
338
|
day: PropTypes.func,
|
|
@@ -223,7 +223,7 @@ StaticTimePicker.propTypes = {
|
|
|
223
223
|
/**
|
|
224
224
|
* Define custom view renderers for each section.
|
|
225
225
|
* If `null`, the section will only have field editing.
|
|
226
|
-
* If `undefined`, internally defined view will be
|
|
226
|
+
* If `undefined`, internally defined view will be used.
|
|
227
227
|
*/
|
|
228
228
|
viewRenderers: PropTypes.shape({
|
|
229
229
|
hours: PropTypes.func,
|
package/TimePicker/TimePicker.js
CHANGED
|
@@ -300,7 +300,7 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
|
|
|
300
300
|
/**
|
|
301
301
|
* Define custom view renderers for each section.
|
|
302
302
|
* If `null`, the section will only have field editing.
|
|
303
|
-
* If `undefined`, internally defined view will be
|
|
303
|
+
* If `undefined`, internally defined view will be used.
|
|
304
304
|
*/
|
|
305
305
|
viewRenderers: PropTypes.shape({
|
|
306
306
|
hours: PropTypes.func,
|
package/TimePicker/shared.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export interface BaseTimePickerProps<TDate extends PickerValidDate, TView extend
|
|
|
40
40
|
/**
|
|
41
41
|
* Define custom view renderers for each section.
|
|
42
42
|
* If `null`, the section will only have field editing.
|
|
43
|
-
* If `undefined`, internally defined view will be
|
|
43
|
+
* If `undefined`, internally defined view will be used.
|
|
44
44
|
*/
|
|
45
45
|
viewRenderers?: Partial<TimePickerViewRenderers<TDate, TView>>;
|
|
46
46
|
}
|
package/index.js
CHANGED
|
@@ -282,6 +282,11 @@ export const useFieldV7TextField = params => {
|
|
|
282
282
|
revertDOMSectionChange(sectionIndex);
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
|
+
const inputType = event.nativeEvent.inputType;
|
|
286
|
+
if (inputType === 'insertParagraph' || inputType === 'insertLineBreak') {
|
|
287
|
+
revertDOMSectionChange(sectionIndex);
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
285
290
|
resetCharacterQuery();
|
|
286
291
|
clearActiveSection();
|
|
287
292
|
return;
|
|
@@ -30,7 +30,7 @@ export interface UsePickerViewsBaseProps<TValue, TDate extends PickerValidDate,
|
|
|
30
30
|
disabled?: boolean;
|
|
31
31
|
/**
|
|
32
32
|
* If `null`, the section will only have field editing.
|
|
33
|
-
* If `undefined`, internally defined view will be
|
|
33
|
+
* If `undefined`, internally defined view will be used.
|
|
34
34
|
*/
|
|
35
35
|
viewRenderers: PickerViewRendererLookup<TValue, TView, TExternalProps, TAdditionalProps>;
|
|
36
36
|
/**
|
package/locales/heIL.js
CHANGED
|
@@ -16,11 +16,10 @@ const heILPickers = {
|
|
|
16
16
|
// DateRange labels
|
|
17
17
|
start: 'תחילה',
|
|
18
18
|
end: 'סיום',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
startDate: 'תאריך תחילה',
|
|
20
|
+
startTime: 'שעת תחילה',
|
|
21
|
+
endDate: 'תאריך סיום',
|
|
22
|
+
endTime: 'שעת סיום',
|
|
24
23
|
// Action bar
|
|
25
24
|
cancelButtonLabel: 'ביטול',
|
|
26
25
|
clearButtonLabel: 'ניקוי',
|
|
@@ -46,8 +45,7 @@ const heILPickers = {
|
|
|
46
45
|
// Open picker labels
|
|
47
46
|
openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `בחירת תאריך, התאריך שנבחר הוא ${utils.format(value, 'fullDate')}` : 'בחירת תאריך',
|
|
48
47
|
openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `בחירת שעה, השעה שנבחרה היא ${utils.format(value, 'fullTime')}` : 'בחירת שעה',
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
fieldClearLabel: 'נקה ערך',
|
|
51
49
|
// Table labels
|
|
52
50
|
timeTableLabel: 'בחירת שעה',
|
|
53
51
|
dateTableLabel: 'בחירת תאריך',
|
|
@@ -59,19 +57,18 @@ const heILPickers = {
|
|
|
59
57
|
fieldHoursPlaceholder: () => 'hh',
|
|
60
58
|
fieldMinutesPlaceholder: () => 'mm',
|
|
61
59
|
fieldSecondsPlaceholder: () => 'ss',
|
|
62
|
-
fieldMeridiemPlaceholder: () => 'aa'
|
|
63
|
-
|
|
60
|
+
fieldMeridiemPlaceholder: () => 'aa',
|
|
64
61
|
// View names
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
year: 'שנה',
|
|
63
|
+
month: 'חודש',
|
|
64
|
+
day: 'יום',
|
|
65
|
+
weekDay: 'יום בשבוע',
|
|
66
|
+
hours: 'שעות',
|
|
67
|
+
minutes: 'דקות',
|
|
68
|
+
seconds: 'שניות',
|
|
72
69
|
// meridiem: 'Meridiem',
|
|
73
70
|
|
|
74
71
|
// Common
|
|
75
|
-
|
|
72
|
+
empty: 'ריק'
|
|
76
73
|
};
|
|
77
74
|
export const heIL = getPickersLocalization(heILPickers);
|
package/locales/huHU.js
CHANGED
|
@@ -17,11 +17,10 @@ const huHUPickers = {
|
|
|
17
17
|
// DateRange labels
|
|
18
18
|
start: 'Kezdő dátum',
|
|
19
19
|
end: 'Záró dátum',
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
startDate: 'Kezdő dátum',
|
|
21
|
+
startTime: 'Kezdő idő',
|
|
22
|
+
endDate: 'Záró dátum',
|
|
23
|
+
endTime: 'Záró idő',
|
|
25
24
|
// Action bar
|
|
26
25
|
cancelButtonLabel: 'Mégse',
|
|
27
26
|
clearButtonLabel: 'Törlés',
|
|
@@ -55,23 +54,21 @@ const huHUPickers = {
|
|
|
55
54
|
fieldYearPlaceholder: params => 'É'.repeat(params.digitAmount),
|
|
56
55
|
fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'HHHH' : 'HH',
|
|
57
56
|
fieldDayPlaceholder: () => 'NN',
|
|
58
|
-
|
|
57
|
+
fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'NNNN' : 'NN',
|
|
59
58
|
fieldHoursPlaceholder: () => 'óó',
|
|
60
59
|
fieldMinutesPlaceholder: () => 'pp',
|
|
61
60
|
fieldSecondsPlaceholder: () => 'mm',
|
|
62
|
-
fieldMeridiemPlaceholder: () => 'dd'
|
|
63
|
-
|
|
61
|
+
fieldMeridiemPlaceholder: () => 'dd',
|
|
64
62
|
// View names
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
year: 'Év',
|
|
64
|
+
month: 'Hónap',
|
|
65
|
+
day: 'Nap',
|
|
66
|
+
weekDay: 'Hétköznap',
|
|
67
|
+
hours: timeViews.hours,
|
|
68
|
+
minutes: timeViews.minutes,
|
|
69
|
+
seconds: timeViews.seconds,
|
|
70
|
+
meridiem: timeViews.meridiem,
|
|
74
71
|
// Common
|
|
75
|
-
|
|
72
|
+
empty: 'Üres'
|
|
76
73
|
};
|
|
77
74
|
export const huHU = getPickersLocalization(huHUPickers);
|
|
@@ -527,6 +527,9 @@ export class AdapterDateFnsJalali {
|
|
|
527
527
|
}
|
|
528
528
|
return years;
|
|
529
529
|
};
|
|
530
|
+
if (typeof addDays !== 'function') {
|
|
531
|
+
throw new Error(['MUI: The `date-fns-jalali` package v3.x is not compatible with this adapter.', 'Please, install v2.x of the package or use the `AdapterDateFnsJalaliV3` instead.'].join('\n'));
|
|
532
|
+
}
|
|
530
533
|
this.locale = _locale;
|
|
531
534
|
this.formats = _extends({}, defaultFormats, formats);
|
|
532
535
|
}
|