@elliemae/ds-date-time-recurrence-picker 2.2.0 → 2.3.0-alpha.3
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 +226 -195
- package/cjs/DSDateTimeRecurrenceSelector.js.map +7 -0
- package/cjs/components/AlertModal/DateTimeRangeModal.js +87 -66
- package/cjs/components/AlertModal/DateTimeRangeModal.js.map +7 -0
- package/cjs/components/CustomOptionRender/CustomOptionRender.js +81 -88
- package/cjs/components/CustomOptionRender/CustomOptionRender.js.map +7 -0
- package/cjs/components/DateTimeRangeModal/DateTimeRangeModal.js +81 -69
- package/cjs/components/DateTimeRangeModal/DateTimeRangeModal.js.map +7 -0
- package/cjs/components/DateTimeRangeModalImpl/DateTimeRangeModalImpl.js +105 -149
- package/cjs/components/DateTimeRangeModalImpl/DateTimeRangeModalImpl.js.map +7 -0
- package/cjs/components/DateTimeRecurenceSelectorImpl.js +142 -172
- package/cjs/components/DateTimeRecurenceSelectorImpl.js.map +7 -0
- package/cjs/components/DayOfMonthPicker/DayOfMonthPicker.js +64 -51
- package/cjs/components/DayOfMonthPicker/DayOfMonthPicker.js.map +7 -0
- package/cjs/components/DayOfYearPicker/DayOfYearPicker.js +62 -47
- package/cjs/components/DayOfYearPicker/DayOfYearPicker.js.map +7 -0
- package/cjs/components/DaysOfWeekPicker/DaysOfWeekPicker.js +66 -56
- package/cjs/components/DaysOfWeekPicker/DaysOfWeekPicker.js.map +7 -0
- package/cjs/components/EndDate/EndDate.js +68 -49
- package/cjs/components/EndDate/EndDate.js.map +7 -0
- package/cjs/components/FieldWrapper/FieldWrapper.js +42 -23
- package/cjs/components/FieldWrapper/FieldWrapper.js.map +7 -0
- package/cjs/components/Forms/FormField.js +36 -7
- package/cjs/components/Forms/FormField.js.map +7 -0
- package/cjs/components/Forms/FormFieldGroup.js +36 -7
- package/cjs/components/Forms/FormFieldGroup.js.map +7 -0
- package/cjs/components/Forms/FormGroup.js +36 -11
- package/cjs/components/Forms/FormGroup.js.map +7 -0
- package/cjs/components/Forms/FormLabel.js +36 -7
- package/cjs/components/Forms/FormLabel.js.map +7 -0
- package/cjs/components/LabelWrapper/LabelWrapper.js +42 -23
- package/cjs/components/LabelWrapper/LabelWrapper.js.map +7 -0
- package/cjs/components/RepeatPickerInput/RepeatPickerInput.js +63 -58
- package/cjs/components/RepeatPickerInput/RepeatPickerInput.js.map +7 -0
- package/cjs/components/StartDateTime/StartDateTime.js +59 -41
- package/cjs/components/StartDateTime/StartDateTime.js.map +7 -0
- package/cjs/components/TimeZonePicker/TimeZonePicker.js +61 -43
- package/cjs/components/TimeZonePicker/TimeZonePicker.js.map +7 -0
- package/cjs/components/ValidationMessage/ValidationMessage.js +40 -23
- package/cjs/components/ValidationMessage/ValidationMessage.js.map +7 -0
- package/cjs/components/helpers/nthday.js +62 -13
- package/cjs/components/helpers/nthday.js.map +7 -0
- package/cjs/index.js +36 -29
- package/cjs/index.js.map +7 -0
- package/cjs/options/dropdownDayOfMonthOptions.js +44 -13
- package/cjs/options/dropdownDayOfMonthOptions.js.map +7 -0
- package/cjs/options/dropdownDayOfWeekOptions.js +64 -28
- package/cjs/options/dropdownDayOfWeekOptions.js.map +7 -0
- package/cjs/options/dropdownDayOfYearOptions.js +44 -13
- package/cjs/options/dropdownDayOfYearOptions.js.map +7 -0
- package/cjs/options/dropdownPreselectedOptions.js +57 -24
- package/cjs/options/dropdownPreselectedOptions.js.map +7 -0
- package/cjs/options/dropdownRepeatOptions.js +57 -24
- package/cjs/options/dropdownRepeatOptions.js.map +7 -0
- package/cjs/options/dropdownTimeZoneOptions.js +67 -32
- package/cjs/options/dropdownTimeZoneOptions.js.map +7 -0
- package/cjs/options/endTypesOptions.js +75 -37
- package/cjs/options/endTypesOptions.js.map +7 -0
- package/esm/DSDateTimeRecurrenceSelector.js +180 -155
- package/esm/DSDateTimeRecurrenceSelector.js.map +7 -0
- package/esm/components/AlertModal/DateTimeRangeModal.js +58 -59
- package/esm/components/AlertModal/DateTimeRangeModal.js.map +7 -0
- package/esm/components/CustomOptionRender/CustomOptionRender.js +49 -79
- package/esm/components/CustomOptionRender/CustomOptionRender.js.map +7 -0
- package/esm/components/DateTimeRangeModal/DateTimeRangeModal.js +52 -61
- package/esm/components/DateTimeRangeModal/DateTimeRangeModal.js.map +7 -0
- package/esm/components/DateTimeRangeModalImpl/DateTimeRangeModalImpl.js +67 -131
- package/esm/components/DateTimeRangeModalImpl/DateTimeRangeModalImpl.js.map +7 -0
- package/esm/components/DateTimeRecurenceSelectorImpl.js +111 -163
- package/esm/components/DateTimeRecurenceSelectorImpl.js.map +7 -0
- package/esm/components/DayOfMonthPicker/DayOfMonthPicker.js +35 -45
- package/esm/components/DayOfMonthPicker/DayOfMonthPicker.js.map +7 -0
- package/esm/components/DayOfYearPicker/DayOfYearPicker.js +33 -41
- package/esm/components/DayOfYearPicker/DayOfYearPicker.js.map +7 -0
- package/esm/components/DaysOfWeekPicker/DaysOfWeekPicker.js +37 -50
- package/esm/components/DaysOfWeekPicker/DaysOfWeekPicker.js.map +7 -0
- package/esm/components/EndDate/EndDate.js +39 -42
- package/esm/components/EndDate/EndDate.js.map +7 -0
- package/esm/components/FieldWrapper/FieldWrapper.js +13 -17
- package/esm/components/FieldWrapper/FieldWrapper.js.map +7 -0
- package/esm/components/Forms/FormField.js +7 -5
- package/esm/components/Forms/FormField.js.map +7 -0
- package/esm/components/Forms/FormFieldGroup.js +7 -5
- package/esm/components/Forms/FormFieldGroup.js.map +7 -0
- package/esm/components/Forms/FormGroup.js +7 -9
- package/esm/components/Forms/FormGroup.js.map +7 -0
- package/esm/components/Forms/FormLabel.js +7 -5
- package/esm/components/Forms/FormLabel.js.map +7 -0
- package/esm/components/LabelWrapper/LabelWrapper.js +13 -17
- package/esm/components/LabelWrapper/LabelWrapper.js.map +7 -0
- package/esm/components/RepeatPickerInput/RepeatPickerInput.js +34 -50
- package/esm/components/RepeatPickerInput/RepeatPickerInput.js.map +7 -0
- package/esm/components/StartDateTime/StartDateTime.js +30 -33
- package/esm/components/StartDateTime/StartDateTime.js.map +7 -0
- package/esm/components/TimeZonePicker/TimeZonePicker.js +32 -37
- package/esm/components/TimeZonePicker/TimeZonePicker.js.map +7 -0
- package/esm/components/ValidationMessage/ValidationMessage.js +11 -17
- package/esm/components/ValidationMessage/ValidationMessage.js.map +7 -0
- package/esm/components/helpers/nthday.js +33 -6
- package/esm/components/helpers/nthday.js.map +7 -0
- package/esm/index.js +7 -8
- package/esm/index.js.map +7 -0
- package/esm/options/dropdownDayOfMonthOptions.js +15 -9
- package/esm/options/dropdownDayOfMonthOptions.js.map +7 -0
- package/esm/options/dropdownDayOfWeekOptions.js +35 -24
- package/esm/options/dropdownDayOfWeekOptions.js.map +7 -0
- package/esm/options/dropdownDayOfYearOptions.js +15 -9
- package/esm/options/dropdownDayOfYearOptions.js.map +7 -0
- package/esm/options/dropdownPreselectedOptions.js +28 -19
- package/esm/options/dropdownPreselectedOptions.js.map +7 -0
- package/esm/options/dropdownRepeatOptions.js +28 -19
- package/esm/options/dropdownRepeatOptions.js.map +7 -0
- package/esm/options/dropdownTimeZoneOptions.js +38 -27
- package/esm/options/dropdownTimeZoneOptions.js.map +7 -0
- package/esm/options/endTypesOptions.js +46 -31
- package/esm/options/endTypesOptions.js.map +7 -0
- package/package.json +6 -6
- package/cjs/__test__/DSDateTimeRecurrenceSelector.test.js +0 -30
- package/esm/__test__/DSDateTimeRecurrenceSelector.test.js +0 -24
|
@@ -1,62 +1,54 @@
|
|
|
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
|
-
displayOptionsAsCurrentDate = true,
|
|
20
|
-
currentDate = null,
|
|
21
|
-
inputLabel = 'On',
|
|
22
|
-
dayOfYearAsCurrentDateOptions,
|
|
23
|
-
displayYearCustomOption
|
|
24
|
-
} = _ref;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { DSComboBox } from "@elliemae/ds-form";
|
|
4
|
+
import { nthDay } from "../helpers/nthday";
|
|
5
|
+
import { dropdownDayOfMonthOptions } from "../../options/dropdownDayOfMonthOptions";
|
|
6
|
+
import FormGroup from "../Forms/FormGroup";
|
|
7
|
+
import FormLabel from "../Forms/FormLabel";
|
|
8
|
+
import FormFieldGroup from "../Forms/FormFieldGroup";
|
|
9
|
+
const DaysOfMonthPicker = ({
|
|
10
|
+
onDayChange = () => null,
|
|
11
|
+
dayOfMonthValue = dropdownDayOfMonthOptions[0].value,
|
|
12
|
+
dayOfMonthOptions = dropdownDayOfMonthOptions,
|
|
13
|
+
displayOptionsAsCurrentDate = true,
|
|
14
|
+
currentDate = null,
|
|
15
|
+
inputLabel = "On",
|
|
16
|
+
dayOfYearAsCurrentDateOptions,
|
|
17
|
+
displayYearCustomOption
|
|
18
|
+
}) => {
|
|
25
19
|
let options = dayOfMonthOptions;
|
|
26
|
-
|
|
27
20
|
if (displayOptionsAsCurrentDate) {
|
|
28
|
-
const numberoption =
|
|
29
|
-
const nthoption =
|
|
21
|
+
const numberoption = `on the ${currentDate.format("Do")} of ${currentDate.format("MMMM")}`;
|
|
22
|
+
const nthoption = `on the ${nthDay(currentDate.toDate())} ${currentDate.format("dddd")} of ${currentDate.format("MMMM")}`;
|
|
30
23
|
options = [];
|
|
31
|
-
|
|
32
|
-
if (dayOfYearAsCurrentDateOptions.indexOf('numberOfYear') > -1) {
|
|
24
|
+
if (dayOfYearAsCurrentDateOptions.indexOf("numberOfYear") > -1) {
|
|
33
25
|
options.push({
|
|
34
26
|
label: numberoption,
|
|
35
27
|
value: numberoption,
|
|
36
|
-
dayOfYearRepeatPickerKey:
|
|
28
|
+
dayOfYearRepeatPickerKey: "numberOfYear"
|
|
37
29
|
});
|
|
38
30
|
}
|
|
39
|
-
|
|
40
|
-
if (dayOfYearAsCurrentDateOptions.indexOf('dayOfTheMonthOfYear') > -1) {
|
|
31
|
+
if (dayOfYearAsCurrentDateOptions.indexOf("dayOfTheMonthOfYear") > -1) {
|
|
41
32
|
options.push({
|
|
42
33
|
label: nthoption,
|
|
43
34
|
value: nthoption,
|
|
44
|
-
dayOfYearRepeatPickerKey:
|
|
35
|
+
dayOfYearRepeatPickerKey: "dayOfTheMonthOfYear"
|
|
45
36
|
});
|
|
46
37
|
}
|
|
47
|
-
|
|
48
38
|
if (displayYearCustomOption) {
|
|
49
39
|
options = [...options, ...dayOfMonthOptions];
|
|
50
40
|
}
|
|
51
41
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
onDayChange(value, options.find(o => o.value === value));
|
|
42
|
+
return /* @__PURE__ */ React2.createElement(FormGroup, null, /* @__PURE__ */ React2.createElement(FormLabel, null, inputLabel), /* @__PURE__ */ React2.createElement(FormFieldGroup, null, /* @__PURE__ */ React2.createElement(DSComboBox, {
|
|
43
|
+
onChange: (value) => {
|
|
44
|
+
onDayChange(value, options.find((o) => o.value === value));
|
|
56
45
|
},
|
|
57
|
-
options
|
|
46
|
+
options,
|
|
58
47
|
value: dayOfMonthValue
|
|
59
48
|
})));
|
|
60
49
|
};
|
|
61
|
-
|
|
62
|
-
export {
|
|
50
|
+
var DayOfYearPicker_default = DaysOfMonthPicker;
|
|
51
|
+
export {
|
|
52
|
+
DayOfYearPicker_default as default
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=DayOfYearPicker.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/DayOfYearPicker/DayOfYearPicker.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { DSComboBox } from '@elliemae/ds-form';\nimport { nthDay } from '../helpers/nthday';\nimport { dropdownDayOfMonthOptions } from '../../options/dropdownDayOfMonthOptions';\nimport FormGroup from '../Forms/FormGroup';\nimport FormLabel from '../Forms/FormLabel';\nimport FormFieldGroup from '../Forms/FormFieldGroup';\n\nconst DaysOfMonthPicker = ({\n onDayChange = () => null,\n dayOfMonthValue = dropdownDayOfMonthOptions[0].value,\n dayOfMonthOptions = dropdownDayOfMonthOptions,\n displayOptionsAsCurrentDate = true,\n currentDate = null,\n inputLabel = 'On',\n dayOfYearAsCurrentDateOptions,\n displayYearCustomOption,\n}) => {\n let options = dayOfMonthOptions;\n if (displayOptionsAsCurrentDate) {\n const numberoption = `on the ${currentDate.format('Do')} of ${currentDate.format('MMMM')}`;\n const nthoption = `on the ${nthDay(currentDate.toDate())} ${currentDate.format('dddd')} of ${currentDate.format(\n 'MMMM',\n )}`;\n options = [];\n\n if (dayOfYearAsCurrentDateOptions.indexOf('numberOfYear') > -1) {\n options.push({\n label: numberoption,\n value: numberoption,\n dayOfYearRepeatPickerKey: 'numberOfYear',\n });\n }\n if (dayOfYearAsCurrentDateOptions.indexOf('dayOfTheMonthOfYear') > -1) {\n options.push({\n label: nthoption,\n value: nthoption,\n dayOfYearRepeatPickerKey: 'dayOfTheMonthOfYear',\n });\n }\n\n if (displayYearCustomOption) {\n options = [...options, ...dayOfMonthOptions];\n }\n }\n return (\n <FormGroup>\n <FormLabel>{inputLabel}</FormLabel>\n <FormFieldGroup>\n <DSComboBox\n onChange={(value) => {\n onDayChange(\n value,\n options.find((o) => o.value === value),\n );\n }}\n options={options}\n value={dayOfMonthValue}\n />\n </FormFieldGroup>\n </FormGroup>\n );\n};\n\nexport default DaysOfMonthPicker;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,oBAAoB,CAAC;AAAA,EACzB,cAAc,MAAM;AAAA,EACpB,kBAAkB,0BAA0B,GAAG;AAAA,EAC/C,oBAAoB;AAAA,EACpB,8BAA8B;AAAA,EAC9B,cAAc;AAAA,EACd,aAAa;AAAA,EACb;AAAA,EACA;AAAA,MACI;AACJ,MAAI,UAAU;AACd,MAAI,6BAA6B;AAC/B,UAAM,eAAe,UAAU,YAAY,OAAO,YAAY,YAAY,OAAO;AACjF,UAAM,YAAY,UAAU,OAAO,YAAY,aAAa,YAAY,OAAO,cAAc,YAAY,OACvG;AAEF,cAAU;AAEV,QAAI,8BAA8B,QAAQ,kBAAkB,IAAI;AAC9D,cAAQ,KAAK;AAAA,QACX,OAAO;AAAA,QACP,OAAO;AAAA,QACP,0BAA0B;AAAA;AAAA;AAG9B,QAAI,8BAA8B,QAAQ,yBAAyB,IAAI;AACrE,cAAQ,KAAK;AAAA,QACX,OAAO;AAAA,QACP,OAAO;AAAA,QACP,0BAA0B;AAAA;AAAA;AAI9B,QAAI,yBAAyB;AAC3B,gBAAU,CAAC,GAAG,SAAS,GAAG;AAAA;AAAA;AAG9B,SACE,qCAAC,WAAD,MACE,qCAAC,WAAD,MAAY,aACZ,qCAAC,gBAAD,MACE,qCAAC,YAAD;AAAA,IACE,UAAU,CAAC,UAAU;AACnB,kBACE,OACA,QAAQ,KAAK,CAAC,MAAM,EAAE,UAAU;AAAA;AAAA,IAGpC;AAAA,IACA,OAAO;AAAA;AAAA;AAOjB,IAAO,0BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,62 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import FormLabel from '../Forms/FormLabel.js';
|
|
11
|
-
|
|
12
|
-
const {
|
|
13
|
-
cssClassName
|
|
14
|
-
} = convertPropToCssClassName('week-days-week-days-picker');
|
|
15
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
4
|
+
import { DSRadio, DSRadioGroup, DSCheckbox, DSCheckboxGroup } from "@elliemae/ds-form";
|
|
5
|
+
import { dropdownDayOfWeekOptions } from "../../options/dropdownDayOfWeekOptions";
|
|
6
|
+
import FormGroup from "../Forms/FormGroup";
|
|
7
|
+
import FormFieldGroup from "../Forms/FormFieldGroup";
|
|
8
|
+
import FormLabel from "../Forms/FormLabel";
|
|
9
|
+
const { cssClassName } = convertPropToCssClassName("week-days-week-days-picker");
|
|
16
10
|
const getActive = (allowMultipleDaysOfWeek, active) => {
|
|
17
|
-
if (!allowMultipleDaysOfWeek)
|
|
18
|
-
|
|
11
|
+
if (!allowMultipleDaysOfWeek)
|
|
12
|
+
return active;
|
|
13
|
+
if (Array.isArray(active))
|
|
14
|
+
return active;
|
|
19
15
|
return [active];
|
|
20
16
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
inputLabel = 'On'
|
|
29
|
-
} = _ref;
|
|
17
|
+
const DaysOfWeekPicker = ({
|
|
18
|
+
allowMultipleDaysOfWeek = false,
|
|
19
|
+
onDayChange = () => null,
|
|
20
|
+
active = dropdownDayOfWeekOptions[0].value,
|
|
21
|
+
options = dropdownDayOfWeekOptions,
|
|
22
|
+
inputLabel = "On"
|
|
23
|
+
}) => {
|
|
30
24
|
const safeActive = getActive(allowMultipleDaysOfWeek, active);
|
|
31
|
-
return
|
|
25
|
+
return /* @__PURE__ */ React2.createElement(FormGroup, {
|
|
32
26
|
className: cssClassName
|
|
33
|
-
},
|
|
27
|
+
}, /* @__PURE__ */ React2.createElement(FormLabel, null, inputLabel), /* @__PURE__ */ React2.createElement(FormFieldGroup, null, !allowMultipleDaysOfWeek && /* @__PURE__ */ React2.createElement(DSRadioGroup, {
|
|
34
28
|
activeValue: safeActive,
|
|
35
29
|
onChange: onDayChange,
|
|
36
30
|
orientation: "horizontal"
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return /*#__PURE__*/_jsx(DSRadio, {
|
|
43
|
-
labelText: label,
|
|
44
|
-
value: value
|
|
45
|
-
}, index);
|
|
46
|
-
})), allowMultipleDaysOfWeek && /*#__PURE__*/_jsx(DSCheckboxGroup, {
|
|
31
|
+
}, options.map(({ label, value }, index) => /* @__PURE__ */ React2.createElement(DSRadio, {
|
|
32
|
+
key: index,
|
|
33
|
+
labelText: label,
|
|
34
|
+
value
|
|
35
|
+
}))), allowMultipleDaysOfWeek && /* @__PURE__ */ React2.createElement(DSCheckboxGroup, {
|
|
47
36
|
activeValue: safeActive,
|
|
48
37
|
onChange: onDayChange,
|
|
49
38
|
orientation: "horizontal"
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return /*#__PURE__*/_jsx(DSCheckbox, {
|
|
56
|
-
labelText: label,
|
|
57
|
-
value: value
|
|
58
|
-
}, index);
|
|
59
|
-
}))));
|
|
39
|
+
}, options.map(({ label, value }, index) => /* @__PURE__ */ React2.createElement(DSCheckbox, {
|
|
40
|
+
key: index,
|
|
41
|
+
labelText: label,
|
|
42
|
+
value
|
|
43
|
+
})))));
|
|
60
44
|
};
|
|
61
|
-
|
|
62
|
-
export {
|
|
45
|
+
var DaysOfWeekPicker_default = DaysOfWeekPicker;
|
|
46
|
+
export {
|
|
47
|
+
DaysOfWeekPicker_default as default
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=DaysOfWeekPicker.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/DaysOfWeekPicker/DaysOfWeekPicker.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSRadio, DSRadioGroup, DSCheckbox, DSCheckboxGroup } from '@elliemae/ds-form';\nimport { dropdownDayOfWeekOptions } from '../../options/dropdownDayOfWeekOptions';\nimport FormGroup from '../Forms/FormGroup';\nimport FormFieldGroup from '../Forms/FormFieldGroup';\nimport FormLabel from '../Forms/FormLabel';\n\nconst { cssClassName } = convertPropToCssClassName('week-days-week-days-picker');\n\nconst getActive = (allowMultipleDaysOfWeek, active) => {\n if (!allowMultipleDaysOfWeek) return active;\n\n if (Array.isArray(active)) return active;\n\n return [active];\n};\n\nconst DaysOfWeekPicker = ({\n allowMultipleDaysOfWeek = false,\n onDayChange = () => null,\n active = dropdownDayOfWeekOptions[0].value,\n options = dropdownDayOfWeekOptions,\n inputLabel = 'On',\n}) => {\n const safeActive = getActive(allowMultipleDaysOfWeek, active);\n return (\n <FormGroup className={cssClassName}>\n <FormLabel>{inputLabel}</FormLabel>\n <FormFieldGroup>\n {!allowMultipleDaysOfWeek && (\n <DSRadioGroup activeValue={safeActive} onChange={onDayChange} orientation=\"horizontal\">\n {options.map(({ label, value }, index) => (\n <DSRadio key={index} labelText={label} value={value} />\n ))}\n </DSRadioGroup>\n )}\n {allowMultipleDaysOfWeek && (\n <DSCheckboxGroup activeValue={safeActive} onChange={onDayChange} orientation=\"horizontal\">\n {options.map(({ label, value }, index) => (\n <DSCheckbox key={index} labelText={label} value={value} />\n ))}\n </DSCheckboxGroup>\n )}\n </FormFieldGroup>\n </FormGroup>\n );\n};\n\nexport default DaysOfWeekPicker;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,EAAE,iBAAiB,0BAA0B;AAEnD,MAAM,YAAY,CAAC,yBAAyB,WAAW;AACrD,MAAI,CAAC;AAAyB,WAAO;AAErC,MAAI,MAAM,QAAQ;AAAS,WAAO;AAElC,SAAO,CAAC;AAAA;AAGV,MAAM,mBAAmB,CAAC;AAAA,EACxB,0BAA0B;AAAA,EAC1B,cAAc,MAAM;AAAA,EACpB,SAAS,yBAAyB,GAAG;AAAA,EACrC,UAAU;AAAA,EACV,aAAa;AAAA,MACT;AACJ,QAAM,aAAa,UAAU,yBAAyB;AACtD,SACE,qCAAC,WAAD;AAAA,IAAW,WAAW;AAAA,KACpB,qCAAC,WAAD,MAAY,aACZ,qCAAC,gBAAD,MACG,CAAC,2BACA,qCAAC,cAAD;AAAA,IAAc,aAAa;AAAA,IAAY,UAAU;AAAA,IAAa,aAAY;AAAA,KACvE,QAAQ,IAAI,CAAC,EAAE,OAAO,SAAS,UAC9B,qCAAC,SAAD;AAAA,IAAS,KAAK;AAAA,IAAO,WAAW;AAAA,IAAO;AAAA,QAI5C,2BACC,qCAAC,iBAAD;AAAA,IAAiB,aAAa;AAAA,IAAY,UAAU;AAAA,IAAa,aAAY;AAAA,KAC1E,QAAQ,IAAI,CAAC,EAAE,OAAO,SAAS,UAC9B,qCAAC,YAAD;AAAA,IAAY,KAAK;AAAA,IAAO,WAAW;AAAA,IAAO;AAAA;AAAA;AASxD,IAAO,2BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,43 +1,40 @@
|
|
|
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
|
-
|
|
39
|
-
value: endTimesValue
|
|
40
|
-
}))));
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import DSDatePicker from "@elliemae/ds-date-picker";
|
|
4
|
+
import { DSComboBox } from "@elliemae/ds-form";
|
|
5
|
+
import { endTypes } from "../../options/endTypesOptions";
|
|
6
|
+
import FormField from "../Forms/FormField";
|
|
7
|
+
import FormLabel from "../Forms/FormLabel";
|
|
8
|
+
import FormGroup from "../Forms/FormGroup";
|
|
9
|
+
import FormFieldGroup from "../Forms/FormFieldGroup";
|
|
10
|
+
const EndDate = ({
|
|
11
|
+
onEndDateChange = () => null,
|
|
12
|
+
onEndTypeChange = () => null,
|
|
13
|
+
onEndTimesChange = () => null,
|
|
14
|
+
endDateValue = null,
|
|
15
|
+
endTypeValue = null,
|
|
16
|
+
endTypesOptions = [],
|
|
17
|
+
endTimesOptions = [],
|
|
18
|
+
endTimesValue = null,
|
|
19
|
+
endDayBlocked
|
|
20
|
+
}) => /* @__PURE__ */ React2.createElement(FormGroup, null, /* @__PURE__ */ React2.createElement(FormLabel, null, "Ends"), /* @__PURE__ */ React2.createElement(FormFieldGroup, null, /* @__PURE__ */ React2.createElement(FormField, null, /* @__PURE__ */ React2.createElement(DSComboBox, {
|
|
21
|
+
onChange: onEndTypeChange,
|
|
22
|
+
options: endTypesOptions,
|
|
23
|
+
value: endTypeValue
|
|
24
|
+
})), endTypeValue === endTypes.NEVER && /* @__PURE__ */ React2.createElement(FormField, null, /* @__PURE__ */ React2.createElement("div", null)), endTypeValue === endTypes.ON && /* @__PURE__ */ React2.createElement(FormField, null, /* @__PURE__ */ React2.createElement(DSDatePicker, {
|
|
25
|
+
appendToBody: true,
|
|
26
|
+
date: endDateValue,
|
|
27
|
+
isDayBlocked: endDayBlocked,
|
|
28
|
+
onDateChange: onEndDateChange,
|
|
29
|
+
openDirection: "up",
|
|
30
|
+
zIndex: 10
|
|
31
|
+
})), endTypeValue === endTypes.AFTER && /* @__PURE__ */ React2.createElement(FormField, null, /* @__PURE__ */ React2.createElement(DSComboBox, {
|
|
32
|
+
onChange: onEndTimesChange,
|
|
33
|
+
options: endTimesOptions,
|
|
34
|
+
value: endTimesValue
|
|
35
|
+
}))));
|
|
36
|
+
var EndDate_default = EndDate;
|
|
37
|
+
export {
|
|
38
|
+
EndDate_default as default
|
|
41
39
|
};
|
|
42
|
-
|
|
43
|
-
export { EndDate as default };
|
|
40
|
+
//# sourceMappingURL=EndDate.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/EndDate/EndDate.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport DSDatePicker from '@elliemae/ds-date-picker';\nimport { DSComboBox } from '@elliemae/ds-form';\nimport { endTypes } from '../../options/endTypesOptions';\nimport FormField from '../Forms/FormField';\nimport FormLabel from '../Forms/FormLabel';\nimport FormGroup from '../Forms/FormGroup';\nimport FormFieldGroup from '../Forms/FormFieldGroup';\n\nconst EndDate = ({\n onEndDateChange = () => null,\n onEndTypeChange = () => null,\n onEndTimesChange = () => null,\n endDateValue = null,\n endTypeValue = null,\n endTypesOptions = [],\n endTimesOptions = [],\n endTimesValue = null,\n endDayBlocked,\n}) => (\n <FormGroup>\n <FormLabel>Ends</FormLabel>\n <FormFieldGroup>\n <FormField>\n <DSComboBox onChange={onEndTypeChange} options={endTypesOptions} value={endTypeValue} />\n </FormField>\n {endTypeValue === endTypes.NEVER && (\n <FormField>\n <div />\n </FormField>\n )}\n {endTypeValue === endTypes.ON && (\n <FormField>\n <DSDatePicker\n appendToBody\n date={endDateValue}\n isDayBlocked={endDayBlocked}\n onDateChange={onEndDateChange}\n openDirection=\"up\"\n zIndex={10}\n />\n </FormField>\n )}\n {endTypeValue === endTypes.AFTER && (\n <FormField>\n <DSComboBox onChange={onEndTimesChange} options={endTimesOptions} value={endTimesValue} />\n </FormField>\n )}\n </FormFieldGroup>\n </FormGroup>\n);\n\nexport default EndDate;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,UAAU,CAAC;AAAA,EACf,kBAAkB,MAAM;AAAA,EACxB,kBAAkB,MAAM;AAAA,EACxB,mBAAmB,MAAM;AAAA,EACzB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB;AAAA,MAEA,qCAAC,WAAD,MACE,qCAAC,WAAD,MAAW,SACX,qCAAC,gBAAD,MACE,qCAAC,WAAD,MACE,qCAAC,YAAD;AAAA,EAAY,UAAU;AAAA,EAAiB,SAAS;AAAA,EAAiB,OAAO;AAAA,KAEzE,iBAAiB,SAAS,SACzB,qCAAC,WAAD,MACE,qCAAC,OAAD,QAGH,iBAAiB,SAAS,MACzB,qCAAC,WAAD,MACE,qCAAC,cAAD;AAAA,EACE,cAAY;AAAA,EACZ,MAAM;AAAA,EACN,cAAc;AAAA,EACd,cAAc;AAAA,EACd,eAAc;AAAA,EACd,QAAQ;AAAA,KAIb,iBAAiB,SAAS,SACzB,qCAAC,WAAD,MACE,qCAAC,YAAD;AAAA,EAAY,UAAU;AAAA,EAAkB,SAAS;AAAA,EAAiB,OAAO;AAAA;AAOnF,IAAO,kBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { convertPropToCssClassName } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function FieldWrapper(_ref) {
|
|
10
|
-
let {
|
|
11
|
-
children
|
|
12
|
-
} = _ref;
|
|
13
|
-
return /*#__PURE__*/_jsx("div", {
|
|
14
|
-
className: "".concat(cssClassName)
|
|
15
|
-
}, void 0, children);
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
4
|
+
const { cssClassName } = convertPropToCssClassName("field-wrapper");
|
|
5
|
+
function FieldWrapper({ children }) {
|
|
6
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
7
|
+
className: `${cssClassName}`
|
|
8
|
+
}, children);
|
|
16
9
|
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
10
|
+
var FieldWrapper_default = FieldWrapper;
|
|
11
|
+
export {
|
|
12
|
+
FieldWrapper_default as default
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=FieldWrapper.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/FieldWrapper/FieldWrapper.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\n\nconst { cssClassName } = convertPropToCssClassName('field-wrapper');\n\nfunction FieldWrapper({ children }) {\n return <div className={`${cssClassName}`}>{children}</div>;\n}\n\nexport default FieldWrapper;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,EAAE,iBAAiB,0BAA0B;AAEnD,sBAAsB,EAAE,YAAY;AAClC,SAAO,qCAAC,OAAD;AAAA,IAAK,WAAW,GAAG;AAAA,KAAiB;AAAA;AAG7C,IAAO,uBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
3
|
+
var FormField_default = aggregatedClasses("div")("form-field");
|
|
4
|
+
export {
|
|
5
|
+
FormField_default as default
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=FormField.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Forms/FormField.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nexport default aggregatedClasses('div')('form-field');\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEA,IAAO,oBAAQ,kBAAkB,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
3
|
+
var FormFieldGroup_default = aggregatedClasses("div")("form-field-group");
|
|
4
|
+
export {
|
|
5
|
+
FormFieldGroup_default as default
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=FormFieldGroup.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Forms/FormFieldGroup.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nexport default aggregatedClasses('div')('form-field-group');\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEA,IAAO,yBAAQ,kBAAkB,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export { FormGroup as default };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
3
|
+
var FormGroup_default = aggregatedClasses("div")("form-group");
|
|
4
|
+
export {
|
|
5
|
+
FormGroup_default as default
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=FormGroup.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Forms/FormGroup.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\n/**\n * An inline/vertical group of form-items/fields described by a label/legend\n */\nexport default aggregatedClasses('div')('form-group');\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAKA,IAAO,oBAAQ,kBAAkB,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { aggregatedClasses } from "@elliemae/ds-classnames";
|
|
3
|
+
var FormLabel_default = aggregatedClasses("label")("form-label");
|
|
4
|
+
export {
|
|
5
|
+
FormLabel_default as default
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=FormLabel.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Forms/FormLabel.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nexport default aggregatedClasses('label')('form-label');\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEA,IAAO,oBAAQ,kBAAkB,SAAS;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { convertPropToCssClassName } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function LabelWrapper(_ref) {
|
|
10
|
-
let {
|
|
11
|
-
children
|
|
12
|
-
} = _ref;
|
|
13
|
-
return /*#__PURE__*/_jsx("div", {
|
|
14
|
-
className: "".concat(cssClassName)
|
|
15
|
-
}, void 0, children);
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
4
|
+
const { cssClassName } = convertPropToCssClassName("label-wrapper");
|
|
5
|
+
function LabelWrapper({ children }) {
|
|
6
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
7
|
+
className: `${cssClassName}`
|
|
8
|
+
}, children);
|
|
16
9
|
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
10
|
+
var LabelWrapper_default = LabelWrapper;
|
|
11
|
+
export {
|
|
12
|
+
LabelWrapper_default as default
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=LabelWrapper.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/LabelWrapper/LabelWrapper.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\n\nconst { cssClassName } = convertPropToCssClassName('label-wrapper');\n\nfunction LabelWrapper({ children }) {\n return <div className={`${cssClassName}`}>{children}</div>;\n}\n\nexport default LabelWrapper;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,EAAE,iBAAiB,0BAA0B;AAEnD,sBAAsB,EAAE,YAAY;AAClC,SAAO,qCAAC,OAAD;AAAA,IAAK,WAAW,GAAG;AAAA,KAAiB;AAAA;AAG7C,IAAO,uBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,61 +1,45 @@
|
|
|
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
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
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, {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2, { useState } from "react";
|
|
3
|
+
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
4
|
+
import { DSTextBox, DSComboBox } from "@elliemae/ds-form";
|
|
5
|
+
import FormGroup from "../Forms/FormGroup";
|
|
6
|
+
import FormLabel from "../Forms/FormLabel";
|
|
7
|
+
import FormFieldGroup from "../Forms/FormFieldGroup";
|
|
8
|
+
import FormField from "../Forms/FormField";
|
|
9
|
+
const { cssClassName } = convertPropToCssClassName("repeat-picker-input-range-selector");
|
|
10
|
+
const RepeatPickerInput = ({
|
|
11
|
+
onQtyChange = () => null,
|
|
12
|
+
onTypeChange = () => null,
|
|
13
|
+
qtyValue = 1,
|
|
14
|
+
repeatOptions = [],
|
|
15
|
+
repeatOptionsValue = null,
|
|
16
|
+
repeatInputLabel = "Repeats every",
|
|
17
|
+
repeatFrecuencyCustomProps = {}
|
|
18
|
+
}) => {
|
|
19
|
+
const [last, setLast] = useState("");
|
|
20
|
+
const { onChange: _onChange, onKeyDown: _onKeyDown, value: _value, ...rest } = repeatFrecuencyCustomProps;
|
|
21
|
+
return /* @__PURE__ */ React2.createElement(FormGroup, {
|
|
43
22
|
className: cssClassName
|
|
44
|
-
},
|
|
45
|
-
onChange: e => {
|
|
46
|
-
if (last !== 69)
|
|
23
|
+
}, /* @__PURE__ */ React2.createElement(FormLabel, null, repeatInputLabel), /* @__PURE__ */ React2.createElement(FormFieldGroup, null, /* @__PURE__ */ React2.createElement(FormField, null, /* @__PURE__ */ React2.createElement(DSTextBox, {
|
|
24
|
+
onChange: (e) => {
|
|
25
|
+
if (last !== 69)
|
|
26
|
+
onQtyChange(e.target.value);
|
|
47
27
|
},
|
|
48
|
-
onKeyDown: e => {
|
|
28
|
+
onKeyDown: (e) => {
|
|
49
29
|
setLast(e.keyCode);
|
|
50
30
|
return e.keyCode !== 69;
|
|
51
31
|
},
|
|
52
32
|
type: "number",
|
|
53
|
-
value: qtyValue
|
|
54
|
-
|
|
33
|
+
value: qtyValue,
|
|
34
|
+
...rest || {}
|
|
35
|
+
})), /* @__PURE__ */ React2.createElement(FormField, null, /* @__PURE__ */ React2.createElement(DSComboBox, {
|
|
55
36
|
onChange: onTypeChange,
|
|
56
37
|
options: repeatOptions,
|
|
57
38
|
value: repeatOptionsValue
|
|
58
39
|
}))));
|
|
59
40
|
};
|
|
60
|
-
|
|
61
|
-
export {
|
|
41
|
+
var RepeatPickerInput_default = RepeatPickerInput;
|
|
42
|
+
export {
|
|
43
|
+
RepeatPickerInput_default as default
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=RepeatPickerInput.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/RepeatPickerInput/RepeatPickerInput.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState } from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSTextBox, DSComboBox } from '@elliemae/ds-form';\nimport FormGroup from '../Forms/FormGroup';\nimport FormLabel from '../Forms/FormLabel';\nimport FormFieldGroup from '../Forms/FormFieldGroup';\nimport FormField from '../Forms/FormField';\n\nconst { cssClassName } = convertPropToCssClassName('repeat-picker-input-range-selector');\n\nconst RepeatPickerInput = ({\n onQtyChange = () => null,\n onTypeChange = () => null,\n qtyValue = 1,\n repeatOptions = [],\n repeatOptionsValue = null,\n repeatInputLabel = 'Repeats every',\n repeatFrecuencyCustomProps = {},\n}) => {\n const [last, setLast] = useState('');\n const { onChange: _onChange, onKeyDown: _onKeyDown, value: _value, ...rest } = repeatFrecuencyCustomProps;\n return (\n <FormGroup className={cssClassName}>\n <FormLabel>{repeatInputLabel}</FormLabel>\n <FormFieldGroup>\n <FormField>\n <DSTextBox\n onChange={(e) => {\n if (last !== 69) onQtyChange(e.target.value);\n }}\n onKeyDown={(e) => {\n setLast(e.keyCode);\n return e.keyCode !== 69;\n }}\n type=\"number\"\n value={qtyValue}\n {...(rest || {})}\n />\n </FormField>\n <FormField>\n <DSComboBox onChange={onTypeChange} options={repeatOptions} value={repeatOptionsValue} />\n </FormField>\n </FormFieldGroup>\n </FormGroup>\n );\n};\n\nexport default RepeatPickerInput;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,EAAE,iBAAiB,0BAA0B;AAEnD,MAAM,oBAAoB,CAAC;AAAA,EACzB,cAAc,MAAM;AAAA,EACpB,eAAe,MAAM;AAAA,EACrB,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,6BAA6B;AAAA,MACzB;AACJ,QAAM,CAAC,MAAM,WAAW,SAAS;AACjC,QAAM,EAAE,UAAU,WAAW,WAAW,YAAY,OAAO,WAAW,SAAS;AAC/E,SACE,qCAAC,WAAD;AAAA,IAAW,WAAW;AAAA,KACpB,qCAAC,WAAD,MAAY,mBACZ,qCAAC,gBAAD,MACE,qCAAC,WAAD,MACE,qCAAC,WAAD;AAAA,IACE,UAAU,CAAC,MAAM;AACf,UAAI,SAAS;AAAI,oBAAY,EAAE,OAAO;AAAA;AAAA,IAExC,WAAW,CAAC,MAAM;AAChB,cAAQ,EAAE;AACV,aAAO,EAAE,YAAY;AAAA;AAAA,IAEvB,MAAK;AAAA,IACL,OAAO;AAAA,OACF,QAAQ;AAAA,OAGjB,qCAAC,WAAD,MACE,qCAAC,YAAD;AAAA,IAAY,UAAU;AAAA,IAAc,SAAS;AAAA,IAAe,OAAO;AAAA;AAAA;AAO7E,IAAO,4BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|