@progress/kendo-react-dateinputs 5.4.0-dev.202205250548 → 5.4.0-dev.202206081230
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 +2 -2
- 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 +9 -9
- 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/calendar/utils/ScrollSync.d.ts +3 -3
- package/dist/es/calendar/utils/ScrollSync.js +2 -0
- 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 +3 -3
- 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 +2 -2
- 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 +16 -14
- 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 +11 -11
- package/dist/es/timepicker/TimePart.js +14 -9
- package/dist/es/timepicker/TimePicker.d.ts +23 -23
- 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 +9 -8
- package/dist/es/virtualization/Virtualization.js +23 -13
- 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 +2 -2
- 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 +9 -9
- 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/calendar/utils/ScrollSync.d.ts +3 -3
- package/dist/npm/calendar/utils/ScrollSync.js +2 -0
- 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 +15 -14
- package/dist/npm/dateinput/models/mask.js +2 -0
- package/dist/npm/dateinput/utils.d.ts +2 -2
- 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 +16 -14
- 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 +11 -11
- package/dist/npm/timepicker/TimePart.js +25 -19
- package/dist/npm/timepicker/TimePicker.d.ts +23 -23
- 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 +9 -8
- package/dist/npm/virtualization/Virtualization.js +27 -16
- 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.View = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
@@ -44,14 +47,16 @@ var View = /** @class */ (function (_super) {
|
|
|
44
47
|
__extends(View, _super);
|
|
45
48
|
function View() {
|
|
46
49
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
50
|
+
_this.intl = null;
|
|
51
|
+
_this.weekService = null;
|
|
47
52
|
_this.buildWeekNumber = function (row, idx) {
|
|
48
53
|
var firstDayOfWeek = _this.firstDate(row);
|
|
49
54
|
if (!firstDayOfWeek) {
|
|
50
|
-
return emptyCell("week-cell-"
|
|
55
|
+
return emptyCell("week-cell-".concat(idx));
|
|
51
56
|
}
|
|
52
57
|
var firstDate = _this.firstDate(row);
|
|
53
58
|
var weekCellValue = _this.getWeekNumber(firstDate);
|
|
54
|
-
var uniqueID = "kendo-react-calendar-week-cell-"
|
|
59
|
+
var uniqueID = "kendo-react-calendar-week-cell-".concat(weekCellValue);
|
|
55
60
|
var cellProps = {
|
|
56
61
|
className: 'k-alt',
|
|
57
62
|
value: weekCellValue,
|
|
@@ -67,8 +72,8 @@ var View = /** @class */ (function (_super) {
|
|
|
67
72
|
return emptyCell(idx);
|
|
68
73
|
}
|
|
69
74
|
var aria = { 'aria-selected': cell.isSelected };
|
|
70
|
-
var uniqueID = "kendo-react-calendar-cell-"
|
|
71
|
-
var cellProps = __assign({}, aria, cell, { isDisabled: !cell.isInRange, view: _this.props.activeView, onClick: _this.handleClick, onMouseEnter: _this.handleMouseEnter, onMouseLeave: _this.handleMouseLeave });
|
|
75
|
+
var uniqueID = "kendo-react-calendar-cell-".concat(cell.value.getTime());
|
|
76
|
+
var cellProps = __assign(__assign(__assign({}, aria), cell), { isDisabled: !cell.isInRange, view: _this.props.activeView, onClick: _this.handleClick, onMouseEnter: _this.handleMouseEnter, onMouseLeave: _this.handleMouseLeave });
|
|
72
77
|
return _this.props.cell
|
|
73
78
|
? (React.createElement(_this.props.cell, __assign({}, cellProps, { key: uniqueID }), cell.formattedValue))
|
|
74
79
|
: (React.createElement(CalendarCell_1.CalendarCell, __assign({}, cellProps, { key: uniqueID }), cell.formattedValue));
|
|
@@ -91,9 +96,9 @@ var View = /** @class */ (function (_super) {
|
|
|
91
96
|
};
|
|
92
97
|
_this.handleClick = function (value, event) {
|
|
93
98
|
var onChange = _this.props.onChange;
|
|
94
|
-
if (onChange) {
|
|
99
|
+
if (onChange && event) {
|
|
95
100
|
var args = {
|
|
96
|
-
value: kendo_date_math_1.cloneDate(value),
|
|
101
|
+
value: (0, kendo_date_math_1.cloneDate)(value),
|
|
97
102
|
target: _this,
|
|
98
103
|
nativeEvent: event && event.nativeEvent,
|
|
99
104
|
syntheticEvent: event
|
|
@@ -104,13 +109,13 @@ var View = /** @class */ (function (_super) {
|
|
|
104
109
|
_this.handleMouseEnter = function (value) {
|
|
105
110
|
var onCellEnter = _this.props.onCellEnter;
|
|
106
111
|
if (onCellEnter) {
|
|
107
|
-
onCellEnter.call(undefined, kendo_date_math_1.cloneDate(value));
|
|
112
|
+
onCellEnter.call(undefined, (0, kendo_date_math_1.cloneDate)(value));
|
|
108
113
|
}
|
|
109
114
|
};
|
|
110
115
|
_this.handleMouseLeave = function (value) {
|
|
111
116
|
var onCellLeave = _this.props.onCellLeave;
|
|
112
117
|
if (onCellLeave) {
|
|
113
|
-
onCellLeave.call(undefined, kendo_date_math_1.cloneDate(value));
|
|
118
|
+
onCellLeave.call(undefined, (0, kendo_date_math_1.cloneDate)(value));
|
|
114
119
|
}
|
|
115
120
|
};
|
|
116
121
|
return _this;
|
|
@@ -119,53 +124,53 @@ var View = /** @class */ (function (_super) {
|
|
|
119
124
|
get: function () {
|
|
120
125
|
return this.props.min;
|
|
121
126
|
},
|
|
122
|
-
enumerable:
|
|
127
|
+
enumerable: false,
|
|
123
128
|
configurable: true
|
|
124
129
|
});
|
|
125
130
|
Object.defineProperty(View.prototype, "max", {
|
|
126
131
|
get: function () {
|
|
127
132
|
return this.props.max;
|
|
128
133
|
},
|
|
129
|
-
enumerable:
|
|
134
|
+
enumerable: false,
|
|
130
135
|
configurable: true
|
|
131
136
|
});
|
|
132
137
|
Object.defineProperty(View.prototype, "isHorizontal", {
|
|
133
138
|
get: function () {
|
|
134
139
|
return this.props.direction === 'horizontal';
|
|
135
140
|
},
|
|
136
|
-
enumerable:
|
|
141
|
+
enumerable: false,
|
|
137
142
|
configurable: true
|
|
138
143
|
});
|
|
139
144
|
Object.defineProperty(View.prototype, "isMonthView", {
|
|
140
145
|
get: function () {
|
|
141
146
|
return this.props.activeView === models_1.CalendarViewEnum.month;
|
|
142
147
|
},
|
|
143
|
-
enumerable:
|
|
148
|
+
enumerable: false,
|
|
144
149
|
configurable: true
|
|
145
150
|
});
|
|
146
151
|
Object.defineProperty(View.prototype, "weekNumber", {
|
|
147
152
|
get: function () {
|
|
148
153
|
return Boolean(this.props.showWeekNumbers && this.props.activeView === models_1.CalendarViewEnum.month);
|
|
149
154
|
},
|
|
150
|
-
enumerable:
|
|
155
|
+
enumerable: false,
|
|
151
156
|
configurable: true
|
|
152
157
|
});
|
|
153
158
|
Object.defineProperty(View.prototype, "selectedDate", {
|
|
154
159
|
get: function () {
|
|
155
160
|
return this.props.selectedDate !== undefined ? this.props.selectedDate : View.defaultProps.selectedDate;
|
|
156
161
|
},
|
|
157
|
-
enumerable:
|
|
162
|
+
enumerable: false,
|
|
158
163
|
configurable: true
|
|
159
164
|
});
|
|
160
165
|
View.prototype.render = function () {
|
|
161
166
|
var _this = this;
|
|
162
|
-
this.intl = kendo_react_intl_1.provideIntlService(this);
|
|
167
|
+
this.intl = (0, kendo_react_intl_1.provideIntlService)(this);
|
|
163
168
|
this.weekService = new services_1.WeekNamesService(this.intl);
|
|
164
169
|
var weekNames = this.weekService.getWeekNames(this.weekNumber);
|
|
165
170
|
var colSpan = this.props.service.rowLength(this.weekNumber);
|
|
166
171
|
var title = this.props.service.title(this.props.viewDate);
|
|
167
|
-
var time = utils_1.getToday();
|
|
168
|
-
var viewDate = utils_1.setTime(this.props.viewDate, time);
|
|
172
|
+
var time = (0, utils_1.getToday)();
|
|
173
|
+
var viewDate = (0, utils_1.setTime)(this.props.viewDate, time);
|
|
169
174
|
var data = this.props.service.data({
|
|
170
175
|
cellUID: this.props.cellUID,
|
|
171
176
|
min: this.min,
|
|
@@ -189,10 +194,10 @@ var View = /** @class */ (function (_super) {
|
|
|
189
194
|
}))));
|
|
190
195
|
};
|
|
191
196
|
View.prototype.getWeekNumber = function (date) {
|
|
192
|
-
if (!this.weekNumber) {
|
|
197
|
+
if (!this.weekNumber || !this.intl) {
|
|
193
198
|
return null;
|
|
194
199
|
}
|
|
195
|
-
return kendo_date_math_1.weekInYear(date, this.intl.firstDay());
|
|
200
|
+
return (0, kendo_date_math_1.weekInYear)(date, this.intl.firstDay());
|
|
196
201
|
};
|
|
197
202
|
View.propTypes = {
|
|
198
203
|
activeRangeEnd: PropTypes.oneOf(['start', 'end', null]),
|
|
@@ -209,10 +214,10 @@ var View = /** @class */ (function (_super) {
|
|
|
209
214
|
};
|
|
210
215
|
View.defaultProps = {
|
|
211
216
|
direction: 'vertical',
|
|
212
|
-
selectedDate: utils_1.getToday(),
|
|
217
|
+
selectedDate: (0, utils_1.getToday)(),
|
|
213
218
|
showWeekNumbers: false
|
|
214
219
|
};
|
|
215
220
|
return View;
|
|
216
221
|
}(React.Component));
|
|
217
222
|
exports.View = View;
|
|
218
|
-
kendo_react_intl_1.registerForIntl(View);
|
|
223
|
+
(0, kendo_react_intl_1.registerForIntl)(View);
|
|
@@ -87,20 +87,20 @@ export declare class ViewList extends React.Component<ViewListProps, ViewListSta
|
|
|
87
87
|
private shouldScroll;
|
|
88
88
|
private indexToScroll?;
|
|
89
89
|
private lastFocus;
|
|
90
|
-
|
|
91
|
-
protected
|
|
92
|
-
protected
|
|
93
|
-
protected
|
|
94
|
-
protected
|
|
95
|
-
protected
|
|
90
|
+
get element(): HTMLDivElement | null;
|
|
91
|
+
protected get weekNames(): string[];
|
|
92
|
+
protected get weekNumber(): boolean;
|
|
93
|
+
protected get take(): number;
|
|
94
|
+
protected get animate(): boolean;
|
|
95
|
+
protected get todayIsInRange(): boolean;
|
|
96
96
|
constructor(props: ViewListProps);
|
|
97
97
|
componentDidUpdate(_prevProps: ViewListProps, _prevState: ViewListState): void;
|
|
98
98
|
focusActiveDate: () => void;
|
|
99
99
|
blurActiveDate: () => void;
|
|
100
100
|
render(): JSX.Element;
|
|
101
|
-
protected handleVirtualizationMount: (virtualization:
|
|
102
|
-
protected buildMonthView: (cols: any, weekNames: any) => JSX.Element;
|
|
103
|
-
protected buildDates: (cols: any, dates: Date[]) => JSX.Element;
|
|
101
|
+
protected handleVirtualizationMount: (virtualization: Virtualization) => void;
|
|
102
|
+
protected buildMonthView: (cols: any[], weekNames: any[]) => JSX.Element;
|
|
103
|
+
protected buildDates: (cols: any[], dates: Date[]) => JSX.Element;
|
|
104
104
|
protected calculateHeights: () => void;
|
|
105
105
|
protected getTake: (skip: number, total: number) => number;
|
|
106
106
|
private handleScrollAction;
|
|
@@ -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.ViewList = void 0;
|
|
16
19
|
var React = require("react");
|
|
17
20
|
var PropTypes = require("prop-types");
|
|
18
21
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
@@ -32,6 +35,14 @@ var ViewList = /** @class */ (function (_super) {
|
|
|
32
35
|
__extends(ViewList, _super);
|
|
33
36
|
function ViewList(props) {
|
|
34
37
|
var _this = _super.call(this, props) || this;
|
|
38
|
+
_this.virtualization = null;
|
|
39
|
+
_this.calendarView = null;
|
|
40
|
+
_this.table = null;
|
|
41
|
+
_this.intl = null;
|
|
42
|
+
_this.bottomOffset = 0;
|
|
43
|
+
_this.viewOffset = 0;
|
|
44
|
+
_this.viewHeight = 0;
|
|
45
|
+
_this._element = null;
|
|
35
46
|
_this.isActive = false;
|
|
36
47
|
_this.animateToIndex = true;
|
|
37
48
|
_this.shouldScroll = false;
|
|
@@ -62,8 +73,8 @@ var ViewList = /** @class */ (function (_super) {
|
|
|
62
73
|
_this.handleVirtualizationMount = function (virtualization) {
|
|
63
74
|
_this.virtualization = virtualization;
|
|
64
75
|
if (_this.virtualization && _this.table) {
|
|
65
|
-
_this.table.style.transform = "translateY("
|
|
66
|
-
var viewDate = utils_1.dateInRange(_this.props.focusedDate, _this.props.min, _this.props.max);
|
|
76
|
+
_this.table.style.transform = "translateY(".concat(_this.viewOffset, "px)");
|
|
77
|
+
var viewDate = (0, utils_1.dateInRange)(_this.props.focusedDate, _this.props.min, _this.props.max);
|
|
67
78
|
var indexToScroll = _this.props.service.skip(viewDate, _this.props.min);
|
|
68
79
|
_this.virtualization.scrollToIndex(indexToScroll);
|
|
69
80
|
}
|
|
@@ -103,7 +114,7 @@ var ViewList = /** @class */ (function (_super) {
|
|
|
103
114
|
_this.setState({ index: index, skip: skip });
|
|
104
115
|
}
|
|
105
116
|
if (_this.table && scrollAction) {
|
|
106
|
-
var translate = "translateY("
|
|
117
|
+
var translate = "translateY(".concat(scrollAction.offset, "px)");
|
|
107
118
|
_this.table.style.transform = translate;
|
|
108
119
|
}
|
|
109
120
|
};
|
|
@@ -118,7 +129,7 @@ var ViewList = /** @class */ (function (_super) {
|
|
|
118
129
|
var args = {
|
|
119
130
|
syntheticEvent: event.syntheticEvent,
|
|
120
131
|
nativeEvent: event.nativeEvent,
|
|
121
|
-
value: kendo_date_math_1.cloneDate(event.value),
|
|
132
|
+
value: (0, kendo_date_math_1.cloneDate)(event.value),
|
|
122
133
|
target: _this,
|
|
123
134
|
isTodayClick: isTodayClick
|
|
124
135
|
};
|
|
@@ -137,44 +148,44 @@ var ViewList = /** @class */ (function (_super) {
|
|
|
137
148
|
get: function () {
|
|
138
149
|
return this._element;
|
|
139
150
|
},
|
|
140
|
-
enumerable:
|
|
151
|
+
enumerable: false,
|
|
141
152
|
configurable: true
|
|
142
153
|
});
|
|
143
154
|
Object.defineProperty(ViewList.prototype, "weekNames", {
|
|
144
155
|
get: function () {
|
|
145
|
-
this.intl = kendo_react_intl_1.provideIntlService(this);
|
|
146
|
-
var weekNames = utils_1.shiftWeekNames(this.intl.dateFormatNames({ nameType: 'short', type: 'days' }), this.intl.firstDay());
|
|
156
|
+
this.intl = (0, kendo_react_intl_1.provideIntlService)(this);
|
|
157
|
+
var weekNames = (0, utils_1.shiftWeekNames)(this.intl.dateFormatNames({ nameType: 'short', type: 'days' }), this.intl.firstDay());
|
|
147
158
|
return this.weekNumber ? [''].concat(weekNames) : weekNames;
|
|
148
159
|
},
|
|
149
|
-
enumerable:
|
|
160
|
+
enumerable: false,
|
|
150
161
|
configurable: true
|
|
151
162
|
});
|
|
152
163
|
Object.defineProperty(ViewList.prototype, "weekNumber", {
|
|
153
164
|
get: function () {
|
|
154
165
|
return Boolean(this.props.showWeekNumbers && this.props.activeView === models_1.CalendarViewEnum.month);
|
|
155
166
|
},
|
|
156
|
-
enumerable:
|
|
167
|
+
enumerable: false,
|
|
157
168
|
configurable: true
|
|
158
169
|
});
|
|
159
170
|
Object.defineProperty(ViewList.prototype, "take", {
|
|
160
171
|
get: function () {
|
|
161
172
|
return this.props.take !== undefined ? this.props.take : ViewList.defaultProps.take;
|
|
162
173
|
},
|
|
163
|
-
enumerable:
|
|
174
|
+
enumerable: false,
|
|
164
175
|
configurable: true
|
|
165
176
|
});
|
|
166
177
|
Object.defineProperty(ViewList.prototype, "animate", {
|
|
167
178
|
get: function () {
|
|
168
179
|
return Boolean(this.props.smoothScroll && this.animateToIndex);
|
|
169
180
|
},
|
|
170
|
-
enumerable:
|
|
181
|
+
enumerable: false,
|
|
171
182
|
configurable: true
|
|
172
183
|
});
|
|
173
184
|
Object.defineProperty(ViewList.prototype, "todayIsInRange", {
|
|
174
185
|
get: function () {
|
|
175
|
-
return utils_1.isInRange(utils_1.getToday(), kendo_date_math_1.getDate(this.props.min), kendo_date_math_1.getDate(this.props.max));
|
|
186
|
+
return (0, utils_1.isInRange)((0, utils_1.getToday)(), (0, kendo_date_math_1.getDate)(this.props.min), (0, kendo_date_math_1.getDate)(this.props.max));
|
|
176
187
|
},
|
|
177
|
-
enumerable:
|
|
188
|
+
enumerable: false,
|
|
178
189
|
configurable: true
|
|
179
190
|
});
|
|
180
191
|
ViewList.prototype.componentDidUpdate = function (_prevProps, _prevState) {
|
|
@@ -193,7 +204,7 @@ var ViewList = /** @class */ (function (_super) {
|
|
|
193
204
|
var _this = this;
|
|
194
205
|
this.calculateHeights();
|
|
195
206
|
var didViewChange = this.lastView !== this.props.activeView;
|
|
196
|
-
var focusedDate = utils_1.dateInRange(this.props.focusedDate, this.props.min, this.props.max);
|
|
207
|
+
var focusedDate = (0, utils_1.dateInRange)(this.props.focusedDate, this.props.min, this.props.max);
|
|
197
208
|
var skip = !didViewChange ? this.state.skip : this.props.service.skip(focusedDate, this.props.min);
|
|
198
209
|
var total = this.props.service.total(this.props.min, this.props.max);
|
|
199
210
|
var take = this.getTake(skip, total);
|
|
@@ -203,13 +214,13 @@ var ViewList = /** @class */ (function (_super) {
|
|
|
203
214
|
var didViewChanged = this.props.activeView !== this.lastView;
|
|
204
215
|
this.animateToIndex = !didViewChanged;
|
|
205
216
|
if (didViewChanged
|
|
206
|
-
|| !kendo_date_math_1.isEqualDate(this.lastFocus, focusedDate)
|
|
217
|
+
|| !(0, kendo_date_math_1.isEqualDate)(this.lastFocus, focusedDate)
|
|
207
218
|
|| this.shouldScroll
|
|
208
219
|
|| (!this.props.shouldScroll || this.props.shouldScroll())) {
|
|
209
220
|
this.indexToScroll = this.props.service.skip(focusedDate, this.props.min);
|
|
210
221
|
}
|
|
211
222
|
this.lastFocus = focusedDate;
|
|
212
|
-
var rootClassNames = kendo_react_common_1.classNames('k-calendar-view k-vstack', {
|
|
223
|
+
var rootClassNames = (0, kendo_react_common_1.classNames)('k-calendar-view k-vstack', {
|
|
213
224
|
'k-calendar-monthview': this.props.activeView === models_1.CalendarViewEnum.month,
|
|
214
225
|
'k-calendar-yearview': this.props.activeView === models_1.CalendarViewEnum.year,
|
|
215
226
|
'k-calendar-decadeview': this.props.activeView === models_1.CalendarViewEnum.decade,
|
|
@@ -246,4 +257,4 @@ var ViewList = /** @class */ (function (_super) {
|
|
|
246
257
|
return ViewList;
|
|
247
258
|
}(React.Component));
|
|
248
259
|
exports.ViewList = ViewList;
|
|
249
|
-
kendo_react_intl_1.registerForIntl(ViewList);
|
|
260
|
+
(0, kendo_react_intl_1.registerForIntl)(ViewList);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EMPTY_SELECTIONRANGE = exports.CalendarViewEnum = exports.Action = void 0;
|
|
3
4
|
var NavigationAction_1 = require("./NavigationAction");
|
|
4
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return NavigationAction_1.Action; } });
|
|
5
6
|
var CalendarViewEnum_1 = require("./CalendarViewEnum");
|
|
6
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "CalendarViewEnum", { enumerable: true, get: function () { return CalendarViewEnum_1.CalendarViewEnum; } });
|
|
7
8
|
var SelectionRange_1 = require("./SelectionRange");
|
|
8
|
-
exports
|
|
9
|
+
Object.defineProperty(exports, "EMPTY_SELECTIONRANGE", { enumerable: true, get: function () { return SelectionRange_1.EMPTY_SELECTIONRANGE; } });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.BusViewService = void 0;
|
|
4
5
|
var CenturyViewService_1 = require("./CenturyViewService");
|
|
5
6
|
var DecadeViewService_1 = require("./DecadeViewService");
|
|
6
7
|
var MonthViewService_1 = require("./MonthViewService");
|
|
@@ -30,7 +31,7 @@ var BusViewService = /** @class */ (function () {
|
|
|
30
31
|
this.top = top;
|
|
31
32
|
};
|
|
32
33
|
BusViewService.prototype.service = function (view, intl) {
|
|
33
|
-
return new services[""
|
|
34
|
+
return new services["".concat(view)](intl);
|
|
34
35
|
};
|
|
35
36
|
BusViewService.prototype.moveDown = function (view, event) {
|
|
36
37
|
this.move(view, -1, event);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CenturyViewService = void 0;
|
|
4
5
|
/* tslint:disable:object-literal-sort-keys */
|
|
5
6
|
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
6
7
|
var models_1 = require("../models");
|
|
@@ -9,14 +10,14 @@ var EMPTY_DATA = [[]];
|
|
|
9
10
|
var CELLS_LENGTH = 4;
|
|
10
11
|
var ROWS_LENGTH = 3;
|
|
11
12
|
var ACTIONS = (_a = {},
|
|
12
|
-
_a[models_1.Action.Left] = function (date) { return kendo_date_math_1.addDecades(date, -1); },
|
|
13
|
-
_a[models_1.Action.Up] = function (date) { return kendo_date_math_1.addDecades(date, -5); },
|
|
14
|
-
_a[models_1.Action.Right] = function (date) { return kendo_date_math_1.addDecades(date, 1); },
|
|
15
|
-
_a[models_1.Action.Down] = function (date) { return kendo_date_math_1.addDecades(date, 5); },
|
|
16
|
-
_a[models_1.Action.PrevView] = function (date) { return kendo_date_math_1.addCenturies(date, -1); },
|
|
17
|
-
_a[models_1.Action.NextView] = function (date) { return kendo_date_math_1.addCenturies(date, 1); },
|
|
18
|
-
_a[models_1.Action.FirstInView] = function (date) { return kendo_date_math_1.firstDecadeOfCentury(date); },
|
|
19
|
-
_a[models_1.Action.LastInView] = function (date) { return kendo_date_math_1.lastDecadeOfCentury(date); },
|
|
13
|
+
_a[models_1.Action.Left] = function (date) { return (0, kendo_date_math_1.addDecades)(date, -1); },
|
|
14
|
+
_a[models_1.Action.Up] = function (date) { return (0, kendo_date_math_1.addDecades)(date, -5); },
|
|
15
|
+
_a[models_1.Action.Right] = function (date) { return (0, kendo_date_math_1.addDecades)(date, 1); },
|
|
16
|
+
_a[models_1.Action.Down] = function (date) { return (0, kendo_date_math_1.addDecades)(date, 5); },
|
|
17
|
+
_a[models_1.Action.PrevView] = function (date) { return (0, kendo_date_math_1.addCenturies)(date, -1); },
|
|
18
|
+
_a[models_1.Action.NextView] = function (date) { return (0, kendo_date_math_1.addCenturies)(date, 1); },
|
|
19
|
+
_a[models_1.Action.FirstInView] = function (date) { return (0, kendo_date_math_1.firstDecadeOfCentury)(date); },
|
|
20
|
+
_a[models_1.Action.LastInView] = function (date) { return (0, kendo_date_math_1.lastDecadeOfCentury)(date); },
|
|
20
21
|
_a);
|
|
21
22
|
/**
|
|
22
23
|
* @hidden
|
|
@@ -25,10 +26,10 @@ var CenturyViewService = /** @class */ (function () {
|
|
|
25
26
|
function CenturyViewService() {
|
|
26
27
|
}
|
|
27
28
|
CenturyViewService.prototype.addToDate = function (min, skip) {
|
|
28
|
-
return kendo_date_math_1.addCenturies(min, skip);
|
|
29
|
+
return (0, kendo_date_math_1.addCenturies)(min, skip);
|
|
29
30
|
};
|
|
30
31
|
CenturyViewService.prototype.datesList = function (start, count) {
|
|
31
|
-
return utils_1.range(0, count).map(function (i) { return kendo_date_math_1.addCenturies(start, i); });
|
|
32
|
+
return (0, utils_1.range)(0, count).map(function (i) { return (0, kendo_date_math_1.addCenturies)(start, i); });
|
|
32
33
|
};
|
|
33
34
|
CenturyViewService.prototype.data = function (options) {
|
|
34
35
|
var _this = this;
|
|
@@ -36,28 +37,28 @@ var CenturyViewService = /** @class */ (function () {
|
|
|
36
37
|
if (!viewDate) {
|
|
37
38
|
return EMPTY_DATA;
|
|
38
39
|
}
|
|
39
|
-
var cells = utils_1.range(0, CELLS_LENGTH);
|
|
40
|
-
var firstDate = kendo_date_math_1.firstDecadeOfCentury(viewDate);
|
|
41
|
-
var lastDate = kendo_date_math_1.lastDecadeOfCentury(viewDate);
|
|
42
|
-
var today = utils_1.getToday();
|
|
43
|
-
return utils_1.range(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
44
|
-
var baseDate = kendo_date_math_1.addDecades(firstDate, rowOffset * CELLS_LENGTH);
|
|
40
|
+
var cells = (0, utils_1.range)(0, CELLS_LENGTH);
|
|
41
|
+
var firstDate = (0, kendo_date_math_1.firstDecadeOfCentury)(viewDate);
|
|
42
|
+
var lastDate = (0, kendo_date_math_1.lastDecadeOfCentury)(viewDate);
|
|
43
|
+
var today = (0, utils_1.getToday)();
|
|
44
|
+
return (0, utils_1.range)(0, ROWS_LENGTH).map(function (rowOffset) {
|
|
45
|
+
var baseDate = (0, kendo_date_math_1.addDecades)(firstDate, rowOffset * CELLS_LENGTH);
|
|
45
46
|
return cells.map(function (cellOffset) {
|
|
46
|
-
var cellDate = _this.normalize(kendo_date_math_1.addDecades(baseDate, cellOffset), min, max);
|
|
47
|
+
var cellDate = _this.normalize((0, kendo_date_math_1.addDecades)(baseDate, cellOffset), min, max);
|
|
47
48
|
var isRangeStart = _this.isEqual(cellDate, selectionRange.start);
|
|
48
49
|
var isRangeEnd = _this.isEqual(cellDate, selectionRange.end);
|
|
49
50
|
var isInMiddle = !isRangeStart && !isRangeEnd;
|
|
50
|
-
var isRangeMid = isInMiddle && utils_1.isInSelectionRange(cellDate, selectionRange);
|
|
51
|
+
var isRangeMid = isInMiddle && (0, utils_1.isInSelectionRange)(cellDate, selectionRange);
|
|
51
52
|
var isSelected = isActiveView && (!Array.isArray(selectedDate)
|
|
52
|
-
? utils_1.isInRange(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
53
|
+
? (0, utils_1.isInRange)(selectedDate, min, max) && _this.isEqual(cellDate, selectedDate)
|
|
53
54
|
: _this.isSelectedFromArray(cellDate, selectedDate, min, max));
|
|
54
|
-
return utils_1.intersects(cellDate, firstDate, lastDate) ? ({
|
|
55
|
+
return (0, utils_1.intersects)(cellDate, firstDate, lastDate) ? ({
|
|
55
56
|
formattedValue: _this.value(cellDate),
|
|
56
|
-
id: ""
|
|
57
|
+
id: "".concat(cellUID).concat(cellDate.getTime()),
|
|
57
58
|
isFocused: _this.isEqual(cellDate, focusedDate),
|
|
58
59
|
isSelected: isSelected,
|
|
59
60
|
isWeekend: false,
|
|
60
|
-
isInRange: utils_1.isInRange(cellDate, min, max),
|
|
61
|
+
isInRange: (0, utils_1.isInRange)(cellDate, min, max),
|
|
61
62
|
isRangeStart: isRangeStart,
|
|
62
63
|
isRangeMid: isRangeMid,
|
|
63
64
|
isRangeEnd: isRangeEnd,
|
|
@@ -74,7 +75,7 @@ var CenturyViewService = /** @class */ (function () {
|
|
|
74
75
|
var _this = this;
|
|
75
76
|
var result = false;
|
|
76
77
|
dates.forEach(function (date) {
|
|
77
|
-
if (utils_1.isInRange(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
78
|
+
if ((0, utils_1.isInRange)(candidate, min, max) && _this.isEqual(candidate, date)) {
|
|
78
79
|
result = true;
|
|
79
80
|
}
|
|
80
81
|
});
|
|
@@ -85,7 +86,7 @@ var CenturyViewService = /** @class */ (function () {
|
|
|
85
86
|
return false;
|
|
86
87
|
}
|
|
87
88
|
// TODO: double-check this!
|
|
88
|
-
return kendo_date_math_1.firstYearOfDecade(candidate).getFullYear() === kendo_date_math_1.firstYearOfDecade(expected).getFullYear();
|
|
89
|
+
return (0, kendo_date_math_1.firstYearOfDecade)(candidate).getFullYear() === (0, kendo_date_math_1.firstYearOfDecade)(expected).getFullYear();
|
|
89
90
|
};
|
|
90
91
|
CenturyViewService.prototype.isInArray = function (date, dates) {
|
|
91
92
|
if (!dates.length) {
|
|
@@ -95,13 +96,13 @@ var CenturyViewService = /** @class */ (function () {
|
|
|
95
96
|
return dates[0].getFullYear() <= year && year <= (dates[dates.length - 1].getFullYear() + 99);
|
|
96
97
|
};
|
|
97
98
|
CenturyViewService.prototype.isInRange = function (candidate, min, max) {
|
|
98
|
-
var year = kendo_date_math_1.firstYearOfDecade(candidate).getFullYear();
|
|
99
|
-
var aboveMin = !min || kendo_date_math_1.firstYearOfDecade(min).getFullYear() <= year;
|
|
100
|
-
var belowMax = !max || year <= kendo_date_math_1.firstYearOfDecade(max).getFullYear();
|
|
99
|
+
var year = (0, kendo_date_math_1.firstYearOfDecade)(candidate).getFullYear();
|
|
100
|
+
var aboveMin = !min || (0, kendo_date_math_1.firstYearOfDecade)(min).getFullYear() <= year;
|
|
101
|
+
var belowMax = !max || year <= (0, kendo_date_math_1.firstYearOfDecade)(max).getFullYear();
|
|
101
102
|
return aboveMin && belowMax;
|
|
102
103
|
};
|
|
103
104
|
CenturyViewService.prototype.isInSameView = function (candidate, value) {
|
|
104
|
-
return kendo_date_math_1.durationInCenturies(candidate, value) === 0;
|
|
105
|
+
return (0, kendo_date_math_1.durationInCenturies)(candidate, value) === 0;
|
|
105
106
|
};
|
|
106
107
|
CenturyViewService.prototype.isRangeStart = function (value) {
|
|
107
108
|
return value.getFullYear() % 1000 === 0;
|
|
@@ -114,40 +115,40 @@ var CenturyViewService = /** @class */ (function () {
|
|
|
114
115
|
return modifier(value);
|
|
115
116
|
};
|
|
116
117
|
CenturyViewService.prototype.cellTitle = function (value) {
|
|
117
|
-
return kendo_date_math_1.firstYearOfDecade(value).getFullYear().toString();
|
|
118
|
+
return (0, kendo_date_math_1.firstYearOfDecade)(value).getFullYear().toString();
|
|
118
119
|
};
|
|
119
120
|
CenturyViewService.prototype.navigationTitle = function (value) {
|
|
120
|
-
return value ? kendo_date_math_1.firstDecadeOfCentury(value).getFullYear().toString() : '';
|
|
121
|
+
return value ? (0, kendo_date_math_1.firstDecadeOfCentury)(value).getFullYear().toString() : '';
|
|
121
122
|
};
|
|
122
123
|
CenturyViewService.prototype.title = function (value) {
|
|
123
124
|
if (!value) {
|
|
124
125
|
return '';
|
|
125
126
|
}
|
|
126
|
-
return kendo_date_math_1.firstDecadeOfCentury(value).getFullYear()
|
|
127
|
+
return "".concat((0, kendo_date_math_1.firstDecadeOfCentury)(value).getFullYear(), " - ").concat((0, kendo_date_math_1.lastDecadeOfCentury)(value).getFullYear());
|
|
127
128
|
};
|
|
128
129
|
CenturyViewService.prototype.rowLength = function (_) {
|
|
129
130
|
return CELLS_LENGTH;
|
|
130
131
|
};
|
|
131
132
|
CenturyViewService.prototype.skip = function (value, min) {
|
|
132
|
-
return kendo_date_math_1.durationInCenturies(min, value);
|
|
133
|
+
return (0, kendo_date_math_1.durationInCenturies)(min, value);
|
|
133
134
|
};
|
|
134
135
|
CenturyViewService.prototype.total = function (min, max) {
|
|
135
|
-
return kendo_date_math_1.durationInCenturies(min, max) + 1;
|
|
136
|
+
return (0, kendo_date_math_1.durationInCenturies)(min, max) + 1;
|
|
136
137
|
};
|
|
137
138
|
CenturyViewService.prototype.value = function (current) {
|
|
138
|
-
return current ? kendo_date_math_1.firstYearOfDecade(current).getFullYear().toString() : '';
|
|
139
|
+
return current ? (0, kendo_date_math_1.firstYearOfDecade)(current).getFullYear().toString() : '';
|
|
139
140
|
};
|
|
140
141
|
CenturyViewService.prototype.viewDate = function (date, max, border) {
|
|
141
142
|
if (border === void 0) { border = 1; }
|
|
142
|
-
var renderTwoViews = kendo_date_math_1.durationInCenturies(date, max) < border;
|
|
143
|
-
return renderTwoViews ? kendo_date_math_1.addCenturies(date, -1) : date;
|
|
143
|
+
var renderTwoViews = (0, kendo_date_math_1.durationInCenturies)(date, max) < border;
|
|
144
|
+
return renderTwoViews ? (0, kendo_date_math_1.addCenturies)(date, -1) : date;
|
|
144
145
|
};
|
|
145
146
|
CenturyViewService.prototype.normalize = function (cellDate, min, max) {
|
|
146
147
|
if (cellDate < min && this.isEqual(cellDate, min)) {
|
|
147
|
-
return kendo_date_math_1.cloneDate(min);
|
|
148
|
+
return (0, kendo_date_math_1.cloneDate)(min);
|
|
148
149
|
}
|
|
149
150
|
if (cellDate > max && this.isEqual(cellDate, max)) {
|
|
150
|
-
return kendo_date_math_1.cloneDate(max);
|
|
151
|
+
return (0, kendo_date_math_1.cloneDate)(max);
|
|
151
152
|
}
|
|
152
153
|
return cellDate;
|
|
153
154
|
};
|