@progress/kendo-react-scheduler 16.3.0 → 16.4.0-develop.1

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 (84) hide show
  1. package/Scheduler.d.ts +46 -0
  2. package/Scheduler.js +1 -1
  3. package/Scheduler.mjs +322 -297
  4. package/components/EventOverviewPopover.d.ts +36 -0
  5. package/components/EventOverviewPopover.js +8 -0
  6. package/components/EventOverviewPopover.mjs +133 -0
  7. package/components/MoreEventsPopover.js +1 -1
  8. package/components/MoreEventsPopover.mjs +40 -39
  9. package/components/SchedulerForm.js +1 -1
  10. package/components/SchedulerForm.mjs +7 -6
  11. package/components/SchedulerQuickCreateForm.d.ts +63 -0
  12. package/components/SchedulerQuickCreateForm.js +8 -0
  13. package/components/SchedulerQuickCreateForm.mjs +144 -0
  14. package/components/ShowMoreItemsButton.js +1 -1
  15. package/components/ShowMoreItemsButton.mjs +1 -1
  16. package/dist/cdn/js/kendo-react-scheduler.js +1 -1
  17. package/editors/KeepResetCustomEventsDialog.d.ts +19 -0
  18. package/editors/KeepResetCustomEventsDialog.js +8 -0
  19. package/editors/KeepResetCustomEventsDialog.mjs +34 -0
  20. package/editors/SchedulerFormEditor.d.ts +18 -4
  21. package/editors/SchedulerFormEditor.js +1 -1
  22. package/editors/SchedulerFormEditor.mjs +273 -238
  23. package/editors/SchedulerRecurrenceDialog.js +1 -1
  24. package/editors/SchedulerRecurrenceDialog.mjs +142 -135
  25. package/editors/ZonedSplitDateTime.d.ts +30 -0
  26. package/editors/ZonedSplitDateTime.js +1 -1
  27. package/editors/ZonedSplitDateTime.mjs +58 -47
  28. package/hooks/index.d.ts +4 -0
  29. package/hooks/useCloseOnAnchorScrollOut.d.ts +18 -0
  30. package/hooks/useCloseOnAnchorScrollOut.js +8 -0
  31. package/hooks/useCloseOnAnchorScrollOut.mjs +51 -0
  32. package/hooks/useDeferredClick.d.ts +26 -0
  33. package/hooks/useDeferredClick.js +8 -0
  34. package/hooks/useDeferredClick.mjs +24 -0
  35. package/hooks/useEventOverviewPlacement.d.ts +23 -0
  36. package/hooks/useEventOverviewPlacement.js +8 -0
  37. package/hooks/useEventOverviewPlacement.mjs +14 -0
  38. package/hooks/useQuickCreatePlacement.d.ts +26 -0
  39. package/hooks/useQuickCreatePlacement.js +8 -0
  40. package/hooks/useQuickCreatePlacement.mjs +28 -0
  41. package/index.d.mts +3 -1
  42. package/index.d.ts +3 -1
  43. package/index.js +1 -1
  44. package/index.mjs +112 -107
  45. package/items/SchedulerEditItem.js +1 -1
  46. package/items/SchedulerEditItem.mjs +600 -509
  47. package/items/SchedulerItem.d.ts +2 -0
  48. package/items/SchedulerItem.js +1 -1
  49. package/items/SchedulerItem.mjs +137 -130
  50. package/items/SchedulerProportionalViewItem.js +1 -1
  51. package/items/SchedulerProportionalViewItem.mjs +95 -91
  52. package/items/SchedulerViewItem.js +1 -1
  53. package/items/SchedulerViewItem.mjs +168 -157
  54. package/items/hooks/use-drag-item.js +1 -1
  55. package/items/hooks/use-drag-item.mjs +46 -45
  56. package/items/hooks/use-resize-item.d.ts +1 -0
  57. package/items/hooks/use-resize-item.js +1 -1
  58. package/items/hooks/use-resize-item.mjs +84 -78
  59. package/messages/index.d.ts +33 -0
  60. package/messages/index.js +1 -1
  61. package/messages/index.mjs +158 -136
  62. package/package-metadata.js +1 -1
  63. package/package-metadata.mjs +2 -2
  64. package/package.json +12 -12
  65. package/recurrence/RecurrenceEditor.js +1 -1
  66. package/recurrence/RecurrenceEditor.mjs +64 -64
  67. package/recurrence/common.d.ts +10 -0
  68. package/recurrence/common.js +1 -1
  69. package/recurrence/common.mjs +48 -44
  70. package/services/itemsService.d.ts +5 -2
  71. package/services/itemsService.js +1 -1
  72. package/services/itemsService.mjs +36 -36
  73. package/slots/SchedulerEditSlot.d.ts +15 -0
  74. package/slots/SchedulerEditSlot.js +1 -1
  75. package/slots/SchedulerEditSlot.mjs +162 -92
  76. package/utils/index.d.ts +2 -0
  77. package/utils/index.js +1 -1
  78. package/utils/index.mjs +103 -99
  79. package/views/common/SchedulerDrag.js +1 -1
  80. package/views/common/SchedulerDrag.mjs +26 -23
  81. package/views/common/SchedulerResize.js +1 -1
  82. package/views/common/SchedulerResize.mjs +29 -26
  83. package/views/day/MultiDayView.js +1 -1
  84. package/views/day/MultiDayView.mjs +160 -152
