@progress/kendo-react-scheduler 7.0.0-develop.1 → 7.0.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.
Files changed (126) hide show
  1. package/Scheduler.d.ts +362 -0
  2. package/components/BaseView.d.ts +22 -0
  3. package/components/CurrentTimeMarket.d.ts +19 -0
  4. package/components/DateHeaderCell.d.ts +46 -0
  5. package/components/SchedulerForm.d.ts +71 -0
  6. package/components/SchedulerOccurrenceDialog.d.ts +46 -0
  7. package/components/SchedulerRemoveDialog.d.ts +42 -0
  8. package/components/ShowMoreItemsButton.d.ts +30 -0
  9. package/components/TimeHeaderCell.d.ts +46 -0
  10. package/components/footer/SchedulerFooter.d.ts +25 -0
  11. package/components/footer/bussiness-hours/BussinessHours.d.ts +17 -0
  12. package/components/header/SchedulerHeader.d.ts +22 -0
  13. package/components/header/navigation/NavigationDatePicker.d.ts +9 -0
  14. package/components/header/navigation/SchedulerNavigation.d.ts +28 -0
  15. package/components/header/view-selector/SchedulerViewSelector.d.ts +28 -0
  16. package/components/header/view-selector/ViewSelectorItem.d.ts +12 -0
  17. package/components/header/view-selector/ViewSelectorList.d.ts +7 -0
  18. package/constants/index.d.ts +58 -0
  19. package/context/SchedulerContext.d.ts +231 -0
  20. package/context/SchedulerEditItemContext.d.ts +172 -0
  21. package/context/SchedulerEditSlotContext.d.ts +51 -0
  22. package/context/SchedulerEditTaskContext.d.ts +33 -0
  23. package/context/SchedulerResourceIteratorContext.d.ts +20 -0
  24. package/context/SchedulerViewContext.d.ts +76 -0
  25. package/context/index.d.ts +9 -0
  26. package/dist/cdn/js/kendo-react-scheduler.js +5 -0
  27. package/editors/FilterableComboBox.d.ts +8 -0
  28. package/editors/ResourceEditor.d.ts +18 -0
  29. package/editors/SchedulerFormEditor.d.ts +246 -0
  30. package/editors/ZonedDateTime.d.ts +22 -0
  31. package/hooks/index.d.ts +14 -0
  32. package/hooks/use-items-focus.d.ts +27 -0
  33. package/hooks/use-items-selection.d.ts +35 -0
  34. package/hooks/use-slots-focus.d.ts +38 -0
  35. package/hooks/use-slots-selection.d.ts +28 -0
  36. package/hooks/useAsyncMouseEnterLeave.d.ts +15 -0
  37. package/hooks/useCellSync.d.ts +14 -0
  38. package/hooks/useControlledState.d.ts +17 -0
  39. package/hooks/useEditable.d.ts +7 -0
  40. package/hooks/usePropOrState.d.ts +6 -0
  41. package/hooks/useRowSync.d.ts +15 -0
  42. package/hooks/useSchedulerItem.d.ts +11 -0
  43. package/hooks/useSchedulerSlot.d.ts +11 -0
  44. package/hooks/useSlotExpand.d.ts +9 -0
  45. package/hooks/useWorkHours.d.ts +6 -0
  46. package/index.d.ts +45 -0
  47. package/index.js +5 -0
  48. package/index.mjs +5880 -0
  49. package/items/SchedulerEditItem.d.ts +330 -0
  50. package/items/SchedulerItem.d.ts +203 -0
  51. package/items/SchedulerItemContent.d.ts +15 -0
  52. package/items/SchedulerProportionalViewItem.d.ts +12 -0
  53. package/items/SchedulerViewItem.d.ts +34 -0
  54. package/items/hooks/use-drag-item.d.ts +46 -0
  55. package/items/hooks/use-form-item.d.ts +26 -0
  56. package/items/hooks/use-remove-item.d.ts +34 -0
  57. package/items/hooks/use-resize-item.d.ts +49 -0
  58. package/items/hooks/use-series.d.ts +27 -0
  59. package/items/hooks/use-show-occurrence-dialog.d.ts +31 -0
  60. package/items/hooks/use-show-remove-item-dialog.d.ts +31 -0
  61. package/messages/index.d.ts +240 -0
  62. package/models/DataItem.d.ts +12 -0
  63. package/models/DateRange.d.ts +22 -0
  64. package/models/EditableProp.d.ts +33 -0
  65. package/models/Fields.d.ts +21 -0
  66. package/models/Group.d.ts +12 -0
  67. package/models/Item.d.ts +68 -0
  68. package/models/Occurrence.d.ts +56 -0
  69. package/models/Omit.d.ts +8 -0
  70. package/models/Orientation.d.ts +6 -0
  71. package/models/Range.d.ts +14 -0
  72. package/models/Rect.d.ts +19 -0
  73. package/models/Resource.d.ts +12 -0
  74. package/models/SchedulerGroup.d.ts +17 -0
  75. package/models/SchedulerHandle.d.ts +12 -0
  76. package/models/SchedulerModelFields.d.ts +66 -0
  77. package/models/SchedulerResource.d.ts +37 -0
  78. package/models/SchedulerView.d.ts +80 -0
  79. package/models/Slot.d.ts +54 -0
  80. package/models/events.d.ts +87 -0
  81. package/models/index.d.ts +21 -0
  82. package/package-metadata.d.ts +9 -0
  83. package/package.json +12 -17
  84. package/recurrence/RecurrenceEditor.d.ts +16 -0
  85. package/recurrence/RecurrenceFrequencyEditor.d.ts +14 -0
  86. package/recurrence/RecurrenceRepeatOnWeekEditor.d.ts +17 -0
  87. package/recurrence/common.d.ts +61 -0
  88. package/recurrence/types/EndRule.d.ts +8 -0
  89. package/recurrence/types/Frequency.d.ts +8 -0
  90. package/recurrence/types/FrequencyEntity.d.ts +12 -0
  91. package/recurrence/types/MonthEntity.d.ts +11 -0
  92. package/recurrence/types/OffsetPosition.d.ts +8 -0
  93. package/recurrence/types/OffsetPositionEntity.d.ts +11 -0
  94. package/recurrence/types/RepeatOnRule.d.ts +8 -0
  95. package/recurrence/types/WeekDayEntity.d.ts +11 -0
  96. package/recurrence/types/WeekDayRule.d.ts +11 -0
  97. package/services/index.d.ts +8 -0
  98. package/services/itemsService.d.ts +16 -0
  99. package/services/occurrenceService.d.ts +7 -0
  100. package/services/rangeService.d.ts +7 -0
  101. package/services/slotsService.d.ts +10 -0
  102. package/slots/SchedulerEditSlot.d.ts +52 -0
  103. package/slots/SchedulerSlot.d.ts +127 -0
  104. package/slots/SchedulerViewSlot.d.ts +46 -0
  105. package/tasks/SchedulerEditTask.d.ts +79 -0
  106. package/tasks/SchedulerTask.d.ts +61 -0
  107. package/tasks/SchedulerViewTask.d.ts +32 -0
  108. package/utils/index.d.ts +172 -0
  109. package/views/agenda/AgendaView.d.ts +83 -0
  110. package/views/common/HorizontalResourceIterator.d.ts +30 -0
  111. package/views/common/SchedulerDrag.d.ts +39 -0
  112. package/views/common/SchedulerResize.d.ts +41 -0
  113. package/views/common/VerticalResourceIterator.d.ts +25 -0
  114. package/views/common/utils.d.ts +38 -0
  115. package/views/day/DayView.d.ts +15 -0
  116. package/views/day/DayViewAllDayRowContent.d.ts +12 -0
  117. package/views/day/DayViewGroupRowContent.d.ts +12 -0
  118. package/views/day/DayViewRowContent.d.ts +17 -0
  119. package/views/day/MultiDayView.d.ts +175 -0
  120. package/views/month/MonthView.d.ts +86 -0
  121. package/views/time/MultiDayTimelineView.d.ts +179 -0
  122. package/views/time/TimelineView.d.ts +27 -0
  123. package/views/time/TimelineViewAllEventsRowContent.d.ts +11 -0
  124. package/views/time/TimelineViewRowContent.d.ts +11 -0
  125. package/views/week/WeekView.d.ts +106 -0
  126. package/views/week/WorkWeekView.d.ts +9 -0
