@progress/kendo-vue-scheduler 3.0.9 → 3.1.1-dev.202203151205

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 (108) hide show
  1. package/dist/cdn/js/kendo-vue-scheduler.js +2 -2
  2. package/dist/es/Scheduler.d.ts +1 -1
  3. package/dist/es/Scheduler.js +133 -683
  4. package/dist/es/components/ShowMoreItemsButton.js +1 -2
  5. package/dist/es/components/footer/bussiness-hours/{BussinessHours.d.ts → BusinessHours.d.ts} +1 -0
  6. package/dist/es/components/footer/bussiness-hours/BusinessHours.js +88 -0
  7. package/dist/es/components/header/navigation/NavigationDatePicker.js +2 -3
  8. package/dist/es/components/header/navigation/SchedulerNavigation.js +319 -3
  9. package/dist/es/components/header/view-selector/SchedulerViewSelector.js +4 -3
  10. package/dist/es/components/header/view-selector/ViewSelectorList.js +9 -2
  11. package/dist/es/context/SchedulerResourceIteratorContext.d.ts +1 -0
  12. package/dist/es/context/SchedulerResourceIteratorContext.js +3 -2
  13. package/dist/es/items/SchedulerEditItem.js +10 -9
  14. package/dist/es/items/SchedulerItem.d.ts +2 -0
  15. package/dist/es/items/SchedulerItem.js +111 -29
  16. package/dist/es/items/SchedulerViewItem.js +80 -92
  17. package/dist/es/main.d.ts +5 -1
  18. package/dist/es/main.js +5 -11
  19. package/dist/es/package-metadata.js +1 -1
  20. package/dist/es/slots/SchedulerEditSlot.js +23 -9
  21. package/dist/es/slots/SchedulerSlot.d.ts +4 -0
  22. package/dist/es/slots/SchedulerSlot.js +96 -21
  23. package/dist/es/slots/SchedulerViewSlot.d.ts +1 -1
  24. package/dist/es/slots/SchedulerViewSlot.js +53 -30
  25. package/dist/es/tasks/SchedulerEditTask.js +56 -49
  26. package/dist/es/tasks/SchedulerTask.js +57 -4
  27. package/dist/es/tasks/SchedulerViewTask.js +17 -22
  28. package/dist/es/views/agenda/AgendaView.js +18 -9
  29. package/dist/es/views/agenda/AgendaViewBody.d.ts +1 -0
  30. package/dist/es/views/agenda/AgendaViewBody.js +2 -1
  31. package/dist/es/views/common/VerticalResourceIterator.d.ts +1 -0
  32. package/dist/es/views/common/VerticalResourceIterator.js +124 -28
  33. package/dist/es/views/day/DayView.js +9 -3
  34. package/dist/es/views/day/DayViewAllDaySlots.d.ts +1 -0
  35. package/dist/es/views/day/DayViewAllDaySlots.js +3 -2
  36. package/dist/es/views/day/DayViewMiddleRow.js +12 -9
  37. package/dist/es/views/day/DayViewVerticalRow.d.ts +41 -0
  38. package/dist/es/views/day/DayViewVerticalRow.js +101 -0
  39. package/dist/es/views/day/DayViewVerticalSlotsRow.d.ts +50 -0
  40. package/dist/es/views/day/DayViewVerticalSlotsRow.js +132 -0
  41. package/dist/es/views/day/MultiDayView.d.ts +1 -1
  42. package/dist/es/views/day/MultiDayView.js +167 -284
  43. package/dist/es/views/month/MonthView.d.ts +1 -1
  44. package/dist/es/views/month/MonthView.js +56 -65
  45. package/dist/es/views/month/MonthViewBody.d.ts +2 -0
  46. package/dist/es/views/month/MonthViewBody.js +36 -51
  47. package/dist/es/views/time/MultiDayTimelineView.d.ts +2 -2
  48. package/dist/es/views/time/MultiDayTimelineView.js +52 -41
  49. package/dist/es/views/time/TimelineView.js +9 -3
  50. package/dist/es/views/time/TimelineViewBody.d.ts +2 -0
  51. package/dist/es/views/time/TimelineViewBody.js +6 -2
  52. package/dist/es/views/week/WeekView.js +9 -3
  53. package/dist/es/views/week/WorkWeekView.js +9 -3
  54. package/dist/npm/Scheduler.d.ts +1 -1
  55. package/dist/npm/Scheduler.js +131 -683
  56. package/dist/npm/components/ShowMoreItemsButton.js +1 -2
  57. package/dist/npm/components/footer/bussiness-hours/{BussinessHours.d.ts → BusinessHours.d.ts} +1 -0
  58. package/dist/npm/components/footer/bussiness-hours/BusinessHours.js +102 -0
  59. package/dist/npm/components/header/navigation/NavigationDatePicker.js +2 -3
  60. package/dist/npm/components/header/navigation/SchedulerNavigation.js +323 -4
  61. package/dist/npm/components/header/view-selector/SchedulerViewSelector.js +5 -3
  62. package/dist/npm/components/header/view-selector/ViewSelectorList.js +9 -2
  63. package/dist/npm/context/SchedulerResourceIteratorContext.d.ts +1 -0
  64. package/dist/npm/context/SchedulerResourceIteratorContext.js +3 -2
  65. package/dist/npm/items/SchedulerEditItem.js +10 -9
  66. package/dist/npm/items/SchedulerItem.d.ts +2 -0
  67. package/dist/npm/items/SchedulerItem.js +111 -29
  68. package/dist/npm/items/SchedulerViewItem.js +81 -92
  69. package/dist/npm/main.d.ts +5 -1
  70. package/dist/npm/main.js +9 -11
  71. package/dist/npm/package-metadata.js +1 -1
  72. package/dist/npm/slots/SchedulerEditSlot.js +23 -9
  73. package/dist/npm/slots/SchedulerSlot.d.ts +4 -0
  74. package/dist/npm/slots/SchedulerSlot.js +96 -20
  75. package/dist/npm/slots/SchedulerViewSlot.d.ts +1 -1
  76. package/dist/npm/slots/SchedulerViewSlot.js +52 -29
  77. package/dist/npm/tasks/SchedulerEditTask.js +57 -49
  78. package/dist/npm/tasks/SchedulerTask.js +57 -3
  79. package/dist/npm/tasks/SchedulerViewTask.js +17 -21
  80. package/dist/npm/views/agenda/AgendaView.js +18 -9
  81. package/dist/npm/views/agenda/AgendaViewBody.d.ts +1 -0
  82. package/dist/npm/views/agenda/AgendaViewBody.js +2 -1
  83. package/dist/npm/views/common/VerticalResourceIterator.d.ts +1 -0
  84. package/dist/npm/views/common/VerticalResourceIterator.js +127 -28
  85. package/dist/npm/views/day/DayView.js +9 -3
  86. package/dist/npm/views/day/DayViewAllDaySlots.d.ts +1 -0
  87. package/dist/npm/views/day/DayViewAllDaySlots.js +3 -2
  88. package/dist/npm/views/day/DayViewMiddleRow.js +12 -9
  89. package/dist/npm/views/day/DayViewVerticalRow.d.ts +41 -0
  90. package/dist/npm/views/day/DayViewVerticalRow.js +113 -0
  91. package/dist/npm/views/day/DayViewVerticalSlotsRow.d.ts +50 -0
  92. package/dist/npm/views/day/DayViewVerticalSlotsRow.js +145 -0
  93. package/dist/npm/views/day/MultiDayView.d.ts +1 -1
  94. package/dist/npm/views/day/MultiDayView.js +168 -285
  95. package/dist/npm/views/month/MonthView.d.ts +1 -1
  96. package/dist/npm/views/month/MonthView.js +56 -65
  97. package/dist/npm/views/month/MonthViewBody.d.ts +2 -0
  98. package/dist/npm/views/month/MonthViewBody.js +36 -52
  99. package/dist/npm/views/time/MultiDayTimelineView.d.ts +2 -2
  100. package/dist/npm/views/time/MultiDayTimelineView.js +52 -41
  101. package/dist/npm/views/time/TimelineView.js +9 -3
  102. package/dist/npm/views/time/TimelineViewBody.d.ts +2 -0
  103. package/dist/npm/views/time/TimelineViewBody.js +6 -2
  104. package/dist/npm/views/week/WeekView.js +9 -3
  105. package/dist/npm/views/week/WorkWeekView.js +9 -3
  106. package/package.json +12 -12
  107. package/dist/es/components/footer/bussiness-hours/BussinessHours.js +0 -33
  108. package/dist/npm/components/footer/bussiness-hours/BussinessHours.js +0 -44
