@elliemae/ds-date-range-picker 2.0.0-alpha.10 → 2.0.0-alpha.14
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/DSDateRangePicker.js +48 -42
- package/cjs/components/DSDateRangePickerImpl.js +46 -42
- package/cjs/components/DatePickerLabel/DatePickerLabel.js +9 -6
- package/cjs/components/DatePickerRangeHeader/DatePickerRangeHeader.js +12 -12
- package/cjs/components/DayPickerRangeController.js +8 -3
- package/esm/DSDateRangePicker.js +48 -42
- package/esm/components/DSDateRangePickerImpl.js +42 -35
- package/esm/components/DatePickerLabel/DatePickerLabel.js +9 -6
- package/esm/components/DatePickerRangeHeader/DatePickerRangeHeader.js +11 -10
- package/esm/components/DayPickerRangeController.js +7 -1
- package/package.json +7 -5
- package/types/DSDateRangePicker.d.ts +228 -37
- package/cjs/package.json +0 -7
- package/esm/package.json +0 -7
package/cjs/DSDateRangePicker.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
5
10
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
11
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
12
|
require('react');
|
|
@@ -24,47 +29,48 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
24
29
|
|
|
25
30
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
26
31
|
|
|
27
|
-
const DSDateRangePicker =
|
|
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
|
-
|
|
32
|
+
const DSDateRangePicker = _ref => {
|
|
33
|
+
let {
|
|
34
|
+
containerProps = {},
|
|
35
|
+
className = '',
|
|
36
|
+
disabled = false,
|
|
37
|
+
required = false,
|
|
38
|
+
startDateRequired = false,
|
|
39
|
+
endDateRequired = false,
|
|
40
|
+
id,
|
|
41
|
+
hasError = false,
|
|
42
|
+
validationMessage = '',
|
|
43
|
+
readOnly = false,
|
|
44
|
+
screenReaderInputMessage = 'Select date',
|
|
45
|
+
initialVisibleMonth = moment__default["default"](),
|
|
46
|
+
firstDayOfWeek = 0,
|
|
47
|
+
keepOpenOnDateSelect = true,
|
|
48
|
+
reopenPickerOnClearDates = false,
|
|
49
|
+
hideKeyboardShortcutsPanel = true,
|
|
50
|
+
onPrevMonthClick = () => null,
|
|
51
|
+
onNextMonthClick = () => null,
|
|
52
|
+
onClose = () => null,
|
|
53
|
+
onOutsideClick = () => null,
|
|
54
|
+
transitionDuration = 0,
|
|
55
|
+
verticalSpacing = 0,
|
|
56
|
+
minimumNights = 0,
|
|
57
|
+
isDayBlocked = () => false,
|
|
58
|
+
isOutsideRange = () => false,
|
|
59
|
+
isDayHighlighted = () => false,
|
|
60
|
+
displayFormat = 'L',
|
|
61
|
+
displayFormatDay = 'D',
|
|
62
|
+
phrases = defaultPhrases.DateRangePickerPhrases,
|
|
63
|
+
startDate,
|
|
64
|
+
endDate,
|
|
65
|
+
startDateId = 'startDateId',
|
|
66
|
+
endDateId = 'endDateId',
|
|
67
|
+
labelFrom = 'From',
|
|
68
|
+
labelTo = 'To',
|
|
69
|
+
enableOutsideDays = true,
|
|
70
|
+
onChangeStartInput = () => null,
|
|
71
|
+
onChangeEndInput = () => null,
|
|
72
|
+
onDatesChange = () => null
|
|
73
|
+
} = _ref;
|
|
68
74
|
const {
|
|
69
75
|
cssClassName,
|
|
70
76
|
prefixBlockName
|
|
@@ -75,7 +81,7 @@ const DSDateRangePicker = ({
|
|
|
75
81
|
id
|
|
76
82
|
});
|
|
77
83
|
return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
78
|
-
className:
|
|
84
|
+
className: "".concat(prefixBlockName, "-range ").concat(cssClassName, " ").concat(prefixBlockName, "-range"),
|
|
79
85
|
children: /*#__PURE__*/_jsx__default["default"](DSDateRangePickerImpl["default"], {
|
|
80
86
|
appendToBody: true,
|
|
81
87
|
disabled: disabled,
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
6
|
var React = require('react');
|
|
8
7
|
var moment = require('moment');
|
|
9
8
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
10
|
-
var DSInputMask = require('@elliemae/ds-
|
|
11
|
-
var
|
|
12
|
-
var DSPopper = require('@elliemae/ds-basic/Popper');
|
|
9
|
+
var DSInputMask = require('@elliemae/ds-form');
|
|
10
|
+
var DSPopper = require('@elliemae/ds-popper');
|
|
13
11
|
var dsDatePicker = require('@elliemae/ds-date-picker');
|
|
14
12
|
var DayPickerRangeController = require('./DayPickerRangeController.js');
|
|
15
13
|
var isMaxDiffSafe = require('../isMaxDiffSafe.js');
|
|
@@ -17,11 +15,8 @@ var isMaxDiffSafe = require('../isMaxDiffSafe.js');
|
|
|
17
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
16
|
|
|
19
17
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
20
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
21
18
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
19
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
23
|
-
var DSInputMask__default = /*#__PURE__*/_interopDefaultLegacy(DSInputMask);
|
|
24
|
-
var DSFormItemLayout__default = /*#__PURE__*/_interopDefaultLegacy(DSFormItemLayout);
|
|
25
20
|
var DSPopper__default = /*#__PURE__*/_interopDefaultLegacy(DSPopper);
|
|
26
21
|
|
|
27
22
|
const START_DATE = 'startDate';
|
|
@@ -34,10 +29,11 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
34
29
|
constructor(props) {
|
|
35
30
|
super(props);
|
|
36
31
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
this.onDatesChange = _ref => {
|
|
33
|
+
let {
|
|
34
|
+
startDate,
|
|
35
|
+
endDate
|
|
36
|
+
} = _ref;
|
|
41
37
|
const {
|
|
42
38
|
onDatesChange
|
|
43
39
|
} = this.props;
|
|
@@ -56,23 +52,26 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
56
52
|
primaryStartInput: false,
|
|
57
53
|
primaryEndInput: false
|
|
58
54
|
});
|
|
59
|
-
}
|
|
55
|
+
};
|
|
60
56
|
|
|
61
|
-
|
|
62
|
-
this.setState(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
this.onFocusChange = () => {
|
|
58
|
+
this.setState(_ref2 => {
|
|
59
|
+
let {
|
|
60
|
+
focusedInput
|
|
61
|
+
} = _ref2;
|
|
62
|
+
return {
|
|
63
|
+
focusedInput: focusedInput === START_DATE ? END_DATE : START_DATE
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
};
|
|
68
67
|
|
|
69
|
-
|
|
68
|
+
this.handleKeyDown = event => {
|
|
70
69
|
if (event.key === 'Escape') this.setState({
|
|
71
70
|
showPicker: false
|
|
72
71
|
});
|
|
73
|
-
}
|
|
72
|
+
};
|
|
74
73
|
|
|
75
|
-
|
|
74
|
+
this.getSafeStartInputValue = () => {
|
|
76
75
|
const {
|
|
77
76
|
startInput,
|
|
78
77
|
primaryStartInput,
|
|
@@ -81,9 +80,9 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
81
80
|
if (primaryStartInput && startInput) return startInput;
|
|
82
81
|
if (!startDate) return '';
|
|
83
82
|
return startDate.format('MMDDYYYY');
|
|
84
|
-
}
|
|
83
|
+
};
|
|
85
84
|
|
|
86
|
-
|
|
85
|
+
this.getSafeEndInputValue = () => {
|
|
87
86
|
const {
|
|
88
87
|
endInput,
|
|
89
88
|
primaryEndInput,
|
|
@@ -92,9 +91,9 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
92
91
|
if (primaryEndInput && endInput) return endInput;
|
|
93
92
|
if (!endDate) return '';
|
|
94
93
|
return endDate.format('MMDDYYYY');
|
|
95
|
-
}
|
|
94
|
+
};
|
|
96
95
|
|
|
97
|
-
|
|
96
|
+
this.changeFocus = () => {
|
|
98
97
|
const {
|
|
99
98
|
disabled
|
|
100
99
|
} = this.props;
|
|
@@ -104,9 +103,9 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
104
103
|
focusedInput: 'startDate'
|
|
105
104
|
}));
|
|
106
105
|
}
|
|
107
|
-
}
|
|
106
|
+
};
|
|
108
107
|
|
|
109
|
-
|
|
108
|
+
this.handleChangeStart = e => {
|
|
110
109
|
var _momentValue;
|
|
111
110
|
|
|
112
111
|
const {
|
|
@@ -139,9 +138,9 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
139
138
|
startDateError: invalidDate,
|
|
140
139
|
endDateError: !isStartDateAcceptable || !prevState.endDateError ? prevState.endDateError : !isStartAcceptableWithSelectedEnd
|
|
141
140
|
}));
|
|
142
|
-
}
|
|
141
|
+
};
|
|
143
142
|
|
|
144
|
-
|
|
143
|
+
this.handleChangeEnd = e => {
|
|
145
144
|
var _momentValue2;
|
|
146
145
|
|
|
147
146
|
const {
|
|
@@ -163,7 +162,10 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
163
162
|
const isEndDateAcceptable = !endDateBlocked && momentValue && endInputValue !== '';
|
|
164
163
|
const areDatesValid = startDate && momentValue && (startDate === null || startDate === void 0 ? void 0 : startDate.isValid()) && ((_momentValue2 = momentValue) === null || _momentValue2 === void 0 ? void 0 : _momentValue2.isValid());
|
|
165
164
|
const canEndBeSameAsStart = minimumNights === 0;
|
|
166
|
-
const isEndAcceptableWithSelectedStart = !startDate ||
|
|
165
|
+
const isEndAcceptableWithSelectedStart = !startDate || // we can't compare with start date because it's not yet set
|
|
166
|
+
areDatesValid && ( // it's set and both are valid
|
|
167
|
+
canEndBeSameAsStart && momentValue.diff(startDate, 'days') >= 0 || // >= is valid
|
|
168
|
+
!canEndBeSameAsStart && momentValue.diff(startDate, 'days') > 0); // only > is valid
|
|
167
169
|
|
|
168
170
|
const invalidDate = !isEndDateAcceptable || !isEndAcceptableWithSelectedStart;
|
|
169
171
|
if (endDateBlocked) momentValue = null;
|
|
@@ -175,12 +177,14 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
175
177
|
startDateError: !isEndDateAcceptable || !prevState.startDateError ? prevState.startDateError : !isEndAcceptableWithSelectedStart,
|
|
176
178
|
endDateError: invalidDate
|
|
177
179
|
}));
|
|
178
|
-
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
this.handleChangeDate = _ref3 => {
|
|
183
|
+
let {
|
|
184
|
+
startDate: _start,
|
|
185
|
+
endDate
|
|
186
|
+
} = _ref3;
|
|
179
187
|
|
|
180
|
-
_defineProperty__default["default"](this, "handleChangeDate", ({
|
|
181
|
-
startDate: _start,
|
|
182
|
-
endDate
|
|
183
|
-
}) => {
|
|
184
188
|
if (_start && endDate) {
|
|
185
189
|
this.setState({
|
|
186
190
|
startDate: moment__default["default"](_start),
|
|
@@ -199,7 +203,7 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
199
203
|
primaryEndInput: false
|
|
200
204
|
});
|
|
201
205
|
}
|
|
202
|
-
}
|
|
206
|
+
};
|
|
203
207
|
|
|
204
208
|
this.state = {
|
|
205
209
|
startDate: props.startDate ? moment__default["default"](props.startDate) : null,
|
|
@@ -252,12 +256,12 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
252
256
|
const safeStartInputValue = this.getSafeStartInputValue();
|
|
253
257
|
const safeEndInputValue = this.getSafeEndInputValue();
|
|
254
258
|
return /*#__PURE__*/_jsx__default["default"]("div", {
|
|
255
|
-
className:
|
|
259
|
+
className: "".concat(inputClass, " ").concat(inputClassModifier)
|
|
256
260
|
}, void 0, /*#__PURE__*/_jsx__default["default"]("div", {
|
|
257
261
|
className: classNameBlock('wrapper-input-date-range-picker-controller')
|
|
258
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](
|
|
262
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](DSInputMask.DSFormItemLayout, {
|
|
259
263
|
floatingLabel: true,
|
|
260
|
-
inputComponent:
|
|
264
|
+
inputComponent: DSInputMask.DSInputMask,
|
|
261
265
|
labelText: labelFrom,
|
|
262
266
|
mask: DSInputMask.MASK_TYPES.DATE,
|
|
263
267
|
onChange: this.handleChangeStart,
|
|
@@ -269,9 +273,9 @@ class DSDateRangePickerImpl extends React__default["default"].Component {
|
|
|
269
273
|
required: startDateRequired,
|
|
270
274
|
hasError: hasError || startDateError,
|
|
271
275
|
placeholder: "MM/DD/YYYY"
|
|
272
|
-
}), /*#__PURE__*/_jsx__default["default"](
|
|
276
|
+
}), /*#__PURE__*/_jsx__default["default"](DSInputMask.DSFormItemLayout, {
|
|
273
277
|
floatingLabel: true,
|
|
274
|
-
inputComponent:
|
|
278
|
+
inputComponent: DSInputMask.DSInputMask,
|
|
275
279
|
labelText: labelTo,
|
|
276
280
|
mask: DSInputMask.MASK_TYPES.DATE,
|
|
277
281
|
onChange: this.handleChangeEnd,
|
|
@@ -7,11 +7,14 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
7
7
|
|
|
8
8
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
9
9
|
|
|
10
|
-
const Label =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
const Label = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
className = 'date-picker-label',
|
|
13
|
+
label = ''
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/_jsx__default["default"]("div", {
|
|
16
|
+
className: className
|
|
17
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"]("span", {}, void 0, label));
|
|
18
|
+
};
|
|
16
19
|
|
|
17
20
|
module.exports = Label;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
4
5
|
var React = require('react');
|
|
5
6
|
var moment = require('moment');
|
|
6
|
-
var DSInputMask = require('@elliemae/ds-
|
|
7
|
-
var DSInputGroup = require('@elliemae/ds-basic/form/InputGroup');
|
|
7
|
+
var DSInputMask = require('@elliemae/ds-form');
|
|
8
8
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -12,7 +12,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
13
13
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
14
14
|
var DSInputMask__default = /*#__PURE__*/_interopDefaultLegacy(DSInputMask);
|
|
15
|
-
var DSInputGroup__default = /*#__PURE__*/_interopDefaultLegacy(DSInputGroup);
|
|
16
15
|
|
|
17
16
|
const blockname = 'date-range-picker';
|
|
18
17
|
const Header = dsClassnames.aggregatedClasses('div')(blockname, 'header');
|
|
@@ -23,14 +22,15 @@ const formatDate = date => {
|
|
|
23
22
|
}
|
|
24
23
|
};
|
|
25
24
|
|
|
26
|
-
const DatePickerRangeHeader =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
const DatePickerRangeHeader = _ref => {
|
|
26
|
+
let {
|
|
27
|
+
placeholderStart = 'Start Date',
|
|
28
|
+
placeholderEnd = 'End Date',
|
|
29
|
+
onStartInputChange = () => null,
|
|
30
|
+
onEndInputChange = () => null,
|
|
31
|
+
selectedStartDate,
|
|
32
|
+
selectedEndDate
|
|
33
|
+
} = _ref;
|
|
34
34
|
const [startValue, setStartValue] = React.useState(selectedStartDate ? formatDate(selectedStartDate) : '');
|
|
35
35
|
const [endValue, setEndValue] = React.useState(selectedEndDate ? formatDate(selectedEndDate) : '');
|
|
36
36
|
React.useEffect(() => {
|
|
@@ -76,7 +76,7 @@ const DatePickerRangeHeader = ({
|
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
return /*#__PURE__*/_jsx__default["default"](Header, {}, void 0, /*#__PURE__*/_jsx__default["default"](
|
|
79
|
+
return /*#__PURE__*/_jsx__default["default"](Header, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSInputMask.DSInputGroup, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSInputMask__default["default"], {
|
|
80
80
|
"aria-label": placeholderStart || 'Date Picker Input Mask',
|
|
81
81
|
mask: DSInputMask.MASK_TYPES.DATE,
|
|
82
82
|
onBlur: handleOnBlurStart,
|
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
4
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
5
5
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
6
12
|
var React = require('react');
|
|
7
13
|
var reactDates = require('react-dates');
|
|
8
14
|
var dsDatePicker = require('@elliemae/ds-date-picker');
|
|
9
|
-
var
|
|
15
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
10
16
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
11
17
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
18
|
|
|
@@ -15,7 +21,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
21
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
16
22
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
17
23
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
18
|
-
var ChevronLeft__default = /*#__PURE__*/_interopDefaultLegacy(ChevronLeft);
|
|
19
24
|
|
|
20
25
|
const _excluded = ["endDate", "startDate", "displayFormatDay", "focusedInput", "enableOutsideDays", "onDatesChange", "onFocusChange", "onOutsideClick", "isDayBlocked", "isDayHighlighted", "isOutsideRange", "onNextMonthClick", "onPrevMonthClick"];
|
|
21
26
|
|
|
@@ -122,7 +127,7 @@ const DayPickerRangeController = _ref => {
|
|
|
122
127
|
}),
|
|
123
128
|
navPrev: /*#__PURE__*/_jsx__default["default"](dsDatePicker.DatePickerNavigation, {
|
|
124
129
|
className: classNameElement('navigation-prev'),
|
|
125
|
-
icon:
|
|
130
|
+
icon: dsIcons.ChevronLeft
|
|
126
131
|
}),
|
|
127
132
|
onDatesChange: onDatesChange,
|
|
128
133
|
onFocusChange: onFocusChange,
|
package/esm/DSDateRangePicker.js
CHANGED
|
@@ -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 _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
8
|
import 'react';
|
|
@@ -15,47 +20,48 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
15
20
|
|
|
16
21
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
17
22
|
|
|
18
|
-
const DSDateRangePicker =
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
23
|
+
const DSDateRangePicker = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
containerProps = {},
|
|
26
|
+
className = '',
|
|
27
|
+
disabled = false,
|
|
28
|
+
required = false,
|
|
29
|
+
startDateRequired = false,
|
|
30
|
+
endDateRequired = false,
|
|
31
|
+
id,
|
|
32
|
+
hasError = false,
|
|
33
|
+
validationMessage = '',
|
|
34
|
+
readOnly = false,
|
|
35
|
+
screenReaderInputMessage = 'Select date',
|
|
36
|
+
initialVisibleMonth = moment(),
|
|
37
|
+
firstDayOfWeek = 0,
|
|
38
|
+
keepOpenOnDateSelect = true,
|
|
39
|
+
reopenPickerOnClearDates = false,
|
|
40
|
+
hideKeyboardShortcutsPanel = true,
|
|
41
|
+
onPrevMonthClick = () => null,
|
|
42
|
+
onNextMonthClick = () => null,
|
|
43
|
+
onClose = () => null,
|
|
44
|
+
onOutsideClick = () => null,
|
|
45
|
+
transitionDuration = 0,
|
|
46
|
+
verticalSpacing = 0,
|
|
47
|
+
minimumNights = 0,
|
|
48
|
+
isDayBlocked = () => false,
|
|
49
|
+
isOutsideRange = () => false,
|
|
50
|
+
isDayHighlighted = () => false,
|
|
51
|
+
displayFormat = 'L',
|
|
52
|
+
displayFormatDay = 'D',
|
|
53
|
+
phrases = DateRangePickerPhrases,
|
|
54
|
+
startDate,
|
|
55
|
+
endDate,
|
|
56
|
+
startDateId = 'startDateId',
|
|
57
|
+
endDateId = 'endDateId',
|
|
58
|
+
labelFrom = 'From',
|
|
59
|
+
labelTo = 'To',
|
|
60
|
+
enableOutsideDays = true,
|
|
61
|
+
onChangeStartInput = () => null,
|
|
62
|
+
onChangeEndInput = () => null,
|
|
63
|
+
onDatesChange = () => null
|
|
64
|
+
} = _ref;
|
|
59
65
|
const {
|
|
60
66
|
cssClassName,
|
|
61
67
|
prefixBlockName
|
|
@@ -66,7 +72,7 @@ const DSDateRangePicker = ({
|
|
|
66
72
|
id
|
|
67
73
|
});
|
|
68
74
|
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
69
|
-
className:
|
|
75
|
+
className: "".concat(prefixBlockName, "-range ").concat(cssClassName, " ").concat(prefixBlockName, "-range"),
|
|
70
76
|
children: /*#__PURE__*/_jsx(DSDateRangePickerImpl, {
|
|
71
77
|
appendToBody: true,
|
|
72
78
|
disabled: disabled,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import moment from 'moment';
|
|
5
4
|
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
6
|
-
import DSInputMask,
|
|
7
|
-
import
|
|
8
|
-
import DSPopper from '@elliemae/ds-basic/Popper';
|
|
5
|
+
import { DSFormItemLayout, DSInputMask, MASK_TYPES, MASK_PIPES } from '@elliemae/ds-form';
|
|
6
|
+
import DSPopper from '@elliemae/ds-popper';
|
|
9
7
|
import { renderMonthElement, DatePickerPicker } from '@elliemae/ds-date-picker';
|
|
10
8
|
import DayPickerRangeController from './DayPickerRangeController.js';
|
|
11
9
|
import { isMaxDiffSafe } from '../isMaxDiffSafe.js';
|
|
@@ -20,10 +18,11 @@ class DSDateRangePickerImpl extends React.Component {
|
|
|
20
18
|
constructor(props) {
|
|
21
19
|
super(props);
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
this.onDatesChange = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
startDate,
|
|
24
|
+
endDate
|
|
25
|
+
} = _ref;
|
|
27
26
|
const {
|
|
28
27
|
onDatesChange
|
|
29
28
|
} = this.props;
|
|
@@ -42,23 +41,26 @@ class DSDateRangePickerImpl extends React.Component {
|
|
|
42
41
|
primaryStartInput: false,
|
|
43
42
|
primaryEndInput: false
|
|
44
43
|
});
|
|
45
|
-
}
|
|
44
|
+
};
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
this.setState(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
this.onFocusChange = () => {
|
|
47
|
+
this.setState(_ref2 => {
|
|
48
|
+
let {
|
|
49
|
+
focusedInput
|
|
50
|
+
} = _ref2;
|
|
51
|
+
return {
|
|
52
|
+
focusedInput: focusedInput === START_DATE ? END_DATE : START_DATE
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
};
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
this.handleKeyDown = event => {
|
|
56
58
|
if (event.key === 'Escape') this.setState({
|
|
57
59
|
showPicker: false
|
|
58
60
|
});
|
|
59
|
-
}
|
|
61
|
+
};
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
this.getSafeStartInputValue = () => {
|
|
62
64
|
const {
|
|
63
65
|
startInput,
|
|
64
66
|
primaryStartInput,
|
|
@@ -67,9 +69,9 @@ class DSDateRangePickerImpl extends React.Component {
|
|
|
67
69
|
if (primaryStartInput && startInput) return startInput;
|
|
68
70
|
if (!startDate) return '';
|
|
69
71
|
return startDate.format('MMDDYYYY');
|
|
70
|
-
}
|
|
72
|
+
};
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
this.getSafeEndInputValue = () => {
|
|
73
75
|
const {
|
|
74
76
|
endInput,
|
|
75
77
|
primaryEndInput,
|
|
@@ -78,9 +80,9 @@ class DSDateRangePickerImpl extends React.Component {
|
|
|
78
80
|
if (primaryEndInput && endInput) return endInput;
|
|
79
81
|
if (!endDate) return '';
|
|
80
82
|
return endDate.format('MMDDYYYY');
|
|
81
|
-
}
|
|
83
|
+
};
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
this.changeFocus = () => {
|
|
84
86
|
const {
|
|
85
87
|
disabled
|
|
86
88
|
} = this.props;
|
|
@@ -90,9 +92,9 @@ class DSDateRangePickerImpl extends React.Component {
|
|
|
90
92
|
focusedInput: 'startDate'
|
|
91
93
|
}));
|
|
92
94
|
}
|
|
93
|
-
}
|
|
95
|
+
};
|
|
94
96
|
|
|
95
|
-
|
|
97
|
+
this.handleChangeStart = e => {
|
|
96
98
|
var _momentValue;
|
|
97
99
|
|
|
98
100
|
const {
|
|
@@ -125,9 +127,9 @@ class DSDateRangePickerImpl extends React.Component {
|
|
|
125
127
|
startDateError: invalidDate,
|
|
126
128
|
endDateError: !isStartDateAcceptable || !prevState.endDateError ? prevState.endDateError : !isStartAcceptableWithSelectedEnd
|
|
127
129
|
}));
|
|
128
|
-
}
|
|
130
|
+
};
|
|
129
131
|
|
|
130
|
-
|
|
132
|
+
this.handleChangeEnd = e => {
|
|
131
133
|
var _momentValue2;
|
|
132
134
|
|
|
133
135
|
const {
|
|
@@ -149,7 +151,10 @@ class DSDateRangePickerImpl extends React.Component {
|
|
|
149
151
|
const isEndDateAcceptable = !endDateBlocked && momentValue && endInputValue !== '';
|
|
150
152
|
const areDatesValid = startDate && momentValue && (startDate === null || startDate === void 0 ? void 0 : startDate.isValid()) && ((_momentValue2 = momentValue) === null || _momentValue2 === void 0 ? void 0 : _momentValue2.isValid());
|
|
151
153
|
const canEndBeSameAsStart = minimumNights === 0;
|
|
152
|
-
const isEndAcceptableWithSelectedStart = !startDate ||
|
|
154
|
+
const isEndAcceptableWithSelectedStart = !startDate || // we can't compare with start date because it's not yet set
|
|
155
|
+
areDatesValid && ( // it's set and both are valid
|
|
156
|
+
canEndBeSameAsStart && momentValue.diff(startDate, 'days') >= 0 || // >= is valid
|
|
157
|
+
!canEndBeSameAsStart && momentValue.diff(startDate, 'days') > 0); // only > is valid
|
|
153
158
|
|
|
154
159
|
const invalidDate = !isEndDateAcceptable || !isEndAcceptableWithSelectedStart;
|
|
155
160
|
if (endDateBlocked) momentValue = null;
|
|
@@ -161,12 +166,14 @@ class DSDateRangePickerImpl extends React.Component {
|
|
|
161
166
|
startDateError: !isEndDateAcceptable || !prevState.startDateError ? prevState.startDateError : !isEndAcceptableWithSelectedStart,
|
|
162
167
|
endDateError: invalidDate
|
|
163
168
|
}));
|
|
164
|
-
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
this.handleChangeDate = _ref3 => {
|
|
172
|
+
let {
|
|
173
|
+
startDate: _start,
|
|
174
|
+
endDate
|
|
175
|
+
} = _ref3;
|
|
165
176
|
|
|
166
|
-
_defineProperty(this, "handleChangeDate", ({
|
|
167
|
-
startDate: _start,
|
|
168
|
-
endDate
|
|
169
|
-
}) => {
|
|
170
177
|
if (_start && endDate) {
|
|
171
178
|
this.setState({
|
|
172
179
|
startDate: moment(_start),
|
|
@@ -185,7 +192,7 @@ class DSDateRangePickerImpl extends React.Component {
|
|
|
185
192
|
primaryEndInput: false
|
|
186
193
|
});
|
|
187
194
|
}
|
|
188
|
-
}
|
|
195
|
+
};
|
|
189
196
|
|
|
190
197
|
this.state = {
|
|
191
198
|
startDate: props.startDate ? moment(props.startDate) : null,
|
|
@@ -238,7 +245,7 @@ class DSDateRangePickerImpl extends React.Component {
|
|
|
238
245
|
const safeStartInputValue = this.getSafeStartInputValue();
|
|
239
246
|
const safeEndInputValue = this.getSafeEndInputValue();
|
|
240
247
|
return /*#__PURE__*/_jsx("div", {
|
|
241
|
-
className:
|
|
248
|
+
className: "".concat(inputClass, " ").concat(inputClassModifier)
|
|
242
249
|
}, void 0, /*#__PURE__*/_jsx("div", {
|
|
243
250
|
className: classNameBlock('wrapper-input-date-range-picker-controller')
|
|
244
251
|
}, void 0, /*#__PURE__*/_jsx(DSFormItemLayout, {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
3
|
|
|
4
|
-
const Label =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
const Label = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
className = 'date-picker-label',
|
|
7
|
+
label = ''
|
|
8
|
+
} = _ref;
|
|
9
|
+
return /*#__PURE__*/_jsx("div", {
|
|
10
|
+
className: className
|
|
11
|
+
}, void 0, /*#__PURE__*/_jsx("span", {}, void 0, label));
|
|
12
|
+
};
|
|
10
13
|
|
|
11
14
|
export { Label as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
3
|
import { useState, useEffect } from 'react';
|
|
3
4
|
import moment from 'moment';
|
|
4
|
-
import DSInputMask, { MASK_TYPES, MASK_PIPES } from '@elliemae/ds-
|
|
5
|
-
import DSInputGroup from '@elliemae/ds-basic/form/InputGroup';
|
|
5
|
+
import DSInputMask, { DSInputGroup, MASK_TYPES, MASK_PIPES } from '@elliemae/ds-form';
|
|
6
6
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
7
7
|
|
|
8
8
|
const blockname = 'date-range-picker';
|
|
@@ -14,14 +14,15 @@ const formatDate = date => {
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
const DatePickerRangeHeader =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
const DatePickerRangeHeader = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
placeholderStart = 'Start Date',
|
|
20
|
+
placeholderEnd = 'End Date',
|
|
21
|
+
onStartInputChange = () => null,
|
|
22
|
+
onEndInputChange = () => null,
|
|
23
|
+
selectedStartDate,
|
|
24
|
+
selectedEndDate
|
|
25
|
+
} = _ref;
|
|
25
26
|
const [startValue, setStartValue] = useState(selectedStartDate ? formatDate(selectedStartDate) : '');
|
|
26
27
|
const [endValue, setEndValue] = useState(selectedEndDate ? formatDate(selectedEndDate) : '');
|
|
27
28
|
useEffect(() => {
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
4
10
|
import { useRef, useEffect } from 'react';
|
|
5
11
|
import { DayPickerRangeController as DayPickerRangeController$1 } from 'react-dates';
|
|
6
12
|
import { DatePickerNavigation, DatePickerDay, renderMonthElement } from '@elliemae/ds-date-picker';
|
|
7
|
-
import ChevronLeft from '@elliemae/ds-icons
|
|
13
|
+
import { ChevronLeft } from '@elliemae/ds-icons';
|
|
8
14
|
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
9
15
|
import { jsx } from 'react/jsx-runtime';
|
|
10
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-date-range-picker",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Date Range Picker",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -56,13 +56,15 @@
|
|
|
56
56
|
"build": "node ../../scripts/build/build.js"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@elliemae/ds-
|
|
60
|
-
"@elliemae/ds-
|
|
61
|
-
"@elliemae/ds-
|
|
59
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.14",
|
|
60
|
+
"@elliemae/ds-date-picker": "2.0.0-alpha.14",
|
|
61
|
+
"@elliemae/ds-form": "2.0.0-alpha.14",
|
|
62
|
+
"@elliemae/ds-icons": "2.0.0-alpha.14",
|
|
63
|
+
"@elliemae/ds-popper": "2.0.0-alpha.14",
|
|
62
64
|
"moment": "~2.29.1",
|
|
63
65
|
"prop-types": "~15.7.2",
|
|
64
66
|
"react-dates": "~21.8.0",
|
|
65
|
-
"react-
|
|
67
|
+
"react-desc": "~4.1.3"
|
|
66
68
|
},
|
|
67
69
|
"peerDependencies": {
|
|
68
70
|
"lodash": "^4.17.21",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
import moment from 'moment';
|
|
3
4
|
import 'react-dates/initialize';
|
|
@@ -46,47 +47,237 @@ declare const DSDateRangePicker: {
|
|
|
46
47
|
onDatesChange?: (() => null) | undefined;
|
|
47
48
|
}): JSX.Element;
|
|
48
49
|
propTypes: {
|
|
49
|
-
containerProps:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
containerProps: {
|
|
51
|
+
defaultValue<T = unknown>(arg: T): {
|
|
52
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
53
|
+
};
|
|
54
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
55
|
+
};
|
|
56
|
+
className: {
|
|
57
|
+
defaultValue<T = unknown>(arg: T): {
|
|
58
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
59
|
+
};
|
|
60
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
61
|
+
};
|
|
62
|
+
disabled: {
|
|
63
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
64
|
+
};
|
|
65
|
+
required: {
|
|
66
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
67
|
+
};
|
|
68
|
+
startDateRequired: {
|
|
69
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
70
|
+
};
|
|
71
|
+
endDateRequired: {
|
|
72
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
73
|
+
};
|
|
74
|
+
id: {
|
|
75
|
+
defaultValue<T = unknown>(arg: T): {
|
|
76
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
77
|
+
};
|
|
78
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
79
|
+
};
|
|
80
|
+
hasError: {
|
|
81
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
82
|
+
};
|
|
83
|
+
validationMessage: {
|
|
84
|
+
defaultValue<T = unknown>(arg: T): {
|
|
85
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
86
|
+
};
|
|
87
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
88
|
+
};
|
|
58
89
|
readOnly: any;
|
|
59
|
-
screenReaderInputMessage:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
90
|
+
screenReaderInputMessage: {
|
|
91
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
92
|
+
};
|
|
93
|
+
initialVisibleMonth: {
|
|
94
|
+
defaultValue<T = unknown>(arg: T): {
|
|
95
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
96
|
+
};
|
|
97
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
98
|
+
};
|
|
99
|
+
firstDayOfWeek: {
|
|
100
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
101
|
+
};
|
|
102
|
+
keepOpenOnDateSelect: {
|
|
103
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
104
|
+
};
|
|
105
|
+
reopenPickerOnClearDates: {
|
|
106
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
107
|
+
};
|
|
108
|
+
hideKeyboardShortcutsPanel: {
|
|
109
|
+
defaultValue<T = unknown>(arg: T): {
|
|
110
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
111
|
+
};
|
|
112
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
113
|
+
};
|
|
114
|
+
onPrevMonthClick: {
|
|
115
|
+
defaultValue<T = unknown>(arg: T): {
|
|
116
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
117
|
+
};
|
|
118
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
119
|
+
};
|
|
120
|
+
onNextMonthClick: {
|
|
121
|
+
defaultValue<T = unknown>(arg: T): {
|
|
122
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
123
|
+
};
|
|
124
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
125
|
+
};
|
|
126
|
+
onClose: {
|
|
127
|
+
defaultValue<T = unknown>(arg: T): {
|
|
128
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
129
|
+
};
|
|
130
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
131
|
+
};
|
|
132
|
+
transitionDuration: {
|
|
133
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
134
|
+
};
|
|
135
|
+
verticalSpacing: {
|
|
136
|
+
defaultValue<T = unknown>(arg: T): {
|
|
137
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
138
|
+
};
|
|
139
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
140
|
+
};
|
|
141
|
+
isDayBlocked: {
|
|
142
|
+
defaultValue<T = unknown>(arg: T): {
|
|
143
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
144
|
+
};
|
|
145
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
146
|
+
};
|
|
147
|
+
isOutsideRange: {
|
|
148
|
+
defaultValue<T = unknown>(arg: T): {
|
|
149
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
150
|
+
};
|
|
151
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
152
|
+
};
|
|
153
|
+
isDayHighlighted: {
|
|
154
|
+
defaultValue<T = unknown>(arg: T): {
|
|
155
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
156
|
+
};
|
|
157
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
158
|
+
};
|
|
73
159
|
minimumNights: number;
|
|
74
|
-
displayFormat:
|
|
75
|
-
|
|
76
|
-
|
|
160
|
+
displayFormat: {
|
|
161
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
162
|
+
};
|
|
163
|
+
displayFormatDay: {
|
|
164
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
165
|
+
};
|
|
166
|
+
phrases: {
|
|
167
|
+
defaultValue<T = unknown>(arg: T): {
|
|
168
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
169
|
+
};
|
|
170
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
171
|
+
};
|
|
172
|
+
startDate: {
|
|
173
|
+
defaultValue<T = unknown>(arg: T): {
|
|
174
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
175
|
+
};
|
|
176
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
177
|
+
};
|
|
178
|
+
endDate: {
|
|
179
|
+
defaultValue<T = unknown>(arg: T): {
|
|
180
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
181
|
+
};
|
|
182
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
183
|
+
};
|
|
184
|
+
startDateId: {
|
|
185
|
+
defaultValue<T = unknown>(arg: T): {
|
|
186
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
187
|
+
};
|
|
188
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
189
|
+
};
|
|
190
|
+
endDateId: {
|
|
191
|
+
defaultValue<T = unknown>(arg: T): {
|
|
192
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
193
|
+
};
|
|
194
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
195
|
+
};
|
|
196
|
+
labelFrom: {
|
|
197
|
+
defaultValue<T = unknown>(arg: T): {
|
|
198
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
199
|
+
};
|
|
200
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
201
|
+
};
|
|
202
|
+
labelTo: {
|
|
203
|
+
defaultValue<T = unknown>(arg: T): {
|
|
204
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
205
|
+
};
|
|
206
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
207
|
+
};
|
|
208
|
+
enableOutsideDays: {
|
|
209
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
210
|
+
};
|
|
211
|
+
onDatesChange: {
|
|
212
|
+
defaultValue<T = unknown>(arg: T): {
|
|
213
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
214
|
+
};
|
|
215
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
216
|
+
};
|
|
217
|
+
onChangeStartInput: {
|
|
218
|
+
defaultValue<T = unknown>(arg: T): {
|
|
219
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
220
|
+
};
|
|
221
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
222
|
+
};
|
|
223
|
+
onChangeEndInput: {
|
|
224
|
+
defaultValue<T = unknown>(arg: T): {
|
|
225
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
226
|
+
};
|
|
227
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
228
|
+
};
|
|
229
|
+
onOutsideClick: {
|
|
230
|
+
defaultValue<T = unknown>(arg: T): {
|
|
231
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
232
|
+
};
|
|
233
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
declare const DateRangePickerWithSchema: {
|
|
238
|
+
(props?: {
|
|
239
|
+
containerProps?: {} | undefined;
|
|
240
|
+
className?: string | undefined;
|
|
241
|
+
disabled?: boolean | undefined;
|
|
242
|
+
required?: boolean | undefined;
|
|
243
|
+
startDateRequired?: boolean | undefined;
|
|
244
|
+
endDateRequired?: boolean | undefined;
|
|
245
|
+
id: any;
|
|
246
|
+
hasError?: boolean | undefined;
|
|
247
|
+
validationMessage?: string | undefined;
|
|
248
|
+
readOnly?: boolean | undefined;
|
|
249
|
+
screenReaderInputMessage?: string | undefined;
|
|
250
|
+
initialVisibleMonth?: moment.Moment | undefined;
|
|
251
|
+
firstDayOfWeek?: number | undefined;
|
|
252
|
+
keepOpenOnDateSelect?: boolean | undefined;
|
|
253
|
+
reopenPickerOnClearDates?: boolean | undefined;
|
|
254
|
+
hideKeyboardShortcutsPanel?: boolean | undefined;
|
|
255
|
+
onPrevMonthClick?: (() => null) | undefined;
|
|
256
|
+
onNextMonthClick?: (() => null) | undefined;
|
|
257
|
+
onClose?: (() => null) | undefined;
|
|
258
|
+
onOutsideClick?: (() => null) | undefined;
|
|
259
|
+
transitionDuration?: number | undefined;
|
|
260
|
+
verticalSpacing?: number | undefined;
|
|
261
|
+
minimumNights?: number | undefined;
|
|
262
|
+
isDayBlocked?: (() => boolean) | undefined;
|
|
263
|
+
isOutsideRange?: (() => boolean) | undefined;
|
|
264
|
+
isDayHighlighted?: (() => boolean) | undefined;
|
|
265
|
+
displayFormat?: string | undefined;
|
|
266
|
+
displayFormatDay?: string | undefined;
|
|
267
|
+
phrases?: any;
|
|
77
268
|
startDate: any;
|
|
78
269
|
endDate: any;
|
|
79
|
-
startDateId
|
|
80
|
-
endDateId
|
|
81
|
-
labelFrom
|
|
82
|
-
labelTo
|
|
83
|
-
enableOutsideDays
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
270
|
+
startDateId?: string | undefined;
|
|
271
|
+
endDateId?: string | undefined;
|
|
272
|
+
labelFrom?: string | undefined;
|
|
273
|
+
labelTo?: string | undefined;
|
|
274
|
+
enableOutsideDays?: boolean | undefined;
|
|
275
|
+
onChangeStartInput?: (() => null) | undefined;
|
|
276
|
+
onChangeEndInput?: (() => null) | undefined;
|
|
277
|
+
onDatesChange?: (() => null) | undefined;
|
|
278
|
+
} | undefined): JSX.Element;
|
|
279
|
+
propTypes: unknown;
|
|
280
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
89
281
|
};
|
|
90
|
-
declare const DateRangePickerWithSchema: any;
|
|
91
282
|
export { DayPickerRangeController, START_DATE, END_DATE, DateRangePickerWithSchema, };
|
|
92
283
|
export default DSDateRangePicker;
|
package/cjs/package.json
DELETED