@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.
- package/columns/column-base.component.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-gantt.mjs +201 -201
- package/localization/messages.d.ts +1 -1
- package/package.json +22 -30
- package/rendering/gantt-task-base.d.ts +1 -1
- package/schematics/ngAdd/index.js +7 -7
- package/timeline/view-base.d.ts +1 -1
- package/esm2022/binding-directives/flat-binding.directive.mjs +0 -50
- package/esm2022/binding-directives/hierarchy-binding.directive.mjs +0 -49
- package/esm2022/columns/cell-template.directive.mjs +0 -47
- package/esm2022/columns/column-base.component.mjs +0 -22
- package/esm2022/columns/column-group.component.mjs +0 -80
- package/esm2022/columns/column-menu-template.directive.mjs +0 -40
- package/esm2022/columns/column.component.mjs +0 -122
- package/esm2022/columns/columns.mjs +0 -15
- package/esm2022/columns/edit-template.directive.mjs +0 -46
- package/esm2022/columns/filter-cell-template.directive.mjs +0 -32
- package/esm2022/columns/filter-menu-template.directive.mjs +0 -41
- package/esm2022/columns/footer-template.directive.mjs +0 -44
- package/esm2022/columns/header-template.directive.mjs +0 -43
- package/esm2022/columns/span-column.component.mjs +0 -82
- package/esm2022/common/default-callbacks.mjs +0 -25
- package/esm2022/common/mapping.service.mjs +0 -62
- package/esm2022/common/option-changes.service.mjs +0 -28
- package/esm2022/dependencies/dependency-dom.service.mjs +0 -80
- package/esm2022/dependencies/dom-dependency-args.mjs +0 -5
- package/esm2022/dependencies/gantt-dependency.directive.mjs +0 -91
- package/esm2022/dependencies/utils.mjs +0 -195
- package/esm2022/directives.mjs +0 -63
- package/esm2022/dragging/dependency-drag-create.directive.mjs +0 -337
- package/esm2022/dragging/drag-validation-tooltip.component.mjs +0 -70
- package/esm2022/dragging/task-drag.directive.mjs +0 -94
- package/esm2022/dragging/task-drag.service.mjs +0 -239
- package/esm2022/editing/add-task.component.mjs +0 -127
- package/esm2022/editing/dependencies-table.component.mjs +0 -233
- package/esm2022/editing/edit-dialog.component.mjs +0 -225
- package/esm2022/editing/edit.service.mjs +0 -118
- package/esm2022/editing/task-fields.component.mjs +0 -127
- package/esm2022/editing/utils.mjs +0 -15
- package/esm2022/expanded-state/expand-event.mjs +0 -18
- package/esm2022/expanded-state/expandable.directive.mjs +0 -39
- package/esm2022/gantt.component.mjs +0 -2415
- package/esm2022/gantt.module.mjs +0 -132
- package/esm2022/index.mjs +0 -42
- package/esm2022/localization/custom-messages.component.mjs +0 -52
- package/esm2022/localization/gantt-localization.service.mjs +0 -27
- package/esm2022/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -453
- package/esm2022/models/cell-content-type.interface.mjs +0 -5
- package/esm2022/models/class-callbacks.mjs +0 -5
- package/esm2022/models/column-menu-settings.interface.mjs +0 -5
- package/esm2022/models/column-reorder-config.mjs +0 -5
- package/esm2022/models/current-time-settings.interface.mjs +0 -5
- package/esm2022/models/date-range.interface.mjs +0 -5
- package/esm2022/models/dependency-type.enum.mjs +0 -32
- package/esm2022/models/events/cell-click-event.interface.mjs +0 -5
- package/esm2022/models/events/cell-close-event.interface.mjs +0 -44
- package/esm2022/models/events/click-event.interface.mjs +0 -5
- package/esm2022/models/events/column-locked-change-event.interface.mjs +0 -5
- package/esm2022/models/events/column-reorder-event.interface.mjs +0 -5
- package/esm2022/models/events/column-resize-event.interface.mjs +0 -5
- package/esm2022/models/events/column-visibility-change-event.interface.mjs +0 -5
- package/esm2022/models/events/data-state-change-event.interface.mjs +0 -5
- package/esm2022/models/events/dependency-add-event.interface.mjs +0 -5
- package/esm2022/models/events/index.mjs +0 -5
- package/esm2022/models/events/selected-view-change-event.interface.mjs +0 -5
- package/esm2022/models/events/task-add-event.interface.mjs +0 -5
- package/esm2022/models/events/task-click-event.interface.mjs +0 -5
- package/esm2022/models/events/task-delete-event.interface.mjs +0 -5
- package/esm2022/models/events/task-drag-event.interface.mjs +0 -5
- package/esm2022/models/events/task-edit-event.interface.mjs +0 -5
- package/esm2022/models/filterable-settings.mjs +0 -5
- package/esm2022/models/gantt-dependency-model-fields.interface.mjs +0 -13
- package/esm2022/models/gantt-dependency.interface.mjs +0 -5
- package/esm2022/models/gantt-task-model-fields.interface.mjs +0 -15
- package/esm2022/models/gantt-task.interface.mjs +0 -5
- package/esm2022/models/models.mjs +0 -8
- package/esm2022/models/slot.interface.mjs +0 -5
- package/esm2022/models/sort-settings.mjs +0 -17
- package/esm2022/models/splitter-pane-options.interface.mjs +0 -20
- package/esm2022/models/timeline-header-date-format.mjs +0 -5
- package/esm2022/models/timeline-options.interface.mjs +0 -5
- package/esm2022/models/timeline-view.mjs +0 -5
- package/esm2022/models/toolbar-settings.mjs +0 -5
- package/esm2022/models/tooltip-options.interface.mjs +0 -5
- package/esm2022/models/view-item.interface.mjs +0 -5
- package/esm2022/navigation/navigation-models.mjs +0 -5
- package/esm2022/navigation/navigation.service.mjs +0 -271
- package/esm2022/navigation/utils.mjs +0 -61
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/progress-kendo-angular-gantt.mjs +0 -8
- package/esm2022/rendering/gantt-header-table-body.component.mjs +0 -61
- package/esm2022/rendering/gantt-milestone-task.component.mjs +0 -102
- package/esm2022/rendering/gantt-summary-task.component.mjs +0 -157
- package/esm2022/rendering/gantt-task-base.mjs +0 -230
- package/esm2022/rendering/gantt-task.component.mjs +0 -227
- package/esm2022/rendering/gantt-tasks-table-body.component.mjs +0 -206
- package/esm2022/scrolling/drag-scroll-settings.mjs +0 -20
- package/esm2022/scrolling/scroll-sync.service.mjs +0 -83
- package/esm2022/scrolling/timeline-scroll.directive.mjs +0 -83
- package/esm2022/scrolling/timeline-scroll.service.mjs +0 -37
- package/esm2022/scrolling/utils.mjs +0 -77
- package/esm2022/selection/selectable.directive.mjs +0 -126
- package/esm2022/selection/selection-change-event.mjs +0 -5
- package/esm2022/template-directives/summary-task-template.directive.mjs +0 -43
- package/esm2022/template-directives/task-content-template.directive.mjs +0 -46
- package/esm2022/template-directives/task-drag-tooltip-template.directive.mjs +0 -47
- package/esm2022/template-directives/task-template.directive.mjs +0 -41
- package/esm2022/template-directives/task-tooltip-template.directive.mjs +0 -48
- package/esm2022/timeline/current-time-marker.service.mjs +0 -90
- package/esm2022/timeline/gantt-timeline.component.mjs +0 -624
- package/esm2022/timeline/timeline-base-view.service.mjs +0 -201
- package/esm2022/timeline/timeline-day-view.component.mjs +0 -49
- package/esm2022/timeline/timeline-day-view.service.mjs +0 -68
- package/esm2022/timeline/timeline-month-view.component.mjs +0 -49
- package/esm2022/timeline/timeline-month-view.service.mjs +0 -66
- package/esm2022/timeline/timeline-view.service.mjs +0 -38
- package/esm2022/timeline/timeline-week-view.component.mjs +0 -49
- package/esm2022/timeline/timeline-week-view.service.mjs +0 -62
- package/esm2022/timeline/timeline-year-view.component.mjs +0 -49
- package/esm2022/timeline/timeline-year-view.service.mjs +0 -57
- package/esm2022/timeline/view-base.mjs +0 -73
- package/esm2022/toolbar/toolbar-navigation.service.mjs +0 -29
- package/esm2022/toolbar/toolbar-template.directive.mjs +0 -56
- package/esm2022/toolbar/toolbar.component.mjs +0 -181
- package/esm2022/toolbar/view-selector.component.mjs +0 -112
- package/esm2022/utils.mjs +0 -311
|
@@ -1,102 +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 { Component, forwardRef, HostBinding, ChangeDetectorRef } from '@angular/core';
|
|
6
|
-
import { MappingService } from '../common/mapping.service';
|
|
7
|
-
import { NavigationService } from '../navigation/navigation.service';
|
|
8
|
-
import { DependencyDomService } from '../dependencies/dependency-dom.service';
|
|
9
|
-
import { OptionChangesService } from '../common/option-changes.service';
|
|
10
|
-
import { TimelineViewService } from './../timeline/timeline-view.service';
|
|
11
|
-
import { GanttTaskBase } from './gantt-task-base';
|
|
12
|
-
import { NgClass } from '@angular/common';
|
|
13
|
-
import { touchEnabled } from '@progress/kendo-common';
|
|
14
|
-
import * as i0 from "@angular/core";
|
|
15
|
-
import * as i1 from "../common/mapping.service";
|
|
16
|
-
import * as i2 from "./../timeline/timeline-view.service";
|
|
17
|
-
import * as i3 from "../dependencies/dependency-dom.service";
|
|
18
|
-
import * as i4 from "../common/option-changes.service";
|
|
19
|
-
import * as i5 from "../navigation/navigation.service";
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
export class GanttMilestoneTaskComponent extends GanttTaskBase {
|
|
24
|
-
milestoneWrapperClass = true;
|
|
25
|
-
touchEnabled = touchEnabled;
|
|
26
|
-
constructor(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) {
|
|
27
|
-
super(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService);
|
|
28
|
-
}
|
|
29
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttMilestoneTaskComponent, deps: [{ token: i1.MappingService }, { token: i2.TimelineViewService }, { token: i3.DependencyDomService }, { token: i4.OptionChangesService }, { token: i0.ChangeDetectorRef }, { token: i5.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: GanttMilestoneTaskComponent, isStandalone: true, selector: "kendo-gantt-milestone-task", host: { properties: { "class.k-milestone-wrap": "this.milestoneWrapperClass" } }, providers: [
|
|
31
|
-
{
|
|
32
|
-
provide: GanttTaskBase,
|
|
33
|
-
useExisting: forwardRef(() => GanttMilestoneTaskComponent)
|
|
34
|
-
}
|
|
35
|
-
], usesInheritance: true, ngImport: i0, template: `
|
|
36
|
-
<div
|
|
37
|
-
#task
|
|
38
|
-
role="treeitem"
|
|
39
|
-
class="k-task k-task-milestone"
|
|
40
|
-
[ngClass]="taskClass(dataItem)"
|
|
41
|
-
[attr.title]="mapper.extractFromTask(dataItem, 'title')"
|
|
42
|
-
[class.k-selected]="isSelected(dataItem)"
|
|
43
|
-
[attr.aria-selected]="ariaSelected"
|
|
44
|
-
[attr.aria-level]="level + 1"
|
|
45
|
-
>
|
|
46
|
-
</div>
|
|
47
|
-
@if (renderDependencyDragClues) {
|
|
48
|
-
<div
|
|
49
|
-
class="k-task-dot k-task-start k-touch-action-none"
|
|
50
|
-
[class.k-display-block]="touchEnabled"
|
|
51
|
-
>
|
|
52
|
-
</div>
|
|
53
|
-
<div
|
|
54
|
-
class="k-task-dot k-task-end k-touch-action-none"
|
|
55
|
-
[class.k-display-block]="touchEnabled"
|
|
56
|
-
>
|
|
57
|
-
</div>
|
|
58
|
-
}
|
|
59
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
60
|
-
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttMilestoneTaskComponent, decorators: [{
|
|
62
|
-
type: Component,
|
|
63
|
-
args: [{
|
|
64
|
-
selector: 'kendo-gantt-milestone-task',
|
|
65
|
-
providers: [
|
|
66
|
-
{
|
|
67
|
-
provide: GanttTaskBase,
|
|
68
|
-
useExisting: forwardRef(() => GanttMilestoneTaskComponent)
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
template: `
|
|
72
|
-
<div
|
|
73
|
-
#task
|
|
74
|
-
role="treeitem"
|
|
75
|
-
class="k-task k-task-milestone"
|
|
76
|
-
[ngClass]="taskClass(dataItem)"
|
|
77
|
-
[attr.title]="mapper.extractFromTask(dataItem, 'title')"
|
|
78
|
-
[class.k-selected]="isSelected(dataItem)"
|
|
79
|
-
[attr.aria-selected]="ariaSelected"
|
|
80
|
-
[attr.aria-level]="level + 1"
|
|
81
|
-
>
|
|
82
|
-
</div>
|
|
83
|
-
@if (renderDependencyDragClues) {
|
|
84
|
-
<div
|
|
85
|
-
class="k-task-dot k-task-start k-touch-action-none"
|
|
86
|
-
[class.k-display-block]="touchEnabled"
|
|
87
|
-
>
|
|
88
|
-
</div>
|
|
89
|
-
<div
|
|
90
|
-
class="k-task-dot k-task-end k-touch-action-none"
|
|
91
|
-
[class.k-display-block]="touchEnabled"
|
|
92
|
-
>
|
|
93
|
-
</div>
|
|
94
|
-
}
|
|
95
|
-
`,
|
|
96
|
-
standalone: true,
|
|
97
|
-
imports: [NgClass]
|
|
98
|
-
}]
|
|
99
|
-
}], ctorParameters: () => [{ type: i1.MappingService }, { type: i2.TimelineViewService }, { type: i3.DependencyDomService }, { type: i4.OptionChangesService }, { type: i0.ChangeDetectorRef }, { type: i5.NavigationService }], propDecorators: { milestoneWrapperClass: [{
|
|
100
|
-
type: HostBinding,
|
|
101
|
-
args: ['class.k-milestone-wrap']
|
|
102
|
-
}] } });
|
|
@@ -1,157 +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, Component, forwardRef, HostBinding, Input, TemplateRef } from '@angular/core';
|
|
6
|
-
import { MappingService } from '../common/mapping.service';
|
|
7
|
-
import { NavigationService } from '../navigation/navigation.service';
|
|
8
|
-
import { DependencyDomService } from '../dependencies/dependency-dom.service';
|
|
9
|
-
import { OptionChangesService } from '../common/option-changes.service';
|
|
10
|
-
import { TimelineViewService } from './../timeline/timeline-view.service';
|
|
11
|
-
import { GanttTaskBase } from './gantt-task-base';
|
|
12
|
-
import { isPresent } from '../utils';
|
|
13
|
-
import { NgClass, NgTemplateOutlet } from '@angular/common';
|
|
14
|
-
import { touchEnabled } from '@progress/kendo-common';
|
|
15
|
-
import * as i0 from "@angular/core";
|
|
16
|
-
import * as i1 from "../common/mapping.service";
|
|
17
|
-
import * as i2 from "./../timeline/timeline-view.service";
|
|
18
|
-
import * as i3 from "../dependencies/dependency-dom.service";
|
|
19
|
-
import * as i4 from "../common/option-changes.service";
|
|
20
|
-
import * as i5 from "../navigation/navigation.service";
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
export class GanttSummaryTaskComponent extends GanttTaskBase {
|
|
25
|
-
summaryWrapperClass = true;
|
|
26
|
-
template;
|
|
27
|
-
isExpanded;
|
|
28
|
-
touchEnabled = touchEnabled;
|
|
29
|
-
get ariaExpanded() {
|
|
30
|
-
// if no callback is provided, all child items are displayed and the item is regarded as expanded
|
|
31
|
-
// replicates the TreeList aria-expanded behavior
|
|
32
|
-
const isExpanded = !isPresent(this.isExpanded) || this.isExpanded(this.dataItem);
|
|
33
|
-
return String(isExpanded);
|
|
34
|
-
}
|
|
35
|
-
constructor(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) {
|
|
36
|
-
super(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService);
|
|
37
|
-
}
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttSummaryTaskComponent, deps: [{ token: i1.MappingService }, { token: i2.TimelineViewService }, { token: i3.DependencyDomService }, { token: i4.OptionChangesService }, { token: i0.ChangeDetectorRef }, { token: i5.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: GanttSummaryTaskComponent, isStandalone: true, selector: "kendo-gantt-summary-task", inputs: { template: "template", isExpanded: "isExpanded" }, host: { properties: { "class.k-summary-wrap": "this.summaryWrapperClass" } }, providers: [
|
|
40
|
-
{
|
|
41
|
-
provide: GanttTaskBase,
|
|
42
|
-
useExisting: forwardRef(() => GanttSummaryTaskComponent)
|
|
43
|
-
}
|
|
44
|
-
], usesInheritance: true, ngImport: i0, template: `
|
|
45
|
-
<div
|
|
46
|
-
#task
|
|
47
|
-
role="treeitem"
|
|
48
|
-
class="k-task k-task-summary"
|
|
49
|
-
[ngClass]="taskClass(dataItem)"
|
|
50
|
-
[style.width.px]="taskWidth"
|
|
51
|
-
[attr.title]="mapper.extractFromTask(dataItem, 'title')"
|
|
52
|
-
[class.k-selected]="isSelected(dataItem)"
|
|
53
|
-
[attr.aria-selected]="ariaSelected"
|
|
54
|
-
[attr.aria-expanded]="ariaExpanded"
|
|
55
|
-
[attr.aria-level]="level + 1"
|
|
56
|
-
>
|
|
57
|
-
@if (!template) {
|
|
58
|
-
<div
|
|
59
|
-
class="k-task-summary-progress"
|
|
60
|
-
[style.width.px]="taskWidth">
|
|
61
|
-
<div
|
|
62
|
-
class="k-task-summary-complete"
|
|
63
|
-
[style.width.px]="completionOverlayWidth"
|
|
64
|
-
>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
} @else {
|
|
68
|
-
<ng-template
|
|
69
|
-
[ngTemplateOutlet]="template"
|
|
70
|
-
[ngTemplateOutletContext]="{
|
|
71
|
-
$implicit: dataItem,
|
|
72
|
-
elementWidth: taskWidth
|
|
73
|
-
}"
|
|
74
|
-
></ng-template>
|
|
75
|
-
}
|
|
76
|
-
</div>
|
|
77
|
-
@if (renderDependencyDragClues) {
|
|
78
|
-
<div
|
|
79
|
-
class="k-task-dot k-task-start k-touch-action-none"
|
|
80
|
-
[class.k-display-block]="touchEnabled"
|
|
81
|
-
>
|
|
82
|
-
</div>
|
|
83
|
-
<div
|
|
84
|
-
class="k-task-dot k-task-end k-touch-action-none"
|
|
85
|
-
[class.k-display-block]="touchEnabled"
|
|
86
|
-
>
|
|
87
|
-
</div>
|
|
88
|
-
}
|
|
89
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
90
|
-
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttSummaryTaskComponent, decorators: [{
|
|
92
|
-
type: Component,
|
|
93
|
-
args: [{
|
|
94
|
-
selector: 'kendo-gantt-summary-task',
|
|
95
|
-
providers: [
|
|
96
|
-
{
|
|
97
|
-
provide: GanttTaskBase,
|
|
98
|
-
useExisting: forwardRef(() => GanttSummaryTaskComponent)
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
template: `
|
|
102
|
-
<div
|
|
103
|
-
#task
|
|
104
|
-
role="treeitem"
|
|
105
|
-
class="k-task k-task-summary"
|
|
106
|
-
[ngClass]="taskClass(dataItem)"
|
|
107
|
-
[style.width.px]="taskWidth"
|
|
108
|
-
[attr.title]="mapper.extractFromTask(dataItem, 'title')"
|
|
109
|
-
[class.k-selected]="isSelected(dataItem)"
|
|
110
|
-
[attr.aria-selected]="ariaSelected"
|
|
111
|
-
[attr.aria-expanded]="ariaExpanded"
|
|
112
|
-
[attr.aria-level]="level + 1"
|
|
113
|
-
>
|
|
114
|
-
@if (!template) {
|
|
115
|
-
<div
|
|
116
|
-
class="k-task-summary-progress"
|
|
117
|
-
[style.width.px]="taskWidth">
|
|
118
|
-
<div
|
|
119
|
-
class="k-task-summary-complete"
|
|
120
|
-
[style.width.px]="completionOverlayWidth"
|
|
121
|
-
>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
} @else {
|
|
125
|
-
<ng-template
|
|
126
|
-
[ngTemplateOutlet]="template"
|
|
127
|
-
[ngTemplateOutletContext]="{
|
|
128
|
-
$implicit: dataItem,
|
|
129
|
-
elementWidth: taskWidth
|
|
130
|
-
}"
|
|
131
|
-
></ng-template>
|
|
132
|
-
}
|
|
133
|
-
</div>
|
|
134
|
-
@if (renderDependencyDragClues) {
|
|
135
|
-
<div
|
|
136
|
-
class="k-task-dot k-task-start k-touch-action-none"
|
|
137
|
-
[class.k-display-block]="touchEnabled"
|
|
138
|
-
>
|
|
139
|
-
</div>
|
|
140
|
-
<div
|
|
141
|
-
class="k-task-dot k-task-end k-touch-action-none"
|
|
142
|
-
[class.k-display-block]="touchEnabled"
|
|
143
|
-
>
|
|
144
|
-
</div>
|
|
145
|
-
}
|
|
146
|
-
`,
|
|
147
|
-
standalone: true,
|
|
148
|
-
imports: [NgClass, NgTemplateOutlet]
|
|
149
|
-
}]
|
|
150
|
-
}], ctorParameters: () => [{ type: i1.MappingService }, { type: i2.TimelineViewService }, { type: i3.DependencyDomService }, { type: i4.OptionChangesService }, { type: i0.ChangeDetectorRef }, { type: i5.NavigationService }], propDecorators: { summaryWrapperClass: [{
|
|
151
|
-
type: HostBinding,
|
|
152
|
-
args: ['class.k-summary-wrap']
|
|
153
|
-
}], template: [{
|
|
154
|
-
type: Input
|
|
155
|
-
}], isExpanded: [{
|
|
156
|
-
type: Input
|
|
157
|
-
}] } });
|
|
@@ -1,230 +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, Directive, ElementRef, HostBinding, inject, Input, isDevMode, ViewChild } from '@angular/core';
|
|
6
|
-
import { MS_PER_HOUR, MS_PER_DAY, firstDayOfMonth } from '@progress/kendo-date-math';
|
|
7
|
-
import { Subscription } from 'rxjs';
|
|
8
|
-
import { NavigationService } from '../navigation/navigation.service';
|
|
9
|
-
import { OptionChangesService } from '../common/option-changes.service';
|
|
10
|
-
import { TimelineViewService } from '../timeline/timeline-view.service';
|
|
11
|
-
import { DependencyDomService } from '../dependencies/dependency-dom.service';
|
|
12
|
-
import { MappingService } from '../common/mapping.service';
|
|
13
|
-
import { getTotalDaysInMonth, getTotalMonthsInBetween, isNumber, isPresent } from '../utils';
|
|
14
|
-
import { TaskDragService } from '../dragging/task-drag.service';
|
|
15
|
-
import * as i0 from "@angular/core";
|
|
16
|
-
import * as i1 from "../common/mapping.service";
|
|
17
|
-
import * as i2 from "../timeline/timeline-view.service";
|
|
18
|
-
import * as i3 from "../dependencies/dependency-dom.service";
|
|
19
|
-
import * as i4 from "../common/option-changes.service";
|
|
20
|
-
import * as i5 from "../navigation/navigation.service";
|
|
21
|
-
const slotUnitDuration = {
|
|
22
|
-
day: MS_PER_HOUR,
|
|
23
|
-
week: MS_PER_DAY,
|
|
24
|
-
month: MS_PER_DAY * 7
|
|
25
|
-
};
|
|
26
|
-
const FOCUSED_CLASS = 'k-focus';
|
|
27
|
-
/**
|
|
28
|
-
* @hidden
|
|
29
|
-
*/
|
|
30
|
-
export class GanttTaskBase {
|
|
31
|
-
mapper;
|
|
32
|
-
timelineViewService;
|
|
33
|
-
dependencyDomService;
|
|
34
|
-
optionChangesService;
|
|
35
|
-
cdr;
|
|
36
|
-
navigationService;
|
|
37
|
-
wrapperClass = true;
|
|
38
|
-
get taskIndexAttribute() {
|
|
39
|
-
return this.index;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Points to the `.k-task` element of the template (present in all three task types).
|
|
43
|
-
*/
|
|
44
|
-
taskElement;
|
|
45
|
-
dataItem;
|
|
46
|
-
index;
|
|
47
|
-
level;
|
|
48
|
-
renderDependencyDragClues;
|
|
49
|
-
selectable;
|
|
50
|
-
isSelected;
|
|
51
|
-
// better to be set in a service and retrieved from it whenever needed?
|
|
52
|
-
activeView;
|
|
53
|
-
taskClass;
|
|
54
|
-
get ariaSelected() {
|
|
55
|
-
// assigning null will not render the attribute at all (desired in selectable="false" mode)
|
|
56
|
-
return this.selectable ? String(this.isSelected(this.dataItem)) : null;
|
|
57
|
-
}
|
|
58
|
-
get slotUnitDuration() {
|
|
59
|
-
return slotUnitDuration[this.activeView];
|
|
60
|
-
}
|
|
61
|
-
get viewService() {
|
|
62
|
-
return this.timelineViewService.service(this.activeView);
|
|
63
|
-
}
|
|
64
|
-
get slotWidth() {
|
|
65
|
-
return this.viewService.options.slotWidth;
|
|
66
|
-
}
|
|
67
|
-
get taskWidth() {
|
|
68
|
-
const taskStart = this.mapper.extractFromTask(this.dataItem, 'start');
|
|
69
|
-
const taskEnd = this.mapper.extractFromTask(this.dataItem, 'end');
|
|
70
|
-
if (this.activeView === 'year') {
|
|
71
|
-
if (!taskStart || !taskEnd) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const monthsDiff = Math.max(getTotalMonthsInBetween(taskStart, taskEnd), 0);
|
|
75
|
-
const totalDaysInStartMonth = getTotalDaysInMonth(taskStart);
|
|
76
|
-
if (monthsDiff > 0 || (monthsDiff === 0 && taskStart.getMonth() !== taskEnd.getMonth())) {
|
|
77
|
-
const startFraction = (totalDaysInStartMonth - taskStart.getDate()) / totalDaysInStartMonth;
|
|
78
|
-
const endFraction = taskEnd.getDate() / getTotalDaysInMonth(taskEnd);
|
|
79
|
-
return (startFraction + monthsDiff + endFraction) * this.slotWidth;
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
const daysDiff = taskEnd.getDate() - taskStart.getDate();
|
|
83
|
-
// same-day tasks - calculate the fraction based on time difference instead of day to avoid division by zero
|
|
84
|
-
if (daysDiff === 0) {
|
|
85
|
-
const timeDiffMs = taskEnd.getTime() - taskStart.getTime();
|
|
86
|
-
const dayFraction = timeDiffMs / MS_PER_DAY;
|
|
87
|
-
return (dayFraction / totalDaysInStartMonth) * this.slotWidth;
|
|
88
|
-
}
|
|
89
|
-
const fraction = daysDiff / totalDaysInStartMonth;
|
|
90
|
-
return fraction * this.slotWidth;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
const itemDuration = taskEnd - taskStart;
|
|
94
|
-
const durationInSlotUnits = itemDuration / this.slotUnitDuration;
|
|
95
|
-
const width = durationInSlotUnits * this.slotWidth;
|
|
96
|
-
return width;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* The `left` style prop has to be applied to the host element (.k-task-wrap), as the drag clue elements are displayed on .k-task-wrap hover.
|
|
100
|
-
* Applying the `left` offset to the inner .k-task element leaves the .k-task-wrap element rendered with an offset of 0 somewhere on the left
|
|
101
|
-
* and hovering just the .k-task element doesn't expose the drag clues.
|
|
102
|
-
* Additionally, positioning the entire container takes care of positioning the hints as well.
|
|
103
|
-
*/
|
|
104
|
-
get taskOffset() {
|
|
105
|
-
const taskStart = this.mapper.extractFromTask(this.dataItem, 'start');
|
|
106
|
-
const taskEnd = this.mapper.extractFromTask(this.dataItem, 'end');
|
|
107
|
-
const viewStart = this.viewService.viewStart;
|
|
108
|
-
if (this.activeView === 'year') {
|
|
109
|
-
if (!taskStart || !taskEnd) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
const viewStartDate = new Date(viewStart);
|
|
113
|
-
const offsetSlots = getTotalMonthsInBetween(viewStartDate, new Date(firstDayOfMonth(taskStart))) + 1;
|
|
114
|
-
const currentMonthOffset = taskStart.getDate() / getTotalDaysInMonth(taskStart);
|
|
115
|
-
return (offsetSlots + currentMonthOffset) * this.slotWidth;
|
|
116
|
-
}
|
|
117
|
-
const timeAfterViewStart = taskStart - viewStart;
|
|
118
|
-
const offsetInSlotUnits = timeAfterViewStart / this.slotUnitDuration;
|
|
119
|
-
const offset = offsetInSlotUnits * this.slotWidth;
|
|
120
|
-
return offset;
|
|
121
|
-
}
|
|
122
|
-
get completionOverlayWidth() {
|
|
123
|
-
const overlayWidth = this.taskWidth * this.mapper.extractFromTask(this.dataItem, 'completionRatio');
|
|
124
|
-
// fall-back to 0 in case no completionRatio is provided
|
|
125
|
-
return isNumber(overlayWidth) ? overlayWidth : 0;
|
|
126
|
-
}
|
|
127
|
-
draggedCompletionWidth;
|
|
128
|
-
taskDragService;
|
|
129
|
-
completionDragResult;
|
|
130
|
-
subscriptions = new Subscription();
|
|
131
|
-
constructor(mapper, // left public to be available for usage in the templates
|
|
132
|
-
timelineViewService, dependencyDomService, optionChangesService, cdr, navigationService) {
|
|
133
|
-
this.mapper = mapper;
|
|
134
|
-
this.timelineViewService = timelineViewService;
|
|
135
|
-
this.dependencyDomService = dependencyDomService;
|
|
136
|
-
this.optionChangesService = optionChangesService;
|
|
137
|
-
this.cdr = cdr;
|
|
138
|
-
this.navigationService = navigationService;
|
|
139
|
-
this.taskDragService = inject(TaskDragService, { optional: true });
|
|
140
|
-
this.subscriptions.add(this.optionChangesService.viewChanges
|
|
141
|
-
.subscribe(() => this.cdr.markForCheck()));
|
|
142
|
-
this.subscriptions.add(this.navigationService.taskStatusChanges
|
|
143
|
-
.subscribe(this.updateActiveState.bind(this)));
|
|
144
|
-
}
|
|
145
|
-
ngOnInit() {
|
|
146
|
-
const taskStart = this.mapper.extractFromTask(this.dataItem, 'start');
|
|
147
|
-
const taskEnd = this.mapper.extractFromTask(this.dataItem, 'end');
|
|
148
|
-
if (isDevMode()) {
|
|
149
|
-
const taskTitle = this.mapper.extractFromTask(this.dataItem, 'title');
|
|
150
|
-
if (!taskStart || !taskEnd) {
|
|
151
|
-
console.warn(`Task ${taskTitle} is missing a start or end date.`);
|
|
152
|
-
}
|
|
153
|
-
if (taskStart && taskEnd && taskStart > taskEnd) {
|
|
154
|
-
console.warn(`Task ${taskTitle} has a start date that is after the end date.`);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
ngAfterViewInit() {
|
|
159
|
-
this.taskDragService?.registerTask(this);
|
|
160
|
-
}
|
|
161
|
-
ngOnChanges(changes) {
|
|
162
|
-
if (isPresent(changes['dataItem'])) {
|
|
163
|
-
if (isPresent(changes['dataItem'].previousValue)) {
|
|
164
|
-
this.dependencyDomService.unregisterTask(changes['dataItem'].previousValue);
|
|
165
|
-
}
|
|
166
|
-
this.dependencyDomService.registerTask(this.dataItem, this.taskElement.nativeElement);
|
|
167
|
-
}
|
|
168
|
-
else if (isPresent(changes['activeView'])) {
|
|
169
|
-
this.dependencyDomService.notifyChanges();
|
|
170
|
-
}
|
|
171
|
-
if (this.navigationService.enabled && isPresent(changes['index'])) {
|
|
172
|
-
this.updateActiveState(this.navigationService.activeTask);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
ngOnDestroy() {
|
|
176
|
-
if (isPresent(this.dataItem)) {
|
|
177
|
-
this.dependencyDomService.unregisterTask(this.dataItem);
|
|
178
|
-
}
|
|
179
|
-
this.subscriptions.unsubscribe();
|
|
180
|
-
}
|
|
181
|
-
updateActiveState({ activeIndex, isFocused }) {
|
|
182
|
-
const isActive = activeIndex === this.index;
|
|
183
|
-
const tabindex = isActive ? '0' : '-1';
|
|
184
|
-
this.taskElement.nativeElement.setAttribute('tabindex', tabindex);
|
|
185
|
-
if (isActive && isFocused) {
|
|
186
|
-
this.taskElement.nativeElement.focus();
|
|
187
|
-
this.taskElement.nativeElement.classList.add(FOCUSED_CLASS);
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
this.taskElement.nativeElement.classList.remove(FOCUSED_CLASS);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskBase, deps: [{ token: i1.MappingService }, { token: i2.TimelineViewService }, { token: i3.DependencyDomService }, { token: i4.OptionChangesService }, { token: i0.ChangeDetectorRef }, { token: i5.NavigationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
194
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GanttTaskBase, selector: "kendo-gantt-task-base", inputs: { dataItem: "dataItem", index: "index", level: "level", renderDependencyDragClues: "renderDependencyDragClues", selectable: "selectable", isSelected: "isSelected", activeView: "activeView", taskClass: "taskClass" }, host: { properties: { "class.k-task-wrap": "this.wrapperClass", "attr.data-task-index": "this.taskIndexAttribute", "style.left.px": "this.taskOffset" } }, viewQueries: [{ propertyName: "taskElement", first: true, predicate: ["task"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
|
|
195
|
-
}
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GanttTaskBase, decorators: [{
|
|
197
|
-
type: Directive,
|
|
198
|
-
args: [{
|
|
199
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
200
|
-
selector: 'kendo-gantt-task-base'
|
|
201
|
-
}]
|
|
202
|
-
}], ctorParameters: () => [{ type: i1.MappingService }, { type: i2.TimelineViewService }, { type: i3.DependencyDomService }, { type: i4.OptionChangesService }, { type: i0.ChangeDetectorRef }, { type: i5.NavigationService }], propDecorators: { wrapperClass: [{
|
|
203
|
-
type: HostBinding,
|
|
204
|
-
args: ['class.k-task-wrap']
|
|
205
|
-
}], taskIndexAttribute: [{
|
|
206
|
-
type: HostBinding,
|
|
207
|
-
args: ['attr.data-task-index']
|
|
208
|
-
}], taskElement: [{
|
|
209
|
-
type: ViewChild,
|
|
210
|
-
args: ['task', { static: true }]
|
|
211
|
-
}], dataItem: [{
|
|
212
|
-
type: Input
|
|
213
|
-
}], index: [{
|
|
214
|
-
type: Input
|
|
215
|
-
}], level: [{
|
|
216
|
-
type: Input
|
|
217
|
-
}], renderDependencyDragClues: [{
|
|
218
|
-
type: Input
|
|
219
|
-
}], selectable: [{
|
|
220
|
-
type: Input
|
|
221
|
-
}], isSelected: [{
|
|
222
|
-
type: Input
|
|
223
|
-
}], activeView: [{
|
|
224
|
-
type: Input
|
|
225
|
-
}], taskClass: [{
|
|
226
|
-
type: Input
|
|
227
|
-
}], taskOffset: [{
|
|
228
|
-
type: HostBinding,
|
|
229
|
-
args: ['style.left.px']
|
|
230
|
-
}] } });
|