@@ -33,18 +33,16 @@ import * as Vue from 'vue';
33
33
  var allVue = Vue;
34
34
  var gh = allVue.h;
35
35
  import { getModelFields, getField, findMaster, setField, toSchedulerGroups, getToday } from './utils';
36
- import { clone, getListeners, templateRendering } from '@progress/kendo-vue-common';
36
+ import { clone, getListeners, getTemplate, templateRendering } from '@progress/kendo-vue-common';
37
37
  import { provideIntlService, provideLocalizationService } from '@progress/kendo-vue-intl';
38
38
  import { SchedulerHeader } from './components/header/SchedulerHeader';
39
39
  import { SchedulerNavigation } from './components/header/navigation/SchedulerNavigation';
40
40
  import { SchedulerViewSelector } from './components/header/view-selector/SchedulerViewSelector';
41
41
  import { addDays, addMonths } from '@progress/kendo-date-math';
42
42
  import { SchedulerFooter } from './components/footer/SchedulerFooter';
43
- import { Button, ToolbarSpacer, ButtonGroup } from '@progress/kendo-vue-buttons';
44
- import { showFullDay, showWorkDay, messages, today, previousTitle, nextTitle } from './messages';
43
+ import { ToolbarSpacer } from '@progress/kendo-vue-buttons';
45
44
  import { NavigationDatePicker } from './components/header/navigation/NavigationDatePicker';
46
- import { ViewSelectorList } from './components/header/view-selector/ViewSelectorList';
47
- import { BusinessHours } from './components/footer/bussiness-hours/BussinessHours';
45
+ import { BusinessHours } from './components/footer/bussiness-hours/BusinessHours';
48
46
  import { DayView } from './views/day/DayView'; // import { SchedulerFormProps } from './editors/SchedulerFormEditor';
49
47
 
50
48
  import { validatePackage } from '@progress/kendo-vue-common';
@@ -106,7 +104,10 @@ var SchedulerVue2 = {
106
104
  default: new Date()
107
105
  },
108
106
  header: [String, Function, Object],
109
- footer: [String, Function, Object]
107
+ footer: [String, Function, Object],
108
+ slotRender: [String, Function, Object],
109
+ item: [String, Function, Object],
110
+ task: [String, Function, Object]
110
111
  },
