@progress/kendo-angular-gantt 13.5.1-develop.3 → 13.6.0-develop.1

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.
@@ -37,6 +37,7 @@ import { ViewBase } from './timeline/view-base';
37
37
  import { getEditItem } from './editing/utils';
38
38
  import { CellCloseEvent } from './models/events/cell-close-event.interface';
39
39
  import { TimeLineYearViewService } from './timeline/timeline-year-view.service';
40
+ import { CurrentTimeMarkerService } from './timeline/current-time-marker.service';
40
41
  import * as i0 from "@angular/core";
41
42
  import * as i1 from "./timeline/timeline-view.service";
42
43
  import * as i2 from "./scrolling/scroll-sync.service";
@@ -46,16 +47,17 @@ import * as i5 from "./dependencies/dependency-dom.service";
46
47
  import * as i6 from "./editing/edit.service";
47
48
  import * as i7 from "@progress/kendo-angular-l10n";
48
49
  import * as i8 from "./navigation/navigation.service";
49
- import * as i9 from "./toolbar/toolbar.component";
50
- import * as i10 from "@progress/kendo-angular-layout";
51
- import * as i11 from "@progress/kendo-angular-treelist";
52
- import * as i12 from "./timeline/gantt-timeline.component";
53
- import * as i13 from "./editing/edit-dialog.component";
54
- import * as i14 from "@progress/kendo-angular-dialog";
55
- import * as i15 from "@progress/kendo-angular-buttons";
56
- import * as i16 from "@progress/kendo-angular-common";
57
- import * as i17 from "./localization/localized-messages.directive";
58
- import * as i18 from "@angular/common";
50
+ import * as i9 from "./timeline/current-time-marker.service";
51
+ import * as i10 from "./toolbar/toolbar.component";
52
+ import * as i11 from "@progress/kendo-angular-layout";
53
+ import * as i12 from "@progress/kendo-angular-treelist";
54
+ import * as i13 from "./timeline/gantt-timeline.component";
55
+ import * as i14 from "./editing/edit-dialog.component";
56
+ import * as i15 from "@progress/kendo-angular-dialog";
57
+ import * as i16 from "@progress/kendo-angular-buttons";
58
+ import * as i17 from "@progress/kendo-angular-common";
59
+ import * as i18 from "./localization/localized-messages.directive";
60
+ import * as i19 from "@angular/common";
59
61
  const TREELIST_GROUP_COLUMNS_CLASS = 'k-gantt-treelist-nested-columns';
60
62
  const DEFAULT_VIEW = 'week';
