@docsvision/material-ui-pickers 3.2.0-beta.27 → 3.2.0-beta.28

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 (35) hide show
  1. package/DatePicker/DatePickerToolbar.js +3 -3
  2. package/DateTimePicker/DateTimePicker.d.ts +2 -2
  3. package/DateTimePicker/DateTimePicker.js +2 -2
  4. package/DateTimePicker/DateTimePickerToolbar.js +4 -4
  5. package/MuiPickersUtilsProvider.d.ts +1 -1
  6. package/Picker/Picker.d.ts +3 -3
  7. package/Picker/Picker.js +1 -1
  8. package/Picker/WrappedPurePicker.js +2 -1
  9. package/TimePicker/TimePicker.d.ts +4 -2
  10. package/TimePicker/TimePicker.js +2 -2
  11. package/TimePicker/TimePickerToolbar.js +3 -3
  12. package/_helpers/date-utils.d.ts +2 -2
  13. package/_helpers/date-utils.js +3 -3
  14. package/_helpers/text-field-helper.d.ts +3 -3
  15. package/_helpers/text-field-helper.js +1 -1
  16. package/_helpers/time-utils.d.ts +2 -2
  17. package/_shared/WithUtils.d.ts +1 -1
  18. package/_shared/hooks/useKeyboardPickerState.js +1 -1
  19. package/_shared/hooks/useUtils.d.ts +2 -2
  20. package/dist/material-ui-pickers.esm.js +1187 -834
  21. package/dist/material-ui-pickers.esm.js.map +1 -1
  22. package/dist/material-ui-pickers.js +1187 -834
  23. package/dist/material-ui-pickers.js.map +1 -1
  24. package/dist/material-ui-pickers.umd.js +1178 -825
  25. package/dist/material-ui-pickers.umd.min.js +1 -1
  26. package/index.d.ts +11 -11
  27. package/package.json +5 -5
  28. package/typings/BasePicker.d.ts +1 -1
  29. package/views/Calendar/Calendar.js +1 -1
  30. package/views/Calendar/CalendarHeader.js +1 -1
  31. package/views/Clock/Clock.js +1 -1
  32. package/views/Clock/ClockNumbers.d.ts +2 -2
  33. package/views/Clock/ClockView.js +1 -1
  34. package/views/Month/MonthView.js +1 -1
  35. package/views/Year/YearView.js +2 -2
@@ -74,8 +74,10 @@
74
74
  return t;
75
75
  }
76
76
 
77
- var MuiPickersContext = React.createContext(null);
78
- var MuiPickersUtilsProvider = function (_a) {
77
+ var MuiPickersContext =
78
+ /*#__PURE__*/
79
+ React.createContext(null);
80
+ var MuiPickersUtilsProvider = function MuiPickersUtilsProvider(_a) {
79
81
  var Utils = _a.utils,
80
82
  children = _a.children,
81
83
  locale = _a.locale,
@@ -86,10 +88,13 @@
86
88
  moment: libInstance
87
89
  });
88
90
  }, [Utils, libInstance, locale]);
89
- return React.createElement(MuiPickersContext.Provider, {
90
- value: utils,
91
- children: children
92
- });
91
+ return (
92
+ /*#__PURE__*/
93
+ React.createElement(MuiPickersContext.Provider, {
94
+ value: utils,
95
+ children: children
96
+ })
97
+ );
93
98
  };
94
99
  MuiPickersUtilsProvider.propTypes = {
95
100
  utils: PropTypes.func.isRequired,
@@ -97,7 +102,7 @@
97
102
  children: PropTypes.oneOfType([PropTypes.element.isRequired, PropTypes.arrayOf(PropTypes.element.isRequired)]).isRequired
98
103
  } ;
99
104
 
