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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/cdn/js/kendo-angular-gantt.js +2 -76
  2. package/dist/cdn/main.js +23 -1
  3. package/dist/es/columns/column.component.js +5 -0
  4. package/dist/es/columns/columns.js +1 -0
  5. package/dist/es/columns/edit-template.directive.js +34 -0
  6. package/dist/es/columns/span-column.component.js +6 -0
  7. package/dist/es/editing/edit-dialog.component.js +44 -0
  8. package/dist/es/editing/edit.service.js +39 -0
  9. package/dist/es/editing/util.js +17 -0
  10. package/dist/es/gantt.component.js +309 -8
  11. package/dist/es/gantt.module.js +60 -5
  12. package/dist/es/index.js +6 -0
  13. package/dist/es/localization/custom-messages.component.js +44 -0
  14. package/dist/es/localization/localized-messages.directive.js +35 -0
  15. package/dist/es/localization/messages.js +246 -0
  16. package/dist/es/localization/treelist-messages.directive.js +31 -0
  17. package/dist/es/models/events/cell-click-event.interface.js +4 -0
  18. package/dist/es/models/events/cell-close-event.interface.js +19 -0
  19. package/dist/es/models/events/preventable-event.js +32 -0
  20. package/dist/es/models/events/task-click-event.interface.js +4 -0
  21. package/dist/es/models/events/task-edit-event.interface.js +4 -0
  22. package/dist/es/models/gantt-task-model-fields.interface.js +2 -1
  23. package/dist/es/package-metadata.js +1 -1
  24. package/dist/es/rendering/gantt-milestone-task.component.js +1 -1
  25. package/dist/es/rendering/gantt-summary-task.component.js +1 -1
  26. package/dist/es/rendering/gantt-task-base.js +4 -0
  27. package/dist/es/rendering/gantt-task.component.js +12 -4
  28. package/dist/es/rendering/gantt-tasks-table-body.component.js +5 -1
  29. package/dist/es/toolbar/view-selector.component.js +7 -4
  30. package/dist/es/utils.js +44 -1
  31. package/dist/es2015/columns/column.component.d.ts +2 -0
  32. package/dist/es2015/columns/column.component.js +5 -0
  33. package/dist/es2015/columns/columns.d.ts +1 -0
  34. package/dist/es2015/columns/columns.js +1 -0
  35. package/dist/es2015/columns/edit-template.directive.d.ts +23 -0
  36. package/dist/es2015/columns/edit-template.directive.js +33 -0
  37. package/dist/es2015/columns/span-column.component.d.ts +2 -0
  38. package/dist/es2015/columns/span-column.component.js +6 -0
  39. package/dist/es2015/editing/edit-dialog.component.d.ts +21 -0
  40. package/dist/es2015/editing/edit-dialog.component.js +86 -0
  41. package/dist/es2015/editing/edit.service.d.ts +20 -0
  42. package/dist/es2015/editing/edit.service.js +41 -0
  43. package/dist/es2015/editing/util.d.ts +10 -0
  44. package/dist/es2015/editing/util.js +17 -0
  45. package/dist/es2015/gantt.component.d.ts +180 -4
  46. package/dist/es2015/gantt.component.js +492 -8
  47. package/dist/es2015/gantt.module.d.ts +29 -1
  48. package/dist/es2015/gantt.module.js +60 -5
  49. package/dist/es2015/index.d.ts +6 -0
  50. package/dist/es2015/index.js +6 -0
  51. package/dist/es2015/index.metadata.json +1 -1
  52. package/dist/es2015/localization/custom-messages.component.d.ts +15 -0
  53. package/dist/es2015/localization/custom-messages.component.js +36 -0
  54. package/dist/es2015/localization/localized-messages.directive.d.ts +13 -0
  55. package/dist/es2015/localization/localized-messages.directive.js +31 -0
  56. package/dist/es2015/localization/messages.d.ts +246 -0
  57. package/dist/es2015/localization/messages.js +240 -0
  58. package/dist/es2015/localization/treelist-messages.directive.d.ts +14 -0
  59. package/dist/es2015/localization/treelist-messages.directive.js +29 -0
  60. package/dist/es2015/models/events/cell-click-event.interface.d.ts +20 -0
  61. package/dist/es2015/models/events/cell-click-event.interface.js +4 -0
  62. package/dist/es2015/models/events/cell-close-event.interface.d.ts +48 -0
  63. package/dist/es2015/models/events/cell-close-event.interface.js +14 -0
  64. package/dist/es2015/models/events/preventable-event.d.ts +24 -0
  65. package/dist/es2015/models/events/preventable-event.js +30 -0
  66. package/dist/es2015/models/events/task-click-event.interface.d.ts +22 -0
  67. package/dist/es2015/models/events/task-click-event.interface.js +4 -0
  68. package/dist/es2015/models/events/task-edit-event.interface.d.ts +46 -0
  69. package/dist/es2015/models/events/task-edit-event.interface.js +4 -0
  70. package/dist/es2015/models/gantt-task-model-fields.interface.d.ts +1 -0
  71. package/dist/es2015/models/gantt-task-model-fields.interface.js +2 -1
  72. package/dist/es2015/package-metadata.js +1 -1
  73. package/dist/es2015/rendering/gantt-milestone-task.component.js +1 -0
  74. package/dist/es2015/rendering/gantt-summary-task.component.js +1 -0
  75. package/dist/es2015/rendering/gantt-task-base.d.ts +1 -0
  76. package/dist/es2015/rendering/gantt-task-base.js +4 -0
  77. package/dist/es2015/rendering/gantt-task.component.d.ts +4 -1
  78. package/dist/es2015/rendering/gantt-task.component.js +17 -2
  79. package/dist/es2015/rendering/gantt-tasks-table-body.component.d.ts +1 -0
  80. package/dist/es2015/rendering/gantt-tasks-table-body.component.js +8 -1
  81. package/dist/es2015/toolbar/view-selector.component.d.ts +3 -0
  82. package/dist/es2015/toolbar/view-selector.component.js +7 -7
  83. package/dist/es2015/utils.d.ts +34 -0
  84. package/dist/es2015/utils.js +44 -1
  85. package/dist/fesm2015/index.js +1080 -23
  86. package/dist/fesm5/index.js +865 -24
  87. package/dist/npm/columns/column.component.js +5 -0
  88. package/dist/npm/columns/columns.js +2 -0
  89. package/dist/npm/columns/edit-template.directive.js +36 -0
  90. package/dist/npm/columns/span-column.component.js +6 -0
  91. package/dist/npm/editing/edit-dialog.component.js +46 -0
  92. package/dist/npm/editing/edit.service.js +41 -0
  93. package/dist/npm/editing/util.js +19 -0
  94. package/dist/npm/gantt.component.js +306 -5
  95. package/dist/npm/gantt.module.js +59 -4
  96. package/dist/npm/index.js +12 -0
  97. package/dist/npm/localization/custom-messages.component.js +46 -0
  98. package/dist/npm/localization/localized-messages.directive.js +37 -0
  99. package/dist/npm/localization/messages.js +248 -0
  100. package/dist/npm/localization/treelist-messages.directive.js +33 -0
  101. package/dist/npm/models/events/cell-click-event.interface.js +6 -0
  102. package/dist/npm/models/events/cell-close-event.interface.js +21 -0
  103. package/dist/npm/models/events/preventable-event.js +34 -0
  104. package/dist/npm/models/events/task-click-event.interface.js +6 -0
  105. package/dist/npm/models/events/task-edit-event.interface.js +6 -0
  106. package/dist/npm/models/gantt-task-model-fields.interface.js +2 -1
  107. package/dist/npm/package-metadata.js +1 -1
  108. package/dist/npm/rendering/gantt-milestone-task.component.js +1 -1
  109. package/dist/npm/rendering/gantt-summary-task.component.js +1 -1
  110. package/dist/npm/rendering/gantt-task-base.js +4 -0
  111. package/dist/npm/rendering/gantt-task.component.js +12 -4
  112. package/dist/npm/rendering/gantt-tasks-table-body.component.js +5 -1
  113. package/dist/npm/toolbar/view-selector.component.js +7 -4
  114. package/dist/npm/utils.js +43 -0
  115. package/dist/systemjs/kendo-angular-gantt.js +1 -1
  116. package/package.json +15 -10
@@ -7,15 +7,21 @@ import { Input, Injectable, EventEmitter, Directive, Optional, TemplateRef, Quer
7
7
  import { ColumnBase, ColumnComponent, ColumnGroupComponent, SpanColumnComponent, TreeListComponent, DataBoundTreeComponent, ExpandableTreeComponent, FlatBindingDirective, HierarchyBindingDirective, ExpandableDirective, TreeListModule } from '@progress/kendo-angular-treelist';
8
8
  import { of, fromEvent, Subject, Subscription } from 'rxjs';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
- import { isDocumentAvailable, anyChanged } from '@progress/kendo-angular-common';
10
+ import { isDocumentAvailable, closestInScope, matchesClasses, anyChanged, hasObservers, EventsModule } from '@progress/kendo-angular-common';
11
11
  import { IntlService } from '@progress/kendo-angular-intl';
12
12
  import { orderBy } from '@progress/kendo-data-query';
13
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: 1633003166,
33
+ publishDate: 1637673280,
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)
@@ -703,6 +746,40 @@ var isColumnGroup = function (column) { return column.isColumnGroup; };
703
746
  * @hidden
