@elliemae/ds-date-time-recurrence-picker 2.0.0-alpha.11 → 2.0.0-alpha.12
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/cjs/DSDateTimeRecurrenceSelector.js +90 -87
- package/cjs/components/AlertModal/DateTimeRangeModal.js +53 -50
- package/cjs/components/CustomOptionRender/CustomOptionRender.js +20 -19
- package/cjs/components/DateTimeRangeModal/DateTimeRangeModal.js +13 -12
- package/cjs/components/DateTimeRangeModalImpl/DateTimeRangeModalImpl.js +9 -4
- package/cjs/components/DateTimeRecurenceSelectorImpl.js +27 -21
- package/cjs/components/DayOfMonthPicker/DayOfMonthPicker.js +16 -13
- package/cjs/components/DayOfYearPicker/DayOfYearPicker.js +16 -13
- package/cjs/components/DaysOfWeekPicker/DaysOfWeekPicker.js +32 -30
- package/cjs/components/EndDate/EndDate.js +30 -28
- package/cjs/components/FieldWrapper/FieldWrapper.js +4 -3
- package/cjs/components/LabelWrapper/LabelWrapper.js +4 -3
- package/cjs/components/RepeatPickerInput/RepeatPickerInput.js +18 -15
- package/cjs/components/StartDateTime/StartDateTime.js +22 -19
- package/cjs/components/TimeZonePicker/TimeZonePicker.js +24 -22
- package/cjs/components/ValidationMessage/ValidationMessage.js +8 -5
- package/esm/DSDateTimeRecurrenceSelector.js +90 -87
- package/esm/components/AlertModal/DateTimeRangeModal.js +53 -50
- package/esm/components/CustomOptionRender/CustomOptionRender.js +20 -19
- package/esm/components/DateTimeRangeModal/DateTimeRangeModal.js +13 -11
- package/esm/components/DateTimeRangeModalImpl/DateTimeRangeModalImpl.js +9 -4
- package/esm/components/DateTimeRecurenceSelectorImpl.js +25 -18
- package/esm/components/DayOfMonthPicker/DayOfMonthPicker.js +15 -11
- package/esm/components/DayOfYearPicker/DayOfYearPicker.js +15 -11
- package/esm/components/DaysOfWeekPicker/DaysOfWeekPicker.js +31 -25
- package/esm/components/EndDate/EndDate.js +30 -27
- package/esm/components/FieldWrapper/FieldWrapper.js +4 -3
- package/esm/components/LabelWrapper/LabelWrapper.js +4 -3
- package/esm/components/RepeatPickerInput/RepeatPickerInput.js +16 -11
- package/esm/components/StartDateTime/StartDateTime.js +22 -19
- package/esm/components/TimeZonePicker/TimeZonePicker.js +24 -21
- package/esm/components/ValidationMessage/ValidationMessage.js +8 -5
- package/package.json +12 -7
- package/types/DSDateTimeRecurrenceSelector.d.ts +276 -40
|
@@ -18,93 +18,96 @@ import CustomOptionRender from './components/CustomOptionRender/CustomOptionRend
|
|
|
18
18
|
import { dropdownTimeZoneOptions } from './options/dropdownTimeZoneOptions.js';
|
|
19
19
|
export { DropdownTimeZoneTypes, dropdownTimeZoneOptions } from './options/dropdownTimeZoneOptions.js';
|
|
20
20
|
|
|
21
|
-
const DSDateTimeRecurrenceSelector =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
21
|
+
const DSDateTimeRecurrenceSelector = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
containerProps = {},
|
|
24
|
+
className = '',
|
|
25
|
+
preselectedOptions = dropdownPreselectedOptions,
|
|
26
|
+
repeatOptions = dropdownRepeatOptions,
|
|
27
|
+
endTypesOptions: endTypesOptions$1 = endTypesOptions,
|
|
28
|
+
endTimesOptions: endTimesOptions$1 = endTimesOptions,
|
|
29
|
+
dayOfWeekOptions = dropdownDayOfWeekOptions,
|
|
30
|
+
dayOfWeekOptionsEnable = true,
|
|
31
|
+
dayOfMonthOptions = dropdownDayOfMonthOptions,
|
|
32
|
+
dayOfMonthOptionsEnable = true,
|
|
33
|
+
dayOfYearOptions = dropdownDayOfYearOptions,
|
|
34
|
+
dayOfYearOptionsEnable = true,
|
|
35
|
+
displayMonthCustomOption = false,
|
|
36
|
+
displayYearCustomOption = false,
|
|
37
|
+
dayOfMonthAsCurrentDateOptions = ['numberOfMonth', 'dayOfTheWeekOfMonth'],
|
|
38
|
+
dayOfYearAsCurrentDateOptions = ['numberOfYear', 'dayOfTheMonthOfYear'],
|
|
39
|
+
onChange = () => null,
|
|
40
|
+
placeholder = 'Select Range',
|
|
41
|
+
modalSize = 'medium',
|
|
42
|
+
modalTitle = 'Report Scheduling',
|
|
43
|
+
confirmLabel = 'Apply',
|
|
44
|
+
rejectLabel = 'Cancel',
|
|
45
|
+
modalType = 'confirm',
|
|
46
|
+
onConfirmField = () => null,
|
|
47
|
+
onRejectField = () => null,
|
|
48
|
+
openModal = false,
|
|
49
|
+
appElement = '#root',
|
|
50
|
+
value = null,
|
|
51
|
+
customRange = null,
|
|
52
|
+
customOptionRender = CustomOptionRender,
|
|
53
|
+
displayCurrentMonthYear = true,
|
|
54
|
+
timeZoneOptions = dropdownTimeZoneOptions,
|
|
55
|
+
useTimezoneSelector = false,
|
|
56
|
+
allowMultipleDaysOfWeek = false,
|
|
57
|
+
advanceOption = {
|
|
58
|
+
label: 'Custom',
|
|
59
|
+
value: 'custom-range',
|
|
60
|
+
isAdvance: true
|
|
61
|
+
},
|
|
62
|
+
isValidRecurrence = () => true,
|
|
63
|
+
validationMessage = '',
|
|
64
|
+
endDayBlocked = () => false,
|
|
65
|
+
startDayBlocked = () => false,
|
|
66
|
+
repeatFrecuencyCustomProps = {}
|
|
67
|
+
} = _ref;
|
|
68
|
+
return /*#__PURE__*/_jsx(DateTimeRecurenceSelectorImpl, {
|
|
69
|
+
advanceOption: advanceOption,
|
|
70
|
+
allowMultipleDaysOfWeek: allowMultipleDaysOfWeek,
|
|
71
|
+
appElement: appElement,
|
|
72
|
+
className: className,
|
|
73
|
+
confirmLabel: confirmLabel,
|
|
74
|
+
containerProps: containerProps,
|
|
75
|
+
customOptionRender: customOptionRender,
|
|
76
|
+
customRange: customRange,
|
|
77
|
+
dayOfMonthAsCurrentDateOptions: dayOfMonthAsCurrentDateOptions,
|
|
78
|
+
dayOfMonthOptionsEnable: dayOfMonthOptionsEnable,
|
|
79
|
+
dayOfWeekOptionsEnable: dayOfWeekOptionsEnable,
|
|
80
|
+
dayOfYearAsCurrentDateOptions: dayOfYearAsCurrentDateOptions,
|
|
81
|
+
dayOfYearOptionsEnable: dayOfYearOptionsEnable,
|
|
82
|
+
displayCurrentMonthYear: displayCurrentMonthYear,
|
|
83
|
+
displayMonthCustomOption: displayMonthCustomOption,
|
|
84
|
+
displayYearCustomOption: displayYearCustomOption,
|
|
85
|
+
dropdownDayOfMonthOptions: dayOfMonthOptions,
|
|
86
|
+
dropdownDayOfWeekOptions: dayOfWeekOptions,
|
|
87
|
+
dropdownDayOfYearOptions: dayOfYearOptions,
|
|
88
|
+
dropdownPreselectedOptions: preselectedOptions,
|
|
89
|
+
dropdownRepeatOptions: repeatOptions,
|
|
90
|
+
endDayBlocked: endDayBlocked,
|
|
91
|
+
endTimesOptions: endTimesOptions$1,
|
|
92
|
+
endTypesOptions: endTypesOptions$1,
|
|
93
|
+
isValidRecurrence: isValidRecurrence,
|
|
94
|
+
modalSize: modalSize,
|
|
95
|
+
modalTitle: modalTitle,
|
|
96
|
+
modalType: modalType,
|
|
97
|
+
onChange: onChange,
|
|
98
|
+
onConfirmField: onConfirmField,
|
|
99
|
+
onRejectField: onRejectField,
|
|
100
|
+
openModal: openModal,
|
|
101
|
+
placeholder: placeholder,
|
|
102
|
+
rejectLabel: rejectLabel,
|
|
103
|
+
repeatFrecuencyCustomProps: repeatFrecuencyCustomProps,
|
|
104
|
+
startDayBlocked: startDayBlocked,
|
|
105
|
+
timeZoneOptions: timeZoneOptions,
|
|
106
|
+
useTimezoneSelector: useTimezoneSelector,
|
|
107
|
+
validationMessage: validationMessage,
|
|
108
|
+
value: value
|
|
109
|
+
});
|
|
110
|
+
};
|
|
108
111
|
const dateTimeRecurrenceSelectorProps = {
|
|
109
112
|
containerProps: PropTypes.shape({}).description('Set of Properties attached to the main container'),
|
|
110
113
|
className: PropTypes.string.description('html class attribute'),
|
|
@@ -3,55 +3,58 @@ import 'react';
|
|
|
3
3
|
import DSModal from '@elliemae/ds-modal';
|
|
4
4
|
import DateTimePredefinedRangeSelectorImpl from '../DateTimeRangeModalImpl/DateTimeRangeModalImpl.js';
|
|
5
5
|
|
|
6
|
-
const DateTimeRangeModal =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
6
|
+
const DateTimeRangeModal = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
isOpen = false,
|
|
9
|
+
onClose = () => null,
|
|
10
|
+
modalTitle = 'Report Scheduling',
|
|
11
|
+
modalSize = 'medium ',
|
|
12
|
+
confirmLabel = 'Apply',
|
|
13
|
+
rejectLabel = 'Cancel',
|
|
14
|
+
modalType = 'confirm',
|
|
15
|
+
onConfirmField = () => null,
|
|
16
|
+
onRejectField = () => null,
|
|
17
|
+
appElement = null,
|
|
18
|
+
onCustomDateTimeRange = () => null,
|
|
19
|
+
displayCurrentMonthYear = true,
|
|
20
|
+
dropdownDayOfMonthOptions = [],
|
|
21
|
+
dropdownDayOfWeekOptions = [],
|
|
22
|
+
dropdownDayOfYearOptions = [],
|
|
23
|
+
dropdownRepeatOptions = [],
|
|
24
|
+
rangeValue = {},
|
|
25
|
+
dayOfMonthOptionsEnable = true,
|
|
26
|
+
dayOfWeekOptionsEnable = true,
|
|
27
|
+
dayOfYearOptionsEnable = true,
|
|
28
|
+
timeZoneOptions = [],
|
|
29
|
+
useTimezoneSelector = false,
|
|
30
|
+
allowMultipleDaysOfWeek = false
|
|
31
|
+
} = _ref;
|
|
32
|
+
return /*#__PURE__*/_jsx(DSModal, {
|
|
33
|
+
appElement: appElement,
|
|
34
|
+
confirmLabel: confirmLabel,
|
|
35
|
+
isOpen: isOpen,
|
|
36
|
+
modalTitle: modalTitle,
|
|
37
|
+
modalType: modalType,
|
|
38
|
+
onClose: onClose,
|
|
39
|
+
onConfirm: onConfirmField,
|
|
40
|
+
onReject: onRejectField,
|
|
41
|
+
rejectLabel: rejectLabel,
|
|
42
|
+
size: modalSize
|
|
43
|
+
}, void 0, /*#__PURE__*/_jsx(DateTimePredefinedRangeSelectorImpl, {
|
|
44
|
+
allowMultipleDaysOfWeek: allowMultipleDaysOfWeek,
|
|
45
|
+
dayOfMonthOptionsEnable: dayOfMonthOptionsEnable,
|
|
46
|
+
dayOfWeekOptionsEnable: dayOfWeekOptionsEnable,
|
|
47
|
+
dayOfYearOptionsEnable: dayOfYearOptionsEnable,
|
|
48
|
+
displayCurrentMonthYear: displayCurrentMonthYear,
|
|
49
|
+
dropdownDayOfMonthOptions: dropdownDayOfMonthOptions,
|
|
50
|
+
dropdownDayOfWeekOptions: dropdownDayOfWeekOptions,
|
|
51
|
+
dropdownDayOfYearOptions: dropdownDayOfYearOptions,
|
|
52
|
+
dropdownRepeatOptions: dropdownRepeatOptions,
|
|
53
|
+
onCustomDateTimeRange: onCustomDateTimeRange,
|
|
54
|
+
rangeValue: rangeValue,
|
|
55
|
+
timeZoneOptions: timeZoneOptions,
|
|
56
|
+
useTimezoneSelector: useTimezoneSelector
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
56
59
|
|
|
57
60
|
export { DateTimeRangeModal as default };
|
|
@@ -42,25 +42,26 @@ timezonePickerInput
|
|
|
42
42
|
}
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
|
-
const CustomOptionRender =
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
45
|
+
const CustomOptionRender = _ref => {
|
|
46
|
+
let {
|
|
47
|
+
customRange: {
|
|
48
|
+
startDateInput,
|
|
49
|
+
startTimeInput,
|
|
50
|
+
qtyRepeatPickerInput,
|
|
51
|
+
typeRepeatPickerInput,
|
|
52
|
+
dayWeekRepeatPickerInput,
|
|
53
|
+
endDateInput,
|
|
54
|
+
endTypeInput,
|
|
55
|
+
endTimesInput,
|
|
56
|
+
dayOfMonthRepeatPickerInput,
|
|
57
|
+
dayOfYearRepeatPickerInput,
|
|
58
|
+
timezonePickerInput
|
|
59
|
+
},
|
|
60
|
+
dayOfMonthOptionsEnable,
|
|
61
|
+
dayOfWeekOptionsEnable,
|
|
62
|
+
dayOfYearOptionsEnable,
|
|
63
|
+
useTimezoneSelector
|
|
64
|
+
} = _ref;
|
|
64
65
|
let display = 'Custom'; // frequency
|
|
65
66
|
|
|
66
67
|
if (qtyRepeatPickerInput === 1) display = typeRepeat[typeRepeatPickerInput];else display = "every ".concat(qtyRepeatPickerInput, " ").concat(typeRepeatPickerInput, "s"); // type
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import DSModal from '@elliemae/ds-modal';
|
|
6
5
|
import DateTimePredefinedRangeSelectorImpl from '../DateTimeRangeModalImpl/DateTimeRangeModalImpl.js';
|
|
7
6
|
|
|
8
7
|
class DateTimeRangeModal extends React.Component {
|
|
9
|
-
constructor(
|
|
10
|
-
|
|
8
|
+
constructor() {
|
|
9
|
+
var _this;
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
super(...arguments);
|
|
12
|
+
_this = this;
|
|
13
|
+
this.state = {
|
|
13
14
|
isValid: true
|
|
14
|
-
}
|
|
15
|
+
};
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
this.updateIsValid = function () {
|
|
17
18
|
const {
|
|
18
19
|
onCustomDateTimeRange = () => null,
|
|
19
20
|
isValidRecurrence
|
|
20
|
-
} =
|
|
21
|
-
onCustomDateTimeRange(...
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
} = _this.props;
|
|
22
|
+
onCustomDateTimeRange(...arguments);
|
|
23
|
+
|
|
24
|
+
_this.setState({
|
|
25
|
+
isValid: isValidRecurrence(...arguments)
|
|
24
26
|
});
|
|
25
|
-
}
|
|
27
|
+
};
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
render() {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import 'core-js/modules/es.string.replace.js';
|
|
@@ -29,20 +34,20 @@ class DateTimePredefinedRangeSelectorImpl extends Component {
|
|
|
29
34
|
constructor(props) {
|
|
30
35
|
super(props);
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
this.onChange = () => {
|
|
33
38
|
const {
|
|
34
39
|
onCustomDateTimeRange
|
|
35
40
|
} = this.props;
|
|
36
41
|
onCustomDateTimeRange(this.state);
|
|
37
|
-
}
|
|
42
|
+
};
|
|
38
43
|
|
|
39
|
-
|
|
44
|
+
this.onQtyRepeatPickerInput = value => {
|
|
40
45
|
this.setState({
|
|
41
46
|
qtyRepeatPickerInput: value.replace(/[^0-9]/g, '')
|
|
42
47
|
}, () => {
|
|
43
48
|
this.onChange();
|
|
44
49
|
});
|
|
45
|
-
}
|
|
50
|
+
};
|
|
46
51
|
|
|
47
52
|
const {
|
|
48
53
|
dropdownDayOfMonthOptions,
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
3
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
2
5
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.find.js';
|
|
3
10
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
11
|
import { Component } from 'react';
|
|
5
12
|
import { isEqual } from 'lodash';
|
|
6
13
|
import 'react-dates/initialize';
|
|
7
14
|
import { components } from 'react-select';
|
|
8
15
|
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
9
|
-
import DSComboBox from '@elliemae/ds-
|
|
16
|
+
import { DSComboBox } from '@elliemae/ds-form';
|
|
10
17
|
import DateTimeRangeModal from './DateTimeRangeModal/DateTimeRangeModal.js';
|
|
11
18
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
19
|
|
|
@@ -23,7 +30,7 @@ class DateTimeRecurenceSelectorImpl extends Component {
|
|
|
23
30
|
constructor(props) {
|
|
24
31
|
super(props);
|
|
25
32
|
|
|
26
|
-
|
|
33
|
+
this.onChange = () => {
|
|
27
34
|
const {
|
|
28
35
|
onChange
|
|
29
36
|
} = this.props;
|
|
@@ -32,15 +39,15 @@ class DateTimeRecurenceSelectorImpl extends Component {
|
|
|
32
39
|
selected
|
|
33
40
|
} = this.state;
|
|
34
41
|
onChange(selected, customRange);
|
|
35
|
-
}
|
|
42
|
+
};
|
|
36
43
|
|
|
37
|
-
|
|
44
|
+
this.onCustomDateTimeRange = customRange => {
|
|
38
45
|
this.setState({
|
|
39
46
|
customRange
|
|
40
47
|
});
|
|
41
|
-
}
|
|
48
|
+
};
|
|
42
49
|
|
|
43
|
-
|
|
50
|
+
this.onChangeDropdown = value => {
|
|
44
51
|
const {
|
|
45
52
|
dropdownPreselectedOptions
|
|
46
53
|
} = this.props;
|
|
@@ -62,9 +69,9 @@ class DateTimeRecurenceSelectorImpl extends Component {
|
|
|
62
69
|
openModal: false
|
|
63
70
|
});
|
|
64
71
|
}
|
|
65
|
-
}
|
|
72
|
+
};
|
|
66
73
|
|
|
67
|
-
|
|
74
|
+
this.handleConfirm = () => {
|
|
68
75
|
const {
|
|
69
76
|
onConfirmField,
|
|
70
77
|
customOptionRender: CustomOptionRender,
|
|
@@ -88,33 +95,33 @@ class DateTimeRecurenceSelectorImpl extends Component {
|
|
|
88
95
|
this.onChange();
|
|
89
96
|
this.handleCloseModal();
|
|
90
97
|
onConfirmField();
|
|
91
|
-
}
|
|
98
|
+
};
|
|
92
99
|
|
|
93
|
-
|
|
100
|
+
this.handleReject = () => {
|
|
94
101
|
const {
|
|
95
102
|
onRejectField
|
|
96
103
|
} = this.props;
|
|
97
104
|
this.handleActionClose();
|
|
98
105
|
onRejectField();
|
|
99
|
-
}
|
|
106
|
+
};
|
|
100
107
|
|
|
101
|
-
|
|
108
|
+
this.handleActionClose = () => {
|
|
102
109
|
this.setState(previousState => ({
|
|
103
110
|
selected: previousState.previousSelection
|
|
104
111
|
}));
|
|
105
112
|
this.handleCloseModal();
|
|
106
|
-
}
|
|
113
|
+
};
|
|
107
114
|
|
|
108
|
-
|
|
115
|
+
this.handleOpenModal = () => this.setState({
|
|
109
116
|
openModal: true
|
|
110
|
-
})
|
|
117
|
+
});
|
|
111
118
|
|
|
112
|
-
|
|
119
|
+
this.handleCloseModal = () => {
|
|
113
120
|
this.setState({
|
|
114
121
|
openModal: false
|
|
115
122
|
});
|
|
116
123
|
setTimeout(() => document.activeElement.blur(), 0); // https://github.com/reactjs/react-modal/issues/680
|
|
117
|
-
}
|
|
124
|
+
};
|
|
118
125
|
|
|
119
126
|
this.initCustomRange = props.customRange;
|
|
120
127
|
this.state = {
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
+
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.find.js';
|
|
3
6
|
import 'react';
|
|
4
|
-
import DSComboBox from '@elliemae/ds-
|
|
7
|
+
import { DSComboBox } from '@elliemae/ds-form';
|
|
5
8
|
import { nthDay } from '../helpers/nthday.js';
|
|
6
9
|
import { dropdownDayOfMonthOptions } from '../../options/dropdownDayOfMonthOptions.js';
|
|
7
10
|
import FormLabel from '../Forms/FormLabel.js';
|
|
8
11
|
import FormFieldGroup from '../Forms/FormFieldGroup.js';
|
|
9
12
|
import FormGroup from '../Forms/FormGroup.js';
|
|
10
13
|
|
|
11
|
-
const DaysOfMonthPicker =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
const DaysOfMonthPicker = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
onDayChange = () => null,
|
|
17
|
+
dayOfMonthValue = dropdownDayOfMonthOptions[0].value,
|
|
18
|
+
dayOfMonthOptions = dropdownDayOfMonthOptions,
|
|
19
|
+
displayOptionsAsCurrentDate = true,
|
|
20
|
+
currentDate = null,
|
|
21
|
+
inputLabel = 'On',
|
|
22
|
+
dayOfMonthAsCurrentDateOptions,
|
|
23
|
+
displayMonthCustomOption
|
|
24
|
+
} = _ref;
|
|
21
25
|
let options = dayOfMonthOptions;
|
|
22
26
|
|
|
23
27
|
if (displayOptionsAsCurrentDate) {
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
+
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.find.js';
|
|
3
6
|
import 'react';
|
|
4
|
-
import DSComboBox from '@elliemae/ds-
|
|
7
|
+
import { DSComboBox } from '@elliemae/ds-form';
|
|
5
8
|
import { nthDay } from '../helpers/nthday.js';
|
|
6
9
|
import { dropdownDayOfMonthOptions } from '../../options/dropdownDayOfMonthOptions.js';
|
|
7
10
|
import FormGroup from '../Forms/FormGroup.js';
|
|
8
11
|
import FormLabel from '../Forms/FormLabel.js';
|
|
9
12
|
import FormFieldGroup from '../Forms/FormFieldGroup.js';
|
|
10
13
|
|
|
11
|
-
const DaysOfMonthPicker =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
const DaysOfMonthPicker = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
onDayChange = () => null,
|
|
17
|
+
dayOfMonthValue = dropdownDayOfMonthOptions[0].value,
|
|
18
|
+
dayOfMonthOptions = dropdownDayOfMonthOptions,
|
|
19
|
+
displayOptionsAsCurrentDate = true,
|
|
20
|
+
currentDate = null,
|
|
21
|
+
inputLabel = 'On',
|
|
22
|
+
dayOfYearAsCurrentDateOptions,
|
|
23
|
+
displayYearCustomOption
|
|
24
|
+
} = _ref;
|
|
21
25
|
let options = dayOfMonthOptions;
|
|
22
26
|
|
|
23
27
|
if (displayOptionsAsCurrentDate) {
|