@progress/kendo-react-gantt 13.3.0 → 13.4.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/Gantt.d.ts +42 -0
  2. package/GanttNoRecords.d.ts +19 -0
  3. package/cells/FilterCells/GanttBooleanFilter.d.ts +17 -0
  4. package/cells/FilterCells/GanttDateFilter.d.ts +17 -0
  5. package/cells/FilterCells/GanttNumericFilter.d.ts +17 -0
  6. package/cells/FilterCells/GanttTextFilter.d.ts +17 -0
  7. package/cells/FilterCells/utils.d.ts +45 -0
  8. package/cells/FilterCells/utils.mjs +11 -11
  9. package/components/BaseView.d.ts +27 -0
  10. package/components/GanttDependency.d.ts +17 -0
  11. package/components/GanttTask.d.ts +19 -0
  12. package/components/GanttTreelist.d.ts +146 -0
  13. package/components/GanttTreelist.mjs +8 -8
  14. package/components/toolbar/AddButton.d.ts +19 -0
  15. package/components/toolbar/AddButton.mjs +2 -2
  16. package/components/toolbar/Toolbar.d.ts +28 -0
  17. package/components/toolbar/view-selector/ViewSelector.d.ts +31 -0
  18. package/components/toolbar/view-selector/ViewSelectorItem.d.ts +19 -0
  19. package/components/toolbar/view-selector/ViewSelectorList.d.ts +10 -0
  20. package/constants/index.d.ts +60 -0
  21. package/constants/index.mjs +2 -2
  22. package/context/GanttContext.d.ts +128 -0
  23. package/context/GanttViewContext.d.ts +47 -0
  24. package/dist/cdn/js/kendo-react-gantt.js +1 -1
  25. package/editors/FormAssingmentsEditor.d.ts +13 -0
  26. package/editors/FormDateTimePicker.d.ts +13 -0
  27. package/editors/FormDropDownList.d.ts +13 -0
  28. package/editors/FormInput.d.ts +13 -0
  29. package/editors/FormNumericTextBox.d.ts +13 -0
  30. package/editors/GanttEditor.d.ts +46 -0
  31. package/editors/GanttEditor.mjs +5 -5
  32. package/editors/GanttEditorPredecessors.d.ts +53 -0
  33. package/editors/GanttEditorSuccessors.d.ts +53 -0
  34. package/editors/GanttForm.d.ts +73 -0
  35. package/editors/GanttForm.mjs +2 -2
  36. package/editors/GanttRemoveDialog.d.ts +51 -0
  37. package/editors/GanttRemoveDialog.mjs +2 -2
  38. package/hooks/useControlledState.d.ts +11 -0
  39. package/hooks/useDictionaryStore.d.ts +25 -0
  40. package/hooks/useGanttTask.d.ts +11 -0
  41. package/index.d.mts +28 -1607
  42. package/index.d.ts +28 -1607
  43. package/interfaces/AddDirection.d.ts +13 -0
  44. package/interfaces/DataAction.d.ts +32 -0
  45. package/interfaces/DataItem.d.ts +13 -0
  46. package/interfaces/DateRange.d.ts +15 -0
  47. package/interfaces/DependencyModelFields.d.ts +32 -0
  48. package/interfaces/DependencyType.d.ts +22 -0
  49. package/interfaces/DragEvent.d.ts +21 -0
  50. package/interfaces/GanttBaseProps.d.ts +81 -0
  51. package/interfaces/GanttCellProps.d.ts +48 -0
  52. package/interfaces/GanttColumnProps.d.ts +43 -0
  53. package/interfaces/GanttDependency.d.ts +33 -0
  54. package/interfaces/GanttDependencyModelFields.d.ts +32 -0
  55. package/interfaces/GanttFilterCellProps.d.ts +13 -0
  56. package/interfaces/GanttFilterOperator.d.ts +13 -0
  57. package/interfaces/GanttHeaderCellProps.d.ts +13 -0
  58. package/interfaces/GanttNoRecordsProps.d.ts +16 -0
  59. package/interfaces/GanttProps.d.ts +238 -0
  60. package/interfaces/GanttRowProps.d.ts +98 -0
  61. package/interfaces/GanttSelectableSettings.d.ts +25 -0
  62. package/interfaces/GanttSlotType.d.ts +11 -0
  63. package/interfaces/GanttSortSettings.d.ts +20 -0
  64. package/interfaces/GanttTaskModelFields.d.ts +67 -0
  65. package/interfaces/GanttView.d.ts +147 -0
  66. package/interfaces/GanttViewTimelineHeaderCellProps.d.ts +38 -0
  67. package/interfaces/Rectangle.d.ts +13 -0
  68. package/interfaces/Slot.d.ts +19 -0
  69. package/interfaces/TaskModelFields.d.ts +56 -0
  70. package/interfaces/events.d.ts +304 -0
  71. package/messages/index.d.ts +197 -0
  72. package/package-metadata.d.ts +12 -0
  73. package/package-metadata.js +1 -1
  74. package/package-metadata.mjs +10 -16
  75. package/package.json +14 -14
  76. package/rows/GanttRow.d.ts +11 -0
  77. package/utils/data-operations.d.ts +50 -0
  78. package/utils/data-operations.mjs +1 -1
  79. package/utils/index.d.ts +185 -0
  80. package/utils/index.mjs +4 -4
  81. package/views/GanttDayView.d.ts +24 -0
  82. package/views/GanttDayView.mjs +5 -5
  83. package/views/GanttMonthView.d.ts +20 -0
  84. package/views/GanttWeekView.d.ts +20 -0
  85. package/views/GanttWeekView.mjs +4 -4
  86. package/views/GanttYearView.d.ts +20 -0
