@progress/kendo-angular-gantt 2.0.0-next.202204011501 → 2.0.0-next.202204121507

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 (229) hide show
  1. package/binding-directives/flat-binding.directive.d.ts +24 -0
  2. package/binding-directives/hierarchy-binding.directive.d.ts +22 -0
  3. package/bundles/kendo-angular-gantt.umd.js +1 -1
  4. package/columns/cell-template.directive.d.ts +28 -0
  5. package/columns/column-base.d.ts +85 -0
  6. package/columns/column-group.component.d.ts +103 -0
  7. package/columns/column-menu-template.directive.d.ts +22 -0
  8. package/columns/column.component.d.ts +130 -0
  9. package/columns/columns.d.ts +15 -0
  10. package/columns/edit-template.directive.d.ts +26 -0
  11. package/columns/filter-cell-template.directive.d.ts +21 -0
  12. package/columns/filter-menu-template.directive.d.ts +20 -0
  13. package/columns/footer-template.directive.d.ts +24 -0
  14. package/columns/header-template.directive.d.ts +22 -0
  15. package/columns/span-column.component.d.ts +112 -0
  16. package/common/default-callbacks.d.ts +25 -0
  17. package/common/mapping.service.d.ts +38 -0
  18. package/common/option-changes.service.d.ts +17 -0
  19. package/common/touch-enabled.d.ts +9 -0
  20. package/dependencies/dependency-dom.service.d.ts +46 -0
  21. package/dependencies/dom-dependency-args.d.ts +24 -0
  22. package/dependencies/gantt-dependency.directive.d.ts +29 -0
  23. package/dependencies/utils.d.ts +53 -0
  24. package/dragging/dependency-drag-create.directive.d.ts +75 -0
  25. package/dragging/drag-validation-tooltip.component.d.ts +32 -0
  26. package/editing/add-task.component.d.ts +47 -0
  27. package/editing/dependencies-table.component.d.ts +42 -0
  28. package/editing/edit-dialog.component.d.ts +33 -0
  29. package/editing/edit.service.d.ts +44 -0
  30. package/editing/task-fields.component.d.ts +25 -0
  31. package/editing/utils.d.ts +10 -0
  32. package/esm2015/binding-directives/flat-binding.directive.js +34 -0
  33. package/esm2015/binding-directives/hierarchy-binding.directive.js +32 -0
  34. package/esm2015/columns/cell-template.directive.js +37 -0
  35. package/esm2015/columns/column-base.js +52 -0
  36. package/esm2015/columns/column-group.component.js +94 -0
  37. package/esm2015/columns/column-menu-template.directive.js +31 -0
  38. package/esm2015/columns/column.component.js +133 -0
  39. package/esm2015/columns/columns.js +15 -0
  40. package/esm2015/columns/edit-template.directive.js +35 -0
  41. package/esm2015/columns/filter-cell-template.directive.js +30 -0
  42. package/esm2015/columns/filter-menu-template.directive.js +29 -0
  43. package/esm2015/columns/footer-template.directive.js +33 -0
  44. package/esm2015/columns/header-template.directive.js +31 -0
  45. package/esm2015/columns/span-column.component.js +86 -0
  46. package/esm2015/common/default-callbacks.js +25 -0
  47. package/esm2015/common/mapping.service.js +64 -0
  48. package/esm2015/common/option-changes.service.js +26 -0
  49. package/esm2015/common/touch-enabled.js +9 -0
  50. package/esm2015/dependencies/dependency-dom.service.js +70 -0
  51. package/esm2015/dependencies/dom-dependency-args.js +5 -0
  52. package/esm2015/dependencies/gantt-dependency.directive.js +82 -0
  53. package/esm2015/dependencies/utils.js +195 -0
  54. package/esm2015/dragging/dependency-drag-create.directive.js +318 -0
  55. package/esm2015/dragging/drag-validation-tooltip.component.js +90 -0
  56. package/esm2015/editing/add-task.component.js +109 -0
  57. package/esm2015/editing/dependencies-table.component.js +196 -0
  58. package/esm2015/editing/edit-dialog.component.js +170 -0
  59. package/esm2015/editing/edit.service.js +111 -0
  60. package/esm2015/editing/task-fields.component.js +101 -0
  61. package/esm2015/editing/utils.js +15 -0
  62. package/esm2015/expanded-state/expand-event.js +9 -0
  63. package/esm2015/expanded-state/expandable.directive.js +23 -0
  64. package/esm2015/gantt.component.js +2227 -0
  65. package/esm2015/gantt.module.js +264 -0
  66. package/esm2015/kendo-angular-gantt.js +8 -0
  67. package/esm2015/localization/custom-messages.component.js +41 -0
  68. package/esm2015/localization/gantt-localization.service.js +25 -0
  69. package/esm2015/localization/localized-messages.directive.js +36 -0
  70. package/esm2015/localization/messages.js +157 -0
  71. package/esm2015/main.js +37 -0
  72. package/esm2015/models/cell-content-type.interface.js +5 -0
  73. package/esm2015/models/class-callbacks.js +5 -0
  74. package/esm2015/models/column-menu-settings.interface.js +5 -0
  75. package/esm2015/models/column-reorder-config.js +5 -0
  76. package/esm2015/models/date-range.interface.js +5 -0
  77. package/esm2015/models/dependency-type.enum.js +20 -0
  78. package/esm2015/models/events/cell-click-event.interface.js +5 -0
  79. package/esm2015/models/events/cell-close-event.interface.js +14 -0
  80. package/esm2015/models/events/click-event.interface.js +5 -0
  81. package/esm2015/models/events/column-locked-change-event.interface.js +5 -0
  82. package/esm2015/models/events/column-reorder-event.interface.js +5 -0
  83. package/esm2015/models/events/column-resize-event.interface.js +5 -0
  84. package/esm2015/models/events/column-visibility-change-event.interface.js +5 -0
  85. package/esm2015/models/events/data-state-change-event.interface.js +5 -0
  86. package/esm2015/models/events/dependency-add-event.interface.js +5 -0
  87. package/esm2015/models/events/selected-view-change-event.interface.js +5 -0
  88. package/esm2015/models/events/task-add-event.interface.js +5 -0
  89. package/esm2015/models/events/task-click-event.interface.js +5 -0
  90. package/esm2015/models/events/task-delete-event.interface.js +5 -0
  91. package/esm2015/models/events/task-edit-event.interface.js +5 -0
  92. package/esm2015/models/events/task-move-end-event.interface.js +5 -0
  93. package/esm2015/models/events/task-move-event.interface.js +5 -0
  94. package/esm2015/models/events/task-move-start-event.interface.js +5 -0
  95. package/esm2015/models/events/task-resize-end-event.interface.js +5 -0
  96. package/esm2015/models/events/task-resize-event.interface.js +5 -0
  97. package/esm2015/models/events/task-resize-start-event.interface.js +5 -0
  98. package/esm2015/models/filterable-settings.js +5 -0
  99. package/esm2015/models/gantt-dependency-model-fields.interface.js +13 -0
  100. package/esm2015/models/gantt-dependency.interface.js +5 -0
  101. package/esm2015/models/gantt-task-model-fields.interface.js +15 -0
  102. package/esm2015/models/gantt-task.interface.js +5 -0
  103. package/esm2015/models/models.js +7 -0
  104. package/esm2015/models/slot.interface.js +5 -0
  105. package/esm2015/models/sort-settings.js +17 -0
  106. package/esm2015/models/splitter-pane-options.interface.js +20 -0
  107. package/esm2015/models/timeline-options.interface.js +5 -0
  108. package/esm2015/models/timeline-view.js +5 -0
  109. package/esm2015/models/toolbar-settings.js +5 -0
  110. package/esm2015/models/view-item.interface.js +5 -0
  111. package/esm2015/navigation/navigation-models.js +5 -0
  112. package/esm2015/navigation/navigation.service.js +265 -0
  113. package/esm2015/navigation/utils.js +69 -0
  114. package/esm2015/package-metadata.js +15 -0
  115. package/esm2015/rendering/gantt-header-table-body.component.js +42 -0
  116. package/esm2015/rendering/gantt-milestone-task.component.js +107 -0
  117. package/esm2015/rendering/gantt-summary-task.component.js +158 -0
  118. package/esm2015/rendering/gantt-task-base.js +148 -0
  119. package/esm2015/rendering/gantt-task.component.js +204 -0
  120. package/esm2015/rendering/gantt-tasks-table-body.component.js +160 -0
  121. package/esm2015/scrolling/drag-scroll-settings.js +20 -0
  122. package/esm2015/scrolling/scroll-sync.service.js +80 -0
  123. package/esm2015/scrolling/timeline-scroll.directive.js +75 -0
  124. package/esm2015/scrolling/timeline-scroll.service.js +39 -0
  125. package/esm2015/scrolling/utils.js +77 -0
  126. package/esm2015/selection/selectable.directive.js +112 -0
  127. package/esm2015/selection/selection-change-event.js +5 -0
  128. package/esm2015/template-directives/summary-task-template.directive.js +50 -0
  129. package/esm2015/template-directives/task-content-template.directive.js +45 -0
  130. package/esm2015/template-directives/task-template.directive.js +48 -0
  131. package/esm2015/timeline/gantt-timeline.component.js +334 -0
  132. package/esm2015/timeline/timeline-base-view.service.js +160 -0
  133. package/esm2015/timeline/timeline-day-view.component.js +38 -0
  134. package/esm2015/timeline/timeline-day-view.service.js +66 -0
  135. package/esm2015/timeline/timeline-month-view.component.js +38 -0
  136. package/esm2015/timeline/timeline-month-view.service.js +64 -0
  137. package/esm2015/timeline/timeline-view.service.js +35 -0
  138. package/esm2015/timeline/timeline-week-view.component.js +38 -0
  139. package/esm2015/timeline/timeline-week-view.service.js +60 -0
  140. package/esm2015/timeline/view-base.js +45 -0
  141. package/esm2015/toolbar/toolbar-template.directive.js +127 -0
  142. package/esm2015/toolbar/toolbar.component.js +94 -0
  143. package/esm2015/toolbar/view-selector.component.js +96 -0
  144. package/esm2015/utils.js +293 -0
  145. package/expanded-state/expand-event.d.ts +13 -0
  146. package/expanded-state/expandable.directive.d.ts +20 -0
  147. package/fesm2015/kendo-angular-gantt.js +7706 -0
  148. package/gantt.component.d.ts +750 -0
  149. package/gantt.module.d.ts +94 -0
  150. package/kendo-angular-gantt.d.ts +9 -0
  151. package/localization/custom-messages.component.d.ts +18 -0
  152. package/localization/gantt-localization.service.d.ts +18 -0
  153. package/localization/localized-messages.directive.d.ts +16 -0
  154. package/localization/messages.d.ts +293 -0
  155. package/main.d.ts +39 -0
  156. package/models/cell-content-type.interface.d.ts +10 -0
  157. package/models/class-callbacks.d.ts +43 -0
  158. package/models/column-menu-settings.interface.d.ts +26 -0
  159. package/models/column-reorder-config.d.ts +10 -0
  160. package/models/date-range.interface.d.ts +19 -0
  161. package/models/dependency-type.enum.d.ts +19 -0
  162. package/models/events/cell-click-event.interface.d.ts +43 -0
  163. package/models/events/cell-close-event.interface.d.ts +48 -0
  164. package/models/events/click-event.interface.d.ts +23 -0
  165. package/models/events/column-locked-change-event.interface.d.ts +16 -0
  166. package/models/events/column-reorder-event.interface.d.ts +10 -0
  167. package/models/events/column-resize-event.interface.d.ts +10 -0
  168. package/models/events/column-visibility-change-event.interface.d.ts +14 -0
  169. package/models/events/data-state-change-event.interface.d.ts +10 -0
  170. package/models/events/dependency-add-event.interface.d.ts +26 -0
  171. package/models/events/selected-view-change-event.interface.d.ts +19 -0
  172. package/models/events/task-add-event.interface.d.ts +31 -0
  173. package/models/events/task-click-event.interface.d.ts +30 -0
  174. package/models/events/task-delete-event.interface.d.ts +21 -0
  175. package/models/events/task-edit-event.interface.d.ts +76 -0
  176. package/models/events/task-move-end-event.interface.d.ts +12 -0
  177. package/models/events/task-move-event.interface.d.ts +23 -0
  178. package/models/events/task-move-start-event.interface.d.ts +15 -0
  179. package/models/events/task-resize-end-event.interface.d.ts +12 -0
  180. package/models/events/task-resize-event.interface.d.ts +23 -0
  181. package/models/events/task-resize-start-event.interface.d.ts +15 -0
  182. package/models/filterable-settings.d.ts +10 -0
  183. package/models/gantt-dependency-model-fields.interface.d.ts +35 -0
  184. package/models/gantt-dependency.interface.d.ts +26 -0
  185. package/models/gantt-task-model-fields.interface.d.ts +42 -0
  186. package/models/gantt-task.interface.d.ts +31 -0
  187. package/models/models.d.ts +42 -0
  188. package/models/slot.interface.d.ts +31 -0
  189. package/models/sort-settings.d.ts +42 -0
  190. package/models/splitter-pane-options.interface.d.ts +54 -0
  191. package/models/timeline-options.interface.d.ts +41 -0
  192. package/models/timeline-view.d.ts +8 -0
  193. package/models/toolbar-settings.d.ts +29 -0
  194. package/models/view-item.interface.d.ts +35 -0
  195. package/navigation/navigation-models.d.ts +38 -0
  196. package/navigation/navigation.service.d.ts +130 -0
  197. package/navigation/utils.d.ts +26 -0
  198. package/package-metadata.d.ts +9 -0
  199. package/package.json +9 -13
  200. package/rendering/gantt-header-table-body.component.d.ts +14 -0
  201. package/rendering/gantt-milestone-task.component.d.ts +22 -0
  202. package/rendering/gantt-summary-task.component.d.ts +25 -0
  203. package/rendering/gantt-task-base.d.ts +59 -0
  204. package/rendering/gantt-task.component.d.ts +26 -0
  205. package/rendering/gantt-tasks-table-body.component.d.ts +33 -0
  206. package/scrolling/drag-scroll-settings.d.ts +47 -0
  207. package/scrolling/scroll-sync.service.d.ts +33 -0
  208. package/scrolling/timeline-scroll.directive.d.ts +27 -0
  209. package/scrolling/timeline-scroll.service.d.ts +23 -0
  210. package/scrolling/utils.d.ts +29 -0
  211. package/selection/selectable.directive.d.ts +45 -0
  212. package/selection/selection-change-event.d.ts +25 -0
  213. package/template-directives/summary-task-template.directive.d.ts +41 -0
  214. package/template-directives/task-content-template.directive.d.ts +36 -0
  215. package/template-directives/task-template.directive.d.ts +39 -0
  216. package/timeline/gantt-timeline.component.d.ts +67 -0
  217. package/timeline/timeline-base-view.service.d.ts +77 -0
  218. package/timeline/timeline-day-view.component.d.ts +18 -0
  219. package/timeline/timeline-day-view.service.d.ts +38 -0
  220. package/timeline/timeline-month-view.component.d.ts +18 -0
  221. package/timeline/timeline-month-view.service.d.ts +38 -0
  222. package/timeline/timeline-view.service.d.ts +19 -0
  223. package/timeline/timeline-week-view.component.d.ts +18 -0
  224. package/timeline/timeline-week-view.service.d.ts +38 -0
  225. package/timeline/view-base.d.ts +34 -0
  226. package/toolbar/toolbar-template.directive.d.ts +112 -0
  227. package/toolbar/toolbar.component.d.ts +29 -0
  228. package/toolbar/view-selector.component.d.ts +43 -0
  229. package/utils.d.ts +166 -0