61
63
  const DEFAULT_DRAG_SCROLL_SETTINGS = {
@@ -136,7 +138,7 @@ const DEFAULT_DRAG_SCROLL_SETTINGS = {
136
138
  * ```
137
139
  */
138
140
  export class GanttComponent {
139
- constructor(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone, navigation) {
141
+ constructor(timelineViewService, scrollSyncService, renderer, mapper, optionChangesService, dependencyDomService, editService, localizationService, hostElement, zone, navigation, currentTimeMarkerService) {
140
142
  this.timelineViewService = timelineViewService;
141
143
  this.scrollSyncService = scrollSyncService;
142
144
  this.renderer = renderer;
@@ -148,6 +150,7 @@ export class GanttComponent {
148
150
  this.hostElement = hostElement;
149
151
  this.zone = zone;
150
152
  this.navigation = navigation;
153
+ this.currentTimeMarkerService = currentTimeMarkerService;
151
154
  /**
152
155
  * @hidden
153
156
  */
@@ -245,6 +248,14 @@ export class GanttComponent {
245
248
  * @default false
246
249
  */
247
250
  this.columnsAutoSize = false;
251
+ /**
252
+ * Specifies the Gantt current time marker settings.
253
+ * The settings will be applied for all views.
254
+ * If the `currentTimeMarker` is set for a view then it takes precedence.
255
+ *
256
+ * @default true
257
+ */
258
+ this.currentTimeMarker = true;
248
259
  /**
249
260
  * Specifies if the column menu of the columns will be displayed.
250
261
  *
@@ -455,6 +466,7 @@ export class GanttComponent {
455
466
  this.localizationSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
456
467
  this.rtl = rtl;
457
468
  this.direction = this.rtl ? 'rtl' : 'ltr';
469
+ this.currentTimeMarkerService.rtl = rtl;
458
470
  });
459
471
  }
460
472
  get toolbarTemplate() {
@@ -517,8 +529,17 @@ export class GanttComponent {
517
529
  const view = this.views.find(view => view.type === this._activeView) ?
518
530
  this._activeView :
519
531
  this.views.first.type;
532
+ this.currentTimeMarkerService.activeView = view;
520
533
  return view;
521
534
  }
535
+ /**
536
+ * @hidden
537
+ *
538
+ */
539
+ get activeViewCurrentTimeMarker() {
540
+ const activeViewCurrentTimeMarker = this.views.find(view => view.type === this._activeView)?.currentTimeMarker;
541
+ return activeViewCurrentTimeMarker || this.currentTimeMarker;
542
+ }
522
543
  /**
523
544
  * Gets or sets the data of the Gantt.
524
545
  *
@@ -1086,6 +1107,9 @@ export class GanttComponent {
1086
1107
  this.loadTimelineData();
1087
1108
  this.scrollSyncService.resetTimelineScrollLeft();
1088
1109
  this.activeViewChange.emit(view);
1110
+ this.currentTimeMarkerService.slots = this.timelineSlots;
1111
+ this.currentTimeMarkerService.rows = this.viewItems;
1112
+ this.currentTimeMarkerService.activeView = view;
1089
1113
  }
1090
1114
  }
1091
1115
  /**
@@ -1302,8 +1326,8 @@ export class GanttComponent {
1302
1326
  }
1303
1327
  }
1304
1328
  }
1305
- GanttComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GanttComponent, deps: [{ token: i1.TimelineViewService }, { token: i2.ScrollSyncService }, { token: i0.Renderer2 }, { token: i3.MappingService }, { token: i4.OptionChangesService }, { token: i5.DependencyDomService }, { token: i6.EditService }, { token: i7.LocalizationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i8.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
1306
- GanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GanttComponent, selector: "kendo-gantt", inputs: { roleDescription: ["aria-roledescription", "roleDescription"], role: "role", taskModelFields: "taskModelFields", dependencyModelFields: "dependencyModelFields", activeView: "activeView", data: "data", isSelected: "isSelected", validateNewDependency: "validateNewDependency", selectable: "selectable", toolbarSettings: "toolbarSettings", toolbarAriaLabel: "toolbarAriaLabel", fetchChildren: "fetchChildren", hasChildren: "hasChildren", dependencies: "dependencies", sortable: "sortable", sort: "sort", filterable: "filterable", filter: "filter", workDayStart: "workDayStart", workDayEnd: "workDayEnd", workWeekStart: "workWeekStart", workWeekEnd: "workWeekEnd", navigable: "navigable", timelinePaneOptions: "timelinePaneOptions", treeListPaneOptions: "treeListPaneOptions", taskClass: "taskClass", rowClass: "rowClass", isExpanded: "isExpanded", columnsAutoSize: "columnsAutoSize", columnMenu: "columnMenu", columnsReorderable: "columnsReorderable", columnsResizable: "columnsResizable", dragScrollSettings: "dragScrollSettings" }, outputs: { selectionChange: "selectionChange", rowExpand: "rowExpand", taskDblClick: "taskDblClick", cellDblClick: "cellDblClick", cellClose: "cellClose", taskDelete: "taskDelete", rowCollapse: "rowCollapse", remove: "remove", cancel: "cancel", save: "save", taskAdd: "taskAdd", dependencyAdd: "dependencyAdd", sortChange: "sortChange", filterChange: "filterChange", dataStateChange: "dataStateChange", treeListPaneCollapsedChange: "treeListPaneCollapsedChange", timelinePaneCollapsedChange: "timelinePaneCollapsedChange", timelinePaneSizeChange: "timelinePaneSizeChange", activeViewChange: "activeViewChange", columnResize: "columnResize", columnReorder: "columnReorder", columnVisibilityChange: "columnVisibilityChange", columnLockedChange: "columnLockedChange", cellClick: "cellClick", taskClick: "taskClick" }, host: { properties: { "attr.aria-roledescription": "this.hostRoleDescriptionAttr", "attr.role": "this.hostRoleAttr", "class.k-gantt": "this.hostClasses", "attr.dir": "this.dir" } }, providers: [
1329
+ GanttComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GanttComponent, deps: [{ token: i1.TimelineViewService }, { token: i2.ScrollSyncService }, { token: i0.Renderer2 }, { token: i3.MappingService }, { token: i4.OptionChangesService }, { token: i5.DependencyDomService }, { token: i6.EditService }, { token: i7.LocalizationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i8.NavigationService }, { token: i9.CurrentTimeMarkerService }], target: i0.ɵɵFactoryTarget.Component });
1330
+ GanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GanttComponent, selector: "kendo-gantt", inputs: { roleDescription: ["aria-roledescription", "roleDescription"], role: "role", taskModelFields: "taskModelFields", dependencyModelFields: "dependencyModelFields", activeView: "activeView", data: "data", isSelected: "isSelected", validateNewDependency: "validateNewDependency", selectable: "selectable", toolbarSettings: "toolbarSettings", toolbarAriaLabel: "toolbarAriaLabel", fetchChildren: "fetchChildren", hasChildren: "hasChildren", dependencies: "dependencies", sortable: "sortable", sort: "sort", filterable: "filterable", filter: "filter", workDayStart: "workDayStart", workDayEnd: "workDayEnd", workWeekStart: "workWeekStart", workWeekEnd: "workWeekEnd", navigable: "navigable", timelinePaneOptions: "timelinePaneOptions", treeListPaneOptions: "treeListPaneOptions", taskClass: "taskClass", rowClass: "rowClass", isExpanded: "isExpanded", columnsAutoSize: "columnsAutoSize", currentTimeMarker: "currentTimeMarker", columnMenu: "columnMenu", columnsReorderable: "columnsReorderable", columnsResizable: "columnsResizable", dragScrollSettings: "dragScrollSettings" }, outputs: { selectionChange: "selectionChange", rowExpand: "rowExpand", taskDblClick: "taskDblClick", cellDblClick: "cellDblClick", cellClose: "cellClose", taskDelete: "taskDelete", rowCollapse: "rowCollapse", remove: "remove", cancel: "cancel", save: "save", taskAdd: "taskAdd", dependencyAdd: "dependencyAdd", sortChange: "sortChange", filterChange: "filterChange", dataStateChange: "dataStateChange", treeListPaneCollapsedChange: "treeListPaneCollapsedChange", timelinePaneCollapsedChange: "timelinePaneCollapsedChange", timelinePaneSizeChange: "timelinePaneSizeChange", activeViewChange: "activeViewChange", columnResize: "columnResize", columnReorder: "columnReorder", columnVisibilityChange: "columnVisibilityChange", columnLockedChange: "columnLockedChange", cellClick: "cellClick", taskClick: "taskClick" }, host: { properties: { "attr.aria-roledescription": "this.hostRoleDescriptionAttr", "attr.role": "this.hostRoleAttr", "class.k-gantt": "this.hostClasses", "attr.dir": "this.dir" } }, providers: [
1307
1331
  GanttLocalizationService,
1308
1332
  LocalizationService,
1309
1333
  {
@@ -1325,7 +1349,8 @@ GanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
1325
1349
  OptionChangesService,
1326
1350
  EditService,
1327
1351
  TimelineScrollService,
1328
- NavigationService
1352
+ NavigationService,
1353
+ CurrentTimeMarkerService
1329
1354
  ], queries: [{ propertyName: "taskContentTemplate", first: true, predicate: GanttTaskContentTemplateDirective, descendants: true }, { propertyName: "taskTemplate", first: true, predicate: GanttTaskTemplateDirective, descendants: true }, { propertyName: "summaryTaskTemplate", first: true, predicate: GanttSummaryTaskTemplateDirective, descendants: true }, { propertyName: "toolbarTemplateChildren", predicate: ToolbarTemplateDirective }, { propertyName: "columns", predicate: GanttColumnBase }, { propertyName: "views", predicate: ViewBase }], viewQueries: [{ propertyName: "treeList", first: true, predicate: TreeListComponent, descendants: true, static: true }, { propertyName: "timeline", first: true, predicate: GanttTimelineComponent, descendants: true }], exportAs: ["kendoGantt"], usesOnChanges: true, ngImport: i0, template: `
1330
1355
  <ng-container kendoGanttLocalizedMessages
1331
1356
  i18n-taskEditingGeneralTabTitle="kendo.gantt.taskEditingGeneralTabTitle|The title of the 'General' tab of the editing dialog TabStrip"
@@ -1644,6 +1669,7 @@ GanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
1644
1669
  [dragScrollSettings]="dragScrollSettings"
1645
1670
  [rows]="viewItems"
1646
1671
  [slots]="timelineSlots"
1672
+ [currentTimeMarker]="activeViewCurrentTimeMarker"
1647
1673
  [groupSlots]="timelineGroupSlots"
1648
1674
  [tableWidth]="tableWidth"
1649
1675
  [activeView]="activeView"
@@ -1696,7 +1722,7 @@ GanttComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
1696
1722
  </kendo-dialog>
1697
1723
 
1698
1724
  <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
1699
- `, isInline: true, components: [{ type: i9.ToolbarComponent, selector: "kendo-gantt-toolbar", inputs: ["showAddTask", "showViewSelector", "views", "activeView", "toolbarTemplate", "navigable", "position"], outputs: ["activeViewChange"] }, { type: i10.SplitterComponent, selector: "kendo-splitter", inputs: ["orientation", "resizeStep"], outputs: ["layoutChange"], exportAs: ["kendoSplitter"] }, { type: i10.SplitterPaneComponent, selector: "kendo-splitter-pane", inputs: ["order", "size", "separatorLabel", "min", "max", "resizable", "collapsible", "scrollable", "collapsed", "orientation", "containsSplitter", "overlayContent"], outputs: ["sizeChange", "collapsedChange"], exportAs: ["kendoSplitterPane"] }, { type: i11.TreeListComponent, selector: "kendo-treelist", inputs: ["aria-label", "data", "pageSize", "height", "rowHeight", "skip", "scrollable", "sort", "trackBy", "filter", "virtualColumns", "filterable", "sortable", "pageable", "navigable", "navigatable", "autoSize", "rowClass", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "idField", "selectable", "isSelected", "rowReorderable", "columns", "fetchChildren", "hasChildren", "isExpanded"], outputs: ["selectionChange", "filterChange", "pageChange", "sortChange", "dataStateChange", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "scrollBottom", "contentScroll", "expand", "collapse", "expandStateChange", "rowReorder"], exportAs: ["kendoTreeList"] }, { type: i11.CustomMessagesComponent, selector: "kendo-treelist-messages" }, { type: i12.GanttTimelineComponent, selector: "kendo-gantt-timeline", inputs: ["rows", "slots", "groupSlots", "tableWidth", "activeView", "taskContentTemplate", "taskTemplate", "summaryTaskTemplate", "taskClass", "renderDependencyDragClues", "dragScrollSettings", "selectable", "isTaskSelected", "isExpanded", "dependencies"], outputs: ["timelineContainerPress", "timelineContainerDrag", "timelineContainerRelease"] }, { type: i13.EditDialogComponent, selector: "kendo-gantt-edit-dialog", inputs: ["data"] }, { type: i14.DialogComponent, selector: "kendo-dialog", inputs: ["actions", "actionsLayout", "autoFocusedElement", "title", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "animation", "themeColor"], outputs: ["action", "close"], exportAs: ["kendoDialog"] }, { type: i14.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { type: i11.TreeListSpacerComponent, selector: "kendo-treelist-spacer, kendo-treelist-pager-spacer", inputs: ["width"] }, { type: i15.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i16.WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }], directives: [{ type: i17.LocalizedMessagesDirective, selector: "[kendoGanttLocalizedMessages]" }, { type: i18.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i16.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
1725
+ `, isInline: true, components: [{ type: i10.ToolbarComponent, selector: "kendo-gantt-toolbar", inputs: ["showAddTask", "showViewSelector", "views", "activeView", "toolbarTemplate", "navigable", "position"], outputs: ["activeViewChange"] }, { type: i11.SplitterComponent, selector: "kendo-splitter", inputs: ["orientation", "resizeStep"], outputs: ["layoutChange"], exportAs: ["kendoSplitter"] }, { type: i11.SplitterPaneComponent, selector: "kendo-splitter-pane", inputs: ["order", "size", "separatorLabel", "min", "max", "resizable", "collapsible", "scrollable", "collapsed", "orientation", "containsSplitter", "overlayContent"], outputs: ["sizeChange", "collapsedChange"], exportAs: ["kendoSplitterPane"] }, { type: i12.TreeListComponent, selector: "kendo-treelist", inputs: ["aria-label", "data", "pageSize", "height", "rowHeight", "skip", "scrollable", "sort", "trackBy", "filter", "virtualColumns", "filterable", "sortable", "pageable", "navigable", "navigatable", "autoSize", "rowClass", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "idField", "selectable", "isSelected", "rowReorderable", "columns", "fetchChildren", "hasChildren", "isExpanded"], outputs: ["selectionChange", "filterChange", "pageChange", "sortChange", "dataStateChange", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "scrollBottom", "contentScroll", "expand", "collapse", "expandStateChange", "rowReorder"], exportAs: ["kendoTreeList"] }, { type: i12.CustomMessagesComponent, selector: "kendo-treelist-messages" }, { type: i13.GanttTimelineComponent, selector: "kendo-gantt-timeline", inputs: ["rows", "slots", "groupSlots", "tableWidth", "activeView", "taskContentTemplate", "taskTemplate", "summaryTaskTemplate", "taskClass", "renderDependencyDragClues", "dragScrollSettings", "currentTimeMarker", "selectable", "isTaskSelected", "isExpanded", "dependencies"], outputs: ["timelineContainerPress", "timelineContainerDrag", "timelineContainerRelease"] }, { type: i14.EditDialogComponent, selector: "kendo-gantt-edit-dialog", inputs: ["data"] }, { type: i15.DialogComponent, selector: "kendo-dialog", inputs: ["actions", "actionsLayout", "autoFocusedElement", "title", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "animation", "themeColor"], outputs: ["action", "close"], exportAs: ["kendoDialog"] }, { type: i15.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { type: i12.TreeListSpacerComponent, selector: "kendo-treelist-spacer, kendo-treelist-pager-spacer", inputs: ["width"] }, { type: i16.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i17.WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }], directives: [{ type: i18.LocalizedMessagesDirective, selector: "[kendoGanttLocalizedMessages]" }, { type: i19.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i17.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
1700
1726
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GanttComponent, decorators: [{
1701
1727
  type: Component,
1702
1728
  args: [{
@@ -1724,7 +1750,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1724
1750
  OptionChangesService,
1725
1751
  EditService,
1726
1752
  TimelineScrollService,
1727
- NavigationService
1753
+ NavigationService,
1754
+ CurrentTimeMarkerService
1728
1755
  ],
1729
1756
  template: `
1730
1757
  <ng-container kendoGanttLocalizedMessages
@@ -2044,6 +2071,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2044
2071
  [dragScrollSettings]="dragScrollSettings"
2045
2072
  [rows]="viewItems"
2046
2073
  [slots]="timelineSlots"
2074
+ [currentTimeMarker]="activeViewCurrentTimeMarker"
2047
2075
  [groupSlots]="timelineGroupSlots"
2048
2076
  [tableWidth]="tableWidth"
2049
2077
  [activeView]="activeView"
@@ -2098,7 +2126,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2098
2126
  <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
2099
2127
  `
2100
2128
  }]
2101
- }], ctorParameters: function () { return [{ type: i1.TimelineViewService }, { type: i2.ScrollSyncService }, { type: i0.Renderer2 }, { type: i3.MappingService }, { type: i4.OptionChangesService }, { type: i5.DependencyDomService }, { type: i6.EditService }, { type: i7.LocalizationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i8.NavigationService }]; }, propDecorators: { treeList: [{
2129
+ }], ctorParameters: function () { return [{ type: i1.TimelineViewService }, { type: i2.ScrollSyncService }, { type: i0.Renderer2 }, { type: i3.MappingService }, { type: i4.OptionChangesService }, { type: i5.DependencyDomService }, { type: i6.EditService }, { type: i7.LocalizationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i8.NavigationService }, { type: i9.CurrentTimeMarkerService }]; }, propDecorators: { treeList: [{
2102
2130
  type: ViewChild,
2103
2131
  args: [TreeListComponent, { static: true }]
2104
2132
  }], timeline: [{
@@ -2196,6 +2224,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2196
2224
  type: Input
2197
2225
  }], columnsAutoSize: [{
2198
2226
  type: Input
2227
+ }], currentTimeMarker: [{
2228
+ type: Input
2199
2229
  }], columnMenu: [{
2200
2230
  type: Input
2201
2231
  }], columnsReorderable: [{
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export {};
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-gantt',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1695231780,
13
- version: '13.5.1-develop.3',
12
+ publishDate: 1695633813,
13
+ version: '13.6.0-develop.1',
14
14
  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'
15
15
  };
@@ -0,0 +1,85 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Injectable, NgZone, Renderer2 } from '@angular/core';
6
+ import { isDocumentAvailable } from '@progress/kendo-angular-common';
7
+ import * as i0 from "@angular/core";
8
+ const MS_PER_SECOND = 1000;
9
+ const MS_PER_MINUTE = 60 * MS_PER_SECOND;
10
+ /**
11
+ * @hidden
12
+ */
13
+ export { MS_PER_DAY } from '@progress/kendo-date-math';
14
+ /**
15
+ * @hidden
16
+ */
17
+ export class CurrentTimeMarkerService {
18
+ constructor(renderer, zone) {
19
+ this.renderer = renderer;
20
+ this.zone = zone;
21
+ this.slots = [];
22
+ this.rows = [];
23
+ this.now = new Date(Date.now());
24
+ this.createTimeMarker = () => {
25
+ if (!isDocumentAvailable()) {
26
+ return;
27
+ }
28
+ this.removeTimeMarker();
29
+ if (this.slotIndex >= 0) {
30
+ this.now = new Date(Date.now());
31
+ this.timeMarkerDiv = this.renderer.createElement('div');
32
+ this.renderer.addClass(this.timeMarkerDiv, 'k-current-time');
33
+ this.renderer.setStyle(this.timeMarkerDiv, 'width', '1px');
34
+ this.renderer.setStyle(this.timeMarkerDiv, 'top', '0px');
35
+ this.renderer.setStyle(this.timeMarkerDiv, `${this.rtl ? 'right' : 'left'}`, this.deltaOffset + 'px');
36
+ this.renderer.appendChild(this.container.nativeElement, this.timeMarkerDiv);
37
+ this.renderer.setStyle(this.timeMarkerDiv, 'height', this.height + 'px');
38
+ this.currentTimeTimeout = setTimeout(this.createTimeMarker, this.interval || MS_PER_MINUTE);
39
+ }
40
+ };
41
+ }
42
+ get deltaOffset() {
43
+ if (this.slotIndex >= 0) {
44
+ const total = this.slots[this.slotIndex].end.getTime() - this.slots[this.slotIndex].start.getTime();
45
+ if (total > 0) {
46
+ const currentTimeValue = this.now.getTime() - this.slots[this.slotIndex].start.getTime();
47
+ const fractionInsideCell = currentTimeValue / total;
48
+ const deltaOffsetToSlot = this.slotIndex * this.slotWidth;
49
+ const deltaOffsetInsideSlot = fractionInsideCell * this.slotWidth;
50
+ return deltaOffsetToSlot + deltaOffsetInsideSlot;
51
+ }
52
+ return 0;
53
+ }
54
+ }
55
+ ;
56
+ get slotWidth() {
57
+ return this.slots[0]?.slotWidth;
58
+ }
59
+ get slotIndex() {
60
+ return this.slots.indexOf(this.slots.find((slot) => slot.start <= this.now && slot.end > this.now));
61
+ }
62
+ get height() {
63
+ return this.rows.length * this.rowHeight;
64
+ }
65
+ get interval() {
66
+ if (typeof (this.currentTimeMarker) === 'boolean') {
67
+ return MS_PER_MINUTE;
68
+ }
69
+ return this.currentTimeMarker.updateInterval || MS_PER_MINUTE;
70
+ }
71
+ ngOnDestroy() {
72
+ clearInterval(this.currentTimeTimeout);
73
+ }
74
+ removeTimeMarker() {
75
+ if (this.timeMarkerDiv) {
76
+ this.renderer.removeChild(this.container.nativeElement, this.timeMarkerDiv);
77
+ clearInterval(this.currentTimeTimeout);
78
+ }
79
+ }
80
+ }
81
+ CurrentTimeMarkerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CurrentTimeMarkerService, deps: [{ token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
82
+ CurrentTimeMarkerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CurrentTimeMarkerService });
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CurrentTimeMarkerService, decorators: [{
84
+ type: Injectable
85
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.NgZone }]; } });
@@ -9,24 +9,27 @@ import { isDocumentAvailable } from '@progress/kendo-angular-common';
9
9
  import { ScrollSyncService } from '../scrolling/scroll-sync.service';
10
10
  import { DependencyDomService } from '../dependencies/dependency-dom.service';
11
11
  import { isPresent } from '../utils';
12
+ import { CurrentTimeMarkerService } from './current-time-marker.service';
12
13
  import * as i0 from "@angular/core";
13
14
  import * as i1 from "../scrolling/scroll-sync.service";
14
15
  import * as i2 from "../dependencies/dependency-dom.service";
15
- import * as i3 from "../rendering/gantt-header-table-body.component";
16
- import * as i4 from "../rendering/gantt-tasks-table-body.component";
17
- import * as i5 from "../scrolling/timeline-scroll.directive";
18
- import * as i6 from "@progress/kendo-angular-common";
19
- import * as i7 from "@angular/common";
20
- import * as i8 from "../dependencies/gantt-dependency.directive";
16
+ import * as i3 from "./current-time-marker.service";
17
+ import * as i4 from "../rendering/gantt-header-table-body.component";
18
+ import * as i5 from "../rendering/gantt-tasks-table-body.component";
19
+ import * as i6 from "../scrolling/timeline-scroll.directive";
20
+ import * as i7 from "@progress/kendo-angular-common";
21
+ import * as i8 from "@angular/common";
22
+ import * as i9 from "../dependencies/gantt-dependency.directive";
21
23
  /**
22
24
  * @hidden
23
25
  */
24
26
  export class GanttTimelineComponent {
25
- constructor(scrollSyncService, dependencyDomService, renderer, zone) {
27
+ constructor(scrollSyncService, dependencyDomService, renderer, zone, currentTimeMarkerService) {
26
28
  this.scrollSyncService = scrollSyncService;
27
29
  this.dependencyDomService = dependencyDomService;
28
30
  this.renderer = renderer;
29
31
  this.zone = zone;
32
+ this.currentTimeMarkerService = currentTimeMarkerService;
30
33
  this.hostClass = true;
31
34
  this.dependencies = [];
32
35
  // as all drag-and-drop operations are on the timeline container, use a single draggable instance
@@ -41,6 +44,14 @@ export class GanttTimelineComponent {
41
44
  )
42
45
  .subscribe(({ timelineRow }) => {
43
46
  const timelineRowHeight = isDocumentAvailable() ? timelineRow.getBoundingClientRect().height : 0;
47
+ this.currentTimeMarkerService.rowHeight = timelineRowHeight;
48
+ this.currentTimeMarkerService.currentTimeMarker = this.currentTimeMarker;
49
+ this.currentTimeMarkerService.removeTimeMarker();
50
+ if ((typeof this.currentTimeMarker === 'boolean' && this.currentTimeMarker) || this.currentTimeMarker?.enabled) {
51
+ this.zone.runOutsideAngular(() => {
52
+ this.currentTimeMarkerService.createTimeMarker();
53
+ });
54
+ }
44
55
  this.renderer.setStyle(this.timelineColumns.nativeElement, 'height', `${(this.rows || []).length * timelineRowHeight}px`);
45
56
  }));
46
57
  }
@@ -51,6 +62,9 @@ export class GanttTimelineComponent {
51
62
  return this.renderDependencyDragClues;
52
63
  }
53
64
  ngAfterViewInit() {
65
+ this.currentTimeMarkerService.slots = this.slots;
66
+ this.currentTimeMarkerService.rows = this.rows;
67
+ this.currentTimeMarkerService.container = this.timelineContent;
54
68
  const timelineHeader = this.timelineHeaderWrap.nativeElement;
55
69
  const rightContainer = this.timelineContent.nativeElement;
56
70
  this.scrollSyncService.registerElement(rightContainer, 'timeline');
@@ -64,8 +78,8 @@ export class GanttTimelineComponent {
64
78
  return item.hasOwnProperty('isWorking') && !item.isWorking;
65
79
  }
66
80
  }
67
- GanttTimelineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GanttTimelineComponent, deps: [{ token: i1.ScrollSyncService }, { token: i2.DependencyDomService }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
68
- GanttTimelineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GanttTimelineComponent, selector: "kendo-gantt-timeline", inputs: { rows: "rows", slots: "slots", groupSlots: "groupSlots", tableWidth: "tableWidth", activeView: "activeView", taskContentTemplate: "taskContentTemplate", taskTemplate: "taskTemplate", summaryTaskTemplate: "summaryTaskTemplate", taskClass: "taskClass", renderDependencyDragClues: "renderDependencyDragClues", dragScrollSettings: "dragScrollSettings", selectable: "selectable", isTaskSelected: "isTaskSelected", isExpanded: "isExpanded", dependencies: "dependencies" }, outputs: { timelineContainerPress: "timelineContainerPress", timelineContainerDrag: "timelineContainerDrag", timelineContainerRelease: "timelineContainerRelease" }, host: { properties: { "class.k-gantt-timeline": "this.hostClass" } }, viewQueries: [{ propertyName: "timelineContent", first: true, predicate: ["timelineContent"], descendants: true, static: true }, { propertyName: "timelineColumns", first: true, predicate: ["timelineColumns"], descendants: true, static: true }, { propertyName: "timelineHeaderWrap", first: true, predicate: ["timelineHeaderWrap"], descendants: true, static: true }, { propertyName: "tasksContainer", first: true, predicate: ["tasksContainer"], descendants: true, static: true }, { propertyName: "dragPopupContainer", first: true, predicate: ["dragPopupContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "dependencyDragCreatePolyline", first: true, predicate: ["dependencyDragCreatePolyline"], descendants: true }], ngImport: i0, template: `
81
+ GanttTimelineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GanttTimelineComponent, deps: [{ token: i1.ScrollSyncService }, { token: i2.DependencyDomService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i3.CurrentTimeMarkerService }], target: i0.ɵɵFactoryTarget.Component });
82
+ GanttTimelineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GanttTimelineComponent, selector: "kendo-gantt-timeline", inputs: { rows: "rows", slots: "slots", groupSlots: "groupSlots", tableWidth: "tableWidth", activeView: "activeView", taskContentTemplate: "taskContentTemplate", taskTemplate: "taskTemplate", summaryTaskTemplate: "summaryTaskTemplate", taskClass: "taskClass", renderDependencyDragClues: "renderDependencyDragClues", dragScrollSettings: "dragScrollSettings", currentTimeMarker: "currentTimeMarker", selectable: "selectable", isTaskSelected: "isTaskSelected", isExpanded: "isExpanded", dependencies: "dependencies" }, outputs: { timelineContainerPress: "timelineContainerPress", timelineContainerDrag: "timelineContainerDrag", timelineContainerRelease: "timelineContainerRelease" }, host: { properties: { "class.k-gantt-timeline": "this.hostClass" } }, viewQueries: [{ propertyName: "timelineContent", first: true, predicate: ["timelineContent"], descendants: true, static: true }, { propertyName: "timelineColumns", first: true, predicate: ["timelineColumns"], descendants: true, static: true }, { propertyName: "timelineHeaderWrap", first: true, predicate: ["timelineHeaderWrap"], descendants: true, static: true }, { propertyName: "tasksContainer", first: true, predicate: ["tasksContainer"], descendants: true, static: true }, { propertyName: "dragPopupContainer", first: true, predicate: ["dragPopupContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "dependencyDragCreatePolyline", first: true, predicate: ["dependencyDragCreatePolyline"], descendants: true }], ngImport: i0, template: `
69
83
  <div class="k-timeline k-grid k-grid-md">
70
84
  <div class="k-grid-header">
71
85
  <div #timelineHeaderWrap class="k-grid-header-wrap">
@@ -168,7 +182,7 @@ GanttTimelineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
168
182
  <ng-container #dragPopupContainer></ng-container>
169
183
  </div>
170
184
  </div>
171
- `, isInline: true, components: [{ type: i3.GanttHeaderTableBodyComponent, selector: "[kendoGanttHeaderTableBody]", inputs: ["groupSlots", "slots"] }, { type: i4.GanttTasksTableBodyComponent, selector: "[kendoGanttTasksTableBody]", inputs: ["selectable", "rows", "activeView", "taskContentTemplate", "taskTemplate", "summaryTaskTemplate", "taskClass", "isExpanded", "isTaskSelected", "renderDependencyDragClues"] }], directives: [{ type: i5.TimelineScrollableDirective, selector: "[kendoGanttTimelineScrollable]", inputs: ["scrollSettings"] }, { type: i6.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.GanttDependencyDirective, selector: "[kendoGanttDependency]", inputs: ["dependency"] }] });
185
+ `, isInline: true, components: [{ type: i4.GanttHeaderTableBodyComponent, selector: "[kendoGanttHeaderTableBody]", inputs: ["groupSlots", "slots"] }, { type: i5.GanttTasksTableBodyComponent, selector: "[kendoGanttTasksTableBody]", inputs: ["selectable", "rows", "activeView", "taskContentTemplate", "taskTemplate", "summaryTaskTemplate", "taskClass", "isExpanded", "isTaskSelected", "renderDependencyDragClues"] }], directives: [{ type: i6.TimelineScrollableDirective, selector: "[kendoGanttTimelineScrollable]", inputs: ["scrollSettings"] }, { type: i7.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.GanttDependencyDirective, selector: "[kendoGanttDependency]", inputs: ["dependency"] }] });
172
186
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GanttTimelineComponent, decorators: [{
173
187
  type: Component,
174
188
  args: [{
@@ -278,7 +292,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
278
292
  </div>
279
293
  `
280
294
  }]
281
- }], ctorParameters: function () { return [{ type: i1.ScrollSyncService }, { type: i2.DependencyDomService }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { timelineContent: [{
295
+ }], ctorParameters: function () { return [{ type: i1.ScrollSyncService }, { type: i2.DependencyDomService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i3.CurrentTimeMarkerService }]; }, propDecorators: { timelineContent: [{
282
296
  type: ViewChild,
283
297
  args: ['timelineContent', { static: true }]
284
298
  }], timelineColumns: [{
@@ -321,6 +335,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
321
335
  type: Input
322
336
  }], dragScrollSettings: [{
323
337
  type: Input
338
+ }], currentTimeMarker: [{
339
+ type: Input
324
340
  }], selectable: [{
325
341
  type: Input
326
342
  }], isTaskSelected: [{
@@ -7,8 +7,13 @@ import { IntlService } from '@progress/kendo-angular-intl';
7
7
  import { orderBy } from '@progress/kendo-data-query';
8
8
  import { MappingService } from '../common/mapping.service';
9
9
  import { isWorkDay, isWorkHour, lastDayOfWeek } from '../utils';
10
- import { addDays, firstDayInWeek, getDate, firstDayOfMonth, lastDayOfMonth, addMonths, addWeeks, lastMonthOfYear } from '@progress/kendo-date-math';
10
+ import { addDays, firstDayInWeek, getDate, firstDayOfMonth, lastDayOfMonth, addMonths, addWeeks, lastMonthOfYear, cloneDate } from '@progress/kendo-date-math';
11
11
  import { Inject, LOCALE_ID } from '@angular/core';
12
+ const setTime = (origin, candidate) => {
13
+ const date = cloneDate(origin);
14
+ date.setHours(candidate.getHours(), candidate.getMinutes(), candidate.getSeconds(), candidate.getMilliseconds());
15
+ return date;
16
+ };
12
17
  /**
13
18
  * @hidden
14
19
  */
@@ -25,6 +30,7 @@ export const MONTH_FORMAT = 'MMM';
25
30
  * @hidden
26
31
  */
27
32
  export const YEAR_FORMAT = 'yyyy';
33
+ const END_OF_DAY_DATE = new Date(1980, 0, 1, 23, 59, 59, 999);
28
34
  /**
29
35
  * @hidden
30
36
  */
@@ -135,7 +141,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
135
141
  if (span > 0) {
136
142
  slots.push({
137
143
  start: daySlots[0].start,
138
- end: daySlots[span - 1].end,
144
+ end: setTime(daySlots[span - 1].end, END_OF_DAY_DATE),
139
145
  text: `${firstDay} - ${lastDay}`,
140
146
  span: span,
141
147
  slotWidth: this.options.slotWidth
@@ -161,7 +167,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
161
167
  if (span > 0) {
162
168
  slots.push({
163
169
  start: isMainViewType ? daySlots[0].start : weekSlots[0].start,
164
- end: isMainViewType ? daySlots[span - 1] : weekSlots[span - 1].end,
170
+ end: isMainViewType ? daySlots[span - 1] : setTime(weekSlots[span - 1].end, END_OF_DAY_DATE),
165
171
  span: span,
166
172
  text: shortText,
167
173
  slotWidth: this.options.slotWidth
@@ -184,7 +190,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
184
190
  if (span > 0) {
185
191
  slots.push({
186
192
  start: monthSlots[0].start,
187
- end: monthSlots[span - 1].end,
193
+ end: setTime(monthSlots[span - 1].end, END_OF_DAY_DATE),
188
194
  span: span,
189
195
  text: this.intlService.formatDate(slotEnd, yearFormat),
190
196
  slotWidth: this.options.slotWidth
@@ -38,7 +38,7 @@ export class ViewBase {
38
38
  }
39
39
  }
40
40
  ViewBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewBase, deps: [{ token: i1.OptionChangesService }, { token: i2.DependencyDomService }], target: i0.ɵɵFactoryTarget.Directive });
41
- ViewBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth", timelineHeadersDateFormat: "timelineHeadersDateFormat" }, usesOnChanges: true, ngImport: i0 });
41
+ ViewBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth", timelineHeadersDateFormat: "timelineHeadersDateFormat", currentTimeMarker: "currentTimeMarker" }, usesOnChanges: true, ngImport: i0 });
42
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewBase, decorators: [{
43
43
  type: Directive,
44
44
  args: [{
@@ -49,4 +49,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
49
49
  type: Input
50
50
  }], timelineHeadersDateFormat: [{
51
51
  type: Input
52
+ }], currentTimeMarker: [{
53
+ type: Input
52
54
  }] } });