@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
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
var tslib_1 = require("tslib");
|
|
8
8
|
var core_1 = require("@angular/core");
|
|
9
9
|
var kendo_angular_treelist_1 = require("@progress/kendo-angular-treelist");
|
|
10
|
-
var
|
|
10
|
+
var kendo_date_math_1 = require("@progress/kendo-date-math");
|
|
11
11
|
var rxjs_1 = require("rxjs");
|
|
12
12
|
var kendo_licensing_1 = require("@progress/kendo-licensing");
|
|
13
13
|
var package_metadata_1 = require("./package-metadata");
|
|
@@ -22,6 +22,8 @@ var scroll_sync_service_1 = require("./scrolling/scroll-sync.service");
|
|
|
22
22
|
var dependency_dom_service_1 = require("./dependencies/dependency-dom.service");
|
|
23
23
|
var mapping_service_1 = require("./common/mapping.service");
|
|
24
24
|
var option_changes_service_1 = require("./common/option-changes.service");
|
|
25
|
+
var edit_service_1 = require("./editing/edit.service");
|
|
26
|
+
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
25
27
|
var utils_1 = require("./utils");
|
|
26
28
|
var splitter_pane_options_interface_1 = require("./models/splitter-pane-options.interface");
|
|
27
29
|
var task_template_directive_1 = require("./template-directives/task-template.directive");
|
|
@@ -29,14 +31,82 @@ var summary_task_template_directive_1 = require("./template-directives/summary-t
|
|
|
29
31
|
var task_content_template_directive_1 = require("./template-directives/task-content-template.directive");
|
|
30
32
|
var toolbar_template_directive_1 = require("./toolbar/toolbar-template.directive");
|
|
31
33
|
var view_base_1 = require("./timeline/view-base");
|
|
32
|
-
var
|
|
34
|
+
var util_1 = require("./editing/util");
|
|
33
35
|
var TREELIST_GROUP_COLUMNS_CLASS = 'k-gantt-treelist-nested-columns';
|
|
34
36
|
var DEFAULT_VIEW = 'week';
|
|
35
37
|
/**
|
|
36
|
-
*
|
|
38
|
+
* Represents the Kendo UI Gantt component for Angular.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts-preview
|
|
42
|
+
* _@Component({
|
|
43
|
+
* selector: 'my-app',
|
|
44
|
+
* template: `
|
|
45
|
+
* <kendo-gantt
|
|
46
|
+
* [style.height.px]="500"
|
|
47
|
+
* [kendoGanttHierarchyBinding]="data"
|
|
48
|
+
* childrenField="subtasks"
|
|
49
|
+
* [dependencies]="dependencies">
|
|
50
|
+
* <kendo-gantt-column
|
|
51
|
+
* field="title"
|
|
52
|
+
* title="Task"
|
|
53
|
+
* [width]="200"
|
|
54
|
+
* [expandable]="true"></kendo-gantt-column>
|
|
55
|
+
* <kendo-gantt-column
|
|
56
|
+
* field="start"
|
|
57
|
+
* title="Start"
|
|
58
|
+
* format="dd-MMM-yyyy"
|
|
59
|
+
* [width]="120"></kendo-gantt-column>
|
|
60
|
+
* <kendo-gantt-column
|
|
61
|
+
* field="end"
|
|
62
|
+
* title="End"
|
|
63
|
+
* format="dd-MMM-yyyy"
|
|
64
|
+
* [width]="120"></kendo-gantt-column>
|
|
65
|
+
* <kendo-gantt-timeline-day-view></kendo-gantt-timeline-day-view>
|
|
66
|
+
* <kendo-gantt-timeline-week-view></kendo-gantt-timeline-week-view>
|
|
67
|
+
* <kendo-gantt-timeline-month-view></kendo-gantt-timeline-month-view>
|
|
68
|
+
* </kendo-gantt>
|
|
69
|
+
* `
|
|
70
|
+
* })
|
|
71
|
+
* class AppComponent {
|
|
72
|
+
* public data: Task[] = [{
|
|
73
|
+
* id: 7, title: 'Validation and R&D', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
74
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.45708333333333334,
|
|
75
|
+
* subtasks: [
|
|
76
|
+
* { id: 18, title: 'Project Kickoff', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
77
|
+
* end: new Date('2014-06-02T00:00:00.000Z'), completionRatio: 0.23 },
|
|
78
|
+
* { id: 11, title: 'Research', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
79
|
+
* end: new Date('2014-06-07T00:00:00.000Z'), completionRatio: 0.5766666666666667,
|
|
80
|
+
* subtasks: [
|
|
81
|
+
* { id: 19, title: 'Validation', start: new Date('2014-06-02T00:00:00.000Z'),
|
|
82
|
+
* end: new Date('2014-06-04T00:00:00.000Z'), completionRatio: 0.25 },
|
|
83
|
+
* { id: 39, title: 'Specification', start: new Date('2014-06-04T00:00:00.000Z'),
|
|
84
|
+
* end: new Date('2014-06-07T00:00:00.000Z'), completionRatio: 0.66 }]
|
|
85
|
+
* }, { id: 13, title: 'Implementation', start: new Date('2014-06-08T00:00:00.000Z'),
|
|
86
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.77,
|
|
87
|
+
* subtasks: [
|
|
88
|
+
* { id: 24, title: 'Prototype', start: new Date('2014-06-08T00:00:00.000Z'),
|
|
89
|
+
* end: new Date('2014-06-14T00:00:00.000Z'), completionRatio: 0.77 },
|
|
90
|
+
* { id: 29, title: 'UI and Interaction', start: new Date('2014-06-14T00:00:00.000Z'),
|
|
91
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.6 }]
|
|
92
|
+
* }, { id: 17, title: 'Release', start: new Date('2014-06-19T00:00:00.000Z'),
|
|
93
|
+
* end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0 }]
|
|
94
|
+
* }];
|
|
95
|
+
*
|
|
96
|
+
* public dependencies: GanttDependency[] = [
|
|
97
|
+
* { id: 528, fromId: 18, toId: 19, type: DependencyType.FS },
|
|
98
|
+
* { id: 529, fromId: 19, toId: 39, type: DependencyType.FS },
|
|
99
|
+
* { id: 535, fromId: 24, toId: 29, type: DependencyType.FS },
|
|
100
|
+
* { id: 551, fromId: 13, toId: 29, type: DependencyType.FF },
|
|
101
|
+
* { id: 777, fromId: 7, toId: 11, type: DependencyType.SF },
|
|
102
|
+
* { id: 556, fromId: 39, toId: 24, type: DependencyType.FS },
|
|
103
|
+
* { id: 546, fromId: 29, toId: 17, type: DependencyType.FS },
|
|
104
|
+
* ];
|
|
105
|
+
* }
|
|
106
|
+
* ```
|
|
37
107
|
*/
|
|
38
108
|
var GanttComponent = /** @class */ (function () {
|
|
39
|
-
function GanttComponent(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService) {
|
|
109
|
+
function GanttComponent(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone) {
|
|
40
110
|
var _this = this;
|
|
41
111
|
this.timelineViewService = timelineViewService;
|
|
42
112
|
this.scrollSyncService = scrollSyncService;
|
|
@@ -44,7 +114,32 @@ var GanttComponent = /** @class */ (function () {
|
|
|
44
114
|
this.mapper = mapper;
|
|
45
115
|
this.optionChangesService = optionChangesService;
|
|
46
116
|
this.dependencyDomService = dependencyDomService;
|
|
117
|
+
this.editService = editService;
|
|
118
|
+
this.localizationService = localizationService;
|
|
119
|
+
this.hostElement = hostElement;
|
|
120
|
+
this.zone = zone;
|
|
47
121
|
this.hostClasses = true;
|
|
122
|
+
/**
|
|
123
|
+
* Provides a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection))
|
|
124
|
+
*
|
|
125
|
+
* > The [`selectable`]({% slug gantt_api_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
|
|
126
|
+
*/
|
|
127
|
+
this.isSelected = default_callbacks_1.isSelected;
|
|
128
|
+
/**
|
|
129
|
+
* Fires when the Gantt selection is changed through user interaction.
|
|
130
|
+
*
|
|
131
|
+
* Holds data about the affected [`items`]({% slug api_gantt_selectionchangeevent %}#toc-items) and the attempted [`action`]({% slug api_gantt_selectionchangeevent %}#toc-action):
|
|
132
|
+
* - `select` - Triggered on `click` or `ctrl + click` on deselected items.
|
|
133
|
+
* - `remove` - Triggered on `ctrl + click` on selected items.
|
|
134
|
+
*/
|
|
135
|
+
this.selectionChange = new core_1.EventEmitter();
|
|
136
|
+
/**
|
|
137
|
+
* Enables or disables the Gantt selection mechanism ([see example]({% slug selection_gantt %}#toc-custom-selection)).
|
|
138
|
+
*
|
|
139
|
+
* > When set to `true`, the [`isSelected`]({% slug gantt_api_ganttcomponent %}#toc-isselected) callback has to be provided.
|
|
140
|
+
* > When applied, the [`SelectableDirective`]({% slug api_gantt_selectabledirective %}) sets `selectable` to `true` internally.
|
|
141
|
+
*/
|
|
142
|
+
this.selectable = false;
|
|
48
143
|
/**
|
|
49
144
|
* The position of the toolbar.
|
|
50
145
|
*
|
|
@@ -131,10 +226,40 @@ var GanttComponent = /** @class */ (function () {
|
|
|
131
226
|
* Fires when an item is expanded.
|
|
132
227
|
*/
|
|
133
228
|
this.rowExpand = new core_1.EventEmitter();
|
|
229
|
+
/**
|
|
230
|
+
* Fires when a Gantt task in the timeline pane is double-clicked. The data item, associated with the clicked task,
|
|
231
|
+
* is available in the event data. Use the event handler to open a task editing dialog as necessary.
|
|
232
|
+
*/
|
|
233
|
+
this.taskDblClick = new core_1.EventEmitter();
|
|
234
|
+
/**
|
|
235
|
+
* Fires when the user double clicks a cell.
|
|
236
|
+
*/
|
|
237
|
+
this.cellDblClick = new core_1.EventEmitter();
|
|
238
|
+
/**
|
|
239
|
+
* Fires when the user leaves an edited cell.
|
|
240
|
+
*/
|
|
241
|
+
this.cellClose = new core_1.EventEmitter();
|
|
242
|
+
/**
|
|
243
|
+
* Fires when the end user clicks the `Delete` button in the task editing dialog or the task delete icon.
|
|
244
|
+
* Use the event handler to open a confirmation dialog when necessary.
|
|
245
|
+
*/
|
|
246
|
+
this.taskDelete = new core_1.EventEmitter();
|
|
134
247
|
/**
|
|
135
248
|
* Fires when an item is collapsed.
|
|
136
249
|
*/
|
|
137
250
|
this.rowCollapse = new core_1.EventEmitter();
|
|
251
|
+
/**
|
|
252
|
+
* Fires when the user confirms deleting a task.
|
|
253
|
+
*/
|
|
254
|
+
this.remove = new core_1.EventEmitter();
|
|
255
|
+
/**
|
|
256
|
+
* Fires when the user cancels editing a task.
|
|
257
|
+
*/
|
|
258
|
+
this.cancel = new core_1.EventEmitter();
|
|
259
|
+
/**
|
|
260
|
+
* Fires when the user saves an edited task.
|
|
261
|
+
*/
|
|
262
|
+
this.save = new core_1.EventEmitter();
|
|
138
263
|
/**
|
|
139
264
|
* Fires when the sorting of the Gantt is changed.
|
|
140
265
|
* You have to handle the event yourself and sort the data.
|
|
@@ -183,12 +308,28 @@ var GanttComponent = /** @class */ (function () {
|
|
|
183
308
|
* Fires when the user changes the locked state of the columns from the column menu or by reordering the columns.
|
|
184
309
|
*/
|
|
185
310
|
this.columnLockedChange = new core_1.EventEmitter();
|
|
311
|
+
/**
|
|
312
|
+
* Fires when a cell is clicked.
|
|
313
|
+
*/
|
|
314
|
+
this.cellClick = new core_1.EventEmitter();
|
|
315
|
+
/**
|
|
316
|
+
* Fires when a task is clicked.
|
|
317
|
+
*/
|
|
318
|
+
this.taskClick = new core_1.EventEmitter();
|
|
186
319
|
/**
|
|
187
320
|
* @hidden
|
|
188
321
|
*
|
|
189
322
|
* Used by the GanttExpandableDirective.
|
|
190
323
|
*/
|
|
191
324
|
this.expandStateChange = new core_1.EventEmitter();
|
|
325
|
+
/**
|
|
326
|
+
* @hidden
|
|
327
|
+
*/
|
|
328
|
+
this.showEditingDialog = false;
|
|
329
|
+
/**
|
|
330
|
+
* @hidden
|
|
331
|
+
*/
|
|
332
|
+
this.showConfirmationDialog = false;
|
|
192
333
|
this._columns = new core_1.QueryList();
|
|
193
334
|
this._data = [];
|
|
194
335
|
this._timelinePaneOptions = tslib_1.__assign({}, splitter_pane_options_interface_1.DEFAULT_TIMELINE_PANE_SETTINGS);
|
|
@@ -196,7 +337,9 @@ var GanttComponent = /** @class */ (function () {
|
|
|
196
337
|
this._rowClass = default_callbacks_1.rowClassCallback;
|
|
197
338
|
this._taskClass = default_callbacks_1.taskClassCallback;
|
|
198
339
|
this._activeView = DEFAULT_VIEW;
|
|
340
|
+
this.rtl = false;
|
|
199
341
|
this.optionChangesSubscriptions = new rxjs_1.Subscription();
|
|
342
|
+
this.editServiceSubscription = new rxjs_1.Subscription();
|
|
200
343
|
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
201
344
|
this.optionChangesSubscriptions.add(this.optionChangesService.viewChanges.subscribe(function () {
|
|
202
345
|
_this.loadTimelineData();
|
|
@@ -204,6 +347,24 @@ var GanttComponent = /** @class */ (function () {
|
|
|
204
347
|
this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(function () {
|
|
205
348
|
_this.treeList.columns.notifyOnChanges();
|
|
206
349
|
}));
|
|
350
|
+
this.editServiceSubscription.add(this.editService.showEditingDialog.subscribe(function (show) { return _this.showEditingDialog = show; }));
|
|
351
|
+
this.editServiceSubscription.add(this.editService.showConfirmationDialog.subscribe(function () { return _this.taskDelete.emit(); }));
|
|
352
|
+
this.editServiceSubscription.add(this.editService.editEvent.subscribe(function (args) {
|
|
353
|
+
_this[args.editResultType].emit({
|
|
354
|
+
formGroup: args.formGroup,
|
|
355
|
+
item: util_1.getEditItem(args.dataItem, _this.treeList.view.data, _this.mapper),
|
|
356
|
+
sender: _this
|
|
357
|
+
});
|
|
358
|
+
_this.showConfirmationDialog = _this.showEditingDialog = false;
|
|
359
|
+
_this.editService.dataItem = _this.editService.formGroup = null;
|
|
360
|
+
_this.updateView();
|
|
361
|
+
_this.dependencyDomService.notifyChanges();
|
|
362
|
+
}));
|
|
363
|
+
this.localizationSubscription = this.localizationService.changes.subscribe(function (_a) {
|
|
364
|
+
var rtl = _a.rtl;
|
|
365
|
+
_this.rtl = rtl;
|
|
366
|
+
_this.direction = _this.rtl ? 'rtl' : 'ltr';
|
|
367
|
+
});
|
|
207
368
|
}
|
|
208
369
|
GanttComponent_1 = GanttComponent;
|
|
209
370
|
Object.defineProperty(GanttComponent.prototype, "toolbarTemplate", {
|
|
@@ -219,6 +380,13 @@ var GanttComponent = /** @class */ (function () {
|
|
|
219
380
|
enumerable: true,
|
|
220
381
|
configurable: true
|
|
221
382
|
});
|
|
383
|
+
Object.defineProperty(GanttComponent.prototype, "dir", {
|
|
384
|
+
get: function () {
|
|
385
|
+
return this.direction;
|
|
386
|
+
},
|
|
387
|
+
enumerable: true,
|
|
388
|
+
configurable: true
|
|
389
|
+
});
|
|
222
390
|
Object.defineProperty(GanttComponent.prototype, "columns", {
|
|
223
391
|
get: function () {
|
|
224
392
|
return this._columns;
|
|
@@ -408,6 +576,19 @@ var GanttComponent = /** @class */ (function () {
|
|
|
408
576
|
enumerable: true,
|
|
409
577
|
configurable: true
|
|
410
578
|
});
|
|
579
|
+
Object.defineProperty(GanttComponent.prototype, "isTaskSelected", {
|
|
580
|
+
/**
|
|
581
|
+
* @hidden
|
|
582
|
+
*
|
|
583
|
+
* Retrieves the `isSelected` callback if `selectable` is set to `true`
|
|
584
|
+
* Otherwise returns the default callback, which always returns `false`.
|
|
585
|
+
*/
|
|
586
|
+
get: function () {
|
|
587
|
+
return this.selectable ? this.isSelected : default_callbacks_1.isSelected;
|
|
588
|
+
},
|
|
589
|
+
enumerable: true,
|
|
590
|
+
configurable: true
|
|
591
|
+
});
|
|
411
592
|
Object.defineProperty(GanttComponent.prototype, "idGetter", {
|
|
412
593
|
/**
|
|
413
594
|
* @hidden
|
|
@@ -434,6 +615,16 @@ var GanttComponent = /** @class */ (function () {
|
|
|
434
615
|
enumerable: true,
|
|
435
616
|
configurable: true
|
|
436
617
|
});
|
|
618
|
+
Object.defineProperty(GanttComponent.prototype, "editDialogFormGroup", {
|
|
619
|
+
/**
|
|
620
|
+
* @hidden
|
|
621
|
+
*/
|
|
622
|
+
get: function () {
|
|
623
|
+
return this.editService.formGroup;
|
|
624
|
+
},
|
|
625
|
+
enumerable: true,
|
|
626
|
+
configurable: true
|
|
627
|
+
});
|
|
437
628
|
GanttComponent.prototype.ngOnChanges = function (changes) {
|
|
438
629
|
if (kendo_angular_common_1.anyChanged(['data', 'activeView', 'workWeekStart', 'workWeekEnd', 'workDayStart', 'workDayEnd'], changes)) {
|
|
439
630
|
this.loadTimelineData();
|
|
@@ -453,6 +644,10 @@ var GanttComponent = /** @class */ (function () {
|
|
|
453
644
|
};
|
|
454
645
|
GanttComponent.prototype.ngOnDestroy = function () {
|
|
455
646
|
this.optionChangesSubscriptions.unsubscribe();
|
|
647
|
+
this.editServiceSubscription.unsubscribe();
|
|
648
|
+
if (this.localizationSubscription) {
|
|
649
|
+
this.localizationSubscription.unsubscribe();
|
|
650
|
+
}
|
|
456
651
|
};
|
|
457
652
|
/**
|
|
458
653
|
* Applies the minimum possible width for the specified column,
|
|
@@ -502,6 +697,55 @@ var GanttComponent = /** @class */ (function () {
|
|
|
502
697
|
this.treeList.reorderColumn(source, destIndex, options);
|
|
503
698
|
}
|
|
504
699
|
};
|
|
700
|
+
/**
|
|
701
|
+
* Updates the data of the Gantt and forces row-related callbacks to be called anew.
|
|
702
|
+
*/
|
|
703
|
+
GanttComponent.prototype.updateView = function () {
|
|
704
|
+
if (utils_1.isPresent(this.treeList)) {
|
|
705
|
+
this.treeList.updateView();
|
|
706
|
+
}
|
|
707
|
+
};
|
|
708
|
+
/**
|
|
709
|
+
* Opens the task editing dialog.
|
|
710
|
+
*/
|
|
711
|
+
GanttComponent.prototype.editTask = function (dataItem, formGroup) {
|
|
712
|
+
if (!this.showEditingDialog) {
|
|
713
|
+
this.editService.createEditDialog(dataItem, formGroup);
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
/**
|
|
717
|
+
* Closes the task editing dialog.
|
|
718
|
+
*/
|
|
719
|
+
GanttComponent.prototype.closeTaskDialog = function () {
|
|
720
|
+
if (this.showEditingDialog) {
|
|
721
|
+
this.editService.closeEditDialog();
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
/**
|
|
725
|
+
* Opens the delete task confirmation dialog.
|
|
726
|
+
*/
|
|
727
|
+
GanttComponent.prototype.openConfirmationDialog = function () {
|
|
728
|
+
this.showConfirmationDialog = true;
|
|
729
|
+
};
|
|
730
|
+
/**
|
|
731
|
+
* Opens a cell for editing.
|
|
732
|
+
*/
|
|
733
|
+
GanttComponent.prototype.editCell = function (dataItem, column, formGroup) {
|
|
734
|
+
this.treeList.editCell(dataItem, column, formGroup);
|
|
735
|
+
};
|
|
736
|
+
/**
|
|
737
|
+
* Closes an edited cell.
|
|
738
|
+
*/
|
|
739
|
+
GanttComponent.prototype.closeCell = function () {
|
|
740
|
+
this.treeList.closeCell();
|
|
741
|
+
};
|
|
742
|
+
/**
|
|
743
|
+
* @hidden
|
|
744
|
+
*/
|
|
745
|
+
GanttComponent.prototype.handleCellClose = function (e) {
|
|
746
|
+
this.cellClose.emit(Object.assign(e, { item: this.editItem, sender: this }));
|
|
747
|
+
this.dependencyDomService.notifyChanges();
|
|
748
|
+
};
|
|
505
749
|
/**
|
|
506
750
|
* @hidden
|
|
507
751
|
*/
|
|
@@ -521,16 +765,6 @@ var GanttComponent = /** @class */ (function () {
|
|
|
521
765
|
this.dependencyDomService.notifyChanges();
|
|
522
766
|
}
|
|
523
767
|
};
|
|
524
|
-
/**
|
|
525
|
-
* @hidden
|
|
526
|
-
*
|
|
527
|
-
* Used by the GanttExpandableDirective.
|
|
528
|
-
*/
|
|
529
|
-
GanttComponent.prototype.updateView = function () {
|
|
530
|
-
if (utils_1.isPresent(this.treeList)) {
|
|
531
|
-
this.treeList.updateView();
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
768
|
/**
|
|
535
769
|
* @hidden
|
|
536
770
|
*/
|
|
@@ -565,6 +799,160 @@ var GanttComponent = /** @class */ (function () {
|
|
|
565
799
|
this._timelinePaneOptions.size = e;
|
|
566
800
|
this.timelinePaneSizeChange.emit(e);
|
|
567
801
|
};
|
|
802
|
+
/**
|
|
803
|
+
* @hidden
|
|
804
|
+
*/
|
|
805
|
+
GanttComponent.prototype.handleTimelineRightClick = function (event) {
|
|
806
|
+
var _this = this;
|
|
807
|
+
var target = event.target;
|
|
808
|
+
var gantt = this.hostElement.nativeElement;
|
|
809
|
+
if (!utils_1.isTask(target, gantt) || utils_1.isClearButton(target, gantt)) {
|
|
810
|
+
return;
|
|
811
|
+
}
|
|
812
|
+
if (kendo_angular_common_1.hasObservers(this.taskClick)) {
|
|
813
|
+
var taskIndex_1 = utils_1.getClosestTaskIndex(target, gantt);
|
|
814
|
+
var task_1 = this.renderedTreeListItems[taskIndex_1];
|
|
815
|
+
this.zone.run(function () { return _this.emitTaskClick(event, task_1, taskIndex_1); });
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
/**
|
|
819
|
+
* @hidden
|
|
820
|
+
*/
|
|
821
|
+
GanttComponent.prototype.handleTimelineClick = function (event) {
|
|
822
|
+
var _this = this;
|
|
823
|
+
var target = event.target;
|
|
824
|
+
var gantt = this.hostElement.nativeElement;
|
|
825
|
+
if (!utils_1.isTask(target, gantt) || utils_1.isClearButton(target, gantt)) {
|
|
826
|
+
return;
|
|
827
|
+
}
|
|
828
|
+
var taskIndex = utils_1.getClosestTaskIndex(target, gantt);
|
|
829
|
+
var task = this.renderedTreeListItems[taskIndex];
|
|
830
|
+
var selectionAction = this.getSelectionAction(event, task);
|
|
831
|
+
if ((kendo_angular_common_1.hasObservers(this.selectionChange) && !this.isSameSelection(selectionAction, task)) ||
|
|
832
|
+
kendo_angular_common_1.hasObservers(this.taskClick)) {
|
|
833
|
+
this.zone.run(function () {
|
|
834
|
+
_this.emitSelectionChange(task, selectionAction);
|
|
835
|
+
_this.emitTaskClick(event, task, taskIndex);
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
};
|
|
839
|
+
/**
|
|
840
|
+
* @hidden
|
|
841
|
+
*/
|
|
842
|
+
GanttComponent.prototype.handleTreeListDoubleClick = function (event) {
|
|
843
|
+
var _this = this;
|
|
844
|
+
if (!utils_1.isPresent(this.lastTreeListCellClick) || event.target !== this.lastTreeListCellClick.originalEvent.target) {
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
this.editItem = util_1.getEditItem(this.lastTreeListCellClick.dataItem, this.treeList.view.data, this.mapper);
|
|
848
|
+
if (kendo_angular_common_1.hasObservers(this.cellDblClick)) {
|
|
849
|
+
this.zone.run(function () {
|
|
850
|
+
_this.cellDblClick.emit({
|
|
851
|
+
column: _this.lastTreeListCellClick.column,
|
|
852
|
+
columnIndex: _this.lastTreeListCellClick.columnIndex,
|
|
853
|
+
dataItem: _this.lastTreeListCellClick.dataItem,
|
|
854
|
+
isEdited: _this.lastTreeListCellClick.isEdited,
|
|
855
|
+
originalEvent: _this.lastTreeListCellClick.originalEvent,
|
|
856
|
+
rowIndex: _this.lastTreeListCellClick.rowIndex,
|
|
857
|
+
type: 'dblclick',
|
|
858
|
+
sender: _this
|
|
859
|
+
});
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
};
|
|
863
|
+
/**
|
|
864
|
+
* @hidden
|
|
865
|
+
*/
|
|
866
|
+
GanttComponent.prototype.handleTreeListSelectionChange = function (event) {
|
|
867
|
+
// prevent selection change from right-click
|
|
868
|
+
if (utils_1.isPresent(this.lastTreeListCellClick) && this.lastTreeListCellClick.type === 'contextmenu') {
|
|
869
|
+
return;
|
|
870
|
+
}
|
|
871
|
+
var task = event.items.map(function (item) { return item.dataItem; })[0]; // single selection only currently available
|
|
872
|
+
var action = event.action;
|
|
873
|
+
this.emitSelectionChange(task, action);
|
|
874
|
+
};
|
|
875
|
+
/**
|
|
876
|
+
* @hidden
|
|
877
|
+
*/
|
|
878
|
+
GanttComponent.prototype.handleTreeListCellClick = function (event) {
|
|
879
|
+
this.lastTreeListCellClick = event;
|
|
880
|
+
this.cellClick.emit({
|
|
881
|
+
column: event.column,
|
|
882
|
+
columnIndex: event.columnIndex,
|
|
883
|
+
dataItem: event.dataItem,
|
|
884
|
+
isEdited: event.isEdited,
|
|
885
|
+
originalEvent: event.originalEvent,
|
|
886
|
+
rowIndex: event.rowIndex,
|
|
887
|
+
type: event.type,
|
|
888
|
+
sender: this
|
|
889
|
+
});
|
|
890
|
+
};
|
|
891
|
+
/**
|
|
892
|
+
* @hidden
|
|
893
|
+
*/
|
|
894
|
+
GanttComponent.prototype.handleDeleteConfirmation = function () {
|
|
895
|
+
this.editService.triggerEditEvent('remove');
|
|
896
|
+
};
|
|
897
|
+
/**
|
|
898
|
+
* @hidden
|
|
899
|
+
*/
|
|
900
|
+
GanttComponent.prototype.handleTimelineMouseDown = function (event) {
|
|
901
|
+
var target = event.target;
|
|
902
|
+
var gantt = this.hostElement.nativeElement;
|
|
903
|
+
if (!utils_1.isTask(target, gantt) || utils_1.isClearButton(target, gantt)) {
|
|
904
|
+
return;
|
|
905
|
+
}
|
|
906
|
+
event.preventDefault();
|
|
907
|
+
};
|
|
908
|
+
/**
|
|
909
|
+
* @hidden
|
|
910
|
+
*/
|
|
911
|
+
GanttComponent.prototype.handleTimelineDblClick = function (event) {
|
|
912
|
+
var _this = this;
|
|
913
|
+
var target = event.target;
|
|
914
|
+
var gantt = this.hostElement.nativeElement;
|
|
915
|
+
if (!utils_1.isTask(target, gantt) || utils_1.isClearButton(target, gantt)) {
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
if (kendo_angular_common_1.hasObservers(this.taskDblClick)) {
|
|
919
|
+
var taskIndex_2 = utils_1.getClosestTaskIndex(target, gantt);
|
|
920
|
+
var task_2 = this.renderedTreeListItems[taskIndex_2];
|
|
921
|
+
this.zone.run(function () { return _this.taskDblClick.emit({
|
|
922
|
+
dataItem: task_2,
|
|
923
|
+
originalEvent: event,
|
|
924
|
+
sender: _this,
|
|
925
|
+
rowIndex: taskIndex_2,
|
|
926
|
+
type: 'dblclick'
|
|
927
|
+
}); });
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
/**
|
|
931
|
+
* @hidden
|
|
932
|
+
*/
|
|
933
|
+
GanttComponent.prototype.getText = function (token) {
|
|
934
|
+
return this.localizationService.get(token);
|
|
935
|
+
};
|
|
936
|
+
GanttComponent.prototype.emitTaskClick = function (event, dataItem, itemIndex) {
|
|
937
|
+
this.taskClick.emit({
|
|
938
|
+
originalEvent: event,
|
|
939
|
+
dataItem: dataItem,
|
|
940
|
+
rowIndex: itemIndex,
|
|
941
|
+
type: event.type,
|
|
942
|
+
sender: this
|
|
943
|
+
});
|
|
944
|
+
};
|
|
945
|
+
GanttComponent.prototype.emitSelectionChange = function (dataItem, action) {
|
|
946
|
+
if (this.isSameSelection(action, dataItem)) {
|
|
947
|
+
return;
|
|
948
|
+
}
|
|
949
|
+
this.selectionChange.emit({
|
|
950
|
+
action: action,
|
|
951
|
+
items: [dataItem],
|
|
952
|
+
sender: this
|
|
953
|
+
});
|
|
954
|
+
this.updateView();
|
|
955
|
+
};
|
|
568
956
|
GanttComponent.prototype.updateTreeListGroupClass = function (columns) {
|
|
569
957
|
if (columns === void 0) { columns = this.columns; }
|
|
570
958
|
if (!utils_1.isPresent(this.treeList)) {
|
|
@@ -595,10 +983,18 @@ var GanttComponent = /** @class */ (function () {
|
|
|
595
983
|
}
|
|
596
984
|
return this.views.find(function (view) { return view.type === _this.activeView; });
|
|
597
985
|
};
|
|
986
|
+
GanttComponent.prototype.isSameSelection = function (action, dataItem) {
|
|
987
|
+
return action === 'select' && this.isSelected(dataItem);
|
|
988
|
+
};
|
|
989
|
+
GanttComponent.prototype.getSelectionAction = function (_a, dataItem) {
|
|
990
|
+
var ctrlKey = _a.ctrlKey, metaKey = _a.metaKey;
|
|
991
|
+
var shouldToggleSelection = ctrlKey || metaKey;
|
|
992
|
+
return (shouldToggleSelection && this.isSelected(dataItem)) ? 'remove' : 'select';
|
|
993
|
+
};
|
|
598
994
|
var GanttComponent_1;
|
|
599
995
|
tslib_1.__decorate([
|
|
600
|
-
core_1.ViewChild(
|
|
601
|
-
tslib_1.__metadata("design:type",
|
|
996
|
+
core_1.ViewChild(kendo_angular_treelist_1.TreeListComponent, { static: true }),
|
|
997
|
+
tslib_1.__metadata("design:type", kendo_angular_treelist_1.TreeListComponent)
|
|
602
998
|
], GanttComponent.prototype, "treeList", void 0);
|
|
603
999
|
tslib_1.__decorate([
|
|
604
1000
|
core_1.ContentChild(task_content_template_directive_1.GanttTaskContentTemplateDirective, { static: true }),
|
|
@@ -620,6 +1016,11 @@ var GanttComponent = /** @class */ (function () {
|
|
|
620
1016
|
core_1.HostBinding('class.k-gantt'),
|
|
621
1017
|
tslib_1.__metadata("design:type", Boolean)
|
|
622
1018
|
], GanttComponent.prototype, "hostClasses", void 0);
|
|
1019
|
+
tslib_1.__decorate([
|
|
1020
|
+
core_1.HostBinding('attr.dir'),
|
|
1021
|
+
tslib_1.__metadata("design:type", String),
|
|
1022
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1023
|
+
], GanttComponent.prototype, "dir", null);
|
|
623
1024
|
tslib_1.__decorate([
|
|
624
1025
|
core_1.ContentChildren(columns_1.GanttColumnBase),
|
|
625
1026
|
tslib_1.__metadata("design:type", core_1.QueryList),
|
|
@@ -649,6 +1050,18 @@ var GanttComponent = /** @class */ (function () {
|
|
|
649
1050
|
tslib_1.__metadata("design:type", Array),
|
|
650
1051
|
tslib_1.__metadata("design:paramtypes", [Array])
|
|
651
1052
|
], GanttComponent.prototype, "data", null);
|
|
1053
|
+
tslib_1.__decorate([
|
|
1054
|
+
core_1.Input(),
|
|
1055
|
+
tslib_1.__metadata("design:type", Function)
|
|
1056
|
+
], GanttComponent.prototype, "isSelected", void 0);
|
|
1057
|
+
tslib_1.__decorate([
|
|
1058
|
+
core_1.Output(),
|
|
1059
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
1060
|
+
], GanttComponent.prototype, "selectionChange", void 0);
|
|
1061
|
+
tslib_1.__decorate([
|
|
1062
|
+
core_1.Input(),
|
|
1063
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
1064
|
+
], GanttComponent.prototype, "selectable", void 0);
|
|
652
1065
|
tslib_1.__decorate([
|
|
653
1066
|
core_1.Input(),
|
|
654
1067
|
tslib_1.__metadata("design:type", String)
|
|
@@ -741,10 +1154,38 @@ var GanttComponent = /** @class */ (function () {
|
|
|
741
1154
|
core_1.Output(),
|
|
742
1155
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
743
1156
|
], GanttComponent.prototype, "rowExpand", void 0);
|
|
1157
|
+
tslib_1.__decorate([
|
|
1158
|
+
core_1.Output(),
|
|
1159
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
1160
|
+
], GanttComponent.prototype, "taskDblClick", void 0);
|
|
1161
|
+
tslib_1.__decorate([
|
|
1162
|
+
core_1.Output(),
|
|
1163
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
1164
|
+
], GanttComponent.prototype, "cellDblClick", void 0);
|
|
1165
|
+
tslib_1.__decorate([
|
|
1166
|
+
core_1.Output(),
|
|
1167
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
1168
|
+
], GanttComponent.prototype, "cellClose", void 0);
|
|
1169
|
+
tslib_1.__decorate([
|
|
1170
|
+
core_1.Output(),
|
|
1171
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
1172
|
+
], GanttComponent.prototype, "taskDelete", void 0);
|
|
744
1173
|
tslib_1.__decorate([
|
|
745
1174
|
core_1.Output(),
|
|
746
1175
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
747
1176
|
], GanttComponent.prototype, "rowCollapse", void 0);
|
|
1177
|
+
tslib_1.__decorate([
|
|
1178
|
+
core_1.Output(),
|
|
1179
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
1180
|
+
], GanttComponent.prototype, "remove", void 0);
|
|
1181
|
+
tslib_1.__decorate([
|
|
1182
|
+
core_1.Output(),
|
|
1183
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
1184
|
+
], GanttComponent.prototype, "cancel", void 0);
|
|
1185
|
+
tslib_1.__decorate([
|
|
1186
|
+
core_1.Output(),
|
|
1187
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
1188
|
+
], GanttComponent.prototype, "save", void 0);
|
|
748
1189
|
tslib_1.__decorate([
|
|
749
1190
|
core_1.Output(),
|
|
750
1191
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
@@ -789,10 +1230,20 @@ var GanttComponent = /** @class */ (function () {
|
|
|
789
1230
|
core_1.Output(),
|
|
790
1231
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
791
1232
|
], GanttComponent.prototype, "columnLockedChange", void 0);
|
|
1233
|
+
tslib_1.__decorate([
|
|
1234
|
+
core_1.Output(),
|
|
1235
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
1236
|
+
], GanttComponent.prototype, "cellClick", void 0);
|
|
1237
|
+
tslib_1.__decorate([
|
|
1238
|
+
core_1.Output(),
|
|
1239
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
1240
|
+
], GanttComponent.prototype, "taskClick", void 0);
|
|
792
1241
|
GanttComponent = GanttComponent_1 = tslib_1.__decorate([
|
|
793
1242
|
core_1.Component({
|
|
794
1243
|
selector: 'kendo-gantt',
|
|
1244
|
+
exportAs: 'kendoGantt',
|
|
795
1245
|
providers: [
|
|
1246
|
+
kendo_angular_l10n_1.LocalizationService,
|
|
796
1247
|
{
|
|
797
1248
|
provide: kendo_angular_treelist_1.DataBoundTreeComponent,
|
|
798
1249
|
useExisting: core_1.forwardRef(function () { return GanttComponent_1; })
|
|
@@ -808,16 +1259,21 @@ var GanttComponent = /** @class */ (function () {
|
|
|
808
1259
|
scroll_sync_service_1.ScrollSyncService,
|
|
809
1260
|
dependency_dom_service_1.DependencyDomService,
|
|
810
1261
|
mapping_service_1.MappingService,
|
|
811
|
-
option_changes_service_1.OptionChangesService
|
|
1262
|
+
option_changes_service_1.OptionChangesService,
|
|
1263
|
+
edit_service_1.EditService
|
|
812
1264
|
],
|
|
813
|
-
template: "\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('top')\"\n class=\"k-gantt-header k-toolbar k-gantt-toolbar\"\n position=\"top\"></kendo-gantt-toolbar>\n <div class=\"k-gantt-content\">\n <kendo-splitter [style.border]=\"0\">\n <kendo-splitter-pane\n class=\"k-gantt-treelist k-gantt-treelist-scrollable\"\n [collapsible]=\"treeListPaneOptions?.collapsible\"\n [collapsed]=\"treeListPaneOptions?.collapsed\"\n (collapsedChange)=\"onTreeListCollapsedChange($event)\"\n [scrollable]=\"false\">\n <kendo-treelist\n [idField]=\"taskIdField\"\n [columns]=\"columns\"\n [data]=\"data\"\n [hasChildren]=\"hasChildren\"\n [fetchChildren]=\"fetchChildren\"\n [isExpanded]=\"isExpanded\"\n [autoSize]=\"columnsAutoSize\"\n [columnMenu]=\"columnMenu\"\n [reorderable]=\"columnsReorderable\"\n [resizable]=\"columnsResizable\"\n [rowClass]=\"rowClass\"\n [sortable]=\"sortable\"\n [sort]=\"sort\"\n [filterable]=\"filterMenu\"\n [filter]=\"filter\"\n (filterChange)=\"filterChange.emit($event)\"\n (sortChange)=\"sortChange.emit($event)\"\n (dataStateChange)=\"dataStateChange.emit({\n filter: $event.filter,\n sort: $event.sort\n })\"\n (expandStateChange)=\"expandStateChange.emit($event)\"\n (expand)=\"rowExpand.emit({ dataItem: $event.dataItem })\"\n (collapse)=\"rowCollapse.emit({ dataItem: $event.dataItem })\"\n (columnReorder)=\"columnReorder.emit($event)\"\n (columnResize)=\"columnResize.emit($event)\"\n (columnVisibilityChange)=\"handleColumnVisibilityChange($event)\"\n (columnLockedChange)=\"columnLockedChange.emit($event)\"\n >\n </kendo-treelist>\n </kendo-splitter-pane>\n <kendo-splitter-pane\n [collapsible]=\"timelinePaneOptions?.collapsible\"\n [resizable]=\"timelinePaneOptions?.resizable\"\n [collapsed]=\"timelinePaneOptions?.collapsed\"\n [min]=\"timelinePaneOptions?.min\"\n [max]=\"timelinePaneOptions?.max\"\n [size]=\"timelinePaneOptions?.size\"\n (collapsedChange)=\"onTimelineCollapsedChange($event)\"\n (sizeChange)=\"onTimelinePaneSizeChange($event)\"\n [scrollable]=\"false\">\n <kendo-gantt-timeline\n *ngIf=\"views && views.length\"\n [rows]=\"renderedTreeListItems\"\n [slots]=\"timelineSlots\"\n [groupSlots]=\"timelineGroupSlots\"\n [tableWidth]=\"tableWidth\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate?.templateRef\"\n [taskTemplate]=\"taskTemplate?.templateRef\"\n [summaryTaskTemplate]=\"summaryTaskTemplate?.templateRef\"\n [taskClass]=\"taskClass\"\n [dependencies]=\"dependencies\"\n [hasChildren]=\"hasChildren\"\n ></kendo-gantt-timeline>\n </kendo-splitter-pane>\n </kendo-splitter>\n </div>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('bottom')\"\n class=\"k-gantt-footer k-toolbar k-gantt-toolbar\"\n position=\"bottom\"></kendo-gantt-toolbar>\n "
|
|
1265
|
+
template: "\n <ng-container kendoGanttLocalizedMessages\n i18n-taskDeleteLabel=\"kendo.gantt.taskDeleteLabel|The label of the task delete icon\"\n taskDeleteLabel=\"Delete\"\n\n i18n-taskEditingDialogTitle=\"kendo.gantt.taskEditingDialogTitle|The title of the task editing dialog\"\n taskEditingDialogTitle=\"Editing Task\"\n\n i18n-taskEditingDialogCloseTitle=\"kendo.gantt.taskEditingDialogCloseTitle|The title of the task editing dialog close button\"\n taskEditingDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogCloseTitle=\"kendo.gantt.confirmationDialogCloseTitle|The title of the confirmation dialog close button\"\n confirmationDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogTitle=\"kendo.gantt.confirmationDialogTitle|The title of the delete task confirmation dialog\"\n confirmationDialogTitle=\"Delete Task\"\n\n i18n-confirmationDialogContent=\"kendo.gantt.confirmationDialogContent|The content of the delete task confirmation dialog\"\n confirmationDialogContent=\"Are you sure you want to delete this task?\"\n\n i18n-deleteButtonText=\"kendo.gantt.deleteButtonText|The text of the task editing dialog 'Delete' button\"\n deleteButtonText=\"Delete\"\n\n i18n-cancelButtonText=\"kendo.gantt.cancelButtonText|The text of the task editing dialog 'Cancel' button\"\n cancelButtonText=\"Cancel\"\n\n i18n-saveButtonText=\"kendo.gantt.saveButtonText|The text of the task editing dialog 'Save' button\"\n saveButtonText=\"Save\"\n\n i18n-titleFieldInputLabel=\"kendo.gantt.titleFieldInputLabel|The label of the 'title' field input in editing mode\"\n titleFieldInputLabel=\"Title\"\n\n i18n-startFieldInputLabel=\"kendo.gantt.startFieldInputLabel|The label of the 'start' field input in editing mode\"\n startFieldInputLabel=\"Start\"\n\n i18n-endFieldInputLabel=\"kendo.gantt.endFieldInputLabel|The label of the 'end' field input in editing mode\"\n endFieldInputLabel=\"End\"\n\n i18n-completionRatioFieldInputLabel=\"kendo.gantt.completionRatioFieldInputLabel|The label of the 'completionRatio' field input in editing mode\"\n completionRatioFieldInputLabel=\"Progress\"\n\n i18n-dayViewText=\"kendo.gantt.dayViewText|The text of the day view in the ViewSelector component\"\n dayViewText=\"Day\"\n\n i18n-weekViewText=\"kendo.gantt.weekViewText|The text of the week view in the ViewSelector component\"\n weekViewText=\"Week\"\n\n i18n-monthViewText=\"kendo.gantt.monthViewText|The text of the month view in the ViewSelector component\"\n monthViewText=\"Month\"\n\n i18n-yearViewText-disabled=\"kendo.gantt.yearViewText|The text of the year view in the ViewSelector component\"\n yearViewText=\"Year\"\n\n i18n-noRecords=\"kendo.gantt.noRecords|The label visible in the TreeList when there are no records\"\n noRecords=\"No records available.\"\n\n i18n-filter=\"kendo.gantt.filter|The label of the filter cell or icon\"\n filter=\"Filter\"\n\n i18n-filterEqOperator=\"kendo.gantt.filterEqOperator|The text of the equal filter operator\"\n filterEqOperator=\"Is equal to\"\n\n i18n-filterNotEqOperator=\"kendo.gantt.filterNotEqOperator|The text of the not equal filter operator\"\n filterNotEqOperator=\"Is not equal to\"\n\n i18n-filterIsNullOperator=\"kendo.gantt.filterIsNullOperator|The text of the is null filter operator\"\n filterIsNullOperator=\"Is null\"\n\n i18n-filterIsNotNullOperator=\"kendo.gantt.filterIsNotNullOperator|The text of the is not null filter operator\"\n filterIsNotNullOperator=\"Is not null\"\n\n i18n-filterIsEmptyOperator=\"kendo.gantt.filterIsEmptyOperator|The text of the is empty filter operator\"\n filterIsEmptyOperator=\"Is empty\"\n\n i18n-filterIsNotEmptyOperator=\"kendo.gantt.filterIsNotEmptyOperator|The text of the is not empty filter operator\"\n filterIsNotEmptyOperator=\"Is not empty\"\n\n i18n-filterStartsWithOperator=\"kendo.gantt.filterStartsWithOperator|The text of the starts with filter operator\"\n filterStartsWithOperator=\"Starts with\"\n\n i18n-filterContainsOperator=\"kendo.gantt.filterContainsOperator|The text of the contains filter operator\"\n filterContainsOperator=\"Contains\"\n\n i18n-filterNotContainsOperator=\"kendo.gantt.filterNotContainsOperator|The text of the does not contain filter operator\"\n filterNotContainsOperator=\"Does not contain\"\n\n i18n-filterEndsWithOperator=\"kendo.gantt.filterEndsWithOperator|The text of the ends with filter operator\"\n filterEndsWithOperator=\"Ends with\"\n\n i18n-filterGteOperator=\"kendo.gantt.filterGteOperator|The text of the greater than or equal filter operator\"\n filterGteOperator=\"Is greater than or equal to\"\n\n i18n-filterGtOperator=\"kendo.gantt.filterGtOperator|The text of the greater than filter operator\"\n filterGtOperator=\"Is greater than\"\n\n i18n-filterLteOperator=\"kendo.gantt.filterLteOperator|The text of the less than or equal filter operator\"\n filterLteOperator=\"Is less than or equal to\"\n\n i18n-filterLtOperator=\"kendo.gantt.filterLtOperator|The text of the less than filter operator\"\n filterLtOperator=\"Is less than\"\n\n i18n-filterIsTrue=\"kendo.gantt.filterIsTrue|The text of the IsTrue boolean filter option\"\n filterIsTrue=\"Is True\"\n\n i18n-filterIsFalse=\"kendo.gantt.filterIsFalse|The text of the IsFalse boolean filter option\"\n filterIsFalse=\"Is False\"\n\n i18n-filterBooleanAll=\"kendo.gantt.filterBooleanAll|The text of the (All) boolean filter option\"\n filterBooleanAll=\"(All)\"\n\n i18n-filterAfterOrEqualOperator=\"kendo.gantt.filterAfterOrEqualOperator|The text of the after or equal date filter operator\"\n filterAfterOrEqualOperator=\"Is after or equal to\"\n\n i18n-filterAfterOperator=\"kendo.gantt.filterAfterOperator|The text of the after date filter operator\"\n filterAfterOperator=\"Is after\"\n\n i18n-filterBeforeOperator=\"kendo.gantt.filterBeforeOperator|The text of the before date filter operator\"\n filterBeforeOperator=\"Is before\"\n\n i18n-filterBeforeOrEqualOperator=\"kendo.gantt.filterBeforeOrEqualOperator|The text of the before or equal date filter operator\"\n filterBeforeOrEqualOperator=\"Is before or equal to\"\n\n i18n-filterFilterButton=\"kendo.gantt.filterFilterButton|The text of the filter button\"\n filterFilterButton=\"Filter\"\n\n i18n-filterClearButton=\"kendo.gantt.filterClearButton|The text of the clear filter button\"\n filterClearButton=\"Clear\"\n\n i18n-filterAndLogic=\"kendo.gantt.filterAndLogic|The text of the And filter logic\"\n filterAndLogic=\"And\"\n\n i18n-filterOrLogic=\"kendo.gantt.filterOrLogic|The text of the Or filter logic\"\n filterOrLogic=\"Or\"\n\n i18n-loading=\"kendo.gantt.loading|The loading text\"\n loading=\"Loading\"\n\n i18n-columnMenu=\"kendo.gantt.columnMenu|The title of the column menu icon\"\n columnMenu=\"Column Menu\"\n\n i18n-columns=\"kendo.gantt.columns|The text shown in the column menu for the columns item\"\n columns=\"Columns\"\n\n i18n-lock-disabled=\"kendo.gantt.lock|The text shown in the column menu for the lock item\"\n lock-disabled=\"Lock\"\n\n i18n-unlock-disabled=\"kendo.gantt.unlock|The text shown in the column menu for the unlock item\"\n unlock-disabled=\"Unlock\"\n\n i18n-sortable=\"kendo.gantt.sortable|The label of the sort icon\"\n sortable=\"Sortable\"\n\n i18n-sortAscending=\"kendo.gantt.sortAscending|The text shown in the column menu for the sort ascending item\"\n sortAscending=\"Sort Ascending\"\n\n i18n-sortDescending=\"kendo.gantt.sortDescending|The text shown in the column menu for the sort descending item\"\n sortDescending=\"Sort Descending\"\n\n i18n-sortedAscending=\"kendo.gantt.sortedAscending|The status announcement when a column is sorted ascending\"\n sortedAscending=\"Sorted Ascending\"\n\n i18n-sortedDescending=\"kendo.gantt.sortedDescending|The status announcement when a column is sorted descending\"\n sortedDescending=\"Sorted Descending\"\n\n i18n-sortedDefault=\"kendo.gantt.sortedDefault|The status announcement when a column is no longer sorted\"\n sortedDefault=\"Not Sorted\"\n\n i18n-columnsApply=\"kendo.gantt.columnsApply|The text shown in the column menu or column chooser for the columns apply button\"\n columnsApply=\"Apply\"\n\n i18n-columnsReset=\"kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button\"\n columnsReset=\"Reset\"></ng-container>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('top')\"\n class=\"k-gantt-header k-toolbar k-gantt-toolbar\"\n position=\"top\"></kendo-gantt-toolbar>\n <div class=\"k-gantt-content\">\n <kendo-splitter [style.border]=\"0\">\n <kendo-splitter-pane\n class=\"k-gantt-treelist k-gantt-treelist-scrollable\"\n [collapsible]=\"treeListPaneOptions?.collapsible\"\n [collapsed]=\"treeListPaneOptions?.collapsed\"\n (collapsedChange)=\"onTreeListCollapsedChange($event)\"\n [scrollable]=\"false\">\n <kendo-treelist\n [idField]=\"taskIdField\"\n [columns]=\"columns\"\n [data]=\"data\"\n [hasChildren]=\"hasChildren\"\n [fetchChildren]=\"fetchChildren\"\n [isExpanded]=\"isExpanded\"\n [autoSize]=\"columnsAutoSize\"\n [columnMenu]=\"columnMenu\"\n [reorderable]=\"columnsReorderable\"\n [resizable]=\"columnsResizable\"\n [rowClass]=\"rowClass\"\n [isSelected]=\"isSelected\"\n [selectable]=\"selectable\"\n [sortable]=\"sortable\"\n [sort]=\"sort\"\n [filterable]=\"filterMenu\"\n [filter]=\"filter\"\n (filterChange)=\"filterChange.emit($event)\"\n (sortChange)=\"sortChange.emit($event)\"\n (dataStateChange)=\"dataStateChange.emit({\n filter: $event.filter,\n sort: $event.sort\n })\"\n (expandStateChange)=\"expandStateChange.emit($event)\"\n (expand)=\"rowExpand.emit({ dataItem: $event.dataItem })\"\n (collapse)=\"rowCollapse.emit({ dataItem: $event.dataItem })\"\n (columnReorder)=\"columnReorder.emit($event)\"\n (columnResize)=\"columnResize.emit($event)\"\n (columnVisibilityChange)=\"handleColumnVisibilityChange($event)\"\n (columnLockedChange)=\"columnLockedChange.emit($event)\"\n (selectionChange)=\"handleTreeListSelectionChange($event)\"\n (cellClick)=\"handleTreeListCellClick($event)\"\n (cellClose)=\"handleCellClose($event)\"\n [kendoEventsOutsideAngular]=\"{\n dblclick: handleTreeListDoubleClick\n }\"\n [scope]=\"this\"\n >\n <kendo-treelist-messages [kendoGanttTreeListMessages]=\"localizationService\"></kendo-treelist-messages>\n </kendo-treelist>\n </kendo-splitter-pane>\n <kendo-splitter-pane\n [collapsible]=\"timelinePaneOptions?.collapsible\"\n [resizable]=\"timelinePaneOptions?.resizable\"\n [collapsed]=\"timelinePaneOptions?.collapsed\"\n [min]=\"timelinePaneOptions?.min\"\n [max]=\"timelinePaneOptions?.max\"\n [size]=\"timelinePaneOptions?.size\"\n (collapsedChange)=\"onTimelineCollapsedChange($event)\"\n (sizeChange)=\"onTimelinePaneSizeChange($event)\"\n [scrollable]=\"false\">\n <kendo-gantt-timeline\n *ngIf=\"views && views.length\"\n [rows]=\"renderedTreeListItems\"\n [slots]=\"timelineSlots\"\n [groupSlots]=\"timelineGroupSlots\"\n [tableWidth]=\"tableWidth\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate?.templateRef\"\n [taskTemplate]=\"taskTemplate?.templateRef\"\n [summaryTaskTemplate]=\"summaryTaskTemplate?.templateRef\"\n [taskClass]=\"taskClass\"\n [dependencies]=\"dependencies\"\n [hasChildren]=\"hasChildren\"\n [isTaskSelected]=\"isTaskSelected\"\n [kendoEventsOutsideAngular]=\"{\n click: handleTimelineClick,\n contextmenu: handleTimelineRightClick,\n dblclick: handleTimelineDblClick,\n mousedown: handleTimelineMouseDown\n }\"\n [scope]=\"this\"\n ></kendo-gantt-timeline>\n </kendo-splitter-pane>\n </kendo-splitter>\n </div>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('bottom')\"\n class=\"k-gantt-footer k-toolbar k-gantt-toolbar\"\n position=\"bottom\"></kendo-gantt-toolbar>\n <kendo-gantt-edit-dialog *ngIf=\"showEditingDialog\" [formGroup]=\"editDialogFormGroup\"></kendo-gantt-edit-dialog>\n <kendo-dialog\n *ngIf=\"showConfirmationDialog\"\n [width]=\"575\"\n [height]=\"170\"\n [title]=\"getText('confirmationDialogTitle')\"\n (close)=\"showConfirmationDialog = false;\">\n <span>{{getText('confirmationDialogContent')}}</span>\n <kendo-dialog-actions layout=\"normal\">\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <button kendoButton [primary]=\"true\" (click)=\"handleDeleteConfirmation()\">{{ getText('deleteButtonText') }}</button>\n <button kendoButton (click)=\"showConfirmationDialog = false;\">{{ getText('cancelButtonText') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
|
|
814
1266
|
}),
|
|
815
1267
|
tslib_1.__metadata("design:paramtypes", [timeline_view_service_1.TimelineViewService,
|
|
816
1268
|
scroll_sync_service_1.ScrollSyncService,
|
|
817
1269
|
core_1.Renderer2,
|
|
818
1270
|
mapping_service_1.MappingService,
|
|
819
1271
|
option_changes_service_1.OptionChangesService,
|
|
820
|
-
dependency_dom_service_1.DependencyDomService
|
|
1272
|
+
dependency_dom_service_1.DependencyDomService,
|
|
1273
|
+
edit_service_1.EditService,
|
|
1274
|
+
kendo_angular_l10n_1.LocalizationService,
|
|
1275
|
+
core_1.ElementRef,
|
|
1276
|
+
core_1.NgZone])
|
|
821
1277
|
], GanttComponent);
|
|
822
1278
|
return GanttComponent;
|
|
823
1279
|
}());
|