@elliemae/ds-date-time-recurrence-picker 2.2.0-alpha.3 → 2.2.0-next.2
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 +195 -226
- package/cjs/__test__/DSDateTimeRecurrenceSelector.test.js +30 -0
- package/cjs/components/AlertModal/DateTimeRangeModal.js +66 -87
- package/cjs/components/CustomOptionRender/CustomOptionRender.js +88 -81
- package/cjs/components/DateTimeRangeModal/DateTimeRangeModal.js +69 -81
- package/cjs/components/DateTimeRangeModalImpl/DateTimeRangeModalImpl.js +149 -105
- package/cjs/components/DateTimeRecurenceSelectorImpl.js +172 -142
- package/cjs/components/DayOfMonthPicker/DayOfMonthPicker.js +51 -64
- package/cjs/components/DayOfYearPicker/DayOfYearPicker.js +47 -62
- package/cjs/components/DaysOfWeekPicker/DaysOfWeekPicker.js +56 -66
- package/cjs/components/EndDate/EndDate.js +49 -68
- package/cjs/components/FieldWrapper/FieldWrapper.js +23 -42
- package/cjs/components/Forms/FormField.js +7 -36
- package/cjs/components/Forms/FormFieldGroup.js +7 -36
- package/cjs/components/Forms/FormGroup.js +11 -36
- package/cjs/components/Forms/FormLabel.js +7 -36
- package/cjs/components/LabelWrapper/LabelWrapper.js +23 -42
- package/cjs/components/RepeatPickerInput/RepeatPickerInput.js +58 -63
- package/cjs/components/StartDateTime/StartDateTime.js +41 -59
- package/cjs/components/TimeZonePicker/TimeZonePicker.js +43 -61
- package/cjs/components/ValidationMessage/ValidationMessage.js +23 -40
- package/cjs/components/helpers/nthday.js +13 -62
- package/cjs/index.js +29 -36
- package/cjs/options/dropdownDayOfMonthOptions.js +13 -44
- package/cjs/options/dropdownDayOfWeekOptions.js +28 -64
- package/cjs/options/dropdownDayOfYearOptions.js +13 -44
- package/cjs/options/dropdownPreselectedOptions.js +24 -57
- package/cjs/options/dropdownRepeatOptions.js +24 -57
- package/cjs/options/dropdownTimeZoneOptions.js +32 -67
- package/cjs/options/endTypesOptions.js +37 -75
- package/esm/DSDateTimeRecurrenceSelector.js +155 -180
- package/esm/__test__/DSDateTimeRecurrenceSelector.test.js +24 -0
- package/esm/components/AlertModal/DateTimeRangeModal.js +59 -58
- package/esm/components/CustomOptionRender/CustomOptionRender.js +79 -49
- package/esm/components/DateTimeRangeModal/DateTimeRangeModal.js +61 -52
- package/esm/components/DateTimeRangeModalImpl/DateTimeRangeModalImpl.js +131 -67
- package/esm/components/DateTimeRecurenceSelectorImpl.js +163 -111
- package/esm/components/DayOfMonthPicker/DayOfMonthPicker.js +45 -35
- package/esm/components/DayOfYearPicker/DayOfYearPicker.js +41 -33
- package/esm/components/DaysOfWeekPicker/DaysOfWeekPicker.js +50 -37
- package/esm/components/EndDate/EndDate.js +42 -39
- package/esm/components/FieldWrapper/FieldWrapper.js +17 -13
- package/esm/components/Forms/FormField.js +5 -7
- package/esm/components/Forms/FormFieldGroup.js +5 -7
- package/esm/components/Forms/FormGroup.js +9 -7
- package/esm/components/Forms/FormLabel.js +5 -7
- package/esm/components/LabelWrapper/LabelWrapper.js +17 -13
- package/esm/components/RepeatPickerInput/RepeatPickerInput.js +50 -34
- package/esm/components/StartDateTime/StartDateTime.js +33 -30
- package/esm/components/TimeZonePicker/TimeZonePicker.js +37 -32
- package/esm/components/ValidationMessage/ValidationMessage.js +17 -11
- package/esm/components/helpers/nthday.js +6 -33
- package/esm/index.js +8 -7
- package/esm/options/dropdownDayOfMonthOptions.js +9 -15
- package/esm/options/dropdownDayOfWeekOptions.js +24 -35
- package/esm/options/dropdownDayOfYearOptions.js +9 -15
- package/esm/options/dropdownPreselectedOptions.js +19 -28
- package/esm/options/dropdownRepeatOptions.js +19 -28
- package/esm/options/dropdownTimeZoneOptions.js +27 -38
- package/esm/options/endTypesOptions.js +31 -46
- package/package.json +6 -6
- package/cjs/DSDateTimeRecurrenceSelector.js.map +0 -7
- package/cjs/components/AlertModal/DateTimeRangeModal.js.map +0 -7
- package/cjs/components/CustomOptionRender/CustomOptionRender.js.map +0 -7
- package/cjs/components/DateTimeRangeModal/DateTimeRangeModal.js.map +0 -7
- package/cjs/components/DateTimeRangeModalImpl/DateTimeRangeModalImpl.js.map +0 -7
- package/cjs/components/DateTimeRecurenceSelectorImpl.js.map +0 -7
- package/cjs/components/DayOfMonthPicker/DayOfMonthPicker.js.map +0 -7
- package/cjs/components/DayOfYearPicker/DayOfYearPicker.js.map +0 -7
- package/cjs/components/DaysOfWeekPicker/DaysOfWeekPicker.js.map +0 -7
- package/cjs/components/EndDate/EndDate.js.map +0 -7
- package/cjs/components/FieldWrapper/FieldWrapper.js.map +0 -7
- package/cjs/components/Forms/FormField.js.map +0 -7
- package/cjs/components/Forms/FormFieldGroup.js.map +0 -7
- package/cjs/components/Forms/FormGroup.js.map +0 -7
- package/cjs/components/Forms/FormLabel.js.map +0 -7
- package/cjs/components/LabelWrapper/LabelWrapper.js.map +0 -7
- package/cjs/components/RepeatPickerInput/RepeatPickerInput.js.map +0 -7
- package/cjs/components/StartDateTime/StartDateTime.js.map +0 -7
- package/cjs/components/TimeZonePicker/TimeZonePicker.js.map +0 -7
- package/cjs/components/ValidationMessage/ValidationMessage.js.map +0 -7
- package/cjs/components/helpers/nthday.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/options/dropdownDayOfMonthOptions.js.map +0 -7
- package/cjs/options/dropdownDayOfWeekOptions.js.map +0 -7
- package/cjs/options/dropdownDayOfYearOptions.js.map +0 -7
- package/cjs/options/dropdownPreselectedOptions.js.map +0 -7
- package/cjs/options/dropdownRepeatOptions.js.map +0 -7
- package/cjs/options/dropdownTimeZoneOptions.js.map +0 -7
- package/cjs/options/endTypesOptions.js.map +0 -7
- package/esm/DSDateTimeRecurrenceSelector.js.map +0 -7
- package/esm/components/AlertModal/DateTimeRangeModal.js.map +0 -7
- package/esm/components/CustomOptionRender/CustomOptionRender.js.map +0 -7
- package/esm/components/DateTimeRangeModal/DateTimeRangeModal.js.map +0 -7
- package/esm/components/DateTimeRangeModalImpl/DateTimeRangeModalImpl.js.map +0 -7
- package/esm/components/DateTimeRecurenceSelectorImpl.js.map +0 -7
- package/esm/components/DayOfMonthPicker/DayOfMonthPicker.js.map +0 -7
- package/esm/components/DayOfYearPicker/DayOfYearPicker.js.map +0 -7
- package/esm/components/DaysOfWeekPicker/DaysOfWeekPicker.js.map +0 -7
- package/esm/components/EndDate/EndDate.js.map +0 -7
- package/esm/components/FieldWrapper/FieldWrapper.js.map +0 -7
- package/esm/components/Forms/FormField.js.map +0 -7
- package/esm/components/Forms/FormFieldGroup.js.map +0 -7
- package/esm/components/Forms/FormGroup.js.map +0 -7
- package/esm/components/Forms/FormLabel.js.map +0 -7
- package/esm/components/LabelWrapper/LabelWrapper.js.map +0 -7
- package/esm/components/RepeatPickerInput/RepeatPickerInput.js.map +0 -7
- package/esm/components/StartDateTime/StartDateTime.js.map +0 -7
- package/esm/components/TimeZonePicker/TimeZonePicker.js.map +0 -7
- package/esm/components/ValidationMessage/ValidationMessage.js.map +0 -7
- package/esm/components/helpers/nthday.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/options/dropdownDayOfMonthOptions.js.map +0 -7
- package/esm/options/dropdownDayOfWeekOptions.js.map +0 -7
- package/esm/options/dropdownDayOfYearOptions.js.map +0 -7
- package/esm/options/dropdownPreselectedOptions.js.map +0 -7
- package/esm/options/dropdownRepeatOptions.js.map +0 -7
- package/esm/options/dropdownTimeZoneOptions.js.map +0 -7
- package/esm/options/endTypesOptions.js.map +0 -7
|
@@ -1,49 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
6
|
+
import { DSRadioGroup, DSRadio, DSCheckboxGroup, DSCheckbox } from '@elliemae/ds-form';
|
|
7
|
+
import { dropdownDayOfWeekOptions } from '../../options/dropdownDayOfWeekOptions.js';
|
|
8
|
+
import FormGroup from '../Forms/FormGroup.js';
|
|
9
|
+
import FormFieldGroup from '../Forms/FormFieldGroup.js';
|
|
10
|
+
import FormLabel from '../Forms/FormLabel.js';
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
cssClassName
|
|
14
|
+
} = convertPropToCssClassName('week-days-week-days-picker');
|
|
15
|
+
|
|
10
16
|
const getActive = (allowMultipleDaysOfWeek, active) => {
|
|
11
|
-
if (!allowMultipleDaysOfWeek)
|
|
12
|
-
|
|
13
|
-
if (Array.isArray(active))
|
|
14
|
-
return active;
|
|
17
|
+
if (!allowMultipleDaysOfWeek) return active;
|
|
18
|
+
if (Array.isArray(active)) return active;
|
|
15
19
|
return [active];
|
|
16
20
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
|
|
22
|
+
const DaysOfWeekPicker = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
allowMultipleDaysOfWeek = false,
|
|
25
|
+
onDayChange = () => null,
|
|
26
|
+
active = dropdownDayOfWeekOptions[0].value,
|
|
27
|
+
options = dropdownDayOfWeekOptions,
|
|
28
|
+
inputLabel = 'On'
|
|
29
|
+
} = _ref;
|
|
24
30
|
const safeActive = getActive(allowMultipleDaysOfWeek, active);
|
|
25
|
-
return
|
|
31
|
+
return /*#__PURE__*/_jsx(FormGroup, {
|
|
26
32
|
className: cssClassName
|
|
27
|
-
},
|
|
33
|
+
}, void 0, /*#__PURE__*/_jsx(FormLabel, {}, void 0, inputLabel), /*#__PURE__*/_jsx(FormFieldGroup, {}, void 0, !allowMultipleDaysOfWeek && /*#__PURE__*/_jsx(DSRadioGroup, {
|
|
28
34
|
activeValue: safeActive,
|
|
29
35
|
onChange: onDayChange,
|
|
30
36
|
orientation: "horizontal"
|
|
31
|
-
}, options.map((
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
}, void 0, options.map((_ref2, index) => {
|
|
38
|
+
let {
|
|
39
|
+
label,
|
|
40
|
+
value
|
|
41
|
+
} = _ref2;
|
|
42
|
+
return /*#__PURE__*/_jsx(DSRadio, {
|
|
43
|
+
labelText: label,
|
|
44
|
+
value: value
|
|
45
|
+
}, index);
|
|
46
|
+
})), allowMultipleDaysOfWeek && /*#__PURE__*/_jsx(DSCheckboxGroup, {
|
|
36
47
|
activeValue: safeActive,
|
|
37
48
|
onChange: onDayChange,
|
|
38
49
|
orientation: "horizontal"
|
|
39
|
-
}, options.map((
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
}, void 0, options.map((_ref3, index) => {
|
|
51
|
+
let {
|
|
52
|
+
label,
|
|
53
|
+
value
|
|
54
|
+
} = _ref3;
|
|
55
|
+
return /*#__PURE__*/_jsx(DSCheckbox, {
|
|
56
|
+
labelText: label,
|
|
57
|
+
value: value
|
|
58
|
+
}, index);
|
|
59
|
+
}))));
|
|
44
60
|
};
|
|
45
|
-
|
|
46
|
-
export {
|
|
47
|
-
DaysOfWeekPicker_default as default
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=DaysOfWeekPicker.js.map
|
|
61
|
+
|
|
62
|
+
export { DaysOfWeekPicker as default };
|
|
@@ -1,40 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import DSDatePicker from
|
|
4
|
-
import { DSComboBox } from
|
|
5
|
-
import { endTypes } from
|
|
6
|
-
import FormField from
|
|
7
|
-
import FormLabel from
|
|
8
|
-
import FormGroup from
|
|
9
|
-
import FormFieldGroup from
|
|
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
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import DSDatePicker from '@elliemae/ds-date-picker';
|
|
4
|
+
import { DSComboBox } from '@elliemae/ds-form';
|
|
5
|
+
import { endTypes } from '../../options/endTypesOptions.js';
|
|
6
|
+
import FormField from '../Forms/FormField.js';
|
|
7
|
+
import FormLabel from '../Forms/FormLabel.js';
|
|
8
|
+
import FormGroup from '../Forms/FormGroup.js';
|
|
9
|
+
import FormFieldGroup from '../Forms/FormFieldGroup.js';
|
|
10
|
+
|
|
11
|
+
var _FormLabel, _FormField;
|
|
12
|
+
|
|
13
|
+
const EndDate = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
onEndDateChange = () => null,
|
|
16
|
+
onEndTypeChange = () => null,
|
|
17
|
+
onEndTimesChange = () => null,
|
|
18
|
+
endDateValue = null,
|
|
19
|
+
endTypeValue = null,
|
|
20
|
+
endTypesOptions = [],
|
|
21
|
+
endTimesOptions = [],
|
|
22
|
+
endTimesValue = null,
|
|
23
|
+
endDayBlocked
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/_jsx(FormGroup, {}, void 0, _FormLabel || (_FormLabel = /*#__PURE__*/_jsx(FormLabel, {}, void 0, "Ends")), /*#__PURE__*/_jsx(FormFieldGroup, {}, void 0, /*#__PURE__*/_jsx(FormField, {}, void 0, /*#__PURE__*/_jsx(DSComboBox, {
|
|
26
|
+
onChange: onEndTypeChange,
|
|
27
|
+
options: endTypesOptions,
|
|
28
|
+
value: endTypeValue
|
|
29
|
+
})), endTypeValue === endTypes.NEVER && (_FormField || (_FormField = /*#__PURE__*/_jsx(FormField, {}, void 0, /*#__PURE__*/_jsx("div", {})))), endTypeValue === endTypes.ON && /*#__PURE__*/_jsx(FormField, {}, void 0, /*#__PURE__*/_jsx(DSDatePicker, {
|
|
30
|
+
appendToBody: true,
|
|
31
|
+
date: endDateValue,
|
|
32
|
+
isDayBlocked: endDayBlocked,
|
|
33
|
+
onDateChange: onEndDateChange,
|
|
34
|
+
openDirection: "up",
|
|
35
|
+
zIndex: 10
|
|
36
|
+
})), endTypeValue === endTypes.AFTER && /*#__PURE__*/_jsx(FormField, {}, void 0, /*#__PURE__*/_jsx(DSComboBox, {
|
|
37
|
+
onChange: onEndTimesChange,
|
|
38
|
+
options: endTimesOptions,
|
|
39
|
+
value: endTimesValue
|
|
40
|
+
}))));
|
|
39
41
|
};
|
|
40
|
-
|
|
42
|
+
|
|
43
|
+
export { EndDate as default };
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { convertPropToCssClassName } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
cssClassName
|
|
7
|
+
} = convertPropToCssClassName('field-wrapper');
|
|
8
|
+
|
|
9
|
+
function FieldWrapper(_ref) {
|
|
10
|
+
let {
|
|
11
|
+
children
|
|
12
|
+
} = _ref;
|
|
13
|
+
return /*#__PURE__*/_jsx("div", {
|
|
14
|
+
className: "".concat(cssClassName)
|
|
15
|
+
}, void 0, children);
|
|
9
16
|
}
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
FieldWrapper_default as default
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=FieldWrapper.js.map
|
|
17
|
+
|
|
18
|
+
export { FieldWrapper as default };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=FormField.js.map
|
|
1
|
+
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
2
|
+
|
|
3
|
+
var FormField = aggregatedClasses('div')('form-field');
|
|
4
|
+
|
|
5
|
+
export { FormField as default };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=FormFieldGroup.js.map
|
|
1
|
+
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
2
|
+
|
|
3
|
+
var FormFieldGroup = aggregatedClasses('div')('form-field-group');
|
|
4
|
+
|
|
5
|
+
export { FormFieldGroup as default };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An inline/vertical group of form-items/fields described by a label/legend
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
var FormGroup = aggregatedClasses('div')('form-group');
|
|
8
|
+
|
|
9
|
+
export { FormGroup as default };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=FormLabel.js.map
|
|
1
|
+
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
2
|
+
|
|
3
|
+
var FormLabel = aggregatedClasses('label')('form-label');
|
|
4
|
+
|
|
5
|
+
export { FormLabel as default };
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { convertPropToCssClassName } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
cssClassName
|
|
7
|
+
} = convertPropToCssClassName('label-wrapper');
|
|
8
|
+
|
|
9
|
+
function LabelWrapper(_ref) {
|
|
10
|
+
let {
|
|
11
|
+
children
|
|
12
|
+
} = _ref;
|
|
13
|
+
return /*#__PURE__*/_jsx("div", {
|
|
14
|
+
className: "".concat(cssClassName)
|
|
15
|
+
}, void 0, children);
|
|
9
16
|
}
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
LabelWrapper_default as default
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=LabelWrapper.js.map
|
|
17
|
+
|
|
18
|
+
export { LabelWrapper as default };
|
|
@@ -1,45 +1,61 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
9
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
10
|
+
import { useState } from 'react';
|
|
11
|
+
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
12
|
+
import { DSTextBox, DSComboBox } from '@elliemae/ds-form';
|
|
13
|
+
import FormGroup from '../Forms/FormGroup.js';
|
|
14
|
+
import FormLabel from '../Forms/FormLabel.js';
|
|
15
|
+
import FormFieldGroup from '../Forms/FormFieldGroup.js';
|
|
16
|
+
import FormField from '../Forms/FormField.js';
|
|
17
|
+
import { jsx } from 'react/jsx-runtime';
|
|
18
|
+
|
|
19
|
+
const _excluded = ["onChange", "onKeyDown", "value"];
|
|
20
|
+
|
|
21
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
+
|
|
23
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
|
+
const {
|
|
25
|
+
cssClassName
|
|
26
|
+
} = convertPropToCssClassName('repeat-picker-input-range-selector');
|
|
27
|
+
|
|
28
|
+
const RepeatPickerInput = _ref => {
|
|
29
|
+
let {
|
|
30
|
+
onQtyChange = () => null,
|
|
31
|
+
onTypeChange = () => null,
|
|
32
|
+
qtyValue = 1,
|
|
33
|
+
repeatOptions = [],
|
|
34
|
+
repeatOptionsValue = null,
|
|
35
|
+
repeatInputLabel = 'Repeats every',
|
|
36
|
+
repeatFrecuencyCustomProps = {}
|
|
37
|
+
} = _ref;
|
|
38
|
+
const [last, setLast] = useState('');
|
|
39
|
+
|
|
40
|
+
const rest = _objectWithoutProperties(repeatFrecuencyCustomProps, _excluded);
|
|
41
|
+
|
|
42
|
+
return /*#__PURE__*/_jsx(FormGroup, {
|
|
22
43
|
className: cssClassName
|
|
23
|
-
},
|
|
24
|
-
onChange:
|
|
25
|
-
if (last !== 69)
|
|
26
|
-
onQtyChange(e.target.value);
|
|
44
|
+
}, void 0, /*#__PURE__*/_jsx(FormLabel, {}, void 0, repeatInputLabel), /*#__PURE__*/_jsx(FormFieldGroup, {}, void 0, /*#__PURE__*/_jsx(FormField, {}, void 0, /*#__PURE__*/jsx(DSTextBox, _objectSpread({
|
|
45
|
+
onChange: e => {
|
|
46
|
+
if (last !== 69) onQtyChange(e.target.value);
|
|
27
47
|
},
|
|
28
|
-
onKeyDown:
|
|
48
|
+
onKeyDown: e => {
|
|
29
49
|
setLast(e.keyCode);
|
|
30
50
|
return e.keyCode !== 69;
|
|
31
51
|
},
|
|
32
52
|
type: "number",
|
|
33
|
-
value: qtyValue
|
|
34
|
-
|
|
35
|
-
})), /* @__PURE__ */ React2.createElement(FormField, null, /* @__PURE__ */ React2.createElement(DSComboBox, {
|
|
53
|
+
value: qtyValue
|
|
54
|
+
}, rest || {}))), /*#__PURE__*/_jsx(FormField, {}, void 0, /*#__PURE__*/_jsx(DSComboBox, {
|
|
36
55
|
onChange: onTypeChange,
|
|
37
56
|
options: repeatOptions,
|
|
38
57
|
value: repeatOptionsValue
|
|
39
58
|
}))));
|
|
40
59
|
};
|
|
41
|
-
|
|
42
|
-
export {
|
|
43
|
-
RepeatPickerInput_default as default
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=RepeatPickerInput.js.map
|
|
60
|
+
|
|
61
|
+
export { RepeatPickerInput as default };
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import DSDatePicker from
|
|
4
|
-
import DSTimePicker from
|
|
5
|
-
import FormLabel from
|
|
6
|
-
import FormFieldGroup from
|
|
7
|
-
import FormGroup from
|
|
8
|
-
import FormField from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import DSDatePicker from '@elliemae/ds-date-picker';
|
|
4
|
+
import DSTimePicker from '@elliemae/ds-time-picker';
|
|
5
|
+
import FormLabel from '../Forms/FormLabel.js';
|
|
6
|
+
import FormFieldGroup from '../Forms/FormFieldGroup.js';
|
|
7
|
+
import FormGroup from '../Forms/FormGroup.js';
|
|
8
|
+
import FormField from '../Forms/FormField.js';
|
|
9
|
+
|
|
10
|
+
var _FormLabel;
|
|
11
|
+
|
|
12
|
+
const StartDateTime = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
onStartDateChange = () => null,
|
|
15
|
+
onStartTimeChange = () => null,
|
|
16
|
+
startDateValue = null,
|
|
17
|
+
startTimeValue = null,
|
|
18
|
+
startDayBlocked
|
|
19
|
+
} = _ref;
|
|
20
|
+
return /*#__PURE__*/_jsx(FormGroup, {}, void 0, _FormLabel || (_FormLabel = /*#__PURE__*/_jsx(FormLabel, {}, void 0, "Starts")), /*#__PURE__*/_jsx(FormFieldGroup, {}, void 0, /*#__PURE__*/_jsx(FormField, {}, void 0, /*#__PURE__*/_jsx(DSDatePicker, {
|
|
21
|
+
appendToBody: true,
|
|
22
|
+
date: startDateValue,
|
|
23
|
+
isDayBlocked: startDayBlocked,
|
|
24
|
+
keepOpenOnDateSelect: false,
|
|
25
|
+
onDateChange: onStartDateChange,
|
|
26
|
+
zIndex: 10
|
|
27
|
+
})), /*#__PURE__*/_jsx(FormField, {}, void 0, /*#__PURE__*/_jsx(DSTimePicker, {
|
|
28
|
+
onChange: onStartTimeChange,
|
|
29
|
+
value: startTimeValue,
|
|
30
|
+
zIndex: 10
|
|
31
|
+
}))));
|
|
30
32
|
};
|
|
31
|
-
|
|
33
|
+
|
|
34
|
+
export { StartDateTime as default };
|
|
@@ -1,33 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { convertPropToCssClassName } from
|
|
4
|
-
import { DSComboBox } from
|
|
5
|
-
import { dropdownTimeZoneOptions } from
|
|
6
|
-
import FieldWrapper from
|
|
7
|
-
import LabelWrapper from
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
4
|
+
import { DSComboBox } from '@elliemae/ds-form';
|
|
5
|
+
import { dropdownTimeZoneOptions } from '../../options/dropdownTimeZoneOptions.js';
|
|
6
|
+
import FieldWrapper from '../FieldWrapper/FieldWrapper.js';
|
|
7
|
+
import LabelWrapper from '../LabelWrapper/LabelWrapper.js';
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
cssClassName,
|
|
11
|
+
classNameElement
|
|
12
|
+
} = convertPropToCssClassName('timezone-picker-input-range-selector');
|
|
13
|
+
|
|
14
|
+
const TimeZonePicker = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
onTimezoneChange = () => null,
|
|
17
|
+
timezoneValue = dropdownTimeZoneOptions[0].value,
|
|
18
|
+
timezoneOptions = dropdownTimeZoneOptions,
|
|
19
|
+
inputLabel = 'Time Zone'
|
|
20
|
+
} = _ref;
|
|
21
|
+
return /*#__PURE__*/_jsx("div", {
|
|
22
|
+
className: "".concat(cssClassName)
|
|
23
|
+
}, void 0, /*#__PURE__*/_jsx("div", {
|
|
24
|
+
className: "grid-x"
|
|
25
|
+
}, void 0, /*#__PURE__*/_jsx("div", {
|
|
26
|
+
className: "cell medium-4 large-3"
|
|
27
|
+
}, void 0, /*#__PURE__*/_jsx(LabelWrapper, {}, void 0, /*#__PURE__*/_jsx("div", {
|
|
28
|
+
className: "".concat(classNameElement('label'))
|
|
29
|
+
}, void 0, inputLabel))), /*#__PURE__*/_jsx("div", {
|
|
30
|
+
className: "cell medium-8 large-9"
|
|
31
|
+
}, void 0, /*#__PURE__*/_jsx(FieldWrapper, {}, void 0, /*#__PURE__*/_jsx(DSComboBox, {
|
|
32
|
+
onChange: onTimezoneChange,
|
|
33
|
+
options: timezoneOptions,
|
|
34
|
+
value: timezoneValue
|
|
35
|
+
})))));
|
|
32
36
|
};
|
|
33
|
-
|
|
37
|
+
|
|
38
|
+
export { TimeZonePicker as default };
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { convertPropToCssClassName } from
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
cssClassName
|
|
7
|
+
} = convertPropToCssClassName('recurrence-selector-validation-message');
|
|
8
|
+
|
|
9
|
+
const ValidationMessage = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
validationMessage = ''
|
|
12
|
+
} = _ref;
|
|
13
|
+
return /*#__PURE__*/_jsx("div", {
|
|
14
|
+
className: cssClassName
|
|
15
|
+
}, void 0, validationMessage);
|
|
11
16
|
};
|
|
12
|
-
|
|
17
|
+
|
|
18
|
+
export { ValidationMessage as default };
|
|
@@ -1,33 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"Wednesday",
|
|
8
|
-
"Thursday",
|
|
9
|
-
"Friday",
|
|
10
|
-
"Saturday"
|
|
11
|
-
];
|
|
12
|
-
const monthNames = [
|
|
13
|
-
"January",
|
|
14
|
-
"February",
|
|
15
|
-
"March",
|
|
16
|
-
"April",
|
|
17
|
-
"May",
|
|
18
|
-
"June",
|
|
19
|
-
"July",
|
|
20
|
-
"August",
|
|
21
|
-
"September",
|
|
22
|
-
"October",
|
|
23
|
-
"November",
|
|
24
|
-
"December"
|
|
25
|
-
];
|
|
26
|
-
const nthDay = (date) => nth[Math.floor(date.getDate() / 7)];
|
|
27
|
-
export {
|
|
28
|
-
dayNames,
|
|
29
|
-
monthNames,
|
|
30
|
-
nth,
|
|
31
|
-
nthDay
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=nthday.js.map
|
|
1
|
+
const nth = ['First', 'Second', 'Third', 'Fourth', 'Fifth'];
|
|
2
|
+
const dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
3
|
+
const monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
4
|
+
const nthDay = date => nth[Math.floor(date.getDate() / 7)];
|
|
5
|
+
|
|
6
|
+
export { dayNames, monthNames, nth, nthDay };
|