@mui/x-date-pickers 6.14.0 → 6.15.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 +83 -0
- package/index.js +1 -1
- package/internals/hooks/useField/useField.utils.js +8 -3
- package/legacy/index.js +1 -1
- package/legacy/internals/hooks/useField/useField.utils.js +16 -8
- package/legacy/locales/fiFI.js +25 -11
- package/locales/fiFI.js +9 -11
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useField/useField.utils.js +8 -3
- package/modern/locales/fiFI.js +9 -11
- package/node/index.js +1 -1
- package/node/internals/hooks/useField/useField.utils.js +8 -3
- package/node/locales/fiFI.js +9 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,89 @@
|
|
|
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
|
+
## 6.15.0
|
|
7
|
+
|
|
8
|
+
_Sep 22, 2023_
|
|
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
|
+
- 🚀 Implement columns auto-sizing (#10180) @romgrk
|
|
13
|
+
- 🎁 Add support for `getRowsToExport` option to print export on the data grid (#10084) @zreecespieces
|
|
14
|
+
- 🌍 Improve Finnish (fi-FI) locale
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
|
|
18
|
+
### Data Grid
|
|
19
|
+
|
|
20
|
+
#### `@mui/x-data-grid@6.15.0`
|
|
21
|
+
|
|
22
|
+
- [DataGrid] Add support for `getRowsToExport` option to print export (#10084) @zreecespieces
|
|
23
|
+
- [DataGrid] Fix dev warning about `InputLabelProps` (#10413) @romgrk
|
|
24
|
+
- [DataGrid] Refactor `GridMenu` prop `onClickAway` to `onClose` (#10411) @romgrk
|
|
25
|
+
- [DataGrid] Restore focus after `GridMenu` closes (#10412) @romgrk
|
|
26
|
+
- [DataGrid] Fix typing of `GridActionsCellItem` (#10344) @romgrk
|
|
27
|
+
- [DataGrid] Hide `eval` from bundlers (#10329) @romgrk
|
|
28
|
+
- [DataGrid] Add `border: 0` to unmounted focused cell to avoid layout shifts in that row (#10318) @lauri865
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-pro@6.15.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid@6.15.0`, plus:
|
|
33
|
+
|
|
34
|
+
- [DataGridPro] Implement columns auto-sizing (#10180) @romgrk
|
|
35
|
+
- [DataGridPro] Fix keyboard navigation issue in header filters (#10358) @MBilalShafi
|
|
36
|
+
- [DataGridPro] Add missing row hover styles (#10252) @cherniavskii
|
|
37
|
+
- [DataGridPro] Make default filter items have stable references in header filters (#10338) @MBilalShafi
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-data-grid-premium@6.15.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
40
|
+
|
|
41
|
+
Same changes as in `@mui/x-data-grid-pro@6.15.0`.
|
|
42
|
+
|
|
43
|
+
### Date Pickers
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-date-pickers@6.15.0`
|
|
46
|
+
|
|
47
|
+
- [pickers] Support tokens without spaces (#10185) @alexfauquette
|
|
48
|
+
- [l10n] Improve Finnish (fi-FI) locale (#10346) @samijouppila
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-date-pickers-pro@6.15.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
51
|
+
|
|
52
|
+
Same changes as in `@mui/x-date-pickers@6.15.0`.
|
|
53
|
+
|
|
54
|
+
### Charts / `@mui/x-charts@6.0.0-alpha.12`
|
|
55
|
+
|
|
56
|
+
- [charts] Fix sparkline scale and rendering (#10402) @alexfauquette
|
|
57
|
+
- [charts] Remove components from `@mui/material` (#10115) @alexfauquette
|
|
58
|
+
|
|
59
|
+
### Tree View / `@mui/x-tree-view@6.0.0-alpha.4`
|
|
60
|
+
|
|
61
|
+
- [TreeView] Split features into plugins to prepare for Pro version (#10123) @flaviendelangle
|
|
62
|
+
|
|
63
|
+
### Docs
|
|
64
|
+
|
|
65
|
+
- [docs] Add charts documentation pages to complete pricing table (#10394) @alexfauquette
|
|
66
|
+
- [docs] Add missing MIT packages on the Licensing page (#10348) @flaviendelangle
|
|
67
|
+
- [docs] Clearer component pattern @oliviertassinari
|
|
68
|
+
- [docs] Easier to understand demo (#10370) @oliviertassinari
|
|
69
|
+
- [docs] Fix `301` to Material UI @oliviertassinari
|
|
70
|
+
- [docs] Improve the column visibility section (#10327) @MBilalShafi
|
|
71
|
+
- [docs] Improve the documentation section `rowIdentifier` (#10326) @MBilalShafi
|
|
72
|
+
- [docs] Improve pickers localization documentation (#10202) @flaviendelangle
|
|
73
|
+
- [docs] Polish typescript ref usage (#10359) @oliviertassinari
|
|
74
|
+
- [docs] Improve charts tooltip wording (#10406) @alexfauquette
|
|
75
|
+
|
|
76
|
+
### Core
|
|
77
|
+
|
|
78
|
+
- [core] Cleanup GitHub issues template (#10372) @romgrk
|
|
79
|
+
- [core] Fix Circle CI OOM (#10385) @romgrk
|
|
80
|
+
- [core] Improve sleep test helper @oliviertassinari
|
|
81
|
+
- [core] Remove unwanted prefixes @oliviertassinari
|
|
82
|
+
- [core] Remove duplicate label @oliviertassinari
|
|
83
|
+
- [core] Simplify source @oliviertassinari
|
|
84
|
+
- [core] Upgrade monorepo (#10425) @cherniavskii
|
|
85
|
+
- [core] Upgrade monorepo to have the new typescript-to-proptype (#10224) @flaviendelangle
|
|
86
|
+
- [test] Do not use deprecated adapter methods (#10416) @flaviendelangle
|
|
87
|
+
- [test] Name test suites according to sentence case (#10429) @alexfauquette
|
|
88
|
+
|
|
6
89
|
## 6.14.0
|
|
7
90
|
|
|
8
91
|
_Sep 14, 2023_
|
package/index.js
CHANGED
|
@@ -385,15 +385,20 @@ export const splitFormatIntoSections = (utils, timezone, localeText, format, dat
|
|
|
385
385
|
const escapedParts = getEscapedPartsFromFormat(utils, expandedFormat);
|
|
386
386
|
|
|
387
387
|
// This RegExp test if the beginning of a string correspond to a supported token
|
|
388
|
-
const isTokenStartRegExp = new RegExp(`^(${Object.keys(utils.formatTokenMap).
|
|
388
|
+
const isTokenStartRegExp = new RegExp(`^(${Object.keys(utils.formatTokenMap).sort((a, b) => b.length - a.length) // Sort to put longest word first
|
|
389
|
+
.join('|')})`, 'g') // used to get access to lastIndex state
|
|
390
|
+
;
|
|
391
|
+
|
|
389
392
|
let currentTokenValue = '';
|
|
390
393
|
for (let i = 0; i < expandedFormat.length; i += 1) {
|
|
391
394
|
const escapedPartOfCurrentChar = escapedParts.find(escapeIndex => escapeIndex.start <= i && escapeIndex.end >= i);
|
|
392
395
|
const char = expandedFormat[i];
|
|
393
396
|
const isEscapedChar = escapedPartOfCurrentChar != null;
|
|
394
397
|
const potentialToken = `${currentTokenValue}${expandedFormat.slice(i)}`;
|
|
395
|
-
|
|
396
|
-
|
|
398
|
+
const regExpMatch = isTokenStartRegExp.test(potentialToken);
|
|
399
|
+
if (!isEscapedChar && char.match(/([A-Za-z]+)/) && regExpMatch) {
|
|
400
|
+
currentTokenValue = potentialToken.slice(0, isTokenStartRegExp.lastIndex);
|
|
401
|
+
i += isTokenStartRegExp.lastIndex - 1;
|
|
397
402
|
} else {
|
|
398
403
|
// If we are on the opening or closing character of an escaped part of the format,
|
|
399
404
|
// Then we ignore this character.
|
package/legacy/index.js
CHANGED
|
@@ -396,21 +396,28 @@ export var splitFormatIntoSections = function splitFormatIntoSections(utils, tim
|
|
|
396
396
|
var escapedParts = getEscapedPartsFromFormat(utils, expandedFormat);
|
|
397
397
|
|
|
398
398
|
// This RegExp test if the beginning of a string correspond to a supported token
|
|
399
|
-
var isTokenStartRegExp = new RegExp("^(".concat(Object.keys(utils.formatTokenMap).
|
|
399
|
+
var isTokenStartRegExp = new RegExp("^(".concat(Object.keys(utils.formatTokenMap).sort(function (a, b) {
|
|
400
|
+
return b.length - a.length;
|
|
401
|
+
}) // Sort to put longest word first
|
|
402
|
+
.join('|'), ")"), 'g') // used to get access to lastIndex state
|
|
403
|
+
;
|
|
404
|
+
|
|
400
405
|
var currentTokenValue = '';
|
|
401
|
-
var _loop = function _loop(
|
|
406
|
+
var _loop = function _loop(_i) {
|
|
402
407
|
var escapedPartOfCurrentChar = escapedParts.find(function (escapeIndex) {
|
|
403
|
-
return escapeIndex.start <=
|
|
408
|
+
return escapeIndex.start <= _i && escapeIndex.end >= _i;
|
|
404
409
|
});
|
|
405
|
-
var char = expandedFormat[
|
|
410
|
+
var char = expandedFormat[_i];
|
|
406
411
|
var isEscapedChar = escapedPartOfCurrentChar != null;
|
|
407
|
-
var potentialToken = "".concat(currentTokenValue).concat(expandedFormat.slice(
|
|
408
|
-
|
|
409
|
-
|
|
412
|
+
var potentialToken = "".concat(currentTokenValue).concat(expandedFormat.slice(_i));
|
|
413
|
+
var regExpMatch = isTokenStartRegExp.test(potentialToken);
|
|
414
|
+
if (!isEscapedChar && char.match(/([A-Za-z]+)/) && regExpMatch) {
|
|
415
|
+
currentTokenValue = potentialToken.slice(0, isTokenStartRegExp.lastIndex);
|
|
416
|
+
_i += isTokenStartRegExp.lastIndex - 1;
|
|
410
417
|
} else {
|
|
411
418
|
// If we are on the opening or closing character of an escaped part of the format,
|
|
412
419
|
// Then we ignore this character.
|
|
413
|
-
var isEscapeBoundary = isEscapedChar && (escapedPartOfCurrentChar == null ? void 0 : escapedPartOfCurrentChar.start) ===
|
|
420
|
+
var isEscapeBoundary = isEscapedChar && (escapedPartOfCurrentChar == null ? void 0 : escapedPartOfCurrentChar.start) === _i || (escapedPartOfCurrentChar == null ? void 0 : escapedPartOfCurrentChar.end) === _i;
|
|
414
421
|
if (!isEscapeBoundary) {
|
|
415
422
|
commitToken(currentTokenValue);
|
|
416
423
|
currentTokenValue = '';
|
|
@@ -421,6 +428,7 @@ export var splitFormatIntoSections = function splitFormatIntoSections(utils, tim
|
|
|
421
428
|
}
|
|
422
429
|
}
|
|
423
430
|
}
|
|
431
|
+
i = _i;
|
|
424
432
|
};
|
|
425
433
|
for (var i = 0; i < expandedFormat.length; i += 1) {
|
|
426
434
|
_loop(i);
|
package/legacy/locales/fiFI.js
CHANGED
|
@@ -63,17 +63,31 @@ var fiFIPickers = {
|
|
|
63
63
|
},
|
|
64
64
|
// Table labels
|
|
65
65
|
timeTableLabel: 'valitse aika',
|
|
66
|
-
dateTableLabel: 'valitse päivä'
|
|
67
|
-
|
|
66
|
+
dateTableLabel: 'valitse päivä',
|
|
68
67
|
// Field section placeholders
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
fieldYearPlaceholder: function fieldYearPlaceholder(params) {
|
|
69
|
+
return 'V'.repeat(params.digitAmount);
|
|
70
|
+
},
|
|
71
|
+
fieldMonthPlaceholder: function fieldMonthPlaceholder(params) {
|
|
72
|
+
return params.contentType === 'letter' ? 'KKKK' : 'KK';
|
|
73
|
+
},
|
|
74
|
+
fieldDayPlaceholder: function fieldDayPlaceholder() {
|
|
75
|
+
return 'PP';
|
|
76
|
+
},
|
|
77
|
+
fieldWeekDayPlaceholder: function fieldWeekDayPlaceholder(params) {
|
|
78
|
+
return params.contentType === 'letter' ? 'EEEE' : 'EE';
|
|
79
|
+
},
|
|
80
|
+
fieldHoursPlaceholder: function fieldHoursPlaceholder() {
|
|
81
|
+
return 'tt';
|
|
82
|
+
},
|
|
83
|
+
fieldMinutesPlaceholder: function fieldMinutesPlaceholder() {
|
|
84
|
+
return 'mm';
|
|
85
|
+
},
|
|
86
|
+
fieldSecondsPlaceholder: function fieldSecondsPlaceholder() {
|
|
87
|
+
return 'ss';
|
|
88
|
+
},
|
|
89
|
+
fieldMeridiemPlaceholder: function fieldMeridiemPlaceholder() {
|
|
90
|
+
return 'aa';
|
|
91
|
+
}
|
|
77
92
|
};
|
|
78
|
-
|
|
79
93
|
export var fiFI = getPickersLocalization(fiFIPickers);
|
package/locales/fiFI.js
CHANGED
|
@@ -43,17 +43,15 @@ const fiFIPickers = {
|
|
|
43
43
|
openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Valitse aika, valittu aika on ${utils.format(value, 'fullTime')}` : 'Valitse aika',
|
|
44
44
|
// Table labels
|
|
45
45
|
timeTableLabel: 'valitse aika',
|
|
46
|
-
dateTableLabel: 'valitse päivä'
|
|
47
|
-
|
|
46
|
+
dateTableLabel: 'valitse päivä',
|
|
48
47
|
// Field section placeholders
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
fieldYearPlaceholder: params => 'V'.repeat(params.digitAmount),
|
|
49
|
+
fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'KKKK' : 'KK',
|
|
50
|
+
fieldDayPlaceholder: () => 'PP',
|
|
51
|
+
fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
|
|
52
|
+
fieldHoursPlaceholder: () => 'tt',
|
|
53
|
+
fieldMinutesPlaceholder: () => 'mm',
|
|
54
|
+
fieldSecondsPlaceholder: () => 'ss',
|
|
55
|
+
fieldMeridiemPlaceholder: () => 'aa'
|
|
57
56
|
};
|
|
58
|
-
|
|
59
57
|
export const fiFI = getPickersLocalization(fiFIPickers);
|
package/modern/index.js
CHANGED
|
@@ -385,15 +385,20 @@ export const splitFormatIntoSections = (utils, timezone, localeText, format, dat
|
|
|
385
385
|
const escapedParts = getEscapedPartsFromFormat(utils, expandedFormat);
|
|
386
386
|
|
|
387
387
|
// This RegExp test if the beginning of a string correspond to a supported token
|
|
388
|
-
const isTokenStartRegExp = new RegExp(`^(${Object.keys(utils.formatTokenMap).
|
|
388
|
+
const isTokenStartRegExp = new RegExp(`^(${Object.keys(utils.formatTokenMap).sort((a, b) => b.length - a.length) // Sort to put longest word first
|
|
389
|
+
.join('|')})`, 'g') // used to get access to lastIndex state
|
|
390
|
+
;
|
|
391
|
+
|
|
389
392
|
let currentTokenValue = '';
|
|
390
393
|
for (let i = 0; i < expandedFormat.length; i += 1) {
|
|
391
394
|
const escapedPartOfCurrentChar = escapedParts.find(escapeIndex => escapeIndex.start <= i && escapeIndex.end >= i);
|
|
392
395
|
const char = expandedFormat[i];
|
|
393
396
|
const isEscapedChar = escapedPartOfCurrentChar != null;
|
|
394
397
|
const potentialToken = `${currentTokenValue}${expandedFormat.slice(i)}`;
|
|
395
|
-
|
|
396
|
-
|
|
398
|
+
const regExpMatch = isTokenStartRegExp.test(potentialToken);
|
|
399
|
+
if (!isEscapedChar && char.match(/([A-Za-z]+)/) && regExpMatch) {
|
|
400
|
+
currentTokenValue = potentialToken.slice(0, isTokenStartRegExp.lastIndex);
|
|
401
|
+
i += isTokenStartRegExp.lastIndex - 1;
|
|
397
402
|
} else {
|
|
398
403
|
// If we are on the opening or closing character of an escaped part of the format,
|
|
399
404
|
// Then we ignore this character.
|
package/modern/locales/fiFI.js
CHANGED
|
@@ -43,17 +43,15 @@ const fiFIPickers = {
|
|
|
43
43
|
openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Valitse aika, valittu aika on ${utils.format(value, 'fullTime')}` : 'Valitse aika',
|
|
44
44
|
// Table labels
|
|
45
45
|
timeTableLabel: 'valitse aika',
|
|
46
|
-
dateTableLabel: 'valitse päivä'
|
|
47
|
-
|
|
46
|
+
dateTableLabel: 'valitse päivä',
|
|
48
47
|
// Field section placeholders
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
fieldYearPlaceholder: params => 'V'.repeat(params.digitAmount),
|
|
49
|
+
fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'KKKK' : 'KK',
|
|
50
|
+
fieldDayPlaceholder: () => 'PP',
|
|
51
|
+
fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
|
|
52
|
+
fieldHoursPlaceholder: () => 'tt',
|
|
53
|
+
fieldMinutesPlaceholder: () => 'mm',
|
|
54
|
+
fieldSecondsPlaceholder: () => 'ss',
|
|
55
|
+
fieldMeridiemPlaceholder: () => 'aa'
|
|
57
56
|
};
|
|
58
|
-
|
|
59
57
|
export const fiFI = getPickersLocalization(fiFIPickers);
|
package/node/index.js
CHANGED
|
@@ -403,15 +403,20 @@ const splitFormatIntoSections = (utils, timezone, localeText, format, date, form
|
|
|
403
403
|
const escapedParts = getEscapedPartsFromFormat(utils, expandedFormat);
|
|
404
404
|
|
|
405
405
|
// This RegExp test if the beginning of a string correspond to a supported token
|
|
406
|
-
const isTokenStartRegExp = new RegExp(`^(${Object.keys(utils.formatTokenMap).
|
|
406
|
+
const isTokenStartRegExp = new RegExp(`^(${Object.keys(utils.formatTokenMap).sort((a, b) => b.length - a.length) // Sort to put longest word first
|
|
407
|
+
.join('|')})`, 'g') // used to get access to lastIndex state
|
|
408
|
+
;
|
|
409
|
+
|
|
407
410
|
let currentTokenValue = '';
|
|
408
411
|
for (let i = 0; i < expandedFormat.length; i += 1) {
|
|
409
412
|
const escapedPartOfCurrentChar = escapedParts.find(escapeIndex => escapeIndex.start <= i && escapeIndex.end >= i);
|
|
410
413
|
const char = expandedFormat[i];
|
|
411
414
|
const isEscapedChar = escapedPartOfCurrentChar != null;
|
|
412
415
|
const potentialToken = `${currentTokenValue}${expandedFormat.slice(i)}`;
|
|
413
|
-
|
|
414
|
-
|
|
416
|
+
const regExpMatch = isTokenStartRegExp.test(potentialToken);
|
|
417
|
+
if (!isEscapedChar && char.match(/([A-Za-z]+)/) && regExpMatch) {
|
|
418
|
+
currentTokenValue = potentialToken.slice(0, isTokenStartRegExp.lastIndex);
|
|
419
|
+
i += isTokenStartRegExp.lastIndex - 1;
|
|
415
420
|
} else {
|
|
416
421
|
// If we are on the opening or closing character of an escaped part of the format,
|
|
417
422
|
// Then we ignore this character.
|
package/node/locales/fiFI.js
CHANGED
|
@@ -49,18 +49,16 @@ const fiFIPickers = {
|
|
|
49
49
|
openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Valitse aika, valittu aika on ${utils.format(value, 'fullTime')}` : 'Valitse aika',
|
|
50
50
|
// Table labels
|
|
51
51
|
timeTableLabel: 'valitse aika',
|
|
52
|
-
dateTableLabel: 'valitse päivä'
|
|
53
|
-
|
|
52
|
+
dateTableLabel: 'valitse päivä',
|
|
54
53
|
// Field section placeholders
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
fieldYearPlaceholder: params => 'V'.repeat(params.digitAmount),
|
|
55
|
+
fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'KKKK' : 'KK',
|
|
56
|
+
fieldDayPlaceholder: () => 'PP',
|
|
57
|
+
fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
|
|
58
|
+
fieldHoursPlaceholder: () => 'tt',
|
|
59
|
+
fieldMinutesPlaceholder: () => 'mm',
|
|
60
|
+
fieldSecondsPlaceholder: () => 'ss',
|
|
61
|
+
fieldMeridiemPlaceholder: () => 'aa'
|
|
63
62
|
};
|
|
64
|
-
|
|
65
63
|
const fiFI = (0, _getPickersLocalization.getPickersLocalization)(fiFIPickers);
|
|
66
64
|
exports.fiFI = fiFI;
|