@progress/kendo-vue-dateinputs 3.6.4 → 3.7.0-dev.202210250731

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.
Files changed (65) hide show
  1. package/dist/cdn/js/kendo-vue-dateinputs.js +1 -1
  2. package/dist/es/calendar/components/Calendar.js +17 -48
  3. package/dist/es/calendar/components/CalendarCell.js +16 -25
  4. package/dist/es/calendar/components/CalendarHeaderTitle.js +2 -4
  5. package/dist/es/calendar/components/CalendarWeekCell.js +0 -3
  6. package/dist/es/calendar/components/Header.js +6 -17
  7. package/dist/es/calendar/components/View.js +8 -19
  8. package/dist/es/calendar/components/ViewList.js +11 -14
  9. package/dist/es/common/PickerWrap.js +0 -2
  10. package/dist/es/dateinput/DateInput.js +33 -78
  11. package/dist/es/datepicker/DatePicker.js +32 -42
  12. package/dist/es/datepicker/ToggleButton.js +0 -2
  13. package/dist/es/datepicker/models/DatePickerSettings.js +2 -1
  14. package/dist/es/daterangepicker/DateRangePicker.js +10 -43
  15. package/dist/es/datetimepicker/DateTimePicker.js +39 -53
  16. package/dist/es/datetimepicker/DateTimeSelector.js +25 -36
  17. package/dist/es/package-metadata.js +1 -1
  18. package/dist/es/timepicker/TimeList.js +16 -46
  19. package/dist/es/timepicker/TimePart.js +7 -23
  20. package/dist/es/timepicker/TimePicker.js +37 -53
  21. package/dist/es/timepicker/TimeSelector.js +16 -23
  22. package/dist/es/virtualization/Virtualization.js +4 -36
  23. package/dist/esm/calendar/components/Calendar.js +17 -48
  24. package/dist/esm/calendar/components/CalendarCell.js +16 -25
  25. package/dist/esm/calendar/components/CalendarHeaderTitle.js +2 -4
  26. package/dist/esm/calendar/components/CalendarWeekCell.js +0 -3
  27. package/dist/esm/calendar/components/Header.js +6 -17
  28. package/dist/esm/calendar/components/View.js +8 -19
  29. package/dist/esm/calendar/components/ViewList.js +11 -14
  30. package/dist/esm/common/PickerWrap.js +0 -2
  31. package/dist/esm/dateinput/DateInput.js +33 -78
  32. package/dist/esm/datepicker/DatePicker.js +32 -42
  33. package/dist/esm/datepicker/ToggleButton.js +0 -2
  34. package/dist/esm/datepicker/models/DatePickerSettings.js +2 -1
  35. package/dist/esm/daterangepicker/DateRangePicker.js +10 -43
  36. package/dist/esm/datetimepicker/DateTimePicker.js +39 -53
  37. package/dist/esm/datetimepicker/DateTimeSelector.js +25 -36
  38. package/dist/esm/package-metadata.js +1 -1
  39. package/dist/esm/timepicker/TimeList.js +16 -46
  40. package/dist/esm/timepicker/TimePart.js +7 -23
  41. package/dist/esm/timepicker/TimePicker.js +37 -53
  42. package/dist/esm/timepicker/TimeSelector.js +16 -23
  43. package/dist/esm/virtualization/Virtualization.js +4 -36
  44. package/dist/npm/calendar/components/Calendar.js +17 -62
  45. package/dist/npm/calendar/components/CalendarCell.js +18 -30
  46. package/dist/npm/calendar/components/CalendarHeaderTitle.js +4 -10
  47. package/dist/npm/calendar/components/CalendarWeekCell.js +2 -8
  48. package/dist/npm/calendar/components/Header.js +8 -30
  49. package/dist/npm/calendar/components/View.js +10 -31
  50. package/dist/npm/calendar/components/ViewList.js +13 -25
  51. package/dist/npm/common/PickerWrap.js +2 -7
  52. package/dist/npm/dateinput/DateInput.js +35 -94
  53. package/dist/npm/datepicker/DatePicker.js +34 -58
  54. package/dist/npm/datepicker/ToggleButton.js +0 -4
  55. package/dist/npm/datepicker/models/DatePickerSettings.js +2 -1
  56. package/dist/npm/daterangepicker/DateRangePicker.js +10 -56
  57. package/dist/npm/datetimepicker/DateTimePicker.js +41 -71
  58. package/dist/npm/datetimepicker/DateTimeSelector.js +27 -50
  59. package/dist/npm/package-metadata.js +1 -1
  60. package/dist/npm/timepicker/TimeList.js +16 -55
  61. package/dist/npm/timepicker/TimePart.js +9 -36
  62. package/dist/npm/timepicker/TimePicker.js +37 -67
  63. package/dist/npm/timepicker/TimeSelector.js +18 -35
  64. package/dist/npm/virtualization/Virtualization.js +4 -40
  65. package/package.json +7 -7
