@progress/kendo-vue-scheduler 3.2.6 → 3.2.8-dev.202205030909

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 (72) hide show
  1. package/dist/cdn/js/kendo-vue-scheduler.js +2 -2
  2. package/dist/es/Scheduler.js +3 -0
  3. package/dist/es/components/BaseView.js +14 -12
  4. package/dist/es/components/header/view-selector/ViewSelectorList.js +9 -7
  5. package/dist/es/hooks/use-items-focus.js +8 -8
  6. package/dist/es/hooks/use-items-selection.js +11 -11
  7. package/dist/es/hooks/use-slots-focus.js +20 -20
  8. package/dist/es/hooks/use-slots-selection.js +4 -4
  9. package/dist/es/hooks/useSlotExpand.js +1 -1
  10. package/dist/es/items/SchedulerEditItem.d.ts +1 -1
  11. package/dist/es/items/SchedulerEditItem.js +260 -205
  12. package/dist/es/items/SchedulerItem.d.ts +1 -0
  13. package/dist/es/items/SchedulerItem.js +409 -168
  14. package/dist/es/items/SchedulerViewItem.d.ts +1 -0
  15. package/dist/es/items/SchedulerViewItem.js +17 -17
  16. package/dist/es/items/hooks/use-drag-item.js +5 -3
  17. package/dist/es/items/hooks/use-resize-item.d.ts +2 -4
  18. package/dist/es/items/hooks/use-resize-item.js +278 -176
  19. package/dist/es/models/SchedulerView.d.ts +2 -0
  20. package/dist/es/package-metadata.js +1 -1
  21. package/dist/es/slots/SchedulerEditSlot.js +21 -16
  22. package/dist/es/slots/SchedulerSlot.js +20 -1
  23. package/dist/es/slots/SchedulerViewSlot.js +30 -5
  24. package/dist/es/utils/index.d.ts +4 -0
  25. package/dist/es/utils/index.js +23 -14
  26. package/dist/es/views/common/SchedulerDrag.js +1 -0
  27. package/dist/es/views/common/SchedulerResize.js +70 -21
  28. package/dist/es/views/common/VerticalResourceIterator.js +2 -2
  29. package/dist/es/views/day/DayView.js +5 -1
  30. package/dist/es/views/day/MultiDayView.d.ts +4 -0
  31. package/dist/es/views/day/MultiDayView.js +87 -15
  32. package/dist/es/views/month/MonthView.js +1 -0
  33. package/dist/es/views/time/MultiDayTimelineView.js +1 -0
  34. package/dist/es/views/time/TimelineView.js +3 -0
  35. package/dist/es/views/week/WeekView.js +5 -1
  36. package/dist/es/views/week/WorkWeekView.js +3 -0
  37. package/dist/npm/Scheduler.js +3 -0
  38. package/dist/npm/components/BaseView.js +14 -12
  39. package/dist/npm/components/header/view-selector/ViewSelectorList.js +9 -7
  40. package/dist/npm/hooks/use-items-focus.js +8 -8
  41. package/dist/npm/hooks/use-items-selection.js +11 -11
  42. package/dist/npm/hooks/use-slots-focus.js +20 -20
  43. package/dist/npm/hooks/use-slots-selection.js +4 -4
  44. package/dist/npm/hooks/useSlotExpand.js +1 -1
  45. package/dist/npm/items/SchedulerEditItem.d.ts +1 -1
  46. package/dist/npm/items/SchedulerEditItem.js +258 -203
  47. package/dist/npm/items/SchedulerItem.d.ts +1 -0
  48. package/dist/npm/items/SchedulerItem.js +408 -167
  49. package/dist/npm/items/SchedulerViewItem.d.ts +1 -0
  50. package/dist/npm/items/SchedulerViewItem.js +17 -17
  51. package/dist/npm/items/hooks/use-drag-item.js +5 -3
  52. package/dist/npm/items/hooks/use-resize-item.d.ts +2 -4
  53. package/dist/npm/items/hooks/use-resize-item.js +281 -176
  54. package/dist/npm/models/SchedulerView.d.ts +2 -0
  55. package/dist/npm/package-metadata.js +1 -1
  56. package/dist/npm/slots/SchedulerEditSlot.js +20 -15
  57. package/dist/npm/slots/SchedulerSlot.js +20 -1
  58. package/dist/npm/slots/SchedulerViewSlot.js +30 -5
  59. package/dist/npm/utils/index.d.ts +4 -0
  60. package/dist/npm/utils/index.js +24 -15
  61. package/dist/npm/views/common/SchedulerDrag.js +1 -0
  62. package/dist/npm/views/common/SchedulerResize.js +70 -21
  63. package/dist/npm/views/common/VerticalResourceIterator.js +2 -2
  64. package/dist/npm/views/day/DayView.js +5 -1
  65. package/dist/npm/views/day/MultiDayView.d.ts +4 -0
  66. package/dist/npm/views/day/MultiDayView.js +88 -15
  67. package/dist/npm/views/month/MonthView.js +1 -0
  68. package/dist/npm/views/time/MultiDayTimelineView.js +1 -0
  69. package/dist/npm/views/time/TimelineView.js +3 -0
  70. package/dist/npm/views/week/WeekView.js +5 -1
  71. package/dist/npm/views/week/WorkWeekView.js +3 -0
  72. package/package.json +12 -12
