@progress/kendo-vue-scheduler 9.3.0-develop.4 → 9.3.0-develop.6

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 (160) hide show
  1. package/Scheduler.d.ts +67 -4
  2. package/Scheduler.js +1 -1
  3. package/Scheduler.mjs +267 -115
  4. package/components/BaseView.js +1 -1
  5. package/components/BaseView.mjs +10 -4
  6. package/components/CurrentTimeMarker.js +1 -1
  7. package/components/CurrentTimeMarker.mjs +9 -9
  8. package/components/CurrentTimeMarkerArrow.js +1 -1
  9. package/components/CurrentTimeMarkerArrow.mjs +3 -3
  10. package/components/DateHeaderCell.js +1 -1
  11. package/components/DateHeaderCell.mjs +22 -13
  12. package/components/MoreEventsPopover.d.ts +77 -0
  13. package/components/MoreEventsPopover.js +8 -0
  14. package/components/MoreEventsPopover.mjs +125 -0
  15. package/components/SchedulerActionButtons.d.ts +6 -0
  16. package/components/SchedulerActionButtons.js +1 -1
  17. package/components/SchedulerActionButtons.mjs +25 -19
  18. package/components/SchedulerForm.d.ts +7 -0
  19. package/components/SchedulerForm.js +1 -1
  20. package/components/SchedulerForm.mjs +69 -61
  21. package/components/SchedulerOccurrenceDialog.d.ts +4 -4
  22. package/components/SchedulerOccurrenceDialog.js +1 -1
  23. package/components/SchedulerOccurrenceDialog.mjs +35 -26
  24. package/components/SchedulerRemoveDialog.d.ts +6 -0
  25. package/components/SchedulerRemoveDialog.js +1 -1
  26. package/components/SchedulerRemoveDialog.mjs +24 -23
  27. package/components/ShowMoreItemsButton.d.ts +10 -1
  28. package/components/ShowMoreItemsButton.js +1 -1
  29. package/components/ShowMoreItemsButton.mjs +40 -18
  30. package/components/footer/bussiness-hours/BusinessHours.js +1 -1
  31. package/components/footer/bussiness-hours/BusinessHours.mjs +16 -21
  32. package/components/header/SchedulerAdaptiveHeader.js +1 -1
  33. package/components/header/SchedulerAdaptiveHeader.mjs +28 -26
  34. package/components/header/SchedulerHeader.d.ts +5 -1
  35. package/components/header/SchedulerHeader.js +1 -1
  36. package/components/header/SchedulerHeader.mjs +11 -7
  37. package/components/header/navigation/NavigationDatePicker.d.ts +22 -3
  38. package/components/header/navigation/NavigationDatePicker.js +1 -1
  39. package/components/header/navigation/NavigationDatePicker.mjs +27 -30
  40. package/components/header/view-selector/ViewSelectorList.d.ts +26 -6
  41. package/components/header/view-selector/ViewSelectorList.js +1 -1
  42. package/components/header/view-selector/ViewSelectorList.mjs +55 -49
  43. package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
  44. package/editors/RemoveRecurrenceConfirmDialog.d.ts +29 -0
  45. package/editors/RemoveRecurrenceConfirmDialog.js +8 -0
  46. package/editors/RemoveRecurrenceConfirmDialog.mjs +65 -0
  47. package/editors/ResourceEditor.d.ts +3 -0
  48. package/editors/ResourceEditor.js +1 -1
  49. package/editors/ResourceEditor.mjs +12 -10
  50. package/editors/SchedulerFormEditor.d.ts +1067 -2953
  51. package/editors/SchedulerFormEditor.js +1 -1
  52. package/editors/SchedulerFormEditor.mjs +297 -365
  53. package/editors/SchedulerRecurrenceDialog.d.ts +143 -0
  54. package/editors/SchedulerRecurrenceDialog.js +8 -0
  55. package/editors/SchedulerRecurrenceDialog.mjs +575 -0
  56. package/editors/TimezoneDropDownList.d.ts +46 -0
  57. package/editors/TimezoneDropDownList.js +8 -0
  58. package/editors/TimezoneDropDownList.mjs +63 -0
  59. package/editors/ZonedSplitDateTime.d.ts +65 -0
  60. package/editors/ZonedSplitDateTime.js +8 -0
  61. package/editors/ZonedSplitDateTime.mjs +100 -0
  62. package/hooks/main.d.ts +1 -0
  63. package/hooks/useGroupRowHeightSync.d.ts +10 -0
  64. package/hooks/useRecurrenceSummary.d.ts +10 -0
  65. package/hooks/useRecurrenceSummary.js +8 -0
  66. package/hooks/useRecurrenceSummary.mjs +74 -0
  67. package/hooks/useRowSync.js +1 -1
  68. package/hooks/useRowSync.mjs +23 -4
  69. package/hooks/useSlotExpand.js +1 -1
  70. package/hooks/useSlotExpand.mjs +36 -28
  71. package/index.d.mts +9 -3
  72. package/index.d.ts +9 -3
  73. package/index.js +1 -1
  74. package/index.mjs +83 -71
  75. package/items/SchedulerEditItem.d.ts +14 -3
  76. package/items/SchedulerEditItem.js +1 -1
  77. package/items/SchedulerEditItem.mjs +130 -72
  78. package/items/SchedulerItem.d.ts +10 -0
  79. package/items/SchedulerItem.js +1 -1
  80. package/items/SchedulerItem.mjs +153 -135
  81. package/items/SchedulerProportionalViewItem.d.ts +183 -0
  82. package/items/SchedulerProportionalViewItem.js +8 -0
  83. package/items/SchedulerProportionalViewItem.mjs +378 -0
  84. package/items/SchedulerViewItem.d.ts +3 -0
  85. package/items/SchedulerViewItem.js +1 -1
  86. package/items/SchedulerViewItem.mjs +107 -67
  87. package/messages/main.d.ts +186 -0
  88. package/messages/main.js +1 -1
  89. package/messages/main.mjs +226 -102
  90. package/models/Item.d.ts +2 -0
  91. package/models/Occurrence.d.ts +2 -0
  92. package/models/SchedulerModelFields.d.ts +5 -0
  93. package/models/SchedulerResource.d.ts +6 -0
  94. package/models/SchedulerView.d.ts +2 -0
  95. package/package-metadata.js +1 -1
  96. package/package-metadata.mjs +2 -2
  97. package/package.json +12 -11
  98. package/recurrence/common.js +1 -1
  99. package/recurrence/common.mjs +36 -39
  100. package/services/itemsService.js +1 -1
  101. package/services/itemsService.mjs +31 -27
  102. package/services/occurrenceService.js +1 -1
  103. package/services/occurrenceService.mjs +41 -35
  104. package/slots/SchedulerEditSlot.d.ts +2 -0
  105. package/slots/SchedulerEditSlot.js +1 -1
  106. package/slots/SchedulerEditSlot.mjs +27 -28
  107. package/slots/SchedulerSlot.d.ts +4 -0
  108. package/slots/SchedulerSlot.js +1 -1
  109. package/slots/SchedulerSlot.mjs +10 -1
  110. package/slots/SchedulerViewSlot.d.ts +5 -0
  111. package/slots/SchedulerViewSlot.js +1 -1
  112. package/slots/SchedulerViewSlot.mjs +70 -50
  113. package/tasks/SchedulerEditTask.d.ts +6 -0
  114. package/tasks/SchedulerEditTask.js +1 -1
  115. package/tasks/SchedulerEditTask.mjs +64 -23
  116. package/tasks/SchedulerTask.d.ts +15 -0
  117. package/tasks/SchedulerTask.js +1 -1
  118. package/tasks/SchedulerTask.mjs +39 -28
  119. package/tasks/SchedulerViewTask.d.ts +9 -0
  120. package/tasks/SchedulerViewTask.js +1 -1
  121. package/tasks/SchedulerViewTask.mjs +10 -5
  122. package/utils/main.d.ts +4 -1
  123. package/utils/main.js +1 -1
  124. package/utils/main.mjs +133 -112
  125. package/views/agenda/AgendaView.js +1 -1
  126. package/views/agenda/AgendaView.mjs +28 -22
  127. package/views/agenda/AgendaViewBody.js +1 -1
  128. package/views/agenda/AgendaViewBody.mjs +44 -42
  129. package/views/agenda/AgendaViewHead.js +1 -1
  130. package/views/agenda/AgendaViewHead.mjs +14 -10
  131. package/views/common/SchedulerDrag.d.ts +12 -0
  132. package/views/common/SchedulerResize.d.ts +12 -0
  133. package/views/common/VerticalResourceIterator.d.ts +3 -0
  134. package/views/common/VerticalResourceIterator.js +1 -1
  135. package/views/common/VerticalResourceIterator.mjs +16 -9
  136. package/views/day/DayView.js +1 -1
  137. package/views/day/DayView.mjs +2 -2
  138. package/views/day/MultiDayView.js +1 -1
  139. package/views/day/MultiDayView.mjs +98 -127
  140. package/views/month/MonthView.d.ts +8 -2
  141. package/views/month/MonthView.js +1 -1
  142. package/views/month/MonthView.mjs +115 -109
  143. package/views/month/MonthViewBody.d.ts +7 -2
  144. package/views/month/MonthViewBody.js +1 -1
  145. package/views/month/MonthViewBody.mjs +15 -11
  146. package/views/time/MultiDayTimelineView.d.ts +5 -0
  147. package/views/time/MultiDayTimelineView.js +1 -1
  148. package/views/time/MultiDayTimelineView.mjs +125 -132
  149. package/views/time/TimelineView.js +1 -1
  150. package/views/time/TimelineView.mjs +2 -2
  151. package/views/week/WeekView.js +1 -1
  152. package/views/week/WeekView.mjs +2 -2
  153. package/views/week/WorkWeekView.js +1 -1
  154. package/views/week/WorkWeekView.mjs +9 -9
  155. package/components/header/navigation/DatePickerToggleButton.d.ts +0 -16
  156. package/editors/FilterableComboBox.d.ts +0 -38
  157. package/editors/FilterableComboBox.js +0 -8
  158. package/editors/FilterableComboBox.mjs +0 -61
  159. package/editors/ZonedDateTime.js +0 -8
  160. package/editors/ZonedDateTime.mjs +0 -57
