@docsvision/material-ui-pickers 3.2.0-beta.3 → 3.2.0-beta.30
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/{build/DatePicker → DatePicker}/DatePicker.d.ts +2 -2
- package/{build/DatePicker → DatePicker}/DatePicker.js +1 -1
- package/{build/DatePicker → DatePicker}/DatePickerToolbar.js +3 -3
- package/{build/DateTimePicker → DateTimePicker}/DateTimePicker.d.ts +2 -2
- package/{build/DateTimePicker → DateTimePicker}/DateTimePicker.js +3 -3
- package/{build/DateTimePicker → DateTimePicker}/DateTimePickerToolbar.js +4 -4
- package/{build/MuiPickersUtilsProvider.d.ts → MuiPickersUtilsProvider.d.ts} +1 -1
- package/{build/MuiPickersUtilsProvider.js → MuiPickersUtilsProvider.js} +11 -5
- package/{build/Picker → Picker}/Picker.d.ts +5 -3
- package/{build/Picker → Picker}/Picker.js +15 -12
- package/{build/Picker → Picker}/WrappedKeyboardPicker.js +2 -2
- package/{build/Picker → Picker}/WrappedPurePicker.js +4 -3
- package/{build/README.md → README.md} +1 -1
- package/Rifm/Rifm.d.ts +17 -0
- package/Rifm/Rifm.js +166 -0
- package/{build/TimePicker → TimePicker}/TimePicker.d.ts +4 -2
- package/{build/TimePicker → TimePicker}/TimePicker.js +3 -3
- package/{build/TimePicker → TimePicker}/TimePickerToolbar.js +3 -3
- package/{build/_helpers → _helpers}/date-utils.d.ts +2 -2
- package/{build/_helpers → _helpers}/date-utils.js +3 -3
- package/_helpers/text-field-helper.d.ts +32 -0
- package/_helpers/text-field-helper.js +144 -0
- package/{build/_helpers → _helpers}/time-utils.d.ts +2 -2
- package/{build/_shared → _shared}/KeyboardDateInput.d.ts +5 -0
- package/{build/_shared → _shared}/KeyboardDateInput.js +29 -5
- package/{build/_shared → _shared}/ModalDialog.d.ts +2 -2
- package/{build/_shared → _shared}/PureDateInput.js +1 -1
- package/{build/_shared → _shared}/ToolbarButton.d.ts +2 -2
- package/{build/_shared → _shared}/WithUtils.d.ts +1 -1
- package/{build/_shared → _shared}/hooks/useIsLandscape.js +1 -1
- package/{build/_shared → _shared}/hooks/useKeyboardPickerState.d.ts +1 -1
- package/{build/_shared → _shared}/hooks/useKeyboardPickerState.js +3 -3
- package/{build/_shared → _shared}/hooks/usePickerState.d.ts +1 -1
- package/{build/_shared → _shared}/hooks/usePickerState.js +2 -3
- package/{build/_shared → _shared}/hooks/useUtils.d.ts +2 -2
- package/{build/constants → constants}/prop-types.js +2 -2
- package/{build/dist → dist}/material-ui-pickers.esm.js +1467 -837
- package/dist/material-ui-pickers.esm.js.map +1 -0
- package/{build/dist → dist}/material-ui-pickers.js +1483 -853
- package/dist/material-ui-pickers.js.map +1 -0
- package/{build/dist → dist}/material-ui-pickers.umd.js +29819 -22160
- package/dist/material-ui-pickers.umd.min.js +1 -0
- package/{build/index.d.ts → index.d.ts} +11 -11
- package/package.json +14 -88
- package/{build/typings → typings}/BasePicker.d.ts +2 -0
- package/{build/typings → typings}/overrides.d.ts +2 -2
- package/{build/views → views}/Calendar/Calendar.js +4 -3
- package/{build/views → views}/Calendar/CalendarHeader.js +1 -1
- package/{build/views → views}/Clock/Clock.d.ts +1 -1
- package/{build/views → views}/Clock/Clock.js +1 -1
- package/{build/views → views}/Clock/ClockNumbers.d.ts +2 -2
- package/{build/views → views}/Clock/ClockPointer.d.ts +1 -1
- package/{build/views → views}/Clock/ClockView.js +1 -1
- package/{build/views → views}/Month/MonthView.js +1 -1
- package/{build/views → views}/Year/YearView.js +2 -2
- package/.size-snapshot.json +0 -26
- package/build/_helpers/text-field-helper.d.ts +0 -32
- package/build/_helpers/text-field-helper.js +0 -88
- package/build/dist/material-ui-pickers.esm.js.map +0 -1
- package/build/dist/material-ui-pickers.js.map +0 -1
- package/build/dist/material-ui-pickers.umd.min.js +0 -1
- package/build/package.json +0 -63
- package/copy.js +0 -58
- package/coverage/clover.xml +0 -1589
- package/coverage/coverage-final.json +0 -57
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -79
- package/coverage/lcov-report/index.html +0 -279
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -170
- package/coverage/lcov-report/src/DatePicker/DatePicker.tsx.html +0 -342
- package/coverage/lcov-report/src/DatePicker/DatePickerToolbar.tsx.html +0 -294
- package/coverage/lcov-report/src/DatePicker/index.html +0 -123
- package/coverage/lcov-report/src/DatePicker/index.ts.html +0 -90
- package/coverage/lcov-report/src/DateTimePicker/DateTimePicker.tsx.html +0 -285
- package/coverage/lcov-report/src/DateTimePicker/DateTimePickerTabs.tsx.html +0 -327
- package/coverage/lcov-report/src/DateTimePicker/DateTimePickerToolbar.tsx.html +0 -438
- package/coverage/lcov-report/src/DateTimePicker/index.html +0 -123
- package/coverage/lcov-report/src/MuiPickersUtilsProvider.tsx.html +0 -186
- package/coverage/lcov-report/src/Picker/Picker.tsx.html +0 -873
- package/coverage/lcov-report/src/Picker/WrappedKeyboardPicker.tsx.html +0 -465
- package/coverage/lcov-report/src/Picker/WrappedPurePicker.tsx.html +0 -435
- package/coverage/lcov-report/src/Picker/index.html +0 -123
- package/coverage/lcov-report/src/TimePicker/TimePicker.tsx.html +0 -270
- package/coverage/lcov-report/src/TimePicker/TimePickerToolbar.tsx.html +0 -609
- package/coverage/lcov-report/src/TimePicker/index.html +0 -110
- package/coverage/lcov-report/src/_helpers/date-utils.ts.html +0 -345
- package/coverage/lcov-report/src/_helpers/index.html +0 -136
- package/coverage/lcov-report/src/_helpers/text-field-helper.ts.html +0 -564
- package/coverage/lcov-report/src/_helpers/time-utils.ts.html +0 -318
- package/coverage/lcov-report/src/_helpers/utils.ts.html +0 -93
- package/coverage/lcov-report/src/_shared/KeyboardDateInput.tsx.html +0 -438
- package/coverage/lcov-report/src/_shared/ModalDialog.tsx.html +0 -411
- package/coverage/lcov-report/src/_shared/PickerToolbar.tsx.html +0 -225
- package/coverage/lcov-report/src/_shared/PureDateInput.tsx.html +0 -204
- package/coverage/lcov-report/src/_shared/ToolbarButton.tsx.html +0 -258
- package/coverage/lcov-report/src/_shared/ToolbarText.tsx.html +0 -216
- package/coverage/lcov-report/src/_shared/WithUtils.tsx.html +0 -126
- package/coverage/lcov-report/src/_shared/hooks/index.html +0 -175
- package/coverage/lcov-report/src/_shared/hooks/useIsLandscape.tsx.html +0 -150
- package/coverage/lcov-report/src/_shared/hooks/useKeyDown.ts.html +0 -171
- package/coverage/lcov-report/src/_shared/hooks/useKeyboardPickerState.ts.html +0 -285
- package/coverage/lcov-report/src/_shared/hooks/useOpenState.ts.html +0 -135
- package/coverage/lcov-report/src/_shared/hooks/usePickerState.ts.html +0 -474
- package/coverage/lcov-report/src/_shared/hooks/useUtils.ts.html +0 -129
- package/coverage/lcov-report/src/_shared/hooks/useViews.tsx.html +0 -162
- package/coverage/lcov-report/src/_shared/icons/ArrowLeftIcon.tsx.html +0 -102
- package/coverage/lcov-report/src/_shared/icons/ArrowRightIcon.tsx.html +0 -102
- package/coverage/lcov-report/src/_shared/icons/DateRangeIcon.tsx.html +0 -102
- package/coverage/lcov-report/src/_shared/icons/KeyboardIcon.tsx.html +0 -102
- package/coverage/lcov-report/src/_shared/icons/TimeIcon.tsx.html +0 -105
- package/coverage/lcov-report/src/_shared/icons/index.html +0 -149
- package/coverage/lcov-report/src/_shared/index.html +0 -175
- package/coverage/lcov-report/src/constants/ClockType.ts.html +0 -102
- package/coverage/lcov-report/src/constants/dimensions.ts.html +0 -84
- package/coverage/lcov-report/src/constants/index.html +0 -123
- package/coverage/lcov-report/src/constants/prop-types.ts.html +0 -180
- package/coverage/lcov-report/src/index.html +0 -97
- package/coverage/lcov-report/src/views/Calendar/Calendar.tsx.html +0 -1149
- package/coverage/lcov-report/src/views/Calendar/CalendarHeader.tsx.html +0 -492
- package/coverage/lcov-report/src/views/Calendar/Day.tsx.html +0 -360
- package/coverage/lcov-report/src/views/Calendar/DayWrapper.tsx.html +0 -168
- package/coverage/lcov-report/src/views/Calendar/SlideTransition.tsx.html +0 -369
- package/coverage/lcov-report/src/views/Calendar/index.html +0 -149
- package/coverage/lcov-report/src/views/Clock/Clock.tsx.html +0 -585
- package/coverage/lcov-report/src/views/Clock/ClockNumber.tsx.html +0 -342
- package/coverage/lcov-report/src/views/Clock/ClockNumbers.tsx.html +0 -297
- package/coverage/lcov-report/src/views/Clock/ClockPointer.tsx.html +0 -381
- package/coverage/lcov-report/src/views/Clock/ClockView.tsx.html +0 -384
- package/coverage/lcov-report/src/views/Clock/index.html +0 -149
- package/coverage/lcov-report/src/views/Month/Month.tsx.html +0 -297
- package/coverage/lcov-report/src/views/Month/MonthView.tsx.html +0 -351
- package/coverage/lcov-report/src/views/Month/index.html +0 -110
- package/coverage/lcov-report/src/views/Year/Year.tsx.html +0 -300
- package/coverage/lcov-report/src/views/Year/YearView.tsx.html +0 -342
- package/coverage/lcov-report/src/views/Year/index.html +0 -110
- package/coverage/lcov-report/src/wrappers/InlineWrapper.tsx.html +0 -309
- package/coverage/lcov-report/src/wrappers/ModalWrapper.tsx.html +0 -408
- package/coverage/lcov-report/src/wrappers/StaticWrapper.tsx.html +0 -135
- package/coverage/lcov-report/src/wrappers/Wrapper.tsx.html +0 -294
- package/coverage/lcov-report/src/wrappers/index.html +0 -136
- package/coverage/lcov.info +0 -2815
- package/remove-prop-types.js +0 -37
- package/rollup.config.js +0 -143
- package/src/DatePicker/DatePicker.tsx +0 -91
- package/src/DatePicker/DatePickerToolbar.tsx +0 -75
- package/src/DatePicker/index.ts +0 -7
- package/src/DateTimePicker/DateTimePicker.tsx +0 -72
- package/src/DateTimePicker/DateTimePickerTabs.tsx +0 -86
- package/src/DateTimePicker/DateTimePickerToolbar.tsx +0 -123
- package/src/DateTimePicker/index.ts +0 -7
- package/src/MuiPickersUtilsProvider.tsx +0 -39
- package/src/Picker/Picker.tsx +0 -268
- package/src/Picker/WrappedKeyboardPicker.tsx +0 -132
- package/src/Picker/WrappedPurePicker.tsx +0 -124
- package/src/TimePicker/TimePicker.tsx +0 -67
- package/src/TimePicker/TimePickerToolbar.tsx +0 -180
- package/src/TimePicker/index.tsx +0 -7
- package/src/__tests__/DatePicker/Calendar.test.tsx +0 -51
- package/src/__tests__/DatePicker/Month.test.tsx +0 -36
- package/src/__tests__/DatePicker/MonthSelection.test.tsx +0 -37
- package/src/__tests__/MuiPickersUtilsProvider.test.tsx +0 -21
- package/src/__tests__/TimePicker/Clock.test.tsx +0 -68
- package/src/__tests__/_helpers/date-utils.test.tsx +0 -197
- package/src/__tests__/_helpers/text-field-helper.test.tsx +0 -34
- package/src/__tests__/_shared/ModalDialog.test.tsx +0 -109
- package/src/__tests__/e2e/DatePicker.test.tsx +0 -233
- package/src/__tests__/e2e/DatePickerProps.test.tsx +0 -18
- package/src/__tests__/e2e/DatePickerRoot.test.tsx +0 -154
- package/src/__tests__/e2e/DateTimePicker.test.tsx +0 -86
- package/src/__tests__/e2e/DateTimePickerRoot.test.tsx +0 -72
- package/src/__tests__/e2e/KeyboardDatePicker.test.tsx +0 -140
- package/src/__tests__/e2e/KeyboardDateTimePicker.test.tsx +0 -48
- package/src/__tests__/e2e/Theme.test.tsx +0 -30
- package/src/__tests__/e2e/TimePicker.test.tsx +0 -121
- package/src/__tests__/e2e/commands.tsx +0 -8
- package/src/__tests__/setup.js +0 -26
- package/src/__tests__/test-utils.tsx +0 -45
- package/src/__tests__/tsconfig.json +0 -5
- package/src/_helpers/date-utils.ts +0 -92
- package/src/_helpers/text-field-helper.ts +0 -165
- package/src/_helpers/time-utils.ts +0 -83
- package/src/_helpers/utils.ts +0 -8
- package/src/_shared/KeyboardDateInput.tsx +0 -123
- package/src/_shared/ModalDialog.tsx +0 -114
- package/src/_shared/PickerToolbar.tsx +0 -52
- package/src/_shared/PureDateInput.tsx +0 -45
- package/src/_shared/ToolbarButton.tsx +0 -63
- package/src/_shared/ToolbarText.tsx +0 -49
- package/src/_shared/WithUtils.tsx +0 -19
- package/src/_shared/hooks/useIsLandscape.tsx +0 -27
- package/src/_shared/hooks/useKeyDown.ts +0 -34
- package/src/_shared/hooks/useKeyboardPickerState.ts +0 -72
- package/src/_shared/hooks/useOpenState.ts +0 -22
- package/src/_shared/hooks/usePickerState.ts +0 -135
- package/src/_shared/hooks/useUtils.ts +0 -20
- package/src/_shared/hooks/useViews.tsx +0 -31
- package/src/_shared/icons/ArrowLeftIcon.tsx +0 -11
- package/src/_shared/icons/ArrowRightIcon.tsx +0 -11
- package/src/_shared/icons/DateRangeIcon.tsx +0 -11
- package/src/_shared/icons/KeyboardIcon.tsx +0 -11
- package/src/_shared/icons/TimeIcon.tsx +0 -12
- package/src/constants/ClockType.ts +0 -11
- package/src/constants/dimensions.ts +0 -5
- package/src/constants/prop-types.ts +0 -37
- package/src/index.ts +0 -48
- package/src/typings/BasePicker.tsx +0 -58
- package/src/typings/date.ts +0 -3
- package/src/typings/extendMui.ts +0 -10
- package/src/typings/overrides.ts +0 -54
- package/src/views/Calendar/Calendar.tsx +0 -360
- package/src/views/Calendar/CalendarHeader.tsx +0 -141
- package/src/views/Calendar/Day.tsx +0 -97
- package/src/views/Calendar/DayWrapper.tsx +0 -33
- package/src/views/Calendar/SlideTransition.tsx +0 -100
- package/src/views/Clock/Clock.tsx +0 -172
- package/src/views/Clock/ClockNumber.tsx +0 -91
- package/src/views/Clock/ClockNumbers.tsx +0 -76
- package/src/views/Clock/ClockPointer.tsx +0 -104
- package/src/views/Clock/ClockView.tsx +0 -105
- package/src/views/Month/Month.tsx +0 -76
- package/src/views/Month/MonthView.tsx +0 -94
- package/src/views/Year/Year.tsx +0 -77
- package/src/views/Year/YearView.tsx +0 -91
- package/src/wrappers/InlineWrapper.tsx +0 -80
- package/src/wrappers/ModalWrapper.tsx +0 -113
- package/src/wrappers/StaticWrapper.tsx +0 -22
- package/src/wrappers/Wrapper.tsx +0 -75
- package/tsconfig.json +0 -21
- package/typings.d.ts +0 -6
- /package/{build/DatePicker → DatePicker}/DatePickerToolbar.d.ts +0 -0
- /package/{build/DatePicker → DatePicker}/index.d.ts +0 -0
- /package/{build/DatePicker → DatePicker}/index.js +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerTabs.d.ts +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerTabs.js +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/DateTimePickerToolbar.d.ts +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/index.d.ts +0 -0
- /package/{build/DateTimePicker → DateTimePicker}/index.js +0 -0
- /package/{build/Picker → Picker}/WrappedKeyboardPicker.d.ts +0 -0
- /package/{build/Picker → Picker}/WrappedPurePicker.d.ts +0 -0
- /package/{build/TimePicker → TimePicker}/TimePickerToolbar.d.ts +0 -0
- /package/{build/TimePicker → TimePicker}/index.d.ts +0 -0
- /package/{build/TimePicker → TimePicker}/index.js +0 -0
- /package/{build/_helpers → _helpers}/time-utils.js +0 -0
- /package/{build/_helpers → _helpers}/utils.d.ts +0 -0
- /package/{build/_helpers → _helpers}/utils.js +0 -0
- /package/{build/_shared → _shared}/ModalDialog.js +0 -0
- /package/{build/_shared → _shared}/PickerToolbar.d.ts +0 -0
- /package/{build/_shared → _shared}/PickerToolbar.js +0 -0
- /package/{build/_shared → _shared}/PureDateInput.d.ts +0 -0
- /package/{build/_shared → _shared}/ToolbarButton.js +0 -0
- /package/{build/_shared → _shared}/ToolbarText.d.ts +0 -0
- /package/{build/_shared → _shared}/ToolbarText.js +0 -0
- /package/{build/_shared → _shared}/WithUtils.js +0 -0
- /package/{build/_shared → _shared}/hooks/useIsLandscape.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/useKeyDown.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/useKeyDown.js +0 -0
- /package/{build/_shared → _shared}/hooks/useOpenState.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/useOpenState.js +0 -0
- /package/{build/_shared → _shared}/hooks/useUtils.js +0 -0
- /package/{build/_shared → _shared}/hooks/useViews.d.ts +0 -0
- /package/{build/_shared → _shared}/hooks/useViews.js +0 -0
- /package/{build/_shared → _shared}/icons/ArrowLeftIcon.d.ts +0 -0
- /package/{build/_shared → _shared}/icons/ArrowLeftIcon.js +0 -0
- /package/{build/_shared → _shared}/icons/ArrowRightIcon.d.ts +0 -0
- /package/{build/_shared → _shared}/icons/ArrowRightIcon.js +0 -0
- /package/{build/_shared → _shared}/icons/DateRangeIcon.d.ts +0 -0
- /package/{build/_shared → _shared}/icons/DateRangeIcon.js +0 -0
- /package/{build/_shared → _shared}/icons/KeyboardIcon.d.ts +0 -0
- /package/{build/_shared → _shared}/icons/KeyboardIcon.js +0 -0
- /package/{build/_shared → _shared}/icons/TimeIcon.d.ts +0 -0
- /package/{build/_shared → _shared}/icons/TimeIcon.js +0 -0
- /package/{build/constants → constants}/ClockType.d.ts +0 -0
- /package/{build/constants → constants}/ClockType.js +0 -0
- /package/{build/constants → constants}/dimensions.d.ts +0 -0
- /package/{build/constants → constants}/dimensions.js +0 -0
- /package/{build/constants → constants}/prop-types.d.ts +0 -0
- /package/{build/index.js → index.js} +0 -0
- /package/{build/typings → typings}/BasePicker.js +0 -0
- /package/{build/typings → typings}/date.d.ts +0 -0
- /package/{build/typings → typings}/date.js +0 -0
- /package/{build/typings → typings}/extendMui.d.ts +0 -0
- /package/{build/typings → typings}/extendMui.js +0 -0
- /package/{build/typings → typings}/overrides.js +0 -0
- /package/{build/views → views}/Calendar/Calendar.d.ts +0 -0
- /package/{build/views → views}/Calendar/CalendarHeader.d.ts +0 -0
- /package/{build/views → views}/Calendar/Day.d.ts +0 -0
- /package/{build/views → views}/Calendar/Day.js +0 -0
- /package/{build/views → views}/Calendar/DayWrapper.d.ts +0 -0
- /package/{build/views → views}/Calendar/DayWrapper.js +0 -0
- /package/{build/views → views}/Calendar/SlideTransition.d.ts +0 -0
- /package/{build/views → views}/Calendar/SlideTransition.js +0 -0
- /package/{build/views → views}/Clock/ClockNumber.d.ts +0 -0
- /package/{build/views → views}/Clock/ClockNumber.js +0 -0
- /package/{build/views → views}/Clock/ClockNumbers.js +0 -0
- /package/{build/views → views}/Clock/ClockPointer.js +0 -0
- /package/{build/views → views}/Clock/ClockView.d.ts +0 -0
- /package/{build/views → views}/Month/Month.d.ts +0 -0
- /package/{build/views → views}/Month/Month.js +0 -0
- /package/{build/views → views}/Month/MonthView.d.ts +0 -0
- /package/{build/views → views}/Year/Year.d.ts +0 -0
- /package/{build/views → views}/Year/Year.js +0 -0
- /package/{build/views → views}/Year/YearView.d.ts +0 -0
- /package/{build/wrappers → wrappers}/InlineWrapper.d.ts +0 -0
- /package/{build/wrappers → wrappers}/InlineWrapper.js +0 -0
- /package/{build/wrappers → wrappers}/ModalWrapper.d.ts +0 -0
- /package/{build/wrappers → wrappers}/ModalWrapper.js +0 -0
- /package/{build/wrappers → wrappers}/StaticWrapper.d.ts +0 -0
- /package/{build/wrappers → wrappers}/StaticWrapper.js +0 -0
- /package/{build/wrappers → wrappers}/Wrapper.d.ts +0 -0
- /package/{build/wrappers → wrappers}/Wrapper.js +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="styled-jsx" />
|
|
3
|
+
import { IUtils } from '@date-io/core/IUtils';
|
|
4
|
+
import { ParsableDate } from '../constants/prop-types';
|
|
5
|
+
import { BasePickerProps } from '../typings/BasePicker';
|
|
6
|
+
export declare const getDisplayDate: (value: ParsableDate, format: string, utils: IUtils<any, any>, isEmpty: boolean, { invalidLabel, emptyLabel, labelFunc }: Pick<BasePickerProps, "onError" | "variant" | "open" | "disabled" | "format" | "orientation" | "onClose" | "onOpen" | "onAccept" | "autoOk" | "labelFunc" | "initialFocusedDate" | "invalidLabel" | "emptyLabel" | "disableToolbar" | "ToolbarComponent" | "showShiftButtons" | "setShiftFunction" | "shiftButtonValues">) => string;
|
|
7
|
+
export interface BaseValidationProps {
|
|
8
|
+
/**
|
|
9
|
+
* Message, appearing when date cannot be parsed
|
|
10
|
+
* @default 'Invalid Date Format'
|
|
11
|
+
*/
|
|
12
|
+
invalidDateMessage?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export interface DateValidationProps extends BaseValidationProps {
|
|
15
|
+
/**
|
|
16
|
+
* Error message, shown if date is less then minimal date
|
|
17
|
+
* @default 'Date should not be before minimal date'
|
|
18
|
+
*/
|
|
19
|
+
minDateMessage?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Error message, shown if date is more then maximal date
|
|
22
|
+
* @default 'Date should not be after maximal date'
|
|
23
|
+
*/
|
|
24
|
+
maxDateMessage?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare const validate: (value: ParsableDate, utils: IUtils<any, any>, { maxDate, minDate, disablePast, disableFuture, maxDateMessage, minDateMessage, invalidDateMessage, strictCompareDates, }: Pick<import("../DatePicker/DatePicker").DatePickerProps, "children" | "ref" | "label" | "select" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "innerRef" | "error" | "name" | "margin" | "open" | "disabled" | "key" | "autoFocus" | "type" | "value" | "fullWidth" | "format" | "orientation" | "autoComplete" | "required" | "rows" | "onMonthChange" | "leftArrowIcon" | "rightArrowIcon" | "leftArrowButtonProps" | "rightArrowButtonProps" | "minDate" | "maxDate" | "disablePast" | "disableFuture" | "renderDay" | "allowKeyboardControl" | "shouldDisableDate" | "loadingIndicator" | "hiddenLabel" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "inputRef" | "multiline" | "rowsMax" | "SelectProps" | "InputProps" | "inputVariant" | "TextFieldComponent" | "onClose" | "onOpen" | "onAccept" | "okLabel" | "cancelLabel" | "clearLabel" | "todayLabel" | "clearable" | "showTodayButton" | "DialogProps" | "PopoverProps" | "autoOk" | "labelFunc" | "initialFocusedDate" | "invalidLabel" | "emptyLabel" | "disableToolbar" | "ToolbarComponent" | "showShiftButtons" | "setShiftFunction" | "shiftButtonValues" | "minDateMessage" | "maxDateMessage" | "invalidDateMessage" | "strictCompareDates" | "animateYearScrolling" | "onYearChange">) => import("react").ReactNode;
|
|
27
|
+
export declare function pick12hOr24hFormat(userFormat: string | undefined, ampm: boolean | undefined, formats: {
|
|
28
|
+
'12h': string;
|
|
29
|
+
'24h': string;
|
|
30
|
+
}): string;
|
|
31
|
+
export declare function makeMaskFromFormat(format: string, numberMaskChar: string): string;
|
|
32
|
+
export declare const maskedDateFormatter: (mask: string, numberMaskChar: string) => (value: string, oldValue?: string | undefined, currentCaretPosition?: number | undefined) => string;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var replaceAt = function (str, index, replacement) {
|
|
4
|
+
replacement = replacement || '';
|
|
5
|
+
return str.substr(0, index) + replacement + str.substr(index + replacement.length);
|
|
6
|
+
};
|
|
7
|
+
exports.getDisplayDate = function (value, format, utils, isEmpty, _a) {
|
|
8
|
+
var invalidLabel = _a.invalidLabel, emptyLabel = _a.emptyLabel, labelFunc = _a.labelFunc;
|
|
9
|
+
var date = utils.date(value);
|
|
10
|
+
if (labelFunc) {
|
|
11
|
+
return labelFunc(isEmpty ? null : date, invalidLabel);
|
|
12
|
+
}
|
|
13
|
+
if (isEmpty) {
|
|
14
|
+
return emptyLabel || '';
|
|
15
|
+
}
|
|
16
|
+
return utils.isValid(date) ? utils.formatByString(date, format) : invalidLabel;
|
|
17
|
+
};
|
|
18
|
+
var getComparisonMaxDate = function (utils, strictCompareDates, date) {
|
|
19
|
+
if (strictCompareDates) {
|
|
20
|
+
return date;
|
|
21
|
+
}
|
|
22
|
+
return utils.endOfDay(date);
|
|
23
|
+
};
|
|
24
|
+
var getComparisonMinDate = function (utils, strictCompareDates, date) {
|
|
25
|
+
if (strictCompareDates) {
|
|
26
|
+
return date;
|
|
27
|
+
}
|
|
28
|
+
return utils.startOfDay(date);
|
|
29
|
+
};
|
|
30
|
+
exports.validate = function (value, utils, _a // DateTimePicker doesn't support
|
|
31
|
+
) {
|
|
32
|
+
var maxDate = _a.maxDate, minDate = _a.minDate, disablePast = _a.disablePast, disableFuture = _a.disableFuture, maxDateMessage = _a.maxDateMessage, minDateMessage = _a.minDateMessage, invalidDateMessage = _a.invalidDateMessage, strictCompareDates = _a.strictCompareDates;
|
|
33
|
+
var parsedValue = utils.date(value);
|
|
34
|
+
// if null - do not show error
|
|
35
|
+
if (value === null) {
|
|
36
|
+
return '';
|
|
37
|
+
}
|
|
38
|
+
if (!utils.isValid(value)) {
|
|
39
|
+
return invalidDateMessage;
|
|
40
|
+
}
|
|
41
|
+
if (maxDate &&
|
|
42
|
+
utils.isAfter(parsedValue, getComparisonMaxDate(utils, !!strictCompareDates, utils.date(maxDate)))) {
|
|
43
|
+
return maxDateMessage;
|
|
44
|
+
}
|
|
45
|
+
if (disableFuture &&
|
|
46
|
+
utils.isAfter(parsedValue, getComparisonMaxDate(utils, !!strictCompareDates, utils.date()))) {
|
|
47
|
+
return maxDateMessage;
|
|
48
|
+
}
|
|
49
|
+
if (minDate &&
|
|
50
|
+
utils.isBefore(parsedValue, getComparisonMinDate(utils, !!strictCompareDates, utils.date(minDate)))) {
|
|
51
|
+
return minDateMessage;
|
|
52
|
+
}
|
|
53
|
+
if (disablePast &&
|
|
54
|
+
utils.isBefore(parsedValue, getComparisonMinDate(utils, !!strictCompareDates, utils.date()))) {
|
|
55
|
+
return minDateMessage;
|
|
56
|
+
}
|
|
57
|
+
return '';
|
|
58
|
+
};
|
|
59
|
+
function pick12hOr24hFormat(userFormat, ampm, formats) {
|
|
60
|
+
if (ampm === void 0) { ampm = true; }
|
|
61
|
+
if (userFormat) {
|
|
62
|
+
return userFormat;
|
|
63
|
+
}
|
|
64
|
+
return ampm ? formats['12h'] : formats['24h'];
|
|
65
|
+
}
|
|
66
|
+
exports.pick12hOr24hFormat = pick12hOr24hFormat;
|
|
67
|
+
function makeMaskFromFormat(format, numberMaskChar) {
|
|
68
|
+
return format.replace(/[a-z]/gi, numberMaskChar);
|
|
69
|
+
}
|
|
70
|
+
exports.makeMaskFromFormat = makeMaskFromFormat;
|
|
71
|
+
exports.maskedDateFormatter = function (mask, numberMaskChar) { return function (value, oldValue, currentCaretPosition) {
|
|
72
|
+
var refuse = /[^\d\w_]+/gi;
|
|
73
|
+
if (!value || value === '') {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
if (!oldValue) {
|
|
77
|
+
oldValue = '';
|
|
78
|
+
}
|
|
79
|
+
if (value == oldValue) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
if (value.length < oldValue.length && currentCaretPosition != null) {
|
|
83
|
+
value =
|
|
84
|
+
value.slice(0, currentCaretPosition) +
|
|
85
|
+
'_' +
|
|
86
|
+
value.slice(currentCaretPosition, oldValue.length);
|
|
87
|
+
}
|
|
88
|
+
var refusedOldValue = oldValue.replace(refuse, '');
|
|
89
|
+
var refusedNewValue = value.replace(refuse, '');
|
|
90
|
+
var refusedMaskSymbols = mask.replace(refuse, '');
|
|
91
|
+
var minLength = refusedOldValue.length > refusedNewValue.length
|
|
92
|
+
? refusedNewValue.length
|
|
93
|
+
: refusedOldValue.length;
|
|
94
|
+
var startPos = 0;
|
|
95
|
+
var endPosShift = 0;
|
|
96
|
+
while (startPos < minLength) {
|
|
97
|
+
if (refusedNewValue[startPos] == refusedOldValue[startPos]) {
|
|
98
|
+
startPos++;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
while (endPosShift < minLength &&
|
|
105
|
+
startPos < refusedNewValue.length - endPosShift &&
|
|
106
|
+
startPos < refusedOldValue.length - endPosShift) {
|
|
107
|
+
if (refusedNewValue[refusedNewValue.length - endPosShift - 1] ==
|
|
108
|
+
refusedOldValue[refusedOldValue.length - endPosShift - 1]) {
|
|
109
|
+
endPosShift++;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
var endStartPos = refusedNewValue.length - endPosShift;
|
|
116
|
+
endStartPos = endStartPos < startPos ? startPos : endStartPos;
|
|
117
|
+
var firstPart = refusedNewValue.slice(0, startPos);
|
|
118
|
+
var addedPart = refusedNewValue.slice(startPos, endStartPos);
|
|
119
|
+
var endPart = refusedNewValue.slice(endStartPos, refusedNewValue.length);
|
|
120
|
+
var maxSymbolsInEnd = refusedMaskSymbols.length - firstPart.length - addedPart.length;
|
|
121
|
+
while (maxSymbolsInEnd > endPart.length) {
|
|
122
|
+
addedPart += numberMaskChar;
|
|
123
|
+
maxSymbolsInEnd--;
|
|
124
|
+
}
|
|
125
|
+
var entireRefusedString = firstPart + addedPart + endPart.slice(endPart.length - maxSymbolsInEnd, endPart.length);
|
|
126
|
+
// Do nothing ?...
|
|
127
|
+
entireRefusedString = entireRefusedString.slice(0, refusedMaskSymbols.length);
|
|
128
|
+
var i = 0;
|
|
129
|
+
var n = 0;
|
|
130
|
+
var result = '';
|
|
131
|
+
while (i < mask.length) {
|
|
132
|
+
var maskChar = mask[i];
|
|
133
|
+
if (maskChar === numberMaskChar && n < entireRefusedString.length) {
|
|
134
|
+
var parsedChar = entireRefusedString[n];
|
|
135
|
+
result += parsedChar;
|
|
136
|
+
n += 1;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
result += maskChar;
|
|
140
|
+
}
|
|
141
|
+
i += 1;
|
|
142
|
+
}
|
|
143
|
+
return result;
|
|
144
|
+
}; };
|
|
@@ -2,5 +2,5 @@ import { IUtils } from '@date-io/core/IUtils';
|
|
|
2
2
|
import { MaterialUiPickersDate } from '../typings/date';
|
|
3
3
|
export declare const getHours: (offsetX: number, offsetY: number, ampm: boolean) => number;
|
|
4
4
|
export declare const getMinutes: (offsetX: number, offsetY: number, step?: number) => number;
|
|
5
|
-
export declare const getMeridiem: (date: MaterialUiPickersDate, utils: IUtils<MaterialUiPickersDate>) => "am" | "pm";
|
|
6
|
-
export declare const convertToMeridiem: (time: MaterialUiPickersDate, meridiem: "am" | "pm", ampm: boolean, utils: IUtils<MaterialUiPickersDate>) => MaterialUiPickersDate;
|
|
5
|
+
export declare const getMeridiem: (date: MaterialUiPickersDate, utils: IUtils<MaterialUiPickersDate, any>) => "am" | "pm";
|
|
6
|
+
export declare const convertToMeridiem: (time: MaterialUiPickersDate, meridiem: "am" | "pm", ampm: boolean, utils: IUtils<MaterialUiPickersDate, any>) => MaterialUiPickersDate;
|
|
@@ -6,6 +6,7 @@ import { IconButtonProps } from '@material-ui/core/IconButton';
|
|
|
6
6
|
export interface KeyboardDateInputProps extends ExtendMui<BaseTextFieldProps, 'variant' | 'onError' | 'onChange' | 'value'> {
|
|
7
7
|
format: string;
|
|
8
8
|
onChange: (value: string | null) => void;
|
|
9
|
+
onBlur?: () => void;
|
|
9
10
|
onClick?: () => void;
|
|
10
11
|
validationError?: React.ReactNode;
|
|
11
12
|
inputValue: string;
|
|
@@ -42,6 +43,10 @@ export interface KeyboardDateInputProps extends ExtendMui<BaseTextFieldProps, 'v
|
|
|
42
43
|
KeyboardButtonProps?: Partial<IconButtonProps>;
|
|
43
44
|
/** Custom formatter to be passed into Rifm component */
|
|
44
45
|
rifmFormatter?: (str: string) => string;
|
|
46
|
+
/**
|
|
47
|
+
* Show errors only when input blur
|
|
48
|
+
*/
|
|
49
|
+
showErrorOnBlur?: boolean;
|
|
45
50
|
}
|
|
46
51
|
declare const KeyboardDateInput: React.FunctionComponent<KeyboardDateInputProps>;
|
|
47
52
|
export default KeyboardDateInput;
|
|
@@ -35,24 +35,48 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
35
35
|
var React = __importStar(require("react"));
|
|
36
36
|
var InputAdornment_1 = __importDefault(require("@material-ui/core/InputAdornment"));
|
|
37
37
|
var TextField_1 = __importDefault(require("@material-ui/core/TextField"));
|
|
38
|
-
var rifm_1 = require("rifm");
|
|
39
38
|
var core_1 = require("@material-ui/core");
|
|
40
39
|
var KeyboardIcon_1 = require("./icons/KeyboardIcon");
|
|
41
40
|
var text_field_helper_1 = require("../_helpers/text-field-helper");
|
|
41
|
+
var react_1 = require("react");
|
|
42
|
+
var Rifm_1 = require("../Rifm/Rifm");
|
|
42
43
|
var KeyboardDateInput = function (_a) {
|
|
43
|
-
var inputValue = _a.inputValue, inputVariant = _a.inputVariant, validationError = _a.validationError, KeyboardButtonProps = _a.KeyboardButtonProps, InputAdornmentProps = _a.InputAdornmentProps, onClick = _a.onClick, onChange = _a.onChange, InputProps = _a.InputProps, mask = _a.mask,
|
|
44
|
+
var inputValue = _a.inputValue, _b = _a.showErrorOnBlur, showErrorOnBlur = _b === void 0 ? false : _b, inputVariant = _a.inputVariant, validationError = _a.validationError, KeyboardButtonProps = _a.KeyboardButtonProps, InputAdornmentProps = _a.InputAdornmentProps, onClick = _a.onClick, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, InputProps = _a.InputProps, mask = _a.mask, _c = _a.maskChar, maskChar = _c === void 0 ? '_' : _c, _d = _a.refuse, refuse = _d === void 0 ? /[^\d_]+/gi : _d, format = _a.format, keyboardIcon = _a.keyboardIcon, disabled = _a.disabled, rifmFormatter = _a.rifmFormatter, _e = _a.TextFieldComponent, TextFieldComponent = _e === void 0 ? TextField_1.default : _e, other = __rest(_a, ["inputValue", "showErrorOnBlur", "inputVariant", "validationError", "KeyboardButtonProps", "InputAdornmentProps", "onClick", "onChange", "onBlur", "onFocus", "InputProps", "mask", "maskChar", "refuse", "format", "keyboardIcon", "disabled", "rifmFormatter", "TextFieldComponent"]);
|
|
44
45
|
var inputMask = mask || text_field_helper_1.makeMaskFromFormat(format, maskChar);
|
|
46
|
+
var letterPosition = format.indexOf('a');
|
|
45
47
|
// prettier-ignore
|
|
46
|
-
var formatter = React.useCallback(text_field_helper_1.maskedDateFormatter(inputMask, maskChar
|
|
48
|
+
var formatter = React.useCallback(text_field_helper_1.maskedDateFormatter(inputMask, maskChar), [mask, maskChar]);
|
|
47
49
|
var position = InputAdornmentProps && InputAdornmentProps.position ? InputAdornmentProps.position : 'end';
|
|
48
50
|
var handleChange = function (text) {
|
|
49
51
|
var finalString = text === '' || text === inputMask ? null : text;
|
|
50
52
|
onChange(finalString);
|
|
51
53
|
};
|
|
52
|
-
|
|
54
|
+
var replace = function (text) {
|
|
55
|
+
return text;
|
|
56
|
+
};
|
|
57
|
+
var _f = react_1.useState(showErrorOnBlur ? true : false), showErrorFlag = _f[0], handleBlur = _f[1];
|
|
58
|
+
return (React.createElement(Rifm_1.Rifm, { value: inputValue, onChange: handleChange, format: rifmFormatter || formatter, replace: replace, mask: true, maskChar: maskChar, letterPosition: letterPosition }, function (_a) {
|
|
53
59
|
var _b;
|
|
54
60
|
var onChange = _a.onChange, value = _a.value;
|
|
55
|
-
return (React.createElement(TextFieldComponent, __assign({ disabled: disabled, error: Boolean(validationError), helperText: validationError }, other, { value: value, onChange: onChange,
|
|
61
|
+
return (React.createElement(TextFieldComponent, __assign({ disabled: disabled, error: Boolean(validationError) && !showErrorFlag, helperText: !showErrorFlag && validationError }, other, { value: value, onChange: onChange,
|
|
62
|
+
// onInput={changeInputStringValue}
|
|
63
|
+
// onKeyUp={handleKeyUp}
|
|
64
|
+
// onMouseUp={handleClick}
|
|
65
|
+
onBlur: function () {
|
|
66
|
+
if (onBlur) {
|
|
67
|
+
onBlur();
|
|
68
|
+
}
|
|
69
|
+
if (showErrorOnBlur) {
|
|
70
|
+
handleBlur(false);
|
|
71
|
+
}
|
|
72
|
+
}, onFocus: function (ev) {
|
|
73
|
+
if (onFocus) {
|
|
74
|
+
onFocus(ev);
|
|
75
|
+
}
|
|
76
|
+
if (showErrorOnBlur) {
|
|
77
|
+
handleBlur(true);
|
|
78
|
+
}
|
|
79
|
+
}, variant: inputVariant, InputProps: __assign(__assign({}, InputProps), (_b = {}, _b[position + "Adornment"] = (React.createElement(InputAdornment_1.default, __assign({ position: position }, InputAdornmentProps),
|
|
56
80
|
React.createElement(core_1.IconButton, __assign({ disabled: disabled }, KeyboardButtonProps, { onClick: onClick }), keyboardIcon))), _b)) })));
|
|
57
81
|
}));
|
|
58
82
|
};
|
|
@@ -16,8 +16,8 @@ export interface ModalDialogProps extends DialogProps {
|
|
|
16
16
|
wider?: boolean;
|
|
17
17
|
}
|
|
18
18
|
export declare const ModalDialog: React.SFC<ModalDialogProps & WithStyles<typeof styles>>;
|
|
19
|
-
export declare const styles: Record<"dialog" | "dialogRoot" | "dialogRootWider" | "withAdditionalAction", import("@material-ui/
|
|
19
|
+
export declare const styles: Record<"dialog" | "dialogRoot" | "dialogRootWider" | "withAdditionalAction", import("@material-ui/styles").CSSProperties | (() => import("@material-ui/styles").CSSProperties)>;
|
|
20
20
|
declare const _default: React.ComponentType<Pick<React.PropsWithChildren<ModalDialogProps & {
|
|
21
21
|
classes: Record<"dialog" | "dialogRoot" | "dialogRootWider" | "withAdditionalAction", string>;
|
|
22
|
-
}>, "children" | "ref" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "innerRef" | "maxWidth" | "transitionDuration" | "scroll" | "open" | "fullWidth" | "
|
|
22
|
+
}>, "children" | "ref" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "innerRef" | "maxWidth" | "transitionDuration" | "scroll" | "open" | "fullWidth" | "onEnter" | "onEntering" | "onEntered" | "onExit" | "onExiting" | "onExited" | "onClose" | "container" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "disableAutoFocus" | "disableBackdropClick" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "manager" | "onBackdropClick" | "onEscapeKeyDown" | "onRendered" | "onAccept" | "onDismiss" | "onClear" | "onSetToday" | "okLabel" | "cancelLabel" | "clearLabel" | "todayLabel" | "clearable" | "showTodayButton" | "showTabs" | "wider" | "fullScreen" | "PaperComponent" | "PaperProps" | "TransitionComponent" | "TransitionProps"> & import("@material-ui/core/styles").StyledComponentProps<"dialog" | "dialogRoot" | "dialogRootWider" | "withAdditionalAction">>;
|
|
23
23
|
export default _default;
|
|
@@ -36,7 +36,7 @@ var React = __importStar(require("react"));
|
|
|
36
36
|
var TextField_1 = __importDefault(require("@material-ui/core/TextField"));
|
|
37
37
|
exports.PureDateInput = function (_a) {
|
|
38
38
|
var inputValue = _a.inputValue, inputVariant = _a.inputVariant, validationError = _a.validationError, InputProps = _a.InputProps, _b = _a.TextFieldComponent, TextFieldComponent = _b === void 0 ? TextField_1.default : _b, other = __rest(_a, ["inputValue", "inputVariant", "validationError", "InputProps", "TextFieldComponent"]);
|
|
39
|
-
var PureDateInputProps = React.useMemo(function () { return (__assign({}, InputProps, { readOnly: true })); }, [InputProps]);
|
|
39
|
+
var PureDateInputProps = React.useMemo(function () { return (__assign(__assign({}, InputProps), { readOnly: true })); }, [InputProps]);
|
|
40
40
|
return (React.createElement(TextFieldComponent, __assign({ error: Boolean(validationError), helperText: validationError }, other, {
|
|
41
41
|
// do not overridable
|
|
42
42
|
value: inputValue, variant: inputVariant, InputProps: PureDateInputProps })));
|
|
@@ -10,6 +10,6 @@ export interface ToolbarButtonProps extends ExtendMui<ButtonProps, 'variant'>, W
|
|
|
10
10
|
align?: TypographyProps['align'];
|
|
11
11
|
typographyClassName?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare const styles: Record<"toolbarBtn", import("@material-ui/
|
|
14
|
-
declare const _default: React.ComponentType<Pick<React.PropsWithChildren<ToolbarButtonProps>, "children" | "ref" | "form" | "label" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "variant" | "innerRef" | "size" | "disabled" | "selected" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "
|
|
13
|
+
export declare const styles: Record<"toolbarBtn", import("@material-ui/styles").CSSProperties | (() => import("@material-ui/styles").CSSProperties)>;
|
|
14
|
+
declare const _default: React.ComponentType<Pick<React.PropsWithChildren<ToolbarButtonProps>, "children" | "ref" | "form" | "label" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "variant" | "innerRef" | "name" | "size" | "disabled" | "selected" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "type" | "value" | "action" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "disableFocusRipple" | "fullWidth" | "href" | "typographyClassName"> & import("@material-ui/core/styles").StyledComponentProps<"toolbarBtn">>;
|
|
15
15
|
export default _default;
|
|
@@ -3,6 +3,6 @@ import { Omit } from '@material-ui/core';
|
|
|
3
3
|
import { IUtils } from '@date-io/core/IUtils';
|
|
4
4
|
import { MaterialUiPickersDate } from '../typings/date';
|
|
5
5
|
export interface WithUtilsProps {
|
|
6
|
-
utils: IUtils<MaterialUiPickersDate>;
|
|
6
|
+
utils: IUtils<MaterialUiPickersDate, any>;
|
|
7
7
|
}
|
|
8
8
|
export declare const withUtils: () => <P extends WithUtilsProps>(Component: React.ComponentType<P>) => React.FunctionComponent<Omit<P, "utils">>;
|
|
@@ -12,7 +12,7 @@ var useKeyDown_1 = require("./useKeyDown");
|
|
|
12
12
|
var getOrientation = function () {
|
|
13
13
|
return typeof window !== 'undefined' &&
|
|
14
14
|
window.screen &&
|
|
15
|
-
window.orientation &&
|
|
15
|
+
window.screen.orientation &&
|
|
16
16
|
Math.abs(window.screen.orientation.angle) === 90
|
|
17
17
|
? 'landscape'
|
|
18
18
|
: 'portrait';
|
|
@@ -30,6 +30,6 @@ export declare function useKeyboardPickerState(props: BaseKeyboardPickerProps, o
|
|
|
30
30
|
date: MaterialUiPickersDate;
|
|
31
31
|
onChange: (newDate: MaterialUiPickersDate, isFinish?: boolean) => void;
|
|
32
32
|
onSetToday: () => void;
|
|
33
|
-
onSetShift: (
|
|
33
|
+
onSetShift: (shiftDate: Date) => void;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
@@ -35,10 +35,10 @@ function useKeyboardPickerState(props, options) {
|
|
|
35
35
|
}
|
|
36
36
|
}, [displayDate, setInnerInputValue, utils, value]);
|
|
37
37
|
var handleKeyboardChange = react_1.useCallback(function (date) {
|
|
38
|
-
onChange(date, date === null ? null : utils.
|
|
38
|
+
onChange(date, date === null ? null : utils.formatByString(date, format));
|
|
39
39
|
}, [format, onChange, utils]);
|
|
40
|
-
var _c = usePickerState_1.usePickerState(__assign({}, props, { value: dateValue, onChange: handleKeyboardChange }), options), innerInputProps = _c.inputProps, wrapperProps = _c.wrapperProps, pickerProps = _c.pickerProps;
|
|
41
|
-
var inputProps = react_1.useMemo(function () { return (__assign({}, innerInputProps, { format: wrapperProps.format, inputValue: inputValue || innerInputValue, onChange: function (value) {
|
|
40
|
+
var _c = usePickerState_1.usePickerState(__assign(__assign({}, props), { value: dateValue, onChange: handleKeyboardChange }), options), innerInputProps = _c.inputProps, wrapperProps = _c.wrapperProps, pickerProps = _c.pickerProps;
|
|
41
|
+
var inputProps = react_1.useMemo(function () { return (__assign(__assign({}, innerInputProps), { format: wrapperProps.format, inputValue: inputValue || innerInputValue, onChange: function (value) {
|
|
42
42
|
setInnerInputValue(value || '');
|
|
43
43
|
var date = value === null ? null : utils.parse(value, wrapperProps.format);
|
|
44
44
|
onChange(date, value);
|
|
@@ -9,7 +9,7 @@ export declare function usePickerState(props: BasePickerProps, options: StateHoo
|
|
|
9
9
|
date: import("../../typings/date").MaterialUiPickersDate;
|
|
10
10
|
onChange: (newDate: import("../../typings/date").MaterialUiPickersDate, isFinish?: boolean) => void;
|
|
11
11
|
onSetToday: () => void;
|
|
12
|
-
onSetShift: (
|
|
12
|
+
onSetShift: (shiftDate: Date) => void;
|
|
13
13
|
};
|
|
14
14
|
inputProps: {
|
|
15
15
|
inputValue: string;
|
|
@@ -67,9 +67,8 @@ function usePickerState(props, options) {
|
|
|
67
67
|
acceptDate(newDate);
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
onSetShift: function (
|
|
71
|
-
var newDate = utils.date();
|
|
72
|
-
newDate = utils.addDays(newDate, days);
|
|
70
|
+
onSetShift: function (shiftDate) {
|
|
71
|
+
var newDate = utils.date(shiftDate);
|
|
73
72
|
if (variant === 'inline' || variant === 'static') {
|
|
74
73
|
onChange(newDate);
|
|
75
74
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IUtils } from '@date-io/core/IUtils';
|
|
2
2
|
import { MaterialUiPickersDate } from '../../typings/date';
|
|
3
|
-
export declare const checkUtils: (utils: IUtils<MaterialUiPickersDate> | null | undefined) => void;
|
|
4
|
-
export declare function useUtils(): IUtils<MaterialUiPickersDate>;
|
|
3
|
+
export declare const checkUtils: (utils: IUtils<MaterialUiPickersDate, any> | null | undefined) => void;
|
|
4
|
+
export declare function useUtils(): IUtils<MaterialUiPickersDate, any>;
|
|
@@ -34,10 +34,10 @@ exports.timePickerDefaultProps = {
|
|
|
34
34
|
};
|
|
35
35
|
exports.datePickerDefaultProps = {
|
|
36
36
|
minDate: new Date('1900-01-01'),
|
|
37
|
-
maxDate: new Date('
|
|
37
|
+
maxDate: new Date('2200-01-01'),
|
|
38
38
|
invalidDateMessage: 'Invalid Date Format',
|
|
39
39
|
minDateMessage: 'Date should not be before minimal date',
|
|
40
40
|
maxDateMessage: 'Date should not be after maximal date',
|
|
41
41
|
allowKeyboardControl: true,
|
|
42
42
|
};
|
|
43
|
-
exports.dateTimePickerDefaultProps = __assign({}, exports.timePickerDefaultProps, exports.datePickerDefaultProps, { showTabs: true });
|
|
43
|
+
exports.dateTimePickerDefaultProps = __assign(__assign(__assign({}, exports.timePickerDefaultProps), exports.datePickerDefaultProps), { showTabs: true });
|