@@ -57,7 +57,10 @@ var utils_1 = require("../utils"); // tslint:enable:max-line-length
57
57
  var SchedulerEditItemVue2 = {
58
58
  name: 'KendoSchedulerEditItem',
59
59
  props: {
60
- tabIndex: Number,
60
+ tabIndex: {
61
+ type: Number,
62
+ default: undefined
63
+ },
61
64
  item: [String, Function, Object],
62
65
  viewItem: [String, Function, Object],
63
66
  drag: [String, Function, Object],
@@ -122,6 +125,15 @@ var SchedulerEditItemVue2 = {
122
125
  },
123
126
  ks: {
124
127
  default: null
128
+ },
129
+ dispatchFocusedItems: {
130
+ default: null
131
+ },
132
+ dispatchFocusedSlots: {
133
+ default: null
134
+ },
135
+ dispatchSelectedItems: {
136
+ default: null
125
137
  }
126
138
  },
127
139
  provide: function provide() {
@@ -145,7 +157,6 @@ var SchedulerEditItemVue2 = {
145
157
  showRemoveDialog: this.showRemoveDialog,
146
158
  showOccurrenceDialog: this.showOccurrenceDialog
147
159
  },
148
- currentTabIndex: this.$props.tabIndex,
149
160
  currentFormItem: null,
150
161
  currentSelected: null,
151
162
  currentSeries: null,
@@ -158,6 +169,10 @@ var SchedulerEditItemVue2 = {
158
169
  };
159
170
  },
160
171
  computed: {
172
+ currentTabIndex: function currentTabIndex() {
173
+ var isFirst = this.bv.items.length && this.bv.items[0].dataItem.id === this.dataItem.id;
174
+ return this.$props.tabIndex !== undefined ? this.$props.tabIndex === null ? undefined : this.$props.tabIndex : this.bv.selectedItems.length === 0 ? isFirst ? 0 : undefined : undefined;
175
+ },
161
176
  compSelected: function compSelected() {
162
177
  return this.selected !== undefined ? this.selected : this.currentSelected;
163
178
  },
@@ -188,10 +203,6 @@ var SchedulerEditItemVue2 = {
188
203
  return _a = {}, _a[use_series_1.SERIES_ACTION.set] = this.dispatchSeries, _a[use_series_1.SERIES_ACTION.toggle] = this.dispatchSeries, _a[use_series_1.SERIES_ACTION.reset] = this.dispatchSeries, _a[use_items_selection_1.ITEMS_SELECT_ACTION.select] = this.dispatchItemSelection, _a[use_items_selection_1.ITEMS_SELECT_ACTION.add] = this.dispatchItemSelection, _a[use_items_selection_1.ITEMS_SELECT_ACTION.remove] = this.dispatchItemSelection, _a[use_items_selection_1.ITEMS_SELECT_ACTION.reset] = this.dispatchItemSelection, _a[use_items_selection_1.ITEMS_SELECT_ACTION.selectNext] = this.dispatchItemSelection, _a[use_items_selection_1.ITEMS_SELECT_ACTION.selectPrev] = this.dispatchItemSelection, _a[use_form_item_1.FORM_ITEM_ACTION.set] = this.dispatchFormItem, _a[use_form_item_1.FORM_ITEM_ACTION.setMaster] = this.dispatchFormItem, _a[use_form_item_1.FORM_ITEM_ACTION.reset] = this.dispatchFormItem, _a[use_form_item_1.FORM_ITEM_ACTION.complete] = this.dispatchFormItem, _a[use_remove_item_1.REMOVE_ITEM_ACTION.set] = this.dispatchRemoveItem, _a[use_remove_item_1.REMOVE_ITEM_ACTION.reset] = this.dispatchRemoveItem, _a[use_remove_item_1.REMOVE_ITEM_ACTION.complete] = this.dispatchRemoveItem, _a[use_show_occurrence_dialog_1.SHOW_OCCURRENCE_DIALOG_ACTION.close] = this.dispatchShowOccurrenceDialog, _a[use_show_occurrence_dialog_1.SHOW_OCCURRENCE_DIALOG_ACTION.open] = this.dispatchShowOccurrenceDialog, _a[use_show_occurrence_dialog_1.SHOW_OCCURRENCE_DIALOG_ACTION.set] = this.dispatchShowOccurrenceDialog, _a[use_show_occurrence_dialog_1.SHOW_OCCURRENCE_DIALOG_ACTION.toggle] = this.dispatchShowOccurrenceDialog, _a[use_show_occurrence_dialog_1.SHOW_OCCURRENCE_DIALOG_ACTION.reset] = this.dispatchShowOccurrenceDialog, _a[use_show_remove_item_dialog_1.SHOW_REMOVE_DIALOG_ACTION.close] = this.dispatchShowRemoveDialog, _a[use_show_remove_item_dialog_1.SHOW_REMOVE_DIALOG_ACTION.open] = this.dispatchShowRemoveDialog, _a[use_show_remove_item_dialog_1.SHOW_REMOVE_DIALOG_ACTION.set] = this.dispatchShowRemoveDialog, _a[use_show_remove_item_dialog_1.SHOW_REMOVE_DIALOG_ACTION.toggle] = this.dispatchShowRemoveDialog, _a[use_show_remove_item_dialog_1.SHOW_REMOVE_DIALOG_ACTION.reset] = this.dispatchShowRemoveDialog, _a[use_drag_item_1.DRAG_ITEM_ACTION.start] = this.dispatchDragItem, _a[use_drag_item_1.DRAG_ITEM_ACTION.drag] = this.dispatchDragItem, _a[use_drag_item_1.DRAG_ITEM_ACTION.complete] = this.dispatchDragItem, _a[use_drag_item_1.DRAG_ITEM_ACTION.completeOccurrence] = this.dispatchDragItem, _a[use_drag_item_1.DRAG_ITEM_ACTION.completeSeries] = this.dispatchDragItem, _a[use_drag_item_1.DRAG_ITEM_ACTION.set] = this.dispatchDragItem, _a[use_drag_item_1.DRAG_ITEM_ACTION.reset] = this.dispatchDragItem, _a[use_drag_item_1.DRAG_ITEM_ACTION.dragSelected] = this.dispatchDragItem, _a[use_resize_item_1.RESIZE_ITEM_ACTION.start] = this.dispatchResizeItem, _a[use_resize_item_1.RESIZE_ITEM_ACTION.startDrag] = this.dispatchResizeItem, _a[use_resize_item_1.RESIZE_ITEM_ACTION.startDragSelected] = this.dispatchResizeItem, _a[use_resize_item_1.RESIZE_ITEM_ACTION.endDrag] = this.dispatchResizeItem, _a[use_resize_item_1.RESIZE_ITEM_ACTION.endDragSelected] = this.dispatchResizeItem, _a[use_resize_item_1.RESIZE_ITEM_ACTION.complete] = this.dispatchResizeItem, _a[use_resize_item_1.RESIZE_ITEM_ACTION.completeOccurrence] = this.dispatchResizeItem, _a[use_resize_item_1.RESIZE_ITEM_ACTION.completeSeries] = this.dispatchResizeItem, _a[use_resize_item_1.RESIZE_ITEM_ACTION.set] = this.dispatchResizeItem, _a[use_resize_item_1.RESIZE_ITEM_ACTION.reset] = this.dispatchResizeItem, _a[hooks_1.ITEMS_FOCUS_ACTION.next] = this.dispatchViewItemsFocus, _a[hooks_1.ITEMS_FOCUS_ACTION.prev] = this.dispatchViewItemsFocus, _a[hooks_1.SLOTS_FOCUS_ACTION.left] = this.dispatchViewSlotsFocus, _a[hooks_1.SLOTS_FOCUS_ACTION.right] = this.dispatchViewSlotsFocus, _a[hooks_1.SLOTS_FOCUS_ACTION.up] = this.dispatchViewSlotsFocus, _a[hooks_1.SLOTS_FOCUS_ACTION.down] = this.dispatchViewSlotsFocus, _a.null = function () {}, _a;
189
204
  }
190
205
  },
191
- updated: function updated() {
192
- var isFirst = this.bv.items.length && this.bv.items[0] === this.item;
193
- this.currentTabindex = this.$props.tabIndex !== undefined ? this.$props.tabIndex === null ? undefined : this.$props.tabIndex : this.bv.selectedItems.length === 0 ? isFirst ? 0 : undefined : undefined; // }, [items, props.tabIndex, selectedItems.length]);
194
- },
195
206
  // @ts-ignore
196
207
  setup: !gh ? undefined : function () {
197
208
  var v3 = !!gh;
@@ -203,7 +214,8 @@ var SchedulerEditItemVue2 = {
203
214
  render: function render(createElement) {
204
215
  var _this = this;
205
216
 
206
- var h = gh || createElement; // tslint:enable:max-line-length
217
+ var h = gh || createElement;
218
+ var defaultSlot = kendo_vue_common_1.getDefaultSlots(this); // tslint:enable:max-line-length
207
219
 
208
220
  var _a = this.$props,
209
221
  onDataaction = _a.onDataaction,
@@ -252,87 +264,39 @@ var SchedulerEditItemVue2 = {
252
264
  // onDataaction },
253
265
  // [null, propDragItem, onDragItemChange]
254
266
  // );
255
-
256
-
257
- var _c = use_resize_item_1.useResizeItem({
258
- dataItem: this.$props.dataItem,
259
- onDataaction: onDataaction
260
- }, [null, propResizeItem, onResizeItemChange]),
261
- resizeItem = _c[0],
262
- setResizeItem = _c[1],
263
- dispatchResizeItem = _c[2]; // const [removeItem, setRemoveItem, dispatchRemoveItem] = useRemoveItem(
267
+ // const [resizeItem, setResizeItem, dispatchResizeItem] = useResizeItem(
268
+ // { dataItem: this.$props.dataItem, onDataaction },
269
+ // [null, propResizeItem, onResizeItemChange]
270
+ // );
271
+ // const [removeItem, setRemoveItem, dispatchRemoveItem] = useRemoveItem(
264
272
  // { series, onDataaction},
265
273
  // [null, propRemoveItem, onRemoveItemChange]
266
274
  // );
267
275
 
268
276
 
269
- var _d = use_show_remove_item_dialog_1.useShowRemoveDialog(false, propShowRemoveDialog, onShowRemoveDialogChange),
270
- showRemoveDialog = _d[0],
271
- setShowRemoveDialog = _d[1],
272
- dispatchShowRemoveDialog = _d[2];
277
+ var _c = use_show_remove_item_dialog_1.useShowRemoveDialog(false, propShowRemoveDialog, onShowRemoveDialogChange),
278
+ showRemoveDialog = _c[0],
279
+ setShowRemoveDialog = _c[1],
280
+ dispatchShowRemoveDialog = _c[2];
273
281
 
274
- var _e = use_show_occurrence_dialog_1.useShowOccurrenceDialog(false, propShowOccurrenceDialog, onShowOccurrenceDialogChange),
275
- showOccurrenceDialog = _e[0],
276
- setShowOccurrenceDialog = _e[1],
277
- dispatchShowOccurrenceDialog = _e[2];
282
+ var _d = use_show_occurrence_dialog_1.useShowOccurrenceDialog(false, propShowOccurrenceDialog, onShowOccurrenceDialogChange),
283
+ showOccurrenceDialog = _d[0],
284
+ setShowOccurrenceDialog = _d[1],
285
+ dispatchShowOccurrenceDialog = _d[2];
278
286
 
279
287
  var items = this.bv.items; // useSchedulerViewItemsContext();
280
288
  // const [,dispatchViewItemsFocus] = useSchedulerViewFocusedItemsContext();
281
289
  // const [,dispatchViewSlotsFocus] = useSchedulerViewFocusedSlotsContext();
282
290
 
283
291
  var selected = Boolean(this.bv.selectedItems && this.bv.selectedItems.some(function (si) {
284
- return si === _this.item;
292
+ return utils_1.compareItems(si, _this, _this.ignoreIsAllDay);
285
293
  }));
286
- return (// @ts-ignore function children
287
- h(SchedulerViewItem_1.SchedulerViewItem, {
294
+ var itemRender;
295
+ var itemRenderDefaultRendering = // @ts-ignore function children
296
+ h(SchedulerViewItem_1.SchedulerViewItem, {
297
+ ignoreIsAllDay: this.ignoreIsAllDay,
298
+ attrs: this.v3 ? undefined : {
288
299
  ignoreIsAllDay: this.ignoreIsAllDay,
289
- attrs: this.v3 ? undefined : {
290
- ignoreIsAllDay: this.ignoreIsAllDay,
291
- item: this.item,
292
- uid: this.uid,
293
- start: this.start,
294
- end: this.end,
295
- originalStart: this.originalStart,
296
- startTimezone: this.startTimezone,
297
- endTimezone: this.endTimezone,
298
- isAllDay: this.isAllDay,
299
- title: this.title,
300
- description: this.description,
301
- occurrenceId: this.occurrenceId,
302
- recurrenceExceptions: this.recurrenceExceptions,
303
- recurrenceRule: this.recurrenceRule,
304
- recurrenceId: this.recurrenceId,
305
- dataItem: this.dataItem,
306
- head: this.head,
307
- tail: this.tail,
308
- order: this.order,
309
- zonedStart: this.zonedStart,
310
- zonedEnd: this.zonedEnd,
311
- slots: this.slots,
312
- group: this.group,
313
- range: this.range,
314
- isException: this.isException,
315
- isRecurring: this.isRecurring,
316
- id: this.id,
317
- className: this.className,
318
- itemStyle: this.itemStyle,
319
- editable: this.editable,
320
- vertical: this.vertical,
321
- dragHint: this.dragHint,
322
- resizeHint: this.resizeHint,
323
- format: this.format,
324
- showOccurrenceDialog: this.compShowOccurrenceDialog,
325
- showRemoveDialog: this.compShowRemoveDialog,
326
- formItem: this.compFormItem,
327
- dragItem: this.compDragItem,
328
- resizeItem: this.compResizeItem,
329
- removeItem: this.compRemoveItem // refTo={this}
330
- ,
331
- itemRef: this.item,
332
- selected: selected,
333
- tabIndex: this.tabIndex // Keyboard
334
-
335
- },
336
300
  item: this.item,
337
301
  uid: this.uid,
338
302
  start: this.start,
@@ -371,70 +335,120 @@ var SchedulerEditItemVue2 = {
371
335
  formItem: this.compFormItem,
372
336
  dragItem: this.compDragItem,
373
337
  resizeItem: this.compResizeItem,
374
- removeItem: this.compRemoveItem,
338
+ removeItem: this.compRemoveItem // refTo={this}
339
+ ,
375
340
  itemRef: this.item,
376
341
  selected: selected,
377
- tabIndex: this.tabIndex,
378
- onKeydown: this.handleKeyDown,
379
- on: this.v3 ? undefined : {
380
- "keydown": this.handleKeyDown,
381
- "keyup": this.handleKeyUp,
382
- "focus": this.handleFocus,
383
- "mouseup": this.handleMouseUp,
384
- "mousedown": this.handleMouseDown,
385
- "click": this.handleClick,
386
- "doubleclick": this.handleDoubleClick,
387
- "removeclick": this.handleRemoveClick,
388
- "press": this.handlePress,
389
- "drag": this.handleDrag,
390
- "release": this.handleRelease,
391
- "resizepress": this.handleResizePress,
392
- "resizeenddrag": this.handleResizeEndDrag,
393
- "resizestartdrag": this.handleResizeStartDrag,
394
- "resizeselease": this.handleResizeRelease
395
- },
396
- onKeyup: this.handleKeyUp // Focus
397
- ,
398
- onFocus: this.handleFocus // Mouse
399
- ,
400
- onMouseup: this.handleMouseUp,
401
- onMousedown: this.handleMouseDown,
402
- onClick: this.handleClick,
403
- onDoubleclick: this.handleDoubleClick,
404
- onRemoveclick: this.handleRemoveClick // Drag
405
- ,
406
- onPress: this.handlePress,
407
- onDrag: this.handleDrag,
408
- onRelease: this.handleRelease // Resize
409
- ,
410
- onResizepress: this.handleResizePress,
411
- onResizeenddrag: this.handleResizeEndDrag,
412
- onResizestartdrag: this.handleResizeStartDrag,
413
- onResizeselease: this.handleResizeRelease
414
- }) // {((resizeItem && editable.resize)) && (Array.isArray(resizeItem)
415
- // ? (resizeItem as any).map((ri, idx) => (
416
- // <Resize
417
- // key={idx}
418
- // format={this.$props.format}
419
- // ignoreIsAllDay={ignoreIsAllDay}
420
- // dataItem={ri}
421
- // viewItem={this.$props.viewItem}
422
- // item={this.$props.item}
423
- // vertical={this.$props.vertical}
424
- // />
425
- // ))
426
- // : (
427
- // <Resize
428
- // format={this.$props.format}
429
- // ignoreIsAllDay={ignoreIsAllDay}
430
- // dataItem={resizeItem}
431
- // viewItem={this.$props.viewItem}
432
- // item={this.$props.item}
433
- // vertical={this.$props.vertical}
434
- // />
435
- // ))}
436
-
437
- );
342
+ tabIndex: this.currentTabIndex // Keyboard
343
+
344
+ },
345
+ item: this.item,
346
+ uid: this.uid,
347
+ start: this.start,
348
+ end: this.end,
349
+ originalStart: this.originalStart,
350
+ startTimezone: this.startTimezone,
351
+ endTimezone: this.endTimezone,
352
+ isAllDay: this.isAllDay,
353
+ title: this.title,
354
+ description: this.description,
355
+ occurrenceId: this.occurrenceId,
356
+ recurrenceExceptions: this.recurrenceExceptions,
357
+ recurrenceRule: this.recurrenceRule,
358
+ recurrenceId: this.recurrenceId,
359
+ dataItem: this.dataItem,
360
+ head: this.head,
361
+ tail: this.tail,
362
+ order: this.order,
363
+ zonedStart: this.zonedStart,
364
+ zonedEnd: this.zonedEnd,
365
+ slots: this.slots,
366
+ group: this.group,
367
+ range: this.range,
368
+ isException: this.isException,
369
+ isRecurring: this.isRecurring,
370
+ id: this.id,
371
+ className: this.className,
372
+ itemStyle: this.itemStyle,
373
+ editable: this.editable,
374
+ vertical: this.vertical,
375
+ dragHint: this.dragHint,
376
+ resizeHint: this.resizeHint,
377
+ format: this.format,
378
+ showOccurrenceDialog: this.compShowOccurrenceDialog,
379
+ showRemoveDialog: this.compShowRemoveDialog,
380
+ formItem: this.compFormItem,
381
+ dragItem: this.compDragItem,
382
+ resizeItem: this.compResizeItem,
383
+ removeItem: this.compRemoveItem,
384
+ itemRef: this.item,
385
+ selected: selected,
386
+ tabIndex: this.currentTabIndex,
387
+ onKeydown: this.handleKeyDown,
388
+ on: this.v3 ? undefined : {
389
+ "keydown": this.handleKeyDown,
390
+ "keyup": this.handleKeyUp,
391
+ "focus": this.handleFocus,
392
+ "mouseup": this.handleMouseUp,
393
+ "mousedown": this.handleMouseDown,
394
+ "click": this.handleClick,
395
+ "doubleclick": this.handleDoubleClick,
396
+ "removeclick": this.handleRemoveClick,
397
+ "press": this.handlePress,
398
+ "drag": this.handleDrag,
399
+ "release": this.handleRelease,
400
+ "resizepress": this.handleResizePress,
401
+ "resizeenddrag": this.handleResizeEndDrag,
402
+ "resizestartdrag": this.handleResizeStartDrag,
403
+ "resizerelease": this.handleResizeRelease
404
+ },
405
+ onKeyup: this.handleKeyUp // Focus
406
+ ,
407
+ onFocus: this.handleFocus // Mouse
408
+ ,
409
+ onMouseup: this.handleMouseUp,
410
+ onMousedown: this.handleMouseDown,
411
+ onClick: this.handleClick,
412
+ onDoubleclick: this.handleDoubleClick,
413
+ onRemoveclick: this.handleRemoveClick // Drag
414
+ ,
415
+ onPress: this.handlePress,
416
+ onDrag: this.handleDrag,
417
+ onRelease: this.handleRelease // Resize
418
+ ,
419
+ onResizepress: this.handleResizePress,
420
+ onResizeenddrag: this.handleResizeEndDrag,
421
+ onResizestartdrag: this.handleResizeStartDrag,
422
+ onResizerelease: this.handleResizeRelease
423
+ });
424
+ itemRender = kendo_vue_common_1.getTemplate.call(this, {
425
+ h: h,
426
+ template: this.$props.viewItem,
427
+ defaultRendering: itemRenderDefaultRendering,
428
+ defaultSlots: defaultSlot,
429
+ additionalListeners: {
430
+ // keydown: this.handleKeyDown,
431
+ // keyup: this.handleKeyUp,
432
+ // Focus
433
+ // focus: this.handleFocus,
434
+ // Mouse
435
+ // mouseup: this.handleMouseUp,
436
+ // mousedown: this.handleMouseDown,
437
+ // click: this.handleClick,
438
+ doubleclick: this.handleDoubleClick,
439
+ removeclick: this.handleRemoveClick,
440
+ // Drag
441
+ press: this.handlePress,
442
+ drag: this.handleDrag,
443
+ release: this.handleRelease,
444
+ // Resize
445
+ resizepress: this.handleResizePress,
446
+ resizeenddrag: this.handleResizeEndDrag,
447
+ resizestartdrag: this.handleResizeStartDrag,
448
+ resizerelease: this.handleResizeRelease
449
+ }
450
+ });
451
+ return itemRender;
438
452
  },
439
453
  methods: {
440
454
  dispatchSeries: function dispatchSeries(action, _event) {
@@ -442,8 +456,8 @@ var SchedulerEditItemVue2 = {
442
456
  this.currentSeries = newSeries;
443
457
  this.$emit('serieschange', newSeries);
444
458
  },
445
- dispatchItemSelection: function dispatchItemSelection(action, _event) {
446
- this.aaa = action;
459
+ dispatchItemSelection: function dispatchItemSelection(action, event) {
460
+ this.dispatchSelectedItems(action, event);
447
461
  },
448
462
  dispatchRemoveItem: function dispatchRemoveItem(action, _event) {
449
463
  var newRemoveItem;
@@ -490,14 +504,14 @@ var SchedulerEditItemVue2 = {
490
504
  dispatchDragItem: function dispatchDragItem(action, _event) {
491
505
  use_drag_item_1.useDragItem.call(this, action);
492
506
  },
493
- dispatchResizeItem: function dispatchResizeItem(action, _event) {
494
- this.aaa = action;
507
+ dispatchResizeItem: function dispatchResizeItem(action, event) {
508
+ use_resize_item_1.useResizeItem.call(this, action, event);
495
509
  },
496
- dispatchViewSlotsFocus: function dispatchViewSlotsFocus(action, _event) {
497
- this.aaa = action;
510
+ dispatchViewSlotsFocus: function dispatchViewSlotsFocus(action, event) {
511
+ this.dispatchFocusedSlots(action, event);
498
512
  },
499
- dispatchViewItemsFocus: function dispatchViewItemsFocus(action, _event) {
500
- this.aaa = action;
513
+ dispatchViewItemsFocus: function dispatchViewItemsFocus(action, event) {
514
+ this.dispatchFocusedItems(action, event);
501
515
  },
502
516
  dispatchFormItem: function dispatchFormItem(action, _event) {
503
517
  var newFormItem;
@@ -536,52 +550,76 @@ var SchedulerEditItemVue2 = {
536
550
  this.$emit('formitemchange', newFormItem);
537
551
  },
538
552
  handleFocus: function handleFocus(event) {
553
+ var _this = this;
554
+
539
555
  if (this.onFocusAction) {
540
556
  var actions = this.onFocusAction(event, this.$props);
541
557
 
542
- if (actions) {// Array.isArray(actions)
543
- // ? actions.filter(Boolean).map((action) => action &&
544
- // this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
545
- // : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
558
+ if (actions) {
559
+ Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
560
+ return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
561
+ item: _this.dataItem
562
+ }), event);
563
+ }) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
564
+ item: this.dataItem
565
+ }));
546
566
  }
547
567
  }
548
568
 
549
569
  this.$emit('focus', event);
550
570
  },
551
571
  handleMouseDown: function handleMouseDown(event) {
572
+ var _this = this;
573
+
552
574
  if (this.onMouseDownAction) {
553
575
  var actions = this.onMouseDownAction(event, this.$props);
554
576
 
555
- if (actions) {// Array.isArray(actions)
556
- // ? actions.filter(Boolean).map((action) => action &&
557
- // this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
558
- // : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
577
+ if (actions) {
578
+ Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
579
+ return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
580
+ item: _this.dataItem
581
+ }), event);
582
+ }) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
583
+ item: this.dataItem
584
+ }));
559
585
  }
560
586
  }
561
587
 
562
588
  this.$emit('mousedown', event);
563
589
  },