@@ -0,0 +1,330 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as React from 'react';
6
+ import { DataItem, SchedulerItemDragEvent, SchedulerItemMouseEvent, SchedulerItemKeyboardEvent, SchedulerItemFocusEvent } from '../models';
7
+ import { SchedulerOccurrenceDialogProps, SchedulerOccurrenceDialogStateChangeEvent } from '../components/SchedulerOccurrenceDialog';
8
+ import { SchedulerFormProps, SchedulerFormStateChangeEvent } from '../components/SchedulerForm';
9
+ import { SchedulerRemoveDialogProps, SchedulerRemoveDialogStateChangeEvent } from '../components/SchedulerRemoveDialog';
10
+ import { DataAction } from '../Scheduler';
11
+ import { SchedulerDragProps } from '../views/common/SchedulerDrag';
12
+ import { SchedulerResizeProps } from '../views/common/SchedulerResize';
13
+ import { SchedulerViewItemProps } from './SchedulerViewItem';
14
+ import { SchedulerItemsFocusAction, SchedulerSlotsFocusAction } from '../hooks';
15
+ import { SchedulerItemFormItemAction } from './hooks/use-form-item';
16
+ import { SchedulerItemShowOccurrenceDialogAction } from './hooks/use-show-occurrence-dialog';
17
+ import { SchedulerItemRemoveItemAction } from './hooks/use-remove-item';
18
+ import { SchedulerItemShowRemoveDialogAction } from './hooks/use-show-remove-item-dialog';
19
+ import { SchedulerItemDragItemAction } from './hooks/use-drag-item';
20
+ import { SchedulerItemResizeItemAction } from './hooks/use-resize-item';
21
+ import { SchedulerItemSeriesAction } from './hooks/use-series';
22
+ import { SchedulerItemsSelectAction } from '../hooks/use-items-selection';
23
+ import { SchedulerSlotsSelectAction } from '../hooks/use-slots-selection';
24
+ export interface SchedulerEditItemStateChangeEvent<T> {
25
+ value: T;
26
+ }
27
+ /**
28
+ * Represents the available SchedulerEditItem` actions.
29
+ *
30
+ * Can be one of:
31
+ * - [SchedulerItemDragItemAction]({% slug api_scheduler_scheduleritemdragitemaction %})
32
+ * - [SchedulerItemResizeItemAction]({% slug api_scheduler_scheduleritemresizeitemaction %})
33
+ * - [SchedulerItemRemoveItemAction]({% slug api_scheduler_scheduleritemremoveitemaction %})
34
+ * - [SchedulerItemShowRemoveDialogAction]({% slug api_scheduler_scheduleritemshowremovedialogaction %})
35
+ * - [SchedulerItemShowOccurrenceDialogAction]({% slug api_scheduler_scheduleritemshowoccurrencedialogaction %})
36
+ * - [SchedulerItemSeriesAction]({% slug api_scheduler_scheduleritemseriesaction %})
37
+ * - [SchedulerItemsFocusAction]({% slug api_scheduler_scheduleritemsfocusaction %})
38
+ * - [SchedulerItemsSelectAction]({% slug api_scheduler_scheduleritemsselectaction %})
39
+ * - [SchedulerSlotsFocusAction]({% slug api_scheduler_schedulerslotsfocusaction %})
40
+ * - [SchedulerSlotsSelectAction]({% slug api_scheduler_schedulerslotsselectaction %})
41
+ *
42
+ * The following `falsy` values will be ignored:
43
+ * - `null`
44
+ * - `false`
45
+ * - `undefined`
46
+ */
47
+ export type SchedulerEditItemAction = SchedulerItemFormItemAction | SchedulerItemDragItemAction | SchedulerItemResizeItemAction | SchedulerItemRemoveItemAction | SchedulerItemShowRemoveDialogAction | SchedulerItemShowOccurrenceDialogAction | SchedulerItemSeriesAction | SchedulerItemsFocusAction | SchedulerItemsSelectAction | SchedulerSlotsFocusAction | SchedulerSlotsSelectAction | null | false | undefined;
48
+ /**
49
+ * Represents the props of the KendoReact [SchedulerEditItem]() component.
50
+ */
51
+ export interface SchedulerEditItemProps extends SchedulerViewItemProps {
52
+ /**
53
+ * Overrides the default component responsible for positioning the item inside the view.
54
+ *
55
+ * The default Component is: [SchedulerViewItem]({% slug api_scheduler_schedulerviewitem %}).
56
+ */
57
+ viewItem?: React.ComponentType<SchedulerViewItemProps>;
58
+ /**
59
+ * Overrides the default component responsible for visualizing the `dragItem`.
60
+ *
61
+ * The default Component is: [SchedulerDrag]({% slug api_scheduler_schedulerdrag %}).
62
+ */
63
+ drag?: React.ComponentType<SchedulerDragProps>;
64
+ /**
65
+ * Overrides the default component responsible for visualizing the `resizeItem`.
66
+ *
67
+ * The default Component is: [SchedulerResize]({% slug api_scheduler_schedulerresize %}).
68
+ */
69
+ resize?: React.ComponentType<SchedulerResizeProps>;
70
+ /**
71
+ * Overrides the default component responsible for visualizing the `formItem`.
72
+ *
73
+ * The default Component is: [SchedulerForm]({% slug api_scheduler_schedulerform %}).
74
+ */
75
+ form?: React.ComponentType<SchedulerFormProps>;
76
+ /**
77
+ * Overrides the default component responsible for visualizing the `removeItem` and confirming the `remove` action.
78
+ *
79
+ * The default Component is: [SchedulerRemoveDialog]({% slug api_scheduler_schedulerremovedialog %}).
80
+ */
81
+ removeDialog?: React.ComponentType<SchedulerRemoveDialogProps>;
82
+ /**
83
+ * Overrides the default component responsible for the selection between `occurrence` and `series` edit.
84
+ *
85
+ * The default Component is: [SchedulerOccurrenceDialog]({% slug api_scheduler_scheduleroccurrencedialog %}).
86
+ */
87
+ occurrenceDialog?: React.ComponentType<SchedulerOccurrenceDialogProps>;
88
+ /**
89
+ * Called when the item has been removed or manipulated though dragging, resizing or an external form.
90
+ */
91
+ onDataAction?: (action: DataAction, event?: any) => void;
92
+ /**
93
+ * Setting this property will force the `formItem` to be in controlled state, allowing further customization.
94
+ */
95
+ formItem?: DataItem | null;
96
+ /**
97
+ * Called every time the `formItem` changes.
98
+ */
99
+ onFormItemChange?: (event: SchedulerEditItemStateChangeEvent<DataItem | null>) => void;
100
+ /**
101
+ * Setting this property will force the `dragItem` to be in controlled state, allowing further customization.
102
+ */
103
+ dragItem?: DataItem | null;
104
+ /**
105
+ * Called every time the `dragItem` changes.
106
+ */
107
+ onDragItemChange?: (event: SchedulerEditItemStateChangeEvent<DataItem | null>) => void;
108
+ /**
109
+ * Setting this property will force the `resizeItem` to be in controlled state, allowing further customization.
110
+ */
111
+ resizeItem?: DataItem | null;
112
+ /**
113
+ * Called every time the `resize` changes.
114
+ */
115
+ onResizeItemChange?: (event: SchedulerEditItemStateChangeEvent<DataItem | null>) => void;
116
+ /**
117
+ * Setting this property will force the `removeItem` to be in controlled state, allowing further customization.
118
+ *
119
+ * Specifies the DataItem which should be removed from the `data` set.
120
+ * The `removeItem` is passed as property to the `removeDialog` and `occurrenceDialog` component;
121
+ */
122
+ removeItem?: DataItem | null;
123
+ /**
124
+ * Called every time the `removeItem` changes.
125
+ */
126
+ onRemoveItemChange?: (event: SchedulerEditItemStateChangeEvent<DataItem | null>) => void;
127
+ /**
128
+ * Setting this property will force the `showOccurrenceDialog` to be in controlled state, allowing further control over the display of the `occurrenceDialog` component.
129
+ */
130
+ showOccurrenceDialog?: boolean;
131
+ /**
132
+ * Called every time the `showOccurrenceDialog` changes.
133
+ */
134
+ onShowOccurrenceDialogChange?: (event: SchedulerEditItemStateChangeEvent<boolean>) => void;
135
+ /**
136
+ * Setting this property will force the `showRemoveDialog` to be in controlled state, allowing further control over the display of the `removeDialog` component.
137
+ */
138
+ showRemoveDialog?: boolean;
139
+ /**
140
+ * Called every time the `showRemoveDialog` changes.
141
+ */
142
+ onShowRemoveDialogChange?: (event: SchedulerEditItemStateChangeEvent<boolean>) => void;
143
+ /**
144
+ * Indicates if the editing should be applied to the whole `series` or to a single `occurrence` when the item is recurring.
145
+ *
146
+ * By default, the `series` prop is set to `null` and additional selection is done through the `occurrence` dialog.
147
+ * If set ot either `true` or `false`:
148
+ * - `true` &mdash; indicates that the editing should always be applied to the whole `series`
149
+ * - `false` &mdash; indicates that the editing should always be applied to a single `occurrence`.
150
+ */
151
+ series?: boolean | null;
152
+ /**
153
+ * Called every time the `series` changes.
154
+ */
155
+ onSeriesChange?: (event: SchedulerEditItemStateChangeEvent<boolean | null>) => void;
156
+ /**
157
+ * Called whenever the `occurence` option is selected from the `OccurrenceDialog`.
158
+ */
159
+ onOccurrenceClick?: (event: SchedulerOccurrenceDialogStateChangeEvent<any>) => void;
160
+ /**
161
+ * An action callback. Used to define the component behavior on occurrence click.
162
+ *
163
+ * Internal state change will be triggered depending on the specific action types.
164
+ */
165
+ onOccurrenceClickAction?: (event: SchedulerOccurrenceDialogStateChangeEvent<any>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
166
+ /**
167
+ * Called whenever the `series` option is selected from the `OccurrenceDialog`.
168
+ */
169
+ onSeriesClick?: (event: SchedulerOccurrenceDialogStateChangeEvent<any>) => void;
170
+ /**
171
+ * An action callback. Used to define the component behavior on series click.
172
+ *
173
+ * Internal state change will be triggered depending on the specific action types.
174
+ */
175
+ onSeriesClickAction?: (event: SchedulerOccurrenceDialogStateChangeEvent<any>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
176
+ /**
177
+ * Called whenever the `confirm` option is selected from the `RemoveDialog`.
178
+ */
179
+ onRemoveConfirm?: (event: SchedulerRemoveDialogStateChangeEvent<any>) => void;
180
+ /**
181
+ * An action callback. Used to define the component behavior on remove confirm click.
182
+ *
183
+ * Internal state change will be triggered depending on the specific action types.
184
+ */
185
+ onRemoveConfirmAction?: (event: SchedulerRemoveDialogStateChangeEvent<any>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
186
+ /**
187
+ * Called whenever the `form` is submitted.
188
+ */
189
+ onFormSubmit?: (event: SchedulerFormStateChangeEvent<DataItem | null>) => void;
190
+ /**
191
+ * An action callback. Used to define the component behavior on form submit.
192
+ *
193
+ * Internal state change will be triggered depending on the specific action types.
194
+ */
195
+ onFormSubmitAction?: (event: SchedulerFormStateChangeEvent<DataItem | null>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
196
+ /**
197
+ * Called whenever the current edit is canceled.
198
+ */
199
+ onCancel?: (event: SchedulerFormStateChangeEvent<null> | SchedulerOccurrenceDialogStateChangeEvent<null>) => void;
200
+ /**
201
+ * An action callback. Used to define the component behavior on cancel.
202
+ *
203
+ * Internal state change will be triggered depending on the specific action types.
204
+ */
205
+ onCancelAction?: (event: SchedulerFormStateChangeEvent<null> | SchedulerOccurrenceDialogStateChangeEvent<null>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
206
+ /**
207
+ * An action callback. Used to define the component behavior on click.
208
+ *
209
+ * Internal state change will be triggered depending on the specific action types.
210
+ */
211
+ onClickAction?: (event: SchedulerItemMouseEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
212
+ /**
213
+ * An action callback. Used to define the component behavior on mouse down.
214
+ *
215
+ * Internal state change will be triggered depending on the specific action types.
216
+ */
217
+ onMouseDownAction?: (event: SchedulerItemMouseEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
218
+ /**
219
+ * An action callback. Used to define the component behavior on mouse up.
220
+ *
221
+ * Internal state change will be triggered depending on the specific action types.
222
+ */
223
+ onMouseUpAction?: (event: SchedulerItemMouseEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
224
+ /**
225
+ * An action callback. Used to define the component behavior on double click.
226
+ *
227
+ * Internal state change will be triggered depending on the specific action types.
228
+ */
229
+ onDoubleClickAction?: (event: SchedulerItemMouseEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
230
+ /**
231
+ * An action callback. Used to define the component behavior on remove click.
232
+ *
233
+ * Internal state change will be triggered depending on the specific action types.
234
+ */
235
+ onRemoveClickAction?: (event: SchedulerItemMouseEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
236
+ /**
237
+ * An action callback. Used to define the component behavior on key down.
238
+ *
239
+ * Internal state change will be triggered depending on the specific action types.
240
+ */
241
+ onKeyDownAction?: (event: SchedulerItemKeyboardEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
242
+ /**
243
+ * An action callback. Used to define the component behavior on key up.
244
+ *
245
+ * Internal state change will be triggered depending on the specific action types.
246
+ */
247
+ onKeyUpAction?: (event: SchedulerItemKeyboardEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
248
+ /**
249
+ * An action callback. Used to define the component behavior on focus.
250
+ *
251
+ * Internal state change will be triggered depending on the specific action types.
252
+ */
253
+ onFocusAction?: (event: SchedulerItemFocusEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
254
+ /**
255
+ * An action callback. Used to define the component behavior on blur.
256
+ *
257
+ * Internal state change will be triggered depending on the specific action types.
258
+ */
259
+ onBlurAction?: (event: SchedulerItemFocusEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
260
+ /**
261
+ * An action callback. Used to define the component behavior on press.
262
+ *
263
+ * Internal state change will be triggered depending on the specific action types.
264
+ */
265
+ onPressAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
266
+ /**
267
+ * An action callback. Used to define the component behavior on drag.
268
+ *
269
+ * Internal state change will be triggered depending on the specific action types.
270
+ */
271
+ onDragAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
272
+ /**
273
+ * An action callback. Used to define the component behavior on release.
274
+ *
275
+ * Internal state change will be triggered depending on the specific action types.
276
+ */
277
+ onReleaseAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
278
+ /**
279
+ * An action callback. Used to define the component behavior on resize press.
280
+ *
281
+ * Internal state change will be triggered depending on the specific action types.
282
+ */
283
+ onResizePressAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
284
+ /**
285
+ * An action callback. Used to define the component behavior on resize start drag.
286
+ *
287
+ * Internal state change will be triggered depending on the specific action types.
288
+ */
289
+ onResizeStartDragAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
290
+ /**
291
+ * An action callback. Used to define the component behavior on resize end drag.
292
+ *
293
+ * Internal state change will be triggered depending on the specific action types.
294
+ */
295
+ onResizeEndDragAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
296
+ /**
297
+ * An action callback. Used to define the component behavior on resize release.
298
+ *
299
+ * Internal state change will be triggered depending on the specific action types.
300
+ */
301
+ onResizeReleaseAction?: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction | (SchedulerEditItemAction)[];
302
+ }
303
+ /**
304
+ * Represents the internal `state` of the `SchedulerEditItem`.
305
+ */
306
+ export interface SchedulerEditItemState {
307
+ selected: boolean;
308
+ series: boolean | null;
309
+ formItem: DataItem | null;
310
+ dragItem: DataItem | null;
311
+ resizeItem: DataItem | null;
312
+ removeItem: DataItem | null;
313
+ showRemoveDialog: DataItem | null;
314
+ showOccurrenceDialog: DataItem | null;
315
+ }
316
+ /**
317
+ * Represents the object which is returned from the `ref` callback of the [SchedulerEditItem]({% slug api_scheduler_scheduleredititem %}).
318
+ *
319
+ * For more information about Refs, refer to the [React Refs & Dom](https://reactjs.org/docs/refs-and-the-dom.html) article.
320
+ */
321
+ export interface SchedulerEditItemHandle {
322
+ element: HTMLDivElement | null;
323
+ props: SchedulerEditItemProps;
324
+ }
325
+ /**
326
+ * Represents the default `editItem` component rendered by the [KendoReact Scheduler component]({% slug overview_scheduler %}).
327
+ *
328
+ * This is a composite component of the [`SchedulerViewItem`]({% slug api_scheduler_schedulerviewitem %}), extending it to provide editing through drag, resize and external form.
329
+ */
330
+ export declare const SchedulerEditItem: React.ForwardRefExoticComponent<SchedulerEditItemProps & React.RefAttributes<SchedulerEditItemHandle>>;
@@ -0,0 +1,203 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as React from 'react';
6
+ import { Item, SchedulerItemDragEvent, SchedulerItemFocusEvent, SchedulerItemMouseEvent, SchedulerItemKeyboardEvent, EditableProp } from '../models';
7
+ /**
8
+ * Represents the props of the KendoReact [SchedulerItem]({% slug api_scheduler_scheduleritem %}) component.
9
+ */
10
+ export interface SchedulerItemProps extends Item {
11
+ /**
12
+ * Specifies the `id` of the wrapping element of the SchedulerItem.
13
+ */
14
+ id?: string;
15
+ /**
16
+ * Specifies the `tabIndex` attribute of the wrapping element of the SchedulerItem.
17
+ *
18
+ * Providing `null` will not apply any `tabIndex` to the element.
19
+ */
20
+ tabIndex?: number | null;
21
+ /**
22
+ * Specifies the `className` attribute of the wrapping element of the SchedulerItem.
23
+ *
24
+ * The SchedulerItem applies the following default className:
25
+ * - `k-event`
26
+ * - `k-selected` - if `props.selected` is set to `true`
27
+ * - `k-event-drag-hint` - if `props.dragHint` is set to `true`
28
+ * - `k-scheduler-marquee` - if `props.resizeHint` is set to `true`
29
+ * - `k-marquee`: if `props.resizeHint` is set to `true`
30
+ * - `k-first`: if `props.resizeHint` is set to `true` and `props.tail` is set to `false`
31
+ * - `k-last`: if `props.resizeHint` is set to `true` and `props.head` is set to `false`
32
+ */
33
+ className?: string;
34
+ /**
35
+ * Specifies the `style` object of the wrapping element of the SchedulerItem.
36
+ *
37
+ * The SchedulerItem applies the following default styles:
38
+ * - `cursor`: `pointer`
39
+ * - `userSelect`: `none`
40
+ * - `borderColor`: `props.color`
41
+ * - `borderColor`: `props.color`
42
+ * - `pointerEvents`: `none` - if `props.dragHint` or `props.resizeHint` is set to `true`
43
+ */
44
+ style?: React.CSSProperties;
45
+ /**
46
+ * Specifies the `children` of the SchedulerItem.
47
+ *
48
+ * Setting this property will override the default elements rendered by the SchedulerItem.
49
+ */
50
+ children?: React.ReactNode;
51
+ /**
52
+ * Overrides the `editable` prop of the `Scheduler` and the active view.
53
+ */
54
+ editable?: EditableProp | boolean;
55
+ /**
56
+ * Sets the selected state of the SchedulerSlot. By default the `k-selected` className is added if `props.selected` is `true`.
57
+ */
58
+ selected?: boolean;
59
+ /**
60
+ * Specifies the orientation of the SchedulerItem.
61
+ */
62
+ vertical?: boolean;
63
+ /**
64
+ * Returns true if it is the last item rendered in the current view.
65
+ */
66
+ isLast?: boolean;
67
+ /**
68
+ * Specifies if the current SchedulerItem is used as a DragHint.
69
+ */
70
+ dragHint?: boolean;
71
+ /**
72
+ * Specifies if the current SchedulerItem is used as a ResizeHint.
73
+ */
74
+ resizeHint?: boolean;
75
+ /**
76
+ * Specifies the `format` in which the `zonedStart` and `zonedEnd` properties are displayed.
77
+ *
78
+ * For more information, refer to the [formatDate]({% slug api_intl_intlservice %}#toc-formatdate) method of the [IntlService]({% slug overview_globalization %}).
79
+ */
80
+ format?: string;
81
+ /**
82
+ * Called each time the element, or any of its child elements, receive focus.
83
+ */
84
+ onFocus?: (event: SchedulerItemFocusEvent) => void;
85
+ /**
86
+ * Called each time the element, or any of its child elements, lose focus.
87
+ */
88
+ onBlur?: (event: SchedulerItemFocusEvent) => void;
89
+ /**
90
+ * Called each time the element, or any of its child elements resceives `mousedown` event.
91
+ */
92
+ onMouseDown?: (event: SchedulerItemMouseEvent) => void;
93
+ /**
94
+ * Called each time the element, or any of its child elements resceives `mouseup` event.
95
+ */
96
+ onMouseUp?: (event: SchedulerItemMouseEvent) => void;
97
+ /**
98
+ * Called each time the element, or any of its child elements, is clicked.
99
+ */
100
+ onClick?: (event: SchedulerItemMouseEvent) => void;
101
+ /**
102
+ * Called each time the element, or any of its child elements receives `mouseenter` event.
103
+ */
104
+ onMouseEnter?: (event: SchedulerItemMouseEvent) => void;
105
+ /**
106
+ * Called each time the element, or any of its child elements receives `mouseleave` event.
107
+ */
108
+ onMouseLeave?: (event: SchedulerItemMouseEvent) => void;
109
+ /**
110
+ * Called each time the element, or any of its child elements receives `mouseover` event.
111
+ */
112
+ onMouseOver?: (event: SchedulerItemMouseEvent) => void;
113
+ /**
114
+ * Called each time the element, or any of its child elements receives `mouseout` event.
115
+ */
116
+ onMouseOut?: (event: SchedulerItemMouseEvent) => void;
117
+ /**
118
+ * Called each time the element, or any of its child elements, is double-clicked.
119
+ */
120
+ onDoubleClick?: (event: SchedulerItemMouseEvent) => void;
121
+ /**
122
+ * Called when the `delete` icon is clicked.
123
+ *
124
+ * The `delete` icon is rendered only when `props.editable` or `props.editable.remove` is `true`
125
+ */
126
+ onRemoveClick?: (event: SchedulerItemMouseEvent) => void;
127
+ /**
128
+ * Called each time a `keydown` event propagates to the wrapping element.
129
+ */
130
+ onKeyDown?: (event: SchedulerItemKeyboardEvent) => void;
131
+ /**
132
+ * Called each time a `keypress` event propagates to the wrapping element.
133
+ */
134
+ onKeyPress?: (event: SchedulerItemKeyboardEvent) => void;
135
+ /**
136
+ * Called each time a `keyup` event propagates to the wrapping element.
137
+ */
138
+ onKeyUp?: (event: SchedulerItemKeyboardEvent) => void;
139
+ /**
140
+ * Called each time the element receives a `press` event.
141
+ *
142
+ * This event is used by the [`Drag & Drop`]({% slug editing_scheduler %}) functionality of the SchedulerItem.
143
+ * The SchedulerItem is using the [KendoReactDraggable]({% slug draggable_common %}) instead of the `onDragStart` callback.
144
+ */
145
+ onPress?: (event: SchedulerItemDragEvent) => void;
146
+ /**
147
+ * Called each time the element is dragged.
148
+ *
149
+ * This event is used by the [`Drag & Drop`]({% slug editing_scheduler %}) functionality of the SchedulerItem.
150
+ * The SchedulerItem is using the [KendoReactDraggable]({% slug draggable_common %}) instead of the `onDrag` callback.
151
+ */
152
+ onDrag?: (event: SchedulerItemDragEvent) => void;
153
+ /**
154
+ * Called when the dragged element is being `released`.
155
+ *
156
+ * This event is used by the [`Drag & Drop`]({% slug editing_scheduler %}) functionality of the SchedulerItem.
157
+ * The SchedulerItem is using the [KendoReactDraggable]({% slug draggable_common %}) instead of the `onDragEnd` callback.
158
+ */
159
+ onRelease?: (event: SchedulerItemDragEvent) => void;
160
+ /**
161
+ * Called each time the any of the resize handlers receives a `press` event.
162
+ *
163
+ * This event is used by the [`Resize`]({% slug editing_scheduler %}) functionality of the SchedulerItem.
164
+ * The SchedulerItem is using the [KendoReactDraggable]({% slug draggable_common %}) instead of the `onDragStart` callback.
165
+ */
166
+ onResizePress?: (event: SchedulerItemDragEvent) => void;
167
+ /**
168
+ * Called each time the the resize handler responsible for the item `start` is being dragged.
169
+ *
170
+ * This event is used by the [`Resize`]({% slug editing_scheduler %}) functionality of the SchedulerItem.
171
+ * The SchedulerItem is using the [KendoReactDraggable]({% slug draggable_common %}) instead of the `onDrag` callback.
172
+ */
173
+ onResizeStartDrag?: (event: SchedulerItemDragEvent) => void;
174
+ /**
175
+ * Called each time the the resize handler responsible for the item `end` is being dragged.
176
+ *
177
+ * This event is used by the [`Resize`]({% slug editing_scheduler %}) functionality of the SchedulerItem.
178
+ * The SchedulerItem is using the [KendoReactDraggable]({% slug draggable_common %}) instead of the `onDrag` callback.
179
+ */
180
+ onResizeEndDrag?: (event: SchedulerItemDragEvent) => void;
181
+ /**
182
+ * Called when the dragged resize handler is being `released`
183
+ *
184
+ * This event is used by the [`Resize`]({% slug editing_scheduler %}) functionality of the SchedulerItem.
185
+ * The SchedulerItem is using the [KendoReactDraggable]({% slug draggable_common %}) instead of the `onDragEnd` callback.
186
+ */
187
+ onResizeRelease?: (event: SchedulerItemDragEvent) => void;
188
+ /** @hidden */
189
+ _maxSiblingsPerSlot?: number;
190
+ }
191
+ /**
192
+ * Represents the object which is returned from the `ref` callback of the [SchedulerItem]({% slug api_scheduler_scheduleritem %}).
193
+ *
194
+ * For more information about Refs, refer to the [React Refs & Dom](https://reactjs.org/docs/refs-and-the-dom.html) article.
195
+ */
196
+ export interface SchedulerItemHandle {
197
+ element: HTMLDivElement | null;
198
+ props: SchedulerItemProps;
199
+ }
200
+ /**
201
+ * Represents the default `item` component rendered by the [KendoReact Scheduler component]({% slug overview_scheduler %}).
202
+ */
203
+ export declare const SchedulerItem: React.ForwardRefExoticComponent<SchedulerItemProps & React.RefAttributes<SchedulerItemHandle>>;
@@ -0,0 +1,15 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as React from 'react';
6
+ /**
7
+ * Represents the props of the [SchedulerItemContent]({% slug api_scheduler_scheduleritemcontent %}) component.
8
+ * Extends the [native `div` props`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDivElement).
9
+ */
10
+ export interface SchedulerItemContentProps extends React.HTMLAttributes<HTMLDivElement> {
11
+ }
12
+ /**
13
+ * A component which applies the necessary `className` for correct styling of child elements inside the [SchedulerItem]({% slug api_scheduler_scheduleritem %})
14
+ */
15
+ export declare const SchedulerItemContent: React.ForwardRefExoticComponent<SchedulerItemContentProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as React from 'react';
6
+ import { SchedulerViewItemHandle, SchedulerViewItemProps } from './SchedulerViewItem';
7
+ /**
8
+ * Represents a customized `viewItem` component which position itself proportionally to the duration of the item.
9
+ *
10
+ * This is a composite component of the [`SchedulerItem`]({% slug api_scheduler_scheduleritem %}), extending it to provide extended positioning inside a view.
11
+ */
12
+ export declare const SchedulerProportionalViewItem: React.ForwardRefExoticComponent<SchedulerViewItemProps & React.RefAttributes<SchedulerViewItemHandle>>;
@@ -0,0 +1,34 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as React from 'react';
6
+ import { SchedulerItemProps } from './SchedulerItem';
7
+ /**
8
+ * Represents the props of the KendoReact [SchedulerViewItem]({% slug api_scheduler_schedulerviewitem %}) component.
9
+ */
10
+ export interface SchedulerViewItemProps extends SchedulerItemProps {
11
+ /** @hidden */
12
+ ignoreIsAllDay?: boolean;
13
+ /**
14
+ * Overrides the default component responsible for visualizing a single item.
15
+ *
16
+ * The default Component is: [SchedulerItem]({% slug api_scheduler_scheduleritem %}).
17
+ */
18
+ item?: React.ComponentType<SchedulerItemProps>;
19
+ }
20
+ /**
21
+ * Represents the object which is returned from the `ref` callback of the [SchedulerViewItem]({% slug api_scheduler_schedulerviewitem %}).
22
+ *
23
+ * For more information about Refs, refer to the [React Refs & Dom](https://reactjs.org/docs/refs-and-the-dom.html) article.
24
+ */
25
+ export interface SchedulerViewItemHandle {
26
+ element: HTMLDivElement | null;
27
+ props: SchedulerViewItemProps;
28
+ }
29
+ /**
30
+ * Represents the default `viewItem` component rendered by the [KendoReact Scheduler component]({% slug overview_scheduler %}).
31
+ *
32
+ * This is a composite component of the [`SchedulerItem`]({% slug api_scheduler_scheduleritem %}), extending it to provide proper positioning inside a view.
33
+ */
34
+ export declare const SchedulerViewItem: React.ForwardRefExoticComponent<SchedulerViewItemProps & React.RefAttributes<SchedulerViewItemHandle>>;
@@ -0,0 +1,46 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { DataItem } from '../../models';
6
+ /**
7
+ * Represents the available `action` types for the `SchedulerItemDragItemAction` objects.
8
+ *
9
+ * The available types are:
10
+ * - `DRAG_ITEM_SET'`
11
+ * - `DRAG_ITEM_START'`
12
+ * - `DRAG_ITEM_DRAG'`
13
+ * - `DRAG_ITEM_COMPLETE'`
14
+ * - `DRAG_ITEM_COMPLETE_OCCURRENCE'`
15
+ * - `DRAG_ITEM_COMPLETE_SERIES'`
16
+ * - `DRAG_ITEM_RESET'`
17
+ * - `DRAG_ITEM_DRAG_SELECTED`
18
+ */
19
+ export declare enum DRAG_ITEM_ACTION {
20
+ set = "DRAG_ITEM_SET",
21
+ start = "DRAG_ITEM_START",
22
+ drag = "DRAG_ITEM_DRAG",
23
+ complete = "DRAG_ITEM_COMPLETE",
24
+ completeOccurrence = "DRAG_ITEM_COMPLETE_OCCURRENCE",
25
+ completeSeries = "DRAG_ITEM_COMPLETE_SERIES",
26
+ reset = "DRAG_ITEM_RESET",
27
+ dragSelected = "DRAG_ITEM_DRAG_SELECTED"
28
+ }
29
+ /**
30
+ * Represents the object passed to the `drag-item` reducer.
31
+ */
32
+ export interface SchedulerItemDragItemAction {
33
+ type: DRAG_ITEM_ACTION;
34
+ payload?: DataItem;
35
+ }
36
+ /** @hidden */
37
+ export declare const useDragItem: (config: {
38
+ dataItem: DataItem;
39
+ ignoreIsAllDay?: boolean;
40
+ isAllDay?: boolean;
41
+ onDataAction?: any;
42
+ }, state: [
43
+ DataItem,
44
+ DataItem,
45
+ any
46
+ ]) => any[];
@@ -0,0 +1,26 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { DataItem } from '../../models';
6
+ /** @hidden */
7
+ export declare enum FORM_ITEM_ACTION {
8
+ set = "FORM_ITEM_SET",
9
+ setMaster = "FORM_ITEM_SET_MASTER",
10
+ reset = "FORM_ITEM_RESET",
11
+ complete = "FORM_ITEM_COMPLETE"
12
+ }
13
+ /** @hidden */
14
+ export type SchedulerItemFormItemAction = {
15
+ type: FORM_ITEM_ACTION;
16
+ payload?: DataItem;
17
+ };
18
+ /** @hidden */
19
+ export declare const useFormItem: (config: {
20
+ series: boolean;
21
+ onDataAction?: any;
22
+ }, state: [
23
+ DataItem,
24
+ DataItem,
25
+ any
26
+ ]) => any[];