@progress/kendo-vue-scheduler 3.1.0 → 3.1.2-dev.202203221454
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.d.ts +1 -1
- package/dist/es/Scheduler.js +104 -682
- package/dist/es/components/SchedulerForm.js +4 -40
- package/dist/es/components/ShowMoreItemsButton.js +1 -2
- package/dist/es/components/footer/bussiness-hours/{BussinessHours.d.ts → BusinessHours.d.ts} +1 -0
- package/dist/es/components/footer/bussiness-hours/BusinessHours.js +88 -0
- package/dist/es/components/header/navigation/NavigationDatePicker.js +2 -3
- package/dist/es/components/header/navigation/SchedulerNavigation.js +319 -3
- package/dist/es/components/header/view-selector/SchedulerViewSelector.js +4 -3
- package/dist/es/components/header/view-selector/ViewSelectorItem.js +5 -7
- package/dist/es/components/header/view-selector/ViewSelectorList.js +19 -13
- package/dist/es/context/SchedulerResourceIteratorContext.js +2 -2
- package/dist/es/items/SchedulerEditItem.js +3 -1
- package/dist/es/items/SchedulerItem.d.ts +2 -0
- package/dist/es/items/SchedulerItem.js +11 -2
- package/dist/es/items/SchedulerViewItem.js +80 -92
- package/dist/es/main.d.ts +5 -1
- package/dist/es/main.js +5 -11
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/slots/SchedulerEditSlot.js +58 -18
- package/dist/es/slots/SchedulerSlot.d.ts +4 -0
- package/dist/es/slots/SchedulerSlot.js +19 -3
- package/dist/es/slots/SchedulerViewSlot.d.ts +1 -1
- package/dist/es/slots/SchedulerViewSlot.js +58 -30
- package/dist/es/tasks/SchedulerEditTask.js +56 -49
- package/dist/es/tasks/SchedulerTask.js +3 -1
- package/dist/es/tasks/SchedulerViewTask.js +17 -22
- package/dist/es/views/agenda/AgendaView.js +18 -9
- package/dist/es/views/agenda/AgendaViewBody.d.ts +1 -0
- package/dist/es/views/agenda/AgendaViewBody.js +2 -1
- package/dist/es/views/common/VerticalResourceIterator.d.ts +1 -0
- package/dist/es/views/common/VerticalResourceIterator.js +104 -17
- package/dist/es/views/day/DayView.js +15 -3
- package/dist/es/views/day/DayViewAllDaySlots.d.ts +2 -0
- package/dist/es/views/day/DayViewAllDaySlots.js +12 -5
- package/dist/es/views/day/DayViewMiddleRow.js +12 -9
- package/dist/es/views/day/DayViewVerticalRow.d.ts +41 -0
- package/dist/es/views/day/DayViewVerticalRow.js +101 -0
- package/dist/es/views/day/DayViewVerticalSlotsRow.d.ts +50 -0
- package/dist/es/views/day/DayViewVerticalSlotsRow.js +132 -0
- package/dist/es/views/day/MultiDayView.d.ts +1 -1
- package/dist/es/views/day/MultiDayView.js +183 -288
- package/dist/es/views/month/MonthView.d.ts +1 -1
- package/dist/es/views/month/MonthView.js +56 -65
- package/dist/es/views/month/MonthViewBody.d.ts +2 -0
- package/dist/es/views/month/MonthViewBody.js +36 -51
- package/dist/es/views/time/MultiDayTimelineView.d.ts +2 -2
- package/dist/es/views/time/MultiDayTimelineView.js +52 -41
- package/dist/es/views/time/TimelineView.js +9 -3
- package/dist/es/views/time/TimelineViewBody.d.ts +2 -0
- package/dist/es/views/time/TimelineViewBody.js +6 -2
- package/dist/es/views/week/WeekView.js +9 -3
- package/dist/es/views/week/WorkWeekView.js +9 -3
- package/dist/npm/Scheduler.d.ts +1 -1
- package/dist/npm/Scheduler.js +102 -682
- package/dist/npm/components/SchedulerForm.js +4 -40
- package/dist/npm/components/ShowMoreItemsButton.js +1 -2
- package/dist/npm/components/footer/bussiness-hours/{BussinessHours.d.ts → BusinessHours.d.ts} +1 -0
- package/dist/npm/components/footer/bussiness-hours/BusinessHours.js +102 -0
- package/dist/npm/components/header/navigation/NavigationDatePicker.js +2 -3
- package/dist/npm/components/header/navigation/SchedulerNavigation.js +323 -4
- package/dist/npm/components/header/view-selector/SchedulerViewSelector.js +5 -3
- package/dist/npm/components/header/view-selector/ViewSelectorItem.js +6 -7
- package/dist/npm/components/header/view-selector/ViewSelectorList.js +21 -13
- package/dist/npm/context/SchedulerResourceIteratorContext.js +2 -2
- package/dist/npm/items/SchedulerEditItem.js +3 -1
- package/dist/npm/items/SchedulerItem.d.ts +2 -0
- package/dist/npm/items/SchedulerItem.js +11 -2
- package/dist/npm/items/SchedulerViewItem.js +81 -92
- package/dist/npm/main.d.ts +5 -1
- package/dist/npm/main.js +9 -11
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/slots/SchedulerEditSlot.js +59 -18
- package/dist/npm/slots/SchedulerSlot.d.ts +4 -0
- package/dist/npm/slots/SchedulerSlot.js +20 -3
- package/dist/npm/slots/SchedulerViewSlot.d.ts +1 -1
- package/dist/npm/slots/SchedulerViewSlot.js +57 -29
- package/dist/npm/tasks/SchedulerEditTask.js +57 -49
- package/dist/npm/tasks/SchedulerTask.js +4 -1
- package/dist/npm/tasks/SchedulerViewTask.js +17 -21
- package/dist/npm/views/agenda/AgendaView.js +18 -9
- package/dist/npm/views/agenda/AgendaViewBody.d.ts +1 -0
- package/dist/npm/views/agenda/AgendaViewBody.js +2 -1
- package/dist/npm/views/common/VerticalResourceIterator.d.ts +1 -0
- package/dist/npm/views/common/VerticalResourceIterator.js +107 -17
- package/dist/npm/views/day/DayView.js +15 -3
- package/dist/npm/views/day/DayViewAllDaySlots.d.ts +2 -0
- package/dist/npm/views/day/DayViewAllDaySlots.js +12 -5
- package/dist/npm/views/day/DayViewMiddleRow.js +12 -9
- package/dist/npm/views/day/DayViewVerticalRow.d.ts +41 -0
- package/dist/npm/views/day/DayViewVerticalRow.js +113 -0
- package/dist/npm/views/day/DayViewVerticalSlotsRow.d.ts +50 -0
- package/dist/npm/views/day/DayViewVerticalSlotsRow.js +145 -0
- package/dist/npm/views/day/MultiDayView.d.ts +1 -1
- package/dist/npm/views/day/MultiDayView.js +184 -289
- package/dist/npm/views/month/MonthView.d.ts +1 -1
- package/dist/npm/views/month/MonthView.js +56 -65
- package/dist/npm/views/month/MonthViewBody.d.ts +2 -0
- package/dist/npm/views/month/MonthViewBody.js +36 -52
- package/dist/npm/views/time/MultiDayTimelineView.d.ts +2 -2
- package/dist/npm/views/time/MultiDayTimelineView.js +52 -41
- package/dist/npm/views/time/TimelineView.js +9 -3
- package/dist/npm/views/time/TimelineViewBody.d.ts +2 -0
- package/dist/npm/views/time/TimelineViewBody.js +6 -2
- package/dist/npm/views/week/WeekView.js +9 -3
- package/dist/npm/views/week/WorkWeekView.js +9 -3
- package/package.json +12 -12
- package/dist/es/components/footer/bussiness-hours/BussinessHours.js +0 -33
- package/dist/npm/components/footer/bussiness-hours/BussinessHours.js +0 -44
|
@@ -60,11 +60,13 @@ var MonthViewVue2 = {
|
|
|
60
60
|
selectedShortDateFormat: {
|
|
61
61
|
type: String,
|
|
62
62
|
default: '{0:Y}'
|
|
63
|
-
}
|
|
63
|
+
},
|
|
64
|
+
slotRender: [String, Function, Object],
|
|
65
|
+
item: [String, Function, Object]
|
|
64
66
|
},
|
|
65
67
|
inject: {
|
|
66
68
|
ks: {
|
|
67
|
-
default:
|
|
69
|
+
default: {}
|
|
68
70
|
},
|
|
69
71
|
kendoLocalizationService: {
|
|
70
72
|
default: null
|
|
@@ -143,89 +145,78 @@ var MonthViewVue2 = {
|
|
|
143
145
|
this.intl = provideIntlService(this); // const fields = useSchedulerFieldsContext();
|
|
144
146
|
|
|
145
147
|
var itemsPerSlot = this.$props.itemsPerSlot;
|
|
146
|
-
var body = this.ranges.map(function (_, rangeIndex) {
|
|
148
|
+
var body = this.ks.orientation === 'horizontal' ? this.ranges.map(function (_, rangeIndex) {
|
|
147
149
|
var _this = this;
|
|
148
150
|
|
|
149
|
-
return
|
|
150
|
-
|
|
151
|
-
resources: this.ks.props.resources,
|
|
152
|
-
attrs: this.v3 ? undefined : {
|
|
151
|
+
return (// @ts-ignore function children
|
|
152
|
+
h(HorizontalResourceIterator, {
|
|
153
153
|
resources: this.ks.props.resources,
|
|
154
|
+
attrs: this.v3 ? undefined : {
|
|
155
|
+
resources: this.ks.props.resources,
|
|
156
|
+
group: this.ks.props.group
|
|
157
|
+
},
|
|
154
158
|
group: this.ks.props.group
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
}, this.v3 ? function () {
|
|
160
|
+
return [h(MonthViewBody, {
|
|
161
|
+
slotRender: _this.$props.slotRender,
|
|
162
|
+
attrs: _this.v3 ? undefined : {
|
|
163
|
+
slotRender: _this.$props.slotRender,
|
|
164
|
+
monthSlots: monthSlots,
|
|
165
|
+
rangeIndex: rangeIndex,
|
|
166
|
+
itemsPerSlot: itemsPerSlot
|
|
167
|
+
},
|
|
161
168
|
monthSlots: monthSlots,
|
|
162
169
|
rangeIndex: rangeIndex,
|
|
163
|
-
itemsPerSlot: itemsPerSlot
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
})];
|
|
172
|
-
} : [h(MonthViewBody, {
|
|
173
|
-
monthSlots: monthSlots,
|
|
174
|
-
attrs: _this.v3 ? undefined : {
|
|
175
|
-
monthSlots: monthSlots,
|
|
176
|
-
rangeIndex: rangeIndex,
|
|
177
|
-
itemsPerSlot: itemsPerSlot
|
|
178
|
-
},
|
|
179
|
-
rangeIndex: rangeIndex,
|
|
180
|
-
itemsPerSlot: itemsPerSlot,
|
|
181
|
-
onDataaction: _this.handleDataAction,
|
|
182
|
-
on: _this.v3 ? undefined : {
|
|
183
|
-
"dataaction": _this.handleDataAction
|
|
184
|
-
}
|
|
185
|
-
})]) : // @ts-ignore function children
|
|
186
|
-
h(VerticalResourceIterator, {
|
|
187
|
-
nested: true,
|
|
188
|
-
attrs: this.v3 ? undefined : {
|
|
189
|
-
nested: true,
|
|
190
|
-
resources: this.ks.props.resources,
|
|
191
|
-
group: this.ks.props.group
|
|
192
|
-
},
|
|
193
|
-
resources: this.ks.props.resources,
|
|
194
|
-
group: this.ks.props.group
|
|
195
|
-
}, this.v3 ? function () {
|
|
196
|
-
return [h(MonthViewBody, {
|
|
197
|
-
monthSlots: monthSlots,
|
|
170
|
+
itemsPerSlot: itemsPerSlot,
|
|
171
|
+
onDataaction: _this.handleDataAction,
|
|
172
|
+
on: _this.v3 ? undefined : {
|
|
173
|
+
"dataaction": _this.handleDataAction
|
|
174
|
+
}
|
|
175
|
+
})];
|
|
176
|
+
} : [h(MonthViewBody, {
|
|
177
|
+
slotRender: _this.$props.slotRender,
|
|
198
178
|
attrs: _this.v3 ? undefined : {
|
|
179
|
+
slotRender: _this.$props.slotRender,
|
|
199
180
|
monthSlots: monthSlots,
|
|
200
|
-
ranges: _this.ranges,
|
|
201
181
|
rangeIndex: rangeIndex,
|
|
202
182
|
itemsPerSlot: itemsPerSlot
|
|
203
183
|
},
|
|
204
|
-
|
|
184
|
+
monthSlots: monthSlots,
|
|
205
185
|
rangeIndex: rangeIndex,
|
|
206
186
|
itemsPerSlot: itemsPerSlot,
|
|
207
187
|
onDataaction: _this.handleDataAction,
|
|
208
188
|
on: _this.v3 ? undefined : {
|
|
209
189
|
"dataaction": _this.handleDataAction
|
|
210
190
|
}
|
|
211
|
-
})]
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
191
|
+
})])
|
|
192
|
+
);
|
|
193
|
+
}, this) : // @ts-ignore function children
|
|
194
|
+
h(VerticalResourceIterator, {
|
|
195
|
+
nested: true,
|
|
196
|
+
attrs: this.v3 ? undefined : {
|
|
197
|
+
nested: true,
|
|
198
|
+
resources: this.ks.props.resources,
|
|
199
|
+
group: this.ks.props.group,
|
|
200
|
+
more: {
|
|
201
|
+
slotRender: this.$props.slotRender,
|
|
215
202
|
monthSlots: monthSlots,
|
|
216
|
-
ranges:
|
|
217
|
-
rangeIndex: rangeIndex,
|
|
203
|
+
ranges: this.ranges,
|
|
218
204
|
itemsPerSlot: itemsPerSlot
|
|
219
|
-
},
|
|
220
|
-
ranges: _this.ranges,
|
|
221
|
-
rangeIndex: rangeIndex,
|
|
222
|
-
itemsPerSlot: itemsPerSlot,
|
|
223
|
-
onDataaction: _this.handleDataAction,
|
|
224
|
-
on: _this.v3 ? undefined : {
|
|
225
|
-
"dataaction": _this.handleDataAction
|
|
226
205
|
}
|
|
227
|
-
}
|
|
228
|
-
|
|
206
|
+
},
|
|
207
|
+
resources: this.ks.props.resources,
|
|
208
|
+
group: this.ks.props.group,
|
|
209
|
+
onDataaction: this.handleDataAction,
|
|
210
|
+
on: this.v3 ? undefined : {
|
|
211
|
+
"dataaction": this.handleDataAction
|
|
212
|
+
},
|
|
213
|
+
more: {
|
|
214
|
+
slotRender: this.$props.slotRender,
|
|
215
|
+
monthSlots: monthSlots,
|
|
216
|
+
ranges: this.ranges,
|
|
217
|
+
itemsPerSlot: itemsPerSlot
|
|
218
|
+
}
|
|
219
|
+
});
|
|
229
220
|
return (// @ts-ignore function children
|
|
230
221
|
h(BaseView, {
|
|
231
222
|
props: this.$props,
|
|
@@ -2,25 +2,22 @@
|
|
|
2
2
|
import * as Vue from 'vue';
|
|
3
3
|
var allVue = Vue;
|
|
4
4
|
var gh = allVue.h;
|
|
5
|
-
var inject = allVue.inject;
|
|
6
5
|
import { SchedulerEditSlot } from '../../slots/SchedulerEditSlot';
|
|
7
|
-
import {
|
|
8
|
-
import { provideIntlService } from '@progress/kendo-vue-intl';
|
|
9
|
-
var DAY_FORMAT = {
|
|
10
|
-
skeleton: 'dd'
|
|
11
|
-
}; // tslint:enable:max-line-length
|
|
6
|
+
import { provideIntlService } from '@progress/kendo-vue-intl'; // tslint:enable:max-line-length
|
|
12
7
|
|
|
13
8
|
var MonthViewBodyVue2 = {
|
|
14
9
|
name: 'KendoMonthViewBody',
|
|
15
10
|
props: {
|
|
11
|
+
groupIndex: Number,
|
|
16
12
|
rangeIndex: Number,
|
|
17
13
|
itemsPerSlot: Number,
|
|
18
14
|
monthSlots: Array,
|
|
19
|
-
ranges: Array
|
|
15
|
+
ranges: Array,
|
|
16
|
+
slotRender: [String, Function, Object]
|
|
20
17
|
},
|
|
21
18
|
inject: {
|
|
22
19
|
ri: {
|
|
23
|
-
default:
|
|
20
|
+
default: {}
|
|
24
21
|
},
|
|
25
22
|
ks: {
|
|
26
23
|
default: null
|
|
@@ -49,20 +46,21 @@ var MonthViewBodyVue2 = {
|
|
|
49
46
|
var h = gh || createElement;
|
|
50
47
|
this.intl = provideIntlService(this);
|
|
51
48
|
var EditSlot = this.$props.editSlot || SchedulerEditSlot;
|
|
49
|
+
var that = this;
|
|
50
|
+
var groupIndex = this.groupIndex !== undefined ? this.groupIndex : this.ri.groupIndex;
|
|
52
51
|
return h("div", {
|
|
53
52
|
"class": "k-scheduler-row",
|
|
54
53
|
key: this.rangeIndex
|
|
55
54
|
}, [this.monthSlots.filter(function (slot) {
|
|
56
|
-
return slot.group.index ===
|
|
55
|
+
return slot.group.index === groupIndex && slot.range.index === _this.rangeIndex;
|
|
57
56
|
}).map(function (slot, slotIndex, filtered) {
|
|
58
|
-
var _this2 = this;
|
|
59
|
-
|
|
60
57
|
return (// @ts-ignore function children
|
|
61
58
|
h(EditSlot, {
|
|
62
|
-
|
|
59
|
+
slotRender: this.$props.slotRender,
|
|
63
60
|
attrs: this.v3 ? undefined : {
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
slotRender: this.$props.slotRender,
|
|
62
|
+
viewSlot: that.$props.viewSlot,
|
|
63
|
+
form: that.$props.form,
|
|
66
64
|
index: slot.index,
|
|
67
65
|
start: slot.start,
|
|
68
66
|
end: slot.end,
|
|
@@ -72,16 +70,19 @@ var MonthViewBodyVue2 = {
|
|
|
72
70
|
group: slot.group,
|
|
73
71
|
range: slot.range,
|
|
74
72
|
isAllDay: slot.isAllDay,
|
|
73
|
+
navDay: true,
|
|
74
|
+
itemsPerSlot: that.itemsPerSlot,
|
|
75
75
|
expandable: {
|
|
76
76
|
offsetTop: 30,
|
|
77
|
-
offsetBottom:
|
|
77
|
+
offsetBottom: that.itemsPerSlot < slot.items.length ? 15 : 0
|
|
78
78
|
},
|
|
79
|
-
col:
|
|
80
|
-
row:
|
|
81
|
-
editable:
|
|
79
|
+
col: that.ks.orientation === 'horizontal' ? filtered.length * (groupIndex || 0) + slotIndex : slotIndex,
|
|
80
|
+
row: that.ks.orientation === 'horizontal' ? that.rangeIndex : that.ranges.length * (groupIndex || 0) + that.rangeIndex,
|
|
81
|
+
editable: that.$props.editable
|
|
82
82
|
},
|
|
83
|
+
viewSlot: that.$props.viewSlot,
|
|
83
84
|
key: slotIndex,
|
|
84
|
-
form:
|
|
85
|
+
form: that.$props.form,
|
|
85
86
|
index: slot.index,
|
|
86
87
|
start: slot.start,
|
|
87
88
|
end: slot.end,
|
|
@@ -91,57 +92,41 @@ var MonthViewBodyVue2 = {
|
|
|
91
92
|
group: slot.group,
|
|
92
93
|
range: slot.range,
|
|
93
94
|
isAllDay: slot.isAllDay,
|
|
95
|
+
navDay: true,
|
|
96
|
+
itemsPerSlot: that.itemsPerSlot,
|
|
94
97
|
expandable: {
|
|
95
98
|
offsetTop: 30,
|
|
96
|
-
offsetBottom:
|
|
99
|
+
offsetBottom: that.itemsPerSlot < slot.items.length ? 15 : 0
|
|
97
100
|
},
|
|
98
|
-
onDataaction:
|
|
101
|
+
onDataaction: that.handleDataAction,
|
|
99
102
|
on: this.v3 ? undefined : {
|
|
100
|
-
"dataaction":
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
row: this.ks.orientation === 'horizontal' ? this.rangeIndex : this.ranges.length * (this.ri.groupIndex || 0) + this.rangeIndex,
|
|
104
|
-
editable: this.$props.editable
|
|
105
|
-
}, this.v3 ? function () {
|
|
106
|
-
return [h("div", [h("span", {
|
|
107
|
-
"class": "k-link k-nav-day"
|
|
108
|
-
}, [_this2.intl.formatDate(new Date(slot.end.getTime() - (slot.end.getTime() - slot.start.getTime()) / 2), DAY_FORMAT)]), _this2.itemsPerSlot < slot.items.length && h(ShowMoreItemsButton, {
|
|
109
|
-
currentSlot: slot,
|
|
110
|
-
attrs: _this2.v3 ? undefined : {
|
|
111
|
-
currentSlot: slot
|
|
112
|
-
},
|
|
113
|
-
onClick: _this2.handleShowMoreItemsClick,
|
|
114
|
-
on: _this2.v3 ? undefined : {
|
|
115
|
-
"click": _this2.handleShowMoreItemsClick
|
|
103
|
+
"dataaction": that.handleDataAction,
|
|
104
|
+
"showmoreitems": function showmoreitems(e) {
|
|
105
|
+
return that.handleShowMoreItemsClick(e, slot);
|
|
116
106
|
}
|
|
117
|
-
})])];
|
|
118
|
-
} : [h("div", [h("span", {
|
|
119
|
-
"class": "k-link k-nav-day"
|
|
120
|
-
}, [_this2.intl.formatDate(new Date(slot.end.getTime() - (slot.end.getTime() - slot.start.getTime()) / 2), DAY_FORMAT)]), _this2.itemsPerSlot < slot.items.length && h(ShowMoreItemsButton, {
|
|
121
|
-
currentSlot: slot,
|
|
122
|
-
attrs: _this2.v3 ? undefined : {
|
|
123
|
-
currentSlot: slot
|
|
124
107
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
108
|
+
col: that.ks.orientation === 'horizontal' ? filtered.length * (groupIndex || 0) + slotIndex : slotIndex,
|
|
109
|
+
row: that.ks.orientation === 'horizontal' ? that.rangeIndex : that.ranges.length * (groupIndex || 0) + that.rangeIndex,
|
|
110
|
+
editable: that.$props.editable,
|
|
111
|
+
onShowmoreitems: function showmoreitems(e) {
|
|
112
|
+
return that.handleShowMoreItemsClick(e, slot);
|
|
128
113
|
}
|
|
129
|
-
})
|
|
114
|
+
})
|
|
130
115
|
);
|
|
131
116
|
}, this)]);
|
|
132
117
|
},
|
|
133
118
|
methods: {
|
|
134
|
-
handleShowMoreItemsClick: function handleShowMoreItemsClick(event) {
|
|
119
|
+
handleShowMoreItemsClick: function handleShowMoreItemsClick(event, slot) {
|
|
135
120
|
var newView = this.ks.views.find(function (vw) {
|
|
136
121
|
return vw.name === 'day';
|
|
137
122
|
});
|
|
138
123
|
|
|
139
|
-
if (!this.setActiveViewName || !newView || !newView.name || !
|
|
124
|
+
if (!this.setActiveViewName || !newView || !newView.name || !slot) {
|
|
140
125
|
return;
|
|
141
126
|
}
|
|
142
127
|
|
|
143
128
|
this.setActiveViewName(newView.name, event);
|
|
144
|
-
this.setActiveDate(
|
|
129
|
+
this.setActiveDate(slot.start, event);
|
|
145
130
|
},
|
|
146
131
|
handleDataAction: function handleDataAction(action) {
|
|
147
132
|
this.$emit('dataaction', action);
|
|
@@ -114,9 +114,9 @@ export interface MultiDayTimelineViewProps extends SchedulerViewProps {
|
|
|
114
114
|
*/
|
|
115
115
|
editItem?: any;
|
|
116
116
|
/**
|
|
117
|
-
* Overrides the `
|
|
117
|
+
* Overrides the `slotRender` prop of the Scheduler for the specified view only.
|
|
118
118
|
*/
|
|
119
|
-
|
|
119
|
+
slotRender?: any;
|
|
120
120
|
/**
|
|
121
121
|
* Overrides the `viewSlot` prop of the Scheduler for the specified view only.
|
|
122
122
|
*/
|
|
@@ -105,7 +105,9 @@ var MultiDayTimelineViewVue2 = {
|
|
|
105
105
|
columnWidth: {
|
|
106
106
|
type: Number,
|
|
107
107
|
default: 100
|
|
108
|
-
}
|
|
108
|
+
},
|
|
109
|
+
slotRender: [String, Function, Object],
|
|
110
|
+
item: [String, Function, Object]
|
|
109
111
|
},
|
|
110
112
|
inject: {
|
|
111
113
|
ks: {
|
|
@@ -213,12 +215,7 @@ var MultiDayTimelineViewVue2 = {
|
|
|
213
215
|
render: function render(createElement) {
|
|
214
216
|
var _this2 = this;
|
|
215
217
|
|
|
216
|
-
var h = gh || createElement;
|
|
217
|
-
// group,
|
|
218
|
-
// timezone,
|
|
219
|
-
// resources: propResources
|
|
220
|
-
// } = useSchedulerPropsContext();
|
|
221
|
-
|
|
218
|
+
var h = gh || createElement;
|
|
222
219
|
var intl = provideIntlService(this);
|
|
223
220
|
var showWorkHours = this.$props.showWorkHours;
|
|
224
221
|
var slotDivisions = this.$props.slotDivisions;
|
|
@@ -335,13 +332,15 @@ var MultiDayTimelineViewVue2 = {
|
|
|
335
332
|
}, _this2.v3 ? function () {
|
|
336
333
|
return [// @ts-ignore function children
|
|
337
334
|
h(TimelineViewBody, {
|
|
338
|
-
|
|
335
|
+
slotRender: _this2.$props.slotRender,
|
|
339
336
|
attrs: _this2.v3 ? undefined : {
|
|
337
|
+
slotRender: _this2.$props.slotRender,
|
|
340
338
|
ranges: _this2.ranges,
|
|
341
339
|
workDayStart: workDayStart,
|
|
342
340
|
workDayEnd: workDayEnd,
|
|
343
341
|
timelineSlots: timelineSlots
|
|
344
342
|
},
|
|
343
|
+
ranges: _this2.ranges,
|
|
345
344
|
workDayStart: workDayStart,
|
|
346
345
|
workDayEnd: workDayEnd,
|
|
347
346
|
timelineSlots: timelineSlots,
|
|
@@ -351,13 +350,15 @@ var MultiDayTimelineViewVue2 = {
|
|
|
351
350
|
}
|
|
352
351
|
})];
|
|
353
352
|
} : [h(TimelineViewBody, {
|
|
354
|
-
|
|
353
|
+
slotRender: _this2.$props.slotRender,
|
|
355
354
|
attrs: _this2.v3 ? undefined : {
|
|
355
|
+
slotRender: _this2.$props.slotRender,
|
|
356
356
|
ranges: _this2.ranges,
|
|
357
357
|
workDayStart: workDayStart,
|
|
358
358
|
workDayEnd: workDayEnd,
|
|
359
359
|
timelineSlots: timelineSlots
|
|
360
360
|
},
|
|
361
|
+
ranges: _this2.ranges,
|
|
361
362
|
workDayStart: workDayStart,
|
|
362
363
|
workDayEnd: workDayEnd,
|
|
363
364
|
timelineSlots: timelineSlots,
|
|
@@ -365,34 +366,37 @@ var MultiDayTimelineViewVue2 = {
|
|
|
365
366
|
on: _this2.v3 ? undefined : {
|
|
366
367
|
"dataaction": _this2.handleDataAction
|
|
367
368
|
}
|
|
368
|
-
})]) :
|
|
369
|
+
})]) : // @ts-ignore function children
|
|
370
|
+
h(VerticalResourceIterator, {
|
|
369
371
|
nested: true,
|
|
370
372
|
attrs: _this2.v3 ? undefined : {
|
|
371
373
|
nested: true,
|
|
372
374
|
wrapGroup: true,
|
|
373
375
|
group: _this2.ks.props.group,
|
|
374
|
-
resources: _this2.ks.props.resources
|
|
376
|
+
resources: _this2.ks.props.resources,
|
|
377
|
+
more: {
|
|
378
|
+
ranges: _this2.ranges,
|
|
379
|
+
workDayStart: workDayStart,
|
|
380
|
+
workDayEnd: workDayEnd,
|
|
381
|
+
timelineSlots: timelineSlots,
|
|
382
|
+
slotRender: _this2.$props.slotRender
|
|
383
|
+
}
|
|
375
384
|
},
|
|
376
385
|
wrapGroup: true,
|
|
377
386
|
group: _this2.ks.props.group,
|
|
378
|
-
resources: _this2.ks.props.resources
|
|
379
|
-
}, [// @ts-ignore function children
|
|
380
|
-
h(TimelineViewBody, {
|
|
381
|
-
range: _this2.range,
|
|
382
|
-
attrs: _this2.v3 ? undefined : {
|
|
383
|
-
range: _this2.range,
|
|
384
|
-
workDayStart: workDayStart,
|
|
385
|
-
workDayEnd: workDayEnd,
|
|
386
|
-
timelineSlots: timelineSlots
|
|
387
|
-
},
|
|
388
|
-
workDayStart: workDayStart,
|
|
389
|
-
workDayEnd: workDayEnd,
|
|
390
|
-
timelineSlots: timelineSlots,
|
|
387
|
+
resources: _this2.ks.props.resources,
|
|
391
388
|
onDataaction: _this2.handleDataAction,
|
|
392
389
|
on: _this2.v3 ? undefined : {
|
|
393
390
|
"dataaction": _this2.handleDataAction
|
|
391
|
+
},
|
|
392
|
+
more: {
|
|
393
|
+
ranges: _this2.ranges,
|
|
394
|
+
workDayStart: workDayStart,
|
|
395
|
+
workDayEnd: workDayEnd,
|
|
396
|
+
timelineSlots: timelineSlots,
|
|
397
|
+
slotRender: _this2.$props.slotRender
|
|
394
398
|
}
|
|
395
|
-
})
|
|
399
|
+
}), items.sort(orderSort).map(function (item) {
|
|
396
400
|
return h(SchedulerEditItem, {
|
|
397
401
|
key: item.isRecurring ? item.uid + ":" + item.group.index + ":" + item.range.index + ":" + item.originalStart : item.uid + ":" + item.group.index + ":" + item.range.index,
|
|
398
402
|
uid: item.uid,
|
|
@@ -513,13 +517,15 @@ var MultiDayTimelineViewVue2 = {
|
|
|
513
517
|
rowContent: TimelineViewAllEventsRowContent
|
|
514
518
|
}, _this2.v3 ? function () {
|
|
515
519
|
return [h(TimelineViewBody, {
|
|
516
|
-
|
|
520
|
+
slotRender: _this2.$props.slotRender,
|
|
517
521
|
attrs: _this2.v3 ? undefined : {
|
|
522
|
+
slotRender: _this2.$props.slotRender,
|
|
518
523
|
ranges: _this2.ranges,
|
|
519
524
|
workDayStart: workDayStart,
|
|
520
525
|
workDayEnd: workDayEnd,
|
|
521
526
|
timelineSlots: timelineSlots
|
|
522
527
|
},
|
|
528
|
+
ranges: _this2.ranges,
|
|
523
529
|
workDayStart: workDayStart,
|
|
524
530
|
workDayEnd: workDayEnd,
|
|
525
531
|
timelineSlots: timelineSlots,
|
|
@@ -529,13 +535,15 @@ var MultiDayTimelineViewVue2 = {
|
|
|
529
535
|
}
|
|
530
536
|
})];
|
|
531
537
|
} : [h(TimelineViewBody, {
|
|
532
|
-
|
|
538
|
+
slotRender: _this2.$props.slotRender,
|
|
533
539
|
attrs: _this2.v3 ? undefined : {
|
|
540
|
+
slotRender: _this2.$props.slotRender,
|
|
534
541
|
ranges: _this2.ranges,
|
|
535
542
|
workDayStart: workDayStart,
|
|
536
543
|
workDayEnd: workDayEnd,
|
|
537
544
|
timelineSlots: timelineSlots
|
|
538
545
|
},
|
|
546
|
+
ranges: _this2.ranges,
|
|
539
547
|
workDayStart: workDayStart,
|
|
540
548
|
workDayEnd: workDayEnd,
|
|
541
549
|
timelineSlots: timelineSlots,
|
|
@@ -549,27 +557,30 @@ var MultiDayTimelineViewVue2 = {
|
|
|
549
557
|
nested: true,
|
|
550
558
|
wrapGroup: true,
|
|
551
559
|
group: _this2.ks.props.group,
|
|
552
|
-
resources: _this2.ks.props.resources
|
|
560
|
+
resources: _this2.ks.props.resources,
|
|
561
|
+
more: {
|
|
562
|
+
ranges: _this2.ranges,
|
|
563
|
+
workDayStart: workDayStart,
|
|
564
|
+
workDayEnd: workDayEnd,
|
|
565
|
+
timelineSlots: timelineSlots,
|
|
566
|
+
slotRender: _this2.$props.slotRender
|
|
567
|
+
}
|
|
553
568
|
},
|
|
554
569
|
wrapGroup: true,
|
|
555
570
|
group: _this2.ks.props.group,
|
|
556
|
-
resources: _this2.ks.props.resources
|
|
557
|
-
}, [h(TimelineViewBody, {
|
|
558
|
-
range: _this2.range,
|
|
559
|
-
attrs: _this2.v3 ? undefined : {
|
|
560
|
-
range: _this2.range,
|
|
561
|
-
workDayStart: workDayStart,
|
|
562
|
-
workDayEnd: workDayEnd,
|
|
563
|
-
timelineSlots: timelineSlots
|
|
564
|
-
},
|
|
565
|
-
workDayStart: workDayStart,
|
|
566
|
-
workDayEnd: workDayEnd,
|
|
567
|
-
timelineSlots: timelineSlots,
|
|
571
|
+
resources: _this2.ks.props.resources,
|
|
568
572
|
onDataaction: _this2.handleDataAction,
|
|
569
573
|
on: _this2.v3 ? undefined : {
|
|
570
574
|
"dataaction": _this2.handleDataAction
|
|
575
|
+
},
|
|
576
|
+
more: {
|
|
577
|
+
ranges: _this2.ranges,
|
|
578
|
+
workDayStart: workDayStart,
|
|
579
|
+
workDayEnd: workDayEnd,
|
|
580
|
+
timelineSlots: timelineSlots,
|
|
581
|
+
slotRender: _this2.$props.slotRender
|
|
571
582
|
}
|
|
572
|
-
})
|
|
583
|
+
}), items.sort(orderSort).map(function (item) {
|
|
573
584
|
return h(SchedulerEditItem, {
|
|
574
585
|
key: item.isRecurring ? item.uid + ":" + item.group.index + ":" + item.range.index + ":" + item.originalStart : item.uid + ":" + item.group.index + ":" + item.range.index,
|
|
575
586
|
uid: item.uid,
|
|
@@ -87,7 +87,9 @@ var TimelineViewVue2 = {
|
|
|
87
87
|
columnWidth: {
|
|
88
88
|
type: Number,
|
|
89
89
|
default: 100
|
|
90
|
-
}
|
|
90
|
+
},
|
|
91
|
+
slotRender: [String, Function, Object],
|
|
92
|
+
item: [String, Function, Object]
|
|
91
93
|
},
|
|
92
94
|
// @ts-ignore
|
|
93
95
|
setup: !gh ? undefined : function () {
|
|
@@ -119,7 +121,9 @@ var TimelineViewVue2 = {
|
|
|
119
121
|
workDayStart: this.$props.workDayStart,
|
|
120
122
|
workDayEnd: this.$props.workDayEnd,
|
|
121
123
|
workWeekStart: this.$props.workWeekStart,
|
|
122
|
-
workWeekEnd: this.$props.workWeekEnd
|
|
124
|
+
workWeekEnd: this.$props.workWeekEnd,
|
|
125
|
+
slotRender: this.$props.slotRender,
|
|
126
|
+
item: this.$props.item
|
|
123
127
|
},
|
|
124
128
|
dateRange: this.$props.dateRange,
|
|
125
129
|
step: this.$props.step,
|
|
@@ -137,7 +141,9 @@ var TimelineViewVue2 = {
|
|
|
137
141
|
workDayStart: this.$props.workDayStart,
|
|
138
142
|
workDayEnd: this.$props.workDayEnd,
|
|
139
143
|
workWeekStart: this.$props.workWeekStart,
|
|
140
|
-
workWeekEnd: this.$props.workWeekEnd
|
|
144
|
+
workWeekEnd: this.$props.workWeekEnd,
|
|
145
|
+
slotRender: this.$props.slotRender,
|
|
146
|
+
item: this.$props.item
|
|
141
147
|
});
|
|
142
148
|
}
|
|
143
149
|
};
|
|
@@ -9,10 +9,12 @@ import { isInTimeRange } from '../../utils'; // tslint:enable:max-line-length
|
|
|
9
9
|
var TimelineViewBodyVue2 = {
|
|
10
10
|
name: 'KendoTimelineViewBody',
|
|
11
11
|
props: {
|
|
12
|
+
groupIndex: Number,
|
|
12
13
|
timelineSlots: Array,
|
|
13
14
|
ranges: Array,
|
|
14
15
|
workDayStart: Date,
|
|
15
|
-
workDayEnd: Date
|
|
16
|
+
workDayEnd: Date,
|
|
17
|
+
slotRender: [String, Function, Object]
|
|
16
18
|
},
|
|
17
19
|
inject: {
|
|
18
20
|
ri: {
|
|
@@ -35,7 +37,7 @@ var TimelineViewBodyVue2 = {
|
|
|
35
37
|
var that = this;
|
|
36
38
|
var orientation = this.ks.orientation;
|
|
37
39
|
var ranges = this.ranges;
|
|
38
|
-
var groupIndex = this.ri.groupIndex;
|
|
40
|
+
var groupIndex = this.groupIndex !== undefined ? this.groupIndex : this.ri.groupIndex;
|
|
39
41
|
var editable = this.$props.editable;
|
|
40
42
|
return h("div", {
|
|
41
43
|
"class": "k-scheduler-row"
|
|
@@ -49,6 +51,7 @@ var TimelineViewBodyVue2 = {
|
|
|
49
51
|
viewSlot: that.$props.viewSlot,
|
|
50
52
|
attrs: this.v3 ? undefined : {
|
|
51
53
|
viewSlot: that.$props.viewSlot,
|
|
54
|
+
slotRender: that.$props.slotRender,
|
|
52
55
|
index: slot.index,
|
|
53
56
|
start: slot.start,
|
|
54
57
|
end: slot.end,
|
|
@@ -65,6 +68,7 @@ var TimelineViewBodyVue2 = {
|
|
|
65
68
|
expandable: true,
|
|
66
69
|
editable: editable
|
|
67
70
|
},
|
|
71
|
+
slotRender: that.$props.slotRender,
|
|
68
72
|
index: slot.index,
|
|
69
73
|
start: slot.start,
|
|
70
74
|
end: slot.end,
|
|
@@ -80,7 +80,9 @@ var WeekViewVue2 = {
|
|
|
80
80
|
type: Boolean,
|
|
81
81
|
default: true
|
|
82
82
|
},
|
|
83
|
-
timeHeaderCell: String
|
|
83
|
+
timeHeaderCell: String,
|
|
84
|
+
slotRender: [String, Function, Object],
|
|
85
|
+
item: [String, Function, Object]
|
|
84
86
|
},
|
|
85
87
|
inject: {
|
|
86
88
|
kendoLocalizationService: {
|
|
@@ -120,7 +122,9 @@ var WeekViewVue2 = {
|
|
|
120
122
|
workWeekStart: this.$props.workWeekStart,
|
|
121
123
|
workWeekEnd: this.$props.workWeekEnd,
|
|
122
124
|
defaultShowWorkHours: this.$props.defaultShowWorkHours,
|
|
123
|
-
timeHeaderCell: this.$props.timeHeaderCell
|
|
125
|
+
timeHeaderCell: this.$props.timeHeaderCell,
|
|
126
|
+
slotRender: this.$props.slotRender,
|
|
127
|
+
item: this.$props.item
|
|
124
128
|
},
|
|
125
129
|
dateRange: this.$props.dateRange,
|
|
126
130
|
numberOfDays: this.$props.numberOfDays,
|
|
@@ -139,7 +143,9 @@ var WeekViewVue2 = {
|
|
|
139
143
|
workWeekStart: this.$props.workWeekStart,
|
|
140
144
|
workWeekEnd: this.$props.workWeekEnd,
|
|
141
145
|
defaultShowWorkHours: this.$props.defaultShowWorkHours,
|
|
142
|
-
timeHeaderCell: this.$props.timeHeaderCell
|
|
146
|
+
timeHeaderCell: this.$props.timeHeaderCell,
|
|
147
|
+
slotRender: this.$props.slotRender,
|
|
148
|
+
item: this.$props.item
|
|
143
149
|
});
|
|
144
150
|
}
|
|
145
151
|
};
|
|
@@ -69,7 +69,9 @@ var WorkWeekViewVue2 = {
|
|
|
69
69
|
showWorkHours: {
|
|
70
70
|
type: Boolean,
|
|
71
71
|
default: true
|
|
72
|
-
}
|
|
72
|
+
},
|
|
73
|
+
slotRender: [String, Function, Object],
|
|
74
|
+
item: [String, Function, Object]
|
|
73
75
|
},
|
|
74
76
|
inject: {
|
|
75
77
|
kendoLocalizationService: {
|
|
@@ -105,7 +107,9 @@ var WorkWeekViewVue2 = {
|
|
|
105
107
|
selectedShortDateFormat: this.$props.selectedShortDateFormat,
|
|
106
108
|
showWorkHours: this.$props.showWorkHours,
|
|
107
109
|
title: title,
|
|
108
|
-
step: DAYS_IN_WEEK_COUNT
|
|
110
|
+
step: DAYS_IN_WEEK_COUNT,
|
|
111
|
+
slotRender: this.$props.slotRender,
|
|
112
|
+
item: this.$props.item
|
|
109
113
|
},
|
|
110
114
|
dateRange: this.$props.dateRange,
|
|
111
115
|
numberOfDays: numberOfDays,
|
|
@@ -115,7 +119,9 @@ var WorkWeekViewVue2 = {
|
|
|
115
119
|
selectedShortDateFormat: this.$props.selectedShortDateFormat,
|
|
116
120
|
showWorkHours: this.$props.showWorkHours,
|
|
117
121
|
title: title,
|
|
118
|
-
step: DAYS_IN_WEEK_COUNT
|
|
122
|
+
step: DAYS_IN_WEEK_COUNT,
|
|
123
|
+
slotRender: this.$props.slotRender,
|
|
124
|
+
item: this.$props.item
|
|
119
125
|
});
|
|
120
126
|
}
|
|
121
127
|
};
|