564
590
  handleMouseUp: function handleMouseUp(event) {
591
+ var _this = this;
592
+
565
593
  if (this.onMouseUpAction) {
566
594
  var actions = this.onMouseUpAction(event, this.$props);
567
595
 
568
- if (actions) {// Array.isArray(actions)
569
- // ? actions.filter(Boolean).map((action) => action &&
570
- // this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
571
- // : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
596
+ if (actions) {
597
+ Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
598
+ return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
599
+ item: _this.dataItem
600
+ }), event);
601
+ }) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
602
+ item: this.dataItem
603
+ }));
572
604
  }
573
605
  }
574
606
 
575
607
  this.$emit('mouseup', event);
576
608
  },
577
609
  handleClick: function handleClick(event) {
610
+ var _this = this;
611
+
578
612
  if (this.onClickAction) {
579
613
  var actions = this.onClickAction(event, this.$props);
580
614
 
581
- if (actions) {// Array.isArray(actions)
582
- // ? actions.filter(Boolean).map((action) => action &&
583
- // this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
584
- // : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
615
+ if (actions) {
616
+ Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
617
+ return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
618
+ item: _this.dataItem
619
+ }), event);
620
+ }) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
621
+ item: this.dataItem
622
+ }));
585
623
  }
586
624
  }
587
625
 
