@mui/x-date-pickers 7.11.0 → 7.11.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.
Files changed (36) hide show
  1. package/AdapterDayjs/AdapterDayjs.js +4 -3
  2. package/CHANGELOG.md +84 -0
  3. package/index.js +1 -1
  4. package/internals/hooks/useField/useField.js +3 -1
  5. package/internals/hooks/useField/useFieldV6TextField.js +3 -2
  6. package/internals/hooks/useField/useFieldV7TextField.js +1 -1
  7. package/internals/hooks/usePicker/usePicker.js +2 -3
  8. package/internals/index.d.ts +1 -1
  9. package/internals/index.js +1 -1
  10. package/internals/utils/warning.d.ts +2 -4
  11. package/internals/utils/warning.js +17 -24
  12. package/locales/index.d.ts +1 -0
  13. package/locales/index.js +1 -0
  14. package/locales/nnNO.d.ts +80 -0
  15. package/locales/nnNO.js +73 -0
  16. package/modern/AdapterDayjs/AdapterDayjs.js +4 -3
  17. package/modern/index.js +1 -1
  18. package/modern/internals/hooks/useField/useField.js +3 -1
  19. package/modern/internals/hooks/useField/useFieldV6TextField.js +3 -2
  20. package/modern/internals/hooks/useField/useFieldV7TextField.js +1 -1
  21. package/modern/internals/hooks/usePicker/usePicker.js +2 -3
  22. package/modern/internals/index.js +1 -1
  23. package/modern/internals/utils/warning.js +17 -24
  24. package/modern/locales/index.js +1 -0
  25. package/modern/locales/nnNO.js +73 -0
  26. package/node/AdapterDayjs/AdapterDayjs.js +3 -2
  27. package/node/index.js +1 -1
  28. package/node/internals/hooks/useField/useField.js +3 -1
  29. package/node/internals/hooks/useField/useFieldV6TextField.js +3 -2
  30. package/node/internals/hooks/useField/useFieldV7TextField.js +1 -1
  31. package/node/internals/hooks/usePicker/usePicker.js +1 -2
  32. package/node/internals/index.js +6 -12
  33. package/node/internals/utils/warning.js +19 -27
  34. package/node/locales/index.js +11 -0
  35. package/node/locales/nnNO.js +79 -0
  36. package/package.json +3 -3
@@ -6,12 +6,11 @@ import customParseFormatPlugin from 'dayjs/plugin/customParseFormat';
6
6
  import localizedFormatPlugin from 'dayjs/plugin/localizedFormat';
7
7
  import isBetweenPlugin from 'dayjs/plugin/isBetween';
8
8
  import advancedFormatPlugin from 'dayjs/plugin/advancedFormat';
9
- import { buildWarning } from '../internals/utils/warning';
9
+ import { warnOnce } from '../internals/utils/warning';
10
10
  defaultDayjs.extend(localizedFormatPlugin);
11
11
  defaultDayjs.extend(weekOfYearPlugin);
12
12
  defaultDayjs.extend(isBetweenPlugin);
13
13
  defaultDayjs.extend(advancedFormatPlugin);
