@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.
- package/dist/cdn/js/kendo-vue-scheduler.js +2 -2
- package/dist/es/Scheduler.js +3 -0
- 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 +260 -205
- package/dist/es/items/SchedulerItem.d.ts +1 -0
- package/dist/es/items/SchedulerItem.js +409 -168
- 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 +70 -21
- package/dist/es/views/common/VerticalResourceIterator.js +2 -2
- package/dist/es/views/day/DayView.js +5 -1
- package/dist/es/views/day/MultiDayView.d.ts +4 -0
- package/dist/es/views/day/MultiDayView.js +87 -15
- package/dist/es/views/month/MonthView.js +1 -0
- package/dist/es/views/time/MultiDayTimelineView.js +1 -0
- package/dist/es/views/time/TimelineView.js +3 -0
- package/dist/es/views/week/WeekView.js +5 -1
- package/dist/es/views/week/WorkWeekView.js +3 -0
- package/dist/npm/Scheduler.js +3 -0
- 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 +258 -203
- package/dist/npm/items/SchedulerItem.d.ts +1 -0
- package/dist/npm/items/SchedulerItem.js +408 -167
- 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 +70 -21
- package/dist/npm/views/common/VerticalResourceIterator.js +2 -2
- package/dist/npm/views/day/DayView.js +5 -1
- package/dist/npm/views/day/MultiDayView.d.ts +4 -0
- package/dist/npm/views/day/MultiDayView.js +88 -15
- package/dist/npm/views/month/MonthView.js +1 -0
- package/dist/npm/views/time/MultiDayTimelineView.js +1 -0
- package/dist/npm/views/time/TimelineView.js +3 -0
- package/dist/npm/views/week/WeekView.js +5 -1
- package/dist/npm/views/week/WorkWeekView.js +3 -0
- 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
|
|
@@ -144,6 +155,7 @@ var MultiDayViewVue2 = {
|
|
|
144
155
|
timeHeaderCell: String,
|
|
145
156
|
slotRender: [String, Function, Object],
|
|
146
157
|
item: [String, Function, Object],
|
|
158
|
+
viewItem: [String, Function, Object],
|
|
147
159
|
editable: {
|
|
148
160
|
type: [Boolean, Object],
|
|
149
161
|
default: false
|
|
@@ -254,11 +266,15 @@ var MultiDayViewVue2 = {
|
|
|
254
266
|
},
|
|
255
267
|
compDragItem: function compDragItem() {
|
|
256
268
|
return this.dragItem !== undefined ? this.dragItem : this.currentDragItem;
|
|
269
|
+
},
|
|
270
|
+
compResizeItem: function compResizeItem() {
|
|
271
|
+
return this.resizeItem !== undefined ? this.resizeItem : this.currentResizeItem;
|
|
257
272
|
}
|
|
258
273
|
},
|
|
259
274
|
data: function data() {
|
|
260
275
|
return {
|
|
261
|
-
currentDragItem: undefined
|
|
276
|
+
currentDragItem: undefined,
|
|
277
|
+
currentResizeItem: undefined
|
|
262
278
|
};
|
|
263
279
|
},
|
|
264
280
|
created: function created() {
|
|
@@ -322,6 +338,41 @@ var MultiDayViewVue2 = {
|
|
|
322
338
|
}));
|
|
323
339
|
};
|
|
324
340
|
|
|
341
|
+
var resizeItemClue = function resizeItemClue(vertical) {
|
|
342
|
+
return this.compResizeItem && this.editable.resize && (Array.isArray(this.compResizeItem) ? this.compResizeItem.map(function (ri, idx) {
|
|
343
|
+
return h(SchedulerResize, {
|
|
344
|
+
key: idx,
|
|
345
|
+
format: this.$props.format // ignoreIsAllDay={ignoreIsAllDay}
|
|
346
|
+
,
|
|
347
|
+
attrs: this.v3 ? undefined : {
|
|
348
|
+
format: this.$props.format,
|
|
349
|
+
dataItem: ri,
|
|
350
|
+
viewItem: this.$props.viewItem,
|
|
351
|
+
item: this.$props.item,
|
|
352
|
+
vertical: vertical
|
|
353
|
+
},
|
|
354
|
+
dataItem: ri,
|
|
355
|
+
viewItem: this.$props.viewItem,
|
|
356
|
+
item: this.$props.item,
|
|
357
|
+
vertical: vertical
|
|
358
|
+
});
|
|
359
|
+
}, this) : h(SchedulerResize, {
|
|
360
|
+
format: this.$props.format // ignoreIsAllDay={ignoreIsAllDay}
|
|
361
|
+
,
|
|
362
|
+
attrs: this.v3 ? undefined : {
|
|
363
|
+
format: this.$props.format,
|
|
364
|
+
dataItem: this.compResizeItem,
|
|
365
|
+
viewItem: this.$props.viewItem,
|
|
366
|
+
item: this.$props.item,
|
|
367
|
+
vertical: vertical
|
|
368
|
+
},
|
|
369
|
+
dataItem: this.compResizeItem,
|
|
370
|
+
viewItem: this.$props.viewItem,
|
|
371
|
+
item: this.$props.item,
|
|
372
|
+
vertical: vertical
|
|
373
|
+
}));
|
|
374
|
+
};
|
|
375
|
+
|
|
325
376
|
return (// @ts-ignore function children
|
|
326
377
|
h(BaseView, {
|
|
327
378
|
id: this.$props.id,
|
|
@@ -487,16 +538,18 @@ var MultiDayViewVue2 = {
|
|
|
487
538
|
form: this.$props.form,
|
|
488
539
|
onDataaction: this.handleDataAction,
|
|
489
540
|
on: this.v3 ? undefined : {
|
|
490
|
-
"dataaction": this.handleDataAction
|
|
541
|
+
"dataaction": this.handleDataAction,
|
|
542
|
+
"dragitemchange": this.handleDragItemChange,
|
|
543
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
491
544
|
},
|
|
545
|
+
onDragitemchange: this.handleDragItemChange,
|
|
546
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
492
547
|
item: this.$props.item,
|
|
493
548
|
viewItem: this.$props.viewItem,
|
|
494
549
|
editable: this.$props.editable,
|
|
495
550
|
vertical: false
|
|
496
551
|
});
|
|
497
|
-
}, _this2) //
|
|
498
|
-
// dragItemClue.call(this, false)
|
|
499
|
-
] : // @ts-ignore function children
|
|
552
|
+
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, false), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, false)] : // @ts-ignore function children
|
|
500
553
|
h(VerticalResourceIterator, {
|
|
501
554
|
group: _this2.ks.props.group,
|
|
502
555
|
attrs: _this2.v3 ? undefined : {
|
|
@@ -762,15 +815,19 @@ var MultiDayViewVue2 = {
|
|
|
762
815
|
isRecurring: item.isRecurring,
|
|
763
816
|
onDataaction: this.handleDataAction,
|
|
764
817
|
on: this.v3 ? undefined : {
|
|
765
|
-
"dataaction": this.handleDataAction
|
|
818
|
+
"dataaction": this.handleDataAction,
|
|
819
|
+
"dragitemchange": this.handleDragItemChange,
|
|
820
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
766
821
|
},
|
|
822
|
+
onDragitemchange: this.handleDragItemChange,
|
|
823
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
767
824
|
viewItem: this.$props.viewItem,
|
|
768
825
|
item: this.$props.item,
|
|
769
826
|
form: this.$props.form,
|
|
770
827
|
editable: this.$props.editable,
|
|
771
828
|
vertical: false
|
|
772
829
|
});
|
|
773
|
-
}, _this2)], timeItems.map(function (item) {
|
|
830
|
+
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)], timeItems.map(function (item) {
|
|
774
831
|
return h(EditItem, {
|
|
775
832
|
key: item.isRecurring ? item.uid + ":" + item.group.index + ":" + item.range.index + ":" + item.originalStart : item.uid + ":" + item.group.index + ":" + item.range.index,
|
|
776
833
|
uid: item.uid,
|
|
@@ -835,16 +892,18 @@ var MultiDayViewVue2 = {
|
|
|
835
892
|
onDataaction: this.handleDataAction,
|
|
836
893
|
on: this.v3 ? undefined : {
|
|
837
894
|
"dataaction": this.handleDataAction,
|
|
838
|
-
"dragitemchange": this.handleDragItemChange
|
|
895
|
+
"dragitemchange": this.handleDragItemChange,
|
|
896
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
839
897
|
},
|
|
840
898
|
onDragitemchange: this.handleDragItemChange,
|
|
899
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
841
900
|
viewItem: this.$props.viewItem,
|
|
842
901
|
item: this.$props.item,
|
|
843
902
|
form: this.$props.form,
|
|
844
903
|
editable: this.$props.editable,
|
|
845
904
|
vertical: true
|
|
846
905
|
});
|
|
847
|
-
}, _this2), dragItemClue.call(_this2, true)])];
|
|
906
|
+
}, _this2), _this2.compDragItem && !_this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && !_this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)])];
|
|
848
907
|
} : [h("div", {
|
|
849
908
|
"class": "k-scheduler-head"
|
|
850
909
|
}, [_this2.ks.orientation === 'horizontal' ? [h(HorizontalResourceIterator, {
|
|
@@ -994,14 +1053,18 @@ var MultiDayViewVue2 = {
|
|
|
994
1053
|
form: this.$props.form,
|
|
995
1054
|
onDataaction: this.handleDataAction,
|
|
996
1055
|
on: this.v3 ? undefined : {
|
|
997
|
-
"dataaction": this.handleDataAction
|
|
1056
|
+
"dataaction": this.handleDataAction,
|
|
1057
|
+
"dragitemchange": this.handleDragItemChange,
|
|
1058
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
998
1059
|
},
|
|
1060
|
+
onDragitemchange: this.handleDragItemChange,
|
|
1061
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
999
1062
|
item: this.$props.item,
|
|
1000
1063
|
viewItem: this.$props.viewItem,
|
|
1001
1064
|
editable: this.$props.editable,
|
|
1002
1065
|
vertical: false
|
|
1003
1066
|
});
|
|
1004
|
-
}, _this2)] : h(VerticalResourceIterator, {
|
|
1067
|
+
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, false), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, false)] : h(VerticalResourceIterator, {
|
|
1005
1068
|
group: _this2.ks.props.group,
|
|
1006
1069
|
attrs: _this2.v3 ? undefined : {
|
|
1007
1070
|
group: _this2.ks.props.group,
|
|
@@ -1253,15 +1316,19 @@ var MultiDayViewVue2 = {
|
|
|
1253
1316
|
isRecurring: item.isRecurring,
|
|
1254
1317
|
onDataaction: this.handleDataAction,
|
|
1255
1318
|
on: this.v3 ? undefined : {
|
|
1256
|
-
"dataaction": this.handleDataAction
|
|
1319
|
+
"dataaction": this.handleDataAction,
|
|
1320
|
+
"dragitemchange": this.handleDragItemChange,
|
|
1321
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
1257
1322
|
},
|
|
1323
|
+
onDragitemchange: this.handleDragItemChange,
|
|
1324
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
1258
1325
|
viewItem: this.$props.viewItem,
|
|
1259
1326
|
item: this.$props.item,
|
|
1260
1327
|
form: this.$props.form,
|
|
1261
1328
|
editable: this.$props.editable,
|
|
1262
1329
|
vertical: false
|
|
1263
1330
|
});
|
|
1264
|
-
}, _this2)], timeItems.map(function (item) {
|
|
1331
|
+
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)], timeItems.map(function (item) {
|
|
1265
1332
|
return h(EditItem, {
|
|
1266
1333
|
key: item.isRecurring ? item.uid + ":" + item.group.index + ":" + item.range.index + ":" + item.originalStart : item.uid + ":" + item.group.index + ":" + item.range.index,
|
|
1267
1334
|
uid: item.uid,
|
|
@@ -1326,16 +1393,18 @@ var MultiDayViewVue2 = {
|
|
|
1326
1393
|
onDataaction: this.handleDataAction,
|
|
1327
1394
|
on: this.v3 ? undefined : {
|
|
1328
1395
|
"dataaction": this.handleDataAction,
|
|
1329
|
-
"dragitemchange": this.handleDragItemChange
|
|
1396
|
+
"dragitemchange": this.handleDragItemChange,
|
|
1397
|
+
"resizeitemchange": this.handleResizeItemChange
|
|
1330
1398
|
},
|
|
1331
1399
|
onDragitemchange: this.handleDragItemChange,
|
|
1400
|
+
onResizeitemchange: this.handleResizeItemChange,
|
|
1332
1401
|
viewItem: this.$props.viewItem,
|
|
1333
1402
|
item: this.$props.item,
|
|
1334
1403
|
form: this.$props.form,
|
|
1335
1404
|
editable: this.$props.editable,
|
|
1336
1405
|
vertical: true
|
|
1337
1406
|
});
|
|
1338
|
-
}, _this2), dragItemClue.call(_this2, true)])])
|
|
1407
|
+
}, _this2), _this2.compDragItem && !_this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && !_this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)])])
|
|
1339
1408
|
);
|
|
1340
1409
|
},
|
|
1341
1410
|
methods: {
|
|
@@ -1344,6 +1413,9 @@ var MultiDayViewVue2 = {
|
|
|
1344
1413
|
},
|
|
1345
1414
|
handleDragItemChange: function handleDragItemChange(item) {
|
|
1346
1415
|
this.currentDragItem = item;
|
|
1416
|
+
},
|
|
1417
|
+
handleResizeItemChange: function handleResizeItemChange(item) {
|
|
1418
|
+
this.currentResizeItem = item;
|
|
1347
1419
|
}
|
|
1348
1420
|
}
|
|
1349
1421
|
};
|
|
@@ -94,6 +94,7 @@ var TimelineViewVue2 = {
|
|
|
94
94
|
},
|
|
95
95
|
slotRender: [String, Function, Object],
|
|
96
96
|
item: [String, Function, Object],
|
|
97
|
+
viewItem: [String, Function, Object],
|
|
97
98
|
editable: [Object, Boolean]
|
|
98
99
|
},
|
|
99
100
|
// @ts-ignore
|
|
@@ -129,6 +130,7 @@ var TimelineViewVue2 = {
|
|
|
129
130
|
workWeekEnd: this.$props.workWeekEnd,
|
|
130
131
|
slotRender: this.$props.slotRender,
|
|
131
132
|
item: this.$props.item,
|
|
133
|
+
viewItem: this.$props.viewItem,
|
|
132
134
|
editable: this.$props.editable
|
|
133
135
|
},
|
|
134
136
|
dateRange: this.$props.dateRange,
|
|
@@ -150,6 +152,7 @@ var TimelineViewVue2 = {
|
|
|
150
152
|
workWeekEnd: this.$props.workWeekEnd,
|
|
151
153
|
slotRender: this.$props.slotRender,
|
|
152
154
|
item: this.$props.item,
|
|
155
|
+
viewItem: this.$props.viewItem,
|
|
153
156
|
editable: this.$props.editable,
|
|
154
157
|
onDataaction: this.handleDataAction,
|
|
155
158
|
on: this.v3 ? undefined : {
|
|
@@ -87,10 +87,12 @@ var WeekViewVue2 = {
|
|
|
87
87
|
timeHeaderCell: String,
|
|
88
88
|
slotRender: [String, Function, Object],
|
|
89
89
|
item: [String, Function, Object],
|
|
90
|
+
viewItem: [String, Function, Object],
|
|
90
91
|
editable: {
|
|
91
92
|
type: [Boolean, Object],
|
|
92
93
|
default: false
|
|
93
|
-
}
|
|
94
|
+
},
|
|
95
|
+
format: String
|
|
94
96
|
},
|
|
95
97
|
inject: {
|
|
96
98
|
kendoLocalizationService: {
|
|
@@ -133,6 +135,7 @@ var WeekViewVue2 = {
|
|
|
133
135
|
timeHeaderCell: this.$props.timeHeaderCell,
|
|
134
136
|
slotRender: this.$props.slotRender,
|
|
135
137
|
item: this.$props.item,
|
|
138
|
+
viewItem: this.$props.viewItem,
|
|
136
139
|
editable: this.$props.editable
|
|
137
140
|
},
|
|
138
141
|
dateRange: this.$props.dateRange,
|
|
@@ -155,6 +158,7 @@ var WeekViewVue2 = {
|
|
|
155
158
|
timeHeaderCell: this.$props.timeHeaderCell,
|
|
156
159
|
slotRender: this.$props.slotRender,
|
|
157
160
|
item: this.$props.item,
|
|
161
|
+
viewItem: this.$props.viewItem,
|
|
158
162
|
editable: this.$props.editable,
|
|
159
163
|
onDataaction: this.handleDataAction,
|
|
160
164
|
on: this.v3 ? undefined : {
|
|
@@ -76,6 +76,7 @@ var WorkWeekViewVue2 = {
|
|
|
76
76
|
},
|
|
77
77
|
slotRender: [String, Function, Object],
|
|
78
78
|
item: [String, Function, Object],
|
|
79
|
+
viewItem: [String, Function, Object],
|
|
79
80
|
editable: {
|
|
80
81
|
type: [Boolean, Object],
|
|
81
82
|
default: false
|
|
@@ -118,6 +119,7 @@ var WorkWeekViewVue2 = {
|
|
|
118
119
|
step: DAYS_IN_WEEK_COUNT,
|
|
119
120
|
slotRender: this.$props.slotRender,
|
|
120
121
|
item: this.$props.item,
|
|
122
|
+
viewItem: this.$props.viewItem,
|
|
121
123
|
editable: this.$props.editable
|
|
122
124
|
},
|
|
123
125
|
dateRange: this.$props.dateRange,
|
|
@@ -131,6 +133,7 @@ var WorkWeekViewVue2 = {
|
|
|
131
133
|
step: DAYS_IN_WEEK_COUNT,
|
|
132
134
|
slotRender: this.$props.slotRender,
|
|
133
135
|
item: this.$props.item,
|
|
136
|
+
viewItem: this.$props.viewItem,
|
|
134
137
|
editable: this.$props.editable,
|
|
135
138
|
onDataaction: this.handleDataAction,
|
|
136
139
|
on: this.v3 ? undefined : {
|
package/dist/npm/Scheduler.js
CHANGED
|
@@ -143,6 +143,7 @@ var SchedulerVue2 = {
|
|
|
143
143
|
footer: [String, Function, Object],
|
|
144
144
|
slotRender: [String, Function, Object],
|
|
145
145
|
item: [String, Function, Object],
|
|
146
|
+
viewItem: [String, Function, Object],
|
|
146
147
|
task: [String, Function, Object]
|
|
147
148
|
},
|
|
148
149
|
computed: {
|
|
@@ -252,6 +253,7 @@ var SchedulerVue2 = {
|
|
|
252
253
|
var footer = kendo_vue_common_1.templateRendering.call(this, view.footer || this.$props.footer, kendo_vue_common_1.getListeners.call(this));
|
|
253
254
|
var slotRender = kendo_vue_common_1.templateRendering.call(this, view.slot || this.$props.slotRender, {});
|
|
254
255
|
var item = kendo_vue_common_1.templateRendering.call(this, view.item || this.$props.item, {});
|
|
256
|
+
var viewItem = kendo_vue_common_1.templateRendering.call(this, view.viewItem || this.$props.viewItem, {});
|
|
255
257
|
var task = kendo_vue_common_1.templateRendering.call(this, view.task || this.$props.task, {});
|
|
256
258
|
var ViewSelector = SchedulerViewSelector_1.SchedulerViewSelector;
|
|
257
259
|
var viewComponent = this.getViewComponentByName(this.ks.activeViewName || view.name);
|
|
@@ -264,6 +266,7 @@ var SchedulerVue2 = {
|
|
|
264
266
|
dateRange: this.ks.dateRange,
|
|
265
267
|
slotRender: slotRender,
|
|
266
268
|
item: item,
|
|
269
|
+
viewItem: viewItem,
|
|
267
270
|
task: task
|
|
268
271
|
});
|
|
269
272
|
|
|
@@ -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
|
};
|