@progress/kendo-angular-gantt 17.0.2-develop.9 → 17.1.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.
@@ -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: 1731923686,
13
- version: '17.0.2-develop.9',
12
+ publishDate: 1732031901,
13
+ version: '17.1.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
  };
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { ChangeDetectorRef, Directive, ElementRef, HostBinding, Input, ViewChild } from '@angular/core';
5
+ import { ChangeDetectorRef, Directive, ElementRef, HostBinding, Input, isDevMode, ViewChild } from '@angular/core';
6
6
  import { MS_PER_HOUR, MS_PER_DAY, firstDayOfMonth } from '@progress/kendo-date-math';
7
7
  import { Subscription } from 'rxjs';
8
8
  import { NavigationService } from '../navigation/navigation.service';
@@ -67,6 +67,9 @@ export class GanttTaskBase {
67
67
  const taskStart = this.mapper.extractFromTask(this.dataItem, 'start');
68
68
  const taskEnd = this.mapper.extractFromTask(this.dataItem, 'end');
69
69
  if (this.activeView === 'year') {
70
+ if (!taskStart || !taskEnd) {
71
+ return;
72
+ }
70
73
  const monthsDiff = Math.max(getTotalMonthsInBetween(taskStart, taskEnd), 0);
71
74
  const totalDaysInStartMonth = getTotalDaysInMonth(taskStart);
72
75
  if (monthsDiff > 0 || (monthsDiff === 0 && taskStart.getMonth() !== taskEnd.getMonth())) {
@@ -92,8 +95,12 @@ export class GanttTaskBase {
92
95
  */
93
96
  get taskOffset() {
94
97
  const taskStart = this.mapper.extractFromTask(this.dataItem, 'start');
98
+ const taskEnd = this.mapper.extractFromTask(this.dataItem, 'end');
95
99
  const viewStart = this.viewService.viewStart;
96
100
  if (this.activeView === 'year') {
101
+ if (!taskStart || !taskEnd) {
102
+ return;
103
+ }
97
104
  const viewStartDate = new Date(viewStart);
98
105
  const offsetSlots = getTotalMonthsInBetween(viewStartDate, new Date(firstDayOfMonth(taskStart))) + 1;
99
106
  const currentMonthOffset = taskStart.getDate() / getTotalDaysInMonth(taskStart);
@@ -123,6 +130,19 @@ export class GanttTaskBase {
123
130
  this.subscriptions.add(this.navigationService.taskStatusChanges
124
131
  .subscribe(this.updateActiveState.bind(this)));
125
132
  }
133
+ ngOnInit() {
134
+ const taskStart = this.mapper.extractFromTask(this.dataItem, 'start');
135
+ const taskEnd = this.mapper.extractFromTask(this.dataItem, 'end');
136
+ if (isDevMode()) {
137
+ const taskTitle = this.mapper.extractFromTask(this.dataItem, 'title');
138
+ if (!taskStart || !taskEnd) {
139
+ console.warn(`Task ${taskTitle} is missing a start or end date.`);
140
+ }
141
+ if (taskStart && taskEnd && taskStart > taskEnd) {
142
+ console.warn(`Task ${taskTitle} has a start date that is after the end date.`);
143
+ }
144
+ }
145
+ }
126
146
  ngOnChanges(changes) {
127
147
  if (isPresent(changes['dataItem'])) {
128
148
  if (isPresent(changes['dataItem'].previousValue)) {
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
- import { Injectable, Directive, Input, EventEmitter, Inject, LOCALE_ID, HostBinding, ViewChild, forwardRef, Component, ViewContainerRef, Output, Optional, QueryList, SkipSelf, Host, ContentChildren, ContentChild, HostListener, isDevMode, NgModule } from '@angular/core';
6
+ import { Injectable, Directive, Input, EventEmitter, Inject, LOCALE_ID, isDevMode, HostBinding, ViewChild, forwardRef, Component, ViewContainerRef, Output, Optional, QueryList, SkipSelf, Host, ContentChildren, ContentChild, HostListener, NgModule } from '@angular/core';
7
7
  import { ColumnBase, ColumnComponent, ColumnGroupComponent, SpanColumnComponent, TreeListSpacerComponent, DataBoundTreeComponent, ExpandableTreeComponent, TreeListComponent, CustomMessagesComponent as CustomMessagesComponent$2, FlatBindingDirective, HierarchyBindingDirective, ExpandableDirective, ColumnResizingService } from '@progress/kendo-angular-treelist';
8
8
  import { cloneDate, addWeeks, firstDayInWeek, addDays, lastDayOfMonth, getDate, firstDayOfMonth, addMonths, lastMonthOfYear, MS_PER_HOUR, MS_PER_DAY, isEqual } from '@progress/kendo-date-math';
9
9
  import { Subject, Subscription, fromEvent, forkJoin, EMPTY, isObservable, of } from 'rxjs';
@@ -40,8 +40,8 @@ const packageMetadata = {
40
40
  name: '@progress/kendo-angular-gantt',
41
41
  productName: 'Kendo UI for Angular',
42
42
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
43
- publishDate: 1731923686,
44
- version: '17.0.2-develop.9',
43
+ publishDate: 1732031901,
44
+ version: '17.1.0-develop.1',
45
45
  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'
46
46
  };
47
47
 
@@ -1910,6 +1910,9 @@ class GanttTaskBase {
1910
1910
  const taskStart = this.mapper.extractFromTask(this.dataItem, 'start');
1911
1911
  const taskEnd = this.mapper.extractFromTask(this.dataItem, 'end');
1912
1912
  if (this.activeView === 'year') {
1913
+ if (!taskStart || !taskEnd) {
1914
+ return;
1915
+ }
1913
1916
  const monthsDiff = Math.max(getTotalMonthsInBetween(taskStart, taskEnd), 0);
1914
1917
  const totalDaysInStartMonth = getTotalDaysInMonth(taskStart);
1915
1918
  if (monthsDiff > 0 || (monthsDiff === 0 && taskStart.getMonth() !== taskEnd.getMonth())) {
@@ -1935,8 +1938,12 @@ class GanttTaskBase {
1935
1938
  */
1936
1939
  get taskOffset() {
1937
1940
  const taskStart = this.mapper.extractFromTask(this.dataItem, 'start');
1941
+ const taskEnd = this.mapper.extractFromTask(this.dataItem, 'end');
1938
1942
  const viewStart = this.viewService.viewStart;
1939
1943
  if (this.activeView === 'year') {
1944
+ if (!taskStart || !taskEnd) {
1945
+ return;
1946
+ }
1940
1947
  const viewStartDate = new Date(viewStart);
1941
1948
  const offsetSlots = getTotalMonthsInBetween(viewStartDate, new Date(firstDayOfMonth(taskStart))) + 1;
1942
1949
  const currentMonthOffset = taskStart.getDate() / getTotalDaysInMonth(taskStart);
@@ -1966,6 +1973,19 @@ class GanttTaskBase {
1966
1973
  this.subscriptions.add(this.navigationService.taskStatusChanges
1967
1974
  .subscribe(this.updateActiveState.bind(this)));
1968
1975
  }
1976
+ ngOnInit() {
1977
+ const taskStart = this.mapper.extractFromTask(this.dataItem, 'start');
1978
+ const taskEnd = this.mapper.extractFromTask(this.dataItem, 'end');
1979
+ if (isDevMode()) {
1980
+ const taskTitle = this.mapper.extractFromTask(this.dataItem, 'title');
1981
+ if (!taskStart || !taskEnd) {
1982
+ console.warn(`Task ${taskTitle} is missing a start or end date.`);
1983
+ }
1984
+ if (taskStart && taskEnd && taskStart > taskEnd) {
1985
+ console.warn(`Task ${taskTitle} has a start date that is after the end date.`);
1986
+ }
1987
+ }
1988
+ }
1969
1989
  ngOnChanges(changes) {
1970
1990
  if (isPresent(changes['dataItem'])) {
1971
1991
  if (isPresent(changes['dataItem'].previousValue)) {
@@ -8,6 +8,7 @@
8
8
  export interface GanttTask {
9
9
  /**
10
10
  * The date at which the Gantt task ends.
11
+ * > A valid date should be provided.
11
12
  */
12
13
  end: Date;
13
14
  /**
@@ -21,6 +22,7 @@ export interface GanttTask {
21
22
  completionRatio?: number;
22
23
  /**
23
24
  * The date at which the Gantt task starts.
25
+ * > A valid date should be provided.
24
26
  */
25
27
  start: Date;
26
28
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-gantt",
3
- "version": "17.0.2-develop.9",
3
+ "version": "17.1.0-develop.1",
4
4
  "description": "Kendo UI Angular Gantt",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -18,31 +18,31 @@
18
18
  "friendlyName": "Gantt"
19
19
  },
20
20
  "peerDependencies": {
21
- "@angular/animations": "16 - 18",
22
- "@angular/common": "16 - 18",
23
- "@angular/core": "16 - 18",
24
- "@angular/forms": "16 - 18",
25
- "@angular/platform-browser": "16 - 18",
21
+ "@angular/animations": "16 - 19",
22
+ "@angular/common": "16 - 19",
23
+ "@angular/core": "16 - 19",
24
+ "@angular/forms": "16 - 19",
25
+ "@angular/platform-browser": "16 - 19",
26
26
  "@progress/kendo-data-query": "^1.5.5",
27
27
  "@progress/kendo-licensing": "^1.0.2",
28
- "@progress/kendo-angular-buttons": "17.0.2-develop.9",
29
- "@progress/kendo-angular-common": "17.0.2-develop.9",
30
- "@progress/kendo-angular-dialog": "17.0.2-develop.9",
31
- "@progress/kendo-angular-dropdowns": "17.0.2-develop.9",
32
- "@progress/kendo-angular-grid": "17.0.2-develop.9",
33
- "@progress/kendo-angular-icons": "17.0.2-develop.9",
34
- "@progress/kendo-angular-inputs": "17.0.2-develop.9",
35
- "@progress/kendo-angular-intl": "17.0.2-develop.9",
36
- "@progress/kendo-angular-l10n": "17.0.2-develop.9",
37
- "@progress/kendo-angular-label": "17.0.2-develop.9",
38
- "@progress/kendo-angular-layout": "17.0.2-develop.9",
39
- "@progress/kendo-angular-popup": "17.0.2-develop.9",
40
- "@progress/kendo-angular-treelist": "17.0.2-develop.9",
28
+ "@progress/kendo-angular-buttons": "17.1.0-develop.1",
29
+ "@progress/kendo-angular-common": "17.1.0-develop.1",
30
+ "@progress/kendo-angular-dialog": "17.1.0-develop.1",
31
+ "@progress/kendo-angular-dropdowns": "17.1.0-develop.1",
32
+ "@progress/kendo-angular-grid": "17.1.0-develop.1",
33
+ "@progress/kendo-angular-icons": "17.1.0-develop.1",
34
+ "@progress/kendo-angular-inputs": "17.1.0-develop.1",
35
+ "@progress/kendo-angular-intl": "17.1.0-develop.1",
36
+ "@progress/kendo-angular-l10n": "17.1.0-develop.1",
37
+ "@progress/kendo-angular-label": "17.1.0-develop.1",
38
+ "@progress/kendo-angular-layout": "17.1.0-develop.1",
39
+ "@progress/kendo-angular-popup": "17.1.0-develop.1",
40
+ "@progress/kendo-angular-treelist": "17.1.0-develop.1",
41
41
  "rxjs": "^6.5.3 || ^7.0.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "tslib": "^2.3.1",
45
- "@progress/kendo-angular-schematics": "17.0.2-develop.9",
45
+ "@progress/kendo-angular-schematics": "17.1.0-develop.1",
46
46
  "@progress/kendo-common": "^1.0.1",
47
47
  "@progress/kendo-date-math": "^1.5.2",
48
48
  "@progress/kendo-draggable": "^3.0.0"
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { ChangeDetectorRef, ElementRef, SimpleChanges } from '@angular/core';
5
+ import { ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
6
6
  import { NavigationService } from '../navigation/navigation.service';
7
7
  import { OptionChangesService } from '../common/option-changes.service';
8
8
  import { TaskClassFn } from '../models/class-callbacks';
@@ -14,7 +14,7 @@ import * as i0 from "@angular/core";
14
14
  /**
15
15
  * @hidden
16
16
  */
17
- export declare abstract class GanttTaskBase {
17
+ export declare abstract class GanttTaskBase implements OnInit, OnChanges, OnDestroy {
18
18
  mapper: MappingService;
19
19
  private timelineViewService;
20
20
  private dependencyDomService;
@@ -51,6 +51,7 @@ export declare abstract class GanttTaskBase {
51
51
  private subscriptions;
52
52
  constructor(mapper: MappingService, // left public to be available for usage in the templates
53
53
  timelineViewService: TimelineViewService, dependencyDomService: DependencyDomService, optionChangesService: OptionChangesService, cdr: ChangeDetectorRef, navigationService: NavigationService);
54
+ ngOnInit(): void;
54
55
  ngOnChanges(changes: SimpleChanges): void;
55
56
  ngOnDestroy(): void;
56
57
  private updateActiveState;
@@ -7,16 +7,16 @@ function default_1(options) {
7
7
  // See https://github.com/telerik/kendo-schematics/issues/28
8
8
  peerDependencies: {
9
9
  // peer deps of the treelist
10
- '@progress/kendo-angular-dateinputs': '17.0.2-develop.9',
11
- '@progress/kendo-angular-excel-export': '17.0.2-develop.9',
12
- '@progress/kendo-angular-pdf-export': '17.0.2-develop.9',
13
- '@progress/kendo-angular-utils': '17.0.2-develop.9',
10
+ '@progress/kendo-angular-dateinputs': '17.1.0-develop.1',
11
+ '@progress/kendo-angular-excel-export': '17.1.0-develop.1',
12
+ '@progress/kendo-angular-pdf-export': '17.1.0-develop.1',
13
+ '@progress/kendo-angular-utils': '17.1.0-develop.1',
14
14
  '@progress/kendo-drawing': '^1.0.0',
15
15
  // peer deps of the dropdowns
16
- '@progress/kendo-angular-treeview': '17.0.2-develop.9',
17
- '@progress/kendo-angular-navigation': '17.0.2-develop.9',
16
+ '@progress/kendo-angular-treeview': '17.1.0-develop.1',
17
+ '@progress/kendo-angular-navigation': '17.1.0-develop.1',
18
18
  // peer dep of the layout
19
- '@progress/kendo-angular-progressbar': '17.0.2-develop.9',
19
+ '@progress/kendo-angular-progressbar': '17.1.0-develop.1',
20
20
  // peer dep of the icons
21
21
  '@progress/kendo-svg-icons': '^4.0.0'
22
22
  } });