package/index.d.ts CHANGED
@@ -5,1610 +5,31 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { BaseEvent } from '@progress/kendo-react-common';
9
- import { CellProps } from '@progress/kendo-react-data-tools';
10
- import { ComponentType } from 'react';
11
- import { CompositeFilterDescriptor } from '@progress/kendo-data-query';
12
- import { Day } from '@progress/kendo-date-math';
13
- import { filterBy as filterBy_2 } from '@progress/kendo-react-data-tools';
14
- import { FilterCellProps } from '@progress/kendo-react-data-tools';
15
- import { FilterComponentProps } from '@progress/kendo-react-data-tools';
16
- import { FilterDescriptor } from '@progress/kendo-data-query';
17
- import { FilterOperator } from '@progress/kendo-react-data-tools';
18
- import { ForwardRefExoticComponent } from 'react';
19
- import { getSelectedState } from '@progress/kendo-react-data-tools';
20
- import { getSelectedStateFromKeyDown } from '@progress/kendo-react-data-tools';
21
- import { HeaderCellProps } from '@progress/kendo-react-data-tools';
22
- import { IntlService } from '@progress/kendo-react-intl';
23
- import { LocalizationService } from '@progress/kendo-react-intl';
24
- import { orderBy as orderBy_2 } from '@progress/kendo-react-data-tools';
25
- import * as React_2 from 'react';
26
- import { RefAttributes } from 'react';
27
- import { setSelectedState } from '@progress/kendo-react-data-tools';
28
- import { SortDescriptor } from '@progress/kendo-data-query';
29
- import { SortSettings } from '@progress/kendo-react-data-tools';
30
- import { TableKeyDownEvent } from '@progress/kendo-react-data-tools';
31
- import { TableSelectableMode } from '@progress/kendo-react-data-tools';
32
- import { TableSelectableSettings } from '@progress/kendo-react-data-tools';
33
- import { TableSelectionChangeEvent } from '@progress/kendo-react-data-tools';
34
- import { TreeColumnBaseProps } from '@progress/kendo-react-data-tools';
35
- import { TreeListRowProps } from '@progress/kendo-react-treelist';
36
- import { ZonedDate } from '@progress/kendo-date-math';
37
-
38
- /**
39
- * @hidden
40
- */
41
- export declare const addDependency: (options: {
42
- defaultDataItem?: DataItem;
43
- dependencyModelFields: DependencyModelFields;
44
- dependencyData: DataItem[];
45
- fromId: any;
46
- toId: any;
47
- type: number;
48
- }) => DataItem[];
49
-
50
- /**
51
- * The direction of the add new task action.
52
- * If set to 'none' the task should be added at the end of the data collection.
53
- * If set to 'above', 'below' or 'child', `selectedTask` option should be provided.
54
- */
55
- declare type AddDirection = 'none' | 'above' | 'below' | 'child';
56
-
57
- /**
58
- * @hidden
59
- */
60
- export declare const addTask: (options: {
61
- defaultDataItem?: DataItem;
62
- selectedDataItem?: DataItem;
63
- direction: AddDirection;
64
- taskModelFields: TaskModelFields;
65
- dataTree: DataItem[];
66
- slotStart: Date;
67
- slotEnd: Date;
68
- }) => DataItem[];
69
-
70
- declare interface ColumnDragEvent {
71
- /**
72
- * An event target.
73
- */
74
- target: GanttHandle;
75
- /**
76
- * A native DOM event.
77
- */
78
- nativeEvent: any;
79
- /**
80
- * The current columns collection.
81
- */
82
- columns: GanttColumnProps[];
83
- }
84
-
85
- /**
86
- * Creates a tree from the passed dataset.
87
- *
88
- * @param {object[]} dataset - The source dataset of data items.
89
- * @param {(item: object) => any} getId - A function which will return the id of the data item.
90
- * @param {(item: object) => any} getParentId - A function which will return the data item id of its parent data item.
91
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
92
- * @returns {object[]} - A collection of the generated data items that are structured in a tree.
93
- */
94
- export declare const createDataTree: (dataset: any[], getId: (item: any) => any, getParentId: (item: any) => any, subItemsField: string) => any[];
95
-
96
- /**
97
- * Represents the items which the [`data`](https://www.telerik.com/kendo-react-ui/components/gantt/api/ganttprops#toc-data) property accepts.
98
- * The `data` has no strict type. However, to visualize it correctly,
99
- * use it in combination with the [`modelFields`](https://www.telerik.com/kendo-react-ui/components/gantt/api/ganttprops#toc-modelfields) property.
100
- */
101
- declare type DataItem = any;
102
-
103
- /** @hidden */
104
- declare interface DateRange {
105
- start: Date;
106
- end: Date;
107
- zonedStart: ZonedDate;
108
- zonedEnd: ZonedDate;
109
- }
110
-
111
- /**
112
- * Represents the combined object of the default and custom GanttDependencyModelFields.
113
- */
114
- declare interface DependencyModelFields {
115
- /**
116
- * The unique identifier of the Gantt dependency. Dependencies, whose id is not set, are considered as "new".
117
- * Defaults to `"id"`.
118
- */
119
- id: string;
120
- /**
121
- * The unique identifier of the from task.
122
- * Defaults to `"fromId"`.
123
- */
124
- fromId: string;
125
- /**
126
- * The unique identifier of the to task.
127
- * Defaults to `"toId"`.
128
- */
129
- toId: string;
130
- /**
131
- * The type of the dependency.
132
- * Defaults to `"type"`.
133
- */
134
- type: string;
135
- }
136
-
137
- /**
138
- * The dependency type when two tasks are connected.
139
- *
140
- * The supported values are:
141
- * * `FF`—from 'finish' to 'finish'
142
- * * `FS`—from 'finish' to 'start'
143
- * * `SS`—from 'start' to 'start'
144
- * * `SF`—from 'start' to 'finish'
145
- */
146
- declare enum DependencyType {
147
- FF = 0,
148
- FS = 1,
149
- SF = 2,
150
- SS = 3
151
- }
152
-
153
- /**
154
- * Similar to the `Object.assign` function. Additionally, creates a new array for the subitems.
155
- *
156
- * @param {object} item - The source data item.
157
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
158
- * @param {object} propsToExtend - The props with which the source data item will be extended.
159
- * @returns {object} - The target data item.
160
- */
161
- export declare const extendDataItem: (item: any, subItemsField: string, propsToExtend?: any) => any;
162
-
163
- /**
164
- * Filters the provided data tree according to the specified `Array<FilterDescriptor|CompositeFilterDescriptor>`.
165
- *
166
- * @param {T[]} data - The data that will be filtered.
167
- * @param {FilterDescriptor[]|CompositeFilterDescriptor[]} descriptors - The filter criteria that will be applied.
168
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
169
- * @returns {T[]} - The filtered data.
170
- */
171
- export declare const filterBy: typeof filterBy_2;
172
-
173
- /**
174
- * Represents the Gantt component.
175
- *
176
- * @remarks
177
- * Supported children components are: {@link GanttWeekView}, {@link GanttDayView}, {@link GanttMonthView}, {@link GanttYearView}.
178
- */
179
- export declare const Gantt: React_2.ForwardRefExoticComponent<GanttProps & React_2.RefAttributes<GanttHandle | null>>;
180
-
181
- /** The attribute required by the Gantt selection on Gantt `td` elements. */
182
- export declare const GANTT_COL_INDEX_ATTRIBUTE = "data-grid-col-index";
183
-
184
- /** Attribute which disable selection start from this element. */
185
- export declare const GANTT_PREVENT_SELECTION_ELEMENT = "data-prevent-selection";
186
-
187
- /** The attribute required by the Gantt selection on Gantt `tr` elements. */
188
- export declare const GANTT_ROW_INDEX_ATTRIBUTE = "data-grid-row-index";
189
-
190
- /**
191
- * Represents the object of the `onAddClick` Gantt event.
192
- */
193
- export declare interface GanttAddClickEvent extends GanttEvent {
194
- /**
195
- * The direction of the add action.
196
- */
197
- direction: AddDirection;
198
- /**
199
- * The data item which is currently selected.
200
- */
201
- selectedDataItem?: any;
202
- /**
203
- * Current view first slot range start date.
204
- */
205
- slotStart: Date;
206
- /**
207
- * Current view first slot range end date.
208
- */
209
- slotEnd: Date;
210
- }
211
-
212
- /**
213
- * @hidden
214
- */
215
- declare interface GanttBaseProps {
216
- /**
217
- * Represents the component that will be rendered when the `data` property of the Gantt is empty or undefined.
218
- */
219
- noRecords?: React.ReactElement<GanttNoRecordsProps>;
220
- /**
221
- * A collection of `GanttColumnProps` for creating columns.
222
- */
223
- columns?: GanttColumnProps[];
224
- /**
225
- * Specifies the id of the timezone that will be displayed in the Gantt.
226
- * For example, `Europe/Sofia`.
227
- *
228
- * Defaults to `Etc/UTC`.
229
- */
230
- timezone?: string;
231
- /**
232
- * If set to `true`, the user can resize columns by dragging the edges (resize handles) of their header cells.
233
- *
234
- * @default false
235
- */
236
- resizable?: boolean;
237
- /**
238
- * Enables sorting ([see example](https://www.telerik.com/kendo-react-ui/components/gantt/sorting)).
239
- */
240
- sortable?: GanttSortSettings;
241
- /**
242
- * The descriptors by which the data is sorted. Applies the sorting styles and buttons to the affected columns.
243
- */
244
- sort?: SortDescriptor[];
245
- /**
246
- * The descriptors by which the data is filtered ([more information and examples](https://www.telerik.com/kendo-react-ui/components/gantt/filtering)).
247
- * This affects the values and buttons in the `FilterRow` of the Gantt.
248
- */
249
- filter?: FilterDescriptor[];
250
- /**
251
- * If set to `true`, the user can reorder columns by dragging their header cells.
252
- *
253
- * @default false
254
- */
255
- reorderable?: boolean;
256
- /**
257
- * If set to `true`, the user can use dedicated shortcuts to interact with the Gantt.
258
- * By default, navigation is disabled and the Gantt content is accessible in the normal tab sequence.
259
- *
260
- * @default false
261
- */
262
- navigatable?: boolean;
263
- /**
264
- * The descriptors by which the data is filtered in the column menu.
265
- */
266
- columnMenuFilter?: CompositeFilterDescriptor[];
267
- /**
268
- * The component to render as the column menu.
269
- */
270
- columnMenu?: React.ComponentType<any>;
271
- /**
272
- * The Gantt row component.
273
- */
274
- row?: React.ComponentType<GanttRowProps>;
275
- /**
276
- * The Gantt selectable settings.
277
- */
278
- selectable?: GanttSelectableSettings;
279
- }
280
-
281
- export declare const GanttBooleanFilter: React_2.FunctionComponent<GanttBooleanFilterProps>;
282
-
283
- export declare interface GanttBooleanFilterProps extends FilterComponentProps {
284
- /**
285
- * The list of the operators.
286
- */
287
- operators?: GanttFilterOperator[];
288
- }
289
-
290
- /**
291
- * Represents the props of the GanttCell component.
292
- */
293
- declare interface GanttCellProps extends Omit<CellProps, 'onChange' | 'render'> {
294
- /**
295
- * An array of indexes of each parent and current item in the data tree.
296
- */
297
- level: number[];
298
- /**
299
- * Indicates that the data item of the cell has subitems.
300
- */
301
- hasChildren?: boolean;
302
- /**
303
- * If set to `true`, the cell will render indentation based on its level prop and
304
- * the icons that are used for expanding and collapsing child rows.
305
- */
306
- expandable?: boolean;
307
- /**
308
- * The index of the column. Useful for applying `aria-colindex` accessibility attribute.
309
- */
310
- colIndex: number;
311
- /**
312
- * The event that is fired when the expand or collapse icon of the cell is clicked.
313
- */
314
- onExpandChange: (event: React.MouseEvent<HTMLSpanElement>, dataItem: any, level: number[]) => void;
315
- /**
316
- * A function for overriding the default rendering of the cell.
317
- */
318
- render?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: GanttCellProps) => React.ReactElement<HTMLTableCellElement> | null;
319
- /**
320
- * The event that is fired when the cell value is changed.
321
- */
322
- onChange?: (event: {
323
- dataItem: any;
324
- level: number[];
325
- syntheticEvent: React.SyntheticEvent<any>;
326
- field?: string;
327
- value?: any;
328
- }) => void;
329
- }
330
-
331
- /**
332
- * Represents the object of the `onColumnMenuFilterChange` Gantt event.
333
- */
334
- export declare interface GanttColumnMenuFilterChangeEvent extends GanttEvent {
335
- /**
336
- * The new `CompositeFilterDescriptor` based on the user action.
337
- */
338
- filter: CompositeFilterDescriptor[];
339
- /**
340
- * The field of the column which triggers the event.
341
- */
342
- field: string;
343
- }
344
-
345
- /**
346
- * The props of the columns of the Gantt component.
347
- */
348
- export declare interface GanttColumnProps extends Omit<TreeColumnBaseProps, 'children' | 'editCell' | 'cell' | 'disableReorder'> {
349
- /**
350
- * Defines the component that will be rendered as a cell. If not set, a `GanttCell` will be rendered by default.
351
- */
352
- cell?: ComponentType<GanttCellProps>;
353
- /**
354
- * @hidden
355
- * Defines the component that will be rendered as an edit cell.
356
- */
357
- editCell?: ComponentType<GanttCellProps>;
358
- /**
359
- * Defines the component that will be rendered as a header cell.
360
- * If not set, a `GanttHeaderCell` will be rendered by default.
361
- */
362
- headerCell?: ComponentType<GanttHeaderCellProps>;
363
- /**
364
- * **Deprecated**. Use `filterCell` prop instead.
365
- */
366
- filter?: ComponentType<GanttFilterCellProps>;
367
- /**
368
- * Defines the component that will be rendered as a filter cell.
369
- */
370
- filterCell?: ComponentType<GanttFilterCellProps>;
371
- /**
372
- * A collection of child columns.
373
- */
374
- children?: GanttColumnProps[];
375
- }
376
-
377
- /**
378
- * Represents the object of the `onColumnReorder` Gantt event.
379
- */
380
- export declare interface GanttColumnReorderEvent extends ColumnDragEvent {
381
- }
382
-
383
- /**
384
- * Represents the object of the `onColumnResize` Gantt event.
385
- */
386
- export declare interface GanttColumnResizeEvent extends ColumnDragEvent {
387
- /**
388
- * The index of the column.
389
- */
390
- index: number;
391
- /**
392
- * The new width of the column.
393
- */
394
- newWidth: number;
395
- /**
396
- * The actual width of the column prior to resizing.
397
- */
398
- oldWidth: number;
399
- /**
400
- * Indicates that resizing is complete and the user has dropped the resize handler.
401
- */
402
- end: boolean;
403
- /**
404
- * The total width of the columns after the resizing.
405
- */
406
- totalWidth: number;
407
- }
408
-
409
- /**
410
- * Represents the object of the `onDataStateChange` Gantt event.
411
- */
412
- export declare interface GanttDataStateChangeEvent extends GanttEvent {
413
- /**
414
- * The state of the Gantt based on the user action.
415
- */
416
- dataState: {
417
- /**
418
- * The descriptors that are used for sorting.
419
- */
420
- sort?: Array<SortDescriptor>;
421
- /**
422
- * The descriptors that are used for filtering.
423
- */
424
- filter?: Array<FilterDescriptor>;
425
- /**
426
- * The field of the column which triggers the event.
427
- */
428
- field?: string;
429
- };
430
- }
431
-
432
- export declare const GanttDateFilter: React_2.FunctionComponent<GanttDateFilterProps>;
433
-
434
- export declare interface GanttDateFilterProps extends FilterComponentProps {
435
- /**
436
- * The list of the operators.
437
- */
438
- operators?: GanttFilterOperator[];
439
- }
440
-
441
- /**
442
- * Represents the KendoReact DayView Component.
443
- */
444
- export declare const GanttDayView: React_2.ForwardRefExoticComponent<GanttDayViewProps & React_2.RefAttributes<GanttViewHandle | null>>;
445
-
446
- /**
447
- * @hidden
448
- */
449
- declare interface GanttDayViewProps extends GanttViewProps {
450
- /**
451
- * The span of an hour slot. Defaults to 1.
452
- */
453
- slotDuration?: number;
454
- }
455
-
456
- /**
457
- * Represents an instance of a Gantt dependency.
458
- */
459
- export declare interface GanttDependency {
460
- /**
461
- * The `id` of the origin task of this dependency.
462
- */
463
- fromId: string | number;
464
- /**
465
- * The unique identifier of the dependency.
466
- */
467
- id: string | number;
468
- /**
469
- * @hidden
470
- */
471
- uid?: string | number;
472
- /**
473
- * The `id` of the destination task of this dependency.
474
- */
475
- toId: string | number;
476
- /**
477
- * The type of the dependency.
478
- */
479
- type: DependencyType;
480
- }
481
-
482
- /**
483
- * Represents the object of the `onDependencyCreateEvent` Gantt event.
484
- */
485
- export declare interface GanttDependencyCreateEvent extends GanttEvent {
486
- /**
487
- * The id of the source task.
488
- */
489
- fromId: any;
490
- /**
491
- * The id of the destination task.
492
- */
493
- toId: any;
494
- /**
495
- * The type of the dependency.
496
- */
497
- type: number;
498
- }
499
-
500
- /**
501
- * Defines the model fields that will be used for creating `GanttDependency` instances.
502
- */
503
- export declare interface GanttDependencyModelFields {
504
- /**
505
- * The name of the `ID` model field.
506
- * Defaults to `"id"`.
507
- */
508
- id?: string;
509
- /**
510
- * The name of the from task id model field.
511
- * Defaults to `"fromId"`.
512
- */
513
- fromId?: string;
514
- /**
515
- * The name of the to task id model field.
516
- * Defaults to `"toId"`.
517
- */
518
- toId?: string;
519
- /**
520
- * The name of the type model field.
521
- * Defaults to `"type"`.
522
- */
523
- type?: string;
524
- }
525
-
526
- declare interface GanttEditorDependenciesHandler {
527
- /**
528
- * Lists the new dependencies that were created.
529
- */
530
- createdDependencies: GanttDependency[];
531
- /**
532
- * Lists the existing dependencies that were changed.
533
- */
534
- updatedDependencies: GanttDependency[];
535
- /**
536
- * Lists the dependencies that were removed.
537
- */
538
- deletedDependencies: GanttDependency[];
539
- }
540
-
541
- /**
542
- * Represents the base event object of the Gantt.
543
- */
544
- declare interface GanttEvent extends BaseEvent<GanttHandle> {
545
- }
546
-
547
- /**
548
- * Represents the object of the `onExpandChange` Gantt event.
549
- */
550
- export declare interface GanttExpandChangeEvent extends GanttEvent {
551
- /**
552
- * The data item which is expanded or collapsed.
553
- */
554
- dataItem: any;
555
- /**
556
- * An array of indexes of each parent and current item in the data tree.
557
- */
558
- level: number[];
559
- /**
560
- * The available values are:
561
- * - `true`&mdash;If the data item is expanded.
562
- * - `false`&mdash;If the data item is collapsed.
563
- */
564
- value: boolean;
565
- }
566
-
567
- /**
568
- * @hidden
569
- */
570
- declare interface GanttFilterCellProps extends FilterCellProps {
571
- }
572
-
573
- /**
574
- * Represents the object of the `onFilterChange` Gantt event.
575
- */
576
- export declare interface GanttFilterChangeEvent extends GanttEvent {
577
- /**
578
- * The new `FilterDescriptor` based on the user action.
579
- */
580
- filter: FilterDescriptor[];
581
- /**
582
- * The field of the column which triggers the event.
583
- */
584
- field: string;
585
- }
586
-
587
- /**
588
- * The filter operator for the Gantt filters.
589
- */
590
- declare interface GanttFilterOperator extends FilterOperator {
591
- }
592
-
593
- /**
594
- * Represents the default `form` component rendered when editing a task in the Gantt component.
595
- */
596
- export declare const GanttForm: (props: GanttFormProps) => React_2.ReactPortal | null;
597
-
598
- /**
599
- * Represents the props of the KendoReact [GanttForm](https://www.telerik.com/kendo-react-ui/components/gantt/api/ganttform) component.
600
- */
601
- declare interface GanttFormProps {
602
- /**
603
- * Specifies the `DataItem` to be visualized inside the form.
604
- */
605
- dataItem: DataItem;
606
- /**
607
- * The task data passed to the form.
608
- */
609
- taskData?: DataItem[];
610
- /**
611
- * The dependancy data passed to the form.
612
- */
613
- dependencyData?: GanttDependency[];
614
- /**
615
- * Called when the `cancel` button is clicked.
616
- */
617
- onCancel?: (event: GanttFormStateChangeEvent) => void;
618
- /**
619
- * Called when the `delete` button is clicked.
620
- */
621
- onDelete?: (event: GanttFormStateChangeEvent) => void;
622
- /**
623
- * Called when the `close` button is clicked.
624
- */
625
- onClose?: (event: GanttFormStateChangeEvent) => void;
626
- /**
627
- * Called when the `submit` button is clicked.
628
- */
629
- onSubmit: (event: GanttFormStateChangeEvent) => void;
630
- }
631
-
632
- /**
633
- * Represents the event arguments of Gantt form.
634
- */
635
- export declare interface GanttFormStateChangeEvent {
636
- /**
637
- * The initial data item.
638
- */
639
- initialDataItem?: DataItem;
640
- /**
641
- * The updated data item.
642
- */
643
- dataItem: DataItem | null;
644
- /**
645
- * A React Synthetic Event.
646
- */
647
- syntheticEvent: React_2.SyntheticEvent<any>;
648
- /**
649
- * A native DOM event.
650
- */
651
- nativeEvent: any;
652
- /**
653
- * Passes the updated dependencies.
654
- */
655
- dependencies?: GanttEditorDependenciesHandler;
656
- }
657
-
658
- /**
659
- * Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom) callback of the Gantt component.
660
- */
661
- export declare interface GanttHandle {
662
- /**
663
- * The current element or `null` if there is no one.
664
- */
665
- element: HTMLDivElement | null;
666
- /**
667
- * Method to allow the scroll to be set to a specific row index.
668
- */
669
- scrollIntoView: (options: {
670
- rowIndex?: number;
671
- }) => void;
672
- /**
673
- * The props of the Gantt.
674
- */
675
- props: GanttProps;
676
- }
677
-
678
- /**
679
- * The props of the GanttHeaderCell component.
680
- */
681
- declare interface GanttHeaderCellProps extends HeaderCellProps {
682
- }
683
-
684
- /**
685
- * Represents the object of the `onHeaderSelectionChange` Gantt event.
686
- */
687
- export declare interface GanttHeaderSelectionChangeEvent extends GanttEvent {
688
- /**
689
- * The field of the column in which the cell is located.
690
- */
691
- field?: string;
692
- }
693
-
694
- /**
695
- * Represents the object of the `onKeyDownEvent` Gantt event.
696
- */
697
- export declare interface GanttKeyDownEvent extends GanttEvent, TableKeyDownEvent<GanttHandle> {
698
- }
699
-
700
- /**
701
- * Represents the KendoReact MonthView Component.
702
- */
703
- export declare const GanttMonthView: React_2.ForwardRefExoticComponent<GanttMonthViewProps & React_2.RefAttributes<GanttViewHandle | null>>;
704
-
705
- /**
706
- * @hidden
707
- */
708
- declare interface GanttMonthViewProps extends GanttViewProps {
709
- }
710
-
711
- /**
712
- * The props of the GanttNoRecords component.
713
- */
714
- declare interface GanttNoRecordsProps {
715
- /**
716
- * The React elements which will be rendered inside the Gantt when no records are available.
717
- */
718
- children?: React.ReactNode;
719
- }
720
-
721
- export declare const GanttNumericFilter: React_2.FunctionComponent<GanttNumericFilterProps>;
722
-
723
- export declare interface GanttNumericFilterProps extends FilterComponentProps {
724
- /**
725
- * The list of the operators.
726
- */
727
- operators?: GanttFilterOperator[];
728
- }
729
-
730
- /**
731
- * Represents the props of the [KendoReact Gantt component](https://www.telerik.com/kendo-react-ui/components/gantt).
732
- */
733
- declare interface GanttProps extends GanttBaseProps {
734
- /**
735
- * Adds custom CSS classes to the Gantt component.
736
- *
737
- * @example
738
- * ```jsx
739
- * <Gantt className="custom-class" />
740
- * ```
741
- */
742
- className?: string;
743
- /**
744
- * Sets custom styles for the Gantt component.
745
- *
746
- * @example
747
- * ```jsx
748
- * <Gantt style={{ height: '500px' }} />
749
- * ```
750
- */
751
- style?: React.CSSProperties;
752
- /**
753
- * Provides task data for the Gantt chart. Tasks appear as visual bars in the timeline.
754
- *
755
- * @example
756
- * ```jsx
757
- * const tasks = [{ id: 1, title: 'Task 1', start: new Date(), end: new Date() }];
758
- * <Gantt taskData={tasks} />
759
- * ```
760
- *
761
- * @slug task_data_gantt
762
- */
763
- taskData?: DataItem[];
764
- /**
765
- * Provides dependency data for the Gantt chart. Dependencies appear as visual connections between tasks.
766
- *
767
- * @example
768
- * ```jsx
769
- * const dependencies = [{ id: 1, from: 1, to: 2 }];
770
- * <Gantt dependencyData={dependencies} />
771
- * ```
772
- *
773
- * @slug dependency_data_gantt
774
- */
775
- dependencyData?: GanttDependency[];
776
- /**
777
- * Maps field names for reading task data from your data source.
778
- *
779
- * @example
780
- * ```jsx
781
- * const taskModelFields = { id: 'id', title: 'title', start: 'start', end: 'end' };
782
- * <Gantt taskModelFields={taskModelFields} />
783
- * ```
784
- */
785
- taskModelFields?: GanttTaskModelFields;
786
- /**
787
- * Maps field names for reading dependency data from your data source.
788
- *
789
- * @example
790
- * ```jsx
791
- * const dependencyModelFields = { id: 'id', from: 'from', to: 'to' };
792
- * <Gantt dependencyModelFields={dependencyModelFields} />
793
- * ```
794
- */
795
- dependencyModelFields?: GanttDependencyModelFields;
796
- /**
797
- * Provides view components as children. The Gantt renders the currently selected view.
798
- *
799
- * @example
800
- * ```jsx
801
- * <Gantt>
802
- * <GanttWeekView title="Day" />
803
- * <GanttDayView title="Week" />
804
- * </Gantt>
805
- * ```
806
- */
807
- children?: GanttView[] | GanttView;
808
- /**
809
- * Sets the view that shows first when the Gantt loads. You can choose from:
810
- * * `day`
811
- * * `week` (Default)
812
- * * `month`
813
- * * `year`
814
- *
815
- * @default "week"
816
- *
817
- * @example
818
- * ```jsx
819
- * <Gantt defaultView="month" />
820
- * ```
821
- */
822
- defaultView?: string;
823
- /**
824
- * Controls which view is currently shown. The value must match the `title` property of a view.
825
- *
826
- * @example
827
- * ```jsx
828
- * <Gantt view="day" />
829
- * ```
830
- */
831
- view?: string;
832
- /**
833
- * Sets the timezone for displaying dates and times in the Gantt chart.
834
- * For example, `Europe/Sofia`.
835
- *
836
- * @example
837
- * ```jsx
838
- * <Gantt timezone="Europe/Sofia" />
839
- * ```
840
- */
841
- timezone?: string;
842
- /**
843
- * Sets the height of all rows in pixels. All rows have the same height.
844
- *
845
- * @default 50
846
- *
847
- * @example
848
- * ```jsx
849
- * <Gantt rowHeight={40} />
850
- * ```
851
- */
852
- rowHeight?: number;
853
- /**
854
- * Configures the toolbar options. You can enable the add task button.
855
- *
856
- * @example
857
- * ```jsx
858
- * <Gantt toolbar={{ addTaskButton: true }} />
859
- * ```
860
- */
861
- toolbar?: {
862
- addTaskButton: boolean;
863
- };
864
- /**
865
- * Fires when the user selects a different view. Use this to control which view is shown.
866
- *
867
- * @example
868
- * ```jsx
869
- * const handleViewChange = (args) => console.log(args.view);
870
- * <Gantt onViewChange={handleViewChange} />
871
- * ```
872
- */
873
- onViewChange?: (args: GanttViewChangeEvent) => void;
874
- /**
875
- * Fires when the user changes the column menu filter.
876
- */
877
- onColumnMenuFilterChange?: (event: GanttColumnMenuFilterChangeEvent) => void;
878
- /**
879
- * Fires when the data state changes.
880
- */
881
- onDataStateChange?: (event: GanttDataStateChangeEvent) => void;
882
- /**
883
- * Fires when the sorting of the Gantt is changed ([see example](https://www.telerik.com/kendo-react-ui/components/gantt/sorting)).
884
- * You need to handle the event yourself and sort the data.
885
- */
886
- onSortChange?: (event: GanttSortChangeEvent) => void;
887
- /**
888
- * Fires when the Gantt filter is modified through the UI
889
- * ([more information and examples](https://www.telerik.com/kendo-react-ui/components/gantt/filtering)).
890
- * You need to handle the event yourself and filter the data.
891
- */
892
- onFilterChange?: (event: GanttFilterChangeEvent) => void;
893
- /**
894
- * Fires when the user clicks the expand or collapse icon on a row.
895
- */
896
- onExpandChange?: (event: GanttExpandChangeEvent) => void;
897
- /**
898
- * Fires when the user clicks the add task button.
899
- */
900
- onAddClick?: (event: GanttAddClickEvent) => void;
901
- /**
902
- * Fires when the user resizes a column.
903
- */
904
- onColumnResize?: (event: GanttColumnResizeEvent) => void;
905
- /**
906
- * Fires when the user reorders columns.
907
- */
908
- onColumnReorder?: (event: GanttColumnReorderEvent) => void;
909
- /**
910
- * Fires when the user clicks a row.
911
- */
912
- onRowClick?: (event: GanttRowClickEvent) => void;
913
- /**
914
- * Fires when the user double-clicks a row.
915
- */
916
- onRowDoubleClick?: (event: GanttRowDoubleClickEvent) => void;
917
- /**
918
- * Fires when the user right-clicks on a row.
919
- */
920
- onRowContextMenu?: (event: GanttRowContextMenuEvent) => void;
921
- /**
922
- * Fires when the user clicks a task.
923
- */
924
- onTaskClick?: (event: GanttTaskClickEvent) => void;
925
- /**
926
- * Fires when the user double-clicks a task.
927
- */
928
- onTaskDoubleClick?: (event: GanttTaskDoubleClickEvent) => void;
929
- /**
930
- * Fires when the user right-clicks on a task.
931
- */
932
- onTaskContextMenu?: (event: GanttTaskContextMenuEvent) => void;
933
- /**
934
- * Fires when the user clicks the remove button on a task.
935
- */
936
- onTaskRemoveClick?: (event: GanttTaskRemoveClickEvent) => void;
937
- /**
938
- * Fires when the user creates a dependency by connecting two tasks.
939
- */
940
- onDependencyCreate?: (event: GanttDependencyCreateEvent) => void;
941
- /**
942
- * Fires when the user presses any keyboard key.
943
- */
944
- onKeyDown?: (event: GanttKeyDownEvent) => void;
945
- /**
946
- * Fires when the user selects or deselects rows or cells.
947
- */
948
- onSelectionChange?: (event: GanttSelectionChangeEvent) => void;
949
- /**
950
- * Fires when the user clicks the checkbox in a column header.
951
- */
952
- onHeaderSelectionChange?: (event: GanttHeaderSelectionChangeEvent) => void;
953
- }
954
-
955
- /**
956
- * Represents the `removeDialog` component rendered when removing a task from the Gantt component.
957
- */
958
- export declare const GanttRemoveDialog: (props: GanttRemoveDialogProps) => React_2.ReactPortal | null;
959
-
960
- /**
961
- * Represents the props of the KendoReact [GanttRemoveDialog](https://www.telerik.com/kendo-react-ui/components/gantt/api/ganttremovedialog) component.
962
- */
963
- declare interface GanttRemoveDialogProps {
964
- /**
965
- * Specifies the `DataItem` currently being deleted.
966
- */
967
- dataItem: DataItem;
968
- /**
969
- * Called when the `close` button is clicked.
970
- */
971
- onClose?: (event: GanttRemoveDialogStateChangeEvent) => void;
972
- /**
973
- * Called when the `cancel` button is clicked.
974
- */
975
- onCancel?: (event: GanttRemoveDialogStateChangeEvent) => void;
976
- /**
977
- * Called when the `confirm` button is clicked.
978
- */
979
- onConfirm?: (event: GanttRemoveDialogStateChangeEvent) => void;
980
- }
981
-
982
- /**
983
- * Represents the event arguments of Gantt remove dialog.
984
- */
985
- export declare interface GanttRemoveDialogStateChangeEvent {
986
- /**
987
- * The updated data item.
988
- */
989
- dataItem: DataItem | null;
990
- /**
991
- * A React Synthetic Event.
992
- */
993
- syntheticEvent: React_2.SyntheticEvent<any>;
994
- /**
995
- * A native DOM event.
996
- */
997
- nativeEvent: any;
998
- }
999
-
1000
- /**
1001
- * The default row component of the Gantt.
1002
- */
1003
- export declare const GanttRow: ForwardRefExoticComponent<TreeListRowProps & RefAttributes<HTMLTableRowElement>>;
1004
-
1005
- /**
1006
- * Represents the object of the `onRowClick` Gantt event.
1007
- */
1008
- export declare interface GanttRowClickEvent extends GanttEvent {
1009
- /**
1010
- * The data item which corresponds to the clicked row.
1011
- */
1012
- dataItem: any;
1013
- /**
1014
- * An array of indexes of each parent and current item in the data tree.
1015
- */
1016
- level: number[];
1017
- }
1018
-
1019
- /**
1020
- * Represents the object of the `onRowContextMenu` Gantt event.
1021
- */
1022
- export declare interface GanttRowContextMenuEvent extends GanttEvent {
1023
- /**
1024
- * The data item which corresponds to the clicked row.
1025
- */
1026
- dataItem: any;
1027
- /**
1028
- * An array of indexes of each parent and current item in the data tree.
1029
- */
1030
- level: number[];
1031
- }
1032
-
1033
- /**
1034
- * Represents the object of the `onRowDoubleClick` Gantt event.
1035
- */
1036
- export declare interface GanttRowDoubleClickEvent extends GanttEvent {
1037
- /**
1038
- * The data item which corresponds to the clicked row.
1039
- */
1040
- dataItem: any;
1041
- /**
1042
- * An array of indexes of each parent and current item in the data tree.
1043
- */
1044
- level: number[];
1045
- }
1046
-
1047
- /**
1048
- * The props that the Gantt passes to the GanttRow component when creating it.
1049
- */
1050
- export declare interface GanttRowProps {
1051
- /**
1052
- * The `data` object that represents the current row.
1053
- */
1054
- dataItem: any;
1055
- /**
1056
- * The event that is fired when the row is clicked.
1057
- */
1058
- onClick?: any;
1059
- /**
1060
- * The event that is fired when the row is double clicked.
1061
- */
1062
- onDoubleClick?: any;
1063
- /**
1064
- * The event that is fired when the row context menu is triggered.
1065
- */
1066
- onContextMenu?: any;
1067
- /**
1068
- * The name of the field which will provide a Boolean representation of the selected state of the item.
1069
- */
1070
- selectedField?: string;
1071
- /**
1072
- * Sets the height of the row.
1073
- */
1074
- rowHeight?: number;
1075
- /**
1076
- * A function for overriding the default rendering of the row.
1077
- */
1078
- render?: (row: React.ReactElement<HTMLTableRowElement>, props: GanttRowProps) => React.ReactNode;
1079
- /**
1080
- * An array of indexes of each parent and current item in the data tree.
1081
- */
1082
- level: number[];
1083
- /**
1084
- * Fires when a row is dragged.
1085
- */
1086
- onDrag?: (event: {
1087
- nativeEvent: any;
1088
- dragged: number[];
1089
- draggedOver: number[] | null;
1090
- draggedItem: any;
1091
- }) => void;
1092
- /**
1093
- * Fires when a row is dragged and dropped.
1094
- */
1095
- onDrop?: (event: {
1096
- nativeEvent: any;
1097
- dragged: number[];
1098
- draggedOver: number[] | null;
1099
- draggedItem: any;
1100
- }) => void;
1101
- /**
1102
- * The expanded state of the row. Useful for applying `aria-expanded` accessibility attribute.
1103
- */
1104
- expanded: boolean;
1105
- /**
1106
- * The index of the row. Useful for applying `aria-rowindex` accessibility attribute.
1107
- */
1108
- rowIndex: number;
1109
- /**
1110
- * @hidden
1111
- */
1112
- children: React.ReactNode;
1113
- /**
1114
- * @hidden
1115
- */
1116
- levels: number[][];
1117
- /**
1118
- * @hidden
1119
- */
1120
- isAltRow?: boolean;
1121
- /**
1122
- * The index to be applied to the `aria-rowindex` attribute.
1123
- */
1124
- ariaRowIndex?: number;
1125
- /**
1126
- * The count of items on current level, applied to the `aria-setsize` attribute.
1127
- */
1128
- ariaSetSize?: number;
1129
- /**
1130
- * The index of the item on current level, applied to the `aria-posinset` attribute.
1131
- */
1132
- ariaPosInSet?: number;
1133
- /**
1134
- * Indicates if the row is selected.
1135
- */
1136
- isSelected: boolean;
1137
- }
1138
-
1139
- /**
1140
- * Represents the available selection modes.
1141
- */
1142
- export declare type GanttSelectableMode = TableSelectableMode;
1143
-
1144
- /**
1145
- * Represents the Gantt selectable settings.
1146
- */
1147
- export declare interface GanttSelectableSettings extends TableSelectableSettings {
1148
- /**
1149
- * The available values are:
1150
- * * `single`
1151
- * * `multiple`
1152
- *
1153
- * @default "multiple"
1154
- */
1155
- mode?: GanttSelectableMode;
1156
- }
1157
-
1158
- /**
1159
- * Represents the object of the `onSelectionChange` Gantt event.
1160
- */
1161
- export declare interface GanttSelectionChangeEvent extends GanttEvent, TableSelectionChangeEvent<GanttHandle> {
1162
- /**
1163
- * An array of indexes of each parent and current item in the data tree.
1164
- */
1165
- level: number[];
1166
- }
1167
-
1168
- /**
1169
- * The types of Gantt slot.
1170
- */
1171
- export declare type GanttSlotType = 'time' | 'day' | 'week' | 'month' | 'year';
1172
-
1173
- /**
1174
- * Represents the object of the `onSortChange` Gantt event.
1175
- */
1176
- export declare interface GanttSortChangeEvent extends GanttEvent {
1177
- /**
1178
- * The new `SortDescriptor` according to the user action.
1179
- */
1180
- sort: SortDescriptor[];
1181
- /**
1182
- * The field of the column which triggers the event.
1183
- */
1184
- field: string;
1185
- }
1186
-
1187
- /**
1188
- * The settings for sorting the Gantt data.
1189
- */
1190
- declare type GanttSortSettings = SortSettings;
1191
-
1192
- /**
1193
- * Represents the object of the `onTaskClick` Gantt event.
1194
- */
1195
- export declare interface GanttTaskClickEvent extends GanttEvent {
1196
- /**
1197
- * The data item which corresponds to the clicked task.
1198
- */
1199
- dataItem: any;
1200
- /**
1201
- * An array of indexes of each parent and current item in the data tree.
1202
- */
1203
- level: number[];
1204
- }
1205
-
1206
- /**
1207
- * Represents the object of the `onTaskContextMenu` Gantt event.
1208
- */
1209
- export declare interface GanttTaskContextMenuEvent extends GanttEvent {
1210
- /**
1211
- * The data item which corresponds to the clicked task.
1212
- */
1213
- dataItem: any;
1214
- /**
1215
- * An array of indexes of each parent and current item in the data tree.
1216
- */
1217
- level: number[];
1218
- }
1219
-
1220
- /**
1221
- * Represents the object of the `onTaskDoubleClick` Gantt event.
1222
- */
1223
- export declare interface GanttTaskDoubleClickEvent extends GanttEvent {
1224
- /**
1225
- * The data item which corresponds to the double clicked task.
1226
- */
1227
- dataItem: any;
1228
- /**
1229
- * An array of indexes of each parent and current item in the data tree.
1230
- */
1231
- level: number[];
1232
- }
1233
-
1234
- /**
1235
- * Defines the model fields that will be used for creating `GanttTask` instances.
1236
- */
1237
- export declare interface GanttTaskModelFields {
1238
- /**
1239
- * The name of the `ID` model field.
1240
- * Defaults to `"id"`.
1241
- */
1242
- id?: string;
1243
- /**
1244
- * The name of the start date model field.
1245
- * Defaults to `"start"`.
1246
- */
1247
- start?: string;
1248
- /**
1249
- * The name of the end date model field.
1250
- * Defaults to `"end"`.
1251
- */
1252
- end?: string;
1253
- /**
1254
- * The name of the title model field.
1255
- * Defaults to `"title"`.
1256
- */
1257
- title?: string;
1258
- /**
1259
- * The name of the percent complete model field.
1260
- * Defaults to `"percentComplete"`.
1261
- */
1262
- percentComplete?: string;
1263
- /**
1264
- * The name of the percent complete model field.
1265
- * Defaults to `"parentId"`.
1266
- */
1267
- parentId?: string;
1268
- /**
1269
- * The name of the is rollup model field.
1270
- * Defaults to `"isRollup"`.
1271
- */
1272
- isRollup?: string;
1273
- /**
1274
- * The name of the is expanded model field. It will provide a Boolean representation of the expanded state of the item.
1275
- * Defaults to `"isExpanded"`.
1276
- */
1277
- isExpanded?: string;
1278
- /**
1279
- * The name of the children model field. It will provide an array representation of the item subitems.
1280
- * Defaults to `"children"`.
1281
- */
1282
- children?: string;
1283
- /**
1284
- * The name of the is in edit model field. It will provide a Boolean representation of the edit state of the current item.
1285
- * Defaults to `"isInEdit"`.
1286
- */
1287
- isInEdit?: string;
1288
- /**
1289
- * The name of the selected model field. It will provide a Boolean representation of the selected state of the current item.
1290
- * Defaults to `"isSelected"`.
1291
- */
1292
- isSelected?: string;
1293
- }
1294
-
1295
- /**
1296
- * Represents the object of the `onTaskRemoveClick` Gantt event.
1297
- */
1298
- export declare interface GanttTaskRemoveClickEvent extends GanttEvent {
1299
- /**
1300
- * The data item which corresponds to the clicked task.
1301
- */
1302
- dataItem: any;
1303
- /**
1304
- * An array of indexes of each parent and current item in the data tree.
1305
- */
1306
- level: number[];
1307
- }
1308
-
1309
- export declare const GanttTextFilter: React_2.FunctionComponent<GanttTextFilterProps>;
1310
-
1311
- export declare interface GanttTextFilterProps extends FilterComponentProps {
1312
- /**
1313
- * The list of the operators.
1314
- */
1315
- operators?: GanttFilterOperator[];
1316
- }
1317
-
1318
- /**
1319
- * Represents a single Gantt view.
1320
- */
1321
- declare type GanttView = React.ReactElement<GanttViewProps>;
1322
-
1323
- /**
1324
- * Called every time the user changes the active `view`.
1325
- */
1326
- export declare interface GanttViewChangeEvent extends GanttEvent {
1327
- /**
1328
- * The value of the selected view.
1329
- */
1330
- value: string;
1331
- }
1332
-
1333
- /**
1334
- * Represents the arguments which are passed to the [dateRange](https://www.telerik.com/kendo-react-ui/components/gantt/api/ganttviewprops#toc-daterange) function.
1335
- */
1336
- declare interface GanttViewDateRangeArgs {
1337
- /**
1338
- * The earliest start date among all tasks.
1339
- */
1340
- tasksStart: Date;
1341
- /**
1342
- * The latest end date among all tasks.
1343
- */
1344
- tasksEnd: Date;
1345
- /**
1346
- * The internationalization service for date formatting and localization.
1347
- */
1348
- intl: IntlService;
1349
- /**
1350
- * The timezone identifier for date calculations.
1351
- */
1352
- timezone?: string;
1353
- /**
1354
- * The number of days to include in the date range calculation.
1355
- */
1356
- numberOfDays?: number;
1357
- }
1358
-
1359
- /**
1360
- * Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom) callback of the GanttView component.
1361
- */
1362
- declare interface GanttViewHandle {
1363
- /**
1364
- * Method to allow the scroll to be set to a specific row index.
1365
- */
1366
- scrollIntoView: (options: {
1367
- rowIndex?: number;
1368
- }) => void;
1369
- }
1370
-
1371
- /**
1372
- * Represents the required props which every [GanttView](https://www.telerik.com/kendo-react-ui/components/gantt/api/ganttview) must accept.
1373
- */
1374
- export declare interface GanttViewProps {
1375
- /**
1376
- * The name property is used by the Gantt to match which view is selected. Every view has a default name.
1377
- *
1378
- * @example
1379
- * ```jsx
1380
- * <GanttView name="dayView" />
1381
- * ```
1382
- */
1383
- name?: string;
1384
- /**
1385
- * The title to be displayed in the view selection list in the Toolbar.
1386
- * If a function is passed, it will receive a [LocalizationService](https://www.telerik.com/kendo-react-ui/components/intl/api/localizationservice) as an argument.
1387
- *
1388
- * @example
1389
- * ```jsx
1390
- * <GanttView title="Day View" />
1391
- * <GanttView title={(localization) => localization.toLanguageString('custom.title', 'Custom Title')} />
1392
- * ```
1393
- */
1394
- title?: string | ((localization: LocalizationService) => string);
1395
- /**
1396
- * The width of a single time slot in pixels. Default is 100px.
1397
- *
1398
- * @default 100
1399
- *
1400
- * @example
1401
- * ```jsx
1402
- * <GanttView slotWidth={120} />
1403
- * ```
1404
- */
1405
- slotWidth?: number;
1406
- /**
1407
- * Overrides the `dateRange` calculated by the `Gantt` component.
1408
- *
1409
- * If a function is passed, an object of type [GanttViewDateRangeArgs](https://www.telerik.com/kendo-react-ui/components/gantt/api/ganttviewdaterangeargs) will be passed.
1410
- *
1411
- * @example
1412
- * ```jsx
1413
- * <GanttView dateRange={{ start: new Date(2023, 0, 1), end: new Date(2023, 0, 31) }} />
1414
- * <GanttView dateRange={(args) => ({ start: args.tasksStart, end: args.tasksEnd })} />
1415
- * ```
1416
- */
1417
- dateRange?: DateRange | ((args: GanttViewDateRangeArgs) => DateRange);
1418
- /**
1419
- * Sets the start of the work day.
1420
- *
1421
- * @example
1422
- * ```jsx
1423
- * <GanttView workDayStart="08:00" />
1424
- * ```
1425
- */
1426
- workDayStart?: string;
1427
- /**
1428
- * Sets the end of the work day.
1429
- *
1430
- * @example
1431
- * ```jsx
1432
- * <GanttView workDayEnd="17:00" />
1433
- * ```
1434
- */
1435
- workDayEnd?: string;
1436
- /**
1437
- * The start of the work week.
1438
- *
1439
- * @example
1440
- * ```jsx
1441
- * <GanttView workWeekStart={Day.Monday} />
1442
- * ```
1443
- */
1444
- workWeekStart?: Day;
1445
- /**
1446
- * The end of the work week.
1447
- *
1448
- * @example
1449
- * ```jsx
1450
- * <GanttView workWeekEnd={Day.Friday} />
1451
- * ```
1452
- */
1453
- workWeekEnd?: Day;
1454
- /**
1455
- * The component to be rendered in header cells of the timeline part of the Gantt.
1456
- *
1457
- * @example
1458
- * ```jsx
1459
- * <GanttView timelineHeaderCell={CustomHeaderCell} />
1460
- * ```
1461
- */
1462
- timelineHeaderCell?: React.ComponentType<GanttViewTimelineHeaderCellProps>;
1463
- /** @hidden */
1464
- firstSlotRangeRef?: React.MutableRefObject<DateRange | null>;
1465
- }
1466
-
1467
- /**
1468
- * The props of the Gantt view timeline header cell component.
1469
- */
1470
- export declare interface GanttViewTimelineHeaderCellProps {
1471
- /**
1472
- * The date range of the cell.
1473
- */
1474
- range: DateRange;
1475
- /**
1476
- * Indicates if the cell is in work time.
1477
- */
1478
- isWork: boolean;
1479
- /**
1480
- * The default cell text value.
1481
- */
1482
- text: string;
1483
- /**
1484
- * The type of the cell slot.
1485
- */
1486
- type: GanttSlotType;
1487
- /**
1488
- * The header cell row index.
1489
- */
1490
- rowIndex: number;
1491
- /**
1492
- * The header cell index.
1493
- */
1494
- index: number;
1495
- }
1496
-
1497
- /**
1498
- * Represents the KendoReact WeekView Component.
1499
- */
1500
- export declare const GanttWeekView: React_2.ForwardRefExoticComponent<GanttWeekViewProps & React_2.RefAttributes<GanttViewHandle | null>>;
1501
-
1502
- /**
1503
- * @hidden
1504
- */
1505
- declare interface GanttWeekViewProps extends GanttViewProps {
1506
- }
1507
-
1508
- /**
1509
- * Represents the KendoReact YearView Component.
1510
- */
1511
- export declare const GanttYearView: React_2.ForwardRefExoticComponent<GanttYearViewProps & React_2.RefAttributes<GanttViewHandle | null>>;
1512
-
1513
- /**
1514
- * @hidden
1515
- */
1516
- declare interface GanttYearViewProps extends GanttViewProps {
1517
- }
1518
-
1519
- export { getSelectedState }
1520
-
1521
- export { getSelectedStateFromKeyDown }
1522
-
1523
- /**
1524
- * Creates a new array with the results of calling the provided callback function
1525
- * on every element in the provided data tree.
1526
- *
1527
- * @param {any[]} tree - The data tree.
1528
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
1529
- * @param {(value: any) => any} callback - The callback function.
1530
- * @returns {any[]} - The new data tree.
1531
- */
1532
- export declare const mapTree: (tree: any[], subItemsField: string, callback: (value: any) => any) => any[];
1533
-
1534
- /**
1535
- * Orders the specified tree according to the provided sort descriptors.
1536
- *
1537
- * @param {T[]} data - The data that will be sorted.
1538
- * @param {SortDescriptor[]} descriptors - The descriptors by which the data will be sorted.
1539
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
1540
- * @returns {T[]} - The sorted data.
1541
- */
1542
- export declare const orderBy: typeof orderBy_2;
1543
-
1544
- /**
1545
- * @hidden
1546
- */
1547
- export declare const removeTask: (options: {
1548
- removedDataItem: DataItem;
1549
- taskModelFields: TaskModelFields;
1550
- dataTree: DataItem[];
1551
- }) => DataItem[];
1552
-
1553
- export { setSelectedState }
1554
-
1555
- /**
1556
- * Maps field names from your task data to the fields that the Gantt component expects.
1557
- */
1558
- export declare interface TaskModelFields {
1559
- /**
1560
- * Maps to the field that contains the unique ID for each task.
1561
- */
1562
- id: string;
1563
- /**
1564
- * Maps to the field that contains the task start date.
1565
- */
1566
- start: string;
1567
- /**
1568
- * Maps to the field that contains the task end date.
1569
- */
1570
- end: string;
1571
- /**
1572
- * Maps to the field that contains the task title or name.
1573
- */
1574
- title: string;
1575
- /**
1576
- * Maps to the field that contains the task completion percentage.
1577
- */
1578
- percentComplete: string;
1579
- /**
1580
- * Maps to the field that contains the parent task ID for child tasks.
1581
- */
1582
- parentId?: string;
1583
- /**
1584
- * Maps to the field that indicates if a task is a summary of child tasks.
1585
- */
1586
- isRollup: string;
1587
- /**
1588
- * Maps to the field that indicates if a task is expanded to show child tasks.
1589
- */
1590
- isExpanded: string;
1591
- /**
1592
- * Maps to the field that contains child tasks.
1593
- */
1594
- children: string;
1595
- /**
1596
- * Maps to the field that indicates if a task is currently being edited.
1597
- */
1598
- isInEdit: string;
1599
- /**
1600
- * Maps to the field that indicates if a task is selected.
1601
- */
1602
- isSelected: string;
1603
- }
1604
-
1605
- /**
1606
- * @hidden
1607
- */
1608
- export declare const updateTask: (options: {
1609
- updatedDataItem: DataItem;
1610
- taskModelFields: TaskModelFields;
1611
- dataTree: DataItem[];
1612
- }) => DataItem[];
1613
-
1614
- export { }
8
+ import { Gantt, GanttHandle } from './Gantt.js';
9
+ import { GanttDayView } from './views/GanttDayView.js';
10
+ import { GanttWeekView } from './views/GanttWeekView.js';
11
+ import { GanttMonthView } from './views/GanttMonthView.js';
12
+ import { GanttYearView } from './views/GanttYearView.js';
13
+ import { GanttViewChangeEvent, GanttDataStateChangeEvent, GanttSortChangeEvent, GanttFilterChangeEvent, GanttColumnMenuFilterChangeEvent, GanttExpandChangeEvent, GanttRowClickEvent, GanttColumnResizeEvent, GanttColumnReorderEvent, GanttRowContextMenuEvent, GanttRowDoubleClickEvent, GanttTaskClickEvent, GanttTaskContextMenuEvent, GanttTaskDoubleClickEvent, GanttTaskRemoveClickEvent, GanttKeyDownEvent, GanttSelectionChangeEvent, GanttHeaderSelectionChangeEvent, GanttAddClickEvent, GanttDependencyCreateEvent } from './interfaces/events.js';
14
+ import { GanttTextFilter, GanttTextFilterProps } from './cells/FilterCells/GanttTextFilter.js';
15
+ import { GanttNumericFilter, GanttNumericFilterProps } from './cells/FilterCells/GanttNumericFilter.js';
16
+ import { GanttBooleanFilter, GanttBooleanFilterProps } from './cells/FilterCells/GanttBooleanFilter.js';
17
+ import { GanttDateFilter, GanttDateFilterProps } from './cells/FilterCells/GanttDateFilter.js';
18
+ import { orderBy, filterBy, mapTree, extendDataItem, createDataTree } from './utils/index.js';
19
+ import { removeTask, addTask, updateTask, addDependency } from './utils/data-operations.js';
20
+ import { GanttViewProps } from './interfaces/GanttView.js';
21
+ import { GanttViewTimelineHeaderCellProps } from './interfaces/GanttViewTimelineHeaderCellProps.js';
22
+ import { GanttSlotType } from './interfaces/GanttSlotType.js';
23
+ import { GanttForm, GanttFormStateChangeEvent } from './editors/GanttForm.js';
24
+ import { GanttRemoveDialog, GanttRemoveDialogStateChangeEvent } from './editors/GanttRemoveDialog.js';
25
+ import { GanttRow } from './rows/GanttRow.js';
26
+ import { GanttRowProps } from './interfaces/GanttRowProps.js';
27
+ import { getSelectedState, getSelectedStateFromKeyDown, setSelectedState } from '@progress/kendo-react-data-tools';
28
+ import { GanttSelectableMode, GanttSelectableSettings } from './interfaces/GanttSelectableSettings.js';
29
+ import { GANTT_COL_INDEX_ATTRIBUTE, GANTT_PREVENT_SELECTION_ELEMENT, GANTT_ROW_INDEX_ATTRIBUTE } from './constants/index.js';
30
+ import { GanttTaskModelFields } from './interfaces/GanttTaskModelFields.js';
31
+ import { TaskModelFields } from './interfaces/TaskModelFields.js';
32
+ import { GanttDependencyModelFields } from './interfaces/GanttDependencyModelFields.js';
33
+ import { GanttColumnProps } from './interfaces/GanttColumnProps.js';
34
+ import { GanttDependency } from './interfaces/GanttDependency.js';
35
+ export { Gantt, GanttHandle, GanttDayView, GanttWeekView, GanttMonthView, GanttYearView, GanttViewChangeEvent, GanttDataStateChangeEvent, GanttSortChangeEvent, GanttFilterChangeEvent, GanttColumnMenuFilterChangeEvent, GanttExpandChangeEvent, GanttColumnResizeEvent, GanttColumnReorderEvent, GanttRowClickEvent, GanttRowContextMenuEvent, GanttRowDoubleClickEvent, GanttTaskClickEvent, GanttTaskContextMenuEvent, GanttTaskDoubleClickEvent, GanttTaskRemoveClickEvent, GanttKeyDownEvent, GanttSelectionChangeEvent, GanttHeaderSelectionChangeEvent, GanttAddClickEvent, GanttDependencyCreateEvent, orderBy, filterBy, mapTree, extendDataItem, createDataTree, removeTask, addTask, updateTask, addDependency, GanttTextFilter, GanttTextFilterProps, GanttNumericFilter, GanttNumericFilterProps, GanttBooleanFilter, GanttBooleanFilterProps, GanttDateFilter, GanttDateFilterProps, GanttViewProps, GanttRow, GanttRowProps, GanttForm, GanttFormStateChangeEvent, GanttRemoveDialog, GanttRemoveDialogStateChangeEvent, GanttViewTimelineHeaderCellProps, GanttSlotType, getSelectedState, getSelectedStateFromKeyDown, setSelectedState, GanttSelectableMode, GanttSelectableSettings, GANTT_COL_INDEX_ATTRIBUTE, GANTT_ROW_INDEX_ATTRIBUTE, GANTT_PREVENT_SELECTION_ELEMENT, GanttTaskModelFields, GanttDependencyModelFields, GanttColumnProps, GanttDependency, TaskModelFields };