@mui/x-date-pickers 5.0.16 → 5.0.18

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 CHANGED
@@ -3,6 +3,66 @@
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
+ ## 5.17.23
7
+
8
+ _Feb 9, 2023_
9
+
10
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🌍 Improve Brazilian Portuguese (pt-BR) locale
13
+ - 🎉 Add banner and callouts to inform about MUI X v6 beta
14
+ - 🐞 Bugfixes
15
+
16
+ ### `@mui/x-data-grid@v5.17.23` / `@mui/x-data-grid-pro@v5.17.23` / `@mui/x-data-grid-premium@v5.17.23`
17
+
18
+ #### Changes
19
+
20
+ - [DataGrid] Allow to customize the value displayed in the filter button tooltip (#7816) @ithrforu
21
+ - [DataGrid] Fix `getCellElement` method not working with pinned columns (#7844) @yaredtsy
22
+ - [DataGrid] Fix stale rows issue in `unstable_replaceRows` (#7694) @MBilalShafi
23
+ - [l10n] Improve Brazilian Portuguese (pt-BR) locale (#7850) @ed-ateixeira
24
+
25
+ ### `@mui/x-date-pickers@v_5.0.18` / `@mui/x-date-pickers-pro@v_5.0.18`
26
+
27
+ #### Changes
28
+
29
+ - [pickers] Update pickers when new value has a distinct timezone (#7853) @alexfauquette
30
+
31
+ ### Docs
32
+
33
+ - [docs] Add messages in v5 doc to inform people about v6 (#7838) @flaviendelangle
34
+ - [docs] Fix 301 link @oliviertassinari
35
+
36
+ ### Core
37
+
38
+ - [core] Upgrade monorepo (#7849) @cherniavskii
39
+
40
+ ## v5.17.22
41
+
42
+ _Feb 2, 2023_
43
+
44
+ We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
45
+
46
+ - 🌍 Add Urdu (ur-PK) locale
47
+ - 🌍 Improve French (fr-FR) and Italian (it-IT) locales
48
+ - 🐞 Bugfixes
49
+
50
+ ### `@mui/x-data-grid@v5.17.22` / `@mui/x-data-grid-pro@v5.17.22` / `@mui/x-data-grid-premium@v5.17.22`
51
+
52
+ #### Changes
53
+
54
+ - [DataGrid] Fix an error when deleting pinned row using the buttons in the `actions` column (#7767) @cherniavskii
55
+ - [DataGrid] Fix print preview regression in Chrome browser (#7405) @cherniavskii
56
+ - [l10n] Add Urdu (ur-PK) locale (#7778) @MBilalShafi
57
+ - [l10n] Improve French (fr-FR) locale (#7795) @Vivek-Prajapatii
58
+
59
+ ### `@mui/x-date-pickers@v5.0.17` / `@mui/x-date-pickers-pro@v5.0.17`
60
+
61
+ #### Changes
62
+
63
+ - [TimePicker] Add missing `themeAugmentation` entry (#7732) @LukasTy
64
+ - [l10n] Improve Italian (it-IT) locale (#7761) @simonecervini
65
+
6
66
  ## v5.17.21
7
67
 
8
68
  _Jan 27, 2023_
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI X v5.0.16
1
+ /** @license MUI X v5.0.18
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -64,7 +64,20 @@ export const useMaskedInput = ({
64
64
 
65
65
  const newParsedValue = rawValue === null ? null : utils.date(rawValue);
66
66
  const isAcceptedValue = rawValue === null || utils.isValid(newParsedValue);
67
- const innerEqualsParsed = innerInputValue === null ? newParsedValue === null : newParsedValue !== null && Math.abs(utils.getDiff(innerInputValue, newParsedValue, 'seconds')) === 0;
67
+ let innerEqualsParsed = innerInputValue === null && newParsedValue === null; // equal by being both null
68
+
69
+ if (innerInputValue !== null && newParsedValue !== null) {
70
+ const areEqual = utils.isEqual(innerInputValue, newParsedValue);
71
+
72
+ if (areEqual) {
73
+ innerEqualsParsed = true;
74
+ } else {
75
+ const diff = Math.abs(utils.getDiff(innerInputValue, newParsedValue)); // diff in ms
76
+
77
+ innerEqualsParsed = diff === 0 ? areEqual // if no diff, use equal to test the time-zone
78
+ : diff < 1000; // accept a difference bellow 1s
79
+ }
80
+ }
68
81
 
69
82
  if (!localeHasChanged && !inputFormatHasChanged && (!isAcceptedValue || innerEqualsParsed)) {
70
83
  return;
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI X v5.0.16
1
+ /** @license MUI X v5.0.18
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -78,7 +78,20 @@ export var useMaskedInput = function useMaskedInput(_ref) {
78
78
 
79
79
  var newParsedValue = rawValue === null ? null : utils.date(rawValue);
80
80
  var isAcceptedValue = rawValue === null || utils.isValid(newParsedValue);
81
- var innerEqualsParsed = innerInputValue === null ? newParsedValue === null : newParsedValue !== null && Math.abs(utils.getDiff(innerInputValue, newParsedValue, 'seconds')) === 0;
81
+ var innerEqualsParsed = innerInputValue === null && newParsedValue === null; // equal by being both null
82
+
83
+ if (innerInputValue !== null && newParsedValue !== null) {
84
+ var areEqual = utils.isEqual(innerInputValue, newParsedValue);
85
+
86
+ if (areEqual) {
87
+ innerEqualsParsed = true;
88
+ } else {
89
+ var diff = Math.abs(utils.getDiff(innerInputValue, newParsedValue)); // diff in ms
90
+
91
+ innerEqualsParsed = diff === 0 ? areEqual // if no diff, use equal to test the time-zone
92
+ : diff < 1000; // accept a difference bellow 1s
93
+ }
94
+ }
82
95
 
83
96
  if (!localeHasChanged && !inputFormatHasChanged && (!isAcceptedValue || innerEqualsParsed)) {
84
97
  return;
@@ -51,7 +51,7 @@ var itITPickers = {
51
51
  return rawValue && utils.isValid(utils.date(rawValue)) ? "Scegli l'ora, l'ora selezionata \xE8 ".concat(utils.format(utils.date(rawValue), 'fullTime')) : "Scegli l'ora";
52
52
  },
53
53
  // Table labels
54
- timeTableLabel: 'scegli un ora',
54
+ timeTableLabel: "scegli un'ora",
55
55
  dateTableLabel: 'scegli una data'
56
56
  };
57
57
  export var itIT = getPickersLocalization(itITPickers);
@@ -19,10 +19,10 @@ var ptBRPickers = {
19
19
  okButtonLabel: 'OK',
20
20
  todayButtonLabel: 'Hoje',
21
21
  // Toolbar titles
22
- // datePickerDefaultToolbarTitle: 'Select date',
23
- // dateTimePickerDefaultToolbarTitle: 'Select date & time',
24
- // timePickerDefaultToolbarTitle: 'Select time',
25
- // dateRangePickerDefaultToolbarTitle: 'Select date range',
22
+ datePickerDefaultToolbarTitle: 'Selecione a data',
23
+ dateTimePickerDefaultToolbarTitle: 'Selecione data e hora',
24
+ timePickerDefaultToolbarTitle: 'Selecione a hora',
25
+ dateRangePickerDefaultToolbarTitle: 'Selecione o intervalo entre datas',
26
26
  // Clock labels
27
27
  clockLabelText: function clockLabelText(view, time, adapter) {
28
28
  return "Selecione ".concat(view, ". ").concat(time === null ? 'Hora não selecionada' : "Selecionado a hora ".concat(adapter.format(time, 'fullTime')));
package/locales/itIT.js CHANGED
@@ -35,7 +35,7 @@ const itITPickers = {
35
35
  openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli la data, la data selezionata è ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Scegli la data',
36
36
  openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli l'ora, l'ora selezionata è ${utils.format(utils.date(rawValue), 'fullTime')}` : "Scegli l'ora",
37
37
  // Table labels
38
- timeTableLabel: 'scegli un ora',
38
+ timeTableLabel: "scegli un'ora",
39
39
  dateTableLabel: 'scegli una data'
40
40
  };
41
41
  export const itIT = getPickersLocalization(itITPickers);
package/locales/ptBR.js CHANGED
@@ -17,10 +17,10 @@ const ptBRPickers = {
17
17
  okButtonLabel: 'OK',
18
18
  todayButtonLabel: 'Hoje',
19
19
  // Toolbar titles
20
- // datePickerDefaultToolbarTitle: 'Select date',
21
- // dateTimePickerDefaultToolbarTitle: 'Select date & time',
22
- // timePickerDefaultToolbarTitle: 'Select time',
23
- // dateRangePickerDefaultToolbarTitle: 'Select date range',
20
+ datePickerDefaultToolbarTitle: 'Selecione a data',
21
+ dateTimePickerDefaultToolbarTitle: 'Selecione data e hora',
22
+ timePickerDefaultToolbarTitle: 'Selecione a hora',
23
+ dateRangePickerDefaultToolbarTitle: 'Selecione o intervalo entre datas',
24
24
  // Clock labels
25
25
  clockLabelText: (view, time, adapter) => `Selecione ${view}. ${time === null ? 'Hora não selecionada' : `Selecionado a hora ${adapter.format(time, 'fullTime')}`}`,
26
26
  hoursClockNumberText: hours => `${hours} horas`,
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI X v5.0.16
1
+ /** @license MUI X v5.0.18
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -64,7 +64,20 @@ export const useMaskedInput = ({
64
64
 
65
65
  const newParsedValue = rawValue === null ? null : utils.date(rawValue);
66
66
  const isAcceptedValue = rawValue === null || utils.isValid(newParsedValue);
67
- const innerEqualsParsed = innerInputValue === null ? newParsedValue === null : newParsedValue !== null && Math.abs(utils.getDiff(innerInputValue, newParsedValue, 'seconds')) === 0;
67
+ let innerEqualsParsed = innerInputValue === null && newParsedValue === null; // equal by being both null
68
+
69
+ if (innerInputValue !== null && newParsedValue !== null) {
70
+ const areEqual = utils.isEqual(innerInputValue, newParsedValue);
71
+
72
+ if (areEqual) {
73
+ innerEqualsParsed = true;
74
+ } else {
75
+ const diff = Math.abs(utils.getDiff(innerInputValue, newParsedValue)); // diff in ms
76
+
77
+ innerEqualsParsed = diff === 0 ? areEqual // if no diff, use equal to test the time-zone
78
+ : diff < 1000; // accept a difference bellow 1s
79
+ }
80
+ }
68
81
 
69
82
  if (!localeHasChanged && !inputFormatHasChanged && (!isAcceptedValue || innerEqualsParsed)) {
70
83
  return;
@@ -35,7 +35,7 @@ const itITPickers = {
35
35
  openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli la data, la data selezionata è ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Scegli la data',
36
36
  openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli l'ora, l'ora selezionata è ${utils.format(utils.date(rawValue), 'fullTime')}` : "Scegli l'ora",
37
37
  // Table labels
38
- timeTableLabel: 'scegli un ora',
38
+ timeTableLabel: "scegli un'ora",
39
39
  dateTableLabel: 'scegli una data'
40
40
  };
41
41
  export const itIT = getPickersLocalization(itITPickers);
@@ -17,10 +17,10 @@ const ptBRPickers = {
17
17
  okButtonLabel: 'OK',
18
18
  todayButtonLabel: 'Hoje',
19
19
  // Toolbar titles
20
- // datePickerDefaultToolbarTitle: 'Select date',
21
- // dateTimePickerDefaultToolbarTitle: 'Select date & time',
22
- // timePickerDefaultToolbarTitle: 'Select time',
23
- // dateRangePickerDefaultToolbarTitle: 'Select date range',
20
+ datePickerDefaultToolbarTitle: 'Selecione a data',
21
+ dateTimePickerDefaultToolbarTitle: 'Selecione data e hora',
22
+ timePickerDefaultToolbarTitle: 'Selecione a hora',
23
+ dateRangePickerDefaultToolbarTitle: 'Selecione o intervalo entre datas',
24
24
  // Clock labels
25
25
  clockLabelText: (view, time, adapter) => `Selecione ${view}. ${time === null ? 'Hora não selecionada' : `Selecionado a hora ${adapter.format(time, 'fullTime')}`}`,
26
26
  hoursClockNumberText: hours => `${hours} horas`,
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI X v5.0.16
1
+ /** @license MUI X v5.0.18
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -82,7 +82,20 @@ const useMaskedInput = ({
82
82
 
83
83
  const newParsedValue = rawValue === null ? null : utils.date(rawValue);
84
84
  const isAcceptedValue = rawValue === null || utils.isValid(newParsedValue);
85
- const innerEqualsParsed = innerInputValue === null ? newParsedValue === null : newParsedValue !== null && Math.abs(utils.getDiff(innerInputValue, newParsedValue, 'seconds')) === 0;
85
+ let innerEqualsParsed = innerInputValue === null && newParsedValue === null; // equal by being both null
86
+
87
+ if (innerInputValue !== null && newParsedValue !== null) {
88
+ const areEqual = utils.isEqual(innerInputValue, newParsedValue);
89
+
90
+ if (areEqual) {
91
+ innerEqualsParsed = true;
92
+ } else {
93
+ const diff = Math.abs(utils.getDiff(innerInputValue, newParsedValue)); // diff in ms
94
+
95
+ innerEqualsParsed = diff === 0 ? areEqual // if no diff, use equal to test the time-zone
96
+ : diff < 1000; // accept a difference bellow 1s
97
+ }
98
+ }
86
99
 
87
100
  if (!localeHasChanged && !inputFormatHasChanged && (!isAcceptedValue || innerEqualsParsed)) {
88
101
  return;
@@ -43,7 +43,7 @@ const itITPickers = {
43
43
  openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli la data, la data selezionata è ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Scegli la data',
44
44
  openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli l'ora, l'ora selezionata è ${utils.format(utils.date(rawValue), 'fullTime')}` : "Scegli l'ora",
45
45
  // Table labels
46
- timeTableLabel: 'scegli un ora',
46
+ timeTableLabel: "scegli un'ora",
47
47
  dateTableLabel: 'scegli una data'
48
48
  };
49
49
  const itIT = (0, _getPickersLocalization.getPickersLocalization)(itITPickers);
@@ -25,10 +25,10 @@ const ptBRPickers = {
25
25
  okButtonLabel: 'OK',
26
26
  todayButtonLabel: 'Hoje',
27
27
  // Toolbar titles
28
- // datePickerDefaultToolbarTitle: 'Select date',
29
- // dateTimePickerDefaultToolbarTitle: 'Select date & time',
30
- // timePickerDefaultToolbarTitle: 'Select time',
31
- // dateRangePickerDefaultToolbarTitle: 'Select date range',
28
+ datePickerDefaultToolbarTitle: 'Selecione a data',
29
+ dateTimePickerDefaultToolbarTitle: 'Selecione data e hora',
30
+ timePickerDefaultToolbarTitle: 'Selecione a hora',
31
+ dateRangePickerDefaultToolbarTitle: 'Selecione o intervalo entre datas',
32
32
  // Clock labels
33
33
  clockLabelText: (view, time, adapter) => `Selecione ${view}. ${time === null ? 'Hora não selecionada' : `Selecionado a hora ${adapter.format(time, 'fullTime')}`}`,
34
34
  hoursClockNumberText: hours => `${hours} horas`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers",
3
- "version": "5.0.16",
3
+ "version": "5.0.18",
4
4
  "description": "The community edition of the date picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -161,6 +161,11 @@ export interface PickerComponents<Theme = unknown> {
161
161
  styleOverrides?: ComponentsOverrides<Theme>['MuiStaticTimePicker'];
162
162
  variants?: ComponentsVariants['MuiStaticTimePicker'];
163
163
  };
164
+ MuiTimePicker?: {
165
+ defaultProps?: ComponentsProps['MuiTimePicker'];
166
+ styleOverrides?: ComponentsOverrides<Theme>['MuiTimePicker'];
167
+ variants?: ComponentsVariants['MuiTimePicker'];
168
+ };
164
169
  MuiTimePickerToolbar?: {
165
170
  defaultProps?: ComponentsProps['MuiTimePickerToolbar'];
166
171
  styleOverrides?: ComponentsOverrides<Theme>['MuiTimePickerToolbar'];