@progress/kendo-vue-scheduler 3.0.9 → 3.1.1-dev.202203151205
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 +133 -683
- 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/ViewSelectorList.js +9 -2
- package/dist/es/context/SchedulerResourceIteratorContext.d.ts +1 -0
- package/dist/es/context/SchedulerResourceIteratorContext.js +3 -2
- package/dist/es/items/SchedulerEditItem.js +10 -9
- package/dist/es/items/SchedulerItem.d.ts +2 -0
- package/dist/es/items/SchedulerItem.js +111 -29
- 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 +23 -9
- package/dist/es/slots/SchedulerSlot.d.ts +4 -0
- package/dist/es/slots/SchedulerSlot.js +96 -21
- package/dist/es/slots/SchedulerViewSlot.d.ts +1 -1
- package/dist/es/slots/SchedulerViewSlot.js +53 -30
- package/dist/es/tasks/SchedulerEditTask.js +56 -49
- package/dist/es/tasks/SchedulerTask.js +57 -4
- 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 +124 -28
- package/dist/es/views/day/DayView.js +9 -3
- package/dist/es/views/day/DayViewAllDaySlots.d.ts +1 -0
- package/dist/es/views/day/DayViewAllDaySlots.js +3 -2
- 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 +167 -284
- 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 +131 -683
- 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/ViewSelectorList.js +9 -2
- package/dist/npm/context/SchedulerResourceIteratorContext.d.ts +1 -0
- package/dist/npm/context/SchedulerResourceIteratorContext.js +3 -2
- package/dist/npm/items/SchedulerEditItem.js +10 -9
- package/dist/npm/items/SchedulerItem.d.ts +2 -0
- package/dist/npm/items/SchedulerItem.js +111 -29
- 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 +23 -9
- package/dist/npm/slots/SchedulerSlot.d.ts +4 -0
- package/dist/npm/slots/SchedulerSlot.js +96 -20
- package/dist/npm/slots/SchedulerViewSlot.d.ts +1 -1
- package/dist/npm/slots/SchedulerViewSlot.js +52 -29
- package/dist/npm/tasks/SchedulerEditTask.js +57 -49
- package/dist/npm/tasks/SchedulerTask.js +57 -3
- 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 +127 -28
- package/dist/npm/views/day/DayView.js +9 -3
- package/dist/npm/views/day/DayViewAllDaySlots.d.ts +1 -0
- package/dist/npm/views/day/DayViewAllDaySlots.js +3 -2
- 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 +168 -285
- 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
|
@@ -57,7 +57,8 @@ var AgendaViewVue2 = {
|
|
|
57
57
|
numberOfDays: {
|
|
58
58
|
type: Number,
|
|
59
59
|
default: DAYS_IN_WEEK_COUNT
|
|
60
|
-
}
|
|
60
|
+
},
|
|
61
|
+
task: [String, Function, Object]
|
|
61
62
|
},
|
|
62
63
|
inject: {
|
|
63
64
|
ks: {
|
|
@@ -187,14 +188,18 @@ var AgendaViewVue2 = {
|
|
|
187
188
|
return [h(AgendaViewBody, {
|
|
188
189
|
agendaSlots: _this.agendaSlots,
|
|
189
190
|
attrs: _this.v3 ? undefined : {
|
|
190
|
-
agendaSlots: _this.agendaSlots
|
|
191
|
-
|
|
191
|
+
agendaSlots: _this.agendaSlots,
|
|
192
|
+
task: _this.$props.task
|
|
193
|
+
},
|
|
194
|
+
task: _this.$props.task
|
|
192
195
|
})];
|
|
193
196
|
} : [h(AgendaViewBody, {
|
|
194
197
|
agendaSlots: _this.agendaSlots,
|
|
195
198
|
attrs: _this.v3 ? undefined : {
|
|
196
|
-
agendaSlots: _this.agendaSlots
|
|
197
|
-
|
|
199
|
+
agendaSlots: _this.agendaSlots,
|
|
200
|
+
task: _this.$props.task
|
|
201
|
+
},
|
|
202
|
+
task: _this.$props.task
|
|
198
203
|
})])];
|
|
199
204
|
} : [h("div", {
|
|
200
205
|
"class": "k-scheduler-head"
|
|
@@ -220,14 +225,18 @@ var AgendaViewVue2 = {
|
|
|
220
225
|
return [h(AgendaViewBody, {
|
|
221
226
|
agendaSlots: _this.agendaSlots,
|
|
222
227
|
attrs: _this.v3 ? undefined : {
|
|
223
|
-
agendaSlots: _this.agendaSlots
|
|
224
|
-
|
|
228
|
+
agendaSlots: _this.agendaSlots,
|
|
229
|
+
task: _this.$props.task
|
|
230
|
+
},
|
|
231
|
+
task: _this.$props.task
|
|
225
232
|
})];
|
|
226
233
|
} : [h(AgendaViewBody, {
|
|
227
234
|
agendaSlots: _this.agendaSlots,
|
|
228
235
|
attrs: _this.v3 ? undefined : {
|
|
229
|
-
agendaSlots: _this.agendaSlots
|
|
230
|
-
|
|
236
|
+
agendaSlots: _this.agendaSlots,
|
|
237
|
+
task: _this.$props.task
|
|
238
|
+
},
|
|
239
|
+
task: _this.$props.task
|
|
231
240
|
})])])
|
|
232
241
|
);
|
|
233
242
|
}
|
|
@@ -6,6 +6,7 @@ declare type DefaultMethods<V> = {
|
|
|
6
6
|
import { SchedulerResource, SchedulerGroup } from '../../models';
|
|
7
7
|
/** @hidden */
|
|
8
8
|
export interface VerticalResourceIteratorProps {
|
|
9
|
+
more?: Object;
|
|
9
10
|
group?: SchedulerGroup;
|
|
10
11
|
resources?: SchedulerResource[];
|
|
11
12
|
nested?: boolean;
|
|
@@ -5,11 +5,16 @@ var gh = allVue.h;
|
|
|
5
5
|
var inject = allVue.inject;
|
|
6
6
|
import { toGroupResources } from './utils';
|
|
7
7
|
import { SchedulerResourceIteratorContext } from '../../context/SchedulerResourceIteratorContext';
|
|
8
|
-
import { getDefaultSlots } from '@progress/kendo-vue-common';
|
|
8
|
+
import { getDefaultSlots } from '@progress/kendo-vue-common';
|
|
9
|
+
import { DayViewVerticalSlotsRow } from '../day/DayViewVerticalSlotsRow';
|
|
10
|
+
import { MonthViewBody } from '../month/MonthViewBody';
|
|
11
|
+
import { TimelineViewBody } from '../time/TimelineViewBody';
|
|
12
|
+
var FIRST_INDEX = 0; // tslint:enable:max-line-length
|
|
9
13
|
|
|
10
14
|
var VerticalResourceIteratorVue2 = {
|
|
11
15
|
name: 'KendoVerticalResourceIterator',
|
|
12
16
|
props: {
|
|
17
|
+
more: Object,
|
|
13
18
|
group: Object,
|
|
14
19
|
resources: Array,
|
|
15
20
|
nested: Boolean,
|
|
@@ -30,12 +35,92 @@ var VerticalResourceIteratorVue2 = {
|
|
|
30
35
|
var defaultSlot = getDefaultSlots(this);
|
|
31
36
|
var _a = this.$props,
|
|
32
37
|
nested = _a.nested,
|
|
33
|
-
wrapGroup = _a.wrapGroup
|
|
38
|
+
wrapGroup = _a.wrapGroup,
|
|
39
|
+
more = _a.more;
|
|
34
40
|
var cellContent = this.$props.cellContent || DefaultCellContent;
|
|
35
41
|
var resources = toGroupResources(this.$props.group, this.$props.resources);
|
|
36
42
|
var depth = 0;
|
|
37
43
|
var groupIndex = 0;
|
|
38
44
|
|
|
45
|
+
var renderMore = function renderMore(_resource, currentGroupIndex) {
|
|
46
|
+
return more ? more.timelineSlots ? h(TimelineViewBody, {
|
|
47
|
+
slotRender: more.slotRender,
|
|
48
|
+
attrs: this.v3 ? undefined : {
|
|
49
|
+
slotRender: more.slotRender,
|
|
50
|
+
groupIndex: currentGroupIndex,
|
|
51
|
+
ranges: more.ranges,
|
|
52
|
+
workDayStart: more.workDayStart,
|
|
53
|
+
workDayEnd: more.workDayEnd,
|
|
54
|
+
timelineSlots: more.timelineSlots
|
|
55
|
+
},
|
|
56
|
+
groupIndex: currentGroupIndex,
|
|
57
|
+
ranges: more.ranges,
|
|
58
|
+
workDayStart: more.workDayStart,
|
|
59
|
+
workDayEnd: more.workDayEnd,
|
|
60
|
+
timelineSlots: more.timelineSlots,
|
|
61
|
+
onDataaction: this.handleDataAction,
|
|
62
|
+
on: this.v3 ? undefined : {
|
|
63
|
+
"dataaction": this.handleDataAction
|
|
64
|
+
}
|
|
65
|
+
}) : more.monthSlots ? more.ranges.map(function (_, rangeIndex) {
|
|
66
|
+
return h(MonthViewBody, {
|
|
67
|
+
slotRender: more.slotRender,
|
|
68
|
+
attrs: this.v3 ? undefined : {
|
|
69
|
+
slotRender: more.slotRender,
|
|
70
|
+
ranges: more.ranges,
|
|
71
|
+
groupIndex: currentGroupIndex,
|
|
72
|
+
monthSlots: more.monthSlots,
|
|
73
|
+
rangeIndex: rangeIndex,
|
|
74
|
+
itemsPerSlot: more.itemsPerSlot
|
|
75
|
+
},
|
|
76
|
+
ranges: more.ranges,
|
|
77
|
+
groupIndex: currentGroupIndex,
|
|
78
|
+
monthSlots: more.monthSlots,
|
|
79
|
+
rangeIndex: rangeIndex,
|
|
80
|
+
itemsPerSlot: more.itemsPerSlot,
|
|
81
|
+
onDataaction: this.handleDataAction,
|
|
82
|
+
on: this.v3 ? undefined : {
|
|
83
|
+
"dataaction": this.handleDataAction
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}, this) : more.timeSlots.filter(function (s) {
|
|
87
|
+
return s.group.index === currentGroupIndex && s.range.index === FIRST_INDEX;
|
|
88
|
+
}).map(function (root, rootIndex, filtered) {
|
|
89
|
+
return h(DayViewVerticalSlotsRow, {
|
|
90
|
+
slotRender: more.slotRender,
|
|
91
|
+
attrs: this.v3 ? undefined : {
|
|
92
|
+
slotRender: more.slotRender,
|
|
93
|
+
groupIndex: currentGroupIndex,
|
|
94
|
+
root: root,
|
|
95
|
+
rootIndex: rootIndex,
|
|
96
|
+
filtered: filtered,
|
|
97
|
+
timeRanges: more.timeRanges,
|
|
98
|
+
timeSlots: more.timeSlots,
|
|
99
|
+
workDayStart: more.workDayStart,
|
|
100
|
+
workDayEnd: more.workDayEnd,
|
|
101
|
+
numberOfDays: more.numberOfDays,
|
|
102
|
+
workWeekStart: more.workWeekStart,
|
|
103
|
+
workWeekEnd: more.workWeekEnd
|
|
104
|
+
},
|
|
105
|
+
groupIndex: currentGroupIndex,
|
|
106
|
+
onDataaction: this.handleDataAction,
|
|
107
|
+
on: this.v3 ? undefined : {
|
|
108
|
+
"dataaction": this.handleDataAction
|
|
109
|
+
},
|
|
110
|
+
root: root,
|
|
111
|
+
rootIndex: rootIndex,
|
|
112
|
+
filtered: filtered,
|
|
113
|
+
timeRanges: more.timeRanges,
|
|
114
|
+
timeSlots: more.timeSlots,
|
|
115
|
+
workDayStart: more.workDayStart,
|
|
116
|
+
workDayEnd: more.workDayEnd,
|
|
117
|
+
numberOfDays: more.numberOfDays,
|
|
118
|
+
workWeekStart: more.workWeekStart,
|
|
119
|
+
workWeekEnd: more.workWeekEnd
|
|
120
|
+
});
|
|
121
|
+
}, this) : null;
|
|
122
|
+
};
|
|
123
|
+
|
|
39
124
|
var renderResourcesWrapped = function renderResourcesWrapped(args) {
|
|
40
125
|
return h("div", {
|
|
41
126
|
"class": "k-scheduler-row"
|
|
@@ -62,18 +147,19 @@ var VerticalResourceIteratorVue2 = {
|
|
|
62
147
|
var hasGroups = args.resources.length > 0;
|
|
63
148
|
|
|
64
149
|
if (args.depth === args.resources.length || !hasGroups) {
|
|
65
|
-
return
|
|
66
|
-
|
|
150
|
+
return [// @ts-ignore function children
|
|
151
|
+
h(SchedulerResourceIteratorContext, {
|
|
152
|
+
noWrap: true,
|
|
153
|
+
attrs: this.v3 ? undefined : {
|
|
154
|
+
noWrap: true,
|
|
67
155
|
resource: args.resources[args.depth],
|
|
68
|
-
attrs: this.v3 ? undefined : {
|
|
69
|
-
resource: args.resources[args.depth],
|
|
70
|
-
groupIndex: hasGroups ? args.groupIndex : 0
|
|
71
|
-
},
|
|
72
156
|
groupIndex: hasGroups ? args.groupIndex : 0
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
)
|
|
157
|
+
},
|
|
158
|
+
resource: args.resources[args.depth],
|
|
159
|
+
groupIndex: hasGroups ? args.groupIndex : 0
|
|
160
|
+
}, this.v3 ? function () {
|
|
161
|
+
return [children];
|
|
162
|
+
} : [children]), renderMore.call(this, args.resources[args.depth], hasGroups ? args.groupIndex : 0)];
|
|
77
163
|
}
|
|
78
164
|
|
|
79
165
|
var dataLength = args.resources[args.depth].data.length;
|
|
@@ -106,8 +192,6 @@ var VerticalResourceIteratorVue2 = {
|
|
|
106
192
|
};
|
|
107
193
|
|
|
108
194
|
var renderResourcesRecursivelyWrapped = function renderResourcesRecursivelyWrapped(args) {
|
|
109
|
-
var _this = this;
|
|
110
|
-
|
|
111
195
|
var children = args.children;
|
|
112
196
|
var dataLength = args.resources.length ? args.resources[args.depth].data.length : 0;
|
|
113
197
|
|
|
@@ -129,14 +213,14 @@ var VerticalResourceIteratorVue2 = {
|
|
|
129
213
|
"data-resource-index": dataLength * args.groupIndex + dataIndex
|
|
130
214
|
}, [dataItem.text]), args.depth + 1 !== resources.length && h("div", {
|
|
131
215
|
"class": "k-scheduler-cell k-resource-content"
|
|
132
|
-
}, [renderResourcesRecursivelyWrapped.call(
|
|
216
|
+
}, [renderResourcesRecursivelyWrapped.call(this, {
|
|
133
217
|
resources: resources,
|
|
134
218
|
children: children,
|
|
135
219
|
cellContent: args.cellContent,
|
|
136
220
|
groupIndex: dataLength * args.groupIndex + dataIndex,
|
|
137
221
|
depth: args.depth + 1
|
|
138
222
|
})])]);
|
|
139
|
-
});
|
|
223
|
+
}, this);
|
|
140
224
|
};
|
|
141
225
|
|
|
142
226
|
var renderGroupContentRecursively = function renderGroupContentRecursively(args) {
|
|
@@ -146,11 +230,13 @@ var VerticalResourceIteratorVue2 = {
|
|
|
146
230
|
if (args.depth === args.resources.length || !hasGroups) {
|
|
147
231
|
return (// @ts-ignore function children
|
|
148
232
|
h(SchedulerResourceIteratorContext, {
|
|
149
|
-
|
|
233
|
+
noWrap: true,
|
|
150
234
|
attrs: this.v3 ? undefined : {
|
|
235
|
+
noWrap: true,
|
|
151
236
|
resource: args.resources[args.depth],
|
|
152
237
|
groupIndex: hasGroups ? args.groupIndex : undefined
|
|
153
238
|
},
|
|
239
|
+
resource: args.resources[args.depth],
|
|
154
240
|
groupIndex: hasGroups ? args.groupIndex : undefined
|
|
155
241
|
}, this.v3 ? function () {
|
|
156
242
|
return [children];
|
|
@@ -186,19 +272,24 @@ var VerticalResourceIteratorVue2 = {
|
|
|
186
272
|
|
|
187
273
|
var cellChildren = function cellChildren(children, currentResources, currentGroupIndex) {
|
|
188
274
|
var hasGroups = currentResources.length > 0;
|
|
189
|
-
return
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
275
|
+
return (// @ts-ignore function children
|
|
276
|
+
h(SchedulerResourceIteratorContext, {
|
|
277
|
+
noWrap: true,
|
|
278
|
+
attrs: this.v3 ? undefined : {
|
|
279
|
+
noWrap: true,
|
|
280
|
+
resource: currentResources[currentGroupIndex],
|
|
281
|
+
groupIndex: hasGroups ? currentGroupIndex : undefined
|
|
282
|
+
},
|
|
195
283
|
resource: currentResources[currentGroupIndex],
|
|
196
284
|
groupIndex: hasGroups ? currentGroupIndex : undefined
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
285
|
+
}, this.v3 ? function () {
|
|
286
|
+
return [h("div", {
|
|
287
|
+
"class": "k-scheduler-cell k-group-content"
|
|
288
|
+
}, [children])];
|
|
289
|
+
} : [h("div", {
|
|
290
|
+
"class": "k-scheduler-cell k-group-content"
|
|
291
|
+
}, [children])])
|
|
292
|
+
);
|
|
202
293
|
};
|
|
203
294
|
|
|
204
295
|
var cellPrefix = function cellPrefix(currentResources) {
|
|
@@ -259,6 +350,11 @@ var VerticalResourceIteratorVue2 = {
|
|
|
259
350
|
depth: depth,
|
|
260
351
|
groupIndex: groupIndex
|
|
261
352
|
})]);
|
|
353
|
+
},
|
|
354
|
+
methods: {
|
|
355
|
+
handleDataAction: function handleDataAction(action) {
|
|
356
|
+
this.$emit('dataaction', action);
|
|
357
|
+
}
|
|
262
358
|
}
|
|
263
359
|
};
|
|
264
360
|
var DefaultCellContent = null;
|
|
@@ -82,7 +82,9 @@ var DayViewVue2 = {
|
|
|
82
82
|
type: Boolean,
|
|
83
83
|
default: true
|
|
84
84
|
},
|
|
85
|
-
timeHeaderCell: String
|
|
85
|
+
timeHeaderCell: String,
|
|
86
|
+
slotRender: [String, Function, Object],
|
|
87
|
+
item: [String, Function, Object]
|
|
86
88
|
},
|
|
87
89
|
inject: {
|
|
88
90
|
kendoLocalizationService: {
|
|
@@ -122,7 +124,9 @@ var DayViewVue2 = {
|
|
|
122
124
|
workWeekStart: this.$props.workWeekStart,
|
|
123
125
|
workWeekEnd: this.$props.workWeekEnd,
|
|
124
126
|
defaultShowWorkHours: this.$props.defaultShowWorkHours,
|
|
125
|
-
timeHeaderCell: this.$props.timeHeaderCell
|
|
127
|
+
timeHeaderCell: this.$props.timeHeaderCell,
|
|
128
|
+
slotRender: this.$props.slotRender,
|
|
129
|
+
item: this.$props.item
|
|
126
130
|
},
|
|
127
131
|
dateRange: this.$props.dateRange,
|
|
128
132
|
step: this.$props.step,
|
|
@@ -141,7 +145,9 @@ var DayViewVue2 = {
|
|
|
141
145
|
workWeekStart: this.$props.workWeekStart,
|
|
142
146
|
workWeekEnd: this.$props.workWeekEnd,
|
|
143
147
|
defaultShowWorkHours: this.$props.defaultShowWorkHours,
|
|
144
|
-
timeHeaderCell: this.$props.timeHeaderCell
|
|
148
|
+
timeHeaderCell: this.$props.timeHeaderCell,
|
|
149
|
+
slotRender: this.$props.slotRender,
|
|
150
|
+
item: this.$props.item
|
|
145
151
|
});
|
|
146
152
|
}
|
|
147
153
|
};
|
|
@@ -8,6 +8,7 @@ import { SchedulerEditSlot } from '../../slots/SchedulerEditSlot'; // tslint:ena
|
|
|
8
8
|
var DayViewAllDaySlotsVue2 = {
|
|
9
9
|
name: 'KendoDayViewAllDaySlots',
|
|
10
10
|
props: {
|
|
11
|
+
slotRender: [String, Function, Object],
|
|
11
12
|
dayRanges: Array,
|
|
12
13
|
daySlots: Array,
|
|
13
14
|
numberOfDays: Number,
|
|
@@ -58,7 +59,7 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
58
59
|
range: slot.range,
|
|
59
60
|
isAllDay: slot.isAllDay,
|
|
60
61
|
form: this.$props.form,
|
|
61
|
-
|
|
62
|
+
slotRender: this.$props.slotRender,
|
|
62
63
|
viewSlot: this.$props.viewSlot,
|
|
63
64
|
row: 0,
|
|
64
65
|
col: this.ks.orientation === 'horizontal' ? filtered.length * (this.ri.groupIndex || 0) + slotIndex : slotIndex,
|
|
@@ -78,7 +79,7 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
78
79
|
"dataaction": this.handleDataAction
|
|
79
80
|
},
|
|
80
81
|
form: this.$props.form,
|
|
81
|
-
|
|
82
|
+
slotRender: this.$props.slotRender,
|
|
82
83
|
viewSlot: this.$props.viewSlot,
|
|
83
84
|
key: slot.start.getTime() + ":" + slot.group.index,
|
|
84
85
|
row: 0,
|
|
@@ -11,6 +11,7 @@ import { isInTimeRange } from '../../utils'; // tslint:enable:max-line-length
|
|
|
11
11
|
var DayViewMiddleRowVue2 = {
|
|
12
12
|
name: 'KendoDayViewMiddleRow',
|
|
13
13
|
props: {
|
|
14
|
+
slotRender: [String, Function, Object],
|
|
14
15
|
timeRanges: Array,
|
|
15
16
|
timeSlots: Array,
|
|
16
17
|
slotDivisions: {
|
|
@@ -43,6 +44,8 @@ var DayViewMiddleRowVue2 = {
|
|
|
43
44
|
render: function render(createElement) {
|
|
44
45
|
var h = gh || createElement;
|
|
45
46
|
var EditSlot = this.$props.editSlot || SchedulerEditSlot;
|
|
47
|
+
var that = this;
|
|
48
|
+
var workWeekStart = that.numberOfDays + that.workWeekStart;
|
|
46
49
|
return h("div", {
|
|
47
50
|
"class": classNames('k-scheduler-row', {
|
|
48
51
|
'k-middle-row': !((this.rootIndex + 1) % this.slotDivisions === 0)
|
|
@@ -66,14 +69,14 @@ var DayViewMiddleRowVue2 = {
|
|
|
66
69
|
group: slot.group,
|
|
67
70
|
range: slot.range,
|
|
68
71
|
isAllDay: slot.isAllDay,
|
|
69
|
-
|
|
72
|
+
slotRender: this.$props.slotRender,
|
|
70
73
|
viewSlot: this.$props.viewSlot,
|
|
71
74
|
form: this.$props.form,
|
|
72
75
|
row: this.rootIndex + GRID_OFFSET,
|
|
73
76
|
col: this.timeRanges.length * (this.ri.groupIndex || 0) + rangeIndex,
|
|
74
|
-
isWorkHour: isInTimeRange(slot.zonedStart,
|
|
75
|
-
isWorkDay: 0 <= slot.zonedStart.getDay() + (
|
|
76
|
-
editable:
|
|
77
|
+
isWorkHour: isInTimeRange(slot.zonedStart, that.workDayStart, that.workDayEnd),
|
|
78
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart)) % that.numberOfDays <= that.workWeekEnd + (that.numberOfDays - workWeekStart),
|
|
79
|
+
editable: that.$props.editable
|
|
77
80
|
},
|
|
78
81
|
start: slot.start,
|
|
79
82
|
end: slot.end,
|
|
@@ -87,16 +90,16 @@ var DayViewMiddleRowVue2 = {
|
|
|
87
90
|
on: this.v3 ? undefined : {
|
|
88
91
|
"dataaction": this.handleDataAction
|
|
89
92
|
},
|
|
90
|
-
|
|
93
|
+
slotRender: this.$props.slotRender,
|
|
91
94
|
viewSlot: this.$props.viewSlot,
|
|
92
95
|
form: this.$props.form,
|
|
93
96
|
row: this.rootIndex + GRID_OFFSET,
|
|
94
97
|
col: this.timeRanges.length * (this.ri.groupIndex || 0) + rangeIndex,
|
|
95
|
-
isWorkHour: isInTimeRange(slot.zonedStart,
|
|
96
|
-
isWorkDay: 0 <= slot.zonedStart.getDay() + (
|
|
97
|
-
editable:
|
|
98
|
+
isWorkHour: isInTimeRange(slot.zonedStart, that.workDayStart, that.workDayEnd),
|
|
99
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart)) % that.numberOfDays <= that.workWeekEnd + (that.numberOfDays - workWeekStart),
|
|
100
|
+
editable: that.$props.editable
|
|
98
101
|
});
|
|
99
|
-
},
|
|
102
|
+
}, that);
|
|
100
103
|
}, this)]);
|
|
101
104
|
},
|
|
102
105
|
methods: {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
/** @hidden */
|
|
7
|
+
export interface DayViewVerticalRowProps {
|
|
8
|
+
daySlots: any[];
|
|
9
|
+
dayRanges: any[];
|
|
10
|
+
timeSlots: any[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export interface DayViewVerticalRowState {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export interface DayViewVerticalRowComputed {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @hidden
|
|
25
|
+
*/
|
|
26
|
+
export interface DayViewVerticalRowMethods {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
export interface DayViewVerticalRowData {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
export interface DayViewVerticalRowAll extends Vue2type, DayViewVerticalRowMethods, DayViewVerticalRowData, DayViewVerticalRowComputed, DayViewVerticalRowState {
|
|
38
|
+
}
|
|
39
|
+
declare let DayViewVerticalRowVue2: ComponentOptions<DayViewVerticalRowAll, DefaultData<DayViewVerticalRowData>, DefaultMethods<DayViewVerticalRowAll>, DayViewVerticalRowComputed, RecordPropsDefinition<DayViewVerticalRowProps>>;
|
|
40
|
+
declare const DayViewVerticalRow: DefineComponent<DayViewVerticalRowProps, any, DayViewVerticalRowData, DayViewVerticalRowComputed, DayViewVerticalRowMethods, {}, {}, {}, string, DayViewVerticalRowProps, DayViewVerticalRowProps, {}>;
|
|
41
|
+
export { DayViewVerticalRow, DayViewVerticalRowVue2 };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import * as Vue from 'vue';
|
|
3
|
+
var allVue = Vue;
|
|
4
|
+
var gh = allVue.h;
|
|
5
|
+
import { GRID_OFFSET } from './MultiDayView';
|
|
6
|
+
import { SchedulerEditSlot } from '../../slots/SchedulerEditSlot';
|
|
7
|
+
import { DayViewAllDayRowContent } from './DayViewAllDayRowContent';
|
|
8
|
+
var FIRST_INDEX = 0; // tslint:enable:max-line-length
|
|
9
|
+
|
|
10
|
+
var DayViewVerticalRowVue2 = {
|
|
11
|
+
name: 'KendoDayViewVerticalRow',
|
|
12
|
+
props: {
|
|
13
|
+
dayRanges: Array,
|
|
14
|
+
daySlots: Array,
|
|
15
|
+
timeSlots: Array
|
|
16
|
+
},
|
|
17
|
+
inject: {
|
|
18
|
+
ri: {
|
|
19
|
+
default: null
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
setup: !gh ? undefined : function () {
|
|
24
|
+
var v3 = !!gh;
|
|
25
|
+
return {
|
|
26
|
+
v3: v3
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
render: function render(createElement) {
|
|
31
|
+
var h = gh || createElement;
|
|
32
|
+
var EditSlot = this.$props.editSlot || SchedulerEditSlot;
|
|
33
|
+
var groupIndex = this.ri.groupIndex;
|
|
34
|
+
var _a = this.$props,
|
|
35
|
+
timeSlots = _a.timeSlots,
|
|
36
|
+
daySlots = _a.daySlots;
|
|
37
|
+
return h("div", {
|
|
38
|
+
"class": "k-scheduler-row"
|
|
39
|
+
}, [h(DayViewAllDayRowContent, {
|
|
40
|
+
groupIndex: groupIndex,
|
|
41
|
+
attrs: this.v3 ? undefined : {
|
|
42
|
+
groupIndex: groupIndex
|
|
43
|
+
}
|
|
44
|
+
}), this.dayRanges.map(function (_, rangeIndex) {
|
|
45
|
+
var groupOffset = timeSlots.filter(function (s) {
|
|
46
|
+
return s.group.index === groupIndex && s.range.index === FIRST_INDEX;
|
|
47
|
+
}).length;
|
|
48
|
+
return daySlots.filter(function (s) {
|
|
49
|
+
return s.group.index === groupIndex && s.range.index === rangeIndex;
|
|
50
|
+
}).map(function (slot, slotIndex) {
|
|
51
|
+
return h(EditSlot, {
|
|
52
|
+
slotRender: this.$props.slotRender,
|
|
53
|
+
attrs: this.v3 ? undefined : {
|
|
54
|
+
slotRender: this.$props.slotRender,
|
|
55
|
+
viewSlot: this.$props.viewSlot,
|
|
56
|
+
form: this.$props.form,
|
|
57
|
+
index: slot.index,
|
|
58
|
+
start: slot.start,
|
|
59
|
+
end: slot.end,
|
|
60
|
+
zonedStart: slot.zonedStart,
|
|
61
|
+
zonedEnd: slot.zonedEnd,
|
|
62
|
+
items: slot.items,
|
|
63
|
+
group: slot.group,
|
|
64
|
+
range: slot.range,
|
|
65
|
+
isAllDay: slot.isAllDay,
|
|
66
|
+
row: groupOffset * (groupIndex || 0) + (groupIndex || 0) * GRID_OFFSET,
|
|
67
|
+
col: slotIndex,
|
|
68
|
+
expandable: true
|
|
69
|
+
},
|
|
70
|
+
viewSlot: this.$props.viewSlot,
|
|
71
|
+
form: this.$props.form,
|
|
72
|
+
index: slot.index,
|
|
73
|
+
start: slot.start,
|
|
74
|
+
end: slot.end,
|
|
75
|
+
zonedStart: slot.zonedStart,
|
|
76
|
+
zonedEnd: slot.zonedEnd,
|
|
77
|
+
items: slot.items,
|
|
78
|
+
group: slot.group,
|
|
79
|
+
range: slot.range,
|
|
80
|
+
isAllDay: slot.isAllDay,
|
|
81
|
+
onDataaction: this.handleDataAction,
|
|
82
|
+
on: this.v3 ? undefined : {
|
|
83
|
+
"dataaction": this.handleDataAction
|
|
84
|
+
},
|
|
85
|
+
key: slot.start.getTime() + ":" + slot.group.index,
|
|
86
|
+
"class": 'k-scheduler-alldays-slot',
|
|
87
|
+
row: groupOffset * (groupIndex || 0) + (groupIndex || 0) * GRID_OFFSET,
|
|
88
|
+
col: slotIndex,
|
|
89
|
+
expandable: true
|
|
90
|
+
});
|
|
91
|
+
}, this);
|
|
92
|
+
}, this)]);
|
|
93
|
+
},
|
|
94
|
+
methods: {
|
|
95
|
+
handleDataAction: function handleDataAction(action) {
|
|
96
|
+
this.$emit('dataaction', action);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
var DayViewVerticalRow = DayViewVerticalRowVue2;
|
|
101
|
+
export { DayViewVerticalRow, DayViewVerticalRowVue2 };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
/** @hidden */
|
|
7
|
+
export interface DayViewVerticalSlotsRowProps {
|
|
8
|
+
groupIndex: number;
|
|
9
|
+
root: any;
|
|
10
|
+
rootIndex: number;
|
|
11
|
+
filtered: any[];
|
|
12
|
+
slotDivisions: number;
|
|
13
|
+
timeSlots: any[];
|
|
14
|
+
timeRanges: any[];
|
|
15
|
+
numberOfDays: number;
|
|
16
|
+
workDayStart: Date;
|
|
17
|
+
workDayEnd: Date;
|
|
18
|
+
workWeekStart: number;
|
|
19
|
+
workWeekEnd: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
export interface DayViewVerticalSlotsRowState {
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
export interface DayViewVerticalSlotsRowComputed {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export interface DayViewVerticalSlotsRowMethods {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @hidden
|
|
40
|
+
*/
|
|
41
|
+
export interface DayViewVerticalSlotsRowData {
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @hidden
|
|
45
|
+
*/
|
|
46
|
+
export interface DayViewVerticalSlotsRowAll extends Vue2type, DayViewVerticalSlotsRowMethods, DayViewVerticalSlotsRowData, DayViewVerticalSlotsRowComputed, DayViewVerticalSlotsRowState {
|
|
47
|
+
}
|
|
48
|
+
declare let DayViewVerticalSlotsRowVue2: ComponentOptions<DayViewVerticalSlotsRowAll, DefaultData<DayViewVerticalSlotsRowData>, DefaultMethods<DayViewVerticalSlotsRowAll>, DayViewVerticalSlotsRowComputed, RecordPropsDefinition<DayViewVerticalSlotsRowProps>>;
|
|
49
|
+
declare const DayViewVerticalSlotsRow: DefineComponent<DayViewVerticalSlotsRowProps, any, DayViewVerticalSlotsRowData, DayViewVerticalSlotsRowComputed, DayViewVerticalSlotsRowMethods, {}, {}, {}, string, DayViewVerticalSlotsRowProps, DayViewVerticalSlotsRowProps, {}>;
|
|
50
|
+
export { DayViewVerticalSlotsRow, DayViewVerticalSlotsRowVue2 };
|