@syncfusion/ej2-gantt 20.2.50 → 20.3.48
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 +10 -0
- 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 +959 -346
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +989 -365
- 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/cell-edit.js +1 -2
- package/src/gantt/actions/connector-line-edit.d.ts +2 -0
- package/src/gantt/actions/connector-line-edit.js +104 -10
- package/src/gantt/actions/context-menu.js +6 -1
- package/src/gantt/actions/critical-path.d.ts +1 -1
- package/src/gantt/actions/critical-path.js +105 -30
- package/src/gantt/actions/dependency.d.ts +2 -0
- package/src/gantt/actions/dependency.js +68 -12
- package/src/gantt/actions/dialog-edit.d.ts +3 -0
- package/src/gantt/actions/dialog-edit.js +124 -19
- package/src/gantt/actions/edit.js +72 -11
- package/src/gantt/actions/filter.d.ts +3 -0
- package/src/gantt/actions/filter.js +30 -6
- package/src/gantt/actions/keyboard.js +1 -1
- package/src/gantt/actions/rowdragdrop.js +68 -8
- package/src/gantt/actions/taskbar-edit.js +15 -3
- package/src/gantt/base/enum.d.ts +3 -1
- package/src/gantt/base/gantt-chart.js +11 -6
- package/src/gantt/base/gantt.d.ts +6 -6
- package/src/gantt/base/gantt.js +13 -4
- package/src/gantt/base/interface.d.ts +4 -0
- package/src/gantt/base/splitter.d.ts +2 -2
- package/src/gantt/base/splitter.js +6 -7
- package/src/gantt/base/task-processor.js +13 -7
- package/src/gantt/base/tree-grid.js +21 -2
- package/src/gantt/export/pdf-connector-line.js +187 -185
- package/src/gantt/models/edit-settings-model.d.ts +2 -2
- package/src/gantt/models/edit-settings.d.ts +2 -2
- package/src/gantt/models/filter-settings-model.d.ts +1 -1
- package/src/gantt/models/filter-settings.d.ts +1 -1
- package/src/gantt/renderer/chart-rows.d.ts +1 -0
- package/src/gantt/renderer/chart-rows.js +47 -16
- package/src/gantt/renderer/connector-line.js +101 -33
- package/src/gantt/renderer/event-marker.js +1 -1
- package/src/gantt/renderer/nonworking-day.js +0 -1
- package/src/gantt/renderer/timeline.js +1 -1
- package/src/gantt/renderer/tooltip.js +3 -1
- package/styles/bootstrap-dark.css +115 -62
- package/styles/bootstrap.css +115 -62
- package/styles/bootstrap4.css +115 -62
- package/styles/bootstrap5-dark.css +119 -63
- package/styles/bootstrap5.css +119 -63
- package/styles/fabric-dark.css +115 -62
- package/styles/fabric.css +115 -62
- package/styles/fluent-dark.css +126 -66
- package/styles/fluent.css +124 -64
- package/styles/gantt/_all.scss +1 -1
- package/styles/gantt/_bootstrap-dark-definition.scss +4 -1
- package/styles/gantt/_bootstrap-definition.scss +4 -1
- package/styles/gantt/_bootstrap4-definition.scss +4 -1
- package/styles/gantt/_bootstrap5-definition.scss +4 -2
- package/styles/gantt/_fabric-dark-definition.scss +4 -1
- package/styles/gantt/_fabric-definition.scss +4 -1
- package/styles/gantt/_fluent-definition.scss +6 -4
- package/styles/gantt/_fusionnew-definition.scss +12 -10
- package/styles/gantt/_highcontrast-definition.scss +4 -1
- package/styles/gantt/_highcontrast-light-definition.scss +4 -1
- package/styles/gantt/_layout.scss +143 -51
- package/styles/gantt/_material-dark-definition.scss +4 -1
- package/styles/gantt/_material-definition.scss +4 -1
- package/styles/gantt/_material3-definition.scss +13 -11
- package/styles/gantt/_tailwind-definition.scss +4 -2
- package/styles/gantt/_theme.scss +29 -29
- package/styles/gantt/bootstrap-dark.css +115 -62
- package/styles/gantt/bootstrap.css +115 -62
- package/styles/gantt/bootstrap4.css +115 -62
- package/styles/gantt/bootstrap5-dark.css +119 -63
- package/styles/gantt/bootstrap5.css +119 -63
- package/styles/gantt/fabric-dark.css +115 -62
- package/styles/gantt/fabric.css +115 -62
- package/styles/gantt/fluent-dark.css +126 -66
- package/styles/gantt/fluent.css +124 -64
- package/styles/gantt/highcontrast-light.css +120 -62
- package/styles/gantt/highcontrast.css +120 -62
- package/styles/gantt/material-dark.css +120 -65
- package/styles/gantt/material.css +118 -65
- package/styles/gantt/tailwind-dark.css +117 -64
- package/styles/gantt/tailwind.css +117 -64
- package/styles/highcontrast-light.css +120 -62
- package/styles/highcontrast.css +120 -62
- package/styles/material-dark.css +120 -65
- package/styles/material.css +118 -65
- package/styles/tailwind-dark.css +117 -64
- package/styles/tailwind.css +117 -64
|
@@ -6,7 +6,7 @@ import { ColumnMenu, ContextMenu, Edit as Edit$1, ExcelExport, Filter, Reorder,
|
|
|
6
6
|
import { Splitter } from '@syncfusion/ej2-layouts';
|
|
7
7
|
import { ContextMenu as ContextMenu$1, Tab, Toolbar as Toolbar$1 } from '@syncfusion/ej2-navigations';
|
|
8
8
|
import { Count, HtmlEditor, Link, QuickToolbar, RichTextEditor, Toolbar as Toolbar$2 } from '@syncfusion/ej2-richtexteditor';
|
|
9
|
-
import { MaskedTextBox, NumericTextBox, TextBox } from '@syncfusion/ej2-inputs';
|
|
9
|
+
import { FormValidator, MaskedTextBox, NumericTextBox, TextBox } from '@syncfusion/ej2-inputs';
|
|
10
10
|
import { CheckBox } from '@syncfusion/ej2-buttons';
|
|
11
11
|
import { DatePicker, DateTimePicker } from '@syncfusion/ej2-calendars';
|
|
12
12
|
import { CheckBoxSelection, ComboBox, DropDownList, MultiSelect } from '@syncfusion/ej2-dropdowns';
|
|
@@ -1740,7 +1740,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1740
1740
|
};
|
|
1741
1741
|
TaskProcessor.prototype.calculateSharedTaskUniqueIds = function () {
|
|
1742
1742
|
var _loop_2 = function (i) {
|
|
1743
|
-
var value =
|
|
1743
|
+
var value = [];
|
|
1744
|
+
value[0] = this_2.parent.getTaskIds()[i][0];
|
|
1745
|
+
value[1] = this_2.parent.getTaskIds()[i].slice(1);
|
|
1744
1746
|
if (value[0] !== 'R') {
|
|
1745
1747
|
var sharedRecords_1 = [];
|
|
1746
1748
|
var ids_1 = [];
|
|
@@ -1807,7 +1809,6 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1807
1809
|
this_3.parent.setRecordValue('autoDuration', this_3.calculateAutoDuration(parentProp), parentProp, true);
|
|
1808
1810
|
this_3.updateAutoWidthLeft(parentData);
|
|
1809
1811
|
}
|
|
1810
|
-
this_3.resetDependency(parentData);
|
|
1811
1812
|
this_3.updateWidthLeft(parentData);
|
|
1812
1813
|
this_3.updateTaskData(parentData);
|
|
1813
1814
|
}
|
|
@@ -1832,7 +1833,8 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1832
1833
|
var length = columns.length;
|
|
1833
1834
|
if (length) {
|
|
1834
1835
|
for (var i = 0; i < length; i++) {
|
|
1835
|
-
|
|
1836
|
+
var fieldName = ganttRecord[columns[i].field];
|
|
1837
|
+
if (fieldName === undefined) {
|
|
1836
1838
|
this.parent.setRecordValue(columns[i].field, data[columns[i].field], ganttRecord);
|
|
1837
1839
|
}
|
|
1838
1840
|
}
|
|
@@ -1881,6 +1883,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1881
1883
|
this.parent.setRecordValue('parentId', data[taskSettings.parentID], ganttProperties, true);
|
|
1882
1884
|
}
|
|
1883
1885
|
this.addCustomFieldValue(data, ganttData);
|
|
1886
|
+
ganttData.checkboxState = 'uncheck';
|
|
1884
1887
|
this.parent.setRecordValue('isAutoSchedule', autoSchedule, ganttProperties, true);
|
|
1885
1888
|
this.parent.setRecordValue('resourceInfo', this.setResourceInfo(data), ganttProperties, true);
|
|
1886
1889
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
@@ -1923,7 +1926,6 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1923
1926
|
if (!isNullOrUndefined(data[taskSettings.child]) && data[taskSettings.child].length > 0) {
|
|
1924
1927
|
this.parent.setRecordValue('hasChildRecords', true, ganttData);
|
|
1925
1928
|
this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
|
|
1926
|
-
this.resetDependency(ganttData);
|
|
1927
1929
|
}
|
|
1928
1930
|
else {
|
|
1929
1931
|
this.parent.setRecordValue('hasChildRecords', false, ganttData);
|
|
@@ -1966,6 +1968,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
1966
1968
|
}
|
|
1967
1969
|
else {
|
|
1968
1970
|
var uniqueId = ganttData.uniqueID.replace(this.parent.element.id + '_data_', '');
|
|
1971
|
+
if (this.parent.viewType === 'ResourceView' && typeof (ganttData.ganttProperties.taskId) === "string") {
|
|
1972
|
+
uniqueId = ganttProperties.taskId.toString();
|
|
1973
|
+
}
|
|
1969
1974
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttData);
|
|
1970
1975
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttProperties, true);
|
|
1971
1976
|
this.parent.setRecordValue('sharedTaskUniqueIds', [], ganttProperties, true);
|
|
@@ -3085,10 +3090,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3085
3090
|
TaskProcessor.prototype.updateResourceName = function (data) {
|
|
3086
3091
|
var resourceInfo = data.ganttProperties.resourceInfo;
|
|
3087
3092
|
var resourceName = [];
|
|
3093
|
+
var taskMapping = this.parent.taskFields;
|
|
3088
3094
|
if (resourceInfo) {
|
|
3095
|
+
var resourceLength = resourceInfo.length;
|
|
3089
3096
|
var taskResources = extend([], [], data.taskData[this.parent.taskFields.resourceInfo], true);
|
|
3090
3097
|
this.parent.setRecordValue('taskData.' + this.parent.taskFields.resourceInfo, [], data);
|
|
3091
|
-
for (var i = 0; i <
|
|
3098
|
+
for (var i = 0; i < resourceLength; i++) {
|
|
3092
3099
|
var resource = resourceInfo[i];
|
|
3093
3100
|
var resName = resource[this.parent.resourceFields.name];
|
|
3094
3101
|
var resourceUnit = resource[this.parent.resourceFields.unit];
|
|
@@ -3097,7 +3104,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3097
3104
|
}
|
|
3098
3105
|
resourceName.push(resName);
|
|
3099
3106
|
if (data.taskData) {
|
|
3100
|
-
var mapping =
|
|
3107
|
+
var mapping = taskMapping.resourceInfo;
|
|
3101
3108
|
// eslint-disable-next-line
|
|
3102
3109
|
if (typeof (taskResources[i] === 'object')) {
|
|
3103
3110
|
data.taskData[mapping].push(taskResources[i]);
|
|
@@ -3776,7 +3783,6 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3776
3783
|
this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
|
|
3777
3784
|
this.updateAutoWidthLeft(parentData);
|
|
3778
3785
|
}
|
|
3779
|
-
this.resetDependency(parentData);
|
|
3780
3786
|
this.updateWidthLeft(parentData);
|
|
3781
3787
|
this.updateTaskData(parentData);
|
|
3782
3788
|
}
|
|
@@ -4331,7 +4337,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4331
4337
|
GanttChart.prototype.renderTimelineContainer = function () {
|
|
4332
4338
|
this.chartTimelineContainer =
|
|
4333
4339
|
createElement('div', { className: timelineHeaderContainer });
|
|
4334
|
-
this.chartTimelineContainer.setAttribute("role", "
|
|
4340
|
+
this.chartTimelineContainer.setAttribute("role", "presentation");
|
|
4335
4341
|
this.chartElement.appendChild(this.chartTimelineContainer);
|
|
4336
4342
|
};
|
|
4337
4343
|
/**
|
|
@@ -4457,12 +4463,10 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4457
4463
|
}
|
|
4458
4464
|
};
|
|
4459
4465
|
GanttChart.prototype.ganttChartMouseClick = function (e) {
|
|
4460
|
-
if (this.parent.
|
|
4461
|
-
|
|
4462
|
-
this.scrollToTarget(e); /** Scroll to task */
|
|
4463
|
-
}
|
|
4464
|
-
this.parent.notify('chartMouseClick', e);
|
|
4466
|
+
if (this.parent.autoFocusTasks) {
|
|
4467
|
+
this.scrollToTarget(e); /** Scroll to task */
|
|
4465
4468
|
}
|
|
4469
|
+
this.parent.notify('chartMouseClick', e);
|
|
4466
4470
|
};
|
|
4467
4471
|
GanttChart.prototype.ganttChartMouseUp = function (e) {
|
|
4468
4472
|
if (this.parent.editSettings.allowTaskbarEditing) {
|
|
@@ -4796,6 +4800,10 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4796
4800
|
this.parent.updatedConnectorLineCollection = [];
|
|
4797
4801
|
this.parent.predecessorModule.createConnectorLinesCollection();
|
|
4798
4802
|
this.parent.connectorLineModule.renderConnectorLines(this.parent.updatedConnectorLineCollection);
|
|
4803
|
+
if (this.parent.enableCriticalPath && this.parent.criticalPathModule) {
|
|
4804
|
+
var criticalModule = this.parent.criticalPathModule;
|
|
4805
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
4806
|
+
}
|
|
4799
4807
|
};
|
|
4800
4808
|
/**
|
|
4801
4809
|
* To collapse gantt rows
|
|
@@ -4825,6 +4833,9 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4825
4833
|
* @private
|
|
4826
4834
|
*/
|
|
4827
4835
|
GanttChart.prototype.collapsedGanttRow = function (args) {
|
|
4836
|
+
if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
|
|
4837
|
+
return;
|
|
4838
|
+
}
|
|
4828
4839
|
var record = getValue('data', args);
|
|
4829
4840
|
if (this.isExpandCollapseFromChart) {
|
|
4830
4841
|
this.expandCollapseChartRows('collapse', getValue('chartRow', args), record, null);
|
|
@@ -6348,7 +6359,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6348
6359
|
endDate.setHours(24, 0, 0, 0);
|
|
6349
6360
|
}
|
|
6350
6361
|
}
|
|
6351
|
-
if ((this.isZooming || this.parent.isLoad) && isNullOrUndefined(this.parent.projectEndDate)) {
|
|
6362
|
+
if ((this.isZooming || this.parent.isLoad || this.parent.isFromOnPropertyChange) && isNullOrUndefined(this.parent.projectEndDate)) {
|
|
6352
6363
|
this.updateTimelineAfterZooming(endDate, false);
|
|
6353
6364
|
}
|
|
6354
6365
|
return endDate;
|
|
@@ -7510,11 +7521,30 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7510
7521
|
*/
|
|
7511
7522
|
GanttTreeGrid.prototype.composeIDColumn = function (column) {
|
|
7512
7523
|
var isProjectView = this.parent.viewType === 'ProjectView';
|
|
7524
|
+
var lengthDataSource = this.parent.dataSource['length'];
|
|
7525
|
+
var taskIDName;
|
|
7513
7526
|
column.isPrimaryKey = isProjectView ? true : false;
|
|
7514
7527
|
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('id');
|
|
7515
7528
|
column.width = column.width ? column.width : 100;
|
|
7516
|
-
|
|
7517
|
-
|
|
7529
|
+
for (var i = 0; i < lengthDataSource; i++) {
|
|
7530
|
+
if (!isNullOrUndefined(this.parent.dataSource[i][this.parent.taskFields.id])) {
|
|
7531
|
+
taskIDName = this.parent.dataSource[i][this.parent.taskFields.id];
|
|
7532
|
+
break;
|
|
7533
|
+
}
|
|
7534
|
+
}
|
|
7535
|
+
if (typeof (taskIDName) === "string") {
|
|
7536
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
7537
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
7538
|
+
}
|
|
7539
|
+
else {
|
|
7540
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : true;
|
|
7541
|
+
}
|
|
7542
|
+
column.editType = column.editType ? column.editType : 'stringedit';
|
|
7543
|
+
}
|
|
7544
|
+
else {
|
|
7545
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
7546
|
+
column.editType = column.editType ? column.editType : 'numericedit';
|
|
7547
|
+
}
|
|
7518
7548
|
column.valueAccessor = isProjectView ? null : this.idValueAccessor.bind(this);
|
|
7519
7549
|
};
|
|
7520
7550
|
GanttTreeGrid.prototype.composeUniqueIDColumn = function (column) {
|
|
@@ -8508,7 +8538,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8508
8538
|
* @private
|
|
8509
8539
|
*/
|
|
8510
8540
|
ChartRows.prototype.getIndicatorNode = function (indicator) {
|
|
8511
|
-
var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '"
|
|
8541
|
+
var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '"style="line-height:'
|
|
8512
8542
|
+ (this.parent.rowHeight) + 'px;' +
|
|
8513
8543
|
'left:' + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
|
|
8514
8544
|
return this.createDivElement(templateString);
|
|
@@ -9024,7 +9054,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9024
9054
|
*/
|
|
9025
9055
|
ChartRows.prototype.getTaskBaselineNode = function () {
|
|
9026
9056
|
var data = this.templateData;
|
|
9027
|
-
var template = '<div class="' + baselineBar + ' ' + '" role="
|
|
9057
|
+
var template = '<div class="' + baselineBar + ' ' + '" role="term" style="margin-top:' + this.baselineTop +
|
|
9028
9058
|
'px;left:' + data.ganttProperties.baselineLeft + 'px;' +
|
|
9029
9059
|
'width:' + data.ganttProperties.baselineWidth + 'px;height:' +
|
|
9030
9060
|
this.baselineHeight + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + '"></div>';
|
|
@@ -9277,10 +9307,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9277
9307
|
var className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
|
|
9278
9308
|
'e-chart-row-border' : '';
|
|
9279
9309
|
table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + '"' +
|
|
9280
|
-
'
|
|
9310
|
+
'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
|
|
9281
9311
|
this.parent.rowHeight + 'px;">' +
|
|
9282
9312
|
'<td class="' + chartRowCell + ' ' + className
|
|
9283
|
-
+ '"
|
|
9313
|
+
+ '"style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
|
|
9284
9314
|
return table.childNodes;
|
|
9285
9315
|
};
|
|
9286
9316
|
/**
|
|
@@ -9345,7 +9375,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9345
9375
|
};
|
|
9346
9376
|
ChartRows.prototype.leftLabelContainer = function () {
|
|
9347
9377
|
var template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? leftLabelTempContainer :
|
|
9348
|
-
leftLabelContainer) + ' ' + '" tabindex="-1" role="
|
|
9378
|
+
leftLabelContainer) + ' ' + '" tabindex="-1" role="term" style="height:' +
|
|
9349
9379
|
(this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
|
|
9350
9380
|
return this.createDivElement(template);
|
|
9351
9381
|
};
|
|
@@ -9357,7 +9387,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9357
9387
|
var template = '<div class="' + taskBarMainContainer + ' ' +
|
|
9358
9388
|
this.parent.getUnscheduledTaskClass(data.ganttProperties) + ' ' +
|
|
9359
9389
|
((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
|
|
9360
|
-
' tabindex="-1" role="
|
|
9390
|
+
' tabindex="-1" role="term" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
|
|
9361
9391
|
('width:' + this.milestoneHeight + 'px;height:' +
|
|
9362
9392
|
this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;left:' + (data.ganttProperties.left -
|
|
9363
9393
|
(this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
|
|
@@ -9368,26 +9398,26 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9368
9398
|
};
|
|
9369
9399
|
ChartRows.prototype.rightLabelContainer = function () {
|
|
9370
9400
|
var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? rightLabelTempContainer :
|
|
9371
|
-
rightLabelContainer) + '" ' + ' tabindex="-1" role="
|
|
9401
|
+
rightLabelContainer) + '" ' + ' tabindex="-1" role="term" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
|
|
9372
9402
|
+ (this.parent.rowHeight - 2) + 'px;"></div>';
|
|
9373
9403
|
return this.createDivElement(template);
|
|
9374
9404
|
};
|
|
9375
9405
|
ChartRows.prototype.childTaskbarLeftResizer = function () {
|
|
9376
9406
|
var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
|
|
9377
9407
|
var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
|
|
9378
|
-
'
|
|
9408
|
+
'style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9379
9409
|
return this.createDivElement(template);
|
|
9380
9410
|
};
|
|
9381
9411
|
ChartRows.prototype.childTaskbarRightResizer = function () {
|
|
9382
9412
|
var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
|
|
9383
9413
|
var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
|
|
9384
|
-
'
|
|
9414
|
+
'style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
|
|
9385
9415
|
'height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9386
9416
|
return this.createDivElement(template);
|
|
9387
9417
|
};
|
|
9388
9418
|
ChartRows.prototype.childTaskbarProgressResizer = function () {
|
|
9389
9419
|
var template = '<div class="' + childProgressResizer + '"' +
|
|
9390
|
-
'
|
|
9420
|
+
'style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
|
|
9391
9421
|
(this.taskBarHeight - 4) + 'px;"><div class="' + progressBarHandler + '"' +
|
|
9392
9422
|
'><div class="' + progressHandlerElement + '"></div>' +
|
|
9393
9423
|
'<div class="' + progressBarHandlerAfter + '"></div></div>';
|
|
@@ -9398,9 +9428,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9398
9428
|
var pointerLeft = -((this.parent.isAdaptive ? 14 : 2) + this.connectorPointWidth);
|
|
9399
9429
|
var mileStoneLeft = -(this.connectorPointWidth + 2);
|
|
9400
9430
|
var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9431
|
+
var marginTop;
|
|
9432
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9433
|
+
marginTop = '';
|
|
9434
|
+
}
|
|
9435
|
+
else {
|
|
9436
|
+
marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
|
|
9437
|
+
}
|
|
9401
9438
|
var template = '<div class="' + leftConnectorPointOuterDiv + '" style="' +
|
|
9402
9439
|
((data.ganttProperties.isMilestone) ? ('margin-top:' + pointerTop + 'px;left:' + mileStoneLeft +
|
|
9403
|
-
'px;') : (
|
|
9440
|
+
'px;') : (marginTop + ';left:' + pointerLeft + 'px;')) + '">' +
|
|
9404
9441
|
'<div class="' + connectorPointLeft + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
|
|
9405
9442
|
'" style="width: ' + this.connectorPointWidth + 'px;' +
|
|
9406
9443
|
'height: ' + this.connectorPointWidth + 'px;">' + this.touchLeftConnectorpoint + '</div></div>';
|
|
@@ -9410,10 +9447,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9410
9447
|
var data = this.templateData;
|
|
9411
9448
|
var pointerRight = this.parent.isAdaptive ? 10 : -2;
|
|
9412
9449
|
var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9450
|
+
var marginTop;
|
|
9451
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9452
|
+
marginTop = '';
|
|
9453
|
+
}
|
|
9454
|
+
else {
|
|
9455
|
+
marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
|
|
9456
|
+
}
|
|
9413
9457
|
var template = '<div class="' + rightConnectorPointOuterDiv + '" style="' +
|
|
9414
9458
|
((data.ganttProperties.isMilestone) ? ('left:' + (this.milestoneHeight - 2) + 'px;margin-top:' +
|
|
9415
|
-
pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;
|
|
9416
|
-
this.connectorPointMargin + 'px;')) + '">' +
|
|
9459
|
+
pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;' + marginTop + ';')) + '">' +
|
|
9417
9460
|
'<div class="' + connectorPointRight + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
|
|
9418
9461
|
'" style="width:' + this.connectorPointWidth + 'px;height:' + this.connectorPointWidth + 'px;">' +
|
|
9419
9462
|
this.touchRightConnectorpoint + '</div></div>';
|
|
@@ -9713,14 +9756,17 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9713
9756
|
var taskbarContainerNode = this.taskbarContainer();
|
|
9714
9757
|
taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
|
|
9715
9758
|
taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
|
|
9716
|
-
|
|
9717
|
-
|
|
9759
|
+
var connectorLineLeftNode = this.getLeftPointNode();
|
|
9760
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
9718
9761
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9719
9762
|
}
|
|
9720
9763
|
if (this.templateData.hasChildRecords) {
|
|
9721
9764
|
var parentTaskbarTemplateNode = this.getParentTaskbarNode(i, taskbarContainerNode);
|
|
9722
9765
|
if (!this.templateData.ganttProperties.isAutoSchedule) {
|
|
9723
9766
|
var manualTaskbar = this.getManualTaskbar();
|
|
9767
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9768
|
+
var connectorLineRightNode = this.getRightPointNode();
|
|
9769
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
9724
9770
|
taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
|
|
9725
9771
|
}
|
|
9726
9772
|
if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
|
|
@@ -9795,7 +9841,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9795
9841
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
9796
9842
|
}
|
|
9797
9843
|
}
|
|
9798
|
-
if (!this.templateData.hasChildRecords) {
|
|
9844
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
9799
9845
|
var connectorLineRightNode = this.getRightPointNode();
|
|
9800
9846
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
9801
9847
|
}
|
|
@@ -10198,6 +10244,21 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10198
10244
|
}
|
|
10199
10245
|
return defaultValue;
|
|
10200
10246
|
};
|
|
10247
|
+
ChartRows.prototype.generateBaselineAriaLabel = function (data) {
|
|
10248
|
+
data = this.templateData;
|
|
10249
|
+
var defaultValue = '';
|
|
10250
|
+
var nameConstant = this.parent.localeObj.getConstant('name');
|
|
10251
|
+
var startDateConstant = this.parent.localeObj.getConstant('startDate');
|
|
10252
|
+
var endDateConstant = this.parent.localeObj.getConstant('endDate');
|
|
10253
|
+
var taskNameVal = data.ganttProperties.taskName;
|
|
10254
|
+
var startDateVal = data.ganttProperties.baselineStartDate;
|
|
10255
|
+
var endDateVal = data.ganttProperties.baselineEndDate;
|
|
10256
|
+
defaultValue += 'Baseline' + ' ';
|
|
10257
|
+
defaultValue += nameConstant + ' ' + taskNameVal + ' ';
|
|
10258
|
+
defaultValue += startDateConstant + ' ' + this.parent.getFormatedDate(startDateVal) + ' ';
|
|
10259
|
+
defaultValue += endDateConstant + ' ' + this.parent.getFormatedDate(endDateVal) + ' ';
|
|
10260
|
+
return defaultValue;
|
|
10261
|
+
};
|
|
10201
10262
|
ChartRows.prototype.generateSpiltTaskAriaLabel = function (data, ganttProp) {
|
|
10202
10263
|
var defaultValue = '';
|
|
10203
10264
|
var startDateConstant = this.parent.localeObj.getConstant('startDate');
|
|
@@ -10237,6 +10298,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10237
10298
|
function Dependency(gantt) {
|
|
10238
10299
|
this.parentRecord = [];
|
|
10239
10300
|
this.parentIds = [];
|
|
10301
|
+
this.parentPredecessors = [];
|
|
10240
10302
|
this.parent = gantt;
|
|
10241
10303
|
this.dateValidateModule = this.parent.dateValidationModule;
|
|
10242
10304
|
}
|
|
@@ -10252,9 +10314,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10252
10314
|
for (var count = length; count >= 0; count--) {
|
|
10253
10315
|
var ganttData = predecessorTasks[count];
|
|
10254
10316
|
var ganttProp = ganttData.ganttProperties;
|
|
10255
|
-
|
|
10256
|
-
this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
|
|
10257
|
-
}
|
|
10317
|
+
this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
|
|
10258
10318
|
}
|
|
10259
10319
|
};
|
|
10260
10320
|
/**
|
|
@@ -10364,8 +10424,29 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10364
10424
|
values = el.split('-');
|
|
10365
10425
|
offsetValue = '-';
|
|
10366
10426
|
}
|
|
10367
|
-
match =
|
|
10427
|
+
match = [];
|
|
10368
10428
|
var ids = _this.parent.viewType === 'ResourceView' ? _this.parent.getTaskIds() : _this.parent.ids;
|
|
10429
|
+
var isExist1 = _this.parent.viewType === 'ResourceView' ? ids.indexOf('T' + values[0]) : ids.indexOf(values[0]);
|
|
10430
|
+
if (isExist1 !== -1) {
|
|
10431
|
+
match[0] = values[0];
|
|
10432
|
+
}
|
|
10433
|
+
else {
|
|
10434
|
+
if (ids.indexOf(values[0]) === -1) {
|
|
10435
|
+
match = values[0].split(" ");
|
|
10436
|
+
if (match.length === 1) {
|
|
10437
|
+
if (match[0].indexOf(" ") != -1) {
|
|
10438
|
+
match = values[0].match(/(\d+|[A-z]+)/g);
|
|
10439
|
+
}
|
|
10440
|
+
else {
|
|
10441
|
+
match[0] = values[0].slice(0, -2);
|
|
10442
|
+
match[1] = values[0].slice(-2);
|
|
10443
|
+
}
|
|
10444
|
+
}
|
|
10445
|
+
}
|
|
10446
|
+
else {
|
|
10447
|
+
match[0] = values[0];
|
|
10448
|
+
}
|
|
10449
|
+
}
|
|
10369
10450
|
var isExist = _this.parent.viewType === 'ResourceView' ? ids.indexOf('T' + match[0]) : ids.indexOf(match[0]);
|
|
10370
10451
|
/*Validate for appropriate predecessor*/
|
|
10371
10452
|
if (match[0] && isExist !== -1) {
|
|
@@ -10396,10 +10477,18 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10396
10477
|
offsetUnit: offsetUnits.durationUnit,
|
|
10397
10478
|
offset: offsetUnits.duration
|
|
10398
10479
|
};
|
|
10399
|
-
var
|
|
10400
|
-
|
|
10480
|
+
var fromData = _this.parent.connectorLineModule.getRecordByID(obj.to);
|
|
10481
|
+
var toData = _this.parent.connectorLineModule.getRecordByID(obj.from);
|
|
10482
|
+
var isValid;
|
|
10483
|
+
if (_this.parent.connectorLineEditModule && toData && fromData) {
|
|
10484
|
+
isValid = _this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
|
|
10485
|
+
if (isValid)
|
|
10486
|
+
collection.push(obj);
|
|
10487
|
+
}
|
|
10488
|
+
else {
|
|
10401
10489
|
collection.push(obj);
|
|
10402
10490
|
}
|
|
10491
|
+
match.splice(0);
|
|
10403
10492
|
});
|
|
10404
10493
|
return collection;
|
|
10405
10494
|
};
|
|
@@ -10414,6 +10503,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10414
10503
|
var predecessors = data.ganttProperties.predecessor;
|
|
10415
10504
|
var durationUnitTexts = this.parent.durationUnitTexts;
|
|
10416
10505
|
var resultString = '';
|
|
10506
|
+
var temp1;
|
|
10507
|
+
var match;
|
|
10508
|
+
match = [];
|
|
10417
10509
|
if (predecessors) {
|
|
10418
10510
|
var length_1 = predecessors.length;
|
|
10419
10511
|
for (var i = 0; i < length_1; i++) {
|
|
@@ -10423,6 +10515,15 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10423
10515
|
: data.ganttProperties.rowUniqueID;
|
|
10424
10516
|
if (currentValue.from !== id.toString()) {
|
|
10425
10517
|
temp = currentValue.from + currentValue.type;
|
|
10518
|
+
if (typeof (data.ganttProperties.taskId) === "string") {
|
|
10519
|
+
match[0] = temp.slice(0, -2);
|
|
10520
|
+
match[1] = temp.slice(-2);
|
|
10521
|
+
temp1 = match[0] + " " + match[1];
|
|
10522
|
+
}
|
|
10523
|
+
else {
|
|
10524
|
+
temp1 = temp;
|
|
10525
|
+
}
|
|
10526
|
+
temp = temp1;
|
|
10426
10527
|
if (currentValue.offset !== 0) {
|
|
10427
10528
|
temp += currentValue.offset > 0 ? ('+' + currentValue.offset + ' ') : (currentValue.offset + ' ');
|
|
10428
10529
|
var multiple = currentValue.offset !== 1;
|
|
@@ -10510,9 +10611,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10510
10611
|
var length = predecessorsCollection.length;
|
|
10511
10612
|
for (var count = 0; count < length; count++) {
|
|
10512
10613
|
ganttRecord = predecessorsCollection[count];
|
|
10513
|
-
|
|
10514
|
-
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
10515
|
-
}
|
|
10614
|
+
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
10516
10615
|
}
|
|
10517
10616
|
};
|
|
10518
10617
|
/**
|
|
@@ -10562,9 +10661,22 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10562
10661
|
*/
|
|
10563
10662
|
Dependency.prototype.updatedRecordsDateByPredecessor = function () {
|
|
10564
10663
|
var flatData = this.parent.flatData;
|
|
10565
|
-
|
|
10664
|
+
var totLength = this.parent.flatData.length;
|
|
10665
|
+
for (var count = 0; count < totLength; count++) {
|
|
10566
10666
|
if (flatData[count].ganttProperties.predecessor) {
|
|
10567
10667
|
this.validatePredecessorDates(flatData[count]);
|
|
10668
|
+
if (flatData[count].hasChildRecords && this.parent.editModule) {
|
|
10669
|
+
this.parent.editModule['updateChildItems'](flatData[count]);
|
|
10670
|
+
}
|
|
10671
|
+
}
|
|
10672
|
+
}
|
|
10673
|
+
};
|
|
10674
|
+
Dependency.prototype.updateParentPredecessor = function () {
|
|
10675
|
+
if (this.parent.enablePredecessorValidation) {
|
|
10676
|
+
var parentPredecessorLength = this.parentPredecessors.length;
|
|
10677
|
+
for (var i = parentPredecessorLength - 1; i >= 0; i--) {
|
|
10678
|
+
var item = this.parentPredecessors[i];
|
|
10679
|
+
this.validatePredecessorDates(item);
|
|
10568
10680
|
}
|
|
10569
10681
|
}
|
|
10570
10682
|
};
|
|
@@ -10595,6 +10707,10 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10595
10707
|
var predecessor = predecessors[count];
|
|
10596
10708
|
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor.from);
|
|
10597
10709
|
record = this.parent.connectorLineModule.getRecordByID(predecessor.to);
|
|
10710
|
+
if (this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
|
|
10711
|
+
&& (ganttRecord.hasChildRecords || record.hasChildRecords)) {
|
|
10712
|
+
this.parentPredecessors.push(ganttRecord);
|
|
10713
|
+
}
|
|
10598
10714
|
if (record.ganttProperties.isAutoSchedule || this.parent.validateManualTasksOnLinking) {
|
|
10599
10715
|
this.validateChildGanttRecord(parentGanttRecord, record);
|
|
10600
10716
|
}
|
|
@@ -10635,8 +10751,8 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10635
10751
|
this.dateValidateModule.calculateEndDate(childGanttRecord);
|
|
10636
10752
|
}
|
|
10637
10753
|
this.parent.dataOperation.updateWidthLeft(childGanttRecord);
|
|
10638
|
-
if (childGanttRecord.parentItem && this.parent.
|
|
10639
|
-
|
|
10754
|
+
if (!this.parent.isLoad && childGanttRecord.parentItem && this.parent.isInPredecessorValidation &&
|
|
10755
|
+
this.parent.getParentTask(childGanttRecord.parentItem).ganttProperties.isAutoSchedule) {
|
|
10640
10756
|
if (this.parentIds.indexOf(childGanttRecord.parentItem.uniqueID) === -1) {
|
|
10641
10757
|
this.parentIds.push(childGanttRecord.parentItem.uniqueID);
|
|
10642
10758
|
this.parentRecord.push(childGanttRecord.parentItem);
|
|
@@ -10993,8 +11109,19 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
10993
11109
|
*/
|
|
10994
11110
|
ConnectorLine.prototype.createConnectorLineObject = function (parentGanttData, childGanttData, predecessor) {
|
|
10995
11111
|
var connectorObj = {};
|
|
10996
|
-
var updatedRecords
|
|
10997
|
-
|
|
11112
|
+
var updatedRecords;
|
|
11113
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport) {
|
|
11114
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].exportType &&
|
|
11115
|
+
this.parent.pdfExportModule['helper']['exportProps'].exportType === 'CurrentViewData') {
|
|
11116
|
+
updatedRecords = this.expandedRecords;
|
|
11117
|
+
}
|
|
11118
|
+
else {
|
|
11119
|
+
updatedRecords = this.parent.flatData;
|
|
11120
|
+
}
|
|
11121
|
+
}
|
|
11122
|
+
else {
|
|
11123
|
+
updatedRecords = this.expandedRecords;
|
|
11124
|
+
}
|
|
10998
11125
|
var parentIndex = updatedRecords.indexOf(parentGanttData);
|
|
10999
11126
|
var childIndex = updatedRecords.indexOf(childGanttData);
|
|
11000
11127
|
var parentGanttRecord = parentGanttData.ganttProperties;
|
|
@@ -11317,6 +11444,63 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11317
11444
|
isMilestoneValue = (data.milestoneParent && data.milestoneChild) ? 0 : data.milestoneParent ? -5 : data.milestoneChild ? 5 : 0;
|
|
11318
11445
|
}
|
|
11319
11446
|
var heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
|
|
11447
|
+
var borderTopWidth = 0;
|
|
11448
|
+
var addTop = 0;
|
|
11449
|
+
if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex]) {
|
|
11450
|
+
var fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
|
|
11451
|
+
var toRecordIsParent = this.parent.currentViewData[data.childIndex].hasChildRecords;
|
|
11452
|
+
var fromRecordIsManual = this.parent.currentViewData[data.parentIndex].ganttProperties.isAutoSchedule;
|
|
11453
|
+
var toRecordIsManual = this.parent.currentViewData[data.childIndex].ganttProperties.isAutoSchedule;
|
|
11454
|
+
var isValid = true;
|
|
11455
|
+
if (((fromRecordIsParent && fromRecordIsManual) && !toRecordIsParent) || ((toRecordIsParent && toRecordIsManual) &&
|
|
11456
|
+
!fromRecordIsParent) || (fromRecordIsParent && fromRecordIsManual && toRecordIsManual && toRecordIsParent)
|
|
11457
|
+
|| (!fromRecordIsParent && !toRecordIsParent)) {
|
|
11458
|
+
isValid = false;
|
|
11459
|
+
}
|
|
11460
|
+
if (isValid) {
|
|
11461
|
+
if (((fromRecordIsParent && !fromRecordIsManual) && (toRecordIsParent && !toRecordIsManual))) {
|
|
11462
|
+
addTop = -11;
|
|
11463
|
+
}
|
|
11464
|
+
else if (!((fromRecordIsParent && !fromRecordIsManual) && (toRecordIsParent && !toRecordIsManual))) {
|
|
11465
|
+
if (data.childIndex > data.parentIndex) {
|
|
11466
|
+
if (!fromRecordIsParent && toRecordIsParent) {
|
|
11467
|
+
borderTopWidth = -11;
|
|
11468
|
+
}
|
|
11469
|
+
else {
|
|
11470
|
+
borderTopWidth = 11;
|
|
11471
|
+
addTop = -11;
|
|
11472
|
+
}
|
|
11473
|
+
}
|
|
11474
|
+
else {
|
|
11475
|
+
if ((fromRecordIsParent && !toRecordIsParent)) {
|
|
11476
|
+
borderTopWidth = -11;
|
|
11477
|
+
}
|
|
11478
|
+
else {
|
|
11479
|
+
borderTopWidth = 11;
|
|
11480
|
+
addTop = -11;
|
|
11481
|
+
}
|
|
11482
|
+
}
|
|
11483
|
+
}
|
|
11484
|
+
if (this.parent.currentViewData[data.parentIndex].ganttProperties.isMilestone) {
|
|
11485
|
+
if (data.parentIndex > data.childIndex) {
|
|
11486
|
+
addTop = -5;
|
|
11487
|
+
borderTopWidth = 10;
|
|
11488
|
+
}
|
|
11489
|
+
else if (data.type === 'SS' || data.type === 'FF') {
|
|
11490
|
+
addTop = -5;
|
|
11491
|
+
}
|
|
11492
|
+
}
|
|
11493
|
+
else if (this.parent.currentViewData[data.childIndex].ganttProperties.isMilestone) {
|
|
11494
|
+
if (data.parentIndex > data.childIndex) {
|
|
11495
|
+
addTop = 5;
|
|
11496
|
+
borderTopWidth = -10;
|
|
11497
|
+
}
|
|
11498
|
+
else if (data.type === 'SS' || data.type === 'FF') {
|
|
11499
|
+
addTop = 5;
|
|
11500
|
+
}
|
|
11501
|
+
}
|
|
11502
|
+
}
|
|
11503
|
+
}
|
|
11320
11504
|
if (this.getParentPosition(data)) {
|
|
11321
11505
|
connectorContainer = '<div id="ConnectorLine' + data.connectorLineId + '" style="background-color:black">';
|
|
11322
11506
|
var div = '<div class="' + connectorLineContainer +
|
|
@@ -11336,7 +11520,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11336
11520
|
'border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div>';
|
|
11337
11521
|
var duplicateStingThree = this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>' + eLine +
|
|
11338
11522
|
'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11339
|
-
this.getBorderStyles('top', (heightValue - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11523
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11340
11524
|
var duplicateStingFour = leftArrow + 'left:' +
|
|
11341
11525
|
(((data.childLeft + data.childWidth) - (data.parentLeft)) + 10) + 'px;' +
|
|
11342
11526
|
this.getBorderStyles('right', 10);
|
|
@@ -11344,7 +11528,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11344
11528
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11345
11529
|
if (this.getParentPosition(data) === 'FSType1') {
|
|
11346
11530
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11347
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11531
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11348
11532
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
|
|
11349
11533
|
div = div + eLine;
|
|
11350
11534
|
div = div + 'left:' + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
|
|
@@ -11354,7 +11538,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11354
11538
|
div = div + eLine;
|
|
11355
11539
|
div = div + 'left:' + ((data.childLeft - (data.parentLeft + data.parentWidth + 10)) - 10) + 'px;' +
|
|
11356
11540
|
'width:0px;' + this.getBorderStyles('right', this.lineStroke) +
|
|
11357
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11541
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11358
11542
|
div = div + eLine;
|
|
11359
11543
|
div = div + 'left:' + ((data.childLeft - (data.parentLeft + data.parentWidth + 10)) - 10) + 'px;width:10px;' +
|
|
11360
11544
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11364,7 +11548,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11364
11548
|
'px;border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div></div>';
|
|
11365
11549
|
}
|
|
11366
11550
|
if (this.getParentPosition(data) === 'FSType2') {
|
|
11367
|
-
div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) +
|
|
11551
|
+
div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) + addTop +
|
|
11368
11552
|
this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11369
11553
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
|
|
11370
11554
|
div = div + eLine;
|
|
@@ -11374,7 +11558,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11374
11558
|
div = div + eLine;
|
|
11375
11559
|
div = div + 'left:' + (data.parentWidth + 10 - this.lineStroke) + 'px;' +
|
|
11376
11560
|
this.getBorderStyles('left', this.lineStroke) + 'width:0px;' +
|
|
11377
|
-
this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11561
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11378
11562
|
div = div + eLine;
|
|
11379
11563
|
div = div + 'left:' + (data.parentWidth - (((data.parentLeft + data.parentWidth) - data.childLeft) + 20)) + 'px;' +
|
|
11380
11564
|
'width:' + (((data.parentLeft + data.parentWidth) - data.childLeft) + 30) + 'px;' +
|
|
@@ -11396,7 +11580,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11396
11580
|
}
|
|
11397
11581
|
if (this.getParentPosition(data) === 'FSType3') {
|
|
11398
11582
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11399
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11583
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11400
11584
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
|
|
11401
11585
|
div = div + rightArrow;
|
|
11402
11586
|
div = div + 'left:10px;' + this.getBorderStyles('left', 10) +
|
|
@@ -11406,7 +11590,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11406
11590
|
div = div + 'width:10px;' + this.getBorderStyles('top', this.lineStroke) +
|
|
11407
11591
|
'position:relative;top:' + (-(6 + (5 + this.lineStroke) + Math.round(this.lineStroke / 2))) + 'px;"></div>';
|
|
11408
11592
|
div = div + eLine;
|
|
11409
|
-
div = div + 'width:' + this.lineStroke + 'px;' + this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke + 1)) +
|
|
11593
|
+
div = div + 'width:' + this.lineStroke + 'px;' + this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke + 1)) +
|
|
11410
11594
|
'position:relative;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;"></div>';
|
|
11411
11595
|
div = div + eLine;
|
|
11412
11596
|
div = div + 'width:' + (((data.parentLeft + data.parentWidth) - data.childLeft) + 30) + 'px;' +
|
|
@@ -11426,7 +11610,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11426
11610
|
}
|
|
11427
11611
|
if (this.getParentPosition(data) === 'FSType4') {
|
|
11428
11612
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11429
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11613
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11430
11614
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
|
|
11431
11615
|
div = div + rightArrow;
|
|
11432
11616
|
div = div + 'left:' + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
|
|
@@ -11442,7 +11626,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11442
11626
|
div = div + 'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;left:' +
|
|
11443
11627
|
(data.childLeft - (data.parentLeft + data.parentWidth) - 20) + 'px;width:0px;' +
|
|
11444
11628
|
this.getBorderStyles('left', this.lineStroke) +
|
|
11445
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11629
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11446
11630
|
div = div + eLine;
|
|
11447
11631
|
div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'top:' +
|
|
11448
11632
|
(-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
@@ -11452,7 +11636,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11452
11636
|
}
|
|
11453
11637
|
if (this.getParentPosition(data) === 'SSType4') {
|
|
11454
11638
|
div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11455
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11639
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11456
11640
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
|
|
11457
11641
|
div = div + rightArrow;
|
|
11458
11642
|
div = div + 'left:' + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
|
|
@@ -11465,7 +11649,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11465
11649
|
}
|
|
11466
11650
|
if (this.getParentPosition(data) === 'SSType3') {
|
|
11467
11651
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11468
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11652
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11469
11653
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
|
|
11470
11654
|
div = div + rightArrow;
|
|
11471
11655
|
div = div + 'left:10px;' + duplicateStingTwo;
|
|
@@ -11478,14 +11662,14 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11478
11662
|
}
|
|
11479
11663
|
if (this.getParentPosition(data) === 'SSType2') {
|
|
11480
11664
|
div = div + 'left:' + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11481
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11665
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11482
11666
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
|
|
11483
11667
|
div = div + eLine;
|
|
11484
11668
|
div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
|
|
11485
11669
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11486
11670
|
div = div + eLine;
|
|
11487
11671
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11488
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11672
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11489
11673
|
div = div + eLine;
|
|
11490
11674
|
div = div + 'width:' + setInnerElementWidthSSType2 + 'px;' +
|
|
11491
11675
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11498,7 +11682,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11498
11682
|
}
|
|
11499
11683
|
if (this.getParentPosition(data) === 'SSType1') {
|
|
11500
11684
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11501
|
-
((data.parentIndex * data.rowHeight) +
|
|
11685
|
+
((data.parentIndex * data.rowHeight) + addTop +
|
|
11502
11686
|
this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11503
11687
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
|
|
11504
11688
|
div = div + eLine;
|
|
@@ -11506,7 +11690,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11506
11690
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11507
11691
|
div = div + eLine;
|
|
11508
11692
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11509
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11693
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11510
11694
|
div = div + eLine;
|
|
11511
11695
|
div = div + 'width:10px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11512
11696
|
div = div + rightArrow;
|
|
@@ -11516,7 +11700,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11516
11700
|
}
|
|
11517
11701
|
if (this.getParentPosition(data) === 'FFType1') {
|
|
11518
11702
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11519
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11703
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11520
11704
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
|
|
11521
11705
|
div = div + eLine;
|
|
11522
11706
|
div = div + 'left:' + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
|
|
@@ -11527,7 +11711,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11527
11711
|
div = div + eLine;
|
|
11528
11712
|
div = div + 'left:' + (((data.parentLeft + data.parentWidth) -
|
|
11529
11713
|
(data.childLeft + data.childWidth)) + 20) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11530
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11714
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11531
11715
|
div = div + eLine;
|
|
11532
11716
|
div = div + 'left:' + (isMilestone ? 4 : 10) + 'px;width:' + (isMilestone ?
|
|
11533
11717
|
(((data.parentLeft + data.parentWidth) - (data.childLeft + data.childWidth)) + (16 + this.lineStroke)) :
|
|
@@ -11540,7 +11724,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11540
11724
|
}
|
|
11541
11725
|
if (this.getParentPosition(data) === 'FFType2') {
|
|
11542
11726
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11543
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11727
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11544
11728
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
|
|
11545
11729
|
div = div + eLine;
|
|
11546
11730
|
div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'width:' +
|
|
@@ -11551,7 +11735,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11551
11735
|
div = div + eLine;
|
|
11552
11736
|
div = div + 'left:' + (((data.childLeft + data.childWidth) - (data.parentLeft + data.parentWidth)) + 20) +
|
|
11553
11737
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11554
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) +
|
|
11738
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) +
|
|
11555
11739
|
'position:relative;"></div>';
|
|
11556
11740
|
div = div + eLine;
|
|
11557
11741
|
div = div + 'left:' + (isMilestone ? (((data.childLeft + data.childWidth) - (data.parentLeft + data.parentWidth)) + 4) :
|
|
@@ -11566,7 +11750,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11566
11750
|
}
|
|
11567
11751
|
if (this.getParentPosition(data) === 'FFType3') {
|
|
11568
11752
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11569
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11753
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11570
11754
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
|
|
11571
11755
|
div = div + duplicateStingOne;
|
|
11572
11756
|
div = div + eLine;
|
|
@@ -11579,7 +11763,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11579
11763
|
div = div + 'left:' + (((data.parentLeft + data.parentWidth) - (data.childLeft + data.childWidth)) + 20) +
|
|
11580
11764
|
'px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;' +
|
|
11581
11765
|
'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11582
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11766
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11583
11767
|
div = div + eLine;
|
|
11584
11768
|
div = div + (isMilestoneParent ? ('left:' + (((data.parentLeft + data.parentWidth) -
|
|
11585
11769
|
(data.childLeft + data.childWidth)) - 1) + 'px;width:21') : ('left:' + ((data.parentLeft + data.parentWidth) -
|
|
@@ -11589,7 +11773,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11589
11773
|
}
|
|
11590
11774
|
if (this.getParentPosition(data) === 'FFType4') {
|
|
11591
11775
|
div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11592
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11776
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11593
11777
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
|
|
11594
11778
|
div = div + leftArrow;
|
|
11595
11779
|
div = div + ('left:' + ((data.childLeft + data.childWidth) -
|
|
@@ -11608,7 +11792,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11608
11792
|
div = div + 'left:' + (((data.childLeft + data.childWidth) -
|
|
11609
11793
|
(data.parentLeft + data.parentWidth)) + 20) + 'px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) +
|
|
11610
11794
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11611
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11795
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11612
11796
|
div = div + eLine;
|
|
11613
11797
|
div = div + (isMilestoneParent ? ('left:-1px;width:' + (((data.childLeft + data.childWidth) -
|
|
11614
11798
|
(data.parentLeft + data.parentWidth)) + (21 + this.lineStroke))) : ('width:' + (((data.childLeft + data.childWidth) -
|
|
@@ -11618,7 +11802,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11618
11802
|
}
|
|
11619
11803
|
if (this.getParentPosition(data) === 'SFType4') {
|
|
11620
11804
|
div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11621
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
11805
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
11622
11806
|
'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
|
|
11623
11807
|
div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
|
|
11624
11808
|
'border-bottom-width:' + (5 + this.lineStroke) +
|
|
@@ -11631,7 +11815,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11631
11815
|
div = div + eLine;
|
|
11632
11816
|
div = div + 'left:' + (((data.childLeft + data.childWidth) - (data.parentLeft)) + 30) + 'px;top:' +
|
|
11633
11817
|
(-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11634
|
-
this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11818
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11635
11819
|
div = div + eLine;
|
|
11636
11820
|
div = div + 'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
11637
11821
|
(((data.childLeft + data.childWidth) - (data.parentLeft)) + (30 + this.lineStroke)) + 'px;' +
|
|
@@ -11646,7 +11830,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11646
11830
|
}
|
|
11647
11831
|
if (this.getParentPosition(data) === 'SFType3') {
|
|
11648
11832
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11649
|
-
((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11833
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11650
11834
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
|
|
11651
11835
|
div = div + duplicateStingOne;
|
|
11652
11836
|
div = div + eLine;
|
|
@@ -11656,7 +11840,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11656
11840
|
div = div + eLine;
|
|
11657
11841
|
div = div + 'left:20px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' +
|
|
11658
11842
|
this.getBorderStyles('left', this.lineStroke) +
|
|
11659
|
-
this.getBorderStyles('top', (heightValue - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11843
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11660
11844
|
div = div + eLine;
|
|
11661
11845
|
div = div + 'left:20px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
11662
11846
|
((data.parentLeft - (data.childLeft + data.childWidth + 20)) + this.lineStroke) + 'px;' +
|
|
@@ -11664,13 +11848,13 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11664
11848
|
}
|
|
11665
11849
|
if (this.getParentPosition(data) === 'SFType1') {
|
|
11666
11850
|
div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11667
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11851
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11668
11852
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
|
|
11669
11853
|
div = div + eLine;
|
|
11670
11854
|
div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11671
11855
|
div = div + eLine;
|
|
11672
11856
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11673
|
-
this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11857
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11674
11858
|
div = div + eLine;
|
|
11675
11859
|
div = div + 'width:' + (((data.childLeft + data.childWidth) - (data.parentLeft)) + (30 + this.lineStroke)) + 'px;' +
|
|
11676
11860
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11689,7 +11873,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11689
11873
|
}
|
|
11690
11874
|
if (this.getParentPosition(data) === 'SFType2') {
|
|
11691
11875
|
div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11692
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11876
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11693
11877
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
|
|
11694
11878
|
div = div + eLine;
|
|
11695
11879
|
div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
@@ -11697,7 +11881,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11697
11881
|
div = div + eLine;
|
|
11698
11882
|
div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
11699
11883
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11700
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11884
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11701
11885
|
div = div + eLine;
|
|
11702
11886
|
div = div + (isMilestone ? ('left:4px;width:' + (((data.parentLeft) - (data.childLeft + data.childWidth))
|
|
11703
11887
|
- (14 - this.lineStroke))) : ('left:10px;width:' + (((data.parentLeft) -
|
|
@@ -11947,11 +12131,11 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
11947
12131
|
};
|
|
11948
12132
|
/**
|
|
11949
12133
|
* @param {SplitterSettingsModel} splitter .
|
|
11950
|
-
|
|
12134
|
+
|
|
11951
12135
|
* @returns {string} .
|
|
11952
12136
|
* @private
|
|
11953
12137
|
*/
|
|
11954
|
-
Splitter$$1.prototype.calculateSplitterPosition = function (splitter$$1
|
|
12138
|
+
Splitter$$1.prototype.calculateSplitterPosition = function (splitter$$1) {
|
|
11955
12139
|
if (!isNullOrUndefined(this.splitterObject) && this.parent.enablePersistence) {
|
|
11956
12140
|
return this.splitterObject.paneSettings[0].size;
|
|
11957
12141
|
}
|
|
@@ -11967,8 +12151,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
11967
12151
|
}
|
|
11968
12152
|
else if (!isNullOrUndefined(splitter$$1.columnIndex) && splitter$$1.columnIndex >= 0) {
|
|
11969
12153
|
if ((splitter$$1.columnIndex * 150) < this.parent.ganttWidth || !this.parent.element.classList.contains('e-device')) {
|
|
11970
|
-
return
|
|
11971
|
-
this.getSpliterPositionInPercentage((splitter$$1.columnIndex * 150) + 'px');
|
|
12154
|
+
return this.getSpliterPositionInPercentage(this.getTotalColumnWidthByIndex(splitter$$1.columnIndex).toString() + 'px');
|
|
11972
12155
|
}
|
|
11973
12156
|
else {
|
|
11974
12157
|
return this.getSpliterPositionInPercentage((splitter$$1.columnIndex * 130) + 'px');
|
|
@@ -12004,10 +12187,10 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
12004
12187
|
*/
|
|
12005
12188
|
Splitter$$1.prototype.getTotalColumnWidthByIndex = function (index) {
|
|
12006
12189
|
var width = 0;
|
|
12007
|
-
var tr = this.parent.
|
|
12190
|
+
var tr = this.parent.ganttColumns;
|
|
12008
12191
|
index = tr.length > index ? index : tr.length;
|
|
12009
12192
|
for (var column = 0; column < index; column++) {
|
|
12010
|
-
width = width + tr[column].
|
|
12193
|
+
width = width + parseInt(tr[column].width);
|
|
12011
12194
|
}
|
|
12012
12195
|
return width;
|
|
12013
12196
|
};
|
|
@@ -12018,7 +12201,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
12018
12201
|
Splitter$$1.prototype.updateSplitterPosition = function () {
|
|
12019
12202
|
this.splitterObject.separatorSize = this.parent.splitterSettings.separatorSize >= 4 ?
|
|
12020
12203
|
this.parent.splitterSettings.separatorSize : 4;
|
|
12021
|
-
var splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings
|
|
12204
|
+
var splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings);
|
|
12022
12205
|
this.splitterObject.paneSettings[0].min = this.getSpliterPositionInPercentage(this.parent.splitterSettings.minimum);
|
|
12023
12206
|
this.splitterObject.dataBind();
|
|
12024
12207
|
this.splitterObject.paneSettings[0].size = splitterPosition;
|
|
@@ -12196,6 +12379,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
12196
12379
|
args.cancel = true;
|
|
12197
12380
|
}
|
|
12198
12381
|
});
|
|
12382
|
+
this.toolTipObj.content = argsData.content;
|
|
12199
12383
|
if (!this.parent.isAdaptive && args.event.type === 'mouseover') {
|
|
12200
12384
|
this.currentTarget = args.target;
|
|
12201
12385
|
EventHandler.add(this.currentTarget, 'mousemove', this.mouseMoveHandler.bind(this));
|
|
@@ -12435,7 +12619,8 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
12435
12619
|
*/
|
|
12436
12620
|
Tooltip$$1.prototype.getPredecessorTooltipData = function (args) {
|
|
12437
12621
|
var predeceesorParent = args.target.parentElement.id;
|
|
12438
|
-
var taskIds = predeceesorParent.match(
|
|
12622
|
+
var taskIds = predeceesorParent.match(/ConnectorLineparent(.*)child(.*)/);
|
|
12623
|
+
taskIds.shift();
|
|
12439
12624
|
var fromTask;
|
|
12440
12625
|
var toTask;
|
|
12441
12626
|
if (this.parent.viewType === 'ResourceView') {
|
|
@@ -12731,7 +12916,7 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
12731
12916
|
if (ganttObj.selectionSettings.mode !== 'Cell' && ganttObj.selectedRowIndex !== -1) {
|
|
12732
12917
|
var selectedItem = ganttObj.currentViewData[ganttObj.selectedRowIndex];
|
|
12733
12918
|
var focusedRowIndex = this.parent.ganttChartModule.focusedRowIndex;
|
|
12734
|
-
var selectingRowIndex =
|
|
12919
|
+
var selectingRowIndex = expandedRecords.indexOf(selectedItem);
|
|
12735
12920
|
var currentSelectingRecord = e.action === 'downArrow' ? expandedRecords[selectingRowIndex + 1] :
|
|
12736
12921
|
expandedRecords[selectingRowIndex - 1];
|
|
12737
12922
|
ganttObj.selectionModule.selectRow(ganttObj.currentViewData.indexOf(currentSelectingRecord), false, true);
|
|
@@ -13144,6 +13329,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13144
13329
|
if (this.enableValidation) {
|
|
13145
13330
|
this.dataOperation.updateGanttData();
|
|
13146
13331
|
}
|
|
13332
|
+
this.predecessorModule.updateParentPredecessor();
|
|
13147
13333
|
if (this.dataSource instanceof Object && isCountRequired(this)) {
|
|
13148
13334
|
var count = getValue('count', this.dataSource);
|
|
13149
13335
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
@@ -13156,6 +13342,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13156
13342
|
if (this.enableValidation) {
|
|
13157
13343
|
this.dataOperation.updateGanttData();
|
|
13158
13344
|
}
|
|
13345
|
+
this.predecessorModule.updateParentPredecessor();
|
|
13159
13346
|
this.treeGridPane.classList.remove('e-temp-content');
|
|
13160
13347
|
remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
|
|
13161
13348
|
this.notify('dataReady', {});
|
|
@@ -13467,7 +13654,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13467
13654
|
{
|
|
13468
13655
|
topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
|
|
13469
13656
|
bottomTier: { unit: 'Minutes', format: 'mm', count: 30 }, timelineUnitSize: 66, level: 22,
|
|
13470
|
-
timelineViewMode: 'Hour', weekStartDay:
|
|
13657
|
+
timelineViewMode: 'Hour', weekStartDay: 0, updateTimescaleView: true, weekendBackground: null, showTooltip: true
|
|
13471
13658
|
},
|
|
13472
13659
|
{
|
|
13473
13660
|
topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
|
|
@@ -14808,7 +14995,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14808
14995
|
Gantt.prototype.setSplitterPosition = function (value, type) {
|
|
14809
14996
|
var tempSplitterSettings = {};
|
|
14810
14997
|
tempSplitterSettings[type] = value;
|
|
14811
|
-
var splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings
|
|
14998
|
+
var splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings);
|
|
14812
14999
|
var pane1 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[0];
|
|
14813
15000
|
var pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
|
|
14814
15001
|
this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
|
|
@@ -14890,7 +15077,10 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14890
15077
|
if (this.viewType === 'ResourceView') {
|
|
14891
15078
|
this.editModule.addRowPosition = rowPosition;
|
|
14892
15079
|
this.editModule.addRowIndex = rowIndex;
|
|
14893
|
-
var resources =
|
|
15080
|
+
var resources = void 0;
|
|
15081
|
+
if (!isNullOrUndefined(data)) {
|
|
15082
|
+
resources = data[this.taskFields.resourceInfo];
|
|
15083
|
+
}
|
|
14894
15084
|
var id = void 0;
|
|
14895
15085
|
var parentTask = void 0;
|
|
14896
15086
|
if (!isNullOrUndefined(resources) && resources.length) {
|
|
@@ -15157,7 +15347,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15157
15347
|
if (isNullOrUndefined(index)) {
|
|
15158
15348
|
record = this.getRecordByID(id.toString());
|
|
15159
15349
|
chartRow$$1 = this.getRowByID(id);
|
|
15160
|
-
|
|
15350
|
+
if (!isNullOrUndefined(chartRow$$1)) {
|
|
15351
|
+
rowIndex = getValue('rowIndex', chartRow$$1);
|
|
15352
|
+
}
|
|
15161
15353
|
}
|
|
15162
15354
|
else if (!isNullOrUndefined(index)) {
|
|
15163
15355
|
chartRow$$1 = this.getRowByIndex(index);
|
|
@@ -15388,6 +15580,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15388
15580
|
*/
|
|
15389
15581
|
Gantt.prototype.showColumn = function (keys, showBy) {
|
|
15390
15582
|
this.treeGrid.showColumns(keys, showBy);
|
|
15583
|
+
this.updateTreeColumns();
|
|
15391
15584
|
};
|
|
15392
15585
|
/**
|
|
15393
15586
|
* Hides a column by column name.
|
|
@@ -15399,6 +15592,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15399
15592
|
*/
|
|
15400
15593
|
Gantt.prototype.hideColumn = function (keys, hideBy) {
|
|
15401
15594
|
this.treeGrid.hideColumns(keys, hideBy);
|
|
15595
|
+
this.updateTreeColumns();
|
|
15402
15596
|
};
|
|
15403
15597
|
/**
|
|
15404
15598
|
* To set scroll top for chart scroll container.
|
|
@@ -16135,8 +16329,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
16135
16329
|
}
|
|
16136
16330
|
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
16137
16331
|
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
16138
|
-
|| field === taskSettings.
|
|
16139
|
-
|| field === taskSettings.work || field === 'taskType')) {
|
|
16332
|
+
|| field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
16140
16333
|
args.cancel = true;
|
|
16141
16334
|
}
|
|
16142
16335
|
else {
|
|
@@ -16966,6 +17159,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16966
17159
|
}
|
|
16967
17160
|
};
|
|
16968
17161
|
TaskbarEdit.prototype.mouseClickHandler = function (e) {
|
|
17162
|
+
if (!this.parent.editSettings.allowTaskbarEditing) {
|
|
17163
|
+
return;
|
|
17164
|
+
}
|
|
16969
17165
|
var targetElement = this.getElementByPosition(e);
|
|
16970
17166
|
var element = parentsUntil$1(targetElement, taskBarMainContainer);
|
|
16971
17167
|
if (this.parent.selectionModule && this.parent.selectionModule.enableSelectMultiTouch) {
|
|
@@ -17498,10 +17694,13 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
17498
17694
|
var _this = this;
|
|
17499
17695
|
this.stopScrollTimer();
|
|
17500
17696
|
this.scrollTimer = window.setInterval(function () {
|
|
17501
|
-
if (direction === 'right'
|
|
17697
|
+
if (direction === 'right') {
|
|
17502
17698
|
_this.timerCount = (_this.timerCount + 1) >= _this.parent.timelineModule.totalTimelineWidth ?
|
|
17503
17699
|
_this.parent.timelineModule.totalTimelineWidth : (_this.timerCount + 1);
|
|
17504
17700
|
}
|
|
17701
|
+
else if (direction === 'bottom') {
|
|
17702
|
+
_this.timerCount = _this.timerCount + 1;
|
|
17703
|
+
}
|
|
17505
17704
|
else {
|
|
17506
17705
|
_this.timerCount = (_this.timerCount - 1) < 0 ? 0 : (_this.timerCount - 1);
|
|
17507
17706
|
}
|
|
@@ -18609,8 +18808,14 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18609
18808
|
}
|
|
18610
18809
|
if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
|
|
18611
18810
|
!this.elementOffsetLeft) || !this.parent.enableVirtualization) {
|
|
18612
|
-
|
|
18613
|
-
|
|
18811
|
+
if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
|
|
18812
|
+
this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
|
|
18813
|
+
this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
18814
|
+
}
|
|
18815
|
+
else {
|
|
18816
|
+
this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
|
|
18817
|
+
this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
|
|
18818
|
+
}
|
|
18614
18819
|
this.elementOffsetWidth = this.taskBarEditElement.offsetWidth;
|
|
18615
18820
|
this.elementOffsetHeight = this.taskBarEditElement.offsetHeight;
|
|
18616
18821
|
}
|
|
@@ -18779,6 +18984,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18779
18984
|
this.addedRecord = null;
|
|
18780
18985
|
this.dialogEditValidationFlag = false;
|
|
18781
18986
|
this.ganttResources = [];
|
|
18987
|
+
this.isValidData = true;
|
|
18782
18988
|
/**
|
|
18783
18989
|
* @private
|
|
18784
18990
|
*/
|
|
@@ -19020,7 +19226,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19020
19226
|
tempData[field] = 0;
|
|
19021
19227
|
tempData.ganttProperties.work = tempData[field];
|
|
19022
19228
|
}
|
|
19023
|
-
else if (columns[i].field ===
|
|
19229
|
+
else if (columns[i].field === taskSettings.type) {
|
|
19024
19230
|
tempData[field] = this.parent.taskType;
|
|
19025
19231
|
tempData.ganttProperties.taskType = tempData[field];
|
|
19026
19232
|
}
|
|
@@ -19063,6 +19269,24 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19063
19269
|
*/
|
|
19064
19270
|
DialogEdit.prototype.openEditDialog = function (taskId) {
|
|
19065
19271
|
var ganttObj = this.parent;
|
|
19272
|
+
if (!isNullOrUndefined(taskId)) {
|
|
19273
|
+
if (!isNullOrUndefined(taskId['ganttProperties'])) {
|
|
19274
|
+
if (typeof taskId['ganttProperties']['taskId'] === 'string') {
|
|
19275
|
+
this.numericOrString = "stringedit";
|
|
19276
|
+
}
|
|
19277
|
+
else {
|
|
19278
|
+
this.numericOrString = "numericedit";
|
|
19279
|
+
}
|
|
19280
|
+
}
|
|
19281
|
+
if (isNullOrUndefined(taskId['ganttProperties']) && !isNullOrUndefined(taskId)) {
|
|
19282
|
+
if (isNaN(Number(taskId)) || this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
19283
|
+
this.numericOrString = "stringedit";
|
|
19284
|
+
}
|
|
19285
|
+
else {
|
|
19286
|
+
this.numericOrString = "numericedit";
|
|
19287
|
+
}
|
|
19288
|
+
}
|
|
19289
|
+
}
|
|
19066
19290
|
if (typeof taskId === 'object' && !isNullOrUndefined(taskId)) {
|
|
19067
19291
|
this.rowIndex = this.parent.currentViewData.indexOf(taskId);
|
|
19068
19292
|
if (this.rowIndex > -1) {
|
|
@@ -19097,11 +19321,11 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19097
19321
|
this.beforeOpenArgs.rowIndex = this.rowIndex;
|
|
19098
19322
|
var dialogMaxWidth = this.parent.isAdaptive ? '' : '600px';
|
|
19099
19323
|
var dialog = this.parent.createElement('div', { id: ganttObj.element.id + '_dialog', styles: 'max-width:' + dialogMaxWidth });
|
|
19324
|
+
dialog.classList.add('e-gantt-dialog');
|
|
19100
19325
|
ganttObj.element.appendChild(dialog);
|
|
19101
19326
|
dialogModel.animationSettings = { effect: 'None' };
|
|
19102
19327
|
dialogModel.header = this.localeObj.getConstant(this.isEdit ? 'editDialogTitle' : 'addDialogTitle');
|
|
19103
19328
|
dialogModel.isModal = true;
|
|
19104
|
-
dialogModel.cssClass = 'e-gantt-dialog';
|
|
19105
19329
|
dialogModel.allowDragging = this.parent.isAdaptive ? false : true;
|
|
19106
19330
|
dialogModel.showCloseIcon = true;
|
|
19107
19331
|
var position = this.parent.isAdaptive ? { X: 'top', Y: 'left' } : { X: 'center', Y: 'center' };
|
|
@@ -19456,6 +19680,13 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19456
19680
|
placeholder: column.headerText,
|
|
19457
19681
|
floatLabelType: 'Auto'
|
|
19458
19682
|
};
|
|
19683
|
+
if (!isNullOrUndefined(this.parent.taskFields.id) && !isNullOrUndefined(this.parent.columnMapping.id)
|
|
19684
|
+
&& !isNullOrUndefined(this.numericOrString)) {
|
|
19685
|
+
if (taskSettings.id === column.field) {
|
|
19686
|
+
column.editType = this.numericOrString;
|
|
19687
|
+
}
|
|
19688
|
+
}
|
|
19689
|
+
|
|
19459
19690
|
switch (column.editType) {
|
|
19460
19691
|
case 'booleanedit':
|
|
19461
19692
|
{
|
|
@@ -19470,7 +19701,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19470
19701
|
case 'stringedit':
|
|
19471
19702
|
{
|
|
19472
19703
|
var textBox = common;
|
|
19473
|
-
if (column.field === ganttObj.columnMapping.duration || column.field === ganttObj.columnMapping.startDate ||
|
|
19704
|
+
if (column.field === ganttObj.columnMapping.duration || column.field === ganttObj.columnMapping.id || column.field === ganttObj.columnMapping.startDate ||
|
|
19474
19705
|
column.field === ganttObj.columnMapping.endDate) {
|
|
19475
19706
|
textBox.change = function (args) {
|
|
19476
19707
|
_this.validateScheduleFields(args, column, ganttObj);
|
|
@@ -19527,7 +19758,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19527
19758
|
break;
|
|
19528
19759
|
}
|
|
19529
19760
|
case 'dropdownedit':
|
|
19530
|
-
if (column.field ===
|
|
19761
|
+
if (column.field === ganttObj.columnMapping.type || column.field === ganttObj.columnMapping.manual) {
|
|
19531
19762
|
var dataKey = 'dataSource';
|
|
19532
19763
|
var fieldsKey = 'fields';
|
|
19533
19764
|
var types = [
|
|
@@ -19555,12 +19786,19 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19555
19786
|
return fieldsModel;
|
|
19556
19787
|
};
|
|
19557
19788
|
DialogEdit.prototype.validateScheduleFields = function (args, column, ganttObj) {
|
|
19558
|
-
var
|
|
19789
|
+
var _a;
|
|
19790
|
+
var dialog;
|
|
19791
|
+
if (!isNullOrUndefined(ganttObj.editModule.dialogModule.dialog)) {
|
|
19792
|
+
dialog = ganttObj.editModule.dialogModule.dialog;
|
|
19793
|
+
}
|
|
19559
19794
|
var targetId = null;
|
|
19560
19795
|
var inputElement;
|
|
19561
19796
|
var currentData = ganttObj.editModule.dialogModule.editedRecord;
|
|
19562
19797
|
var cellValue = null;
|
|
19563
19798
|
var colName = null;
|
|
19799
|
+
var formObject;
|
|
19800
|
+
var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
19801
|
+
var strViewType = this.parent.viewType;
|
|
19564
19802
|
if (!isNullOrUndefined(args.element)) {
|
|
19565
19803
|
inputElement = args.element;
|
|
19566
19804
|
targetId = inputElement.getAttribute('id');
|
|
@@ -19582,6 +19820,20 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19582
19820
|
else {
|
|
19583
19821
|
cellValue = inputElement.value;
|
|
19584
19822
|
colName = targetId.replace(ganttObj.element.id, '');
|
|
19823
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
19824
|
+
var customFn = function (args) {
|
|
19825
|
+
if (strViewType === 'ResourceView') {
|
|
19826
|
+
return ids.indexOf('T' + args['value']) === -1 && ids.indexOf('R' + args['value']) === -1;
|
|
19827
|
+
}
|
|
19828
|
+
else {
|
|
19829
|
+
return ids.indexOf(args['value']) === -1;
|
|
19830
|
+
}
|
|
19831
|
+
};
|
|
19832
|
+
var options = {
|
|
19833
|
+
rules: (_a = {}, _a[this.parent.taskFields.id] = { required: true, minLength: [customFn, 'ID is already present, please enter new value'] }, _a)
|
|
19834
|
+
};
|
|
19835
|
+
formObject = new FormValidator('#' + this.parent.element.id + 'GeneralTabContainer', options);
|
|
19836
|
+
}
|
|
19585
19837
|
}
|
|
19586
19838
|
if (colName.search('Segments') === 0) {
|
|
19587
19839
|
colName = colName.replace('SegmentsTabContainer', '');
|
|
@@ -19805,7 +20057,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19805
20057
|
this.validateDuration(currentData);
|
|
19806
20058
|
}
|
|
19807
20059
|
}
|
|
19808
|
-
if (columnName ===
|
|
20060
|
+
if (columnName === taskSettings.type) {
|
|
19809
20061
|
this.parent.setRecordValue('taskType', value, ganttProp, true);
|
|
19810
20062
|
}
|
|
19811
20063
|
if (taskSettings.manual === columnName) {
|
|
@@ -20165,9 +20417,6 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20165
20417
|
item.content = this.renderGeneralTab(item.content);
|
|
20166
20418
|
}
|
|
20167
20419
|
else if (item.content === 'Dependency') {
|
|
20168
|
-
if (this.editedRecord.hasChildRecords) {
|
|
20169
|
-
item.disabled = true;
|
|
20170
|
-
}
|
|
20171
20420
|
item.content = this.renderPredecessorTab(item.content);
|
|
20172
20421
|
}
|
|
20173
20422
|
else if (item.content === 'Resources') {
|
|
@@ -20273,6 +20522,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20273
20522
|
};
|
|
20274
20523
|
DialogEdit.prototype.isCheckIsDisabled = function (column) {
|
|
20275
20524
|
var disabled = false;
|
|
20525
|
+
var stringOrNumber;
|
|
20276
20526
|
if (column.allowEditing === false || column.isPrimaryKey || this.parent.readOnly) {
|
|
20277
20527
|
if (this.parent.customColumns.indexOf(column.field) !== -1) {
|
|
20278
20528
|
disabled = true;
|
|
@@ -20282,8 +20532,19 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20282
20532
|
column.field === this.parent.taskFields.duration || column.field === this.parent.taskFields.progress ||
|
|
20283
20533
|
column.field === this.parent.taskFields.startDate || column.field === this.parent.taskFields.endDate ||
|
|
20284
20534
|
column.field === this.parent.taskFields.baselineStartDate || column.field === this.parent.taskFields.baselineEndDate ||
|
|
20285
|
-
column.field === this.parent.taskFields.work || column.field ===
|
|
20286
|
-
|
|
20535
|
+
column.field === this.parent.taskFields.work || column.field === this.parent.taskFields.type) {
|
|
20536
|
+
for (var i = 0; i < this.parent.currentViewData['length']; i++) {
|
|
20537
|
+
if (!isNullOrUndefined(this.parent.currentViewData[i].ganttProperties.taskId)) {
|
|
20538
|
+
stringOrNumber = this.parent.currentViewData[i].ganttProperties.taskId;
|
|
20539
|
+
break;
|
|
20540
|
+
}
|
|
20541
|
+
}
|
|
20542
|
+
if (typeof (stringOrNumber) === "string") {
|
|
20543
|
+
disabled = false;
|
|
20544
|
+
}
|
|
20545
|
+
else {
|
|
20546
|
+
disabled = true;
|
|
20547
|
+
}
|
|
20287
20548
|
}
|
|
20288
20549
|
}
|
|
20289
20550
|
}
|
|
@@ -20295,13 +20556,30 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20295
20556
|
if ((column.field === this.parent.taskFields.endDate && ((!isNullOrUndefined(this.editedRecord['isManual']) &&
|
|
20296
20557
|
this.editedRecord['isManual'] == false) || this.parent.taskMode == 'Auto')) || column.field === this.parent.taskFields.duration ||
|
|
20297
20558
|
column.field === this.parent.taskFields.progress || column.field === this.parent.taskFields.work ||
|
|
20298
|
-
column.field ===
|
|
20559
|
+
column.field === this.parent.taskFields.type) {
|
|
20299
20560
|
disabled = true;
|
|
20300
20561
|
}
|
|
20301
20562
|
}
|
|
20302
20563
|
}
|
|
20303
20564
|
return disabled;
|
|
20304
20565
|
};
|
|
20566
|
+
DialogEdit.prototype.isParentValid = function (data) {
|
|
20567
|
+
if (data.length > 0) {
|
|
20568
|
+
for (var i = 0; i < data.length; i++) {
|
|
20569
|
+
if (data[i].uniqueID == this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20570
|
+
this.isValidData = false;
|
|
20571
|
+
break;
|
|
20572
|
+
}
|
|
20573
|
+
if (data[i].hasChildRecords) {
|
|
20574
|
+
this.isParentValid(data[i].childRecords);
|
|
20575
|
+
}
|
|
20576
|
+
if (!this.isValidData) {
|
|
20577
|
+
break;
|
|
20578
|
+
}
|
|
20579
|
+
}
|
|
20580
|
+
}
|
|
20581
|
+
return this.isValidData;
|
|
20582
|
+
};
|
|
20305
20583
|
DialogEdit.prototype.renderPredecessorTab = function (itemName) {
|
|
20306
20584
|
var _this = this;
|
|
20307
20585
|
var ganttObj = this.parent;
|
|
@@ -20599,7 +20877,26 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20599
20877
|
this.preTableCollection = [];
|
|
20600
20878
|
for (var i = 0; i < flatData.length; i++) {
|
|
20601
20879
|
var data = flatData[i];
|
|
20602
|
-
|
|
20880
|
+
var currentFlatData = data;
|
|
20881
|
+
if (data.parentUniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20882
|
+
this.isValidData = false;
|
|
20883
|
+
}
|
|
20884
|
+
else {
|
|
20885
|
+
do {
|
|
20886
|
+
if (currentFlatData.parentItem) {
|
|
20887
|
+
currentFlatData = this.parent.flatData[this.parent.ids.indexOf(currentFlatData.parentItem.taskId)];
|
|
20888
|
+
if (currentFlatData.uniqueID == this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20889
|
+
this.isValidData = false;
|
|
20890
|
+
break;
|
|
20891
|
+
}
|
|
20892
|
+
}
|
|
20893
|
+
} while (currentFlatData.parentItem);
|
|
20894
|
+
}
|
|
20895
|
+
if (data.hasChildRecords && this.isValidData) {
|
|
20896
|
+
this.isValidData = this.isParentValid(data.childRecords);
|
|
20897
|
+
}
|
|
20898
|
+
if (!this.isValidData) {
|
|
20899
|
+
this.isValidData = true;
|
|
20603
20900
|
continue;
|
|
20604
20901
|
}
|
|
20605
20902
|
var taskId = this.parent.viewType === 'ResourceView' ? data.ganttProperties.taskId.toString()
|
|
@@ -20786,10 +21083,17 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20786
21083
|
// eslint-disable-next-line
|
|
20787
21084
|
DialogEdit.prototype.updateSegmentsData = function (segmentForm, data) {
|
|
20788
21085
|
var gridObj = segmentForm.ej2_instances[0];
|
|
21086
|
+
var isEdit = gridObj.isEdit;
|
|
21087
|
+
var dataSource;
|
|
20789
21088
|
if (gridObj.isEdit) {
|
|
20790
21089
|
gridObj.endEdit();
|
|
20791
21090
|
}
|
|
20792
|
-
|
|
21091
|
+
if (isEdit) {
|
|
21092
|
+
dataSource = gridObj.dataSource;
|
|
21093
|
+
}
|
|
21094
|
+
else {
|
|
21095
|
+
dataSource = gridObj.currentViewData;
|
|
21096
|
+
}
|
|
20793
21097
|
this.updateSegmentTaskData(dataSource);
|
|
20794
21098
|
};
|
|
20795
21099
|
DialogEdit.prototype.updateGeneralTab = function (generalForm, isCustom) {
|
|
@@ -20805,6 +21109,10 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20805
21109
|
if (inputElement) {
|
|
20806
21110
|
var fieldName = inputElement.id.replace(ganttObj.element.id, '');
|
|
20807
21111
|
var controlObj = div.querySelector('#' + ganttObj.element.id + fieldName).ej2_instances[0];
|
|
21112
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit" && fieldName === this.parent.taskFields.id) {
|
|
21113
|
+
var valueString = controlObj.value.toString();
|
|
21114
|
+
controlObj.value = valueString;
|
|
21115
|
+
}
|
|
20808
21116
|
var column = ganttObj.columnByField[fieldName];
|
|
20809
21117
|
if (!isNullOrUndefined(column.edit) && isNullOrUndefined(column.edit.params)) {
|
|
20810
21118
|
var read = column.edit.read;
|
|
@@ -20840,6 +21148,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20840
21148
|
this.parent.setRecordValue('duration', fromRecord.ganttProperties.duration, toRecord.ganttProperties, true);
|
|
20841
21149
|
this.parent.setRecordValue('durationUnit', fromRecord.ganttProperties.durationUnit, toRecord.ganttProperties, true);
|
|
20842
21150
|
this.parent.setRecordValue('work', fromRecord.ganttProperties.work, toRecord.ganttProperties, true);
|
|
21151
|
+
this.parent.setRecordValue('type', fromRecord.ganttProperties.taskType, toRecord.ganttProperties, true);
|
|
20843
21152
|
if (!isNullOrUndefined(this.parent.taskFields.startDate)) {
|
|
20844
21153
|
this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.startDate);
|
|
20845
21154
|
}
|
|
@@ -20862,6 +21171,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20862
21171
|
if (!isNullOrUndefined(this.parent.taskFields.manual)) {
|
|
20863
21172
|
this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.manual);
|
|
20864
21173
|
}
|
|
21174
|
+
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
21175
|
+
this.parent.dataOperation.updateMappingData(this.rowData, "type");
|
|
21176
|
+
}
|
|
20865
21177
|
};
|
|
20866
21178
|
DialogEdit.prototype.updatePredecessorTab = function (preElement) {
|
|
20867
21179
|
var gridObj = preElement.ej2_instances[0];
|
|
@@ -20875,10 +21187,6 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20875
21187
|
var ids = [];
|
|
20876
21188
|
for (var i = 0; i < dataSource.length; i++) {
|
|
20877
21189
|
var preData = dataSource[i];
|
|
20878
|
-
var newId = preData.name.split('-')[0];
|
|
20879
|
-
if (preData.id !== newId) {
|
|
20880
|
-
preData.id = newId;
|
|
20881
|
-
}
|
|
20882
21190
|
if (ids.indexOf(preData.id) === -1) {
|
|
20883
21191
|
var name_1 = preData.id + preData.type;
|
|
20884
21192
|
if (preData.offset && preData.offset.indexOf('-') !== -1) {
|
|
@@ -21103,8 +21411,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
21103
21411
|
this.parent.connectorLineModule.removeConnectorLineById('parent' + predecessor[from] + 'child' + predecessor[to]);
|
|
21104
21412
|
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[from]);
|
|
21105
21413
|
childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[to]);
|
|
21106
|
-
if (
|
|
21107
|
-
(childGanttRecord && childGanttRecord.expanded === true)) {
|
|
21414
|
+
if (parentGanttRecord || childGanttRecord) {
|
|
21108
21415
|
connectorObj =
|
|
21109
21416
|
this.parent.predecessorModule.updateConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
|
|
21110
21417
|
if (!isNullOrUndefined(connectorObj)) {
|
|
@@ -21143,14 +21450,36 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
21143
21450
|
ConnectorLineEdit.prototype.idFromPredecessor = function (pre) {
|
|
21144
21451
|
var preArray = pre.split(',');
|
|
21145
21452
|
var preIdArray = [];
|
|
21453
|
+
var values;
|
|
21454
|
+
var match = [];
|
|
21146
21455
|
for (var j = 0; j < preArray.length; j++) {
|
|
21147
21456
|
var strArray = [];
|
|
21148
|
-
|
|
21149
|
-
|
|
21150
|
-
|
|
21457
|
+
values = preArray[j].split('+');
|
|
21458
|
+
if (preArray[j].indexOf('-') >= 0) {
|
|
21459
|
+
values = preArray[j].split('-');
|
|
21460
|
+
|
|
21461
|
+
}
|
|
21462
|
+
if (!isNullOrUndefined(values[0])) {
|
|
21463
|
+
var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
21464
|
+
if (ids.indexOf(values[0]) === -1) {
|
|
21465
|
+
if (values[0].indexOf(" ") != -1) {
|
|
21466
|
+
match = values[0].split(" ");
|
|
21467
|
+
if (match.length === 1) {
|
|
21468
|
+
match = values[0].match(/(\d+|[A-z]+)/g);
|
|
21469
|
+
}
|
|
21470
|
+
strArray.push(match[0]);
|
|
21471
|
+
}
|
|
21472
|
+
else {
|
|
21473
|
+
if (values[0].length === 1 || values[0].length === 2) {
|
|
21474
|
+
strArray.push(values[0]);
|
|
21475
|
+
}
|
|
21476
|
+
else {
|
|
21477
|
+
strArray.push(values[0].slice(0, -2));
|
|
21478
|
+
}
|
|
21479
|
+
}
|
|
21151
21480
|
}
|
|
21152
21481
|
else {
|
|
21153
|
-
|
|
21482
|
+
strArray.push(values[0]);
|
|
21154
21483
|
}
|
|
21155
21484
|
}
|
|
21156
21485
|
preIdArray.push((strArray.join('')));
|
|
@@ -21208,6 +21537,75 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
21208
21537
|
}
|
|
21209
21538
|
return true;
|
|
21210
21539
|
};
|
|
21540
|
+
// Get the root parent of the record
|
|
21541
|
+
ConnectorLineEdit.prototype.getRootParent = function (rec) {
|
|
21542
|
+
var parentRec = rec;
|
|
21543
|
+
if (rec.parentItem) {
|
|
21544
|
+
parentRec = this.parent.flatData.filter(function (item) {
|
|
21545
|
+
return item.uniqueID == rec.parentUniqueID;
|
|
21546
|
+
})[0];
|
|
21547
|
+
if (parentRec.parentItem) {
|
|
21548
|
+
parentRec = this.getRootParent(parentRec);
|
|
21549
|
+
}
|
|
21550
|
+
return parentRec;
|
|
21551
|
+
}
|
|
21552
|
+
return parentRec;
|
|
21553
|
+
};
|
|
21554
|
+
// To check whether the predecessor drawn is valid for parent task
|
|
21555
|
+
ConnectorLineEdit.prototype.validateParentPredecessor = function (fromRecord, toRecord) {
|
|
21556
|
+
if (toRecord.hasChildRecords && !fromRecord.hasChildRecords) {
|
|
21557
|
+
if (fromRecord.parentUniqueID === toRecord.uniqueID) {
|
|
21558
|
+
return false;
|
|
21559
|
+
}
|
|
21560
|
+
else {
|
|
21561
|
+
do {
|
|
21562
|
+
if (fromRecord.parentItem) {
|
|
21563
|
+
fromRecord = this.parent.flatData[this.parent.ids.indexOf(fromRecord.parentItem.taskId)];
|
|
21564
|
+
if (fromRecord.uniqueID === toRecord.uniqueID) {
|
|
21565
|
+
return false;
|
|
21566
|
+
}
|
|
21567
|
+
}
|
|
21568
|
+
} while (fromRecord.parentItem);
|
|
21569
|
+
}
|
|
21570
|
+
}
|
|
21571
|
+
else if (!toRecord.hasChildRecords && fromRecord.hasChildRecords) {
|
|
21572
|
+
if (toRecord.parentUniqueID === fromRecord.uniqueID) {
|
|
21573
|
+
return false;
|
|
21574
|
+
}
|
|
21575
|
+
else {
|
|
21576
|
+
do {
|
|
21577
|
+
if (toRecord.parentItem) {
|
|
21578
|
+
toRecord = this.parent.flatData[this.parent.ids.indexOf(toRecord.parentItem.taskId)];
|
|
21579
|
+
if (toRecord.uniqueID === fromRecord.uniqueID) {
|
|
21580
|
+
return false;
|
|
21581
|
+
}
|
|
21582
|
+
}
|
|
21583
|
+
} while (toRecord.parentItem);
|
|
21584
|
+
}
|
|
21585
|
+
}
|
|
21586
|
+
else if (toRecord.hasChildRecords && fromRecord.hasChildRecords) {
|
|
21587
|
+
if (toRecord.parentItem && fromRecord.parentItem) {
|
|
21588
|
+
if (fromRecord.parentUniqueID === toRecord.uniqueID || fromRecord.uniqueID === toRecord.parentUniqueID) {
|
|
21589
|
+
return false;
|
|
21590
|
+
}
|
|
21591
|
+
}
|
|
21592
|
+
else {
|
|
21593
|
+
if (!toRecord.parentItem && fromRecord.parentItem) {
|
|
21594
|
+
var fromRootParent = this.parent.connectorLineEditModule.getRootParent(fromRecord);
|
|
21595
|
+
if (fromRootParent.uniqueID === toRecord.uniqueID) {
|
|
21596
|
+
return false;
|
|
21597
|
+
}
|
|
21598
|
+
}
|
|
21599
|
+
else if (toRecord.parentItem && !fromRecord.parentItem) {
|
|
21600
|
+
var toRootParent = this.parent.connectorLineEditModule.getRootParent(toRecord);
|
|
21601
|
+
if (toRootParent.uniqueID === fromRecord.uniqueID) {
|
|
21602
|
+
return false;
|
|
21603
|
+
}
|
|
21604
|
+
}
|
|
21605
|
+
}
|
|
21606
|
+
}
|
|
21607
|
+
return true;
|
|
21608
|
+
};
|
|
21211
21609
|
/**
|
|
21212
21610
|
* To validate predecessor relations
|
|
21213
21611
|
*
|
|
@@ -21225,10 +21623,12 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
21225
21623
|
if (!isNullOrUndefined(predecessorString) && predecessorString.length > 0) {
|
|
21226
21624
|
predecessorIdArray = this.idFromPredecessor(predecessorString);
|
|
21227
21625
|
var _loop_2 = function (count) {
|
|
21228
|
-
|
|
21229
|
-
|
|
21230
|
-
|
|
21231
|
-
|
|
21626
|
+
if (parseInt(predecessorIdArray[predecessorIdArray.length - 1]) !== ganttRecord[this_2.parent.taskFields.id]) {
|
|
21627
|
+
var num = this_2.parent.ids.indexOf(predecessorIdArray[predecessorIdArray.length - 1]);
|
|
21628
|
+
var fromRecord = this_2.parent.currentViewData[num];
|
|
21629
|
+
if (fromRecord && ganttRecord) {
|
|
21630
|
+
flag = this_2.validateParentPredecessor(fromRecord, ganttRecord);
|
|
21631
|
+
}
|
|
21232
21632
|
}
|
|
21233
21633
|
// Check if predecessor exist more then one
|
|
21234
21634
|
var tempIdArray = predecessorIdArray.slice(0);
|
|
@@ -22613,6 +23013,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
22613
23013
|
}
|
|
22614
23014
|
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
22615
23015
|
}
|
|
23016
|
+
if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
23017
|
+
(args.action === "DrawConnectorLine" || args.action === "DialogEditing")) {
|
|
23018
|
+
this.updateChildItems(ganttRecord);
|
|
23019
|
+
}
|
|
22616
23020
|
this.updateParentItemOnEditing();
|
|
22617
23021
|
}
|
|
22618
23022
|
/** Update parent up-to zeroth level */
|
|
@@ -23070,9 +23474,16 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23070
23474
|
}
|
|
23071
23475
|
for (var index = 0; index < currentLength; index++) {
|
|
23072
23476
|
var recordIndex = [];
|
|
23073
|
-
var resourceID = parseInt(currentResource[index][this.parent.resourceFields.id], 10);
|
|
23477
|
+
var resourceID = parseInt(currentResource[index][this.parent.resourceFields.id], 10).toString();
|
|
23478
|
+
if (resourceID === "NaN") {
|
|
23479
|
+
resourceID = currentResource[index][this.parent.resourceFields.id];
|
|
23480
|
+
}
|
|
23074
23481
|
for (var i = 0; i < prevResource.length; i++) {
|
|
23075
|
-
|
|
23482
|
+
var prevResourceID = parseInt(prevResource[i][this.parent.resourceFields.id], 10).toString();
|
|
23483
|
+
if (prevResourceID === "NaN") {
|
|
23484
|
+
prevResourceID = prevResource[i][this.parent.resourceFields.id];
|
|
23485
|
+
}
|
|
23486
|
+
if (prevResourceID === resourceID) {
|
|
23076
23487
|
recordIndex.push(i);
|
|
23077
23488
|
break;
|
|
23078
23489
|
}
|
|
@@ -23084,7 +23495,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23084
23495
|
}
|
|
23085
23496
|
}
|
|
23086
23497
|
else {
|
|
23087
|
-
|
|
23498
|
+
var record1 = parseInt(recordIndex[0].toString(), 10);
|
|
23499
|
+
if (record1.toString() === "NaN") {
|
|
23500
|
+
record1 = recordIndex[0].toString();
|
|
23501
|
+
}
|
|
23502
|
+
prevResource.splice(record1, 1);
|
|
23088
23503
|
}
|
|
23089
23504
|
}
|
|
23090
23505
|
var prevLength = prevResource ? prevResource.length : 0;
|
|
@@ -23399,6 +23814,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23399
23814
|
var _loop_1 = function (i) {
|
|
23400
23815
|
if (selectedRecords[i].parentItem) {
|
|
23401
23816
|
var data = selectedRecords[i];
|
|
23817
|
+
var ids = data.ganttProperties.sharedTaskUniqueIds;
|
|
23818
|
+
for (var j = 0; j < ids.length; j++) {
|
|
23819
|
+
deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(ids[j].toString())]);
|
|
23820
|
+
}
|
|
23402
23821
|
deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
|
|
23403
23822
|
}
|
|
23404
23823
|
else {
|
|
@@ -23877,12 +24296,34 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23877
24296
|
* @private
|
|
23878
24297
|
*/
|
|
23879
24298
|
Edit$$1.prototype.getNewTaskId = function () {
|
|
23880
|
-
var
|
|
23881
|
-
|
|
23882
|
-
|
|
24299
|
+
var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
24300
|
+
var maxId = ids.length;
|
|
24301
|
+
var newTaskId = maxId + 1;
|
|
24302
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
24303
|
+
if (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1) {
|
|
24304
|
+
newTaskId = newTaskId + 1;
|
|
24305
|
+
if (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1) {
|
|
24306
|
+
do {
|
|
24307
|
+
newTaskId = newTaskId + 1;
|
|
24308
|
+
} while (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1);
|
|
24309
|
+
}
|
|
24310
|
+
}
|
|
23883
24311
|
}
|
|
23884
24312
|
else {
|
|
23885
|
-
|
|
24313
|
+
if (ids.indexOf(newTaskId.toString()) != -1) {
|
|
24314
|
+
newTaskId = newTaskId + 1;
|
|
24315
|
+
if (ids.indexOf(newTaskId.toString()) != -1) {
|
|
24316
|
+
do {
|
|
24317
|
+
newTaskId = newTaskId + 1;
|
|
24318
|
+
} while (ids.indexOf(newTaskId.toString()) != -1);
|
|
24319
|
+
}
|
|
24320
|
+
}
|
|
24321
|
+
}
|
|
24322
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
24323
|
+
return newTaskId = newTaskId.toString();
|
|
24324
|
+
}
|
|
24325
|
+
else {
|
|
24326
|
+
return newTaskId;
|
|
23886
24327
|
}
|
|
23887
24328
|
};
|
|
23888
24329
|
/**
|
|
@@ -23895,6 +24336,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23895
24336
|
Edit$$1.prototype.prepareNewlyAddedData = function (obj, rowPosition) {
|
|
23896
24337
|
var taskModel = this.parent.taskFields;
|
|
23897
24338
|
var id;
|
|
24339
|
+
var newTaskIDmd;
|
|
23898
24340
|
var ids = this.parent.ids;
|
|
23899
24341
|
/*Validate Task Id of data*/
|
|
23900
24342
|
if (obj[taskModel.id]) {
|
|
@@ -23902,7 +24344,13 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23902
24344
|
obj[taskModel.id] = null;
|
|
23903
24345
|
}
|
|
23904
24346
|
else {
|
|
23905
|
-
|
|
24347
|
+
if (typeof (obj[taskModel.id]) === "string") {
|
|
24348
|
+
newTaskIDmd = obj[taskModel.id];
|
|
24349
|
+
}
|
|
24350
|
+
else {
|
|
24351
|
+
newTaskIDmd = parseInt(obj[taskModel.id], 10);
|
|
24352
|
+
}
|
|
24353
|
+
obj[taskModel.id] = isNullOrUndefined(newTaskIDmd) ? null : newTaskIDmd;
|
|
23906
24354
|
}
|
|
23907
24355
|
}
|
|
23908
24356
|
if (!obj[taskModel.id]) {
|
|
@@ -24142,7 +24590,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24142
24590
|
recordIndex = currentItemIndex + dataChildCount + 1;
|
|
24143
24591
|
//Expand Add record's parent item for project view
|
|
24144
24592
|
if (!this.addRowSelectedItem.expanded && !this.parent.enableMultiTaskbar) {
|
|
24145
|
-
this.parent.expandByID(
|
|
24593
|
+
this.parent.expandByID(this.addRowSelectedItem.ganttProperties.rowUniqueID);
|
|
24146
24594
|
}
|
|
24147
24595
|
updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem) +
|
|
24148
24596
|
this.getVisibleChildRecordCount(this.addRowSelectedItem, 0, currentViewData) + 1;
|
|
@@ -24182,6 +24630,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24182
24630
|
/* Record collection update */
|
|
24183
24631
|
flatRecords.splice(recordIndex, 0, record);
|
|
24184
24632
|
currentViewData.splice(updatedCollectionIndex, 0, record);
|
|
24633
|
+
if (this.parent.viewType === 'ResourceView' && typeof (record.ganttProperties.taskId) === "number") {
|
|
24634
|
+
var taskString = record.ganttProperties.taskId;
|
|
24635
|
+
ids.push(taskString.toString());
|
|
24636
|
+
}
|
|
24185
24637
|
ids.splice(recordIndex, 0, record.ganttProperties.rowUniqueID.toString());
|
|
24186
24638
|
if (this.parent.viewType === 'ResourceView') {
|
|
24187
24639
|
var taskId = record.level === 0 ? 'R' + record.ganttProperties.taskId : 'T' + record.ganttProperties.taskId;
|
|
@@ -24334,7 +24786,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24334
24786
|
dataSource.push(addedRecord[i].taskData);
|
|
24335
24787
|
}
|
|
24336
24788
|
else {
|
|
24337
|
-
|
|
24789
|
+
if (isNullOrUndefined(addedRecord[i].parentItem)) {
|
|
24790
|
+
this.addDataInRealDataSource(dataSource, addedRecord[i].taskData, rowPosition);
|
|
24791
|
+
}
|
|
24338
24792
|
}
|
|
24339
24793
|
}
|
|
24340
24794
|
this.isBreakLoop = false;
|
|
@@ -24390,6 +24844,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24390
24844
|
*/
|
|
24391
24845
|
Edit$$1.prototype.addRecord = function (data, rowPosition, rowIndex) {
|
|
24392
24846
|
var _this = this;
|
|
24847
|
+
var tempTaskID = this.parent.taskFields.id;
|
|
24393
24848
|
if (this.parent.editModule && this.parent.editSettings.allowAdding) {
|
|
24394
24849
|
this.parent.isDynamicData = true;
|
|
24395
24850
|
var cAddedRecord_1 = [];
|
|
@@ -24411,6 +24866,12 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24411
24866
|
args = this.constructTaskAddedEventArgs(cAddedRecord_1, this.parent.editedRecords, 'beforeAdd');
|
|
24412
24867
|
this.parent.showSpinner();
|
|
24413
24868
|
this.parent.trigger('actionBegin', args, function (args) {
|
|
24869
|
+
if (!isNullOrUndefined(args.data[tempTaskID])) {
|
|
24870
|
+
if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
|
|
24871
|
+
args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
|
|
24872
|
+
args.newTaskData[tempTaskID] = args.data[tempTaskID];
|
|
24873
|
+
}
|
|
24874
|
+
}
|
|
24414
24875
|
if (!args.cancel) {
|
|
24415
24876
|
if (isRemoteData(_this.parent.dataSource)) {
|
|
24416
24877
|
var data_2 = _this.parent.dataSource;
|
|
@@ -25476,10 +25937,13 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25476
25937
|
this.parent.on('actionComplete', this.actionComplete, this);
|
|
25477
25938
|
this.parent.on('columnMenuOpen', this.columnMenuOpen, this);
|
|
25478
25939
|
};
|
|
25940
|
+
Filter$$1.prototype.wireEvents = function (a) {
|
|
25941
|
+
EventHandler.add(document.getElementById(a), 'click', this.mouseClickHandler, this);
|
|
25942
|
+
};
|
|
25479
25943
|
Filter$$1.prototype.initiateFiltering = function (column) {
|
|
25480
25944
|
var treeColumn = this.parent.getColumnByField(column.field, this.parent.treeGridModule.treeGridColumns);
|
|
25481
25945
|
column.allowFiltering = column.allowFiltering === false ? false : true;
|
|
25482
|
-
if (column.allowFiltering && this.parent.filterSettings.type === 'Menu' && !column.filter) {
|
|
25946
|
+
if (column.allowFiltering && (this.parent.filterSettings.type === 'Menu' || this.parent.filterSettings.type === 'Excel') && !column.filter) {
|
|
25483
25947
|
column.filter = { ui: this.getCustomFilterUi(column) };
|
|
25484
25948
|
}
|
|
25485
25949
|
if (treeColumn) {
|
|
@@ -25509,6 +25973,14 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25509
25973
|
}
|
|
25510
25974
|
return filterUI;
|
|
25511
25975
|
};
|
|
25976
|
+
Filter$$1.prototype.mouseClickHandler = function (e) {
|
|
25977
|
+
if (closest(e.target, ".e-excelfilter")) {
|
|
25978
|
+
this.parent.treeGrid.grid.notify("click", e);
|
|
25979
|
+
}
|
|
25980
|
+
};
|
|
25981
|
+
Filter$$1.prototype.unWireEvents = function () {
|
|
25982
|
+
EventHandler.remove(this.parent.element, 'click', this.mouseClickHandler);
|
|
25983
|
+
};
|
|
25512
25984
|
Filter$$1.prototype.getDatePickerFilter = function (columnName) {
|
|
25513
25985
|
var _this = this;
|
|
25514
25986
|
var parent = this.parent;
|
|
@@ -25630,6 +26102,15 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25630
26102
|
}
|
|
25631
26103
|
};
|
|
25632
26104
|
Filter$$1.prototype.actionComplete = function (args) {
|
|
26105
|
+
if (!isNullOrUndefined(args['filterModel'])) {
|
|
26106
|
+
if (!isNullOrUndefined(args['filterModel']['dialogObj'])) {
|
|
26107
|
+
if (!isNullOrUndefined(args['filterModel']['dialogObj']['element'])) {
|
|
26108
|
+
if (this.parent.filterSettings.type === 'Excel') {
|
|
26109
|
+
this.wireEvents(args['filterModel']['dialogObj']['element'].id);
|
|
26110
|
+
}
|
|
26111
|
+
}
|
|
26112
|
+
}
|
|
26113
|
+
}
|
|
25633
26114
|
if (args.requestType === filterAfterOpen) {
|
|
25634
26115
|
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25635
26116
|
this.filterMenuElement = getValue('filterModel.dlgObj.element', args);
|
|
@@ -25647,12 +26128,15 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25647
26128
|
if ((args.columnName === predecessor && isNullOrUndefined(getValue(predecessor, filterValues)))
|
|
25648
26129
|
|| (args.columnName === resource && isNullOrUndefined(getValue(resource, filterValues)))) {
|
|
25649
26130
|
var element = this.filterMenuElement.querySelector('.e-dropdownlist');
|
|
25650
|
-
var instanceObj =
|
|
25651
|
-
|
|
25652
|
-
|
|
26131
|
+
var instanceObj = void 0;
|
|
26132
|
+
if (!isNullOrUndefined(element)) {
|
|
26133
|
+
instanceObj = getValue('ej2_instances[0]', element);
|
|
26134
|
+
instanceObj.index = 2;
|
|
26135
|
+
instanceObj.dataBind();
|
|
26136
|
+
}
|
|
25653
26137
|
}
|
|
25654
26138
|
else if (args.columnName === taskID && isNullOrUndefined(getValue(taskID, filterValues)) && this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25655
|
-
var element = this.filterMenuElement.querySelector('.e-
|
|
26139
|
+
var element = this.filterMenuElement.querySelector('.e-flmenu-input');
|
|
25656
26140
|
var instanceObj = getValue('ej2_instances[0]', element);
|
|
25657
26141
|
if (!isNullOrUndefined(instanceObj) && isNullOrUndefined(this.parent.columnByField[args.columnName].format)) {
|
|
25658
26142
|
instanceObj.format = 'n';
|
|
@@ -25683,6 +26167,7 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25683
26167
|
*/
|
|
25684
26168
|
Filter$$1.prototype.destroy = function () {
|
|
25685
26169
|
this.removeEventListener();
|
|
26170
|
+
this.unWireEvents();
|
|
25686
26171
|
};
|
|
25687
26172
|
return Filter$$1;
|
|
25688
26173
|
}());
|
|
@@ -26811,7 +27296,6 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
26811
27296
|
this.nonworkingContainer = createElement('div', {
|
|
26812
27297
|
className: nonworkingContainer
|
|
26813
27298
|
});
|
|
26814
|
-
this.nonworkingContainer.setAttribute("role", "NonWorkingDays");
|
|
26815
27299
|
this.parent.ganttChartModule.chartBodyContent.appendChild(this.nonworkingContainer);
|
|
26816
27300
|
}
|
|
26817
27301
|
};
|
|
@@ -27018,7 +27502,7 @@ var EventMarker$1 = /** @__PURE__ @class */ (function () {
|
|
|
27018
27502
|
this.eventMarkersContainer = createElement('div', {
|
|
27019
27503
|
className: eventMarkersContainer
|
|
27020
27504
|
});
|
|
27021
|
-
this.eventMarkersContainer.setAttribute("role", "
|
|
27505
|
+
this.eventMarkersContainer.setAttribute("role", "term");
|
|
27022
27506
|
this.parent.ganttChartModule.chartBodyContent.appendChild(this.eventMarkersContainer);
|
|
27023
27507
|
}
|
|
27024
27508
|
this.eventMarkersContainer.innerHTML = '';
|
|
@@ -27173,13 +27657,13 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27173
27657
|
CriticalPath.prototype.showCriticalPath = function (isCritical) {
|
|
27174
27658
|
var modelIds = this.parent.ids;
|
|
27175
27659
|
var totalRecords = this.parent.flatData;
|
|
27176
|
-
if (isCritical && this.parent.flatData.length > 0
|
|
27660
|
+
if (isCritical && this.parent.flatData.length > 0) {
|
|
27177
27661
|
this.parent.enableCriticalPath = true;
|
|
27178
27662
|
var parentRecords = this.parent.treeGrid.parentData;
|
|
27179
27663
|
var checkEndDateTaskid = void 0;
|
|
27180
27664
|
var checkEndDate = parentRecords[0].ganttProperties.endDate;
|
|
27181
27665
|
var dateDifference = 0;
|
|
27182
|
-
var
|
|
27666
|
+
var checkBeyondEnddate_1 = [];
|
|
27183
27667
|
var totalPredecessorsCollection = [];
|
|
27184
27668
|
var totalPredecessorsCollectionId = [];
|
|
27185
27669
|
var predecessorIndex = 0;
|
|
@@ -27218,12 +27702,12 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27218
27702
|
totalRecords[j].slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
27219
27703
|
totalRecords[j].ganttProperties.slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
27220
27704
|
if (totalRecords[j].ganttProperties.endDate >= checkEndDate) {
|
|
27221
|
-
|
|
27705
|
+
checkBeyondEnddate_1.push(totalRecords[j].ganttProperties.taskId);
|
|
27222
27706
|
}
|
|
27223
27707
|
if (totalRecords[j].ganttProperties.predecessor) {
|
|
27224
27708
|
if (totalRecords[j].ganttProperties.predecessor.length !== 0) {
|
|
27225
27709
|
totalPredecessorsCollection.push(totalRecords[j]);
|
|
27226
|
-
totalPredecessorsCollectionId.push(
|
|
27710
|
+
totalPredecessorsCollectionId.push((totalRecords[j].ganttProperties.taskId));
|
|
27227
27711
|
}
|
|
27228
27712
|
}
|
|
27229
27713
|
}
|
|
@@ -27232,25 +27716,36 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27232
27716
|
this.resourceCollectionIds[i] = this.parent.taskIds[i].slice(1);
|
|
27233
27717
|
}
|
|
27234
27718
|
}
|
|
27235
|
-
|
|
27236
|
-
|
|
27237
|
-
|
|
27238
|
-
|
|
27239
|
-
predecessorIndex = modelIds.indexOf(checkBeyondEnddate[k].toString());
|
|
27719
|
+
var _loop_1 = function (k) {
|
|
27720
|
+
if (totalPredecessorsCollectionId.indexOf(checkBeyondEnddate_1[k]) === -1) {
|
|
27721
|
+
if (this_1.parent.viewType === 'ProjectView') {
|
|
27722
|
+
predecessorIndex = modelIds.indexOf(checkBeyondEnddate_1[k].toString());
|
|
27240
27723
|
}
|
|
27241
27724
|
else {
|
|
27242
|
-
|
|
27725
|
+
var currentRecords = this_1.parent.currentViewData.filter(function (data) {
|
|
27726
|
+
return parseInt(data.ganttProperties.taskId) == checkBeyondEnddate_1[k];
|
|
27727
|
+
});
|
|
27728
|
+
for (var i = 0; i < currentRecords.length; i++) {
|
|
27729
|
+
if (!currentRecords[i].hasChildRecords && currentRecords[i].ganttProperties.endDate >= this_1.maxEndDate) {
|
|
27730
|
+
predecessorIndex = currentRecords[i].index;
|
|
27731
|
+
}
|
|
27732
|
+
}
|
|
27243
27733
|
}
|
|
27244
27734
|
if (totalRecords[predecessorIndex].ganttProperties.progress < 100) {
|
|
27245
27735
|
totalRecords[predecessorIndex].isCritical = true;
|
|
27246
27736
|
totalRecords[predecessorIndex].ganttProperties.isCritical = true;
|
|
27247
27737
|
}
|
|
27248
27738
|
totalRecords[predecessorIndex]['slack'] = 0 + ' ' + totalRecords[predecessorIndex].ganttProperties.durationUnit;
|
|
27249
|
-
taskBeyondEnddate.push(
|
|
27739
|
+
taskBeyondEnddate.push(checkBeyondEnddate_1[k]);
|
|
27250
27740
|
}
|
|
27251
27741
|
else {
|
|
27252
|
-
predecessorTaskBeyondEnddate.push(
|
|
27742
|
+
predecessorTaskBeyondEnddate.push(checkBeyondEnddate_1[k]);
|
|
27253
27743
|
}
|
|
27744
|
+
};
|
|
27745
|
+
var this_1 = this;
|
|
27746
|
+
// seperate the predecessor connected taskes from the individual taskes that ends on total project end date
|
|
27747
|
+
for (var k = 0; k < checkBeyondEnddate_1.length; k++) {
|
|
27748
|
+
_loop_1(k);
|
|
27254
27749
|
}
|
|
27255
27750
|
var predecessorLength = totalPredecessorsCollection.length;
|
|
27256
27751
|
var endTask = [];
|
|
@@ -27260,12 +27755,22 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27260
27755
|
var from = -1;
|
|
27261
27756
|
var toPredecessor = -1;
|
|
27262
27757
|
var fromPredecessor = -1;
|
|
27758
|
+
var tempTaskId = void 0;
|
|
27263
27759
|
var currentIndex = x;
|
|
27264
27760
|
var predecessor = totalPredecessorsCollection[x].ganttProperties.predecessor;
|
|
27265
27761
|
var individualPredecessorLength = totalPredecessorsCollection[x].ganttProperties.predecessor.length;
|
|
27266
|
-
var taskid = (
|
|
27762
|
+
var taskid = ((totalPredecessorsCollection[x].ganttProperties.taskId));
|
|
27267
27763
|
for (var y = 0; y < individualPredecessorLength; y++) {
|
|
27268
|
-
if (
|
|
27764
|
+
if (!isNaN(Number(predecessor[y].from)) && typeof (taskid) != "string") {
|
|
27765
|
+
tempTaskId = parseInt((predecessor[y].from), 10);
|
|
27766
|
+
}
|
|
27767
|
+
else if (!isNaN(Number(predecessor[y].from)) && typeof (taskid) === "string") {
|
|
27768
|
+
tempTaskId = predecessor[y].from;
|
|
27769
|
+
}
|
|
27770
|
+
else {
|
|
27771
|
+
tempTaskId = predecessor[y].from;
|
|
27772
|
+
}
|
|
27773
|
+
if (tempTaskId === taskid) {
|
|
27269
27774
|
if (to === -1) {
|
|
27270
27775
|
if (!predecessor[y].offset) {
|
|
27271
27776
|
to = predecessor[y].to;
|
|
@@ -27287,7 +27792,16 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27287
27792
|
}
|
|
27288
27793
|
}
|
|
27289
27794
|
}
|
|
27290
|
-
if (
|
|
27795
|
+
if (!isNaN(Number(predecessor[y].to)) && typeof (taskid) != "string") {
|
|
27796
|
+
tempTaskId = parseInt((predecessor[y].to), 10);
|
|
27797
|
+
}
|
|
27798
|
+
else if (!isNaN(Number(predecessor[y].to)) && typeof (taskid) === "string") {
|
|
27799
|
+
tempTaskId = predecessor[y].to;
|
|
27800
|
+
}
|
|
27801
|
+
else {
|
|
27802
|
+
tempTaskId = predecessor[y].to;
|
|
27803
|
+
}
|
|
27804
|
+
if (tempTaskId === taskid) {
|
|
27291
27805
|
if (from === -1) {
|
|
27292
27806
|
if (!predecessor[y].offset) {
|
|
27293
27807
|
from = predecessor[y].from;
|
|
@@ -27356,7 +27870,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27356
27870
|
this.detailPredecessorCollection = collection;
|
|
27357
27871
|
this.predecessorCollectionTaskIds = collectionTaskId;
|
|
27358
27872
|
}
|
|
27359
|
-
if (isCritical === false && this.parent.flatData.length > 0
|
|
27873
|
+
if (isCritical === false && this.parent.flatData.length > 0) {
|
|
27360
27874
|
var pathIndex = void 0;
|
|
27361
27875
|
this.parent.enableCriticalPath = false;
|
|
27362
27876
|
for (var z = 0; z < this.criticalPathCollection.length; z++) {
|
|
@@ -27372,6 +27886,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27372
27886
|
CriticalPath.prototype.slackCalculation = function (fromDataObject, collection, collectionTaskId, checkEndDate, flatRecords, modelRecordIds) {
|
|
27373
27887
|
var fromDateArray = fromDataObject[0]['fromdata'].split(',');
|
|
27374
27888
|
var fromDataPredecessor = fromDataObject[0]['fromDataPredecessor'].split(',');
|
|
27889
|
+
collectionTaskId = collectionTaskId.toString();
|
|
27890
|
+
collectionTaskId = collectionTaskId.split(',');
|
|
27375
27891
|
var fromDateArray1 = [];
|
|
27376
27892
|
var fromTaskIdIndex;
|
|
27377
27893
|
var indexFromTaskId;
|
|
@@ -27383,8 +27899,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27383
27899
|
var ffslack;
|
|
27384
27900
|
for (var i = 0; i < fromDateArray.length; i++) {
|
|
27385
27901
|
fromDateArray1 = fromDateArray[i].split(':');
|
|
27386
|
-
fromTaskIdIndex = collectionTaskId.indexOf(
|
|
27387
|
-
totaskId = collectionTaskId.indexOf(
|
|
27902
|
+
fromTaskIdIndex = collectionTaskId.indexOf((fromDateArray1[0].toString()));
|
|
27903
|
+
totaskId = collectionTaskId.indexOf((fromDataObject[0]['todateID'].toString()));
|
|
27388
27904
|
if (this.parent.viewType === 'ProjectView') {
|
|
27389
27905
|
indexFromTaskId = modelRecordIds.indexOf(fromDateArray1[0].toString());
|
|
27390
27906
|
indexToTaskId = modelRecordIds.indexOf(fromDataObject[0]['todateID'].toString());
|
|
@@ -27729,6 +28245,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27729
28245
|
CriticalPath.prototype.finalCriticalPath = function (collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
|
|
27730
28246
|
var criticalPathIds = [];
|
|
27731
28247
|
var index;
|
|
28248
|
+
var predecessorFrom;
|
|
27732
28249
|
for (var x = collection.length - 1; x >= 0; x--) {
|
|
27733
28250
|
if (this.parent.viewType === 'ProjectView') {
|
|
27734
28251
|
index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
|
|
@@ -27772,7 +28289,13 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27772
28289
|
/* eslint-disable-next-line */
|
|
27773
28290
|
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.endDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27774
28291
|
}
|
|
27775
|
-
if (
|
|
28292
|
+
if (typeof (flatRecords[index][this.parent.taskFields.id]) === 'number') {
|
|
28293
|
+
predecessorFrom = parseInt(predecessorLength[i].from, 10);
|
|
28294
|
+
}
|
|
28295
|
+
else {
|
|
28296
|
+
predecessorFrom = predecessorLength[i].from;
|
|
28297
|
+
}
|
|
28298
|
+
if (predecessorFrom === flatRecords[index][this.parent.taskFields.id] &&
|
|
27776
28299
|
flatRecords[toID].slack === noSlackValue && dateDifference <= 0) {
|
|
27777
28300
|
flatRecords[index].slack = noSlackValue;
|
|
27778
28301
|
flatRecords[index].ganttProperties.slack = noSlackValue;
|
|
@@ -27807,26 +28330,47 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27807
28330
|
CriticalPath.prototype.criticalConnectorLine = function (criticalPathIds, collection, condition, collectionTaskId) {
|
|
27808
28331
|
var ganttChartElement = this.parent.ganttChartModule.chartElement;
|
|
27809
28332
|
this.parent.removeCriticalPathStyles();
|
|
27810
|
-
|
|
27811
|
-
var criticalData
|
|
27812
|
-
if (
|
|
27813
|
-
criticalData =
|
|
28333
|
+
var _loop_2 = function (i) {
|
|
28334
|
+
var criticalData;
|
|
28335
|
+
if (this_2.parent.viewType === 'ProjectView') {
|
|
28336
|
+
criticalData = this_2.parent.currentViewData[this_2.parent.ids.indexOf(criticalPathIds[i].toString())];
|
|
27814
28337
|
}
|
|
27815
28338
|
else {
|
|
27816
|
-
|
|
28339
|
+
var currentRecords = this_2.parent.currentViewData.filter(function (data) {
|
|
28340
|
+
return (data.ganttProperties.taskId).toString() == criticalPathIds[i].toString();
|
|
28341
|
+
});
|
|
28342
|
+
for (var i_1 = 0; i_1 < currentRecords.length; i_1++) {
|
|
28343
|
+
if (currentRecords[i_1].ganttProperties.isCritical || currentRecords[i_1].ganttProperties.endDate >= this_2.maxEndDate) {
|
|
28344
|
+
criticalData = currentRecords[i_1];
|
|
28345
|
+
}
|
|
28346
|
+
}
|
|
27817
28347
|
}
|
|
27818
|
-
var index =
|
|
27819
|
-
var element =
|
|
28348
|
+
var index = this_2.parent.currentViewData.indexOf(criticalData);
|
|
28349
|
+
var element = this_2.parent.getRowByIndex(index);
|
|
27820
28350
|
var taskClass = void 0;
|
|
27821
|
-
var columnFields =
|
|
28351
|
+
var columnFields = this_2.parent.taskFields;
|
|
28352
|
+
if (criticalData.parentItem) {
|
|
28353
|
+
var parentRecord = this_2.parent.currentViewData.filter(function (data) {
|
|
28354
|
+
return criticalData.parentItem.uniqueID == data.uniqueID;
|
|
28355
|
+
});
|
|
28356
|
+
var parentIndex = this_2.parent.currentViewData.indexOf(parentRecord[0]);
|
|
28357
|
+
var parentElement = this_2.parent.getRowByIndex(parentIndex);
|
|
28358
|
+
var parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
|
|
28359
|
+
for (var i_2 = 0; i_2 < parentTaskbarElement.length; i_2++) {
|
|
28360
|
+
if (parentTaskbarElement[i_2].getAttribute('rowuniqueid') == criticalData['rowUniqueID']) {
|
|
28361
|
+
addClass(parentTaskbarElement[i_2].querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
28362
|
+
}
|
|
28363
|
+
}
|
|
28364
|
+
}
|
|
27822
28365
|
/* eslint-disable-next-line */
|
|
27823
|
-
if (
|
|
28366
|
+
if (this_2.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
27824
28367
|
taskClass = criticalUnscheduledTask;
|
|
27825
28368
|
}
|
|
27826
28369
|
else {
|
|
27827
28370
|
taskClass = criticalChildProgressBarInnerDiv;
|
|
27828
28371
|
}
|
|
27829
|
-
if (element
|
|
28372
|
+
if (element && (this_2.parent.viewType === 'ProjectView' || (this_2.parent.viewType === 'ResourceView' &&
|
|
28373
|
+
!criticalData.hasChildRecords))) {
|
|
27830
28374
|
if (element.getElementsByClassName('e-milestone-top')[0]) {
|
|
27831
28375
|
addClass(element.querySelectorAll('.e-milestone-top'), criticalMilestoneTop);
|
|
27832
28376
|
}
|
|
@@ -27840,19 +28384,32 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27840
28384
|
addClass(element.querySelectorAll('.e-gantt-child-progressbar-inner-div'), taskClass);
|
|
27841
28385
|
}
|
|
27842
28386
|
}
|
|
28387
|
+
};
|
|
28388
|
+
var this_2 = this;
|
|
28389
|
+
for (var i = 0; i < criticalPathIds.length; i++) {
|
|
28390
|
+
_loop_2(i);
|
|
27843
28391
|
}
|
|
27844
28392
|
if (collection.length !== 0) {
|
|
27845
28393
|
var index = 0;
|
|
27846
28394
|
var currentdata = void 0;
|
|
27847
28395
|
var checking = [];
|
|
27848
28396
|
var checkint = void 0;
|
|
28397
|
+
var values = void 0;
|
|
27849
28398
|
for (var i = 0; i < this.criticalPathCollection.length; i++) {
|
|
27850
28399
|
index = collectionTaskId.indexOf(this.criticalPathCollection[i]);
|
|
27851
28400
|
currentdata = collection[index];
|
|
27852
28401
|
if (index !== -1 && currentdata['to']) {
|
|
27853
28402
|
checking = currentdata['to'].split(',');
|
|
27854
28403
|
for (var j = 0; j < checking.length; j++) {
|
|
27855
|
-
|
|
28404
|
+
values = checking[j].split('+');
|
|
28405
|
+
if (checking[j].indexOf('-') >= 0) {
|
|
28406
|
+
values = checking[j].split('-');
|
|
28407
|
+
|
|
28408
|
+
}
|
|
28409
|
+
checkint = (values[0].replace(":", ""));
|
|
28410
|
+
if (typeof (criticalPathIds[j]) === "number") {
|
|
28411
|
+
checkint = parseInt(values[0], 10);
|
|
28412
|
+
}
|
|
27856
28413
|
if (criticalPathIds.indexOf(checkint) !== -1) {
|
|
27857
28414
|
var lineElement = this.parent.element.querySelectorAll('#ConnectorLineparent' +
|
|
27858
28415
|
currentdata['taskid'] + 'child' + checkint);
|
|
@@ -27984,7 +28541,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
27984
28541
|
}
|
|
27985
28542
|
switch (this.item) {
|
|
27986
28543
|
case 'TaskInformation':
|
|
27987
|
-
|
|
28544
|
+
if (isNaN(Number(this.rowData.ganttProperties.rowUniqueID))) {
|
|
28545
|
+
this.parent.openEditDialog(this.rowData.ganttProperties.rowUniqueID);
|
|
28546
|
+
}
|
|
28547
|
+
else {
|
|
28548
|
+
this.parent.openEditDialog(Number(this.rowData.ganttProperties.rowUniqueID));
|
|
28549
|
+
}
|
|
27988
28550
|
break;
|
|
27989
28551
|
case 'Above':
|
|
27990
28552
|
case 'Below':
|
|
@@ -28797,7 +29359,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28797
29359
|
};
|
|
28798
29360
|
RowDD$$1.prototype.rowDragStartHelper = function (args) {
|
|
28799
29361
|
this.parent.trigger('rowDragStartHelper', args);
|
|
28800
|
-
if (this.parent.readOnly
|
|
29362
|
+
if (this.parent.readOnly) {
|
|
28801
29363
|
args.cancel = true;
|
|
28802
29364
|
}
|
|
28803
29365
|
if (this.parent.viewType === 'ResourceView' && getValue('level', args.data[0]) === 0) {
|
|
@@ -28933,7 +29495,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28933
29495
|
var uniqueTaskID_1 = this_1.parent.taskFields.id;
|
|
28934
29496
|
if (draggedRecord.index < droppedRecord.index) {
|
|
28935
29497
|
startIndex = draggedRecord.index;
|
|
28936
|
-
var
|
|
29498
|
+
var _loop_3 = function (i_1) {
|
|
28937
29499
|
var currentData = this_1.parent.currentViewData.filter(function (e) {
|
|
28938
29500
|
return e[uniqueTaskID_1] === ganttData_1[i_1][uniqueTaskID_1];
|
|
28939
29501
|
})[0];
|
|
@@ -28943,14 +29505,14 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28943
29505
|
}
|
|
28944
29506
|
};
|
|
28945
29507
|
for (var i_1 = 0; i_1 < ganttData_1.length; i_1++) {
|
|
28946
|
-
var state_2 =
|
|
29508
|
+
var state_2 = _loop_3(i_1);
|
|
28947
29509
|
if (state_2 === "break")
|
|
28948
29510
|
break;
|
|
28949
29511
|
}
|
|
28950
29512
|
}
|
|
28951
29513
|
else {
|
|
28952
29514
|
startIndex = droppedRecord.index;
|
|
28953
|
-
var
|
|
29515
|
+
var _loop_4 = function (i_2) {
|
|
28954
29516
|
var currentData = this_1.parent.currentViewData.filter(function (e) {
|
|
28955
29517
|
return e[uniqueTaskID_1] === ganttData_1[i_2][uniqueTaskID_1];
|
|
28956
29518
|
})[0];
|
|
@@ -28960,12 +29522,12 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28960
29522
|
}
|
|
28961
29523
|
};
|
|
28962
29524
|
for (var i_2 = 0; i_2 < ganttData_1.length; i_2++) {
|
|
28963
|
-
var state_3 =
|
|
29525
|
+
var state_3 = _loop_4(i_2);
|
|
28964
29526
|
if (state_3 === "break")
|
|
28965
29527
|
break;
|
|
28966
29528
|
}
|
|
28967
29529
|
}
|
|
28968
|
-
var
|
|
29530
|
+
var _loop_5 = function (i_3) {
|
|
28969
29531
|
if (!isNullOrUndefined(data_1[i_3])) {
|
|
28970
29532
|
data_1[i_3].index = i_3;
|
|
28971
29533
|
if (!isNullOrUndefined(data_1[i_3].parentItem)) {
|
|
@@ -28977,7 +29539,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28977
29539
|
}
|
|
28978
29540
|
};
|
|
28979
29541
|
for (var i_3 = startIndex; i_3 <= endIndex; i_3++) {
|
|
28980
|
-
|
|
29542
|
+
_loop_5(i_3);
|
|
28981
29543
|
}
|
|
28982
29544
|
}
|
|
28983
29545
|
gObj.rowDragAndDropModule.refreshDataSource();
|
|
@@ -29038,6 +29600,66 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
29038
29600
|
this.updateSharedResourceTask();
|
|
29039
29601
|
}
|
|
29040
29602
|
}
|
|
29603
|
+
if (this.parent.taskFields.dependency) {
|
|
29604
|
+
var isValidPredecessor = true;
|
|
29605
|
+
var draggedParent = void 0;
|
|
29606
|
+
var toParent_1;
|
|
29607
|
+
if (draggedRecord.parentItem) {
|
|
29608
|
+
draggedParent = this.parent.currentViewData[this.parent.ids.indexOf(draggedRecord.parentItem.taskId)];
|
|
29609
|
+
}
|
|
29610
|
+
else {
|
|
29611
|
+
draggedParent = draggedRecord;
|
|
29612
|
+
}
|
|
29613
|
+
if (droppedRecord.parentItem) {
|
|
29614
|
+
toParent_1 = this.parent.currentViewData[this.parent.ids.indexOf(droppedRecord.parentItem.taskId)];
|
|
29615
|
+
}
|
|
29616
|
+
else {
|
|
29617
|
+
toParent_1 = droppedRecord;
|
|
29618
|
+
}
|
|
29619
|
+
var validateRecords = void 0;
|
|
29620
|
+
if (toParent_1.uniqueID === draggedParent.uniqueID || (draggedParent.parentItem &&
|
|
29621
|
+
toParent_1.uniqueID == this.parent.currentViewData[this.parent.ids.indexOf(draggedParent.parentItem.taskId)].uniqueID)) {
|
|
29622
|
+
validateRecords = this.parent.currentViewData.filter(function (data) {
|
|
29623
|
+
if ((data.ganttProperties.predecessor && data.ganttProperties.predecessor.length > 0)) {
|
|
29624
|
+
for (var i = 0; i < data.ganttProperties.predecessor.length; i++) {
|
|
29625
|
+
return (parseInt(data.ganttProperties.predecessor[i].to) === parseInt(toParent_1.ganttProperties.taskId) ||
|
|
29626
|
+
parseInt(data.ganttProperties.predecessor[i].from) === parseInt(toParent_1.ganttProperties.taskId));
|
|
29627
|
+
}
|
|
29628
|
+
}
|
|
29629
|
+
return null;
|
|
29630
|
+
});
|
|
29631
|
+
var predName = [];
|
|
29632
|
+
for (var i = 0; i < validateRecords.length; i++) {
|
|
29633
|
+
predName = [];
|
|
29634
|
+
if (validateRecords[i].ganttProperties.predecessor) {
|
|
29635
|
+
for (var k = 0; k < validateRecords[i].ganttProperties.predecessor.length; k++) {
|
|
29636
|
+
if (parseInt(validateRecords[i].ganttProperties.taskId) !==
|
|
29637
|
+
parseInt(validateRecords[i].ganttProperties.predecessor[k].from)) {
|
|
29638
|
+
predName.push(validateRecords[i].ganttProperties.predecessor[k].from);
|
|
29639
|
+
}
|
|
29640
|
+
else {
|
|
29641
|
+
predName.push(validateRecords[i].ganttProperties.predecessor[k].to);
|
|
29642
|
+
}
|
|
29643
|
+
}
|
|
29644
|
+
}
|
|
29645
|
+
var _loop_2 = function (j) {
|
|
29646
|
+
var name_1 = predName[j].replace(/\D/g, '');
|
|
29647
|
+
var toRec = this_2.parent.currentViewData.filter(function (data) {
|
|
29648
|
+
return parseInt(data.ganttProperties.taskId) == parseInt(name_1);
|
|
29649
|
+
});
|
|
29650
|
+
isValidPredecessor = this_2.parent.connectorLineEditModule.validateParentPredecessor(validateRecords[i], toRec[0]);
|
|
29651
|
+
if (!isValidPredecessor) {
|
|
29652
|
+
this_2.parent.dataOperation['resetDependency'](validateRecords[i]);
|
|
29653
|
+
this_2.parent.dataOperation['resetDependency'](toRec[0]);
|
|
29654
|
+
}
|
|
29655
|
+
};
|
|
29656
|
+
var this_2 = this;
|
|
29657
|
+
for (var j = 0; j < predName.length; j++) {
|
|
29658
|
+
_loop_2(j);
|
|
29659
|
+
}
|
|
29660
|
+
}
|
|
29661
|
+
}
|
|
29662
|
+
}
|
|
29041
29663
|
// method to update the edited parent records
|
|
29042
29664
|
for (var j = 0; j < this.updateParentRecords.length; j++) {
|
|
29043
29665
|
this.parent.dataOperation.updateParentItems(this.updateParentRecords[j]);
|
|
@@ -29418,7 +30040,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
29418
30040
|
}
|
|
29419
30041
|
var idx = void 0;
|
|
29420
30042
|
var ganttData = dataSource.length > 0 && this.parent.viewType !== 'ResourceView' ?
|
|
29421
|
-
dataSource : this.parent.
|
|
30043
|
+
dataSource : this.parent.flatData;
|
|
29422
30044
|
for (var i = 0; i < ganttData.length; i++) {
|
|
29423
30045
|
if (this.parent.viewType === 'ResourceView') {
|
|
29424
30046
|
if (ganttData[i].ganttProperties.rowUniqueID === deletedRow.ganttProperties.rowUniqueID) {
|
|
@@ -32977,215 +33599,217 @@ var PdfGanttPredecessor = /** @__PURE__ @class */ (function () {
|
|
|
32977
33599
|
var childPageData;
|
|
32978
33600
|
var parentY = 0;
|
|
32979
33601
|
var childY = 0;
|
|
32980
|
-
|
|
32981
|
-
|
|
32982
|
-
|
|
32983
|
-
startPage
|
|
32984
|
-
|
|
32985
|
-
|
|
32986
|
-
|
|
32987
|
-
|
|
32988
|
-
if (this.
|
|
32989
|
-
|
|
33602
|
+
if (childTask && parentTask) {
|
|
33603
|
+
switch (this.type) {
|
|
33604
|
+
case 'FS':
|
|
33605
|
+
if (childTask.startPage > -1 && parentTask.endPage > -1) {
|
|
33606
|
+
startPage = pages[parentTask.endPage];
|
|
33607
|
+
endPage = pages[childTask.startPage];
|
|
33608
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
33609
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
33610
|
+
if (this.parentIndex < this.childIndex) {
|
|
33611
|
+
if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
|
|
33612
|
+
predecessorType = 'FSType1';
|
|
33613
|
+
}
|
|
33614
|
+
else {
|
|
33615
|
+
predecessorType = 'FSType2';
|
|
33616
|
+
}
|
|
32990
33617
|
}
|
|
32991
33618
|
else {
|
|
32992
|
-
|
|
33619
|
+
if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
|
|
33620
|
+
predecessorType = 'FSType3';
|
|
33621
|
+
}
|
|
33622
|
+
else {
|
|
33623
|
+
predecessorType = 'FSType4';
|
|
33624
|
+
}
|
|
32993
33625
|
}
|
|
32994
33626
|
}
|
|
32995
33627
|
else {
|
|
32996
|
-
|
|
32997
|
-
predecessorType = 'FSType3';
|
|
32998
|
-
}
|
|
32999
|
-
else {
|
|
33000
|
-
predecessorType = 'FSType4';
|
|
33001
|
-
}
|
|
33628
|
+
return;
|
|
33002
33629
|
}
|
|
33003
|
-
|
|
33004
|
-
|
|
33005
|
-
|
|
33006
|
-
|
|
33007
|
-
|
|
33008
|
-
|
|
33009
|
-
|
|
33010
|
-
|
|
33011
|
-
|
|
33012
|
-
|
|
33013
|
-
|
|
33014
|
-
|
|
33015
|
-
|
|
33016
|
-
|
|
33630
|
+
break;
|
|
33631
|
+
case 'SF':
|
|
33632
|
+
if (childTask.endPage > -1 && parentTask.startPage > -1) {
|
|
33633
|
+
startPage = pages[parentTask.startPage];
|
|
33634
|
+
endPage = pages[childTask.endPage];
|
|
33635
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
33636
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
33637
|
+
if (this.parentIndex < this.childIndex) {
|
|
33638
|
+
if (this.parentLeft > this.childLeft + this.childWidth) {
|
|
33639
|
+
predecessorType = 'SFType1';
|
|
33640
|
+
}
|
|
33641
|
+
else {
|
|
33642
|
+
predecessorType = 'SFType2';
|
|
33643
|
+
}
|
|
33017
33644
|
}
|
|
33018
33645
|
else {
|
|
33019
|
-
|
|
33646
|
+
if (this.parentLeft > this.childLeft + this.childWidth) {
|
|
33647
|
+
predecessorType = 'SFType3';
|
|
33648
|
+
}
|
|
33649
|
+
else {
|
|
33650
|
+
predecessorType = 'SFType4';
|
|
33651
|
+
}
|
|
33020
33652
|
}
|
|
33021
33653
|
}
|
|
33022
33654
|
else {
|
|
33023
|
-
|
|
33024
|
-
predecessorType = 'SFType3';
|
|
33025
|
-
}
|
|
33026
|
-
else {
|
|
33027
|
-
predecessorType = 'SFType4';
|
|
33028
|
-
}
|
|
33655
|
+
return;
|
|
33029
33656
|
}
|
|
33030
|
-
|
|
33031
|
-
|
|
33032
|
-
|
|
33033
|
-
|
|
33034
|
-
|
|
33035
|
-
|
|
33036
|
-
|
|
33037
|
-
|
|
33038
|
-
|
|
33039
|
-
|
|
33040
|
-
|
|
33041
|
-
|
|
33042
|
-
|
|
33043
|
-
|
|
33657
|
+
break;
|
|
33658
|
+
case 'FF':
|
|
33659
|
+
if (childTask.endPage > -1 && parentTask.endPage > -1) {
|
|
33660
|
+
startPage = pages[parentTask.endPage];
|
|
33661
|
+
endPage = pages[childTask.endPage];
|
|
33662
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
33663
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.endPage - pdfGantt.chartPageIndex];
|
|
33664
|
+
if (this.parentIndex < this.childIndex) {
|
|
33665
|
+
if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
|
|
33666
|
+
predecessorType = 'FFType1';
|
|
33667
|
+
}
|
|
33668
|
+
else {
|
|
33669
|
+
predecessorType = 'FFType2';
|
|
33670
|
+
}
|
|
33044
33671
|
}
|
|
33045
33672
|
else {
|
|
33046
|
-
|
|
33673
|
+
if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
|
|
33674
|
+
predecessorType = 'FFType3';
|
|
33675
|
+
}
|
|
33676
|
+
else {
|
|
33677
|
+
predecessorType = 'FFType4';
|
|
33678
|
+
}
|
|
33047
33679
|
}
|
|
33048
33680
|
}
|
|
33049
33681
|
else {
|
|
33050
|
-
|
|
33051
|
-
predecessorType = 'FFType3';
|
|
33052
|
-
}
|
|
33053
|
-
else {
|
|
33054
|
-
predecessorType = 'FFType4';
|
|
33055
|
-
}
|
|
33682
|
+
return;
|
|
33056
33683
|
}
|
|
33057
|
-
|
|
33058
|
-
|
|
33059
|
-
|
|
33060
|
-
|
|
33061
|
-
|
|
33062
|
-
|
|
33063
|
-
|
|
33064
|
-
|
|
33065
|
-
|
|
33066
|
-
|
|
33067
|
-
|
|
33068
|
-
|
|
33069
|
-
|
|
33070
|
-
|
|
33684
|
+
break;
|
|
33685
|
+
case 'SS':
|
|
33686
|
+
if (childTask.startPage > -1 && parentTask.startPage > -1) {
|
|
33687
|
+
startPage = pages[parentTask.startPage];
|
|
33688
|
+
endPage = pages[childTask.startPage];
|
|
33689
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.startPage - pdfGantt.chartPageIndex];
|
|
33690
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
33691
|
+
if (this.parentIndex < this.childIndex) {
|
|
33692
|
+
if (this.parentLeft >= this.childLeft) {
|
|
33693
|
+
predecessorType = 'SSType1';
|
|
33694
|
+
}
|
|
33695
|
+
else {
|
|
33696
|
+
predecessorType = 'SSType2';
|
|
33697
|
+
}
|
|
33071
33698
|
}
|
|
33072
33699
|
else {
|
|
33073
|
-
|
|
33700
|
+
if (this.parentLeft >= this.childLeft) {
|
|
33701
|
+
predecessorType = 'SSType3';
|
|
33702
|
+
}
|
|
33703
|
+
else {
|
|
33704
|
+
predecessorType = 'SSType4';
|
|
33705
|
+
}
|
|
33074
33706
|
}
|
|
33075
33707
|
}
|
|
33076
33708
|
else {
|
|
33077
|
-
|
|
33078
|
-
predecessorType = 'SSType3';
|
|
33079
|
-
}
|
|
33080
|
-
else {
|
|
33081
|
-
predecessorType = 'SSType4';
|
|
33082
|
-
}
|
|
33709
|
+
return;
|
|
33083
33710
|
}
|
|
33084
|
-
|
|
33085
|
-
|
|
33086
|
-
|
|
33087
|
-
|
|
33088
|
-
|
|
33089
|
-
|
|
33090
|
-
|
|
33091
|
-
|
|
33092
|
-
|
|
33093
|
-
|
|
33094
|
-
|
|
33095
|
-
|
|
33096
|
-
|
|
33097
|
-
|
|
33098
|
-
|
|
33099
|
-
|
|
33100
|
-
|
|
33101
|
-
|
|
33102
|
-
|
|
33103
|
-
|
|
33104
|
-
|
|
33105
|
-
|
|
33106
|
-
|
|
33107
|
-
|
|
33108
|
-
|
|
33109
|
-
|
|
33110
|
-
|
|
33111
|
-
|
|
33112
|
-
|
|
33113
|
-
|
|
33114
|
-
|
|
33115
|
-
|
|
33116
|
-
|
|
33117
|
-
|
|
33118
|
-
|
|
33119
|
-
|
|
33120
|
-
|
|
33121
|
-
|
|
33122
|
-
|
|
33123
|
-
|
|
33124
|
-
|
|
33125
|
-
|
|
33126
|
-
|
|
33127
|
-
|
|
33128
|
-
|
|
33129
|
-
|
|
33130
|
-
|
|
33131
|
-
|
|
33132
|
-
|
|
33133
|
-
|
|
33134
|
-
|
|
33135
|
-
|
|
33136
|
-
|
|
33137
|
-
|
|
33138
|
-
|
|
33139
|
-
|
|
33140
|
-
|
|
33141
|
-
|
|
33142
|
-
|
|
33143
|
-
|
|
33144
|
-
|
|
33145
|
-
|
|
33146
|
-
|
|
33147
|
-
|
|
33148
|
-
|
|
33149
|
-
|
|
33150
|
-
|
|
33151
|
-
|
|
33152
|
-
|
|
33153
|
-
|
|
33154
|
-
|
|
33155
|
-
|
|
33156
|
-
|
|
33157
|
-
|
|
33158
|
-
|
|
33159
|
-
|
|
33160
|
-
|
|
33161
|
-
|
|
33162
|
-
|
|
33163
|
-
|
|
33164
|
-
|
|
33165
|
-
|
|
33166
|
-
|
|
33167
|
-
|
|
33168
|
-
|
|
33169
|
-
|
|
33170
|
-
|
|
33171
|
-
|
|
33172
|
-
|
|
33173
|
-
|
|
33174
|
-
|
|
33175
|
-
|
|
33176
|
-
|
|
33177
|
-
|
|
33178
|
-
|
|
33179
|
-
|
|
33180
|
-
|
|
33181
|
-
|
|
33182
|
-
|
|
33183
|
-
|
|
33184
|
-
|
|
33185
|
-
|
|
33186
|
-
point6 = sspoint4;
|
|
33187
|
-
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
33188
|
-
break;
|
|
33711
|
+
break;
|
|
33712
|
+
}
|
|
33713
|
+
var midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
|
|
33714
|
+
midPoint = pixelToPoint(midPoint);
|
|
33715
|
+
/* eslint-disable-next-line */
|
|
33716
|
+
var point1 = void 0, point2 = void 0, point3 = void 0, point4 = void 0, point5 = void 0, point6 = void 0;
|
|
33717
|
+
point1 = point2 = point3 = point4 = point5 = point6 = new PointF();
|
|
33718
|
+
var parentTaskpoint = __assign$4({}, parentTask.taskStartPoint);
|
|
33719
|
+
var childTaskpoint = __assign$4({}, childTask.taskStartPoint);
|
|
33720
|
+
parentY = parentTaskpoint.y + parentPageData.startPoint.y;
|
|
33721
|
+
childY = childTaskpoint.y + childPageData.startPoint.y;
|
|
33722
|
+
var ffpoint1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth), parentY + midPoint);
|
|
33723
|
+
var sspoint1 = new PointF(pixelToPoint(this.parentLeft) - 1, parentY + midPoint);
|
|
33724
|
+
var ffpoint3 = new PointF(pixelToPoint(this.childLeft - 20), childY + midPoint);
|
|
33725
|
+
var ffpoint4 = new PointF(pixelToPoint(this.childLeft - 6 - this.lineWidth) - 1, childY + midPoint);
|
|
33726
|
+
var sspoint4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 6 + this.lineWidth) + 1, childY + midPoint);
|
|
33727
|
+
switch (predecessorType) {
|
|
33728
|
+
case 'FSType1':
|
|
33729
|
+
case 'FSType3':
|
|
33730
|
+
point1 = ffpoint1;
|
|
33731
|
+
point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
|
|
33732
|
+
point3 = ffpoint3;
|
|
33733
|
+
point4 = ffpoint4;
|
|
33734
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33735
|
+
break;
|
|
33736
|
+
case 'FSType2':
|
|
33737
|
+
point1 = ffpoint1;
|
|
33738
|
+
point2 = new PointF(point1.x + 10, parentY + midPoint);
|
|
33739
|
+
point3 = new PointF(point1.x + 10, childY + 2);
|
|
33740
|
+
point4 = new PointF(pixelToPoint(this.childLeft - 20), childY + 2);
|
|
33741
|
+
point5 = ffpoint3;
|
|
33742
|
+
point6 = ffpoint4;
|
|
33743
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
33744
|
+
break;
|
|
33745
|
+
case 'FSType4':
|
|
33746
|
+
point1 = ffpoint1;
|
|
33747
|
+
point2 = new PointF(point1.x + 10, parentY + midPoint);
|
|
33748
|
+
point3 = new PointF(point1.x + 10, parentY + 2);
|
|
33749
|
+
point4 = new PointF(pixelToPoint(this.childLeft - 20), parentY + 2);
|
|
33750
|
+
point5 = ffpoint3;
|
|
33751
|
+
point6 = ffpoint4;
|
|
33752
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
33753
|
+
break;
|
|
33754
|
+
case 'FFType1':
|
|
33755
|
+
case 'FFType3':
|
|
33756
|
+
point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
|
|
33757
|
+
point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
|
|
33758
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
33759
|
+
point4 = sspoint4;
|
|
33760
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33761
|
+
break;
|
|
33762
|
+
case 'FFType2':
|
|
33763
|
+
case 'FFType4':
|
|
33764
|
+
point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
|
|
33765
|
+
point2 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth + 20), parentY + midPoint);
|
|
33766
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
33767
|
+
point4 = sspoint4;
|
|
33768
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33769
|
+
break;
|
|
33770
|
+
case 'SSType1':
|
|
33771
|
+
case 'SSType3':
|
|
33772
|
+
point1 = sspoint1;
|
|
33773
|
+
point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
|
|
33774
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
33775
|
+
point4 = ffpoint4;
|
|
33776
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33777
|
+
break;
|
|
33778
|
+
case 'SSType2':
|
|
33779
|
+
case 'SSType4':
|
|
33780
|
+
point1 = sspoint1;
|
|
33781
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
33782
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
33783
|
+
point4 = ffpoint4;
|
|
33784
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33785
|
+
break;
|
|
33786
|
+
case 'SFType1':
|
|
33787
|
+
case 'SFType3':
|
|
33788
|
+
point1 = sspoint1;
|
|
33789
|
+
point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
|
|
33790
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
33791
|
+
point4 = sspoint4;
|
|
33792
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33793
|
+
break;
|
|
33794
|
+
case 'SFType2':
|
|
33795
|
+
point1 = sspoint1;
|
|
33796
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
33797
|
+
point3 = new PointF(point2.x, childY + 2);
|
|
33798
|
+
point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), childY + 2);
|
|
33799
|
+
point5 = new PointF(point4.x, childY + midPoint);
|
|
33800
|
+
point6 = sspoint4;
|
|
33801
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
33802
|
+
break;
|
|
33803
|
+
case 'SFType4':
|
|
33804
|
+
point1 = sspoint1;
|
|
33805
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
33806
|
+
point3 = new PointF(point2.x, parentY + 2);
|
|
33807
|
+
point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + 2);
|
|
33808
|
+
point5 = new PointF(point4.x, childY + midPoint);
|
|
33809
|
+
point6 = sspoint4;
|
|
33810
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
33811
|
+
break;
|
|
33812
|
+
}
|
|
33189
33813
|
}
|
|
33190
33814
|
};
|
|
33191
33815
|
/**
|