@@ -5,697 +5,788 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as n from "react";
9
- import { SchedulerOccurrenceDialog as Nt } from "../components/SchedulerOccurrenceDialog.mjs";
10
- import { SchedulerForm as Pt } from "../components/SchedulerForm.mjs";
11
- import { SchedulerRemoveDialog as Ut } from "../components/SchedulerRemoveDialog.mjs";
12
- import { useId as Vt, Keys as _ } from "@progress/kendo-react-common";
13
- import { SchedulerDrag as Xt } from "../views/common/SchedulerDrag.mjs";
14
- import { SchedulerResize as Yt } from "../views/common/SchedulerResize.mjs";
15
- import { SchedulerViewItem as Ht } from "./SchedulerViewItem.mjs";
16
- import { SchedulerEditItemContext as Lt } from "../context/SchedulerEditItemContext.mjs";
17
- import { FORM_ITEM_ACTION as I, useFormItem as Gt } from "./hooks/use-form-item.mjs";
18
- import { SHOW_OCCURRENCE_DIALOG_ACTION as d, useShowOccurrenceDialog as Wt } from "./hooks/use-show-occurrence-dialog.mjs";
19
- import { REMOVE_ITEM_ACTION as C, useRemoveItem as jt } from "./hooks/use-remove-item.mjs";
20
- import { SHOW_REMOVE_DIALOG_ACTION as g, useShowRemoveDialog as Zt } from "./hooks/use-show-remove-item-dialog.mjs";
21
- import { DRAG_ITEM_ACTION as y, useDragItem as qt } from "./hooks/use-drag-item.mjs";
22
- import { RESIZE_ITEM_ACTION as m, useResizeItem as Jt } from "./hooks/use-resize-item.mjs";
23
- import { SERIES_ACTION as S, useSeries as Qt } from "./hooks/use-series.mjs";
24
- import { ITEMS_SELECT_ACTION as A } from "../hooks/use-items-selection.mjs";
25
- import { useEditable as $t } from "../hooks/useEditable.mjs";
26
- import { useSchedulerViewSelectedItemsContext as eo, useSchedulerViewItemsContext as to, useSchedulerViewFocusedItemsContext as oo, useSchedulerViewFocusedSlotsContext as ro } from "../context/SchedulerViewContext.mjs";
27
- import { SLOTS_FOCUS_ACTION as p } from "../hooks/use-slots-focus.mjs";
28
- import { ITEMS_FOCUS_ACTION as X } from "../hooks/use-items-focus.mjs";
29
- import { SchedulerItemSelectionContext as ao } from "../context/SchedulerContext.mjs";
30
- const Be = (t) => t === !0 || typeof t == "object" && t !== null && t.drag === !0, lo = n.forwardRef(
31
- (t, l) => {
8
+ import * as l from "react";
9
+ import { SchedulerOccurrenceDialog as ga } from "../components/SchedulerOccurrenceDialog.mjs";
10
+ import { SchedulerForm as Ia } from "../components/SchedulerForm.mjs";
11
+ import { SchedulerRemoveDialog as va } from "../components/SchedulerRemoveDialog.mjs";
12
+ import { useId as Ea, Keys as M } from "@progress/kendo-react-common";
13
+ import { SchedulerDrag as Aa } from "../views/common/SchedulerDrag.mjs";
14
+ import { SchedulerResize as Ca } from "../views/common/SchedulerResize.mjs";
15
+ import { SchedulerViewItem as ha } from "./SchedulerViewItem.mjs";
16
+ import { SchedulerEditItemContext as Da } from "../context/SchedulerEditItemContext.mjs";
17
+ import { FORM_ITEM_ACTION as I, useFormItem as Ra } from "./hooks/use-form-item.mjs";
18
+ import { SHOW_OCCURRENCE_DIALOG_ACTION as d, useShowOccurrenceDialog as Sa } from "./hooks/use-show-occurrence-dialog.mjs";
19
+ import { REMOVE_ITEM_ACTION as E, useRemoveItem as pa } from "./hooks/use-remove-item.mjs";
20
+ import { SHOW_REMOVE_DIALOG_ACTION as g, useShowRemoveDialog as ka } from "./hooks/use-show-remove-item-dialog.mjs";
21
+ import { DRAG_ITEM_ACTION as y, useDragItem as wa } from "./hooks/use-drag-item.mjs";
22
+ import { RESIZE_ITEM_ACTION as m, useResizeItem as ba } from "./hooks/use-resize-item.mjs";
23
+ import { SERIES_ACTION as h, useSeries as Oa } from "./hooks/use-series.mjs";
24
+ import { ITEMS_SELECT_ACTION as S } from "../hooks/use-items-selection.mjs";
25
+ import { useSchedulerFieldsContext as za, useSchedulerPropsContext as _a, useSchedulerDataContext as xa, SchedulerItemSelectionContext as Fa } from "../context/SchedulerContext.mjs";
26
+ import { useEventOverviewPlacement as Ba } from "../hooks/useEventOverviewPlacement.mjs";
27
+ import { EventOverviewPopover as Ka } from "../components/EventOverviewPopover.mjs";
28
+ import { useDeferredClick as Ma } from "../hooks/useDeferredClick.mjs";
29
+ import { DATA_ACTION as tt } from "../constants/index.mjs";
30
+ import { getField as J } from "../utils/index.mjs";
31
+ import { KeepResetCustomEventsDialog as Ta } from "../editors/KeepResetCustomEventsDialog.mjs";
32
+ import { useEditable as Pa } from "../hooks/useEditable.mjs";
33
+ import { useSchedulerViewSelectedItemsContext as Na, useSchedulerViewItemsContext as Ua, useSchedulerViewFocusedItemsContext as Va, useSchedulerViewFocusedSlotsContext as Ha } from "../context/SchedulerViewContext.mjs";
34
+ import { SLOTS_FOCUS_ACTION as _ } from "../hooks/use-slots-focus.mjs";
35
+ import { ITEMS_FOCUS_ACTION as Q } from "../hooks/use-items-focus.mjs";
36
+ const He = (t) => t === !0 || typeof t == "object" && t !== null && t.drag === !0, Xa = l.forwardRef(
37
+ (t, n) => {
38
+ var Qe;
32
39
  const {
33
40
  _ref: s,
34
- itemRef: Ne,
35
- onDataAction: T,
36
- ignoreIsAllDay: N,
37
- viewItem: Pe,
38
- series: Ue,
39
- onSeriesChange: Ve,
40
- form: Xe,
41
- formItem: Ye,
42
- onFormItemChange: He,
43
- drag: Le,
44
- dragItem: Ge,
45
- onDragItemChange: We,
46
- resize: je,
47
- resizeItem: Ze,
48
- onResizeItemChange: qe,
49
- removeDialog: Je,
50
- removeItem: Qe,
51
- onRemoveItemChange: $e,
52
- occurrenceDialog: et,
53
- showOccurrenceDialog: tt,
54
- onShowOccurrenceDialogChange: ot,
55
- showRemoveDialog: rt,
56
- onShowRemoveDialogChange: at,
57
- onFocus: Y,
58
- onFocusAction: H,
59
- onMouseDown: L,
60
- onMouseDownAction: G,
61
- onMouseUp: W,
62
- onMouseUpAction: j,
63
- onClick: Z,
64
- onClickAction: q,
65
- onDoubleClick: J,
66
- onDoubleClickAction: Q,
67
- onRemoveClick: $,
68
- onRemoveClickAction: ee,
69
- onPress: te,
70
- onPressAction: oe,
71
- onDrag: re,
72
- onDragAction: ae,
73
- onRelease: le,
74
- onReleaseAction: ie,
75
- onResizePress: ne,
76
- onResizePressAction: ce,
77
- onResizeStartDrag: se,
78
- onResizeStartDragAction: me,
79
- onResizeEndDrag: de,
80
- onResizeEndDragAction: ye,
81
- onResizeRelease: ue,
82
- onResizeReleaseAction: ge,
83
- onOccurrenceClick: fe,
84
- onOccurrenceClickAction: Ie,
85
- onSeriesClick: Ae,
86
- onSeriesClickAction: Ee,
87
- onKeyDown: he,
88
- onKeyDownAction: Ce,
89
- onKeyUp: De,
90
- onKeyUpAction: Re,
91
- onRemoveConfirm: ve,
92
- onRemoveConfirmAction: Se,
93
- onFormSubmit: pe,
94
- onFormSubmitAction: be,
95
- onCancel: ke,
96
- onCancelAction: we
97
- } = { ...O, ...t }, [lt, it] = n.useState(t.tabIndex), Fe = n.useRef(null), i = n.useRef(null), nt = Vt();
98
- n.useImperativeHandle(Fe, () => ({ props: t, element: i.current && i.current.element })), n.useImperativeHandle(l, () => Fe.current), n.useImperativeHandle(s, () => i.current), n.useImperativeHandle(Ne, () => i.current);
99
- const Oe = Pe || O.viewItem, Me = Le || O.drag, Ke = je || O.resize, ct = Xe || O.form, st = et || O.occurrenceDialog, mt = Je || O.removeDialog, x = $t(t.editable), [P, b] = eo(), [B, , U] = Qt(null, Ue, Ve), [E, dt, z] = Gt({ series: B, onDataAction: T }, [
100
- null,
101
- Ye,
102
- He
103
- ]), [R, yt, h] = qt(
104
- { dataItem: t.dataItem, ignoreIsAllDay: t.ignoreIsAllDay, isAllDay: t.isAllDay, onDataAction: T },
105
- [null, Ge, We]
106
- ), [v, ut, u] = Jt(
107
- { dataItem: t.dataItem, onDataAction: T },
108
- [null, Ze, qe]
109
- ), [k, gt, D] = jt({ series: B, onDataAction: T }, [
41
+ itemRef: at,
42
+ onDataAction: w,
43
+ ignoreIsAllDay: Y,
44
+ viewItem: ot,
45
+ series: lt,
46
+ onSeriesChange: rt,
47
+ form: nt,
48
+ formItem: it,
49
+ onFormItemChange: ct,
50
+ drag: st,
51
+ dragItem: mt,
52
+ onDragItemChange: dt,
53
+ resize: ut,
54
+ resizeItem: yt,
55
+ onResizeItemChange: ft,
56
+ removeDialog: gt,
57
+ removeItem: It,
58
+ onRemoveItemChange: vt,
59
+ occurrenceDialog: Et,
60
+ showOccurrenceDialog: At,
61
+ onShowOccurrenceDialogChange: Ct,
62
+ showRemoveDialog: ht,
63
+ onShowRemoveDialogChange: Dt,
64
+ onFocus: $,
65
+ onFocusAction: ee,
66
+ onMouseDown: te,
67
+ onMouseDownAction: ae,
68
+ onMouseUp: oe,
69
+ onMouseUpAction: le,
70
+ onClick: re,
71
+ onClickAction: ne,
72
+ onDoubleClick: ie,
73
+ onDoubleClickAction: ce,
74
+ onRemoveClick: se,
75
+ onRemoveClickAction: me,
76
+ onPress: de,
77
+ onPressAction: ue,
78
+ onDrag: ye,
79
+ onDragAction: fe,
80
+ onRelease: ge,
81
+ onReleaseAction: Ie,
82
+ onResizePress: ve,
83
+ onResizePressAction: Ee,
84
+ onResizeStartDrag: Ae,
85
+ onResizeStartDragAction: Ce,
86
+ onResizeEndDrag: he,
87
+ onResizeEndDragAction: De,
88
+ onResizeRelease: Re,
89
+ onResizeReleaseAction: Se,
90
+ onOccurrenceClick: pe,
91
+ onOccurrenceClickAction: ke,
92
+ onSeriesClick: we,
93
+ onSeriesClickAction: be,
94
+ onKeyDown: P,
95
+ onKeyDownAction: Oe,
96
+ onKeyUp: ze,
97
+ onKeyUpAction: _e,
98
+ onRemoveConfirm: xe,
99
+ onRemoveConfirmAction: Fe,
100
+ onFormSubmit: Be,
101
+ onFormSubmitAction: Ke,
102
+ onCancel: Me,
103
+ onCancelAction: Te
104
+ } = { ...K, ...t }, [Rt, St] = l.useState(t.tabIndex), Xe = l.useRef(null), i = l.useRef(null), pt = Ea();
105
+ l.useImperativeHandle(Xe, () => ({ props: t, element: i.current && i.current.element })), l.useImperativeHandle(n, () => Xe.current), l.useImperativeHandle(s, () => i.current), l.useImperativeHandle(at, () => i.current);
106
+ const Pe = ot || K.viewItem, Ye = st || K.drag, Le = ut || K.resize, kt = nt || K.form, wt = Et || K.occurrenceDialog, bt = gt || K.removeDialog, O = Pa(t.editable), T = za(), Ot = _a(), [Ge] = xa(), L = Ot.eventOverview !== !1, We = Ba(), [je, p] = l.useState(null), N = l.useRef(null), G = Ma(), [W, x] = Na(), [D, j] = l.useState(null), Ze = l.useRef(null), qe = l.useCallback(
107
+ (a) => {
108
+ const e = Array.isArray(a) ? a[0] : a;
109
+ if (!e)
110
+ return !1;
111
+ const o = J(e, T.recurrenceId), ya = o != null ? o : J(e, T.id), $e = Ge.find((fa) => J(fa, T.id) === ya), et = $e && J($e, T.recurrenceExceptions);
112
+ return Array.isArray(et) && et.length > 0;
113
+ },
114
+ [T, Ge]
115
+ ), Z = l.useCallback(
116
+ (a, e) => {
117
+ if (a && a.series && (a.type === tt.update || a.type === tt.remove) && qe(a.dataItem)) {
118
+ j({ action: a, event: e, fromForm: Ze.current !== null });
119
+ return;
120
+ }
121
+ w && w(a, e);
122
+ },
123
+ [w, qe]
124
+ ), [U, , A] = Oa(null, lt, rt), [R, zt, v] = Ra({ series: U, onDataAction: Z }, [
110
125
  null,
111
- Qe,
112
- $e
113
- ]), [V, ft, f] = Zt(
126
+ it,
127
+ ct
128
+ ]), [b, _t, k] = wa(
129
+ {
130
+ dataItem: t.dataItem,
131
+ ignoreIsAllDay: t.ignoreIsAllDay,
132
+ isAllDay: t.isAllDay,
133
+ onDataAction: Z
134
+ },
135
+ [null, mt, dt]
136
+ ), [z, xt, C] = ba(
137
+ { dataItem: t.dataItem, rangeIsAllDay: (Qe = t.range) == null ? void 0 : Qe.isAllDay, onDataAction: Z },
138
+ [null, yt, ft]
139
+ ), [F, Ft, f] = pa(
140
+ { series: U, onDataAction: Z },
141
+ [null, It, vt]
142
+ );
143
+ Ze.current = R;
144
+ const [q, Bt, u] = ka(
114
145
  !1,
115
- rt,
116
- at
117
- ), [F, It, w] = Wt(
146
+ ht,
147
+ Dt
148
+ ), [V, Kt, B] = Sa(
118
149
  !1,
119
- tt,
120
- ot
121
- ), [ze] = to(), [, _e] = oo(), [, M] = ro(), xe = !!(i.current && P && P.some((o) => o.current === i.current)), c = n.useMemo(
150
+ At,
151
+ Ct
152
+ ), [Ne] = Ua(), [, Ue] = Va(), [, H] = Ha(), Ve = !!(i.current && W && W.some((a) => a.current === i.current)), c = l.useMemo(
122
153
  () => ({
123
- selected: xe,
124
- series: B,
125
- formItem: E,
126
- dragItem: R,
127
- resizeItem: v,
128
- removeItem: k,
129
- showRemoveDialog: V,
130
- showOccurrenceDialog: F
154
+ selected: Ve,
155
+ series: U,
156
+ formItem: R,
157
+ dragItem: b,
158
+ resizeItem: z,
159
+ removeItem: F,
160
+ showRemoveDialog: q,
161
+ showOccurrenceDialog: V
131
162
  }),
132
- [R, E, k, v, xe, B, F, V]
133
- ), a = n.useMemo(
163
+ [b, R, F, z, Ve, U, V, q]
164
+ ), r = l.useMemo(
134
165
  () => ({
135
- [S.set]: U,
136
- [S.toggle]: U,
137
- [S.reset]: U,
138
- [A.select]: b,
139
- [A.add]: b,
140
- [A.remove]: b,
141
- [A.reset]: b,
142
- [A.selectNext]: b,
143
- [A.selectPrev]: b,
144
- [I.set]: z,
145
- [I.setMaster]: z,
146
- [I.reset]: z,
147
- [I.complete]: z,
148
- [C.set]: D,
149
- [C.reset]: D,
150
- [C.complete]: D,
151
- [d.close]: w,
152
- [d.open]: w,
153
- [d.set]: w,
154
- [d.toggle]: w,
155
- [d.reset]: w,
156
- [g.close]: f,
157
- [g.open]: f,
158
- [g.set]: f,
159
- [g.toggle]: f,
160
- [g.reset]: f,
161
- [y.start]: h,
162
- [y.drag]: h,
163
- [y.complete]: h,
164
- [y.completeOccurrence]: h,
165
- [y.completeSeries]: h,
166
- [y.set]: h,
167
- [y.reset]: h,
168
- [y.dragSelected]: h,
169
- [m.start]: u,
170
- [m.startDrag]: u,
171
- [m.startDragSelected]: u,
172
- [m.endDrag]: u,
173
- [m.endDragSelected]: u,
174
- [m.complete]: u,
175
- [m.completeOccurrence]: u,
176
- [m.completeSeries]: u,
177
- [m.set]: u,
178
- [m.reset]: u,
179
- [X.next]: _e,
180
- [X.prev]: _e,
181
- [p.left]: M,
182
- [p.right]: M,
183
- [p.up]: M,
184
- [p.down]: M,
166
+ [h.set]: A,
167
+ [h.toggle]: A,
168
+ [h.reset]: A,
169
+ [S.select]: x,
170
+ [S.add]: x,
171
+ [S.remove]: x,
172
+ [S.reset]: x,
173
+ [S.selectNext]: x,
174
+ [S.selectPrev]: x,
175
+ [I.set]: v,
176
+ [I.setMaster]: v,
177
+ [I.reset]: v,
178
+ [I.complete]: v,
179
+ [E.set]: f,
180
+ [E.reset]: f,
181
+ [E.complete]: f,
182
+ [d.close]: B,
183
+ [d.open]: B,
184
+ [d.set]: B,
185
+ [d.toggle]: B,
186
+ [d.reset]: B,
187
+ [g.close]: u,
188
+ [g.open]: u,
189
+ [g.set]: u,
190
+ [g.toggle]: u,
191
+ [g.reset]: u,
192
+ [y.start]: k,
193
+ [y.drag]: k,
194
+ [y.complete]: k,
195
+ [y.completeOccurrence]: k,
196
+ [y.completeSeries]: k,
197
+ [y.set]: k,
198
+ [y.reset]: k,
199
+ [y.dragSelected]: k,
200
+ [m.start]: C,
201
+ [m.startDrag]: C,
202
+ [m.startDragSelected]: C,
203
+ [m.endDrag]: C,
204
+ [m.endDragSelected]: C,
205
+ [m.complete]: C,
206
+ [m.completeOccurrence]: C,
207
+ [m.completeSeries]: C,
208
+ [m.set]: C,
209
+ [m.reset]: C,
210
+ [Q.next]: Ue,
211
+ [Q.prev]: Ue,
212
+ [_.left]: H,
213
+ [_.right]: H,
214
+ [_.up]: H,
215
+ [_.down]: H,
185
216
  null: () => {
186
217
  }
187
218
  }),
188
219
  [
189
- h,
190
- z,
191
- b,
192
- D,
193
- u,
194
- U,
195
- w,
220
+ k,
221
+ v,
222
+ x,
196
223
  f,
197
- _e,
198
- M
224
+ C,
225
+ A,
226
+ B,
227
+ u,
228
+ Ue,
229
+ H
199
230
  ]
200
- ), At = n.useCallback(
201
- (o) => {
202
- if (H) {
203
- const e = H(o, t, c);
231
+ ), Mt = l.useCallback(
232
+ (a) => {
233
+ if (ee) {
234
+ const e = ee(a, t, c);
204
235
  e && (Array.isArray(e) ? e.filter(Boolean).map(
205
- (r) => r && a[r.type]({ ...r, item: i }, o)
206
- ) : a[e.type]({ ...e, item: i }));
236
+ (o) => o && r[o.type]({ ...o, item: i }, a)
237
+ ) : r[e.type]({ ...e, item: i }));
207
238
  }
208
- Y && Y.call(void 0, o);
239
+ $ && $.call(void 0, a);
209
240
  },
210
- [a, Y, H, t, c]
211
- ), Et = n.useCallback(
212
- (o) => {
213
- if (G) {
214
- const e = G(o, t, c);
241
+ [r, $, ee, t, c]
242
+ ), Tt = l.useCallback(
243
+ (a) => {
244
+ if (ae) {
245
+ const e = ae(a, t, c);
215
246
  e && (Array.isArray(e) ? e.filter(Boolean).map(
216
- (r) => r && a[r.type]({ ...r, item: i }, o)
217
- ) : a[e.type]({ ...e, item: i }));
247
+ (o) => o && r[o.type]({ ...o, item: i }, a)
248
+ ) : r[e.type]({ ...e, item: i }));
218
249
  }
219
- L && L.call(void 0, o);
250
+ te && te.call(void 0, a);
220
251
  },
221
- [a, L, G, t, c]
222
- ), ht = n.useCallback(
223
- (o) => {
224
- if (j) {
225
- const e = j(o, t, c);
252
+ [r, te, ae, t, c]
253
+ ), Pt = l.useCallback(
254
+ (a) => {
255
+ if (le) {
256
+ const e = le(a, t, c);
226
257
  e && (Array.isArray(e) ? e.filter(Boolean).map(
227
- (r) => r && a[r.type]({ ...r, item: i }, o)
228
- ) : a[e.type]({ ...e, item: i }));
258
+ (o) => o && r[o.type]({ ...o, item: i }, a)
259
+ ) : r[e.type]({ ...e, item: i }));
229
260
  }
230
- W && W.call(void 0, o);
261
+ oe && oe.call(void 0, a);
231
262
  },
232
- [a, W, j, t, c]
233
- ), [, Ct] = n.useContext(ao), Dt = n.useCallback(
234
- (o) => {
235
- if (q) {
236
- Ct(i.current);
237
- const e = q(o, t, c);
263
+ [r, oe, le, t, c]
264
+ ), [, Nt] = l.useContext(Fa), Ut = l.useCallback(
265
+ (a) => {
266
+ if (ne) {
267
+ Nt(i.current);
268
+ const e = ne(a, t, c);
238
269
  e && (Array.isArray(e) ? e.filter(Boolean).map(
239
- (r) => r && a[r.type]({ ...r, item: i }, o)
240
- ) : a[e.type]({ ...e, item: i }));
270
+ (o) => o && r[o.type]({ ...o, item: i }, a)
271
+ ) : r[e.type]({ ...e, item: i }));
241
272
  }
242
- Z && Z.call(void 0, o);
273
+ re && re.call(void 0, a), L && G.schedule(() => {
274
+ N.current = i.current && i.current.element, p(t.dataItem);
275
+ });
243
276
  },
244
- [a, Z, q, t, c]
245
- ), Rt = n.useCallback(
246
- (o) => {
247
- if (Q) {
248
- const e = Q(o, t, c);
277
+ [r, re, ne, t, c, L, G]
278
+ ), Vt = l.useCallback(
279
+ (a) => {
280
+ if (G.cancel(), p(null), ce) {
281
+ const e = ce(a, t, c);
249
282
  e && (Array.isArray(e) ? e.filter(Boolean).map(
250
- (r) => r && a[r.type]({ ...r, item: i }, o)
251
- ) : a[e.type]({ ...e, item: i }));
283
+ (o) => o && r[o.type]({ ...o, item: i }, a)
284
+ ) : r[e.type]({ ...e, item: i }));
252
285
  }
253
- J && J.call(void 0, o);
286
+ ie && ie.call(void 0, a);
254
287
  },
255
- [Q, J, t, a, c]
256
- ), vt = n.useCallback(
257
- (o) => {
258
- if (ee) {
259
- const e = ee(o, t, c);
288
+ [ce, ie, t, r, c, G]
289
+ ), Ht = l.useCallback(
290
+ (a) => {
291
+ if (me) {
292
+ const e = me(a, t, c);
260
293
  e && (Array.isArray(e) ? e.filter(Boolean).map(
261
- (r) => r && a[r.type]({ ...r, item: i }, o)
262
- ) : a[e.type]({ ...e, item: i }));
294
+ (o) => o && r[o.type]({ ...o, item: i }, a)
295
+ ) : r[e.type]({ ...e, item: i }));
263
296
  }
264
- $ && $.call(void 0, o);
297
+ se && se.call(void 0, a);
265
298
  },
266
- [ee, $, t, a, c]
267
- ), St = n.useCallback(
268
- (o) => {
269
- if (oe) {
270
- const e = oe(o, t, c);
299
+ [me, se, t, r, c]
300
+ ), Xt = l.useCallback(
301
+ (a) => {
302
+ if (ue) {
303
+ const e = ue(a, t, c);
271
304
  e && (Array.isArray(e) ? e.filter(Boolean).map(
272
- (r) => r && a[r.type]({ ...r, item: i }, o)
273
- ) : a[e.type]({ ...e, item: i }, o));
305
+ (o) => o && r[o.type]({ ...o, item: i }, a)
306
+ ) : r[e.type]({ ...e, item: i }, a));
274
307
  }
275
- te && te.call(void 0, o);
308
+ de && de.call(void 0, a);
276
309
  },
277
- [oe, te, t, a, c]
278
- ), pt = n.useCallback(
279
- (o) => {
280
- if (ae) {
281
- const e = ae(o, t, c);
310
+ [ue, de, t, r, c]
311
+ ), Yt = l.useCallback(
312
+ (a) => {
313
+ if (fe) {
314
+ const e = fe(a, t, c);
282
315
  e && (Array.isArray(e) ? e.filter(Boolean).map(
283
- (r) => r && a[r.type](
284
- { ...r, item: i },
285
- o.dragEvent.originalEvent
316
+ (o) => o && r[o.type](
317
+ { ...o, item: i },
318
+ a.dragEvent.originalEvent
286
319
  )
287
- ) : a[e.type](
320
+ ) : r[e.type](
288
321
  { ...e, item: i },
289
- o.dragEvent.originalEvent
322
+ a.dragEvent.originalEvent
290
323
  ));
291
324
  }
292
- re && re.call(void 0, o);
325
+ ye && ye.call(void 0, a);
293
326
  },
294
- [ae, re, t, a, c]
295
- ), bt = n.useCallback(
296
- (o) => {
297
- if (ie) {
298
- const e = ie(o, t, c);
327
+ [fe, ye, t, r, c]
328
+ ), Lt = l.useCallback(
329
+ (a) => {
330
+ if (Ie) {
331
+ const e = Ie(a, t, c);
299
332
  e && (Array.isArray(e) ? e.filter(Boolean).map(
300
- (r) => r && a[r.type](
301
- { ...r, item: i },
302
- o.dragEvent.originalEvent
333
+ (o) => o && r[o.type](
334
+ { ...o, item: i },
335
+ a.dragEvent.originalEvent
303
336
  )
304
- ) : a[e.type](
337
+ ) : r[e.type](
305
338
  { ...e, item: i },
306
- o.dragEvent.originalEvent
339
+ a.dragEvent.originalEvent
307
340
  ));
308
341
  }
309
- le && le.call(void 0, o);
342
+ ge && ge.call(void 0, a);
310
343
  },
311
- [ie, le, t, a, c]
312
- ), kt = n.useCallback(
313
- (o) => {
314
- if (ce) {
315
- const e = ce(o, t, c);
344
+ [Ie, ge, t, r, c]
345
+ ), Gt = l.useCallback(
346
+ (a) => {
347
+ if (Ee) {
348
+ const e = Ee(a, t, c);
316
349
  e && (Array.isArray(e) ? e.filter(Boolean).map(
317
- (r) => r && a[r.type](
318
- { ...r, item: i },
319
- o.dragEvent.originalEvent
350
+ (o) => o && r[o.type](
351
+ { ...o, item: i },
352
+ a.dragEvent.originalEvent
320
353
  )
321
- ) : a[e.type](
354
+ ) : r[e.type](
322
355
  { ...e, item: i },
323
- o.dragEvent.originalEvent
356
+ a.dragEvent.originalEvent
324
357
  ));
325
358
  }
326
- ne && ne.call(void 0, o);
359
+ ve && ve.call(void 0, a);
327
360
  },
328
- [ce, ne, t, c, a]
329
- ), wt = n.useCallback(
330
- (o) => {
331
- if (me) {
332
- const e = me(o, t, c);
361
+ [Ee, ve, t, c, r]
362
+ ), Wt = l.useCallback(
363
+ (a) => {
364
+ if (Ce) {
365
+ const e = Ce(a, t, c);
333
366
  e && (Array.isArray(e) ? e.filter(Boolean).map(
334
- (r) => r && a[r.type](
335
- { ...r, item: i },
336
- o.dragEvent.originalEvent
367
+ (o) => o && r[o.type](
368
+ { ...o, item: i },
369
+ a.dragEvent.originalEvent
337
370
  )
338
- ) : a[e.type](
371
+ ) : r[e.type](
339
372
  { ...e, item: i },
340
- o.dragEvent.originalEvent
373
+ a.dragEvent.originalEvent
341
374
  ));
342
375
  }
343
- se && se.call(void 0, o);
376
+ Ae && Ae.call(void 0, a);
344
377
  },
345
- [se, me, t, a, c]
346
- ), Ot = n.useCallback(
347
- (o) => {
348
- if (ye) {
349
- const e = ye(o, t, c);
378
+ [Ae, Ce, t, r, c]
379
+ ), jt = l.useCallback(
380
+ (a) => {
381
+ if (De) {
382
+ const e = De(a, t, c);
350
383
  e && (Array.isArray(e) ? e.filter(Boolean).map(
351
- (r) => r && a[r.type](
352
- { ...r, item: i },
353
- o.dragEvent.originalEvent
384
+ (o) => o && r[o.type](
385
+ { ...o, item: i },
386
+ a.dragEvent.originalEvent
354
387
  )
355
- ) : a[e.type](
388
+ ) : r[e.type](
356
389
  { ...e, item: i },
357
- o.dragEvent.originalEvent
390
+ a.dragEvent.originalEvent
358
391
  ));
359
392
  }
360
- de && de.call(void 0, o);
393
+ he && he.call(void 0, a);
361
394
  },
362
- [de, ye, t, a, c]
363
- ), zt = n.useCallback(
364
- (o) => {
365
- if (ge) {
366
- const e = ge(o, t, c);
395
+ [he, De, t, r, c]
396
+ ), Zt = l.useCallback(
397
+ (a) => {
398
+ if (Se) {
399
+ const e = Se(a, t, c);
367
400
  e && (Array.isArray(e) ? e.filter(Boolean).map(
368
- (r) => r && a[r.type](
369
- { ...r, item: i },
370
- o.dragEvent.originalEvent
401
+ (o) => o && r[o.type](
402
+ { ...o, item: i },
403
+ a.dragEvent.originalEvent
371
404
  )
372
- ) : a[e.type](
405
+ ) : r[e.type](
373
406
  { ...e, item: i },
374
- o.dragEvent.originalEvent
407
+ a.dragEvent.originalEvent
375
408
  ));
376
409
  }
377
- ue && ue.call(void 0, o);
410
+ Re && Re.call(void 0, a);
378
411
  },
379
- [ge, ue, t, a, c]
380
- ), _t = n.useCallback(
381
- (o) => {
382
- if (be) {
383
- const e = be(o, t, c);
412
+ [Se, Re, t, r, c]
413
+ ), qt = l.useCallback(
414
+ (a) => {
415
+ if (Ke) {
416
+ const e = Ke(a, t, c);
384
417
  e && (Array.isArray(e) ? e.filter(Boolean).map(
385
- (r) => r && a[r.type]({ ...r, item: i }, o)
386
- ) : a[e.type]({ ...e, item: i }, o));
418
+ (o) => o && r[o.type]({ ...o, item: i }, a)
419
+ ) : r[e.type]({ ...e, item: i }, a));
387
420
  }
388
- pe && pe.call(void 0, o);
421
+ Be && Be.call(void 0, a);
389
422
  },
390
- [be, pe, t, c, a]
391
- ), K = n.useCallback(
392
- (o) => {
393
- if (we) {
394
- const e = we(o, t, c);
423
+ [Ke, Be, t, c, r]
424
+ ), X = l.useCallback(
425
+ (a) => {
426
+ if (Te) {
427
+ const e = Te(a, t, c);
395
428
  e && (Array.isArray(e) ? e.filter(Boolean).map(
396
- (r) => r && a[r.type]({ ...r, item: i }, o)
397
- ) : a[e.type]({ ...e, item: i }, o));
429
+ (o) => o && r[o.type]({ ...o, item: i }, a)
430
+ ) : r[e.type]({ ...e, item: i }, a));
398
431
  }
399
- ke && ke.call(void 0, o);
432
+ Me && Me.call(void 0, a);
400
433
  },
401
- [we, ke, t, c, a]
402
- ), xt = n.useCallback(
403
- (o) => {
404
- if (Ie) {
405
- const e = Ie(o, t, c);
434
+ [Te, Me, t, c, r]
435
+ ), Jt = l.useCallback(
436
+ (a) => {
437
+ if (ke) {
438
+ const e = ke(a, t, c);
406
439
  e && (Array.isArray(e) ? e.filter(Boolean).map(
407
- (r) => r && a[r.type]({ ...r, item: i }, o)
408
- ) : a[e.type]({ ...e, item: i }, o));
440
+ (o) => o && r[o.type]({ ...o, item: i }, a)
441
+ ) : r[e.type]({ ...e, item: i }, a));
409
442
  }
410
- fe && fe.call(void 0, o);
443
+ pe && pe.call(void 0, a);
411
444
  },
412
- [Ie, fe, t, c, a]
413
- ), Bt = n.useCallback(
414
- (o) => {
415
- if (Ee) {
416
- const e = Ee(o, t, c);
445
+ [ke, pe, t, c, r]
446
+ ), Qt = l.useCallback(
447
+ (a) => {
448
+ if (be) {
449
+ const e = be(a, t, c);
417
450
  e && (Array.isArray(e) ? e.filter(Boolean).map(
418
- (r) => r && a[r.type]({ ...r, item: i }, o)
419
- ) : a[e.type]({ ...e, item: i }, o));
451
+ (o) => o && r[o.type]({ ...o, item: i }, a)
452
+ ) : r[e.type]({ ...e, item: i }, a));
420
453
  }
421
- Ae && Ae.call(void 0, o);
454
+ we && we.call(void 0, a);
422
455
  },
423
- [Ee, Ae, t, c, a]
424
- ), Ft = n.useCallback(
425
- (o) => {
426
- if (Ce) {
427
- const e = Ce(o, t, c);
456
+ [be, we, t, c, r]
457
+ ), $t = l.useCallback(
458
+ (a) => {
459
+ if (L && a.syntheticEvent.keyCode === M.enter) {
460
+ a.syntheticEvent.preventDefault(), N.current = i.current && i.current.element, p(t.dataItem), P && P.call(void 0, a);
461
+ return;
462
+ }
463
+ if (Oe) {
464
+ const e = Oe(a, t, c);
428
465
  e && (Array.isArray(e) ? e.filter(Boolean).map(
429
- (r) => r && a[r.type](
430
- { ...r, item: i },
431
- o.syntheticEvent
466
+ (o) => o && r[o.type](
467
+ { ...o, item: i },
468
+ a.syntheticEvent
432
469
  )
433
- ) : a[e.type]({ ...e, item: i }, o.syntheticEvent));
470
+ ) : r[e.type]({ ...e, item: i }, a.syntheticEvent));
434
471
  }
435
- he && he.call(void 0, o);
472
+ P && P.call(void 0, a);
436
473
  },
437
- [Ce, he, t, c, a]
438
- ), Mt = n.useCallback(
439
- (o) => {
440
- if (Re) {
441
- const e = Re(o, t, c);
474
+ [Oe, P, t, c, r, L]
475
+ ), ea = l.useCallback(
476
+ (a) => {
477
+ if (_e) {
478
+ const e = _e(a, t, c);
442
479
  e && (Array.isArray(e) ? e.filter(Boolean).map(
443
- (r) => r && a[r.type](
444
- { ...r, item: i },
445
- o.syntheticEvent
480
+ (o) => o && r[o.type](
481
+ { ...o, item: i },
482
+ a.syntheticEvent
446
483
  )
447
- ) : a[e.type]({ ...e, item: i }, o.syntheticEvent));
484
+ ) : r[e.type]({ ...e, item: i }, a.syntheticEvent));
448
485
  }
449
- De && De.call(void 0, o);
486
+ ze && ze.call(void 0, a);
450
487
  },
451
- [Re, De, t, c, a]
452
- ), Kt = n.useCallback(
453
- (o) => {
454
- D({ type: C.set, payload: o.value || E }), f({ type: g.open });
488
+ [_e, ze, t, c, r]
489
+ ), ta = l.useCallback(
490
+ (a) => {
491
+ f({ type: E.set, payload: a.value || R }), u({ type: g.open });
455
492
  },
456
- [D, f, E]
457
- ), Tt = n.useCallback(
458
- (o) => {
459
- if (Se) {
460
- const e = Se(o, t, c);
493
+ [f, u, R]
494
+ ), aa = l.useCallback(
495
+ (a) => {
496
+ if (Fe) {
497
+ const e = Fe(a, t, c);
461
498
  e && (Array.isArray(e) ? e.filter(Boolean).map(
462
- (r) => r && a[r.type](
463
- { ...r, item: i },
464
- o.syntheticEvent
499
+ (o) => o && r[o.type](
500
+ { ...o, item: i },
501
+ a.syntheticEvent
465
502
  )
466
- ) : a[e.type]({ ...e, item: i }, o.syntheticEvent));
503
+ ) : r[e.type]({ ...e, item: i }, a.syntheticEvent));
467
504
  }
468
- ve && ve.call(void 0, o);
505
+ xe && xe.call(void 0, a);
469
506
  },
470
- [Se, ve, t, c, a]
471
- ), Te = n.useCallback(
472
- (o) => {
473
- E ? (D({ type: C.reset }), f({ type: g.close })) : K(o);
507
+ [Fe, xe, t, c, r]
508
+ ), Je = l.useCallback(
509
+ (a) => {
510
+ R ? (f({ type: E.reset }), u({ type: g.close })) : X(a);
474
511
  },
475
- [E, D, f, K]
476
- );
477
- return n.useEffect(() => {
478
- const o = ze.length && ze[0].current === i.current;
479
- it(
480
- t.tabIndex !== void 0 ? t.tabIndex === null ? void 0 : t.tabIndex : P.length === 0 && o ? 0 : void 0
512
+ [R, f, u, X]
513
+ ), oa = l.useCallback(() => {
514
+ p(null), N.current && N.current.focus({ preventScroll: !0 });
515
+ }, []), la = l.useCallback(() => {
516
+ D && w && w(D.action, D.event), j(null);
517
+ }, [D, w]), ra = l.useCallback(() => {
518
+ D && w && w(
519
+ { ...D.action, resetExceptions: !0 },
520
+ D.event
521
+ ), j(null);
522
+ }, [D, w]), na = l.useCallback(() => {
523
+ const a = D;
524
+ j(null), a && a.fromForm && !Array.isArray(a.action.dataItem) && v({ type: I.set, payload: a.action.dataItem });
525
+ }, [D, v]), ia = l.useCallback(() => {
526
+ p(null), v({ type: I.set, payload: t.dataItem });
527
+ }, [v, t.dataItem]), ca = l.useCallback(() => {
528
+ p(null), A({ type: h.set, payload: !1 }), v({ type: I.set, payload: t.dataItem });
529
+ }, [A, v, t.dataItem]), sa = l.useCallback(() => {
530
+ p(null), A({ type: h.set, payload: !0 }), v({ type: I.setMaster, payload: t.dataItem });
531
+ }, [A, v, t.dataItem]), ma = l.useCallback(() => {
532
+ p(null), f({ type: E.set, payload: t.dataItem }), u({ type: g.open });
533
+ }, [f, u, t.dataItem]), da = l.useCallback(() => {
534
+ p(null), A({ type: h.set, payload: !1 }), f({ type: E.set, payload: t.dataItem }), u({ type: g.open });
535
+ }, [A, f, u, t.dataItem]), ua = l.useCallback(() => {
536
+ p(null), A({ type: h.set, payload: !0 }), f({ type: E.set, payload: t.dataItem }), u({ type: g.open });
537
+ }, [A, f, u, t.dataItem]);
538
+ return l.useEffect(() => {
539
+ const a = Ne.length && Ne[0].current === i.current;
540
+ St(
541
+ t.tabIndex !== void 0 ? t.tabIndex === null ? void 0 : t.tabIndex : W.length === 0 && a ? 0 : void 0
481
542
  );
482
- }, [ze, t.tabIndex, P.length]), /* @__PURE__ */ n.createElement(
483
- Lt,
543
+ }, [Ne, t.tabIndex, W.length]), /* @__PURE__ */ l.createElement(
544
+ Da,
484
545
  {
485
546
  props: t,
486
- form: [E, dt, z],
487
- drag: [R, yt, h],
488
- resize: [v, ut, u],
489
- remove: [k, gt, D],
490
- showRemoveDialog: [V, ft, f],
491
- showOccurrenceDialog: [F, It, w]
547
+ form: [R, zt, v],
548
+ drag: [b, _t, k],
549
+ resize: [z, xt, C],
550
+ remove: [F, Ft, f],
551
+ showRemoveDialog: [q, Bt, u],
552
+ showOccurrenceDialog: [V, Kt, B]
492
553
  },
493
- /* @__PURE__ */ n.createElement(
494
- Oe,
554
+ /* @__PURE__ */ l.createElement(
555
+ Pe,
495
556
  {
496
557
  ...t,
497
558
  _ref: i,
498
559
  itemRef: i,
499
- selected: xe,
500
- tabIndex: lt,
501
- id: nt,
502
- onKeyDown: Ft,
503
- onKeyUp: Mt,
504
- onFocus: At,
505
- onMouseUp: ht,
506
- onMouseDown: Et,
507
- onClick: Dt,
508
- onDoubleClick: Rt,
509
- onRemoveClick: vt,
510
- onPress: St,
511
- onDrag: pt,
512
- onRelease: bt,
513
- onResizePress: kt,
514
- onResizeEndDrag: Ot,
515
- onResizeStartDrag: wt,
516
- onResizeRelease: zt
560
+ selected: Ve,
561
+ dragSource: !!b && O.drag,
562
+ tabIndex: Rt,
563
+ id: pt,
564
+ onKeyDown: $t,
565
+ onKeyUp: ea,
566
+ onFocus: Mt,
567
+ onMouseUp: Pt,
568
+ onMouseDown: Tt,
569
+ onClick: Ut,
570
+ onDoubleClick: Vt,
571
+ onRemoveClick: Ht,
572
+ onPress: Xt,
573
+ onDrag: Yt,
574
+ onRelease: Lt,
575
+ onResizePress: Gt,
576
+ onResizeEndDrag: jt,
577
+ onResizeStartDrag: Wt,
578
+ onResizeRelease: Zt
517
579
  }
518
580
  ),
519
- R && x.drag && (Array.isArray(R) ? R.map((o, e) => /* @__PURE__ */ n.createElement(
520
- Me,
581
+ b && O.drag && (Array.isArray(b) ? b.map((a, e) => /* @__PURE__ */ l.createElement(
582
+ Ye,
521
583
  {
522
584
  key: e,
523
- ignoreIsAllDay: N,
524
- dataItem: o,
585
+ ignoreIsAllDay: Y,
586
+ dataItem: a,
525
587
  vertical: t.vertical,
526
- viewItem: Oe,
588
+ viewItem: Pe,
527
589
  item: t.item
528
590
  }
529
- )) : /* @__PURE__ */ n.createElement(
530
- Me,
591
+ )) : /* @__PURE__ */ l.createElement(
592
+ Ye,
531
593
  {
532
- ignoreIsAllDay: N,
533
- dataItem: R,
594
+ ignoreIsAllDay: Y,
595
+ dataItem: b,
534
596
  vertical: t.vertical,
535
- viewItem: Oe,
597
+ viewItem: Pe,
536
598
  item: t.item
537
599
  }
538
600
  )),
539
- v && x.resize && (Array.isArray(v) ? v.map((o, e) => /* @__PURE__ */ n.createElement(
540
- Ke,
601
+ z && O.resize && (Array.isArray(z) ? z.map((a, e) => /* @__PURE__ */ l.createElement(
602
+ Le,
541
603
  {
542
604
  key: e,
543
605
  format: t.format,
544
- ignoreIsAllDay: N,
545
- dataItem: o,
606
+ ignoreIsAllDay: Y,
607
+ dataItem: a,
546
608
  viewItem: t.viewItem,
547
609
  item: t.item,
548
610
  vertical: t.vertical
549
611
  }
550
- )) : /* @__PURE__ */ n.createElement(
551
- Ke,
612
+ )) : /* @__PURE__ */ l.createElement(
613
+ Le,
552
614
  {
553
615
  format: t.format,
554
- ignoreIsAllDay: N,
555
- dataItem: v,
616
+ ignoreIsAllDay: Y,
617
+ dataItem: z,
556
618
  viewItem: t.viewItem,
557
619
  item: t.item,
558
620
  vertical: t.vertical
559
621
  }
560
622
  )),
561
- E && !F && x.edit && /* @__PURE__ */ n.createElement(
562
- ct,
623
+ R && !V && O.edit && /* @__PURE__ */ l.createElement(
624
+ kt,
625
+ {
626
+ dataItem: R,
627
+ onSubmit: qt,
628
+ onClose: X,
629
+ onCancel: X,
630
+ onDelete: O.remove ? ta : void 0
631
+ }
632
+ ),
633
+ V && /* @__PURE__ */ l.createElement(
634
+ wt,
635
+ {
636
+ dataItem: R || b || z || F,
637
+ isRemove: F !== null,
638
+ onClose: X,
639
+ onOccurrenceClick: Jt,
640
+ onSeriesClick: Qt
641
+ }
642
+ ),
643
+ D && /* @__PURE__ */ l.createElement(
644
+ Ta,
563
645
  {
564
- dataItem: E,
565
- onSubmit: _t,
566
- onClose: K,
567
- onCancel: K,
568
- onDelete: x.remove ? Kt : void 0
646
+ onKeep: la,
647
+ onReset: ra,
648
+ onCancel: na
569
649
  }
570
650
  ),
571
- F && /* @__PURE__ */ n.createElement(
572
- st,
651
+ q && F && O.remove && /* @__PURE__ */ l.createElement(
652
+ bt,
573
653
  {
574
- dataItem: E || R || v || k,
575
- isRemove: k !== null,
576
- onClose: K,
577
- onOccurrenceClick: xt,
578
- onSeriesClick: Bt
654
+ dataItem: F,
655
+ isSeries: U === !0,
656
+ onClose: Je,
657
+ onCancel: Je,
658
+ onConfirm: aa
579
659
  }
580
660
  ),
581
- V && k && x.remove && /* @__PURE__ */ n.createElement(
582
- mt,
661
+ je && /* @__PURE__ */ l.createElement(
662
+ Ka,
583
663
  {
584
- dataItem: k,
585
- isSeries: B === !0,
586
- onClose: Te,
587
- onCancel: Te,
588
- onConfirm: Tt
664
+ show: !0,
665
+ anchor: N.current,
666
+ dataItem: je,
667
+ fields: T,
668
+ position: We.position,
669
+ collision: We.collision,
670
+ isRecurring: !!t.isRecurring,
671
+ canEdit: O.edit && !t.readonly,
672
+ canRemove: O.remove && !t.readonly,
673
+ onEdit: ia,
674
+ onEditOccurrence: ca,
675
+ onEditSeries: sa,
676
+ onDelete: ma,
677
+ onDeleteOccurrence: da,
678
+ onDeleteSeries: ua,
679
+ onClose: oa
589
680
  }
590
681
  )
591
682
  );
592
683
  }
593
- ), O = {
594
- viewItem: Ht,
595
- drag: Xt,
596
- resize: Yt,
597
- form: Pt,
598
- occurrenceDialog: Nt,
599
- removeDialog: Ut,
600
- onClickAction: (t, l, s) => [
684
+ ), K = {
685
+ viewItem: ha,
686
+ drag: Aa,
687
+ resize: Ca,
688
+ form: Ia,
689
+ occurrenceDialog: ga,
690
+ removeDialog: va,
691
+ onClickAction: (t, n, s) => [
601
692
  {
602
- type: t.syntheticEvent.metaKey || t.syntheticEvent.ctrlKey ? s.selected && !s.dragItem && !s.resizeItem ? A.remove : A.add : A.select
693
+ type: t.syntheticEvent.metaKey || t.syntheticEvent.ctrlKey ? s.selected && !s.dragItem && !s.resizeItem ? S.remove : S.add : S.select
603
694
  }
604
695
  ],
605
- onDoubleClickAction: (t, l) => l.editable ? [
606
- { type: I.set, payload: l.dataItem },
607
- l.isRecurring && { type: d.open }
696
+ onDoubleClickAction: (t, n) => n.editable ? [
697
+ { type: I.set, payload: n.dataItem },
698
+ n.isRecurring && { type: d.open }
608
699
  ].filter(Boolean) : [],
609
- onRemoveClickAction: (t, l) => l.editable ? [
610
- { type: C.set, payload: l.dataItem },
611
- l.isRecurring ? { type: d.open } : { type: g.open }
700
+ onRemoveClickAction: (t, n) => n.editable ? [
701
+ { type: E.set, payload: n.dataItem },
702
+ n.isRecurring ? { type: d.open } : { type: g.open }
612
703
  ] : [],
613
- onPressAction: (t, l) => Be(l.editable) ? { type: y.start, payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY } } : [],
614
- onDragAction: (t, l) => Be(l.editable) ? {
704
+ onPressAction: (t, n) => He(n.editable) ? { type: y.start, payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY } } : [],
705
+ onDragAction: (t, n) => He(n.editable) ? {
615
706
  type: t.dragEvent.originalEvent.metaKey || t.dragEvent.originalEvent.ctrlKey ? y.dragSelected : y.drag,
616
707
  payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY }
617
708
  } : [],
618
- onReleaseAction: (t, l, s) => Be(l.editable) && s.dragItem ? l.isRecurring && !l.isException && s.series === null ? { type: d.open } : {
619
- type: l.isRecurring ? s.series ? y.completeSeries : y.completeOccurrence : y.complete,
709
+ onReleaseAction: (t, n, s) => He(n.editable) && s.dragItem ? n.isRecurring && !n.isException && s.series === null ? { type: d.open } : {
710
+ type: n.isRecurring ? s.series ? y.completeSeries : y.completeOccurrence : y.complete,
620
711
  payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY }
621
712
  } : [],
622
- onResizePressAction: (t, l) => l.editable ? { type: m.start, payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY } } : [],
623
- onResizeStartDragAction: (t, l) => l.editable ? {
713
+ onResizePressAction: (t, n) => n.editable ? { type: m.start, payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY } } : [],
714
+ onResizeStartDragAction: (t, n) => n.editable ? {
624
715
  type: t.dragEvent.originalEvent.metaKey || t.dragEvent.originalEvent.ctrlKey ? m.startDragSelected : m.startDrag,
625
716
  payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY }
626
717
  } : [],
627
- onResizeEndDragAction: (t, l) => l.editable ? {
718
+ onResizeEndDragAction: (t, n) => n.editable ? {
628
719
  type: t.dragEvent.originalEvent.metaKey || t.dragEvent.originalEvent.ctrlKey ? m.endDragSelected : m.endDrag,
629
720
  payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY }
630
721
  } : [],
631
- onResizeReleaseAction: (t, l, s) => l.editable && s.resizeItem ? l.isRecurring && !l.isException && s.series === null ? { type: d.open } : {
632
- type: l.isRecurring ? s.series ? m.completeSeries : m.completeOccurrence : m.complete,
722
+ onResizeReleaseAction: (t, n, s) => n.editable && s.resizeItem ? n.isRecurring && !n.isException && s.series === null ? { type: d.open } : {
723
+ type: n.isRecurring ? s.series ? m.completeSeries : m.completeOccurrence : m.complete,
633
724
  payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY }
634
725
  } : [],
635
- onOccurrenceClickAction: (t, l, s) => s.dragItem ? [{ type: y.completeOccurrence }, { type: d.close }] : s.resizeItem ? [{ type: m.completeOccurrence }, { type: d.close }] : s.formItem ? [
636
- { type: S.set, payload: !1 },
637
- { type: I.set, payload: l.dataItem },
726
+ onOccurrenceClickAction: (t, n, s) => s.dragItem ? [{ type: y.completeOccurrence }, { type: d.close }] : s.resizeItem ? [{ type: m.completeOccurrence }, { type: d.close }] : s.formItem ? [
727
+ { type: h.set, payload: !1 },
728
+ { type: I.set, payload: n.dataItem },
638
729
  { type: d.close }
639
730
  ] : s.removeItem ? [
640
- { type: S.set, payload: !1 },
641
- { type: C.set, payload: l.dataItem },
731
+ { type: h.set, payload: !1 },
732
+ { type: E.set, payload: n.dataItem },
642
733
  { type: g.open },
643
734
  { type: d.close }
644
735
  ] : [],
645
- onSeriesClickAction: (t, l, s) => s.dragItem ? [{ type: y.completeSeries }, { type: d.close }] : s.resizeItem ? [{ type: m.completeSeries }, { type: d.close }] : s.formItem ? [
646
- { type: S.set, payload: !0 },
647
- { type: I.setMaster, payload: l.dataItem },
736
+ onSeriesClickAction: (t, n, s) => s.dragItem ? [{ type: y.completeSeries }, { type: d.close }] : s.resizeItem ? [{ type: m.completeSeries }, { type: d.close }] : s.formItem ? [
737
+ { type: h.set, payload: !0 },
738
+ { type: I.setMaster, payload: n.dataItem },
648
739
  { type: d.close }
649
740
  ] : s.removeItem ? [
650
- { type: S.set, payload: !0 },
651
- { type: C.set, payload: l.dataItem },
741
+ { type: h.set, payload: !0 },
742
+ { type: E.set, payload: n.dataItem },
652
743
  { type: g.open },
653
744
  { type: d.close }
654
745
  ] : [],
655
- onKeyDownAction: (t, l) => {
746
+ onKeyDownAction: (t, n) => {
656
747
  switch (t.syntheticEvent.keyCode) {
657
- case _.enter:
658
- return l.editable && !l.readonly ? [
659
- { type: I.set, payload: l.dataItem },
660
- l.isRecurring && { type: d.open }
748
+ case M.enter:
749
+ return n.editable && !n.readonly ? [
750
+ { type: I.set, payload: n.dataItem },
751
+ n.isRecurring && { type: d.open }
661
752
  ] : [];
662
- case _.tab:
753
+ case M.tab:
663
754
  return [
664
755
  {
665
- type: t.syntheticEvent.shiftKey ? X.prev : X.next,
666
- ignoreIsAllDay: l.ignoreIsAllDay
756
+ type: t.syntheticEvent.shiftKey ? Q.prev : Q.next,
757
+ ignoreIsAllDay: n.ignoreIsAllDay
667
758
  },
668
759
  {
669
- type: t.syntheticEvent.shiftKey ? A.selectPrev : A.selectNext,
670
- ignoreIsAllDay: l.ignoreIsAllDay
760
+ type: t.syntheticEvent.shiftKey ? S.selectPrev : S.selectNext,
761
+ ignoreIsAllDay: n.ignoreIsAllDay
671
762
  }
672
763
  ];
673
- case _.up:
764
+ case M.up:
674
765
  return [
675
- !!(l.slots.length && l.slots[0]._ref.current) && {
676
- type: p.up,
677
- slot: l.slots[0]._ref
766
+ !!(n.slots.length && n.slots[0]._ref.current) && {
767
+ type: _.up,
768
+ slot: n.slots[0]._ref
678
769
  }
679
770
  ];
680
- case _.right:
771
+ case M.right:
681
772
  return [
682
- !!(l.slots.length && l.slots[0]._ref.current) && {
683
- type: p.right,
684
- slot: l.slots[0]._ref
773
+ !!(n.slots.length && n.slots[0]._ref.current) && {
774
+ type: _.right,
775
+ slot: n.slots[0]._ref
685
776
  }
686
777
  ];
687
- case _.down:
778
+ case M.down:
688
779
  return [
689
- !!(l.slots.length && l.slots[l.slots.length - 1]._ref.current) && {
690
- type: p.down,
691
- slot: l.slots[l.slots.length - 1]._ref
780
+ !!(n.slots.length && n.slots[n.slots.length - 1]._ref.current) && {
781
+ type: _.down,
782
+ slot: n.slots[n.slots.length - 1]._ref
692
783
  }
693
784
  ];
694
- case _.left:
785
+ case M.left:
695
786
  return [
696
- !!(l.slots.length && l.slots[0]._ref.current) && {
697
- type: p.left,
698
- slot: l.slots[0]._ref
787
+ !!(n.slots.length && n.slots[0]._ref.current) && {
788
+ type: _.left,
789
+ slot: n.slots[0]._ref
699
790
  }
700
791
  ];
701
792
  default:
@@ -706,14 +797,14 @@ const Be = (t) => t === !0 || typeof t == "object" && t !== null && t.drag === !
706
797
  { type: I.complete, payload: t.value }
707
798
  ],
708
799
  onRemoveConfirmAction: () => [
709
- { type: C.complete },
800
+ { type: E.complete },
710
801
  { type: I.reset },
711
802
  { type: g.close },
712
803
  { type: d.close }
713
804
  ],
714
805
  onCancelAction: () => [
715
- { type: S.reset },
716
- { type: C.reset },
806
+ { type: h.reset },
807
+ { type: E.reset },
717
808
  { type: I.reset },
718
809
  { type: y.reset },
719
810
  { type: m.reset },
@@ -721,8 +812,8 @@ const Be = (t) => t === !0 || typeof t == "object" && t !== null && t.drag === !
721
812
  { type: d.reset }
722
813
  ]
723
814
  };
724
- lo.displayName = "KendoReactSchedulerEditItem";
815
+ Xa.displayName = "KendoReactSchedulerEditItem";
725
816
  export {
726
- lo as SchedulerEditItem,
727
- O as schedulerEditItemDefaultProps
817
+ Xa as SchedulerEditItem,
818
+ K as schedulerEditItemDefaultProps
728
819
  };