package/index.mjs CHANGED
@@ -7,89 +7,101 @@
7
7
  */
8
8
  import { Scheduler as o } from "./Scheduler.mjs";
9
9
  import { DATA_ACTION as m } from "./constants/main.mjs";
10
- import { AgendaView as p } from "./views/agenda/AgendaView.mjs";
10
+ import { AgendaView as f } from "./views/agenda/AgendaView.mjs";
11
11
  import { TimelineView as S } from "./views/time/TimelineView.mjs";
12
- import { DayView as d } from "./views/day/DayView.mjs";
13
- import { WeekView as i } from "./views/week/WeekView.mjs";
12
+ import { DayView as c } from "./views/day/DayView.mjs";
13
+ import { WeekView as d } from "./views/week/WeekView.mjs";
14
14
  import { WorkWeekView as T } from "./views/week/WorkWeekView.mjs";
15
- import { MonthView as h } from "./views/month/MonthView.mjs";
15
+ import { MonthView as I } from "./views/month/MonthView.mjs";
16
16
  import { SchedulerItem as O } from "./items/SchedulerItem.mjs";
17
17
  import { SchedulerItemContent as C } from "./items/SchedulerItemContent.mjs";
18
- import { SchedulerViewItem as a } from "./items/SchedulerViewItem.mjs";
19
- import { SchedulerEditItem as V } from "./items/SchedulerEditItem.mjs";
18
+ import { SchedulerViewItem as n } from "./items/SchedulerViewItem.mjs";
19
+ import { SchedulerProportionalViewItem as D } from "./items/SchedulerProportionalViewItem.mjs";
20
+ import { SchedulerEditItem as R } from "./items/SchedulerEditItem.mjs";
20
21
  import { SchedulerSlot as w } from "./slots/SchedulerSlot.mjs";
21
- import { SchedulerViewSlot as s } from "./slots/SchedulerViewSlot.mjs";
22
- import { SchedulerEditSlot as M } from "./slots/SchedulerEditSlot.mjs";
23
- import { SchedulerTask as g } from "./tasks/SchedulerTask.mjs";
24
- import { SchedulerViewTask as L } from "./tasks/SchedulerViewTask.mjs";
25
- import { SchedulerEditTask as W } from "./tasks/SchedulerEditTask.mjs";
26
- import { SchedulerDrag as G } from "./views/common/SchedulerDrag.mjs";
22
+ import { SchedulerViewSlot as g } from "./slots/SchedulerViewSlot.mjs";
23
+ import { SchedulerEditSlot as k } from "./slots/SchedulerEditSlot.mjs";
24
+ import { SchedulerTask as H } from "./tasks/SchedulerTask.mjs";
25
+ import { SchedulerViewTask as W } from "./tasks/SchedulerViewTask.mjs";
26
+ import { SchedulerEditTask as G } from "./tasks/SchedulerEditTask.mjs";
27
+ import { SchedulerDrag as y } from "./views/common/SchedulerDrag.mjs";
27
28
  import { SchedulerResize as B } from "./views/common/SchedulerResize.mjs";