@@ -3,40 +3,27 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.DateTimeSelectorVue2 = exports.DateTimeSelector = void 0; // @ts-ignore
7
-
6
+ exports.DateTimeSelectorVue2 = exports.DateTimeSelector = 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 ref = allVue.ref;
14
13
  var inject = allVue.inject;
15
-
16
14
  var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
17
-
18
15
  var main_1 = require("../messages/main");
19
-
20
16
  var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
21
-
22
17
  var Calendar_1 = require("../calendar/components/Calendar");
23
-
24
18
  var TimePart_1 = require("../timepicker/TimePart");
25
-
26
19
  var utils_1 = require("../utils");
27
-
28
20
  var kendo_date_math_1 = require("@progress/kendo-date-math");
29
-
30
21
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
31
-
32
22
  var defaults_1 = require("../defaults");
33
-
34
23
  var utils_2 = require("../timepicker/utils");
35
24
  /**
36
25
  * @hidden
37
26
  */
38
-
39
-
40
27
  var DateTimeSelectorVue2 = {
41
28
  name: 'KendoDateTimeSelector',
42
29
  props: {
@@ -128,7 +115,6 @@ var DateTimeSelectorVue2 = {
128
115
  preventScroll: true
129
116
  });
130
117
  }
131
-
132
118
  this.shouldFocusPart = false;
133
119
  },
134
120
  // @ts-ignore
