@progress/kendo-vue-scheduler 3.7.4-dev.202211041243 → 3.7.4-dev.202211280833
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 +1 -1
- package/dist/es/Scheduler.js +1 -1
- package/dist/es/components/header/navigation/NavigationDatePicker.js +6 -4
- package/dist/es/items/SchedulerViewItem.js +9 -5
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/slots/SchedulerSlot.js +9 -1
- package/dist/es/slots/SchedulerViewSlot.js +5 -3
- package/dist/es/views/agenda/AgendaViewBody.js +10 -6
- package/dist/es/views/common/HorizontalResourceIterator.js +3 -3
- package/dist/es/views/common/VerticalResourceIterator.js +3 -2
- package/dist/es/views/common/utils.js +7 -0
- package/dist/es/views/day/DayViewAllDaySlots.js +5 -5
- package/dist/es/views/day/MultiDayView.js +10 -6
- package/dist/es/views/month/MonthView.js +6 -6
- package/dist/es/views/time/MultiDayTimelineView.js +4 -5
- package/dist/esm/Scheduler.js +1 -1
- package/dist/esm/components/header/navigation/NavigationDatePicker.js +6 -4
- package/dist/esm/items/SchedulerViewItem.js +9 -5
- package/dist/esm/package-metadata.js +1 -1
- package/dist/esm/slots/SchedulerSlot.js +9 -1
- package/dist/esm/slots/SchedulerViewSlot.js +5 -3
- package/dist/esm/views/agenda/AgendaViewBody.js +10 -6
- package/dist/esm/views/common/HorizontalResourceIterator.js +3 -3
- package/dist/esm/views/common/VerticalResourceIterator.js +3 -2
- package/dist/esm/views/common/utils.js +7 -0
- package/dist/esm/views/day/DayViewAllDaySlots.js +5 -5
- package/dist/esm/views/day/MultiDayView.js +10 -6
- package/dist/esm/views/month/MonthView.js +6 -6
- package/dist/esm/views/time/MultiDayTimelineView.js +4 -5
- package/dist/npm/Scheduler.js +1 -1
- package/dist/npm/components/header/navigation/NavigationDatePicker.js +6 -4
- package/dist/npm/items/SchedulerViewItem.js +8 -4
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/slots/SchedulerSlot.js +9 -1
- package/dist/npm/slots/SchedulerViewSlot.js +4 -2
- package/dist/npm/views/agenda/AgendaViewBody.js +10 -6
- package/dist/npm/views/common/HorizontalResourceIterator.js +3 -3
- package/dist/npm/views/common/VerticalResourceIterator.js +3 -2
- package/dist/npm/views/common/utils.js +7 -0
- package/dist/npm/views/day/DayViewAllDaySlots.js +5 -5
- package/dist/npm/views/day/MultiDayView.js +10 -6
- package/dist/npm/views/month/MonthView.js +6 -6
- package/dist/npm/views/time/MultiDayTimelineView.js +4 -5
- package/package.json +12 -12
|
@@ -3,14 +3,10 @@ import * as Vue from 'vue';
|
|
|
3
3
|
var allVue = Vue;
|
|
4
4
|
var gh = allVue.h;
|
|
5
5
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
6
|
-
var inject = allVue.inject;
|
|
7
6
|
import { SchedulerEditSlot } from '../../slots/SchedulerEditSlot.js';
|
|
8
7
|
import { provideIntlService, provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
9
8
|
import { SchedulerEditTask } from '../../tasks/SchedulerEditTask.js';
|
|
10
9
|
import { messages, noEvents, allDay } from '../../messages/main.js';
|
|
11
|
-
var DAY_FORMAT = {
|
|
12
|
-
skeleton: 'dd'
|
|
13
|
-
};
|
|
14
10
|
/**
|
|
15
11
|
* @hidden
|
|
16
12
|
*/
|
|
@@ -38,6 +34,14 @@ var AgendaViewBodyVue2 = {
|
|
|
38
34
|
default: null
|
|
39
35
|
}
|
|
40
36
|
},
|
|
37
|
+
data: function data() {
|
|
38
|
+
return {
|
|
39
|
+
hasMounted: false
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
mounted: function mounted() {
|
|
43
|
+
this.hasMounted = true;
|
|
44
|
+
},
|
|
41
45
|
// @ts-ignore
|
|
42
46
|
setup: !isV3 ? undefined : function () {
|
|
43
47
|
var v3 = !!isV3;
|
|
@@ -55,7 +59,7 @@ var AgendaViewBodyVue2 = {
|
|
|
55
59
|
var localization = provideLocalizationService(this);
|
|
56
60
|
return h("div", {
|
|
57
61
|
"class": "k-scheduler-body"
|
|
58
|
-
}, [
|
|
62
|
+
}, [this.items.length && this.agendaSlots.filter(function (slot) {
|
|
59
63
|
return slot.group.index === (_this.ri.groupIndex || 0);
|
|
60
64
|
}).map(function (slot, slotIndex, filtered) {
|
|
61
65
|
var _this2 = this;
|
|
@@ -114,7 +118,7 @@ var AgendaViewBodyVue2 = {
|
|
|
114
118
|
"class": "k-scheduler-agendadate"
|
|
115
119
|
}, [_this2.intl.formatDate(slot.zonedStart, 'y')])])]), h("div", {
|
|
116
120
|
"class": "k-scheduler-cell k-group-content"
|
|
117
|
-
}, [slot.items.length ? slot.items.map(function (item, itemIndex) {
|
|
121
|
+
}, [this.hasMounted && slot.items.length ? slot.items.map(function (item, itemIndex) {
|
|
118
122
|
return h("div", {
|
|
119
123
|
"class": "k-scheduler-row",
|
|
120
124
|
key: itemIndex
|
|
@@ -36,6 +36,7 @@ var HorizontalResourceIteratorVue2 = {
|
|
|
36
36
|
// @ts-ignore
|
|
37
37
|
render: function render(createElement) {
|
|
38
38
|
var h = gh || createElement;
|
|
39
|
+
var that = this;
|
|
39
40
|
var _a = this.$props,
|
|
40
41
|
nested = _a.nested,
|
|
41
42
|
rowContentProps = _a.rowContentProps;
|
|
@@ -45,7 +46,6 @@ var HorizontalResourceIteratorVue2 = {
|
|
|
45
46
|
var defaultSlot = getDefaultSlots(this);
|
|
46
47
|
var groupIndex = 0;
|
|
47
48
|
var renderResources = function renderResources(args) {
|
|
48
|
-
var children = args.children;
|
|
49
49
|
var deepestResources = expandResources(args.resources, args.resources.length - 1);
|
|
50
50
|
var ChildRowContent = args.childRowContent;
|
|
51
51
|
var hasGroups = args.resources.length > 0;
|
|
@@ -76,8 +76,8 @@ var HorizontalResourceIteratorVue2 = {
|
|
|
76
76
|
},
|
|
77
77
|
groupIndex: hasGroups ? cGroupIndex : 0
|
|
78
78
|
}, this.v3 ? function () {
|
|
79
|
-
return [
|
|
80
|
-
} : [
|
|
79
|
+
return [getDefaultSlots(that)];
|
|
80
|
+
} : [getDefaultSlots(that)])
|
|
81
81
|
);
|
|
82
82
|
}, this)]);
|
|
83
83
|
};
|
|
@@ -33,6 +33,7 @@ var VerticalResourceIteratorVue2 = {
|
|
|
33
33
|
// @ts-ignore
|
|
34
34
|
render: function render(createElement) {
|
|
35
35
|
var h = gh || createElement;
|
|
36
|
+
var that = this;
|
|
36
37
|
var defaultSlot = getDefaultSlots(this);
|
|
37
38
|
var _a = this.$props,
|
|
38
39
|
nested = _a.nested,
|
|
@@ -169,8 +170,8 @@ var VerticalResourceIteratorVue2 = {
|
|
|
169
170
|
resource: args.resources[args.depth],
|
|
170
171
|
groupIndex: hasGroups ? args.groupIndex : 0
|
|
171
172
|
}, this.v3 ? function () {
|
|
172
|
-
return [
|
|
173
|
-
} : [
|
|
173
|
+
return [getDefaultSlots(that)];
|
|
174
|
+
} : [getDefaultSlots(that)]), renderMore.call(this, args.resources[args.depth], hasGroups ? args.groupIndex : 0)];
|
|
174
175
|
}
|
|
175
176
|
var dataLength = args.resources[args.depth].data.length;
|
|
176
177
|
return args.resources[args.depth].data.map(function (dataItem, dataIndex) {
|
|
@@ -18,6 +18,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
18
18
|
}
|
|
19
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
20
|
};
|
|
21
|
+
import { canUseDOM } from '@progress/kendo-vue-common';
|
|
21
22
|
/** @hidden */
|
|
22
23
|
export var last = function (arr) { return arr[arr.length - 1]; };
|
|
23
24
|
/** @hidden */
|
|
@@ -156,12 +157,18 @@ export var getRect = function (el) {
|
|
|
156
157
|
/** @hidden */
|
|
157
158
|
export var getPadding = function (el, horizontal) {
|
|
158
159
|
if (horizontal === void 0) { horizontal = false; }
|
|
160
|
+
if (!canUseDOM) {
|
|
161
|
+
return 0;
|
|
162
|
+
}
|
|
159
163
|
return parseFloat(window.getComputedStyle(el)[horizontal ? 'paddingLeft' : 'paddingTop'] || '0')
|
|
160
164
|
+ parseFloat(window.getComputedStyle(el)[horizontal ? 'paddingRight' : 'paddingBottom'] || '0');
|
|
161
165
|
};
|
|
162
166
|
/** @hidden */
|
|
163
167
|
export var getBorders = function (el, horizontal) {
|
|
164
168
|
if (horizontal === void 0) { horizontal = false; }
|
|
169
|
+
if (!canUseDOM) {
|
|
170
|
+
return 0;
|
|
171
|
+
}
|
|
165
172
|
return parseFloat(window.getComputedStyle(el)[horizontal ? 'borderLeftWidth' : 'borderTopWidth'] || '0')
|
|
166
173
|
+ parseFloat(window.getComputedStyle(el)[horizontal ? 'borderRightWidth' : 'borderBottomWidth'] || '0');
|
|
167
174
|
};
|
|
@@ -43,13 +43,13 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
43
43
|
numberOfDays = _a.numberOfDays,
|
|
44
44
|
workWeekStart = _a.workWeekStart,
|
|
45
45
|
workWeekEnd = _a.workWeekEnd;
|
|
46
|
+
var groupIndex = this.ri.groupIndex;
|
|
46
47
|
return h("div", {
|
|
47
|
-
key:
|
|
48
|
+
key: groupIndex,
|
|
48
49
|
"class": "k-scheduler-row"
|
|
49
50
|
}, [this.dayRanges.map(function (_, rangeIndex) {
|
|
50
|
-
var _this = this;
|
|
51
51
|
return this.daySlots.filter(function (s) {
|
|
52
|
-
return s.group.index ===
|
|
52
|
+
return s.group.index === groupIndex && s.range.index === rangeIndex;
|
|
53
53
|
}).map(function (slot, slotIndex, filtered) {
|
|
54
54
|
return h(SchedulerEditSlot, {
|
|
55
55
|
index: slot.index,
|
|
@@ -67,7 +67,7 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
67
67
|
slotRender: this.$props.slotRender,
|
|
68
68
|
viewSlot: this.$props.viewSlot,
|
|
69
69
|
row: 0,
|
|
70
|
-
col: this.ks.orientation === 'horizontal' ? filtered.length * (
|
|
70
|
+
col: this.ks.orientation === 'horizontal' ? filtered.length * (groupIndex || 0) + slotIndex : slotIndex,
|
|
71
71
|
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart),
|
|
72
72
|
expandable: true,
|
|
73
73
|
editable: this.$props.editable
|
|
@@ -89,7 +89,7 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
89
89
|
viewSlot: this.$props.viewSlot,
|
|
90
90
|
key: "".concat(slot.start.getTime(), ":").concat(slot.group.index),
|
|
91
91
|
row: 0,
|
|
92
|
-
col: this.ks.orientation === 'horizontal' ? filtered.length * (
|
|
92
|
+
col: this.ks.orientation === 'horizontal' ? filtered.length * (groupIndex || 0) + slotIndex : slotIndex,
|
|
93
93
|
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart),
|
|
94
94
|
expandable: true,
|
|
95
95
|
editable: this.$props.editable
|
|
@@ -265,10 +265,14 @@ var MultiDayViewVue2 = {
|
|
|
265
265
|
},
|
|
266
266
|
data: function data() {
|
|
267
267
|
return {
|
|
268
|
+
hasMounted: false,
|
|
268
269
|
currentDragItem: undefined,
|
|
269
270
|
currentResizeItem: undefined
|
|
270
271
|
};
|
|
271
272
|
},
|
|
273
|
+
mounted: function mounted() {
|
|
274
|
+
this.hasMounted = true;
|
|
275
|
+
},
|
|
272
276
|
created: function created() {
|
|
273
277
|
this.intl = provideIntlService(this);
|
|
274
278
|
},
|
|
@@ -474,7 +478,7 @@ var MultiDayViewVue2 = {
|
|
|
474
478
|
on: _this2.v3 ? undefined : {
|
|
475
479
|
"dataaction": _this2.handleDataAction
|
|
476
480
|
}
|
|
477
|
-
})]), dayItems.map(function (item) {
|
|
481
|
+
})]), _this2.hasMounted && dayItems.map(function (item) {
|
|
478
482
|
return h(EditItem, {
|
|
479
483
|
key: item.isRecurring ? "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index, ":").concat(item.originalStart) : "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index),
|
|
480
484
|
uid: item.uid,
|
|
@@ -752,7 +756,7 @@ var MultiDayViewVue2 = {
|
|
|
752
756
|
timeSlots: timeSlots,
|
|
753
757
|
dayRanges: _this2.dayRanges,
|
|
754
758
|
editable: _this2.$props.editable
|
|
755
|
-
})]), dayItems.map(function (item) {
|
|
759
|
+
})]), _this2.hasMounted && dayItems.map(function (item) {
|
|
756
760
|
return h(EditItem, {
|
|
757
761
|
key: item.isRecurring ? "".concat(item.uid, ":").concat(item.group.index, " : ").concat(item.range.index, " : ").concat(item.originalStart) : "".concat(item.uid, ":").concat(item.group.index, " : ").concat(item.range.index),
|
|
758
762
|
uid: item.uid,
|
|
@@ -826,7 +830,7 @@ var MultiDayViewVue2 = {
|
|
|
826
830
|
editable: this.$props.editable,
|
|
827
831
|
vertical: false
|
|
828
832
|
});
|
|
829
|
-
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)], timeItems.map(function (item) {
|
|
833
|
+
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)], _this2.hasMounted && timeItems.map(function (item) {
|
|
830
834
|
return h(EditItem, {
|
|
831
835
|
key: item.isRecurring ? "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index, ":").concat(item.originalStart) : "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index),
|
|
832
836
|
uid: item.uid,
|
|
@@ -993,7 +997,7 @@ var MultiDayViewVue2 = {
|
|
|
993
997
|
on: _this2.v3 ? undefined : {
|
|
994
998
|
"dataaction": _this2.handleDataAction
|
|
995
999
|
}
|
|
996
|
-
})]), dayItems.map(function (item) {
|
|
1000
|
+
})]), _this2.hasMounted && dayItems.map(function (item) {
|
|
997
1001
|
return h(EditItem, {
|
|
998
1002
|
key: item.isRecurring ? "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index, ":").concat(item.originalStart) : "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index),
|
|
999
1003
|
uid: item.uid,
|
|
@@ -1264,7 +1268,7 @@ var MultiDayViewVue2 = {
|
|
|
1264
1268
|
timeSlots: timeSlots,
|
|
1265
1269
|
dayRanges: _this2.dayRanges,
|
|
1266
1270
|
editable: _this2.$props.editable
|
|
1267
|
-
})]), dayItems.map(function (item) {
|
|
1271
|
+
})]), _this2.hasMounted && dayItems.map(function (item) {
|
|
1268
1272
|
return h(EditItem, {
|
|
1269
1273
|
key: item.isRecurring ? "".concat(item.uid, ":").concat(item.group.index, " : ").concat(item.range.index, " : ").concat(item.originalStart) : "".concat(item.uid, ":").concat(item.group.index, " : ").concat(item.range.index),
|
|
1270
1274
|
uid: item.uid,
|
|
@@ -1338,7 +1342,7 @@ var MultiDayViewVue2 = {
|
|
|
1338
1342
|
editable: this.$props.editable,
|
|
1339
1343
|
vertical: false
|
|
1340
1344
|
});
|
|
1341
|
-
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)], timeItems.map(function (item) {
|
|
1345
|
+
}, _this2), _this2.compDragItem && _this2.compDragItem.isAllDay && dragItemClue.call(_this2, true), _this2.compResizeItem && _this2.compResizeItem.isAllDay && resizeItemClue.call(_this2, true)], _this2.hasMounted && timeItems.map(function (item) {
|
|
1342
1346
|
return h(EditItem, {
|
|
1343
1347
|
key: item.isRecurring ? "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index, ":").concat(item.originalStart) : "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index),
|
|
1344
1348
|
uid: item.uid,
|
|
@@ -15,7 +15,6 @@ import * as Vue from 'vue';
|
|
|
15
15
|
var allVue = Vue;
|
|
16
16
|
var gh = allVue.h;
|
|
17
17
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
18
|
-
var inject = allVue.inject;
|
|
19
18
|
import { BaseView } from '../../components/BaseView.js';
|
|
20
19
|
import { MS_PER_DAY, firstDayInWeek, firstDayOfMonth, getDate, addDays, lastDayOfMonth, ZonedDate } from '@progress/kendo-date-math';
|
|
21
20
|
import { VerticalResourceIterator } from '../common/VerticalResourceIterator.js';
|
|
@@ -34,9 +33,6 @@ import { MonthViewBody } from './MonthViewBody.js';
|
|
|
34
33
|
import { SchedulerEditItem } from '../../items/SchedulerEditItem.js';
|
|
35
34
|
import { SchedulerResize } from '../common/SchedulerResize.js';
|
|
36
35
|
import { SchedulerDrag } from '../../views/common/SchedulerDrag.js';
|
|
37
|
-
var DAY_FORMAT = {
|
|
38
|
-
skeleton: 'dd'
|
|
39
|
-
};
|
|
40
36
|
/** @hidden */
|
|
41
37
|
var MonthViewVue2 = {
|
|
42
38
|
name: 'KendoMonthView',
|
|
@@ -113,8 +109,12 @@ var MonthViewVue2 = {
|
|
|
113
109
|
created: function created() {
|
|
114
110
|
this.intl = provideIntlService(this);
|
|
115
111
|
},
|
|
112
|
+
mounted: function mounted() {
|
|
113
|
+
this.hasMounted = true;
|
|
114
|
+
},
|
|
116
115
|
data: function data() {
|
|
117
116
|
return {
|
|
117
|
+
hasMounted: false,
|
|
118
118
|
currentDragItem: undefined,
|
|
119
119
|
currentResizeItem: undefined
|
|
120
120
|
};
|
|
@@ -396,7 +396,7 @@ var MonthViewVue2 = {
|
|
|
396
396
|
dateHeaderCell: _this2.$props.dateHeaderCell
|
|
397
397
|
})])]), h("div", {
|
|
398
398
|
"class": "k-scheduler-body"
|
|
399
|
-
}, [body, items.filter(function (item) {
|
|
399
|
+
}, [body, _this2.hasMounted && items.filter(function (item) {
|
|
400
400
|
return item.order === null || item.order < itemsPerSlot;
|
|
401
401
|
}).sort(orderSort).map(function (item) {
|
|
402
402
|
return h(EditItem, {
|
|
@@ -530,7 +530,7 @@ var MonthViewVue2 = {
|
|
|
530
530
|
dateHeaderCell: _this2.$props.dateHeaderCell
|
|
531
531
|
})])]), h("div", {
|
|
532
532
|
"class": "k-scheduler-body"
|
|
533
|
-
}, [body, items.filter(function (item) {
|
|
533
|
+
}, [body, _this2.hasMounted && items.filter(function (item) {
|
|
534
534
|
return item.order === null || item.order < itemsPerSlot;
|
|
535
535
|
}).sort(orderSort).map(function (item) {
|
|
536
536
|
return h(EditItem, {
|
|
@@ -24,7 +24,6 @@ import * as Vue from 'vue';
|
|
|
24
24
|
var allVue = Vue;
|
|
25
25
|
var gh = allVue.h;
|
|
26
26
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
27
|
-
var inject = allVue.inject;
|
|
28
27
|
import { BaseView } from '../../components/BaseView.js';
|
|
29
28
|
import { useCellSync, useRowSync } from '../../hooks/main.js';
|
|
30
29
|
import { Day, MS_PER_DAY, MS_PER_MINUTE, getDate, ZonedDate, addDays } from '@progress/kendo-date-math';
|
|
@@ -155,6 +154,7 @@ var MultiDayTimelineViewVue2 = {
|
|
|
155
154
|
},
|
|
156
155
|
data: function data() {
|
|
157
156
|
return {
|
|
157
|
+
hasMounted: false,
|
|
158
158
|
currentDragItem: undefined,
|
|
159
159
|
currentResizeItem: undefined
|
|
160
160
|
};
|
|
@@ -229,6 +229,7 @@ var MultiDayTimelineViewVue2 = {
|
|
|
229
229
|
mounted: function mounted() {
|
|
230
230
|
this.timeRef = null;
|
|
231
231
|
this.bodyRef = null;
|
|
232
|
+
this.hasMounted = true;
|
|
232
233
|
useCellSync({
|
|
233
234
|
element: this.$el,
|
|
234
235
|
selector: '.k-resource-cell',
|
|
@@ -270,8 +271,6 @@ var MultiDayTimelineViewVue2 = {
|
|
|
270
271
|
var _this2 = this;
|
|
271
272
|
var h = gh || createElement;
|
|
272
273
|
var intl = provideIntlService(this);
|
|
273
|
-
var showWorkHours = this.$props.showWorkHours;
|
|
274
|
-
var slotDivisions = this.$props.slotDivisions;
|
|
275
274
|
var slotDuration = this.$props.slotDuration;
|
|
276
275
|
var workDayStart = intl.parseDate(this.$props.workDayStart);
|
|
277
276
|
var workDayEnd = intl.parseDate(this.$props.workDayEnd);
|
|
@@ -530,7 +529,7 @@ var MultiDayTimelineViewVue2 = {
|
|
|
530
529
|
viewSlot: _this2.$props.viewSlot,
|
|
531
530
|
currentTimeMarker: _this2.$props.currentTimeMarker
|
|
532
531
|
}
|
|
533
|
-
}), items.sort(orderSort).map(function (item) {
|
|
532
|
+
}), _this2.hasMounted && items.sort(orderSort).map(function (item) {
|
|
534
533
|
return h(SchedulerEditItem, {
|
|
535
534
|
key: item.isRecurring ? "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index, ":").concat(item.originalStart) : "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index),
|
|
536
535
|
uid: item.uid,
|
|
@@ -730,7 +729,7 @@ var MultiDayTimelineViewVue2 = {
|
|
|
730
729
|
viewSlot: _this2.$props.viewSlot,
|
|
731
730
|
currentTimeMarker: _this2.$props.currentTimeMarker
|
|
732
731
|
}
|
|
733
|
-
}), items.sort(orderSort).map(function (item) {
|
|
732
|
+
}), _this2.hasMounted && items.sort(orderSort).map(function (item) {
|
|
734
733
|
return h(SchedulerEditItem, {
|
|
735
734
|
key: item.isRecurring ? "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index, ":").concat(item.originalStart) : "".concat(item.uid, ":").concat(item.group.index, ":").concat(item.range.index),
|
|
736
735
|
uid: item.uid,
|
package/dist/npm/Scheduler.js
CHANGED
|
@@ -375,7 +375,7 @@ var SchedulerVue2 = {
|
|
|
375
375
|
"focusout": this.handleBlur
|
|
376
376
|
},
|
|
377
377
|
onFocusout: this.handleBlur
|
|
378
|
-
}, [headerRender,
|
|
378
|
+
}, [headerRender, h(viewComponent, __assign({
|
|
379
379
|
key: this.ks.view.name,
|
|
380
380
|
onDataaction: this.handleDataAction,
|
|
381
381
|
on: this.v3 ? undefined : {
|
|
@@ -54,6 +54,7 @@ var NavigationDatePickerVue2 = {
|
|
|
54
54
|
},
|
|
55
55
|
data: function data() {
|
|
56
56
|
return {
|
|
57
|
+
hasMounted: false,
|
|
57
58
|
show: false,
|
|
58
59
|
focused: false,
|
|
59
60
|
media: 'desktop'
|
|
@@ -64,6 +65,7 @@ var NavigationDatePickerVue2 = {
|
|
|
64
65
|
this.calculateMedia();
|
|
65
66
|
this.observer = new window.ResizeObserver(this.calculateMedia);
|
|
66
67
|
this.observer.observe(this.ks.scheduler.$el);
|
|
68
|
+
this.hasMounted = true;
|
|
67
69
|
},
|
|
68
70
|
destroyed: !!isV3 ? undefined : function () {
|
|
69
71
|
if (this.observer) {
|
|
@@ -137,7 +139,7 @@ var NavigationDatePickerVue2 = {
|
|
|
137
139
|
anchor: _this2.buttonId,
|
|
138
140
|
show: show
|
|
139
141
|
}, _this2.v3 ? function () {
|
|
140
|
-
return [h(kendo_vue_dateinputs_1.Calendar, {
|
|
142
|
+
return [_this2.hasMounted && h(kendo_vue_dateinputs_1.Calendar, {
|
|
141
143
|
ref: 'calendar',
|
|
142
144
|
onBlur: _this2.onCalendarBlur,
|
|
143
145
|
on: _this2.v3 ? undefined : {
|
|
@@ -152,7 +154,7 @@ var NavigationDatePickerVue2 = {
|
|
|
152
154
|
value: value
|
|
153
155
|
}
|
|
154
156
|
})];
|
|
155
|
-
} : [h(kendo_vue_dateinputs_1.Calendar, {
|
|
157
|
+
} : [_this2.hasMounted && h(kendo_vue_dateinputs_1.Calendar, {
|
|
156
158
|
ref: 'calendar',
|
|
157
159
|
onBlur: _this2.onCalendarBlur,
|
|
158
160
|
on: _this2.v3 ? undefined : {
|
|
@@ -177,7 +179,7 @@ var NavigationDatePickerVue2 = {
|
|
|
177
179
|
anchor: _this2.buttonId,
|
|
178
180
|
show: show
|
|
179
181
|
}, _this2.v3 ? function () {
|
|
180
|
-
return [h(kendo_vue_dateinputs_1.Calendar, {
|
|
182
|
+
return [_this2.hasMounted && h(kendo_vue_dateinputs_1.Calendar, {
|
|
181
183
|
ref: 'calendar',
|
|
182
184
|
onBlur: _this2.onCalendarBlur,
|
|
183
185
|
on: _this2.v3 ? undefined : {
|
|
@@ -192,7 +194,7 @@ var NavigationDatePickerVue2 = {
|
|
|
192
194
|
value: value
|
|
193
195
|
}
|
|
194
196
|
})];
|
|
195
|
-
} : [h(kendo_vue_dateinputs_1.Calendar, {
|
|
197
|
+
} : [_this2.hasMounted && h(kendo_vue_dateinputs_1.Calendar, {
|
|
196
198
|
ref: 'calendar',
|
|
197
199
|
onBlur: _this2.onCalendarBlur,
|
|
198
200
|
on: _this2.v3 ? undefined : {
|
|
@@ -120,8 +120,10 @@ var SchedulerViewItemVue2 = {
|
|
|
120
120
|
if (!this.ks.scheduler || !this.ks.scheduler.$el) {
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
if (kendo_vue_common_1.canUseDOM) {
|
|
124
|
+
this.observer = new window.ResizeObserver(this.handleResize);
|
|
125
|
+
this.observer.observe(this.ks.scheduler.$el);
|
|
126
|
+
}
|
|
125
127
|
},
|
|
126
128
|
updated: function updated() {
|
|
127
129
|
var that = this;
|
|
@@ -132,8 +134,10 @@ var SchedulerViewItemVue2 = {
|
|
|
132
134
|
if (!this.ks.scheduler || !this.ks.scheduler.$el || this.observer) {
|
|
133
135
|
return;
|
|
134
136
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
if (kendo_vue_common_1.canUseDOM) {
|
|
138
|
+
this.observer = new window.ResizeObserver(this.handleResize);
|
|
139
|
+
this.observer.observe(this.ks.scheduler.$el);
|
|
140
|
+
}
|
|
137
141
|
},
|
|
138
142
|
destroyed: !!isV3 ? undefined : function () {
|
|
139
143
|
if (this.observer) {
|
|
@@ -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: 1669624090,
|
|
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
|
};
|
|
@@ -125,6 +125,14 @@ var SchedulerSlotVue2 = {
|
|
|
125
125
|
item: this
|
|
126
126
|
});
|
|
127
127
|
},
|
|
128
|
+
data: function data() {
|
|
129
|
+
return {
|
|
130
|
+
hasMounted: false
|
|
131
|
+
};
|
|
132
|
+
},
|
|
133
|
+
mounted: function mounted() {
|
|
134
|
+
this.hasMounted = true;
|
|
135
|
+
},
|
|
128
136
|
destroyed: !!isV3 ? undefined : function () {
|
|
129
137
|
this.setSlots({
|
|
130
138
|
type: main_1.COLLECTION_ACTION.remove,
|
|
@@ -214,7 +222,7 @@ var SchedulerSlotVue2 = {
|
|
|
214
222
|
"data-slot-index": this.$props.index
|
|
215
223
|
}, [this.navDay && h("span", {
|
|
216
224
|
"class": "k-link k-nav-day"
|
|
217
|
-
}, [this.intl.formatDate(new Date(this.end.getTime() - (this.end.getTime() - this.start.getTime()) / 2), DAY_FORMAT)]), this.itemsPerSlot < this.items.length && h(ShowMoreItemsButton_1.ShowMoreItemsButton, {
|
|
225
|
+
}, [this.intl.formatDate(new Date(this.end.getTime() - (this.end.getTime() - this.start.getTime()) / 2), DAY_FORMAT)]), this.hasMounted && this.itemsPerSlot < this.items.length && h(ShowMoreItemsButton_1.ShowMoreItemsButton, {
|
|
218
226
|
onClick: this.handleShowMoreItemsClick,
|
|
219
227
|
on: this.v3 ? undefined : {
|
|
220
228
|
"click": this.handleShowMoreItemsClick
|
|
@@ -90,8 +90,10 @@ var SchedulerViewSlotVue2 = {
|
|
|
90
90
|
if (!this.ks.scheduler || !this.ks.scheduler.$el) {
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
if (kendo_vue_common_1.canUseDOM) {
|
|
94
|
+
this.observer = new window.ResizeObserver(this.handleResize);
|
|
95
|
+
this.observer.observe(this.ks.scheduler.$el);
|
|
96
|
+
}
|
|
95
97
|
},
|
|
96
98
|
// @ts-ignore
|
|
97
99
|
setup: !isV3 ? undefined : function () {
|
|
@@ -9,14 +9,10 @@ var Vue = require("vue");
|
|
|
9
9
|
var allVue = Vue;
|
|
10
10
|
var gh = allVue.h;
|
|
11
11
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
12
|
-
var inject = allVue.inject;
|
|
13
12
|
var SchedulerEditSlot_1 = require("../../slots/SchedulerEditSlot");
|
|
14
13
|
var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
15
14
|
var SchedulerEditTask_1 = require("../../tasks/SchedulerEditTask");
|
|
16
15
|
var main_1 = require("../../messages/main");
|
|
17
|
-
var DAY_FORMAT = {
|
|
18
|
-
skeleton: 'dd'
|
|
19
|
-
};
|
|
20
16
|
/**
|
|
21
17
|
* @hidden
|
|
22
18
|
*/
|
|
@@ -44,6 +40,14 @@ var AgendaViewBodyVue2 = {
|
|
|
44
40
|
default: null
|
|
45
41
|
}
|
|
46
42
|
},
|
|
43
|
+
data: function data() {
|
|
44
|
+
return {
|
|
45
|
+
hasMounted: false
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
mounted: function mounted() {
|
|
49
|
+
this.hasMounted = true;
|
|
50
|
+
},
|
|
47
51
|
// @ts-ignore
|
|
48
52
|
setup: !isV3 ? undefined : function () {
|
|
49
53
|
var v3 = !!isV3;
|
|
@@ -61,7 +65,7 @@ var AgendaViewBodyVue2 = {
|
|
|
61
65
|
var localization = (0, kendo_vue_intl_1.provideLocalizationService)(this);
|
|
62
66
|
return h("div", {
|
|
63
67
|
"class": "k-scheduler-body"
|
|
64
|
-
}, [
|
|
68
|
+
}, [this.items.length && this.agendaSlots.filter(function (slot) {
|
|
65
69
|
return slot.group.index === (_this.ri.groupIndex || 0);
|
|
66
70
|
}).map(function (slot, slotIndex, filtered) {
|
|
67
71
|
var _this2 = this;
|
|
@@ -120,7 +124,7 @@ var AgendaViewBodyVue2 = {
|
|
|
120
124
|
"class": "k-scheduler-agendadate"
|
|
121
125
|
}, [_this2.intl.formatDate(slot.zonedStart, 'y')])])]), h("div", {
|
|
122
126
|
"class": "k-scheduler-cell k-group-content"
|
|
123
|
-
}, [slot.items.length ? slot.items.map(function (item, itemIndex) {
|
|
127
|
+
}, [this.hasMounted && slot.items.length ? slot.items.map(function (item, itemIndex) {
|
|
124
128
|
return h("div", {
|
|
125
129
|
"class": "k-scheduler-row",
|
|
126
130
|
key: itemIndex
|
|
@@ -42,6 +42,7 @@ var HorizontalResourceIteratorVue2 = {
|
|
|
42
42
|
// @ts-ignore
|
|
43
43
|
render: function render(createElement) {
|
|
44
44
|
var h = gh || createElement;
|
|
45
|
+
var that = this;
|
|
45
46
|
var _a = this.$props,
|
|
46
47
|
nested = _a.nested,
|
|
47
48
|
rowContentProps = _a.rowContentProps;
|
|
@@ -51,7 +52,6 @@ var HorizontalResourceIteratorVue2 = {
|
|
|
51
52
|
var defaultSlot = (0, kendo_vue_common_1.getDefaultSlots)(this);
|
|
52
53
|
var groupIndex = 0;
|
|
53
54
|
var renderResources = function renderResources(args) {
|
|
54
|
-
var children = args.children;
|
|
55
55
|
var deepestResources = (0, utils_1.expandResources)(args.resources, args.resources.length - 1);
|
|
56
56
|
var ChildRowContent = args.childRowContent;
|
|
57
57
|
var hasGroups = args.resources.length > 0;
|
|
@@ -82,8 +82,8 @@ var HorizontalResourceIteratorVue2 = {
|
|
|
82
82
|
},
|
|
83
83
|
groupIndex: hasGroups ? cGroupIndex : 0
|
|
84
84
|
}, this.v3 ? function () {
|
|
85
|
-
return [
|
|
86
|
-
} : [
|
|
85
|
+
return [(0, kendo_vue_common_1.getDefaultSlots)(that)];
|
|
86
|
+
} : [(0, kendo_vue_common_1.getDefaultSlots)(that)])
|
|
87
87
|
);
|
|
88
88
|
}, this)]);
|
|
89
89
|
};
|
|
@@ -39,6 +39,7 @@ var VerticalResourceIteratorVue2 = {
|
|
|
39
39
|
// @ts-ignore
|
|
40
40
|
render: function render(createElement) {
|
|
41
41
|
var h = gh || createElement;
|
|
42
|
+
var that = this;
|
|
42
43
|
var defaultSlot = (0, kendo_vue_common_1.getDefaultSlots)(this);
|
|
43
44
|
var _a = this.$props,
|
|
44
45
|
nested = _a.nested,
|
|
@@ -175,8 +176,8 @@ var VerticalResourceIteratorVue2 = {
|
|
|
175
176
|
resource: args.resources[args.depth],
|
|
176
177
|
groupIndex: hasGroups ? args.groupIndex : 0
|
|
177
178
|
}, this.v3 ? function () {
|
|
178
|
-
return [
|
|
179
|
-
} : [
|
|
179
|
+
return [(0, kendo_vue_common_1.getDefaultSlots)(that)];
|
|
180
|
+
} : [(0, kendo_vue_common_1.getDefaultSlots)(that)]), renderMore.call(this, args.resources[args.depth], hasGroups ? args.groupIndex : 0)];
|
|
180
181
|
}
|
|
181
182
|
var dataLength = args.resources[args.depth].data.length;
|
|
182
183
|
return args.resources[args.depth].data.map(function (dataItem, dataIndex) {
|
|
@@ -21,6 +21,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.setRect = exports.getBorders = exports.getPadding = exports.getRect = exports.resourcesByIndex = exports.expandResources = exports.addUTCDays = exports.toGroupResources = exports.calculateEventRect = exports.toFlatGroupResources = exports.last = void 0;
|
|
24
|
+
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
24
25
|
/** @hidden */
|
|
25
26
|
var last = function (arr) { return arr[arr.length - 1]; };
|
|
26
27
|
exports.last = last;
|
|
@@ -167,6 +168,9 @@ exports.getRect = getRect;
|
|
|
167
168
|
/** @hidden */
|
|
168
169
|
var getPadding = function (el, horizontal) {
|
|
169
170
|
if (horizontal === void 0) { horizontal = false; }
|
|
171
|
+
if (!kendo_vue_common_1.canUseDOM) {
|
|
172
|
+
return 0;
|
|
173
|
+
}
|
|
170
174
|
return parseFloat(window.getComputedStyle(el)[horizontal ? 'paddingLeft' : 'paddingTop'] || '0')
|
|
171
175
|
+ parseFloat(window.getComputedStyle(el)[horizontal ? 'paddingRight' : 'paddingBottom'] || '0');
|
|
172
176
|
};
|
|
@@ -174,6 +178,9 @@ exports.getPadding = getPadding;
|
|
|
174
178
|
/** @hidden */
|
|
175
179
|
var getBorders = function (el, horizontal) {
|
|
176
180
|
if (horizontal === void 0) { horizontal = false; }
|
|
181
|
+
if (!kendo_vue_common_1.canUseDOM) {
|
|
182
|
+
return 0;
|
|
183
|
+
}
|
|
177
184
|
return parseFloat(window.getComputedStyle(el)[horizontal ? 'borderLeftWidth' : 'borderTopWidth'] || '0')
|
|
178
185
|
+ parseFloat(window.getComputedStyle(el)[horizontal ? 'borderRightWidth' : 'borderBottomWidth'] || '0');
|
|
179
186
|
};
|
|
@@ -49,13 +49,13 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
49
49
|
numberOfDays = _a.numberOfDays,
|
|
50
50
|
workWeekStart = _a.workWeekStart,
|
|
51
51
|
workWeekEnd = _a.workWeekEnd;
|
|
52
|
+
var groupIndex = this.ri.groupIndex;
|
|
52
53
|
return h("div", {
|
|
53
|
-
key:
|
|
54
|
+
key: groupIndex,
|
|
54
55
|
"class": "k-scheduler-row"
|
|
55
56
|
}, [this.dayRanges.map(function (_, rangeIndex) {
|
|
56
|
-
var _this = this;
|
|
57
57
|
return this.daySlots.filter(function (s) {
|
|
58
|
-
return s.group.index ===
|
|
58
|
+
return s.group.index === groupIndex && s.range.index === rangeIndex;
|
|
59
59
|
}).map(function (slot, slotIndex, filtered) {
|
|
60
60
|
return h(SchedulerEditSlot_1.SchedulerEditSlot, {
|
|
61
61
|
index: slot.index,
|
|
@@ -73,7 +73,7 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
73
73
|
slotRender: this.$props.slotRender,
|
|
74
74
|
viewSlot: this.$props.viewSlot,
|
|
75
75
|
row: 0,
|
|
76
|
-
col: this.ks.orientation === 'horizontal' ? filtered.length * (
|
|
76
|
+
col: this.ks.orientation === 'horizontal' ? filtered.length * (groupIndex || 0) + slotIndex : slotIndex,
|
|
77
77
|
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart),
|
|
78
78
|
expandable: true,
|
|
79
79
|
editable: this.$props.editable
|
|
@@ -95,7 +95,7 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
95
95
|
viewSlot: this.$props.viewSlot,
|
|
96
96
|
key: "".concat(slot.start.getTime(), ":").concat(slot.group.index),
|
|
97
97
|
row: 0,
|
|
98
|
-
col: this.ks.orientation === 'horizontal' ? filtered.length * (
|
|
98
|
+
col: this.ks.orientation === 'horizontal' ? filtered.length * (groupIndex || 0) + slotIndex : slotIndex,
|
|
99
99
|
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart),
|
|
100
100
|
expandable: true,
|
|
101
101
|
editable: this.$props.editable
|