@progress/kendo-vue-scheduler 3.0.9-dev.202202281506 → 3.0.9-dev.202203011321
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-vue-scheduler.js +2 -2
- package/dist/es/Scheduler.js +18 -23
- package/dist/es/components/header/view-selector/ViewSelectorList.js +2 -0
- package/dist/es/items/SchedulerViewItem.js +19 -3
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/views/agenda/AgendaView.js +12 -14
- package/dist/es/views/day/MultiDayView.js +4 -4
- package/dist/es/views/month/MonthView.js +3 -3
- package/dist/es/views/time/MultiDayTimelineView.js +373 -175
- package/dist/es/views/time/TimelineView.js +37 -6
- package/dist/npm/Scheduler.js +18 -23
- package/dist/npm/components/header/view-selector/ViewSelectorList.js +2 -0
- package/dist/npm/items/SchedulerViewItem.js +19 -3
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/views/agenda/AgendaView.js +12 -14
- package/dist/npm/views/day/MultiDayView.js +4 -4
- package/dist/npm/views/month/MonthView.js +3 -3
- package/dist/npm/views/time/MultiDayTimelineView.js +372 -176
- package/dist/npm/views/time/TimelineView.js +38 -6
- package/package.json +12 -12
|
@@ -3,7 +3,8 @@ import * as Vue from 'vue';
|
|
|
3
3
|
var allVue = Vue;
|
|
4
4
|
var gh = allVue.h;
|
|
5
5
|
var inject = allVue.inject;
|
|
6
|
-
import { MultiDayTimelineView } from './MultiDayTimelineView';
|
|
6
|
+
import { MultiDayTimelineView } from './MultiDayTimelineView';
|
|
7
|
+
import { Day } from '@progress/kendo-date-math'; // tslint:enable:max-line-length
|
|
7
8
|
|
|
8
9
|
var TimelineViewVue2 = {
|
|
9
10
|
name: 'KendoTimelineView',
|
|
@@ -23,9 +24,13 @@ var TimelineViewVue2 = {
|
|
|
23
24
|
dateRange: {
|
|
24
25
|
type: [Function, Object],
|
|
25
26
|
default: function _default() {
|
|
26
|
-
return MultiDayTimelineView.props.dateRange.default;
|
|
27
|
+
return MultiDayTimelineView.props.dateRange.default();
|
|
27
28
|
}
|
|
28
29
|
},
|
|
30
|
+
showWorkHours: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: true
|
|
33
|
+
},
|
|
29
34
|
selectedDateFormat: {
|
|
30
35
|
type: String,
|
|
31
36
|
default: '{0:D}'
|
|
@@ -50,14 +55,22 @@ var TimelineViewVue2 = {
|
|
|
50
55
|
type: String,
|
|
51
56
|
default: '00:00'
|
|
52
57
|
},
|
|
53
|
-
|
|
58
|
+
workDayStart: {
|
|
54
59
|
type: String,
|
|
55
60
|
default: '8:00'
|
|
56
61
|
},
|
|
57
|
-
|
|
62
|
+
workDayEnd: {
|
|
58
63
|
type: String,
|
|
59
64
|
default: '17:00'
|
|
60
65
|
},
|
|
66
|
+
workWeekStart: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: Day.Monday
|
|
69
|
+
},
|
|
70
|
+
workWeekEnd: {
|
|
71
|
+
type: Number,
|
|
72
|
+
default: Day.Friday
|
|
73
|
+
},
|
|
61
74
|
slotDivisions: {
|
|
62
75
|
type: Number,
|
|
63
76
|
default: 2
|
|
@@ -97,7 +110,16 @@ var TimelineViewVue2 = {
|
|
|
97
110
|
slotDivisions: this.$props.slotDivisions,
|
|
98
111
|
selectedDateFormat: this.$props.selectedDateFormat,
|
|
99
112
|
selectedShortDateFormat: this.$props.selectedShortDateFormat,
|
|
100
|
-
showWorkHours: this.$props.showWorkHours
|
|
113
|
+
showWorkHours: this.$props.showWorkHours,
|
|
114
|
+
columnWidth: this.$props.columnWidth,
|
|
115
|
+
title: this.$props.title,
|
|
116
|
+
currentTimeMarker: this.$props.currentTimeMarker,
|
|
117
|
+
startTime: this.$props.startTime,
|
|
118
|
+
endTime: this.$props.endTime,
|
|
119
|
+
workDayStart: this.$props.workDayStart,
|
|
120
|
+
workDayEnd: this.$props.workDayEnd,
|
|
121
|
+
workWeekStart: this.$props.workWeekStart,
|
|
122
|
+
workWeekEnd: this.$props.workWeekEnd
|
|
101
123
|
},
|
|
102
124
|
dateRange: this.$props.dateRange,
|
|
103
125
|
step: this.$props.step,
|
|
@@ -106,7 +128,16 @@ var TimelineViewVue2 = {
|
|
|
106
128
|
slotDivisions: this.$props.slotDivisions,
|
|
107
129
|
selectedDateFormat: this.$props.selectedDateFormat,
|
|
108
130
|
selectedShortDateFormat: this.$props.selectedShortDateFormat,
|
|
109
|
-
showWorkHours: this.$props.showWorkHours
|
|
131
|
+
showWorkHours: this.$props.showWorkHours,
|
|
132
|
+
columnWidth: this.$props.columnWidth,
|
|
133
|
+
title: this.$props.title,
|
|
134
|
+
currentTimeMarker: this.$props.currentTimeMarker,
|
|
135
|
+
startTime: this.$props.startTime,
|
|
136
|
+
endTime: this.$props.endTime,
|
|
137
|
+
workDayStart: this.$props.workDayStart,
|
|
138
|
+
workDayEnd: this.$props.workDayEnd,
|
|
139
|
+
workWeekStart: this.$props.workWeekStart,
|
|
140
|
+
workWeekEnd: this.$props.workWeekEnd
|
|
110
141
|
});
|
|
111
142
|
}
|
|
112
143
|
};
|
package/dist/npm/Scheduler.js
CHANGED
|
@@ -198,10 +198,7 @@ var SchedulerVue2 = {
|
|
|
198
198
|
},
|
|
199
199
|
watch: {
|
|
200
200
|
view: function view(newName) {
|
|
201
|
-
this.
|
|
202
|
-
this.ks.view = this.views.find(function (currentView) {
|
|
203
|
-
return currentView.name === newName;
|
|
204
|
-
}) || this.views[0] || h(DayView_1.DayView);
|
|
201
|
+
this.updatePassedState(newName);
|
|
205
202
|
}
|
|
206
203
|
},
|
|
207
204
|
// @ts-ignore
|
|
@@ -234,6 +231,7 @@ var SchedulerVue2 = {
|
|
|
234
231
|
var viewComponent = this.getViewComponentByName(this.ks.activeViewName || view.name);
|
|
235
232
|
|
|
236
233
|
var viewProps = __assign(__assign(__assign({}, this.$props), this.ks.view), {
|
|
234
|
+
showWorkHours: this.ks.showWorkHours,
|
|
237
235
|
dataItems: undefined,
|
|
238
236
|
views: undefined,
|
|
239
237
|
defaultDate: undefined,
|
|
@@ -1109,20 +1107,7 @@ var SchedulerVue2 = {
|
|
|
1109
1107
|
}
|
|
1110
1108
|
},
|
|
1111
1109
|
handleActiveViewNameChange: function handleActiveViewNameChange(newView, event) {
|
|
1112
|
-
this.
|
|
1113
|
-
this.ks.view = this.views.find(function (currentView) {
|
|
1114
|
-
return currentView.name === newView;
|
|
1115
|
-
}) || this.views[0] || h(DayView_1.DayView);
|
|
1116
|
-
this.ks.dateFormat = this.getViewPropValue(this.ks.view, 'selectedDateFormat', newView) || DEFAULT_DATE_FORMAT;
|
|
1117
|
-
this.ks.shortDateFormat = this.getViewPropValue(this.ks.view, 'selectedShortDateFormat', newView) || DEFAULT_SHORT_DATE_FORMAT;
|
|
1118
|
-
this.ks.dateRange = this.getViewComponentByName(newView).props.dateRange.default()({
|
|
1119
|
-
intl: this.intl,
|
|
1120
|
-
date: this.ks.currentDate,
|
|
1121
|
-
timezone: this.$props.timezone,
|
|
1122
|
-
numberOfDays: this.getViewPropValue(this.ks.view, 'numberOfDays', this.ks.activeViewName),
|
|
1123
|
-
workWeekStart: this.getViewPropValue(this.ks.view, 'workWeekStart', this.ks.activeViewName) || this.intl.firstDay(),
|
|
1124
|
-
workWeekEnd: this.getViewPropValue(this.ks.view, 'workWeekEnd', this.ks.activeViewName) || (this.intl.firstDay() + this.getViewPropValue(this.ks.view, 'numberOfDays', this.ks.activeViewName)) % 6
|
|
1125
|
-
});
|
|
1110
|
+
this.updatePassedState(newView);
|
|
1126
1111
|
this.$emit('viewchange', __assign(__assign({
|
|
1127
1112
|
viewName: newView
|
|
1128
1113
|
}, event), {
|
|
@@ -1178,7 +1163,21 @@ var SchedulerVue2 = {
|
|
|
1178
1163
|
},
|
|
1179
1164
|
setDate: function setDate(newDate, event) {
|
|
1180
1165
|
this.ks.currentDate = newDate;
|
|
1181
|
-
this.
|
|
1166
|
+
this.updatePassedState();
|
|
1167
|
+
this.$emit('datechange', {
|
|
1168
|
+
date: newDate,
|
|
1169
|
+
event: event
|
|
1170
|
+
});
|
|
1171
|
+
},
|
|
1172
|
+
updatePassedState: function updatePassedState(newViewName) {
|
|
1173
|
+
var newView = newViewName || this.ks.activeViewName;
|
|
1174
|
+
this.ks.activeViewName = newView;
|
|
1175
|
+
this.ks.view = this.views.find(function (currentView) {
|
|
1176
|
+
return currentView.name === newView;
|
|
1177
|
+
}) || this.views[0] || h(DayView_1.DayView);
|
|
1178
|
+
this.ks.dateFormat = this.getViewPropValue(this.ks.view, 'selectedDateFormat', newView) || DEFAULT_DATE_FORMAT;
|
|
1179
|
+
this.ks.shortDateFormat = this.getViewPropValue(this.ks.view, 'selectedShortDateFormat', newView) || DEFAULT_SHORT_DATE_FORMAT;
|
|
1180
|
+
this.ks.dateRange = this.getViewComponentByName(newView).props.dateRange.default()({
|
|
1182
1181
|
intl: this.intl,
|
|
1183
1182
|
date: this.ks.currentDate,
|
|
1184
1183
|
timezone: this.$props.timezone,
|
|
@@ -1186,10 +1185,6 @@ var SchedulerVue2 = {
|
|
|
1186
1185
|
workWeekStart: this.getViewPropValue(this.ks.view, 'workWeekStart', this.ks.activeViewName) || this.intl.firstDay(),
|
|
1187
1186
|
workWeekEnd: this.getViewPropValue(this.ks.view, 'workWeekEnd', this.ks.activeViewName) || (this.intl.firstDay() + this.getViewPropValue(this.ks.view, 'numberOfDays', this.ks.activeViewName)) % 6
|
|
1188
1187
|
});
|
|
1189
|
-
this.$emit('datechange', {
|
|
1190
|
-
date: newDate,
|
|
1191
|
-
event: event
|
|
1192
|
-
});
|
|
1193
1188
|
}
|
|
1194
1189
|
}
|
|
1195
1190
|
};
|
|
@@ -104,6 +104,7 @@ var ViewSelectorListVue2 = {
|
|
|
104
104
|
items: views.map(function (v) {
|
|
105
105
|
return __assign(__assign({}, v.props), {
|
|
106
106
|
selected: v.name === this.ks.activeViewName,
|
|
107
|
+
name: v.name,
|
|
107
108
|
title: v.title || v.name
|
|
108
109
|
});
|
|
109
110
|
}, this),
|
|
@@ -116,6 +117,7 @@ var ViewSelectorListVue2 = {
|
|
|
116
117
|
items: views.map(function (v) {
|
|
117
118
|
return __assign(__assign({}, v.props), {
|
|
118
119
|
selected: v.name === this.ks.activeViewName,
|
|
120
|
+
name: v.name,
|
|
119
121
|
title: v.title || v.name
|
|
120
122
|
});
|
|
121
123
|
}, this),
|
|
@@ -125,6 +125,13 @@ var SchedulerViewItemVue2 = {
|
|
|
125
125
|
updated: function updated() {
|
|
126
126
|
this.align();
|
|
127
127
|
this.position();
|
|
128
|
+
|
|
129
|
+
if (!this.ks.scheduler || this.observer) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
this.observer = new window.ResizeObserver(this.handleResize);
|
|
134
|
+
this.observer.observe(this.ks.scheduler);
|
|
128
135
|
},
|
|
129
136
|
destroyed: !!gh ? undefined : function () {
|
|
130
137
|
if (this.observer) {
|
|
@@ -330,7 +337,13 @@ var SchedulerViewItemVue2 = {
|
|
|
330
337
|
return;
|
|
331
338
|
}
|
|
332
339
|
|
|
333
|
-
var firstSlot = utils_1.first(slots)
|
|
340
|
+
var firstSlot = utils_1.first(slots.sort(function (a, b) {
|
|
341
|
+
if (a.$props.start && b.$props.start) {
|
|
342
|
+
return a.$props.start.getTime() - b.$props.start.getTime();
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return true;
|
|
346
|
+
}));
|
|
334
347
|
|
|
335
348
|
if (!firstSlot) {
|
|
336
349
|
return;
|
|
@@ -374,7 +387,10 @@ var SchedulerViewItemVue2 = {
|
|
|
374
387
|
var rect = utils_2.getRect(element);
|
|
375
388
|
siblingsPerSlot.forEach(function (slot) {
|
|
376
389
|
var currentOffset = 0;
|
|
377
|
-
slot.
|
|
390
|
+
var currentSlot = slot.sort(function (a, b) {
|
|
391
|
+
return a.$props.order - b.$props.order;
|
|
392
|
+
});
|
|
393
|
+
currentSlot.forEach(function (current) {
|
|
378
394
|
if (utils_1.intersects(current.$props.start, current.$props.end, _this.$props.start, _this.$props.end) && !(_this.$props.dragHint || _this.$props.resizeHint) && current.$props.maxSiblingsPerSlot && current.$props.maxSiblingsPerSlot > mostSiblingsInSlot && current.$el !== element) {
|
|
379
395
|
mostSiblingsInSlot = current.$props.maxSiblingsPerSlot;
|
|
380
396
|
}
|
|
@@ -382,7 +398,7 @@ var SchedulerViewItemVue2 = {
|
|
|
382
398
|
var currentRect = utils_2.getRect(current.$el);
|
|
383
399
|
|
|
384
400
|
if (current.$props.order !== null && current.$props.order < order) {
|
|
385
|
-
currentOffset = currentRect.top + currentRect.height - rect.top - constants_1.BORDER_WIDTH * order + ITEMS_SPACING;
|
|
401
|
+
currentOffset = (currentRect.top || rect.top) + currentRect.height - rect.top - constants_1.BORDER_WIDTH * order + ITEMS_SPACING;
|
|
386
402
|
}
|
|
387
403
|
});
|
|
388
404
|
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-vue-scheduler',
|
|
9
9
|
productName: 'Kendo UI for Vue',
|
|
10
10
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1646140644,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
14
14
|
};
|
|
@@ -149,6 +149,8 @@ var AgendaViewVue2 = {
|
|
|
149
149
|
groups: this.ks.groups,
|
|
150
150
|
ranges: this.ranges
|
|
151
151
|
});
|
|
152
|
+
utils_1.mapItemsToSlots(items, this.agendaSlots, true);
|
|
153
|
+
utils_1.mapSlotsToItems(items, this.agendaSlots, true);
|
|
152
154
|
return items;
|
|
153
155
|
}
|
|
154
156
|
},
|
|
@@ -168,22 +170,18 @@ var AgendaViewVue2 = {
|
|
|
168
170
|
var EditSlot = this.$props.editSlot || SchedulerEditSlot_1.SchedulerEditSlot;
|
|
169
171
|
var intl = kendo_vue_intl_1.provideIntlService(this);
|
|
170
172
|
var localization = kendo_vue_intl_1.provideLocalizationService(this);
|
|
171
|
-
var items = this.items;
|
|
172
|
-
var agendaSlots = this.agendaSlots;
|
|
173
|
-
utils_1.mapItemsToSlots(items, agendaSlots, true);
|
|
174
|
-
utils_1.mapSlotsToItems(items, agendaSlots, true);
|
|
175
173
|
return (// @ts-ignore function children
|
|
176
174
|
h(BaseView_1.BaseView, {
|
|
177
175
|
id: this.$props.id,
|
|
178
176
|
attrs: this.v3 ? undefined : {
|
|
179
177
|
id: this.$props.id,
|
|
180
178
|
props: this.$props,
|
|
181
|
-
baseSlots: items,
|
|
179
|
+
baseSlots: this.items,
|
|
182
180
|
ranges: this.ranges
|
|
183
181
|
},
|
|
184
182
|
"class": 'k-scheduler-agendaview',
|
|
185
183
|
props: this.$props,
|
|
186
|
-
baseSlots: items,
|
|
184
|
+
baseSlots: this.items,
|
|
187
185
|
ranges: this.ranges
|
|
188
186
|
}, this.v3 ? function () {
|
|
189
187
|
return [h("div", {
|
|
@@ -210,15 +208,15 @@ var AgendaViewVue2 = {
|
|
|
210
208
|
nested: true
|
|
211
209
|
}, _this.v3 ? function () {
|
|
212
210
|
return [h(AgendaViewBody_1.AgendaViewBody, {
|
|
213
|
-
agendaSlots: agendaSlots,
|
|
211
|
+
agendaSlots: _this.agendaSlots,
|
|
214
212
|
attrs: _this.v3 ? undefined : {
|
|
215
|
-
agendaSlots: agendaSlots
|
|
213
|
+
agendaSlots: _this.agendaSlots
|
|
216
214
|
}
|
|
217
215
|
})];
|
|
218
216
|
} : [h(AgendaViewBody_1.AgendaViewBody, {
|
|
219
|
-
agendaSlots: agendaSlots,
|
|
217
|
+
agendaSlots: _this.agendaSlots,
|
|
220
218
|
attrs: _this.v3 ? undefined : {
|
|
221
|
-
agendaSlots: agendaSlots
|
|
219
|
+
agendaSlots: _this.agendaSlots
|
|
222
220
|
}
|
|
223
221
|
})])];
|
|
224
222
|
} : [h("div", {
|
|
@@ -243,15 +241,15 @@ var AgendaViewVue2 = {
|
|
|
243
241
|
nested: true
|
|
244
242
|
}, _this.v3 ? function () {
|
|
245
243
|
return [h(AgendaViewBody_1.AgendaViewBody, {
|
|
246
|
-
agendaSlots: agendaSlots,
|
|
244
|
+
agendaSlots: _this.agendaSlots,
|
|
247
245
|
attrs: _this.v3 ? undefined : {
|
|
248
|
-
agendaSlots: agendaSlots
|
|
246
|
+
agendaSlots: _this.agendaSlots
|
|
249
247
|
}
|
|
250
248
|
})];
|
|
251
249
|
} : [h(AgendaViewBody_1.AgendaViewBody, {
|
|
252
|
-
agendaSlots: agendaSlots,
|
|
250
|
+
agendaSlots: _this.agendaSlots,
|
|
253
251
|
attrs: _this.v3 ? undefined : {
|
|
254
|
-
agendaSlots: agendaSlots
|
|
252
|
+
agendaSlots: _this.agendaSlots
|
|
255
253
|
}
|
|
256
254
|
})])])
|
|
257
255
|
);
|
|
@@ -255,6 +255,8 @@ var MultiDayViewVue2 = {
|
|
|
255
255
|
groups: this.ks.groups,
|
|
256
256
|
ranges: this.dayRanges
|
|
257
257
|
});
|
|
258
|
+
utils_1.mapItemsToSlots(dayItems, this.daySlots, false);
|
|
259
|
+
utils_1.mapSlotsToItems(dayItems, this.daySlots, false);
|
|
258
260
|
return dayItems;
|
|
259
261
|
},
|
|
260
262
|
timeItems: function timeItems() {
|
|
@@ -268,6 +270,8 @@ var MultiDayViewVue2 = {
|
|
|
268
270
|
}).filter(function (item) {
|
|
269
271
|
return _this.viewStart.getTime() === _this.viewEnd.getTime() || utils_1.isInTimeRange(item.zonedStart, _this.viewStart, _this.viewEnd) || utils_1.isInTimeRange(item.zonedEnd, _this.viewStart, _this.viewEnd) || utils_1.isInTimeRange(new Date(item.zonedEnd.getTime() - (item.zonedEnd.getTime() - item.zonedStart.getTime()) / 2), _this.viewStart, _this.viewEnd);
|
|
270
272
|
});
|
|
273
|
+
utils_1.mapItemsToSlots(timeItems, this.timeSlots, false);
|
|
274
|
+
utils_1.mapSlotsToItems(timeItems, this.timeSlots, false);
|
|
271
275
|
return timeItems;
|
|
272
276
|
}
|
|
273
277
|
},
|
|
@@ -306,10 +310,6 @@ var MultiDayViewVue2 = {
|
|
|
306
310
|
var timeItems = this.timeItems;
|
|
307
311
|
var daySlots = this.daySlots;
|
|
308
312
|
var timeSlots = this.timeSlots;
|
|
309
|
-
utils_1.mapItemsToSlots(dayItems, daySlots, false);
|
|
310
|
-
utils_1.mapSlotsToItems(dayItems, daySlots, false);
|
|
311
|
-
utils_1.mapItemsToSlots(timeItems, timeSlots, false);
|
|
312
|
-
utils_1.mapSlotsToItems(timeItems, timeSlots, false);
|
|
313
313
|
return (// @ts-ignore function children
|
|
314
314
|
h(BaseView_1.BaseView, {
|
|
315
315
|
id: this.$props.id,
|
|
@@ -129,6 +129,8 @@ var MonthViewVue2 = {
|
|
|
129
129
|
groups: this.ks.groups,
|
|
130
130
|
ranges: this.ranges
|
|
131
131
|
});
|
|
132
|
+
utils_1.mapItemsToSlots(items, this.monthSlots, false);
|
|
133
|
+
utils_1.mapSlotsToItems(items, this.monthSlots, false);
|
|
132
134
|
return items;
|
|
133
135
|
}
|
|
134
136
|
},
|
|
@@ -154,9 +156,7 @@ var MonthViewVue2 = {
|
|
|
154
156
|
var EditItem = this.$props.editItem || SchedulerEditItem_1.SchedulerEditItem;
|
|
155
157
|
var EditSlot = this.$props.editSlot || SchedulerEditSlot_1.SchedulerEditSlot;
|
|
156
158
|
var items = this.items;
|
|
157
|
-
var monthSlots = this.monthSlots;
|
|
158
|
-
utils_1.mapItemsToSlots(items, monthSlots, false);
|
|
159
|
-
utils_1.mapSlotsToItems(items, monthSlots, false); // const [dataItems] = useSchedulerDataContext();
|
|
159
|
+
var monthSlots = this.monthSlots; // const [dataItems] = useSchedulerDataContext();
|
|
160
160
|
// const [, setDate] = useSchedulerDateContext();
|
|
161
161
|
// const [, setView] = useSchedulerActiveViewContext();
|
|
162
162
|
// const views = useSchedulerViewsContext();
|