@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
|
@@ -10,7 +10,7 @@ import { HorizontalResourceIterator } from '../common/HorizontalResourceIterator
|
|
|
10
10
|
import { TimelineViewRowContent } from './TimelineViewRowContent';
|
|
11
11
|
import { TimelineViewAllEventsRowContent } from './TimelineViewAllEventsRowContent';
|
|
12
12
|
import { VerticalResourceIterator } from '../common/VerticalResourceIterator';
|
|
13
|
-
import { mapItemsToSlots, mapSlotsToItems, isInTimeRange, toUTCDateTime,
|
|
13
|
+
import { mapItemsToSlots, mapSlotsToItems, isInTimeRange, toUTCDateTime, orderSort } from '../../utils';
|
|
14
14
|
import { toRanges } from '../../services/rangeService';
|
|
15
15
|
import { toSlots } from '../../services/slotsService';
|
|
16
16
|
import { toOccurrences } from '../../services/occurrenceService';
|
|
@@ -18,17 +18,7 @@ import { toItems } from '../../services/itemsService';
|
|
|
18
18
|
import { TimelineViewBody } from './TimelineViewBody';
|
|
19
19
|
import { BORDER_WIDTH } from '../../constants';
|
|
20
20
|
import { provideIntlService } from '@progress/kendo-vue-intl';
|
|
21
|
-
import { SchedulerEditItem } from '../../items/SchedulerEditItem';
|
|
22
|
-
// useSchedulerDataContext,
|
|
23
|
-
// useSchedulerPropsContext,
|
|
24
|
-
// useSchedulerGroupsContext,
|
|
25
|
-
// useSchedulerFieldsContext,
|
|
26
|
-
// useSchedulerDateRangeContext,
|
|
27
|
-
// useSchedulerOrientationContext
|
|
28
|
-
// } from '../../context/SchedulerContext';
|
|
29
|
-
|
|
30
|
-
import { SchedulerResourceIteratorContext } from '../../context/SchedulerResourceIteratorContext';
|
|
31
|
-
import { CurrentTimeMarker } from '../../components/CurrentTimeMarket';
|
|
21
|
+
import { SchedulerEditItem } from '../../items/SchedulerEditItem';
|
|
32
22
|
import { DateHeaderCell } from '../../components/DateHeaderCell';
|
|
33
23
|
import { TimeHeaderCell } from '../../components/TimeHeaderCell';
|
|
34
24
|
var TIME_FORMAT = 't';
|
|
@@ -49,6 +39,10 @@ var MultiDayTimelineViewVue2 = {
|
|
|
49
39
|
type: Boolean,
|
|
50
40
|
default: true
|
|
51
41
|
},
|
|
42
|
+
showWorkHours: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true
|
|
45
|
+
},
|
|
52
46
|
dateRange: {
|
|
53
47
|
type: [Function, Object],
|
|
54
48
|
default: function _default() {
|
|
@@ -170,15 +164,43 @@ var MultiDayTimelineViewVue2 = {
|
|
|
170
164
|
ranges: this.ranges
|
|
171
165
|
}).filter(function (item) {
|
|
172
166
|
return _this.viewStart.getTime() === _this.viewEnd.getTime() || isInTimeRange(item.zonedStart, _this.viewStart, _this.viewEnd) || isInTimeRange(item.zonedEnd, _this.viewStart, _this.viewEnd) || isInTimeRange(new Date(item.zonedEnd.getTime() - (item.zonedEnd.getTime() - item.zonedStart.getTime()) / 2), _this.viewStart, _this.viewEnd);
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
|
|
167
|
+
}); // mapItemsToSlots(items, this.timelineSlots, false);
|
|
168
|
+
// mapSlotsToItems(items, this.timelineSlots, false);
|
|
169
|
+
|
|
176
170
|
return items;
|
|
177
171
|
}
|
|
178
172
|
},
|
|
179
173
|
mounted: function mounted() {
|
|
180
174
|
this.timeRef = null;
|
|
181
175
|
this.bodyRef = null;
|
|
176
|
+
useCellSync({
|
|
177
|
+
element: this.$el,
|
|
178
|
+
selector: '.k-resource-cell',
|
|
179
|
+
attribute: 'data-depth-index',
|
|
180
|
+
explicitDepth: true
|
|
181
|
+
});
|
|
182
|
+
useRowSync({
|
|
183
|
+
element: this.$el,
|
|
184
|
+
selector: '.k-resource-row',
|
|
185
|
+
horizontalAttribute: 'data-depth-index',
|
|
186
|
+
verticalAttribute: 'data-resource-index',
|
|
187
|
+
applyTo: '.k-resource-cell'
|
|
188
|
+
});
|
|
189
|
+
},
|
|
190
|
+
updated: function updated() {
|
|
191
|
+
useCellSync({
|
|
192
|
+
element: this.$el,
|
|
193
|
+
selector: '.k-resource-cell',
|
|
194
|
+
attribute: 'data-depth-index',
|
|
195
|
+
explicitDepth: true
|
|
196
|
+
});
|
|
197
|
+
useRowSync({
|
|
198
|
+
element: this.$el,
|
|
199
|
+
selector: '.k-resource-row',
|
|
200
|
+
horizontalAttribute: 'data-depth-index',
|
|
201
|
+
verticalAttribute: 'data-resource-index',
|
|
202
|
+
applyTo: '.k-resource-cell'
|
|
203
|
+
});
|
|
182
204
|
},
|
|
183
205
|
// @ts-ignore
|
|
184
206
|
setup: !gh ? undefined : function () {
|
|
@@ -189,7 +211,7 @@ var MultiDayTimelineViewVue2 = {
|
|
|
189
211
|
},
|
|
190
212
|
// @ts-ignore
|
|
191
213
|
render: function render(createElement) {
|
|
192
|
-
var
|
|
214
|
+
var _this2 = this;
|
|
193
215
|
|
|
194
216
|
var h = gh || createElement; // const {
|
|
195
217
|
// group,
|
|
@@ -203,7 +225,11 @@ var MultiDayTimelineViewVue2 = {
|
|
|
203
225
|
var slotDuration = this.$props.slotDuration;
|
|
204
226
|
var workDayStart = intl.parseDate(this.$props.workDayStart);
|
|
205
227
|
var workDayEnd = intl.parseDate(this.$props.workDayEnd);
|
|
206
|
-
var
|
|
228
|
+
var items = this.items;
|
|
229
|
+
var timelineSlots = this.timelineSlots;
|
|
230
|
+
mapItemsToSlots(items, timelineSlots, true);
|
|
231
|
+
mapSlotsToItems(items, timelineSlots, true);
|
|
232
|
+
var width = (this.ks.orientation === 'horizontal' ? timelineSlots.length : timelineSlots.length / this.ks.groups.length) * (this.$props.columnWidth + BORDER_WIDTH);
|
|
207
233
|
var head = [h("div", {
|
|
208
234
|
"class": "k-scheduler-row"
|
|
209
235
|
}, [this.ranges.map(function (range, rangeIndex) {
|
|
@@ -226,7 +252,7 @@ var MultiDayTimelineViewVue2 = {
|
|
|
226
252
|
"class": "k-scheduler-row",
|
|
227
253
|
ref: 'timeRef'
|
|
228
254
|
}, [this.ranges.map(function (_, rangeIndex) {
|
|
229
|
-
return
|
|
255
|
+
return timelineSlots.filter(function (s) {
|
|
230
256
|
return s.group.index === FIRST_INDEX && s.range.index === rangeIndex;
|
|
231
257
|
}).map(function (slot) {
|
|
232
258
|
return slot.zonedStart.getMinutes() % slotDuration === 0 ? h(TimeHeaderCell, {
|
|
@@ -245,139 +271,342 @@ var MultiDayTimelineViewVue2 = {
|
|
|
245
271
|
}) : null;
|
|
246
272
|
}, this);
|
|
247
273
|
}, this)])];
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
selector: '.k-resource-cell',
|
|
251
|
-
attribute: 'data-depth-index',
|
|
252
|
-
explicitDepth: true
|
|
253
|
-
});
|
|
254
|
-
useRowSync({
|
|
255
|
-
element: this.$el,
|
|
256
|
-
selector: '.k-resource-row',
|
|
257
|
-
horizontalAttribute: 'data-depth-index',
|
|
258
|
-
verticalAttribute: 'data-resource-index',
|
|
259
|
-
applyTo: '.k-resource-cell'
|
|
260
|
-
});
|
|
261
|
-
return h(BaseView, {
|
|
262
|
-
id: this.$props.id,
|
|
263
|
-
attrs: this.v3 ? undefined : {
|
|
274
|
+
return (// @ts-ignore function children
|
|
275
|
+
h(BaseView, {
|
|
264
276
|
id: this.$props.id,
|
|
277
|
+
attrs: this.v3 ? undefined : {
|
|
278
|
+
id: this.$props.id,
|
|
279
|
+
props: this.$props,
|
|
280
|
+
baseSlots: timelineSlots,
|
|
281
|
+
ranges: this.ranges
|
|
282
|
+
},
|
|
283
|
+
"class": 'k-scheduler-timeline-view',
|
|
265
284
|
props: this.$props,
|
|
266
|
-
baseSlots:
|
|
285
|
+
baseSlots: timelineSlots,
|
|
267
286
|
ranges: this.ranges
|
|
268
|
-
},
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
287
|
+
}, this.v3 ? function () {
|
|
288
|
+
return [h("div", {
|
|
289
|
+
"class": 'k-scheduler-head',
|
|
290
|
+
style: {
|
|
291
|
+
width: width + 'px'
|
|
292
|
+
}
|
|
293
|
+
}, [_this2.ks.orientation === 'horizontal' ? // @ts-ignore function children
|
|
294
|
+
h(HorizontalResourceIterator, {
|
|
295
|
+
nested: true,
|
|
296
|
+
attrs: _this2.v3 ? undefined : {
|
|
297
|
+
nested: true,
|
|
298
|
+
group: _this2.ks.props.group,
|
|
299
|
+
resources: _this2.ks.props.resources,
|
|
300
|
+
rowContent: TimelineViewRowContent
|
|
301
|
+
},
|
|
302
|
+
group: _this2.ks.props.group,
|
|
303
|
+
resources: _this2.ks.props.resources,
|
|
304
|
+
rowContent: TimelineViewRowContent
|
|
305
|
+
}, _this2.v3 ? function () {
|
|
306
|
+
return [head];
|
|
307
|
+
} : [head]) : // @ts-ignore function children
|
|
308
|
+
h(VerticalResourceIterator, {
|
|
309
|
+
wrapGroup: true,
|
|
310
|
+
attrs: _this2.v3 ? undefined : {
|
|
311
|
+
wrapGroup: true,
|
|
312
|
+
group: _this2.ks.props.group,
|
|
313
|
+
resources: _this2.ks.props.resources
|
|
314
|
+
},
|
|
315
|
+
group: _this2.ks.props.group,
|
|
316
|
+
resources: _this2.ks.props.resources
|
|
317
|
+
}, _this2.v3 ? function () {
|
|
318
|
+
return [head];
|
|
319
|
+
} : [head])]), h("div", {
|
|
320
|
+
"class": "k-scheduler-body",
|
|
321
|
+
style: {
|
|
322
|
+
width: width + 'px'
|
|
323
|
+
},
|
|
324
|
+
ref: 'bodyRef'
|
|
325
|
+
}, [_this2.ks.orientation === 'horizontal' ? // @ts-ignore function children
|
|
326
|
+
h(HorizontalResourceIterator, {
|
|
327
|
+
group: _this2.ks.props.group,
|
|
328
|
+
attrs: _this2.v3 ? undefined : {
|
|
329
|
+
group: _this2.ks.props.group,
|
|
330
|
+
resources: _this2.ks.props.resources,
|
|
331
|
+
rowContent: TimelineViewAllEventsRowContent
|
|
332
|
+
},
|
|
333
|
+
resources: _this2.ks.props.resources,
|
|
334
|
+
rowContent: TimelineViewAllEventsRowContent
|
|
335
|
+
}, _this2.v3 ? function () {
|
|
336
|
+
return [// @ts-ignore function children
|
|
337
|
+
h(TimelineViewBody, {
|
|
338
|
+
ranges: _this2.ranges,
|
|
339
|
+
attrs: _this2.v3 ? undefined : {
|
|
340
|
+
ranges: _this2.ranges,
|
|
341
|
+
workDayStart: workDayStart,
|
|
342
|
+
workDayEnd: workDayEnd,
|
|
343
|
+
timelineSlots: timelineSlots
|
|
344
|
+
},
|
|
345
|
+
workDayStart: workDayStart,
|
|
346
|
+
workDayEnd: workDayEnd,
|
|
347
|
+
timelineSlots: timelineSlots,
|
|
348
|
+
onDataaction: _this2.handleDataAction,
|
|
349
|
+
on: _this2.v3 ? undefined : {
|
|
350
|
+
"dataaction": _this2.handleDataAction
|
|
351
|
+
}
|
|
352
|
+
})];
|
|
353
|
+
} : [h(TimelineViewBody, {
|
|
354
|
+
ranges: _this2.ranges,
|
|
355
|
+
attrs: _this2.v3 ? undefined : {
|
|
356
|
+
ranges: _this2.ranges,
|
|
357
|
+
workDayStart: workDayStart,
|
|
358
|
+
workDayEnd: workDayEnd,
|
|
359
|
+
timelineSlots: timelineSlots
|
|
360
|
+
},
|
|
361
|
+
workDayStart: workDayStart,
|
|
362
|
+
workDayEnd: workDayEnd,
|
|
363
|
+
timelineSlots: timelineSlots,
|
|
364
|
+
onDataaction: _this2.handleDataAction,
|
|
365
|
+
on: _this2.v3 ? undefined : {
|
|
366
|
+
"dataaction": _this2.handleDataAction
|
|
367
|
+
}
|
|
368
|
+
})]) : h(VerticalResourceIterator, {
|
|
369
|
+
nested: true,
|
|
370
|
+
attrs: _this2.v3 ? undefined : {
|
|
371
|
+
nested: true,
|
|
372
|
+
wrapGroup: true,
|
|
373
|
+
group: _this2.ks.props.group,
|
|
374
|
+
resources: _this2.ks.props.resources
|
|
375
|
+
},
|
|
376
|
+
wrapGroup: true,
|
|
377
|
+
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,
|
|
391
|
+
onDataaction: _this2.handleDataAction,
|
|
392
|
+
on: _this2.v3 ? undefined : {
|
|
393
|
+
"dataaction": _this2.handleDataAction
|
|
394
|
+
}
|
|
395
|
+
})]), items.sort(orderSort).map(function (item) {
|
|
396
|
+
return h(SchedulerEditItem, {
|
|
397
|
+
key: item.isRecurring ? item.uid + ":" + item.group.index + ":" + item.range.index + ":" + item.originalStart : item.uid + ":" + item.group.index + ":" + item.range.index,
|
|
398
|
+
uid: item.uid,
|
|
399
|
+
attrs: this.v3 ? undefined : {
|
|
400
|
+
uid: item.uid,
|
|
401
|
+
start: item.start,
|
|
402
|
+
end: item.end,
|
|
403
|
+
originalStart: item.originalStart,
|
|
404
|
+
startTimezone: item.startTimezone,
|
|
405
|
+
endTimezone: item.endTimezone,
|
|
406
|
+
isAllDay: item.isAllDay,
|
|
407
|
+
title: item.title,
|
|
408
|
+
description: item.description,
|
|
409
|
+
occurrenceId: item.occurrenceId,
|
|
410
|
+
recurrenceExceptions: item.recurrenceExceptions,
|
|
411
|
+
recurrenceRule: item.recurrenceRule,
|
|
412
|
+
recurrenceId: item.recurrenceId,
|
|
413
|
+
dataItem: item.dataItem,
|
|
414
|
+
itemRef: item.itemRef,
|
|
415
|
+
head: item.head,
|
|
416
|
+
tail: item.tail,
|
|
417
|
+
order: item.order,
|
|
418
|
+
zonedStart: item.zonedStart,
|
|
419
|
+
zonedEnd: item.zonedEnd,
|
|
420
|
+
slots: item.slots,
|
|
421
|
+
group: item.group,
|
|
422
|
+
range: item.range,
|
|
423
|
+
isException: item.isException,
|
|
424
|
+
isRecurring: item.isRecurring,
|
|
425
|
+
format: 't',
|
|
426
|
+
form: this.$props.form,
|
|
427
|
+
item: this.$props.item,
|
|
428
|
+
viewItem: this.$props.viewItem,
|
|
429
|
+
editable: this.$props.editable,
|
|
430
|
+
ignoreIsAllDay: true,
|
|
431
|
+
vertical: false
|
|
432
|
+
},
|
|
433
|
+
start: item.start,
|
|
434
|
+
end: item.end,
|
|
435
|
+
originalStart: item.originalStart,
|
|
436
|
+
startTimezone: item.startTimezone,
|
|
437
|
+
endTimezone: item.endTimezone,
|
|
438
|
+
isAllDay: item.isAllDay,
|
|
439
|
+
title: item.title,
|
|
440
|
+
description: item.description,
|
|
441
|
+
occurrenceId: item.occurrenceId,
|
|
442
|
+
recurrenceExceptions: item.recurrenceExceptions,
|
|
443
|
+
recurrenceRule: item.recurrenceRule,
|
|
444
|
+
recurrenceId: item.recurrenceId,
|
|
445
|
+
dataItem: item.dataItem,
|
|
446
|
+
itemRef: item.itemRef,
|
|
447
|
+
head: item.head,
|
|
448
|
+
tail: item.tail,
|
|
449
|
+
order: item.order,
|
|
450
|
+
zonedStart: item.zonedStart,
|
|
451
|
+
zonedEnd: item.zonedEnd,
|
|
452
|
+
slots: item.slots,
|
|
453
|
+
group: item.group,
|
|
454
|
+
range: item.range,
|
|
455
|
+
isException: item.isException,
|
|
456
|
+
isRecurring: item.isRecurring,
|
|
457
|
+
format: 't',
|
|
458
|
+
form: this.$props.form,
|
|
459
|
+
onDataaction: this.handleDataAction,
|
|
460
|
+
on: this.v3 ? undefined : {
|
|
461
|
+
"dataaction": this.handleDataAction
|
|
462
|
+
},
|
|
463
|
+
item: this.$props.item,
|
|
464
|
+
viewItem: this.$props.viewItem,
|
|
465
|
+
editable: this.$props.editable,
|
|
466
|
+
ignoreIsAllDay: true,
|
|
467
|
+
vertical: false
|
|
468
|
+
});
|
|
469
|
+
}, _this2)])];
|
|
470
|
+
} : [h("div", {
|
|
471
|
+
"class": 'k-scheduler-head',
|
|
472
|
+
style: {
|
|
473
|
+
width: width + 'px'
|
|
474
|
+
}
|
|
475
|
+
}, [_this2.ks.orientation === 'horizontal' ? h(HorizontalResourceIterator, {
|
|
281
476
|
nested: true,
|
|
282
|
-
|
|
283
|
-
|
|
477
|
+
attrs: _this2.v3 ? undefined : {
|
|
478
|
+
nested: true,
|
|
479
|
+
group: _this2.ks.props.group,
|
|
480
|
+
resources: _this2.ks.props.resources,
|
|
481
|
+
rowContent: TimelineViewRowContent
|
|
482
|
+
},
|
|
483
|
+
group: _this2.ks.props.group,
|
|
484
|
+
resources: _this2.ks.props.resources,
|
|
284
485
|
rowContent: TimelineViewRowContent
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
rowContent: TimelineViewRowContent
|
|
289
|
-
}, [head]) : h(VerticalResourceIterator, {
|
|
290
|
-
wrapGroup: true,
|
|
291
|
-
attrs: this.v3 ? undefined : {
|
|
486
|
+
}, _this2.v3 ? function () {
|
|
487
|
+
return [head];
|
|
488
|
+
} : [head]) : h(VerticalResourceIterator, {
|
|
292
489
|
wrapGroup: true,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
},
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
490
|
+
attrs: _this2.v3 ? undefined : {
|
|
491
|
+
wrapGroup: true,
|
|
492
|
+
group: _this2.ks.props.group,
|
|
493
|
+
resources: _this2.ks.props.resources
|
|
494
|
+
},
|
|
495
|
+
group: _this2.ks.props.group,
|
|
496
|
+
resources: _this2.ks.props.resources
|
|
497
|
+
}, _this2.v3 ? function () {
|
|
498
|
+
return [head];
|
|
499
|
+
} : [head])]), h("div", {
|
|
500
|
+
"class": "k-scheduler-body",
|
|
501
|
+
style: {
|
|
502
|
+
width: width + 'px'
|
|
503
|
+
},
|
|
504
|
+
ref: 'bodyRef'
|
|
505
|
+
}, [_this2.ks.orientation === 'horizontal' ? h(HorizontalResourceIterator, {
|
|
506
|
+
group: _this2.ks.props.group,
|
|
507
|
+
attrs: _this2.v3 ? undefined : {
|
|
508
|
+
group: _this2.ks.props.group,
|
|
509
|
+
resources: _this2.ks.props.resources,
|
|
510
|
+
rowContent: TimelineViewAllEventsRowContent
|
|
511
|
+
},
|
|
512
|
+
resources: _this2.ks.props.resources,
|
|
309
513
|
rowContent: TimelineViewAllEventsRowContent
|
|
310
|
-
},
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
514
|
+
}, _this2.v3 ? function () {
|
|
515
|
+
return [h(TimelineViewBody, {
|
|
516
|
+
ranges: _this2.ranges,
|
|
517
|
+
attrs: _this2.v3 ? undefined : {
|
|
518
|
+
ranges: _this2.ranges,
|
|
519
|
+
workDayStart: workDayStart,
|
|
520
|
+
workDayEnd: workDayEnd,
|
|
521
|
+
timelineSlots: timelineSlots
|
|
522
|
+
},
|
|
523
|
+
workDayStart: workDayStart,
|
|
524
|
+
workDayEnd: workDayEnd,
|
|
525
|
+
timelineSlots: timelineSlots,
|
|
526
|
+
onDataaction: _this2.handleDataAction,
|
|
527
|
+
on: _this2.v3 ? undefined : {
|
|
528
|
+
"dataaction": _this2.handleDataAction
|
|
529
|
+
}
|
|
530
|
+
})];
|
|
531
|
+
} : [h(TimelineViewBody, {
|
|
532
|
+
ranges: _this2.ranges,
|
|
533
|
+
attrs: _this2.v3 ? undefined : {
|
|
534
|
+
ranges: _this2.ranges,
|
|
535
|
+
workDayStart: workDayStart,
|
|
536
|
+
workDayEnd: workDayEnd,
|
|
537
|
+
timelineSlots: timelineSlots
|
|
538
|
+
},
|
|
318
539
|
workDayStart: workDayStart,
|
|
319
540
|
workDayEnd: workDayEnd,
|
|
320
|
-
timelineSlots:
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
on: this.v3 ? undefined : {
|
|
327
|
-
"dataaction": this.handleDataAction
|
|
328
|
-
}
|
|
329
|
-
}), h(SchedulerResourceIteratorContext.Consumer, [function (_a) {
|
|
330
|
-
var groupIndex = _a.groupIndex;
|
|
331
|
-
return _this.$props.currentTimeMarker && intersects(first(_this.ranges).start, last(_this.ranges).end, new Date(), new Date(), true) && h(CurrentTimeMarker, {
|
|
332
|
-
groupIndex: groupIndex,
|
|
333
|
-
attrs: this.v3 ? undefined : {
|
|
334
|
-
groupIndex: groupIndex,
|
|
335
|
-
attachArrow: 'timeRef',
|
|
336
|
-
vertical: true
|
|
337
|
-
},
|
|
338
|
-
attachArrow: 'timeRef',
|
|
339
|
-
vertical: true
|
|
340
|
-
});
|
|
341
|
-
}])]) : h(VerticalResourceIterator, {
|
|
342
|
-
nested: true,
|
|
343
|
-
attrs: this.v3 ? undefined : {
|
|
541
|
+
timelineSlots: timelineSlots,
|
|
542
|
+
onDataaction: _this2.handleDataAction,
|
|
543
|
+
on: _this2.v3 ? undefined : {
|
|
544
|
+
"dataaction": _this2.handleDataAction
|
|
545
|
+
}
|
|
546
|
+
})]) : h(VerticalResourceIterator, {
|
|
344
547
|
nested: true,
|
|
548
|
+
attrs: _this2.v3 ? undefined : {
|
|
549
|
+
nested: true,
|
|
550
|
+
wrapGroup: true,
|
|
551
|
+
group: _this2.ks.props.group,
|
|
552
|
+
resources: _this2.ks.props.resources
|
|
553
|
+
},
|
|
345
554
|
wrapGroup: true,
|
|
346
|
-
group:
|
|
347
|
-
resources:
|
|
348
|
-
},
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
range: this.range,
|
|
555
|
+
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
|
+
},
|
|
357
565
|
workDayStart: workDayStart,
|
|
358
566
|
workDayEnd: workDayEnd,
|
|
359
|
-
timelineSlots:
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
})]), this.ks.orientation === 'vertical' && this.$props.currentTimeMarker && intersects(first(this.ranges).start, last(this.ranges).end, new Date(), new Date(), true) && h(CurrentTimeMarker, {
|
|
369
|
-
attachArrow: 'timeRef',
|
|
370
|
-
attrs: this.v3 ? undefined : {
|
|
371
|
-
attachArrow: 'timeRef',
|
|
372
|
-
vertical: true
|
|
373
|
-
},
|
|
374
|
-
vertical: true
|
|
375
|
-
}), this.items.sort(orderSort).map(function (item) {
|
|
376
|
-
return h(SchedulerEditItem, {
|
|
377
|
-
key: item.isRecurring ? item.uid + ":" + item.group.index + ":" + item.range.index + ":" + item.originalStart : item.uid + ":" + item.group.index + ":" + item.range.index,
|
|
378
|
-
uid: item.uid,
|
|
379
|
-
attrs: this.v3 ? undefined : {
|
|
567
|
+
timelineSlots: timelineSlots,
|
|
568
|
+
onDataaction: _this2.handleDataAction,
|
|
569
|
+
on: _this2.v3 ? undefined : {
|
|
570
|
+
"dataaction": _this2.handleDataAction
|
|
571
|
+
}
|
|
572
|
+
})]), items.sort(orderSort).map(function (item) {
|
|
573
|
+
return h(SchedulerEditItem, {
|
|
574
|
+
key: item.isRecurring ? item.uid + ":" + item.group.index + ":" + item.range.index + ":" + item.originalStart : item.uid + ":" + item.group.index + ":" + item.range.index,
|
|
380
575
|
uid: item.uid,
|
|
576
|
+
attrs: this.v3 ? undefined : {
|
|
577
|
+
uid: item.uid,
|
|
578
|
+
start: item.start,
|
|
579
|
+
end: item.end,
|
|
580
|
+
originalStart: item.originalStart,
|
|
581
|
+
startTimezone: item.startTimezone,
|
|
582
|
+
endTimezone: item.endTimezone,
|
|
583
|
+
isAllDay: item.isAllDay,
|
|
584
|
+
title: item.title,
|
|
585
|
+
description: item.description,
|
|
586
|
+
occurrenceId: item.occurrenceId,
|
|
587
|
+
recurrenceExceptions: item.recurrenceExceptions,
|
|
588
|
+
recurrenceRule: item.recurrenceRule,
|
|
589
|
+
recurrenceId: item.recurrenceId,
|
|
590
|
+
dataItem: item.dataItem,
|
|
591
|
+
itemRef: item.itemRef,
|
|
592
|
+
head: item.head,
|
|
593
|
+
tail: item.tail,
|
|
594
|
+
order: item.order,
|
|
595
|
+
zonedStart: item.zonedStart,
|
|
596
|
+
zonedEnd: item.zonedEnd,
|
|
597
|
+
slots: item.slots,
|
|
598
|
+
group: item.group,
|
|
599
|
+
range: item.range,
|
|
600
|
+
isException: item.isException,
|
|
601
|
+
isRecurring: item.isRecurring,
|
|
602
|
+
format: 't',
|
|
603
|
+
form: this.$props.form,
|
|
604
|
+
item: this.$props.item,
|
|
605
|
+
viewItem: this.$props.viewItem,
|
|
606
|
+
editable: this.$props.editable,
|
|
607
|
+
ignoreIsAllDay: true,
|
|
608
|
+
vertical: false
|
|
609
|
+
},
|
|
381
610
|
start: item.start,
|
|
382
611
|
end: item.end,
|
|
383
612
|
originalStart: item.originalStart,
|
|
@@ -404,49 +633,18 @@ var MultiDayTimelineViewVue2 = {
|
|
|
404
633
|
isRecurring: item.isRecurring,
|
|
405
634
|
format: 't',
|
|
406
635
|
form: this.$props.form,
|
|
636
|
+
onDataaction: this.handleDataAction,
|
|
637
|
+
on: this.v3 ? undefined : {
|
|
638
|
+
"dataaction": this.handleDataAction
|
|
639
|
+
},
|
|
407
640
|
item: this.$props.item,
|
|
408
641
|
viewItem: this.$props.viewItem,
|
|
409
642
|
editable: this.$props.editable,
|
|
410
643
|
ignoreIsAllDay: true,
|
|
411
644
|
vertical: false
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
originalStart: item.originalStart,
|
|
416
|
-
startTimezone: item.startTimezone,
|
|
417
|
-
endTimezone: item.endTimezone,
|
|
418
|
-
isAllDay: item.isAllDay,
|
|
419
|
-
title: item.title,
|
|
420
|
-
description: item.description,
|
|
421
|
-
occurrenceId: item.occurrenceId,
|
|
422
|
-
recurrenceExceptions: item.recurrenceExceptions,
|
|
423
|
-
recurrenceRule: item.recurrenceRule,
|
|
424
|
-
recurrenceId: item.recurrenceId,
|
|
425
|
-
dataItem: item.dataItem,
|
|
426
|
-
itemRef: item.itemRef,
|
|
427
|
-
head: item.head,
|
|
428
|
-
tail: item.tail,
|
|
429
|
-
order: item.order,
|
|
430
|
-
zonedStart: item.zonedStart,
|
|
431
|
-
zonedEnd: item.zonedEnd,
|
|
432
|
-
slots: item.slots,
|
|
433
|
-
group: item.group,
|
|
434
|
-
range: item.range,
|
|
435
|
-
isException: item.isException,
|
|
436
|
-
isRecurring: item.isRecurring,
|
|
437
|
-
format: 't',
|
|
438
|
-
form: this.$props.form,
|
|
439
|
-
onDataaction: this.handleDataAction,
|
|
440
|
-
on: this.v3 ? undefined : {
|
|
441
|
-
"dataaction": this.handleDataAction
|
|
442
|
-
},
|
|
443
|
-
item: this.$props.item,
|
|
444
|
-
viewItem: this.$props.viewItem,
|
|
445
|
-
editable: this.$props.editable,
|
|
446
|
-
ignoreIsAllDay: true,
|
|
447
|
-
vertical: false
|
|
448
|
-
});
|
|
449
|
-
}, this)])]);
|
|
645
|
+
});
|
|
646
|
+
}, _this2)])])
|
|
647
|
+
);
|
|
450
648
|
},
|
|
451
649
|
methods: {
|
|
452
650
|
handleDataAction: function handleDataAction(action) {
|