@syncfusion/ej2-gantt 21.1.41 → 21.2.4
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 +22 -0
- package/dist/ej2-gantt.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +40 -16
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +41 -16
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +19 -19
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/actions/edit.js +5 -2
- package/src/gantt/actions/taskbar-edit.d.ts +1 -1
- package/src/gantt/actions/taskbar-edit.js +2 -2
- package/src/gantt/base/gantt.js +1 -1
- package/src/gantt/base/task-processor.js +2 -2
- package/src/gantt/renderer/chart-rows.js +29 -7
- package/src/gantt/renderer/timeline.js +1 -1
- package/styles/bootstrap-dark.css +3 -0
- package/styles/bootstrap.css +3 -0
- package/styles/bootstrap4.css +3 -0
- package/styles/bootstrap5-dark.css +3 -0
- package/styles/bootstrap5.css +3 -0
- package/styles/fabric-dark.css +3 -0
- package/styles/fabric.css +3 -0
- package/styles/fluent-dark.css +3 -0
- package/styles/fluent.css +3 -0
- package/styles/gantt/_theme.scss +4 -0
- package/styles/gantt/bootstrap-dark.css +3 -0
- package/styles/gantt/bootstrap.css +3 -0
- package/styles/gantt/bootstrap4.css +3 -0
- package/styles/gantt/bootstrap5-dark.css +3 -0
- package/styles/gantt/bootstrap5.css +3 -0
- package/styles/gantt/fabric-dark.css +3 -0
- package/styles/gantt/fabric.css +3 -0
- package/styles/gantt/fluent-dark.css +3 -0
- package/styles/gantt/fluent.css +3 -0
- package/styles/gantt/highcontrast-light.css +3 -0
- package/styles/gantt/highcontrast.css +3 -0
- package/styles/gantt/material-dark.css +3 -0
- package/styles/gantt/material.css +3 -0
- package/styles/gantt/tailwind-dark.css +3 -0
- package/styles/gantt/tailwind.css +3 -0
- package/styles/highcontrast-light.css +3 -0
- package/styles/highcontrast.css +3 -0
- package/styles/material-dark.css +3 -0
- package/styles/material.css +3 -0
- package/styles/tailwind-dark.css +3 -0
- package/styles/tailwind.css +3 -0
|
@@ -3871,13 +3871,13 @@ class TaskProcessor extends DateProcessor {
|
|
|
3871
3871
|
minStartDate.getTime() === maxEndDate.getTime() ? true : false;
|
|
3872
3872
|
if (this.compareDates(previousStartDate, minStartDate) !== 0) {
|
|
3873
3873
|
this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'startDate' : 'autoStartDate', minStartDate, parentData.ganttProperties, true);
|
|
3874
|
-
if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone) {
|
|
3874
|
+
if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone && (parentData.hasChildRecords && parentData.ganttProperties.isAutoSchedule && this.parent.editModule.taskbarEditModule.taskbarEditedArgs.action !== "TaskbarEditing")) {
|
|
3875
3875
|
this.parent.setRecordValue('startDate', minStartDate, parentData.ganttProperties, true);
|
|
3876
3876
|
}
|
|
3877
3877
|
}
|
|
3878
3878
|
if (this.compareDates(previousEndDate, maxEndDate) !== 0) {
|
|
3879
3879
|
this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'endDate' : 'autoEndDate', maxEndDate, parentData.ganttProperties, true);
|
|
3880
|
-
if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone) {
|
|
3880
|
+
if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone && (parentData.hasChildRecords && parentData.ganttProperties.isAutoSchedule && this.parent.editModule.taskbarEditModule.taskbarEditedArgs.action !== "TaskbarEditing")) {
|
|
3881
3881
|
this.parent.setRecordValue('endDate', maxEndDate, parentData.ganttProperties, true);
|
|
3882
3882
|
}
|
|
3883
3883
|
}
|
|
@@ -5879,7 +5879,7 @@ class Timeline {
|
|
|
5879
5879
|
let firstValue;
|
|
5880
5880
|
let secondValue;
|
|
5881
5881
|
const zoomingCollections = [...this.parent.zoomingLevels];
|
|
5882
|
-
const sortedCollectons = zoomingCollections.sort((a, b) => (a.perDayWidth < b.perDayWidth) ? 1 : -1);
|
|
5882
|
+
const sortedCollectons = zoomingCollections.sort((a, b) => (!a.perDayWidth && !b.perDayWidth ? 0 : (a.perDayWidth < b.perDayWidth) ? 1 : -1));
|
|
5883
5883
|
if (perDayWidth === 0) { // return when the Gantt chart is not in viewable state.
|
|
5884
5884
|
return;
|
|
5885
5885
|
}
|
|
@@ -8776,7 +8776,12 @@ class ChartRows extends DateProcessor {
|
|
|
8776
8776
|
data.ganttProperties.segments.length === 0))) {
|
|
8777
8777
|
if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
8778
8778
|
let templateElement = this.createDivElement(template)[0];
|
|
8779
|
-
|
|
8779
|
+
if (this.parent.disableHtmlEncode) {
|
|
8780
|
+
templateElement.innerText = labelString;
|
|
8781
|
+
}
|
|
8782
|
+
else {
|
|
8783
|
+
templateElement.innerHTML = labelString;
|
|
8784
|
+
}
|
|
8780
8785
|
let childLabel = this.parent.labelSettings.taskLabel;
|
|
8781
8786
|
if (childLabel && childLabel['elementRef'])
|
|
8782
8787
|
templateElement.appendChild(tempDiv);
|
|
@@ -9370,7 +9375,7 @@ class ChartRows extends DateProcessor {
|
|
|
9370
9375
|
'<div class="' + manualParentMilestoneBottom + '" style="top:' +
|
|
9371
9376
|
(this.milesStoneRadius) + 'px;border-right-width:' + this.milesStoneRadius + 'px; border-left-width:' +
|
|
9372
9377
|
this.milesStoneRadius + 'px; border-top-width:' + this.milesStoneRadius + 'px;"></div></div>';
|
|
9373
|
-
return this.createDivElement(data.ganttProperties.
|
|
9378
|
+
return this.createDivElement(data.ganttProperties.duration !== 0 ? template : milestoneTemplate);
|
|
9374
9379
|
}
|
|
9375
9380
|
/**
|
|
9376
9381
|
* To get parent taskbar node.
|
|
@@ -9442,7 +9447,12 @@ class ChartRows extends DateProcessor {
|
|
|
9442
9447
|
this.taskBarHeight + 'px;"></span>';
|
|
9443
9448
|
}
|
|
9444
9449
|
let labelElement = this.createDivElement(labelDiv)[0];
|
|
9445
|
-
|
|
9450
|
+
if (this.parent.disableHtmlEncode) {
|
|
9451
|
+
labelElement.innerText = labelString;
|
|
9452
|
+
}
|
|
9453
|
+
else {
|
|
9454
|
+
labelElement.innerHTML = labelString;
|
|
9455
|
+
}
|
|
9446
9456
|
let parentLabel = this.parent.labelSettings.taskLabel;
|
|
9447
9457
|
if (parentLabel && parentLabel['elementRef'])
|
|
9448
9458
|
labelElement.appendChild(div);
|
|
@@ -9566,7 +9576,7 @@ class ChartRows extends DateProcessor {
|
|
|
9566
9576
|
const template = '<div class="' + taskBarMainContainer + ' ' +
|
|
9567
9577
|
this.parent.getUnscheduledTaskClass(data.ganttProperties) + ' ' +
|
|
9568
9578
|
((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
|
|
9569
|
-
' tabindex="-1" role="term" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
|
|
9579
|
+
' tabindex="-1" role="term" style="' + ((data.ganttProperties.isMilestone && !manualParent && !(data.hasChildRecords && !data.ganttProperties.isAutoSchedule)) ?
|
|
9570
9580
|
('width:' + this.milestoneHeight + 'px;height:' +
|
|
9571
9581
|
this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;' + (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.left -
|
|
9572
9582
|
(this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
|
|
@@ -9891,6 +9901,10 @@ class ChartRows extends DateProcessor {
|
|
|
9891
9901
|
}
|
|
9892
9902
|
}
|
|
9893
9903
|
else {
|
|
9904
|
+
let dupChartBody;
|
|
9905
|
+
dupChartBody = createElement('tbody', {
|
|
9906
|
+
id: this.parent.element.id + 'GanttTaskTableBody'
|
|
9907
|
+
});
|
|
9894
9908
|
for (let i = 0; i < this.parent.currentViewData.length; i++) {
|
|
9895
9909
|
const tempTemplateData = this.parent.currentViewData[i];
|
|
9896
9910
|
if (this.parent.viewType === 'ResourceView') {
|
|
@@ -9903,9 +9917,9 @@ class ChartRows extends DateProcessor {
|
|
|
9903
9917
|
}
|
|
9904
9918
|
}
|
|
9905
9919
|
const tRow = this.getGanttChartRow(i, tempTemplateData);
|
|
9906
|
-
|
|
9920
|
+
dupChartBody.appendChild(tRow);
|
|
9907
9921
|
if (this.parent.enableImmutableMode) {
|
|
9908
|
-
this.refreshedTr.push(
|
|
9922
|
+
this.refreshedTr.push(dupChartBody.querySelectorAll('tr')[i]);
|
|
9909
9923
|
this.refreshedData.push(this.parent.currentViewData[i]);
|
|
9910
9924
|
}
|
|
9911
9925
|
// To maintain selection when virtualization is enabled
|
|
@@ -9913,6 +9927,7 @@ class ChartRows extends DateProcessor {
|
|
|
9913
9927
|
this.parent.selectionModule.maintainSelectedRecords(parseInt(tRow.getAttribute('aria-rowindex'), 10));
|
|
9914
9928
|
}
|
|
9915
9929
|
}
|
|
9930
|
+
this.ganttChartTableBody.replaceChildren(...dupChartBody.childNodes);
|
|
9916
9931
|
}
|
|
9917
9932
|
this.parent.renderTemplates();
|
|
9918
9933
|
this.triggerQueryTaskbarInfo();
|
|
@@ -9970,9 +9985,15 @@ class ChartRows extends DateProcessor {
|
|
|
9970
9985
|
taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
|
|
9971
9986
|
}
|
|
9972
9987
|
}
|
|
9973
|
-
if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
|
|
9988
|
+
if ((this.templateData.ganttProperties.autoDuration !== 0) && !this.templateData.ganttProperties.isMilestone && parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
|
|
9974
9989
|
taskbarContainerNode[0].appendChild([].slice.call(parentTaskbarTemplateNode)[0]);
|
|
9975
9990
|
}
|
|
9991
|
+
else if ((this.templateData.ganttProperties.duration === 0 && this.templateData.ganttProperties.isMilestone && this.templateData.ganttProperties.isAutoSchedule)) {
|
|
9992
|
+
const milestoneTemplateNode = this.getMilestoneNode(i, taskbarContainerNode);
|
|
9993
|
+
if (milestoneTemplateNode && milestoneTemplateNode.length > 0) {
|
|
9994
|
+
taskbarContainerNode[0].appendChild([].slice.call(milestoneTemplateNode)[0]);
|
|
9995
|
+
}
|
|
9996
|
+
}
|
|
9976
9997
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
9977
9998
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
9978
9999
|
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()))
|
|
@@ -15113,7 +15134,7 @@ let Gantt = class Gantt extends Component {
|
|
|
15113
15134
|
args: [this]
|
|
15114
15135
|
});
|
|
15115
15136
|
}
|
|
15116
|
-
if (this.toolbar) {
|
|
15137
|
+
if (this.toolbar && this.toolbar.length > 0) {
|
|
15117
15138
|
modules.push({
|
|
15118
15139
|
member: 'toolbar',
|
|
15119
15140
|
args: [this]
|
|
@@ -19352,7 +19373,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19352
19373
|
: ganttRecord.left;
|
|
19353
19374
|
const tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.bottomTier :
|
|
19354
19375
|
this.parent.timelineModule.topTier;
|
|
19355
|
-
let remainingContribution = (1 / (this.parent.timelineModule.getIncrement(this.getDateByLeft(left), 1, 'Day') / (1000 * 60 * 60 * 24)));
|
|
19376
|
+
let remainingContribution = (1 / (this.parent.timelineModule.getIncrement(this.getDateByLeft(left, isNullOrUndefined(ganttRecord) ? ganttRecord.isMilestone : null, ganttRecord), 1, 'Day') / (1000 * 60 * 60 * 24)));
|
|
19356
19377
|
let remainDays = this.parent.perDayWidth - (this.parent.perDayWidth / remainingContribution);
|
|
19357
19378
|
const remainDaysInDecimal = remainDays / this.parent.perDayWidth;
|
|
19358
19379
|
if (isRoundOff === undefined) {
|
|
@@ -19400,7 +19421,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19400
19421
|
const milliSecondsPerPixel = (24 * 60 * 60 * 1000) / this.parent.perDayWidth;
|
|
19401
19422
|
pStartDate.setTime(pStartDate.getTime() + (left * milliSecondsPerPixel));
|
|
19402
19423
|
/* To render the milestone in proper date while editing */
|
|
19403
|
-
if (isMilestone) {
|
|
19424
|
+
if (isMilestone && !isNullOrUndefined(property.predecessor) && property.predecessor.length > 0) {
|
|
19404
19425
|
pStartDate.setDate(pStartDate.getDate() - 1);
|
|
19405
19426
|
this.parent.dateValidationModule.setTime(this.parent.defaultEndTime, pStartDate);
|
|
19406
19427
|
pStartDate = this.parent.dateValidationModule.checkStartDate(pStartDate, property, true);
|
|
@@ -22434,7 +22455,7 @@ class DialogEdit {
|
|
|
22434
22455
|
const ganttObj = this.parent;
|
|
22435
22456
|
const rte = notesElement.ej2_instances[0];
|
|
22436
22457
|
if (this.isEdit) {
|
|
22437
|
-
if (ganttObj.columnByField[ganttObj.taskFields.notes].disableHtmlEncode) {
|
|
22458
|
+
if (ganttObj.columnByField[ganttObj.taskFields.notes].disableHtmlEncode === false) {
|
|
22438
22459
|
this.parent.setRecordValue('notes', rte.getHtml(), this.rowData.ganttProperties, true);
|
|
22439
22460
|
}
|
|
22440
22461
|
else {
|
|
@@ -23849,7 +23870,7 @@ class Edit$2 {
|
|
|
23849
23870
|
}
|
|
23850
23871
|
else if ([tasks.progress, tasks.notes, tasks.durationUnit, tasks.expandState,
|
|
23851
23872
|
tasks.milestone, tasks.name, tasks.baselineStartDate,
|
|
23852
|
-
tasks.baselineEndDate, tasks.id, tasks.segments].indexOf(key) !== -1) {
|
|
23873
|
+
tasks.baselineEndDate, tasks.id, tasks.segments, tasks.cssClass].indexOf(key) !== -1) {
|
|
23853
23874
|
const column = ganttObj.columnByField[key];
|
|
23854
23875
|
/* eslint-disable-next-line */
|
|
23855
23876
|
let value = data[key];
|
|
@@ -23863,6 +23884,9 @@ class Edit$2 {
|
|
|
23863
23884
|
else if (key === tasks.name) {
|
|
23864
23885
|
ganttPropKey = 'taskName';
|
|
23865
23886
|
}
|
|
23887
|
+
else if (key === tasks.cssClass) {
|
|
23888
|
+
ganttPropKey = 'cssClass';
|
|
23889
|
+
}
|
|
23866
23890
|
else if ((key === tasks.segments) && (!isNullOrUndefined(ganttData.ganttProperties.segments))) {
|
|
23867
23891
|
ganttPropKey = 'segments';
|
|
23868
23892
|
/* eslint-disable-next-line */
|
|
@@ -24254,7 +24278,7 @@ class Edit$2 {
|
|
|
24254
24278
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
24255
24279
|
}
|
|
24256
24280
|
if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
24257
|
-
(args.action === "DrawConnectorLine")) {
|
|
24281
|
+
(args.action === "DrawConnectorLine") || (args.action === "DialogEditing")) {
|
|
24258
24282
|
this.updateChildItems(ganttRecord);
|
|
24259
24283
|
}
|
|
24260
24284
|
this.updateParentItemOnEditing();
|