@syncfusion/ej2-gantt 24.2.5 → 24.2.7
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.
- package/CHANGELOG.md +11 -0
- package/dist/ej2-gantt.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +95 -16
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +95 -16
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/gantt/actions/connector-line-edit.js +33 -5
- package/src/gantt/actions/dependency.js +44 -6
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/base/date-processor.js +10 -3
- package/src/gantt/base/task-processor.js +7 -1
- package/src/gantt/base/tree-grid.js +1 -1
|
@@ -1278,9 +1278,16 @@ class DateProcessor {
|
|
|
1278
1278
|
convert(date, timezone) {
|
|
1279
1279
|
const fromOffset = date.getTimezoneOffset();
|
|
1280
1280
|
const toOffset = this.offset(date, timezone);
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1281
|
+
if (fromOffset < 0) {
|
|
1282
|
+
date = new Date(date.getTime() - (fromOffset - toOffset) / 60000);
|
|
1283
|
+
const toLocalOffset = date.getTimezoneOffset();
|
|
1284
|
+
return new Date(date.getTime() - (toLocalOffset - fromOffset) / 60000);
|
|
1285
|
+
}
|
|
1286
|
+
else {
|
|
1287
|
+
date = new Date(date.getTime() + (fromOffset - toOffset) * 60000);
|
|
1288
|
+
const toLocalOffset = date.getTimezoneOffset();
|
|
1289
|
+
return new Date(date.getTime() + (toLocalOffset - fromOffset) * 60000);
|
|
1290
|
+
}
|
|
1284
1291
|
}
|
|
1285
1292
|
/**
|
|
1286
1293
|
* @param {string | Date} date .
|
|
@@ -2794,7 +2801,12 @@ class TaskProcessor extends DateProcessor {
|
|
|
2794
2801
|
return ((this.getTimeDifference(sDate, eDate, true) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
|
|
2795
2802
|
}
|
|
2796
2803
|
else {
|
|
2797
|
-
|
|
2804
|
+
if (ganttData.durationUnit === "day" && ganttData.duration < 1 && isNullOrUndefined(this.parent.taskFields.duration)) {
|
|
2805
|
+
return (ganttData.duration * this.parent.perDayWidth);
|
|
2806
|
+
}
|
|
2807
|
+
else {
|
|
2808
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * hour)) * this.parent.perDayWidth);
|
|
2809
|
+
}
|
|
2798
2810
|
}
|
|
2799
2811
|
}
|
|
2800
2812
|
}
|
|
@@ -2805,6 +2817,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
2805
2817
|
}
|
|
2806
2818
|
if (this.getSecondsInDecimal(eDate) === this.parent.defaultEndTime) {
|
|
2807
2819
|
eDate.setHours(24);
|
|
2820
|
+
eDate.setHours(0, 0, 0, 0);
|
|
2808
2821
|
}
|
|
2809
2822
|
if (this.getSecondsInDecimal(eDate) === this.parent.defaultStartTime) {
|
|
2810
2823
|
eDate.setHours(0, 0, 0, 0);
|
|
@@ -8376,7 +8389,7 @@ class GanttTreeGrid {
|
|
|
8376
8389
|
this.currentEditRow = {};
|
|
8377
8390
|
}
|
|
8378
8391
|
}
|
|
8379
|
-
if (getValue('requestType', args) === '
|
|
8392
|
+
if (getValue('requestType', args) === 'filterAfterOpen') {
|
|
8380
8393
|
this.parent.notify('actionComplete', args);
|
|
8381
8394
|
}
|
|
8382
8395
|
if (getValue('requestType', args) === 'searching') {
|
|
@@ -11611,7 +11624,7 @@ class Dependency {
|
|
|
11611
11624
|
for (let c = 0; c < predecessorVal.length; c++) {
|
|
11612
11625
|
const predecessorItem = predecessorVal[c];
|
|
11613
11626
|
const preValue = {};
|
|
11614
|
-
preValue.from = getValue('from', predecessorItem);
|
|
11627
|
+
preValue.from = getValue('from', predecessorItem) ? getValue('from', predecessorItem) : predecessorVal[c];
|
|
11615
11628
|
preValue.to = getValue('to', predecessorItem) ? getValue('to', predecessorItem) : ganttProp.rowUniqueID;
|
|
11616
11629
|
preValue.type = getValue('type', predecessorItem) ? getValue('type', predecessorItem) : 'FS';
|
|
11617
11630
|
const offsetUnits = getValue('offset', predecessorItem);
|
|
@@ -11695,6 +11708,9 @@ class Dependency {
|
|
|
11695
11708
|
let predecessorText;
|
|
11696
11709
|
predecessor.split(',').forEach((el) => {
|
|
11697
11710
|
let isGUId = false;
|
|
11711
|
+
let firstPart;
|
|
11712
|
+
let predecessorName;
|
|
11713
|
+
let isAlpha = false;
|
|
11698
11714
|
var regex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
11699
11715
|
let elSplit = el.split('-');
|
|
11700
11716
|
let id;
|
|
@@ -11708,6 +11724,26 @@ class Dependency {
|
|
|
11708
11724
|
isGUId = true;
|
|
11709
11725
|
}
|
|
11710
11726
|
}
|
|
11727
|
+
if (el.includes('-')) {
|
|
11728
|
+
if (el.includes('-') && el.includes('days')) {
|
|
11729
|
+
predecessorName = el.slice(-9).toString();
|
|
11730
|
+
}
|
|
11731
|
+
if (el.includes('-') && el.includes('day')) {
|
|
11732
|
+
predecessorName = el.slice(-8).toString();
|
|
11733
|
+
}
|
|
11734
|
+
else {
|
|
11735
|
+
predecessorName = el.slice(-2).toString();
|
|
11736
|
+
}
|
|
11737
|
+
if (el.includes('-') && /[A-Za-z]/.test(predecessorName)) {
|
|
11738
|
+
const indexFS = el.indexOf(predecessorName);
|
|
11739
|
+
if (indexFS !== -1) {
|
|
11740
|
+
firstPart = el.substring(0, indexFS);
|
|
11741
|
+
if (firstPart.includes('-')) {
|
|
11742
|
+
isAlpha = true;
|
|
11743
|
+
}
|
|
11744
|
+
}
|
|
11745
|
+
}
|
|
11746
|
+
}
|
|
11711
11747
|
if (isGUId) {
|
|
11712
11748
|
let split;
|
|
11713
11749
|
split = elSplit[4].split('+');
|
|
@@ -11736,11 +11772,16 @@ class Dependency {
|
|
|
11736
11772
|
}
|
|
11737
11773
|
}
|
|
11738
11774
|
else {
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11775
|
+
if (isAlpha && firstPart.includes('-')) {
|
|
11776
|
+
values[0] = firstPart;
|
|
11777
|
+
}
|
|
11778
|
+
else {
|
|
11779
|
+
values = el.split('+');
|
|
11780
|
+
offsetValue = '+';
|
|
11781
|
+
if (el.indexOf('-') >= 0) {
|
|
11782
|
+
values = el.split('-');
|
|
11783
|
+
offsetValue = '-';
|
|
11784
|
+
}
|
|
11744
11785
|
}
|
|
11745
11786
|
}
|
|
11746
11787
|
match = [];
|
|
@@ -11778,6 +11819,16 @@ class Dependency {
|
|
|
11778
11819
|
predecessorText = 'FS';
|
|
11779
11820
|
}
|
|
11780
11821
|
}
|
|
11822
|
+
else if (el.includes('-') && /[A-Za-z]/.test(predecessorName) && firstPart.includes('-')) {
|
|
11823
|
+
const type = el.slice(-2).toString();
|
|
11824
|
+
type.toUpperCase();
|
|
11825
|
+
if (type === 'FS' || type === 'FF' || type === 'SF' || type === 'SS') {
|
|
11826
|
+
predecessorText = type;
|
|
11827
|
+
}
|
|
11828
|
+
else {
|
|
11829
|
+
predecessorText = 'FS';
|
|
11830
|
+
}
|
|
11831
|
+
}
|
|
11781
11832
|
else {
|
|
11782
11833
|
predecessorText = 'FS';
|
|
11783
11834
|
}
|
|
@@ -24394,7 +24445,7 @@ class DialogEdit {
|
|
|
24394
24445
|
}
|
|
24395
24446
|
}
|
|
24396
24447
|
else {
|
|
24397
|
-
if (fieldName ===
|
|
24448
|
+
if (fieldName === this.parent.taskFields.duration) {
|
|
24398
24449
|
let numericValue = parseFloat(String(controlObj.value));
|
|
24399
24450
|
|
|
24400
24451
|
tasksData[fieldName] = numericValue;
|
|
@@ -24730,6 +24781,9 @@ class ConnectorLineEdit {
|
|
|
24730
24781
|
let match = [];
|
|
24731
24782
|
for (let j = 0; j < preArray.length; j++) {
|
|
24732
24783
|
const strArray = [];
|
|
24784
|
+
let firstPart;
|
|
24785
|
+
let isAlpha = false;
|
|
24786
|
+
let predecessorName;
|
|
24733
24787
|
let isGUId = false;
|
|
24734
24788
|
var regex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
24735
24789
|
let elSplit = preArray[j].split('-');
|
|
@@ -24744,6 +24798,26 @@ class ConnectorLineEdit {
|
|
|
24744
24798
|
isGUId = true;
|
|
24745
24799
|
}
|
|
24746
24800
|
}
|
|
24801
|
+
if (preArray[j].includes('-')) {
|
|
24802
|
+
if (preArray[j].includes('-') && preArray[j].includes('days')) {
|
|
24803
|
+
predecessorName = preArray[j].slice(-9).toString();
|
|
24804
|
+
}
|
|
24805
|
+
if (preArray[j].includes('-') && preArray[j].includes('day')) {
|
|
24806
|
+
predecessorName = preArray[j].slice(-8).toString();
|
|
24807
|
+
}
|
|
24808
|
+
else {
|
|
24809
|
+
predecessorName = preArray[j].slice(-2).toString();
|
|
24810
|
+
}
|
|
24811
|
+
if (preArray[j].includes('-') && /[A-Za-z]/.test(predecessorName)) {
|
|
24812
|
+
var indexFS = preArray[j].indexOf(predecessorName);
|
|
24813
|
+
if (indexFS !== -1) {
|
|
24814
|
+
firstPart = preArray[j].substring(0, indexFS);
|
|
24815
|
+
if (firstPart.includes('-')) {
|
|
24816
|
+
isAlpha = true;
|
|
24817
|
+
}
|
|
24818
|
+
}
|
|
24819
|
+
}
|
|
24820
|
+
}
|
|
24747
24821
|
if (isGUId) {
|
|
24748
24822
|
let split;
|
|
24749
24823
|
split = elSplit[4].split('+');
|
|
@@ -24770,10 +24844,15 @@ class ConnectorLineEdit {
|
|
|
24770
24844
|
}
|
|
24771
24845
|
}
|
|
24772
24846
|
else {
|
|
24773
|
-
|
|
24774
|
-
|
|
24775
|
-
|
|
24776
|
-
|
|
24847
|
+
if (isAlpha && firstPart.includes('-')) {
|
|
24848
|
+
values[0] = firstPart;
|
|
24849
|
+
}
|
|
24850
|
+
else {
|
|
24851
|
+
values = preArray[j].split('+');
|
|
24852
|
+
if (preArray[j].indexOf('-') >= 0) {
|
|
24853
|
+
values = preArray[j].split('-');
|
|
24854
|
+
|
|
24855
|
+
}
|
|
24777
24856
|
}
|
|
24778
24857
|
}
|
|
24779
24858
|
if (!isNullOrUndefined(values[0])) {
|