@progress/kendo-angular-gantt 0.3.0-dev.202201111723 → 1.0.0

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 (138) hide show
  1. package/dist/cdn/js/kendo-angular-gantt.js +2 -2
  2. package/dist/cdn/main.js +1 -29
  3. package/dist/es/common/touch-enabled.js +9 -0
  4. package/dist/es/dependencies/utils.js +34 -0
  5. package/dist/es/dragging/dependency-drag-create.directive.js +347 -0
  6. package/dist/es/dragging/drag-validation-tooltip.component.js +27 -0
  7. package/dist/es/editing/dependencies-table.component.js +1 -1
  8. package/dist/es/editing/edit-dialog.component.js +3 -3
  9. package/dist/es/editing/edit.service.js +4 -2
  10. package/dist/es/editing/task-fields.component.js +1 -1
  11. package/dist/es/editing/{util.js → utils.js} +0 -0
  12. package/dist/es/gantt.component.js +313 -28
  13. package/dist/es/gantt.module.js +23 -6
  14. package/dist/es/index.js +5 -0
  15. package/dist/es/main.js +1 -0
  16. package/dist/es/models/events/dependency-add-event.interface.js +4 -0
  17. package/dist/es/models/events/task-delete-event.interface.js +4 -0
  18. package/dist/es/models/view-item.interface.js +4 -0
  19. package/dist/es/navigation/navigation-models.js +4 -0
  20. package/dist/es/navigation/navigation.service.js +390 -0
  21. package/dist/es/navigation/utils.js +77 -0
  22. package/dist/es/package-metadata.js +1 -1
  23. package/dist/es/rendering/gantt-milestone-task.component.js +12 -6
  24. package/dist/es/rendering/gantt-summary-task.component.js +27 -6
  25. package/dist/es/rendering/gantt-task-base.js +84 -22
  26. package/dist/es/rendering/gantt-task.component.js +13 -8
  27. package/dist/es/rendering/gantt-tasks-table-body.component.js +13 -5
  28. package/dist/es/scrolling/drag-scroll-settings.js +20 -0
  29. package/dist/es/scrolling/timeline-scroll.directive.js +89 -0
  30. package/dist/es/scrolling/timeline-scroll.service.js +39 -0
  31. package/dist/es/scrolling/utils.js +80 -0
  32. package/dist/es/timeline/gantt-timeline.component.js +50 -4
  33. package/dist/es/toolbar/toolbar.component.js +12 -13
  34. package/dist/es/toolbar/view-selector.component.js +1 -1
  35. package/dist/es/utils.js +153 -12
  36. package/dist/es2015/common/touch-enabled.d.ts +9 -0
  37. package/dist/es2015/common/touch-enabled.js +9 -0
  38. package/dist/es2015/dependencies/utils.d.ts +15 -0
  39. package/dist/es2015/dependencies/utils.js +34 -0
  40. package/dist/es2015/dragging/dependency-drag-create.directive.d.ts +72 -0
  41. package/dist/es2015/dragging/dependency-drag-create.directive.js +324 -0
  42. package/dist/es2015/dragging/drag-validation-tooltip.component.d.ts +29 -0
  43. package/dist/es2015/dragging/drag-validation-tooltip.component.js +76 -0
  44. package/dist/es2015/editing/dependencies-table.component.js +1 -1
  45. package/dist/es2015/editing/edit-dialog.component.d.ts +1 -1
  46. package/dist/es2015/editing/edit-dialog.component.js +12 -4
  47. package/dist/es2015/editing/edit.service.d.ts +2 -3
  48. package/dist/es2015/editing/edit.service.js +4 -2
  49. package/dist/es2015/editing/task-fields.component.js +1 -1
  50. package/dist/es2015/editing/{util.d.ts → utils.d.ts} +2 -2
  51. package/dist/es2015/editing/{util.js → utils.js} +0 -0
  52. package/dist/es2015/gantt.component.d.ts +112 -17
  53. package/dist/es2015/gantt.component.js +292 -30
  54. package/dist/es2015/gantt.module.js +23 -6
  55. package/dist/es2015/index.d.ts +5 -0
  56. package/dist/es2015/index.js +5 -0
  57. package/dist/es2015/index.metadata.json +1 -1
  58. package/dist/es2015/main.d.ts +1 -0
  59. package/dist/es2015/main.js +1 -0
  60. package/dist/es2015/models/events/dependency-add-event.interface.d.ts +26 -0
  61. package/dist/es2015/models/events/dependency-add-event.interface.js +4 -0
  62. package/dist/es2015/models/events/task-click-event.interface.d.ts +3 -3
  63. package/dist/es2015/models/events/task-delete-event.interface.d.ts +21 -0
  64. package/dist/es2015/models/events/task-delete-event.interface.js +4 -0
  65. package/dist/es2015/models/events/task-edit-event.interface.d.ts +27 -10
  66. package/dist/es2015/models/models.d.ts +4 -0
  67. package/dist/es2015/models/view-item.interface.d.ts +35 -0
  68. package/dist/es2015/models/view-item.interface.js +4 -0
  69. package/dist/es2015/navigation/navigation-models.d.ts +34 -0
  70. package/dist/es2015/navigation/navigation-models.js +4 -0
  71. package/dist/es2015/navigation/navigation.service.d.ts +126 -0
  72. package/dist/es2015/navigation/navigation.service.js +355 -0
  73. package/dist/es2015/navigation/utils.d.ts +26 -0
  74. package/dist/es2015/navigation/utils.js +69 -0
  75. package/dist/es2015/package-metadata.js +1 -1
  76. package/dist/es2015/rendering/gantt-milestone-task.component.d.ts +3 -1
  77. package/dist/es2015/rendering/gantt-milestone-task.component.js +35 -8
  78. package/dist/es2015/rendering/gantt-summary-task.component.d.ts +5 -1
  79. package/dist/es2015/rendering/gantt-summary-task.component.js +47 -8
  80. package/dist/es2015/rendering/gantt-task-base.d.ts +20 -6
  81. package/dist/es2015/rendering/gantt-task-base.js +75 -22
  82. package/dist/es2015/rendering/gantt-task.component.d.ts +4 -2
  83. package/dist/es2015/rendering/gantt-task.component.js +47 -13
  84. package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +6 -3
  85. package/dist/es2015/rendering/gantt-tasks-table-body.component.js +27 -9
  86. package/dist/es2015/scrolling/drag-scroll-settings.d.ts +47 -0
  87. package/dist/es2015/scrolling/drag-scroll-settings.js +20 -0
  88. package/dist/es2015/scrolling/scroll-sync.service.d.ts +1 -1
  89. package/dist/es2015/scrolling/timeline-scroll.directive.d.ts +24 -0
  90. package/dist/es2015/scrolling/timeline-scroll.directive.js +78 -0
  91. package/dist/es2015/scrolling/timeline-scroll.service.d.ts +20 -0
  92. package/dist/es2015/scrolling/timeline-scroll.service.js +44 -0
  93. package/dist/es2015/scrolling/utils.d.ts +29 -0
  94. package/dist/es2015/scrolling/utils.js +80 -0
  95. package/dist/es2015/timeline/gantt-timeline.component.d.ts +29 -4
  96. package/dist/es2015/timeline/gantt-timeline.component.js +67 -5
  97. package/dist/es2015/toolbar/toolbar.component.d.ts +4 -5
  98. package/dist/es2015/toolbar/toolbar.component.js +12 -13
  99. package/dist/es2015/toolbar/view-selector.component.js +3 -1
  100. package/dist/es2015/utils.d.ts +77 -8
  101. package/dist/es2015/utils.js +153 -12
  102. package/dist/fesm2015/index.js +3033 -1367
  103. package/dist/fesm5/index.js +2447 -830
  104. package/dist/npm/common/touch-enabled.js +11 -0
  105. package/dist/npm/dependencies/utils.js +34 -0
  106. package/dist/npm/dragging/dependency-drag-create.directive.js +349 -0
  107. package/dist/npm/dragging/drag-validation-tooltip.component.js +29 -0
  108. package/dist/npm/editing/dependencies-table.component.js +1 -1
  109. package/dist/npm/editing/edit-dialog.component.js +3 -3
  110. package/dist/npm/editing/edit.service.js +4 -2
  111. package/dist/npm/editing/task-fields.component.js +1 -1
  112. package/dist/npm/editing/{util.js → utils.js} +0 -0
  113. package/dist/npm/gantt.component.js +315 -30
  114. package/dist/npm/gantt.module.js +22 -5
  115. package/dist/npm/index.js +10 -0
  116. package/dist/npm/main.js +2 -0
  117. package/dist/npm/models/events/dependency-add-event.interface.js +6 -0
  118. package/dist/npm/models/events/task-delete-event.interface.js +6 -0
  119. package/dist/npm/models/view-item.interface.js +6 -0
  120. package/dist/npm/navigation/navigation-models.js +6 -0
  121. package/dist/npm/navigation/navigation.service.js +392 -0
  122. package/dist/npm/navigation/utils.js +79 -0
  123. package/dist/npm/package-metadata.js +1 -1
  124. package/dist/npm/rendering/gantt-milestone-task.component.js +11 -5
  125. package/dist/npm/rendering/gantt-summary-task.component.js +26 -5
  126. package/dist/npm/rendering/gantt-task-base.js +84 -22
  127. package/dist/npm/rendering/gantt-task.component.js +12 -7
  128. package/dist/npm/rendering/gantt-tasks-table-body.component.js +13 -5
  129. package/dist/npm/scrolling/drag-scroll-settings.js +22 -0
  130. package/dist/npm/scrolling/timeline-scroll.directive.js +91 -0
  131. package/dist/npm/scrolling/timeline-scroll.service.js +41 -0
  132. package/dist/npm/scrolling/utils.js +83 -0
  133. package/dist/npm/timeline/gantt-timeline.component.js +49 -3
  134. package/dist/npm/toolbar/toolbar.component.js +10 -11
  135. package/dist/npm/toolbar/view-selector.component.js +1 -1
  136. package/dist/npm/utils.js +153 -12
  137. package/dist/systemjs/kendo-angular-gantt.js +1 -1
  138. package/package.json +23 -21
