@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
package/dist/es/utils.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
1
10
|
import { cloneDate, isEqual } from '@progress/kendo-date-math';
|
|
2
11
|
import { getDate } from '@progress/kendo-date-math';
|
|
3
12
|
import { EMPTY_SELECTIONRANGE } from './calendar/models/SelectionRange';
|
|
@@ -26,7 +35,7 @@ export function nullable(subRequirement) {
|
|
|
26
35
|
return null;
|
|
27
36
|
}
|
|
28
37
|
var sub = required ? subRequirement.isRequired : subRequirement;
|
|
29
|
-
return sub.apply(void 0, [props, key]
|
|
38
|
+
return sub.apply(void 0, __spreadArray([props, key], rest, false));
|
|
30
39
|
};
|
|
31
40
|
var fn = check.bind(null, false);
|
|
32
41
|
fn.isRequired = check.bind(null, true);
|
|
@@ -43,6 +43,7 @@ export interface VirtualizationProps {
|
|
|
43
43
|
topOffset: number;
|
|
44
44
|
total: number;
|
|
45
45
|
role?: string;
|
|
46
|
+
children?: React.ReactNode;
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
49
|
* @hidden
|
|
@@ -68,7 +69,7 @@ export declare class Virtualization extends React.Component<VirtualizationProps,
|
|
|
68
69
|
role: PropTypes.Requireable<string>;
|
|
69
70
|
};
|
|
70
71
|
static defaultProps: {
|
|
71
|
-
direction:
|
|
72
|
+
direction: Direction;
|
|
72
73
|
forceScroll: boolean;
|
|
73
74
|
scrollOffsetSize: number;
|
|
74
75
|
maxScrollDifference: number;
|
|
@@ -85,12 +86,12 @@ export declare class Virtualization extends React.Component<VirtualizationProps,
|
|
|
85
86
|
private lastTake;
|
|
86
87
|
private animationInProgress;
|
|
87
88
|
private scrollToIndexTimeout;
|
|
88
|
-
|
|
89
|
-
protected
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
protected
|
|
93
|
-
protected
|
|
89
|
+
get element(): HTMLDivElement | null;
|
|
90
|
+
protected get containerOffsetSize(): number;
|
|
91
|
+
get containerScrollSize(): number;
|
|
92
|
+
get containerScrollPosition(): number;
|
|
93
|
+
protected get direction(): Direction;
|
|
94
|
+
protected get scrollOffsetSize(): number;
|
|
94
95
|
constructor(props: VirtualizationProps);
|
|
95
96
|
activeIndex(): number;
|
|
96
97
|
itemIndex(offset: number): number;
|
|
@@ -108,7 +109,7 @@ export declare class Virtualization extends React.Component<VirtualizationProps,
|
|
|
108
109
|
protected containerMaxScroll: () => number;
|
|
109
110
|
protected getContainerScrollDirection: (indexOffset: number) => ScrollDirection;
|
|
110
111
|
protected initServices: (props?: VirtualizationProps) => void;
|
|
111
|
-
protected getContainerProperty: (propertyName:
|
|
112
|
+
protected getContainerProperty: (propertyName: 'offsetHeight' | 'offsetWidth' | 'scrollHeight' | 'scrollWidth' | 'scrollTop' | 'scrollLeft') => number;
|
|
112
113
|
private handleScroll;
|
|
113
114
|
private handleScrollAction;
|
|
114
115
|
private handlePageAction;
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -47,7 +49,13 @@ var Virtualization = /** @class */ (function (_super) {
|
|
|
47
49
|
__extends(Virtualization, _super);
|
|
48
50
|
function Virtualization(props) {
|
|
49
51
|
var _this = _super.call(this, props) || this;
|
|
52
|
+
_this.rowHeightService = null;
|
|
53
|
+
_this.scrollContainer = null;
|
|
54
|
+
_this.lastDirection = null;
|
|
55
|
+
_this.lastTotal = 0;
|
|
56
|
+
_this.lastTake = 0;
|
|
50
57
|
_this.animationInProgress = false;
|
|
58
|
+
_this.scrollToIndexTimeout = 0;
|
|
51
59
|
_this.scrollTo = function (value) {
|
|
52
60
|
var scrollProperty = _this.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
|
|
53
61
|
if (!_this.scrollContainer) {
|
|
@@ -64,7 +72,9 @@ var Virtualization = /** @class */ (function (_super) {
|
|
|
64
72
|
}
|
|
65
73
|
_this.scrollToIndexTimeout = window.requestAnimationFrame(function () {
|
|
66
74
|
_this.animationInProgress = false;
|
|
67
|
-
|
|
75
|
+
if (_this.rowHeightService) {
|
|
76
|
+
_this.scrollTo(_this.rowHeightService.offset(index));
|
|
77
|
+
}
|
|
68
78
|
});
|
|
69
79
|
};
|
|
70
80
|
_this.animateToIndex = function (index) {
|
|
@@ -104,12 +114,12 @@ var Virtualization = /** @class */ (function (_super) {
|
|
|
104
114
|
};
|
|
105
115
|
_this.scrollRange = function (indexOffset, direction) {
|
|
106
116
|
var containerScroll = _this.containerScrollPosition;
|
|
107
|
-
if (parseInt(""
|
|
117
|
+
if (parseInt("".concat(indexOffset), 10) === parseInt("".concat(containerScroll), 10)) {
|
|
108
118
|
return { start: indexOffset, end: indexOffset };
|
|
109
119
|
}
|
|
110
120
|
var maxScroll = _this.containerMaxScroll();
|
|
111
121
|
var sign = direction === ScrollDirection.Backward ? 1 : -1;
|
|
112
|
-
var difference = differenceToScroll(containerScroll, indexOffset, _this.props.maxScrollDifference);
|
|
122
|
+
var difference = differenceToScroll(containerScroll, indexOffset, _this.props.maxScrollDifference || 0);
|
|
113
123
|
var end = Math.min(indexOffset, maxScroll);
|
|
114
124
|
var start = Math.min(Math.max(end + (sign * difference), 0), maxScroll);
|
|
115
125
|
return { start: start, end: end };
|
|
@@ -177,35 +187,35 @@ var Virtualization = /** @class */ (function (_super) {
|
|
|
177
187
|
get: function () {
|
|
178
188
|
return this.scrollContainer;
|
|
179
189
|
},
|
|
180
|
-
enumerable:
|
|
190
|
+
enumerable: false,
|
|
181
191
|
configurable: true
|
|
182
192
|
});
|
|
183
193
|
Object.defineProperty(Virtualization.prototype, "containerOffsetSize", {
|
|
184
194
|
get: function () {
|
|
185
195
|
return this.getContainerProperty(this.direction === 'vertical' ? 'offsetHeight' : 'offsetWidth');
|
|
186
196
|
},
|
|
187
|
-
enumerable:
|
|
197
|
+
enumerable: false,
|
|
188
198
|
configurable: true
|
|
189
199
|
});
|
|
190
200
|
Object.defineProperty(Virtualization.prototype, "containerScrollSize", {
|
|
191
201
|
get: function () {
|
|
192
202
|
return this.getContainerProperty(this.direction === 'vertical' ? 'scrollHeight' : 'scrollWidth');
|
|
193
203
|
},
|
|
194
|
-
enumerable:
|
|
204
|
+
enumerable: false,
|
|
195
205
|
configurable: true
|
|
196
206
|
});
|
|
197
207
|
Object.defineProperty(Virtualization.prototype, "containerScrollPosition", {
|
|
198
208
|
get: function () {
|
|
199
209
|
return this.getContainerProperty(this.direction === 'vertical' ? 'scrollTop' : 'scrollLeft');
|
|
200
210
|
},
|
|
201
|
-
enumerable:
|
|
211
|
+
enumerable: false,
|
|
202
212
|
configurable: true
|
|
203
213
|
});
|
|
204
214
|
Object.defineProperty(Virtualization.prototype, "direction", {
|
|
205
215
|
get: function () {
|
|
206
216
|
return this.props.direction !== undefined ? this.props.direction : Virtualization.defaultProps.direction;
|
|
207
217
|
},
|
|
208
|
-
enumerable:
|
|
218
|
+
enumerable: false,
|
|
209
219
|
configurable: true
|
|
210
220
|
});
|
|
211
221
|
Object.defineProperty(Virtualization.prototype, "scrollOffsetSize", {
|
|
@@ -213,7 +223,7 @@ var Virtualization = /** @class */ (function (_super) {
|
|
|
213
223
|
return this.props.scrollOffsetSize !== undefined
|
|
214
224
|
? this.props.scrollOffsetSize : Virtualization.defaultProps.scrollOffsetSize;
|
|
215
225
|
},
|
|
216
|
-
enumerable:
|
|
226
|
+
enumerable: false,
|
|
217
227
|
configurable: true
|
|
218
228
|
});
|
|
219
229
|
Virtualization.prototype.activeIndex = function () {
|
|
@@ -263,10 +273,10 @@ var Virtualization = /** @class */ (function (_super) {
|
|
|
263
273
|
this.lastDirection = this.direction;
|
|
264
274
|
this.lastTake = this.props.take;
|
|
265
275
|
}
|
|
266
|
-
var vertexLength = ""
|
|
276
|
+
var vertexLength = "".concat((this.rowHeightService ? this.rowHeightService.totalHeight() : 0) + this.props.bottomOffset);
|
|
267
277
|
var placeholderStyle = this.direction === 'vertical'
|
|
268
|
-
? { height: vertexLength
|
|
269
|
-
: { width: vertexLength
|
|
278
|
+
? { height: "".concat(vertexLength, "px") }
|
|
279
|
+
: { width: "".concat(vertexLength, "px") };
|
|
270
280
|
var rootClassNames = classNames('k-content k-calendar-content k-scrollable', {
|
|
271
281
|
'k-scrollable-horizontal': this.direction === 'horizontal'
|
|
272
282
|
}, this.props.className);
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
1
10
|
/**
|
|
2
11
|
* @hidden
|
|
3
12
|
*/
|
|
4
|
-
var update = function (arr, idx, value) { return (arr.slice(0, idx + 1)
|
|
13
|
+
var update = function (arr, idx, value) { return (__spreadArray(__spreadArray([], arr.slice(0, idx + 1), true), (arr.slice(idx + 1).map(function (x) { return x + value; })), true)); };
|
|
5
14
|
/**
|
|
6
15
|
* @hidden
|
|
7
16
|
*/
|
|
@@ -26,7 +26,13 @@ var ScrollerService = /** @class */ (function () {
|
|
|
26
26
|
function ScrollerService(onScrollAction, onPageAction) {
|
|
27
27
|
this.onScrollAction = onScrollAction;
|
|
28
28
|
this.onPageAction = onPageAction;
|
|
29
|
+
this.direction = 'vertical';
|
|
29
30
|
this.firstLoaded = 0;
|
|
31
|
+
this.lastLoaded = 0;
|
|
32
|
+
this.lastScrollTop = 0;
|
|
33
|
+
this.take = 0;
|
|
34
|
+
this.total = 0;
|
|
35
|
+
this.rowHeightService = null;
|
|
30
36
|
this.bottomOffset = 0;
|
|
31
37
|
this.topOffset = 0;
|
|
32
38
|
}
|
|
@@ -52,7 +58,7 @@ var ScrollerService = /** @class */ (function () {
|
|
|
52
58
|
var scrollLeft = _a.scrollLeft, scrollTop = _a.scrollTop, offsetHeight = _a.offsetHeight, offsetWidth = _a.offsetWidth;
|
|
53
59
|
var scrollPosition = this.direction === 'vertical' ? scrollTop : scrollLeft;
|
|
54
60
|
var offsetSize = this.direction === 'vertical' ? offsetHeight : offsetWidth;
|
|
55
|
-
if (this.lastScrollTop === scrollPosition) {
|
|
61
|
+
if (this.lastScrollTop === scrollPosition || !this.rowHeightService) {
|
|
56
62
|
return;
|
|
57
63
|
}
|
|
58
64
|
var up = this.lastScrollTop >= scrollPosition;
|
|
@@ -74,10 +80,10 @@ var ScrollerService = /** @class */ (function () {
|
|
|
74
80
|
}
|
|
75
81
|
};
|
|
76
82
|
ScrollerService.prototype.rowOffset = function (index) {
|
|
77
|
-
return this.rowHeightService.offset(index) + this.topOffset;
|
|
83
|
+
return this.rowHeightService ? this.rowHeightService.offset(index) + this.topOffset : 0;
|
|
78
84
|
};
|
|
79
85
|
ScrollerService.prototype.rowsForHeight = function (height) {
|
|
80
|
-
return Math.ceil(height / this.rowHeightService.height(0));
|
|
86
|
+
return this.rowHeightService ? Math.ceil(height / this.rowHeightService.height(0)) : 0;
|
|
81
87
|
};
|
|
82
88
|
return ScrollerService;
|
|
83
89
|
}());
|
|
@@ -80,8 +80,8 @@ export declare class CalendarWithoutContext extends React.Component<CalendarProp
|
|
|
80
80
|
tabIndex: PropTypes.Requireable<number>;
|
|
81
81
|
value: PropTypes.Requireable<Date>;
|
|
82
82
|
weekNumber: PropTypes.Requireable<boolean>;
|
|
83
|
-
topView: (props: CalendarProps
|
|
84
|
-
bottomView: (props: CalendarProps
|
|
83
|
+
topView: (props: CalendarProps, propName: keyof CalendarProps<any>, componentName: string) => Error | null;
|
|
84
|
+
bottomView: (props: CalendarProps, propName: keyof CalendarProps<any>, componentName: string) => Error | null;
|
|
85
85
|
};
|
|
86
86
|
/**
|
|
87
87
|
* @hidden
|
|
@@ -92,13 +92,13 @@ export declare class CalendarWithoutContext extends React.Component<CalendarProp
|
|
|
92
92
|
max: Date;
|
|
93
93
|
navigation: boolean;
|
|
94
94
|
defaultActiveView: ActiveView;
|
|
95
|
-
defaultValue:
|
|
95
|
+
defaultValue: null;
|
|
96
96
|
smoothScroll: boolean;
|
|
97
97
|
topView: ActiveView;
|
|
98
98
|
bottomView: ActiveView;
|
|
99
99
|
};
|
|
100
100
|
protected dom: DOMService;
|
|
101
|
-
protected scrollSyncService: ScrollSyncService;
|
|
101
|
+
protected scrollSyncService: ScrollSyncService | null;
|
|
102
102
|
private valueDuringOnChange?;
|
|
103
103
|
private focusedDate;
|
|
104
104
|
private cellUID;
|
|
@@ -116,15 +116,15 @@ export declare class CalendarWithoutContext extends React.Component<CalendarProp
|
|
|
116
116
|
/**
|
|
117
117
|
* Gets the wrapping element of the Calendar.
|
|
118
118
|
*/
|
|
119
|
-
|
|
119
|
+
get element(): HTMLDivElement | null;
|
|
120
120
|
/**
|
|
121
121
|
* Gets the value of the Calendar.
|
|
122
122
|
*/
|
|
123
|
-
|
|
124
|
-
protected
|
|
125
|
-
protected
|
|
126
|
-
protected
|
|
127
|
-
protected
|
|
123
|
+
get value(): Date | null;
|
|
124
|
+
protected get min(): Date;
|
|
125
|
+
protected get max(): Date;
|
|
126
|
+
protected get bottomView(): CalendarViewEnum;
|
|
127
|
+
protected get topView(): CalendarViewEnum;
|
|
128
128
|
constructor(props: CalendarProps);
|
|
129
129
|
/**
|
|
130
130
|
* @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.Calendar = exports.CalendarPropsContext = exports.CalendarWithoutContext = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
@@ -41,10 +44,10 @@ var calculateValue = function (min, max, stateValue, propValue) {
|
|
|
41
44
|
if (min === void 0) { min = CalendarWithoutContext.defaultProps.min; }
|
|
42
45
|
if (max === void 0) { max = CalendarWithoutContext.defaultProps.max; }
|
|
43
46
|
return propValue !== undefined
|
|
44
|
-
? propValue !== null && utils_1.isInRange(kendo_date_math_1.getDate(propValue), min, max)
|
|
47
|
+
? propValue !== null && (0, utils_1.isInRange)((0, kendo_date_math_1.getDate)(propValue), min, max)
|
|
45
48
|
? propValue
|
|
46
49
|
: null
|
|
47
|
-
: stateValue !== null && utils_1.isInRange(kendo_date_math_1.getDate(stateValue), min, max)
|
|
50
|
+
: stateValue !== null && (0, utils_1.isInRange)((0, kendo_date_math_1.getDate)(stateValue), min, max)
|
|
48
51
|
? stateValue
|
|
49
52
|
: null;
|
|
50
53
|
};
|
|
@@ -53,8 +56,15 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
53
56
|
__extends(CalendarWithoutContext, _super);
|
|
54
57
|
function CalendarWithoutContext(props) {
|
|
55
58
|
var _this = _super.call(this, props) || this;
|
|
56
|
-
_this.
|
|
57
|
-
_this.
|
|
59
|
+
_this.scrollSyncService = null;
|
|
60
|
+
_this.focusedDate = null;
|
|
61
|
+
_this.cellUID = (0, kendo_react_common_1.guid)();
|
|
62
|
+
_this.id = (0, kendo_react_common_1.guid)();
|
|
63
|
+
_this.Navigation = null;
|
|
64
|
+
_this.calendarViewList = null;
|
|
65
|
+
_this._element = null;
|
|
66
|
+
_this.intl = null;
|
|
67
|
+
_this.service = null;
|
|
58
68
|
_this.isActive = false;
|
|
59
69
|
_this.didNavigationChange = false;
|
|
60
70
|
/**
|
|
@@ -77,17 +87,19 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
77
87
|
return;
|
|
78
88
|
}
|
|
79
89
|
_this.didNavigationChange = true;
|
|
80
|
-
var focusedDate = kendo_date_math_1.cloneDate(event.value);
|
|
90
|
+
var focusedDate = (0, kendo_date_math_1.cloneDate)(event.value);
|
|
81
91
|
_this.setState({ focusedDate: focusedDate });
|
|
82
92
|
};
|
|
83
93
|
_this.handleViewChange = function (_a) {
|
|
84
94
|
var view = _a.view;
|
|
85
|
-
_this.scrollSyncService
|
|
95
|
+
if (_this.scrollSyncService) {
|
|
96
|
+
_this.scrollSyncService.configure(view);
|
|
97
|
+
}
|
|
86
98
|
_this.setState({ activeView: view });
|
|
87
99
|
};
|
|
88
100
|
_this.handleDateChange = function (event) {
|
|
89
|
-
var value = kendo_date_math_1.cloneDate(event.value);
|
|
90
|
-
var focusedDate = kendo_date_math_1.cloneDate(event.value);
|
|
101
|
+
var value = (0, kendo_date_math_1.cloneDate)(event.value);
|
|
102
|
+
var focusedDate = (0, kendo_date_math_1.cloneDate)(event.value);
|
|
91
103
|
var canNavigateDown = _this.bus.canMoveDown(_this.state.activeView);
|
|
92
104
|
if (_this.props.disabled) {
|
|
93
105
|
return;
|
|
@@ -140,10 +152,13 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
140
152
|
};
|
|
141
153
|
_this.handleKeyDown = function (event) {
|
|
142
154
|
var keyCode = event.keyCode;
|
|
155
|
+
if (!_this.focusedDate || !_this.service) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
143
158
|
if (keyCode === kendo_react_common_1.Keys.enter) {
|
|
144
159
|
if (_this.value !== null
|
|
145
|
-
&& kendo_date_math_1.isEqualDate(_this.focusedDate, _this.value)) {
|
|
146
|
-
var viewDate = utils_1.dateInRange(_this.focusedDate, _this.min, _this.max);
|
|
160
|
+
&& (0, kendo_date_math_1.isEqualDate)(_this.focusedDate, _this.value)) {
|
|
161
|
+
var viewDate = (0, utils_1.dateInRange)(_this.focusedDate, _this.min, _this.max);
|
|
147
162
|
virtualizationProp(_this.calendarViewList).scrollToIndex(_this.service.skip(viewDate, _this.min));
|
|
148
163
|
}
|
|
149
164
|
var args = {
|
|
@@ -152,11 +167,11 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
152
167
|
value: _this.focusedDate,
|
|
153
168
|
target: _this
|
|
154
169
|
};
|
|
155
|
-
_this.handleDateChange
|
|
170
|
+
_this.handleDateChange(args);
|
|
156
171
|
}
|
|
157
172
|
else {
|
|
158
|
-
var candidate = utils_1.dateInRange(_this.navigation.move(_this.focusedDate, _this.navigation.action(event), _this.state.activeView, _this.service, event), _this.min, _this.max);
|
|
159
|
-
if (kendo_date_math_1.isEqualDate(_this.focusedDate, candidate)) {
|
|
173
|
+
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);
|
|
174
|
+
if ((0, kendo_date_math_1.isEqualDate)(_this.focusedDate, candidate)) {
|
|
160
175
|
return;
|
|
161
176
|
}
|
|
162
177
|
_this.setState({ focusedDate: candidate });
|
|
@@ -171,14 +186,14 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
171
186
|
_this._element.focus({ preventScroll: true });
|
|
172
187
|
}
|
|
173
188
|
};
|
|
174
|
-
kendo_react_common_1.validatePackage(package_metadata_1.packageMetadata);
|
|
189
|
+
(0, kendo_react_common_1.validatePackage)(package_metadata_1.packageMetadata);
|
|
175
190
|
var value = calculateValue(_this.min, _this.max, _this.props.defaultValue || CalendarWithoutContext.defaultProps.defaultValue, _this.props.value);
|
|
176
191
|
_this.state = {
|
|
177
192
|
value: value,
|
|
178
|
-
activeView: utils_1.viewInRange(models_1.CalendarViewEnum[props.defaultActiveView], _this.bottomView, _this.topView),
|
|
179
|
-
focusedDate: utils_1.dateInRange(props.focusedDate
|
|
193
|
+
activeView: (0, utils_1.viewInRange)(models_1.CalendarViewEnum[props.defaultActiveView], _this.bottomView, _this.topView),
|
|
194
|
+
focusedDate: (0, utils_1.dateInRange)(props.focusedDate
|
|
180
195
|
|| value
|
|
181
|
-
|| utils_1.getToday(), _this.min, _this.max)
|
|
196
|
+
|| (0, utils_1.getToday)(), _this.min, _this.max)
|
|
182
197
|
};
|
|
183
198
|
_this.dom = new services_1.DOMService();
|
|
184
199
|
_this.bus = new services_1.BusViewService(_this.handleViewChange);
|
|
@@ -193,7 +208,7 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
193
208
|
get: function () {
|
|
194
209
|
return this._element;
|
|
195
210
|
},
|
|
196
|
-
enumerable:
|
|
211
|
+
enumerable: false,
|
|
197
212
|
configurable: true
|
|
198
213
|
});
|
|
199
214
|
Object.defineProperty(CalendarWithoutContext.prototype, "value", {
|
|
@@ -207,25 +222,25 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
207
222
|
? this.props.value
|
|
208
223
|
: this.state.value;
|
|
209
224
|
},
|
|
210
|
-
enumerable:
|
|
225
|
+
enumerable: false,
|
|
211
226
|
configurable: true
|
|
212
227
|
});
|
|
213
228
|
Object.defineProperty(CalendarWithoutContext.prototype, "min", {
|
|
214
229
|
get: function () {
|
|
215
|
-
return kendo_date_math_1.getDate(this.props.min !== undefined
|
|
230
|
+
return (0, kendo_date_math_1.getDate)(this.props.min !== undefined
|
|
216
231
|
? this.props.min
|
|
217
232
|
: CalendarWithoutContext.defaultProps.min);
|
|
218
233
|
},
|
|
219
|
-
enumerable:
|
|
234
|
+
enumerable: false,
|
|
220
235
|
configurable: true
|
|
221
236
|
});
|
|
222
237
|
Object.defineProperty(CalendarWithoutContext.prototype, "max", {
|
|
223
238
|
get: function () {
|
|
224
|
-
return kendo_date_math_1.getDate(this.props.max !== undefined
|
|
239
|
+
return (0, kendo_date_math_1.getDate)(this.props.max !== undefined
|
|
225
240
|
? this.props.max
|
|
226
241
|
: CalendarWithoutContext.defaultProps.max);
|
|
227
242
|
},
|
|
228
|
-
enumerable:
|
|
243
|
+
enumerable: false,
|
|
229
244
|
configurable: true
|
|
230
245
|
});
|
|
231
246
|
Object.defineProperty(CalendarWithoutContext.prototype, "bottomView", {
|
|
@@ -234,7 +249,7 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
234
249
|
? this.props.bottomView
|
|
235
250
|
: CalendarWithoutContext.defaultProps.bottomView];
|
|
236
251
|
},
|
|
237
|
-
enumerable:
|
|
252
|
+
enumerable: false,
|
|
238
253
|
configurable: true
|
|
239
254
|
});
|
|
240
255
|
Object.defineProperty(CalendarWithoutContext.prototype, "topView", {
|
|
@@ -243,7 +258,7 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
243
258
|
? this.props.topView
|
|
244
259
|
: CalendarWithoutContext.defaultProps.topView];
|
|
245
260
|
},
|
|
246
|
-
enumerable:
|
|
261
|
+
enumerable: false,
|
|
247
262
|
configurable: true
|
|
248
263
|
});
|
|
249
264
|
/**
|
|
@@ -266,7 +281,7 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
266
281
|
* @hidden
|
|
267
282
|
*/
|
|
268
283
|
CalendarWithoutContext.prototype.componentDidUpdate = function (_, prevState) {
|
|
269
|
-
if (prevState.activeView !== this.state.activeView) {
|
|
284
|
+
if (prevState.activeView !== this.state.activeView && this.scrollSyncService) {
|
|
270
285
|
this.scrollSyncService.configure(this.state.activeView);
|
|
271
286
|
}
|
|
272
287
|
if (this.calendarViewList) {
|
|
@@ -284,22 +299,22 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
284
299
|
this.props._ref(this);
|
|
285
300
|
}
|
|
286
301
|
var didValueChange = this.value !== null && this.oldValue !== null
|
|
287
|
-
? !kendo_date_math_1.isEqualDate(this.value, this.oldValue)
|
|
302
|
+
? !(0, kendo_date_math_1.isEqualDate)(this.value, this.oldValue)
|
|
288
303
|
: this.value !== this.oldValue;
|
|
289
|
-
var activeView = utils_1.viewInRange(this.state.activeView, models_1.CalendarViewEnum[this.props.bottomView !== undefined
|
|
304
|
+
var activeView = (0, utils_1.viewInRange)(this.state.activeView, models_1.CalendarViewEnum[this.props.bottomView !== undefined
|
|
290
305
|
? this.props.bottomView
|
|
291
306
|
: CalendarWithoutContext.defaultProps.bottomView], models_1.CalendarViewEnum[this.props.topView !== undefined
|
|
292
307
|
? this.props.topView
|
|
293
308
|
: CalendarWithoutContext.defaultProps.topView]);
|
|
294
309
|
var value = calculateValue(this.min, this.max, this.value, this.value);
|
|
295
|
-
var sanitizedValue = value ? kendo_date_math_1.getDate(value) : null;
|
|
296
|
-
this.focusedDate = kendo_date_math_1.getDate(utils_1.dateInRange(didValueChange && value !== null
|
|
310
|
+
var sanitizedValue = value ? (0, kendo_date_math_1.getDate)(value) : null;
|
|
311
|
+
this.focusedDate = (0, kendo_date_math_1.getDate)((0, utils_1.dateInRange)(didValueChange && value !== null
|
|
297
312
|
? value
|
|
298
313
|
: this.state.focusedDate, this.min, this.max));
|
|
299
|
-
this.intl = kendo_react_intl_1.provideIntlService(this);
|
|
314
|
+
this.intl = (0, kendo_react_intl_1.provideIntlService)(this);
|
|
300
315
|
this.bus.configure(this.bottomView, this.topView);
|
|
301
316
|
this.service = this.bus.service(activeView, this.intl);
|
|
302
|
-
var rootClassNames = kendo_react_common_1.classNames('k-widget k-calendar k-calendar-infinite', {
|
|
317
|
+
var rootClassNames = (0, kendo_react_common_1.classNames)('k-widget k-calendar k-calendar-infinite', {
|
|
303
318
|
'k-disabled': this.props.disabled,
|
|
304
319
|
'k-week-number': this.props.weekNumber
|
|
305
320
|
}, this.props.className);
|
|
@@ -340,7 +355,7 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
340
355
|
var prop = props[propName];
|
|
341
356
|
var bottomView = props.bottomView;
|
|
342
357
|
if (prop && bottomView && models_1.CalendarViewEnum[prop] < models_1.CalendarViewEnum[bottomView]) {
|
|
343
|
-
return new Error("Invalid prop + "
|
|
358
|
+
return new Error("Invalid prop + ".concat(propName, " suplied to ").concat(componentName, ".\n ").concat(propName, " can not be smaller than bottomView.\n "));
|
|
344
359
|
}
|
|
345
360
|
return null;
|
|
346
361
|
},
|
|
@@ -348,7 +363,7 @@ var CalendarWithoutContext = /** @class */ (function (_super) {
|
|
|
348
363
|
var prop = props[propName];
|
|
349
364
|
var topView = props.topView;
|
|
350
365
|
if (prop && topView && models_1.CalendarViewEnum[prop] > models_1.CalendarViewEnum[topView]) {
|
|
351
|
-
return new Error("Invalid prop + "
|
|
366
|
+
return new Error("Invalid prop + ".concat(propName, " suplied to ").concat(componentName, ".\n ").concat(propName, " can not be bigger than topView.\n "));
|
|
352
367
|
}
|
|
353
368
|
return null;
|
|
354
369
|
}
|
|
@@ -376,7 +391,7 @@ exports.CalendarWithoutContext = CalendarWithoutContext;
|
|
|
376
391
|
*
|
|
377
392
|
* For more information, refer to the [DateInputs Props Context]({% slug props-context_dateinputs %}) article.
|
|
378
393
|
*/
|
|
379
|
-
exports.CalendarPropsContext = kendo_react_common_1.createPropsContext();
|
|
394
|
+
exports.CalendarPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
380
395
|
/* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
|
|
381
396
|
/**
|
|
382
397
|
* Represents the KendoReact Calendar Component.
|
|
@@ -384,6 +399,6 @@ exports.CalendarPropsContext = kendo_react_common_1.createPropsContext();
|
|
|
384
399
|
* Accepts properties of type [CalendarProps]({% slug api_dateinputs_calendarprops %}).
|
|
385
400
|
* Obtaining the `ref` returns an object of type [CalendarHandle]({% slug api_dateinputs_calendarhandle %}).
|
|
386
401
|
*/
|
|
387
|
-
exports.Calendar = kendo_react_common_1.withPropsContext(exports.CalendarPropsContext, CalendarWithoutContext);
|
|
402
|
+
exports.Calendar = (0, kendo_react_common_1.withPropsContext)(exports.CalendarPropsContext, CalendarWithoutContext);
|
|
388
403
|
exports.Calendar.displayName = 'KendoReactCalendar';
|
|
389
|
-
kendo_react_intl_1.registerForIntl(CalendarWithoutContext);
|
|
404
|
+
(0, kendo_react_intl_1.registerForIntl)(CalendarWithoutContext);
|
|
@@ -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 __());
|
|
@@ -28,11 +30,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
28
30
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
29
31
|
t[p] = s[p];
|
|
30
32
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
31
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
32
|
-
|
|
33
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
+
t[p[i]] = s[p[i]];
|
|
36
|
+
}
|
|
33
37
|
return t;
|
|
34
38
|
};
|
|
35
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.CalendarCell = void 0;
|
|
36
41
|
var React = require("react");
|
|
37
42
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
38
43
|
/**
|
|
@@ -105,7 +110,7 @@ var CalendarCell = /** @class */ (function (_super) {
|
|
|
105
110
|
var _a = this.props, className = _a.className, formattedValue = _a.formattedValue, isWeekend = _a.isWeekend, isFocused = _a.isFocused, isInRange = _a.isInRange, isSelected = _a.isSelected, isRangeStart = _a.isRangeStart, isRangeMid = _a.isRangeMid, isRangeEnd = _a.isRangeEnd, isRangeSplitStart = _a.isRangeSplitStart, isRangeSplitEnd = _a.isRangeSplitEnd, isToday = _a.isToday, isDisabled = _a.isDisabled, view = _a.view, value = _a.value, other = __rest(_a, ["className", "formattedValue", "isWeekend", "isFocused", "isInRange", "isSelected", "isRangeStart", "isRangeMid", "isRangeEnd", "isRangeSplitStart", "isRangeSplitEnd", "isToday", "isDisabled", "view", "value"]);
|
|
106
111
|
var isEndActive = this.props.activeRangeEnd === 'end' && isRangeEnd;
|
|
107
112
|
var isStartActive = this.props.activeRangeEnd === 'start' && isRangeStart;
|
|
108
|
-
var rootClassName = kendo_react_common_1.classNames('k-calendar-td', {
|
|
113
|
+
var rootClassName = (0, kendo_react_common_1.classNames)('k-calendar-td', {
|
|
109
114
|
'k-range-end': isRangeEnd,
|
|
110
115
|
'k-range-mid': isRangeMid,
|
|
111
116
|
'k-range-split-end': isRangeSplitEnd,
|
|
@@ -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 __());
|
|
@@ -28,11 +30,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
28
30
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
29
31
|
t[p] = s[p];
|
|
30
32
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
31
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
32
|
-
|
|
33
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
+
t[p[i]] = s[p[i]];
|
|
36
|
+
}
|
|
33
37
|
return t;
|
|
34
38
|
};
|
|
35
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.CalendarHeaderTitle = void 0;
|
|
36
41
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
37
42
|
var React = require("react");
|
|
38
43
|
/**
|