@syncfusion/ej2-gantt 19.4.52 → 19.4.55
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 +27 -0
- package/README.md +1 -1
- 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 +66 -23
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +66 -23
- 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 +15 -15
- package/src/gantt/actions/cell-edit.js +2 -1
- package/src/gantt/actions/rowdragdrop.js +7 -1
- package/src/gantt/actions/selection.js +3 -1
- package/src/gantt/base/date-processor.js +2 -1
- package/src/gantt/renderer/chart-rows.js +51 -18
- package/src/gantt/renderer/timeline.js +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 19.4.
|
|
3
|
+
* version : 19.4.55
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-gantt@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-gantt@19.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@19.4.54",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-MLuEBMN++SYGBbYyb4j7PpGp/92/ztO0MBIxUC18Fhzf7uYTEXHd5aHY2reGHsAENQa+MjUaHO44cm68Fz6cvA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-gantt",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-gantt",
|
|
24
24
|
"/@syncfusion/ej2-vue-gantt"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-19.4.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-19.4.54.tgz",
|
|
27
|
+
"_shasum": "3e6e2c9c949ce93b3398f386e09656607022e4d5",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@syncfusion/ej2-base": "~19.4.52",
|
|
39
|
-
"@syncfusion/ej2-buttons": "~19.4.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~19.4.
|
|
41
|
-
"@syncfusion/ej2-data": "~19.4.
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~19.4.
|
|
43
|
-
"@syncfusion/ej2-grids": "~19.4.
|
|
39
|
+
"@syncfusion/ej2-buttons": "~19.4.55",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~19.4.55",
|
|
41
|
+
"@syncfusion/ej2-data": "~19.4.54",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~19.4.55",
|
|
43
|
+
"@syncfusion/ej2-grids": "~19.4.55",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~19.4.52",
|
|
45
45
|
"@syncfusion/ej2-layouts": "~19.4.52",
|
|
46
|
-
"@syncfusion/ej2-lists": "~19.4.
|
|
47
|
-
"@syncfusion/ej2-navigations": "~19.4.
|
|
48
|
-
"@syncfusion/ej2-popups": "~19.4.
|
|
49
|
-
"@syncfusion/ej2-richtexteditor": "~19.4.
|
|
50
|
-
"@syncfusion/ej2-treegrid": "~19.4.
|
|
46
|
+
"@syncfusion/ej2-lists": "~19.4.55",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~19.4.55",
|
|
48
|
+
"@syncfusion/ej2-popups": "~19.4.53",
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~19.4.55",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~19.4.55"
|
|
51
51
|
},
|
|
52
52
|
"deprecated": false,
|
|
53
53
|
"description": "Essential JS 2 Gantt Component",
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
"url": "git+https://github.com/syncfusion/ej2-gantt.git"
|
|
76
76
|
},
|
|
77
77
|
"typings": "index.d.ts",
|
|
78
|
-
"version": "19.4.
|
|
78
|
+
"version": "19.4.55",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -397,7 +397,8 @@ var CellEdit = /** @class */ (function () {
|
|
|
397
397
|
if (!ganttRecord.ganttProperties.isAutoSchedule) {
|
|
398
398
|
this.parent.setRecordValue('autoWidth', this.parent.dataOperation.calculateWidth(ganttRecord, false), ganttRecord.ganttProperties, true);
|
|
399
399
|
}
|
|
400
|
-
if (!isNullOrUndefined(args.data.ganttProperties.segments) && args.data.ganttProperties.segments.length > 0
|
|
400
|
+
if (!isNullOrUndefined(args.data.ganttProperties.segments) && args.data.ganttProperties.segments.length > 0 &&
|
|
401
|
+
!isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
|
|
401
402
|
this.parent.editModule.taskbarEditModule.updateSegmentProgress(args.data.ganttProperties);
|
|
402
403
|
}
|
|
403
404
|
if (!args.data.hasChildRecords) {
|
|
@@ -255,7 +255,13 @@ var RowDD = /** @class */ (function () {
|
|
|
255
255
|
}
|
|
256
256
|
else {
|
|
257
257
|
startIndex = droppedRecord.index;
|
|
258
|
-
|
|
258
|
+
var rootChildRecord = draggedRecord;
|
|
259
|
+
if (rootChildRecord.childRecords.length > 0) {
|
|
260
|
+
do {
|
|
261
|
+
rootChildRecord = rootChildRecord.childRecords[rootChildRecord.childRecords.length - 1];
|
|
262
|
+
} while (rootChildRecord.childRecords.length > 0);
|
|
263
|
+
}
|
|
264
|
+
endIndex = rootChildRecord.index;
|
|
259
265
|
}
|
|
260
266
|
var _loop_2 = function (i_1) {
|
|
261
267
|
if (!isNullOrUndefined(data_1[i_1])) {
|
|
@@ -133,7 +133,9 @@ var Selection = /** @class */ (function () {
|
|
|
133
133
|
}
|
|
134
134
|
this.addRemoveClass(index);
|
|
135
135
|
this.selectedRowIndexes = extend([], this.getSelectedRowIndexes(), [], true);
|
|
136
|
-
this.
|
|
136
|
+
if (this.selectedRowIndexes.length == 0) {
|
|
137
|
+
this.parent.setProperties({ selectedRowIndex: -1 }, true);
|
|
138
|
+
}
|
|
137
139
|
if (!isNullOrUndefined(this.parent.toolbarModule)) {
|
|
138
140
|
this.parent.toolbarModule.refreshToolbarItems();
|
|
139
141
|
}
|
|
@@ -277,7 +277,8 @@ var DateProcessor = /** @class */ (function () {
|
|
|
277
277
|
DateProcessor.prototype.calculateDuration = function (ganttData) {
|
|
278
278
|
var ganttProperties = ganttData.ganttProperties;
|
|
279
279
|
var tDuration;
|
|
280
|
-
if (!isNullOrUndefined(ganttProperties.segments) && ganttProperties.segments.length > 0
|
|
280
|
+
if (!isNullOrUndefined(ganttProperties.segments) && ganttProperties.segments.length > 0 &&
|
|
281
|
+
!isNullOrUndefined(this.parent.editModule.taskbarEditModule)) {
|
|
281
282
|
tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
|
|
282
283
|
}
|
|
283
284
|
else {
|
|
@@ -140,7 +140,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
140
140
|
var childTaskbarNode = null;
|
|
141
141
|
var data = this.templateData;
|
|
142
142
|
if (this.childTaskbarTemplateFunction) {
|
|
143
|
-
childTaskbarNode = this.childTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'TaskbarTemplate', this.getTemplateID('TaskbarTemplate'), false, undefined, rootElement[0]);
|
|
143
|
+
childTaskbarNode = this.childTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'TaskbarTemplate', this.getTemplateID('TaskbarTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
|
|
144
144
|
}
|
|
145
145
|
else {
|
|
146
146
|
var labelString = '';
|
|
@@ -175,11 +175,20 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
175
175
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
176
176
|
}
|
|
177
177
|
if (labelString !== 'null') {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
if (isNaN(parseInt(labelString))) {
|
|
179
|
+
taskLabel = '<span class="' + cls.taskLabel + '" style="line-height:' +
|
|
180
|
+
(this.taskBarHeight - 1) + 'px; text-align: left;' +
|
|
181
|
+
'display:' + 'inline-block;' +
|
|
182
|
+
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
183
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
taskLabel = '<span class="' + cls.taskLabel + '" style="line-height:' +
|
|
187
|
+
(this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.viewType === 'ResourceView' ? 'left;' : ';') +
|
|
188
|
+
'display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') +
|
|
189
|
+
'width:' + (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
190
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
191
|
+
}
|
|
183
192
|
}
|
|
184
193
|
var template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
|
|
185
194
|
this.splitTaskbar(data, labelString) : (data.ganttProperties.startDate && data.ganttProperties.endDate
|
|
@@ -570,7 +579,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
570
579
|
var milestoneNode = null;
|
|
571
580
|
var data = this.templateData;
|
|
572
581
|
if (this.milestoneTemplateFunction) {
|
|
573
|
-
milestoneNode = this.milestoneTemplateFunction(extend({ index: i }, data), this.parent, 'MilestoneTemplate', this.getTemplateID('MilestoneTemplate'), false, undefined, rootElement[0]);
|
|
582
|
+
milestoneNode = this.milestoneTemplateFunction(extend({ index: i }, data), this.parent, 'MilestoneTemplate', this.getTemplateID('MilestoneTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
|
|
574
583
|
}
|
|
575
584
|
else {
|
|
576
585
|
var template = '<div class="' + cls.traceMilestone + '" style="position:absolute;">' +
|
|
@@ -641,7 +650,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
641
650
|
leftLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('left'));
|
|
642
651
|
var leftLabelTemplateNode = null;
|
|
643
652
|
if (this.leftTaskLabelTemplateFunction) {
|
|
644
|
-
leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0]);
|
|
653
|
+
leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0], this.parent.treeGrid['root']);
|
|
645
654
|
}
|
|
646
655
|
else {
|
|
647
656
|
var field = this.parent.labelSettings.leftLabel;
|
|
@@ -652,6 +661,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
652
661
|
}
|
|
653
662
|
}
|
|
654
663
|
if (leftLabelTemplateNode && leftLabelTemplateNode.length > 0) {
|
|
664
|
+
if (leftLabelTemplateNode[0]['data'] === 'null') {
|
|
665
|
+
leftLabelTemplateNode[0]['data'] = '';
|
|
666
|
+
}
|
|
655
667
|
leftLabelNode[0].appendChild([].slice.call(leftLabelTemplateNode)[0]);
|
|
656
668
|
}
|
|
657
669
|
return leftLabelNode;
|
|
@@ -681,7 +693,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
681
693
|
rightLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('right'));
|
|
682
694
|
var rightLabelTemplateNode = null;
|
|
683
695
|
if (this.rightTaskLabelTemplateFunction) {
|
|
684
|
-
rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0]);
|
|
696
|
+
rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0], this.parent.treeGrid['root']);
|
|
685
697
|
}
|
|
686
698
|
else {
|
|
687
699
|
var field = this.parent.labelSettings.rightLabel;
|
|
@@ -692,6 +704,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
692
704
|
}
|
|
693
705
|
}
|
|
694
706
|
if (rightLabelTemplateNode && rightLabelTemplateNode.length > 0) {
|
|
707
|
+
if (rightLabelTemplateNode[0]['data'] === 'null') {
|
|
708
|
+
rightLabelTemplateNode[0]['data'] = '';
|
|
709
|
+
}
|
|
695
710
|
rightLabelNode[0].appendChild([].slice.call(rightLabelTemplateNode)[0]);
|
|
696
711
|
}
|
|
697
712
|
return rightLabelNode;
|
|
@@ -746,7 +761,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
746
761
|
var parentTaskbarNode = null;
|
|
747
762
|
var data = this.templateData;
|
|
748
763
|
if (this.parentTaskbarTemplateFunction) {
|
|
749
|
-
parentTaskbarNode = this.parentTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'ParentTaskbarTemplate', this.getTemplateID('ParentTaskbarTemplate'), false, undefined, rootElement[0]);
|
|
764
|
+
parentTaskbarNode = this.parentTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'ParentTaskbarTemplate', this.getTemplateID('ParentTaskbarTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
|
|
750
765
|
}
|
|
751
766
|
else {
|
|
752
767
|
var labelString = '';
|
|
@@ -778,11 +793,20 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
778
793
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
779
794
|
}
|
|
780
795
|
if (labelString !== 'null') {
|
|
781
|
-
|
|
782
|
-
cls.taskLabel + '" style="line-height:' +
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
796
|
+
if (isNaN(parseInt(labelString))) {
|
|
797
|
+
labelDiv = this.createDivElement('<span class="' + cls.taskLabel + '" style="line-height:' +
|
|
798
|
+
(this.taskBarHeight - 1) + 'px; text-align: left;' +
|
|
799
|
+
'display:' + 'inline-block;' +
|
|
800
|
+
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
801
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>');
|
|
802
|
+
}
|
|
803
|
+
else {
|
|
804
|
+
labelDiv = this.createDivElement('<span class="' +
|
|
805
|
+
cls.taskLabel + '" style="line-height:' +
|
|
806
|
+
(this.taskBarHeight - 1) + 'px; display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') + 'width:' +
|
|
807
|
+
(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : ';') + 'px; height:' +
|
|
808
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>');
|
|
809
|
+
}
|
|
786
810
|
progressBarInnerDiv[0].appendChild([].slice.call(labelDiv)[0]);
|
|
787
811
|
}
|
|
788
812
|
var milestoneTemplate = '<div class="' + cls.parentMilestone + '" style="position:absolute;">' +
|
|
@@ -851,10 +875,19 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
851
875
|
};
|
|
852
876
|
ChartRows.prototype.isTemplate = function (template) {
|
|
853
877
|
var result = false;
|
|
878
|
+
for (var i = 0; i < this.parent.ganttColumns.length; i++) {
|
|
879
|
+
if (template === this.parent.ganttColumns[i].field) {
|
|
880
|
+
result = true;
|
|
881
|
+
break;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
854
884
|
if (typeof template !== 'string' || template.indexOf('#') === 0 || template.indexOf('<') > -1
|
|
855
|
-
|| template.indexOf('$') > -1) {
|
|
885
|
+
|| template.indexOf('$') > -1 || !result) {
|
|
856
886
|
result = true;
|
|
857
887
|
}
|
|
888
|
+
else {
|
|
889
|
+
result = false;
|
|
890
|
+
}
|
|
858
891
|
return result;
|
|
859
892
|
};
|
|
860
893
|
/**
|
|
@@ -869,7 +902,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
869
902
|
ChartRows.prototype.leftLabelContainer = function () {
|
|
870
903
|
var template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? cls.leftLabelTempContainer :
|
|
871
904
|
cls.leftLabelContainer) + ' ' + '" tabindex="-1" style="height:' +
|
|
872
|
-
(this.parent.rowHeight -
|
|
905
|
+
(this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
|
|
873
906
|
return this.createDivElement(template);
|
|
874
907
|
};
|
|
875
908
|
ChartRows.prototype.taskbarContainer = function () {
|
|
@@ -892,7 +925,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
892
925
|
ChartRows.prototype.rightLabelContainer = function () {
|
|
893
926
|
var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? cls.rightLabelTempContainer :
|
|
894
927
|
cls.rightLabelContainer) + '" ' + ' tabindex="-1" style="left:' + this.getRightLabelLeft(this.templateData) + 'px;height:'
|
|
895
|
-
+ (this.parent.rowHeight -
|
|
928
|
+
+ (this.parent.rowHeight - 2) + 'px;"></div>';
|
|
896
929
|
return this.createDivElement(template);
|
|
897
930
|
};
|
|
898
931
|
ChartRows.prototype.childTaskbarLeftResizer = function () {
|
|
@@ -1276,7 +1276,7 @@ var Timeline = /** @class */ (function () {
|
|
|
1276
1276
|
var validStartLeft = this.parent.dataOperation.getTaskLeft(validStartDate, false);
|
|
1277
1277
|
var validEndLeft = this.parent.dataOperation.getTaskLeft(validEndDate, false);
|
|
1278
1278
|
var isChanged = void 0;
|
|
1279
|
-
if (!isNullOrUndefined(maxStartLeft) && (maxStartLeft
|
|
1279
|
+
if (!isNullOrUndefined(maxStartLeft) && (maxStartLeft < this.bottomTierCellWidth || maxStartLeft <= validStartLeft)) {
|
|
1280
1280
|
isChanged = 'prevTimeSpan';
|
|
1281
1281
|
minStartDate = minStartDate > this.timelineStartDate ? this.timelineStartDate : minStartDate;
|
|
1282
1282
|
}
|