@progress/kendo-angular-gantt 21.4.1-develop.1 → 22.0.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 (127) hide show
  1. package/columns/column-base.component.d.ts +1 -1
  2. package/fesm2022/progress-kendo-angular-gantt.mjs +201 -201
  3. package/localization/messages.d.ts +1 -1
  4. package/package.json +22 -30
  5. package/rendering/gantt-task-base.d.ts +1 -1
  6. package/schematics/ngAdd/index.js +7 -7
  7. package/timeline/view-base.d.ts +1 -1
  8. package/esm2022/binding-directives/flat-binding.directive.mjs +0 -50
  9. package/esm2022/binding-directives/hierarchy-binding.directive.mjs +0 -49
  10. package/esm2022/columns/cell-template.directive.mjs +0 -47
  11. package/esm2022/columns/column-base.component.mjs +0 -22
  12. package/esm2022/columns/column-group.component.mjs +0 -80
  13. package/esm2022/columns/column-menu-template.directive.mjs +0 -40
  14. package/esm2022/columns/column.component.mjs +0 -122
  15. package/esm2022/columns/columns.mjs +0 -15
  16. package/esm2022/columns/edit-template.directive.mjs +0 -46
  17. package/esm2022/columns/filter-cell-template.directive.mjs +0 -32
  18. package/esm2022/columns/filter-menu-template.directive.mjs +0 -41
  19. package/esm2022/columns/footer-template.directive.mjs +0 -44
  20. package/esm2022/columns/header-template.directive.mjs +0 -43
  21. package/esm2022/columns/span-column.component.mjs +0 -82
  22. package/esm2022/common/default-callbacks.mjs +0 -25
  23. package/esm2022/common/mapping.service.mjs +0 -62
  24. package/esm2022/common/option-changes.service.mjs +0 -28
  25. package/esm2022/dependencies/dependency-dom.service.mjs +0 -80
  26. package/esm2022/dependencies/dom-dependency-args.mjs +0 -5
  27. package/esm2022/dependencies/gantt-dependency.directive.mjs +0 -91
  28. package/esm2022/dependencies/utils.mjs +0 -195
  29. package/esm2022/directives.mjs +0 -63
  30. package/esm2022/dragging/dependency-drag-create.directive.mjs +0 -337
  31. package/esm2022/dragging/drag-validation-tooltip.component.mjs +0 -70
  32. package/esm2022/dragging/task-drag.directive.mjs +0 -94
  33. package/esm2022/dragging/task-drag.service.mjs +0 -239
  34. package/esm2022/editing/add-task.component.mjs +0 -127
  35. package/esm2022/editing/dependencies-table.component.mjs +0 -233
  36. package/esm2022/editing/edit-dialog.component.mjs +0 -225
  37. package/esm2022/editing/edit.service.mjs +0 -118
  38. package/esm2022/editing/task-fields.component.mjs +0 -127
  39. package/esm2022/editing/utils.mjs +0 -15
  40. package/esm2022/expanded-state/expand-event.mjs +0 -18
  41. package/esm2022/expanded-state/expandable.directive.mjs +0 -39
  42. package/esm2022/gantt.component.mjs +0 -2415
  43. package/esm2022/gantt.module.mjs +0 -132
  44. package/esm2022/index.mjs +0 -42
  45. package/esm2022/localization/custom-messages.component.mjs +0 -52
  46. package/esm2022/localization/gantt-localization.service.mjs +0 -27
  47. package/esm2022/localization/localized-messages.directive.mjs +0 -39
  48. package/esm2022/localization/messages.mjs +0 -453
  49. package/esm2022/models/cell-content-type.interface.mjs +0 -5
  50. package/esm2022/models/class-callbacks.mjs +0 -5
  51. package/esm2022/models/column-menu-settings.interface.mjs +0 -5
  52. package/esm2022/models/column-reorder-config.mjs +0 -5
  53. package/esm2022/models/current-time-settings.interface.mjs +0 -5
  54. package/esm2022/models/date-range.interface.mjs +0 -5
  55. package/esm2022/models/dependency-type.enum.mjs +0 -32
  56. package/esm2022/models/events/cell-click-event.interface.mjs +0 -5
  57. package/esm2022/models/events/cell-close-event.interface.mjs +0 -44
  58. package/esm2022/models/events/click-event.interface.mjs +0 -5
  59. package/esm2022/models/events/column-locked-change-event.interface.mjs +0 -5
  60. package/esm2022/models/events/column-reorder-event.interface.mjs +0 -5
  61. package/esm2022/models/events/column-resize-event.interface.mjs +0 -5
  62. package/esm2022/models/events/column-visibility-change-event.interface.mjs +0 -5
  63. package/esm2022/models/events/data-state-change-event.interface.mjs +0 -5
  64. package/esm2022/models/events/dependency-add-event.interface.mjs +0 -5
  65. package/esm2022/models/events/index.mjs +0 -5
  66. package/esm2022/models/events/selected-view-change-event.interface.mjs +0 -5
  67. package/esm2022/models/events/task-add-event.interface.mjs +0 -5
  68. package/esm2022/models/events/task-click-event.interface.mjs +0 -5
  69. package/esm2022/models/events/task-delete-event.interface.mjs +0 -5
  70. package/esm2022/models/events/task-drag-event.interface.mjs +0 -5
  71. package/esm2022/models/events/task-edit-event.interface.mjs +0 -5
  72. package/esm2022/models/filterable-settings.mjs +0 -5
  73. package/esm2022/models/gantt-dependency-model-fields.interface.mjs +0 -13
  74. package/esm2022/models/gantt-dependency.interface.mjs +0 -5
  75. package/esm2022/models/gantt-task-model-fields.interface.mjs +0 -15
  76. package/esm2022/models/gantt-task.interface.mjs +0 -5
  77. package/esm2022/models/models.mjs +0 -8
  78. package/esm2022/models/slot.interface.mjs +0 -5
  79. package/esm2022/models/sort-settings.mjs +0 -17
  80. package/esm2022/models/splitter-pane-options.interface.mjs +0 -20
  81. package/esm2022/models/timeline-header-date-format.mjs +0 -5
  82. package/esm2022/models/timeline-options.interface.mjs +0 -5
  83. package/esm2022/models/timeline-view.mjs +0 -5
  84. package/esm2022/models/toolbar-settings.mjs +0 -5
  85. package/esm2022/models/tooltip-options.interface.mjs +0 -5
  86. package/esm2022/models/view-item.interface.mjs +0 -5
  87. package/esm2022/navigation/navigation-models.mjs +0 -5
  88. package/esm2022/navigation/navigation.service.mjs +0 -271
  89. package/esm2022/navigation/utils.mjs +0 -61
  90. package/esm2022/package-metadata.mjs +0 -16
  91. package/esm2022/progress-kendo-angular-gantt.mjs +0 -8
  92. package/esm2022/rendering/gantt-header-table-body.component.mjs +0 -61
  93. package/esm2022/rendering/gantt-milestone-task.component.mjs +0 -102
  94. package/esm2022/rendering/gantt-summary-task.component.mjs +0 -157
  95. package/esm2022/rendering/gantt-task-base.mjs +0 -230
  96. package/esm2022/rendering/gantt-task.component.mjs +0 -227
  97. package/esm2022/rendering/gantt-tasks-table-body.component.mjs +0 -206
  98. package/esm2022/scrolling/drag-scroll-settings.mjs +0 -20
  99. package/esm2022/scrolling/scroll-sync.service.mjs +0 -83
  100. package/esm2022/scrolling/timeline-scroll.directive.mjs +0 -83
  101. package/esm2022/scrolling/timeline-scroll.service.mjs +0 -37
  102. package/esm2022/scrolling/utils.mjs +0 -77
  103. package/esm2022/selection/selectable.directive.mjs +0 -126
  104. package/esm2022/selection/selection-change-event.mjs +0 -5
  105. package/esm2022/template-directives/summary-task-template.directive.mjs +0 -43
  106. package/esm2022/template-directives/task-content-template.directive.mjs +0 -46
  107. package/esm2022/template-directives/task-drag-tooltip-template.directive.mjs +0 -47
  108. package/esm2022/template-directives/task-template.directive.mjs +0 -41
  109. package/esm2022/template-directives/task-tooltip-template.directive.mjs +0 -48
  110. package/esm2022/timeline/current-time-marker.service.mjs +0 -90
  111. package/esm2022/timeline/gantt-timeline.component.mjs +0 -624
  112. package/esm2022/timeline/timeline-base-view.service.mjs +0 -201
  113. package/esm2022/timeline/timeline-day-view.component.mjs +0 -49
  114. package/esm2022/timeline/timeline-day-view.service.mjs +0 -68
  115. package/esm2022/timeline/timeline-month-view.component.mjs +0 -49
  116. package/esm2022/timeline/timeline-month-view.service.mjs +0 -66
  117. package/esm2022/timeline/timeline-view.service.mjs +0 -38
  118. package/esm2022/timeline/timeline-week-view.component.mjs +0 -49
  119. package/esm2022/timeline/timeline-week-view.service.mjs +0 -62
  120. package/esm2022/timeline/timeline-year-view.component.mjs +0 -49
  121. package/esm2022/timeline/timeline-year-view.service.mjs +0 -57
  122. package/esm2022/timeline/view-base.mjs +0 -73
  123. package/esm2022/toolbar/toolbar-navigation.service.mjs +0 -29
  124. package/esm2022/toolbar/toolbar-template.directive.mjs +0 -56
  125. package/esm2022/toolbar/toolbar.component.mjs +0 -181
  126. package/esm2022/toolbar/view-selector.component.mjs +0 -112
  127. package/esm2022/utils.mjs +0 -311
