@mui/x-date-pickers 6.10.0 → 6.10.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.
@@ -9,7 +9,7 @@ import { buildWarning } from '../internals/utils/warning';
9
9
  defaultDayjs.extend(customParseFormatPlugin);
10
10
  defaultDayjs.extend(localizedFormatPlugin);
11
11
  defaultDayjs.extend(isBetweenPlugin);
12
- 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 with `require('dayjs/locale/{localeUsed}')`", 'fallback on English locale']);
12
+ 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']);
13
13
  const formatTokenMap = {
14
14
  // Year
15
15
  YY: 'year',
@@ -262,14 +262,14 @@ export class AdapterLuxon {
262
262
  };
263
263
  /* istanbul ignore next */
264
264
  this.is12HourCycleInCurrentLocale = () => {
265
- var _Intl$DateTimeFormat, _Intl$DateTimeFormat$;
265
+ var _Intl$DateTimeFormat;
266
266
  if (typeof Intl === 'undefined' || typeof Intl.DateTimeFormat === 'undefined') {
267
267
  return true; // Luxon defaults to en-US if Intl not found
268
268
  }
269
269
 
270
270
  return Boolean((_Intl$DateTimeFormat = new Intl.DateTimeFormat(this.locale, {
271
271
  hour: 'numeric'
272
- })) == null ? void 0 : (_Intl$DateTimeFormat$ = _Intl$DateTimeFormat.resolvedOptions()) == null ? void 0 : _Intl$DateTimeFormat$.hour12);
272
+ })) == null || (_Intl$DateTimeFormat = _Intl$DateTimeFormat.resolvedOptions()) == null ? void 0 : _Intl$DateTimeFormat.hour12);
273
273
  };
