@mui/x-date-pickers 5.0.17 → 5.0.19

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,64 @@
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.24
7
+
8
+ _Feb 16, 2023_
9
+
10
+ We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🌍 Add Hungarian (hu-HU) locale
13
+ - 🐞 Bugfixes
14
+
15
+ ### `@mui/x-data-grid@v5.17.24` / `@mui/x-data-grid-pro@v5.17.24` / `@mui/x-data-grid-premium@v5.17.24`
16
+
17
+ #### Changes
18
+
19
+ - [DataGrid] Allow to pass props to the `TrapFocus` inside the panel wrapper (#7897) @Vivek-Prajapatii
20
+ - [DataGrid] Avoid unnecessary rerenders after `updateRows` (#7945) @cherniavskii
21
+ - [DataGridPro] Change cursor when dragging a column (#7878) @sai6855
22
+ - [DataGridPremium] Fix `leafField` to have correct focus value (#7959) @MBilalShafi
23
+
24
+ ### `@mui/x-date-pickers@v5.0.19` / `@mui/x-date-pickers-pro@v5.0.19`
25
+
26
+ #### Changes
27
+
28
+ - [l10n] Add Hungarian (hu-HU) locale (#7796) @noherczeg
29
+
30
+ ## 5.17.23
31
+
32
+ _Feb 9, 2023_
33
+
34
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
35
+
36
+ - 🌍 Improve Brazilian Portuguese (pt-BR) locale
37
+ - 🎉 Add banner and callouts to inform about MUI X v6 beta
38
+ - 🐞 Bugfixes
39
+
40
+ ### `@mui/x-data-grid@v5.17.23` / `@mui/x-data-grid-pro@v5.17.23` / `@mui/x-data-grid-premium@v5.17.23`
41
+
42
+ #### Changes
43
+
44
+ - [DataGrid] Allow to customize the value displayed in the filter button tooltip (#7816) @ithrforu
45
+ - [DataGrid] Fix `getCellElement` method not working with pinned columns (#7844) @yaredtsy
46
+ - [DataGrid] Fix stale rows issue in `unstable_replaceRows` (#7694) @MBilalShafi
47
+ - [l10n] Improve Brazilian Portuguese (pt-BR) locale (#7850) @ed-ateixeira
48
+
49
+ ### `@mui/x-date-pickers@v_5.0.18` / `@mui/x-date-pickers-pro@v_5.0.18`
50
+
51
+ #### Changes
52
+
53
+ - [pickers] Update pickers when new value has a distinct timezone (#7853) @alexfauquette
54
+
55
+ ### Docs
56
+
57
+ - [docs] Add messages in v5 doc to inform people about v6 (#7838) @flaviendelangle
58
+ - [docs] Fix 301 link @oliviertassinari
59
+
60
+ ### Core
61
+
62
+ - [core] Upgrade monorepo (#7849) @cherniavskii
63
+
6
64
  ## v5.17.22
7
65
 
8
66
  _Feb 2, 2023_
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI X v5.0.17
1
+ /** @license MUI X v5.0.19
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.17
1
+ /** @license MUI X v5.0.19
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;
@@ -0,0 +1,65 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization'; // maps TimeView to its translation
2
+
3
+ var timeViews = {
4
+ hours: 'Óra',
5
+ minutes: 'Perc',
6
+ seconds: 'Másodperc'
7
+ }; // maps PickersToolbar["viewType"] to its translation
8
+
9
+ var pickerViews = {
10
+ calendar: 'naptár',
11
+ clock: 'óra'
12
+ };
13
+ var huHUPickers = {
14
+ // Calendar navigation
15
+ previousMonth: 'Előző hónap',
16
+ nextMonth: 'Következő hónap',
17
+ // View navigation
18
+ openPreviousView: 'Előző nézet megnyitása',
19
+ openNextView: 'Következő nézet megnyitása',
20
+ calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
21
+ return view === 'year' ? 'az évválasztó már nyitva, váltson a naptárnézetre' : 'a naptárnézet már nyitva, váltson az évválasztóra';
22
+ },
23
+ inputModeToggleButtonAriaLabel: function inputModeToggleButtonAriaLabel(isKeyboardInputOpen, viewType) {
24
+ return isKeyboardInputOpen ? "sz\xF6veges beviteli n\xE9zet akt\xEDv, v\xE1lt\xE1s ".concat(pickerViews[viewType], " n\xE9zetre") : "".concat(pickerViews[viewType], " beviteli n\xE9zet akt\xEDv, v\xE1lt\xE1s sz\xF6veges beviteli n\xE9zetre");
25
+ },
26
+ // DateRange placeholders
27
+ start: 'Kezdő dátum',
28
+ end: 'Záró dátum',
29
+ // Action bar
30
+ cancelButtonLabel: 'Mégse',
31
+ clearButtonLabel: 'Törlés',
32
+ okButtonLabel: 'OK',
33
+ todayButtonLabel: 'Ma',
34
+ // Toolbar titles
35
+ datePickerDefaultToolbarTitle: 'Dátum kiválasztása',
36
+ dateTimePickerDefaultToolbarTitle: 'Dátum és idő kiválasztása',
37
+ timePickerDefaultToolbarTitle: 'Idő kiválasztása',
38
+ dateRangePickerDefaultToolbarTitle: 'Dátumhatárok kiválasztása',
39
+ // Clock labels
40
+ clockLabelText: function clockLabelText(view, time, adapter) {
41
+ var _timeViews$view;
42
+
43
+ return "".concat((_timeViews$view = timeViews[view]) != null ? _timeViews$view : view, " kiv\xE1laszt\xE1sa. ").concat(time === null ? 'Nincs kiválasztva idő' : "A kiv\xE1lasztott id\u0151 ".concat(adapter.format(time, 'fullTime')));
44
+ },
45
+ hoursClockNumberText: function hoursClockNumberText(hours) {
46
+ return "".concat(hours, " ").concat(timeViews.hours.toLowerCase());
47
+ },
48
+ minutesClockNumberText: function minutesClockNumberText(minutes) {
49
+ return "".concat(minutes, " ").concat(timeViews.minutes.toLowerCase());
50
+ },
51
+ secondsClockNumberText: function secondsClockNumberText(seconds) {
52
+ return "".concat(seconds, " ").concat(timeViews.seconds.toLowerCase());
53
+ },
54
+ // Open picker labels
55
+ openDatePickerDialogue: function openDatePickerDialogue(value, utils) {
56
+ return value !== null && utils.isValid(value) ? "V\xE1lasszon d\xE1tumot, a kiv\xE1lasztott d\xE1tum: ".concat(utils.format(value, 'fullDate')) : 'Válasszon dátumot';
57
+ },
58
+ openTimePickerDialogue: function openTimePickerDialogue(value, utils) {
59
+ return value !== null && utils.isValid(value) ? "V\xE1lasszon id\u0151t, a kiv\xE1lasztott id\u0151: ".concat(utils.format(value, 'fullTime')) : 'Válasszon időt';
60
+ },
61
+ // Table labels
62
+ timeTableLabel: 'válasszon időt',
63
+ dateTableLabel: 'válasszon dátumot'
64
+ };
65
+ export var huHU = getPickersLocalization(huHUPickers);
@@ -8,6 +8,7 @@ export * from './faIR';
8
8
  export * from './fiFI';
9
9
  export * from './csCZ';
10
10
  export * from './frFR';
11
+ export * from './huHU';
11
12
  export * from './enUS';
12
13
  export * from './nbNO';
13
14
  export * from './svSE';
@@ -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')));
@@ -0,0 +1,34 @@
1
+ export declare const huHU: {
2
+ components: {
3
+ MuiLocalizationProvider: {
4
+ defaultProps: {
5
+ localeText: {
6
+ previousMonth?: string | undefined;
7
+ nextMonth?: string | undefined;
8
+ openPreviousView?: string | undefined;
9
+ openNextView?: string | undefined;
10
+ cancelButtonLabel?: string | undefined;
11
+ clearButtonLabel?: string | undefined;
12
+ okButtonLabel?: string | undefined;
13
+ todayButtonLabel?: string | undefined;
14
+ start?: string | undefined;
15
+ end?: string | undefined;
16
+ calendarViewSwitchingButtonAriaLabel?: ((currentView: import("..").CalendarPickerView) => string) | undefined;
17
+ inputModeToggleButtonAriaLabel?: ((isKeyboardInputOpen: boolean, viewType: "calendar" | "clock") => string) | undefined;
18
+ clockLabelText?: ((view: import("..").ClockPickerView, time: any, adapter: import("../internals").MuiPickersAdapter<any>) => string) | undefined;
19
+ hoursClockNumberText?: ((hours: string) => string) | undefined;
20
+ minutesClockNumberText?: ((minutes: string) => string) | undefined;
21
+ secondsClockNumberText?: ((seconds: string) => string) | undefined;
22
+ openDatePickerDialogue?: ((date: any, utils: import("../internals").MuiPickersAdapter<any>) => string) | undefined;
23
+ openTimePickerDialogue?: ((date: any, utils: import("../internals").MuiPickersAdapter<any>) => string) | undefined;
24
+ timeTableLabel?: string | undefined;
25
+ dateTableLabel?: string | undefined;
26
+ datePickerDefaultToolbarTitle?: string | undefined;
27
+ dateTimePickerDefaultToolbarTitle?: string | undefined;
28
+ timePickerDefaultToolbarTitle?: string | undefined;
29
+ dateRangePickerDefaultToolbarTitle?: string | undefined;
30
+ };
31
+ };
32
+ };
33
+ };
34
+ };
@@ -0,0 +1,51 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization'; // maps TimeView to its translation
2
+
3
+ const timeViews = {
4
+ hours: 'Óra',
5
+ minutes: 'Perc',
6
+ seconds: 'Másodperc'
7
+ }; // maps PickersToolbar["viewType"] to its translation
8
+
9
+ const pickerViews = {
10
+ calendar: 'naptár',
11
+ clock: 'óra'
12
+ };
13
+ const huHUPickers = {
14
+ // Calendar navigation
15
+ previousMonth: 'Előző hónap',
16
+ nextMonth: 'Következő hónap',
17
+ // View navigation
18
+ openPreviousView: 'Előző nézet megnyitása',
19
+ openNextView: 'Következő nézet megnyitása',
20
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'az évválasztó már nyitva, váltson a naptárnézetre' : 'a naptárnézet már nyitva, váltson az évválasztóra',
21
+ inputModeToggleButtonAriaLabel: (isKeyboardInputOpen, viewType) => isKeyboardInputOpen ? `szöveges beviteli nézet aktív, váltás ${pickerViews[viewType]} nézetre` : `${pickerViews[viewType]} beviteli nézet aktív, váltás szöveges beviteli nézetre`,
22
+ // DateRange placeholders
23
+ start: 'Kezdő dátum',
24
+ end: 'Záró dátum',
25
+ // Action bar
26
+ cancelButtonLabel: 'Mégse',
27
+ clearButtonLabel: 'Törlés',
28
+ okButtonLabel: 'OK',
29
+ todayButtonLabel: 'Ma',
30
+ // Toolbar titles
31
+ datePickerDefaultToolbarTitle: 'Dátum kiválasztása',
32
+ dateTimePickerDefaultToolbarTitle: 'Dátum és idő kiválasztása',
33
+ timePickerDefaultToolbarTitle: 'Idő kiválasztása',
34
+ dateRangePickerDefaultToolbarTitle: 'Dátumhatárok kiválasztása',
35
+ // Clock labels
36
+ clockLabelText: (view, time, adapter) => {
37
+ var _timeViews$view;
38
+
39
+ return `${(_timeViews$view = timeViews[view]) != null ? _timeViews$view : view} kiválasztása. ${time === null ? 'Nincs kiválasztva idő' : `A kiválasztott idő ${adapter.format(time, 'fullTime')}`}`;
40
+ },
41
+ hoursClockNumberText: hours => `${hours} ${timeViews.hours.toLowerCase()}`,
42
+ minutesClockNumberText: minutes => `${minutes} ${timeViews.minutes.toLowerCase()}`,
43
+ secondsClockNumberText: seconds => `${seconds} ${timeViews.seconds.toLowerCase()}`,
44
+ // Open picker labels
45
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Válasszon dátumot, a kiválasztott dátum: ${utils.format(value, 'fullDate')}` : 'Válasszon dátumot',
46
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Válasszon időt, a kiválasztott idő: ${utils.format(value, 'fullTime')}` : 'Válasszon időt',
47
+ // Table labels
48
+ timeTableLabel: 'válasszon időt',
49
+ dateTableLabel: 'válasszon dátumot'
50
+ };
51
+ export const huHU = getPickersLocalization(huHUPickers);
@@ -8,6 +8,7 @@ export * from './faIR';
8
8
  export * from './fiFI';
9
9
  export * from './csCZ';
10
10
  export * from './frFR';
11
+ export * from './huHU';
11
12
  export * from './enUS';
12
13
  export * from './nbNO';
13
14
  export * from './svSE';
package/locales/index.js CHANGED
@@ -8,6 +8,7 @@ export * from './faIR';
8
8
  export * from './fiFI';
9
9
  export * from './csCZ';
10
10
  export * from './frFR';
11
+ export * from './huHU';
11
12
  export * from './enUS';
12
13
  export * from './nbNO';
13
14
  export * from './svSE';
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.17
1
+ /** @license MUI X v5.0.19
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;
@@ -0,0 +1,47 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization'; // maps TimeView to its translation
2
+
3
+ const timeViews = {
4
+ hours: 'Óra',
5
+ minutes: 'Perc',
6
+ seconds: 'Másodperc'
7
+ }; // maps PickersToolbar["viewType"] to its translation
8
+
9
+ const pickerViews = {
10
+ calendar: 'naptár',
11
+ clock: 'óra'
12
+ };
13
+ const huHUPickers = {
14
+ // Calendar navigation
15
+ previousMonth: 'Előző hónap',
16
+ nextMonth: 'Következő hónap',
17
+ // View navigation
18
+ openPreviousView: 'Előző nézet megnyitása',
19
+ openNextView: 'Következő nézet megnyitása',
20
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'az évválasztó már nyitva, váltson a naptárnézetre' : 'a naptárnézet már nyitva, váltson az évválasztóra',
21
+ inputModeToggleButtonAriaLabel: (isKeyboardInputOpen, viewType) => isKeyboardInputOpen ? `szöveges beviteli nézet aktív, váltás ${pickerViews[viewType]} nézetre` : `${pickerViews[viewType]} beviteli nézet aktív, váltás szöveges beviteli nézetre`,
22
+ // DateRange placeholders
23
+ start: 'Kezdő dátum',
24
+ end: 'Záró dátum',
25
+ // Action bar
26
+ cancelButtonLabel: 'Mégse',
27
+ clearButtonLabel: 'Törlés',
28
+ okButtonLabel: 'OK',
29
+ todayButtonLabel: 'Ma',
30
+ // Toolbar titles
31
+ datePickerDefaultToolbarTitle: 'Dátum kiválasztása',
32
+ dateTimePickerDefaultToolbarTitle: 'Dátum és idő kiválasztása',
33
+ timePickerDefaultToolbarTitle: 'Idő kiválasztása',
34
+ dateRangePickerDefaultToolbarTitle: 'Dátumhatárok kiválasztása',
35
+ // Clock labels
36
+ clockLabelText: (view, time, adapter) => `${timeViews[view] ?? view} kiválasztása. ${time === null ? 'Nincs kiválasztva idő' : `A kiválasztott idő ${adapter.format(time, 'fullTime')}`}`,
37
+ hoursClockNumberText: hours => `${hours} ${timeViews.hours.toLowerCase()}`,
38
+ minutesClockNumberText: minutes => `${minutes} ${timeViews.minutes.toLowerCase()}`,
39
+ secondsClockNumberText: seconds => `${seconds} ${timeViews.seconds.toLowerCase()}`,
40
+ // Open picker labels
41
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Válasszon dátumot, a kiválasztott dátum: ${utils.format(value, 'fullDate')}` : 'Válasszon dátumot',
42
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Válasszon időt, a kiválasztott idő: ${utils.format(value, 'fullTime')}` : 'Válasszon időt',
43
+ // Table labels
44
+ timeTableLabel: 'válasszon időt',
45
+ dateTableLabel: 'válasszon dátumot'
46
+ };
47
+ export const huHU = getPickersLocalization(huHUPickers);
@@ -8,6 +8,7 @@ export * from './faIR';
8
8
  export * from './fiFI';
9
9
  export * from './csCZ';
10
10
  export * from './frFR';
11
+ export * from './huHU';
11
12
  export * from './enUS';
12
13
  export * from './nbNO';
13
14
  export * from './svSE';
@@ -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.17
1
+ /** @license MUI X v5.0.19
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;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.huHU = void 0;
7
+
8
+ var _getPickersLocalization = require("./utils/getPickersLocalization");
9
+
10
+ // maps TimeView to its translation
11
+ const timeViews = {
12
+ hours: 'Óra',
13
+ minutes: 'Perc',
14
+ seconds: 'Másodperc'
15
+ }; // maps PickersToolbar["viewType"] to its translation
16
+
17
+ const pickerViews = {
18
+ calendar: 'naptár',
19
+ clock: 'óra'
20
+ };
21
+ const huHUPickers = {
22
+ // Calendar navigation
23
+ previousMonth: 'Előző hónap',
24
+ nextMonth: 'Következő hónap',
25
+ // View navigation
26
+ openPreviousView: 'Előző nézet megnyitása',
27
+ openNextView: 'Következő nézet megnyitása',
28
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'az évválasztó már nyitva, váltson a naptárnézetre' : 'a naptárnézet már nyitva, váltson az évválasztóra',
29
+ inputModeToggleButtonAriaLabel: (isKeyboardInputOpen, viewType) => isKeyboardInputOpen ? `szöveges beviteli nézet aktív, váltás ${pickerViews[viewType]} nézetre` : `${pickerViews[viewType]} beviteli nézet aktív, váltás szöveges beviteli nézetre`,
30
+ // DateRange placeholders
31
+ start: 'Kezdő dátum',
32
+ end: 'Záró dátum',
33
+ // Action bar
34
+ cancelButtonLabel: 'Mégse',
35
+ clearButtonLabel: 'Törlés',
36
+ okButtonLabel: 'OK',
37
+ todayButtonLabel: 'Ma',
38
+ // Toolbar titles
39
+ datePickerDefaultToolbarTitle: 'Dátum kiválasztása',
40
+ dateTimePickerDefaultToolbarTitle: 'Dátum és idő kiválasztása',
41
+ timePickerDefaultToolbarTitle: 'Idő kiválasztása',
42
+ dateRangePickerDefaultToolbarTitle: 'Dátumhatárok kiválasztása',
43
+ // Clock labels
44
+ clockLabelText: (view, time, adapter) => {
45
+ var _timeViews$view;
46
+
47
+ return `${(_timeViews$view = timeViews[view]) != null ? _timeViews$view : view} kiválasztása. ${time === null ? 'Nincs kiválasztva idő' : `A kiválasztott idő ${adapter.format(time, 'fullTime')}`}`;
48
+ },
49
+ hoursClockNumberText: hours => `${hours} ${timeViews.hours.toLowerCase()}`,
50
+ minutesClockNumberText: minutes => `${minutes} ${timeViews.minutes.toLowerCase()}`,
51
+ secondsClockNumberText: seconds => `${seconds} ${timeViews.seconds.toLowerCase()}`,
52
+ // Open picker labels
53
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Válasszon dátumot, a kiválasztott dátum: ${utils.format(value, 'fullDate')}` : 'Válasszon dátumot',
54
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Válasszon időt, a kiválasztott idő: ${utils.format(value, 'fullTime')}` : 'Válasszon időt',
55
+ // Table labels
56
+ timeTableLabel: 'válasszon időt',
57
+ dateTableLabel: 'válasszon dátumot'
58
+ };
59
+ const huHU = (0, _getPickersLocalization.getPickersLocalization)(huHUPickers);
60
+ exports.huHU = huHU;
@@ -134,6 +134,19 @@ Object.keys(_frFR).forEach(function (key) {
134
134
  });
135
135
  });
136
136
 
137
+ var _huHU = require("./huHU");
138
+
139
+ Object.keys(_huHU).forEach(function (key) {
140
+ if (key === "default" || key === "__esModule") return;
141
+ if (key in exports && exports[key] === _huHU[key]) return;
142
+ Object.defineProperty(exports, key, {
143
+ enumerable: true,
144
+ get: function () {
145
+ return _huHU[key];
146
+ }
147
+ });
148
+ });
149
+
137
150
  var _enUS = require("./enUS");
138
151
 
139
152
  Object.keys(_enUS).forEach(function (key) {
@@ -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.17",
3
+ "version": "5.0.19",
4
4
  "description": "The community edition of the date picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",