@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
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
var GanttComponent_1;
|
|
7
|
-
import { Component, forwardRef, HostBinding, Input, Output, EventEmitter, ViewChild, ContentChildren, ContentChild, QueryList, isDevMode, Renderer2 } from '@angular/core';
|
|
8
|
-
import { DataBoundTreeComponent, ExpandableTreeComponent } from '@progress/kendo-angular-treelist';
|
|
9
|
-
import {
|
|
7
|
+
import { Component, forwardRef, HostBinding, Input, Output, EventEmitter, ViewChild, ContentChildren, ContentChild, QueryList, isDevMode, Renderer2, ElementRef, NgZone } from '@angular/core';
|
|
8
|
+
import { TreeListComponent, DataBoundTreeComponent, ExpandableTreeComponent } from '@progress/kendo-angular-treelist';
|
|
9
|
+
import { Day } from '@progress/kendo-date-math';
|
|
10
10
|
import { Subscription } from 'rxjs';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
12
|
import { packageMetadata } from './package-metadata';
|
|
13
|
-
import { anyChanged } from '@progress/kendo-angular-common';
|
|
13
|
+
import { anyChanged, hasObservers } from '@progress/kendo-angular-common';
|
|
14
14
|
import { GanttColumnBase } from './columns/columns';
|
|
15
|
-
import { fetchChildren, hasChildren, rowClassCallback, taskClassCallback } from './common/default-callbacks';
|
|
15
|
+
import { fetchChildren, hasChildren, isSelected, rowClassCallback, taskClassCallback } from './common/default-callbacks';
|
|
16
16
|
import { TimelineViewService } from './timeline/timeline-view.service';
|
|
17
17
|
import { TimelineDayViewService } from './timeline/timeline-day-view.service';
|
|
18
18
|
import { TimelineWeekViewService } from './timeline/timeline-week-view.service';
|
|
@@ -21,28 +21,123 @@ import { ScrollSyncService } from './scrolling/scroll-sync.service';
|
|
|
21
21
|
import { DependencyDomService } from './dependencies/dependency-dom.service';
|
|
22
22
|
import { MappingService } from './common/mapping.service';
|
|
23
23
|
import { OptionChangesService } from './common/option-changes.service';
|
|
24
|
-
import {
|
|
24
|
+
import { EditService } from './editing/edit.service';
|
|
25
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
26
|
+
import { getClosestTaskIndex, isClearButton, isColumnGroup, isPresent, isTask, normalizeGanttData, scrollbarWidth } from './utils';
|
|
25
27
|
import { DEFAULT_TIMELINE_PANE_SETTINGS, DEFAULT_TREELIST_PANE_SETTINGS } from './models/splitter-pane-options.interface';
|
|
26
28
|
import { GanttTaskTemplateDirective } from './template-directives/task-template.directive';
|
|
27
29
|
import { GanttSummaryTaskTemplateDirective } from './template-directives/summary-task-template.directive';
|
|
28
30
|
import { GanttTaskContentTemplateDirective } from './template-directives/task-content-template.directive';
|
|
29
31
|
import { ToolbarTemplateDirective } from './toolbar/toolbar-template.directive';
|
|
30
32
|
import { ViewBase } from './timeline/view-base';
|
|
31
|
-
import {
|
|
33
|
+
import { getEditItem } from './editing/util';
|
|
32
34
|
const TREELIST_GROUP_COLUMNS_CLASS = 'k-gantt-treelist-nested-columns';
|
|
33
35
|
const DEFAULT_VIEW = 'week';
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
37
|
+
* Represents the Kendo UI Gantt component for Angular.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts-preview
|
|
41
|
+
* _@Component({
|
|
42
|
+
* selector: 'my-app',
|
|
43
|
+
* template: `
|
|
44
|
+
* <kendo-gantt
|
|
45
|
+
* [style.height.px]="500"
|
|
46
|
+
* [kendoGanttHierarchyBinding]="data"
|
|
47
|
+
* childrenField="subtasks"
|
|
48
|
+
* [dependencies]="dependencies">
|
|
49
|
+
* <kendo-gantt-column
|
|
50
|
+
* field="title"
|
|
51
|
+
* title="Task"
|
|
52
|
+
* [width]="200"
|
|
53
|
+
* [expandable]="true"></kendo-gantt-column>
|
|
54
|
+
* <kendo-gantt-column
|
|
55
|
+
* field="start"
|
|
56
|
+
* title="Start"
|
|
57
|
+
* format="dd-MMM-yyyy"
|
|
58
|
+
* [width]="120"></kendo-gantt-column>
|
|
59
|
+
* <kendo-gantt-column
|
|
60
|
+
* field="end"
|
|
61
|
+
* title="End"
|
|
62
|
+
* format="dd-MMM-yyyy"
|
|
63
|
+
* [width]="120"></kendo-gantt-column>
|
|
64
|
+
* <kendo-gantt-timeline-day-view></kendo-gantt-timeline-day-view>
|
|
65
|
+
* <kendo-gantt-timeline-week-view></kendo-gantt-timeline-week-view>
|
|
66
|
+
* <kendo-gantt-timeline-month-view></kendo-gantt-timeline-month-view>
|
|
67
|
+
* </kendo-gantt>
|
|
68
|
+
* `
|
|
69
|
+
* })
|
|
70
|
+
* class AppComponent {
|
|
71
|
+
* public data: Task[] = [{
|
|
72
|
+
* id: 7, title: 'Validation and R&D', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
73
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.45708333333333334,
|
|
74
|
+
* subtasks: [
|
|
75
|
+
* { id: 18, title: 'Project Kickoff', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
76
|
+
* end: new Date('2014-06-02T00:00:00.000Z'), completionRatio: 0.23 },
|
|
77
|
+
* { id: 11, title: 'Research', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
78
|
+
* end: new Date('2014-06-07T00:00:00.000Z'), completionRatio: 0.5766666666666667,
|
|
79
|
+
* subtasks: [
|
|
80
|
+
* { id: 19, title: 'Validation', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
81
|
+
* end: new Date('2014-06-04T00:00:00.000Z'), completionRatio: 0.25 },
|
|
82
|
+
* { id: 39, title: 'Specification', start: new Date('2014-06-04T00:00:00.000Z'),
|
|
83
|
+
* end: new Date('2014-06-07T00:00:00.000Z'), completionRatio: 0.66 }]
|
|
84
|
+
* }, { id: 13, title: 'Implementation', start: new Date('2014-06-08T00:00:00.000Z'),
|
|
85
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.77,
|
|
86
|
+
* subtasks: [
|
|
87
|
+
* { id: 24, title: 'Prototype', start: new Date('2014-06-08T00:00:00.000Z'),
|
|
88
|
+
* end: new Date('2014-06-14T00:00:00.000Z'), completionRatio: 0.77 },
|
|
89
|
+
* { id: 29, title: 'UI and Interaction', start: new Date('2014-06-14T00:00:00.000Z'),
|
|
90
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.6 }]
|
|
91
|
+
* }, { id: 17, title: 'Release', start: new Date('2014-06-19T00:00:00.000Z'),
|
|
92
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0 }]
|
|
93
|
+
* }];
|
|
94
|
+
*
|
|
95
|
+
* public dependencies: GanttDependency[] = [
|
|
96
|
+
* { id: 528, fromId: 18, toId: 19, type: DependencyType.FS },
|
|
97
|
+
* { id: 529, fromId: 19, toId: 39, type: DependencyType.FS },
|
|
98
|
+
* { id: 535, fromId: 24, toId: 29, type: DependencyType.FS },
|
|
99
|
+
* { id: 551, fromId: 13, toId: 29, type: DependencyType.FF },
|
|
100
|
+
* { id: 777, fromId: 7, toId: 11, type: DependencyType.SF },
|
|
101
|
+
* { id: 556, fromId: 39, toId: 24, type: DependencyType.FS },
|
|
102
|
+
* { id: 546, fromId: 29, toId: 17, type: DependencyType.FS },
|
|
103
|
+
* ];
|
|
104
|
+
* }
|
|
105
|
+
* ```
|
|
36
106
|
*/
|
|
37
107
|
let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
38
|
-
constructor(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService) {
|
|
108
|
+
constructor(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone) {
|
|
39
109
|
this.timelineViewService = timelineViewService;
|
|
40
110
|
this.scrollSyncService = scrollSyncService;
|
|
41
111
|
this.renderer = renderer;
|
|
42
112
|
this.mapper = mapper;
|
|
43
113
|
this.optionChangesService = optionChangesService;
|
|
44
114
|
this.dependencyDomService = dependencyDomService;
|
|
115
|
+
this.editService = editService;
|
|
116
|
+
this.localizationService = localizationService;
|
|
117
|
+
this.hostElement = hostElement;
|
|
118
|
+
this.zone = zone;
|
|
45
119
|
this.hostClasses = true;
|
|
120
|
+
/**
|
|
121
|
+
* Provides a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection))
|
|
122
|
+
*
|
|
123
|
+
* > The [`selectable`]({% slug gantt_api_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
|
|
124
|
+
*/
|
|
125
|
+
this.isSelected = isSelected;
|
|
126
|
+
/**
|
|
127
|
+
* Fires when the Gantt selection is changed through user interaction.
|
|
128
|
+
*
|
|
129
|
+
* Holds data about the affected [`items`]({% slug api_gantt_selectionchangeevent %}#toc-items) and the attempted [`action`]({% slug api_gantt_selectionchangeevent %}#toc-action):
|
|
130
|
+
* - `select` - Triggered on `click` or `ctrl + click` on deselected items.
|
|
131
|
+
* - `remove` - Triggered on `ctrl + click` on selected items.
|
|
132
|
+
*/
|
|
133
|
+
this.selectionChange = new EventEmitter();
|
|
134
|
+
/**
|
|
135
|
+
* Enables or disables the Gantt selection mechanism ([see example]({% slug selection_gantt %}#toc-custom-selection)).
|
|
136
|
+
*
|
|
137
|
+
* > When set to `true`, the [`isSelected`]({% slug gantt_api_ganttcomponent %}#toc-isselected) callback has to be provided.
|
|
138
|
+
* > When applied, the [`SelectableDirective`]({% slug api_gantt_selectabledirective %}) sets `selectable` to `true` internally.
|
|
139
|
+
*/
|
|
140
|
+
this.selectable = false;
|
|
46
141
|
/**
|
|
47
142
|
* The position of the toolbar.
|
|
48
143
|
*
|
|
@@ -129,10 +224,40 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
129
224
|
* Fires when an item is expanded.
|
|
130
225
|
*/
|
|
131
226
|
this.rowExpand = new EventEmitter();
|
|
227
|
+
/**
|
|
228
|
+
* Fires when a Gantt task in the timeline pane is double-clicked. The data item, associated with the clicked task,
|
|
229
|
+
* is available in the event data. Use the event handler to open a task editing dialog as necessary.
|
|
230
|
+
*/
|
|
231
|
+
this.taskDblClick = new EventEmitter();
|
|
232
|
+
/**
|
|
233
|
+
* Fires when the user double clicks a cell.
|
|
234
|
+
*/
|
|
235
|
+
this.cellDblClick = new EventEmitter();
|
|
236
|
+
/**
|
|
237
|
+
* Fires when the user leaves an edited cell.
|
|
238
|
+
*/
|
|
239
|
+
this.cellClose = new EventEmitter();
|
|
240
|
+
/**
|
|
241
|
+
* Fires when the end user clicks the `Delete` button in the task editing dialog or the task delete icon.
|
|
242
|
+
* Use the event handler to open a confirmation dialog when necessary.
|
|
243
|
+
*/
|
|
244
|
+
this.taskDelete = new EventEmitter();
|
|
132
245
|
/**
|
|
133
246
|
* Fires when an item is collapsed.
|
|
134
247
|
*/
|
|
135
248
|
this.rowCollapse = new EventEmitter();
|
|
249
|
+
/**
|
|
250
|
+
* Fires when the user confirms deleting a task.
|
|
251
|
+
*/
|
|
252
|
+
this.remove = new EventEmitter();
|
|
253
|
+
/**
|
|
254
|
+
* Fires when the user cancels editing a task.
|
|
255
|
+
*/
|
|
256
|
+
this.cancel = new EventEmitter();
|
|
257
|
+
/**
|
|
258
|
+
* Fires when the user saves an edited task.
|
|
259
|
+
*/
|
|
260
|
+
this.save = new EventEmitter();
|
|
136
261
|
/**
|
|
137
262
|
* Fires when the sorting of the Gantt is changed.
|
|
138
263
|
* You have to handle the event yourself and sort the data.
|
|
@@ -181,12 +306,28 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
181
306
|
* Fires when the user changes the locked state of the columns from the column menu or by reordering the columns.
|
|
182
307
|
*/
|
|
183
308
|
this.columnLockedChange = new EventEmitter();
|
|
309
|
+
/**
|
|
310
|
+
* Fires when a cell is clicked.
|
|
311
|
+
*/
|
|
312
|
+
this.cellClick = new EventEmitter();
|
|
313
|
+
/**
|
|
314
|
+
* Fires when a task is clicked.
|
|
315
|
+
*/
|
|
316
|
+
this.taskClick = new EventEmitter();
|
|
184
317
|
/**
|
|
185
318
|
* @hidden
|
|
186
319
|
*
|
|
187
320
|
* Used by the GanttExpandableDirective.
|
|
188
321
|
*/
|
|
189
322
|
this.expandStateChange = new EventEmitter();
|
|
323
|
+
/**
|
|
324
|
+
* @hidden
|
|
325
|
+
*/
|
|
326
|
+
this.showEditingDialog = false;
|
|
327
|
+
/**
|
|
328
|
+
* @hidden
|
|
329
|
+
*/
|
|
330
|
+
this.showConfirmationDialog = false;
|
|
190
331
|
this._columns = new QueryList();
|
|
191
332
|
this._data = [];
|
|
192
333
|
this._timelinePaneOptions = Object.assign({}, DEFAULT_TIMELINE_PANE_SETTINGS);
|
|
@@ -194,7 +335,9 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
194
335
|
this._rowClass = rowClassCallback;
|
|
195
336
|
this._taskClass = taskClassCallback;
|
|
196
337
|
this._activeView = DEFAULT_VIEW;
|
|
338
|
+
this.rtl = false;
|
|
197
339
|
this.optionChangesSubscriptions = new Subscription();
|
|
340
|
+
this.editServiceSubscription = new Subscription();
|
|
198
341
|
validatePackage(packageMetadata);
|
|
199
342
|
this.optionChangesSubscriptions.add(this.optionChangesService.viewChanges.subscribe(() => {
|
|
200
343
|
this.loadTimelineData();
|
|
@@ -202,6 +345,23 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
202
345
|
this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(() => {
|
|
203
346
|
this.treeList.columns.notifyOnChanges();
|
|
204
347
|
}));
|
|
348
|
+
this.editServiceSubscription.add(this.editService.showEditingDialog.subscribe(show => this.showEditingDialog = show));
|
|
349
|
+
this.editServiceSubscription.add(this.editService.showConfirmationDialog.subscribe(() => this.taskDelete.emit()));
|
|
350
|
+
this.editServiceSubscription.add(this.editService.editEvent.subscribe(args => {
|
|
351
|
+
this[args.editResultType].emit({
|
|
352
|
+
formGroup: args.formGroup,
|
|
353
|
+
item: getEditItem(args.dataItem, this.treeList.view.data, this.mapper),
|
|
354
|
+
sender: this
|
|
355
|
+
});
|
|
356
|
+
this.showConfirmationDialog = this.showEditingDialog = false;
|
|
357
|
+
this.editService.dataItem = this.editService.formGroup = null;
|
|
358
|
+
this.updateView();
|
|
359
|
+
this.dependencyDomService.notifyChanges();
|
|
360
|
+
}));
|
|
361
|
+
this.localizationSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
362
|
+
this.rtl = rtl;
|
|
363
|
+
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
364
|
+
});
|
|
205
365
|
}
|
|
206
366
|
get toolbarTemplate() {
|
|
207
367
|
if (this._customToolbarTemplate) {
|
|
@@ -212,6 +372,9 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
212
372
|
set toolbarTemplate(customToolbarTemplate) {
|
|
213
373
|
this._customToolbarTemplate = customToolbarTemplate;
|
|
214
374
|
}
|
|
375
|
+
get dir() {
|
|
376
|
+
return this.direction;
|
|
377
|
+
}
|
|
215
378
|
/**
|
|
216
379
|
* A query list of all declared columns.
|
|
217
380
|
*/
|
|
@@ -348,6 +511,15 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
348
511
|
// TODO: review if this is a performance concern?
|
|
349
512
|
return this.timelineViewService.service(this.activeView);
|
|
350
513
|
}
|
|
514
|
+
/**
|
|
515
|
+
* @hidden
|
|
516
|
+
*
|
|
517
|
+
* Retrieves the `isSelected` callback if `selectable` is set to `true`
|
|
518
|
+
* Otherwise returns the default callback, which always returns `false`.
|
|
519
|
+
*/
|
|
520
|
+
get isTaskSelected() {
|
|
521
|
+
return this.selectable ? this.isSelected : isSelected;
|
|
522
|
+
}
|
|
351
523
|
/**
|
|
352
524
|
* @hidden
|
|
353
525
|
*
|
|
@@ -366,6 +538,12 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
366
538
|
get viewTypes() {
|
|
367
539
|
return this.views.map(view => view.type);
|
|
368
540
|
}
|
|
541
|
+
/**
|
|
542
|
+
* @hidden
|
|
543
|
+
*/
|
|
544
|
+
get editDialogFormGroup() {
|
|
545
|
+
return this.editService.formGroup;
|
|
546
|
+
}
|
|
369
547
|
ngOnChanges(changes) {
|
|
370
548
|
if (anyChanged(['data', 'activeView', 'workWeekStart', 'workWeekEnd', 'workDayStart', 'workDayEnd'], changes)) {
|
|
371
549
|
this.loadTimelineData();
|
|
@@ -385,6 +563,10 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
385
563
|
}
|
|
386
564
|
ngOnDestroy() {
|
|
387
565
|
this.optionChangesSubscriptions.unsubscribe();
|
|
566
|
+
this.editServiceSubscription.unsubscribe();
|
|
567
|
+
if (this.localizationSubscription) {
|
|
568
|
+
this.localizationSubscription.unsubscribe();
|
|
569
|
+
}
|
|
388
570
|
}
|
|
389
571
|
/**
|
|
390
572
|
* Applies the minimum possible width for the specified column,
|
|
@@ -432,6 +614,55 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
432
614
|
this.treeList.reorderColumn(source, destIndex, options);
|
|
433
615
|
}
|
|
434
616
|
}
|
|
617
|
+
/**
|
|
618
|
+
* Updates the data of the Gantt and forces row-related callbacks to be called anew.
|
|
619
|
+
*/
|
|
620
|
+
updateView() {
|
|
621
|
+
if (isPresent(this.treeList)) {
|
|
622
|
+
this.treeList.updateView();
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Opens the task editing dialog.
|
|
627
|
+
*/
|
|
628
|
+
editTask(dataItem, formGroup) {
|
|
629
|
+
if (!this.showEditingDialog) {
|
|
630
|
+
this.editService.createEditDialog(dataItem, formGroup);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Closes the task editing dialog.
|
|
635
|
+
*/
|
|
636
|
+
closeTaskDialog() {
|
|
637
|
+
if (this.showEditingDialog) {
|
|
638
|
+
this.editService.closeEditDialog();
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Opens the delete task confirmation dialog.
|
|
643
|
+
*/
|
|
644
|
+
openConfirmationDialog() {
|
|
645
|
+
this.showConfirmationDialog = true;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Opens a cell for editing.
|
|
649
|
+
*/
|
|
650
|
+
editCell(dataItem, column, formGroup) {
|
|
651
|
+
this.treeList.editCell(dataItem, column, formGroup);
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* Closes an edited cell.
|
|
655
|
+
*/
|
|
656
|
+
closeCell() {
|
|
657
|
+
this.treeList.closeCell();
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* @hidden
|
|
661
|
+
*/
|
|
662
|
+
handleCellClose(e) {
|
|
663
|
+
this.cellClose.emit(Object.assign(e, { item: this.editItem, sender: this }));
|
|
664
|
+
this.dependencyDomService.notifyChanges();
|
|
665
|
+
}
|
|
435
666
|
/**
|
|
436
667
|
* @hidden
|
|
437
668
|
*/
|
|
@@ -451,16 +682,6 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
451
682
|
this.dependencyDomService.notifyChanges();
|
|
452
683
|
}
|
|
453
684
|
}
|
|
454
|
-
/**
|
|
455
|
-
* @hidden
|
|
456
|
-
*
|
|
457
|
-
* Used by the GanttExpandableDirective.
|
|
458
|
-
*/
|
|
459
|
-
updateView() {
|
|
460
|
-
if (isPresent(this.treeList)) {
|
|
461
|
-
this.treeList.updateView();
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
685
|
/**
|
|
465
686
|
* @hidden
|
|
466
687
|
*/
|
|
@@ -495,6 +716,156 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
495
716
|
this._timelinePaneOptions.size = e;
|
|
496
717
|
this.timelinePaneSizeChange.emit(e);
|
|
497
718
|
}
|
|
719
|
+
/**
|
|
720
|
+
* @hidden
|
|
721
|
+
*/
|
|
722
|
+
handleTimelineRightClick(event) {
|
|
723
|
+
const target = event.target;
|
|
724
|
+
const gantt = this.hostElement.nativeElement;
|
|
725
|
+
if (!isTask(target, gantt) || isClearButton(target, gantt)) {
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
if (hasObservers(this.taskClick)) {
|
|
729
|
+
const taskIndex = getClosestTaskIndex(target, gantt);
|
|
730
|
+
const task = this.renderedTreeListItems[taskIndex];
|
|
731
|
+
this.zone.run(() => this.emitTaskClick(event, task, taskIndex));
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* @hidden
|
|
736
|
+
*/
|
|
737
|
+
handleTimelineClick(event) {
|
|
738
|
+
const target = event.target;
|
|
739
|
+
const gantt = this.hostElement.nativeElement;
|
|
740
|
+
if (!isTask(target, gantt) || isClearButton(target, gantt)) {
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
const taskIndex = getClosestTaskIndex(target, gantt);
|
|
744
|
+
const task = this.renderedTreeListItems[taskIndex];
|
|
745
|
+
const selectionAction = this.getSelectionAction(event, task);
|
|
746
|
+
if ((hasObservers(this.selectionChange) && !this.isSameSelection(selectionAction, task)) ||
|
|
747
|
+
hasObservers(this.taskClick)) {
|
|
748
|
+
this.zone.run(() => {
|
|
749
|
+
this.emitSelectionChange(task, selectionAction);
|
|
750
|
+
this.emitTaskClick(event, task, taskIndex);
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* @hidden
|
|
756
|
+
*/
|
|
757
|
+
handleTreeListDoubleClick(event) {
|
|
758
|
+
if (!isPresent(this.lastTreeListCellClick) || event.target !== this.lastTreeListCellClick.originalEvent.target) {
|
|
759
|
+
return;
|
|
760
|
+
}
|
|
761
|
+
this.editItem = getEditItem(this.lastTreeListCellClick.dataItem, this.treeList.view.data, this.mapper);
|
|
762
|
+
if (hasObservers(this.cellDblClick)) {
|
|
763
|
+
this.zone.run(() => {
|
|
764
|
+
this.cellDblClick.emit({
|
|
765
|
+
column: this.lastTreeListCellClick.column,
|
|
766
|
+
columnIndex: this.lastTreeListCellClick.columnIndex,
|
|
767
|
+
dataItem: this.lastTreeListCellClick.dataItem,
|
|
768
|
+
isEdited: this.lastTreeListCellClick.isEdited,
|
|
769
|
+
originalEvent: this.lastTreeListCellClick.originalEvent,
|
|
770
|
+
rowIndex: this.lastTreeListCellClick.rowIndex,
|
|
771
|
+
type: 'dblclick',
|
|
772
|
+
sender: this
|
|
773
|
+
});
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* @hidden
|
|
779
|
+
*/
|
|
780
|
+
handleTreeListSelectionChange(event) {
|
|
781
|
+
// prevent selection change from right-click
|
|
782
|
+
if (isPresent(this.lastTreeListCellClick) && this.lastTreeListCellClick.type === 'contextmenu') {
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
const task = event.items.map(item => item.dataItem)[0]; // single selection only currently available
|
|
786
|
+
const action = event.action;
|
|
787
|
+
this.emitSelectionChange(task, action);
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* @hidden
|
|
791
|
+
*/
|
|
792
|
+
handleTreeListCellClick(event) {
|
|
793
|
+
this.lastTreeListCellClick = event;
|
|
794
|
+
this.cellClick.emit({
|
|
795
|
+
column: event.column,
|
|
796
|
+
columnIndex: event.columnIndex,
|
|
797
|
+
dataItem: event.dataItem,
|
|
798
|
+
isEdited: event.isEdited,
|
|
799
|
+
originalEvent: event.originalEvent,
|
|
800
|
+
rowIndex: event.rowIndex,
|
|
801
|
+
type: event.type,
|
|
802
|
+
sender: this
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* @hidden
|
|
807
|
+
*/
|
|
808
|
+
handleDeleteConfirmation() {
|
|
809
|
+
this.editService.triggerEditEvent('remove');
|
|
810
|
+
}
|
|
811
|
+
/**
|
|
812
|
+
* @hidden
|
|
813
|
+
*/
|
|
814
|
+
handleTimelineMouseDown(event) {
|
|
815
|
+
const target = event.target;
|
|
816
|
+
const gantt = this.hostElement.nativeElement;
|
|
817
|
+
if (!isTask(target, gantt) || isClearButton(target, gantt)) {
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
event.preventDefault();
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* @hidden
|
|
824
|
+
*/
|
|
825
|
+
handleTimelineDblClick(event) {
|
|
826
|
+
const target = event.target;
|
|
827
|
+
const gantt = this.hostElement.nativeElement;
|
|
828
|
+
if (!isTask(target, gantt) || isClearButton(target, gantt)) {
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
831
|
+
if (hasObservers(this.taskDblClick)) {
|
|
832
|
+
const taskIndex = getClosestTaskIndex(target, gantt);
|
|
833
|
+
const task = this.renderedTreeListItems[taskIndex];
|
|
834
|
+
this.zone.run(() => this.taskDblClick.emit({
|
|
835
|
+
dataItem: task,
|
|
836
|
+
originalEvent: event,
|
|
837
|
+
sender: this,
|
|
838
|
+
rowIndex: taskIndex,
|
|
839
|
+
type: 'dblclick'
|
|
840
|
+
}));
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* @hidden
|
|
845
|
+
*/
|
|
846
|
+
getText(token) {
|
|
847
|
+
return this.localizationService.get(token);
|
|
848
|
+
}
|
|
849
|
+
emitTaskClick(event, dataItem, itemIndex) {
|
|
850
|
+
this.taskClick.emit({
|
|
851
|
+
originalEvent: event,
|
|
852
|
+
dataItem: dataItem,
|
|
853
|
+
rowIndex: itemIndex,
|
|
854
|
+
type: event.type,
|
|
855
|
+
sender: this
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
emitSelectionChange(dataItem, action) {
|
|
859
|
+
if (this.isSameSelection(action, dataItem)) {
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
this.selectionChange.emit({
|
|
863
|
+
action: action,
|
|
864
|
+
items: [dataItem],
|
|
865
|
+
sender: this
|
|
866
|
+
});
|
|
867
|
+
this.updateView();
|
|
868
|
+
}
|
|
498
869
|
updateTreeListGroupClass(columns = this.columns) {
|
|
499
870
|
if (!isPresent(this.treeList)) {
|
|
500
871
|
return;
|
|
@@ -521,6 +892,13 @@ let GanttComponent = GanttComponent_1 = class GanttComponent {
|
|
|
521
892
|
}
|
|
522
893
|
return this.views.find(view => view.type === this.activeView);
|
|
523
894
|
}
|
|
895
|
+
isSameSelection(action, dataItem) {
|
|
896
|
+
return action === 'select' && this.isSelected(dataItem);
|
|
897
|
+
}
|
|
898
|
+
getSelectionAction({ ctrlKey, metaKey }, dataItem) {
|
|
899
|
+
const shouldToggleSelection = ctrlKey || metaKey;
|
|
900
|
+
return (shouldToggleSelection && this.isSelected(dataItem)) ? 'remove' : 'select';
|
|
901
|
+
}
|
|
524
902
|
};
|
|
525
903
|
tslib_1.__decorate([
|
|
526
904
|
ViewChild(TreeListComponent, { static: true }),
|
|
@@ -546,6 +924,11 @@ tslib_1.__decorate([
|
|
|
546
924
|
HostBinding('class.k-gantt'),
|
|
547
925
|
tslib_1.__metadata("design:type", Boolean)
|
|
548
926
|
], GanttComponent.prototype, "hostClasses", void 0);
|
|
927
|
+
tslib_1.__decorate([
|
|
928
|
+
HostBinding('attr.dir'),
|
|
929
|
+
tslib_1.__metadata("design:type", String),
|
|
930
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
931
|
+
], GanttComponent.prototype, "dir", null);
|
|
549
932
|
tslib_1.__decorate([
|
|
550
933
|
ContentChildren(GanttColumnBase),
|
|
551
934
|
tslib_1.__metadata("design:type", QueryList),
|
|
@@ -575,6 +958,18 @@ tslib_1.__decorate([
|
|
|
575
958
|
tslib_1.__metadata("design:type", Array),
|
|
576
959
|
tslib_1.__metadata("design:paramtypes", [Array])
|
|
577
960
|
], GanttComponent.prototype, "data", null);
|
|
961
|
+
tslib_1.__decorate([
|
|
962
|
+
Input(),
|
|
963
|
+
tslib_1.__metadata("design:type", Function)
|
|
964
|
+
], GanttComponent.prototype, "isSelected", void 0);
|
|
965
|
+
tslib_1.__decorate([
|
|
966
|
+
Output(),
|
|
967
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
968
|
+
], GanttComponent.prototype, "selectionChange", void 0);
|
|
969
|
+
tslib_1.__decorate([
|
|
970
|
+
Input(),
|
|
971
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
972
|
+
], GanttComponent.prototype, "selectable", void 0);
|
|
578
973
|
tslib_1.__decorate([
|
|
579
974
|
Input(),
|
|
580
975
|
tslib_1.__metadata("design:type", String)
|
|
@@ -667,10 +1062,38 @@ tslib_1.__decorate([
|
|
|
667
1062
|
Output(),
|
|
668
1063
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
669
1064
|
], GanttComponent.prototype, "rowExpand", void 0);
|
|
1065
|
+
tslib_1.__decorate([
|
|
1066
|
+
Output(),
|
|
1067
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1068
|
+
], GanttComponent.prototype, "taskDblClick", void 0);
|
|
1069
|
+
tslib_1.__decorate([
|
|
1070
|
+
Output(),
|
|
1071
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1072
|
+
], GanttComponent.prototype, "cellDblClick", void 0);
|
|
1073
|
+
tslib_1.__decorate([
|
|
1074
|
+
Output(),
|
|
1075
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1076
|
+
], GanttComponent.prototype, "cellClose", void 0);
|
|
1077
|
+
tslib_1.__decorate([
|
|
1078
|
+
Output(),
|
|
1079
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1080
|
+
], GanttComponent.prototype, "taskDelete", void 0);
|
|
670
1081
|
tslib_1.__decorate([
|
|
671
1082
|
Output(),
|
|
672
1083
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
673
1084
|
], GanttComponent.prototype, "rowCollapse", void 0);
|
|
1085
|
+
tslib_1.__decorate([
|
|
1086
|
+
Output(),
|
|
1087
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1088
|
+
], GanttComponent.prototype, "remove", void 0);
|
|
1089
|
+
tslib_1.__decorate([
|
|
1090
|
+
Output(),
|
|
1091
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1092
|
+
], GanttComponent.prototype, "cancel", void 0);
|
|
1093
|
+
tslib_1.__decorate([
|
|
1094
|
+
Output(),
|
|
1095
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1096
|
+
], GanttComponent.prototype, "save", void 0);
|
|
674
1097
|
tslib_1.__decorate([
|
|
675
1098
|
Output(),
|
|
676
1099
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
@@ -715,10 +1138,20 @@ tslib_1.__decorate([
|
|
|
715
1138
|
Output(),
|
|
716
1139
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
717
1140
|
], GanttComponent.prototype, "columnLockedChange", void 0);
|
|
1141
|
+
tslib_1.__decorate([
|
|
1142
|
+
Output(),
|
|
1143
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1144
|
+
], GanttComponent.prototype, "cellClick", void 0);
|
|
1145
|
+
tslib_1.__decorate([
|
|
1146
|
+
Output(),
|
|
1147
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
1148
|
+
], GanttComponent.prototype, "taskClick", void 0);
|
|
718
1149
|
GanttComponent = GanttComponent_1 = tslib_1.__decorate([
|
|
719
1150
|
Component({
|
|
720
1151
|
selector: 'kendo-gantt',
|
|
1152
|
+
exportAs: 'kendoGantt',
|
|
721
1153
|
providers: [
|
|
1154
|
+
LocalizationService,
|
|
722
1155
|
{
|
|
723
1156
|
provide: DataBoundTreeComponent,
|
|
724
1157
|
useExisting: forwardRef(() => GanttComponent_1)
|
|
@@ -734,9 +1167,181 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
|
|
|
734
1167
|
ScrollSyncService,
|
|
735
1168
|
DependencyDomService,
|
|
736
1169
|
MappingService,
|
|
737
|
-
OptionChangesService
|
|
1170
|
+
OptionChangesService,
|
|
1171
|
+
EditService
|
|
738
1172
|
],
|
|
739
1173
|
template: `
|
|
1174
|
+
<ng-container kendoGanttLocalizedMessages
|
|
1175
|
+
i18n-taskDeleteLabel="kendo.gantt.taskDeleteLabel|The label of the task delete icon"
|
|
1176
|
+
taskDeleteLabel="Delete"
|
|
1177
|
+
|
|
1178
|
+
i18n-taskEditingDialogTitle="kendo.gantt.taskEditingDialogTitle|The title of the task editing dialog"
|
|
1179
|
+
taskEditingDialogTitle="Editing Task"
|
|
1180
|
+
|
|
1181
|
+
i18n-taskEditingDialogCloseTitle="kendo.gantt.taskEditingDialogCloseTitle|The title of the task editing dialog close button"
|
|
1182
|
+
taskEditingDialogCloseTitle="Close"
|
|
1183
|
+
|
|
1184
|
+
i18n-confirmationDialogCloseTitle="kendo.gantt.confirmationDialogCloseTitle|The title of the confirmation dialog close button"
|
|
1185
|
+
confirmationDialogCloseTitle="Close"
|
|
1186
|
+
|
|
1187
|
+
i18n-confirmationDialogTitle="kendo.gantt.confirmationDialogTitle|The title of the delete task confirmation dialog"
|
|
1188
|
+
confirmationDialogTitle="Delete Task"
|
|
1189
|
+
|
|
1190
|
+
i18n-confirmationDialogContent="kendo.gantt.confirmationDialogContent|The content of the delete task confirmation dialog"
|
|
1191
|
+
confirmationDialogContent="Are you sure you want to delete this task?"
|
|
1192
|
+
|
|
1193
|
+
i18n-deleteButtonText="kendo.gantt.deleteButtonText|The text of the task editing dialog 'Delete' button"
|
|
1194
|
+
deleteButtonText="Delete"
|
|
1195
|
+
|
|
1196
|
+
i18n-cancelButtonText="kendo.gantt.cancelButtonText|The text of the task editing dialog 'Cancel' button"
|
|
1197
|
+
cancelButtonText="Cancel"
|
|
1198
|
+
|
|
1199
|
+
i18n-saveButtonText="kendo.gantt.saveButtonText|The text of the task editing dialog 'Save' button"
|
|
1200
|
+
saveButtonText="Save"
|
|
1201
|
+
|
|
1202
|
+
i18n-titleFieldInputLabel="kendo.gantt.titleFieldInputLabel|The label of the 'title' field input in editing mode"
|
|
1203
|
+
titleFieldInputLabel="Title"
|
|
1204
|
+
|
|
1205
|
+
i18n-startFieldInputLabel="kendo.gantt.startFieldInputLabel|The label of the 'start' field input in editing mode"
|
|
1206
|
+
startFieldInputLabel="Start"
|
|
1207
|
+
|
|
1208
|
+
i18n-endFieldInputLabel="kendo.gantt.endFieldInputLabel|The label of the 'end' field input in editing mode"
|
|
1209
|
+
endFieldInputLabel="End"
|
|
1210
|
+
|
|
1211
|
+
i18n-completionRatioFieldInputLabel="kendo.gantt.completionRatioFieldInputLabel|The label of the 'completionRatio' field input in editing mode"
|
|
1212
|
+
completionRatioFieldInputLabel="Progress"
|
|
1213
|
+
|
|
1214
|
+
i18n-dayViewText="kendo.gantt.dayViewText|The text of the day view in the ViewSelector component"
|
|
1215
|
+
dayViewText="Day"
|
|
1216
|
+
|
|
1217
|
+
i18n-weekViewText="kendo.gantt.weekViewText|The text of the week view in the ViewSelector component"
|
|
1218
|
+
weekViewText="Week"
|
|
1219
|
+
|
|
1220
|
+
i18n-monthViewText="kendo.gantt.monthViewText|The text of the month view in the ViewSelector component"
|
|
1221
|
+
monthViewText="Month"
|
|
1222
|
+
|
|
1223
|
+
i18n-yearViewText-disabled="kendo.gantt.yearViewText|The text of the year view in the ViewSelector component"
|
|
1224
|
+
yearViewText="Year"
|
|
1225
|
+
|
|
1226
|
+
i18n-noRecords="kendo.gantt.noRecords|The label visible in the TreeList when there are no records"
|
|
1227
|
+
noRecords="No records available."
|
|
1228
|
+
|
|
1229
|
+
i18n-filter="kendo.gantt.filter|The label of the filter cell or icon"
|
|
1230
|
+
filter="Filter"
|
|
1231
|
+
|
|
1232
|
+
i18n-filterEqOperator="kendo.gantt.filterEqOperator|The text of the equal filter operator"
|
|
1233
|
+
filterEqOperator="Is equal to"
|
|
1234
|
+
|
|
1235
|
+
i18n-filterNotEqOperator="kendo.gantt.filterNotEqOperator|The text of the not equal filter operator"
|
|
1236
|
+
filterNotEqOperator="Is not equal to"
|
|
1237
|
+
|
|
1238
|
+
i18n-filterIsNullOperator="kendo.gantt.filterIsNullOperator|The text of the is null filter operator"
|
|
1239
|
+
filterIsNullOperator="Is null"
|
|
1240
|
+
|
|
1241
|
+
i18n-filterIsNotNullOperator="kendo.gantt.filterIsNotNullOperator|The text of the is not null filter operator"
|
|
1242
|
+
filterIsNotNullOperator="Is not null"
|
|
1243
|
+
|
|
1244
|
+
i18n-filterIsEmptyOperator="kendo.gantt.filterIsEmptyOperator|The text of the is empty filter operator"
|
|
1245
|
+
filterIsEmptyOperator="Is empty"
|
|
1246
|
+
|
|
1247
|
+
i18n-filterIsNotEmptyOperator="kendo.gantt.filterIsNotEmptyOperator|The text of the is not empty filter operator"
|
|
1248
|
+
filterIsNotEmptyOperator="Is not empty"
|
|
1249
|
+
|
|
1250
|
+
i18n-filterStartsWithOperator="kendo.gantt.filterStartsWithOperator|The text of the starts with filter operator"
|
|
1251
|
+
filterStartsWithOperator="Starts with"
|
|
1252
|
+
|
|
1253
|
+
i18n-filterContainsOperator="kendo.gantt.filterContainsOperator|The text of the contains filter operator"
|
|
1254
|
+
filterContainsOperator="Contains"
|
|
1255
|
+
|
|
1256
|
+
i18n-filterNotContainsOperator="kendo.gantt.filterNotContainsOperator|The text of the does not contain filter operator"
|
|
1257
|
+
filterNotContainsOperator="Does not contain"
|
|
1258
|
+
|
|
1259
|
+
i18n-filterEndsWithOperator="kendo.gantt.filterEndsWithOperator|The text of the ends with filter operator"
|
|
1260
|
+
filterEndsWithOperator="Ends with"
|
|
1261
|
+
|
|
1262
|
+
i18n-filterGteOperator="kendo.gantt.filterGteOperator|The text of the greater than or equal filter operator"
|
|
1263
|
+
filterGteOperator="Is greater than or equal to"
|
|
1264
|
+
|
|
1265
|
+
i18n-filterGtOperator="kendo.gantt.filterGtOperator|The text of the greater than filter operator"
|
|
1266
|
+
filterGtOperator="Is greater than"
|
|
1267
|
+
|
|
1268
|
+
i18n-filterLteOperator="kendo.gantt.filterLteOperator|The text of the less than or equal filter operator"
|
|
1269
|
+
filterLteOperator="Is less than or equal to"
|
|
1270
|
+
|
|
1271
|
+
i18n-filterLtOperator="kendo.gantt.filterLtOperator|The text of the less than filter operator"
|
|
1272
|
+
filterLtOperator="Is less than"
|
|
1273
|
+
|
|
1274
|
+
i18n-filterIsTrue="kendo.gantt.filterIsTrue|The text of the IsTrue boolean filter option"
|
|
1275
|
+
filterIsTrue="Is True"
|
|
1276
|
+
|
|
1277
|
+
i18n-filterIsFalse="kendo.gantt.filterIsFalse|The text of the IsFalse boolean filter option"
|
|
1278
|
+
filterIsFalse="Is False"
|
|
1279
|
+
|
|
1280
|
+
i18n-filterBooleanAll="kendo.gantt.filterBooleanAll|The text of the (All) boolean filter option"
|
|
1281
|
+
filterBooleanAll="(All)"
|
|
1282
|
+
|
|
1283
|
+
i18n-filterAfterOrEqualOperator="kendo.gantt.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
|
|
1284
|
+
filterAfterOrEqualOperator="Is after or equal to"
|
|
1285
|
+
|
|
1286
|
+
i18n-filterAfterOperator="kendo.gantt.filterAfterOperator|The text of the after date filter operator"
|
|
1287
|
+
filterAfterOperator="Is after"
|
|
1288
|
+
|
|
1289
|
+
i18n-filterBeforeOperator="kendo.gantt.filterBeforeOperator|The text of the before date filter operator"
|
|
1290
|
+
filterBeforeOperator="Is before"
|
|
1291
|
+
|
|
1292
|
+
i18n-filterBeforeOrEqualOperator="kendo.gantt.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
|
|
1293
|
+
filterBeforeOrEqualOperator="Is before or equal to"
|
|
1294
|
+
|
|
1295
|
+
i18n-filterFilterButton="kendo.gantt.filterFilterButton|The text of the filter button"
|
|
1296
|
+
filterFilterButton="Filter"
|
|
1297
|
+
|
|
1298
|
+
i18n-filterClearButton="kendo.gantt.filterClearButton|The text of the clear filter button"
|
|
1299
|
+
filterClearButton="Clear"
|
|
1300
|
+
|
|
1301
|
+
i18n-filterAndLogic="kendo.gantt.filterAndLogic|The text of the And filter logic"
|
|
1302
|
+
filterAndLogic="And"
|
|
1303
|
+
|
|
1304
|
+
i18n-filterOrLogic="kendo.gantt.filterOrLogic|The text of the Or filter logic"
|
|
1305
|
+
filterOrLogic="Or"
|
|
1306
|
+
|
|
1307
|
+
i18n-loading="kendo.gantt.loading|The loading text"
|
|
1308
|
+
loading="Loading"
|
|
1309
|
+
|
|
1310
|
+
i18n-columnMenu="kendo.gantt.columnMenu|The title of the column menu icon"
|
|
1311
|
+
columnMenu="Column Menu"
|
|
1312
|
+
|
|
1313
|
+
i18n-columns="kendo.gantt.columns|The text shown in the column menu for the columns item"
|
|
1314
|
+
columns="Columns"
|
|
1315
|
+
|
|
1316
|
+
i18n-lock-disabled="kendo.gantt.lock|The text shown in the column menu for the lock item"
|
|
1317
|
+
lock-disabled="Lock"
|
|
1318
|
+
|
|
1319
|
+
i18n-unlock-disabled="kendo.gantt.unlock|The text shown in the column menu for the unlock item"
|
|
1320
|
+
unlock-disabled="Unlock"
|
|
1321
|
+
|
|
1322
|
+
i18n-sortable="kendo.gantt.sortable|The label of the sort icon"
|
|
1323
|
+
sortable="Sortable"
|
|
1324
|
+
|
|
1325
|
+
i18n-sortAscending="kendo.gantt.sortAscending|The text shown in the column menu for the sort ascending item"
|
|
1326
|
+
sortAscending="Sort Ascending"
|
|
1327
|
+
|
|
1328
|
+
i18n-sortDescending="kendo.gantt.sortDescending|The text shown in the column menu for the sort descending item"
|
|
1329
|
+
sortDescending="Sort Descending"
|
|
1330
|
+
|
|
1331
|
+
i18n-sortedAscending="kendo.gantt.sortedAscending|The status announcement when a column is sorted ascending"
|
|
1332
|
+
sortedAscending="Sorted Ascending"
|
|
1333
|
+
|
|
1334
|
+
i18n-sortedDescending="kendo.gantt.sortedDescending|The status announcement when a column is sorted descending"
|
|
1335
|
+
sortedDescending="Sorted Descending"
|
|
1336
|
+
|
|
1337
|
+
i18n-sortedDefault="kendo.gantt.sortedDefault|The status announcement when a column is no longer sorted"
|
|
1338
|
+
sortedDefault="Not Sorted"
|
|
1339
|
+
|
|
1340
|
+
i18n-columnsApply="kendo.gantt.columnsApply|The text shown in the column menu or column chooser for the columns apply button"
|
|
1341
|
+
columnsApply="Apply"
|
|
1342
|
+
|
|
1343
|
+
i18n-columnsReset="kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
|
|
1344
|
+
columnsReset="Reset"></ng-container>
|
|
740
1345
|
<kendo-gantt-toolbar
|
|
741
1346
|
*ngIf="showToolbar('top')"
|
|
742
1347
|
class="k-gantt-header k-toolbar k-gantt-toolbar"
|
|
@@ -761,6 +1366,8 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
|
|
|
761
1366
|
[reorderable]="columnsReorderable"
|
|
762
1367
|
[resizable]="columnsResizable"
|
|
763
1368
|
[rowClass]="rowClass"
|
|
1369
|
+
[isSelected]="isSelected"
|
|
1370
|
+
[selectable]="selectable"
|
|
764
1371
|
[sortable]="sortable"
|
|
765
1372
|
[sort]="sort"
|
|
766
1373
|
[filterable]="filterMenu"
|
|
@@ -778,7 +1385,15 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
|
|
|
778
1385
|
(columnResize)="columnResize.emit($event)"
|
|
779
1386
|
(columnVisibilityChange)="handleColumnVisibilityChange($event)"
|
|
780
1387
|
(columnLockedChange)="columnLockedChange.emit($event)"
|
|
1388
|
+
(selectionChange)="handleTreeListSelectionChange($event)"
|
|
1389
|
+
(cellClick)="handleTreeListCellClick($event)"
|
|
1390
|
+
(cellClose)="handleCellClose($event)"
|
|
1391
|
+
[kendoEventsOutsideAngular]="{
|
|
1392
|
+
dblclick: handleTreeListDoubleClick
|
|
1393
|
+
}"
|
|
1394
|
+
[scope]="this"
|
|
781
1395
|
>
|
|
1396
|
+
<kendo-treelist-messages [kendoGanttTreeListMessages]="localizationService"></kendo-treelist-messages>
|
|
782
1397
|
</kendo-treelist>
|
|
783
1398
|
</kendo-splitter-pane>
|
|
784
1399
|
<kendo-splitter-pane
|
|
@@ -804,6 +1419,14 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
|
|
|
804
1419
|
[taskClass]="taskClass"
|
|
805
1420
|
[dependencies]="dependencies"
|
|
806
1421
|
[hasChildren]="hasChildren"
|
|
1422
|
+
[isTaskSelected]="isTaskSelected"
|
|
1423
|
+
[kendoEventsOutsideAngular]="{
|
|
1424
|
+
click: handleTimelineClick,
|
|
1425
|
+
contextmenu: handleTimelineRightClick,
|
|
1426
|
+
dblclick: handleTimelineDblClick,
|
|
1427
|
+
mousedown: handleTimelineMouseDown
|
|
1428
|
+
}"
|
|
1429
|
+
[scope]="this"
|
|
807
1430
|
></kendo-gantt-timeline>
|
|
808
1431
|
</kendo-splitter-pane>
|
|
809
1432
|
</kendo-splitter>
|
|
@@ -812,6 +1435,20 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
|
|
|
812
1435
|
*ngIf="showToolbar('bottom')"
|
|
813
1436
|
class="k-gantt-footer k-toolbar k-gantt-toolbar"
|
|
814
1437
|
position="bottom"></kendo-gantt-toolbar>
|
|
1438
|
+
<kendo-gantt-edit-dialog *ngIf="showEditingDialog" [formGroup]="editDialogFormGroup"></kendo-gantt-edit-dialog>
|
|
1439
|
+
<kendo-dialog
|
|
1440
|
+
*ngIf="showConfirmationDialog"
|
|
1441
|
+
[width]="575"
|
|
1442
|
+
[height]="170"
|
|
1443
|
+
[title]="getText('confirmationDialogTitle')"
|
|
1444
|
+
(close)="showConfirmationDialog = false;">
|
|
1445
|
+
<span>{{getText('confirmationDialogContent')}}</span>
|
|
1446
|
+
<kendo-dialog-actions layout="normal">
|
|
1447
|
+
<kendo-treelist-spacer></kendo-treelist-spacer>
|
|
1448
|
+
<button kendoButton [primary]="true" (click)="handleDeleteConfirmation()">{{ getText('deleteButtonText') }}</button>
|
|
1449
|
+
<button kendoButton (click)="showConfirmationDialog = false;">{{ getText('cancelButtonText') }}</button>
|
|
1450
|
+
</kendo-dialog-actions>
|
|
1451
|
+
</kendo-dialog>
|
|
815
1452
|
`
|
|
816
1453
|
}),
|
|
817
1454
|
tslib_1.__metadata("design:paramtypes", [TimelineViewService,
|
|
@@ -819,6 +1456,10 @@ GanttComponent = GanttComponent_1 = tslib_1.__decorate([
|
|
|
819
1456
|
Renderer2,
|
|
820
1457
|
MappingService,
|
|
821
1458
|
OptionChangesService,
|
|
822
|
-
DependencyDomService
|
|
1459
|
+
DependencyDomService,
|
|
1460
|
+
EditService,
|
|
1461
|
+
LocalizationService,
|
|
1462
|
+
ElementRef,
|
|
1463
|
+
NgZone])
|
|
823
1464
|
], GanttComponent);
|
|
824
1465
|
export { GanttComponent };
|