@progress/kendo-vue-scheduler 3.2.5 → 3.2.7-dev.202205021145

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 (76) hide show
  1. package/dist/cdn/js/kendo-vue-scheduler.js +2 -2
  2. package/dist/es/components/BaseView.js +14 -12
  3. package/dist/es/components/SchedulerForm.js +1 -1
  4. package/dist/es/components/header/view-selector/ViewSelectorList.js +9 -7
  5. package/dist/es/editors/SchedulerFormEditor.js +25 -2
  6. package/dist/es/hooks/use-items-focus.js +8 -8
  7. package/dist/es/hooks/use-items-selection.js +11 -11
  8. package/dist/es/hooks/use-slots-focus.js +20 -20
  9. package/dist/es/hooks/use-slots-selection.js +4 -4
  10. package/dist/es/hooks/useSlotExpand.js +1 -1
  11. package/dist/es/items/SchedulerEditItem.d.ts +1 -1
  12. package/dist/es/items/SchedulerEditItem.js +145 -119
  13. package/dist/es/items/SchedulerItem.d.ts +1 -0
  14. package/dist/es/items/SchedulerItem.js +408 -167
  15. package/dist/es/items/SchedulerViewItem.d.ts +1 -0
  16. package/dist/es/items/SchedulerViewItem.js +17 -17
  17. package/dist/es/items/hooks/use-drag-item.js +5 -3
  18. package/dist/es/items/hooks/use-resize-item.d.ts +2 -4
  19. package/dist/es/items/hooks/use-resize-item.js +278 -176
  20. package/dist/es/models/SchedulerView.d.ts +2 -0
  21. package/dist/es/package-metadata.js +1 -1
  22. package/dist/es/slots/SchedulerEditSlot.js +36 -48
  23. package/dist/es/slots/SchedulerSlot.d.ts +2 -0
  24. package/dist/es/slots/SchedulerSlot.js +46 -3
  25. package/dist/es/slots/SchedulerViewSlot.js +33 -5
  26. package/dist/es/tasks/SchedulerEditTask.js +14 -64
  27. package/dist/es/tasks/SchedulerTask.d.ts +12 -2
  28. package/dist/es/tasks/SchedulerTask.js +54 -3
  29. package/dist/es/tasks/SchedulerViewTask.js +21 -3
  30. package/dist/es/utils/index.d.ts +4 -0
  31. package/dist/es/utils/index.js +23 -14
  32. package/dist/es/views/common/SchedulerDrag.js +1 -0
  33. package/dist/es/views/common/SchedulerResize.js +69 -21
  34. package/dist/es/views/common/VerticalResourceIterator.js +2 -2
  35. package/dist/es/views/day/DayView.js +2 -1
  36. package/dist/es/views/day/MultiDayView.d.ts +4 -0
  37. package/dist/es/views/day/MultiDayView.js +86 -15
  38. package/dist/es/views/week/WeekView.js +2 -1
  39. package/dist/npm/components/BaseView.js +14 -12
  40. package/dist/npm/components/SchedulerForm.js +1 -1
  41. package/dist/npm/components/header/view-selector/ViewSelectorList.js +9 -7
  42. package/dist/npm/editors/SchedulerFormEditor.js +25 -2
  43. package/dist/npm/hooks/use-items-focus.js +8 -8
  44. package/dist/npm/hooks/use-items-selection.js +11 -11
  45. package/dist/npm/hooks/use-slots-focus.js +20 -20
  46. package/dist/npm/hooks/use-slots-selection.js +4 -4
  47. package/dist/npm/hooks/useSlotExpand.js +1 -1
  48. package/dist/npm/items/SchedulerEditItem.d.ts +1 -1
  49. package/dist/npm/items/SchedulerEditItem.js +144 -118
  50. package/dist/npm/items/SchedulerItem.d.ts +1 -0
  51. package/dist/npm/items/SchedulerItem.js +407 -166
  52. package/dist/npm/items/SchedulerViewItem.d.ts +1 -0
  53. package/dist/npm/items/SchedulerViewItem.js +17 -17
  54. package/dist/npm/items/hooks/use-drag-item.js +5 -3
  55. package/dist/npm/items/hooks/use-resize-item.d.ts +2 -4
  56. package/dist/npm/items/hooks/use-resize-item.js +281 -176
  57. package/dist/npm/models/SchedulerView.d.ts +2 -0
  58. package/dist/npm/package-metadata.js +1 -1
  59. package/dist/npm/slots/SchedulerEditSlot.js +35 -48
  60. package/dist/npm/slots/SchedulerSlot.d.ts +2 -0
  61. package/dist/npm/slots/SchedulerSlot.js +47 -3
  62. package/dist/npm/slots/SchedulerViewSlot.js +33 -5
  63. package/dist/npm/tasks/SchedulerEditTask.js +14 -66
  64. package/dist/npm/tasks/SchedulerTask.d.ts +12 -2
  65. package/dist/npm/tasks/SchedulerTask.js +56 -3
  66. package/dist/npm/tasks/SchedulerViewTask.js +21 -3
  67. package/dist/npm/utils/index.d.ts +4 -0
  68. package/dist/npm/utils/index.js +24 -15
  69. package/dist/npm/views/common/SchedulerDrag.js +1 -0
  70. package/dist/npm/views/common/SchedulerResize.js +69 -21
  71. package/dist/npm/views/common/VerticalResourceIterator.js +2 -2
  72. package/dist/npm/views/day/DayView.js +2 -1
  73. package/dist/npm/views/day/MultiDayView.d.ts +4 -0
  74. package/dist/npm/views/day/MultiDayView.js +87 -15
  75. package/dist/npm/views/week/WeekView.js +2 -1
  76. package/package.json +12 -12
