@progress/kendo-angular-gantt 0.1.4-dev.202109301203 → 0.2.0-dev.202111231320

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/cdn/js/kendo-angular-gantt.js +2 -76
  2. package/dist/cdn/main.js +23 -1
  3. package/dist/es/columns/column.component.js +5 -0
  4. package/dist/es/columns/columns.js +1 -0
  5. package/dist/es/columns/edit-template.directive.js +34 -0
  6. package/dist/es/columns/span-column.component.js +6 -0
  7. package/dist/es/editing/edit-dialog.component.js +44 -0
  8. package/dist/es/editing/edit.service.js +39 -0
  9. package/dist/es/editing/util.js +17 -0
  10. package/dist/es/gantt.component.js +309 -8
  11. package/dist/es/gantt.module.js +60 -5
  12. package/dist/es/index.js +6 -0
  13. package/dist/es/localization/custom-messages.component.js +44 -0
  14. package/dist/es/localization/localized-messages.directive.js +35 -0
  15. package/dist/es/localization/messages.js +246 -0
  16. package/dist/es/localization/treelist-messages.directive.js +31 -0
  17. package/dist/es/models/events/cell-click-event.interface.js +4 -0
  18. package/dist/es/models/events/cell-close-event.interface.js +19 -0
  19. package/dist/es/models/events/preventable-event.js +32 -0
  20. package/dist/es/models/events/task-click-event.interface.js +4 -0
  21. package/dist/es/models/events/task-edit-event.interface.js +4 -0
  22. package/dist/es/models/gantt-task-model-fields.interface.js +2 -1
  23. package/dist/es/package-metadata.js +1 -1
  24. package/dist/es/rendering/gantt-milestone-task.component.js +1 -1
  25. package/dist/es/rendering/gantt-summary-task.component.js +1 -1
  26. package/dist/es/rendering/gantt-task-base.js +4 -0
  27. package/dist/es/rendering/gantt-task.component.js +12 -4
  28. package/dist/es/rendering/gantt-tasks-table-body.component.js +5 -1
  29. package/dist/es/toolbar/view-selector.component.js +7 -4
  30. package/dist/es/utils.js +44 -1
  31. package/dist/es2015/columns/column.component.d.ts +2 -0
  32. package/dist/es2015/columns/column.component.js +5 -0
  33. package/dist/es2015/columns/columns.d.ts +1 -0
  34. package/dist/es2015/columns/columns.js +1 -0
  35. package/dist/es2015/columns/edit-template.directive.d.ts +23 -0
  36. package/dist/es2015/columns/edit-template.directive.js +33 -0
  37. package/dist/es2015/columns/span-column.component.d.ts +2 -0
  38. package/dist/es2015/columns/span-column.component.js +6 -0
  39. package/dist/es2015/editing/edit-dialog.component.d.ts +21 -0
  40. package/dist/es2015/editing/edit-dialog.component.js +86 -0
  41. package/dist/es2015/editing/edit.service.d.ts +20 -0
  42. package/dist/es2015/editing/edit.service.js +41 -0
  43. package/dist/es2015/editing/util.d.ts +10 -0
  44. package/dist/es2015/editing/util.js +17 -0
  45. package/dist/es2015/gantt.component.d.ts +180 -4
  46. package/dist/es2015/gantt.component.js +492 -8
  47. package/dist/es2015/gantt.module.d.ts +29 -1
  48. package/dist/es2015/gantt.module.js +60 -5
  49. package/dist/es2015/index.d.ts +6 -0
  50. package/dist/es2015/index.js +6 -0
  51. package/dist/es2015/index.metadata.json +1 -1
  52. package/dist/es2015/localization/custom-messages.component.d.ts +15 -0
  53. package/dist/es2015/localization/custom-messages.component.js +36 -0
  54. package/dist/es2015/localization/localized-messages.directive.d.ts +13 -0
  55. package/dist/es2015/localization/localized-messages.directive.js +31 -0
  56. package/dist/es2015/localization/messages.d.ts +246 -0
  57. package/dist/es2015/localization/messages.js +240 -0
  58. package/dist/es2015/localization/treelist-messages.directive.d.ts +14 -0
  59. package/dist/es2015/localization/treelist-messages.directive.js +29 -0
  60. package/dist/es2015/models/events/cell-click-event.interface.d.ts +20 -0
  61. package/dist/es2015/models/events/cell-click-event.interface.js +4 -0
  62. package/dist/es2015/models/events/cell-close-event.interface.d.ts +48 -0
  63. package/dist/es2015/models/events/cell-close-event.interface.js +14 -0
  64. package/dist/es2015/models/events/preventable-event.d.ts +24 -0
  65. package/dist/es2015/models/events/preventable-event.js +30 -0
  66. package/dist/es2015/models/events/task-click-event.interface.d.ts +22 -0
  67. package/dist/es2015/models/events/task-click-event.interface.js +4 -0
  68. package/dist/es2015/models/events/task-edit-event.interface.d.ts +46 -0
  69. package/dist/es2015/models/events/task-edit-event.interface.js +4 -0
  70. package/dist/es2015/models/gantt-task-model-fields.interface.d.ts +1 -0
  71. package/dist/es2015/models/gantt-task-model-fields.interface.js +2 -1
  72. package/dist/es2015/package-metadata.js +1 -1
  73. package/dist/es2015/rendering/gantt-milestone-task.component.js +1 -0
  74. package/dist/es2015/rendering/gantt-summary-task.component.js +1 -0
  75. package/dist/es2015/rendering/gantt-task-base.d.ts +1 -0
  76. package/dist/es2015/rendering/gantt-task-base.js +4 -0
  77. package/dist/es2015/rendering/gantt-task.component.d.ts +4 -1
  78. package/dist/es2015/rendering/gantt-task.component.js +17 -2
  79. package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +1 -0
  80. package/dist/es2015/rendering/gantt-tasks-table-body.component.js +8 -1
  81. package/dist/es2015/toolbar/view-selector.component.d.ts +3 -0
  82. package/dist/es2015/toolbar/view-selector.component.js +7 -7
  83. package/dist/es2015/utils.d.ts +34 -0
  84. package/dist/es2015/utils.js +44 -1
  85. package/dist/fesm2015/index.js +1080 -23
  86. package/dist/fesm5/index.js +865 -24
  87. package/dist/npm/columns/column.component.js +5 -0
  88. package/dist/npm/columns/columns.js +2 -0
  89. package/dist/npm/columns/edit-template.directive.js +36 -0
  90. package/dist/npm/columns/span-column.component.js +6 -0
  91. package/dist/npm/editing/edit-dialog.component.js +46 -0
  92. package/dist/npm/editing/edit.service.js +41 -0
  93. package/dist/npm/editing/util.js +19 -0
  94. package/dist/npm/gantt.component.js +306 -5
  95. package/dist/npm/gantt.module.js +59 -4
  96. package/dist/npm/index.js +12 -0
  97. package/dist/npm/localization/custom-messages.component.js +46 -0
  98. package/dist/npm/localization/localized-messages.directive.js +37 -0
  99. package/dist/npm/localization/messages.js +248 -0
  100. package/dist/npm/localization/treelist-messages.directive.js +33 -0
  101. package/dist/npm/models/events/cell-click-event.interface.js +6 -0
  102. package/dist/npm/models/events/cell-close-event.interface.js +21 -0
  103. package/dist/npm/models/events/preventable-event.js +34 -0
  104. package/dist/npm/models/events/task-click-event.interface.js +6 -0
  105. package/dist/npm/models/events/task-edit-event.interface.js +6 -0
  106. package/dist/npm/models/gantt-task-model-fields.interface.js +2 -1
  107. package/dist/npm/package-metadata.js +1 -1
  108. package/dist/npm/rendering/gantt-milestone-task.component.js +1 -1
  109. package/dist/npm/rendering/gantt-summary-task.component.js +1 -1
  110. package/dist/npm/rendering/gantt-task-base.js +4 -0
  111. package/dist/npm/rendering/gantt-task.component.js +12 -4
  112. package/dist/npm/rendering/gantt-tasks-table-body.component.js +5 -1
  113. package/dist/npm/toolbar/view-selector.component.js +7 -4
  114. package/dist/npm/utils.js +43 -0
  115. package/dist/systemjs/kendo-angular-gantt.js +1 -1
  116. package/package.json +15 -10
