@progress/kendo-vue-scheduler 3.8.3 → 3.8.4-dev.202302151437
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 +1 -1
- package/dist/es/components/BaseView.js +1 -2
- package/dist/es/components/CurrentTimeMarker.js +4 -3
- package/dist/es/components/CurrentTimeMarkerArrow.js +4 -3
- package/dist/es/hooks/useSlotExpand.js +1 -2
- package/dist/es/items/SchedulerEditItem.js +4 -4
- package/dist/es/items/SchedulerViewItem.js +15 -14
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/slots/SchedulerEditSlot.js +17 -11
- package/dist/es/slots/SchedulerSlot.js +32 -40
- package/dist/es/slots/SchedulerViewSlot.js +8 -0
- package/dist/es/views/agenda/AgendaViewBody.js +45 -23
- package/dist/es/views/day/DayViewAllDaySlots.js +72 -41
- package/dist/es/views/day/DayViewMiddleRow.js +73 -43
- package/dist/es/views/day/DayViewVerticalRow.js +70 -43
- package/dist/es/views/day/DayViewVerticalSlotsRow.js +74 -44
- package/dist/es/views/month/MonthViewBody.js +50 -23
- package/dist/es/views/month/MonthViewHead.js +29 -4
- package/dist/es/views/time/TimelineViewBody.js +71 -43
- package/dist/esm/components/BaseView.js +1 -2
- package/dist/esm/components/CurrentTimeMarker.js +4 -3
- package/dist/esm/components/CurrentTimeMarkerArrow.js +4 -3
- package/dist/esm/hooks/useSlotExpand.js +1 -2
- package/dist/esm/items/SchedulerEditItem.js +4 -4
- package/dist/esm/items/SchedulerViewItem.js +15 -14
- package/dist/esm/package-metadata.js +1 -1
- package/dist/esm/slots/SchedulerEditSlot.js +17 -11
- package/dist/esm/slots/SchedulerSlot.js +32 -40
- package/dist/esm/slots/SchedulerViewSlot.js +8 -0
- package/dist/esm/views/agenda/AgendaViewBody.js +45 -23
- package/dist/esm/views/day/DayViewAllDaySlots.js +72 -41
- package/dist/esm/views/day/DayViewMiddleRow.js +73 -43
- package/dist/esm/views/day/DayViewVerticalRow.js +70 -43
- package/dist/esm/views/day/DayViewVerticalSlotsRow.js +74 -44
- package/dist/esm/views/month/MonthViewBody.js +50 -23
- package/dist/esm/views/month/MonthViewHead.js +29 -4
- package/dist/esm/views/time/TimelineViewBody.js +71 -43
- package/dist/npm/components/BaseView.js +1 -2
- package/dist/npm/components/CurrentTimeMarker.js +4 -3
- package/dist/npm/components/CurrentTimeMarkerArrow.js +4 -3
- package/dist/npm/hooks/useSlotExpand.js +1 -2
- package/dist/npm/items/SchedulerEditItem.js +4 -4
- package/dist/npm/items/SchedulerViewItem.js +15 -14
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/slots/SchedulerEditSlot.js +17 -11
- package/dist/npm/slots/SchedulerSlot.js +32 -40
- package/dist/npm/slots/SchedulerViewSlot.js +8 -0
- package/dist/npm/views/agenda/AgendaViewBody.js +48 -26
- package/dist/npm/views/day/DayViewAllDaySlots.js +72 -41
- package/dist/npm/views/day/DayViewMiddleRow.js +75 -45
- package/dist/npm/views/day/DayViewVerticalRow.js +70 -43
- package/dist/npm/views/day/DayViewVerticalSlotsRow.js +76 -46
- package/dist/npm/views/month/MonthViewBody.js +50 -23
- package/dist/npm/views/month/MonthViewHead.js +29 -4
- package/dist/npm/views/time/TimelineViewBody.js +73 -45
- package/package.json +12 -12
|
@@ -10,6 +10,7 @@ var allVue = Vue;
|
|
|
10
10
|
var gh = allVue.h;
|
|
11
11
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
12
12
|
var inject = allVue.inject;
|
|
13
|
+
var main_1 = require("../../utils/main");
|
|
13
14
|
var SchedulerEditSlot_1 = require("../../slots/SchedulerEditSlot");
|
|
14
15
|
/** @hidden */
|
|
15
16
|
var DayViewAllDaySlotsVue2 = {
|
|
@@ -33,8 +34,50 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
33
34
|
},
|
|
34
35
|
ks: {
|
|
35
36
|
default: null
|
|
37
|
+
},
|
|
38
|
+
setSlots: {
|
|
39
|
+
default: null
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
provide: function provide() {
|
|
43
|
+
return {
|
|
44
|
+
ksSlots: this.ksSlots
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
data: function data() {
|
|
48
|
+
var daySlots = this.daySlots;
|
|
49
|
+
var groupIndex = this.groupIndex !== undefined ? this.groupIndex : this.ri.groupIndex;
|
|
50
|
+
return {
|
|
51
|
+
ksSlots: {
|
|
52
|
+
cSlots: this.calculateRanges(daySlots, groupIndex, this.dayRanges)
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
watch: {
|
|
57
|
+
currentCellSlots: function currentCellSlots(newValue) {
|
|
58
|
+
this.ksSlots.cSlots = newValue;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
computed: {
|
|
62
|
+
currentCellSlots: function currentCellSlots() {
|
|
63
|
+
var daySlots = this.daySlots;
|
|
64
|
+
var groupIndex = this.groupIndex !== undefined ? this.groupIndex : this.ri.groupIndex;
|
|
65
|
+
return this.calculateRanges(daySlots, groupIndex, this.dayRanges);
|
|
36
66
|
}
|
|
37
67
|
},
|
|
68
|
+
destroyed: !!isV3 ? undefined : function () {
|
|
69
|
+
this.setSlots({
|
|
70
|
+
type: main_1.COLLECTION_ACTION.remove,
|
|
71
|
+
item: this
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
// @ts-ignore
|
|
75
|
+
unmounted: function unmounted() {
|
|
76
|
+
this.setSlots({
|
|
77
|
+
type: main_1.COLLECTION_ACTION.remove,
|
|
78
|
+
item: this
|
|
79
|
+
});
|
|
80
|
+
},
|
|
38
81
|
// @ts-ignore
|
|
39
82
|
setup: !isV3 ? undefined : function () {
|
|
40
83
|
var v3 = !!isV3;
|
|
@@ -53,59 +96,47 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
53
96
|
return h("div", {
|
|
54
97
|
key: groupIndex,
|
|
55
98
|
"class": "k-scheduler-row"
|
|
56
|
-
}, [this.
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
index: slot.index,
|
|
62
|
-
attrs: this.v3 ? undefined : {
|
|
63
|
-
index: slot.index,
|
|
64
|
-
start: slot.start,
|
|
65
|
-
end: slot.end,
|
|
66
|
-
zonedStart: slot.zonedStart,
|
|
67
|
-
zonedEnd: slot.zonedEnd,
|
|
68
|
-
items: slot.items,
|
|
69
|
-
group: slot.group,
|
|
70
|
-
range: slot.range,
|
|
71
|
-
isAllDay: slot.isAllDay,
|
|
72
|
-
form: this.$props.form,
|
|
73
|
-
slotRender: this.$props.slotRender,
|
|
74
|
-
viewSlot: this.$props.viewSlot,
|
|
75
|
-
row: 0,
|
|
76
|
-
col: this.ks.orientation === 'horizontal' ? filtered.length * (groupIndex || 0) + slotIndex : slotIndex,
|
|
77
|
-
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart),
|
|
78
|
-
expandable: true,
|
|
79
|
-
editable: this.$props.editable
|
|
80
|
-
},
|
|
81
|
-
start: slot.start,
|
|
82
|
-
end: slot.end,
|
|
83
|
-
zonedStart: slot.zonedStart,
|
|
84
|
-
zonedEnd: slot.zonedEnd,
|
|
85
|
-
items: slot.items,
|
|
86
|
-
group: slot.group,
|
|
87
|
-
range: slot.range,
|
|
88
|
-
isAllDay: slot.isAllDay,
|
|
89
|
-
onDataaction: this.handleDataAction,
|
|
90
|
-
on: this.v3 ? undefined : {
|
|
91
|
-
"dataaction": this.handleDataAction
|
|
92
|
-
},
|
|
99
|
+
}, [this.currentCellSlots.map(function (slot, slotIndex, filtered) {
|
|
100
|
+
return h(SchedulerEditSlot_1.SchedulerEditSlot, {
|
|
101
|
+
index: slotIndex,
|
|
102
|
+
attrs: this.v3 ? undefined : {
|
|
103
|
+
index: slotIndex,
|
|
93
104
|
form: this.$props.form,
|
|
94
105
|
slotRender: this.$props.slotRender,
|
|
95
|
-
viewSlot: this.$props.viewSlot
|
|
96
|
-
key
|
|
106
|
+
viewSlot: this.$props.viewSlot
|
|
107
|
+
// key={`${slot.start.getTime()}:${slot.group.index}`}
|
|
108
|
+
,
|
|
97
109
|
row: 0,
|
|
98
110
|
col: this.ks.orientation === 'horizontal' ? filtered.length * (groupIndex || 0) + slotIndex : slotIndex,
|
|
99
111
|
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart),
|
|
100
112
|
expandable: true,
|
|
101
113
|
editable: this.$props.editable
|
|
102
|
-
}
|
|
103
|
-
|
|
114
|
+
},
|
|
115
|
+
onDataaction: this.handleDataAction,
|
|
116
|
+
on: this.v3 ? undefined : {
|
|
117
|
+
"dataaction": this.handleDataAction
|
|
118
|
+
},
|
|
119
|
+
form: this.$props.form,
|
|
120
|
+
slotRender: this.$props.slotRender,
|
|
121
|
+
viewSlot: this.$props.viewSlot,
|
|
122
|
+
row: 0,
|
|
123
|
+
col: this.ks.orientation === 'horizontal' ? filtered.length * (groupIndex || 0) + slotIndex : slotIndex,
|
|
124
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart),
|
|
125
|
+
expandable: true,
|
|
126
|
+
editable: this.$props.editable
|
|
127
|
+
});
|
|
104
128
|
}, this)]);
|
|
105
129
|
},
|
|
106
130
|
methods: {
|
|
107
131
|
handleDataAction: function handleDataAction(action) {
|
|
108
132
|
this.$emit('dataaction', action);
|
|
133
|
+
},
|
|
134
|
+
calculateRanges: function calculateRanges(daySlots, groupIndex, dayRanges) {
|
|
135
|
+
return dayRanges.map(function (_, rangeIndex) {
|
|
136
|
+
return daySlots.filter(function (s) {
|
|
137
|
+
return s.group.index === groupIndex && s.range.index === rangeIndex;
|
|
138
|
+
});
|
|
139
|
+
}).flat();
|
|
109
140
|
}
|
|
110
141
|
}
|
|
111
142
|
};
|
|
@@ -10,10 +10,11 @@ var allVue = Vue;
|
|
|
10
10
|
var gh = allVue.h;
|
|
11
11
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
12
12
|
var inject = allVue.inject;
|
|
13
|
+
var main_1 = require("../../utils/main");
|
|
13
14
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
14
15
|
var MultiDayView_1 = require("./MultiDayView");
|
|
15
16
|
var SchedulerEditSlot_1 = require("../../slots/SchedulerEditSlot");
|
|
16
|
-
var
|
|
17
|
+
var main_2 = require("../../utils/main");
|
|
17
18
|
/** @hidden */
|
|
18
19
|
var DayViewMiddleRowVue2 = {
|
|
19
20
|
name: 'KendoDayViewMiddleRow',
|
|
@@ -40,8 +41,52 @@ var DayViewMiddleRowVue2 = {
|
|
|
40
41
|
inject: {
|
|
41
42
|
ri: {
|
|
42
43
|
default: null
|
|
44
|
+
},
|
|
45
|
+
setSlots: {
|
|
46
|
+
default: null
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
provide: function provide() {
|
|
50
|
+
return {
|
|
51
|
+
ksSlots: this.ksSlots
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
data: function data() {
|
|
55
|
+
var timeSlots = this.timeSlots;
|
|
56
|
+
var groupIndex = this.ri.groupIndex;
|
|
57
|
+
var root = this.root;
|
|
58
|
+
return {
|
|
59
|
+
ksSlots: {
|
|
60
|
+
cSlots: this.calculateRanges(timeSlots, groupIndex, this.timeRanges, root)
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
watch: {
|
|
65
|
+
currentCellSlots: function currentCellSlots(newValue) {
|
|
66
|
+
this.ksSlots.cSlots = newValue;
|
|
43
67
|
}
|
|
44
68
|
},
|
|
69
|
+
computed: {
|
|
70
|
+
currentCellSlots: function currentCellSlots() {
|
|
71
|
+
var timeSlots = this.timeSlots;
|
|
72
|
+
var groupIndex = this.ri.groupIndex;
|
|
73
|
+
var root = this.root;
|
|
74
|
+
return this.calculateRanges(timeSlots, groupIndex, this.timeRanges, root);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
destroyed: !!isV3 ? undefined : function () {
|
|
78
|
+
this.setSlots({
|
|
79
|
+
type: main_1.COLLECTION_ACTION.remove,
|
|
80
|
+
item: this
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
unmounted: function unmounted() {
|
|
85
|
+
this.setSlots({
|
|
86
|
+
type: main_1.COLLECTION_ACTION.remove,
|
|
87
|
+
item: this
|
|
88
|
+
});
|
|
89
|
+
},
|
|
45
90
|
// @ts-ignore
|
|
46
91
|
setup: !isV3 ? undefined : function () {
|
|
47
92
|
var v3 = !!isV3;
|
|
@@ -59,60 +104,45 @@ var DayViewMiddleRowVue2 = {
|
|
|
59
104
|
"class": (0, kendo_vue_common_1.classNames)('k-scheduler-row', {
|
|
60
105
|
'k-middle-row': !((this.rootIndex + 1) % this.slotDivisions === 0)
|
|
61
106
|
})
|
|
62
|
-
}, [this.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return h(EditSlot, {
|
|
68
|
-
key: "".concat(slot.start.getTime(), ":").concat(slot.group.index),
|
|
69
|
-
index: slot.index,
|
|
70
|
-
attrs: this.v3 ? undefined : {
|
|
71
|
-
index: slot.index,
|
|
72
|
-
start: slot.start,
|
|
73
|
-
end: slot.end,
|
|
74
|
-
zonedStart: slot.zonedStart,
|
|
75
|
-
zonedEnd: slot.zonedEnd,
|
|
76
|
-
items: slot.items,
|
|
77
|
-
group: slot.group,
|
|
78
|
-
range: slot.range,
|
|
79
|
-
isAllDay: slot.isAllDay,
|
|
80
|
-
slotRender: this.$props.slotRender,
|
|
81
|
-
viewSlot: this.$props.viewSlot,
|
|
82
|
-
form: this.$props.form,
|
|
83
|
-
row: this.rootIndex + MultiDayView_1.GRID_OFFSET,
|
|
84
|
-
col: this.timeRanges.length * (this.ri.groupIndex || 0) + rangeIndex,
|
|
85
|
-
isWorkHour: (0, main_1.isInTimeRange)(slot.zonedStart, that.workDayStart, that.workDayEnd),
|
|
86
|
-
isWorkDay: 0 <= slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart)) % that.numberOfDays <= that.workWeekEnd + (that.numberOfDays - workWeekStart),
|
|
87
|
-
editable: that.$props.editable
|
|
88
|
-
},
|
|
89
|
-
start: slot.start,
|
|
90
|
-
end: slot.end,
|
|
91
|
-
zonedStart: slot.zonedStart,
|
|
92
|
-
zonedEnd: slot.zonedEnd,
|
|
93
|
-
items: slot.items,
|
|
94
|
-
group: slot.group,
|
|
95
|
-
range: slot.range,
|
|
96
|
-
isAllDay: slot.isAllDay,
|
|
97
|
-
onDataaction: this.handleDataAction,
|
|
98
|
-
on: this.v3 ? undefined : {
|
|
99
|
-
"dataaction": this.handleDataAction
|
|
100
|
-
},
|
|
107
|
+
}, [this.currentCellSlots.map(function (slot, slotIndex) {
|
|
108
|
+
return h(EditSlot, {
|
|
109
|
+
index: slotIndex,
|
|
110
|
+
attrs: this.v3 ? undefined : {
|
|
111
|
+
index: slotIndex,
|
|
101
112
|
slotRender: this.$props.slotRender,
|
|
102
113
|
viewSlot: this.$props.viewSlot,
|
|
103
114
|
form: this.$props.form,
|
|
104
115
|
row: this.rootIndex + MultiDayView_1.GRID_OFFSET,
|
|
105
|
-
col: this.timeRanges.length * (this.ri.groupIndex || 0) +
|
|
106
|
-
isWorkHour: (0,
|
|
116
|
+
col: this.timeRanges.length * (this.ri.groupIndex || 0) + slot.range.index,
|
|
117
|
+
isWorkHour: (0, main_2.isInTimeRange)(slot.zonedStart, that.workDayStart, that.workDayEnd),
|
|
107
118
|
isWorkDay: 0 <= slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart)) % that.numberOfDays <= that.workWeekEnd + (that.numberOfDays - workWeekStart),
|
|
108
119
|
editable: that.$props.editable
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
120
|
+
},
|
|
121
|
+
onDataaction: this.handleDataAction,
|
|
122
|
+
on: this.v3 ? undefined : {
|
|
123
|
+
"dataaction": this.handleDataAction
|
|
124
|
+
},
|
|
125
|
+
slotRender: this.$props.slotRender,
|
|
126
|
+
viewSlot: this.$props.viewSlot,
|
|
127
|
+
form: this.$props.form,
|
|
128
|
+
row: this.rootIndex + MultiDayView_1.GRID_OFFSET,
|
|
129
|
+
col: this.timeRanges.length * (this.ri.groupIndex || 0) + slot.range.index,
|
|
130
|
+
isWorkHour: (0, main_2.isInTimeRange)(slot.zonedStart, that.workDayStart, that.workDayEnd),
|
|
131
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart)) % that.numberOfDays <= that.workWeekEnd + (that.numberOfDays - workWeekStart),
|
|
132
|
+
editable: that.$props.editable
|
|
133
|
+
});
|
|
134
|
+
}, that)]);
|
|
112
135
|
},
|
|
113
136
|
methods: {
|
|
114
137
|
handleDataAction: function handleDataAction(action) {
|
|
115
138
|
this.$emit('dataaction', action);
|
|
139
|
+
},
|
|
140
|
+
calculateRanges: function calculateRanges(timeSlots, groupIndex, timeRanges, root) {
|
|
141
|
+
return timeRanges.map(function (_range, rangeIndex) {
|
|
142
|
+
return timeSlots.filter(function (s) {
|
|
143
|
+
return s.index === root.index && s.range.index === rangeIndex && s.group.index === groupIndex;
|
|
144
|
+
});
|
|
145
|
+
}).flat();
|
|
116
146
|
}
|
|
117
147
|
}
|
|
118
148
|
};
|
|
@@ -9,6 +9,7 @@ var Vue = require("vue");
|
|
|
9
9
|
var allVue = Vue;
|
|
10
10
|
var gh = allVue.h;
|
|
11
11
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
12
|
+
var main_1 = require("../../utils/main");
|
|
12
13
|
var MultiDayView_1 = require("./MultiDayView");
|
|
13
14
|
var SchedulerEditSlot_1 = require("../../slots/SchedulerEditSlot");
|
|
14
15
|
var DayViewAllDayRowContent_1 = require("./DayViewAllDayRowContent");
|
|
@@ -25,8 +26,50 @@ var DayViewVerticalRowVue2 = {
|
|
|
25
26
|
inject: {
|
|
26
27
|
ri: {
|
|
27
28
|
default: null
|
|
29
|
+
},
|
|
30
|
+
setSlots: {
|
|
31
|
+
default: null
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
provide: function provide() {
|
|
35
|
+
return {
|
|
36
|
+
ksSlots: this.ksSlots
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
data: function data() {
|
|
40
|
+
var daySlots = this.daySlots;
|
|
41
|
+
var groupIndex = this.ri.groupIndex;
|
|
42
|
+
return {
|
|
43
|
+
ksSlots: {
|
|
44
|
+
cSlots: this.calculateRanges(daySlots, groupIndex, this.dayRanges)
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
watch: {
|
|
49
|
+
currentCellSlots: function currentCellSlots(newValue) {
|
|
50
|
+
this.ksSlots.cSlots = newValue;
|
|
28
51
|
}
|
|
29
52
|
},
|
|
53
|
+
computed: {
|
|
54
|
+
currentCellSlots: function currentCellSlots() {
|
|
55
|
+
var daySlots = this.daySlots;
|
|
56
|
+
var groupIndex = this.ri.groupIndex;
|
|
57
|
+
return this.calculateRanges(daySlots, groupIndex, this.dayRanges);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
destroyed: !!isV3 ? undefined : function () {
|
|
61
|
+
this.setSlots({
|
|
62
|
+
type: main_1.COLLECTION_ACTION.remove,
|
|
63
|
+
item: this
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
unmounted: function unmounted() {
|
|
68
|
+
this.setSlots({
|
|
69
|
+
type: main_1.COLLECTION_ACTION.remove,
|
|
70
|
+
item: this
|
|
71
|
+
});
|
|
72
|
+
},
|
|
30
73
|
// @ts-ignore
|
|
31
74
|
setup: !isV3 ? undefined : function () {
|
|
32
75
|
var v3 = !!isV3;
|
|
@@ -39,9 +82,7 @@ var DayViewVerticalRowVue2 = {
|
|
|
39
82
|
var h = gh || createElement;
|
|
40
83
|
var EditSlot = this.$props.editSlot || SchedulerEditSlot_1.SchedulerEditSlot;
|
|
41
84
|
var groupIndex = this.ri.groupIndex;
|
|
42
|
-
var
|
|
43
|
-
timeSlots = _a.timeSlots,
|
|
44
|
-
daySlots = _a.daySlots;
|
|
85
|
+
var timeSlots = this.$props.timeSlots;
|
|
45
86
|
return h("div", {
|
|
46
87
|
"class": "k-scheduler-row"
|
|
47
88
|
}, [h(DayViewAllDayRowContent_1.DayViewAllDayRowContent, {
|
|
@@ -49,61 +90,47 @@ var DayViewVerticalRowVue2 = {
|
|
|
49
90
|
attrs: this.v3 ? undefined : {
|
|
50
91
|
groupIndex: groupIndex
|
|
51
92
|
}
|
|
52
|
-
}), this.
|
|
93
|
+
}), this.currentCellSlots.map(function (_slot, slotIndex) {
|
|
53
94
|
var groupOffset = timeSlots.filter(function (s) {
|
|
54
95
|
return s.group.index === groupIndex && s.range.index === FIRST_INDEX;
|
|
55
96
|
}).length;
|
|
56
|
-
return
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return h(EditSlot, {
|
|
97
|
+
return h(EditSlot, {
|
|
98
|
+
slotRender: this.$props.slotRender,
|
|
99
|
+
attrs: this.v3 ? undefined : {
|
|
60
100
|
slotRender: this.$props.slotRender,
|
|
61
|
-
attrs: this.v3 ? undefined : {
|
|
62
|
-
slotRender: this.$props.slotRender,
|
|
63
|
-
viewSlot: this.$props.viewSlot,
|
|
64
|
-
form: this.$props.form,
|
|
65
|
-
index: slot.index,
|
|
66
|
-
start: slot.start,
|
|
67
|
-
end: slot.end,
|
|
68
|
-
zonedStart: slot.zonedStart,
|
|
69
|
-
zonedEnd: slot.zonedEnd,
|
|
70
|
-
items: slot.items,
|
|
71
|
-
group: slot.group,
|
|
72
|
-
range: slot.range,
|
|
73
|
-
isAllDay: slot.isAllDay,
|
|
74
|
-
row: groupOffset * (groupIndex || 0) + (groupIndex || 0) * MultiDayView_1.GRID_OFFSET,
|
|
75
|
-
col: slotIndex,
|
|
76
|
-
expandable: true,
|
|
77
|
-
editable: this.$props.editable
|
|
78
|
-
},
|
|
79
101
|
viewSlot: this.$props.viewSlot,
|
|
80
102
|
form: this.$props.form,
|
|
81
|
-
index:
|
|
82
|
-
start: slot.start,
|
|
83
|
-
end: slot.end,
|
|
84
|
-
zonedStart: slot.zonedStart,
|
|
85
|
-
zonedEnd: slot.zonedEnd,
|
|
86
|
-
items: slot.items,
|
|
87
|
-
group: slot.group,
|
|
88
|
-
range: slot.range,
|
|
89
|
-
isAllDay: slot.isAllDay,
|
|
90
|
-
onDataaction: this.handleDataAction,
|
|
91
|
-
on: this.v3 ? undefined : {
|
|
92
|
-
"dataaction": this.handleDataAction
|
|
93
|
-
},
|
|
94
|
-
key: "".concat(slot.start.getTime(), ":").concat(slot.group.index),
|
|
95
|
-
"class": 'k-scheduler-alldays-slot',
|
|
103
|
+
index: slotIndex,
|
|
96
104
|
row: groupOffset * (groupIndex || 0) + (groupIndex || 0) * MultiDayView_1.GRID_OFFSET,
|
|
97
105
|
col: slotIndex,
|
|
98
106
|
expandable: true,
|
|
99
107
|
editable: this.$props.editable
|
|
100
|
-
}
|
|
101
|
-
|
|
108
|
+
},
|
|
109
|
+
viewSlot: this.$props.viewSlot,
|
|
110
|
+
form: this.$props.form,
|
|
111
|
+
index: slotIndex,
|
|
112
|
+
onDataaction: this.handleDataAction,
|
|
113
|
+
on: this.v3 ? undefined : {
|
|
114
|
+
"dataaction": this.handleDataAction
|
|
115
|
+
},
|
|
116
|
+
"class": 'k-scheduler-alldays-slot',
|
|
117
|
+
row: groupOffset * (groupIndex || 0) + (groupIndex || 0) * MultiDayView_1.GRID_OFFSET,
|
|
118
|
+
col: slotIndex,
|
|
119
|
+
expandable: true,
|
|
120
|
+
editable: this.$props.editable
|
|
121
|
+
});
|
|
102
122
|
}, this)]);
|
|
103
123
|
},
|
|
104
124
|
methods: {
|
|
105
125
|
handleDataAction: function handleDataAction(action) {
|
|
106
126
|
this.$emit('dataaction', action);
|
|
127
|
+
},
|
|
128
|
+
calculateRanges: function calculateRanges(daySlots, groupIndex, dayRanges) {
|
|
129
|
+
return dayRanges.map(function (_, rangeIndex) {
|
|
130
|
+
return daySlots.filter(function (s) {
|
|
131
|
+
return s.group.index === groupIndex && s.range.index === rangeIndex;
|
|
132
|
+
});
|
|
133
|
+
}).flat();
|
|
107
134
|
}
|
|
108
135
|
}
|
|
109
136
|
};
|
|
@@ -9,13 +9,13 @@ var Vue = require("vue");
|
|
|
9
9
|
var allVue = Vue;
|
|
10
10
|
var gh = allVue.h;
|
|
11
11
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
12
|
-
var MultiDayView_1 = require("./MultiDayView");
|
|
13
12
|
var main_1 = require("../../utils/main");
|
|
13
|
+
var MultiDayView_1 = require("./MultiDayView");
|
|
14
|
+
var main_2 = require("../../utils/main");
|
|
14
15
|
var SchedulerEditSlot_1 = require("../../slots/SchedulerEditSlot");
|
|
15
16
|
var DayViewRowContent_1 = require("./DayViewRowContent");
|
|
16
17
|
var CurrentTimeMarker_1 = require("../../components/CurrentTimeMarker");
|
|
17
18
|
var CurrentTimeMarkerArrow_1 = require("../../components/CurrentTimeMarkerArrow");
|
|
18
|
-
var FIRST_INDEX = 0;
|
|
19
19
|
/** @hidden */
|
|
20
20
|
var DayViewVerticalSlotsRowVue2 = {
|
|
21
21
|
name: 'KendoDayViewVerticalSlotsRow',
|
|
@@ -46,8 +46,53 @@ var DayViewVerticalSlotsRowVue2 = {
|
|
|
46
46
|
inject: {
|
|
47
47
|
ri: {
|
|
48
48
|
default: null
|
|
49
|
+
},
|
|
50
|
+
setSlots: {
|
|
51
|
+
default: null
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
provide: function provide() {
|
|
55
|
+
return {
|
|
56
|
+
ksSlots: this.ksSlots
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
data: function data() {
|
|
60
|
+
var timeSlots = this.timeSlots;
|
|
61
|
+
var root = this.root;
|
|
62
|
+
var groupIndex = this.groupIndex;
|
|
63
|
+
var cSlots = this.calculateRanges(timeSlots, groupIndex, this.timeRanges, root);
|
|
64
|
+
return {
|
|
65
|
+
ksSlots: {
|
|
66
|
+
cSlots: cSlots
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
watch: {
|
|
71
|
+
currentCellSlots: function currentCellSlots(newValue) {
|
|
72
|
+
this.ksSlots.cSlots = newValue;
|
|
49
73
|
}
|
|
50
74
|
},
|
|
75
|
+
computed: {
|
|
76
|
+
currentCellSlots: function currentCellSlots() {
|
|
77
|
+
var timeSlots = this.timeSlots;
|
|
78
|
+
var root = this.root;
|
|
79
|
+
var groupIndex = this.groupIndex;
|
|
80
|
+
return this.calculateRanges(timeSlots, groupIndex, this.timeRanges, root);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
destroyed: !!isV3 ? undefined : function () {
|
|
84
|
+
this.setSlots({
|
|
85
|
+
type: main_1.COLLECTION_ACTION.remove,
|
|
86
|
+
item: this
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
unmounted: function unmounted() {
|
|
91
|
+
this.setSlots({
|
|
92
|
+
type: main_1.COLLECTION_ACTION.remove,
|
|
93
|
+
item: this
|
|
94
|
+
});
|
|
95
|
+
},
|
|
51
96
|
// @ts-ignore
|
|
52
97
|
setup: !isV3 ? undefined : function () {
|
|
53
98
|
var v3 = !!isV3;
|
|
@@ -62,7 +107,6 @@ var DayViewVerticalSlotsRowVue2 = {
|
|
|
62
107
|
var groupIndex = this.groupIndex;
|
|
63
108
|
var that = this;
|
|
64
109
|
var _a = this.$props,
|
|
65
|
-
timeSlots = _a.timeSlots,
|
|
66
110
|
root = _a.root,
|
|
67
111
|
rootIndex = _a.rootIndex,
|
|
68
112
|
slotDivisions = _a.slotDivisions,
|
|
@@ -90,55 +134,34 @@ var DayViewVerticalSlotsRowVue2 = {
|
|
|
90
134
|
isMaster: rootIndex % slotDivisions === 0,
|
|
91
135
|
isLast: (rootIndex + 1) % slotDivisions === 0,
|
|
92
136
|
timeHeaderCell: this.$props.timeHeaderCell
|
|
93
|
-
}), this.
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
return h(EditSlot, {
|
|
137
|
+
}), this.currentCellSlots.map(function (slot, slotIndex) {
|
|
138
|
+
return h(EditSlot, {
|
|
139
|
+
slotRender: renderSlot,
|
|
140
|
+
attrs: this.v3 ? undefined : {
|
|
98
141
|
slotRender: renderSlot,
|
|
99
|
-
attrs: this.v3 ? undefined : {
|
|
100
|
-
slotRender: renderSlot,
|
|
101
|
-
viewSlot: viewSlot,
|
|
102
|
-
form: form,
|
|
103
|
-
index: slot.index,
|
|
104
|
-
start: slot.start,
|
|
105
|
-
end: slot.end,
|
|
106
|
-
zonedStart: slot.zonedStart,
|
|
107
|
-
zonedEnd: slot.zonedEnd,
|
|
108
|
-
items: slot.items,
|
|
109
|
-
group: slot.group,
|
|
110
|
-
range: slot.range,
|
|
111
|
-
isAllDay: slot.isAllDay,
|
|
112
|
-
row: filtered.length * (groupIndex || 0) + rootIndex + (groupIndex || 0) * MultiDayView_1.GRID_OFFSET + MultiDayView_1.GRID_OFFSET,
|
|
113
|
-
col: rangeIndex,
|
|
114
|
-
editable: editable,
|
|
115
|
-
isWorkHour: (0, main_1.isInTimeRange)(slot.zonedStart, workDayStart, workDayEnd),
|
|
116
|
-
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart)
|
|
117
|
-
},
|
|
118
142
|
viewSlot: viewSlot,
|
|
119
143
|
form: form,
|
|
120
|
-
|
|
121
|
-
on: this.v3 ? undefined : {
|
|
122
|
-
"dataaction": that.handleDataAction
|
|
123
|
-
},
|
|
124
|
-
index: slot.index,
|
|
125
|
-
start: slot.start,
|
|
126
|
-
end: slot.end,
|
|
127
|
-
zonedStart: slot.zonedStart,
|
|
128
|
-
zonedEnd: slot.zonedEnd,
|
|
129
|
-
items: slot.items,
|
|
130
|
-
group: slot.group,
|
|
131
|
-
range: slot.range,
|
|
132
|
-
isAllDay: slot.isAllDay,
|
|
133
|
-
key: "".concat(slot.start.getTime(), ":").concat(slot.group.index),
|
|
144
|
+
index: slotIndex,
|
|
134
145
|
row: filtered.length * (groupIndex || 0) + rootIndex + (groupIndex || 0) * MultiDayView_1.GRID_OFFSET + MultiDayView_1.GRID_OFFSET,
|
|
135
|
-
col:
|
|
146
|
+
col: slot.range.index,
|
|
136
147
|
editable: editable,
|
|
137
|
-
isWorkHour: (0,
|
|
148
|
+
isWorkHour: (0, main_2.isInTimeRange)(slot.zonedStart, workDayStart, workDayEnd),
|
|
138
149
|
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
150
|
+
},
|
|
151
|
+
viewSlot: viewSlot,
|
|
152
|
+
form: form,
|
|
153
|
+
onDataaction: that.handleDataAction,
|
|
154
|
+
on: this.v3 ? undefined : {
|
|
155
|
+
"dataaction": that.handleDataAction
|
|
156
|
+
},
|
|
157
|
+
index: slotIndex,
|
|
158
|
+
row: filtered.length * (groupIndex || 0) + rootIndex + (groupIndex || 0) * MultiDayView_1.GRID_OFFSET + MultiDayView_1.GRID_OFFSET,
|
|
159
|
+
col: slot.range.index,
|
|
160
|
+
editable: editable,
|
|
161
|
+
isWorkHour: (0, main_2.isInTimeRange)(slot.zonedStart, workDayStart, workDayEnd),
|
|
162
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart)
|
|
163
|
+
});
|
|
164
|
+
}, true), this.$props.currentTimeMarker && (0, main_2.intersects)((0, main_2.first)(this.timeRanges).start, (0, main_2.last)(this.timeRanges).end, new Date(), new Date(), true) && [h(CurrentTimeMarkerArrow_1.CurrentTimeMarkerArrow, {
|
|
142
165
|
groupIndex: groupIndex,
|
|
143
166
|
attrs: this.v3 ? undefined : {
|
|
144
167
|
groupIndex: groupIndex
|
|
@@ -153,6 +176,13 @@ var DayViewVerticalSlotsRowVue2 = {
|
|
|
153
176
|
methods: {
|
|
154
177
|
handleDataAction: function handleDataAction(action) {
|
|
155
178
|
this.$emit('dataaction', action);
|
|
179
|
+
},
|
|
180
|
+
calculateRanges: function calculateRanges(timeSlots, groupIndex, timeRanges, root) {
|
|
181
|
+
return timeRanges.map(function (_, rangeIndex) {
|
|
182
|
+
return timeSlots.filter(function (s) {
|
|
183
|
+
return s.index === root.index && s.group.index === groupIndex && s.range.index === rangeIndex;
|
|
184
|
+
});
|
|
185
|
+
}).flat();
|
|
156
186
|
}
|
|
157
187
|
}
|
|
158
188
|
};
|