@@ -8,8 +8,10 @@ import { TreeListComponent, DataBoundTreeComponent, ExpandableTreeComponent, Sel
8
8
  import { CompositeFilterDescriptor, SortDescriptor } from '@progress/kendo-data-query';
9
9
  import { Day } from '@progress/kendo-date-math';
10
10
  import { Observable } from 'rxjs';
11
+ import { GanttTimelineComponent } from './timeline/gantt-timeline.component';
11
12
  import { GanttColumnBase } from './columns/columns';
12
- import { DataStateChangeEvent, ColumnMenuSettings, RowClassFn, TaskClassFn, ColumnVisibilityChangeEvent, ColumnResizeEvent, ColumnLockedChangeEvent, ColumnReorderEvent, ColumnReorderConfig, GanttTaskModelFields, GanttDependencyModelFields, SortSettings, CellClickEvent, TaskClickEvent } from './models/models';
13
+ import { DataStateChangeEvent, ColumnMenuSettings, RowClassFn, TaskClassFn, ColumnVisibilityChangeEvent, ColumnResizeEvent, ColumnLockedChangeEvent, ColumnReorderEvent, ColumnReorderConfig, GanttTaskModelFields, GanttDependencyModelFields, SortSettings, CellClickEvent, TaskClickEvent, DependencyAddEvent, TaskDeleteEvent } from './models/models';
14
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
13
15
  import { TimelineViewService } from './timeline/timeline-view.service';
14
16
  import { TimelineViewType } from './models/timeline-view';
15
17
  import { TimelineBaseViewService } from './timeline/timeline-base-view.service';
@@ -18,7 +20,7 @@ import { DependencyDomService } from './dependencies/dependency-dom.service';
18
20
  import { MappingService } from './common/mapping.service';
19
21
  import { OptionChangesService } from './common/option-changes.service';
20
22
  import { EditService } from './editing/edit.service';
21
- import { LocalizationService } from '@progress/kendo-angular-l10n';
23
+ import { NavigationService } from './navigation/navigation.service';
22
24
  import { TimelinePaneOptions, TreeListPaneOptions } from './models/splitter-pane-options.interface';
23
25
  import { GanttTaskTemplateDirective } from './template-directives/task-template.directive';
24
26
  import { GanttSummaryTaskTemplateDirective } from './template-directives/summary-task-template.directive';
@@ -31,6 +33,8 @@ import { SelectionChangeEvent } from './selection/selection-change-event';
31
33
  import { TaskEditEvent } from './models/events/task-edit-event.interface';
32
34
  import { CellCloseEvent } from './models/events/cell-close-event.interface';
33
35
  import { TaskAddEvent } from './models/events/task-add-event.interface';
36
+ import { ViewItem } from './models/view-item.interface';
37
+ import { DragScrollSettings } from './scrolling/drag-scroll-settings';
34
38
  /**
35
39
  * Represents the Kendo UI Gantt component for Angular.
36
40
  *
@@ -113,21 +117,24 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
113
117
  private localizationService;
114
118
  private hostElement;
115
119
  private zone;
120
+ private navigationService;
116
121
  treeList: TreeListComponent;
117
- /**
118
- * @hidden
119
- */
122
+ timeline: GanttTimelineComponent;
120
123
  taskContentTemplate: GanttTaskContentTemplateDirective;
124
+ taskTemplate: GanttTaskTemplateDirective;
125
+ summaryTaskTemplate: GanttSummaryTaskTemplateDirective;
126
+ toolbarTemplateChildren: QueryList<ToolbarTemplateDirective>;
127
+ toolbarTemplate: ToolbarTemplateDirective;
121
128
  /**
122
129
  * @hidden
123
130
  */
124
- taskTemplate: GanttTaskTemplateDirective;
131
+ roleDescription: string;
132
+ readonly hostRoleDescriptionAttr: string;
125
133
  /**
126
134
  * @hidden
127
135
  */
128
- summaryTaskTemplate: GanttSummaryTaskTemplateDirective;
129
- toolbarTemplateChildren: QueryList<ToolbarTemplateDirective>;
130
- toolbarTemplate: ToolbarTemplateDirective;
136
+ role: string;
137
+ readonly hostRoleAttr: string;
131
138
  hostClasses: boolean;
132
139
  readonly dir: string;
133
140
  /**
@@ -163,11 +170,22 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
163
170
  */
164
171
  data: any[];
165
172
  /**
166
- * Provides a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection))
173
+ * Specifies a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection)).
167
174
  *
168
175
  * > The [`selectable`]({% slug api_gantt_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
169
176
  */
170
177
  isSelected: (dataItem: object) => boolean;
178
+ /**
179
+ * Specifies a callback that determines if a new dependency is valid.
180
+ * Used when evaluating if an attempt to create a new dependency will result in a valid link between the two tasks
181
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-validation).
182
+ *
183
+ * By defalut, dependencies are deemed invalid when:
184
+ * - The two tasks are in a parent-child relationship.
185
+ * - The two tasks are already dependent on one another. Only one dependency is allowed per pair.
186
+ * - The start or end times of the two tasks are incompatible with the attempted dependency type.
187
+ */
188
+ validateNewDependency: (dependency: object) => boolean;
171
189
  /**
172
190
  * Fires when the Gantt selection is changed through user interaction.
173
191
  *
@@ -247,6 +265,12 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
247
265
  * The end of the work week (index based).
248
266
  */
249
267
  workWeekEnd: Day;
268
+ /**
269
+ * If set to `true`, the user can use dedicated shortcuts to interact with the Gantt.
270
+ * By default, navigation is disabled for the TreeList and Timeline parts of the component,
271
+ * ([see example]({% slug keyboard_navigation_gantt %})).
272
+ */
273
+ navigable: boolean;
250
274
  /**
251
275
  * The options of the timeline splitter pane. By default the pane is `collapsible`,
252
276
  * `resizable`, not `collapsed`, and its `size` is `'50%'`.
@@ -301,6 +325,12 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
301
325
  * @default false
302
326
  */
303
327
  columnsResizable: boolean;
328
+ /**
329
+ * Specifies the settings for auto-scrolling during dragging
330
+ * when the pointer moves outside of the container bounderies
331
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-auto-scrolling).
332
+ */
333
+ dragScrollSettings: DragScrollSettings;
304
334
  /**
305
335
  * Fires when an item is expanded.
306
336
  */
@@ -319,10 +349,11 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
319
349
  */
320
350
  cellClose: EventEmitter<CellCloseEvent>;
321
351
  /**
322
- * Fires when the end user clicks the `Delete` button in the task editing dialog or the task delete icon.
352
+ * Fires when the end user clicks the `Delete` button in the task editing dialog,
353
+ * the task delete icon, or presses the `Delete` key on the keyboard when a task in the timeline is focused.
323
354
  * Use the event handler to open a confirmation dialog when necessary.
324
355
  */
325
- taskDelete: EventEmitter<any>;
356
+ taskDelete: EventEmitter<TaskDeleteEvent>;
326
357
  /**
327
358
  * Fires when an item is collapsed.
328
359
  */
@@ -343,6 +374,11 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
343
374
  * Fires when the user adds a task.
344
375
  */
345
376
  taskAdd: EventEmitter<TaskAddEvent>;
377
+ /**
378
+ * Fires when the user adds a dependency via dragging
379
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-basic-concepts).
380
+ */
381
+ dependencyAdd: EventEmitter<DependencyAddEvent>;
346
382
  /**
347
383
  * Fires when the sorting of the Gantt is changed.
348
384
  * You have to handle the event yourself and sort the data.
@@ -403,10 +439,23 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
403
439
  * @hidden
404
440
  */
405
441
  readonly renderedTreeListItems: any[];
442
+ /**
443
+ * @hidden
444
+ */
445
+ readonly viewItems: ViewItem[];
406
446
  /**
407
447
  * @hidden
408
448
  */
409
449
  readonly filterMenu: string | boolean;
450
+ /**
451
+ * @hidden
452
+ *
453
+ * Specifies whether the dependency drag clues will be rendered.
454
+ * Set internally by the dependency-drag-create directive.
455
+ *
456
+ * @default false
457
+ */
458
+ renderDependencyDragClues: boolean;
410
459
  /**
411
460
  * @hidden
412
461
  */
@@ -456,8 +505,13 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
456
505
  * @hidden
457
506
  */
458
507
  showConfirmationDialog: boolean;
508
+ /**
509
+ * @hidden
510
+ */
511
+ readonly isInEditMode: boolean;
459
512
  private _columns;
460
513
  private _data;
514
+ private _dragScrollSettings;
461
515
  private _timelinePaneOptions;
462
516
  private _treeListPaneOptions;
463
517
  private _customToolbarTemplate;
@@ -474,11 +528,27 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
474
528
  private optionChangesSubscriptions;
475
529
  private editServiceSubscription;
476
530
  private localizationSubscription;
477
- constructor(timelineViewService: TimelineViewService, scrollSyncService: ScrollSyncService, renderer: Renderer2, mapper: MappingService, optionChangesService: OptionChangesService, dependencyDomService: DependencyDomService, editService: EditService, localizationService: LocalizationService, hostElement: ElementRef<HTMLElement>, zone: NgZone);
531
+ constructor(timelineViewService: TimelineViewService, scrollSyncService: ScrollSyncService, renderer: Renderer2, mapper: MappingService, optionChangesService: OptionChangesService, dependencyDomService: DependencyDomService, editService: EditService, localizationService: LocalizationService, hostElement: ElementRef<HTMLElement>, zone: NgZone, navigationService: NavigationService);
478
532
  ngOnChanges(changes: SimpleChanges): void;
479
533
  ngAfterViewInit(): void;
480
534
  ngAfterContentInit(): void;
481
535
  ngOnDestroy(): void;
536
+ /**
537
+ * Focuses the last active cell or task in the Gantt.
538
+ * If no item has previously been focused, the first cell of the TreeList part will receive focus,
539
+ * ([see example]({% slug keyboard_navigation_gantt %}#toc-controlling-the-focus)).
540
+ */
541
+ focus(): void;
542
+ /**
543
+ * Focuses the targeted cell in the TreeList part of the component,
544
+ * ([see example]({% slug keyboard_navigation_gantt %}#toc-controlling-the-focus)).
545
+ */
546
+ focusCell(rowIndex: number, colIndex: number): void;
547
+ /**
548
+ * Focuses the targeted task in the Timeline part of the component,
549
+ * ([see example]({% slug keyboard_navigation_gantt %}#toc-controlling-the-focus)).
550
+ */
551
+ focusTask(taskIndex: number): void;
482
552
  /**
483
553
  * Applies the minimum possible width for the specified column,
484
554
  * so that the whole text fits without wrapping. This method expects the Gantt
@@ -528,6 +598,10 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
528
598
  * Opens the delete task confirmation dialog.
529
599
  */
530
600
  openConfirmationDialog(): void;
601
+ /**
602
+ * @hidden
603
+ */
604
+ handleConfirmationDialogClose(): void;
531
605
  /**
532
606
  * Opens a cell for editing.
533
607
  */
@@ -600,15 +674,36 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
600
674
  * @hidden
601
675
  */
602
676
  getText(token: string): string;
603
- private emitTaskClick;
604
- private emitSelectionChange;
677
+ /**
678
+ * @hidden
679
+ */
680
+ changeActiveView(view: TimelineViewType): void;
681
+ /**
682
+ * @hidden
683
+ */
684
+ notifyTaskClick(event: PointerEvent | KeyboardEvent, dataItem: any, itemIndex: number): void;
685
+ /**
686
+ * @hidden
687
+ */
688
+ notifySelectionChange(dataItem: any, action: 'select' | 'remove'): void;
689
+ /**
690
+ * @hidden
691
+ */
692
+ notifyTaskDelete(task: any): void;
693
+ /**
694
+ * @hidden
695
+ */
696
+ isSameSelection(action: 'select' | 'remove', dataItem: any): boolean;
697
+ /**
698
+ * @hidden
699
+ */
700
+ getSelectionAction({ ctrlKey, metaKey }: PointerEvent | KeyboardEvent, dataItem: any): 'select' | 'remove';
605
701
  private updateTreeListGroupClass;
606
702
  /**
607
703
  * Used to hide the vertical scrollbar
608
704
  */
609
705
  private updateTreeListMargin;
610
706
  private getActiveViewOptions;
611
- private isSameSelection;
612
- private getSelectionAction;
613
707
  private getFirstSelectedItem;
708
+ private defaultValidateNewDependencyCallback;
614
709
  }