@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
|
@@ -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;
|
|
@@ -231,36 +242,32 @@ var SchedulerEditItemVue2 = {
|
|
|
231
242
|
// onDataaction },
|
|
232
243
|
// [null, propDragItem, onDragItemChange]
|
|
233
244
|
// );
|
|
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(
|
|
245
|
+
// const [resizeItem, setResizeItem, dispatchResizeItem] = useResizeItem(
|
|
246
|
+
// { dataItem: this.$props.dataItem, onDataaction },
|
|
247
|
+
// [null, propResizeItem, onResizeItemChange]
|
|
248
|
+
// );
|
|
249
|
+
// const [removeItem, setRemoveItem, dispatchRemoveItem] = useRemoveItem(
|
|
243
250
|
// { series, onDataaction},
|
|
244
251
|
// [null, propRemoveItem, onRemoveItemChange]
|
|
245
252
|
// );
|
|
246
253
|
|
|
247
254
|
|
|
248
|
-
var
|
|
249
|
-
showRemoveDialog =
|
|
250
|
-
setShowRemoveDialog =
|
|
251
|
-
dispatchShowRemoveDialog =
|
|
255
|
+
var _c = useShowRemoveDialog(false, propShowRemoveDialog, onShowRemoveDialogChange),
|
|
256
|
+
showRemoveDialog = _c[0],
|
|
257
|
+
setShowRemoveDialog = _c[1],
|
|
258
|
+
dispatchShowRemoveDialog = _c[2];
|
|
252
259
|
|
|
253
|
-
var
|
|
254
|
-
showOccurrenceDialog =
|
|
255
|
-
setShowOccurrenceDialog =
|
|
256
|
-
dispatchShowOccurrenceDialog =
|
|
260
|
+
var _d = useShowOccurrenceDialog(false, propShowOccurrenceDialog, onShowOccurrenceDialogChange),
|
|
261
|
+
showOccurrenceDialog = _d[0],
|
|
262
|
+
setShowOccurrenceDialog = _d[1],
|
|
263
|
+
dispatchShowOccurrenceDialog = _d[2];
|
|
257
264
|
|
|
258
265
|
var items = this.bv.items; // useSchedulerViewItemsContext();
|
|
259
266
|
// const [,dispatchViewItemsFocus] = useSchedulerViewFocusedItemsContext();
|
|
260
267
|
// const [,dispatchViewSlotsFocus] = useSchedulerViewFocusedSlotsContext();
|
|
261
268
|
|
|
262
269
|
var selected = Boolean(this.bv.selectedItems && this.bv.selectedItems.some(function (si) {
|
|
263
|
-
return si
|
|
270
|
+
return compareItems(si, _this, _this.ignoreIsAllDay);
|
|
264
271
|
}));
|
|
265
272
|
return (// @ts-ignore function children
|
|
266
273
|
h(SchedulerViewItem, {
|
|
@@ -309,7 +316,7 @@ var SchedulerEditItemVue2 = {
|
|
|
309
316
|
,
|
|
310
317
|
itemRef: this.item,
|
|
311
318
|
selected: selected,
|
|
312
|
-
tabIndex: this.
|
|
319
|
+
tabIndex: this.currentTabIndex // Keyboard
|
|
313
320
|
|
|
314
321
|
},
|
|
315
322
|
item: this.item,
|
|
@@ -353,7 +360,7 @@ var SchedulerEditItemVue2 = {
|
|
|
353
360
|
removeItem: this.compRemoveItem,
|
|
354
361
|
itemRef: this.item,
|
|
355
362
|
selected: selected,
|
|
356
|
-
tabIndex: this.
|
|
363
|
+
tabIndex: this.currentTabIndex,
|
|
357
364
|
onKeydown: this.handleKeyDown,
|
|
358
365
|
on: this.v3 ? undefined : {
|
|
359
366
|
"keydown": this.handleKeyDown,
|
|
@@ -370,7 +377,7 @@ var SchedulerEditItemVue2 = {
|
|
|
370
377
|
"resizepress": this.handleResizePress,
|
|
371
378
|
"resizeenddrag": this.handleResizeEndDrag,
|
|
372
379
|
"resizestartdrag": this.handleResizeStartDrag,
|
|
373
|
-
"
|
|
380
|
+
"resizerelease": this.handleResizeRelease
|
|
374
381
|
},
|
|
375
382
|
onKeyup: this.handleKeyUp // Focus
|
|
376
383
|
,
|
|
@@ -389,30 +396,8 @@ var SchedulerEditItemVue2 = {
|
|
|
389
396
|
onResizepress: this.handleResizePress,
|
|
390
397
|
onResizeenddrag: this.handleResizeEndDrag,
|
|
391
398
|
onResizestartdrag: this.handleResizeStartDrag,
|
|
392
|
-
|
|
393
|
-
})
|
|
394
|
-
// ? (resizeItem as any).map((ri, idx) => (
|
|
395
|
-
// <Resize
|
|
396
|
-
// key={idx}
|
|
397
|
-
// format={this.$props.format}
|
|
398
|
-
// ignoreIsAllDay={ignoreIsAllDay}
|
|
399
|
-
// dataItem={ri}
|
|
400
|
-
// viewItem={this.$props.viewItem}
|
|
401
|
-
// item={this.$props.item}
|
|
402
|
-
// vertical={this.$props.vertical}
|
|
403
|
-
// />
|
|
404
|
-
// ))
|
|
405
|
-
// : (
|
|
406
|
-
// <Resize
|
|
407
|
-
// format={this.$props.format}
|
|
408
|
-
// ignoreIsAllDay={ignoreIsAllDay}
|
|
409
|
-
// dataItem={resizeItem}
|
|
410
|
-
// viewItem={this.$props.viewItem}
|
|
411
|
-
// item={this.$props.item}
|
|
412
|
-
// vertical={this.$props.vertical}
|
|
413
|
-
// />
|
|
414
|
-
// ))}
|
|
415
|
-
|
|
399
|
+
onResizerelease: this.handleResizeRelease
|
|
400
|
+
})
|
|
416
401
|
);
|
|
417
402
|
},
|
|
418
403
|
methods: {
|
|
@@ -421,8 +406,8 @@ var SchedulerEditItemVue2 = {
|
|
|
421
406
|
this.currentSeries = newSeries;
|
|
422
407
|
this.$emit('serieschange', newSeries);
|
|
423
408
|
},
|
|
424
|
-
dispatchItemSelection: function dispatchItemSelection(action,
|
|
425
|
-
this.
|
|
409
|
+
dispatchItemSelection: function dispatchItemSelection(action, event) {
|
|
410
|
+
this.dispatchSelectedItems(action, event);
|
|
426
411
|
},
|
|
427
412
|
dispatchRemoveItem: function dispatchRemoveItem(action, _event) {
|
|
428
413
|
var newRemoveItem;
|
|
@@ -469,14 +454,14 @@ var SchedulerEditItemVue2 = {
|
|
|
469
454
|
dispatchDragItem: function dispatchDragItem(action, _event) {
|
|
470
455
|
useDragItem.call(this, action);
|
|
471
456
|
},
|
|
472
|
-
dispatchResizeItem: function dispatchResizeItem(action,
|
|
473
|
-
this
|
|
457
|
+
dispatchResizeItem: function dispatchResizeItem(action, event) {
|
|
458
|
+
useResizeItem.call(this, action, event);
|
|
474
459
|
},
|
|
475
|
-
dispatchViewSlotsFocus: function dispatchViewSlotsFocus(action,
|
|
476
|
-
this.
|
|
460
|
+
dispatchViewSlotsFocus: function dispatchViewSlotsFocus(action, event) {
|
|
461
|
+
this.dispatchFocusedSlots(action, event);
|
|
477
462
|
},
|
|
478
|
-
dispatchViewItemsFocus: function dispatchViewItemsFocus(action,
|
|
479
|
-
this.
|
|
463
|
+
dispatchViewItemsFocus: function dispatchViewItemsFocus(action, event) {
|
|
464
|
+
this.dispatchFocusedItems(action, event);
|
|
480
465
|
},
|
|
481
466
|
dispatchFormItem: function dispatchFormItem(action, _event) {
|
|
482
467
|
var newFormItem;
|
|
@@ -515,52 +500,76 @@ var SchedulerEditItemVue2 = {
|
|
|
515
500
|
this.$emit('formitemchange', newFormItem);
|
|
516
501
|
},
|
|
517
502
|
handleFocus: function handleFocus(event) {
|
|
503
|
+
var _this = this;
|
|
504
|
+
|
|
518
505
|
if (this.onFocusAction) {
|
|
519
506
|
var actions = this.onFocusAction(event, this.$props);
|
|
520
507
|
|
|
521
|
-
if (actions) {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
508
|
+
if (actions) {
|
|
509
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
510
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
511
|
+
item: _this.dataItem
|
|
512
|
+
}), event);
|
|
513
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
514
|
+
item: this.dataItem
|
|
515
|
+
}));
|
|
525
516
|
}
|
|
526
517
|
}
|
|
527
518
|
|
|
528
519
|
this.$emit('focus', event);
|
|
529
520
|
},
|
|
530
521
|
handleMouseDown: function handleMouseDown(event) {
|
|
522
|
+
var _this = this;
|
|
523
|
+
|
|
531
524
|
if (this.onMouseDownAction) {
|
|
532
525
|
var actions = this.onMouseDownAction(event, this.$props);
|
|
533
526
|
|
|
534
|
-
if (actions) {
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
527
|
+
if (actions) {
|
|
528
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
529
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
530
|
+
item: _this.dataItem
|
|
531
|
+
}), event);
|
|
532
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
533
|
+
item: this.dataItem
|
|
534
|
+
}));
|
|
538
535
|
}
|
|
539
536
|
}
|
|
540
537
|
|
|
541
538
|
this.$emit('mousedown', event);
|
|
542
539
|
},
|
|
543
540
|
handleMouseUp: function handleMouseUp(event) {
|
|
541
|
+
var _this = this;
|
|
542
|
+
|
|
544
543
|
if (this.onMouseUpAction) {
|
|
545
544
|
var actions = this.onMouseUpAction(event, this.$props);
|
|
546
545
|
|
|
547
|
-
if (actions) {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
546
|
+
if (actions) {
|
|
547
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
548
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
549
|
+
item: _this.dataItem
|
|
550
|
+
}), event);
|
|
551
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
552
|
+
item: this.dataItem
|
|
553
|
+
}));
|
|
551
554
|
}
|
|
552
555
|
}
|
|
553
556
|
|
|
554
557
|
this.$emit('mouseup', event);
|
|
555
558
|
},
|
|
556
559
|
handleClick: function handleClick(event) {
|
|
560
|
+
var _this = this;
|
|
561
|
+
|
|
557
562
|
if (this.onClickAction) {
|
|
558
563
|
var actions = this.onClickAction(event, this.$props);
|
|
559
564
|
|
|
560
|
-
if (actions) {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
565
|
+
if (actions) {
|
|
566
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
567
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
568
|
+
item: _this.dataItem
|
|
569
|
+
}), event);
|
|
570
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
571
|
+
item: this.dataItem
|
|
572
|
+
}));
|
|
564
573
|
}
|
|
565
574
|
}
|
|
566
575
|
|
|
@@ -661,71 +670,76 @@ var SchedulerEditItemVue2 = {
|
|
|
661
670
|
this.$emit('release', event);
|
|
662
671
|
},
|
|
663
672
|
handleResizePress: function handleResizePress(event) {
|
|
673
|
+
var _this = this;
|
|
674
|
+
|
|
664
675
|
if (this.onResizePressAction) {
|
|
665
676
|
var actions = this.onResizePressAction(event, this.$props);
|
|
666
677
|
|
|
667
|
-
if (actions) {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
// );
|
|
678
|
+
if (actions) {
|
|
679
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
680
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
681
|
+
item: _this.dataItem
|
|
682
|
+
}), event.dragEvent.originalEvent);
|
|
683
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
684
|
+
item: this.dataItem
|
|
685
|
+
}), event.dragEvent.originalEvent);
|
|
676
686
|
}
|
|
677
687
|
}
|
|
678
688
|
|
|
679
689
|
this.$emit('resizepress', event);
|
|
680
690
|
},
|
|
681
691
|
handleResizeStartDrag: function handleResizeStartDrag(event) {
|
|
692
|
+
var _this = this;
|
|
693
|
+
|
|
682
694
|
if (this.onResizeStartDragAction) {
|
|
683
695
|
var actions = this.onResizeStartDragAction(event, this.$props);
|
|
684
696
|
|
|
685
|
-
if (actions) {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
// );
|
|
697
|
+
if (actions) {
|
|
698
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
699
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
700
|
+
item: _this.dataItem
|
|
701
|
+
}), event.dragEvent.originalEvent);
|
|
702
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
703
|
+
item: this.dataItem
|
|
704
|
+
}), event.dragEvent.originalEvent);
|
|
694
705
|
}
|
|
695
706
|
}
|
|
696
707
|
|
|
697
708
|
this.$emit('resizestartdrag', event);
|
|
698
709
|
},
|
|
699
710
|
handleResizeEndDrag: function handleResizeEndDrag(event) {
|
|
711
|
+
var _this = this;
|
|
712
|
+
|
|
700
713
|
if (this.onResizeEndDragAction) {
|
|
701
714
|
var actions = this.onResizeEndDragAction(event, this.$props);
|
|
702
715
|
|
|
703
|
-
if (actions) {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
716
|
+
if (actions) {
|
|
717
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
718
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
719
|
+
item: _this.dataItem
|
|
720
|
+
}), event.dragEvent.originalEvent);
|
|
721
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
722
|
+
item: this.dataItem
|
|
723
|
+
}), event.dragEvent.originalEvent);
|
|
711
724
|
}
|
|
712
725
|
}
|
|
713
726
|
|
|
714
727
|
this.$emit('resizeenddrag', event);
|
|
715
728
|
},
|
|
716
729
|
handleResizeRelease: function handleResizeRelease(event) {
|
|
730
|
+
var _this = this;
|
|
731
|
+
|
|
717
732
|
if (this.onResizeReleaseAction) {
|
|
718
733
|
var actions = this.onResizeReleaseAction(event, this.$props);
|
|
719
734
|
|
|
720
|
-
if (actions) {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
// );
|
|
735
|
+
if (actions) {
|
|
736
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
737
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
738
|
+
item: _this.dataItem
|
|
739
|
+
}), event.dragEvent.originalEvent);
|
|
740
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
741
|
+
item: this.dataItem
|
|
742
|
+
}), event.dragEvent.originalEvent);
|
|
729
743
|
}
|
|
730
744
|
}
|
|
731
745
|
|
|
@@ -808,26 +822,38 @@ var SchedulerEditItemVue2 = {
|
|
|
808
822
|
this.$emit('seriesclick', event);
|
|
809
823
|
},
|
|
810
824
|
handleKeyDown: function handleKeyDown(event) {
|
|
825
|
+
var _this = this;
|
|
826
|
+
|
|
811
827
|
if (this.onKeyDownAction) {
|
|
812
828
|
var actions = this.onKeyDownAction(event, this.$props);
|
|
813
829
|
|
|
814
|
-
if (actions) {
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
830
|
+
if (actions) {
|
|
831
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
832
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
833
|
+
item: _this
|
|
834
|
+
}), event.event);
|
|
835
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
836
|
+
item: this
|
|
837
|
+
}), event.event);
|
|
818
838
|
}
|
|
819
839
|
}
|
|
820
840
|
|
|
821
841
|
this.$emit('keydown', event);
|
|
822
842
|
},
|
|
823
843
|
handleKeyUp: function handleKeyUp(event) {
|
|
844
|
+
var _this = this;
|
|
845
|
+
|
|
824
846
|
if (this.onKeyUpAction) {
|
|
825
847
|
var actions = this.onKeyUpAction(event, this.$props);
|
|
826
848
|
|
|
827
|
-
if (actions) {
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
849
|
+
if (actions) {
|
|
850
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
851
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
852
|
+
item: _this.dataItem
|
|
853
|
+
}), event.event);
|
|
854
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
855
|
+
item: this.dataItem
|
|
856
|
+
}), event.event);
|
|
831
857
|
}
|
|
832
858
|
}
|
|
833
859
|
|