@@ -53,20 +53,20 @@ exports.dispatchSelectedItems = function (action, event) {
53
53
  return;
54
54
  }
55
55
 
56
- this.selectedItems = [action.item];
56
+ this.bv.selectedItems = [action.item];
57
57
  break;
58
58
 
59
59
  case ITEMS_SELECT_ACTION.selectNext:
60
60
  {
61
- if (!action.item || !action.item.current || !this.items) {
61
+ if (!action.item || !this.bv.items) {
62
62
  return;
63
63
  }
64
64
 
65
- var next = utils_1.findNextItem(action.item, this.items, action.ignoreIsAllDay, false);
65
+ var next = utils_1.findNextItem(action.item, this.bv.items, action.ignoreIsAllDay, false);
66
66
 
67
67
  if (next) {
68
68
  event.preventDefault();
69
- this.selectedItems = [next];
69
+ this.bv.selectedItems = [next];
70
70
  }
71
71
 
72
72
  break;
@@ -74,22 +74,22 @@ exports.dispatchSelectedItems = function (action, event) {
74
74
 
75
75
  case ITEMS_SELECT_ACTION.selectPrev:
76
76
  {
77
- if (!action.item || !action.item.current || !this.items) {
77
+ if (!action.item || !this.bv.items) {
78
78
  return;
79
79
  }
80
80
 
81
- var next = utils_1.findNextItem(action.item, this.items, action.ignoreIsAllDay, true);
81
+ var next = utils_1.findNextItem(action.item, this.bv.items, action.ignoreIsAllDay, true);
82
82
 
83
83
  if (next) {
84
84
  event.preventDefault();
85
- this.selectedItems = [next];
85
+ this.bv.selectedItems = [next];
86
86
  }
87
87
 
88
88
  break;
89
89
  }
90
90
 
91
91
  case ITEMS_SELECT_ACTION.reset:
92
- this.selectedItems = [];
92
+ this.bv.selectedItems = [];
93
93
  break;
94
94
 
95
95
  case ITEMS_SELECT_ACTION.add:
@@ -97,10 +97,10 @@ exports.dispatchSelectedItems = function (action, event) {
97
97
  return;
98
98
  }
99
99
 
100
- if (!this.selectedItems.some(function (si) {
100
+ if (!this.bv.selectedItems.some(function (si) {
101
101
  return si === action.item;
102
102
  })) {
103
- this.selectedItems = __spreadArrays(this.selectedItems, [action.item]);
103
+ this.bv.selectedItems = __spreadArrays(this.bv.selectedItems, [action.item]);
104
104
  }
105
105
 
106
106
  break;
@@ -110,7 +110,7 @@ exports.dispatchSelectedItems = function (action, event) {
110
110
  return;
111
111
  }
112
112
 
113
- this.selectedItems = __spreadArrays(this.selectedItems.filter(function (si) {
113
+ this.bv.selectedItems = __spreadArrays(this.bv.selectedItems.filter(function (si) {
114
114
  return si !== action.item;
115
115
  }));
116
116
  break;
@@ -29,15 +29,15 @@ exports.dispatchFocusedSlots = function (action, event) {
29
29
  switch (action.type) {
30
30
  case SLOTS_FOCUS_ACTION.up:
31
31
  {
32
- if (!action.slot.current || !this.slots) {
32
+ if (!action.slot || !this.bv.slots) {
33
33
  return;
34
34
  }
35
35
 
36
- var next = exports.findUpSlot(action.slot, this.slots);
36
+ var next = exports.findUpSlot(action.slot, this.bv.slots);
37
37
 
38
- if (next && next.current && next.current.element) {
38
+ if (next && next.$el) {
39
39
  event.preventDefault();
40
- next.current.element.focus();
40
+ next.$el.focus();
41
41
  }
42
42
 
43
43
  break;
@@ -45,15 +45,15 @@ exports.dispatchFocusedSlots = function (action, event) {
45
45
 
46
46
  case SLOTS_FOCUS_ACTION.down:
47
47
  {
48
- if (!action.slot || !this.slots) {
48
+ if (!action.slot || !this.bv.slots) {
49
49
  return;
50
50
  }
51
51
 
52
- var next = exports.findDownSlot(action.slot, this.slots);
52
+ var next = exports.findDownSlot(action.slot, this.bv.slots);
53
53
 
54
- if (next && next.current && next.current.element) {
54
+ if (next && next.$el) {
55
55
  event.preventDefault();
56
- next.current.element.focus();
56
+ next.$el.focus();
57
57
  }
58
58
 
59
59
  break;
@@ -61,15 +61,15 @@ exports.dispatchFocusedSlots = function (action, event) {
61
61
 
62
62
  case SLOTS_FOCUS_ACTION.left:
63
63
  {
64
- if (!action.slot || !this.slots) {
64
+ if (!action.slot || !this.bv.slots) {
65
65
  return;
66
66
  }
67
67
 
68
- var next = exports.findLeftSlot(action.slot, this.slots);
68
+ var next = exports.findLeftSlot(action.slot, this.bv.slots);
69
69
 
70
- if (next && next.current && next.current.element) {
70
+ if (next && next.$el) {
71
71
  event.preventDefault();
72
- next.current.element.focus();
72
+ next.$el.focus();
73
73
  }
74
74
 
75
75
  break;
@@ -77,15 +77,15 @@ exports.dispatchFocusedSlots = function (action, event) {
77
77
 
78
78
  case SLOTS_FOCUS_ACTION.right:
79
79
  {
80
- if (!action.slot || !this.slots) {
80
+ if (!action.slot || !this.bv.slots) {
81
81
  return;
82
82
  }
83
83
 
84
- var next = exports.findRightSlot(action.slot, this.slots);
84
+ var next = exports.findRightSlot(action.slot, this.bv.slots);
85
85
 
86
- if (next && next.current && next.current.element) {
86
+ if (next && next.$el) {
87
87
  event.preventDefault();
88
- next.current.element.focus();
88
+ next.$el.focus();
89
89
  }
90
90
 
91
91
  break;
@@ -100,7 +100,7 @@ exports.dispatchFocusedSlots = function (action, event) {
100
100
 
101
101
  exports.findUpSlot = function (target, all) {
102
102
  return all.find(function (slot) {
103
- return slot.current !== null && target.current !== null && slot.current.props.row === target.current.props.row - 1 && slot.current.props.col === target.current.props.col;
103
+ return slot !== null && target !== null && slot.$props.row === target.$props.row - 1 && slot.$props.col === target.$props.col;
104
104
  });
105
105
  };
106
106
  /** @hidden */
@@ -108,7 +108,7 @@ exports.findUpSlot = function (target, all) {
108
108
 
109
109
  exports.findLeftSlot = function (target, all) {
110
110
  return all.find(function (slot) {
111
- return slot.current !== null && target.current !== null && slot.current.props.row === target.current.props.row && slot.current.props.col === target.current.props.col - 1;
111
+ return slot !== null && target !== null && slot.$props.row === target.$props.row && slot.$props.col === target.$props.col - 1;
112
112
  });
113
113
  };
114
114
  /** @hidden */
@@ -116,7 +116,7 @@ exports.findLeftSlot = function (target, all) {
116
116
 
117
117
  exports.findRightSlot = function (target, all) {
118
118
  return all.find(function (slot) {
119
- return slot.current !== null && target.current !== null && slot.current.props.row === target.current.props.row && slot.current.props.col === target.current.props.col + 1;
119
+ return slot !== null && target !== null && slot.$props.row === target.$props.row && slot.$props.col === target.$props.col + 1;
120
120
  });
121
121
  };
122
122
  /** @hidden */
@@ -124,6 +124,6 @@ exports.findRightSlot = function (target, all) {
124
124
 
125
125
  exports.findDownSlot = function (target, all) {
126
126
  return all.find(function (slot) {
127
- return slot.current !== null && target.current !== null && slot.current.props.row === target.current.props.row + 1 && slot.current.props.col === target.current.props.col;
127
+ return slot !== null && target !== null && slot.$props.row === target.$props.row + 1 && slot.$props.col === target.$props.col;
128
128
  });
129
129
  };
@@ -44,11 +44,11 @@ exports.dispatchSelectedSlots = function (action) {
44
44
  return;
45
45
  }
46
46
 
47
- this.selectedSlots([action.slot]);
47
+ this.bv.selectedSlots = [action.slot];
48
48
  break;
49
49
 
50
50
  case SLOTS_SELECT_ACTION.reset:
51
- this.selectedSlots([]);
51
+ this.bv.selectedSlots = [];
52
52
  break;
53
53
 
54
54
  case SLOTS_SELECT_ACTION.add:
@@ -56,10 +56,10 @@ exports.dispatchSelectedSlots = function (action) {
56
56
  return;
57
57
  }
58
58
 
59
- if (!this.selectedSlots.some(function (ss) {
59
+ if (!this.bv.selectedSlots.some(function (ss) {
60
60
  return ss === action.slot;
61
61
  })) {
62
- this.selectedSlots(__spreadArrays(this.selectedSlots, [action.slot]));
62
+ this.bv.selectedSlots = __spreadArrays(this.bv.selectedSlots, [action.slot]);
63
63
  }
64
64
 
65
65
  break;
@@ -58,7 +58,7 @@ exports.useSlotExpand = function (slot, _scheduler, config) {
58
58
  return;
59
59
  }
60
60
 
61
- var height = utils_1.getRect(currentItem.$el).height;
61
+ var height = utils_1.getRect(currentItem.getElement()).height;
62
62
  highest += height;
63
63
  });
64
64
  var minHeight = existing.length * constants_1.BORDER_WIDTH * 2 + highest - (slotPadding || 0) + ((typeof config === "undefined" ? "undefined" : _typeof(config)) === 'object' && config.offsetTop ? config.offsetTop : 0) + ((typeof config === "undefined" ? "undefined" : _typeof(config)) === 'object' && config.offsetBottom ? config.offsetBottom : 0);
@@ -330,6 +330,7 @@ export interface SchedulerEditItemState {
330
330
  */
331
331
  export interface SchedulerEditItemComputed {
332
332
  [key: string]: any;
333
+ currentTabIndex: number | undefined | null;
333
334
  }
334
335
  /**
335
336
  * @hidden
@@ -341,7 +342,6 @@ export interface SchedulerEditItemMethods {
341
342
  * @hidden
342
343
  */
343
344
  export interface SchedulerEditItemData {
344
- currentTabIndex: number | undefined | null;
345
345
  }
346
346
  /**
347
347
  * @hidden