14
- const localeNotFoundWarning = buildWarning(['Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale', "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", 'fallback on English locale']);
15
14
  const formatTokenMap = {
16
15
  // Year
17
16
  YY: 'year',
@@ -234,7 +233,9 @@ export class AdapterDayjs {
234
233
  const locale = this.locale || 'en';
235
234
  let localeObject = locales[locale];
236
235
  if (localeObject === undefined) {
237
- localeNotFoundWarning();
236
+ if (process.env.NODE_ENV !== 'production') {
237
+ warnOnce(['MUI X: Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.', "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", 'fallback on English locale.']);
238
+ }
238
239
  localeObject = locales.en;
239
240
  }
240
241
  return localeObject.formats;
package/CHANGELOG.md CHANGED
@@ -3,6 +3,90 @@
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
+ ## 7.11.1
7
+
8
+ _Jul 25, 2024_
9
+
10
+ We'd like to offer a big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🔎 Allow `Zoom` to be controllable for charts (#13858) @JCQuintas
13
+ - 🌍 Add Icelandic (is-IS) and Norwegian Nynorsk (nn-NO) locales on the Data Grid
14
+ - 🌍 Improve Norwegian Bokmål (nb-NO) and German (de-DE) locales on the Data Grid
15
+ - 🌍 Add Norwegian Nynorsk (nn-NO) locale on the Date and Time Pickers
16
+ - 🐞 Bugfixes
17
+ - 📚 Documentation improvements
18
+
19
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
20
+
21
+ ### Data Grid
22
+
23
+ #### `@mui/x-data-grid@7.11.1`
24
+
25
+ - [DataGrid] Remove dead code in internal `GridPreferencesPanel` (#13934) @k-rajat19
26
+ - [DataGrid] Do not miss to escape formulas in CSV export (#13888) @arminmeh
27
+ - [l10n] Add Icelandic (is-IS) locale (#13283) @magnimarels
28
+ - [l10n] Add Norwegian nynorsk (nn-NO) locale and improve Norwegian bokmål (nb-NO) locale (#13588) @AnderzL7
29
+ - [l10n] Improve German (de-DE) locale (#13910) @lhilgert9
30
+
31
+ #### `@mui/x-data-grid-pro@7.11.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
32
+
33
+ Same changes as in `@mui/x-data-grid@7.11.1`.
34
+
35
+ #### `@mui/x-data-grid-premium@7.11.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
36
+
37
+ Same changes as in `@mui/x-data-grid-pro@7.11.1`, plus:
38
+
39
+ - [DataGridPremium] Pass the `api` object to events (#13893) @pcorpet
40
+ - [DataGridPremium] Fix paste to selected cells (#13967) @romgrk
41
+
42
+ ### Date and Time Pickers
43
+
44
+ #### `@mui/x-date-pickers@7.11.1`
45
+
46
+ - [fields] Prevent keyboard editing when disabled (#13900) @arthurbalduini
47
+ - [l10n] Add Norwegian Nynorsk (nn-NO) locale (#13946) @AnderzL7
48
+
49
+ #### `@mui/x-date-pickers-pro@7.11.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
50
+
51
+ Same changes as in `@mui/x-date-pickers@7.11.1`.
52
+
53
+ ### Charts
54
+
55
+ #### `@mui/x-charts@7.11.1`
56
+
57
+ - [charts] Add `ownerState` function to `slotProps` typing when available (#13965) @alexfauquette
58
+ - [charts] Allow `Zoom` to be controllable (#13858) @JCQuintas
59
+ - [charts] Deprecate `xAxisKey` /`zAxisKey` in favor of `xAxisId`/`zAxisId` (#13940) @alexfauquette
60
+ - [charts] Hide empty arcs in the PieChart (#13897) @alexfauquette
61
+ - [charts] Limit the trigger of exit charts (#13682) @alexfauquette
62
+
63
+ ### Tree View
64
+
65
+ #### `@mui/x-tree-view@7.11.1`
66
+
67
+ - [TreeView] Allow the plugins to enrich the props passed to the item slots (#13953) @flaviendelangle
68
+
69
+ ### Docs
70
+
71
+ - [docs] Bump pnpm priority as a package manager (#13894) @oliviertassinari
72
+ - [docs] Explicitly mark charts pro as not released (#13905) @alexfauquette
73
+ - [docs] Fix dot consistency a11y table @oliviertassinari
74
+ - [docs] Fix some typos in charts docs (#13906) @cratiu222
75
+ - [docs] Fix spelling (#13902) @nnsW3
76
+ - [docs] Improve error message when moving between plans (#13874) @oliviertassinari
77
+ - [docs] Update `SparkLineChart` reference not being correctly capitalised (#13960) @duckboy81
78
+ - [docs] Fix scroll demos disorientation (#13909) @oliviertassinari
79
+
80
+ ### Core
81
+
82
+ - [core] Add `@mui/material-nextjs` to `MUI Core` renovate group (#13966) @LukasTy
83
+ - [core] Remove warning message in production (#13911) @oliviertassinari
84
+ - [code-infra] Reuse `useReactVersion` script from the monorepo (#13710) @cherniavskii
85
+ - [infra] Adds order id validation action (#13957) @michelengelen
86
+ - [infra] Fix order id validator action (#13971) @michelengelen
87
+ - [infra] Fix regex in order id validation (#13976) @michelengelen
88
+ - [infra] Issue template improvement (#13954) @michelengelen
89
+
6
90
  ## 7.11.0
7
91
 
8
92
  _Jul 18, 2024_
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.11.0
2
+ * @mui/x-date-pickers v7.11.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -69,7 +69,9 @@ export const useField = params => {
69
69
  }));
70
70
  const handleContainerKeyDown = useEventCallback(event => {
71
71
  onKeyDown?.(event);
72
-
72
+ if (disabled) {
73
+ return;
74
+ }
73
75
  // eslint-disable-next-line default-case
74
76
  switch (true) {
75
77
  // Select all
@@ -47,7 +47,8 @@ export const useFieldV6TextField = params => {
47
47
  placeholder: inPlaceholder
48
48
  },
49
49
  internalProps: {
50
- readOnly = false
50
+ readOnly = false,
51
+ disabled = false
51
52
  },
52
53
  parsedSelectedSections,
53
54
  activeSectionIndex,
@@ -188,7 +189,7 @@ export const useFieldV6TextField = params => {
188
189
 
189
190
  // prevent default to avoid the input `onChange` handler being called
190
191
  event.preventDefault();
191
- if (readOnly) {
192
+ if (readOnly || disabled) {
192
193
  return;
193
194
  }
194
195
  const pastedValue = event.clipboardData.getData('text');
@@ -236,7 +236,7 @@ export const useFieldV7TextField = params => {
236
236
  const handleInputContentPaste = useEventCallback(event => {
237
237
  // prevent default to avoid the input `onInput` handler being called
238
238
  event.preventDefault();
239
- if (readOnly || typeof parsedSelectedSections !== 'number') {
239
+ if (readOnly || disabled || typeof parsedSelectedSections !== 'number') {
240
240
  return;
241
241
  }
242
242
  const activeSection = state.sections[parsedSelectedSections];
@@ -1,8 +1,7 @@
1
1
  import { usePickerValue } from './usePickerValue';
2
2
  import { usePickerViews } from './usePickerViews';
3
3
  import { usePickerLayoutProps } from './usePickerLayoutProps';
4
- import { buildWarning } from '../../utils/warning';
5
- const warnRenderInputIsDefined = buildWarning(['The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', 'You can replace it with the `textField` component slot in most cases.', 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).']);
4
+ import { warnOnce } from '../../utils/warning';
6
5
  export const usePicker = ({
7
6
  props,
8
7
  valueManager,
@@ -16,7 +15,7 @@ export const usePicker = ({
16
15
  }) => {
17
16
  if (process.env.NODE_ENV !== 'production') {
18
17
  if (props.renderInput != null) {
19
- warnRenderInputIsDefined();
18
+ warnOnce(['MUI X: The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', 'You can replace it with the `textField` component slot in most cases.', 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).']);
20
19
  }
21
20
  }
22
21
  const pickerValueResponse = usePickerValue({
@@ -59,7 +59,7 @@ export { validateDate } from './utils/validation/validateDate';
59
59
  export { validateDateTime } from './utils/validation/validateDateTime';
60
60
  export { validateTime } from './utils/validation/validateTime';
61
61
  export { applyDefaultViewProps } from './utils/views';
62
- export { buildDeprecatedPropsWarning, buildWarning } from './utils/warning';
62
+ export { warnOnce } from './utils/warning';
63
63
  export { DayCalendar } from '../DateCalendar/DayCalendar';
64
64
  export type { DayCalendarProps, DayCalendarSlots, DayCalendarSlotProps, ExportedDayCalendarProps, } from '../DateCalendar/DayCalendar';
65
65
  export type { ExportedDateCalendarProps } from '../DateCalendar/DateCalendar.types';
@@ -30,7 +30,7 @@ export { validateDate } from './utils/validation/validateDate';
30
30
  export { validateDateTime } from './utils/validation/validateDateTime';
31
31
  export { validateTime } from './utils/validation/validateTime';
32
32
  export { applyDefaultViewProps } from './utils/views';
33
- export { buildDeprecatedPropsWarning, buildWarning } from './utils/warning';
33
+ export { warnOnce } from './utils/warning';
34
34
  export { DayCalendar } from '../DateCalendar/DayCalendar';
35
35
  export { useCalendarState } from '../DateCalendar/useCalendarState';
36
36
  export { isInternalTimeView, isTimeView } from './utils/time-utils';
@@ -1,4 +1,2 @@
1
- export declare const buildDeprecatedPropsWarning: (message: string | string[]) => (deprecatedProps: {
2
- [key: string]: any;
3
- }) => void;
4
- export declare const buildWarning: (message: string | string[], gravity?: "warning" | "error") => () => void;
1
+ export declare function warnOnce(message: string | string[], gravity?: 'warning' | 'error'): void;
2
+ export declare function clearWarningsCache(): void;
@@ -1,28 +1,21 @@
1
- export const buildDeprecatedPropsWarning = message => {
2
- let alreadyWarned = false;
1
+ const warnedOnceCache = new Set();
2
+
3
+ // TODO move to @mui/x-internals
4
+ // TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper.
5
+ export function warnOnce(message, gravity = 'warning') {
3
6
  if (process.env.NODE_ENV === 'production') {
4
- return () => {};
7
+ return;
5
8
  }
6
9
  const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
7
- return deprecatedProps => {
8
- const deprecatedKeys = Object.entries(deprecatedProps).filter(([, value]) => value !== undefined).map(([key]) => `- ${key}`);
9
- if (!alreadyWarned && deprecatedKeys.length > 0) {
10
- alreadyWarned = true;
11
- console.warn([cleanMessage, 'deprecated props observed:', ...deprecatedKeys].join('\n'));
10
+ if (!warnedOnceCache.has(cleanMessage)) {
11
+ warnedOnceCache.add(cleanMessage);
12
+ if (gravity === 'error') {
13
+ console.error(cleanMessage);
14
+ } else {
15
+ console.warn(cleanMessage);
12
16
  }
13
- };
14
- };
15
- export const buildWarning = (message, gravity = 'warning') => {
16
- let alreadyWarned = false;
17
- const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
18
- return () => {
19
- if (!alreadyWarned) {
20
- alreadyWarned = true;
21
- if (gravity === 'error') {
22
- console.error(cleanMessage);
23
- } else {
24
- console.warn(cleanMessage);
25
- }
26
- }
27
- };
28
- };
17
+ }
18
+ }
19
+ export function clearWarningsCache() {
20
+ warnedOnceCache.clear();
21
+ }
@@ -20,6 +20,7 @@ export * from './kzKZ';
20
20
  export * from './mk';
21
21
  export * from './nbNO';
22
22
  export * from './nlNL';
23
+ export * from './nnNO';
23
24
  export * from './plPL';
24
25
  export * from './ptBR';
25
26
  export * from './roRO';
package/locales/index.js CHANGED
@@ -20,6 +20,7 @@ export * from './kzKZ';
20
20
  export * from './mk';
21
21
  export * from './nbNO';
22
22
  export * from './nlNL';
23
+ export * from './nnNO';
23
24
  export * from './plPL';
24
25
  export * from './ptBR';
25
26
  export * from './roRO';
@@ -0,0 +1,80 @@
1
+ import { TimeViewWithMeridiem } from '../internals/models';
2
+ export declare const nnNO: {
3
+ components: {
4
+ MuiLocalizationProvider: {
5
+ defaultProps: {
6
+ localeText: {
7
+ previousMonth?: string | undefined;
8
+ nextMonth?: string | undefined;
9
+ calendarWeekNumberHeaderLabel?: string | undefined;
10
+ calendarWeekNumberHeaderText?: string | undefined;
11
+ calendarWeekNumberAriaLabelText?: ((weekNumber: number) => string) | undefined;
12
+ calendarWeekNumberText?: ((weekNumber: number) => string) | undefined;
13
+ openPreviousView?: string | undefined;
14
+ openNextView?: string | undefined;
15
+ calendarViewSwitchingButtonAriaLabel?: ((currentView: import("@mui/x-date-pickers/models").DateView) => string) | undefined;
16
+ start?: string | undefined;
17
+ end?: string | undefined;
18
+ startDate?: string | undefined;
19
+ startTime?: string | undefined;
20
+ endDate?: string | undefined;
21
+ endTime?: string | undefined;
22
+ cancelButtonLabel?: string | undefined;
23
+ clearButtonLabel?: string | undefined;
24
+ okButtonLabel?: string | undefined;
25
+ todayButtonLabel?: string | undefined;
26
+ clockLabelText?: ((view: import("@mui/x-date-pickers/models").TimeView, time: any, adapter: import("@mui/x-date-pickers/models").MuiPickersAdapter<any, any>) => string) | undefined;
27
+ hoursClockNumberText?: ((hours: string) => string) | undefined;
28
+ minutesClockNumberText?: ((minutes: string) => string) | undefined;
29
+ secondsClockNumberText?: ((seconds: string) => string) | undefined;
30
+ selectViewText?: ((view: TimeViewWithMeridiem) => string) | undefined;
31
+ openDatePickerDialogue?: ((date: any, utils: import("@mui/x-date-pickers/models").MuiPickersAdapter<any, any>) => string) | undefined;
32
+ openTimePickerDialogue?: ((date: any, utils: import("@mui/x-date-pickers/models").MuiPickersAdapter<any, any>) => string) | undefined;
33
+ fieldClearLabel?: string | undefined;
34
+ timeTableLabel?: string | undefined;
35
+ dateTableLabel?: string | undefined;
36
+ fieldYearPlaceholder?: ((params: {
37
+ digitAmount: number;
38
+ format: string;
39
+ }) => string) | undefined;
40
+ fieldMonthPlaceholder?: ((params: {
41
+ contentType: import("@mui/x-date-pickers/models").FieldSectionContentType;
42
+ format: string;
43
+ }) => string) | undefined;
44
+ fieldDayPlaceholder?: ((params: {
45
+ format: string;
46
+ }) => string) | undefined;
47
+ fieldWeekDayPlaceholder?: ((params: {
48
+ contentType: import("@mui/x-date-pickers/models").FieldSectionContentType;
49
+ format: string;
50
+ }) => string) | undefined;
51
+ fieldHoursPlaceholder?: ((params: {
52
+ format: string;
53
+ }) => string) | undefined;
54
+ fieldMinutesPlaceholder?: ((params: {
55
+ format: string;
56
+ }) => string) | undefined;
57
+ fieldSecondsPlaceholder?: ((params: {
58
+ format: string;
59
+ }) => string) | undefined;
60
+ fieldMeridiemPlaceholder?: ((params: {
61
+ format: string;
62
+ }) => string) | undefined;
63
+ year?: string | undefined;
64
+ month?: string | undefined;
65
+ day?: string | undefined;
66
+ weekDay?: string | undefined;
67
+ hours?: string | undefined;
68
+ minutes?: string | undefined;
69
+ seconds?: string | undefined;
70
+ meridiem?: string | undefined;
71
+ empty?: string | undefined;
72
+ datePickerToolbarTitle?: string | undefined;
73
+ timePickerToolbarTitle?: string | undefined;
74
+ dateTimePickerToolbarTitle?: string | undefined;
75
+ dateRangePickerToolbarTitle?: string | undefined;
76
+ };
77
+ };
78
+ };
79
+ };
80
+ };
@@ -0,0 +1,73 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ const timeViews = {
3
+ hours: 'timar',
4
+ minutes: 'minuttar',
5
+ seconds: 'sekundar',
6
+ meridiem: 'meridiem'
7
+ };
8
+ const nnNOPickers = {
9
+ // Calendar navigation
10
+ previousMonth: 'Forrige månad',
11
+ nextMonth: 'Neste månad',
12
+ // View navigation
13
+ openPreviousView: 'Opne forrige visning',
14
+ openNextView: 'Opne neste visning',
15
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'årsvisning er open, byt til kalendervisning' : 'kalendervisning er open, byt til årsvisning',
16
+ // DateRange labels
17
+ start: 'Start',
18
+ end: 'Slutt',
19
+ startDate: 'Startdato',
20
+ startTime: 'Starttid',
21
+ endDate: 'Sluttdato',
22
+ endTime: 'Slutttid',
23
+ // Action bar
24
+ cancelButtonLabel: 'Avbryt',
25
+ clearButtonLabel: 'Fjern',
26
+ okButtonLabel: 'OK',
27
+ todayButtonLabel: 'I dag',
28
+ // Toolbar titles
29
+ datePickerToolbarTitle: 'Vel dato',
30
+ dateTimePickerToolbarTitle: 'Vel dato & klokkeslett',
31
+ timePickerToolbarTitle: 'Vel klokkeslett',
32
+ dateRangePickerToolbarTitle: 'Vel datoperiode',
33
+ // Clock labels
34
+ clockLabelText: (view, time, adapter) => `Vel ${timeViews[view]}. ${time === null ? 'Ingen tid vald' : `Vald tid er ${adapter.format(time, 'fullTime')}`}`,
35
+ hoursClockNumberText: hours => `${hours} timar`,
36
+ minutesClockNumberText: minutes => `${minutes} minuttar`,
37
+ secondsClockNumberText: seconds => `${seconds} sekundar`,
38
+ // Digital clock labels
39
+ selectViewText: view => `Vel ${timeViews[view]}`,
40
+ // Calendar labels
41
+ calendarWeekNumberHeaderLabel: 'Vekenummer',
42
+ calendarWeekNumberHeaderText: '#',
43
+ calendarWeekNumberAriaLabelText: weekNumber => `Veke ${weekNumber}`,
44
+ calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
+ // Open picker labels
46
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Vel dato, vald dato er ${utils.format(value, 'fullDate')}` : 'Vel dato',
47
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Vel tid, vald tid er ${utils.format(value, 'fullTime')}` : 'Vel tid',
48
+ fieldClearLabel: 'Fjern verdi',
49
+ // Table labels
50
+ timeTableLabel: 'vel tid',
51
+ dateTableLabel: 'vel dato',
52
+ // Field section placeholders
53
+ fieldYearPlaceholder: params => 'Å'.repeat(params.digitAmount),
54
+ fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
55
+ fieldDayPlaceholder: () => 'DD',
56
+ fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
57
+ fieldHoursPlaceholder: () => 'tt',
58
+ fieldMinutesPlaceholder: () => 'mm',
59
+ fieldSecondsPlaceholder: () => 'ss',
60
+ fieldMeridiemPlaceholder: () => 'aa',
61
+ // View names
62
+ year: 'År',
63
+ month: 'Månad',
64
+ day: 'Dag',
65
+ weekDay: 'Vekedag',
66
+ hours: 'Timar',
67
+ minutes: 'Minuttar',
68
+ seconds: 'Sekundar',
69
+ meridiem: 'Meridiem',
70
+ // Common
71
+ empty: 'Tom'
72
+ };
73
+ export const nnNO = getPickersLocalization(nnNOPickers);
@@ -6,12 +6,11 @@ import customParseFormatPlugin from 'dayjs/plugin/customParseFormat';
6
6
  import localizedFormatPlugin from 'dayjs/plugin/localizedFormat';
7
7
  import isBetweenPlugin from 'dayjs/plugin/isBetween';
8
8
  import advancedFormatPlugin from 'dayjs/plugin/advancedFormat';
9
- import { buildWarning } from '../internals/utils/warning';
9
+ import { warnOnce } from '../internals/utils/warning';
10
10
  defaultDayjs.extend(localizedFormatPlugin);
11
11
  defaultDayjs.extend(weekOfYearPlugin);
12
12
  defaultDayjs.extend(isBetweenPlugin);
13
13
  defaultDayjs.extend(advancedFormatPlugin);
14
- const localeNotFoundWarning = buildWarning(['Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale', "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", 'fallback on English locale']);
15
14
  const formatTokenMap = {
16
15
  // Year
17
16
  YY: 'year',
@@ -234,7 +233,9 @@ export class AdapterDayjs {
234
233
  const locale = this.locale || 'en';
235
234
  let localeObject = locales[locale];
236
235
  if (localeObject === undefined) {
237
- localeNotFoundWarning();
236
+ if (process.env.NODE_ENV !== 'production') {
237
+ warnOnce(['MUI X: Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.', "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", 'fallback on English locale.']);
238
+ }
238
239
  localeObject = locales.en;
239
240
  }
240
241
  return localeObject.formats;
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.11.0
2
+ * @mui/x-date-pickers v7.11.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -69,7 +69,9 @@ export const useField = params => {
69
69
  }));
70
70
  const handleContainerKeyDown = useEventCallback(event => {
71
71
  onKeyDown?.(event);
72
-
72
+ if (disabled) {
73
+ return;
74
+ }
73
75
  // eslint-disable-next-line default-case
74
76
  switch (true) {
75
77
  // Select all
@@ -47,7 +47,8 @@ export const useFieldV6TextField = params => {
47
47
  placeholder: inPlaceholder
48
48
  },
49
49
  internalProps: {
50
- readOnly = false
50
+ readOnly = false,
51
+ disabled = false
51
52
  },
52
53
  parsedSelectedSections,
53
54
  activeSectionIndex,
@@ -188,7 +189,7 @@ export const useFieldV6TextField = params => {
188
189
 
189
190
  // prevent default to avoid the input `onChange` handler being called
190
191
  event.preventDefault();
191
- if (readOnly) {
192
+ if (readOnly || disabled) {
192
193
  return;
193
194
  }
194
195
  const pastedValue = event.clipboardData.getData('text');
@@ -236,7 +236,7 @@ export const useFieldV7TextField = params => {
236
236
  const handleInputContentPaste = useEventCallback(event => {
237
237
  // prevent default to avoid the input `onInput` handler being called
238
238
  event.preventDefault();
239
- if (readOnly || typeof parsedSelectedSections !== 'number') {
239
+ if (readOnly || disabled || typeof parsedSelectedSections !== 'number') {
240
240
  return;
241
241
  }
242
242
  const activeSection = state.sections[parsedSelectedSections];
@@ -1,8 +1,7 @@
1
1
  import { usePickerValue } from './usePickerValue';
2
2
  import { usePickerViews } from './usePickerViews';
3
3
  import { usePickerLayoutProps } from './usePickerLayoutProps';
4
- import { buildWarning } from '../../utils/warning';
5
- const warnRenderInputIsDefined = buildWarning(['The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', 'You can replace it with the `textField` component slot in most cases.', 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).']);
4
+ import { warnOnce } from '../../utils/warning';
6
5
  export const usePicker = ({
7
6
  props,
8
7
  valueManager,
@@ -16,7 +15,7 @@ export const usePicker = ({
16
15
  }) => {
17
16
  if (process.env.NODE_ENV !== 'production') {
18
17
  if (props.renderInput != null) {
19
- warnRenderInputIsDefined();
18
+ warnOnce(['MUI X: The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', 'You can replace it with the `textField` component slot in most cases.', 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).']);
20
19
  }
21
20
  }
22
21
  const pickerValueResponse = usePickerValue({
@@ -30,7 +30,7 @@ export { validateDate } from './utils/validation/validateDate';
30
30
  export { validateDateTime } from './utils/validation/validateDateTime';
31
31
  export { validateTime } from './utils/validation/validateTime';
32
32
  export { applyDefaultViewProps } from './utils/views';
33
- export { buildDeprecatedPropsWarning, buildWarning } from './utils/warning';
33
+ export { warnOnce } from './utils/warning';
34
34
  export { DayCalendar } from '../DateCalendar/DayCalendar';
35
35
  export { useCalendarState } from '../DateCalendar/useCalendarState';
36
36
  export { isInternalTimeView, isTimeView } from './utils/time-utils';
@@ -1,28 +1,21 @@
1
- export const buildDeprecatedPropsWarning = message => {
2
- let alreadyWarned = false;
1
+ const warnedOnceCache = new Set();
2
+
3
+ // TODO move to @mui/x-internals
4
+ // TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper.
5
+ export function warnOnce(message, gravity = 'warning') {
3
6
  if (process.env.NODE_ENV === 'production') {
4
- return () => {};
7
+ return;
5
8
  }
6
9
  const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
7
- return deprecatedProps => {
8
- const deprecatedKeys = Object.entries(deprecatedProps).filter(([, value]) => value !== undefined).map(([key]) => `- ${key}`);
9
- if (!alreadyWarned && deprecatedKeys.length > 0) {
10
- alreadyWarned = true;
11
- console.warn([cleanMessage, 'deprecated props observed:', ...deprecatedKeys].join('\n'));
10
+ if (!warnedOnceCache.has(cleanMessage)) {
11
+ warnedOnceCache.add(cleanMessage);
12
+ if (gravity === 'error') {
13
+ console.error(cleanMessage);
14
+ } else {
15
+ console.warn(cleanMessage);
12
16
  }
13
- };
14
- };
15
- export const buildWarning = (message, gravity = 'warning') => {
16
- let alreadyWarned = false;
17
- const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
18
- return () => {
19
- if (!alreadyWarned) {
20
- alreadyWarned = true;
21
- if (gravity === 'error') {
22
- console.error(cleanMessage);
23
- } else {
24
- console.warn(cleanMessage);
25
- }
26
- }
27
- };
28
- };
17
+ }
18
+ }
19
+ export function clearWarningsCache() {
20
+ warnedOnceCache.clear();
21
+ }
@@ -20,6 +20,7 @@ export * from './kzKZ';
20
20
  export * from './mk';
21
21
  export * from './nbNO';
22
22
  export * from './nlNL';
23
+ export * from './nnNO';
23
24
  export * from './plPL';
24
25
  export * from './ptBR';
25
26
  export * from './roRO';
@@ -0,0 +1,73 @@
1
+ import { getPickersLocalization } from './utils/getPickersLocalization';
2
+ const timeViews = {
3
+ hours: 'timar',
4
+ minutes: 'minuttar',
5
+ seconds: 'sekundar',
6
+ meridiem: 'meridiem'
7
+ };
8
+ const nnNOPickers = {
9
+ // Calendar navigation
10
+ previousMonth: 'Forrige månad',
11
+ nextMonth: 'Neste månad',
12
+ // View navigation
13
+ openPreviousView: 'Opne forrige visning',
14
+ openNextView: 'Opne neste visning',
15
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'årsvisning er open, byt til kalendervisning' : 'kalendervisning er open, byt til årsvisning',
16
+ // DateRange labels
17
+ start: 'Start',
18
+ end: 'Slutt',
19
+ startDate: 'Startdato',
20
+ startTime: 'Starttid',
21
+ endDate: 'Sluttdato',
22
+ endTime: 'Slutttid',
23
+ // Action bar
24
+ cancelButtonLabel: 'Avbryt',
25
+ clearButtonLabel: 'Fjern',
26
+ okButtonLabel: 'OK',
27
+ todayButtonLabel: 'I dag',
28
+ // Toolbar titles
29
+ datePickerToolbarTitle: 'Vel dato',
30
+ dateTimePickerToolbarTitle: 'Vel dato & klokkeslett',
31
+ timePickerToolbarTitle: 'Vel klokkeslett',
32
+ dateRangePickerToolbarTitle: 'Vel datoperiode',
33
+ // Clock labels
34
+ clockLabelText: (view, time, adapter) => `Vel ${timeViews[view]}. ${time === null ? 'Ingen tid vald' : `Vald tid er ${adapter.format(time, 'fullTime')}`}`,
35
+ hoursClockNumberText: hours => `${hours} timar`,
36
+ minutesClockNumberText: minutes => `${minutes} minuttar`,
37
+ secondsClockNumberText: seconds => `${seconds} sekundar`,
38
+ // Digital clock labels
39
+ selectViewText: view => `Vel ${timeViews[view]}`,
40
+ // Calendar labels
41
+ calendarWeekNumberHeaderLabel: 'Vekenummer',
42
+ calendarWeekNumberHeaderText: '#',
43
+ calendarWeekNumberAriaLabelText: weekNumber => `Veke ${weekNumber}`,
44
+ calendarWeekNumberText: weekNumber => `${weekNumber}`,
45
+ // Open picker labels
46
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Vel dato, vald dato er ${utils.format(value, 'fullDate')}` : 'Vel dato',
47
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Vel tid, vald tid er ${utils.format(value, 'fullTime')}` : 'Vel tid',
48
+ fieldClearLabel: 'Fjern verdi',
49
+ // Table labels
50
+ timeTableLabel: 'vel tid',
51
+ dateTableLabel: 'vel dato',
52
+ // Field section placeholders
53
+ fieldYearPlaceholder: params => 'Å'.repeat(params.digitAmount),
54
+ fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
55
+ fieldDayPlaceholder: () => 'DD',
56
+ fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
57
+ fieldHoursPlaceholder: () => 'tt',
58
+ fieldMinutesPlaceholder: () => 'mm',
59
+ fieldSecondsPlaceholder: () => 'ss',
60
+ fieldMeridiemPlaceholder: () => 'aa',
61
+ // View names
62
+ year: 'År',
63
+ month: 'Månad',
64
+ day: 'Dag',
65
+ weekDay: 'Vekedag',
66
+ hours: 'Timar',
67
+ minutes: 'Minuttar',
68
+ seconds: 'Sekundar',
69
+ meridiem: 'Meridiem',
70
+ // Common
71
+ empty: 'Tom'
72
+ };
73
+ export const nnNO = getPickersLocalization(nnNOPickers);
@@ -19,7 +19,6 @@ _dayjs.default.extend(_localizedFormat.default);
19
19
  _dayjs.default.extend(_weekOfYear.default);
20
20
  _dayjs.default.extend(_isBetween.default);
21
21
  _dayjs.default.extend(_advancedFormat.default);
22
- const localeNotFoundWarning = (0, _warning.buildWarning)(['Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale', "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", 'fallback on English locale']);
23
22
  const formatTokenMap = {
24
23
  // Year
25
24
  YY: 'year',
@@ -242,7 +241,9 @@ class AdapterDayjs {
242
241
  const locale = this.locale || 'en';
243
242
  let localeObject = locales[locale];
244
243
  if (localeObject === undefined) {
245
- localeNotFoundWarning();
244
+ if (process.env.NODE_ENV !== 'production') {
245
+ (0, _warning.warnOnce)(['MUI X: Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.', "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", 'fallback on English locale.']);
246
+ }
246
247
  localeObject = locales.en;
247
248
  }
248
249
  return localeObject.formats;
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.11.0
2
+ * @mui/x-date-pickers v7.11.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -78,7 +78,9 @@ const useField = params => {
78
78
  }));
79
79
  const handleContainerKeyDown = (0, _useEventCallback.default)(event => {
80
80
  onKeyDown?.(event);
81
-
81
+ if (disabled) {
82
+ return;
83
+ }
82
84
  // eslint-disable-next-line default-case
83
85
  switch (true) {
84
86
  // Select all
@@ -57,7 +57,8 @@ const useFieldV6TextField = params => {
57
57
  placeholder: inPlaceholder
58
58
  },
59
59
  internalProps: {
60
- readOnly = false
60
+ readOnly = false,
61
+ disabled = false
61
62
  },
62
63
  parsedSelectedSections,
63
64
  activeSectionIndex,
@@ -198,7 +199,7 @@ const useFieldV6TextField = params => {
198
199
 
199
200
  // prevent default to avoid the input `onChange` handler being called
200
201
  event.preventDefault();
201
- if (readOnly) {
202
+ if (readOnly || disabled) {
202
203
  return;
203
204
  }
204
205
  const pastedValue = event.clipboardData.getData('text');
@@ -245,7 +245,7 @@ const useFieldV7TextField = params => {
245
245
  const handleInputContentPaste = (0, _useEventCallback.default)(event => {
246
246
  // prevent default to avoid the input `onInput` handler being called
247
247
  event.preventDefault();
248
- if (readOnly || typeof parsedSelectedSections !== 'number') {
248
+ if (readOnly || disabled || typeof parsedSelectedSections !== 'number') {
249
249
  return;
250
250
  }
251
251
  const activeSection = state.sections[parsedSelectedSections];
@@ -8,7 +8,6 @@ var _usePickerValue = require("./usePickerValue");
8
8
  var _usePickerViews = require("./usePickerViews");
9
9
  var _usePickerLayoutProps = require("./usePickerLayoutProps");
10
10
  var _warning = require("../../utils/warning");
11
- const warnRenderInputIsDefined = (0, _warning.buildWarning)(['The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', 'You can replace it with the `textField` component slot in most cases.', 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).']);
12
11
  const usePicker = ({
13
12
  props,
14
13
  valueManager,
@@ -22,7 +21,7 @@ const usePicker = ({
22
21
  }) => {
23
22
  if (process.env.NODE_ENV !== 'production') {
24
23
  if (props.renderInput != null) {
25
- warnRenderInputIsDefined();
24
+ (0, _warning.warnOnce)(['MUI X: The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', 'You can replace it with the `textField` component slot in most cases.', 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).']);
26
25
  }
27
26
  }
28
27
  const pickerValueResponse = (0, _usePickerValue.usePickerValue)({
@@ -81,18 +81,6 @@ Object.defineProperty(exports, "areDatesEqual", {
81
81
  return _dateUtils.areDatesEqual;
82
82
  }
83
83
  });
84
- Object.defineProperty(exports, "buildDeprecatedPropsWarning", {
85
- enumerable: true,
86
- get: function () {
87
- return _warning.buildDeprecatedPropsWarning;
88
- }
89
- });
90
- Object.defineProperty(exports, "buildWarning", {
91
- enumerable: true,
92
- get: function () {
93
- return _warning.buildWarning;
94
- }
95
- });
96
84
  Object.defineProperty(exports, "convertFieldResponseIntoMuiTextFieldProps", {
97
85
  enumerable: true,
98
86
  get: function () {
@@ -351,6 +339,12 @@ Object.defineProperty(exports, "validateTime", {
351
339
  return _validateTime.validateTime;
352
340
  }
353
341
  });
342
+ Object.defineProperty(exports, "warnOnce", {
343
+ enumerable: true,
344
+ get: function () {
345
+ return _warning.warnOnce;
346
+ }
347
+ });
354
348
  var _PickersArrowSwitcher = require("./components/PickersArrowSwitcher/PickersArrowSwitcher");
355
349
  var _PickersModalDialog = require("./components/PickersModalDialog");
356
350
  var _PickersPopper = require("./components/PickersPopper");
@@ -3,34 +3,26 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.buildWarning = exports.buildDeprecatedPropsWarning = void 0;
7
- const buildDeprecatedPropsWarning = message => {
8
- let alreadyWarned = false;
6
+ exports.clearWarningsCache = clearWarningsCache;
7
+ exports.warnOnce = warnOnce;
8
+ const warnedOnceCache = new Set();
9
+
10
+ // TODO move to @mui/x-internals
11
+ // TODO eventually move to @base_ui/internals. Base UI, etc. too need this helper.
12
+ function warnOnce(message, gravity = 'warning') {
9
13
  if (process.env.NODE_ENV === 'production') {
10
- return () => {};
14
+ return;
11
15
  }
12
16
  const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
13
- return deprecatedProps => {
14
- const deprecatedKeys = Object.entries(deprecatedProps).filter(([, value]) => value !== undefined).map(([key]) => `- ${key}`);
15
- if (!alreadyWarned && deprecatedKeys.length > 0) {
16
- alreadyWarned = true;
17
- console.warn([cleanMessage, 'deprecated props observed:', ...deprecatedKeys].join('\n'));
18
- }
19
- };
20
- };
21
- exports.buildDeprecatedPropsWarning = buildDeprecatedPropsWarning;
22
- const buildWarning = (message, gravity = 'warning') => {
23
- let alreadyWarned = false;
24
- const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
25
- return () => {
26
- if (!alreadyWarned) {
27
- alreadyWarned = true;
28
- if (gravity === 'error') {
29
- console.error(cleanMessage);
30
- } else {
31
- console.warn(cleanMessage);
32
- }
17
+ if (!warnedOnceCache.has(cleanMessage)) {
18
+ warnedOnceCache.add(cleanMessage);
19
+ if (gravity === 'error') {
20
+ console.error(cleanMessage);
21
+ } else {
22
+ console.warn(cleanMessage);
33
23
  }
34
- };
35
- };
36
- exports.buildWarning = buildWarning;
24
+ }
25
+ }
26
+ function clearWarningsCache() {
27
+ warnedOnceCache.clear();
28
+ }
@@ -245,6 +245,17 @@ Object.keys(_nlNL).forEach(function (key) {
245
245
  }
246
246
  });
247
247
  });
248
+ var _nnNO = require("./nnNO");
249
+ Object.keys(_nnNO).forEach(function (key) {
250
+ if (key === "default" || key === "__esModule") return;
251
+ if (key in exports && exports[key] === _nnNO[key]) return;
252
+ Object.defineProperty(exports, key, {
253
+ enumerable: true,
254
+ get: function () {
255
+ return _nnNO[key];
256
+ }
257
+ });
258
+ });
248
259
  var _plPL = require("./plPL");
249
260
  Object.keys(_plPL).forEach(function (key) {
250
261
  if (key === "default" || key === "__esModule") return;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.nnNO = void 0;
7
+ var _getPickersLocalization = require("./utils/getPickersLocalization");
8
+ const timeViews = {
9
+ hours: 'timar',
10
+ minutes: 'minuttar',
11
+ seconds: 'sekundar',
12
+ meridiem: 'meridiem'
13
+ };
14
+ const nnNOPickers = {
15
+ // Calendar navigation
16
+ previousMonth: 'Forrige månad',
17
+ nextMonth: 'Neste månad',
18
+ // View navigation
19
+ openPreviousView: 'Opne forrige visning',
20
+ openNextView: 'Opne neste visning',
21
+ calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'årsvisning er open, byt til kalendervisning' : 'kalendervisning er open, byt til årsvisning',
22
+ // DateRange labels
23
+ start: 'Start',
24
+ end: 'Slutt',
25
+ startDate: 'Startdato',
26
+ startTime: 'Starttid',
27
+ endDate: 'Sluttdato',
28
+ endTime: 'Slutttid',
29
+ // Action bar
30
+ cancelButtonLabel: 'Avbryt',
31
+ clearButtonLabel: 'Fjern',
32
+ okButtonLabel: 'OK',
33
+ todayButtonLabel: 'I dag',
34
+ // Toolbar titles
35
+ datePickerToolbarTitle: 'Vel dato',
36
+ dateTimePickerToolbarTitle: 'Vel dato & klokkeslett',
37
+ timePickerToolbarTitle: 'Vel klokkeslett',
38
+ dateRangePickerToolbarTitle: 'Vel datoperiode',
39
+ // Clock labels
40
+ clockLabelText: (view, time, adapter) => `Vel ${timeViews[view]}. ${time === null ? 'Ingen tid vald' : `Vald tid er ${adapter.format(time, 'fullTime')}`}`,
41
+ hoursClockNumberText: hours => `${hours} timar`,
42
+ minutesClockNumberText: minutes => `${minutes} minuttar`,
43
+ secondsClockNumberText: seconds => `${seconds} sekundar`,
44
+ // Digital clock labels
45
+ selectViewText: view => `Vel ${timeViews[view]}`,
46
+ // Calendar labels
47
+ calendarWeekNumberHeaderLabel: 'Vekenummer',
48
+ calendarWeekNumberHeaderText: '#',
49
+ calendarWeekNumberAriaLabelText: weekNumber => `Veke ${weekNumber}`,
50
+ calendarWeekNumberText: weekNumber => `${weekNumber}`,
51
+ // Open picker labels
52
+ openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Vel dato, vald dato er ${utils.format(value, 'fullDate')}` : 'Vel dato',
53
+ openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Vel tid, vald tid er ${utils.format(value, 'fullTime')}` : 'Vel tid',
54
+ fieldClearLabel: 'Fjern verdi',
55
+ // Table labels
56
+ timeTableLabel: 'vel tid',
57
+ dateTableLabel: 'vel dato',
58
+ // Field section placeholders
59
+ fieldYearPlaceholder: params => 'Å'.repeat(params.digitAmount),
60
+ fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
61
+ fieldDayPlaceholder: () => 'DD',
62
+ fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
63
+ fieldHoursPlaceholder: () => 'tt',
64
+ fieldMinutesPlaceholder: () => 'mm',
65
+ fieldSecondsPlaceholder: () => 'ss',
66
+ fieldMeridiemPlaceholder: () => 'aa',
67
+ // View names
68
+ year: 'År',
69
+ month: 'Månad',
70
+ day: 'Dag',
71
+ weekDay: 'Vekedag',
72
+ hours: 'Timar',
73
+ minutes: 'Minuttar',
74
+ seconds: 'Sekundar',
75
+ meridiem: 'Meridiem',
76
+ // Common
77
+ empty: 'Tom'
78
+ };
79
+ const nnNO = exports.nnNO = (0, _getPickersLocalization.getPickersLocalization)(nnNOPickers);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers",
3
- "version": "7.11.0",
3
+ "version": "7.11.1",
4
4
  "description": "The community edition of the Date and Time Picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -37,8 +37,8 @@
37
37
  "dependencies": {
38
38
  "@babel/runtime": "^7.24.8",
39
39
  "@mui/base": "^5.0.0-beta.40",
40
- "@mui/system": "^5.16.2",
41
- "@mui/utils": "^5.16.2",
40
+ "@mui/system": "^5.16.5",
41
+ "@mui/utils": "^5.16.5",
42
42
  "@types/react-transition-group": "^4.4.10",
43
43
  "clsx": "^2.1.1",
44
44
  "prop-types": "^15.8.1",