@progress/kendo-react-scheduler 13.3.0 → 13.4.0-develop.2
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/Scheduler.d.ts +597 -0
- package/Scheduler.js +1 -1
- package/Scheduler.mjs +1 -1
- package/components/BaseView.d.ts +25 -0
- package/components/BaseView.js +1 -1
- package/components/BaseView.mjs +3 -3
- package/components/CurrentTimeMarket.d.ts +17 -0
- package/components/DateHeaderCell.d.ts +53 -0
- package/components/SchedulerForm.d.ts +87 -0
- package/components/SchedulerForm.mjs +3 -3
- package/components/SchedulerOccurrenceDialog.d.ts +58 -0
- package/components/SchedulerOccurrenceDialog.mjs +2 -2
- package/components/SchedulerRemoveDialog.d.ts +54 -0
- package/components/ShowMoreItemsButton.d.ts +33 -0
- package/components/TimeHeaderCell.d.ts +53 -0
- package/components/footer/SchedulerFooter.d.ts +37 -0
- package/components/footer/bussiness-hours/BussinessHours.d.ts +20 -0
- package/components/header/SchedulerHeader.d.ts +34 -0
- package/components/header/navigation/NavigationDatePicker.d.ts +12 -0
- package/components/header/navigation/SchedulerNavigation.d.ts +31 -0
- package/components/header/view-selector/SchedulerViewSelector.d.ts +31 -0
- package/components/header/view-selector/ViewSelectorItem.d.ts +16 -0
- package/components/header/view-selector/ViewSelectorList.d.ts +10 -0
- package/constants/index.d.ts +61 -0
- package/constants/index.js +1 -1
- package/constants/index.mjs +9 -9
- package/context/SchedulerContext.d.ts +234 -0
- package/context/SchedulerEditItemContext.d.ts +199 -0
- package/context/SchedulerEditSlotContext.d.ts +54 -0
- package/context/SchedulerEditTaskContext.d.ts +36 -0
- package/context/SchedulerResourceIteratorContext.d.ts +23 -0
- package/context/SchedulerViewContext.d.ts +97 -0
- package/context/index.d.ts +12 -0
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/editors/FilterableComboBox.d.ts +12 -0
- package/editors/ResourceEditor.d.ts +22 -0
- package/editors/SchedulerFormEditor.d.ts +495 -0
- package/editors/SchedulerFormEditor.mjs +3 -3
- package/editors/ZonedDateTime.d.ts +25 -0
- package/editors/common.d.ts +19 -0
- package/hooks/index.d.ts +17 -0
- package/hooks/use-items-focus.d.ts +39 -0
- package/hooks/use-items-selection.d.ts +47 -0
- package/hooks/use-slots-focus.d.ts +47 -0
- package/hooks/use-slots-selection.d.ts +37 -0
- package/hooks/useAsyncMouseEnterLeave.d.ts +18 -0
- package/hooks/useCellSync.d.ts +17 -0
- package/hooks/useControlledState.d.ts +20 -0
- package/hooks/useEditable.d.ts +10 -0
- package/hooks/usePropOrState.d.ts +9 -0
- package/hooks/useRowSync.d.ts +18 -0
- package/hooks/useSchedulerItem.d.ts +14 -0
- package/hooks/useSchedulerSlot.d.ts +14 -0
- package/hooks/useSlotExpand.d.ts +12 -0
- package/hooks/useWorkHours.d.ts +9 -0
- package/index.d.mts +41 -4703
- package/index.d.ts +41 -4703
- package/items/SchedulerEditItem.d.ts +453 -0
- package/items/SchedulerEditItem.mjs +7 -7
- package/items/SchedulerItem.d.ts +222 -0
- package/items/SchedulerItemContent.d.ts +18 -0
- package/items/SchedulerProportionalViewItem.d.ts +19 -0
- package/items/SchedulerViewItem.d.ts +46 -0
- package/items/hooks/use-drag-item.d.ts +51 -0
- package/items/hooks/use-form-item.d.ts +25 -0
- package/items/hooks/use-remove-item.d.ts +33 -0
- package/items/hooks/use-resize-item.d.ts +57 -0
- package/items/hooks/use-series.d.ts +30 -0
- package/items/hooks/use-show-occurrence-dialog.d.ts +34 -0
- package/items/hooks/use-show-remove-item-dialog.d.ts +34 -0
- package/messages/index.d.ts +243 -0
- package/models/DataItem.d.ts +15 -0
- package/models/DateRange.d.ts +25 -0
- package/models/EditableProp.d.ts +36 -0
- package/models/Fields.d.ts +60 -0
- package/models/Group.d.ts +21 -0
- package/models/Item.d.ts +71 -0
- package/models/NavigationAction.d.ts +65 -0
- package/models/Occurrence.d.ts +59 -0
- package/models/Omit.d.ts +11 -0
- package/models/Orientation.d.ts +9 -0
- package/models/Range.d.ts +17 -0
- package/models/Rect.d.ts +22 -0
- package/models/Resource.d.ts +15 -0
- package/models/SchedulerGroup.d.ts +20 -0
- package/models/SchedulerHandle.d.ts +21 -0
- package/models/SchedulerModelFields.d.ts +69 -0
- package/models/SchedulerResource.d.ts +40 -0
- package/models/SchedulerView.d.ts +103 -0
- package/models/Slot.d.ts +57 -0
- package/models/events.d.ts +96 -0
- package/models/index.d.ts +26 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +9 -16
- package/package.json +11 -11
- package/recurrence/RecurrenceEditor.d.ts +19 -0
- package/recurrence/RecurrenceEditor.mjs +3 -3
- package/recurrence/RecurrenceFrequencyEditor.d.ts +17 -0
- package/recurrence/RecurrenceRepeatOnWeekEditor.d.ts +20 -0
- package/recurrence/common.d.ts +64 -0
- package/recurrence/types/EndRule.d.ts +11 -0
- package/recurrence/types/Frequency.d.ts +11 -0
- package/recurrence/types/FrequencyEntity.d.ts +15 -0
- package/recurrence/types/MonthEntity.d.ts +14 -0
- package/recurrence/types/OffsetPosition.d.ts +11 -0
- package/recurrence/types/OffsetPositionEntity.d.ts +14 -0
- package/recurrence/types/RepeatOnRule.d.ts +11 -0
- package/recurrence/types/WeekDayEntity.d.ts +14 -0
- package/recurrence/types/WeekDayRule.d.ts +14 -0
- package/recurrence/utils/index.d.ts +7 -0
- package/reducers/editReducer.d.ts +40 -0
- package/reducers/index.d.ts +8 -0
- package/services/index.d.ts +11 -0
- package/services/itemsService.d.ts +19 -0
- package/services/occurrenceService.d.ts +10 -0
- package/services/occurrenceService.js +1 -1
- package/services/occurrenceService.mjs +12 -10
- package/services/rangeService.d.ts +10 -0
- package/services/slotsService.d.ts +13 -0
- package/slots/SchedulerEditSlot.d.ts +62 -0
- package/slots/SchedulerSlot.d.ts +140 -0
- package/slots/SchedulerViewSlot.d.ts +56 -0
- package/tasks/SchedulerEditTask.d.ts +93 -0
- package/tasks/SchedulerTask.d.ts +70 -0
- package/tasks/SchedulerViewTask.d.ts +44 -0
- package/utils/index.d.ts +177 -0
- package/views/agenda/AgendaView.d.ts +97 -0
- package/views/agenda/AgendaView.js +1 -1
- package/views/agenda/AgendaView.mjs +2 -2
- package/views/agenda/AgendaViewHeaderItem.d.ts +15 -0
- package/views/common/HorizontalResourceIterator.d.ts +33 -0
- package/views/common/HorizontalResourceIterator.js +1 -1
- package/views/common/HorizontalResourceIterator.mjs +33 -39
- package/views/common/SchedulerDrag.d.ts +46 -0
- package/views/common/SchedulerResize.d.ts +48 -0
- package/views/common/VerticalResourceIterator.d.ts +28 -0
- package/views/common/VerticalResourceIterator.js +1 -1
- package/views/common/VerticalResourceIterator.mjs +21 -21
- package/views/common/utils.d.ts +41 -0
- package/views/day/DayView.d.ts +38 -0
- package/views/day/DayView.mjs +3 -3
- package/views/day/DayViewAllDayRowContent.d.ts +15 -0
- package/views/day/DayViewGroupRowContent.d.ts +15 -0
- package/views/day/DayViewRowContent.d.ts +20 -0
- package/views/day/MultiDayView.d.ts +179 -0
- package/views/day/MultiDayView.mjs +8 -8
- package/views/month/MonthView.d.ts +104 -0
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +5 -5
- package/views/time/MultiDayTimelineView.d.ts +183 -0
- package/views/time/MultiDayTimelineView.mjs +5 -5
- package/views/time/TimelineView.d.ts +38 -0
- package/views/time/TimelineView.mjs +3 -3
- package/views/time/TimelineViewAllEventsRowContent.d.ts +14 -0
- package/views/time/TimelineViewRowContent.d.ts +14 -0
- package/views/week/WeekView.d.ts +109 -0
- package/views/week/WeekView.mjs +1 -1
- package/views/week/WorkWeekView.d.ts +27 -0
- package/views/week/WorkWeekView.mjs +1 -1
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { DataItem, SchedulerItemDragEvent, SchedulerItemMouseEvent, SchedulerItemKeyboardEvent, SchedulerItemFocusEvent } from '../models/index.js';
|
|
9
|
+
import { SchedulerOccurrenceDialogProps, SchedulerOccurrenceDialogStateChangeEvent } from '../components/SchedulerOccurrenceDialog.js';
|
|
10
|
+
import { SchedulerFormProps, SchedulerFormStateChangeEvent } from '../components/SchedulerForm.js';
|
|
11
|
+
import { SchedulerRemoveDialogProps, SchedulerRemoveDialogStateChangeEvent } from '../components/SchedulerRemoveDialog.js';
|
|
12
|
+
import { DataAction } from '../Scheduler.js';
|
|
13
|
+
import { SchedulerDragProps } from '../views/common/SchedulerDrag.js';
|
|
14
|
+
import { SchedulerResizeProps } from '../views/common/SchedulerResize.js';
|
|
15
|
+
import { SchedulerViewItemProps } from './SchedulerViewItem.js';
|
|
16
|
+
import { SchedulerItemsFocusAction, SchedulerSlotsFocusAction } from '../hooks/index.js';
|
|
17
|
+
import { FORM_ITEM_ACTION, SchedulerItemFormItemAction } from './hooks/use-form-item.js';
|
|
18
|
+
import { SchedulerItemShowOccurrenceDialogAction, SHOW_OCCURRENCE_DIALOG_ACTION } from './hooks/use-show-occurrence-dialog.js';
|
|
19
|
+
import { REMOVE_ITEM_ACTION, SchedulerItemRemoveItemAction } from './hooks/use-remove-item.js';
|
|
20
|
+
import { SchedulerItemShowRemoveDialogAction, SHOW_REMOVE_DIALOG_ACTION } from './hooks/use-show-remove-item-dialog.js';
|
|
21
|
+
import { DRAG_ITEM_ACTION, SchedulerItemDragItemAction } from './hooks/use-drag-item.js';
|
|
22
|
+
import { RESIZE_ITEM_ACTION, SchedulerItemResizeItemAction } from './hooks/use-resize-item.js';
|
|
23
|
+
import { SchedulerItemSeriesAction } from './hooks/use-series.js';
|
|
24
|
+
import { SchedulerItemsSelectAction } from '../hooks/use-items-selection.js';
|
|
25
|
+
import { SchedulerSlotsSelectAction } from '../hooks/use-slots-selection.js';
|
|
26
|
+
import * as React from 'react';
|
|
27
|
+
export interface SchedulerEditItemStateChangeEvent<T> {
|
|
28
|
+
/**
|
|
29
|
+
* The value associated with the state change event.
|
|
30
|
+
*/
|
|
31
|
+
value: T;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Represents the available SchedulerEditItem` actions.
|
|
35
|
+
*
|
|
36
|
+
* Can be one of:
|
|
37
|
+
* - [SchedulerItemDragItemAction](https://www.telerik.com/kendo-react-ui/components/scheduler/api/scheduleritemdragitemaction)
|
|
38
|
+
* - [SchedulerItemResizeItemAction](https://www.telerik.com/kendo-react-ui/components/scheduler/api/scheduleritemresizeitemaction)
|
|
39
|
+
* - [SchedulerItemRemoveItemAction](https://www.telerik.com/kendo-react-ui/components/scheduler/api/scheduleritemremoveitemaction)
|
|
40
|
+
* - [SchedulerItemShowRemoveDialogAction](https://www.telerik.com/kendo-react-ui/components/scheduler/api/scheduleritemshowremovedialogaction)
|
|
41
|
+
* - [SchedulerItemShowOccurrenceDialogAction](https://www.telerik.com/kendo-react-ui/components/scheduler/api/scheduleritemshowoccurrencedialogaction)
|
|
42
|
+
* - [SchedulerItemSeriesAction](https://www.telerik.com/kendo-react-ui/components/scheduler/api/scheduleritemseriesaction)
|
|
43
|
+
* - [SchedulerItemsFocusAction](https://www.telerik.com/kendo-react-ui/components/scheduler/api/scheduleritemsfocusaction)
|
|
44
|
+
* - [SchedulerItemsSelectAction](https://www.telerik.com/kendo-react-ui/components/scheduler/api/scheduleritemsselectaction)
|
|
45
|
+
* - [SchedulerSlotsFocusAction](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerslotsfocusaction)
|
|
46
|
+
* - [SchedulerSlotsSelectAction](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerslotsselectaction)
|
|
47
|
+
*
|
|
48
|
+
* The following `falsy` values will be ignored:
|
|
49
|
+
* - `null`
|
|
50
|
+
* - `false`
|
|
51
|
+
* - `undefined`
|
|
52
|
+
*/
|
|
53
|
+
export type SchedulerEditItemAction = SchedulerItemFormItemAction | SchedulerItemDragItemAction | SchedulerItemResizeItemAction | SchedulerItemRemoveItemAction | SchedulerItemShowRemoveDialogAction | SchedulerItemShowOccurrenceDialogAction | SchedulerItemSeriesAction | SchedulerItemsFocusAction | SchedulerItemsSelectAction | SchedulerSlotsFocusAction | SchedulerSlotsSelectAction | null | false | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Represents the props of the KendoReact [SchedulerEditItem]() component.
|
|
56
|
+
*/
|
|
57
|
+
export interface SchedulerEditItemProps extends SchedulerViewItemProps {
|
|
58
|
+
/**
|
|
59
|
+
* Overrides the default component responsible for positioning the item inside the view.
|
|
60
|
+
*
|
|
61
|
+
* The default Component is: [SchedulerViewItem](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerviewitem).
|
|
62
|
+
*/
|
|
63
|
+
viewItem?: React.ComponentType<SchedulerViewItemProps>;
|
|
64
|
+
/**
|
|
65
|
+
* Overrides the default component responsible for visualizing the `dragItem`.
|
|
66
|
+
*
|
|
67
|
+
* The default Component is: [SchedulerDrag](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerdrag).
|
|
68
|
+
*/
|
|
69
|
+
drag?: React.ComponentType<SchedulerDragProps>;
|
|
70
|
+
/**
|
|
71
|
+
* Overrides the default component responsible for visualizing the `resizeItem`.
|
|
72
|
+
*
|
|
73
|
+
* The default Component is: [SchedulerResize](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerresize).
|
|
74
|
+
*/
|
|
75
|
+
resize?: React.ComponentType<SchedulerResizeProps>;
|
|
76
|
+
/**
|
|
77
|
+
* Overrides the default component responsible for visualizing the `formItem`.
|
|
78
|
+
*
|
|
79
|
+
* The default Component is: [SchedulerForm](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerform).
|
|
80
|
+
*/
|
|
81
|
+
form?: React.ComponentType<SchedulerFormProps>;
|
|
82
|
+
/**
|
|
83
|
+
* Overrides the default component responsible for visualizing the `removeItem` and confirming the `remove` action.
|
|
84
|
+
*
|
|
85
|
+
* The default Component is: [SchedulerRemoveDialog](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerremovedialog).
|
|
86
|
+
*/
|
|
87
|
+
removeDialog?: React.ComponentType<SchedulerRemoveDialogProps>;
|
|
88
|
+
/**
|
|
89
|
+
* Overrides the default component responsible for the selection between `occurrence` and `series` edit.
|
|
90
|
+
*
|
|
91
|
+
* The default Component is: [SchedulerOccurrenceDialog](https://www.telerik.com/kendo-react-ui/components/scheduler/api/scheduleroccurrencedialog).
|
|
92
|
+
*/
|
|
93
|
+
occurrenceDialog?: React.ComponentType<SchedulerOccurrenceDialogProps>;
|
|
94
|
+
/**
|
|
95
|
+
* Fires when the item has been removed or manipulated through dragging, resizing, or an external form.
|
|
96
|
+
*/
|
|
97
|
+
onDataAction?: (action: DataAction, event?: any) => void;
|
|
98
|
+
/**
|
|
99
|
+
* Setting this property will force the `formItem` to be in controlled state, allowing further customization.
|
|
100
|
+
*/
|
|
101
|
+
formItem?: DataItem | null;
|
|
102
|
+
/**
|
|
103
|
+
* Fires every time the `formItem` changes.
|
|
104
|
+
*/
|
|
105
|
+
onFormItemChange?: (event: SchedulerEditItemStateChangeEvent<DataItem | null>) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Setting this property will force the `dragItem` to be in controlled state, allowing further customization.
|
|
108
|
+
*/
|
|
109
|
+
dragItem?: DataItem | null;
|
|
110
|
+
/**
|
|
111
|
+
* Fires every time the `dragItem` changes.
|
|
112
|
+
*/
|
|
113
|
+
onDragItemChange?: (event: SchedulerEditItemStateChangeEvent<DataItem | null>) => void;
|
|
114
|
+
/**
|
|
115
|
+
* Setting this property will force the `resizeItem` to be in controlled state, allowing further customization.
|
|
116
|
+
*/
|
|
117
|
+
resizeItem?: DataItem | null;
|
|
118
|
+
/**
|
|
119
|
+
* Fires every time the `resizeItem` changes.
|
|
120
|
+
*/
|
|
121
|
+
onResizeItemChange?: (event: SchedulerEditItemStateChangeEvent<DataItem | null>) => void;
|
|
122
|
+
/**
|
|
123
|
+
* Setting this property will force the `removeItem` to be in controlled state, allowing further customization.
|
|
124
|
+
*
|
|
125
|
+
* Specifies the DataItem which should be removed from the `data` set.
|
|
126
|
+
* The `removeItem` is passed as property to the `removeDialog` and `occurrenceDialog` component;
|
|
127
|
+
*/
|
|
128
|
+
removeItem?: DataItem | null;
|
|
129
|
+
/**
|
|
130
|
+
* Fires every time the `removeItem` changes.
|
|
131
|
+
*/
|
|
132
|
+
onRemoveItemChange?: (event: SchedulerEditItemStateChangeEvent<DataItem | null>) => void;
|
|
133
|
+
/**
|
|
134
|
+
* Setting this property will force the `showOccurrenceDialog` to be in controlled state, allowing further control over the display of the `occurrenceDialog` component.
|
|
135
|
+
*/
|
|
136
|
+
showOccurrenceDialog?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Fires every time the `showOccurrenceDialog` changes.
|
|
139
|
+
*/
|
|
140
|
+
onShowOccurrenceDialogChange?: (event: SchedulerEditItemStateChangeEvent<boolean>) => void;
|
|
141
|
+
/**
|
|
142
|
+
* Setting this property will force the `showRemoveDialog` to be in controlled state, allowing further control over the display of the `removeDialog` component.
|
|
143
|
+
*/
|
|
144
|
+
showRemoveDialog?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Fires every time the `showRemoveDialog` changes.
|
|
147
|
+
*/
|
|
148
|
+
onShowRemoveDialogChange?: (event: SchedulerEditItemStateChangeEvent<boolean>) => void;
|
|
149
|
+
/**
|
|
150
|
+
* Indicates if the editing should be applied to the whole `series` or to a single `occurrence` when the item is recurring.
|
|
151
|
+
*
|
|
152
|
+
* By default, the `series` prop is set to `null` and additional selection is done through the `occurrence` dialog.
|
|
153
|
+
* If set ot either `true` or `false`:
|
|
154
|
+
* - `true` — indicates that the editing should always be applied to the whole `series`
|
|
155
|
+
* - `false` — indicates that the editing should always be applied to a single `occurrence`.
|
|
156
|
+
*/
|
|
157
|
+
series?: boolean | null;
|
|
158
|
+
/**
|
|
159
|
+
* Fires every time the `series` changes.
|
|
160
|
+
*/
|
|
161
|
+
onSeriesChange?: (event: SchedulerEditItemStateChangeEvent<boolean | null>) => void;
|
|
162
|
+
/**
|
|
163
|
+
* Fires whenever you select the `occurrence` option from the `OccurrenceDialog`.
|
|
164
|
+
*/
|
|
165
|
+
onOccurrenceClick?: (event: SchedulerOccurrenceDialogStateChangeEvent<any>) => void;
|
|
166
|
+
/**
|
|
167
|
+
* An action callback. Used to define the component behavior on occurrence click.
|
|
168
|
+
*
|
|
169
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
170
|
+
*/
|
|
171
|
+
onOccurrenceClickAction?: (event: SchedulerOccurrenceDialogStateChangeEvent<any>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
172
|
+
/**
|
|
173
|
+
* Fires whenever you select the `series` option from the `OccurrenceDialog`.
|
|
174
|
+
*/
|
|
175
|
+
onSeriesClick?: (event: SchedulerOccurrenceDialogStateChangeEvent<any>) => void;
|
|
176
|
+
/**
|
|
177
|
+
* An action callback. Used to define the component behavior on series click.
|
|
178
|
+
*
|
|
179
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
180
|
+
*/
|
|
181
|
+
onSeriesClickAction?: (event: SchedulerOccurrenceDialogStateChangeEvent<any>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
182
|
+
/**
|
|
183
|
+
* Fires whenever you select the `confirm` option from the `RemoveDialog`.
|
|
184
|
+
*/
|
|
185
|
+
onRemoveConfirm?: (event: SchedulerRemoveDialogStateChangeEvent<any>) => void;
|
|
186
|
+
/**
|
|
187
|
+
* An action callback. Used to define the component behavior on remove confirm click.
|
|
188
|
+
*
|
|
189
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
190
|
+
*/
|
|
191
|
+
onRemoveConfirmAction?: (event: SchedulerRemoveDialogStateChangeEvent<any>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
192
|
+
/**
|
|
193
|
+
* Fires whenever you submit the `form`.
|
|
194
|
+
*/
|
|
195
|
+
onFormSubmit?: (event: SchedulerFormStateChangeEvent<DataItem | null>) => void;
|
|
196
|
+
/**
|
|
197
|
+
* An action callback. Used to define the component behavior on form submit.
|
|
198
|
+
*
|
|
199
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
200
|
+
*/
|
|
201
|
+
onFormSubmitAction?: (event: SchedulerFormStateChangeEvent<DataItem | null>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
202
|
+
/**
|
|
203
|
+
* Fires whenever you cancel the current edit.
|
|
204
|
+
*/
|
|
205
|
+
onCancel?: (event: SchedulerFormStateChangeEvent<null> | SchedulerOccurrenceDialogStateChangeEvent<null>) => void;
|
|
206
|
+
/**
|
|
207
|
+
* An action callback. Used to define the component behavior on cancel.
|
|
208
|
+
*
|
|
209
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
210
|
+
*/
|
|
211
|
+
onCancelAction?: (event: SchedulerFormStateChangeEvent<null> | SchedulerOccurrenceDialogStateChangeEvent<null>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
212
|
+
/**
|
|
213
|
+
* An action callback. Used to define the component behavior on click.
|
|
214
|
+
*
|
|
215
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
216
|
+
*/
|
|
217
|
+
onClickAction?: (event: SchedulerItemMouseEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
218
|
+
/**
|
|
219
|
+
* An action callback. Used to define the component behavior on mouse down.
|
|
220
|
+
*
|
|
221
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
222
|
+
*/
|
|
223
|
+
onMouseDownAction?: (event: SchedulerItemMouseEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
224
|
+
/**
|
|
225
|
+
* An action callback. Used to define the component behavior on mouse up.
|
|
226
|
+
*
|
|
227
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
228
|
+
*/
|
|
229
|
+
onMouseUpAction?: (event: SchedulerItemMouseEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
230
|
+
/**
|
|
231
|
+
* An action callback. Used to define the component behavior on double click.
|
|
232
|
+
*
|
|
233
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
234
|
+
*/
|
|
235
|
+
onDoubleClickAction?: (event: SchedulerItemMouseEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
236
|
+
/**
|
|
237
|
+
* An action callback. Used to define the component behavior on remove click.
|
|
238
|
+
*
|
|
239
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
240
|
+
*/
|
|
241
|
+
onRemoveClickAction?: (event: SchedulerItemMouseEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
242
|
+
/**
|
|
243
|
+
* An action callback. Used to define the component behavior on key down.
|
|
244
|
+
*
|
|
245
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
246
|
+
*/
|
|
247
|
+
onKeyDownAction?: (event: SchedulerItemKeyboardEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
248
|
+
/**
|
|
249
|
+
* An action callback. Used to define the component behavior on key up.
|
|
250
|
+
*
|
|
251
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
252
|
+
*/
|
|
253
|
+
onKeyUpAction?: (event: SchedulerItemKeyboardEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
254
|
+
/**
|
|
255
|
+
* An action callback. Used to define the component behavior on focus.
|
|
256
|
+
*
|
|
257
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
258
|
+
*/
|
|
259
|
+
onFocusAction?: (event: SchedulerItemFocusEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
260
|
+
/**
|
|
261
|
+
* An action callback. Used to define the component behavior on blur.
|
|
262
|
+
*
|
|
263
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
264
|
+
*/
|
|
265
|
+
onBlurAction?: (event: SchedulerItemFocusEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
266
|
+
/**
|
|
267
|
+
* An action callback. Used to define the component behavior on press.
|
|
268
|
+
*
|
|
269
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
270
|
+
*/
|
|
271
|
+
onPressAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
272
|
+
/**
|
|
273
|
+
* An action callback. Used to define the component behavior on drag.
|
|
274
|
+
*
|
|
275
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
276
|
+
*/
|
|
277
|
+
onDragAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
278
|
+
/**
|
|
279
|
+
* An action callback. Used to define the component behavior on release.
|
|
280
|
+
*
|
|
281
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
282
|
+
*/
|
|
283
|
+
onReleaseAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
284
|
+
/**
|
|
285
|
+
* An action callback. Used to define the component behavior on resize press.
|
|
286
|
+
*
|
|
287
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
288
|
+
*/
|
|
289
|
+
onResizePressAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
290
|
+
/**
|
|
291
|
+
* An action callback. Used to define the component behavior on resize start drag.
|
|
292
|
+
*
|
|
293
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
294
|
+
*/
|
|
295
|
+
onResizeStartDragAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
296
|
+
/**
|
|
297
|
+
* An action callback. Used to define the component behavior on resize end drag.
|
|
298
|
+
*
|
|
299
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
300
|
+
*/
|
|
301
|
+
onResizeEndDragAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
302
|
+
/**
|
|
303
|
+
* An action callback. Used to define the component behavior on resize release.
|
|
304
|
+
*
|
|
305
|
+
* Internal state change will be triggered depending on the specific action types.
|
|
306
|
+
*/
|
|
307
|
+
onResizeReleaseAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Represents the internal `state` of the `SchedulerEditItem`.
|
|
311
|
+
*/
|
|
312
|
+
export interface SchedulerEditItemState {
|
|
313
|
+
/**
|
|
314
|
+
* Whether the item is currently selected.
|
|
315
|
+
*/
|
|
316
|
+
selected: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Whether the action applies to a series or single occurrence.
|
|
319
|
+
*/
|
|
320
|
+
series: boolean | null;
|
|
321
|
+
/**
|
|
322
|
+
* The data item being edited in the form.
|
|
323
|
+
*/
|
|
324
|
+
formItem: DataItem | null;
|
|
325
|
+
/**
|
|
326
|
+
* The data item being dragged.
|
|
327
|
+
*/
|
|
328
|
+
dragItem: DataItem | null;
|
|
329
|
+
/**
|
|
330
|
+
* The data item being resized.
|
|
331
|
+
*/
|
|
332
|
+
resizeItem: DataItem | null;
|
|
333
|
+
/**
|
|
334
|
+
* The data item scheduled for removal.
|
|
335
|
+
*/
|
|
336
|
+
removeItem: DataItem | null;
|
|
337
|
+
/**
|
|
338
|
+
* The data item for which the remove dialog is shown.
|
|
339
|
+
*/
|
|
340
|
+
showRemoveDialog: DataItem | null;
|
|
341
|
+
/**
|
|
342
|
+
* The data item for which the occurrence dialog is shown.
|
|
343
|
+
*/
|
|
344
|
+
showOccurrenceDialog: DataItem | null;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Represents the object which is returned from the `ref` callback of the [SchedulerEditItem](https://www.telerik.com/kendo-react-ui/components/scheduler/api/scheduleredititem).
|
|
348
|
+
*
|
|
349
|
+
* For more information about Refs, refer to the [React Refs & Dom](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom) article.
|
|
350
|
+
*/
|
|
351
|
+
export interface SchedulerEditItemHandle {
|
|
352
|
+
/**
|
|
353
|
+
* The HTML element of the SchedulerEditItem component.
|
|
354
|
+
*/
|
|
355
|
+
element: HTMLDivElement | null;
|
|
356
|
+
/**
|
|
357
|
+
* The props of the SchedulerEditItem component.
|
|
358
|
+
*/
|
|
359
|
+
props: SchedulerEditItemProps;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Represents the default `editItem` component rendered by the [KendoReact Scheduler component](https://www.telerik.com/kendo-react-ui/components/scheduler).
|
|
363
|
+
*
|
|
364
|
+
* This is a composite component of the [`SchedulerViewItem`](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerviewitem), extending it to provide editing through drag, resize and external form.
|
|
365
|
+
*/
|
|
366
|
+
export declare const SchedulerEditItem: React.ForwardRefExoticComponent<SchedulerEditItemProps & React.RefAttributes<SchedulerEditItemHandle>>;
|
|
367
|
+
export declare const schedulerEditItemDefaultProps: {
|
|
368
|
+
viewItem: React.ForwardRefExoticComponent<SchedulerViewItemProps & React.RefAttributes<import('./SchedulerViewItem').SchedulerViewItemHandle>>;
|
|
369
|
+
drag: React.FunctionComponent<SchedulerDragProps>;
|
|
370
|
+
resize: React.FunctionComponent<SchedulerResizeProps>;
|
|
371
|
+
form: React.ForwardRefExoticComponent<SchedulerFormProps & React.RefAttributes<import('../components/SchedulerForm').SchedulerFormHandle | null>>;
|
|
372
|
+
occurrenceDialog: React.ForwardRefExoticComponent<SchedulerOccurrenceDialogProps & React.RefAttributes<import('../components/SchedulerOccurrenceDialog').SchedulerOccurrenceDialogHandle | null>>;
|
|
373
|
+
removeDialog: React.ForwardRefExoticComponent<SchedulerRemoveDialogProps & React.RefAttributes<import('../components/SchedulerRemoveDialog').SchedulerRemoveDialogHandle | null>>;
|
|
374
|
+
onClickAction: (event: SchedulerItemMouseEvent, _: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction[];
|
|
375
|
+
onDoubleClickAction: (_: any, props: SchedulerEditItemProps) => (false | {
|
|
376
|
+
type: FORM_ITEM_ACTION;
|
|
377
|
+
payload: any;
|
|
378
|
+
} | {
|
|
379
|
+
type: SHOW_OCCURRENCE_DIALOG_ACTION;
|
|
380
|
+
payload?: undefined;
|
|
381
|
+
})[];
|
|
382
|
+
onRemoveClickAction: (_: any, props: SchedulerEditItemProps) => ({
|
|
383
|
+
type: REMOVE_ITEM_ACTION;
|
|
384
|
+
payload: any;
|
|
385
|
+
} | {
|
|
386
|
+
type: SHOW_OCCURRENCE_DIALOG_ACTION;
|
|
387
|
+
payload?: undefined;
|
|
388
|
+
} | {
|
|
389
|
+
type: SHOW_REMOVE_DIALOG_ACTION;
|
|
390
|
+
payload?: undefined;
|
|
391
|
+
})[];
|
|
392
|
+
onPressAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps) => never[] | {
|
|
393
|
+
type: DRAG_ITEM_ACTION;
|
|
394
|
+
payload: {
|
|
395
|
+
x: number;
|
|
396
|
+
y: number;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
onDragAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps) => never[] | {
|
|
400
|
+
type: DRAG_ITEM_ACTION;
|
|
401
|
+
payload: {
|
|
402
|
+
x: number;
|
|
403
|
+
y: number;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
onReleaseAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => never[] | {
|
|
407
|
+
type: SHOW_OCCURRENCE_DIALOG_ACTION;
|
|
408
|
+
payload?: undefined;
|
|
409
|
+
} | {
|
|
410
|
+
type: DRAG_ITEM_ACTION;
|
|
411
|
+
payload: {
|
|
412
|
+
x: number;
|
|
413
|
+
y: number;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
onResizePressAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps) => never[] | {
|
|
417
|
+
type: RESIZE_ITEM_ACTION;
|
|
418
|
+
payload: {
|
|
419
|
+
x: number;
|
|
420
|
+
y: number;
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
onResizeStartDragAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps) => never[] | {
|
|
424
|
+
type: RESIZE_ITEM_ACTION;
|
|
425
|
+
payload: {
|
|
426
|
+
x: number;
|
|
427
|
+
y: number;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
onResizeEndDragAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps) => never[] | {
|
|
431
|
+
type: RESIZE_ITEM_ACTION;
|
|
432
|
+
payload: {
|
|
433
|
+
x: number;
|
|
434
|
+
y: number;
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
onResizeReleaseAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => never[] | {
|
|
438
|
+
type: SHOW_OCCURRENCE_DIALOG_ACTION;
|
|
439
|
+
payload?: undefined;
|
|
440
|
+
} | {
|
|
441
|
+
type: RESIZE_ITEM_ACTION;
|
|
442
|
+
payload: {
|
|
443
|
+
x: number;
|
|
444
|
+
y: number;
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
onOccurrenceClickAction: (_event: SchedulerOccurrenceDialogStateChangeEvent<any>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction[];
|
|
448
|
+
onSeriesClickAction: (_event: SchedulerOccurrenceDialogStateChangeEvent<any>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction[];
|
|
449
|
+
onKeyDownAction: (event: SchedulerItemKeyboardEvent, props: SchedulerEditItemProps) => SchedulerEditItemAction | SchedulerEditItemAction[];
|
|
450
|
+
onFormSubmitAction: (event: SchedulerFormStateChangeEvent<DataItem | null>) => SchedulerEditItemAction[];
|
|
451
|
+
onRemoveConfirmAction: () => SchedulerEditItemAction[];
|
|
452
|
+
onCancelAction: () => SchedulerEditItemAction[];
|
|
453
|
+
};
|
|
@@ -14,13 +14,13 @@ import { SchedulerDrag as Pt } from "../views/common/SchedulerDrag.mjs";
|
|
|
14
14
|
import { SchedulerResize as Ut } from "../views/common/SchedulerResize.mjs";
|
|
15
15
|
import { SchedulerViewItem as Vt } from "./SchedulerViewItem.mjs";
|
|
16
16
|
import { SchedulerEditItemContext as Xt } from "../context/SchedulerEditItemContext.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
17
|
+
import { FORM_ITEM_ACTION as I, useFormItem as Yt } from "./hooks/use-form-item.mjs";
|
|
18
|
+
import { SHOW_OCCURRENCE_DIALOG_ACTION as d, useShowOccurrenceDialog as Ht } from "./hooks/use-show-occurrence-dialog.mjs";
|
|
19
|
+
import { REMOVE_ITEM_ACTION as C, useRemoveItem as Lt } from "./hooks/use-remove-item.mjs";
|
|
20
|
+
import { SHOW_REMOVE_DIALOG_ACTION as A, useShowRemoveDialog as Gt } from "./hooks/use-show-remove-item-dialog.mjs";
|
|
21
|
+
import { DRAG_ITEM_ACTION as y, useDragItem as Wt } from "./hooks/use-drag-item.mjs";
|
|
22
|
+
import { RESIZE_ITEM_ACTION as m, useResizeItem as Zt } from "./hooks/use-resize-item.mjs";
|
|
23
|
+
import { SERIES_ACTION as D, useSeries as jt } from "./hooks/use-series.mjs";
|
|
24
24
|
import { ITEMS_SELECT_ACTION as g } from "../hooks/use-items-selection.mjs";
|
|
25
25
|
import { useSchedulerViewSelectedItemsContext as qt, useSchedulerViewItemsContext as Jt, useSchedulerViewFocusedItemsContext as Qt, useSchedulerViewFocusedSlotsContext as $t } from "../context/SchedulerViewContext.mjs";
|
|
26
26
|
import { ITEMS_FOCUS_ACTION as X } from "../hooks/use-items-focus.mjs";
|