@@ -0,0 +1,38 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { IntlService } from '@progress/kendo-angular-intl';
6
+ import { MappingService } from '../common/mapping.service';
7
+ import { TimelineBaseViewService } from './timeline-base-view.service';
8
+ import { Slot } from '../models/slot.interface';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * @hidden
12
+ */
13
+ export declare class TimelineMonthViewService extends TimelineBaseViewService {
14
+ constructor(intlService: IntlService, mapper: MappingService);
15
+ /**
16
+ * Gets a week before the first week in which a task starts.
17
+ */
18
+ getStartOffset(rangeStart: Date): Date;
19
+ /**
20
+ * Gets a week after the last week in which a task ends.
21
+ */
22
+ getEndOffset(rangeEnd: Date): Date;
23
+ /**
24
+ *
25
+ * @param tasks - The tasks which are going to be rendered in the table
26
+ * @returns {number}
27
+ */
28
+ getTableWidth(tasks: any[]): number;
29
+ /**
30
+ *
31
+ * @param tasks - The tasks which are going to be rendered in the table
32
+ * @returns {Array<Object>} - A collection containing the months and weeks slots
33
+ * Used to render the number of columns and the header
34
+ */
35
+ getSlots(tasks: any[]): Array<Slot[]>;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<TimelineMonthViewService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<TimelineMonthViewService>;
38
+ }
@@ -0,0 +1,19 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { EventEmitter, Injector } from '@angular/core';
6
+ import { TimelineViewType } from '../models/models';
7
+ import { TimelineBaseViewService } from './timeline-base-view.service';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * @hidden
11
+ */
12
+ export declare class TimelineViewService {
13
+ private injector;
14
+ viewChange: EventEmitter<any>;
15
+ constructor(injector: Injector);
16
+ service(view: TimelineViewType): TimelineBaseViewService;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<TimelineViewService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<TimelineViewService>;
19
+ }
@@ -0,0 +1,18 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { DependencyDomService } from '../dependencies/dependency-dom.service';
6
+ import { TimelineViewType } from '../models/timeline-view';
7
+ import { ViewBase } from './view-base';
8
+ import { OptionChangesService } from '../common/option-changes.service';
9
+ import * as i0 from "@angular/core";
10
+ export declare class TimelineWeekViewComponent extends ViewBase {
11
+ /**
12
+ * The type for this view (`week`).
13
+ */
14
+ readonly type: TimelineViewType;
15
+ constructor(optionChangesService: OptionChangesService, dependencyDomService: DependencyDomService);
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<TimelineWeekViewComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<TimelineWeekViewComponent, "kendo-gantt-timeline-week-view", never, {}, {}, never, never>;
18
+ }
@@ -0,0 +1,38 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { IntlService } from '@progress/kendo-angular-intl';
6
+ import { MappingService } from '../common/mapping.service';
7
+ import { TimelineBaseViewService } from './timeline-base-view.service';
8
+ import { Slot } from '../models/slot.interface';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * @hidden
12
+ */
13
+ export declare class TimelineWeekViewService extends TimelineBaseViewService {
14
+ constructor(intlService: IntlService, mapper: MappingService);
15
+ /**
16
+ * Gets a date a day before the first task start with hours, minutes, seconds, milliseconds cleared.
17
+ */
18
+ getStartOffset(rangeStart: Date): Date;
19
+ /**
20
+ * Gets a date a day after the last task start with hours, minutes, seconds, milliseconds cleared.
21
+ */
22
+ getEndOffset(rangeEnd: Date): Date;
23
+ /**
24
+ *
25
+ * @param tasks - The tasks which are going to be rendered in the table
26
+ * @returns {number}
27
+ */
28
+ getTableWidth(tasks: any[]): number;
29
+ /**
30
+ *
31
+ * @param tasks - The tasks which are going to be rendered in the table
32
+ * @returns {Array<Object>} - A collection containing the day and hours slots
33
+ * Used to render the number of columns and the header
34
+ */
35
+ getSlots(tasks: any[]): Array<Slot[]>;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<TimelineWeekViewService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<TimelineWeekViewService>;
38
+ }
@@ -0,0 +1,34 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { OnChanges, SimpleChanges } from '@angular/core';
6
+ import { DependencyDomService } from '../dependencies/dependency-dom.service';
7
+ import { TimelineViewType } from '../models/timeline-view';
8
+ import { OptionChangesService } from '../common/option-changes.service';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * The base class for the column components of the Gantt.
12
+ */
13
+ export declare abstract class ViewBase implements OnChanges {
14
+ private optionChangesService;
15
+ private dependencyDomService;
16
+ /**
17
+ * The width of the time slot headers. Values are treated as pixels.
18
+ *
19
+ * @default 100
20
+ */
21
+ slotWidth: number;
22
+ /**
23
+ * The type for the view (`day`, `week` or `month`).
24
+ */
25
+ abstract type: TimelineViewType;
26
+ /**
27
+ *
28
+ * @hidden
29
+ */
30
+ constructor(optionChangesService: OptionChangesService, dependencyDomService: DependencyDomService);
31
+ ngOnChanges(changes: SimpleChanges): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewBase, never>;
33
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ViewBase, "kendo-gantt-view-base", never, { "slotWidth": "slotWidth"; }, {}, never>;
34
+ }
@@ -0,0 +1,112 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { ToolbarPosition } from '../models/toolbar-settings';
6
+ import { TemplateRef } from '@angular/core';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Represents the toolbar template of the Gantt.
10
+ *
11
+ * The template context has the following field:
12
+ * - `position`&mdash;The position at which the toolbar template is rendered. The possible values are `'top'` and `'bottom'`.
13
+ *
14
+ * @example
15
+ * ```ts-preview
16
+ *
17
+ * _@Component({
18
+ * selector: 'my-app',
19
+ * template: `
20
+ * <div class="example-config">
21
+ * <input type="radio" id="top" name="position" class="k-radio" value="top" checked (click)="positionChange($event)"/>
22
+ * <label class="k-radio-label" for="top">Top</label><br/>
23
+ * <input type="radio" id="bottom" name="position" class="k-radio" value="bottom" (click)="positionChange($event)"/>
24
+ * <label class="k-radio-label" for="bottom">Bottom</label><br/>
25
+ * <input type="radio" id="both" name="position" value="both" class="k-radio" (click)="positionChange($event)"/>
26
+ * <label class="k-radio-label" for="both">Both</label><br/>
27
+ * </div>
28
+ * <kendo-gantt [[kendoGanttHierarchyBinding]="data"]="data" style="height: 400px">
29
+ * <ng-template kendoGanttToolbarTemplate [position]="position" let-position="position">
30
+ * <button (click)="onClick()" class="k-button">Custom action</button>
31
+ * </ng-template>
32
+ * </kendo-gantt>
33
+ * `
34
+ * })
35
+ *
36
+ * class AppComponent {
37
+ * public position: 'top' | 'bottom' | 'both' = 'top';
38
+ *
39
+ * public data = [{
40
+ * id: 7,
41
+ * title: "Software validation, research and implementation",
42
+ * orderId: 0,
43
+ * start: new Date("2014-06-02T00:00:00.000Z"),
44
+ * end: new Date("2014-07-12T00:00:00.000Z"),
45
+ * completionRatio: 0.45708333333333334,
46
+ * isExpanded: true,
47
+ * children: [{
48
+ * id: 11,
49
+ * title: "Research",
50
+ * orderId: 1,
51
+ * start: new Date("2014-06-02T00:00:00.000Z"),
52
+ * end: new Date("2014-06-07T00:00:00.000Z"),
53
+ * completionRatio: 0.5766666666666667,
54
+ * isExpanded: true,
55
+ * children: [{
56
+ * id: 19,
57
+ * title: "Validation with Customers",
58
+ * orderId: 0,
59
+ * start: new Date("2014-06-02T00:00:00.000Z"),
60
+ * end: new Date("2014-06-04T00:00:00.000Z"),
61
+ * completionRatio: 0.25,
62
+ * isExpanded: true
63
+ * },
64
+ * {
65
+ * id: 20,
66
+ * title: "Market Research",
67
+ * orderId: 1,
68
+ * start: new Date("2014-06-02T00:00:00.000Z"),
69
+ * end: new Date("2014-06-03T02:00:00.000Z"),
70
+ * completionRatio: 0.82,
71
+ * isExpanded: true
72
+ * },
73
+ * {
74
+ * id: 39,
75
+ * title: "Functional and Technical Specification",
76
+ * orderId: 2,
77
+ * start: new Date("2014-06-04T00:00:00.000Z"),
78
+ * end: new Date("2014-06-07T00:00:00.000Z"),
79
+ * completionRatio: 0.66,
80
+ * isExpanded: true
81
+ * }]
82
+ * }]
83
+ * };
84
+ *
85
+ * public positionChange({ target }): void {
86
+ * this.position = target.value;
87
+ * }
88
+ *
89
+ * public onClick(): void {
90
+ * console.log("button was clicked");
91
+ * }
92
+ * }
93
+ *
94
+ * ```
95
+ */
96
+ export declare class ToolbarTemplateDirective {
97
+ templateRef: TemplateRef<any>;
98
+ _position: ToolbarPosition;
99
+ /**
100
+ * Defines the Gantt Toolbar that will use this template.
101
+ *
102
+ * The possible values are:
103
+ * - `top`&mdash;The template will be rendered in the top toolbar (if present) only.
104
+ * - `bottom`&mdash;The template will be rendered in the bottom toolbar (if present) only.
105
+ * - `both`&mdash;The template will be rendered in both toolbars (if present).
106
+ */
107
+ set position(position: ToolbarPosition);
108
+ get position(): ToolbarPosition;
109
+ constructor(templateRef: TemplateRef<any>);
110
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarTemplateDirective, [{ optional: true; }]>;
111
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ToolbarTemplateDirective, "[kendoGanttToolbarTemplate]", never, { "position": "position"; }, {}, never>;
112
+ }
@@ -0,0 +1,29 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { ToolbarTemplateDirective } from './toolbar-template.directive';
6
+ import { TemplateRef, EventEmitter } from '@angular/core';
7
+ import { TimelineViewType } from './../models/timeline-view';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * @hidden
11
+ */
12
+ export declare class ToolbarComponent {
13
+ context: any;
14
+ role: string;
15
+ activeViewChange: EventEmitter<TimelineViewType>;
16
+ showAddTask: boolean;
17
+ showViewSelector: boolean;
18
+ views: TimelineViewType[];
19
+ activeView: any;
20
+ toolbarTemplate: ToolbarTemplateDirective;
21
+ set position(value: 'top' | 'bottom');
22
+ get position(): 'top' | 'bottom';
23
+ get toolbarTemplateRef(): TemplateRef<any>;
24
+ get renderTemplate(): boolean;
25
+ private _position;
26
+ handleViewChange(view: TimelineViewType): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarComponent, "kendo-gantt-toolbar", never, { "showAddTask": "showAddTask"; "showViewSelector": "showViewSelector"; "views": "views"; "activeView": "activeView"; "toolbarTemplate": "toolbarTemplate"; "position": "position"; }, { "activeViewChange": "activeViewChange"; }, never, never>;
29
+ }
@@ -0,0 +1,43 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { EventEmitter } from '@angular/core';
6
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
7
+ import { TimelineViewType } from './../models/timeline-view';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * The Gantt ViewSelector component. Shows the currently active view type, and allows switching to another view type.
11
+ */
12
+ export declare class ViewSelectorComponent {
13
+ private localizationService;
14
+ hostClass: boolean;
15
+ /**
16
+ * The collection of the timeline view types in the current Gantt configuration.
17
+ */
18
+ views: TimelineViewType[];
19
+ /**
20
+ * The currently active view type.
21
+ * @default 'week'
22
+ */
23
+ activeView: TimelineViewType;
24
+ /**
25
+ * Fires each time the user selects a different view type. The event data contains the type of the newly selected view.
26
+ */
27
+ activeViewChange: EventEmitter<TimelineViewType>;
28
+ constructor(localizationService: LocalizationService);
29
+ /**
30
+ * @hidden
31
+ */
32
+ onClick(viewType: TimelineViewType): void;
33
+ /**
34
+ * @hidden
35
+ */
36
+ getViewTypeText(viewType: TimelineViewType): string;
37
+ /**
38
+ * @hidden
39
+ */
40
+ onActiveViewChange(event: Event): void;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewSelectorComponent, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<ViewSelectorComponent, "kendo-gantt-view-selector", never, { "views": "views"; "activeView": "activeView"; }, { "activeViewChange": "activeViewChange"; }, never, never>;
43
+ }
package/utils.d.ts ADDED
@@ -0,0 +1,166 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Day } from '@progress/kendo-date-math';
6
+ import { GanttColumnBase, GanttColumnGroupComponent } from './columns/columns';
7
+ import { DependencyType } from './models/dependency-type.enum';
8
+ import { ViewItem } from './models/view-item.interface';
9
+ /**
10
+ * @hidden
11
+ */
12
+ export declare const isWorkDay: (date: Date, start: number, end: number) => boolean;
13
+ /**
14
+ * @hidden
15
+ */
16
+ export declare const isWorkHour: (date: Date, start: number, end: number) => boolean;
17
+ /**
18
+ * @hidden
19
+ */
20
+ export declare const isPresent: (item: any) => boolean;
21
+ /**
22
+ * @hidden
23
+ *
24
+ * Normalized the data to an array in case a falsy value is passed
25
+ * or a TreeListDataResult object (applicable for the data-binding directives).
26
+ */
27
+ export declare const normalizeGanttData: (data: any) => any[];
28
+ /**
29
+ * @hidden
30
+ */
31
+ export declare const isArray: Function;
32
+ /**
33
+ * @hidden
34
+ *
35
+ * Returns a new date with the specified hours, minutes, seconds and millliseconds set.
36
+ * Only the hours are required, the rest of the params are set to `0` by default.
37
+ */
38
+ export declare const setTime: (date: Date, hours: number, minutes?: number, seconds?: number, milliseconds?: number) => Date;
39
+ /**
40
+ * @hidden
41
+ *
42
+ * Returns the last day of a week.
43
+ * @param standingPoint - Any day of the target week.
44
+ * @param firstWeekDay - The week's starting day (e.g. Monday, Tuesday, etc.)
45
+ */
46
+ export declare const lastDayOfWeek: (standingPoint: Date, firstWeekDay: Day) => Date;
47
+ /**
48
+ * @hidden
49
+ *
50
+ * Gets the default scrollbar width accoring to the current environment.
51
+ */
52
+ export declare const scrollbarWidth: () => number;
53
+ /**
54
+ * @hidden
55
+ */
56
+ export declare const isColumnGroup: (column: GanttColumnBase) => column is GanttColumnGroupComponent;
57
+ /**
58
+ * @hidden
59
+ */
60
+ export declare const isNumber: (contender: any) => contender is number;
61
+ /**
62
+ * @hidden
63
+ */
64
+ export declare const isString: (contender: any) => contender is string;
65
+ /**
66
+ * @hidden
67
+ *
68
+ * Native Omit appears in TS v3.5, we can use it when we drop Angular 8 (requires v3.4)
69
+ */
70
+ export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
71
+ /**
72
+ * @hidden
73
+ *
74
+ * Gets the closest timeline task wrapper element from an event target.
75
+ * Restricts the search up to the provided parent element from the second param.
76
+ */
77
+ export declare const getClosestTaskWrapper: (element: Element, parentScope: Element) => Element;
78
+ /**
79
+ * @hidden
80
+ *
81
+ * Checks whether the queried item or its parent items has a `k-task-wrap` selector.
82
+ * Restricts the search up to the provided parent element from the second param.
83
+ */
84
+ export declare const isTaskWrapper: (contender: Element, parentScope: Element) => boolean;
85
+ /**
86
+ * @hidden
87
+ *
88
+ * Gets the closest timeline task element from an event target.
89
+ * Restricts the search up to the provided parent element from the second param.
90
+ */
91
+ export declare const getClosestTask: (element: Element, parentScope: Element) => Element;
92
+ /**
93
+ * @hidden
94
+ *
95
+ * Gets the closest timeline task element index from an event target.
96
+ * Uses the `data-task-index` attribute assigned to each task.
97
+ * Restricts the search up to the provided parent element from the second param.
98
+ */
99
+ export declare const getClosestTaskIndex: (element: Element | EventTarget, parentScope: Element) => number;
100
+ /**
101
+ * @hidden
102
+ *
103
+ * Checks whether the queried item or its parent items has a `k-task` selector.
104
+ * Restricts the search up to the provided parent element from the second param.
105
+ */
106
+ export declare const isTask: (contender: Element | EventTarget, parentScope: Element) => boolean;
107
+ /**
108
+ * @hidden
109
+ *
110
+ * Checks whether the queried item or its parent items has a `k-toolbar` selector.
111
+ * Restricts the search up to the provided parent element from the second param.
112
+ */
113
+ export declare const isToolbar: (contender: Element | EventTarget, parentScope: Element) => boolean;
114
+ /**
115
+ * @hidden
116
+ *
117
+ * Checks whether the queried item or its parent items has a `k-task-actions` selector - used for the clear button.
118
+ * Restricts the search up to the provided parent element from the second param.
119
+ */
120
+ export declare const isClearButton: (contender: Element | EventTarget, parentScope: Element) => boolean;
121
+ /**
122
+ * @hidden
123
+ *
124
+ * Checks whether the queried item has a `k-task-dot` selector - used for the dependency drag clues.
125
+ */
126
+ export declare const isDependencyDragClue: (element: Element) => boolean;
127
+ /**
128
+ * @hidden
129
+ *
130
+ * Checks whether the queried item has a `k-task-dot` & `k-task-start` selector - used for the dependency drag start clues.
131
+ */
132
+ export declare const isDependencyDragStartClue: (element: Element) => boolean;
133
+ /**
134
+ * @hidden
135
+ *
136
+ * Gets the `DependencyType` for an attempted dependency create from the provided two elements.
137
+ * The two linked drag clue HTML elements are used to extract this data (via their CSS classes).
138
+ */
139
+ export declare const getDependencyTypeFromTargetTasks: (fromTaskClue: Element, toTaskClue: Element) => DependencyType;
140
+ /**
141
+ * @hidden
142
+ *
143
+ * Checks whether the two provided drag clues belong to the same task element.
144
+ */
145
+ export declare const sameTaskClues: (fromTaskClue: Element, toTaskClue: Element, parentScope: Element) => boolean;
146
+ /**
147
+ * @hidden
148
+ *
149
+ * Fits a contender number between a min and max range.
150
+ * If the contender is below the min value, the min value is returned.
151
+ * If the contender is above the max value, the max value is returned.
152
+ */
153
+ export declare const fitToRange: (contender: number, min: number, max: number) => number;
154
+ /**
155
+ * @hidden
156
+ *
157
+ * Checks whether either of the two provided tasks is a parent of the other.
158
+ */
159
+ export declare const areParentChild: (taskA: ViewItem, taskB: ViewItem) => boolean;
160
+ /**
161
+ * @hidden
162
+ *
163
+ * Extracts an element from the provided client coords.
164
+ * Using the `event.target` is not reliable under mobile devices with the current implementation of the draggable, so use this instead.
165
+ */
166
+ export declare const elementFromPoint: (clientX: number, clientY: number) => HTMLElement;