@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.
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
@@ -7,7 +7,6 @@ import { getDefaultSlots } from '@progress/kendo-vue-common';
7
7
  /**
8
8
  * @hidden
9
9
  */
10
-
11
10
  var CalendarWeekCellVue2 = {
12
11
  props: {
13
12
  id: String,
@@ -24,7 +23,6 @@ var CalendarWeekCellVue2 = {
24
23
  v3: v3
25
24
  };
26
25
  },
27
-
28
26
  /**
29
27
  * @return
30
28
  * Returns a `<td />` element with the [`value`]({% slug api_dateinputs_calendarweekcellprops %}#toc-value) as a child.
@@ -54,6 +52,5 @@ var CalendarWeekCellVue2 = {
54
52
  /**
55
53
  * @hidden
56
54
  */
57
-
58
55
  var CalendarWeekCell = CalendarWeekCellVue2;
59
56
  export { CalendarWeekCell, CalendarWeekCellVue2 };
@@ -16,7 +16,6 @@ import { classNames, Keys, getTemplate } from '@progress/kendo-vue-common';
16
16
  /**
17
17
  * @hidden
18
18
  */
19
-
20
19
  var HeaderVue2 = {
21
20
  name: 'KendoHeader',
22
21
  inheritAttrs: false,
@@ -84,22 +83,18 @@ var HeaderVue2 = {
84
83
  if (!this.$props.currentDate) {
85
84
  return '';
86
85
  }
87
-
88
86
  var take = this.$props.rangeLength - 1;
89
87
  var title = this.$props.service.title(this.$props.currentDate);
90
88
  var nextDate = this.$props.service.addToDate(this.$props.currentDate, take);
91
-
92
89
  if (take < 1 || !this.$props.service.isInRange(nextDate, this.$props.min, this.$props.max)) {
93
90
  return title;
94
91
  }
95
-
96
92
  return "".concat(title, " - ").concat(this.$props.service.title(nextDate));
97
93
  },
98
94
  handleTitleClick: function handleTitleClick(event) {
99
95
  if (!this.navigate) {
100
96
  return;
101
97
  }
102
-
103
98
  this.$props.bus.moveUp(this.$props.activeView, event);
104
99
  this.$emit('titleclick', event);
105
100
  },
@@ -107,7 +102,6 @@ var HeaderVue2 = {
107
102
  if (!this.$props.service) {
108
103
  return false;
109
104
  }
110
-
111
105
  var candidate = this.$props.service.move(this.$props.focusedDate, action);
112
106
  return this.$props.min <= candidate && candidate <= this.$props.max || this.$props.service.isInSameView(candidate, this.$props.min) || this.$props.service.isInSameView(candidate, this.$props.max);
113
107
  },
@@ -137,7 +131,6 @@ var HeaderVue2 = {
137
131
  if (!this.todayIsInRange) {
138
132
  return;
139
133
  }
140
-
141
134
  this.$props.bus.moveToBottom(this.$props.activeView);
142
135
  var args = {
143
136
  event: event,
@@ -148,7 +141,6 @@ var HeaderVue2 = {
148
141
  },
149
142
  todayKeyDown: function todayKeyDown(event) {
150
143
  var keyCode = event.keyCode;
151
-
152
144
  if (keyCode === Keys.enter) {
153
145
  this.handleTodayClick(event);
154
146
  }
@@ -167,15 +159,10 @@ var HeaderVue2 = {
167
159
  render: function render(createElement) {
168
160
  var h = gh || createElement;
169
161
  this._localization = provideLocalizationService(this);
170
-
171
162
  var todayMessage = this._localization.toLanguageString(today, messages[today]);
172
-
173
163
  var title = this.getTitle();
174
-
175
164
  var prevViewTitle = this._localization.toLanguageString(prevView, messages[prevView]);
176
-
177
165
  var nextViewTittle = this._localization.toLanguageString(nextView, messages[nextView]);
178
-
179
166
  var isPrevDisabled = !this.canNavigate(Action.PrevView);
180
167
  var isNextDisabled = !this.canNavigate(Action.NextView);
181
168
  var titleClassNames = classNames('k-calendar-title', 'k-title', {
@@ -185,7 +172,8 @@ var HeaderVue2 = {
185
172
  'k-disabled': !this.todayIsInRange
186
173
  });
187
174
  var headerTitle;
188
- var headerTitleDefaultRendering = // @ts-ignore function children
175
+ var headerTitleDefaultRendering =
176
+ // @ts-ignore function children
189
177
  h(CalendarHeaderTitle, {
190
178
  value: title,
191
179
  attrs: this.v3 ? undefined : {
@@ -212,7 +200,8 @@ var HeaderVue2 = {
212
200
  "class": 'k-spacer'
213
201
  }), h("span", {
214
202
  "class": 'k-calendar-nav k-hstack'
215
- }, [// @ts-ignore
203
+ }, [
204
+ // @ts-ignore
216
205
  h(KButton, {
217
206
  type: "button",
218
207
  attrs: this.v3 ? undefined : {
@@ -247,7 +236,8 @@ var HeaderVue2 = {
247
236
  "click": this.handleTodayClick
248
237
  },
249
238
  onClick: this.handleTodayClick
250
- }, [todayMessage]), // @ts-ignore
239
+ }, [todayMessage]),
240
+ // @ts-ignore
251
241
  h(KButton, {
252
242
  type: "button",
253
243
  attrs: this.v3 ? undefined : {
@@ -276,6 +266,5 @@ var HeaderVue2 = {
276
266
  /**
277
267
  * @hidden
278
268
  */
279
-
280
269
  var Header = HeaderVue2;
281
270
  export { Header, HeaderVue2 };
@@ -15,7 +15,6 @@ import { WeekNamesService } from '../services/main.js';
15
15
  /**
16
16
  * @hidden
17
17
  */
18
-
19
18
  var ViewVue2 = {
20
19
  name: 'KendoView',
21
20
  inject: {
@@ -97,7 +96,6 @@ var ViewVue2 = {
97
96
  if (!this.weekNumber) {
98
97
  return null;
99
98
  }
100
-
101
99
  return weekInYear(date, this._intl.firstDay());
102
100
  },
103
101
  firstDate: function firstDate(row) {
@@ -108,14 +106,11 @@ var ViewVue2 = {
108
106
  if (!this.weekNumber) {
109
107
  return null;
110
108
  }
111
-
112
109
  var idx = 0;
113
110
  var ctx = rowCtx[idx];
114
-
115
111
  while (!ctx && idx < rowCtx.length) {
116
112
  ctx = rowCtx[++idx];
117
113
  }
118
-
119
114
  return ctx;
120
115
  },
121
116
  handleClick: function handleClick(value, event) {
@@ -161,17 +156,16 @@ var ViewVue2 = {
161
156
  render: function render(createElement) {
162
157
  var h = gh || createElement;
163
158
  this._intl = provideIntlService(this);
164
- this._weekService = new WeekNamesService(this._intl); // tslint:disable-next-line jsx-use-translation-function
165
-
159
+ this._weekService = new WeekNamesService(this._intl);
160
+ // tslint:disable-next-line jsx-use-translation-function
166
161
  var emptyCell = function emptyCell(idx) {
167
162
  return h("td", {
168
163
  key: idx
169
164
  });
170
- }; // const weekNames = this._weekService.getWeekNames(this.weekNumber);
165
+ };
166
+ // const weekNames = this._weekService.getWeekNames(this.weekNumber);
171
167
  // const colSpan = this.$props.service.rowLength(this.weekNumber);
172
168
  // const title = this.$props.service.title(this.$props.viewDate);
173
-
174
-
175
169
  var time = getToday();
176
170
  var focusedDate = this.$props.isActive ? this.$props.focusedDate : null;
177
171
  var viewDate = setTime(this.$props.viewDate, time);
@@ -185,17 +179,15 @@ var ViewVue2 = {
185
179
  selectionRange: this.$props.selectionRange,
186
180
  viewDate: viewDate
187
181
  });
188
-
189
182
  var buildWeekNumber = function buildWeekNumber(row, idx) {
190
183
  var firstDayOfWeek = this.firstDate(row);
191
-
192
184
  if (!firstDayOfWeek) {
193
185
  return emptyCell("week-cell-".concat(idx));
194
186
  }
195
-
196
187
  var weekCellValue = this.getWeekNumber(this.firstDate(row));
197
188
  var uniqueID = "kendo-vue-calendar-week-cell-".concat(weekCellValue);
198
- var cellDefaultRendering = // @ts-ignore function children
189
+ var cellDefaultRendering =
190
+ // @ts-ignore function children
199
191
  h(CalendarWeekCell, {
200
192
  "class": 'k-calendar-td k-alt',
201
193
  value: weekCellValue,
@@ -224,15 +216,14 @@ var ViewVue2 = {
224
216
  }
225
217
  });
226
218
  };
227
-
228
219
  var buildRow = function buildRow(row) {
229
220
  return row.map(function (cell, idx) {
230
221
  if (!cell) {
231
222
  return emptyCell(idx);
232
223
  }
233
-
234
224
  var uniqueID = "kendo-vue-calendar-cell-".concat(cell.value.getTime());
235
- var cellDefaultRendering = // @ts-ignore function children
225
+ var cellDefaultRendering =
226
+ // @ts-ignore function children
236
227
  h(CalendarCell, {
237
228
  "aria-selected": cell.isSelected,
238
229
  attrs: this.v3 ? undefined : {
@@ -317,7 +308,6 @@ var ViewVue2 = {
317
308
  });
318
309
  }, this);
319
310
  };
320
-
321
311
  return h("tbody", {
322
312
  "class": 'k-calendar-tbody',
323
313
  role: 'rowgroup',
@@ -339,6 +329,5 @@ var ViewVue2 = {
339
329
  /**
340
330
  * @hidden
341
331
  */
342
-
343
332
  var View = ViewVue2;
344
333
  export { View, ViewVue2 };
@@ -15,7 +15,6 @@ var VIEWS_COUNT = 5;
15
15
  /**
16
16
  * @hidden
17
17
  */
18
-
19
18
  var ViewListVue2 = {
20
19
  name: 'KendoViewList',
21
20
  inheritAttrs: false,
@@ -105,14 +104,16 @@ var ViewListVue2 = {
105
104
  created: function created() {
106
105
  this.lastView = this.$props.activeView;
107
106
  this.lastFocus = this.$props.focusedDate;
108
- this.shouldScroll = false; // this.$data.skip = this.$props.service.skip(this.$props.focusedDate, this.$props.min);
107
+ this.shouldScroll = false;
108
+ // this.$data.skip = this.$props.service.skip(this.$props.focusedDate, this.$props.min);
109
109
  // this.$data.index = this.$props.service.skip(this.$props.focusedDate, this.$props.min);
110
110
  },
111
+
111
112
  updated: function updated() {
112
113
  this.shouldScroll = false;
113
114
  this.lastView = this.$props.activeView;
114
- this.$data.lastViewsCount = this.$props.views; // this.lastFocus = this.$props.focusedDate;
115
-
115
+ this.$data.lastViewsCount = this.$props.views;
116
+ // this.lastFocus = this.$props.focusedDate;
116
117
  this.indexToScroll = undefined;
117
118
  },
118
119
  methods: {
@@ -125,7 +126,8 @@ var ViewListVue2 = {
125
126
  handleKeyDown: function handleKeyDown(event) {
126
127
  this.$emit('listkeydown', event);
127
128
  },
128
- handleVirtualizationMount: function handleVirtualizationMount(_virtualization) {// this.virtualization = virtualization;
129
+ handleVirtualizationMount: function handleVirtualizationMount(_virtualization) {
130
+ // this.virtualization = virtualization;
129
131
  // if (this.virtualization && this.table) {
130
132
  // this.table.style.transform = `translateY(${this.viewOffset}px)`;
131
133
  // const viewDate = dateInRange(this.$props.focusedDate, this.$props.min, this.$props.max);
@@ -137,7 +139,6 @@ var ViewListVue2 = {
137
139
  if (!this.$props.dom) {
138
140
  return;
139
141
  }
140
-
141
142
  var scrollableHeight = this.$props.activeView === CalendarViewEnum.month ? this.$props.dom.scrollableContentHeight : this.$props.dom.scrollableYearContentHeight;
142
143
  this._bottomOffset = scrollableHeight - this.$props.dom.viewHeight(this.$props.activeView);
143
144
  this._viewOffset = -1 * this.$props.dom.headerHeight;
@@ -146,7 +147,8 @@ var ViewListVue2 = {
146
147
  getTake: function getTake(skip, total) {
147
148
  return Math.min(total - skip, this.$props.take);
148
149
  },
149
- handleScrollAction: function handleScrollAction() {// const skip = pageAction ? pageAction.skip : this.$data.skip;
150
+ handleScrollAction: function handleScrollAction() {
151
+ // const skip = pageAction ? pageAction.skip : this.$data.skip;
150
152
  // if (this.$data.index !== index || this.$data.skip !== skip) {
151
153
  // this.$data.index = skip;
152
154
  // }
@@ -171,7 +173,6 @@ var ViewListVue2 = {
171
173
  if (isTodayClick === void 0) {
172
174
  isTodayClick = false;
173
175
  }
174
-
175
176
  var args = {
176
177
  event: event.event,
177
178
  value: cloneDate(event.value),
@@ -197,7 +198,6 @@ var ViewListVue2 = {
197
198
  if (selectionRange.start === null || selectionRange.end === null) {
198
199
  return selectionRange;
199
200
  }
200
-
201
201
  var needRotate = selectionRange.end < selectionRange.start;
202
202
  return {
203
203
  start: needRotate ? selectionRange.end : selectionRange.start,
@@ -233,7 +233,6 @@ var ViewListVue2 = {
233
233
  'k-decade': this.$props.activeView === CalendarViewEnum.decade,
234
234
  'k-century': this.$props.activeView === CalendarViewEnum.century
235
235
  });
236
-
237
236
  var buildMonthView = function buildMonthView(weekNames) {
238
237
  var that = this;
239
238
  return h("thead", {
@@ -255,7 +254,6 @@ var ViewListVue2 = {
255
254
  }, [name]);
256
255
  }, this)])]);
257
256
  };
258
-
259
257
  var buildDates = function buildDates() {
260
258
  var cellUID = this.$props.cellUID;
261
259
  return this.$props.dates.map(function (vDate) {
@@ -277,7 +275,8 @@ var ViewListVue2 = {
277
275
  on: this.v3 ? undefined : {
278
276
  "keydown": this.handleKeyDown
279
277
  }
280
- }, [this.$props.activeView === CalendarViewEnum.month && buildMonthView.call(this, this.weekNames), // @ts-ignore function children
278
+ }, [this.$props.activeView === CalendarViewEnum.month && buildMonthView.call(this, this.weekNames),
279
+ // @ts-ignore function children
281
280
  h(View, {
282
281
  key: vDate.getTime(),
283
282
  activeView: this.$props.activeView,
@@ -323,7 +322,6 @@ var ViewListVue2 = {
323
322
  })]);
324
323
  }, this);
325
324
  };
326
-
327
325
  return h("div", {
328
326
  "class": rootClassNames,
329
327
  onFocusin: this.handleFocus,
@@ -338,6 +336,5 @@ var ViewListVue2 = {
338
336
  /**
339
337
  * @hidden
340
338
  */
341
-
342
339
  var ViewList = ViewListVue2;
343
340
  export { ViewList, ViewListVue2 };
@@ -7,7 +7,6 @@ import { getDefaultSlots } from '@progress/kendo-vue-common';
7
7
  /**
8
8
  * @hidden
9
9
  */
10
-
11
10
  var PickerWrapVue2 = {
12
11
  props: {
13
12
  id: String
@@ -35,6 +34,5 @@ var PickerWrapVue2 = {
35
34
  /**
36
35
  * @hidden
37
36
  */
38
-
39
37
  var PickerWrap = PickerWrapVue2;
40
38
  export { PickerWrap, PickerWrapVue2 };