@progress/kendo-vue-scheduler 3.2.5 → 3.2.7-dev.202205021145
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/components/BaseView.js +14 -12
- package/dist/es/components/SchedulerForm.js +1 -1
- package/dist/es/components/header/view-selector/ViewSelectorList.js +9 -7
- package/dist/es/editors/SchedulerFormEditor.js +25 -2
- package/dist/es/hooks/use-items-focus.js +8 -8
- package/dist/es/hooks/use-items-selection.js +11 -11
- package/dist/es/hooks/use-slots-focus.js +20 -20
- package/dist/es/hooks/use-slots-selection.js +4 -4
- package/dist/es/hooks/useSlotExpand.js +1 -1
- package/dist/es/items/SchedulerEditItem.d.ts +1 -1
- package/dist/es/items/SchedulerEditItem.js +145 -119
- package/dist/es/items/SchedulerItem.d.ts +1 -0
- package/dist/es/items/SchedulerItem.js +408 -167
- package/dist/es/items/SchedulerViewItem.d.ts +1 -0
- package/dist/es/items/SchedulerViewItem.js +17 -17
- package/dist/es/items/hooks/use-drag-item.js +5 -3
- package/dist/es/items/hooks/use-resize-item.d.ts +2 -4
- package/dist/es/items/hooks/use-resize-item.js +278 -176
- package/dist/es/models/SchedulerView.d.ts +2 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/slots/SchedulerEditSlot.js +36 -48
- package/dist/es/slots/SchedulerSlot.d.ts +2 -0
- package/dist/es/slots/SchedulerSlot.js +46 -3
- package/dist/es/slots/SchedulerViewSlot.js +33 -5
- package/dist/es/tasks/SchedulerEditTask.js +14 -64
- package/dist/es/tasks/SchedulerTask.d.ts +12 -2
- package/dist/es/tasks/SchedulerTask.js +54 -3
- package/dist/es/tasks/SchedulerViewTask.js +21 -3
- package/dist/es/utils/index.d.ts +4 -0
- package/dist/es/utils/index.js +23 -14
- package/dist/es/views/common/SchedulerDrag.js +1 -0
- package/dist/es/views/common/SchedulerResize.js +69 -21
- package/dist/es/views/common/VerticalResourceIterator.js +2 -2
- package/dist/es/views/day/DayView.js +2 -1
- package/dist/es/views/day/MultiDayView.d.ts +4 -0
- package/dist/es/views/day/MultiDayView.js +86 -15
- package/dist/es/views/week/WeekView.js +2 -1
- package/dist/npm/components/BaseView.js +14 -12
- package/dist/npm/components/SchedulerForm.js +1 -1
- package/dist/npm/components/header/view-selector/ViewSelectorList.js +9 -7
- package/dist/npm/editors/SchedulerFormEditor.js +25 -2
- package/dist/npm/hooks/use-items-focus.js +8 -8
- package/dist/npm/hooks/use-items-selection.js +11 -11
- package/dist/npm/hooks/use-slots-focus.js +20 -20
- package/dist/npm/hooks/use-slots-selection.js +4 -4
- package/dist/npm/hooks/useSlotExpand.js +1 -1
- package/dist/npm/items/SchedulerEditItem.d.ts +1 -1
- package/dist/npm/items/SchedulerEditItem.js +144 -118
- package/dist/npm/items/SchedulerItem.d.ts +1 -0
- package/dist/npm/items/SchedulerItem.js +407 -166
- package/dist/npm/items/SchedulerViewItem.d.ts +1 -0
- package/dist/npm/items/SchedulerViewItem.js +17 -17
- package/dist/npm/items/hooks/use-drag-item.js +5 -3
- package/dist/npm/items/hooks/use-resize-item.d.ts +2 -4
- package/dist/npm/items/hooks/use-resize-item.js +281 -176
- package/dist/npm/models/SchedulerView.d.ts +2 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/slots/SchedulerEditSlot.js +35 -48
- package/dist/npm/slots/SchedulerSlot.d.ts +2 -0
- package/dist/npm/slots/SchedulerSlot.js +47 -3
- package/dist/npm/slots/SchedulerViewSlot.js +33 -5
- package/dist/npm/tasks/SchedulerEditTask.js +14 -66
- package/dist/npm/tasks/SchedulerTask.d.ts +12 -2
- package/dist/npm/tasks/SchedulerTask.js +56 -3
- package/dist/npm/tasks/SchedulerViewTask.js +21 -3
- package/dist/npm/utils/index.d.ts +4 -0
- package/dist/npm/utils/index.js +24 -15
- package/dist/npm/views/common/SchedulerDrag.js +1 -0
- package/dist/npm/views/common/SchedulerResize.js +69 -21
- package/dist/npm/views/common/VerticalResourceIterator.js +2 -2
- package/dist/npm/views/day/DayView.js +2 -1
- package/dist/npm/views/day/MultiDayView.d.ts +4 -0
- package/dist/npm/views/day/MultiDayView.js +87 -15
- package/dist/npm/views/week/WeekView.js +2 -1
- package/package.json +12 -12
|
@@ -5,8 +5,7 @@ var gh = allVue.h;
|
|
|
5
5
|
var inject = allVue.inject;
|
|
6
6
|
import { getDefaultSlots, Keys } from '@progress/kendo-vue-common';
|
|
7
7
|
import { DATA_ACTION } from '../Scheduler';
|
|
8
|
-
import { setField, getField, findFirstItem, isGroupped } from '../utils';
|
|
9
|
-
import { SchedulerForm } from '../components/SchedulerForm';
|
|
8
|
+
import { setField, getField, findFirstItem, isGroupped, compareSlots, findNextItem } from '../utils';
|
|
10
9
|
import { SchedulerViewSlot } from './SchedulerViewSlot';
|
|
11
10
|
import { SLOTS_FOCUS_ACTION, useEditable } from '../hooks';
|
|
12
11
|
import { SLOTS_SELECT_ACTION } from '../hooks/use-slots-selection'; // tslint:enable:max-line-length
|
|
@@ -15,6 +14,10 @@ var SchedulerEditSlotVue2 = {
|
|
|
15
14
|
name: 'KendoSchedulerEditSlot',
|
|
16
15
|
props: {
|
|
17
16
|
viewSlot: Object,
|
|
17
|
+
tabIndex: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: undefined
|
|
20
|
+
},
|
|
18
21
|
form: Object,
|
|
19
22
|
formItem: Object,
|
|
20
23
|
refTo: [Function, Object],
|
|
@@ -48,12 +51,25 @@ var SchedulerEditSlotVue2 = {
|
|
|
48
51
|
this.slot = null;
|
|
49
52
|
this.editableSlot = null;
|
|
50
53
|
},
|
|
54
|
+
provide: function provide() {
|
|
55
|
+
return {
|
|
56
|
+
ksEditFormSubmit: this.handleEditFormSubmit,
|
|
57
|
+
ksEditFormCancel: this.handleEditFormCancel,
|
|
58
|
+
ksEditFormClose: this.handleEditFormClose
|
|
59
|
+
};
|
|
60
|
+
},
|
|
51
61
|
inject: {
|
|
52
62
|
bv: {
|
|
53
63
|
default: null
|
|
54
64
|
},
|
|
55
65
|
ks: {
|
|
56
66
|
default: null
|
|
67
|
+
},
|
|
68
|
+
dispatchFocusedSlots: {
|
|
69
|
+
default: null
|
|
70
|
+
},
|
|
71
|
+
dispatchSelectedSlots: {
|
|
72
|
+
default: null
|
|
57
73
|
}
|
|
58
74
|
},
|
|
59
75
|
data: function data() {
|
|
@@ -63,11 +79,14 @@ var SchedulerEditSlotVue2 = {
|
|
|
63
79
|
},
|
|
64
80
|
computed: {
|
|
65
81
|
currentTabIndex: function currentTabIndex() {
|
|
66
|
-
var isFirst = this.bv.slots.length && this.bv.slots[0]
|
|
82
|
+
var isFirst = this.bv.slots.length && compareSlots(this.bv.slots[0], this);
|
|
67
83
|
return this.$props.tabIndex !== undefined ? this.$props.tabIndex === null ? undefined : this.$props.tabIndex : this.bv.selectedSlots.length === 0 ? isFirst && this.items.length === 0 ? 0 : undefined : undefined;
|
|
68
84
|
},
|
|
69
85
|
computedEditable: function computedEditable() {
|
|
70
86
|
return useEditable(this.$props.editable);
|
|
87
|
+
},
|
|
88
|
+
compFormItem: function compFormItem() {
|
|
89
|
+
return this.formItem !== undefined ? this.formItem : this.currentFormItem;
|
|
71
90
|
}
|
|
72
91
|
},
|
|
73
92
|
// @ts-ignore
|
|
@@ -79,8 +98,6 @@ var SchedulerEditSlotVue2 = {
|
|
|
79
98
|
},
|
|
80
99
|
// @ts-ignore
|
|
81
100
|
render: function render(createElement) {
|
|
82
|
-
var _this2 = this;
|
|
83
|
-
|
|
84
101
|
var _this = this;
|
|
85
102
|
|
|
86
103
|
var h = gh || createElement;
|
|
@@ -104,14 +121,9 @@ var SchedulerEditSlotVue2 = {
|
|
|
104
121
|
zonedStart = _a.zonedStart,
|
|
105
122
|
zonedEnd = _a.zonedEnd,
|
|
106
123
|
navDay = _a.navDay,
|
|
107
|
-
itemsPerSlot = _a.itemsPerSlot;
|
|
108
|
-
// const [slots] = useSchedulerViewSlotsContext();
|
|
109
|
-
// const [items] = useSchedulerViewItemsContext();
|
|
110
|
-
// const [selectedSlots, dispatchSlotsSelection] = useSchedulerViewSelectedSlotsContext();
|
|
111
|
-
// const [,dispatchFocusedSlots] = useSchedulerViewFocusedSlotsContext();
|
|
112
|
-
|
|
124
|
+
itemsPerSlot = _a.itemsPerSlot;
|
|
113
125
|
var selected = this.bv.selectedSlots.some(function (s) {
|
|
114
|
-
return
|
|
126
|
+
return compareSlots(s, _this);
|
|
115
127
|
});
|
|
116
128
|
return (// @ts-ignore function children
|
|
117
129
|
h(SchedulerViewSlot, {
|
|
@@ -136,7 +148,8 @@ var SchedulerEditSlotVue2 = {
|
|
|
136
148
|
selected: selected,
|
|
137
149
|
navDay: navDay,
|
|
138
150
|
itemsPerSlot: itemsPerSlot,
|
|
139
|
-
tabIndex: this.currentTabIndex
|
|
151
|
+
tabIndex: this.currentTabIndex,
|
|
152
|
+
formItem: this.compFormItem // Focus
|
|
140
153
|
|
|
141
154
|
},
|
|
142
155
|
isAllDay: this.isAllDay,
|
|
@@ -158,6 +171,7 @@ var SchedulerEditSlotVue2 = {
|
|
|
158
171
|
navDay: navDay,
|
|
159
172
|
itemsPerSlot: itemsPerSlot,
|
|
160
173
|
tabIndex: this.currentTabIndex,
|
|
174
|
+
formItem: this.compFormItem,
|
|
161
175
|
onFocus: this.handleFocus // Mouse
|
|
162
176
|
,
|
|
163
177
|
on: this.v3 ? undefined : {
|
|
@@ -171,34 +185,8 @@ var SchedulerEditSlotVue2 = {
|
|
|
171
185
|
onKeydown: this.handleKeyDown,
|
|
172
186
|
onShowmoreitems: this.handleShowMoreItemsClick
|
|
173
187
|
}, this.v3 ? function () {
|
|
174
|
-
return [defaultSlot
|
|
175
|
-
|
|
176
|
-
attrs: _this2.v3 ? undefined : {
|
|
177
|
-
dataItem: _this2.currentFormItem
|
|
178
|
-
},
|
|
179
|
-
onSubmit: _this2.handleEditFormSubmit,
|
|
180
|
-
on: _this2.v3 ? undefined : {
|
|
181
|
-
"submit": _this2.handleEditFormSubmit,
|
|
182
|
-
"close": _this2.handleEditFormClose,
|
|
183
|
-
"cancel": _this2.handleEditFormCancel
|
|
184
|
-
},
|
|
185
|
-
onClose: _this2.handleEditFormClose,
|
|
186
|
-
onCancel: _this2.handleEditFormCancel
|
|
187
|
-
})];
|
|
188
|
-
} : [defaultSlot, _this2.currentFormItem && h(SchedulerForm, {
|
|
189
|
-
dataItem: _this2.currentFormItem,
|
|
190
|
-
attrs: _this2.v3 ? undefined : {
|
|
191
|
-
dataItem: _this2.currentFormItem
|
|
192
|
-
},
|
|
193
|
-
onSubmit: _this2.handleEditFormSubmit,
|
|
194
|
-
on: _this2.v3 ? undefined : {
|
|
195
|
-
"submit": _this2.handleEditFormSubmit,
|
|
196
|
-
"close": _this2.handleEditFormClose,
|
|
197
|
-
"cancel": _this2.handleEditFormCancel
|
|
198
|
-
},
|
|
199
|
-
onClose: _this2.handleEditFormClose,
|
|
200
|
-
onCancel: _this2.handleEditFormCancel
|
|
201
|
-
})])
|
|
188
|
+
return [defaultSlot];
|
|
189
|
+
} : [defaultSlot])
|
|
202
190
|
);
|
|
203
191
|
},
|
|
204
192
|
methods: {
|
|
@@ -228,9 +216,9 @@ var SchedulerEditSlotVue2 = {
|
|
|
228
216
|
},
|
|
229
217
|
handleFocus: function handleFocus(event) {
|
|
230
218
|
if (this.computedEditable.select) {
|
|
231
|
-
this.
|
|
219
|
+
this.dispatchSelectedSlots({
|
|
232
220
|
type: SLOTS_SELECT_ACTION.select,
|
|
233
|
-
slot: this
|
|
221
|
+
slot: this
|
|
234
222
|
}, event.event);
|
|
235
223
|
}
|
|
236
224
|
|
|
@@ -256,7 +244,7 @@ var SchedulerEditSlotVue2 = {
|
|
|
256
244
|
event.event.preventDefault();
|
|
257
245
|
this.dispatchFocusedSlots({
|
|
258
246
|
type: SLOTS_FOCUS_ACTION.left,
|
|
259
|
-
slot: this
|
|
247
|
+
slot: this
|
|
260
248
|
}, event.event);
|
|
261
249
|
break;
|
|
262
250
|
|
|
@@ -268,7 +256,7 @@ var SchedulerEditSlotVue2 = {
|
|
|
268
256
|
event.event.preventDefault();
|
|
269
257
|
this.dispatchFocusedSlots({
|
|
270
258
|
type: SLOTS_FOCUS_ACTION.right,
|
|
271
|
-
slot: this
|
|
259
|
+
slot: this
|
|
272
260
|
}, event.event);
|
|
273
261
|
break;
|
|
274
262
|
|
|
@@ -280,7 +268,7 @@ var SchedulerEditSlotVue2 = {
|
|
|
280
268
|
event.event.preventDefault();
|
|
281
269
|
this.dispatchFocusedSlots({
|
|
282
270
|
type: SLOTS_FOCUS_ACTION.up,
|
|
283
|
-
slot: this
|
|
271
|
+
slot: this
|
|
284
272
|
}, event.event);
|
|
285
273
|
break;
|
|
286
274
|
|
|
@@ -292,7 +280,7 @@ var SchedulerEditSlotVue2 = {
|
|
|
292
280
|
event.event.preventDefault();
|
|
293
281
|
this.dispatchFocusedSlots({
|
|
294
282
|
type: SLOTS_FOCUS_ACTION.down,
|
|
295
|
-
slot: this
|
|
283
|
+
slot: this
|
|
296
284
|
}, event.event);
|
|
297
285
|
break;
|
|
298
286
|
|
|
@@ -306,7 +294,7 @@ var SchedulerEditSlotVue2 = {
|
|
|
306
294
|
break;
|
|
307
295
|
|
|
308
296
|
case Keys.tab:
|
|
309
|
-
nextItem = findFirstItem(event.target);
|
|
297
|
+
nextItem = findNextItem(findFirstItem(event.target), this.bv.items, false);
|
|
310
298
|
break;
|
|
311
299
|
|
|
312
300
|
default:
|
|
@@ -23,12 +23,28 @@ import { getDefaultSlots } from '@progress/kendo-vue-common';
|
|
|
23
23
|
import { COLLECTION_ACTION, formatEventTime } from '../utils';
|
|
24
24
|
import { provideIntlService } from '@progress/kendo-vue-intl';
|
|
25
25
|
import { ShowMoreItemsButton } from '../components/ShowMoreItemsButton';
|
|
26
|
+
import { SchedulerForm } from '../components/SchedulerForm';
|
|
26
27
|
var DAY_FORMAT = {
|
|
27
28
|
skeleton: 'dd'
|
|
28
29
|
}; // tslint:enable:max-line-length
|
|
29
30
|
|
|
30
31
|
var SchedulerSlotVue2 = {
|
|
31
32
|
name: 'KendoSchedulerSlot',
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
emits: {
|
|
35
|
+
focus: null,
|
|
36
|
+
blur: null,
|
|
37
|
+
click: null,
|
|
38
|
+
showmoreitems: null,
|
|
39
|
+
mouseover: null,
|
|
40
|
+
mouseout: null,
|
|
41
|
+
mouseenter: null,
|
|
42
|
+
mouseleave: null,
|
|
43
|
+
doubleclick: null,
|
|
44
|
+
keydown: null,
|
|
45
|
+
keypress: null,
|
|
46
|
+
keyup: null
|
|
47
|
+
},
|
|
32
48
|
props: {
|
|
33
49
|
refTo: [Function, Object],
|
|
34
50
|
items: Array,
|
|
@@ -44,6 +60,10 @@ var SchedulerSlotVue2 = {
|
|
|
44
60
|
default: true
|
|
45
61
|
},
|
|
46
62
|
selected: Boolean,
|
|
63
|
+
tabIndex: {
|
|
64
|
+
type: Number,
|
|
65
|
+
default: undefined
|
|
66
|
+
},
|
|
47
67
|
col: Number,
|
|
48
68
|
index: Number,
|
|
49
69
|
start: Date,
|
|
@@ -53,7 +73,8 @@ var SchedulerSlotVue2 = {
|
|
|
53
73
|
isAllDay: Boolean,
|
|
54
74
|
navDay: Boolean,
|
|
55
75
|
editable: [Object, Boolean],
|
|
56
|
-
itemsPerSlot: Number
|
|
76
|
+
itemsPerSlot: Number,
|
|
77
|
+
formItem: Object
|
|
57
78
|
},
|
|
58
79
|
computed: {
|
|
59
80
|
currentTabIndex: function currentTabIndex() {
|
|
@@ -82,6 +103,15 @@ var SchedulerSlotVue2 = {
|
|
|
82
103
|
},
|
|
83
104
|
slotDoubleClick: {
|
|
84
105
|
default: null
|
|
106
|
+
},
|
|
107
|
+
ksEditFormSubmit: {
|
|
108
|
+
default: null
|
|
109
|
+
},
|
|
110
|
+
ksEditFormCancel: {
|
|
111
|
+
default: null
|
|
112
|
+
},
|
|
113
|
+
ksEditFormClose: {
|
|
114
|
+
default: null
|
|
85
115
|
}
|
|
86
116
|
},
|
|
87
117
|
created: function created() {
|
|
@@ -179,7 +209,20 @@ var SchedulerSlotVue2 = {
|
|
|
179
209
|
on: this.v3 ? undefined : {
|
|
180
210
|
"click": this.handleShowMoreItemsClick
|
|
181
211
|
}
|
|
182
|
-
}), defaultSlot
|
|
212
|
+
}), defaultSlot, this.formItem && h(SchedulerForm, {
|
|
213
|
+
dataItem: this.formItem,
|
|
214
|
+
attrs: this.v3 ? undefined : {
|
|
215
|
+
dataItem: this.formItem
|
|
216
|
+
},
|
|
217
|
+
onSubmit: this.ksEditFormSubmit,
|
|
218
|
+
on: this.v3 ? undefined : {
|
|
219
|
+
"submit": this.ksEditFormSubmit,
|
|
220
|
+
"close": this.ksEditFormClose,
|
|
221
|
+
"cancel": this.ksEditFormCancel
|
|
222
|
+
},
|
|
223
|
+
onClose: this.ksEditFormClose,
|
|
224
|
+
onCancel: this.ksEditFormCancel
|
|
225
|
+
})]);
|
|
183
226
|
},
|
|
184
227
|
methods: {
|
|
185
228
|
handleShowMoreItemsClick: function handleShowMoreItemsClick(event) {
|
|
@@ -271,7 +314,7 @@ var SchedulerSlotVue2 = {
|
|
|
271
314
|
});
|
|
272
315
|
},
|
|
273
316
|
handleKeyPress: function handleKeyPress(event) {
|
|
274
|
-
this.$emit('
|
|
317
|
+
this.$emit('keypress', {
|
|
275
318
|
event: event,
|
|
276
319
|
target: {
|
|
277
320
|
props: __assign({}, this.$props),
|
|
@@ -9,6 +9,13 @@ import { getDefaultSlots, getTemplate } from '@progress/kendo-vue-common'; // ts
|
|
|
9
9
|
|
|
10
10
|
var SchedulerViewSlotVue2 = {
|
|
11
11
|
name: 'KendoSchedulerViewSlot',
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
emits: {
|
|
14
|
+
focus: null,
|
|
15
|
+
showmoreitems: null,
|
|
16
|
+
doubleclick: null,
|
|
17
|
+
keydown: null
|
|
18
|
+
},
|
|
12
19
|
props: {
|
|
13
20
|
refTo: [Function, Object],
|
|
14
21
|
items: Array,
|
|
@@ -35,7 +42,12 @@ var SchedulerViewSlotVue2 = {
|
|
|
35
42
|
isAllDay: Boolean,
|
|
36
43
|
navDay: Boolean,
|
|
37
44
|
editable: [Object, Boolean],
|
|
38
|
-
itemsPerSlot: Number
|
|
45
|
+
itemsPerSlot: Number,
|
|
46
|
+
formItem: Object,
|
|
47
|
+
tabIndex: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: undefined
|
|
50
|
+
}
|
|
39
51
|
},
|
|
40
52
|
created: function created() {
|
|
41
53
|
this.viewSlot = null;
|
|
@@ -86,8 +98,9 @@ var SchedulerViewSlotVue2 = {
|
|
|
86
98
|
var slotRender;
|
|
87
99
|
var slotRenderDefaultRendering = // @ts-ignore function children
|
|
88
100
|
h(SchedulerSlot, {
|
|
89
|
-
|
|
101
|
+
tabIndex: this.tabIndex,
|
|
90
102
|
attrs: this.v3 ? undefined : {
|
|
103
|
+
tabIndex: this.tabIndex,
|
|
91
104
|
isAllDay: this.isAllDay,
|
|
92
105
|
items: items,
|
|
93
106
|
row: row,
|
|
@@ -103,8 +116,11 @@ var SchedulerViewSlotVue2 = {
|
|
|
103
116
|
zonedEnd: zonedEnd,
|
|
104
117
|
navDay: navDay,
|
|
105
118
|
itemsPerSlot: itemsPerSlot,
|
|
106
|
-
editable: editable
|
|
119
|
+
editable: editable,
|
|
120
|
+
formItem: this.formItem,
|
|
121
|
+
selected: this.selected
|
|
107
122
|
},
|
|
123
|
+
isAllDay: this.isAllDay,
|
|
108
124
|
items: items,
|
|
109
125
|
row: row,
|
|
110
126
|
group: group,
|
|
@@ -120,12 +136,18 @@ var SchedulerViewSlotVue2 = {
|
|
|
120
136
|
navDay: navDay,
|
|
121
137
|
itemsPerSlot: itemsPerSlot,
|
|
122
138
|
editable: editable,
|
|
139
|
+
formItem: this.formItem,
|
|
123
140
|
onShowmoreitems: this.handleShowMoreItemsClick,
|
|
124
141
|
on: this.v3 ? undefined : {
|
|
125
142
|
"showmoreitems": this.handleShowMoreItemsClick,
|
|
126
|
-
"doubleclick": this.handleDoubleClick
|
|
143
|
+
"doubleclick": this.handleDoubleClick,
|
|
144
|
+
"keydown": this.handleKeyDown,
|
|
145
|
+
"focus": this.handleFocus
|
|
127
146
|
},
|
|
128
|
-
onDoubleclick: this.handleDoubleClick
|
|
147
|
+
onDoubleclick: this.handleDoubleClick,
|
|
148
|
+
onKeydown: this.handleKeyDown,
|
|
149
|
+
onFocus: this.handleFocus,
|
|
150
|
+
selected: this.selected
|
|
129
151
|
}, this.v3 ? function () {
|
|
130
152
|
return [defaultSlot];
|
|
131
153
|
} : [defaultSlot]);
|
|
@@ -146,6 +168,12 @@ var SchedulerViewSlotVue2 = {
|
|
|
146
168
|
},
|
|
147
169
|
handleDoubleClick: function handleDoubleClick(args) {
|
|
148
170
|
this.$emit('doubleclick', args);
|
|
171
|
+
},
|
|
172
|
+
handleKeyDown: function handleKeyDown(args) {
|
|
173
|
+
this.$emit('keydown', args);
|
|
174
|
+
},
|
|
175
|
+
handleFocus: function handleFocus(args) {
|
|
176
|
+
this.$emit('focus', args);
|
|
149
177
|
}
|
|
150
178
|
}
|
|
151
179
|
};
|
|
@@ -20,8 +20,6 @@ import { SchedulerViewTask } from './SchedulerViewTask';
|
|
|
20
20
|
import { useEditable } from '../hooks';
|
|
21
21
|
import { findMaster } from '../utils';
|
|
22
22
|
import { DATA_ACTION } from '../Scheduler';
|
|
23
|
-
import { SchedulerRemoveDialog } from '../components/SchedulerRemoveDialog';
|
|
24
|
-
import { SchedulerOccurrenceDialog } from '../components/SchedulerOccurrenceDialog';
|
|
25
23
|
import { getDefaultSlots } from '@progress/kendo-vue-common'; // tslint:enable:max-line-length
|
|
26
24
|
|
|
27
25
|
var SchedulerEditTaskVue2 = {
|
|
@@ -89,7 +87,11 @@ var SchedulerEditTaskVue2 = {
|
|
|
89
87
|
et: this.et,
|
|
90
88
|
removeTask: this.handleRemoveItemChange,
|
|
91
89
|
removeDialog: this.handleRemoveDialogChange,
|
|
92
|
-
occurrenceDialog: this.handleOccurrenceDialogChange
|
|
90
|
+
occurrenceDialog: this.handleOccurrenceDialogChange,
|
|
91
|
+
ksCancel: this.handleCancel,
|
|
92
|
+
ksSeriesClick: this.handleSeriesClick,
|
|
93
|
+
ksOccurrenceClick: this.handleOccurrenceClick,
|
|
94
|
+
ksRemoveConfirm: this.handleRemoveConfirm
|
|
93
95
|
};
|
|
94
96
|
},
|
|
95
97
|
data: function data() {
|
|
@@ -129,8 +131,6 @@ var SchedulerEditTaskVue2 = {
|
|
|
129
131
|
},
|
|
130
132
|
// @ts-ignore
|
|
131
133
|
render: function render(createElement) {
|
|
132
|
-
var _this = this;
|
|
133
|
-
|
|
134
134
|
var h = gh || createElement;
|
|
135
135
|
var defaultSlot = getDefaultSlots(this);
|
|
136
136
|
|
|
@@ -178,8 +178,11 @@ var SchedulerEditTaskVue2 = {
|
|
|
178
178
|
recurrenceRule: this.$props.recurrenceRule,
|
|
179
179
|
recurrenceId: this.$props.recurrenceId,
|
|
180
180
|
dataItem: this.$props.dataItem,
|
|
181
|
+
removeItem: this.compRemoveItem,
|
|
181
182
|
task: this.$props.task,
|
|
182
|
-
editable: this.$props.editable
|
|
183
|
+
editable: this.$props.editable,
|
|
184
|
+
showOccurrenceDialog: this.compShowOccurrenceDialog,
|
|
185
|
+
showRemoveDialog: this.compShowRemoveDialog
|
|
183
186
|
},
|
|
184
187
|
tabIndex: this.$props.tabIndex,
|
|
185
188
|
head: this.$props.head,
|
|
@@ -206,71 +209,18 @@ var SchedulerEditTaskVue2 = {
|
|
|
206
209
|
recurrenceRule: this.$props.recurrenceRule,
|
|
207
210
|
recurrenceId: this.$props.recurrenceId,
|
|
208
211
|
dataItem: this.$props.dataItem,
|
|
212
|
+
removeItem: this.compRemoveItem,
|
|
209
213
|
task: this.$props.task,
|
|
210
214
|
editable: this.$props.editable,
|
|
215
|
+
showOccurrenceDialog: this.compShowOccurrenceDialog,
|
|
216
|
+
showRemoveDialog: this.compShowRemoveDialog,
|
|
211
217
|
onRemoveclick: this.handleRemoveClick,
|
|
212
218
|
on: this.v3 ? undefined : {
|
|
213
219
|
"removeclick": this.handleRemoveClick
|
|
214
220
|
}
|
|
215
221
|
}, this.v3 ? function () {
|
|
216
|
-
return [defaultSlot
|
|
217
|
-
|
|
218
|
-
attrs: _this.v3 ? undefined : {
|
|
219
|
-
dataItem: _this.compRemoveItem,
|
|
220
|
-
isRemove: _this.compRemoveItem !== null
|
|
221
|
-
},
|
|
222
|
-
isRemove: _this.compRemoveItem !== null,
|
|
223
|
-
onClose: _this.handleCancel,
|
|
224
|
-
on: _this.v3 ? undefined : {
|
|
225
|
-
"close": _this.handleCancel,
|
|
226
|
-
"occurrenceclose": _this.handleOccurrenceClick,
|
|
227
|
-
"seriesclose": _this.handleSeriesClick
|
|
228
|
-
},
|
|
229
|
-
onOccurrenceclose: _this.handleOccurrenceClick,
|
|
230
|
-
onSeriesclose: _this.handleSeriesClick
|
|
231
|
-
}), _this.compShowRemoveDialog && h(SchedulerRemoveDialog, {
|
|
232
|
-
dataItem: _this.compRemoveItem,
|
|
233
|
-
attrs: _this.v3 ? undefined : {
|
|
234
|
-
dataItem: _this.compRemoveItem
|
|
235
|
-
},
|
|
236
|
-
onClose: _this.handleCancel,
|
|
237
|
-
on: _this.v3 ? undefined : {
|
|
238
|
-
"close": _this.handleCancel,
|
|
239
|
-
"cancel": _this.handleCancel,
|
|
240
|
-
"confirm": _this.handleRemoveConfirm
|
|
241
|
-
},
|
|
242
|
-
onCancel: _this.handleCancel,
|
|
243
|
-
onConfirm: _this.handleRemoveConfirm
|
|
244
|
-
})];
|
|
245
|
-
} : [defaultSlot, _this.compShowOccurrenceDialog && h(SchedulerOccurrenceDialog, {
|
|
246
|
-
dataItem: _this.compRemoveItem,
|
|
247
|
-
attrs: _this.v3 ? undefined : {
|
|
248
|
-
dataItem: _this.compRemoveItem,
|
|
249
|
-
isRemove: _this.compRemoveItem !== null
|
|
250
|
-
},
|
|
251
|
-
isRemove: _this.compRemoveItem !== null,
|
|
252
|
-
onClose: _this.handleCancel,
|
|
253
|
-
on: _this.v3 ? undefined : {
|
|
254
|
-
"close": _this.handleCancel,
|
|
255
|
-
"occurrenceclose": _this.handleOccurrenceClick,
|
|
256
|
-
"seriesclose": _this.handleSeriesClick
|
|
257
|
-
},
|
|
258
|
-
onOccurrenceclose: _this.handleOccurrenceClick,
|
|
259
|
-
onSeriesclose: _this.handleSeriesClick
|
|
260
|
-
}), _this.compShowRemoveDialog && h(SchedulerRemoveDialog, {
|
|
261
|
-
dataItem: _this.compRemoveItem,
|
|
262
|
-
attrs: _this.v3 ? undefined : {
|
|
263
|
-
dataItem: _this.compRemoveItem
|
|
264
|
-
},
|
|
265
|
-
onClose: _this.handleCancel,
|
|
266
|
-
on: _this.v3 ? undefined : {
|
|
267
|
-
"close": _this.handleCancel,
|
|
268
|
-
"cancel": _this.handleCancel,
|
|
269
|
-
"confirm": _this.handleRemoveConfirm
|
|
270
|
-
},
|
|
271
|
-
onCancel: _this.handleCancel,
|
|
272
|
-
onConfirm: _this.handleRemoveConfirm
|
|
273
|
-
})])
|
|
222
|
+
return [defaultSlot];
|
|
223
|
+
} : [defaultSlot])
|
|
274
224
|
);
|
|
275
225
|
},
|
|
276
226
|
methods: {
|
|
@@ -8,8 +8,6 @@ import { Item, SchedulerTaskMouseEvent, EditableProp } from '../models';
|
|
|
8
8
|
* Represents the props of the Kendo UI for Vue [SchedulerTask]({% slug api_scheduler_schedulertask %}) component.
|
|
9
9
|
*/
|
|
10
10
|
export interface SchedulerTaskProps extends Item {
|
|
11
|
-
/** @hidden */
|
|
12
|
-
refTo: any;
|
|
13
11
|
/**
|
|
14
12
|
* Specifies the `id` of the wrapping element of the SchedulerTask.
|
|
15
13
|
*/
|
|
@@ -35,6 +33,18 @@ export interface SchedulerTaskProps extends Item {
|
|
|
35
33
|
* The `delete` icon is rendered only when `props.editable` or `props.editable.remove` is `true`
|
|
36
34
|
*/
|
|
37
35
|
onRemoveClick?: (event: SchedulerTaskMouseEvent) => void;
|
|
36
|
+
/** @hidden */
|
|
37
|
+
refTo: any;
|
|
38
|
+
/** @hidden */
|
|
39
|
+
removeDialog?: any;
|
|
40
|
+
/** @hidden */
|
|
41
|
+
occurrenceDialog?: any;
|
|
42
|
+
/** @hidden */
|
|
43
|
+
showRemoveDialog?: boolean;
|
|
44
|
+
/** @hidden */
|
|
45
|
+
showOccurrenceDialog?: boolean;
|
|
46
|
+
/** @hidden */
|
|
47
|
+
removeItem?: object;
|
|
38
48
|
}
|
|
39
49
|
/**
|
|
40
50
|
* Represents the props of the Kendo UI for Vue [SchedulerTask]({% slug api_scheduler_schedulertask %}) component.
|
|
@@ -22,7 +22,9 @@ var inject = allVue.inject;
|
|
|
22
22
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
23
23
|
import { deleteTitle, messages } from '../messages';
|
|
24
24
|
import { getDefaultSlots } from '@progress/kendo-vue-common';
|
|
25
|
-
import { useEditable } from '../hooks';
|
|
25
|
+
import { useEditable } from '../hooks';
|
|
26
|
+
import { SchedulerOccurrenceDialog } from '../components/SchedulerOccurrenceDialog';
|
|
27
|
+
import { SchedulerRemoveDialog } from '../components/SchedulerRemoveDialog'; // tslint:enable:max-line-length
|
|
26
28
|
|
|
27
29
|
var SchedulerTaskVue2 = {
|
|
28
30
|
name: 'KendoSchedulerTask',
|
|
@@ -54,7 +56,16 @@ var SchedulerTaskVue2 = {
|
|
|
54
56
|
recurrenceRule: String,
|
|
55
57
|
recurrenceId: [String, Number],
|
|
56
58
|
dataItem: Object,
|
|
57
|
-
|
|
59
|
+
removeItem: Object,
|
|
60
|
+
editable: [Object, Boolean],
|
|
61
|
+
showOccurrenceDialog: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: undefined
|
|
64
|
+
},
|
|
65
|
+
showRemoveDialog: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: undefined
|
|
68
|
+
}
|
|
58
69
|
},
|
|
59
70
|
inject: {
|
|
60
71
|
kendoLocalizationService: {
|
|
@@ -65,6 +76,18 @@ var SchedulerTaskVue2 = {
|
|
|
65
76
|
},
|
|
66
77
|
taskDoubleClick: {
|
|
67
78
|
default: null
|
|
79
|
+
},
|
|
80
|
+
ksCancel: {
|
|
81
|
+
default: null
|
|
82
|
+
},
|
|
83
|
+
ksSeriesClick: {
|
|
84
|
+
default: null
|
|
85
|
+
},
|
|
86
|
+
ksOccurrenceClick: {
|
|
87
|
+
default: null
|
|
88
|
+
},
|
|
89
|
+
ksRemoveConfirm: {
|
|
90
|
+
default: null
|
|
68
91
|
}
|
|
69
92
|
},
|
|
70
93
|
created: function created() {
|
|
@@ -127,7 +150,35 @@ var SchedulerTaskVue2 = {
|
|
|
127
150
|
}
|
|
128
151
|
}, [h("span", {
|
|
129
152
|
"class": "k-icon k-i-close"
|
|
130
|
-
})])
|
|
153
|
+
})]), this.showOccurrenceDialog && h(SchedulerOccurrenceDialog, {
|
|
154
|
+
dataItem: this.removeItem,
|
|
155
|
+
attrs: this.v3 ? undefined : {
|
|
156
|
+
dataItem: this.removeItem,
|
|
157
|
+
isRemove: this.removeItem !== null
|
|
158
|
+
},
|
|
159
|
+
isRemove: this.removeItem !== null,
|
|
160
|
+
onClose: this.ksCancel,
|
|
161
|
+
on: this.v3 ? undefined : {
|
|
162
|
+
"close": this.ksCancel,
|
|
163
|
+
"occurrenceclose": this.ksOccurrenceClick,
|
|
164
|
+
"seriesclose": this.ksSeriesClick
|
|
165
|
+
},
|
|
166
|
+
onOccurrenceclose: this.ksOccurrenceClick,
|
|
167
|
+
onSeriesclose: this.ksSeriesClick
|
|
168
|
+
}), this.showRemoveDialog && h(SchedulerRemoveDialog, {
|
|
169
|
+
dataItem: this.removeItem,
|
|
170
|
+
attrs: this.v3 ? undefined : {
|
|
171
|
+
dataItem: this.removeItem
|
|
172
|
+
},
|
|
173
|
+
onClose: this.ksCancel,
|
|
174
|
+
on: this.v3 ? undefined : {
|
|
175
|
+
"close": this.ksCancel,
|
|
176
|
+
"cancel": this.ksCancel,
|
|
177
|
+
"confirm": this.ksRemoveConfirm
|
|
178
|
+
},
|
|
179
|
+
onCancel: this.ksCancel,
|
|
180
|
+
onConfirm: this.ksRemoveConfirm
|
|
181
|
+
})]);
|
|
131
182
|
},
|
|
132
183
|
methods: {
|
|
133
184
|
handleRemoveClick: function handleRemoveClick(event) {
|
|
@@ -36,8 +36,17 @@ var SchedulerViewTaskVue2 = {
|
|
|
36
36
|
recurrenceRule: String,
|
|
37
37
|
recurrenceId: [String, Number],
|
|
38
38
|
dataItem: Object,
|
|
39
|
+
removeItem: Object,
|
|
39
40
|
task: [String, Function, Object],
|
|
40
|
-
editable: [Object, Boolean]
|
|
41
|
+
editable: [Object, Boolean],
|
|
42
|
+
showOccurrenceDialog: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: undefined
|
|
45
|
+
},
|
|
46
|
+
showRemoveDialog: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: undefined
|
|
49
|
+
}
|
|
41
50
|
},
|
|
42
51
|
// @ts-ignore
|
|
43
52
|
setup: !gh ? undefined : function () {
|
|
@@ -81,7 +90,10 @@ var SchedulerViewTaskVue2 = {
|
|
|
81
90
|
recurrenceRule: this.$props.recurrenceRule,
|
|
82
91
|
recurrenceId: this.$props.recurrenceId,
|
|
83
92
|
dataItem: this.$props.dataItem,
|
|
84
|
-
|
|
93
|
+
removeItem: this.removeItem,
|
|
94
|
+
editable: this.$props.editable,
|
|
95
|
+
showOccurrenceDialog: this.showOccurrenceDialog,
|
|
96
|
+
showRemoveDialog: this.showRemoveDialog
|
|
85
97
|
},
|
|
86
98
|
tabIndex: this.$props.tabIndex,
|
|
87
99
|
head: this.$props.head,
|
|
@@ -108,7 +120,10 @@ var SchedulerViewTaskVue2 = {
|
|
|
108
120
|
recurrenceRule: this.$props.recurrenceRule,
|
|
109
121
|
recurrenceId: this.$props.recurrenceId,
|
|
110
122
|
dataItem: this.$props.dataItem,
|
|
123
|
+
removeItem: this.removeItem,
|
|
111
124
|
editable: this.$props.editable,
|
|
125
|
+
showOccurrenceDialog: this.showOccurrenceDialog,
|
|
126
|
+
showRemoveDialog: this.showRemoveDialog,
|
|
112
127
|
onRemoveclick: this.handleRemoveClick,
|
|
113
128
|
on: this.v3 ? undefined : {
|
|
114
129
|
"removeclick": this.handleRemoveClick
|
|
@@ -120,7 +135,10 @@ var SchedulerViewTaskVue2 = {
|
|
|
120
135
|
h: h,
|
|
121
136
|
template: this.$props.task,
|
|
122
137
|
defaultRendering: taskRenderDefaultRendering,
|
|
123
|
-
defaultSlots: defaultSlot
|
|
138
|
+
defaultSlots: defaultSlot,
|
|
139
|
+
additionalListeners: {
|
|
140
|
+
'removeclick': this.handleRemoveClick
|
|
141
|
+
}
|
|
124
142
|
});
|
|
125
143
|
return taskRender;
|
|
126
144
|
},
|
package/dist/es/utils/index.d.ts
CHANGED
|
@@ -165,6 +165,10 @@ export declare const noop: (..._args: any) => void;
|
|
|
165
165
|
/** @hidden */
|
|
166
166
|
export declare const findFirstItem: (current: any) => SchedulerItemHandle | null;
|
|
167
167
|
/** @hidden */
|
|
168
|
+
export declare const compareItems: (f: any, s: any, ignoreIsAllDay?: boolean) => boolean;
|
|
169
|
+
/** @hidden */
|
|
170
|
+
export declare const compareSlots: (f: any, s: any) => boolean;
|
|
171
|
+
/** @hidden */
|
|
168
172
|
export declare const findNextItem: (ref: any, all: any, ignoreIsAllDay?: boolean | undefined, backwards?: boolean) => any;
|
|
169
173
|
/**
|
|
170
174
|
* @hidden
|