100
- var checkUtils = function (utils) {
105
+ var checkUtils = function checkUtils(utils) {
101
106
  if (!utils) {
102
107
  // tslint:disable-next-line
103
108
  throw new Error('Can not find utils in context. You either a) forgot to wrap your component tree in MuiPickersUtilsProvider; or b) mixed named and direct file imports. Recommendation: use named imports from the module index.');
@@ -1398,7 +1403,7 @@
1398
1403
  });
1399
1404
 
1400
1405
  var useStyles = makeStyles(function (theme) {
1401
- var textColor = theme.palette.type === 'light' ? theme.palette.primary.contrastText : theme.palette.getContrastText(theme.palette.background.default);
1406
+ var textColor = theme.palette.type === 'light' ? theme.palette.primary.contrastText : theme.palette.getContrastText(theme.palette.background["default"]);
1402
1407
  return {
1403
1408
  toolbarTxt: {
1404
1409
  color: fade(textColor, 0.54)
@@ -1411,7 +1416,7 @@
1411
1416
  name: 'MuiPickersToolbarText'
1412
1417
  });
1413
1418
 
1414
- var ToolbarText = function (_a) {
1419
+ var ToolbarText = function ToolbarText(_a) {
1415
1420
  var _b;
1416
1421
 
1417
1422
  var selected = _a.selected,
@@ -1421,13 +1426,16 @@
1421
1426
  other = __rest(_a, ["selected", "label", "className"]);
1422
1427
 
1423
1428
  var classes = useStyles();
1424
- return React.createElement(Typography$2, __assign({
1425
- children: label,
1426
- className: clsx(classes.toolbarTxt, className, (_b = {}, _b[classes.toolbarBtnSelected] = selected, _b))
1427
- }, other));
1429
+ return (
1430
+ /*#__PURE__*/
1431
+ React.createElement(Typography$2, __assign({
1432
+ children: label,
1433
+ className: clsx(classes.toolbarTxt, className, (_b = {}, _b[classes.toolbarBtnSelected] = selected, _b))
1434
+ }, other))
1435
+ );
1428
1436
  };
1429
1437
 
1430
- var ToolbarButton = function (_a) {
1438
+ var ToolbarButton = function ToolbarButton(_a) {
1431
1439
  var classes = _a.classes,
1432
1440
  _b = _a.className,
1433
1441
  className = _b === void 0 ? null : _b,
@@ -1438,16 +1446,21 @@
1438
1446
  typographyClassName = _a.typographyClassName,
1439
1447
  other = __rest(_a, ["classes", "className", "label", "selected", "variant", "align", "typographyClassName"]);
1440
1448
 
1441
- return React.createElement(Button$2, __assign({
1442
- variant: "text",
1443
- className: clsx(classes.toolbarBtn, className)
1444
- }, other), React.createElement(ToolbarText, {
1445
- align: align,
1446
- className: typographyClassName,
1447
- variant: variant,
1448
- label: label,
1449
- selected: selected
1450
- }));
1449
+ return (
1450
+ /*#__PURE__*/
1451
+ React.createElement(Button$2, __assign({
1452
+ variant: "text",
1453
+ className: clsx(classes.toolbarBtn, className)
1454
+ }, other),
1455
+ /*#__PURE__*/
1456
+ React.createElement(ToolbarText, {
1457
+ align: align,
1458
+ className: typographyClassName,
1459
+ variant: variant,
1460
+ label: label,
1461
+ selected: selected
1462
+ }))
1463
+ );
1451
1464
  };
1452
1465
 
1453
1466
  ToolbarButton.propTypes = {
@@ -1479,7 +1492,7 @@
1479
1492
  alignItems: 'center',
1480
1493
  justifyContent: 'center',
1481
1494
  height: 100,
1482
- backgroundColor: theme.palette.type === 'light' ? theme.palette.primary.main : theme.palette.background.default
1495
+ backgroundColor: theme.palette.type === 'light' ? theme.palette.primary.main : theme.palette.background["default"]
1483
1496
  },
1484
1497
  toolbarLandscape: {
1485
1498
  height: 'auto',
@@ -1492,7 +1505,7 @@
1492
1505
  name: 'MuiPickersToolbar'
1493
1506
  });
1494
1507
 
1495
- var PickerToolbar = function (_a) {
1508
+ var PickerToolbar = function PickerToolbar(_a) {
1496
1509
  var _b;
1497
1510
 
1498
1511
  var children = _a.children,
@@ -1502,9 +1515,12 @@
1502
1515
  other = __rest(_a, ["children", "isLandscape", "className"]);
1503
1516
 
1504
1517
  var classes = useStyles$1();
1505
- return React.createElement(Toolbar$2, __assign({
1506
- className: clsx(classes.toolbar, (_b = {}, _b[classes.toolbarLandscape] = isLandscape, _b), className)
1507
- }, other), children);
1518
+ return (
1519
+ /*#__PURE__*/
1520
+ React.createElement(Toolbar$2, __assign({
1521
+ className: clsx(classes.toolbar, (_b = {}, _b[classes.toolbarLandscape] = isLandscape, _b), className)
1522
+ }, other), children)
1523
+ );
1508
1524
  };
1509
1525
 
1510
1526
  /** Use it instead of .includes method for IE support */
@@ -1518,7 +1534,7 @@
1518
1534
  return array.indexOf(itemOrItems) !== -1;
1519
1535
  }
1520
1536
 
1521
- var findClosestEnabledDate = function (_a) {
1537
+ var findClosestEnabledDate = function findClosestEnabledDate(_a) {
1522
1538
  var date = _a.date,
1523
1539
  utils = _a.utils,
1524
1540
  minDate = _a.minDate,
@@ -1580,22 +1596,22 @@
1580
1596
 
1581
1597
  return null;
1582
1598
  };
1583
- var isYearOnlyView = function (views) {
1599
+ var isYearOnlyView = function isYearOnlyView(views) {
1584
1600
  return views.length === 1 && views[0] === 'year';
1585
1601
  };
1586
- var isYearAndMonthViews = function (views) {
1602
+ var isYearAndMonthViews = function isYearAndMonthViews(views) {
1587
1603
  return views.length === 2 && arrayIncludes(views, 'month') && arrayIncludes(views, 'year');
1588
1604
  };
1589
- var getFormatByViews = function (views, utils) {
1605
+ var getFormatByViews = function getFormatByViews(views, utils) {
1590
1606
  if (isYearOnlyView(views)) {
1591
- return utils.yearFormat;
1607
+ return utils.formats.year;
1592
1608
  }
1593
1609
 
1594
1610
  if (isYearAndMonthViews(views)) {
1595
- return utils.yearMonthFormat;
1611
+ return utils.formats.monthAndYear;
1596
1612
  }
1597
1613
 
1598
- return utils.dateFormat;
1614
+ return utils.formats.monthAndDate;
1599
1615
  };
1600
1616
 
1601
1617
  var useStyles$2 = makeStyles({
@@ -1612,7 +1628,7 @@
1612
1628
  }, {
1613
1629
  name: 'MuiPickersDatePickerRoot'
1614
1630
  });
1615
- var DatePickerToolbar = function (_a) {
1631
+ var DatePickerToolbar = function DatePickerToolbar(_a) {
1616
1632
  var _b, _c;
1617
1633
 
1618
1634
  var date = _a.date,
@@ -1628,33 +1644,42 @@
1628
1644
  var isYearAndMonth = React.useMemo(function () {
1629
1645
  return isYearAndMonthViews(views);
1630
1646
  }, [views]);
1631
- return React.createElement(PickerToolbar, {
1632
- isLandscape: isLandscape,
1633
- className: clsx((_b = {}, _b[classes.toolbar] = !isYearOnly, _b[classes.toolbarLandscape] = isLandscape, _b))
1634
- }, React.createElement(ToolbarButton$1, {
1635
- variant: isYearOnly ? 'h3' : 'subtitle1',
1636
- onClick: function () {
1637
- return setOpenView('year');
1638
- },
1639
- selected: openView === 'year',
1640
- label: utils.getYearText(date)
1641
- }), !isYearOnly && !isYearAndMonth && React.createElement(ToolbarButton$1, {
1642
- variant: "h4",
1643
- selected: openView === 'date',
1644
- onClick: function () {
1645
- return setOpenView('date');
1646
- },
1647
- align: isLandscape ? 'left' : 'center',
1648
- label: utils.getDatePickerHeaderText(date),
1649
- className: clsx((_c = {}, _c[classes.dateLandscape] = isLandscape, _c))
1650
- }), isYearAndMonth && React.createElement(ToolbarButton$1, {
1651
- variant: "h4",
1652
- onClick: function () {
1653
- return setOpenView('month');
1654
- },
1655
- selected: openView === 'month',
1656
- label: utils.getMonthText(date)
1657
- }));
1647
+ return (
1648
+ /*#__PURE__*/
1649
+ React.createElement(PickerToolbar, {
1650
+ isLandscape: isLandscape,
1651
+ className: clsx((_b = {}, _b[classes.toolbar] = !isYearOnly, _b[classes.toolbarLandscape] = isLandscape, _b))
1652
+ },
1653
+ /*#__PURE__*/
1654
+ React.createElement(ToolbarButton$1, {
1655
+ variant: isYearOnly ? 'h3' : 'subtitle1',
1656
+ onClick: function onClick() {
1657
+ return setOpenView('year');
1658
+ },
1659
+ selected: openView === 'year',
1660
+ label: utils.formatByString(date, utils.formats.year)
1661
+ }), !isYearOnly && !isYearAndMonth &&
1662
+ /*#__PURE__*/
1663
+ React.createElement(ToolbarButton$1, {
1664
+ variant: "h4",
1665
+ selected: openView === 'date',
1666
+ onClick: function onClick() {
1667
+ return setOpenView('date');
1668
+ },
1669
+ align: isLandscape ? 'left' : 'center',
1670
+ label: utils.formatByString(date, utils.formats.normalDateWithWeekday),
1671
+ className: clsx((_c = {}, _c[classes.dateLandscape] = isLandscape, _c))
1672
+ }), isYearAndMonth &&
1673
+ /*#__PURE__*/
1674
+ React.createElement(ToolbarButton$1, {
1675
+ variant: "h4",
1676
+ onClick: function onClick() {
1677
+ return setOpenView('month');
1678
+ },
1679
+ selected: openView === 'month',
1680
+ label: utils.formatByString(date, utils.formats.month)
1681
+ }))
1682
+ );
1658
1683
  };
1659
1684
 
1660
1685
  var date = PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.number, PropTypes.instanceOf(Date)]);
@@ -1712,7 +1737,7 @@
1712
1737
  }, {
1713
1738
  name: 'MuiPickersDay'
1714
1739
  });
1715
- var Day = function (_a) {
1740
+ var Day = function Day(_a) {
1716
1741
  var _b;
1717
1742
 
1718
1743
  var children = _a.children,
@@ -1724,13 +1749,18 @@
1724
1749
 
1725
1750
  var classes = useStyles$3();
1726
1751
  var className = clsx(classes.day, (_b = {}, _b[classes.hidden] = hidden, _b[classes.current] = current, _b[classes.daySelected] = selected, _b[classes.dayDisabled] = disabled, _b));
1727
- return React.createElement(IconButton$2, __assign({
1728
- className: className,
1729
- tabIndex: hidden || disabled ? -1 : 0
1730
- }, other), React.createElement(Typography$2, {
1731
- variant: "body2",
1732
- color: "inherit"
1733
- }, children));
1752
+ return (
1753
+ /*#__PURE__*/
1754
+ React.createElement(IconButton$2, __assign({
1755
+ className: className,
1756
+ tabIndex: hidden || disabled ? -1 : 0
1757
+ }, other),
1758
+ /*#__PURE__*/
1759
+ React.createElement(Typography$2, {
1760
+ variant: "body2",
1761
+ color: "inherit"
1762
+ }, children))
1763
+ );
1734
1764
  };
1735
1765
  Day.displayName = 'Day';
1736
1766
  Day.propTypes = {
@@ -1746,7 +1776,7 @@
1746
1776
  selected: false
1747
1777
  };
1748
1778
 
1749
- var DayWrapper = function (_a) {
1779
+ var DayWrapper = function DayWrapper(_a) {
1750
1780
  var children = _a.children,
1751
1781
  value = _a.value,
1752
1782
  disabled = _a.disabled,
@@ -1757,11 +1787,14 @@
1757
1787
  var handleClick = React.useCallback(function () {
1758
1788
  return onSelect(value);
1759
1789
  }, [onSelect, value]);
1760
- return React.createElement("div", __assign({
1761
- role: "presentation",
1762
- onClick: dayInCurrentMonth && !disabled ? handleClick : undefined,
1763
- onKeyPress: dayInCurrentMonth && !disabled ? handleClick : undefined
1764
- }, other), children);
1790
+ return (
1791
+ /*#__PURE__*/
1792
+ React.createElement("div", __assign({
1793
+ role: "presentation",
1794
+ onClick: dayInCurrentMonth && !disabled ? handleClick : undefined,
1795
+ onKeyPress: dayInCurrentMonth && !disabled ? handleClick : undefined
1796
+ }, other), children)
1797
+ );
1765
1798
  };
1766
1799
 
1767
1800
  function _inheritsLoose(subClass, superClass) {
@@ -3471,7 +3504,7 @@
3471
3504
  name: 'MuiPickersSlideTransition'
3472
3505
  });
3473
3506
 
3474
- var SlideTransition = function (_a) {
3507
+ var SlideTransition = function SlideTransition(_a) {
3475
3508
  var children = _a.children,
3476
3509
  transKey = _a.transKey,
3477
3510
  slideDirection = _a.slideDirection,
@@ -3486,39 +3519,61 @@
3486
3519
  // @ts-ignore
3487
3520
  exitActive: classes['slideExitActiveLeft-' + slideDirection]
3488
3521
  };
3489
- return React.createElement(TransitionGroup, {
3490
- className: clsx(classes.transitionContainer, className),
3491
- childFactory: function (element) {
3492
- return React.cloneElement(element, {
3493
- classNames: transitionClasses
3494
- });
3495
- }
3496
- }, React.createElement(CSSTransition, {
3497
- mountOnEnter: true,
3498
- unmountOnExit: true,
3499
- key: transKey + slideDirection,
3500
- timeout: animationDuration,
3501
- classNames: transitionClasses,
3502
- children: children
3503
- }));
3522
+ return (
3523
+ /*#__PURE__*/
3524
+ React.createElement(TransitionGroup, {
3525
+ className: clsx(classes.transitionContainer, className),
3526
+ childFactory: function childFactory(element) {
3527
+ return (
3528
+ /*#__PURE__*/
3529
+ React.cloneElement(element, {
3530
+ classNames: transitionClasses
3531
+ })
3532
+ );
3533
+ }
3534
+ },
3535
+ /*#__PURE__*/
3536
+ React.createElement(CSSTransition, {
3537
+ mountOnEnter: true,
3538
+ unmountOnExit: true,
3539
+ key: transKey + slideDirection,
3540
+ timeout: animationDuration,
3541
+ classNames: transitionClasses,
3542
+ children: children
3543
+ }))
3544
+ );
3504
3545
  };
3505
3546
 
3506
- var ArrowLeftIcon = function (props) {
3507
- return React__default.createElement(SvgIcon$2, __assign({}, props), React__default.createElement("path", {
3508
- d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"
3509
- }), React__default.createElement("path", {
3510
- fill: "none",
3511
- d: "M0 0h24v24H0V0z"
3512
- }));
3547
+ var ArrowLeftIcon = function ArrowLeftIcon(props) {
3548
+ return (
3549
+ /*#__PURE__*/
3550
+ React__default.createElement(SvgIcon$2, __assign({}, props),
3551
+ /*#__PURE__*/
3552
+ React__default.createElement("path", {
3553
+ d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"
3554
+ }),
3555
+ /*#__PURE__*/
3556
+ React__default.createElement("path", {
3557
+ fill: "none",
3558
+ d: "M0 0h24v24H0V0z"
3559
+ }))
3560
+ );
3513
3561
  };
3514
3562
 
3515
- var ArrowRightIcon = function (props) {
3516
- return React__default.createElement(SvgIcon$2, __assign({}, props), React__default.createElement("path", {
3517
- d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
3518
- }), React__default.createElement("path", {
3519
- fill: "none",
3520
- d: "M0 0h24v24H0V0z"
3521
- }));
3563
+ var ArrowRightIcon = function ArrowRightIcon(props) {
3564
+ return (
3565
+ /*#__PURE__*/
3566
+ React__default.createElement(SvgIcon$2, __assign({}, props),
3567
+ /*#__PURE__*/
3568
+ React__default.createElement("path", {
3569
+ d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
3570
+ }),
3571
+ /*#__PURE__*/
3572
+ React__default.createElement("path", {
3573
+ fill: "none",
3574
+ d: "M0 0h24v24H0V0z"
3575
+ }))
3576
+ );
3522
3577
  };
3523
3578
 
3524
3579
  var useStyles$5 = makeStyles(function (theme) {
@@ -3555,7 +3610,7 @@
3555
3610
  }, {
3556
3611
  name: 'MuiPickersCalendarHeader'
3557
3612
  });
3558
- var CalendarHeader = function (_a) {
3613
+ var CalendarHeader = function CalendarHeader(_a) {
3559
3614
  var currentMonth = _a.currentMonth,
3560
3615
  onMonthChange = _a.onMonthChange,
3561
3616
  leftArrowIcon = _a.leftArrowIcon,
@@ -3570,40 +3625,58 @@
3570
3625
  var theme = useTheme();
3571
3626
  var rtl = theme.direction === 'rtl';
3572
3627
 
3573
- var selectNextMonth = function () {
3628
+ var selectNextMonth = function selectNextMonth() {
3574
3629
  return onMonthChange(utils.getNextMonth(currentMonth), 'left');
3575
3630
  };
3576
3631
 
3577
- var selectPreviousMonth = function () {
3632
+ var selectPreviousMonth = function selectPreviousMonth() {
3578
3633
  return onMonthChange(utils.getPreviousMonth(currentMonth), 'right');
3579
3634
  };
3580
3635
 
3581
- return React.createElement("div", null, React.createElement("div", {
3582
- className: classes.switchHeader
3583
- }, React.createElement(IconButton$2, __assign({}, leftArrowButtonProps, {
3584
- disabled: disablePrevMonth,
3585
- onClick: selectPreviousMonth,
3586
- className: classes.iconButton
3587
- }), rtl ? rightArrowIcon : leftArrowIcon), React.createElement(SlideTransition, {
3588
- slideDirection: slideDirection,
3589
- transKey: currentMonth.toString(),
3590
- className: classes.transitionContainer
3591
- }, React.createElement(Typography$2, {
3592
- align: "center",
3593
- variant: "body1"
3594
- }, utils.getCalendarHeaderText(currentMonth))), React.createElement(IconButton$2, __assign({}, rightArrowButtonProps, {
3595
- disabled: disableNextMonth,
3596
- onClick: selectNextMonth,
3597
- className: classes.iconButton
3598
- }), rtl ? leftArrowIcon : rightArrowIcon)), React.createElement("div", {
3599
- className: classes.daysHeader
3600
- }, utils.getWeekdays().map(function (day, index) {
3601
- return React.createElement(Typography$2, {
3602
- key: index,
3603
- variant: "caption",
3604
- className: classes.dayLabel
3605
- }, day);
3606
- })));
3636
+ return (
3637
+ /*#__PURE__*/
3638
+ React.createElement("div", null,
3639
+ /*#__PURE__*/
3640
+ React.createElement("div", {
3641
+ className: classes.switchHeader
3642
+ },
3643
+ /*#__PURE__*/
3644
+ React.createElement(IconButton$2, __assign({}, leftArrowButtonProps, {
3645
+ disabled: disablePrevMonth,
3646
+ onClick: selectPreviousMonth,
3647
+ className: classes.iconButton
3648
+ }), rtl ? rightArrowIcon : leftArrowIcon),
3649
+ /*#__PURE__*/
3650
+ React.createElement(SlideTransition, {
3651
+ slideDirection: slideDirection,
3652
+ transKey: currentMonth.toString(),
3653
+ className: classes.transitionContainer
3654
+ },
3655
+ /*#__PURE__*/
3656
+ React.createElement(Typography$2, {
3657
+ align: "center",
3658
+ variant: "body1"
3659
+ }, utils.formatByString(currentMonth, utils.formats.monthAndYear))),
3660
+ /*#__PURE__*/
3661
+ React.createElement(IconButton$2, __assign({}, rightArrowButtonProps, {
3662
+ disabled: disableNextMonth,
3663
+ onClick: selectNextMonth,
3664
+ className: classes.iconButton
3665
+ }), rtl ? leftArrowIcon : rightArrowIcon)),
3666
+ /*#__PURE__*/
3667
+ React.createElement("div", {
3668
+ className: classes.daysHeader
3669
+ }, utils.getWeekdays().map(function (day, index) {
3670
+ return (
3671
+ /*#__PURE__*/
3672
+ React.createElement(Typography$2, {
3673
+ key: index,
3674
+ variant: "caption",
3675
+ className: classes.dayLabel
3676
+ }, day)
3677
+ );
3678
+ })))
3679
+ );
3607
3680
  };
3608
3681
  CalendarHeader.displayName = 'CalendarHeader';
3609
3682
  CalendarHeader.propTypes = {
@@ -3613,8 +3686,12 @@
3613
3686
  disableNextMonth: PropTypes.bool
3614
3687
  } ;
3615
3688
  CalendarHeader.defaultProps = {
3616
- leftArrowIcon: React.createElement(ArrowLeftIcon, null),
3617
- rightArrowIcon: React.createElement(ArrowRightIcon, null),
3689
+ leftArrowIcon:
3690
+ /*#__PURE__*/
3691
+ React.createElement(ArrowLeftIcon, null),
3692
+ rightArrowIcon:
3693
+ /*#__PURE__*/
3694
+ React.createElement(ArrowRightIcon, null),
3618
3695
  disablePrevMonth: false,
3619
3696
  disableNextMonth: false
3620
3697
  };
@@ -4408,7 +4485,7 @@
4408
4485
  });
4409
4486
  React.useEffect(function () {
4410
4487
  if (active) {
4411
- var handleKeyDown_1 = function (event) {
4488
+ var handleKeyDown_1 = function handleKeyDown_1(event) {
4412
4489
  runKeyHandler(event, keyHandlers);
4413
4490
  };
4414
4491
 
@@ -4420,13 +4497,16 @@
4420
4497
  }, [active, keyHandlers]);
4421
4498
  }
4422
4499
 
4423
- var withUtils = function () {
4500
+ var withUtils = function withUtils() {
4424
4501
  return function (Component) {
4425
- var WithUtils = function (props) {
4502
+ var WithUtils = function WithUtils(props) {
4426
4503
  var utils = useUtils();
4427
- return React.createElement(Component, __assign({
4428
- utils: utils
4429
- }, props));
4504
+ return (
4505
+ /*#__PURE__*/
4506
+ React.createElement(Component, __assign({
4507
+ utils: utils
4508
+ }, props))
4509
+ );
4430
4510
  };
4431
4511
 
4432
4512
  WithUtils.displayName = "WithUtils(" + (Component.displayName || Component.name) + ")";
@@ -4434,7 +4514,7 @@
4434
4514
  };
4435
4515
  };
4436
4516
 
4437
- var KeyDownListener = function (_a) {
4517
+ var KeyDownListener = function KeyDownListener(_a) {
4438
4518
  var onKeyDown = _a.onKeyDown;
4439
4519
  React.useEffect(function () {
4440
4520
  window.addEventListener('keydown', onKeyDown);
@@ -4562,16 +4642,16 @@
4562
4642
  date = _a.date,
4563
4643
  utils = _a.utils;
4564
4644
  runKeyHandler(event, {
4565
- ArrowUp: function () {
4645
+ ArrowUp: function ArrowUp() {
4566
4646
  return _this.moveToDay(utils.addDays(date, -7));
4567
4647
  },
4568
- ArrowDown: function () {
4648
+ ArrowDown: function ArrowDown() {
4569
4649
  return _this.moveToDay(utils.addDays(date, 7));
4570
4650
  },
4571
- ArrowLeft: function () {
4651
+ ArrowLeft: function ArrowLeft() {
4572
4652
  return _this.moveToDay(utils.addDays(date, theme.direction === 'ltr' ? -1 : 1));
4573
4653
  },
4574
- ArrowRight: function () {
4654
+ ArrowRight: function ArrowRight() {
4575
4655
  return _this.moveToDay(utils.addDays(date, theme.direction === 'ltr' ? 1 : -1));
4576
4656
  }
4577
4657
  });
@@ -4583,10 +4663,13 @@
4583
4663
  classes = _a.classes;
4584
4664
  var weeks = utils.getWeekArray(_this.state.currentMonth);
4585
4665
  return weeks.map(function (week) {
4586
- return React.createElement("div", {
4587
- key: "week-" + week[0].toString(),
4588
- className: classes.week
4589
- }, _this.renderDays(week));
4666
+ return (
4667
+ /*#__PURE__*/
4668
+ React.createElement("div", {
4669
+ key: "week-" + week[0].toString(),
4670
+ className: classes.week
4671
+ }, _this.renderDays(week))
4672
+ );
4590
4673
  });
4591
4674
  };
4592
4675
 
@@ -4602,24 +4685,29 @@
4602
4685
  var disabled = _this.shouldDisableDate(day);
4603
4686
 
4604
4687
  var isDayInCurrentMonth = utils.getMonth(day) === currentMonthNumber;
4605
- var dayComponent = React.createElement(Day, {
4688
+ var dayComponent =
4689
+ /*#__PURE__*/
4690
+ React.createElement(Day, {
4606
4691
  disabled: disabled,
4607
4692
  current: utils.isSameDay(day, now),
4608
4693
  hidden: !isDayInCurrentMonth,
4609
4694
  selected: utils.isSameDay(selectedDate, day)
4610
- }, utils.getDayText(day));
4695
+ }, utils.formatByString(day, utils.formats.dayOfMonth));
4611
4696
 
4612
4697
  if (renderDay) {
4613
4698
  dayComponent = renderDay(day, selectedDate, isDayInCurrentMonth, dayComponent);
4614
4699
  }
4615
4700
 
4616
- return React.createElement(DayWrapper, {
4617
- value: day,
4618
- key: day.toString(),
4619
- disabled: disabled,
4620
- dayInCurrentMonth: isDayInCurrentMonth,
4621
- onSelect: _this.handleDaySelect
4622
- }, dayComponent);
4701
+ return (
4702
+ /*#__PURE__*/
4703
+ React.createElement(DayWrapper, {
4704
+ value: day,
4705
+ key: day.toString(),
4706
+ disabled: disabled,
4707
+ dayInCurrentMonth: isDayInCurrentMonth,
4708
+ onSelect: _this.handleDaySelect
4709
+ }, dayComponent)
4710
+ );
4623
4711
  });
4624
4712
  };
4625
4713
 
@@ -4680,26 +4768,43 @@
4680
4768
  rightArrowButtonProps = _b.rightArrowButtonProps,
4681
4769
  rightArrowIcon = _b.rightArrowIcon,
4682
4770
  loadingIndicator = _b.loadingIndicator;
4683
- var loadingElement = loadingIndicator ? loadingIndicator : React.createElement(CircularProgress$1, null);
4684
- return React.createElement(React.Fragment, null, allowKeyboardControl && React.createElement(KeyDownListener, {
4685
- onKeyDown: this.handleKeyDown
4686
- }), React.createElement(CalendarHeader, {
4687
- currentMonth: currentMonth,
4688
- slideDirection: slideDirection,
4689
- onMonthChange: this.handleChangeMonth,
4690
- leftArrowIcon: leftArrowIcon,
4691
- leftArrowButtonProps: leftArrowButtonProps,
4692
- rightArrowIcon: rightArrowIcon,
4693
- rightArrowButtonProps: rightArrowButtonProps,
4694
- disablePrevMonth: this.shouldDisablePrevMonth(),
4695
- disableNextMonth: this.shouldDisableNextMonth()
4696
- }), React.createElement(SlideTransition, {
4697
- slideDirection: slideDirection,
4698
- transKey: currentMonth.toString(),
4699
- className: classes.transitionContainer
4700
- }, React.createElement(React.Fragment, null, this.state.loadingQueue > 0 && React.createElement("div", {
4701
- className: classes.progressContainer
4702
- }, loadingElement) || React.createElement("div", null, this.renderWeeks()))));
4771
+ var loadingElement = loadingIndicator ? loadingIndicator :
4772
+ /*#__PURE__*/
4773
+ React.createElement(CircularProgress$1, null);
4774
+ return (
4775
+ /*#__PURE__*/
4776
+ React.createElement(React.Fragment, null, allowKeyboardControl &&
4777
+ /*#__PURE__*/
4778
+ React.createElement(KeyDownListener, {
4779
+ onKeyDown: this.handleKeyDown
4780
+ }),
4781
+ /*#__PURE__*/
4782
+ React.createElement(CalendarHeader, {
4783
+ currentMonth: currentMonth,
4784
+ slideDirection: slideDirection,
4785
+ onMonthChange: this.handleChangeMonth,
4786
+ leftArrowIcon: leftArrowIcon,
4787
+ leftArrowButtonProps: leftArrowButtonProps,
4788
+ rightArrowIcon: rightArrowIcon,
4789
+ rightArrowButtonProps: rightArrowButtonProps,
4790
+ disablePrevMonth: this.shouldDisablePrevMonth(),
4791
+ disableNextMonth: this.shouldDisableNextMonth()
4792
+ }),
4793
+ /*#__PURE__*/
4794
+ React.createElement(SlideTransition, {
4795
+ slideDirection: slideDirection,
4796
+ transKey: currentMonth.toString(),
4797
+ className: classes.transitionContainer
4798
+ },
4799
+ /*#__PURE__*/
4800
+ React.createElement(React.Fragment, null, this.state.loadingQueue > 0 &&
4801
+ /*#__PURE__*/
4802
+ React.createElement("div", {
4803
+ className: classes.progressContainer
4804
+ }, loadingElement) ||
4805
+ /*#__PURE__*/
4806
+ React.createElement("div", null, this.renderWeeks()))))
4807
+ );
4703
4808
  };
4704
4809
 
4705
4810
  Calendar.propTypes = {
@@ -4716,7 +4821,7 @@
4716
4821
  };
4717
4822
  return Calendar;
4718
4823
  }(React.Component);
4719
- var styles$2 = function (theme) {
4824
+ var styles$2 = function styles(theme) {
4720
4825
  return {
4721
4826
  transitionContainer: {
4722
4827
  minHeight: 36 * 6,
@@ -4790,7 +4895,7 @@
4790
4895
  }, {
4791
4896
  name: 'MuiPickersYear'
4792
4897
  });
4793
- var Year = function (_a) {
4898
+ var Year = function Year(_a) {
4794
4899
  var _b;
4795
4900
 
4796
4901
  var onSelect = _a.onSelect,
@@ -4805,24 +4910,31 @@
4805
4910
  var handleClick = React.useCallback(function () {
4806
4911
  return onSelect(value);
4807
4912
  }, [onSelect, value]);
4808
- return React.createElement(Typography$2, __assign({
4809
- role: "button",
4810
- component: "div",
4811
- tabIndex: disabled ? -1 : 0,
4812
- onClick: handleClick,
4813
- onKeyPress: handleClick,
4814
- color: selected ? 'primary' : undefined,
4815
- variant: selected ? 'h5' : 'subtitle1',
4816
- children: children,
4817
- ref: forwardedRef,
4818
- className: clsx(classes.root, (_b = {}, _b[classes.yearSelected] = selected, _b[classes.yearDisabled] = disabled, _b))
4819
- }, other));
4913
+ return (
4914
+ /*#__PURE__*/
4915
+ React.createElement(Typography$2, __assign({
4916
+ role: "button",
4917
+ component: "div",
4918
+ tabIndex: disabled ? -1 : 0,
4919
+ onClick: handleClick,
4920
+ onKeyPress: handleClick,
4921
+ color: selected ? 'primary' : undefined,
4922
+ variant: selected ? 'h5' : 'subtitle1',
4923
+ children: children,
4924
+ ref: forwardedRef,
4925
+ className: clsx(classes.root, (_b = {}, _b[classes.yearSelected] = selected, _b[classes.yearDisabled] = disabled, _b))
4926
+ }, other))
4927
+ );
4820
4928
  };
4821
4929
  Year.displayName = 'Year';
4822
- var Year$1 = React.forwardRef(function (props, ref) {
4823
- return React.createElement(Year, __assign({}, props, {
4824
- forwardedRef: ref
4825
- }));
4930
+ var Year$1 = /*#__PURE__*/
4931
+ React.forwardRef(function (props, ref) {
4932
+ return (
4933
+ /*#__PURE__*/
4934
+ React.createElement(Year, __assign({}, props, {
4935
+ forwardedRef: ref
4936
+ }))
4937
+ );
4826
4938
  });
4827
4939
 
4828
4940
  var styles$3 = function styles(theme) {
@@ -31583,16 +31695,19 @@
31583
31695
  }, {
31584
31696
  name: 'MuiPickersStaticWrapper'
31585
31697
  });
31586
- var StaticWrapper = function (_a) {
31698
+ var StaticWrapper = function StaticWrapper(_a) {
31587
31699
  var children = _a.children;
31588
31700
  var classes = useStyles$8();
31589
- return React.createElement("div", {
31590
- className: classes.staticWrapperRoot,
31591
- children: children
31592
- });
31701
+ return (
31702
+ /*#__PURE__*/
31703
+ React.createElement("div", {
31704
+ className: classes.staticWrapperRoot,
31705
+ children: children
31706
+ })
31707
+ );
31593
31708
  };
31594
31709
 
31595
- var ModalDialog = function (_a) {
31710
+ var ModalDialog = function ModalDialog(_a) {
31596
31711
  var _b, _c;
31597
31712
 
31598
31713
  var children = _a.children,
@@ -31611,32 +31726,47 @@
31611
31726
  wider = _a.wider,
31612
31727
  other = __rest(_a, ["children", "classes", "onAccept", "onDismiss", "onClear", "onSetToday", "okLabel", "cancelLabel", "clearLabel", "todayLabel", "clearable", "showTodayButton", "showTabs", "wider"]);
31613
31728
 
31614
- return React.createElement(Dialog$1, __assign({
31615
- role: "dialog",
31616
- onClose: onDismiss,
31617
- classes: {
31618
- paper: clsx(classes.dialogRoot, (_b = {}, _b[classes.dialogRootWider] = wider, _b))
31619
- }
31620
- }, other), React.createElement(DialogContent$1, {
31621
- children: children,
31622
- className: classes.dialog
31623
- }), React.createElement(DialogActions$2, {
31624
- classes: {
31625
- root: clsx((_c = {}, _c[classes.withAdditionalAction] = clearable || showTodayButton, _c))
31626
- }
31627
- }, clearable && React.createElement(Button$2, {
31628
- color: "primary",
31629
- onClick: onClear
31630
- }, clearLabel), !clearable && showTodayButton && React.createElement(Button$2, {
31631
- color: "primary",
31632
- onClick: onSetToday
31633
- }, todayLabel), cancelLabel && React.createElement(Button$2, {
31634
- color: "primary",
31635
- onClick: onDismiss
31636
- }, cancelLabel), okLabel && React.createElement(Button$2, {
31637
- color: "primary",
31638
- onClick: onAccept
31639
- }, okLabel)));
31729
+ return (
31730
+ /*#__PURE__*/
31731
+ React.createElement(Dialog$1, __assign({
31732
+ role: "dialog",
31733
+ onClose: onDismiss,
31734
+ classes: {
31735
+ paper: clsx(classes.dialogRoot, (_b = {}, _b[classes.dialogRootWider] = wider, _b))
31736
+ }
31737
+ }, other),
31738
+ /*#__PURE__*/
31739
+ React.createElement(DialogContent$1, {
31740
+ children: children,
31741
+ className: classes.dialog
31742
+ }),
31743
+ /*#__PURE__*/
31744
+ React.createElement(DialogActions$2, {
31745
+ classes: {
31746
+ root: clsx((_c = {}, _c[classes.withAdditionalAction] = clearable || showTodayButton, _c))
31747
+ }
31748
+ }, clearable &&
31749
+ /*#__PURE__*/
31750
+ React.createElement(Button$2, {
31751
+ color: "primary",
31752
+ onClick: onClear
31753
+ }, clearLabel), !clearable && showTodayButton &&
31754
+ /*#__PURE__*/
31755
+ React.createElement(Button$2, {
31756
+ color: "primary",
31757
+ onClick: onSetToday
31758
+ }, todayLabel), cancelLabel &&
31759
+ /*#__PURE__*/
31760
+ React.createElement(Button$2, {
31761
+ color: "primary",
31762
+ onClick: onDismiss
31763
+ }, cancelLabel), okLabel &&
31764
+ /*#__PURE__*/
31765
+ React.createElement(Button$2, {
31766
+ color: "primary",
31767
+ onClick: onAccept
31768
+ }, okLabel)))
31769
+ );
31640
31770
  };
31641
31771
  ModalDialog.displayName = 'ModalDialog';
31642
31772
  var styles$1N = createStyles({
@@ -31663,7 +31793,7 @@
31663
31793
  name: 'MuiPickersModal'
31664
31794
  })(ModalDialog);
31665
31795
 
31666
- var ModalWrapper = function (_a) {
31796
+ var ModalWrapper = function ModalWrapper(_a) {
31667
31797
  var open = _a.open,
31668
31798
  children = _a.children,
31669
31799
  okLabel = _a.okLabel,
@@ -31686,22 +31816,29 @@
31686
31816
  useKeyDown(open, {
31687
31817
  Enter: onAccept
31688
31818
  });
31689
- return React.createElement(React.Fragment, null, React.createElement(InputComponent, __assign({}, other, DateInputProps)), React.createElement(ModalDialog$1, __assign({
31690
- wider: wider,
31691
- showTabs: showTabs,
31692
- open: open,
31693
- onClear: onClear,
31694
- onAccept: onAccept,
31695
- onDismiss: onDismiss,
31696
- onSetToday: onSetToday,
31697
- clearLabel: clearLabel,
31698
- todayLabel: todayLabel,
31699
- okLabel: okLabel,
31700
- cancelLabel: cancelLabel,
31701
- clearable: clearable,
31702
- showTodayButton: showTodayButton,
31703
- children: children
31704
- }, DialogProps)));
31819
+ return (
31820
+ /*#__PURE__*/
31821
+ React.createElement(React.Fragment, null,
31822
+ /*#__PURE__*/
31823
+ React.createElement(InputComponent, __assign({}, other, DateInputProps)),
31824
+ /*#__PURE__*/
31825
+ React.createElement(ModalDialog$1, __assign({
31826
+ wider: wider,
31827
+ showTabs: showTabs,
31828
+ open: open,
31829
+ onClear: onClear,
31830
+ onAccept: onAccept,
31831
+ onDismiss: onDismiss,
31832
+ onSetToday: onSetToday,
31833
+ clearLabel: clearLabel,
31834
+ todayLabel: todayLabel,
31835
+ okLabel: okLabel,
31836
+ cancelLabel: cancelLabel,
31837
+ clearable: clearable,
31838
+ showTodayButton: showTodayButton,
31839
+ children: children
31840
+ }, DialogProps)))
31841
+ );
31705
31842
  };
31706
31843
  ModalWrapper.propTypes = {
31707
31844
  okLabel: PropTypes.node,
@@ -31732,7 +31869,7 @@
31732
31869
  }, {
31733
31870
  name: 'MuiPickersInlineWrapper'
31734
31871
  });
31735
- var InlineWrapper = function (_a) {
31872
+ var InlineWrapper = function InlineWrapper(_a) {
31736
31873
  var _b;
31737
31874
 
31738
31875
  var open = _a.open,
@@ -31753,25 +31890,32 @@
31753
31890
  useKeyDown(open, {
31754
31891
  Enter: onAccept
31755
31892
  });
31756
- return React.createElement(React.Fragment, null, React.createElement(InputComponent, __assign({}, other, DateInputProps, {
31757
- inputRef: ref
31758
- })), React.createElement(Popover$2, __assign({
31759
- open: open,
31760
- onClose: onDismiss,
31761
- anchorEl: ref.current,
31762
- classes: {
31763
- paper: clsx(classes.popoverPaper, (_b = {}, _b[classes.popoverPaperWider] = wider, _b))
31764
- },
31765
- anchorOrigin: {
31766
- vertical: 'bottom',
31767
- horizontal: 'center'
31768
- },
31769
- transformOrigin: {
31770
- vertical: 'top',
31771
- horizontal: 'center'
31772
- },
31773
- children: children
31774
- }, PopoverProps)));
31893
+ return (
31894
+ /*#__PURE__*/
31895
+ React.createElement(React.Fragment, null,
31896
+ /*#__PURE__*/
31897
+ React.createElement(InputComponent, __assign({}, other, DateInputProps, {
31898
+ inputRef: ref
31899
+ })),
31900
+ /*#__PURE__*/
31901
+ React.createElement(Popover$2, __assign({
31902
+ open: open,
31903
+ onClose: onDismiss,
31904
+ anchorEl: ref.current,
31905
+ classes: {
31906
+ paper: clsx(classes.popoverPaper, (_b = {}, _b[classes.popoverPaperWider] = wider, _b))
31907
+ },
31908
+ anchorOrigin: {
31909
+ vertical: 'bottom',
31910
+ horizontal: 'center'
31911
+ },
31912
+ transformOrigin: {
31913
+ vertical: 'top',
31914
+ horizontal: 'center'
31915
+ },
31916
+ children: children
31917
+ }, PopoverProps)))
31918
+ );
31775
31919
  };
31776
31920
  InlineWrapper.propTypes = {
31777
31921
  onOpen: PropTypes.func,
@@ -31791,15 +31935,22 @@
31791
31935
  return ModalWrapper;
31792
31936
  }
31793
31937
  }
31794
- var VariantContext = React.createContext(null);
31795
- var Wrapper = function (_a) {
31938
+ var VariantContext =
31939
+ /*#__PURE__*/
31940
+ React.createContext(null);
31941
+ var Wrapper = function Wrapper(_a) {
31796
31942
  var variant = _a.variant,
31797
31943
  props = __rest(_a, ["variant"]);
31798
31944
 
31799
31945
  var Component = getWrapperFromVariant(variant);
31800
- return React.createElement(VariantContext.Provider, {
31801
- value: variant || 'dialog'
31802
- }, React.createElement(Component, __assign({}, props)));
31946
+ return (
31947
+ /*#__PURE__*/
31948
+ React.createElement(VariantContext.Provider, {
31949
+ value: variant || 'dialog'
31950
+ },
31951
+ /*#__PURE__*/
31952
+ React.createElement(Component, __assign({}, props)))
31953
+ );
31803
31954
  };
31804
31955
 
31805
31956
  var useStyles$a = makeStyles({
@@ -31810,7 +31961,7 @@
31810
31961
  }, {
31811
31962
  name: 'MuiPickersYearSelection'
31812
31963
  });
31813
- var YearSelection = function (_a) {
31964
+ var YearSelection = function YearSelection(_a) {
31814
31965
  var date = _a.date,
31815
31966
  onChange = _a.onChange,
31816
31967
  onYearChange = _a.onYearChange,
@@ -31842,20 +31993,26 @@
31842
31993
 
31843
31994
  onChange(newDate, true);
31844
31995
  }, [date, onChange, onYearChange, utils]);
31845
- return React.createElement("div", {
31846
- className: classes.container
31847
- }, utils.getYearRange(minDate, maxDate).map(function (year) {
31848
- var yearNumber = utils.getYear(year);
31849
- var selected = yearNumber === currentYear;
31850
- return React.createElement(Year$1, {
31851
- key: utils.getYearText(year),
31852
- selected: selected,
31853
- value: yearNumber,
31854
- onSelect: onYearSelect,
31855
- ref: selected ? selectedYearRef : undefined,
31856
- disabled: Boolean(disablePast && utils.isBeforeYear(year, utils.date()) || disableFuture && utils.isAfterYear(year, utils.date()))
31857
- }, utils.getYearText(year));
31858
- }));
31996
+ return (
31997
+ /*#__PURE__*/
31998
+ React.createElement("div", {
31999
+ className: classes.container
32000
+ }, utils.getYearRange(minDate, maxDate).map(function (year) {
32001
+ var yearNumber = utils.getYear(year);
32002
+ var selected = yearNumber === currentYear;
32003
+ return (
32004
+ /*#__PURE__*/
32005
+ React.createElement(Year$1, {
32006
+ key: utils.formatByString(year, utils.formats.year),
32007
+ selected: selected,
32008
+ value: yearNumber,
32009
+ onSelect: onYearSelect,
32010
+ ref: selected ? selectedYearRef : undefined,
32011
+ disabled: Boolean(disablePast && utils.isBeforeYear(year, utils.date()) || disableFuture && utils.isAfterYear(year, utils.date()))
32012
+ }, utils.formatByString(year, utils.formats.year))
32013
+ );
32014
+ }))
32015
+ );
31859
32016
  };
31860
32017
 
31861
32018
  var ClockType;
@@ -31908,12 +32065,17 @@
31908
32065
  var _c = this.props,
31909
32066
  classes = _c.classes,
31910
32067
  hasSelected = _c.hasSelected;
31911
- return React.createElement("div", {
31912
- style: this.getAngleStyle(),
31913
- className: clsx(classes.pointer, (_a = {}, _a[classes.animateTransform] = this.state.toAnimateTransform, _a))
31914
- }, React.createElement("div", {
31915
- className: clsx(classes.thumb, (_b = {}, _b[classes.noPoint] = hasSelected, _b))
31916
- }));
32068
+ return (
32069
+ /*#__PURE__*/
32070
+ React.createElement("div", {
32071
+ style: this.getAngleStyle(),
32072
+ className: clsx(classes.pointer, (_a = {}, _a[classes.animateTransform] = this.state.toAnimateTransform, _a))
32073
+ },
32074
+ /*#__PURE__*/
32075
+ React.createElement("div", {
32076
+ className: clsx(classes.thumb, (_b = {}, _b[classes.noPoint] = hasSelected, _b))
32077
+ }))
32078
+ );
31917
32079
  };
31918
32080
 
31919
32081
  ClockPointer.getDerivedStateFromProps = function (nextProps, state) {
@@ -31932,7 +32094,7 @@
31932
32094
 
31933
32095
  return ClockPointer;
31934
32096
  }(React.Component);
31935
- var styles$1O = function (theme) {
32097
+ var styles$1O = function styles(theme) {
31936
32098
  return createStyles({
31937
32099
  pointer: {
31938
32100
  width: 2,
@@ -31976,11 +32138,11 @@
31976
32138
  var cx = basePoint.x - center.x;
31977
32139
  var cy = basePoint.y - center.y;
31978
32140
 
31979
- var rad2deg = function (rad) {
32141
+ var rad2deg = function rad2deg(rad) {
31980
32142
  return rad * 57.29577951308232;
31981
32143
  };
31982
32144
 
31983
- var getAngleValue = function (step, offsetX, offsetY) {
32145
+ var getAngleValue = function getAngleValue(step, offsetX, offsetY) {
31984
32146
  var x = offsetX - center.x;
31985
32147
  var y = offsetY - center.y;
31986
32148
  var atan = Math.atan2(cx, cy) - Math.atan2(x, y);
@@ -31996,7 +32158,7 @@
31996
32158
  };
31997
32159
  };
31998
32160
 
31999
- var getHours = function (offsetX, offsetY, ampm) {
32161
+ var getHours = function getHours(offsetX, offsetY, ampm) {
32000
32162
  var _a = getAngleValue(30, offsetX, offsetY),
32001
32163
  value = _a.value,
32002
32164
  distance = _a.distance;
@@ -32014,7 +32176,7 @@
32014
32176
 
32015
32177
  return value;
32016
32178
  };
32017
- var getMinutes = function (offsetX, offsetY, step) {
32179
+ var getMinutes = function getMinutes(offsetX, offsetY, step) {
32018
32180
  if (step === void 0) {
32019
32181
  step = 1;
32020
32182
  }
@@ -32024,10 +32186,10 @@
32024
32186
  value = value * step % 60;
32025
32187
  return value;
32026
32188
  };
32027
- var getMeridiem = function (date, utils) {
32189
+ var getMeridiem = function getMeridiem(date, utils) {
32028
32190
  return utils.getHours(date) >= 12 ? 'pm' : 'am';
32029
32191
  };
32030
- var convertToMeridiem = function (time, meridiem, ampm, utils) {
32192
+ var convertToMeridiem = function convertToMeridiem(time, meridiem, ampm, utils) {
32031
32193
  if (ampm) {
32032
32194
  var currentMeridiem = utils.getHours(time) >= 12 ? 'pm' : 'am';
32033
32195
 
@@ -32124,32 +32286,41 @@
32124
32286
  type = _a.type,
32125
32287
  ampm = _a.ampm;
32126
32288
  var isPointerInner = !ampm && type === ClockType$1.HOURS && (value < 1 || value > 12);
32127
- return React.createElement("div", {
32128
- className: classes.container
32129
- }, React.createElement("div", {
32130
- className: classes.clock
32131
- }, React.createElement("div", {
32132
- role: "menu",
32133
- tabIndex: -1,
32134
- className: classes.squareMask,
32135
- onTouchMove: this.handleTouchMove,
32136
- onTouchEnd: this.handleTouchEnd,
32137
- onMouseUp: this.handleMouseUp,
32138
- onMouseMove: this.handleMove
32139
- }), React.createElement("div", {
32140
- className: classes.pin
32141
- }), React.createElement(ClockPointer$1, {
32142
- type: type,
32143
- value: value,
32144
- isInner: isPointerInner,
32145
- hasSelected: this.hasSelected()
32146
- }), children));
32289
+ return (
32290
+ /*#__PURE__*/
32291
+ React.createElement("div", {
32292
+ className: classes.container
32293
+ },
32294
+ /*#__PURE__*/
32295
+ React.createElement("div", {
32296
+ className: classes.clock
32297
+ },
32298
+ /*#__PURE__*/
32299
+ React.createElement("div", {
32300
+ role: "menu",
32301
+ tabIndex: -1,
32302
+ className: classes.squareMask,
32303
+ onTouchMove: this.handleTouchMove,
32304
+ onTouchEnd: this.handleTouchEnd,
32305
+ onMouseUp: this.handleMouseUp,
32306
+ onMouseMove: this.handleMove
32307
+ }),
32308
+ /*#__PURE__*/
32309
+ React.createElement("div", {
32310
+ className: classes.pin
32311
+ }),
32312
+ /*#__PURE__*/
32313
+ React.createElement(ClockPointer$1, {
32314
+ type: type,
32315
+ value: value,
32316
+ isInner: isPointerInner,
32317
+ hasSelected: this.hasSelected()
32318
+ }), children))
32319
+ );
32147
32320
  };
32148
32321
 
32149
32322
  Clock.propTypes = {
32150
- type: PropTypes.oneOf(Object.keys(ClockType$1).map(function (key) {
32151
- return ClockType$1[key];
32152
- })).isRequired,
32323
+ type: PropTypes.oneOf(Object.values(ClockType$1)).isRequired,
32153
32324
  value: PropTypes.number.isRequired,
32154
32325
  onChange: PropTypes.func.isRequired,
32155
32326
  children: PropTypes.arrayOf(PropTypes.node).isRequired,
@@ -32163,7 +32334,7 @@
32163
32334
  };
32164
32335
  return Clock;
32165
32336
  }(React.Component);
32166
- var styles$1P = function (theme) {
32337
+ var styles$1P = function styles(theme) {
32167
32338
  return createStyles({
32168
32339
  container: {
32169
32340
  display: 'flex',
@@ -32256,7 +32427,7 @@
32256
32427
  }, {
32257
32428
  name: 'MuiPickersClockNumber'
32258
32429
  });
32259
- var ClockNumber = function (_a) {
32430
+ var ClockNumber = function ClockNumber(_a) {
32260
32431
  var _b;
32261
32432
 
32262
32433
  var selected = _a.selected,
@@ -32271,16 +32442,19 @@
32271
32442
  transform: "translate(" + position[0] + "px, " + position[1] + "px"
32272
32443
  };
32273
32444
  }, [index]);
32274
- return React.createElement(Typography$2, {
32275
- component: "span",
32276
- className: className,
32277
- variant: isInner ? 'body2' : 'body1',
32278
- style: transformStyle,
32279
- children: label
32280
- });
32445
+ return (
32446
+ /*#__PURE__*/
32447
+ React.createElement(Typography$2, {
32448
+ component: "span",
32449
+ className: className,
32450
+ variant: isInner ? 'body2' : 'body1',
32451
+ style: transformStyle,
32452
+ children: label
32453
+ })
32454
+ );
32281
32455
  };
32282
32456
 
32283
- var getHourNumbers = function (_a) {
32457
+ var getHourNumbers = function getHourNumbers(_a) {
32284
32458
  var ampm = _a.ampm,
32285
32459
  utils = _a.utils,
32286
32460
  date = _a.date;
@@ -32289,7 +32463,7 @@
32289
32463
  var startHour = ampm ? 1 : 0;
32290
32464
  var endHour = ampm ? 12 : 23;
32291
32465
 
32292
- var isSelected = function (hour) {
32466
+ var isSelected = function isSelected(hour) {
32293
32467
  if (ampm) {
32294
32468
  if (hour === 12) {
32295
32469
  return currentHours === 12 || currentHours === 0;
@@ -32314,73 +32488,99 @@
32314
32488
  selected: isSelected(hour),
32315
32489
  isInner: !ampm && (hour === 0 || hour > 12)
32316
32490
  };
32317
- hourNumbers.push(React.createElement(ClockNumber, __assign({
32491
+ hourNumbers.push(
32492
+ /*#__PURE__*/
32493
+ React.createElement(ClockNumber, __assign({
32318
32494
  key: hour
32319
32495
  }, props)));
32320
32496
  }
32321
32497
 
32322
32498
  return hourNumbers;
32323
32499
  };
32324
- var getMinutesNumbers = function (_a) {
32500
+ var getMinutesNumbers = function getMinutesNumbers(_a) {
32325
32501
  var value = _a.value,
32326
32502
  utils = _a.utils;
32327
32503
  var f = utils.formatNumber;
32328
- return [React.createElement(ClockNumber, {
32504
+ return [
32505
+ /*#__PURE__*/
32506
+ React.createElement(ClockNumber, {
32329
32507
  label: f('00'),
32330
32508
  selected: value === 0,
32331
32509
  index: 12,
32332
32510
  key: 12
32333
- }), React.createElement(ClockNumber, {
32511
+ }),
32512
+ /*#__PURE__*/
32513
+ React.createElement(ClockNumber, {
32334
32514
  label: f('05'),
32335
32515
  selected: value === 5,
32336
32516
  index: 1,
32337
32517
  key: 1
32338
- }), React.createElement(ClockNumber, {
32518
+ }),
32519
+ /*#__PURE__*/
32520
+ React.createElement(ClockNumber, {
32339
32521
  label: f('10'),
32340
32522
  selected: value === 10,
32341
32523
  index: 2,
32342
32524
  key: 2
32343
- }), React.createElement(ClockNumber, {
32525
+ }),
32526
+ /*#__PURE__*/
32527
+ React.createElement(ClockNumber, {
32344
32528
  label: f('15'),
32345
32529
  selected: value === 15,
32346
32530
  index: 3,
32347
32531
  key: 3
32348
- }), React.createElement(ClockNumber, {
32532
+ }),
32533
+ /*#__PURE__*/
32534
+ React.createElement(ClockNumber, {
32349
32535
  label: f('20'),
32350
32536
  selected: value === 20,
32351
32537
  index: 4,
32352
32538
  key: 4
32353
- }), React.createElement(ClockNumber, {
32539
+ }),
32540
+ /*#__PURE__*/
32541
+ React.createElement(ClockNumber, {
32354
32542
  label: f('25'),
32355
32543
  selected: value === 25,
32356
32544
  index: 5,
32357
32545
  key: 5
32358
- }), React.createElement(ClockNumber, {
32546
+ }),
32547
+ /*#__PURE__*/
32548
+ React.createElement(ClockNumber, {
32359
32549
  label: f('30'),
32360
32550
  selected: value === 30,
32361
32551
  index: 6,
32362
32552
  key: 6
32363
- }), React.createElement(ClockNumber, {
32553
+ }),
32554
+ /*#__PURE__*/
32555
+ React.createElement(ClockNumber, {
32364
32556
  label: f('35'),
32365
32557
  selected: value === 35,
32366
32558
  index: 7,
32367
32559
  key: 7
32368
- }), React.createElement(ClockNumber, {
32560
+ }),
32561
+ /*#__PURE__*/
32562
+ React.createElement(ClockNumber, {
32369
32563
  label: f('40'),
32370
32564
  selected: value === 40,
32371
32565
  index: 8,
32372
32566
  key: 8
32373
- }), React.createElement(ClockNumber, {
32567
+ }),
32568
+ /*#__PURE__*/
32569
+ React.createElement(ClockNumber, {
32374
32570
  label: f('45'),
32375
32571
  selected: value === 45,
32376
32572
  index: 9,
32377
32573
  key: 9
32378
- }), React.createElement(ClockNumber, {
32574
+ }),
32575
+ /*#__PURE__*/
32576
+ React.createElement(ClockNumber, {
32379
32577
  label: f('50'),
32380
32578
  selected: value === 50,
32381
32579
  index: 10,
32382
32580
  key: 10
32383
- }), React.createElement(ClockNumber, {
32581
+ }),
32582
+ /*#__PURE__*/
32583
+ React.createElement(ClockNumber, {
32384
32584
  label: f('55'),
32385
32585
  selected: value === 55,
32386
32586
  index: 11,
@@ -32388,7 +32588,7 @@
32388
32588
  })];
32389
32589
  };
32390
32590
 
32391
- var TimePickerView = function (_a) {
32591
+ var TimePickerView = function TimePickerView(_a) {
32392
32592
  var type = _a.type,
32393
32593
  onHourChange = _a.onHourChange,
32394
32594
  onMinutesChange = _a.onMinutesChange,
@@ -32407,7 +32607,7 @@
32407
32607
  utils: utils,
32408
32608
  ampm: Boolean(ampm)
32409
32609
  }),
32410
- onChange: function (value, isFinish) {
32610
+ onChange: function onChange(value, isFinish) {
32411
32611
  var currentMeridiem = getMeridiem(date, utils);
32412
32612
  var updatedTimeWithMeridiem = convertToMeridiem(utils.setHours(date, value), currentMeridiem, Boolean(ampm), utils);
32413
32613
  onHourChange(updatedTimeWithMeridiem, isFinish);
@@ -32422,7 +32622,7 @@
32422
32622
  value: minutesValue,
32423
32623
  utils: utils
32424
32624
  }),
32425
- onChange: function (value, isFinish) {
32625
+ onChange: function onChange(value, isFinish) {
32426
32626
  var updatedTime = utils.setMinutes(date, value);
32427
32627
  onMinutesChange(updatedTime, isFinish);
32428
32628
  }
@@ -32436,7 +32636,7 @@
32436
32636
  value: secondsValue,
32437
32637
  utils: utils
32438
32638
  }),
32439
- onChange: function (value, isFinish) {
32639
+ onChange: function onChange(value, isFinish) {
32440
32640
  var updatedTime = utils.setSeconds(date, value);
32441
32641
  onSecondsChange(updatedTime, isFinish);
32442
32642
  }
@@ -32446,11 +32646,14 @@
32446
32646
  throw new Error('You must provide the type for TimePickerView');
32447
32647
  }
32448
32648
  }, [ampm, date, onHourChange, onMinutesChange, onSecondsChange, type, utils]);
32449
- return React.createElement(Clock$1, __assign({
32450
- type: type,
32451
- ampm: ampm,
32452
- minutesStep: minutesStep
32453
- }, viewProps));
32649
+ return (
32650
+ /*#__PURE__*/
32651
+ React.createElement(Clock$1, __assign({
32652
+ type: type,
32653
+ ampm: ampm,
32654
+ minutesStep: minutesStep
32655
+ }, viewProps))
32656
+ );
32454
32657
  };
32455
32658
  TimePickerView.displayName = 'TimePickerView';
32456
32659
  TimePickerView.propTypes = {
@@ -32460,15 +32663,14 @@
32460
32663
  onSecondsChange: PropTypes.func.isRequired,
32461
32664
  ampm: PropTypes.bool,
32462
32665
  minutesStep: PropTypes.number,
32463
- type: PropTypes.oneOf(Object.keys(ClockType$1).map(function (key) {
32464
- return ClockType$1[key];
32465
- })).isRequired
32666
+ type: PropTypes.oneOf(Object.values(ClockType$1)).isRequired
32466
32667
  } ;
32467
32668
  TimePickerView.defaultProps = {
32468
32669
  ampm: true,
32469
32670
  minutesStep: 1
32470
32671
  };
32471
- var ClockView = React.memo(TimePickerView);
32672
+ var ClockView = /*#__PURE__*/
32673
+ React.memo(TimePickerView);
32472
32674
 
32473
32675
  var useStyles$c = makeStyles(function (theme) {
32474
32676
  return {
@@ -32500,7 +32702,7 @@
32500
32702
  }, {
32501
32703
  name: 'MuiPickersMonth'
32502
32704
  });
32503
- var Month = function (_a) {
32705
+ var Month = function Month(_a) {
32504
32706
  var _b;
32505
32707
 
32506
32708
  var selected = _a.selected,
@@ -32514,17 +32716,20 @@
32514
32716
  var handleSelection = React.useCallback(function () {
32515
32717
  onSelect(value);
32516
32718
  }, [onSelect, value]);
32517
- return React.createElement(Typography$2, __assign({
32518
- role: "button",
32519
- component: "div",
32520
- className: clsx(classes.root, (_b = {}, _b[classes.monthSelected] = selected, _b[classes.monthDisabled] = disabled, _b)),
32521
- tabIndex: disabled ? -1 : 0,
32522
- onClick: handleSelection,
32523
- onKeyPress: handleSelection,
32524
- color: selected ? 'primary' : undefined,
32525
- variant: selected ? 'h5' : 'subtitle1',
32526
- children: children
32527
- }, other));
32719
+ return (
32720
+ /*#__PURE__*/
32721
+ React.createElement(Typography$2, __assign({
32722
+ role: "button",
32723
+ component: "div",
32724
+ className: clsx(classes.root, (_b = {}, _b[classes.monthSelected] = selected, _b[classes.monthDisabled] = disabled, _b)),
32725
+ tabIndex: disabled ? -1 : 0,
32726
+ onClick: handleSelection,
32727
+ onKeyPress: handleSelection,
32728
+ color: selected ? 'primary' : undefined,
32729
+ variant: selected ? 'h5' : 'subtitle1',
32730
+ children: children
32731
+ }, other))
32732
+ );
32528
32733
  };
32529
32734
  Month.displayName = 'Month';
32530
32735
 
@@ -32538,7 +32743,7 @@
32538
32743
  }, {
32539
32744
  name: 'MuiPickersMonthSelection'
32540
32745
  });
32541
- var MonthSelection = function (_a) {
32746
+ var MonthSelection = function MonthSelection(_a) {
32542
32747
  var disablePast = _a.disablePast,
32543
32748
  disableFuture = _a.disableFuture,
32544
32749
  minDate = _a.minDate,
@@ -32550,7 +32755,7 @@
32550
32755
  var classes = useStyles$d();
32551
32756
  var currentMonth = utils.getMonth(date);
32552
32757
 
32553
- var shouldDisableMonth = function (month) {
32758
+ var shouldDisableMonth = function shouldDisableMonth(month) {
32554
32759
  var now = utils.date();
32555
32760
  var utilMinDate = utils.date(minDate);
32556
32761
  var utilMaxDate = utils.date(maxDate);
@@ -32569,22 +32774,28 @@
32569
32774
  onMonthChange(newDate);
32570
32775
  }
32571
32776
  }, [date, onChange, onMonthChange, utils]);
32572
- return React.createElement("div", {
32573
- className: classes.container
32574
- }, utils.getMonthArray(date).map(function (month) {
32575
- var monthNumber = utils.getMonth(month);
32576
- var monthText = utils.format(month, 'MMM');
32577
- return React.createElement(Month, {
32578
- key: monthText,
32579
- value: monthNumber,
32580
- selected: monthNumber === currentMonth,
32581
- onSelect: onMonthSelect,
32582
- disabled: shouldDisableMonth(month)
32583
- }, monthText);
32584
- }));
32777
+ return (
32778
+ /*#__PURE__*/
32779
+ React.createElement("div", {
32780
+ className: classes.container
32781
+ }, utils.getMonthArray(date).map(function (month) {
32782
+ var monthNumber = utils.getMonth(month);
32783
+ var monthText = utils.formatByString(month, utils.formats.monthShort);
32784
+ return (
32785
+ /*#__PURE__*/
32786
+ React.createElement(Month, {
32787
+ key: monthText,
32788
+ value: monthNumber,
32789
+ selected: monthNumber === currentMonth,
32790
+ onSelect: onMonthSelect,
32791
+ disabled: shouldDisableMonth(month)
32792
+ }, monthText)
32793
+ );
32794
+ }))
32795
+ );
32585
32796
  };
32586
32797
 
32587
- var getOrientation = function () {
32798
+ var getOrientation = function getOrientation() {
32588
32799
  return typeof window !== 'undefined' && window.screen && window.screen.orientation && Math.abs(window.screen.orientation.angle) === 90 ? 'landscape' : 'portrait';
32589
32800
  };
32590
32801
 
@@ -32647,7 +32858,7 @@
32647
32858
  var useDialogActionsStyles = makeStyles({
32648
32859
  withAdditionalAction: {}
32649
32860
  });
32650
- var Picker = function (props) {
32861
+ var Picker = function Picker(props) {
32651
32862
  var _a, _b, _c;
32652
32863
 
32653
32864
  var date = props.date,
@@ -32705,10 +32916,12 @@
32705
32916
  var shiftButtons = new Array();
32706
32917
 
32707
32918
  if (showShiftButtons && setShiftFunction && onSetShift && shiftButtonValues) {
32708
- var _loop_1 = function (key) {
32709
- shiftButtons.push(React.createElement(Button$1, {
32919
+ var _loop_1 = function _loop_1(key) {
32920
+ shiftButtons.push(
32921
+ /*#__PURE__*/
32922
+ React.createElement(Button$1, {
32710
32923
  color: "primary",
32711
- onClick: function () {
32924
+ onClick: function onClick() {
32712
32925
  return onSetShift(setShiftFunction(parseInt(key)));
32713
32926
  },
32714
32927
  key: shiftButtonValues[key]
@@ -32720,69 +32933,86 @@
32720
32933
  }
32721
32934
  }
32722
32935
 
32723
- return React.createElement("div", {
32724
- className: clsx(classes.container, (_a = {}, _a[classes.containerLandscape] = isLandscape, _a))
32725
- }, !disableToolbar && React.createElement(ToolbarComponent, __assign({
32726
- date: date,
32727
- onChange: onChange,
32728
- setOpenView: setOpenView,
32729
- openView: openView,
32730
- hideTabs: hideTabs,
32731
- dateRangeIcon: dateRangeIcon,
32732
- timeIcon: timeIcon,
32733
- isLandscape: isLandscape
32734
- }, props)), React.createElement("div", {
32735
- className: clsx(classes.pickerView, (_b = {}, _b[classes.pickerViewLandscape] = isLandscape, _b))
32736
- }, openView === 'year' && React.createElement(YearSelection, {
32737
- date: date,
32738
- onChange: handleChangeAndOpenNext,
32739
- minDate: minDate,
32740
- maxDate: maxDate,
32741
- disablePast: disablePast,
32742
- disableFuture: disableFuture,
32743
- onYearChange: onYearChange,
32744
- animateYearScrolling: animateYearScrolling
32745
- }), openView === 'month' && React.createElement(MonthSelection, {
32746
- date: date,
32747
- onChange: handleChangeAndOpenNext,
32748
- minDate: minDate,
32749
- maxDate: maxDate,
32750
- disablePast: disablePast,
32751
- disableFuture: disableFuture,
32752
- onMonthChange: onMonthChange
32753
- }), openView === 'date' && React.createElement(Calendar$1, {
32754
- date: date,
32755
- onChange: handleChangeAndOpenNext,
32756
- onMonthChange: onMonthChange,
32757
- disablePast: disablePast,
32758
- disableFuture: disableFuture,
32759
- minDate: minDate,
32760
- maxDate: maxDate,
32761
- leftArrowIcon: leftArrowIcon,
32762
- leftArrowButtonProps: leftArrowButtonProps,
32763
- rightArrowIcon: rightArrowIcon,
32764
- rightArrowButtonProps: rightArrowButtonProps,
32765
- renderDay: renderDay,
32766
- shouldDisableDate: shouldDisableDate,
32767
- allowKeyboardControl: allowKeyboardControl,
32768
- loadingIndicator: loadingIndicator
32769
- }), (openView === 'hours' || openView === 'minutes' || openView === 'seconds') && React.createElement(TimePickerView, {
32770
- date: date,
32771
- ampm: ampm,
32772
- type: openView,
32773
- minutesStep: minutesStep,
32774
- onHourChange: handleChangeAndOpenNext,
32775
- onMinutesChange: handleChangeAndOpenNext,
32776
- onSecondsChange: handleChangeAndOpenNext
32777
- })), showActionsBar && React.createElement(DialogActions$1, {
32778
- classes: {
32779
- root: clsx((_c = {}, _c[dialogActionsClasses.withAdditionalAction] = showTodayButton, _c))
32780
- }
32781
- }, showTodayButton && React.createElement(Button$1, {
32782
- color: "primary",
32783
- onClick: onSetToday,
32784
- key: "today"
32785
- }, todayLabel), showShiftButtons && setShiftFunction && shiftButtons));
32936
+ return (
32937
+ /*#__PURE__*/
32938
+ React.createElement("div", {
32939
+ className: clsx(classes.container, (_a = {}, _a[classes.containerLandscape] = isLandscape, _a))
32940
+ }, !disableToolbar &&
32941
+ /*#__PURE__*/
32942
+ React.createElement(ToolbarComponent, __assign({
32943
+ setOpenView: setOpenView,
32944
+ openView: openView,
32945
+ hideTabs: hideTabs,
32946
+ dateRangeIcon: dateRangeIcon,
32947
+ timeIcon: timeIcon,
32948
+ isLandscape: isLandscape
32949
+ }, props)),
32950
+ /*#__PURE__*/
32951
+ React.createElement("div", {
32952
+ className: clsx(classes.pickerView, (_b = {}, _b[classes.pickerViewLandscape] = isLandscape, _b))
32953
+ }, openView === 'year' &&
32954
+ /*#__PURE__*/
32955
+ React.createElement(YearSelection, {
32956
+ date: date,
32957
+ onChange: handleChangeAndOpenNext,
32958
+ minDate: minDate,
32959
+ maxDate: maxDate,
32960
+ disablePast: disablePast,
32961
+ disableFuture: disableFuture,
32962
+ onYearChange: onYearChange,
32963
+ animateYearScrolling: animateYearScrolling
32964
+ }), openView === 'month' &&
32965
+ /*#__PURE__*/
32966
+ React.createElement(MonthSelection, {
32967
+ date: date,
32968
+ onChange: handleChangeAndOpenNext,
32969
+ minDate: minDate,
32970
+ maxDate: maxDate,
32971
+ disablePast: disablePast,
32972
+ disableFuture: disableFuture,
32973
+ onMonthChange: onMonthChange
32974
+ }), openView === 'date' &&
32975
+ /*#__PURE__*/
32976
+ React.createElement(Calendar$1, {
32977
+ date: date,
32978
+ onChange: handleChangeAndOpenNext,
32979
+ onMonthChange: onMonthChange,
32980
+ disablePast: disablePast,
32981
+ disableFuture: disableFuture,
32982
+ minDate: minDate,
32983
+ maxDate: maxDate,
32984
+ leftArrowIcon: leftArrowIcon,
32985
+ leftArrowButtonProps: leftArrowButtonProps,
32986
+ rightArrowIcon: rightArrowIcon,
32987
+ rightArrowButtonProps: rightArrowButtonProps,
32988
+ renderDay: renderDay,
32989
+ shouldDisableDate: shouldDisableDate,
32990
+ allowKeyboardControl: allowKeyboardControl,
32991
+ loadingIndicator: loadingIndicator
32992
+ }), (openView === 'hours' || openView === 'minutes' || openView === 'seconds') &&
32993
+ /*#__PURE__*/
32994
+ React.createElement(TimePickerView, {
32995
+ date: date,
32996
+ ampm: ampm,
32997
+ type: openView,
32998
+ minutesStep: minutesStep,
32999
+ onHourChange: handleChangeAndOpenNext,
33000
+ onMinutesChange: handleChangeAndOpenNext,
33001
+ onSecondsChange: handleChangeAndOpenNext
33002
+ })), showActionsBar &&
33003
+ /*#__PURE__*/
33004
+ React.createElement(DialogActions$1, {
33005
+ classes: {
33006
+ root: clsx((_c = {}, _c[dialogActionsClasses.withAdditionalAction] = showTodayButton, _c))
33007
+ }
33008
+ }, showTodayButton &&
33009
+ /*#__PURE__*/
33010
+ React.createElement(Button$1, {
33011
+ color: "primary",
33012
+ onClick: onSetToday,
33013
+ key: "today"
33014
+ }, todayLabel), showShiftButtons && setShiftFunction && shiftButtons))
33015
+ );
32786
33016
  };
32787
33017
  Picker.defaultProps = __assign(__assign({}, datePickerDefaultProps), {
32788
33018
  views: Object.keys(viewsMap)
@@ -32812,7 +33042,7 @@
32812
33042
  };
32813
33043
  }
32814
33044
 
32815
- var getDisplayDate = function (value, format, utils, isEmpty, _a) {
33045
+ var getDisplayDate = function getDisplayDate(value, format, utils, isEmpty, _a) {
32816
33046
  var invalidLabel = _a.invalidLabel,
32817
33047
  emptyLabel = _a.emptyLabel,
32818
33048
  labelFunc = _a.labelFunc;
@@ -32826,10 +33056,10 @@
32826
33056
  return emptyLabel || '';
32827
33057
  }
32828
33058
 
32829
- return utils.isValid(date) ? utils.format(date, format) : invalidLabel;
33059
+ return utils.isValid(date) ? utils.formatByString(date, format) : invalidLabel;
32830
33060
  };
32831
33061
 
32832
- var getComparisonMaxDate = function (utils, strictCompareDates, date) {
33062
+ var getComparisonMaxDate = function getComparisonMaxDate(utils, strictCompareDates, date) {
32833
33063
  if (strictCompareDates) {
32834
33064
  return date;
32835
33065
  }
@@ -32837,7 +33067,7 @@
32837
33067
  return utils.endOfDay(date);
32838
33068
  };
32839
33069
 
32840
- var getComparisonMinDate = function (utils, strictCompareDates, date) {
33070
+ var getComparisonMinDate = function getComparisonMinDate(utils, strictCompareDates, date) {
32841
33071
  if (strictCompareDates) {
32842
33072
  return date;
32843
33073
  }
@@ -32845,7 +33075,7 @@
32845
33075
  return utils.startOfDay(date);
32846
33076
  };
32847
33077
 
32848
- var validate = function (value, utils, _a // DateTimePicker doesn't support
33078
+ var validate = function validate(value, utils, _a // DateTimePicker doesn't support
32849
33079
  ) {
32850
33080
  var maxDate = _a.maxDate,
32851
33081
  minDate = _a.minDate,
@@ -32897,7 +33127,7 @@
32897
33127
  function makeMaskFromFormat(format, numberMaskChar) {
32898
33128
  return format.replace(/[a-z]/gi, numberMaskChar);
32899
33129
  }
32900
- var maskedDateFormatter = function (mask, numberMaskChar) {
33130
+ var maskedDateFormatter = function maskedDateFormatter(mask, numberMaskChar) {
32901
33131
  return function (value, oldValue, currentCaretPosition) {
32902
33132
  var refuse = /[^\d\w_]+/gi;
32903
33133
 
@@ -32977,7 +33207,7 @@
32977
33207
  };
32978
33208
  };
32979
33209
 
32980
- var useValueToDate = function (utils, _a) {
33210
+ var useValueToDate = function useValueToDate(utils, _a) {
32981
33211
  var value = _a.value,
32982
33212
  initialFocusedDate = _a.initialFocusedDate;
32983
33213
  var nowRef = React.useRef(utils.date());
@@ -32999,7 +33229,7 @@
32999
33229
  var autoOk = props.autoOk,
33000
33230
  disabled = props.disabled,
33001
33231
  onAccept = props.onAccept,
33002
- onChange = props.onChange,
33232
+ _onChange = props.onChange,
33003
33233
  onError = props.onError,
33004
33234
  value = props.value,
33005
33235
  variant = props.variant;
@@ -33025,26 +33255,27 @@
33025
33255
  }, [date, isOpen, pickerDate, utils]);
33026
33256
  var acceptDate = React.useCallback(function (acceptedDate) {
33027
33257
  setIsOpen(false);
33028
- onChange(acceptedDate);
33258
+
33259
+ _onChange(acceptedDate);
33029
33260
 
33030
33261
  if (onAccept) {
33031
33262
  onAccept(acceptedDate);
33032
33263
  }
33033
- }, [onAccept, onChange, setIsOpen]);
33264
+ }, [onAccept, _onChange, setIsOpen]);
33034
33265
  var wrapperProps = React.useMemo(function () {
33035
33266
  return {
33036
33267
  format: format,
33037
33268
  open: isOpen,
33038
- onClear: function () {
33269
+ onClear: function onClear() {
33039
33270
  return acceptDate(null);
33040
33271
  },
33041
- onAccept: function () {
33272
+ onAccept: function onAccept() {
33042
33273
  return acceptDate(pickerDate);
33043
33274
  },
33044
- onSetToday: function () {
33275
+ onSetToday: function onSetToday() {
33045
33276
  return setPickerDate(utils.date());
33046
33277
  },
33047
- onDismiss: function () {
33278
+ onDismiss: function onDismiss() {
33048
33279
  setIsOpen(false);
33049
33280
  }
33050
33281
  };
@@ -33052,7 +33283,7 @@
33052
33283
  var pickerProps = React.useMemo(function () {
33053
33284
  return {
33054
33285
  date: pickerDate,
33055
- onChange: function (newDate, isFinish) {
33286
+ onChange: function onChange(newDate, isFinish) {
33056
33287
  if (isFinish === void 0) {
33057
33288
  isFinish = true;
33058
33289
  }
@@ -33060,30 +33291,30 @@
33060
33291
  setPickerDate(newDate);
33061
33292
 
33062
33293
  if (variant === 'inline' || variant === 'static') {
33063
- onChange(newDate);
33294
+ _onChange(newDate);
33064
33295
  }
33065
33296
 
33066
33297
  if (isFinish && autoOk) {
33067
33298
  acceptDate(newDate);
33068
33299
  }
33069
33300
  },
33070
- onSetToday: function () {
33301
+ onSetToday: function onSetToday() {
33071
33302
  var newDate = utils.date();
33072
33303
  setPickerDate(newDate);
33073
33304
 
33074
33305
  if (variant === 'inline' || variant === 'static') {
33075
- onChange(newDate);
33306
+ _onChange(newDate);
33076
33307
  }
33077
33308
 
33078
33309
  if (autoOk) {
33079
33310
  acceptDate(newDate);
33080
33311
  }
33081
33312
  },
33082
- onSetShift: function (shiftDate) {
33313
+ onSetShift: function onSetShift(shiftDate) {
33083
33314
  var newDate = utils.date(shiftDate);
33084
33315
 
33085
33316
  if (variant === 'inline' || variant === 'static') {
33086
- onChange(newDate);
33317
+ _onChange(newDate);
33087
33318
  }
33088
33319
 
33089
33320
  if (autoOk) {
@@ -33091,7 +33322,7 @@
33091
33322
  }
33092
33323
  }
33093
33324
  };
33094
- }, [acceptDate, autoOk, onChange, pickerDate, variant]);
33325
+ }, [acceptDate, autoOk, _onChange, pickerDate, variant]);
33095
33326
  var validationError = validate(value, utils, props);
33096
33327
  React.useEffect(function () {
33097
33328
  if (validationError && onError) {
@@ -33103,7 +33334,7 @@
33103
33334
  return {
33104
33335
  inputValue: inputValue,
33105
33336
  validationError: validationError,
33106
- onClick: function () {
33337
+ onClick: function onClick() {
33107
33338
  return !disabled && setIsOpen(true);
33108
33339
  }
33109
33340
  };
@@ -33117,7 +33348,7 @@
33117
33348
  return pickerState;
33118
33349
  }
33119
33350
 
33120
- var PureDateInput = function (_a) {
33351
+ var PureDateInput = function PureDateInput(_a) {
33121
33352
  var inputValue = _a.inputValue,
33122
33353
  inputVariant = _a.inputVariant,
33123
33354
  validationError = _a.validationError,
@@ -33131,15 +33362,18 @@
33131
33362
  readOnly: true
33132
33363
  });
33133
33364
  }, [InputProps]);
33134
- return React.createElement(TextFieldComponent, __assign({
33135
- error: Boolean(validationError),
33136
- helperText: validationError
33137
- }, other, {
33138
- // do not overridable
33139
- value: inputValue,
33140
- variant: inputVariant,
33141
- InputProps: PureDateInputProps
33142
- }));
33365
+ return (
33366
+ /*#__PURE__*/
33367
+ React.createElement(TextFieldComponent, __assign({
33368
+ error: Boolean(validationError),
33369
+ helperText: validationError
33370
+ }, other, {
33371
+ // do not overridable
33372
+ value: inputValue,
33373
+ variant: inputVariant,
33374
+ InputProps: PureDateInputProps
33375
+ }))
33376
+ );
33143
33377
  };
33144
33378
  PureDateInput.displayName = 'PureDateInput';
33145
33379
 
@@ -33201,6 +33435,10 @@
33201
33435
  other = __rest(props, ["allowKeyboardControl", "ampm", "hideTabs", "animateYearScrolling", "autoOk", "disableFuture", "disablePast", "format", "forwardedRef", "initialFocusedDate", "invalidDateMessage", "labelFunc", "leftArrowIcon", "leftArrowButtonProps", "maxDate", "maxDateMessage", "minDate", "onOpen", "onClose", "minDateMessage", "strictCompareDates", "minutesStep", "onAccept", "onChange", "onMonthChange", "onYearChange", "renderDay", "views", "openTo", "rightArrowIcon", "rightArrowButtonProps", "shouldDisableDate", "dateRangeIcon", "emptyLabel", "invalidLabel", "timeIcon", "value", "variant", "orientation", "disableToolbar", "loadingIndicator", "ToolbarComponent", "showActionsBar", "showTodayButton", "todayLabel", "showShiftButtons", "setShiftFunction", "shiftButtonValues"]);
33202
33436
 
33203
33437
  var injectedProps = getCustomProps ? getCustomProps(props) : {};
33438
+ var dialogVariantProps = variant === "dialog" ? {
33439
+ showTodayButton: showTodayButton,
33440
+ todayLabel: todayLabel
33441
+ } : {};
33204
33442
  var options = useOptions(props);
33205
33443
 
33206
33444
  var _b = usePickerState(props, options),
@@ -33208,61 +33446,71 @@
33208
33446
  inputProps = _b.inputProps,
33209
33447
  wrapperProps = _b.wrapperProps;
33210
33448
 
33211
- return React.createElement(Wrapper, __assign({
33212
- variant: variant,
33213
- InputComponent: PureDateInput,
33214
- DateInputProps: inputProps,
33215
- showTodayButton: showTodayButton,
33216
- todayLabel: todayLabel
33217
- }, wrapperProps, injectedProps, other), React.createElement(Picker, __assign({}, pickerProps, {
33218
- orientation: orientation,
33219
- disableToolbar: disableToolbar,
33220
- ToolbarComponent: ToolbarComponent,
33221
- hideTabs: hideTabs,
33222
- ampm: ampm,
33223
- views: views,
33224
- openTo: openTo,
33225
- allowKeyboardControl: allowKeyboardControl,
33226
- minutesStep: minutesStep,
33227
- animateYearScrolling: animateYearScrolling,
33228
- disableFuture: disableFuture,
33229
- disablePast: disablePast,
33230
- leftArrowIcon: leftArrowIcon,
33231
- leftArrowButtonProps: leftArrowButtonProps,
33232
- maxDate: maxDate,
33233
- minDate: minDate,
33234
- strictCompareDates: strictCompareDates,
33235
- onMonthChange: onMonthChange,
33236
- onYearChange: onYearChange,
33237
- renderDay: renderDay,
33238
- dateRangeIcon: dateRangeIcon,
33239
- timeIcon: timeIcon,
33240
- rightArrowIcon: rightArrowIcon,
33241
- rightArrowButtonProps: rightArrowButtonProps,
33242
- shouldDisableDate: shouldDisableDate,
33243
- loadingIndicator: loadingIndicator,
33244
- showActionsBar: showActionsBar,
33245
- showTodayButton: showTodayButton,
33246
- todayLabel: todayLabel,
33247
- showShiftButtons: showShiftButtons,
33248
- setShiftFunction: setShiftFunction,
33249
- shiftButtonValues: shiftButtonValues
33250
- })));
33449
+ return (
33450
+ /*#__PURE__*/
33451
+ React.createElement(Wrapper, __assign({
33452
+ variant: variant,
33453
+ InputComponent: PureDateInput,
33454
+ DateInputProps: inputProps
33455
+ }, wrapperProps, injectedProps, dialogVariantProps, other),
33456
+ /*#__PURE__*/
33457
+ React.createElement(Picker, __assign({}, pickerProps, {
33458
+ orientation: orientation,
33459
+ disableToolbar: disableToolbar,
33460
+ ToolbarComponent: ToolbarComponent,
33461
+ hideTabs: hideTabs,
33462
+ ampm: ampm,
33463
+ views: views,
33464
+ openTo: openTo,
33465
+ allowKeyboardControl: allowKeyboardControl,
33466
+ minutesStep: minutesStep,
33467
+ animateYearScrolling: animateYearScrolling,
33468
+ disableFuture: disableFuture,
33469
+ disablePast: disablePast,
33470
+ leftArrowIcon: leftArrowIcon,
33471
+ leftArrowButtonProps: leftArrowButtonProps,
33472
+ maxDate: maxDate,
33473
+ minDate: minDate,
33474
+ strictCompareDates: strictCompareDates,
33475
+ onMonthChange: onMonthChange,
33476
+ onYearChange: onYearChange,
33477
+ renderDay: renderDay,
33478
+ dateRangeIcon: dateRangeIcon,
33479
+ timeIcon: timeIcon,
33480
+ rightArrowIcon: rightArrowIcon,
33481
+ rightArrowButtonProps: rightArrowButtonProps,
33482
+ shouldDisableDate: shouldDisableDate,
33483
+ loadingIndicator: loadingIndicator,
33484
+ showActionsBar: showActionsBar,
33485
+ showTodayButton: showTodayButton,
33486
+ todayLabel: todayLabel,
33487
+ showShiftButtons: showShiftButtons,
33488
+ setShiftFunction: setShiftFunction,
33489
+ shiftButtonValues: shiftButtonValues
33490
+ })))
33491
+ );
33251
33492
  }
33252
33493
 
33253
33494
  return WrappedPurePicker;
33254
33495
  }
33255
33496
 
33256
- var KeyboardIcon = function (props) {
33257
- return React__default.createElement(SvgIcon$2, __assign({}, props), React__default.createElement("path", {
33258
- d: "M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"
33259
- }), React__default.createElement("path", {
33260
- fill: "none",
33261
- d: "M0 0h24v24H0z"
33262
- }));
33497
+ var KeyboardIcon = function KeyboardIcon(props) {
33498
+ return (
33499
+ /*#__PURE__*/
33500
+ React__default.createElement(SvgIcon$2, __assign({}, props),
33501
+ /*#__PURE__*/
33502
+ React__default.createElement("path", {
33503
+ d: "M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"
33504
+ }),
33505
+ /*#__PURE__*/
33506
+ React__default.createElement("path", {
33507
+ fill: "none",
33508
+ d: "M0 0h24v24H0z"
33509
+ }))
33510
+ );
33263
33511
  };
33264
33512
 
33265
- var Rifm = function (props) {
33513
+ var Rifm = function Rifm(props) {
33266
33514
  var _a = React.useReducer(function (c) {
33267
33515
  return c + 1;
33268
33516
  }, 0),
@@ -33283,7 +33531,7 @@
33283
33531
 
33284
33532
  var isDeleleteButtonDownRef = React.useRef(false);
33285
33533
 
33286
- var onChange = function (evt) {
33534
+ var onChange = function onChange(evt) {
33287
33535
  var eventValue = evt.target.value;
33288
33536
  var selectionStart = evt.target.selectionStart;
33289
33537
  valueRef.current = [eventValue, evt.target, eventValue.length > userValue.length, isDeleleteButtonDownRef.current, selectionStart, userValue === props.format(eventValue, currentPreviousValue, selectionStart)]; // The main trick is to update underlying input with non formatted value (= eventValue)
@@ -33312,7 +33560,7 @@
33312
33560
 
33313
33561
  var deleteWasNoOp = isDeleleteButtonDown && isNoOperation; // Create string from only accepted symbols
33314
33562
 
33315
- var clean = function (str) {
33563
+ var clean = function clean(str) {
33316
33564
  return (str.match(props.accept || /\d|\w/g) || []).join('');
33317
33565
  };
33318
33566
 
@@ -33325,7 +33573,7 @@
33325
33573
  // so for formatting just this function to determine cursor position after formatting is enough
33326
33574
  // with masking we need to do some additional checks see `mask` below
33327
33575
 
33328
- var getCursorPosition = function (val) {
33576
+ var getCursorPosition = function getCursorPosition(val) {
33329
33577
  var start = 0;
33330
33578
  var cleanPos = 0;
33331
33579
 
@@ -33400,13 +33648,13 @@
33400
33648
  // there is no way I found to distinguish in onChange
33401
33649
  // backspace or delete was called in some situations
33402
33650
  // firefox track https://bugzilla.mozilla.org/show_bug.cgi?id=1447239
33403
- var handleKeyDown = function (evt) {
33651
+ var handleKeyDown = function handleKeyDown(evt) {
33404
33652
  if (evt.code === 'Delete') {
33405
33653
  isDeleleteButtonDownRef.current = true;
33406
33654
  }
33407
33655
  };
33408
33656
 
33409
- var handleKeyUp = function (evt) {
33657
+ var handleKeyUp = function handleKeyUp(evt) {
33410
33658
  if (evt.code === 'Delete') {
33411
33659
  isDeleleteButtonDownRef.current = false;
33412
33660
  }
@@ -33428,7 +33676,7 @@
33428
33676
  });
33429
33677
  };
33430
33678
 
33431
- var KeyboardDateInput = function (_a) {
33679
+ var KeyboardDateInput = function KeyboardDateInput(_a) {
33432
33680
  var inputValue = _a.inputValue,
33433
33681
  _b = _a.showErrorOnBlur,
33434
33682
  showErrorOnBlur = _b === void 0 ? false : _b,
@@ -33438,8 +33686,8 @@
33438
33686
  InputAdornmentProps = _a.InputAdornmentProps,
33439
33687
  onClick = _a.onClick,
33440
33688
  onChange = _a.onChange,
33441
- onBlur = _a.onBlur,
33442
- onFocus = _a.onFocus,
33689
+ _onBlur = _a.onBlur,
33690
+ _onFocus = _a.onFocus,
33443
33691
  InputProps = _a.InputProps,
33444
33692
  mask = _a.mask,
33445
33693
  _c = _a.maskChar,
@@ -33459,12 +33707,12 @@
33459
33707
  var formatter = React.useCallback(maskedDateFormatter(inputMask, maskChar), [mask, maskChar]);
33460
33708
  var position = InputAdornmentProps && InputAdornmentProps.position ? InputAdornmentProps.position : 'end';
33461
33709
 
33462
- var handleChange = function (text) {
33710
+ var handleChange = function handleChange(text) {
33463
33711
  var finalString = text === '' || text === inputMask ? null : text;
33464
33712
  onChange(finalString);
33465
33713
  };
33466
33714
 
33467
- var replace = function (text) {
33715
+ var replace = function replace(text) {
33468
33716
  return text;
33469
33717
  };
33470
33718
 
@@ -33472,61 +33720,73 @@
33472
33720
  showErrorFlag = _f[0],
33473
33721
  handleBlur = _f[1];
33474
33722
 
33475
- return React.createElement(Rifm, {
33476
- value: inputValue,
33477
- onChange: handleChange,
33478
- format: rifmFormatter || formatter,
33479
- replace: replace,
33480
- mask: true,
33481
- maskChar: maskChar,
33482
- letterPosition: letterPosition
33483
- }, function (_a) {
33484
- var _b;
33485
-
33486
- var onChange = _a.onChange,
33487
- value = _a.value;
33488
- return React.createElement(TextFieldComponent, __assign({
33489
- disabled: disabled,
33490
- error: Boolean(validationError) && !showErrorFlag,
33491
- helperText: !showErrorFlag && validationError
33492
- }, other, {
33493
- value: value,
33494
- onChange: onChange,
33495
- // onInput={changeInputStringValue}
33496
- // onKeyUp={handleKeyUp}
33497
- // onMouseUp={handleClick}
33498
- onBlur: function () {
33499
- if (onBlur) {
33500
- onBlur();
33501
- }
33723
+ return (
33724
+ /*#__PURE__*/
33725
+ React.createElement(Rifm, {
33726
+ value: inputValue,
33727
+ onChange: handleChange,
33728
+ format: rifmFormatter || formatter,
33729
+ replace: replace,
33730
+ mask: true,
33731
+ maskChar: maskChar,
33732
+ letterPosition: letterPosition
33733
+ }, function (_a) {
33734
+ var _b;
33735
+
33736
+ var onChange = _a.onChange,
33737
+ value = _a.value;
33738
+ return (
33739
+ /*#__PURE__*/
33740
+ React.createElement(TextFieldComponent, __assign({
33741
+ disabled: disabled,
33742
+ error: Boolean(validationError) && !showErrorFlag,
33743
+ helperText: !showErrorFlag && validationError
33744
+ }, other, {
33745
+ value: value,
33746
+ onChange: onChange,
33747
+ // onInput={changeInputStringValue}
33748
+ // onKeyUp={handleKeyUp}
33749
+ // onMouseUp={handleClick}
33750
+ onBlur: function onBlur() {
33751
+ if (_onBlur) {
33752
+ _onBlur();
33753
+ }
33502
33754
 
33503
- if (showErrorOnBlur) {
33504
- handleBlur(false);
33505
- }
33506
- },
33507
- onFocus: function (ev) {
33508
- if (onFocus) {
33509
- onFocus(ev);
33510
- }
33755
+ if (showErrorOnBlur) {
33756
+ handleBlur(false);
33757
+ }
33758
+ },
33759
+ onFocus: function onFocus(ev) {
33760
+ if (_onFocus) {
33761
+ _onFocus(ev);
33762
+ }
33511
33763
 
33512
- if (showErrorOnBlur) {
33513
- handleBlur(true);
33514
- }
33515
- },
33516
- variant: inputVariant,
33517
- InputProps: __assign(__assign({}, InputProps), (_b = {}, _b[position + "Adornment"] = React.createElement(InputAdornment$1, __assign({
33518
- position: position
33519
- }, InputAdornmentProps), React.createElement(IconButton$1, __assign({
33520
- disabled: disabled
33521
- }, KeyboardButtonProps, {
33522
- onClick: onClick
33523
- }), keyboardIcon)), _b))
33524
- }));
33525
- });
33764
+ if (showErrorOnBlur) {
33765
+ handleBlur(true);
33766
+ }
33767
+ },
33768
+ variant: inputVariant,
33769
+ InputProps: __assign(__assign({}, InputProps), (_b = {}, _b[position + "Adornment"] =
33770
+ /*#__PURE__*/
33771
+ React.createElement(InputAdornment$1, __assign({
33772
+ position: position
33773
+ }, InputAdornmentProps),
33774
+ /*#__PURE__*/
33775
+ React.createElement(IconButton$1, __assign({
33776
+ disabled: disabled
33777
+ }, KeyboardButtonProps, {
33778
+ onClick: onClick
33779
+ }), keyboardIcon)), _b))
33780
+ }))
33781
+ );
33782
+ })
33783
+ );
33526
33784
  };
33527
33785
 
33528
33786
  KeyboardDateInput.defaultProps = {
33529
- keyboardIcon: React.createElement(KeyboardIcon, null)
33787
+ keyboardIcon:
33788
+ /*#__PURE__*/
33789
+ React.createElement(KeyboardIcon, null)
33530
33790
  };
33531
33791
 
33532
33792
  function parseInputString(value, utils, format) {
@@ -33541,7 +33801,7 @@
33541
33801
  var _a = props.format,
33542
33802
  format = _a === void 0 ? options.getDefaultFormat() : _a,
33543
33803
  inputValue = props.inputValue,
33544
- onChange = props.onChange,
33804
+ _onChange = props.onChange,
33545
33805
  value = props.value;
33546
33806
  var utils = useUtils();
33547
33807
  var displayDate = getDisplayDate(value, format, utils, value === null, props);
@@ -33557,8 +33817,8 @@
33557
33817
  }
33558
33818
  }, [displayDate, setInnerInputValue, utils, value]);
33559
33819
  var handleKeyboardChange = React.useCallback(function (date) {
33560
- onChange(date, date === null ? null : utils.format(date, format));
33561
- }, [format, onChange, utils]);
33820
+ _onChange(date, date === null ? null : utils.formatByString(date, format));
33821
+ }, [format, _onChange, utils]);
33562
33822
 
33563
33823
  var _c = usePickerState(__assign(__assign({}, props), {
33564
33824
  value: dateValue,
@@ -33572,13 +33832,14 @@
33572
33832
  return __assign(__assign({}, innerInputProps), {
33573
33833
  format: wrapperProps.format,
33574
33834
  inputValue: inputValue || innerInputValue,
33575
- onChange: function (value) {
33835
+ onChange: function onChange(value) {
33576
33836
  setInnerInputValue(value || '');
33577
33837
  var date = value === null ? null : utils.parse(value, wrapperProps.format);
33578
- onChange(date, value);
33838
+
33839
+ _onChange(date, value);
33579
33840
  }
33580
33841
  });
33581
- }, [innerInputProps, innerInputValue, inputValue, onChange, utils, wrapperProps.format]);
33842
+ }, [innerInputProps, innerInputValue, inputValue, _onChange, utils, wrapperProps.format]);
33582
33843
  return {
33583
33844
  inputProps: inputProps,
33584
33845
  wrapperProps: wrapperProps,
@@ -33653,44 +33914,49 @@
33653
33914
  inputProps = _b.inputProps,
33654
33915
  wrapperProps = _b.wrapperProps;
33655
33916
 
33656
- return React.createElement(Wrapper, __assign({
33657
- variant: variant,
33658
- InputComponent: KeyboardDateInput,
33659
- DateInputProps: inputProps
33660
- }, injectedProps, wrapperProps, other), React.createElement(Picker, __assign({}, pickerProps, {
33661
- ToolbarComponent: ToolbarComponent,
33662
- disableToolbar: disableToolbar,
33663
- hideTabs: hideTabs,
33664
- orientation: orientation,
33665
- showActionsBar: showActionsBar,
33666
- showTodayButton: showTodayButton,
33667
- todayLabel: todayLabel,
33668
- ampm: ampm,
33669
- views: views,
33670
- openTo: openTo,
33671
- allowKeyboardControl: allowKeyboardControl,
33672
- minutesStep: minutesStep,
33673
- animateYearScrolling: animateYearScrolling,
33674
- disableFuture: disableFuture,
33675
- disablePast: disablePast,
33676
- leftArrowIcon: leftArrowIcon,
33677
- leftArrowButtonProps: leftArrowButtonProps,
33678
- maxDate: maxDate,
33679
- minDate: minDate,
33680
- strictCompareDates: strictCompareDates,
33681
- onMonthChange: onMonthChange,
33682
- onYearChange: onYearChange,
33683
- renderDay: renderDay,
33684
- dateRangeIcon: dateRangeIcon,
33685
- timeIcon: timeIcon,
33686
- rightArrowIcon: rightArrowIcon,
33687
- rightArrowButtonProps: rightArrowButtonProps,
33688
- shouldDisableDate: shouldDisableDate,
33689
- loadingIndicator: loadingIndicator,
33690
- showShiftButtons: showShiftButtons,
33691
- setShiftFunction: setShiftFunction,
33692
- shiftButtonValues: shiftButtonValues
33693
- })));
33917
+ return (
33918
+ /*#__PURE__*/
33919
+ React.createElement(Wrapper, __assign({
33920
+ variant: variant,
33921
+ InputComponent: KeyboardDateInput,
33922
+ DateInputProps: inputProps
33923
+ }, injectedProps, wrapperProps, other),
33924
+ /*#__PURE__*/
33925
+ React.createElement(Picker, __assign({}, pickerProps, {
33926
+ ToolbarComponent: ToolbarComponent,
33927
+ disableToolbar: disableToolbar,
33928
+ hideTabs: hideTabs,
33929
+ orientation: orientation,
33930
+ showActionsBar: showActionsBar,
33931
+ showTodayButton: showTodayButton,
33932
+ todayLabel: todayLabel,
33933
+ ampm: ampm,
33934
+ views: views,
33935
+ openTo: openTo,
33936
+ allowKeyboardControl: allowKeyboardControl,
33937
+ minutesStep: minutesStep,
33938
+ animateYearScrolling: animateYearScrolling,
33939
+ disableFuture: disableFuture,
33940
+ disablePast: disablePast,
33941
+ leftArrowIcon: leftArrowIcon,
33942
+ leftArrowButtonProps: leftArrowButtonProps,
33943
+ maxDate: maxDate,
33944
+ minDate: minDate,
33945
+ strictCompareDates: strictCompareDates,
33946
+ onMonthChange: onMonthChange,
33947
+ onYearChange: onYearChange,
33948
+ renderDay: renderDay,
33949
+ dateRangeIcon: dateRangeIcon,
33950
+ timeIcon: timeIcon,
33951
+ rightArrowIcon: rightArrowIcon,
33952
+ rightArrowButtonProps: rightArrowButtonProps,
33953
+ shouldDisableDate: shouldDisableDate,
33954
+ loadingIndicator: loadingIndicator,
33955
+ showShiftButtons: showShiftButtons,
33956
+ setShiftFunction: setShiftFunction,
33957
+ shiftButtonValues: shiftButtonValues
33958
+ })))
33959
+ );
33694
33960
  }
33695
33961
 
33696
33962
  return WrappedKeyboardPicker;
@@ -33706,7 +33972,7 @@
33706
33972
  function useOptions(props) {
33707
33973
  var utils = useUtils();
33708
33974
  return {
33709
- getDefaultFormat: function () {
33975
+ getDefaultFormat: function getDefaultFormat() {
33710
33976
  return getFormatByViews(props.views, utils);
33711
33977
  }
33712
33978
  };
@@ -33780,7 +34046,7 @@
33780
34046
  };
33781
34047
  }
33782
34048
 
33783
- var TimePickerToolbar = function (_a) {
34049
+ var TimePickerToolbar = function TimePickerToolbar(_a) {
33784
34050
  var _b, _c, _d;
33785
34051
 
33786
34052
  var date = _a.date,
@@ -33799,63 +34065,84 @@
33799
34065
  handleMeridiemChange = _e.handleMeridiemChange;
33800
34066
 
33801
34067
  var clockTypographyVariant = isLandscape ? 'h3' : 'h2';
33802
- return React.createElement(PickerToolbar, {
33803
- isLandscape: isLandscape,
33804
- className: clsx((_b = {}, _b[classes.toolbarLandscape] = isLandscape, _b[classes.toolbarAmpmLeftPadding] = ampm && !isLandscape, _b))
33805
- }, React.createElement("div", {
33806
- className: clsx(classes.hourMinuteLabel, (_c = {}, _c[classes.hourMinuteLabelLandscape] = isLandscape, _c[classes.hourMinuteLabelReverse] = theme.direction === 'rtl', _c))
33807
- }, arrayIncludes(views, 'hours') && React.createElement(ToolbarButton$1, {
33808
- variant: clockTypographyVariant,
33809
- onClick: function () {
33810
- return setOpenView(ClockType$1.HOURS);
33811
- },
33812
- selected: openView === ClockType$1.HOURS,
33813
- label: utils.getHourText(date, Boolean(ampm))
33814
- }), arrayIncludes(views, ['hours', 'minutes']) && React.createElement(ToolbarText, {
33815
- label: ":",
33816
- variant: clockTypographyVariant,
33817
- selected: false,
33818
- className: classes.separator
33819
- }), arrayIncludes(views, 'minutes') && React.createElement(ToolbarButton$1, {
33820
- variant: clockTypographyVariant,
33821
- onClick: function () {
33822
- return setOpenView(ClockType$1.MINUTES);
33823
- },
33824
- selected: openView === ClockType$1.MINUTES,
33825
- label: utils.getMinuteText(date)
33826
- }), arrayIncludes(views, ['minutes', 'seconds']) && React.createElement(ToolbarText, {
33827
- variant: "h2",
33828
- label: ":",
33829
- selected: false,
33830
- className: classes.separator
33831
- }), arrayIncludes(views, 'seconds') && React.createElement(ToolbarButton$1, {
33832
- variant: "h2",
33833
- onClick: function () {
33834
- return setOpenView(ClockType$1.SECONDS);
33835
- },
33836
- selected: openView === ClockType$1.SECONDS,
33837
- label: utils.getSecondText(date)
33838
- })), ampm && React.createElement("div", {
33839
- className: clsx(classes.ampmSelection, (_d = {}, _d[classes.ampmLandscape] = isLandscape, _d[classes.ampmSelectionWithSeconds] = arrayIncludes(views, 'seconds'), _d))
33840
- }, React.createElement(ToolbarButton$1, {
33841
- disableRipple: true,
33842
- variant: "subtitle1",
33843
- selected: meridiemMode === 'am',
33844
- typographyClassName: classes.ampmLabel,
33845
- label: utils.getMeridiemText('am'),
33846
- onClick: function () {
33847
- return handleMeridiemChange('am');
33848
- }
33849
- }), React.createElement(ToolbarButton$1, {
33850
- disableRipple: true,
33851
- variant: "subtitle1",
33852
- selected: meridiemMode === 'pm',
33853
- typographyClassName: classes.ampmLabel,
33854
- label: utils.getMeridiemText('pm'),
33855
- onClick: function () {
33856
- return handleMeridiemChange('pm');
33857
- }
33858
- })));
34068
+ return (
34069
+ /*#__PURE__*/
34070
+ React.createElement(PickerToolbar, {
34071
+ isLandscape: isLandscape,
34072
+ className: clsx((_b = {}, _b[classes.toolbarLandscape] = isLandscape, _b[classes.toolbarAmpmLeftPadding] = ampm && !isLandscape, _b))
34073
+ },
34074
+ /*#__PURE__*/
34075
+ React.createElement("div", {
34076
+ className: clsx(classes.hourMinuteLabel, (_c = {}, _c[classes.hourMinuteLabelLandscape] = isLandscape, _c[classes.hourMinuteLabelReverse] = theme.direction === 'rtl', _c))
34077
+ }, arrayIncludes(views, 'hours') &&
34078
+ /*#__PURE__*/
34079
+ React.createElement(ToolbarButton$1, {
34080
+ variant: clockTypographyVariant,
34081
+ onClick: function onClick() {
34082
+ return setOpenView(ClockType$1.HOURS);
34083
+ },
34084
+ selected: openView === ClockType$1.HOURS,
34085
+ label: utils.formatByString(date, ampm ? utils.formats.hours12h : utils.formats.hours24h)
34086
+ }), arrayIncludes(views, ['hours', 'minutes']) &&
34087
+ /*#__PURE__*/
34088
+ React.createElement(ToolbarText, {
34089
+ label: ":",
34090
+ variant: clockTypographyVariant,
34091
+ selected: false,
34092
+ className: classes.separator
34093
+ }), arrayIncludes(views, 'minutes') &&
34094
+ /*#__PURE__*/
34095
+ React.createElement(ToolbarButton$1, {
34096
+ variant: clockTypographyVariant,
34097
+ onClick: function onClick() {
34098
+ return setOpenView(ClockType$1.MINUTES);
34099
+ },
34100
+ selected: openView === ClockType$1.MINUTES,
34101
+ label: utils.formatByString(date, utils.formats.minutes)
34102
+ }), arrayIncludes(views, ['minutes', 'seconds']) &&
34103
+ /*#__PURE__*/
34104
+ React.createElement(ToolbarText, {
34105
+ variant: "h2",
34106
+ label: ":",
34107
+ selected: false,
34108
+ className: classes.separator
34109
+ }), arrayIncludes(views, 'seconds') &&
34110
+ /*#__PURE__*/
34111
+ React.createElement(ToolbarButton$1, {
34112
+ variant: "h2",
34113
+ onClick: function onClick() {
34114
+ return setOpenView(ClockType$1.SECONDS);
34115
+ },
34116
+ selected: openView === ClockType$1.SECONDS,
34117
+ label: utils.formatByString(date, utils.formats.seconds)
34118
+ })), ampm &&
34119
+ /*#__PURE__*/
34120
+ React.createElement("div", {
34121
+ className: clsx(classes.ampmSelection, (_d = {}, _d[classes.ampmLandscape] = isLandscape, _d[classes.ampmSelectionWithSeconds] = arrayIncludes(views, 'seconds'), _d))
34122
+ },
34123
+ /*#__PURE__*/
34124
+ React.createElement(ToolbarButton$1, {
34125
+ disableRipple: true,
34126
+ variant: "subtitle1",
34127
+ selected: meridiemMode === 'am',
34128
+ typographyClassName: classes.ampmLabel,
34129
+ label: utils.getMeridiemText('am'),
34130
+ onClick: function onClick() {
34131
+ return handleMeridiemChange('am');
34132
+ }
34133
+ }),
34134
+ /*#__PURE__*/
34135
+ React.createElement(ToolbarButton$1, {
34136
+ disableRipple: true,
34137
+ variant: "subtitle1",
34138
+ selected: meridiemMode === 'pm',
34139
+ typographyClassName: classes.ampmLabel,
34140
+ label: utils.getMeridiemText('pm'),
34141
+ onClick: function onClick() {
34142
+ return handleMeridiemChange('pm');
34143
+ }
34144
+ })))
34145
+ );
33859
34146
  };
33860
34147
 
33861
34148
  var defaultProps$2 = __assign(__assign({}, timePickerDefaultProps), {
@@ -33866,10 +34153,10 @@
33866
34153
  function useOptions$1(props) {
33867
34154
  var utils = useUtils();
33868
34155
  return {
33869
- getDefaultFormat: function () {
34156
+ getDefaultFormat: function getDefaultFormat() {
33870
34157
  return pick12hOr24hFormat(props.format, props.ampm, {
33871
- '12h': utils.time12hFormat,
33872
- '24h': utils.time24hFormat
34158
+ '12h': utils.formats.hours12h,
34159
+ '24h': utils.formats.hours24h
33873
34160
  });
33874
34161
  }
33875
34162
  };
@@ -33882,7 +34169,7 @@
33882
34169
  var KeyboardTimePicker = makeKeyboardPicker({
33883
34170
  useOptions: useOptions$1,
33884
34171
  DefaultToolbarComponent: TimePickerToolbar,
33885
- getCustomProps: function (props) {
34172
+ getCustomProps: function getCustomProps(props) {
33886
34173
  return {
33887
34174
  refuse: props.ampm ? /[^\dap]+/gi : /[^\d]+/gi
33888
34175
  };
@@ -33891,27 +34178,43 @@
33891
34178
  TimePicker.defaultProps = defaultProps$2;
33892
34179
  KeyboardTimePicker.defaultProps = defaultProps$2;
33893
34180
 
33894
- var TimeIcon = function (props) {
33895
- return React__default.createElement(SvgIcon$2, __assign({}, props), React__default.createElement("path", {
33896
- d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
33897
- }), React__default.createElement("path", {
33898
- fill: "none",
33899
- d: "M0 0h24v24H0z"
33900
- }), React__default.createElement("path", {
33901
- d: "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"
33902
- }));
34181
+ var TimeIcon = function TimeIcon(props) {
34182
+ return (
34183
+ /*#__PURE__*/
34184
+ React__default.createElement(SvgIcon$2, __assign({}, props),
34185
+ /*#__PURE__*/
34186
+ React__default.createElement("path", {
34187
+ d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
34188
+ }),
34189
+ /*#__PURE__*/
34190
+ React__default.createElement("path", {
34191
+ fill: "none",
34192
+ d: "M0 0h24v24H0z"
34193
+ }),
34194
+ /*#__PURE__*/
34195
+ React__default.createElement("path", {
34196
+ d: "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"
34197
+ }))
34198
+ );
33903
34199
  };
33904
34200
 
33905
- var DateRangeIcon = function (props) {
33906
- return React__default.createElement(SvgIcon$2, __assign({}, props), React__default.createElement("path", {
33907
- d: "M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"
33908
- }), React__default.createElement("path", {
33909
- fill: "none",
33910
- d: "M0 0h24v24H0z"
33911
- }));
34201
+ var DateRangeIcon = function DateRangeIcon(props) {
34202
+ return (
34203
+ /*#__PURE__*/
34204
+ React__default.createElement(SvgIcon$2, __assign({}, props),
34205
+ /*#__PURE__*/
34206
+ React__default.createElement("path", {
34207
+ d: "M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"
34208
+ }),
34209
+ /*#__PURE__*/
34210
+ React__default.createElement("path", {
34211
+ fill: "none",
34212
+ d: "M0 0h24v24H0z"
34213
+ }))
34214
+ );
33912
34215
  };
33913
34216
 
33914
- var viewToTabIndex = function (openView) {
34217
+ var viewToTabIndex = function viewToTabIndex(openView) {
33915
34218
  if (openView === 'date' || openView === 'year') {
33916
34219
  return 'date';
33917
34220
  }
@@ -33919,7 +34222,7 @@
33919
34222
  return 'time';
33920
34223
  };
33921
34224
 
33922
- var tabIndexToView = function (tab) {
34225
+ var tabIndexToView = function tabIndexToView(tab) {
33923
34226
  if (tab === 'date') {
33924
34227
  return 'date';
33925
34228
  }
@@ -33929,7 +34232,7 @@
33929
34232
 
33930
34233
  var useStyles$g = makeStyles(function (theme) {
33931
34234
  // prettier-ignore
33932
- var tabsBackground = theme.palette.type === 'light' ? theme.palette.primary.main : theme.palette.background.default;
34235
+ var tabsBackground = theme.palette.type === 'light' ? theme.palette.primary.main : theme.palette.background["default"];
33933
34236
  return {
33934
34237
  tabs: {
33935
34238
  color: theme.palette.getContrastText(tabsBackground),
@@ -33939,7 +34242,7 @@
33939
34242
  }, {
33940
34243
  name: 'MuiPickerDTTabs'
33941
34244
  });
33942
- var DateTimePickerTabs = function (_a) {
34245
+ var DateTimePickerTabs = function DateTimePickerTabs(_a) {
33943
34246
  var view = _a.view,
33944
34247
  onChange = _a.onChange,
33945
34248
  dateRangeIcon = _a.dateRangeIcon,
@@ -33948,29 +34251,46 @@
33948
34251
  var theme = useTheme();
33949
34252
  var indicatorColor = theme.palette.type === 'light' ? 'secondary' : 'primary';
33950
34253
 
33951
- var handleChange = function (e, value) {
34254
+ var handleChange = function handleChange(e, value) {
33952
34255
  if (value !== viewToTabIndex(view)) {
33953
34256
  onChange(tabIndexToView(value));
33954
34257
  }
33955
34258
  };
33956
34259
 
33957
- return React.createElement(Paper$2, null, React.createElement(Tabs$1, {
33958
- variant: "fullWidth",
33959
- value: viewToTabIndex(view),
33960
- onChange: handleChange,
33961
- className: classes.tabs,
33962
- indicatorColor: indicatorColor
33963
- }, React.createElement(Tab$1, {
33964
- value: "date",
33965
- icon: React.createElement(React.Fragment, null, dateRangeIcon)
33966
- }), React.createElement(Tab$1, {
33967
- value: "time",
33968
- icon: React.createElement(React.Fragment, null, timeIcon)
33969
- })));
34260
+ return (
34261
+ /*#__PURE__*/
34262
+ React.createElement(Paper$2, null,
34263
+ /*#__PURE__*/
34264
+ React.createElement(Tabs$1, {
34265
+ variant: "fullWidth",
34266
+ value: viewToTabIndex(view),
34267
+ onChange: handleChange,
34268
+ className: classes.tabs,
34269
+ indicatorColor: indicatorColor
34270
+ },
34271
+ /*#__PURE__*/
34272
+ React.createElement(Tab$1, {
34273
+ value: "date",
34274
+ icon:
34275
+ /*#__PURE__*/
34276
+ React.createElement(React.Fragment, null, dateRangeIcon)
34277
+ }),
34278
+ /*#__PURE__*/
34279
+ React.createElement(Tab$1, {
34280
+ value: "time",
34281
+ icon:
34282
+ /*#__PURE__*/
34283
+ React.createElement(React.Fragment, null, timeIcon)
34284
+ })))
34285
+ );
33970
34286
  };
33971
34287
  DateTimePickerTabs.defaultProps = {
33972
- dateRangeIcon: React.createElement(DateRangeIcon, null),
33973
- timeIcon: React.createElement(TimeIcon, null)
34288
+ dateRangeIcon:
34289
+ /*#__PURE__*/
34290
+ React.createElement(DateRangeIcon, null),
34291
+ timeIcon:
34292
+ /*#__PURE__*/
34293
+ React.createElement(TimeIcon, null)
33974
34294
  };
33975
34295
 
33976
34296
  var useStyles$h = makeStyles(function (_) {
@@ -33988,7 +34308,7 @@
33988
34308
  }, {
33989
34309
  name: 'MuiPickerDTToolbar'
33990
34310
  });
33991
- var DateTimePickerToolbar = function (_a) {
34311
+ var DateTimePickerToolbar = function DateTimePickerToolbar(_a) {
33992
34312
  var date = _a.date,
33993
34313
  openView = _a.openView,
33994
34314
  setOpenView = _a.setOpenView,
@@ -34007,84 +34327,117 @@
34007
34327
 
34008
34328
  var theme = useTheme();
34009
34329
  var rtl = theme.direction === 'rtl';
34010
- return React.createElement(React.Fragment, null, React.createElement(PickerToolbar, {
34011
- isLandscape: false,
34012
- className: classes.toolbar
34013
- }, React.createElement(StyledGrid, {
34014
- container: true,
34015
- justify: "center",
34016
- wrap: "nowrap"
34017
- }, React.createElement(StyledGrid, {
34018
- item: true,
34019
- container: true,
34020
- xs: 5,
34021
- justify: "flex-start",
34022
- direction: "column"
34023
- }, React.createElement("div", null, React.createElement(ToolbarButton$1, {
34024
- variant: "subtitle1",
34025
- onClick: function () {
34026
- return setOpenView('year');
34027
- },
34028
- selected: openView === 'year',
34029
- label: utils.getYearText(date)
34030
- })), React.createElement("div", null, React.createElement(ToolbarButton$1, {
34031
- variant: "h4",
34032
- onClick: function () {
34033
- return setOpenView('date');
34034
- },
34035
- selected: openView === 'date',
34036
- label: utils.getDateTimePickerHeaderText(date)
34037
- }))), React.createElement(StyledGrid, {
34038
- item: true,
34039
- container: true,
34040
- xs: 6,
34041
- justify: "center",
34042
- alignItems: "flex-end",
34043
- direction: rtl ? 'row-reverse' : 'row'
34044
- }, React.createElement(ToolbarButton$1, {
34045
- variant: "h3",
34046
- onClick: function () {
34047
- return setOpenView('hours');
34048
- },
34049
- selected: openView === 'hours',
34050
- label: utils.getHourText(date, ampm)
34051
- }), React.createElement(ToolbarText, {
34052
- variant: "h3",
34053
- label: ":",
34054
- className: classes.separator
34055
- }), React.createElement(ToolbarButton$1, {
34056
- variant: "h3",
34057
- onClick: function () {
34058
- return setOpenView('minutes');
34059
- },
34060
- selected: openView === 'minutes',
34061
- label: utils.getMinuteText(date)
34062
- })), ampm && React.createElement(StyledGrid, {
34063
- item: true,
34064
- container: true,
34065
- xs: 1,
34066
- direction: "column",
34067
- justify: "flex-end"
34068
- }, React.createElement(ToolbarButton$1, {
34069
- variant: "subtitle1",
34070
- selected: meridiemMode === 'am',
34071
- label: utils.getMeridiemText('am'),
34072
- onClick: function () {
34073
- return handleMeridiemChange('am');
34074
- }
34075
- }), React.createElement(ToolbarButton$1, {
34076
- variant: "subtitle1",
34077
- selected: meridiemMode === 'pm',
34078
- label: utils.getMeridiemText('pm'),
34079
- onClick: function () {
34080
- return handleMeridiemChange('pm');
34081
- }
34082
- })))), showTabs && React.createElement(DateTimePickerTabs, {
34083
- dateRangeIcon: dateRangeIcon,
34084
- timeIcon: timeIcon,
34085
- view: openView,
34086
- onChange: setOpenView
34087
- }));
34330
+ return (
34331
+ /*#__PURE__*/
34332
+ React.createElement(React.Fragment, null,
34333
+ /*#__PURE__*/
34334
+ React.createElement(PickerToolbar, {
34335
+ isLandscape: false,
34336
+ className: classes.toolbar
34337
+ },
34338
+ /*#__PURE__*/
34339
+ React.createElement(StyledGrid, {
34340
+ container: true,
34341
+ justify: "center",
34342
+ wrap: "nowrap"
34343
+ },
34344
+ /*#__PURE__*/
34345
+ React.createElement(StyledGrid, {
34346
+ item: true,
34347
+ container: true,
34348
+ xs: 5,
34349
+ justify: "flex-start",
34350
+ direction: "column"
34351
+ },
34352
+ /*#__PURE__*/
34353
+ React.createElement("div", null,
34354
+ /*#__PURE__*/
34355
+ React.createElement(ToolbarButton$1, {
34356
+ variant: "subtitle1",
34357
+ onClick: function onClick() {
34358
+ return setOpenView('year');
34359
+ },
34360
+ selected: openView === 'year',
34361
+ label: utils.formatByString(date, utils.formats.year)
34362
+ })),
34363
+ /*#__PURE__*/
34364
+ React.createElement("div", null,
34365
+ /*#__PURE__*/
34366
+ React.createElement(ToolbarButton$1, {
34367
+ variant: "h4",
34368
+ onClick: function onClick() {
34369
+ return setOpenView('date');
34370
+ },
34371
+ selected: openView === 'date',
34372
+ label: utils.formatByString(date, utils.formats.shortDate)
34373
+ }))),
34374
+ /*#__PURE__*/
34375
+ React.createElement(StyledGrid, {
34376
+ item: true,
34377
+ container: true,
34378
+ xs: 6,
34379
+ justify: "center",
34380
+ alignItems: "flex-end",
34381
+ direction: rtl ? 'row-reverse' : 'row'
34382
+ },
34383
+ /*#__PURE__*/
34384
+ React.createElement(ToolbarButton$1, {
34385
+ variant: "h3",
34386
+ onClick: function onClick() {
34387
+ return setOpenView('hours');
34388
+ },
34389
+ selected: openView === 'hours',
34390
+ label: utils.formatByString(date, ampm ? utils.formats.hours12h : utils.formats.hours24h)
34391
+ }),
34392
+ /*#__PURE__*/
34393
+ React.createElement(ToolbarText, {
34394
+ variant: "h3",
34395
+ label: ":",
34396
+ className: classes.separator
34397
+ }),
34398
+ /*#__PURE__*/
34399
+ React.createElement(ToolbarButton$1, {
34400
+ variant: "h3",
34401
+ onClick: function onClick() {
34402
+ return setOpenView('minutes');
34403
+ },
34404
+ selected: openView === 'minutes',
34405
+ label: utils.formatByString(date, utils.formats.minutes)
34406
+ })), ampm &&
34407
+ /*#__PURE__*/
34408
+ React.createElement(StyledGrid, {
34409
+ item: true,
34410
+ container: true,
34411
+ xs: 1,
34412
+ direction: "column",
34413
+ justify: "flex-end"
34414
+ },
34415
+ /*#__PURE__*/
34416
+ React.createElement(ToolbarButton$1, {
34417
+ variant: "subtitle1",
34418
+ selected: meridiemMode === 'am',
34419
+ label: utils.getMeridiemText('am'),
34420
+ onClick: function onClick() {
34421
+ return handleMeridiemChange('am');
34422
+ }
34423
+ }),
34424
+ /*#__PURE__*/
34425
+ React.createElement(ToolbarButton$1, {
34426
+ variant: "subtitle1",
34427
+ selected: meridiemMode === 'pm',
34428
+ label: utils.getMeridiemText('pm'),
34429
+ onClick: function onClick() {
34430
+ return handleMeridiemChange('pm');
34431
+ }
34432
+ })))), showTabs &&
34433
+ /*#__PURE__*/
34434
+ React.createElement(DateTimePickerTabs, {
34435
+ dateRangeIcon: dateRangeIcon,
34436
+ timeIcon: timeIcon,
34437
+ view: openView,
34438
+ onChange: setOpenView
34439
+ }))
34440
+ );
34088
34441
  };
34089
34442
 
34090
34443
  var defaultProps$3 = __assign(__assign({}, dateTimePickerDefaultProps), {
@@ -34104,10 +34457,10 @@
34104
34457
  }
34105
34458
 
34106
34459
  return {
34107
- getDefaultFormat: function () {
34460
+ getDefaultFormat: function getDefaultFormat() {
34108
34461
  return pick12hOr24hFormat(props.format, props.ampm, {
34109
- '12h': utils.dateTime12hFormat,
34110
- '24h': utils.dateTime24hFormat
34462
+ '12h': utils.formats.fullDateTime12h,
34463
+ '24h': utils.formats.fullDateTime24h
34111
34464
  });
34112
34465
  }
34113
34466
  };
@@ -34120,7 +34473,7 @@
34120
34473
  var KeyboardDateTimePicker = makeKeyboardPicker({
34121
34474
  useOptions: useOptions$2,
34122
34475
  DefaultToolbarComponent: DateTimePickerToolbar,
34123
- getCustomProps: function (props) {
34476
+ getCustomProps: function getCustomProps(props) {
34124
34477
  return {
34125
34478
  refuse: props.ampm ? /[^\dap]+/gi : /[^\d]+/gi
34126
34479
  };