704
747
  */
705
748
  var isNumber = function (contender) { return typeof contender === 'number' && !isNaN(contender); };
749
+ /**
750
+ * @hidden
751
+ *
752
+ * Gets the closest timeline task element index from an event target.
753
+ * Uses the `data-task-index` attribute assigned to each task.
754
+ * Restricts the search up to the provided gantt element from the second param.
755
+ */
756
+ var getClosestTaskIndex = function (element, gantt) {
757
+ var task = closestInScope(element, matchesClasses('k-task'), gantt);
758
+ if (!isPresent(task)) {
759
+ return null;
760
+ }
761
+ return Number(task.getAttribute('data-task-index'));
762
+ };
763
+ /**
764
+ * @hidden
765
+ *
766
+ * Checks whether the queried item or its parent items has a `k-task` selector.
767
+ * Restricts the search up to the provided gantt element from the second param.
768
+ */
769
+ var isTask = function (contender, gantt) {
770
+ var task = closestInScope(contender, matchesClasses('k-task'), gantt);
771
+ return isPresent(task);
772
+ };
773
+ /**
774
+ * @hidden
775
+ *
776
+ * Checks whether the queried item or its parent items has a `k-task-actions` selector - used for the clear button.
777
+ * Restricts the search up to the provided gantt element from the second param.
778
+ */
779
+ var isClearButton = function (contender, gantt) {
780
+ var clearButtonContainer = closestInScope(contender, matchesClasses('k-task-actions'), gantt);
781
+ return isPresent(clearButtonContainer);
782
+ };
706
783
 
707
784
  var DAY_FORMAT = 'E d/MM';
708
785
  var HOUR_FORMAT = 'HH:mm aa';
@@ -872,7 +949,8 @@ var DEFAULT_TASK_MODEL_FIELDS = Object.freeze({
872
949
  start: 'start',
873
950
  end: 'end',
874
951
  title: 'title',
875
- completionRatio: 'completionRatio'
952
+ completionRatio: 'completionRatio',
953
+ children: 'children'
876
954
  });
877
955
 
878
956
  /**
@@ -1281,6 +1359,38 @@ var DependencyDomService = /** @class */ (function () {
1281
1359
  return DependencyDomService;
1282
1360
  }());
1283
1361
 
1362
+ /**
1363
+ * @hidden
1364
+ */
1365
+ var EditService = /** @class */ (function () {
1366
+ function EditService() {
1367
+ this.showEditingDialog = new Subject();
1368
+ this.showConfirmationDialog = new Subject();
1369
+ this.editEvent = new Subject();
1370
+ }
1371
+ EditService.prototype.createEditDialog = function (dataItem, formGroup) {
1372
+ this.dataItem = dataItem;
1373
+ this.formGroup = formGroup;
1374
+ this.showEditingDialog.next(true);
1375
+ };
1376
+ EditService.prototype.closeEditDialog = function () {
1377
+ this.showEditingDialog.next(false);
1378
+ this.dataItem = undefined;
1379
+ this.formGroup = undefined;
1380
+ };
1381
+ EditService.prototype.triggerEditEvent = function (editResultType) {
1382
+ this.editEvent.next({
1383
+ formGroup: this.formGroup,
1384
+ dataItem: this.dataItem,
1385
+ editResultType: editResultType
1386
+ });
1387
+ };
1388
+ EditService = __decorate([
1389
+ Injectable()
1390
+ ], EditService);
1391
+ return EditService;
1392
+ }());
1393
+
1284
1394
  /**
1285
1395
  * @hidden
1286
1396
  */
@@ -1577,13 +1687,93 @@ var ViewBase = /** @class */ (function () {
1577
1687
  return ViewBase;
1578
1688
  }());
1579
1689
 
1690
+ /**
1691
+ * @hidden
1692
+ */
1693
+ var getEditItem = function (dataItem, data, mapper) {
1694
+ var treeListDataItem = data.find(function (item) { return mapper.extractFromTask(item.data, 'id') === mapper.extractFromTask(dataItem, 'id'); });
1695
+ return mapPath(treeListDataItem);
1696
+ };
1697
+ var mapPath = function (item) { return ({
1698
+ dataItem: item.data,
1699
+ parent: item.parent.data ? mapPath(item.parent) : null
1700
+ }); };
1701
+
1580
1702
  var TREELIST_GROUP_COLUMNS_CLASS = 'k-gantt-treelist-nested-columns';
1581
1703
  var DEFAULT_VIEW = 'week';
1582
1704
  /**
1583
- * The GiGantt
1705
+ * Represents the Kendo UI Gantt component for Angular.
1706
+ *
1707
+ * @example
1708
+ * ```ts-preview
1709
+ * _@Component({
1710
+ * selector: 'my-app',
1711
+ * template: `
1712
+ * <kendo-gantt
1713
+ * [style.height.px]="500"
1714
+ * [kendoGanttHierarchyBinding]="data"
1715
+ * childrenField="subtasks"
1716
+ * [dependencies]="dependencies">
1717
+ * <kendo-gantt-column
1718
+ * field="title"
1719
+ * title="Task"
1720
+ * [width]="200"
1721
+ * [expandable]="true"></kendo-gantt-column>
1722
+ * <kendo-gantt-column
1723
+ * field="start"
1724
+ * title="Start"
1725
+ * format="dd-MMM-yyyy"
1726
+ * [width]="120"></kendo-gantt-column>
1727
+ * <kendo-gantt-column
1728
+ * field="end"
1729
+ * title="End"
1730
+ * format="dd-MMM-yyyy"
1731
+ * [width]="120"></kendo-gantt-column>
1732
+ * <kendo-gantt-timeline-day-view></kendo-gantt-timeline-day-view>
1733
+ * <kendo-gantt-timeline-week-view></kendo-gantt-timeline-week-view>
1734
+ * <kendo-gantt-timeline-month-view></kendo-gantt-timeline-month-view>
1735
+ * </kendo-gantt>
1736
+ * `
1737
+ * })
1738
+ * class AppComponent {
1739
+ * public data: Task[] = [{
1740
+ * id: 7, title: 'Validation and R&D', start: new Date('2014-06-02T00:00:00.000Z'),
1741
+ * end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.45708333333333334,
1742
+ * subtasks: [
1743
+ * { id: 18, title: 'Project Kickoff', start: new Date('2014-06-02T00:00:00.000Z'),
1744
+ * end: new Date('2014-06-02T00:00:00.000Z'), completionRatio: 0.23 },
1745
+ * { id: 11, title: 'Research', start: new Date('2014-06-02T00:00:00.000Z'),
1746
+ * end: new Date('2014-06-07T00:00:00.000Z'), completionRatio: 0.5766666666666667,
1747
+ * subtasks: [
1748
+ * { id: 19, title: 'Validation', start: new Date('2014-06-02T00:00:00.000Z'),
1749
+ * end: new Date('2014-06-04T00:00:00.000Z'), completionRatio: 0.25 },
1750
+ * { id: 39, title: 'Specification', start: new Date('2014-06-04T00:00:00.000Z'),
1751
+ * end: new Date('2014-06-07T00:00:00.000Z'), completionRatio: 0.66 }]
1752
+ * }, { id: 13, title: 'Implementation', start: new Date('2014-06-08T00:00:00.000Z'),
1753
+ * end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.77,
1754
+ * subtasks: [
1755
+ * { id: 24, title: 'Prototype', start: new Date('2014-06-08T00:00:00.000Z'),
1756
+ * end: new Date('2014-06-14T00:00:00.000Z'), completionRatio: 0.77 },
1757
+ * { id: 29, title: 'UI and Interaction', start: new Date('2014-06-14T00:00:00.000Z'),
1758
+ * end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0.6 }]
1759
+ * }, { id: 17, title: 'Release', start: new Date('2014-06-19T00:00:00.000Z'),
1760
+ * end: new Date('2014-06-19T00:00:00.000Z'), completionRatio: 0 }]
1761
+ * }];
1762
+ *
1763
+ * public dependencies: GanttDependency[] = [
1764
+ * { id: 528, fromId: 18, toId: 19, type: DependencyType.FS },
1765
+ * { id: 529, fromId: 19, toId: 39, type: DependencyType.FS },
1766
+ * { id: 535, fromId: 24, toId: 29, type: DependencyType.FS },
1767
+ * { id: 551, fromId: 13, toId: 29, type: DependencyType.FF },
1768
+ * { id: 777, fromId: 7, toId: 11, type: DependencyType.SF },
1769
+ * { id: 556, fromId: 39, toId: 24, type: DependencyType.FS },
1770
+ * { id: 546, fromId: 29, toId: 17, type: DependencyType.FS },
1771
+ * ];
1772
+ * }
1773
+ * ```
1584
1774
  */