28
- import { SchedulerForm as z } from "./components/SchedulerForm.mjs";
29
- import { SchedulerFormEditor as Z } from "./editors/SchedulerFormEditor.mjs";
30
- import { SchedulerActionButtons as j } from "./components/SchedulerActionButtons.mjs";
31
- import { SchedulerOccurrenceDialog as J } from "./components/SchedulerOccurrenceDialog.mjs";
32
- import { SchedulerRemoveDialog as Q } from "./components/SchedulerRemoveDialog.mjs";
33
- import { SchedulerHeader as Y } from "./components/header/SchedulerHeader.mjs";
34
- import { BusinessHours as ee } from "./components/footer/bussiness-hours/BusinessHours.mjs";
35
- import { DateHeaderCell as oe } from "./components/DateHeaderCell.mjs";
36
- import { TimeHeaderCell as me } from "./components/TimeHeaderCell.mjs";
37
- import { SchedulerNavigation as pe } from "./components/header/navigation/SchedulerNavigation.mjs";
38
- import { NavigationDatePicker as Se } from "./components/header/navigation/NavigationDatePicker.mjs";
39
- import { SchedulerViewSelector as de } from "./components/header/view-selector/SchedulerViewSelector.mjs";
40
- import { SchedulerFooter as ie } from "./components/footer/SchedulerFooter.mjs";
41
- import { DRAG_ITEM_ACTION as Te } from "./items/hooks/use-drag-item.mjs";
42
- import { ITEMS_SELECT_ACTION as he } from "./hooks/use-items-selection.mjs";
43
- import { REMOVE_ITEM_ACTION as Oe } from "./items/hooks/use-remove-item.mjs";
44
- import { RESIZE_ITEM_ACTION as Ce } from "./items/hooks/use-resize-item.mjs";
45
- import { SERIES_ACTION as ae } from "./items/hooks/use-series.mjs";
46
- import { SHOW_OCCURRENCE_DIALOG_ACTION as Ve } from "./items/hooks/use-show-occurrence-dialog.mjs";
47
- import { SHOW_REMOVE_DIALOG_ACTION as we } from "./items/hooks/use-show-remove-item-dialog.mjs";
48
- import { SLOTS_SELECT_ACTION as se } from "./hooks/use-slots-selection.mjs";
49
- import { ITEMS_FOCUS_ACTION as Me } from "./hooks/use-items-focus.mjs";
50
- import { SLOTS_FOCUS_ACTION as ge } from "./hooks/use-slots-focus.mjs";
29
+ import { SchedulerForm as Z } from "./components/SchedulerForm.mjs";
30
+ import { SchedulerFormEditor as j } from "./editors/SchedulerFormEditor.mjs";
31
+ import { TimezoneDropDownList as J } from "./editors/TimezoneDropDownList.mjs";
32
+ import { ZonedSplitDateTime as Q } from "./editors/ZonedSplitDateTime.mjs";
33
+ import { SchedulerActionButtons as Y } from "./components/SchedulerActionButtons.mjs";
34
+ import { SchedulerOccurrenceDialog as ee } from "./components/SchedulerOccurrenceDialog.mjs";
35
+ import { SchedulerRemoveDialog as oe } from "./components/SchedulerRemoveDialog.mjs";
36
+ import { SchedulerHeader as me } from "./components/header/SchedulerHeader.mjs";
37
+ import { BusinessHours as fe } from "./components/footer/bussiness-hours/BusinessHours.mjs";
38
+ import { DateHeaderCell as Se } from "./components/DateHeaderCell.mjs";
39
+ import { TimeHeaderCell as ce } from "./components/TimeHeaderCell.mjs";
40
+ import { SchedulerNavigation as de } from "./components/header/navigation/SchedulerNavigation.mjs";
41
+ import { NavigationDatePicker as Te } from "./components/header/navigation/NavigationDatePicker.mjs";
42
+ import { SchedulerViewSelector as Ie } from "./components/header/view-selector/SchedulerViewSelector.mjs";
43
+ import { SchedulerFooter as Oe } from "./components/footer/SchedulerFooter.mjs";
44
+ import { DRAG_ITEM_ACTION as Ce } from "./items/hooks/use-drag-item.mjs";
45
+ import { ITEMS_SELECT_ACTION as ne } from "./hooks/use-items-selection.mjs";
46
+ import { REMOVE_ITEM_ACTION as De } from "./items/hooks/use-remove-item.mjs";
47
+ import { RESIZE_ITEM_ACTION as Re } from "./items/hooks/use-resize-item.mjs";
48
+ import { SERIES_ACTION as we } from "./items/hooks/use-series.mjs";
49
+ import { SHOW_OCCURRENCE_DIALOG_ACTION as ge } from "./items/hooks/use-show-occurrence-dialog.mjs";
50
+ import { SHOW_REMOVE_DIALOG_ACTION as ke } from "./items/hooks/use-show-remove-item-dialog.mjs";
51
+ import { SLOTS_SELECT_ACTION as He } from "./hooks/use-slots-selection.mjs";
52
+ import { SchedulerRecurrenceDialog as We } from "./editors/SchedulerRecurrenceDialog.mjs";
53
+ import { RemoveRecurrenceConfirmDialog as Ge } from "./editors/RemoveRecurrenceConfirmDialog.mjs";
54
+ import { getRecurrenceSummary as ye } from "./hooks/useRecurrenceSummary.mjs";
55
+ import { ITEMS_FOCUS_ACTION as Be } from "./hooks/use-items-focus.mjs";
56
+ import { SLOTS_FOCUS_ACTION as Ze } from "./hooks/use-slots-focus.mjs";
51
57
  export {
52
- p as AgendaView,
53
- ee as BusinessHours,
58
+ f as AgendaView,
59
+ fe as BusinessHours,
54
60
  m as DATA_ACTION,
55
- Te as DRAG_ITEM_ACTION,
56
- oe as DateHeaderCell,
57
- d as DayView,
58
- Me as ITEMS_FOCUS_ACTION,
59
- he as ITEMS_SELECT_ACTION,
60
- h as MonthView,
61
- Se as NavigationDatePicker,
62
- Oe as REMOVE_ITEM_ACTION,
63
- Ce as RESIZE_ITEM_ACTION,
64
- ae as SERIES_ACTION,
65
- Ve as SHOW_OCCURRENCE_DIALOG_ACTION,
66
- we as SHOW_REMOVE_DIALOG_ACTION,
67
- ge as SLOTS_FOCUS_ACTION,
68
- se as SLOTS_SELECT_ACTION,
61
+ Ce as DRAG_ITEM_ACTION,
62
+ Se as DateHeaderCell,
63
+ c as DayView,
64
+ Be as ITEMS_FOCUS_ACTION,
65
+ ne as ITEMS_SELECT_ACTION,
66
+ I as MonthView,
67
+ Te as NavigationDatePicker,
68
+ De as REMOVE_ITEM_ACTION,
69
+ Re as RESIZE_ITEM_ACTION,
70
+ Ge as RemoveRecurrenceConfirmDialog,
71
+ we as SERIES_ACTION,
72
+ ge as SHOW_OCCURRENCE_DIALOG_ACTION,
73
+ ke as SHOW_REMOVE_DIALOG_ACTION,
74
+ Ze as SLOTS_FOCUS_ACTION,
75
+ He as SLOTS_SELECT_ACTION,
69
76
  o as Scheduler,
70
- j as SchedulerActionButtons,
71
- G as SchedulerDrag,
72
- V as SchedulerEditItem,
73
- M as SchedulerEditSlot,
74
- W as SchedulerEditTask,
75
- ie as SchedulerFooter,
76
- z as SchedulerForm,
77
- Z as SchedulerFormEditor,
78
- Y as SchedulerHeader,
77
+ Y as SchedulerActionButtons,
78
+ y as SchedulerDrag,
79
+ R as SchedulerEditItem,
80
+ k as SchedulerEditSlot,
81
+ G as SchedulerEditTask,
82
+ Oe as SchedulerFooter,
83
+ Z as SchedulerForm,
84
+ j as SchedulerFormEditor,
85
+ me as SchedulerHeader,
79
86
  O as SchedulerItem,
80
87
  C as SchedulerItemContent,
81
- pe as SchedulerNavigation,
82
- J as SchedulerOccurrenceDialog,
83
- Q as SchedulerRemoveDialog,
88
+ de as SchedulerNavigation,
89
+ ee as SchedulerOccurrenceDialog,
90
+ D as SchedulerProportionalViewItem,
91
+ We as SchedulerRecurrenceDialog,
92
+ oe as SchedulerRemoveDialog,
84
93
  B as SchedulerResize,
85
94
  w as SchedulerSlot,
86
- g as SchedulerTask,
87
- a as SchedulerViewItem,
88
- de as SchedulerViewSelector,
89
- s as SchedulerViewSlot,
90
- L as SchedulerViewTask,
91
- me as TimeHeaderCell,
95
+ H as SchedulerTask,
96
+ n as SchedulerViewItem,
97
+ Ie as SchedulerViewSelector,
98
+ g as SchedulerViewSlot,
99
+ W as SchedulerViewTask,
100
+ ce as TimeHeaderCell,
92
101
  S as TimelineView,
93
- i as WeekView,
94
- T as WorkWeekView
102
+ J as TimezoneDropDownList,
103
+ d as WeekView,
104
+ T as WorkWeekView,
105
+ Q as ZonedSplitDateTime,
106
+ ye as getRecurrenceSummary
95
107
  };
@@ -380,6 +380,7 @@ declare const SchedulerEditItem: import('vue').DefineComponent<import('vue').Ext
380
380
  className: PropType<string>;
381
381
  itemStyle: PropType<any>;
382
382
  editable: PropType<boolean | import('../models/EditableProp').EditableProp>;
383
+ readonly: PropType<boolean>;
383
384
  selected: PropType<boolean>;
384
385
  vertical: PropType<boolean>;
385
386
  dragHint: PropType<boolean>;
@@ -415,19 +416,20 @@ declare const SchedulerEditItem: import('vue').DefineComponent<import('vue').Ext
415
416
  readonly format?: string;
416
417
  readonly dataItem?: any;
417
418
  readonly className?: string;
419
+ readonly readonly?: boolean;
418
420
  readonly isAllDay?: boolean;
421
+ readonly recurrenceRule?: string;
422
+ readonly startTimezone?: string;
423
+ readonly recurrenceId?: string | number;
419
424
  readonly zonedStart?: import('@progress/kendo-date-math').ZonedDate;
420
425
  readonly zonedEnd?: import('@progress/kendo-date-math').ZonedDate;
421
426
  readonly editable?: boolean | import('../models/EditableProp').EditableProp;
422
427
  readonly formItem?: any;
423
428
  readonly uid?: string | number;
424
429
  readonly originalStart?: Date;
425
- readonly startTimezone?: string;
426
430
  readonly endTimezone?: string;
427
431
  readonly occurrenceId?: string;
428
432
  readonly recurrenceExceptions?: Date[];
429
- readonly recurrenceRule?: string;
430
- readonly recurrenceId?: string | number;
431
433
  readonly tail?: boolean;
432
434
  readonly isException?: boolean;
