@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.
Files changed (137) 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/common/default-callbacks.js +4 -0
  8. package/dist/es/editing/edit-dialog.component.js +44 -0
  9. package/dist/es/editing/edit.service.js +39 -0
  10. package/dist/es/editing/util.js +17 -0
  11. package/dist/es/gantt.component.js +478 -22
  12. package/dist/es/gantt.module.js +62 -5
  13. package/dist/es/index.js +6 -0
  14. package/dist/es/localization/custom-messages.component.js +44 -0
  15. package/dist/es/localization/localized-messages.directive.js +35 -0
  16. package/dist/es/localization/messages.js +246 -0
  17. package/dist/es/localization/treelist-messages.directive.js +31 -0
  18. package/dist/es/main.js +1 -0
  19. package/dist/es/models/events/cell-click-event.interface.js +4 -0
  20. package/dist/es/models/events/cell-close-event.interface.js +19 -0
  21. package/dist/es/models/events/preventable-event.js +32 -0
  22. package/dist/es/models/events/task-click-event.interface.js +4 -0
  23. package/dist/es/models/events/task-edit-event.interface.js +4 -0
  24. package/dist/es/models/gantt-task-model-fields.interface.js +2 -1
  25. package/dist/es/package-metadata.js +1 -1
  26. package/dist/es/rendering/gantt-milestone-task.component.js +1 -1
  27. package/dist/es/rendering/gantt-summary-task.component.js +1 -1
  28. package/dist/es/rendering/gantt-task-base.js +8 -0
  29. package/dist/es/rendering/gantt-task.component.js +12 -4
  30. package/dist/es/rendering/gantt-tasks-table-body.component.js +5 -1
  31. package/dist/es/selection/selectable.directive.js +141 -0
  32. package/dist/es/selection/selection-change-event.js +4 -0
  33. package/dist/es/timeline/gantt-timeline.component.js +5 -1
  34. package/dist/es/toolbar/view-selector.component.js +7 -4
  35. package/dist/es/utils.js +48 -1
  36. package/dist/es2015/columns/column.component.d.ts +2 -0
  37. package/dist/es2015/columns/column.component.js +5 -0
  38. package/dist/es2015/columns/columns.d.ts +1 -0
  39. package/dist/es2015/columns/columns.js +1 -0
  40. package/dist/es2015/columns/edit-template.directive.d.ts +23 -0
  41. package/dist/es2015/columns/edit-template.directive.js +33 -0
  42. package/dist/es2015/columns/span-column.component.d.ts +2 -0
  43. package/dist/es2015/columns/span-column.component.js +6 -0
  44. package/dist/es2015/common/default-callbacks.d.ts +4 -0
  45. package/dist/es2015/common/default-callbacks.js +4 -0
  46. package/dist/es2015/editing/edit-dialog.component.d.ts +21 -0
  47. package/dist/es2015/editing/edit-dialog.component.js +86 -0
  48. package/dist/es2015/editing/edit.service.d.ts +20 -0
  49. package/dist/es2015/editing/edit.service.js +41 -0
  50. package/dist/es2015/editing/util.d.ts +10 -0
  51. package/dist/es2015/editing/util.js +17 -0
  52. package/dist/es2015/gantt.component.d.ts +236 -12
  53. package/dist/es2015/gantt.component.js +662 -21
  54. package/dist/es2015/gantt.module.d.ts +29 -1
  55. package/dist/es2015/gantt.module.js +62 -5
  56. package/dist/es2015/index.d.ts +6 -0
  57. package/dist/es2015/index.js +6 -0
  58. package/dist/es2015/index.metadata.json +1 -1
  59. package/dist/es2015/localization/custom-messages.component.d.ts +15 -0
  60. package/dist/es2015/localization/custom-messages.component.js +36 -0
  61. package/dist/es2015/localization/localized-messages.directive.d.ts +13 -0
  62. package/dist/es2015/localization/localized-messages.directive.js +31 -0
  63. package/dist/es2015/localization/messages.d.ts +246 -0
  64. package/dist/es2015/localization/messages.js +240 -0
  65. package/dist/es2015/localization/treelist-messages.directive.d.ts +14 -0
  66. package/dist/es2015/localization/treelist-messages.directive.js +29 -0
  67. package/dist/es2015/main.d.ts +2 -0
  68. package/dist/es2015/main.js +1 -0
  69. package/dist/es2015/models/events/cell-click-event.interface.d.ts +43 -0
  70. package/dist/es2015/models/events/cell-click-event.interface.js +4 -0
  71. package/dist/es2015/models/events/cell-close-event.interface.d.ts +48 -0
  72. package/dist/es2015/models/events/cell-close-event.interface.js +14 -0
  73. package/dist/es2015/models/events/preventable-event.d.ts +24 -0
  74. package/dist/es2015/models/events/preventable-event.js +30 -0
  75. package/dist/es2015/models/events/task-click-event.interface.d.ts +30 -0
  76. package/dist/es2015/models/events/task-click-event.interface.js +4 -0
  77. package/dist/es2015/models/events/task-edit-event.interface.d.ts +46 -0
  78. package/dist/es2015/models/events/task-edit-event.interface.js +4 -0
  79. package/dist/es2015/models/gantt-task-model-fields.interface.d.ts +1 -0
  80. package/dist/es2015/models/gantt-task-model-fields.interface.js +2 -1
  81. package/dist/es2015/models/models.d.ts +2 -0
  82. package/dist/es2015/package-metadata.js +1 -1
  83. package/dist/es2015/rendering/gantt-milestone-task.component.js +2 -0
  84. package/dist/es2015/rendering/gantt-summary-task.component.js +2 -0
  85. package/dist/es2015/rendering/gantt-task-base.d.ts +2 -0
  86. package/dist/es2015/rendering/gantt-task-base.js +8 -0
  87. package/dist/es2015/rendering/gantt-task.component.d.ts +4 -1
  88. package/dist/es2015/rendering/gantt-task.component.js +18 -2
  89. package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +1 -0
  90. package/dist/es2015/rendering/gantt-tasks-table-body.component.js +11 -1
  91. package/dist/es2015/selection/selectable.directive.d.ts +42 -0
  92. package/dist/es2015/selection/selectable.directive.js +122 -0
  93. package/dist/es2015/selection/selection-change-event.d.ts +25 -0
  94. package/dist/es2015/selection/selection-change-event.js +4 -0
  95. package/dist/es2015/timeline/gantt-timeline.component.d.ts +1 -0
  96. package/dist/es2015/timeline/gantt-timeline.component.js +5 -0
  97. package/dist/es2015/toolbar/view-selector.component.d.ts +3 -0
  98. package/dist/es2015/toolbar/view-selector.component.js +8 -7
  99. package/dist/es2015/utils.d.ts +39 -0
  100. package/dist/es2015/utils.js +48 -1
  101. package/dist/fesm2015/index.js +1388 -35
  102. package/dist/fesm5/index.js +1191 -45
  103. package/dist/npm/columns/column.component.js +5 -0
  104. package/dist/npm/columns/columns.js +2 -0
  105. package/dist/npm/columns/edit-template.directive.js +36 -0
  106. package/dist/npm/columns/span-column.component.js +6 -0
  107. package/dist/npm/common/default-callbacks.js +4 -0
  108. package/dist/npm/editing/edit-dialog.component.js +46 -0
  109. package/dist/npm/editing/edit.service.js +41 -0
  110. package/dist/npm/editing/util.js +19 -0
  111. package/dist/npm/gantt.component.js +475 -19
  112. package/dist/npm/gantt.module.js +61 -4
  113. package/dist/npm/index.js +12 -0
  114. package/dist/npm/localization/custom-messages.component.js +46 -0
  115. package/dist/npm/localization/localized-messages.directive.js +37 -0
  116. package/dist/npm/localization/messages.js +248 -0
  117. package/dist/npm/localization/treelist-messages.directive.js +33 -0
  118. package/dist/npm/main.js +2 -0
  119. package/dist/npm/models/events/cell-click-event.interface.js +6 -0
  120. package/dist/npm/models/events/cell-close-event.interface.js +21 -0
  121. package/dist/npm/models/events/preventable-event.js +34 -0
  122. package/dist/npm/models/events/task-click-event.interface.js +6 -0
  123. package/dist/npm/models/events/task-edit-event.interface.js +6 -0
  124. package/dist/npm/models/gantt-task-model-fields.interface.js +2 -1
  125. package/dist/npm/package-metadata.js +1 -1
  126. package/dist/npm/rendering/gantt-milestone-task.component.js +1 -1
  127. package/dist/npm/rendering/gantt-summary-task.component.js +1 -1
  128. package/dist/npm/rendering/gantt-task-base.js +8 -0
  129. package/dist/npm/rendering/gantt-task.component.js +12 -4
  130. package/dist/npm/rendering/gantt-tasks-table-body.component.js +5 -1
  131. package/dist/npm/selection/selectable.directive.js +143 -0
  132. package/dist/npm/selection/selection-change-event.js +6 -0
  133. package/dist/npm/timeline/gantt-timeline.component.js +5 -1
  134. package/dist/npm/toolbar/view-selector.component.js +7 -4
  135. package/dist/npm/utils.js +47 -0
  136. package/dist/systemjs/kendo-angular-gantt.js +1 -1
  137. package/package.json +5 -2
@@ -5,17 +5,23 @@
5
5
  import { __extends, __decorate, __metadata, __param, __assign } from 'tslib';
6
6
  import { Input, Injectable, EventEmitter, Directive, Optional, TemplateRef, QueryList, ContentChildren, ContentChild, Component, forwardRef, SkipSelf, Host, Injector, NgZone, isDevMode, ViewChild, HostBinding, Output, Renderer2, ElementRef, ChangeDetectorRef, NgModule } from '@angular/core';
7
7
  import { ColumnBase, ColumnComponent, ColumnGroupComponent, SpanColumnComponent, TreeListComponent, DataBoundTreeComponent, ExpandableTreeComponent, FlatBindingDirective, HierarchyBindingDirective, ExpandableDirective, TreeListModule } from '@progress/kendo-angular-treelist';
8
+ import { cloneDate, addWeeks, firstDayInWeek, addDays, getDate, lastDayOfMonth, firstDayOfMonth, addMonths, isEqualDate, MS_PER_HOUR, MS_PER_DAY } from '@progress/kendo-date-math';
8
9
  import { of, fromEvent, Subject, Subscription } from 'rxjs';
9
10
  import { validatePackage } from '@progress/kendo-licensing';
10
- import { isDocumentAvailable, anyChanged } from '@progress/kendo-angular-common';
11
+ import { isDocumentAvailable, closestInScope, matchesClasses, anyChanged, hasObservers, EventsModule } from '@progress/kendo-angular-common';
11
12
  import { IntlService } from '@progress/kendo-angular-intl';
12
13
  import { orderBy } from '@progress/kendo-data-query';
13
- import { cloneDate, addWeeks, firstDayInWeek, addDays, getDate, lastDayOfMonth, firstDayOfMonth, addMonths, isEqualDate, MS_PER_HOUR, MS_PER_DAY } from '@progress/kendo-date-math';
14
14
  import { getter } from '@progress/kendo-common';
15
15
  import { map, distinctUntilChanged, take, filter, switchMap } from 'rxjs/operators';
16
+ import { LocalizationService, ComponentMessages, L10N_PREFIX } from '@progress/kendo-angular-l10n';
16
17
  import { CommonModule } from '@angular/common';
17
18
  import { SplitterModule } from '@progress/kendo-angular-layout';
18
19
  import { ButtonsModule } from '@progress/kendo-angular-buttons';
20
+ import { DialogModule } from '@progress/kendo-angular-dialog';
21
+ import { FormGroup, ReactiveFormsModule } from '@angular/forms';
22
+ import { LabelModule } from '@progress/kendo-angular-label';
23
+ import { InputsModule } from '@progress/kendo-angular-inputs';
24
+ import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
19
25
 
20
26
  /**
21
27
  * @hidden
@@ -24,7 +30,7 @@ var packageMetadata = {
24
30
  name: '@progress/kendo-angular-gantt',
25
31
  productName: 'Kendo UI for Angular',
26
32
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
27
- publishDate: 1635941338,
33
+ publishDate: 1638864709,
28
34
  version: '',
29
35
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
30
36
  };
@@ -257,6 +263,34 @@ var HeaderTemplateDirective = /** @class */ (function () {
257
263
  return HeaderTemplateDirective;
258
264
  }());
