@progress/kendo-vue-scheduler 3.2.6 → 3.2.8-dev.202205030909
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 +3 -0
- package/dist/es/components/BaseView.js +14 -12
- package/dist/es/components/header/view-selector/ViewSelectorList.js +9 -7
- 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 +260 -205
- package/dist/es/items/SchedulerItem.d.ts +1 -0
- package/dist/es/items/SchedulerItem.js +409 -168
- 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 +21 -16
- package/dist/es/slots/SchedulerSlot.js +20 -1
- package/dist/es/slots/SchedulerViewSlot.js +30 -5
- 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 +70 -21
- package/dist/es/views/common/VerticalResourceIterator.js +2 -2
- package/dist/es/views/day/DayView.js +5 -1
- package/dist/es/views/day/MultiDayView.d.ts +4 -0
- package/dist/es/views/day/MultiDayView.js +87 -15
- package/dist/es/views/month/MonthView.js +1 -0
- package/dist/es/views/time/MultiDayTimelineView.js +1 -0
- package/dist/es/views/time/TimelineView.js +3 -0
- package/dist/es/views/week/WeekView.js +5 -1
- package/dist/es/views/week/WorkWeekView.js +3 -0
- package/dist/npm/Scheduler.js +3 -0
- package/dist/npm/components/BaseView.js +14 -12
- package/dist/npm/components/header/view-selector/ViewSelectorList.js +9 -7
- 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 +258 -203
- package/dist/npm/items/SchedulerItem.d.ts +1 -0
- package/dist/npm/items/SchedulerItem.js +408 -167
- 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 +20 -15
- package/dist/npm/slots/SchedulerSlot.js +20 -1
- package/dist/npm/slots/SchedulerViewSlot.js +30 -5
- 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 +70 -21
- package/dist/npm/views/common/VerticalResourceIterator.js +2 -2
- package/dist/npm/views/day/DayView.js +5 -1
- package/dist/npm/views/day/MultiDayView.d.ts +4 -0
- package/dist/npm/views/day/MultiDayView.js +88 -15
- package/dist/npm/views/month/MonthView.js +1 -0
- package/dist/npm/views/time/MultiDayTimelineView.js +1 -0
- package/dist/npm/views/time/TimelineView.js +3 -0
- package/dist/npm/views/week/WeekView.js +5 -1
- package/dist/npm/views/week/WorkWeekView.js +3 -0
- package/package.json +12 -12
|
@@ -20,7 +20,7 @@ var allVue = Vue;
|
|
|
20
20
|
var gh = allVue.h;
|
|
21
21
|
var inject = allVue.inject;
|
|
22
22
|
import { DATA_ACTION } from '../Scheduler';
|
|
23
|
-
import { clone, Keys } from '@progress/kendo-vue-common';
|
|
23
|
+
import { clone, Keys, getDefaultSlots, getTemplate } from '@progress/kendo-vue-common';
|
|
24
24
|
import { SchedulerViewItem } from './SchedulerViewItem';
|
|
25
25
|
import { ITEMS_FOCUS_ACTION, SLOTS_FOCUS_ACTION, useEditable } from '../hooks';
|
|
26
26
|
import { FORM_ITEM_ACTION } from './hooks/use-form-item';
|
|
@@ -31,12 +31,15 @@ import { DRAG_ITEM_ACTION, useDragItem } from './hooks/use-drag-item';
|
|
|
31
31
|
import { RESIZE_ITEM_ACTION, useResizeItem } from './hooks/use-resize-item';
|
|
32
32
|
import { seriesReducer, SERIES_ACTION, useSeries } from './hooks/use-series';
|
|
33
33
|
import { ITEMS_SELECT_ACTION } from '../hooks/use-items-selection';
|
|
34
|
-
import { findMaster } from '../utils'; // tslint:enable:max-line-length
|
|
34
|
+
import { compareItems, findMaster } from '../utils'; // tslint:enable:max-line-length
|
|
35
35
|
|
|
36
36
|
var SchedulerEditItemVue2 = {
|
|
37
37
|
name: 'KendoSchedulerEditItem',
|
|
38
38
|
props: {
|
|
39
|
-
tabIndex:
|
|
39
|
+
tabIndex: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: undefined
|
|
42
|
+
},
|
|
40
43
|
item: [String, Function, Object],
|
|
41
44
|
viewItem: [String, Function, Object],
|
|
42
45
|
drag: [String, Function, Object],
|
|
@@ -101,6 +104,15 @@ var SchedulerEditItemVue2 = {
|
|
|
101
104
|
},
|
|
102
105
|
ks: {
|
|
103
106
|
default: null
|
|
107
|
+
},
|
|
108
|
+
dispatchFocusedItems: {
|
|
109
|
+
default: null
|
|
110
|
+
},
|
|
111
|
+
dispatchFocusedSlots: {
|
|
112
|
+
default: null
|
|
113
|
+
},
|
|
114
|
+
dispatchSelectedItems: {
|
|
115
|
+
default: null
|
|
104
116
|
}
|
|
105
117
|
},
|
|
106
118
|
provide: function provide() {
|
|
@@ -124,7 +136,6 @@ var SchedulerEditItemVue2 = {
|
|
|
124
136
|
showRemoveDialog: this.showRemoveDialog,
|
|
125
137
|
showOccurrenceDialog: this.showOccurrenceDialog
|
|
126
138
|
},
|
|
127
|
-
currentTabIndex: this.$props.tabIndex,
|
|
128
139
|
currentFormItem: null,
|
|
129
140
|
currentSelected: null,
|
|
130
141
|
currentSeries: null,
|
|
@@ -137,6 +148,10 @@ var SchedulerEditItemVue2 = {
|
|
|
137
148
|
};
|
|
138
149
|
},
|
|
139
150
|
computed: {
|
|
151
|
+
currentTabIndex: function currentTabIndex() {
|
|
152
|
+
var isFirst = this.bv.items.length && this.bv.items[0].dataItem.id === this.dataItem.id;
|
|
153
|
+
return this.$props.tabIndex !== undefined ? this.$props.tabIndex === null ? undefined : this.$props.tabIndex : this.bv.selectedItems.length === 0 ? isFirst ? 0 : undefined : undefined;
|
|
154
|
+
},
|
|
140
155
|
compSelected: function compSelected() {
|
|
141
156
|
return this.selected !== undefined ? this.selected : this.currentSelected;
|
|
142
157
|
},
|
|
@@ -167,10 +182,6 @@ var SchedulerEditItemVue2 = {
|
|
|
167
182
|
return _a = {}, _a[SERIES_ACTION.set] = this.dispatchSeries, _a[SERIES_ACTION.toggle] = this.dispatchSeries, _a[SERIES_ACTION.reset] = this.dispatchSeries, _a[ITEMS_SELECT_ACTION.select] = this.dispatchItemSelection, _a[ITEMS_SELECT_ACTION.add] = this.dispatchItemSelection, _a[ITEMS_SELECT_ACTION.remove] = this.dispatchItemSelection, _a[ITEMS_SELECT_ACTION.reset] = this.dispatchItemSelection, _a[ITEMS_SELECT_ACTION.selectNext] = this.dispatchItemSelection, _a[ITEMS_SELECT_ACTION.selectPrev] = this.dispatchItemSelection, _a[FORM_ITEM_ACTION.set] = this.dispatchFormItem, _a[FORM_ITEM_ACTION.setMaster] = this.dispatchFormItem, _a[FORM_ITEM_ACTION.reset] = this.dispatchFormItem, _a[FORM_ITEM_ACTION.complete] = this.dispatchFormItem, _a[REMOVE_ITEM_ACTION.set] = this.dispatchRemoveItem, _a[REMOVE_ITEM_ACTION.reset] = this.dispatchRemoveItem, _a[REMOVE_ITEM_ACTION.complete] = this.dispatchRemoveItem, _a[SHOW_OCCURRENCE_DIALOG_ACTION.close] = this.dispatchShowOccurrenceDialog, _a[SHOW_OCCURRENCE_DIALOG_ACTION.open] = this.dispatchShowOccurrenceDialog, _a[SHOW_OCCURRENCE_DIALOG_ACTION.set] = this.dispatchShowOccurrenceDialog, _a[SHOW_OCCURRENCE_DIALOG_ACTION.toggle] = this.dispatchShowOccurrenceDialog, _a[SHOW_OCCURRENCE_DIALOG_ACTION.reset] = this.dispatchShowOccurrenceDialog, _a[SHOW_REMOVE_DIALOG_ACTION.close] = this.dispatchShowRemoveDialog, _a[SHOW_REMOVE_DIALOG_ACTION.open] = this.dispatchShowRemoveDialog, _a[SHOW_REMOVE_DIALOG_ACTION.set] = this.dispatchShowRemoveDialog, _a[SHOW_REMOVE_DIALOG_ACTION.toggle] = this.dispatchShowRemoveDialog, _a[SHOW_REMOVE_DIALOG_ACTION.reset] = this.dispatchShowRemoveDialog, _a[DRAG_ITEM_ACTION.start] = this.dispatchDragItem, _a[DRAG_ITEM_ACTION.drag] = this.dispatchDragItem, _a[DRAG_ITEM_ACTION.complete] = this.dispatchDragItem, _a[DRAG_ITEM_ACTION.completeOccurrence] = this.dispatchDragItem, _a[DRAG_ITEM_ACTION.completeSeries] = this.dispatchDragItem, _a[DRAG_ITEM_ACTION.set] = this.dispatchDragItem, _a[DRAG_ITEM_ACTION.reset] = this.dispatchDragItem, _a[DRAG_ITEM_ACTION.dragSelected] = this.dispatchDragItem, _a[RESIZE_ITEM_ACTION.start] = this.dispatchResizeItem, _a[RESIZE_ITEM_ACTION.startDrag] = this.dispatchResizeItem, _a[RESIZE_ITEM_ACTION.startDragSelected] = this.dispatchResizeItem, _a[RESIZE_ITEM_ACTION.endDrag] = this.dispatchResizeItem, _a[RESIZE_ITEM_ACTION.endDragSelected] = this.dispatchResizeItem, _a[RESIZE_ITEM_ACTION.complete] = this.dispatchResizeItem, _a[RESIZE_ITEM_ACTION.completeOccurrence] = this.dispatchResizeItem, _a[RESIZE_ITEM_ACTION.completeSeries] = this.dispatchResizeItem, _a[RESIZE_ITEM_ACTION.set] = this.dispatchResizeItem, _a[RESIZE_ITEM_ACTION.reset] = this.dispatchResizeItem, _a[ITEMS_FOCUS_ACTION.next] = this.dispatchViewItemsFocus, _a[ITEMS_FOCUS_ACTION.prev] = this.dispatchViewItemsFocus, _a[SLOTS_FOCUS_ACTION.left] = this.dispatchViewSlotsFocus, _a[SLOTS_FOCUS_ACTION.right] = this.dispatchViewSlotsFocus, _a[SLOTS_FOCUS_ACTION.up] = this.dispatchViewSlotsFocus, _a[SLOTS_FOCUS_ACTION.down] = this.dispatchViewSlotsFocus, _a.null = function () {}, _a;
|
|
168
183
|
}
|
|
169
184
|
},
|
|
170
|
-
updated: function updated() {
|
|
171
|
-
var isFirst = this.bv.items.length && this.bv.items[0] === this.item;
|
|
172
|
-
this.currentTabindex = this.$props.tabIndex !== undefined ? this.$props.tabIndex === null ? undefined : this.$props.tabIndex : this.bv.selectedItems.length === 0 ? isFirst ? 0 : undefined : undefined; // }, [items, props.tabIndex, selectedItems.length]);
|
|
173
|
-
},
|
|
174
185
|
// @ts-ignore
|
|
175
186
|
setup: !gh ? undefined : function () {
|
|
176
187
|
var v3 = !!gh;
|
|
@@ -182,7 +193,8 @@ var SchedulerEditItemVue2 = {
|
|
|
182
193
|
render: function render(createElement) {
|
|
183
194
|
var _this = this;
|
|
184
195
|
|
|
185
|
-
var h = gh || createElement;
|
|
196
|
+
var h = gh || createElement;
|
|
197
|
+
var defaultSlot = getDefaultSlots(this); // tslint:enable:max-line-length
|
|
186
198
|
|
|
187
199
|
var _a = this.$props,
|
|
188
200
|
onDataaction = _a.onDataaction,
|
|
@@ -231,87 +243,39 @@ var SchedulerEditItemVue2 = {
|
|
|
231
243
|
// onDataaction },
|
|
232
244
|
// [null, propDragItem, onDragItemChange]
|
|
233
245
|
// );
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}, [null, propResizeItem, onResizeItemChange]),
|
|
240
|
-
resizeItem = _c[0],
|
|
241
|
-
setResizeItem = _c[1],
|
|
242
|
-
dispatchResizeItem = _c[2]; // const [removeItem, setRemoveItem, dispatchRemoveItem] = useRemoveItem(
|
|
246
|
+
// const [resizeItem, setResizeItem, dispatchResizeItem] = useResizeItem(
|
|
247
|
+
// { dataItem: this.$props.dataItem, onDataaction },
|
|
248
|
+
// [null, propResizeItem, onResizeItemChange]
|
|
249
|
+
// );
|
|
250
|
+
// const [removeItem, setRemoveItem, dispatchRemoveItem] = useRemoveItem(
|
|
243
251
|
// { series, onDataaction},
|
|
244
252
|
// [null, propRemoveItem, onRemoveItemChange]
|
|
245
253
|
// );
|
|
246
254
|
|
|
247
255
|
|
|
248
|
-
var
|
|
249
|
-
showRemoveDialog =
|
|
250
|
-
setShowRemoveDialog =
|
|
251
|
-
dispatchShowRemoveDialog =
|
|
256
|
+
var _c = useShowRemoveDialog(false, propShowRemoveDialog, onShowRemoveDialogChange),
|
|
257
|
+
showRemoveDialog = _c[0],
|
|
258
|
+
setShowRemoveDialog = _c[1],
|
|
259
|
+
dispatchShowRemoveDialog = _c[2];
|
|
252
260
|
|
|
253
|
-
var
|
|
254
|
-
showOccurrenceDialog =
|
|
255
|
-
setShowOccurrenceDialog =
|
|
256
|
-
dispatchShowOccurrenceDialog =
|
|
261
|
+
var _d = useShowOccurrenceDialog(false, propShowOccurrenceDialog, onShowOccurrenceDialogChange),
|
|
262
|
+
showOccurrenceDialog = _d[0],
|
|
263
|
+
setShowOccurrenceDialog = _d[1],
|
|
264
|
+
dispatchShowOccurrenceDialog = _d[2];
|
|
257
265
|
|
|
258
266
|
var items = this.bv.items; // useSchedulerViewItemsContext();
|
|
259
267
|
// const [,dispatchViewItemsFocus] = useSchedulerViewFocusedItemsContext();
|
|
260
268
|
// const [,dispatchViewSlotsFocus] = useSchedulerViewFocusedSlotsContext();
|
|
261
269
|
|
|
262
270
|
var selected = Boolean(this.bv.selectedItems && this.bv.selectedItems.some(function (si) {
|
|
263
|
-
return si
|
|
271
|
+
return compareItems(si, _this, _this.ignoreIsAllDay);
|
|
264
272
|
}));
|
|
265
|
-
|
|
266
|
-
|
|
273
|
+
var itemRender;
|
|
274
|
+
var itemRenderDefaultRendering = // @ts-ignore function children
|
|
275
|
+
h(SchedulerViewItem, {
|
|
276
|
+
ignoreIsAllDay: this.ignoreIsAllDay,
|
|
277
|
+
attrs: this.v3 ? undefined : {
|
|
267
278
|
ignoreIsAllDay: this.ignoreIsAllDay,
|
|
268
|
-
attrs: this.v3 ? undefined : {
|
|
269
|
-
ignoreIsAllDay: this.ignoreIsAllDay,
|
|
270
|
-
item: this.item,
|
|
271
|
-
uid: this.uid,
|
|
272
|
-
start: this.start,
|
|
273
|
-
end: this.end,
|
|
274
|
-
originalStart: this.originalStart,
|
|
275
|
-
startTimezone: this.startTimezone,
|
|
276
|
-
endTimezone: this.endTimezone,
|
|
277
|
-
isAllDay: this.isAllDay,
|
|
278
|
-
title: this.title,
|
|
279
|
-
description: this.description,
|
|
280
|
-
occurrenceId: this.occurrenceId,
|
|
281
|
-
recurrenceExceptions: this.recurrenceExceptions,
|
|
282
|
-
recurrenceRule: this.recurrenceRule,
|
|
283
|
-
recurrenceId: this.recurrenceId,
|
|
284
|
-
dataItem: this.dataItem,
|
|
285
|
-
head: this.head,
|
|
286
|
-
tail: this.tail,
|
|
287
|
-
order: this.order,
|
|
288
|
-
zonedStart: this.zonedStart,
|
|
289
|
-
zonedEnd: this.zonedEnd,
|
|
290
|
-
slots: this.slots,
|
|
291
|
-
group: this.group,
|
|
292
|
-
range: this.range,
|
|
293
|
-
isException: this.isException,
|
|
294
|
-
isRecurring: this.isRecurring,
|
|
295
|
-
id: this.id,
|
|
296
|
-
className: this.className,
|
|
297
|
-
itemStyle: this.itemStyle,
|
|
298
|
-
editable: this.editable,
|
|
299
|
-
vertical: this.vertical,
|
|
300
|
-
dragHint: this.dragHint,
|
|
301
|
-
resizeHint: this.resizeHint,
|
|
302
|
-
format: this.format,
|
|
303
|
-
showOccurrenceDialog: this.compShowOccurrenceDialog,
|
|
304
|
-
showRemoveDialog: this.compShowRemoveDialog,
|
|
305
|
-
formItem: this.compFormItem,
|
|
306
|
-
dragItem: this.compDragItem,
|
|
307
|
-
resizeItem: this.compResizeItem,
|
|
308
|
-
removeItem: this.compRemoveItem // refTo={this}
|
|
309
|
-
,
|
|
310
|
-
itemRef: this.item,
|
|
311
|
-
selected: selected,
|
|
312
|
-
tabIndex: this.tabIndex // Keyboard
|
|
313
|
-
|
|
314
|
-
},
|
|
315
279
|
item: this.item,
|
|
316
280
|
uid: this.uid,
|
|
317
281
|
start: this.start,
|
|
@@ -350,70 +314,120 @@ var SchedulerEditItemVue2 = {
|
|
|
350
314
|
formItem: this.compFormItem,
|
|
351
315
|
dragItem: this.compDragItem,
|
|
352
316
|
resizeItem: this.compResizeItem,
|
|
353
|
-
removeItem: this.compRemoveItem
|
|
317
|
+
removeItem: this.compRemoveItem // refTo={this}
|
|
318
|
+
,
|
|
354
319
|
itemRef: this.item,
|
|
355
320
|
selected: selected,
|
|
356
|
-
tabIndex: this.
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
321
|
+
tabIndex: this.currentTabIndex // Keyboard
|
|
322
|
+
|
|
323
|
+
},
|
|
324
|
+
item: this.item,
|
|
325
|
+
uid: this.uid,
|
|
326
|
+
start: this.start,
|
|
327
|
+
end: this.end,
|
|
328
|
+
originalStart: this.originalStart,
|
|
329
|
+
startTimezone: this.startTimezone,
|
|
330
|
+
endTimezone: this.endTimezone,
|
|
331
|
+
isAllDay: this.isAllDay,
|
|
332
|
+
title: this.title,
|
|
333
|
+
description: this.description,
|
|
334
|
+
occurrenceId: this.occurrenceId,
|
|
335
|
+
recurrenceExceptions: this.recurrenceExceptions,
|
|
336
|
+
recurrenceRule: this.recurrenceRule,
|
|
337
|
+
recurrenceId: this.recurrenceId,
|
|
338
|
+
dataItem: this.dataItem,
|
|
339
|
+
head: this.head,
|
|
340
|
+
tail: this.tail,
|
|
341
|
+
order: this.order,
|
|
342
|
+
zonedStart: this.zonedStart,
|
|
343
|
+
zonedEnd: this.zonedEnd,
|
|
344
|
+
slots: this.slots,
|
|
345
|
+
group: this.group,
|
|
346
|
+
range: this.range,
|
|
347
|
+
isException: this.isException,
|
|
348
|
+
isRecurring: this.isRecurring,
|
|
349
|
+
id: this.id,
|
|
350
|
+
className: this.className,
|
|
351
|
+
itemStyle: this.itemStyle,
|
|
352
|
+
editable: this.editable,
|
|
353
|
+
vertical: this.vertical,
|
|
354
|
+
dragHint: this.dragHint,
|
|
355
|
+
resizeHint: this.resizeHint,
|
|
356
|
+
format: this.format,
|
|
357
|
+
showOccurrenceDialog: this.compShowOccurrenceDialog,
|
|
358
|
+
showRemoveDialog: this.compShowRemoveDialog,
|
|
359
|
+
formItem: this.compFormItem,
|
|
360
|
+
dragItem: this.compDragItem,
|
|
361
|
+
resizeItem: this.compResizeItem,
|
|
362
|
+
removeItem: this.compRemoveItem,
|
|
363
|
+
itemRef: this.item,
|
|
364
|
+
selected: selected,
|
|
365
|
+
tabIndex: this.currentTabIndex,
|
|
366
|
+
onKeydown: this.handleKeyDown,
|
|
367
|
+
on: this.v3 ? undefined : {
|
|
368
|
+
"keydown": this.handleKeyDown,
|
|
369
|
+
"keyup": this.handleKeyUp,
|
|
370
|
+
"focus": this.handleFocus,
|
|
371
|
+
"mouseup": this.handleMouseUp,
|
|
372
|
+
"mousedown": this.handleMouseDown,
|
|
373
|
+
"click": this.handleClick,
|
|
374
|
+
"doubleclick": this.handleDoubleClick,
|
|
375
|
+
"removeclick": this.handleRemoveClick,
|
|
376
|
+
"press": this.handlePress,
|
|
377
|
+
"drag": this.handleDrag,
|
|
378
|
+
"release": this.handleRelease,
|
|
379
|
+
"resizepress": this.handleResizePress,
|
|
380
|
+
"resizeenddrag": this.handleResizeEndDrag,
|
|
381
|
+
"resizestartdrag": this.handleResizeStartDrag,
|
|
382
|
+
"resizerelease": this.handleResizeRelease
|
|
383
|
+
},
|
|
384
|
+
onKeyup: this.handleKeyUp // Focus
|
|
385
|
+
,
|
|
386
|
+
onFocus: this.handleFocus // Mouse
|
|
387
|
+
,
|
|
388
|
+
onMouseup: this.handleMouseUp,
|
|
389
|
+
onMousedown: this.handleMouseDown,
|
|
390
|
+
onClick: this.handleClick,
|
|
391
|
+
onDoubleclick: this.handleDoubleClick,
|
|
392
|
+
onRemoveclick: this.handleRemoveClick // Drag
|
|
393
|
+
,
|
|
394
|
+
onPress: this.handlePress,
|
|
395
|
+
onDrag: this.handleDrag,
|
|
396
|
+
onRelease: this.handleRelease // Resize
|
|
397
|
+
,
|
|
398
|
+
onResizepress: this.handleResizePress,
|
|
399
|
+
onResizeenddrag: this.handleResizeEndDrag,
|
|
400
|
+
onResizestartdrag: this.handleResizeStartDrag,
|
|
401
|
+
onResizerelease: this.handleResizeRelease
|
|
402
|
+
});
|
|
403
|
+
itemRender = getTemplate.call(this, {
|
|
404
|
+
h: h,
|
|
405
|
+
template: this.$props.viewItem,
|
|
406
|
+
defaultRendering: itemRenderDefaultRendering,
|
|
407
|
+
defaultSlots: defaultSlot,
|
|
408
|
+
additionalListeners: {
|
|
409
|
+
// keydown: this.handleKeyDown,
|
|
410
|
+
// keyup: this.handleKeyUp,
|
|
411
|
+
// Focus
|
|
412
|
+
// focus: this.handleFocus,
|
|
413
|
+
// Mouse
|
|
414
|
+
// mouseup: this.handleMouseUp,
|
|
415
|
+
// mousedown: this.handleMouseDown,
|
|
416
|
+
// click: this.handleClick,
|
|
417
|
+
doubleclick: this.handleDoubleClick,
|
|
418
|
+
removeclick: this.handleRemoveClick,
|
|
419
|
+
// Drag
|
|
420
|
+
press: this.handlePress,
|
|
421
|
+
drag: this.handleDrag,
|
|
422
|
+
release: this.handleRelease,
|
|
423
|
+
// Resize
|
|
424
|
+
resizepress: this.handleResizePress,
|
|
425
|
+
resizeenddrag: this.handleResizeEndDrag,
|
|
426
|
+
resizestartdrag: this.handleResizeStartDrag,
|
|
427
|
+
resizerelease: this.handleResizeRelease
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
return itemRender;
|
|
417
431
|
},
|
|
418
432
|
methods: {
|
|
419
433
|
dispatchSeries: function dispatchSeries(action, _event) {
|
|
@@ -421,8 +435,8 @@ var SchedulerEditItemVue2 = {
|
|
|
421
435
|
this.currentSeries = newSeries;
|
|
422
436
|
this.$emit('serieschange', newSeries);
|
|
423
437
|
},
|
|
424
|
-
dispatchItemSelection: function dispatchItemSelection(action,
|
|
425
|
-
this.
|
|
438
|
+
dispatchItemSelection: function dispatchItemSelection(action, event) {
|
|
439
|
+
this.dispatchSelectedItems(action, event);
|
|
426
440
|
},
|
|
427
441
|
dispatchRemoveItem: function dispatchRemoveItem(action, _event) {
|
|
428
442
|
var newRemoveItem;
|
|
@@ -469,14 +483,14 @@ var SchedulerEditItemVue2 = {
|
|
|
469
483
|
dispatchDragItem: function dispatchDragItem(action, _event) {
|
|
470
484
|
useDragItem.call(this, action);
|
|
471
485
|
},
|
|
472
|
-
dispatchResizeItem: function dispatchResizeItem(action,
|
|
473
|
-
this
|
|
486
|
+
dispatchResizeItem: function dispatchResizeItem(action, event) {
|
|
487
|
+
useResizeItem.call(this, action, event);
|
|
474
488
|
},
|
|
475
|
-
dispatchViewSlotsFocus: function dispatchViewSlotsFocus(action,
|
|
476
|
-
this.
|
|
489
|
+
dispatchViewSlotsFocus: function dispatchViewSlotsFocus(action, event) {
|
|
490
|
+
this.dispatchFocusedSlots(action, event);
|
|
477
491
|
},
|
|
478
|
-
dispatchViewItemsFocus: function dispatchViewItemsFocus(action,
|
|
479
|
-
this.
|
|
492
|
+
dispatchViewItemsFocus: function dispatchViewItemsFocus(action, event) {
|
|
493
|
+
this.dispatchFocusedItems(action, event);
|
|
480
494
|
},
|
|
481
495
|
dispatchFormItem: function dispatchFormItem(action, _event) {
|
|
482
496
|
var newFormItem;
|
|
@@ -515,52 +529,76 @@ var SchedulerEditItemVue2 = {
|
|
|
515
529
|
this.$emit('formitemchange', newFormItem);
|
|
516
530
|
},
|
|
517
531
|
handleFocus: function handleFocus(event) {
|
|
532
|
+
var _this = this;
|
|
533
|
+
|
|
518
534
|
if (this.onFocusAction) {
|
|
519
535
|
var actions = this.onFocusAction(event, this.$props);
|
|
520
536
|
|
|
521
|
-
if (actions) {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
537
|
+
if (actions) {
|
|
538
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
539
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
540
|
+
item: _this.dataItem
|
|
541
|
+
}), event);
|
|
542
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
543
|
+
item: this.dataItem
|
|
544
|
+
}));
|
|
525
545
|
}
|
|
526
546
|
}
|
|
527
547
|
|
|
528
548
|
this.$emit('focus', event);
|
|
529
549
|
},
|
|
530
550
|
handleMouseDown: function handleMouseDown(event) {
|
|
551
|
+
var _this = this;
|
|
552
|
+
|
|
531
553
|
if (this.onMouseDownAction) {
|
|
532
554
|
var actions = this.onMouseDownAction(event, this.$props);
|
|
533
555
|
|
|
534
|
-
if (actions) {
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
556
|
+
if (actions) {
|
|
557
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
558
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
559
|
+
item: _this.dataItem
|
|
560
|
+
}), event);
|
|
561
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
562
|
+
item: this.dataItem
|
|
563
|
+
}));
|
|
538
564
|
}
|
|
539
565
|
}
|
|
540
566
|
|
|
541
567
|
this.$emit('mousedown', event);
|
|
542
568
|
},
|
|
543
569
|
handleMouseUp: function handleMouseUp(event) {
|
|
570
|
+
var _this = this;
|
|
571
|
+
|
|
544
572
|
if (this.onMouseUpAction) {
|
|
545
573
|
var actions = this.onMouseUpAction(event, this.$props);
|
|
546
574
|
|
|
547
|
-
if (actions) {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
575
|
+
if (actions) {
|
|
576
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
577
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
578
|
+
item: _this.dataItem
|
|
579
|
+
}), event);
|
|
580
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
581
|
+
item: this.dataItem
|
|
582
|
+
}));
|
|
551
583
|
}
|
|
552
584
|
}
|
|
553
585
|
|
|
554
586
|
this.$emit('mouseup', event);
|
|
555
587
|
},
|
|
556
588
|
handleClick: function handleClick(event) {
|
|
589
|
+
var _this = this;
|
|
590
|
+
|
|
557
591
|
if (this.onClickAction) {
|
|
558
592
|
var actions = this.onClickAction(event, this.$props);
|
|
559
593
|
|
|
560
|
-
if (actions) {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
594
|
+
if (actions) {
|
|
595
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
596
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
597
|
+
item: _this.dataItem
|
|
598
|
+
}), event);
|
|
599
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
600
|
+
item: this.dataItem
|
|
601
|
+
}));
|
|
564
602
|
}
|
|
565
603
|
}
|
|
566
604
|
|
|
@@ -661,71 +699,76 @@ var SchedulerEditItemVue2 = {
|
|
|
661
699
|
this.$emit('release', event);
|
|
662
700
|
},
|
|
663
701
|
handleResizePress: function handleResizePress(event) {
|
|
702
|
+
var _this = this;
|
|
703
|
+
|
|
664
704
|
if (this.onResizePressAction) {
|
|
665
705
|
var actions = this.onResizePressAction(event, this.$props);
|
|
666
706
|
|
|
667
|
-
if (actions) {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
// );
|
|
707
|
+
if (actions) {
|
|
708
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
709
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
710
|
+
item: _this.dataItem
|
|
711
|
+
}), event.dragEvent.originalEvent);
|
|
712
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
713
|
+
item: this.dataItem
|
|
714
|
+
}), event.dragEvent.originalEvent);
|
|
676
715
|
}
|
|
677
716
|
}
|
|
678
717
|
|
|
679
718
|
this.$emit('resizepress', event);
|
|
680
719
|
},
|
|
681
720
|
handleResizeStartDrag: function handleResizeStartDrag(event) {
|
|
721
|
+
var _this = this;
|
|
722
|
+
|
|
682
723
|
if (this.onResizeStartDragAction) {
|
|
683
724
|
var actions = this.onResizeStartDragAction(event, this.$props);
|
|
684
725
|
|
|
685
|
-
if (actions) {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
// );
|
|
726
|
+
if (actions) {
|
|
727
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
728
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
729
|
+
item: _this.dataItem
|
|
730
|
+
}), event.dragEvent.originalEvent);
|
|
731
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
732
|
+
item: this.dataItem
|
|
733
|
+
}), event.dragEvent.originalEvent);
|
|
694
734
|
}
|
|
695
735
|
}
|
|
696
736
|
|
|
697
737
|
this.$emit('resizestartdrag', event);
|
|
698
738
|
},
|
|
699
739
|
handleResizeEndDrag: function handleResizeEndDrag(event) {
|
|
740
|
+
var _this = this;
|
|
741
|
+
|
|
700
742
|
if (this.onResizeEndDragAction) {
|
|
701
743
|
var actions = this.onResizeEndDragAction(event, this.$props);
|
|
702
744
|
|
|
703
|
-
if (actions) {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
745
|
+
if (actions) {
|
|
746
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
747
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
748
|
+
item: _this.dataItem
|
|
749
|
+
}), event.dragEvent.originalEvent);
|
|
750
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
751
|
+
item: this.dataItem
|
|
752
|
+
}), event.dragEvent.originalEvent);
|
|
711
753
|
}
|
|
712
754
|
}
|
|
713
755
|
|
|
714
756
|
this.$emit('resizeenddrag', event);
|
|
715
757
|
},
|
|
716
758
|
handleResizeRelease: function handleResizeRelease(event) {
|
|
759
|
+
var _this = this;
|
|
760
|
+
|
|
717
761
|
if (this.onResizeReleaseAction) {
|
|
718
762
|
var actions = this.onResizeReleaseAction(event, this.$props);
|
|
719
763
|
|
|
720
|
-
if (actions) {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
// );
|
|
764
|
+
if (actions) {
|
|
765
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
766
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
767
|
+
item: _this.dataItem
|
|
768
|
+
}), event.dragEvent.originalEvent);
|
|
769
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
770
|
+
item: this.dataItem
|
|
771
|
+
}), event.dragEvent.originalEvent);
|
|
729
772
|
}
|
|
730
773
|
}
|
|
731
774
|
|
|
@@ -808,26 +851,38 @@ var SchedulerEditItemVue2 = {
|
|
|
808
851
|
this.$emit('seriesclick', event);
|
|
809
852
|
},
|
|
810
853
|
handleKeyDown: function handleKeyDown(event) {
|
|
854
|
+
var _this = this;
|
|
855
|
+
|
|
811
856
|
if (this.onKeyDownAction) {
|
|
812
857
|
var actions = this.onKeyDownAction(event, this.$props);
|
|
813
858
|
|
|
814
|
-
if (actions) {
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
859
|
+
if (actions) {
|
|
860
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
861
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
862
|
+
item: _this
|
|
863
|
+
}), event.event);
|
|
864
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
865
|
+
item: this
|
|
866
|
+
}), event.event);
|
|
818
867
|
}
|
|
819
868
|
}
|
|
820
869
|
|
|
821
870
|
this.$emit('keydown', event);
|
|
822
871
|
},
|
|
823
872
|
handleKeyUp: function handleKeyUp(event) {
|
|
873
|
+
var _this = this;
|
|
874
|
+
|
|
824
875
|
if (this.onKeyUpAction) {
|
|
825
876
|
var actions = this.onKeyUpAction(event, this.$props);
|
|
826
877
|
|
|
827
|
-
if (actions) {
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
878
|
+
if (actions) {
|
|
879
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
880
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
881
|
+
item: _this.dataItem
|
|
882
|
+
}), event.event);
|
|
883
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
884
|
+
item: this.dataItem
|
|
885
|
+
}), event.event);
|
|
831
886
|
}
|
|
832
887
|
}
|
|
833
888
|
|