433
435
  readonly isRecurring?: boolean;
@@ -506,6 +508,7 @@ declare const SchedulerEditItem: import('vue').DefineComponent<import('vue').Ext
506
508
  className: PropType<string>;
507
509
  itemStyle: PropType<any>;
508
510
  editable: PropType<boolean | import('../models/EditableProp').EditableProp>;
511
+ readonly: PropType<boolean>;
509
512
  selected: PropType<boolean>;
510
513
  vertical: PropType<boolean>;
511
514
  dragHint: PropType<boolean>;
@@ -628,6 +631,9 @@ declare const SchedulerEditItem: import('vue').DefineComponent<import('vue').Ext
628
631
  handleKeyDown(event: SchedulerItemKeyboardEvent): void;
629
632
  handleKeyUp(event: SchedulerItemKeyboardEvent): void;
630
633
  handleRemoveConfirm(event: SchedulerRemoveDialogStateChangeEvent<null>): void;
634
+ handleDeleteItem(dataItem: DataItem): void;
635
+ handleFormDelete(dataItem: DataItem): void;
636
+ handleRemoveDialogCancel(event: SchedulerRemoveDialogStateChangeEvent<null>): void;
631
637
  onClickAction(event: SchedulerItemMouseEvent, _: SchedulerEditItemProps): {
632
638
  type: ITEMS_SELECT_ACTION;
633
639
  }[];
@@ -868,6 +874,7 @@ declare const SchedulerEditItem: import('vue').DefineComponent<import('vue').Ext
868
874
  className: PropType<string>;
869
875
  itemStyle: PropType<any>;
870
876
  editable: PropType<boolean | import('../models/EditableProp').EditableProp>;
877
+ readonly: PropType<boolean>;
871
878
  selected: PropType<boolean>;
872
879
  vertical: PropType<boolean>;
873
880
  dragHint: PropType<boolean>;
@@ -892,5 +899,9 @@ declare const SchedulerEditItem: import('vue').DefineComponent<import('vue').Ext
892
899
  ksOccurrenceClick: any;
893
900
  ksSeriesClick: any;
894
901
  ksRemoveConfirm: any;
902
+ ksRemoveDialogCancel: any;
903
+ ksDeleteItem: any;
904
+ ksFormDelete: any;
905
+ ksIsSeries: () => boolean;
895
906
  }, true, {}, any>;
