@progress/kendo-vue-dateinputs 3.6.4 → 3.6.5-dev.202210181442
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-vue-dateinputs.js +1 -1
- package/dist/es/calendar/components/Calendar.js +17 -48
- package/dist/es/calendar/components/CalendarCell.js +16 -25
- package/dist/es/calendar/components/CalendarHeaderTitle.js +2 -4
- package/dist/es/calendar/components/CalendarWeekCell.js +0 -3
- package/dist/es/calendar/components/Header.js +6 -17
- package/dist/es/calendar/components/View.js +8 -19
- package/dist/es/calendar/components/ViewList.js +11 -14
- package/dist/es/common/PickerWrap.js +0 -2
- package/dist/es/dateinput/DateInput.js +33 -78
- package/dist/es/datepicker/DatePicker.js +32 -42
- package/dist/es/datepicker/ToggleButton.js +0 -2
- package/dist/es/datepicker/models/DatePickerSettings.js +2 -1
- package/dist/es/daterangepicker/DateRangePicker.js +10 -43
- package/dist/es/datetimepicker/DateTimePicker.js +39 -53
- package/dist/es/datetimepicker/DateTimeSelector.js +25 -36
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/TimeList.js +16 -46
- package/dist/es/timepicker/TimePart.js +7 -23
- package/dist/es/timepicker/TimePicker.js +37 -53
- package/dist/es/timepicker/TimeSelector.js +16 -23
- package/dist/es/virtualization/Virtualization.js +4 -36
- package/dist/esm/calendar/components/Calendar.js +17 -48
- package/dist/esm/calendar/components/CalendarCell.js +16 -25
- package/dist/esm/calendar/components/CalendarHeaderTitle.js +2 -4
- package/dist/esm/calendar/components/CalendarWeekCell.js +0 -3
- package/dist/esm/calendar/components/Header.js +6 -17
- package/dist/esm/calendar/components/View.js +8 -19
- package/dist/esm/calendar/components/ViewList.js +11 -14
- package/dist/esm/common/PickerWrap.js +0 -2
- package/dist/esm/dateinput/DateInput.js +33 -78
- package/dist/esm/datepicker/DatePicker.js +32 -42
- package/dist/esm/datepicker/ToggleButton.js +0 -2
- package/dist/esm/datepicker/models/DatePickerSettings.js +2 -1
- package/dist/esm/daterangepicker/DateRangePicker.js +10 -43
- package/dist/esm/datetimepicker/DateTimePicker.js +39 -53
- package/dist/esm/datetimepicker/DateTimeSelector.js +25 -36
- package/dist/esm/package-metadata.js +1 -1
- package/dist/esm/timepicker/TimeList.js +16 -46
- package/dist/esm/timepicker/TimePart.js +7 -23
- package/dist/esm/timepicker/TimePicker.js +37 -53
- package/dist/esm/timepicker/TimeSelector.js +16 -23
- package/dist/esm/virtualization/Virtualization.js +4 -36
- package/dist/npm/calendar/components/Calendar.js +17 -62
- package/dist/npm/calendar/components/CalendarCell.js +18 -30
- package/dist/npm/calendar/components/CalendarHeaderTitle.js +4 -10
- package/dist/npm/calendar/components/CalendarWeekCell.js +2 -8
- package/dist/npm/calendar/components/Header.js +8 -30
- package/dist/npm/calendar/components/View.js +10 -31
- package/dist/npm/calendar/components/ViewList.js +13 -25
- package/dist/npm/common/PickerWrap.js +2 -7
- package/dist/npm/dateinput/DateInput.js +35 -94
- package/dist/npm/datepicker/DatePicker.js +34 -58
- package/dist/npm/datepicker/ToggleButton.js +0 -4
- package/dist/npm/datepicker/models/DatePickerSettings.js +2 -1
- package/dist/npm/daterangepicker/DateRangePicker.js +10 -56
- package/dist/npm/datetimepicker/DateTimePicker.js +41 -71
- package/dist/npm/datetimepicker/DateTimeSelector.js +27 -50
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/timepicker/TimeList.js +16 -55
- package/dist/npm/timepicker/TimePart.js +9 -36
- package/dist/npm/timepicker/TimePicker.js +37 -67
- package/dist/npm/timepicker/TimeSelector.js +18 -35
- package/dist/npm/virtualization/Virtualization.js +4 -40
- package/package.json +7 -7
|
@@ -4,59 +4,40 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
4
4
|
__assign = Object.assign || function (t) {
|
|
5
5
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
6
|
s = arguments[i];
|
|
7
|
-
|
|
8
7
|
for (var p in s) {
|
|
9
8
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
return t;
|
|
14
12
|
};
|
|
15
|
-
|
|
16
13
|
return __assign.apply(this, arguments);
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
Object.defineProperty(exports, "__esModule", {
|
|
20
16
|
value: true
|
|
21
17
|
});
|
|
22
|
-
exports.TimePickerVue2 = exports.TimePicker = void 0;
|
|
23
|
-
|
|
18
|
+
exports.TimePickerVue2 = exports.TimePicker = void 0;
|
|
19
|
+
// @ts-ignore
|
|
24
20
|
var Vue = require("vue");
|
|
25
|
-
|
|
26
21
|
var allVue = Vue;
|
|
27
22
|
var gh = allVue.h;
|
|
28
23
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
29
24
|
var ref = allVue.ref;
|
|
30
25
|
var inject = allVue.inject;
|
|
31
|
-
|
|
32
26
|
var kendo_vue_labels_1 = require("@progress/kendo-vue-labels");
|
|
33
|
-
|
|
34
27
|
var kendo_vue_popup_1 = require("@progress/kendo-vue-popup");
|
|
35
|
-
|
|
36
28
|
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
37
|
-
|
|
38
29
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
39
|
-
|
|
40
30
|
var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
41
|
-
|
|
42
31
|
var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
|
|
43
|
-
|
|
44
32
|
var main_1 = require("../messages/main");
|
|
45
|
-
|
|
46
33
|
var DateInput_1 = require("../dateinput/DateInput");
|
|
47
|
-
|
|
48
34
|
var TimeSelector_1 = require("./TimeSelector");
|
|
49
|
-
|
|
50
35
|
var utils_1 = require("../utils");
|
|
51
|
-
|
|
52
36
|
var utils_2 = require("./utils");
|
|
53
|
-
|
|
54
37
|
var utils_3 = require("../dateinput/utils");
|
|
55
38
|
/**
|
|
56
39
|
* @hidden
|
|
57
40
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
41
|
var TimePickerVue2 = {
|
|
61
42
|
name: 'KendoTimePicker',
|
|
62
43
|
// @ts-ignore
|
|
@@ -264,11 +245,9 @@ var TimePickerVue2 = {
|
|
|
264
245
|
// If defaultShow is true during the initial render, the popup is not aligned.
|
|
265
246
|
this.$forceUpdate();
|
|
266
247
|
}
|
|
267
|
-
|
|
268
248
|
this._dateInput = this.v3 ? this.dateInputRef : this.$refs.dateInput;
|
|
269
249
|
this._timeSelector = this.$refs.timeSelector;
|
|
270
250
|
this._wrapper = this.v3 ? this.kendoAnchorRef : this.$refs[this._anchor];
|
|
271
|
-
|
|
272
251
|
if (this._dateInput && this._dateInput.element()) {
|
|
273
252
|
this._dateInput.element().setAttribute('aria-haspopup', 'true');
|
|
274
253
|
}
|
|
@@ -277,7 +256,6 @@ var TimePickerVue2 = {
|
|
|
277
256
|
this._dateInput = this.v3 ? this.dateInputRef : this.$refs.dateInput;
|
|
278
257
|
this._timeSelector = this.$refs.timeSelector;
|
|
279
258
|
this._wrapper = this.v3 ? this.kendoAnchorRef : this.$refs[this._anchor];
|
|
280
|
-
|
|
281
259
|
if (this._timeSelector && this.computedShow && !this._oldShow) {
|
|
282
260
|
this._timeSelector.focusActiveList();
|
|
283
261
|
} else if (this._dateInput && this._dateInput.element() && !this.computedShow && this.shouldFocusDateInput) {
|
|
@@ -285,7 +263,6 @@ var TimePickerVue2 = {
|
|
|
285
263
|
preventScroll: true
|
|
286
264
|
});
|
|
287
265
|
}
|
|
288
|
-
|
|
289
266
|
this.shouldFocusDateInput = false;
|
|
290
267
|
},
|
|
291
268
|
// @ts-ignore
|
|
@@ -302,37 +279,35 @@ var TimePickerVue2 = {
|
|
|
302
279
|
// @ts-ignore
|
|
303
280
|
render: function render(createElement) {
|
|
304
281
|
var _a;
|
|
305
|
-
|
|
306
282
|
var _this = this;
|
|
307
|
-
|
|
308
283
|
var h = gh || createElement;
|
|
309
284
|
var defaultSlot = (0, kendo_vue_common_1.getDefaultSlots)(this);
|
|
310
285
|
var _b = this.$props,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
286
|
+
disabled = _b.disabled,
|
|
287
|
+
tabIndex = _b.tabIndex,
|
|
288
|
+
title = _b.title,
|
|
289
|
+
id = _b.id,
|
|
290
|
+
placeholder = _b.placeholder,
|
|
291
|
+
format = _b.format,
|
|
292
|
+
formatPlaceholder = _b.formatPlaceholder,
|
|
293
|
+
smoothScroll = _b.smoothScroll,
|
|
294
|
+
width = _b.width,
|
|
295
|
+
name = _b.name,
|
|
296
|
+
steps = _b.steps,
|
|
297
|
+
cancelButton = _b.cancelButton,
|
|
298
|
+
nowButton = _b.nowButton,
|
|
299
|
+
validationMessage = _b.validationMessage,
|
|
300
|
+
required = _b.required,
|
|
301
|
+
validityStyles = _b.validityStyles,
|
|
302
|
+
ariaLabelledBy = _b.ariaLabelledBy,
|
|
303
|
+
ariaDescribedBy = _b.ariaDescribedBy,
|
|
304
|
+
size = _b.size,
|
|
305
|
+
rounded = _b.rounded,
|
|
306
|
+
fillMode = _b.fillMode;
|
|
332
307
|
var _c = this.$props.popupSettings,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
308
|
+
popupClass = _c.popupClass,
|
|
309
|
+
appendTo = _c.appendTo,
|
|
310
|
+
animate = _c.animate;
|
|
336
311
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
337
312
|
var wrapperClassNames = (0, kendo_vue_common_1.classNames)('k-picker-wrap', {
|
|
338
313
|
'k-invalid': !isValid,
|
|
@@ -344,7 +319,8 @@ var TimePickerVue2 = {
|
|
|
344
319
|
var toggleClockMessage = localizationService.toLanguageString(main_1.toggleClock, main_1.messages[main_1.toggleClock]);
|
|
345
320
|
var toggleTimeMessage = localizationService.toLanguageString(main_1.toggleTimeSelector, main_1.messages[main_1.toggleTimeSelector]);
|
|
346
321
|
var dateInput = this.$props.dateInput ? kendo_vue_common_1.templateRendering.call(this, this.$props.dateInput, kendo_vue_common_1.getListeners.call(this)) : undefined;
|
|
347
|
-
var dateInputDefaultRendering =
|
|
322
|
+
var dateInputDefaultRendering =
|
|
323
|
+
// @ts-ignore function children
|
|
348
324
|
h(DateInput_1.DateInput, {
|
|
349
325
|
ref: this.v3 ? function (el) {
|
|
350
326
|
_this.dateInputRef = el;
|
|
@@ -408,7 +384,8 @@ var TimePickerVue2 = {
|
|
|
408
384
|
}, this.v3 ? function () {
|
|
409
385
|
return [defaultSlot];
|
|
410
386
|
} : [defaultSlot]);
|
|
411
|
-
var timeSelector =
|
|
387
|
+
var timeSelector =
|
|
388
|
+
// @ts-ignore function children
|
|
412
389
|
h(TimeSelector_1.TimeSelector, {
|
|
413
390
|
ref: 'timeSelector',
|
|
414
391
|
cancelButton: cancelButton,
|
|
@@ -453,7 +430,8 @@ var TimePickerVue2 = {
|
|
|
453
430
|
}
|
|
454
431
|
});
|
|
455
432
|
var popup = this.$props.popup ? kendo_vue_common_1.templateRendering.call(this, this.$props.popup, kendo_vue_common_1.getListeners.call(this)) : undefined;
|
|
456
|
-
var popupDefaultRendering =
|
|
433
|
+
var popupDefaultRendering =
|
|
434
|
+
// @ts-ignore function children
|
|
457
435
|
h(kendo_vue_popup_1.Popup, {
|
|
458
436
|
show: this.computedShow,
|
|
459
437
|
attrs: this.v3 ? undefined : {
|
|
@@ -509,7 +487,8 @@ var TimePickerVue2 = {
|
|
|
509
487
|
ref: this.v3 ? function (el) {
|
|
510
488
|
_this.kendoAnchorRef = el;
|
|
511
489
|
} : this._anchor
|
|
512
|
-
}, [dateInputRendering,
|
|
490
|
+
}, [dateInputRendering,
|
|
491
|
+
// @ts-ignore
|
|
513
492
|
h(kendo_vue_buttons_1.Button, {
|
|
514
493
|
type: "button",
|
|
515
494
|
attrs: this.v3 ? undefined : {
|
|
@@ -535,7 +514,8 @@ var TimePickerVue2 = {
|
|
|
535
514
|
"aria-controls": this._popupId,
|
|
536
515
|
"aria-label": toggleClockMessage
|
|
537
516
|
}), popupRendering]);
|
|
538
|
-
return this.$props.label ?
|
|
517
|
+
return this.$props.label ?
|
|
518
|
+
// @ts-ignore function children
|
|
539
519
|
h(kendo_vue_labels_1.FloatingLabel, {
|
|
540
520
|
label: this.$props.label,
|
|
541
521
|
attrs: this.v3 ? undefined : {
|
|
@@ -590,7 +570,6 @@ var TimePickerVue2 = {
|
|
|
590
570
|
if (this.computedShow === show) {
|
|
591
571
|
return;
|
|
592
572
|
}
|
|
593
|
-
|
|
594
573
|
this.currentShow = show;
|
|
595
574
|
},
|
|
596
575
|
mergeTime: function mergeTime(value) {
|
|
@@ -643,14 +622,11 @@ var TimePickerVue2 = {
|
|
|
643
622
|
},
|
|
644
623
|
createBlurTimeout: function createBlurTimeout() {
|
|
645
624
|
var _this = this;
|
|
646
|
-
|
|
647
625
|
var that = this;
|
|
648
626
|
this._blurTimeout = setTimeout(function () {
|
|
649
627
|
_this.isFocused = false;
|
|
650
628
|
var isInPopup = document.activeElement && document.activeElement.closest("#".concat(that._popupId));
|
|
651
|
-
|
|
652
629
|
var isElementActive = that._dateInput && kendo_vue_common_1.canUseDOM && document.activeElement !== that._dateInput.element();
|
|
653
|
-
|
|
654
630
|
if (isElementActive && !isInPopup) {
|
|
655
631
|
that.setShow(false);
|
|
656
632
|
}
|
|
@@ -663,7 +639,6 @@ var TimePickerVue2 = {
|
|
|
663
639
|
if (this.$props.disabled) {
|
|
664
640
|
return;
|
|
665
641
|
}
|
|
666
|
-
|
|
667
642
|
this.shouldFocusDateInput = true;
|
|
668
643
|
this.setShow(!this.computedShow);
|
|
669
644
|
this.$emit('iconclick', event);
|
|
@@ -673,28 +648,24 @@ var TimePickerVue2 = {
|
|
|
673
648
|
},
|
|
674
649
|
handleKeyDown: function handleKeyDown(event) {
|
|
675
650
|
var altKey = event.altKey,
|
|
676
|
-
|
|
677
|
-
|
|
651
|
+
keyCode = event.keyCode;
|
|
678
652
|
if (keyCode === kendo_vue_common_1.Keys.tab && this._dateInput && event.target !== this._dateInput._element) {
|
|
679
653
|
event.preventDefault();
|
|
680
654
|
this.shouldFocusDateInput = true;
|
|
681
655
|
this.setShow(false);
|
|
682
656
|
return;
|
|
683
657
|
}
|
|
684
|
-
|
|
685
658
|
if (keyCode === kendo_vue_common_1.Keys.esc) {
|
|
686
659
|
this.shouldFocusDateInput = true;
|
|
687
660
|
this.setShow(false);
|
|
688
661
|
return;
|
|
689
662
|
}
|
|
690
|
-
|
|
691
663
|
if (altKey && (keyCode === kendo_vue_common_1.Keys.up || keyCode === kendo_vue_common_1.Keys.down)) {
|
|
692
664
|
event.preventDefault();
|
|
693
665
|
event.stopPropagation();
|
|
694
666
|
this.shouldFocusDateInput = keyCode === kendo_vue_common_1.Keys.up;
|
|
695
667
|
this.setShow(keyCode === kendo_vue_common_1.Keys.down);
|
|
696
668
|
}
|
|
697
|
-
|
|
698
669
|
this.$emit('keydown', event);
|
|
699
670
|
}
|
|
700
671
|
}
|
|
@@ -703,6 +674,5 @@ exports.TimePickerVue2 = TimePickerVue2;
|
|
|
703
674
|
/**
|
|
704
675
|
* @hidden
|
|
705
676
|
*/
|
|
706
|
-
|
|
707
677
|
var TimePicker = TimePickerVue2;
|
|
708
678
|
exports.TimePicker = TimePicker;
|
|
@@ -3,37 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TimeSelectorVue2 = exports.TimeSelector = exports.Direction = void 0;
|
|
7
|
-
|
|
6
|
+
exports.TimeSelectorVue2 = exports.TimeSelector = exports.Direction = void 0;
|
|
7
|
+
// @ts-ignore
|
|
8
8
|
var Vue = require("vue");
|
|
9
|
-
|
|
10
9
|
var allVue = Vue;
|
|
11
10
|
var gh = allVue.h;
|
|
12
11
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
13
12
|
var inject = allVue.inject;
|
|
14
|
-
|
|
15
13
|
var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
|
|
16
|
-
|
|
17
14
|
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
18
|
-
|
|
19
15
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
20
|
-
|
|
21
16
|
var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
22
|
-
|
|
23
17
|
var main_1 = require("../messages/main");
|
|
24
|
-
|
|
25
18
|
var utils_1 = require("../utils");
|
|
26
|
-
|
|
27
19
|
var utils_2 = require("./utils");
|
|
28
|
-
|
|
29
20
|
var TimePart_1 = require("./TimePart");
|
|
30
21
|
/**
|
|
31
22
|
* @hidden
|
|
32
23
|
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
24
|
var Direction;
|
|
36
|
-
|
|
37
25
|
(function (Direction) {
|
|
38
26
|
Direction[Direction["Left"] = 0] = "Left";
|
|
39
27
|
Direction[Direction["Right"] = 1] = "Right";
|
|
@@ -41,8 +29,6 @@ var Direction;
|
|
|
41
29
|
/**
|
|
42
30
|
* @hidden
|
|
43
31
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
32
|
var TimeSelectorVue2 = {
|
|
47
33
|
name: 'KendoTimeSelector',
|
|
48
34
|
// @ts-ignore
|
|
@@ -155,16 +141,16 @@ var TimeSelectorVue2 = {
|
|
|
155
141
|
render: function render(createElement) {
|
|
156
142
|
var h = gh || createElement;
|
|
157
143
|
var _a = this.$props,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
144
|
+
format = _a.format,
|
|
145
|
+
cancelButton = _a.cancelButton,
|
|
146
|
+
disabled = _a.disabled,
|
|
147
|
+
tabIndex = _a.tabIndex,
|
|
148
|
+
smoothScroll = _a.smoothScroll,
|
|
149
|
+
min = _a.min,
|
|
150
|
+
max = _a.max,
|
|
151
|
+
boundRange = _a.boundRange,
|
|
152
|
+
nowButton = _a.nowButton,
|
|
153
|
+
steps = _a.steps;
|
|
168
154
|
var localizationService = (0, kendo_vue_intl_1.provideLocalizationService)(this);
|
|
169
155
|
var cancelMessage = localizationService.toLanguageString(main_1.timePickerCancel, main_1.messages[main_1.timePickerCancel]);
|
|
170
156
|
var setMessage = localizationService.toLanguageString(main_1.timePickerSet, main_1.messages[main_1.timePickerSet]);
|
|
@@ -180,7 +166,8 @@ var TimeSelectorVue2 = {
|
|
|
180
166
|
on: this.v3 ? undefined : {
|
|
181
167
|
"keydown": this.handleKeyDown
|
|
182
168
|
}
|
|
183
|
-
}, [
|
|
169
|
+
}, [
|
|
170
|
+
// @ts-ignore function children
|
|
184
171
|
h(TimePart_1.TimePart, {
|
|
185
172
|
ref: 'timePart',
|
|
186
173
|
value: this.current,
|
|
@@ -215,7 +202,8 @@ var TimeSelectorVue2 = {
|
|
|
215
202
|
steps: steps
|
|
216
203
|
}), h("div", {
|
|
217
204
|
"class": "k-time-footer k-actions k-actions-stretched"
|
|
218
|
-
}, [cancelButton &&
|
|
205
|
+
}, [cancelButton &&
|
|
206
|
+
// @ts-ignore function children
|
|
219
207
|
h(kendo_vue_buttons_1.Button, {
|
|
220
208
|
type: "button",
|
|
221
209
|
attrs: this.v3 ? undefined : {
|
|
@@ -233,7 +221,8 @@ var TimeSelectorVue2 = {
|
|
|
233
221
|
"aria-label": cancelMessage
|
|
234
222
|
}, this.v3 ? function () {
|
|
235
223
|
return [cancelMessage];
|
|
236
|
-
} : [cancelMessage]),
|
|
224
|
+
} : [cancelMessage]),
|
|
225
|
+
// @ts-ignore function children
|
|
237
226
|
h(kendo_vue_buttons_1.Button, {
|
|
238
227
|
type: "button",
|
|
239
228
|
attrs: this.v3 ? undefined : {
|
|
@@ -266,7 +255,6 @@ var TimeSelectorVue2 = {
|
|
|
266
255
|
if (!this.timePart) {
|
|
267
256
|
return;
|
|
268
257
|
}
|
|
269
|
-
|
|
270
258
|
this.timePart.focus({
|
|
271
259
|
preventScroll: true
|
|
272
260
|
});
|
|
@@ -275,21 +263,17 @@ var TimeSelectorVue2 = {
|
|
|
275
263
|
if (!this._acceptButton) {
|
|
276
264
|
return false;
|
|
277
265
|
}
|
|
278
|
-
|
|
279
266
|
return kendo_vue_common_1.canUseDOM && (document.activeElement === this._acceptButton.$el || document.activeElement === this._cancelButton.$el);
|
|
280
267
|
},
|
|
281
268
|
handleKeyDown: function handleKeyDown(event) {
|
|
282
269
|
var keyCode = event.keyCode;
|
|
283
270
|
this.$emit('keydown', event);
|
|
284
|
-
|
|
285
271
|
switch (keyCode) {
|
|
286
272
|
case kendo_vue_common_1.Keys.enter:
|
|
287
273
|
if (!this.hasActiveButton()) {
|
|
288
274
|
this.handleAccept(event);
|
|
289
275
|
}
|
|
290
|
-
|
|
291
276
|
return;
|
|
292
|
-
|
|
293
277
|
default:
|
|
294
278
|
return;
|
|
295
279
|
}
|
|
@@ -330,6 +314,5 @@ exports.TimeSelectorVue2 = TimeSelectorVue2;
|
|
|
330
314
|
/**
|
|
331
315
|
* @hidden
|
|
332
316
|
*/
|
|
333
|
-
|
|
334
317
|
var TimeSelector = TimeSelectorVue2;
|
|
335
318
|
exports.TimeSelector = TimeSelector;
|
|
@@ -1,37 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _a, _b, _c;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.VirtualizationVue2 = exports.Virtualization = exports.ScrollDirection = void 0;
|
|
9
|
-
|
|
7
|
+
exports.VirtualizationVue2 = exports.Virtualization = exports.ScrollDirection = void 0;
|
|
8
|
+
// @ts-ignore
|
|
10
9
|
var Vue = require("vue");
|
|
11
|
-
|
|
12
10
|
var allVue = Vue;
|
|
13
11
|
var gh = allVue.h;
|
|
14
12
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
15
|
-
|
|
16
13
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
17
|
-
|
|
18
14
|
var main_1 = require("./services/main");
|
|
19
15
|
/**
|
|
20
16
|
* @hidden
|
|
21
17
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
18
|
var ScrollDirection;
|
|
25
|
-
|
|
26
19
|
(function (ScrollDirection) {
|
|
27
20
|
ScrollDirection[ScrollDirection["Backward"] = 0] = "Backward";
|
|
28
21
|
ScrollDirection[ScrollDirection["Forward"] = 1] = "Forward";
|
|
29
22
|
})(ScrollDirection = exports.ScrollDirection || (exports.ScrollDirection = {}));
|
|
30
|
-
|
|
31
23
|
var differenceToScroll = function differenceToScroll(scrollTop, staticOffset, maxScrollDifference) {
|
|
32
24
|
return Math.min(Math.abs(staticOffset - scrollTop), maxScrollDifference);
|
|
33
25
|
};
|
|
34
|
-
|
|
35
26
|
var FRAME_DURATION = 17;
|
|
36
27
|
var scrollModifiers = (_a = {}, _a[ScrollDirection.Forward] = function (step) {
|
|
37
28
|
return function (value) {
|
|
@@ -63,7 +54,6 @@ var scrollValidators = (_c = {}, _c[ScrollDirection.Forward] = function (end) {
|
|
|
63
54
|
/**
|
|
64
55
|
* @hidden
|
|
65
56
|
*/
|
|
66
|
-
|
|
67
57
|
var VirtualizationVue2 = {
|
|
68
58
|
name: 'Virtualization',
|
|
69
59
|
// @ts-ignore
|
|
@@ -149,21 +139,18 @@ var VirtualizationVue2 = {
|
|
|
149
139
|
if (!this.rowHeightService) {
|
|
150
140
|
return 0;
|
|
151
141
|
}
|
|
152
|
-
|
|
153
142
|
return this.rowHeightService.index(offset);
|
|
154
143
|
},
|
|
155
144
|
itemOffset: function itemOffset(index) {
|
|
156
145
|
if (!this.rowHeightService) {
|
|
157
146
|
return 0;
|
|
158
147
|
}
|
|
159
|
-
|
|
160
148
|
return this.rowHeightService.offset(index);
|
|
161
149
|
},
|
|
162
150
|
isIndexVisible: function isIndexVisible(index) {
|
|
163
151
|
if (!this.rowHeightService) {
|
|
164
152
|
return false;
|
|
165
153
|
}
|
|
166
|
-
|
|
167
154
|
var containerTop = this.containerScrollPosition();
|
|
168
155
|
var containerBottom = containerTop + this.containerOffsetSize();
|
|
169
156
|
var top = this.rowHeightService.offset(index);
|
|
@@ -174,61 +161,48 @@ var VirtualizationVue2 = {
|
|
|
174
161
|
if (!this.rowHeightService) {
|
|
175
162
|
return false;
|
|
176
163
|
}
|
|
177
|
-
|
|
178
164
|
return this.containerScrollPosition() !== this.rowHeightService.offset(index);
|
|
179
165
|
},
|
|
180
166
|
scrollTo: function scrollTo(value) {
|
|
181
167
|
var scrollProperty = this.$props.direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
|
|
182
|
-
|
|
183
168
|
if (!this.scrollContainer) {
|
|
184
169
|
return;
|
|
185
170
|
}
|
|
186
|
-
|
|
187
171
|
this.scrollContainer[scrollProperty] = value;
|
|
188
172
|
},
|
|
189
173
|
scrollToIndex: function scrollToIndex(index) {
|
|
190
174
|
if (!this.rowHeightService) {
|
|
191
175
|
return;
|
|
192
176
|
}
|
|
193
|
-
|
|
194
177
|
this.animationInProgress = false;
|
|
195
178
|
this.scrollTo(this.rowHeightService.offset(index));
|
|
196
179
|
},
|
|
197
180
|
animateToIndex: function animateToIndex(index) {
|
|
198
181
|
var _this = this;
|
|
199
|
-
|
|
200
182
|
if (!this.rowHeightService || !window) {
|
|
201
183
|
return;
|
|
202
184
|
}
|
|
203
|
-
|
|
204
185
|
window.cancelAnimationFrame(this.cancelAnimation);
|
|
205
186
|
var indexOffset = this.rowHeightService.offset(index);
|
|
206
187
|
var direction = this.getContainerScrollDirection(indexOffset);
|
|
207
|
-
|
|
208
188
|
var _a = this.scrollRange(indexOffset, direction),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
189
|
+
start = _a.start,
|
|
190
|
+
end = _a.end;
|
|
212
191
|
if (start === end) {
|
|
213
192
|
return;
|
|
214
193
|
}
|
|
215
|
-
|
|
216
194
|
var step = this.scrollStep(start, end);
|
|
217
195
|
var modifyScroll = scrollModifiers[direction](step);
|
|
218
196
|
var normalizeScroll = scrollNormalizers[direction](end);
|
|
219
197
|
var isScrollValid = scrollValidators[direction](modifyScroll(end));
|
|
220
|
-
|
|
221
198
|
var animate = function animate(progress) {
|
|
222
199
|
_this.animationInProgress = true;
|
|
223
200
|
var next = modifyScroll(progress);
|
|
224
|
-
|
|
225
201
|
_this.scrollTo(normalizeScroll(next));
|
|
226
|
-
|
|
227
202
|
isScrollValid(next) ? _this.cancelAnimation = window.requestAnimationFrame(function () {
|
|
228
203
|
animate(next);
|
|
229
204
|
}) : _this.animationInProgress = false;
|
|
230
205
|
};
|
|
231
|
-
|
|
232
206
|
this.cancelAnimation = window.requestAnimationFrame(function () {
|
|
233
207
|
animate(start);
|
|
234
208
|
});
|
|
@@ -237,7 +211,6 @@ var VirtualizationVue2 = {
|
|
|
237
211
|
if (!this.rowHeightService) {
|
|
238
212
|
return;
|
|
239
213
|
}
|
|
240
|
-
|
|
241
214
|
this.scrollTo(this.rowHeightService.totalHeight() + this.$props.bottomOffset);
|
|
242
215
|
},
|
|
243
216
|
scrollStep: function scrollStep(start, end) {
|
|
@@ -246,14 +219,12 @@ var VirtualizationVue2 = {
|
|
|
246
219
|
},
|
|
247
220
|
scrollRange: function scrollRange(indexOffset, direction) {
|
|
248
221
|
var containerScroll = this.containerScrollPosition();
|
|
249
|
-
|
|
250
222
|
if (parseInt("".concat(indexOffset), 10) === parseInt("".concat(containerScroll), 10)) {
|
|
251
223
|
return {
|
|
252
224
|
start: indexOffset,
|
|
253
225
|
end: indexOffset
|
|
254
226
|
};
|
|
255
227
|
}
|
|
256
|
-
|
|
257
228
|
var maxScroll = this.containerMaxScroll();
|
|
258
229
|
var sign = direction === ScrollDirection.Backward ? 1 : -1;
|
|
259
230
|
var difference = differenceToScroll(containerScroll, indexOffset, this.$props.maxScrollDifference);
|
|
@@ -273,11 +244,9 @@ var VirtualizationVue2 = {
|
|
|
273
244
|
initServices: function initServices(newProps) {
|
|
274
245
|
var props = newProps || this.$props;
|
|
275
246
|
var dimension = props.direction === 'vertical' ? props.itemHeight : props.itemWidth;
|
|
276
|
-
|
|
277
247
|
if (dimension === undefined) {
|
|
278
248
|
return;
|
|
279
249
|
}
|
|
280
|
-
|
|
281
250
|
this.rowHeightService = new main_1.RowHeightService(props.total, dimension, 0);
|
|
282
251
|
this.scrollerService.create(this.rowHeightService, props.skip, props.take, props.total, props.topOffset, this.$props.scrollOffsetSize, this.$props.direction);
|
|
283
252
|
},
|
|
@@ -285,14 +254,12 @@ var VirtualizationVue2 = {
|
|
|
285
254
|
if (!this.scrollContainer) {
|
|
286
255
|
return 0;
|
|
287
256
|
}
|
|
288
|
-
|
|
289
257
|
return this.scrollContainer[propertyName];
|
|
290
258
|
},
|
|
291
259
|
handleScroll: function handleScroll(event) {
|
|
292
260
|
if (!this.scrollContainer || !this.rowHeightService) {
|
|
293
261
|
return;
|
|
294
262
|
}
|
|
295
|
-
|
|
296
263
|
var target = event.target;
|
|
297
264
|
this.scrollerService.onScroll({
|
|
298
265
|
scrollLeft: target.scrollLeft,
|
|
@@ -330,14 +297,12 @@ var VirtualizationVue2 = {
|
|
|
330
297
|
render: function render(createElement) {
|
|
331
298
|
var h = gh || createElement;
|
|
332
299
|
var defaultSlot = (0, kendo_vue_common_1.getDefaultSlots)(this);
|
|
333
|
-
|
|
334
300
|
if (this.lastTotal !== this.$props.total || this.lastDirection !== this.$props.direction || this.lastTake !== this.$props.take) {
|
|
335
301
|
this.initServices();
|
|
336
302
|
this.lastTotal = this.$props.total;
|
|
337
303
|
this.lastDirection = this.$props.direction;
|
|
338
304
|
this.lastTake = this.$props.take;
|
|
339
305
|
}
|
|
340
|
-
|
|
341
306
|
var vertexLength = "".concat((this.rowHeightService ? this.rowHeightService.totalHeight() : 0) + this.$props.bottomOffset);
|
|
342
307
|
var placeholderStyle = this.$props.direction === 'vertical' ? {
|
|
343
308
|
height: "".concat(vertexLength, "px")
|
|
@@ -373,6 +338,5 @@ exports.VirtualizationVue2 = VirtualizationVue2;
|
|
|
373
338
|
/**
|
|
374
339
|
* @hidden
|
|
375
340
|
*/
|
|
376
|
-
|
|
377
341
|
var Virtualization = VirtualizationVue2;
|
|
378
342
|
exports.Virtualization = Virtualization;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-dateinputs",
|
|
3
3
|
"description": "Kendo UI for Vue Date Inputs package",
|
|
4
|
-
"version": "3.6.
|
|
4
|
+
"version": "3.6.5-dev.202210181442",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/telerik/kendo-vue.git"
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@progress/kendo-date-math": "1.5.1",
|
|
55
|
-
"@progress/kendo-vue-buttons": "3.6.
|
|
56
|
-
"@progress/kendo-vue-common": "3.6.
|
|
57
|
-
"@progress/kendo-vue-labels": "3.6.
|
|
58
|
-
"@progress/kendo-vue-popup": "3.6.
|
|
55
|
+
"@progress/kendo-vue-buttons": "3.6.5-dev.202210181442",
|
|
56
|
+
"@progress/kendo-vue-common": "3.6.5-dev.202210181442",
|
|
57
|
+
"@progress/kendo-vue-labels": "3.6.5-dev.202210181442",
|
|
58
|
+
"@progress/kendo-vue-popup": "3.6.5-dev.202210181442"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@progress/kendo-data-query": "^1.5.4",
|
|
62
62
|
"@progress/kendo-licensing": "^1.1.0",
|
|
63
|
-
"@progress/kendo-vue-dropdowns": "3.6.
|
|
64
|
-
"@progress/kendo-vue-intl": "3.6.
|
|
63
|
+
"@progress/kendo-vue-dropdowns": "3.6.5-dev.202210181442",
|
|
64
|
+
"@progress/kendo-vue-intl": "3.6.5-dev.202210181442"
|
|
65
65
|
},
|
|
66
66
|
"author": "Progress",
|
|
67
67
|
"license": "SEE LICENSE IN LICENSE.md",
|