@progress/kendo-react-scheduler 16.1.0-develop.17 → 16.1.0-develop.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constants/index.d.ts +2 -0
- package/constants/index.js +1 -1
- package/constants/index.mjs +6 -5
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/hooks/index.d.ts +1 -1
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +42 -54
- package/items/SchedulerEditItem.js +1 -1
- package/items/SchedulerEditItem.mjs +206 -206
- package/items/SchedulerProportionalViewItem.js +1 -1
- package/items/SchedulerProportionalViewItem.mjs +37 -37
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +17 -17
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/views/agenda/AgendaView.js +1 -1
- package/views/agenda/AgendaView.mjs +2 -2
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +149 -109
- package/hooks/useGroupRowHeightSync.js +0 -8
- package/hooks/useGroupRowHeightSync.mjs +0 -84
|
@@ -6,61 +6,61 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as n from "react";
|
|
9
|
-
import { SchedulerOccurrenceDialog as
|
|
10
|
-
import { SchedulerForm as
|
|
11
|
-
import { SchedulerRemoveDialog as
|
|
12
|
-
import { useId as
|
|
13
|
-
import { SchedulerDrag as
|
|
14
|
-
import { SchedulerResize as
|
|
15
|
-
import { SchedulerViewItem as
|
|
16
|
-
import { SchedulerEditItemContext as
|
|
17
|
-
import { FORM_ITEM_ACTION as I, useFormItem as
|
|
18
|
-
import { SHOW_OCCURRENCE_DIALOG_ACTION as d, useShowOccurrenceDialog as
|
|
19
|
-
import { REMOVE_ITEM_ACTION as C, useRemoveItem as
|
|
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
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
|
|
22
|
-
import { RESIZE_ITEM_ACTION as m, useResizeItem as
|
|
23
|
-
import { SERIES_ACTION as S, useSeries as
|
|
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
24
|
import { ITEMS_SELECT_ACTION as A } from "../hooks/use-items-selection.mjs";
|
|
25
|
-
import { useEditable as
|
|
26
|
-
import { useSchedulerViewSelectedItemsContext as
|
|
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
27
|
import { SLOTS_FOCUS_ACTION as p } from "../hooks/use-slots-focus.mjs";
|
|
28
28
|
import { ITEMS_FOCUS_ACTION as X } from "../hooks/use-items-focus.mjs";
|
|
29
29
|
import { SchedulerItemSelectionContext as ao } from "../context/SchedulerContext.mjs";
|
|
30
|
-
const
|
|
30
|
+
const Be = (t) => t === !0 || typeof t == "object" && t !== null && t.drag === !0, lo = n.forwardRef(
|
|
31
31
|
(t, l) => {
|
|
32
32
|
const {
|
|
33
33
|
_ref: s,
|
|
34
|
-
itemRef:
|
|
34
|
+
itemRef: Ne,
|
|
35
35
|
onDataAction: T,
|
|
36
36
|
ignoreIsAllDay: N,
|
|
37
|
-
viewItem:
|
|
38
|
-
series:
|
|
39
|
-
onSeriesChange:
|
|
40
|
-
form:
|
|
41
|
-
formItem:
|
|
42
|
-
onFormItemChange:
|
|
43
|
-
drag:
|
|
44
|
-
dragItem:
|
|
45
|
-
onDragItemChange:
|
|
46
|
-
resize:
|
|
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
47
|
resizeItem: Ze,
|
|
48
|
-
onResizeItemChange:
|
|
49
|
-
removeDialog:
|
|
50
|
-
removeItem:
|
|
51
|
-
onRemoveItemChange:
|
|
52
|
-
occurrenceDialog:
|
|
53
|
-
showOccurrenceDialog:
|
|
54
|
-
onShowOccurrenceDialogChange:
|
|
55
|
-
showRemoveDialog:
|
|
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
56
|
onShowRemoveDialogChange: at,
|
|
57
57
|
onFocus: Y,
|
|
58
58
|
onFocusAction: H,
|
|
59
59
|
onMouseDown: L,
|
|
60
60
|
onMouseDownAction: G,
|
|
61
61
|
onMouseUp: W,
|
|
62
|
-
onMouseUpAction:
|
|
63
|
-
onClick:
|
|
62
|
+
onMouseUpAction: j,
|
|
63
|
+
onClick: Z,
|
|
64
64
|
onClickAction: q,
|
|
65
65
|
onDoubleClick: J,
|
|
66
66
|
onDoubleClickAction: Q,
|
|
@@ -68,8 +68,8 @@ const ro = n.forwardRef(
|
|
|
68
68
|
onRemoveClickAction: ee,
|
|
69
69
|
onPress: te,
|
|
70
70
|
onPressAction: oe,
|
|
71
|
-
onDrag:
|
|
72
|
-
onDragAction:
|
|
71
|
+
onDrag: re,
|
|
72
|
+
onDragAction: ae,
|
|
73
73
|
onRelease: le,
|
|
74
74
|
onReleaseAction: ie,
|
|
75
75
|
onResizePress: ne,
|
|
@@ -94,31 +94,31 @@ const ro = n.forwardRef(
|
|
|
94
94
|
onFormSubmitAction: be,
|
|
95
95
|
onCancel: ke,
|
|
96
96
|
onCancelAction: we
|
|
97
|
-
} = { ...O, ...t }, [
|
|
98
|
-
n.useImperativeHandle(
|
|
99
|
-
const Oe =
|
|
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
100
|
null,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
]), [R,
|
|
101
|
+
Ye,
|
|
102
|
+
He
|
|
103
|
+
]), [R, yt, h] = qt(
|
|
104
104
|
{ dataItem: t.dataItem, ignoreIsAllDay: t.ignoreIsAllDay, isAllDay: t.isAllDay, onDataAction: T },
|
|
105
|
-
[null,
|
|
106
|
-
), [v,
|
|
105
|
+
[null, Ge, We]
|
|
106
|
+
), [v, ut, u] = Jt(
|
|
107
107
|
{ dataItem: t.dataItem, onDataAction: T },
|
|
108
|
-
[null, Ze,
|
|
109
|
-
), [k,
|
|
108
|
+
[null, Ze, qe]
|
|
109
|
+
), [k, gt, D] = jt({ series: B, onDataAction: T }, [
|
|
110
110
|
null,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
]), [V,
|
|
111
|
+
Qe,
|
|
112
|
+
$e
|
|
113
|
+
]), [V, ft, f] = Zt(
|
|
114
114
|
!1,
|
|
115
|
-
|
|
115
|
+
rt,
|
|
116
116
|
at
|
|
117
|
-
), [F,
|
|
117
|
+
), [F, It, w] = Wt(
|
|
118
118
|
!1,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
), [ze] =
|
|
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(
|
|
122
122
|
() => ({
|
|
123
123
|
selected: xe,
|
|
124
124
|
series: B,
|
|
@@ -130,7 +130,7 @@ const ro = n.forwardRef(
|
|
|
130
130
|
showOccurrenceDialog: F
|
|
131
131
|
}),
|
|
132
132
|
[R, E, k, v, xe, B, F, V]
|
|
133
|
-
),
|
|
133
|
+
), a = n.useMemo(
|
|
134
134
|
() => ({
|
|
135
135
|
[S.set]: U,
|
|
136
136
|
[S.toggle]: U,
|
|
@@ -197,278 +197,278 @@ const ro = n.forwardRef(
|
|
|
197
197
|
_e,
|
|
198
198
|
M
|
|
199
199
|
]
|
|
200
|
-
),
|
|
200
|
+
), At = n.useCallback(
|
|
201
201
|
(o) => {
|
|
202
202
|
if (H) {
|
|
203
203
|
const e = H(o, t, c);
|
|
204
204
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
205
|
-
(
|
|
206
|
-
) :
|
|
205
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
206
|
+
) : a[e.type]({ ...e, item: i }));
|
|
207
207
|
}
|
|
208
208
|
Y && Y.call(void 0, o);
|
|
209
209
|
},
|
|
210
|
-
[
|
|
211
|
-
),
|
|
210
|
+
[a, Y, H, t, c]
|
|
211
|
+
), Et = n.useCallback(
|
|
212
212
|
(o) => {
|
|
213
213
|
if (G) {
|
|
214
214
|
const e = G(o, t, c);
|
|
215
215
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
216
|
-
(
|
|
217
|
-
) :
|
|
216
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
217
|
+
) : a[e.type]({ ...e, item: i }));
|
|
218
218
|
}
|
|
219
219
|
L && L.call(void 0, o);
|
|
220
220
|
},
|
|
221
|
-
[
|
|
222
|
-
),
|
|
221
|
+
[a, L, G, t, c]
|
|
222
|
+
), ht = n.useCallback(
|
|
223
223
|
(o) => {
|
|
224
|
-
if (
|
|
225
|
-
const e =
|
|
224
|
+
if (j) {
|
|
225
|
+
const e = j(o, t, c);
|
|
226
226
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
227
|
-
(
|
|
228
|
-
) :
|
|
227
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
228
|
+
) : a[e.type]({ ...e, item: i }));
|
|
229
229
|
}
|
|
230
230
|
W && W.call(void 0, o);
|
|
231
231
|
},
|
|
232
|
-
[
|
|
233
|
-
), [,
|
|
232
|
+
[a, W, j, t, c]
|
|
233
|
+
), [, Ct] = n.useContext(ao), Dt = n.useCallback(
|
|
234
234
|
(o) => {
|
|
235
235
|
if (q) {
|
|
236
|
-
|
|
236
|
+
Ct(i.current);
|
|
237
237
|
const e = q(o, t, c);
|
|
238
238
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
239
|
-
(
|
|
240
|
-
) :
|
|
239
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
240
|
+
) : a[e.type]({ ...e, item: i }));
|
|
241
241
|
}
|
|
242
|
-
|
|
242
|
+
Z && Z.call(void 0, o);
|
|
243
243
|
},
|
|
244
|
-
[
|
|
245
|
-
),
|
|
244
|
+
[a, Z, q, t, c]
|
|
245
|
+
), Rt = n.useCallback(
|
|
246
246
|
(o) => {
|
|
247
247
|
if (Q) {
|
|
248
248
|
const e = Q(o, t, c);
|
|
249
249
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
250
|
-
(
|
|
251
|
-
) :
|
|
250
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
251
|
+
) : a[e.type]({ ...e, item: i }));
|
|
252
252
|
}
|
|
253
253
|
J && J.call(void 0, o);
|
|
254
254
|
},
|
|
255
|
-
[Q, J, t,
|
|
256
|
-
),
|
|
255
|
+
[Q, J, t, a, c]
|
|
256
|
+
), vt = n.useCallback(
|
|
257
257
|
(o) => {
|
|
258
258
|
if (ee) {
|
|
259
259
|
const e = ee(o, t, c);
|
|
260
260
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
261
|
-
(
|
|
262
|
-
) :
|
|
261
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
262
|
+
) : a[e.type]({ ...e, item: i }));
|
|
263
263
|
}
|
|
264
264
|
$ && $.call(void 0, o);
|
|
265
265
|
},
|
|
266
|
-
[ee, $, t,
|
|
267
|
-
),
|
|
266
|
+
[ee, $, t, a, c]
|
|
267
|
+
), St = n.useCallback(
|
|
268
268
|
(o) => {
|
|
269
269
|
if (oe) {
|
|
270
270
|
const e = oe(o, t, c);
|
|
271
271
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
272
|
-
(
|
|
273
|
-
) :
|
|
272
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
273
|
+
) : a[e.type]({ ...e, item: i }, o));
|
|
274
274
|
}
|
|
275
275
|
te && te.call(void 0, o);
|
|
276
276
|
},
|
|
277
|
-
[oe, te, t,
|
|
278
|
-
),
|
|
277
|
+
[oe, te, t, a, c]
|
|
278
|
+
), pt = n.useCallback(
|
|
279
279
|
(o) => {
|
|
280
|
-
if (
|
|
281
|
-
const e =
|
|
280
|
+
if (ae) {
|
|
281
|
+
const e = ae(o, t, c);
|
|
282
282
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
283
|
-
(
|
|
284
|
-
{ ...
|
|
283
|
+
(r) => r && a[r.type](
|
|
284
|
+
{ ...r, item: i },
|
|
285
285
|
o.dragEvent.originalEvent
|
|
286
286
|
)
|
|
287
|
-
) :
|
|
287
|
+
) : a[e.type](
|
|
288
288
|
{ ...e, item: i },
|
|
289
289
|
o.dragEvent.originalEvent
|
|
290
290
|
));
|
|
291
291
|
}
|
|
292
|
-
|
|
292
|
+
re && re.call(void 0, o);
|
|
293
293
|
},
|
|
294
|
-
[
|
|
295
|
-
),
|
|
294
|
+
[ae, re, t, a, c]
|
|
295
|
+
), bt = n.useCallback(
|
|
296
296
|
(o) => {
|
|
297
297
|
if (ie) {
|
|
298
298
|
const e = ie(o, t, c);
|
|
299
299
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
300
|
-
(
|
|
301
|
-
{ ...
|
|
300
|
+
(r) => r && a[r.type](
|
|
301
|
+
{ ...r, item: i },
|
|
302
302
|
o.dragEvent.originalEvent
|
|
303
303
|
)
|
|
304
|
-
) :
|
|
304
|
+
) : a[e.type](
|
|
305
305
|
{ ...e, item: i },
|
|
306
306
|
o.dragEvent.originalEvent
|
|
307
307
|
));
|
|
308
308
|
}
|
|
309
309
|
le && le.call(void 0, o);
|
|
310
310
|
},
|
|
311
|
-
[ie, le, t,
|
|
312
|
-
),
|
|
311
|
+
[ie, le, t, a, c]
|
|
312
|
+
), kt = n.useCallback(
|
|
313
313
|
(o) => {
|
|
314
314
|
if (ce) {
|
|
315
315
|
const e = ce(o, t, c);
|
|
316
316
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
317
|
-
(
|
|
318
|
-
{ ...
|
|
317
|
+
(r) => r && a[r.type](
|
|
318
|
+
{ ...r, item: i },
|
|
319
319
|
o.dragEvent.originalEvent
|
|
320
320
|
)
|
|
321
|
-
) :
|
|
321
|
+
) : a[e.type](
|
|
322
322
|
{ ...e, item: i },
|
|
323
323
|
o.dragEvent.originalEvent
|
|
324
324
|
));
|
|
325
325
|
}
|
|
326
326
|
ne && ne.call(void 0, o);
|
|
327
327
|
},
|
|
328
|
-
[ce, ne, t, c,
|
|
329
|
-
),
|
|
328
|
+
[ce, ne, t, c, a]
|
|
329
|
+
), wt = n.useCallback(
|
|
330
330
|
(o) => {
|
|
331
331
|
if (me) {
|
|
332
332
|
const e = me(o, t, c);
|
|
333
333
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
334
|
-
(
|
|
335
|
-
{ ...
|
|
334
|
+
(r) => r && a[r.type](
|
|
335
|
+
{ ...r, item: i },
|
|
336
336
|
o.dragEvent.originalEvent
|
|
337
337
|
)
|
|
338
|
-
) :
|
|
338
|
+
) : a[e.type](
|
|
339
339
|
{ ...e, item: i },
|
|
340
340
|
o.dragEvent.originalEvent
|
|
341
341
|
));
|
|
342
342
|
}
|
|
343
343
|
se && se.call(void 0, o);
|
|
344
344
|
},
|
|
345
|
-
[se, me, t,
|
|
346
|
-
),
|
|
345
|
+
[se, me, t, a, c]
|
|
346
|
+
), Ot = n.useCallback(
|
|
347
347
|
(o) => {
|
|
348
348
|
if (ye) {
|
|
349
349
|
const e = ye(o, t, c);
|
|
350
350
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
351
|
-
(
|
|
352
|
-
{ ...
|
|
351
|
+
(r) => r && a[r.type](
|
|
352
|
+
{ ...r, item: i },
|
|
353
353
|
o.dragEvent.originalEvent
|
|
354
354
|
)
|
|
355
|
-
) :
|
|
355
|
+
) : a[e.type](
|
|
356
356
|
{ ...e, item: i },
|
|
357
357
|
o.dragEvent.originalEvent
|
|
358
358
|
));
|
|
359
359
|
}
|
|
360
360
|
de && de.call(void 0, o);
|
|
361
361
|
},
|
|
362
|
-
[de, ye, t,
|
|
363
|
-
),
|
|
362
|
+
[de, ye, t, a, c]
|
|
363
|
+
), zt = n.useCallback(
|
|
364
364
|
(o) => {
|
|
365
365
|
if (ge) {
|
|
366
366
|
const e = ge(o, t, c);
|
|
367
367
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
368
|
-
(
|
|
369
|
-
{ ...
|
|
368
|
+
(r) => r && a[r.type](
|
|
369
|
+
{ ...r, item: i },
|
|
370
370
|
o.dragEvent.originalEvent
|
|
371
371
|
)
|
|
372
|
-
) :
|
|
372
|
+
) : a[e.type](
|
|
373
373
|
{ ...e, item: i },
|
|
374
374
|
o.dragEvent.originalEvent
|
|
375
375
|
));
|
|
376
376
|
}
|
|
377
377
|
ue && ue.call(void 0, o);
|
|
378
378
|
},
|
|
379
|
-
[ge, ue, t,
|
|
380
|
-
),
|
|
379
|
+
[ge, ue, t, a, c]
|
|
380
|
+
), _t = n.useCallback(
|
|
381
381
|
(o) => {
|
|
382
382
|
if (be) {
|
|
383
383
|
const e = be(o, t, c);
|
|
384
384
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
385
|
-
(
|
|
386
|
-
) :
|
|
385
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
386
|
+
) : a[e.type]({ ...e, item: i }, o));
|
|
387
387
|
}
|
|
388
388
|
pe && pe.call(void 0, o);
|
|
389
389
|
},
|
|
390
|
-
[be, pe, t, c,
|
|
390
|
+
[be, pe, t, c, a]
|
|
391
391
|
), K = n.useCallback(
|
|
392
392
|
(o) => {
|
|
393
393
|
if (we) {
|
|
394
394
|
const e = we(o, t, c);
|
|
395
395
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
396
|
-
(
|
|
397
|
-
) :
|
|
396
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
397
|
+
) : a[e.type]({ ...e, item: i }, o));
|
|
398
398
|
}
|
|
399
399
|
ke && ke.call(void 0, o);
|
|
400
400
|
},
|
|
401
|
-
[we, ke, t, c,
|
|
402
|
-
),
|
|
401
|
+
[we, ke, t, c, a]
|
|
402
|
+
), xt = n.useCallback(
|
|
403
403
|
(o) => {
|
|
404
404
|
if (Ie) {
|
|
405
405
|
const e = Ie(o, t, c);
|
|
406
406
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
407
|
-
(
|
|
408
|
-
) :
|
|
407
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
408
|
+
) : a[e.type]({ ...e, item: i }, o));
|
|
409
409
|
}
|
|
410
410
|
fe && fe.call(void 0, o);
|
|
411
411
|
},
|
|
412
|
-
[Ie, fe, t, c,
|
|
413
|
-
),
|
|
412
|
+
[Ie, fe, t, c, a]
|
|
413
|
+
), Bt = n.useCallback(
|
|
414
414
|
(o) => {
|
|
415
415
|
if (Ee) {
|
|
416
416
|
const e = Ee(o, t, c);
|
|
417
417
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
418
|
-
(
|
|
419
|
-
) :
|
|
418
|
+
(r) => r && a[r.type]({ ...r, item: i }, o)
|
|
419
|
+
) : a[e.type]({ ...e, item: i }, o));
|
|
420
420
|
}
|
|
421
421
|
Ae && Ae.call(void 0, o);
|
|
422
422
|
},
|
|
423
|
-
[Ee, Ae, t, c,
|
|
424
|
-
),
|
|
423
|
+
[Ee, Ae, t, c, a]
|
|
424
|
+
), Ft = n.useCallback(
|
|
425
425
|
(o) => {
|
|
426
426
|
if (Ce) {
|
|
427
427
|
const e = Ce(o, t, c);
|
|
428
428
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
429
|
-
(
|
|
430
|
-
{ ...
|
|
429
|
+
(r) => r && a[r.type](
|
|
430
|
+
{ ...r, item: i },
|
|
431
431
|
o.syntheticEvent
|
|
432
432
|
)
|
|
433
|
-
) :
|
|
433
|
+
) : a[e.type]({ ...e, item: i }, o.syntheticEvent));
|
|
434
434
|
}
|
|
435
435
|
he && he.call(void 0, o);
|
|
436
436
|
},
|
|
437
|
-
[Ce, he, t, c,
|
|
438
|
-
),
|
|
437
|
+
[Ce, he, t, c, a]
|
|
438
|
+
), Mt = n.useCallback(
|
|
439
439
|
(o) => {
|
|
440
440
|
if (Re) {
|
|
441
441
|
const e = Re(o, t, c);
|
|
442
442
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
443
|
-
(
|
|
444
|
-
{ ...
|
|
443
|
+
(r) => r && a[r.type](
|
|
444
|
+
{ ...r, item: i },
|
|
445
445
|
o.syntheticEvent
|
|
446
446
|
)
|
|
447
|
-
) :
|
|
447
|
+
) : a[e.type]({ ...e, item: i }, o.syntheticEvent));
|
|
448
448
|
}
|
|
449
449
|
De && De.call(void 0, o);
|
|
450
450
|
},
|
|
451
|
-
[Re, De, t, c,
|
|
452
|
-
),
|
|
451
|
+
[Re, De, t, c, a]
|
|
452
|
+
), Kt = n.useCallback(
|
|
453
453
|
(o) => {
|
|
454
454
|
D({ type: C.set, payload: o.value || E }), f({ type: g.open });
|
|
455
455
|
},
|
|
456
456
|
[D, f, E]
|
|
457
|
-
),
|
|
457
|
+
), Tt = n.useCallback(
|
|
458
458
|
(o) => {
|
|
459
459
|
if (Se) {
|
|
460
460
|
const e = Se(o, t, c);
|
|
461
461
|
e && (Array.isArray(e) ? e.filter(Boolean).map(
|
|
462
|
-
(
|
|
463
|
-
{ ...
|
|
462
|
+
(r) => r && a[r.type](
|
|
463
|
+
{ ...r, item: i },
|
|
464
464
|
o.syntheticEvent
|
|
465
465
|
)
|
|
466
|
-
) :
|
|
466
|
+
) : a[e.type]({ ...e, item: i }, o.syntheticEvent));
|
|
467
467
|
}
|
|
468
468
|
ve && ve.call(void 0, o);
|
|
469
469
|
},
|
|
470
|
-
[Se, ve, t, c,
|
|
471
|
-
),
|
|
470
|
+
[Se, ve, t, c, a]
|
|
471
|
+
), Te = n.useCallback(
|
|
472
472
|
(o) => {
|
|
473
473
|
E ? (D({ type: C.reset }), f({ type: g.close })) : K(o);
|
|
474
474
|
},
|
|
@@ -476,19 +476,19 @@ const ro = n.forwardRef(
|
|
|
476
476
|
);
|
|
477
477
|
return n.useEffect(() => {
|
|
478
478
|
const o = ze.length && ze[0].current === i.current;
|
|
479
|
-
|
|
479
|
+
it(
|
|
480
480
|
t.tabIndex !== void 0 ? t.tabIndex === null ? void 0 : t.tabIndex : P.length === 0 && o ? 0 : void 0
|
|
481
481
|
);
|
|
482
482
|
}, [ze, t.tabIndex, P.length]), /* @__PURE__ */ n.createElement(
|
|
483
|
-
|
|
483
|
+
Lt,
|
|
484
484
|
{
|
|
485
485
|
props: t,
|
|
486
|
-
form: [E,
|
|
487
|
-
drag: [R,
|
|
488
|
-
resize: [v,
|
|
489
|
-
remove: [k,
|
|
490
|
-
showRemoveDialog: [V,
|
|
491
|
-
showOccurrenceDialog: [F,
|
|
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]
|
|
492
492
|
},
|
|
493
493
|
/* @__PURE__ */ n.createElement(
|
|
494
494
|
Oe,
|
|
@@ -497,27 +497,27 @@ const ro = n.forwardRef(
|
|
|
497
497
|
_ref: i,
|
|
498
498
|
itemRef: i,
|
|
499
499
|
selected: xe,
|
|
500
|
-
tabIndex:
|
|
501
|
-
id:
|
|
502
|
-
onKeyDown:
|
|
503
|
-
onKeyUp:
|
|
504
|
-
onFocus:
|
|
505
|
-
onMouseUp:
|
|
506
|
-
onMouseDown:
|
|
507
|
-
onClick:
|
|
508
|
-
onDoubleClick:
|
|
509
|
-
onRemoveClick:
|
|
510
|
-
onPress:
|
|
511
|
-
onDrag:
|
|
512
|
-
onRelease:
|
|
513
|
-
onResizePress:
|
|
514
|
-
onResizeEndDrag:
|
|
515
|
-
onResizeStartDrag:
|
|
516
|
-
onResizeRelease:
|
|
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
|
|
517
517
|
}
|
|
518
518
|
),
|
|
519
519
|
R && x.drag && (Array.isArray(R) ? R.map((o, e) => /* @__PURE__ */ n.createElement(
|
|
520
|
-
|
|
520
|
+
Me,
|
|
521
521
|
{
|
|
522
522
|
key: e,
|
|
523
523
|
ignoreIsAllDay: N,
|
|
@@ -527,7 +527,7 @@ const ro = n.forwardRef(
|
|
|
527
527
|
item: t.item
|
|
528
528
|
}
|
|
529
529
|
)) : /* @__PURE__ */ n.createElement(
|
|
530
|
-
|
|
530
|
+
Me,
|
|
531
531
|
{
|
|
532
532
|
ignoreIsAllDay: N,
|
|
533
533
|
dataItem: R,
|
|
@@ -537,7 +537,7 @@ const ro = n.forwardRef(
|
|
|
537
537
|
}
|
|
538
538
|
)),
|
|
539
539
|
v && x.resize && (Array.isArray(v) ? v.map((o, e) => /* @__PURE__ */ n.createElement(
|
|
540
|
-
|
|
540
|
+
Ke,
|
|
541
541
|
{
|
|
542
542
|
key: e,
|
|
543
543
|
format: t.format,
|
|
@@ -548,7 +548,7 @@ const ro = n.forwardRef(
|
|
|
548
548
|
vertical: t.vertical
|
|
549
549
|
}
|
|
550
550
|
)) : /* @__PURE__ */ n.createElement(
|
|
551
|
-
|
|
551
|
+
Ke,
|
|
552
552
|
{
|
|
553
553
|
format: t.format,
|
|
554
554
|
ignoreIsAllDay: N,
|
|
@@ -559,44 +559,44 @@ const ro = n.forwardRef(
|
|
|
559
559
|
}
|
|
560
560
|
)),
|
|
561
561
|
E && !F && x.edit && /* @__PURE__ */ n.createElement(
|
|
562
|
-
|
|
562
|
+
ct,
|
|
563
563
|
{
|
|
564
564
|
dataItem: E,
|
|
565
|
-
onSubmit:
|
|
565
|
+
onSubmit: _t,
|
|
566
566
|
onClose: K,
|
|
567
567
|
onCancel: K,
|
|
568
|
-
onDelete: x.remove ?
|
|
568
|
+
onDelete: x.remove ? Kt : void 0
|
|
569
569
|
}
|
|
570
570
|
),
|
|
571
571
|
F && /* @__PURE__ */ n.createElement(
|
|
572
|
-
|
|
572
|
+
st,
|
|
573
573
|
{
|
|
574
574
|
dataItem: E || R || v || k,
|
|
575
575
|
isRemove: k !== null,
|
|
576
576
|
onClose: K,
|
|
577
|
-
onOccurrenceClick:
|
|
578
|
-
onSeriesClick:
|
|
577
|
+
onOccurrenceClick: xt,
|
|
578
|
+
onSeriesClick: Bt
|
|
579
579
|
}
|
|
580
580
|
),
|
|
581
581
|
V && k && x.remove && /* @__PURE__ */ n.createElement(
|
|
582
|
-
|
|
582
|
+
mt,
|
|
583
583
|
{
|
|
584
584
|
dataItem: k,
|
|
585
585
|
isSeries: B === !0,
|
|
586
|
-
onClose:
|
|
587
|
-
onCancel:
|
|
588
|
-
onConfirm:
|
|
586
|
+
onClose: Te,
|
|
587
|
+
onCancel: Te,
|
|
588
|
+
onConfirm: Tt
|
|
589
589
|
}
|
|
590
590
|
)
|
|
591
591
|
);
|
|
592
592
|
}
|
|
593
593
|
), O = {
|
|
594
|
-
viewItem:
|
|
595
|
-
drag:
|
|
596
|
-
resize:
|
|
597
|
-
form:
|
|
598
|
-
occurrenceDialog:
|
|
599
|
-
removeDialog:
|
|
594
|
+
viewItem: Ht,
|
|
595
|
+
drag: Xt,
|
|
596
|
+
resize: Yt,
|
|
597
|
+
form: Pt,
|
|
598
|
+
occurrenceDialog: Nt,
|
|
599
|
+
removeDialog: Ut,
|
|
600
600
|
onClickAction: (t, l, s) => [
|
|
601
601
|
{
|
|
602
602
|
type: t.syntheticEvent.metaKey || t.syntheticEvent.ctrlKey ? s.selected && !s.dragItem && !s.resizeItem ? A.remove : A.add : A.select
|
|
@@ -610,12 +610,12 @@ const ro = n.forwardRef(
|
|
|
610
610
|
{ type: C.set, payload: l.dataItem },
|
|
611
611
|
l.isRecurring ? { type: d.open } : { type: g.open }
|
|
612
612
|
] : [],
|
|
613
|
-
onPressAction: (t, l) => l.editable ? { type: y.start, payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY } } : [],
|
|
614
|
-
onDragAction: (t, l) => l.editable ? {
|
|
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) ? {
|
|
615
615
|
type: t.dragEvent.originalEvent.metaKey || t.dragEvent.originalEvent.ctrlKey ? y.dragSelected : y.drag,
|
|
616
616
|
payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY }
|
|
617
617
|
} : [],
|
|
618
|
-
onReleaseAction: (t, l, s) => l.editable && s.dragItem ? l.isRecurring && !l.isException && s.series === null ? { type: d.open } : {
|
|
618
|
+
onReleaseAction: (t, l, s) => Be(l.editable) && s.dragItem ? l.isRecurring && !l.isException && s.series === null ? { type: d.open } : {
|
|
619
619
|
type: l.isRecurring ? s.series ? y.completeSeries : y.completeOccurrence : y.complete,
|
|
620
620
|
payload: { x: t.dragEvent.clientX, y: t.dragEvent.clientY }
|
|
621
621
|
} : [],
|
|
@@ -721,8 +721,8 @@ const ro = n.forwardRef(
|
|
|
721
721
|
{ type: d.reset }
|
|
722
722
|
]
|
|
723
723
|
};
|
|
724
|
-
|
|
724
|
+
lo.displayName = "KendoReactSchedulerEditItem";
|
|
725
725
|
export {
|
|
726
|
-
|
|
726
|
+
lo as SchedulerEditItem,
|
|
727
727
|
O as schedulerEditItemDefaultProps
|
|
728
728
|
};
|