@mui/x-date-pickers 5.0.3 โ†’ 5.0.4

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,7 +3,67 @@
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
- ## v5.17.4
6
+ ## 5.17.6
7
+
8
+ _Oct 6, 2022_
9
+
10
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights โœจ:
11
+
12
+ - ๐ŸŒ Add Japanese (ja-JP) locale to pickers (#6365) @sho918
13
+ - ๐ŸŽ Improve support for theme augmentation in the DataGrid (#6406) @cherniavskii
14
+ - ๐Ÿž Bugfixes
15
+
16
+ ### `@mui/x-data-grid@v5.17.6` / `@mui/x-data-grid-pro@v5.17.6` / `@mui/x-data-grid-premium@v5.17.6`
17
+
18
+ #### Changes
19
+
20
+ - [DataGrid] Add missing `valueOptions` (#6400) @DanailH
21
+ - [DataGrid] Don't start edit mode when pressing <kbd>Shift</kbd> + <kbd>Space</kbd> (#6380) @m4theushw
22
+ - [DataGrid] Pass generics to the components in the theme augmentation (#6406) @cherniavskii
23
+
24
+ ### `@mui/x-date-pickers@v5.0.4` / `@mui/x-date-pickers-pro@v5.0.4`
25
+
26
+ #### Changes
27
+
28
+ - [l10n] Add Japanese (ja-JP) locale to pickers (#6365) (#6382) @sho918
29
+ - [pickers] Prevent `CalendarPicker` getting focus when `autoFocus=false` (#6304) (#6362) @alexfauquette
30
+ - [pickers] Fix git repository location @oliviertassinari
31
+
32
+ ### Docs
33
+
34
+ - [docs] Fix customized day rendering demo style (#6342) @Ambrish-git
35
+
36
+ ## 5.17.5
37
+
38
+ _Sep 29, 2022_
39
+
40
+ We'd like to offer a big thanks to the 2 contributors who made this release possible. Here are some highlights โœจ:
41
+
42
+ - ๐ŸŽ Add theme augmentation module to DataGridPremium (#6316) @cherniavskii
43
+ - ๐Ÿ‘€ Fix blank space when changing page with dynamic row height (#6320) @m4theushw
44
+ - ๐Ÿ“š Improve controlled editing demo to make easier to reuse it (#6306) @cherniavskii
45
+ - ๐Ÿž Bugfixes
46
+
47
+ ### `@mui/x-data-grid@v5.17.5` / `@mui/x-data-grid-pro@v5.17.5` / `@mui/x-data-grid-premium@v5.17.5`
48
+
49
+ #### Changes
50
+
51
+ - [DataGrid] Fix `GridPagination` props typing (#6295) @cherniavskii
52
+ - [DataGrid] Fix `GridRow` not forwarding `ref` to the root element (#6303) @cherniavskii
53
+ - [DataGrid] Fix `undefined` value being showed in filter button tooltip text (#6271) @cherniavskii
54
+ - [DataGrid] Fix blank space when changing page with dynamic row height (#6320) @m4theushw
55
+ - [DataGrid] Revert cell/row mode if `processRowUpdate` fails (#6319) @m4theushw
56
+ - [DataGridPremium] Add missing `themeAugmentation` module (#6316) @cherniavskii
57
+
58
+ ### Docs
59
+
60
+ - [docs] Pass model change callbacks in controlled grid editing demos (#6306) @cherniavskii
61
+
62
+ ### Core
63
+
64
+ - [core] Reduce the amount of updated screenshots reported by Argos (#6310) @cherniavskii
65
+
66
+ ## 5.17.4
7
67
 
8
68
  _Sep 22, 2022_
9
69
 
@@ -257,8 +257,14 @@ export const CalendarPicker = /*#__PURE__*/React.forwardRef(function CalendarPic
257
257
  setInternalFocusedView(prevView => prevView === eventView ? null : prevView);
258
258
  }
259
259
  });
260
+ const prevOpenViewRef = React.useRef(openView);
260
261
  React.useEffect(() => {
261
262
  // Set focus to the button when switching from a view to another
263
+ if (prevOpenViewRef.current === openView) {
264
+ return;
265
+ }
266
+
267
+ prevOpenViewRef.current = openView;
262
268
  handleFocusedViewChange(openView)(true);
263
269
  }, [openView, handleFocusedViewChange]);
264
270
  return /*#__PURE__*/_jsxs(CalendarPickerRoot, {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.3
1
+ /** @license MUI v5.0.4
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.
@@ -270,8 +270,14 @@ export var CalendarPicker = /*#__PURE__*/React.forwardRef(function CalendarPicke
270
270
  }
271
271
  };
272
272
  });
273
+ var prevOpenViewRef = React.useRef(openView);
273
274
  React.useEffect(function () {
274
275
  // Set focus to the button when switching from a view to another
276
+ if (prevOpenViewRef.current === openView) {
277
+ return;
278
+ }
279
+
280
+ prevOpenViewRef.current = openView;
275
281
  handleFocusedViewChange(openView)(true);
276
282
  }, [openView, handleFocusedViewChange]);
277
283
  return /*#__PURE__*/_jsxs(CalendarPickerRoot, {
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.3
1
+ /** @license MUI v5.0.4
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.
@@ -14,4 +14,5 @@ export * from './itIT';
14
14
  export * from './zhCN';
15
15
  export * from './koKR';
16
16
  export * from './isIS';
17
+ export * from './jaJP';
17
18
  export * from './utils/pickersLocaleTextApi';
@@ -0,0 +1,65 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ // maps ClockPickerView to its translation
3
+ var clockViews = {
4
+ hours: 'ๆ™‚้–“',
5
+ minutes: 'ๅˆ†',
6
+ seconds: '็ง’'
7
+ }; // maps PickersToolbar["viewType"] to its translation
8
+
9
+ var pickerViews = {
10
+ calendar: 'ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบ',
11
+ clock: 'ๆ™‚่จˆ่กจ็คบ'
12
+ };
13
+ var jaJPPickers = {
14
+ // Calendar navigation
15
+ previousMonth: 'ๅ…ˆๆœˆ',
16
+ nextMonth: 'ๆฅๆœˆ',
17
+ // View navigation
18
+ openPreviousView: 'ๅ‰ใฎ่กจ็คบใ‚’้–‹ใ',
19
+ openNextView: 'ๆฌกใฎ่กจ็คบใ‚’้–‹ใ',
20
+ calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
21
+ return view === 'year' ? 'ๅนด้ธๆŠž่กจ็คบใ‹ใ‚‰ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹' : 'ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบใ‹ใ‚‰ๅนด้ธๆŠž่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹';
22
+ },
23
+ inputModeToggleButtonAriaLabel: function inputModeToggleButtonAriaLabel(isKeyboardInputOpen, viewType) {
24
+ return isKeyboardInputOpen ? "\u30C6\u30AD\u30B9\u30C8\u5165\u529B\u8868\u793A\u304B\u3089".concat(pickerViews[viewType], "\u306B\u5207\u308A\u66FF\u3048\u308B") : "".concat(pickerViews[viewType], "\u304B\u3089\u30C6\u30AD\u30B9\u30C8\u5165\u529B\u8868\u793A\u306B\u5207\u308A\u66FF\u3048\u308B");
25
+ },
26
+ // DateRange placeholders
27
+ start: '้–‹ๅง‹',
28
+ end: '็ต‚ไบ†',
29
+ // Action bar
30
+ cancelButtonLabel: 'ใ‚ญใƒฃใƒณใ‚ปใƒซ',
31
+ clearButtonLabel: 'ใ‚ฏใƒชใ‚ข',
32
+ okButtonLabel: '็ขบๅฎš',
33
+ todayButtonLabel: 'ไปŠๆ—ฅ',
34
+ // Toolbar titles
35
+ datePickerDefaultToolbarTitle: 'ๆ—ฅไป˜ใ‚’้ธๆŠž',
36
+ dateTimePickerDefaultToolbarTitle: 'ๆ—ฅๆ™‚ใ‚’้ธๆŠž',
37
+ timePickerDefaultToolbarTitle: 'ๆ™‚้–“ใ‚’้ธๆŠž',
38
+ dateRangePickerDefaultToolbarTitle: 'ๆ—ฅไป˜ใฎ็ฏ„ๅ›ฒใ‚’้ธๆŠž',
39
+ // Clock labels
40
+ clockLabelText: function clockLabelText(view, time, adapter) {
41
+ var _clockViews$view;
42
+
43
+ return "".concat((_clockViews$view = clockViews[view]) != null ? _clockViews$view : view, "\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044 ").concat(time === null ? 'ๆ™‚้–“ใŒ้ธๆŠžใ•ใ‚Œใฆใ„ใพใ›ใ‚“' : "\u9078\u629E\u3057\u305F\u6642\u9593\u306F ".concat(adapter.format(time, 'fullTime'), " \u3067\u3059"));
44
+ },
45
+ hoursClockNumberText: function hoursClockNumberText(hours) {
46
+ return "".concat(hours, " ").concat(clockViews.hours);
47
+ },
48
+ minutesClockNumberText: function minutesClockNumberText(minutes) {
49
+ return "".concat(minutes, " ").concat(clockViews.minutes);
50
+ },
51
+ secondsClockNumberText: function secondsClockNumberText(seconds) {
52
+ return "".concat(seconds, " ").concat(clockViews.seconds);
53
+ },
54
+ // Open picker labels
55
+ openDatePickerDialogue: function openDatePickerDialogue(value, utils) {
56
+ return value !== null && utils.isValid(value) ? "\u65E5\u4ED8\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u9078\u629E\u3057\u305F\u65E5\u4ED8\u306F ".concat(utils.format(value, 'fullDate'), " \u3067\u3059") : 'ๆ—ฅไป˜ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„';
57
+ },
58
+ openTimePickerDialogue: function openTimePickerDialogue(value, utils) {
59
+ return value !== null && utils.isValid(value) ? "\u6642\u9593\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u9078\u629E\u3057\u305F\u6642\u9593\u306F ".concat(utils.format(value, 'fullTime'), " \u3067\u3059") : 'ๆ™‚้–“ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„';
60
+ },
61
+ // Table labels
62
+ timeTableLabel: 'ๆ™‚้–“ใ‚’้ธๆŠž',
63
+ dateTableLabel: 'ๆ—ฅไป˜ใ‚’้ธๆŠž'
64
+ };
65
+ export var jaJP = getPickersLocalization(jaJPPickers);
@@ -14,4 +14,5 @@ export * from './itIT';
14
14
  export * from './zhCN';
15
15
  export * from './koKR';
16
16
  export * from './isIS';
17
+ export * from './jaJP';
17
18
  export * from './utils/pickersLocaleTextApi';
package/locales/index.js CHANGED
@@ -14,4 +14,5 @@ export * from './itIT';
14
14
  export * from './zhCN';
15
15
  export * from './koKR';
16
16
  export * from './isIS';
17
+ export * from './jaJP';
17
18
  export * from './utils/pickersLocaleTextApi';
@@ -0,0 +1,35 @@
1
+ import { CalendarPickerView } from '../internals/models';
2
+ export declare const jaJP: {
3
+ components: {
4
+ MuiLocalizationProvider: {
5
+ defaultProps: {
6
+ localeText: {
7
+ previousMonth?: string | undefined;
8
+ nextMonth?: string | undefined;
9
+ openPreviousView?: string | undefined;
10
+ openNextView?: string | undefined;
11
+ cancelButtonLabel?: string | undefined;
12
+ clearButtonLabel?: string | undefined;
13
+ okButtonLabel?: string | undefined;
14
+ todayButtonLabel?: string | undefined;
15
+ start?: string | undefined;
16
+ end?: string | undefined;
17
+ calendarViewSwitchingButtonAriaLabel?: ((currentView: CalendarPickerView) => string) | undefined;
18
+ inputModeToggleButtonAriaLabel?: ((isKeyboardInputOpen: boolean, viewType: "calendar" | "clock") => string) | undefined;
19
+ clockLabelText?: ((view: import("../internals/models").ClockPickerView, time: any, adapter: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
20
+ hoursClockNumberText?: ((hours: string) => string) | undefined;
21
+ minutesClockNumberText?: ((minutes: string) => string) | undefined;
22
+ secondsClockNumberText?: ((seconds: string) => string) | undefined;
23
+ openDatePickerDialogue?: ((date: any, utils: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
24
+ openTimePickerDialogue?: ((date: any, utils: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
25
+ timeTableLabel?: string | undefined;
26
+ dateTableLabel?: string | undefined;
27
+ datePickerDefaultToolbarTitle?: string | undefined;
28
+ dateTimePickerDefaultToolbarTitle?: string | undefined;
29
+ timePickerDefaultToolbarTitle?: string | undefined;
30
+ dateRangePickerDefaultToolbarTitle?: string | undefined;
31
+ };
32
+ };
33
+ };
34
+ };
35
+ };
@@ -0,0 +1,51 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ // maps ClockPickerView to its translation
3
+ const clockViews = {
4
+ hours: 'ๆ™‚้–“',
5
+ minutes: 'ๅˆ†',
6
+ seconds: '็ง’'
7
+ }; // maps PickersToolbar["viewType"] to its translation
8
+
9
+ const pickerViews = {
10
+ calendar: 'ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบ',
11
+ clock: 'ๆ™‚่จˆ่กจ็คบ'
12
+ };
13
+ const jaJPPickers = {
14
+ // Calendar navigation
15
+ previousMonth: 'ๅ…ˆๆœˆ',
16
+ nextMonth: 'ๆฅๆœˆ',
17
+ // View navigation
18
+ openPreviousView: 'ๅ‰ใฎ่กจ็คบใ‚’้–‹ใ',
19
+ openNextView: 'ๆฌกใฎ่กจ็คบใ‚’้–‹ใ',
20
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'ๅนด้ธๆŠž่กจ็คบใ‹ใ‚‰ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹' : 'ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบใ‹ใ‚‰ๅนด้ธๆŠž่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹',
21
+ inputModeToggleButtonAriaLabel: (isKeyboardInputOpen, viewType) => isKeyboardInputOpen ? `ใƒ†ใ‚ญใ‚นใƒˆๅ…ฅๅŠ›่กจ็คบใ‹ใ‚‰${pickerViews[viewType]}ใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹` : `${pickerViews[viewType]}ใ‹ใ‚‰ใƒ†ใ‚ญใ‚นใƒˆๅ…ฅๅŠ›่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹`,
22
+ // DateRange placeholders
23
+ start: '้–‹ๅง‹',
24
+ end: '็ต‚ไบ†',
25
+ // Action bar
26
+ cancelButtonLabel: 'ใ‚ญใƒฃใƒณใ‚ปใƒซ',
27
+ clearButtonLabel: 'ใ‚ฏใƒชใ‚ข',
28
+ okButtonLabel: '็ขบๅฎš',
29
+ todayButtonLabel: 'ไปŠๆ—ฅ',
30
+ // Toolbar titles
31
+ datePickerDefaultToolbarTitle: 'ๆ—ฅไป˜ใ‚’้ธๆŠž',
32
+ dateTimePickerDefaultToolbarTitle: 'ๆ—ฅๆ™‚ใ‚’้ธๆŠž',
33
+ timePickerDefaultToolbarTitle: 'ๆ™‚้–“ใ‚’้ธๆŠž',
34
+ dateRangePickerDefaultToolbarTitle: 'ๆ—ฅไป˜ใฎ็ฏ„ๅ›ฒใ‚’้ธๆŠž',
35
+ // Clock labels
36
+ clockLabelText: (view, time, adapter) => {
37
+ var _clockViews$view;
38
+
39
+ return `${(_clockViews$view = clockViews[view]) != null ? _clockViews$view : view}ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„ ${time === null ? 'ๆ™‚้–“ใŒ้ธๆŠžใ•ใ‚Œใฆใ„ใพใ›ใ‚“' : `้ธๆŠžใ—ใŸๆ™‚้–“ใฏ ${adapter.format(time, 'fullTime')} ใงใ™`}`;
40
+ },
41
+ hoursClockNumberText: hours => `${hours} ${clockViews.hours}`,
42
+ minutesClockNumberText: minutes => `${minutes} ${clockViews.minutes}`,
43
+ secondsClockNumberText: seconds => `${seconds} ${clockViews.seconds}`,
44
+ // Open picker labels
45
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `ๆ—ฅไป˜ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„ใ€‚้ธๆŠžใ—ใŸๆ—ฅไป˜ใฏ ${utils.format(value, 'fullDate')} ใงใ™` : 'ๆ—ฅไป˜ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„',
46
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `ๆ™‚้–“ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„ใ€‚้ธๆŠžใ—ใŸๆ™‚้–“ใฏ ${utils.format(value, 'fullTime')} ใงใ™` : 'ๆ™‚้–“ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„',
47
+ // Table labels
48
+ timeTableLabel: 'ๆ™‚้–“ใ‚’้ธๆŠž',
49
+ dateTableLabel: 'ๆ—ฅไป˜ใ‚’้ธๆŠž'
50
+ };
51
+ export const jaJP = getPickersLocalization(jaJPPickers);
@@ -257,8 +257,14 @@ export const CalendarPicker = /*#__PURE__*/React.forwardRef(function CalendarPic
257
257
  setInternalFocusedView(prevView => prevView === eventView ? null : prevView);
258
258
  }
259
259
  });
260
+ const prevOpenViewRef = React.useRef(openView);
260
261
  React.useEffect(() => {
261
262
  // Set focus to the button when switching from a view to another
263
+ if (prevOpenViewRef.current === openView) {
264
+ return;
265
+ }
266
+
267
+ prevOpenViewRef.current = openView;
262
268
  handleFocusedViewChange(openView)(true);
263
269
  }, [openView, handleFocusedViewChange]);
264
270
  return /*#__PURE__*/_jsxs(CalendarPickerRoot, {
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.3
1
+ /** @license MUI v5.0.4
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.
@@ -14,4 +14,5 @@ export * from './itIT';
14
14
  export * from './zhCN';
15
15
  export * from './koKR';
16
16
  export * from './isIS';
17
+ export * from './jaJP';
17
18
  export * from './utils/pickersLocaleTextApi';
@@ -0,0 +1,47 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ // maps ClockPickerView to its translation
3
+ const clockViews = {
4
+ hours: 'ๆ™‚้–“',
5
+ minutes: 'ๅˆ†',
6
+ seconds: '็ง’'
7
+ }; // maps PickersToolbar["viewType"] to its translation
8
+
9
+ const pickerViews = {
10
+ calendar: 'ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบ',
11
+ clock: 'ๆ™‚่จˆ่กจ็คบ'
12
+ };
13
+ const jaJPPickers = {
14
+ // Calendar navigation
15
+ previousMonth: 'ๅ…ˆๆœˆ',
16
+ nextMonth: 'ๆฅๆœˆ',
17
+ // View navigation
18
+ openPreviousView: 'ๅ‰ใฎ่กจ็คบใ‚’้–‹ใ',
19
+ openNextView: 'ๆฌกใฎ่กจ็คบใ‚’้–‹ใ',
20
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'ๅนด้ธๆŠž่กจ็คบใ‹ใ‚‰ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹' : 'ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบใ‹ใ‚‰ๅนด้ธๆŠž่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹',
21
+ inputModeToggleButtonAriaLabel: (isKeyboardInputOpen, viewType) => isKeyboardInputOpen ? `ใƒ†ใ‚ญใ‚นใƒˆๅ…ฅๅŠ›่กจ็คบใ‹ใ‚‰${pickerViews[viewType]}ใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹` : `${pickerViews[viewType]}ใ‹ใ‚‰ใƒ†ใ‚ญใ‚นใƒˆๅ…ฅๅŠ›่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹`,
22
+ // DateRange placeholders
23
+ start: '้–‹ๅง‹',
24
+ end: '็ต‚ไบ†',
25
+ // Action bar
26
+ cancelButtonLabel: 'ใ‚ญใƒฃใƒณใ‚ปใƒซ',
27
+ clearButtonLabel: 'ใ‚ฏใƒชใ‚ข',
28
+ okButtonLabel: '็ขบๅฎš',
29
+ todayButtonLabel: 'ไปŠๆ—ฅ',
30
+ // Toolbar titles
31
+ datePickerDefaultToolbarTitle: 'ๆ—ฅไป˜ใ‚’้ธๆŠž',
32
+ dateTimePickerDefaultToolbarTitle: 'ๆ—ฅๆ™‚ใ‚’้ธๆŠž',
33
+ timePickerDefaultToolbarTitle: 'ๆ™‚้–“ใ‚’้ธๆŠž',
34
+ dateRangePickerDefaultToolbarTitle: 'ๆ—ฅไป˜ใฎ็ฏ„ๅ›ฒใ‚’้ธๆŠž',
35
+ // Clock labels
36
+ clockLabelText: (view, time, adapter) => `${clockViews[view] ?? view}ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„ ${time === null ? 'ๆ™‚้–“ใŒ้ธๆŠžใ•ใ‚Œใฆใ„ใพใ›ใ‚“' : `้ธๆŠžใ—ใŸๆ™‚้–“ใฏ ${adapter.format(time, 'fullTime')} ใงใ™`}`,
37
+ hoursClockNumberText: hours => `${hours} ${clockViews.hours}`,
38
+ minutesClockNumberText: minutes => `${minutes} ${clockViews.minutes}`,
39
+ secondsClockNumberText: seconds => `${seconds} ${clockViews.seconds}`,
40
+ // Open picker labels
41
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `ๆ—ฅไป˜ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„ใ€‚้ธๆŠžใ—ใŸๆ—ฅไป˜ใฏ ${utils.format(value, 'fullDate')} ใงใ™` : 'ๆ—ฅไป˜ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„',
42
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `ๆ™‚้–“ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„ใ€‚้ธๆŠžใ—ใŸๆ™‚้–“ใฏ ${utils.format(value, 'fullTime')} ใงใ™` : 'ๆ™‚้–“ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„',
43
+ // Table labels
44
+ timeTableLabel: 'ๆ™‚้–“ใ‚’้ธๆŠž',
45
+ dateTableLabel: 'ๆ—ฅไป˜ใ‚’้ธๆŠž'
46
+ };
47
+ export const jaJP = getPickersLocalization(jaJPPickers);
@@ -288,8 +288,14 @@ const CalendarPicker = /*#__PURE__*/React.forwardRef(function CalendarPicker(inP
288
288
  setInternalFocusedView(prevView => prevView === eventView ? null : prevView);
289
289
  }
290
290
  });
291
+ const prevOpenViewRef = React.useRef(openView);
291
292
  React.useEffect(() => {
292
293
  // Set focus to the button when switching from a view to another
294
+ if (prevOpenViewRef.current === openView) {
295
+ return;
296
+ }
297
+
298
+ prevOpenViewRef.current = openView;
293
299
  handleFocusedViewChange(openView)(true);
294
300
  }, [openView, handleFocusedViewChange]);
295
301
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(CalendarPickerRoot, {
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.3
1
+ /** @license MUI v5.0.4
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.
@@ -212,6 +212,19 @@ Object.keys(_isIS).forEach(function (key) {
212
212
  });
213
213
  });
214
214
 
215
+ var _jaJP = require("./jaJP");
216
+
217
+ Object.keys(_jaJP).forEach(function (key) {
218
+ if (key === "default" || key === "__esModule") return;
219
+ if (key in exports && exports[key] === _jaJP[key]) return;
220
+ Object.defineProperty(exports, key, {
221
+ enumerable: true,
222
+ get: function () {
223
+ return _jaJP[key];
224
+ }
225
+ });
226
+ });
227
+
215
228
  var _pickersLocaleTextApi = require("./utils/pickersLocaleTextApi");
216
229
 
217
230
  Object.keys(_pickersLocaleTextApi).forEach(function (key) {
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.jaJP = void 0;
7
+
8
+ var _getPickersLocalization = require("./utils/getPickersLocalization");
9
+
10
+ // maps ClockPickerView to its translation
11
+ const clockViews = {
12
+ hours: 'ๆ™‚้–“',
13
+ minutes: 'ๅˆ†',
14
+ seconds: '็ง’'
15
+ }; // maps PickersToolbar["viewType"] to its translation
16
+
17
+ const pickerViews = {
18
+ calendar: 'ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบ',
19
+ clock: 'ๆ™‚่จˆ่กจ็คบ'
20
+ };
21
+ const jaJPPickers = {
22
+ // Calendar navigation
23
+ previousMonth: 'ๅ…ˆๆœˆ',
24
+ nextMonth: 'ๆฅๆœˆ',
25
+ // View navigation
26
+ openPreviousView: 'ๅ‰ใฎ่กจ็คบใ‚’้–‹ใ',
27
+ openNextView: 'ๆฌกใฎ่กจ็คบใ‚’้–‹ใ',
28
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'ๅนด้ธๆŠž่กจ็คบใ‹ใ‚‰ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹' : 'ใ‚ซใƒฌใƒณใƒ€ใƒผ่กจ็คบใ‹ใ‚‰ๅนด้ธๆŠž่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹',
29
+ inputModeToggleButtonAriaLabel: (isKeyboardInputOpen, viewType) => isKeyboardInputOpen ? `ใƒ†ใ‚ญใ‚นใƒˆๅ…ฅๅŠ›่กจ็คบใ‹ใ‚‰${pickerViews[viewType]}ใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹` : `${pickerViews[viewType]}ใ‹ใ‚‰ใƒ†ใ‚ญใ‚นใƒˆๅ…ฅๅŠ›่กจ็คบใซๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹`,
30
+ // DateRange placeholders
31
+ start: '้–‹ๅง‹',
32
+ end: '็ต‚ไบ†',
33
+ // Action bar
34
+ cancelButtonLabel: 'ใ‚ญใƒฃใƒณใ‚ปใƒซ',
35
+ clearButtonLabel: 'ใ‚ฏใƒชใ‚ข',
36
+ okButtonLabel: '็ขบๅฎš',
37
+ todayButtonLabel: 'ไปŠๆ—ฅ',
38
+ // Toolbar titles
39
+ datePickerDefaultToolbarTitle: 'ๆ—ฅไป˜ใ‚’้ธๆŠž',
40
+ dateTimePickerDefaultToolbarTitle: 'ๆ—ฅๆ™‚ใ‚’้ธๆŠž',
41
+ timePickerDefaultToolbarTitle: 'ๆ™‚้–“ใ‚’้ธๆŠž',
42
+ dateRangePickerDefaultToolbarTitle: 'ๆ—ฅไป˜ใฎ็ฏ„ๅ›ฒใ‚’้ธๆŠž',
43
+ // Clock labels
44
+ clockLabelText: (view, time, adapter) => {
45
+ var _clockViews$view;
46
+
47
+ return `${(_clockViews$view = clockViews[view]) != null ? _clockViews$view : view}ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„ ${time === null ? 'ๆ™‚้–“ใŒ้ธๆŠžใ•ใ‚Œใฆใ„ใพใ›ใ‚“' : `้ธๆŠžใ—ใŸๆ™‚้–“ใฏ ${adapter.format(time, 'fullTime')} ใงใ™`}`;
48
+ },
49
+ hoursClockNumberText: hours => `${hours} ${clockViews.hours}`,
50
+ minutesClockNumberText: minutes => `${minutes} ${clockViews.minutes}`,
51
+ secondsClockNumberText: seconds => `${seconds} ${clockViews.seconds}`,
52
+ // Open picker labels
53
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `ๆ—ฅไป˜ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„ใ€‚้ธๆŠžใ—ใŸๆ—ฅไป˜ใฏ ${utils.format(value, 'fullDate')} ใงใ™` : 'ๆ—ฅไป˜ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„',
54
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `ๆ™‚้–“ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„ใ€‚้ธๆŠžใ—ใŸๆ™‚้–“ใฏ ${utils.format(value, 'fullTime')} ใงใ™` : 'ๆ™‚้–“ใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„',
55
+ // Table labels
56
+ timeTableLabel: 'ๆ™‚้–“ใ‚’้ธๆŠž',
57
+ dateTableLabel: 'ๆ—ฅไป˜ใ‚’้ธๆŠž'
58
+ };
59
+ const jaJP = (0, _getPickersLocalization.getPickersLocalization)(jaJPPickers);
60
+ exports.jaJP = jaJP;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "description": "The community edition of the date picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "https://github.com/mui-org/material-ui-x.git",
32
+ "url": "https://github.com/mui/mui-x.git",
33
33
  "directory": "packages/x-date-pickers"
34
34
  },
35
35
  "dependencies": {