Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

devexpress-gantt

Package Overview
Dependencies
Maintainers
6
Versions
313
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devexpress-gantt - npm Package Compare versions

Comparing version 4.1.34 to 4.1.35

2

dist/lib/package.json
{
"name": "devexpress-gantt",
"version": "4.1.34",
"version": "4.1.35",
"description": "DevExpress Gantt Control",

@@ -5,0 +5,0 @@ "main": "dist/dx-gantt.min.js",

@@ -8,2 +8,3 @@ import { isDefined } from "@devexpress/utils/lib/utils/common";

import { UpdateTaskHistoryItem } from "../../Model/History/HistoryItems/Task/UpdateTaskHistoryItem";
import { DateUtils } from "../../View/Utils/DateUtils";
import { TaskCommandBase } from "./TaskCommandBase";

@@ -113,8 +114,14 @@

protected processAutoParentUpdate(id: string, newValues: ITaskUpdateValues, oldStart: Date, oldEnd: Date): void {
const needRecalculateParents = isDefined(newValues.progress) || isDefined(newValues.start) || isDefined(newValues.end);
const hasNewStart = isDefined(newValues.start);
const hasNewEnd = isDefined(newValues.end);
const needRecalculateParents = isDefined(newValues.progress) || hasNewStart || hasNewEnd;
const startDelta = isDefined(newValues.start) ? newValues.start.getTime() - oldStart.getTime() : null;
const endDelta = isDefined(newValues.end) ? newValues.end.getTime() - oldEnd.getTime() : null;
const isMove = startDelta === endDelta && startDelta !== 0;
const startDelta = hasNewStart ? newValues.start.getTime() - oldStart.getTime() : null;
const endDelta = hasNewEnd ? newValues.end.getTime() - oldEnd.getTime() : null;
const startCrossedDST = hasNewStart && DateUtils.getTimezoneOffsetDiff(oldStart, newValues.start) !== 0;
const endCrossedDST = hasNewEnd && DateUtils.getTimezoneOffsetDiff(oldEnd, newValues.end) !== 0;
const taskCrossedDSTPoint = (startCrossedDST || endCrossedDST) && Math.abs(endDelta - startDelta) === DateUtils.msPerHour;
const isMove = startDelta !== 0 && (startDelta === endDelta || taskCrossedDSTPoint);
if(needRecalculateParents)

@@ -121,0 +128,0 @@ if(isMove)

import { isDefined } from "@devexpress/utils/lib/utils/common";
import { ValidationControllerSettings } from "../../View/Settings/InitSettings/ValidationControllerSettings";
import { ValidationSettings } from "../../View/Settings/ValidationSettings";
import { DateUtils } from "../../View/Utils/DateUtils";
import { DependencyType } from "../Entities/Enums";

@@ -281,3 +282,4 @@ import { UpdateTaskHistoryItem } from "../History/HistoryItems/Task/UpdateTaskHistoryItem";

const newStart = new Date(childTask.start.getTime() + delta);
const newEnd = new Date(childTask.end.getTime() + delta);
const taskPeriod = DateUtils.getRangeMSPeriod(childTask.start, childTask.end);
const newEnd = DateUtils.getDSTCorrectedTaskEnd(newStart, taskPeriod);
changedTasks.push({ id: childTask.internalId, start: childTask.start, end: childTask.end });

@@ -284,0 +286,0 @@ this.history.addAndRedo(new UpdateTaskHistoryItem(this.modelManipulator, childTask.internalId, { start: newStart, end: newEnd }));

@@ -298,3 +298,3 @@ import { Point } from "@devexpress/utils/lib/geometry/point";

const taskPeriod = DateUtils.getRangeMSPeriod(this.task.start, this.task.end);
this.taskDateRange.end = DateUtils.getDSTCorrectedDate(this.taskDateRange.start, taskPeriod);
this.taskDateRange.end = DateUtils.getDSTCorrectedTaskEnd(this.taskDateRange.start, taskPeriod);
this.isEditingInProgress = this.raiseTaskMoving(this.task, this.taskDateRange.start, this.taskDateRange.end, this.onTaskMovingCallback.bind(this));

@@ -301,0 +301,0 @@ if(this.isEditingInProgress)

@@ -527,3 +527,3 @@ import { Size } from "@devexpress/utils/lib/geometry/size";

const start = new Date(this.range.start);
return DateUtils.getDSTCorrectedDate(start, preResult * this.tickTimeSpan);
return DateUtils.getDSTCorrectedTaskEnd(start, preResult * this.tickTimeSpan);
}

@@ -530,0 +530,0 @@ getDateByPosInMonthBasedViewTypes(position: number): Date {

@@ -188,5 +188,5 @@ import { DateRange } from "../../Model/WorkingTime/DateRange";

}
static getDSTCorrectedDate(ref: Date, ms: number): Date {
const time = ref.getTime() + ms;
const delta = DateUtils.getDSTDelta(ref, new Date(time));
static getDSTCorrectedTaskEnd(start: Date, period: number): Date {
const time = start.getTime() + period;
const delta = DateUtils.getDSTDelta(start, new Date(time));
return new Date(time + delta);

@@ -193,0 +193,0 @@ }

@@ -73,3 +73,3 @@ import { DomUtils } from "@devexpress/utils/lib/utils/dom";

getWeeksScaleItemText(scaleItemDate: Date, isViewTypeScale: boolean): string {
const weekLastDayDate = DateUtils.getDSTCorrectedDate(scaleItemDate, DateUtils.msPerWeek - DateUtils.msPerDay);
const weekLastDayDate = DateUtils.getDSTCorrectedTaskEnd(scaleItemDate, DateUtils.msPerWeek - DateUtils.msPerDay);
return this.getWeeksScaleItemTextCore(

@@ -76,0 +76,0 @@ this.getDayTotalText(scaleItemDate, isViewTypeScale, true, isViewTypeScale, !isViewTypeScale),

{
"name": "devexpress-gantt",
"version": "4.1.34",
"version": "4.1.35",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc