@progress/kendo-angular-gantt 0.2.1-dev.202112091741 → 0.3.0-dev.202201131518

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 (158) hide show
  1. package/dist/cdn/js/kendo-angular-gantt.js +2 -2
  2. package/dist/cdn/main.js +4 -4
  3. package/dist/es/common/touch-enabled.js +9 -0
  4. package/dist/es/dependencies/utils.js +40 -5
  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/add-task.component.js +94 -0
  8. package/dist/es/editing/dependencies-table.component.js +131 -0
  9. package/dist/es/editing/edit-dialog.component.js +37 -6
  10. package/dist/es/editing/edit.service.js +89 -7
  11. package/dist/es/editing/task-fields.component.js +43 -0
  12. package/dist/es/editing/{util.js → utils.js} +0 -0
  13. package/dist/es/expanded-state/expandable.directive.js +4 -6
  14. package/dist/es/gantt.component.js +230 -45
  15. package/dist/es/gantt.module.js +36 -10
  16. package/dist/es/index.js +8 -1
  17. package/dist/es/localization/gantt-localization.service.js +26 -0
  18. package/dist/es/localization/messages.js +45 -1
  19. package/dist/es/main.js +1 -0
  20. package/dist/es/models/dependency-type.enum.js +16 -0
  21. package/dist/es/models/events/{add-event.interface.js → dependency-add-event.interface.js} +0 -0
  22. package/dist/es/models/events/{edit-event.interface.js → task-add-event.interface.js} +0 -0
  23. package/dist/es/models/models.js +1 -0
  24. package/dist/es/models/{events/remove-event.interface.js → toolbar-settings.js} +0 -0
  25. package/dist/es/models/{toolbar-position.js → view-item.interface.js} +0 -0
  26. package/dist/es/package-metadata.js +1 -1
  27. package/dist/es/rendering/gantt-milestone-task.component.js +7 -4
  28. package/dist/es/rendering/gantt-summary-task.component.js +7 -4
  29. package/dist/es/rendering/gantt-task-base.js +30 -19
  30. package/dist/es/rendering/gantt-task.component.js +8 -6
  31. package/dist/es/rendering/gantt-tasks-table-body.component.js +5 -1
  32. package/dist/es/scrolling/drag-scroll-settings.js +20 -0
  33. package/dist/es/scrolling/timeline-scroll.directive.js +89 -0
  34. package/dist/es/scrolling/timeline-scroll.service.js +39 -0
  35. package/dist/es/scrolling/utils.js +80 -0
  36. package/dist/es/timeline/gantt-timeline.component.js +45 -3
  37. package/dist/es/toolbar/toolbar.component.js +9 -1
  38. package/dist/es/utils.js +143 -12
  39. package/dist/es2015/common/touch-enabled.d.ts +9 -0
  40. package/dist/es2015/common/touch-enabled.js +9 -0
  41. package/dist/es2015/dependencies/utils.d.ts +15 -0
  42. package/dist/es2015/dependencies/utils.js +40 -5
  43. package/dist/es2015/dragging/dependency-drag-create.directive.d.ts +72 -0
  44. package/dist/es2015/dragging/dependency-drag-create.directive.js +324 -0
  45. package/dist/es2015/dragging/drag-validation-tooltip.component.d.ts +29 -0
  46. package/dist/es2015/dragging/drag-validation-tooltip.component.js +76 -0
  47. package/dist/es2015/editing/add-task.component.d.ts +45 -0
  48. package/dist/es2015/editing/add-task.component.js +102 -0
  49. package/dist/es2015/editing/dependencies-table.component.d.ts +39 -0
  50. package/dist/es2015/editing/dependencies-table.component.js +160 -0
  51. package/dist/es2015/editing/edit-dialog.component.d.ts +10 -3
  52. package/dist/es2015/editing/edit-dialog.component.js +55 -33
  53. package/dist/es2015/editing/edit.service.d.ts +24 -3
  54. package/dist/es2015/editing/edit.service.js +78 -10
  55. package/dist/es2015/editing/task-fields.component.d.ts +22 -0
  56. package/dist/es2015/editing/task-fields.component.js +67 -0
  57. package/dist/es2015/editing/{util.d.ts → utils.d.ts} +0 -0
  58. package/dist/es2015/editing/{util.js → utils.js} +0 -0
  59. package/dist/es2015/expanded-state/expandable.directive.d.ts +1 -2
  60. package/dist/es2015/expanded-state/expandable.directive.js +2 -7
  61. package/dist/es2015/gantt.component.d.ts +62 -18
  62. package/dist/es2015/gantt.component.js +290 -43
  63. package/dist/es2015/gantt.module.js +36 -10
  64. package/dist/es2015/index.d.ts +8 -1
  65. package/dist/es2015/index.js +8 -1
  66. package/dist/es2015/index.metadata.json +1 -1
  67. package/dist/es2015/localization/{treelist-messages.directive.d.ts → gantt-localization.service.d.ts} +4 -3
  68. package/dist/es2015/localization/gantt-localization.service.js +25 -0
  69. package/dist/es2015/localization/messages.d.ts +46 -2
  70. package/dist/es2015/localization/messages.js +45 -1
  71. package/dist/es2015/main.d.ts +1 -0
  72. package/dist/es2015/main.js +1 -0
  73. package/dist/es2015/models/dependency-type.enum.d.ts +1 -1
  74. package/dist/es2015/models/dependency-type.enum.js +16 -0
  75. package/dist/es2015/models/events/dependency-add-event.interface.d.ts +26 -0
  76. package/dist/es2015/models/events/{add-event.interface.js → dependency-add-event.interface.js} +0 -0
  77. package/dist/es2015/models/events/task-add-event.interface.d.ts +31 -0
  78. package/dist/es2015/models/events/{edit-event.interface.js → task-add-event.interface.js} +0 -0
  79. package/dist/es2015/models/events/task-edit-event.interface.d.ts +17 -4
  80. package/dist/es2015/models/models.d.ts +4 -3
  81. package/dist/es2015/models/models.js +1 -0
  82. package/dist/es2015/models/toolbar-settings.d.ts +29 -0
  83. package/dist/es2015/models/{events/remove-event.interface.js → toolbar-settings.js} +0 -0
  84. package/dist/es2015/models/view-item.interface.d.ts +35 -0
  85. package/dist/es2015/models/{toolbar-position.js → view-item.interface.js} +0 -0
  86. package/dist/es2015/package-metadata.js +1 -1
  87. package/dist/es2015/rendering/gantt-milestone-task.component.d.ts +2 -1
  88. package/dist/es2015/rendering/gantt-milestone-task.component.js +18 -5
  89. package/dist/es2015/rendering/gantt-summary-task.component.d.ts +2 -1
  90. package/dist/es2015/rendering/gantt-summary-task.component.js +18 -5
  91. package/dist/es2015/rendering/gantt-task-base.d.ts +11 -5
  92. package/dist/es2015/rendering/gantt-task-base.js +30 -19
  93. package/dist/es2015/rendering/gantt-task.component.d.ts +2 -1
  94. package/dist/es2015/rendering/gantt-task.component.js +19 -7
  95. package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +1 -0
  96. package/dist/es2015/rendering/gantt-tasks-table-body.component.js +10 -3
  97. package/dist/es2015/scrolling/drag-scroll-settings.d.ts +47 -0
  98. package/dist/es2015/scrolling/drag-scroll-settings.js +20 -0
  99. package/dist/es2015/scrolling/timeline-scroll.directive.d.ts +24 -0
  100. package/dist/es2015/scrolling/timeline-scroll.directive.js +78 -0
  101. package/dist/es2015/scrolling/timeline-scroll.service.d.ts +20 -0
  102. package/dist/es2015/scrolling/timeline-scroll.service.js +44 -0
  103. package/dist/es2015/scrolling/utils.d.ts +29 -0
  104. package/dist/es2015/scrolling/utils.js +80 -0
  105. package/dist/es2015/timeline/gantt-timeline.component.d.ts +25 -2
  106. package/dist/es2015/timeline/gantt-timeline.component.js +56 -3
  107. package/dist/es2015/toolbar/toolbar-template.directive.d.ts +1 -1
  108. package/dist/es2015/toolbar/toolbar.component.d.ts +2 -0
  109. package/dist/es2015/toolbar/toolbar.component.js +10 -0
  110. package/dist/es2015/utils.d.ts +70 -8
  111. package/dist/es2015/utils.js +143 -12
  112. package/dist/fesm2015/index.js +1981 -424
  113. package/dist/fesm5/index.js +1784 -391
  114. package/dist/npm/common/touch-enabled.js +11 -0
  115. package/dist/npm/dependencies/utils.js +40 -5
  116. package/dist/npm/dragging/dependency-drag-create.directive.js +349 -0
  117. package/dist/npm/dragging/drag-validation-tooltip.component.js +29 -0
  118. package/dist/npm/editing/add-task.component.js +96 -0
  119. package/dist/npm/editing/dependencies-table.component.js +133 -0
  120. package/dist/npm/editing/edit-dialog.component.js +36 -5
  121. package/dist/npm/editing/edit.service.js +88 -6
  122. package/dist/npm/editing/task-fields.component.js +45 -0
  123. package/dist/npm/editing/{util.js → utils.js} +0 -0
  124. package/dist/npm/expanded-state/expandable.directive.js +3 -5
  125. package/dist/npm/gantt.component.js +231 -46
  126. package/dist/npm/gantt.module.js +34 -8
  127. package/dist/npm/index.js +16 -2
  128. package/dist/npm/localization/gantt-localization.service.js +28 -0
  129. package/dist/npm/localization/messages.js +45 -1
  130. package/dist/npm/main.js +2 -0
  131. package/dist/npm/models/dependency-type.enum.js +16 -0
  132. package/dist/npm/models/events/{add-event.interface.js → dependency-add-event.interface.js} +0 -0
  133. package/dist/npm/models/events/{edit-event.interface.js → task-add-event.interface.js} +0 -0
  134. package/dist/npm/models/models.js +2 -0
  135. package/dist/npm/models/{events/remove-event.interface.js → toolbar-settings.js} +0 -0
  136. package/dist/npm/models/{toolbar-position.js → view-item.interface.js} +0 -0
  137. package/dist/npm/package-metadata.js +1 -1
  138. package/dist/npm/rendering/gantt-milestone-task.component.js +6 -3
  139. package/dist/npm/rendering/gantt-summary-task.component.js +6 -3
  140. package/dist/npm/rendering/gantt-task-base.js +30 -19
  141. package/dist/npm/rendering/gantt-task.component.js +7 -5
  142. package/dist/npm/rendering/gantt-tasks-table-body.component.js +5 -1
  143. package/dist/npm/scrolling/drag-scroll-settings.js +22 -0
  144. package/dist/npm/scrolling/timeline-scroll.directive.js +91 -0
  145. package/dist/npm/scrolling/timeline-scroll.service.js +41 -0
  146. package/dist/npm/scrolling/utils.js +83 -0
  147. package/dist/npm/timeline/gantt-timeline.component.js +44 -2
  148. package/dist/npm/toolbar/toolbar.component.js +9 -1
  149. package/dist/npm/utils.js +143 -12
  150. package/dist/systemjs/kendo-angular-gantt.js +1 -1
  151. package/package.json +9 -6
  152. package/dist/es/localization/treelist-messages.directive.js +0 -31
  153. package/dist/es2015/localization/treelist-messages.directive.js +0 -29
  154. package/dist/es2015/models/events/add-event.interface.d.ts +0 -16
  155. package/dist/es2015/models/events/edit-event.interface.d.ts +0 -19
  156. package/dist/es2015/models/events/remove-event.interface.d.ts +0 -16
  157. package/dist/es2015/models/toolbar-position.d.ts +0 -9
  158. package/dist/npm/localization/treelist-messages.directive.js +0 -33
@@ -9,7 +9,8 @@ import { CompositeFilterDescriptor, SortDescriptor } from '@progress/kendo-data-
9
9
  import { Day } from '@progress/kendo-date-math';
10
10
  import { Observable } from 'rxjs';
11
11
  import { GanttColumnBase } from './columns/columns';
12
- import { DataStateChangeEvent, ColumnMenuSettings, RowClassFn, TaskClassFn, ColumnVisibilityChangeEvent, ColumnResizeEvent, ColumnLockedChangeEvent, ColumnReorderEvent, ColumnReorderConfig, GanttTaskModelFields, GanttDependencyModelFields, SortSettings, CellClickEvent, TaskClickEvent } from './models/models';
12
+ import { DataStateChangeEvent, ColumnMenuSettings, RowClassFn, TaskClassFn, ColumnVisibilityChangeEvent, ColumnResizeEvent, ColumnLockedChangeEvent, ColumnReorderEvent, ColumnReorderConfig, GanttTaskModelFields, GanttDependencyModelFields, SortSettings, CellClickEvent, TaskClickEvent, DependencyAddEvent } from './models/models';
13
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
13
14
  import { TimelineViewService } from './timeline/timeline-view.service';
14
15
  import { TimelineViewType } from './models/timeline-view';
15
16
  import { TimelineBaseViewService } from './timeline/timeline-base-view.service';
@@ -18,18 +19,20 @@ import { DependencyDomService } from './dependencies/dependency-dom.service';
18
19
  import { MappingService } from './common/mapping.service';
19
20
  import { OptionChangesService } from './common/option-changes.service';
20
21
  import { EditService } from './editing/edit.service';
21
- import { LocalizationService } from '@progress/kendo-angular-l10n';
22
22
  import { TimelinePaneOptions, TreeListPaneOptions } from './models/splitter-pane-options.interface';
23
23
  import { GanttTaskTemplateDirective } from './template-directives/task-template.directive';
24
24
  import { GanttSummaryTaskTemplateDirective } from './template-directives/summary-task-template.directive';
25
25
  import { GanttTaskContentTemplateDirective } from './template-directives/task-content-template.directive';
26
26
  import { ToolbarTemplateDirective } from './toolbar/toolbar-template.directive';
27
- import { ToolbarPosition } from './models/toolbar-position';
27
+ import { GanttTimelineComponent } from './timeline/gantt-timeline.component';
28
+ import { ToolbarSettings } from './models/toolbar-settings';
28
29
  import { ExpandEvent } from './expanded-state/expand-event';
29
30
  import { ViewBase } from './timeline/view-base';
30
31
  import { SelectionChangeEvent } from './selection/selection-change-event';
31
32
  import { TaskEditEvent } from './models/events/task-edit-event.interface';
32
33
  import { CellCloseEvent } from './models/events/cell-close-event.interface';
34
+ import { TaskAddEvent } from './models/events/task-add-event.interface';
35
+ import { DragScrollSettings } from './scrolling/drag-scroll-settings';
33
36
  /**
34
37
  * Represents the Kendo UI Gantt component for Angular.
35
38
  *
@@ -109,10 +112,11 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
109
112
  private optionChangesService;
110
113
  private dependencyDomService;
111
114
  private editService;
112
- localizationService: LocalizationService;
115
+ private localizationService;
113
116
  private hostElement;
114
117
  private zone;
115
118
  treeList: TreeListComponent;
119
+ timeline: GanttTimelineComponent;
116
120
  /**
117
121
  * @hidden
118
122
  */
@@ -162,11 +166,22 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
162
166
  */
163
167
  data: any[];
164
168
  /**
165
- * Provides a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection))
169
+ * Specifies a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection)).
166
170
  *
167
171
  * > The [`selectable`]({% slug api_gantt_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
168
172
  */
169
173
  isSelected: (dataItem: object) => boolean;
174
+ /**
175
+ * Specifies a callback that determines if a new dependency is valid.
176
+ * Used when evaluating if an attempt to create a new dependency will result in a valid link between the two tasks
177
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-validation).
178
+ *
179
+ * By defalut, dependencies are deemed invalid when:
180
+ * - The two tasks are in a parent-child relationship.
181
+ * - The two tasks are already dependent on one another. Only one dependency is allowed per pair.
182
+ * - The start or end times of the two tasks are incompatible with the attempted dependency type.
183
+ */
184
+ validateNewDependency: (dependency: object) => boolean;
170
185
  /**
171
186
  * Fires when the Gantt selection is changed through user interaction.
172
187
  *
@@ -183,24 +198,27 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
183
198
  */
184
199
  selectable: boolean;
185
200
  /**
186
- * The position of the toolbar.
201
+ * The toolbar configuration. Defines the position and content of the toolbar(s).
202
+ * The available properties are `position`, `addTaskTool`, and `viewSelectorTool`.
203
+ * All are optional and default to `top`.
187
204
  *
188
- * The possible values are:
189
- * - `top`—Positions the toolbar above the Gantt panes.
190
- * - `bottom`—Positions the toolbar below the Gantt panes.
205
+ * The possible values for each option are:
206
+ * - `top`—Positions the toolbar above the Gantt panes. Renders the respective tool in the top toolbar.
207
+ * - `bottom`—Positions the toolbar below the Gantt panes. Renders the respective tool in the bottom toolbar.
191
208
  * - `both`—Displays two toolbar instances. Positions the first one above,
192
- * and the second one - below the Gantt panes.
193
- * - `none`—No toolbar is rendered.
209
+ * and the second one - below the Gantt panes. Renders the respective tool in the both toolbars.
210
+ * - `none`—No toolbar is rendered when used for setting `position`.
211
+ * No add task or view selector tool is rendered when used for setting `addTaskTool` or `viewSelectorTool`.
194
212
  */
195
- toolbarPosition: ToolbarPosition;
213
+ toolbarSettings: ToolbarSettings;
196
214
  /**
197
215
  * Gets or sets the callback function that retrieves the child items for a particular item.
198
216
  */
199
- fetchChildren: (item: object) => Observable<object[]>;
217
+ fetchChildren: (dataItem: any) => Observable<object[]>;
200
218
  /**
201
219
  * Gets or sets the callback function that indicates if a particular item has child items.
202
220
  */
203
- hasChildren: (item: object) => boolean;
221
+ hasChildren: (dataItem: any) => boolean;
204
222
  /**
205
223
  * Defines the dependencies that will be drawn between the rendered tasks.
206
224
  *
@@ -297,6 +315,12 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
297
315
  * @default false
298
316
  */
299
317
  columnsResizable: boolean;
318
+ /**
319
+ * Specifies the settings for auto-scrolling during dragging
320
+ * when the pointer moves outside of the container bounderies
321
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-auto-scrolling).
322
+ */
323
+ dragScrollSettings: DragScrollSettings;
300
324
  /**
301
325
  * Fires when an item is expanded.
302
326
  */
@@ -335,6 +359,15 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
335
359
  * Fires when the user saves an edited task.
336
360
  */
337
361
  save: EventEmitter<TaskEditEvent>;
362
+ /**
363
+ * Fires when the user adds a task.
364
+ */
365
+ taskAdd: EventEmitter<TaskAddEvent>;
366
+ /**
367
+ * Fires when the user adds a dependency via dragging
368
+ * [see example]({% slug editing_drag_create_dependencies_gantt %}#toc-basic-concepts).
369
+ */
370
+ dependencyAdd: EventEmitter<DependencyAddEvent>;
338
371
  /**
339
372
  * Fires when the sorting of the Gantt is changed.
340
373
  * You have to handle the event yourself and sort the data.
@@ -399,6 +432,15 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
399
432
  * @hidden
400
433
  */
401
434
  readonly filterMenu: string | boolean;
435
+ /**
436
+ * @hidden
437
+ *
438
+ * Specifies whether the dependency drag clues will be rendered.
439
+ * Set internally by the dependency-drag-create directive.
440
+ *
441
+ * @default false
442
+ */
443
+ renderDependencyDragClues: boolean;
402
444
  /**
403
445
  * @hidden
404
446
  */
@@ -434,10 +476,6 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
434
476
  * Used by the views selector.
435
477
  */
436
478
  readonly viewTypes: string[];
437
- /**
438
- * @hidden
439
- */
440
- readonly editDialogFormGroup: FormGroup;
441
479
  /**
442
480
  * @hidden
443
481
  *
@@ -454,12 +492,16 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
454
492
  showConfirmationDialog: boolean;
455
493
  private _columns;
456
494
  private _data;
495
+ private _dragScrollSettings;
457
496
  private _timelinePaneOptions;
458
497
  private _treeListPaneOptions;
459
498
  private _customToolbarTemplate;
460
499
  private _rowClass;
461
500
  private _taskClass;
462
501
  private _activeView;
502
+ private _toolbarSettings;
503
+ private _fetchChildren;
504
+ private _hasChildren;
463
505
  private lastTreeListCellClick;
464
506
  private direction;
465
507
  private rtl;
@@ -603,4 +645,6 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
603
645
  private getActiveViewOptions;
604
646
  private isSameSelection;
605
647
  private getSelectionAction;
648
+ private getFirstSelectedItem;
649
+ private defaultValidateNewDependencyCallback;
606
650
  }