@progress/kendo-angular-gantt 0.1.5 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-angular-gantt.js +2 -76
- package/dist/cdn/main.js +23 -1
- package/dist/es/columns/column.component.js +5 -0
- package/dist/es/columns/columns.js +1 -0
- package/dist/es/columns/edit-template.directive.js +34 -0
- package/dist/es/columns/span-column.component.js +6 -0
- package/dist/es/common/default-callbacks.js +4 -0
- package/dist/es/editing/edit-dialog.component.js +44 -0
- package/dist/es/editing/edit.service.js +39 -0
- package/dist/es/editing/util.js +17 -0
- package/dist/es/gantt.component.js +478 -22
- package/dist/es/gantt.module.js +62 -5
- package/dist/es/index.js +6 -0
- package/dist/es/localization/custom-messages.component.js +44 -0
- package/dist/es/localization/localized-messages.directive.js +35 -0
- package/dist/es/localization/messages.js +246 -0
- package/dist/es/localization/treelist-messages.directive.js +31 -0
- package/dist/es/main.js +1 -0
- package/dist/es/models/events/cell-click-event.interface.js +4 -0
- package/dist/es/models/events/cell-close-event.interface.js +19 -0
- package/dist/es/models/events/preventable-event.js +32 -0
- package/dist/es/models/events/task-click-event.interface.js +4 -0
- package/dist/es/models/events/task-edit-event.interface.js +4 -0
- package/dist/es/models/gantt-task-model-fields.interface.js +2 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rendering/gantt-milestone-task.component.js +1 -1
- package/dist/es/rendering/gantt-summary-task.component.js +1 -1
- package/dist/es/rendering/gantt-task-base.js +8 -0
- package/dist/es/rendering/gantt-task.component.js +12 -4
- package/dist/es/rendering/gantt-tasks-table-body.component.js +5 -1
- package/dist/es/selection/selectable.directive.js +141 -0
- package/dist/es/selection/selection-change-event.js +4 -0
- package/dist/es/timeline/gantt-timeline.component.js +5 -1
- package/dist/es/toolbar/view-selector.component.js +7 -4
- package/dist/es/utils.js +48 -1
- package/dist/es2015/columns/column.component.d.ts +2 -0
- package/dist/es2015/columns/column.component.js +5 -0
- package/dist/es2015/columns/columns.d.ts +1 -0
- package/dist/es2015/columns/columns.js +1 -0
- package/dist/es2015/columns/edit-template.directive.d.ts +23 -0
- package/dist/es2015/columns/edit-template.directive.js +33 -0
- package/dist/es2015/columns/span-column.component.d.ts +2 -0
- package/dist/es2015/columns/span-column.component.js +6 -0
- package/dist/es2015/common/default-callbacks.d.ts +4 -0
- package/dist/es2015/common/default-callbacks.js +4 -0
- package/dist/es2015/editing/edit-dialog.component.d.ts +21 -0
- package/dist/es2015/editing/edit-dialog.component.js +86 -0
- package/dist/es2015/editing/edit.service.d.ts +20 -0
- package/dist/es2015/editing/edit.service.js +41 -0
- package/dist/es2015/editing/util.d.ts +10 -0
- package/dist/es2015/editing/util.js +17 -0
- package/dist/es2015/gantt.component.d.ts +236 -12
- package/dist/es2015/gantt.component.js +662 -21
- package/dist/es2015/gantt.module.d.ts +29 -1
- package/dist/es2015/gantt.module.js +62 -5
- package/dist/es2015/index.d.ts +6 -0
- package/dist/es2015/index.js +6 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/localization/custom-messages.component.d.ts +15 -0
- package/dist/es2015/localization/custom-messages.component.js +36 -0
- package/dist/es2015/localization/localized-messages.directive.d.ts +13 -0
- package/dist/es2015/localization/localized-messages.directive.js +31 -0
- package/dist/es2015/localization/messages.d.ts +246 -0
- package/dist/es2015/localization/messages.js +240 -0
- package/dist/es2015/localization/treelist-messages.directive.d.ts +14 -0
- package/dist/es2015/localization/treelist-messages.directive.js +29 -0
- package/dist/es2015/main.d.ts +2 -0
- package/dist/es2015/main.js +1 -0
- package/dist/es2015/models/events/cell-click-event.interface.d.ts +43 -0
- package/dist/es2015/models/events/cell-click-event.interface.js +4 -0
- package/dist/es2015/models/events/cell-close-event.interface.d.ts +48 -0
- package/dist/es2015/models/events/cell-close-event.interface.js +14 -0
- package/dist/es2015/models/events/preventable-event.d.ts +24 -0
- package/dist/es2015/models/events/preventable-event.js +30 -0
- package/dist/es2015/models/events/task-click-event.interface.d.ts +30 -0
- package/dist/es2015/models/events/task-click-event.interface.js +4 -0
- package/dist/es2015/models/events/task-edit-event.interface.d.ts +46 -0
- package/dist/es2015/models/events/task-edit-event.interface.js +4 -0
- package/dist/es2015/models/gantt-task-model-fields.interface.d.ts +1 -0
- package/dist/es2015/models/gantt-task-model-fields.interface.js +2 -1
- package/dist/es2015/models/models.d.ts +2 -0
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/rendering/gantt-milestone-task.component.js +2 -0
- package/dist/es2015/rendering/gantt-summary-task.component.js +2 -0
- package/dist/es2015/rendering/gantt-task-base.d.ts +2 -0
- package/dist/es2015/rendering/gantt-task-base.js +8 -0
- package/dist/es2015/rendering/gantt-task.component.d.ts +4 -1
- package/dist/es2015/rendering/gantt-task.component.js +18 -2
- package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +1 -0
- package/dist/es2015/rendering/gantt-tasks-table-body.component.js +11 -1
- package/dist/es2015/selection/selectable.directive.d.ts +42 -0
- package/dist/es2015/selection/selectable.directive.js +122 -0
- package/dist/es2015/selection/selection-change-event.d.ts +25 -0
- package/dist/es2015/selection/selection-change-event.js +4 -0
- package/dist/es2015/timeline/gantt-timeline.component.d.ts +1 -0
- package/dist/es2015/timeline/gantt-timeline.component.js +5 -0
- package/dist/es2015/toolbar/view-selector.component.d.ts +3 -0
- package/dist/es2015/toolbar/view-selector.component.js +8 -7
- package/dist/es2015/utils.d.ts +39 -0
- package/dist/es2015/utils.js +48 -1
- package/dist/fesm2015/index.js +1388 -35
- package/dist/fesm5/index.js +1191 -45
- package/dist/npm/columns/column.component.js +5 -0
- package/dist/npm/columns/columns.js +2 -0
- package/dist/npm/columns/edit-template.directive.js +36 -0
- package/dist/npm/columns/span-column.component.js +6 -0
- package/dist/npm/common/default-callbacks.js +4 -0
- package/dist/npm/editing/edit-dialog.component.js +46 -0
- package/dist/npm/editing/edit.service.js +41 -0
- package/dist/npm/editing/util.js +19 -0
- package/dist/npm/gantt.component.js +475 -19
- package/dist/npm/gantt.module.js +61 -4
- package/dist/npm/index.js +12 -0
- package/dist/npm/localization/custom-messages.component.js +46 -0
- package/dist/npm/localization/localized-messages.directive.js +37 -0
- package/dist/npm/localization/messages.js +248 -0
- package/dist/npm/localization/treelist-messages.directive.js +33 -0
- package/dist/npm/main.js +2 -0
- package/dist/npm/models/events/cell-click-event.interface.js +6 -0
- package/dist/npm/models/events/cell-close-event.interface.js +21 -0
- package/dist/npm/models/events/preventable-event.js +34 -0
- package/dist/npm/models/events/task-click-event.interface.js +6 -0
- package/dist/npm/models/events/task-edit-event.interface.js +6 -0
- package/dist/npm/models/gantt-task-model-fields.interface.js +2 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rendering/gantt-milestone-task.component.js +1 -1
- package/dist/npm/rendering/gantt-summary-task.component.js +1 -1
- package/dist/npm/rendering/gantt-task-base.js +8 -0
- package/dist/npm/rendering/gantt-task.component.js +12 -4
- package/dist/npm/rendering/gantt-tasks-table-body.component.js +5 -1
- package/dist/npm/selection/selectable.directive.js +143 -0
- package/dist/npm/selection/selection-change-event.js +6 -0
- package/dist/npm/timeline/gantt-timeline.component.js +5 -1
- package/dist/npm/toolbar/view-selector.component.js +7 -4
- package/dist/npm/utils.js +47 -0
- package/dist/systemjs/kendo-angular-gantt.js +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,20 @@
|
|
|
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 { FormGroup } from '@angular/forms';
|
|
6
|
+
import { Subject } from 'rxjs';
|
|
7
|
+
import { EditEvent, EditResultType } from '../models/events/task-edit-event.interface';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare class EditService {
|
|
12
|
+
showEditingDialog: Subject<boolean>;
|
|
13
|
+
showConfirmationDialog: Subject<any>;
|
|
14
|
+
editEvent: Subject<EditEvent>;
|
|
15
|
+
formGroup: FormGroup;
|
|
16
|
+
dataItem: any;
|
|
17
|
+
createEditDialog(dataItem: any, formGroup: FormGroup): void;
|
|
18
|
+
closeEditDialog(): void;
|
|
19
|
+
triggerEditEvent(editResultType: EditResultType): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
+
import { Injectable } from '@angular/core';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
let EditService = class EditService {
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
constructor() {
|
|
16
|
+
this.showEditingDialog = new Subject();
|
|
17
|
+
this.showConfirmationDialog = new Subject();
|
|
18
|
+
this.editEvent = new Subject();
|
|
19
|
+
}
|
|
20
|
+
createEditDialog(dataItem, formGroup) {
|
|
21
|
+
this.dataItem = dataItem;
|
|
22
|
+
this.formGroup = formGroup;
|
|
23
|
+
this.showEditingDialog.next(true);
|
|
24
|
+
}
|
|
25
|
+
closeEditDialog() {
|
|
26
|
+
this.showEditingDialog.next(false);
|
|
27
|
+
this.dataItem = undefined;
|
|
28
|
+
this.formGroup = undefined;
|
|
29
|
+
}
|
|
30
|
+
triggerEditEvent(editResultType) {
|
|
31
|
+
this.editEvent.next({
|
|
32
|
+
formGroup: this.formGroup,
|
|
33
|
+
dataItem: this.dataItem,
|
|
34
|
+
editResultType
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
EditService = tslib_1.__decorate([
|
|
39
|
+
Injectable()
|
|
40
|
+
], EditService);
|
|
41
|
+
export { EditService };
|
|
@@ -0,0 +1,10 @@
|
|
|
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 { MappingService } from "../common/mapping.service";
|
|
6
|
+
import { TaskEditItem } from "../models/events/task-edit-event.interface";
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export declare const getEditItem: (dataItem: any, data: any[], mapper: MappingService) => TaskEditItem;
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export const getEditItem = (dataItem, data, mapper) => {
|
|
9
|
+
const treeListDataItem = data.find(item => mapper.extractFromTask(item.data, 'id') === mapper.extractFromTask(dataItem, 'id'));
|
|
10
|
+
return mapPath(treeListDataItem);
|
|
11
|
+
};
|
|
12
|
+
const mapPath = (item) => ({
|
|
13
|
+
dataItem: item.data,
|
|
14
|
+
parent: item.parent.data ? mapPath(item.parent) : null
|
|
15
|
+
});
|
|
16
|
+
const ɵ0 = mapPath;
|
|
17
|
+
export { ɵ0 };
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { EventEmitter, OnChanges, QueryList, SimpleChanges, Renderer2, AfterContentInit, OnDestroy } from '@angular/core';
|
|
6
|
-
import {
|
|
7
|
-
import { TreeListComponent } from '@progress/kendo-angular-treelist';
|
|
5
|
+
import { EventEmitter, OnChanges, QueryList, SimpleChanges, Renderer2, AfterContentInit, OnDestroy, ElementRef, NgZone } from '@angular/core';
|
|
6
|
+
import { FormGroup } from '@angular/forms';
|
|
7
|
+
import { TreeListComponent, DataBoundTreeComponent, ExpandableTreeComponent, SelectionChangeEvent as TreeListSelectionChangeEvent, CellClickEvent as TreeListCellClickEvent } from '@progress/kendo-angular-treelist';
|
|
8
8
|
import { CompositeFilterDescriptor, SortDescriptor } from '@progress/kendo-data-query';
|
|
9
|
+
import { Day } from '@progress/kendo-date-math';
|
|
9
10
|
import { Observable } from 'rxjs';
|
|
10
11
|
import { GanttColumnBase } from './columns/columns';
|
|
11
|
-
import { DataStateChangeEvent, ColumnMenuSettings, RowClassFn, TaskClassFn, ColumnVisibilityChangeEvent, ColumnResizeEvent, ColumnLockedChangeEvent, ColumnReorderEvent, ColumnReorderConfig, GanttTaskModelFields, GanttDependencyModelFields, SortSettings } from './models/models';
|
|
12
|
+
import { DataStateChangeEvent, ColumnMenuSettings, RowClassFn, TaskClassFn, ColumnVisibilityChangeEvent, ColumnResizeEvent, ColumnLockedChangeEvent, ColumnReorderEvent, ColumnReorderConfig, GanttTaskModelFields, GanttDependencyModelFields, SortSettings, CellClickEvent, TaskClickEvent } from './models/models';
|
|
12
13
|
import { TimelineViewService } from './timeline/timeline-view.service';
|
|
13
14
|
import { TimelineViewType } from './models/timeline-view';
|
|
14
15
|
import { TimelineBaseViewService } from './timeline/timeline-base-view.service';
|
|
@@ -16,6 +17,8 @@ import { ScrollSyncService } from './scrolling/scroll-sync.service';
|
|
|
16
17
|
import { DependencyDomService } from './dependencies/dependency-dom.service';
|
|
17
18
|
import { MappingService } from './common/mapping.service';
|
|
18
19
|
import { OptionChangesService } from './common/option-changes.service';
|
|
20
|
+
import { EditService } from './editing/edit.service';
|
|
21
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
19
22
|
import { TimelinePaneOptions, TreeListPaneOptions } from './models/splitter-pane-options.interface';
|
|
20
23
|
import { GanttTaskTemplateDirective } from './template-directives/task-template.directive';
|
|
21
24
|
import { GanttSummaryTaskTemplateDirective } from './template-directives/summary-task-template.directive';
|
|
@@ -24,9 +27,79 @@ import { ToolbarTemplateDirective } from './toolbar/toolbar-template.directive';
|
|
|
24
27
|
import { ToolbarPosition } from './models/toolbar-position';
|
|
25
28
|
import { ExpandEvent } from './expanded-state/expand-event';
|
|
26
29
|
import { ViewBase } from './timeline/view-base';
|
|
27
|
-
import {
|
|
30
|
+
import { SelectionChangeEvent } from './selection/selection-change-event';
|
|
31
|
+
import { TaskEditEvent } from './models/events/task-edit-event.interface';
|
|
32
|
+
import { CellCloseEvent } from './models/events/cell-close-event.interface';
|
|
28
33
|
/**
|
|
29
|
-
*
|
|
34
|
+
* Represents the Kendo UI Gantt component for Angular.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts-preview
|
|
38
|
+
* _@Component({
|
|
39
|
+
* selector: 'my-app',
|
|
40
|
+
* template: `
|
|
41
|
+
* <kendo-gantt
|
|
42
|
+
* [style.height.px]="500"
|
|
43
|
+
* [kendoGanttHierarchyBinding]="data"
|
|
44
|
+
* childrenField="subtasks"
|
|
45
|
+
* [dependencies]="dependencies">
|
|
46
|
+
* <kendo-gantt-column
|
|
47
|
+
* field="title"
|
|
48
|
+
* title="Task"
|
|
49
|
+
* [width]="200"
|
|
50
|
+
* [expandable]="true"></kendo-gantt-column>
|
|
51
|
+
* <kendo-gantt-column
|
|
52
|
+
* field="start"
|
|
53
|
+
* title="Start"
|
|
54
|
+
* format="dd-MMM-yyyy"
|
|
55
|
+
* [width]="120"></kendo-gantt-column>
|
|
56
|
+
* <kendo-gantt-column
|
|
57
|
+
* field="end"
|
|
58
|
+
* title="End"
|
|
59
|
+
* format="dd-MMM-yyyy"
|
|
60
|
+
* [width]="120"></kendo-gantt-column>
|
|
61
|
+
* <kendo-gantt-timeline-day-view></kendo-gantt-timeline-day-view>
|
|
62
|
+
* <kendo-gantt-timeline-week-view></kendo-gantt-timeline-week-view>
|
|
63
|
+
* <kendo-gantt-timeline-month-view></kendo-gantt-timeline-month-view>
|
|
64
|
+
* </kendo-gantt>
|
|
65
|
+
* `
|
|
66
|
+
* })
|
|
67
|
+
* class AppComponent {
|
|
68
|
+
* public data: Task[] = [{
|
|
69
|
+
* id: 7, title: 'Validation and R&D', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
70
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.45708333333333334,
|
|
71
|
+
* subtasks: [
|
|
72
|
+
* { id: 18, title: 'Project Kickoff', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
73
|
+
* end: new Date('2014-06-02T00:00:00.000Z'), completionRatio: 0.23 },
|
|
74
|
+
* { id: 11, title: 'Research', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
75
|
+
* end: new Date('2014-06-07T00:00:00.000Z'), completionRatio: 0.5766666666666667,
|
|
76
|
+
* subtasks: [
|
|
77
|
+
* { id: 19, title: 'Validation', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
78
|
+
* end: new Date('2014-06-04T00:00:00.000Z'), completionRatio: 0.25 },
|
|
79
|
+
* { id: 39, title: 'Specification', start: new Date('2014-06-04T00:00:00.000Z'),
|
|
80
|
+
* end: new Date('2014-06-07T00:00:00.000Z'), completionRatio: 0.66 }]
|
|
81
|
+
* }, { id: 13, title: 'Implementation', start: new Date('2014-06-08T00:00:00.000Z'),
|
|
82
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.77,
|
|
83
|
+
* subtasks: [
|
|
84
|
+
* { id: 24, title: 'Prototype', start: new Date('2014-06-08T00:00:00.000Z'),
|
|
85
|
+
* end: new Date('2014-06-14T00:00:00.000Z'), completionRatio: 0.77 },
|
|
86
|
+
* { id: 29, title: 'UI and Interaction', start: new Date('2014-06-14T00:00:00.000Z'),
|
|
87
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.6 }]
|
|
88
|
+
* }, { id: 17, title: 'Release', start: new Date('2014-06-19T00:00:00.000Z'),
|
|
89
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0 }]
|
|
90
|
+
* }];
|
|
91
|
+
*
|
|
92
|
+
* public dependencies: GanttDependency[] = [
|
|
93
|
+
* { id: 528, fromId: 18, toId: 19, type: DependencyType.FS },
|
|
94
|
+
* { id: 529, fromId: 19, toId: 39, type: DependencyType.FS },
|
|
95
|
+
* { id: 535, fromId: 24, toId: 29, type: DependencyType.FS },
|
|
96
|
+
* { id: 551, fromId: 13, toId: 29, type: DependencyType.FF },
|
|
97
|
+
* { id: 777, fromId: 7, toId: 11, type: DependencyType.SF },
|
|
98
|
+
* { id: 556, fromId: 39, toId: 24, type: DependencyType.FS },
|
|
99
|
+
* { id: 546, fromId: 29, toId: 17, type: DependencyType.FS },
|
|
100
|
+
* ];
|
|
101
|
+
* }
|
|
102
|
+
* ```
|
|
30
103
|
*/
|
|
31
104
|
export declare class GanttComponent implements AfterContentInit, OnChanges, OnDestroy, DataBoundTreeComponent, ExpandableTreeComponent {
|
|
32
105
|
private timelineViewService;
|
|
@@ -35,6 +108,10 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
|
|
|
35
108
|
private mapper;
|
|
36
109
|
private optionChangesService;
|
|
37
110
|
private dependencyDomService;
|
|
111
|
+
private editService;
|
|
112
|
+
localizationService: LocalizationService;
|
|
113
|
+
private hostElement;
|
|
114
|
+
private zone;
|
|
38
115
|
treeList: TreeListComponent;
|
|
39
116
|
/**
|
|
40
117
|
* @hidden
|
|
@@ -51,6 +128,7 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
|
|
|
51
128
|
toolbarTemplateChildren: QueryList<ToolbarTemplateDirective>;
|
|
52
129
|
toolbarTemplate: ToolbarTemplateDirective;
|
|
53
130
|
hostClasses: boolean;
|
|
131
|
+
readonly dir: string;
|
|
54
132
|
/**
|
|
55
133
|
* A query list of all declared columns.
|
|
56
134
|
*/
|
|
@@ -83,6 +161,27 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
|
|
|
83
161
|
* > The task data items should either conform to the [`GanttTask`]({% slug api_gantt_gantttask %}) interface, or a [`taskModelFields`]({% slug api_gantt_ganttcomponent %}#toc-taskmodelfields) object has to be provided.
|
|
84
162
|
*/
|
|
85
163
|
data: any[];
|
|
164
|
+
/**
|
|
165
|
+
* Provides a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection))
|
|
166
|
+
*
|
|
167
|
+
* > The [`selectable`]({% slug gantt_api_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
|
|
168
|
+
*/
|
|
169
|
+
isSelected: (dataItem: object) => boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Fires when the Gantt selection is changed through user interaction.
|
|
172
|
+
*
|
|
173
|
+
* Holds data about the affected [`items`]({% slug api_gantt_selectionchangeevent %}#toc-items) and the attempted [`action`]({% slug api_gantt_selectionchangeevent %}#toc-action):
|
|
174
|
+
* - `select` - Triggered on `click` or `ctrl + click` on deselected items.
|
|
175
|
+
* - `remove` - Triggered on `ctrl + click` on selected items.
|
|
176
|
+
*/
|
|
177
|
+
selectionChange: EventEmitter<SelectionChangeEvent>;
|
|
178
|
+
/**
|
|
179
|
+
* Enables or disables the Gantt selection mechanism ([see example]({% slug selection_gantt %}#toc-custom-selection)).
|
|
180
|
+
*
|
|
181
|
+
* > When set to `true`, the [`isSelected`]({% slug gantt_api_ganttcomponent %}#toc-isselected) callback has to be provided.
|
|
182
|
+
* > When applied, the [`SelectableDirective`]({% slug api_gantt_selectabledirective %}) sets `selectable` to `true` internally.
|
|
183
|
+
*/
|
|
184
|
+
selectable: boolean;
|
|
86
185
|
/**
|
|
87
186
|
* The position of the toolbar.
|
|
88
187
|
*
|
|
@@ -202,10 +301,40 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
|
|
|
202
301
|
* Fires when an item is expanded.
|
|
203
302
|
*/
|
|
204
303
|
rowExpand: EventEmitter<ExpandEvent>;
|
|
304
|
+
/**
|
|
305
|
+
* Fires when a Gantt task in the timeline pane is double-clicked. The data item, associated with the clicked task,
|
|
306
|
+
* is available in the event data. Use the event handler to open a task editing dialog as necessary.
|
|
307
|
+
*/
|
|
308
|
+
taskDblClick: EventEmitter<TaskClickEvent>;
|
|
309
|
+
/**
|
|
310
|
+
* Fires when the user double clicks a cell.
|
|
311
|
+
*/
|
|
312
|
+
cellDblClick: EventEmitter<CellClickEvent>;
|
|
313
|
+
/**
|
|
314
|
+
* Fires when the user leaves an edited cell.
|
|
315
|
+
*/
|
|
316
|
+
cellClose: EventEmitter<CellCloseEvent>;
|
|
317
|
+
/**
|
|
318
|
+
* Fires when the end user clicks the `Delete` button in the task editing dialog or the task delete icon.
|
|
319
|
+
* Use the event handler to open a confirmation dialog when necessary.
|
|
320
|
+
*/
|
|
321
|
+
taskDelete: EventEmitter<any>;
|
|
205
322
|
/**
|
|
206
323
|
* Fires when an item is collapsed.
|
|
207
324
|
*/
|
|
208
325
|
rowCollapse: EventEmitter<ExpandEvent>;
|
|
326
|
+
/**
|
|
327
|
+
* Fires when the user confirms deleting a task.
|
|
328
|
+
*/
|
|
329
|
+
remove: EventEmitter<TaskEditEvent>;
|
|
330
|
+
/**
|
|
331
|
+
* Fires when the user cancels editing a task.
|
|
332
|
+
*/
|
|
333
|
+
cancel: EventEmitter<TaskEditEvent>;
|
|
334
|
+
/**
|
|
335
|
+
* Fires when the user saves an edited task.
|
|
336
|
+
*/
|
|
337
|
+
save: EventEmitter<TaskEditEvent>;
|
|
209
338
|
/**
|
|
210
339
|
* Fires when the sorting of the Gantt is changed.
|
|
211
340
|
* You have to handle the event yourself and sort the data.
|
|
@@ -254,6 +383,14 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
|
|
|
254
383
|
* Fires when the user changes the locked state of the columns from the column menu or by reordering the columns.
|
|
255
384
|
*/
|
|
256
385
|
columnLockedChange: EventEmitter<ColumnLockedChangeEvent>;
|
|
386
|
+
/**
|
|
387
|
+
* Fires when a cell is clicked.
|
|
388
|
+
*/
|
|
389
|
+
cellClick: EventEmitter<CellClickEvent>;
|
|
390
|
+
/**
|
|
391
|
+
* Fires when a task is clicked.
|
|
392
|
+
*/
|
|
393
|
+
taskClick: EventEmitter<TaskClickEvent>;
|
|
257
394
|
/**
|
|
258
395
|
* @hidden
|
|
259
396
|
*/
|
|
@@ -278,6 +415,13 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
|
|
|
278
415
|
* @hidden
|
|
279
416
|
*/
|
|
280
417
|
readonly viewService: TimelineBaseViewService;
|
|
418
|
+
/**
|
|
419
|
+
* @hidden
|
|
420
|
+
*
|
|
421
|
+
* Retrieves the `isSelected` callback if `selectable` is set to `true`
|
|
422
|
+
* Otherwise returns the default callback, which always returns `false`.
|
|
423
|
+
*/
|
|
424
|
+
readonly isTaskSelected: (dataItem: any) => boolean;
|
|
281
425
|
/**
|
|
282
426
|
* @hidden
|
|
283
427
|
*
|
|
@@ -290,12 +434,24 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
|
|
|
290
434
|
* Used by the views selector.
|
|
291
435
|
*/
|
|
292
436
|
readonly viewTypes: string[];
|
|
437
|
+
/**
|
|
438
|
+
* @hidden
|
|
439
|
+
*/
|
|
440
|
+
readonly editDialogFormGroup: FormGroup;
|
|
293
441
|
/**
|
|
294
442
|
* @hidden
|
|
295
443
|
*
|
|
296
444
|
* Used by the GanttExpandableDirective.
|
|
297
445
|
*/
|
|
298
446
|
expandStateChange: EventEmitter<any>;
|
|
447
|
+
/**
|
|
448
|
+
* @hidden
|
|
449
|
+
*/
|
|
450
|
+
showEditingDialog: boolean;
|
|
451
|
+
/**
|
|
452
|
+
* @hidden
|
|
453
|
+
*/
|
|
454
|
+
showConfirmationDialog: boolean;
|
|
299
455
|
private _columns;
|
|
300
456
|
private _data;
|
|
301
457
|
private _timelinePaneOptions;
|
|
@@ -304,8 +460,14 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
|
|
|
304
460
|
private _rowClass;
|
|
305
461
|
private _taskClass;
|
|
306
462
|
private _activeView;
|
|
463
|
+
private lastTreeListCellClick;
|
|
464
|
+
private direction;
|
|
465
|
+
private rtl;
|
|
466
|
+
private editItem;
|
|
307
467
|
private optionChangesSubscriptions;
|
|
308
|
-
|
|
468
|
+
private editServiceSubscription;
|
|
469
|
+
private localizationSubscription;
|
|
470
|
+
constructor(timelineViewService: TimelineViewService, scrollSyncService: ScrollSyncService, renderer: Renderer2, mapper: MappingService, optionChangesService: OptionChangesService, dependencyDomService: DependencyDomService, editService: EditService, localizationService: LocalizationService, hostElement: ElementRef<HTMLElement>, zone: NgZone);
|
|
309
471
|
ngOnChanges(changes: SimpleChanges): void;
|
|
310
472
|
ngAfterViewInit(): void;
|
|
311
473
|
ngAfterContentInit(): void;
|
|
@@ -340,20 +502,42 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
|
|
|
340
502
|
* @param {ColumnReorderConfig} options - Additional options.
|
|
341
503
|
*/
|
|
342
504
|
reorderColumn(source: GanttColumnBase, destIndex: number, options?: ColumnReorderConfig): void;
|
|
505
|
+
/**
|
|
506
|
+
* Updates the data of the Gantt and forces row-related callbacks to be called anew.
|
|
507
|
+
*/
|
|
508
|
+
updateView(): void;
|
|
509
|
+
/**
|
|
510
|
+
* Opens the task editing dialog.
|
|
511
|
+
*/
|
|
512
|
+
editTask(dataItem: any, formGroup: FormGroup): void;
|
|
513
|
+
/**
|
|
514
|
+
* Closes the task editing dialog.
|
|
515
|
+
*/
|
|
516
|
+
closeTaskDialog(): void;
|
|
517
|
+
/**
|
|
518
|
+
* Opens the delete task confirmation dialog.
|
|
519
|
+
*/
|
|
520
|
+
openConfirmationDialog(): void;
|
|
521
|
+
/**
|
|
522
|
+
* Opens a cell for editing.
|
|
523
|
+
*/
|
|
524
|
+
editCell(dataItem: any, column: number | string | any, formGroup?: FormGroup): void;
|
|
525
|
+
/**
|
|
526
|
+
* Closes an edited cell.
|
|
527
|
+
*/
|
|
528
|
+
closeCell(): void;
|
|
343
529
|
/**
|
|
344
530
|
* @hidden
|
|
345
531
|
*/
|
|
346
|
-
|
|
532
|
+
handleCellClose(e: CellCloseEvent): void;
|
|
347
533
|
/**
|
|
348
534
|
* @hidden
|
|
349
535
|
*/
|
|
350
|
-
|
|
536
|
+
onTreeListCollapsedChange(collapsed: boolean): void;
|
|
351
537
|
/**
|
|
352
538
|
* @hidden
|
|
353
|
-
*
|
|
354
|
-
* Used by the GanttExpandableDirective.
|
|
355
539
|
*/
|
|
356
|
-
|
|
540
|
+
onTimelineCollapsedChange(collapsed: boolean): void;
|
|
357
541
|
/**
|
|
358
542
|
* @hidden
|
|
359
543
|
*/
|
|
@@ -370,10 +554,50 @@ export declare class GanttComponent implements AfterContentInit, OnChanges, OnDe
|
|
|
370
554
|
* @hidden
|
|
371
555
|
*/
|
|
372
556
|
onTimelinePaneSizeChange(e: string): void;
|
|
557
|
+
/**
|
|
558
|
+
* @hidden
|
|
559
|
+
*/
|
|
560
|
+
handleTimelineRightClick(event: PointerEvent): void;
|
|
561
|
+
/**
|
|
562
|
+
* @hidden
|
|
563
|
+
*/
|
|
564
|
+
handleTimelineClick(event: PointerEvent): void;
|
|
565
|
+
/**
|
|
566
|
+
* @hidden
|
|
567
|
+
*/
|
|
568
|
+
handleTreeListDoubleClick(event: PointerEvent): void;
|
|
569
|
+
/**
|
|
570
|
+
* @hidden
|
|
571
|
+
*/
|
|
572
|
+
handleTreeListSelectionChange(event: TreeListSelectionChangeEvent): void;
|
|
573
|
+
/**
|
|
574
|
+
* @hidden
|
|
575
|
+
*/
|
|
576
|
+
handleTreeListCellClick(event: TreeListCellClickEvent): void;
|
|
577
|
+
/**
|
|
578
|
+
* @hidden
|
|
579
|
+
*/
|
|
580
|
+
handleDeleteConfirmation(): void;
|
|
581
|
+
/**
|
|
582
|
+
* @hidden
|
|
583
|
+
*/
|
|
584
|
+
handleTimelineMouseDown(event: MouseEvent): void;
|
|
585
|
+
/**
|
|
586
|
+
* @hidden
|
|
587
|
+
*/
|
|
588
|
+
handleTimelineDblClick(event: PointerEvent): void;
|
|
589
|
+
/**
|
|
590
|
+
* @hidden
|
|
591
|
+
*/
|
|
592
|
+
getText(token: string): string;
|
|
593
|
+
private emitTaskClick;
|
|
594
|
+
private emitSelectionChange;
|
|
373
595
|
private updateTreeListGroupClass;
|
|
374
596
|
/**
|
|
375
597
|
* Used to hide the vertical scrollbar
|
|
376
598
|
*/
|
|
377
599
|
private updateTreeListMargin;
|
|
378
600
|
private getActiveViewOptions;
|
|
601
|
+
private isSameSelection;
|
|
602
|
+
private getSelectionAction;
|
|
379
603
|
}
|