@@ -3,13 +3,13 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
6
- import { Component, forwardRef, HostBinding, Input, Output, EventEmitter, ViewChild, ContentChildren, ContentChild, QueryList, isDevMode, Renderer2 } from '@angular/core';
6
+ import { Component, forwardRef, HostBinding, Input, Output, EventEmitter, ViewChild, ContentChildren, ContentChild, QueryList, isDevMode, Renderer2, ElementRef, NgZone } from '@angular/core';
7
7
  import { DataBoundTreeComponent, ExpandableTreeComponent } from '@progress/kendo-angular-treelist';
8
8
  import { TreeListComponent } from '@progress/kendo-angular-treelist';
9
9
  import { Subscription } from 'rxjs';
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
11
  import { packageMetadata } from './package-metadata';
12
- import { anyChanged } from '@progress/kendo-angular-common';
12
+ import { anyChanged, hasObservers } from '@progress/kendo-angular-common';
13
13
  import { GanttColumnBase } from './columns/columns';
14
14
  import { fetchChildren, hasChildren, rowClassCallback, taskClassCallback } from './common/default-callbacks';
15
15
  import { TimelineViewService } from './timeline/timeline-view.service';
@@ -20,7 +20,9 @@ import { ScrollSyncService } from './scrolling/scroll-sync.service';
20
20
  import { DependencyDomService } from './dependencies/dependency-dom.service';