111
112
  computed: {
112
113
  wrapperClassName: function wrapperClassName() {
@@ -126,7 +127,13 @@ var SchedulerVue2 = {
126
127
  return {
127
128
  ks: this.ks,
128
129
  setActiveViewName: this.handleActiveViewNameChange,
129
- setActiveDate: this.handleDateChange
130
+ setActiveDate: this.handleDateChange,
131
+ itemDoubleClick: this.handleItemDoubleClick,
132
+ itemClick: this.handleItemClick,
133
+ slotDoubleClick: this.handleSlotDoubleClick,
134
+ slotClick: this.handleSlotClick,
135
+ taskDoubleClick: this.handleTaskDoubleClick,
136
+ taskClick: this.handleTaskClick
130
137
  };
131
138
  },
132
139
  data: function data() {
@@ -173,6 +180,10 @@ var SchedulerVue2 = {
173
180
  watch: {
174
181
  view: function view(newName) {
175
182
  this.updatePassedState(newName);
183
+ },
184
+ timezone: function timezone(newName) {
185
+ this.ks.timezone = newName;
186
+ this.updatePassedState();
176
187
  }
177
188
  },
178
189
  // @ts-ignore
@@ -196,11 +207,11 @@ var SchedulerVue2 = {
196
207
  return currentView.name === _this.ks.activeViewName;
197
208
  }) || this.views[0] || h(DayView);
198
209
  var slotDuration = this.getViewPropValue(this.ks.view, 'slotDuration', this.ks.activeViewName);
199
- var todayText = this.localization.toLanguageString(today, messages[today]);
200
- var previousText = this.localization.toLanguageString(previousTitle, messages[previousTitle]);
201
- var nextText = this.localization.toLanguageString(nextTitle, messages[nextTitle]);
202
- var heaeder = templateRendering.call(this, view.header || this.$props.header, getListeners.call(this));
210
+ var header = templateRendering.call(this, view.header || this.$props.header, getListeners.call(this));
203
211
  var footer = templateRendering.call(this, view.footer || this.$props.footer, getListeners.call(this));
212
+ var slotRender = templateRendering.call(this, view.slot || this.$props.slotRender, {});
213
+ var item = templateRendering.call(this, view.item || this.$props.item, {});
214
+ var task = templateRendering.call(this, view.task || this.$props.task, {});
204
215
  var ViewSelector = SchedulerViewSelector;
205
216
  var viewComponent = this.getViewComponentByName(this.ks.activeViewName || view.name);
206
217
 
@@ -209,329 +220,25 @@ var SchedulerVue2 = {
209
220
  dataItems: undefined,
210
221
  views: undefined,
211
222
  defaultDate: undefined,
212
- dateRange: this.ks.dateRange
223
+ dateRange: this.ks.dateRange,
224
+ slotRender: slotRender,
225
+ item: item,
226
+ task: task
213
227
  });
214
228
 
215
- return h("div", {
216
- id: this.$props.id,
217
- attrs: this.v3 ? undefined : {
218
- id: this.$props.id,
219
- tabIndex: this.$props.tabIndex // Aria
220
- // dir={dir}
221
- ,
222
- role: this.$props.role,
223
- "aria-label": this.$props.ariaLabel,
224
- "aria-labelledby": this.$props.ariaLabelledby // Handlers
225
-
226
- },
227
- style: {
228
- height: this.$props.height + 'px'
229
- },
230
- "class": this.wrapperClassName,
231
- tabIndex: this.$props.tabIndex,
232
- role: this.$props.role,
233
- "aria-label": this.$props.ariaLabel,
234
- "aria-labelledby": this.$props.ariaLabelledby,
235
- onFocusin: this.handleFocus,
236
- on: this.v3 ? undefined : {
237
- "focusin": this.handleFocus,
238
- "focusout": this.handleBlur
239
- },
240
- onFocusout: this.handleBlur
241
- }, [// @ts-ignore function children
229
+ var headerRender;
230
+ var headerRenderDefaultRendering = // @ts-ignore function children
242
231
  h(SchedulerHeader, this.v3 ? function () {
243
- return [// @ts-ignore function children
244
- h(SchedulerNavigation, _this2.v3 ? function () {
245
- return [// @ts-ignore function children
246
- h(ButtonGroup, {
247
- "class": "k-scheduler-navigation"
248
- }, _this2.v3 ? function () {
249
- return [// @ts-ignore function children
250
- h(Button, {
251
- role: "button",
252
- attrs: _this2.v3 ? undefined : {
253
- role: "button",
254
- tabIndex: -1,
255
- title: todayText,
256
- "aria-label": todayText
257
- },
258
- tabIndex: -1,
259
- title: todayText,
260
- "aria-label": todayText,
261
- onClick: _this2.handleTodayClick,
262
- on: _this2.v3 ? undefined : {
263
- "click": _this2.handleTodayClick
264
- }
265
- }, _this2.v3 ? function () {
266
- return [todayText];
267
- } : [todayText]), // @ts-ignore function children
268
- h(Button, {
269
- role: "button",
270
- attrs: _this2.v3 ? undefined : {
271
- role: "button",
272
- tabIndex: -1,
273
- title: previousText,
274
- "aria-label": previousText
275
- },
276
- tabIndex: -1,
277
- "class": "k-button-icon",
278
- title: previousText,
279
- "aria-label": previousText,
280
- onClick: _this2.handlePrevClick,
281
- on: _this2.v3 ? undefined : {
282
- "click": _this2.handlePrevClick
283
- }
284
- }, _this2.v3 ? function () {
285
- return [h("span", {
286
- "class": "k-button-text"
287
- }, [h("span", {
288
- "class": "k-icon k-i-arrow-60-left"
289
- })])];
290
- } : [h("span", {
291
- "class": "k-button-text"
292
- }, [h("span", {
293
- "class": "k-icon k-i-arrow-60-left"
294
- })])]), // @ts-ignore function children
295
- h(Button, {
296
- role: "button",
297
- attrs: _this2.v3 ? undefined : {
298
- role: "button",
299
- tabIndex: -1,
300
- title: nextText,
301
- "aria-label": nextText
302
- },
303
- tabIndex: -1,
304
- "class": "k-button-icon",
305
- title: nextText,
306
- "aria-label": nextText,
307
- onClick: _this2.handleNextClick,
308
- on: _this2.v3 ? undefined : {
309
- "click": _this2.handleNextClick
310
- }
311
- }, _this2.v3 ? function () {
312
- return [h("span", {
313
- "class": "k-button-text"
314
- }, [h("span", {
315
- "class": "k-icon k-i-arrow-60-right"
316
- })])];
317
- } : [h("span", {
318
- "class": "k-button-text"
319
- }, [h("span", {
320
- "class": "k-icon k-i-arrow-60-right"
321
- })])])];
322
- } : [h(Button, {
323
- role: "button",
324
- attrs: _this2.v3 ? undefined : {
325
- role: "button",
326
- tabIndex: -1,
327
- title: todayText,
328
- "aria-label": todayText
329
- },
330
- tabIndex: -1,
331
- title: todayText,
332
- "aria-label": todayText,
333
- onClick: _this2.handleTodayClick,
334
- on: _this2.v3 ? undefined : {
335
- "click": _this2.handleTodayClick
336
- }
337
- }, _this2.v3 ? function () {
338
- return [todayText];
339
- } : [todayText]), h(Button, {
340
- role: "button",
341
- attrs: _this2.v3 ? undefined : {
342
- role: "button",
343
- tabIndex: -1,
344
- title: previousText,
345
- "aria-label": previousText
346
- },
347
- tabIndex: -1,
348
- "class": "k-button-icon",
349
- title: previousText,
350
- "aria-label": previousText,
351
- onClick: _this2.handlePrevClick,
352
- on: _this2.v3 ? undefined : {
353
- "click": _this2.handlePrevClick
354
- }
355
- }, _this2.v3 ? function () {
356
- return [h("span", {
357
- "class": "k-button-text"
358
- }, [h("span", {
359
- "class": "k-icon k-i-arrow-60-left"
360
- })])];
361
- } : [h("span", {
362
- "class": "k-button-text"
363
- }, [h("span", {
364
- "class": "k-icon k-i-arrow-60-left"
365
- })])]), h(Button, {
366
- role: "button",
367
- attrs: _this2.v3 ? undefined : {
368
- role: "button",
369
- tabIndex: -1,
370
- title: nextText,
371
- "aria-label": nextText
372
- },
373
- tabIndex: -1,
374
- "class": "k-button-icon",
375
- title: nextText,
376
- "aria-label": nextText,
377
- onClick: _this2.handleNextClick,
378
- on: _this2.v3 ? undefined : {
379
- "click": _this2.handleNextClick
380
- }
381
- }, _this2.v3 ? function () {
382
- return [h("span", {
383
- "class": "k-button-text"
384
- }, [h("span", {
385
- "class": "k-icon k-i-arrow-60-right"
386
- })])];
387
- } : [h("span", {
388
- "class": "k-button-text"
389
- }, [h("span", {
390
- "class": "k-icon k-i-arrow-60-right"
391
- })])])])];
392
- } : [h(ButtonGroup, {
393
- "class": "k-scheduler-navigation"
394
- }, _this2.v3 ? function () {
395
- return [h(Button, {
396
- role: "button",
397
- attrs: _this2.v3 ? undefined : {
398
- role: "button",
399
- tabIndex: -1,
400
- title: todayText,
401
- "aria-label": todayText
402
- },
403
- tabIndex: -1,
404
- title: todayText,
405
- "aria-label": todayText,
406
- onClick: _this2.handleTodayClick,
407
- on: _this2.v3 ? undefined : {
408
- "click": _this2.handleTodayClick
409
- }
410
- }, _this2.v3 ? function () {
411
- return [todayText];
412
- } : [todayText]), h(Button, {
413
- role: "button",
414
- attrs: _this2.v3 ? undefined : {
415
- role: "button",
416
- tabIndex: -1,
417
- title: previousText,
418
- "aria-label": previousText
419
- },
420
- tabIndex: -1,
421
- "class": "k-button-icon",
422
- title: previousText,
423
- "aria-label": previousText,
424
- onClick: _this2.handlePrevClick,
425
- on: _this2.v3 ? undefined : {
426
- "click": _this2.handlePrevClick
427
- }
428
- }, _this2.v3 ? function () {
429
- return [h("span", {
430
- "class": "k-button-text"
431
- }, [h("span", {
432
- "class": "k-icon k-i-arrow-60-left"
433
- })])];
434
- } : [h("span", {
435
- "class": "k-button-text"
436
- }, [h("span", {
437
- "class": "k-icon k-i-arrow-60-left"
438
- })])]), h(Button, {
439
- role: "button",
440
- attrs: _this2.v3 ? undefined : {
441
- role: "button",
442
- tabIndex: -1,
443
- title: nextText,
444
- "aria-label": nextText
445
- },
446
- tabIndex: -1,
447
- "class": "k-button-icon",
448
- title: nextText,
449
- "aria-label": nextText,
450
- onClick: _this2.handleNextClick,
451
- on: _this2.v3 ? undefined : {
452
- "click": _this2.handleNextClick
453
- }
454
- }, _this2.v3 ? function () {
455
- return [h("span", {
456
- "class": "k-button-text"
457
- }, [h("span", {
458
- "class": "k-icon k-i-arrow-60-right"
459
- })])];
460
- } : [h("span", {
461
- "class": "k-button-text"
462
- }, [h("span", {
463
- "class": "k-icon k-i-arrow-60-right"
464
- })])])];
465
- } : [h(Button, {
466
- role: "button",
467
- attrs: _this2.v3 ? undefined : {
468
- role: "button",
469
- tabIndex: -1,
470
- title: todayText,
471
- "aria-label": todayText
472
- },
473
- tabIndex: -1,
474
- title: todayText,
475
- "aria-label": todayText,
476
- onClick: _this2.handleTodayClick,
232
+ return [h(SchedulerNavigation, {
233
+ onPrevclick: _this2.handlePrevClick,
477
234
  on: _this2.v3 ? undefined : {
478
- "click": _this2.handleTodayClick
479
- }
480
- }, _this2.v3 ? function () {
481
- return [todayText];
482
- } : [todayText]), h(Button, {
483
- role: "button",
484
- attrs: _this2.v3 ? undefined : {
485
- role: "button",
486
- tabIndex: -1,
487
- title: previousText,
488
- "aria-label": previousText
489
- },
490
- tabIndex: -1,
491
- "class": "k-button-icon",
492
- title: previousText,
493
- "aria-label": previousText,
494
- onClick: _this2.handlePrevClick,
495
- on: _this2.v3 ? undefined : {
496
- "click": _this2.handlePrevClick
497
- }
498
- }, _this2.v3 ? function () {
499
- return [h("span", {
500
- "class": "k-button-text"
501
- }, [h("span", {
502
- "class": "k-icon k-i-arrow-60-left"
503
- })])];
504
- } : [h("span", {
505
- "class": "k-button-text"
506
- }, [h("span", {
507
- "class": "k-icon k-i-arrow-60-left"
508
- })])]), h(Button, {
509
- role: "button",
510
- attrs: _this2.v3 ? undefined : {
511
- role: "button",
512
- tabIndex: -1,
513
- title: nextText,
514
- "aria-label": nextText
235
+ "prevclick": _this2.handlePrevClick,
236
+ "nextclick": _this2.handleNextClick,
237
+ "todayclick": _this2.handleTodayClick
515
238
  },
516
- tabIndex: -1,
517
- "class": "k-button-icon",
518
- title: nextText,
519
- "aria-label": nextText,
520
- onClick: _this2.handleNextClick,
521
- on: _this2.v3 ? undefined : {
522
- "click": _this2.handleNextClick
523
- }
524
- }, _this2.v3 ? function () {
525
- return [h("span", {
526
- "class": "k-button-text"
527
- }, [h("span", {
528
- "class": "k-icon k-i-arrow-60-right"
529
- })])];
530
- } : [h("span", {
531
- "class": "k-button-text"
532
- }, [h("span", {
533
- "class": "k-icon k-i-arrow-60-right"
534
- })])])])]), h(NavigationDatePicker, {
239
+ onNextclick: _this2.handleNextClick,
240
+ onTodayclick: _this2.handleTodayClick
241
+ }), h(NavigationDatePicker, {
535
242
  value: _this2.ks.currentDate,
536
243
  attrs: _this2.v3 ? undefined : {
537
244
  value: _this2.ks.currentDate
@@ -540,297 +247,17 @@ var SchedulerVue2 = {
540
247
  on: _this2.v3 ? undefined : {
541
248
  "change": _this2.handleDatePickerChange
542
249
  }
543
- }), h(ToolbarSpacer), // @ts-ignore function children
544
- h(ViewSelector, _this2.v3 ? function () {
545
- return [h(ViewSelectorList)];
546
- } : [h(ViewSelectorList)])];
547
- } : [h(SchedulerNavigation, _this2.v3 ? function () {
548
- return [h(ButtonGroup, {
549
- "class": "k-scheduler-navigation"
550
- }, _this2.v3 ? function () {
551
- return [h(Button, {
552
- role: "button",
553
- attrs: _this2.v3 ? undefined : {
554
- role: "button",
555
- tabIndex: -1,
556
- title: todayText,
557
- "aria-label": todayText
558
- },
559
- tabIndex: -1,
560
- title: todayText,
561
- "aria-label": todayText,
562
- onClick: _this2.handleTodayClick,
563
- on: _this2.v3 ? undefined : {
564
- "click": _this2.handleTodayClick
565
- }
566
- }, _this2.v3 ? function () {
567
- return [todayText];
568
- } : [todayText]), h(Button, {
569
- role: "button",
570
- attrs: _this2.v3 ? undefined : {
571
- role: "button",
572
- tabIndex: -1,
573
- title: previousText,
574
- "aria-label": previousText
575
- },
576
- tabIndex: -1,
577
- "class": "k-button-icon",
578
- title: previousText,
579
- "aria-label": previousText,
580
- onClick: _this2.handlePrevClick,
581
- on: _this2.v3 ? undefined : {
582
- "click": _this2.handlePrevClick
583
- }
584
- }, _this2.v3 ? function () {
585
- return [h("span", {
586
- "class": "k-button-text"
587
- }, [h("span", {
588
- "class": "k-icon k-i-arrow-60-left"
589
- })])];
590
- } : [h("span", {
591
- "class": "k-button-text"
592
- }, [h("span", {
593
- "class": "k-icon k-i-arrow-60-left"
594
- })])]), h(Button, {
595
- role: "button",
596
- attrs: _this2.v3 ? undefined : {
597
- role: "button",
598
- tabIndex: -1,
599
- title: nextText,
600
- "aria-label": nextText
601
- },
602
- tabIndex: -1,
603
- "class": "k-button-icon",
604
- title: nextText,
605
- "aria-label": nextText,
606
- onClick: _this2.handleNextClick,
607
- on: _this2.v3 ? undefined : {
608
- "click": _this2.handleNextClick
609
- }
610
- }, _this2.v3 ? function () {
611
- return [h("span", {
612
- "class": "k-button-text"
613
- }, [h("span", {
614
- "class": "k-icon k-i-arrow-60-right"
615
- })])];
616
- } : [h("span", {
617
- "class": "k-button-text"
618
- }, [h("span", {
619
- "class": "k-icon k-i-arrow-60-right"
620
- })])])];
621
- } : [h(Button, {
622
- role: "button",
623
- attrs: _this2.v3 ? undefined : {
624
- role: "button",
625
- tabIndex: -1,
626
- title: todayText,
627
- "aria-label": todayText
628
- },
629
- tabIndex: -1,
630
- title: todayText,
631
- "aria-label": todayText,
632
- onClick: _this2.handleTodayClick,
633
- on: _this2.v3 ? undefined : {
634
- "click": _this2.handleTodayClick
635
- }
636
- }, _this2.v3 ? function () {
637
- return [todayText];
638
- } : [todayText]), h(Button, {
639
- role: "button",
640
- attrs: _this2.v3 ? undefined : {
641
- role: "button",
642
- tabIndex: -1,
643
- title: previousText,
644
- "aria-label": previousText
645
- },
646
- tabIndex: -1,
647
- "class": "k-button-icon",
648
- title: previousText,
649
- "aria-label": previousText,
650
- onClick: _this2.handlePrevClick,
651
- on: _this2.v3 ? undefined : {
652
- "click": _this2.handlePrevClick
653
- }
654
- }, _this2.v3 ? function () {
655
- return [h("span", {
656
- "class": "k-button-text"
657
- }, [h("span", {
658
- "class": "k-icon k-i-arrow-60-left"
659
- })])];
660
- } : [h("span", {
661
- "class": "k-button-text"
662
- }, [h("span", {
663
- "class": "k-icon k-i-arrow-60-left"
664
- })])]), h(Button, {
665
- role: "button",
666
- attrs: _this2.v3 ? undefined : {
667
- role: "button",
668
- tabIndex: -1,
669
- title: nextText,
670
- "aria-label": nextText
671
- },
672
- tabIndex: -1,
673
- "class": "k-button-icon",
674
- title: nextText,
675
- "aria-label": nextText,
676
- onClick: _this2.handleNextClick,
677
- on: _this2.v3 ? undefined : {
678
- "click": _this2.handleNextClick
679
- }
680
- }, _this2.v3 ? function () {
681
- return [h("span", {
682
- "class": "k-button-text"
683
- }, [h("span", {
684
- "class": "k-icon k-i-arrow-60-right"
685
- })])];
686
- } : [h("span", {
687
- "class": "k-button-text"
688
- }, [h("span", {
689
- "class": "k-icon k-i-arrow-60-right"
690
- })])])])];
691
- } : [h(ButtonGroup, {
692
- "class": "k-scheduler-navigation"
693
- }, _this2.v3 ? function () {
694
- return [h(Button, {
695
- role: "button",
696
- attrs: _this2.v3 ? undefined : {
697
- role: "button",
698
- tabIndex: -1,
699
- title: todayText,
700
- "aria-label": todayText
701
- },
702
- tabIndex: -1,
703
- title: todayText,
704
- "aria-label": todayText,
705
- onClick: _this2.handleTodayClick,
706
- on: _this2.v3 ? undefined : {
707
- "click": _this2.handleTodayClick
708
- }
709
- }, _this2.v3 ? function () {
710
- return [todayText];
711
- } : [todayText]), h(Button, {
712
- role: "button",
713
- attrs: _this2.v3 ? undefined : {
714
- role: "button",
715
- tabIndex: -1,
716
- title: previousText,
717
- "aria-label": previousText
718
- },
719
- tabIndex: -1,
720
- "class": "k-button-icon",
721
- title: previousText,
722
- "aria-label": previousText,
723
- onClick: _this2.handlePrevClick,
724
- on: _this2.v3 ? undefined : {
725
- "click": _this2.handlePrevClick
726
- }
727
- }, _this2.v3 ? function () {
728
- return [h("span", {
729
- "class": "k-button-text"
730
- }, [h("span", {
731
- "class": "k-icon k-i-arrow-60-left"
732
- })])];
733
- } : [h("span", {
734
- "class": "k-button-text"
735
- }, [h("span", {
736
- "class": "k-icon k-i-arrow-60-left"
737
- })])]), h(Button, {
738
- role: "button",
739
- attrs: _this2.v3 ? undefined : {
740
- role: "button",
741
- tabIndex: -1,
742
- title: nextText,
743
- "aria-label": nextText
744
- },
745
- tabIndex: -1,
746
- "class": "k-button-icon",
747
- title: nextText,
748
- "aria-label": nextText,
749
- onClick: _this2.handleNextClick,
750
- on: _this2.v3 ? undefined : {
751
- "click": _this2.handleNextClick
752
- }
753
- }, _this2.v3 ? function () {
754
- return [h("span", {
755
- "class": "k-button-text"
756
- }, [h("span", {
757
- "class": "k-icon k-i-arrow-60-right"
758
- })])];
759
- } : [h("span", {
760
- "class": "k-button-text"
761
- }, [h("span", {
762
- "class": "k-icon k-i-arrow-60-right"
763
- })])])];
764
- } : [h(Button, {
765
- role: "button",
766
- attrs: _this2.v3 ? undefined : {
767
- role: "button",
768
- tabIndex: -1,
769
- title: todayText,
770
- "aria-label": todayText
771
- },
772
- tabIndex: -1,
773
- title: todayText,
774
- "aria-label": todayText,
775
- onClick: _this2.handleTodayClick,
776
- on: _this2.v3 ? undefined : {
777
- "click": _this2.handleTodayClick
778
- }
779
- }, _this2.v3 ? function () {
780
- return [todayText];
781
- } : [todayText]), h(Button, {
782
- role: "button",
783
- attrs: _this2.v3 ? undefined : {
784
- role: "button",
785
- tabIndex: -1,
786
- title: previousText,
787
- "aria-label": previousText
788
- },
789
- tabIndex: -1,
790
- "class": "k-button-icon",
791
- title: previousText,
792
- "aria-label": previousText,
793
- onClick: _this2.handlePrevClick,
250
+ }), h(ToolbarSpacer), h(ViewSelector)];
251
+ } : [h(SchedulerNavigation, {
252
+ onPrevclick: _this2.handlePrevClick,
794
253
  on: _this2.v3 ? undefined : {
795
- "click": _this2.handlePrevClick
796
- }
797
- }, _this2.v3 ? function () {
798
- return [h("span", {
799
- "class": "k-button-text"
800
- }, [h("span", {
801
- "class": "k-icon k-i-arrow-60-left"
802
- })])];
803
- } : [h("span", {
804
- "class": "k-button-text"
805
- }, [h("span", {
806
- "class": "k-icon k-i-arrow-60-left"
807
- })])]), h(Button, {
808
- role: "button",
809
- attrs: _this2.v3 ? undefined : {
810
- role: "button",
811
- tabIndex: -1,
812
- title: nextText,
813
- "aria-label": nextText
254
+ "prevclick": _this2.handlePrevClick,
255
+ "nextclick": _this2.handleNextClick,
256
+ "todayclick": _this2.handleTodayClick
814
257
  },
815
- tabIndex: -1,
816
- "class": "k-button-icon",
817
- title: nextText,
818
- "aria-label": nextText,
819
- onClick: _this2.handleNextClick,
820
- on: _this2.v3 ? undefined : {
821
- "click": _this2.handleNextClick
822
- }
823
- }, _this2.v3 ? function () {
824
- return [h("span", {
825
- "class": "k-button-text"
826
- }, [h("span", {
827
- "class": "k-icon k-i-arrow-60-right"
828
- })])];
829
- } : [h("span", {
830
- "class": "k-button-text"
831
- }, [h("span", {
832
- "class": "k-icon k-i-arrow-60-right"
833
- })])])])]), h(NavigationDatePicker, {
258
+ onNextclick: _this2.handleNextClick,
259
+ onTodayclick: _this2.handleTodayClick
260
+ }), h(NavigationDatePicker, {
834
261
  value: _this2.ks.currentDate,
835
262
  attrs: _this2.v3 ? undefined : {
836
263
  value: _this2.ks.currentDate
@@ -839,85 +266,90 @@ var SchedulerVue2 = {
839
266
  on: _this2.v3 ? undefined : {
840
267
  "change": _this2.handleDatePickerChange
841
268
  }
842
- }), h(ToolbarSpacer), h(ViewSelector, _this2.v3 ? function () {
843
- return [h(ViewSelectorList)];
844
- } : [h(ViewSelectorList)])]), view && h(viewComponent, __assign({
845
- key: this.ks.view.name,
846
- onDataaction: this.handleDataAction,
847
- on: this.v3 ? undefined : {
848
- 'dataaction': this.handleDataAction
269
+ }), h(ToolbarSpacer), h(ViewSelector)]);
270
+ headerRender = getTemplate.call(this, {
271
+ h: h,
272
+ template: header,
273
+ defaultRendering: headerRenderDefaultRendering,
274
+ additionalProps: {
275
+ currentDate: this.ks.currentDate
849
276
  },
850
- props: this.v3 ? undefined : viewProps
851
- }, viewProps)), // @ts-ignore function children
277
+ additionalListeners: {
278
+ prevclick: this.handlePrevClick,
279
+ nextclick: this.handleNextClick,
280
+ todayclick: this.handleTodayClick,
281
+ datepickerchange: this.handleDatePickerChange
282
+ }
283
+ });
284
+ var footerRender;
285
+ var footerRenderDefaultRendering = // @ts-ignore function children
852
286
  h(SchedulerFooter, this.v3 ? function () {
853
- return [slotDuration && slotDuration < 24 * 60 && // @ts-ignore function children
854
- h(BusinessHours, _this2.v3 ? function () {
855
- return [// @ts-ignore function children
856
- h(Button, {
857
- tabIndex: -1,
858
- attrs: _this2.v3 ? undefined : {
859
- tabIndex: -1
860
- },
861
- onClick: _this2.handleShowWorkHoursClick,
862
- on: _this2.v3 ? undefined : {
863
- "click": _this2.handleShowWorkHoursClick
864
- }
865
- }, _this2.v3 ? function () {
866
- return [h("span", {
867
- "class": "k-icon k-i-clock"
868
- }), "\xA0", _this2.localization.toLanguageString(_this2.ks.showWorkHours ? showFullDay : showWorkDay, messages[_this2.ks.showWorkHours ? showFullDay : showWorkDay])];
869
- } : [h("span", {
870
- "class": "k-icon k-i-clock"
871
- }), "\xA0", _this2.localization.toLanguageString(_this2.ks.showWorkHours ? showFullDay : showWorkDay, messages[_this2.ks.showWorkHours ? showFullDay : showWorkDay])])];
872
- } : [h(Button, {
873
- tabIndex: -1,
874
- attrs: _this2.v3 ? undefined : {
875
- tabIndex: -1
876
- },
877
- onClick: _this2.handleShowWorkHoursClick,
878
- on: _this2.v3 ? undefined : {
879
- "click": _this2.handleShowWorkHoursClick
880
- }
881
- }, _this2.v3 ? function () {
882
- return [h("span", {
883
- "class": "k-icon k-i-clock"
884
- }), "\xA0", _this2.localization.toLanguageString(_this2.ks.showWorkHours ? showFullDay : showWorkDay, messages[_this2.ks.showWorkHours ? showFullDay : showWorkDay])];
885
- } : [h("span", {
886
- "class": "k-icon k-i-clock"
887
- }), "\xA0", _this2.localization.toLanguageString(_this2.ks.showWorkHours ? showFullDay : showWorkDay, messages[_this2.ks.showWorkHours ? showFullDay : showWorkDay])])])];
888
- } : [slotDuration && slotDuration < 24 * 60 && h(BusinessHours, _this2.v3 ? function () {
889
- return [h(Button, {
890
- tabIndex: -1,
287
+ return [// @ts-ignore function children
288
+ h(BusinessHours, {
289
+ slotDuration: slotDuration,
891
290
  attrs: _this2.v3 ? undefined : {
892
- tabIndex: -1
291
+ slotDuration: slotDuration
893
292
  },
894
293
  onClick: _this2.handleShowWorkHoursClick,
895
294
  on: _this2.v3 ? undefined : {
896
295
  "click": _this2.handleShowWorkHoursClick
897
296
  }
898
- }, _this2.v3 ? function () {
899
- return [h("span", {
900
- "class": "k-icon k-i-clock"
901
- }), "\xA0", _this2.localization.toLanguageString(_this2.ks.showWorkHours ? showFullDay : showWorkDay, messages[_this2.ks.showWorkHours ? showFullDay : showWorkDay])];
902
- } : [h("span", {
903
- "class": "k-icon k-i-clock"
904
- }), "\xA0", _this2.localization.toLanguageString(_this2.ks.showWorkHours ? showFullDay : showWorkDay, messages[_this2.ks.showWorkHours ? showFullDay : showWorkDay])])];
905
- } : [h(Button, {
906
- tabIndex: -1,
297
+ })];
298
+ } : [h(BusinessHours, {
299
+ slotDuration: slotDuration,
907
300
  attrs: _this2.v3 ? undefined : {
908
- tabIndex: -1
301
+ slotDuration: slotDuration
909
302
  },
910
303
  onClick: _this2.handleShowWorkHoursClick,
911
304
  on: _this2.v3 ? undefined : {
912
305
  "click": _this2.handleShowWorkHoursClick
913
306
  }
914
- }, _this2.v3 ? function () {
915
- return [h("span", {
916
- "class": "k-icon k-i-clock"
917
- }), "\xA0", _this2.localization.toLanguageString(_this2.ks.showWorkHours ? showFullDay : showWorkDay, messages[_this2.ks.showWorkHours ? showFullDay : showWorkDay])];
918
- } : [h("span", {
919
- "class": "k-icon k-i-clock"
920
- }), "\xA0", _this2.localization.toLanguageString(_this2.ks.showWorkHours ? showFullDay : showWorkDay, messages[_this2.ks.showWorkHours ? showFullDay : showWorkDay])])])])]);
307
+ })]);
308
+ footerRender = getTemplate.call(this, {
309
+ h: h,
310
+ template: footer,
311
+ defaultRendering: footerRenderDefaultRendering,
312
+ additionalProps: {
313
+ slotDuration: slotDuration
314
+ },
315
+ additionalListeners: {
316
+ showworkhoursclick: this.handleShowWorkHoursClick
317
+ }
318
+ });
319
+ return h("div", {
320
+ id: this.$props.id,
321
+ attrs: this.v3 ? undefined : {
322
+ id: this.$props.id,
323
+ tabIndex: this.$props.tabIndex // Aria
324
+ // dir={dir}
325
+ ,
326
+ role: this.$props.role,
327
+ "aria-label": this.$props.ariaLabel,
328
+ "aria-labelledby": this.$props.ariaLabelledby // Handlers
329
+
330
+ },
331
+ style: {
332
+ height: this.$props.height + 'px'
333
+ },
334
+ "class": this.wrapperClassName,
335
+ tabIndex: this.$props.tabIndex,
336
+ role: this.$props.role,
337
+ "aria-label": this.$props.ariaLabel,
338
+ "aria-labelledby": this.$props.ariaLabelledby,
339
+ onFocusin: this.handleFocus,
340
+ on: this.v3 ? undefined : {
341
+ "focusin": this.handleFocus,
342
+ "focusout": this.handleBlur
343
+ },
344
+ onFocusout: this.handleBlur
345
+ }, [headerRender, view && h(viewComponent, __assign({
346
+ key: this.ks.view.name,
347
+ onDataaction: this.handleDataAction,
348
+ on: this.v3 ? undefined : {
349
+ 'dataaction': this.handleDataAction
350
+ },
351
+ props: this.v3 ? undefined : viewProps
352
+ }, viewProps)), footerRender]);
921
353
  },
922
354
  methods: {
923
355
  getViewComponentByName: function getViewComponentByName(viewName) {
@@ -1135,6 +567,24 @@ var SchedulerVue2 = {
1135
567
  this.$el.style.boxShadow = '';
1136
568
  }
1137
569
  },
570
+ handleItemClick: function handleItemClick(args) {
571
+ this.$emit('itemclick', args);
572
+ },
573
+ handleItemDoubleClick: function handleItemDoubleClick(args) {
574
+ this.$emit('itemdoubleclick', args);
575
+ },
576
+ handleSlotClick: function handleSlotClick(args) {
577
+ this.$emit('slotclick', args);
578
+ },
579
+ handleSlotDoubleClick: function handleSlotDoubleClick(args) {
580
+ this.$emit('slotdoubleclick', args);
581
+ },
582
+ handleTaskClick: function handleTaskClick(args) {
583
+ this.$emit('taskclick', args);
584
+ },
585
+ handleTaskDoubleClick: function handleTaskDoubleClick(args) {
586
+ this.$emit('taskdoubleclick', args);
587
+ },
1138
588
  setDate: function setDate(newDate, event) {
1139
589
  this.ks.currentDate = newDate;
1140
590
  this.updatePassedState();