@@ -145,17 +131,16 @@ var DateTimeSelectorVue2 = {
145
131
  // @ts-ignore
146
132
  render: function render(createElement) {
147
133
  var _this2 = this;
148
-
149
134
  var h = gh || createElement;
150
135
  var _a = this.$props,
151
- disabled = _a.disabled,
152
- cancelButton = _a.cancelButton,
153
- min = _a.min,
154
- max = _a.max,
155
- weekNumber = _a.weekNumber,
156
- focusedDate = _a.focusedDate,
157
- format = _a.format,
158
- steps = _a.steps;
136
+ disabled = _a.disabled,
137
+ cancelButton = _a.cancelButton,
138
+ min = _a.min,
139
+ max = _a.max,
140
+ weekNumber = _a.weekNumber,
141
+ focusedDate = _a.focusedDate,
142
+ format = _a.format,
143
+ steps = _a.steps;
159
144
  var rootClassName = (0, kendo_vue_common_1.classNames)({
160
145
  'k-date-tab': this.currentTab === 'date',
161
146
  'k-time-tab': this.currentTab === 'time',
@@ -166,7 +151,8 @@ var DateTimeSelectorVue2 = {
166
151
  var timeMessage = localizationService.toLanguageString(main_1.time, main_1.messages[main_1.time]);
167
152
  var cancelMessage = localizationService.toLanguageString(main_1.dateTimePickerCancel, main_1.messages[main_1.dateTimePickerCancel]);
168
153
  var setMessage = localizationService.toLanguageString(main_1.dateTimePickerSet, main_1.messages[main_1.dateTimePickerSet]);
169
- var calendarDefaultRendering = // @ts-ignore function children
154
+ var calendarDefaultRendering =
155
+ // @ts-ignore function children
170
156
  h(Calendar_1.Calendar, {
171
157
  ref: 'calendar',
172
158
  min: min,
@@ -209,14 +195,16 @@ var DateTimeSelectorVue2 = {
209
195
  }
210
196
  }, [h("div", {
211
197
  "class": "k-datetime-buttongroup"
212
- }, [// @ts-ignore function children
198
+ }, [
199
+ // @ts-ignore function children
213
200
  h(kendo_vue_buttons_1.ButtonGroup, {
214
201
  width: "100%",
215
202
  attrs: this.v3 ? undefined : {
216
203
  width: "100%"
217
204
  }
218
205
  }, this.v3 ? function () {
219
- return [// @ts-ignore function children
206
+ return [
207
+ // @ts-ignore function children
220
208
  h(kendo_vue_buttons_1.Button, {
221
209
  type: "button",
222
210
  attrs: _this2.v3 ? undefined : {
@@ -232,7 +220,8 @@ var DateTimeSelectorVue2 = {
232
220
  }
233
221
  }, _this2.v3 ? function () {
234
222
  return [dateMessage];
235
- } : [dateMessage]), // @ts-ignore function children
223
+ } : [dateMessage]),
224
+ // @ts-ignore function children
236
225
  h(kendo_vue_buttons_1.Button, {
237
226
  type: "button",
238
227
  attrs: _this2.v3 ? undefined : {
@@ -286,7 +275,8 @@ var DateTimeSelectorVue2 = {
286
275
  ref: 'calendarWrap'
287
276
  }, [calendar]), h("div", {
288
277
  "class": "k-datetime-time-wrap"
289
- }, [// @ts-ignore function children
278
+ }, [
279
+ // @ts-ignore function children
290
280
  h(TimePart_1.TimePart, {
291
281
  key: 1,
292
282
  onNowclick: this.handleNowClick,
@@ -318,7 +308,8 @@ var DateTimeSelectorVue2 = {
318
308
  onBlur: this.handleBlur
319
309
  })])]), h("div", {
320
310
  "class": "k-datetime-footer k-actions k-actions-stretched"
321
- }, [cancelButton && // @ts-ignore function children
311
+ }, [cancelButton &&
312
+ // @ts-ignore function children
322
313
  h(kendo_vue_buttons_1.Button, {
323
314
  type: "button",
324
315
  attrs: this.v3 ? undefined : {
@@ -336,7 +327,8 @@ var DateTimeSelectorVue2 = {
336
327
  "aria-label": cancelMessage
337
328
  }, this.v3 ? function () {
338
329
  return [cancelMessage];
339
- } : [cancelMessage]), // @ts-ignore function children
330
+ } : [cancelMessage]),
331
+ // @ts-ignore function children
340
332
  h(kendo_vue_buttons_1.Button, {
341
333
  type: "button",
342
334
  attrs: this.v3 ? undefined : {
@@ -369,14 +361,11 @@ var DateTimeSelectorVue2 = {
369
361
  },
370
362
  focus: function focus(args) {
371
363
  var _this = this;
372
-
373
364
  this.$nextTick(function () {
374
365
  if (_this.currentTab === 'time' && _this._timePart) {
375
366
  _this._timePart.focus(args);
376
367
  }
377
-
378
368
  var calendarElement = _this.calendarElement();
379
-
380
369
  if (_this.currentTab === 'date' && calendarElement) {
381
370
  calendarElement.focus(args);
382
371
  }
@@ -392,7 +381,6 @@ var DateTimeSelectorVue2 = {
392
381
  if (!this._acceptButton) {
393
382
  return false;
394
383
  }
395
-
396
384
  return kendo_vue_common_1.canUseDOM && (document.activeElement === this._acceptButton.$el || document.activeElement === this._cancelButton.$el);
397
385
  },
398
386
  mergeTime: function mergeTime(current, candidate) {
@@ -405,11 +393,9 @@ var DateTimeSelectorVue2 = {
405
393
  if (direction === 'right' && this.currentTab === 'time') {
406
394
  return;
407
395
  }
408
-
409
396
  if (direction === 'left' && this.currentTab === 'date') {
410
397
  return;
411
398
  }
412
-
413
399
  var nextPart = direction === 'left' ? 'date' : 'time';
414
400
  this.shouldFocusPart = true;
415
401
  this.currentTab = nextPart;
@@ -429,7 +415,6 @@ var DateTimeSelectorVue2 = {
429
415
  if (!this.dateValue || !this.timeValue || !this.hasDateValue) {
430
416
  return;
431
417
  }
432
-
433
418
  var value = this.mergeDate(this.dateValue, timeOverride || this.timeValue);
434
419
  this.$emit('change', {
435
420
  event: event,
@@ -442,8 +427,8 @@ var DateTimeSelectorVue2 = {
442
427
  this.handleAccept(event, (0, utils_2.getNow)());
443
428
  },
444
429
  handleCalendarValueChange: function handleCalendarValueChange(event) {
445
- event.event.stopPropagation(); // @ts-ignore
446
-
430
+ event.event.stopPropagation();
431
+ // @ts-ignore
447
432
  this.dateValue = event.value;
448
433
  this.currentTab = 'time';
449
434
  this.shouldFocusPart = true;
@@ -461,33 +446,26 @@ var DateTimeSelectorVue2 = {
461
446
  },
462
447
  handleKeyDown: function handleKeyDown(event) {
463
448
  var keyCode = event.keyCode,
464
- altKey = event.altKey;
449
+ altKey = event.altKey;
465
450
  this.$emit('keydown', event);
466
-
467
451
  switch (keyCode) {
468
452
  case kendo_vue_common_1.Keys.enter:
469
453
  if (!this.hasActiveButton() && this.hasDateValue) {
470
454
  this.handleAccept(event);
471
455
  }
472
-
473
456
  return;
474
-
475
457
  case kendo_vue_common_1.Keys.left:
476
458
  if (!altKey) {
477
459
  return;
478
460
  }
479
-
480
461
  this.move('left');
481
462
  return;
482
-
483
463
  case kendo_vue_common_1.Keys.right:
484
464
  if (!altKey) {
485
465
  return;
486
466
  }
487
-
488
467
  this.move('right');
489
468
  return;
490
-
491
469
  default:
492
470
  return;
493
471
  }
@@ -501,6 +479,5 @@ exports.DateTimeSelectorVue2 = DateTimeSelectorVue2;
501
479
  /**
502
480
  * @hidden
503
481
  */
504
-
505
482
  var DateTimeSelector = DateTimeSelectorVue2;
506
483
  exports.DateTimeSelector = DateTimeSelector;
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-dateinputs',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1665151441,
11
+ publishDate: 1666682554,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
14
14
  };
@@ -1,37 +1,25 @@
1
1
  "use strict";
2
2
 
3
3
  var _a, _b;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
- exports.TimeListVue2 = exports.TimeList = void 0; // @ts-ignore
9
-
7
+ exports.TimeListVue2 = exports.TimeList = 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
13
  var inject = allVue.inject;
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 Virtualization_1 = require("../virtualization/Virtualization");
24
-
25
18
  var main_1 = require("./models/main");
26
-
27
19
  var main_2 = require("./services/main");
28
-
29
20
  var utils_1 = require("../utils");
30
-
31
21
  var SCROLL_THRESHOLD = 2; // < 2px threshold
32
-
33
22
  var SNAP_THRESHOLD = 0.05; // % of the item height
34
-
35
23
  var SKIP = 0;
36
24
  var getters = (_a = {}, _a[kendo_vue_common_1.Keys.end] = function (data, _) {
37
25
  return data[data.length - 1];
@@ -46,7 +34,6 @@ var services = (_b = {}, _b[main_1.TIME_PART.dayperiod] = main_2.DayPeriodServic
46
34
  /**
47
35
  * @hidden
48
36
  */
49
-
50
37
  var TimeListVue2 = {
51
38
  name: 'KendoTimeList',
52
39
  // @ts-ignore
@@ -105,17 +92,14 @@ var TimeListVue2 = {
105
92
  },
106
93
  mounted: function mounted() {
107
94
  var _this = this;
108
-
109
- this.virtualization = this.$refs.virtualization; // Async calculation of height to avoid animation cancellation
110
-
95
+ this.virtualization = this.$refs.virtualization;
96
+ // Async calculation of height to avoid animation cancellation
111
97
  Promise.resolve().then(function () {
112
98
  if (!_this.$el) {
113
99
  return;
114
- } // @ts-ignore
115
-
116
-
100
+ }
101
+ // @ts-ignore
117
102
  _this.dom.calculateHeights(_this.$el);
118
-
119
103
  _this.$forceUpdate();
120
104
  });
121
105
  },
@@ -123,7 +107,6 @@ var TimeListVue2 = {
123
107
  if (!this.$refs.virtualization) {
124
108
  return;
125
109
  }
126
-
127
110
  this.virtualization = this.$refs.virtualization;
128
111
  var index = this.service.selectedIndex(this.$props.value);
129
112
  this.virtualization[this.animate ? 'animateToIndex' : 'scrollToIndex'](index);
@@ -141,13 +124,10 @@ var TimeListVue2 = {
141
124
  // @ts-ignore
142
125
  render: function render(createElement) {
143
126
  var _this2 = this;
144
-
145
127
  var h = gh || createElement;
146
-
147
128
  if (!this.$props.part.type || !services[this.$props.part.type]) {
148
129
  return;
149
130
  }
150
-
151
131
  this.calculateHeights();
152
132
  this.intl = (0, kendo_vue_intl_1.provideIntlService)(this);
153
133
  this.service = new services[this.$props.part.type](this.intl);
@@ -155,7 +135,6 @@ var TimeListVue2 = {
155
135
  var data = this.service.data(this.$props.value);
156
136
  var transform = 'translateY(' + this.topOffset + 'px)';
157
137
  var total = this.service.total(this.$props.value);
158
-
159
138
  var list = function list() {
160
139
  return h("ul", {
161
140
  style: {
@@ -165,7 +144,6 @@ var TimeListVue2 = {
165
144
  "class": "k-reset"
166
145
  }, [data.map(function (item, idx) {
167
146
  var _this = this;
168
-
169
147
  return h("li", {
170
148
  key: idx,
171
149
  "class": "k-item",
@@ -180,7 +158,6 @@ var TimeListVue2 = {
180
158
  }, [h("span", [item.text])]);
181
159
  }, this)]);
182
160
  };
183
-
184
161
  return h("div", {
185
162
  "class": "k-time-list",
186
163
  id: String(this.$props.id || ''),
@@ -199,7 +176,8 @@ var TimeListVue2 = {
199
176
  onFocusin: this.handleFocus,
200
177
  onFocusout: this.handleBlur,
201
178
  onMouseover: this.handleMouseOver
202
- }, [this.dom.didCalculate ? // @ts-ignore function children
179
+ }, [this.dom.didCalculate ?
180
+ // @ts-ignore function children
203
181
  h(Virtualization_1.Virtualization, {
204
182
  bottomOffset: this.bottomOffset,
205
183
  attrs: this.v3 ? undefined : {
@@ -236,13 +214,11 @@ var TimeListVue2 = {
236
214
  methods: {
237
215
  focus: function focus(args) {
238
216
  var _this = this;
239
-
240
217
  Promise.resolve().then(function () {
241
218
  if (!_this.$el) {
242
219
  return;
243
- } // @ts-ignore
244
-
245
-
220
+ }
221
+ // @ts-ignore
246
222
  _this.$el.focus(args);
247
223
  });
248
224
  },
@@ -250,16 +226,13 @@ var TimeListVue2 = {
250
226
  if (!this.virtualization) {
251
227
  return -1;
252
228
  }
253
-
254
229
  var valueIndex = this.service.selectedIndex(this.$props.value);
255
230
  var activeIndex = this.virtualization.activeIndex();
256
231
  var offset = this.virtualization.itemOffset(activeIndex);
257
232
  var distance = Math.abs(Math.ceil(scrollTop) - offset);
258
-
259
233
  if (valueIndex === activeIndex && distance < SCROLL_THRESHOLD) {
260
234
  return offset;
261
235
  }
262
-
263
236
  var scrollUp = valueIndex > activeIndex;
264
237
  var moveToNext = scrollUp && distance >= this.bottomThreshold || !scrollUp && distance > this.topThreshold;
265
238
  return moveToNext ? this.virtualization.itemOffset(activeIndex + 1) : offset;
@@ -268,7 +241,6 @@ var TimeListVue2 = {
268
241
  if (!this.dom.didCalculate) {
269
242
  return;
270
243
  }
271
-
272
244
  this.itemHeight = this.dom.itemHeight;
273
245
  this.listHeight = this.dom.timeListHeight;
274
246
  this.topOffset = (this.listHeight - this.itemHeight) / 2;
@@ -278,14 +250,12 @@ var TimeListVue2 = {
278
250
  },
279
251
  configureServices: function configureServices(props) {
280
252
  var _a = props || this.$props,
281
- min = _a.min,
282
- max = _a.max,
283
- value = _a.value;
284
-
253
+ min = _a.min,
254
+ max = _a.max,
255
+ value = _a.value;
285
256
  var _b = this.service.limitRange(min || this.$props.min, max || this.$props.max, value || this.$props.value),
286
- newMin = _b[0],
287
- newMax = _b[1];
288
-
257
+ newMin = _b[0],
258
+ newMax = _b[1];
289
259
  this.service.configure(this.serviceSettings({
290
260
  min: newMin,
291
261
  max: newMax
@@ -306,12 +276,10 @@ var TimeListVue2 = {
306
276
  },
307
277
  handleScrollAction: function handleScrollAction(_a) {
308
278
  var target = _a.target,
309
- animationInProgress = _a.animationInProgress;
310
-
279
+ animationInProgress = _a.animationInProgress;
311
280
  if (!this.virtualization) {
312
281
  return;
313
282
  }
314
-
315
283
  if (target && !animationInProgress) {
316
284
  this.animateToIndex = false;
317
285
  var index = this.virtualization.itemIndex(this.itemOffset(target.scrollTop));
@@ -329,7 +297,6 @@ var TimeListVue2 = {
329
297
  if (!this.$el) {
330
298
  return;
331
299
  }
332
-
333
300
  if (kendo_vue_common_1.canUseDOM && document.activeElement !== this.$el) {
334
301
  // @ts-ignore
335
302
  this.$el.focus({
@@ -339,25 +306,20 @@ var TimeListVue2 = {
339
306
  },
340
307
  handleKeyDown: function handleKeyDown(event) {
341
308
  var keyCode = event.keyCode;
342
-
343
309
  if (keyCode === kendo_vue_common_1.Keys.down || keyCode === kendo_vue_common_1.Keys.up || keyCode === kendo_vue_common_1.Keys.end || keyCode === kendo_vue_common_1.Keys.home) {
344
310
  event.preventDefault();
345
311
  }
346
-
347
312
  var getter = getters[event.keyCode] || kendo_vue_common_1.noop;
348
313
  var dataItem = getter(this.service.data(this.$props.value), this.service.selectedIndex(this.$props.value));
349
-
350
314
  if (dataItem) {
351
315
  this.handleChange(dataItem);
352
316
  }
353
317
  },
354
318
  handleChange: function handleChange(dataItem) {
355
319
  var candidate = this.service.apply(this.$props.value, dataItem.value);
356
-
357
320
  if (this.$props.value.getTime() === candidate.getTime()) {
358
321
  return;
359
322
  }
360
-
361
323
  this.currentValue = candidate;
362
324
  this.$emit('change', candidate);
363
325
  }
@@ -367,6 +329,5 @@ exports.TimeListVue2 = TimeListVue2;
367
329
  /**
368
330
  * @hidden
369
331
  */
370
-
371
332
  var TimeList = TimeListVue2;
372
333
  exports.TimeList = TimeList;
@@ -3,40 +3,27 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TimePartVue2 = exports.TimePart = exports.Direction = void 0; // @ts-ignore
7
-
6
+ exports.TimePartVue2 = exports.TimePart = 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 TimeList_1 = require("./TimeList");
26
-
27
19
  var utils_1 = require("../utils");
28
-
29
20
  var TimePart_1 = require("./models/TimePart");
30
-
31
21
  var utils_2 = require("./utils");
32
-
33
22
  var formatRegExp = new RegExp("".concat(TimePart_1.TIME_PART.hour, "|").concat(TimePart_1.TIME_PART.minute, "|").concat(TimePart_1.TIME_PART.second, "|").concat(TimePart_1.TIME_PART.dayperiod, "|literal"));
34
23
  /**
35
24
  * @hidden
36
25
  */
37
-
38
26
  var Direction;
39
-
40
27
  (function (Direction) {
41
28
  Direction[Direction["Left"] = 0] = "Left";
42
29
  Direction[Direction["Right"] = 1] = "Right";
@@ -44,8 +31,6 @@ var Direction;
44
31
  /**
45
32
  * @hidden
46
33
  */
47
-
48
-
49
34
  var TimePartVue2 = {
50
35
  name: 'KendoTimePart',
51
36
  props: {
@@ -142,7 +127,6 @@ var TimePartVue2 = {
142
127
  },
143
128
  mounted: function mounted() {
144
129
  var _this = this;
145
-
146
130
  this._nowButton = this.$refs.nowButton;
147
131
  this.dateFormatParts.forEach(function (item, idx) {
148
132
  if (item.type !== 'literal') {
@@ -165,9 +149,9 @@ var TimePartVue2 = {
165
149
  render: function render(createElement) {
166
150
  var h = gh || createElement;
167
151
  var _a = this.$props,
168
- format = _a.format,
169
- smoothScroll = _a.smoothScroll,
170
- disabled = _a.disabled;
152
+ format = _a.format,
153
+ smoothScroll = _a.smoothScroll,
154
+ disabled = _a.disabled;
171
155
  this.snapTime = (0, utils_2.snapTime)((0, utils_2.generateSnappers)(this.$props.steps, this.computedMin));
172
156
  this.dateFormatParts = this.intl.splitDateFormat(format).filter(this.timeFormatFilter);
173
157
  var rootClassName = (0, kendo_vue_common_1.classNames)({
@@ -181,7 +165,8 @@ var TimePartVue2 = {
181
165
  "class": "k-time-header"
182
166
  }, [h("span", {
183
167
  "class": "k-title"
184
- }, [this.intl.formatDate(this.computedValue, this.dateFormatParts.reduce(this.timeFormatReducer, ''))]), this.showNowButton() && // @ts-ignore function children
168
+ }, [this.intl.formatDate(this.computedValue, this.dateFormatParts.reduce(this.timeFormatReducer, ''))]), this.showNowButton() &&
169
+ // @ts-ignore function children
185
170
  h(kendo_vue_buttons_1.Button, {
186
171
  type: "button",
187
172
  attrs: this.v3 ? undefined : {
@@ -213,7 +198,6 @@ var TimePartVue2 = {
213
198
  "class": "k-time-highlight"
214
199
  }), this.dateFormatParts.map(function (part, idx) {
215
200
  var _this = this;
216
-
217
201
  return part.type !== 'literal' ? h("div", {
218
202
  key: idx,
219
203
  "class": (0, kendo_vue_common_1.classNames)('k-time-list-wrapper', {
@@ -235,7 +219,8 @@ var TimePartVue2 = {
235
219
  e.preventDefault();
236
220
  }
237
221
  }
238
- }, [this.intl.dateFieldName(part)]), // @ts-ignore function children
222
+ }, [this.intl.dateFieldName(part)]),
223
+ // @ts-ignore function children
239
224
  h(TimeList_1.TimeList, {
240
225
  min: this.computedMin,
241
226
  attrs: this.v3 ? undefined : {
@@ -282,10 +267,8 @@ var TimePartVue2 = {
282
267
  },
283
268
  focus: function focus(args) {
284
269
  var _this = this;
285
-
286
270
  this.$nextTick(function () {
287
271
  var timeList = _this.timeLists[0];
288
-
289
272
  if (!_this.hasActiveButton() && timeList && timeList.$el) {
290
273
  timeList.focus(args);
291
274
  }
@@ -296,15 +279,12 @@ var TimePartVue2 = {
296
279
  },
297
280
  timeFormatFilter: function timeFormatFilter(part, index, all) {
298
281
  var prevItem = index >= 1 && all[index - 1];
299
-
300
282
  if (!prevItem) {
301
283
  return formatRegExp.test(part.type || '');
302
284
  }
303
-
304
285
  if (prevItem && part.type === 'literal') {
305
286
  return formatRegExp.test(prevItem.type || '');
306
287
  }
307
-
308
288
  return formatRegExp.test(part.type || '');
309
289
  },
310
290
  hasActiveButton: function hasActiveButton() {
@@ -314,7 +294,6 @@ var TimePartVue2 = {
314
294
  if (!this.timeLists.length) {
315
295
  return;
316
296
  }
317
-
318
297
  this.timeLists.reduce(this.listReducer, []).map(function (state) {
319
298
  return dir === Direction.Right ? state.next : state.prev;
320
299
  }).map(function (list) {
@@ -327,7 +306,6 @@ var TimePartVue2 = {
327
306
  if (state.length || list.$props.id !== this.activeListIndex) {
328
307
  return state;
329
308
  }
330
-
331
309
  return [{
332
310
  next: all[idx + 1] || list,
333
311
  prev: all[idx - 1] || list
@@ -338,7 +316,6 @@ var TimePartVue2 = {
338
316
  },
339
317
  hasSteps: function hasSteps() {
340
318
  var _this = this;
341
-
342
319
  var keys = Object.keys(this.$props.steps);
343
320
  return keys.length !== keys.reduce(function (acc, k) {
344
321
  return acc + _this.$props.steps[k];
@@ -346,18 +323,15 @@ var TimePartVue2 = {
346
323
  },
347
324
  handleKeyDown: function handleKeyDown(event) {
348
325
  var keyCode = event.keyCode;
349
-
350
326
  switch (keyCode) {
351
327
  case kendo_vue_common_1.Keys.left:
352
328
  event.preventDefault();
353
329
  this.focusList(Direction.Left);
354
330
  return;
355
-
356
331
  case kendo_vue_common_1.Keys.right:
357
332
  event.preventDefault();
358
333
  this.focusList(Direction.Right);
359
334
  return;
360
-
361
335
  default:
362
336
  return;
363
337
  }
@@ -378,6 +352,5 @@ exports.TimePartVue2 = TimePartVue2;
378
352
  /**
379
353
  * @hidden
380
354
  */
381
-
382
355
  var TimePart = TimePartVue2;
383
356
  exports.TimePart = TimePart;