@syncfusion/ej2-gantt 20.4.54 → 21.1.37
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 +23 -0
- package/README.md +1 -1
- 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 +1094 -421
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1072 -399
- 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 +20 -20
- package/src/gantt/actions/cell-edit.js +8 -6
- package/src/gantt/actions/chart-scroll.d.ts +1 -0
- package/src/gantt/actions/chart-scroll.js +15 -4
- package/src/gantt/actions/connector-line-edit.js +39 -28
- package/src/gantt/actions/context-menu.js +5 -5
- package/src/gantt/actions/dependency.js +28 -12
- package/src/gantt/actions/dialog-edit.js +41 -21
- package/src/gantt/actions/edit.js +51 -30
- package/src/gantt/actions/filter.d.ts +2 -1
- package/src/gantt/actions/filter.js +88 -2
- package/src/gantt/actions/keyboard.js +0 -1
- package/src/gantt/actions/pdf-export.d.ts +3 -1
- package/src/gantt/actions/pdf-export.js +12 -6
- package/src/gantt/actions/rowdragdrop.js +2 -2
- package/src/gantt/actions/selection.js +5 -2
- package/src/gantt/actions/taskbar-edit.d.ts +5 -0
- package/src/gantt/actions/taskbar-edit.js +114 -10
- package/src/gantt/base/date-processor.js +78 -52
- package/src/gantt/base/gantt-chart.js +20 -4
- package/src/gantt/base/gantt-model.d.ts +43 -0
- package/src/gantt/base/gantt.d.ts +39 -1
- package/src/gantt/base/gantt.js +84 -34
- package/src/gantt/base/interface.d.ts +2 -0
- package/src/gantt/base/task-processor.js +135 -98
- package/src/gantt/base/tree-grid.js +31 -1
- package/src/gantt/base/utils.js +1 -1
- package/src/gantt/export/pdf-gantt.js +1 -1
- package/src/gantt/export/pdf-taskbar.js +1 -0
- package/src/gantt/renderer/chart-rows.d.ts +2 -0
- package/src/gantt/renderer/chart-rows.js +156 -24
- package/src/gantt/renderer/connector-line.js +50 -20
- package/src/gantt/renderer/edit-tooltip.js +0 -3
- package/src/gantt/renderer/event-marker.js +4 -1
- package/src/gantt/renderer/nonworking-day.js +4 -1
- package/src/gantt/renderer/timeline.js +3 -3
- package/src/gantt/renderer/tooltip.js +101 -33
- package/styles/bootstrap-dark.css +33 -10
- package/styles/bootstrap.css +31 -10
- package/styles/bootstrap4.css +28 -7
- package/styles/bootstrap5-dark.css +30 -9
- package/styles/bootstrap5.css +30 -9
- package/styles/fabric-dark.css +28 -7
- package/styles/fabric.css +28 -7
- package/styles/fluent-dark.css +56 -29
- package/styles/fluent.css +56 -29
- package/styles/gantt/_bootstrap-dark-definition.scss +5 -4
- package/styles/gantt/_bootstrap-definition.scss +5 -4
- package/styles/gantt/_bootstrap4-definition.scss +3 -2
- package/styles/gantt/_bootstrap5-definition.scss +15 -14
- package/styles/gantt/_fabric-dark-definition.scss +3 -2
- package/styles/gantt/_fabric-definition.scss +3 -2
- package/styles/gantt/_fluent-definition.scss +18 -17
- package/styles/gantt/_fusionnew-definition.scss +5 -4
- package/styles/gantt/_highcontrast-definition.scss +3 -2
- package/styles/gantt/_highcontrast-light-definition.scss +3 -2
- package/styles/gantt/_layout.scss +45 -13
- package/styles/gantt/_material-dark-definition.scss +3 -2
- package/styles/gantt/_material-definition.scss +3 -2
- package/styles/gantt/_tailwind-definition.scss +9 -8
- package/styles/gantt/_theme.scss +25 -6
- package/styles/gantt/bootstrap-dark.css +33 -10
- package/styles/gantt/bootstrap.css +31 -10
- package/styles/gantt/bootstrap4.css +28 -7
- package/styles/gantt/bootstrap5-dark.css +30 -9
- package/styles/gantt/bootstrap5.css +30 -9
- package/styles/gantt/fabric-dark.css +28 -7
- package/styles/gantt/fabric.css +28 -7
- package/styles/gantt/fluent-dark.css +56 -29
- package/styles/gantt/fluent.css +56 -29
- package/styles/gantt/highcontrast-light.css +28 -9
- package/styles/gantt/highcontrast.css +28 -7
- package/styles/gantt/material-dark.css +31 -14
- package/styles/gantt/material.css +28 -7
- package/styles/gantt/tailwind-dark.css +28 -7
- package/styles/gantt/tailwind.css +28 -7
- package/styles/highcontrast-light.css +28 -9
- package/styles/highcontrast.css +28 -7
- package/styles/material-dark.css +31 -14
- package/styles/material.css +28 -7
- package/styles/tailwind-dark.css +28 -7
- package/styles/tailwind.css +28 -7
- package/styles/gantt/_material3-definition.scss +0 -218
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, addClass, append, classList, closest, compile, createElement, deleteObject, extend, formatUnit, getValue, isNullOrUndefined, isObject, isObjectArray, isUndefined, merge, remove, removeClass, setValue } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, classList, closest, compile, createElement, deleteObject, extend, formatUnit, getValue, isNullOrUndefined, isObject, isObjectArray, isUndefined, merge, remove, removeClass, setValue } from '@syncfusion/ej2-base';
|
|
2
2
|
import { Dialog, Tooltip, createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
|
3
|
-
import { Edit, ForeignKey, Grid, Page, Predicate, Toolbar, ValueFormatter, click, filterAfterOpen, getActualProperties, getCustomDateFormat, getForeignData, getObject, getUid, parentsUntil, setCssInGridPopUp } from '@syncfusion/ej2-grids';
|
|
3
|
+
import { Edit, ForeignKey, Grid, Page, Predicate, Toolbar, ValueFormatter, click, filterAfterOpen, getActualProperties, getCustomDateFormat, getFilterMenuPostion, getForeignData, getObject, getUid, parentsUntil, setCssInGridPopUp } from '@syncfusion/ej2-grids';
|
|
4
4
|
import { CacheAdaptor, DataManager, DataUtil, Deferred, ODataAdaptor, ODataV4Adaptor, Query, RemoteSaveAdaptor, UrlAdaptor, WebApiAdaptor, WebMethodAdaptor } from '@syncfusion/ej2-data';
|
|
5
5
|
import { ColumnMenu, ContextMenu, Edit as Edit$1, ExcelExport, Filter, Reorder, Resize, RowDD, Selection, Sort, TreeGrid, VirtualScroll } from '@syncfusion/ej2-treegrid';
|
|
6
6
|
import { Splitter } from '@syncfusion/ej2-layouts';
|
|
@@ -150,7 +150,7 @@ function updateDates(record, parent) {
|
|
|
150
150
|
function formatString(str, args) {
|
|
151
151
|
var regx;
|
|
152
152
|
for (var i = 0; i < args.length; i++) {
|
|
153
|
-
// eslint-disable-next-line detect-non-literal-regexp
|
|
153
|
+
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
154
154
|
regx = new RegExp('\\{' + (i) + '\\}', 'gm');
|
|
155
155
|
str = str.replace(regx, args[i].toString());
|
|
156
156
|
}
|
|
@@ -260,32 +260,37 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
var tStartDate;
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
263
|
+
if (this.parent.autoCalculateDateScheduling) {
|
|
264
|
+
do {
|
|
265
|
+
tStartDate = new Date(cloneStartDate.getTime());
|
|
266
|
+
var holidayLength = this.parent.totalHolidayDates.length;
|
|
267
|
+
// check holidays and weekends
|
|
268
|
+
if (this.isValidateNonWorkDays(ganttProp)) {
|
|
269
|
+
var startTime = (!validateAsMilestone || isLoad) ? this.parent.defaultStartTime : this.parent.defaultEndTime;
|
|
270
|
+
if (!this.parent.includeWeekend) {
|
|
271
|
+
var tempDate = new Date(cloneStartDate.getTime());
|
|
272
|
+
cloneStartDate = this.getNextWorkingDay(cloneStartDate);
|
|
273
|
+
if (tempDate.getTime() !== cloneStartDate.getTime()) {
|
|
274
|
+
this.setTime(startTime, cloneStartDate);
|
|
275
|
+
}
|
|
274
276
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
277
|
+
for (var count = 0; count < holidayLength; count++) {
|
|
278
|
+
var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
|
|
279
|
+
var holidayTo = new Date(holidayFrom.getTime());
|
|
280
|
+
holidayFrom.setHours(0, 0, 0, 0);
|
|
281
|
+
holidayTo.setHours(23, 59, 59, 59);
|
|
282
|
+
if (cloneStartDate.getTime() >= holidayFrom.getTime() && cloneStartDate.getTime() < holidayTo.getTime()) {
|
|
283
|
+
cloneStartDate.setDate(cloneStartDate.getDate() + 1);
|
|
284
|
+
this.setTime(startTime, cloneStartDate);
|
|
285
|
+
}
|
|
284
286
|
}
|
|
285
287
|
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
|
|
288
|
+
} while (tStartDate.getTime() !== cloneStartDate.getTime());
|
|
289
|
+
return new Date(cloneStartDate.getTime());
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
return new Date(cloneStartDate.getTime());
|
|
293
|
+
}
|
|
289
294
|
};
|
|
290
295
|
/**
|
|
291
296
|
* To update given date value to valid end date
|
|
@@ -320,36 +325,44 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
320
325
|
}
|
|
321
326
|
}
|
|
322
327
|
var tempCheckDate;
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
if (
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
for (var count = 0; count < holidayLength; count++) {
|
|
335
|
-
var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
|
|
336
|
-
var holidayTo = new Date(holidayFrom.getTime());
|
|
337
|
-
var tempHoliday = new Date(cloneEndDate.getTime());
|
|
338
|
-
tempHoliday.setMinutes(cloneEndDate.getMilliseconds() - 2);
|
|
339
|
-
holidayFrom.setHours(0, 0, 0, 0);
|
|
340
|
-
holidayTo.setHours(23, 59, 59, 59);
|
|
341
|
-
if (cloneEndDate.getTime() >= holidayFrom.getTime() && cloneEndDate.getTime() < holidayTo.getTime() ||
|
|
342
|
-
tempHoliday.getTime() >= holidayFrom.getTime() && tempHoliday.getTime() < holidayTo.getTime()) {
|
|
343
|
-
cloneEndDate.setDate(cloneEndDate.getDate() - 1);
|
|
344
|
-
if (!(cloneEndDate.getTime() === holidayFrom.getTime() && this.parent.defaultEndTime === 86400 &&
|
|
345
|
-
this.getSecondsInDecimal(cloneEndDate) === 0)) {
|
|
328
|
+
if (this.parent.autoCalculateDateScheduling) {
|
|
329
|
+
do {
|
|
330
|
+
tempCheckDate = new Date(cloneEndDate.getTime());
|
|
331
|
+
var holidayLength = this.parent.totalHolidayDates.length;
|
|
332
|
+
if (this.isValidateNonWorkDays(ganttProp)) {
|
|
333
|
+
if (!this.parent.includeWeekend) {
|
|
334
|
+
var tempDate = new Date(cloneEndDate.getTime());
|
|
335
|
+
cloneEndDate = this.getPreviousWorkingDay(cloneEndDate);
|
|
336
|
+
if (tempDate.getTime() !== cloneEndDate.getTime()) {
|
|
346
337
|
this.setTime(this.parent.defaultEndTime, cloneEndDate);
|
|
347
338
|
}
|
|
348
339
|
}
|
|
340
|
+
for (var count = 0; count < holidayLength; count++) {
|
|
341
|
+
var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
|
|
342
|
+
var holidayTo = new Date(holidayFrom.getTime());
|
|
343
|
+
var tempHoliday = new Date(cloneEndDate.getTime());
|
|
344
|
+
tempHoliday.setMinutes(cloneEndDate.getMilliseconds() - 2);
|
|
345
|
+
holidayFrom.setHours(0, 0, 0, 0);
|
|
346
|
+
holidayTo.setHours(23, 59, 59, 59);
|
|
347
|
+
if (cloneEndDate.getTime() >= holidayFrom.getTime() && cloneEndDate.getTime() < holidayTo.getTime() ||
|
|
348
|
+
tempHoliday.getTime() >= holidayFrom.getTime() && tempHoliday.getTime() < holidayTo.getTime()) {
|
|
349
|
+
cloneEndDate.setDate(cloneEndDate.getDate() - 1);
|
|
350
|
+
if (!(cloneEndDate.getTime() === holidayFrom.getTime() && this.parent.defaultEndTime === 86400 &&
|
|
351
|
+
this.getSecondsInDecimal(cloneEndDate) === 0)) {
|
|
352
|
+
this.setTime(this.parent.defaultEndTime, cloneEndDate);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
349
356
|
}
|
|
357
|
+
} while (tempCheckDate.getTime() !== cloneEndDate.getTime());
|
|
358
|
+
return new Date(cloneEndDate.getTime());
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
if (!isNullOrUndefined(cloneEndDate)) {
|
|
362
|
+
this.setTime(this.parent.defaultEndTime, cloneEndDate);
|
|
350
363
|
}
|
|
351
|
-
|
|
352
|
-
|
|
364
|
+
return new Date(cloneEndDate.getTime());
|
|
365
|
+
}
|
|
353
366
|
};
|
|
354
367
|
/**
|
|
355
368
|
* To validate the baseline start date
|
|
@@ -464,6 +477,13 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
464
477
|
}
|
|
465
478
|
this.parent.setRecordValue('endDate', tempEndDate, ganttProp, true);
|
|
466
479
|
}
|
|
480
|
+
else {
|
|
481
|
+
tempEndDate = ganttData[this.parent.taskFields.endDate];
|
|
482
|
+
if (!isNullOrUndefined(tempEndDate)) {
|
|
483
|
+
this.setTime(this.parent.defaultEndTime, tempEndDate);
|
|
484
|
+
}
|
|
485
|
+
this.parent.setRecordValue('endDate', tempEndDate, ganttProp, true);
|
|
486
|
+
}
|
|
467
487
|
if (this.parent.taskFields.endDate) {
|
|
468
488
|
this.parent.dataOperation.updateMappingData(ganttData, 'endDate');
|
|
469
489
|
}
|
|
@@ -530,9 +550,9 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
530
550
|
*/
|
|
531
551
|
DateProcessor.prototype.getNonworkingTime = function (sDate, eDate, isAutoSchedule, isCheckTimeZone) {
|
|
532
552
|
isCheckTimeZone = isNullOrUndefined(isCheckTimeZone) ? true : isCheckTimeZone;
|
|
533
|
-
var weekendCount = !this.parent.includeWeekend && isAutoSchedule ? this.getWeekendCount(sDate, eDate) : 0;
|
|
553
|
+
var weekendCount = (!this.parent.includeWeekend && this.parent.autoCalculateDateScheduling) && isAutoSchedule ? this.getWeekendCount(sDate, eDate) : 0;
|
|
534
554
|
var totalHours = this.getNumberOfSeconds(sDate, eDate, isCheckTimeZone);
|
|
535
|
-
var holidaysCount = isAutoSchedule ? this.getHolidaysCount(sDate, eDate) : 0;
|
|
555
|
+
var holidaysCount = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.getHolidaysCount(sDate, eDate) : 0;
|
|
536
556
|
var totWorkDays = (totalHours - (weekendCount * 86400) - (holidaysCount * 86400)) / 86400; // working days between two dates
|
|
537
557
|
var nonWorkHours = this.getNonWorkingSecondsOnDate(sDate, eDate, isAutoSchedule);
|
|
538
558
|
var totalNonWorkTime = (totWorkDays * (86400 - this.parent.secondsPerDay)) +
|
|
@@ -724,6 +744,9 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
724
744
|
if (!isNullOrUndefined(data.ganttProperties.startDate))
|
|
725
745
|
sDate = data.ganttProperties.startDate;
|
|
726
746
|
}
|
|
747
|
+
else {
|
|
748
|
+
sDate = _this.getProjectStartDate(ganttProp);
|
|
749
|
+
}
|
|
727
750
|
});
|
|
728
751
|
}
|
|
729
752
|
else {
|
|
@@ -1002,6 +1025,9 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
1002
1025
|
/*Check given date is on holidays*/
|
|
1003
1026
|
DateProcessor.prototype.isOnHolidayOrWeekEnd = function (date, checkWeekEnd) {
|
|
1004
1027
|
checkWeekEnd = !isNullOrUndefined(checkWeekEnd) ? checkWeekEnd : this.parent.includeWeekend;
|
|
1028
|
+
if (!this.parent.autoCalculateDateScheduling) {
|
|
1029
|
+
checkWeekEnd = true;
|
|
1030
|
+
}
|
|
1005
1031
|
if (!checkWeekEnd && this.parent.nonWorkingDayIndex.indexOf(date.getDay()) !== -1) {
|
|
1006
1032
|
return true;
|
|
1007
1033
|
}
|
|
@@ -1031,8 +1057,8 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
1031
1057
|
var startRangeIndex = -1;
|
|
1032
1058
|
var endRangeIndex = -1;
|
|
1033
1059
|
var totNonWrkSecs = 0;
|
|
1034
|
-
var startOnHoliday = isAutoSchedule ? this.isOnHolidayOrWeekEnd(startDate, null) : false;
|
|
1035
|
-
var endOnHoliday = isAutoSchedule ? this.isOnHolidayOrWeekEnd(endDate, null) : false;
|
|
1060
|
+
var startOnHoliday = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.isOnHolidayOrWeekEnd(startDate, null) : false;
|
|
1061
|
+
var endOnHoliday = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.isOnHolidayOrWeekEnd(endDate, null) : false;
|
|
1036
1062
|
for (var i = 0; i < this.parent.nonWorkingTimeRanges.length; i++) {
|
|
1037
1063
|
var val = this.parent.nonWorkingTimeRanges[i];
|
|
1038
1064
|
if (sHour >= val.from && sHour <= val.to) {
|
|
@@ -1715,7 +1741,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1715
1741
|
TaskProcessor.prototype.constructResourceViewDataSource = function (resources, data, unassignedTasks) {
|
|
1716
1742
|
var _loop_1 = function (i) {
|
|
1717
1743
|
var tempData = data[i];
|
|
1718
|
-
child = this_1.parent.taskFields.child != null ? this_1.parent.taskFields.child : 'Children';
|
|
1744
|
+
var child = this_1.parent.taskFields.child != null ? this_1.parent.taskFields.child : 'Children';
|
|
1719
1745
|
var resourceData = tempData && tempData[this_1.parent.taskFields.resourceInfo];
|
|
1720
1746
|
var resourceIdMapping = this_1.parent.resourceFields.id;
|
|
1721
1747
|
if ((!tempData[child] || tempData[child].length === 0) && resourceData && resourceData.length) {
|
|
@@ -1742,7 +1768,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1742
1768
|
this_1.constructResourceViewDataSource(resources, tempData[this_1.parent.taskFields.child], unassignedTasks);
|
|
1743
1769
|
}
|
|
1744
1770
|
};
|
|
1745
|
-
var this_1 = this
|
|
1771
|
+
var this_1 = this;
|
|
1746
1772
|
for (var i = 0; i < data.length; i++) {
|
|
1747
1773
|
_loop_1(i);
|
|
1748
1774
|
}
|
|
@@ -1801,7 +1827,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1801
1827
|
}
|
|
1802
1828
|
}
|
|
1803
1829
|
var ganttData = this_3.createRecord(tempData, level, parentItem, true);
|
|
1804
|
-
if (!this_3.parent.enableValidation) {
|
|
1830
|
+
if (!this_3.parent.enableValidation || !this_3.parent.autoCalculateDateScheduling) {
|
|
1805
1831
|
this_3.updateTaskLeftWidth(ganttData);
|
|
1806
1832
|
}
|
|
1807
1833
|
ganttData.index = this_3.recordIndex++;
|
|
@@ -1835,6 +1861,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1835
1861
|
this_3.parent.setRecordValue('autoDuration', this_3.calculateAutoDuration(parentProp), parentProp, true);
|
|
1836
1862
|
this_3.updateAutoWidthLeft(parentData);
|
|
1837
1863
|
}
|
|
1864
|
+
if (!this_3.parent.allowParentDependency) {
|
|
1865
|
+
this_3.resetDependency(parentData);
|
|
1866
|
+
}
|
|
1838
1867
|
this_3.updateWidthLeft(parentData);
|
|
1839
1868
|
this_3.updateTaskData(parentData);
|
|
1840
1869
|
}
|
|
@@ -1951,6 +1980,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1951
1980
|
if (!isNullOrUndefined(data[taskSettings.child]) && data[taskSettings.child].length > 0) {
|
|
1952
1981
|
this.parent.setRecordValue('hasChildRecords', true, ganttData);
|
|
1953
1982
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
1983
|
+
if (!this.parent.allowParentDependency) {
|
|
1984
|
+
this.resetDependency(ganttData);
|
|
1985
|
+
}
|
|
1954
1986
|
}
|
|
1955
1987
|
else {
|
|
1956
1988
|
this.parent.setRecordValue('hasChildRecords', false, ganttData);
|
|
@@ -2351,6 +2383,16 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2351
2383
|
}
|
|
2352
2384
|
}
|
|
2353
2385
|
}
|
|
2386
|
+
if (!this.parent.autoCalculateDateScheduling) {
|
|
2387
|
+
if (!isNullOrUndefined(ganttData.ganttProperties.startDate)) {
|
|
2388
|
+
ganttData[this.parent.taskFields.startDate] = ganttData.ganttProperties.startDate;
|
|
2389
|
+
ganttData.taskData[this.parent.taskFields.startDate] = ganttData.ganttProperties.startDate;
|
|
2390
|
+
}
|
|
2391
|
+
if (!isNullOrUndefined(ganttData.ganttProperties.endDate)) {
|
|
2392
|
+
ganttData[this.parent.taskFields.endDate] = ganttData.ganttProperties.endDate;
|
|
2393
|
+
ganttData.taskData[this.parent.taskFields.endDate] = ganttData.ganttProperties.endDate;
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2354
2396
|
if (!isNullOrUndefined(segments)) {
|
|
2355
2397
|
this.parent.setRecordValue('segments', this.setSegmentsInfo(ganttData, true), ganttProperties, true);
|
|
2356
2398
|
}
|
|
@@ -3344,7 +3386,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3344
3386
|
var rangeObj_1 = {};
|
|
3345
3387
|
if (this._isInStartDateRange(cStartDate, tStartDate, tEndDate) || this._isInEndDateRange(cEndDate, tStartDate, tEndDate)) {
|
|
3346
3388
|
if ((tStartDate.getTime() > cStartDate.getTime() && tStartDate.getTime() < cEndDate.getTime()
|
|
3347
|
-
&& tEndDate.getTime() > cStartDate.getTime() && tEndDate.getTime()
|
|
3389
|
+
&& tEndDate.getTime() > cStartDate.getTime() && tEndDate.getTime() >= cEndDate.getTime())
|
|
3348
3390
|
|| (cStartDate.getTime() === tStartDate.getTime() && cEndDate.getTime() <= tEndDate.getTime())) {
|
|
3349
3391
|
rangeObj_1.from = tStartDate;
|
|
3350
3392
|
rangeObj_1.to = cEndDate;
|
|
@@ -3625,7 +3667,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3625
3667
|
*/
|
|
3626
3668
|
TaskProcessor.prototype.updateTaskLeftWidth = function (data) {
|
|
3627
3669
|
var task = data.ganttProperties;
|
|
3628
|
-
if (!data.hasChildRecords) {
|
|
3670
|
+
if (!data.hasChildRecords || !this.parent.autoCalculateDateScheduling) {
|
|
3629
3671
|
this.updateWidthLeft(data);
|
|
3630
3672
|
}
|
|
3631
3673
|
this.parent.setRecordValue('baselineLeft', this.calculateBaselineLeft(task), task, true);
|
|
@@ -3637,7 +3679,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3637
3679
|
childData = parentItem.childRecords;
|
|
3638
3680
|
}
|
|
3639
3681
|
if (parentItem && childData.indexOf(data) === childData.length - 1 && !data.hasChildRecords && this.parent.enableValidation) {
|
|
3640
|
-
this.
|
|
3682
|
+
if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
|
|
3683
|
+
this.updateParentItems(parentItem);
|
|
3684
|
+
}
|
|
3685
|
+
if (!this.parent.autoCalculateDateScheduling) {
|
|
3686
|
+
this.updateWidthLeft(parentItem);
|
|
3687
|
+
}
|
|
3641
3688
|
}
|
|
3642
3689
|
else if (parentItem && !this.parent.enableValidation) {
|
|
3643
3690
|
this.updateWidthLeft(parentItem);
|
|
@@ -3780,105 +3827,119 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3780
3827
|
var parentData = isParent ? cloneParent : this.parent.getParentTask(cloneParent);
|
|
3781
3828
|
var deleteUpdate = false;
|
|
3782
3829
|
var ganttProp = parentData.ganttProperties;
|
|
3783
|
-
if (
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
ganttProp.
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
if (
|
|
3801
|
-
|
|
3830
|
+
if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
|
|
3831
|
+
if (parentData.childRecords.length > 0) {
|
|
3832
|
+
var previousStartDate = ganttProp.isAutoSchedule ? ganttProp.startDate : ganttProp.autoStartDate;
|
|
3833
|
+
var previousEndDate = ganttProp.isAutoSchedule ? ganttProp.endDate :
|
|
3834
|
+
ganttProp.autoEndDate;
|
|
3835
|
+
var childRecords = parentData.childRecords;
|
|
3836
|
+
var childLength = childRecords.length;
|
|
3837
|
+
var totalDuration = 0;
|
|
3838
|
+
var progressValues = {};
|
|
3839
|
+
var minStartDate = null;
|
|
3840
|
+
var maxEndDate = null;
|
|
3841
|
+
var milestoneCount = 0;
|
|
3842
|
+
var totalProgress = 0;
|
|
3843
|
+
var childCompletedWorks = 0;
|
|
3844
|
+
var childData = void 0;
|
|
3845
|
+
for (var count = 0; count < childLength; count++) {
|
|
3846
|
+
childData = childRecords[count];
|
|
3847
|
+
if (this.parent.isOnDelete && childData.isDelete) {
|
|
3848
|
+
if (childLength === 1 && this.parent.viewType === 'ProjectView') {
|
|
3849
|
+
deleteUpdate = true;
|
|
3850
|
+
}
|
|
3851
|
+
continue;
|
|
3802
3852
|
}
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3853
|
+
var startDate = this.getValidStartDate(childData.ganttProperties);
|
|
3854
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
|
|
3855
|
+
startDate = childData.ganttProperties.autoStartDate;
|
|
3856
|
+
}
|
|
3857
|
+
var endDate = this.getValidEndDate(childData.ganttProperties);
|
|
3858
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
|
|
3859
|
+
endDate = childData.ganttProperties.autoEndDate;
|
|
3860
|
+
}
|
|
3861
|
+
if (isNullOrUndefined(minStartDate)) {
|
|
3862
|
+
minStartDate = this.getDateFromFormat(startDate);
|
|
3863
|
+
}
|
|
3864
|
+
if (isNullOrUndefined(maxEndDate)) {
|
|
3865
|
+
maxEndDate = this.getDateFromFormat(endDate);
|
|
3866
|
+
}
|
|
3867
|
+
if (!isNullOrUndefined(endDate) && this.compareDates(endDate, maxEndDate) === 1) {
|
|
3868
|
+
maxEndDate = this.getDateFromFormat(endDate);
|
|
3869
|
+
}
|
|
3870
|
+
if (!isNullOrUndefined(startDate) && this.compareDates(startDate, minStartDate) === -1) {
|
|
3871
|
+
minStartDate = this.getDateFromFormat(startDate);
|
|
3872
|
+
}
|
|
3873
|
+
if (!childData.ganttProperties.isMilestone && isScheduledTask(childData.ganttProperties)) {
|
|
3874
|
+
progressValues = this.getParentProgress(childData);
|
|
3875
|
+
totalProgress += getValue('totalProgress', progressValues);
|
|
3876
|
+
if (childData[this.parent.taskFields.duration] < 1) {
|
|
3877
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
3878
|
+
totalDuration = Number(totalDuration.toFixed(4));
|
|
3879
|
+
}
|
|
3880
|
+
else {
|
|
3881
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
3882
|
+
}
|
|
3831
3883
|
}
|
|
3832
3884
|
else {
|
|
3833
|
-
|
|
3885
|
+
milestoneCount++;
|
|
3834
3886
|
}
|
|
3887
|
+
childCompletedWorks += childData.ganttProperties.work;
|
|
3835
3888
|
}
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
this.
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3889
|
+
if (!deleteUpdate) {
|
|
3890
|
+
var taskCount = void 0;
|
|
3891
|
+
if (this.parent.isOnDelete && childData.isDelete) {
|
|
3892
|
+
taskCount = childLength - milestoneCount - 1;
|
|
3893
|
+
}
|
|
3894
|
+
else {
|
|
3895
|
+
taskCount = childLength - milestoneCount;
|
|
3896
|
+
}
|
|
3897
|
+
var parentProgress = (taskCount > 0 && totalDuration > 0) ? (totalProgress / totalDuration) : 0;
|
|
3898
|
+
var parentProp = parentData.ganttProperties;
|
|
3899
|
+
var milestone = (taskCount === 0) && minStartDate && maxEndDate &&
|
|
3900
|
+
minStartDate.getTime() === maxEndDate.getTime() ? true : false;
|
|
3901
|
+
if (this.compareDates(previousStartDate, minStartDate) !== 0) {
|
|
3902
|
+
this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'startDate' : 'autoStartDate', minStartDate, parentData.ganttProperties, true);
|
|
3903
|
+
if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone) {
|
|
3904
|
+
this.parent.setRecordValue('startDate', minStartDate, parentData.ganttProperties, true);
|
|
3905
|
+
}
|
|
3906
|
+
}
|
|
3907
|
+
if (this.compareDates(previousEndDate, maxEndDate) !== 0) {
|
|
3908
|
+
this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'endDate' : 'autoEndDate', maxEndDate, parentData.ganttProperties, true);
|
|
3909
|
+
if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone) {
|
|
3910
|
+
this.parent.setRecordValue('endDate', maxEndDate, parentData.ganttProperties, true);
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
this.parent.setRecordValue('isMilestone', milestone, parentProp, true);
|
|
3914
|
+
if (parentProp.isAutoSchedule) {
|
|
3915
|
+
this.calculateDuration(parentData);
|
|
3916
|
+
}
|
|
3917
|
+
this.updateWorkWithDuration(parentData);
|
|
3918
|
+
var parentWork = parentProp.work;
|
|
3919
|
+
parentWork = this.parent.isOnEdit ? parentWork : (parentWork + childCompletedWorks);
|
|
3920
|
+
this.parent.setRecordValue('work', parentWork, parentProp, true);
|
|
3921
|
+
this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
|
|
3922
|
+
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
3923
|
+
this.updateMappingData(parentData, 'type');
|
|
3924
|
+
}
|
|
3925
|
+
this.parent.setRecordValue('progress', Math.floor(parentProgress), parentProp, true);
|
|
3926
|
+
this.parent.setRecordValue('totalProgress', totalProgress, parentProp, true);
|
|
3927
|
+
this.parent.setRecordValue('totalDuration', totalDuration, parentProp, true);
|
|
3928
|
+
if (!parentProp.isAutoSchedule) {
|
|
3929
|
+
this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
|
|
3930
|
+
this.updateAutoWidthLeft(parentData);
|
|
3931
|
+
}
|
|
3932
|
+
if (!this.parent.allowParentDependency) {
|
|
3933
|
+
this.resetDependency(parentData);
|
|
3934
|
+
}
|
|
3935
|
+
this.updateWidthLeft(parentData);
|
|
3936
|
+
this.updateTaskData(parentData);
|
|
3877
3937
|
}
|
|
3878
|
-
this.updateWidthLeft(parentData);
|
|
3879
|
-
this.updateTaskData(parentData);
|
|
3880
3938
|
}
|
|
3881
3939
|
}
|
|
3940
|
+
else {
|
|
3941
|
+
parentData.ganttProperties.endDate = parentData.taskData[this.parent.taskFields.endDate];
|
|
3942
|
+
}
|
|
3882
3943
|
if (deleteUpdate && parentData.childRecords.length === 1 && parentData.ganttProperties.duration === 0) {
|
|
3883
3944
|
this.parent.setRecordValue('isMilestone', true, parentData.ganttProperties, true);
|
|
3884
3945
|
this.updateWidthLeft(parentData);
|
|
@@ -3886,7 +3947,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3886
3947
|
}
|
|
3887
3948
|
var parentItem = this.parent.getParentTask(parentData.parentItem);
|
|
3888
3949
|
if (parentItem) {
|
|
3889
|
-
this.
|
|
3950
|
+
if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
|
|
3951
|
+
this.updateParentItems(parentItem);
|
|
3952
|
+
}
|
|
3890
3953
|
}
|
|
3891
3954
|
deleteUpdate = false;
|
|
3892
3955
|
};
|
|
@@ -4141,9 +4204,19 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
|
|
|
4141
4204
|
var parent = this.parent;
|
|
4142
4205
|
setTimeout(function () {
|
|
4143
4206
|
parent.hideMaskRow();
|
|
4207
|
+
if (parent.viewType === 'ResourceView' && !parent.allowTaskbarOverlap && parent.showOverAllocation) {
|
|
4208
|
+
for (var i = 0; i < parent.currentViewData.length; i++) {
|
|
4209
|
+
var tr = parent.chartRowsModule.ganttChartTableBody.childNodes[i];
|
|
4210
|
+
if (tr['style'].display !== 'none' && parent.currentViewData[i].hasChildRecords && !parent.currentViewData[i].expanded) {
|
|
4211
|
+
parent.treeGrid.getRowByIndex(i)['style'].height = tr['style'].height;
|
|
4212
|
+
}
|
|
4213
|
+
}
|
|
4214
|
+
parent.contentHeight = parent.enableRtl ? parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
4215
|
+
parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
4216
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = parent.contentHeight + 'px';
|
|
4217
|
+
}
|
|
4144
4218
|
}, 0);
|
|
4145
4219
|
};
|
|
4146
|
-
|
|
4147
4220
|
ChartScroll.prototype.updateShimmer = function () {
|
|
4148
4221
|
var parent = this.parent;
|
|
4149
4222
|
setTimeout(function () {
|
|
@@ -4183,11 +4256,11 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
|
|
|
4183
4256
|
scrollArgs.scrollDirection = 'Horizontal';
|
|
4184
4257
|
scrollArgs.action = 'HorizontalScroll';
|
|
4185
4258
|
}
|
|
4186
|
-
if ((scrollArgs.scrollDirection
|
|
4259
|
+
if ((scrollArgs.scrollDirection !== 'Horizontal' && !isNullOrUndefined(scrollArgs.scrollDirection)) && this.parent.enableVirtualization === true && (this.parent.isToolBarClick
|
|
4187
4260
|
|| isNullOrUndefined(this.parent.isToolBarClick))) {
|
|
4188
4261
|
this.parent.isVirtualScroll = true;
|
|
4189
4262
|
if (this.parent.showIndicator || isNullOrUndefined(this.parent.showIndicator)) {
|
|
4190
|
-
if (!this.parent.enableVirtualMaskRow && this.parent.enableVirtualization && this.parent.loadingIndicator.indicatorType ===
|
|
4263
|
+
if (!this.parent.enableVirtualMaskRow && this.parent.enableVirtualization && this.parent.loadingIndicator.indicatorType === 'Spinner') {
|
|
4191
4264
|
this.updateSpinner();
|
|
4192
4265
|
}
|
|
4193
4266
|
}
|
|
@@ -4231,11 +4304,12 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
|
|
|
4231
4304
|
* To set scroll left for chart scroll container
|
|
4232
4305
|
*
|
|
4233
4306
|
* @param {number} scrollLeft - To set scroll left for scroll container
|
|
4307
|
+
* @param {number} leftSign - specifies left sign
|
|
4234
4308
|
* @returns {void} .
|
|
4235
4309
|
*/
|
|
4236
4310
|
ChartScroll.prototype.setScrollLeft = function (scrollLeft, leftSign) {
|
|
4237
4311
|
if (leftSign) {
|
|
4238
|
-
scrollLeft = leftSign
|
|
4312
|
+
scrollLeft = leftSign === -1 && this.parent.enableRtl ? -scrollLeft : scrollLeft;
|
|
4239
4313
|
}
|
|
4240
4314
|
this.element.scrollLeft = scrollLeft;
|
|
4241
4315
|
this.parent.ganttChartModule.chartTimelineContainer.scrollLeft = this.element.scrollLeft;
|
|
@@ -4393,9 +4467,11 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4393
4467
|
}
|
|
4394
4468
|
else {
|
|
4395
4469
|
if (this.parent.viewType === 'ProjectView') {
|
|
4396
|
-
this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[1]
|
|
4470
|
+
if (!isNullOrUndefined(this.parent.chartRowsModule.ganttChartTableBody.children[parseInt(i.toString(), 10)].children[0].children[1].children[1])) {
|
|
4471
|
+
this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[1].setAttribute('tabindex', '-1');
|
|
4472
|
+
}
|
|
4397
4473
|
}
|
|
4398
|
-
else if (this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[0]) {
|
|
4474
|
+
else if (this.parent.chartRowsModule.ganttChartTableBody.children[parseInt(i.toString(), 10)].children[0].children[1].children[0]) {
|
|
4399
4475
|
this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[0].setAttribute('tabindex', '-1');
|
|
4400
4476
|
}
|
|
4401
4477
|
}
|
|
@@ -4448,7 +4524,14 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4448
4524
|
Math.floor((this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight));
|
|
4449
4525
|
};
|
|
4450
4526
|
GanttChart.prototype.renderRange = function (rangeCollection, currentRecord) {
|
|
4451
|
-
var topValue =
|
|
4527
|
+
var topValue = 0;
|
|
4528
|
+
var rowIndex = this.parent.currentViewData.indexOf(currentRecord);
|
|
4529
|
+
if (!this.parent.allowTaskbarOverlap && this.parent.enableMultiTaskbar) {
|
|
4530
|
+
topValue = !currentRecord.expanded ? this.parent.getRowByIndex(rowIndex).offsetTop : this.parent.getRowByIndex(rowIndex).offsetTop + this.parent.rowHeight;
|
|
4531
|
+
}
|
|
4532
|
+
else {
|
|
4533
|
+
topValue = this.getTopValue(currentRecord);
|
|
4534
|
+
}
|
|
4452
4535
|
var sameIDElement = this.rangeViewContainer.querySelector('.' + 'rangeContainer' + currentRecord.ganttProperties.rowUniqueID);
|
|
4453
4536
|
if (sameIDElement) {
|
|
4454
4537
|
sameIDElement.remove();
|
|
@@ -4461,7 +4544,14 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4461
4544
|
return;
|
|
4462
4545
|
}
|
|
4463
4546
|
for (var i = 0; i < rangeCollection.length; i++) {
|
|
4464
|
-
var height =
|
|
4547
|
+
var height = void 0;
|
|
4548
|
+
if (!this.parent.allowTaskbarOverlap && !currentRecord.expanded && this.parent.enableMultiTaskbar) {
|
|
4549
|
+
height = parseInt(this.parent.chartRowsModule.ganttChartTableBody.childNodes[rowIndex].style.height) -
|
|
4550
|
+
(this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight);
|
|
4551
|
+
}
|
|
4552
|
+
else {
|
|
4553
|
+
height = this.getRangeHeight(currentRecord);
|
|
4554
|
+
}
|
|
4465
4555
|
var leftDiv = createElement('div', {
|
|
4466
4556
|
className: rangeChildContainer + ' ' + 'e-leftarc', styles: (this.parent.enableRtl ? 'right:' : 'left:') +
|
|
4467
4557
|
((this.parent.enableRtl ? rangeCollection[i].left + rangeCollection[i].width - 5 : rangeCollection[i].left) + "px;\n top: " + Math.floor((this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight) / 2) + "px;\n height: " + (height + 1) + "px; border-right: 0px")
|
|
@@ -5778,7 +5868,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5778
5868
|
else {
|
|
5779
5869
|
var value = property === 'topTier' ? 'bottomTier' : 'topTier';
|
|
5780
5870
|
var assignValue = 'bottomTier';
|
|
5781
|
-
if (newTimeline[assignValue].unit != "None") {
|
|
5871
|
+
if (newTimeline["" + assignValue].unit != "None") {
|
|
5782
5872
|
_this.customTimelineSettings[value] = __assign({}, newTimeline[assignValue]);
|
|
5783
5873
|
}
|
|
5784
5874
|
}
|
|
@@ -6081,7 +6171,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6081
6171
|
else {
|
|
6082
6172
|
secondValue = sortedUnitLevels[i + 1];
|
|
6083
6173
|
}
|
|
6084
|
-
if (count >= firstValue[tier].count) {
|
|
6174
|
+
if (count >= firstValue["" + tier].count) {
|
|
6085
6175
|
currentZoomCollection = sortedUnitLevels[i];
|
|
6086
6176
|
checkSameCountLevels = sortedUnitLevels.filter(function (tempLevel) {
|
|
6087
6177
|
if (tier === "bottomTier") {
|
|
@@ -6099,7 +6189,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6099
6189
|
}
|
|
6100
6190
|
break;
|
|
6101
6191
|
}
|
|
6102
|
-
else if (count < firstValue[tier].count && count > secondValue[tier].count) {
|
|
6192
|
+
else if (count < firstValue["" + tier].count && count > secondValue["" + tier].count) {
|
|
6103
6193
|
currentZoomCollection = sortedUnitLevels[i + 1];
|
|
6104
6194
|
checkSameCountLevels = sortedUnitLevels.filter(function (tempLevel) {
|
|
6105
6195
|
if (tier === "bottomTier") {
|
|
@@ -7182,6 +7272,15 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7182
7272
|
this.columnMenuOpen = function (args) {
|
|
7183
7273
|
_this.parent.notify('columnMenuOpen', args);
|
|
7184
7274
|
_this.parent.trigger('columnMenuOpen', args);
|
|
7275
|
+
document.querySelector(".e-colmenu").addEventListener('mousemove', function (event) {
|
|
7276
|
+
var filPopOptions = document.querySelector(".e-filter-popup");
|
|
7277
|
+
var filOptions = document.querySelector(".e-filter-item");
|
|
7278
|
+
if (!isNullOrUndefined(filPopOptions)) {
|
|
7279
|
+
if (!filOptions.classList.contains('e-focused')) {
|
|
7280
|
+
remove(_this.parent.filterModule.filterMenuElement);
|
|
7281
|
+
}
|
|
7282
|
+
}
|
|
7283
|
+
});
|
|
7185
7284
|
};
|
|
7186
7285
|
this.columnMenuClick = function (args) {
|
|
7187
7286
|
_this.parent.trigger('columnMenuClick', args);
|
|
@@ -7213,6 +7312,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7213
7312
|
this.parent.treeGrid = new TreeGrid();
|
|
7214
7313
|
this.parent.treeGrid.allowSelection = false;
|
|
7215
7314
|
this.parent.treeGrid.allowKeyboard = this.parent.allowKeyboard;
|
|
7315
|
+
this.parent.treeGrid['${enableHtmlSanitizer}'] = this.parent.enableHtmlSanitizer;
|
|
7216
7316
|
this.parent.treeGrid.enableImmutableMode = this.parent.enableImmutableMode;
|
|
7217
7317
|
this.treeGridColumns = [];
|
|
7218
7318
|
if (!this.parent.isLocaleChanged && this.parent.isLoad) {
|
|
@@ -7403,6 +7503,12 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7403
7503
|
if (!this.parent.ganttChartModule.isExpandCollapseFromChart && !this.parent.isExpandCollapseLevelMethod) {
|
|
7404
7504
|
var collapsedArgs = this.createExpandCollapseArgs(args);
|
|
7405
7505
|
this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
|
|
7506
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && collapsedArgs['gridRow']) {
|
|
7507
|
+
collapsedArgs['gridRow'].style.height = collapsedArgs['chartRow'].style.height;
|
|
7508
|
+
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
7509
|
+
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
7510
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
7511
|
+
}
|
|
7406
7512
|
}
|
|
7407
7513
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
7408
7514
|
this.parent.hideMaskRow();
|
|
@@ -7416,6 +7522,12 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7416
7522
|
if (!args['data'].length) {
|
|
7417
7523
|
var expandedArgs = this.createExpandCollapseArgs(args);
|
|
7418
7524
|
this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
|
|
7525
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && args['row']) {
|
|
7526
|
+
args['row'].style.height = this.parent.rowHeight + 'px';
|
|
7527
|
+
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
7528
|
+
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
7529
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
7530
|
+
}
|
|
7419
7531
|
}
|
|
7420
7532
|
}
|
|
7421
7533
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
@@ -7508,6 +7620,14 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7508
7620
|
this.parent.addDeleteRecord = false;
|
|
7509
7621
|
}
|
|
7510
7622
|
this.parent.trigger('actionComplete', updatedArgs);
|
|
7623
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && this.parent.showOverAllocation) {
|
|
7624
|
+
for (var i = 0; i < this.parent.currentViewData.length; i++) {
|
|
7625
|
+
if (this.parent.currentViewData[i].hasChildRecords && !this.parent.currentViewData[i].expanded) {
|
|
7626
|
+
this.parent.chartRowsModule.updateDragDropRecords(this.parent.currentViewData[i]);
|
|
7627
|
+
}
|
|
7628
|
+
}
|
|
7629
|
+
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
7630
|
+
}
|
|
7511
7631
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
7512
7632
|
this.parent.hideMaskRow();
|
|
7513
7633
|
}
|
|
@@ -8990,8 +9110,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8990
9110
|
}
|
|
8991
9111
|
}
|
|
8992
9112
|
else {
|
|
8993
|
-
|
|
9113
|
+
var field = this.parent.labelSettings.taskLabel;
|
|
9114
|
+
labelString = this.getTaskLabel(field);
|
|
8994
9115
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
9116
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
9117
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
9118
|
+
}
|
|
8995
9119
|
}
|
|
8996
9120
|
if (labelString.indexOf('null') === -1) {
|
|
8997
9121
|
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
@@ -9003,7 +9127,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9003
9127
|
(this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
|
|
9004
9128
|
'display:' + 'inline-block;' +
|
|
9005
9129
|
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
9006
|
-
this.taskBarHeight + 'px;"
|
|
9130
|
+
this.taskBarHeight + 'px;"></span>';
|
|
9007
9131
|
}
|
|
9008
9132
|
else {
|
|
9009
9133
|
taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
|
|
@@ -9011,7 +9135,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9011
9135
|
(this.parent.enableRtl ? 'right;' : 'left;')) : '') +
|
|
9012
9136
|
+(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
|
|
9013
9137
|
+(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
9014
|
-
this.taskBarHeight + 'px;"
|
|
9138
|
+
this.taskBarHeight + 'px;"></span>';
|
|
9015
9139
|
}
|
|
9016
9140
|
}
|
|
9017
9141
|
var template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
|
|
@@ -9037,6 +9161,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9037
9161
|
data.ganttProperties.segments.length === 0))) {
|
|
9038
9162
|
if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
9039
9163
|
var templateElement = this.createDivElement(template)[0];
|
|
9164
|
+
templateElement.innerText = labelString;
|
|
9040
9165
|
var childLabel = this.parent.labelSettings.taskLabel;
|
|
9041
9166
|
if (childLabel && childLabel['elementRef'])
|
|
9042
9167
|
templateElement.appendChild(tempDiv);
|
|
@@ -9519,6 +9644,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9519
9644
|
if (labelString) {
|
|
9520
9645
|
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
9521
9646
|
leftLabelTemplateNode = this.getLableText(labelString, leftLabelInnerDiv);
|
|
9647
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
9648
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
9649
|
+
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
9650
|
+
leftLabelTemplateNode = this.getLableText(labelString, leftLabelInnerDiv);
|
|
9651
|
+
}
|
|
9522
9652
|
}
|
|
9523
9653
|
}
|
|
9524
9654
|
if (leftLabelTemplateNode && leftLabelTemplateNode.length > 0) {
|
|
@@ -9569,6 +9699,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9569
9699
|
if (labelString) {
|
|
9570
9700
|
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
9571
9701
|
rightLabelTemplateNode = this.getLableText(labelString, rightLabelInnerDiv);
|
|
9702
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
9703
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
9704
|
+
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
9705
|
+
rightLabelTemplateNode = this.getLableText(labelString, rightLabelInnerDiv);
|
|
9706
|
+
}
|
|
9572
9707
|
}
|
|
9573
9708
|
}
|
|
9574
9709
|
if (rightLabelTemplateNode && rightLabelTemplateNode.length > 0) {
|
|
@@ -9620,7 +9755,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9620
9755
|
'<div class="' + manualParentMilestoneBottom + '" style="top:' +
|
|
9621
9756
|
(this.milesStoneRadius) + 'px;border-right-width:' + this.milesStoneRadius + 'px; border-left-width:' +
|
|
9622
9757
|
this.milesStoneRadius + 'px; border-top-width:' + this.milesStoneRadius + 'px;"></div></div>';
|
|
9623
|
-
return this.createDivElement(data.ganttProperties.width === 0 ? milestoneTemplate : template);
|
|
9758
|
+
return this.createDivElement(data.ganttProperties.width === 0 ? milestoneTemplate : !data.ganttProperties.isMilestone ? template : null);
|
|
9624
9759
|
};
|
|
9625
9760
|
/**
|
|
9626
9761
|
* To get parent taskbar node.
|
|
@@ -9664,6 +9799,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9664
9799
|
else {
|
|
9665
9800
|
labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
|
|
9666
9801
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
9802
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
9803
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
9804
|
+
}
|
|
9667
9805
|
}
|
|
9668
9806
|
if (labelString.indexOf('null') === -1) {
|
|
9669
9807
|
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
@@ -9676,7 +9814,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9676
9814
|
'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
|
|
9677
9815
|
'display:' + 'inline-block;' +
|
|
9678
9816
|
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
9679
|
-
this.taskBarHeight + 'px;"
|
|
9817
|
+
this.taskBarHeight + 'px;"></span>';
|
|
9680
9818
|
}
|
|
9681
9819
|
else {
|
|
9682
9820
|
labelDiv = '<span class="' +
|
|
@@ -9686,9 +9824,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9686
9824
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
9687
9825
|
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
|
|
9688
9826
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
9689
|
-
this.taskBarHeight + 'px;"
|
|
9827
|
+
this.taskBarHeight + 'px;"></span>';
|
|
9690
9828
|
}
|
|
9691
9829
|
var labelElement = this.createDivElement(labelDiv)[0];
|
|
9830
|
+
labelElement.innerText = labelString;
|
|
9692
9831
|
var parentLabel = this.parent.labelSettings.taskLabel;
|
|
9693
9832
|
if (parentLabel && parentLabel['elementRef'])
|
|
9694
9833
|
labelElement.appendChild(div);
|
|
@@ -9855,7 +9994,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9855
9994
|
var mileStoneLeft = -(this.connectorPointWidth + 2);
|
|
9856
9995
|
var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9857
9996
|
var marginTop;
|
|
9858
|
-
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9997
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
|
|
9859
9998
|
marginTop = '';
|
|
9860
9999
|
}
|
|
9861
10000
|
else {
|
|
@@ -9874,7 +10013,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9874
10013
|
var pointerRight = this.parent.isAdaptive ? 10 : -2;
|
|
9875
10014
|
var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9876
10015
|
var marginTop;
|
|
9877
|
-
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
10016
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
|
|
9878
10017
|
marginTop = '';
|
|
9879
10018
|
}
|
|
9880
10019
|
else {
|
|
@@ -10163,6 +10302,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10163
10302
|
this.parent.renderTemplates();
|
|
10164
10303
|
this.triggerQueryTaskbarInfo();
|
|
10165
10304
|
this.parent.modifiedRecords = [];
|
|
10305
|
+
if (this.parent.viewType == 'ResourceView' && this.parent.showOverAllocation) {
|
|
10306
|
+
this.updateOverlapped();
|
|
10307
|
+
}
|
|
10166
10308
|
if (collapsedResourceRecord.length) {
|
|
10167
10309
|
for (var j = 0; j < collapsedResourceRecord.length; j++) {
|
|
10168
10310
|
if (collapsedResourceRecord[j].hasChildRecords) {
|
|
@@ -10189,22 +10331,37 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10189
10331
|
var taskbarContainerNode = this.taskbarContainer();
|
|
10190
10332
|
taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
|
|
10191
10333
|
taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
|
|
10192
|
-
var connectorLineLeftNode
|
|
10193
|
-
if (
|
|
10194
|
-
|
|
10334
|
+
var connectorLineLeftNode;
|
|
10335
|
+
if (!this.templateData.hasChildRecords && !this.parent.allowParentDependency) {
|
|
10336
|
+
var connectorLineLeftNode_1 = this.getLeftPointNode();
|
|
10337
|
+
taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode_1)[0]);
|
|
10338
|
+
}
|
|
10339
|
+
else if (this.parent.allowParentDependency) {
|
|
10340
|
+
connectorLineLeftNode = this.getLeftPointNode();
|
|
10341
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
10342
|
+
taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
10343
|
+
}
|
|
10195
10344
|
}
|
|
10196
10345
|
if (this.templateData.hasChildRecords) {
|
|
10197
10346
|
var parentTaskbarTemplateNode = this.getParentTaskbarNode(i, taskbarContainerNode);
|
|
10347
|
+
var milestoneTemplateNode = this.getMilestoneNode(i, taskbarContainerNode);
|
|
10198
10348
|
if (!this.templateData.ganttProperties.isAutoSchedule) {
|
|
10199
10349
|
var manualTaskbar = this.getManualTaskbar();
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10350
|
+
if (!isNullOrUndefined(manualTaskbar[0])) {
|
|
10351
|
+
if (this.parent.allowParentDependency) {
|
|
10352
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
10353
|
+
var connectorLineRightNode_1 = this.getRightPointNode();
|
|
10354
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode_1)[0]);
|
|
10355
|
+
}
|
|
10356
|
+
taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
|
|
10357
|
+
}
|
|
10204
10358
|
}
|
|
10205
10359
|
if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
|
|
10206
10360
|
taskbarContainerNode[0].appendChild([].slice.call(parentTaskbarTemplateNode)[0]);
|
|
10207
10361
|
}
|
|
10362
|
+
else if (milestoneTemplateNode && milestoneTemplateNode.length > 0) {
|
|
10363
|
+
taskbarContainerNode[0].appendChild([].slice.call(milestoneTemplateNode)[0]);
|
|
10364
|
+
}
|
|
10208
10365
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
10209
10366
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
10210
10367
|
taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
@@ -10274,8 +10431,13 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10274
10431
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
10275
10432
|
}
|
|
10276
10433
|
}
|
|
10277
|
-
|
|
10278
|
-
|
|
10434
|
+
var connectorLineRightNode;
|
|
10435
|
+
if (this.parent.allowParentDependency && ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords)) {
|
|
10436
|
+
connectorLineRightNode = this.getRightPointNode();
|
|
10437
|
+
taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
10438
|
+
}
|
|
10439
|
+
else if (!this.parent.allowParentDependency) {
|
|
10440
|
+
connectorLineRightNode = this.getRightPointNode();
|
|
10279
10441
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
10280
10442
|
}
|
|
10281
10443
|
var rightLabelNode = this.getRightLabelNode(i);
|
|
@@ -10296,6 +10458,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10296
10458
|
else {
|
|
10297
10459
|
var text = createElement('Text');
|
|
10298
10460
|
text.innerHTML = indicators[indicatorIndex].name;
|
|
10461
|
+
if (this.parent.enableHtmlSanitizer && typeof (indicators[indicatorIndex].name) === 'string') {
|
|
10462
|
+
indicators[indicatorIndex].name = SanitizeHtmlHelper.sanitize(indicators[indicatorIndex].name);
|
|
10463
|
+
text.innerText = indicators[indicatorIndex].name;
|
|
10464
|
+
}
|
|
10299
10465
|
taskIndicatorTextNode = text.childNodes;
|
|
10300
10466
|
}
|
|
10301
10467
|
taskIndicatorNode[0].appendChild([].slice.call(taskIndicatorTextNode)[0]);
|
|
@@ -10389,7 +10555,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10389
10555
|
getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor :
|
|
10390
10556
|
(trElement.querySelector('.' + baselineBar) ? getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor : null);
|
|
10391
10557
|
}
|
|
10392
|
-
else {
|
|
10558
|
+
else if (taskbarElement) {
|
|
10393
10559
|
var childTask = taskbarElement.querySelector(classCollections[0]);
|
|
10394
10560
|
var progressTask = taskbarElement.querySelector(classCollections[1]);
|
|
10395
10561
|
args.taskbarBgColor = isNullOrUndefined(childTask) ? null : taskbarElement.classList.contains(traceChildTaskBar) ?
|
|
@@ -10468,7 +10634,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10468
10634
|
trElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
|
|
10469
10635
|
}
|
|
10470
10636
|
}
|
|
10471
|
-
else {
|
|
10637
|
+
else if (taskbarElement) {
|
|
10472
10638
|
if (taskbarElement.querySelector(classCollections[0]) &&
|
|
10473
10639
|
getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor !== args.taskbarBgColor) {
|
|
10474
10640
|
taskbarElement.querySelector(classCollections[0]).style.backgroundColor = args.taskbarBgColor;
|
|
@@ -10570,6 +10736,78 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10570
10736
|
}
|
|
10571
10737
|
return null;
|
|
10572
10738
|
};
|
|
10739
|
+
// to update the eOverlapped property
|
|
10740
|
+
ChartRows.prototype.updateOverlapped = function () {
|
|
10741
|
+
for (var k = 0; k < this.parent.treeGrid.parentData.length; k++) {
|
|
10742
|
+
var childRecords = this.parent.treeGrid.parentData[k].childRecords;
|
|
10743
|
+
for (var i = 0; i < childRecords.length; i++) {
|
|
10744
|
+
if (childRecords[i + 1]) {
|
|
10745
|
+
childRecords[i].ganttProperties.eOverlapped = undefined;
|
|
10746
|
+
}
|
|
10747
|
+
for (var j = i + 1; j < childRecords.length; j++) {
|
|
10748
|
+
childRecords[j].ganttProperties.eOverlapped = undefined;
|
|
10749
|
+
if (childRecords[i].ganttProperties.startDate.getTime() < childRecords[j].ganttProperties.endDate.getTime() &&
|
|
10750
|
+
childRecords[i].ganttProperties.endDate.getTime() > childRecords[j].ganttProperties.startDate.getTime()) {
|
|
10751
|
+
childRecords[j].ganttProperties.eOverlapped = true;
|
|
10752
|
+
childRecords[i].ganttProperties.eOverlapped = true;
|
|
10753
|
+
}
|
|
10754
|
+
else {
|
|
10755
|
+
if (isNullOrUndefined(childRecords[j].ganttProperties.eOverlapped)) {
|
|
10756
|
+
childRecords[j].ganttProperties.eOverlapped = false;
|
|
10757
|
+
}
|
|
10758
|
+
if (isNullOrUndefined(childRecords[i].ganttProperties.eOverlapped)) {
|
|
10759
|
+
childRecords[i].ganttProperties.eOverlapped = false;
|
|
10760
|
+
}
|
|
10761
|
+
}
|
|
10762
|
+
}
|
|
10763
|
+
}
|
|
10764
|
+
}
|
|
10765
|
+
};
|
|
10766
|
+
// To update the row height when allow overallocation set to false
|
|
10767
|
+
ChartRows.prototype.updateDragDropRecords = function (data, tr) {
|
|
10768
|
+
var childRecords = data.childRecords;
|
|
10769
|
+
var rowIndex = this.parent.currentViewData.indexOf(data);
|
|
10770
|
+
var treeGridContentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
10771
|
+
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
10772
|
+
if (!tr) {
|
|
10773
|
+
tr = this.ganttChartTableBody.childNodes[rowIndex];
|
|
10774
|
+
}
|
|
10775
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = this.parent.rowHeight + 'px';
|
|
10776
|
+
this.parent.contentHeight = treeGridContentHeight;
|
|
10777
|
+
var rowIDs = [];
|
|
10778
|
+
var rowCounts = 0;
|
|
10779
|
+
if (data) {
|
|
10780
|
+
for (var i = 0; i < childRecords.length; i++) {
|
|
10781
|
+
for (var j = i + 1; j < childRecords.length; j++) {
|
|
10782
|
+
var taskbarContainer = tr.getElementsByClassName('e-taskbar-main-container');
|
|
10783
|
+
for (var k = 0; k < taskbarContainer.length; k++) {
|
|
10784
|
+
if (childRecords[i].ganttProperties.startDate.getTime() < childRecords[j].ganttProperties.endDate.getTime() &&
|
|
10785
|
+
childRecords[i].ganttProperties.endDate.getTime() > childRecords[j].ganttProperties.startDate.getTime()) {
|
|
10786
|
+
if (taskbarContainer[k].getAttribute('rowuniqueid') === childRecords[j]['rowUniqueID'] &&
|
|
10787
|
+
rowIDs.indexOf(childRecords[j]['rowUniqueID']) == -1) {
|
|
10788
|
+
rowIDs.push(childRecords[j]['rowUniqueID']);
|
|
10789
|
+
rowCounts++;
|
|
10790
|
+
tr.children[0]['style'].verticalAlign = 'baseline';
|
|
10791
|
+
tr.getElementsByClassName('e-taskbar-main-container')[k]['style'].marginTop = (rowCounts * this.parent.rowHeight) + this.taskBarMarginTop + 'px';
|
|
10792
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = parseInt(tr['style'].height) + this.parent.rowHeight + 'px';
|
|
10793
|
+
}
|
|
10794
|
+
}
|
|
10795
|
+
else {
|
|
10796
|
+
if (taskbarContainer[k].getAttribute('rowuniqueid') === childRecords[j]['rowUniqueID'] &&
|
|
10797
|
+
rowIDs.indexOf(childRecords[j]['rowUniqueID']) == -1 && this.parent.rowDragAndDropModule &&
|
|
10798
|
+
this.parent.rowDragAndDropModule['draggedRecord'] && taskbarContainer[k].getAttribute('rowuniqueid') ===
|
|
10799
|
+
this.parent.rowDragAndDropModule['draggedRecord']['rowUniqueID'] && this.parent.rowDragAndDropModule['draggedRecord']['rowUniqueID'] === childRecords[j]['rowUniqueID']) {
|
|
10800
|
+
tr.getElementsByClassName('e-taskbar-main-container')[k]['style'].marginTop =
|
|
10801
|
+
this.parent.editModule.taskbarEditModule.draggedRecordMarginTop;
|
|
10802
|
+
}
|
|
10803
|
+
}
|
|
10804
|
+
}
|
|
10805
|
+
}
|
|
10806
|
+
}
|
|
10807
|
+
this.parent.contentHeight = treeGridContentHeight;
|
|
10808
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
10809
|
+
}
|
|
10810
|
+
};
|
|
10573
10811
|
/**
|
|
10574
10812
|
* To refresh edited TR
|
|
10575
10813
|
*
|
|
@@ -10583,14 +10821,22 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10583
10821
|
var selectedItem = this.parent.currentViewData[index];
|
|
10584
10822
|
if (index !== -1 && selectedItem) {
|
|
10585
10823
|
var data = selectedItem;
|
|
10824
|
+
if (!this.parent.allowTaskbarOverlap && this.parent.viewType === 'ResourceView' && data.expanded) {
|
|
10825
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(index)['style'].height = this.parent.rowHeight + 'px';
|
|
10826
|
+
}
|
|
10586
10827
|
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar) {
|
|
10587
10828
|
tr.replaceChild(this.getResourceParent(data).childNodes[0], tr.childNodes[0]);
|
|
10588
10829
|
}
|
|
10589
10830
|
else {
|
|
10590
|
-
|
|
10831
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && !data.expanded) {
|
|
10832
|
+
tr.replaceWith(this.getGanttChartRow(index, data));
|
|
10833
|
+
}
|
|
10834
|
+
else {
|
|
10835
|
+
tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
|
|
10836
|
+
}
|
|
10591
10837
|
}
|
|
10592
10838
|
this.parent.renderTemplates();
|
|
10593
|
-
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
|
|
10839
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && this.parent.allowTaskbarOverlap) {
|
|
10594
10840
|
if (isValidateRange) {
|
|
10595
10841
|
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
10596
10842
|
}
|
|
@@ -10612,6 +10858,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10612
10858
|
}
|
|
10613
10859
|
var dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
|
|
10614
10860
|
this.parent.treeGrid.grid.setRowData(dataId, data);
|
|
10861
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap) {
|
|
10862
|
+
this.updateDragDropRecords(selectedItem, tr);
|
|
10863
|
+
}
|
|
10864
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
10865
|
+
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
10866
|
+
}
|
|
10615
10867
|
var nextEditableElement = this.parent.ganttChartModule.tempNextElement;
|
|
10616
10868
|
if (this.parent.ganttChartModule.isEditableElement && nextEditableElement) {
|
|
10617
10869
|
this.parent.treeGrid.grid.focusModule.focus();
|
|
@@ -10625,7 +10877,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10625
10877
|
ChartRows.prototype.getResourceParent = function (record) {
|
|
10626
10878
|
var chartRows = this.parent.ganttChartModule.getChartRows();
|
|
10627
10879
|
//Below code is for rendering taskbartemplate in resource view with multi taskbar
|
|
10628
|
-
if (this.parent.initialChartRowElements) {
|
|
10880
|
+
if (this.parent.initialChartRowElements && (!this.parent.allowTaskbarDragAndDrop && this.parent.allowTaskbarOverlap)) {
|
|
10629
10881
|
for (var j = 0; j < this.parent.initialChartRowElements.length; j++) {
|
|
10630
10882
|
if (!isNullOrUndefined(chartRows[j])) {
|
|
10631
10883
|
if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
|
|
@@ -10653,7 +10905,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10653
10905
|
var id = chartRows[i].querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
|
|
10654
10906
|
var ganttData = this.parent.getRecordByID(id);
|
|
10655
10907
|
var zIndex = "";
|
|
10656
|
-
if (ganttData && ganttData.ganttProperties.eOverlapIndex) {
|
|
10908
|
+
if (ganttData && !isNullOrUndefined(ganttData.ganttProperties.eOverlapIndex)) {
|
|
10657
10909
|
zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
|
|
10658
10910
|
}
|
|
10659
10911
|
var cloneChildElement = cloneElement.cloneNode(true);
|
|
@@ -10801,7 +11053,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10801
11053
|
for (var count = length; count >= 0; count--) {
|
|
10802
11054
|
var ganttData = predecessorTasks[count];
|
|
10803
11055
|
var ganttProp = ganttData.ganttProperties;
|
|
10804
|
-
|
|
11056
|
+
if ((!ganttData.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
|
|
11057
|
+
this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
|
|
11058
|
+
}
|
|
10805
11059
|
}
|
|
10806
11060
|
};
|
|
10807
11061
|
/**
|
|
@@ -10964,18 +11218,26 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10964
11218
|
offsetUnit: offsetUnits.durationUnit,
|
|
10965
11219
|
offset: offsetUnits.duration
|
|
10966
11220
|
};
|
|
10967
|
-
var
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
if (_this.parent.connectorLineEditModule && toData && fromData) {
|
|
10971
|
-
isValid = _this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
|
|
10972
|
-
if (isValid)
|
|
11221
|
+
var isOwnParent = _this.checkIsParent(match[0]);
|
|
11222
|
+
if (!_this.parent.allowParentDependency) {
|
|
11223
|
+
if (!isOwnParent) {
|
|
10973
11224
|
collection.push(obj);
|
|
11225
|
+
}
|
|
10974
11226
|
}
|
|
10975
11227
|
else {
|
|
10976
|
-
|
|
11228
|
+
var fromData = _this.parent.connectorLineModule.getRecordByID(obj.to);
|
|
11229
|
+
var toData = _this.parent.connectorLineModule.getRecordByID(obj.from);
|
|
11230
|
+
var isValid = void 0;
|
|
11231
|
+
if (_this.parent.connectorLineEditModule && toData && fromData) {
|
|
11232
|
+
isValid = _this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
|
|
11233
|
+
if (isValid)
|
|
11234
|
+
collection.push(obj);
|
|
11235
|
+
}
|
|
11236
|
+
else {
|
|
11237
|
+
collection.push(obj);
|
|
11238
|
+
}
|
|
11239
|
+
match.splice(0);
|
|
10977
11240
|
}
|
|
10978
|
-
match.splice(0);
|
|
10979
11241
|
});
|
|
10980
11242
|
return collection;
|
|
10981
11243
|
};
|
|
@@ -11098,7 +11360,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
11098
11360
|
var length = predecessorsCollection.length;
|
|
11099
11361
|
for (var count = 0; count < length; count++) {
|
|
11100
11362
|
ganttRecord = predecessorsCollection[count];
|
|
11101
|
-
|
|
11363
|
+
if ((!ganttRecord.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
|
|
11364
|
+
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
11365
|
+
}
|
|
11102
11366
|
}
|
|
11103
11367
|
};
|
|
11104
11368
|
/**
|
|
@@ -11147,12 +11411,16 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
11147
11411
|
* @private
|
|
11148
11412
|
*/
|
|
11149
11413
|
Dependency.prototype.updatedRecordsDateByPredecessor = function () {
|
|
11414
|
+
if (!this.parent.autoCalculateDateScheduling) {
|
|
11415
|
+
return;
|
|
11416
|
+
}
|
|
11150
11417
|
var flatData = this.parent.flatData;
|
|
11151
11418
|
var totLength = this.parent.flatData.length;
|
|
11152
11419
|
for (var count = 0; count < totLength; count++) {
|
|
11153
11420
|
if (flatData[count].ganttProperties.predecessorsName) {
|
|
11154
11421
|
this.validatePredecessorDates(flatData[count]);
|
|
11155
|
-
if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
|
|
11422
|
+
if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
|
|
11423
|
+
&& this.parent.allowParentDependency) {
|
|
11156
11424
|
this.parent.editModule['updateChildItems'](flatData[count]);
|
|
11157
11425
|
}
|
|
11158
11426
|
}
|
|
@@ -11197,7 +11465,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
11197
11465
|
var predecessor = predecessors[count];
|
|
11198
11466
|
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor.from);
|
|
11199
11467
|
record = this.parent.connectorLineModule.getRecordByID(predecessor.to);
|
|
11200
|
-
if (this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
|
|
11468
|
+
if (this.parent.allowParentDependency && this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
|
|
11201
11469
|
&& (ganttRecord.hasChildRecords || record.hasChildRecords)) {
|
|
11202
11470
|
this.parentPredecessors.push(ganttRecord);
|
|
11203
11471
|
}
|
|
@@ -11881,9 +12149,16 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11881
12149
|
* @private
|
|
11882
12150
|
*/
|
|
11883
12151
|
ConnectorLine.prototype.getHeightValue = function (data) {
|
|
11884
|
-
|
|
11885
|
-
(
|
|
11886
|
-
|
|
12152
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
12153
|
+
return (data.parentIndex * this.parent.rowHeight) > (data.childIndex * this.parent.rowHeight) ?
|
|
12154
|
+
((data.parentIndex * this.parent.rowHeight) - (data.childIndex * this.parent.rowHeight)) :
|
|
12155
|
+
((data.childIndex * this.parent.rowHeight) - (data.parentIndex * this.parent.rowHeight));
|
|
12156
|
+
}
|
|
12157
|
+
else {
|
|
12158
|
+
return (data.parentIndex * data.rowHeight) > (data.childIndex * data.rowHeight) ?
|
|
12159
|
+
((data.parentIndex * data.rowHeight) - (data.childIndex * data.rowHeight)) :
|
|
12160
|
+
((data.childIndex * data.rowHeight) - (data.parentIndex * data.rowHeight));
|
|
12161
|
+
}
|
|
11887
12162
|
};
|
|
11888
12163
|
/**
|
|
11889
12164
|
* To get sstype2 inner element width.
|
|
@@ -11960,7 +12235,30 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11960
12235
|
var heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
|
|
11961
12236
|
var borderTopWidth = 0;
|
|
11962
12237
|
var addTop = 0;
|
|
11963
|
-
|
|
12238
|
+
var parentOverlapTopValue = 0;
|
|
12239
|
+
var childOverlapTopValue = 0;
|
|
12240
|
+
var count = 0;
|
|
12241
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
12242
|
+
for (var i = 0; i < this.parent.currentViewData.length; i++) {
|
|
12243
|
+
if (this.parent.getRowByIndex(i).style.display != 'none') {
|
|
12244
|
+
if (count < data.parentIndex) {
|
|
12245
|
+
count++;
|
|
12246
|
+
parentOverlapTopValue = parentOverlapTopValue + this.parent.getRowByIndex(i).offsetHeight;
|
|
12247
|
+
}
|
|
12248
|
+
}
|
|
12249
|
+
}
|
|
12250
|
+
count = 0;
|
|
12251
|
+
for (var j = 0; j < this.parent.currentViewData.length; j++) {
|
|
12252
|
+
if (this.parent.getRowByIndex(j).style.display != 'none') {
|
|
12253
|
+
if (count < data.childIndex) {
|
|
12254
|
+
count++;
|
|
12255
|
+
childOverlapTopValue = childOverlapTopValue + this.parent.getRowByIndex(j).offsetHeight;
|
|
12256
|
+
}
|
|
12257
|
+
}
|
|
12258
|
+
}
|
|
12259
|
+
heightValue = Math.abs(parentOverlapTopValue - childOverlapTopValue);
|
|
12260
|
+
}
|
|
12261
|
+
if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex] && this.parent.allowParentDependency) {
|
|
11964
12262
|
var fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
|
|
11965
12263
|
var toRecordIsParent = this.parent.currentViewData[data.childIndex].hasChildRecords;
|
|
11966
12264
|
var fromRecordIsManual = this.parent.currentViewData[data.parentIndex].ganttProperties.isAutoSchedule;
|
|
@@ -12053,7 +12351,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12053
12351
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
12054
12352
|
if (this.getParentPosition(data) === 'FSType1') {
|
|
12055
12353
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12056
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12354
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12057
12355
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
|
|
12058
12356
|
div = div + eLine;
|
|
12059
12357
|
div = div + direction + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
|
|
@@ -12073,7 +12371,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12073
12371
|
'px;border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div></div>';
|
|
12074
12372
|
}
|
|
12075
12373
|
if (this.getParentPosition(data) === 'FSType2') {
|
|
12076
|
-
div = div + direction + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) + addTop +
|
|
12374
|
+
div = div + direction + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop +
|
|
12077
12375
|
this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12078
12376
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
|
|
12079
12377
|
div = div + eLine;
|
|
@@ -12105,7 +12403,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12105
12403
|
}
|
|
12106
12404
|
if (this.getParentPosition(data) === 'FSType3') {
|
|
12107
12405
|
div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12108
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12406
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12109
12407
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
|
|
12110
12408
|
div = div + rightArrow;
|
|
12111
12409
|
div = div + direction + '10px;' + this.getBorderStyles((this.parent.enableRtl ? 'right' : 'left'), 10) +
|
|
@@ -12135,7 +12433,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12135
12433
|
}
|
|
12136
12434
|
if (this.getParentPosition(data) === 'FSType4') {
|
|
12137
12435
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12138
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12436
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12139
12437
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
|
|
12140
12438
|
div = div + rightArrow;
|
|
12141
12439
|
div = div + direction + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
|
|
@@ -12161,7 +12459,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12161
12459
|
}
|
|
12162
12460
|
if (this.getParentPosition(data) === 'SSType4') {
|
|
12163
12461
|
div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12164
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12462
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12165
12463
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
|
|
12166
12464
|
div = div + rightArrow;
|
|
12167
12465
|
div = div + direction + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
|
|
@@ -12174,7 +12472,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12174
12472
|
}
|
|
12175
12473
|
if (this.getParentPosition(data) === 'SSType3') {
|
|
12176
12474
|
div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12177
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12475
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12178
12476
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
|
|
12179
12477
|
div = div + rightArrow;
|
|
12180
12478
|
div = div + direction + '10px;' + duplicateStingTwo;
|
|
@@ -12187,7 +12485,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12187
12485
|
}
|
|
12188
12486
|
if (this.getParentPosition(data) === 'SSType2') {
|
|
12189
12487
|
div = div + direction + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12190
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12488
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12191
12489
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
|
|
12192
12490
|
div = div + eLine;
|
|
12193
12491
|
div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
|
|
@@ -12207,7 +12505,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12207
12505
|
}
|
|
12208
12506
|
if (this.getParentPosition(data) === 'SSType1') {
|
|
12209
12507
|
div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12210
|
-
((data.parentIndex * data.rowHeight) + addTop +
|
|
12508
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop +
|
|
12211
12509
|
this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12212
12510
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
|
|
12213
12511
|
div = div + eLine;
|
|
@@ -12225,7 +12523,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12225
12523
|
}
|
|
12226
12524
|
if (this.getParentPosition(data) === 'FFType1') {
|
|
12227
12525
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12228
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12526
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12229
12527
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
|
|
12230
12528
|
div = div + eLine;
|
|
12231
12529
|
div = div + direction + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
|
|
@@ -12249,7 +12547,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12249
12547
|
}
|
|
12250
12548
|
if (this.getParentPosition(data) === 'FFType2') {
|
|
12251
12549
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12252
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12550
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12253
12551
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
|
|
12254
12552
|
div = div + eLine;
|
|
12255
12553
|
div = div + (isMilestoneParent ? direction + '-1px;' : '') + 'width:' +
|
|
@@ -12275,7 +12573,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12275
12573
|
}
|
|
12276
12574
|
if (this.getParentPosition(data) === 'FFType3') {
|
|
12277
12575
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12278
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12576
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12279
12577
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
|
|
12280
12578
|
div = div + duplicateStingOne;
|
|
12281
12579
|
div = div + eLine;
|
|
@@ -12298,7 +12596,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12298
12596
|
}
|
|
12299
12597
|
if (this.getParentPosition(data) === 'FFType4') {
|
|
12300
12598
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12301
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12599
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12302
12600
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
|
|
12303
12601
|
div = div + leftArrow;
|
|
12304
12602
|
div = div + (direction + ((data.childLeft + data.childWidth) -
|
|
@@ -12327,7 +12625,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12327
12625
|
}
|
|
12328
12626
|
if (this.getParentPosition(data) === 'SFType4') {
|
|
12329
12627
|
div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12330
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
12628
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
12331
12629
|
'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
|
|
12332
12630
|
div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
|
|
12333
12631
|
'border-bottom-width:' + (5 + this.lineStroke) +
|
|
@@ -12355,7 +12653,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12355
12653
|
}
|
|
12356
12654
|
if (this.getParentPosition(data) === 'SFType3') {
|
|
12357
12655
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12358
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12656
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12359
12657
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
|
|
12360
12658
|
div = div + duplicateStingOne;
|
|
12361
12659
|
div = div + eLine;
|
|
@@ -12373,7 +12671,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12373
12671
|
}
|
|
12374
12672
|
if (this.getParentPosition(data) === 'SFType1') {
|
|
12375
12673
|
div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12376
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12674
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12377
12675
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
|
|
12378
12676
|
div = div + eLine;
|
|
12379
12677
|
div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -12398,7 +12696,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12398
12696
|
}
|
|
12399
12697
|
if (this.getParentPosition(data) === 'SFType2') {
|
|
12400
12698
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
12401
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12699
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12402
12700
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
|
|
12403
12701
|
div = div + eLine;
|
|
12404
12702
|
div = div + direction + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
@@ -12794,7 +13092,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
12794
13092
|
this.toolTipObj.position = 'BottomCenter';
|
|
12795
13093
|
this.toolTipObj.openDelay = 700;
|
|
12796
13094
|
this.toolTipObj.enableRtl = this.parent.enableRtl;
|
|
12797
|
-
this.toolTipObj.enableHtmlSanitizer =
|
|
13095
|
+
this.toolTipObj.enableHtmlSanitizer = this.parent.enableHtmlSanitizer;
|
|
12798
13096
|
this.toolTipObj.cssClass = ganttTooltip;
|
|
12799
13097
|
this.toolTipObj.animation = { open: { effect: 'None', delay: 0 }, close: { effect: 'None', delay: 0 } };
|
|
12800
13098
|
this.toolTipObj.afterOpen = this.updateTooltipPosition.bind(this);
|
|
@@ -13007,8 +13305,12 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
13007
13305
|
var taskName;
|
|
13008
13306
|
if (ganttData) {
|
|
13009
13307
|
data = ganttData.ganttProperties;
|
|
13010
|
-
|
|
13011
|
-
|
|
13308
|
+
var taskNameValue = data.taskName;
|
|
13309
|
+
if (this.parent.enableHtmlSanitizer && typeof (taskNameValue) === 'string') {
|
|
13310
|
+
taskNameValue = SanitizeHtmlHelper.sanitize(taskNameValue);
|
|
13311
|
+
}
|
|
13312
|
+
taskName = !isNullOrUndefined(taskNameValue) ? '<tr class = "e-gantt-tooltip-rowcell"><td colspan="3">' +
|
|
13313
|
+
(this.parent.disableHtmlEncode ? taskNameValue.replace(/</g, "<").replace(/>/g, ">") : taskNameValue) + '</td></tr>' : '';
|
|
13012
13314
|
}
|
|
13013
13315
|
switch (elementType) {
|
|
13014
13316
|
case 'milestone':
|
|
@@ -13020,9 +13322,13 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
13020
13322
|
else if (!isNullOrUndefined(data.startDate)) {
|
|
13021
13323
|
milestoneStartDate = data.startDate;
|
|
13022
13324
|
}
|
|
13325
|
+
var sDateValue = this.parent.getFormatedDate(milestoneStartDate, this.parent.getDateFormat());
|
|
13326
|
+
if (this.parent.enableHtmlSanitizer && typeof (sDateValue) === 'string') {
|
|
13327
|
+
sDateValue = SanitizeHtmlHelper.sanitize(sDateValue);
|
|
13328
|
+
}
|
|
13023
13329
|
var sDate = !isNullOrUndefined(milestoneStartDate) ? '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
|
|
13024
13330
|
'<td class = "e-gantt-tooltip-value">' +
|
|
13025
|
-
|
|
13331
|
+
sDateValue + '</td></tr>' : '';
|
|
13026
13332
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
13027
13333
|
taskName + sDate + '</tbody></table>';
|
|
13028
13334
|
break;
|
|
@@ -13030,20 +13336,28 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
13030
13336
|
case 'taskbar':
|
|
13031
13337
|
{
|
|
13032
13338
|
var scheduledTask = !ganttData.hasChildRecords || data.isAutoSchedule ? true : false;
|
|
13339
|
+
var startDateValue = this.parent.getFormatedDate(scheduledTask ? data.startDate : data.autoStartDate, this.parent.getDateFormat());
|
|
13340
|
+
var endDateValue = this.parent.getFormatedDate(scheduledTask ? data.endDate : data.autoEndDate, this.parent.getDateFormat());
|
|
13341
|
+
var durationValue = this.parent.getDurationString((scheduledTask ? data.duration : data.autoDuration), data.durationUnit);
|
|
13342
|
+
var progressValue = data.progress;
|
|
13343
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
13344
|
+
startDateValue = typeof (startDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(startDateValue) : startDateValue;
|
|
13345
|
+
endDateValue = typeof (endDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(endDateValue) : endDateValue;
|
|
13346
|
+
durationValue = typeof (durationValue) === 'string' ? SanitizeHtmlHelper.sanitize(durationValue) : durationValue;
|
|
13347
|
+
progressValue = typeof (progressValue) === 'string' ? SanitizeHtmlHelper.sanitize(progressValue) : progressValue;
|
|
13348
|
+
}
|
|
13033
13349
|
var startDate = data.startDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13034
13350
|
this.parent.localeObj.getConstant(scheduledTask ? 'startDate' : 'subTasksStartDate') +
|
|
13035
|
-
'</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
13036
|
-
this.parent.getFormatedDate(scheduledTask ? data.startDate : data.autoStartDate, this.parent.getDateFormat()) +
|
|
13037
|
-
'</td></tr>' : '';
|
|
13351
|
+
'</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' + startDateValue + '</td></tr>' : '';
|
|
13038
13352
|
var endDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13039
13353
|
this.parent.localeObj.getConstant(scheduledTask ? 'endDate' : 'subTasksEndDate') +
|
|
13040
|
-
'</td><td>:</td
|
|
13354
|
+
'</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' + endDateValue + '</td></tr>' : '';
|
|
13041
13355
|
var duration = !isNullOrUndefined(data.duration) ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13042
13356
|
this.parent.localeObj.getConstant('duration') + '</td><td>:</td>' +
|
|
13043
|
-
'<td class = "e-gantt-tooltip-value"> ' +
|
|
13357
|
+
'<td class = "e-gantt-tooltip-value"> ' + durationValue +
|
|
13044
13358
|
'</td></tr>' : '';
|
|
13045
13359
|
var progress = !isNullOrUndefined(data.progress) ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13046
|
-
this.parent.localeObj.getConstant('progress') + '</td><td>:</td><td>' +
|
|
13360
|
+
this.parent.localeObj.getConstant('progress') + '</td><td>:</td><td>' + progressValue +
|
|
13047
13361
|
'</td></tr>' : '';
|
|
13048
13362
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
13049
13363
|
taskName + startDate + endDate + duration + progress + '</tbody></table>';
|
|
@@ -13051,82 +13365,131 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
13051
13365
|
}
|
|
13052
13366
|
case 'baseline':
|
|
13053
13367
|
{
|
|
13368
|
+
var baselineStartDateValue = this.parent.getFormatedDate(data.baselineStartDate, this.parent.getDateFormat());
|
|
13369
|
+
var baselineEndDateValue = this.parent.getFormatedDate(data.baselineEndDate, this.parent.getDateFormat());
|
|
13370
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
13371
|
+
baselineStartDateValue = typeof (baselineStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(baselineStartDateValue) : baselineStartDateValue;
|
|
13372
|
+
baselineEndDateValue = typeof (baselineEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(baselineEndDateValue) : baselineEndDateValue;
|
|
13373
|
+
}
|
|
13054
13374
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
13055
13375
|
taskName + '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13056
13376
|
this.parent.localeObj.getConstant('baselineStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
13057
|
-
|
|
13377
|
+
baselineStartDateValue + '</td></tr><tr>' +
|
|
13058
13378
|
'<td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('baselineEndDate') +
|
|
13059
13379
|
'</td><td>:</td><td class = "e-gantt-tooltip-value">' +
|
|
13060
|
-
|
|
13380
|
+
baselineEndDateValue + '</td></tr></tbody></table>';
|
|
13061
13381
|
break;
|
|
13062
13382
|
}
|
|
13063
13383
|
case 'marker':
|
|
13064
13384
|
{
|
|
13065
13385
|
var markerTooltipElement = parent.tooltipModule.getMarkerTooltipData(args);
|
|
13386
|
+
var markerTooltipElementValue = this.parent.getFormatedDate(this.parent.dateValidationModule.getDateFromFormat(markerTooltipElement.day), this.parent.getDateFormat());
|
|
13066
13387
|
var markerLabel = markerTooltipElement.label ? markerTooltipElement.label : '';
|
|
13388
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
13389
|
+
markerLabel = typeof (markerLabel) === 'string' ? SanitizeHtmlHelper.sanitize(markerLabel) : markerLabel;
|
|
13390
|
+
markerTooltipElementValue = typeof (markerTooltipElementValue) === 'string' ? SanitizeHtmlHelper.sanitize(markerTooltipElementValue) : markerTooltipElementValue;
|
|
13391
|
+
}
|
|
13067
13392
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr><td>' +
|
|
13068
|
-
|
|
13069
|
-
'</td></tr><tr><td>' +
|
|
13070
|
-
markerLabel + '</td></tr></tbody></table>';
|
|
13393
|
+
markerTooltipElementValue + '</td></tr><tr><td>' + (this.parent.disableHtmlEncode ? markerLabel.replace(/</g, "<").replace(/>/g, ">") : markerLabel) + '</td></tr></tbody></table>';
|
|
13071
13394
|
break;
|
|
13072
13395
|
}
|
|
13073
13396
|
case 'connectorLine':
|
|
13074
13397
|
{
|
|
13398
|
+
var fromNameValue = parent.tooltipModule.predecessorTooltipData.fromName;
|
|
13399
|
+
var fromIdValue = parent.tooltipModule.predecessorTooltipData.fromId;
|
|
13400
|
+
var toNameValue = parent.tooltipModule.predecessorTooltipData.toName;
|
|
13401
|
+
var toIdValue = parent.tooltipModule.predecessorTooltipData.toId;
|
|
13402
|
+
var linkTextValue = parent.tooltipModule.predecessorTooltipData.linkText;
|
|
13403
|
+
var offsetStringValue = parent.tooltipModule.predecessorTooltipData.offsetString;
|
|
13404
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
13405
|
+
fromNameValue = typeof (fromNameValue) === 'string' ? SanitizeHtmlHelper.sanitize(fromNameValue) : fromNameValue;
|
|
13406
|
+
fromIdValue = typeof (fromIdValue) === 'string' ? SanitizeHtmlHelper.sanitize(fromIdValue) : fromIdValue;
|
|
13407
|
+
toNameValue = typeof (toNameValue) === 'string' ? SanitizeHtmlHelper.sanitize(toNameValue) : toNameValue;
|
|
13408
|
+
toIdValue = typeof (toIdValue) === 'string' ? SanitizeHtmlHelper.sanitize(toIdValue) : toIdValue;
|
|
13409
|
+
linkTextValue = typeof (linkTextValue) === 'string' ? SanitizeHtmlHelper.sanitize(linkTextValue) : linkTextValue;
|
|
13410
|
+
offsetStringValue = typeof (offsetStringValue) === 'string' ? SanitizeHtmlHelper.sanitize(offsetStringValue) : offsetStringValue;
|
|
13411
|
+
}
|
|
13075
13412
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr><td class = "e-gantt-tooltip-label">' +
|
|
13076
13413
|
this.parent.localeObj.getConstant('from') + '</td><td>:</td>' +
|
|
13077
|
-
'<td class = "e-gantt-tooltip-value">' + parent.
|
|
13078
|
-
parent.
|
|
13414
|
+
'<td class = "e-gantt-tooltip-value">' + (this.parent.disableHtmlEncode ? fromNameValue.replace(/</g, "<").replace(/>/g, ">") : fromNameValue) + ' (' +
|
|
13415
|
+
(this.parent.disableHtmlEncode ? (typeof (fromIdValue) === 'string' ? fromIdValue.replace(/</g, "<").replace(/>/g, ">") : fromIdValue) : fromIdValue) + ')' + '</td></tr><tr><td class = "e-gantt-tooltip-label">' +
|
|
13079
13416
|
this.parent.localeObj.getConstant('to') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
13080
|
-
parent.
|
|
13081
|
-
'
|
|
13082
|
-
'</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('taskLink') +
|
|
13083
|
-
'</td><td>:</td><td class = "e-gantt-tooltip-value"> ' + parent.tooltipModule.predecessorTooltipData.linkText +
|
|
13417
|
+
(this.parent.disableHtmlEncode ? toNameValue.replace(/</g, "<").replace(/>/g, ">") : toNameValue) + ' (' + toIdValue + ')' + '</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('taskLink') +
|
|
13418
|
+
'</td><td>:</td><td class = "e-gantt-tooltip-value"> ' + linkTextValue +
|
|
13084
13419
|
'</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('lag') +
|
|
13085
13420
|
'</td><td>:</td><td class = "e-gantt-tooltip-value">' +
|
|
13086
|
-
|
|
13421
|
+
offsetStringValue + '</td></tr></tbody></table>';
|
|
13087
13422
|
break;
|
|
13088
13423
|
}
|
|
13089
13424
|
case 'indicator':
|
|
13090
13425
|
if (args.target.title.length) {
|
|
13091
|
-
|
|
13426
|
+
var titleValue = args.target.title;
|
|
13427
|
+
if (this.parent.enableHtmlSanitizer && typeof (titleValue) === 'string') {
|
|
13428
|
+
titleValue = SanitizeHtmlHelper.sanitize(titleValue);
|
|
13429
|
+
}
|
|
13430
|
+
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr>' + titleValue + '</tr></tbody></table>';
|
|
13092
13431
|
}
|
|
13093
13432
|
break;
|
|
13094
13433
|
case 'timeline':
|
|
13095
|
-
|
|
13434
|
+
var timlineTitleValue = args.target.title;
|
|
13435
|
+
if (this.parent.enableHtmlSanitizer && typeof (timlineTitleValue) === 'string') {
|
|
13436
|
+
timlineTitleValue = SanitizeHtmlHelper.sanitize(timlineTitleValue);
|
|
13437
|
+
}
|
|
13438
|
+
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr>' + timlineTitleValue + '</tr></tbody></table>';
|
|
13096
13439
|
break;
|
|
13097
13440
|
case 'manualtaskbar':
|
|
13098
13441
|
{
|
|
13442
|
+
var autoStartDateValue = this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat());
|
|
13443
|
+
var autoEndDateValue = this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat());
|
|
13444
|
+
var durationUnitValue = this.parent.getDurationString(data.duration, data.durationUnit);
|
|
13445
|
+
var manualStartDateValue = this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat());
|
|
13446
|
+
var manualEndDateValue = this.parent.getFormatedDate(data.endDate, this.parent.getDateFormat());
|
|
13447
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
13448
|
+
autoStartDateValue = typeof (autoStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoStartDateValue) : autoStartDateValue;
|
|
13449
|
+
autoEndDateValue = typeof (autoEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoEndDateValue) : autoEndDateValue;
|
|
13450
|
+
durationUnitValue = typeof (durationUnitValue) === 'string' ? SanitizeHtmlHelper.sanitize(durationUnitValue) : durationUnitValue;
|
|
13451
|
+
manualStartDateValue = typeof (manualStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(manualStartDateValue) : manualStartDateValue;
|
|
13452
|
+
manualEndDateValue = typeof (manualEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(manualEndDateValue) : manualEndDateValue;
|
|
13453
|
+
}
|
|
13099
13454
|
var autoStartDate = data.autoStartDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13100
13455
|
this.parent.localeObj.getConstant('subTasksStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
13101
|
-
|
|
13456
|
+
autoStartDateValue + '</td></tr>' : '';
|
|
13102
13457
|
var autoEndDate = data.autoEndDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13103
13458
|
this.parent.localeObj.getConstant('subTasksEndDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
13104
|
-
|
|
13459
|
+
autoEndDateValue + '</td></tr>' : '';
|
|
13105
13460
|
var durationValue = !isNullOrUndefined(data.duration) ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13106
13461
|
this.parent.localeObj.getConstant('duration') + '</td><td>:</td>' +
|
|
13107
|
-
'<td class = "e-gantt-tooltip-value"> ' +
|
|
13462
|
+
'<td class = "e-gantt-tooltip-value"> ' + durationUnitValue +
|
|
13108
13463
|
'</td></tr>' : '';
|
|
13109
13464
|
var manualStartDate = data.startDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13110
13465
|
this.parent.localeObj.getConstant('startDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
13111
|
-
|
|
13466
|
+
manualStartDateValue + '</td></tr>' : '';
|
|
13112
13467
|
var manualEndDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13113
13468
|
this.parent.localeObj.getConstant('endDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
13114
|
-
|
|
13469
|
+
manualEndDateValue + '</td></tr>' : '';
|
|
13115
13470
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
13116
13471
|
taskName + manualStartDate + autoStartDate + manualEndDate + autoEndDate + durationValue + '</tbody></table>';
|
|
13117
13472
|
break;
|
|
13118
13473
|
}
|
|
13119
13474
|
case 'manualmilestone':
|
|
13120
13475
|
{
|
|
13476
|
+
var autoStartValue = this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat());
|
|
13477
|
+
var autoEndValue = this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat());
|
|
13478
|
+
var dateValue = this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat());
|
|
13479
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
13480
|
+
autoStartValue = typeof (autoStartValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoStartValue) : autoStartValue;
|
|
13481
|
+
autoEndValue = typeof (autoEndValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoEndValue) : autoEndValue;
|
|
13482
|
+
dateValue = typeof (dateValue) === 'string' ? SanitizeHtmlHelper.sanitize(dateValue) : dateValue;
|
|
13483
|
+
}
|
|
13121
13484
|
var autoStart = data.autoStartDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13122
13485
|
this.parent.localeObj.getConstant('subTasksStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
13123
|
-
|
|
13486
|
+
autoStartValue + '</td></tr>' : '';
|
|
13124
13487
|
var autoEnd = data.autoEndDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
13125
13488
|
this.parent.localeObj.getConstant('subTasksEndDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
13126
|
-
|
|
13489
|
+
autoEndValue + '</td></tr>' : '';
|
|
13127
13490
|
var date = '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
|
|
13128
13491
|
'<td class = "e-gantt-tooltip-value">' +
|
|
13129
|
-
|
|
13492
|
+
dateValue + '</tr>';
|
|
13130
13493
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
13131
13494
|
taskName + date + autoStart + autoEnd + '</tbody></table>';
|
|
13132
13495
|
break;
|
|
@@ -13155,6 +13518,9 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
13155
13518
|
*/
|
|
13156
13519
|
Tooltip$$1.prototype.getPredecessorTooltipData = function (args) {
|
|
13157
13520
|
var predeceesorParent = args.target.parentElement.id;
|
|
13521
|
+
if (this.parent.enableHtmlSanitizer && typeof (predeceesorParent) === 'string') {
|
|
13522
|
+
predeceesorParent = SanitizeHtmlHelper.sanitize(predeceesorParent);
|
|
13523
|
+
}
|
|
13158
13524
|
var taskIds = predeceesorParent.match(/ConnectorLineparent(.*)child(.*)/);
|
|
13159
13525
|
taskIds.shift();
|
|
13160
13526
|
var fromTask;
|
|
@@ -13434,7 +13800,6 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
13434
13800
|
var top_1 = containerPosition.top + (containerPosition.height / 2);
|
|
13435
13801
|
var left = containerPosition.left + (containerPosition.width / 2);
|
|
13436
13802
|
this.setActiveElement(e.target);
|
|
13437
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
13438
13803
|
contextMenu.open(top_1, left);
|
|
13439
13804
|
e.preventDefault();
|
|
13440
13805
|
break;
|
|
@@ -13813,6 +14178,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13813
14178
|
this.treeGrid.isReact = true;
|
|
13814
14179
|
this.treeGrid.grid.isReact = true;
|
|
13815
14180
|
}
|
|
14181
|
+
if (this.isVue) {
|
|
14182
|
+
this.treeGrid.isVue = true;
|
|
14183
|
+
this.treeGrid.grid.isVue = true;
|
|
14184
|
+
this.treeGrid.vueInstance = this.vueInstance;
|
|
14185
|
+
this.treeGrid.grid.vueInstance = this.vueInstance;
|
|
14186
|
+
}
|
|
13816
14187
|
createSpinner({ target: this.element }, this.createElement);
|
|
13817
14188
|
this.trigger('load', {});
|
|
13818
14189
|
this.element.classList.add(root);
|
|
@@ -13838,13 +14209,13 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13838
14209
|
};
|
|
13839
14210
|
Gantt.prototype.hideMaskRow = function () {
|
|
13840
14211
|
var isTablePresent = this.element.querySelectorAll('.e-masked-table').length;
|
|
13841
|
-
if (!isNullOrUndefined(this.contentMaskTable) && isTablePresent != 0) {
|
|
14212
|
+
if (!isNullOrUndefined(this.contentMaskTable) && (isTablePresent != 0 || this.contentMaskTable)) {
|
|
13842
14213
|
var maskTable = this.contentMaskTable;
|
|
13843
14214
|
remove(maskTable);
|
|
13844
14215
|
this.contentMaskTable = null;
|
|
13845
14216
|
}
|
|
13846
14217
|
isTablePresent = this.element.querySelectorAll('.e-masked-table').length;
|
|
13847
|
-
if (!isNullOrUndefined(this.headerMaskTable) && isTablePresent != 0) {
|
|
14218
|
+
if (!isNullOrUndefined(this.headerMaskTable) && (isTablePresent != 0 || this.headerMaskTable)) {
|
|
13848
14219
|
var maskTable = this.headerMaskTable;
|
|
13849
14220
|
remove(maskTable);
|
|
13850
14221
|
this.headerMaskTable = null;
|
|
@@ -13857,8 +14228,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13857
14228
|
}
|
|
13858
14229
|
if (this.element.querySelectorAll('.' + timelineHeaderTableContainer).length != 0) {
|
|
13859
14230
|
for (var i = 0; i < this.singleTier; i++) {
|
|
13860
|
-
if (!isNullOrUndefined(this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i])) {
|
|
13861
|
-
this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i]['style'].visibility = "visible";
|
|
14231
|
+
if (!isNullOrUndefined(this.element.querySelectorAll('.' + timelineHeaderTableContainer)[parseInt(i.toString(), 10)])) {
|
|
14232
|
+
this.element.querySelectorAll('.' + timelineHeaderTableContainer)[parseInt(i.toString(), 10)]['style'].visibility = "visible";
|
|
13862
14233
|
}
|
|
13863
14234
|
}
|
|
13864
14235
|
}
|
|
@@ -13880,7 +14251,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13880
14251
|
if (this.element.querySelectorAll('.' + timelineHeaderTableContainer).length != 0) {
|
|
13881
14252
|
this.singleTier = this.timelineModule.isSingleTier ? 1 : 2;
|
|
13882
14253
|
for (var i = 0; i < this.singleTier; i++) {
|
|
13883
|
-
this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i]['style'].visibility = "hidden";
|
|
14254
|
+
this.element.querySelectorAll('.' + timelineHeaderTableContainer)[parseInt(i.toString(), 10)]['style'].visibility = "hidden";
|
|
13884
14255
|
}
|
|
13885
14256
|
}
|
|
13886
14257
|
if (this.singleTier === 0) {
|
|
@@ -13999,7 +14370,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13999
14370
|
}
|
|
14000
14371
|
this.topBottomHeader = 0;
|
|
14001
14372
|
for (var i = 0; i < row.length; i++) {
|
|
14002
|
-
tbody.appendChild(this.applyTimelineMaskRow(row[i]));
|
|
14373
|
+
tbody.appendChild(this.applyTimelineMaskRow(row[parseInt(i.toString(), 10)]));
|
|
14003
14374
|
this.topBottomHeader = this.topBottomHeader + 1;
|
|
14004
14375
|
}
|
|
14005
14376
|
table.appendChild(tbody);
|
|
@@ -14013,11 +14384,11 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14013
14384
|
maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
|
|
14014
14385
|
maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
|
|
14015
14386
|
for (var i = 0; i < maskRow.childNodes.length - 1; i++) {
|
|
14016
|
-
maskRow.childNodes[i]['style']['width'] = 166 + 'px';
|
|
14387
|
+
maskRow.childNodes[parseInt(i.toString(), 10)]['style']['width'] = 166 + 'px';
|
|
14017
14388
|
}
|
|
14018
14389
|
var maskCells = [].slice.call(maskRow.childNodes);
|
|
14019
14390
|
for (var i = 0; i < maskCells.length; i++) {
|
|
14020
|
-
var maskCell = maskCells[i];
|
|
14391
|
+
var maskCell = maskCells[parseInt(i.toString(), 10)];
|
|
14021
14392
|
switch (this.topBottomHeader) {
|
|
14022
14393
|
case 0:
|
|
14023
14394
|
if (this.enableRtl) {
|
|
@@ -14034,7 +14405,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14034
14405
|
maskCell.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
|
|
14035
14406
|
var innerMaskCells = [].slice.call(maskCell.childNodes);
|
|
14036
14407
|
for (var i_1 = 0; i_1 < innerMaskCells.length; i_1++) {
|
|
14037
|
-
var htmlInner = innerMaskCells[i_1];
|
|
14408
|
+
var htmlInner = innerMaskCells[parseInt(i_1.toString(), 10)];
|
|
14038
14409
|
if (i_1 === 0) {
|
|
14039
14410
|
if (this.enableRtl) {
|
|
14040
14411
|
htmlInner.innerHTML = '<span class="e-mask e-skeleton e-skeleton-text e-shimmer-wave e-innerHTML"></span>';
|
|
@@ -14086,7 +14457,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14086
14457
|
else if (this.columnLoop === 4) {
|
|
14087
14458
|
this.columnLoop = 1;
|
|
14088
14459
|
}
|
|
14089
|
-
tbody.appendChild(this.applyMaskRow(row[j]));
|
|
14460
|
+
tbody.appendChild(this.applyMaskRow(row[parseInt(j.toString(), 10)]));
|
|
14090
14461
|
}
|
|
14091
14462
|
table.appendChild(tbody);
|
|
14092
14463
|
table.style.width = 100 + '%';
|
|
@@ -14107,7 +14478,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14107
14478
|
}
|
|
14108
14479
|
var maskCells = [].slice.call(maskRow.childNodes);
|
|
14109
14480
|
for (var i = 0; i < maskCells.length; i++) {
|
|
14110
|
-
var maskCell = maskCells[i];
|
|
14481
|
+
var maskCell = maskCells[parseInt(i.toString(), 10)];
|
|
14111
14482
|
switch (this.columnLoop) {
|
|
14112
14483
|
case 1:
|
|
14113
14484
|
if (i === 0) {
|
|
@@ -14205,7 +14576,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14205
14576
|
this.predecessorModule['parentIds'] = [];
|
|
14206
14577
|
this.predecessorModule['parentRecord'] = [];
|
|
14207
14578
|
this.predecessorModule.updatePredecessors();
|
|
14208
|
-
if (this.isInPredecessorValidation && this.enableValidation) {
|
|
14579
|
+
if (this.isInPredecessorValidation && this.enableValidation && this.autoCalculateDateScheduling) {
|
|
14209
14580
|
this.predecessorModule.updatedRecordsDateByPredecessor();
|
|
14210
14581
|
}
|
|
14211
14582
|
}
|
|
@@ -14218,7 +14589,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14218
14589
|
if (this.enableValidation) {
|
|
14219
14590
|
this.dataOperation.updateGanttData();
|
|
14220
14591
|
}
|
|
14221
|
-
this.
|
|
14592
|
+
if (this.allowParentDependency) {
|
|
14593
|
+
this.predecessorModule.updateParentPredecessor();
|
|
14594
|
+
}
|
|
14222
14595
|
if (this.dataSource instanceof Object && isCountRequired(this)) {
|
|
14223
14596
|
var count = getValue('count', this.dataSource);
|
|
14224
14597
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
@@ -14231,7 +14604,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14231
14604
|
if (this.enableValidation) {
|
|
14232
14605
|
this.dataOperation.updateGanttData();
|
|
14233
14606
|
}
|
|
14234
|
-
this.
|
|
14607
|
+
if (this.allowParentDependency) {
|
|
14608
|
+
this.predecessorModule.updateParentPredecessor();
|
|
14609
|
+
}
|
|
14235
14610
|
this.treeGridPane.classList.remove('e-temp-content');
|
|
14236
14611
|
remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
|
|
14237
14612
|
this.notify('dataReady', {});
|
|
@@ -14348,22 +14723,27 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14348
14723
|
* @private
|
|
14349
14724
|
*/
|
|
14350
14725
|
Gantt.prototype.updateContentHeight = function (args) {
|
|
14351
|
-
if (this.
|
|
14352
|
-
|
|
14353
|
-
this.contentHeight = length_1 * this.rowHeight;
|
|
14726
|
+
if (!this.allowTaskbarOverlap && this.viewType === 'ResourceView' && !this.isLoad) {
|
|
14727
|
+
return;
|
|
14354
14728
|
}
|
|
14355
14729
|
else {
|
|
14356
|
-
|
|
14357
|
-
|
|
14358
|
-
|
|
14359
|
-
var chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
|
|
14360
|
-
if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
|
|
14361
|
-
height = chartRow$$1.getBoundingClientRect().height;
|
|
14730
|
+
if (this.virtualScrollModule && this.enableVirtualization && !isNullOrUndefined(args)) {
|
|
14731
|
+
var length_1 = getValue('result.length', args);
|
|
14732
|
+
this.contentHeight = length_1 * this.rowHeight;
|
|
14362
14733
|
}
|
|
14363
14734
|
else {
|
|
14364
|
-
|
|
14735
|
+
var expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
|
|
14736
|
+
this.currentViewData : this.getExpandedRecords(this.currentViewData);
|
|
14737
|
+
var height = void 0;
|
|
14738
|
+
var chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
|
|
14739
|
+
if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
|
|
14740
|
+
height = chartRow$$1.getBoundingClientRect().height;
|
|
14741
|
+
}
|
|
14742
|
+
else {
|
|
14743
|
+
height = this.rowHeight;
|
|
14744
|
+
}
|
|
14745
|
+
this.contentHeight = expandedRecords.length * height;
|
|
14365
14746
|
}
|
|
14366
|
-
this.contentHeight = expandedRecords.length * height;
|
|
14367
14747
|
}
|
|
14368
14748
|
};
|
|
14369
14749
|
/**
|
|
@@ -14879,7 +15259,6 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14879
15259
|
this.chartRowsModule.refreshGanttRows();
|
|
14880
15260
|
break;
|
|
14881
15261
|
case 'includeWeekend':
|
|
14882
|
-
case 'dayWorkingTime':
|
|
14883
15262
|
case 'allowUnscheduledTasks':
|
|
14884
15263
|
case 'holidays':
|
|
14885
15264
|
this.isLoad = true;
|
|
@@ -14972,6 +15351,10 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14972
15351
|
case 'readOnly':
|
|
14973
15352
|
case 'viewType':
|
|
14974
15353
|
case 'taskFields':
|
|
15354
|
+
case 'dayWorkingTime':
|
|
15355
|
+
case 'allowTaskbarDragAndDrop':
|
|
15356
|
+
case 'allowTaskbarOverlap':
|
|
15357
|
+
case 'allowParentDependency':
|
|
14975
15358
|
if (prop === 'locale') {
|
|
14976
15359
|
this.isLocaleChanged = true;
|
|
14977
15360
|
}
|
|
@@ -14986,6 +15369,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14986
15369
|
}
|
|
14987
15370
|
}
|
|
14988
15371
|
if (isRefresh) {
|
|
15372
|
+
if (this.isLoad && this.contentMaskTable) {
|
|
15373
|
+
this.contentMaskTable = null;
|
|
15374
|
+
}
|
|
14989
15375
|
this.refresh();
|
|
14990
15376
|
}
|
|
14991
15377
|
};
|
|
@@ -15113,7 +15499,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15113
15499
|
args: [this]
|
|
15114
15500
|
});
|
|
15115
15501
|
}
|
|
15116
|
-
if (this.allowRowDragAndDrop) {
|
|
15502
|
+
if (this.allowRowDragAndDrop || this.allowTaskbarDragAndDrop) {
|
|
15117
15503
|
modules.push({
|
|
15118
15504
|
member: 'rowDragAndDrop',
|
|
15119
15505
|
args: [this]
|
|
@@ -15648,10 +16034,11 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15648
16034
|
* @param {PdfExportProperties} pdfExportProperties - Defines the export properties of the Gantt.
|
|
15649
16035
|
* @param {isMultipleExport} isMultipleExport - Define to enable multiple export.
|
|
15650
16036
|
* @param {pdfDoc} pdfDoc - Defined the Pdf Document if multiple export is enabled.
|
|
16037
|
+
* @param {boolean} isBlob - If the 'isBlob' parameter is set to true, the method returns PDF data as a blob instead of exporting it as a down-loadable PDF file. The default value is false.
|
|
15651
16038
|
* @returns {Promise<any>} .
|
|
15652
16039
|
*/
|
|
15653
|
-
Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc) {
|
|
15654
|
-
return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc)
|
|
16040
|
+
Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
16041
|
+
return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc, isBlob)
|
|
15655
16042
|
: null;
|
|
15656
16043
|
};
|
|
15657
16044
|
/**
|
|
@@ -15683,7 +16070,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15683
16070
|
* @private
|
|
15684
16071
|
*/
|
|
15685
16072
|
Gantt.prototype.renderWorkingDayCell = function (args) {
|
|
15686
|
-
var includeWeekend = this.taskMode !== 'Auto' ? true : this.includeWeekend ? true : false;
|
|
16073
|
+
var includeWeekend = this.taskMode !== 'Auto' ? true : (this.includeWeekend || !this.autoCalculateDateScheduling) ? true : false;
|
|
15687
16074
|
var nonWorkingDays = !includeWeekend ? this.nonWorkingDayIndex : [];
|
|
15688
16075
|
var holidays = this.totalHolidayDates;
|
|
15689
16076
|
if (nonWorkingDays.length > 0 && nonWorkingDays.indexOf(args.date.getDay()) !== -1) {
|
|
@@ -15693,7 +16080,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15693
16080
|
var tempDate = new Date(args.date.getTime());
|
|
15694
16081
|
tempDate.setHours(0, 0, 0);
|
|
15695
16082
|
if (holidays.indexOf(tempDate.getTime()) !== -1) {
|
|
15696
|
-
|
|
16083
|
+
if (!this.autoCalculateDateScheduling) {
|
|
16084
|
+
args.isDisabled = false;
|
|
16085
|
+
}
|
|
16086
|
+
else {
|
|
16087
|
+
args.isDisabled = true;
|
|
16088
|
+
}
|
|
15697
16089
|
}
|
|
15698
16090
|
}
|
|
15699
16091
|
};
|
|
@@ -15810,12 +16202,17 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15810
16202
|
var id = ganttData.rowUniqueID;
|
|
15811
16203
|
var task = this.getRecordByID(id);
|
|
15812
16204
|
var isValid = false;
|
|
15813
|
-
if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(
|
|
15814
|
-
|
|
16205
|
+
if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(record["" + field]) && (value instanceof Date ? value.getTime() !==
|
|
16206
|
+
record["" + field].getTime() : record["" + field] !== value))) {
|
|
15815
16207
|
isValid = true;
|
|
15816
16208
|
}
|
|
15817
16209
|
if (task && ((this.editedRecords.indexOf(task) === -1 && isValid) || this.editedRecords.length === 0)) {
|
|
15818
|
-
this.
|
|
16210
|
+
if (this.editModule['draggedRecord'] && this.editModule['draggedRecord'].ganttProperties.taskId === ganttData.taskId) {
|
|
16211
|
+
this.editedRecords.splice(0, 0, task);
|
|
16212
|
+
}
|
|
16213
|
+
else {
|
|
16214
|
+
this.editedRecords.push(task);
|
|
16215
|
+
}
|
|
15819
16216
|
if (this.enableImmutableMode) {
|
|
15820
16217
|
this.modifiedRecords.push(task);
|
|
15821
16218
|
}
|
|
@@ -16758,6 +17155,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
16758
17155
|
__decorate([
|
|
16759
17156
|
Property(false)
|
|
16760
17157
|
], Gantt.prototype, "enableImmutableMode", void 0);
|
|
17158
|
+
__decorate([
|
|
17159
|
+
Property(true)
|
|
17160
|
+
], Gantt.prototype, "allowParentDependency", void 0);
|
|
17161
|
+
__decorate([
|
|
17162
|
+
Property(false)
|
|
17163
|
+
], Gantt.prototype, "enableHtmlSanitizer", void 0);
|
|
16761
17164
|
__decorate([
|
|
16762
17165
|
Property(true)
|
|
16763
17166
|
], Gantt.prototype, "disableHtmlEncode", void 0);
|
|
@@ -16767,6 +17170,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
16767
17170
|
__decorate([
|
|
16768
17171
|
Property(true)
|
|
16769
17172
|
], Gantt.prototype, "enableVirtualMaskRow", void 0);
|
|
17173
|
+
__decorate([
|
|
17174
|
+
Property(true)
|
|
17175
|
+
], Gantt.prototype, "UpdateOffsetOnTaskbarEdit", void 0);
|
|
17176
|
+
__decorate([
|
|
17177
|
+
Property(true)
|
|
17178
|
+
], Gantt.prototype, "autoCalculateDateScheduling", void 0);
|
|
16770
17179
|
__decorate([
|
|
16771
17180
|
Property(true)
|
|
16772
17181
|
], Gantt.prototype, "autoFocusTasks", void 0);
|
|
@@ -16815,6 +17224,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
16815
17224
|
__decorate([
|
|
16816
17225
|
Property(false)
|
|
16817
17226
|
], Gantt.prototype, "renderBaseline", void 0);
|
|
17227
|
+
__decorate([
|
|
17228
|
+
Property(false)
|
|
17229
|
+
], Gantt.prototype, "allowTaskbarDragAndDrop", void 0);
|
|
17230
|
+
__decorate([
|
|
17231
|
+
Property(true)
|
|
17232
|
+
], Gantt.prototype, "allowTaskbarOverlap", void 0);
|
|
16818
17233
|
__decorate([
|
|
16819
17234
|
Property('Horizontal')
|
|
16820
17235
|
], Gantt.prototype, "gridLines", void 0);
|
|
@@ -17260,8 +17675,10 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
17260
17675
|
}
|
|
17261
17676
|
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
17262
17677
|
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
17263
|
-
|| field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
17264
|
-
|
|
17678
|
+
|| field === taskSettings.dependency || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
17679
|
+
if ((field === taskSettings.dependency && !this.parent.allowParentDependency) || field !== taskSettings.dependency) {
|
|
17680
|
+
args.cancel = true;
|
|
17681
|
+
}
|
|
17265
17682
|
}
|
|
17266
17683
|
else {
|
|
17267
17684
|
var callBackPromise_1 = new Deferred();
|
|
@@ -17311,7 +17728,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
17311
17728
|
};
|
|
17312
17729
|
CellEdit.prototype.isValueChange = function (args, field) {
|
|
17313
17730
|
var data = getValue('data', args);
|
|
17314
|
-
var editedValue = data[field];
|
|
17731
|
+
var editedValue = data["" + field];
|
|
17315
17732
|
var previousValue = getValue('previousData', args);
|
|
17316
17733
|
if ((isNullOrUndefined(editedValue) && !isNullOrUndefined(previousValue)) || (!isNullOrUndefined(editedValue) && isNullOrUndefined(previousValue))) {
|
|
17317
17734
|
return true;
|
|
@@ -17479,7 +17896,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
17479
17896
|
var ganttSegments = [];
|
|
17480
17897
|
var segments = ganttProp.segments;
|
|
17481
17898
|
for (var i = 0; i < segments.length; i++) {
|
|
17482
|
-
var segment = segments[i];
|
|
17899
|
+
var segment = segments[parseInt(i.toString(), 10)];
|
|
17483
17900
|
var endDate = segment.endDate;
|
|
17484
17901
|
endDate = (!isNullOrUndefined(ganttProp.endDate)) && endDate.getTime() <
|
|
17485
17902
|
ganttProp.endDate.getTime() && i !== segments.length - 1 ? endDate : ganttProp.endDate;
|
|
@@ -17678,7 +18095,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
17678
18095
|
}
|
|
17679
18096
|
}
|
|
17680
18097
|
if (!isNullOrUndefined(index) && index !== -1) {
|
|
17681
|
-
editedResources.push(previousResource[index]);
|
|
18098
|
+
editedResources.push(previousResource[parseInt(index.toString(), 10)]);
|
|
17682
18099
|
}
|
|
17683
18100
|
else {
|
|
17684
18101
|
var resource = resourceData.filter(function (resourceInfo) {
|
|
@@ -17740,7 +18157,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
17740
18157
|
CellEdit.prototype.typeEdited = function (args, editedObj) {
|
|
17741
18158
|
var key = 'taskType';
|
|
17742
18159
|
var ganttProb = args.data.ganttProperties;
|
|
17743
|
-
var taskType = editedObj[key];
|
|
18160
|
+
var taskType = editedObj["" + key];
|
|
17744
18161
|
this.parent.setRecordValue('taskType', taskType, ganttProb, true);
|
|
17745
18162
|
//this.parent.dataOperation.updateMappingData(args.data, 'taskType');
|
|
17746
18163
|
this.updateEditedRecord(args);
|
|
@@ -17850,15 +18267,12 @@ var EditTooltip = /** @__PURE__ @class */ (function () {
|
|
|
17850
18267
|
this.parent.tooltipModule.toolTipObj.close();
|
|
17851
18268
|
this.updateTooltip(segmentIndex);
|
|
17852
18269
|
if (this.taskbarEdit.connectorSecondAction === 'ConnectorPointLeftDrag') {
|
|
17853
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
17854
18270
|
this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector('.' + connectorPointLeft));
|
|
17855
18271
|
}
|
|
17856
18272
|
else if (this.taskbarEdit.connectorSecondAction === 'ConnectorPointRightDrag') {
|
|
17857
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
17858
18273
|
this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector('.' + connectorPointRight));
|
|
17859
18274
|
}
|
|
17860
18275
|
else {
|
|
17861
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
17862
18276
|
this.toolTipObj.open(this.taskbarEdit.taskBarEditElement);
|
|
17863
18277
|
}
|
|
17864
18278
|
}
|
|
@@ -18049,6 +18463,10 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18049
18463
|
_this.elementOffsetWidth = 0;
|
|
18050
18464
|
_this.elementOffsetHeight = 0;
|
|
18051
18465
|
_this.segmentIndex = -1;
|
|
18466
|
+
_this.currentItemTop = 0;
|
|
18467
|
+
_this.currentItemPrevTop = 0;
|
|
18468
|
+
_this.topValue = 0;
|
|
18469
|
+
_this.draggedRecordMarginTop = 0;
|
|
18052
18470
|
_this.parent = ganttObj;
|
|
18053
18471
|
_this.initPublicProp();
|
|
18054
18472
|
_this.wireEvents();
|
|
@@ -18291,7 +18709,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18291
18709
|
if (!isNullOrUndefined(parentRecord) && !parentRecord.expanded) {
|
|
18292
18710
|
this.prevZIndex = (this.taskBarEditElement).style.zIndex;
|
|
18293
18711
|
(this.taskBarEditElement).style.zIndex = '1000';
|
|
18294
|
-
|
|
18712
|
+
if (this.taskBarEditElement.querySelector('.e-gantt-child-taskbar')) {
|
|
18713
|
+
addClass([this.taskBarEditElement.querySelector('.e-gantt-child-taskbar')], 'e-collapsed-taskbar-drag');
|
|
18714
|
+
}
|
|
18295
18715
|
}
|
|
18296
18716
|
}
|
|
18297
18717
|
}
|
|
@@ -18455,9 +18875,20 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18455
18875
|
this.parent.ganttChartModule.scrollObject.previousScroll.left;
|
|
18456
18876
|
}
|
|
18457
18877
|
this.tooltipPositionX = this.mouseDownX;
|
|
18458
|
-
this.mouseDownY = e.pageY - containerPosition.top +
|
|
18878
|
+
this.mouseDownY = this.dragMoveY = e.pageY - containerPosition.top +
|
|
18459
18879
|
this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
18460
18880
|
}
|
|
18881
|
+
if (this.parent.viewType == "ResourceView" && this.parent.allowTaskbarDragAndDrop) {
|
|
18882
|
+
var toolbarHeight = 0;
|
|
18883
|
+
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|
|
18884
|
+
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
18885
|
+
}
|
|
18886
|
+
this.topValue = this.parent.getOffsetRect(event.target).top - this.parent.getOffsetRect(this.parent.element).top -
|
|
18887
|
+
parseInt((closest(event.target, '.e-taskbar-main-container'))['style'].marginTop) -
|
|
18888
|
+
this.parent.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'] -
|
|
18889
|
+
toolbarHeight + document.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollTop;
|
|
18890
|
+
this.currentItemPrevTop = this.currentItemTop = this.topValue;
|
|
18891
|
+
}
|
|
18461
18892
|
if (this.taskBarEditAction === 'ConnectorPointLeftDrag' || this.taskBarEditAction === 'ConnectorPointRightDrag') {
|
|
18462
18893
|
this.fromPredecessorText = this.taskBarEditAction === 'ConnectorPointLeftDrag' ? 'start' : 'finish';
|
|
18463
18894
|
this.parent.connectorLineModule.tooltipTable.innerHTML = this.parent.connectorLineModule.getConnectorLineTooltipInnerTd(this.taskBarEditRecord.ganttProperties.taskName, this.fromPredecessorText, '', '');
|
|
@@ -18589,6 +19020,22 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18589
19020
|
this.drawFalseLine();
|
|
18590
19021
|
}
|
|
18591
19022
|
}
|
|
19023
|
+
if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
|
|
19024
|
+
if (this.dragMoveY > this.mouseMoveY) {
|
|
19025
|
+
this.mouseMoveY = this.dragMoveY - this.mouseMoveY;
|
|
19026
|
+
this.currentItemTop = this.currentItemTop - this.mouseMoveY;
|
|
19027
|
+
}
|
|
19028
|
+
else {
|
|
19029
|
+
this.mouseMoveY -= this.dragMoveY;
|
|
19030
|
+
this.currentItemTop = this.currentItemTop + this.mouseMoveY;
|
|
19031
|
+
}
|
|
19032
|
+
var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
|
|
19033
|
+
this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
19034
|
+
this.topValue = this.currentItemTop;
|
|
19035
|
+
this.currentItemPrevTop = (this.currentItemPrevTop === 0 ||
|
|
19036
|
+
this.topValue == this.currentItemTop) ? this.topValue :
|
|
19037
|
+
this.currentItemPrevTop;
|
|
19038
|
+
}
|
|
18592
19039
|
this.setItemPosition();
|
|
18593
19040
|
this.updateEditedItem();
|
|
18594
19041
|
this.editTooltip.updateTooltip(this.segmentIndex);
|
|
@@ -18668,12 +19115,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18668
19115
|
this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.left;
|
|
18669
19116
|
this.startScrollTimer('left');
|
|
18670
19117
|
}
|
|
18671
|
-
else if (
|
|
19118
|
+
else if (((mouseY + 80) >
|
|
18672
19119
|
containerPosition.top + this.parent.ganttChartModule.chartBodyContainer.offsetHeight)) {
|
|
18673
19120
|
this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
18674
19121
|
this.startScrollTimer('bottom');
|
|
18675
19122
|
}
|
|
18676
|
-
else if (
|
|
19123
|
+
else if (((mouseY - 20) < containerPosition.top)) {
|
|
18677
19124
|
this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
18678
19125
|
this.startScrollTimer('top');
|
|
18679
19126
|
}
|
|
@@ -19459,6 +19906,11 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19459
19906
|
taskBarMainContainer$$1.style.width = (width) + 'px';
|
|
19460
19907
|
leftLabelContainer$$1.style.width = (item.left) + 'px';
|
|
19461
19908
|
taskBarMainContainer$$1.style.setProperty(position, (item.left) + 'px');
|
|
19909
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.parent.rowDragAndDropModule &&
|
|
19910
|
+
(this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'MilestoneDrag')) {
|
|
19911
|
+
taskBarMainContainer$$1.style.setProperty('top', (this.topValue) + 'px');
|
|
19912
|
+
taskBarMainContainer$$1.style.zIndex = '4';
|
|
19913
|
+
}
|
|
19462
19914
|
if (this.taskBarEditAction === 'LeftResizing' && this.segmentIndex === 0) {
|
|
19463
19915
|
var parent_1 = this.taskBarEditElement.parentElement;
|
|
19464
19916
|
var segmentedTasks = parent_1.getElementsByClassName('e-segmented-taskbar');
|
|
@@ -19571,7 +20023,8 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19571
20023
|
this.previousMouseMove = null;
|
|
19572
20024
|
this.editTooltip.showHideTaskbarEditTooltip(false, this.segmentIndex);
|
|
19573
20025
|
if (this.taskBarEditAction && this.isMouseDragged) {
|
|
19574
|
-
if (!this.dragMouseLeave && this.taskBarEditedAction)
|
|
20026
|
+
if ((!this.dragMouseLeave && this.taskBarEditedAction) || (this.parent.viewType === 'ResourceView' &&
|
|
20027
|
+
this.parent.allowTaskbarDragAndDrop)) {
|
|
19575
20028
|
this.taskBarEditedAction(e);
|
|
19576
20029
|
this.isMouseDragged = false;
|
|
19577
20030
|
}
|
|
@@ -19680,6 +20133,65 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19680
20133
|
var args = extend({}, arg);
|
|
19681
20134
|
var ganttRecord = args.data;
|
|
19682
20135
|
var taskData = ganttRecord.ganttProperties;
|
|
20136
|
+
var draggedRecIndex = this.parent.currentViewData.indexOf(ganttRecord);
|
|
20137
|
+
if ((args.taskBarEditAction === 'MilestoneDrag' || args.taskBarEditAction === 'ChildDrag') && this.parent.viewType === "ResourceView"
|
|
20138
|
+
&& this.parent.allowTaskbarDragAndDrop && this.dragMoveY > 0) {
|
|
20139
|
+
if (this.parent.rowDragAndDropModule) {
|
|
20140
|
+
var flatRecordCol = this.parent.currentViewData;
|
|
20141
|
+
if (flatRecordCol[this.taskBarEditRecord.parentItem.index] && ((this.parent.editedRecords.indexOf(flatRecordCol[this.taskBarEditRecord.parentItem.index]) === -1))) {
|
|
20142
|
+
this.parent.editedRecords.push(flatRecordCol[this.taskBarEditRecord.parentItem.index]);
|
|
20143
|
+
}
|
|
20144
|
+
var ganttrec = void 0;
|
|
20145
|
+
var resHeight = 0;
|
|
20146
|
+
var rowCount = 0;
|
|
20147
|
+
var childIndex_1;
|
|
20148
|
+
var droppedRecord = void 0;
|
|
20149
|
+
var treeGridrows = this.parent.treeGrid.getRows().length;
|
|
20150
|
+
for (var i = 0; i < treeGridrows; i++) {
|
|
20151
|
+
if (resHeight < this.dragMoveY && this.parent.getRowByIndex(i).style.display !== 'none') {
|
|
20152
|
+
rowCount = i;
|
|
20153
|
+
resHeight = resHeight + parseInt(this.parent.getRowByIndex(i).style.height);
|
|
20154
|
+
if (!flatRecordCol[i].parentItem) {
|
|
20155
|
+
ganttrec = flatRecordCol[i];
|
|
20156
|
+
}
|
|
20157
|
+
else {
|
|
20158
|
+
ganttrec = this.parent.getRecordByID(flatRecordCol[i].parentItem.taskId);
|
|
20159
|
+
}
|
|
20160
|
+
}
|
|
20161
|
+
}
|
|
20162
|
+
var draggedRecordtaskbar = this.parent.getRowByIndex(draggedRecIndex).getElementsByClassName('e-taskbar-main-container');
|
|
20163
|
+
var taskbarContainer = this.parent.getRowByIndex(rowCount).getElementsByClassName('e-taskbar-main-container');
|
|
20164
|
+
for (var j = 0; j < taskbarContainer.length; j++) {
|
|
20165
|
+
if (taskbarContainer[j]['offsetTop'] < this.dragMoveY && draggedRecordtaskbar[0].getAttribute('rowuniqueid') !==
|
|
20166
|
+
taskbarContainer[j].getAttribute('rowuniqueid')) {
|
|
20167
|
+
this.draggedRecordMarginTop = taskbarContainer[j]['style'].marginTop;
|
|
20168
|
+
childIndex_1 = taskbarContainer[j].getAttribute('rowuniqueid');
|
|
20169
|
+
}
|
|
20170
|
+
}
|
|
20171
|
+
if (childIndex_1) {
|
|
20172
|
+
droppedRecord = this.parent.currentViewData.filter(function (data) {
|
|
20173
|
+
if (data['rowUniqueID'] === childIndex_1) {
|
|
20174
|
+
return data;
|
|
20175
|
+
}
|
|
20176
|
+
else {
|
|
20177
|
+
return null;
|
|
20178
|
+
}
|
|
20179
|
+
});
|
|
20180
|
+
}
|
|
20181
|
+
if (droppedRecord) {
|
|
20182
|
+
var droppedRecordIndex = this.parent.currentViewData.indexOf(droppedRecord[0]);
|
|
20183
|
+
var position = (droppedRecord[0].hasChildRecords || (!droppedRecord[0].parentItem &&
|
|
20184
|
+
droppedRecord[0].childRecords.length == 0)) ? 'child' : 'below';
|
|
20185
|
+
if (this.parent.rowDragAndDropModule) {
|
|
20186
|
+
this.parent.rowDragAndDropModule.reorderRows([draggedRecIndex], droppedRecordIndex, position);
|
|
20187
|
+
}
|
|
20188
|
+
this.dragMoveY = 0;
|
|
20189
|
+
}
|
|
20190
|
+
}
|
|
20191
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation) {
|
|
20192
|
+
this.parent.ganttChartModule.renderOverAllocationContainer();
|
|
20193
|
+
}
|
|
20194
|
+
}
|
|
19683
20195
|
if (args.taskBarEditAction === 'ProgressResizing') {
|
|
19684
20196
|
if (args.previousData.progress !== taskData.progress) {
|
|
19685
20197
|
this.parent.setRecordValue('progress', this.getProgressPercent(taskData.width, taskData.progressWidth), taskData, true);
|
|
@@ -19871,14 +20383,20 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19871
20383
|
}
|
|
19872
20384
|
if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
|
|
19873
20385
|
!this.elementOffsetLeft) || !this.parent.enableVirtualization) {
|
|
19874
|
-
if (this.
|
|
19875
|
-
this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
|
|
19876
|
-
this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
19877
|
-
}
|
|
19878
|
-
else {
|
|
20386
|
+
if (!this.parent.allowParentDependency) {
|
|
19879
20387
|
this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
|
|
19880
20388
|
this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
|
|
19881
20389
|
}
|
|
20390
|
+
else {
|
|
20391
|
+
if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
|
|
20392
|
+
this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
|
|
20393
|
+
this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
20394
|
+
}
|
|
20395
|
+
else {
|
|
20396
|
+
this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
|
|
20397
|
+
this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
|
|
20398
|
+
}
|
|
20399
|
+
}
|
|
19882
20400
|
this.elementOffsetWidth = this.taskBarEditElement.offsetWidth;
|
|
19883
20401
|
this.elementOffsetHeight = this.taskBarEditElement.offsetHeight;
|
|
19884
20402
|
}
|
|
@@ -20897,7 +21415,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20897
21415
|
targetId = inputElement.querySelector('input').getAttribute('id');
|
|
20898
21416
|
inputElement = inputElement.querySelector('#' + targetId);
|
|
20899
21417
|
}
|
|
20900
|
-
else if (!isNullOrUndefined(args.event) && !isNullOrUndefined(args.event.path[1])
|
|
21418
|
+
else if (!isNullOrUndefined(args.event) && !isNullOrUndefined(args.event.path) && !isNullOrUndefined(args.event.path)[1]) {
|
|
20901
21419
|
inputElement = args.event.path[1];
|
|
20902
21420
|
targetId = inputElement.querySelector('input').getAttribute('id');
|
|
20903
21421
|
inputElement = inputElement.querySelector('#' + targetId);
|
|
@@ -20936,6 +21454,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20936
21454
|
if (!isNullOrUndefined(tasks.startDate) && tasks.startDate !== colName) {
|
|
20937
21455
|
this.updateScheduleFields(dialog, ganttProp, 'startDate');
|
|
20938
21456
|
}
|
|
21457
|
+
if (tasks.endDate === colName && !isNullOrUndefined(ganttProp.startDate) && !isNullOrUndefined(args.value) && ganttProp.startDate.getTime() > args.value) {
|
|
21458
|
+
this.updateScheduleFields(dialog, ganttProp, 'endDate');
|
|
21459
|
+
}
|
|
20939
21460
|
if (!isNullOrUndefined(tasks.endDate) && tasks.endDate !== colName) {
|
|
20940
21461
|
this.updateScheduleFields(dialog, ganttProp, 'endDate');
|
|
20941
21462
|
}
|
|
@@ -21126,6 +21647,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
21126
21647
|
if (taskSettings.endDate === columnName) {
|
|
21127
21648
|
if (value !== '') {
|
|
21128
21649
|
var endDate = this.parent.dateValidationModule.getDateFromFormat(value);
|
|
21650
|
+
if (isNullOrUndefined(ganttProp.startDate) && isNullOrUndefined(endDate) && ganttProp.startDate.getTime() > endDate.getTime()) {
|
|
21651
|
+
endDate = ganttProp.endDate;
|
|
21652
|
+
}
|
|
21129
21653
|
if (endDate.getHours() === 0 && ganttObj.defaultEndTime !== 86400) {
|
|
21130
21654
|
this.parent.dateValidationModule.setTime(ganttObj.defaultEndTime, endDate);
|
|
21131
21655
|
}
|
|
@@ -21508,6 +22032,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
21508
22032
|
item.content = this.renderGeneralTab(item.content);
|
|
21509
22033
|
}
|
|
21510
22034
|
else if (item.content === 'Dependency') {
|
|
22035
|
+
if (this.editedRecord.hasChildRecords && !this.parent.allowParentDependency) {
|
|
22036
|
+
item.disabled = true;
|
|
22037
|
+
}
|
|
21511
22038
|
item.content = this.renderPredecessorTab(item.content);
|
|
21512
22039
|
}
|
|
21513
22040
|
else if (item.content === 'Resources') {
|
|
@@ -21969,27 +22496,34 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
21969
22496
|
this.preTableCollection = [];
|
|
21970
22497
|
for (var i = 0; i < flatData.length; i++) {
|
|
21971
22498
|
var data = flatData[i];
|
|
21972
|
-
|
|
21973
|
-
|
|
21974
|
-
this.
|
|
21975
|
-
|
|
21976
|
-
|
|
21977
|
-
|
|
21978
|
-
|
|
21979
|
-
|
|
21980
|
-
|
|
21981
|
-
this.
|
|
21982
|
-
|
|
22499
|
+
if (this.parent.allowParentDependency) {
|
|
22500
|
+
var currentFlatData = data;
|
|
22501
|
+
if (data.parentUniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
|
|
22502
|
+
this.isValidData = false;
|
|
22503
|
+
}
|
|
22504
|
+
else {
|
|
22505
|
+
do {
|
|
22506
|
+
if (currentFlatData.parentItem) {
|
|
22507
|
+
currentFlatData = this.parent.flatData[this.parent.ids.indexOf(currentFlatData.parentItem.taskId)];
|
|
22508
|
+
if (currentFlatData.uniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
|
|
22509
|
+
this.isValidData = false;
|
|
22510
|
+
break;
|
|
22511
|
+
}
|
|
21983
22512
|
}
|
|
21984
|
-
}
|
|
21985
|
-
}
|
|
21986
|
-
|
|
21987
|
-
|
|
21988
|
-
|
|
22513
|
+
} while (currentFlatData.parentItem);
|
|
22514
|
+
}
|
|
22515
|
+
if (data.hasChildRecords && this.isValidData) {
|
|
22516
|
+
this.isValidData = this.isParentValid(data.childRecords);
|
|
22517
|
+
}
|
|
22518
|
+
if (!this.isValidData) {
|
|
22519
|
+
this.isValidData = true;
|
|
22520
|
+
continue;
|
|
22521
|
+
}
|
|
21989
22522
|
}
|
|
21990
|
-
|
|
21991
|
-
|
|
21992
|
-
|
|
22523
|
+
else {
|
|
22524
|
+
if (data.hasChildRecords) {
|
|
22525
|
+
continue;
|
|
22526
|
+
}
|
|
21993
22527
|
}
|
|
21994
22528
|
var taskId = this.parent.viewType === 'ResourceView' ? data.ganttProperties.taskId.toString()
|
|
21995
22529
|
: data.ganttProperties.rowUniqueID.toString();
|
|
@@ -22226,6 +22760,10 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
22226
22760
|
}
|
|
22227
22761
|
else {
|
|
22228
22762
|
tasksData[fieldName] = controlObj.value;
|
|
22763
|
+
if (this.parent.enableHtmlSanitizer && typeof (controlObj.value) === 'string') {
|
|
22764
|
+
controlObj.value = SanitizeHtmlHelper.sanitize(controlObj.value);
|
|
22765
|
+
tasksData[fieldName] = controlObj.value;
|
|
22766
|
+
}
|
|
22229
22767
|
}
|
|
22230
22768
|
}
|
|
22231
22769
|
}
|
|
@@ -22509,9 +23047,10 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
22509
23047
|
var from = 'from';
|
|
22510
23048
|
var to = 'to';
|
|
22511
23049
|
this.parent.connectorLineModule.removeConnectorLineById('parent' + predecessor[from] + 'child' + predecessor[to]);
|
|
22512
|
-
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[from]);
|
|
22513
|
-
childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[to]);
|
|
22514
|
-
if (parentGanttRecord
|
|
23050
|
+
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor["" + from]);
|
|
23051
|
+
childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor["" + to]);
|
|
23052
|
+
if ((!this.parent.allowParentDependency && (parentGanttRecord && parentGanttRecord.expanded === true) ||
|
|
23053
|
+
(childGanttRecord && childGanttRecord.expanded === true)) || (this.parent.allowParentDependency && (parentGanttRecord || childGanttRecord))) {
|
|
22515
23054
|
connectorObj =
|
|
22516
23055
|
this.parent.predecessorModule.updateConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
|
|
22517
23056
|
if (!isNullOrUndefined(connectorObj)) {
|
|
@@ -22562,8 +23101,8 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
22562
23101
|
if (!isNullOrUndefined(values[0])) {
|
|
22563
23102
|
var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
22564
23103
|
if (ids.indexOf(values[0]) === -1) {
|
|
22565
|
-
if (values[0].indexOf(
|
|
22566
|
-
match = values[0].split(
|
|
23104
|
+
if (values[0].indexOf(' ') !== -1) {
|
|
23105
|
+
match = values[0].split(' ');
|
|
22567
23106
|
if (match.length === 1) {
|
|
22568
23107
|
match = values[0].match(/(\d+|[A-z]+)/g);
|
|
22569
23108
|
}
|
|
@@ -22642,7 +23181,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
22642
23181
|
var parentRec = rec;
|
|
22643
23182
|
if (rec.parentItem) {
|
|
22644
23183
|
parentRec = this.parent.flatData.filter(function (item) {
|
|
22645
|
-
return item.uniqueID
|
|
23184
|
+
return item.uniqueID === rec.parentUniqueID;
|
|
22646
23185
|
})[0];
|
|
22647
23186
|
if (parentRec.parentItem) {
|
|
22648
23187
|
parentRec = this.getRootParent(parentRec);
|
|
@@ -22723,11 +23262,20 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
22723
23262
|
if (!isNullOrUndefined(predecessorString) && predecessorString.length > 0) {
|
|
22724
23263
|
predecessorIdArray = this.idFromPredecessor(predecessorString);
|
|
22725
23264
|
var _loop_2 = function (count) {
|
|
22726
|
-
|
|
22727
|
-
|
|
22728
|
-
var
|
|
22729
|
-
if (
|
|
22730
|
-
|
|
23265
|
+
//Check edited item has parent item in predecessor collection
|
|
23266
|
+
if (!this_2.parent.allowParentDependency) {
|
|
23267
|
+
var checkParent = this_2.checkParentRelation(ganttRecord, predecessorIdArray);
|
|
23268
|
+
if (!checkParent) {
|
|
23269
|
+
return { value: false };
|
|
23270
|
+
}
|
|
23271
|
+
}
|
|
23272
|
+
else {
|
|
23273
|
+
if (parseInt(predecessorIdArray[predecessorIdArray.length - 1]) !== ganttRecord[this_2.parent.taskFields.id]) {
|
|
23274
|
+
var num = this_2.parent.ids.indexOf(predecessorIdArray[predecessorIdArray.length - 1]);
|
|
23275
|
+
var fromRecord = this_2.parent.currentViewData[num];
|
|
23276
|
+
if (fromRecord && ganttRecord) {
|
|
23277
|
+
flag = this_2.validateParentPredecessor(fromRecord, ganttRecord);
|
|
23278
|
+
}
|
|
22731
23279
|
}
|
|
22732
23280
|
}
|
|
22733
23281
|
// Check if predecessor exist more then one
|
|
@@ -22977,7 +23525,9 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
22977
23525
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
22978
23526
|
}
|
|
22979
23527
|
else if (args.validateMode.preserveLinkWithEditing) {
|
|
22980
|
-
this.
|
|
23528
|
+
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
23529
|
+
this.calculateOffset(ganttRecord);
|
|
23530
|
+
}
|
|
22981
23531
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
22982
23532
|
}
|
|
22983
23533
|
};
|
|
@@ -23008,7 +23558,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
23008
23558
|
var prevPredecessor = extend([], record.ganttProperties.predecessor, [], true);
|
|
23009
23559
|
var validPredecessor = this.parent.predecessorModule.getValidPredecessor(record);
|
|
23010
23560
|
for (var i = 0; i < validPredecessor.length; i++) {
|
|
23011
|
-
var predecessor = validPredecessor[i];
|
|
23561
|
+
var predecessor = validPredecessor[parseInt(i.toString(), 10)];
|
|
23012
23562
|
var parentTask = this.parent.connectorLineModule.getRecordByID(predecessor.from);
|
|
23013
23563
|
var offset = void 0;
|
|
23014
23564
|
if (isScheduledTask(parentTask.ganttProperties) && isScheduledTask(record.ganttProperties)) {
|
|
@@ -23088,7 +23638,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
23088
23638
|
var parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
|
|
23089
23639
|
var index = getIndex(predecessor[i], 'from', prevPredecessor, 'to');
|
|
23090
23640
|
prevPredecessor.splice(index, 1);
|
|
23091
|
-
var parentIndex = getIndex(predecessor[i], 'from', parentPredecessor, 'to');
|
|
23641
|
+
var parentIndex = getIndex(predecessor[parseInt(i.toString(), 10)], 'from', parentPredecessor, 'to');
|
|
23092
23642
|
parentPredecessor.splice(parentIndex, 1);
|
|
23093
23643
|
this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
|
|
23094
23644
|
}
|
|
@@ -23199,41 +23749,41 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
23199
23749
|
var violationType = null;
|
|
23200
23750
|
if (predecessor[i].type === 'FS') {
|
|
23201
23751
|
if (ganttTaskData.startDate < startDate) {
|
|
23202
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23752
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
23203
23753
|
violationType = 'taskBeforePredecessor_FS';
|
|
23204
23754
|
}
|
|
23205
23755
|
else if (ganttTaskData.startDate > startDate) {
|
|
23206
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23756
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
23207
23757
|
violationType = 'taskAfterPredecessor_FS';
|
|
23208
23758
|
}
|
|
23209
23759
|
}
|
|
23210
23760
|
else if (predecessor[i].type === 'SS') {
|
|
23211
23761
|
if (ganttTaskData.startDate < startDate) {
|
|
23212
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23762
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
23213
23763
|
violationType = 'taskBeforePredecessor_SS';
|
|
23214
23764
|
}
|
|
23215
23765
|
else if (ganttTaskData.startDate > startDate) {
|
|
23216
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23766
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
23217
23767
|
violationType = 'taskAfterPredecessor_SS';
|
|
23218
23768
|
}
|
|
23219
23769
|
}
|
|
23220
23770
|
else if (predecessor[i].type === 'FF') {
|
|
23221
23771
|
if (endDate <= parentGanttRecord.ganttProperties.endDate) {
|
|
23222
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23772
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
23223
23773
|
violationType = 'taskBeforePredecessor_FF';
|
|
23224
23774
|
}
|
|
23225
23775
|
else if (endDate > parentGanttRecord.ganttProperties.endDate) {
|
|
23226
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23776
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
23227
23777
|
violationType = 'taskAfterPredecessor_FF';
|
|
23228
23778
|
}
|
|
23229
23779
|
}
|
|
23230
23780
|
else if (predecessor[i].type === 'SF') {
|
|
23231
23781
|
if (endDate < parentGanttRecord.ganttProperties.startDate) {
|
|
23232
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23782
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
23233
23783
|
violationType = 'taskBeforePredecessor_SF';
|
|
23234
23784
|
}
|
|
23235
23785
|
else if (endDate >= parentGanttRecord.ganttProperties.startDate) {
|
|
23236
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23786
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
23237
23787
|
violationType = 'taskAfterPredecessor_SF';
|
|
23238
23788
|
}
|
|
23239
23789
|
}
|
|
@@ -23264,13 +23814,13 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
23264
23814
|
var prevPredecessor = prevData.ganttProperties.predecessor;
|
|
23265
23815
|
if (!isNullOrUndefined(prevPredecessor)) {
|
|
23266
23816
|
for (var p = 0; p < prevPredecessor.length; p++) {
|
|
23267
|
-
var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(prevPredecessor[p].from);
|
|
23817
|
+
var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(prevPredecessor[parseInt(p.toString(), 10)].from);
|
|
23268
23818
|
if (parentGanttRecord === data) {
|
|
23269
|
-
data.ganttProperties.predecessor.push(prevPredecessor[p]);
|
|
23819
|
+
data.ganttProperties.predecessor.push(prevPredecessor[parseInt(p.toString(), 10)]);
|
|
23270
23820
|
}
|
|
23271
23821
|
else {
|
|
23272
23822
|
var parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
|
|
23273
|
-
var parentIndex = getIndex(prevPredecessor[p], 'from', parentPredecessor, 'to');
|
|
23823
|
+
var parentIndex = getIndex(prevPredecessor[parseInt(p.toString(), 10)], 'from', parentPredecessor, 'to');
|
|
23274
23824
|
if (parentIndex !== -1) {
|
|
23275
23825
|
parentPredecessor.splice(parentIndex, 1);
|
|
23276
23826
|
this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
|
|
@@ -23280,9 +23830,9 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
23280
23830
|
}
|
|
23281
23831
|
if (!isNullOrUndefined(newPredecessor)) {
|
|
23282
23832
|
for (var n = 0; n < newPredecessor.length; n++) {
|
|
23283
|
-
var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(newPredecessor[n].from);
|
|
23833
|
+
var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(newPredecessor[parseInt(n.toString(), 10)].from);
|
|
23284
23834
|
var parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
|
|
23285
|
-
parentPredecessor.push(newPredecessor[n]);
|
|
23835
|
+
parentPredecessor.push(newPredecessor[parseInt(n.toString(), 10)]);
|
|
23286
23836
|
this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
|
|
23287
23837
|
}
|
|
23288
23838
|
}
|
|
@@ -23745,7 +24295,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23745
24295
|
for (var _i = 0, _b = Object.keys(data); _i < _b.length; _i++) {
|
|
23746
24296
|
var key = _b[_i];
|
|
23747
24297
|
if ([tasks.startDate, tasks.endDate, tasks.duration].indexOf(key) !== -1) {
|
|
23748
|
-
if (isNullOrUndefined(data[key]) && !ganttObj.allowUnscheduledTasks) {
|
|
24298
|
+
if (isNullOrUndefined(data["" + key]) && !ganttObj.allowUnscheduledTasks) {
|
|
23749
24299
|
continue;
|
|
23750
24300
|
}
|
|
23751
24301
|
if (isFromDialog) {
|
|
@@ -23800,7 +24350,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23800
24350
|
else if (key === tasks.name) {
|
|
23801
24351
|
ganttPropKey = 'taskName';
|
|
23802
24352
|
}
|
|
23803
|
-
else if (key === tasks.segments) {
|
|
24353
|
+
else if ((key === tasks.segments) && (!isNullOrUndefined(ganttData.ganttProperties.segments))) {
|
|
23804
24354
|
ganttPropKey = 'segments';
|
|
23805
24355
|
/* eslint-disable-next-line */
|
|
23806
24356
|
if (data && !isNullOrUndefined(data[this.parent.taskFields.segments]) && data[this.parent.taskFields.segments].length > 0) {
|
|
@@ -24168,8 +24718,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24168
24718
|
*/
|
|
24169
24719
|
Edit$$1.prototype.updateEditedTask = function (args) {
|
|
24170
24720
|
var ganttRecord = args.data;
|
|
24171
|
-
this.
|
|
24172
|
-
|
|
24721
|
+
if (this.parent.autoCalculateDateScheduling) {
|
|
24722
|
+
this.updateParentChildRecord(ganttRecord);
|
|
24723
|
+
}
|
|
24724
|
+
if (this.parent.isConnectorLineUpdate && this.parent.autoCalculateDateScheduling) {
|
|
24173
24725
|
/* validating predecessor for updated child items */
|
|
24174
24726
|
for (var i = 0; i < this.validatedChildItems.length; i++) {
|
|
24175
24727
|
var child = this.validatedChildItems[i];
|
|
@@ -24188,7 +24740,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24188
24740
|
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
24189
24741
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
24190
24742
|
}
|
|
24191
|
-
if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
24743
|
+
if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
24192
24744
|
(args.action === "DrawConnectorLine")) {
|
|
24193
24745
|
this.updateChildItems(ganttRecord);
|
|
24194
24746
|
}
|
|
@@ -24196,7 +24748,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24196
24748
|
}
|
|
24197
24749
|
/** Update parent up-to zeroth level */
|
|
24198
24750
|
if (ganttRecord.parentItem) {
|
|
24199
|
-
this.parent.
|
|
24751
|
+
if (this.parent.autoCalculateDateScheduling) {
|
|
24752
|
+
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
24753
|
+
}
|
|
24200
24754
|
var parentData = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
|
|
24201
24755
|
if (!parentData.ganttProperties.predecessorsName) {
|
|
24202
24756
|
this.parent.predecessorModule.validatePredecessor(parentData, [], '');
|
|
@@ -24442,7 +24996,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24442
24996
|
durationDiff = this.parent.dateValidationModule.getDuration(validStartDate, validEndDate, 'minute', true, false);
|
|
24443
24997
|
}
|
|
24444
24998
|
for (var i = 0; i < childRecords.length; i++) {
|
|
24445
|
-
if (
|
|
24999
|
+
if (childRecords[i].ganttProperties.isAutoSchedule) {
|
|
24446
25000
|
if (durationDiff > 0) {
|
|
24447
25001
|
var startDate = isScheduledTask(childRecords[i].ganttProperties) ?
|
|
24448
25002
|
childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.startDate ?
|
|
@@ -24560,52 +25114,52 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24560
25114
|
}
|
|
24561
25115
|
for (var i = 0; i < eLength; i++) {
|
|
24562
25116
|
if (e.changedRecords) {
|
|
24563
|
-
rec = e.changedRecords[i];
|
|
25117
|
+
rec = e.changedRecords[parseInt(i.toString(), 10)];
|
|
24564
25118
|
}
|
|
24565
25119
|
else {
|
|
24566
|
-
rec = e[i];
|
|
25120
|
+
rec = e[parseInt(i.toString(), 10)];
|
|
24567
25121
|
}
|
|
24568
25122
|
var _aLength = Object.keys(rec).length;
|
|
24569
25123
|
for (var j = 0, _a = Object.keys(rec); j < _aLength; j++) {
|
|
24570
|
-
var key = _a[j];
|
|
24571
|
-
this.parent.editedRecords[i][key] = rec[key];
|
|
24572
|
-
this.parent.editedRecords[i].taskData[key] = rec[key];
|
|
25124
|
+
var key = _a[parseInt(j.toString(), 10)];
|
|
25125
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)]["" + key] = rec["" + key];
|
|
25126
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].taskData["" + key] = rec["" + key];
|
|
24573
25127
|
}
|
|
24574
25128
|
if (this.parent.taskFields.id !== null) {
|
|
24575
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25129
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['taskId'] = rec[this.parent.taskFields.id];
|
|
24576
25130
|
}
|
|
24577
25131
|
if (this.parent.taskFields.name !== null) {
|
|
24578
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25132
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['taskName'] = rec[this.parent.taskFields.name];
|
|
24579
25133
|
}
|
|
24580
25134
|
if (this.parent.taskFields.startDate !== null) {
|
|
24581
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25135
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['startDate'] = rec[this.parent.taskFields.startDate];
|
|
24582
25136
|
}
|
|
24583
25137
|
if (this.parent.taskFields.endDate !== null) {
|
|
24584
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25138
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['endDate'] = rec[this.parent.taskFields.endDate];
|
|
24585
25139
|
}
|
|
24586
25140
|
if (this.parent.taskFields.duration !== null) {
|
|
24587
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25141
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['duration'] = parseInt(rec[this.parent.taskFields.duration]);
|
|
24588
25142
|
}
|
|
24589
25143
|
if (this.parent.taskFields.durationUnit !== null) {
|
|
24590
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25144
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['durationUnit'] = rec[this.parent.taskFields.durationUnit];
|
|
24591
25145
|
}
|
|
24592
25146
|
if (this.parent.taskFields.progress !== null) {
|
|
24593
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25147
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['progress'] = rec[this.parent.taskFields.progress];
|
|
24594
25148
|
}
|
|
24595
25149
|
if (this.parent.taskFields.dependency !== null) {
|
|
24596
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25150
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['dependency'] = rec[this.parent.taskFields.dependency];
|
|
24597
25151
|
}
|
|
24598
25152
|
if (this.parent.taskFields.parentID !== null) {
|
|
24599
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25153
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['parentID'] = rec[this.parent.taskFields.parentID];
|
|
24600
25154
|
}
|
|
24601
25155
|
if (this.parent.taskFields.baselineEndDate !== null) {
|
|
24602
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25156
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['baselineEndDate'] = rec[this.parent.taskFields.baselineEndDate];
|
|
24603
25157
|
}
|
|
24604
25158
|
if (this.parent.taskFields.baselineStartDate !== null) {
|
|
24605
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25159
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['baselineStartDate'] = rec[this.parent.taskFields.baselineStartDate];
|
|
24606
25160
|
}
|
|
24607
25161
|
if (this.parent.taskFields.resourceInfo !== null) {
|
|
24608
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
25162
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['resources'] = rec[this.parent.taskFields.resourceInfo];
|
|
24609
25163
|
}
|
|
24610
25164
|
}
|
|
24611
25165
|
this.saveSuccess(args);
|
|
@@ -24674,6 +25228,14 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24674
25228
|
}
|
|
24675
25229
|
if (!this.isTreeGridRefresh) {
|
|
24676
25230
|
this.parent.chartRowsModule.refreshRecords(this.parent.editedRecords);
|
|
25231
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && this.parent.showOverAllocation) {
|
|
25232
|
+
this.parent.contentHeight = this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
25233
|
+
this.parent.ganttChartModule.chartBodyContent.style.height = this.parent.contentHeight + 'px';
|
|
25234
|
+
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
25235
|
+
if (this.parent.taskFields.dependency) {
|
|
25236
|
+
this.parent.ganttChartModule.reRenderConnectorLines();
|
|
25237
|
+
}
|
|
25238
|
+
}
|
|
24677
25239
|
if (this.parent.isConnectorLineUpdate && !isNullOrUndefined(this.parent.connectorLineEditModule)) {
|
|
24678
25240
|
this.parent.updatedConnectorLineCollection = [];
|
|
24679
25241
|
this.parent.connectorLineIds = [];
|
|
@@ -25589,15 +26151,24 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25589
26151
|
if (parentTask && parentTask.ganttProperties.taskName !==
|
|
25590
26152
|
this_2.parent.localeObj.getConstant('unassignedTask') && isDuplicate.length === 0) {
|
|
25591
26153
|
this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
|
|
25592
|
-
if (parentTask) {
|
|
25593
|
-
this_2.parent.dataOperation.updateParentItems(updateUnAssignedResources_1[i].parentItem);
|
|
25594
|
-
}
|
|
25595
26154
|
}
|
|
25596
26155
|
else if (!parentTask && (!isDuplicate || isDuplicate.length === 0)) {
|
|
25597
26156
|
this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
|
|
25598
|
-
|
|
25599
|
-
|
|
26157
|
+
}
|
|
26158
|
+
unassignedTask = this_2.parent.flatData.filter(function (data) {
|
|
26159
|
+
return data.ganttProperties.taskName === _this.parent.localeObj.getConstant('unassignedTask');
|
|
26160
|
+
})[0];
|
|
26161
|
+
var parentItem = this_2.parent.currentViewData.filter(function (data) {
|
|
26162
|
+
if (data.ganttProperties.taskId == updateUnAssignedResources_1[i].ganttProperties.taskId && (!data.hasChildRecords && data.parentItem)
|
|
26163
|
+
&& unassignedTask.uniqueID === data.parentItem.uniqueID) {
|
|
26164
|
+
return data;
|
|
25600
26165
|
}
|
|
26166
|
+
else {
|
|
26167
|
+
return null;
|
|
26168
|
+
}
|
|
26169
|
+
});
|
|
26170
|
+
if (parentItem[0]) {
|
|
26171
|
+
this_2.parent.dataOperation.updateParentItems(parentItem[0]);
|
|
25601
26172
|
}
|
|
25602
26173
|
};
|
|
25603
26174
|
var this_2 = this;
|
|
@@ -26207,7 +26778,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
26207
26778
|
if (!isNullOrUndefined(ganttData)) {
|
|
26208
26779
|
_this.validateUpdateValues(args.newTaskData, ganttData, true);
|
|
26209
26780
|
}
|
|
26210
|
-
if (!isNullOrUndefined(args.data[tempTaskID])) {
|
|
26781
|
+
if (!isNullOrUndefined(args.data["" + tempTaskID])) {
|
|
26211
26782
|
if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
|
|
26212
26783
|
args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
|
|
26213
26784
|
args.newTaskData[tempTaskID] = args.data[tempTaskID];
|
|
@@ -27493,9 +28064,95 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
27493
28064
|
}
|
|
27494
28065
|
}
|
|
27495
28066
|
};
|
|
28067
|
+
Filter$$1.prototype.setPosition = function (li, ul) {
|
|
28068
|
+
var gridPos = this.parent.element.getBoundingClientRect();
|
|
28069
|
+
var gridPosTop = gridPos.top;
|
|
28070
|
+
var gridPosLeft = gridPos.left;
|
|
28071
|
+
var parentNode;
|
|
28072
|
+
var parentNodeTop;
|
|
28073
|
+
var parentNodeLeft;
|
|
28074
|
+
var paddingTop;
|
|
28075
|
+
var paddingLeft;
|
|
28076
|
+
var marginTop;
|
|
28077
|
+
var marginLeft;
|
|
28078
|
+
if (!isNullOrUndefined(this.parent.element.parentNode) && this.parent.element.parentNode['tagName'] != 'BODY') {
|
|
28079
|
+
parentNode = this.parent.element.parentNode;
|
|
28080
|
+
parentNodeTop = parentNode.getBoundingClientRect().top;
|
|
28081
|
+
marginTop = parentNode.style.marginTop;
|
|
28082
|
+
while (true) {
|
|
28083
|
+
if (Math.abs(gridPosTop) > Math.abs(parentNodeTop)) {
|
|
28084
|
+
paddingTop = gridPosTop - parentNodeTop;
|
|
28085
|
+
break;
|
|
28086
|
+
}
|
|
28087
|
+
if (!isNullOrUndefined(this.parent.element.parentNode)) {
|
|
28088
|
+
parentNode = parentNode.parentNode;
|
|
28089
|
+
marginTop = parentNode.parentNode.style.marginTop;
|
|
28090
|
+
}
|
|
28091
|
+
parentNodeTop = parentNode.getBoundingClientRect().top;
|
|
28092
|
+
}
|
|
28093
|
+
parentNodeLeft = parentNode.getBoundingClientRect().left;
|
|
28094
|
+
marginLeft = parentNode.style.marginLeft;
|
|
28095
|
+
while (true) {
|
|
28096
|
+
if (Math.abs(gridPosLeft) > Math.abs(parentNodeLeft)) {
|
|
28097
|
+
paddingLeft = gridPosLeft - parentNodeLeft;
|
|
28098
|
+
break;
|
|
28099
|
+
}
|
|
28100
|
+
if (!isNullOrUndefined(this.parent.element.parentNode)) {
|
|
28101
|
+
parentNode = parentNode.parentNode;
|
|
28102
|
+
marginLeft = parentNode.style.marginLeft;
|
|
28103
|
+
}
|
|
28104
|
+
parentNodeLeft = parentNode.getBoundingClientRect().left;
|
|
28105
|
+
}
|
|
28106
|
+
}
|
|
28107
|
+
var liPos = li.getBoundingClientRect();
|
|
28108
|
+
var left = liPos.right + window.scrollX;
|
|
28109
|
+
var top = liPos.top + window.scrollY;
|
|
28110
|
+
if (gridPos.right < (left + ul.offsetWidth)) {
|
|
28111
|
+
if ((liPos.left - ul.offsetWidth) > gridPos.left) {
|
|
28112
|
+
left = (liPos.left - ul.offsetWidth);
|
|
28113
|
+
}
|
|
28114
|
+
else {
|
|
28115
|
+
left -= (left + ul.offsetWidth) - gridPos.right;
|
|
28116
|
+
}
|
|
28117
|
+
}
|
|
28118
|
+
else {
|
|
28119
|
+
if (!isNullOrUndefined(paddingTop) && !isNullOrUndefined(paddingLeft)) {
|
|
28120
|
+
left = Math.abs(liPos.right - gridPos.left);
|
|
28121
|
+
top = Math.abs(liPos.top - gridPos.top);
|
|
28122
|
+
}
|
|
28123
|
+
}
|
|
28124
|
+
if (!isNullOrUndefined(paddingTop) && !isNullOrUndefined(paddingLeft)) {
|
|
28125
|
+
ul.style.top = typeof (parseInt(marginTop)) === "string" ? (top + paddingTop + parseInt(marginTop)) + 'px' : (top + paddingTop) + 'px';
|
|
28126
|
+
ul.style.left = typeof (parseInt(marginLeft)) === "string" ? (left + paddingLeft + parseInt(marginLeft) + 8) + 'px' : (left + paddingLeft) + 'px';
|
|
28127
|
+
}
|
|
28128
|
+
else {
|
|
28129
|
+
ul.style.top = top + 'px';
|
|
28130
|
+
ul.style.left = left + 'px';
|
|
28131
|
+
}
|
|
28132
|
+
};
|
|
27496
28133
|
Filter$$1.prototype.updateFilterMenuPosition = function (element, args) {
|
|
27497
28134
|
addClass([element], 'e-gantt');
|
|
27498
|
-
document.querySelector('#' + this.parent.
|
|
28135
|
+
document.querySelector('#' + this.parent.controlId).appendChild(element);
|
|
28136
|
+
var targetElement;
|
|
28137
|
+
if (this.parent.showColumnMenu) {
|
|
28138
|
+
targetElement = document.querySelector('#treeGrid' + this.parent.controlId + '_gridcontrol_colmenu_Filter');
|
|
28139
|
+
element.style.zIndex = targetElement.parentElement.style.zIndex;
|
|
28140
|
+
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
28141
|
+
this.setPosition(targetElement, getValue('filterModel.dlgObj.element', args));
|
|
28142
|
+
}
|
|
28143
|
+
else {
|
|
28144
|
+
this.setPosition(targetElement, getValue('filterModel.dialogObj.element', args));
|
|
28145
|
+
}
|
|
28146
|
+
}
|
|
28147
|
+
else {
|
|
28148
|
+
targetElement = this.parent.treeGrid.grid.getColumnHeaderByField(args.columnName).querySelector('.e-filtermenudiv');
|
|
28149
|
+
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
28150
|
+
getFilterMenuPostion(targetElement, getValue('filterModel.dlgObj', args));
|
|
28151
|
+
}
|
|
28152
|
+
else {
|
|
28153
|
+
getFilterMenuPostion(targetElement, getValue('filterModel.dialogObj', args));
|
|
28154
|
+
}
|
|
28155
|
+
}
|
|
27499
28156
|
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
27500
28157
|
element.querySelector('.e-valid-input').focus();
|
|
27501
28158
|
}
|
|
@@ -27913,7 +28570,10 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
|
|
|
27913
28570
|
var rIndex = parseInt(selectedRow.getAttribute('aria-rowindex'), 10);
|
|
27914
28571
|
var isToggle = this.parent.selectionSettings.enableToggle;
|
|
27915
28572
|
if (this.parent.selectionSettings.type === 'Single' || (!this.isMultiCtrlRequest && !this.isMultiShiftRequest)) {
|
|
27916
|
-
this.
|
|
28573
|
+
if (!this.parent.allowTaskbarDragAndDrop || (this.parent.allowTaskbarDragAndDrop && (this.parent.rowDragAndDropModule &&
|
|
28574
|
+
!this.parent.rowDragAndDropModule['draggedRecord']))) {
|
|
28575
|
+
this.selectRow(rIndex, isToggle);
|
|
28576
|
+
}
|
|
27917
28577
|
}
|
|
27918
28578
|
else {
|
|
27919
28579
|
if (this.isMultiShiftRequest) {
|
|
@@ -27957,7 +28617,7 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
|
|
|
27957
28617
|
};
|
|
27958
28618
|
Selection$$1.prototype.addRemoveClass = function (records) {
|
|
27959
28619
|
if (typeof (records) == "number") {
|
|
27960
|
-
records =
|
|
28620
|
+
records = [records];
|
|
27961
28621
|
}
|
|
27962
28622
|
var ganttRow = [].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector('tbody').children);
|
|
27963
28623
|
var _loop_1 = function (i) {
|
|
@@ -28743,6 +29403,9 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
28743
29403
|
});
|
|
28744
29404
|
var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
|
|
28745
29405
|
spanElement[property] = this.parent.holidays[i].label ? this.parent.holidays[i].label : '';
|
|
29406
|
+
if (this.parent.enableHtmlSanitizer && typeof (spanElement[property]) === 'string') {
|
|
29407
|
+
spanElement[property] = SanitizeHtmlHelper.sanitize(spanElement[property]);
|
|
29408
|
+
}
|
|
28746
29409
|
holidayDiv.appendChild(spanElement);
|
|
28747
29410
|
if (this.parent.holidays[i].cssClass) {
|
|
28748
29411
|
holidayDiv.classList.add(this.parent.holidays[i].cssClass);
|
|
@@ -28929,6 +29592,9 @@ var EventMarker$1 = /** @__PURE__ @class */ (function () {
|
|
|
28929
29592
|
});
|
|
28930
29593
|
var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
|
|
28931
29594
|
spanElement[property] = this.parent.eventMarkers[i].label;
|
|
29595
|
+
if (this.parent.enableHtmlSanitizer && typeof (spanElement[property]) === 'string') {
|
|
29596
|
+
spanElement[property] = SanitizeHtmlHelper.sanitize(spanElement[property]);
|
|
29597
|
+
}
|
|
28932
29598
|
if (this.parent.enableRtl) {
|
|
28933
29599
|
spanElement.style.right = '5px';
|
|
28934
29600
|
}
|
|
@@ -30176,7 +30842,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
30176
30842
|
this.parent.selectionModule.selectRow(rowIndex);
|
|
30177
30843
|
}
|
|
30178
30844
|
if (!args.parentItem) {
|
|
30179
|
-
this.rowData = this.parent.updatedRecords[rowIndex];
|
|
30845
|
+
this.rowData = this.parent.updatedRecords[parseInt(rowIndex.toString(), 10)];
|
|
30180
30846
|
}
|
|
30181
30847
|
for (var _i = 0, _a = args.items; _i < _a.length; _i++) {
|
|
30182
30848
|
var item = _a[_i];
|
|
@@ -30308,7 +30974,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
30308
30974
|
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
30309
30975
|
var prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
|
|
30310
30976
|
if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
|
|
30311
|
-
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[index].level - prevRecord.level === 1) {
|
|
30977
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[parseInt(index.toString(), 10)].level - prevRecord.level === 1) {
|
|
30312
30978
|
this.updateItemVisibility(item.text);
|
|
30313
30979
|
}
|
|
30314
30980
|
}
|
|
@@ -30324,7 +30990,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
30324
30990
|
var isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
30325
30991
|
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
30326
30992
|
if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
|
|
30327
|
-
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
|
|
30993
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[parseInt(ind.toString(), 10)].level === 0) {
|
|
30328
30994
|
this.updateItemVisibility(item.text);
|
|
30329
30995
|
}
|
|
30330
30996
|
}
|
|
@@ -30334,7 +31000,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
30334
31000
|
{
|
|
30335
31001
|
var taskSettings = this.parent.taskFields;
|
|
30336
31002
|
if (this.parent.readOnly || !taskbarElement || isNullOrUndefined(taskSettings.segments) ||
|
|
30337
|
-
this.parent.currentViewData[rowIndex].hasChildRecords) {
|
|
31003
|
+
this.parent.currentViewData[parseInt(rowIndex.toString(), 10)].hasChildRecords) {
|
|
30338
31004
|
this.updateItemVisibility(item.text);
|
|
30339
31005
|
}
|
|
30340
31006
|
break;
|
|
@@ -30539,7 +31205,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
30539
31205
|
};
|
|
30540
31206
|
ContextMenu$$1.prototype.contextMenuOnClose = function (args) {
|
|
30541
31207
|
var parent = 'parentObj';
|
|
30542
|
-
if (args.items.length > 0 && args.items[0][parent] instanceof ContextMenu$1) {
|
|
31208
|
+
if (args.items.length > 0 && args.items[0]["" + parent] instanceof ContextMenu$1) {
|
|
30543
31209
|
this.revertItemStatus();
|
|
30544
31210
|
}
|
|
30545
31211
|
};
|
|
@@ -31032,7 +31698,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
31032
31698
|
parentUniqueID = this.droppedRecord.uniqueID;
|
|
31033
31699
|
}
|
|
31034
31700
|
else {
|
|
31035
|
-
parentUniqueID = this.droppedRecord.parentItem.uniqueID;
|
|
31701
|
+
parentUniqueID = this.droppedRecord.parentItem ? this.droppedRecord.parentItem.uniqueID : this.droppedRecord.uniqueID;
|
|
31036
31702
|
}
|
|
31037
31703
|
var droppedParentItem = this.parent.getTaskByUniqueID(parentUniqueID);
|
|
31038
31704
|
var editedObj = {};
|
|
@@ -31059,7 +31725,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
31059
31725
|
this.updateSharedResourceTask();
|
|
31060
31726
|
}
|
|
31061
31727
|
}
|
|
31062
|
-
if (this.parent.taskFields.dependency) {
|
|
31728
|
+
if (this.parent.taskFields.dependency && this.parent.allowParentDependency) {
|
|
31063
31729
|
var isValidPredecessor = true;
|
|
31064
31730
|
var draggedParent = void 0;
|
|
31065
31731
|
var toParent_1;
|
|
@@ -34626,6 +35292,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
34626
35292
|
}
|
|
34627
35293
|
else {
|
|
34628
35294
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
35295
|
+
taskbar.width = taskbar.width - renderWidth;
|
|
34629
35296
|
if (this.isScheduledTask) {
|
|
34630
35297
|
var progressBoundsWidth = 0;
|
|
34631
35298
|
if (this.progressWidth <= renderWidth) {
|
|
@@ -35612,7 +36279,7 @@ var PdfGantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
35612
36279
|
&& this.parent.cloneProjectStartDate.getSeconds() === 0) {
|
|
35613
36280
|
this.parent.cloneProjectStartDate.setHours(8);
|
|
35614
36281
|
}
|
|
35615
|
-
var timelineStartDate = this.parent.dataOperation.getDateFromFormat(this.parent.
|
|
36282
|
+
var timelineStartDate = this.parent.dataOperation.getDateFromFormat(this.parent.timelineModule.timelineStartDate);
|
|
35616
36283
|
var count = isNullOrUndefined(timelineSettings.customTimelineSettings.bottomTier.count) ?
|
|
35617
36284
|
timelineSettings.customTimelineSettings.topTier.count : timelineSettings.customTimelineSettings.bottomTier.count;
|
|
35618
36285
|
var scheduleType = timelineSettings.customTimelineSettings.bottomTier.unit === 'None' ?
|
|
@@ -35824,8 +36491,9 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
35824
36491
|
* @param {object} pdfDoc .
|
|
35825
36492
|
* @returns {Promise<Object>} .
|
|
35826
36493
|
*/
|
|
35827
|
-
PdfExport.prototype.export = function (pdfExportProperties, isMultipleExport, pdfDoc) {
|
|
36494
|
+
PdfExport.prototype.export = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
35828
36495
|
var _this = this;
|
|
36496
|
+
this.isBlob = isBlob;
|
|
35829
36497
|
var args = {
|
|
35830
36498
|
requestType: 'beforePdfExport',
|
|
35831
36499
|
ganttObject: this.parent,
|
|
@@ -35869,7 +36537,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
35869
36537
|
this.pdfDocument = new PdfDocument();
|
|
35870
36538
|
}
|
|
35871
36539
|
this.processExport(data, pdfExportProperties, isMultipleExport).then(function () {
|
|
35872
|
-
_this.parent.trigger('pdfExportComplete', {});
|
|
36540
|
+
_this.parent.trigger('pdfExportComplete', _this.isBlob ? { promise: _this.blobPromise } : {});
|
|
35873
36541
|
if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
35874
36542
|
_this.parent.hideMaskRow();
|
|
35875
36543
|
}
|
|
@@ -35895,12 +36563,17 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
35895
36563
|
var layouter = _this.gantt.drawGrid(pdfPage, 0, 0, format);
|
|
35896
36564
|
_this.gantt.drawChart(layouter);
|
|
35897
36565
|
if (!isMultipleExport) {
|
|
35898
|
-
|
|
35899
|
-
|
|
35900
|
-
|
|
36566
|
+
if (!_this.isBlob) {
|
|
36567
|
+
// save the PDF
|
|
36568
|
+
if (!isNullOrUndefined(pdfExportProperties) && pdfExportProperties.fileName) {
|
|
36569
|
+
_this.pdfDocument.save(pdfExportProperties.fileName);
|
|
36570
|
+
}
|
|
36571
|
+
else {
|
|
36572
|
+
_this.pdfDocument.save('Export.pdf');
|
|
36573
|
+
}
|
|
35901
36574
|
}
|
|
35902
36575
|
else {
|
|
35903
|
-
_this.pdfDocument.save(
|
|
36576
|
+
_this.blobPromise = _this.pdfDocument.save();
|
|
35904
36577
|
}
|
|
35905
36578
|
_this.pdfDocument.destroy();
|
|
35906
36579
|
}
|