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