@mui/x-date-pickers 5.0.0-beta.0 → 5.0.0-beta.1

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,56 @@
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.13.1
7
+
8
+ _Jul 15, 2022_
9
+
10
+ We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - ✏️ Enter edit mode when pasting in a cell with Ctrl+V (Cmd+V on macOS) (#5405) @alexfauquette
13
+ - 🌍 Many improvements to the locales
14
+ - 📚 Documentation improvements
15
+ - 🐞 Bugfixes
16
+
17
+ ### `@mui/x-data-grid@v5.13.1` / `@mui/x-data-grid-pro@v5.13.1` / `@mui/x-data-grid-premium@v5.13.1`
18
+
19
+ #### Changes
20
+
21
+ - [DataGrid] Fix blank space when using dynamic row height with pagination (#5315) @m4theushw
22
+ - [DataGrid] Start editing with uppercase letter and Ctrl+V (#5405) @alexfauquette
23
+ - [DataGrid] Fix some filters being removed from filter model on filter panel open (#5403) @cherniavskii
24
+ - [DataGridPro] Improve pinned column headers accessibility (#5370) @cherniavskii
25
+ - [l10n] Improve Dutch (nl-NL) locale (#5464) @developenguin
26
+ - [l10n] Improve French (fr-FR) locale (#3211) (#5420) @Zenoo
27
+ - [l10n] Improve German (de-DE) locale (#5448) @sebastianfrey
28
+ - [l10n] Improve Brazilian Portuguese (pt-BR) locale (#5394) @andrepxa
29
+ - [l10n] Improve Romanian (ro-RO) locale (#5449) @rolule
30
+
31
+ ### `@mui/x-date-pickers@v5.0.0-beta.1` / `@mui/x-date-picker-pro@5.0.0-beta.1`
32
+
33
+ #### Changes
34
+
35
+ - [pickers] Add Italian (it-IT) locale (#5467) @felixh10r
36
+ - [pickers] Add Spanish (es-ES) locale (#5468) @felixh10r
37
+ - [pickers] Improve French (fr-FR) locale (#5446) @Zenoo
38
+ - [pickers] Improve German (de-DE) locale (#5447) @sebastianfrey
39
+
40
+ ### Docs
41
+
42
+ - [docs] Fix typo in the sorting page (#5431) @JosephMarinier
43
+ - [docs] Fix description for "Striped rows" example (#5432) @lindapaiste
44
+ - [docs] Make a clear difference between the license and license key (#5316) @oliviertassinari
45
+ - [docs] Update pickers README files (#5456) @cherniavskii
46
+ - [docs] Clarify the scope of support for MUI X (#5423) @joserodolfofreitas
47
+
48
+ ### Core
49
+
50
+ - [core] Add technical support link to \_redirects (#5428) @joserodolfofreitas
51
+ - [core] Improve GitHub bug reproduction template (#5067) @joserodolfofreitas
52
+ - [core] Include playground pages in tsconfig (#5367) @cherniavskii
53
+ - [core] Sort keys like in material-ui @oliviertassinari
54
+ - [test] Wait for flags to load on regression tests (#5473) @m4theushw
55
+
6
56
  ## 5.13.0
7
57
 
8
58
  _Jul 7, 2022_
package/README.md CHANGED
@@ -8,11 +8,26 @@ It's part of MUI X, an open core extension of MUI, with advanced components.
8
8
  Install the package in your project directory with:
9
9
 
10
10
  ```sh
11
- // with npm
12
11
  npm install @mui/x-date-pickers
12
+ ```
13
+
14
+ Then install the date library of your choice (if not already installed).
15
+ We currently support 4 different date-libraries:
13
16
 
14
- // with yarn
15
- yarn add @mui/x-date-pickers
17
+ - [date-fns](https://date-fns.org/)
18
+ - [Day.js](https://day.js.org/)
19
+ - [Luxon](https://moment.github.io/luxon/#/)
20
+ - [Moment.js](https://momentjs.com/)
21
+
22
+ ```sh
23
+ // date-fns
24
+ npm install date-fns
25
+ // or dayjs
26
+ npm install dayjs
27
+ // or luxon
28
+ npm install luxon
29
+ // or moment
30
+ npm install moment
16
31
  ```
17
32
 
18
33
  This component has the following peer dependencies that you will need to install as well.
@@ -25,40 +40,27 @@ This component has the following peer dependencies that you will need to install
25
40
  },
26
41
  ```
27
42
 
28
- You need to provide a date-library that is used by the pickers by setting the `dateAdapter` to an adapter of your choosing.
29
-
30
- We currently support 4 different date-libraries:
31
-
32
- - [date-fns](https://date-fns.org/)
33
- - [Day.js](https://day.js.org/)
34
- - [Luxon](https://moment.github.io/luxon/#/)
35
- - [Moment.js](https://momentjs.com/)
36
-
37
43
  If you need to use `js-joda`, `date-fns-jalali`, `jalaali`, or `hijri` library, you should be able to find the corresponding date-library from [`@date-io`](https://github.com/dmtrKovalenko/date-io#projects).
44
+ In such a case, you will have to install both the date-library and the corresponding @date-io adapter.
38
45
 
39
- First, you have to install the adapter package for the date-library you want to use:
40
-
41
- ```sh
42
- // date-fns
43
- npm install @date-io/date-fns
44
- // or for Day.js
45
- npm install @date-io/dayjs
46
- // or for Luxon
47
- npm install @date-io/luxon
48
- // or for Moment.js
49
- npm install @date-io/moment
46
+ ```jsx
47
+ // To use moment-jalaali
48
+ npm install moment-jalaali
49
+ npm install @date-io/jalaali
50
50
  ```
51
51
 
52
- Then you have to set the `dateAdapter` prop of the `LocalizationProvider` accordingly:
52
+ After installation completed, you have to set the `dateAdapter` prop of the `LocalizationProvider` accordingly.
53
+ The supported adapters are exported from `@mui/x-date-pickers`.
53
54
 
54
- ```js
55
+ ```jsx
56
+ import { LocalizationProvider } from '@mui/x-date-pickers';
55
57
  // date-fns
56
58
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
57
- // or for Day.js
59
+ // or for dayjs
58
60
  import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
59
- // or for Luxon
61
+ // or for luxon
60
62
  import { AdapterLuxon } from '@mui/x-date-pickers/AdapterLuxon';
61
- // or for Moment.js
63
+ // or for moment
62
64
  import { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
63
65
 
64
66
  function App({ children }) {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.0-beta.0
1
+ /** @license MUI v5.0.0-beta.1
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.
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.0-beta.0
1
+ /** @license MUI v5.0.0-beta.1
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.
@@ -1,5 +1,10 @@
1
- import { getPickersLocalization } from './utils/getPickersLocalization'; // import { CalendarPickerView } from '../internals/models';
2
-
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ // maps ClockPickerView to its translation
3
+ var views = {
4
+ hours: 'Stunden',
5
+ minutes: 'Minuten',
6
+ seconds: 'Sekunden'
7
+ };
3
8
  var deDEPickers = {
4
9
  // Calendar navigation
5
10
  previousMonth: 'Letzter Monat',
@@ -7,7 +12,9 @@ var deDEPickers = {
7
12
  // View navigation
8
13
  openPreviousView: 'Letzte Ansicht öffnen',
9
14
  openNextView: 'Nächste Ansicht öffnen',
10
- // calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',
15
+ calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
16
+ return view === 'year' ? 'Jahresansicht ist geöffnet, zur Kalenderansicht wechseln' : 'Kalenderansicht ist geöffnet, zur Jahresansicht wechseln';
17
+ },
11
18
  // DateRange placeholders
12
19
  start: 'Beginn',
13
20
  end: 'Ende',
@@ -15,17 +22,31 @@ var deDEPickers = {
15
22
  cancelButtonLabel: 'Abbrechen',
16
23
  clearButtonLabel: 'Löschen',
17
24
  okButtonLabel: 'OK',
18
- todayButtonLabel: 'Heute' // Clock labels
19
- // clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,
20
- // hoursClockNumberText: hours => `${hours} hours`,
21
- // minutesClockNumberText: minutes => `${minutes} minutes`,
22
- // secondsClockNumberText: seconds => `${seconds} seconds`,
25
+ todayButtonLabel: 'Heute',
26
+ // Clock labels
27
+ clockLabelText: function clockLabelText(view, time, adapter) {
28
+ var _views$view;
29
+
30
+ return "".concat((_views$view = views[view]) != null ? _views$view : view, " ausw\xE4hlen. ").concat(time === null ? 'Keine Uhrzeit ausgewählt' : "Gew\xE4hlte Uhrzeit ist ".concat(adapter.format(time, 'fullTime')));
31
+ },
32
+ hoursClockNumberText: function hoursClockNumberText(hours) {
33
+ return "".concat(hours, " ").concat(views.hours);
34
+ },
35
+ minutesClockNumberText: function minutesClockNumberText(minutes) {
36
+ return "".concat(minutes, " ").concat(views.minutes);
37
+ },
38
+ secondsClockNumberText: function secondsClockNumberText(seconds) {
39
+ return "".concat(seconds, " ").concat(views.seconds);
40
+ },
23
41
  // Open picker labels
24
- // openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date',
25
- // openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time',
42
+ openDatePickerDialogue: function openDatePickerDialogue(rawValue, utils) {
43
+ return rawValue && utils.isValid(utils.date(rawValue)) ? "Datum ausw\xE4hlen, gew\xE4hltes Datum ist ".concat(utils.format(utils.date(rawValue), 'fullDate')) : 'Datum auswählen';
44
+ },
45
+ openTimePickerDialogue: function openTimePickerDialogue(rawValue, utils) {
46
+ return rawValue && utils.isValid(utils.date(rawValue)) ? "Uhrzeit ausw\xE4hlen, gew\xE4hlte Uhrzeit ist ".concat(utils.format(utils.date(rawValue), 'fullTime')) : 'Uhrzeit auswählen';
47
+ },
26
48
  // Table labels
27
- // timeTableLabel: 'pick time',
28
- // dateTableLabel: 'pick date',
29
-
49
+ timeTableLabel: 'Uhrzeit auswählen',
50
+ dateTableLabel: 'Datum auswählen'
30
51
  };
31
52
  export var deDE = getPickersLocalization(deDEPickers);
@@ -0,0 +1,50 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ var views = {
3
+ hours: 'las horas',
4
+ minutes: 'los minutos',
5
+ seconds: 'los segundos'
6
+ }; // This object is not Partial<PickersLocaleText> because it is the default values
7
+
8
+ var esESPickers = {
9
+ // Calendar navigation
10
+ previousMonth: 'Último mes',
11
+ nextMonth: 'Próximo mes',
12
+ // View navigation
13
+ openPreviousView: 'abrir la última vista',
14
+ openNextView: 'abrir la siguiente vista',
15
+ calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
16
+ return view === 'year' ? 'la vista del año está abierta, cambie a la vista de calendario' : 'la vista de calendario está abierta, cambie a la vista del año';
17
+ },
18
+ // DateRange placeholders
19
+ start: 'Empezar',
20
+ end: 'Terminar',
21
+ // Action bar
22
+ cancelButtonLabel: 'Cancelar',
23
+ clearButtonLabel: 'Limpia',
24
+ okButtonLabel: 'OK',
25
+ todayButtonLabel: 'Hoy',
26
+ // Clock labels
27
+ clockLabelText: function clockLabelText(view, time, adapter) {
28
+ return "Seleccione ".concat(views[view], ". ").concat(time === null ? 'Sin tiempo seleccionado' : "El tiempo seleccionado es ".concat(adapter.format(time, 'fullTime')));
29
+ },
30
+ hoursClockNumberText: function hoursClockNumberText(hours) {
31
+ return "".concat(hours, " horas");
32
+ },
33
+ minutesClockNumberText: function minutesClockNumberText(minutes) {
34
+ return "".concat(minutes, " minutos");
35
+ },
36
+ secondsClockNumberText: function secondsClockNumberText(seconds) {
37
+ return "".concat(seconds, " segundos");
38
+ },
39
+ // Open picker labels
40
+ openDatePickerDialogue: function openDatePickerDialogue(rawValue, utils) {
41
+ return rawValue && utils.isValid(utils.date(rawValue)) ? "Elige la fecha, la fecha elegida es ".concat(utils.format(utils.date(rawValue), 'fullDate')) : 'Elige la fecha';
42
+ },
43
+ openTimePickerDialogue: function openTimePickerDialogue(rawValue, utils) {
44
+ return rawValue && utils.isValid(utils.date(rawValue)) ? "Elige la hora, la hora elegido es ".concat(utils.format(utils.date(rawValue), 'fullTime')) : 'Elige la hora';
45
+ },
46
+ // Table labels
47
+ timeTableLabel: 'elige la fecha',
48
+ dateTableLabel: 'elige la hora'
49
+ };
50
+ export var esES = getPickersLocalization(esESPickers);
@@ -1,5 +1,9 @@
1
- import { getPickersLocalization } from './utils/getPickersLocalization'; // import { CalendarPickerView } from '../internals/models';
2
-
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ var views = {
3
+ hours: 'heures',
4
+ minutes: 'minutes',
5
+ seconds: 'secondes'
6
+ };
3
7
  var frFRPickers = {
4
8
  // Calendar navigation
5
9
  previousMonth: 'Mois précédent',
@@ -7,7 +11,9 @@ var frFRPickers = {
7
11
  // View navigation
8
12
  openPreviousView: 'Ouvrir la vue précédente',
9
13
  openNextView: 'Ouvrir la vue suivante',
10
- // calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',
14
+ calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
15
+ return view === 'year' ? 'La vue année est ouverte, ouvrir la vue calendrier' : 'La vue calendrier est ouverte, ouvrir la vue année';
16
+ },
11
17
  // DateRange placeholders
12
18
  start: 'Début',
13
19
  end: 'Fin',
@@ -15,17 +21,29 @@ var frFRPickers = {
15
21
  cancelButtonLabel: 'Annuler',
16
22
  clearButtonLabel: 'Vider',
17
23
  okButtonLabel: 'OK',
18
- todayButtonLabel: "Aujourd'hui" // Clock labels
19
- // clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,
20
- // hoursClockNumberText: hours => `${hours} hours`,
21
- // minutesClockNumberText: minutes => `${minutes} minutes`,
22
- // secondsClockNumberText: seconds => `${seconds} seconds`,
24
+ todayButtonLabel: "Aujourd'hui",
25
+ // Clock labels
26
+ clockLabelText: function clockLabelText(view, time, adapter) {
27
+ return "Choix des ".concat(views[view], ". ").concat(time === null ? 'Aucune heure choisie' : "L'heure choisie est ".concat(adapter.format(time, 'fullTime')));
28
+ },
29
+ hoursClockNumberText: function hoursClockNumberText(hours) {
30
+ return "".concat(hours, " heures");
31
+ },
32
+ minutesClockNumberText: function minutesClockNumberText(minutes) {
33
+ return "".concat(minutes, " minutes");
34
+ },
35
+ secondsClockNumberText: function secondsClockNumberText(seconds) {
36
+ return "".concat(seconds, " secondes");
37
+ },
23
38
  // Open picker labels
24
- // openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date',
25
- // openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time',
39
+ openDatePickerDialogue: function openDatePickerDialogue(rawValue, utils) {
40
+ return rawValue && utils.isValid(utils.date(rawValue)) ? "Choisir la date, la date s\xE9lectionn\xE9e est ".concat(utils.format(utils.date(rawValue), 'fullDate')) : 'Choisir la date';
41
+ },
42
+ openTimePickerDialogue: function openTimePickerDialogue(rawValue, utils) {
43
+ return rawValue && utils.isValid(utils.date(rawValue)) ? "Choisir l'heure, l'heure s\xE9lectionn\xE9e est ".concat(utils.format(utils.date(rawValue), 'fullTime')) : "Choisir l'heure";
44
+ },
26
45
  // Table labels
27
- // timeTableLabel: 'pick time',
28
- // dateTableLabel: 'pick date',
29
-
46
+ timeTableLabel: "choix de l'heure",
47
+ dateTableLabel: 'choix de la date'
30
48
  };
31
49
  export var frFR = getPickersLocalization(frFRPickers);
@@ -2,7 +2,9 @@ export * from './nlNL';
2
2
  export * from './ptBR';
3
3
  export * from './trTR';
4
4
  export * from './deDE';
5
+ export * from './esES';
5
6
  export * from './frFR';
6
7
  export * from './enUS';
7
8
  export * from './svSE';
9
+ export * from './itIT';
8
10
  export * from './utils/pickersLocaleTextApi';
@@ -0,0 +1,50 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ var views = {
3
+ hours: 'le ore',
4
+ minutes: 'i minuti',
5
+ seconds: 'i secondi'
6
+ }; // This object is not Partial<PickersLocaleText> because it is the default values
7
+
8
+ var itITPickers = {
9
+ // Calendar navigation
10
+ previousMonth: 'Mese precedente',
11
+ nextMonth: 'Mese successivo',
12
+ // View navigation
13
+ openPreviousView: 'apri la vista precedente',
14
+ openNextView: 'apri la vista successiva',
15
+ calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
16
+ return view === 'year' ? "la vista dell'anno è aperta, passare alla vista del calendario" : "la vista dell'calendario è aperta, passare alla vista dell'anno";
17
+ },
18
+ // DateRange placeholders
19
+ start: 'Inizio',
20
+ end: 'Fine',
21
+ // Action bar
22
+ cancelButtonLabel: 'Cancellare',
23
+ clearButtonLabel: 'Sgomberare',
24
+ okButtonLabel: 'OK',
25
+ todayButtonLabel: 'Oggi',
26
+ // Clock labels
27
+ clockLabelText: function clockLabelText(view, time, adapter) {
28
+ return "Seleziona ".concat(views[view], ". ").concat(time === null ? 'Nessun orario selezionato' : "L'ora selezionata \xE8 ".concat(adapter.format(time, 'fullTime')));
29
+ },
30
+ hoursClockNumberText: function hoursClockNumberText(hours) {
31
+ return "".concat(hours, " ore");
32
+ },
33
+ minutesClockNumberText: function minutesClockNumberText(minutes) {
34
+ return "".concat(minutes, " minuti");
35
+ },
36
+ secondsClockNumberText: function secondsClockNumberText(seconds) {
37
+ return "".concat(seconds, " secondi");
38
+ },
39
+ // Open picker labels
40
+ openDatePickerDialogue: function openDatePickerDialogue(rawValue, utils) {
41
+ return rawValue && utils.isValid(utils.date(rawValue)) ? "Scegli la data, la data selezionata \xE8 ".concat(utils.format(utils.date(rawValue), 'fullDate')) : 'Scegli la data';
42
+ },
43
+ openTimePickerDialogue: function openTimePickerDialogue(rawValue, utils) {
44
+ return rawValue && utils.isValid(utils.date(rawValue)) ? "Scegli l'ora, l'ora selezionata \xE8 ".concat(utils.format(utils.date(rawValue), 'fullTime')) : "Scegli l'ora";
45
+ },
46
+ // Table labels
47
+ timeTableLabel: 'scegli un ora',
48
+ dateTableLabel: 'scegli una data'
49
+ };
50
+ export var itIT = getPickersLocalization(itITPickers);
package/locales/deDE.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { CalendarPickerView } from '../internals/models';
1
2
  export declare const deDE: {
2
3
  components: {
3
4
  MuiLocalizationProvider: {
@@ -13,13 +14,13 @@ export declare const deDE: {
13
14
  todayButtonLabel?: string | undefined;
14
15
  start?: string | undefined;
15
16
  end?: string | undefined;
16
- calendarViewSwitchingButtonAriaLabel?: ((currentView: import("..").CalendarPickerView) => string) | undefined;
17
- clockLabelText?: ((view: import("..").ClockPickerView, time: any, adapter: import("../internals").MuiPickersAdapter<any>) => string) | undefined;
17
+ calendarViewSwitchingButtonAriaLabel?: ((currentView: CalendarPickerView) => string) | undefined;
18
+ clockLabelText?: ((view: import("../internals/models").ClockPickerView, time: any, adapter: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
18
19
  hoursClockNumberText?: ((hours: string) => string) | undefined;
19
20
  minutesClockNumberText?: ((minutes: string) => string) | undefined;
20
21
  secondsClockNumberText?: ((seconds: string) => string) | undefined;
21
- openDatePickerDialogue?: ((date: any, utils: import("../internals").MuiPickersAdapter<any>) => string) | undefined;
22
- openTimePickerDialogue?: ((date: any, utils: import("../internals").MuiPickersAdapter<any>) => string) | undefined;
22
+ openDatePickerDialogue?: ((date: any, utils: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
23
+ openTimePickerDialogue?: ((date: any, utils: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
23
24
  timeTableLabel?: string | undefined;
24
25
  dateTableLabel?: string | undefined;
25
26
  };
package/locales/deDE.js CHANGED
@@ -1,5 +1,10 @@
1
- import { getPickersLocalization } from './utils/getPickersLocalization'; // import { CalendarPickerView } from '../internals/models';
2
-
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ // maps ClockPickerView to its translation
3
+ const views = {
4
+ hours: 'Stunden',
5
+ minutes: 'Minuten',
6
+ seconds: 'Sekunden'
7
+ };
3
8
  const deDEPickers = {
4
9
  // Calendar navigation
5
10
  previousMonth: 'Letzter Monat',
@@ -7,7 +12,7 @@ const deDEPickers = {
7
12
  // View navigation
8
13
  openPreviousView: 'Letzte Ansicht öffnen',
9
14
  openNextView: 'Nächste Ansicht öffnen',
10
- // calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',
15
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'Jahresansicht ist geöffnet, zur Kalenderansicht wechseln' : 'Kalenderansicht ist geöffnet, zur Jahresansicht wechseln',
11
16
  // DateRange placeholders
12
17
  start: 'Beginn',
13
18
  end: 'Ende',
@@ -15,17 +20,21 @@ const deDEPickers = {
15
20
  cancelButtonLabel: 'Abbrechen',
16
21
  clearButtonLabel: 'Löschen',
17
22
  okButtonLabel: 'OK',
18
- todayButtonLabel: 'Heute' // Clock labels
19
- // clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,
20
- // hoursClockNumberText: hours => `${hours} hours`,
21
- // minutesClockNumberText: minutes => `${minutes} minutes`,
22
- // secondsClockNumberText: seconds => `${seconds} seconds`,
23
+ todayButtonLabel: 'Heute',
24
+ // Clock labels
25
+ clockLabelText: (view, time, adapter) => {
26
+ var _views$view;
27
+
28
+ return `${(_views$view = views[view]) != null ? _views$view : view} auswählen. ${time === null ? 'Keine Uhrzeit ausgewählt' : `Gewählte Uhrzeit ist ${adapter.format(time, 'fullTime')}`}`;
29
+ },
30
+ hoursClockNumberText: hours => `${hours} ${views.hours}`,
31
+ minutesClockNumberText: minutes => `${minutes} ${views.minutes}`,
32
+ secondsClockNumberText: seconds => `${seconds} ${views.seconds}`,
23
33
  // Open picker labels
24
- // openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date',
25
- // openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time',
34
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Datum auswählen, gewähltes Datum ist ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Datum auswählen',
35
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Uhrzeit auswählen, gewählte Uhrzeit ist ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Uhrzeit auswählen',
26
36
  // Table labels
27
- // timeTableLabel: 'pick time',
28
- // dateTableLabel: 'pick date',
29
-
37
+ timeTableLabel: 'Uhrzeit auswählen',
38
+ dateTableLabel: 'Datum auswählen'
30
39
  };
31
40
  export const deDE = getPickersLocalization(deDEPickers);
@@ -0,0 +1,30 @@
1
+ import { CalendarPickerView } from '../internals/models';
2
+ export declare const esES: {
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
+ clockLabelText?: ((view: import("../internals/models").ClockPickerView, time: any, adapter: import("../internals/models").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/models").MuiPickersAdapter<any>) => string) | undefined;
23
+ openTimePickerDialogue?: ((date: any, utils: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
24
+ timeTableLabel?: string | undefined;
25
+ dateTableLabel?: string | undefined;
26
+ };
27
+ };
28
+ };
29
+ };
30
+ };
@@ -0,0 +1,36 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ const views = {
3
+ hours: 'las horas',
4
+ minutes: 'los minutos',
5
+ seconds: 'los segundos'
6
+ }; // This object is not Partial<PickersLocaleText> because it is the default values
7
+
8
+ const esESPickers = {
9
+ // Calendar navigation
10
+ previousMonth: 'Último mes',
11
+ nextMonth: 'Próximo mes',
12
+ // View navigation
13
+ openPreviousView: 'abrir la última vista',
14
+ openNextView: 'abrir la siguiente vista',
15
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'la vista del año está abierta, cambie a la vista de calendario' : 'la vista de calendario está abierta, cambie a la vista del año',
16
+ // DateRange placeholders
17
+ start: 'Empezar',
18
+ end: 'Terminar',
19
+ // Action bar
20
+ cancelButtonLabel: 'Cancelar',
21
+ clearButtonLabel: 'Limpia',
22
+ okButtonLabel: 'OK',
23
+ todayButtonLabel: 'Hoy',
24
+ // Clock labels
25
+ clockLabelText: (view, time, adapter) => `Seleccione ${views[view]}. ${time === null ? 'Sin tiempo seleccionado' : `El tiempo seleccionado es ${adapter.format(time, 'fullTime')}`}`,
26
+ hoursClockNumberText: hours => `${hours} horas`,
27
+ minutesClockNumberText: minutes => `${minutes} minutos`,
28
+ secondsClockNumberText: seconds => `${seconds} segundos`,
29
+ // Open picker labels
30
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Elige la fecha, la fecha elegida es ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Elige la fecha',
31
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Elige la hora, la hora elegido es ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Elige la hora',
32
+ // Table labels
33
+ timeTableLabel: 'elige la fecha',
34
+ dateTableLabel: 'elige la hora'
35
+ };
36
+ export const esES = getPickersLocalization(esESPickers);
package/locales/frFR.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { CalendarPickerView } from '../internals/models';
1
2
  export declare const frFR: {
2
3
  components: {
3
4
  MuiLocalizationProvider: {
@@ -13,13 +14,13 @@ export declare const frFR: {
13
14
  todayButtonLabel?: string | undefined;
14
15
  start?: string | undefined;
15
16
  end?: string | undefined;
16
- calendarViewSwitchingButtonAriaLabel?: ((currentView: import("..").CalendarPickerView) => string) | undefined;
17
- clockLabelText?: ((view: import("..").ClockPickerView, time: any, adapter: import("../internals").MuiPickersAdapter<any>) => string) | undefined;
17
+ calendarViewSwitchingButtonAriaLabel?: ((currentView: CalendarPickerView) => string) | undefined;
18
+ clockLabelText?: ((view: import("../internals/models").ClockPickerView, time: any, adapter: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
18
19
  hoursClockNumberText?: ((hours: string) => string) | undefined;
19
20
  minutesClockNumberText?: ((minutes: string) => string) | undefined;
20
21
  secondsClockNumberText?: ((seconds: string) => string) | undefined;
21
- openDatePickerDialogue?: ((date: any, utils: import("../internals").MuiPickersAdapter<any>) => string) | undefined;
22
- openTimePickerDialogue?: ((date: any, utils: import("../internals").MuiPickersAdapter<any>) => string) | undefined;
22
+ openDatePickerDialogue?: ((date: any, utils: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
23
+ openTimePickerDialogue?: ((date: any, utils: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
23
24
  timeTableLabel?: string | undefined;
24
25
  dateTableLabel?: string | undefined;
25
26
  };
package/locales/frFR.js CHANGED
@@ -1,5 +1,9 @@
1
- import { getPickersLocalization } from './utils/getPickersLocalization'; // import { CalendarPickerView } from '../internals/models';
2
-
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ const views = {
3
+ hours: 'heures',
4
+ minutes: 'minutes',
5
+ seconds: 'secondes'
6
+ };
3
7
  const frFRPickers = {
4
8
  // Calendar navigation
5
9
  previousMonth: 'Mois précédent',
@@ -7,7 +11,7 @@ const frFRPickers = {
7
11
  // View navigation
8
12
  openPreviousView: 'Ouvrir la vue précédente',
9
13
  openNextView: 'Ouvrir la vue suivante',
10
- // calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',
14
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'La vue année est ouverte, ouvrir la vue calendrier' : 'La vue calendrier est ouverte, ouvrir la vue année',
11
15
  // DateRange placeholders
12
16
  start: 'Début',
13
17
  end: 'Fin',
@@ -15,17 +19,17 @@ const frFRPickers = {
15
19
  cancelButtonLabel: 'Annuler',
16
20
  clearButtonLabel: 'Vider',
17
21
  okButtonLabel: 'OK',
18
- todayButtonLabel: "Aujourd'hui" // Clock labels
19
- // clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,
20
- // hoursClockNumberText: hours => `${hours} hours`,
21
- // minutesClockNumberText: minutes => `${minutes} minutes`,
22
- // secondsClockNumberText: seconds => `${seconds} seconds`,
22
+ todayButtonLabel: "Aujourd'hui",
23
+ // Clock labels
24
+ clockLabelText: (view, time, adapter) => `Choix des ${views[view]}. ${time === null ? 'Aucune heure choisie' : `L'heure choisie est ${adapter.format(time, 'fullTime')}`}`,
25
+ hoursClockNumberText: hours => `${hours} heures`,
26
+ minutesClockNumberText: minutes => `${minutes} minutes`,
27
+ secondsClockNumberText: seconds => `${seconds} secondes`,
23
28
  // Open picker labels
24
- // openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date',
25
- // openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time',
29
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choisir la date, la date sélectionnée est ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Choisir la date',
30
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choisir l'heure, l'heure sélectionnée est ${utils.format(utils.date(rawValue), 'fullTime')}` : "Choisir l'heure",
26
31
  // Table labels
27
- // timeTableLabel: 'pick time',
28
- // dateTableLabel: 'pick date',
29
-
32
+ timeTableLabel: "choix de l'heure",
33
+ dateTableLabel: 'choix de la date'
30
34
  };
31
35
  export const frFR = getPickersLocalization(frFRPickers);
@@ -2,7 +2,9 @@ export * from './nlNL';
2
2
  export * from './ptBR';
3
3
  export * from './trTR';
4
4
  export * from './deDE';
5
+ export * from './esES';
5
6
  export * from './frFR';
6
7
  export * from './enUS';
7
8
  export * from './svSE';
9
+ export * from './itIT';
8
10
  export * from './utils/pickersLocaleTextApi';
package/locales/index.js CHANGED
@@ -2,7 +2,9 @@ export * from './nlNL';
2
2
  export * from './ptBR';
3
3
  export * from './trTR';
4
4
  export * from './deDE';
5
+ export * from './esES';
5
6
  export * from './frFR';
6
7
  export * from './enUS';
7
8
  export * from './svSE';
9
+ export * from './itIT';
8
10
  export * from './utils/pickersLocaleTextApi';
@@ -0,0 +1,30 @@
1
+ import { CalendarPickerView } from '../internals/models';
2
+ export declare const itIT: {
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
+ clockLabelText?: ((view: import("../internals/models").ClockPickerView, time: any, adapter: import("../internals/models").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/models").MuiPickersAdapter<any>) => string) | undefined;
23
+ openTimePickerDialogue?: ((date: any, utils: import("../internals/models").MuiPickersAdapter<any>) => string) | undefined;
24
+ timeTableLabel?: string | undefined;
25
+ dateTableLabel?: string | undefined;
26
+ };
27
+ };
28
+ };
29
+ };
30
+ };
@@ -0,0 +1,36 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ const views = {
3
+ hours: 'le ore',
4
+ minutes: 'i minuti',
5
+ seconds: 'i secondi'
6
+ }; // This object is not Partial<PickersLocaleText> because it is the default values
7
+
8
+ const itITPickers = {
9
+ // Calendar navigation
10
+ previousMonth: 'Mese precedente',
11
+ nextMonth: 'Mese successivo',
12
+ // View navigation
13
+ openPreviousView: 'apri la vista precedente',
14
+ openNextView: 'apri la vista successiva',
15
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? "la vista dell'anno è aperta, passare alla vista del calendario" : "la vista dell'calendario è aperta, passare alla vista dell'anno",
16
+ // DateRange placeholders
17
+ start: 'Inizio',
18
+ end: 'Fine',
19
+ // Action bar
20
+ cancelButtonLabel: 'Cancellare',
21
+ clearButtonLabel: 'Sgomberare',
22
+ okButtonLabel: 'OK',
23
+ todayButtonLabel: 'Oggi',
24
+ // Clock labels
25
+ clockLabelText: (view, time, adapter) => `Seleziona ${views[view]}. ${time === null ? 'Nessun orario selezionato' : `L'ora selezionata è ${adapter.format(time, 'fullTime')}`}`,
26
+ hoursClockNumberText: hours => `${hours} ore`,
27
+ minutesClockNumberText: minutes => `${minutes} minuti`,
28
+ secondsClockNumberText: seconds => `${seconds} secondi`,
29
+ // Open picker labels
30
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli la data, la data selezionata è ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Scegli la data',
31
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli l'ora, l'ora selezionata è ${utils.format(utils.date(rawValue), 'fullTime')}` : "Scegli l'ora",
32
+ // Table labels
33
+ timeTableLabel: 'scegli un ora',
34
+ dateTableLabel: 'scegli una data'
35
+ };
36
+ export const itIT = getPickersLocalization(itITPickers);
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.0-beta.0
1
+ /** @license MUI v5.0.0-beta.1
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.
@@ -1,5 +1,10 @@
1
- import { getPickersLocalization } from './utils/getPickersLocalization'; // import { CalendarPickerView } from '../internals/models';
2
-
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ // maps ClockPickerView to its translation
3
+ const views = {
4
+ hours: 'Stunden',
5
+ minutes: 'Minuten',
6
+ seconds: 'Sekunden'
7
+ };
3
8
  const deDEPickers = {
4
9
  // Calendar navigation
5
10
  previousMonth: 'Letzter Monat',
@@ -7,7 +12,7 @@ const deDEPickers = {
7
12
  // View navigation
8
13
  openPreviousView: 'Letzte Ansicht öffnen',
9
14
  openNextView: 'Nächste Ansicht öffnen',
10
- // calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',
15
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'Jahresansicht ist geöffnet, zur Kalenderansicht wechseln' : 'Kalenderansicht ist geöffnet, zur Jahresansicht wechseln',
11
16
  // DateRange placeholders
12
17
  start: 'Beginn',
13
18
  end: 'Ende',
@@ -15,17 +20,17 @@ const deDEPickers = {
15
20
  cancelButtonLabel: 'Abbrechen',
16
21
  clearButtonLabel: 'Löschen',
17
22
  okButtonLabel: 'OK',
18
- todayButtonLabel: 'Heute' // Clock labels
19
- // clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,
20
- // hoursClockNumberText: hours => `${hours} hours`,
21
- // minutesClockNumberText: minutes => `${minutes} minutes`,
22
- // secondsClockNumberText: seconds => `${seconds} seconds`,
23
+ todayButtonLabel: 'Heute',
24
+ // Clock labels
25
+ clockLabelText: (view, time, adapter) => `${views[view] ?? view} auswählen. ${time === null ? 'Keine Uhrzeit ausgewählt' : `Gewählte Uhrzeit ist ${adapter.format(time, 'fullTime')}`}`,
26
+ hoursClockNumberText: hours => `${hours} ${views.hours}`,
27
+ minutesClockNumberText: minutes => `${minutes} ${views.minutes}`,
28
+ secondsClockNumberText: seconds => `${seconds} ${views.seconds}`,
23
29
  // Open picker labels
24
- // openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date',
25
- // openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time',
30
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Datum auswählen, gewähltes Datum ist ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Datum auswählen',
31
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Uhrzeit auswählen, gewählte Uhrzeit ist ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Uhrzeit auswählen',
26
32
  // Table labels
27
- // timeTableLabel: 'pick time',
28
- // dateTableLabel: 'pick date',
29
-
33
+ timeTableLabel: 'Uhrzeit auswählen',
34
+ dateTableLabel: 'Datum auswählen'
30
35
  };
31
36
  export const deDE = getPickersLocalization(deDEPickers);
@@ -0,0 +1,36 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ const views = {
3
+ hours: 'las horas',
4
+ minutes: 'los minutos',
5
+ seconds: 'los segundos'
6
+ }; // This object is not Partial<PickersLocaleText> because it is the default values
7
+
8
+ const esESPickers = {
9
+ // Calendar navigation
10
+ previousMonth: 'Último mes',
11
+ nextMonth: 'Próximo mes',
12
+ // View navigation
13
+ openPreviousView: 'abrir la última vista',
14
+ openNextView: 'abrir la siguiente vista',
15
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'la vista del año está abierta, cambie a la vista de calendario' : 'la vista de calendario está abierta, cambie a la vista del año',
16
+ // DateRange placeholders
17
+ start: 'Empezar',
18
+ end: 'Terminar',
19
+ // Action bar
20
+ cancelButtonLabel: 'Cancelar',
21
+ clearButtonLabel: 'Limpia',
22
+ okButtonLabel: 'OK',
23
+ todayButtonLabel: 'Hoy',
24
+ // Clock labels
25
+ clockLabelText: (view, time, adapter) => `Seleccione ${views[view]}. ${time === null ? 'Sin tiempo seleccionado' : `El tiempo seleccionado es ${adapter.format(time, 'fullTime')}`}`,
26
+ hoursClockNumberText: hours => `${hours} horas`,
27
+ minutesClockNumberText: minutes => `${minutes} minutos`,
28
+ secondsClockNumberText: seconds => `${seconds} segundos`,
29
+ // Open picker labels
30
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Elige la fecha, la fecha elegida es ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Elige la fecha',
31
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Elige la hora, la hora elegido es ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Elige la hora',
32
+ // Table labels
33
+ timeTableLabel: 'elige la fecha',
34
+ dateTableLabel: 'elige la hora'
35
+ };
36
+ export const esES = getPickersLocalization(esESPickers);
@@ -1,5 +1,9 @@
1
- import { getPickersLocalization } from './utils/getPickersLocalization'; // import { CalendarPickerView } from '../internals/models';
2
-
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ const views = {
3
+ hours: 'heures',
4
+ minutes: 'minutes',
5
+ seconds: 'secondes'
6
+ };
3
7
  const frFRPickers = {
4
8
  // Calendar navigation
5
9
  previousMonth: 'Mois précédent',
@@ -7,7 +11,7 @@ const frFRPickers = {
7
11
  // View navigation
8
12
  openPreviousView: 'Ouvrir la vue précédente',
9
13
  openNextView: 'Ouvrir la vue suivante',
10
- // calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',
14
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'La vue année est ouverte, ouvrir la vue calendrier' : 'La vue calendrier est ouverte, ouvrir la vue année',
11
15
  // DateRange placeholders
12
16
  start: 'Début',
13
17
  end: 'Fin',
@@ -15,17 +19,17 @@ const frFRPickers = {
15
19
  cancelButtonLabel: 'Annuler',
16
20
  clearButtonLabel: 'Vider',
17
21
  okButtonLabel: 'OK',
18
- todayButtonLabel: "Aujourd'hui" // Clock labels
19
- // clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,
20
- // hoursClockNumberText: hours => `${hours} hours`,
21
- // minutesClockNumberText: minutes => `${minutes} minutes`,
22
- // secondsClockNumberText: seconds => `${seconds} seconds`,
22
+ todayButtonLabel: "Aujourd'hui",
23
+ // Clock labels
24
+ clockLabelText: (view, time, adapter) => `Choix des ${views[view]}. ${time === null ? 'Aucune heure choisie' : `L'heure choisie est ${adapter.format(time, 'fullTime')}`}`,
25
+ hoursClockNumberText: hours => `${hours} heures`,
26
+ minutesClockNumberText: minutes => `${minutes} minutes`,
27
+ secondsClockNumberText: seconds => `${seconds} secondes`,
23
28
  // Open picker labels
24
- // openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date',
25
- // openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time',
29
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choisir la date, la date sélectionnée est ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Choisir la date',
30
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choisir l'heure, l'heure sélectionnée est ${utils.format(utils.date(rawValue), 'fullTime')}` : "Choisir l'heure",
26
31
  // Table labels
27
- // timeTableLabel: 'pick time',
28
- // dateTableLabel: 'pick date',
29
-
32
+ timeTableLabel: "choix de l'heure",
33
+ dateTableLabel: 'choix de la date'
30
34
  };
31
35
  export const frFR = getPickersLocalization(frFRPickers);
@@ -2,7 +2,9 @@ export * from './nlNL';
2
2
  export * from './ptBR';
3
3
  export * from './trTR';
4
4
  export * from './deDE';
5
+ export * from './esES';
5
6
  export * from './frFR';
6
7
  export * from './enUS';
7
8
  export * from './svSE';
9
+ export * from './itIT';
8
10
  export * from './utils/pickersLocaleTextApi';
@@ -0,0 +1,36 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ const views = {
3
+ hours: 'le ore',
4
+ minutes: 'i minuti',
5
+ seconds: 'i secondi'
6
+ }; // This object is not Partial<PickersLocaleText> because it is the default values
7
+
8
+ const itITPickers = {
9
+ // Calendar navigation
10
+ previousMonth: 'Mese precedente',
11
+ nextMonth: 'Mese successivo',
12
+ // View navigation
13
+ openPreviousView: 'apri la vista precedente',
14
+ openNextView: 'apri la vista successiva',
15
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? "la vista dell'anno è aperta, passare alla vista del calendario" : "la vista dell'calendario è aperta, passare alla vista dell'anno",
16
+ // DateRange placeholders
17
+ start: 'Inizio',
18
+ end: 'Fine',
19
+ // Action bar
20
+ cancelButtonLabel: 'Cancellare',
21
+ clearButtonLabel: 'Sgomberare',
22
+ okButtonLabel: 'OK',
23
+ todayButtonLabel: 'Oggi',
24
+ // Clock labels
25
+ clockLabelText: (view, time, adapter) => `Seleziona ${views[view]}. ${time === null ? 'Nessun orario selezionato' : `L'ora selezionata è ${adapter.format(time, 'fullTime')}`}`,
26
+ hoursClockNumberText: hours => `${hours} ore`,
27
+ minutesClockNumberText: minutes => `${minutes} minuti`,
28
+ secondsClockNumberText: seconds => `${seconds} secondi`,
29
+ // Open picker labels
30
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli la data, la data selezionata è ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Scegli la data',
31
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli l'ora, l'ora selezionata è ${utils.format(utils.date(rawValue), 'fullTime')}` : "Scegli l'ora",
32
+ // Table labels
33
+ timeTableLabel: 'scegli un ora',
34
+ dateTableLabel: 'scegli una data'
35
+ };
36
+ export const itIT = getPickersLocalization(itITPickers);
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.0.0-beta.0
1
+ /** @license MUI v5.0.0-beta.1
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.
@@ -7,7 +7,12 @@ exports.deDE = void 0;
7
7
 
8
8
  var _getPickersLocalization = require("./utils/getPickersLocalization");
9
9
 
10
- // import { CalendarPickerView } from '../internals/models';
10
+ // maps ClockPickerView to its translation
11
+ const views = {
12
+ hours: 'Stunden',
13
+ minutes: 'Minuten',
14
+ seconds: 'Sekunden'
15
+ };
11
16
  const deDEPickers = {
12
17
  // Calendar navigation
13
18
  previousMonth: 'Letzter Monat',
@@ -15,7 +20,7 @@ const deDEPickers = {
15
20
  // View navigation
16
21
  openPreviousView: 'Letzte Ansicht öffnen',
17
22
  openNextView: 'Nächste Ansicht öffnen',
18
- // calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',
23
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'Jahresansicht ist geöffnet, zur Kalenderansicht wechseln' : 'Kalenderansicht ist geöffnet, zur Jahresansicht wechseln',
19
24
  // DateRange placeholders
20
25
  start: 'Beginn',
21
26
  end: 'Ende',
@@ -23,18 +28,22 @@ const deDEPickers = {
23
28
  cancelButtonLabel: 'Abbrechen',
24
29
  clearButtonLabel: 'Löschen',
25
30
  okButtonLabel: 'OK',
26
- todayButtonLabel: 'Heute' // Clock labels
27
- // clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,
28
- // hoursClockNumberText: hours => `${hours} hours`,
29
- // minutesClockNumberText: minutes => `${minutes} minutes`,
30
- // secondsClockNumberText: seconds => `${seconds} seconds`,
31
+ todayButtonLabel: 'Heute',
32
+ // Clock labels
33
+ clockLabelText: (view, time, adapter) => {
34
+ var _views$view;
35
+
36
+ return `${(_views$view = views[view]) != null ? _views$view : view} auswählen. ${time === null ? 'Keine Uhrzeit ausgewählt' : `Gewählte Uhrzeit ist ${adapter.format(time, 'fullTime')}`}`;
37
+ },
38
+ hoursClockNumberText: hours => `${hours} ${views.hours}`,
39
+ minutesClockNumberText: minutes => `${minutes} ${views.minutes}`,
40
+ secondsClockNumberText: seconds => `${seconds} ${views.seconds}`,
31
41
  // Open picker labels
32
- // openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date',
33
- // openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time',
42
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Datum auswählen, gewähltes Datum ist ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Datum auswählen',
43
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Uhrzeit auswählen, gewählte Uhrzeit ist ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Uhrzeit auswählen',
34
44
  // Table labels
35
- // timeTableLabel: 'pick time',
36
- // dateTableLabel: 'pick date',
37
-
45
+ timeTableLabel: 'Uhrzeit auswählen',
46
+ dateTableLabel: 'Datum auswählen'
38
47
  };
39
48
  const deDE = (0, _getPickersLocalization.getPickersLocalization)(deDEPickers);
40
49
  exports.deDE = deDE;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.esES = void 0;
7
+
8
+ var _getPickersLocalization = require("./utils/getPickersLocalization");
9
+
10
+ const views = {
11
+ hours: 'las horas',
12
+ minutes: 'los minutos',
13
+ seconds: 'los segundos'
14
+ }; // This object is not Partial<PickersLocaleText> because it is the default values
15
+
16
+ const esESPickers = {
17
+ // Calendar navigation
18
+ previousMonth: 'Último mes',
19
+ nextMonth: 'Próximo mes',
20
+ // View navigation
21
+ openPreviousView: 'abrir la última vista',
22
+ openNextView: 'abrir la siguiente vista',
23
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'la vista del año está abierta, cambie a la vista de calendario' : 'la vista de calendario está abierta, cambie a la vista del año',
24
+ // DateRange placeholders
25
+ start: 'Empezar',
26
+ end: 'Terminar',
27
+ // Action bar
28
+ cancelButtonLabel: 'Cancelar',
29
+ clearButtonLabel: 'Limpia',
30
+ okButtonLabel: 'OK',
31
+ todayButtonLabel: 'Hoy',
32
+ // Clock labels
33
+ clockLabelText: (view, time, adapter) => `Seleccione ${views[view]}. ${time === null ? 'Sin tiempo seleccionado' : `El tiempo seleccionado es ${adapter.format(time, 'fullTime')}`}`,
34
+ hoursClockNumberText: hours => `${hours} horas`,
35
+ minutesClockNumberText: minutes => `${minutes} minutos`,
36
+ secondsClockNumberText: seconds => `${seconds} segundos`,
37
+ // Open picker labels
38
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Elige la fecha, la fecha elegida es ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Elige la fecha',
39
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Elige la hora, la hora elegido es ${utils.format(utils.date(rawValue), 'fullTime')}` : 'Elige la hora',
40
+ // Table labels
41
+ timeTableLabel: 'elige la fecha',
42
+ dateTableLabel: 'elige la hora'
43
+ };
44
+ const esES = (0, _getPickersLocalization.getPickersLocalization)(esESPickers);
45
+ exports.esES = esES;
@@ -7,7 +7,11 @@ exports.frFR = void 0;
7
7
 
8
8
  var _getPickersLocalization = require("./utils/getPickersLocalization");
9
9
 
10
- // import { CalendarPickerView } from '../internals/models';
10
+ const views = {
11
+ hours: 'heures',
12
+ minutes: 'minutes',
13
+ seconds: 'secondes'
14
+ };
11
15
  const frFRPickers = {
12
16
  // Calendar navigation
13
17
  previousMonth: 'Mois précédent',
@@ -15,7 +19,7 @@ const frFRPickers = {
15
19
  // View navigation
16
20
  openPreviousView: 'Ouvrir la vue précédente',
17
21
  openNextView: 'Ouvrir la vue suivante',
18
- // calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',
22
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'La vue année est ouverte, ouvrir la vue calendrier' : 'La vue calendrier est ouverte, ouvrir la vue année',
19
23
  // DateRange placeholders
20
24
  start: 'Début',
21
25
  end: 'Fin',
@@ -23,18 +27,18 @@ const frFRPickers = {
23
27
  cancelButtonLabel: 'Annuler',
24
28
  clearButtonLabel: 'Vider',
25
29
  okButtonLabel: 'OK',
26
- todayButtonLabel: "Aujourd'hui" // Clock labels
27
- // clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,
28
- // hoursClockNumberText: hours => `${hours} hours`,
29
- // minutesClockNumberText: minutes => `${minutes} minutes`,
30
- // secondsClockNumberText: seconds => `${seconds} seconds`,
30
+ todayButtonLabel: "Aujourd'hui",
31
+ // Clock labels
32
+ clockLabelText: (view, time, adapter) => `Choix des ${views[view]}. ${time === null ? 'Aucune heure choisie' : `L'heure choisie est ${adapter.format(time, 'fullTime')}`}`,
33
+ hoursClockNumberText: hours => `${hours} heures`,
34
+ minutesClockNumberText: minutes => `${minutes} minutes`,
35
+ secondsClockNumberText: seconds => `${seconds} secondes`,
31
36
  // Open picker labels
32
- // openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date',
33
- // openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time',
37
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choisir la date, la date sélectionnée est ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Choisir la date',
38
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choisir l'heure, l'heure sélectionnée est ${utils.format(utils.date(rawValue), 'fullTime')}` : "Choisir l'heure",
34
39
  // Table labels
35
- // timeTableLabel: 'pick time',
36
- // dateTableLabel: 'pick date',
37
-
40
+ timeTableLabel: "choix de l'heure",
41
+ dateTableLabel: 'choix de la date'
38
42
  };
39
43
  const frFR = (0, _getPickersLocalization.getPickersLocalization)(frFRPickers);
40
44
  exports.frFR = frFR;
@@ -56,6 +56,19 @@ Object.keys(_deDE).forEach(function (key) {
56
56
  });
57
57
  });
58
58
 
59
+ var _esES = require("./esES");
60
+
61
+ Object.keys(_esES).forEach(function (key) {
62
+ if (key === "default" || key === "__esModule") return;
63
+ if (key in exports && exports[key] === _esES[key]) return;
64
+ Object.defineProperty(exports, key, {
65
+ enumerable: true,
66
+ get: function () {
67
+ return _esES[key];
68
+ }
69
+ });
70
+ });
71
+
59
72
  var _frFR = require("./frFR");
60
73
 
61
74
  Object.keys(_frFR).forEach(function (key) {
@@ -95,6 +108,19 @@ Object.keys(_svSE).forEach(function (key) {
95
108
  });
96
109
  });
97
110
 
111
+ var _itIT = require("./itIT");
112
+
113
+ Object.keys(_itIT).forEach(function (key) {
114
+ if (key === "default" || key === "__esModule") return;
115
+ if (key in exports && exports[key] === _itIT[key]) return;
116
+ Object.defineProperty(exports, key, {
117
+ enumerable: true,
118
+ get: function () {
119
+ return _itIT[key];
120
+ }
121
+ });
122
+ });
123
+
98
124
  var _pickersLocaleTextApi = require("./utils/pickersLocaleTextApi");
99
125
 
100
126
  Object.keys(_pickersLocaleTextApi).forEach(function (key) {
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.itIT = void 0;
7
+
8
+ var _getPickersLocalization = require("./utils/getPickersLocalization");
9
+
10
+ const views = {
11
+ hours: 'le ore',
12
+ minutes: 'i minuti',
13
+ seconds: 'i secondi'
14
+ }; // This object is not Partial<PickersLocaleText> because it is the default values
15
+
16
+ const itITPickers = {
17
+ // Calendar navigation
18
+ previousMonth: 'Mese precedente',
19
+ nextMonth: 'Mese successivo',
20
+ // View navigation
21
+ openPreviousView: 'apri la vista precedente',
22
+ openNextView: 'apri la vista successiva',
23
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? "la vista dell'anno è aperta, passare alla vista del calendario" : "la vista dell'calendario è aperta, passare alla vista dell'anno",
24
+ // DateRange placeholders
25
+ start: 'Inizio',
26
+ end: 'Fine',
27
+ // Action bar
28
+ cancelButtonLabel: 'Cancellare',
29
+ clearButtonLabel: 'Sgomberare',
30
+ okButtonLabel: 'OK',
31
+ todayButtonLabel: 'Oggi',
32
+ // Clock labels
33
+ clockLabelText: (view, time, adapter) => `Seleziona ${views[view]}. ${time === null ? 'Nessun orario selezionato' : `L'ora selezionata è ${adapter.format(time, 'fullTime')}`}`,
34
+ hoursClockNumberText: hours => `${hours} ore`,
35
+ minutesClockNumberText: minutes => `${minutes} minuti`,
36
+ secondsClockNumberText: seconds => `${seconds} secondi`,
37
+ // Open picker labels
38
+ openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli la data, la data selezionata è ${utils.format(utils.date(rawValue), 'fullDate')}` : 'Scegli la data',
39
+ openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Scegli l'ora, l'ora selezionata è ${utils.format(utils.date(rawValue), 'fullTime')}` : "Scegli l'ora",
40
+ // Table labels
41
+ timeTableLabel: 'scegli un ora',
42
+ dateTableLabel: 'scegli una data'
43
+ };
44
+ const itIT = (0, _getPickersLocalization.getPickersLocalization)(itITPickers);
45
+ exports.itIT = itIT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers",
3
- "version": "5.0.0-beta.0",
3
+ "version": "5.0.0-beta.1",
4
4
  "description": "The community edition of the date picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -33,14 +33,14 @@
33
33
  "directory": "packages/x-date-pickers"
34
34
  },
35
35
  "dependencies": {
36
- "@babel/runtime": "^7.17.2",
36
+ "@babel/runtime": "^7.18.6",
37
37
  "@date-io/core": "^2.14.0",
38
38
  "@date-io/date-fns": "^2.14.0",
39
39
  "@date-io/dayjs": "^2.14.0",
40
40
  "@date-io/luxon": "^2.14.0",
41
41
  "@date-io/moment": "^2.14.0",
42
42
  "@mui/utils": "^5.4.1",
43
- "@types/react-transition-group": "^4.4.4",
43
+ "@types/react-transition-group": "^4.4.5",
44
44
  "clsx": "^1.2.1",
45
45
  "prop-types": "^15.7.2",
46
46
  "react-transition-group": "^4.4.2",
@@ -53,7 +53,7 @@
53
53
  "@mui/system": "^5.4.1",
54
54
  "date-fns": "^2.25.0",
55
55
  "dayjs": "^1.10.7",
56
- "luxon": "^1.28.0 || ^2.0.0",
56
+ "luxon": "^1.28.0 || ^2.0.0 || ^3.0.0",
57
57
  "moment": "^2.29.1",
58
58
  "react": "^17.0.2 || ^18.0.0"
59
59
  },