21
21
  import { MappingService } from './common/mapping.service';
22
22
  import { OptionChangesService } from './common/option-changes.service';
23
- import { isColumnGroup, isPresent, normalizeGanttData, scrollbarWidth } from './utils';
23
+ import { EditService } from './editing/edit.service';
24
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
25
+ import { getClosestTaskIndex, isClearButton, isColumnGroup, isPresent, isTask, normalizeGanttData, scrollbarWidth } from './utils';
24
26
  import { DEFAULT_TIMELINE_PANE_SETTINGS, DEFAULT_TREELIST_PANE_SETTINGS } from './models/splitter-pane-options.interface';
25
27
  import { GanttTaskTemplateDirective } from './template-directives/task-template.directive';
26
28
  import { GanttSummaryTaskTemplateDirective } from './template-directives/summary-task-template.directive';
@@ -28,13 +30,82 @@ import { GanttTaskContentTemplateDirective } from './template-directives/task-co
28
30
  import { ToolbarTemplateDirective } from './toolbar/toolbar-template.directive';
29
31
  import { ViewBase } from './timeline/view-base';
30
32
  import { Day } from '@progress/kendo-date-math';
33
+ import { getEditItem } from './editing/util';
31
34
  var TREELIST_GROUP_COLUMNS_CLASS = 'k-gantt-treelist-nested-columns';
32
35
  var DEFAULT_VIEW = 'week';
33
36
  /**
34
- * The GiGantt
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
+ * ```
35
106
  */
