@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
|
@@ -80,7 +80,8 @@ var AgendaViewVue2 = {
|
|
|
80
80
|
numberOfDays: {
|
|
81
81
|
type: Number,
|
|
82
82
|
default: constants_1.DAYS_IN_WEEK_COUNT
|
|
83
|
-
}
|
|
83
|
+
},
|
|
84
|
+
task: [String, Function, Object]
|
|
84
85
|
},
|
|
85
86
|
inject: {
|
|
86
87
|
ks: {
|
|
@@ -210,14 +211,18 @@ var AgendaViewVue2 = {
|
|
|
210
211
|
return [h(AgendaViewBody_1.AgendaViewBody, {
|
|
211
212
|
agendaSlots: _this.agendaSlots,
|
|
212
213
|
attrs: _this.v3 ? undefined : {
|
|
213
|
-
agendaSlots: _this.agendaSlots
|
|
214
|
-
|
|
214
|
+
agendaSlots: _this.agendaSlots,
|
|
215
|
+
task: _this.$props.task
|
|
216
|
+
},
|
|
217
|
+
task: _this.$props.task
|
|
215
218
|
})];
|
|
216
219
|
} : [h(AgendaViewBody_1.AgendaViewBody, {
|
|
217
220
|
agendaSlots: _this.agendaSlots,
|
|
218
221
|
attrs: _this.v3 ? undefined : {
|
|
219
|
-
agendaSlots: _this.agendaSlots
|
|
220
|
-
|
|
222
|
+
agendaSlots: _this.agendaSlots,
|
|
223
|
+
task: _this.$props.task
|
|
224
|
+
},
|
|
225
|
+
task: _this.$props.task
|
|
221
226
|
})])];
|
|
222
227
|
} : [h("div", {
|
|
223
228
|
"class": "k-scheduler-head"
|
|
@@ -243,14 +248,18 @@ var AgendaViewVue2 = {
|
|
|
243
248
|
return [h(AgendaViewBody_1.AgendaViewBody, {
|
|
244
249
|
agendaSlots: _this.agendaSlots,
|
|
245
250
|
attrs: _this.v3 ? undefined : {
|
|
246
|
-
agendaSlots: _this.agendaSlots
|
|
247
|
-
|
|
251
|
+
agendaSlots: _this.agendaSlots,
|
|
252
|
+
task: _this.$props.task
|
|
253
|
+
},
|
|
254
|
+
task: _this.$props.task
|
|
248
255
|
})];
|
|
249
256
|
} : [h(AgendaViewBody_1.AgendaViewBody, {
|
|
250
257
|
agendaSlots: _this.agendaSlots,
|
|
251
258
|
attrs: _this.v3 ? undefined : {
|
|
252
|
-
agendaSlots: _this.agendaSlots
|
|
253
|
-
|
|
259
|
+
agendaSlots: _this.agendaSlots,
|
|
260
|
+
task: _this.$props.task
|
|
261
|
+
},
|
|
262
|
+
task: _this.$props.task
|
|
254
263
|
})])])
|
|
255
264
|
);
|
|
256
265
|
}
|
|
@@ -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;
|
|
@@ -15,12 +15,20 @@ var utils_1 = require("./utils");
|
|
|
15
15
|
|
|
16
16
|
var SchedulerResourceIteratorContext_1 = require("../../context/SchedulerResourceIteratorContext");
|
|
17
17
|
|
|
18
|
-
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
18
|
+
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
19
19
|
|
|
20
|
+
var DayViewVerticalSlotsRow_1 = require("../day/DayViewVerticalSlotsRow");
|
|
21
|
+
|
|
22
|
+
var MonthViewBody_1 = require("../month/MonthViewBody");
|
|
23
|
+
|
|
24
|
+
var TimelineViewBody_1 = require("../time/TimelineViewBody");
|
|
25
|
+
|
|
26
|
+
var FIRST_INDEX = 0; // tslint:enable:max-line-length
|
|
20
27
|
|
|
21
28
|
var VerticalResourceIteratorVue2 = {
|
|
22
29
|
name: 'KendoVerticalResourceIterator',
|
|
23
30
|
props: {
|
|
31
|
+
more: Object,
|
|
24
32
|
group: Object,
|
|
25
33
|
resources: Array,
|
|
26
34
|
nested: Boolean,
|
|
@@ -41,12 +49,92 @@ var VerticalResourceIteratorVue2 = {
|
|
|
41
49
|
var defaultSlot = kendo_vue_common_1.getDefaultSlots(this);
|
|
42
50
|
var _a = this.$props,
|
|
43
51
|
nested = _a.nested,
|
|
44
|
-
wrapGroup = _a.wrapGroup
|
|
52
|
+
wrapGroup = _a.wrapGroup,
|
|
53
|
+
more = _a.more;
|
|
45
54
|
var cellContent = this.$props.cellContent || DefaultCellContent;
|
|
46
55
|
var resources = utils_1.toGroupResources(this.$props.group, this.$props.resources);
|
|
47
56
|
var depth = 0;
|
|
48
57
|
var groupIndex = 0;
|
|
49
58
|
|
|
59
|
+
var renderMore = function renderMore(_resource, currentGroupIndex) {
|
|
60
|
+
return more ? more.timelineSlots ? h(TimelineViewBody_1.TimelineViewBody, {
|
|
61
|
+
slotRender: more.slotRender,
|
|
62
|
+
attrs: this.v3 ? undefined : {
|
|
63
|
+
slotRender: more.slotRender,
|
|
64
|
+
groupIndex: currentGroupIndex,
|
|
65
|
+
ranges: more.ranges,
|
|
66
|
+
workDayStart: more.workDayStart,
|
|
67
|
+
workDayEnd: more.workDayEnd,
|
|
68
|
+
timelineSlots: more.timelineSlots
|
|
69
|
+
},
|
|
70
|
+
groupIndex: currentGroupIndex,
|
|
71
|
+
ranges: more.ranges,
|
|
72
|
+
workDayStart: more.workDayStart,
|
|
73
|
+
workDayEnd: more.workDayEnd,
|
|
74
|
+
timelineSlots: more.timelineSlots,
|
|
75
|
+
onDataaction: this.handleDataAction,
|
|
76
|
+
on: this.v3 ? undefined : {
|
|
77
|
+
"dataaction": this.handleDataAction
|
|
78
|
+
}
|
|
79
|
+
}) : more.monthSlots ? more.ranges.map(function (_, rangeIndex) {
|
|
80
|
+
return h(MonthViewBody_1.MonthViewBody, {
|
|
81
|
+
slotRender: more.slotRender,
|
|
82
|
+
attrs: this.v3 ? undefined : {
|
|
83
|
+
slotRender: more.slotRender,
|
|
84
|
+
ranges: more.ranges,
|
|
85
|
+
groupIndex: currentGroupIndex,
|
|
86
|
+
monthSlots: more.monthSlots,
|
|
87
|
+
rangeIndex: rangeIndex,
|
|
88
|
+
itemsPerSlot: more.itemsPerSlot
|
|
89
|
+
},
|
|
90
|
+
ranges: more.ranges,
|
|
91
|
+
groupIndex: currentGroupIndex,
|
|
92
|
+
monthSlots: more.monthSlots,
|
|
93
|
+
rangeIndex: rangeIndex,
|
|
94
|
+
itemsPerSlot: more.itemsPerSlot,
|
|
95
|
+
onDataaction: this.handleDataAction,
|
|
96
|
+
on: this.v3 ? undefined : {
|
|
97
|
+
"dataaction": this.handleDataAction
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}, this) : more.timeSlots.filter(function (s) {
|
|
101
|
+
return s.group.index === currentGroupIndex && s.range.index === FIRST_INDEX;
|
|
102
|
+
}).map(function (root, rootIndex, filtered) {
|
|
103
|
+
return h(DayViewVerticalSlotsRow_1.DayViewVerticalSlotsRow, {
|
|
104
|
+
slotRender: more.slotRender,
|
|
105
|
+
attrs: this.v3 ? undefined : {
|
|
106
|
+
slotRender: more.slotRender,
|
|
107
|
+
groupIndex: currentGroupIndex,
|
|
108
|
+
root: root,
|
|
109
|
+
rootIndex: rootIndex,
|
|
110
|
+
filtered: filtered,
|
|
111
|
+
timeRanges: more.timeRanges,
|
|
112
|
+
timeSlots: more.timeSlots,
|
|
113
|
+
workDayStart: more.workDayStart,
|
|
114
|
+
workDayEnd: more.workDayEnd,
|
|
115
|
+
numberOfDays: more.numberOfDays,
|
|
116
|
+
workWeekStart: more.workWeekStart,
|
|
117
|
+
workWeekEnd: more.workWeekEnd
|
|
118
|
+
},
|
|
119
|
+
groupIndex: currentGroupIndex,
|
|
120
|
+
onDataaction: this.handleDataAction,
|
|
121
|
+
on: this.v3 ? undefined : {
|
|
122
|
+
"dataaction": this.handleDataAction
|
|
123
|
+
},
|
|
124
|
+
root: root,
|
|
125
|
+
rootIndex: rootIndex,
|
|
126
|
+
filtered: filtered,
|
|
127
|
+
timeRanges: more.timeRanges,
|
|
128
|
+
timeSlots: more.timeSlots,
|
|
129
|
+
workDayStart: more.workDayStart,
|
|
130
|
+
workDayEnd: more.workDayEnd,
|
|
131
|
+
numberOfDays: more.numberOfDays,
|
|
132
|
+
workWeekStart: more.workWeekStart,
|
|
133
|
+
workWeekEnd: more.workWeekEnd
|
|
134
|
+
});
|
|
135
|
+
}, this) : null;
|
|
136
|
+
};
|
|
137
|
+
|
|
50
138
|
var renderResourcesWrapped = function renderResourcesWrapped(args) {
|
|
51
139
|
return h("div", {
|
|
52
140
|
"class": "k-scheduler-row"
|
|
@@ -73,18 +161,19 @@ var VerticalResourceIteratorVue2 = {
|
|
|
73
161
|
var hasGroups = args.resources.length > 0;
|
|
74
162
|
|
|
75
163
|
if (args.depth === args.resources.length || !hasGroups) {
|
|
76
|
-
return
|
|
77
|
-
|
|
164
|
+
return [// @ts-ignore function children
|
|
165
|
+
h(SchedulerResourceIteratorContext_1.SchedulerResourceIteratorContext, {
|
|
166
|
+
noWrap: true,
|
|
167
|
+
attrs: this.v3 ? undefined : {
|
|
168
|
+
noWrap: true,
|
|
78
169
|
resource: args.resources[args.depth],
|
|
79
|
-
attrs: this.v3 ? undefined : {
|
|
80
|
-
resource: args.resources[args.depth],
|
|
81
|
-
groupIndex: hasGroups ? args.groupIndex : 0
|
|
82
|
-
},
|
|
83
170
|
groupIndex: hasGroups ? args.groupIndex : 0
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
)
|
|
171
|
+
},
|
|
172
|
+
resource: args.resources[args.depth],
|
|
173
|
+
groupIndex: hasGroups ? args.groupIndex : 0
|
|
174
|
+
}, this.v3 ? function () {
|
|
175
|
+
return [children];
|
|
176
|
+
} : [children]), renderMore.call(this, args.resources[args.depth], hasGroups ? args.groupIndex : 0)];
|
|
88
177
|
}
|
|
89
178
|
|
|
90
179
|
var dataLength = args.resources[args.depth].data.length;
|
|
@@ -117,8 +206,6 @@ var VerticalResourceIteratorVue2 = {
|
|
|
117
206
|
};
|
|
118
207
|
|
|
119
208
|
var renderResourcesRecursivelyWrapped = function renderResourcesRecursivelyWrapped(args) {
|
|
120
|
-
var _this = this;
|
|
121
|
-
|
|
122
209
|
var children = args.children;
|
|
123
210
|
var dataLength = args.resources.length ? args.resources[args.depth].data.length : 0;
|
|
124
211
|
|
|
@@ -140,14 +227,14 @@ var VerticalResourceIteratorVue2 = {
|
|
|
140
227
|
"data-resource-index": dataLength * args.groupIndex + dataIndex
|
|
141
228
|
}, [dataItem.text]), args.depth + 1 !== resources.length && h("div", {
|
|
142
229
|
"class": "k-scheduler-cell k-resource-content"
|
|
143
|
-
}, [renderResourcesRecursivelyWrapped.call(
|
|
230
|
+
}, [renderResourcesRecursivelyWrapped.call(this, {
|
|
144
231
|
resources: resources,
|
|
145
232
|
children: children,
|
|
146
233
|
cellContent: args.cellContent,
|
|
147
234
|
groupIndex: dataLength * args.groupIndex + dataIndex,
|
|
148
235
|
depth: args.depth + 1
|
|
149
236
|
})])]);
|
|
150
|
-
});
|
|
237
|
+
}, this);
|
|
151
238
|
};
|
|
152
239
|
|
|
153
240
|
var renderGroupContentRecursively = function renderGroupContentRecursively(args) {
|
|
@@ -157,11 +244,13 @@ var VerticalResourceIteratorVue2 = {
|
|
|
157
244
|
if (args.depth === args.resources.length || !hasGroups) {
|
|
158
245
|
return (// @ts-ignore function children
|
|
159
246
|
h(SchedulerResourceIteratorContext_1.SchedulerResourceIteratorContext, {
|
|
160
|
-
|
|
247
|
+
noWrap: true,
|
|
161
248
|
attrs: this.v3 ? undefined : {
|
|
249
|
+
noWrap: true,
|
|
162
250
|
resource: args.resources[args.depth],
|
|
163
251
|
groupIndex: hasGroups ? args.groupIndex : undefined
|
|
164
252
|
},
|
|
253
|
+
resource: args.resources[args.depth],
|
|
165
254
|
groupIndex: hasGroups ? args.groupIndex : undefined
|
|
166
255
|
}, this.v3 ? function () {
|
|
167
256
|
return [children];
|
|
@@ -197,19 +286,24 @@ var VerticalResourceIteratorVue2 = {
|
|
|
197
286
|
|
|
198
287
|
var cellChildren = function cellChildren(children, currentResources, currentGroupIndex) {
|
|
199
288
|
var hasGroups = currentResources.length > 0;
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
289
|
+
return (// @ts-ignore function children
|
|
290
|
+
h(SchedulerResourceIteratorContext_1.SchedulerResourceIteratorContext, {
|
|
291
|
+
noWrap: true,
|
|
292
|
+
attrs: this.v3 ? undefined : {
|
|
293
|
+
noWrap: true,
|
|
294
|
+
resource: currentResources[currentGroupIndex],
|
|
295
|
+
groupIndex: hasGroups ? currentGroupIndex : undefined
|
|
296
|
+
},
|
|
206
297
|
resource: currentResources[currentGroupIndex],
|
|
207
298
|
groupIndex: hasGroups ? currentGroupIndex : undefined
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
299
|
+
}, this.v3 ? function () {
|
|
300
|
+
return [h("div", {
|
|
301
|
+
"class": "k-scheduler-cell k-group-content"
|
|
302
|
+
}, [children])];
|
|
303
|
+
} : [h("div", {
|
|
304
|
+
"class": "k-scheduler-cell k-group-content"
|
|
305
|
+
}, [children])])
|
|
306
|
+
);
|
|
213
307
|
};
|
|
214
308
|
|
|
215
309
|
var cellPrefix = function cellPrefix(currentResources) {
|
|
@@ -270,6 +364,11 @@ var VerticalResourceIteratorVue2 = {
|
|
|
270
364
|
depth: depth,
|
|
271
365
|
groupIndex: groupIndex
|
|
272
366
|
})]);
|
|
367
|
+
},
|
|
368
|
+
methods: {
|
|
369
|
+
handleDataAction: function handleDataAction(action) {
|
|
370
|
+
this.$emit('dataaction', action);
|
|
371
|
+
}
|
|
273
372
|
}
|
|
274
373
|
};
|
|
275
374
|
exports.VerticalResourceIteratorVue2 = VerticalResourceIteratorVue2;
|
|
@@ -94,7 +94,9 @@ var DayViewVue2 = {
|
|
|
94
94
|
type: Boolean,
|
|
95
95
|
default: true
|
|
96
96
|
},
|
|
97
|
-
timeHeaderCell: String
|
|
97
|
+
timeHeaderCell: String,
|
|
98
|
+
slotRender: [String, Function, Object],
|
|
99
|
+
item: [String, Function, Object]
|
|
98
100
|
},
|
|
99
101
|
inject: {
|
|
100
102
|
kendoLocalizationService: {
|
|
@@ -134,7 +136,9 @@ var DayViewVue2 = {
|
|
|
134
136
|
workWeekStart: this.$props.workWeekStart,
|
|
135
137
|
workWeekEnd: this.$props.workWeekEnd,
|
|
136
138
|
defaultShowWorkHours: this.$props.defaultShowWorkHours,
|
|
137
|
-
timeHeaderCell: this.$props.timeHeaderCell
|
|
139
|
+
timeHeaderCell: this.$props.timeHeaderCell,
|
|
140
|
+
slotRender: this.$props.slotRender,
|
|
141
|
+
item: this.$props.item
|
|
138
142
|
},
|
|
139
143
|
dateRange: this.$props.dateRange,
|
|
140
144
|
step: this.$props.step,
|
|
@@ -153,7 +157,9 @@ var DayViewVue2 = {
|
|
|
153
157
|
workWeekStart: this.$props.workWeekStart,
|
|
154
158
|
workWeekEnd: this.$props.workWeekEnd,
|
|
155
159
|
defaultShowWorkHours: this.$props.defaultShowWorkHours,
|
|
156
|
-
timeHeaderCell: this.$props.timeHeaderCell
|
|
160
|
+
timeHeaderCell: this.$props.timeHeaderCell,
|
|
161
|
+
slotRender: this.$props.slotRender,
|
|
162
|
+
item: this.$props.item
|
|
157
163
|
});
|
|
158
164
|
}
|
|
159
165
|
};
|
|
@@ -17,6 +17,7 @@ var SchedulerEditSlot_1 = require("../../slots/SchedulerEditSlot"); // tslint:en
|
|
|
17
17
|
var DayViewAllDaySlotsVue2 = {
|
|
18
18
|
name: 'KendoDayViewAllDaySlots',
|
|
19
19
|
props: {
|
|
20
|
+
slotRender: [String, Function, Object],
|
|
20
21
|
dayRanges: Array,
|
|
21
22
|
daySlots: Array,
|
|
22
23
|
numberOfDays: Number,
|
|
@@ -67,7 +68,7 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
67
68
|
range: slot.range,
|
|
68
69
|
isAllDay: slot.isAllDay,
|
|
69
70
|
form: this.$props.form,
|
|
70
|
-
|
|
71
|
+
slotRender: this.$props.slotRender,
|
|
71
72
|
viewSlot: this.$props.viewSlot,
|
|
72
73
|
row: 0,
|
|
73
74
|
col: this.ks.orientation === 'horizontal' ? filtered.length * (this.ri.groupIndex || 0) + slotIndex : slotIndex,
|
|
@@ -87,7 +88,7 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
87
88
|
"dataaction": this.handleDataAction
|
|
88
89
|
},
|
|
89
90
|
form: this.$props.form,
|
|
90
|
-
|
|
91
|
+
slotRender: this.$props.slotRender,
|
|
91
92
|
viewSlot: this.$props.viewSlot,
|
|
92
93
|
key: slot.start.getTime() + ":" + slot.group.index,
|
|
93
94
|
row: 0,
|
|
@@ -23,6 +23,7 @@ var utils_1 = require("../../utils"); // tslint:enable:max-line-length
|
|
|
23
23
|
var DayViewMiddleRowVue2 = {
|
|
24
24
|
name: 'KendoDayViewMiddleRow',
|
|
25
25
|
props: {
|
|
26
|
+
slotRender: [String, Function, Object],
|
|
26
27
|
timeRanges: Array,
|
|
27
28
|
timeSlots: Array,
|
|
28
29
|
slotDivisions: {
|
|
@@ -55,6 +56,8 @@ var DayViewMiddleRowVue2 = {
|
|
|
55
56
|
render: function render(createElement) {
|
|
56
57
|
var h = gh || createElement;
|
|
57
58
|
var EditSlot = this.$props.editSlot || SchedulerEditSlot_1.SchedulerEditSlot;
|
|
59
|
+
var that = this;
|
|
60
|
+
var workWeekStart = that.numberOfDays + that.workWeekStart;
|
|
58
61
|
return h("div", {
|
|
59
62
|
"class": kendo_vue_common_1.classNames('k-scheduler-row', {
|
|
60
63
|
'k-middle-row': !((this.rootIndex + 1) % this.slotDivisions === 0)
|
|
@@ -78,14 +81,14 @@ var DayViewMiddleRowVue2 = {
|
|
|
78
81
|
group: slot.group,
|
|
79
82
|
range: slot.range,
|
|
80
83
|
isAllDay: slot.isAllDay,
|
|
81
|
-
|
|
84
|
+
slotRender: this.$props.slotRender,
|
|
82
85
|
viewSlot: this.$props.viewSlot,
|
|
83
86
|
form: this.$props.form,
|
|
84
87
|
row: this.rootIndex + MultiDayView_1.GRID_OFFSET,
|
|
85
88
|
col: this.timeRanges.length * (this.ri.groupIndex || 0) + rangeIndex,
|
|
86
|
-
isWorkHour: utils_1.isInTimeRange(slot.zonedStart,
|
|
87
|
-
isWorkDay: 0 <= slot.zonedStart.getDay() + (
|
|
88
|
-
editable:
|
|
89
|
+
isWorkHour: utils_1.isInTimeRange(slot.zonedStart, that.workDayStart, that.workDayEnd),
|
|
90
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart)) % that.numberOfDays <= that.workWeekEnd + (that.numberOfDays - workWeekStart),
|
|
91
|
+
editable: that.$props.editable
|
|
89
92
|
},
|
|
90
93
|
start: slot.start,
|
|
91
94
|
end: slot.end,
|
|
@@ -99,16 +102,16 @@ var DayViewMiddleRowVue2 = {
|
|
|
99
102
|
on: this.v3 ? undefined : {
|
|
100
103
|
"dataaction": this.handleDataAction
|
|
101
104
|
},
|
|
102
|
-
|
|
105
|
+
slotRender: this.$props.slotRender,
|
|
103
106
|
viewSlot: this.$props.viewSlot,
|
|
104
107
|
form: this.$props.form,
|
|
105
108
|
row: this.rootIndex + MultiDayView_1.GRID_OFFSET,
|
|
106
109
|
col: this.timeRanges.length * (this.ri.groupIndex || 0) + rangeIndex,
|
|
107
|
-
isWorkHour: utils_1.isInTimeRange(slot.zonedStart,
|
|
108
|
-
isWorkDay: 0 <= slot.zonedStart.getDay() + (
|
|
109
|
-
editable:
|
|
110
|
+
isWorkHour: utils_1.isInTimeRange(slot.zonedStart, that.workDayStart, that.workDayEnd),
|
|
111
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart)) % that.numberOfDays <= that.workWeekEnd + (that.numberOfDays - workWeekStart),
|
|
112
|
+
editable: that.$props.editable
|
|
110
113
|
});
|
|
111
|
-
},
|
|
114
|
+
}, that);
|
|
112
115
|
}, this)]);
|
|
113
116
|
},
|
|
114
117
|
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,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DayViewVerticalRowVue2 = exports.DayViewVerticalRow = void 0; // @ts-ignore
|
|
7
|
+
|
|
8
|
+
var Vue = require("vue");
|
|
9
|
+
|
|
10
|
+
var allVue = Vue;
|
|
11
|
+
var gh = allVue.h;
|
|
12
|
+
|
|
13
|
+
var MultiDayView_1 = require("./MultiDayView");
|
|
14
|
+
|
|
15
|
+
var SchedulerEditSlot_1 = require("../../slots/SchedulerEditSlot");
|
|
16
|
+
|
|
17
|
+
var DayViewAllDayRowContent_1 = require("./DayViewAllDayRowContent");
|
|
18
|
+
|
|
19
|
+
var FIRST_INDEX = 0; // tslint:enable:max-line-length
|
|
20
|
+
|
|
21
|
+
var DayViewVerticalRowVue2 = {
|
|
22
|
+
name: 'KendoDayViewVerticalRow',
|
|
23
|
+
props: {
|
|
24
|
+
dayRanges: Array,
|
|
25
|
+
daySlots: Array,
|
|
26
|
+
timeSlots: Array
|
|
27
|
+
},
|
|
28
|
+
inject: {
|
|
29
|
+
ri: {
|
|
30
|
+
default: null
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
setup: !gh ? undefined : function () {
|
|
35
|
+
var v3 = !!gh;
|
|
36
|
+
return {
|
|
37
|
+
v3: v3
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
// @ts-ignore
|
|
41
|
+
render: function render(createElement) {
|
|
42
|
+
var h = gh || createElement;
|
|
43
|
+
var EditSlot = this.$props.editSlot || SchedulerEditSlot_1.SchedulerEditSlot;
|
|
44
|
+
var groupIndex = this.ri.groupIndex;
|
|
45
|
+
var _a = this.$props,
|
|
46
|
+
timeSlots = _a.timeSlots,
|
|
47
|
+
daySlots = _a.daySlots;
|
|
48
|
+
return h("div", {
|
|
49
|
+
"class": "k-scheduler-row"
|
|
50
|
+
}, [h(DayViewAllDayRowContent_1.DayViewAllDayRowContent, {
|
|
51
|
+
groupIndex: groupIndex,
|
|
52
|
+
attrs: this.v3 ? undefined : {
|
|
53
|
+
groupIndex: groupIndex
|
|
54
|
+
}
|
|
55
|
+
}), this.dayRanges.map(function (_, rangeIndex) {
|
|
56
|
+
var groupOffset = timeSlots.filter(function (s) {
|
|
57
|
+
return s.group.index === groupIndex && s.range.index === FIRST_INDEX;
|
|
58
|
+
}).length;
|
|
59
|
+
return daySlots.filter(function (s) {
|
|
60
|
+
return s.group.index === groupIndex && s.range.index === rangeIndex;
|
|
61
|
+
}).map(function (slot, slotIndex) {
|
|
62
|
+
return h(EditSlot, {
|
|
63
|
+
slotRender: this.$props.slotRender,
|
|
64
|
+
attrs: this.v3 ? undefined : {
|
|
65
|
+
slotRender: this.$props.slotRender,
|
|
66
|
+
viewSlot: this.$props.viewSlot,
|
|
67
|
+
form: this.$props.form,
|
|
68
|
+
index: slot.index,
|
|
69
|
+
start: slot.start,
|
|
70
|
+
end: slot.end,
|
|
71
|
+
zonedStart: slot.zonedStart,
|
|
72
|
+
zonedEnd: slot.zonedEnd,
|
|
73
|
+
items: slot.items,
|
|
74
|
+
group: slot.group,
|
|
75
|
+
range: slot.range,
|
|
76
|
+
isAllDay: slot.isAllDay,
|
|
77
|
+
row: groupOffset * (groupIndex || 0) + (groupIndex || 0) * MultiDayView_1.GRID_OFFSET,
|
|
78
|
+
col: slotIndex,
|
|
79
|
+
expandable: true
|
|
80
|
+
},
|
|
81
|
+
viewSlot: this.$props.viewSlot,
|
|
82
|
+
form: this.$props.form,
|
|
83
|
+
index: slot.index,
|
|
84
|
+
start: slot.start,
|
|
85
|
+
end: slot.end,
|
|
86
|
+
zonedStart: slot.zonedStart,
|
|
87
|
+
zonedEnd: slot.zonedEnd,
|
|
88
|
+
items: slot.items,
|
|
89
|
+
group: slot.group,
|
|
90
|
+
range: slot.range,
|
|
91
|
+
isAllDay: slot.isAllDay,
|
|
92
|
+
onDataaction: this.handleDataAction,
|
|
93
|
+
on: this.v3 ? undefined : {
|
|
94
|
+
"dataaction": this.handleDataAction
|
|
95
|
+
},
|
|
96
|
+
key: slot.start.getTime() + ":" + slot.group.index,
|
|
97
|
+
"class": 'k-scheduler-alldays-slot',
|
|
98
|
+
row: groupOffset * (groupIndex || 0) + (groupIndex || 0) * MultiDayView_1.GRID_OFFSET,
|
|
99
|
+
col: slotIndex,
|
|
100
|
+
expandable: true
|
|
101
|
+
});
|
|
102
|
+
}, this);
|
|
103
|
+
}, this)]);
|
|
104
|
+
},
|
|
105
|
+
methods: {
|
|
106
|
+
handleDataAction: function handleDataAction(action) {
|
|
107
|
+
this.$emit('dataaction', action);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
exports.DayViewVerticalRowVue2 = DayViewVerticalRowVue2;
|
|
112
|
+
var DayViewVerticalRow = DayViewVerticalRowVue2;
|
|
113
|
+
exports.DayViewVerticalRow = DayViewVerticalRow;
|
|
@@ -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 };
|