@progress/kendo-vue-scheduler 3.1.3 → 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/NOTICE.txt +49 -6
- 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 +518 -231
- package/dist/es/items/SchedulerItem.js +104 -95
- package/dist/es/items/SchedulerItemContent.js +4 -2
- package/dist/es/items/SchedulerViewItem.js +137 -11
- 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-series.d.ts +1 -0
- package/dist/es/items/hooks/use-series.js +1 -2
- 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/recurrence/common.js +2 -1
- 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 +517 -224
- package/dist/npm/items/SchedulerItem.js +104 -95
- package/dist/npm/items/SchedulerItemContent.js +4 -2
- package/dist/npm/items/SchedulerViewItem.js +137 -11
- 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-series.d.ts +1 -0
- package/dist/npm/items/hooks/use-series.js +2 -2
- 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/recurrence/common.js +2 -1
- 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
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
4
|
+
__assign = Object.assign || function (t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
|
|
8
|
+
for (var p in s) {
|
|
9
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
return __assign.apply(this, arguments);
|
|
17
|
+
};
|
|
18
|
+
|
|
3
19
|
Object.defineProperty(exports, "__esModule", {
|
|
4
20
|
value: true
|
|
5
21
|
});
|
|
@@ -11,8 +27,18 @@ var allVue = Vue;
|
|
|
11
27
|
var gh = allVue.h;
|
|
12
28
|
var inject = allVue.inject;
|
|
13
29
|
|
|
30
|
+
var SchedulerOccurrenceDialog_1 = require("../components/SchedulerOccurrenceDialog");
|
|
31
|
+
|
|
32
|
+
var SchedulerForm_1 = require("../components/SchedulerForm");
|
|
33
|
+
|
|
34
|
+
var SchedulerRemoveDialog_1 = require("../components/SchedulerRemoveDialog");
|
|
35
|
+
|
|
36
|
+
var Scheduler_1 = require("../Scheduler");
|
|
37
|
+
|
|
14
38
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
15
39
|
|
|
40
|
+
var SchedulerDrag_1 = require("../views/common/SchedulerDrag");
|
|
41
|
+
|
|
16
42
|
var SchedulerViewItem_1 = require("./SchedulerViewItem");
|
|
17
43
|
|
|
18
44
|
var hooks_1 = require("../hooks");
|
|
@@ -31,7 +57,9 @@ var use_resize_item_1 = require("./hooks/use-resize-item");
|
|
|
31
57
|
|
|
32
58
|
var use_series_1 = require("./hooks/use-series");
|
|
33
59
|
|
|
34
|
-
var use_items_selection_1 = require("../hooks/use-items-selection");
|
|
60
|
+
var use_items_selection_1 = require("../hooks/use-items-selection");
|
|
61
|
+
|
|
62
|
+
var utils_1 = require("../utils"); // tslint:enable:max-line-length
|
|
35
63
|
|
|
36
64
|
|
|
37
65
|
var SchedulerEditItemVue2 = {
|
|
@@ -49,9 +77,18 @@ var SchedulerEditItemVue2 = {
|
|
|
49
77
|
dragItem: Object,
|
|
50
78
|
resizeItem: Object,
|
|
51
79
|
removeItem: Object,
|
|
52
|
-
showOccurrenceDialog:
|
|
53
|
-
|
|
54
|
-
|
|
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
|
+
},
|
|
55
92
|
uid: [String, Number],
|
|
56
93
|
start: Date,
|
|
57
94
|
end: Date,
|
|
@@ -90,6 +127,9 @@ var SchedulerEditItemVue2 = {
|
|
|
90
127
|
inject: {
|
|
91
128
|
bv: {
|
|
92
129
|
default: null
|
|
130
|
+
},
|
|
131
|
+
ks: {
|
|
132
|
+
default: null
|
|
93
133
|
}
|
|
94
134
|
},
|
|
95
135
|
provide: function provide() {
|
|
@@ -109,22 +149,41 @@ var SchedulerEditItemVue2 = {
|
|
|
109
149
|
showOccurrenceDialog: this.showOccurrenceDialog
|
|
110
150
|
},
|
|
111
151
|
currentTabIndex: this.$props.tabIndex,
|
|
112
|
-
|
|
152
|
+
currentFormItem: null,
|
|
153
|
+
currentSelected: null,
|
|
154
|
+
currentSeries: null,
|
|
155
|
+
currentRemoveItem: null,
|
|
156
|
+
currentDragItem: null,
|
|
157
|
+
currentResizeItem: null,
|
|
158
|
+
currentShowRemoveDialog: null,
|
|
159
|
+
currentShowOccurrenceDialog: null // item: null
|
|
113
160
|
|
|
114
161
|
};
|
|
115
162
|
},
|
|
116
163
|
computed: {
|
|
117
|
-
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
164
|
+
compSelected: function compSelected() {
|
|
165
|
+
return this.selected !== undefined ? this.selected : this.currentSelected;
|
|
166
|
+
},
|
|
167
|
+
compSeries: function compSeries() {
|
|
168
|
+
return this.series !== undefined ? this.series : this.currentSeries;
|
|
169
|
+
},
|
|
170
|
+
compFormItem: function compFormItem() {
|
|
171
|
+
return this.formItem !== undefined ? this.formItem : this.currentFormItem;
|
|
172
|
+
},
|
|
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;
|
|
128
187
|
},
|
|
129
188
|
actionsReducerMap: function actionsReducerMap() {
|
|
130
189
|
var _a;
|
|
@@ -145,6 +204,8 @@ var SchedulerEditItemVue2 = {
|
|
|
145
204
|
},
|
|
146
205
|
// @ts-ignore
|
|
147
206
|
render: function render(createElement) {
|
|
207
|
+
var _this2 = this;
|
|
208
|
+
|
|
148
209
|
var _this = this;
|
|
149
210
|
|
|
150
211
|
var h = gh || createElement; // tslint:enable:max-line-length
|
|
@@ -184,51 +245,41 @@ var SchedulerEditItemVue2 = {
|
|
|
184
245
|
|
|
185
246
|
var _b = use_series_1.useSeries(null, propSeries, onSeriesChange),
|
|
186
247
|
series = _b[0],
|
|
187
|
-
dispatchSeries = _b[1];
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}, [null, propDragItem, onDragItemChange]),
|
|
203
|
-
dragItem = _d[0],
|
|
204
|
-
setDragItem = _d[1],
|
|
205
|
-
dispatchDragItem = _d[2];
|
|
206
|
-
|
|
207
|
-
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({
|
|
208
263
|
dataItem: this.$props.dataItem,
|
|
209
264
|
onDataaction: onDataaction
|
|
210
265
|
}, [null, propResizeItem, onResizeItemChange]),
|
|
211
|
-
resizeItem =
|
|
212
|
-
setResizeItem =
|
|
213
|
-
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
|
+
// );
|
|
214
272
|
|
|
215
|
-
var _f = use_remove_item_1.useRemoveItem({
|
|
216
|
-
series: series,
|
|
217
|
-
onDataaction: onDataaction
|
|
218
|
-
}, [null, propRemoveItem, onRemoveItemChange]),
|
|
219
|
-
removeItem = _f[0],
|
|
220
|
-
setRemoveItem = _f[1],
|
|
221
|
-
dispatchRemoveItem = _f[2];
|
|
222
273
|
|
|
223
|
-
var
|
|
224
|
-
showRemoveDialog =
|
|
225
|
-
setShowRemoveDialog =
|
|
226
|
-
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];
|
|
227
278
|
|
|
228
|
-
var
|
|
229
|
-
showOccurrenceDialog =
|
|
230
|
-
setShowOccurrenceDialog =
|
|
231
|
-
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];
|
|
232
283
|
|
|
233
284
|
var items = this.bv.items; // useSchedulerViewItemsContext();
|
|
234
285
|
// const [,dispatchViewItemsFocus] = useSchedulerViewFocusedItemsContext();
|
|
@@ -237,15 +288,7 @@ var SchedulerEditItemVue2 = {
|
|
|
237
288
|
var selected = Boolean(this.bv.selectedItems && this.bv.selectedItems.some(function (si) {
|
|
238
289
|
return si === _this.item;
|
|
239
290
|
}));
|
|
240
|
-
return (//
|
|
241
|
-
// props={this.$props}
|
|
242
|
-
// form={[formItem, setFormItem, dispatchFormItem]}
|
|
243
|
-
// drag={[dragItem, setDragItem, dispatchDragItem]}
|
|
244
|
-
// resize={[resizeItem, setResizeItem, dispatchResizeItem]}
|
|
245
|
-
// remove={[removeItem, setRemoveItem, dispatchRemoveItem ]}
|
|
246
|
-
// showRemoveDialog={[showRemoveDialog, setShowRemoveDialog, dispatchShowRemoveDialog]}
|
|
247
|
-
// showOccurrenceDialog={[showOccurrenceDialog, setShowOccurrenceDialog, dispatchShowOccurrenceDialog]}
|
|
248
|
-
// >
|
|
291
|
+
return (// @ts-ignore function children
|
|
249
292
|
h(SchedulerViewItem_1.SchedulerViewItem, {
|
|
250
293
|
ignoreIsAllDay: this.ignoreIsAllDay,
|
|
251
294
|
attrs: this.v3 ? undefined : {
|
|
@@ -361,25 +404,149 @@ var SchedulerEditItemVue2 = {
|
|
|
361
404
|
onResizeenddrag: this.handleResizeEndDrag,
|
|
362
405
|
onResizestartdrag: this.handleResizeStartDrag,
|
|
363
406
|
onResizeselease: this.handleResizeRelease
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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
|
|
483
|
+
},
|
|
484
|
+
onSubmit: _this2.handleFormSubmit,
|
|
485
|
+
on: _this2.v3 ? undefined : {
|
|
486
|
+
"submit": _this2.handleFormSubmit,
|
|
487
|
+
"close": _this2.handleCancel,
|
|
488
|
+
"cancel": _this2.handleCancel
|
|
489
|
+
},
|
|
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)
|
|
383
550
|
// ? (resizeItem as any).map((ri, idx) => (
|
|
384
551
|
// <Resize
|
|
385
552
|
// key={idx}
|
|
@@ -401,38 +568,116 @@ var SchedulerEditItemVue2 = {
|
|
|
401
568
|
// vertical={this.$props.vertical}
|
|
402
569
|
// />
|
|
403
570
|
// ))}
|
|
404
|
-
// {(formItem && !showOccurrenceDialog && editable.edit) && (<Form
|
|
405
|
-
// dataItem={formItem}
|
|
406
|
-
// onSubmit={this.handleFormSubmit}
|
|
407
|
-
// onClose={this.handleCancel}
|
|
408
|
-
// onCancel={this.handleCancel}
|
|
409
|
-
// />)}
|
|
410
|
-
// {(showOccurrenceDialog) && (<OccurrenceDialog
|
|
411
|
-
// dataItem={formItem || dragItem || resizeItem || removeItem}
|
|
412
|
-
// isRemove={removeItem !== null}
|
|
413
|
-
// onClose={this.handleCancel}
|
|
414
|
-
// onOccurrenceClick={this.handleOccurrenceClick}
|
|
415
|
-
// onSeriesClick={this.handleSeriesClick}
|
|
416
|
-
// />)}
|
|
417
|
-
// {(showRemoveDialog && removeItem && editable.remove) && (<RemoveDialog
|
|
418
|
-
// dataItem={removeItem}
|
|
419
|
-
// onClose={this.handleCancel}
|
|
420
|
-
// onCancel={this.handleCancel}
|
|
421
|
-
// onConfirm={this.handleRemoveConfirm}
|
|
422
|
-
// />)}
|
|
423
|
-
// </SchedulerEditItemContext>
|
|
424
571
|
|
|
425
572
|
);
|
|
426
573
|
},
|
|
427
574
|
methods: {
|
|
575
|
+
dispatchSeries: function dispatchSeries(action, _event) {
|
|
576
|
+
var newSeries = use_series_1.seriesReducer(this.compSeries, action);
|
|
577
|
+
this.currentSeries = newSeries;
|
|
578
|
+
this.$emit('serieschange', newSeries);
|
|
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
|
+
},
|
|
637
|
+
dispatchFormItem: function dispatchFormItem(action, _event) {
|
|
638
|
+
var newFormItem;
|
|
639
|
+
|
|
640
|
+
switch (action.type) {
|
|
641
|
+
case use_form_item_1.FORM_ITEM_ACTION.set:
|
|
642
|
+
newFormItem = action.payload;
|
|
643
|
+
break;
|
|
644
|
+
|
|
645
|
+
case use_form_item_1.FORM_ITEM_ACTION.reset:
|
|
646
|
+
newFormItem = null;
|
|
647
|
+
break;
|
|
648
|
+
|
|
649
|
+
case use_form_item_1.FORM_ITEM_ACTION.setMaster:
|
|
650
|
+
newFormItem = kendo_vue_common_1.clone(utils_1.findMaster(action.payload, this.ks.fields, this.ks.dataItems));
|
|
651
|
+
break;
|
|
652
|
+
|
|
653
|
+
case use_form_item_1.FORM_ITEM_ACTION.complete:
|
|
654
|
+
if (this.compFormItem) {
|
|
655
|
+
this.$emit('dataaction', {
|
|
656
|
+
type: Scheduler_1.DATA_ACTION.update,
|
|
657
|
+
series: this.compSeries,
|
|
658
|
+
dataItem: action.payload
|
|
659
|
+
});
|
|
660
|
+
newFormItem = null;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
break;
|
|
664
|
+
|
|
665
|
+
default:
|
|
666
|
+
newFormItem = this.compFormItem;
|
|
667
|
+
break;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
this.currentFormItem = newFormItem;
|
|
671
|
+
this.$emit('formitemchange', newFormItem);
|
|
672
|
+
},
|
|
428
673
|
handleFocus: function handleFocus(event) {
|
|
429
674
|
if (this.onFocusAction) {
|
|
430
|
-
var actions = this.onFocusAction(event, this.$props
|
|
675
|
+
var actions = this.onFocusAction(event, this.$props);
|
|
431
676
|
|
|
432
677
|
if (actions) {// Array.isArray(actions)
|
|
433
678
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
434
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
435
|
-
// : 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});
|
|
436
681
|
}
|
|
437
682
|
}
|
|
438
683
|
|
|
@@ -440,12 +685,12 @@ var SchedulerEditItemVue2 = {
|
|
|
440
685
|
},
|
|
441
686
|
handleMouseDown: function handleMouseDown(event) {
|
|
442
687
|
if (this.onMouseDownAction) {
|
|
443
|
-
var actions = this.onMouseDownAction(event, this.$props
|
|
688
|
+
var actions = this.onMouseDownAction(event, this.$props);
|
|
444
689
|
|
|
445
690
|
if (actions) {// Array.isArray(actions)
|
|
446
691
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
447
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
448
|
-
// : 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});
|
|
449
694
|
}
|
|
450
695
|
}
|
|
451
696
|
|
|
@@ -453,12 +698,12 @@ var SchedulerEditItemVue2 = {
|
|
|
453
698
|
},
|
|
454
699
|
handleMouseUp: function handleMouseUp(event) {
|
|
455
700
|
if (this.onMouseUpAction) {
|
|
456
|
-
var actions = this.onMouseUpAction(event, this.$props
|
|
701
|
+
var actions = this.onMouseUpAction(event, this.$props);
|
|
457
702
|
|
|
458
703
|
if (actions) {// Array.isArray(actions)
|
|
459
704
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
460
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
461
|
-
// : 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});
|
|
462
707
|
}
|
|
463
708
|
}
|
|
464
709
|
|
|
@@ -466,86 +711,106 @@ var SchedulerEditItemVue2 = {
|
|
|
466
711
|
},
|
|
467
712
|
handleClick: function handleClick(event) {
|
|
468
713
|
if (this.onClickAction) {
|
|
469
|
-
var actions = this.onClickAction(event, this
|
|
714
|
+
var actions = this.onClickAction(event, this.$props);
|
|
470
715
|
|
|
471
716
|
if (actions) {// Array.isArray(actions)
|
|
472
717
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
473
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
474
|
-
// : 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});
|
|
475
720
|
}
|
|
476
721
|
}
|
|
477
722
|
|
|
478
723
|
this.$emit('click', event);
|
|
479
724
|
},
|
|
480
725
|
handleDoubleClick: function handleDoubleClick(event) {
|
|
481
|
-
if (this.onDoubleClickAction) {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
726
|
+
if (this.onDoubleClickAction) {
|
|
727
|
+
var actions = this.onDoubleClickAction(event, this.$props);
|
|
728
|
+
var that_1 = this;
|
|
729
|
+
|
|
730
|
+
if (actions) {
|
|
731
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
732
|
+
return action && that_1.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
733
|
+
item: that_1.dataItem
|
|
734
|
+
}), event);
|
|
735
|
+
}) : that_1.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
736
|
+
item: that_1.dataItem
|
|
737
|
+
}));
|
|
738
|
+
}
|
|
488
739
|
}
|
|
489
740
|
|
|
490
741
|
this.$emit('doubleclick', event);
|
|
491
742
|
},
|
|
492
743
|
handleRemoveClick: function handleRemoveClick(event) {
|
|
493
|
-
|
|
494
|
-
var actions = this.onRemoveClickAction(event, this.props, this.currentState);
|
|
744
|
+
var _this = this;
|
|
495
745
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
746
|
+
if (this.onRemoveClickAction) {
|
|
747
|
+
var actions = this.onRemoveClickAction(event, this.$props);
|
|
748
|
+
|
|
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
|
+
}));
|
|
500
757
|
}
|
|
501
758
|
}
|
|
502
759
|
|
|
503
760
|
this.$emit('removeclick', event);
|
|
504
761
|
},
|
|
505
762
|
handlePress: function handlePress(event) {
|
|
506
|
-
|
|
507
|
-
var actions = this.onPressAction(event, this.props, this.currentState);
|
|
763
|
+
var _this = this;
|
|
508
764
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
765
|
+
if (this.onPressAction) {
|
|
766
|
+
var actions = this.onPressAction(event, this.$props);
|
|
767
|
+
|
|
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);
|
|
513
776
|
}
|
|
514
777
|
}
|
|
515
778
|
|
|
516
779
|
this.$emit('press', event);
|
|
517
780
|
},
|
|
518
781
|
handleDrag: function handleDrag(event) {
|
|
519
|
-
|
|
520
|
-
var actions = this.onDragAction(event, this.props, this.currentState);
|
|
782
|
+
var _this = this;
|
|
521
783
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
784
|
+
if (this.onDragAction) {
|
|
785
|
+
var actions = this.onDragAction(event, this.$props);
|
|
786
|
+
|
|
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);
|
|
532
795
|
}
|
|
533
796
|
}
|
|
534
797
|
|
|
535
798
|
this.$emit('drag', event);
|
|
536
799
|
},
|
|
537
800
|
handleRelease: function handleRelease(event) {
|
|
538
|
-
|
|
539
|
-
var actions = this.onReleaseAction(event, this.$props, this.currentState);
|
|
801
|
+
var _this = this;
|
|
540
802
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
803
|
+
if (this.onReleaseAction) {
|
|
804
|
+
var actions = this.onReleaseAction(event, this.$props);
|
|
805
|
+
|
|
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);
|
|
549
814
|
}
|
|
550
815
|
}
|
|
551
816
|
|
|
@@ -553,15 +818,15 @@ var SchedulerEditItemVue2 = {
|
|
|
553
818
|
},
|
|
554
819
|
handleResizePress: function handleResizePress(event) {
|
|
555
820
|
if (this.onResizePressAction) {
|
|
556
|
-
var actions = this.onResizePressAction(event, this.$props
|
|
821
|
+
var actions = this.onResizePressAction(event, this.$props);
|
|
557
822
|
|
|
558
823
|
if (actions) {// Array.isArray(actions)
|
|
559
824
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
560
825
|
// this.actionsReducerMap[action.type](
|
|
561
|
-
// {...action, item: this.
|
|
826
|
+
// {...action, item: this.dataItem},
|
|
562
827
|
// event.dragEvent.originalEvent))
|
|
563
828
|
// : this.actionsReducerMap[actions.type](
|
|
564
|
-
// {...actions, item: this.
|
|
829
|
+
// {...actions, item: this.dataItem},
|
|
565
830
|
// event.dragEvent.originalEvent
|
|
566
831
|
// );
|
|
567
832
|
}
|
|
@@ -571,15 +836,15 @@ var SchedulerEditItemVue2 = {
|
|
|
571
836
|
},
|
|
572
837
|
handleResizeStartDrag: function handleResizeStartDrag(event) {
|
|
573
838
|
if (this.onResizeStartDragAction) {
|
|
574
|
-
var actions = this.onResizeStartDragAction(event, this.$props
|
|
839
|
+
var actions = this.onResizeStartDragAction(event, this.$props);
|
|
575
840
|
|
|
576
841
|
if (actions) {// Array.isArray(actions)
|
|
577
842
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
578
843
|
// this.actionsReducerMap[action.type](
|
|
579
|
-
// {...action, item: this.
|
|
844
|
+
// {...action, item: this.dataItem},
|
|
580
845
|
// event.dragEvent.originalEvent))
|
|
581
846
|
// : this.actionsReducerMap[actions.type](
|
|
582
|
-
// {...actions, item: this.
|
|
847
|
+
// {...actions, item: this.dataItem},
|
|
583
848
|
// event.dragEvent.originalEvent
|
|
584
849
|
// );
|
|
585
850
|
}
|
|
@@ -589,15 +854,15 @@ var SchedulerEditItemVue2 = {
|
|
|
589
854
|
},
|
|
590
855
|
handleResizeEndDrag: function handleResizeEndDrag(event) {
|
|
591
856
|
if (this.onResizeEndDragAction) {
|
|
592
|
-
var actions = this.onResizeEndDragAction(event, this.$props
|
|
857
|
+
var actions = this.onResizeEndDragAction(event, this.$props);
|
|
593
858
|
|
|
594
859
|
if (actions) {// Array.isArray(actions)
|
|
595
860
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
596
861
|
// this.actionsReducerMap[action.type](
|
|
597
|
-
// {...action, item: this.
|
|
862
|
+
// {...action, item: this.dataItem},
|
|
598
863
|
// event.dragEvent.originalEvent))
|
|
599
864
|
// : this.actionsReducerMap[actions.type](
|
|
600
|
-
// {...actions, item: this.
|
|
865
|
+
// {...actions, item: this.dataItem},
|
|
601
866
|
// event.dragEvent.originalEvent);
|
|
602
867
|
}
|
|
603
868
|
}
|
|
@@ -606,15 +871,15 @@ var SchedulerEditItemVue2 = {
|
|
|
606
871
|
},
|
|
607
872
|
handleResizeRelease: function handleResizeRelease(event) {
|
|
608
873
|
if (this.onResizeReleaseAction) {
|
|
609
|
-
var actions = this.onResizeReleaseAction(event, this.$props
|
|
874
|
+
var actions = this.onResizeReleaseAction(event, this.$props);
|
|
610
875
|
|
|
611
876
|
if (actions) {// Array.isArray(actions)
|
|
612
877
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
613
878
|
// this.actionsReducerMap[action.type](
|
|
614
|
-
// {...action, item: this.
|
|
879
|
+
// {...action, item: this.dataItem},
|
|
615
880
|
// event.dragEvent.originalEvent))
|
|
616
881
|
// : this.actionsReducerMap[actions.type](
|
|
617
|
-
// {...actions, item: this.
|
|
882
|
+
// {...actions, item: this.dataItem },
|
|
618
883
|
// event.dragEvent.originalEvent
|
|
619
884
|
// );
|
|
620
885
|
}
|
|
@@ -623,54 +888,76 @@ var SchedulerEditItemVue2 = {
|
|
|
623
888
|
this.$emit('resizerelease', event);
|
|
624
889
|
},
|
|
625
890
|
handleFormSubmit: function handleFormSubmit(event) {
|
|
626
|
-
|
|
627
|
-
var actions = this.onFormSubmitAction(event, this.$props, this.currentState);
|
|
891
|
+
var _this = this;
|
|
628
892
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
893
|
+
if (this.onFormSubmitAction) {
|
|
894
|
+
var actions = this.onFormSubmitAction(event, this.$props);
|
|
895
|
+
|
|
896
|
+
if (actions) {
|
|
897
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
898
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
899
|
+
item: _this.dataItem
|
|
900
|
+
}), event);
|
|
901
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
902
|
+
item: this.dataItem
|
|
903
|
+
}), event);
|
|
635
904
|
}
|
|
636
905
|
}
|
|
637
906
|
|
|
638
907
|
this.$emit('formsubmit', event);
|
|
639
908
|
},
|
|
640
909
|
handleCancel: function handleCancel(event) {
|
|
641
|
-
|
|
642
|
-
var actions = this.onCancelAction(event, this.$props, this.currentState);
|
|
910
|
+
var _this = this;
|
|
643
911
|
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
912
|
+
if (this.onCancelAction) {
|
|
913
|
+
var actions = this.onCancelAction(event, this.$props);
|
|
914
|
+
|
|
915
|
+
if (actions) {
|
|
916
|
+
Array.isArray(actions) ? actions.filter(Boolean).map(function (action) {
|
|
917
|
+
return action && _this.actionsReducerMap[action.type](__assign(__assign({}, action), {
|
|
918
|
+
item: _this.dataItem
|
|
919
|
+
}), event);
|
|
920
|
+
}) : this.actionsReducerMap[actions.type](__assign(__assign({}, actions), {
|
|
921
|
+
item: this.dataItem
|
|
922
|
+
}), event);
|
|
648
923
|
}
|
|
649
924
|
}
|
|
650
925
|
|
|
651
926
|
this.$emit('cancel', event);
|
|
652
927
|
},
|
|
653
928
|
handleOccurrenceClick: function handleOccurrenceClick(event) {
|
|
654
|
-
|
|
655
|
-
var actions = this.onOccurrenceClickAction(event, this.$props, this.currentState);
|
|
929
|
+
var _this = this;
|
|
656
930
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
931
|
+
if (this.onOccurrenceClickAction) {
|
|
932
|
+
var actions = this.onOccurrenceClickAction(event, this.$props);
|
|
933
|
+
|
|
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);
|
|
661
942
|
}
|
|
662
943
|
}
|
|
663
944
|
|
|
664
945
|
this.$emit('occurrenceclick', event);
|
|
665
946
|
},
|
|
666
947
|
handleSeriesClick: function handleSeriesClick(event) {
|
|
667
|
-
|
|
668
|
-
var actions = this.onSeriesClickAction(event, this.$props, this.currentState);
|
|
948
|
+
var _this = this;
|
|
669
949
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
950
|
+
if (this.onSeriesClickAction) {
|
|
951
|
+
var actions = this.onSeriesClickAction(event, this.$props);
|
|
952
|
+
|
|
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);
|
|
674
961
|
}
|
|
675
962
|
}
|
|
676
963
|
|
|
@@ -678,12 +965,12 @@ var SchedulerEditItemVue2 = {
|
|
|
678
965
|
},
|
|
679
966
|
handleKeyDown: function handleKeyDown(event) {
|
|
680
967
|
if (this.onKeyDownAction) {
|
|
681
|
-
var actions = this.onKeyDownAction(event, this.$props
|
|
968
|
+
var actions = this.onKeyDownAction(event, this.$props);
|
|
682
969
|
|
|
683
970
|
if (actions) {// Array.isArray(actions)
|
|
684
971
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
685
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
686
|
-
// : 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);
|
|
687
974
|
}
|
|
688
975
|
}
|
|
689
976
|
|
|
@@ -691,33 +978,39 @@ var SchedulerEditItemVue2 = {
|
|
|
691
978
|
},
|
|
692
979
|
handleKeyUp: function handleKeyUp(event) {
|
|
693
980
|
if (this.onKeyUpAction) {
|
|
694
|
-
var actions = this.onKeyUpAction(event, this.$props
|
|
981
|
+
var actions = this.onKeyUpAction(event, this.$props);
|
|
695
982
|
|
|
696
983
|
if (actions) {// Array.isArray(actions)
|
|
697
984
|
// ? actions.filter(Boolean).map((action) => action &&
|
|
698
|
-
// this.actionsReducerMap[action.type]({...action, item: this.
|
|
699
|
-
// : 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);
|
|
700
987
|
}
|
|
701
988
|
}
|
|
702
989
|
|
|
703
990
|
this.$emit('keyup', event);
|
|
704
991
|
},
|
|
705
992
|
handleRemoveConfirm: function handleRemoveConfirm(event) {
|
|
706
|
-
|
|
707
|
-
var actions = this.onRemoveConfirmAction(event, this.$props, this.currentState);
|
|
993
|
+
var _this = this;
|
|
708
994
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
995
|
+
if (this.onRemoveConfirmAction) {
|
|
996
|
+
var actions = this.onRemoveConfirmAction(event, this.$props);
|
|
997
|
+
|
|
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);
|
|
713
1006
|
}
|
|
714
1007
|
}
|
|
715
1008
|
|
|
716
1009
|
this.$emit('removeconfirm', event);
|
|
717
1010
|
},
|
|
718
|
-
onClickAction: function onClickAction(event, _
|
|
1011
|
+
onClickAction: function onClickAction(event, _) {
|
|
719
1012
|
return [{
|
|
720
|
-
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
|
|
721
1014
|
}];
|
|
722
1015
|
},
|
|
723
1016
|
onDoubleClickAction: function onDoubleClickAction(_, props) {
|
|
@@ -756,11 +1049,11 @@ var SchedulerEditItemVue2 = {
|
|
|
756
1049
|
}
|
|
757
1050
|
} : [];
|
|
758
1051
|
},
|
|
759
|
-
onReleaseAction: function onReleaseAction(event, props
|
|
760
|
-
return props.editable &&
|
|
1052
|
+
onReleaseAction: function onReleaseAction(event, props) {
|
|
1053
|
+
return props.editable && this.compDragItem ? props.isRecurring && !props.isException && this.compSeries === null ? {
|
|
761
1054
|
type: use_show_occurrence_dialog_1.SHOW_OCCURRENCE_DIALOG_ACTION.open
|
|
762
1055
|
} : {
|
|
763
|
-
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,
|
|
764
1057
|
payload: {
|
|
765
1058
|
x: event.dragEvent.clientX,
|
|
766
1059
|
y: event.dragEvent.clientY
|
|
@@ -794,19 +1087,19 @@ var SchedulerEditItemVue2 = {
|
|
|
794
1087
|
}
|
|
795
1088
|
} : [];
|
|
796
1089
|
},
|
|
797
|
-
onResizeReleaseAction: function onResizeReleaseAction(event, props
|
|
798
|
-
return props.editable &&
|
|
1090
|
+
onResizeReleaseAction: function onResizeReleaseAction(event, props) {
|
|
1091
|
+
return props.editable && this.compResizeItem ? props.isRecurring && !props.isException && this.compSeries === null ? {
|
|
799
1092
|
type: use_show_occurrence_dialog_1.SHOW_OCCURRENCE_DIALOG_ACTION.open
|
|
800
1093
|
} : {
|
|
801
|
-
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,
|
|
802
1095
|
payload: {
|
|
803
1096
|
x: event.dragEvent.clientX,
|
|
804
1097
|
y: event.dragEvent.clientY
|
|
805
1098
|
}
|
|
806
1099
|
} : [];
|
|
807
1100
|
},
|
|
808
|
-
onOccurrenceClickAction: function onOccurrenceClickAction(_event, props
|
|
809
|
-
if (
|
|
1101
|
+
onOccurrenceClickAction: function onOccurrenceClickAction(_event, props) {
|
|
1102
|
+
if (this.compDragItem) {
|
|
810
1103
|
return [{
|
|
811
1104
|
type: use_drag_item_1.DRAG_ITEM_ACTION.completeOccurrence
|
|
812
1105
|
}, {
|
|
@@ -814,7 +1107,7 @@ var SchedulerEditItemVue2 = {
|
|
|
814
1107
|
}];
|
|
815
1108
|
}
|
|
816
1109
|
|
|
817
|
-
if (
|
|
1110
|
+
if (this.compResizeItem) {
|
|
818
1111
|
return [{
|
|
819
1112
|
type: use_resize_item_1.RESIZE_ITEM_ACTION.completeOccurrence
|
|
820
1113
|
}, {
|
|
@@ -822,7 +1115,7 @@ var SchedulerEditItemVue2 = {
|
|
|
822
1115
|
}];
|
|
823
1116
|
}
|
|
824
1117
|
|
|
825
|
-
if (
|
|
1118
|
+
if (this.compFormItem) {
|
|
826
1119
|
return [{
|
|
827
1120
|
type: use_series_1.SERIES_ACTION.set,
|
|
828
1121
|
payload: false
|
|
@@ -834,7 +1127,7 @@ var SchedulerEditItemVue2 = {
|
|
|
834
1127
|
}];
|
|
835
1128
|
}
|
|
836
1129
|
|
|
837
|
-
if (
|
|
1130
|
+
if (this.compRemoveItem) {
|
|
838
1131
|
return [{
|
|
839
1132
|
type: use_series_1.SERIES_ACTION.set,
|
|
840
1133
|
payload: false
|
|
@@ -848,8 +1141,8 @@ var SchedulerEditItemVue2 = {
|
|
|
848
1141
|
}];
|
|
849
1142
|
}
|
|
850
1143
|
},
|
|
851
|
-
onSeriesClickAction: function onSeriesClickAction(_event, props
|
|
852
|
-
if (
|
|
1144
|
+
onSeriesClickAction: function onSeriesClickAction(_event, props) {
|
|
1145
|
+
if (this.compDragItem) {
|
|
853
1146
|
return [{
|
|
854
1147
|
type: use_drag_item_1.DRAG_ITEM_ACTION.completeSeries
|
|
855
1148
|
}, {
|
|
@@ -857,7 +1150,7 @@ var SchedulerEditItemVue2 = {
|
|
|
857
1150
|
}];
|
|
858
1151
|
}
|
|
859
1152
|
|
|
860
|
-
if (
|
|
1153
|
+
if (this.compResizeItem) {
|
|
861
1154
|
return [{
|
|
862
1155
|
type: use_resize_item_1.RESIZE_ITEM_ACTION.completeSeries
|
|
863
1156
|
}, {
|
|
@@ -865,7 +1158,7 @@ var SchedulerEditItemVue2 = {
|
|
|
865
1158
|
}];
|
|
866
1159
|
}
|
|
867
1160
|
|
|
868
|
-
if (
|
|
1161
|
+
if (this.compFormItem) {
|
|
869
1162
|
return [{
|
|
870
1163
|
type: use_series_1.SERIES_ACTION.set,
|
|
871
1164
|
payload: true
|
|
@@ -877,7 +1170,7 @@ var SchedulerEditItemVue2 = {
|
|
|
877
1170
|
}];
|
|
878
1171
|
}
|
|
879
1172
|
|
|
880
|
-
if (
|
|
1173
|
+
if (this.compRemoveItem) {
|
|
881
1174
|
return [{
|
|
882
1175
|
type: use_series_1.SERIES_ACTION.set,
|
|
883
1176
|
payload: true
|