@progress/kendo-react-dateinputs 5.4.0-dev.202205200719 → 5.4.0-dev.202206061009
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/dist/cdn/js/kendo-react-dateinputs.js +1 -1
- package/dist/es/PopupSettings.js +1 -0
- package/dist/es/calendar/components/Calendar.d.ts +10 -10
- package/dist/es/calendar/components/Calendar.js +26 -12
- package/dist/es/calendar/components/CalendarCell.js +7 -3
- package/dist/es/calendar/components/CalendarHeaderTitle.js +7 -3
- package/dist/es/calendar/components/CalendarNavigationItem.js +7 -3
- package/dist/es/calendar/components/CalendarWeekCell.js +7 -3
- package/dist/es/calendar/components/Header.d.ts +5 -4
- package/dist/es/calendar/components/Header.js +8 -6
- package/dist/es/calendar/components/HorizontalViewList.d.ts +4 -4
- package/dist/es/calendar/components/HorizontalViewList.js +8 -5
- package/dist/es/calendar/components/MultiViewCalendar.d.ts +13 -13
- package/dist/es/calendar/components/MultiViewCalendar.js +24 -15
- package/dist/es/calendar/components/Navigation.d.ts +1 -1
- package/dist/es/calendar/components/Navigation.js +13 -6
- package/dist/es/calendar/components/TodayCommand.d.ts +3 -3
- package/dist/es/calendar/components/TodayCommand.js +10 -6
- package/dist/es/calendar/components/View.d.ts +11 -11
- package/dist/es/calendar/components/View.js +17 -13
- package/dist/es/calendar/components/ViewList.d.ts +6 -6
- package/dist/es/calendar/components/ViewList.js +19 -9
- package/dist/es/calendar/models/ActiveView.js +1 -0
- package/dist/es/calendar/models/CalendarSettings.js +1 -0
- package/dist/es/calendar/models/CellContext.js +1 -0
- package/dist/es/calendar/models/MultiViewCalendarMode.js +1 -0
- package/dist/es/calendar/models/MultiViewCalendarSettings.js +1 -0
- package/dist/es/calendar/models/SelectionRangeEnd.js +1 -0
- package/dist/es/calendar/models/ViewService.js +1 -0
- package/dist/es/calendar/services/BusViewService.js +1 -1
- package/dist/es/calendar/services/CenturyViewService.js +2 -2
- package/dist/es/calendar/services/DOMService.js +24 -6
- package/dist/es/calendar/services/DecadeViewService.js +2 -2
- package/dist/es/calendar/services/MonthViewService.js +2 -2
- package/dist/es/calendar/services/NavigationService.js +1 -1
- package/dist/es/calendar/services/ScrollSyncService.js +5 -1
- package/dist/es/calendar/services/YearViewService.js +2 -2
- package/dist/es/dateinput/DateInput.d.ts +24 -20
- package/dist/es/dateinput/DateInput.js +32 -19
- package/dist/es/dateinput/models/DateInputSettings.js +1 -0
- package/dist/es/dateinput/models/format-placeholder.js +1 -0
- package/dist/es/dateinput/models/incremental-steps.js +1 -0
- package/dist/es/dateinput/models/kendo-date.d.ts +2 -2
- package/dist/es/dateinput/models/kendo-date.js +2 -2
- package/dist/es/dateinput/models/mask.js +1 -0
- package/dist/es/dateinput/models/selection.js +1 -0
- package/dist/es/dateinput/utils.d.ts +1 -1
- package/dist/es/datepicker/DatePicker.d.ts +25 -25
- package/dist/es/datepicker/DatePicker.js +28 -23
- package/dist/es/datepicker/models/DatePickerSettings.js +1 -0
- package/dist/es/datepicker/models/index.js +1 -0
- package/dist/es/daterangepicker/DateRangePicker.d.ts +12 -12
- package/dist/es/daterangepicker/DateRangePicker.js +16 -14
- package/dist/es/daterangepicker/models/DateRangePickerCalendarSettings.js +1 -0
- package/dist/es/daterangepicker/models/DateRangePickerDateInputSettings.js +1 -0
- package/dist/es/daterangepicker/models/DateRangePickerPopupSettings.js +1 -0
- package/dist/es/daterangepicker/models/DateRangePickerSettings.js +1 -0
- package/dist/es/daterangepicker/models/index.js +1 -0
- package/dist/es/datetimepicker/DateTimePicker.d.ts +19 -19
- package/dist/es/datetimepicker/DateTimePicker.js +33 -18
- package/dist/es/datetimepicker/DateTimeSelector.d.ts +7 -7
- package/dist/es/datetimepicker/DateTimeSelector.js +17 -7
- package/dist/es/datetimepicker/models/DateTimePickerSettings.js +1 -0
- package/dist/es/datetimepicker/models/index.js +1 -0
- package/dist/es/hooks/usePickerFloatingLabel.d.ts +1 -1
- package/dist/es/messages/index.d.ts +21 -21
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/TimeList.d.ts +8 -8
- package/dist/es/timepicker/TimeList.js +33 -13
- package/dist/es/timepicker/TimePart.d.ts +10 -10
- package/dist/es/timepicker/TimePart.js +14 -9
- package/dist/es/timepicker/TimePicker.d.ts +22 -22
- package/dist/es/timepicker/TimePicker.js +27 -22
- package/dist/es/timepicker/TimeSelector.d.ts +6 -6
- package/dist/es/timepicker/TimeSelector.js +11 -5
- package/dist/es/timepicker/models/IncrementalSteps.js +1 -0
- package/dist/es/timepicker/models/ListItem.js +1 -0
- package/dist/es/timepicker/models/ListService.js +1 -0
- package/dist/es/timepicker/models/ListServiceSettings.js +1 -0
- package/dist/es/timepicker/models/TimePickerSettings.js +1 -0
- package/dist/es/timepicker/services/DOMService.js +2 -0
- package/dist/es/timepicker/services/DayPeriodService.js +9 -3
- package/dist/es/timepicker/services/HoursService.js +14 -5
- package/dist/es/timepicker/services/MinutesService.js +12 -6
- package/dist/es/timepicker/services/SecondsService.js +12 -6
- package/dist/es/timepicker/utils.d.ts +4 -4
- package/dist/es/utils.d.ts +1 -1
- package/dist/es/utils.js +10 -1
- package/dist/es/virtualization/Virtualization.d.ts +8 -7
- package/dist/es/virtualization/Virtualization.js +22 -12
- package/dist/es/virtualization/services/RowHeightService.js +10 -1
- package/dist/es/virtualization/services/ScrollerService.js +9 -3
- package/dist/npm/calendar/components/Calendar.d.ts +10 -10
- package/dist/npm/calendar/components/Calendar.js +53 -38
- package/dist/npm/calendar/components/CalendarCell.js +9 -4
- package/dist/npm/calendar/components/CalendarHeaderTitle.js +8 -3
- package/dist/npm/calendar/components/CalendarNavigationItem.js +9 -4
- package/dist/npm/calendar/components/CalendarWeekCell.js +9 -4
- package/dist/npm/calendar/components/Header.d.ts +5 -4
- package/dist/npm/calendar/components/Header.js +11 -8
- package/dist/npm/calendar/components/HorizontalViewList.d.ts +4 -4
- package/dist/npm/calendar/components/HorizontalViewList.js +11 -7
- package/dist/npm/calendar/components/MultiViewCalendar.d.ts +13 -13
- package/dist/npm/calendar/components/MultiViewCalendar.js +62 -52
- package/dist/npm/calendar/components/Navigation.d.ts +1 -1
- package/dist/npm/calendar/components/Navigation.js +18 -10
- package/dist/npm/calendar/components/TodayCommand.d.ts +3 -3
- package/dist/npm/calendar/components/TodayCommand.js +16 -11
- package/dist/npm/calendar/components/View.d.ts +11 -11
- package/dist/npm/calendar/components/View.js +27 -22
- package/dist/npm/calendar/components/ViewList.d.ts +6 -6
- package/dist/npm/calendar/components/ViewList.js +29 -18
- package/dist/npm/calendar/models/CalendarViewEnum.js +1 -0
- package/dist/npm/calendar/models/NavigationAction.js +1 -0
- package/dist/npm/calendar/models/SelectionRange.js +1 -0
- package/dist/npm/calendar/models/index.js +4 -3
- package/dist/npm/calendar/services/BusViewService.js +3 -2
- package/dist/npm/calendar/services/CenturyViewService.js +40 -39
- package/dist/npm/calendar/services/DOMService.js +34 -15
- package/dist/npm/calendar/services/DecadeViewService.js +34 -33
- package/dist/npm/calendar/services/MonthViewService.js +38 -37
- package/dist/npm/calendar/services/NavigationService.js +2 -1
- package/dist/npm/calendar/services/ScrollSyncService.js +6 -1
- package/dist/npm/calendar/services/WeekNamesService.js +2 -1
- package/dist/npm/calendar/services/YearViewService.js +35 -34
- package/dist/npm/calendar/services/index.js +10 -9
- package/dist/npm/common/PickerWrap.js +2 -1
- package/dist/npm/dateinput/DateInput.d.ts +24 -20
- package/dist/npm/dateinput/DateInput.js +51 -37
- package/dist/npm/dateinput/models/index.js +3 -2
- package/dist/npm/dateinput/models/kendo-date.d.ts +2 -2
- package/dist/npm/dateinput/models/kendo-date.js +14 -13
- package/dist/npm/dateinput/models/mask.js +2 -0
- package/dist/npm/dateinput/utils.d.ts +1 -1
- package/dist/npm/dateinput/utils.js +9 -4
- package/dist/npm/datepicker/DatePicker.d.ts +25 -25
- package/dist/npm/datepicker/DatePicker.js +42 -36
- package/dist/npm/datepicker/ToggleButton.js +1 -0
- package/dist/npm/daterangepicker/DateRangePicker.d.ts +12 -12
- package/dist/npm/daterangepicker/DateRangePicker.js +34 -31
- package/dist/npm/datetimepicker/DateTimePicker.d.ts +19 -19
- package/dist/npm/datetimepicker/DateTimePicker.js +46 -30
- package/dist/npm/datetimepicker/DateTimeSelector.d.ts +7 -7
- package/dist/npm/datetimepicker/DateTimeSelector.js +26 -15
- package/dist/npm/defaults.js +1 -0
- package/dist/npm/hooks/usePickerFloatingLabel.d.ts +1 -1
- package/dist/npm/hooks/usePickerFloatingLabel.js +6 -3
- package/dist/npm/main.js +22 -21
- package/dist/npm/messages/index.d.ts +21 -21
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/timepicker/TimeList.d.ts +8 -8
- package/dist/npm/timepicker/TimeList.js +39 -18
- package/dist/npm/timepicker/TimePart.d.ts +10 -10
- package/dist/npm/timepicker/TimePart.js +25 -19
- package/dist/npm/timepicker/TimePicker.d.ts +22 -22
- package/dist/npm/timepicker/TimePicker.js +43 -37
- package/dist/npm/timepicker/TimeSelector.d.ts +6 -6
- package/dist/npm/timepicker/TimeSelector.js +22 -15
- package/dist/npm/timepicker/models/TimePart.js +1 -0
- package/dist/npm/timepicker/models/index.js +2 -1
- package/dist/npm/timepicker/services/DOMService.js +7 -4
- package/dist/npm/timepicker/services/DayPeriodService.js +11 -4
- package/dist/npm/timepicker/services/HoursService.js +21 -11
- package/dist/npm/timepicker/services/MinutesService.js +17 -10
- package/dist/npm/timepicker/services/SecondsService.js +17 -10
- package/dist/npm/timepicker/services/index.js +6 -5
- package/dist/npm/timepicker/utils.d.ts +4 -4
- package/dist/npm/timepicker/utils.js +30 -20
- package/dist/npm/utils.d.ts +1 -1
- package/dist/npm/utils.js +43 -20
- package/dist/npm/virtualization/Virtualization.d.ts +8 -7
- package/dist/npm/virtualization/Virtualization.js +26 -15
- package/dist/npm/virtualization/services/RowHeightService.js +11 -1
- package/dist/npm/virtualization/services/ScrollerService.js +10 -3
- package/dist/npm/virtualization/services/index.js +5 -4
- package/dist/systemjs/kendo-react-dateinputs.js +1 -1
- package/package.json +13 -13
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
26
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Header = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
@@ -47,7 +50,7 @@ var Header = /** @class */ (function (_super) {
|
|
|
47
50
|
if (take < 1 || !_this.props.service.isInRange(nextDate, _this.min, _this.max)) {
|
|
48
51
|
return title;
|
|
49
52
|
}
|
|
50
|
-
return title
|
|
53
|
+
return "".concat(title, " - ").concat(_this.props.service.title(nextDate));
|
|
51
54
|
};
|
|
52
55
|
_this.handleTitleClick = function (event) {
|
|
53
56
|
if (!_this.canMoveUp) {
|
|
@@ -63,7 +66,7 @@ var Header = /** @class */ (function (_super) {
|
|
|
63
66
|
? this.props.min
|
|
64
67
|
: Header.defaultProps.min;
|
|
65
68
|
},
|
|
66
|
-
enumerable:
|
|
69
|
+
enumerable: false,
|
|
67
70
|
configurable: true
|
|
68
71
|
});
|
|
69
72
|
Object.defineProperty(Header.prototype, "max", {
|
|
@@ -72,26 +75,26 @@ var Header = /** @class */ (function (_super) {
|
|
|
72
75
|
? this.props.max
|
|
73
76
|
: Header.defaultProps.max;
|
|
74
77
|
},
|
|
75
|
-
enumerable:
|
|
78
|
+
enumerable: false,
|
|
76
79
|
configurable: true
|
|
77
80
|
});
|
|
78
81
|
Object.defineProperty(Header.prototype, "rangeLength", {
|
|
79
82
|
get: function () {
|
|
80
83
|
return this.props.rangeLength !== undefined ? this.props.rangeLength : Header.defaultProps.rangeLength;
|
|
81
84
|
},
|
|
82
|
-
enumerable:
|
|
85
|
+
enumerable: false,
|
|
83
86
|
configurable: true
|
|
84
87
|
});
|
|
85
88
|
Object.defineProperty(Header.prototype, "canMoveUp", {
|
|
86
89
|
get: function () {
|
|
87
90
|
return this.props.bus.canMoveUp(this.props.activeView);
|
|
88
91
|
},
|
|
89
|
-
enumerable:
|
|
92
|
+
enumerable: false,
|
|
90
93
|
configurable: true
|
|
91
94
|
});
|
|
92
95
|
Header.prototype.render = function () {
|
|
93
96
|
var title = this.getTitle();
|
|
94
|
-
var titleClassNames = kendo_react_common_1.classNames('k-calendar-title');
|
|
97
|
+
var titleClassNames = (0, kendo_react_common_1.classNames)('k-calendar-title');
|
|
95
98
|
var headerTitleProps = {
|
|
96
99
|
children: title,
|
|
97
100
|
value: title,
|
|
@@ -123,4 +126,4 @@ var Header = /** @class */ (function (_super) {
|
|
|
123
126
|
return Header;
|
|
124
127
|
}(React.Component));
|
|
125
128
|
exports.Header = Header;
|
|
126
|
-
kendo_react_intl_1.registerForLocalization(Header);
|
|
129
|
+
(0, kendo_react_intl_1.registerForLocalization)(Header);
|
|
@@ -52,10 +52,10 @@ export declare class HorizontalViewList extends React.Component<HorizontalViewLi
|
|
|
52
52
|
};
|
|
53
53
|
private _element;
|
|
54
54
|
private isActive;
|
|
55
|
-
|
|
56
|
-
protected
|
|
57
|
-
protected
|
|
58
|
-
protected
|
|
55
|
+
get element(): HTMLDivElement | null;
|
|
56
|
+
protected get weekNumber(): boolean;
|
|
57
|
+
protected get min(): Date;
|
|
58
|
+
protected get max(): Date;
|
|
59
59
|
constructor(props: HorizontalViewListProps);
|
|
60
60
|
focusActiveDate: () => void;
|
|
61
61
|
blurActiveDate: () => void;
|
|
@@ -3,16 +3,19 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
15
|
};
|
|
14
16
|
})();
|
|
15
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.HorizontalViewList = void 0;
|
|
16
19
|
var React = require("react");
|
|
17
20
|
var View_1 = require("./View");
|
|
18
21
|
var models_1 = require("../models");
|
|
@@ -27,6 +30,7 @@ var HorizontalViewList = /** @class */ (function (_super) {
|
|
|
27
30
|
__extends(HorizontalViewList, _super);
|
|
28
31
|
function HorizontalViewList(props) {
|
|
29
32
|
var _this = _super.call(this, props) || this;
|
|
33
|
+
_this._element = null;
|
|
30
34
|
_this.isActive = false;
|
|
31
35
|
_this.focusActiveDate = function () {
|
|
32
36
|
if (!_this._element) {
|
|
@@ -69,7 +73,7 @@ var HorizontalViewList = /** @class */ (function (_super) {
|
|
|
69
73
|
var args = {
|
|
70
74
|
syntheticEvent: event.syntheticEvent,
|
|
71
75
|
nativeEvent: event.nativeEvent,
|
|
72
|
-
value: kendo_date_math_1.cloneDate(event.value),
|
|
76
|
+
value: (0, kendo_date_math_1.cloneDate)(event.value),
|
|
73
77
|
target: _this,
|
|
74
78
|
isTodayClick: isTodayClick
|
|
75
79
|
};
|
|
@@ -82,14 +86,14 @@ var HorizontalViewList = /** @class */ (function (_super) {
|
|
|
82
86
|
get: function () {
|
|
83
87
|
return this._element;
|
|
84
88
|
},
|
|
85
|
-
enumerable:
|
|
89
|
+
enumerable: false,
|
|
86
90
|
configurable: true
|
|
87
91
|
});
|
|
88
92
|
Object.defineProperty(HorizontalViewList.prototype, "weekNumber", {
|
|
89
93
|
get: function () {
|
|
90
94
|
return Boolean(this.props.showWeekNumbers && this.props.activeView === models_1.CalendarViewEnum.month);
|
|
91
95
|
},
|
|
92
|
-
enumerable:
|
|
96
|
+
enumerable: false,
|
|
93
97
|
configurable: true
|
|
94
98
|
});
|
|
95
99
|
Object.defineProperty(HorizontalViewList.prototype, "min", {
|
|
@@ -98,7 +102,7 @@ var HorizontalViewList = /** @class */ (function (_super) {
|
|
|
98
102
|
? this.props.min
|
|
99
103
|
: HorizontalViewList.defaultProps.min;
|
|
100
104
|
},
|
|
101
|
-
enumerable:
|
|
105
|
+
enumerable: false,
|
|
102
106
|
configurable: true
|
|
103
107
|
});
|
|
104
108
|
Object.defineProperty(HorizontalViewList.prototype, "max", {
|
|
@@ -107,7 +111,7 @@ var HorizontalViewList = /** @class */ (function (_super) {
|
|
|
107
111
|
? this.props.max
|
|
108
112
|
: HorizontalViewList.defaultProps.max;
|
|
109
113
|
},
|
|
110
|
-
enumerable:
|
|
114
|
+
enumerable: false,
|
|
111
115
|
configurable: true
|
|
112
116
|
});
|
|
113
117
|
HorizontalViewList.prototype.componentDidUpdate = function () {
|
|
@@ -120,7 +124,7 @@ var HorizontalViewList = /** @class */ (function (_super) {
|
|
|
120
124
|
var selectionRange = this.props.allowReverse
|
|
121
125
|
? this.rotateSelectionRange(this.props.selectionRange)
|
|
122
126
|
: this.props.selectionRange;
|
|
123
|
-
var rootClassNames = kendo_react_common_1.classNames('k-calendar-view k-hstack k-align-items-start k-justify-content-center', {
|
|
127
|
+
var rootClassNames = (0, kendo_react_common_1.classNames)('k-calendar-view k-hstack k-align-items-start k-justify-content-center', {
|
|
124
128
|
'k-calendar-monthview': this.props.activeView === models_1.CalendarViewEnum.month,
|
|
125
129
|
'k-calendar-yearview': this.props.activeView === models_1.CalendarViewEnum.year,
|
|
126
130
|
'k-calendar-decadeview': this.props.activeView === models_1.CalendarViewEnum.decade,
|
|
@@ -49,7 +49,7 @@ export declare class MultiViewCalendarWithoutContext extends React.Component<Mul
|
|
|
49
49
|
* @hidden
|
|
50
50
|
*/
|
|
51
51
|
static propTypes: {
|
|
52
|
-
activeRangeEnd: PropTypes.Requireable<
|
|
52
|
+
activeRangeEnd: PropTypes.Requireable<"end" | "start">;
|
|
53
53
|
allowReverse: PropTypes.Requireable<boolean>;
|
|
54
54
|
bottomView: PropTypes.Requireable<ActiveView>;
|
|
55
55
|
className: PropTypes.Requireable<string>;
|
|
@@ -62,14 +62,14 @@ export declare class MultiViewCalendarWithoutContext extends React.Component<Mul
|
|
|
62
62
|
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
63
63
|
max: PropTypes.Requireable<Date>;
|
|
64
64
|
min: PropTypes.Requireable<Date>;
|
|
65
|
-
mode: PropTypes.Requireable<
|
|
65
|
+
mode: PropTypes.Requireable<"multiple" | "range" | "single">;
|
|
66
66
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
67
67
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
68
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
69
69
|
tabIndex: PropTypes.Requireable<number>;
|
|
70
70
|
topView: PropTypes.Requireable<ActiveView>;
|
|
71
71
|
value: PropTypes.Requireable<any>;
|
|
72
|
-
views: (props: any, propName: any, componentName: any) => Error;
|
|
72
|
+
views: (props: any, propName: any, componentName: any) => Error | null;
|
|
73
73
|
weekNumber: PropTypes.Requireable<boolean>;
|
|
74
74
|
};
|
|
75
75
|
/**
|
|
@@ -81,7 +81,7 @@ export declare class MultiViewCalendarWithoutContext extends React.Component<Mul
|
|
|
81
81
|
max: Date;
|
|
82
82
|
navigation: boolean;
|
|
83
83
|
defaultActiveView: ActiveView;
|
|
84
|
-
defaultValue:
|
|
84
|
+
defaultValue: null;
|
|
85
85
|
topView: ActiveView;
|
|
86
86
|
tabIndex: number;
|
|
87
87
|
bottomView: ActiveView;
|
|
@@ -111,21 +111,21 @@ export declare class MultiViewCalendarWithoutContext extends React.Component<Mul
|
|
|
111
111
|
/**
|
|
112
112
|
* Gets the wrapping element of the MultiViewCalendar component.
|
|
113
113
|
*/
|
|
114
|
-
|
|
114
|
+
get element(): HTMLDivElement | null;
|
|
115
115
|
/**
|
|
116
116
|
* Gets the value of the MultiViewCalendar.
|
|
117
117
|
*/
|
|
118
|
-
|
|
118
|
+
get value(): Date | Date[] | SelectionRange | null;
|
|
119
119
|
/**
|
|
120
120
|
* Gets the current focused date of the MultiViewCalendar.
|
|
121
121
|
*/
|
|
122
|
-
|
|
123
|
-
protected
|
|
124
|
-
protected
|
|
125
|
-
protected
|
|
126
|
-
protected
|
|
127
|
-
protected
|
|
128
|
-
protected
|
|
122
|
+
get focusedDate(): Date;
|
|
123
|
+
protected get min(): Date;
|
|
124
|
+
protected get max(): Date;
|
|
125
|
+
protected get bottomView(): CalendarViewEnum;
|
|
126
|
+
protected get topView(): CalendarViewEnum;
|
|
127
|
+
protected get activeRange(): SelectionRangeEnd;
|
|
128
|
+
protected get todayIsInRange(): boolean;
|
|
129
129
|
constructor(props: MultiViewCalendarProps);
|
|
130
130
|
/**
|
|
131
131
|
* @hidden
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
26
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.MultiViewCalendar = exports.MultiViewCalendarPropsContext = exports.MultiViewCalendarWithoutContext = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
@@ -41,15 +44,15 @@ var TodayCommand_1 = require("./TodayCommand");
|
|
|
41
44
|
var extractDateFromValue = function (min, max, value) {
|
|
42
45
|
if (min === void 0) { min = MultiViewCalendarWithoutContext.defaultProps.min; }
|
|
43
46
|
if (max === void 0) { max = MultiViewCalendarWithoutContext.defaultProps.max; }
|
|
44
|
-
return value instanceof Date && !Array.isArray(value) && utils_1.isInRange(kendo_date_math_1.getDate(value), min, max)
|
|
45
|
-
? kendo_date_math_1.getDate(value)
|
|
47
|
+
return value instanceof Date && !Array.isArray(value) && (0, utils_1.isInRange)((0, kendo_date_math_1.getDate)(value), min, max)
|
|
48
|
+
? (0, kendo_date_math_1.getDate)(value)
|
|
46
49
|
: null;
|
|
47
50
|
};
|
|
48
51
|
var extractMultipleFromValue = function (min, max, value) {
|
|
49
52
|
if (min === void 0) { min = MultiViewCalendarWithoutContext.defaultProps.min; }
|
|
50
53
|
if (max === void 0) { max = MultiViewCalendarWithoutContext.defaultProps.max; }
|
|
51
54
|
return Array.isArray(value)
|
|
52
|
-
? value.filter(function (date) { return utils_1.isInRange(date, min, max); }).map(function (date) { return kendo_date_math_1.getDate(date); })
|
|
55
|
+
? value.filter(function (date) { return (0, utils_1.isInRange)(date, min, max); }).map(function (date) { return (0, kendo_date_math_1.getDate)(date); })
|
|
53
56
|
: null;
|
|
54
57
|
};
|
|
55
58
|
var extractRangeFromValue = function (value) {
|
|
@@ -72,12 +75,19 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
72
75
|
__extends(MultiViewCalendarWithoutContext, _super);
|
|
73
76
|
function MultiViewCalendarWithoutContext(props) {
|
|
74
77
|
var _this = _super.call(this, props) || this;
|
|
78
|
+
_this.dates = [];
|
|
75
79
|
_this.selectedDate = null;
|
|
76
80
|
_this.selectedMultiple = null;
|
|
77
81
|
_this.selectedRange = models_1.EMPTY_SELECTIONRANGE;
|
|
78
|
-
_this.
|
|
82
|
+
_this._focusedDate = new Date();
|
|
83
|
+
_this.cellUID = (0, kendo_react_common_1.guid)();
|
|
79
84
|
_this.activeRangeEnd = 'start';
|
|
80
|
-
_this.
|
|
85
|
+
_this._element = null;
|
|
86
|
+
_this.intl = null;
|
|
87
|
+
_this.localization = null;
|
|
88
|
+
_this.service = null;
|
|
89
|
+
_this.wrapperID = (0, kendo_react_common_1.guid)();
|
|
90
|
+
_this.calendarViewList = null;
|
|
81
91
|
_this.isActive = false;
|
|
82
92
|
_this.calculateFocusFromValue = true;
|
|
83
93
|
/**
|
|
@@ -127,7 +137,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
127
137
|
return _this.clampDate(_this.service.move(_this.focusedDate, action));
|
|
128
138
|
};
|
|
129
139
|
_this.clampDate = function (value) {
|
|
130
|
-
return utils_1.dateInRange(value, _this.min, _this.max);
|
|
140
|
+
return (0, utils_1.dateInRange)(value, _this.min, _this.max);
|
|
131
141
|
};
|
|
132
142
|
_this.shouldAutoCorrect = function (candidate, value) {
|
|
133
143
|
var end = value.end, start = value.start;
|
|
@@ -181,7 +191,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
181
191
|
if (!_this.todayIsInRange) {
|
|
182
192
|
return;
|
|
183
193
|
}
|
|
184
|
-
_this.handleDateChange
|
|
194
|
+
_this.handleDateChange(event);
|
|
185
195
|
};
|
|
186
196
|
_this.handlePrevButtonClick = function () {
|
|
187
197
|
_this.navigate(models_1.Action.PrevView);
|
|
@@ -198,11 +208,11 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
198
208
|
value: _this.focusedDate,
|
|
199
209
|
target: _this
|
|
200
210
|
};
|
|
201
|
-
_this.handleDateChange
|
|
211
|
+
_this.handleDateChange(args);
|
|
202
212
|
}
|
|
203
213
|
else {
|
|
204
|
-
var candidate = utils_1.dateInRange(_this.navigation.move(_this.focusedDate, _this.navigation.action(event), _this.state.activeView, _this.service, event), _this.min, _this.max);
|
|
205
|
-
if (kendo_date_math_1.isEqualDate(_this.focusedDate, candidate)) {
|
|
214
|
+
var candidate = (0, utils_1.dateInRange)(_this.navigation.move(_this.focusedDate, _this.navigation.action(event), _this.state.activeView, _this.service, event), _this.min, _this.max);
|
|
215
|
+
if ((0, kendo_date_math_1.isEqualDate)(_this.focusedDate, candidate)) {
|
|
206
216
|
return;
|
|
207
217
|
}
|
|
208
218
|
_this.calculateFocusFromValue = false;
|
|
@@ -216,7 +226,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
216
226
|
_this.setState({ activeView: view });
|
|
217
227
|
};
|
|
218
228
|
_this.handleDateChange = function (event) {
|
|
219
|
-
var focusedDate = kendo_date_math_1.cloneDate(event.value);
|
|
229
|
+
var focusedDate = (0, kendo_date_math_1.cloneDate)(event.value);
|
|
220
230
|
var canNavigateDown = _this.bus.canMoveDown(_this.state.activeView);
|
|
221
231
|
if (_this.props.disabled) {
|
|
222
232
|
return;
|
|
@@ -235,28 +245,28 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
235
245
|
var value;
|
|
236
246
|
switch (_this.props.mode) {
|
|
237
247
|
case 'single':
|
|
238
|
-
value = kendo_date_math_1.cloneDate(event.value);
|
|
248
|
+
value = (0, kendo_date_math_1.cloneDate)(event.value);
|
|
239
249
|
break;
|
|
240
250
|
case 'multiple':
|
|
241
251
|
if (Array.isArray(_this.selectedMultiple)) {
|
|
242
252
|
var result = _this.selectedMultiple.slice();
|
|
243
253
|
var index_1 = -1;
|
|
244
254
|
result.forEach(function (date, idx) {
|
|
245
|
-
if (kendo_date_math_1.isEqualDate(date, event.value)) {
|
|
255
|
+
if ((0, kendo_date_math_1.isEqualDate)(date, event.value)) {
|
|
246
256
|
index_1 = idx;
|
|
247
257
|
}
|
|
248
258
|
});
|
|
249
259
|
index_1 !== -1
|
|
250
260
|
? result.splice(index_1, 1)
|
|
251
|
-
: result.push(kendo_date_math_1.cloneDate(event.value));
|
|
261
|
+
: result.push((0, kendo_date_math_1.cloneDate)(event.value));
|
|
252
262
|
value = result.slice();
|
|
253
263
|
}
|
|
254
264
|
else {
|
|
255
265
|
if (_this.selectedDate) {
|
|
256
|
-
value = [kendo_date_math_1.cloneDate(_this.selectedDate), kendo_date_math_1.cloneDate(event.value)];
|
|
266
|
+
value = [(0, kendo_date_math_1.cloneDate)(_this.selectedDate), (0, kendo_date_math_1.cloneDate)(event.value)];
|
|
257
267
|
}
|
|
258
268
|
else {
|
|
259
|
-
value = [kendo_date_math_1.cloneDate(event.value)];
|
|
269
|
+
value = [(0, kendo_date_math_1.cloneDate)(event.value)];
|
|
260
270
|
}
|
|
261
271
|
}
|
|
262
272
|
break;
|
|
@@ -270,7 +280,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
270
280
|
_this.activeRangeEnd = _this.activeRange !== 'end' ? 'end' : 'start';
|
|
271
281
|
break;
|
|
272
282
|
default:
|
|
273
|
-
value = kendo_date_math_1.cloneDate(event.value);
|
|
283
|
+
value = (0, kendo_date_math_1.cloneDate)(event.value);
|
|
274
284
|
break;
|
|
275
285
|
}
|
|
276
286
|
_this.valueDuringOnChange = value;
|
|
@@ -295,8 +305,8 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
295
305
|
var selectedMultiple = extractMultipleFromValue(_this.min, _this.max, value);
|
|
296
306
|
var selectedRange = extractRangeFromValue(value);
|
|
297
307
|
var calculatedFocus = extractFocusedDate(selectedDate, selectedMultiple, selectedRange);
|
|
298
|
-
var activeView = utils_1.viewInRange(models_1.CalendarViewEnum[props.defaultActiveView], _this.bottomView, _this.topView);
|
|
299
|
-
var focusedDate = utils_1.dateInRange(props.focusedDate || calculatedFocus || utils_1.getToday(), _this.min, _this.max);
|
|
308
|
+
var activeView = (0, utils_1.viewInRange)(models_1.CalendarViewEnum[props.defaultActiveView], _this.bottomView, _this.topView);
|
|
309
|
+
var focusedDate = (0, utils_1.dateInRange)(props.focusedDate || calculatedFocus || (0, utils_1.getToday)(), _this.min, _this.max);
|
|
300
310
|
_this.state = {
|
|
301
311
|
value: value,
|
|
302
312
|
activeView: activeView,
|
|
@@ -317,7 +327,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
317
327
|
get: function () {
|
|
318
328
|
return this._element;
|
|
319
329
|
},
|
|
320
|
-
enumerable:
|
|
330
|
+
enumerable: false,
|
|
321
331
|
configurable: true
|
|
322
332
|
});
|
|
323
333
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "value", {
|
|
@@ -331,7 +341,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
331
341
|
? this.props.value
|
|
332
342
|
: this.state.value;
|
|
333
343
|
},
|
|
334
|
-
enumerable:
|
|
344
|
+
enumerable: false,
|
|
335
345
|
configurable: true
|
|
336
346
|
});
|
|
337
347
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "focusedDate", {
|
|
@@ -339,27 +349,27 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
339
349
|
* Gets the current focused date of the MultiViewCalendar.
|
|
340
350
|
*/
|
|
341
351
|
get: function () {
|
|
342
|
-
return kendo_date_math_1.cloneDate(this._focusedDate);
|
|
352
|
+
return (0, kendo_date_math_1.cloneDate)(this._focusedDate);
|
|
343
353
|
},
|
|
344
|
-
enumerable:
|
|
354
|
+
enumerable: false,
|
|
345
355
|
configurable: true
|
|
346
356
|
});
|
|
347
357
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "min", {
|
|
348
358
|
get: function () {
|
|
349
|
-
return kendo_date_math_1.getDate(this.props.min !== undefined
|
|
359
|
+
return (0, kendo_date_math_1.getDate)(this.props.min !== undefined
|
|
350
360
|
? this.props.min
|
|
351
361
|
: MultiViewCalendarWithoutContext.defaultProps.min);
|
|
352
362
|
},
|
|
353
|
-
enumerable:
|
|
363
|
+
enumerable: false,
|
|
354
364
|
configurable: true
|
|
355
365
|
});
|
|
356
366
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "max", {
|
|
357
367
|
get: function () {
|
|
358
|
-
return kendo_date_math_1.getDate(this.props.max !== undefined
|
|
368
|
+
return (0, kendo_date_math_1.getDate)(this.props.max !== undefined
|
|
359
369
|
? this.props.max
|
|
360
370
|
: MultiViewCalendarWithoutContext.defaultProps.max);
|
|
361
371
|
},
|
|
362
|
-
enumerable:
|
|
372
|
+
enumerable: false,
|
|
363
373
|
configurable: true
|
|
364
374
|
});
|
|
365
375
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "bottomView", {
|
|
@@ -368,7 +378,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
368
378
|
? this.props.bottomView
|
|
369
379
|
: MultiViewCalendarWithoutContext.defaultProps.bottomView];
|
|
370
380
|
},
|
|
371
|
-
enumerable:
|
|
381
|
+
enumerable: false,
|
|
372
382
|
configurable: true
|
|
373
383
|
});
|
|
374
384
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "topView", {
|
|
@@ -377,7 +387,7 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
377
387
|
? this.props.topView
|
|
378
388
|
: MultiViewCalendarWithoutContext.defaultProps.topView];
|
|
379
389
|
},
|
|
380
|
-
enumerable:
|
|
390
|
+
enumerable: false,
|
|
381
391
|
configurable: true
|
|
382
392
|
});
|
|
383
393
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "activeRange", {
|
|
@@ -386,14 +396,14 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
386
396
|
? this.props.activeRangeEnd
|
|
387
397
|
: this.activeRangeEnd;
|
|
388
398
|
},
|
|
389
|
-
enumerable:
|
|
399
|
+
enumerable: false,
|
|
390
400
|
configurable: true
|
|
391
401
|
});
|
|
392
402
|
Object.defineProperty(MultiViewCalendarWithoutContext.prototype, "todayIsInRange", {
|
|
393
403
|
get: function () {
|
|
394
|
-
return utils_1.isInRange(utils_1.getToday(), kendo_date_math_1.getDate(this.min), kendo_date_math_1.getDate(this.max));
|
|
404
|
+
return (0, utils_1.isInRange)((0, utils_1.getToday)(), (0, kendo_date_math_1.getDate)(this.min), (0, kendo_date_math_1.getDate)(this.max));
|
|
395
405
|
},
|
|
396
|
-
enumerable:
|
|
406
|
+
enumerable: false,
|
|
397
407
|
configurable: true
|
|
398
408
|
});
|
|
399
409
|
/**
|
|
@@ -424,19 +434,19 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
424
434
|
if (this.props._ref) {
|
|
425
435
|
this.props._ref(this);
|
|
426
436
|
}
|
|
427
|
-
this.intl = kendo_react_intl_1.provideIntlService(this);
|
|
428
|
-
this.localization = kendo_react_intl_1.provideLocalizationService(this);
|
|
437
|
+
this.intl = (0, kendo_react_intl_1.provideIntlService)(this);
|
|
438
|
+
this.localization = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
429
439
|
this.bus.configure(this.bottomView, this.topView);
|
|
430
|
-
var activeView = utils_1.viewInRange(this.state.activeView, this.bottomView, this.topView);
|
|
440
|
+
var activeView = (0, utils_1.viewInRange)(this.state.activeView, this.bottomView, this.topView);
|
|
431
441
|
this.service = this.bus.service(activeView, this.intl);
|
|
432
442
|
this.selectedDate = extractDateFromValue(this.min, this.max, this.value);
|
|
433
443
|
this.selectedMultiple = extractMultipleFromValue(this.min, this.max, this.value);
|
|
434
444
|
this.selectedRange = extractRangeFromValue(this.value);
|
|
435
445
|
var calculatedFocus = extractFocusedDate(this.selectedDate, this.selectedMultiple, this.selectedRange);
|
|
436
|
-
this._focusedDate = utils_1.dateInRange(this.calculateFocusFromValue && calculatedFocus !== null
|
|
446
|
+
this._focusedDate = (0, utils_1.dateInRange)(this.calculateFocusFromValue && calculatedFocus !== null
|
|
437
447
|
? calculatedFocus
|
|
438
448
|
: this.state.focusedDate, this.min, this.max);
|
|
439
|
-
var wrapperClassName = kendo_react_common_1.classNames('k-widget k-calendar k-calendar-range', {
|
|
449
|
+
var wrapperClassName = (0, kendo_react_common_1.classNames)('k-widget k-calendar k-calendar-range', {
|
|
440
450
|
'k-disabled': this.props.disabled
|
|
441
451
|
}, this.props.className);
|
|
442
452
|
var visualizedRange = this.rangeWithFocused(this.selectedRange, this.focusedDate);
|
|
@@ -456,9 +466,9 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
456
466
|
if (!isDateInList || didViewChange || didViewsCountChange) {
|
|
457
467
|
this.dates = this.service.datesList(this.focusedDate, this.props.views || HorizontalViewList_1.HorizontalViewList.defaultProps.views);
|
|
458
468
|
}
|
|
459
|
-
var activeDate = kendo_date_math_1.cloneDate(this.dates && this.dates[0] ? this.dates[0] : utils_1.getToday());
|
|
469
|
+
var activeDate = (0, kendo_date_math_1.cloneDate)(this.dates && this.dates[0] ? this.dates[0] : (0, utils_1.getToday)());
|
|
460
470
|
return (React.createElement("div", __assign({ ref: function (el) { _this._element = el; }, className: wrapperClassName, id: this.props.id || this.wrapperID, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, role: 'grid', tabIndex: !this.props.disabled ? this.props.tabIndex : undefined, onFocus: this.handleFocus, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, wrapperAria),
|
|
461
|
-
React.createElement(Header_1.Header, { key: ".kendo.calendar.header."
|
|
471
|
+
React.createElement(Header_1.Header, { key: ".kendo.calendar.header.".concat(activeDate.getTime()), activeView: activeView, currentDate: activeDate, min: this.min, max: this.max, rangeLength: this.props.views, bus: this.bus, service: this.service, headerTitle: this.props.headerTitle, commands: (React.createElement(React.Fragment, null,
|
|
462
472
|
React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", className: "k-nav-prev", icon: "arrow-chevron-left", fillMode: "flat", title: prevViewTitle, disabled: isPrevDisabled, onClick: this.handlePrevButtonClick }, prevBtnAria)),
|
|
463
473
|
React.createElement(TodayCommand_1.TodayCommand, { min: this.min, max: this.max, onClick: this.handleTodayClick, disabled: !this.todayIsInRange }),
|
|
464
474
|
React.createElement(kendo_react_buttons_1.Button, __assign({ type: "button", className: "k-nav-next", icon: "arrow-chevron-right", fillMode: "flat", title: nextViewTittle, disabled: isNextDisabled, onClick: this.handleNextButtonClick }, nextBtnAria)))) }),
|
|
@@ -478,11 +488,11 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
478
488
|
className: PropTypes.string,
|
|
479
489
|
defaultActiveView: PropTypes.oneOf(['month', 'year', 'decade', 'century']),
|
|
480
490
|
defaultValue: PropTypes.oneOfType([
|
|
481
|
-
utils_1.nullable(PropTypes.instanceOf(Date)),
|
|
491
|
+
(0, utils_1.nullable)(PropTypes.instanceOf(Date)),
|
|
482
492
|
PropTypes.arrayOf(PropTypes.instanceOf(Date)),
|
|
483
493
|
PropTypes.shape({
|
|
484
|
-
start: utils_1.nullable(PropTypes.instanceOf(Date)),
|
|
485
|
-
end: utils_1.nullable(PropTypes.instanceOf(Date))
|
|
494
|
+
start: (0, utils_1.nullable)(PropTypes.instanceOf(Date)),
|
|
495
|
+
end: (0, utils_1.nullable)(PropTypes.instanceOf(Date))
|
|
486
496
|
})
|
|
487
497
|
]),
|
|
488
498
|
disabled: PropTypes.bool,
|
|
@@ -499,18 +509,18 @@ var MultiViewCalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
499
509
|
tabIndex: PropTypes.number,
|
|
500
510
|
topView: PropTypes.oneOf(['month', 'year', 'decade', 'century']),
|
|
501
511
|
value: PropTypes.oneOfType([
|
|
502
|
-
utils_1.nullable(PropTypes.instanceOf(Date)),
|
|
512
|
+
(0, utils_1.nullable)(PropTypes.instanceOf(Date)),
|
|
503
513
|
PropTypes.arrayOf(PropTypes.instanceOf(Date)),
|
|
504
514
|
PropTypes.shape({
|
|
505
|
-
start: utils_1.nullable(PropTypes.instanceOf(Date).isRequired),
|
|
506
|
-
end: utils_1.nullable(PropTypes.instanceOf(Date).isRequired)
|
|
515
|
+
start: (0, utils_1.nullable)(PropTypes.instanceOf(Date).isRequired),
|
|
516
|
+
end: (0, utils_1.nullable)(PropTypes.instanceOf(Date).isRequired)
|
|
507
517
|
})
|
|
508
518
|
]),
|
|
509
519
|
views: function (props, propName, componentName) {
|
|
510
520
|
var views = props[propName];
|
|
511
521
|
if (views !== undefined && views < 1) {
|
|
512
|
-
return new Error("Invalid prop '"
|
|
513
|
-
|
|
522
|
+
return new Error("Invalid prop '".concat(propName, "' supplied to") +
|
|
523
|
+
"'".concat(componentName, "'. The '").concat(propName, "' property cannot be less than 1'"));
|
|
514
524
|
}
|
|
515
525
|
return null;
|
|
516
526
|
},
|
|
@@ -541,7 +551,7 @@ exports.MultiViewCalendarWithoutContext = MultiViewCalendarWithoutContext;
|
|
|
541
551
|
*
|
|
542
552
|
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
543
553
|
*/
|
|
544
|
-
exports.MultiViewCalendarPropsContext = kendo_react_common_1.createPropsContext();
|
|
554
|
+
exports.MultiViewCalendarPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
545
555
|
/* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
|
|
546
556
|
/**
|
|
547
557
|
* Represents the KendoReact MultiViewCalendar Component.
|
|
@@ -549,7 +559,7 @@ exports.MultiViewCalendarPropsContext = kendo_react_common_1.createPropsContext(
|
|
|
549
559
|
* Accepts properties of type [MultiViewCalendarProps]({% slug api_dateinputs_multiviewcalendarprops %}).
|
|
550
560
|
* Obtaining the `ref` returns an object of type [MultiViewCalendarHandle]({% slug api_dateinputs_multiviewcalendarhandle %}).
|
|
551
561
|
*/
|
|
552
|
-
exports.MultiViewCalendar = kendo_react_common_1.withPropsContext(exports.MultiViewCalendarPropsContext, MultiViewCalendarWithoutContext);
|
|
562
|
+
exports.MultiViewCalendar = (0, kendo_react_common_1.withPropsContext)(exports.MultiViewCalendarPropsContext, MultiViewCalendarWithoutContext);
|
|
553
563
|
exports.MultiViewCalendar.displayName = 'KendoReactMultiViewCalendar';
|
|
554
|
-
kendo_react_intl_1.registerForIntl(MultiViewCalendarWithoutContext);
|
|
555
|
-
kendo_react_intl_1.registerForLocalization(MultiViewCalendarWithoutContext);
|
|
564
|
+
(0, kendo_react_intl_1.registerForIntl)(MultiViewCalendarWithoutContext);
|
|
565
|
+
(0, kendo_react_intl_1.registerForLocalization)(MultiViewCalendarWithoutContext);
|
|
@@ -58,7 +58,7 @@ export declare class Navigation extends React.Component<NavigationProps, Navigat
|
|
|
58
58
|
private lastView;
|
|
59
59
|
private indexToScroll?;
|
|
60
60
|
private lastFocus;
|
|
61
|
-
protected
|
|
61
|
+
protected get take(): number;
|
|
62
62
|
constructor(props: NavigationProps);
|
|
63
63
|
/**
|
|
64
64
|
* @hidden
|