@syncfusion/ej2-gantt 20.4.54 → 21.1.35
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 +14 -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 +1086 -419
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1064 -397
- 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 +78 -33
- 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/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
|
@@ -146,6 +146,8 @@ export interface ITaskData {
|
|
|
146
146
|
workTimelineRanges?: IWorkTimelineRanges[];
|
|
147
147
|
/** Defines overlap index. */
|
|
148
148
|
eOverlapIndex?: number;
|
|
149
|
+
/** Defines whether overlapped with other taskbar or not. */
|
|
150
|
+
eOverlapped?: boolean;
|
|
149
151
|
/** Defines task segments. */
|
|
150
152
|
segments?: ITaskSegment[];
|
|
151
153
|
/**
|
|
@@ -172,7 +172,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
172
172
|
TaskProcessor.prototype.constructResourceViewDataSource = function (resources, data, unassignedTasks) {
|
|
173
173
|
var _loop_1 = function (i) {
|
|
174
174
|
var tempData = data[i];
|
|
175
|
-
child = this_1.parent.taskFields.child != null ? this_1.parent.taskFields.child : 'Children';
|
|
175
|
+
var child = this_1.parent.taskFields.child != null ? this_1.parent.taskFields.child : 'Children';
|
|
176
176
|
var resourceData = tempData && tempData[this_1.parent.taskFields.resourceInfo];
|
|
177
177
|
var resourceIdMapping = this_1.parent.resourceFields.id;
|
|
178
178
|
if ((!tempData[child] || tempData[child].length === 0) && resourceData && resourceData.length) {
|
|
@@ -199,7 +199,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
199
199
|
this_1.constructResourceViewDataSource(resources, tempData[this_1.parent.taskFields.child], unassignedTasks);
|
|
200
200
|
}
|
|
201
201
|
};
|
|
202
|
-
var this_1 = this
|
|
202
|
+
var this_1 = this;
|
|
203
203
|
for (var i = 0; i < data.length; i++) {
|
|
204
204
|
_loop_1(i);
|
|
205
205
|
}
|
|
@@ -258,7 +258,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
var ganttData = this_3.createRecord(tempData, level, parentItem, true);
|
|
261
|
-
if (!this_3.parent.enableValidation) {
|
|
261
|
+
if (!this_3.parent.enableValidation || !this_3.parent.autoCalculateDateScheduling) {
|
|
262
262
|
this_3.updateTaskLeftWidth(ganttData);
|
|
263
263
|
}
|
|
264
264
|
ganttData.index = this_3.recordIndex++;
|
|
@@ -292,6 +292,9 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
292
292
|
this_3.parent.setRecordValue('autoDuration', this_3.calculateAutoDuration(parentProp), parentProp, true);
|
|
293
293
|
this_3.updateAutoWidthLeft(parentData);
|
|
294
294
|
}
|
|
295
|
+
if (!this_3.parent.allowParentDependency) {
|
|
296
|
+
this_3.resetDependency(parentData);
|
|
297
|
+
}
|
|
295
298
|
this_3.updateWidthLeft(parentData);
|
|
296
299
|
this_3.updateTaskData(parentData);
|
|
297
300
|
}
|
|
@@ -408,6 +411,9 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
408
411
|
if (!isNullOrUndefined(data[taskSettings.child]) && data[taskSettings.child].length > 0) {
|
|
409
412
|
this.parent.setRecordValue('hasChildRecords', true, ganttData);
|
|
410
413
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
414
|
+
if (!this.parent.allowParentDependency) {
|
|
415
|
+
this.resetDependency(ganttData);
|
|
416
|
+
}
|
|
411
417
|
}
|
|
412
418
|
else {
|
|
413
419
|
this.parent.setRecordValue('hasChildRecords', false, ganttData);
|
|
@@ -808,6 +814,16 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
808
814
|
}
|
|
809
815
|
}
|
|
810
816
|
}
|
|
817
|
+
if (!this.parent.autoCalculateDateScheduling) {
|
|
818
|
+
if (!isNullOrUndefined(ganttData.ganttProperties.startDate)) {
|
|
819
|
+
ganttData[this.parent.taskFields.startDate] = ganttData.ganttProperties.startDate;
|
|
820
|
+
ganttData.taskData[this.parent.taskFields.startDate] = ganttData.ganttProperties.startDate;
|
|
821
|
+
}
|
|
822
|
+
if (!isNullOrUndefined(ganttData.ganttProperties.endDate)) {
|
|
823
|
+
ganttData[this.parent.taskFields.endDate] = ganttData.ganttProperties.endDate;
|
|
824
|
+
ganttData.taskData[this.parent.taskFields.endDate] = ganttData.ganttProperties.endDate;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
811
827
|
if (!isNullOrUndefined(segments)) {
|
|
812
828
|
this.parent.setRecordValue('segments', this.setSegmentsInfo(ganttData, true), ganttProperties, true);
|
|
813
829
|
}
|
|
@@ -1802,7 +1818,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
1802
1818
|
var rangeObj_1 = {};
|
|
1803
1819
|
if (this._isInStartDateRange(cStartDate, tStartDate, tEndDate) || this._isInEndDateRange(cEndDate, tStartDate, tEndDate)) {
|
|
1804
1820
|
if ((tStartDate.getTime() > cStartDate.getTime() && tStartDate.getTime() < cEndDate.getTime()
|
|
1805
|
-
&& tEndDate.getTime() > cStartDate.getTime() && tEndDate.getTime()
|
|
1821
|
+
&& tEndDate.getTime() > cStartDate.getTime() && tEndDate.getTime() >= cEndDate.getTime())
|
|
1806
1822
|
|| (cStartDate.getTime() === tStartDate.getTime() && cEndDate.getTime() <= tEndDate.getTime())) {
|
|
1807
1823
|
rangeObj_1.from = tStartDate;
|
|
1808
1824
|
rangeObj_1.to = cEndDate;
|
|
@@ -2083,7 +2099,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2083
2099
|
*/
|
|
2084
2100
|
TaskProcessor.prototype.updateTaskLeftWidth = function (data) {
|
|
2085
2101
|
var task = data.ganttProperties;
|
|
2086
|
-
if (!data.hasChildRecords) {
|
|
2102
|
+
if (!data.hasChildRecords || !this.parent.autoCalculateDateScheduling) {
|
|
2087
2103
|
this.updateWidthLeft(data);
|
|
2088
2104
|
}
|
|
2089
2105
|
this.parent.setRecordValue('baselineLeft', this.calculateBaselineLeft(task), task, true);
|
|
@@ -2095,7 +2111,12 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2095
2111
|
childData = parentItem.childRecords;
|
|
2096
2112
|
}
|
|
2097
2113
|
if (parentItem && childData.indexOf(data) === childData.length - 1 && !data.hasChildRecords && this.parent.enableValidation) {
|
|
2098
|
-
this.
|
|
2114
|
+
if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
|
|
2115
|
+
this.updateParentItems(parentItem);
|
|
2116
|
+
}
|
|
2117
|
+
if (!this.parent.autoCalculateDateScheduling) {
|
|
2118
|
+
this.updateWidthLeft(parentItem);
|
|
2119
|
+
}
|
|
2099
2120
|
}
|
|
2100
2121
|
else if (parentItem && !this.parent.enableValidation) {
|
|
2101
2122
|
this.updateWidthLeft(parentItem);
|
|
@@ -2238,105 +2259,119 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2238
2259
|
var parentData = isParent ? cloneParent : this.parent.getParentTask(cloneParent);
|
|
2239
2260
|
var deleteUpdate = false;
|
|
2240
2261
|
var ganttProp = parentData.ganttProperties;
|
|
2241
|
-
if (
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
ganttProp.
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
if (
|
|
2259
|
-
|
|
2262
|
+
if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
|
|
2263
|
+
if (parentData.childRecords.length > 0) {
|
|
2264
|
+
var previousStartDate = ganttProp.isAutoSchedule ? ganttProp.startDate : ganttProp.autoStartDate;
|
|
2265
|
+
var previousEndDate = ganttProp.isAutoSchedule ? ganttProp.endDate :
|
|
2266
|
+
ganttProp.autoEndDate;
|
|
2267
|
+
var childRecords = parentData.childRecords;
|
|
2268
|
+
var childLength = childRecords.length;
|
|
2269
|
+
var totalDuration = 0;
|
|
2270
|
+
var progressValues = {};
|
|
2271
|
+
var minStartDate = null;
|
|
2272
|
+
var maxEndDate = null;
|
|
2273
|
+
var milestoneCount = 0;
|
|
2274
|
+
var totalProgress = 0;
|
|
2275
|
+
var childCompletedWorks = 0;
|
|
2276
|
+
var childData = void 0;
|
|
2277
|
+
for (var count = 0; count < childLength; count++) {
|
|
2278
|
+
childData = childRecords[count];
|
|
2279
|
+
if (this.parent.isOnDelete && childData.isDelete) {
|
|
2280
|
+
if (childLength === 1 && this.parent.viewType === 'ProjectView') {
|
|
2281
|
+
deleteUpdate = true;
|
|
2282
|
+
}
|
|
2283
|
+
continue;
|
|
2260
2284
|
}
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2285
|
+
var startDate = this.getValidStartDate(childData.ganttProperties);
|
|
2286
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
|
|
2287
|
+
startDate = childData.ganttProperties.autoStartDate;
|
|
2288
|
+
}
|
|
2289
|
+
var endDate = this.getValidEndDate(childData.ganttProperties);
|
|
2290
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
|
|
2291
|
+
endDate = childData.ganttProperties.autoEndDate;
|
|
2292
|
+
}
|
|
2293
|
+
if (isNullOrUndefined(minStartDate)) {
|
|
2294
|
+
minStartDate = this.getDateFromFormat(startDate);
|
|
2295
|
+
}
|
|
2296
|
+
if (isNullOrUndefined(maxEndDate)) {
|
|
2297
|
+
maxEndDate = this.getDateFromFormat(endDate);
|
|
2298
|
+
}
|
|
2299
|
+
if (!isNullOrUndefined(endDate) && this.compareDates(endDate, maxEndDate) === 1) {
|
|
2300
|
+
maxEndDate = this.getDateFromFormat(endDate);
|
|
2301
|
+
}
|
|
2302
|
+
if (!isNullOrUndefined(startDate) && this.compareDates(startDate, minStartDate) === -1) {
|
|
2303
|
+
minStartDate = this.getDateFromFormat(startDate);
|
|
2304
|
+
}
|
|
2305
|
+
if (!childData.ganttProperties.isMilestone && isScheduledTask(childData.ganttProperties)) {
|
|
2306
|
+
progressValues = this.getParentProgress(childData);
|
|
2307
|
+
totalProgress += getValue('totalProgress', progressValues);
|
|
2308
|
+
if (childData[this.parent.taskFields.duration] < 1) {
|
|
2309
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
2310
|
+
totalDuration = Number(totalDuration.toFixed(4));
|
|
2311
|
+
}
|
|
2312
|
+
else {
|
|
2313
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
2314
|
+
}
|
|
2289
2315
|
}
|
|
2290
2316
|
else {
|
|
2291
|
-
|
|
2317
|
+
milestoneCount++;
|
|
2292
2318
|
}
|
|
2319
|
+
childCompletedWorks += childData.ganttProperties.work;
|
|
2293
2320
|
}
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
this.
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2321
|
+
if (!deleteUpdate) {
|
|
2322
|
+
var taskCount = void 0;
|
|
2323
|
+
if (this.parent.isOnDelete && childData.isDelete) {
|
|
2324
|
+
taskCount = childLength - milestoneCount - 1;
|
|
2325
|
+
}
|
|
2326
|
+
else {
|
|
2327
|
+
taskCount = childLength - milestoneCount;
|
|
2328
|
+
}
|
|
2329
|
+
var parentProgress = (taskCount > 0 && totalDuration > 0) ? (totalProgress / totalDuration) : 0;
|
|
2330
|
+
var parentProp = parentData.ganttProperties;
|
|
2331
|
+
var milestone = (taskCount === 0) && minStartDate && maxEndDate &&
|
|
2332
|
+
minStartDate.getTime() === maxEndDate.getTime() ? true : false;
|
|
2333
|
+
if (this.compareDates(previousStartDate, minStartDate) !== 0) {
|
|
2334
|
+
this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'startDate' : 'autoStartDate', minStartDate, parentData.ganttProperties, true);
|
|
2335
|
+
if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone) {
|
|
2336
|
+
this.parent.setRecordValue('startDate', minStartDate, parentData.ganttProperties, true);
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
if (this.compareDates(previousEndDate, maxEndDate) !== 0) {
|
|
2340
|
+
this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'endDate' : 'autoEndDate', maxEndDate, parentData.ganttProperties, true);
|
|
2341
|
+
if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone) {
|
|
2342
|
+
this.parent.setRecordValue('endDate', maxEndDate, parentData.ganttProperties, true);
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
this.parent.setRecordValue('isMilestone', milestone, parentProp, true);
|
|
2346
|
+
if (parentProp.isAutoSchedule) {
|
|
2347
|
+
this.calculateDuration(parentData);
|
|
2348
|
+
}
|
|
2349
|
+
this.updateWorkWithDuration(parentData);
|
|
2350
|
+
var parentWork = parentProp.work;
|
|
2351
|
+
parentWork = this.parent.isOnEdit ? parentWork : (parentWork + childCompletedWorks);
|
|
2352
|
+
this.parent.setRecordValue('work', parentWork, parentProp, true);
|
|
2353
|
+
this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
|
|
2354
|
+
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
2355
|
+
this.updateMappingData(parentData, 'type');
|
|
2356
|
+
}
|
|
2357
|
+
this.parent.setRecordValue('progress', Math.floor(parentProgress), parentProp, true);
|
|
2358
|
+
this.parent.setRecordValue('totalProgress', totalProgress, parentProp, true);
|
|
2359
|
+
this.parent.setRecordValue('totalDuration', totalDuration, parentProp, true);
|
|
2360
|
+
if (!parentProp.isAutoSchedule) {
|
|
2361
|
+
this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
|
|
2362
|
+
this.updateAutoWidthLeft(parentData);
|
|
2363
|
+
}
|
|
2364
|
+
if (!this.parent.allowParentDependency) {
|
|
2365
|
+
this.resetDependency(parentData);
|
|
2366
|
+
}
|
|
2367
|
+
this.updateWidthLeft(parentData);
|
|
2368
|
+
this.updateTaskData(parentData);
|
|
2335
2369
|
}
|
|
2336
|
-
this.updateWidthLeft(parentData);
|
|
2337
|
-
this.updateTaskData(parentData);
|
|
2338
2370
|
}
|
|
2339
2371
|
}
|
|
2372
|
+
else {
|
|
2373
|
+
parentData.ganttProperties.endDate = parentData.taskData[this.parent.taskFields.endDate];
|
|
2374
|
+
}
|
|
2340
2375
|
if (deleteUpdate && parentData.childRecords.length === 1 && parentData.ganttProperties.duration === 0) {
|
|
2341
2376
|
this.parent.setRecordValue('isMilestone', true, parentData.ganttProperties, true);
|
|
2342
2377
|
this.updateWidthLeft(parentData);
|
|
@@ -2344,7 +2379,9 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2344
2379
|
}
|
|
2345
2380
|
var parentItem = this.parent.getParentTask(parentData.parentItem);
|
|
2346
2381
|
if (parentItem) {
|
|
2347
|
-
this.
|
|
2382
|
+
if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
|
|
2383
|
+
this.updateParentItems(parentItem);
|
|
2384
|
+
}
|
|
2348
2385
|
}
|
|
2349
2386
|
deleteUpdate = false;
|
|
2350
2387
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TreeGrid } from '@syncfusion/ej2-treegrid';
|
|
2
|
-
import { createElement, isNullOrUndefined, getValue, extend, EventHandler, deleteObject } from '@syncfusion/ej2-base';
|
|
2
|
+
import { createElement, isNullOrUndefined, getValue, extend, EventHandler, deleteObject, remove } from '@syncfusion/ej2-base';
|
|
3
3
|
import { setValue } from '@syncfusion/ej2-base';
|
|
4
4
|
import { Deferred, Query } from '@syncfusion/ej2-data';
|
|
5
5
|
import { Column as GanttColumn } from '../models/column';
|
|
@@ -26,6 +26,15 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
26
26
|
this.columnMenuOpen = function (args) {
|
|
27
27
|
_this.parent.notify('columnMenuOpen', args);
|
|
28
28
|
_this.parent.trigger('columnMenuOpen', args);
|
|
29
|
+
document.querySelector(".e-colmenu").addEventListener('mousemove', function (event) {
|
|
30
|
+
var filPopOptions = document.querySelector(".e-filter-popup");
|
|
31
|
+
var filOptions = document.querySelector(".e-filter-item");
|
|
32
|
+
if (!isNullOrUndefined(filPopOptions)) {
|
|
33
|
+
if (!filOptions.classList.contains('e-focused')) {
|
|
34
|
+
remove(_this.parent.filterModule.filterMenuElement);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
29
38
|
};
|
|
30
39
|
this.columnMenuClick = function (args) {
|
|
31
40
|
_this.parent.trigger('columnMenuClick', args);
|
|
@@ -57,6 +66,7 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
57
66
|
this.parent.treeGrid = new TreeGrid();
|
|
58
67
|
this.parent.treeGrid.allowSelection = false;
|
|
59
68
|
this.parent.treeGrid.allowKeyboard = this.parent.allowKeyboard;
|
|
69
|
+
this.parent.treeGrid['${enableHtmlSanitizer}'] = this.parent.enableHtmlSanitizer;
|
|
60
70
|
this.parent.treeGrid.enableImmutableMode = this.parent.enableImmutableMode;
|
|
61
71
|
this.treeGridColumns = [];
|
|
62
72
|
if (!this.parent.isLocaleChanged && this.parent.isLoad) {
|
|
@@ -247,6 +257,12 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
247
257
|
if (!this.parent.ganttChartModule.isExpandCollapseFromChart && !this.parent.isExpandCollapseLevelMethod) {
|
|
248
258
|
var collapsedArgs = this.createExpandCollapseArgs(args);
|
|
249
259
|
this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
|
|
260
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && collapsedArgs['gridRow']) {
|
|
261
|
+
collapsedArgs['gridRow'].style.height = collapsedArgs['chartRow'].style.height;
|
|
262
|
+
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
263
|
+
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
264
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
265
|
+
}
|
|
250
266
|
}
|
|
251
267
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
252
268
|
this.parent.hideMaskRow();
|
|
@@ -260,6 +276,12 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
260
276
|
if (!args['data'].length) {
|
|
261
277
|
var expandedArgs = this.createExpandCollapseArgs(args);
|
|
262
278
|
this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
|
|
279
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && args['row']) {
|
|
280
|
+
args['row'].style.height = this.parent.rowHeight + 'px';
|
|
281
|
+
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
282
|
+
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
283
|
+
document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
|
|
284
|
+
}
|
|
263
285
|
}
|
|
264
286
|
}
|
|
265
287
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
@@ -352,6 +374,14 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
352
374
|
this.parent.addDeleteRecord = false;
|
|
353
375
|
}
|
|
354
376
|
this.parent.trigger('actionComplete', updatedArgs);
|
|
377
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && this.parent.showOverAllocation) {
|
|
378
|
+
for (var i = 0; i < this.parent.currentViewData.length; i++) {
|
|
379
|
+
if (this.parent.currentViewData[i].hasChildRecords && !this.parent.currentViewData[i].expanded) {
|
|
380
|
+
this.parent.chartRowsModule.updateDragDropRecords(this.parent.currentViewData[i]);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
384
|
+
}
|
|
355
385
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
356
386
|
this.parent.hideMaskRow();
|
|
357
387
|
}
|
package/src/gantt/base/utils.js
CHANGED
|
@@ -139,7 +139,7 @@ export function updateDates(record, parent) {
|
|
|
139
139
|
export function formatString(str, args) {
|
|
140
140
|
var regx;
|
|
141
141
|
for (var i = 0; i < args.length; i++) {
|
|
142
|
-
// eslint-disable-next-line detect-non-literal-regexp
|
|
142
|
+
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
143
143
|
regx = new RegExp('\\{' + (i) + '\\}', 'gm');
|
|
144
144
|
str = str.replace(regx, args[i].toString());
|
|
145
145
|
}
|
|
@@ -268,6 +268,8 @@ export declare class ChartRows extends DateProcessor {
|
|
|
268
268
|
* @private
|
|
269
269
|
*/
|
|
270
270
|
templateCompiler(template: string): Function;
|
|
271
|
+
updateOverlapped(): void;
|
|
272
|
+
updateDragDropRecords(data: IGanttData, tr?: Node): void;
|
|
271
273
|
/**
|
|
272
274
|
* To refresh edited TR
|
|
273
275
|
*
|