259
265
 
266
+ /**
267
+ * Represents the column edit-cell template of the Gantt.
268
+ * Helps to customize the content of the edited cells. To define the cell template, nest an `<ng-template>`
269
+ * tag with the `kendoGanttEditTemplate` directive inside a `<kendo-gantt-column>` tag.
270
+ *
271
+ * The template context contains the following fields:
272
+ * - `column`&mdash;The current column instance.
273
+ * - `dataItem`&mdash;The current data item.
274
+ * - `cellContext`&mdash;An object used to pass context information to built-in directives.
275
+ * - `formGroup`&mdash;The current [`FormGroup`]({{ site.data.urls.angular['formgroupapi'] }}).
276
+ * If you use the Gantt inside [Template-Driven Forms]({{ site.data.urls.angular['forms'] }}), it will be `undefined`.
277
+ * - `isNew`&mdash;The state of the current item.
278
+ * - `rowIndex`&mdash;The current row index. If inside a new item row, `rowIndex` is `-1`.
279
+ */
280
+ var EditTemplateDirective = /** @class */ (function () {
281
+ function EditTemplateDirective(templateRef) {
282
+ this.templateRef = templateRef;
283
+ }
284
+ EditTemplateDirective = __decorate([
285
+ Directive({
286
+ selector: '[kendoGanttEditTemplate]'
287
+ }),
288
+ __param(0, Optional()),
289
+ __metadata("design:paramtypes", [TemplateRef])
290
+ ], EditTemplateDirective);
291
+ return EditTemplateDirective;
292
+ }());
293
+
260
294
  var GanttColumnComponent = /** @class */ (function (_super) {
261
295
  __extends(GanttColumnComponent, _super);
262
296
  function GanttColumnComponent(options, parent) {
@@ -314,6 +348,10 @@ var GanttColumnComponent = /** @class */ (function (_super) {
314
348
  ContentChild(CellTemplateDirective, { static: false }),
315
349
  __metadata("design:type", CellTemplateDirective)
316
350
  ], GanttColumnComponent.prototype, "template", void 0);
351
+ __decorate([
352
+ ContentChild(EditTemplateDirective, { static: false }),
353
+ __metadata("design:type", EditTemplateDirective)
354
+ ], GanttColumnComponent.prototype, "editTemplate", void 0);
317
355
  __decorate([
318
356
  ContentChild(FilterCellTemplateDirective, { static: false }),
319
357
  __metadata("design:type", FilterCellTemplateDirective)
@@ -511,6 +549,7 @@ var GanttSpanColumnComponent = /** @class */ (function (_super) {
511
549
  */
512
550
  _this.childColumns = new QueryList();
513
551
  _this.template = new QueryList();
552
+ _this.editTemplate = new QueryList();
514
553
  return _this;
515
554
  }
516
555
  GanttSpanColumnComponent_1 = GanttSpanColumnComponent;
@@ -526,6 +565,10 @@ var GanttSpanColumnComponent = /** @class */ (function (_super) {
526
565
  ContentChildren(CellTemplateDirective, { descendants: false }),
527
566
  __metadata("design:type", QueryList)
528
567
  ], GanttSpanColumnComponent.prototype, "template", void 0);
568
+ __decorate([
569
+ ContentChildren(EditTemplateDirective, { descendants: false }),
570
+ __metadata("design:type", QueryList)
571
+ ], GanttSpanColumnComponent.prototype, "editTemplate", void 0);
529
572
  __decorate([
530
573
  Input(),
531
574
  __metadata("design:type", Boolean)
@@ -604,6 +647,10 @@ var rowClassCallback = function () { return null; };
604
647
  * @hidden
605
648
  */
606
649
  var taskClassCallback = function () { return null; };
650
+ /**
651
+ * @hidden
652
+ */
653
+ var isSelected = function () { return false; };
607
654
 
608
655
  /**
609
656
  * @hidden
@@ -703,6 +750,44 @@ var isColumnGroup = function (column) { return column.isColumnGroup; };
703
750
  * @hidden
704
751
  */
705
752
  var isNumber = function (contender) { return typeof contender === 'number' && !isNaN(contender); };
753
+ /**
754
+ * @hidden
755
+ */
756
+ var isString = function (contender) { return typeof contender === 'string'; };
757
+ /**
758
+ * @hidden
759
+ *
760
+ * Gets the closest timeline task element index from an event target.
761
+ * Uses the `data-task-index` attribute assigned to each task.
762
+ * Restricts the search up to the provided gantt element from the second param.
763
+ */
764
+ var getClosestTaskIndex = function (element, gantt) {
765
+ var task = closestInScope(element, matchesClasses('k-task'), gantt);
766
+ if (!isPresent(task)) {
767
+ return null;
768
+ }
769
+ return Number(task.getAttribute('data-task-index'));
770
+ };
771
+ /**
772
+ * @hidden
773
+ *
774
+ * Checks whether the queried item or its parent items has a `k-task` selector.
775
+ * Restricts the search up to the provided gantt element from the second param.
776
+ */
777
+ var isTask = function (contender, gantt) {
778
+ var task = closestInScope(contender, matchesClasses('k-task'), gantt);
779
+ return isPresent(task);
780
+ };
781
+ /**
782
+ * @hidden
783
+ *
784
+ * Checks whether the queried item or its parent items has a `k-task-actions` selector - used for the clear button.
785
+ * Restricts the search up to the provided gantt element from the second param.
786
+ */
787
+ var isClearButton = function (contender, gantt) {
788
+ var clearButtonContainer = closestInScope(contender, matchesClasses('k-task-actions'), gantt);
789
+ return isPresent(clearButtonContainer);
790
+ };
706
791
 
707
792
  var DAY_FORMAT = 'E d/MM';
708
793
  var HOUR_FORMAT = 'HH:mm aa';
@@ -872,7 +957,8 @@ var DEFAULT_TASK_MODEL_FIELDS = Object.freeze({
872
957
  start: 'start',
873
958
  end: 'end',
874
959
  title: 'title',
875
- completionRatio: 'completionRatio'
960
+ completionRatio: 'completionRatio',
961
+ children: 'children'
876
962
  });
877
963
 
878
964
  /**
@@ -1281,6 +1367,38 @@ var DependencyDomService = /** @class */ (function () {
1281
1367
  return DependencyDomService;
1282
1368
  }());
1283
1369
 
1370
+ /**
1371
+ * @hidden
1372
+ */
1373
+ var EditService = /** @class */ (function () {
1374
+ function EditService() {
1375
+ this.showEditingDialog = new Subject();
1376
+ this.showConfirmationDialog = new Subject();
1377
+ this.editEvent = new Subject();
1378
+ }
1379
+ EditService.prototype.createEditDialog = function (dataItem, formGroup) {
1380
+ this.dataItem = dataItem;
1381
+ this.formGroup = formGroup;
1382
+ this.showEditingDialog.next(true);
1383
+ };
1384
+ EditService.prototype.closeEditDialog = function () {
1385
+ this.showEditingDialog.next(false);
1386
+ this.dataItem = undefined;
1387
+ this.formGroup = undefined;
1388
+ };
1389
+ EditService.prototype.triggerEditEvent = function (editResultType) {
1390
+ this.editEvent.next({
1391
+ formGroup: this.formGroup,
1392
+ dataItem: this.dataItem,
1393
+ editResultType: editResultType
1394
+ });
1395
+ };
1396
+ EditService = __decorate([
1397
+ Injectable()
1398
+ ], EditService);
1399
+ return EditService;
1400
+ }());
1401
+
1284
1402
  /**
1285
1403
  * @hidden
1286
1404
  */
@@ -1577,13 +1695,93 @@ var ViewBase = /** @class */ (function () {
1577
1695
  return ViewBase;
1578
1696
  }());
1579
1697
 
1698
+ /**
1699
+ * @hidden
1700
+ */
1701
+ var getEditItem = function (dataItem, data, mapper) {
1702
+ var treeListDataItem = data.find(function (item) { return mapper.extractFromTask(item.data, 'id') === mapper.extractFromTask(dataItem, 'id'); });
1703
+ return mapPath(treeListDataItem);
1704
+ };
1705
+ var mapPath = function (item) { return ({
1706
+ dataItem: item.data,
1707
+ parent: item.parent.data ? mapPath(item.parent) : null
1708
+ }); };
1709
+
1580
1710
  var TREELIST_GROUP_COLUMNS_CLASS = 'k-gantt-treelist-nested-columns';
1581
1711
  var DEFAULT_VIEW = 'week';
1582
1712
  /**
1583
- * The GiGantt
1713
+ * Represents the Kendo UI Gantt component for Angular.
1714
+ *
1715
+ * @example
1716
+ * ```ts-preview
1717
+ * _@Component({
1718
+ * selector: 'my-app',
1719
+ * template: `
1720
+ * <kendo-gantt
1721
+ * [style.height.px]="500"
1722
+ * [kendoGanttHierarchyBinding]="data"
1723
+ * childrenField="subtasks"
1724
+ * [dependencies]="dependencies">
1725
+ * <kendo-gantt-column
1726
+ * field="title"
1727
+ * title="Task"
1728
+ * [width]="200"
1729
+ * [expandable]="true"></kendo-gantt-column>
1730
+ * <kendo-gantt-column
1731
+ * field="start"
1732
+ * title="Start"
1733
+ * format="dd-MMM-yyyy"
1734
+ * [width]="120"></kendo-gantt-column>
1735
+ * <kendo-gantt-column
1736
+ * field="end"
1737
+ * title="End"
1738
+ * format="dd-MMM-yyyy"
1739
+ * [width]="120"></kendo-gantt-column>
1740
+ * <kendo-gantt-timeline-day-view></kendo-gantt-timeline-day-view>
1741
+ * <kendo-gantt-timeline-week-view></kendo-gantt-timeline-week-view>
1742
+ * <kendo-gantt-timeline-month-view></kendo-gantt-timeline-month-view>
1743
+ * </kendo-gantt>
1744
+ * `
1745
+ * })
1746
+ * class AppComponent {
1747
+ * public data: Task[] = [{
1748
+ * id: 7, title: 'Validation and R&D', start: new Date('2014-06-02T00:00:00.000Z'),
1749
+ * end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.45708333333333334,
1750
+ * subtasks: [
1751
+ * { id: 18, title: 'Project Kickoff', start: new Date('2014-06-02T00:00:00.000Z'),
1752
+ * end: new Date('2014-06-02T00:00:00.000Z'), completionRatio: 0.23 },
1753
+ * { id: 11, title: 'Research', start: new Date('2014-06-02T00:00:00.000Z'),
1754
+ * end: new Date('2014-06-07T00:00:00.000Z'), completionRatio: 0.5766666666666667,
1755
+ * subtasks: [
1756
+ * { id: 19, title: 'Validation', start: new Date('2014-06-02T00:00:00.000Z'),
1757
+ * end: new Date('2014-06-04T00:00:00.000Z'), completionRatio: 0.25 },
1758
+ * { id: 39, title: 'Specification', start: new Date('2014-06-04T00:00:00.000Z'),
1759
+ * end: new Date('2014-06-07T00:00:00.000Z'), completionRatio: 0.66 }]
1760
+ * }, { id: 13, title: 'Implementation', start: new Date('2014-06-08T00:00:00.000Z'),
1761
+ * end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.77,
1762
+ * subtasks: [
1763
+ * { id: 24, title: 'Prototype', start: new Date('2014-06-08T00:00:00.000Z'),
1764
+ * end: new Date('2014-06-14T00:00:00.000Z'), completionRatio: 0.77 },
1765
+ * { id: 29, title: 'UI and Interaction', start: new Date('2014-06-14T00:00:00.000Z'),
1766
+ * end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.6 }]
1767
+ * }, { id: 17, title: 'Release', start: new Date('2014-06-19T00:00:00.000Z'),
1768
+ * end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0 }]
1769
+ * }];
1770
+ *
1771
+ * public dependencies: GanttDependency[] = [
1772
+ * { id: 528, fromId: 18, toId: 19, type: DependencyType.FS },
1773
+ * { id: 529, fromId: 19, toId: 39, type: DependencyType.FS },
1774
+ * { id: 535, fromId: 24, toId: 29, type: DependencyType.FS },
1775
+ * { id: 551, fromId: 13, toId: 29, type: DependencyType.FF },
1776
+ * { id: 777, fromId: 7, toId: 11, type: DependencyType.SF },
1777
+ * { id: 556, fromId: 39, toId: 24, type: DependencyType.FS },
1778
+ * { id: 546, fromId: 29, toId: 17, type: DependencyType.FS },
1779
+ * ];
1780
+ * }
1781
+ * ```
1584
1782
  */
1585
1783
  var GanttComponent = /** @class */ (function () {
1586
- function GanttComponent(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService) {
1784
+ function GanttComponent(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone) {
1587
1785
  var _this = this;
1588
1786
  this.timelineViewService = timelineViewService;
1589
1787
  this.scrollSyncService = scrollSyncService;
@@ -1591,7 +1789,32 @@ var GanttComponent = /** @class */ (function () {
1591
1789
  this.mapper = mapper;
1592
1790
  this.optionChangesService = optionChangesService;
1593
1791
  this.dependencyDomService = dependencyDomService;
1792
+ this.editService = editService;
1793
+ this.localizationService = localizationService;
1794
+ this.hostElement = hostElement;
1795
+ this.zone = zone;
1594
1796
  this.hostClasses = true;
1797
+ /**
1798
+ * Provides a callback that determines if the given task is selected ([see example]({% slug selection_gantt %}#toc-custom-selection))
1799
+ *
1800
+ * > The [`selectable`]({% slug gantt_api_ganttcomponent %}#toc-selectable) prop has to be set to `true` in order for this callback to be executed.
1801
+ */
1802
+ this.isSelected = isSelected;
1803
+ /**
1804
+ * Fires when the Gantt selection is changed through user interaction.
1805
+ *
1806
+ * Holds data about the affected [`items`]({% slug api_gantt_selectionchangeevent %}#toc-items) and the attempted [`action`]({% slug api_gantt_selectionchangeevent %}#toc-action):
1807
+ * - `select` - Triggered on `click` or `ctrl + click` on deselected items.
1808
+ * - `remove` - Triggered on `ctrl + click` on selected items.
1809
+ */
1810
+ this.selectionChange = new EventEmitter();
1811
+ /**
1812
+ * Enables or disables the Gantt selection mechanism ([see example]({% slug selection_gantt %}#toc-custom-selection)).
1813
+ *
1814
+ * > When set to `true`, the [`isSelected`]({% slug gantt_api_ganttcomponent %}#toc-isselected) callback has to be provided.
1815
+ * > When applied, the [`SelectableDirective`]({% slug api_gantt_selectabledirective %}) sets `selectable` to `true` internally.
1816
+ */
1817
+ this.selectable = false;
1595
1818
  /**
1596
1819
  * The position of the toolbar.
1597
1820
  *
@@ -1678,10 +1901,40 @@ var GanttComponent = /** @class */ (function () {
1678
1901
  * Fires when an item is expanded.
1679
1902
  */
1680
1903
  this.rowExpand = new EventEmitter();
1904
+ /**
1905
+ * Fires when a Gantt task in the timeline pane is double-clicked. The data item, associated with the clicked task,
1906
+ * is available in the event data. Use the event handler to open a task editing dialog as necessary.
1907
+ */
1908
+ this.taskDblClick = new EventEmitter();
1909
+ /**
1910
+ * Fires when the user double clicks a cell.
1911
+ */
1912
+ this.cellDblClick = new EventEmitter();
1913
+ /**
1914
+ * Fires when the user leaves an edited cell.
1915
+ */
1916
+ this.cellClose = new EventEmitter();
1917
+ /**
1918
+ * Fires when the end user clicks the `Delete` button in the task editing dialog or the task delete icon.
1919
+ * Use the event handler to open a confirmation dialog when necessary.
1920
+ */
1921
+ this.taskDelete = new EventEmitter();
1681
1922
  /**
1682
1923
  * Fires when an item is collapsed.
1683
1924
  */
1684
1925
  this.rowCollapse = new EventEmitter();
1926
+ /**
1927
+ * Fires when the user confirms deleting a task.
1928
+ */
1929
+ this.remove = new EventEmitter();
1930
+ /**
1931
+ * Fires when the user cancels editing a task.
1932
+ */
1933
+ this.cancel = new EventEmitter();
1934
+ /**
1935
+ * Fires when the user saves an edited task.
1936
+ */
1937
+ this.save = new EventEmitter();
1685
1938
  /**
1686
1939
  * Fires when the sorting of the Gantt is changed.
1687
1940
  * You have to handle the event yourself and sort the data.
@@ -1730,12 +1983,28 @@ var GanttComponent = /** @class */ (function () {
1730
1983
  * Fires when the user changes the locked state of the columns from the column menu or by reordering the columns.
1731
1984
  */
1732
1985
  this.columnLockedChange = new EventEmitter();
1986
+ /**
1987
+ * Fires when a cell is clicked.
1988
+ */
1989
+ this.cellClick = new EventEmitter();
1990
+ /**
1991
+ * Fires when a task is clicked.
1992
+ */
1993
+ this.taskClick = new EventEmitter();
1733
1994
  /**
1734
1995
  * @hidden
1735
1996
  *
1736
1997
  * Used by the GanttExpandableDirective.
1737
1998
  */
1738
1999
  this.expandStateChange = new EventEmitter();
2000
+ /**
2001
+ * @hidden
2002
+ */
2003
+ this.showEditingDialog = false;
2004
+ /**
2005
+ * @hidden
2006
+ */
2007
+ this.showConfirmationDialog = false;
1739
2008
  this._columns = new QueryList();
1740
2009
  this._data = [];
1741
2010
  this._timelinePaneOptions = __assign({}, DEFAULT_TIMELINE_PANE_SETTINGS);
@@ -1743,7 +2012,9 @@ var GanttComponent = /** @class */ (function () {
1743
2012
  this._rowClass = rowClassCallback;
1744
2013
  this._taskClass = taskClassCallback;
1745
2014
  this._activeView = DEFAULT_VIEW;
2015
+ this.rtl = false;
1746
2016
  this.optionChangesSubscriptions = new Subscription();
2017
+ this.editServiceSubscription = new Subscription();
1747
2018
  validatePackage(packageMetadata);
1748
2019
  this.optionChangesSubscriptions.add(this.optionChangesService.viewChanges.subscribe(function () {
1749
2020
  _this.loadTimelineData();
@@ -1751,6 +2022,24 @@ var GanttComponent = /** @class */ (function () {
1751
2022
  this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(function () {
1752
2023
  _this.treeList.columns.notifyOnChanges();
1753
2024
  }));
2025
+ this.editServiceSubscription.add(this.editService.showEditingDialog.subscribe(function (show) { return _this.showEditingDialog = show; }));
2026
+ this.editServiceSubscription.add(this.editService.showConfirmationDialog.subscribe(function () { return _this.taskDelete.emit(); }));
2027
+ this.editServiceSubscription.add(this.editService.editEvent.subscribe(function (args) {
2028
+ _this[args.editResultType].emit({
2029
+ formGroup: args.formGroup,
2030
+ item: getEditItem(args.dataItem, _this.treeList.view.data, _this.mapper),
2031
+ sender: _this
2032
+ });
2033
+ _this.showConfirmationDialog = _this.showEditingDialog = false;
2034
+ _this.editService.dataItem = _this.editService.formGroup = null;
2035
+ _this.updateView();
2036
+ _this.dependencyDomService.notifyChanges();
2037
+ }));
2038
+ this.localizationSubscription = this.localizationService.changes.subscribe(function (_a) {
2039
+ var rtl = _a.rtl;
2040
+ _this.rtl = rtl;
2041
+ _this.direction = _this.rtl ? 'rtl' : 'ltr';
2042
+ });
1754
2043
  }
1755
2044
  GanttComponent_1 = GanttComponent;
1756
2045
  Object.defineProperty(GanttComponent.prototype, "toolbarTemplate", {
@@ -1766,6 +2055,13 @@ var GanttComponent = /** @class */ (function () {
1766
2055
  enumerable: true,
1767
2056
  configurable: true
1768
2057
  });
2058
+ Object.defineProperty(GanttComponent.prototype, "dir", {
2059
+ get: function () {
2060
+ return this.direction;
2061
+ },
2062
+ enumerable: true,
2063
+ configurable: true
2064
+ });
1769
2065
  Object.defineProperty(GanttComponent.prototype, "columns", {
1770
2066
  get: function () {
1771
2067
  return this._columns;
@@ -1955,6 +2251,19 @@ var GanttComponent = /** @class */ (function () {
1955
2251
  enumerable: true,
1956
2252
  configurable: true
1957
2253
  });
2254
+ Object.defineProperty(GanttComponent.prototype, "isTaskSelected", {
2255
+ /**
2256
+ * @hidden
2257
+ *
2258
+ * Retrieves the `isSelected` callback if `selectable` is set to `true`
2259
+ * Otherwise returns the default callback, which always returns `false`.
2260
+ */
2261
+ get: function () {
2262
+ return this.selectable ? this.isSelected : isSelected;
2263
+ },
2264
+ enumerable: true,
2265
+ configurable: true
2266
+ });
1958
2267
  Object.defineProperty(GanttComponent.prototype, "idGetter", {
1959
2268
  /**
1960
2269
  * @hidden
@@ -1981,6 +2290,16 @@ var GanttComponent = /** @class */ (function () {
1981
2290
  enumerable: true,
1982
2291
  configurable: true
1983
2292
  });
2293
+ Object.defineProperty(GanttComponent.prototype, "editDialogFormGroup", {
2294
+ /**
2295
+ * @hidden
2296
+ */
2297
+ get: function () {
2298
+ return this.editService.formGroup;
2299
+ },
2300
+ enumerable: true,
2301
+ configurable: true
2302
+ });
1984
2303
  GanttComponent.prototype.ngOnChanges = function (changes) {
1985
2304
  if (anyChanged(['data', 'activeView', 'workWeekStart', 'workWeekEnd', 'workDayStart', 'workDayEnd'], changes)) {
1986
2305
  this.loadTimelineData();
@@ -2000,6 +2319,10 @@ var GanttComponent = /** @class */ (function () {
2000
2319
  };
2001
2320
  GanttComponent.prototype.ngOnDestroy = function () {
2002
2321
  this.optionChangesSubscriptions.unsubscribe();
2322
+ this.editServiceSubscription.unsubscribe();
2323
+ if (this.localizationSubscription) {
2324
+ this.localizationSubscription.unsubscribe();
2325
+ }
2003
2326
  };
2004
2327
  /**
2005
2328
  * Applies the minimum possible width for the specified column,
@@ -2049,6 +2372,55 @@ var GanttComponent = /** @class */ (function () {
2049
2372
  this.treeList.reorderColumn(source, destIndex, options);
2050
2373
  }
2051
2374
  };
2375
+ /**
2376
+ * Updates the data of the Gantt and forces row-related callbacks to be called anew.
2377
+ */
2378
+ GanttComponent.prototype.updateView = function () {
2379
+ if (isPresent(this.treeList)) {
2380
+ this.treeList.updateView();
2381
+ }
2382
+ };
2383
+ /**
2384
+ * Opens the task editing dialog.
2385
+ */
2386
+ GanttComponent.prototype.editTask = function (dataItem, formGroup) {
2387
+ if (!this.showEditingDialog) {
2388
+ this.editService.createEditDialog(dataItem, formGroup);
2389
+ }
2390
+ };
2391
+ /**
2392
+ * Closes the task editing dialog.
2393
+ */
2394
+ GanttComponent.prototype.closeTaskDialog = function () {
2395
+ if (this.showEditingDialog) {
2396
+ this.editService.closeEditDialog();
2397
+ }
2398
+ };
2399
+ /**
2400
+ * Opens the delete task confirmation dialog.
2401
+ */
2402
+ GanttComponent.prototype.openConfirmationDialog = function () {
2403
+ this.showConfirmationDialog = true;
2404
+ };
2405
+ /**
2406
+ * Opens a cell for editing.
2407
+ */
2408
+ GanttComponent.prototype.editCell = function (dataItem, column, formGroup) {
2409
+ this.treeList.editCell(dataItem, column, formGroup);
2410
+ };
2411
+ /**
2412
+ * Closes an edited cell.
2413
+ */
2414
+ GanttComponent.prototype.closeCell = function () {
2415
+ this.treeList.closeCell();
2416
+ };
2417
+ /**
2418
+ * @hidden
2419
+ */
2420
+ GanttComponent.prototype.handleCellClose = function (e) {
2421
+ this.cellClose.emit(Object.assign(e, { item: this.editItem, sender: this }));
2422
+ this.dependencyDomService.notifyChanges();
2423
+ };
2052
2424
  /**
2053
2425
  * @hidden
2054
2426
  */
@@ -2068,16 +2440,6 @@ var GanttComponent = /** @class */ (function () {
2068
2440
  this.dependencyDomService.notifyChanges();
2069
2441
  }
2070
2442
  };
2071
- /**
2072
- * @hidden
2073
- *
2074
- * Used by the GanttExpandableDirective.
2075
- */
2076
- GanttComponent.prototype.updateView = function () {
2077
- if (isPresent(this.treeList)) {
2078
- this.treeList.updateView();
2079
- }
2080
- };
2081
2443
  /**
2082
2444
  * @hidden
2083
2445
  */
@@ -2112,6 +2474,160 @@ var GanttComponent = /** @class */ (function () {
2112
2474
  this._timelinePaneOptions.size = e;
2113
2475
  this.timelinePaneSizeChange.emit(e);
2114
2476
  };
2477
+ /**
2478
+ * @hidden
2479
+ */
2480
+ GanttComponent.prototype.handleTimelineRightClick = function (event) {
2481
+ var _this = this;
2482
+ var target = event.target;
2483
+ var gantt = this.hostElement.nativeElement;
2484
+ if (!isTask(target, gantt) || isClearButton(target, gantt)) {
2485
+ return;
2486
+ }
2487
+ if (hasObservers(this.taskClick)) {
2488
+ var taskIndex_1 = getClosestTaskIndex(target, gantt);
2489
+ var task_1 = this.renderedTreeListItems[taskIndex_1];
2490
+ this.zone.run(function () { return _this.emitTaskClick(event, task_1, taskIndex_1); });
2491
+ }
2492
+ };
2493
+ /**
2494
+ * @hidden
2495
+ */
2496
+ GanttComponent.prototype.handleTimelineClick = function (event) {
2497
+ var _this = this;
2498
+ var target = event.target;
2499
+ var gantt = this.hostElement.nativeElement;
2500
+ if (!isTask(target, gantt) || isClearButton(target, gantt)) {
2501
+ return;
2502
+ }
2503
+ var taskIndex = getClosestTaskIndex(target, gantt);
2504
+ var task = this.renderedTreeListItems[taskIndex];
2505
+ var selectionAction = this.getSelectionAction(event, task);
2506
+ if ((hasObservers(this.selectionChange) && !this.isSameSelection(selectionAction, task)) ||
2507
+ hasObservers(this.taskClick)) {
2508
+ this.zone.run(function () {
2509
+ _this.emitSelectionChange(task, selectionAction);
2510
+ _this.emitTaskClick(event, task, taskIndex);
2511
+ });
2512
+ }
2513
+ };
2514
+ /**
2515
+ * @hidden
2516
+ */
2517
+ GanttComponent.prototype.handleTreeListDoubleClick = function (event) {
2518
+ var _this = this;
2519
+ if (!isPresent(this.lastTreeListCellClick) || event.target !== this.lastTreeListCellClick.originalEvent.target) {
2520
+ return;
2521
+ }
2522
+ this.editItem = getEditItem(this.lastTreeListCellClick.dataItem, this.treeList.view.data, this.mapper);
2523
+ if (hasObservers(this.cellDblClick)) {
2524
+ this.zone.run(function () {
2525
+ _this.cellDblClick.emit({
2526
+ column: _this.lastTreeListCellClick.column,
2527
+ columnIndex: _this.lastTreeListCellClick.columnIndex,
2528
+ dataItem: _this.lastTreeListCellClick.dataItem,
2529
+ isEdited: _this.lastTreeListCellClick.isEdited,
2530
+ originalEvent: _this.lastTreeListCellClick.originalEvent,
2531
+ rowIndex: _this.lastTreeListCellClick.rowIndex,
2532
+ type: 'dblclick',
2533
+ sender: _this
2534
+ });
2535
+ });
2536
+ }
2537
+ };
2538
+ /**
2539
+ * @hidden
2540
+ */
2541
+ GanttComponent.prototype.handleTreeListSelectionChange = function (event) {
2542
+ // prevent selection change from right-click
2543
+ if (isPresent(this.lastTreeListCellClick) && this.lastTreeListCellClick.type === 'contextmenu') {
2544
+ return;
2545
+ }
2546
+ var task = event.items.map(function (item) { return item.dataItem; })[0]; // single selection only currently available
2547
+ var action = event.action;
2548
+ this.emitSelectionChange(task, action);
2549
+ };
2550
+ /**
2551
+ * @hidden
2552
+ */
2553
+ GanttComponent.prototype.handleTreeListCellClick = function (event) {
2554
+ this.lastTreeListCellClick = event;
2555
+ this.cellClick.emit({
2556
+ column: event.column,
2557
+ columnIndex: event.columnIndex,
2558
+ dataItem: event.dataItem,
2559
+ isEdited: event.isEdited,
2560
+ originalEvent: event.originalEvent,
2561
+ rowIndex: event.rowIndex,
2562
+ type: event.type,
2563
+ sender: this
2564
+ });
2565
+ };
2566
+ /**
2567
+ * @hidden
2568
+ */
2569
+ GanttComponent.prototype.handleDeleteConfirmation = function () {
2570
+ this.editService.triggerEditEvent('remove');
2571
+ };
2572
+ /**
2573
+ * @hidden
2574
+ */
2575
+ GanttComponent.prototype.handleTimelineMouseDown = function (event) {
2576
+ var target = event.target;
2577
+ var gantt = this.hostElement.nativeElement;
2578
+ if (!isTask(target, gantt) || isClearButton(target, gantt)) {
2579
+ return;
2580
+ }
2581
+ event.preventDefault();
2582
+ };
2583
+ /**
2584
+ * @hidden
2585
+ */
2586
+ GanttComponent.prototype.handleTimelineDblClick = function (event) {
2587
+ var _this = this;
2588
+ var target = event.target;
2589
+ var gantt = this.hostElement.nativeElement;
2590
+ if (!isTask(target, gantt) || isClearButton(target, gantt)) {
2591
+ return;
2592
+ }
2593
+ if (hasObservers(this.taskDblClick)) {
2594
+ var taskIndex_2 = getClosestTaskIndex(target, gantt);
2595
+ var task_2 = this.renderedTreeListItems[taskIndex_2];
2596
+ this.zone.run(function () { return _this.taskDblClick.emit({
2597
+ dataItem: task_2,
2598
+ originalEvent: event,
2599
+ sender: _this,
2600
+ rowIndex: taskIndex_2,
2601
+ type: 'dblclick'
2602
+ }); });
2603
+ }
2604
+ };
2605
+ /**
2606
+ * @hidden
2607
+ */
2608
+ GanttComponent.prototype.getText = function (token) {
2609
+ return this.localizationService.get(token);
2610
+ };
2611
+ GanttComponent.prototype.emitTaskClick = function (event, dataItem, itemIndex) {
2612
+ this.taskClick.emit({
2613
+ originalEvent: event,
2614
+ dataItem: dataItem,
2615
+ rowIndex: itemIndex,
2616
+ type: event.type,
2617
+ sender: this
2618
+ });
2619
+ };
2620
+ GanttComponent.prototype.emitSelectionChange = function (dataItem, action) {
2621
+ if (this.isSameSelection(action, dataItem)) {
2622
+ return;
2623
+ }
2624
+ this.selectionChange.emit({
2625
+ action: action,
2626
+ items: [dataItem],
2627
+ sender: this
2628
+ });
2629
+ this.updateView();
2630
+ };
2115
2631
  GanttComponent.prototype.updateTreeListGroupClass = function (columns) {
2116
2632
  if (columns === void 0) { columns = this.columns; }
2117
2633
  if (!isPresent(this.treeList)) {
@@ -2142,6 +2658,14 @@ var GanttComponent = /** @class */ (function () {
2142
2658
  }
2143
2659
  return this.views.find(function (view) { return view.type === _this.activeView; });
2144
2660
  };
2661
+ GanttComponent.prototype.isSameSelection = function (action, dataItem) {
2662
+ return action === 'select' && this.isSelected(dataItem);
2663
+ };
2664
+ GanttComponent.prototype.getSelectionAction = function (_a, dataItem) {
2665
+ var ctrlKey = _a.ctrlKey, metaKey = _a.metaKey;
2666
+ var shouldToggleSelection = ctrlKey || metaKey;
2667
+ return (shouldToggleSelection && this.isSelected(dataItem)) ? 'remove' : 'select';
2668
+ };
2145
2669
  var GanttComponent_1;
2146
2670
  __decorate([
2147
2671
  ViewChild(TreeListComponent, { static: true }),
@@ -2167,6 +2691,11 @@ var GanttComponent = /** @class */ (function () {
2167
2691
  HostBinding('class.k-gantt'),
2168
2692
  __metadata("design:type", Boolean)
2169
2693
  ], GanttComponent.prototype, "hostClasses", void 0);
2694
+ __decorate([
2695
+ HostBinding('attr.dir'),
2696
+ __metadata("design:type", String),
2697
+ __metadata("design:paramtypes", [])
2698
+ ], GanttComponent.prototype, "dir", null);
2170
2699
  __decorate([
2171
2700
  ContentChildren(GanttColumnBase),
2172
2701
  __metadata("design:type", QueryList),
@@ -2196,6 +2725,18 @@ var GanttComponent = /** @class */ (function () {
2196
2725
  __metadata("design:type", Array),
2197
2726
  __metadata("design:paramtypes", [Array])
2198
2727
  ], GanttComponent.prototype, "data", null);
2728
+ __decorate([
2729
+ Input(),
2730
+ __metadata("design:type", Function)
2731
+ ], GanttComponent.prototype, "isSelected", void 0);
2732
+ __decorate([
2733
+ Output(),
2734
+ __metadata("design:type", EventEmitter)
2735
+ ], GanttComponent.prototype, "selectionChange", void 0);
2736
+ __decorate([
2737
+ Input(),
2738
+ __metadata("design:type", Boolean)
2739
+ ], GanttComponent.prototype, "selectable", void 0);
2199
2740
  __decorate([
2200
2741
  Input(),
2201
2742
  __metadata("design:type", String)
@@ -2291,39 +2832,67 @@ var GanttComponent = /** @class */ (function () {
2291
2832
  __decorate([
2292
2833
  Output(),
2293
2834
  __metadata("design:type", EventEmitter)
2294
- ], GanttComponent.prototype, "rowCollapse", void 0);
2835
+ ], GanttComponent.prototype, "taskDblClick", void 0);
2295
2836
  __decorate([
2296
2837
  Output(),
2297
2838
  __metadata("design:type", EventEmitter)
2298
- ], GanttComponent.prototype, "sortChange", void 0);
2839
+ ], GanttComponent.prototype, "cellDblClick", void 0);
2299
2840
  __decorate([
2300
2841
  Output(),
2301
2842
  __metadata("design:type", EventEmitter)
2302
- ], GanttComponent.prototype, "filterChange", void 0);
2843
+ ], GanttComponent.prototype, "cellClose", void 0);
2303
2844
  __decorate([
2304
2845
  Output(),
2305
2846
  __metadata("design:type", EventEmitter)
2306
- ], GanttComponent.prototype, "dataStateChange", void 0);
2847
+ ], GanttComponent.prototype, "taskDelete", void 0);
2307
2848
  __decorate([
2308
2849
  Output(),
2309
2850
  __metadata("design:type", EventEmitter)
2310
- ], GanttComponent.prototype, "treeListPaneCollapsedChange", void 0);
2851
+ ], GanttComponent.prototype, "rowCollapse", void 0);
2311
2852
  __decorate([
2312
2853
  Output(),
2313
2854
  __metadata("design:type", EventEmitter)
2314
- ], GanttComponent.prototype, "timelinePaneCollapsedChange", void 0);
2855
+ ], GanttComponent.prototype, "remove", void 0);
2315
2856
  __decorate([
2316
2857
  Output(),
2317
2858
  __metadata("design:type", EventEmitter)
2318
- ], GanttComponent.prototype, "timelinePaneSizeChange", void 0);
2859
+ ], GanttComponent.prototype, "cancel", void 0);
2319
2860
  __decorate([
2320
2861
  Output(),
2321
2862
  __metadata("design:type", EventEmitter)
2322
- ], GanttComponent.prototype, "activeViewChange", void 0);
2863
+ ], GanttComponent.prototype, "save", void 0);
2323
2864
  __decorate([
2324
2865
  Output(),
2325
2866
  __metadata("design:type", EventEmitter)
2326
- ], GanttComponent.prototype, "columnResize", void 0);
2867
+ ], GanttComponent.prototype, "sortChange", void 0);
2868
+ __decorate([
2869
+ Output(),
2870
+ __metadata("design:type", EventEmitter)
2871
+ ], GanttComponent.prototype, "filterChange", void 0);
2872
+ __decorate([
2873
+ Output(),
2874
+ __metadata("design:type", EventEmitter)
2875
+ ], GanttComponent.prototype, "dataStateChange", void 0);
2876
+ __decorate([
2877
+ Output(),
2878
+ __metadata("design:type", EventEmitter)
2879
+ ], GanttComponent.prototype, "treeListPaneCollapsedChange", void 0);
2880
+ __decorate([
2881
+ Output(),
2882
+ __metadata("design:type", EventEmitter)
2883
+ ], GanttComponent.prototype, "timelinePaneCollapsedChange", void 0);
2884
+ __decorate([
2885
+ Output(),
2886
+ __metadata("design:type", EventEmitter)
2887
+ ], GanttComponent.prototype, "timelinePaneSizeChange", void 0);
2888
+ __decorate([
2889
+ Output(),
2890
+ __metadata("design:type", EventEmitter)
2891
+ ], GanttComponent.prototype, "activeViewChange", void 0);
2892
+ __decorate([
2893
+ Output(),
2894
+ __metadata("design:type", EventEmitter)
2895
+ ], GanttComponent.prototype, "columnResize", void 0);
2327
2896
  __decorate([
2328
2897
  Output(),
2329
2898
  __metadata("design:type", EventEmitter)
@@ -2336,10 +2905,20 @@ var GanttComponent = /** @class */ (function () {
2336
2905
  Output(),
2337
2906
  __metadata("design:type", EventEmitter)
2338
2907
  ], GanttComponent.prototype, "columnLockedChange", void 0);
2908
+ __decorate([
2909
+ Output(),
2910
+ __metadata("design:type", EventEmitter)
2911
+ ], GanttComponent.prototype, "cellClick", void 0);
2912
+ __decorate([
2913
+ Output(),
2914
+ __metadata("design:type", EventEmitter)
2915
+ ], GanttComponent.prototype, "taskClick", void 0);
2339
2916
  GanttComponent = GanttComponent_1 = __decorate([
2340
2917
  Component({
2341
2918
  selector: 'kendo-gantt',
2919
+ exportAs: 'kendoGantt',
2342
2920
  providers: [
2921
+ LocalizationService,
2343
2922
  {
2344
2923
  provide: DataBoundTreeComponent,
2345
2924
  useExisting: forwardRef(function () { return GanttComponent_1; })
@@ -2355,16 +2934,21 @@ var GanttComponent = /** @class */ (function () {
2355
2934
  ScrollSyncService,
2356
2935
  DependencyDomService,
2357
2936
  MappingService,
2358
- OptionChangesService
2937
+ OptionChangesService,
2938
+ EditService
2359
2939
  ],
2360
- 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 "
2940
+ 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 "
2361
2941
  }),
2362
2942
  __metadata("design:paramtypes", [TimelineViewService,
2363
2943
  ScrollSyncService,
2364
2944
  Renderer2,
2365
2945
  MappingService,
2366
2946
  OptionChangesService,
2367
- DependencyDomService])
2947
+ DependencyDomService,
2948
+ EditService,
2949
+ LocalizationService,
2950
+ ElementRef,
2951
+ NgZone])
2368
2952
  ], GanttComponent);
2369
2953
  return GanttComponent;
2370
2954
  }());
@@ -2462,6 +3046,10 @@ var GanttTimelineComponent = /** @class */ (function () {
2462
3046
  Input(),
2463
3047
  __metadata("design:type", Function)
2464
3048
  ], GanttTimelineComponent.prototype, "taskClass", void 0);
3049
+ __decorate([
3050
+ Input(),
3051
+ __metadata("design:type", Function)
3052
+ ], GanttTimelineComponent.prototype, "isTaskSelected", void 0);
2465
3053
  __decorate([
2466
3054
  Input(),
2467
3055
  __metadata("design:type", Function)
@@ -2473,7 +3061,7 @@ var GanttTimelineComponent = /** @class */ (function () {
2473
3061
  GanttTimelineComponent = __decorate([
2474
3062
  Component({
2475
3063
  selector: 'kendo-gantt-timeline',
2476
- template: "\n <div class=\"k-timeline k-grid k-widget\">\n <div class=\"k-grid-header\">\n <div #timelineHeaderWrap class=\"k-grid-header-wrap\">\n <table\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttHeaderTableBody\n [groupSlots]=\"groupSlots\"\n [slots]=\"slots\">\n </tbody>\n </table>\n </div>\n </div>\n <div #timelineContent class=\"k-grid-content\">\n <div class=\"k-gantt-tables\">\n <table\n class=\"k-gantt-rows\"\n [style.width.px]=\"tableWidth\"\n role=\"presentation\"\n >\n <tbody>\n <tr *ngFor=\"let item of rows; let i = index;\"\n [class.k-alt]=\"i % 2\"\n >\n <td></td>\n </tr>\n </tbody>\n </table>\n\n <table\n #timelineColumns\n class=\"k-gantt-columns\"\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <colgroup>\n <col *ngFor=\"let item of slots\">\n </colgroup>\n\n <tbody>\n <tr>\n <td *ngFor=\"let item of slots\"\n [class.k-nonwork-hour]=\"isNonWorking(item)\"\n >\n </td>\n </tr>\n </tbody>\n </table>\n\n <table\n #tasksContainer\n class=\"k-gantt-tasks\"\n role=\"presentation\"\n style=\"border-collapse: collapse;\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttTasksTableBody\n [rows]=\"rows\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [summaryTaskTemplate]=\"summaryTaskTemplate\"\n [taskClass]=\"taskClass\"\n [hasChildren]=\"hasChildren\"\n >\n </tbody>\n </table>\n </div>\n <svg class=\"k-gantt-dependencies-svg\">\n <polyline\n *ngFor=\"let dependency of dependencies\"\n kendoGanttDependency\n [dependency]=\"dependency\"\n />\n </svg>\n </div>\n </div>\n "
3064
+ template: "\n <div class=\"k-timeline k-grid k-widget\">\n <div class=\"k-grid-header\">\n <div #timelineHeaderWrap class=\"k-grid-header-wrap\">\n <table\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttHeaderTableBody\n [groupSlots]=\"groupSlots\"\n [slots]=\"slots\">\n </tbody>\n </table>\n </div>\n </div>\n <div #timelineContent class=\"k-grid-content\">\n <div class=\"k-gantt-tables\">\n <table\n class=\"k-gantt-rows\"\n [style.width.px]=\"tableWidth\"\n role=\"presentation\"\n >\n <tbody>\n <tr *ngFor=\"let item of rows; let i = index;\"\n [class.k-alt]=\"i % 2\"\n >\n <td></td>\n </tr>\n </tbody>\n </table>\n\n <table\n #timelineColumns\n class=\"k-gantt-columns\"\n role=\"presentation\"\n [style.width.px]=\"tableWidth\"\n >\n <colgroup>\n <col *ngFor=\"let item of slots\">\n </colgroup>\n\n <tbody>\n <tr>\n <td *ngFor=\"let item of slots\"\n [class.k-nonwork-hour]=\"isNonWorking(item)\"\n >\n </td>\n </tr>\n </tbody>\n </table>\n\n <table\n #tasksContainer\n class=\"k-gantt-tasks\"\n role=\"presentation\"\n style=\"border-collapse: collapse;\"\n [style.width.px]=\"tableWidth\"\n >\n <tbody\n kendoGanttTasksTableBody\n [rows]=\"rows\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [summaryTaskTemplate]=\"summaryTaskTemplate\"\n [taskClass]=\"taskClass\"\n [hasChildren]=\"hasChildren\"\n [isTaskSelected]=\"isTaskSelected\"\n >\n </tbody>\n </table>\n </div>\n <svg class=\"k-gantt-dependencies-svg\">\n <polyline\n *ngFor=\"let dependency of dependencies\"\n kendoGanttDependency\n [dependency]=\"dependency\"\n />\n </svg>\n </div>\n </div>\n "
2477
3065
  }),
2478
3066
  __metadata("design:paramtypes", [ScrollSyncService,
2479
3067
  DependencyDomService,
@@ -2538,10 +3126,14 @@ var GanttTasksTableBodyComponent = /** @class */ (function () {
2538
3126
  Input(),
2539
3127
  __metadata("design:type", Function)
2540
3128
  ], GanttTasksTableBodyComponent.prototype, "hasChildren", void 0);
3129
+ __decorate([
3130
+ Input(),
3131
+ __metadata("design:type", Function)
3132
+ ], GanttTasksTableBodyComponent.prototype, "isTaskSelected", void 0);
2541
3133
  GanttTasksTableBodyComponent = __decorate([
2542
3134
  Component({
2543
3135
  selector: '[kendoGanttTasksTableBody]',
2544
- template: "\n <tr #timelineRow *ngFor=\"let item of rows\">\n <td>\n <kendo-gantt-milestone-task\n *ngIf=\"isMileStone(item); else task\"\n [dataItem]=\"item\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n >\n </kendo-gantt-milestone-task>\n <ng-template #task>\n <kendo-gantt-summary-task\n *ngIf=\"hasChildren(item)\"\n [dataItem]=\"item\"\n [template]=\"summaryTaskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n >\n </kendo-gantt-summary-task>\n <kendo-gantt-task\n *ngIf=\"!hasChildren(item)\"\n [dataItem]=\"item\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n >\n </kendo-gantt-task>\n </ng-template>\n </td>\n </tr>\n "
3136
+ template: "\n <tr #timelineRow *ngFor=\"let item of rows; let index = index\">\n <td>\n <kendo-gantt-milestone-task\n *ngIf=\"isMileStone(item); else task\"\n [dataItem]=\"item\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n >\n </kendo-gantt-milestone-task>\n <ng-template #task>\n <kendo-gantt-summary-task\n *ngIf=\"hasChildren(item)\"\n [dataItem]=\"item\"\n [template]=\"summaryTaskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n >\n </kendo-gantt-summary-task>\n <kendo-gantt-task\n *ngIf=\"!hasChildren(item)\"\n [dataItem]=\"item\"\n [taskContentTemplate]=\"taskContentTemplate\"\n [taskTemplate]=\"taskTemplate\"\n [activeView]=\"activeView\"\n [taskClass]=\"taskClass\"\n [isSelected]=\"isTaskSelected\"\n [index]=\"index\"\n >\n </kendo-gantt-task>\n </ng-template>\n </td>\n </tr>\n "
2545
3137
  }),
2546
3138
  __metadata("design:paramtypes", [DependencyDomService,
2547
3139
  MappingService])
@@ -2674,6 +3266,14 @@ var GanttTaskBase = /** @class */ (function () {
2674
3266
  Input(),
2675
3267
  __metadata("design:type", Object)
2676
3268
  ], GanttTaskBase.prototype, "dataItem", void 0);
3269
+ __decorate([
3270
+ Input(),
3271
+ __metadata("design:type", Number)
3272
+ ], GanttTaskBase.prototype, "index", void 0);
3273
+ __decorate([
3274
+ Input(),
3275
+ __metadata("design:type", Function)
3276
+ ], GanttTaskBase.prototype, "isSelected", void 0);
2677
3277
  __decorate([
2678
3278
  Input(),
2679
3279
  __metadata("design:type", String)
@@ -2690,10 +3290,16 @@ var GanttTaskBase = /** @class */ (function () {
2690
3290
  */
2691
3291
  var GanttTaskComponent = /** @class */ (function (_super) {
2692
3292
  __extends(GanttTaskComponent, _super);
2693
- function GanttTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
2694
- return _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
3293
+ function GanttTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, editService) {
3294
+ var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
3295
+ _this.editService = editService;
3296
+ return _this;
2695
3297
  }
2696
3298
  GanttTaskComponent_1 = GanttTaskComponent;
3299
+ GanttTaskComponent.prototype.onTaskDelete = function () {
3300
+ this.editService.dataItem = this.dataItem;
3301
+ this.editService.showConfirmationDialog.next();
3302
+ };
2697
3303
  var GanttTaskComponent_1;
2698
3304
  __decorate([
2699
3305
  Input(),
@@ -2712,13 +3318,14 @@ var GanttTaskComponent = /** @class */ (function (_super) {
2712
3318
  useExisting: forwardRef(function () { return GanttTaskComponent_1; })
2713
3319
  }
2714
3320
  ],
2715
- template: "\n <div\n #task\n class=\"k-task k-task-single\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [style.left.px]=\"taskOffset\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n >\n <ng-container *ngIf=\"!taskTemplate\">\n <div\n class=\"k-task-complete\"\n [style.width.px]=\"completionOverlayWidth\"\n >\n </div>\n <div class=\"k-task-content\">\n <div class=\"k-task-template\">\n <ng-container *ngIf=\"!taskContentTemplate; else taskContent\">\n {{ mapper.extractFromTask(dataItem, 'title') }}\n </ng-container>\n <ng-template\n #taskContent\n [ngTemplateOutlet]=\"taskContentTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"\n >\n </ng-template>\n </div>\n </div>\n </ng-container>\n <ng-template\n *ngIf=\"taskTemplate\"\n [ngTemplateOutlet]=\"taskTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataItem,\n elementWidth: taskWidth\n }\"\n >\n </ng-template>\n </div>\n "
3321
+ template: "\n <div\n #task\n class=\"k-task k-task-single\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [style.left.px]=\"taskOffset\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [attr.data-task-index]=\"index\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n >\n <ng-container *ngIf=\"!taskTemplate\">\n <div\n class=\"k-task-complete\"\n [style.width.px]=\"completionOverlayWidth\"\n >\n </div>\n <div class=\"k-task-content\">\n <div class=\"k-task-template\">\n <ng-container *ngIf=\"!taskContentTemplate; else taskContent\">\n {{ mapper.extractFromTask(dataItem, 'title') }}\n </ng-container>\n <ng-template\n #taskContent\n [ngTemplateOutlet]=\"taskContentTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"\n >\n </ng-template>\n </div>\n <span class=\"k-task-actions\">\n <span\n (click)=\"onTaskDelete()\"\n class=\"k-link k-task-delete\">\n <span class=\"k-icon k-i-close\"></span>\n </span>\n </span>\n </div>\n </ng-container>\n <ng-template\n *ngIf=\"taskTemplate\"\n [ngTemplateOutlet]=\"taskTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataItem,\n elementWidth: taskWidth\n }\"\n >\n </ng-template>\n </div>\n "
2716
3322
  }),
2717
3323
  __metadata("design:paramtypes", [MappingService,
2718
3324
  TimelineViewService,
2719
3325
  DependencyDomService,
2720
3326
  OptionChangesService,
2721
- ChangeDetectorRef])
3327
+ ChangeDetectorRef,
3328
+ EditService])
2722
3329
  ], GanttTaskComponent);
2723
3330
  return GanttTaskComponent;
2724
3331
  }(GanttTaskBase));
@@ -2752,7 +3359,7 @@ var GanttSummaryTaskComponent = /** @class */ (function (_super) {
2752
3359
  useExisting: forwardRef(function () { return GanttSummaryTaskComponent_1; })
2753
3360
  }
2754
3361
  ],
2755
- template: "\n <div\n #task\n class=\"k-task k-task-summary\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [style.left.px]=\"taskOffset\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n >\n <div *ngIf=\"!template; else summaryTemplate\"\n class=\"k-task-summary-progress\"\n [style.width.px]=\"taskWidth\">\n <div\n class=\"k-task-summary-complete\"\n [style.width.px]=\"completionOverlayWidth\"\n >\n </div>\n </div>\n <ng-template\n #summaryTemplate\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataItem,\n elementWidth: taskWidth\n }\"\n >\n </ng-template>\n </div>\n "
3362
+ template: "\n <div\n #task\n class=\"k-task k-task-summary\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.width.px]=\"taskWidth\"\n [style.left.px]=\"taskOffset\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [attr.data-task-index]=\"index\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n >\n <div *ngIf=\"!template; else summaryTemplate\"\n class=\"k-task-summary-progress\"\n [style.width.px]=\"taskWidth\">\n <div\n class=\"k-task-summary-complete\"\n [style.width.px]=\"completionOverlayWidth\"\n >\n </div>\n </div>\n <ng-template\n #summaryTemplate\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataItem,\n elementWidth: taskWidth\n }\"\n >\n </ng-template>\n </div>\n "
2756
3363
  }),
2757
3364
  __metadata("design:paramtypes", [MappingService,
2758
3365
  TimelineViewService,
@@ -2788,7 +3395,7 @@ var GanttMilestoneTaskComponent = /** @class */ (function (_super) {
2788
3395
  useExisting: forwardRef(function () { return GanttMilestoneTaskComponent_1; })
2789
3396
  }
2790
3397
  ],
2791
- template: "\n <div\n #task\n class=\"k-task k-task-milestone\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.left.px]=\"taskOffset\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n >\n </div>\n "
3398
+ template: "\n <div\n #task\n class=\"k-task k-task-milestone\"\n [ngClass]=\"taskClass(dataItem)\"\n [style.left.px]=\"taskOffset\"\n [attr.title]=\"mapper.extractFromTask(dataItem, 'title')\"\n [class.k-state-selected]=\"isSelected(dataItem)\"\n [attr.data-task-index]=\"index\"\n >\n </div>\n "
2792
3399
  }),
2793
3400
  __metadata("design:paramtypes", [MappingService,
2794
3401
  TimelineViewService,
@@ -2876,6 +3483,138 @@ var GanttExpandableDirective = /** @class */ (function (_super) {
2876
3483
  return GanttExpandableDirective;
2877
3484
  }(ExpandableDirective));
2878
3485
 
3486
+ /**
3487
+ * A directive which handles the [`selectionChange`]({% slug api_gantt_ganttcomponent %}#toc-selectionchange) event of the Gantt
3488
+ * ([see example]({% slug selection_gantt %}#toc-built-in-directive))
3489
+ */
3490
+ var SelectableDirective = /** @class */ (function () {
3491
+ function SelectableDirective(gantt) {
3492
+ this.gantt = gantt;
3493
+ /**
3494
+ * Fires when the selected keys are changed.
3495
+ */
3496
+ this.selectedKeysChange = new EventEmitter();
3497
+ this.state = new Set();
3498
+ this.isSelected = this.isSelected.bind(this);
3499
+ this.selectionChange = this.selectionChange.bind(this);
3500
+ this.selectable = true;
3501
+ }
3502
+ Object.defineProperty(SelectableDirective.prototype, "selectable", {
3503
+ /**
3504
+ * @hidden
3505
+ */
3506
+ set: function (value) {
3507
+ if (value) {
3508
+ this.gantt.isSelected = this.isSelected;
3509
+ this.subscribeSelection();
3510
+ }
3511
+ else {
3512
+ this.gantt.isSelected = function () { return false; };
3513
+ this.unsubscribeSelection();
3514
+ }
3515
+ this.gantt.selectable = value;
3516
+ this.gantt.updateView();
3517
+ },
3518
+ enumerable: true,
3519
+ configurable: true
3520
+ });
3521
+ Object.defineProperty(SelectableDirective.prototype, "selectedKeys", {
3522
+ /**
3523
+ * Sets the selected keys.
3524
+ */
3525
+ set: function (value) {
3526
+ if (isPresent(value) && value === this.lastChange) {
3527
+ return;
3528
+ }
3529
+ // prevent multiple items displayed as selected as multiple selection still not supported fully
3530
+ var keys = (value || []).slice(0, 1);
3531
+ this.state = new Set(keys);
3532
+ this.gantt.updateView();
3533
+ },
3534
+ enumerable: true,
3535
+ configurable: true
3536
+ });
3537
+ Object.defineProperty(SelectableDirective.prototype, "itemKey", {
3538
+ /**
3539
+ * The field name or a function that specifies the data item unique key identifier.
3540
+ * By default, the string field `id` is used.
3541
+ */
3542
+ set: function (value) {
3543
+ if (isString(value)) {
3544
+ this._keyGetter = getter(value);
3545
+ }
3546
+ else {
3547
+ this._keyGetter = value;
3548
+ }
3549
+ },
3550
+ enumerable: true,
3551
+ configurable: true
3552
+ });
3553
+ Object.defineProperty(SelectableDirective.prototype, "keyGetter", {
3554
+ get: function () {
3555
+ return this._keyGetter || this.gantt.idGetter;
3556
+ },
3557
+ enumerable: true,
3558
+ configurable: true
3559
+ });
3560
+ SelectableDirective.prototype.ngOnDestroy = function () {
3561
+ this.unsubscribeSelection();
3562
+ };
3563
+ SelectableDirective.prototype.isSelected = function (dataItem) {
3564
+ return this.state.has(this.keyGetter(dataItem));
3565
+ };
3566
+ SelectableDirective.prototype.selectionChange = function (_a) {
3567
+ var _this = this;
3568
+ var action = _a.action, items = _a.items;
3569
+ this.state.clear();
3570
+ if (action === 'select') {
3571
+ items.forEach(function (item) { return _this.state.add(_this.keyGetter(item)); });
3572
+ }
3573
+ this.emitSelectedItemsChange();
3574
+ };
3575
+ SelectableDirective.prototype.emitSelectedItemsChange = function () {
3576
+ this.lastChange = Array.from(this.state);
3577
+ this.selectedKeysChange.emit(this.lastChange);
3578
+ };
3579
+ SelectableDirective.prototype.subscribeSelection = function () {
3580
+ this.unsubscribeSelection();
3581
+ this.selectionSubscription = this.gantt.selectionChange.subscribe(this.selectionChange);
3582
+ };
3583
+ SelectableDirective.prototype.unsubscribeSelection = function () {
3584
+ if (this.selectionSubscription) {
3585
+ this.selectionSubscription.unsubscribe();
3586
+ this.selectionSubscription = null;
3587
+ }
3588
+ };
3589
+ __decorate([
3590
+ Input(),
3591
+ __metadata("design:type", Boolean),
3592
+ __metadata("design:paramtypes", [Boolean])
3593
+ ], SelectableDirective.prototype, "selectable", null);
3594
+ __decorate([
3595
+ Input(),
3596
+ __metadata("design:type", Array),
3597
+ __metadata("design:paramtypes", [Array])
3598
+ ], SelectableDirective.prototype, "selectedKeys", null);
3599
+ __decorate([
3600
+ Output(),
3601
+ __metadata("design:type", EventEmitter)
3602
+ ], SelectableDirective.prototype, "selectedKeysChange", void 0);
3603
+ __decorate([
3604
+ Input(),
3605
+ __metadata("design:type", Object),
3606
+ __metadata("design:paramtypes", [Object])
3607
+ ], SelectableDirective.prototype, "itemKey", null);
3608
+ SelectableDirective = __decorate([
3609
+ Directive({
3610
+ exportAs: 'kendoGanttSelectable',
3611
+ selector: '[kendoGanttSelectable]'
3612
+ }),
3613
+ __metadata("design:paramtypes", [GanttComponent])
3614
+ ], SelectableDirective);
3615
+ return SelectableDirective;
3616
+ }());
3617
+
2879
3618
  /**
2880
3619
  * @hidden
2881
3620
  */
@@ -2937,7 +3676,8 @@ var ToolbarComponent = /** @class */ (function () {
2937
3676
  * The Gantt ViewSelector component. Shows the currently active view type, and allows switching to another view type.
2938
3677
  */
2939
3678
  var ViewSelectorComponent = /** @class */ (function () {
2940
- function ViewSelectorComponent() {
3679
+ function ViewSelectorComponent(localizationService) {
3680
+ this.localizationService = localizationService;
2941
3681
  this.hostClass = true;
2942
3682
  /**
2943
3683
  * The currently active view type.
@@ -2961,7 +3701,7 @@ var ViewSelectorComponent = /** @class */ (function () {
2961
3701
  * @hidden
2962
3702
  */
2963
3703
  ViewSelectorComponent.prototype.getViewTypeText = function (viewType) {
2964
- return "" + viewType[0].toLocaleUpperCase() + viewType.slice(1);
3704
+ return this.localizationService.get(viewType + "ViewText");
2965
3705
  };
2966
3706
  __decorate([
2967
3707
  HostBinding('class.k-gantt-views-wrapper'),
@@ -2982,8 +3722,9 @@ var ViewSelectorComponent = /** @class */ (function () {
2982
3722
  ViewSelectorComponent = __decorate([
2983
3723
  Component({
2984
3724
  selector: 'kendo-gantt-view-selector',
2985
- template: "\n <select class=\"k-dropdown k-views-dropdown\" style=\"text-transform: capitalize;\"\n [value]=\"activeView\"\n (change)=\"activeViewChange.emit($event.target.value)\">\n <option *ngFor=\"let view of views\" [value]=\"view\">{{getViewTypeText(view)}}</option>\n </select>\n <kendo-buttongroup class=\"k-gantt-views\" selection=\"single\">\n <button *ngFor=\"let view of views\"\n kendoButton\n [selected]=\"view === activeView\"\n (click)=\"onClick(view)\">{{getViewTypeText(view)}}</button>\n </kendo-buttongroup>\n "
2986
- })
3725
+ template: "\n <select class=\"k-dropdown k-views-dropdown\"\n [value]=\"activeView\"\n (change)=\"activeViewChange.emit($event.target.value)\">\n <option *ngFor=\"let view of views\" [value]=\"view\">{{getViewTypeText(view)}}</option>\n </select>\n <kendo-buttongroup class=\"k-gantt-views\" selection=\"single\">\n <button *ngFor=\"let view of views\"\n kendoButton\n type=\"button\"\n [selected]=\"view === activeView\"\n (click)=\"onClick(view)\">{{getViewTypeText(view)}}</button>\n </kendo-buttongroup>\n "
3726
+ }),
3727
+ __metadata("design:paramtypes", [LocalizationService])
2987
3728
  ], ViewSelectorComponent);
2988
3729
  return ViewSelectorComponent;
2989
3730
  }());
@@ -3310,11 +4051,378 @@ var TimelineMonthViewComponent = /** @class */ (function (_super) {
3310
4051
  return TimelineMonthViewComponent;
3311
4052
  }(ViewBase));
3312
4053
 
4054
+ /**
4055
+ * @hidden
4056
+ */
4057
+ var EditDialogComponent = /** @class */ (function () {
4058
+ function EditDialogComponent(mapper, editService, localizationService) {
4059
+ this.mapper = mapper;
4060
+ this.editService = editService;
4061
+ this.localizationService = localizationService;
4062
+ }
4063
+ EditDialogComponent.prototype.getText = function (token) {
4064
+ return this.localizationService.get(token);
4065
+ };
4066
+ EditDialogComponent.prototype.handleEditingResult = function (editResultType) {
4067
+ this.editService.triggerEditEvent(editResultType);
4068
+ };
4069
+ EditDialogComponent.prototype.onTaskDelete = function () {
4070
+ this.editService.showConfirmationDialog.next();
4071
+ };
4072
+ __decorate([
4073
+ Input(),
4074
+ __metadata("design:type", FormGroup)
4075
+ ], EditDialogComponent.prototype, "formGroup", void 0);
4076
+ EditDialogComponent = __decorate([
4077
+ Component({
4078
+ selector: 'kendo-gantt-edit-dialog',
4079
+ template: "\n <kendo-dialog\n [title]=\"getText('taskEditingDialogTitle')\"\n [width]=\"575\"\n [height]=\"470\"\n (close)=\"handleEditingResult('cancel')\">\n <kendo-dialog-messages\n [closeTitle]=\"getText('taskEditingDialogCloseTitle')\"></kendo-dialog-messages>\n <form class=\"k-form\" [formGroup]=\"formGroup\">\n <kendo-formfield *ngIf=\"formGroup.contains(mapper.taskFields.title)\">\n <kendo-label [for]=\"mapper.taskFields.title\" [text]=\"getText('titleFieldInputLabel')\"></kendo-label>\n <input class=\"k-textbox\" [formControlName]=\"mapper.taskFields.title\" />\n </kendo-formfield>\n <div class=\"k-hstack\">\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.start)\">\n <kendo-label [for]=\"mapper.taskFields.start\" [text]=\"getText('startFieldInputLabel')\"></kendo-label>\n <kendo-datetimepicker [formControlName]=\"mapper.taskFields.start\"></kendo-datetimepicker>\n </kendo-formfield>\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.end)\">\n <kendo-label [for]=\"mapper.taskFields.end\" [text]=\"getText('endFieldInputLabel')\"></kendo-label>\n <kendo-datetimepicker [formControlName]=\"mapper.taskFields.end\"></kendo-datetimepicker>\n </kendo-formfield>\n </div>\n <kendo-formfield [style.width.%]=\"49\" *ngIf=\"formGroup.contains(mapper.taskFields.completionRatio)\">\n <kendo-label [for]=\"mapper.taskFields.completionRatio\" [text]=\"getText('completionRatioFieldInputLabel')\"></kendo-label>\n <kendo-numerictextbox\n [formControlName]=\"mapper.taskFields.completionRatio\"\n [min]=\"0\"\n [max]=\"1\"\n [decimals]=\"2\"\n format=\"p2\"\n [step]=\"0.01\"\n ></kendo-numerictextbox>\n </kendo-formfield>\n </form>\n <kendo-dialog-actions layout=\"normal\">\n <button kendoButton (click)=\"onTaskDelete()\">{{ getText('deleteButtonText') }}</button>\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <button kendoButton [primary]=\"true\" (click)=\"handleEditingResult('save')\">{{ getText('saveButtonText') }}</button>\n <button kendoButton (click)=\"handleEditingResult('cancel')\">{{ getText('cancelButtonText') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
4080
+ }),
4081
+ __metadata("design:paramtypes", [MappingService,
4082
+ EditService,
4083
+ LocalizationService])
4084
+ ], EditDialogComponent);
4085
+ return EditDialogComponent;
4086
+ }());
4087
+
4088
+ /**
4089
+ * @hidden
4090
+ */
4091
+ var Messages = /** @class */ (function (_super) {
4092
+ __extends(Messages, _super);
4093
+ function Messages() {
4094
+ return _super !== null && _super.apply(this, arguments) || this;
4095
+ }
4096
+ __decorate([
4097
+ Input(),
4098
+ __metadata("design:type", String)
4099
+ ], Messages.prototype, "taskDeleteLabel", void 0);
4100
+ __decorate([
4101
+ Input(),
4102
+ __metadata("design:type", String)
4103
+ ], Messages.prototype, "taskEditingDialogTitle", void 0);
4104
+ __decorate([
4105
+ Input(),
4106
+ __metadata("design:type", String)
4107
+ ], Messages.prototype, "taskEditingDialogCloseTitle", void 0);
4108
+ __decorate([
4109
+ Input(),
4110
+ __metadata("design:type", String)
4111
+ ], Messages.prototype, "confirmationDialogCloseTitle", void 0);
4112
+ __decorate([
4113
+ Input(),
4114
+ __metadata("design:type", String)
4115
+ ], Messages.prototype, "confirmationDialogTitle", void 0);
4116
+ __decorate([
4117
+ Input(),
4118
+ __metadata("design:type", String)
4119
+ ], Messages.prototype, "deleteButtonText", void 0);
4120
+ __decorate([
4121
+ Input(),
4122
+ __metadata("design:type", String)
4123
+ ], Messages.prototype, "cancelButtonText", void 0);
4124
+ __decorate([
4125
+ Input(),
4126
+ __metadata("design:type", String)
4127
+ ], Messages.prototype, "saveButtonText", void 0);
4128
+ __decorate([
4129
+ Input(),
4130
+ __metadata("design:type", String)
4131
+ ], Messages.prototype, "titleFieldInputLabel", void 0);
4132
+ __decorate([
4133
+ Input(),
4134
+ __metadata("design:type", String)
4135
+ ], Messages.prototype, "startFieldInputLabel", void 0);
4136
+ __decorate([
4137
+ Input(),
4138
+ __metadata("design:type", String)
4139
+ ], Messages.prototype, "endFieldInputLabel", void 0);
4140
+ __decorate([
4141
+ Input(),
4142
+ __metadata("design:type", String)
4143
+ ], Messages.prototype, "completionRatioFieldInputLabel", void 0);
4144
+ __decorate([
4145
+ Input(),
4146
+ __metadata("design:type", String)
4147
+ ], Messages.prototype, "confirmationDialogContent", void 0);
4148
+ __decorate([
4149
+ Input(),
4150
+ __metadata("design:type", String)
4151
+ ], Messages.prototype, "dayViewText", void 0);
4152
+ __decorate([
4153
+ Input(),
4154
+ __metadata("design:type", String)
4155
+ ], Messages.prototype, "weekViewText", void 0);
4156
+ __decorate([
4157
+ Input(),
4158
+ __metadata("design:type", String)
4159
+ ], Messages.prototype, "monthViewText", void 0);
4160
+ __decorate([
4161
+ Input(),
4162
+ __metadata("design:type", String)
4163
+ ], Messages.prototype, "yearViewText", void 0);
4164
+ __decorate([
4165
+ Input(),
4166
+ __metadata("design:type", String)
4167
+ ], Messages.prototype, "noRecords", void 0);
4168
+ __decorate([
4169
+ Input(),
4170
+ __metadata("design:type", String)
4171
+ ], Messages.prototype, "filter", void 0);
4172
+ __decorate([
4173
+ Input(),
4174
+ __metadata("design:type", String)
4175
+ ], Messages.prototype, "filterEqOperator", void 0);
4176
+ __decorate([
4177
+ Input(),
4178
+ __metadata("design:type", String)
4179
+ ], Messages.prototype, "filterNotEqOperator", void 0);
4180
+ __decorate([
4181
+ Input(),
4182
+ __metadata("design:type", String)
4183
+ ], Messages.prototype, "filterIsNullOperator", void 0);
4184
+ __decorate([
4185
+ Input(),
4186
+ __metadata("design:type", String)
4187
+ ], Messages.prototype, "filterIsNotNullOperator", void 0);
4188
+ __decorate([
4189
+ Input(),
4190
+ __metadata("design:type", String)
4191
+ ], Messages.prototype, "filterIsEmptyOperator", void 0);
4192
+ __decorate([
4193
+ Input(),
4194
+ __metadata("design:type", String)
4195
+ ], Messages.prototype, "filterIsNotEmptyOperator", void 0);
4196
+ __decorate([
4197
+ Input(),
4198
+ __metadata("design:type", String)
4199
+ ], Messages.prototype, "filterStartsWithOperator", void 0);
4200
+ __decorate([
4201
+ Input(),
4202
+ __metadata("design:type", String)
4203
+ ], Messages.prototype, "filterContainsOperator", void 0);
4204
+ __decorate([
4205
+ Input(),
4206
+ __metadata("design:type", String)
4207
+ ], Messages.prototype, "filterNotContainsOperator", void 0);
4208
+ __decorate([
4209
+ Input(),
4210
+ __metadata("design:type", String)
4211
+ ], Messages.prototype, "filterEndsWithOperator", void 0);
4212
+ __decorate([
4213
+ Input(),
4214
+ __metadata("design:type", String)
4215
+ ], Messages.prototype, "filterGteOperator", void 0);
4216
+ __decorate([
4217
+ Input(),
4218
+ __metadata("design:type", String)
4219
+ ], Messages.prototype, "filterGtOperator", void 0);
4220
+ __decorate([
4221
+ Input(),
4222
+ __metadata("design:type", String)
4223
+ ], Messages.prototype, "filterLteOperator", void 0);
4224
+ __decorate([
4225
+ Input(),
4226
+ __metadata("design:type", String)
4227
+ ], Messages.prototype, "filterLtOperator", void 0);
4228
+ __decorate([
4229
+ Input(),
4230
+ __metadata("design:type", String)
4231
+ ], Messages.prototype, "filterIsTrue", void 0);
4232
+ __decorate([
4233
+ Input(),
4234
+ __metadata("design:type", String)
4235
+ ], Messages.prototype, "filterIsFalse", void 0);
4236
+ __decorate([
4237
+ Input(),
4238
+ __metadata("design:type", String)
4239
+ ], Messages.prototype, "filterBooleanAll", void 0);
4240
+ __decorate([
4241
+ Input(),
4242
+ __metadata("design:type", String)
4243
+ ], Messages.prototype, "filterAfterOrEqualOperator", void 0);
4244
+ __decorate([
4245
+ Input(),
4246
+ __metadata("design:type", String)
4247
+ ], Messages.prototype, "filterAfterOperator", void 0);
4248
+ __decorate([
4249
+ Input(),
4250
+ __metadata("design:type", String)
4251
+ ], Messages.prototype, "filterBeforeOperator", void 0);
4252
+ __decorate([
4253
+ Input(),
4254
+ __metadata("design:type", String)
4255
+ ], Messages.prototype, "filterBeforeOrEqualOperator", void 0);
4256
+ __decorate([
4257
+ Input(),
4258
+ __metadata("design:type", String)
4259
+ ], Messages.prototype, "filterFilterButton", void 0);
4260
+ __decorate([
4261
+ Input(),
4262
+ __metadata("design:type", String)
4263
+ ], Messages.prototype, "filterClearButton", void 0);
4264
+ __decorate([
4265
+ Input(),
4266
+ __metadata("design:type", String)
4267
+ ], Messages.prototype, "filterAndLogic", void 0);
4268
+ __decorate([
4269
+ Input(),
4270
+ __metadata("design:type", String)
4271
+ ], Messages.prototype, "filterOrLogic", void 0);
4272
+ __decorate([
4273
+ Input(),
4274
+ __metadata("design:type", String)
4275
+ ], Messages.prototype, "loading", void 0);
4276
+ __decorate([
4277
+ Input(),
4278
+ __metadata("design:type", String)
4279
+ ], Messages.prototype, "columnMenu", void 0);
4280
+ __decorate([
4281
+ Input(),
4282
+ __metadata("design:type", String)
4283
+ ], Messages.prototype, "columns", void 0);
4284
+ __decorate([
4285
+ Input(),
4286
+ __metadata("design:type", String)
4287
+ ], Messages.prototype, "lock", void 0);
4288
+ __decorate([
4289
+ Input(),
4290
+ __metadata("design:type", String)
4291
+ ], Messages.prototype, "unlock", void 0);
4292
+ __decorate([
4293
+ Input(),
4294
+ __metadata("design:type", String)
4295
+ ], Messages.prototype, "sortable", void 0);
4296
+ __decorate([
4297
+ Input(),
4298
+ __metadata("design:type", String)
4299
+ ], Messages.prototype, "sortAscending", void 0);
4300
+ __decorate([
4301
+ Input(),
4302
+ __metadata("design:type", String)
4303
+ ], Messages.prototype, "sortDescending", void 0);
4304
+ __decorate([
4305
+ Input(),
4306
+ __metadata("design:type", String)
4307
+ ], Messages.prototype, "sortedAscending", void 0);
4308
+ __decorate([
4309
+ Input(),
4310
+ __metadata("design:type", String)
4311
+ ], Messages.prototype, "sortedDescending", void 0);
4312
+ __decorate([
4313
+ Input(),
4314
+ __metadata("design:type", String)
4315
+ ], Messages.prototype, "sortedDefault", void 0);
4316
+ __decorate([
4317
+ Input(),
4318
+ __metadata("design:type", String)
4319
+ ], Messages.prototype, "columnsApply", void 0);
4320
+ __decorate([
4321
+ Input(),
4322
+ __metadata("design:type", String)
4323
+ ], Messages.prototype, "columnsReset", void 0);
4324
+ return Messages;
4325
+ }(ComponentMessages));
4326
+
4327
+ /**
4328
+ * Custom component messages override default component messages
4329
+ * ([see example]({% slug globalization_treelist %}#toc-localization)).
4330
+ */
4331
+ var CustomMessagesComponent = /** @class */ (function (_super) {
4332
+ __extends(CustomMessagesComponent, _super);
4333
+ function CustomMessagesComponent(service) {
4334
+ var _this = _super.call(this) || this;
4335
+ _this.service = service;
4336
+ return _this;
4337
+ }
4338
+ CustomMessagesComponent_1 = CustomMessagesComponent;
4339
+ Object.defineProperty(CustomMessagesComponent.prototype, "override", {
4340
+ get: function () {
4341
+ return true;
4342
+ },
4343
+ enumerable: true,
4344
+ configurable: true
4345
+ });
4346
+ var CustomMessagesComponent_1;
4347
+ CustomMessagesComponent = CustomMessagesComponent_1 = __decorate([
4348
+ Component({
4349
+ providers: [
4350
+ {
4351
+ provide: Messages,
4352
+ useExisting: forwardRef(function () { return CustomMessagesComponent_1; })
4353
+ }
4354
+ ],
4355
+ selector: 'kendo-gantt-messages',
4356
+ template: ""
4357
+ }),
4358
+ __metadata("design:paramtypes", [LocalizationService])
4359
+ ], CustomMessagesComponent);
4360
+ return CustomMessagesComponent;
4361
+ }(Messages));
4362
+
4363
+ /**
4364
+ * @hidden
4365
+ */
4366
+ var LocalizedMessagesDirective = /** @class */ (function (_super) {
4367
+ __extends(LocalizedMessagesDirective, _super);
4368
+ function LocalizedMessagesDirective(service) {
4369
+ var _this = _super.call(this) || this;
4370
+ _this.service = service;
4371
+ return _this;
4372
+ }
4373
+ LocalizedMessagesDirective_1 = LocalizedMessagesDirective;
4374
+ var LocalizedMessagesDirective_1;
4375
+ LocalizedMessagesDirective = LocalizedMessagesDirective_1 = __decorate([
4376
+ Directive({
4377
+ providers: [
4378
+ {
4379
+ provide: Messages,
4380
+ useExisting: forwardRef(function () { return LocalizedMessagesDirective_1; })
4381
+ }
4382
+ ],
4383
+ selector: '[kendoGanttLocalizedMessages]'
4384
+ }),
4385
+ __metadata("design:paramtypes", [LocalizationService])
4386
+ ], LocalizedMessagesDirective);
4387
+ return LocalizedMessagesDirective;
4388
+ }(Messages));
4389
+
4390
+ /**
4391
+ * @hidden
4392
+ */
4393
+ var GanttTreeListMessagesDirective = /** @class */ (function () {
4394
+ function GanttTreeListMessagesDirective(localizationService) {
4395
+ this.localizationService = localizationService;
4396
+ }
4397
+ GanttTreeListMessagesDirective.prototype.ngAfterViewInit = function () {
4398
+ var _this = this;
4399
+ var treeListServiceDictionary = this.localizationService.dictionary;
4400
+ Object.keys(treeListServiceDictionary)
4401
+ .forEach(function (token) { return treeListServiceDictionary[token] = _this.kendoGanttTreeListMessages.get(token.replace('kendo.treelist.', '')); });
4402
+ };
4403
+ __decorate([
4404
+ Input(),
4405
+ __metadata("design:type", LocalizationService)
4406
+ ], GanttTreeListMessagesDirective.prototype, "kendoGanttTreeListMessages", void 0);
4407
+ GanttTreeListMessagesDirective = __decorate([
4408
+ Directive({ selector: '[kendoGanttTreeListMessages]' }),
4409
+ __metadata("design:paramtypes", [LocalizationService])
4410
+ ], GanttTreeListMessagesDirective);
4411
+ return GanttTreeListMessagesDirective;
4412
+ }());
4413
+
3313
4414
  var IMPORTED_MODULES = [
3314
4415
  CommonModule,
4416
+ ReactiveFormsModule,
4417
+ LabelModule,
4418
+ InputsModule,
4419
+ DateInputsModule,
4420
+ ButtonsModule,
3315
4421
  SplitterModule,
3316
4422
  TreeListModule,
3317
- ButtonsModule
4423
+ ButtonsModule,
4424
+ DialogModule,
4425
+ EventsModule
3318
4426
  ];
3319
4427
  var DECLARATIONS = [
3320
4428
  GanttComponent,
@@ -3338,6 +4446,7 @@ var DECLARATIONS = [
3338
4446
  FilterMenuTemplateDirective,
3339
4447
  FilterCellTemplateDirective,
3340
4448
  CellTemplateDirective,
4449
+ EditTemplateDirective,
3341
4450
  ColumnMenuTemplateDirective,
3342
4451
  HeaderTemplateDirective,
3343
4452
  FooterTemplateDirective,
@@ -3345,10 +4454,43 @@ var DECLARATIONS = [
3345
4454
  GanttDependencyDirective,
3346
4455
  TimelineDayViewComponent,
3347
4456
  TimelineWeekViewComponent,
3348
- TimelineMonthViewComponent
4457
+ TimelineMonthViewComponent,
4458
+ SelectableDirective,
4459
+ EditDialogComponent,
4460
+ CustomMessagesComponent,
4461
+ LocalizedMessagesDirective,
4462
+ GanttTreeListMessagesDirective
3349
4463
  ];
3350
4464
  /**
3351
- * Sample module
4465
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
4466
+ * definition for the Gantt component.
4467
+ *
4468
+ * @example
4469
+ *
4470
+ * ```ts-no-run
4471
+ * // Import the Gantt module
4472
+ * import { GanttModule } from '@progress/kendo-angular-gantt';
4473
+ *
4474
+ * // The browser platform with a compiler
4475
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4476
+ *
4477
+ * import { NgModule } from '@angular/core';
4478
+ *
4479
+ * // Import the app component
4480
+ * import { AppComponent } from './app.component';
4481
+ *
4482
+ * // Define the app module
4483
+ * _@NgModule({
4484
+ * declarations: [AppComponent], // declare app component
4485
+ * imports: [BrowserModule, GanttModule], // import Gantt module
4486
+ * bootstrap: [AppComponent]
4487
+ * })
4488
+ * export class AppModule {}
4489
+ *
4490
+ * // Compile and launch the module
4491
+ * platformBrowserDynamic().bootstrapModule(AppModule);
4492
+ *
4493
+ * ```
3352
4494
  */
3353
4495
  var GanttModule = /** @class */ (function () {
3354
4496
  function GanttModule() {
@@ -3357,7 +4499,11 @@ var GanttModule = /** @class */ (function () {
3357
4499
  NgModule({
3358
4500
  imports: IMPORTED_MODULES.slice(),
3359
4501
  declarations: DECLARATIONS.slice(),
3360
- exports: DECLARATIONS.slice()
4502
+ exports: DECLARATIONS.slice(),
4503
+ providers: [{
4504
+ provide: L10N_PREFIX,
4505
+ useValue: 'kendo.gantt'
4506
+ }]
3361
4507
  })
3362
4508
  ], GanttModule);
3363
4509
  return GanttModule;
@@ -3367,4 +4513,4 @@ var GanttModule = /** @class */ (function () {
3367
4513
  * Generated bundle index. Do not edit.
3368
4514
  */
3369
4515
 
3370
- export { MappingService, OptionChangesService, DependencyDomService, GanttDependencyDirective, GanttHeaderTableBodyComponent, GanttMilestoneTaskComponent, GanttSummaryTaskComponent, GanttTaskBase, GanttTaskComponent, GanttTasksTableBodyComponent, ScrollSyncService, GanttTimelineComponent, TimelineBaseViewService, TimelineDayViewComponent, TimelineDayViewService, TimelineMonthViewComponent, TimelineMonthViewService, TimelineViewService, TimelineWeekViewComponent, TimelineWeekViewService, ViewBase, ToolbarComponent, ViewSelectorComponent, GanttComponent, GanttModule, GanttHierarchyBindingDirective, GanttFlatBindingDirective, GanttExpandableDirective, GanttTaskTemplateDirective, GanttTaskContentTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective };
4516
+ export { MappingService, OptionChangesService, DependencyDomService, GanttDependencyDirective, EditDialogComponent, EditService, CustomMessagesComponent, LocalizedMessagesDirective, Messages, GanttTreeListMessagesDirective, GanttHeaderTableBodyComponent, GanttMilestoneTaskComponent, GanttSummaryTaskComponent, GanttTaskBase, GanttTaskComponent, GanttTasksTableBodyComponent, ScrollSyncService, GanttTimelineComponent, TimelineBaseViewService, TimelineDayViewComponent, TimelineDayViewService, TimelineMonthViewComponent, TimelineMonthViewService, TimelineViewService, TimelineWeekViewComponent, TimelineWeekViewService, ViewBase, ToolbarComponent, ViewSelectorComponent, GanttComponent, GanttModule, GanttHierarchyBindingDirective, GanttFlatBindingDirective, GanttExpandableDirective, GanttTaskTemplateDirective, GanttTaskContentTemplateDirective, GanttSummaryTaskTemplateDirective, ToolbarTemplateDirective, SelectableDirective, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective, EditTemplateDirective };