896
907
  export { SchedulerEditItem };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("vue"),E=require("../constants/main.js"),h=require("@progress/kendo-vue-common"),A=require("./SchedulerViewItem.js"),o=require("./hooks/use-form-item.js"),s=require("./hooks/use-show-occurrence-dialog.js"),c=require("./hooks/use-remove-item.js"),l=require("./hooks/use-show-remove-item-dialog.js"),a=require("./hooks/use-drag-item.js"),r=require("./hooks/use-resize-item.js"),d=require("./hooks/use-series.js"),m=require("../hooks/use-items-selection.js"),p=require("../utils/main.js"),I=require("../hooks/use-slots-focus.js"),u=require("../hooks/use-items-focus.js"),_=O.defineComponent({name:"KendoSchedulerEditItem",inheritAttrs:!1,props:{tabIndex:{type:Number,default:void 0},item:[String,Function,Object],viewItem:[String,Function,Object],drag:[String,Function,Object],resize:[String,Function,Object],form:[String,Function,Object],removeDialog:[String,Function,Object],occurrenceDialog:[String,Function,Object],formItem:Object,dragItem:Object,resizeItem:Object,removeItem:Object,showOccurrenceDialog:{type:Boolean,default:void 0},showRemoveDialog:{type:Boolean,default:void 0},series:{type:Boolean,default:void 0},uid:[String,Number],start:Date,end:Date,originalStart:Date,startTimezone:String,endTimezone:String,isAllDay:Boolean,title:String,description:String,occurrenceId:String,recurrenceExceptions:Array,recurrenceRule:String,recurrenceId:[String,Number],dataItem:Object,head:Boolean,tail:Boolean,order:Number,zonedStart:Object,zonedEnd:Object,slots:Array,group:Object,range:Object,isException:Boolean,isRecurring:Boolean,id:String,className:String,itemStyle:Object,editable:[Object,Boolean],selected:Boolean,vertical:Boolean,dragHint:Boolean,resizeHint:Boolean,format:String,ignoreIsAllDay:Boolean,itemRef:Object,onRemoveclick:Function,onDataaction:Function,onFormItemChange:Function,onDragitemchange:Function,onResizeitemchange:Function},inject:{bv:{default:null},ks:{default:null},dispatchFocusedItems:{default:null},dispatchFocusedSlots:{default:null},dispatchSelectedItems:{default:null}},provide(){return{ei:this.ei,ksCancel:this.handleCancel,ksFormSubmit:this.handleFormSubmit,ksOccurrenceClick:this.handleOccurrenceClick,ksSeriesClick:this.handleSeriesClick,ksRemoveConfirm:this.handleRemoveConfirm}},data(){return{ei:{props:this.$props,form:this.$props.formItem,drag:this.drag,resize:this.resize,remove:this.remove,showRemoveDialog:this.showRemoveDialog,showOccurrenceDialog:this.showOccurrenceDialog},currentFormItem:null,currentSelected:null,currentSeries:null,currentRemoveItem:null,currentDragItem:null,currentResizeItem:null,currentShowRemoveDialog:null,currentShowOccurrenceDialog:null}},computed:{currentTabIndex(){const t=this.bv.items.length&&this.bv.items[0].dataItem.id===this.dataItem.id;return this.$props.tabIndex!==void 0?this.$props.tabIndex===null?void 0:this.$props.tabIndex:this.bv.selectedItems.length===0&&t?0:void 0},compSelected(){return this.selected!==void 0?this.selected:this.currentSelected},compSeries(){return this.series!==void 0?this.series:this.currentSeries},compFormItem(){return this.formItem!==void 0?this.formItem:this.currentFormItem},compRemoveItem(){return this.removeItem!==void 0?this.removeItem:this.currentRemoveItem},compDragItem(){return this.dragItem!==void 0?this.dragItem:this.currentDragItem},compResizeItem(){return this.resizeItem!==void 0?this.resizeItem:this.currentResizeItem},compShowRemoveDialog(){return this.showRemoveDialog!==void 0?this.showRemoveDialog:this.currentShowRemoveDialog},compShowOccurrenceDialog(){return this.showOccurrenceDialog!==void 0?this.showOccurrenceDialog:this.currentShowOccurrenceDialog},actionsReducerMap(){return{[d.SERIES_ACTION.set]:this.dispatchSeries,[d.SERIES_ACTION.toggle]:this.dispatchSeries,[d.SERIES_ACTION.reset]:this.dispatchSeries,[m.ITEMS_SELECT_ACTION.select]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.add]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.remove]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.reset]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.selectNext]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.selectPrev]:this.dispatchItemSelection,[o.FORM_ITEM_ACTION.set]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.setMaster]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.reset]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.complete]:this.dispatchFormItem,[c.REMOVE_ITEM_ACTION.set]:this.dispatchRemoveItem,[c.REMOVE_ITEM_ACTION.reset]:this.dispatchRemoveItem,[c.REMOVE_ITEM_ACTION.complete]:this.dispatchRemoveItem,[s.SHOW_OCCURRENCE_DIALOG_ACTION.close]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.open]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.set]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.toggle]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.reset]:this.dispatchShowOccurrenceDialog,[l.SHOW_REMOVE_DIALOG_ACTION.close]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.open]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.set]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.toggle]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.reset]:this.dispatchShowRemoveDialog,[a.DRAG_ITEM_ACTION.start]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.drag]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.complete]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.completeOccurrence]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.completeSeries]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.set]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.reset]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.dragSelected]:this.dispatchDragItem,[r.RESIZE_ITEM_ACTION.start]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.startDrag]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.startDragSelected]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.endDrag]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.endDragSelected]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.complete]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.completeOccurrence]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.completeSeries]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.set]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.reset]:this.dispatchResizeItem,[u.ITEMS_FOCUS_ACTION.next]:this.dispatchViewItemsFocus,[u.ITEMS_FOCUS_ACTION.prev]:this.dispatchViewItemsFocus,[I.SLOTS_FOCUS_ACTION.left]:this.dispatchViewSlotsFocus,[I.SLOTS_FOCUS_ACTION.right]:this.dispatchViewSlotsFocus,[I.SLOTS_FOCUS_ACTION.up]:this.dispatchViewSlotsFocus,[I.SLOTS_FOCUS_ACTION.down]:this.dispatchViewSlotsFocus,null:()=>{}}}},render(){const t=h.getDefaultSlots(this),e=!!(this.bv.selectedItems&&this.bv.selectedItems.some(R=>p.compareItems(R,this,this.ignoreIsAllDay)));let i;const n=O.createVNode(A.SchedulerViewItem,{ignoreIsAllDay:this.ignoreIsAllDay,item:this.item,uid:this.uid,start:this.start,end:this.end,originalStart:this.originalStart,startTimezone:this.startTimezone,endTimezone:this.endTimezone,isAllDay:this.isAllDay,title:this.title,description:this.description,occurrenceId:this.occurrenceId,recurrenceExceptions:this.recurrenceExceptions,recurrenceRule:this.recurrenceRule,recurrenceId:this.recurrenceId,dataItem:this.dataItem,head:this.head,tail:this.tail,order:this.order,zonedStart:this.zonedStart,zonedEnd:this.zonedEnd,slots:this.slots,group:this.group,range:this.range,isException:this.isException,isRecurring:this.isRecurring,id:this.id,className:this.className,itemStyle:this.itemStyle,editable:this.editable,vertical:this.vertical,dragHint:this.dragHint,resizeHint:this.resizeHint,format:this.format,showOccurrenceDialog:this.compShowOccurrenceDialog,showRemoveDialog:this.compShowRemoveDialog,formItem:this.compFormItem,dragItem:this.compDragItem,resizeItem:this.compResizeItem,removeItem:this.compRemoveItem,itemRef:this.item,selected:e,tabIndex:this.currentTabIndex,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onFocus:this.handleFocus,onMouseup:this.handleMouseUp,onMousedown:this.handleMouseDown,onClick:this.handleClick,onDoubleclick:this.handleDoubleClick,onRemoveclick:this.handleRemoveClick,onPress:this.handlePress,onDrag:this.handleDrag,onRelease:this.handleRelease,onResizepress:this.handleResizePress,onResizeenddrag:this.handleResizeEndDrag,onResizestartdrag:this.handleResizeStartDrag,onResizerelease:this.handleResizeRelease},null);return i=h.getTemplate.call(this,{h:O.h,template:this.$props.viewItem,defaultRendering:n,defaultSlots:t,additionalListeners:{doubleclick:this.handleDoubleClick,removeclick:this.handleRemoveClick,press:this.handlePress,drag:this.handleDrag,release:this.handleRelease,resizepress:this.handleResizePress,resizeenddrag:this.handleResizeEndDrag,resizestartdrag:this.handleResizeStartDrag,resizerelease:this.handleResizeRelease}}),i},methods:{dispatchSeries(t,e){const i=d.seriesReducer(this.compSeries,t);this.currentSeries=i,this.$emit("serieschange",i)},dispatchItemSelection(t,e){this.dispatchSelectedItems(t,e)},dispatchRemoveItem(t,e){let i;switch(t.type){case c.REMOVE_ITEM_ACTION.set:i=t.payload;break;case c.REMOVE_ITEM_ACTION.reset:i=null;break;case c.REMOVE_ITEM_ACTION.complete:this.compRemoveItem&&this.$emit("dataaction",{type:E.DATA_ACTION.remove,series:this.compSeries,dataItem:this.compRemoveItem}),i=null;break;default:i=this.compRemoveItem;break}this.currentRemoveItem=i,this.$emit("removeitemchange",i)},dispatchShowOccurrenceDialog(t,e){const i=s.showOccurrenceDialogReducer(this.compShowOccurrenceDialog,t);this.currentShowOccurrenceDialog=i,this.$emit("showremovedialogchange",i)},dispatchShowRemoveDialog(t,e){const i=l.showRemoveDialogReducer(this.compShowRemoveDialog,t);this.currentShowRemoveDialog=i,this.$emit("showremovedialogchange",i)},dispatchDragItem(t,e){a.useDragItem.call(this,t)},dispatchResizeItem(t,e){r.useResizeItem.call(this,t,e)},dispatchViewSlotsFocus(t,e){this.dispatchFocusedSlots(t,e)},dispatchViewItemsFocus(t,e){this.dispatchFocusedItems(t,e)},dispatchFormItem(t,e){let i;switch(t.type){case o.FORM_ITEM_ACTION.set:i=t.payload;break;case o.FORM_ITEM_ACTION.reset:i=null;break;case o.FORM_ITEM_ACTION.setMaster:i=h.clone(p.findMaster(t.payload,this.ks.fields,this.ks.dataItems));break;case o.FORM_ITEM_ACTION.complete:this.compFormItem&&(this.$emit("dataaction",{type:E.DATA_ACTION.update,series:this.compSeries,dataItem:t.payload}),i=null);break;default:i=this.compFormItem;break}this.currentFormItem=i,this.$emit("formitemchange",i)},handleFocus(t){if(this.onFocusAction){const e=this.onFocusAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("focus",t)},handleMouseDown(t){if(this.onMouseDownAction){const e=this.onMouseDownAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("mousedown",t)},handleMouseUp(t){if(this.onMouseUpAction){const e=this.onMouseUpAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("mouseup",t)},handleClick(t){if(this.onClickAction){const e=this.onClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("click",t)},handleDoubleClick(t){if(this.onDoubleClickAction){const e=this.onDoubleClickAction(t,this.$props),i=this;e&&(Array.isArray(e)?e.filter(Boolean).map(n=>n&&i.actionsReducerMap[n.type]({...n,item:i.dataItem},t)):i.actionsReducerMap[e.type]({...e,item:i.dataItem}))}this.$emit("doubleclick",t)},handleRemoveClick(t){if(this.onRemoveClickAction){const e=this.onRemoveClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("removeclick",t)},handlePress(t){if(this.onPressAction){const e=this.onPressAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("press",t)},handleDrag(t){if(this.onDragAction){const e=this.onDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("drag",t)},handleRelease(t){if(this.onReleaseAction){const e=this.onReleaseAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("release",t)},handleResizePress(t){if(this.onResizePressAction){const e=this.onResizePressAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizepress",t)},handleResizeStartDrag(t){if(this.onResizeStartDragAction){const e=this.onResizeStartDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizestartdrag",t)},handleResizeEndDrag(t){if(this.onResizeEndDragAction){const e=this.onResizeEndDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizeenddrag",t)},handleResizeRelease(t){if(this.onResizeReleaseAction){const e=this.onResizeReleaseAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizerelease",t)},handleFormSubmit(t){if(this.onFormSubmitAction){const e=this.onFormSubmitAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("formsubmit",t)},handleCancel(t){if(this.onCancelAction){const e=this.onCancelAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("cancel",t)},handleOccurrenceClick(t){if(this.onOccurrenceClickAction){const e=this.onOccurrenceClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("occurrenceclick",t)},handleSeriesClick(t){if(this.onSeriesClickAction){const e=this.onSeriesClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("seriesclick",t)},handleKeyDown(t){if(this.onKeyDownAction){const e=this.onKeyDownAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this},t.event)):this.actionsReducerMap[e.type]({...e,item:this},t.event))}this.$emit("keydown",t)},handleKeyUp(t){if(this.onKeyUpAction){const e=this.onKeyUpAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.event)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.event))}this.$emit("keyup",t)},handleRemoveConfirm(t){if(this.onRemoveConfirmAction){const e=this.onRemoveConfirmAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.event)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.event))}this.$emit("removeconfirm",t)},onClickAction(t,e){return[{type:t.event.metaKey||t.event.ctrlKey?this.compSelected&&!this.compDragItem&&!this.compResizeItem?m.ITEMS_SELECT_ACTION.remove:m.ITEMS_SELECT_ACTION.add:m.ITEMS_SELECT_ACTION.select}]},onDoubleClickAction(t,e){return e.editable?[{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring&&{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}].filter(Boolean):[]},onRemoveClickAction(t,e){return e.editable?[{type:c.REMOVE_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:l.SHOW_REMOVE_DIALOG_ACTION.open}]:[]},onPressAction(t,e){return e.editable?{type:a.DRAG_ITEM_ACTION.start,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?a.DRAG_ITEM_ACTION.dragSelected:a.DRAG_ITEM_ACTION.drag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onReleaseAction(t,e){return e.editable&&this.compDragItem?e.isRecurring&&!e.isException&&this.compSeries===null?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:e.isRecurring?this.compSeries?a.DRAG_ITEM_ACTION.completeSeries:a.DRAG_ITEM_ACTION.completeOccurrence:a.DRAG_ITEM_ACTION.complete,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizePressAction(t,e){return e.editable?{type:r.RESIZE_ITEM_ACTION.start,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeStartDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?r.RESIZE_ITEM_ACTION.startDragSelected:r.RESIZE_ITEM_ACTION.startDrag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeEndDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?r.RESIZE_ITEM_ACTION.endDragSelected:r.RESIZE_ITEM_ACTION.endDrag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeReleaseAction(t,e){return e.editable&&this.compResizeItem?e.isRecurring&&!e.isException&&this.compSeries===null?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:e.isRecurring?this.compSeries?r.RESIZE_ITEM_ACTION.completeSeries:r.RESIZE_ITEM_ACTION.completeOccurrence:r.RESIZE_ITEM_ACTION.complete,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onOccurrenceClickAction(t,e){if(this.compDragItem)return[{type:a.DRAG_ITEM_ACTION.completeOccurrence},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compResizeItem)return[{type:r.RESIZE_ITEM_ACTION.completeOccurrence},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compFormItem)return[{type:d.SERIES_ACTION.set,payload:!1},{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compRemoveItem)return[{type:d.SERIES_ACTION.set,payload:!1},{type:c.REMOVE_ITEM_ACTION.set,payload:e.dataItem},{type:l.SHOW_REMOVE_DIALOG_ACTION.open},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onSeriesClickAction(t,e){if(this.compDragItem)return[{type:a.DRAG_ITEM_ACTION.completeSeries},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compResizeItem)return[{type:r.RESIZE_ITEM_ACTION.completeSeries},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compFormItem)return[{type:d.SERIES_ACTION.set,payload:!0},{type:o.FORM_ITEM_ACTION.setMaster,payload:e.dataItem},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compRemoveItem)return[{type:d.SERIES_ACTION.set,payload:!0},{type:c.REMOVE_ITEM_ACTION.set,payload:e.dataItem},{type:l.SHOW_REMOVE_DIALOG_ACTION.open},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onKeyDownAction(t,e){let i;switch(t.event.keyCode){case h.Keys.enter:return[{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring&&{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}];case h.Keys.tab:return[{type:t.event.shiftKey?u.ITEMS_FOCUS_ACTION.prev:u.ITEMS_FOCUS_ACTION.next,ignoreIsAllDay:e.ignoreIsAllDay},{type:t.event.shiftKey?m.ITEMS_SELECT_ACTION.selectPrev:m.ITEMS_SELECT_ACTION.selectNext,ignoreIsAllDay:e.ignoreIsAllDay}];case h.Keys.up:return i=this.bv.slots.find(n=>p.compareSlots(n.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:I.SLOTS_FOCUS_ACTION.up,slot:i}];case h.Keys.right:return i=this.bv.slots.find(n=>p.compareSlots(n.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:I.SLOTS_FOCUS_ACTION.right,slot:i}];case h.Keys.down:return i=this.bv.slots.find(n=>p.compareSlots(n.cSlot,e.slots[e.slots.length-1])),[!!(e.slots.length&&i)&&{type:I.SLOTS_FOCUS_ACTION.down,slot:i}];case h.Keys.left:return i=this.bv.slots.find(n=>p.compareSlots(n.cSlot.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:I.SLOTS_FOCUS_ACTION.left,slot:i}];case h.Keys.delete:case h.Keys.backspace:return[{type:c.REMOVE_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:l.SHOW_REMOVE_DIALOG_ACTION.open}];default:return}},onFormSubmitAction(t){return{type:o.FORM_ITEM_ACTION.complete,payload:t.value}},onRemoveConfirmAction(){return[{type:c.REMOVE_ITEM_ACTION.complete},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onCancelAction(){return[{type:d.SERIES_ACTION.reset},{type:c.REMOVE_ITEM_ACTION.reset},{type:o.FORM_ITEM_ACTION.reset},{type:a.DRAG_ITEM_ACTION.reset},{type:r.RESIZE_ITEM_ACTION.reset},{type:l.SHOW_REMOVE_DIALOG_ACTION.reset},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.reset}]}}});exports.SchedulerEditItem=_;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("vue"),A=require("../constants/main.js"),h=require("@progress/kendo-vue-common"),C=require("./SchedulerViewItem.js"),g=require("../views/common/SchedulerDrag.js"),y=require("../views/common/SchedulerResize.js"),o=require("./hooks/use-form-item.js"),s=require("./hooks/use-show-occurrence-dialog.js"),n=require("./hooks/use-remove-item.js"),l=require("./hooks/use-show-remove-item-dialog.js"),a=require("./hooks/use-drag-item.js"),r=require("./hooks/use-resize-item.js"),I=require("./hooks/use-series.js"),m=require("../hooks/use-items-selection.js"),u=require("../utils/main.js"),p=require("../hooks/use-slots-focus.js"),E=require("../hooks/use-items-focus.js"),T=d.defineComponent({name:"KendoSchedulerEditItem",inheritAttrs:!1,props:{tabIndex:{type:Number,default:void 0},item:[String,Function,Object],viewItem:[String,Function,Object],drag:[String,Function,Object],resize:[String,Function,Object],form:[String,Function,Object],removeDialog:[String,Function,Object],occurrenceDialog:[String,Function,Object],formItem:Object,dragItem:Object,resizeItem:Object,removeItem:Object,showOccurrenceDialog:{type:Boolean,default:void 0},showRemoveDialog:{type:Boolean,default:void 0},series:{type:Boolean,default:void 0},uid:[String,Number],start:Date,end:Date,originalStart:Date,startTimezone:String,endTimezone:String,isAllDay:Boolean,title:String,description:String,occurrenceId:String,recurrenceExceptions:Array,recurrenceRule:String,recurrenceId:[String,Number],dataItem:Object,head:Boolean,tail:Boolean,order:Number,zonedStart:Object,zonedEnd:Object,slots:Array,group:Object,range:Object,isException:Boolean,isRecurring:Boolean,id:String,className:String,itemStyle:Object,editable:[Object,Boolean],readonly:Boolean,selected:Boolean,vertical:Boolean,dragHint:Boolean,resizeHint:Boolean,format:String,ignoreIsAllDay:Boolean,itemRef:Object,onRemoveclick:Function,onDataaction:Function,onFormItemChange:Function,onDragitemchange:Function,onResizeitemchange:Function},inject:{bv:{default:null},ks:{default:null},dispatchFocusedItems:{default:null},dispatchFocusedSlots:{default:null},dispatchSelectedItems:{default:null}},provide(){return{ei:this.ei,ksCancel:this.handleCancel,ksFormSubmit:this.handleFormSubmit,ksOccurrenceClick:this.handleOccurrenceClick,ksSeriesClick:this.handleSeriesClick,ksRemoveConfirm:this.handleRemoveConfirm,ksRemoveDialogCancel:this.handleRemoveDialogCancel,ksDeleteItem:this.handleDeleteItem,ksFormDelete:this.handleFormDelete,ksIsSeries:()=>this.compSeries===!0}},data(){return{ei:{props:this.$props,form:this.$props.formItem,drag:this.drag,resize:this.resize,remove:this.remove,showRemoveDialog:this.showRemoveDialog,showOccurrenceDialog:this.showOccurrenceDialog},currentFormItem:null,currentSelected:null,currentSeries:null,currentRemoveItem:null,currentDragItem:null,currentResizeItem:null,currentShowRemoveDialog:null,currentShowOccurrenceDialog:null}},computed:{currentTabIndex(){const t=this.bv.items.length&&this.bv.items[0].dataItem.id===this.dataItem.id;return this.$props.tabIndex!==void 0?this.$props.tabIndex===null?void 0:this.$props.tabIndex:this.bv.selectedItems.length===0&&t?0:void 0},compSelected(){return this.selected!==void 0?this.selected:this.currentSelected},compSeries(){return this.series!==void 0?this.series:this.currentSeries},compFormItem(){return this.formItem!==void 0?this.formItem:this.currentFormItem},compRemoveItem(){return this.removeItem!==void 0?this.removeItem:this.currentRemoveItem},compDragItem(){return this.dragItem!==void 0?this.dragItem:this.currentDragItem},compResizeItem(){return this.resizeItem!==void 0?this.resizeItem:this.currentResizeItem},compShowRemoveDialog(){return this.showRemoveDialog!==void 0?this.showRemoveDialog:this.currentShowRemoveDialog},compShowOccurrenceDialog(){return this.showOccurrenceDialog!==void 0?this.showOccurrenceDialog:this.currentShowOccurrenceDialog},actionsReducerMap(){return{[I.SERIES_ACTION.set]:this.dispatchSeries,[I.SERIES_ACTION.toggle]:this.dispatchSeries,[I.SERIES_ACTION.reset]:this.dispatchSeries,[m.ITEMS_SELECT_ACTION.select]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.add]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.remove]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.reset]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.selectNext]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.selectPrev]:this.dispatchItemSelection,[o.FORM_ITEM_ACTION.set]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.setMaster]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.reset]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.complete]:this.dispatchFormItem,[n.REMOVE_ITEM_ACTION.set]:this.dispatchRemoveItem,[n.REMOVE_ITEM_ACTION.reset]:this.dispatchRemoveItem,[n.REMOVE_ITEM_ACTION.complete]:this.dispatchRemoveItem,[s.SHOW_OCCURRENCE_DIALOG_ACTION.close]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.open]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.set]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.toggle]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.reset]:this.dispatchShowOccurrenceDialog,[l.SHOW_REMOVE_DIALOG_ACTION.close]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.open]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.set]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.toggle]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.reset]:this.dispatchShowRemoveDialog,[a.DRAG_ITEM_ACTION.start]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.drag]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.complete]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.completeOccurrence]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.completeSeries]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.set]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.reset]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.dragSelected]:this.dispatchDragItem,[r.RESIZE_ITEM_ACTION.start]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.startDrag]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.startDragSelected]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.endDrag]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.endDragSelected]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.complete]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.completeOccurrence]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.completeSeries]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.set]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.reset]:this.dispatchResizeItem,[E.ITEMS_FOCUS_ACTION.next]:this.dispatchViewItemsFocus,[E.ITEMS_FOCUS_ACTION.prev]:this.dispatchViewItemsFocus,[p.SLOTS_FOCUS_ACTION.left]:this.dispatchViewSlotsFocus,[p.SLOTS_FOCUS_ACTION.right]:this.dispatchViewSlotsFocus,[p.SLOTS_FOCUS_ACTION.up]:this.dispatchViewSlotsFocus,[p.SLOTS_FOCUS_ACTION.down]:this.dispatchViewSlotsFocus,null:()=>{}}}},render(){const t=h.getDefaultSlots(this),e=this.$props.drag||g.SchedulerDrag,i=this.$props.resize||y.SchedulerResize,c=!!(this.bv.selectedItems&&this.bv.selectedItems.some(O=>u.compareItems(O,this,this.ignoreIsAllDay)));let _;const S=d.createVNode(C.SchedulerViewItem,{ignoreIsAllDay:this.ignoreIsAllDay,item:this.item,uid:this.uid,start:this.start,end:this.end,originalStart:this.originalStart,startTimezone:this.startTimezone,endTimezone:this.endTimezone,isAllDay:this.isAllDay,title:this.title,description:this.description,occurrenceId:this.occurrenceId,recurrenceExceptions:this.recurrenceExceptions,recurrenceRule:this.recurrenceRule,recurrenceId:this.recurrenceId,dataItem:this.dataItem,head:this.head,tail:this.tail,order:this.order,zonedStart:this.zonedStart,zonedEnd:this.zonedEnd,slots:this.slots,group:this.group,range:this.range,isException:this.isException,isRecurring:this.isRecurring,id:this.id,className:this.className,itemStyle:this.itemStyle,editable:this.editable,readonly:this.readonly,vertical:this.vertical,dragHint:this.dragHint,resizeHint:this.resizeHint,format:this.format,showOccurrenceDialog:this.compShowOccurrenceDialog,showRemoveDialog:this.compShowRemoveDialog,formItem:this.compFormItem,dragItem:this.compDragItem,resizeItem:this.compResizeItem,removeItem:this.compRemoveItem,itemRef:this.item,selected:c,tabIndex:this.currentTabIndex,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onFocus:this.handleFocus,onMouseup:this.handleMouseUp,onMousedown:this.handleMouseDown,onClick:this.handleClick,onDoubleclick:this.handleDoubleClick,onRemoveclick:this.handleRemoveClick,onPress:this.handlePress,onDrag:this.handleDrag,onRelease:this.handleRelease,onResizepress:this.handleResizePress,onResizeenddrag:this.handleResizeEndDrag,onResizestartdrag:this.handleResizeStartDrag,onResizerelease:this.handleResizeRelease},null);return _=h.getTemplate.call(this,{h:d.h,template:this.$props.viewItem,defaultRendering:S,defaultSlots:t,additionalListeners:{doubleclick:this.handleDoubleClick,removeclick:this.handleRemoveClick,press:this.handlePress,drag:this.handleDrag,release:this.handleRelease,resizepress:this.handleResizePress,resizeenddrag:this.handleResizeEndDrag,resizestartdrag:this.handleResizeStartDrag,resizerelease:this.handleResizeRelease}}),d.createVNode(d.Fragment,null,[_,this.compDragItem&&this.$props.editable.drag&&(Array.isArray(this.compDragItem)?this.compDragItem.map((O,R)=>d.createVNode(e,{key:R,dataItem:O,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null)):d.createVNode(e,{dataItem:this.compDragItem,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null)),this.compResizeItem&&this.$props.editable.resize&&(Array.isArray(this.compResizeItem)?this.compResizeItem.map((O,R)=>d.createVNode(i,{key:R,dataItem:O,format:this.format,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null)):d.createVNode(i,{dataItem:this.compResizeItem,format:this.format,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null))])},methods:{dispatchSeries(t,e){const i=I.seriesReducer(this.compSeries,t);this.currentSeries=i,this.$emit("serieschange",i)},dispatchItemSelection(t,e){this.dispatchSelectedItems(t,e)},dispatchRemoveItem(t,e){let i;switch(t.type){case n.REMOVE_ITEM_ACTION.set:i=t.payload;break;case n.REMOVE_ITEM_ACTION.reset:i=null;break;case n.REMOVE_ITEM_ACTION.complete:this.compRemoveItem&&this.$emit("dataaction",{type:A.DATA_ACTION.remove,series:this.compSeries,dataItem:this.compRemoveItem}),i=null;break;default:i=this.compRemoveItem;break}this.currentRemoveItem=i,this.$emit("removeitemchange",i)},dispatchShowOccurrenceDialog(t,e){const i=s.showOccurrenceDialogReducer(this.compShowOccurrenceDialog,t);this.currentShowOccurrenceDialog=i,this.$emit("showoccurrencedialogchange",i)},dispatchShowRemoveDialog(t,e){const i=l.showRemoveDialogReducer(this.compShowRemoveDialog,t);this.currentShowRemoveDialog=i,this.$emit("showremovedialogchange",i)},dispatchDragItem(t,e){a.useDragItem.call(this,t)},dispatchResizeItem(t,e){r.useResizeItem.call(this,t,e)},dispatchViewSlotsFocus(t,e){this.dispatchFocusedSlots(t,e)},dispatchViewItemsFocus(t,e){this.dispatchFocusedItems(t,e)},dispatchFormItem(t,e){let i;switch(t.type){case o.FORM_ITEM_ACTION.set:i=t.payload;break;case o.FORM_ITEM_ACTION.reset:i=null;break;case o.FORM_ITEM_ACTION.setMaster:i=h.clone(u.findMaster(t.payload,this.ks.fields,this.ks.dataItems));break;case o.FORM_ITEM_ACTION.complete:this.compFormItem&&(this.$emit("dataaction",{type:A.DATA_ACTION.update,series:this.compSeries,dataItem:t.payload}),i=null);break;default:i=this.compFormItem;break}this.currentFormItem=i,this.$emit("formitemchange",i)},handleFocus(t){if(this.onFocusAction){const e=this.onFocusAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("focus",t)},handleMouseDown(t){if(this.onMouseDownAction){const e=this.onMouseDownAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("mousedown",t)},handleMouseUp(t){if(this.onMouseUpAction){const e=this.onMouseUpAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("mouseup",t)},handleClick(t){if(this.onClickAction){const e=this.onClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("click",t)},handleDoubleClick(t){if(this.onDoubleClickAction){const e=this.onDoubleClickAction(t,this.$props),i=this;e&&(Array.isArray(e)?e.filter(Boolean).map(c=>c&&i.actionsReducerMap[c.type]({...c,item:i.dataItem},t)):i.actionsReducerMap[e.type]({...e,item:i.dataItem}))}this.$emit("doubleclick",t)},handleRemoveClick(t){if(this.onRemoveClickAction){const e=this.onRemoveClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("removeclick",t)},handlePress(t){if(this.onPressAction){const e=this.onPressAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("press",t)},handleDrag(t){if(this.onDragAction){const e=this.onDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("drag",t)},handleRelease(t){if(this.onReleaseAction){const e=this.onReleaseAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("release",t)},handleResizePress(t){if(this.onResizePressAction){const e=this.onResizePressAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizepress",t)},handleResizeStartDrag(t){if(this.onResizeStartDragAction){const e=this.onResizeStartDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizestartdrag",t)},handleResizeEndDrag(t){if(this.onResizeEndDragAction){const e=this.onResizeEndDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizeenddrag",t)},handleResizeRelease(t){if(this.onResizeReleaseAction){const e=this.onResizeReleaseAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizerelease",t)},handleFormSubmit(t){if(this.onFormSubmitAction){const e=this.onFormSubmitAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("formsubmit",t)},handleCancel(t){if(this.onCancelAction){const e=this.onCancelAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("cancel",t)},handleOccurrenceClick(t){if(this.onOccurrenceClickAction){const e=this.onOccurrenceClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("occurrenceclick",t)},handleSeriesClick(t){if(this.onSeriesClickAction){const e=this.onSeriesClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("seriesclick",t)},handleKeyDown(t){if(this.onKeyDownAction){const e=this.onKeyDownAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this},t.event)):this.actionsReducerMap[e.type]({...e,item:this},t.event))}this.$emit("keydown",t)},handleKeyUp(t){if(this.onKeyUpAction){const e=this.onKeyUpAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.event)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.event))}this.$emit("keyup",t)},handleRemoveConfirm(t){if(this.onRemoveConfirmAction){const e=this.onRemoveConfirmAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.event)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.event))}this.$emit("removeconfirm",t)},handleDeleteItem(t){this.$emit("dataaction",{type:A.DATA_ACTION.remove,series:this.compSeries,dataItem:t})},handleFormDelete(t){this.dispatchRemoveItem({type:n.REMOVE_ITEM_ACTION.set,payload:t},null),this.dispatchShowRemoveDialog({type:l.SHOW_REMOVE_DIALOG_ACTION.open},null)},handleRemoveDialogCancel(t){this.compFormItem?(this.dispatchRemoveItem({type:n.REMOVE_ITEM_ACTION.reset},null),this.dispatchShowRemoveDialog({type:l.SHOW_REMOVE_DIALOG_ACTION.close},null)):this.handleCancel(t)},onClickAction(t,e){return[{type:t.event.metaKey||t.event.ctrlKey?this.compSelected&&!this.compDragItem&&!this.compResizeItem?m.ITEMS_SELECT_ACTION.remove:m.ITEMS_SELECT_ACTION.add:m.ITEMS_SELECT_ACTION.select}]},onDoubleClickAction(t,e){return e.editable?[{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring&&{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}].filter(Boolean):[]},onRemoveClickAction(t,e){return e.editable?[{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:l.SHOW_REMOVE_DIALOG_ACTION.open}]:[]},onPressAction(t,e){return e.editable?{type:a.DRAG_ITEM_ACTION.start,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?a.DRAG_ITEM_ACTION.dragSelected:a.DRAG_ITEM_ACTION.drag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onReleaseAction(t,e){return e.editable&&this.compDragItem?e.isRecurring&&!e.isException&&this.compSeries===null?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:e.isRecurring?this.compSeries?a.DRAG_ITEM_ACTION.completeSeries:a.DRAG_ITEM_ACTION.completeOccurrence:a.DRAG_ITEM_ACTION.complete,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizePressAction(t,e){return e.editable?{type:r.RESIZE_ITEM_ACTION.start,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeStartDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?r.RESIZE_ITEM_ACTION.startDragSelected:r.RESIZE_ITEM_ACTION.startDrag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeEndDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?r.RESIZE_ITEM_ACTION.endDragSelected:r.RESIZE_ITEM_ACTION.endDrag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeReleaseAction(t,e){return e.editable&&this.compResizeItem?e.isRecurring&&!e.isException&&this.compSeries===null?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:e.isRecurring?this.compSeries?r.RESIZE_ITEM_ACTION.completeSeries:r.RESIZE_ITEM_ACTION.completeOccurrence:r.RESIZE_ITEM_ACTION.complete,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onOccurrenceClickAction(t,e){if(this.compDragItem)return[{type:a.DRAG_ITEM_ACTION.completeOccurrence},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compResizeItem)return[{type:r.RESIZE_ITEM_ACTION.completeOccurrence},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compFormItem)return[{type:I.SERIES_ACTION.set,payload:!1},{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compRemoveItem)return[{type:I.SERIES_ACTION.set,payload:!1},{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},{type:l.SHOW_REMOVE_DIALOG_ACTION.open},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onSeriesClickAction(t,e){if(this.compDragItem)return[{type:a.DRAG_ITEM_ACTION.completeSeries},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compResizeItem)return[{type:r.RESIZE_ITEM_ACTION.completeSeries},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compFormItem)return[{type:I.SERIES_ACTION.set,payload:!0},{type:o.FORM_ITEM_ACTION.setMaster,payload:e.dataItem},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compRemoveItem)return[{type:I.SERIES_ACTION.set,payload:!0},{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},{type:l.SHOW_REMOVE_DIALOG_ACTION.open},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onKeyDownAction(t,e){let i;switch(t.event.keyCode){case h.Keys.enter:return[{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring&&{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}];case h.Keys.tab:return[{type:t.event.shiftKey?E.ITEMS_FOCUS_ACTION.prev:E.ITEMS_FOCUS_ACTION.next,ignoreIsAllDay:e.ignoreIsAllDay},{type:t.event.shiftKey?m.ITEMS_SELECT_ACTION.selectPrev:m.ITEMS_SELECT_ACTION.selectNext,ignoreIsAllDay:e.ignoreIsAllDay}];case h.Keys.up:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.up,slot:i}];case h.Keys.right:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.right,slot:i}];case h.Keys.down:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot,e.slots[e.slots.length-1])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.down,slot:i}];case h.Keys.left:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.left,slot:i}];case h.Keys.delete:case h.Keys.backspace:return[{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:l.SHOW_REMOVE_DIALOG_ACTION.open}];default:return}},onFormSubmitAction(t){return{type:o.FORM_ITEM_ACTION.complete,payload:t.value}},onRemoveConfirmAction(){return[{type:n.REMOVE_ITEM_ACTION.complete},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onCancelAction(){return[{type:I.SERIES_ACTION.reset},{type:n.REMOVE_ITEM_ACTION.reset},{type:o.FORM_ITEM_ACTION.reset},{type:a.DRAG_ITEM_ACTION.reset},{type:r.RESIZE_ITEM_ACTION.reset},{type:l.SHOW_REMOVE_DIALOG_ACTION.reset},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.reset}]}}});exports.SchedulerEditItem=T;