Skip to content

Commit

Permalink
[update] version 8.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKlimenkov committed May 31, 2024
1 parent 4925e36 commit 2eba3c1
Show file tree
Hide file tree
Showing 16 changed files with 121 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dhtmlxGantt #

[![dhtmlx.com](https://img.shields.io/badge/made%20by-DHTMLX-blue)](https://dhtmlx.com/)
[![npm: v.8.0.7](https://img.shields.io/badge/npm-v.8.0.7-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
[![npm: v.8.0.8](https://img.shields.io/badge/npm-v.8.0.8-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
[![License: GPL v2](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)

[Getting started](#getting-started) | [Features](#features) | [License](#license) | [Useful links](#links) | [Follow us](#followus)
Expand Down Expand Up @@ -117,7 +117,7 @@ Resource management, critical path calculation, auto scheduling, and other enhan
<a name="license"></a>
## License ##

dhtmlxGantt v.8.0.7 Standard
dhtmlxGantt v.8.0.8 Standard

This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gantt",
"version": "8.0.7",
"version": "8.0.8",
"homepage": "https://dhtmlx.com/docs/products/dhtmlxGantt/",
"description": "An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.",
"main": [
Expand Down
2 changes: 1 addition & 1 deletion codebase/dhtmlxgantt.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for dhtmlxGantt 8.0.7
// Type definitions for dhtmlxGantt 8.0.8
// Project: https://dhtmlx.com/docs/products/dhtmlxGantt

type GanttCallback = (...args: any[]) => any;
Expand Down
6 changes: 3 additions & 3 deletions codebase/dhtmlxgantt.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion codebase/dhtmlxgantt.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion codebase/sources/dhtmlxgantt.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
@license
dhtmlxGantt v.8.0.7 Standard
dhtmlxGantt v.8.0.8 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
Expand Down
106 changes: 95 additions & 11 deletions codebase/sources/dhtmlxgantt.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
@license

dhtmlxGantt v.8.0.7 Standard
dhtmlxGantt v.8.0.8 Standard

This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.

Expand Down Expand Up @@ -19231,6 +19231,10 @@ DataStore.prototype = {

this._removeItemInner(id);

if (this.isSilent()) {
this.callEvent("onAfterSilentDelete", [obj.id, obj]);
}

if (!this.isSilent()) {
this.filter();
this.callEvent("onAfterDelete", [obj.id, obj]); //repaint signal
Expand Down Expand Up @@ -19758,6 +19762,9 @@ function initDataStores(gantt) {
linksStore.attachEvent("onAfterDelete", function (id, link) {
sync_link_delete(link);
});
linksStore.attachEvent("onAfterSilentDelete", function (id, link) {
sync_link_delete(link);
});
linksStore.attachEvent("onBeforeIdChange", function (oldId, newId) {
sync_link_delete(gantt.mixin({
id: oldId
Expand Down Expand Up @@ -22306,13 +22313,23 @@ module.exports = function (gantt) {
this.$root = domHelpers.toNode(node);
rebuildLayout();
this.$mouseEvents.reset(this.$root);
addMinimalSizes(gantt);
}

this.callEvent("onTemplatesReady", []);
this.callEvent("onGanttReady", []);
this.render();
};

function addMinimalSizes(gantt) {
if (gantt.$container && !gantt.config.autosize) {
if (gantt.$root.offsetHeight < 50) {
// eslint-disable-next-line no-console
console.warn("The Gantt container has a small height, so you cannot see its content. If it is not intended, you need to set the 'height' style rule to the container:\nhttps://docs.dhtmlx.com/gantt/faq.html#theganttchartisntrenderedcorrectly");
}
}
}

gantt.$click = {
buttons: {
"edit": function edit(id) {
Expand Down Expand Up @@ -24680,10 +24697,12 @@ function createHelper(gantt) {
}

timeoutId = requestAnimationFrame(function () {
var cells = Array.prototype.slice.call(gantt.$container.querySelectorAll(".resourceTimeline_cell [data-assignment-cell]"));
cells.forEach(function (cell) {
cell.contentEditable = true;
});
if (gantt.$container) {
var cells = Array.prototype.slice.call(gantt.$container.querySelectorAll(".resourceTimeline_cell [data-assignment-cell]"));
cells.forEach(function (cell) {
cell.contentEditable = true;
});
}
});
return true;
}
Expand Down Expand Up @@ -39201,6 +39220,14 @@ function ScaleHelper(gantt) {
var scales;

if (legacyMode) {
var docLink = "https://docs.dhtmlx.com/gantt/migrating.html#:~:text=%3D%20false%3B-,Time%20scale%20settings,-Configuration%20of%20time";

if (gantt.env.isFF) {
docLink = "https://docs.dhtmlx.com/gantt/migrating.html#6162";
} // eslint-disable-next-line no-console


console.warn("You are using the obsolete scale configuration.\nIt will stop working in the future versions.\nPlease migrate the configuration to the newer version:\n".concat(docLink));
scales = scaleConfig.subscales || [];
} else {
scales = scaleConfig.scales.slice(1);
Expand Down Expand Up @@ -40906,7 +40933,7 @@ module.exports = Timeline;
/***/ (function(module, exports) {

module.exports = function (gantt) {
gantt.config.touch_drag = 500; //nearly immediate dnd
gantt.config.touch_drag = 75; //nearly immediate dnd

gantt.config.touch = true;
gantt.config.touch_feedback = true;
Expand Down Expand Up @@ -50282,6 +50309,10 @@ var Tooltip = /** @class */ (function () {
var node = this.getNode();
if (!domHelpers.isChildOf(node, container)) {
this.hide();
// GS-2463. Don't put the node beyond the body coordinates
// as it may trigger the resize event
node.style.top = node.style.top || "0px";
node.style.left = node.style.left || "0px";
container.appendChild(node);
}
if (this._isLikeMouseEvent(left)) {
Expand Down Expand Up @@ -50979,15 +51010,65 @@ var Monitor = /** @class */ (function () {
saveInitialAll();
return true;
});
gantt.attachEvent("onBeforeTaskDrag", function (taskId) { return _this.store(taskId, gantt.config.undo_types.task); });
var dragId = null;
var projectDrag = false;
gantt.attachEvent("onBeforeTaskDrag", function (taskId) {
dragId = gantt.getState().drag_id;
if (dragId === taskId) {
var task = gantt.getTask(taskId);
if (gantt.isSummaryTask(task) && gantt.config.drag_project) {
projectDrag = true;
}
}
// GS-99. Store the initial task dates before multiple drag
if (gantt.plugins().multiselect) {
var selectedIds = gantt.getSelectedTasks();
if (selectedIds.length > 1) {
selectedIds.forEach(function (id) {
_this.store(id, gantt.config.undo_types.task, true);
});
}
}
return _this.store(taskId, gantt.config.undo_types.task);
});
gantt.attachEvent("onAfterTaskDrag", function (taskId) {
// if we drag multiple tasks and other tasks move to another date after that,
// auto-scheduling/correct work time should occur in anoher command.
// otherwise, when we undo the changes, the task constraint is not restored correctly
var multipleDrag = projectDrag || (gantt.plugins().multiselect && gantt.getSelectedTasks().length > 1);
if (multipleDrag && dragId === taskId) {
projectDrag = false;
dragId = null;
_this.stopBatchAction();
}
// GS-99. When dragging multiple tasks, we need to store the initial tasks
_this.store(taskId, gantt.config.undo_types.task, true);
});
gantt.attachEvent("onLightbox", function (taskId) { return _this.store(taskId, gantt.config.undo_types.task); });
gantt.attachEvent("onBeforeTaskAutoSchedule", function (task) {
_this.store(task.id, gantt.config.undo_types.task);
_this.store(task.id, gantt.config.undo_types.task, true);
return true;
});
if (gantt.ext.inlineEditors) {
gantt.ext.inlineEditors.attachEvent("onEditStart", function (state) {
_this.store(state.id, gantt.config.undo_types.task);
// remove the onGanttLayoutReady wrapper when GS-1288 is merged
var onBeforeEditStartId_1 = null;
var onEditStart_1 = null;
gantt.attachEvent("onGanttLayoutReady", function () {
if (onBeforeEditStartId_1) {
gantt.ext.inlineEditors.detachEvent(onBeforeEditStartId_1);
}
if (onEditStart_1) {
gantt.ext.inlineEditors.detachEvent(onEditStart_1);
}
onEditStart_1 = gantt.ext.inlineEditors.attachEvent("onEditStart", function (state) {
_this.store(state.id, gantt.config.undo_types.task);
});
// GS-99. If another inline editor is opened and we open a new inline editor,
// we shouldn't use the batchAction
onBeforeEditStartId_1 = gantt.ext.inlineEditors.attachEvent("onBeforeEditStart", function (state) {
_this.stopBatchAction();
return true;
});
});
}
};
Expand Down Expand Up @@ -51261,6 +51342,9 @@ var Undo = /** @class */ (function () {
isExists: "isLinkExists"
};
gantt.batchUpdate(function () {
// it is logical to undo actions from the last one to the first one
// but we have to do it from the first one because the order
// of tasks ($index and $local_index) depends on the existing tasks
for (var i = 0; i < action.commands.length; i++) {
command = action.commands[i];
var method = methods[command.entity][command.type];
Expand Down Expand Up @@ -51309,7 +51393,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi

function DHXGantt() {
this.constants = __webpack_require__(/*! ../constants */ "./sources/constants/index.js");
this.version = "8.0.7";
this.version = "8.0.8";
this.license = "gpl";
this.templates = {};
this.ext = {};
Expand Down
2 changes: 1 addition & 1 deletion codebase/sources/skins/dhtmlxgantt_broadway.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
@license
dhtmlxGantt v.8.0.7 Standard
dhtmlxGantt v.8.0.8 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
Expand Down
2 changes: 1 addition & 1 deletion codebase/sources/skins/dhtmlxgantt_contrast_black.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
@license
dhtmlxGantt v.8.0.7 Standard
dhtmlxGantt v.8.0.8 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
Expand Down
2 changes: 1 addition & 1 deletion codebase/sources/skins/dhtmlxgantt_contrast_white.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
@license
dhtmlxGantt v.8.0.7 Standard
dhtmlxGantt v.8.0.8 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
Expand Down
2 changes: 1 addition & 1 deletion codebase/sources/skins/dhtmlxgantt_material.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
@license
dhtmlxGantt v.8.0.7 Standard
dhtmlxGantt v.8.0.8 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
Expand Down
2 changes: 1 addition & 1 deletion codebase/sources/skins/dhtmlxgantt_meadow.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
@license
dhtmlxGantt v.8.0.7 Standard
dhtmlxGantt v.8.0.8 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
Expand Down
2 changes: 1 addition & 1 deletion codebase/sources/skins/dhtmlxgantt_skyblue.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
@license
dhtmlxGantt v.8.0.7 Standard
dhtmlxGantt v.8.0.8 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
Expand Down
2 changes: 1 addition & 1 deletion codebase/sources/skins/dhtmlxgantt_terrace.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
@license
dhtmlxGantt v.8.0.7 Standard
dhtmlxGantt v.8.0.8 Standard
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dhtmlx-gantt",
"version": "8.0.7",
"version": "8.0.8",
"description": "An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.",
"main": "codebase/dhtmlxgantt.js",
"types": "codebase/dhtmlxgantt.d.ts",
Expand Down
9 changes: 9 additions & 0 deletions whatsnew.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
### 8.0.8

Fix the issue that caused the Undo extension to skip some actions in bulk operations
Fix the script error that occurs when gantt.deleteLink is called from the gantt.silent function
Fix the incorrect behavior of Auto Scheduling when two connected tasks have different calendars
Fix the script error that occurs after creating a circular link
Fix the script error that occurs after destroying the Gantt which has an editable Resource Panel
Fix the issue that caused the tooltip to disappear in some browsers

### 8.0.7

Fix the script error occurring in the trial build on SalesForce
Expand Down

0 comments on commit 2eba3c1

Please sign in to comment.