@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
|
@@ -27,12 +27,18 @@ var allVue = Vue;
|
|
|
27
27
|
var gh = allVue.h;
|
|
28
28
|
var inject = allVue.inject;
|
|
29
29
|
|
|
30
|
+
var SchedulerOccurrenceDialog_1 = require("../components/SchedulerOccurrenceDialog");
|
|
31
|
+
|
|
30
32
|
var SchedulerForm_1 = require("../components/SchedulerForm");
|
|
31
33
|
|
|
34
|
+
var SchedulerRemoveDialog_1 = require("../components/SchedulerRemoveDialog");
|
|
35
|
+
|
|
32
36
|
var Scheduler_1 = require("../Scheduler");
|
|
33
37
|
|
|
34
38
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
35
39
|
|
|
40
|
+
var SchedulerDrag_1 = require("../views/common/SchedulerDrag");
|
|
41
|
+
|
|
36
42
|
var SchedulerViewItem_1 = require("./SchedulerViewItem");
|
|
37
43
|
|
|
38
44
|
var hooks_1 = require("../hooks");
|
|
@@ -71,9 +77,18 @@ var SchedulerEditItemVue2 = {
|
|
|
71
77
|
dragItem: Object,
|
|
72
78
|
resizeItem: Object,
|
|
73
79
|
removeItem: Object,
|
|
74
|
-
showOccurrenceDialog:
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
showOccurrenceDialog: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: undefined
|
|
83
|
+
},
|
|
84
|
+
showRemoveDialog: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: undefined
|
|
87
|
+
},
|
|
88
|
+
series: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: undefined
|
|
91
|
+
},
|
|
77
92
|
uid: [String, Number],
|
|
78
93
|
start: Date,
|
|
79
94
|
end: Date,
|
|
@@ -136,7 +151,12 @@ var SchedulerEditItemVue2 = {
|
|
|
136
151
|
currentTabIndex: this.$props.tabIndex,
|
|
137
152
|
currentFormItem: null,
|
|
138
153
|
currentSelected: null,
|
|
139
|
-
currentSeries: null
|
|
154
|
+
currentSeries: null,
|
|
155
|
+
currentRemoveItem: null,
|
|
156
|
+
currentDragItem: null,
|
|
157
|
+
currentResizeItem: null,
|
|
158
|
+
currentShowRemoveDialog: null,
|
|
159
|
+
currentShowOccurrenceDialog: null // item: null
|
|
140
160
|
|
|
141
161
|
};
|
|
142
162
|
},
|
|
@@ -150,17 +170,20 @@ var SchedulerEditItemVue2 = {
|
|
|
150
170
|
compFormItem: function compFormItem() {
|
|
151
171
|
return this.formItem !== undefined ? this.formItem : this.currentFormItem;
|
|
152
172
|
},
|
|
153
|
-
|
|
154
|
-
return
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
173
|
+
compRemoveItem: function compRemoveItem() {
|
|
174
|
+
return this.removeItem !== undefined ? this.removeItem : this.currentRemoveItem;
|
|
175
|
+
},
|
|
176
|
+
compDragItem: function compDragItem() {
|
|
177
|
+
return this.dragItem !== undefined ? this.dragItem : this.currentDragItem;
|
|
178
|
+
},
|
|
179
|
+
compResizeItem: function compResizeItem() {
|
|
180
|
+
return this.resizeItem !== undefined ? this.resizeItem : this.currentResizeItem;
|
|
181
|
+
},
|
|
182
|
+
compShowRemoveDialog: function compShowRemoveDialog() {
|
|
183
|
+
return this.showRemoveDialog !== undefined ? this.showRemoveDialog : this.currentShowRemoveDialog;
|
|
184
|
+
},
|
|
185
|
+
compShowOccurrenceDialog: function compShowOccurrenceDialog() {
|
|
186
|
+
return this.showOccurrenceDialog !== undefined ? this.showOccurrenceDialog : this.currentShowOccurrenceDialog;
|
|
164
187
|
},
|
|
165
188
|
actionsReducerMap: function actionsReducerMap() {
|
|
166
189
|
var _a;
|
|
@@ -181,6 +204,8 @@ var SchedulerEditItemVue2 = {
|
|
|
181
204
|
},
|
|
182
205
|
// @ts-ignore
|
|
183
206
|
render: function render(createElement) {
|
|
207
|
+
var _this2 = this;
|
|
208
|
+
|
|
184
209
|
var _this = this;
|
|
185
210
|
|
|
186
211
|
var h = gh || createElement; // tslint:enable:max-line-length
|
|
@@ -220,51 +245,41 @@ var SchedulerEditItemVue2 = {
|
|
|
220
245
|
|
|
221
246
|
var _b = use_series_1.useSeries(null, propSeries, onSeriesChange),
|
|
222
247
|
series = _b[0],
|
|
223
|
-
dispatchSeries = _b[1];
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}, [null, propDragItem, onDragItemChange]),
|
|
239
|
-
dragItem = _d[0],
|
|
240
|
-
setDragItem = _d[1],
|
|
241
|
-
dispatchDragItem = _d[2];
|
|
242
|
-
|
|
243
|
-
var _e = use_resize_item_1.useResizeItem({
|
|
248
|
+
dispatchSeries = _b[1]; // const [formItem, setFormItem, dispatchFormItem] = useFormItem(
|
|
249
|
+
// { series, onDataaction},
|
|
250
|
+
// [null, propFormItem, onFormItemChange]
|
|
251
|
+
// );
|
|
252
|
+
// const [dragItem, setDragItem, dispatchDragItem] = useDragItem(
|
|
253
|
+
// {
|
|
254
|
+
// dataItem: this.$props.dataItem,
|
|
255
|
+
// ignoreIsAllDay: this.$props.ignoreIsAllDay,
|
|
256
|
+
// isAllDay: this.$props.isAllDay,
|
|
257
|
+
// onDataaction },
|
|
258
|
+
// [null, propDragItem, onDragItemChange]
|
|
259
|
+
// );
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
var _c = use_resize_item_1.useResizeItem({
|
|
244
263
|
dataItem: this.$props.dataItem,
|
|
245
264
|
onDataaction: onDataaction
|
|
246
265
|
}, [null, propResizeItem, onResizeItemChange]),
|
|
247
|
-
resizeItem =
|
|
248
|
-
setResizeItem =
|
|
249
|
-
dispatchResizeItem =
|
|
266
|
+
resizeItem = _c[0],
|
|
267
|
+
setResizeItem = _c[1],
|
|
268
|
+
dispatchResizeItem = _c[2]; // const [removeItem, setRemoveItem, dispatchRemoveItem] = useRemoveItem(
|
|
269
|
+
// { series, onDataaction},
|
|
270
|
+
// [null, propRemoveItem, onRemoveItemChange]
|
|
271
|
+
// );
|
|
250
272
|
|
|
251
|
-
var _f = use_remove_item_1.useRemoveItem({
|
|
252
|
-
series: series,
|
|
253
|
-
onDataaction: onDataaction
|
|
254
|
-
}, [null, propRemoveItem, onRemoveItemChange]),
|
|
255
|
-
removeItem = _f[0],
|
|
256
|
-
setRemoveItem = _f[1],
|
|
257
|
-
dispatchRemoveItem = _f[2];
|
|
258
273
|
|
|
259
|
-
var
|
|
260
|
-
showRemoveDialog =
|
|
261
|
-
setShowRemoveDialog =
|
|
262
|
-
dispatchShowRemoveDialog =
|
|
274
|
+
var _d = use_show_remove_item_dialog_1.useShowRemoveDialog(false, propShowRemoveDialog, onShowRemoveDialogChange),
|
|
275
|
+
showRemoveDialog = _d[0],
|
|
276
|
+
setShowRemoveDialog = _d[1],
|
|
277
|
+
dispatchShowRemoveDialog = _d[2];
|
|
263
278
|
|
|
264
|
-
var
|
|
265
|
-
showOccurrenceDialog =
|
|
266
|
-
setShowOccurrenceDialog =
|
|
267
|
-
dispatchShowOccurrenceDialog =
|
|
279
|
+
var _e = use_show_occurrence_dialog_1.useShowOccurrenceDialog(false, propShowOccurrenceDialog, onShowOccurrenceDialogChange),
|
|
280
|
+
showOccurrenceDialog = _e[0],
|
|
281
|
+
setShowOccurrenceDialog = _e[1],
|
|
282
|
+
dispatchShowOccurrenceDialog = _e[2];
|
|
268
283
|
|
|
269
284
|
var items = this.bv.items; // useSchedulerViewItemsContext();
|
|
270
285
|
// const [,dispatchViewItemsFocus] = useSchedulerViewFocusedItemsContext();
|
|
@@ -273,15 +288,7 @@ var SchedulerEditItemVue2 = {
|
|
|
273
288
|
var selected = Boolean(this.bv.selectedItems && this.bv.selectedItems.some(function (si) {
|
|
274
289
|
return si === _this.item;
|
|
275
290
|
}));
|
|
276
|
-
return (//
|
|
277
|
-
// props={this.$props}
|
|
278
|
-
// form={[formItem, setFormItem, dispatchFormItem]}
|
|
279
|
-
// drag={[dragItem, setDragItem, dispatchDragItem]}
|
|
280
|
-
// resize={[resizeItem, setResizeItem, dispatchResizeItem]}
|
|
281
|
-
// remove={[removeItem, setRemoveItem, dispatchRemoveItem ]}
|
|
282
|
-
// showRemoveDialog={[showRemoveDialog, setShowRemoveDialog, dispatchShowRemoveDialog]}
|
|
283
|
-
// showOccurrenceDialog={[showOccurrenceDialog, setShowOccurrenceDialog, dispatchShowOccurrenceDialog]}
|
|
284
|
-
// >
|
|
291
|
+
return (// @ts-ignore function children
|
|
285
292
|
h(SchedulerViewItem_1.SchedulerViewItem, {
|
|
286
293
|
ignoreIsAllDay: this.ignoreIsAllDay,
|
|
287
294
|
attrs: this.v3 ? undefined : {
|
|
@@ -397,38 +404,149 @@ var SchedulerEditItemVue2 = {
|
|
|
397
404
|
onResizeenddrag: this.handleResizeEndDrag,
|
|
398
405
|
onResizestartdrag: this.handleResizeStartDrag,
|
|
399
406
|
onResizeselease: this.handleResizeRelease
|
|
400
|
-
},
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
407
|
+
}, this.v3 ? function () {
|
|
408
|
+
return [_this2.compFormItem && !showOccurrenceDialog && editable.edit && h(SchedulerForm_1.SchedulerForm, {
|
|
409
|
+
dataItem: _this2.compFormItem,
|
|
410
|
+
attrs: _this2.v3 ? undefined : {
|
|
411
|
+
dataItem: _this2.compFormItem
|
|
412
|
+
},
|
|
413
|
+
onSubmit: _this2.handleFormSubmit,
|
|
414
|
+
on: _this2.v3 ? undefined : {
|
|
415
|
+
"submit": _this2.handleFormSubmit,
|
|
416
|
+
"close": _this2.handleCancel,
|
|
417
|
+
"cancel": _this2.handleCancel
|
|
418
|
+
},
|
|
419
|
+
onClose: _this2.handleCancel,
|
|
420
|
+
onCancel: _this2.handleCancel
|
|
421
|
+
}), _this2.compDragItem && editable.drag && (Array.isArray(_this2.compDragItem) ? _this2.compDragItem.map(function (di, idx) {
|
|
422
|
+
return h(SchedulerDrag_1.SchedulerDrag, {
|
|
423
|
+
key: idx,
|
|
424
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
425
|
+
attrs: this.v3 ? undefined : {
|
|
426
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
427
|
+
dataItem: di,
|
|
428
|
+
vertical: this.$props.vertical,
|
|
429
|
+
viewItem: ViewItem,
|
|
430
|
+
item: this.$props.dataItem
|
|
431
|
+
},
|
|
432
|
+
dataItem: di,
|
|
433
|
+
vertical: this.$props.vertical,
|
|
434
|
+
viewItem: ViewItem,
|
|
435
|
+
item: this.$props.dataItem
|
|
436
|
+
});
|
|
437
|
+
}, _this2) : h(SchedulerDrag_1.SchedulerDrag, {
|
|
438
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
439
|
+
attrs: _this2.v3 ? undefined : {
|
|
440
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
441
|
+
dataItem: _this2.compDragItem,
|
|
442
|
+
vertical: _this2.$props.vertical,
|
|
443
|
+
viewItem: ViewItem,
|
|
444
|
+
item: _this2.$props.dataItem
|
|
445
|
+
},
|
|
446
|
+
dataItem: _this2.compDragItem,
|
|
447
|
+
vertical: _this2.$props.vertical,
|
|
448
|
+
viewItem: ViewItem,
|
|
449
|
+
item: _this2.$props.dataItem
|
|
450
|
+
})), _this2.compShowOccurrenceDialog && h(SchedulerOccurrenceDialog_1.SchedulerOccurrenceDialog, {
|
|
451
|
+
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
452
|
+
attrs: _this2.v3 ? undefined : {
|
|
453
|
+
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
454
|
+
isRemove: !!_this2.compRemoveItem
|
|
455
|
+
},
|
|
456
|
+
isRemove: !!_this2.compRemoveItem,
|
|
457
|
+
onClose: _this2.handleCancel,
|
|
458
|
+
on: _this2.v3 ? undefined : {
|
|
459
|
+
"close": _this2.handleCancel,
|
|
460
|
+
"occurrenceclose": _this2.handleOccurrenceClick,
|
|
461
|
+
"seriesclose": _this2.handleSeriesClick
|
|
462
|
+
},
|
|
463
|
+
onOccurrenceclose: _this2.handleOccurrenceClick,
|
|
464
|
+
onSeriesclose: _this2.handleSeriesClick
|
|
465
|
+
}), _this2.compShowRemoveDialog && _this2.compRemoveItem && editable.remove && h(SchedulerRemoveDialog_1.SchedulerRemoveDialog, {
|
|
466
|
+
dataItem: _this2.compRemoveItem,
|
|
467
|
+
attrs: _this2.v3 ? undefined : {
|
|
468
|
+
dataItem: _this2.compRemoveItem
|
|
469
|
+
},
|
|
470
|
+
onClose: _this2.handleCancel,
|
|
471
|
+
on: _this2.v3 ? undefined : {
|
|
472
|
+
"close": _this2.handleCancel,
|
|
473
|
+
"cancel": _this2.handleCancel,
|
|
474
|
+
"confirm": _this2.handleRemoveConfirm
|
|
475
|
+
},
|
|
476
|
+
onCancel: _this2.handleCancel,
|
|
477
|
+
onConfirm: _this2.handleRemoveConfirm
|
|
478
|
+
})];
|
|
479
|
+
} : [_this2.compFormItem && !showOccurrenceDialog && editable.edit && h(SchedulerForm_1.SchedulerForm, {
|
|
480
|
+
dataItem: _this2.compFormItem,
|
|
481
|
+
attrs: _this2.v3 ? undefined : {
|
|
482
|
+
dataItem: _this2.compFormItem
|
|
404
483
|
},
|
|
405
|
-
onSubmit:
|
|
406
|
-
on:
|
|
407
|
-
"submit":
|
|
408
|
-
"close":
|
|
409
|
-
"cancel":
|
|
484
|
+
onSubmit: _this2.handleFormSubmit,
|
|
485
|
+
on: _this2.v3 ? undefined : {
|
|
486
|
+
"submit": _this2.handleFormSubmit,
|
|
487
|
+
"close": _this2.handleCancel,
|
|
488
|
+
"cancel": _this2.handleCancel
|
|
410
489
|
},
|
|
411
|
-
onClose:
|
|
412
|
-
onCancel:
|
|
413
|
-
})
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
490
|
+
onClose: _this2.handleCancel,
|
|
491
|
+
onCancel: _this2.handleCancel
|
|
492
|
+
}), _this2.compDragItem && editable.drag && (Array.isArray(_this2.compDragItem) ? _this2.compDragItem.map(function (di, idx) {
|
|
493
|
+
return h(SchedulerDrag_1.SchedulerDrag, {
|
|
494
|
+
key: idx,
|
|
495
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
496
|
+
attrs: this.v3 ? undefined : {
|
|
497
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
498
|
+
dataItem: di,
|
|
499
|
+
vertical: this.$props.vertical,
|
|
500
|
+
viewItem: ViewItem,
|
|
501
|
+
item: this.$props.dataItem
|
|
502
|
+
},
|
|
503
|
+
dataItem: di,
|
|
504
|
+
vertical: this.$props.vertical,
|
|
505
|
+
viewItem: ViewItem,
|
|
506
|
+
item: this.$props.dataItem
|
|
507
|
+
});
|
|
508
|
+
}, _this2) : h(SchedulerDrag_1.SchedulerDrag, {
|
|
509
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
510
|
+
attrs: _this2.v3 ? undefined : {
|
|
511
|
+
ignoreIsAllDay: ignoreIsAllDay,
|
|
512
|
+
dataItem: _this2.compDragItem,
|
|
513
|
+
vertical: _this2.$props.vertical,
|
|
514
|
+
viewItem: ViewItem,
|
|
515
|
+
item: _this2.$props.dataItem
|
|
516
|
+
},
|
|
517
|
+
dataItem: _this2.compDragItem,
|
|
518
|
+
vertical: _this2.$props.vertical,
|
|
519
|
+
viewItem: ViewItem,
|
|
520
|
+
item: _this2.$props.dataItem
|
|
521
|
+
})), _this2.compShowOccurrenceDialog && h(SchedulerOccurrenceDialog_1.SchedulerOccurrenceDialog, {
|
|
522
|
+
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
523
|
+
attrs: _this2.v3 ? undefined : {
|
|
524
|
+
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
525
|
+
isRemove: !!_this2.compRemoveItem
|
|
526
|
+
},
|
|
527
|
+
isRemove: !!_this2.compRemoveItem,
|
|
528
|
+
onClose: _this2.handleCancel,
|
|
529
|
+
on: _this2.v3 ? undefined : {
|
|
530
|
+
"close": _this2.handleCancel,
|
|
531
|
+
"occurrenceclose": _this2.handleOccurrenceClick,
|
|
532
|
+
"seriesclose": _this2.handleSeriesClick
|
|
533
|
+
},
|
|
534
|
+
onOccurrenceclose: _this2.handleOccurrenceClick,
|
|
535
|
+
onSeriesclose: _this2.handleSeriesClick
|
|
536
|
+
}), _this2.compShowRemoveDialog && _this2.compRemoveItem && editable.remove && h(SchedulerRemoveDialog_1.SchedulerRemoveDialog, {
|
|
537
|
+
dataItem: _this2.compRemoveItem,
|
|
538
|
+
attrs: _this2.v3 ? undefined : {
|
|
539
|
+
dataItem: _this2.compRemoveItem
|
|
540
|
+
},
|
|
541
|
+
onClose: _this2.handleCancel,
|
|
542
|
+
on: _this2.v3 ? undefined : {
|
|
543
|
+
"close": _this2.handleCancel,
|
|
544
|
+
"cancel": _this2.handleCancel,
|
|
545
|
+
"confirm": _this2.handleRemoveConfirm
|
|
546
|
+
},
|
|
547
|
+
onCancel: _this2.handleCancel,
|
|
548
|
+
onConfirm: _this2.handleRemoveConfirm
|
|
549
|
+
})]) // {((resizeItem && editable.resize)) && (Array.isArray(resizeItem)
|
|
432
550
|
// ? (resizeItem as any).map((ri, idx) => (
|
|
433
551
|
// <Resize
|
|
434
552
|
// key={idx}
|
|
@@ -450,20 +568,6 @@ var SchedulerEditItemVue2 = {
|
|
|
450
568
|
// vertical={this.$props.vertical}
|
|
451
569
|
// />
|
|
452
570
|
// ))}
|
|
453
|
-
// {(showOccurrenceDialog) && (<OccurrenceDialog
|
|
454
|
-
// dataItem={formItem || dragItem || resizeItem || removeItem}
|
|
455
|
-
// isRemove={removeItem !== null}
|
|
456
|
-
// onClose={this.handleCancel}
|
|
457
|
-
// onOccurrenceClick={this.handleOccurrenceClick}
|
|
458
|
-
// onSeriesClick={this.handleSeriesClick}
|
|
459
|
-
// />)}
|
|
460
|
-
// {(showRemoveDialog && removeItem && editable.remove) && (<RemoveDialog
|
|
461
|
-
// dataItem={removeItem}
|
|
462
|
-
// onClose={this.handleCancel}
|
|
463
|
-
// onCancel={this.handleCancel}
|
|
464
|
-
// onConfirm={this.handleRemoveConfirm}
|
|
465
|
-
// />)}
|
|
466
|
-
// </SchedulerEditItemContext>
|
|
467
571
|
|
|
468
572
|
);
|
|
469
573
|
},
|
|
@@ -473,6 +577,63 @@ var SchedulerEditItemVue2 = {
|
|
|
473
577
|
this.currentSeries = newSeries;
|
|
474
578
|
this.$emit('serieschange', newSeries);
|
|
475
579
|
},
|
|
580
|
+
dispatchItemSelection: function dispatchItemSelection(action, _event) {
|
|
581
|
+
this.aaa = action;
|
|
582
|
+
},
|
|
583
|
+
dispatchRemoveItem: function dispatchRemoveItem(action, _event) {
|
|
584
|
+
var newRemoveItem;
|
|
585
|
+
|
|
586
|
+
switch (action.type) {
|
|
587
|
+
case use_remove_item_1.REMOVE_ITEM_ACTION.set:
|
|
588
|
+
newRemoveItem = action.payload;
|
|
589
|
+
break;
|
|
590
|
+
|
|
591
|
+
case use_remove_item_1.REMOVE_ITEM_ACTION.reset:
|
|
592
|
+
newRemoveItem = null;
|
|
593
|
+
break;
|
|
594
|
+
|
|
595
|
+
case use_remove_item_1.REMOVE_ITEM_ACTION.complete:
|
|
596
|
+
if (this.compRemoveItem) {
|
|
597
|
+
this.$emit('dataaction', {
|
|
598
|
+
type: Scheduler_1.DATA_ACTION.remove,
|
|
599
|
+
series: this.compSeries,
|
|
600
|
+
dataItem: this.compRemoveItem
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
newRemoveItem = null;
|
|
605
|
+
break;
|
|
606
|
+
|
|
607
|
+
default:
|
|
608
|
+
newRemoveItem = this.compRemoveItem;
|
|
609
|
+
break;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
this.currentRemoveItem = newRemoveItem;
|
|
613
|
+
this.$emit('removeitemchange', newRemoveItem);
|
|
614
|
+
},
|
|
615
|
+
dispatchShowOccurrenceDialog: function dispatchShowOccurrenceDialog(action, _event) {
|
|
616
|
+
var newShowOccurrenceDialog = use_show_occurrence_dialog_1.showOccurrenceDialogReducer(this.compShowOccurrenceDialog, action);
|
|
617
|
+
this.currentShowOccurrenceDialog = newShowOccurrenceDialog;
|
|
618
|
+
this.$emit('showremovedialogchange', newShowOccurrenceDialog);
|
|
619
|
+
},
|
|
620
|
+
dispatchShowRemoveDialog: function dispatchShowRemoveDialog(action, _event) {
|
|
621
|
+
var newShowRemoveDialog = use_show_remove_item_dialog_1.showRemoveDialogReducer(this.compShowRemoveDialog, action);
|
|
622
|
+
this.currentShowRemoveDialog = newShowRemoveDialog;
|
|
623
|
+
this.$emit('showremovedialogchange', newShowRemoveDialog);
|
|
624
|
+
},
|
|
625
|
+
dispatchDragItem: function dispatchDragItem(action, _event) {
|
|
626
|
+
use_drag_item_1.useDragItem.call(this, action);
|
|
627
|
+
},
|
|
628
|
+
dispatchResizeItem: function dispatchResizeItem(action, _event) {
|
|
629
|
+
this.aaa = action;
|
|
630
|
+
},
|
|
631
|
+
dispatchViewSlotsFocus: function dispatchViewSlotsFocus(action, _event) {
|
|
632
|
+
this.aaa = action;
|
|
633
|
+
},
|
|
634
|
+
dispatchViewItemsFocus: function dispatchViewItemsFocus(action, _event) {
|
|
635
|
+
this.aaa = action;
|
|
636
|
+
},
|
|
476
637
|
dispatchFormItem: function dispatchFormItem(action, _event) {
|
|
477
638
|
var newFormItem;
|
|
478
639
|
|
|
@@ -511,12 +672,12 @@ var SchedulerEditItemVue2 = {
|
|
|
511
672
|
},
|
|
512
673
|
handleFocus: function handleFocus(event) {
|
|
513
674
|
if (this.onFocusAction) {
|
|
514
|
-
var actions = this.onFocusAction(event, this.$props
|
|
675
|
+
var actions = this.onFocusAction(event, this.$props);
|
|
515
676
|
|
|
516
677
|
if (actions) {// Array.isArray(actions)
|
|
517
678
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
518
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
519
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
679
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
|
|
680
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
|
|
520
681
|
}
|
|
521
682
|
}
|
|
522
683
|
|
|
@@ -524,12 +685,12 @@ var SchedulerEditItemVue2 = {
|
|
|
524
685
|
},
|
|
525
686
|
handleMouseDown: function handleMouseDown(event) {
|
|
526
687
|
if (this.onMouseDownAction) {
|
|
527
|
-
var actions = this.onMouseDownAction(event, this.$props
|
|
688
|
+
var actions = this.onMouseDownAction(event, this.$props);
|
|
528
689
|
|
|
529
690
|
if (actions) {// Array.isArray(actions)
|
|
530
691
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
531
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
532
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
692
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
|
|
693
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
|
|
533
694
|
}
|
|
534
695
|
}
|
|
535
696
|
|
|
@@ -537,12 +698,12 @@ var SchedulerEditItemVue2 = {
|
|
|
537
698
|
},
|
|
538
699
|
handleMouseUp: function handleMouseUp(event) {
|
|
539
700
|
if (this.onMouseUpAction) {
|
|
540
|
-
var actions = this.onMouseUpAction(event, this.$props
|
|
701
|
+
var actions = this.onMouseUpAction(event, this.$props);
|
|
541
702
|
|
|
542
703
|
if (actions) {// Array.isArray(actions)
|
|
543
704
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
544
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
545
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
705
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
|
|
706
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
|
|
546
707
|
}
|
|
547
708
|
}
|
|
548
709
|
|
|
@@ -550,12 +711,12 @@ var SchedulerEditItemVue2 = {
|
|
|
550
711
|
},
|
|
551
712
|
handleClick: function handleClick(event) {
|
|
552
713
|
if (this.onClickAction) {
|
|
553
|
-
var actions = this.onClickAction(event, this.$props
|
|
714
|
+
var actions = this.onClickAction(event, this.$props);
|
|
554
715
|
|
|
555
716
|
if (actions) {// Array.isArray(actions)
|
|
556
717
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
557
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
558
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
718
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event))
|
|
719
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem});
|
|
559
720
|
}
|
|
560
721
|
}
|
|
561
722
|
|
|
@@ -563,7 +724,7 @@ var SchedulerEditItemVue2 = {
|
|
|
563
724
|
},
|
|
564
725
|
handleDoubleClick: function handleDoubleClick(event) {
|
|
565
726
|
if (this.onDoubleClickAction) {
|
|
566
|
-
var actions = this.onDoubleClickAction(event, this.$props
|
|
727
|
+
var actions = this.onDoubleClickAction(event, this.$props);
|
|
567
728
|
var that_1 = this;
|
|
568
729
|
|
|
569
730
|
if (actions) {
|
|
@@ -580,62 +741,76 @@ var SchedulerEditItemVue2 = {
|
|
|
580
741
|
this.$emit('doubleclick', event);
|
|
581
742
|
},
|
|
582
743
|
handleRemoveClick: function handleRemoveClick(event) {
|
|
744
|
+
var _this = this;
|
|
745
|
+
|
|
583
746
|
if (this.onRemoveClickAction) {
|
|
584
|
-
var actions = this.onRemoveClickAction(event, this.$props
|
|
747
|
+
var actions = this.onRemoveClickAction(event, this.$props);
|
|
585
748
|
|
|
586
|
-
if (actions) {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
749
|
+
if (actions) {
|
|
750
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
751
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
752
|
+
item: _this.dataItem
|
|
753
|
+
}), event);
|
|
754
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
755
|
+
item: this.dataItem
|
|
756
|
+
}));
|
|
590
757
|
}
|
|
591
758
|
}
|
|
592
759
|
|
|
593
760
|
this.$emit('removeclick', event);
|
|
594
761
|
},
|
|
595
762
|
handlePress: function handlePress(event) {
|
|
763
|
+
var _this = this;
|
|
764
|
+
|
|
596
765
|
if (this.onPressAction) {
|
|
597
|
-
var actions = this.onPressAction(event, this.$props
|
|
766
|
+
var actions = this.onPressAction(event, this.$props);
|
|
598
767
|
|
|
599
|
-
if (actions) {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
768
|
+
if (actions) {
|
|
769
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
770
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
771
|
+
item: _this.dataItem
|
|
772
|
+
}), event);
|
|
773
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
774
|
+
item: this.dataItem
|
|
775
|
+
}), event);
|
|
603
776
|
}
|
|
604
777
|
}
|
|
605
778
|
|
|
606
779
|
this.$emit('press', event);
|
|
607
780
|
},
|
|
608
781
|
handleDrag: function handleDrag(event) {
|
|
782
|
+
var _this = this;
|
|
783
|
+
|
|
609
784
|
if (this.onDragAction) {
|
|
610
|
-
var actions = this.onDragAction(event, this.$props
|
|
785
|
+
var actions = this.onDragAction(event, this.$props);
|
|
611
786
|
|
|
612
|
-
if (actions) {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
// event.dragEvent.originalEvent
|
|
621
|
-
// );
|
|
787
|
+
if (actions) {
|
|
788
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
789
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
790
|
+
item: _this.dataItem
|
|
791
|
+
}), event.dragEvent.originalEvent);
|
|
792
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
793
|
+
item: this.dataItem
|
|
794
|
+
}), event.dragEvent.originalEvent);
|
|
622
795
|
}
|
|
623
796
|
}
|
|
624
797
|
|
|
625
798
|
this.$emit('drag', event);
|
|
626
799
|
},
|
|
627
800
|
handleRelease: function handleRelease(event) {
|
|
801
|
+
var _this = this;
|
|
802
|
+
|
|
628
803
|
if (this.onReleaseAction) {
|
|
629
|
-
var actions = this.onReleaseAction(event, this.$props
|
|
804
|
+
var actions = this.onReleaseAction(event, this.$props);
|
|
630
805
|
|
|
631
|
-
if (actions) {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
806
|
+
if (actions) {
|
|
807
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
808
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
809
|
+
item: _this.dataItem
|
|
810
|
+
}), event.dragEvent.originalEvent);
|
|
811
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
812
|
+
item: this.dataItem
|
|
813
|
+
}), event.dragEvent.originalEvent);
|
|
639
814
|
}
|
|
640
815
|
}
|
|
641
816
|
|
|
@@ -643,15 +818,15 @@ var SchedulerEditItemVue2 = {
|
|
|
643
818
|
},
|
|
644
819
|
handleResizePress: function handleResizePress(event) {
|
|
645
820
|
if (this.onResizePressAction) {
|
|
646
|
-
var actions = this.onResizePressAction(event, this.$props
|
|
821
|
+
var actions = this.onResizePressAction(event, this.$props);
|
|
647
822
|
|
|
648
823
|
if (actions) {// Array.isArray(actions)
|
|
649
824
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
650
825
|
// this.actionsReducerMap[action.type](
|
|
651
|
-
// {...action, item: this.
|
|
826
|
+
// {...action, item: this.dataItem},
|
|
652
827
|
// event.dragEvent.originalEvent))
|
|
653
828
|
// : this.actionsReducerMap[actions.type](
|
|
654
|
-
// {...actions, item: this.
|
|
829
|
+
// {...actions, item: this.dataItem},
|
|
655
830
|
// event.dragEvent.originalEvent
|
|
656
831
|
// );
|
|
657
832
|
}
|
|
@@ -661,15 +836,15 @@ var SchedulerEditItemVue2 = {
|
|
|
661
836
|
},
|
|
662
837
|
handleResizeStartDrag: function handleResizeStartDrag(event) {
|
|
663
838
|
if (this.onResizeStartDragAction) {
|
|
664
|
-
var actions = this.onResizeStartDragAction(event, this.$props
|
|
839
|
+
var actions = this.onResizeStartDragAction(event, this.$props);
|
|
665
840
|
|
|
666
841
|
if (actions) {// Array.isArray(actions)
|
|
667
842
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
668
843
|
// this.actionsReducerMap[action.type](
|
|
669
|
-
// {...action, item: this.
|
|
844
|
+
// {...action, item: this.dataItem},
|
|
670
845
|
// event.dragEvent.originalEvent))
|
|
671
846
|
// : this.actionsReducerMap[actions.type](
|
|
672
|
-
// {...actions, item: this.
|
|
847
|
+
// {...actions, item: this.dataItem},
|
|
673
848
|
// event.dragEvent.originalEvent
|
|
674
849
|
// );
|
|
675
850
|
}
|
|
@@ -679,15 +854,15 @@ var SchedulerEditItemVue2 = {
|
|
|
679
854
|
},
|
|
680
855
|
handleResizeEndDrag: function handleResizeEndDrag(event) {
|
|
681
856
|
if (this.onResizeEndDragAction) {
|
|
682
|
-
var actions = this.onResizeEndDragAction(event, this.$props
|
|
857
|
+
var actions = this.onResizeEndDragAction(event, this.$props);
|
|
683
858
|
|
|
684
859
|
if (actions) {// Array.isArray(actions)
|
|
685
860
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
686
861
|
// this.actionsReducerMap[action.type](
|
|
687
|
-
// {...action, item: this.
|
|
862
|
+
// {...action, item: this.dataItem},
|
|
688
863
|
// event.dragEvent.originalEvent))
|
|
689
864
|
// : this.actionsReducerMap[actions.type](
|
|
690
|
-
// {...actions, item: this.
|
|
865
|
+
// {...actions, item: this.dataItem},
|
|
691
866
|
// event.dragEvent.originalEvent);
|
|
692
867
|
}
|
|
693
868
|
}
|
|
@@ -696,15 +871,15 @@ var SchedulerEditItemVue2 = {
|
|
|
696
871
|
},
|
|
697
872
|
handleResizeRelease: function handleResizeRelease(event) {
|
|
698
873
|
if (this.onResizeReleaseAction) {
|
|
699
|
-
var actions = this.onResizeReleaseAction(event, this.$props
|
|
874
|
+
var actions = this.onResizeReleaseAction(event, this.$props);
|
|
700
875
|
|
|
701
876
|
if (actions) {// Array.isArray(actions)
|
|
702
877
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
703
878
|
// this.actionsReducerMap[action.type](
|
|
704
|
-
// {...action, item: this.
|
|
879
|
+
// {...action, item: this.dataItem},
|
|
705
880
|
// event.dragEvent.originalEvent))
|
|
706
881
|
// : this.actionsReducerMap[actions.type](
|
|
707
|
-
// {...actions, item: this.
|
|
882
|
+
// {...actions, item: this.dataItem },
|
|
708
883
|
// event.dragEvent.originalEvent
|
|
709
884
|
// );
|
|
710
885
|
}
|
|
@@ -716,15 +891,15 @@ var SchedulerEditItemVue2 = {
|
|
|
716
891
|
var _this = this;
|
|
717
892
|
|
|
718
893
|
if (this.onFormSubmitAction) {
|
|
719
|
-
var actions = this.onFormSubmitAction(event, this.$props
|
|
894
|
+
var actions = this.onFormSubmitAction(event, this.$props);
|
|
720
895
|
|
|
721
896
|
if (actions) {
|
|
722
897
|
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
723
898
|
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
724
|
-
item: _this.
|
|
899
|
+
item: _this.dataItem
|
|
725
900
|
}), event);
|
|
726
901
|
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
727
|
-
item: this.
|
|
902
|
+
item: this.dataItem
|
|
728
903
|
}), event);
|
|
729
904
|
}
|
|
730
905
|
}
|
|
@@ -735,15 +910,15 @@ var SchedulerEditItemVue2 = {
|
|
|
735
910
|
var _this = this;
|
|
736
911
|
|
|
737
912
|
if (this.onCancelAction) {
|
|
738
|
-
var actions = this.onCancelAction(event, this.$props
|
|
913
|
+
var actions = this.onCancelAction(event, this.$props);
|
|
739
914
|
|
|
740
915
|
if (actions) {
|
|
741
916
|
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
742
917
|
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
743
|
-
item: _this.
|
|
918
|
+
item: _this.dataItem
|
|
744
919
|
}), event);
|
|
745
920
|
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
746
|
-
item: this.
|
|
921
|
+
item: this.dataItem
|
|
747
922
|
}), event);
|
|
748
923
|
}
|
|
749
924
|
}
|
|
@@ -751,26 +926,38 @@ var SchedulerEditItemVue2 = {
|
|
|
751
926
|
this.$emit('cancel', event);
|
|
752
927
|
},
|
|
753
928
|
handleOccurrenceClick: function handleOccurrenceClick(event) {
|
|
929
|
+
var _this = this;
|
|
930
|
+
|
|
754
931
|
if (this.onOccurrenceClickAction) {
|
|
755
|
-
var actions = this.onOccurrenceClickAction(event, this.$props
|
|
932
|
+
var actions = this.onOccurrenceClickAction(event, this.$props);
|
|
756
933
|
|
|
757
|
-
if (actions) {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
934
|
+
if (actions) {
|
|
935
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
936
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
937
|
+
item: _this.dataItem
|
|
938
|
+
}), event);
|
|
939
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
940
|
+
item: this.dataItem
|
|
941
|
+
}), event);
|
|
761
942
|
}
|
|
762
943
|
}
|
|
763
944
|
|
|
764
945
|
this.$emit('occurrenceclick', event);
|
|
765
946
|
},
|
|
766
947
|
handleSeriesClick: function handleSeriesClick(event) {
|
|
948
|
+
var _this = this;
|
|
949
|
+
|
|
767
950
|
if (this.onSeriesClickAction) {
|
|
768
|
-
var actions = this.onSeriesClickAction(event, this.$props
|
|
951
|
+
var actions = this.onSeriesClickAction(event, this.$props);
|
|
769
952
|
|
|
770
|
-
if (actions) {
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
953
|
+
if (actions) {
|
|
954
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
955
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
956
|
+
item: _this.dataItem
|
|
957
|
+
}), event);
|
|
958
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
959
|
+
item: this.dataItem
|
|
960
|
+
}), event);
|
|
774
961
|
}
|
|
775
962
|
}
|
|
776
963
|
|
|
@@ -778,12 +965,12 @@ var SchedulerEditItemVue2 = {
|
|
|
778
965
|
},
|
|
779
966
|
handleKeyDown: function handleKeyDown(event) {
|
|
780
967
|
if (this.onKeyDownAction) {
|
|
781
|
-
var actions = this.onKeyDownAction(event, this.$props
|
|
968
|
+
var actions = this.onKeyDownAction(event, this.$props);
|
|
782
969
|
|
|
783
970
|
if (actions) {// Array.isArray(actions)
|
|
784
971
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
785
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
786
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
972
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event.event))
|
|
973
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem}, event.event);
|
|
787
974
|
}
|
|
788
975
|
}
|
|
789
976
|
|
|
@@ -791,33 +978,39 @@ var SchedulerEditItemVue2 = {
|
|
|
791
978
|
},
|
|
792
979
|
handleKeyUp: function handleKeyUp(event) {
|
|
793
980
|
if (this.onKeyUpAction) {
|
|
794
|
-
var actions = this.onKeyUpAction(event, this.$props
|
|
981
|
+
var actions = this.onKeyUpAction(event, this.$props);
|
|
795
982
|
|
|
796
983
|
if (actions) {// Array.isArray(actions)
|
|
797
984
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
798
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
799
|
-
// : this.actionsReducerMap[actions.type]({...actions, item: this.
|
|
985
|
+
// this.actionsReducerMap[action.type]({...action, item: this.dataItem}, event.event))
|
|
986
|
+
// : this.actionsReducerMap[actions.type]({...actions, item: this.dataItem}, event.event);
|
|
800
987
|
}
|
|
801
988
|
}
|
|
802
989
|
|
|
803
990
|
this.$emit('keyup', event);
|
|
804
991
|
},
|
|
805
992
|
handleRemoveConfirm: function handleRemoveConfirm(event) {
|
|
993
|
+
var _this = this;
|
|
994
|
+
|
|
806
995
|
if (this.onRemoveConfirmAction) {
|
|
807
|
-
var actions = this.onRemoveConfirmAction(event, this.$props
|
|
996
|
+
var actions = this.onRemoveConfirmAction(event, this.$props);
|
|
808
997
|
|
|
809
|
-
if (actions) {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
998
|
+
if (actions) {
|
|
999
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
1000
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
1001
|
+
item: _this.dataItem
|
|
1002
|
+
}), event.event);
|
|
1003
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
1004
|
+
item: this.dataItem
|
|
1005
|
+
}), event.event);
|
|
813
1006
|
}
|
|
814
1007
|
}
|
|
815
1008
|
|
|
816
1009
|
this.$emit('removeconfirm', event);
|
|
817
1010
|
},
|
|
818
|
-
onClickAction: function onClickAction(event, _
|
|
1011
|
+
onClickAction: function onClickAction(event, _) {
|
|
819
1012
|
return [{
|
|
820
|
-
type: event.event.metaKey || event.event.ctrlKey ?
|
|
1013
|
+
type: event.event.metaKey || event.event.ctrlKey ? this.compSelected && !this.compDragItem && !this.compResizeItem ? use_items_selection_1.ITEMS_SELECT_ACTION.remove : use_items_selection_1.ITEMS_SELECT_ACTION.add : use_items_selection_1.ITEMS_SELECT_ACTION.select
|
|
821
1014
|
}];
|
|
822
1015
|
},
|
|
823
1016
|
onDoubleClickAction: function onDoubleClickAction(_, props) {
|
|
@@ -856,11 +1049,11 @@ var SchedulerEditItemVue2 = {
|
|
|
856
1049
|
}
|
|
857
1050
|
} : [];
|
|
858
1051
|
},
|
|
859
|
-
onReleaseAction: function onReleaseAction(event, props
|
|
860
|
-
return props.editable &&
|
|
1052
|
+
onReleaseAction: function onReleaseAction(event, props) {
|
|
1053
|
+
return props.editable && this.compDragItem ? props.isRecurring && !props.isException && this.compSeries === null ? {
|
|
861
1054
|
type: use_show_occurrence_dialog_1.SHOW_OCCURRENCE_DIALOG_ACTION.open
|
|
862
1055
|
} : {
|
|
863
|
-
type: props.isRecurring ?
|
|
1056
|
+
type: props.isRecurring ? this.compSeries ? use_drag_item_1.DRAG_ITEM_ACTION.completeSeries : use_drag_item_1.DRAG_ITEM_ACTION.completeOccurrence : use_drag_item_1.DRAG_ITEM_ACTION.complete,
|
|
864
1057
|
payload: {
|
|
865
1058
|
x: event.dragEvent.clientX,
|
|
866
1059
|
y: event.dragEvent.clientY
|
|
@@ -894,19 +1087,19 @@ var SchedulerEditItemVue2 = {
|
|
|
894
1087
|
}
|
|
895
1088
|
} : [];
|
|
896
1089
|
},
|
|
897
|
-
onResizeReleaseAction: function onResizeReleaseAction(event, props
|
|
898
|
-
return props.editable &&
|
|
1090
|
+
onResizeReleaseAction: function onResizeReleaseAction(event, props) {
|
|
1091
|
+
return props.editable && this.compResizeItem ? props.isRecurring && !props.isException && this.compSeries === null ? {
|
|
899
1092
|
type: use_show_occurrence_dialog_1.SHOW_OCCURRENCE_DIALOG_ACTION.open
|
|
900
1093
|
} : {
|
|
901
|
-
type: props.isRecurring ?
|
|
1094
|
+
type: props.isRecurring ? this.compSeries ? use_resize_item_1.RESIZE_ITEM_ACTION.completeSeries : use_resize_item_1.RESIZE_ITEM_ACTION.completeOccurrence : use_resize_item_1.RESIZE_ITEM_ACTION.complete,
|
|
902
1095
|
payload: {
|
|
903
1096
|
x: event.dragEvent.clientX,
|
|
904
1097
|
y: event.dragEvent.clientY
|
|
905
1098
|
}
|
|
906
1099
|
} : [];
|
|
907
1100
|
},
|
|
908
|
-
onOccurrenceClickAction: function onOccurrenceClickAction(_event, props
|
|
909
|
-
if (
|
|
1101
|
+
onOccurrenceClickAction: function onOccurrenceClickAction(_event, props) {
|
|
1102
|
+
if (this.compDragItem) {
|
|
910
1103
|
return [{
|
|
911
1104
|
type: use_drag_item_1.DRAG_ITEM_ACTION.completeOccurrence
|
|
912
1105
|
}, {
|
|
@@ -914,7 +1107,7 @@ var SchedulerEditItemVue2 = {
|
|
|
914
1107
|
}];
|
|
915
1108
|
}
|
|
916
1109
|
|
|
917
|
-
if (
|
|
1110
|
+
if (this.compResizeItem) {
|
|
918
1111
|
return [{
|
|
919
1112
|
type: use_resize_item_1.RESIZE_ITEM_ACTION.completeOccurrence
|
|
920
1113
|
}, {
|
|
@@ -922,7 +1115,7 @@ var SchedulerEditItemVue2 = {
|
|
|
922
1115
|
}];
|
|
923
1116
|
}
|
|
924
1117
|
|
|
925
|
-
if (
|
|
1118
|
+
if (this.compFormItem) {
|
|
926
1119
|
return [{
|
|
927
1120
|
type: use_series_1.SERIES_ACTION.set,
|
|
928
1121
|
payload: false
|
|
@@ -934,7 +1127,7 @@ var SchedulerEditItemVue2 = {
|
|
|
934
1127
|
}];
|
|
935
1128
|
}
|
|
936
1129
|
|
|
937
|
-
if (
|
|
1130
|
+
if (this.compRemoveItem) {
|
|
938
1131
|
return [{
|
|
939
1132
|
type: use_series_1.SERIES_ACTION.set,
|
|
940
1133
|
payload: false
|
|
@@ -948,8 +1141,8 @@ var SchedulerEditItemVue2 = {
|
|
|
948
1141
|
}];
|
|
949
1142
|
}
|
|
950
1143
|
},
|
|
951
|
-
onSeriesClickAction: function onSeriesClickAction(_event, props
|
|
952
|
-
if (
|
|
1144
|
+
onSeriesClickAction: function onSeriesClickAction(_event, props) {
|
|
1145
|
+
if (this.compDragItem) {
|
|
953
1146
|
return [{
|
|
954
1147
|
type: use_drag_item_1.DRAG_ITEM_ACTION.completeSeries
|
|
955
1148
|
}, {
|
|
@@ -957,7 +1150,7 @@ var SchedulerEditItemVue2 = {
|
|
|
957
1150
|
}];
|
|
958
1151
|
}
|
|
959
1152
|
|
|
960
|
-
if (
|
|
1153
|
+
if (this.compResizeItem) {
|
|
961
1154
|
return [{
|
|
962
1155
|
type: use_resize_item_1.RESIZE_ITEM_ACTION.completeSeries
|
|
963
1156
|
}, {
|
|
@@ -965,7 +1158,7 @@ var SchedulerEditItemVue2 = {
|
|
|
965
1158
|
}];
|
|
966
1159
|
}
|
|
967
1160
|
|
|
968
|
-
if (
|
|
1161
|
+
if (this.compFormItem) {
|
|
969
1162
|
return [{
|
|
970
1163
|
type: use_series_1.SERIES_ACTION.set,
|
|
971
1164
|
payload: true
|
|
@@ -977,7 +1170,7 @@ var SchedulerEditItemVue2 = {
|
|
|
977
1170
|
}];
|
|
978
1171
|
}
|
|
979
1172
|
|
|
980
|
-
if (
|
|
1173
|
+
if (this.compRemoveItem) {
|
|
981
1174
|
return [{
|
|
982
1175
|
type: use_series_1.SERIES_ACTION.set,
|
|
983
1176
|
payload: true
|