@syncfusion/ej2-gantt 20.4.52 → 20.4.54
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/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 +198 -56
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +199 -57
- 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/connector-line-edit.d.ts +2 -1
- package/src/gantt/actions/connector-line-edit.js +36 -3
- package/src/gantt/actions/critical-path.js +10 -8
- package/src/gantt/actions/edit.js +37 -26
- package/src/gantt/base/gantt.d.ts +2 -0
- package/src/gantt/base/gantt.js +5 -0
- package/src/gantt/base/task-processor.js +3 -5
- package/src/gantt/base/tree-grid.js +98 -13
- package/src/gantt/export/export-helper.js +6 -0
- package/src/gantt/renderer/chart-rows.js +5 -2
- package/GitLeaksReport.json +0 -1
- package/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.4.
|
|
3
|
+
* version : 20.4.54
|
|
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@20.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@20.4.53",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-vytG1vjcERh3V5le6Fv0M1iA1RzCwX6QrrC5LXe4nQABltBF6xxPf1/pwL/s1hdBMUXOGi2BKtK0WYo7/SUPGw==",
|
|
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": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.4.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.4.53.tgz",
|
|
27
|
+
"_shasum": "bd1a810cc56f9c53e4d53fb40f5fd7d84118c78f",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@syncfusion/ej2-base": "~20.4.51",
|
|
39
|
-
"@syncfusion/ej2-buttons": "~20.4.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~20.4.
|
|
39
|
+
"@syncfusion/ej2-buttons": "~20.4.53",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~20.4.54",
|
|
41
41
|
"@syncfusion/ej2-data": "~20.4.48",
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~20.4.
|
|
43
|
-
"@syncfusion/ej2-grids": "~20.4.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~20.4.
|
|
45
|
-
"@syncfusion/ej2-layouts": "~20.4.
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~20.4.54",
|
|
43
|
+
"@syncfusion/ej2-grids": "~20.4.54",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.4.54",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~20.4.53",
|
|
46
46
|
"@syncfusion/ej2-lists": "~20.4.50",
|
|
47
|
-
"@syncfusion/ej2-navigations": "~20.4.
|
|
47
|
+
"@syncfusion/ej2-navigations": "~20.4.53",
|
|
48
48
|
"@syncfusion/ej2-notifications": "~20.4.48",
|
|
49
|
-
"@syncfusion/ej2-popups": "~20.4.
|
|
50
|
-
"@syncfusion/ej2-richtexteditor": "~20.4.
|
|
51
|
-
"@syncfusion/ej2-treegrid": "~20.4.
|
|
49
|
+
"@syncfusion/ej2-popups": "~20.4.53",
|
|
50
|
+
"@syncfusion/ej2-richtexteditor": "~20.4.53",
|
|
51
|
+
"@syncfusion/ej2-treegrid": "~20.4.54"
|
|
52
52
|
},
|
|
53
53
|
"deprecated": false,
|
|
54
54
|
"description": "Essential JS 2 Gantt Component",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"url": "git+https://github.com/syncfusion/ej2-gantt.git"
|
|
74
74
|
},
|
|
75
75
|
"typings": "index.d.ts",
|
|
76
|
-
"version": "20.4.
|
|
76
|
+
"version": "20.4.54",
|
|
77
77
|
"sideEffects": false
|
|
78
78
|
}
|
|
@@ -135,6 +135,7 @@ export declare class ConnectorLineEdit {
|
|
|
135
135
|
* @private
|
|
136
136
|
*/
|
|
137
137
|
applyPredecessorOption(): void;
|
|
138
|
+
private checkChildRecords;
|
|
138
139
|
private calculateOffset;
|
|
139
140
|
/**
|
|
140
141
|
* Update predecessor value with user selection option in predecessor validation dialog
|
|
@@ -167,7 +168,7 @@ export declare class ConnectorLineEdit {
|
|
|
167
168
|
* @returns {boolean} .
|
|
168
169
|
* @private
|
|
169
170
|
*/
|
|
170
|
-
validateTypes(ganttRecord: IGanttData): object;
|
|
171
|
+
validateTypes(ganttRecord: IGanttData, data?: any): object;
|
|
171
172
|
/**
|
|
172
173
|
* Method to remove and update new predecessor collection in successor record
|
|
173
174
|
*
|
|
@@ -602,12 +602,13 @@ var ConnectorLineEdit = /** @class */ (function () {
|
|
|
602
602
|
ConnectorLineEdit.prototype.applyPredecessorOption = function () {
|
|
603
603
|
var args = this.parent.currentEditedArgs;
|
|
604
604
|
var ganttRecord = args.data;
|
|
605
|
+
var parentData;
|
|
605
606
|
if (args.validateMode.respectLink) {
|
|
606
607
|
this.parent.editModule.reUpdatePreviousRecords();
|
|
607
608
|
this.parent.chartRowsModule.refreshRecords([args.data]);
|
|
608
609
|
}
|
|
609
610
|
else if (args.validateMode.removeLink) {
|
|
610
|
-
this.
|
|
611
|
+
this.checkChildRecords(ganttRecord);
|
|
611
612
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
612
613
|
}
|
|
613
614
|
else if (args.validateMode.preserveLinkWithEditing) {
|
|
@@ -615,6 +616,29 @@ var ConnectorLineEdit = /** @class */ (function () {
|
|
|
615
616
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
616
617
|
}
|
|
617
618
|
};
|
|
619
|
+
ConnectorLineEdit.prototype.checkChildRecords = function (ganttRecord) {
|
|
620
|
+
this.validationPredecessor = ganttRecord.ganttProperties.predecessor;
|
|
621
|
+
if (!isNullOrUndefined(this.validationPredecessor)) {
|
|
622
|
+
this.removePredecessors(ganttRecord, this.validationPredecessor);
|
|
623
|
+
}
|
|
624
|
+
if (ganttRecord.childRecords.length > 0) {
|
|
625
|
+
for (var i = 0; i < ganttRecord.childRecords.length; i++) {
|
|
626
|
+
var childRecord = ganttRecord.childRecords[i];
|
|
627
|
+
this.validationPredecessor = childRecord.ganttProperties.predecessor;
|
|
628
|
+
if (!isNullOrUndefined(this.validationPredecessor)) {
|
|
629
|
+
this.removePredecessors(childRecord, this.validationPredecessor);
|
|
630
|
+
}
|
|
631
|
+
if (childRecord.childRecords.length > 0) {
|
|
632
|
+
this.checkChildRecords(childRecord);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
else if (!isNullOrUndefined(ganttRecord.parentItem)) {
|
|
637
|
+
var parentRecord = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
|
|
638
|
+
this.validationPredecessor = parentRecord.ganttProperties.predecessor;
|
|
639
|
+
this.removePredecessors(parentRecord, this.validationPredecessor);
|
|
640
|
+
}
|
|
641
|
+
};
|
|
618
642
|
ConnectorLineEdit.prototype.calculateOffset = function (record) {
|
|
619
643
|
var prevPredecessor = extend([], record.ganttProperties.predecessor, [], true);
|
|
620
644
|
var validPredecessor = this.parent.predecessorModule.getValidPredecessor(record);
|
|
@@ -690,6 +714,9 @@ var ConnectorLineEdit = /** @class */ (function () {
|
|
|
690
714
|
*/
|
|
691
715
|
ConnectorLineEdit.prototype.removePredecessors = function (ganttRecord, predecessor) {
|
|
692
716
|
var prevPredecessor = extend([], [], ganttRecord.ganttProperties.predecessor, true);
|
|
717
|
+
if (isNullOrUndefined(predecessor)) {
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
693
720
|
var preLength = predecessor.length;
|
|
694
721
|
for (var i = 0; i < preLength; i++) {
|
|
695
722
|
var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[i].from);
|
|
@@ -785,14 +812,20 @@ var ConnectorLineEdit = /** @class */ (function () {
|
|
|
785
812
|
* @returns {boolean} .
|
|
786
813
|
* @private
|
|
787
814
|
*/
|
|
788
|
-
ConnectorLineEdit.prototype.validateTypes = function (ganttRecord) {
|
|
815
|
+
ConnectorLineEdit.prototype.validateTypes = function (ganttRecord, data) {
|
|
789
816
|
var predecessor = this.parent.predecessorModule.getValidPredecessor(ganttRecord);
|
|
790
817
|
var parentGanttRecord;
|
|
818
|
+
var ganttTaskData;
|
|
791
819
|
this.validationPredecessor = [];
|
|
792
820
|
var violatedParent;
|
|
793
821
|
var violateType;
|
|
794
822
|
var startDate = this.parent.predecessorModule.getPredecessorDate(ganttRecord, predecessor);
|
|
795
|
-
|
|
823
|
+
if (data) {
|
|
824
|
+
ganttTaskData = data.ganttProperties;
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
ganttTaskData = ganttRecord.ganttProperties;
|
|
828
|
+
}
|
|
796
829
|
var endDate = this.parent.allowUnscheduledTasks && isNullOrUndefined(startDate) ?
|
|
797
830
|
ganttTaskData.endDate :
|
|
798
831
|
this.dateValidateModule.getEndDate(startDate, ganttTaskData.duration, ganttTaskData.durationUnit, ganttTaskData, false);
|
|
@@ -696,10 +696,10 @@ var CriticalPath = /** @class */ (function () {
|
|
|
696
696
|
var _loop_2 = function (i) {
|
|
697
697
|
var criticalData;
|
|
698
698
|
if (this_2.parent.viewType === 'ProjectView') {
|
|
699
|
-
criticalData = this_2.parent.
|
|
699
|
+
criticalData = this_2.parent.flatData[this_2.parent.ids.indexOf(criticalPathIds[i].toString())];
|
|
700
700
|
}
|
|
701
701
|
else {
|
|
702
|
-
var currentRecords = this_2.parent.
|
|
702
|
+
var currentRecords = this_2.parent.flatData.filter(function (data) {
|
|
703
703
|
return (data.ganttProperties.taskId).toString() === criticalPathIds[i].toString();
|
|
704
704
|
});
|
|
705
705
|
for (var i_1 = 0; i_1 < currentRecords.length; i_1++) {
|
|
@@ -712,16 +712,18 @@ var CriticalPath = /** @class */ (function () {
|
|
|
712
712
|
var element = this_2.parent.getRowByIndex(index);
|
|
713
713
|
var taskClass = void 0;
|
|
714
714
|
var columnFields = this_2.parent.taskFields;
|
|
715
|
-
if (criticalData.parentItem) {
|
|
715
|
+
if (criticalData && criticalData.parentItem) {
|
|
716
716
|
var parentRecord = this_2.parent.currentViewData.filter(function (data) {
|
|
717
717
|
return criticalData.parentItem.uniqueID === data.uniqueID;
|
|
718
718
|
});
|
|
719
|
-
var parentIndex = this_2.parent.
|
|
719
|
+
var parentIndex = this_2.parent.flatData.indexOf(parentRecord[0]);
|
|
720
720
|
var parentElement = this_2.parent.getRowByIndex(parentIndex);
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
721
|
+
if (parentElement) {
|
|
722
|
+
var parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
|
|
723
|
+
for (var i_2 = 0; i_2 < parentTaskbarElement.length; i_2++) {
|
|
724
|
+
if (parentTaskbarElement[i_2].getAttribute('rowuniqueid') === criticalData['rowUniqueID']) {
|
|
725
|
+
addClass(parentTaskbarElement[i_2].querySelectorAll('.e-gantt-child-taskbar-inner-div'), cls.criticalChildTaskBarInnerDiv);
|
|
726
|
+
}
|
|
725
727
|
}
|
|
726
728
|
}
|
|
727
729
|
}
|
|
@@ -734,6 +734,29 @@ var Edit = /** @class */ (function () {
|
|
|
734
734
|
*/
|
|
735
735
|
Edit.prototype.initiateUpdateAction = function (args) {
|
|
736
736
|
var isValidatePredecessor = this.isCheckPredecessor(args.data);
|
|
737
|
+
var parentData;
|
|
738
|
+
var childRecordIndex;
|
|
739
|
+
if (!isNullOrUndefined(args.data.parentItem) && !isValidatePredecessor) {
|
|
740
|
+
parentData = this.parent.getRecordByID(args.data.parentItem.taskId);
|
|
741
|
+
if (this.isTaskbarMoved(args.data) && this.parent.predecessorModule.getValidPredecessor(parentData).length > 0
|
|
742
|
+
&& this.parent.isInPredecessorValidation) {
|
|
743
|
+
isValidatePredecessor = true;
|
|
744
|
+
}
|
|
745
|
+
else {
|
|
746
|
+
isValidatePredecessor = false;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
else if (args.data.childRecords.length > 0 && !isValidatePredecessor) {
|
|
750
|
+
isValidatePredecessor = this.isCheckPredecessor(args.data);
|
|
751
|
+
if (!isValidatePredecessor && this.isTaskbarMoved(args.data)) {
|
|
752
|
+
for (var i = 0; i < args.data.childRecords.length; i++) {
|
|
753
|
+
if (this.parent.predecessorModule.getValidPredecessor(args.data.childRecords[i]).length > 0) {
|
|
754
|
+
childRecordIndex = i;
|
|
755
|
+
isValidatePredecessor = true;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
737
760
|
this.taskbarMoved = this.isTaskbarMoved(args.data);
|
|
738
761
|
this.predecessorUpdated = this.isPredecessorUpdated(args.data);
|
|
739
762
|
if (this.predecessorUpdated) {
|
|
@@ -742,7 +765,15 @@ var Edit = /** @class */ (function () {
|
|
|
742
765
|
}
|
|
743
766
|
var validateObject = {};
|
|
744
767
|
if (isValidatePredecessor) {
|
|
745
|
-
|
|
768
|
+
if (!isNullOrUndefined(parentData)) {
|
|
769
|
+
validateObject = this.parent.connectorLineEditModule.validateTypes(parentData, args.data);
|
|
770
|
+
}
|
|
771
|
+
else if (!isNullOrUndefined(childRecordIndex)) {
|
|
772
|
+
validateObject = this.parent.connectorLineEditModule.validateTypes(args.data.childRecords[childRecordIndex], args.data);
|
|
773
|
+
}
|
|
774
|
+
else {
|
|
775
|
+
validateObject = this.parent.connectorLineEditModule.validateTypes(args.data);
|
|
776
|
+
}
|
|
746
777
|
this.parent.isConnectorLineUpdate = true;
|
|
747
778
|
if (!isNullOrUndefined(getValue('violationType', validateObject))) {
|
|
748
779
|
var newArgs = this.validateTaskEvent(args);
|
|
@@ -808,7 +839,7 @@ var Edit = /** @class */ (function () {
|
|
|
808
839
|
}
|
|
809
840
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
810
841
|
/** validating predecessor for current edited records */
|
|
811
|
-
if (ganttRecord.ganttProperties.
|
|
842
|
+
if (ganttRecord.ganttProperties.predecessor) {
|
|
812
843
|
this.parent.isMileStoneEdited = ganttRecord.ganttProperties.isMilestone;
|
|
813
844
|
if (this.taskbarMoved) {
|
|
814
845
|
this.parent.editedTaskBarItem = ganttRecord;
|
|
@@ -2850,11 +2881,11 @@ var Edit = /** @class */ (function () {
|
|
|
2850
2881
|
};
|
|
2851
2882
|
var prevID_1 = args.data.ganttProperties.taskId.toString();
|
|
2852
2883
|
/* tslint:disable-next-line */
|
|
2853
|
-
var
|
|
2884
|
+
var query = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
2854
2885
|
var adaptor = data_2.adaptor;
|
|
2855
2886
|
if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor) || data_2.dataSource.batchUrl) {
|
|
2856
2887
|
/* tslint:disable-next-line */
|
|
2857
|
-
var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null,
|
|
2888
|
+
var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query);
|
|
2858
2889
|
crud.then(function (e) {
|
|
2859
2890
|
if (_this.parent.taskFields.id && !isNullOrUndefined(e.addedRecords[0][_this.parent.taskFields.id]) &&
|
|
2860
2891
|
e.addedRecords[0][_this.parent.taskFields.id].toString() == prevID_1) {
|
|
@@ -2876,9 +2907,8 @@ var Edit = /** @class */ (function () {
|
|
|
2876
2907
|
}
|
|
2877
2908
|
else {
|
|
2878
2909
|
var addedRecords = 'addedRecords';
|
|
2879
|
-
var insertCrud = data_2.insert(updatedData_2[addedRecords], null,
|
|
2910
|
+
var insertCrud = data_2.insert(updatedData_2[addedRecords], null, query);
|
|
2880
2911
|
insertCrud.then(function (e) {
|
|
2881
|
-
var changedRecords = 'changedRecords';
|
|
2882
2912
|
var addedRecords;
|
|
2883
2913
|
if (!isNullOrUndefined(e[0])) {
|
|
2884
2914
|
addedRecords = e[0];
|
|
@@ -2886,26 +2916,7 @@ var Edit = /** @class */ (function () {
|
|
|
2886
2916
|
else {
|
|
2887
2917
|
addedRecords = updatedData_2['addedRecords'][0];
|
|
2888
2918
|
}
|
|
2889
|
-
|
|
2890
|
-
var updateCrud = data_2.update(_this.parent.taskFields.id, updatedData_2[changedRecords], null, query_2);
|
|
2891
|
-
updateCrud.then(function () {
|
|
2892
|
-
if (_this.parent.taskFields.id && !isNullOrUndefined(addedRecords[_this.parent.taskFields.id]) &&
|
|
2893
|
-
addedRecords[_this.parent.taskFields.id].toString() !== prevID_1) {
|
|
2894
|
-
_this.parent.setRecordValue('taskId', addedRecords[_this.parent.taskFields.id], args.data.ganttProperties, true);
|
|
2895
|
-
_this.parent.setRecordValue('taskData.' + _this.parent.taskFields.id, addedRecords[_this.parent.taskFields.id], args.data);
|
|
2896
|
-
_this.parent.setRecordValue(_this.parent.taskFields.id, addedRecords[_this.parent.taskFields.id], args.data);
|
|
2897
|
-
_this.parent.setRecordValue('rowUniqueID', addedRecords[_this.parent.taskFields.id].toString(), args.data.ganttProperties, true);
|
|
2898
|
-
var idIndex = _this.parent.ids.indexOf(prevID_1);
|
|
2899
|
-
if (idIndex !== -1) {
|
|
2900
|
-
_this.parent.ids[idIndex] = addedRecords[_this.parent.taskFields.id].toString();
|
|
2901
|
-
}
|
|
2902
|
-
}
|
|
2903
|
-
_this.updateNewRecord(cAddedRecord_1, args);
|
|
2904
|
-
}).catch(function (e) {
|
|
2905
|
-
_this.removeAddedRecord();
|
|
2906
|
-
_this.dmFailure(e, args);
|
|
2907
|
-
_this._resetProperties();
|
|
2908
|
-
});
|
|
2919
|
+
_this.updateNewRecord(cAddedRecord_1, args);
|
|
2909
2920
|
}).catch(function (e) {
|
|
2910
2921
|
_this.removeAddedRecord();
|
|
2911
2922
|
_this.dmFailure(e, args);
|
|
@@ -92,6 +92,8 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
92
92
|
isVirtualScroll: boolean;
|
|
93
93
|
scrollLeftValue: any;
|
|
94
94
|
isToolBarClick: any;
|
|
95
|
+
isLocaleChanged: boolean;
|
|
96
|
+
previousGanttColumns: ColumnModel[];
|
|
95
97
|
/** @hidden */
|
|
96
98
|
topBottomHeader: any;
|
|
97
99
|
/** @hidden */
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -61,6 +61,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
61
61
|
var _this = _super.call(this, options, element) || this;
|
|
62
62
|
_this.showIndicator = true;
|
|
63
63
|
_this.singleTier = 0;
|
|
64
|
+
_this.isLocaleChanged = false;
|
|
64
65
|
/** @hidden */
|
|
65
66
|
_this.isCancelled = false;
|
|
66
67
|
/** @hidden */
|
|
@@ -1490,6 +1491,10 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
1490
1491
|
case 'enableRtl':
|
|
1491
1492
|
case 'readOnly':
|
|
1492
1493
|
case 'viewType':
|
|
1494
|
+
case 'taskFields':
|
|
1495
|
+
if (prop === 'locale') {
|
|
1496
|
+
this.isLocaleChanged = true;
|
|
1497
|
+
}
|
|
1493
1498
|
isRefresh = true;
|
|
1494
1499
|
break;
|
|
1495
1500
|
case 'validateManualTasksOnLinking':
|
|
@@ -2210,7 +2210,7 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2210
2210
|
}
|
|
2211
2211
|
if (childGanttRecord.hasChildRecords) {
|
|
2212
2212
|
setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
|
|
2213
|
-
setValue('totalDuration', childGanttRecord.ganttProperties.totalDuration, progressValues);
|
|
2213
|
+
setValue('totalDuration', childGanttRecord.ganttProperties.totalDuration ? childGanttRecord.ganttProperties.totalDuration : 0, progressValues);
|
|
2214
2214
|
}
|
|
2215
2215
|
else {
|
|
2216
2216
|
setValue('totalProgress', childGanttRecord.ganttProperties.progress * durationInDay, progressValues);
|
|
@@ -2284,10 +2284,8 @@ var TaskProcessor = /** @class */ (function (_super) {
|
|
|
2284
2284
|
progressValues = this.getParentProgress(childData);
|
|
2285
2285
|
totalProgress += getValue('totalProgress', progressValues);
|
|
2286
2286
|
if (childData[this.parent.taskFields.duration] < 1) {
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
totalDuration = Number(totalDuration.toFixed(4));
|
|
2290
|
-
}
|
|
2287
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
2288
|
+
totalDuration = Number(totalDuration.toFixed(4));
|
|
2291
2289
|
}
|
|
2292
2290
|
else {
|
|
2293
2291
|
totalDuration += getValue('totalDuration', progressValues);
|
|
@@ -59,7 +59,13 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
59
59
|
this.parent.treeGrid.allowKeyboard = this.parent.allowKeyboard;
|
|
60
60
|
this.parent.treeGrid.enableImmutableMode = this.parent.enableImmutableMode;
|
|
61
61
|
this.treeGridColumns = [];
|
|
62
|
+
if (!this.parent.isLocaleChanged && this.parent.isLoad) {
|
|
63
|
+
this.parent.previousGanttColumns = extend([], [], this.parent.columns, true);
|
|
64
|
+
}
|
|
62
65
|
this.validateGanttColumns();
|
|
66
|
+
if (this.parent.isLocaleChanged) {
|
|
67
|
+
this.parent.isLocaleChanged = false;
|
|
68
|
+
}
|
|
63
69
|
this.addEventListener();
|
|
64
70
|
}
|
|
65
71
|
GanttTreeGrid.prototype.addEventListener = function () {
|
|
@@ -481,6 +487,9 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
481
487
|
*/
|
|
482
488
|
GanttTreeGrid.prototype.createTreeGridColumn = function (column, isDefined) {
|
|
483
489
|
var taskSettings = this.parent.taskFields;
|
|
490
|
+
var previousColumn = this.parent.previousGanttColumns.filter(function (prevcolumn) {
|
|
491
|
+
return column.field == prevcolumn.field;
|
|
492
|
+
})[0];
|
|
484
493
|
column.disableHtmlEncode = !isNullOrUndefined(column.disableHtmlEncode) ? column.disableHtmlEncode : this.parent.disableHtmlEncode;
|
|
485
494
|
if (taskSettings.id !== column.field) {
|
|
486
495
|
column.clipMode = column.clipMode ? column.clipMode : 'EllipsisWithTooltip';
|
|
@@ -491,14 +500,24 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
491
500
|
}
|
|
492
501
|
else if (taskSettings.name === column.field) {
|
|
493
502
|
/** Name column */
|
|
494
|
-
|
|
503
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
504
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('name');
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('name');
|
|
508
|
+
}
|
|
495
509
|
column.width = column.width ? column.width : 150;
|
|
496
510
|
column.editType = column.editType ? column.editType : 'stringedit';
|
|
497
511
|
column.type = column.type ? column.type : 'string';
|
|
498
512
|
}
|
|
499
513
|
else if (taskSettings.startDate === column.field) {
|
|
500
514
|
/** Name column */
|
|
501
|
-
|
|
515
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
516
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('startDate');
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('startDate');
|
|
520
|
+
}
|
|
502
521
|
column.editType = column.editType ? column.editType :
|
|
503
522
|
this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
|
|
504
523
|
column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
|
|
@@ -506,7 +525,12 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
506
525
|
column.edit = { params: { renderDayCell: this.parent.renderWorkingDayCell.bind(this.parent) } };
|
|
507
526
|
}
|
|
508
527
|
else if (taskSettings.endDate === column.field) {
|
|
509
|
-
|
|
528
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
529
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('endDate');
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('endDate');
|
|
533
|
+
}
|
|
510
534
|
column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
|
|
511
535
|
column.editType = column.editType ? column.editType :
|
|
512
536
|
this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
|
|
@@ -515,7 +539,12 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
515
539
|
}
|
|
516
540
|
else if (taskSettings.duration === column.field) {
|
|
517
541
|
column.width = column.width ? column.width : 150;
|
|
518
|
-
|
|
542
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
543
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('duration');
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('duration');
|
|
547
|
+
}
|
|
519
548
|
column.valueAccessor = column.valueAccessor ? column.valueAccessor : !isNullOrUndefined(column.edit) ? null :
|
|
520
549
|
this.durationValueAccessor.bind(this);
|
|
521
550
|
column.editType = column.editType ? column.editType : 'stringedit';
|
|
@@ -525,7 +554,12 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
525
554
|
this.composeProgressColumn(column);
|
|
526
555
|
}
|
|
527
556
|
else if (taskSettings.dependency === column.field) {
|
|
528
|
-
|
|
557
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
558
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('dependency');
|
|
559
|
+
}
|
|
560
|
+
else {
|
|
561
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('dependency');
|
|
562
|
+
}
|
|
529
563
|
column.width = column.width ? column.width : 150;
|
|
530
564
|
column.editType = column.editType ? column.editType : 'stringedit';
|
|
531
565
|
column.type = 'string';
|
|
@@ -535,7 +569,12 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
535
569
|
this.composeResourceColumn(column);
|
|
536
570
|
}
|
|
537
571
|
else if (taskSettings.notes === column.field) {
|
|
538
|
-
|
|
572
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
573
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('notes');
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('notes');
|
|
577
|
+
}
|
|
539
578
|
column.width = column.width ? column.width : 150;
|
|
540
579
|
column.editType = column.editType ? column.editType : 'stringedit';
|
|
541
580
|
if (!this.parent.showInlineNotes) {
|
|
@@ -550,26 +589,46 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
550
589
|
var colName = (taskSettings.baselineEndDate === column.field) ? 'baselineEndDate' :
|
|
551
590
|
'baselineStartDate';
|
|
552
591
|
column.width = column.width ? column.width : 150;
|
|
553
|
-
|
|
592
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
593
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant(colName);
|
|
594
|
+
}
|
|
595
|
+
else {
|
|
596
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant(colName);
|
|
597
|
+
}
|
|
554
598
|
column.format = column.format ? column.format : { type: 'date', format: this.parent.getDateFormat() };
|
|
555
599
|
column.editType = column.editType ? column.editType :
|
|
556
600
|
this.parent.getDateFormat().toLowerCase().indexOf('hh') !== -1 ? 'datetimepickeredit' : 'datepickeredit';
|
|
557
601
|
}
|
|
558
602
|
else if (taskSettings.work === column.field) {
|
|
559
|
-
|
|
603
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
604
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('work');
|
|
605
|
+
}
|
|
606
|
+
else {
|
|
607
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('work');
|
|
608
|
+
}
|
|
560
609
|
column.width = column.width ? column.width : 150;
|
|
561
610
|
column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.workValueAccessor.bind(this);
|
|
562
611
|
column.editType = column.editType ? column.editType : 'numericedit';
|
|
563
612
|
}
|
|
564
613
|
else if (taskSettings.type === column.field) {
|
|
565
|
-
|
|
614
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
615
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('taskType');
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('taskType');
|
|
619
|
+
}
|
|
566
620
|
column.width = column.width ? column.width : 150;
|
|
567
621
|
//column.type = 'string';
|
|
568
622
|
column.editType = 'dropdownedit';
|
|
569
623
|
column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.taskTypeValueAccessor.bind(this);
|
|
570
624
|
}
|
|
571
625
|
else if (taskSettings.manual === column.field && this.parent.taskMode === 'Custom') {
|
|
572
|
-
|
|
626
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
627
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('taskMode');
|
|
628
|
+
}
|
|
629
|
+
else {
|
|
630
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('taskMode');
|
|
631
|
+
}
|
|
573
632
|
column.width = column.width ? column.width : 120;
|
|
574
633
|
column.editType = column.editType ? column.editType : 'dropdownedit';
|
|
575
634
|
column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.modeValueAccessor.bind(this);
|
|
@@ -593,7 +652,15 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
593
652
|
* @returns {void} .
|
|
594
653
|
*/
|
|
595
654
|
GanttTreeGrid.prototype.composeResourceColumn = function (column) {
|
|
596
|
-
|
|
655
|
+
var previousColumn = this.parent.previousGanttColumns.filter(function (prevcolumn) {
|
|
656
|
+
return column.field == prevcolumn.field;
|
|
657
|
+
})[0];
|
|
658
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
659
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('resourceName');
|
|
660
|
+
}
|
|
661
|
+
else {
|
|
662
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('resourceName');
|
|
663
|
+
}
|
|
597
664
|
column.width = column.width ? column.width : 150;
|
|
598
665
|
column.type = 'string';
|
|
599
666
|
column.valueAccessor = column.valueAccessor ? column.valueAccessor : this.resourceValueAccessor.bind(this);
|
|
@@ -628,7 +695,17 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
628
695
|
var lengthDataSource = this.parent.dataSource['length'];
|
|
629
696
|
var taskIDName;
|
|
630
697
|
column.isPrimaryKey = isProjectView ? true : false;
|
|
631
|
-
|
|
698
|
+
if (this.parent.isLocaleChanged) {
|
|
699
|
+
var previousColumn = this.parent.previousGanttColumns.filter(function (prevcolumn) {
|
|
700
|
+
return column.field == prevcolumn.field;
|
|
701
|
+
})[0];
|
|
702
|
+
if (previousColumn) {
|
|
703
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('id');
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
else {
|
|
707
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('id');
|
|
708
|
+
}
|
|
632
709
|
column.width = column.width ? column.width : 100;
|
|
633
710
|
for (var i = 0; i < lengthDataSource; i++) {
|
|
634
711
|
if (!isNullOrUndefined(this.parent.dataSource[i][this.parent.taskFields.id])) {
|
|
@@ -665,7 +742,15 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
665
742
|
* @returns {void} .
|
|
666
743
|
*/
|
|
667
744
|
GanttTreeGrid.prototype.composeProgressColumn = function (column) {
|
|
668
|
-
|
|
745
|
+
var previousColumn = this.parent.previousGanttColumns.filter(function (prevcolumn) {
|
|
746
|
+
return column.field == prevcolumn.field;
|
|
747
|
+
})[0];
|
|
748
|
+
if (this.parent.isLocaleChanged && previousColumn) {
|
|
749
|
+
column.headerText = previousColumn.headerText ? previousColumn.headerText : this.parent.localeObj.getConstant('progress');
|
|
750
|
+
}
|
|
751
|
+
else {
|
|
752
|
+
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('progress');
|
|
753
|
+
}
|
|
669
754
|
column.width = column.width ? column.width : 150;
|
|
670
755
|
column.editType = column.editType ? column.editType : 'numericedit';
|
|
671
756
|
};
|
|
@@ -437,6 +437,12 @@ var ExportHelper = /** @class */ (function () {
|
|
|
437
437
|
cell.style.padding.bottom = padding - style.fontSize;
|
|
438
438
|
cell.style.padding.left = 10;
|
|
439
439
|
cell.style.padding.right = 10;
|
|
440
|
+
if (style.padding) {
|
|
441
|
+
cell.style.padding = style.padding;
|
|
442
|
+
}
|
|
443
|
+
if (style.borders) {
|
|
444
|
+
cell.style.borders = style.borders;
|
|
445
|
+
}
|
|
440
446
|
};
|
|
441
447
|
/**
|
|
442
448
|
* @param {PdfDocument} pdfDoc .
|
|
@@ -1328,7 +1328,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1328
1328
|
for (var i = 0; i < this.parent.currentViewData.length; i++) {
|
|
1329
1329
|
var tempTemplateData = this.parent.currentViewData[i];
|
|
1330
1330
|
if (this.parent.viewType === 'ResourceView') {
|
|
1331
|
-
if (this.parent.editModule && this.parent.editModule.isResourceTaskDeleted) {
|
|
1331
|
+
if (this.parent.editModule && this.parent.editModule.isResourceTaskDeleted || this.parent.isFromOnPropertyChange) {
|
|
1332
1332
|
this.parent.initialChartRowElements = this.parent.ganttChartModule.getChartRows();
|
|
1333
1333
|
this.parent.editModule.isResourceTaskDeleted = false;
|
|
1334
1334
|
}
|
|
@@ -1840,7 +1840,10 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1840
1840
|
addClass([cloneElement], 'collpse-parent-border');
|
|
1841
1841
|
var id = chartRows[i].querySelector('.' + cls.taskBarMainContainer).getAttribute('rowUniqueId');
|
|
1842
1842
|
var ganttData = this.parent.getRecordByID(id);
|
|
1843
|
-
var zIndex =
|
|
1843
|
+
var zIndex = "";
|
|
1844
|
+
if (ganttData && ganttData.ganttProperties.eOverlapIndex) {
|
|
1845
|
+
zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
|
|
1846
|
+
}
|
|
1844
1847
|
var cloneChildElement = cloneElement.cloneNode(true);
|
|
1845
1848
|
cloneChildElement.style.zIndex = zIndex;
|
|
1846
1849
|
parentTrNode[0].childNodes[0].childNodes[0].childNodes[0].appendChild(cloneChildElement);
|
package/GitLeaksReport.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[]
|
package/gitleaks-ci/gitleaks
DELETED
|
Binary file
|
package/gitleaks-ci.tar.gz
DELETED
|
Binary file
|