@progress/kendo-vue-scheduler 3.1.4 → 3.1.5-dev.202204110939
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/SchedulerForm.js +6 -0
- package/dist/es/components/SchedulerOccurrenceDialog.js +52 -7
- package/dist/es/components/SchedulerRemoveDialog.js +52 -7
- package/dist/es/editors/ResourceEditor.js +13 -11
- package/dist/es/editors/SchedulerFormEditor.js +11 -10
- package/dist/es/editors/ZonedDateTime.d.ts +1 -0
- package/dist/es/editors/ZonedDateTime.js +5 -2
- package/dist/es/items/SchedulerEditItem.js +401 -211
- package/dist/es/items/SchedulerItem.js +104 -95
- package/dist/es/items/SchedulerViewItem.js +8 -2
- package/dist/es/items/hooks/use-drag-item.d.ts +2 -6
- package/dist/es/items/hooks/use-drag-item.js +228 -153
- package/dist/es/items/hooks/use-show-occurrence-dialog.d.ts +1 -0
- package/dist/es/items/hooks/use-show-occurrence-dialog.js +1 -2
- package/dist/es/items/hooks/use-show-remove-item-dialog.d.ts +1 -0
- package/dist/es/items/hooks/use-show-remove-item-dialog.js +1 -2
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/recurrence/RecurrenceEditor.d.ts +1 -0
- package/dist/es/recurrence/RecurrenceEditor.js +5 -0
- package/dist/es/recurrence/RecurrenceFrequencyEditor.js +4 -0
- package/dist/es/recurrence/RecurrenceRepeatOnWeekEditor.js +4 -0
- package/dist/es/tasks/SchedulerEditTask.d.ts +9 -0
- package/dist/es/tasks/SchedulerEditTask.js +118 -35
- package/dist/es/tasks/SchedulerTask.js +3 -2
- package/dist/es/tasks/SchedulerViewTask.js +15 -3
- package/dist/es/views/agenda/AgendaView.js +21 -9
- package/dist/es/views/agenda/AgendaViewBody.d.ts +1 -0
- package/dist/es/views/agenda/AgendaViewBody.js +6 -1
- package/dist/es/views/common/SchedulerDrag.js +62 -11
- package/dist/es/views/day/DayView.js +4 -0
- package/dist/es/views/month/MonthView.js +5 -1
- package/dist/es/views/time/MultiDayTimelineView.js +28 -9
- package/dist/es/views/time/TimelineView.js +4 -0
- package/dist/es/views/week/WeekView.js +12 -2
- package/dist/es/views/week/WorkWeekView.js +12 -2
- package/dist/npm/components/SchedulerForm.js +6 -0
- package/dist/npm/components/SchedulerOccurrenceDialog.js +52 -7
- package/dist/npm/components/SchedulerRemoveDialog.js +52 -7
- package/dist/npm/editors/ResourceEditor.js +12 -10
- package/dist/npm/editors/SchedulerFormEditor.js +11 -11
- package/dist/npm/editors/ZonedDateTime.d.ts +1 -0
- package/dist/npm/editors/ZonedDateTime.js +4 -1
- package/dist/npm/items/SchedulerEditItem.js +400 -207
- package/dist/npm/items/SchedulerItem.js +104 -95
- package/dist/npm/items/SchedulerViewItem.js +8 -2
- package/dist/npm/items/hooks/use-drag-item.d.ts +2 -6
- package/dist/npm/items/hooks/use-drag-item.js +231 -153
- package/dist/npm/items/hooks/use-show-occurrence-dialog.d.ts +1 -0
- package/dist/npm/items/hooks/use-show-occurrence-dialog.js +2 -2
- package/dist/npm/items/hooks/use-show-remove-item-dialog.d.ts +1 -0
- package/dist/npm/items/hooks/use-show-remove-item-dialog.js +2 -2
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/recurrence/RecurrenceEditor.d.ts +1 -0
- package/dist/npm/recurrence/RecurrenceEditor.js +5 -0
- package/dist/npm/recurrence/RecurrenceFrequencyEditor.js +4 -0
- package/dist/npm/recurrence/RecurrenceRepeatOnWeekEditor.js +4 -0
- package/dist/npm/tasks/SchedulerEditTask.d.ts +9 -0
- package/dist/npm/tasks/SchedulerEditTask.js +120 -35
- package/dist/npm/tasks/SchedulerTask.js +3 -2
- package/dist/npm/tasks/SchedulerViewTask.js +15 -3
- package/dist/npm/views/agenda/AgendaView.js +21 -9
- package/dist/npm/views/agenda/AgendaViewBody.d.ts +1 -0
- package/dist/npm/views/agenda/AgendaViewBody.js +6 -1
- package/dist/npm/views/common/SchedulerDrag.js +62 -11
- package/dist/npm/views/day/DayView.js +4 -0
- package/dist/npm/views/month/MonthView.js +5 -1
- package/dist/npm/views/time/MultiDayTimelineView.js +27 -8
- package/dist/npm/views/time/TimelineView.js +4 -0
- package/dist/npm/views/week/WeekView.js +12 -2
- package/dist/npm/views/week/WorkWeekView.js +12 -2
- package/package.json +12 -12
|
@@ -19,15 +19,18 @@ import * as Vue from 'vue';
|
|
|
19
19
|
var allVue = Vue;
|
|
20
20
|
var gh = allVue.h;
|
|
21
21
|
var inject = allVue.inject;
|
|
22
|
+
import { SchedulerOccurrenceDialog } from '../components/SchedulerOccurrenceDialog';
|
|
22
23
|
import { SchedulerForm } from '../components/SchedulerForm';
|
|
24
|
+
import { SchedulerRemoveDialog } from '../components/SchedulerRemoveDialog';
|
|
23
25
|
import { DATA_ACTION } from '../Scheduler';
|
|
24
26
|
import { clone, Keys } from '@progress/kendo-vue-common';
|
|
27
|
+
import { SchedulerDrag } from '../views/common/SchedulerDrag';
|
|
25
28
|
import { SchedulerViewItem } from './SchedulerViewItem';
|
|
26
29
|
import { ITEMS_FOCUS_ACTION, SLOTS_FOCUS_ACTION, useEditable } from '../hooks';
|
|
27
|
-
import { FORM_ITEM_ACTION
|
|
28
|
-
import { SHOW_OCCURRENCE_DIALOG_ACTION, useShowOccurrenceDialog } from './hooks/use-show-occurrence-dialog';
|
|
29
|
-
import { REMOVE_ITEM_ACTION
|
|
30
|
-
import { SHOW_REMOVE_DIALOG_ACTION, useShowRemoveDialog } from './hooks/use-show-remove-item-dialog';
|
|
30
|
+
import { FORM_ITEM_ACTION } from './hooks/use-form-item';
|
|
31
|
+
import { showOccurrenceDialogReducer, SHOW_OCCURRENCE_DIALOG_ACTION, useShowOccurrenceDialog } from './hooks/use-show-occurrence-dialog';
|
|
32
|
+
import { REMOVE_ITEM_ACTION } from './hooks/use-remove-item';
|
|
33
|
+
import { showRemoveDialogReducer, SHOW_REMOVE_DIALOG_ACTION, useShowRemoveDialog } from './hooks/use-show-remove-item-dialog';
|
|
31
34
|
import { DRAG_ITEM_ACTION, useDragItem } from './hooks/use-drag-item';
|
|
32
35
|
import { RESIZE_ITEM_ACTION, useResizeItem } from './hooks/use-resize-item';
|
|
33
36
|
import { seriesReducer, SERIES_ACTION, useSeries } from './hooks/use-series';
|
|
@@ -49,9 +52,18 @@ var SchedulerEditItemVue2 = {
|
|
|
49
52
|
dragItem: Object,
|
|
50
53
|
resizeItem: Object,
|
|
51
54
|
removeItem: Object,
|
|
52
|
-
showOccurrenceDialog:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
showOccurrenceDialog: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: undefined
|
|
58
|
+
},
|
|
59
|
+
showRemoveDialog: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: undefined
|
|
62
|
+
},
|
|
63
|
+
series: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: undefined
|
|
66
|
+
},
|
|
55
67
|
uid: [String, Number],
|
|
56
68
|
start: Date,
|
|
57
69
|
end: Date,
|
|
@@ -114,7 +126,12 @@ var SchedulerEditItemVue2 = {
|
|
|
114
126
|
currentTabIndex: this.$props.tabIndex,
|
|
115
127
|
currentFormItem: null,
|
|
116
128
|
currentSelected: null,
|
|
117
|
-
currentSeries: null
|
|
129
|
+
currentSeries: null,
|
|
130
|
+
currentRemoveItem: null,
|
|
131
|
+
currentDragItem: null,
|
|
132
|
+
currentResizeItem: null,
|
|
133
|
+
currentShowRemoveDialog: null,
|
|
134
|
+
currentShowOccurrenceDialog: null // item: null
|
|
118
135
|
|
|
119
136
|
};
|
|
120
137
|
},
|
|
@@ -128,17 +145,20 @@ var SchedulerEditItemVue2 = {
|
|
|
128
145
|
compFormItem: function compFormItem() {
|
|
129
146
|
return this.formItem !== undefined ? this.formItem : this.currentFormItem;
|
|
130
147
|
},
|
|
131
|
-
|
|
132
|
-
return
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
148
|
+
compRemoveItem: function compRemoveItem() {
|
|
149
|
+
return this.removeItem !== undefined ? this.removeItem : this.currentRemoveItem;
|
|
150
|
+
},
|
|
151
|
+
compDragItem: function compDragItem() {
|
|
152
|
+
return this.dragItem !== undefined ? this.dragItem : this.currentDragItem;
|
|
153
|
+
},
|
|
154
|
+
compResizeItem: function compResizeItem() {
|
|
155
|
+
return this.resizeItem !== undefined ? this.resizeItem : this.currentResizeItem;
|
|
156
|
+
},
|
|
157
|
+
compShowRemoveDialog: function compShowRemoveDialog() {
|
|
158
|
+
return this.showRemoveDialog !== undefined ? this.showRemoveDialog : this.currentShowRemoveDialog;
|
|
159
|
+
},
|
|
160
|
+
compShowOccurrenceDialog: function compShowOccurrenceDialog() {
|
|
161
|
+
return this.showOccurrenceDialog !== undefined ? this.showOccurrenceDialog : this.currentShowOccurrenceDialog;
|
|
142
162
|
},
|
|
143
163
|
actionsReducerMap: function actionsReducerMap() {
|
|
144
164
|
var _a;
|
|
@@ -159,6 +179,8 @@ var SchedulerEditItemVue2 = {
|
|
|
159
179
|
},
|
|
160
180
|
// @ts-ignore
|
|
161
181
|
render: function render(createElement) {
|
|
182
|
+
var _this2 = this;
|
|
183
|
+
|
|
162
184
|
var _this = this;
|
|
163
185
|
|
|
164
186
|
var h = gh || createElement; // tslint:enable:max-line-length
|
|
@@ -198,51 +220,41 @@ var SchedulerEditItemVue2 = {
|
|
|
198
220
|
|
|
199
221
|
var _b = useSeries(null, propSeries, onSeriesChange),
|
|
200
222
|
series = _b[0],
|
|
201
|
-
dispatchSeries = _b[1];
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}, [null, propDragItem, onDragItemChange]),
|
|
217
|
-
dragItem = _d[0],
|
|
218
|
-
setDragItem = _d[1],
|
|
219
|
-
dispatchDragItem = _d[2];
|
|
220
|
-
|
|
221
|
-
var _e = useResizeItem({
|
|
223
|
+
dispatchSeries = _b[1]; // const [formItem, setFormItem, dispatchFormItem] = useFormItem(
|
|
224
|
+
// { series, onDataaction},
|
|
225
|
+
// [null, propFormItem, onFormItemChange]
|
|
226
|
+
// );
|
|
227
|
+
// const [dragItem, setDragItem, dispatchDragItem] = useDragItem(
|
|
228
|
+
// {
|
|
229
|
+
// dataItem: this.$props.dataItem,
|
|
230
|
+
// ignoreIsAllDay: this.$props.ignoreIsAllDay,
|
|
231
|
+
// isAllDay: this.$props.isAllDay,
|
|
232
|
+
// onDataaction },
|
|
233
|
+
// [null, propDragItem, onDragItemChange]
|
|
234
|
+
// );
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
var _c = useResizeItem({
|
|
222
238
|
dataItem: this.$props.dataItem,
|
|
223
239
|
onDataaction: onDataaction
|
|
224
240
|
}, [null, propResizeItem, onResizeItemChange]),
|
|
225
|
-
resizeItem =
|
|
226
|
-
setResizeItem =
|
|
227
|
-
dispatchResizeItem =
|
|
241
|
+
resizeItem = _c[0],
|
|
242
|
+
setResizeItem = _c[1],
|
|
243
|
+
dispatchResizeItem = _c[2]; // const [removeItem, setRemoveItem, dispatchRemoveItem] = useRemoveItem(
|
|
244
|
+
// { series, onDataaction},
|
|
245
|
+
// [null, propRemoveItem, onRemoveItemChange]
|
|
246
|
+
// );
|
|
228
247
|
|
|
229
|
-
var _f = useRemoveItem({
|
|
230
|
-
series: series,
|
|
231
|
-
onDataaction: onDataaction
|
|
232
|
-
}, [null, propRemoveItem, onRemoveItemChange]),
|
|
233
|
-
removeItem = _f[0],
|
|
234
|
-
setRemoveItem = _f[1],
|
|
235
|
-
dispatchRemoveItem = _f[2];
|
|
236
248
|
|
|
237
|
-
var
|
|
238
|
-
showRemoveDialog =
|
|
239
|
-
setShowRemoveDialog =
|
|
240
|
-
dispatchShowRemoveDialog =
|
|
249
|
+
var _d = useShowRemoveDialog(false, propShowRemoveDialog, onShowRemoveDialogChange),
|
|
250
|
+
showRemoveDialog = _d[0],
|
|
251
|
+
setShowRemoveDialog = _d[1],
|
|
252
|
+
dispatchShowRemoveDialog = _d[2];
|
|
241
253
|
|
|
242
|
-
var
|
|
243
|
-
showOccurrenceDialog =
|
|
244
|
-
setShowOccurrenceDialog =
|
|
245
|
-
dispatchShowOccurrenceDialog =
|
|
254
|
+
var _e = useShowOccurrenceDialog(false, propShowOccurrenceDialog, onShowOccurrenceDialogChange),
|
|
255
|
+
showOccurrenceDialog = _e[0],
|
|
256
|
+
setShowOccurrenceDialog = _e[1],
|
|
257
|
+
dispatchShowOccurrenceDialog = _e[2];
|
|
246
258
|
|
|
247
259
|
var items = this.bv.items; // useSchedulerViewItemsContext();
|
|
248
260
|
// const [,dispatchViewItemsFocus] = useSchedulerViewFocusedItemsContext();
|
|
@@ -251,15 +263,7 @@ var SchedulerEditItemVue2 = {
|
|
|
251
263
|
var selected = Boolean(this.bv.selectedItems && this.bv.selectedItems.some(function (si) {
|
|
252
264
|
return si === _this.item;
|
|
253
265
|
}));
|
|
254
|
-
return (//
|
|
255
|
-
// props={this.$props}
|
|
256
|
-
// form={[formItem, setFormItem, dispatchFormItem]}
|
|
257
|
-
// drag={[dragItem, setDragItem, dispatchDragItem]}
|
|
258
|
-
// resize={[resizeItem, setResizeItem, dispatchResizeItem]}
|
|
259
|
-
// remove={[removeItem, setRemoveItem, dispatchRemoveItem ]}
|
|
260
|
-
// showRemoveDialog={[showRemoveDialog, setShowRemoveDialog, dispatchShowRemoveDialog]}
|
|
261
|
-
// showOccurrenceDialog={[showOccurrenceDialog, setShowOccurrenceDialog, dispatchShowOccurrenceDialog]}
|
|
262
|
-
// >
|
|
266
|
+
return (// @ts-ignore function children
|
|
263
267
|
h(SchedulerViewItem, {
|
|
264
268
|
ignoreIsAllDay: this.ignoreIsAllDay,
|
|
265
269
|
attrs: this.v3 ? undefined : {
|
|
@@ -375,38 +379,149 @@ var SchedulerEditItemVue2 = {
|
|
|
375
379
|
onResizeenddrag: this.handleResizeEndDrag,
|
|
376
380
|
onResizestartdrag: this.handleResizeStartDrag,
|
|
377
381
|
onResizeselease: this.handleResizeRelease
|
|
378
|
-
},
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
+
}, this.v3 ? function () {
|
|
383
|
+
return [_this2.compFormItem && !showOccurrenceDialog && editable.edit && h(SchedulerForm, {
|
|
384
|
+
dataItem: _this2.compFormItem,
|
|
385
|
+
attrs: _this2.v3 ? undefined : {
|
|
386
|
+
dataItem: _this2.compFormItem
|
|
387
|
+
},
|
|
388
|
+
onSubmit: _this2.handleFormSubmit,
|
|
389
|
+
on: _this2.v3 ? undefined : {
|
|
390
|
+
"submit": _this2.handleFormSubmit,
|
|
391
|
+
"close": _this2.handleCancel,
|
|
392
|
+
"cancel": _this2.handleCancel
|
|
393
|
+
},
|
|
394
|
+
onClose: _this2.handleCancel,
|
|
395
|
+
onCancel: _this2.handleCancel
|
|
396
|
+
}), _this2.compDragItem && editable.drag && (Array.isArray(_this2.compDragItem) ? _this2.compDragItem.map(function (di, idx) {
|
|
397
|
+
return h(SchedulerDrag, {
|
|
398
|
+
key: idx,
|
|
399
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
400
|
+
attrs: this.v3 ? undefined : {
|
|
401
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
402
|
+
dataItem: di,
|
|
403
|
+
vertical: this.$props.vertical,
|
|
404
|
+
viewItem: ViewItem,
|
|
405
|
+
item: this.$props.dataItem
|
|
406
|
+
},
|
|
407
|
+
dataItem: di,
|
|
408
|
+
vertical: this.$props.vertical,
|
|
409
|
+
viewItem: ViewItem,
|
|
410
|
+
item: this.$props.dataItem
|
|
411
|
+
});
|
|
412
|
+
}, _this2) : h(SchedulerDrag, {
|
|
413
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
414
|
+
attrs: _this2.v3 ? undefined : {
|
|
415
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
416
|
+
dataItem: _this2.compDragItem,
|
|
417
|
+
vertical: _this2.$props.vertical,
|
|
418
|
+
viewItem: ViewItem,
|
|
419
|
+
item: _this2.$props.dataItem
|
|
420
|
+
},
|
|
421
|
+
dataItem: _this2.compDragItem,
|
|
422
|
+
vertical: _this2.$props.vertical,
|
|
423
|
+
viewItem: ViewItem,
|
|
424
|
+
item: _this2.$props.dataItem
|
|
425
|
+
})), _this2.compShowOccurrenceDialog && h(SchedulerOccurrenceDialog, {
|
|
426
|
+
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
427
|
+
attrs: _this2.v3 ? undefined : {
|
|
428
|
+
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
429
|
+
isRemove: !!_this2.compRemoveItem
|
|
430
|
+
},
|
|
431
|
+
isRemove: !!_this2.compRemoveItem,
|
|
432
|
+
onClose: _this2.handleCancel,
|
|
433
|
+
on: _this2.v3 ? undefined : {
|
|
434
|
+
"close": _this2.handleCancel,
|
|
435
|
+
"occurrenceclose": _this2.handleOccurrenceClick,
|
|
436
|
+
"seriesclose": _this2.handleSeriesClick
|
|
437
|
+
},
|
|
438
|
+
onOccurrenceclose: _this2.handleOccurrenceClick,
|
|
439
|
+
onSeriesclose: _this2.handleSeriesClick
|
|
440
|
+
}), _this2.compShowRemoveDialog && _this2.compRemoveItem && editable.remove && h(SchedulerRemoveDialog, {
|
|
441
|
+
dataItem: _this2.compRemoveItem,
|
|
442
|
+
attrs: _this2.v3 ? undefined : {
|
|
443
|
+
dataItem: _this2.compRemoveItem
|
|
444
|
+
},
|
|
445
|
+
onClose: _this2.handleCancel,
|
|
446
|
+
on: _this2.v3 ? undefined : {
|
|
447
|
+
"close": _this2.handleCancel,
|
|
448
|
+
"cancel": _this2.handleCancel,
|
|
449
|
+
"confirm": _this2.handleRemoveConfirm
|
|
450
|
+
},
|
|
451
|
+
onCancel: _this2.handleCancel,
|
|
452
|
+
onConfirm: _this2.handleRemoveConfirm
|
|
453
|
+
})];
|
|
454
|
+
} : [_this2.compFormItem && !showOccurrenceDialog && editable.edit && h(SchedulerForm, {
|
|
455
|
+
dataItem: _this2.compFormItem,
|
|
456
|
+
attrs: _this2.v3 ? undefined : {
|
|
457
|
+
dataItem: _this2.compFormItem
|
|
382
458
|
},
|
|
383
|
-
onSubmit:
|
|
384
|
-
on:
|
|
385
|
-
"submit":
|
|
386
|
-
"close":
|
|
387
|
-
"cancel":
|
|
459
|
+
onSubmit: _this2.handleFormSubmit,
|
|
460
|
+
on: _this2.v3 ? undefined : {
|
|
461
|
+
"submit": _this2.handleFormSubmit,
|
|
462
|
+
"close": _this2.handleCancel,
|
|
463
|
+
"cancel": _this2.handleCancel
|
|
388
464
|
},
|
|
389
|
-
onClose:
|
|
390
|
-
onCancel:
|
|
391
|
-
})
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
465
|
+
onClose: _this2.handleCancel,
|
|
466
|
+
onCancel: _this2.handleCancel
|
|
467
|
+
}), _this2.compDragItem && editable.drag && (Array.isArray(_this2.compDragItem) ? _this2.compDragItem.map(function (di, idx) {
|
|
468
|
+
return h(SchedulerDrag, {
|
|
469
|
+
key: idx,
|
|
470
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
471
|
+
attrs: this.v3 ? undefined : {
|
|
472
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
473
|
+
dataItem: di,
|
|
474
|
+
vertical: this.$props.vertical,
|
|
475
|
+
viewItem: ViewItem,
|
|
476
|
+
item: this.$props.dataItem
|
|
477
|
+
},
|
|
478
|
+
dataItem: di,
|
|
479
|
+
vertical: this.$props.vertical,
|
|
480
|
+
viewItem: ViewItem,
|
|
481
|
+
item: this.$props.dataItem
|
|
482
|
+
});
|
|
483
|
+
}, _this2) : h(SchedulerDrag, {
|
|
484
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
485
|
+
attrs: _this2.v3 ? undefined : {
|
|
486
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
487
|
+
dataItem: _this2.compDragItem,
|
|
488
|
+
vertical: _this2.$props.vertical,
|
|
489
|
+
viewItem: ViewItem,
|
|
490
|
+
item: _this2.$props.dataItem
|
|
491
|
+
},
|
|
492
|
+
dataItem: _this2.compDragItem,
|
|
493
|
+
vertical: _this2.$props.vertical,
|
|
494
|
+
viewItem: ViewItem,
|
|
495
|
+
item: _this2.$props.dataItem
|
|
496
|
+
})), _this2.compShowOccurrenceDialog && h(SchedulerOccurrenceDialog, {
|
|
497
|
+
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
498
|
+
attrs: _this2.v3 ? undefined : {
|
|
499
|
+
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
500
|
+
isRemove: !!_this2.compRemoveItem
|
|
501
|
+
},
|
|
502
|
+
isRemove: !!_this2.compRemoveItem,
|
|
503
|
+
onClose: _this2.handleCancel,
|
|
504
|
+
on: _this2.v3 ? undefined : {
|
|
505
|
+
"close": _this2.handleCancel,
|
|
506
|
+
"occurrenceclose": _this2.handleOccurrenceClick,
|
|
507
|
+
"seriesclose": _this2.handleSeriesClick
|
|
508
|
+
},
|
|
509
|
+
onOccurrenceclose: _this2.handleOccurrenceClick,
|
|
510
|
+
onSeriesclose: _this2.handleSeriesClick
|
|
511
|
+
}), _this2.compShowRemoveDialog && _this2.compRemoveItem && editable.remove && h(SchedulerRemoveDialog, {
|
|
512
|
+
dataItem: _this2.compRemoveItem,
|
|
513
|
+
attrs: _this2.v3 ? undefined : {
|
|
514
|
+
dataItem: _this2.compRemoveItem
|
|
515
|
+
},
|
|
516
|
+
onClose: _this2.handleCancel,
|
|
517
|
+
on: _this2.v3 ? undefined : {
|
|
518
|
+
"close": _this2.handleCancel,
|
|
519
|
+
"cancel": _this2.handleCancel,
|
|
520
|
+
"confirm": _this2.handleRemoveConfirm
|
|
521
|
+
},
|
|
522
|
+
onCancel: _this2.handleCancel,
|
|
523
|
+
onConfirm: _this2.handleRemoveConfirm
|
|
524
|
+
})]) // {((resizeItem && editable.resize)) && (Array.isArray(resizeItem)
|
|
410
525
|
// ? (resizeItem as any).map((ri, idx) => (
|
|
411
526
|
// <Resize
|
|
412
527
|
// key={idx}
|
|
@@ -428,20 +543,6 @@ var SchedulerEditItemVue2 = {
|
|
|
428
543
|
// vertical={this.$props.vertical}
|
|
429
544
|
// />
|
|
430
545
|
// ))}
|
|
431
|
-
// {(showOccurrenceDialog) && (<OccurrenceDialog
|
|
432
|
-
// dataItem={formItem || dragItem || resizeItem || removeItem}
|
|
433
|
-
// isRemove={removeItem !== null}
|
|
434
|
-
// onClose={this.handleCancel}
|
|
435
|
-
// onOccurrenceClick={this.handleOccurrenceClick}
|
|
436
|
-
// onSeriesClick={this.handleSeriesClick}
|
|
437
|
-
// />)}
|
|
438
|
-
// {(showRemoveDialog && removeItem && editable.remove) && (<RemoveDialog
|
|
439
|
-
// dataItem={removeItem}
|
|
440
|
-
// onClose={this.handleCancel}
|
|
441
|
-
// onCancel={this.handleCancel}
|
|
442
|
-
// onConfirm={this.handleRemoveConfirm}
|
|
443
|
-
// />)}
|
|
444
|
-
// </SchedulerEditItemContext>
|
|
445
546
|
|
|
446
547
|
);
|
|
447
548
|
},
|
|
@@ -451,6 +552,63 @@ var SchedulerEditItemVue2 = {
|
|
|
451
552
|
this.currentSeries = newSeries;
|
|
452
553
|
this.$emit('serieschange', newSeries);
|
|
453
554
|
},
|
|
555
|
+
dispatchItemSelection: function dispatchItemSelection(action, _event) {
|
|
556
|
+
this.aaa = action;
|
|
557
|
+
},
|
|
558
|
+
dispatchRemoveItem: function dispatchRemoveItem(action, _event) {
|
|
559
|
+
var newRemoveItem;
|
|
560
|
+
|
|
561
|
+
switch (action.type) {
|
|
562
|
+
case REMOVE_ITEM_ACTION.set:
|
|
563
|
+
newRemoveItem = action.payload;
|
|
564
|
+
break;
|
|
565
|
+
|
|
566
|
+
case REMOVE_ITEM_ACTION.reset:
|
|
567
|
+
newRemoveItem = null;
|
|
568
|
+
break;
|
|
569
|
+
|
|
570
|
+
case REMOVE_ITEM_ACTION.complete:
|
|
571
|
+
if (this.compRemoveItem) {
|
|
572
|
+
this.$emit('dataaction', {
|
|
573
|
+
type: DATA_ACTION.remove,
|
|
574
|
+
series: this.compSeries,
|
|
575
|
+
dataItem: this.compRemoveItem
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
newRemoveItem = null;
|
|
580
|
+
break;
|
|
581
|
+
|
|
582
|
+
default:
|
|
583
|
+
newRemoveItem = this.compRemoveItem;
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
this.currentRemoveItem = newRemoveItem;
|
|
588
|
+
this.$emit('removeitemchange', newRemoveItem);
|
|
589
|
+
},
|
|
590
|
+
dispatchShowOccurrenceDialog: function dispatchShowOccurrenceDialog(action, _event) {
|
|
591
|
+
var newShowOccurrenceDialog = showOccurrenceDialogReducer(this.compShowOccurrenceDialog, action);
|
|
592
|
+
this.currentShowOccurrenceDialog = newShowOccurrenceDialog;
|
|
593
|
+
this.$emit('showremovedialogchange', newShowOccurrenceDialog);
|
|
594
|
+
},
|
|
595
|
+
dispatchShowRemoveDialog: function dispatchShowRemoveDialog(action, _event) {
|
|
596
|
+
var newShowRemoveDialog = showRemoveDialogReducer(this.compShowRemoveDialog, action);
|
|
597
|
+
this.currentShowRemoveDialog = newShowRemoveDialog;
|
|
598
|
+
this.$emit('showremovedialogchange', newShowRemoveDialog);
|
|
599
|
+
},
|
|
600
|
+
dispatchDragItem: function dispatchDragItem(action, _event) {
|
|
601
|
+
useDragItem.call(this, action);
|
|
602
|
+
},
|
|
603
|
+
dispatchResizeItem: function dispatchResizeItem(action, _event) {
|
|
604
|
+
this.aaa = action;
|
|
605
|
+
},
|
|
606
|
+
dispatchViewSlotsFocus: function dispatchViewSlotsFocus(action, _event) {
|
|
607
|
+
this.aaa = action;
|
|
608
|
+
},
|
|
609
|
+
dispatchViewItemsFocus: function dispatchViewItemsFocus(action, _event) {
|
|
610
|
+
this.aaa = action;
|
|
611
|
+
},
|
|
454
612
|
dispatchFormItem: function dispatchFormItem(action, _event) {
|
|
455
613
|
var newFormItem;
|
|
456
614
|
|
|
@@ -489,12 +647,12 @@ var SchedulerEditItemVue2 = {
|
|
|
489
647
|
},
|
|
490
648
|
handleFocus: function handleFocus(event) {
|
|
491
649
|
if (this.onFocusAction) {
|
|
492
|
-
var actions = this.onFocusAction(event, this.$props
|
|
650
|
+
var actions = this.onFocusAction(event, this.$props);
|
|
493
651
|
|
|
494
652
|
if (actions) {// Array.isArray(actions)
|
|
495
653
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
496
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
497
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
654
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
|
|
655
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
|
|
498
656
|
}
|
|
499
657
|
}
|
|
500
658
|
|
|
@@ -502,12 +660,12 @@ var SchedulerEditItemVue2 = {
|
|
|
502
660
|
},
|
|
503
661
|
handleMouseDown: function handleMouseDown(event) {
|
|
504
662
|
if (this.onMouseDownAction) {
|
|
505
|
-
var actions = this.onMouseDownAction(event, this.$props
|
|
663
|
+
var actions = this.onMouseDownAction(event, this.$props);
|
|
506
664
|
|
|
507
665
|
if (actions) {// Array.isArray(actions)
|
|
508
666
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
509
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
510
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
667
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
|
|
668
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
|
|
511
669
|
}
|
|
512
670
|
}
|
|
513
671
|
|
|
@@ -515,12 +673,12 @@ var SchedulerEditItemVue2 = {
|
|
|
515
673
|
},
|
|
516
674
|
handleMouseUp: function handleMouseUp(event) {
|
|
517
675
|
if (this.onMouseUpAction) {
|
|
518
|
-
var actions = this.onMouseUpAction(event, this.$props
|
|
676
|
+
var actions = this.onMouseUpAction(event, this.$props);
|
|
519
677
|
|
|
520
678
|
if (actions) {// Array.isArray(actions)
|
|
521
679
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
522
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
523
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
680
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
|
|
681
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
|
|
524
682
|
}
|
|
525
683
|
}
|
|
526
684
|
|
|
@@ -528,12 +686,12 @@ var SchedulerEditItemVue2 = {
|
|
|
528
686
|
},
|
|
529
687
|
handleClick: function handleClick(event) {
|
|
530
688
|
if (this.onClickAction) {
|
|
531
|
-
var actions = this.onClickAction(event, this.$props
|
|
689
|
+
var actions = this.onClickAction(event, this.$props);
|
|
532
690
|
|
|
533
691
|
if (actions) {// Array.isArray(actions)
|
|
534
692
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
535
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
536
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
693
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
|
|
694
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
|
|
537
695
|
}
|
|
538
696
|
}
|
|
539
697
|
|
|
@@ -541,7 +699,7 @@ var SchedulerEditItemVue2 = {
|
|
|
541
699
|
},
|
|
542
700
|
handleDoubleClick: function handleDoubleClick(event) {
|
|
543
701
|
if (this.onDoubleClickAction) {
|
|
544
|
-
var actions = this.onDoubleClickAction(event, this.$props
|
|
702
|
+
var actions = this.onDoubleClickAction(event, this.$props);
|
|
545
703
|
var that_1 = this;
|
|
546
704
|
|
|
547
705
|
if (actions) {
|
|
@@ -558,62 +716,76 @@ var SchedulerEditItemVue2 = {
|
|
|
558
716
|
this.$emit('doubleclick', event);
|
|
559
717
|
},
|
|
560
718
|
handleRemoveClick: function handleRemoveClick(event) {
|
|
719
|
+
var _this = this;
|
|
720
|
+
|
|
561
721
|
if (this.onRemoveClickAction) {
|
|
562
|
-
var actions = this.onRemoveClickAction(event, this.$props
|
|
722
|
+
var actions = this.onRemoveClickAction(event, this.$props);
|
|
563
723
|
|
|
564
|
-
if (actions) {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
724
|
+
if (actions) {
|
|
725
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
726
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
727
|
+
item: _this.dataItem
|
|
728
|
+
}), event);
|
|
729
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
730
|
+
item: this.dataItem
|
|
731
|
+
}));
|
|
568
732
|
}
|
|
569
733
|
}
|
|
570
734
|
|
|
571
735
|
this.$emit('removeclick', event);
|
|
572
736
|
},
|
|
573
737
|
handlePress: function handlePress(event) {
|
|
738
|
+
var _this = this;
|
|
739
|
+
|
|
574
740
|
if (this.onPressAction) {
|
|
575
|
-
var actions = this.onPressAction(event, this.$props
|
|
741
|
+
var actions = this.onPressAction(event, this.$props);
|
|
576
742
|
|
|
577
|
-
if (actions) {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
743
|
+
if (actions) {
|
|
744
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
745
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
746
|
+
item: _this.dataItem
|
|
747
|
+
}), event);
|
|
748
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
749
|
+
item: this.dataItem
|
|
750
|
+
}), event);
|
|
581
751
|
}
|
|
582
752
|
}
|
|
583
753
|
|
|
584
754
|
this.$emit('press', event);
|
|
585
755
|
},
|
|
586
756
|
handleDrag: function handleDrag(event) {
|
|
757
|
+
var _this = this;
|
|
758
|
+
|
|
587
759
|
if (this.onDragAction) {
|
|
588
|
-
var actions = this.onDragAction(event, this.$props
|
|
760
|
+
var actions = this.onDragAction(event, this.$props);
|
|
589
761
|
|
|
590
|
-
if (actions) {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
// event.dragEvent.originalEvent
|
|
599
|
-
// );
|
|
762
|
+
if (actions) {
|
|
763
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
764
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
765
|
+
item: _this.dataItem
|
|
766
|
+
}), event.dragEvent.originalEvent);
|
|
767
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
768
|
+
item: this.dataItem
|
|
769
|
+
}), event.dragEvent.originalEvent);
|
|
600
770
|
}
|
|
601
771
|
}
|
|
602
772
|
|
|
603
773
|
this.$emit('drag', event);
|
|
604
774
|
},
|
|
605
775
|
handleRelease: function handleRelease(event) {
|
|
776
|
+
var _this = this;
|
|
777
|
+
|
|
606
778
|
if (this.onReleaseAction) {
|
|
607
|
-
var actions = this.onReleaseAction(event, this.$props
|
|
779
|
+
var actions = this.onReleaseAction(event, this.$props);
|
|
608
780
|
|
|
609
|
-
if (actions) {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
781
|
+
if (actions) {
|
|
782
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
783
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
784
|
+
item: _this.dataItem
|
|
785
|
+
}), event.dragEvent.originalEvent);
|
|
786
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
787
|
+
item: this.dataItem
|
|
788
|
+
}), event.dragEvent.originalEvent);
|
|
617
789
|
}
|
|
618
790
|
}
|
|
619
791
|
|
|
@@ -621,15 +793,15 @@ var SchedulerEditItemVue2 = {
|
|
|
621
793
|
},
|
|
622
794
|
handleResizePress: function handleResizePress(event) {
|
|
623
795
|
if (this.onResizePressAction) {
|
|
624
|
-
var actions = this.onResizePressAction(event, this.$props
|
|
796
|
+
var actions = this.onResizePressAction(event, this.$props);
|
|
625
797
|
|
|
626
798
|
if (actions) {// Array.isArray(actions)
|
|
627
799
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
628
800
|
// this.actionsReducerMap[action.type](
|
|
629
|
-
// {...action, item: this.
|
|
801
|
+
// {...action, item: this.dataItem},
|
|
630
802
|
// event.dragEvent.originalEvent))
|
|
631
803
|
// : this.actionsReducerMap[actions.type](
|
|
632
|
-
// {...actions, item: this.
|
|
804
|
+
// {...actions, item: this.dataItem},
|
|
633
805
|
// event.dragEvent.originalEvent
|
|
634
806
|
// );
|
|
635
807
|
}
|
|
@@ -639,15 +811,15 @@ var SchedulerEditItemVue2 = {
|
|
|
639
811
|
},
|
|
640
812
|
handleResizeStartDrag: function handleResizeStartDrag(event) {
|
|
641
813
|
if (this.onResizeStartDragAction) {
|
|
642
|
-
var actions = this.onResizeStartDragAction(event, this.$props
|
|
814
|
+
var actions = this.onResizeStartDragAction(event, this.$props);
|
|
643
815
|
|
|
644
816
|
if (actions) {// Array.isArray(actions)
|
|
645
817
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
646
818
|
// this.actionsReducerMap[action.type](
|
|
647
|
-
// {...action, item: this.
|
|
819
|
+
// {...action, item: this.dataItem},
|
|
648
820
|
// event.dragEvent.originalEvent))
|
|
649
821
|
// : this.actionsReducerMap[actions.type](
|
|
650
|
-
// {...actions, item: this.
|
|
822
|
+
// {...actions, item: this.dataItem},
|
|
651
823
|
// event.dragEvent.originalEvent
|
|
652
824
|
// );
|
|
653
825
|
}
|
|
@@ -657,15 +829,15 @@ var SchedulerEditItemVue2 = {
|
|
|
657
829
|
},
|
|
658
830
|
handleResizeEndDrag: function handleResizeEndDrag(event) {
|
|
659
831
|
if (this.onResizeEndDragAction) {
|
|
660
|
-
var actions = this.onResizeEndDragAction(event, this.$props
|
|
832
|
+
var actions = this.onResizeEndDragAction(event, this.$props);
|
|
661
833
|
|
|
662
834
|
if (actions) {// Array.isArray(actions)
|
|
663
835
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
664
836
|
// this.actionsReducerMap[action.type](
|
|
665
|
-
// {...action, item: this.
|
|
837
|
+
// {...action, item: this.dataItem},
|
|
666
838
|
// event.dragEvent.originalEvent))
|
|
667
839
|
// : this.actionsReducerMap[actions.type](
|
|
668
|
-
// {...actions, item: this.
|
|
840
|
+
// {...actions, item: this.dataItem},
|
|
669
841
|
// event.dragEvent.originalEvent);
|
|
670
842
|
}
|
|
671
843
|
}
|
|
@@ -674,15 +846,15 @@ var SchedulerEditItemVue2 = {
|
|
|
674
846
|
},
|
|
675
847
|
handleResizeRelease: function handleResizeRelease(event) {
|
|
676
848
|
if (this.onResizeReleaseAction) {
|
|
677
|
-
var actions = this.onResizeReleaseAction(event, this.$props
|
|
849
|
+
var actions = this.onResizeReleaseAction(event, this.$props);
|
|
678
850
|
|
|
679
851
|
if (actions) {// Array.isArray(actions)
|
|
680
852
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
681
853
|
// this.actionsReducerMap[action.type](
|
|
682
|
-
// {...action, item: this.
|
|
854
|
+
// {...action, item: this.dataItem},
|
|
683
855
|
// event.dragEvent.originalEvent))
|
|
684
856
|
// : this.actionsReducerMap[actions.type](
|
|
685
|
-
// {...actions, item: this.
|
|
857
|
+
// {...actions, item: this.dataItem },
|
|
686
858
|
// event.dragEvent.originalEvent
|
|
687
859
|
// );
|
|
688
860
|
}
|
|
@@ -694,15 +866,15 @@ var SchedulerEditItemVue2 = {
|
|
|
694
866
|
var _this = this;
|
|
695
867
|
|
|
696
868
|
if (this.onFormSubmitAction) {
|
|
697
|
-
var actions = this.onFormSubmitAction(event, this.$props
|
|
869
|
+
var actions = this.onFormSubmitAction(event, this.$props);
|
|
698
870
|
|
|
699
871
|
if (actions) {
|
|
700
872
|
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
701
873
|
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
702
|
-
item: _this.
|
|
874
|
+
item: _this.dataItem
|
|
703
875
|
}), event);
|
|
704
876
|
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
705
|
-
item: this.
|
|
877
|
+
item: this.dataItem
|
|
706
878
|
}), event);
|
|
707
879
|
}
|
|
708
880
|
}
|
|
@@ -713,15 +885,15 @@ var SchedulerEditItemVue2 = {
|
|
|
713
885
|
var _this = this;
|
|
714
886
|
|
|
715
887
|
if (this.onCancelAction) {
|
|
716
|
-
var actions = this.onCancelAction(event, this.$props
|
|
888
|
+
var actions = this.onCancelAction(event, this.$props);
|
|
717
889
|
|
|
718
890
|
if (actions) {
|
|
719
891
|
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
720
892
|
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
721
|
-
item: _this.
|
|
893
|
+
item: _this.dataItem
|
|
722
894
|
}), event);
|
|
723
895
|
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
724
|
-
item: this.
|
|
896
|
+
item: this.dataItem
|
|
725
897
|
}), event);
|
|
726
898
|
}
|
|
727
899
|
}
|
|
@@ -729,26 +901,38 @@ var SchedulerEditItemVue2 = {
|
|
|
729
901
|
this.$emit('cancel', event);
|
|
730
902
|
},
|
|
731
903
|
handleOccurrenceClick: function handleOccurrenceClick(event) {
|
|
904
|
+
var _this = this;
|
|
905
|
+
|
|
732
906
|
if (this.onOccurrenceClickAction) {
|
|
733
|
-
var actions = this.onOccurrenceClickAction(event, this.$props
|
|
907
|
+
var actions = this.onOccurrenceClickAction(event, this.$props);
|
|
734
908
|
|
|
735
|
-
if (actions) {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
909
|
+
if (actions) {
|
|
910
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
911
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
912
|
+
item: _this.dataItem
|
|
913
|
+
}), event);
|
|
914
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
915
|
+
item: this.dataItem
|
|
916
|
+
}), event);
|
|
739
917
|
}
|
|
740
918
|
}
|
|
741
919
|
|
|
742
920
|
this.$emit('occurrenceclick', event);
|
|
743
921
|
},
|
|
744
922
|
handleSeriesClick: function handleSeriesClick(event) {
|
|
923
|
+
var _this = this;
|
|
924
|
+
|
|
745
925
|
if (this.onSeriesClickAction) {
|
|
746
|
-
var actions = this.onSeriesClickAction(event, this.$props
|
|
926
|
+
var actions = this.onSeriesClickAction(event, this.$props);
|
|
747
927
|
|
|
748
|
-
if (actions) {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
928
|
+
if (actions) {
|
|
929
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
930
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
931
|
+
item: _this.dataItem
|
|
932
|
+
}), event);
|
|
933
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
934
|
+
item: this.dataItem
|
|
935
|
+
}), event);
|
|
752
936
|
}
|
|
753
937
|
}
|
|
754
938
|
|
|
@@ -756,12 +940,12 @@ var SchedulerEditItemVue2 = {
|
|
|
756
940
|
},
|
|
757
941
|
handleKeyDown: function handleKeyDown(event) {
|
|
758
942
|
if (this.onKeyDownAction) {
|
|
759
|
-
var actions = this.onKeyDownAction(event, this.$props
|
|
943
|
+
var actions = this.onKeyDownAction(event, this.$props);
|
|
760
944
|
|
|
761
945
|
if (actions) {// Array.isArray(actions)
|
|
762
946
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
763
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
764
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
947
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event.event))
|
|
948
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem}, event.event);
|
|
765
949
|
}
|
|
766
950
|
}
|
|
767
951
|
|
|
@@ -769,33 +953,39 @@ var SchedulerEditItemVue2 = {
|
|
|
769
953
|
},
|
|
770
954
|
handleKeyUp: function handleKeyUp(event) {
|
|
771
955
|
if (this.onKeyUpAction) {
|
|
772
|
-
var actions = this.onKeyUpAction(event, this.$props
|
|
956
|
+
var actions = this.onKeyUpAction(event, this.$props);
|
|
773
957
|
|
|
774
958
|
if (actions) {// Array.isArray(actions)
|
|
775
959
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
776
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
777
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
960
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event.event))
|
|
961
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem}, event.event);
|
|
778
962
|
}
|
|
779
963
|
}
|
|
780
964
|
|
|
781
965
|
this.$emit('keyup', event);
|
|
782
966
|
},
|
|
783
967
|
handleRemoveConfirm: function handleRemoveConfirm(event) {
|
|
968
|
+
var _this = this;
|
|
969
|
+
|
|
784
970
|
if (this.onRemoveConfirmAction) {
|
|
785
|
-
var actions = this.onRemoveConfirmAction(event, this.$props
|
|
971
|
+
var actions = this.onRemoveConfirmAction(event, this.$props);
|
|
786
972
|
|
|
787
|
-
if (actions) {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
973
|
+
if (actions) {
|
|
974
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
975
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
976
|
+
item: _this.dataItem
|
|
977
|
+
}), event.event);
|
|
978
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
979
|
+
item: this.dataItem
|
|
980
|
+
}), event.event);
|
|
791
981
|
}
|
|
792
982
|
}
|
|
793
983
|
|
|
794
984
|
this.$emit('removeconfirm', event);
|
|
795
985
|
},
|
|
796
|
-
onClickAction: function onClickAction(event, _
|
|
986
|
+
onClickAction: function onClickAction(event, _) {
|
|
797
987
|
return [{
|
|
798
|
-
type: event.event.metaKey || event.event.ctrlKey ?
|
|
988
|
+
type: event.event.metaKey || event.event.ctrlKey ? this.compSelected && !this.compDragItem && !this.compResizeItem ? ITEMS_SELECT_ACTION.remove : ITEMS_SELECT_ACTION.add : ITEMS_SELECT_ACTION.select
|
|
799
989
|
}];
|
|
800
990
|
},
|
|
801
991
|
onDoubleClickAction: function onDoubleClickAction(_, props) {
|
|
@@ -834,11 +1024,11 @@ var SchedulerEditItemVue2 = {
|
|
|
834
1024
|
}
|
|
835
1025
|
} : [];
|
|
836
1026
|
},
|
|
837
|
-
onReleaseAction: function onReleaseAction(event, props
|
|
838
|
-
return props.editable &&
|
|
1027
|
+
onReleaseAction: function onReleaseAction(event, props) {
|
|
1028
|
+
return props.editable && this.compDragItem ? props.isRecurring && !props.isException && this.compSeries === null ? {
|
|
839
1029
|
type: SHOW_OCCURRENCE_DIALOG_ACTION.open
|
|
840
1030
|
} : {
|
|
841
|
-
type: props.isRecurring ?
|
|
1031
|
+
type: props.isRecurring ? this.compSeries ? DRAG_ITEM_ACTION.completeSeries : DRAG_ITEM_ACTION.completeOccurrence : DRAG_ITEM_ACTION.complete,
|
|
842
1032
|
payload: {
|
|
843
1033
|
x: event.dragEvent.clientX,
|
|
844
1034
|
y: event.dragEvent.clientY
|
|
@@ -872,19 +1062,19 @@ var SchedulerEditItemVue2 = {
|
|
|
872
1062
|
}
|
|
873
1063
|
} : [];
|
|
874
1064
|
},
|
|
875
|
-
onResizeReleaseAction: function onResizeReleaseAction(event, props
|
|
876
|
-
return props.editable &&
|
|
1065
|
+
onResizeReleaseAction: function onResizeReleaseAction(event, props) {
|
|
1066
|
+
return props.editable && this.compResizeItem ? props.isRecurring && !props.isException && this.compSeries === null ? {
|
|
877
1067
|
type: SHOW_OCCURRENCE_DIALOG_ACTION.open
|
|
878
1068
|
} : {
|
|
879
|
-
type: props.isRecurring ?
|
|
1069
|
+
type: props.isRecurring ? this.compSeries ? RESIZE_ITEM_ACTION.completeSeries : RESIZE_ITEM_ACTION.completeOccurrence : RESIZE_ITEM_ACTION.complete,
|
|
880
1070
|
payload: {
|
|
881
1071
|
x: event.dragEvent.clientX,
|
|
882
1072
|
y: event.dragEvent.clientY
|
|
883
1073
|
}
|
|
884
1074
|
} : [];
|
|
885
1075
|
},
|
|
886
|
-
onOccurrenceClickAction: function onOccurrenceClickAction(_event, props
|
|
887
|
-
if (
|
|
1076
|
+
onOccurrenceClickAction: function onOccurrenceClickAction(_event, props) {
|
|
1077
|
+
if (this.compDragItem) {
|
|
888
1078
|
return [{
|
|
889
1079
|
type: DRAG_ITEM_ACTION.completeOccurrence
|
|
890
1080
|
}, {
|
|
@@ -892,7 +1082,7 @@ var SchedulerEditItemVue2 = {
|
|
|
892
1082
|
}];
|
|
893
1083
|
}
|
|
894
1084
|
|
|
895
|
-
if (
|
|
1085
|
+
if (this.compResizeItem) {
|
|
896
1086
|
return [{
|
|
897
1087
|
type: RESIZE_ITEM_ACTION.completeOccurrence
|
|
898
1088
|
}, {
|
|
@@ -900,7 +1090,7 @@ var SchedulerEditItemVue2 = {
|
|
|
900
1090
|
}];
|
|
901
1091
|
}
|
|
902
1092
|
|
|
903
|
-
if (
|
|
1093
|
+
if (this.compFormItem) {
|
|
904
1094
|
return [{
|
|
905
1095
|
type: SERIES_ACTION.set,
|
|
906
1096
|
payload: false
|
|
@@ -912,7 +1102,7 @@ var SchedulerEditItemVue2 = {
|
|
|
912
1102
|
}];
|
|
913
1103
|
}
|
|
914
1104
|
|
|
915
|
-
if (
|
|
1105
|
+
if (this.compRemoveItem) {
|
|
916
1106
|
return [{
|
|
917
1107
|
type: SERIES_ACTION.set,
|
|
918
1108
|
payload: false
|
|
@@ -926,8 +1116,8 @@ var SchedulerEditItemVue2 = {
|
|
|
926
1116
|
}];
|
|
927
1117
|
}
|
|
928
1118
|
},
|
|
929
|
-
onSeriesClickAction: function onSeriesClickAction(_event, props
|
|
930
|
-
if (
|
|
1119
|
+
onSeriesClickAction: function onSeriesClickAction(_event, props) {
|
|
1120
|
+
if (this.compDragItem) {
|
|
931
1121
|
return [{
|
|
932
1122
|
type: DRAG_ITEM_ACTION.completeSeries
|
|
933
1123
|
}, {
|
|
@@ -935,7 +1125,7 @@ var SchedulerEditItemVue2 = {
|
|
|
935
1125
|
}];
|
|
936
1126
|
}
|
|
937
1127
|
|
|
938
|
-
if (
|
|
1128
|
+
if (this.compResizeItem) {
|
|
939
1129
|
return [{
|
|
940
1130
|
type: RESIZE_ITEM_ACTION.completeSeries
|
|
941
1131
|
}, {
|
|
@@ -943,7 +1133,7 @@ var SchedulerEditItemVue2 = {
|
|
|
943
1133
|
}];
|
|
944
1134
|
}
|
|
945
1135
|
|
|
946
|
-
if (
|
|
1136
|
+
if (this.compFormItem) {
|
|
947
1137
|
return [{
|
|
948
1138
|
type: SERIES_ACTION.set,
|
|
949
1139
|
payload: true
|
|
@@ -955,7 +1145,7 @@ var SchedulerEditItemVue2 = {
|
|
|
955
1145
|
}];
|
|
956
1146
|
}
|
|
957
1147
|
|
|
958
|
-
if (
|
|
1148
|
+
if (this.compRemoveItem) {
|
|
959
1149
|
return [{
|
|
960
1150
|
type: SERIES_ACTION.set,
|
|
961
1151
|
payload: true
|