@syncfusion/ej2-gantt 24.2.6 → 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 +9 -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
|
@@ -1279,9 +1279,16 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
1279
1279
|
DateProcessor.prototype.convert = function (date, timezone) {
|
|
1280
1280
|
var fromOffset = date.getTimezoneOffset();
|
|
1281
1281
|
var toOffset = this.offset(date, timezone);
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1282
|
+
if (fromOffset < 0) {
|
|
1283
|
+
date = new Date(date.getTime() - (fromOffset - toOffset) / 60000);
|
|
1284
|
+
var toLocalOffset = date.getTimezoneOffset();
|
|
1285
|
+
return new Date(date.getTime() - (toLocalOffset - fromOffset) / 60000);
|
|
1286
|
+
}
|
|
1287
|
+
else {
|
|
1288
|
+
date = new Date(date.getTime() + (fromOffset - toOffset) * 60000);
|
|
1289
|
+
var toLocalOffset = date.getTimezoneOffset();
|
|
1290
|
+
return new Date(date.getTime() + (toLocalOffset - fromOffset) * 60000);
|
|
1291
|
+
}
|
|
1285
1292
|
};
|
|
1286
1293
|
/**
|
|
1287
1294
|
* @param {string | Date} date .
|
|
@@ -2833,7 +2840,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2833
2840
|
return ((this.getTimeDifference(sDate, eDate, true) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
|
|
2834
2841
|
}
|
|
2835
2842
|
else {
|
|
2836
|
-
|
|
2843
|
+
if (ganttData.durationUnit === "day" && ganttData.duration < 1 && isNullOrUndefined(this.parent.taskFields.duration)) {
|
|
2844
|
+
return (ganttData.duration * this.parent.perDayWidth);
|
|
2845
|
+
}
|
|
2846
|
+
else {
|
|
2847
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * hour)) * this.parent.perDayWidth);
|
|
2848
|
+
}
|
|
2837
2849
|
}
|
|
2838
2850
|
}
|
|
2839
2851
|
}
|
|
@@ -2844,6 +2856,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2844
2856
|
}
|
|
2845
2857
|
if (this.getSecondsInDecimal(eDate) === this.parent.defaultEndTime) {
|
|
2846
2858
|
eDate.setHours(24);
|
|
2859
|
+
eDate.setHours(0, 0, 0, 0);
|
|
2847
2860
|
}
|
|
2848
2861
|
if (this.getSecondsInDecimal(eDate) === this.parent.defaultStartTime) {
|
|
2849
2862
|
eDate.setHours(0, 0, 0, 0);
|
|
@@ -8452,7 +8465,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
8452
8465
|
this.currentEditRow = {};
|
|
8453
8466
|
}
|
|
8454
8467
|
}
|
|
8455
|
-
if (getValue('requestType', args) === '
|
|
8468
|
+
if (getValue('requestType', args) === 'filterAfterOpen') {
|
|
8456
8469
|
this.parent.notify('actionComplete', args);
|
|
8457
8470
|
}
|
|
8458
8471
|
if (getValue('requestType', args) === 'searching') {
|
|
@@ -12028,7 +12041,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12028
12041
|
for (var c = 0; c < predecessorVal.length; c++) {
|
|
12029
12042
|
var predecessorItem = predecessorVal[c];
|
|
12030
12043
|
var preValue = {};
|
|
12031
|
-
preValue.from = getValue('from', predecessorItem);
|
|
12044
|
+
preValue.from = getValue('from', predecessorItem) ? getValue('from', predecessorItem) : predecessorVal[c];
|
|
12032
12045
|
preValue.to = getValue('to', predecessorItem) ? getValue('to', predecessorItem) : ganttProp.rowUniqueID;
|
|
12033
12046
|
preValue.type = getValue('type', predecessorItem) ? getValue('type', predecessorItem) : 'FS';
|
|
12034
12047
|
var offsetUnits = getValue('offset', predecessorItem);
|
|
@@ -12113,6 +12126,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12113
12126
|
var predecessorText;
|
|
12114
12127
|
predecessor.split(',').forEach(function (el) {
|
|
12115
12128
|
var isGUId = false;
|
|
12129
|
+
var firstPart;
|
|
12130
|
+
var predecessorName;
|
|
12131
|
+
var isAlpha = false;
|
|
12116
12132
|
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}$/;
|
|
12117
12133
|
var elSplit = el.split('-');
|
|
12118
12134
|
var id;
|
|
@@ -12126,6 +12142,26 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12126
12142
|
isGUId = true;
|
|
12127
12143
|
}
|
|
12128
12144
|
}
|
|
12145
|
+
if (el.includes('-')) {
|
|
12146
|
+
if (el.includes('-') && el.includes('days')) {
|
|
12147
|
+
predecessorName = el.slice(-9).toString();
|
|
12148
|
+
}
|
|
12149
|
+
if (el.includes('-') && el.includes('day')) {
|
|
12150
|
+
predecessorName = el.slice(-8).toString();
|
|
12151
|
+
}
|
|
12152
|
+
else {
|
|
12153
|
+
predecessorName = el.slice(-2).toString();
|
|
12154
|
+
}
|
|
12155
|
+
if (el.includes('-') && /[A-Za-z]/.test(predecessorName)) {
|
|
12156
|
+
var indexFS = el.indexOf(predecessorName);
|
|
12157
|
+
if (indexFS !== -1) {
|
|
12158
|
+
firstPart = el.substring(0, indexFS);
|
|
12159
|
+
if (firstPart.includes('-')) {
|
|
12160
|
+
isAlpha = true;
|
|
12161
|
+
}
|
|
12162
|
+
}
|
|
12163
|
+
}
|
|
12164
|
+
}
|
|
12129
12165
|
if (isGUId) {
|
|
12130
12166
|
var split = void 0;
|
|
12131
12167
|
split = elSplit[4].split('+');
|
|
@@ -12154,11 +12190,16 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12154
12190
|
}
|
|
12155
12191
|
}
|
|
12156
12192
|
else {
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12193
|
+
if (isAlpha && firstPart.includes('-')) {
|
|
12194
|
+
values[0] = firstPart;
|
|
12195
|
+
}
|
|
12196
|
+
else {
|
|
12197
|
+
values = el.split('+');
|
|
12198
|
+
offsetValue = '+';
|
|
12199
|
+
if (el.indexOf('-') >= 0) {
|
|
12200
|
+
values = el.split('-');
|
|
12201
|
+
offsetValue = '-';
|
|
12202
|
+
}
|
|
12162
12203
|
}
|
|
12163
12204
|
}
|
|
12164
12205
|
match = [];
|
|
@@ -12196,6 +12237,16 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12196
12237
|
predecessorText = 'FS';
|
|
12197
12238
|
}
|
|
12198
12239
|
}
|
|
12240
|
+
else if (el.includes('-') && /[A-Za-z]/.test(predecessorName) && firstPart.includes('-')) {
|
|
12241
|
+
var type = el.slice(-2).toString();
|
|
12242
|
+
type.toUpperCase();
|
|
12243
|
+
if (type === 'FS' || type === 'FF' || type === 'SF' || type === 'SS') {
|
|
12244
|
+
predecessorText = type;
|
|
12245
|
+
}
|
|
12246
|
+
else {
|
|
12247
|
+
predecessorText = 'FS';
|
|
12248
|
+
}
|
|
12249
|
+
}
|
|
12199
12250
|
else {
|
|
12200
12251
|
predecessorText = 'FS';
|
|
12201
12252
|
}
|
|
@@ -24902,7 +24953,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
24902
24953
|
}
|
|
24903
24954
|
}
|
|
24904
24955
|
else {
|
|
24905
|
-
if (fieldName ===
|
|
24956
|
+
if (fieldName === this.parent.taskFields.duration) {
|
|
24906
24957
|
var numericValue = parseFloat(String(controlObj.value));
|
|
24907
24958
|
|
|
24908
24959
|
tasksData[fieldName] = numericValue;
|
|
@@ -25238,6 +25289,9 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
25238
25289
|
var match = [];
|
|
25239
25290
|
for (var j = 0; j < preArray.length; j++) {
|
|
25240
25291
|
var strArray = [];
|
|
25292
|
+
var firstPart = void 0;
|
|
25293
|
+
var isAlpha = false;
|
|
25294
|
+
var predecessorName = void 0;
|
|
25241
25295
|
var isGUId = false;
|
|
25242
25296
|
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}$/;
|
|
25243
25297
|
var elSplit = preArray[j].split('-');
|
|
@@ -25252,6 +25306,26 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
25252
25306
|
isGUId = true;
|
|
25253
25307
|
}
|
|
25254
25308
|
}
|
|
25309
|
+
if (preArray[j].includes('-')) {
|
|
25310
|
+
if (preArray[j].includes('-') && preArray[j].includes('days')) {
|
|
25311
|
+
predecessorName = preArray[j].slice(-9).toString();
|
|
25312
|
+
}
|
|
25313
|
+
if (preArray[j].includes('-') && preArray[j].includes('day')) {
|
|
25314
|
+
predecessorName = preArray[j].slice(-8).toString();
|
|
25315
|
+
}
|
|
25316
|
+
else {
|
|
25317
|
+
predecessorName = preArray[j].slice(-2).toString();
|
|
25318
|
+
}
|
|
25319
|
+
if (preArray[j].includes('-') && /[A-Za-z]/.test(predecessorName)) {
|
|
25320
|
+
var indexFS = preArray[j].indexOf(predecessorName);
|
|
25321
|
+
if (indexFS !== -1) {
|
|
25322
|
+
firstPart = preArray[j].substring(0, indexFS);
|
|
25323
|
+
if (firstPart.includes('-')) {
|
|
25324
|
+
isAlpha = true;
|
|
25325
|
+
}
|
|
25326
|
+
}
|
|
25327
|
+
}
|
|
25328
|
+
}
|
|
25255
25329
|
if (isGUId) {
|
|
25256
25330
|
var split = void 0;
|
|
25257
25331
|
split = elSplit[4].split('+');
|
|
@@ -25278,10 +25352,15 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
25278
25352
|
}
|
|
25279
25353
|
}
|
|
25280
25354
|
else {
|
|
25281
|
-
|
|
25282
|
-
|
|
25283
|
-
|
|
25284
|
-
|
|
25355
|
+
if (isAlpha && firstPart.includes('-')) {
|
|
25356
|
+
values[0] = firstPart;
|
|
25357
|
+
}
|
|
25358
|
+
else {
|
|
25359
|
+
values = preArray[j].split('+');
|
|
25360
|
+
if (preArray[j].indexOf('-') >= 0) {
|
|
25361
|
+
values = preArray[j].split('-');
|
|
25362
|
+
|
|
25363
|
+
}
|
|
25285
25364
|
}
|
|
25286
25365
|
}
|
|
25287
25366
|
if (!isNullOrUndefined(values[0])) {
|