devexpress-gantt
Advanced tools
Comparing version 4.1.50 to 4.1.51
/*! | ||
* DevExpress Gantt (dx-gantt.min) | ||
* Version: 4.1.50 | ||
* Build date: Wed Nov 15 2023 | ||
* Version: 4.1.51 | ||
* Build date: Fri Dec 08 2023 | ||
* | ||
@@ -6,0 +6,0 @@ * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED |
{ | ||
"name": "devexpress-gantt", | ||
"version": "4.1.50", | ||
"version": "4.1.51", | ||
"description": "DevExpress Gantt Control", | ||
@@ -5,0 +5,0 @@ "main": "dist/dx-gantt.min.js", |
@@ -5,2 +5,4 @@ import { isDefined } from "@devexpress/utils/lib/utils/common"; | ||
const invalidDateMillseconds = -8000000000000000; | ||
export class Task extends DataObject { | ||
@@ -45,4 +47,4 @@ start: Date; | ||
this.title = sourceObj.title as string; | ||
this.start = typeof sourceObj.start === "string" ? new Date(sourceObj.start) : sourceObj.start as Date || new Date(0); | ||
this.end = typeof sourceObj.end === "string" ? new Date(sourceObj.end) : sourceObj.end as Date || new Date(0); | ||
this.start = typeof sourceObj.start === "string" ? new Date(sourceObj.start) : sourceObj.start as Date || this.createInvalidDate(); | ||
this.end = typeof sourceObj.end === "string" ? new Date(sourceObj.end) : sourceObj.end as Date || this.createInvalidDate(); | ||
this.duration = sourceObj.duration as Date; | ||
@@ -77,5 +79,13 @@ this.progress = sourceObj.progress as number; | ||
public isValidStart() : boolean { return this.isValidTaskaDte(this.start); } | ||
public isValidEnd() : boolean { return this.isValidTaskaDte(this.end); } | ||
isValid(): boolean { | ||
return !!this.start.getTime() && !!this.end.getTime(); | ||
return this.isValidStart() && this.isValidEnd(); | ||
} | ||
private createInvalidDate(): Date { return new Date(invalidDateMillseconds); } | ||
private isValidTaskaDte(value: Date | null) { | ||
return !!value && value.getTime() !== invalidDateMillseconds; | ||
} | ||
} |
@@ -107,4 +107,4 @@ import { Task } from "../Entities/Task"; | ||
id: task.id, | ||
start: task.start, | ||
end: task.end, | ||
start: task.isValidStart() ? task.start : null, | ||
end: task.isValidEnd() ? task.end : null, | ||
duration: task.duration, | ||
@@ -487,3 +487,3 @@ description: task.description, | ||
const item = this._viewItemList[i]; | ||
if(item?.getVisible() && item?.task?.isValid) | ||
if(item?.getVisible() && item?.task?.isValid()) | ||
result.push(i); | ||
@@ -490,0 +490,0 @@ } |
@@ -165,2 +165,4 @@ import { DomUtils } from "@devexpress/utils/lib/utils/dom"; | ||
this.addInvalidTaskDependencies(taskDependencies); | ||
if(viewItem.selected) | ||
this.createTaskSelectionElement(index); | ||
return; | ||
@@ -167,0 +169,0 @@ } |
{ | ||
"name": "devexpress-gantt", | ||
"version": "4.1.50", | ||
"version": "4.1.51", | ||
"description": "DevExpress Gantt Control", | ||
@@ -5,0 +5,0 @@ "main": "dist/dx-gantt.min.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
2200744
34867