@@ -682,71 +720,76 @@ var SchedulerEditItemVue2 = {
682
720
  this.$emit('release', event);
683
721
  },
684
722
  handleResizePress: function handleResizePress(event) {
723
+ var _this = this;
724
+
685
725
  if (this.onResizePressAction) {
686
726
  var actions = this.onResizePressAction(event, this.$props);
687
727
 
688
- if (actions) {// Array.isArray(actions)
689
- // ? actions.filter(Boolean).map((action) => action &&
690
- // this.actionsReducerMap[action.type](
691
- // {...action, item: this.dataItem},
692
- // event.dragEvent.originalEvent))
693
- // : this.actionsReducerMap[actions.type](
694
- // {...actions, item: this.dataItem},
695
- // event.dragEvent.originalEvent
696
- // );
728
+ if (actions) {
729
+ Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
730
+ return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
731
+ item: _this.dataItem
732
+ }), event.dragEvent.originalEvent);
733
+ }) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
734
+ item: this.dataItem
735
+ }), event.dragEvent.originalEvent);
697
736
  }
698
737
  }
699
738
 
700
739
  this.$emit('resizepress', event);
701
740
  },
702
741
  handleResizeStartDrag: function handleResizeStartDrag(event) {
742
+ var _this = this;
743
+
703
744
  if (this.onResizeStartDragAction) {
704
745
  var actions = this.onResizeStartDragAction(event, this.$props);
705
746
 
706
- if (actions) {// Array.isArray(actions)
707
- // ? actions.filter(Boolean).map((action) => action &&
708
- // this.actionsReducerMap[action.type](
709
- // {...action, item: this.dataItem},
710
- // event.dragEvent.originalEvent))
711
- // : this.actionsReducerMap[actions.type](
712
- // {...actions, item: this.dataItem},
713
- // event.dragEvent.originalEvent
714
- // );
747
+ if (actions) {
748
+ Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
749
+ return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
750
+ item: _this.dataItem
751
+ }), event.dragEvent.originalEvent);
752
+ }) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
753
+ item: this.dataItem
754
+ }), event.dragEvent.originalEvent);
715
755
  }
