@syncfusion/ej2-gantt 20.2.49 → 20.3.47
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 +20 -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 +970 -379
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1019 -413
- 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 +130 -15
- package/src/gantt/actions/edit.js +101 -26
- package/src/gantt/actions/filter.d.ts +3 -1
- package/src/gantt/actions/filter.js +32 -44
- 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/actions/toolbar.js +1 -1
- package/src/gantt/base/enum.d.ts +3 -1
- package/src/gantt/base/gantt-chart.js +8 -6
- package/src/gantt/base/gantt.d.ts +6 -6
- package/src/gantt/base/gantt.js +10 -3
- 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/tooltip.js +2 -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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, addClass, append, classList, closest, compile, createElement, deleteObject, extend, formatUnit, getValue, isNullOrUndefined, isObject, isObjectArray, isUndefined, merge, remove, removeClass, setValue } from '@syncfusion/ej2-base';
|
|
2
2
|
import { Dialog, Tooltip, createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
|
3
|
-
import { Edit, ForeignKey, Grid, Page, Predicate, Toolbar, ValueFormatter, click, filterAfterOpen, getActualProperties, getCustomDateFormat,
|
|
3
|
+
import { Edit, ForeignKey, Grid, Page, Predicate, Toolbar, ValueFormatter, click, filterAfterOpen, getActualProperties, getCustomDateFormat, getForeignData, getObject, getUid, parentsUntil, setCssInGridPopUp } from '@syncfusion/ej2-grids';
|
|
4
4
|
import { CacheAdaptor, DataManager, DataUtil, Deferred, ODataAdaptor, ODataV4Adaptor, Query, RemoteSaveAdaptor, UrlAdaptor, WebApiAdaptor, WebMethodAdaptor } from '@syncfusion/ej2-data';
|
|
5
5
|
import { ColumnMenu, ContextMenu, Edit as Edit$1, ExcelExport, Filter, Reorder, Resize, RowDD, Selection, Sort, TreeGrid, VirtualScroll } from '@syncfusion/ej2-treegrid';
|
|
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
|
|
@@ -7510,11 +7518,30 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7510
7518
|
*/
|
|
7511
7519
|
GanttTreeGrid.prototype.composeIDColumn = function (column) {
|
|
7512
7520
|
var isProjectView = this.parent.viewType === 'ProjectView';
|
|
7521
|
+
var lengthDataSource = this.parent.dataSource['length'];
|
|
7522
|
+
var taskIDName;
|
|
7513
7523
|
column.isPrimaryKey = isProjectView ? true : false;
|
|
7514
7524
|
column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('id');
|
|
7515
7525
|
column.width = column.width ? column.width : 100;
|
|
7516
|
-
|
|
7517
|
-
|
|
7526
|
+
for (var i = 0; i < lengthDataSource; i++) {
|
|
7527
|
+
if (!isNullOrUndefined(this.parent.dataSource[i][this.parent.taskFields.id])) {
|
|
7528
|
+
taskIDName = this.parent.dataSource[i][this.parent.taskFields.id];
|
|
7529
|
+
break;
|
|
7530
|
+
}
|
|
7531
|
+
}
|
|
7532
|
+
if (typeof (taskIDName) === "string") {
|
|
7533
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
7534
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
7535
|
+
}
|
|
7536
|
+
else {
|
|
7537
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : true;
|
|
7538
|
+
}
|
|
7539
|
+
column.editType = column.editType ? column.editType : 'stringedit';
|
|
7540
|
+
}
|
|
7541
|
+
else {
|
|
7542
|
+
column.allowEditing = column.allowEditing ? column.allowEditing : false;
|
|
7543
|
+
column.editType = column.editType ? column.editType : 'numericedit';
|
|
7544
|
+
}
|
|
7518
7545
|
column.valueAccessor = isProjectView ? null : this.idValueAccessor.bind(this);
|
|
7519
7546
|
};
|
|
7520
7547
|
GanttTreeGrid.prototype.composeUniqueIDColumn = function (column) {
|
|
@@ -8508,7 +8535,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8508
8535
|
* @private
|
|
8509
8536
|
*/
|
|
8510
8537
|
ChartRows.prototype.getIndicatorNode = function (indicator) {
|
|
8511
|
-
var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '"
|
|
8538
|
+
var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '"style="line-height:'
|
|
8512
8539
|
+ (this.parent.rowHeight) + 'px;' +
|
|
8513
8540
|
'left:' + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
|
|
8514
8541
|
return this.createDivElement(templateString);
|
|
@@ -9024,7 +9051,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9024
9051
|
*/
|
|
9025
9052
|
ChartRows.prototype.getTaskBaselineNode = function () {
|
|
9026
9053
|
var data = this.templateData;
|
|
9027
|
-
var template = '<div class="' + baselineBar + ' ' + '" role="
|
|
9054
|
+
var template = '<div class="' + baselineBar + ' ' + '" role="term" style="margin-top:' + this.baselineTop +
|
|
9028
9055
|
'px;left:' + data.ganttProperties.baselineLeft + 'px;' +
|
|
9029
9056
|
'width:' + data.ganttProperties.baselineWidth + 'px;height:' +
|
|
9030
9057
|
this.baselineHeight + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + '"></div>';
|
|
@@ -9277,10 +9304,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9277
9304
|
var className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
|
|
9278
9305
|
'e-chart-row-border' : '';
|
|
9279
9306
|
table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + '"' +
|
|
9280
|
-
'
|
|
9307
|
+
'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
|
|
9281
9308
|
this.parent.rowHeight + 'px;">' +
|
|
9282
9309
|
'<td class="' + chartRowCell + ' ' + className
|
|
9283
|
-
+ '"
|
|
9310
|
+
+ '"style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
|
|
9284
9311
|
return table.childNodes;
|
|
9285
9312
|
};
|
|
9286
9313
|
/**
|
|
@@ -9345,7 +9372,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9345
9372
|
};
|
|
9346
9373
|
ChartRows.prototype.leftLabelContainer = function () {
|
|
9347
9374
|
var template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? leftLabelTempContainer :
|
|
9348
|
-
leftLabelContainer) + ' ' + '" tabindex="-1" role="
|
|
9375
|
+
leftLabelContainer) + ' ' + '" tabindex="-1" role="term" style="height:' +
|
|
9349
9376
|
(this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
|
|
9350
9377
|
return this.createDivElement(template);
|
|
9351
9378
|
};
|
|
@@ -9357,7 +9384,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9357
9384
|
var template = '<div class="' + taskBarMainContainer + ' ' +
|
|
9358
9385
|
this.parent.getUnscheduledTaskClass(data.ganttProperties) + ' ' +
|
|
9359
9386
|
((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
|
|
9360
|
-
' tabindex="-1" role="
|
|
9387
|
+
' tabindex="-1" role="term" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
|
|
9361
9388
|
('width:' + this.milestoneHeight + 'px;height:' +
|
|
9362
9389
|
this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;left:' + (data.ganttProperties.left -
|
|
9363
9390
|
(this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
|
|
@@ -9368,26 +9395,26 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9368
9395
|
};
|
|
9369
9396
|
ChartRows.prototype.rightLabelContainer = function () {
|
|
9370
9397
|
var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? rightLabelTempContainer :
|
|
9371
|
-
rightLabelContainer) + '" ' + ' tabindex="-1" role="
|
|
9398
|
+
rightLabelContainer) + '" ' + ' tabindex="-1" role="term" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
|
|
9372
9399
|
+ (this.parent.rowHeight - 2) + 'px;"></div>';
|
|
9373
9400
|
return this.createDivElement(template);
|
|
9374
9401
|
};
|
|
9375
9402
|
ChartRows.prototype.childTaskbarLeftResizer = function () {
|
|
9376
9403
|
var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
|
|
9377
9404
|
var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
|
|
9378
|
-
'
|
|
9405
|
+
'style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9379
9406
|
return this.createDivElement(template);
|
|
9380
9407
|
};
|
|
9381
9408
|
ChartRows.prototype.childTaskbarRightResizer = function () {
|
|
9382
9409
|
var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
|
|
9383
9410
|
var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
|
|
9384
|
-
'
|
|
9411
|
+
'style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
|
|
9385
9412
|
'height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9386
9413
|
return this.createDivElement(template);
|
|
9387
9414
|
};
|
|
9388
9415
|
ChartRows.prototype.childTaskbarProgressResizer = function () {
|
|
9389
9416
|
var template = '<div class="' + childProgressResizer + '"' +
|
|
9390
|
-
'
|
|
9417
|
+
'style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
|
|
9391
9418
|
(this.taskBarHeight - 4) + 'px;"><div class="' + progressBarHandler + '"' +
|
|
9392
9419
|
'><div class="' + progressHandlerElement + '"></div>' +
|
|
9393
9420
|
'<div class="' + progressBarHandlerAfter + '"></div></div>';
|
|
@@ -9398,9 +9425,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9398
9425
|
var pointerLeft = -((this.parent.isAdaptive ? 14 : 2) + this.connectorPointWidth);
|
|
9399
9426
|
var mileStoneLeft = -(this.connectorPointWidth + 2);
|
|
9400
9427
|
var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9428
|
+
var marginTop;
|
|
9429
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9430
|
+
marginTop = '';
|
|
9431
|
+
}
|
|
9432
|
+
else {
|
|
9433
|
+
marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
|
|
9434
|
+
}
|
|
9401
9435
|
var template = '<div class="' + leftConnectorPointOuterDiv + '" style="' +
|
|
9402
9436
|
((data.ganttProperties.isMilestone) ? ('margin-top:' + pointerTop + 'px;left:' + mileStoneLeft +
|
|
9403
|
-
'px;') : (
|
|
9437
|
+
'px;') : (marginTop + ';left:' + pointerLeft + 'px;')) + '">' +
|
|
9404
9438
|
'<div class="' + connectorPointLeft + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
|
|
9405
9439
|
'" style="width: ' + this.connectorPointWidth + 'px;' +
|
|
9406
9440
|
'height: ' + this.connectorPointWidth + 'px;">' + this.touchLeftConnectorpoint + '</div></div>';
|
|
@@ -9410,10 +9444,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9410
9444
|
var data = this.templateData;
|
|
9411
9445
|
var pointerRight = this.parent.isAdaptive ? 10 : -2;
|
|
9412
9446
|
var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9447
|
+
var marginTop;
|
|
9448
|
+
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
|
|
9449
|
+
marginTop = '';
|
|
9450
|
+
}
|
|
9451
|
+
else {
|
|
9452
|
+
marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
|
|
9453
|
+
}
|
|
9413
9454
|
var template = '<div class="' + rightConnectorPointOuterDiv + '" style="' +
|
|
9414
9455
|
((data.ganttProperties.isMilestone) ? ('left:' + (this.milestoneHeight - 2) + 'px;margin-top:' +
|
|
9415
|
-
pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;
|
|
9416
|
-
this.connectorPointMargin + 'px;')) + '">' +
|
|
9456
|
+
pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;' + marginTop + ';')) + '">' +
|
|
9417
9457
|
'<div class="' + connectorPointRight + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
|
|
9418
9458
|
'" style="width:' + this.connectorPointWidth + 'px;height:' + this.connectorPointWidth + 'px;">' +
|
|
9419
9459
|
this.touchRightConnectorpoint + '</div></div>';
|
|
@@ -9713,14 +9753,17 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9713
9753
|
var taskbarContainerNode = this.taskbarContainer();
|
|
9714
9754
|
taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
|
|
9715
9755
|
taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
|
|
9716
|
-
|
|
9717
|
-
|
|
9756
|
+
var connectorLineLeftNode = this.getLeftPointNode();
|
|
9757
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
9718
9758
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9719
9759
|
}
|
|
9720
9760
|
if (this.templateData.hasChildRecords) {
|
|
9721
9761
|
var parentTaskbarTemplateNode = this.getParentTaskbarNode(i, taskbarContainerNode);
|
|
9722
9762
|
if (!this.templateData.ganttProperties.isAutoSchedule) {
|
|
9723
9763
|
var manualTaskbar = this.getManualTaskbar();
|
|
9764
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
|
|
9765
|
+
var connectorLineRightNode = this.getRightPointNode();
|
|
9766
|
+
manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
9724
9767
|
taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
|
|
9725
9768
|
}
|
|
9726
9769
|
if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
|
|
@@ -9795,7 +9838,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9795
9838
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
9796
9839
|
}
|
|
9797
9840
|
}
|
|
9798
|
-
if (!this.templateData.hasChildRecords) {
|
|
9841
|
+
if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
|
|
9799
9842
|
var connectorLineRightNode = this.getRightPointNode();
|
|
9800
9843
|
taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
|
|
9801
9844
|
}
|
|
@@ -10198,6 +10241,21 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10198
10241
|
}
|
|
10199
10242
|
return defaultValue;
|
|
10200
10243
|
};
|
|
10244
|
+
ChartRows.prototype.generateBaselineAriaLabel = function (data) {
|
|
10245
|
+
data = this.templateData;
|
|
10246
|
+
var defaultValue = '';
|
|
10247
|
+
var nameConstant = this.parent.localeObj.getConstant('name');
|
|
10248
|
+
var startDateConstant = this.parent.localeObj.getConstant('startDate');
|
|
10249
|
+
var endDateConstant = this.parent.localeObj.getConstant('endDate');
|
|
10250
|
+
var taskNameVal = data.ganttProperties.taskName;
|
|
10251
|
+
var startDateVal = data.ganttProperties.baselineStartDate;
|
|
10252
|
+
var endDateVal = data.ganttProperties.baselineEndDate;
|
|
10253
|
+
defaultValue += 'Baseline' + ' ';
|
|
10254
|
+
defaultValue += nameConstant + ' ' + taskNameVal + ' ';
|
|
10255
|
+
defaultValue += startDateConstant + ' ' + this.parent.getFormatedDate(startDateVal) + ' ';
|
|
10256
|
+
defaultValue += endDateConstant + ' ' + this.parent.getFormatedDate(endDateVal) + ' ';
|
|
10257
|
+
return defaultValue;
|
|
10258
|
+
};
|
|
10201
10259
|
ChartRows.prototype.generateSpiltTaskAriaLabel = function (data, ganttProp) {
|
|
10202
10260
|
var defaultValue = '';
|
|
10203
10261
|
var startDateConstant = this.parent.localeObj.getConstant('startDate');
|
|
@@ -10237,6 +10295,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10237
10295
|
function Dependency(gantt) {
|
|
10238
10296
|
this.parentRecord = [];
|
|
10239
10297
|
this.parentIds = [];
|
|
10298
|
+
this.parentPredecessors = [];
|
|
10240
10299
|
this.parent = gantt;
|
|
10241
10300
|
this.dateValidateModule = this.parent.dateValidationModule;
|
|
10242
10301
|
}
|
|
@@ -10252,9 +10311,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10252
10311
|
for (var count = length; count >= 0; count--) {
|
|
10253
10312
|
var ganttData = predecessorTasks[count];
|
|
10254
10313
|
var ganttProp = ganttData.ganttProperties;
|
|
10255
|
-
|
|
10256
|
-
this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
|
|
10257
|
-
}
|
|
10314
|
+
this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
|
|
10258
10315
|
}
|
|
10259
10316
|
};
|
|
10260
10317
|
/**
|
|
@@ -10364,8 +10421,29 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10364
10421
|
values = el.split('-');
|
|
10365
10422
|
offsetValue = '-';
|
|
10366
10423
|
}
|
|
10367
|
-
match =
|
|
10424
|
+
match = [];
|
|
10368
10425
|
var ids = _this.parent.viewType === 'ResourceView' ? _this.parent.getTaskIds() : _this.parent.ids;
|
|
10426
|
+
var isExist1 = _this.parent.viewType === 'ResourceView' ? ids.indexOf('T' + values[0]) : ids.indexOf(values[0]);
|
|
10427
|
+
if (isExist1 !== -1) {
|
|
10428
|
+
match[0] = values[0];
|
|
10429
|
+
}
|
|
10430
|
+
else {
|
|
10431
|
+
if (ids.indexOf(values[0]) === -1) {
|
|
10432
|
+
match = values[0].split(" ");
|
|
10433
|
+
if (match.length === 1) {
|
|
10434
|
+
if (match[0].indexOf(" ") != -1) {
|
|
10435
|
+
match = values[0].match(/(\d+|[A-z]+)/g);
|
|
10436
|
+
}
|
|
10437
|
+
else {
|
|
10438
|
+
match[0] = values[0].slice(0, -2);
|
|
10439
|
+
match[1] = values[0].slice(-2);
|
|
10440
|
+
}
|
|
10441
|
+
}
|
|
10442
|
+
}
|
|
10443
|
+
else {
|
|
10444
|
+
match[0] = values[0];
|
|
10445
|
+
}
|
|
10446
|
+
}
|
|
10369
10447
|
var isExist = _this.parent.viewType === 'ResourceView' ? ids.indexOf('T' + match[0]) : ids.indexOf(match[0]);
|
|
10370
10448
|
/*Validate for appropriate predecessor*/
|
|
10371
10449
|
if (match[0] && isExist !== -1) {
|
|
@@ -10396,10 +10474,18 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10396
10474
|
offsetUnit: offsetUnits.durationUnit,
|
|
10397
10475
|
offset: offsetUnits.duration
|
|
10398
10476
|
};
|
|
10399
|
-
var
|
|
10400
|
-
|
|
10477
|
+
var fromData = _this.parent.connectorLineModule.getRecordByID(obj.to);
|
|
10478
|
+
var toData = _this.parent.connectorLineModule.getRecordByID(obj.from);
|
|
10479
|
+
var isValid;
|
|
10480
|
+
if (_this.parent.connectorLineEditModule && toData && fromData) {
|
|
10481
|
+
isValid = _this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
|
|
10482
|
+
if (isValid)
|
|
10483
|
+
collection.push(obj);
|
|
10484
|
+
}
|
|
10485
|
+
else {
|
|
10401
10486
|
collection.push(obj);
|
|
10402
10487
|
}
|
|
10488
|
+
match.splice(0);
|
|
10403
10489
|
});
|
|
10404
10490
|
return collection;
|
|
10405
10491
|
};
|
|
@@ -10414,6 +10500,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10414
10500
|
var predecessors = data.ganttProperties.predecessor;
|
|
10415
10501
|
var durationUnitTexts = this.parent.durationUnitTexts;
|
|
10416
10502
|
var resultString = '';
|
|
10503
|
+
var temp1;
|
|
10504
|
+
var match;
|
|
10505
|
+
match = [];
|
|
10417
10506
|
if (predecessors) {
|
|
10418
10507
|
var length_1 = predecessors.length;
|
|
10419
10508
|
for (var i = 0; i < length_1; i++) {
|
|
@@ -10423,6 +10512,15 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10423
10512
|
: data.ganttProperties.rowUniqueID;
|
|
10424
10513
|
if (currentValue.from !== id.toString()) {
|
|
10425
10514
|
temp = currentValue.from + currentValue.type;
|
|
10515
|
+
if (typeof (data.ganttProperties.taskId) === "string") {
|
|
10516
|
+
match[0] = temp.slice(0, -2);
|
|
10517
|
+
match[1] = temp.slice(-2);
|
|
10518
|
+
temp1 = match[0] + " " + match[1];
|
|
10519
|
+
}
|
|
10520
|
+
else {
|
|
10521
|
+
temp1 = temp;
|
|
10522
|
+
}
|
|
10523
|
+
temp = temp1;
|
|
10426
10524
|
if (currentValue.offset !== 0) {
|
|
10427
10525
|
temp += currentValue.offset > 0 ? ('+' + currentValue.offset + ' ') : (currentValue.offset + ' ');
|
|
10428
10526
|
var multiple = currentValue.offset !== 1;
|
|
@@ -10510,9 +10608,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10510
10608
|
var length = predecessorsCollection.length;
|
|
10511
10609
|
for (var count = 0; count < length; count++) {
|
|
10512
10610
|
ganttRecord = predecessorsCollection[count];
|
|
10513
|
-
|
|
10514
|
-
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
10515
|
-
}
|
|
10611
|
+
this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
|
|
10516
10612
|
}
|
|
10517
10613
|
};
|
|
10518
10614
|
/**
|
|
@@ -10562,9 +10658,22 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10562
10658
|
*/
|
|
10563
10659
|
Dependency.prototype.updatedRecordsDateByPredecessor = function () {
|
|
10564
10660
|
var flatData = this.parent.flatData;
|
|
10565
|
-
|
|
10661
|
+
var totLength = this.parent.flatData.length;
|
|
10662
|
+
for (var count = 0; count < totLength; count++) {
|
|
10566
10663
|
if (flatData[count].ganttProperties.predecessor) {
|
|
10567
10664
|
this.validatePredecessorDates(flatData[count]);
|
|
10665
|
+
if (flatData[count].hasChildRecords && this.parent.editModule) {
|
|
10666
|
+
this.parent.editModule['updateChildItems'](flatData[count]);
|
|
10667
|
+
}
|
|
10668
|
+
}
|
|
10669
|
+
}
|
|
10670
|
+
};
|
|
10671
|
+
Dependency.prototype.updateParentPredecessor = function () {
|
|
10672
|
+
if (this.parent.enablePredecessorValidation) {
|
|
10673
|
+
var parentPredecessorLength = this.parentPredecessors.length;
|
|
10674
|
+
for (var i = parentPredecessorLength - 1; i >= 0; i--) {
|
|
10675
|
+
var item = this.parentPredecessors[i];
|
|
10676
|
+
this.validatePredecessorDates(item);
|
|
10568
10677
|
}
|
|
10569
10678
|
}
|
|
10570
10679
|
};
|
|
@@ -10595,6 +10704,10 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10595
10704
|
var predecessor = predecessors[count];
|
|
10596
10705
|
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor.from);
|
|
10597
10706
|
record = this.parent.connectorLineModule.getRecordByID(predecessor.to);
|
|
10707
|
+
if (this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
|
|
10708
|
+
&& (ganttRecord.hasChildRecords || record.hasChildRecords)) {
|
|
10709
|
+
this.parentPredecessors.push(ganttRecord);
|
|
10710
|
+
}
|
|
10598
10711
|
if (record.ganttProperties.isAutoSchedule || this.parent.validateManualTasksOnLinking) {
|
|
10599
10712
|
this.validateChildGanttRecord(parentGanttRecord, record);
|
|
10600
10713
|
}
|
|
@@ -10635,8 +10748,8 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10635
10748
|
this.dateValidateModule.calculateEndDate(childGanttRecord);
|
|
10636
10749
|
}
|
|
10637
10750
|
this.parent.dataOperation.updateWidthLeft(childGanttRecord);
|
|
10638
|
-
if (childGanttRecord.parentItem && this.parent.
|
|
10639
|
-
|
|
10751
|
+
if (!this.parent.isLoad && childGanttRecord.parentItem && this.parent.isInPredecessorValidation &&
|
|
10752
|
+
this.parent.getParentTask(childGanttRecord.parentItem).ganttProperties.isAutoSchedule) {
|
|
10640
10753
|
if (this.parentIds.indexOf(childGanttRecord.parentItem.uniqueID) === -1) {
|
|
10641
10754
|
this.parentIds.push(childGanttRecord.parentItem.uniqueID);
|
|
10642
10755
|
this.parentRecord.push(childGanttRecord.parentItem);
|
|
@@ -10993,8 +11106,19 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
10993
11106
|
*/
|
|
10994
11107
|
ConnectorLine.prototype.createConnectorLineObject = function (parentGanttData, childGanttData, predecessor) {
|
|
10995
11108
|
var connectorObj = {};
|
|
10996
|
-
var updatedRecords
|
|
10997
|
-
|
|
11109
|
+
var updatedRecords;
|
|
11110
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport) {
|
|
11111
|
+
if (this.parent.pdfExportModule['helper']['exportProps'].exportType &&
|
|
11112
|
+
this.parent.pdfExportModule['helper']['exportProps'].exportType === 'CurrentViewData') {
|
|
11113
|
+
updatedRecords = this.expandedRecords;
|
|
11114
|
+
}
|
|
11115
|
+
else {
|
|
11116
|
+
updatedRecords = this.parent.flatData;
|
|
11117
|
+
}
|
|
11118
|
+
}
|
|
11119
|
+
else {
|
|
11120
|
+
updatedRecords = this.expandedRecords;
|
|
11121
|
+
}
|
|
10998
11122
|
var parentIndex = updatedRecords.indexOf(parentGanttData);
|
|
10999
11123
|
var childIndex = updatedRecords.indexOf(childGanttData);
|
|
11000
11124
|
var parentGanttRecord = parentGanttData.ganttProperties;
|
|
@@ -11317,6 +11441,63 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11317
11441
|
isMilestoneValue = (data.milestoneParent && data.milestoneChild) ? 0 : data.milestoneParent ? -5 : data.milestoneChild ? 5 : 0;
|
|
11318
11442
|
}
|
|
11319
11443
|
var heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
|
|
11444
|
+
var borderTopWidth = 0;
|
|
11445
|
+
var addTop = 0;
|
|
11446
|
+
if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex]) {
|
|
11447
|
+
var fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
|
|
11448
|
+
var toRecordIsParent = this.parent.currentViewData[data.childIndex].hasChildRecords;
|
|
11449
|
+
var fromRecordIsManual = this.parent.currentViewData[data.parentIndex].ganttProperties.isAutoSchedule;
|
|
11450
|
+
var toRecordIsManual = this.parent.currentViewData[data.childIndex].ganttProperties.isAutoSchedule;
|
|
11451
|
+
var isValid = true;
|
|
11452
|
+
if (((fromRecordIsParent && fromRecordIsManual) && !toRecordIsParent) || ((toRecordIsParent && toRecordIsManual) &&
|
|
11453
|
+
!fromRecordIsParent) || (fromRecordIsParent && fromRecordIsManual && toRecordIsManual && toRecordIsParent)
|
|
11454
|
+
|| (!fromRecordIsParent && !toRecordIsParent)) {
|
|
11455
|
+
isValid = false;
|
|
11456
|
+
}
|
|
11457
|
+
if (isValid) {
|
|
11458
|
+
if (((fromRecordIsParent && !fromRecordIsManual) && (toRecordIsParent && !toRecordIsManual))) {
|
|
11459
|
+
addTop = -11;
|
|
11460
|
+
}
|
|
11461
|
+
else if (!((fromRecordIsParent && !fromRecordIsManual) && (toRecordIsParent && !toRecordIsManual))) {
|
|
11462
|
+
if (data.childIndex > data.parentIndex) {
|
|
11463
|
+
if (!fromRecordIsParent && toRecordIsParent) {
|
|
11464
|
+
borderTopWidth = -11;
|
|
11465
|
+
}
|
|
11466
|
+
else {
|
|
11467
|
+
borderTopWidth = 11;
|
|
11468
|
+
addTop = -11;
|
|
11469
|
+
}
|
|
11470
|
+
}
|
|
11471
|
+
else {
|
|
11472
|
+
if ((fromRecordIsParent && !toRecordIsParent)) {
|
|
11473
|
+
borderTopWidth = -11;
|
|
11474
|
+
}
|
|
11475
|
+
else {
|
|
11476
|
+
borderTopWidth = 11;
|
|
11477
|
+
addTop = -11;
|
|
11478
|
+
}
|
|
11479
|
+
}
|
|
11480
|
+
}
|
|
11481
|
+
if (this.parent.currentViewData[data.parentIndex].ganttProperties.isMilestone) {
|
|
11482
|
+
if (data.parentIndex > data.childIndex) {
|
|
11483
|
+
addTop = -5;
|
|
11484
|
+
borderTopWidth = 10;
|
|
11485
|
+
}
|
|
11486
|
+
else if (data.type === 'SS' || data.type === 'FF') {
|
|
11487
|
+
addTop = -5;
|
|
11488
|
+
}
|
|
11489
|
+
}
|
|
11490
|
+
else if (this.parent.currentViewData[data.childIndex].ganttProperties.isMilestone) {
|
|
11491
|
+
if (data.parentIndex > data.childIndex) {
|
|
11492
|
+
addTop = 5;
|
|
11493
|
+
borderTopWidth = -10;
|
|
11494
|
+
}
|
|
11495
|
+
else if (data.type === 'SS' || data.type === 'FF') {
|
|
11496
|
+
addTop = 5;
|
|
11497
|
+
}
|
|
11498
|
+
}
|
|
11499
|
+
}
|
|
11500
|
+
}
|
|
11320
11501
|
if (this.getParentPosition(data)) {
|
|
11321
11502
|
connectorContainer = '<div id="ConnectorLine' + data.connectorLineId + '" style="background-color:black">';
|
|
11322
11503
|
var div = '<div class="' + connectorLineContainer +
|
|
@@ -11336,7 +11517,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11336
11517
|
'border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div>';
|
|
11337
11518
|
var duplicateStingThree = this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>' + eLine +
|
|
11338
11519
|
'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>';
|
|
11520
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11340
11521
|
var duplicateStingFour = leftArrow + 'left:' +
|
|
11341
11522
|
(((data.childLeft + data.childWidth) - (data.parentLeft)) + 10) + 'px;' +
|
|
11342
11523
|
this.getBorderStyles('right', 10);
|
|
@@ -11344,7 +11525,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11344
11525
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11345
11526
|
if (this.getParentPosition(data) === 'FSType1') {
|
|
11346
11527
|
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;' +
|
|
11528
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11348
11529
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
|
|
11349
11530
|
div = div + eLine;
|
|
11350
11531
|
div = div + 'left:' + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
|
|
@@ -11354,7 +11535,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11354
11535
|
div = div + eLine;
|
|
11355
11536
|
div = div + 'left:' + ((data.childLeft - (data.parentLeft + data.parentWidth + 10)) - 10) + 'px;' +
|
|
11356
11537
|
'width:0px;' + this.getBorderStyles('right', this.lineStroke) +
|
|
11357
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11538
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11358
11539
|
div = div + eLine;
|
|
11359
11540
|
div = div + 'left:' + ((data.childLeft - (data.parentLeft + data.parentWidth + 10)) - 10) + 'px;width:10px;' +
|
|
11360
11541
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11364,7 +11545,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11364
11545
|
'px;border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div></div>';
|
|
11365
11546
|
}
|
|
11366
11547
|
if (this.getParentPosition(data) === 'FSType2') {
|
|
11367
|
-
div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) +
|
|
11548
|
+
div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) + addTop +
|
|
11368
11549
|
this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11369
11550
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
|
|
11370
11551
|
div = div + eLine;
|
|
@@ -11374,7 +11555,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11374
11555
|
div = div + eLine;
|
|
11375
11556
|
div = div + 'left:' + (data.parentWidth + 10 - this.lineStroke) + 'px;' +
|
|
11376
11557
|
this.getBorderStyles('left', this.lineStroke) + 'width:0px;' +
|
|
11377
|
-
this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11558
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11378
11559
|
div = div + eLine;
|
|
11379
11560
|
div = div + 'left:' + (data.parentWidth - (((data.parentLeft + data.parentWidth) - data.childLeft) + 20)) + 'px;' +
|
|
11380
11561
|
'width:' + (((data.parentLeft + data.parentWidth) - data.childLeft) + 30) + 'px;' +
|
|
@@ -11396,7 +11577,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11396
11577
|
}
|
|
11397
11578
|
if (this.getParentPosition(data) === 'FSType3') {
|
|
11398
11579
|
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;' +
|
|
11580
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11400
11581
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
|
|
11401
11582
|
div = div + rightArrow;
|
|
11402
11583
|
div = div + 'left:10px;' + this.getBorderStyles('left', 10) +
|
|
@@ -11406,7 +11587,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11406
11587
|
div = div + 'width:10px;' + this.getBorderStyles('top', this.lineStroke) +
|
|
11407
11588
|
'position:relative;top:' + (-(6 + (5 + this.lineStroke) + Math.round(this.lineStroke / 2))) + 'px;"></div>';
|
|
11408
11589
|
div = div + eLine;
|
|
11409
|
-
div = div + 'width:' + this.lineStroke + 'px;' + this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke + 1)) +
|
|
11590
|
+
div = div + 'width:' + this.lineStroke + 'px;' + this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke + 1)) +
|
|
11410
11591
|
'position:relative;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;"></div>';
|
|
11411
11592
|
div = div + eLine;
|
|
11412
11593
|
div = div + 'width:' + (((data.parentLeft + data.parentWidth) - data.childLeft) + 30) + 'px;' +
|
|
@@ -11426,7 +11607,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11426
11607
|
}
|
|
11427
11608
|
if (this.getParentPosition(data) === 'FSType4') {
|
|
11428
11609
|
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;' +
|
|
11610
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11430
11611
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
|
|
11431
11612
|
div = div + rightArrow;
|
|
11432
11613
|
div = div + 'left:' + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
|
|
@@ -11442,7 +11623,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11442
11623
|
div = div + 'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;left:' +
|
|
11443
11624
|
(data.childLeft - (data.parentLeft + data.parentWidth) - 20) + 'px;width:0px;' +
|
|
11444
11625
|
this.getBorderStyles('left', this.lineStroke) +
|
|
11445
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11626
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11446
11627
|
div = div + eLine;
|
|
11447
11628
|
div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'top:' +
|
|
11448
11629
|
(-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
@@ -11452,7 +11633,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11452
11633
|
}
|
|
11453
11634
|
if (this.getParentPosition(data) === 'SSType4') {
|
|
11454
11635
|
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;' +
|
|
11636
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11456
11637
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
|
|
11457
11638
|
div = div + rightArrow;
|
|
11458
11639
|
div = div + 'left:' + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
|
|
@@ -11465,7 +11646,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11465
11646
|
}
|
|
11466
11647
|
if (this.getParentPosition(data) === 'SSType3') {
|
|
11467
11648
|
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;' +
|
|
11649
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11469
11650
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
|
|
11470
11651
|
div = div + rightArrow;
|
|
11471
11652
|
div = div + 'left:10px;' + duplicateStingTwo;
|
|
@@ -11478,14 +11659,14 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11478
11659
|
}
|
|
11479
11660
|
if (this.getParentPosition(data) === 'SSType2') {
|
|
11480
11661
|
div = div + 'left:' + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11481
|
-
((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11662
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11482
11663
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
|
|
11483
11664
|
div = div + eLine;
|
|
11484
11665
|
div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
|
|
11485
11666
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11486
11667
|
div = div + eLine;
|
|
11487
11668
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11488
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11669
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11489
11670
|
div = div + eLine;
|
|
11490
11671
|
div = div + 'width:' + setInnerElementWidthSSType2 + 'px;' +
|
|
11491
11672
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11498,7 +11679,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11498
11679
|
}
|
|
11499
11680
|
if (this.getParentPosition(data) === 'SSType1') {
|
|
11500
11681
|
div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
|
|
11501
|
-
((data.parentIndex * data.rowHeight) +
|
|
11682
|
+
((data.parentIndex * data.rowHeight) + addTop +
|
|
11502
11683
|
this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11503
11684
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
|
|
11504
11685
|
div = div + eLine;
|
|
@@ -11506,7 +11687,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11506
11687
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11507
11688
|
div = div + eLine;
|
|
11508
11689
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11509
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11690
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11510
11691
|
div = div + eLine;
|
|
11511
11692
|
div = div + 'width:10px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11512
11693
|
div = div + rightArrow;
|
|
@@ -11516,7 +11697,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11516
11697
|
}
|
|
11517
11698
|
if (this.getParentPosition(data) === 'FFType1') {
|
|
11518
11699
|
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;' +
|
|
11700
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11520
11701
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
|
|
11521
11702
|
div = div + eLine;
|
|
11522
11703
|
div = div + 'left:' + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
|
|
@@ -11527,7 +11708,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11527
11708
|
div = div + eLine;
|
|
11528
11709
|
div = div + 'left:' + (((data.parentLeft + data.parentWidth) -
|
|
11529
11710
|
(data.childLeft + data.childWidth)) + 20) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11530
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11711
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11531
11712
|
div = div + eLine;
|
|
11532
11713
|
div = div + 'left:' + (isMilestone ? 4 : 10) + 'px;width:' + (isMilestone ?
|
|
11533
11714
|
(((data.parentLeft + data.parentWidth) - (data.childLeft + data.childWidth)) + (16 + this.lineStroke)) :
|
|
@@ -11540,7 +11721,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11540
11721
|
}
|
|
11541
11722
|
if (this.getParentPosition(data) === 'FFType2') {
|
|
11542
11723
|
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;' +
|
|
11724
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11544
11725
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
|
|
11545
11726
|
div = div + eLine;
|
|
11546
11727
|
div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'width:' +
|
|
@@ -11551,7 +11732,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11551
11732
|
div = div + eLine;
|
|
11552
11733
|
div = div + 'left:' + (((data.childLeft + data.childWidth) - (data.parentLeft + data.parentWidth)) + 20) +
|
|
11553
11734
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11554
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) +
|
|
11735
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) +
|
|
11555
11736
|
'position:relative;"></div>';
|
|
11556
11737
|
div = div + eLine;
|
|
11557
11738
|
div = div + 'left:' + (isMilestone ? (((data.childLeft + data.childWidth) - (data.parentLeft + data.parentWidth)) + 4) :
|
|
@@ -11566,7 +11747,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11566
11747
|
}
|
|
11567
11748
|
if (this.getParentPosition(data) === 'FFType3') {
|
|
11568
11749
|
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;' +
|
|
11750
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11570
11751
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
|
|
11571
11752
|
div = div + duplicateStingOne;
|
|
11572
11753
|
div = div + eLine;
|
|
@@ -11579,7 +11760,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11579
11760
|
div = div + 'left:' + (((data.parentLeft + data.parentWidth) - (data.childLeft + data.childWidth)) + 20) +
|
|
11580
11761
|
'px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;' +
|
|
11581
11762
|
'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11582
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11763
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11583
11764
|
div = div + eLine;
|
|
11584
11765
|
div = div + (isMilestoneParent ? ('left:' + (((data.parentLeft + data.parentWidth) -
|
|
11585
11766
|
(data.childLeft + data.childWidth)) - 1) + 'px;width:21') : ('left:' + ((data.parentLeft + data.parentWidth) -
|
|
@@ -11589,7 +11770,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11589
11770
|
}
|
|
11590
11771
|
if (this.getParentPosition(data) === 'FFType4') {
|
|
11591
11772
|
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;' +
|
|
11773
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11593
11774
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
|
|
11594
11775
|
div = div + leftArrow;
|
|
11595
11776
|
div = div + ('left:' + ((data.childLeft + data.childWidth) -
|
|
@@ -11608,7 +11789,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11608
11789
|
div = div + 'left:' + (((data.childLeft + data.childWidth) -
|
|
11609
11790
|
(data.parentLeft + data.parentWidth)) + 20) + 'px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) +
|
|
11610
11791
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11611
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11792
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
|
|
11612
11793
|
div = div + eLine;
|
|
11613
11794
|
div = div + (isMilestoneParent ? ('left:-1px;width:' + (((data.childLeft + data.childWidth) -
|
|
11614
11795
|
(data.parentLeft + data.parentWidth)) + (21 + this.lineStroke))) : ('width:' + (((data.childLeft + data.childWidth) -
|
|
@@ -11618,7 +11799,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11618
11799
|
}
|
|
11619
11800
|
if (this.getParentPosition(data) === 'SFType4') {
|
|
11620
11801
|
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;' +
|
|
11802
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
|
|
11622
11803
|
'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
|
|
11623
11804
|
div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
|
|
11624
11805
|
'border-bottom-width:' + (5 + this.lineStroke) +
|
|
@@ -11631,7 +11812,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11631
11812
|
div = div + eLine;
|
|
11632
11813
|
div = div + 'left:' + (((data.childLeft + data.childWidth) - (data.parentLeft)) + 30) + 'px;top:' +
|
|
11633
11814
|
(-(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>';
|
|
11815
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11635
11816
|
div = div + eLine;
|
|
11636
11817
|
div = div + 'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
11637
11818
|
(((data.childLeft + data.childWidth) - (data.parentLeft)) + (30 + this.lineStroke)) + 'px;' +
|
|
@@ -11646,7 +11827,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11646
11827
|
}
|
|
11647
11828
|
if (this.getParentPosition(data) === 'SFType3') {
|
|
11648
11829
|
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;' +
|
|
11830
|
+
((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11650
11831
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
|
|
11651
11832
|
div = div + duplicateStingOne;
|
|
11652
11833
|
div = div + eLine;
|
|
@@ -11656,7 +11837,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11656
11837
|
div = div + eLine;
|
|
11657
11838
|
div = div + 'left:20px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' +
|
|
11658
11839
|
this.getBorderStyles('left', this.lineStroke) +
|
|
11659
|
-
this.getBorderStyles('top', (heightValue - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11840
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - (this.lineStroke - 1))) + 'position:relative;"></div>';
|
|
11660
11841
|
div = div + eLine;
|
|
11661
11842
|
div = div + 'left:20px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
|
|
11662
11843
|
((data.parentLeft - (data.childLeft + data.childWidth + 20)) + this.lineStroke) + 'px;' +
|
|
@@ -11664,13 +11845,13 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11664
11845
|
}
|
|
11665
11846
|
if (this.getParentPosition(data) === 'SFType1') {
|
|
11666
11847
|
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;' +
|
|
11848
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11668
11849
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
|
|
11669
11850
|
div = div + eLine;
|
|
11670
11851
|
div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
11671
11852
|
div = div + eLine;
|
|
11672
11853
|
div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11673
|
-
this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11854
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
|
|
11674
11855
|
div = div + eLine;
|
|
11675
11856
|
div = div + 'width:' + (((data.childLeft + data.childWidth) - (data.parentLeft)) + (30 + this.lineStroke)) + 'px;' +
|
|
11676
11857
|
this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
|
|
@@ -11689,7 +11870,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11689
11870
|
}
|
|
11690
11871
|
if (this.getParentPosition(data) === 'SFType2') {
|
|
11691
11872
|
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;' +
|
|
11873
|
+
((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
|
|
11693
11874
|
'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
|
|
11694
11875
|
div = div + eLine;
|
|
11695
11876
|
div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
@@ -11697,7 +11878,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
11697
11878
|
div = div + eLine;
|
|
11698
11879
|
div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
|
|
11699
11880
|
'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
|
|
11700
|
-
this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
|
|
11881
|
+
this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
|
|
11701
11882
|
div = div + eLine;
|
|
11702
11883
|
div = div + (isMilestone ? ('left:4px;width:' + (((data.parentLeft) - (data.childLeft + data.childWidth))
|
|
11703
11884
|
- (14 - this.lineStroke))) : ('left:10px;width:' + (((data.parentLeft) -
|
|
@@ -11947,11 +12128,11 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
11947
12128
|
};
|
|
11948
12129
|
/**
|
|
11949
12130
|
* @param {SplitterSettingsModel} splitter .
|
|
11950
|
-
|
|
12131
|
+
|
|
11951
12132
|
* @returns {string} .
|
|
11952
12133
|
* @private
|
|
11953
12134
|
*/
|
|
11954
|
-
Splitter$$1.prototype.calculateSplitterPosition = function (splitter$$1
|
|
12135
|
+
Splitter$$1.prototype.calculateSplitterPosition = function (splitter$$1) {
|
|
11955
12136
|
if (!isNullOrUndefined(this.splitterObject) && this.parent.enablePersistence) {
|
|
11956
12137
|
return this.splitterObject.paneSettings[0].size;
|
|
11957
12138
|
}
|
|
@@ -11967,8 +12148,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
11967
12148
|
}
|
|
11968
12149
|
else if (!isNullOrUndefined(splitter$$1.columnIndex) && splitter$$1.columnIndex >= 0) {
|
|
11969
12150
|
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');
|
|
12151
|
+
return this.getSpliterPositionInPercentage(this.getTotalColumnWidthByIndex(splitter$$1.columnIndex).toString() + 'px');
|
|
11972
12152
|
}
|
|
11973
12153
|
else {
|
|
11974
12154
|
return this.getSpliterPositionInPercentage((splitter$$1.columnIndex * 130) + 'px');
|
|
@@ -12004,10 +12184,10 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
12004
12184
|
*/
|
|
12005
12185
|
Splitter$$1.prototype.getTotalColumnWidthByIndex = function (index) {
|
|
12006
12186
|
var width = 0;
|
|
12007
|
-
var tr = this.parent.
|
|
12187
|
+
var tr = this.parent.ganttColumns;
|
|
12008
12188
|
index = tr.length > index ? index : tr.length;
|
|
12009
12189
|
for (var column = 0; column < index; column++) {
|
|
12010
|
-
width = width + tr[column].
|
|
12190
|
+
width = width + parseInt(tr[column].width);
|
|
12011
12191
|
}
|
|
12012
12192
|
return width;
|
|
12013
12193
|
};
|
|
@@ -12018,7 +12198,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
12018
12198
|
Splitter$$1.prototype.updateSplitterPosition = function () {
|
|
12019
12199
|
this.splitterObject.separatorSize = this.parent.splitterSettings.separatorSize >= 4 ?
|
|
12020
12200
|
this.parent.splitterSettings.separatorSize : 4;
|
|
12021
|
-
var splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings
|
|
12201
|
+
var splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings);
|
|
12022
12202
|
this.splitterObject.paneSettings[0].min = this.getSpliterPositionInPercentage(this.parent.splitterSettings.minimum);
|
|
12023
12203
|
this.splitterObject.dataBind();
|
|
12024
12204
|
this.splitterObject.paneSettings[0].size = splitterPosition;
|
|
@@ -12435,7 +12615,8 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
|
|
|
12435
12615
|
*/
|
|
12436
12616
|
Tooltip$$1.prototype.getPredecessorTooltipData = function (args) {
|
|
12437
12617
|
var predeceesorParent = args.target.parentElement.id;
|
|
12438
|
-
var taskIds = predeceesorParent.match(
|
|
12618
|
+
var taskIds = predeceesorParent.match(/ConnectorLineparent(.*)child(.*)/);
|
|
12619
|
+
taskIds.shift();
|
|
12439
12620
|
var fromTask;
|
|
12440
12621
|
var toTask;
|
|
12441
12622
|
if (this.parent.viewType === 'ResourceView') {
|
|
@@ -12731,7 +12912,7 @@ var FocusModule = /** @__PURE__ @class */ (function () {
|
|
|
12731
12912
|
if (ganttObj.selectionSettings.mode !== 'Cell' && ganttObj.selectedRowIndex !== -1) {
|
|
12732
12913
|
var selectedItem = ganttObj.currentViewData[ganttObj.selectedRowIndex];
|
|
12733
12914
|
var focusedRowIndex = this.parent.ganttChartModule.focusedRowIndex;
|
|
12734
|
-
var selectingRowIndex =
|
|
12915
|
+
var selectingRowIndex = expandedRecords.indexOf(selectedItem);
|
|
12735
12916
|
var currentSelectingRecord = e.action === 'downArrow' ? expandedRecords[selectingRowIndex + 1] :
|
|
12736
12917
|
expandedRecords[selectingRowIndex - 1];
|
|
12737
12918
|
ganttObj.selectionModule.selectRow(ganttObj.currentViewData.indexOf(currentSelectingRecord), false, true);
|
|
@@ -13144,6 +13325,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13144
13325
|
if (this.enableValidation) {
|
|
13145
13326
|
this.dataOperation.updateGanttData();
|
|
13146
13327
|
}
|
|
13328
|
+
this.predecessorModule.updateParentPredecessor();
|
|
13147
13329
|
if (this.dataSource instanceof Object && isCountRequired(this)) {
|
|
13148
13330
|
var count = getValue('count', this.dataSource);
|
|
13149
13331
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
@@ -13156,6 +13338,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13156
13338
|
if (this.enableValidation) {
|
|
13157
13339
|
this.dataOperation.updateGanttData();
|
|
13158
13340
|
}
|
|
13341
|
+
this.predecessorModule.updateParentPredecessor();
|
|
13159
13342
|
this.treeGridPane.classList.remove('e-temp-content');
|
|
13160
13343
|
remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
|
|
13161
13344
|
this.notify('dataReady', {});
|
|
@@ -13467,7 +13650,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13467
13650
|
{
|
|
13468
13651
|
topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
|
|
13469
13652
|
bottomTier: { unit: 'Minutes', format: 'mm', count: 30 }, timelineUnitSize: 66, level: 22,
|
|
13470
|
-
timelineViewMode: 'Hour', weekStartDay:
|
|
13653
|
+
timelineViewMode: 'Hour', weekStartDay: 0, updateTimescaleView: true, weekendBackground: null, showTooltip: true
|
|
13471
13654
|
},
|
|
13472
13655
|
{
|
|
13473
13656
|
topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
|
|
@@ -14808,7 +14991,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14808
14991
|
Gantt.prototype.setSplitterPosition = function (value, type) {
|
|
14809
14992
|
var tempSplitterSettings = {};
|
|
14810
14993
|
tempSplitterSettings[type] = value;
|
|
14811
|
-
var splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings
|
|
14994
|
+
var splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings);
|
|
14812
14995
|
var pane1 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[0];
|
|
14813
14996
|
var pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
|
|
14814
14997
|
this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
|
|
@@ -14890,7 +15073,10 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14890
15073
|
if (this.viewType === 'ResourceView') {
|
|
14891
15074
|
this.editModule.addRowPosition = rowPosition;
|
|
14892
15075
|
this.editModule.addRowIndex = rowIndex;
|
|
14893
|
-
var resources =
|
|
15076
|
+
var resources = void 0;
|
|
15077
|
+
if (!isNullOrUndefined(data)) {
|
|
15078
|
+
resources = data[this.taskFields.resourceInfo];
|
|
15079
|
+
}
|
|
14894
15080
|
var id = void 0;
|
|
14895
15081
|
var parentTask = void 0;
|
|
14896
15082
|
if (!isNullOrUndefined(resources) && resources.length) {
|
|
@@ -15388,6 +15574,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15388
15574
|
*/
|
|
15389
15575
|
Gantt.prototype.showColumn = function (keys, showBy) {
|
|
15390
15576
|
this.treeGrid.showColumns(keys, showBy);
|
|
15577
|
+
this.updateTreeColumns();
|
|
15391
15578
|
};
|
|
15392
15579
|
/**
|
|
15393
15580
|
* Hides a column by column name.
|
|
@@ -15399,6 +15586,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15399
15586
|
*/
|
|
15400
15587
|
Gantt.prototype.hideColumn = function (keys, hideBy) {
|
|
15401
15588
|
this.treeGrid.hideColumns(keys, hideBy);
|
|
15589
|
+
this.updateTreeColumns();
|
|
15402
15590
|
};
|
|
15403
15591
|
/**
|
|
15404
15592
|
* To set scroll top for chart scroll container.
|
|
@@ -16135,8 +16323,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
16135
16323
|
}
|
|
16136
16324
|
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
16137
16325
|
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
16138
|
-
|| field === taskSettings.
|
|
16139
|
-
|| field === taskSettings.work || field === 'taskType')) {
|
|
16326
|
+
|| field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
16140
16327
|
args.cancel = true;
|
|
16141
16328
|
}
|
|
16142
16329
|
else {
|
|
@@ -16966,6 +17153,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16966
17153
|
}
|
|
16967
17154
|
};
|
|
16968
17155
|
TaskbarEdit.prototype.mouseClickHandler = function (e) {
|
|
17156
|
+
if (!this.parent.editSettings.allowTaskbarEditing) {
|
|
17157
|
+
return;
|
|
17158
|
+
}
|
|
16969
17159
|
var targetElement = this.getElementByPosition(e);
|
|
16970
17160
|
var element = parentsUntil$1(targetElement, taskBarMainContainer);
|
|
16971
17161
|
if (this.parent.selectionModule && this.parent.selectionModule.enableSelectMultiTouch) {
|
|
@@ -17498,10 +17688,13 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
17498
17688
|
var _this = this;
|
|
17499
17689
|
this.stopScrollTimer();
|
|
17500
17690
|
this.scrollTimer = window.setInterval(function () {
|
|
17501
|
-
if (direction === 'right'
|
|
17691
|
+
if (direction === 'right') {
|
|
17502
17692
|
_this.timerCount = (_this.timerCount + 1) >= _this.parent.timelineModule.totalTimelineWidth ?
|
|
17503
17693
|
_this.parent.timelineModule.totalTimelineWidth : (_this.timerCount + 1);
|
|
17504
17694
|
}
|
|
17695
|
+
else if (direction === 'bottom') {
|
|
17696
|
+
_this.timerCount = _this.timerCount + 1;
|
|
17697
|
+
}
|
|
17505
17698
|
else {
|
|
17506
17699
|
_this.timerCount = (_this.timerCount - 1) < 0 ? 0 : (_this.timerCount - 1);
|
|
17507
17700
|
}
|
|
@@ -18609,8 +18802,14 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
18609
18802
|
}
|
|
18610
18803
|
if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
|
|
18611
18804
|
!this.elementOffsetLeft) || !this.parent.enableVirtualization) {
|
|
18612
|
-
|
|
18613
|
-
|
|
18805
|
+
if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
|
|
18806
|
+
this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
|
|
18807
|
+
this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
18808
|
+
}
|
|
18809
|
+
else {
|
|
18810
|
+
this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
|
|
18811
|
+
this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
|
|
18812
|
+
}
|
|
18614
18813
|
this.elementOffsetWidth = this.taskBarEditElement.offsetWidth;
|
|
18615
18814
|
this.elementOffsetHeight = this.taskBarEditElement.offsetHeight;
|
|
18616
18815
|
}
|
|
@@ -18779,6 +18978,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18779
18978
|
this.addedRecord = null;
|
|
18780
18979
|
this.dialogEditValidationFlag = false;
|
|
18781
18980
|
this.ganttResources = [];
|
|
18981
|
+
this.isValidData = true;
|
|
18782
18982
|
/**
|
|
18783
18983
|
* @private
|
|
18784
18984
|
*/
|
|
@@ -19020,7 +19220,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19020
19220
|
tempData[field] = 0;
|
|
19021
19221
|
tempData.ganttProperties.work = tempData[field];
|
|
19022
19222
|
}
|
|
19023
|
-
else if (columns[i].field ===
|
|
19223
|
+
else if (columns[i].field === taskSettings.type) {
|
|
19024
19224
|
tempData[field] = this.parent.taskType;
|
|
19025
19225
|
tempData.ganttProperties.taskType = tempData[field];
|
|
19026
19226
|
}
|
|
@@ -19063,6 +19263,24 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19063
19263
|
*/
|
|
19064
19264
|
DialogEdit.prototype.openEditDialog = function (taskId) {
|
|
19065
19265
|
var ganttObj = this.parent;
|
|
19266
|
+
if (!isNullOrUndefined(taskId)) {
|
|
19267
|
+
if (!isNullOrUndefined(taskId['ganttProperties'])) {
|
|
19268
|
+
if (typeof taskId['ganttProperties']['taskId'] === 'string') {
|
|
19269
|
+
this.numericOrString = "stringedit";
|
|
19270
|
+
}
|
|
19271
|
+
else {
|
|
19272
|
+
this.numericOrString = "numericedit";
|
|
19273
|
+
}
|
|
19274
|
+
}
|
|
19275
|
+
if (isNullOrUndefined(taskId['ganttProperties']) && !isNullOrUndefined(taskId)) {
|
|
19276
|
+
if (isNaN(Number(taskId)) || this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
19277
|
+
this.numericOrString = "stringedit";
|
|
19278
|
+
}
|
|
19279
|
+
else {
|
|
19280
|
+
this.numericOrString = "numericedit";
|
|
19281
|
+
}
|
|
19282
|
+
}
|
|
19283
|
+
}
|
|
19066
19284
|
if (typeof taskId === 'object' && !isNullOrUndefined(taskId)) {
|
|
19067
19285
|
this.rowIndex = this.parent.currentViewData.indexOf(taskId);
|
|
19068
19286
|
if (this.rowIndex > -1) {
|
|
@@ -19097,11 +19315,11 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19097
19315
|
this.beforeOpenArgs.rowIndex = this.rowIndex;
|
|
19098
19316
|
var dialogMaxWidth = this.parent.isAdaptive ? '' : '600px';
|
|
19099
19317
|
var dialog = this.parent.createElement('div', { id: ganttObj.element.id + '_dialog', styles: 'max-width:' + dialogMaxWidth });
|
|
19318
|
+
dialog.classList.add('e-gantt-dialog');
|
|
19100
19319
|
ganttObj.element.appendChild(dialog);
|
|
19101
19320
|
dialogModel.animationSettings = { effect: 'None' };
|
|
19102
19321
|
dialogModel.header = this.localeObj.getConstant(this.isEdit ? 'editDialogTitle' : 'addDialogTitle');
|
|
19103
19322
|
dialogModel.isModal = true;
|
|
19104
|
-
dialogModel.cssClass = 'e-gantt-dialog';
|
|
19105
19323
|
dialogModel.allowDragging = this.parent.isAdaptive ? false : true;
|
|
19106
19324
|
dialogModel.showCloseIcon = true;
|
|
19107
19325
|
var position = this.parent.isAdaptive ? { X: 'top', Y: 'left' } : { X: 'center', Y: 'center' };
|
|
@@ -19456,6 +19674,13 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19456
19674
|
placeholder: column.headerText,
|
|
19457
19675
|
floatLabelType: 'Auto'
|
|
19458
19676
|
};
|
|
19677
|
+
if (!isNullOrUndefined(this.parent.taskFields.id) && !isNullOrUndefined(this.parent.columnMapping.id)
|
|
19678
|
+
&& !isNullOrUndefined(this.numericOrString)) {
|
|
19679
|
+
if (taskSettings.id === column.field) {
|
|
19680
|
+
column.editType = this.numericOrString;
|
|
19681
|
+
}
|
|
19682
|
+
}
|
|
19683
|
+
|
|
19459
19684
|
switch (column.editType) {
|
|
19460
19685
|
case 'booleanedit':
|
|
19461
19686
|
{
|
|
@@ -19470,7 +19695,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19470
19695
|
case 'stringedit':
|
|
19471
19696
|
{
|
|
19472
19697
|
var textBox = common;
|
|
19473
|
-
if (column.field === ganttObj.columnMapping.duration || column.field === ganttObj.columnMapping.startDate ||
|
|
19698
|
+
if (column.field === ganttObj.columnMapping.duration || column.field === ganttObj.columnMapping.id || column.field === ganttObj.columnMapping.startDate ||
|
|
19474
19699
|
column.field === ganttObj.columnMapping.endDate) {
|
|
19475
19700
|
textBox.change = function (args) {
|
|
19476
19701
|
_this.validateScheduleFields(args, column, ganttObj);
|
|
@@ -19527,7 +19752,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19527
19752
|
break;
|
|
19528
19753
|
}
|
|
19529
19754
|
case 'dropdownedit':
|
|
19530
|
-
if (column.field ===
|
|
19755
|
+
if (column.field === ganttObj.columnMapping.type || column.field === ganttObj.columnMapping.manual) {
|
|
19531
19756
|
var dataKey = 'dataSource';
|
|
19532
19757
|
var fieldsKey = 'fields';
|
|
19533
19758
|
var types = [
|
|
@@ -19555,12 +19780,19 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19555
19780
|
return fieldsModel;
|
|
19556
19781
|
};
|
|
19557
19782
|
DialogEdit.prototype.validateScheduleFields = function (args, column, ganttObj) {
|
|
19558
|
-
var
|
|
19783
|
+
var _a;
|
|
19784
|
+
var dialog;
|
|
19785
|
+
if (!isNullOrUndefined(ganttObj.editModule.dialogModule.dialog)) {
|
|
19786
|
+
dialog = ganttObj.editModule.dialogModule.dialog;
|
|
19787
|
+
}
|
|
19559
19788
|
var targetId = null;
|
|
19560
19789
|
var inputElement;
|
|
19561
19790
|
var currentData = ganttObj.editModule.dialogModule.editedRecord;
|
|
19562
19791
|
var cellValue = null;
|
|
19563
19792
|
var colName = null;
|
|
19793
|
+
var formObject;
|
|
19794
|
+
var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
19795
|
+
var strViewType = this.parent.viewType;
|
|
19564
19796
|
if (!isNullOrUndefined(args.element)) {
|
|
19565
19797
|
inputElement = args.element;
|
|
19566
19798
|
targetId = inputElement.getAttribute('id');
|
|
@@ -19582,6 +19814,20 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19582
19814
|
else {
|
|
19583
19815
|
cellValue = inputElement.value;
|
|
19584
19816
|
colName = targetId.replace(ganttObj.element.id, '');
|
|
19817
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
19818
|
+
var customFn = function (args) {
|
|
19819
|
+
if (strViewType === 'ResourceView') {
|
|
19820
|
+
return ids.indexOf('T' + args['value']) === -1 && ids.indexOf('R' + args['value']) === -1;
|
|
19821
|
+
}
|
|
19822
|
+
else {
|
|
19823
|
+
return ids.indexOf(args['value']) === -1;
|
|
19824
|
+
}
|
|
19825
|
+
};
|
|
19826
|
+
var options = {
|
|
19827
|
+
rules: (_a = {}, _a[this.parent.taskFields.id] = { required: true, minLength: [customFn, 'ID is already present, please enter new value'] }, _a)
|
|
19828
|
+
};
|
|
19829
|
+
formObject = new FormValidator('#' + this.parent.element.id + 'GeneralTabContainer', options);
|
|
19830
|
+
}
|
|
19585
19831
|
}
|
|
19586
19832
|
if (colName.search('Segments') === 0) {
|
|
19587
19833
|
colName = colName.replace('SegmentsTabContainer', '');
|
|
@@ -19805,7 +20051,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19805
20051
|
this.validateDuration(currentData);
|
|
19806
20052
|
}
|
|
19807
20053
|
}
|
|
19808
|
-
if (columnName ===
|
|
20054
|
+
if (columnName === taskSettings.type) {
|
|
19809
20055
|
this.parent.setRecordValue('taskType', value, ganttProp, true);
|
|
19810
20056
|
}
|
|
19811
20057
|
if (taskSettings.manual === columnName) {
|
|
@@ -20165,9 +20411,6 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20165
20411
|
item.content = this.renderGeneralTab(item.content);
|
|
20166
20412
|
}
|
|
20167
20413
|
else if (item.content === 'Dependency') {
|
|
20168
|
-
if (this.editedRecord.hasChildRecords) {
|
|
20169
|
-
item.disabled = true;
|
|
20170
|
-
}
|
|
20171
20414
|
item.content = this.renderPredecessorTab(item.content);
|
|
20172
20415
|
}
|
|
20173
20416
|
else if (item.content === 'Resources') {
|
|
@@ -20273,6 +20516,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20273
20516
|
};
|
|
20274
20517
|
DialogEdit.prototype.isCheckIsDisabled = function (column) {
|
|
20275
20518
|
var disabled = false;
|
|
20519
|
+
var stringOrNumber;
|
|
20276
20520
|
if (column.allowEditing === false || column.isPrimaryKey || this.parent.readOnly) {
|
|
20277
20521
|
if (this.parent.customColumns.indexOf(column.field) !== -1) {
|
|
20278
20522
|
disabled = true;
|
|
@@ -20282,8 +20526,19 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20282
20526
|
column.field === this.parent.taskFields.duration || column.field === this.parent.taskFields.progress ||
|
|
20283
20527
|
column.field === this.parent.taskFields.startDate || column.field === this.parent.taskFields.endDate ||
|
|
20284
20528
|
column.field === this.parent.taskFields.baselineStartDate || column.field === this.parent.taskFields.baselineEndDate ||
|
|
20285
|
-
column.field === this.parent.taskFields.work || column.field ===
|
|
20286
|
-
|
|
20529
|
+
column.field === this.parent.taskFields.work || column.field === this.parent.taskFields.type) {
|
|
20530
|
+
for (var i = 0; i < this.parent.currentViewData['length']; i++) {
|
|
20531
|
+
if (!isNullOrUndefined(this.parent.currentViewData[i].ganttProperties.taskId)) {
|
|
20532
|
+
stringOrNumber = this.parent.currentViewData[i].ganttProperties.taskId;
|
|
20533
|
+
break;
|
|
20534
|
+
}
|
|
20535
|
+
}
|
|
20536
|
+
if (typeof (stringOrNumber) === "string") {
|
|
20537
|
+
disabled = false;
|
|
20538
|
+
}
|
|
20539
|
+
else {
|
|
20540
|
+
disabled = true;
|
|
20541
|
+
}
|
|
20287
20542
|
}
|
|
20288
20543
|
}
|
|
20289
20544
|
}
|
|
@@ -20295,13 +20550,30 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20295
20550
|
if ((column.field === this.parent.taskFields.endDate && ((!isNullOrUndefined(this.editedRecord['isManual']) &&
|
|
20296
20551
|
this.editedRecord['isManual'] == false) || this.parent.taskMode == 'Auto')) || column.field === this.parent.taskFields.duration ||
|
|
20297
20552
|
column.field === this.parent.taskFields.progress || column.field === this.parent.taskFields.work ||
|
|
20298
|
-
column.field ===
|
|
20553
|
+
column.field === this.parent.taskFields.type) {
|
|
20299
20554
|
disabled = true;
|
|
20300
20555
|
}
|
|
20301
20556
|
}
|
|
20302
20557
|
}
|
|
20303
20558
|
return disabled;
|
|
20304
20559
|
};
|
|
20560
|
+
DialogEdit.prototype.isParentValid = function (data) {
|
|
20561
|
+
if (data.length > 0) {
|
|
20562
|
+
for (var i = 0; i < data.length; i++) {
|
|
20563
|
+
if (data[i].uniqueID == this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20564
|
+
this.isValidData = false;
|
|
20565
|
+
break;
|
|
20566
|
+
}
|
|
20567
|
+
if (data[i].hasChildRecords) {
|
|
20568
|
+
this.isParentValid(data[i].childRecords);
|
|
20569
|
+
}
|
|
20570
|
+
if (!this.isValidData) {
|
|
20571
|
+
break;
|
|
20572
|
+
}
|
|
20573
|
+
}
|
|
20574
|
+
}
|
|
20575
|
+
return this.isValidData;
|
|
20576
|
+
};
|
|
20305
20577
|
DialogEdit.prototype.renderPredecessorTab = function (itemName) {
|
|
20306
20578
|
var _this = this;
|
|
20307
20579
|
var ganttObj = this.parent;
|
|
@@ -20417,7 +20689,20 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20417
20689
|
var rowResource = ganttData.ganttProperties.resourceInfo;
|
|
20418
20690
|
var inputModel = this.beforeOpenArgs[itemName];
|
|
20419
20691
|
var resourceTreeGridId = ganttObj.element.id + '' + itemName + 'TabContainer';
|
|
20420
|
-
var resourceData =
|
|
20692
|
+
var resourceData = [];
|
|
20693
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
20694
|
+
for (var i = 0; i < ganttObj.currentViewData.length; i++) {
|
|
20695
|
+
for (var j = 0; j < ganttObj.resources.length; j++) {
|
|
20696
|
+
if (ganttObj.currentViewData[i][ganttObj.taskFields.id] === ganttObj.resources[j][resourceSettings.id] &&
|
|
20697
|
+
(ganttObj.currentViewData[i].hasChildRecords || isNullOrUndefined(ganttObj.currentViewData[i].parentItem))) {
|
|
20698
|
+
resourceData.push(ganttObj.resources[j]);
|
|
20699
|
+
}
|
|
20700
|
+
}
|
|
20701
|
+
}
|
|
20702
|
+
}
|
|
20703
|
+
else {
|
|
20704
|
+
resourceData = extend([], [], ganttObj.resources, true);
|
|
20705
|
+
}
|
|
20421
20706
|
this.parent.dataOperation.updateResourceUnit(resourceData);
|
|
20422
20707
|
if (!isNullOrUndefined(rowResource)) {
|
|
20423
20708
|
var count = void 0;
|
|
@@ -20586,7 +20871,26 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20586
20871
|
this.preTableCollection = [];
|
|
20587
20872
|
for (var i = 0; i < flatData.length; i++) {
|
|
20588
20873
|
var data = flatData[i];
|
|
20589
|
-
|
|
20874
|
+
var currentFlatData = data;
|
|
20875
|
+
if (data.parentUniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20876
|
+
this.isValidData = false;
|
|
20877
|
+
}
|
|
20878
|
+
else {
|
|
20879
|
+
do {
|
|
20880
|
+
if (currentFlatData.parentItem) {
|
|
20881
|
+
currentFlatData = this.parent.flatData[this.parent.ids.indexOf(currentFlatData.parentItem.taskId)];
|
|
20882
|
+
if (currentFlatData.uniqueID == this.beforeOpenArgs.rowData['uniqueID']) {
|
|
20883
|
+
this.isValidData = false;
|
|
20884
|
+
break;
|
|
20885
|
+
}
|
|
20886
|
+
}
|
|
20887
|
+
} while (currentFlatData.parentItem);
|
|
20888
|
+
}
|
|
20889
|
+
if (data.hasChildRecords && this.isValidData) {
|
|
20890
|
+
this.isValidData = this.isParentValid(data.childRecords);
|
|
20891
|
+
}
|
|
20892
|
+
if (!this.isValidData) {
|
|
20893
|
+
this.isValidData = true;
|
|
20590
20894
|
continue;
|
|
20591
20895
|
}
|
|
20592
20896
|
var taskId = this.parent.viewType === 'ResourceView' ? data.ganttProperties.taskId.toString()
|
|
@@ -20792,6 +21096,10 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20792
21096
|
if (inputElement) {
|
|
20793
21097
|
var fieldName = inputElement.id.replace(ganttObj.element.id, '');
|
|
20794
21098
|
var controlObj = div.querySelector('#' + ganttObj.element.id + fieldName).ej2_instances[0];
|
|
21099
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit" && fieldName === this.parent.taskFields.id) {
|
|
21100
|
+
var valueString = controlObj.value.toString();
|
|
21101
|
+
controlObj.value = valueString;
|
|
21102
|
+
}
|
|
20795
21103
|
var column = ganttObj.columnByField[fieldName];
|
|
20796
21104
|
if (!isNullOrUndefined(column.edit) && isNullOrUndefined(column.edit.params)) {
|
|
20797
21105
|
var read = column.edit.read;
|
|
@@ -20827,6 +21135,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20827
21135
|
this.parent.setRecordValue('duration', fromRecord.ganttProperties.duration, toRecord.ganttProperties, true);
|
|
20828
21136
|
this.parent.setRecordValue('durationUnit', fromRecord.ganttProperties.durationUnit, toRecord.ganttProperties, true);
|
|
20829
21137
|
this.parent.setRecordValue('work', fromRecord.ganttProperties.work, toRecord.ganttProperties, true);
|
|
21138
|
+
this.parent.setRecordValue('type', fromRecord.ganttProperties.taskType, toRecord.ganttProperties, true);
|
|
20830
21139
|
if (!isNullOrUndefined(this.parent.taskFields.startDate)) {
|
|
20831
21140
|
this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.startDate);
|
|
20832
21141
|
}
|
|
@@ -20849,6 +21158,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
20849
21158
|
if (!isNullOrUndefined(this.parent.taskFields.manual)) {
|
|
20850
21159
|
this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.manual);
|
|
20851
21160
|
}
|
|
21161
|
+
if (!isNullOrUndefined(this.parent.taskFields.type)) {
|
|
21162
|
+
this.parent.dataOperation.updateMappingData(this.rowData, "type");
|
|
21163
|
+
}
|
|
20852
21164
|
};
|
|
20853
21165
|
DialogEdit.prototype.updatePredecessorTab = function (preElement) {
|
|
20854
21166
|
var gridObj = preElement.ej2_instances[0];
|
|
@@ -21090,8 +21402,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
21090
21402
|
this.parent.connectorLineModule.removeConnectorLineById('parent' + predecessor[from] + 'child' + predecessor[to]);
|
|
21091
21403
|
parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[from]);
|
|
21092
21404
|
childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[to]);
|
|
21093
|
-
if (
|
|
21094
|
-
(childGanttRecord && childGanttRecord.expanded === true)) {
|
|
21405
|
+
if (parentGanttRecord || childGanttRecord) {
|
|
21095
21406
|
connectorObj =
|
|
21096
21407
|
this.parent.predecessorModule.updateConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
|
|
21097
21408
|
if (!isNullOrUndefined(connectorObj)) {
|
|
@@ -21130,14 +21441,36 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
21130
21441
|
ConnectorLineEdit.prototype.idFromPredecessor = function (pre) {
|
|
21131
21442
|
var preArray = pre.split(',');
|
|
21132
21443
|
var preIdArray = [];
|
|
21444
|
+
var values;
|
|
21445
|
+
var match = [];
|
|
21133
21446
|
for (var j = 0; j < preArray.length; j++) {
|
|
21134
21447
|
var strArray = [];
|
|
21135
|
-
|
|
21136
|
-
|
|
21137
|
-
|
|
21448
|
+
values = preArray[j].split('+');
|
|
21449
|
+
if (preArray[j].indexOf('-') >= 0) {
|
|
21450
|
+
values = preArray[j].split('-');
|
|
21451
|
+
|
|
21452
|
+
}
|
|
21453
|
+
if (!isNullOrUndefined(values[0])) {
|
|
21454
|
+
var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
21455
|
+
if (ids.indexOf(values[0]) === -1) {
|
|
21456
|
+
if (values[0].indexOf(" ") != -1) {
|
|
21457
|
+
match = values[0].split(" ");
|
|
21458
|
+
if (match.length === 1) {
|
|
21459
|
+
match = values[0].match(/(\d+|[A-z]+)/g);
|
|
21460
|
+
}
|
|
21461
|
+
strArray.push(match[0]);
|
|
21462
|
+
}
|
|
21463
|
+
else {
|
|
21464
|
+
if (values[0].length === 1 || values[0].length === 2) {
|
|
21465
|
+
strArray.push(values[0]);
|
|
21466
|
+
}
|
|
21467
|
+
else {
|
|
21468
|
+
strArray.push(values[0].slice(0, -2));
|
|
21469
|
+
}
|
|
21470
|
+
}
|
|
21138
21471
|
}
|
|
21139
21472
|
else {
|
|
21140
|
-
|
|
21473
|
+
strArray.push(values[0]);
|
|
21141
21474
|
}
|
|
21142
21475
|
}
|
|
21143
21476
|
preIdArray.push((strArray.join('')));
|
|
@@ -21195,6 +21528,75 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
21195
21528
|
}
|
|
21196
21529
|
return true;
|
|
21197
21530
|
};
|
|
21531
|
+
// Get the root parent of the record
|
|
21532
|
+
ConnectorLineEdit.prototype.getRootParent = function (rec) {
|
|
21533
|
+
var parentRec = rec;
|
|
21534
|
+
if (rec.parentItem) {
|
|
21535
|
+
parentRec = this.parent.flatData.filter(function (item) {
|
|
21536
|
+
return item.uniqueID == rec.parentUniqueID;
|
|
21537
|
+
})[0];
|
|
21538
|
+
if (parentRec.parentItem) {
|
|
21539
|
+
parentRec = this.getRootParent(parentRec);
|
|
21540
|
+
}
|
|
21541
|
+
return parentRec;
|
|
21542
|
+
}
|
|
21543
|
+
return parentRec;
|
|
21544
|
+
};
|
|
21545
|
+
// To check whether the predecessor drawn is valid for parent task
|
|
21546
|
+
ConnectorLineEdit.prototype.validateParentPredecessor = function (fromRecord, toRecord) {
|
|
21547
|
+
if (toRecord.hasChildRecords && !fromRecord.hasChildRecords) {
|
|
21548
|
+
if (fromRecord.parentUniqueID === toRecord.uniqueID) {
|
|
21549
|
+
return false;
|
|
21550
|
+
}
|
|
21551
|
+
else {
|
|
21552
|
+
do {
|
|
21553
|
+
if (fromRecord.parentItem) {
|
|
21554
|
+
fromRecord = this.parent.flatData[this.parent.ids.indexOf(fromRecord.parentItem.taskId)];
|
|
21555
|
+
if (fromRecord.uniqueID === toRecord.uniqueID) {
|
|
21556
|
+
return false;
|
|
21557
|
+
}
|
|
21558
|
+
}
|
|
21559
|
+
} while (fromRecord.parentItem);
|
|
21560
|
+
}
|
|
21561
|
+
}
|
|
21562
|
+
else if (!toRecord.hasChildRecords && fromRecord.hasChildRecords) {
|
|
21563
|
+
if (toRecord.parentUniqueID === fromRecord.uniqueID) {
|
|
21564
|
+
return false;
|
|
21565
|
+
}
|
|
21566
|
+
else {
|
|
21567
|
+
do {
|
|
21568
|
+
if (toRecord.parentItem) {
|
|
21569
|
+
toRecord = this.parent.flatData[this.parent.ids.indexOf(toRecord.parentItem.taskId)];
|
|
21570
|
+
if (toRecord.uniqueID === fromRecord.uniqueID) {
|
|
21571
|
+
return false;
|
|
21572
|
+
}
|
|
21573
|
+
}
|
|
21574
|
+
} while (toRecord.parentItem);
|
|
21575
|
+
}
|
|
21576
|
+
}
|
|
21577
|
+
else if (toRecord.hasChildRecords && fromRecord.hasChildRecords) {
|
|
21578
|
+
if (toRecord.parentItem && fromRecord.parentItem) {
|
|
21579
|
+
if (fromRecord.parentUniqueID === toRecord.uniqueID || fromRecord.uniqueID === toRecord.parentUniqueID) {
|
|
21580
|
+
return false;
|
|
21581
|
+
}
|
|
21582
|
+
}
|
|
21583
|
+
else {
|
|
21584
|
+
if (!toRecord.parentItem && fromRecord.parentItem) {
|
|
21585
|
+
var fromRootParent = this.parent.connectorLineEditModule.getRootParent(fromRecord);
|
|
21586
|
+
if (fromRootParent.uniqueID === toRecord.uniqueID) {
|
|
21587
|
+
return false;
|
|
21588
|
+
}
|
|
21589
|
+
}
|
|
21590
|
+
else if (toRecord.parentItem && !fromRecord.parentItem) {
|
|
21591
|
+
var toRootParent = this.parent.connectorLineEditModule.getRootParent(toRecord);
|
|
21592
|
+
if (toRootParent.uniqueID === fromRecord.uniqueID) {
|
|
21593
|
+
return false;
|
|
21594
|
+
}
|
|
21595
|
+
}
|
|
21596
|
+
}
|
|
21597
|
+
}
|
|
21598
|
+
return true;
|
|
21599
|
+
};
|
|
21198
21600
|
/**
|
|
21199
21601
|
* To validate predecessor relations
|
|
21200
21602
|
*
|
|
@@ -21212,10 +21614,12 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
21212
21614
|
if (!isNullOrUndefined(predecessorString) && predecessorString.length > 0) {
|
|
21213
21615
|
predecessorIdArray = this.idFromPredecessor(predecessorString);
|
|
21214
21616
|
var _loop_2 = function (count) {
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
|
|
21617
|
+
if (parseInt(predecessorIdArray[predecessorIdArray.length - 1]) !== ganttRecord[this_2.parent.taskFields.id]) {
|
|
21618
|
+
var num = this_2.parent.ids.indexOf(predecessorIdArray[predecessorIdArray.length - 1]);
|
|
21619
|
+
var fromRecord = this_2.parent.currentViewData[num];
|
|
21620
|
+
if (fromRecord && ganttRecord) {
|
|
21621
|
+
flag = this_2.validateParentPredecessor(fromRecord, ganttRecord);
|
|
21622
|
+
}
|
|
21219
21623
|
}
|
|
21220
21624
|
// Check if predecessor exist more then one
|
|
21221
21625
|
var tempIdArray = predecessorIdArray.slice(0);
|
|
@@ -22291,7 +22695,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
22291
22695
|
this.parent.dataOperation.updateMappingData(ganttData, 'duration');
|
|
22292
22696
|
this.parent.dataOperation.updateMappingData(ganttData, 'endDate');
|
|
22293
22697
|
}
|
|
22294
|
-
else if (key ===
|
|
22698
|
+
else if (key === tasks.type) {
|
|
22295
22699
|
ganttObj.setRecordValue('taskType', data[key], ganttData.ganttProperties, true);
|
|
22296
22700
|
//this.parent.dataOperation.updateMappingData(ganttData, 'taskType');
|
|
22297
22701
|
}
|
|
@@ -22600,6 +23004,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
22600
23004
|
}
|
|
22601
23005
|
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
22602
23006
|
}
|
|
23007
|
+
if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
23008
|
+
(args.action === "DrawConnectorLine" || args.action === "DialogEditing")) {
|
|
23009
|
+
this.updateChildItems(ganttRecord);
|
|
23010
|
+
}
|
|
22603
23011
|
this.updateParentItemOnEditing();
|
|
22604
23012
|
}
|
|
22605
23013
|
/** Update parent up-to zeroth level */
|
|
@@ -23057,9 +23465,16 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23057
23465
|
}
|
|
23058
23466
|
for (var index = 0; index < currentLength; index++) {
|
|
23059
23467
|
var recordIndex = [];
|
|
23060
|
-
var resourceID = parseInt(currentResource[index][this.parent.resourceFields.id], 10);
|
|
23468
|
+
var resourceID = parseInt(currentResource[index][this.parent.resourceFields.id], 10).toString();
|
|
23469
|
+
if (resourceID === "NaN") {
|
|
23470
|
+
resourceID = currentResource[index][this.parent.resourceFields.id];
|
|
23471
|
+
}
|
|
23061
23472
|
for (var i = 0; i < prevResource.length; i++) {
|
|
23062
|
-
|
|
23473
|
+
var prevResourceID = parseInt(prevResource[i][this.parent.resourceFields.id], 10).toString();
|
|
23474
|
+
if (prevResourceID === "NaN") {
|
|
23475
|
+
prevResourceID = prevResource[i][this.parent.resourceFields.id];
|
|
23476
|
+
}
|
|
23477
|
+
if (prevResourceID === resourceID) {
|
|
23063
23478
|
recordIndex.push(i);
|
|
23064
23479
|
break;
|
|
23065
23480
|
}
|
|
@@ -23071,7 +23486,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23071
23486
|
}
|
|
23072
23487
|
}
|
|
23073
23488
|
else {
|
|
23074
|
-
|
|
23489
|
+
var record1 = parseInt(recordIndex[0].toString(), 10);
|
|
23490
|
+
if (record1.toString() === "NaN") {
|
|
23491
|
+
record1 = recordIndex[0].toString();
|
|
23492
|
+
}
|
|
23493
|
+
prevResource.splice(record1, 1);
|
|
23075
23494
|
}
|
|
23076
23495
|
}
|
|
23077
23496
|
var prevLength = prevResource ? prevResource.length : 0;
|
|
@@ -23383,14 +23802,26 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23383
23802
|
*/
|
|
23384
23803
|
Edit$$1.prototype.deleteResourceRecords = function (selectedRecords) {
|
|
23385
23804
|
var deleteRecords = [];
|
|
23386
|
-
|
|
23805
|
+
var _loop_1 = function (i) {
|
|
23387
23806
|
if (selectedRecords[i].parentItem) {
|
|
23388
23807
|
var data = selectedRecords[i];
|
|
23389
23808
|
var ids = data.ganttProperties.sharedTaskUniqueIds;
|
|
23390
23809
|
for (var j = 0; j < ids.length; j++) {
|
|
23391
|
-
deleteRecords.push(
|
|
23810
|
+
deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(ids[j].toString())]);
|
|
23392
23811
|
}
|
|
23812
|
+
deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
|
|
23813
|
+
}
|
|
23814
|
+
else {
|
|
23815
|
+
var resourceParent = this_1.parent.flatData.filter(function (data) {
|
|
23816
|
+
return (parseInt(data.ganttProperties.taskId) == parseInt(selectedRecords[i].ganttProperties.taskId) &&
|
|
23817
|
+
data.hasChildRecords);
|
|
23818
|
+
})[0];
|
|
23819
|
+
deleteRecords.push(resourceParent);
|
|
23393
23820
|
}
|
|
23821
|
+
};
|
|
23822
|
+
var this_1 = this;
|
|
23823
|
+
for (var i = 0; i < selectedRecords.length; i++) {
|
|
23824
|
+
_loop_1(i);
|
|
23394
23825
|
}
|
|
23395
23826
|
this.deleteRow(deleteRecords);
|
|
23396
23827
|
};
|
|
@@ -23837,6 +24268,14 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23837
24268
|
eventArgs.modifiedTaskData = getTaskData(args.updatedRecordCollection, null, null, this.parent);
|
|
23838
24269
|
setValue('action', args.action, eventArgs);
|
|
23839
24270
|
this.parent.isOnDelete = false;
|
|
24271
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
24272
|
+
var updateUnAssignedResources = eventArgs.data.filter(function (data) {
|
|
24273
|
+
return !data.hasChildRecords;
|
|
24274
|
+
});
|
|
24275
|
+
for (var i = 0; i < updateUnAssignedResources.length; i++) {
|
|
24276
|
+
this.checkWithUnassignedTask(updateUnAssignedResources[i]);
|
|
24277
|
+
}
|
|
24278
|
+
}
|
|
23840
24279
|
this.parent.trigger('actionComplete', eventArgs);
|
|
23841
24280
|
this.deletedTaskDetails = [];
|
|
23842
24281
|
this.parent.initiateEditAction(false);
|
|
@@ -23848,12 +24287,34 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23848
24287
|
* @private
|
|
23849
24288
|
*/
|
|
23850
24289
|
Edit$$1.prototype.getNewTaskId = function () {
|
|
23851
|
-
var
|
|
23852
|
-
|
|
23853
|
-
|
|
24290
|
+
var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
|
|
24291
|
+
var maxId = ids.length;
|
|
24292
|
+
var newTaskId = maxId + 1;
|
|
24293
|
+
if (this.parent.viewType === 'ResourceView') {
|
|
24294
|
+
if (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1) {
|
|
24295
|
+
newTaskId = newTaskId + 1;
|
|
24296
|
+
if (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1) {
|
|
24297
|
+
do {
|
|
24298
|
+
newTaskId = newTaskId + 1;
|
|
24299
|
+
} while (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1);
|
|
24300
|
+
}
|
|
24301
|
+
}
|
|
23854
24302
|
}
|
|
23855
24303
|
else {
|
|
23856
|
-
|
|
24304
|
+
if (ids.indexOf(newTaskId.toString()) != -1) {
|
|
24305
|
+
newTaskId = newTaskId + 1;
|
|
24306
|
+
if (ids.indexOf(newTaskId.toString()) != -1) {
|
|
24307
|
+
do {
|
|
24308
|
+
newTaskId = newTaskId + 1;
|
|
24309
|
+
} while (ids.indexOf(newTaskId.toString()) != -1);
|
|
24310
|
+
}
|
|
24311
|
+
}
|
|
24312
|
+
}
|
|
24313
|
+
if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
|
|
24314
|
+
return newTaskId = newTaskId.toString();
|
|
24315
|
+
}
|
|
24316
|
+
else {
|
|
24317
|
+
return newTaskId;
|
|
23857
24318
|
}
|
|
23858
24319
|
};
|
|
23859
24320
|
/**
|
|
@@ -23866,6 +24327,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23866
24327
|
Edit$$1.prototype.prepareNewlyAddedData = function (obj, rowPosition) {
|
|
23867
24328
|
var taskModel = this.parent.taskFields;
|
|
23868
24329
|
var id;
|
|
24330
|
+
var newTaskIDmd;
|
|
23869
24331
|
var ids = this.parent.ids;
|
|
23870
24332
|
/*Validate Task Id of data*/
|
|
23871
24333
|
if (obj[taskModel.id]) {
|
|
@@ -23873,7 +24335,13 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23873
24335
|
obj[taskModel.id] = null;
|
|
23874
24336
|
}
|
|
23875
24337
|
else {
|
|
23876
|
-
|
|
24338
|
+
if (typeof (obj[taskModel.id]) === "string") {
|
|
24339
|
+
newTaskIDmd = obj[taskModel.id];
|
|
24340
|
+
}
|
|
24341
|
+
else {
|
|
24342
|
+
newTaskIDmd = parseInt(obj[taskModel.id], 10);
|
|
24343
|
+
}
|
|
24344
|
+
obj[taskModel.id] = isNullOrUndefined(newTaskIDmd) ? null : newTaskIDmd;
|
|
23877
24345
|
}
|
|
23878
24346
|
}
|
|
23879
24347
|
if (!obj[taskModel.id]) {
|
|
@@ -24113,7 +24581,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24113
24581
|
recordIndex = currentItemIndex + dataChildCount + 1;
|
|
24114
24582
|
//Expand Add record's parent item for project view
|
|
24115
24583
|
if (!this.addRowSelectedItem.expanded && !this.parent.enableMultiTaskbar) {
|
|
24116
|
-
this.parent.expandByID(
|
|
24584
|
+
this.parent.expandByID(this.addRowSelectedItem.ganttProperties.rowUniqueID);
|
|
24117
24585
|
}
|
|
24118
24586
|
updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem) +
|
|
24119
24587
|
this.getVisibleChildRecordCount(this.addRowSelectedItem, 0, currentViewData) + 1;
|
|
@@ -24153,6 +24621,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24153
24621
|
/* Record collection update */
|
|
24154
24622
|
flatRecords.splice(recordIndex, 0, record);
|
|
24155
24623
|
currentViewData.splice(updatedCollectionIndex, 0, record);
|
|
24624
|
+
if (this.parent.viewType === 'ResourceView' && typeof (record.ganttProperties.taskId) === "number") {
|
|
24625
|
+
var taskString = record.ganttProperties.taskId;
|
|
24626
|
+
ids.push(taskString.toString());
|
|
24627
|
+
}
|
|
24156
24628
|
ids.splice(recordIndex, 0, record.ganttProperties.rowUniqueID.toString());
|
|
24157
24629
|
if (this.parent.viewType === 'ResourceView') {
|
|
24158
24630
|
var taskId = record.level === 0 ? 'R' + record.ganttProperties.taskId : 'T' + record.ganttProperties.taskId;
|
|
@@ -24254,27 +24726,27 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24254
24726
|
}
|
|
24255
24727
|
}
|
|
24256
24728
|
}
|
|
24257
|
-
var
|
|
24258
|
-
var originalData =
|
|
24259
|
-
var treeIndex =
|
|
24260
|
-
var uniqueTaskID =
|
|
24261
|
-
originalIndex =
|
|
24729
|
+
var _loop_2 = function (i) {
|
|
24730
|
+
var originalData = this_2.parent.modifiedRecords[i];
|
|
24731
|
+
var treeIndex = this_2.parent.allowRowDragAndDrop ? 1 : 0;
|
|
24732
|
+
var uniqueTaskID = this_2.parent.taskFields.id;
|
|
24733
|
+
originalIndex = this_2.parent.currentViewData.findIndex(function (data) {
|
|
24262
24734
|
return (data[uniqueTaskID] == originalData[uniqueTaskID]);
|
|
24263
24735
|
});
|
|
24264
|
-
if (
|
|
24265
|
-
|
|
24266
|
-
data: originalData, cell:
|
|
24267
|
-
column:
|
|
24736
|
+
if (this_2.parent.treeGrid.getRows()[originalIndex]) {
|
|
24737
|
+
this_2.parent.treeGrid.renderModule.cellRender({
|
|
24738
|
+
data: originalData, cell: this_2.parent.treeGrid.getRows()[originalIndex].cells[this_2.parent.treeColumnIndex + treeIndex],
|
|
24739
|
+
column: this_2.parent.treeGrid.grid.getColumns()[this_2.parent.treeColumnIndex],
|
|
24268
24740
|
requestType: 'rowDragAndDrop'
|
|
24269
24741
|
});
|
|
24270
|
-
|
|
24271
|
-
data: originalData, row:
|
|
24742
|
+
this_2.parent.treeGrid.renderModule.RowModifier({
|
|
24743
|
+
data: originalData, row: this_2.parent.treeGrid.getRows()[originalIndex], rowHeight: this_2.parent.rowHeight
|
|
24272
24744
|
});
|
|
24273
24745
|
}
|
|
24274
24746
|
};
|
|
24275
|
-
var
|
|
24747
|
+
var this_2 = this, originalIndex;
|
|
24276
24748
|
for (var i = 0; i < this.parent.modifiedRecords.length; i++) {
|
|
24277
|
-
|
|
24749
|
+
_loop_2(i);
|
|
24278
24750
|
}
|
|
24279
24751
|
};
|
|
24280
24752
|
/**
|
|
@@ -24361,6 +24833,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24361
24833
|
*/
|
|
24362
24834
|
Edit$$1.prototype.addRecord = function (data, rowPosition, rowIndex) {
|
|
24363
24835
|
var _this = this;
|
|
24836
|
+
var tempTaskID = this.parent.taskFields.id;
|
|
24364
24837
|
if (this.parent.editModule && this.parent.editSettings.allowAdding) {
|
|
24365
24838
|
this.parent.isDynamicData = true;
|
|
24366
24839
|
var cAddedRecord_1 = [];
|
|
@@ -24382,6 +24855,12 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
24382
24855
|
args = this.constructTaskAddedEventArgs(cAddedRecord_1, this.parent.editedRecords, 'beforeAdd');
|
|
24383
24856
|
this.parent.showSpinner();
|
|
24384
24857
|
this.parent.trigger('actionBegin', args, function (args) {
|
|
24858
|
+
if (!isNullOrUndefined(args.data[tempTaskID])) {
|
|
24859
|
+
if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
|
|
24860
|
+
args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
|
|
24861
|
+
args.newTaskData[tempTaskID] = args.data[tempTaskID];
|
|
24862
|
+
}
|
|
24863
|
+
}
|
|
24385
24864
|
if (!args.cancel) {
|
|
24386
24865
|
if (isRemoteData(_this.parent.dataSource)) {
|
|
24387
24866
|
var data_2 = _this.parent.dataSource;
|
|
@@ -25447,10 +25926,13 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25447
25926
|
this.parent.on('actionComplete', this.actionComplete, this);
|
|
25448
25927
|
this.parent.on('columnMenuOpen', this.columnMenuOpen, this);
|
|
25449
25928
|
};
|
|
25929
|
+
Filter$$1.prototype.wireEvents = function (a) {
|
|
25930
|
+
EventHandler.add(document.getElementById(a), 'click', this.mouseClickHandler, this);
|
|
25931
|
+
};
|
|
25450
25932
|
Filter$$1.prototype.initiateFiltering = function (column) {
|
|
25451
25933
|
var treeColumn = this.parent.getColumnByField(column.field, this.parent.treeGridModule.treeGridColumns);
|
|
25452
25934
|
column.allowFiltering = column.allowFiltering === false ? false : true;
|
|
25453
|
-
if (column.allowFiltering && this.parent.filterSettings.type === 'Menu' && !column.filter) {
|
|
25935
|
+
if (column.allowFiltering && (this.parent.filterSettings.type === 'Menu' || this.parent.filterSettings.type === 'Excel') && !column.filter) {
|
|
25454
25936
|
column.filter = { ui: this.getCustomFilterUi(column) };
|
|
25455
25937
|
}
|
|
25456
25938
|
if (treeColumn) {
|
|
@@ -25480,6 +25962,14 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25480
25962
|
}
|
|
25481
25963
|
return filterUI;
|
|
25482
25964
|
};
|
|
25965
|
+
Filter$$1.prototype.mouseClickHandler = function (e) {
|
|
25966
|
+
if (closest(e.target, ".e-excelfilter")) {
|
|
25967
|
+
this.parent.treeGrid.grid.notify("click", e);
|
|
25968
|
+
}
|
|
25969
|
+
};
|
|
25970
|
+
Filter$$1.prototype.unWireEvents = function () {
|
|
25971
|
+
EventHandler.remove(this.parent.element, 'click', this.mouseClickHandler);
|
|
25972
|
+
};
|
|
25483
25973
|
Filter$$1.prototype.getDatePickerFilter = function (columnName) {
|
|
25484
25974
|
var _this = this;
|
|
25485
25975
|
var parent = this.parent;
|
|
@@ -25601,6 +26091,15 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25601
26091
|
}
|
|
25602
26092
|
};
|
|
25603
26093
|
Filter$$1.prototype.actionComplete = function (args) {
|
|
26094
|
+
if (!isNullOrUndefined(args['filterModel'])) {
|
|
26095
|
+
if (!isNullOrUndefined(args['filterModel']['dialogObj'])) {
|
|
26096
|
+
if (!isNullOrUndefined(args['filterModel']['dialogObj']['element'])) {
|
|
26097
|
+
if (this.parent.filterSettings.type === 'Excel') {
|
|
26098
|
+
this.wireEvents(args['filterModel']['dialogObj']['element'].id);
|
|
26099
|
+
}
|
|
26100
|
+
}
|
|
26101
|
+
}
|
|
26102
|
+
}
|
|
25604
26103
|
if (args.requestType === filterAfterOpen) {
|
|
25605
26104
|
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25606
26105
|
this.filterMenuElement = getValue('filterModel.dlgObj.element', args);
|
|
@@ -25618,12 +26117,15 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25618
26117
|
if ((args.columnName === predecessor && isNullOrUndefined(getValue(predecessor, filterValues)))
|
|
25619
26118
|
|| (args.columnName === resource && isNullOrUndefined(getValue(resource, filterValues)))) {
|
|
25620
26119
|
var element = this.filterMenuElement.querySelector('.e-dropdownlist');
|
|
25621
|
-
var instanceObj =
|
|
25622
|
-
|
|
25623
|
-
|
|
26120
|
+
var instanceObj = void 0;
|
|
26121
|
+
if (!isNullOrUndefined(element)) {
|
|
26122
|
+
instanceObj = getValue('ej2_instances[0]', element);
|
|
26123
|
+
instanceObj.index = 2;
|
|
26124
|
+
instanceObj.dataBind();
|
|
26125
|
+
}
|
|
25624
26126
|
}
|
|
25625
26127
|
else if (args.columnName === taskID && isNullOrUndefined(getValue(taskID, filterValues)) && this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25626
|
-
var element = this.filterMenuElement.querySelector('.e-
|
|
26128
|
+
var element = this.filterMenuElement.querySelector('.e-flmenu-input');
|
|
25627
26129
|
var instanceObj = getValue('ej2_instances[0]', element);
|
|
25628
26130
|
if (!isNullOrUndefined(instanceObj) && isNullOrUndefined(this.parent.columnByField[args.columnName].format)) {
|
|
25629
26131
|
instanceObj.format = 'n';
|
|
@@ -25631,45 +26133,9 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25631
26133
|
}
|
|
25632
26134
|
}
|
|
25633
26135
|
};
|
|
25634
|
-
Filter$$1.prototype.setPosition = function (li, ul) {
|
|
25635
|
-
var gridPos = this.parent.element.getBoundingClientRect();
|
|
25636
|
-
var liPos = li.getBoundingClientRect();
|
|
25637
|
-
var left = liPos.right + window.scrollX;
|
|
25638
|
-
var top = liPos.top + window.scrollY;
|
|
25639
|
-
if (gridPos.right < (left + ul.offsetWidth)) {
|
|
25640
|
-
if ((liPos.left - ul.offsetWidth) > gridPos.left) {
|
|
25641
|
-
left = (liPos.left - ul.offsetWidth);
|
|
25642
|
-
}
|
|
25643
|
-
else {
|
|
25644
|
-
left -= (left + ul.offsetWidth) - gridPos.right;
|
|
25645
|
-
}
|
|
25646
|
-
}
|
|
25647
|
-
ul.style.top = top + 'px';
|
|
25648
|
-
ul.style.left = left + 'px';
|
|
25649
|
-
};
|
|
25650
26136
|
Filter$$1.prototype.updateFilterMenuPosition = function (element, args) {
|
|
25651
26137
|
addClass([element], 'e-gantt');
|
|
25652
|
-
document.querySelector('#' + this.parent.
|
|
25653
|
-
var targetElement;
|
|
25654
|
-
if (this.parent.showColumnMenu) {
|
|
25655
|
-
targetElement = document.querySelector('#treeGrid' + this.parent.controlId + '_gridcontrol_colmenu_Filter');
|
|
25656
|
-
element.style.zIndex = targetElement.parentElement.style.zIndex;
|
|
25657
|
-
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25658
|
-
this.setPosition(targetElement, getValue('filterModel.dlgObj.element', args));
|
|
25659
|
-
}
|
|
25660
|
-
else {
|
|
25661
|
-
this.setPosition(targetElement, getValue('filterModel.dialogObj.element', args));
|
|
25662
|
-
}
|
|
25663
|
-
}
|
|
25664
|
-
else {
|
|
25665
|
-
targetElement = this.parent.treeGrid.grid.getColumnHeaderByField(args.columnName).querySelector('.e-filtermenudiv');
|
|
25666
|
-
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25667
|
-
getFilterMenuPostion(targetElement, getValue('filterModel.dlgObj', args));
|
|
25668
|
-
}
|
|
25669
|
-
else {
|
|
25670
|
-
getFilterMenuPostion(targetElement, getValue('filterModel.dialogObj', args));
|
|
25671
|
-
}
|
|
25672
|
-
}
|
|
26138
|
+
document.querySelector('#' + this.parent.treeGrid.grid.element.id).appendChild(element);
|
|
25673
26139
|
if (this.parent.treeGrid.filterSettings.type === 'Menu') {
|
|
25674
26140
|
element.querySelector('.e-valid-input').focus();
|
|
25675
26141
|
}
|
|
@@ -25690,6 +26156,7 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
25690
26156
|
*/
|
|
25691
26157
|
Filter$$1.prototype.destroy = function () {
|
|
25692
26158
|
this.removeEventListener();
|
|
26159
|
+
this.unWireEvents();
|
|
25693
26160
|
};
|
|
25694
26161
|
return Filter$$1;
|
|
25695
26162
|
}());
|
|
@@ -26705,7 +27172,7 @@ var Toolbar$3 = /** @__PURE__ @class */ (function () {
|
|
|
26705
27172
|
var isDeleteSelected = gObj.selectionModule ? gObj.selectionModule.selectedRowIndexes.length > 0 ||
|
|
26706
27173
|
gObj.selectionModule.getSelectedRowCellIndexes().length > 0 ? true : false : false;
|
|
26707
27174
|
// eslint-disable-next-line
|
|
26708
|
-
edit.allowDeleting &&
|
|
27175
|
+
edit.allowDeleting && hasData && isDeleteSelected && !touchEdit ?
|
|
26709
27176
|
enableItems.push(gID + '_delete') : disableItems.push(gID + '_delete');
|
|
26710
27177
|
if (gObj.editSettings.mode === 'Auto' && !isNullOrUndefined(gObj.editModule.cellEditModule)
|
|
26711
27178
|
&& gObj.editModule.cellEditModule.isCellEdit) {
|
|
@@ -26818,7 +27285,6 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
26818
27285
|
this.nonworkingContainer = createElement('div', {
|
|
26819
27286
|
className: nonworkingContainer
|
|
26820
27287
|
});
|
|
26821
|
-
this.nonworkingContainer.setAttribute("role", "NonWorkingDays");
|
|
26822
27288
|
this.parent.ganttChartModule.chartBodyContent.appendChild(this.nonworkingContainer);
|
|
26823
27289
|
}
|
|
26824
27290
|
};
|
|
@@ -27025,7 +27491,7 @@ var EventMarker$1 = /** @__PURE__ @class */ (function () {
|
|
|
27025
27491
|
this.eventMarkersContainer = createElement('div', {
|
|
27026
27492
|
className: eventMarkersContainer
|
|
27027
27493
|
});
|
|
27028
|
-
this.eventMarkersContainer.setAttribute("role", "
|
|
27494
|
+
this.eventMarkersContainer.setAttribute("role", "term");
|
|
27029
27495
|
this.parent.ganttChartModule.chartBodyContent.appendChild(this.eventMarkersContainer);
|
|
27030
27496
|
}
|
|
27031
27497
|
this.eventMarkersContainer.innerHTML = '';
|
|
@@ -27180,13 +27646,13 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27180
27646
|
CriticalPath.prototype.showCriticalPath = function (isCritical) {
|
|
27181
27647
|
var modelIds = this.parent.ids;
|
|
27182
27648
|
var totalRecords = this.parent.flatData;
|
|
27183
|
-
if (isCritical && this.parent.flatData.length > 0
|
|
27649
|
+
if (isCritical && this.parent.flatData.length > 0) {
|
|
27184
27650
|
this.parent.enableCriticalPath = true;
|
|
27185
27651
|
var parentRecords = this.parent.treeGrid.parentData;
|
|
27186
27652
|
var checkEndDateTaskid = void 0;
|
|
27187
27653
|
var checkEndDate = parentRecords[0].ganttProperties.endDate;
|
|
27188
27654
|
var dateDifference = 0;
|
|
27189
|
-
var
|
|
27655
|
+
var checkBeyondEnddate_1 = [];
|
|
27190
27656
|
var totalPredecessorsCollection = [];
|
|
27191
27657
|
var totalPredecessorsCollectionId = [];
|
|
27192
27658
|
var predecessorIndex = 0;
|
|
@@ -27225,12 +27691,12 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27225
27691
|
totalRecords[j].slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
27226
27692
|
totalRecords[j].ganttProperties.slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
|
|
27227
27693
|
if (totalRecords[j].ganttProperties.endDate >= checkEndDate) {
|
|
27228
|
-
|
|
27694
|
+
checkBeyondEnddate_1.push(totalRecords[j].ganttProperties.taskId);
|
|
27229
27695
|
}
|
|
27230
27696
|
if (totalRecords[j].ganttProperties.predecessor) {
|
|
27231
27697
|
if (totalRecords[j].ganttProperties.predecessor.length !== 0) {
|
|
27232
27698
|
totalPredecessorsCollection.push(totalRecords[j]);
|
|
27233
|
-
totalPredecessorsCollectionId.push(
|
|
27699
|
+
totalPredecessorsCollectionId.push((totalRecords[j].ganttProperties.taskId));
|
|
27234
27700
|
}
|
|
27235
27701
|
}
|
|
27236
27702
|
}
|
|
@@ -27239,25 +27705,36 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27239
27705
|
this.resourceCollectionIds[i] = this.parent.taskIds[i].slice(1);
|
|
27240
27706
|
}
|
|
27241
27707
|
}
|
|
27242
|
-
|
|
27243
|
-
|
|
27244
|
-
|
|
27245
|
-
|
|
27246
|
-
predecessorIndex = modelIds.indexOf(checkBeyondEnddate[k].toString());
|
|
27708
|
+
var _loop_1 = function (k) {
|
|
27709
|
+
if (totalPredecessorsCollectionId.indexOf(checkBeyondEnddate_1[k]) === -1) {
|
|
27710
|
+
if (this_1.parent.viewType === 'ProjectView') {
|
|
27711
|
+
predecessorIndex = modelIds.indexOf(checkBeyondEnddate_1[k].toString());
|
|
27247
27712
|
}
|
|
27248
27713
|
else {
|
|
27249
|
-
|
|
27714
|
+
var currentRecords = this_1.parent.currentViewData.filter(function (data) {
|
|
27715
|
+
return parseInt(data.ganttProperties.taskId) == checkBeyondEnddate_1[k];
|
|
27716
|
+
});
|
|
27717
|
+
for (var i = 0; i < currentRecords.length; i++) {
|
|
27718
|
+
if (!currentRecords[i].hasChildRecords && currentRecords[i].ganttProperties.endDate >= this_1.maxEndDate) {
|
|
27719
|
+
predecessorIndex = currentRecords[i].index;
|
|
27720
|
+
}
|
|
27721
|
+
}
|
|
27250
27722
|
}
|
|
27251
27723
|
if (totalRecords[predecessorIndex].ganttProperties.progress < 100) {
|
|
27252
27724
|
totalRecords[predecessorIndex].isCritical = true;
|
|
27253
27725
|
totalRecords[predecessorIndex].ganttProperties.isCritical = true;
|
|
27254
27726
|
}
|
|
27255
27727
|
totalRecords[predecessorIndex]['slack'] = 0 + ' ' + totalRecords[predecessorIndex].ganttProperties.durationUnit;
|
|
27256
|
-
taskBeyondEnddate.push(
|
|
27728
|
+
taskBeyondEnddate.push(checkBeyondEnddate_1[k]);
|
|
27257
27729
|
}
|
|
27258
27730
|
else {
|
|
27259
|
-
predecessorTaskBeyondEnddate.push(
|
|
27731
|
+
predecessorTaskBeyondEnddate.push(checkBeyondEnddate_1[k]);
|
|
27260
27732
|
}
|
|
27733
|
+
};
|
|
27734
|
+
var this_1 = this;
|
|
27735
|
+
// seperate the predecessor connected taskes from the individual taskes that ends on total project end date
|
|
27736
|
+
for (var k = 0; k < checkBeyondEnddate_1.length; k++) {
|
|
27737
|
+
_loop_1(k);
|
|
27261
27738
|
}
|
|
27262
27739
|
var predecessorLength = totalPredecessorsCollection.length;
|
|
27263
27740
|
var endTask = [];
|
|
@@ -27267,12 +27744,22 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27267
27744
|
var from = -1;
|
|
27268
27745
|
var toPredecessor = -1;
|
|
27269
27746
|
var fromPredecessor = -1;
|
|
27747
|
+
var tempTaskId = void 0;
|
|
27270
27748
|
var currentIndex = x;
|
|
27271
27749
|
var predecessor = totalPredecessorsCollection[x].ganttProperties.predecessor;
|
|
27272
27750
|
var individualPredecessorLength = totalPredecessorsCollection[x].ganttProperties.predecessor.length;
|
|
27273
|
-
var taskid = (
|
|
27751
|
+
var taskid = ((totalPredecessorsCollection[x].ganttProperties.taskId));
|
|
27274
27752
|
for (var y = 0; y < individualPredecessorLength; y++) {
|
|
27275
|
-
if (
|
|
27753
|
+
if (!isNaN(Number(predecessor[y].from)) && typeof (taskid) != "string") {
|
|
27754
|
+
tempTaskId = parseInt((predecessor[y].from), 10);
|
|
27755
|
+
}
|
|
27756
|
+
else if (!isNaN(Number(predecessor[y].from)) && typeof (taskid) === "string") {
|
|
27757
|
+
tempTaskId = predecessor[y].from;
|
|
27758
|
+
}
|
|
27759
|
+
else {
|
|
27760
|
+
tempTaskId = predecessor[y].from;
|
|
27761
|
+
}
|
|
27762
|
+
if (tempTaskId === taskid) {
|
|
27276
27763
|
if (to === -1) {
|
|
27277
27764
|
if (!predecessor[y].offset) {
|
|
27278
27765
|
to = predecessor[y].to;
|
|
@@ -27294,7 +27781,16 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27294
27781
|
}
|
|
27295
27782
|
}
|
|
27296
27783
|
}
|
|
27297
|
-
if (
|
|
27784
|
+
if (!isNaN(Number(predecessor[y].to)) && typeof (taskid) != "string") {
|
|
27785
|
+
tempTaskId = parseInt((predecessor[y].to), 10);
|
|
27786
|
+
}
|
|
27787
|
+
else if (!isNaN(Number(predecessor[y].to)) && typeof (taskid) === "string") {
|
|
27788
|
+
tempTaskId = predecessor[y].to;
|
|
27789
|
+
}
|
|
27790
|
+
else {
|
|
27791
|
+
tempTaskId = predecessor[y].to;
|
|
27792
|
+
}
|
|
27793
|
+
if (tempTaskId === taskid) {
|
|
27298
27794
|
if (from === -1) {
|
|
27299
27795
|
if (!predecessor[y].offset) {
|
|
27300
27796
|
from = predecessor[y].from;
|
|
@@ -27363,7 +27859,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27363
27859
|
this.detailPredecessorCollection = collection;
|
|
27364
27860
|
this.predecessorCollectionTaskIds = collectionTaskId;
|
|
27365
27861
|
}
|
|
27366
|
-
if (isCritical === false && this.parent.flatData.length > 0
|
|
27862
|
+
if (isCritical === false && this.parent.flatData.length > 0) {
|
|
27367
27863
|
var pathIndex = void 0;
|
|
27368
27864
|
this.parent.enableCriticalPath = false;
|
|
27369
27865
|
for (var z = 0; z < this.criticalPathCollection.length; z++) {
|
|
@@ -27379,6 +27875,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27379
27875
|
CriticalPath.prototype.slackCalculation = function (fromDataObject, collection, collectionTaskId, checkEndDate, flatRecords, modelRecordIds) {
|
|
27380
27876
|
var fromDateArray = fromDataObject[0]['fromdata'].split(',');
|
|
27381
27877
|
var fromDataPredecessor = fromDataObject[0]['fromDataPredecessor'].split(',');
|
|
27878
|
+
collectionTaskId = collectionTaskId.toString();
|
|
27879
|
+
collectionTaskId = collectionTaskId.split(',');
|
|
27382
27880
|
var fromDateArray1 = [];
|
|
27383
27881
|
var fromTaskIdIndex;
|
|
27384
27882
|
var indexFromTaskId;
|
|
@@ -27390,8 +27888,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27390
27888
|
var ffslack;
|
|
27391
27889
|
for (var i = 0; i < fromDateArray.length; i++) {
|
|
27392
27890
|
fromDateArray1 = fromDateArray[i].split(':');
|
|
27393
|
-
fromTaskIdIndex = collectionTaskId.indexOf(
|
|
27394
|
-
totaskId = collectionTaskId.indexOf(
|
|
27891
|
+
fromTaskIdIndex = collectionTaskId.indexOf((fromDateArray1[0].toString()));
|
|
27892
|
+
totaskId = collectionTaskId.indexOf((fromDataObject[0]['todateID'].toString()));
|
|
27395
27893
|
if (this.parent.viewType === 'ProjectView') {
|
|
27396
27894
|
indexFromTaskId = modelRecordIds.indexOf(fromDateArray1[0].toString());
|
|
27397
27895
|
indexToTaskId = modelRecordIds.indexOf(fromDataObject[0]['todateID'].toString());
|
|
@@ -27736,6 +28234,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27736
28234
|
CriticalPath.prototype.finalCriticalPath = function (collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
|
|
27737
28235
|
var criticalPathIds = [];
|
|
27738
28236
|
var index;
|
|
28237
|
+
var predecessorFrom;
|
|
27739
28238
|
for (var x = collection.length - 1; x >= 0; x--) {
|
|
27740
28239
|
if (this.parent.viewType === 'ProjectView') {
|
|
27741
28240
|
index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
|
|
@@ -27779,7 +28278,13 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27779
28278
|
/* eslint-disable-next-line */
|
|
27780
28279
|
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.endDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
27781
28280
|
}
|
|
27782
|
-
if (
|
|
28281
|
+
if (typeof (flatRecords[index][this.parent.taskFields.id]) === 'number') {
|
|
28282
|
+
predecessorFrom = parseInt(predecessorLength[i].from, 10);
|
|
28283
|
+
}
|
|
28284
|
+
else {
|
|
28285
|
+
predecessorFrom = predecessorLength[i].from;
|
|
28286
|
+
}
|
|
28287
|
+
if (predecessorFrom === flatRecords[index][this.parent.taskFields.id] &&
|
|
27783
28288
|
flatRecords[toID].slack === noSlackValue && dateDifference <= 0) {
|
|
27784
28289
|
flatRecords[index].slack = noSlackValue;
|
|
27785
28290
|
flatRecords[index].ganttProperties.slack = noSlackValue;
|
|
@@ -27814,26 +28319,47 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27814
28319
|
CriticalPath.prototype.criticalConnectorLine = function (criticalPathIds, collection, condition, collectionTaskId) {
|
|
27815
28320
|
var ganttChartElement = this.parent.ganttChartModule.chartElement;
|
|
27816
28321
|
this.parent.removeCriticalPathStyles();
|
|
27817
|
-
|
|
27818
|
-
var criticalData
|
|
27819
|
-
if (
|
|
27820
|
-
criticalData =
|
|
28322
|
+
var _loop_2 = function (i) {
|
|
28323
|
+
var criticalData;
|
|
28324
|
+
if (this_2.parent.viewType === 'ProjectView') {
|
|
28325
|
+
criticalData = this_2.parent.currentViewData[this_2.parent.ids.indexOf(criticalPathIds[i].toString())];
|
|
27821
28326
|
}
|
|
27822
28327
|
else {
|
|
27823
|
-
|
|
28328
|
+
var currentRecords = this_2.parent.currentViewData.filter(function (data) {
|
|
28329
|
+
return (data.ganttProperties.taskId).toString() == criticalPathIds[i].toString();
|
|
28330
|
+
});
|
|
28331
|
+
for (var i_1 = 0; i_1 < currentRecords.length; i_1++) {
|
|
28332
|
+
if (currentRecords[i_1].ganttProperties.isCritical || currentRecords[i_1].ganttProperties.endDate >= this_2.maxEndDate) {
|
|
28333
|
+
criticalData = currentRecords[i_1];
|
|
28334
|
+
}
|
|
28335
|
+
}
|
|
27824
28336
|
}
|
|
27825
|
-
var index =
|
|
27826
|
-
var element =
|
|
28337
|
+
var index = this_2.parent.currentViewData.indexOf(criticalData);
|
|
28338
|
+
var element = this_2.parent.getRowByIndex(index);
|
|
27827
28339
|
var taskClass = void 0;
|
|
27828
|
-
var columnFields =
|
|
28340
|
+
var columnFields = this_2.parent.taskFields;
|
|
28341
|
+
if (criticalData.parentItem) {
|
|
28342
|
+
var parentRecord = this_2.parent.currentViewData.filter(function (data) {
|
|
28343
|
+
return criticalData.parentItem.uniqueID == data.uniqueID;
|
|
28344
|
+
});
|
|
28345
|
+
var parentIndex = this_2.parent.currentViewData.indexOf(parentRecord[0]);
|
|
28346
|
+
var parentElement = this_2.parent.getRowByIndex(parentIndex);
|
|
28347
|
+
var parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
|
|
28348
|
+
for (var i_2 = 0; i_2 < parentTaskbarElement.length; i_2++) {
|
|
28349
|
+
if (parentTaskbarElement[i_2].getAttribute('rowuniqueid') == criticalData['rowUniqueID']) {
|
|
28350
|
+
addClass(parentTaskbarElement[i_2].querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
28351
|
+
}
|
|
28352
|
+
}
|
|
28353
|
+
}
|
|
27829
28354
|
/* eslint-disable-next-line */
|
|
27830
|
-
if (
|
|
28355
|
+
if (this_2.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
27831
28356
|
taskClass = criticalUnscheduledTask;
|
|
27832
28357
|
}
|
|
27833
28358
|
else {
|
|
27834
28359
|
taskClass = criticalChildProgressBarInnerDiv;
|
|
27835
28360
|
}
|
|
27836
|
-
if (element
|
|
28361
|
+
if (element && (this_2.parent.viewType === 'ProjectView' || (this_2.parent.viewType === 'ResourceView' &&
|
|
28362
|
+
!criticalData.hasChildRecords))) {
|
|
27837
28363
|
if (element.getElementsByClassName('e-milestone-top')[0]) {
|
|
27838
28364
|
addClass(element.querySelectorAll('.e-milestone-top'), criticalMilestoneTop);
|
|
27839
28365
|
}
|
|
@@ -27847,19 +28373,32 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
27847
28373
|
addClass(element.querySelectorAll('.e-gantt-child-progressbar-inner-div'), taskClass);
|
|
27848
28374
|
}
|
|
27849
28375
|
}
|
|
28376
|
+
};
|
|
28377
|
+
var this_2 = this;
|
|
28378
|
+
for (var i = 0; i < criticalPathIds.length; i++) {
|
|
28379
|
+
_loop_2(i);
|
|
27850
28380
|
}
|
|
27851
28381
|
if (collection.length !== 0) {
|
|
27852
28382
|
var index = 0;
|
|
27853
28383
|
var currentdata = void 0;
|
|
27854
28384
|
var checking = [];
|
|
27855
28385
|
var checkint = void 0;
|
|
28386
|
+
var values = void 0;
|
|
27856
28387
|
for (var i = 0; i < this.criticalPathCollection.length; i++) {
|
|
27857
28388
|
index = collectionTaskId.indexOf(this.criticalPathCollection[i]);
|
|
27858
28389
|
currentdata = collection[index];
|
|
27859
28390
|
if (index !== -1 && currentdata['to']) {
|
|
27860
28391
|
checking = currentdata['to'].split(',');
|
|
27861
28392
|
for (var j = 0; j < checking.length; j++) {
|
|
27862
|
-
|
|
28393
|
+
values = checking[j].split('+');
|
|
28394
|
+
if (checking[j].indexOf('-') >= 0) {
|
|
28395
|
+
values = checking[j].split('-');
|
|
28396
|
+
|
|
28397
|
+
}
|
|
28398
|
+
checkint = (values[0].replace(":", ""));
|
|
28399
|
+
if (typeof (criticalPathIds[j]) === "number") {
|
|
28400
|
+
checkint = parseInt(values[0], 10);
|
|
28401
|
+
}
|
|
27863
28402
|
if (criticalPathIds.indexOf(checkint) !== -1) {
|
|
27864
28403
|
var lineElement = this.parent.element.querySelectorAll('#ConnectorLineparent' +
|
|
27865
28404
|
currentdata['taskid'] + 'child' + checkint);
|
|
@@ -27991,7 +28530,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
27991
28530
|
}
|
|
27992
28531
|
switch (this.item) {
|
|
27993
28532
|
case 'TaskInformation':
|
|
27994
|
-
|
|
28533
|
+
if (isNaN(Number(this.rowData.ganttProperties.rowUniqueID))) {
|
|
28534
|
+
this.parent.openEditDialog(this.rowData.ganttProperties.rowUniqueID);
|
|
28535
|
+
}
|
|
28536
|
+
else {
|
|
28537
|
+
this.parent.openEditDialog(Number(this.rowData.ganttProperties.rowUniqueID));
|
|
28538
|
+
}
|
|
27995
28539
|
break;
|
|
27996
28540
|
case 'Above':
|
|
27997
28541
|
case 'Below':
|
|
@@ -28804,7 +29348,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28804
29348
|
};
|
|
28805
29349
|
RowDD$$1.prototype.rowDragStartHelper = function (args) {
|
|
28806
29350
|
this.parent.trigger('rowDragStartHelper', args);
|
|
28807
|
-
if (this.parent.readOnly
|
|
29351
|
+
if (this.parent.readOnly) {
|
|
28808
29352
|
args.cancel = true;
|
|
28809
29353
|
}
|
|
28810
29354
|
if (this.parent.viewType === 'ResourceView' && getValue('level', args.data[0]) === 0) {
|
|
@@ -28940,7 +29484,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28940
29484
|
var uniqueTaskID_1 = this_1.parent.taskFields.id;
|
|
28941
29485
|
if (draggedRecord.index < droppedRecord.index) {
|
|
28942
29486
|
startIndex = draggedRecord.index;
|
|
28943
|
-
var
|
|
29487
|
+
var _loop_3 = function (i_1) {
|
|
28944
29488
|
var currentData = this_1.parent.currentViewData.filter(function (e) {
|
|
28945
29489
|
return e[uniqueTaskID_1] === ganttData_1[i_1][uniqueTaskID_1];
|
|
28946
29490
|
})[0];
|
|
@@ -28950,14 +29494,14 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28950
29494
|
}
|
|
28951
29495
|
};
|
|
28952
29496
|
for (var i_1 = 0; i_1 < ganttData_1.length; i_1++) {
|
|
28953
|
-
var state_2 =
|
|
29497
|
+
var state_2 = _loop_3(i_1);
|
|
28954
29498
|
if (state_2 === "break")
|
|
28955
29499
|
break;
|
|
28956
29500
|
}
|
|
28957
29501
|
}
|
|
28958
29502
|
else {
|
|
28959
29503
|
startIndex = droppedRecord.index;
|
|
28960
|
-
var
|
|
29504
|
+
var _loop_4 = function (i_2) {
|
|
28961
29505
|
var currentData = this_1.parent.currentViewData.filter(function (e) {
|
|
28962
29506
|
return e[uniqueTaskID_1] === ganttData_1[i_2][uniqueTaskID_1];
|
|
28963
29507
|
})[0];
|
|
@@ -28967,12 +29511,12 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28967
29511
|
}
|
|
28968
29512
|
};
|
|
28969
29513
|
for (var i_2 = 0; i_2 < ganttData_1.length; i_2++) {
|
|
28970
|
-
var state_3 =
|
|
29514
|
+
var state_3 = _loop_4(i_2);
|
|
28971
29515
|
if (state_3 === "break")
|
|
28972
29516
|
break;
|
|
28973
29517
|
}
|
|
28974
29518
|
}
|
|
28975
|
-
var
|
|
29519
|
+
var _loop_5 = function (i_3) {
|
|
28976
29520
|
if (!isNullOrUndefined(data_1[i_3])) {
|
|
28977
29521
|
data_1[i_3].index = i_3;
|
|
28978
29522
|
if (!isNullOrUndefined(data_1[i_3].parentItem)) {
|
|
@@ -28984,7 +29528,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
28984
29528
|
}
|
|
28985
29529
|
};
|
|
28986
29530
|
for (var i_3 = startIndex; i_3 <= endIndex; i_3++) {
|
|
28987
|
-
|
|
29531
|
+
_loop_5(i_3);
|
|
28988
29532
|
}
|
|
28989
29533
|
}
|
|
28990
29534
|
gObj.rowDragAndDropModule.refreshDataSource();
|
|
@@ -29045,6 +29589,66 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
29045
29589
|
this.updateSharedResourceTask();
|
|
29046
29590
|
}
|
|
29047
29591
|
}
|
|
29592
|
+
if (this.parent.taskFields.dependency) {
|
|
29593
|
+
var isValidPredecessor = true;
|
|
29594
|
+
var draggedParent = void 0;
|
|
29595
|
+
var toParent_1;
|
|
29596
|
+
if (draggedRecord.parentItem) {
|
|
29597
|
+
draggedParent = this.parent.currentViewData[this.parent.ids.indexOf(draggedRecord.parentItem.taskId)];
|
|
29598
|
+
}
|
|
29599
|
+
else {
|
|
29600
|
+
draggedParent = draggedRecord;
|
|
29601
|
+
}
|
|
29602
|
+
if (droppedRecord.parentItem) {
|
|
29603
|
+
toParent_1 = this.parent.currentViewData[this.parent.ids.indexOf(droppedRecord.parentItem.taskId)];
|
|
29604
|
+
}
|
|
29605
|
+
else {
|
|
29606
|
+
toParent_1 = droppedRecord;
|
|
29607
|
+
}
|
|
29608
|
+
var validateRecords = void 0;
|
|
29609
|
+
if (toParent_1.uniqueID === draggedParent.uniqueID || (draggedParent.parentItem &&
|
|
29610
|
+
toParent_1.uniqueID == this.parent.currentViewData[this.parent.ids.indexOf(draggedParent.parentItem.taskId)].uniqueID)) {
|
|
29611
|
+
validateRecords = this.parent.currentViewData.filter(function (data) {
|
|
29612
|
+
if ((data.ganttProperties.predecessor && data.ganttProperties.predecessor.length > 0)) {
|
|
29613
|
+
for (var i = 0; i < data.ganttProperties.predecessor.length; i++) {
|
|
29614
|
+
return (parseInt(data.ganttProperties.predecessor[i].to) === parseInt(toParent_1.ganttProperties.taskId) ||
|
|
29615
|
+
parseInt(data.ganttProperties.predecessor[i].from) === parseInt(toParent_1.ganttProperties.taskId));
|
|
29616
|
+
}
|
|
29617
|
+
}
|
|
29618
|
+
return null;
|
|
29619
|
+
});
|
|
29620
|
+
var predName = [];
|
|
29621
|
+
for (var i = 0; i < validateRecords.length; i++) {
|
|
29622
|
+
predName = [];
|
|
29623
|
+
if (validateRecords[i].ganttProperties.predecessor) {
|
|
29624
|
+
for (var k = 0; k < validateRecords[i].ganttProperties.predecessor.length; k++) {
|
|
29625
|
+
if (parseInt(validateRecords[i].ganttProperties.taskId) !==
|
|
29626
|
+
parseInt(validateRecords[i].ganttProperties.predecessor[k].from)) {
|
|
29627
|
+
predName.push(validateRecords[i].ganttProperties.predecessor[k].from);
|
|
29628
|
+
}
|
|
29629
|
+
else {
|
|
29630
|
+
predName.push(validateRecords[i].ganttProperties.predecessor[k].to);
|
|
29631
|
+
}
|
|
29632
|
+
}
|
|
29633
|
+
}
|
|
29634
|
+
var _loop_2 = function (j) {
|
|
29635
|
+
var name_1 = predName[j].replace(/\D/g, '');
|
|
29636
|
+
var toRec = this_2.parent.currentViewData.filter(function (data) {
|
|
29637
|
+
return parseInt(data.ganttProperties.taskId) == parseInt(name_1);
|
|
29638
|
+
});
|
|
29639
|
+
isValidPredecessor = this_2.parent.connectorLineEditModule.validateParentPredecessor(validateRecords[i], toRec[0]);
|
|
29640
|
+
if (!isValidPredecessor) {
|
|
29641
|
+
this_2.parent.dataOperation['resetDependency'](validateRecords[i]);
|
|
29642
|
+
this_2.parent.dataOperation['resetDependency'](toRec[0]);
|
|
29643
|
+
}
|
|
29644
|
+
};
|
|
29645
|
+
var this_2 = this;
|
|
29646
|
+
for (var j = 0; j < predName.length; j++) {
|
|
29647
|
+
_loop_2(j);
|
|
29648
|
+
}
|
|
29649
|
+
}
|
|
29650
|
+
}
|
|
29651
|
+
}
|
|
29048
29652
|
// method to update the edited parent records
|
|
29049
29653
|
for (var j = 0; j < this.updateParentRecords.length; j++) {
|
|
29050
29654
|
this.parent.dataOperation.updateParentItems(this.updateParentRecords[j]);
|
|
@@ -29425,7 +30029,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
29425
30029
|
}
|
|
29426
30030
|
var idx = void 0;
|
|
29427
30031
|
var ganttData = dataSource.length > 0 && this.parent.viewType !== 'ResourceView' ?
|
|
29428
|
-
dataSource : this.parent.
|
|
30032
|
+
dataSource : this.parent.flatData;
|
|
29429
30033
|
for (var i = 0; i < ganttData.length; i++) {
|
|
29430
30034
|
if (this.parent.viewType === 'ResourceView') {
|
|
29431
30035
|
if (ganttData[i].ganttProperties.rowUniqueID === deletedRow.ganttProperties.rowUniqueID) {
|
|
@@ -32984,215 +33588,217 @@ var PdfGanttPredecessor = /** @__PURE__ @class */ (function () {
|
|
|
32984
33588
|
var childPageData;
|
|
32985
33589
|
var parentY = 0;
|
|
32986
33590
|
var childY = 0;
|
|
32987
|
-
|
|
32988
|
-
|
|
32989
|
-
|
|
32990
|
-
startPage
|
|
32991
|
-
|
|
32992
|
-
|
|
32993
|
-
|
|
32994
|
-
|
|
32995
|
-
if (this.
|
|
32996
|
-
|
|
33591
|
+
if (childTask && parentTask) {
|
|
33592
|
+
switch (this.type) {
|
|
33593
|
+
case 'FS':
|
|
33594
|
+
if (childTask.startPage > -1 && parentTask.endPage > -1) {
|
|
33595
|
+
startPage = pages[parentTask.endPage];
|
|
33596
|
+
endPage = pages[childTask.startPage];
|
|
33597
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
33598
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
33599
|
+
if (this.parentIndex < this.childIndex) {
|
|
33600
|
+
if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
|
|
33601
|
+
predecessorType = 'FSType1';
|
|
33602
|
+
}
|
|
33603
|
+
else {
|
|
33604
|
+
predecessorType = 'FSType2';
|
|
33605
|
+
}
|
|
32997
33606
|
}
|
|
32998
33607
|
else {
|
|
32999
|
-
|
|
33608
|
+
if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
|
|
33609
|
+
predecessorType = 'FSType3';
|
|
33610
|
+
}
|
|
33611
|
+
else {
|
|
33612
|
+
predecessorType = 'FSType4';
|
|
33613
|
+
}
|
|
33000
33614
|
}
|
|
33001
33615
|
}
|
|
33002
33616
|
else {
|
|
33003
|
-
|
|
33004
|
-
predecessorType = 'FSType3';
|
|
33005
|
-
}
|
|
33006
|
-
else {
|
|
33007
|
-
predecessorType = 'FSType4';
|
|
33008
|
-
}
|
|
33617
|
+
return;
|
|
33009
33618
|
}
|
|
33010
|
-
|
|
33011
|
-
|
|
33012
|
-
|
|
33013
|
-
|
|
33014
|
-
|
|
33015
|
-
|
|
33016
|
-
|
|
33017
|
-
|
|
33018
|
-
|
|
33019
|
-
|
|
33020
|
-
|
|
33021
|
-
|
|
33022
|
-
|
|
33023
|
-
|
|
33619
|
+
break;
|
|
33620
|
+
case 'SF':
|
|
33621
|
+
if (childTask.endPage > -1 && parentTask.startPage > -1) {
|
|
33622
|
+
startPage = pages[parentTask.startPage];
|
|
33623
|
+
endPage = pages[childTask.endPage];
|
|
33624
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
33625
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
33626
|
+
if (this.parentIndex < this.childIndex) {
|
|
33627
|
+
if (this.parentLeft > this.childLeft + this.childWidth) {
|
|
33628
|
+
predecessorType = 'SFType1';
|
|
33629
|
+
}
|
|
33630
|
+
else {
|
|
33631
|
+
predecessorType = 'SFType2';
|
|
33632
|
+
}
|
|
33024
33633
|
}
|
|
33025
33634
|
else {
|
|
33026
|
-
|
|
33635
|
+
if (this.parentLeft > this.childLeft + this.childWidth) {
|
|
33636
|
+
predecessorType = 'SFType3';
|
|
33637
|
+
}
|
|
33638
|
+
else {
|
|
33639
|
+
predecessorType = 'SFType4';
|
|
33640
|
+
}
|
|
33027
33641
|
}
|
|
33028
33642
|
}
|
|
33029
33643
|
else {
|
|
33030
|
-
|
|
33031
|
-
predecessorType = 'SFType3';
|
|
33032
|
-
}
|
|
33033
|
-
else {
|
|
33034
|
-
predecessorType = 'SFType4';
|
|
33035
|
-
}
|
|
33644
|
+
return;
|
|
33036
33645
|
}
|
|
33037
|
-
|
|
33038
|
-
|
|
33039
|
-
|
|
33040
|
-
|
|
33041
|
-
|
|
33042
|
-
|
|
33043
|
-
|
|
33044
|
-
|
|
33045
|
-
|
|
33046
|
-
|
|
33047
|
-
|
|
33048
|
-
|
|
33049
|
-
|
|
33050
|
-
|
|
33646
|
+
break;
|
|
33647
|
+
case 'FF':
|
|
33648
|
+
if (childTask.endPage > -1 && parentTask.endPage > -1) {
|
|
33649
|
+
startPage = pages[parentTask.endPage];
|
|
33650
|
+
endPage = pages[childTask.endPage];
|
|
33651
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
|
|
33652
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.endPage - pdfGantt.chartPageIndex];
|
|
33653
|
+
if (this.parentIndex < this.childIndex) {
|
|
33654
|
+
if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
|
|
33655
|
+
predecessorType = 'FFType1';
|
|
33656
|
+
}
|
|
33657
|
+
else {
|
|
33658
|
+
predecessorType = 'FFType2';
|
|
33659
|
+
}
|
|
33051
33660
|
}
|
|
33052
33661
|
else {
|
|
33053
|
-
|
|
33662
|
+
if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
|
|
33663
|
+
predecessorType = 'FFType3';
|
|
33664
|
+
}
|
|
33665
|
+
else {
|
|
33666
|
+
predecessorType = 'FFType4';
|
|
33667
|
+
}
|
|
33054
33668
|
}
|
|
33055
33669
|
}
|
|
33056
33670
|
else {
|
|
33057
|
-
|
|
33058
|
-
predecessorType = 'FFType3';
|
|
33059
|
-
}
|
|
33060
|
-
else {
|
|
33061
|
-
predecessorType = 'FFType4';
|
|
33062
|
-
}
|
|
33671
|
+
return;
|
|
33063
33672
|
}
|
|
33064
|
-
|
|
33065
|
-
|
|
33066
|
-
|
|
33067
|
-
|
|
33068
|
-
|
|
33069
|
-
|
|
33070
|
-
|
|
33071
|
-
|
|
33072
|
-
|
|
33073
|
-
|
|
33074
|
-
|
|
33075
|
-
|
|
33076
|
-
|
|
33077
|
-
|
|
33673
|
+
break;
|
|
33674
|
+
case 'SS':
|
|
33675
|
+
if (childTask.startPage > -1 && parentTask.startPage > -1) {
|
|
33676
|
+
startPage = pages[parentTask.startPage];
|
|
33677
|
+
endPage = pages[childTask.startPage];
|
|
33678
|
+
parentPageData = pdfGantt.pdfPageDetail[parentTask.startPage - pdfGantt.chartPageIndex];
|
|
33679
|
+
childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
|
|
33680
|
+
if (this.parentIndex < this.childIndex) {
|
|
33681
|
+
if (this.parentLeft >= this.childLeft) {
|
|
33682
|
+
predecessorType = 'SSType1';
|
|
33683
|
+
}
|
|
33684
|
+
else {
|
|
33685
|
+
predecessorType = 'SSType2';
|
|
33686
|
+
}
|
|
33078
33687
|
}
|
|
33079
33688
|
else {
|
|
33080
|
-
|
|
33689
|
+
if (this.parentLeft >= this.childLeft) {
|
|
33690
|
+
predecessorType = 'SSType3';
|
|
33691
|
+
}
|
|
33692
|
+
else {
|
|
33693
|
+
predecessorType = 'SSType4';
|
|
33694
|
+
}
|
|
33081
33695
|
}
|
|
33082
33696
|
}
|
|
33083
33697
|
else {
|
|
33084
|
-
|
|
33085
|
-
predecessorType = 'SSType3';
|
|
33086
|
-
}
|
|
33087
|
-
else {
|
|
33088
|
-
predecessorType = 'SSType4';
|
|
33089
|
-
}
|
|
33698
|
+
return;
|
|
33090
33699
|
}
|
|
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
|
-
|
|
33187
|
-
|
|
33188
|
-
|
|
33189
|
-
|
|
33190
|
-
|
|
33191
|
-
|
|
33192
|
-
|
|
33193
|
-
point6 = sspoint4;
|
|
33194
|
-
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
33195
|
-
break;
|
|
33700
|
+
break;
|
|
33701
|
+
}
|
|
33702
|
+
var midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
|
|
33703
|
+
midPoint = pixelToPoint(midPoint);
|
|
33704
|
+
/* eslint-disable-next-line */
|
|
33705
|
+
var point1 = void 0, point2 = void 0, point3 = void 0, point4 = void 0, point5 = void 0, point6 = void 0;
|
|
33706
|
+
point1 = point2 = point3 = point4 = point5 = point6 = new PointF();
|
|
33707
|
+
var parentTaskpoint = __assign$4({}, parentTask.taskStartPoint);
|
|
33708
|
+
var childTaskpoint = __assign$4({}, childTask.taskStartPoint);
|
|
33709
|
+
parentY = parentTaskpoint.y + parentPageData.startPoint.y;
|
|
33710
|
+
childY = childTaskpoint.y + childPageData.startPoint.y;
|
|
33711
|
+
var ffpoint1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth), parentY + midPoint);
|
|
33712
|
+
var sspoint1 = new PointF(pixelToPoint(this.parentLeft) - 1, parentY + midPoint);
|
|
33713
|
+
var ffpoint3 = new PointF(pixelToPoint(this.childLeft - 20), childY + midPoint);
|
|
33714
|
+
var ffpoint4 = new PointF(pixelToPoint(this.childLeft - 6 - this.lineWidth) - 1, childY + midPoint);
|
|
33715
|
+
var sspoint4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 6 + this.lineWidth) + 1, childY + midPoint);
|
|
33716
|
+
switch (predecessorType) {
|
|
33717
|
+
case 'FSType1':
|
|
33718
|
+
case 'FSType3':
|
|
33719
|
+
point1 = ffpoint1;
|
|
33720
|
+
point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
|
|
33721
|
+
point3 = ffpoint3;
|
|
33722
|
+
point4 = ffpoint4;
|
|
33723
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33724
|
+
break;
|
|
33725
|
+
case 'FSType2':
|
|
33726
|
+
point1 = ffpoint1;
|
|
33727
|
+
point2 = new PointF(point1.x + 10, parentY + midPoint);
|
|
33728
|
+
point3 = new PointF(point1.x + 10, childY + 2);
|
|
33729
|
+
point4 = new PointF(pixelToPoint(this.childLeft - 20), childY + 2);
|
|
33730
|
+
point5 = ffpoint3;
|
|
33731
|
+
point6 = ffpoint4;
|
|
33732
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
33733
|
+
break;
|
|
33734
|
+
case 'FSType4':
|
|
33735
|
+
point1 = ffpoint1;
|
|
33736
|
+
point2 = new PointF(point1.x + 10, parentY + midPoint);
|
|
33737
|
+
point3 = new PointF(point1.x + 10, parentY + 2);
|
|
33738
|
+
point4 = new PointF(pixelToPoint(this.childLeft - 20), parentY + 2);
|
|
33739
|
+
point5 = ffpoint3;
|
|
33740
|
+
point6 = ffpoint4;
|
|
33741
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
33742
|
+
break;
|
|
33743
|
+
case 'FFType1':
|
|
33744
|
+
case 'FFType3':
|
|
33745
|
+
point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
|
|
33746
|
+
point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
|
|
33747
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
33748
|
+
point4 = sspoint4;
|
|
33749
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33750
|
+
break;
|
|
33751
|
+
case 'FFType2':
|
|
33752
|
+
case 'FFType4':
|
|
33753
|
+
point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
|
|
33754
|
+
point2 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth + 20), parentY + midPoint);
|
|
33755
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
33756
|
+
point4 = sspoint4;
|
|
33757
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33758
|
+
break;
|
|
33759
|
+
case 'SSType1':
|
|
33760
|
+
case 'SSType3':
|
|
33761
|
+
point1 = sspoint1;
|
|
33762
|
+
point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
|
|
33763
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
33764
|
+
point4 = ffpoint4;
|
|
33765
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33766
|
+
break;
|
|
33767
|
+
case 'SSType2':
|
|
33768
|
+
case 'SSType4':
|
|
33769
|
+
point1 = sspoint1;
|
|
33770
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
33771
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
33772
|
+
point4 = ffpoint4;
|
|
33773
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33774
|
+
break;
|
|
33775
|
+
case 'SFType1':
|
|
33776
|
+
case 'SFType3':
|
|
33777
|
+
point1 = sspoint1;
|
|
33778
|
+
point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
|
|
33779
|
+
point3 = new PointF(point2.x, childY + midPoint);
|
|
33780
|
+
point4 = sspoint4;
|
|
33781
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
|
|
33782
|
+
break;
|
|
33783
|
+
case 'SFType2':
|
|
33784
|
+
point1 = sspoint1;
|
|
33785
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
33786
|
+
point3 = new PointF(point2.x, childY + 2);
|
|
33787
|
+
point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), childY + 2);
|
|
33788
|
+
point5 = new PointF(point4.x, childY + midPoint);
|
|
33789
|
+
point6 = sspoint4;
|
|
33790
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
33791
|
+
break;
|
|
33792
|
+
case 'SFType4':
|
|
33793
|
+
point1 = sspoint1;
|
|
33794
|
+
point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
|
|
33795
|
+
point3 = new PointF(point2.x, parentY + 2);
|
|
33796
|
+
point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + 2);
|
|
33797
|
+
point5 = new PointF(point4.x, childY + midPoint);
|
|
33798
|
+
point6 = sspoint4;
|
|
33799
|
+
this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
|
|
33800
|
+
break;
|
|
33801
|
+
}
|
|
33196
33802
|
}
|
|
33197
33803
|
};
|
|
33198
33804
|
/**
|