@progress/kendo-vue-scheduler 3.1.0 → 3.1.2-dev.202203221454
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 +104 -682
- package/dist/es/components/SchedulerForm.js +4 -40
- 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/ViewSelectorItem.js +5 -7
- package/dist/es/components/header/view-selector/ViewSelectorList.js +19 -13
- package/dist/es/context/SchedulerResourceIteratorContext.js +2 -2
- package/dist/es/items/SchedulerEditItem.js +3 -1
- package/dist/es/items/SchedulerItem.d.ts +2 -0
- package/dist/es/items/SchedulerItem.js +11 -2
- 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 +58 -18
- package/dist/es/slots/SchedulerSlot.d.ts +4 -0
- package/dist/es/slots/SchedulerSlot.js +19 -3
- package/dist/es/slots/SchedulerViewSlot.d.ts +1 -1
- package/dist/es/slots/SchedulerViewSlot.js +58 -30
- package/dist/es/tasks/SchedulerEditTask.js +56 -49
- package/dist/es/tasks/SchedulerTask.js +3 -1
- 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 +104 -17
- package/dist/es/views/day/DayView.js +15 -3
- package/dist/es/views/day/DayViewAllDaySlots.d.ts +2 -0
- package/dist/es/views/day/DayViewAllDaySlots.js +12 -5
- 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 +183 -288
- 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 +102 -682
- package/dist/npm/components/SchedulerForm.js +4 -40
- 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/ViewSelectorItem.js +6 -7
- package/dist/npm/components/header/view-selector/ViewSelectorList.js +21 -13
- package/dist/npm/context/SchedulerResourceIteratorContext.js +2 -2
- package/dist/npm/items/SchedulerEditItem.js +3 -1
- package/dist/npm/items/SchedulerItem.d.ts +2 -0
- package/dist/npm/items/SchedulerItem.js +11 -2
- 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 +59 -18
- package/dist/npm/slots/SchedulerSlot.d.ts +4 -0
- package/dist/npm/slots/SchedulerSlot.js +20 -3
- package/dist/npm/slots/SchedulerViewSlot.d.ts +1 -1
- package/dist/npm/slots/SchedulerViewSlot.js +57 -29
- package/dist/npm/tasks/SchedulerEditTask.js +57 -49
- package/dist/npm/tasks/SchedulerTask.js +4 -1
- 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 +107 -17
- package/dist/npm/views/day/DayView.js +15 -3
- package/dist/npm/views/day/DayViewAllDaySlots.d.ts +2 -0
- package/dist/npm/views/day/DayViewAllDaySlots.js +12 -5
- 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 +184 -289
- 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
|
@@ -8,11 +8,16 @@ import { SchedulerEditSlot } from '../../slots/SchedulerEditSlot'; // tslint:ena
|
|
|
8
8
|
var DayViewAllDaySlotsVue2 = {
|
|
9
9
|
name: 'KendoDayViewAllDaySlots',
|
|
10
10
|
props: {
|
|
11
|
+
slotRender: [String, Function, Object],
|
|
11
12
|
dayRanges: Array,
|
|
12
13
|
daySlots: Array,
|
|
13
14
|
numberOfDays: Number,
|
|
14
15
|
workWeekStart: Number,
|
|
15
|
-
workWeekEnd: Number
|
|
16
|
+
workWeekEnd: Number,
|
|
17
|
+
editable: {
|
|
18
|
+
type: [Boolean, Object],
|
|
19
|
+
default: false
|
|
20
|
+
}
|
|
16
21
|
},
|
|
17
22
|
inject: {
|
|
18
23
|
ri: {
|
|
@@ -58,12 +63,13 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
58
63
|
range: slot.range,
|
|
59
64
|
isAllDay: slot.isAllDay,
|
|
60
65
|
form: this.$props.form,
|
|
61
|
-
|
|
66
|
+
slotRender: this.$props.slotRender,
|
|
62
67
|
viewSlot: this.$props.viewSlot,
|
|
63
68
|
row: 0,
|
|
64
69
|
col: this.ks.orientation === 'horizontal' ? filtered.length * (this.ri.groupIndex || 0) + slotIndex : slotIndex,
|
|
65
70
|
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart),
|
|
66
|
-
expandable: true
|
|
71
|
+
expandable: true,
|
|
72
|
+
editable: this.$props.editable
|
|
67
73
|
},
|
|
68
74
|
start: slot.start,
|
|
69
75
|
end: slot.end,
|
|
@@ -78,13 +84,14 @@ var DayViewAllDaySlotsVue2 = {
|
|
|
78
84
|
"dataaction": this.handleDataAction
|
|
79
85
|
},
|
|
80
86
|
form: this.$props.form,
|
|
81
|
-
|
|
87
|
+
slotRender: this.$props.slotRender,
|
|
82
88
|
viewSlot: this.$props.viewSlot,
|
|
83
89
|
key: slot.start.getTime() + ":" + slot.group.index,
|
|
84
90
|
row: 0,
|
|
85
91
|
col: this.ks.orientation === 'horizontal' ? filtered.length * (this.ri.groupIndex || 0) + slotIndex : slotIndex,
|
|
86
92
|
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart),
|
|
87
|
-
expandable: true
|
|
93
|
+
expandable: true,
|
|
94
|
+
editable: this.$props.editable
|
|
88
95
|
});
|
|
89
96
|
}, this);
|
|
90
97
|
}, this)]);
|
|
@@ -11,6 +11,7 @@ import { isInTimeRange } from '../../utils'; // tslint:enable:max-line-length
|
|
|
11
11
|
var DayViewMiddleRowVue2 = {
|
|
12
12
|
name: 'KendoDayViewMiddleRow',
|
|
13
13
|
props: {
|
|
14
|
+
slotRender: [String, Function, Object],
|
|
14
15
|
timeRanges: Array,
|
|
15
16
|
timeSlots: Array,
|
|
16
17
|
slotDivisions: {
|
|
@@ -43,6 +44,8 @@ var DayViewMiddleRowVue2 = {
|
|
|
43
44
|
render: function render(createElement) {
|
|
44
45
|
var h = gh || createElement;
|
|
45
46
|
var EditSlot = this.$props.editSlot || SchedulerEditSlot;
|
|
47
|
+
var that = this;
|
|
48
|
+
var workWeekStart = that.numberOfDays + that.workWeekStart;
|
|
46
49
|
return h("div", {
|
|
47
50
|
"class": classNames('k-scheduler-row', {
|
|
48
51
|
'k-middle-row': !((this.rootIndex + 1) % this.slotDivisions === 0)
|
|
@@ -66,14 +69,14 @@ var DayViewMiddleRowVue2 = {
|
|
|
66
69
|
group: slot.group,
|
|
67
70
|
range: slot.range,
|
|
68
71
|
isAllDay: slot.isAllDay,
|
|
69
|
-
|
|
72
|
+
slotRender: this.$props.slotRender,
|
|
70
73
|
viewSlot: this.$props.viewSlot,
|
|
71
74
|
form: this.$props.form,
|
|
72
75
|
row: this.rootIndex + GRID_OFFSET,
|
|
73
76
|
col: this.timeRanges.length * (this.ri.groupIndex || 0) + rangeIndex,
|
|
74
|
-
isWorkHour: isInTimeRange(slot.zonedStart,
|
|
75
|
-
isWorkDay: 0 <= slot.zonedStart.getDay() + (
|
|
76
|
-
editable:
|
|
77
|
+
isWorkHour: isInTimeRange(slot.zonedStart, that.workDayStart, that.workDayEnd),
|
|
78
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart)) % that.numberOfDays <= that.workWeekEnd + (that.numberOfDays - workWeekStart),
|
|
79
|
+
editable: that.$props.editable
|
|
77
80
|
},
|
|
78
81
|
start: slot.start,
|
|
79
82
|
end: slot.end,
|
|
@@ -87,16 +90,16 @@ var DayViewMiddleRowVue2 = {
|
|
|
87
90
|
on: this.v3 ? undefined : {
|
|
88
91
|
"dataaction": this.handleDataAction
|
|
89
92
|
},
|
|
90
|
-
|
|
93
|
+
slotRender: this.$props.slotRender,
|
|
91
94
|
viewSlot: this.$props.viewSlot,
|
|
92
95
|
form: this.$props.form,
|
|
93
96
|
row: this.rootIndex + GRID_OFFSET,
|
|
94
97
|
col: this.timeRanges.length * (this.ri.groupIndex || 0) + rangeIndex,
|
|
95
|
-
isWorkHour: isInTimeRange(slot.zonedStart,
|
|
96
|
-
isWorkDay: 0 <= slot.zonedStart.getDay() + (
|
|
97
|
-
editable:
|
|
98
|
+
isWorkHour: isInTimeRange(slot.zonedStart, that.workDayStart, that.workDayEnd),
|
|
99
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (that.numberOfDays - workWeekStart)) % that.numberOfDays <= that.workWeekEnd + (that.numberOfDays - workWeekStart),
|
|
100
|
+
editable: that.$props.editable
|
|
98
101
|
});
|
|
99
|
-
},
|
|
102
|
+
}, that);
|
|
100
103
|
}, this)]);
|
|
101
104
|
},
|
|
102
105
|
methods: {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
/** @hidden */
|
|
7
|
+
export interface DayViewVerticalRowProps {
|
|
8
|
+
daySlots: any[];
|
|
9
|
+
dayRanges: any[];
|
|
10
|
+
timeSlots: any[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export interface DayViewVerticalRowState {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export interface DayViewVerticalRowComputed {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @hidden
|
|
25
|
+
*/
|
|
26
|
+
export interface DayViewVerticalRowMethods {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
export interface DayViewVerticalRowData {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
export interface DayViewVerticalRowAll extends Vue2type, DayViewVerticalRowMethods, DayViewVerticalRowData, DayViewVerticalRowComputed, DayViewVerticalRowState {
|
|
38
|
+
}
|
|
39
|
+
declare let DayViewVerticalRowVue2: ComponentOptions<DayViewVerticalRowAll, DefaultData<DayViewVerticalRowData>, DefaultMethods<DayViewVerticalRowAll>, DayViewVerticalRowComputed, RecordPropsDefinition<DayViewVerticalRowProps>>;
|
|
40
|
+
declare const DayViewVerticalRow: DefineComponent<DayViewVerticalRowProps, any, DayViewVerticalRowData, DayViewVerticalRowComputed, DayViewVerticalRowMethods, {}, {}, {}, string, DayViewVerticalRowProps, DayViewVerticalRowProps, {}>;
|
|
41
|
+
export { DayViewVerticalRow, DayViewVerticalRowVue2 };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import * as Vue from 'vue';
|
|
3
|
+
var allVue = Vue;
|
|
4
|
+
var gh = allVue.h;
|
|
5
|
+
import { GRID_OFFSET } from './MultiDayView';
|
|
6
|
+
import { SchedulerEditSlot } from '../../slots/SchedulerEditSlot';
|
|
7
|
+
import { DayViewAllDayRowContent } from './DayViewAllDayRowContent';
|
|
8
|
+
var FIRST_INDEX = 0; // tslint:enable:max-line-length
|
|
9
|
+
|
|
10
|
+
var DayViewVerticalRowVue2 = {
|
|
11
|
+
name: 'KendoDayViewVerticalRow',
|
|
12
|
+
props: {
|
|
13
|
+
dayRanges: Array,
|
|
14
|
+
daySlots: Array,
|
|
15
|
+
timeSlots: Array
|
|
16
|
+
},
|
|
17
|
+
inject: {
|
|
18
|
+
ri: {
|
|
19
|
+
default: null
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
setup: !gh ? undefined : function () {
|
|
24
|
+
var v3 = !!gh;
|
|
25
|
+
return {
|
|
26
|
+
v3: v3
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
render: function render(createElement) {
|
|
31
|
+
var h = gh || createElement;
|
|
32
|
+
var EditSlot = this.$props.editSlot || SchedulerEditSlot;
|
|
33
|
+
var groupIndex = this.ri.groupIndex;
|
|
34
|
+
var _a = this.$props,
|
|
35
|
+
timeSlots = _a.timeSlots,
|
|
36
|
+
daySlots = _a.daySlots;
|
|
37
|
+
return h("div", {
|
|
38
|
+
"class": "k-scheduler-row"
|
|
39
|
+
}, [h(DayViewAllDayRowContent, {
|
|
40
|
+
groupIndex: groupIndex,
|
|
41
|
+
attrs: this.v3 ? undefined : {
|
|
42
|
+
groupIndex: groupIndex
|
|
43
|
+
}
|
|
44
|
+
}), this.dayRanges.map(function (_, rangeIndex) {
|
|
45
|
+
var groupOffset = timeSlots.filter(function (s) {
|
|
46
|
+
return s.group.index === groupIndex && s.range.index === FIRST_INDEX;
|
|
47
|
+
}).length;
|
|
48
|
+
return daySlots.filter(function (s) {
|
|
49
|
+
return s.group.index === groupIndex && s.range.index === rangeIndex;
|
|
50
|
+
}).map(function (slot, slotIndex) {
|
|
51
|
+
return h(EditSlot, {
|
|
52
|
+
slotRender: this.$props.slotRender,
|
|
53
|
+
attrs: this.v3 ? undefined : {
|
|
54
|
+
slotRender: this.$props.slotRender,
|
|
55
|
+
viewSlot: this.$props.viewSlot,
|
|
56
|
+
form: this.$props.form,
|
|
57
|
+
index: slot.index,
|
|
58
|
+
start: slot.start,
|
|
59
|
+
end: slot.end,
|
|
60
|
+
zonedStart: slot.zonedStart,
|
|
61
|
+
zonedEnd: slot.zonedEnd,
|
|
62
|
+
items: slot.items,
|
|
63
|
+
group: slot.group,
|
|
64
|
+
range: slot.range,
|
|
65
|
+
isAllDay: slot.isAllDay,
|
|
66
|
+
row: groupOffset * (groupIndex || 0) + (groupIndex || 0) * GRID_OFFSET,
|
|
67
|
+
col: slotIndex,
|
|
68
|
+
expandable: true
|
|
69
|
+
},
|
|
70
|
+
viewSlot: this.$props.viewSlot,
|
|
71
|
+
form: this.$props.form,
|
|
72
|
+
index: slot.index,
|
|
73
|
+
start: slot.start,
|
|
74
|
+
end: slot.end,
|
|
75
|
+
zonedStart: slot.zonedStart,
|
|
76
|
+
zonedEnd: slot.zonedEnd,
|
|
77
|
+
items: slot.items,
|
|
78
|
+
group: slot.group,
|
|
79
|
+
range: slot.range,
|
|
80
|
+
isAllDay: slot.isAllDay,
|
|
81
|
+
onDataaction: this.handleDataAction,
|
|
82
|
+
on: this.v3 ? undefined : {
|
|
83
|
+
"dataaction": this.handleDataAction
|
|
84
|
+
},
|
|
85
|
+
key: slot.start.getTime() + ":" + slot.group.index,
|
|
86
|
+
"class": 'k-scheduler-alldays-slot',
|
|
87
|
+
row: groupOffset * (groupIndex || 0) + (groupIndex || 0) * GRID_OFFSET,
|
|
88
|
+
col: slotIndex,
|
|
89
|
+
expandable: true
|
|
90
|
+
});
|
|
91
|
+
}, this);
|
|
92
|
+
}, this)]);
|
|
93
|
+
},
|
|
94
|
+
methods: {
|
|
95
|
+
handleDataAction: function handleDataAction(action) {
|
|
96
|
+
this.$emit('dataaction', action);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
var DayViewVerticalRow = DayViewVerticalRowVue2;
|
|
101
|
+
export { DayViewVerticalRow, DayViewVerticalRowVue2 };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
/** @hidden */
|
|
7
|
+
export interface DayViewVerticalSlotsRowProps {
|
|
8
|
+
groupIndex: number;
|
|
9
|
+
root: any;
|
|
10
|
+
rootIndex: number;
|
|
11
|
+
filtered: any[];
|
|
12
|
+
slotDivisions: number;
|
|
13
|
+
timeSlots: any[];
|
|
14
|
+
timeRanges: any[];
|
|
15
|
+
numberOfDays: number;
|
|
16
|
+
workDayStart: Date;
|
|
17
|
+
workDayEnd: Date;
|
|
18
|
+
workWeekStart: number;
|
|
19
|
+
workWeekEnd: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
export interface DayViewVerticalSlotsRowState {
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
export interface DayViewVerticalSlotsRowComputed {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export interface DayViewVerticalSlotsRowMethods {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @hidden
|
|
40
|
+
*/
|
|
41
|
+
export interface DayViewVerticalSlotsRowData {
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @hidden
|
|
45
|
+
*/
|
|
46
|
+
export interface DayViewVerticalSlotsRowAll extends Vue2type, DayViewVerticalSlotsRowMethods, DayViewVerticalSlotsRowData, DayViewVerticalSlotsRowComputed, DayViewVerticalSlotsRowState {
|
|
47
|
+
}
|
|
48
|
+
declare let DayViewVerticalSlotsRowVue2: ComponentOptions<DayViewVerticalSlotsRowAll, DefaultData<DayViewVerticalSlotsRowData>, DefaultMethods<DayViewVerticalSlotsRowAll>, DayViewVerticalSlotsRowComputed, RecordPropsDefinition<DayViewVerticalSlotsRowProps>>;
|
|
49
|
+
declare const DayViewVerticalSlotsRow: DefineComponent<DayViewVerticalSlotsRowProps, any, DayViewVerticalSlotsRowData, DayViewVerticalSlotsRowComputed, DayViewVerticalSlotsRowMethods, {}, {}, {}, string, DayViewVerticalSlotsRowProps, DayViewVerticalSlotsRowProps, {}>;
|
|
50
|
+
export { DayViewVerticalSlotsRow, DayViewVerticalSlotsRowVue2 };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import * as Vue from 'vue';
|
|
3
|
+
var allVue = Vue;
|
|
4
|
+
var gh = allVue.h;
|
|
5
|
+
import { GRID_OFFSET } from './MultiDayView';
|
|
6
|
+
import { SchedulerEditSlot } from '../../slots/SchedulerEditSlot';
|
|
7
|
+
import { isInTimeRange } from '../../utils';
|
|
8
|
+
import { DayViewRowContent } from './DayViewRowContent';
|
|
9
|
+
var FIRST_INDEX = 0; // tslint:enable:max-line-length
|
|
10
|
+
|
|
11
|
+
var DayViewVerticalSlotsRowVue2 = {
|
|
12
|
+
name: 'KendoDayViewVerticalSlotsRow',
|
|
13
|
+
props: {
|
|
14
|
+
groupIndex: Number,
|
|
15
|
+
root: Object,
|
|
16
|
+
rootIndex: Number,
|
|
17
|
+
filtered: Array,
|
|
18
|
+
slotDivisions: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 2
|
|
21
|
+
},
|
|
22
|
+
timeSlots: Array,
|
|
23
|
+
timeRanges: Array,
|
|
24
|
+
numberOfDays: Number,
|
|
25
|
+
workDayStart: Date,
|
|
26
|
+
workDayEnd: Date,
|
|
27
|
+
workWeekStart: Number,
|
|
28
|
+
workWeekEnd: Number
|
|
29
|
+
},
|
|
30
|
+
inject: {
|
|
31
|
+
ri: {
|
|
32
|
+
default: null
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
setup: !gh ? undefined : function () {
|
|
37
|
+
var v3 = !!gh;
|
|
38
|
+
return {
|
|
39
|
+
v3: v3
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
render: function render(createElement) {
|
|
44
|
+
var h = gh || createElement;
|
|
45
|
+
var EditSlot = this.$props.editSlot || SchedulerEditSlot;
|
|
46
|
+
var groupIndex = this.groupIndex;
|
|
47
|
+
var that = this;
|
|
48
|
+
var _a = this.$props,
|
|
49
|
+
timeSlots = _a.timeSlots,
|
|
50
|
+
root = _a.root,
|
|
51
|
+
rootIndex = _a.rootIndex,
|
|
52
|
+
slotDivisions = _a.slotDivisions,
|
|
53
|
+
filtered = _a.filtered,
|
|
54
|
+
workDayStart = _a.workDayStart,
|
|
55
|
+
workDayEnd = _a.workDayEnd,
|
|
56
|
+
numberOfDays = _a.numberOfDays,
|
|
57
|
+
workWeekStart = _a.workWeekStart,
|
|
58
|
+
workWeekEnd = _a.workWeekEnd,
|
|
59
|
+
viewSlot = _a.viewSlot,
|
|
60
|
+
form = _a.form,
|
|
61
|
+
editable = _a.editable;
|
|
62
|
+
return h("div", {
|
|
63
|
+
"class": "k-scheduler-row",
|
|
64
|
+
key: root.index
|
|
65
|
+
}, [h(DayViewRowContent, {
|
|
66
|
+
contentSlot: root,
|
|
67
|
+
attrs: this.v3 ? undefined : {
|
|
68
|
+
contentSlot: root,
|
|
69
|
+
isMaster: rootIndex % slotDivisions === 0,
|
|
70
|
+
isLast: (rootIndex + 1) % slotDivisions === 0,
|
|
71
|
+
timeHeaderCell: this.$props.timeHeaderCell
|
|
72
|
+
},
|
|
73
|
+
isMaster: rootIndex % slotDivisions === 0,
|
|
74
|
+
isLast: (rootIndex + 1) % slotDivisions === 0,
|
|
75
|
+
timeHeaderCell: this.$props.timeHeaderCell
|
|
76
|
+
}), this.timeRanges.map(function (_, rangeIndex) {
|
|
77
|
+
return timeSlots.filter(function (s) {
|
|
78
|
+
return s.index === root.index && s.group.index === groupIndex && s.range.index === rangeIndex;
|
|
79
|
+
}).map(function (slot) {
|
|
80
|
+
return h(EditSlot // slotRender={slot}
|
|
81
|
+
, {
|
|
82
|
+
viewSlot: viewSlot,
|
|
83
|
+
attrs: this.v3 ? undefined : {
|
|
84
|
+
viewSlot: viewSlot,
|
|
85
|
+
form: form,
|
|
86
|
+
index: slot.index,
|
|
87
|
+
start: slot.start,
|
|
88
|
+
end: slot.end,
|
|
89
|
+
zonedStart: slot.zonedStart,
|
|
90
|
+
zonedEnd: slot.zonedEnd,
|
|
91
|
+
items: slot.items,
|
|
92
|
+
group: slot.group,
|
|
93
|
+
range: slot.range,
|
|
94
|
+
isAllDay: slot.isAllDay,
|
|
95
|
+
row: filtered.length * (groupIndex || 0) + rootIndex + (groupIndex || 0) * GRID_OFFSET + GRID_OFFSET,
|
|
96
|
+
col: rangeIndex,
|
|
97
|
+
editable: editable,
|
|
98
|
+
isWorkHour: isInTimeRange(slot.zonedStart, workDayStart, workDayEnd),
|
|
99
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart)
|
|
100
|
+
},
|
|
101
|
+
form: form,
|
|
102
|
+
onDataaction: that.handleDataAction,
|
|
103
|
+
on: this.v3 ? undefined : {
|
|
104
|
+
"dataaction": that.handleDataAction
|
|
105
|
+
},
|
|
106
|
+
index: slot.index,
|
|
107
|
+
start: slot.start,
|
|
108
|
+
end: slot.end,
|
|
109
|
+
zonedStart: slot.zonedStart,
|
|
110
|
+
zonedEnd: slot.zonedEnd,
|
|
111
|
+
items: slot.items,
|
|
112
|
+
group: slot.group,
|
|
113
|
+
range: slot.range,
|
|
114
|
+
isAllDay: slot.isAllDay,
|
|
115
|
+
key: slot.start.getTime() + ":" + slot.group.index,
|
|
116
|
+
row: filtered.length * (groupIndex || 0) + rootIndex + (groupIndex || 0) * GRID_OFFSET + GRID_OFFSET,
|
|
117
|
+
col: rangeIndex,
|
|
118
|
+
editable: editable,
|
|
119
|
+
isWorkHour: isInTimeRange(slot.zonedStart, workDayStart, workDayEnd),
|
|
120
|
+
isWorkDay: 0 <= slot.zonedStart.getDay() + (numberOfDays - workWeekStart) && (slot.zonedStart.getDay() + (numberOfDays - workWeekStart)) % numberOfDays <= workWeekEnd + (numberOfDays - workWeekStart)
|
|
121
|
+
});
|
|
122
|
+
}, true);
|
|
123
|
+
}, this)]);
|
|
124
|
+
},
|
|
125
|
+
methods: {
|
|
126
|
+
handleDataAction: function handleDataAction(action) {
|
|
127
|
+
this.$emit('dataaction', action);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
var DayViewVerticalSlotsRow = DayViewVerticalSlotsRowVue2;
|
|
132
|
+
export { DayViewVerticalSlotsRow, DayViewVerticalSlotsRowVue2 };
|
|
@@ -113,7 +113,7 @@ export interface MultiDayViewProps extends SchedulerViewProps {
|
|
|
113
113
|
/**
|
|
114
114
|
* Overrides the `slot` prop of the Scheduler for the specified view only.
|
|
115
115
|
*/
|
|
116
|
-
|
|
116
|
+
slotRender?: any;
|
|
117
117
|
/**
|
|
118
118
|
* Overrides the `viewSlot` prop of the Scheduler for the specified view only.
|
|
119
119
|
*/
|