716
756
  }
717
757
 
718
758
  this.$emit('resizestartdrag', event);
719
759
  },
720
760
  handleResizeEndDrag: function handleResizeEndDrag(event) {
761
+ var _this = this;
762
+
721
763
  if (this.onResizeEndDragAction) {
722
764
  var actions = this.onResizeEndDragAction(event, this.$props);
723
765
 
724
- if (actions) {// Array.isArray(actions)
725
- // ? actions.filter(Boolean).map((action) => action &&
726
- // this.actionsReducerMap[action.type](
727
- // {...action, item: this.dataItem},
728
- // event.dragEvent.originalEvent))
729
- // : this.actionsReducerMap[actions.type](
730
- // {...actions, item: this.dataItem},
731
- // event.dragEvent.originalEvent);
766
+ if (actions) {
767
+ Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
768
+ return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
769
+ item: _this.dataItem
770
+ }), event.dragEvent.originalEvent);
771
+ }) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
772
+ item: this.dataItem
773
+ }), event.dragEvent.originalEvent);
732
774
  }
733
775
  }
734
776
 
735
777
  this.$emit('resizeenddrag', event);
736
778
  },
737
779
  handleResizeRelease: function handleResizeRelease(event) {
780
+ var _this = this;
781
+
738
782
  if (this.onResizeReleaseAction) {
739
783
  var actions = this.onResizeReleaseAction(event, this.$props);
740
784
 
741
- if (actions) {// Array.isArray(actions)
742
- // ? actions.filter(Boolean).map((action) => action &&
743
- // this.actionsReducerMap[action.type](
744
- // {...action, item: this.dataItem},
745
- // event.dragEvent.originalEvent))
746
- // : this.actionsReducerMap[actions.type](
747
- // {...actions, item: this.dataItem },
748
- // event.dragEvent.originalEvent
749
- // );
785
+ if (actions) {
786
+ Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
787
+ return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
788
+ item: _this.dataItem
789
+ }), event.dragEvent.originalEvent);
790
+ }) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
791
+ item: this.dataItem
792
+ }), event.dragEvent.originalEvent);
750
793
  }