@@ -1,77 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { isDocumentAvailable } from '@progress/kendo-angular-common';
6
- import { ScrollAxis, ScrollDirection } from './drag-scroll-settings';
7
- import { isPresent } from '../utils';
8
- /**
9
- * @hidden
10
- *
11
- * Checks if the beginning of the scrollable element is reached (top/left).
12
- * Floors the top value.
13
- */
14
- const isUpperLimitReached = (element, axis) => Math.floor(element[axis]) <= 0;
15
- /**
16
- * @hidden
17
- *
18
- * Checks if the end of the scrollable element is reached (bottom/right).
19
- * Ceils the top value.
20
- */
21
- const isBottomLimitReached = (element, axis) => {
22
- const elementSize = axis === ScrollAxis.Horizontal ?
23
- element.scrollWidth - element.clientWidth :
24
- element.scrollHeight - element.clientHeight;
25
- return Math.ceil(element[axis]) >= elementSize;
26
- };
27
- /**
28
- * @hidden
29
- *
30
- * Scrolls the element in the given direction by the provided step in the provided scroll axis.
31
- *
32
- * If the targeted scroll incrementation doesn't yield any result due to device pixel ratio issues (https://github.com/dimitar-pechev/RenderingIndependentScrollOffsets#readme),
33
- * increments the step with 1px and again attempts to change the scrollTop of the element, until the content is actually scrolled.
34
- *
35
- * Cuts the operation short after 20 unsuccessful attempts to prevent infinite loops in possible corner-case scenarios.
36
- */
37
- export const scrollElement = (element, step, direction, scrollAxis) => {
38
- if (!(isPresent(element) && isDocumentAvailable())) {
39
- return;
40
- }
41
- const initialScrollPosition = element[scrollAxis];
42
- let currentStep = step;
43
- let iterations = 0;
44
- while (initialScrollPosition === element[scrollAxis] &&
45
- !(direction === ScrollDirection.Backwards && isUpperLimitReached(element, scrollAxis)) &&
46
- !(direction === ScrollDirection.Forward && isBottomLimitReached(element, scrollAxis)) &&
47
- iterations < 20 // cut the operation short in 20 attempts - in case of a wild corner case
48
- ) {
49
- element[scrollAxis] += (currentStep * direction);
50
- // try with a larger step if the current one doesn't update the scroll position successfully
51
- currentStep += 1;
52
- iterations += 1;
53
- }
54
- };
55
- /**
56
- * @hidden
57
- *
58
- * As client coordinates are not restricted to the range 0px - {viewportSize}px, but can have negative starting values or ending values greater than the viewport size,
59
- * this function extracts the visible boundaries of the provided element - fall-backing to 0 when the top/left are below 0,
60
- * and fall-backing to the actual visible size of the container for bottom/right.
61
- */
62
- export const getViewportBoundaries = (element) => {
63
- const elementRect = element.getBoundingClientRect();
64
- // if the beginning of the scrollable container is above/before the current viewport, fall-back to 0
65
- const topLimit = Math.max(elementRect.top, 0);
66
- const leftLimit = Math.max(elementRect.left, 0);
67
- // if the end of the scrollable container is beneath/after the current viewport, fall-back to its client height
68
- // add the distance from the start of the viewport to the beginning of the container to ensure scrolling bottom begins when the actual end of the container is reached
69
- const bottomLimit = topLimit + Math.min(elementRect.bottom, element.clientHeight);
70
- const rightLimit = leftLimit + Math.min(elementRect.right, element.clientWidth);
71
- return {
72
- top: topLimit,
73
- bottom: bottomLimit,
74
- left: leftLimit,
75
- right: rightLimit
76
- };
77
- };
@@ -1,126 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, Input, Output, EventEmitter } from '@angular/core';
6
- import { getter } from '@progress/kendo-common';
7
- import { GanttComponent } from '../gantt.component';
8
- import { isPresent, isString } from '../utils';
9
- import * as i0 from "@angular/core";
10
- import * as i1 from "../gantt.component";
11
- /**
12
- * Handles the [`selectionChange`]({% slug api_gantt_ganttcomponent %}#toc-selectionchange) event of the Gantt component.
13
- * ([See example]({% slug selection_gantt %}#toc-built-in-directive)).
14
- *
15
- * @example
16
- * ```html
17
- * <kendo-gantt kendoGanttSelectable [(selectedKeys)]="selectedKeys"></kendo-gantt>
18
- * ```
19
- *
20
- * @remarks
21
- * Applied to: {@link GanttComponent}
22
- */
23
- export class SelectableDirective {
24
- gantt;
25
- /**
26
- * @hidden
27
- */
28
- set selectable(value) {
29
- if (value) {
30
- this.gantt.isSelected = this.isSelected;
31
- this.subscribeSelection();
32
- }
33
- else {
34
- this.gantt.isSelected = () => false;
35
- this.unsubscribeSelection();
36
- }
37
- this.gantt.selectable = value;
38
- this.gantt.updateView();
39
- }
40
- /**
41
- * Sets the selected keys.
42
- */
43
- set selectedKeys(value) {
44
- if (isPresent(value) && value === this.lastChange) {
45
- return;
46
- }
47
- // prevent multiple items displayed as selected as multiple selection still not supported fully
48
- const keys = (value || []).slice(0, 1);
49
- this.state = new Set(keys);
50
- this.gantt.updateView();
51
- }
52
- /**
53
- * Emits when the selected keys change.
54
- */
55
- selectedKeysChange = new EventEmitter();
56
- /**
57
- * Sets the field name or function that identifies the unique key for a data item.
58
- * Uses the string field `id` by default.
59
- */
60
- set itemKey(value) {
61
- if (isString(value)) {
62
- this._keyGetter = getter(value);
63
- }
64
- else {
65
- this._keyGetter = value;
66
- }
67
- }
68
- get keyGetter() {
69
- return this._keyGetter || this.gantt.idGetter;
70
- }
71
- selectionSubscription;
72
- state = new Set();
73
- lastChange;
74
- _keyGetter;
75
- constructor(gantt) {
76
- this.gantt = gantt;
77
- this.isSelected = this.isSelected.bind(this);
78
- this.selectionChange = this.selectionChange.bind(this);
79
- this.selectable = true;
80
- }
81
- ngOnDestroy() {
82
- this.unsubscribeSelection();
83
- }
84
- isSelected(dataItem) {
85
- return this.state.has(this.keyGetter(dataItem));
86
- }
87
- selectionChange({ action, items }) {
88
- this.state.clear();
89
- if (action === 'select') {
90
- items.forEach(item => this.state.add(this.keyGetter(item)));
91
- }
92
- this.emitSelectedItemsChange();
93
- }
94
- emitSelectedItemsChange() {
95
- this.lastChange = Array.from(this.state);
96
- this.selectedKeysChange.emit(this.lastChange);
97
- }
98
- subscribeSelection() {
99
- this.unsubscribeSelection();
100
- this.selectionSubscription = this.gantt.selectionChange.subscribe(this.selectionChange);
101
- }
102
- unsubscribeSelection() {
103
- if (this.selectionSubscription) {
104
- this.selectionSubscription.unsubscribe();
105
- this.selectionSubscription = null;
106
- }
107
- }
108
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectableDirective, deps: [{ token: i1.GanttComponent }], target: i0.ɵɵFactoryTarget.Directive });
109
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: SelectableDirective, isStandalone: true, selector: "[kendoGanttSelectable]", inputs: { selectable: "selectable", selectedKeys: "selectedKeys", itemKey: "itemKey" }, outputs: { selectedKeysChange: "selectedKeysChange" }, exportAs: ["kendoGanttSelectable"], ngImport: i0 });
110
- }
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectableDirective, decorators: [{
112
- type: Directive,
113
- args: [{
114
- exportAs: 'kendoGanttSelectable',
115
- selector: '[kendoGanttSelectable]',
116
- standalone: true
117
- }]
118
- }], ctorParameters: () => [{ type: i1.GanttComponent }], propDecorators: { selectable: [{
119
- type: Input
120
- }], selectedKeys: [{
121
- type: Input
122
- }], selectedKeysChange: [{
123
- type: Output
124
- }], itemKey: [{
125
- type: Input
126
- }] } });
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,43 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, Optional, TemplateRef } from '@angular/core';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Defines a template for the entire summary task component.
9
- * Place an `<ng-template>` tag with the `kendoGanttSummaryTaskTemplate` directive inside the `<kendo-gantt>` tag to set the template.
10
- *
11
- * The template context uses the current data item. The following field is also available:
12
- * - `elementWidth`&mdash;The calculated width in pixels of the current summary task wrapper element, based on its start and end date.
13
- * Use `let-elementWidth="elementWidth"` to access it in the template.
14
- * This helps you render custom elements for summary task progress.
15
- *
16
- * @example
17
- * ```html
18
- * <kendo-gantt [kendoGanttHierarchyBinding]="data">
19
- * <ng-template kendoGanttSummaryTaskTemplate let-dataItem let-elementWidth="elementWidth">
20
- * <div [style]="'color: white; font-size: 8px;'">
21
- * {{ dataItem.title }} - {{ dataItem.completionRatio * 100 }}% complete; width: {{ elementWidth }}
22
- * </div>
23
- * </ng-template>
24
- * </kendo-gantt>
25
- * ```
26
- */
27
- export class GanttSummaryTaskTemplateDirective {
28
- templateRef;
29
- constructor(templateRef) {
30
- this.templateRef = templateRef;
31
- }
32
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttSummaryTaskTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
33
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GanttSummaryTaskTemplateDirective, isStandalone: true, selector: "[kendoGanttSummaryTaskTemplate]", ngImport: i0 });
34
- }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttSummaryTaskTemplateDirective, decorators: [{
36
- type: Directive,
37
- args: [{
38
- selector: '[kendoGanttSummaryTaskTemplate]',
39
- standalone: true
40
- }]
41
- }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
42
- type: Optional
43
- }] }] });
@@ -1,46 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, Optional, TemplateRef } from '@angular/core';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Defines a template for the text content section of the task component.
9
- * Place an `<ng-template>` tag with the `kendoGanttTaskContentTemplate` directive inside the `<kendo-gantt>` tag to set the template.
10
- *
11
- * The template context uses the current data item.
12
- *
13
- * @example
14
- * ```ts-preview
15
- * _@Component({
16
- * selector: 'my-app',
17
- * template: `
18
- * <kendo-gantt [kendoGanttHierarchyBinding]="data">
19
- * <ng-template kendoGanttTaskContentTemplate let-dataItem>
20
- * {{ dataItem.title }} - {{ dataItem.completionRatio * 100 }}% complete
21
- * </ng-template>
22
- * </kendo-gantt>
23
- * `
24
- * })
25
- * class AppComponent {
26
- * public data: any[] = sampleTasks;
27
- * }
28
- * ```
29
- */
30
- export class GanttTaskContentTemplateDirective {
31
- templateRef;
32
- constructor(templateRef) {
33
- this.templateRef = templateRef;
34
- }
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
36
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GanttTaskContentTemplateDirective, isStandalone: true, selector: "[kendoGanttTaskContentTemplate]", ngImport: i0 });
37
- }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskContentTemplateDirective, decorators: [{
39
- type: Directive,
40
- args: [{
41
- selector: '[kendoGanttTaskContentTemplate]',
42
- standalone: true
43
- }]
44
- }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
45
- type: Optional
46
- }] }] });
@@ -1,47 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, Optional, TemplateRef } from '@angular/core';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Customizes the content of the tooltip that appears when you drag or resize a Gantt task.
9
- * Place the `kendoGanttTaskDragTooltipTemplate` directive on an `<ng-template>` tag inside the `<kendo-gantt>` component.
10
- *
11
- * The template context provides an object with the following properties:
12
- * * `start`&mdash;The updated start date during the drag operation.
13
- * * `end`&mdash;The updated end date during the drag operation.
14
- * * `completionRatio`&mdash;The completion ratio of the task as a decimal value between 0 and 1.
15
- * * `task`&mdash;The original data item of the task being dragged. Contains the properties of the [`GanttTask`](slug:api_gantt_gantttask) interface.
16
- *
17
- * @example
18
- * ```html
19
- * <kendo-gantt
20
- * [kendoGanttHierarchyBinding]="data"
21
- * kendoGanttTaskDrag
22
- * (taskDragEnd)="onDragEnd($event)">
23
- * <ng-template kendoGanttTaskDragTooltipTemplate let-dragData>
24
- * <div> {{ dragData.task.title }} </div>
25
- * <div> Start: {{ dragData.start | date: 'h:mm a' }} </div>
26
- * <div> End: {{ dragData.end | date: 'h:mm a' }} </div>
27
- * </ng-template>
28
- * </kendo-gantt>
29
- * ```
30
- */
31
- export class GanttTaskDragTooltipTemplateDirective {
32
- templateRef;
33
- constructor(templateRef) {
34
- this.templateRef = templateRef;
35
- }
36
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskDragTooltipTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
37
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GanttTaskDragTooltipTemplateDirective, isStandalone: true, selector: "[kendoGanttTaskDragTooltipTemplate]", ngImport: i0 });
38
- }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskDragTooltipTemplateDirective, decorators: [{
40
- type: Directive,
41
- args: [{
42
- selector: '[kendoGanttTaskDragTooltipTemplate]',
43
- standalone: true
44
- }]
45
- }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
46
- type: Optional
47
- }] }] });
@@ -1,41 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, Optional, TemplateRef } from '@angular/core';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Defines a template for the entire task component.
9
- * Place an `<ng-template>` tag with the `kendoGanttTaskTemplate` directive inside the `<kendo-gantt>` tag to set the template.
10
- *
11
- * The template context uses the current data item. The following field is also available:
12
- * - `elementWidth`&mdash;The calculated width in pixels of the current task wrapper element, based on its start and end date.
13
- * Use `let-elementWidth="elementWidth"` to access it in the template.
14
- * This helps you render custom elements for task progress.
15
- *
16
- * @example
17
- * ```html
18
- * <kendo-gantt [kendoGanttHierarchyBinding]="data">
19
- * <ng-template kendoGanttTaskTemplate let-dataItem let-elementWidth="elementWidth">
20
- * {{ dataItem.title }} - {{ dataItem.completionRatio * 100 }}% complete
21
- * </ng-template>
22
- * </kendo-gantt>
23
- * ```
24
- */
25
- export class GanttTaskTemplateDirective {
26
- templateRef;
27
- constructor(templateRef) {
28
- this.templateRef = templateRef;
29
- }
30
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
31
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GanttTaskTemplateDirective, isStandalone: true, selector: "[kendoGanttTaskTemplate]", ngImport: i0 });
32
- }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskTemplateDirective, decorators: [{
34
- type: Directive,
35
- args: [{
36
- selector: '[kendoGanttTaskTemplate]',
37
- standalone: true
38
- }]
39
- }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
40
- type: Optional
41
- }] }] });
@@ -1,48 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, Optional, TemplateRef } from '@angular/core';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Defines a template for the entire Task tooltip.
9
- * Place an `<ng-template>` tag with the `kendoGanttTaskTooltipTemplate` directive inside the `<kendo-gantt>` tag to set the template.
10
- *
11
- * The template context uses the related data item.
12
- *
13
- * @example
14
- * ```ts-preview
15
- * _@Component({
16
- * selector: 'my-app',
17
- * template: `
18
- * <kendo-gantt [kendoGanttHierarchyBinding]="data">
19
- * <ng-template kendoGanttTaskTooltipTemplate let-dataItem>
20
- * <div [style]="'color: white; font-size: 8px;'">
21
- * {{ dataItem.title }} - {{ dataItem.completionRatio * 100 }}% complete;
22
- * </div>
23
- * </ng-template>
24
- * </kendo-gantt>
25
- * `
26
- * })
27
- * class AppComponent {
28
- * public data: any[] = sampleTasks;
29
- * }
30
- * ```
31
- */
32
- export class GanttTaskTooltipTemplateDirective {
33
- templateRef;
34
- constructor(templateRef) {
35
- this.templateRef = templateRef;
36
- }
37
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskTooltipTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
38
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GanttTaskTooltipTemplateDirective, isStandalone: true, selector: "[kendoGanttTaskTooltipTemplate]", ngImport: i0 });
39
- }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskTooltipTemplateDirective, decorators: [{
41
- type: Directive,
42
- args: [{
43
- selector: '[kendoGanttTaskTooltipTemplate]',
44
- standalone: true
45
- }]
46
- }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
47
- type: Optional
48
- }] }] });
@@ -1,90 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { ChangeDetectorRef, Injectable, Renderer2 } from '@angular/core';
6
- import { isDocumentAvailable } from '@progress/kendo-angular-common';
7
- import * as i0 from "@angular/core";
8
- const MS_PER_SECOND = 1000;
9
- const MS_PER_MINUTE = 60 * MS_PER_SECOND;
10
- /**
11
- * @hidden
12
- */
13
- export class CurrentTimeMarkerService {
14
- renderer;
15
- cdr;
16
- container;
17
- slots = [];
18
- rows = [];
19
- currentTimeMarker;
20
- rowHeight;
21
- rtl;
22
- activeView;
23
- get deltaOffset() {
24
- if (this.slotIndex >= 0) {
25
- const total = this.slots[this.slotIndex].end.getTime() - this.slots[this.slotIndex].start.getTime();
26
- if (total > 0) {
27
- const currentTimeValue = this.now.getTime() - this.slots[this.slotIndex].start.getTime();
28
- const fractionInsideCell = currentTimeValue / total;
29
- const deltaOffsetToSlot = this.slotIndex * this.slotWidth;
30
- const deltaOffsetInsideSlot = fractionInsideCell * this.slotWidth;
31
- return deltaOffsetToSlot + deltaOffsetInsideSlot;
32
- }
33
- return 0;
34
- }
35
- }
36
- get slotWidth() {
37
- return this.slots[0]?.slotWidth;
38
- }
39
- get slotIndex() {
40
- return this.slots.indexOf(this.slots.find((slot) => slot.start <= this.now && slot.end > this.now));
41
- }
42
- get height() {
43
- return this.rows.length * this.rowHeight;
44
- }
45
- get interval() {
46
- if (typeof (this.currentTimeMarker) === 'boolean') {
47
- return MS_PER_MINUTE;
48
- }
49
- return this.currentTimeMarker?.updateInterval || MS_PER_MINUTE;
50
- }
51
- now = new Date(Date.now());
52
- currentTimeTimeout;
53
- timeMarkerDiv;
54
- constructor(renderer, cdr) {
55
- this.renderer = renderer;
56
- this.cdr = cdr;
57
- }
58
- ngOnDestroy() {
59
- clearTimeout(this.currentTimeTimeout);
60
- }
61
- removeTimeMarker() {
62
- if (this.timeMarkerDiv) {
63
- this.renderer.removeChild(this.container.nativeElement, this.timeMarkerDiv);
64
- clearTimeout(this.currentTimeTimeout);
65
- this.cdr.detectChanges();
66
- }
67
- }
68
- createTimeMarker = () => {
69
- if (!isDocumentAvailable()) {
70
- return;
71
- }
72
- this.removeTimeMarker();
73
- if (this.slotIndex >= 0) {
74
- this.now = new Date(Date.now());
75
- this.timeMarkerDiv = this.renderer.createElement('div');
76
- this.renderer.addClass(this.timeMarkerDiv, 'k-current-time');
77
- this.renderer.setStyle(this.timeMarkerDiv, 'width', '1px');
78
- this.renderer.setStyle(this.timeMarkerDiv, 'top', '0px');
79
- this.renderer.setStyle(this.timeMarkerDiv, `${this.rtl ? 'right' : 'left'}`, this.deltaOffset + 'px');
80
- this.renderer.appendChild(this.container.nativeElement, this.timeMarkerDiv);
81
- this.renderer.setStyle(this.timeMarkerDiv, 'height', this.height + 'px');
82
- this.currentTimeTimeout = setTimeout(this.createTimeMarker, this.interval || MS_PER_MINUTE);
83
- }
84
- };
85
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CurrentTimeMarkerService, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Injectable });
86
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CurrentTimeMarkerService });
87
- }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CurrentTimeMarkerService, decorators: [{
89
- type: Injectable
90
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }] });