@docsvision/material-ui-pickers 3.2.0-beta.23 → 3.2.0-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.size-snapshot.json +26 -0
- package/{DatePicker → build/DatePicker}/DatePicker.d.ts +1 -1
- package/{DatePicker → build/DatePicker}/DatePicker.js +1 -1
- package/{DatePicker → build/DatePicker}/DatePickerToolbar.d.ts +0 -0
- package/{DatePicker → build/DatePicker}/DatePickerToolbar.js +0 -0
- package/{DatePicker → build/DatePicker}/index.d.ts +0 -0
- package/{DatePicker → build/DatePicker}/index.js +0 -0
- package/{DateTimePicker → build/DateTimePicker}/DateTimePicker.d.ts +0 -0
- package/{DateTimePicker → build/DateTimePicker}/DateTimePicker.js +1 -1
- package/{DateTimePicker → build/DateTimePicker}/DateTimePickerTabs.d.ts +0 -0
- package/{DateTimePicker → build/DateTimePicker}/DateTimePickerTabs.js +0 -0
- package/{DateTimePicker → build/DateTimePicker}/DateTimePickerToolbar.d.ts +0 -0
- package/{DateTimePicker → build/DateTimePicker}/DateTimePickerToolbar.js +0 -0
- package/{DateTimePicker → build/DateTimePicker}/index.d.ts +0 -0
- package/{DateTimePicker → build/DateTimePicker}/index.js +0 -0
- package/{MuiPickersUtilsProvider.d.ts → build/MuiPickersUtilsProvider.d.ts} +0 -0
- package/{MuiPickersUtilsProvider.js → build/MuiPickersUtilsProvider.js} +0 -0
- package/{Picker → build/Picker}/Picker.d.ts +0 -0
- package/{Picker → build/Picker}/Picker.js +1 -1
- package/{Picker → build/Picker}/WrappedKeyboardPicker.d.ts +0 -0
- package/{Picker → build/Picker}/WrappedKeyboardPicker.js +0 -0
- package/{Picker → build/Picker}/WrappedPurePicker.d.ts +0 -0
- package/{Picker → build/Picker}/WrappedPurePicker.js +0 -0
- package/{README.md → build/README.md} +1 -1
- package/{Rifm → build/Rifm}/Rifm.d.ts +0 -0
- package/{Rifm → build/Rifm}/Rifm.js +0 -0
- package/{TimePicker → build/TimePicker}/TimePicker.d.ts +0 -0
- package/{TimePicker → build/TimePicker}/TimePicker.js +1 -1
- package/{TimePicker → build/TimePicker}/TimePickerToolbar.d.ts +0 -0
- package/{TimePicker → build/TimePicker}/TimePickerToolbar.js +0 -0
- package/{TimePicker → build/TimePicker}/index.d.ts +0 -0
- package/{TimePicker → build/TimePicker}/index.js +0 -0
- package/{_helpers → build/_helpers}/date-utils.d.ts +0 -0
- package/{_helpers → build/_helpers}/date-utils.js +0 -0
- package/{_helpers → build/_helpers}/text-field-helper.d.ts +1 -1
- package/{_helpers → build/_helpers}/text-field-helper.js +0 -0
- package/{_helpers → build/_helpers}/time-utils.d.ts +0 -0
- package/{_helpers → build/_helpers}/time-utils.js +0 -0
- package/{_helpers → build/_helpers}/utils.d.ts +0 -0
- package/{_helpers → build/_helpers}/utils.js +0 -0
- package/{_shared → build/_shared}/KeyboardDateInput.d.ts +0 -0
- package/{_shared → build/_shared}/KeyboardDateInput.js +1 -1
- package/{_shared → build/_shared}/ModalDialog.d.ts +2 -2
- package/{_shared → build/_shared}/ModalDialog.js +0 -0
- package/{_shared → build/_shared}/PickerToolbar.d.ts +0 -0
- package/{_shared → build/_shared}/PickerToolbar.js +0 -0
- package/{_shared → build/_shared}/PureDateInput.d.ts +0 -0
- package/{_shared → build/_shared}/PureDateInput.js +1 -1
- package/{_shared → build/_shared}/ToolbarButton.d.ts +2 -2
- package/{_shared → build/_shared}/ToolbarButton.js +0 -0
- package/{_shared → build/_shared}/ToolbarText.d.ts +0 -0
- package/{_shared → build/_shared}/ToolbarText.js +0 -0
- package/{_shared → build/_shared}/WithUtils.d.ts +0 -0
- package/{_shared → build/_shared}/WithUtils.js +0 -0
- package/{_shared → build/_shared}/hooks/useIsLandscape.d.ts +0 -0
- package/{_shared → build/_shared}/hooks/useIsLandscape.js +0 -0
- package/{_shared → build/_shared}/hooks/useKeyDown.d.ts +0 -0
- package/{_shared → build/_shared}/hooks/useKeyDown.js +0 -0
- package/{_shared → build/_shared}/hooks/useKeyboardPickerState.d.ts +0 -0
- package/{_shared → build/_shared}/hooks/useKeyboardPickerState.js +2 -2
- package/{_shared → build/_shared}/hooks/useOpenState.d.ts +0 -0
- package/{_shared → build/_shared}/hooks/useOpenState.js +0 -0
- package/{_shared → build/_shared}/hooks/usePickerState.d.ts +0 -0
- package/{_shared → build/_shared}/hooks/usePickerState.js +0 -0
- package/{_shared → build/_shared}/hooks/useUtils.d.ts +0 -0
- package/{_shared → build/_shared}/hooks/useUtils.js +0 -0
- package/{_shared → build/_shared}/hooks/useViews.d.ts +0 -0
- package/{_shared → build/_shared}/hooks/useViews.js +0 -0
- package/{_shared → build/_shared}/icons/ArrowLeftIcon.d.ts +0 -0
- package/{_shared → build/_shared}/icons/ArrowLeftIcon.js +0 -0
- package/{_shared → build/_shared}/icons/ArrowRightIcon.d.ts +0 -0
- package/{_shared → build/_shared}/icons/ArrowRightIcon.js +0 -0
- package/{_shared → build/_shared}/icons/DateRangeIcon.d.ts +0 -0
- package/{_shared → build/_shared}/icons/DateRangeIcon.js +0 -0
- package/{_shared → build/_shared}/icons/KeyboardIcon.d.ts +0 -0
- package/{_shared → build/_shared}/icons/KeyboardIcon.js +0 -0
- package/{_shared → build/_shared}/icons/TimeIcon.d.ts +0 -0
- package/{_shared → build/_shared}/icons/TimeIcon.js +0 -0
- package/{constants → build/constants}/ClockType.d.ts +0 -0
- package/{constants → build/constants}/ClockType.js +0 -0
- package/{constants → build/constants}/dimensions.d.ts +0 -0
- package/{constants → build/constants}/dimensions.js +0 -0
- package/{constants → build/constants}/prop-types.d.ts +0 -0
- package/{constants → build/constants}/prop-types.js +1 -1
- package/{dist → build/dist}/material-ui-pickers.esm.js +11 -10
- package/build/dist/material-ui-pickers.esm.js.map +1 -0
- package/{dist → build/dist}/material-ui-pickers.js +61 -60
- package/build/dist/material-ui-pickers.js.map +1 -0
- package/{dist → build/dist}/material-ui-pickers.umd.js +4524 -5802
- package/build/dist/material-ui-pickers.umd.min.js +1 -0
- package/{index.d.ts → build/index.d.ts} +0 -0
- package/{index.js → build/index.js} +0 -0
- package/build/package.json +62 -0
- package/{typings → build/typings}/BasePicker.d.ts +0 -0
- package/{typings → build/typings}/BasePicker.js +0 -0
- package/{typings → build/typings}/date.d.ts +0 -0
- package/{typings → build/typings}/date.js +0 -0
- package/{typings → build/typings}/extendMui.d.ts +0 -0
- package/{typings → build/typings}/extendMui.js +0 -0
- package/{typings → build/typings}/overrides.d.ts +0 -0
- package/{typings → build/typings}/overrides.js +0 -0
- package/{views → build/views}/Calendar/Calendar.d.ts +0 -0
- package/{views → build/views}/Calendar/Calendar.js +2 -1
- package/{views → build/views}/Calendar/CalendarHeader.d.ts +0 -0
- package/{views → build/views}/Calendar/CalendarHeader.js +0 -0
- package/{views → build/views}/Calendar/Day.d.ts +0 -0
- package/{views → build/views}/Calendar/Day.js +0 -0
- package/{views → build/views}/Calendar/DayWrapper.d.ts +0 -0
- package/{views → build/views}/Calendar/DayWrapper.js +0 -0
- package/{views → build/views}/Calendar/SlideTransition.d.ts +0 -0
- package/{views → build/views}/Calendar/SlideTransition.js +0 -0
- package/{views → build/views}/Clock/Clock.d.ts +1 -1
- package/{views → build/views}/Clock/Clock.js +0 -0
- package/{views → build/views}/Clock/ClockNumber.d.ts +0 -0
- package/{views → build/views}/Clock/ClockNumber.js +0 -0
- package/{views → build/views}/Clock/ClockNumbers.d.ts +0 -0
- package/{views → build/views}/Clock/ClockNumbers.js +0 -0
- package/{views → build/views}/Clock/ClockPointer.d.ts +1 -1
- package/{views → build/views}/Clock/ClockPointer.js +0 -0
- package/{views → build/views}/Clock/ClockView.d.ts +0 -0
- package/{views → build/views}/Clock/ClockView.js +0 -0
- package/{views → build/views}/Month/Month.d.ts +0 -0
- package/{views → build/views}/Month/Month.js +0 -0
- package/{views → build/views}/Month/MonthView.d.ts +0 -0
- package/{views → build/views}/Month/MonthView.js +0 -0
- package/{views → build/views}/Year/Year.d.ts +0 -0
- package/{views → build/views}/Year/Year.js +0 -0
- package/{views → build/views}/Year/YearView.d.ts +0 -0
- package/{views → build/views}/Year/YearView.js +0 -0
- package/{wrappers → build/wrappers}/InlineWrapper.d.ts +0 -0
- package/{wrappers → build/wrappers}/InlineWrapper.js +0 -0
- package/{wrappers → build/wrappers}/ModalWrapper.d.ts +0 -0
- package/{wrappers → build/wrappers}/ModalWrapper.js +0 -0
- package/{wrappers → build/wrappers}/StaticWrapper.d.ts +0 -0
- package/{wrappers → build/wrappers}/StaticWrapper.js +0 -0
- package/{wrappers → build/wrappers}/Wrapper.d.ts +0 -0
- package/{wrappers → build/wrappers}/Wrapper.js +0 -0
- package/copy.js +58 -0
- package/coverage/clover.xml +601 -0
- package/coverage/coverage-final.json +22 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +79 -0
- package/coverage/lcov-report/index.html +201 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +170 -0
- package/coverage/lcov-report/src/MuiPickersUtilsProvider.tsx.html +186 -0
- package/coverage/lcov-report/src/_helpers/date-utils.ts.html +345 -0
- package/coverage/lcov-report/src/_helpers/index.html +123 -0
- package/coverage/lcov-report/src/_helpers/time-utils.ts.html +318 -0
- package/coverage/lcov-report/src/_helpers/utils.ts.html +93 -0
- package/coverage/lcov-report/src/_shared/ModalDialog.tsx.html +411 -0
- package/coverage/lcov-report/src/_shared/WithUtils.tsx.html +126 -0
- package/coverage/lcov-report/src/_shared/hooks/index.html +110 -0
- package/coverage/lcov-report/src/_shared/hooks/useKeyDown.ts.html +171 -0
- package/coverage/lcov-report/src/_shared/hooks/useUtils.ts.html +129 -0
- package/coverage/lcov-report/src/_shared/icons/ArrowLeftIcon.tsx.html +102 -0
- package/coverage/lcov-report/src/_shared/icons/ArrowRightIcon.tsx.html +102 -0
- package/coverage/lcov-report/src/_shared/icons/index.html +110 -0
- package/coverage/lcov-report/src/_shared/index.html +110 -0
- package/coverage/lcov-report/src/constants/ClockType.ts.html +102 -0
- package/coverage/lcov-report/src/constants/dimensions.ts.html +84 -0
- package/coverage/lcov-report/src/constants/index.html +110 -0
- package/coverage/lcov-report/src/index.html +97 -0
- package/coverage/lcov-report/src/views/Calendar/Calendar.tsx.html +1152 -0
- package/coverage/lcov-report/src/views/Calendar/CalendarHeader.tsx.html +492 -0
- package/coverage/lcov-report/src/views/Calendar/Day.tsx.html +360 -0
- package/coverage/lcov-report/src/views/Calendar/DayWrapper.tsx.html +168 -0
- package/coverage/lcov-report/src/views/Calendar/SlideTransition.tsx.html +369 -0
- package/coverage/lcov-report/src/views/Calendar/index.html +149 -0
- package/coverage/lcov-report/src/views/Clock/Clock.tsx.html +585 -0
- package/coverage/lcov-report/src/views/Clock/ClockPointer.tsx.html +381 -0
- package/coverage/lcov-report/src/views/Clock/index.html +110 -0
- package/coverage/lcov-report/src/views/Month/Month.tsx.html +297 -0
- package/coverage/lcov-report/src/views/Month/MonthView.tsx.html +351 -0
- package/coverage/lcov-report/src/views/Month/index.html +110 -0
- package/coverage/lcov.info +1094 -0
- package/package.json +135 -62
- package/remove-prop-types.js +37 -0
- package/rollup.config.js +145 -0
- package/tsconfig.json +21 -0
- package/typings.d.ts +6 -0
- package/dist/material-ui-pickers.esm.js.map +0 -1
- package/dist/material-ui-pickers.js.map +0 -1
- package/dist/material-ui-pickers.umd.min.js +0 -1
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var tslib_1 = require('tslib');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var React__default = _interopDefault(React);
|
|
10
10
|
var PropTypes = require('prop-types');
|
|
@@ -84,10 +84,10 @@ var ToolbarText = function (_a) {
|
|
|
84
84
|
label = _a.label,
|
|
85
85
|
_c = _a.className,
|
|
86
86
|
className = _c === void 0 ? null : _c,
|
|
87
|
-
other =
|
|
87
|
+
other = tslib_1.__rest(_a, ["selected", "label", "className"]);
|
|
88
88
|
|
|
89
89
|
var classes = useStyles();
|
|
90
|
-
return React.createElement(Typography,
|
|
90
|
+
return React.createElement(Typography, tslib_1.__assign({
|
|
91
91
|
children: label,
|
|
92
92
|
className: clsx(classes.toolbarTxt, className, (_b = {}, _b[classes.toolbarBtnSelected] = selected, _b))
|
|
93
93
|
}, other));
|
|
@@ -102,9 +102,9 @@ var ToolbarButton = function (_a) {
|
|
|
102
102
|
variant = _a.variant,
|
|
103
103
|
align = _a.align,
|
|
104
104
|
typographyClassName = _a.typographyClassName,
|
|
105
|
-
other =
|
|
105
|
+
other = tslib_1.__rest(_a, ["classes", "className", "label", "selected", "variant", "align", "typographyClassName"]);
|
|
106
106
|
|
|
107
|
-
return React.createElement(Button,
|
|
107
|
+
return React.createElement(Button, tslib_1.__assign({
|
|
108
108
|
variant: "text",
|
|
109
109
|
className: clsx(classes.toolbarBtn, className)
|
|
110
110
|
}, other), React.createElement(ToolbarText, {
|
|
@@ -165,10 +165,10 @@ var PickerToolbar = function (_a) {
|
|
|
165
165
|
isLandscape = _a.isLandscape,
|
|
166
166
|
_c = _a.className,
|
|
167
167
|
className = _c === void 0 ? null : _c,
|
|
168
|
-
other =
|
|
168
|
+
other = tslib_1.__rest(_a, ["children", "isLandscape", "className"]);
|
|
169
169
|
|
|
170
170
|
var classes = useStyles$1();
|
|
171
|
-
return React.createElement(Toolbar,
|
|
171
|
+
return React.createElement(Toolbar, tslib_1.__assign({
|
|
172
172
|
className: clsx(classes.toolbar, (_b = {}, _b[classes.toolbarLandscape] = isLandscape, _b), className)
|
|
173
173
|
}, other), children);
|
|
174
174
|
};
|
|
@@ -339,7 +339,7 @@ var datePickerDefaultProps = {
|
|
|
339
339
|
maxDateMessage: 'Date should not be after maximal date',
|
|
340
340
|
allowKeyboardControl: true
|
|
341
341
|
};
|
|
342
|
-
var dateTimePickerDefaultProps =
|
|
342
|
+
var dateTimePickerDefaultProps = tslib_1.__assign({}, timePickerDefaultProps, datePickerDefaultProps, {
|
|
343
343
|
showTabs: true
|
|
344
344
|
});
|
|
345
345
|
|
|
@@ -386,11 +386,11 @@ var Day = function (_a) {
|
|
|
386
386
|
hidden = _a.hidden,
|
|
387
387
|
current = _a.current,
|
|
388
388
|
selected = _a.selected,
|
|
389
|
-
other =
|
|
389
|
+
other = tslib_1.__rest(_a, ["children", "disabled", "hidden", "current", "selected"]);
|
|
390
390
|
|
|
391
391
|
var classes = useStyles$3();
|
|
392
392
|
var className = clsx(classes.day, (_b = {}, _b[classes.hidden] = hidden, _b[classes.current] = current, _b[classes.daySelected] = selected, _b[classes.dayDisabled] = disabled, _b));
|
|
393
|
-
return React.createElement(IconButton,
|
|
393
|
+
return React.createElement(IconButton, tslib_1.__assign({
|
|
394
394
|
className: className,
|
|
395
395
|
tabIndex: hidden || disabled ? -1 : 0
|
|
396
396
|
}, other), React.createElement(Typography, {
|
|
@@ -418,12 +418,12 @@ var DayWrapper = function (_a) {
|
|
|
418
418
|
disabled = _a.disabled,
|
|
419
419
|
onSelect = _a.onSelect,
|
|
420
420
|
dayInCurrentMonth = _a.dayInCurrentMonth,
|
|
421
|
-
other =
|
|
421
|
+
other = tslib_1.__rest(_a, ["children", "value", "disabled", "onSelect", "dayInCurrentMonth"]);
|
|
422
422
|
|
|
423
423
|
var handleClick = React.useCallback(function () {
|
|
424
424
|
return onSelect(value);
|
|
425
425
|
}, [onSelect, value]);
|
|
426
|
-
return React.createElement("div",
|
|
426
|
+
return React.createElement("div", tslib_1.__assign({
|
|
427
427
|
role: "presentation",
|
|
428
428
|
onClick: dayInCurrentMonth && !disabled ? handleClick : undefined,
|
|
429
429
|
onKeyPress: dayInCurrentMonth && !disabled ? handleClick : undefined
|
|
@@ -510,7 +510,7 @@ var SlideTransition = function (_a) {
|
|
|
510
510
|
};
|
|
511
511
|
|
|
512
512
|
var ArrowLeftIcon = function (props) {
|
|
513
|
-
return React__default.createElement(SvgIcon,
|
|
513
|
+
return React__default.createElement(SvgIcon, tslib_1.__assign({}, props), React__default.createElement("path", {
|
|
514
514
|
d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"
|
|
515
515
|
}), React__default.createElement("path", {
|
|
516
516
|
fill: "none",
|
|
@@ -519,7 +519,7 @@ var ArrowLeftIcon = function (props) {
|
|
|
519
519
|
};
|
|
520
520
|
|
|
521
521
|
var ArrowRightIcon = function (props) {
|
|
522
|
-
return React__default.createElement(SvgIcon,
|
|
522
|
+
return React__default.createElement(SvgIcon, tslib_1.__assign({}, props), React__default.createElement("path", {
|
|
523
523
|
d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
|
|
524
524
|
}), React__default.createElement("path", {
|
|
525
525
|
fill: "none",
|
|
@@ -586,7 +586,7 @@ var CalendarHeader = function (_a) {
|
|
|
586
586
|
|
|
587
587
|
return React.createElement("div", null, React.createElement("div", {
|
|
588
588
|
className: classes.switchHeader
|
|
589
|
-
}, React.createElement(IconButton,
|
|
589
|
+
}, React.createElement(IconButton, tslib_1.__assign({}, leftArrowButtonProps, {
|
|
590
590
|
disabled: disablePrevMonth,
|
|
591
591
|
onClick: selectPreviousMonth,
|
|
592
592
|
className: classes.iconButton
|
|
@@ -597,7 +597,7 @@ var CalendarHeader = function (_a) {
|
|
|
597
597
|
}, React.createElement(Typography, {
|
|
598
598
|
align: "center",
|
|
599
599
|
variant: "body1"
|
|
600
|
-
}, utils.getCalendarHeaderText(currentMonth))), React.createElement(IconButton,
|
|
600
|
+
}, utils.getCalendarHeaderText(currentMonth))), React.createElement(IconButton, tslib_1.__assign({}, rightArrowButtonProps, {
|
|
601
601
|
disabled: disableNextMonth,
|
|
602
602
|
onClick: selectNextMonth,
|
|
603
603
|
className: classes.iconButton
|
|
@@ -658,7 +658,7 @@ var withUtils = function () {
|
|
|
658
658
|
return function (Component) {
|
|
659
659
|
var WithUtils = function (props) {
|
|
660
660
|
var utils = useUtils();
|
|
661
|
-
return React.createElement(Component,
|
|
661
|
+
return React.createElement(Component, tslib_1.__assign({
|
|
662
662
|
utils: utils
|
|
663
663
|
}, props));
|
|
664
664
|
};
|
|
@@ -682,7 +682,7 @@ var KeyDownListener = function (_a) {
|
|
|
682
682
|
var Calendar =
|
|
683
683
|
/** @class */
|
|
684
684
|
function (_super) {
|
|
685
|
-
|
|
685
|
+
tslib_1.__extends(Calendar, _super);
|
|
686
686
|
|
|
687
687
|
function Calendar() {
|
|
688
688
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -737,7 +737,8 @@ function (_super) {
|
|
|
737
737
|
disableFuture = _a.disableFuture,
|
|
738
738
|
disablePast = _a.disablePast;
|
|
739
739
|
var now = utils.date();
|
|
740
|
-
|
|
740
|
+
var moment = utils.moment;
|
|
741
|
+
return Boolean(disableFuture && utils.isAfterDay(day, now) || disablePast && moment(day).isBefore(now, "second") || minDate && utils.isBeforeDay(day, utils.date(minDate)) || maxDate && utils.isAfterDay(day, utils.date(maxDate)));
|
|
741
742
|
};
|
|
742
743
|
|
|
743
744
|
_this.shouldDisablePrevMonth = function () {
|
|
@@ -1032,13 +1033,13 @@ var Year = function (_a) {
|
|
|
1032
1033
|
selected = _a.selected,
|
|
1033
1034
|
disabled = _a.disabled,
|
|
1034
1035
|
children = _a.children,
|
|
1035
|
-
other =
|
|
1036
|
+
other = tslib_1.__rest(_a, ["onSelect", "forwardedRef", "value", "selected", "disabled", "children"]);
|
|
1036
1037
|
|
|
1037
1038
|
var classes = useStyles$6();
|
|
1038
1039
|
var handleClick = React.useCallback(function () {
|
|
1039
1040
|
return onSelect(value);
|
|
1040
1041
|
}, [onSelect, value]);
|
|
1041
|
-
return React.createElement(Typography,
|
|
1042
|
+
return React.createElement(Typography, tslib_1.__assign({
|
|
1042
1043
|
role: "button",
|
|
1043
1044
|
component: "div",
|
|
1044
1045
|
tabIndex: disabled ? -1 : 0,
|
|
@@ -1053,7 +1054,7 @@ var Year = function (_a) {
|
|
|
1053
1054
|
};
|
|
1054
1055
|
Year.displayName = 'Year';
|
|
1055
1056
|
var Year$1 = React.forwardRef(function (props, ref) {
|
|
1056
|
-
return React.createElement(Year,
|
|
1057
|
+
return React.createElement(Year, tslib_1.__assign({}, props, {
|
|
1057
1058
|
forwardedRef: ref
|
|
1058
1059
|
}));
|
|
1059
1060
|
});
|
|
@@ -1101,9 +1102,9 @@ var ModalDialog = function (_a) {
|
|
|
1101
1102
|
showTodayButton = _a.showTodayButton,
|
|
1102
1103
|
showTabs = _a.showTabs,
|
|
1103
1104
|
wider = _a.wider,
|
|
1104
|
-
other =
|
|
1105
|
+
other = tslib_1.__rest(_a, ["children", "classes", "onAccept", "onDismiss", "onClear", "onSetToday", "okLabel", "cancelLabel", "clearLabel", "todayLabel", "clearable", "showTodayButton", "showTabs", "wider"]);
|
|
1105
1106
|
|
|
1106
|
-
return React.createElement(Dialog,
|
|
1107
|
+
return React.createElement(Dialog, tslib_1.__assign({
|
|
1107
1108
|
role: "dialog",
|
|
1108
1109
|
onClose: onDismiss,
|
|
1109
1110
|
classes: {
|
|
@@ -1173,12 +1174,12 @@ var ModalWrapper = function (_a) {
|
|
|
1173
1174
|
onAccept = _a.onAccept,
|
|
1174
1175
|
onDismiss = _a.onDismiss,
|
|
1175
1176
|
onSetToday = _a.onSetToday,
|
|
1176
|
-
other =
|
|
1177
|
+
other = tslib_1.__rest(_a, ["open", "children", "okLabel", "cancelLabel", "clearLabel", "todayLabel", "showTodayButton", "clearable", "DialogProps", "showTabs", "wider", "InputComponent", "DateInputProps", "onClear", "onAccept", "onDismiss", "onSetToday"]);
|
|
1177
1178
|
|
|
1178
1179
|
useKeyDown(open, {
|
|
1179
1180
|
Enter: onAccept
|
|
1180
1181
|
});
|
|
1181
|
-
return React.createElement(React.Fragment, null, React.createElement(InputComponent,
|
|
1182
|
+
return React.createElement(React.Fragment, null, React.createElement(InputComponent, tslib_1.__assign({}, other, DateInputProps)), React.createElement(ModalDialog$1, tslib_1.__assign({
|
|
1182
1183
|
wider: wider,
|
|
1183
1184
|
showTabs: showTabs,
|
|
1184
1185
|
open: open,
|
|
@@ -1238,16 +1239,16 @@ var InlineWrapper = function (_a) {
|
|
|
1238
1239
|
showTabs = _a.showTabs,
|
|
1239
1240
|
DateInputProps = _a.DateInputProps,
|
|
1240
1241
|
InputComponent = _a.InputComponent,
|
|
1241
|
-
other =
|
|
1242
|
+
other = tslib_1.__rest(_a, ["open", "wider", "children", "PopoverProps", "onClear", "onDismiss", "onSetToday", "onAccept", "showTabs", "DateInputProps", "InputComponent"]);
|
|
1242
1243
|
|
|
1243
1244
|
var ref = React.useRef();
|
|
1244
1245
|
var classes = useStyles$8();
|
|
1245
1246
|
useKeyDown(open, {
|
|
1246
1247
|
Enter: onAccept
|
|
1247
1248
|
});
|
|
1248
|
-
return React.createElement(React.Fragment, null, React.createElement(InputComponent,
|
|
1249
|
+
return React.createElement(React.Fragment, null, React.createElement(InputComponent, tslib_1.__assign({}, other, DateInputProps, {
|
|
1249
1250
|
inputRef: ref
|
|
1250
|
-
})), React.createElement(Popover,
|
|
1251
|
+
})), React.createElement(Popover, tslib_1.__assign({
|
|
1251
1252
|
open: open,
|
|
1252
1253
|
onClose: onDismiss,
|
|
1253
1254
|
anchorEl: ref.current,
|
|
@@ -1286,12 +1287,12 @@ function getWrapperFromVariant(variant) {
|
|
|
1286
1287
|
var VariantContext = React.createContext(null);
|
|
1287
1288
|
var Wrapper = function (_a) {
|
|
1288
1289
|
var variant = _a.variant,
|
|
1289
|
-
props =
|
|
1290
|
+
props = tslib_1.__rest(_a, ["variant"]);
|
|
1290
1291
|
|
|
1291
1292
|
var Component = getWrapperFromVariant(variant);
|
|
1292
1293
|
return React.createElement(VariantContext.Provider, {
|
|
1293
1294
|
value: variant || 'dialog'
|
|
1294
|
-
}, React.createElement(Component,
|
|
1295
|
+
}, React.createElement(Component, tslib_1.__assign({}, props)));
|
|
1295
1296
|
};
|
|
1296
1297
|
|
|
1297
1298
|
var useStyles$9 = styles$5.makeStyles({
|
|
@@ -1363,7 +1364,7 @@ var ClockType$1 = ClockType;
|
|
|
1363
1364
|
var ClockPointer =
|
|
1364
1365
|
/** @class */
|
|
1365
1366
|
function (_super) {
|
|
1366
|
-
|
|
1367
|
+
tslib_1.__extends(ClockPointer, _super);
|
|
1367
1368
|
|
|
1368
1369
|
function ClockPointer() {
|
|
1369
1370
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -1535,7 +1536,7 @@ var convertToMeridiem = function (time, meridiem, ampm, utils) {
|
|
|
1535
1536
|
var Clock =
|
|
1536
1537
|
/** @class */
|
|
1537
1538
|
function (_super) {
|
|
1538
|
-
|
|
1539
|
+
tslib_1.__extends(Clock, _super);
|
|
1539
1540
|
|
|
1540
1541
|
function Clock() {
|
|
1541
1542
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -1806,7 +1807,7 @@ var getHourNumbers = function (_a) {
|
|
|
1806
1807
|
selected: isSelected(hour),
|
|
1807
1808
|
isInner: !ampm && (hour === 0 || hour > 12)
|
|
1808
1809
|
};
|
|
1809
|
-
hourNumbers.push(React.createElement(ClockNumber,
|
|
1810
|
+
hourNumbers.push(React.createElement(ClockNumber, tslib_1.__assign({
|
|
1810
1811
|
key: hour
|
|
1811
1812
|
}, props)));
|
|
1812
1813
|
}
|
|
@@ -1938,7 +1939,7 @@ var TimePickerView = function (_a) {
|
|
|
1938
1939
|
throw new Error('You must provide the type for TimePickerView');
|
|
1939
1940
|
}
|
|
1940
1941
|
}, [ampm, date, onHourChange, onMinutesChange, onSecondsChange, type, utils]);
|
|
1941
|
-
return React.createElement(Clock$1,
|
|
1942
|
+
return React.createElement(Clock$1, tslib_1.__assign({
|
|
1942
1943
|
type: type,
|
|
1943
1944
|
ampm: ampm,
|
|
1944
1945
|
minutesStep: minutesStep
|
|
@@ -2000,13 +2001,13 @@ var Month = function (_a) {
|
|
|
2000
2001
|
disabled = _a.disabled,
|
|
2001
2002
|
value = _a.value,
|
|
2002
2003
|
children = _a.children,
|
|
2003
|
-
other =
|
|
2004
|
+
other = tslib_1.__rest(_a, ["selected", "onSelect", "disabled", "value", "children"]);
|
|
2004
2005
|
|
|
2005
2006
|
var classes = useStyles$b();
|
|
2006
2007
|
var handleSelection = React.useCallback(function () {
|
|
2007
2008
|
onSelect(value);
|
|
2008
2009
|
}, [onSelect, value]);
|
|
2009
|
-
return React.createElement(Typography,
|
|
2010
|
+
return React.createElement(Typography, tslib_1.__assign({
|
|
2010
2011
|
role: "button",
|
|
2011
2012
|
component: "div",
|
|
2012
2013
|
className: clsx(classes.root, (_b = {}, _b[classes.monthSelected] = selected, _b[classes.monthDisabled] = disabled, _b)),
|
|
@@ -2214,7 +2215,7 @@ var Picker = function (props) {
|
|
|
2214
2215
|
|
|
2215
2216
|
return React.createElement("div", {
|
|
2216
2217
|
className: clsx(classes.container, (_a = {}, _a[classes.containerLandscape] = isLandscape, _a))
|
|
2217
|
-
}, !disableToolbar && React.createElement(ToolbarComponent,
|
|
2218
|
+
}, !disableToolbar && React.createElement(ToolbarComponent, tslib_1.__assign({
|
|
2218
2219
|
date: date,
|
|
2219
2220
|
onChange: onChange,
|
|
2220
2221
|
setOpenView: setOpenView,
|
|
@@ -2276,7 +2277,7 @@ var Picker = function (props) {
|
|
|
2276
2277
|
key: "today"
|
|
2277
2278
|
}, todayLabel), showShiftButtons && setShiftFunction && shiftButtons));
|
|
2278
2279
|
};
|
|
2279
|
-
Picker.defaultProps =
|
|
2280
|
+
Picker.defaultProps = tslib_1.__assign({}, datePickerDefaultProps, {
|
|
2280
2281
|
views: Object.keys(viewsMap)
|
|
2281
2282
|
});
|
|
2282
2283
|
|
|
@@ -2616,14 +2617,14 @@ var PureDateInput = function (_a) {
|
|
|
2616
2617
|
InputProps = _a.InputProps,
|
|
2617
2618
|
_b = _a.TextFieldComponent,
|
|
2618
2619
|
TextFieldComponent = _b === void 0 ? TextField : _b,
|
|
2619
|
-
other =
|
|
2620
|
+
other = tslib_1.__rest(_a, ["inputValue", "inputVariant", "validationError", "InputProps", "TextFieldComponent"]);
|
|
2620
2621
|
|
|
2621
2622
|
var PureDateInputProps = React.useMemo(function () {
|
|
2622
|
-
return
|
|
2623
|
+
return tslib_1.__assign({}, InputProps, {
|
|
2623
2624
|
readOnly: true
|
|
2624
2625
|
});
|
|
2625
2626
|
}, [InputProps]);
|
|
2626
|
-
return React.createElement(TextFieldComponent,
|
|
2627
|
+
return React.createElement(TextFieldComponent, tslib_1.__assign({
|
|
2627
2628
|
error: Boolean(validationError),
|
|
2628
2629
|
helperText: validationError
|
|
2629
2630
|
}, other, {
|
|
@@ -2690,7 +2691,7 @@ function makePurePicker(_a) {
|
|
|
2690
2691
|
showShiftButtons = props.showShiftButtons,
|
|
2691
2692
|
setShiftFunction = props.setShiftFunction,
|
|
2692
2693
|
shiftButtonValues = props.shiftButtonValues,
|
|
2693
|
-
other =
|
|
2694
|
+
other = tslib_1.__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"]);
|
|
2694
2695
|
|
|
2695
2696
|
var injectedProps = getCustomProps ? getCustomProps(props) : {};
|
|
2696
2697
|
var options = useOptions(props);
|
|
@@ -2700,13 +2701,13 @@ function makePurePicker(_a) {
|
|
|
2700
2701
|
inputProps = _b.inputProps,
|
|
2701
2702
|
wrapperProps = _b.wrapperProps;
|
|
2702
2703
|
|
|
2703
|
-
return React.createElement(Wrapper,
|
|
2704
|
+
return React.createElement(Wrapper, tslib_1.__assign({
|
|
2704
2705
|
variant: variant,
|
|
2705
2706
|
InputComponent: PureDateInput,
|
|
2706
2707
|
DateInputProps: inputProps,
|
|
2707
2708
|
showTodayButton: showTodayButton,
|
|
2708
2709
|
todayLabel: todayLabel
|
|
2709
|
-
}, wrapperProps, injectedProps, other), React.createElement(Picker,
|
|
2710
|
+
}, wrapperProps, injectedProps, other), React.createElement(Picker, tslib_1.__assign({}, pickerProps, {
|
|
2710
2711
|
orientation: orientation,
|
|
2711
2712
|
disableToolbar: disableToolbar,
|
|
2712
2713
|
ToolbarComponent: ToolbarComponent,
|
|
@@ -2746,7 +2747,7 @@ function makePurePicker(_a) {
|
|
|
2746
2747
|
}
|
|
2747
2748
|
|
|
2748
2749
|
var KeyboardIcon = function (props) {
|
|
2749
|
-
return React__default.createElement(SvgIcon,
|
|
2750
|
+
return React__default.createElement(SvgIcon, tslib_1.__assign({}, props), React__default.createElement("path", {
|
|
2750
2751
|
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"
|
|
2751
2752
|
}), React__default.createElement("path", {
|
|
2752
2753
|
fill: "none",
|
|
@@ -2943,7 +2944,7 @@ var KeyboardDateInput = function (_a) {
|
|
|
2943
2944
|
rifmFormatter = _a.rifmFormatter,
|
|
2944
2945
|
_e = _a.TextFieldComponent,
|
|
2945
2946
|
TextFieldComponent = _e === void 0 ? TextField : _e,
|
|
2946
|
-
other =
|
|
2947
|
+
other = tslib_1.__rest(_a, ["inputValue", "showErrorOnBlur", "inputVariant", "validationError", "KeyboardButtonProps", "InputAdornmentProps", "onClick", "onChange", "onBlur", "onFocus", "InputProps", "mask", "maskChar", "refuse", "format", "keyboardIcon", "disabled", "rifmFormatter", "TextFieldComponent"]);
|
|
2947
2948
|
|
|
2948
2949
|
var inputMask = mask || makeMaskFromFormat(format, maskChar);
|
|
2949
2950
|
var letterPosition = format.indexOf('a'); // prettier-ignore
|
|
@@ -2977,7 +2978,7 @@ var KeyboardDateInput = function (_a) {
|
|
|
2977
2978
|
|
|
2978
2979
|
var onChange = _a.onChange,
|
|
2979
2980
|
value = _a.value;
|
|
2980
|
-
return React.createElement(TextFieldComponent,
|
|
2981
|
+
return React.createElement(TextFieldComponent, tslib_1.__assign({
|
|
2981
2982
|
disabled: disabled,
|
|
2982
2983
|
error: Boolean(validationError) && !showErrorFlag,
|
|
2983
2984
|
helperText: !showErrorFlag && validationError
|
|
@@ -3006,9 +3007,9 @@ var KeyboardDateInput = function (_a) {
|
|
|
3006
3007
|
}
|
|
3007
3008
|
},
|
|
3008
3009
|
variant: inputVariant,
|
|
3009
|
-
InputProps:
|
|
3010
|
+
InputProps: tslib_1.__assign({}, InputProps, (_b = {}, _b[position + "Adornment"] = React.createElement(InputAdornment, tslib_1.__assign({
|
|
3010
3011
|
position: position
|
|
3011
|
-
}, InputAdornmentProps), React.createElement(core.IconButton,
|
|
3012
|
+
}, InputAdornmentProps), React.createElement(core.IconButton, tslib_1.__assign({
|
|
3012
3013
|
disabled: disabled
|
|
3013
3014
|
}, KeyboardButtonProps, {
|
|
3014
3015
|
onClick: onClick
|
|
@@ -3052,7 +3053,7 @@ function useKeyboardPickerState(props, options) {
|
|
|
3052
3053
|
onChange(date, date === null ? null : utils.format(date, format));
|
|
3053
3054
|
}, [format, onChange, utils]);
|
|
3054
3055
|
|
|
3055
|
-
var _c = usePickerState(
|
|
3056
|
+
var _c = usePickerState(tslib_1.__assign({}, props, {
|
|
3056
3057
|
value: dateValue,
|
|
3057
3058
|
onChange: handleKeyboardChange
|
|
3058
3059
|
}), options),
|
|
@@ -3061,7 +3062,7 @@ function useKeyboardPickerState(props, options) {
|
|
|
3061
3062
|
pickerProps = _c.pickerProps;
|
|
3062
3063
|
|
|
3063
3064
|
var inputProps = React.useMemo(function () {
|
|
3064
|
-
return
|
|
3065
|
+
return tslib_1.__assign({}, innerInputProps, {
|
|
3065
3066
|
format: wrapperProps.format,
|
|
3066
3067
|
inputValue: inputValue || innerInputValue,
|
|
3067
3068
|
onChange: function (value) {
|
|
@@ -3135,7 +3136,7 @@ function makeKeyboardPicker(_a) {
|
|
|
3135
3136
|
showShiftButtons = props.showShiftButtons,
|
|
3136
3137
|
setShiftFunction = props.setShiftFunction,
|
|
3137
3138
|
shiftButtonValues = props.shiftButtonValues,
|
|
3138
|
-
other =
|
|
3139
|
+
other = tslib_1.__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", "value", "dateRangeIcon", "emptyLabel", "invalidLabel", "timeIcon", "orientation", "variant", "disableToolbar", "loadingIndicator", "showActionsBar", "showTodayButton", "todayLabel", "ToolbarComponent", "showShiftButtons", "setShiftFunction", "shiftButtonValues"]);
|
|
3139
3140
|
|
|
3140
3141
|
var injectedProps = getCustomProps ? getCustomProps(props) : {};
|
|
3141
3142
|
var options = useOptions(props);
|
|
@@ -3145,11 +3146,11 @@ function makeKeyboardPicker(_a) {
|
|
|
3145
3146
|
inputProps = _b.inputProps,
|
|
3146
3147
|
wrapperProps = _b.wrapperProps;
|
|
3147
3148
|
|
|
3148
|
-
return React.createElement(Wrapper,
|
|
3149
|
+
return React.createElement(Wrapper, tslib_1.__assign({
|
|
3149
3150
|
variant: variant,
|
|
3150
3151
|
InputComponent: KeyboardDateInput,
|
|
3151
3152
|
DateInputProps: inputProps
|
|
3152
|
-
}, injectedProps, wrapperProps, other), React.createElement(Picker,
|
|
3153
|
+
}, injectedProps, wrapperProps, other), React.createElement(Picker, tslib_1.__assign({}, pickerProps, {
|
|
3153
3154
|
ToolbarComponent: ToolbarComponent,
|
|
3154
3155
|
disableToolbar: disableToolbar,
|
|
3155
3156
|
hideTabs: hideTabs,
|
|
@@ -3188,7 +3189,7 @@ function makeKeyboardPicker(_a) {
|
|
|
3188
3189
|
return WrappedKeyboardPicker;
|
|
3189
3190
|
}
|
|
3190
3191
|
|
|
3191
|
-
var defaultProps =
|
|
3192
|
+
var defaultProps = tslib_1.__assign({}, datePickerDefaultProps, {
|
|
3192
3193
|
openTo: 'date',
|
|
3193
3194
|
views: ['year', 'date'],
|
|
3194
3195
|
showActionsBar: false,
|
|
@@ -3350,7 +3351,7 @@ var TimePickerToolbar = function (_a) {
|
|
|
3350
3351
|
})));
|
|
3351
3352
|
};
|
|
3352
3353
|
|
|
3353
|
-
var defaultProps$1 =
|
|
3354
|
+
var defaultProps$1 = tslib_1.__assign({}, timePickerDefaultProps, {
|
|
3354
3355
|
openTo: 'hours',
|
|
3355
3356
|
views: ['hours', 'minutes']
|
|
3356
3357
|
});
|
|
@@ -3384,7 +3385,7 @@ TimePicker.defaultProps = defaultProps$1;
|
|
|
3384
3385
|
KeyboardTimePicker.defaultProps = defaultProps$1;
|
|
3385
3386
|
|
|
3386
3387
|
var TimeIcon = function (props) {
|
|
3387
|
-
return React__default.createElement(SvgIcon,
|
|
3388
|
+
return React__default.createElement(SvgIcon, tslib_1.__assign({}, props), React__default.createElement("path", {
|
|
3388
3389
|
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"
|
|
3389
3390
|
}), React__default.createElement("path", {
|
|
3390
3391
|
fill: "none",
|
|
@@ -3395,7 +3396,7 @@ var TimeIcon = function (props) {
|
|
|
3395
3396
|
};
|
|
3396
3397
|
|
|
3397
3398
|
var DateRangeIcon = function (props) {
|
|
3398
|
-
return React__default.createElement(SvgIcon,
|
|
3399
|
+
return React__default.createElement(SvgIcon, tslib_1.__assign({}, props), React__default.createElement("path", {
|
|
3399
3400
|
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"
|
|
3400
3401
|
}), React__default.createElement("path", {
|
|
3401
3402
|
fill: "none",
|
|
@@ -3579,7 +3580,7 @@ var DateTimePickerToolbar = function (_a) {
|
|
|
3579
3580
|
}));
|
|
3580
3581
|
};
|
|
3581
3582
|
|
|
3582
|
-
var defaultProps$2 =
|
|
3583
|
+
var defaultProps$2 = tslib_1.__assign({}, dateTimePickerDefaultProps, {
|
|
3583
3584
|
showActionsBar: false,
|
|
3584
3585
|
todayLabel: 'TODAY',
|
|
3585
3586
|
wider: true,
|