274
274
  this.expandFormat = format => {
275
275
  // Extract escaped section to avoid extending them
package/CHANGELOG.md CHANGED
@@ -3,6 +3,75 @@
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
+ ## 6.10.1
7
+
8
+ _Jul 20, 2023_
9
+
10
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🎁 Fix CSV export for values containing double quotes
13
+ - 🚀 Improve tree data performance
14
+ - 🐞 Bugfixes
15
+ - 📚 Documentation improvements
16
+
17
+ ### Data Grid
18
+
19
+ #### `@mui/x-data-grid@v6.10.1`
20
+
21
+ - [DataGrid] Filtering performance: compile filter applier with `eval` (#9635) @romgrk
22
+ - [DataGrid] Fix CSV export for values containing double quotes (#9667) @cherniavskii
23
+ - [DataGrid] Fix column type change not working correctly (#9594) @cherniavskii
24
+ - [DataGrid] Fix quick filter `undefined` row error (#9708) @romgrk
25
+ - [DataGrid] Prevent `viewportOuterSize.height` going negative (#9664) @gitstart
26
+ - [DataGrid] Update focused cell on page change via keyboard (#9203) @m4theushw
27
+ - [DataGrid] Wait for remote stylesheets to load before print (#9665) @cherniavskii
28
+
29
+ #### `@mui/x-data-grid-pro@v6.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
30
+
31
+ Same changes as in `@mui/x-data-grid@v6.10.1`, plus:
32
+
33
+ - [DataGridPro] Improve tree data performance (#9682) @cherniavskii
34
+ - [DataGridPro] Prevent affecting cells from child DataGrid when resizing a column (#9670) @m4theushw
35
+
36
+ #### `@mui/x-data-grid-premium@v6.10.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link)
37
+
38
+ Same changes as in `@mui/x-data-grid-pro@v6.10.1`.
39
+
40
+ ### Date Pickers
41
+
42
+ #### `@mui/x-date-pickers@v6.10.1`
43
+
44
+ - [fields] Fix `format` and `value` update order (#9715) @LukasTy
45
+ - [pickers] Remove `require` usage in comment (#9675) @LukasTy
46
+
47
+ #### `@mui/x-date-pickers-pro@v6.10.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
48
+
49
+ Same changes as in `@mui/x-date-pickers@v6.10.1`.
50
+
51
+ ### Charts / `@mui/x-charts@v6.0.0-alpha.4`
52
+
53
+ - [charts] Fix blinking in responsive charts and extremums computation for line charts (#9734) @alexfauquette
54
+ - [charts] Use ESM with imports (#9645) @alexfauquette
55
+
56
+ ### Docs
57
+
58
+ - [docs] Add additional note for license key installation on Next.js (#9575) @joserodolfofreitas
59
+ - [docs] Add paragraph about managing focus of custom edit components (#9658) @m4theushw
60
+ - [docs] Add unsorted icon slot to the custom sort icons demo (#9169) @d4rekanguok
61
+ - [docs] Disable ad for onboarding pages (#9700) @oliviertassinari
62
+ - [docs] Disabling ads without toolbar has no effect @oliviertassinari
63
+ - [docs] Fix Date Pickers usage to Title Case (#9680) @richbustos
64
+ - [docs] Fix sorting in `CustomSortIcons` demo (#9656) @MBilalShafi
65
+ - [docs] Improve the UI for pickers introduction (#9644) @alexfauquette
66
+ - [docs] Improve the demo design @oliviertassinari
67
+ - [docs] Localization progress, polish (#9672) @oliviertassinari
68
+ - [docs] Normalize the WIP items (#9671) @oliviertassinari
69
+
70
+ ### Core
71
+
72
+ - [core] Add `validate` command (#9714) @romgrk
73
+ - [CHANGELOG] Update generator to new format @oliviertassinari
74
+
6
75
  ## 6.10.0
7
76
 
8
77
  _Jul 13, 2023_
@@ -26,11 +95,11 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
26
95
  - [DataGrid] Make `rowExpansionChange` event public (#9611) @MBilalShafi
27
96
  - [l10n] Improve Polish (pl-PL) locale (#9625) @ch1llysense
28
97
 
29
- #### `@mui/x-data-grid-pro@6.10.0`
98
+ #### `@mui/x-data-grid-pro@6.10.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
30
99
 
31
100
  Same changes as in `@mui/x-data-grid@6.10.0`.
32
101
 
33
- #### `@mui/x-data-grid-premium@6.10.0`
102
+ #### `@mui/x-data-grid-premium@6.10.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link)
34
103
 
35
104
  Same changes as in `@mui/x-data-grid-pro@6.10.0`.
36
105
 
@@ -41,7 +110,7 @@ Same changes as in `@mui/x-data-grid-pro@6.10.0`.
41
110
  - [pickers] Fix date calendar issues (#9652) @LukasTy
42
111
  - [l10n] Improve Norwegian (nb-NO) locale (#9608) @JosteinBrevik
43
112
 
44
- #### `@mui/x-date-pickers-pro@6.10.0`
113
+ #### `@mui/x-date-pickers-pro@6.10.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link)
45
114
 
46
115
  Same changes as in `@mui/x-date-pickers@6.10.0`.
47
116
 
@@ -60,8 +60,8 @@ export const renderDesktopDateTimeView = ({
60
60
  skipDisabled,
61
61
  timeViewsCount
62
62
  }) => {
63
- var _resolveComponentProp, _resolveComponentProp2, _slotProps$actionBar;
64
- const isActionBarVisible = !!((_resolveComponentProp = resolveComponentProps((_slotProps$actionBar = slotProps == null ? void 0 : slotProps.actionBar) != null ? _slotProps$actionBar : componentsProps == null ? void 0 : componentsProps.actionBar, {})) != null && (_resolveComponentProp2 = _resolveComponentProp.actions) != null && _resolveComponentProp2.length);
63
+ var _resolveComponentProp, _slotProps$actionBar;
64
+ const isActionBarVisible = !!((_resolveComponentProp = resolveComponentProps((_slotProps$actionBar = slotProps == null ? void 0 : slotProps.actionBar) != null ? _slotProps$actionBar : componentsProps == null ? void 0 : componentsProps.actionBar, {})) != null && (_resolveComponentProp = _resolveComponentProp.actions) != null && _resolveComponentProp.length);
65
65
  return /*#__PURE__*/_jsxs(React.Fragment, {
66
66
  children: [/*#__PURE__*/_jsxs(DateTimeViewWrapper, {
67
67
  children: [/*#__PURE__*/_jsx(DateCalendar, {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.10.0
2
+ * @mui/x-date-pickers v6.10.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -48,7 +48,7 @@ export const useDesktopPicker = _ref => {
48
48
  const internalInputRef = React.useRef(null);
49
49
  const containerRef = React.useRef(null);
50
50
  const labelId = useId();
51
- const isToolbarHidden = (_innerSlotProps$toolb = innerSlotProps == null ? void 0 : (_innerSlotProps$toolb2 = innerSlotProps.toolbar) == null ? void 0 : _innerSlotProps$toolb2.hidden) != null ? _innerSlotProps$toolb : false;
51
+ const isToolbarHidden = (_innerSlotProps$toolb = innerSlotProps == null || (_innerSlotProps$toolb2 = innerSlotProps.toolbar) == null ? void 0 : _innerSlotProps$toolb2.hidden) != null ? _innerSlotProps$toolb : false;
52
52
  const {
53
53
  open,
54
54
  actions,
@@ -263,6 +263,14 @@ export const useFieldState = params => {
263
263
  const setTempAndroidValueStr = tempValueStrAndroid => setState(prev => _extends({}, prev, {
264
264
  tempValueStrAndroid
265
265
  }));
266
+ React.useEffect(() => {
267
+ const sections = getSectionsFromValue(state.value);
268
+ validateSections(sections, valueType);
269
+ setState(prevState => _extends({}, prevState, {
270
+ sections
271
+ }));
272
+ }, [format, utils.locale]); // eslint-disable-line react-hooks/exhaustive-deps
273
+
266
274
  React.useEffect(() => {
267
275
  let shouldUpdate = false;
268
276
  if (!valueManager.areValuesEqual(utils, state.value, valueFromTheOutside)) {
@@ -279,14 +287,6 @@ export const useFieldState = params => {
279
287
  }
280
288
  }, [valueFromTheOutside]); // eslint-disable-line react-hooks/exhaustive-deps
281
289
 
282
- React.useEffect(() => {
283
- const sections = getSectionsFromValue(state.value);
284
- validateSections(sections, valueType);
285
- setState(prevState => _extends({}, prevState, {
286
- sections
287
- }));
288
- }, [format, utils.locale]); // eslint-disable-line react-hooks/exhaustive-deps
289
-
290
290
  return {
291
291
  state,
292
292
  selectedSectionIndexes,
@@ -43,7 +43,7 @@ export const useMobilePicker = _ref => {
43
43
  const utils = useUtils();
44
44
  const internalInputRef = React.useRef(null);
45
45
  const labelId = useId();
46
- const isToolbarHidden = (_innerSlotProps$toolb = innerSlotProps == null ? void 0 : (_innerSlotProps$toolb2 = innerSlotProps.toolbar) == null ? void 0 : _innerSlotProps$toolb2.hidden) != null ? _innerSlotProps$toolb : false;
46
+ const isToolbarHidden = (_innerSlotProps$toolb = innerSlotProps == null || (_innerSlotProps$toolb2 = innerSlotProps.toolbar) == null ? void 0 : _innerSlotProps$toolb2.hidden) != null ? _innerSlotProps$toolb : false;
47
47
  const {
48
48
  open,
49
49
  actions,
@@ -56,8 +56,8 @@ export const useStaticPicker = _ref => {
56
56
  children: /*#__PURE__*/_jsx(Layout, _extends({}, layoutProps, slotProps == null ? void 0 : slotProps.layout, {
57
57
  slots: slots,
58
58
  slotProps: slotProps,
59
- sx: [...(Array.isArray(sx) ? sx : [sx]), ...(Array.isArray(slotProps == null ? void 0 : (_slotProps$layout = slotProps.layout) == null ? void 0 : _slotProps$layout.sx) ? slotProps.layout.sx : [slotProps == null ? void 0 : (_slotProps$layout2 = slotProps.layout) == null ? void 0 : _slotProps$layout2.sx])],
60
- className: clsx(className, slotProps == null ? void 0 : (_slotProps$layout3 = slotProps.layout) == null ? void 0 : _slotProps$layout3.className),
59
+ sx: [...(Array.isArray(sx) ? sx : [sx]), ...(Array.isArray(slotProps == null || (_slotProps$layout = slotProps.layout) == null ? void 0 : _slotProps$layout.sx) ? slotProps.layout.sx : [slotProps == null || (_slotProps$layout2 = slotProps.layout) == null ? void 0 : _slotProps$layout2.sx])],
60
+ className: clsx(className, slotProps == null || (_slotProps$layout3 = slotProps.layout) == null ? void 0 : _slotProps$layout3.className),
61
61
  ref: ref,
62
62
  children: renderCurrentView()
63
63
  }))
@@ -12,7 +12,7 @@ import { buildWarning } from '../internals/utils/warning';
12
12
  defaultDayjs.extend(customParseFormatPlugin);
13
13
  defaultDayjs.extend(localizedFormatPlugin);
14
14
  defaultDayjs.extend(isBetweenPlugin);
15
- var 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 with `require('dayjs/locale/{localeUsed}')`", 'fallback on English locale']);
15
+ var 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']);
16
16
  var formatTokenMap = {
17
17
  // Year
18
18
  YY: 'year',
@@ -266,14 +266,14 @@ export var AdapterLuxon = /*#__PURE__*/_createClass(function AdapterLuxon() {
266
266
  };
267
267
  /* istanbul ignore next */
268
268
  this.is12HourCycleInCurrentLocale = function () {
269
- var _Intl$DateTimeFormat, _Intl$DateTimeFormat$;
269
+ var _Intl$DateTimeFormat;
270
270
  if (typeof Intl === 'undefined' || typeof Intl.DateTimeFormat === 'undefined') {
271
271
  return true; // Luxon defaults to en-US if Intl not found
272
272
  }
273
273
 
274
274
  return Boolean((_Intl$DateTimeFormat = new Intl.DateTimeFormat(_this.locale, {
275
275
  hour: 'numeric'
276
- })) == null ? void 0 : (_Intl$DateTimeFormat$ = _Intl$DateTimeFormat.resolvedOptions()) == null ? void 0 : _Intl$DateTimeFormat$.hour12);
276
+ })) == null || (_Intl$DateTimeFormat = _Intl$DateTimeFormat.resolvedOptions()) == null ? void 0 : _Intl$DateTimeFormat.hour12);
277
277
  };
278
278
  this.expandFormat = function (format) {
279
279
  // Extract escaped section to avoid extending them
@@ -11,7 +11,7 @@ import { isDatePickerView } from '../internals/utils/date-utils';
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
13
  export var renderDesktopDateTimeView = function renderDesktopDateTimeView(_ref) {
14
- var _resolveComponentProp, _resolveComponentProp2, _slotProps$actionBar;
14
+ var _resolveComponentProp, _slotProps$actionBar;
15
15
  var view = _ref.view,
16
16
  onViewChange = _ref.onViewChange,
17
17
  views = _ref.views,
@@ -61,7 +61,7 @@ export var renderDesktopDateTimeView = function renderDesktopDateTimeView(_ref)
61
61
  timeSteps = _ref.timeSteps,
62
62
  skipDisabled = _ref.skipDisabled,
63
63
  timeViewsCount = _ref.timeViewsCount;
64
- var isActionBarVisible = !!((_resolveComponentProp = resolveComponentProps((_slotProps$actionBar = slotProps == null ? void 0 : slotProps.actionBar) != null ? _slotProps$actionBar : componentsProps == null ? void 0 : componentsProps.actionBar, {})) != null && (_resolveComponentProp2 = _resolveComponentProp.actions) != null && _resolveComponentProp2.length);
64
+ var isActionBarVisible = !!((_resolveComponentProp = resolveComponentProps((_slotProps$actionBar = slotProps == null ? void 0 : slotProps.actionBar) != null ? _slotProps$actionBar : componentsProps == null ? void 0 : componentsProps.actionBar, {})) != null && (_resolveComponentProp = _resolveComponentProp.actions) != null && _resolveComponentProp.length);
65
65
  return /*#__PURE__*/_jsxs(React.Fragment, {
66
66
  children: [/*#__PURE__*/_jsxs(DateTimeViewWrapper, {
67
67
  children: [/*#__PURE__*/_jsx(DateCalendar, {
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.10.0
2
+ * @mui/x-date-pickers v6.10.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -45,7 +45,7 @@ export var useDesktopPicker = function useDesktopPicker(_ref) {
45
45
  var internalInputRef = React.useRef(null);
46
46
  var containerRef = React.useRef(null);
47
47
  var labelId = useId();
48
- var isToolbarHidden = (_innerSlotProps$toolb = innerSlotProps == null ? void 0 : (_innerSlotProps$toolb2 = innerSlotProps.toolbar) == null ? void 0 : _innerSlotProps$toolb2.hidden) != null ? _innerSlotProps$toolb : false;
48
+ var isToolbarHidden = (_innerSlotProps$toolb = innerSlotProps == null || (_innerSlotProps$toolb2 = innerSlotProps.toolbar) == null ? void 0 : _innerSlotProps$toolb2.hidden) != null ? _innerSlotProps$toolb : false;
49
49
  var _usePicker = usePicker(_extends({}, pickerParams, {
50
50
  props: props,
51
51
  inputRef: internalInputRef,
@@ -292,6 +292,16 @@ export var useFieldState = function useFieldState(params) {
292
292
  });
293
293
  });
294
294
  };
295
+ React.useEffect(function () {
296
+ var sections = getSectionsFromValue(state.value);
297
+ validateSections(sections, valueType);
298
+ setState(function (prevState) {
299
+ return _extends({}, prevState, {
300
+ sections: sections
301
+ });
302
+ });
303
+ }, [format, utils.locale]); // eslint-disable-line react-hooks/exhaustive-deps
304
+
295
305
  React.useEffect(function () {
296
306
  var shouldUpdate = false;
297
307
  if (!valueManager.areValuesEqual(utils, state.value, valueFromTheOutside)) {
@@ -310,16 +320,6 @@ export var useFieldState = function useFieldState(params) {
310
320
  }
311
321
  }, [valueFromTheOutside]); // eslint-disable-line react-hooks/exhaustive-deps
312
322
 
313
- React.useEffect(function () {
314
- var sections = getSectionsFromValue(state.value);
315
- validateSections(sections, valueType);
316
- setState(function (prevState) {
317
- return _extends({}, prevState, {
318
- sections: sections
319
- });
320
- });
321
- }, [format, utils.locale]); // eslint-disable-line react-hooks/exhaustive-deps
322
-
323
323
  return {
324
324
  state: state,
325
325
  selectedSectionIndexes: selectedSectionIndexes,
@@ -39,7 +39,7 @@ export var useMobilePicker = function useMobilePicker(_ref) {
39
39
  var utils = useUtils();
40
40
  var internalInputRef = React.useRef(null);
41
41
  var labelId = useId();
42
- var isToolbarHidden = (_innerSlotProps$toolb = innerSlotProps == null ? void 0 : (_innerSlotProps$toolb2 = innerSlotProps.toolbar) == null ? void 0 : _innerSlotProps$toolb2.hidden) != null ? _innerSlotProps$toolb : false;
42
+ var isToolbarHidden = (_innerSlotProps$toolb = innerSlotProps == null || (_innerSlotProps$toolb2 = innerSlotProps.toolbar) == null ? void 0 : _innerSlotProps$toolb2.hidden) != null ? _innerSlotProps$toolb : false;
43
43
  var _usePicker = usePicker(_extends({}, pickerParams, {
44
44
  props: props,
45
45
  inputRef: internalInputRef,
@@ -53,8 +53,8 @@ export var useStaticPicker = function useStaticPicker(_ref2) {
53
53
  children: /*#__PURE__*/_jsx(Layout, _extends({}, layoutProps, slotProps == null ? void 0 : slotProps.layout, {
54
54
  slots: slots,
55
55
  slotProps: slotProps,
56
- sx: [].concat(_toConsumableArray(Array.isArray(sx) ? sx : [sx]), _toConsumableArray(Array.isArray(slotProps == null ? void 0 : (_slotProps$layout = slotProps.layout) == null ? void 0 : _slotProps$layout.sx) ? slotProps.layout.sx : [slotProps == null ? void 0 : (_slotProps$layout2 = slotProps.layout) == null ? void 0 : _slotProps$layout2.sx])),
57
- className: clsx(className, slotProps == null ? void 0 : (_slotProps$layout3 = slotProps.layout) == null ? void 0 : _slotProps$layout3.className),
56
+ sx: [].concat(_toConsumableArray(Array.isArray(sx) ? sx : [sx]), _toConsumableArray(Array.isArray(slotProps == null || (_slotProps$layout = slotProps.layout) == null ? void 0 : _slotProps$layout.sx) ? slotProps.layout.sx : [slotProps == null || (_slotProps$layout2 = slotProps.layout) == null ? void 0 : _slotProps$layout2.sx])),
57
+ className: clsx(className, slotProps == null || (_slotProps$layout3 = slotProps.layout) == null ? void 0 : _slotProps$layout3.className),
58
58
  ref: ref,
59
59
  children: renderCurrentView()
60
60
  }))
@@ -9,7 +9,7 @@ import { buildWarning } from '../internals/utils/warning';
9
9
  defaultDayjs.extend(customParseFormatPlugin);
10
10
  defaultDayjs.extend(localizedFormatPlugin);
11
11
  defaultDayjs.extend(isBetweenPlugin);
12
- 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 with `require('dayjs/locale/{localeUsed}')`", 'fallback on English locale']);
12
+ 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']);
13
13
  const formatTokenMap = {
14
14
  // Year
15
15
  YY: 'year',
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.10.0
2
+ * @mui/x-date-pickers v6.10.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -263,6 +263,14 @@ export const useFieldState = params => {
263
263
  const setTempAndroidValueStr = tempValueStrAndroid => setState(prev => _extends({}, prev, {
264
264
  tempValueStrAndroid
265
265
  }));
266
+ React.useEffect(() => {
267
+ const sections = getSectionsFromValue(state.value);
268
+ validateSections(sections, valueType);
269
+ setState(prevState => _extends({}, prevState, {
270
+ sections
271
+ }));
272
+ }, [format, utils.locale]); // eslint-disable-line react-hooks/exhaustive-deps
273
+
266
274
  React.useEffect(() => {
267
275
  let shouldUpdate = false;
268
276
  if (!valueManager.areValuesEqual(utils, state.value, valueFromTheOutside)) {
@@ -279,14 +287,6 @@ export const useFieldState = params => {
279
287
  }
280
288
  }, [valueFromTheOutside]); // eslint-disable-line react-hooks/exhaustive-deps
281
289
 
282
- React.useEffect(() => {
283
- const sections = getSectionsFromValue(state.value);
284
- validateSections(sections, valueType);
285
- setState(prevState => _extends({}, prevState, {
286
- sections
287
- }));
288
- }, [format, utils.locale]); // eslint-disable-line react-hooks/exhaustive-deps
289
-
290
290
  return {
291
291
  state,
292
292
  selectedSectionIndexes,
@@ -17,7 +17,7 @@ var _warning = require("../internals/utils/warning");
17
17
  _dayjs.default.extend(_customParseFormat.default);
18
18
  _dayjs.default.extend(_localizedFormat.default);
19
19
  _dayjs.default.extend(_isBetween.default);
20
- 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 with `require('dayjs/locale/{localeUsed}')`", 'fallback on English locale']);
20
+ 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']);
21
21
  const formatTokenMap = {
22
22
  // Year
23
23
  YY: 'year',
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.10.0
2
+ * @mui/x-date-pickers v6.10.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -272,6 +272,14 @@ const useFieldState = params => {
272
272
  const setTempAndroidValueStr = tempValueStrAndroid => setState(prev => (0, _extends2.default)({}, prev, {
273
273
  tempValueStrAndroid
274
274
  }));
275
+ React.useEffect(() => {
276
+ const sections = getSectionsFromValue(state.value);
277
+ (0, _useField.validateSections)(sections, valueType);
278
+ setState(prevState => (0, _extends2.default)({}, prevState, {
279
+ sections
280
+ }));
281
+ }, [format, utils.locale]); // eslint-disable-line react-hooks/exhaustive-deps
282
+
275
283
  React.useEffect(() => {
276
284
  let shouldUpdate = false;
277
285
  if (!valueManager.areValuesEqual(utils, state.value, valueFromTheOutside)) {
@@ -288,14 +296,6 @@ const useFieldState = params => {
288
296
  }
289
297
  }, [valueFromTheOutside]); // eslint-disable-line react-hooks/exhaustive-deps
290
298
 
291
- React.useEffect(() => {
292
- const sections = getSectionsFromValue(state.value);
293
- (0, _useField.validateSections)(sections, valueType);
294
- setState(prevState => (0, _extends2.default)({}, prevState, {
295
- sections
296
- }));
297
- }, [format, utils.locale]); // eslint-disable-line react-hooks/exhaustive-deps
298
-
299
299
  return {
300
300
  state,
301
301
  selectedSectionIndexes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers",
3
- "version": "6.10.0",
3
+ "version": "6.10.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,8 +33,8 @@
33
33
  "directory": "packages/x-date-pickers"
34
34
  },
35
35
  "dependencies": {
36
- "@babel/runtime": "^7.22.5",
37
- "@mui/utils": "^5.13.6",
36
+ "@babel/runtime": "^7.22.6",
37
+ "@mui/utils": "^5.13.7",
38
38
  "@types/react-transition-group": "^4.4.6",
39
39
  "clsx": "^1.2.1",
40
40
  "prop-types": "^15.8.1",