1585
1775
  var GanttComponent = /** @class */ (function () {
1586
- function GanttComponent(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService) {
1776
+ function GanttComponent(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone) {
1587
1777
  var _this = this;
1588
1778
  this.timelineViewService = timelineViewService;
1589
1779
  this.scrollSyncService = scrollSyncService;
@@ -1591,6 +1781,10 @@ var GanttComponent = /** @class */ (function () {
1591
1781
  this.mapper = mapper;
1592
1782
  this.optionChangesService = optionChangesService;
1593
1783
  this.dependencyDomService = dependencyDomService;
1784
+ this.editService = editService;
1785
+ this.localizationService = localizationService;
1786
+ this.hostElement = hostElement;
1787
+ this.zone = zone;
1594
1788
  this.hostClasses = true;
1595
1789
  /**
1596
1790
  * The position of the toolbar.
@@ -1678,10 +1872,40 @@ var GanttComponent = /** @class */ (function () {
1678
1872
  * Fires when an item is expanded.
1679
1873
  */
1680
1874
  this.rowExpand = new EventEmitter();
1875
+ /**
1876
+ * Fires when a Gantt task in the timeline pane is double-clicked. The data item, associated with the clicked task,
1877
+ * is available in the event data. Use the event handler to open a task editing dialog as necessary.
1878
+ */
1879
+ this.taskDblClick = new EventEmitter();
1880
+ /**
1881
+ * Fires when the user double clicks a cell.
1882
+ */
1883
+ this.cellDblClick = new EventEmitter();
1884
+ /**
1885
+ * Fires when the user leaves an edited cell.
1886
+ */
1887
+ this.cellClose = new EventEmitter();
1888
+ /**
1889
+ * Fires when the end user clicks the `Delete` button in the task editing dialog or the task delete icon.
1890
+ * Use the event handler to open a confirmation dialog when necessary.
1891
+ */
1892
+ this.taskDelete = new EventEmitter();
1681
1893
  /**
1682
1894
  * Fires when an item is collapsed.
1683
1895
  */
1684
1896
  this.rowCollapse = new EventEmitter();
1897
+ /**
1898
+ * Fires when the user confirms deleting a task.
1899
+ */
1900
+ this.remove = new EventEmitter();
1901
+ /**
1902
+ * Fires when the user cancels editing a task.
1903
+ */
1904
+ this.cancel = new EventEmitter();
1905
+ /**
1906
+ * Fires when the user saves an edited task.
1907
+ */
1908
+ this.save = new EventEmitter();
1685
1909
  /**
1686
1910
  * Fires when the sorting of the Gantt is changed.
1687
1911
  * You have to handle the event yourself and sort the data.
@@ -1736,6 +1960,14 @@ var GanttComponent = /** @class */ (function () {
1736
1960
  * Used by the GanttExpandableDirective.
1737
1961
  */
1738
1962
  this.expandStateChange = new EventEmitter();
1963
+ /**
1964
+ * @hidden
1965
+ */
1966
+ this.showEditingDialog = false;
1967
+ /**
1968
+ * @hidden
1969
+ */
1970
+ this.showConfirmationDialog = false;
1739
1971
  this._columns = new QueryList();
1740
1972
  this._data = [];
1741
1973
  this._timelinePaneOptions = __assign({}, DEFAULT_TIMELINE_PANE_SETTINGS);
@@ -1743,14 +1975,37 @@ var GanttComponent = /** @class */ (function () {
1743
1975
  this._rowClass = rowClassCallback;
1744
1976
  this._taskClass = taskClassCallback;
1745
1977
  this._activeView = DEFAULT_VIEW;
1978
+ this.rtl = false;
1746
1979
  this.optionChangesSubscriptions = new Subscription();
1980
+ this.editServiceSubscription = new Subscription();
1747
1981
  validatePackage(packageMetadata);
1982
+ this.handleTimelineDblClick = this.handleTimelineDblClick.bind(this);
1983
+ this.handleTimelineMouseDown = this.handleTimelineMouseDown.bind(this);
1984
+ this.handleDoubleClick = this.handleDoubleClick.bind(this);
1748
1985
  this.optionChangesSubscriptions.add(this.optionChangesService.viewChanges.subscribe(function () {
1749
1986
  _this.loadTimelineData();
1750
1987
  }));
1751
1988
  this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(function () {
1752
1989
  _this.treeList.columns.notifyOnChanges();
1753
1990
  }));
1991
+ this.editServiceSubscription.add(this.editService.showEditingDialog.subscribe(function (show) { return _this.showEditingDialog = show; }));
1992
+ this.editServiceSubscription.add(this.editService.showConfirmationDialog.subscribe(function () { return _this.taskDelete.emit(); }));
1993
+ this.editServiceSubscription.add(this.editService.editEvent.subscribe(function (args) {
1994
+ _this[args.editResultType].emit({
1995
+ formGroup: args.formGroup,
1996
+ item: getEditItem(args.dataItem, _this.treeList.view.data, _this.mapper),
1997
+ sender: _this
1998
+ });
1999
+ _this.showConfirmationDialog = _this.showEditingDialog = false;
2000
+ _this.editService.dataItem = _this.editService.formGroup = null;
2001
+ _this.updateView();
2002
+ _this.dependencyDomService.notifyChanges();
2003
+ }));
2004
+ this.localizationSubscription = this.localizationService.changes.subscribe(function (_a) {
2005
+ var rtl = _a.rtl;
2006
+ _this.rtl = rtl;
2007
+ _this.direction = _this.rtl ? 'rtl' : 'ltr';
2008
+ });
1754
2009
  }
1755
2010
  GanttComponent_1 = GanttComponent;
1756
2011
  Object.defineProperty(GanttComponent.prototype, "toolbarTemplate", {
@@ -1766,6 +2021,13 @@ var GanttComponent = /** @class */ (function () {
1766
2021
  enumerable: true,
1767
2022
  configurable: true
1768
2023
  });
2024
+ Object.defineProperty(GanttComponent.prototype, "dir", {
2025
+ get: function () {
2026
+ return this.direction;
2027
+ },
2028
+ enumerable: true,
2029
+ configurable: true
2030
+ });
1769
2031
  Object.defineProperty(GanttComponent.prototype, "columns", {
1770
2032
  get: function () {
1771
2033
  return this._columns;
@@ -1981,6 +2243,16 @@ var GanttComponent = /** @class */ (function () {
1981
2243
  enumerable: true,
1982
2244
  configurable: true
1983
2245
  });
2246
+ Object.defineProperty(GanttComponent.prototype, "editDialogFormGroup", {
2247
+ /**
2248
+ * @hidden
2249
+ */
2250
+ get: function () {
2251
+ return this.editService.formGroup;
2252
+ },
2253
+ enumerable: true,
2254
+ configurable: true
2255
+ });
1984
2256
  GanttComponent.prototype.ngOnChanges = function (changes) {
1985
2257
  if (anyChanged(['data', 'activeView', 'workWeekStart', 'workWeekEnd', 'workDayStart', 'workDayEnd'], changes)) {
1986
2258
  this.loadTimelineData();
@@ -2000,6 +2272,10 @@ var GanttComponent = /** @class */ (function () {
2000
2272
  };
2001
2273
  GanttComponent.prototype.ngOnDestroy = function () {
2002
2274
  this.optionChangesSubscriptions.unsubscribe();
2275
+ this.editServiceSubscription.unsubscribe();
2276
+ if (this.localizationSubscription) {
2277
+ this.localizationSubscription.unsubscribe();
2278
+ }
2003
2279
  };
2004
2280
  /**
2005
2281
  * Applies the minimum possible width for the specified column,
@@ -2049,6 +2325,47 @@ var GanttComponent = /** @class */ (function () {
2049
2325
  this.treeList.reorderColumn(source, destIndex, options);
2050
2326
  }
2051
2327
  };
2328
+ /**
2329
+ * Opens the task editing dialog.
2330
+ */
2331
+ GanttComponent.prototype.editTask = function (dataItem, formGroup) {
2332
+ if (!this.showEditingDialog) {
2333
+ this.editService.createEditDialog(dataItem, formGroup);
2334
+ }
2335
+ };
2336
+ /**
2337
+ * Closes the task editing dialog.
2338
+ */
2339
+ GanttComponent.prototype.closeTaskDialog = function () {
2340
+ if (this.showEditingDialog) {
2341
+ this.editService.closeEditDialog();
2342
+ }
2343
+ };
2344
+ /**
2345
+ * Opens the delete task confirmation dialog.
2346
+ */
2347
+ GanttComponent.prototype.openConfirmationDialog = function () {
2348
+ this.showConfirmationDialog = true;
2349
+ };
2350
+ /**
2351
+ * Opens a cell for editing.
2352
+ */
2353
+ GanttComponent.prototype.editCell = function (dataItem, column, formGroup) {
2354
+ this.treeList.editCell(dataItem, column, formGroup);
2355
+ };
2356
+ /**
2357
+ * Closes an edited cell.
2358
+ */
2359
+ GanttComponent.prototype.closeCell = function () {
2360
+ this.treeList.closeCell();
2361
+ };
2362
+ /**
2363
+ * @hidden
2364
+ */
2365
+ GanttComponent.prototype.handleCellClose = function (e) {
2366
+ this.cellClose.emit(Object.assign(e, { item: this.editItem, sender: this }));
2367
+ this.dependencyDomService.notifyChanges();
2368
+ };
2052
2369
  /**
2053
2370
  * @hidden
2054
2371
  */
@@ -2112,6 +2429,69 @@ var GanttComponent = /** @class */ (function () {
2112
2429
  this._timelinePaneOptions.size = e;
2113
2430
  this.timelinePaneSizeChange.emit(e);
2114
2431
  };
2432
+ /**
2433
+ * @hidden
2434
+ */
2435
+ GanttComponent.prototype.handleCellClick = function (event) {
2436
+ this._cellClickEvent = event;
2437
+ };
2438
+ /**
2439
+ * @hidden
2440
+ */
2441
+ GanttComponent.prototype.handleDoubleClick = function (event) {
2442
+ var _this = this;
2443
+ var cell = this._cellClickEvent.originalEvent.target;
2444
+ if (event.target !== cell) {
2445
+ return;
2446
+ }
2447
+ this.editItem = getEditItem(this._cellClickEvent.dataItem, this.treeList.view.data, this.mapper);
2448
+ if (hasObservers(this.cellDblClick)) {
2449
+ this.zone.run(function () {
2450
+ _this.cellDblClick.emit(__assign({}, _this._cellClickEvent, { sender: _this }));
2451
+ });
2452
+ }
2453
+ };
2454
+ /**
2455
+ * @hidden
2456
+ */
2457
+ GanttComponent.prototype.handleDeleteConfirmation = function () {
2458
+ this.editService.triggerEditEvent('remove');
2459
+ };
2460
+ /**
2461
+ * @hidden
2462
+ */
2463
+ GanttComponent.prototype.handleTimelineMouseDown = function (event) {
2464
+ var target = event.target;
2465
+ var gantt = this.hostElement.nativeElement;
2466
+ if (!isTask(target, gantt) || isClearButton(target, gantt)) {
2467
+ return;
2468
+ }
2469
+ event.preventDefault();
2470
+ };
2471
+ /**
2472
+ * @hidden
2473
+ */
2474
+ GanttComponent.prototype.handleTimelineDblClick = function (event) {
2475
+ var _this = this;
2476
+ var target = event.target;
2477
+ var gantt = this.hostElement.nativeElement;
2478
+ if (!isTask(target, gantt) || isClearButton(target, gantt)) {
2479
+ return;
2480
+ }
2481
+ var taskIndex = getClosestTaskIndex(target, gantt);
2482
+ var task = this.renderedTreeListItems[taskIndex];
2483
+ this.zone.run(function () { return _this.taskDblClick.emit({
2484
+ dataItem: task,
2485
+ originalEvent: event,
2486
+ sender: _this
2487
+ }); });
2488
+ };
2489
+ /**
2490
+ * @hidden
2491
+ */
2492
+ GanttComponent.prototype.getText = function (token) {
2493
+ return this.localizationService.get(token);
2494
+ };
2115
2495
  GanttComponent.prototype.updateTreeListGroupClass = function (columns) {
2116
2496
  if (columns === void 0) { columns = this.columns; }
2117
2497
  if (!isPresent(this.treeList)) {
@@ -2167,6 +2547,11 @@ var GanttComponent = /** @class */ (function () {
2167
2547
  HostBinding('class.k-gantt'),
2168
2548
  __metadata("design:type", Boolean)
2169
2549
  ], GanttComponent.prototype, "hostClasses", void 0);
2550
+ __decorate([
2551
+ HostBinding('attr.dir'),
2552
+ __metadata("design:type", String),
2553
+ __metadata("design:paramtypes", [])
2554
+ ], GanttComponent.prototype, "dir", null);
2170
2555
  __decorate([
2171
2556
  ContentChildren(GanttColumnBase),
2172
2557
  __metadata("design:type", QueryList),
@@ -2288,10 +2673,38 @@ var GanttComponent = /** @class */ (function () {
2288
2673
  Output(),
2289
2674
  __metadata("design:type", EventEmitter)
2290
2675
  ], GanttComponent.prototype, "rowExpand", void 0);
2676
+ __decorate([
2677
+ Output(),
2678
+ __metadata("design:type", EventEmitter)
2679
+ ], GanttComponent.prototype, "taskDblClick", void 0);
2680
+ __decorate([
2681
+ Output(),
2682
+ __metadata("design:type", EventEmitter)
2683
+ ], GanttComponent.prototype, "cellDblClick", void 0);
2684
+ __decorate([
2685
+ Output(),
2686
+ __metadata("design:type", EventEmitter)
2687
+ ], GanttComponent.prototype, "cellClose", void 0);
2688
+ __decorate([
2689
+ Output(),
2690
+ __metadata("design:type", EventEmitter)
2691
+ ], GanttComponent.prototype, "taskDelete", void 0);
2291
2692
  __decorate([
2292
2693
  Output(),
2293
2694
  __metadata("design:type", EventEmitter)
2294
2695
  ], GanttComponent.prototype, "rowCollapse", void 0);
2696
+ __decorate([
2697
+ Output(),
2698
+ __metadata("design:type", EventEmitter)
2699
+ ], GanttComponent.prototype, "remove", void 0);
2700
+ __decorate([
2701
+ Output(),
2702
+ __metadata("design:type", EventEmitter)
2703
+ ], GanttComponent.prototype, "cancel", void 0);
2704
+ __decorate([
2705
+ Output(),
2706
+ __metadata("design:type", EventEmitter)
2707
+ ], GanttComponent.prototype, "save", void 0);
2295
2708
  __decorate([
2296
2709
  Output(),
2297
2710
  __metadata("design:type", EventEmitter)
@@ -2339,7 +2752,9 @@ var GanttComponent = /** @class */ (function () {
2339
2752
  GanttComponent = GanttComponent_1 = __decorate([
2340
2753
  Component({
2341
2754
  selector: 'kendo-gantt',
2755
+ exportAs: 'kendoGantt',
2342
2756
  providers: [
2757
+ LocalizationService,
2343
2758
  {
2344
2759
  provide: DataBoundTreeComponent,
2345
2760
  useExisting: forwardRef(function () { return GanttComponent_1; })
@@ -2355,16 +2770,21 @@ var GanttComponent = /** @class */ (function () {
2355
2770
  ScrollSyncService,
2356
2771
  DependencyDomService,
2357
2772
  MappingService,
2358
- OptionChangesService
2773
+ OptionChangesService,
2774
+ EditService
2359
2775
  ],
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 "
2776
+ template: "\n <ng-container kendoGanttLocalizedMessages\n i18n-taskDeleteLabel=\"kendo.gantt.taskDeleteLabel|The label of the task delete icon\"\n taskDeleteLabel=\"Delete\"\n\n i18n-taskEditingDialogTitle=\"kendo.gantt.taskEditingDialogTitle|The title of the task editing dialog\"\n taskEditingDialogTitle=\"Editing Task\"\n\n i18n-taskEditingDialogCloseTitle=\"kendo.gantt.taskEditingDialogCloseTitle|The title of the task editing dialog close button\"\n taskEditingDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogCloseTitle=\"kendo.gantt.confirmationDialogCloseTitle|The title of the confirmation dialog close button\"\n confirmationDialogCloseTitle=\"Close\"\n\n i18n-confirmationDialogTitle=\"kendo.gantt.confirmationDialogTitle|The title of the delete task confirmation dialog\"\n confirmationDialogTitle=\"Delete Task\"\n\n i18n-confirmationDialogContent=\"kendo.gantt.confirmationDialogContent|The content of the delete task confirmation dialog\"\n confirmationDialogContent=\"Are you sure you want to delete this task?\"\n\n i18n-deleteButtonText=\"kendo.gantt.deleteButtonText|The text of the task editing dialog 'Delete' button\"\n deleteButtonText=\"Delete\"\n\n i18n-cancelButtonText=\"kendo.gantt.cancelButtonText|The text of the task editing dialog 'Cancel' button\"\n cancelButtonText=\"Cancel\"\n\n i18n-saveButtonText=\"kendo.gantt.saveButtonText|The text of the task editing dialog 'Save' button\"\n saveButtonText=\"Save\"\n\n i18n-titleFieldInputLabel=\"kendo.gantt.titleFieldInputLabel|The label of the 'title' field input in editing mode\"\n titleFieldInputLabel=\"Title\"\n\n i18n-startFieldInputLabel=\"kendo.gantt.startFieldInputLabel|The label of the 'start' field input in editing mode\"\n startFieldInputLabel=\"Start\"\n\n i18n-endFieldInputLabel=\"kendo.gantt.endFieldInputLabel|The label of the 'end' field input in editing mode\"\n endFieldInputLabel=\"End\"\n\n i18n-completionRatioFieldInputLabel=\"kendo.gantt.completionRatioFieldInputLabel|The label of the 'completionRatio' field input in editing mode\"\n completionRatioFieldInputLabel=\"Progress\"\n\n i18n-dayViewText=\"kendo.gantt.dayViewText|The text of the day view in the ViewSelector component\"\n dayViewText=\"Day\"\n\n i18n-weekViewText=\"kendo.gantt.weekViewText|The text of the week view in the ViewSelector component\"\n weekViewText=\"Week\"\n\n i18n-monthViewText=\"kendo.gantt.monthViewText|The text of the month view in the ViewSelector component\"\n monthViewText=\"Month\"\n\n i18n-yearViewText-disabled=\"kendo.gantt.yearViewText|The text of the year view in the ViewSelector component\"\n yearViewText=\"Year\"\n\n i18n-noRecords=\"kendo.gantt.noRecords|The label visible in the TreeList when there are no records\"\n noRecords=\"No records available.\"\n\n i18n-filter=\"kendo.gantt.filter|The label of the filter cell or icon\"\n filter=\"Filter\"\n\n i18n-filterEqOperator=\"kendo.gantt.filterEqOperator|The text of the equal filter operator\"\n filterEqOperator=\"Is equal to\"\n\n i18n-filterNotEqOperator=\"kendo.gantt.filterNotEqOperator|The text of the not equal filter operator\"\n filterNotEqOperator=\"Is not equal to\"\n\n i18n-filterIsNullOperator=\"kendo.gantt.filterIsNullOperator|The text of the is null filter operator\"\n filterIsNullOperator=\"Is null\"\n\n i18n-filterIsNotNullOperator=\"kendo.gantt.filterIsNotNullOperator|The text of the is not null filter operator\"\n filterIsNotNullOperator=\"Is not null\"\n\n i18n-filterIsEmptyOperator=\"kendo.gantt.filterIsEmptyOperator|The text of the is empty filter operator\"\n filterIsEmptyOperator=\"Is empty\"\n\n i18n-filterIsNotEmptyOperator=\"kendo.gantt.filterIsNotEmptyOperator|The text of the is not empty filter operator\"\n filterIsNotEmptyOperator=\"Is not empty\"\n\n i18n-filterStartsWithOperator=\"kendo.gantt.filterStartsWithOperator|The text of the starts with filter operator\"\n filterStartsWithOperator=\"Starts with\"\n\n i18n-filterContainsOperator=\"kendo.gantt.filterContainsOperator|The text of the contains filter operator\"\n filterContainsOperator=\"Contains\"\n\n i18n-filterNotContainsOperator=\"kendo.gantt.filterNotContainsOperator|The text of the does not contain filter operator\"\n filterNotContainsOperator=\"Does not contain\"\n\n i18n-filterEndsWithOperator=\"kendo.gantt.filterEndsWithOperator|The text of the ends with filter operator\"\n filterEndsWithOperator=\"Ends with\"\n\n i18n-filterGteOperator=\"kendo.gantt.filterGteOperator|The text of the greater than or equal filter operator\"\n filterGteOperator=\"Is greater than or equal to\"\n\n i18n-filterGtOperator=\"kendo.gantt.filterGtOperator|The text of the greater than filter operator\"\n filterGtOperator=\"Is greater than\"\n\n i18n-filterLteOperator=\"kendo.gantt.filterLteOperator|The text of the less than or equal filter operator\"\n filterLteOperator=\"Is less than or equal to\"\n\n i18n-filterLtOperator=\"kendo.gantt.filterLtOperator|The text of the less than filter operator\"\n filterLtOperator=\"Is less than\"\n\n i18n-filterIsTrue=\"kendo.gantt.filterIsTrue|The text of the IsTrue boolean filter option\"\n filterIsTrue=\"Is True\"\n\n i18n-filterIsFalse=\"kendo.gantt.filterIsFalse|The text of the IsFalse boolean filter option\"\n filterIsFalse=\"Is False\"\n\n i18n-filterBooleanAll=\"kendo.gantt.filterBooleanAll|The text of the (All) boolean filter option\"\n filterBooleanAll=\"(All)\"\n\n i18n-filterAfterOrEqualOperator=\"kendo.gantt.filterAfterOrEqualOperator|The text of the after or equal date filter operator\"\n filterAfterOrEqualOperator=\"Is after or equal to\"\n\n i18n-filterAfterOperator=\"kendo.gantt.filterAfterOperator|The text of the after date filter operator\"\n filterAfterOperator=\"Is after\"\n\n i18n-filterBeforeOperator=\"kendo.gantt.filterBeforeOperator|The text of the before date filter operator\"\n filterBeforeOperator=\"Is before\"\n\n i18n-filterBeforeOrEqualOperator=\"kendo.gantt.filterBeforeOrEqualOperator|The text of the before or equal date filter operator\"\n filterBeforeOrEqualOperator=\"Is before or equal to\"\n\n i18n-filterFilterButton=\"kendo.gantt.filterFilterButton|The text of the filter button\"\n filterFilterButton=\"Filter\"\n\n i18n-filterClearButton=\"kendo.gantt.filterClearButton|The text of the clear filter button\"\n filterClearButton=\"Clear\"\n\n i18n-filterAndLogic=\"kendo.gantt.filterAndLogic|The text of the And filter logic\"\n filterAndLogic=\"And\"\n\n i18n-filterOrLogic=\"kendo.gantt.filterOrLogic|The text of the Or filter logic\"\n filterOrLogic=\"Or\"\n\n i18n-loading=\"kendo.gantt.loading|The loading text\"\n loading=\"Loading\"\n\n i18n-columnMenu=\"kendo.gantt.columnMenu|The title of the column menu icon\"\n columnMenu=\"Column Menu\"\n\n i18n-columns=\"kendo.gantt.columns|The text shown in the column menu for the columns item\"\n columns=\"Columns\"\n\n i18n-lock-disabled=\"kendo.gantt.lock|The text shown in the column menu for the lock item\"\n lock-disabled=\"Lock\"\n\n i18n-unlock-disabled=\"kendo.gantt.unlock|The text shown in the column menu for the unlock item\"\n unlock-disabled=\"Unlock\"\n\n i18n-sortable=\"kendo.gantt.sortable|The label of the sort icon\"\n sortable=\"Sortable\"\n\n i18n-sortAscending=\"kendo.gantt.sortAscending|The text shown in the column menu for the sort ascending item\"\n sortAscending=\"Sort Ascending\"\n\n i18n-sortDescending=\"kendo.gantt.sortDescending|The text shown in the column menu for the sort descending item\"\n sortDescending=\"Sort Descending\"\n\n i18n-sortedAscending=\"kendo.gantt.sortedAscending|The status announcement when a column is sorted ascending\"\n sortedAscending=\"Sorted Ascending\"\n\n i18n-sortedDescending=\"kendo.gantt.sortedDescending|The status announcement when a column is sorted descending\"\n sortedDescending=\"Sorted Descending\"\n\n i18n-sortedDefault=\"kendo.gantt.sortedDefault|The status announcement when a column is no longer sorted\"\n sortedDefault=\"Not Sorted\"\n\n i18n-columnsApply=\"kendo.gantt.columnsApply|The text shown in the column menu or column chooser for the columns apply button\"\n columnsApply=\"Apply\"\n\n i18n-columnsReset=\"kendo.gantt.columnsReset|The text shown in the column menu or column chooser for the columns reset button\"\n columnsReset=\"Reset\"></ng-container>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('top')\"\n class=\"k-gantt-header k-toolbar k-gantt-toolbar\"\n position=\"top\"></kendo-gantt-toolbar>\n <div class=\"k-gantt-content\">\n <kendo-splitter [style.border]=\"0\">\n <kendo-splitter-pane\n class=\"k-gantt-treelist k-gantt-treelist-scrollable\"\n [collapsible]=\"treeListPaneOptions?.collapsible\"\n [collapsed]=\"treeListPaneOptions?.collapsed\"\n (collapsedChange)=\"onTreeListCollapsedChange($event)\"\n [scrollable]=\"false\">\n <kendo-treelist\n [idField]=\"taskIdField\"\n [columns]=\"columns\"\n [data]=\"data\"\n [hasChildren]=\"hasChildren\"\n [fetchChildren]=\"fetchChildren\"\n [isExpanded]=\"isExpanded\"\n [autoSize]=\"columnsAutoSize\"\n [columnMenu]=\"columnMenu\"\n [reorderable]=\"columnsReorderable\"\n [resizable]=\"columnsResizable\"\n [rowClass]=\"rowClass\"\n [sortable]=\"sortable\"\n [sort]=\"sort\"\n [filterable]=\"filterMenu\"\n [filter]=\"filter\"\n (filterChange)=\"filterChange.emit($event)\"\n (sortChange)=\"sortChange.emit($event)\"\n (dataStateChange)=\"dataStateChange.emit({\n filter: $event.filter,\n sort: $event.sort\n })\"\n (expandStateChange)=\"expandStateChange.emit($event)\"\n (expand)=\"rowExpand.emit({ dataItem: $event.dataItem })\"\n (collapse)=\"rowCollapse.emit({ dataItem: $event.dataItem })\"\n (columnReorder)=\"columnReorder.emit($event)\"\n (columnResize)=\"columnResize.emit($event)\"\n (columnVisibilityChange)=\"handleColumnVisibilityChange($event)\"\n (columnLockedChange)=\"columnLockedChange.emit($event)\"\n (cellClick)=\"handleCellClick($event)\"\n (cellClose)=\"handleCellClose($event)\"\n [kendoEventsOutsideAngular]=\"{\n dblclick: handleDoubleClick\n }\">\n <kendo-treelist-messages [kendoGanttTreeListMessages]=\"localizationService\"></kendo-treelist-messages>\n </kendo-treelist>\n </kendo-splitter-pane>\n <kendo-splitter-pane\n [collapsible]=\"timelinePaneOptions?.collapsible\"\n [resizable]=\"timelinePaneOptions?.resizable\"\n [collapsed]=\"timelinePaneOptions?.collapsed\"\n [min]=\"timelinePaneOptions?.min\"\n [max]=\"timelinePaneOptions?.max\"\n [size]=\"timelinePaneOptions?.size\"\n (collapsedChange)=\"onTimelineCollapsedChange($event)\"\n (sizeChange)=\"onTimelinePaneSizeChange($event)\"\n [scrollable]=\"false\">\n <kendo-gantt-timeline\n *ngIf=\"views && views.length\"\n [rows]=\"renderedTreeListItems\"\n [slots]=\"timelineSlots\"\n [groupSlots]=\"timelineGroupSlots\"\n [tableWidth]=\"tableWidth\"\n [activeView]=\"activeView\"\n [taskContentTemplate]=\"taskContentTemplate?.templateRef\"\n [taskTemplate]=\"taskTemplate?.templateRef\"\n [summaryTaskTemplate]=\"summaryTaskTemplate?.templateRef\"\n [taskClass]=\"taskClass\"\n [dependencies]=\"dependencies\"\n [hasChildren]=\"hasChildren\"\n [kendoEventsOutsideAngular]=\"{\n dblclick: handleTimelineDblClick,\n mousedown: handleTimelineMouseDown\n }\"\n ></kendo-gantt-timeline>\n </kendo-splitter-pane>\n </kendo-splitter>\n </div>\n <kendo-gantt-toolbar\n *ngIf=\"showToolbar('bottom')\"\n class=\"k-gantt-footer k-toolbar k-gantt-toolbar\"\n position=\"bottom\"></kendo-gantt-toolbar>\n <kendo-gantt-edit-dialog *ngIf=\"showEditingDialog\" [formGroup]=\"editDialogFormGroup\"></kendo-gantt-edit-dialog>\n <kendo-dialog\n *ngIf=\"showConfirmationDialog\"\n [width]=\"575\"\n [height]=\"170\"\n [title]=\"getText('confirmationDialogTitle')\"\n (close)=\"showConfirmationDialog = false;\">\n <span>{{getText('confirmationDialogContent')}}</span>\n <kendo-dialog-actions layout=\"normal\">\n <kendo-treelist-spacer></kendo-treelist-spacer>\n <button kendoButton [primary]=\"true\" (click)=\"handleDeleteConfirmation()\">{{ getText('deleteButtonText') }}</button>\n <button kendoButton (click)=\"showConfirmationDialog = false;\">{{ getText('cancelButtonText') }}</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n "
2361
2777
  }),
2362
2778
  __metadata("design:paramtypes", [TimelineViewService,
2363
2779
  ScrollSyncService,
2364
2780
  Renderer2,
2365
2781
  MappingService,
2366
2782
  OptionChangesService,
2367
- DependencyDomService])
2783
+ DependencyDomService,
2784
+ EditService,
2785
+ LocalizationService,
2786
+ ElementRef,
2787
+ NgZone])
2368
2788
  ], GanttComponent);
2369
2789
  return GanttComponent;
2370
2790
  }());
@@ -2538,10 +2958,14 @@ var GanttTasksTableBodyComponent = /** @class */ (function () {
2538
2958
  Input(),
2539
2959
  __metadata("design:type", Function)
2540
2960
  ], GanttTasksTableBodyComponent.prototype, "hasChildren", void 0);
2961
+ __decorate([
2962
+ Input(),
2963
+ __metadata("design:type", Number)
2964
+ ], GanttTasksTableBodyComponent.prototype, "index", void 0);
2541
2965
  GanttTasksTableBodyComponent = __decorate([
2542
2966
  Component({
2543
2967
  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 "
2968
+ 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 [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 [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 [index]=\"index\"\n >\n </kendo-gantt-task>\n </ng-template>\n </td>\n </tr>\n "
2545
2969
  }),
2546
2970
  __metadata("design:paramtypes", [DependencyDomService,
2547
2971
  MappingService])
@@ -2682,6 +3106,10 @@ var GanttTaskBase = /** @class */ (function () {
2682
3106
  Input(),
2683
3107
  __metadata("design:type", Function)
2684
3108
  ], GanttTaskBase.prototype, "taskClass", void 0);
3109
+ __decorate([
3110
+ Input(),
3111
+ __metadata("design:type", Number)
3112
+ ], GanttTaskBase.prototype, "index", void 0);
2685
3113
  return GanttTaskBase;
2686
3114
  }());
2687
3115
 
@@ -2690,10 +3118,16 @@ var GanttTaskBase = /** @class */ (function () {
2690
3118
  */
2691
3119
  var GanttTaskComponent = /** @class */ (function (_super) {
2692
3120
  __extends(GanttTaskComponent, _super);
2693
- function GanttTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) {
2694
- return _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
3121
+ function GanttTaskComponent(mapper, timelineViewService, dependencyDomService, optionChangesService, cdr, editService) {
3122
+ var _this = _super.call(this, mapper, timelineViewService, dependencyDomService, optionChangesService, cdr) || this;
3123
+ _this.editService = editService;
3124
+ return _this;
2695
3125
  }
2696
3126
  GanttTaskComponent_1 = GanttTaskComponent;
3127
+ GanttTaskComponent.prototype.onTaskDelete = function () {
3128
+ this.editService.dataItem = this.dataItem;
3129
+ this.editService.showConfirmationDialog.next();
3130
+ };
2697
3131
  var GanttTaskComponent_1;
2698
3132
  __decorate([
2699
3133
  Input(),
@@ -2712,13 +3146,14 @@ var GanttTaskComponent = /** @class */ (function (_super) {
2712
3146
  useExisting: forwardRef(function () { return GanttTaskComponent_1; })
2713
3147
  }
2714
3148
  ],
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 "
3149
+ 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 >\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
3150
  }),
2717
3151
  __metadata("design:paramtypes", [MappingService,
2718
3152
  TimelineViewService,
2719
3153
  DependencyDomService,
2720
3154
  OptionChangesService,
2721
- ChangeDetectorRef])
3155
+ ChangeDetectorRef,
3156
+ EditService])
2722
3157
  ], GanttTaskComponent);
2723
3158
  return GanttTaskComponent;
2724
3159
  }(GanttTaskBase));
@@ -2752,7 +3187,7 @@ var GanttSummaryTaskComponent = /** @class */ (function (_super) {
2752
3187
  useExisting: forwardRef(function () { return GanttSummaryTaskComponent_1; })
2753
3188
  }
2754
3189
  ],
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 "
3190
+ 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 >\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
3191
  }),
2757
3192
  __metadata("design:paramtypes", [MappingService,
2758
3193
  TimelineViewService,
@@ -2788,7 +3223,7 @@ var GanttMilestoneTaskComponent = /** @class */ (function (_super) {
2788
3223
  useExisting: forwardRef(function () { return GanttMilestoneTaskComponent_1; })
2789
3224
  }
2790
3225
  ],
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 "
3226
+ 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 [attr.data-task-index]=\"index\"\n >\n </div>\n "
2792
3227
  }),
2793
3228
  __metadata("design:paramtypes", [MappingService,
2794
3229
  TimelineViewService,
@@ -2937,7 +3372,8 @@ var ToolbarComponent = /** @class */ (function () {
2937
3372
  * The Gantt ViewSelector component. Shows the currently active view type, and allows switching to another view type.
2938
3373
  */
2939
3374
  var ViewSelectorComponent = /** @class */ (function () {
2940
- function ViewSelectorComponent() {
3375
+ function ViewSelectorComponent(localizationService) {
3376
+ this.localizationService = localizationService;
2941
3377
  this.hostClass = true;
2942
3378
  /**
2943
3379
  * The currently active view type.
@@ -2961,7 +3397,7 @@ var ViewSelectorComponent = /** @class */ (function () {
2961
3397
  * @hidden
2962
3398
  */
2963
3399
  ViewSelectorComponent.prototype.getViewTypeText = function (viewType) {
2964
- return "" + viewType[0].toLocaleUpperCase() + viewType.slice(1);
3400
+ return this.localizationService.get(viewType + "ViewText");
2965
3401
  };
2966
3402
  __decorate([
2967
3403
  HostBinding('class.k-gantt-views-wrapper'),
@@ -2982,8 +3418,9 @@ var ViewSelectorComponent = /** @class */ (function () {
2982
3418
  ViewSelectorComponent = __decorate([
2983
3419
  Component({
2984
3420
  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
- })
3421
+ 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 [selected]=\"view === activeView\"\n (click)=\"onClick(view)\">{{getViewTypeText(view)}}</button>\n </kendo-buttongroup>\n "
3422
+ }),
3423
+ __metadata("design:paramtypes", [LocalizationService])
2987
3424
  ], ViewSelectorComponent);
2988
3425
  return ViewSelectorComponent;
2989
3426
  }());
@@ -3310,11 +3747,378 @@ var TimelineMonthViewComponent = /** @class */ (function (_super) {
3310
3747
  return TimelineMonthViewComponent;
3311
3748
  }(ViewBase));
3312
3749
 
3750
+ /**
3751
+ * @hidden
3752
+ */
3753
+ var EditDialogComponent = /** @class */ (function () {
3754
+ function EditDialogComponent(mapper, editService, localizationService) {
3755
+ this.mapper = mapper;
3756
+ this.editService = editService;
3757
+ this.localizationService = localizationService;
3758
+ }
3759
+ EditDialogComponent.prototype.getText = function (token) {
3760
+ return this.localizationService.get(token);
3761
+ };
3762
+ EditDialogComponent.prototype.handleEditingResult = function (editResultType) {
3763
+ this.editService.triggerEditEvent(editResultType);
3764
+ };
3765
+ EditDialogComponent.prototype.onTaskDelete = function () {
3766
+ this.editService.showConfirmationDialog.next();
3767
+ };
3768
+ __decorate([
3769
+ Input(),
3770
+ __metadata("design:type", FormGroup)
3771
+ ], EditDialogComponent.prototype, "formGroup", void 0);
3772
+ EditDialogComponent = __decorate([
3773
+ Component({
3774
+ selector: 'kendo-gantt-edit-dialog',
3775
+ 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 "
3776
+ }),
3777
+ __metadata("design:paramtypes", [MappingService,
3778
+ EditService,
3779
+ LocalizationService])
3780
+ ], EditDialogComponent);
3781
+ return EditDialogComponent;
3782
+ }());
3783
+
3784
+ /**
3785
+ * @hidden
3786
+ */
3787
+ var Messages = /** @class */ (function (_super) {
3788
+ __extends(Messages, _super);
3789
+ function Messages() {
3790
+ return _super !== null && _super.apply(this, arguments) || this;
3791
+ }
3792
+ __decorate([
3793
+ Input(),
3794
+ __metadata("design:type", String)
3795
+ ], Messages.prototype, "taskDeleteLabel", void 0);
3796
+ __decorate([
3797
+ Input(),
3798
+ __metadata("design:type", String)
3799
+ ], Messages.prototype, "taskEditingDialogTitle", void 0);
3800
+ __decorate([
3801
+ Input(),
3802
+ __metadata("design:type", String)
3803
+ ], Messages.prototype, "taskEditingDialogCloseTitle", void 0);
3804
+ __decorate([
3805
+ Input(),
3806
+ __metadata("design:type", String)
3807
+ ], Messages.prototype, "confirmationDialogCloseTitle", void 0);
3808
+ __decorate([
3809
+ Input(),
3810
+ __metadata("design:type", String)
3811
+ ], Messages.prototype, "confirmationDialogTitle", void 0);
3812
+ __decorate([
3813
+ Input(),
3814
+ __metadata("design:type", String)
3815
+ ], Messages.prototype, "deleteButtonText", void 0);
3816
+ __decorate([
3817
+ Input(),
3818
+ __metadata("design:type", String)
3819
+ ], Messages.prototype, "cancelButtonText", void 0);
3820
+ __decorate([
3821
+ Input(),
3822
+ __metadata("design:type", String)
3823
+ ], Messages.prototype, "saveButtonText", void 0);
3824
+ __decorate([
3825
+ Input(),
3826
+ __metadata("design:type", String)
3827
+ ], Messages.prototype, "titleFieldInputLabel", void 0);
3828
+ __decorate([
3829
+ Input(),
3830
+ __metadata("design:type", String)
3831
+ ], Messages.prototype, "startFieldInputLabel", void 0);
3832
+ __decorate([
3833
+ Input(),
3834
+ __metadata("design:type", String)
3835
+ ], Messages.prototype, "endFieldInputLabel", void 0);
3836
+ __decorate([
3837
+ Input(),
3838
+ __metadata("design:type", String)
3839
+ ], Messages.prototype, "completionRatioFieldInputLabel", void 0);
3840
+ __decorate([
3841
+ Input(),
3842
+ __metadata("design:type", String)
3843
+ ], Messages.prototype, "confirmationDialogContent", void 0);
3844
+ __decorate([
3845
+ Input(),
3846
+ __metadata("design:type", String)
3847
+ ], Messages.prototype, "dayViewText", void 0);
3848
+ __decorate([
3849
+ Input(),
3850
+ __metadata("design:type", String)
3851
+ ], Messages.prototype, "weekViewText", void 0);
3852
+ __decorate([
3853
+ Input(),
3854
+ __metadata("design:type", String)
3855
+ ], Messages.prototype, "monthViewText", void 0);
3856
+ __decorate([
3857
+ Input(),
3858
+ __metadata("design:type", String)
3859
+ ], Messages.prototype, "yearViewText", void 0);
3860
+ __decorate([
3861
+ Input(),
3862
+ __metadata("design:type", String)
3863
+ ], Messages.prototype, "noRecords", void 0);
3864
+ __decorate([
3865
+ Input(),
3866
+ __metadata("design:type", String)
3867
+ ], Messages.prototype, "filter", void 0);
3868
+ __decorate([
3869
+ Input(),
3870
+ __metadata("design:type", String)
3871
+ ], Messages.prototype, "filterEqOperator", void 0);
3872
+ __decorate([
3873
+ Input(),
3874
+ __metadata("design:type", String)
3875
+ ], Messages.prototype, "filterNotEqOperator", void 0);
3876
+ __decorate([
3877
+ Input(),
3878
+ __metadata("design:type", String)
3879
+ ], Messages.prototype, "filterIsNullOperator", void 0);
3880
+ __decorate([
3881
+ Input(),
3882
+ __metadata("design:type", String)
3883
+ ], Messages.prototype, "filterIsNotNullOperator", void 0);
3884
+ __decorate([
3885
+ Input(),
3886
+ __metadata("design:type", String)
3887
+ ], Messages.prototype, "filterIsEmptyOperator", void 0);
3888
+ __decorate([
3889
+ Input(),
3890
+ __metadata("design:type", String)
3891
+ ], Messages.prototype, "filterIsNotEmptyOperator", void 0);
3892
+ __decorate([
3893
+ Input(),
3894
+ __metadata("design:type", String)
3895
+ ], Messages.prototype, "filterStartsWithOperator", void 0);
3896
+ __decorate([
3897
+ Input(),
3898
+ __metadata("design:type", String)
3899
+ ], Messages.prototype, "filterContainsOperator", void 0);
3900
+ __decorate([
3901
+ Input(),
3902
+ __metadata("design:type", String)
3903
+ ], Messages.prototype, "filterNotContainsOperator", void 0);
3904
+ __decorate([
3905
+ Input(),
3906
+ __metadata("design:type", String)
3907
+ ], Messages.prototype, "filterEndsWithOperator", void 0);
3908
+ __decorate([
3909
+ Input(),
3910
+ __metadata("design:type", String)
3911
+ ], Messages.prototype, "filterGteOperator", void 0);
3912
+ __decorate([
3913
+ Input(),
3914
+ __metadata("design:type", String)
3915
+ ], Messages.prototype, "filterGtOperator", void 0);
3916
+ __decorate([
3917
+ Input(),
3918
+ __metadata("design:type", String)
3919
+ ], Messages.prototype, "filterLteOperator", void 0);
3920
+ __decorate([
3921
+ Input(),
3922
+ __metadata("design:type", String)
3923
+ ], Messages.prototype, "filterLtOperator", void 0);
3924
+ __decorate([
3925
+ Input(),
3926
+ __metadata("design:type", String)
3927
+ ], Messages.prototype, "filterIsTrue", void 0);
3928
+ __decorate([
3929
+ Input(),
3930
+ __metadata("design:type", String)
3931
+ ], Messages.prototype, "filterIsFalse", void 0);
3932
+ __decorate([
3933
+ Input(),
3934
+ __metadata("design:type", String)
3935
+ ], Messages.prototype, "filterBooleanAll", void 0);
3936
+ __decorate([
3937
+ Input(),
3938
+ __metadata("design:type", String)
3939
+ ], Messages.prototype, "filterAfterOrEqualOperator", void 0);
3940
+ __decorate([
3941
+ Input(),
3942
+ __metadata("design:type", String)
3943
+ ], Messages.prototype, "filterAfterOperator", void 0);
3944
+ __decorate([
3945
+ Input(),
3946
+ __metadata("design:type", String)
3947
+ ], Messages.prototype, "filterBeforeOperator", void 0);
3948
+ __decorate([
3949
+ Input(),
3950
+ __metadata("design:type", String)
3951
+ ], Messages.prototype, "filterBeforeOrEqualOperator", void 0);
3952
+ __decorate([
3953
+ Input(),
3954
+ __metadata("design:type", String)
3955
+ ], Messages.prototype, "filterFilterButton", void 0);
3956
+ __decorate([
3957
+ Input(),
3958
+ __metadata("design:type", String)
3959
+ ], Messages.prototype, "filterClearButton", void 0);
3960
+ __decorate([
3961
+ Input(),
3962
+ __metadata("design:type", String)
3963
+ ], Messages.prototype, "filterAndLogic", void 0);
3964
+ __decorate([
3965
+ Input(),
3966
+ __metadata("design:type", String)
3967
+ ], Messages.prototype, "filterOrLogic", void 0);
3968
+ __decorate([
3969
+ Input(),
3970
+ __metadata("design:type", String)
3971
+ ], Messages.prototype, "loading", void 0);
3972
+ __decorate([
3973
+ Input(),
3974
+ __metadata("design:type", String)
3975
+ ], Messages.prototype, "columnMenu", void 0);
3976
+ __decorate([
3977
+ Input(),
3978
+ __metadata("design:type", String)
3979
+ ], Messages.prototype, "columns", void 0);
3980
+ __decorate([
3981
+ Input(),
3982
+ __metadata("design:type", String)
3983
+ ], Messages.prototype, "lock", void 0);
3984
+ __decorate([
3985
+ Input(),
3986
+ __metadata("design:type", String)
3987
+ ], Messages.prototype, "unlock", void 0);
3988
+ __decorate([
3989
+ Input(),
3990
+ __metadata("design:type", String)
3991
+ ], Messages.prototype, "sortable", void 0);
3992
+ __decorate([
3993
+ Input(),
3994
+ __metadata("design:type", String)
3995
+ ], Messages.prototype, "sortAscending", void 0);
3996
+ __decorate([
3997
+ Input(),
3998
+ __metadata("design:type", String)
3999
+ ], Messages.prototype, "sortDescending", void 0);
4000
+ __decorate([
4001
+ Input(),
4002
+ __metadata("design:type", String)
4003
+ ], Messages.prototype, "sortedAscending", void 0);
4004
+ __decorate([
4005
+ Input(),
4006
+ __metadata("design:type", String)
4007
+ ], Messages.prototype, "sortedDescending", void 0);
4008
+ __decorate([
4009
+ Input(),
4010
+ __metadata("design:type", String)
4011
+ ], Messages.prototype, "sortedDefault", void 0);
4012
+ __decorate([
4013
+ Input(),
4014
+ __metadata("design:type", String)
4015
+ ], Messages.prototype, "columnsApply", void 0);
4016
+ __decorate([
4017
+ Input(),
4018
+ __metadata("design:type", String)
4019
+ ], Messages.prototype, "columnsReset", void 0);
4020
+ return Messages;
4021
+ }(ComponentMessages));
4022
+
4023
+ /**
4024
+ * Custom component messages override default component messages
4025
+ * ([see example]({% slug globalization_treelist %}#toc-localization)).
4026
+ */
4027
+ var CustomMessagesComponent = /** @class */ (function (_super) {
4028
+ __extends(CustomMessagesComponent, _super);
4029
+ function CustomMessagesComponent(service) {
4030
+ var _this = _super.call(this) || this;
4031
+ _this.service = service;
4032
+ return _this;
4033
+ }
4034
+ CustomMessagesComponent_1 = CustomMessagesComponent;
4035
+ Object.defineProperty(CustomMessagesComponent.prototype, "override", {
4036
+ get: function () {
4037
+ return true;
4038
+ },
4039
+ enumerable: true,
4040
+ configurable: true
4041
+ });
4042
+ var CustomMessagesComponent_1;
4043
+ CustomMessagesComponent = CustomMessagesComponent_1 = __decorate([
4044
+ Component({
4045
+ providers: [
4046
+ {
4047
+ provide: Messages,
4048
+ useExisting: forwardRef(function () { return CustomMessagesComponent_1; })
4049
+ }
4050
+ ],
4051
+ selector: 'kendo-gantt-messages',
4052
+ template: ""
4053
+ }),
4054
+ __metadata("design:paramtypes", [LocalizationService])
4055
+ ], CustomMessagesComponent);
4056
+ return CustomMessagesComponent;
4057
+ }(Messages));
4058
+
4059
+ /**
4060
+ * @hidden
4061
+ */
4062
+ var LocalizedMessagesDirective = /** @class */ (function (_super) {
4063
+ __extends(LocalizedMessagesDirective, _super);
4064
+ function LocalizedMessagesDirective(service) {
4065
+ var _this = _super.call(this) || this;
4066
+ _this.service = service;
4067
+ return _this;
4068
+ }
4069
+ LocalizedMessagesDirective_1 = LocalizedMessagesDirective;
4070
+ var LocalizedMessagesDirective_1;
4071
+ LocalizedMessagesDirective = LocalizedMessagesDirective_1 = __decorate([
4072
+ Directive({
4073
+ providers: [
4074
+ {
4075
+ provide: Messages,
4076
+ useExisting: forwardRef(function () { return LocalizedMessagesDirective_1; })
4077
+ }
4078
+ ],
4079
+ selector: '[kendoGanttLocalizedMessages]'
4080
+ }),
4081
+ __metadata("design:paramtypes", [LocalizationService])
4082
+ ], LocalizedMessagesDirective);
4083
+ return LocalizedMessagesDirective;
4084
+ }(Messages));
4085
+
4086
+ /**
4087
+ * @hidden
4088
+ */
4089
+ var GanttTreeListMessagesDirective = /** @class */ (function () {
4090
+ function GanttTreeListMessagesDirective(localizationService) {
4091
+ this.localizationService = localizationService;
4092
+ }
4093
+ GanttTreeListMessagesDirective.prototype.ngAfterViewInit = function () {
4094
+ var _this = this;
4095
+ var treeListServiceDictionary = this.localizationService.dictionary;
4096
+ Object.keys(treeListServiceDictionary)
4097
+ .forEach(function (token) { return treeListServiceDictionary[token] = _this.kendoGanttTreeListMessages.get(token.replace('kendo.treelist.', '')); });
4098
+ };
4099
+ __decorate([
4100
+ Input(),
4101
+ __metadata("design:type", LocalizationService)
4102
+ ], GanttTreeListMessagesDirective.prototype, "kendoGanttTreeListMessages", void 0);
4103
+ GanttTreeListMessagesDirective = __decorate([
4104
+ Directive({ selector: '[kendoGanttTreeListMessages]' }),
4105
+ __metadata("design:paramtypes", [LocalizationService])
4106
+ ], GanttTreeListMessagesDirective);
4107
+ return GanttTreeListMessagesDirective;
4108
+ }());
4109
+
3313
4110
  var IMPORTED_MODULES = [
3314
4111
  CommonModule,
4112
+ ReactiveFormsModule,
4113
+ LabelModule,
4114
+ InputsModule,
4115
+ DateInputsModule,
4116
+ ButtonsModule,
3315
4117
  SplitterModule,
3316
4118
  TreeListModule,
3317
- ButtonsModule
4119
+ ButtonsModule,
4120
+ DialogModule,
4121
+ EventsModule
3318
4122
  ];
3319
4123
  var DECLARATIONS = [
3320
4124
  GanttComponent,
@@ -3338,6 +4142,7 @@ var DECLARATIONS = [
3338
4142
  FilterMenuTemplateDirective,
3339
4143
  FilterCellTemplateDirective,
3340
4144
  CellTemplateDirective,
4145
+ EditTemplateDirective,
3341
4146
  ColumnMenuTemplateDirective,
3342
4147
  HeaderTemplateDirective,
3343
4148
  FooterTemplateDirective,
@@ -3345,10 +4150,42 @@ var DECLARATIONS = [
3345
4150
  GanttDependencyDirective,
3346
4151
  TimelineDayViewComponent,
3347
4152
  TimelineWeekViewComponent,
3348
- TimelineMonthViewComponent
4153
+ TimelineMonthViewComponent,
4154
+ EditDialogComponent,
4155
+ CustomMessagesComponent,
4156
+ LocalizedMessagesDirective,
4157
+ GanttTreeListMessagesDirective
3349
4158
  ];
3350
4159
  /**
3351
- * Sample module
4160
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
4161
+ * definition for the Gantt component.
4162
+ *
4163
+ * @example
4164
+ *
4165
+ * ```ts-no-run
4166
+ * // Import the Gantt module
4167
+ * import { GanttModule } from '@progress/kendo-angular-gantt';
4168
+ *
4169
+ * // The browser platform with a compiler
4170
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4171
+ *
4172
+ * import { NgModule } from '@angular/core';
4173
+ *
4174
+ * // Import the app component
4175
+ * import { AppComponent } from './app.component';
4176
+ *
4177
+ * // Define the app module
4178
+ * _@NgModule({
4179
+ * declarations: [AppComponent], // declare app component
4180
+ * imports: [BrowserModule, GanttModule], // import Gantt module
4181
+ * bootstrap: [AppComponent]
4182
+ * })
4183
+ * export class AppModule {}
4184
+ *
4185
+ * // Compile and launch the module
4186
+ * platformBrowserDynamic().bootstrapModule(AppModule);
4187
+ *
4188
+ * ```
3352
4189
  */
3353
4190
  var GanttModule = /** @class */ (function () {
3354
4191
  function GanttModule() {
@@ -3357,7 +4194,11 @@ var GanttModule = /** @class */ (function () {
3357
4194
  NgModule({
3358
4195
  imports: IMPORTED_MODULES.slice(),
3359
4196
  declarations: DECLARATIONS.slice(),
3360
- exports: DECLARATIONS.slice()
4197
+ exports: DECLARATIONS.slice(),
4198
+ providers: [{
4199
+ provide: L10N_PREFIX,
4200
+ useValue: 'kendo.gantt'
4201
+ }]
3361
4202
  })
3362
4203
  ], GanttModule);
3363
4204
  return GanttModule;
@@ -3367,4 +4208,4 @@ var GanttModule = /** @class */ (function () {
3367
4208
  * Generated bundle index. Do not edit.
3368
4209
  */
3369
4210
 
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 };
4211
+ 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, GanttColumnBase, GanttColumnComponent, GanttColumnGroupComponent, GanttSpanColumnComponent, CellTemplateDirective, HeaderTemplateDirective, FooterTemplateDirective, ColumnMenuTemplateDirective, FilterCellTemplateDirective, FilterMenuTemplateDirective, EditTemplateDirective };