@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';
|
|
@@ -149,7 +149,7 @@ function updateDates(record, parent) {
|
|
|
149
149
|
function formatString(str, args) {
|
|
150
150
|
let regx;
|
|
151
151
|
for (let i = 0; i < args.length; i++) {
|
|
152
|
-
// eslint-disable-next-line detect-non-literal-regexp
|
|
152
|
+
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
153
153
|
regx = new RegExp('\\{' + (i) + '\\}', 'gm');
|
|
154
154
|
str = str.replace(regx, args[i].toString());
|
|
155
155
|
}
|
|
@@ -259,32 +259,37 @@ class DateProcessor {
|
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
let tStartDate;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
262
|
+
if (this.parent.autoCalculateDateScheduling) {
|
|
263
|
+
do {
|
|
264
|
+
tStartDate = new Date(cloneStartDate.getTime());
|
|
265
|
+
const holidayLength = this.parent.totalHolidayDates.length;
|
|
266
|
+
// check holidays and weekends
|
|
267
|
+
if (this.isValidateNonWorkDays(ganttProp)) {
|
|
268
|
+
const startTime = (!validateAsMilestone || isLoad) ? this.parent.defaultStartTime : this.parent.defaultEndTime;
|
|
269
|
+
if (!this.parent.includeWeekend) {
|
|
270
|
+
const tempDate = new Date(cloneStartDate.getTime());
|
|
271
|
+
cloneStartDate = this.getNextWorkingDay(cloneStartDate);
|
|
272
|
+
if (tempDate.getTime() !== cloneStartDate.getTime()) {
|
|
273
|
+
this.setTime(startTime, cloneStartDate);
|
|
274
|
+
}
|
|
273
275
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
276
|
+
for (let count = 0; count < holidayLength; count++) {
|
|
277
|
+
const holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
|
|
278
|
+
const holidayTo = new Date(holidayFrom.getTime());
|
|
279
|
+
holidayFrom.setHours(0, 0, 0, 0);
|
|
280
|
+
holidayTo.setHours(23, 59, 59, 59);
|
|
281
|
+
if (cloneStartDate.getTime() >= holidayFrom.getTime() && cloneStartDate.getTime() < holidayTo.getTime()) {
|
|
282
|
+
cloneStartDate.setDate(cloneStartDate.getDate() + 1);
|
|
283
|
+
this.setTime(startTime, cloneStartDate);
|
|
284
|
+
}
|
|
283
285
|
}
|
|
284
286
|
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
287
|
+
} while (tStartDate.getTime() !== cloneStartDate.getTime());
|
|
288
|
+
return new Date(cloneStartDate.getTime());
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
return new Date(cloneStartDate.getTime());
|
|
292
|
+
}
|
|
288
293
|
}
|
|
289
294
|
/**
|
|
290
295
|
* To update given date value to valid end date
|
|
@@ -319,36 +324,44 @@ class DateProcessor {
|
|
|
319
324
|
}
|
|
320
325
|
}
|
|
321
326
|
let tempCheckDate;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
if (
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
for (let count = 0; count < holidayLength; count++) {
|
|
334
|
-
const holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
|
|
335
|
-
const holidayTo = new Date(holidayFrom.getTime());
|
|
336
|
-
const tempHoliday = new Date(cloneEndDate.getTime());
|
|
337
|
-
tempHoliday.setMinutes(cloneEndDate.getMilliseconds() - 2);
|
|
338
|
-
holidayFrom.setHours(0, 0, 0, 0);
|
|
339
|
-
holidayTo.setHours(23, 59, 59, 59);
|
|
340
|
-
if (cloneEndDate.getTime() >= holidayFrom.getTime() && cloneEndDate.getTime() < holidayTo.getTime() ||
|
|
341
|
-
tempHoliday.getTime() >= holidayFrom.getTime() && tempHoliday.getTime() < holidayTo.getTime()) {
|
|
342
|
-
cloneEndDate.setDate(cloneEndDate.getDate() - 1);
|
|
343
|
-
if (!(cloneEndDate.getTime() === holidayFrom.getTime() && this.parent.defaultEndTime === 86400 &&
|
|
344
|
-
this.getSecondsInDecimal(cloneEndDate) === 0)) {
|
|
327
|
+
if (this.parent.autoCalculateDateScheduling) {
|
|
328
|
+
do {
|
|
329
|
+
tempCheckDate = new Date(cloneEndDate.getTime());
|
|
330
|
+
const holidayLength = this.parent.totalHolidayDates.length;
|
|
331
|
+
if (this.isValidateNonWorkDays(ganttProp)) {
|
|
332
|
+
if (!this.parent.includeWeekend) {
|
|
333
|
+
const tempDate = new Date(cloneEndDate.getTime());
|
|
334
|
+
cloneEndDate = this.getPreviousWorkingDay(cloneEndDate);
|
|
335
|
+
if (tempDate.getTime() !== cloneEndDate.getTime()) {
|
|
345
336
|
this.setTime(this.parent.defaultEndTime, cloneEndDate);
|
|
346
337
|
}
|
|
347
338
|
}
|
|
339
|
+
for (let count = 0; count < holidayLength; count++) {
|
|
340
|
+
const holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
|
|
341
|
+
const holidayTo = new Date(holidayFrom.getTime());
|
|
342
|
+
const tempHoliday = new Date(cloneEndDate.getTime());
|
|
343
|
+
tempHoliday.setMinutes(cloneEndDate.getMilliseconds() - 2);
|
|
344
|
+
holidayFrom.setHours(0, 0, 0, 0);
|
|
345
|
+
holidayTo.setHours(23, 59, 59, 59);
|
|
346
|
+
if (cloneEndDate.getTime() >= holidayFrom.getTime() && cloneEndDate.getTime() < holidayTo.getTime() ||
|
|
347
|
+
tempHoliday.getTime() >= holidayFrom.getTime() && tempHoliday.getTime() < holidayTo.getTime()) {
|
|
348
|
+
cloneEndDate.setDate(cloneEndDate.getDate() - 1);
|
|
349
|
+
if (!(cloneEndDate.getTime() === holidayFrom.getTime() && this.parent.defaultEndTime === 86400 &&
|
|
350
|
+
this.getSecondsInDecimal(cloneEndDate) === 0)) {
|
|
351
|
+
this.setTime(this.parent.defaultEndTime, cloneEndDate);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
348
355
|
}
|
|
356
|
+
} while (tempCheckDate.getTime() !== cloneEndDate.getTime());
|
|
357
|
+
return new Date(cloneEndDate.getTime());
|
|
358
|
+
}
|
|
359
|
+
else {
|
|
360
|
+
if (!isNullOrUndefined(cloneEndDate)) {
|
|
361
|
+
this.setTime(this.parent.defaultEndTime, cloneEndDate);
|
|
349
362
|
}
|
|
350
|
-
|
|
351
|
-
|
|
363
|
+
return new Date(cloneEndDate.getTime());
|
|
364
|
+
}
|
|
352
365
|
}
|
|
353
366
|
/**
|
|
354
367
|
* To validate the baseline start date
|
|
@@ -463,6 +476,13 @@ class DateProcessor {
|
|
|
463
476
|
}
|
|
464
477
|
this.parent.setRecordValue('endDate', tempEndDate, ganttProp, true);
|
|
465
478
|
}
|
|
479
|
+
else {
|
|
480
|
+
tempEndDate = ganttData[this.parent.taskFields.endDate];
|
|
481
|
+
if (!isNullOrUndefined(tempEndDate)) {
|
|
482
|
+
this.setTime(this.parent.defaultEndTime, tempEndDate);
|
|
483
|
+
}
|
|
484
|
+
this.parent.setRecordValue('endDate', tempEndDate, ganttProp, true);
|
|
485
|
+
}
|
|
466
486
|
if (this.parent.taskFields.endDate) {
|
|
467
487
|
this.parent.dataOperation.updateMappingData(ganttData, 'endDate');
|
|
468
488
|
}
|
|
@@ -529,9 +549,9 @@ class DateProcessor {
|
|
|
529
549
|
*/
|
|
530
550
|
getNonworkingTime(sDate, eDate, isAutoSchedule, isCheckTimeZone) {
|
|
531
551
|
isCheckTimeZone = isNullOrUndefined(isCheckTimeZone) ? true : isCheckTimeZone;
|
|
532
|
-
const weekendCount = !this.parent.includeWeekend && isAutoSchedule ? this.getWeekendCount(sDate, eDate) : 0;
|
|
552
|
+
const weekendCount = (!this.parent.includeWeekend && this.parent.autoCalculateDateScheduling) && isAutoSchedule ? this.getWeekendCount(sDate, eDate) : 0;
|
|
533
553
|
const totalHours = this.getNumberOfSeconds(sDate, eDate, isCheckTimeZone);
|
|
534
|
-
const holidaysCount = isAutoSchedule ? this.getHolidaysCount(sDate, eDate) : 0;
|
|
554
|
+
const holidaysCount = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.getHolidaysCount(sDate, eDate) : 0;
|
|
535
555
|
const totWorkDays = (totalHours - (weekendCount * 86400) - (holidaysCount * 86400)) / 86400; // working days between two dates
|
|
536
556
|
const nonWorkHours = this.getNonWorkingSecondsOnDate(sDate, eDate, isAutoSchedule);
|
|
537
557
|
const totalNonWorkTime = (totWorkDays * (86400 - this.parent.secondsPerDay)) +
|
|
@@ -722,6 +742,9 @@ class DateProcessor {
|
|
|
722
742
|
if (!isNullOrUndefined(data.ganttProperties.startDate))
|
|
723
743
|
sDate = data.ganttProperties.startDate;
|
|
724
744
|
}
|
|
745
|
+
else {
|
|
746
|
+
sDate = this.getProjectStartDate(ganttProp);
|
|
747
|
+
}
|
|
725
748
|
});
|
|
726
749
|
}
|
|
727
750
|
else {
|
|
@@ -1000,6 +1023,9 @@ class DateProcessor {
|
|
|
1000
1023
|
/*Check given date is on holidays*/
|
|
1001
1024
|
isOnHolidayOrWeekEnd(date, checkWeekEnd) {
|
|
1002
1025
|
checkWeekEnd = !isNullOrUndefined(checkWeekEnd) ? checkWeekEnd : this.parent.includeWeekend;
|
|
1026
|
+
if (!this.parent.autoCalculateDateScheduling) {
|
|
1027
|
+
checkWeekEnd = true;
|
|
1028
|
+
}
|
|
1003
1029
|
if (!checkWeekEnd && this.parent.nonWorkingDayIndex.indexOf(date.getDay()) !== -1) {
|
|
1004
1030
|
return true;
|
|
1005
1031
|
}
|
|
@@ -1029,8 +1055,8 @@ class DateProcessor {
|
|
|
1029
1055
|
let startRangeIndex = -1;
|
|
1030
1056
|
let endRangeIndex = -1;
|
|
1031
1057
|
let totNonWrkSecs = 0;
|
|
1032
|
-
const startOnHoliday = isAutoSchedule ? this.isOnHolidayOrWeekEnd(startDate, null) : false;
|
|
1033
|
-
const endOnHoliday = isAutoSchedule ? this.isOnHolidayOrWeekEnd(endDate, null) : false;
|
|
1058
|
+
const startOnHoliday = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.isOnHolidayOrWeekEnd(startDate, null) : false;
|
|
1059
|
+
const endOnHoliday = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.isOnHolidayOrWeekEnd(endDate, null) : false;
|
|
1034
1060
|
for (let i = 0; i < this.parent.nonWorkingTimeRanges.length; i++) {
|
|
1035
1061
|
const val = this.parent.nonWorkingTimeRanges[i];
|
|
1036
1062
|
if (sHour >= val.from && sHour <= val.to) {
|
|
@@ -1690,7 +1716,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
1690
1716
|
constructResourceViewDataSource(resources, data, unassignedTasks) {
|
|
1691
1717
|
for (let i = 0; i < data.length; i++) {
|
|
1692
1718
|
const tempData = data[i];
|
|
1693
|
-
|
|
1719
|
+
const child = this.parent.taskFields.child != null ? this.parent.taskFields.child : 'Children';
|
|
1694
1720
|
const resourceData = tempData && tempData[this.parent.taskFields.resourceInfo];
|
|
1695
1721
|
const resourceIdMapping = this.parent.resourceFields.id;
|
|
1696
1722
|
if ((!tempData[child] || tempData[child].length === 0) && resourceData && resourceData.length) {
|
|
@@ -1767,7 +1793,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
1767
1793
|
}
|
|
1768
1794
|
}
|
|
1769
1795
|
const ganttData = this.createRecord(tempData, level, parentItem, true);
|
|
1770
|
-
if (!this.parent.enableValidation) {
|
|
1796
|
+
if (!this.parent.enableValidation || !this.parent.autoCalculateDateScheduling) {
|
|
1771
1797
|
this.updateTaskLeftWidth(ganttData);
|
|
1772
1798
|
}
|
|
1773
1799
|
ganttData.index = this.recordIndex++;
|
|
@@ -1801,6 +1827,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
1801
1827
|
this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
|
|
1802
1828
|
this.updateAutoWidthLeft(parentData);
|
|
1803
1829
|
}
|
|
1830
|
+
if (!this.parent.allowParentDependency) {
|
|
1831
|
+
this.resetDependency(parentData);
|
|
1832
|
+
}
|
|
1804
1833
|
this.updateWidthLeft(parentData);
|
|
1805
1834
|
this.updateTaskData(parentData);
|
|
1806
1835
|
}
|
|
@@ -1913,6 +1942,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
1913
1942
|
if (!isNullOrUndefined(data[taskSettings.child]) && data[taskSettings.child].length > 0) {
|
|
1914
1943
|
this.parent.setRecordValue('hasChildRecords', true, ganttData);
|
|
1915
1944
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
1945
|
+
if (!this.parent.allowParentDependency) {
|
|
1946
|
+
this.resetDependency(ganttData);
|
|
1947
|
+
}
|
|
1916
1948
|
}
|
|
1917
1949
|
else {
|
|
1918
1950
|
this.parent.setRecordValue('hasChildRecords', false, ganttData);
|
|
@@ -2311,6 +2343,16 @@ class TaskProcessor extends DateProcessor {
|
|
|
2311
2343
|
}
|
|
2312
2344
|
}
|
|
2313
2345
|
}
|
|
2346
|
+
if (!this.parent.autoCalculateDateScheduling) {
|
|
2347
|
+
if (!isNullOrUndefined(ganttData.ganttProperties.startDate)) {
|
|
2348
|
+
ganttData[this.parent.taskFields.startDate] = ganttData.ganttProperties.startDate;
|
|
2349
|
+
ganttData.taskData[this.parent.taskFields.startDate] = ganttData.ganttProperties.startDate;
|
|
2350
|
+
}
|
|
2351
|
+
if (!isNullOrUndefined(ganttData.ganttProperties.endDate)) {
|
|
2352
|
+
ganttData[this.parent.taskFields.endDate] = ganttData.ganttProperties.endDate;
|
|
2353
|
+
ganttData.taskData[this.parent.taskFields.endDate] = ganttData.ganttProperties.endDate;
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2314
2356
|
if (!isNullOrUndefined(segments)) {
|
|
2315
2357
|
this.parent.setRecordValue('segments', this.setSegmentsInfo(ganttData, true), ganttProperties, true);
|
|
2316
2358
|
}
|
|
@@ -3297,7 +3339,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3297
3339
|
const rangeObj = {};
|
|
3298
3340
|
if (this._isInStartDateRange(cStartDate, tStartDate, tEndDate) || this._isInEndDateRange(cEndDate, tStartDate, tEndDate)) {
|
|
3299
3341
|
if ((tStartDate.getTime() > cStartDate.getTime() && tStartDate.getTime() < cEndDate.getTime()
|
|
3300
|
-
&& tEndDate.getTime() > cStartDate.getTime() && tEndDate.getTime()
|
|
3342
|
+
&& tEndDate.getTime() > cStartDate.getTime() && tEndDate.getTime() >= cEndDate.getTime())
|
|
3301
3343
|
|| (cStartDate.getTime() === tStartDate.getTime() && cEndDate.getTime() <= tEndDate.getTime())) {
|
|
3302
3344
|
rangeObj.from = tStartDate;
|
|
3303
3345
|
rangeObj.to = cEndDate;
|
|
@@ -3578,7 +3620,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3578
3620
|
*/
|
|
3579
3621
|
updateTaskLeftWidth(data) {
|
|
3580
3622
|
const task = data.ganttProperties;
|
|
3581
|
-
if (!data.hasChildRecords) {
|
|
3623
|
+
if (!data.hasChildRecords || !this.parent.autoCalculateDateScheduling) {
|
|
3582
3624
|
this.updateWidthLeft(data);
|
|
3583
3625
|
}
|
|
3584
3626
|
this.parent.setRecordValue('baselineLeft', this.calculateBaselineLeft(task), task, true);
|
|
@@ -3590,7 +3632,12 @@ class TaskProcessor extends DateProcessor {
|
|
|
3590
3632
|
childData = parentItem.childRecords;
|
|
3591
3633
|
}
|
|
3592
3634
|
if (parentItem && childData.indexOf(data) === childData.length - 1 && !data.hasChildRecords && this.parent.enableValidation) {
|
|
3593
|
-
this.
|
|
3635
|
+
if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
|
|
3636
|
+
this.updateParentItems(parentItem);
|
|
3637
|
+
}
|
|
3638
|
+
if (!this.parent.autoCalculateDateScheduling) {
|
|
3639
|
+
this.updateWidthLeft(parentItem);
|
|
3640
|
+
}
|
|
3594
3641
|
}
|
|
3595
3642
|
else if (parentItem && !this.parent.enableValidation) {
|
|
3596
3643
|
this.updateWidthLeft(parentItem);
|
|
@@ -3733,105 +3780,119 @@ class TaskProcessor extends DateProcessor {
|
|
|
3733
3780
|
const parentData = isParent ? cloneParent : this.parent.getParentTask(cloneParent);
|
|
3734
3781
|
let deleteUpdate = false;
|
|
3735
3782
|
const ganttProp = parentData.ganttProperties;
|
|
3736
|
-
if (
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
ganttProp.
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
if (
|
|
3754
|
-
|
|
3783
|
+
if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
|
|
3784
|
+
if (parentData.childRecords.length > 0) {
|
|
3785
|
+
const previousStartDate = ganttProp.isAutoSchedule ? ganttProp.startDate : ganttProp.autoStartDate;
|
|
3786
|
+
const previousEndDate = ganttProp.isAutoSchedule ? ganttProp.endDate :
|
|
3787
|
+
ganttProp.autoEndDate;
|
|
3788
|
+
const childRecords = parentData.childRecords;
|
|
3789
|
+
const childLength = childRecords.length;
|
|
3790
|
+
let totalDuration = 0;
|
|
3791
|
+
let progressValues = {};
|
|
3792
|
+
let minStartDate = null;
|
|
3793
|
+
let maxEndDate = null;
|
|
3794
|
+
let milestoneCount = 0;
|
|
3795
|
+
let totalProgress = 0;
|
|
3796
|
+
let childCompletedWorks = 0;
|
|
3797
|
+
let childData;
|
|
3798
|
+
for (let count = 0; count < childLength; count++) {
|
|
3799
|
+
childData = childRecords[count];
|
|
3800
|
+
if (this.parent.isOnDelete && childData.isDelete) {
|
|
3801
|
+
if (childLength === 1 && this.parent.viewType === 'ProjectView') {
|
|
3802
|
+
deleteUpdate = true;
|
|
3803
|
+
}
|
|
3804
|
+
continue;
|
|
3755
3805
|
}
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3806
|
+
let startDate = this.getValidStartDate(childData.ganttProperties);
|
|
3807
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
|
|
3808
|
+
startDate = childData.ganttProperties.autoStartDate;
|
|
3809
|
+
}
|
|
3810
|
+
let endDate = this.getValidEndDate(childData.ganttProperties);
|
|
3811
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
|
|
3812
|
+
endDate = childData.ganttProperties.autoEndDate;
|
|
3813
|
+
}
|
|
3814
|
+
if (isNullOrUndefined(minStartDate)) {
|
|
3815
|
+
minStartDate = this.getDateFromFormat(startDate);
|
|
3816
|
+
}
|
|
3817
|
+
if (isNullOrUndefined(maxEndDate)) {
|
|
3818
|
+
maxEndDate = this.getDateFromFormat(endDate);
|
|
3819
|
+
}
|
|
3820
|
+
if (!isNullOrUndefined(endDate) && this.compareDates(endDate, maxEndDate) === 1) {
|
|
3821
|
+
maxEndDate = this.getDateFromFormat(endDate);
|
|
3822
|
+
}
|
|
3823
|
+
if (!isNullOrUndefined(startDate) && this.compareDates(startDate, minStartDate) === -1) {
|
|
3824
|
+
minStartDate = this.getDateFromFormat(startDate);
|
|
3825
|
+
}
|
|
3826
|
+
if (!childData.ganttProperties.isMilestone && isScheduledTask(childData.ganttProperties)) {
|
|
3827
|
+
progressValues = this.getParentProgress(childData);
|
|
3828
|
+
totalProgress += getValue('totalProgress', progressValues);
|
|
3829
|
+
if (childData[this.parent.taskFields.duration] < 1) {
|
|
3830
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
3831
|
+
totalDuration = Number(totalDuration.toFixed(4));
|
|
3832
|
+
}
|
|
3833
|
+
else {
|
|
3834
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
3835
|
+
}
|
|
3784
3836
|
}
|
|
3785
3837
|
else {
|
|
3786
|
-
|
|
3838
|
+
milestoneCount++;
|
|
3787
3839
|
}
|
|
3840
|
+
childCompletedWorks += childData.ganttProperties.work;
|
|
3788
3841
|
}
|
|
3789
|
-
|
|
3790
|
-
|
|
3842
|
+
if (!deleteUpdate) {
|
|
3843
|
+
let taskCount;
|
|
3844
|
+
if (this.parent.isOnDelete && childData.isDelete) {
|
|
3845
|
+
taskCount = childLength - milestoneCount - 1;
|
|
3846
|
+
}
|
|
3847
|
+
else {
|
|
3848
|
+
taskCount = childLength - milestoneCount;
|
|
3849
|
+
}
|
|
3850
|
+
const parentProgress = (taskCount > 0 && totalDuration > 0) ? (totalProgress / totalDuration) : 0;
|
|
3851
|
+
const parentProp = parentData.ganttProperties;
|
|
3852
|
+
const milestone = (taskCount === 0) && minStartDate && maxEndDate &&
|
|
3853
|
+
minStartDate.getTime() === maxEndDate.getTime() ? true : false;
|
|
3854
|
+
if (this.compareDates(previousStartDate, minStartDate) !== 0) {
|
|
3855
|
+
this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'startDate' : 'autoStartDate', minStartDate, parentData.ganttProperties, true);
|
|
3856
|
+
if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone) {
|
|
3857
|
+
this.parent.setRecordValue('startDate', minStartDate, parentData.ganttProperties, true);
|
|
3858
|
+
}
|
|
3859
|
+
}
|
|
3860
|
+
if (this.compareDates(previousEndDate, maxEndDate) !== 0) {
|
|
3861
|
+
this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'endDate' : 'autoEndDate', maxEndDate, parentData.ganttProperties, true);
|
|
3862
|
+
if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone) {
|
|
3863
|
+
this.parent.setRecordValue('endDate', maxEndDate, parentData.ganttProperties, true);
|
|
3864
|
+
}
|
|
3865
|
+
}
|
|
3866
|
+
this.parent.setRecordValue('isMilestone', milestone, parentProp, true);
|
|
3867
|
+
if (parentProp.isAutoSchedule) {
|
|
3868
|
+
this.calculateDuration(parentData);
|
|
3869
|
+
}
|
|
3870
|
+
this.updateWorkWithDuration(parentData);
|
|
3871
|
+
let parentWork = parentProp.work;
|
|
3872
|
+
parentWork = this.parent.isOnEdit ? parentWork : (parentWork + childCompletedWorks);
|
|
3873
|
+
this.parent.setRecordValue('work', parentWork, parentProp, true);
|
|
3874
|
+
this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
|
|
3875
|
+
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
3876
|
+
this.updateMappingData(parentData, 'type');
|
|
3877
|
+
}
|
|
3878
|
+
this.parent.setRecordValue('progress', Math.floor(parentProgress), parentProp, true);
|
|
3879
|
+
this.parent.setRecordValue('totalProgress', totalProgress, parentProp, true);
|
|
3880
|
+
this.parent.setRecordValue('totalDuration', totalDuration, parentProp, true);
|
|
3881
|
+
if (!parentProp.isAutoSchedule) {
|
|
3882
|
+
this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
|
|
3883
|
+
this.updateAutoWidthLeft(parentData);
|
|
3884
|
+
}
|
|
3885
|
+
if (!this.parent.allowParentDependency) {
|
|
3886
|
+
this.resetDependency(parentData);
|
|
3887
|
+
}
|
|
3888
|
+
this.updateWidthLeft(parentData);
|
|
3889
|
+
this.updateTaskData(parentData);
|
|
3791
3890
|
}
|
|
3792
|
-
childCompletedWorks += childData.ganttProperties.work;
|
|
3793
|
-
}
|
|
3794
|
-
if (!deleteUpdate) {
|
|
3795
|
-
if (this.compareDates(previousStartDate, minStartDate) !== 0) {
|
|
3796
|
-
this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'startDate' : 'autoStartDate', minStartDate, parentData.ganttProperties, true);
|
|
3797
|
-
}
|
|
3798
|
-
if (this.compareDates(previousEndDate, maxEndDate) !== 0) {
|
|
3799
|
-
this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'endDate' : 'autoEndDate', maxEndDate, parentData.ganttProperties, true);
|
|
3800
|
-
}
|
|
3801
|
-
let taskCount;
|
|
3802
|
-
if (this.parent.isOnDelete && childData.isDelete) {
|
|
3803
|
-
taskCount = childLength - milestoneCount - 1;
|
|
3804
|
-
}
|
|
3805
|
-
else {
|
|
3806
|
-
taskCount = childLength - milestoneCount;
|
|
3807
|
-
}
|
|
3808
|
-
const parentProgress = (taskCount > 0 && totalDuration > 0) ? (totalProgress / totalDuration) : 0;
|
|
3809
|
-
const parentProp = parentData.ganttProperties;
|
|
3810
|
-
const milestone = (taskCount === 0) && minStartDate && maxEndDate &&
|
|
3811
|
-
minStartDate.getTime() === maxEndDate.getTime() ? true : false;
|
|
3812
|
-
this.parent.setRecordValue('isMilestone', milestone, parentProp, true);
|
|
3813
|
-
if (parentProp.isAutoSchedule) {
|
|
3814
|
-
this.calculateDuration(parentData);
|
|
3815
|
-
}
|
|
3816
|
-
this.updateWorkWithDuration(parentData);
|
|
3817
|
-
let parentWork = parentProp.work;
|
|
3818
|
-
parentWork = this.parent.isOnEdit ? parentWork : (parentWork + childCompletedWorks);
|
|
3819
|
-
this.parent.setRecordValue('work', parentWork, parentProp, true);
|
|
3820
|
-
this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
|
|
3821
|
-
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
3822
|
-
this.updateMappingData(parentData, 'type');
|
|
3823
|
-
}
|
|
3824
|
-
this.parent.setRecordValue('progress', Math.floor(parentProgress), parentProp, true);
|
|
3825
|
-
this.parent.setRecordValue('totalProgress', totalProgress, parentProp, true);
|
|
3826
|
-
this.parent.setRecordValue('totalDuration', totalDuration, parentProp, true);
|
|
3827
|
-
if (!parentProp.isAutoSchedule) {
|
|
3828
|
-
this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
|
|
3829
|
-
this.updateAutoWidthLeft(parentData);
|
|
3830
|
-
}
|
|
3831
|
-
this.updateWidthLeft(parentData);
|
|
3832
|
-
this.updateTaskData(parentData);
|
|
3833
3891
|
}
|
|
3834
3892
|
}
|
|
3893
|
+
else {
|
|
3894
|
+
parentData.ganttProperties.endDate = parentData.taskData[this.parent.taskFields.endDate];
|
|
3895
|
+
}
|
|
3835
3896
|
if (deleteUpdate && parentData.childRecords.length === 1 && parentData.ganttProperties.duration === 0) {
|
|
3836
3897
|
this.parent.setRecordValue('isMilestone', true, parentData.ganttProperties, true);
|
|
3837
3898
|
this.updateWidthLeft(parentData);
|
|
@@ -3839,7 +3900,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
3839
3900
|
}
|
|
3840
3901
|
const parentItem = this.parent.getParentTask(parentData.parentItem);
|
|
3841
3902
|
if (parentItem) {
|
|
3842
|
-
this.
|
|
3903
|
+
if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
|
|
3904
|
+
this.updateParentItems(parentItem);
|
|
3905
|
+
}
|
|
3843
3906
|
}
|
|
3844
3907
|
deleteUpdate = false;
|
|
3845
3908
|
}
|
|
@@ -4090,20 +4153,30 @@ class ChartScroll {
|
|
|
4090
4153
|
}
|
|
4091
4154
|
}
|
|
4092
4155
|
removeShimmer() {
|
|
4093
|
-
|
|
4156
|
+
const parent = this.parent;
|
|
4094
4157
|
setTimeout(function () {
|
|
4095
4158
|
parent.hideMaskRow();
|
|
4159
|
+
if (parent.viewType === 'ResourceView' && !parent.allowTaskbarOverlap && parent.showOverAllocation) {
|
|
4160
|
+
for (let i = 0; i < parent.currentViewData.length; i++) {
|
|
4161
|
+
const tr = parent.chartRowsModule.ganttChartTableBody.childNodes[i];
|
|
4162
|
+
if (tr['style'].display !== 'none' && parent.currentViewData[i].hasChildRecords && !parent.currentViewData[i].expanded) {
|
|
4163
|
+
parent.treeGrid.getRowByIndex(i)['style'].height = tr['style'].height;
|
|
4164
|
+
}
|
|
4165
|
+
}
|
|
4166
|
+
parent.contentHeight = parent.enableRtl ? parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
4167
|
+
parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
4168
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = parent.contentHeight + 'px';
|
|
4169
|
+
}
|
|
4096
4170
|
}, 0);
|
|
4097
4171
|
}
|
|
4098
|
-
;
|
|
4099
4172
|
updateShimmer() {
|
|
4100
|
-
|
|
4173
|
+
const parent = this.parent;
|
|
4101
4174
|
setTimeout(function () {
|
|
4102
4175
|
parent.showMaskRow();
|
|
4103
4176
|
}, 0);
|
|
4104
4177
|
}
|
|
4105
4178
|
updateSpinner() {
|
|
4106
|
-
|
|
4179
|
+
const parent = this.parent;
|
|
4107
4180
|
this.parent.showSpinner();
|
|
4108
4181
|
window.clearTimeout(this.isScrolling);
|
|
4109
4182
|
this.isScrolling = setTimeout(function () {
|
|
@@ -4135,11 +4208,11 @@ class ChartScroll {
|
|
|
4135
4208
|
scrollArgs.scrollDirection = 'Horizontal';
|
|
4136
4209
|
scrollArgs.action = 'HorizontalScroll';
|
|
4137
4210
|
}
|
|
4138
|
-
if ((scrollArgs.scrollDirection
|
|
4211
|
+
if ((scrollArgs.scrollDirection !== 'Horizontal' && !isNullOrUndefined(scrollArgs.scrollDirection)) && this.parent.enableVirtualization === true && (this.parent.isToolBarClick
|
|
4139
4212
|
|| isNullOrUndefined(this.parent.isToolBarClick))) {
|
|
4140
4213
|
this.parent.isVirtualScroll = true;
|
|
4141
4214
|
if (this.parent.showIndicator || isNullOrUndefined(this.parent.showIndicator)) {
|
|
4142
|
-
if (!this.parent.enableVirtualMaskRow && this.parent.enableVirtualization && this.parent.loadingIndicator.indicatorType ===
|
|
4215
|
+
if (!this.parent.enableVirtualMaskRow && this.parent.enableVirtualization && this.parent.loadingIndicator.indicatorType === 'Spinner') {
|
|
4143
4216
|
this.updateSpinner();
|
|
4144
4217
|
}
|
|
4145
4218
|
}
|
|
@@ -4183,11 +4256,12 @@ class ChartScroll {
|
|
|
4183
4256
|
* To set scroll left for chart scroll container
|
|
4184
4257
|
*
|
|
4185
4258
|
* @param {number} scrollLeft - To set scroll left for scroll container
|
|
4259
|
+
* @param {number} leftSign - specifies left sign
|
|
4186
4260
|
* @returns {void} .
|
|
4187
4261
|
*/
|
|
4188
4262
|
setScrollLeft(scrollLeft, leftSign) {
|
|
4189
4263
|
if (leftSign) {
|
|
4190
|
-
scrollLeft = leftSign
|
|
4264
|
+
scrollLeft = leftSign === -1 && this.parent.enableRtl ? -scrollLeft : scrollLeft;
|
|
4191
4265
|
}
|
|
4192
4266
|
this.element.scrollLeft = scrollLeft;
|
|
4193
4267
|
this.parent.ganttChartModule.chartTimelineContainer.scrollLeft = this.element.scrollLeft;
|
|
@@ -4343,9 +4417,11 @@ class GanttChart {
|
|
|
4343
4417
|
}
|
|
4344
4418
|
else {
|
|
4345
4419
|
if (this.parent.viewType === 'ProjectView') {
|
|
4346
|
-
this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[1]
|
|
4420
|
+
if (!isNullOrUndefined(this.parent.chartRowsModule.ganttChartTableBody.children[parseInt(i.toString(), 10)].children[0].children[1].children[1])) {
|
|
4421
|
+
this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[1].setAttribute('tabindex', '-1');
|
|
4422
|
+
}
|
|
4347
4423
|
}
|
|
4348
|
-
else if (this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[0]) {
|
|
4424
|
+
else if (this.parent.chartRowsModule.ganttChartTableBody.children[parseInt(i.toString(), 10)].children[0].children[1].children[0]) {
|
|
4349
4425
|
this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[0].setAttribute('tabindex', '-1');
|
|
4350
4426
|
}
|
|
4351
4427
|
}
|
|
@@ -4398,7 +4474,14 @@ class GanttChart {
|
|
|
4398
4474
|
Math.floor((this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight));
|
|
4399
4475
|
}
|
|
4400
4476
|
renderRange(rangeCollection, currentRecord) {
|
|
4401
|
-
|
|
4477
|
+
let topValue = 0;
|
|
4478
|
+
let rowIndex = this.parent.currentViewData.indexOf(currentRecord);
|
|
4479
|
+
if (!this.parent.allowTaskbarOverlap && this.parent.enableMultiTaskbar) {
|
|
4480
|
+
topValue = !currentRecord.expanded ? this.parent.getRowByIndex(rowIndex).offsetTop : this.parent.getRowByIndex(rowIndex).offsetTop + this.parent.rowHeight;
|
|
4481
|
+
}
|
|
4482
|
+
else {
|
|
4483
|
+
topValue = this.getTopValue(currentRecord);
|
|
4484
|
+
}
|
|
4402
4485
|
const sameIDElement = this.rangeViewContainer.querySelector('.' + 'rangeContainer' + currentRecord.ganttProperties.rowUniqueID);
|
|
4403
4486
|
if (sameIDElement) {
|
|
4404
4487
|
sameIDElement.remove();
|
|
@@ -4411,7 +4494,14 @@ class GanttChart {
|
|
|
4411
4494
|
return;
|
|
4412
4495
|
}
|
|
4413
4496
|
for (let i = 0; i < rangeCollection.length; i++) {
|
|
4414
|
-
|
|
4497
|
+
let height;
|
|
4498
|
+
if (!this.parent.allowTaskbarOverlap && !currentRecord.expanded && this.parent.enableMultiTaskbar) {
|
|
4499
|
+
height = parseInt(this.parent.chartRowsModule.ganttChartTableBody.childNodes[rowIndex].style.height) -
|
|
4500
|
+
(this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight);
|
|
4501
|
+
}
|
|
4502
|
+
else {
|
|
4503
|
+
height = this.getRangeHeight(currentRecord);
|
|
4504
|
+
}
|
|
4415
4505
|
const leftDiv = createElement('div', {
|
|
4416
4506
|
className: rangeChildContainer + ' ' + 'e-leftarc', styles: (this.parent.enableRtl ? 'right:' : 'left:') +
|
|
4417
4507
|
`${(this.parent.enableRtl ? rangeCollection[i].left + rangeCollection[i].width - 5 : rangeCollection[i].left)}px;
|
|
@@ -5717,7 +5807,7 @@ class Timeline {
|
|
|
5717
5807
|
else {
|
|
5718
5808
|
const value = property === 'topTier' ? 'bottomTier' : 'topTier';
|
|
5719
5809
|
const assignValue = 'bottomTier';
|
|
5720
|
-
if (newTimeline[assignValue].unit != "None") {
|
|
5810
|
+
if (newTimeline[`${assignValue}`].unit != "None") {
|
|
5721
5811
|
this.customTimelineSettings[value] = Object.assign({}, newTimeline[assignValue]);
|
|
5722
5812
|
}
|
|
5723
5813
|
}
|
|
@@ -6018,7 +6108,7 @@ class Timeline {
|
|
|
6018
6108
|
else {
|
|
6019
6109
|
secondValue = sortedUnitLevels[i + 1];
|
|
6020
6110
|
}
|
|
6021
|
-
if (count >= firstValue[tier].count) {
|
|
6111
|
+
if (count >= firstValue[`${tier}`].count) {
|
|
6022
6112
|
currentZoomCollection = sortedUnitLevels[i];
|
|
6023
6113
|
checkSameCountLevels = sortedUnitLevels.filter((tempLevel) => {
|
|
6024
6114
|
if (tier === "bottomTier") {
|
|
@@ -6036,7 +6126,7 @@ class Timeline {
|
|
|
6036
6126
|
}
|
|
6037
6127
|
break;
|
|
6038
6128
|
}
|
|
6039
|
-
else if (count < firstValue[tier].count && count > secondValue[tier].count) {
|
|
6129
|
+
else if (count < firstValue[`${tier}`].count && count > secondValue[`${tier}`].count) {
|
|
6040
6130
|
currentZoomCollection = sortedUnitLevels[i + 1];
|
|
6041
6131
|
checkSameCountLevels = sortedUnitLevels.filter((tempLevel) => {
|
|
6042
6132
|
if (tier === "bottomTier") {
|
|
@@ -7113,6 +7203,15 @@ class GanttTreeGrid {
|
|
|
7113
7203
|
this.columnMenuOpen = (args) => {
|
|
7114
7204
|
this.parent.notify('columnMenuOpen', args);
|
|
7115
7205
|
this.parent.trigger('columnMenuOpen', args);
|
|
7206
|
+
document.querySelector(".e-colmenu").addEventListener('mousemove', (event) => {
|
|
7207
|
+
const filPopOptions = document.querySelector(".e-filter-popup");
|
|
7208
|
+
const filOptions = document.querySelector(".e-filter-item");
|
|
7209
|
+
if (!isNullOrUndefined(filPopOptions)) {
|
|
7210
|
+
if (!filOptions.classList.contains('e-focused')) {
|
|
7211
|
+
remove(this.parent.filterModule.filterMenuElement);
|
|
7212
|
+
}
|
|
7213
|
+
}
|
|
7214
|
+
});
|
|
7116
7215
|
};
|
|
7117
7216
|
this.columnMenuClick = (args) => {
|
|
7118
7217
|
this.parent.trigger('columnMenuClick', args);
|
|
@@ -7144,6 +7243,7 @@ class GanttTreeGrid {
|
|
|
7144
7243
|
this.parent.treeGrid = new TreeGrid();
|
|
7145
7244
|
this.parent.treeGrid.allowSelection = false;
|
|
7146
7245
|
this.parent.treeGrid.allowKeyboard = this.parent.allowKeyboard;
|
|
7246
|
+
this.parent.treeGrid['${enableHtmlSanitizer}'] = this.parent.enableHtmlSanitizer;
|
|
7147
7247
|
this.parent.treeGrid.enableImmutableMode = this.parent.enableImmutableMode;
|
|
7148
7248
|
this.treeGridColumns = [];
|
|
7149
7249
|
if (!this.parent.isLocaleChanged && this.parent.isLoad) {
|
|
@@ -7334,6 +7434,12 @@ class GanttTreeGrid {
|
|
|
7334
7434
|
if (!this.parent.ganttChartModule.isExpandCollapseFromChart && !this.parent.isExpandCollapseLevelMethod) {
|
|
7335
7435
|
const collapsedArgs = this.createExpandCollapseArgs(args);
|
|
7336
7436
|
this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
|
|
7437
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && collapsedArgs['gridRow']) {
|
|
7438
|
+
collapsedArgs['gridRow'].style.height = collapsedArgs['chartRow'].style.height;
|
|
7439
|
+
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
7440
|
+
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
7441
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
7442
|
+
}
|
|
7337
7443
|
}
|
|
7338
7444
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
7339
7445
|
this.parent.hideMaskRow();
|
|
@@ -7347,6 +7453,12 @@ class GanttTreeGrid {
|
|
|
7347
7453
|
if (!args['data'].length) {
|
|
7348
7454
|
const expandedArgs = this.createExpandCollapseArgs(args);
|
|
7349
7455
|
this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
|
|
7456
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && args['row']) {
|
|
7457
|
+
args['row'].style.height = this.parent.rowHeight + 'px';
|
|
7458
|
+
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
7459
|
+
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
7460
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
7461
|
+
}
|
|
7350
7462
|
}
|
|
7351
7463
|
}
|
|
7352
7464
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
@@ -7439,6 +7551,14 @@ class GanttTreeGrid {
|
|
|
7439
7551
|
this.parent.addDeleteRecord = false;
|
|
7440
7552
|
}
|
|
7441
7553
|
this.parent.trigger('actionComplete', updatedArgs);
|
|
7554
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && this.parent.showOverAllocation) {
|
|
7555
|
+
for (let i = 0; i < this.parent.currentViewData.length; i++) {
|
|
7556
|
+
if (this.parent.currentViewData[i].hasChildRecords && !this.parent.currentViewData[i].expanded) {
|
|
7557
|
+
this.parent.chartRowsModule.updateDragDropRecords(this.parent.currentViewData[i]);
|
|
7558
|
+
}
|
|
7559
|
+
}
|
|
7560
|
+
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
7561
|
+
}
|
|
7442
7562
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
7443
7563
|
this.parent.hideMaskRow();
|
|
7444
7564
|
}
|
|
@@ -8584,8 +8704,12 @@ class ChartRows extends DateProcessor {
|
|
|
8584
8704
|
}
|
|
8585
8705
|
}
|
|
8586
8706
|
else {
|
|
8587
|
-
|
|
8707
|
+
const field = this.parent.labelSettings.taskLabel;
|
|
8708
|
+
labelString = this.getTaskLabel(field);
|
|
8588
8709
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
8710
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
8711
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
8712
|
+
}
|
|
8589
8713
|
}
|
|
8590
8714
|
if (labelString.indexOf('null') === -1) {
|
|
8591
8715
|
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
@@ -8597,7 +8721,7 @@ class ChartRows extends DateProcessor {
|
|
|
8597
8721
|
(this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
|
|
8598
8722
|
'display:' + 'inline-block;' +
|
|
8599
8723
|
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
8600
|
-
this.taskBarHeight + 'px;"
|
|
8724
|
+
this.taskBarHeight + 'px;"></span>';
|
|
8601
8725
|
}
|
|
8602
8726
|
else {
|
|
8603
8727
|
taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
|
|
@@ -8605,7 +8729,7 @@ class ChartRows extends DateProcessor {
|
|
|
8605
8729
|
(this.parent.enableRtl ? 'right;' : 'left;')) : '') +
|
|
8606
8730
|
+(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
|
|
8607
8731
|
+(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
8608
|
-
this.taskBarHeight + 'px;"
|
|
8732
|
+
this.taskBarHeight + 'px;"></span>';
|
|
8609
8733
|
}
|
|
8610
8734
|
}
|
|
8611
8735
|
const template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
|
|
@@ -8631,6 +8755,7 @@ class ChartRows extends DateProcessor {
|
|
|
8631
8755
|
data.ganttProperties.segments.length === 0))) {
|
|
8632
8756
|
if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
8633
8757
|
let templateElement = this.createDivElement(template)[0];
|
|
8758
|
+
templateElement.innerText = labelString;
|
|
8634
8759
|
let childLabel = this.parent.labelSettings.taskLabel;
|
|
8635
8760
|
if (childLabel && childLabel['elementRef'])
|
|
8636
8761
|
templateElement.appendChild(tempDiv);
|
|
@@ -9113,6 +9238,11 @@ class ChartRows extends DateProcessor {
|
|
|
9113
9238
|
if (labelString) {
|
|
9114
9239
|
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
9115
9240
|
leftLabelTemplateNode = this.getLableText(labelString, leftLabelInnerDiv);
|
|
9241
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
9242
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
9243
|
+
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
9244
|
+
leftLabelTemplateNode = this.getLableText(labelString, leftLabelInnerDiv);
|
|
9245
|
+
}
|
|
9116
9246
|
}
|
|
9117
9247
|
}
|
|
9118
9248
|
if (leftLabelTemplateNode && leftLabelTemplateNode.length > 0) {
|
|
@@ -9163,6 +9293,11 @@ class ChartRows extends DateProcessor {
|
|
|
9163
9293
|
if (labelString) {
|
|
9164
9294
|
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
9165
9295
|
rightLabelTemplateNode = this.getLableText(labelString, rightLabelInnerDiv);
|
|
9296
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
9297
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
9298
|
+
labelString = labelString === 'isCustomTemplate' ? field : labelString;
|
|
9299
|
+
rightLabelTemplateNode = this.getLableText(labelString, rightLabelInnerDiv);
|
|
9300
|
+
}
|
|
9166
9301
|
}
|
|
9167
9302
|
}
|
|
9168
9303
|
if (rightLabelTemplateNode && rightLabelTemplateNode.length > 0) {
|
|
@@ -9214,7 +9349,7 @@ class ChartRows extends DateProcessor {
|
|
|
9214
9349
|
'<div class="' + manualParentMilestoneBottom + '" style="top:' +
|
|
9215
9350
|
(this.milesStoneRadius) + 'px;border-right-width:' + this.milesStoneRadius + 'px; border-left-width:' +
|
|
9216
9351
|
this.milesStoneRadius + 'px; border-top-width:' + this.milesStoneRadius + 'px;"></div></div>';
|
|
9217
|
-
return this.createDivElement(data.ganttProperties.width === 0 ? milestoneTemplate : template);
|
|
9352
|
+
return this.createDivElement(data.ganttProperties.width === 0 ? milestoneTemplate : !data.ganttProperties.isMilestone ? template : null);
|
|
9218
9353
|
}
|
|
9219
9354
|
/**
|
|
9220
9355
|
* To get parent taskbar node.
|
|
@@ -9258,6 +9393,9 @@ class ChartRows extends DateProcessor {
|
|
|
9258
9393
|
else {
|
|
9259
9394
|
labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
|
|
9260
9395
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
9396
|
+
if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
|
|
9397
|
+
labelString = SanitizeHtmlHelper.sanitize(labelString);
|
|
9398
|
+
}
|
|
9261
9399
|
}
|
|
9262
9400
|
if (labelString.indexOf('null') === -1) {
|
|
9263
9401
|
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
|
|
@@ -9270,7 +9408,7 @@ class ChartRows extends DateProcessor {
|
|
|
9270
9408
|
'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
|
|
9271
9409
|
'display:' + 'inline-block;' +
|
|
9272
9410
|
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
9273
|
-
this.taskBarHeight + 'px;"
|
|
9411
|
+
this.taskBarHeight + 'px;"></span>';
|
|
9274
9412
|
}
|
|
9275
9413
|
else {
|
|
9276
9414
|
labelDiv = '<span class="' +
|
|
@@ -9280,9 +9418,10 @@ class ChartRows extends DateProcessor {
|
|
|
9280
9418
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
9281
9419
|
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
|
|
9282
9420
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
9283
|
-
this.taskBarHeight + 'px;"
|
|
9421
|
+
this.taskBarHeight + 'px;"></span>';
|
|
9284
9422
|
}
|
|
9285
9423
|
let labelElement = this.createDivElement(labelDiv)[0];
|
|
9424
|
+
labelElement.innerText = labelString;
|
|
9286
9425
|
let parentLabel = this.parent.labelSettings.taskLabel;
|
|
9287
9426
|
if (parentLabel && parentLabel['elementRef'])
|
|
9288
9427
|
labelElement.appendChild(div);
|
|
@@ -9449,7 +9588,7 @@ class ChartRows extends DateProcessor {
|
|
|
9449
9588
|
const mileStoneLeft = -(this.connectorPointWidth + 2);
|
|
9450
9589
|
const pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9451
9590
|
let marginTop;
|
|
9452
|
-
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9591
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
|
|
9453
9592
|
marginTop = '';
|
|
9454
9593
|
}
|
|
9455
9594
|
else {
|
|
@@ -9468,7 +9607,7 @@ class ChartRows extends DateProcessor {
|
|
|
9468
9607
|
const pointerRight = this.parent.isAdaptive ? 10 : -2;
|
|
9469
9608
|
const pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9470
9609
|
let marginTop;
|
|
9471
|
-
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9610
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
|
|
9472
9611
|
marginTop = '';
|
|
9473
9612
|
}
|
|
9474
9613
|
else {
|
|
@@ -9757,6 +9896,9 @@ class ChartRows extends DateProcessor {
|
|
|
9757
9896
|
this.parent.renderTemplates();
|
|
9758
9897
|
this.triggerQueryTaskbarInfo();
|
|
9759
9898
|
this.parent.modifiedRecords = [];
|
|
9899
|
+
if (this.parent.viewType == 'ResourceView' && this.parent.showOverAllocation) {
|
|
9900
|
+
this.updateOverlapped();
|
|
9901
|
+
}
|
|
9760
9902
|
if (collapsedResourceRecord.length) {
|
|
9761
9903
|
for (let j = 0; j < collapsedResourceRecord.length; j++) {
|
|
9762
9904
|
if (collapsedResourceRecord[j].hasChildRecords) {
|
|
@@ -9783,22 +9925,37 @@ class ChartRows extends DateProcessor {
|
|
|
9783
9925
|
const taskbarContainerNode = this.taskbarContainer();
|
|
9784
9926
|
taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
|
|
9785
9927
|
taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
|
|
9786
|
-
|
|
9787
|
-
if (
|
|
9928
|
+
let connectorLineLeftNode;
|
|
9929
|
+
if (!this.templateData.hasChildRecords && !this.parent.allowParentDependency) {
|
|
9930
|
+
const connectorLineLeftNode = this.getLeftPointNode();
|
|
9788
9931
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9789
9932
|
}
|
|
9933
|
+
else if (this.parent.allowParentDependency) {
|
|
9934
|
+
connectorLineLeftNode = this.getLeftPointNode();
|
|
9935
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
9936
|
+
taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9937
|
+
}
|
|
9938
|
+
}
|
|
9790
9939
|
if (this.templateData.hasChildRecords) {
|
|
9791
9940
|
const parentTaskbarTemplateNode = this.getParentTaskbarNode(i, taskbarContainerNode);
|
|
9941
|
+
const milestoneTemplateNode = this.getMilestoneNode(i, taskbarContainerNode);
|
|
9792
9942
|
if (!this.templateData.ganttProperties.isAutoSchedule) {
|
|
9793
9943
|
const manualTaskbar = this.getManualTaskbar();
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9944
|
+
if (!isNullOrUndefined(manualTaskbar[0])) {
|
|
9945
|
+
if (this.parent.allowParentDependency) {
|
|
9946
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9947
|
+
const connectorLineRightNode = this.getRightPointNode();
|
|
9948
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
9949
|
+
}
|
|
9950
|
+
taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
|
|
9951
|
+
}
|
|
9798
9952
|
}
|
|
9799
9953
|
if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
|
|
9800
9954
|
taskbarContainerNode[0].appendChild([].slice.call(parentTaskbarTemplateNode)[0]);
|
|
9801
9955
|
}
|
|
9956
|
+
else if (milestoneTemplateNode && milestoneTemplateNode.length > 0) {
|
|
9957
|
+
taskbarContainerNode[0].appendChild([].slice.call(milestoneTemplateNode)[0]);
|
|
9958
|
+
}
|
|
9802
9959
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
9803
9960
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
9804
9961
|
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()))
|
|
@@ -9868,8 +10025,13 @@ class ChartRows extends DateProcessor {
|
|
|
9868
10025
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
9869
10026
|
}
|
|
9870
10027
|
}
|
|
9871
|
-
|
|
9872
|
-
|
|
10028
|
+
let connectorLineRightNode;
|
|
10029
|
+
if (this.parent.allowParentDependency && ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords)) {
|
|
10030
|
+
connectorLineRightNode = this.getRightPointNode();
|
|
10031
|
+
taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
10032
|
+
}
|
|
10033
|
+
else if (!this.parent.allowParentDependency) {
|
|
10034
|
+
connectorLineRightNode = this.getRightPointNode();
|
|
9873
10035
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
9874
10036
|
}
|
|
9875
10037
|
const rightLabelNode = this.getRightLabelNode(i);
|
|
@@ -9890,6 +10052,10 @@ class ChartRows extends DateProcessor {
|
|
|
9890
10052
|
else {
|
|
9891
10053
|
const text = createElement('Text');
|
|
9892
10054
|
text.innerHTML = indicators[indicatorIndex].name;
|
|
10055
|
+
if (this.parent.enableHtmlSanitizer && typeof (indicators[indicatorIndex].name) === 'string') {
|
|
10056
|
+
indicators[indicatorIndex].name = SanitizeHtmlHelper.sanitize(indicators[indicatorIndex].name);
|
|
10057
|
+
text.innerText = indicators[indicatorIndex].name;
|
|
10058
|
+
}
|
|
9893
10059
|
taskIndicatorTextNode = text.childNodes;
|
|
9894
10060
|
}
|
|
9895
10061
|
taskIndicatorNode[0].appendChild([].slice.call(taskIndicatorTextNode)[0]);
|
|
@@ -9982,7 +10148,7 @@ class ChartRows extends DateProcessor {
|
|
|
9982
10148
|
getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor :
|
|
9983
10149
|
(trElement.querySelector('.' + baselineBar) ? getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor : null);
|
|
9984
10150
|
}
|
|
9985
|
-
else {
|
|
10151
|
+
else if (taskbarElement) {
|
|
9986
10152
|
const childTask = taskbarElement.querySelector(classCollections[0]);
|
|
9987
10153
|
const progressTask = taskbarElement.querySelector(classCollections[1]);
|
|
9988
10154
|
args.taskbarBgColor = isNullOrUndefined(childTask) ? null : taskbarElement.classList.contains(traceChildTaskBar) ?
|
|
@@ -10061,7 +10227,7 @@ class ChartRows extends DateProcessor {
|
|
|
10061
10227
|
trElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
|
|
10062
10228
|
}
|
|
10063
10229
|
}
|
|
10064
|
-
else {
|
|
10230
|
+
else if (taskbarElement) {
|
|
10065
10231
|
if (taskbarElement.querySelector(classCollections[0]) &&
|
|
10066
10232
|
getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor !== args.taskbarBgColor) {
|
|
10067
10233
|
taskbarElement.querySelector(classCollections[0]).style.backgroundColor = args.taskbarBgColor;
|
|
@@ -10163,6 +10329,78 @@ class ChartRows extends DateProcessor {
|
|
|
10163
10329
|
}
|
|
10164
10330
|
return null;
|
|
10165
10331
|
}
|
|
10332
|
+
// to update the eOverlapped property
|
|
10333
|
+
updateOverlapped() {
|
|
10334
|
+
for (let k = 0; k < this.parent.treeGrid.parentData.length; k++) {
|
|
10335
|
+
let childRecords = this.parent.treeGrid.parentData[k].childRecords;
|
|
10336
|
+
for (let i = 0; i < childRecords.length; i++) {
|
|
10337
|
+
if (childRecords[i + 1]) {
|
|
10338
|
+
childRecords[i].ganttProperties.eOverlapped = undefined;
|
|
10339
|
+
}
|
|
10340
|
+
for (let j = i + 1; j < childRecords.length; j++) {
|
|
10341
|
+
childRecords[j].ganttProperties.eOverlapped = undefined;
|
|
10342
|
+
if (childRecords[i].ganttProperties.startDate.getTime() < childRecords[j].ganttProperties.endDate.getTime() &&
|
|
10343
|
+
childRecords[i].ganttProperties.endDate.getTime() > childRecords[j].ganttProperties.startDate.getTime()) {
|
|
10344
|
+
childRecords[j].ganttProperties.eOverlapped = true;
|
|
10345
|
+
childRecords[i].ganttProperties.eOverlapped = true;
|
|
10346
|
+
}
|
|
10347
|
+
else {
|
|
10348
|
+
if (isNullOrUndefined(childRecords[j].ganttProperties.eOverlapped)) {
|
|
10349
|
+
childRecords[j].ganttProperties.eOverlapped = false;
|
|
10350
|
+
}
|
|
10351
|
+
if (isNullOrUndefined(childRecords[i].ganttProperties.eOverlapped)) {
|
|
10352
|
+
childRecords[i].ganttProperties.eOverlapped = false;
|
|
10353
|
+
}
|
|
10354
|
+
}
|
|
10355
|
+
}
|
|
10356
|
+
}
|
|
10357
|
+
}
|
|
10358
|
+
}
|
|
10359
|
+
// To update the row height when allow overallocation set to false
|
|
10360
|
+
updateDragDropRecords(data, tr) {
|
|
10361
|
+
let childRecords = data.childRecords;
|
|
10362
|
+
let rowIndex = this.parent.currentViewData.indexOf(data);
|
|
10363
|
+
let treeGridContentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
10364
|
+
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
10365
|
+
if (!tr) {
|
|
10366
|
+
tr = this.ganttChartTableBody.childNodes[rowIndex];
|
|
10367
|
+
}
|
|
10368
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = this.parent.rowHeight + 'px';
|
|
10369
|
+
this.parent.contentHeight = treeGridContentHeight;
|
|
10370
|
+
let rowIDs = [];
|
|
10371
|
+
let rowCounts = 0;
|
|
10372
|
+
if (data) {
|
|
10373
|
+
for (let i = 0; i < childRecords.length; i++) {
|
|
10374
|
+
for (let j = i + 1; j < childRecords.length; j++) {
|
|
10375
|
+
let taskbarContainer = tr.getElementsByClassName('e-taskbar-main-container');
|
|
10376
|
+
for (let k = 0; k < taskbarContainer.length; k++) {
|
|
10377
|
+
if (childRecords[i].ganttProperties.startDate.getTime() < childRecords[j].ganttProperties.endDate.getTime() &&
|
|
10378
|
+
childRecords[i].ganttProperties.endDate.getTime() > childRecords[j].ganttProperties.startDate.getTime()) {
|
|
10379
|
+
if (taskbarContainer[k].getAttribute('rowuniqueid') === childRecords[j]['rowUniqueID'] &&
|
|
10380
|
+
rowIDs.indexOf(childRecords[j]['rowUniqueID']) == -1) {
|
|
10381
|
+
rowIDs.push(childRecords[j]['rowUniqueID']);
|
|
10382
|
+
rowCounts++;
|
|
10383
|
+
tr.children[0]['style'].verticalAlign = 'baseline';
|
|
10384
|
+
tr.getElementsByClassName('e-taskbar-main-container')[k]['style'].marginTop = (rowCounts * this.parent.rowHeight) + this.taskBarMarginTop + 'px';
|
|
10385
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = parseInt(tr['style'].height) + this.parent.rowHeight + 'px';
|
|
10386
|
+
}
|
|
10387
|
+
}
|
|
10388
|
+
else {
|
|
10389
|
+
if (taskbarContainer[k].getAttribute('rowuniqueid') === childRecords[j]['rowUniqueID'] &&
|
|
10390
|
+
rowIDs.indexOf(childRecords[j]['rowUniqueID']) == -1 && this.parent.rowDragAndDropModule &&
|
|
10391
|
+
this.parent.rowDragAndDropModule['draggedRecord'] && taskbarContainer[k].getAttribute('rowuniqueid') ===
|
|
10392
|
+
this.parent.rowDragAndDropModule['draggedRecord']['rowUniqueID'] && this.parent.rowDragAndDropModule['draggedRecord']['rowUniqueID'] === childRecords[j]['rowUniqueID']) {
|
|
10393
|
+
tr.getElementsByClassName('e-taskbar-main-container')[k]['style'].marginTop =
|
|
10394
|
+
this.parent.editModule.taskbarEditModule.draggedRecordMarginTop;
|
|
10395
|
+
}
|
|
10396
|
+
}
|
|
10397
|
+
}
|
|
10398
|
+
}
|
|
10399
|
+
}
|
|
10400
|
+
this.parent.contentHeight = treeGridContentHeight;
|
|
10401
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
10402
|
+
}
|
|
10403
|
+
}
|
|
10166
10404
|
/**
|
|
10167
10405
|
* To refresh edited TR
|
|
10168
10406
|
*
|
|
@@ -10176,14 +10414,22 @@ class ChartRows extends DateProcessor {
|
|
|
10176
10414
|
const selectedItem = this.parent.currentViewData[index];
|
|
10177
10415
|
if (index !== -1 && selectedItem) {
|
|
10178
10416
|
const data = selectedItem;
|
|
10417
|
+
if (!this.parent.allowTaskbarOverlap && this.parent.viewType === 'ResourceView' && data.expanded) {
|
|
10418
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(index)['style'].height = this.parent.rowHeight + 'px';
|
|
10419
|
+
}
|
|
10179
10420
|
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar) {
|
|
10180
10421
|
tr.replaceChild(this.getResourceParent(data).childNodes[0], tr.childNodes[0]);
|
|
10181
10422
|
}
|
|
10182
10423
|
else {
|
|
10183
|
-
|
|
10424
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && !data.expanded) {
|
|
10425
|
+
tr.replaceWith(this.getGanttChartRow(index, data));
|
|
10426
|
+
}
|
|
10427
|
+
else {
|
|
10428
|
+
tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
|
|
10429
|
+
}
|
|
10184
10430
|
}
|
|
10185
10431
|
this.parent.renderTemplates();
|
|
10186
|
-
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
|
|
10432
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && this.parent.allowTaskbarOverlap) {
|
|
10187
10433
|
if (isValidateRange) {
|
|
10188
10434
|
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
10189
10435
|
}
|
|
@@ -10205,6 +10451,12 @@ class ChartRows extends DateProcessor {
|
|
|
10205
10451
|
}
|
|
10206
10452
|
const dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
|
|
10207
10453
|
this.parent.treeGrid.grid.setRowData(dataId, data);
|
|
10454
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap) {
|
|
10455
|
+
this.updateDragDropRecords(selectedItem, tr);
|
|
10456
|
+
}
|
|
10457
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
10458
|
+
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
10459
|
+
}
|
|
10208
10460
|
let nextEditableElement = this.parent.ganttChartModule.tempNextElement;
|
|
10209
10461
|
if (this.parent.ganttChartModule.isEditableElement && nextEditableElement) {
|
|
10210
10462
|
this.parent.treeGrid.grid.focusModule.focus();
|
|
@@ -10218,7 +10470,7 @@ class ChartRows extends DateProcessor {
|
|
|
10218
10470
|
getResourceParent(record) {
|
|
10219
10471
|
const chartRows = this.parent.ganttChartModule.getChartRows();
|
|
10220
10472
|
//Below code is for rendering taskbartemplate in resource view with multi taskbar
|
|
10221
|
-
if (this.parent.initialChartRowElements) {
|
|
10473
|
+
if (this.parent.initialChartRowElements && (!this.parent.allowTaskbarDragAndDrop && this.parent.allowTaskbarOverlap)) {
|
|
10222
10474
|
for (let j = 0; j < this.parent.initialChartRowElements.length; j++) {
|
|
10223
10475
|
if (!isNullOrUndefined(chartRows[j])) {
|
|
10224
10476
|
if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
|
|
@@ -10246,7 +10498,7 @@ class ChartRows extends DateProcessor {
|
|
|
10246
10498
|
const id = chartRows[i].querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
|
|
10247
10499
|
const ganttData = this.parent.getRecordByID(id);
|
|
10248
10500
|
let zIndex = "";
|
|
10249
|
-
if (ganttData && ganttData.ganttProperties.eOverlapIndex) {
|
|
10501
|
+
if (ganttData && !isNullOrUndefined(ganttData.ganttProperties.eOverlapIndex)) {
|
|
10250
10502
|
zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
|
|
10251
10503
|
}
|
|
10252
10504
|
const cloneChildElement = cloneElement.cloneNode(true);
|
|
@@ -10393,7 +10645,9 @@ class Dependency {
|
|
|
10393
10645
|
for (let count = length; count >= 0; count--) {
|
|
10394
10646
|
const ganttData = predecessorTasks[count];
|
|
10395
10647
|
const ganttProp = ganttData.ganttProperties;
|
|
10396
|
-
|
|
10648
|
+
if ((!ganttData.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
|
|
10649
|
+
this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
|
|
10650
|
+
}
|
|
10397
10651
|
}
|
|
10398
10652
|
}
|
|
10399
10653
|
/**
|
|
@@ -10555,18 +10809,26 @@ class Dependency {
|
|
|
10555
10809
|
offsetUnit: offsetUnits.durationUnit,
|
|
10556
10810
|
offset: offsetUnits.duration
|
|
10557
10811
|
};
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
if (this.parent.connectorLineEditModule && toData && fromData) {
|
|
10562
|
-
isValid = this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
|
|
10563
|
-
if (isValid)
|
|
10812
|
+
const isOwnParent = this.checkIsParent(match[0]);
|
|
10813
|
+
if (!this.parent.allowParentDependency) {
|
|
10814
|
+
if (!isOwnParent) {
|
|
10564
10815
|
collection.push(obj);
|
|
10816
|
+
}
|
|
10565
10817
|
}
|
|
10566
10818
|
else {
|
|
10567
|
-
|
|
10819
|
+
let fromData = this.parent.connectorLineModule.getRecordByID(obj.to);
|
|
10820
|
+
let toData = this.parent.connectorLineModule.getRecordByID(obj.from);
|
|
10821
|
+
let isValid;
|
|
10822
|
+
if (this.parent.connectorLineEditModule && toData && fromData) {
|
|
10823
|
+
isValid = this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
|
|
10824
|
+
if (isValid)
|
|
10825
|
+
collection.push(obj);
|
|
10826
|
+
}
|
|
10827
|
+
else {
|
|
10828
|
+
collection.push(obj);
|
|
10829
|
+
}
|
|
10830
|
+
match.splice(0);
|
|
10568
10831
|
}
|
|
10569
|
-
match.splice(0);
|
|
10570
10832
|
});
|
|
10571
10833
|
return collection;
|
|
10572
10834
|
}
|
|
@@ -10689,7 +10951,9 @@ class Dependency {
|
|
|
10689
10951
|
const length = predecessorsCollection.length;
|
|
10690
10952
|
for (let count = 0; count < length; count++) {
|
|
10691
10953
|
ganttRecord = predecessorsCollection[count];
|
|
10692
|
-
|
|
10954
|
+
if ((!ganttRecord.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
|
|
10955
|
+
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
10956
|
+
}
|
|
10693
10957
|
}
|
|
10694
10958
|
}
|
|
10695
10959
|
/**
|
|
@@ -10738,12 +11002,16 @@ class Dependency {
|
|
|
10738
11002
|
* @private
|
|
10739
11003
|
*/
|
|
10740
11004
|
updatedRecordsDateByPredecessor() {
|
|
11005
|
+
if (!this.parent.autoCalculateDateScheduling) {
|
|
11006
|
+
return;
|
|
11007
|
+
}
|
|
10741
11008
|
const flatData = this.parent.flatData;
|
|
10742
11009
|
const totLength = this.parent.flatData.length;
|
|
10743
11010
|
for (let count = 0; count < totLength; count++) {
|
|
10744
11011
|
if (flatData[count].ganttProperties.predecessorsName) {
|
|
10745
11012
|
this.validatePredecessorDates(flatData[count]);
|
|
10746
|
-
if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
|
|
11013
|
+
if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
|
|
11014
|
+
&& this.parent.allowParentDependency) {
|
|
10747
11015
|
this.parent.editModule['updateChildItems'](flatData[count]);
|
|
10748
11016
|
}
|
|
10749
11017
|
}
|
|
@@ -10788,7 +11056,7 @@ class Dependency {
|
|
|
10788
11056
|
const predecessor = predecessors[count];
|
|
10789
11057
|
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor.from);
|
|
10790
11058
|
record = this.parent.connectorLineModule.getRecordByID(predecessor.to);
|
|
10791
|
-
if (this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
|
|
11059
|
+
if (this.parent.allowParentDependency && this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
|
|
10792
11060
|
&& (ganttRecord.hasChildRecords || record.hasChildRecords)) {
|
|
10793
11061
|
this.parentPredecessors.push(ganttRecord);
|
|
10794
11062
|
}
|
|
@@ -11469,9 +11737,16 @@ class ConnectorLine {
|
|
|
11469
11737
|
* @private
|
|
11470
11738
|
*/
|
|
11471
11739
|
getHeightValue(data) {
|
|
11472
|
-
|
|
11473
|
-
(
|
|
11474
|
-
|
|
11740
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
11741
|
+
return (data.parentIndex * this.parent.rowHeight) > (data.childIndex * this.parent.rowHeight) ?
|
|
11742
|
+
((data.parentIndex * this.parent.rowHeight) - (data.childIndex * this.parent.rowHeight)) :
|
|
11743
|
+
((data.childIndex * this.parent.rowHeight) - (data.parentIndex * this.parent.rowHeight));
|
|
11744
|
+
}
|
|
11745
|
+
else {
|
|
11746
|
+
return (data.parentIndex * data.rowHeight) > (data.childIndex * data.rowHeight) ?
|
|
11747
|
+
((data.parentIndex * data.rowHeight) - (data.childIndex * data.rowHeight)) :
|
|
11748
|
+
((data.childIndex * data.rowHeight) - (data.parentIndex * data.rowHeight));
|
|
11749
|
+
}
|
|
11475
11750
|
}
|
|
11476
11751
|
/**
|
|
11477
11752
|
* To get sstype2 inner element width.
|
|
@@ -11545,10 +11820,33 @@ class ConnectorLine {
|
|
|
11545
11820
|
if (this.parent.renderBaseline) {
|
|
11546
11821
|
isMilestoneValue = (data.milestoneParent && data.milestoneChild) ? 0 : data.milestoneParent ? -5 : data.milestoneChild ? 5 : 0;
|
|
11547
11822
|
}
|
|
11548
|
-
|
|
11823
|
+
let heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
|
|
11549
11824
|
let borderTopWidth = 0;
|
|
11550
11825
|
let addTop = 0;
|
|
11551
|
-
|
|
11826
|
+
let parentOverlapTopValue = 0;
|
|
11827
|
+
let childOverlapTopValue = 0;
|
|
11828
|
+
let count = 0;
|
|
11829
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
11830
|
+
for (let i = 0; i < this.parent.currentViewData.length; i++) {
|
|
11831
|
+
if (this.parent.getRowByIndex(i).style.display != 'none') {
|
|
11832
|
+
if (count < data.parentIndex) {
|
|
11833
|
+
count++;
|
|
11834
|
+
parentOverlapTopValue = parentOverlapTopValue + this.parent.getRowByIndex(i).offsetHeight;
|
|
11835
|
+
}
|
|
11836
|
+
}
|
|
11837
|
+
}
|
|
11838
|
+
count = 0;
|
|
11839
|
+
for (let j = 0; j < this.parent.currentViewData.length; j++) {
|
|
11840
|
+
if (this.parent.getRowByIndex(j).style.display != 'none') {
|
|
11841
|
+
if (count < data.childIndex) {
|
|
11842
|
+
count++;
|
|
11843
|
+
childOverlapTopValue = childOverlapTopValue + this.parent.getRowByIndex(j).offsetHeight;
|
|
11844
|
+
}
|
|
11845
|
+
}
|
|
11846
|
+
}
|
|
11847
|
+
heightValue = Math.abs(parentOverlapTopValue - childOverlapTopValue);
|
|
11848
|
+
}
|
|
11849
|
+
if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex] && this.parent.allowParentDependency) {
|
|
11552
11850
|
let fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
|
|
11553
11851
|
let toRecordIsParent = this.parent.currentViewData[data.childIndex].hasChildRecords;
|
|
11554
11852
|
let fromRecordIsManual = this.parent.currentViewData[data.parentIndex].ganttProperties.isAutoSchedule;
|
|
@@ -11641,7 +11939,7 @@ class ConnectorLine {
|
|
|
11641
11939
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11642
11940
|
if (this.getParentPosition(data) === 'FSType1') {
|
|
11643
11941
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11644
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11942
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11645
11943
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
|
|
11646
11944
|
div = div + eLine;
|
|
11647
11945
|
div = div + direction + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
|
|
@@ -11661,7 +11959,7 @@ class ConnectorLine {
|
|
|
11661
11959
|
'px;border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div></div>';
|
|
11662
11960
|
}
|
|
11663
11961
|
if (this.getParentPosition(data) === 'FSType2') {
|
|
11664
|
-
div = div + direction + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) + addTop +
|
|
11962
|
+
div = div + direction + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop +
|
|
11665
11963
|
this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11666
11964
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
|
|
11667
11965
|
div = div + eLine;
|
|
@@ -11693,7 +11991,7 @@ class ConnectorLine {
|
|
|
11693
11991
|
}
|
|
11694
11992
|
if (this.getParentPosition(data) === 'FSType3') {
|
|
11695
11993
|
div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11696
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11994
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11697
11995
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
|
|
11698
11996
|
div = div + rightArrow;
|
|
11699
11997
|
div = div + direction + '10px;' + this.getBorderStyles((this.parent.enableRtl ? 'right' : 'left'), 10) +
|
|
@@ -11723,7 +12021,7 @@ class ConnectorLine {
|
|
|
11723
12021
|
}
|
|
11724
12022
|
if (this.getParentPosition(data) === 'FSType4') {
|
|
11725
12023
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11726
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12024
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11727
12025
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
|
|
11728
12026
|
div = div + rightArrow;
|
|
11729
12027
|
div = div + direction + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
|
|
@@ -11749,7 +12047,7 @@ class ConnectorLine {
|
|
|
11749
12047
|
}
|
|
11750
12048
|
if (this.getParentPosition(data) === 'SSType4') {
|
|
11751
12049
|
div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11752
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12050
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11753
12051
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
|
|
11754
12052
|
div = div + rightArrow;
|
|
11755
12053
|
div = div + direction + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
|
|
@@ -11762,7 +12060,7 @@ class ConnectorLine {
|
|
|
11762
12060
|
}
|
|
11763
12061
|
if (this.getParentPosition(data) === 'SSType3') {
|
|
11764
12062
|
div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11765
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12063
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11766
12064
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
|
|
11767
12065
|
div = div + rightArrow;
|
|
11768
12066
|
div = div + direction + '10px;' + duplicateStingTwo;
|
|
@@ -11775,7 +12073,7 @@ class ConnectorLine {
|
|
|
11775
12073
|
}
|
|
11776
12074
|
if (this.getParentPosition(data) === 'SSType2') {
|
|
11777
12075
|
div = div + direction + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11778
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12076
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11779
12077
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
|
|
11780
12078
|
div = div + eLine;
|
|
11781
12079
|
div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
|
|
@@ -11795,7 +12093,7 @@ class ConnectorLine {
|
|
|
11795
12093
|
}
|
|
11796
12094
|
if (this.getParentPosition(data) === 'SSType1') {
|
|
11797
12095
|
div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11798
|
-
((data.parentIndex * data.rowHeight) + addTop +
|
|
12096
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop +
|
|
11799
12097
|
this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11800
12098
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
|
|
11801
12099
|
div = div + eLine;
|
|
@@ -11813,7 +12111,7 @@ class ConnectorLine {
|
|
|
11813
12111
|
}
|
|
11814
12112
|
if (this.getParentPosition(data) === 'FFType1') {
|
|
11815
12113
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11816
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12114
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11817
12115
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
|
|
11818
12116
|
div = div + eLine;
|
|
11819
12117
|
div = div + direction + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
|
|
@@ -11837,7 +12135,7 @@ class ConnectorLine {
|
|
|
11837
12135
|
}
|
|
11838
12136
|
if (this.getParentPosition(data) === 'FFType2') {
|
|
11839
12137
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11840
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12138
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11841
12139
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
|
|
11842
12140
|
div = div + eLine;
|
|
11843
12141
|
div = div + (isMilestoneParent ? direction + '-1px;' : '') + 'width:' +
|
|
@@ -11863,7 +12161,7 @@ class ConnectorLine {
|
|
|
11863
12161
|
}
|
|
11864
12162
|
if (this.getParentPosition(data) === 'FFType3') {
|
|
11865
12163
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11866
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12164
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11867
12165
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
|
|
11868
12166
|
div = div + duplicateStingOne;
|
|
11869
12167
|
div = div + eLine;
|
|
@@ -11886,7 +12184,7 @@ class ConnectorLine {
|
|
|
11886
12184
|
}
|
|
11887
12185
|
if (this.getParentPosition(data) === 'FFType4') {
|
|
11888
12186
|
div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11889
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12187
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11890
12188
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
|
|
11891
12189
|
div = div + leftArrow;
|
|
11892
12190
|
div = div + (direction + ((data.childLeft + data.childWidth) -
|
|
@@ -11915,7 +12213,7 @@ class ConnectorLine {
|
|
|
11915
12213
|
}
|
|
11916
12214
|
if (this.getParentPosition(data) === 'SFType4') {
|
|
11917
12215
|
div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11918
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
12216
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
11919
12217
|
'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
|
|
11920
12218
|
div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
|
|
11921
12219
|
'border-bottom-width:' + (5 + this.lineStroke) +
|
|
@@ -11943,7 +12241,7 @@ class ConnectorLine {
|
|
|
11943
12241
|
}
|
|
11944
12242
|
if (this.getParentPosition(data) === 'SFType3') {
|
|
11945
12243
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11946
|
-
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12244
|
+
((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11947
12245
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
|
|
11948
12246
|
div = div + duplicateStingOne;
|
|
11949
12247
|
div = div + eLine;
|
|
@@ -11961,7 +12259,7 @@ class ConnectorLine {
|
|
|
11961
12259
|
}
|
|
11962
12260
|
if (this.getParentPosition(data) === 'SFType1') {
|
|
11963
12261
|
div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11964
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12262
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11965
12263
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
|
|
11966
12264
|
div = div + eLine;
|
|
11967
12265
|
div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11986,7 +12284,7 @@ class ConnectorLine {
|
|
|
11986
12284
|
}
|
|
11987
12285
|
if (this.getParentPosition(data) === 'SFType2') {
|
|
11988
12286
|
div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11989
|
-
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
12287
|
+
((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11990
12288
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
|
|
11991
12289
|
div = div + eLine;
|
|
11992
12290
|
div = div + direction + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
@@ -12379,7 +12677,7 @@ class Tooltip$1 {
|
|
|
12379
12677
|
this.toolTipObj.position = 'BottomCenter';
|
|
12380
12678
|
this.toolTipObj.openDelay = 700;
|
|
12381
12679
|
this.toolTipObj.enableRtl = this.parent.enableRtl;
|
|
12382
|
-
this.toolTipObj.enableHtmlSanitizer =
|
|
12680
|
+
this.toolTipObj.enableHtmlSanitizer = this.parent.enableHtmlSanitizer;
|
|
12383
12681
|
this.toolTipObj.cssClass = ganttTooltip;
|
|
12384
12682
|
this.toolTipObj.animation = { open: { effect: 'None', delay: 0 }, close: { effect: 'None', delay: 0 } };
|
|
12385
12683
|
this.toolTipObj.afterOpen = this.updateTooltipPosition.bind(this);
|
|
@@ -12592,8 +12890,12 @@ class Tooltip$1 {
|
|
|
12592
12890
|
let taskName;
|
|
12593
12891
|
if (ganttData) {
|
|
12594
12892
|
data = ganttData.ganttProperties;
|
|
12595
|
-
|
|
12596
|
-
|
|
12893
|
+
let taskNameValue = data.taskName;
|
|
12894
|
+
if (this.parent.enableHtmlSanitizer && typeof (taskNameValue) === 'string') {
|
|
12895
|
+
taskNameValue = SanitizeHtmlHelper.sanitize(taskNameValue);
|
|
12896
|
+
}
|
|
12897
|
+
taskName = !isNullOrUndefined(taskNameValue) ? '<tr class = "e-gantt-tooltip-rowcell"><td colspan="3">' +
|
|
12898
|
+
(this.parent.disableHtmlEncode ? taskNameValue.replace(/</g, "<").replace(/>/g, ">") : taskNameValue) + '</td></tr>' : '';
|
|
12597
12899
|
}
|
|
12598
12900
|
switch (elementType) {
|
|
12599
12901
|
case 'milestone':
|
|
@@ -12605,9 +12907,13 @@ class Tooltip$1 {
|
|
|
12605
12907
|
else if (!isNullOrUndefined(data.startDate)) {
|
|
12606
12908
|
milestoneStartDate = data.startDate;
|
|
12607
12909
|
}
|
|
12608
|
-
|
|
12910
|
+
let sDateValue = this.parent.getFormatedDate(milestoneStartDate, this.parent.getDateFormat());
|
|
12911
|
+
if (this.parent.enableHtmlSanitizer && typeof (sDateValue) === 'string') {
|
|
12912
|
+
sDateValue = SanitizeHtmlHelper.sanitize(sDateValue);
|
|
12913
|
+
}
|
|
12914
|
+
let sDate = !isNullOrUndefined(milestoneStartDate) ? '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
|
|
12609
12915
|
'<td class = "e-gantt-tooltip-value">' +
|
|
12610
|
-
|
|
12916
|
+
sDateValue + '</td></tr>' : '';
|
|
12611
12917
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
12612
12918
|
taskName + sDate + '</tbody></table>';
|
|
12613
12919
|
break;
|
|
@@ -12615,20 +12921,28 @@ class Tooltip$1 {
|
|
|
12615
12921
|
case 'taskbar':
|
|
12616
12922
|
{
|
|
12617
12923
|
const scheduledTask = !ganttData.hasChildRecords || data.isAutoSchedule ? true : false;
|
|
12618
|
-
|
|
12924
|
+
let startDateValue = this.parent.getFormatedDate(scheduledTask ? data.startDate : data.autoStartDate, this.parent.getDateFormat());
|
|
12925
|
+
let endDateValue = this.parent.getFormatedDate(scheduledTask ? data.endDate : data.autoEndDate, this.parent.getDateFormat());
|
|
12926
|
+
let durationValue = this.parent.getDurationString((scheduledTask ? data.duration : data.autoDuration), data.durationUnit);
|
|
12927
|
+
let progressValue = data.progress;
|
|
12928
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
12929
|
+
startDateValue = typeof (startDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(startDateValue) : startDateValue;
|
|
12930
|
+
endDateValue = typeof (endDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(endDateValue) : endDateValue;
|
|
12931
|
+
durationValue = typeof (durationValue) === 'string' ? SanitizeHtmlHelper.sanitize(durationValue) : durationValue;
|
|
12932
|
+
progressValue = typeof (progressValue) === 'string' ? SanitizeHtmlHelper.sanitize(progressValue) : progressValue;
|
|
12933
|
+
}
|
|
12934
|
+
let startDate = data.startDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12619
12935
|
this.parent.localeObj.getConstant(scheduledTask ? 'startDate' : 'subTasksStartDate') +
|
|
12620
|
-
'</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
12621
|
-
|
|
12622
|
-
'</td></tr>' : '';
|
|
12623
|
-
const endDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12936
|
+
'</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' + startDateValue + '</td></tr>' : '';
|
|
12937
|
+
let endDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12624
12938
|
this.parent.localeObj.getConstant(scheduledTask ? 'endDate' : 'subTasksEndDate') +
|
|
12625
|
-
'</td><td>:</td
|
|
12626
|
-
|
|
12939
|
+
'</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' + endDateValue + '</td></tr>' : '';
|
|
12940
|
+
let duration = !isNullOrUndefined(data.duration) ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12627
12941
|
this.parent.localeObj.getConstant('duration') + '</td><td>:</td>' +
|
|
12628
|
-
'<td class = "e-gantt-tooltip-value"> ' +
|
|
12942
|
+
'<td class = "e-gantt-tooltip-value"> ' + durationValue +
|
|
12629
12943
|
'</td></tr>' : '';
|
|
12630
|
-
|
|
12631
|
-
this.parent.localeObj.getConstant('progress') + '</td><td>:</td><td>' +
|
|
12944
|
+
let progress = !isNullOrUndefined(data.progress) ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12945
|
+
this.parent.localeObj.getConstant('progress') + '</td><td>:</td><td>' + progressValue +
|
|
12632
12946
|
'</td></tr>' : '';
|
|
12633
12947
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
12634
12948
|
taskName + startDate + endDate + duration + progress + '</tbody></table>';
|
|
@@ -12636,82 +12950,131 @@ class Tooltip$1 {
|
|
|
12636
12950
|
}
|
|
12637
12951
|
case 'baseline':
|
|
12638
12952
|
{
|
|
12953
|
+
let baselineStartDateValue = this.parent.getFormatedDate(data.baselineStartDate, this.parent.getDateFormat());
|
|
12954
|
+
let baselineEndDateValue = this.parent.getFormatedDate(data.baselineEndDate, this.parent.getDateFormat());
|
|
12955
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
12956
|
+
baselineStartDateValue = typeof (baselineStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(baselineStartDateValue) : baselineStartDateValue;
|
|
12957
|
+
baselineEndDateValue = typeof (baselineEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(baselineEndDateValue) : baselineEndDateValue;
|
|
12958
|
+
}
|
|
12639
12959
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
12640
12960
|
taskName + '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12641
12961
|
this.parent.localeObj.getConstant('baselineStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
12642
|
-
|
|
12962
|
+
baselineStartDateValue + '</td></tr><tr>' +
|
|
12643
12963
|
'<td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('baselineEndDate') +
|
|
12644
12964
|
'</td><td>:</td><td class = "e-gantt-tooltip-value">' +
|
|
12645
|
-
|
|
12965
|
+
baselineEndDateValue + '</td></tr></tbody></table>';
|
|
12646
12966
|
break;
|
|
12647
12967
|
}
|
|
12648
12968
|
case 'marker':
|
|
12649
12969
|
{
|
|
12650
12970
|
const markerTooltipElement = parent.tooltipModule.getMarkerTooltipData(args);
|
|
12651
|
-
|
|
12971
|
+
let markerTooltipElementValue = this.parent.getFormatedDate(this.parent.dateValidationModule.getDateFromFormat(markerTooltipElement.day), this.parent.getDateFormat());
|
|
12972
|
+
let markerLabel = markerTooltipElement.label ? markerTooltipElement.label : '';
|
|
12973
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
12974
|
+
markerLabel = typeof (markerLabel) === 'string' ? SanitizeHtmlHelper.sanitize(markerLabel) : markerLabel;
|
|
12975
|
+
markerTooltipElementValue = typeof (markerTooltipElementValue) === 'string' ? SanitizeHtmlHelper.sanitize(markerTooltipElementValue) : markerTooltipElementValue;
|
|
12976
|
+
}
|
|
12652
12977
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr><td>' +
|
|
12653
|
-
|
|
12654
|
-
'</td></tr><tr><td>' +
|
|
12655
|
-
markerLabel + '</td></tr></tbody></table>';
|
|
12978
|
+
markerTooltipElementValue + '</td></tr><tr><td>' + (this.parent.disableHtmlEncode ? markerLabel.replace(/</g, "<").replace(/>/g, ">") : markerLabel) + '</td></tr></tbody></table>';
|
|
12656
12979
|
break;
|
|
12657
12980
|
}
|
|
12658
12981
|
case 'connectorLine':
|
|
12659
12982
|
{
|
|
12983
|
+
let fromNameValue = parent.tooltipModule.predecessorTooltipData.fromName;
|
|
12984
|
+
let fromIdValue = parent.tooltipModule.predecessorTooltipData.fromId;
|
|
12985
|
+
let toNameValue = parent.tooltipModule.predecessorTooltipData.toName;
|
|
12986
|
+
let toIdValue = parent.tooltipModule.predecessorTooltipData.toId;
|
|
12987
|
+
let linkTextValue = parent.tooltipModule.predecessorTooltipData.linkText;
|
|
12988
|
+
let offsetStringValue = parent.tooltipModule.predecessorTooltipData.offsetString;
|
|
12989
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
12990
|
+
fromNameValue = typeof (fromNameValue) === 'string' ? SanitizeHtmlHelper.sanitize(fromNameValue) : fromNameValue;
|
|
12991
|
+
fromIdValue = typeof (fromIdValue) === 'string' ? SanitizeHtmlHelper.sanitize(fromIdValue) : fromIdValue;
|
|
12992
|
+
toNameValue = typeof (toNameValue) === 'string' ? SanitizeHtmlHelper.sanitize(toNameValue) : toNameValue;
|
|
12993
|
+
toIdValue = typeof (toIdValue) === 'string' ? SanitizeHtmlHelper.sanitize(toIdValue) : toIdValue;
|
|
12994
|
+
linkTextValue = typeof (linkTextValue) === 'string' ? SanitizeHtmlHelper.sanitize(linkTextValue) : linkTextValue;
|
|
12995
|
+
offsetStringValue = typeof (offsetStringValue) === 'string' ? SanitizeHtmlHelper.sanitize(offsetStringValue) : offsetStringValue;
|
|
12996
|
+
}
|
|
12660
12997
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr><td class = "e-gantt-tooltip-label">' +
|
|
12661
12998
|
this.parent.localeObj.getConstant('from') + '</td><td>:</td>' +
|
|
12662
|
-
'<td class = "e-gantt-tooltip-value">' + parent.
|
|
12663
|
-
parent.
|
|
12999
|
+
'<td class = "e-gantt-tooltip-value">' + (this.parent.disableHtmlEncode ? fromNameValue.replace(/</g, "<").replace(/>/g, ">") : fromNameValue) + ' (' +
|
|
13000
|
+
(this.parent.disableHtmlEncode ? (typeof (fromIdValue) === 'string' ? fromIdValue.replace(/</g, "<").replace(/>/g, ">") : fromIdValue) : fromIdValue) + ')' + '</td></tr><tr><td class = "e-gantt-tooltip-label">' +
|
|
12664
13001
|
this.parent.localeObj.getConstant('to') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
12665
|
-
parent.
|
|
12666
|
-
'
|
|
12667
|
-
'</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('taskLink') +
|
|
12668
|
-
'</td><td>:</td><td class = "e-gantt-tooltip-value"> ' + parent.tooltipModule.predecessorTooltipData.linkText +
|
|
13002
|
+
(this.parent.disableHtmlEncode ? toNameValue.replace(/</g, "<").replace(/>/g, ">") : toNameValue) + ' (' + toIdValue + ')' + '</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('taskLink') +
|
|
13003
|
+
'</td><td>:</td><td class = "e-gantt-tooltip-value"> ' + linkTextValue +
|
|
12669
13004
|
'</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('lag') +
|
|
12670
13005
|
'</td><td>:</td><td class = "e-gantt-tooltip-value">' +
|
|
12671
|
-
|
|
13006
|
+
offsetStringValue + '</td></tr></tbody></table>';
|
|
12672
13007
|
break;
|
|
12673
13008
|
}
|
|
12674
13009
|
case 'indicator':
|
|
12675
13010
|
if (args.target.title.length) {
|
|
12676
|
-
|
|
13011
|
+
let titleValue = args.target.title;
|
|
13012
|
+
if (this.parent.enableHtmlSanitizer && typeof (titleValue) === 'string') {
|
|
13013
|
+
titleValue = SanitizeHtmlHelper.sanitize(titleValue);
|
|
13014
|
+
}
|
|
13015
|
+
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr>' + titleValue + '</tr></tbody></table>';
|
|
12677
13016
|
}
|
|
12678
13017
|
break;
|
|
12679
13018
|
case 'timeline':
|
|
12680
|
-
|
|
13019
|
+
let timlineTitleValue = args.target.title;
|
|
13020
|
+
if (this.parent.enableHtmlSanitizer && typeof (timlineTitleValue) === 'string') {
|
|
13021
|
+
timlineTitleValue = SanitizeHtmlHelper.sanitize(timlineTitleValue);
|
|
13022
|
+
}
|
|
13023
|
+
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr>' + timlineTitleValue + '</tr></tbody></table>';
|
|
12681
13024
|
break;
|
|
12682
13025
|
case 'manualtaskbar':
|
|
12683
13026
|
{
|
|
12684
|
-
|
|
13027
|
+
let autoStartDateValue = this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat());
|
|
13028
|
+
let autoEndDateValue = this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat());
|
|
13029
|
+
let durationUnitValue = this.parent.getDurationString(data.duration, data.durationUnit);
|
|
13030
|
+
let manualStartDateValue = this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat());
|
|
13031
|
+
let manualEndDateValue = this.parent.getFormatedDate(data.endDate, this.parent.getDateFormat());
|
|
13032
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
13033
|
+
autoStartDateValue = typeof (autoStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoStartDateValue) : autoStartDateValue;
|
|
13034
|
+
autoEndDateValue = typeof (autoEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoEndDateValue) : autoEndDateValue;
|
|
13035
|
+
durationUnitValue = typeof (durationUnitValue) === 'string' ? SanitizeHtmlHelper.sanitize(durationUnitValue) : durationUnitValue;
|
|
13036
|
+
manualStartDateValue = typeof (manualStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(manualStartDateValue) : manualStartDateValue;
|
|
13037
|
+
manualEndDateValue = typeof (manualEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(manualEndDateValue) : manualEndDateValue;
|
|
13038
|
+
}
|
|
13039
|
+
let autoStartDate = data.autoStartDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12685
13040
|
this.parent.localeObj.getConstant('subTasksStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
12686
|
-
|
|
12687
|
-
|
|
13041
|
+
autoStartDateValue + '</td></tr>' : '';
|
|
13042
|
+
let autoEndDate = data.autoEndDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12688
13043
|
this.parent.localeObj.getConstant('subTasksEndDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
12689
|
-
|
|
12690
|
-
|
|
13044
|
+
autoEndDateValue + '</td></tr>' : '';
|
|
13045
|
+
let durationValue = !isNullOrUndefined(data.duration) ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12691
13046
|
this.parent.localeObj.getConstant('duration') + '</td><td>:</td>' +
|
|
12692
|
-
'<td class = "e-gantt-tooltip-value"> ' +
|
|
13047
|
+
'<td class = "e-gantt-tooltip-value"> ' + durationUnitValue +
|
|
12693
13048
|
'</td></tr>' : '';
|
|
12694
|
-
|
|
13049
|
+
let manualStartDate = data.startDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12695
13050
|
this.parent.localeObj.getConstant('startDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
12696
|
-
|
|
12697
|
-
|
|
13051
|
+
manualStartDateValue + '</td></tr>' : '';
|
|
13052
|
+
let manualEndDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12698
13053
|
this.parent.localeObj.getConstant('endDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
12699
|
-
|
|
13054
|
+
manualEndDateValue + '</td></tr>' : '';
|
|
12700
13055
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
12701
13056
|
taskName + manualStartDate + autoStartDate + manualEndDate + autoEndDate + durationValue + '</tbody></table>';
|
|
12702
13057
|
break;
|
|
12703
13058
|
}
|
|
12704
13059
|
case 'manualmilestone':
|
|
12705
13060
|
{
|
|
12706
|
-
|
|
13061
|
+
let autoStartValue = this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat());
|
|
13062
|
+
let autoEndValue = this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat());
|
|
13063
|
+
let dateValue = this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat());
|
|
13064
|
+
if (this.parent.enableHtmlSanitizer) {
|
|
13065
|
+
autoStartValue = typeof (autoStartValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoStartValue) : autoStartValue;
|
|
13066
|
+
autoEndValue = typeof (autoEndValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoEndValue) : autoEndValue;
|
|
13067
|
+
dateValue = typeof (dateValue) === 'string' ? SanitizeHtmlHelper.sanitize(dateValue) : dateValue;
|
|
13068
|
+
}
|
|
13069
|
+
let autoStart = data.autoStartDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12707
13070
|
this.parent.localeObj.getConstant('subTasksStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
|
|
12708
|
-
|
|
12709
|
-
|
|
13071
|
+
autoStartValue + '</td></tr>' : '';
|
|
13072
|
+
let autoEnd = data.autoEndDate ? '<tr><td class = "e-gantt-tooltip-label">' +
|
|
12710
13073
|
this.parent.localeObj.getConstant('subTasksEndDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
|
|
12711
|
-
|
|
12712
|
-
|
|
13074
|
+
autoEndValue + '</td></tr>' : '';
|
|
13075
|
+
let date = '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
|
|
12713
13076
|
'<td class = "e-gantt-tooltip-value">' +
|
|
12714
|
-
|
|
13077
|
+
dateValue + '</tr>';
|
|
12715
13078
|
content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
|
|
12716
13079
|
taskName + date + autoStart + autoEnd + '</tbody></table>';
|
|
12717
13080
|
break;
|
|
@@ -12739,7 +13102,10 @@ class Tooltip$1 {
|
|
|
12739
13102
|
* @private
|
|
12740
13103
|
*/
|
|
12741
13104
|
getPredecessorTooltipData(args) {
|
|
12742
|
-
|
|
13105
|
+
let predeceesorParent = args.target.parentElement.id;
|
|
13106
|
+
if (this.parent.enableHtmlSanitizer && typeof (predeceesorParent) === 'string') {
|
|
13107
|
+
predeceesorParent = SanitizeHtmlHelper.sanitize(predeceesorParent);
|
|
13108
|
+
}
|
|
12743
13109
|
const taskIds = predeceesorParent.match(/ConnectorLineparent(.*)child(.*)/);
|
|
12744
13110
|
taskIds.shift();
|
|
12745
13111
|
let fromTask;
|
|
@@ -12778,7 +13144,7 @@ class Tooltip$1 {
|
|
|
12778
13144
|
*/
|
|
12779
13145
|
templateCompiler(template, parent, data, propName) {
|
|
12780
13146
|
const tooltipFunction = parent.chartRowsModule.templateCompiler(template);
|
|
12781
|
-
|
|
13147
|
+
let templateID = parent.chartRowsModule.getTemplateID(propName);
|
|
12782
13148
|
const templateNode = tooltipFunction(extend({ index: 0 }, data), parent, propName, templateID, true);
|
|
12783
13149
|
return templateNode;
|
|
12784
13150
|
}
|
|
@@ -13018,7 +13384,6 @@ class FocusModule {
|
|
|
13018
13384
|
const top = containerPosition.top + (containerPosition.height / 2);
|
|
13019
13385
|
const left = containerPosition.left + (containerPosition.width / 2);
|
|
13020
13386
|
this.setActiveElement(e.target);
|
|
13021
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
13022
13387
|
contextMenu.open(top, left);
|
|
13023
13388
|
e.preventDefault();
|
|
13024
13389
|
break;
|
|
@@ -13381,6 +13746,12 @@ let Gantt = class Gantt extends Component {
|
|
|
13381
13746
|
this.treeGrid.isReact = true;
|
|
13382
13747
|
this.treeGrid.grid.isReact = true;
|
|
13383
13748
|
}
|
|
13749
|
+
if (this.isVue) {
|
|
13750
|
+
this.treeGrid.isVue = true;
|
|
13751
|
+
this.treeGrid.grid.isVue = true;
|
|
13752
|
+
this.treeGrid.vueInstance = this.vueInstance;
|
|
13753
|
+
this.treeGrid.grid.vueInstance = this.vueInstance;
|
|
13754
|
+
}
|
|
13384
13755
|
createSpinner({ target: this.element }, this.createElement);
|
|
13385
13756
|
this.trigger('load', {});
|
|
13386
13757
|
this.element.classList.add(root);
|
|
@@ -13406,13 +13777,13 @@ let Gantt = class Gantt extends Component {
|
|
|
13406
13777
|
}
|
|
13407
13778
|
hideMaskRow() {
|
|
13408
13779
|
let isTablePresent = this.element.querySelectorAll('.e-masked-table').length;
|
|
13409
|
-
if (!isNullOrUndefined(this.contentMaskTable) && isTablePresent != 0) {
|
|
13780
|
+
if (!isNullOrUndefined(this.contentMaskTable) && (isTablePresent != 0 || this.contentMaskTable)) {
|
|
13410
13781
|
const maskTable = this.contentMaskTable;
|
|
13411
13782
|
remove(maskTable);
|
|
13412
13783
|
this.contentMaskTable = null;
|
|
13413
13784
|
}
|
|
13414
13785
|
isTablePresent = this.element.querySelectorAll('.e-masked-table').length;
|
|
13415
|
-
if (!isNullOrUndefined(this.headerMaskTable) && isTablePresent != 0) {
|
|
13786
|
+
if (!isNullOrUndefined(this.headerMaskTable) && (isTablePresent != 0 || this.headerMaskTable)) {
|
|
13416
13787
|
const maskTable = this.headerMaskTable;
|
|
13417
13788
|
remove(maskTable);
|
|
13418
13789
|
this.headerMaskTable = null;
|
|
@@ -13425,8 +13796,8 @@ let Gantt = class Gantt extends Component {
|
|
|
13425
13796
|
}
|
|
13426
13797
|
if (this.element.querySelectorAll('.' + timelineHeaderTableContainer).length != 0) {
|
|
13427
13798
|
for (var i = 0; i < this.singleTier; i++) {
|
|
13428
|
-
if (!isNullOrUndefined(this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i])) {
|
|
13429
|
-
this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i]['style'].visibility = "visible";
|
|
13799
|
+
if (!isNullOrUndefined(this.element.querySelectorAll('.' + timelineHeaderTableContainer)[parseInt(i.toString(), 10)])) {
|
|
13800
|
+
this.element.querySelectorAll('.' + timelineHeaderTableContainer)[parseInt(i.toString(), 10)]['style'].visibility = "visible";
|
|
13430
13801
|
}
|
|
13431
13802
|
}
|
|
13432
13803
|
}
|
|
@@ -13448,7 +13819,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13448
13819
|
if (this.element.querySelectorAll('.' + timelineHeaderTableContainer).length != 0) {
|
|
13449
13820
|
this.singleTier = this.timelineModule.isSingleTier ? 1 : 2;
|
|
13450
13821
|
for (var i = 0; i < this.singleTier; i++) {
|
|
13451
|
-
this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i]['style'].visibility = "hidden";
|
|
13822
|
+
this.element.querySelectorAll('.' + timelineHeaderTableContainer)[parseInt(i.toString(), 10)]['style'].visibility = "hidden";
|
|
13452
13823
|
}
|
|
13453
13824
|
}
|
|
13454
13825
|
if (this.singleTier === 0) {
|
|
@@ -13567,7 +13938,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13567
13938
|
}
|
|
13568
13939
|
this.topBottomHeader = 0;
|
|
13569
13940
|
for (let i = 0; i < row.length; i++) {
|
|
13570
|
-
tbody.appendChild(this.applyTimelineMaskRow(row[i]));
|
|
13941
|
+
tbody.appendChild(this.applyTimelineMaskRow(row[parseInt(i.toString(), 10)]));
|
|
13571
13942
|
this.topBottomHeader = this.topBottomHeader + 1;
|
|
13572
13943
|
}
|
|
13573
13944
|
table.appendChild(tbody);
|
|
@@ -13581,11 +13952,11 @@ let Gantt = class Gantt extends Component {
|
|
|
13581
13952
|
maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
|
|
13582
13953
|
maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
|
|
13583
13954
|
for (let i = 0; i < maskRow.childNodes.length - 1; i++) {
|
|
13584
|
-
maskRow.childNodes[i]['style']['width'] = 166 + 'px';
|
|
13955
|
+
maskRow.childNodes[parseInt(i.toString(), 10)]['style']['width'] = 166 + 'px';
|
|
13585
13956
|
}
|
|
13586
13957
|
const maskCells = [].slice.call(maskRow.childNodes);
|
|
13587
13958
|
for (let i = 0; i < maskCells.length; i++) {
|
|
13588
|
-
const maskCell = maskCells[i];
|
|
13959
|
+
const maskCell = maskCells[parseInt(i.toString(), 10)];
|
|
13589
13960
|
switch (this.topBottomHeader) {
|
|
13590
13961
|
case 0:
|
|
13591
13962
|
if (this.enableRtl) {
|
|
@@ -13602,7 +13973,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13602
13973
|
maskCell.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
|
|
13603
13974
|
const innerMaskCells = [].slice.call(maskCell.childNodes);
|
|
13604
13975
|
for (let i = 0; i < innerMaskCells.length; i++) {
|
|
13605
|
-
const htmlInner = innerMaskCells[i];
|
|
13976
|
+
const htmlInner = innerMaskCells[parseInt(i.toString(), 10)];
|
|
13606
13977
|
if (i === 0) {
|
|
13607
13978
|
if (this.enableRtl) {
|
|
13608
13979
|
htmlInner.innerHTML = '<span class="e-mask e-skeleton e-skeleton-text e-shimmer-wave e-innerHTML"></span>';
|
|
@@ -13654,7 +14025,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13654
14025
|
else if (this.columnLoop === 4) {
|
|
13655
14026
|
this.columnLoop = 1;
|
|
13656
14027
|
}
|
|
13657
|
-
tbody.appendChild(this.applyMaskRow(row[j]));
|
|
14028
|
+
tbody.appendChild(this.applyMaskRow(row[parseInt(j.toString(), 10)]));
|
|
13658
14029
|
}
|
|
13659
14030
|
table.appendChild(tbody);
|
|
13660
14031
|
table.style.width = 100 + '%';
|
|
@@ -13675,7 +14046,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13675
14046
|
}
|
|
13676
14047
|
const maskCells = [].slice.call(maskRow.childNodes);
|
|
13677
14048
|
for (let i = 0; i < maskCells.length; i++) {
|
|
13678
|
-
const maskCell = maskCells[i];
|
|
14049
|
+
const maskCell = maskCells[parseInt(i.toString(), 10)];
|
|
13679
14050
|
switch (this.columnLoop) {
|
|
13680
14051
|
case 1:
|
|
13681
14052
|
if (i === 0) {
|
|
@@ -13773,7 +14144,7 @@ let Gantt = class Gantt extends Component {
|
|
|
13773
14144
|
this.predecessorModule['parentIds'] = [];
|
|
13774
14145
|
this.predecessorModule['parentRecord'] = [];
|
|
13775
14146
|
this.predecessorModule.updatePredecessors();
|
|
13776
|
-
if (this.isInPredecessorValidation && this.enableValidation) {
|
|
14147
|
+
if (this.isInPredecessorValidation && this.enableValidation && this.autoCalculateDateScheduling) {
|
|
13777
14148
|
this.predecessorModule.updatedRecordsDateByPredecessor();
|
|
13778
14149
|
}
|
|
13779
14150
|
}
|
|
@@ -13786,7 +14157,9 @@ let Gantt = class Gantt extends Component {
|
|
|
13786
14157
|
if (this.enableValidation) {
|
|
13787
14158
|
this.dataOperation.updateGanttData();
|
|
13788
14159
|
}
|
|
13789
|
-
this.
|
|
14160
|
+
if (this.allowParentDependency) {
|
|
14161
|
+
this.predecessorModule.updateParentPredecessor();
|
|
14162
|
+
}
|
|
13790
14163
|
if (this.dataSource instanceof Object && isCountRequired(this)) {
|
|
13791
14164
|
const count = getValue('count', this.dataSource);
|
|
13792
14165
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
@@ -13799,7 +14172,9 @@ let Gantt = class Gantt extends Component {
|
|
|
13799
14172
|
if (this.enableValidation) {
|
|
13800
14173
|
this.dataOperation.updateGanttData();
|
|
13801
14174
|
}
|
|
13802
|
-
this.
|
|
14175
|
+
if (this.allowParentDependency) {
|
|
14176
|
+
this.predecessorModule.updateParentPredecessor();
|
|
14177
|
+
}
|
|
13803
14178
|
this.treeGridPane.classList.remove('e-temp-content');
|
|
13804
14179
|
remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
|
|
13805
14180
|
this.notify('dataReady', {});
|
|
@@ -13916,22 +14291,27 @@ let Gantt = class Gantt extends Component {
|
|
|
13916
14291
|
* @private
|
|
13917
14292
|
*/
|
|
13918
14293
|
updateContentHeight(args) {
|
|
13919
|
-
if (this.
|
|
13920
|
-
|
|
13921
|
-
this.contentHeight = length * this.rowHeight;
|
|
14294
|
+
if (!this.allowTaskbarOverlap && this.viewType === 'ResourceView' && !this.isLoad) {
|
|
14295
|
+
return;
|
|
13922
14296
|
}
|
|
13923
14297
|
else {
|
|
13924
|
-
|
|
13925
|
-
|
|
13926
|
-
|
|
13927
|
-
const chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
|
|
13928
|
-
if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
|
|
13929
|
-
height = chartRow$$1.getBoundingClientRect().height;
|
|
14298
|
+
if (this.virtualScrollModule && this.enableVirtualization && !isNullOrUndefined(args)) {
|
|
14299
|
+
const length = getValue('result.length', args);
|
|
14300
|
+
this.contentHeight = length * this.rowHeight;
|
|
13930
14301
|
}
|
|
13931
14302
|
else {
|
|
13932
|
-
|
|
14303
|
+
const expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
|
|
14304
|
+
this.currentViewData : this.getExpandedRecords(this.currentViewData);
|
|
14305
|
+
let height;
|
|
14306
|
+
const chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
|
|
14307
|
+
if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
|
|
14308
|
+
height = chartRow$$1.getBoundingClientRect().height;
|
|
14309
|
+
}
|
|
14310
|
+
else {
|
|
14311
|
+
height = this.rowHeight;
|
|
14312
|
+
}
|
|
14313
|
+
this.contentHeight = expandedRecords.length * height;
|
|
13933
14314
|
}
|
|
13934
|
-
this.contentHeight = expandedRecords.length * height;
|
|
13935
14315
|
}
|
|
13936
14316
|
}
|
|
13937
14317
|
/**
|
|
@@ -14444,7 +14824,6 @@ let Gantt = class Gantt extends Component {
|
|
|
14444
14824
|
this.chartRowsModule.refreshGanttRows();
|
|
14445
14825
|
break;
|
|
14446
14826
|
case 'includeWeekend':
|
|
14447
|
-
case 'dayWorkingTime':
|
|
14448
14827
|
case 'allowUnscheduledTasks':
|
|
14449
14828
|
case 'holidays':
|
|
14450
14829
|
this.isLoad = true;
|
|
@@ -14537,6 +14916,10 @@ let Gantt = class Gantt extends Component {
|
|
|
14537
14916
|
case 'readOnly':
|
|
14538
14917
|
case 'viewType':
|
|
14539
14918
|
case 'taskFields':
|
|
14919
|
+
case 'dayWorkingTime':
|
|
14920
|
+
case 'allowTaskbarDragAndDrop':
|
|
14921
|
+
case 'allowTaskbarOverlap':
|
|
14922
|
+
case 'allowParentDependency':
|
|
14540
14923
|
if (prop === 'locale') {
|
|
14541
14924
|
this.isLocaleChanged = true;
|
|
14542
14925
|
}
|
|
@@ -14551,6 +14934,9 @@ let Gantt = class Gantt extends Component {
|
|
|
14551
14934
|
}
|
|
14552
14935
|
}
|
|
14553
14936
|
if (isRefresh) {
|
|
14937
|
+
if (this.isLoad && this.contentMaskTable) {
|
|
14938
|
+
this.contentMaskTable = null;
|
|
14939
|
+
}
|
|
14554
14940
|
this.refresh();
|
|
14555
14941
|
}
|
|
14556
14942
|
}
|
|
@@ -14678,7 +15064,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14678
15064
|
args: [this]
|
|
14679
15065
|
});
|
|
14680
15066
|
}
|
|
14681
|
-
if (this.allowRowDragAndDrop) {
|
|
15067
|
+
if (this.allowRowDragAndDrop || this.allowTaskbarDragAndDrop) {
|
|
14682
15068
|
modules.push({
|
|
14683
15069
|
member: 'rowDragAndDrop',
|
|
14684
15070
|
args: [this]
|
|
@@ -15213,10 +15599,11 @@ let Gantt = class Gantt extends Component {
|
|
|
15213
15599
|
* @param {PdfExportProperties} pdfExportProperties - Defines the export properties of the Gantt.
|
|
15214
15600
|
* @param {isMultipleExport} isMultipleExport - Define to enable multiple export.
|
|
15215
15601
|
* @param {pdfDoc} pdfDoc - Defined the Pdf Document if multiple export is enabled.
|
|
15602
|
+
* @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.
|
|
15216
15603
|
* @returns {Promise<any>} .
|
|
15217
15604
|
*/
|
|
15218
|
-
pdfExport(pdfExportProperties, isMultipleExport, pdfDoc) {
|
|
15219
|
-
return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc)
|
|
15605
|
+
pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
15606
|
+
return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc, isBlob)
|
|
15220
15607
|
: null;
|
|
15221
15608
|
}
|
|
15222
15609
|
/**
|
|
@@ -15248,7 +15635,7 @@ let Gantt = class Gantt extends Component {
|
|
|
15248
15635
|
* @private
|
|
15249
15636
|
*/
|
|
15250
15637
|
renderWorkingDayCell(args) {
|
|
15251
|
-
const includeWeekend = this.taskMode !== 'Auto' ? true : this.includeWeekend ? true : false;
|
|
15638
|
+
const includeWeekend = this.taskMode !== 'Auto' ? true : (this.includeWeekend || !this.autoCalculateDateScheduling) ? true : false;
|
|
15252
15639
|
const nonWorkingDays = !includeWeekend ? this.nonWorkingDayIndex : [];
|
|
15253
15640
|
const holidays = this.totalHolidayDates;
|
|
15254
15641
|
if (nonWorkingDays.length > 0 && nonWorkingDays.indexOf(args.date.getDay()) !== -1) {
|
|
@@ -15258,7 +15645,12 @@ let Gantt = class Gantt extends Component {
|
|
|
15258
15645
|
const tempDate = new Date(args.date.getTime());
|
|
15259
15646
|
tempDate.setHours(0, 0, 0);
|
|
15260
15647
|
if (holidays.indexOf(tempDate.getTime()) !== -1) {
|
|
15261
|
-
|
|
15648
|
+
if (!this.autoCalculateDateScheduling) {
|
|
15649
|
+
args.isDisabled = false;
|
|
15650
|
+
}
|
|
15651
|
+
else {
|
|
15652
|
+
args.isDisabled = true;
|
|
15653
|
+
}
|
|
15262
15654
|
}
|
|
15263
15655
|
}
|
|
15264
15656
|
}
|
|
@@ -15375,12 +15767,17 @@ let Gantt = class Gantt extends Component {
|
|
|
15375
15767
|
const id = ganttData.rowUniqueID;
|
|
15376
15768
|
const task = this.getRecordByID(id);
|
|
15377
15769
|
let isValid = false;
|
|
15378
|
-
if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(
|
|
15379
|
-
|
|
15770
|
+
if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(record[`${field}`]) && (value instanceof Date ? value.getTime() !==
|
|
15771
|
+
record[`${field}`].getTime() : record[`${field}`] !== value))) {
|
|
15380
15772
|
isValid = true;
|
|
15381
15773
|
}
|
|
15382
15774
|
if (task && ((this.editedRecords.indexOf(task) === -1 && isValid) || this.editedRecords.length === 0)) {
|
|
15383
|
-
this.
|
|
15775
|
+
if (this.editModule['draggedRecord'] && this.editModule['draggedRecord'].ganttProperties.taskId === ganttData.taskId) {
|
|
15776
|
+
this.editedRecords.splice(0, 0, task);
|
|
15777
|
+
}
|
|
15778
|
+
else {
|
|
15779
|
+
this.editedRecords.push(task);
|
|
15780
|
+
}
|
|
15384
15781
|
if (this.enableImmutableMode) {
|
|
15385
15782
|
this.modifiedRecords.push(task);
|
|
15386
15783
|
}
|
|
@@ -16323,6 +16720,12 @@ __decorate([
|
|
|
16323
16720
|
__decorate([
|
|
16324
16721
|
Property(false)
|
|
16325
16722
|
], Gantt.prototype, "enableImmutableMode", void 0);
|
|
16723
|
+
__decorate([
|
|
16724
|
+
Property(true)
|
|
16725
|
+
], Gantt.prototype, "allowParentDependency", void 0);
|
|
16726
|
+
__decorate([
|
|
16727
|
+
Property(false)
|
|
16728
|
+
], Gantt.prototype, "enableHtmlSanitizer", void 0);
|
|
16326
16729
|
__decorate([
|
|
16327
16730
|
Property(true)
|
|
16328
16731
|
], Gantt.prototype, "disableHtmlEncode", void 0);
|
|
@@ -16332,6 +16735,12 @@ __decorate([
|
|
|
16332
16735
|
__decorate([
|
|
16333
16736
|
Property(true)
|
|
16334
16737
|
], Gantt.prototype, "enableVirtualMaskRow", void 0);
|
|
16738
|
+
__decorate([
|
|
16739
|
+
Property(true)
|
|
16740
|
+
], Gantt.prototype, "UpdateOffsetOnTaskbarEdit", void 0);
|
|
16741
|
+
__decorate([
|
|
16742
|
+
Property(true)
|
|
16743
|
+
], Gantt.prototype, "autoCalculateDateScheduling", void 0);
|
|
16335
16744
|
__decorate([
|
|
16336
16745
|
Property(true)
|
|
16337
16746
|
], Gantt.prototype, "autoFocusTasks", void 0);
|
|
@@ -16380,6 +16789,12 @@ __decorate([
|
|
|
16380
16789
|
__decorate([
|
|
16381
16790
|
Property(false)
|
|
16382
16791
|
], Gantt.prototype, "renderBaseline", void 0);
|
|
16792
|
+
__decorate([
|
|
16793
|
+
Property(false)
|
|
16794
|
+
], Gantt.prototype, "allowTaskbarDragAndDrop", void 0);
|
|
16795
|
+
__decorate([
|
|
16796
|
+
Property(true)
|
|
16797
|
+
], Gantt.prototype, "allowTaskbarOverlap", void 0);
|
|
16383
16798
|
__decorate([
|
|
16384
16799
|
Property('Horizontal')
|
|
16385
16800
|
], Gantt.prototype, "gridLines", void 0);
|
|
@@ -16822,8 +17237,10 @@ class CellEdit {
|
|
|
16822
17237
|
}
|
|
16823
17238
|
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
16824
17239
|
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
16825
|
-
|| field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
16826
|
-
|
|
17240
|
+
|| field === taskSettings.dependency || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
17241
|
+
if ((field === taskSettings.dependency && !this.parent.allowParentDependency) || field !== taskSettings.dependency) {
|
|
17242
|
+
args.cancel = true;
|
|
17243
|
+
}
|
|
16827
17244
|
}
|
|
16828
17245
|
else {
|
|
16829
17246
|
const callBackPromise = new Deferred();
|
|
@@ -16873,7 +17290,7 @@ class CellEdit {
|
|
|
16873
17290
|
}
|
|
16874
17291
|
isValueChange(args, field) {
|
|
16875
17292
|
const data = getValue('data', args);
|
|
16876
|
-
const editedValue = data[field];
|
|
17293
|
+
const editedValue = data[`${field}`];
|
|
16877
17294
|
const previousValue = getValue('previousData', args);
|
|
16878
17295
|
if ((isNullOrUndefined(editedValue) && !isNullOrUndefined(previousValue)) || (!isNullOrUndefined(editedValue) && isNullOrUndefined(previousValue))) {
|
|
16879
17296
|
return true;
|
|
@@ -17041,7 +17458,7 @@ class CellEdit {
|
|
|
17041
17458
|
const ganttSegments = [];
|
|
17042
17459
|
const segments = ganttProp.segments;
|
|
17043
17460
|
for (let i = 0; i < segments.length; i++) {
|
|
17044
|
-
const segment = segments[i];
|
|
17461
|
+
const segment = segments[parseInt(i.toString(), 10)];
|
|
17045
17462
|
let endDate = segment.endDate;
|
|
17046
17463
|
endDate = (!isNullOrUndefined(ganttProp.endDate)) && endDate.getTime() <
|
|
17047
17464
|
ganttProp.endDate.getTime() && i !== segments.length - 1 ? endDate : ganttProp.endDate;
|
|
@@ -17240,7 +17657,7 @@ class CellEdit {
|
|
|
17240
17657
|
}
|
|
17241
17658
|
}
|
|
17242
17659
|
if (!isNullOrUndefined(index) && index !== -1) {
|
|
17243
|
-
editedResources.push(previousResource[index]);
|
|
17660
|
+
editedResources.push(previousResource[parseInt(index.toString(), 10)]);
|
|
17244
17661
|
}
|
|
17245
17662
|
else {
|
|
17246
17663
|
const resource = resourceData.filter((resourceInfo) => {
|
|
@@ -17299,7 +17716,7 @@ class CellEdit {
|
|
|
17299
17716
|
typeEdited(args, editedObj) {
|
|
17300
17717
|
const key = 'taskType';
|
|
17301
17718
|
const ganttProb = args.data.ganttProperties;
|
|
17302
|
-
const taskType = editedObj[key];
|
|
17719
|
+
const taskType = editedObj[`${key}`];
|
|
17303
17720
|
this.parent.setRecordValue('taskType', taskType, ganttProb, true);
|
|
17304
17721
|
//this.parent.dataOperation.updateMappingData(args.data, 'taskType');
|
|
17305
17722
|
this.updateEditedRecord(args);
|
|
@@ -17407,15 +17824,12 @@ class EditTooltip {
|
|
|
17407
17824
|
this.parent.tooltipModule.toolTipObj.close();
|
|
17408
17825
|
this.updateTooltip(segmentIndex);
|
|
17409
17826
|
if (this.taskbarEdit.connectorSecondAction === 'ConnectorPointLeftDrag') {
|
|
17410
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
17411
17827
|
this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector('.' + connectorPointLeft));
|
|
17412
17828
|
}
|
|
17413
17829
|
else if (this.taskbarEdit.connectorSecondAction === 'ConnectorPointRightDrag') {
|
|
17414
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
17415
17830
|
this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector('.' + connectorPointRight));
|
|
17416
17831
|
}
|
|
17417
17832
|
else {
|
|
17418
|
-
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
17419
17833
|
this.toolTipObj.open(this.taskbarEdit.taskBarEditElement);
|
|
17420
17834
|
}
|
|
17421
17835
|
}
|
|
@@ -17580,6 +17994,10 @@ class TaskbarEdit extends DateProcessor {
|
|
|
17580
17994
|
this.elementOffsetWidth = 0;
|
|
17581
17995
|
this.elementOffsetHeight = 0;
|
|
17582
17996
|
this.segmentIndex = -1;
|
|
17997
|
+
this.currentItemTop = 0;
|
|
17998
|
+
this.currentItemPrevTop = 0;
|
|
17999
|
+
this.topValue = 0;
|
|
18000
|
+
this.draggedRecordMarginTop = 0;
|
|
17583
18001
|
this.parent = ganttObj;
|
|
17584
18002
|
this.initPublicProp();
|
|
17585
18003
|
this.wireEvents();
|
|
@@ -17821,7 +18239,9 @@ class TaskbarEdit extends DateProcessor {
|
|
|
17821
18239
|
if (!isNullOrUndefined(parentRecord) && !parentRecord.expanded) {
|
|
17822
18240
|
this.prevZIndex = (this.taskBarEditElement).style.zIndex;
|
|
17823
18241
|
(this.taskBarEditElement).style.zIndex = '1000';
|
|
17824
|
-
|
|
18242
|
+
if (this.taskBarEditElement.querySelector('.e-gantt-child-taskbar')) {
|
|
18243
|
+
addClass([this.taskBarEditElement.querySelector('.e-gantt-child-taskbar')], 'e-collapsed-taskbar-drag');
|
|
18244
|
+
}
|
|
17825
18245
|
}
|
|
17826
18246
|
}
|
|
17827
18247
|
}
|
|
@@ -17985,9 +18405,20 @@ class TaskbarEdit extends DateProcessor {
|
|
|
17985
18405
|
this.parent.ganttChartModule.scrollObject.previousScroll.left;
|
|
17986
18406
|
}
|
|
17987
18407
|
this.tooltipPositionX = this.mouseDownX;
|
|
17988
|
-
this.mouseDownY = e.pageY - containerPosition.top +
|
|
18408
|
+
this.mouseDownY = this.dragMoveY = e.pageY - containerPosition.top +
|
|
17989
18409
|
this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
17990
18410
|
}
|
|
18411
|
+
if (this.parent.viewType == "ResourceView" && this.parent.allowTaskbarDragAndDrop) {
|
|
18412
|
+
let toolbarHeight = 0;
|
|
18413
|
+
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|
|
18414
|
+
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
18415
|
+
}
|
|
18416
|
+
this.topValue = this.parent.getOffsetRect(event.target).top - this.parent.getOffsetRect(this.parent.element).top -
|
|
18417
|
+
parseInt((closest(event.target, '.e-taskbar-main-container'))['style'].marginTop) -
|
|
18418
|
+
this.parent.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'] -
|
|
18419
|
+
toolbarHeight + document.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollTop;
|
|
18420
|
+
this.currentItemPrevTop = this.currentItemTop = this.topValue;
|
|
18421
|
+
}
|
|
17991
18422
|
if (this.taskBarEditAction === 'ConnectorPointLeftDrag' || this.taskBarEditAction === 'ConnectorPointRightDrag') {
|
|
17992
18423
|
this.fromPredecessorText = this.taskBarEditAction === 'ConnectorPointLeftDrag' ? 'start' : 'finish';
|
|
17993
18424
|
this.parent.connectorLineModule.tooltipTable.innerHTML = this.parent.connectorLineModule.getConnectorLineTooltipInnerTd(this.taskBarEditRecord.ganttProperties.taskName, this.fromPredecessorText, '', '');
|
|
@@ -18117,6 +18548,22 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18117
18548
|
this.drawFalseLine();
|
|
18118
18549
|
}
|
|
18119
18550
|
}
|
|
18551
|
+
if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
|
|
18552
|
+
if (this.dragMoveY > this.mouseMoveY) {
|
|
18553
|
+
this.mouseMoveY = this.dragMoveY - this.mouseMoveY;
|
|
18554
|
+
this.currentItemTop = this.currentItemTop - this.mouseMoveY;
|
|
18555
|
+
}
|
|
18556
|
+
else {
|
|
18557
|
+
this.mouseMoveY -= this.dragMoveY;
|
|
18558
|
+
this.currentItemTop = this.currentItemTop + this.mouseMoveY;
|
|
18559
|
+
}
|
|
18560
|
+
const containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
|
|
18561
|
+
this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
18562
|
+
this.topValue = this.currentItemTop;
|
|
18563
|
+
this.currentItemPrevTop = (this.currentItemPrevTop === 0 ||
|
|
18564
|
+
this.topValue == this.currentItemTop) ? this.topValue :
|
|
18565
|
+
this.currentItemPrevTop;
|
|
18566
|
+
}
|
|
18120
18567
|
this.setItemPosition();
|
|
18121
18568
|
this.updateEditedItem();
|
|
18122
18569
|
this.editTooltip.updateTooltip(this.segmentIndex);
|
|
@@ -18196,12 +18643,12 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18196
18643
|
this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.left;
|
|
18197
18644
|
this.startScrollTimer('left');
|
|
18198
18645
|
}
|
|
18199
|
-
else if (
|
|
18646
|
+
else if (((mouseY + 80) >
|
|
18200
18647
|
containerPosition.top + this.parent.ganttChartModule.chartBodyContainer.offsetHeight)) {
|
|
18201
18648
|
this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
18202
18649
|
this.startScrollTimer('bottom');
|
|
18203
18650
|
}
|
|
18204
|
-
else if (
|
|
18651
|
+
else if (((mouseY - 20) < containerPosition.top)) {
|
|
18205
18652
|
this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
18206
18653
|
this.startScrollTimer('top');
|
|
18207
18654
|
}
|
|
@@ -18986,6 +19433,11 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18986
19433
|
taskBarMainContainer$$1.style.width = (width) + 'px';
|
|
18987
19434
|
leftLabelContainer$$1.style.width = (item.left) + 'px';
|
|
18988
19435
|
taskBarMainContainer$$1.style.setProperty(position, (item.left) + 'px');
|
|
19436
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.parent.rowDragAndDropModule &&
|
|
19437
|
+
(this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'MilestoneDrag')) {
|
|
19438
|
+
taskBarMainContainer$$1.style.setProperty('top', (this.topValue) + 'px');
|
|
19439
|
+
taskBarMainContainer$$1.style.zIndex = '4';
|
|
19440
|
+
}
|
|
18989
19441
|
if (this.taskBarEditAction === 'LeftResizing' && this.segmentIndex === 0) {
|
|
18990
19442
|
const parent = this.taskBarEditElement.parentElement;
|
|
18991
19443
|
const segmentedTasks = parent.getElementsByClassName('e-segmented-taskbar');
|
|
@@ -19098,7 +19550,8 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19098
19550
|
this.previousMouseMove = null;
|
|
19099
19551
|
this.editTooltip.showHideTaskbarEditTooltip(false, this.segmentIndex);
|
|
19100
19552
|
if (this.taskBarEditAction && this.isMouseDragged) {
|
|
19101
|
-
if (!this.dragMouseLeave && this.taskBarEditedAction)
|
|
19553
|
+
if ((!this.dragMouseLeave && this.taskBarEditedAction) || (this.parent.viewType === 'ResourceView' &&
|
|
19554
|
+
this.parent.allowTaskbarDragAndDrop)) {
|
|
19102
19555
|
this.taskBarEditedAction(e);
|
|
19103
19556
|
this.isMouseDragged = false;
|
|
19104
19557
|
}
|
|
@@ -19207,6 +19660,65 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19207
19660
|
const args = extend({}, arg);
|
|
19208
19661
|
const ganttRecord = args.data;
|
|
19209
19662
|
const taskData = ganttRecord.ganttProperties;
|
|
19663
|
+
const draggedRecIndex = this.parent.currentViewData.indexOf(ganttRecord);
|
|
19664
|
+
if ((args.taskBarEditAction === 'MilestoneDrag' || args.taskBarEditAction === 'ChildDrag') && this.parent.viewType === "ResourceView"
|
|
19665
|
+
&& this.parent.allowTaskbarDragAndDrop && this.dragMoveY > 0) {
|
|
19666
|
+
if (this.parent.rowDragAndDropModule) {
|
|
19667
|
+
let flatRecordCol = this.parent.currentViewData;
|
|
19668
|
+
if (flatRecordCol[this.taskBarEditRecord.parentItem.index] && ((this.parent.editedRecords.indexOf(flatRecordCol[this.taskBarEditRecord.parentItem.index]) === -1))) {
|
|
19669
|
+
this.parent.editedRecords.push(flatRecordCol[this.taskBarEditRecord.parentItem.index]);
|
|
19670
|
+
}
|
|
19671
|
+
let ganttrec;
|
|
19672
|
+
let resHeight = 0;
|
|
19673
|
+
let rowCount = 0;
|
|
19674
|
+
let childIndex;
|
|
19675
|
+
let droppedRecord;
|
|
19676
|
+
let treeGridrows = this.parent.treeGrid.getRows().length;
|
|
19677
|
+
for (let i = 0; i < treeGridrows; i++) {
|
|
19678
|
+
if (resHeight < this.dragMoveY && this.parent.getRowByIndex(i).style.display !== 'none') {
|
|
19679
|
+
rowCount = i;
|
|
19680
|
+
resHeight = resHeight + parseInt(this.parent.getRowByIndex(i).style.height);
|
|
19681
|
+
if (!flatRecordCol[i].parentItem) {
|
|
19682
|
+
ganttrec = flatRecordCol[i];
|
|
19683
|
+
}
|
|
19684
|
+
else {
|
|
19685
|
+
ganttrec = this.parent.getRecordByID(flatRecordCol[i].parentItem.taskId);
|
|
19686
|
+
}
|
|
19687
|
+
}
|
|
19688
|
+
}
|
|
19689
|
+
let draggedRecordtaskbar = this.parent.getRowByIndex(draggedRecIndex).getElementsByClassName('e-taskbar-main-container');
|
|
19690
|
+
let taskbarContainer = this.parent.getRowByIndex(rowCount).getElementsByClassName('e-taskbar-main-container');
|
|
19691
|
+
for (let j = 0; j < taskbarContainer.length; j++) {
|
|
19692
|
+
if (taskbarContainer[j]['offsetTop'] < this.dragMoveY && draggedRecordtaskbar[0].getAttribute('rowuniqueid') !==
|
|
19693
|
+
taskbarContainer[j].getAttribute('rowuniqueid')) {
|
|
19694
|
+
this.draggedRecordMarginTop = taskbarContainer[j]['style'].marginTop;
|
|
19695
|
+
childIndex = taskbarContainer[j].getAttribute('rowuniqueid');
|
|
19696
|
+
}
|
|
19697
|
+
}
|
|
19698
|
+
if (childIndex) {
|
|
19699
|
+
droppedRecord = this.parent.currentViewData.filter((data) => {
|
|
19700
|
+
if (data['rowUniqueID'] === childIndex) {
|
|
19701
|
+
return data;
|
|
19702
|
+
}
|
|
19703
|
+
else {
|
|
19704
|
+
return null;
|
|
19705
|
+
}
|
|
19706
|
+
});
|
|
19707
|
+
}
|
|
19708
|
+
if (droppedRecord) {
|
|
19709
|
+
const droppedRecordIndex = this.parent.currentViewData.indexOf(droppedRecord[0]);
|
|
19710
|
+
let position = (droppedRecord[0].hasChildRecords || (!droppedRecord[0].parentItem &&
|
|
19711
|
+
droppedRecord[0].childRecords.length == 0)) ? 'child' : 'below';
|
|
19712
|
+
if (this.parent.rowDragAndDropModule) {
|
|
19713
|
+
this.parent.rowDragAndDropModule.reorderRows([draggedRecIndex], droppedRecordIndex, position);
|
|
19714
|
+
}
|
|
19715
|
+
this.dragMoveY = 0;
|
|
19716
|
+
}
|
|
19717
|
+
}
|
|
19718
|
+
if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation) {
|
|
19719
|
+
this.parent.ganttChartModule.renderOverAllocationContainer();
|
|
19720
|
+
}
|
|
19721
|
+
}
|
|
19210
19722
|
if (args.taskBarEditAction === 'ProgressResizing') {
|
|
19211
19723
|
if (args.previousData.progress !== taskData.progress) {
|
|
19212
19724
|
this.parent.setRecordValue('progress', this.getProgressPercent(taskData.width, taskData.progressWidth), taskData, true);
|
|
@@ -19398,14 +19910,20 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19398
19910
|
}
|
|
19399
19911
|
if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
|
|
19400
19912
|
!this.elementOffsetLeft) || !this.parent.enableVirtualization) {
|
|
19401
|
-
if (this.
|
|
19402
|
-
this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
|
|
19403
|
-
this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
19404
|
-
}
|
|
19405
|
-
else {
|
|
19913
|
+
if (!this.parent.allowParentDependency) {
|
|
19406
19914
|
this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
|
|
19407
19915
|
this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
|
|
19408
19916
|
}
|
|
19917
|
+
else {
|
|
19918
|
+
if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
|
|
19919
|
+
this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
|
|
19920
|
+
this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
19921
|
+
}
|
|
19922
|
+
else {
|
|
19923
|
+
this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
|
|
19924
|
+
this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
|
|
19925
|
+
}
|
|
19926
|
+
}
|
|
19409
19927
|
this.elementOffsetWidth = this.taskBarEditElement.offsetWidth;
|
|
19410
19928
|
this.elementOffsetHeight = this.taskBarEditElement.offsetHeight;
|
|
19411
19929
|
}
|
|
@@ -20418,7 +20936,7 @@ class DialogEdit {
|
|
|
20418
20936
|
targetId = inputElement.querySelector('input').getAttribute('id');
|
|
20419
20937
|
inputElement = inputElement.querySelector('#' + targetId);
|
|
20420
20938
|
}
|
|
20421
|
-
else if (!isNullOrUndefined(args.event) && !isNullOrUndefined(args.event.path[1])
|
|
20939
|
+
else if (!isNullOrUndefined(args.event) && !isNullOrUndefined(args.event.path) && !isNullOrUndefined(args.event.path)[1]) {
|
|
20422
20940
|
inputElement = args.event.path[1];
|
|
20423
20941
|
targetId = inputElement.querySelector('input').getAttribute('id');
|
|
20424
20942
|
inputElement = inputElement.querySelector('#' + targetId);
|
|
@@ -20459,6 +20977,9 @@ class DialogEdit {
|
|
|
20459
20977
|
if (!isNullOrUndefined(tasks.startDate) && tasks.startDate !== colName) {
|
|
20460
20978
|
this.updateScheduleFields(dialog, ganttProp, 'startDate');
|
|
20461
20979
|
}
|
|
20980
|
+
if (tasks.endDate === colName && !isNullOrUndefined(ganttProp.startDate) && !isNullOrUndefined(args.value) && ganttProp.startDate.getTime() > args.value) {
|
|
20981
|
+
this.updateScheduleFields(dialog, ganttProp, 'endDate');
|
|
20982
|
+
}
|
|
20462
20983
|
if (!isNullOrUndefined(tasks.endDate) && tasks.endDate !== colName) {
|
|
20463
20984
|
this.updateScheduleFields(dialog, ganttProp, 'endDate');
|
|
20464
20985
|
}
|
|
@@ -20649,6 +21170,9 @@ class DialogEdit {
|
|
|
20649
21170
|
if (taskSettings.endDate === columnName) {
|
|
20650
21171
|
if (value !== '') {
|
|
20651
21172
|
let endDate = this.parent.dateValidationModule.getDateFromFormat(value);
|
|
21173
|
+
if (isNullOrUndefined(ganttProp.startDate) && isNullOrUndefined(endDate) && ganttProp.startDate.getTime() > endDate.getTime()) {
|
|
21174
|
+
endDate = ganttProp.endDate;
|
|
21175
|
+
}
|
|
20652
21176
|
if (endDate.getHours() === 0 && ganttObj.defaultEndTime !== 86400) {
|
|
20653
21177
|
this.parent.dateValidationModule.setTime(ganttObj.defaultEndTime, endDate);
|
|
20654
21178
|
}
|
|
@@ -21026,6 +21550,9 @@ class DialogEdit {
|
|
|
21026
21550
|
item.content = this.renderGeneralTab(item.content);
|
|
21027
21551
|
}
|
|
21028
21552
|
else if (item.content === 'Dependency') {
|
|
21553
|
+
if (this.editedRecord.hasChildRecords && !this.parent.allowParentDependency) {
|
|
21554
|
+
item.disabled = true;
|
|
21555
|
+
}
|
|
21029
21556
|
item.content = this.renderPredecessorTab(item.content);
|
|
21030
21557
|
}
|
|
21031
21558
|
else if (item.content === 'Resources') {
|
|
@@ -21477,27 +22004,34 @@ class DialogEdit {
|
|
|
21477
22004
|
this.preTableCollection = [];
|
|
21478
22005
|
for (let i = 0; i < flatData.length; i++) {
|
|
21479
22006
|
const data = flatData[i];
|
|
21480
|
-
|
|
21481
|
-
|
|
21482
|
-
this.
|
|
21483
|
-
|
|
21484
|
-
|
|
21485
|
-
|
|
21486
|
-
|
|
21487
|
-
|
|
21488
|
-
|
|
21489
|
-
this.
|
|
21490
|
-
|
|
22007
|
+
if (this.parent.allowParentDependency) {
|
|
22008
|
+
let currentFlatData = data;
|
|
22009
|
+
if (data.parentUniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
|
|
22010
|
+
this.isValidData = false;
|
|
22011
|
+
}
|
|
22012
|
+
else {
|
|
22013
|
+
do {
|
|
22014
|
+
if (currentFlatData.parentItem) {
|
|
22015
|
+
currentFlatData = this.parent.flatData[this.parent.ids.indexOf(currentFlatData.parentItem.taskId)];
|
|
22016
|
+
if (currentFlatData.uniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
|
|
22017
|
+
this.isValidData = false;
|
|
22018
|
+
break;
|
|
22019
|
+
}
|
|
21491
22020
|
}
|
|
21492
|
-
}
|
|
21493
|
-
}
|
|
21494
|
-
|
|
21495
|
-
|
|
21496
|
-
|
|
22021
|
+
} while (currentFlatData.parentItem);
|
|
22022
|
+
}
|
|
22023
|
+
if (data.hasChildRecords && this.isValidData) {
|
|
22024
|
+
this.isValidData = this.isParentValid(data.childRecords);
|
|
22025
|
+
}
|
|
22026
|
+
if (!this.isValidData) {
|
|
22027
|
+
this.isValidData = true;
|
|
22028
|
+
continue;
|
|
22029
|
+
}
|
|
21497
22030
|
}
|
|
21498
|
-
|
|
21499
|
-
|
|
21500
|
-
|
|
22031
|
+
else {
|
|
22032
|
+
if (data.hasChildRecords) {
|
|
22033
|
+
continue;
|
|
22034
|
+
}
|
|
21501
22035
|
}
|
|
21502
22036
|
const taskId = this.parent.viewType === 'ResourceView' ? data.ganttProperties.taskId.toString()
|
|
21503
22037
|
: data.ganttProperties.rowUniqueID.toString();
|
|
@@ -21733,6 +22267,10 @@ class DialogEdit {
|
|
|
21733
22267
|
}
|
|
21734
22268
|
else {
|
|
21735
22269
|
tasksData[fieldName] = controlObj.value;
|
|
22270
|
+
if (this.parent.enableHtmlSanitizer && typeof (controlObj.value) === 'string') {
|
|
22271
|
+
controlObj.value = SanitizeHtmlHelper.sanitize(controlObj.value);
|
|
22272
|
+
tasksData[fieldName] = controlObj.value;
|
|
22273
|
+
}
|
|
21736
22274
|
}
|
|
21737
22275
|
}
|
|
21738
22276
|
}
|
|
@@ -22016,9 +22554,10 @@ class ConnectorLineEdit {
|
|
|
22016
22554
|
const from = 'from';
|
|
22017
22555
|
const to = 'to';
|
|
22018
22556
|
this.parent.connectorLineModule.removeConnectorLineById('parent' + predecessor[from] + 'child' + predecessor[to]);
|
|
22019
|
-
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[from]);
|
|
22020
|
-
childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[to]);
|
|
22021
|
-
if (parentGanttRecord
|
|
22557
|
+
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[`${from}`]);
|
|
22558
|
+
childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[`${to}`]);
|
|
22559
|
+
if ((!this.parent.allowParentDependency && (parentGanttRecord && parentGanttRecord.expanded === true) ||
|
|
22560
|
+
(childGanttRecord && childGanttRecord.expanded === true)) || (this.parent.allowParentDependency && (parentGanttRecord || childGanttRecord))) {
|
|
22022
22561
|
connectorObj =
|
|
22023
22562
|
this.parent.predecessorModule.updateConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
|
|
22024
22563
|
if (!isNullOrUndefined(connectorObj)) {
|
|
@@ -22069,8 +22608,8 @@ class ConnectorLineEdit {
|
|
|
22069
22608
|
if (!isNullOrUndefined(values[0])) {
|
|
22070
22609
|
const ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
22071
22610
|
if (ids.indexOf(values[0]) === -1) {
|
|
22072
|
-
if (values[0].indexOf(
|
|
22073
|
-
match = values[0].split(
|
|
22611
|
+
if (values[0].indexOf(' ') !== -1) {
|
|
22612
|
+
match = values[0].split(' ');
|
|
22074
22613
|
if (match.length === 1) {
|
|
22075
22614
|
match = values[0].match(/(\d+|[A-z]+)/g);
|
|
22076
22615
|
}
|
|
@@ -22141,7 +22680,7 @@ class ConnectorLineEdit {
|
|
|
22141
22680
|
let parentRec = rec;
|
|
22142
22681
|
if (rec.parentItem) {
|
|
22143
22682
|
parentRec = this.parent.flatData.filter((item) => {
|
|
22144
|
-
return item.uniqueID
|
|
22683
|
+
return item.uniqueID === rec.parentUniqueID;
|
|
22145
22684
|
})[0];
|
|
22146
22685
|
if (parentRec.parentItem) {
|
|
22147
22686
|
parentRec = this.getRootParent(parentRec);
|
|
@@ -22190,13 +22729,13 @@ class ConnectorLineEdit {
|
|
|
22190
22729
|
}
|
|
22191
22730
|
else {
|
|
22192
22731
|
if (!toRecord.parentItem && fromRecord.parentItem) {
|
|
22193
|
-
|
|
22732
|
+
const fromRootParent = this.parent.connectorLineEditModule.getRootParent(fromRecord);
|
|
22194
22733
|
if (fromRootParent.uniqueID === toRecord.uniqueID) {
|
|
22195
22734
|
return false;
|
|
22196
22735
|
}
|
|
22197
22736
|
}
|
|
22198
22737
|
else if (toRecord.parentItem && !fromRecord.parentItem) {
|
|
22199
|
-
|
|
22738
|
+
const toRootParent = this.parent.connectorLineEditModule.getRootParent(toRecord);
|
|
22200
22739
|
if (toRootParent.uniqueID === fromRecord.uniqueID) {
|
|
22201
22740
|
return false;
|
|
22202
22741
|
}
|
|
@@ -22222,11 +22761,20 @@ class ConnectorLineEdit {
|
|
|
22222
22761
|
if (!isNullOrUndefined(predecessorString) && predecessorString.length > 0) {
|
|
22223
22762
|
predecessorIdArray = this.idFromPredecessor(predecessorString);
|
|
22224
22763
|
for (let count = 0; count < predecessorIdArray.length; count++) {
|
|
22225
|
-
|
|
22226
|
-
|
|
22227
|
-
|
|
22228
|
-
if (
|
|
22229
|
-
|
|
22764
|
+
//Check edited item has parent item in predecessor collection
|
|
22765
|
+
if (!this.parent.allowParentDependency) {
|
|
22766
|
+
const checkParent = this.checkParentRelation(ganttRecord, predecessorIdArray);
|
|
22767
|
+
if (!checkParent) {
|
|
22768
|
+
return false;
|
|
22769
|
+
}
|
|
22770
|
+
}
|
|
22771
|
+
else {
|
|
22772
|
+
if (parseInt(predecessorIdArray[predecessorIdArray.length - 1]) !== ganttRecord[this.parent.taskFields.id]) {
|
|
22773
|
+
let num = this.parent.ids.indexOf(predecessorIdArray[predecessorIdArray.length - 1]);
|
|
22774
|
+
let fromRecord = this.parent.currentViewData[num];
|
|
22775
|
+
if (fromRecord && ganttRecord) {
|
|
22776
|
+
flag = this.validateParentPredecessor(fromRecord, ganttRecord);
|
|
22777
|
+
}
|
|
22230
22778
|
}
|
|
22231
22779
|
}
|
|
22232
22780
|
// Check if predecessor exist more then one
|
|
@@ -22458,7 +23006,9 @@ class ConnectorLineEdit {
|
|
|
22458
23006
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
22459
23007
|
}
|
|
22460
23008
|
else if (args.validateMode.preserveLinkWithEditing) {
|
|
22461
|
-
this.
|
|
23009
|
+
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
23010
|
+
this.calculateOffset(ganttRecord);
|
|
23011
|
+
}
|
|
22462
23012
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
22463
23013
|
}
|
|
22464
23014
|
}
|
|
@@ -22489,7 +23039,7 @@ class ConnectorLineEdit {
|
|
|
22489
23039
|
const prevPredecessor = extend([], record.ganttProperties.predecessor, [], true);
|
|
22490
23040
|
const validPredecessor = this.parent.predecessorModule.getValidPredecessor(record);
|
|
22491
23041
|
for (let i = 0; i < validPredecessor.length; i++) {
|
|
22492
|
-
const predecessor = validPredecessor[i];
|
|
23042
|
+
const predecessor = validPredecessor[parseInt(i.toString(), 10)];
|
|
22493
23043
|
const parentTask = this.parent.connectorLineModule.getRecordByID(predecessor.from);
|
|
22494
23044
|
let offset;
|
|
22495
23045
|
if (isScheduledTask(parentTask.ganttProperties) && isScheduledTask(record.ganttProperties)) {
|
|
@@ -22569,7 +23119,7 @@ class ConnectorLineEdit {
|
|
|
22569
23119
|
const parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
|
|
22570
23120
|
const index = getIndex(predecessor[i], 'from', prevPredecessor, 'to');
|
|
22571
23121
|
prevPredecessor.splice(index, 1);
|
|
22572
|
-
const parentIndex = getIndex(predecessor[i], 'from', parentPredecessor, 'to');
|
|
23122
|
+
const parentIndex = getIndex(predecessor[parseInt(i.toString(), 10)], 'from', parentPredecessor, 'to');
|
|
22573
23123
|
parentPredecessor.splice(parentIndex, 1);
|
|
22574
23124
|
this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
|
|
22575
23125
|
}
|
|
@@ -22680,41 +23230,41 @@ class ConnectorLineEdit {
|
|
|
22680
23230
|
let violationType = null;
|
|
22681
23231
|
if (predecessor[i].type === 'FS') {
|
|
22682
23232
|
if (ganttTaskData.startDate < startDate) {
|
|
22683
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23233
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
22684
23234
|
violationType = 'taskBeforePredecessor_FS';
|
|
22685
23235
|
}
|
|
22686
23236
|
else if (ganttTaskData.startDate > startDate) {
|
|
22687
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23237
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
22688
23238
|
violationType = 'taskAfterPredecessor_FS';
|
|
22689
23239
|
}
|
|
22690
23240
|
}
|
|
22691
23241
|
else if (predecessor[i].type === 'SS') {
|
|
22692
23242
|
if (ganttTaskData.startDate < startDate) {
|
|
22693
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23243
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
22694
23244
|
violationType = 'taskBeforePredecessor_SS';
|
|
22695
23245
|
}
|
|
22696
23246
|
else if (ganttTaskData.startDate > startDate) {
|
|
22697
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23247
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
22698
23248
|
violationType = 'taskAfterPredecessor_SS';
|
|
22699
23249
|
}
|
|
22700
23250
|
}
|
|
22701
23251
|
else if (predecessor[i].type === 'FF') {
|
|
22702
23252
|
if (endDate <= parentGanttRecord.ganttProperties.endDate) {
|
|
22703
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23253
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
22704
23254
|
violationType = 'taskBeforePredecessor_FF';
|
|
22705
23255
|
}
|
|
22706
23256
|
else if (endDate > parentGanttRecord.ganttProperties.endDate) {
|
|
22707
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23257
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
22708
23258
|
violationType = 'taskAfterPredecessor_FF';
|
|
22709
23259
|
}
|
|
22710
23260
|
}
|
|
22711
23261
|
else if (predecessor[i].type === 'SF') {
|
|
22712
23262
|
if (endDate < parentGanttRecord.ganttProperties.startDate) {
|
|
22713
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23263
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
22714
23264
|
violationType = 'taskBeforePredecessor_SF';
|
|
22715
23265
|
}
|
|
22716
23266
|
else if (endDate >= parentGanttRecord.ganttProperties.startDate) {
|
|
22717
|
-
this.validationPredecessor.push(predecessor[i]);
|
|
23267
|
+
this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
|
|
22718
23268
|
violationType = 'taskAfterPredecessor_SF';
|
|
22719
23269
|
}
|
|
22720
23270
|
}
|
|
@@ -22745,13 +23295,13 @@ class ConnectorLineEdit {
|
|
|
22745
23295
|
const prevPredecessor = prevData.ganttProperties.predecessor;
|
|
22746
23296
|
if (!isNullOrUndefined(prevPredecessor)) {
|
|
22747
23297
|
for (let p = 0; p < prevPredecessor.length; p++) {
|
|
22748
|
-
const parentGanttRecord = this.parent.connectorLineModule.getRecordByID(prevPredecessor[p].from);
|
|
23298
|
+
const parentGanttRecord = this.parent.connectorLineModule.getRecordByID(prevPredecessor[parseInt(p.toString(), 10)].from);
|
|
22749
23299
|
if (parentGanttRecord === data) {
|
|
22750
|
-
data.ganttProperties.predecessor.push(prevPredecessor[p]);
|
|
23300
|
+
data.ganttProperties.predecessor.push(prevPredecessor[parseInt(p.toString(), 10)]);
|
|
22751
23301
|
}
|
|
22752
23302
|
else {
|
|
22753
23303
|
const parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
|
|
22754
|
-
const parentIndex = getIndex(prevPredecessor[p], 'from', parentPredecessor, 'to');
|
|
23304
|
+
const parentIndex = getIndex(prevPredecessor[parseInt(p.toString(), 10)], 'from', parentPredecessor, 'to');
|
|
22755
23305
|
if (parentIndex !== -1) {
|
|
22756
23306
|
parentPredecessor.splice(parentIndex, 1);
|
|
22757
23307
|
this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
|
|
@@ -22761,9 +23311,9 @@ class ConnectorLineEdit {
|
|
|
22761
23311
|
}
|
|
22762
23312
|
if (!isNullOrUndefined(newPredecessor)) {
|
|
22763
23313
|
for (let n = 0; n < newPredecessor.length; n++) {
|
|
22764
|
-
const parentGanttRecord = this.parent.connectorLineModule.getRecordByID(newPredecessor[n].from);
|
|
23314
|
+
const parentGanttRecord = this.parent.connectorLineModule.getRecordByID(newPredecessor[parseInt(n.toString(), 10)].from);
|
|
22765
23315
|
const parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
|
|
22766
|
-
parentPredecessor.push(newPredecessor[n]);
|
|
23316
|
+
parentPredecessor.push(newPredecessor[parseInt(n.toString(), 10)]);
|
|
22767
23317
|
this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
|
|
22768
23318
|
}
|
|
22769
23319
|
}
|
|
@@ -23222,7 +23772,7 @@ class Edit$2 {
|
|
|
23222
23772
|
let isScheduleValueUpdated = false;
|
|
23223
23773
|
for (const key of Object.keys(data)) {
|
|
23224
23774
|
if ([tasks.startDate, tasks.endDate, tasks.duration].indexOf(key) !== -1) {
|
|
23225
|
-
if (isNullOrUndefined(data[key]) && !ganttObj.allowUnscheduledTasks) {
|
|
23775
|
+
if (isNullOrUndefined(data[`${key}`]) && !ganttObj.allowUnscheduledTasks) {
|
|
23226
23776
|
continue;
|
|
23227
23777
|
}
|
|
23228
23778
|
if (isFromDialog) {
|
|
@@ -23278,7 +23828,7 @@ class Edit$2 {
|
|
|
23278
23828
|
else if (key === tasks.name) {
|
|
23279
23829
|
ganttPropKey = 'taskName';
|
|
23280
23830
|
}
|
|
23281
|
-
else if (key === tasks.segments) {
|
|
23831
|
+
else if ((key === tasks.segments) && (!isNullOrUndefined(ganttData.ganttProperties.segments))) {
|
|
23282
23832
|
ganttPropKey = 'segments';
|
|
23283
23833
|
/* eslint-disable-next-line */
|
|
23284
23834
|
if (data && !isNullOrUndefined(data[this.parent.taskFields.segments]) && data[this.parent.taskFields.segments].length > 0) {
|
|
@@ -23568,7 +24118,7 @@ class Edit$2 {
|
|
|
23568
24118
|
else if (args.data.childRecords.length > 0 && !isValidatePredecessor) {
|
|
23569
24119
|
isValidatePredecessor = this.isCheckPredecessor(args.data);
|
|
23570
24120
|
if (!isValidatePredecessor && this.isTaskbarMoved(args.data)) {
|
|
23571
|
-
for (
|
|
24121
|
+
for (let i = 0; i < args.data.childRecords.length; i++) {
|
|
23572
24122
|
if (this.parent.predecessorModule.getValidPredecessor(args.data.childRecords[i]).length > 0) {
|
|
23573
24123
|
childRecordIndex = i;
|
|
23574
24124
|
isValidatePredecessor = true;
|
|
@@ -23646,8 +24196,10 @@ class Edit$2 {
|
|
|
23646
24196
|
*/
|
|
23647
24197
|
updateEditedTask(args) {
|
|
23648
24198
|
const ganttRecord = args.data;
|
|
23649
|
-
this.
|
|
23650
|
-
|
|
24199
|
+
if (this.parent.autoCalculateDateScheduling) {
|
|
24200
|
+
this.updateParentChildRecord(ganttRecord);
|
|
24201
|
+
}
|
|
24202
|
+
if (this.parent.isConnectorLineUpdate && this.parent.autoCalculateDateScheduling) {
|
|
23651
24203
|
/* validating predecessor for updated child items */
|
|
23652
24204
|
for (let i = 0; i < this.validatedChildItems.length; i++) {
|
|
23653
24205
|
const child = this.validatedChildItems[i];
|
|
@@ -23666,7 +24218,7 @@ class Edit$2 {
|
|
|
23666
24218
|
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
23667
24219
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
23668
24220
|
}
|
|
23669
|
-
if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
24221
|
+
if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
23670
24222
|
(args.action === "DrawConnectorLine")) {
|
|
23671
24223
|
this.updateChildItems(ganttRecord);
|
|
23672
24224
|
}
|
|
@@ -23674,7 +24226,9 @@ class Edit$2 {
|
|
|
23674
24226
|
}
|
|
23675
24227
|
/** Update parent up-to zeroth level */
|
|
23676
24228
|
if (ganttRecord.parentItem) {
|
|
23677
|
-
this.parent.
|
|
24229
|
+
if (this.parent.autoCalculateDateScheduling) {
|
|
24230
|
+
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
24231
|
+
}
|
|
23678
24232
|
let parentData = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
|
|
23679
24233
|
if (!parentData.ganttProperties.predecessorsName) {
|
|
23680
24234
|
this.parent.predecessorModule.validatePredecessor(parentData, [], '');
|
|
@@ -23920,7 +24474,7 @@ class Edit$2 {
|
|
|
23920
24474
|
durationDiff = this.parent.dateValidationModule.getDuration(validStartDate, validEndDate, 'minute', true, false);
|
|
23921
24475
|
}
|
|
23922
24476
|
for (let i = 0; i < childRecords.length; i++) {
|
|
23923
|
-
if (
|
|
24477
|
+
if (childRecords[i].ganttProperties.isAutoSchedule) {
|
|
23924
24478
|
if (durationDiff > 0) {
|
|
23925
24479
|
const startDate = isScheduledTask(childRecords[i].ganttProperties) ?
|
|
23926
24480
|
childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.startDate ?
|
|
@@ -24037,52 +24591,52 @@ class Edit$2 {
|
|
|
24037
24591
|
}
|
|
24038
24592
|
for (let i = 0; i < eLength; i++) {
|
|
24039
24593
|
if (e.changedRecords) {
|
|
24040
|
-
rec = e.changedRecords[i];
|
|
24594
|
+
rec = e.changedRecords[parseInt(i.toString(), 10)];
|
|
24041
24595
|
}
|
|
24042
24596
|
else {
|
|
24043
|
-
rec = e[i];
|
|
24597
|
+
rec = e[parseInt(i.toString(), 10)];
|
|
24044
24598
|
}
|
|
24045
24599
|
let _aLength = Object.keys(rec).length;
|
|
24046
24600
|
for (let j = 0, _a = Object.keys(rec); j < _aLength; j++) {
|
|
24047
|
-
let key = _a[j];
|
|
24048
|
-
this.parent.editedRecords[i][key] = rec[key];
|
|
24049
|
-
this.parent.editedRecords[i].taskData[key] = rec[key];
|
|
24601
|
+
let key = _a[parseInt(j.toString(), 10)];
|
|
24602
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)][`${key}`] = rec[`${key}`];
|
|
24603
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].taskData[`${key}`] = rec[`${key}`];
|
|
24050
24604
|
}
|
|
24051
24605
|
if (this.parent.taskFields.id !== null) {
|
|
24052
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24606
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['taskId'] = rec[this.parent.taskFields.id];
|
|
24053
24607
|
}
|
|
24054
24608
|
if (this.parent.taskFields.name !== null) {
|
|
24055
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24609
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['taskName'] = rec[this.parent.taskFields.name];
|
|
24056
24610
|
}
|
|
24057
24611
|
if (this.parent.taskFields.startDate !== null) {
|
|
24058
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24612
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['startDate'] = rec[this.parent.taskFields.startDate];
|
|
24059
24613
|
}
|
|
24060
24614
|
if (this.parent.taskFields.endDate !== null) {
|
|
24061
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24615
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['endDate'] = rec[this.parent.taskFields.endDate];
|
|
24062
24616
|
}
|
|
24063
24617
|
if (this.parent.taskFields.duration !== null) {
|
|
24064
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24618
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['duration'] = parseInt(rec[this.parent.taskFields.duration]);
|
|
24065
24619
|
}
|
|
24066
24620
|
if (this.parent.taskFields.durationUnit !== null) {
|
|
24067
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24621
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['durationUnit'] = rec[this.parent.taskFields.durationUnit];
|
|
24068
24622
|
}
|
|
24069
24623
|
if (this.parent.taskFields.progress !== null) {
|
|
24070
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24624
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['progress'] = rec[this.parent.taskFields.progress];
|
|
24071
24625
|
}
|
|
24072
24626
|
if (this.parent.taskFields.dependency !== null) {
|
|
24073
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24627
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['dependency'] = rec[this.parent.taskFields.dependency];
|
|
24074
24628
|
}
|
|
24075
24629
|
if (this.parent.taskFields.parentID !== null) {
|
|
24076
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24630
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['parentID'] = rec[this.parent.taskFields.parentID];
|
|
24077
24631
|
}
|
|
24078
24632
|
if (this.parent.taskFields.baselineEndDate !== null) {
|
|
24079
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24633
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['baselineEndDate'] = rec[this.parent.taskFields.baselineEndDate];
|
|
24080
24634
|
}
|
|
24081
24635
|
if (this.parent.taskFields.baselineStartDate !== null) {
|
|
24082
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24636
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['baselineStartDate'] = rec[this.parent.taskFields.baselineStartDate];
|
|
24083
24637
|
}
|
|
24084
24638
|
if (this.parent.taskFields.resourceInfo !== null) {
|
|
24085
|
-
this.parent.editedRecords[i].ganttProperties[
|
|
24639
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['resources'] = rec[this.parent.taskFields.resourceInfo];
|
|
24086
24640
|
}
|
|
24087
24641
|
}
|
|
24088
24642
|
this.saveSuccess(args);
|
|
@@ -24151,6 +24705,14 @@ class Edit$2 {
|
|
|
24151
24705
|
}
|
|
24152
24706
|
if (!this.isTreeGridRefresh) {
|
|
24153
24707
|
this.parent.chartRowsModule.refreshRecords(this.parent.editedRecords);
|
|
24708
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && this.parent.showOverAllocation) {
|
|
24709
|
+
this.parent.contentHeight = this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
24710
|
+
this.parent.ganttChartModule.chartBodyContent.style.height = this.parent.contentHeight + 'px';
|
|
24711
|
+
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
24712
|
+
if (this.parent.taskFields.dependency) {
|
|
24713
|
+
this.parent.ganttChartModule.reRenderConnectorLines();
|
|
24714
|
+
}
|
|
24715
|
+
}
|
|
24154
24716
|
if (this.parent.isConnectorLineUpdate && !isNullOrUndefined(this.parent.connectorLineEditModule)) {
|
|
24155
24717
|
this.parent.updatedConnectorLineCollection = [];
|
|
24156
24718
|
this.parent.connectorLineIds = [];
|
|
@@ -25047,7 +25609,7 @@ class Edit$2 {
|
|
|
25047
25609
|
return !data.hasChildRecords;
|
|
25048
25610
|
});
|
|
25049
25611
|
for (let i = 0; i < updateUnAssignedResources.length; i++) {
|
|
25050
|
-
|
|
25612
|
+
let unassignedTask = this.parent.flatData.filter((data) => {
|
|
25051
25613
|
return data.ganttProperties.taskName === this.parent.localeObj.getConstant('unassignedTask');
|
|
25052
25614
|
})[0];
|
|
25053
25615
|
let isDuplicate = [];
|
|
@@ -25060,15 +25622,24 @@ class Edit$2 {
|
|
|
25060
25622
|
if (parentTask && parentTask.ganttProperties.taskName !==
|
|
25061
25623
|
this.parent.localeObj.getConstant('unassignedTask') && isDuplicate.length === 0) {
|
|
25062
25624
|
this.checkWithUnassignedTask(updateUnAssignedResources[i]);
|
|
25063
|
-
if (parentTask) {
|
|
25064
|
-
this.parent.dataOperation.updateParentItems(updateUnAssignedResources[i].parentItem);
|
|
25065
|
-
}
|
|
25066
25625
|
}
|
|
25067
25626
|
else if (!parentTask && (!isDuplicate || isDuplicate.length === 0)) {
|
|
25068
25627
|
this.checkWithUnassignedTask(updateUnAssignedResources[i]);
|
|
25069
|
-
|
|
25070
|
-
|
|
25628
|
+
}
|
|
25629
|
+
unassignedTask = this.parent.flatData.filter((data) => {
|
|
25630
|
+
return data.ganttProperties.taskName === this.parent.localeObj.getConstant('unassignedTask');
|
|
25631
|
+
})[0];
|
|
25632
|
+
let parentItem = this.parent.currentViewData.filter((data) => {
|
|
25633
|
+
if (data.ganttProperties.taskId == updateUnAssignedResources[i].ganttProperties.taskId && (!data.hasChildRecords && data.parentItem)
|
|
25634
|
+
&& unassignedTask.uniqueID === data.parentItem.uniqueID) {
|
|
25635
|
+
return data;
|
|
25636
|
+
}
|
|
25637
|
+
else {
|
|
25638
|
+
return null;
|
|
25071
25639
|
}
|
|
25640
|
+
});
|
|
25641
|
+
if (parentItem[0]) {
|
|
25642
|
+
this.parent.dataOperation.updateParentItems(parentItem[0]);
|
|
25072
25643
|
}
|
|
25073
25644
|
}
|
|
25074
25645
|
}
|
|
@@ -25669,7 +26240,7 @@ class Edit$2 {
|
|
|
25669
26240
|
if (!isNullOrUndefined(ganttData)) {
|
|
25670
26241
|
this.validateUpdateValues(args.newTaskData, ganttData, true);
|
|
25671
26242
|
}
|
|
25672
|
-
if (!isNullOrUndefined(args.data[tempTaskID])) {
|
|
26243
|
+
if (!isNullOrUndefined(args.data[`${tempTaskID}`])) {
|
|
25673
26244
|
if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
|
|
25674
26245
|
args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
|
|
25675
26246
|
args.newTaskData[tempTaskID] = args.data[tempTaskID];
|
|
@@ -26945,9 +27516,95 @@ class Filter$1 {
|
|
|
26945
27516
|
}
|
|
26946
27517
|
}
|
|
26947
27518
|
}
|
|
27519
|
+
setPosition(li, ul) {
|
|
27520
|
+
const gridPos = this.parent.element.getBoundingClientRect();
|
|
27521
|
+
let gridPosTop = gridPos.top;
|
|
27522
|
+
let gridPosLeft = gridPos.left;
|
|
27523
|
+
let parentNode;
|
|
27524
|
+
let parentNodeTop;
|
|
27525
|
+
let parentNodeLeft;
|
|
27526
|
+
let paddingTop;
|
|
27527
|
+
let paddingLeft;
|
|
27528
|
+
let marginTop;
|
|
27529
|
+
let marginLeft;
|
|
27530
|
+
if (!isNullOrUndefined(this.parent.element.parentNode) && this.parent.element.parentNode['tagName'] != 'BODY') {
|
|
27531
|
+
parentNode = this.parent.element.parentNode;
|
|
27532
|
+
parentNodeTop = parentNode.getBoundingClientRect().top;
|
|
27533
|
+
marginTop = parentNode.style.marginTop;
|
|
27534
|
+
while (true) {
|
|
27535
|
+
if (Math.abs(gridPosTop) > Math.abs(parentNodeTop)) {
|
|
27536
|
+
paddingTop = gridPosTop - parentNodeTop;
|
|
27537
|
+
break;
|
|
27538
|
+
}
|
|
27539
|
+
if (!isNullOrUndefined(this.parent.element.parentNode)) {
|
|
27540
|
+
parentNode = parentNode.parentNode;
|
|
27541
|
+
marginTop = parentNode.parentNode.style.marginTop;
|
|
27542
|
+
}
|
|
27543
|
+
parentNodeTop = parentNode.getBoundingClientRect().top;
|
|
27544
|
+
}
|
|
27545
|
+
parentNodeLeft = parentNode.getBoundingClientRect().left;
|
|
27546
|
+
marginLeft = parentNode.style.marginLeft;
|
|
27547
|
+
while (true) {
|
|
27548
|
+
if (Math.abs(gridPosLeft) > Math.abs(parentNodeLeft)) {
|
|
27549
|
+
paddingLeft = gridPosLeft - parentNodeLeft;
|
|
27550
|
+
break;
|
|
27551
|
+
}
|
|
27552
|
+
if (!isNullOrUndefined(this.parent.element.parentNode)) {
|
|
27553
|
+
parentNode = parentNode.parentNode;
|
|
27554
|
+
marginLeft = parentNode.style.marginLeft;
|
|
27555
|
+
}
|
|
27556
|
+
parentNodeLeft = parentNode.getBoundingClientRect().left;
|
|
27557
|
+
}
|
|
27558
|
+
}
|
|
27559
|
+
let liPos = li.getBoundingClientRect();
|
|
27560
|
+
let left = liPos.right + window.scrollX;
|
|
27561
|
+
let top = liPos.top + window.scrollY;
|
|
27562
|
+
if (gridPos.right < (left + ul.offsetWidth)) {
|
|
27563
|
+
if ((liPos.left - ul.offsetWidth) > gridPos.left) {
|
|
27564
|
+
left = (liPos.left - ul.offsetWidth);
|
|
27565
|
+
}
|
|
27566
|
+
else {
|
|
27567
|
+
left -= (left + ul.offsetWidth) - gridPos.right;
|
|
27568
|
+
}
|
|
27569
|
+
}
|
|
27570
|
+
else {
|
|
27571
|
+
if (!isNullOrUndefined(paddingTop) && !isNullOrUndefined(paddingLeft)) {
|
|
27572
|
+
left = Math.abs(liPos.right - gridPos.left);
|
|
27573
|
+
top = Math.abs(liPos.top - gridPos.top);
|
|
27574
|
+
}
|
|
27575
|
+
}
|
|
27576
|
+
if (!isNullOrUndefined(paddingTop) && !isNullOrUndefined(paddingLeft)) {
|
|
27577
|
+
ul.style.top = typeof (parseInt(marginTop)) === "string" ? (top + paddingTop + parseInt(marginTop)) + 'px' : (top + paddingTop) + 'px';
|
|
27578
|
+
ul.style.left = typeof (parseInt(marginLeft)) === "string" ? (left + paddingLeft + parseInt(marginLeft) + 8) + 'px' : (left + paddingLeft) + 'px';
|
|
27579
|
+
}
|
|
27580
|
+
else {
|
|
27581
|
+
ul.style.top = top + 'px';
|
|
27582
|
+
ul.style.left = left + 'px';
|
|
27583
|
+
}
|
|
27584
|
+
}
|
|
26948
27585
|
updateFilterMenuPosition(element, args) {
|
|
26949
27586
|
addClass([element], 'e-gantt');
|
|
26950
|
-
document.querySelector('#' + this.parent.
|
|
27587
|
+
document.querySelector('#' + this.parent.controlId).appendChild(element);
|
|
27588
|
+
let targetElement;
|
|
27589
|
+
if (this.parent.showColumnMenu) {
|
|
27590
|
+
targetElement = document.querySelector('#treeGrid' + this.parent.controlId + '_gridcontrol_colmenu_Filter');
|
|
27591
|
+
element.style.zIndex = targetElement.parentElement.style.zIndex;
|
|
27592
|
+
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
27593
|
+
this.setPosition(targetElement, getValue('filterModel.dlgObj.element', args));
|
|
27594
|
+
}
|
|
27595
|
+
else {
|
|
27596
|
+
this.setPosition(targetElement, getValue('filterModel.dialogObj.element', args));
|
|
27597
|
+
}
|
|
27598
|
+
}
|
|
27599
|
+
else {
|
|
27600
|
+
targetElement = this.parent.treeGrid.grid.getColumnHeaderByField(args.columnName).querySelector('.e-filtermenudiv');
|
|
27601
|
+
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
27602
|
+
getFilterMenuPostion(targetElement, getValue('filterModel.dlgObj', args));
|
|
27603
|
+
}
|
|
27604
|
+
else {
|
|
27605
|
+
getFilterMenuPostion(targetElement, getValue('filterModel.dialogObj', args));
|
|
27606
|
+
}
|
|
27607
|
+
}
|
|
26951
27608
|
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
26952
27609
|
element.querySelector('.e-valid-input').focus();
|
|
26953
27610
|
}
|
|
@@ -27363,7 +28020,10 @@ class Selection$1 {
|
|
|
27363
28020
|
const rIndex = parseInt(selectedRow.getAttribute('aria-rowindex'), 10);
|
|
27364
28021
|
const isToggle = this.parent.selectionSettings.enableToggle;
|
|
27365
28022
|
if (this.parent.selectionSettings.type === 'Single' || (!this.isMultiCtrlRequest && !this.isMultiShiftRequest)) {
|
|
27366
|
-
this.
|
|
28023
|
+
if (!this.parent.allowTaskbarDragAndDrop || (this.parent.allowTaskbarDragAndDrop && (this.parent.rowDragAndDropModule &&
|
|
28024
|
+
!this.parent.rowDragAndDropModule['draggedRecord']))) {
|
|
28025
|
+
this.selectRow(rIndex, isToggle);
|
|
28026
|
+
}
|
|
27367
28027
|
}
|
|
27368
28028
|
else {
|
|
27369
28029
|
if (this.isMultiShiftRequest) {
|
|
@@ -27407,7 +28067,7 @@ class Selection$1 {
|
|
|
27407
28067
|
}
|
|
27408
28068
|
addRemoveClass(records) {
|
|
27409
28069
|
if (typeof (records) == "number") {
|
|
27410
|
-
records =
|
|
28070
|
+
records = [records];
|
|
27411
28071
|
}
|
|
27412
28072
|
const ganttRow = [].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector('tbody').children);
|
|
27413
28073
|
for (let i = 0; i < records.length; i++) {
|
|
@@ -28181,6 +28841,9 @@ class NonWorkingDay {
|
|
|
28181
28841
|
});
|
|
28182
28842
|
const property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
|
|
28183
28843
|
spanElement[property] = this.parent.holidays[i].label ? this.parent.holidays[i].label : '';
|
|
28844
|
+
if (this.parent.enableHtmlSanitizer && typeof (spanElement[property]) === 'string') {
|
|
28845
|
+
spanElement[property] = SanitizeHtmlHelper.sanitize(spanElement[property]);
|
|
28846
|
+
}
|
|
28184
28847
|
holidayDiv.appendChild(spanElement);
|
|
28185
28848
|
if (this.parent.holidays[i].cssClass) {
|
|
28186
28849
|
holidayDiv.classList.add(this.parent.holidays[i].cssClass);
|
|
@@ -28366,6 +29029,9 @@ class EventMarker$1 {
|
|
|
28366
29029
|
});
|
|
28367
29030
|
const property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
|
|
28368
29031
|
spanElement[property] = this.parent.eventMarkers[i].label;
|
|
29032
|
+
if (this.parent.enableHtmlSanitizer && typeof (spanElement[property]) === 'string') {
|
|
29033
|
+
spanElement[property] = SanitizeHtmlHelper.sanitize(spanElement[property]);
|
|
29034
|
+
}
|
|
28369
29035
|
if (this.parent.enableRtl) {
|
|
28370
29036
|
spanElement.style.right = '5px';
|
|
28371
29037
|
}
|
|
@@ -29598,7 +30264,7 @@ class ContextMenu$2 {
|
|
|
29598
30264
|
this.parent.selectionModule.selectRow(rowIndex);
|
|
29599
30265
|
}
|
|
29600
30266
|
if (!args.parentItem) {
|
|
29601
|
-
this.rowData = this.parent.updatedRecords[rowIndex];
|
|
30267
|
+
this.rowData = this.parent.updatedRecords[parseInt(rowIndex.toString(), 10)];
|
|
29602
30268
|
}
|
|
29603
30269
|
for (const item of args.items) {
|
|
29604
30270
|
// let target: EventTarget = target;
|
|
@@ -29729,7 +30395,7 @@ class ContextMenu$2 {
|
|
|
29729
30395
|
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
29730
30396
|
const prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
|
|
29731
30397
|
if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
|
|
29732
|
-
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[index].level - prevRecord.level === 1) {
|
|
30398
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[parseInt(index.toString(), 10)].level - prevRecord.level === 1) {
|
|
29733
30399
|
this.updateItemVisibility(item.text);
|
|
29734
30400
|
}
|
|
29735
30401
|
}
|
|
@@ -29745,7 +30411,7 @@ class ContextMenu$2 {
|
|
|
29745
30411
|
const isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
29746
30412
|
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
29747
30413
|
if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
|
|
29748
|
-
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
|
|
30414
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[parseInt(ind.toString(), 10)].level === 0) {
|
|
29749
30415
|
this.updateItemVisibility(item.text);
|
|
29750
30416
|
}
|
|
29751
30417
|
}
|
|
@@ -29755,7 +30421,7 @@ class ContextMenu$2 {
|
|
|
29755
30421
|
{
|
|
29756
30422
|
const taskSettings = this.parent.taskFields;
|
|
29757
30423
|
if (this.parent.readOnly || !taskbarElement || isNullOrUndefined(taskSettings.segments) ||
|
|
29758
|
-
this.parent.currentViewData[rowIndex].hasChildRecords) {
|
|
30424
|
+
this.parent.currentViewData[parseInt(rowIndex.toString(), 10)].hasChildRecords) {
|
|
29759
30425
|
this.updateItemVisibility(item.text);
|
|
29760
30426
|
}
|
|
29761
30427
|
break;
|
|
@@ -29958,7 +30624,7 @@ class ContextMenu$2 {
|
|
|
29958
30624
|
}
|
|
29959
30625
|
contextMenuOnClose(args) {
|
|
29960
30626
|
const parent = 'parentObj';
|
|
29961
|
-
if (args.items.length > 0 && args.items[0][parent] instanceof ContextMenu$1) {
|
|
30627
|
+
if (args.items.length > 0 && args.items[0][`${parent}`] instanceof ContextMenu$1) {
|
|
29962
30628
|
this.revertItemStatus();
|
|
29963
30629
|
}
|
|
29964
30630
|
}
|
|
@@ -30428,7 +31094,7 @@ class RowDD$1 {
|
|
|
30428
31094
|
parentUniqueID = this.droppedRecord.uniqueID;
|
|
30429
31095
|
}
|
|
30430
31096
|
else {
|
|
30431
|
-
parentUniqueID = this.droppedRecord.parentItem.uniqueID;
|
|
31097
|
+
parentUniqueID = this.droppedRecord.parentItem ? this.droppedRecord.parentItem.uniqueID : this.droppedRecord.uniqueID;
|
|
30432
31098
|
}
|
|
30433
31099
|
const droppedParentItem = this.parent.getTaskByUniqueID(parentUniqueID);
|
|
30434
31100
|
const editedObj = {};
|
|
@@ -30455,7 +31121,7 @@ class RowDD$1 {
|
|
|
30455
31121
|
this.updateSharedResourceTask();
|
|
30456
31122
|
}
|
|
30457
31123
|
}
|
|
30458
|
-
if (this.parent.taskFields.dependency) {
|
|
31124
|
+
if (this.parent.taskFields.dependency && this.parent.allowParentDependency) {
|
|
30459
31125
|
let isValidPredecessor = true;
|
|
30460
31126
|
let draggedParent;
|
|
30461
31127
|
let toParent;
|
|
@@ -33786,6 +34452,7 @@ class PdfGanttTaskbarCollection {
|
|
|
33786
34452
|
}
|
|
33787
34453
|
else {
|
|
33788
34454
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
34455
|
+
taskbar.width = taskbar.width - renderWidth;
|
|
33789
34456
|
if (this.isScheduledTask) {
|
|
33790
34457
|
let progressBoundsWidth = 0;
|
|
33791
34458
|
if (this.progressWidth <= renderWidth) {
|
|
@@ -34728,7 +35395,7 @@ class PdfGantt extends PdfTreeGrid {
|
|
|
34728
35395
|
&& this.parent.cloneProjectStartDate.getSeconds() === 0) {
|
|
34729
35396
|
this.parent.cloneProjectStartDate.setHours(8);
|
|
34730
35397
|
}
|
|
34731
|
-
const timelineStartDate = this.parent.dataOperation.getDateFromFormat(this.parent.
|
|
35398
|
+
const timelineStartDate = this.parent.dataOperation.getDateFromFormat(this.parent.timelineModule.timelineStartDate);
|
|
34732
35399
|
const count = isNullOrUndefined(timelineSettings.customTimelineSettings.bottomTier.count) ?
|
|
34733
35400
|
timelineSettings.customTimelineSettings.topTier.count : timelineSettings.customTimelineSettings.bottomTier.count;
|
|
34734
35401
|
const scheduleType = timelineSettings.customTimelineSettings.bottomTier.unit === 'None' ?
|
|
@@ -34938,7 +35605,8 @@ class PdfExport {
|
|
|
34938
35605
|
* @param {object} pdfDoc .
|
|
34939
35606
|
* @returns {Promise<Object>} .
|
|
34940
35607
|
*/
|
|
34941
|
-
export(pdfExportProperties, isMultipleExport, pdfDoc) {
|
|
35608
|
+
export(pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
35609
|
+
this.isBlob = isBlob;
|
|
34942
35610
|
const args = {
|
|
34943
35611
|
requestType: 'beforePdfExport',
|
|
34944
35612
|
ganttObject: this.parent,
|
|
@@ -34981,7 +35649,7 @@ class PdfExport {
|
|
|
34981
35649
|
this.pdfDocument = new PdfDocument();
|
|
34982
35650
|
}
|
|
34983
35651
|
this.processExport(data, pdfExportProperties, isMultipleExport).then(() => {
|
|
34984
|
-
this.parent.trigger('pdfExportComplete', {});
|
|
35652
|
+
this.parent.trigger('pdfExportComplete', this.isBlob ? { promise: this.blobPromise } : {});
|
|
34985
35653
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
34986
35654
|
this.parent.hideMaskRow();
|
|
34987
35655
|
}
|
|
@@ -35006,12 +35674,17 @@ class PdfExport {
|
|
|
35006
35674
|
const layouter = this.gantt.drawGrid(pdfPage, 0, 0, format);
|
|
35007
35675
|
this.gantt.drawChart(layouter);
|
|
35008
35676
|
if (!isMultipleExport) {
|
|
35009
|
-
|
|
35010
|
-
|
|
35011
|
-
|
|
35677
|
+
if (!this.isBlob) {
|
|
35678
|
+
// save the PDF
|
|
35679
|
+
if (!isNullOrUndefined(pdfExportProperties) && pdfExportProperties.fileName) {
|
|
35680
|
+
this.pdfDocument.save(pdfExportProperties.fileName);
|
|
35681
|
+
}
|
|
35682
|
+
else {
|
|
35683
|
+
this.pdfDocument.save('Export.pdf');
|
|
35684
|
+
}
|
|
35012
35685
|
}
|
|
35013
35686
|
else {
|
|
35014
|
-
this.pdfDocument.save(
|
|
35687
|
+
this.blobPromise = this.pdfDocument.save();
|
|
35015
35688
|
}
|
|
35016
35689
|
this.pdfDocument.destroy();
|
|
35017
35690
|
}
|