@progress/kendo-vue-scheduler 3.2.6 → 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.
- package/dist/cdn/js/kendo-vue-scheduler.js +2 -2
- package/dist/es/components/BaseView.js +14 -12
- package/dist/es/components/header/view-selector/ViewSelectorList.js +9 -7
- package/dist/es/hooks/use-items-focus.js +8 -8
- package/dist/es/hooks/use-items-selection.js +11 -11
- package/dist/es/hooks/use-slots-focus.js +20 -20
- package/dist/es/hooks/use-slots-selection.js +4 -4
- package/dist/es/hooks/useSlotExpand.js +1 -1
- package/dist/es/items/SchedulerEditItem.d.ts +1 -1
- package/dist/es/items/SchedulerEditItem.js +145 -119
- package/dist/es/items/SchedulerItem.d.ts +1 -0
- package/dist/es/items/SchedulerItem.js +408 -167
- package/dist/es/items/SchedulerViewItem.d.ts +1 -0
- package/dist/es/items/SchedulerViewItem.js +17 -17
- package/dist/es/items/hooks/use-drag-item.js +5 -3
- package/dist/es/items/hooks/use-resize-item.d.ts +2 -4
- package/dist/es/items/hooks/use-resize-item.js +278 -176
- package/dist/es/models/SchedulerView.d.ts +2 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/slots/SchedulerEditSlot.js +21 -16
- package/dist/es/slots/SchedulerSlot.js +20 -1
- package/dist/es/slots/SchedulerViewSlot.js +30 -5
- package/dist/es/utils/index.d.ts +4 -0
- package/dist/es/utils/index.js +23 -14
- package/dist/es/views/common/SchedulerDrag.js +1 -0
- package/dist/es/views/common/SchedulerResize.js +69 -21
- package/dist/es/views/common/VerticalResourceIterator.js +2 -2
- package/dist/es/views/day/DayView.js +2 -1
- package/dist/es/views/day/MultiDayView.d.ts +4 -0
- package/dist/es/views/day/MultiDayView.js +86 -15
- package/dist/es/views/week/WeekView.js +2 -1
- package/dist/npm/components/BaseView.js +14 -12
- package/dist/npm/components/header/view-selector/ViewSelectorList.js +9 -7
- package/dist/npm/hooks/use-items-focus.js +8 -8
- package/dist/npm/hooks/use-items-selection.js +11 -11
- package/dist/npm/hooks/use-slots-focus.js +20 -20
- package/dist/npm/hooks/use-slots-selection.js +4 -4
- package/dist/npm/hooks/useSlotExpand.js +1 -1
- package/dist/npm/items/SchedulerEditItem.d.ts +1 -1
- package/dist/npm/items/SchedulerEditItem.js +144 -118
- package/dist/npm/items/SchedulerItem.d.ts +1 -0
- package/dist/npm/items/SchedulerItem.js +407 -166
- package/dist/npm/items/SchedulerViewItem.d.ts +1 -0
- package/dist/npm/items/SchedulerViewItem.js +17 -17
- package/dist/npm/items/hooks/use-drag-item.js +5 -3
- package/dist/npm/items/hooks/use-resize-item.d.ts +2 -4
- package/dist/npm/items/hooks/use-resize-item.js +281 -176
- package/dist/npm/models/SchedulerView.d.ts +2 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/slots/SchedulerEditSlot.js +20 -15
- package/dist/npm/slots/SchedulerSlot.js +20 -1
- package/dist/npm/slots/SchedulerViewSlot.js +30 -5
- package/dist/npm/utils/index.d.ts +4 -0
- package/dist/npm/utils/index.js +24 -15
- package/dist/npm/views/common/SchedulerDrag.js +1 -0
- package/dist/npm/views/common/SchedulerResize.js +69 -21
- package/dist/npm/views/common/VerticalResourceIterator.js +2 -2
- package/dist/npm/views/day/DayView.js +2 -1
- package/dist/npm/views/day/MultiDayView.d.ts +4 -0
- package/dist/npm/views/day/MultiDayView.js +87 -15
- package/dist/npm/views/week/WeekView.js +2 -1
- package/package.json +12 -12
|
@@ -51,6 +51,7 @@ import { SchedulerDrag } from '../../views/common/SchedulerDrag';
|
|
|
51
51
|
import { SchedulerEditSlot } from '../../slots/SchedulerEditSlot';
|
|
52
52
|
import { SchedulerEditItem } from '../../items/SchedulerEditItem';
|
|
53
53
|
import { CurrentTimeMarker } from '../../components/CurrentTimeMarket';
|
|
54
|
+
import { SchedulerResize } from '../common/SchedulerResize';
|
|
54
55
|
var FIRST_INDEX = 0;
|
|
55
56
|
export var GRID_OFFSET = 1; // tslint:enable:max-line-length
|
|
56
57
|
|
|
@@ -133,6 +134,16 @@ var MultiDayViewVue2 = {
|
|
|
133
134
|
return undefined;
|
|
134
135
|
}
|
|
135
136
|
},
|
|
137
|
+
resizeItem: {
|
|
138
|
+
type: Object,
|
|
139
|
+
default: function _default() {
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
format: {
|
|
144
|
+
type: String,
|
|
145
|
+
default: 't'
|
|
146
|
+
},
|
|
136
147
|
// showCurrentTime: {
|
|
137
148
|
// type: Boolean,
|
|
138
149
|
// default: true
|
|
@@ -254,11 +265,15 @@ var MultiDayViewVue2 = {
|
|
|
254
265
|
},
|
|
255
266
|
compDragItem: function compDragItem() {
|
|
256
267
|
return this.dragItem !== undefined ? this.dragItem : this.currentDragItem;
|
|
268
|
+
},
|
|
269
|
+
compResizeItem: function compResizeItem() {
|
|
270
|
+
return this.resizeItem !== undefined ? this.resizeItem : this.currentResizeItem;
|
|
257
271
|
}
|
|
258
272
|
},
|
|
259
273
|
data: function data() {
|
|
260
274
|
return {
|
|
261
|
-
currentDragItem: undefined
|
|
275
|
+
currentDragItem: undefined,
|
|
276
|
+
currentResizeItem: undefined
|
|
262
277
|
};
|
|
263
278
|
},
|
|
264
279
|
created: function created() {
|
|
@@ -322,6 +337,41 @@ var MultiDayViewVue2 = {
|
|
|
322
337
|
}));
|
|
323
338
|
};
|
|
324
339
|
|
|
340
|
+
var resizeItemClue = function resizeItemClue(vertical) {
|
|
341
|
+
return this.compResizeItem && this.editable.resize && (Array.isArray(this.compResizeItem) ? this.compResizeItem.map(function (ri, idx) {
|
|
342
|
+
return h(SchedulerResize, {
|
|
343
|
+
key: idx,
|
|
344
|
+
format: this.$props.format // ignoreIsAllDay={ignoreIsAllDay}
|
|
345
|
+
,
|
|
346
|
+
attrs: this.v3 ? undefined : {
|
|
347
|
+
format: this.$props.format,
|
|
348
|
+
dataItem: ri,
|
|
349
|
+
viewItem: this.$props.viewItem,
|
|
350
|
+
item: this.$props.item,
|
|
351
|
+
vertical: vertical
|
|
352
|
+
},
|
|
353
|
+
dataItem: ri,
|
|
354
|
+
viewItem: this.$props.viewItem,
|
|
355
|
+
item: this.$props.item,
|
|
356
|
+
vertical: vertical
|
|
357
|
+
});
|
|
358
|
+
}, this) : h(SchedulerResize, {
|
|
359
|
+
format: this.$props.format // ignoreIsAllDay={ignoreIsAllDay}
|
|
360
|
+
,
|
|
361
|
+
attrs: this.v3 ? undefined : {
|
|
362
|
+
format: this.$props.format,
|
|
363
|
+
dataItem: this.compResizeItem,
|
|
364
|
+
viewItem: this.$props.viewItem,
|
|
365
|
+
item: this.$props.item,
|
|
366
|
+
vertical: vertical
|
|
367
|
+
},
|
|
368
|
+
dataItem: this.compResizeItem,
|
|
369
|
+
viewItem: this.$props.viewItem,
|
|
370
|
+
item: this.$props.item,
|
|
371
|
+
vertical: vertical
|
|
372
|
+
}));
|
|
373
|
+
};
|
|
374
|
+
|
|
325
375
|
return (// @ts-ignore function children
|
|
326
376
|
h(BaseView, {
|
|
327
377
|
id: this.$props.id,
|
|
@@ -487,16 +537,18 @@ var MultiDayViewVue2 = {
|
|
|
487
537
|
form: this.$props.form,
|
|
488
538
|
onDataaction: this.handleDataAction,
|
|
489
539
|
on: this.v3 ? undefined : {
|
|
490
|
-
"dataaction": this.handleDataAction
|
|
540
|
+
"dataaction": this.handleDataAction,
|
|
541
|
+
"dragitemchange": this.handleDragItemChange,
|
|
542
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
491
543
|
},
|
|
544
|
+
onDragitemchange: this.handleDragItemChange,
|
|
545
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
492
546
|
item: this.$props.item,
|
|
493
547
|
viewItem: this.$props.viewItem,
|
|
494
548
|
editable: this.$props.editable,
|
|
495
549
|
vertical: false
|
|
496
550
|
});
|
|
497
|
-
}, _this2) //
|
|
498
|
-
// dragItemClue.call(this, false)
|
|
499
|
-
] : // @ts-ignore function children
|
|
551
|
+
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, false), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, false)] : // @ts-ignore function children
|
|
500
552
|
h(VerticalResourceIterator, {
|
|
501
553
|
group: _this2.ks.props.group,
|
|
502
554
|
attrs: _this2.v3 ? undefined : {
|
|
@@ -762,15 +814,19 @@ var MultiDayViewVue2 = {
|
|
|
762
814
|
isRecurring: item.isRecurring,
|
|
763
815
|
onDataaction: this.handleDataAction,
|
|
764
816
|
on: this.v3 ? undefined : {
|
|
765
|
-
"dataaction": this.handleDataAction
|
|
817
|
+
"dataaction": this.handleDataAction,
|
|
818
|
+
"dragitemchange": this.handleDragItemChange,
|
|
819
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
766
820
|
},
|
|
821
|
+
onDragitemchange: this.handleDragItemChange,
|
|
822
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
767
823
|
viewItem: this.$props.viewItem,
|
|
768
824
|
item: this.$props.item,
|
|
769
825
|
form: this.$props.form,
|
|
770
826
|
editable: this.$props.editable,
|
|
771
827
|
vertical: false
|
|
772
828
|
});
|
|
773
|
-
}, _this2)], timeItems.map(function (item) {
|
|
829
|
+
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)], timeItems.map(function (item) {
|
|
774
830
|
return h(EditItem, {
|
|
775
831
|
key: item.isRecurring ? item.uid + ":" + item.group.index + ":" + item.range.index + ":" + item.originalStart : item.uid + ":" + item.group.index + ":" + item.range.index,
|
|
776
832
|
uid: item.uid,
|
|
@@ -835,16 +891,18 @@ var MultiDayViewVue2 = {
|
|
|
835
891
|
onDataaction: this.handleDataAction,
|
|
836
892
|
on: this.v3 ? undefined : {
|
|
837
893
|
"dataaction": this.handleDataAction,
|
|
838
|
-
"dragitemchange": this.handleDragItemChange
|
|
894
|
+
"dragitemchange": this.handleDragItemChange,
|
|
895
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
839
896
|
},
|
|
840
897
|
onDragitemchange: this.handleDragItemChange,
|
|
898
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
841
899
|
viewItem: this.$props.viewItem,
|
|
842
900
|
item: this.$props.item,
|
|
843
901
|
form: this.$props.form,
|
|
844
902
|
editable: this.$props.editable,
|
|
845
903
|
vertical: true
|
|
846
904
|
});
|
|
847
|
-
}, _this2), dragItemClue.call(_this2, true)])];
|
|
905
|
+
}, _this2), _this2.compDragItem && !_this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && !_this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)])];
|
|
848
906
|
} : [h("div", {
|
|
849
907
|
"class": "k-scheduler-head"
|
|
850
908
|
}, [_this2.ks.orientation === 'horizontal' ? [h(HorizontalResourceIterator, {
|
|
@@ -994,14 +1052,18 @@ var MultiDayViewVue2 = {
|
|
|
994
1052
|
form: this.$props.form,
|
|
995
1053
|
onDataaction: this.handleDataAction,
|
|
996
1054
|
on: this.v3 ? undefined : {
|
|
997
|
-
"dataaction": this.handleDataAction
|
|
1055
|
+
"dataaction": this.handleDataAction,
|
|
1056
|
+
"dragitemchange": this.handleDragItemChange,
|
|
1057
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
998
1058
|
},
|
|
1059
|
+
onDragitemchange: this.handleDragItemChange,
|
|
1060
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
999
1061
|
item: this.$props.item,
|
|
1000
1062
|
viewItem: this.$props.viewItem,
|
|
1001
1063
|
editable: this.$props.editable,
|
|
1002
1064
|
vertical: false
|
|
1003
1065
|
});
|
|
1004
|
-
}, _this2)] : h(VerticalResourceIterator, {
|
|
1066
|
+
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, false), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, false)] : h(VerticalResourceIterator, {
|
|
1005
1067
|
group: _this2.ks.props.group,
|
|
1006
1068
|
attrs: _this2.v3 ? undefined : {
|
|
1007
1069
|
group: _this2.ks.props.group,
|
|
@@ -1253,15 +1315,19 @@ var MultiDayViewVue2 = {
|
|
|
1253
1315
|
isRecurring: item.isRecurring,
|
|
1254
1316
|
onDataaction: this.handleDataAction,
|
|
1255
1317
|
on: this.v3 ? undefined : {
|
|
1256
|
-
"dataaction": this.handleDataAction
|
|
1318
|
+
"dataaction": this.handleDataAction,
|
|
1319
|
+
"dragitemchange": this.handleDragItemChange,
|
|
1320
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
1257
1321
|
},
|
|
1322
|
+
onDragitemchange: this.handleDragItemChange,
|
|
1323
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
1258
1324
|
viewItem: this.$props.viewItem,
|
|
1259
1325
|
item: this.$props.item,
|
|
1260
1326
|
form: this.$props.form,
|
|
1261
1327
|
editable: this.$props.editable,
|
|
1262
1328
|
vertical: false
|
|
1263
1329
|
});
|
|
1264
|
-
}, _this2)], timeItems.map(function (item) {
|
|
1330
|
+
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)], timeItems.map(function (item) {
|
|
1265
1331
|
return h(EditItem, {
|
|
1266
1332
|
key: item.isRecurring ? item.uid + ":" + item.group.index + ":" + item.range.index + ":" + item.originalStart : item.uid + ":" + item.group.index + ":" + item.range.index,
|
|
1267
1333
|
uid: item.uid,
|
|
@@ -1326,16 +1392,18 @@ var MultiDayViewVue2 = {
|
|
|
1326
1392
|
onDataaction: this.handleDataAction,
|
|
1327
1393
|
on: this.v3 ? undefined : {
|
|
1328
1394
|
"dataaction": this.handleDataAction,
|
|
1329
|
-
"dragitemchange": this.handleDragItemChange
|
|
1395
|
+
"dragitemchange": this.handleDragItemChange,
|
|
1396
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
1330
1397
|
},
|
|
1331
1398
|
onDragitemchange: this.handleDragItemChange,
|
|
1399
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
1332
1400
|
viewItem: this.$props.viewItem,
|
|
1333
1401
|
item: this.$props.item,
|
|
1334
1402
|
form: this.$props.form,
|
|
1335
1403
|
editable: this.$props.editable,
|
|
1336
1404
|
vertical: true
|
|
1337
1405
|
});
|
|
1338
|
-
}, _this2), dragItemClue.call(_this2, true)])])
|
|
1406
|
+
}, _this2), _this2.compDragItem && !_this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && !_this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)])])
|
|
1339
1407
|
);
|
|
1340
1408
|
},
|
|
1341
1409
|
methods: {
|
|
@@ -1344,6 +1412,9 @@ var MultiDayViewVue2 = {
|
|
|
1344
1412
|
},
|
|
1345
1413
|
handleDragItemChange: function handleDragItemChange(item) {
|
|
1346
1414
|
this.currentDragItem = item;
|
|
1415
|
+
},
|
|
1416
|
+
handleResizeItemChange: function handleResizeItemChange(item) {
|
|
1417
|
+
this.currentResizeItem = item;
|
|
1347
1418
|
}
|
|
1348
1419
|
}
|
|
1349
1420
|
};
|
|
@@ -42,10 +42,10 @@ var BaseViewVue2 = {
|
|
|
42
42
|
bv: this.bv,
|
|
43
43
|
setItems: this.dispatchItems,
|
|
44
44
|
setSlots: this.dispatchSlots,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
dispatchSelectedSlots: this.handleSchedulerSlotsSelectAction,
|
|
46
|
+
dispatchSelectedItems: this.handleSchedulerItemsSelectAction,
|
|
47
|
+
dispatchFocusedItems: this.setFocusedItems,
|
|
48
|
+
dispatchFocusedSlots: this.setFocusedSlots // setActiveViewName: this.handleActiveViewNameChange
|
|
49
49
|
|
|
50
50
|
};
|
|
51
51
|
},
|
|
@@ -107,21 +107,23 @@ var BaseViewVue2 = {
|
|
|
107
107
|
});
|
|
108
108
|
},
|
|
109
109
|
handleSchedulerItemsSelectAction: function handleSchedulerItemsSelectAction(action, event) {
|
|
110
|
-
|
|
110
|
+
use_slots_selection_1.dispatchSelectedSlots.call(this, {
|
|
111
111
|
type: use_slots_selection_1.SLOTS_SELECT_ACTION.reset
|
|
112
112
|
});
|
|
113
|
-
|
|
113
|
+
use_items_selection_1.dispatchSelectedItems.call(this, action, event);
|
|
114
114
|
},
|
|
115
115
|
handleSchedulerSlotsSelectAction: function handleSchedulerSlotsSelectAction(action, event) {
|
|
116
|
-
|
|
116
|
+
use_items_selection_1.dispatchSelectedItems.call(this, {
|
|
117
117
|
type: use_items_selection_1.ITEMS_SELECT_ACTION.reset
|
|
118
118
|
}, event);
|
|
119
|
-
|
|
119
|
+
use_slots_selection_1.dispatchSelectedSlots.call(this, action);
|
|
120
|
+
},
|
|
121
|
+
setFocusedItems: function setFocusedItems(action, event) {
|
|
122
|
+
hooks_1.dispatchFocusedItems.call(this, action, event);
|
|
123
|
+
},
|
|
124
|
+
setFocusedSlots: function setFocusedSlots(action, event) {
|
|
125
|
+
hooks_1.dispatchFocusedSlots.call(this, action, event);
|
|
120
126
|
},
|
|
121
|
-
dispatchSelectedSlots: use_slots_selection_1.dispatchSelectedSlots,
|
|
122
|
-
dispatchSelectedItems: use_items_selection_1.dispatchSelectedItems,
|
|
123
|
-
dispatchFocusedItems: hooks_1.dispatchFocusedItems,
|
|
124
|
-
dispatchFocusedSlots: hooks_1.dispatchFocusedSlots,
|
|
125
127
|
dispatchItems: function dispatchItems(action) {
|
|
126
128
|
switch (action.type) {
|
|
127
129
|
case utils_1.COLLECTION_ACTION.add:
|
|
@@ -97,14 +97,9 @@ var ViewSelectorListVue2 = {
|
|
|
97
97
|
}, [activeView && this.media === 'mobile' && // @ts-ignore function children
|
|
98
98
|
h(kendo_vue_buttons_1.DropDownButton, {
|
|
99
99
|
"class": "k-views-dropdown",
|
|
100
|
-
|
|
101
|
-
on: this.v3 ? undefined : {
|
|
102
|
-
"itemclick": this.handleItemClick
|
|
103
|
-
},
|
|
104
|
-
popupSettings: {
|
|
105
|
-
popupClass: 'k-scheduler-toolbar'
|
|
106
|
-
},
|
|
100
|
+
tabIndex: -1,
|
|
107
101
|
attrs: this.v3 ? undefined : {
|
|
102
|
+
tabIndex: -1,
|
|
108
103
|
popupSettings: {
|
|
109
104
|
popupClass: 'k-scheduler-toolbar'
|
|
110
105
|
},
|
|
@@ -120,6 +115,13 @@ var ViewSelectorListVue2 = {
|
|
|
120
115
|
}, this),
|
|
121
116
|
text: activeView.title || activeName
|
|
122
117
|
},
|
|
118
|
+
onItemclick: this.handleItemClick,
|
|
119
|
+
on: this.v3 ? undefined : {
|
|
120
|
+
"itemclick": this.handleItemClick
|
|
121
|
+
},
|
|
122
|
+
popupSettings: {
|
|
123
|
+
popupClass: 'k-scheduler-toolbar'
|
|
124
|
+
},
|
|
123
125
|
textField: "title",
|
|
124
126
|
items: views.map(function (v) {
|
|
125
127
|
var nameTitle = 'scheduler.' + v.name + 'ViewTitle';
|
|
@@ -28,15 +28,15 @@ exports.dispatchFocusedItems = function (action, event) {
|
|
|
28
28
|
switch (action.type) {
|
|
29
29
|
case ITEMS_FOCUS_ACTION.next:
|
|
30
30
|
{
|
|
31
|
-
if (!action.item || !
|
|
31
|
+
if (!action.item || !this.bv.items) {
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
var next = utils_1.findNextItem(action.item, this.items, action.ignoreIsAllDay, false);
|
|
35
|
+
var next = utils_1.findNextItem(action.item, this.bv.items, action.ignoreIsAllDay, false);
|
|
36
36
|
|
|
37
|
-
if (next && next.
|
|
37
|
+
if (next && next.element) {
|
|
38
38
|
event.preventDefault();
|
|
39
|
-
next.
|
|
39
|
+
next.element.focus();
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
break;
|
|
@@ -44,15 +44,15 @@ exports.dispatchFocusedItems = function (action, event) {
|
|
|
44
44
|
|
|
45
45
|
case ITEMS_FOCUS_ACTION.prev:
|
|
46
46
|
{
|
|
47
|
-
if (!action.item || !
|
|
47
|
+
if (!action.item || !this.bv.items) {
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
var next = utils_1.findNextItem(action.item, this.items, action.ignoreIsAllDay, true);
|
|
51
|
+
var next = utils_1.findNextItem(action.item, this.bv.items, action.ignoreIsAllDay, true);
|
|
52
52
|
|
|
53
|
-
if (next && next.
|
|
53
|
+
if (next && next.element) {
|
|
54
54
|
event.preventDefault();
|
|
55
|
-
next.
|
|
55
|
+
next.element.focus();
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
break;
|
|
@@ -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 || !
|
|
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 || !
|
|
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
|
|
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
|
|
38
|
+
if (next && next.$el) {
|
|
39
39
|
event.preventDefault();
|
|
40
|
-
next.
|
|
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
|
|
54
|
+
if (next && next.$el) {
|
|
55
55
|
event.preventDefault();
|
|
56
|
-
next.
|
|
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
|
|
70
|
+
if (next && next.$el) {
|
|
71
71
|
event.preventDefault();
|
|
72
|
-
next.
|
|
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
|
|
86
|
+
if (next && next.$el) {
|
|
87
87
|
event.preventDefault();
|
|
88
|
-
next.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|