36
107
  var GanttComponent = /** @class */ (function () {
37
- function GanttComponent(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService) {
108
+ function GanttComponent(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone) {
38
109
  var _this = this;
39
110
  this.timelineViewService = timelineViewService;
40
111
  this.scrollSyncService = scrollSyncService;
@@ -42,6 +113,10 @@ var GanttComponent = /** @class */ (function () {
42
113
  this.mapper = mapper;
43
114
  this.optionChangesService = optionChangesService;
44
115
  this.dependencyDomService = dependencyDomService;
116
+ this.editService = editService;
117
+ this.localizationService = localizationService;
118
+ this.hostElement = hostElement;
119
+ this.zone = zone;
45
120
  this.hostClasses = true;
46
121
  /**
47
122
  * The position of the toolbar.
@@ -129,10 +204,40 @@ var GanttComponent = /** @class */ (function () {
129
204
  * Fires when an item is expanded.
130
205
  */
131
206
  this.rowExpand = new EventEmitter();
207
+ /**
208
+ * Fires when a Gantt task in the timeline pane is double-clicked. The data item, associated with the clicked task,
209
+ * is available in the event data. Use the event handler to open a task editing dialog as necessary.
210
+ */
211
+ this.taskDblClick = new EventEmitter();
212
+ /**
213
+ * Fires when the user double clicks a cell.
214
+ */
215
+ this.cellDblClick = new EventEmitter();
216
+ /**
217
+ * Fires when the user leaves an edited cell.
218
+ */
219
+ this.cellClose = new EventEmitter();
220
+ /**
221
+ * Fires when the end user clicks the `Delete` button in the task editing dialog or the task delete icon.
222
+ * Use the event handler to open a confirmation dialog when necessary.
223
+ */
224
+ this.taskDelete = new EventEmitter();
132
225
  /**
133
226
  * Fires when an item is collapsed.
134
227
  */
135
228
  this.rowCollapse = new EventEmitter();
229
+ /**
230
+ * Fires when the user confirms deleting a task.
231
+ */
232
+ this.remove = new EventEmitter();
233
+ /**
234
+ * Fires when the user cancels editing a task.
235
+ */
236
+ this.cancel = new EventEmitter();
237
+ /**
238
+ * Fires when the user saves an edited task.
239
+ */
240
+ this.save = new EventEmitter();
136
241
  /**
137
242
  * Fires when the sorting of the Gantt is changed.
138
243
  * You have to handle the event yourself and sort the data.
@@ -187,6 +292,14 @@ var GanttComponent = /** @class */ (function () {
187
292
  * Used by the GanttExpandableDirective.
188
293
  */
189
294
  this.expandStateChange = new EventEmitter();
295
+ /**
296
+ * @hidden
297
+ */
298
+ this.showEditingDialog = false;
299
+ /**
300
+ * @hidden
301
+ */
302
+ this.showConfirmationDialog = false;
190
303
  this._columns = new QueryList();
191
304
  this._data = [];
192
305
  this._timelinePaneOptions = tslib_1.__assign({}, DEFAULT_TIMELINE_PANE_SETTINGS);
@@ -194,14 +307,37 @@ var GanttComponent = /** @class */ (function () {
194
307
  this._rowClass = rowClassCallback;
195
308
  this._taskClass = taskClassCallback;
196
309
  this._activeView = DEFAULT_VIEW;
310
+ this.rtl = false;
197
311
  this.optionChangesSubscriptions = new Subscription();
312
+ this.editServiceSubscription = new Subscription();
198
313
  validatePackage(packageMetadata);
314
+ this.handleTimelineDblClick = this.handleTimelineDblClick.bind(this);
315
+ this.handleTimelineMouseDown = this.handleTimelineMouseDown.bind(this);
316
+ this.handleDoubleClick = this.handleDoubleClick.bind(this);
199
317
  this.optionChangesSubscriptions.add(this.optionChangesService.viewChanges.subscribe(function () {
200
318
  _this.loadTimelineData();
201
319
  }));
202
320
  this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(function () {
203
321
  _this.treeList.columns.notifyOnChanges();
204
322
  }));
323
+ this.editServiceSubscription.add(this.editService.showEditingDialog.subscribe(function (show) { return _this.showEditingDialog = show; }));
324
+ this.editServiceSubscription.add(this.editService.showConfirmationDialog.subscribe(function () { return _this.taskDelete.emit(); }));
325
+ this.editServiceSubscription.add(this.editService.editEvent.subscribe(function (args) {
326
+ _this[args.editResultType].emit({
327
+ formGroup: args.formGroup,
328
+ item: getEditItem(args.dataItem, _this.treeList.view.data, _this.mapper),
329
+ sender: _this
330
+ });
331
+ _this.showConfirmationDialog = _this.showEditingDialog = false;
332
+ _this.editService.dataItem = _this.editService.formGroup = null;
333
+ _this.updateView();
334
+ _this.dependencyDomService.notifyChanges();
335
+ }));
336
+ this.localizationSubscription = this.localizationService.changes.subscribe(function (_a) {
337
+ var rtl = _a.rtl;
338
+ _this.rtl = rtl;
339
+ _this.direction = _this.rtl ? 'rtl' : 'ltr';
340
+ });
205
341
  }
206
342
  GanttComponent_1 = GanttComponent;
207
343
  Object.defineProperty(GanttComponent.prototype, "toolbarTemplate", {
@@ -217,6 +353,13 @@ var GanttComponent = /** @class */ (function () {
217
353
  enumerable: true,
218
354
  configurable: true
219
355
  });
356
+ Object.defineProperty(GanttComponent.prototype, "dir", {
357
+ get: function () {
358
+ return this.direction;
359
+ },
360
+ enumerable: true,
361
+ configurable: true
362
+ });
220
363
  Object.defineProperty(GanttComponent.prototype, "columns", {
221
364
  get: function () {
222
365
  return this._columns;
@@ -432,6 +575,16 @@ var GanttComponent = /** @class */ (function () {
432
575
  enumerable: true,
433
576
  configurable: true
434
577
  });
578
+ Object.defineProperty(GanttComponent.prototype, "editDialogFormGroup", {
579
+ /**
580
+ * @hidden
581
+ */
582
+ get: function () {
583
+ return this.editService.formGroup;
584
+ },
585
+ enumerable: true,
586
+ configurable: true
587
+ });
435
588
  GanttComponent.prototype.ngOnChanges = function (changes) {
436
589
  if (anyChanged(['data', 'activeView', 'workWeekStart', 'workWeekEnd', 'workDayStart', 'workDayEnd'], changes)) {
437
590
  this.loadTimelineData();
@@ -451,6 +604,10 @@ var GanttComponent = /** @class */ (function () {
451
604
  };
452
605
  GanttComponent.prototype.ngOnDestroy = function () {
453
606
  this.optionChangesSubscriptions.unsubscribe();
607
+ this.editServiceSubscription.unsubscribe();
608
+ if (this.localizationSubscription) {
609
+ this.localizationSubscription.unsubscribe();
610
+ }
454
611
  };
455
612
  /**
456
613
  * Applies the minimum possible width for the specified column,
@@ -500,6 +657,47 @@ var GanttComponent = /** @class */ (function () {
500
657
  this.treeList.reorderColumn(source, destIndex, options);
501
658
  }
502
659
  };
660
+ /**
661
+ * Opens the task editing dialog.
662
+ */
663
+ GanttComponent.prototype.editTask = function (dataItem, formGroup) {
664
+ if (!this.showEditingDialog) {
665
+ this.editService.createEditDialog(dataItem, formGroup);
666
+ }
667
+ };
668
+ /**
669
+ * Closes the task editing dialog.
670
+ */
671
+ GanttComponent.prototype.closeTaskDialog = function () {
672
+ if (this.showEditingDialog) {
673
+ this.editService.closeEditDialog();
674
+ }
675
+ };
676
+ /**
677
+ * Opens the delete task confirmation dialog.
678
+ */
679
+ GanttComponent.prototype.openConfirmationDialog = function () {
680
+ this.showConfirmationDialog = true;
681
+ };
682
+ /**
683
+ * Opens a cell for editing.
684
+ */
685
+ GanttComponent.prototype.editCell = function (dataItem, column, formGroup) {
686
+ this.treeList.editCell(dataItem, column, formGroup);
687
+ };
688
+ /**
689
+ * Closes an edited cell.
690
+ */
691
+ GanttComponent.prototype.closeCell = function () {
692
+ this.treeList.closeCell();
693
+ };
694
+ /**
695
+ * @hidden
696
+ */
697
+ GanttComponent.prototype.handleCellClose = function (e) {
698
+ this.cellClose.emit(Object.assign(e, { item: this.editItem, sender: this }));
699
+ this.dependencyDomService.notifyChanges();
700
+ };
503
701
  /**
504
702
  * @hidden
505
703
  */
@@ -563,6 +761,69 @@ var GanttComponent = /** @class */ (function () {
563
761
  this._timelinePaneOptions.size = e;
564
762
  this.timelinePaneSizeChange.emit(e);
565
763
  };
764
+ /**
765
+ * @hidden
766
+ */
767
+ GanttComponent.prototype.handleCellClick = function (event) {
768
+ this._cellClickEvent = event;
769
+ };
770
+ /**
771
+ * @hidden
772
+ */
773
+ GanttComponent.prototype.handleDoubleClick = function (event) {
774
+ var _this = this;
775
+ var cell = this._cellClickEvent.originalEvent.target;
776
+ if (event.target !== cell) {
777
+ return;
778
+ }
779
+ this.editItem = getEditItem(this._cellClickEvent.dataItem, this.treeList.view.data, this.mapper);
780
+ if (hasObservers(this.cellDblClick)) {
781
+ this.zone.run(function () {
782
+ _this.cellDblClick.emit(tslib_1.__assign({}, _this._cellClickEvent, { sender: _this }));
783
+ });
784
+ }
785
+ };
786
+ /**
787
+ * @hidden
788
+ */
789
+ GanttComponent.prototype.handleDeleteConfirmation = function () {
790
+ this.editService.triggerEditEvent('remove');
791
+ };
792
+ /**
793
+ * @hidden
794
+ */
795
+ GanttComponent.prototype.handleTimelineMouseDown = function (event) {
796
+ var target = event.target;
797
+ var gantt = this.hostElement.nativeElement;
798
+ if (!isTask(target, gantt) || isClearButton(target, gantt)) {
799
+ return;
800
+ }
801
+ event.preventDefault();
802
+ };
803
+ /**
804
+ * @hidden
805
+ */
806
+ GanttComponent.prototype.handleTimelineDblClick = function (event) {
807
+ var _this = this;
808
+ var target = event.target;
809
+ var gantt = this.hostElement.nativeElement;
810
+ if (!isTask(target, gantt) || isClearButton(target, gantt)) {
811
+ return;
812
+ }
813
+ var taskIndex = getClosestTaskIndex(target, gantt);
814
+ var task = this.renderedTreeListItems[taskIndex];
815
+ this.zone.run(function () { return _this.taskDblClick.emit({
816
+ dataItem: task,
817
+ originalEvent: event,
818
+ sender: _this
819
+ }); });
820
+ };
821
+ /**
822
+ * @hidden
823
+ */
824
+ GanttComponent.prototype.getText = function (token) {
825
+ return this.localizationService.get(token);
826
+ };
566
827
  GanttComponent.prototype.updateTreeListGroupClass = function (columns) {
567
828
  if (columns === void 0) { columns = this.columns; }
568
829
  if (!isPresent(this.treeList)) {
@@ -618,6 +879,11 @@ var GanttComponent = /** @class */ (function () {
618
879
  HostBinding('class.k-gantt'),
619
880
  tslib_1.__metadata("design:type", Boolean)
620
881
  ], GanttComponent.prototype, "hostClasses", void 0);
882
+ tslib_1.__decorate([
883
+ HostBinding('attr.dir'),
884
+ tslib_1.__metadata("design:type", String),
885
+ tslib_1.__metadata("design:paramtypes", [])
886
+ ], GanttComponent.prototype, "dir", null);
621
887
  tslib_1.__decorate([
622
888
  ContentChildren(GanttColumnBase),
623
889
  tslib_1.__metadata("design:type", QueryList),
@@ -739,10 +1005,38 @@ var GanttComponent = /** @class */ (function () {
739
1005
  Output(),
740
1006
  tslib_1.__metadata("design:type", EventEmitter)
741
1007
  ], GanttComponent.prototype, "rowExpand", void 0);
1008
+ tslib_1.__decorate([
1009
+ Output(),
1010
+ tslib_1.__metadata("design:type", EventEmitter)
1011
+ ], GanttComponent.prototype, "taskDblClick", void 0);
1012
+ tslib_1.__decorate([
1013
+ Output(),
1014
+ tslib_1.__metadata("design:type", EventEmitter)
1015
+ ], GanttComponent.prototype, "cellDblClick", void 0);
1016
+ tslib_1.__decorate([
1017
+ Output(),
1018
+ tslib_1.__metadata("design:type", EventEmitter)
1019
+ ], GanttComponent.prototype, "cellClose", void 0);
1020
+ tslib_1.__decorate([
1021
+ Output(),
1022
+ tslib_1.__metadata("design:type", EventEmitter)
1023
+ ], GanttComponent.prototype, "taskDelete", void 0);
742
1024
  tslib_1.__decorate([
743
1025
  Output(),
744
1026
  tslib_1.__metadata("design:type", EventEmitter)
745
1027
  ], GanttComponent.prototype, "rowCollapse", void 0);
1028
+ tslib_1.__decorate([
1029
+ Output(),
1030
+ tslib_1.__metadata("design:type", EventEmitter)
1031
+ ], GanttComponent.prototype, "remove", void 0);
1032
+ tslib_1.__decorate([
1033
+ Output(),
1034
+ tslib_1.__metadata("design:type", EventEmitter)
1035
+ ], GanttComponent.prototype, "cancel", void 0);
1036
+ tslib_1.__decorate([
1037
+ Output(),
1038
+ tslib_1.__metadata("design:type", EventEmitter)
1039
+ ], GanttComponent.prototype, "save", void 0);
746
1040
  tslib_1.__decorate([
747
1041
  Output(),
748
1042
  tslib_1.__metadata("design:type", EventEmitter)
@@ -790,7 +1084,9 @@ var GanttComponent = /** @class */ (function () {
790
1084
  GanttComponent = GanttComponent_1 = tslib_1.__decorate([
791
1085
  Component({
792
1086
  selector: 'kendo-gantt',
1087
+ exportAs: 'kendoGantt',
793
1088
  providers: [
1089
+ LocalizationService,
794
1090
  {
795
1091
  provide: DataBoundTreeComponent,
796
1092
  useExisting: forwardRef(function () { return GanttComponent_1; })
@@ -806,16 +1102,21 @@ var GanttComponent = /** @class */ (function () {
806
1102
  ScrollSyncService,
807
1103
  DependencyDomService,
808
1104
  MappingService,
809
- OptionChangesService
1105
+ OptionChangesService,
1106
+ EditService
810
1107
  ],
811
- 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 "
1108
+ 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 [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 (cellClick)=\"handleCellClick($event)\"\n (cellClose)=\"handleCellClose($event)\"\n [kendoEventsOutsideAngular]=\"{\n dblclick: handleDoubleClick\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 [kendoEventsOutsideAngular]=\"{\n dblclick: handleTimelineDblClick,\n mousedown: handleTimelineMouseDown\n }\"\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 "
812
1109
  }),
813
1110
  tslib_1.__metadata("design:paramtypes", [TimelineViewService,
814
1111
  ScrollSyncService,
815
1112
  Renderer2,
816
1113
  MappingService,
817
1114
  OptionChangesService,
818
- DependencyDomService])
1115
+ DependencyDomService,
1116
+ EditService,
1117
+ LocalizationService,
1118
+ ElementRef,
1119
+ NgZone])
819
1120
  ], GanttComponent);
820
1121
  return GanttComponent;
821
1122
  }());
@@ -8,6 +8,7 @@ import { CommonModule } from '@angular/common';
8
8
  import { SplitterModule } from '@progress/kendo-angular-layout';
9
9
  import { TreeListModule } from '@progress/kendo-angular-treelist';
10
10
  import { ButtonsModule } from '@progress/kendo-angular-buttons';
11
+ import { DialogModule } from '@progress/kendo-angular-dialog';
11
12
  import { GanttComponent } from './gantt.component';
12
13
  import { GanttTimelineComponent } from './timeline/gantt-timeline.component';
13
14
  import { GanttTasksTableBodyComponent } from './rendering/gantt-tasks-table-body.component';
@@ -25,15 +26,32 @@ import { ToolbarComponent } from './toolbar/toolbar.component';
25
26
  import { ToolbarTemplateDirective } from './toolbar/toolbar-template.directive';
26
27
  import { ViewSelectorComponent } from './toolbar/view-selector.component';
27
28
  import { GanttDependencyDirective } from './dependencies/gantt-dependency.directive';
28
- import { GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, FilterMenuTemplateDirective, FilterCellTemplateDirective, CellTemplateDirective, ColumnMenuTemplateDirective, FooterTemplateDirective, HeaderTemplateDirective } from './columns/columns';
29
+ import { GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, FilterMenuTemplateDirective, FilterCellTemplateDirective, CellTemplateDirective, ColumnMenuTemplateDirective, FooterTemplateDirective, HeaderTemplateDirective, EditTemplateDirective } from './columns/columns';
29
30
  import { TimelineDayViewComponent } from './timeline/timeline-day-view.component';
30
31
  import { TimelineWeekViewComponent } from './timeline/timeline-week-view.component';
31
32
  import { TimelineMonthViewComponent } from './timeline/timeline-month-view.component';
33
+ import { EditDialogComponent } from './editing/edit-dialog.component';
34
+ import { ReactiveFormsModule } from '@angular/forms';
35
+ import { LabelModule } from '@progress/kendo-angular-label';
36
+ import { InputsModule } from '@progress/kendo-angular-inputs';
37
+ import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
38
+ import { CustomMessagesComponent } from './localization/custom-messages.component';
39
+ import { L10N_PREFIX } from '@progress/kendo-angular-l10n';
40
+ import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
41
+ import { GanttTreeListMessagesDirective } from './localization/treelist-messages.directive';
42
+ import { EventsModule } from '@progress/kendo-angular-common';
32
43
  var IMPORTED_MODULES = [
33
44
  CommonModule,
45
+ ReactiveFormsModule,
46
+ LabelModule,
47
+ InputsModule,
48
+ DateInputsModule,
49
+ ButtonsModule,
34
50
  SplitterModule,
35
51
  TreeListModule,
36
- ButtonsModule
52
+ ButtonsModule,
53
+ DialogModule,
54
+ EventsModule
37
55
  ];
38
56
  var DECLARATIONS = [
39
57
  GanttComponent,
@@ -57,6 +75,7 @@ var DECLARATIONS = [
57
75
  FilterMenuTemplateDirective,
58
76
  FilterCellTemplateDirective,
59
77
  CellTemplateDirective,
78
+ EditTemplateDirective,
60
79
  ColumnMenuTemplateDirective,
61
80
  HeaderTemplateDirective,
62
81
  FooterTemplateDirective,
@@ -64,10 +83,42 @@ var DECLARATIONS = [
64
83
  GanttDependencyDirective,
65
84
  TimelineDayViewComponent,
66
85
  TimelineWeekViewComponent,
67
- TimelineMonthViewComponent
86
+ TimelineMonthViewComponent,
87
+ EditDialogComponent,
88
+ CustomMessagesComponent,
89
+ LocalizedMessagesDirective,
90
+ GanttTreeListMessagesDirective
68
91
  ];
69
92
  /**
70
- * Sample module
93
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
94
+ * definition for the Gantt component.
95
+ *
96
+ * @example
97
+ *
98
+ * ```ts-no-run
99
+ * // Import the Gantt module
100
+ * import { GanttModule } from '@progress/kendo-angular-gantt';
101
+ *
102
+ * // The browser platform with a compiler
103
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
104
+ *
105
+ * import { NgModule } from '@angular/core';
106
+ *
107
+ * // Import the app component
108
+ * import { AppComponent } from './app.component';
109
+ *
110
+ * // Define the app module
111
+ * _@NgModule({
112
+ * declarations: [AppComponent], // declare app component
113
+ * imports: [BrowserModule, GanttModule], // import Gantt module
114
+ * bootstrap: [AppComponent]
115
+ * })
116
+ * export class AppModule {}
117
+ *
118
+ * // Compile and launch the module
119
+ * platformBrowserDynamic().bootstrapModule(AppModule);
120
+ *
121
+ * ```
71
122
  */
72
123
  var GanttModule = /** @class */ (function () {
73
124
  function GanttModule() {
@@ -76,7 +127,11 @@ var GanttModule = /** @class */ (function () {
76
127
  NgModule({
77
128
  imports: IMPORTED_MODULES.slice(),
78
129
  declarations: DECLARATIONS.slice(),
79
- exports: DECLARATIONS.slice()
130
+ exports: DECLARATIONS.slice(),
131
+ providers: [{
132
+ provide: L10N_PREFIX,
133
+ useValue: 'kendo.gantt'
134
+ }]
80
135
  })
81
136
  ], GanttModule);
82
137
  return GanttModule;
package/dist/es/index.js CHANGED
@@ -10,6 +10,12 @@ export { MappingService } from './common/mapping.service';
10
10
  export { OptionChangesService } from './common/option-changes.service';
11
11
  export { DependencyDomService } from './dependencies/dependency-dom.service';
12
12
  export { GanttDependencyDirective } from './dependencies/gantt-dependency.directive';
13
+ export { EditDialogComponent } from './editing/edit-dialog.component';
14
+ export { EditService } from './editing/edit.service';
15
+ export { CustomMessagesComponent } from './localization/custom-messages.component';
16
+ export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
17
+ export { Messages } from './localization/messages';
18
+ export { GanttTreeListMessagesDirective } from './localization/treelist-messages.directive';
13
19
  export { GanttHeaderTableBodyComponent } from './rendering/gantt-header-table-body.component';
14
20
  export { GanttMilestoneTaskComponent } from './rendering/gantt-milestone-task.component';
15
21
  export { GanttSummaryTaskComponent } from './rendering/gantt-summary-task.component';
@@ -0,0 +1,44 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as tslib_1 from "tslib";
6
+ import { Component, forwardRef } from '@angular/core';
7
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
8
+ import { Messages } from './messages';
9
+ /**
10
+ * Custom component messages override default component messages
11
+ * ([see example]({% slug globalization_treelist %}#toc-localization)).
12
+ */
13
+ var CustomMessagesComponent = /** @class */ (function (_super) {
14
+ tslib_1.__extends(CustomMessagesComponent, _super);
15
+ function CustomMessagesComponent(service) {
16
+ var _this = _super.call(this) || this;
17
+ _this.service = service;
18
+ return _this;
19
+ }
20
+ CustomMessagesComponent_1 = CustomMessagesComponent;
21
+ Object.defineProperty(CustomMessagesComponent.prototype, "override", {
22
+ get: function () {
23
+ return true;
24
+ },
25
+ enumerable: true,
26
+ configurable: true
27
+ });
28
+ var CustomMessagesComponent_1;
29
+ CustomMessagesComponent = CustomMessagesComponent_1 = tslib_1.__decorate([
30
+ Component({
31
+ providers: [
32
+ {
33
+ provide: Messages,
34
+ useExisting: forwardRef(function () { return CustomMessagesComponent_1; })
35
+ }
36
+ ],
37
+ selector: 'kendo-gantt-messages',
38
+ template: ""
39
+ }),
40
+ tslib_1.__metadata("design:paramtypes", [LocalizationService])
41
+ ], CustomMessagesComponent);
42
+ return CustomMessagesComponent;
43
+ }(Messages));
44
+ export { CustomMessagesComponent };