751
794
  }
752
795
 
@@ -829,26 +872,38 @@ var SchedulerEditItemVue2 = {
829
872
  this.$emit('seriesclick', event);
830
873
  },
831
874
  handleKeyDown: function handleKeyDown(event) {
875
+ var _this = this;
876
+
832
877
  if (this.onKeyDownAction) {
833
878
  var actions = this.onKeyDownAction(event, this.$props);
834
879
 
835
- if (actions) {// Array.isArray(actions)
836
- // ? actions.filter(Boolean).map((action) => action &&
837
- // this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event.event))
838
- // : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem}, event.event);
880
+ if (actions) {
881
+ Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
882
+ return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
883
+ item: _this
884
+ }), event.event);
885
+ }) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
886
+ item: this
887
+ }), event.event);
839
888
  }
840
889
  }
841
890
 
842
891
  this.$emit('keydown', event);
843
892
  },
844
893
  handleKeyUp: function handleKeyUp(event) {
894
+ var _this = this;
895
+
845
896
  if (this.onKeyUpAction) {
846
897
  var actions = this.onKeyUpAction(event, this.$props);
847
898
 
848
- if (actions) {// Array.isArray(actions)
849
- // ? actions.filter(Boolean).map((action) => action &&
850
- // this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event.event))
851
- // : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem}, event.event);
899
+ if (actions) {
900
+ Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
901
+ return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
902
+ item: _this.dataItem
903
+ }), event.event);
904
+ }) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
905
+ item: this.dataItem
906
+ }), event.event);
852
907
  }
853
908
  }
854
909
 
@@ -205,6 +205,7 @@ export interface SchedulerItemHandle {
205
205
  * @hidden
206
206
  */
207
207
  export interface SchedulerItemState {
208
+ element: HTMLDivElement | null;
208
209
  }
209
210
  /**
210
211
  * @hidden