@syncfusion/ej2-gantt 19.3.44 → 19.3.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -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 +93 -28
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +146 -71
- 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 +17 -17
- package/src/gantt/actions/cell-edit.js +1 -0
- package/src/gantt/actions/context-menu.js +5 -0
- package/src/gantt/actions/dialog-edit.js +6 -6
- package/src/gantt/actions/edit.js +7 -3
- package/src/gantt/actions/rowdragdrop.js +74 -41
- package/src/gantt/actions/taskbar-edit.js +3 -1
- package/src/gantt/base/date-processor.js +4 -1
- package/src/gantt/base/gantt.js +20 -0
- package/src/gantt/base/task-processor.js +11 -2
- package/src/gantt/base/utils.js +3 -3
- package/src/gantt/export/export-helper.js +12 -14
- package/styles/bootstrap-dark.css +99 -99
- package/styles/bootstrap.css +99 -99
- package/styles/bootstrap4.css +104 -99
- package/styles/bootstrap5-dark.css +104 -99
- package/styles/bootstrap5.css +104 -99
- package/styles/fabric-dark.css +99 -99
- package/styles/fabric.css +99 -99
- package/styles/gantt/_bootstrap-dark-definition.scss +0 -1
- package/styles/gantt/_bootstrap-definition.scss +0 -1
- package/styles/gantt/_bootstrap4-definition.scss +0 -1
- package/styles/gantt/_bootstrap5-definition.scss +0 -1
- package/styles/gantt/_fabric-dark-definition.scss +0 -1
- package/styles/gantt/_fabric-definition.scss +0 -1
- package/styles/gantt/_highcontrast-definition.scss +0 -1
- package/styles/gantt/_highcontrast-light-definition.scss +0 -1
- package/styles/gantt/_layout.scss +100 -95
- package/styles/gantt/_material-dark-definition.scss +0 -1
- package/styles/gantt/_material-definition.scss +0 -1
- package/styles/gantt/_tailwind-definition.scss +0 -1
- package/styles/gantt/_theme.scss +76 -81
- package/styles/gantt/bootstrap-dark.css +99 -99
- package/styles/gantt/bootstrap.css +99 -99
- package/styles/gantt/bootstrap4.css +104 -99
- package/styles/gantt/bootstrap5-dark.css +104 -99
- package/styles/gantt/bootstrap5-dark.scss +1 -0
- package/styles/gantt/bootstrap5.css +104 -99
- package/styles/gantt/bootstrap5.scss +1 -0
- package/styles/gantt/fabric-dark.css +99 -99
- package/styles/gantt/fabric.css +99 -99
- package/styles/gantt/highcontrast-light.css +99 -99
- package/styles/gantt/highcontrast.css +99 -99
- package/styles/gantt/material-dark.css +99 -99
- package/styles/gantt/material.css +99 -99
- package/styles/gantt/tailwind-dark.css +99 -99
- package/styles/gantt/tailwind.css +99 -99
- package/styles/highcontrast-light.css +99 -99
- package/styles/highcontrast.css +99 -99
- package/styles/material-dark.css +99 -99
- package/styles/material.css +99 -99
- package/styles/tailwind-dark.css +99 -99
- package/styles/tailwind.css +99 -99
|
@@ -1,7 +1,7 @@
|
|
|
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
3
|
import { Edit, ForeignKey, Grid, Page, Predicate, Toolbar, ValueFormatter, click, filterAfterOpen, getActualProperties, getCustomDateFormat, getFilterMenuPostion, getForeignData, getObject, getUid, parentsUntil, setCssInGridPopUp } from '@syncfusion/ej2-grids';
|
|
4
|
-
import { CacheAdaptor, DataManager, DataUtil, Deferred,
|
|
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';
|
|
@@ -86,7 +86,7 @@ function isRemoteData(dataSource) {
|
|
|
86
86
|
return (adaptor instanceof ODataAdaptor || (adaptor instanceof ODataV4Adaptor) ||
|
|
87
87
|
(adaptor instanceof WebApiAdaptor) || (adaptor instanceof WebMethodAdaptor) ||
|
|
88
88
|
(adaptor instanceof CacheAdaptor) || (adaptor instanceof RemoteSaveAdaptor) ||
|
|
89
|
-
|
|
89
|
+
adaptor instanceof UrlAdaptor);
|
|
90
90
|
}
|
|
91
91
|
return false;
|
|
92
92
|
}
|
|
@@ -114,7 +114,7 @@ function getTaskData(records, isNotExtend, eventArgs, parent) {
|
|
|
114
114
|
for (var i = 0; i < records.length; i++) {
|
|
115
115
|
var data = void 0;
|
|
116
116
|
if (!isNullOrUndefined(parent) && parent.timezone) {
|
|
117
|
-
|
|
117
|
+
updateDates(records[i], parent);
|
|
118
118
|
}
|
|
119
119
|
// eslint-disable-next-line
|
|
120
120
|
data = isNotExtend ? (records[i].taskData) : extend({}, records[i].taskData, {}, true);
|
|
@@ -1208,7 +1208,10 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
};
|
|
1210
1210
|
DateProcessor.prototype.remove = function (date, timezone) {
|
|
1211
|
-
|
|
1211
|
+
if (!isNullOrUndefined(date)) {
|
|
1212
|
+
date = this.reverse(date, timezone, date.getTimezoneOffset());
|
|
1213
|
+
}
|
|
1214
|
+
return date;
|
|
1212
1215
|
};
|
|
1213
1216
|
DateProcessor.prototype.reverse = function (date, fromOffset, toOffset) {
|
|
1214
1217
|
if (typeof fromOffset === 'string') {
|
|
@@ -2142,6 +2145,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2142
2145
|
}
|
|
2143
2146
|
};
|
|
2144
2147
|
TaskProcessor.prototype.addTaskData = function (ganttData, data, isLoad) {
|
|
2148
|
+
var _this = this;
|
|
2145
2149
|
var taskSettings = this.parent.taskFields;
|
|
2146
2150
|
var dataManager = this.parent.dataSource;
|
|
2147
2151
|
if (isLoad) {
|
|
@@ -2150,8 +2154,15 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2150
2154
|
if (taskSettings.parentID) {
|
|
2151
2155
|
var id = data[taskSettings.id];
|
|
2152
2156
|
var index = this.taskIds.indexOf(id.toString());
|
|
2153
|
-
var
|
|
2154
|
-
this.parent.
|
|
2157
|
+
var tempData_1 = (index > -1) ? this.dataArray[index] : {};
|
|
2158
|
+
if (!isNullOrUndefined(this.parent.taskFields.segmentId)) {
|
|
2159
|
+
var segmentDataCollection = this.segmentCollection.
|
|
2160
|
+
filter(function (x) { return x.key === tempData_1[_this.parent.taskFields.id]; });
|
|
2161
|
+
if (segmentDataCollection.length > 0) {
|
|
2162
|
+
tempData_1[this.parent.taskFields.segments] = segmentDataCollection[0].items;
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
this.parent.setRecordValue('taskData', tempData_1, ganttData);
|
|
2155
2166
|
}
|
|
2156
2167
|
else {
|
|
2157
2168
|
this.parent.setRecordValue('taskData', data, ganttData);
|
|
@@ -2351,6 +2362,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2351
2362
|
if (!isNullOrUndefined(ganttProperties.duration)) {
|
|
2352
2363
|
this.parent.setRecordValue('duration', updatedDuration, ganttProperties, true);
|
|
2353
2364
|
}
|
|
2365
|
+
this.parent.dataOperation.updateMappingData(ganttData, 'duration');
|
|
2354
2366
|
}
|
|
2355
2367
|
};
|
|
2356
2368
|
/**
|
|
@@ -13422,6 +13434,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13422
13434
|
if (this.keyboardModule) {
|
|
13423
13435
|
this.keyboardModule.destroy();
|
|
13424
13436
|
}
|
|
13437
|
+
if (this.editModule && this.editModule.dialogModule) {
|
|
13438
|
+
this.editModule.dialogModule.destroy();
|
|
13439
|
+
}
|
|
13425
13440
|
_super.prototype.destroy.call(this);
|
|
13426
13441
|
this.chartVerticalLineContainer = null;
|
|
13427
13442
|
this.element.innerHTML = '';
|
|
@@ -13668,6 +13683,23 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13668
13683
|
this.treeGrid.height = this.ganttHeight - toolbarHeight -
|
|
13669
13684
|
this.treeGrid.grid.getHeaderContent().offsetHeight;
|
|
13670
13685
|
this.splitterModule.splitterObject.height = (this.ganttHeight - toolbarHeight).toString();
|
|
13686
|
+
if (!isNullOrUndefined(this.chartVerticalLineContainer)) {
|
|
13687
|
+
this.chartVerticalLineContainer.style.height = this.ganttHeight + 'px';
|
|
13688
|
+
}
|
|
13689
|
+
if (!isNullOrUndefined(this.dayMarkersModule)) {
|
|
13690
|
+
var holidayContainer$$1 = getValue('nonworkingDayRender.holidayContainer', this.dayMarkersModule);
|
|
13691
|
+
var weekendContainer$$1 = getValue('nonworkingDayRender.weekendContainer', this.dayMarkersModule);
|
|
13692
|
+
var eventMarkersContainer$$1 = getValue('eventMarkerRender.eventMarkersContainer', this.dayMarkersModule);
|
|
13693
|
+
if (holidayContainer$$1) {
|
|
13694
|
+
holidayContainer$$1.style.height = this.ganttHeight + 'px';
|
|
13695
|
+
}
|
|
13696
|
+
if (weekendContainer$$1) {
|
|
13697
|
+
weekendContainer$$1.style.height = this.ganttHeight + 'px';
|
|
13698
|
+
}
|
|
13699
|
+
if (eventMarkersContainer$$1) {
|
|
13700
|
+
eventMarkersContainer$$1.style.height = this.ganttHeight + 'px';
|
|
13701
|
+
}
|
|
13702
|
+
}
|
|
13671
13703
|
this.splitterModule.splitterObject.width = this.ganttWidth.toString();
|
|
13672
13704
|
this.ganttChartModule.scrollObject.
|
|
13673
13705
|
setHeight(this.ganttHeight - this.ganttChartModule.chartTimelineContainer.offsetHeight - toolbarHeight);
|
|
@@ -15959,6 +15991,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
|
|
|
15959
15991
|
this.parent.editModule.dialogModule.isResourceUpdate = true;
|
|
15960
15992
|
this.parent.editModule.dialogModule.previousResource = previousResource;
|
|
15961
15993
|
}
|
|
15994
|
+
this.updateDates(args);
|
|
15962
15995
|
this.updateEditedRecord(args);
|
|
15963
15996
|
}
|
|
15964
15997
|
};
|
|
@@ -16557,6 +16590,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16557
16590
|
TaskbarEdit.prototype.showHideTaskBarEditingElements = function (element, secondElement, fadeConnectorLine) {
|
|
16558
16591
|
secondElement = secondElement ? secondElement : this.editElement;
|
|
16559
16592
|
var isShowProgressResizer = this.parent.taskFields.progress ? true : false;
|
|
16593
|
+
var isShowConnectorPoints = true;
|
|
16560
16594
|
if (this.parent.readOnly) {
|
|
16561
16595
|
return;
|
|
16562
16596
|
}
|
|
@@ -16566,6 +16600,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16566
16600
|
if (!isNullOrUndefined(parentRecord)) {
|
|
16567
16601
|
if (!parentRecord.expanded) {
|
|
16568
16602
|
isShowProgressResizer = false;
|
|
16603
|
+
isShowConnectorPoints = false;
|
|
16569
16604
|
}
|
|
16570
16605
|
}
|
|
16571
16606
|
}
|
|
@@ -16592,7 +16627,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
16592
16627
|
if (!isNullOrUndefined(this.parent.taskFields.dependency)
|
|
16593
16628
|
&& (element.querySelector('.' + connectorPointLeft)
|
|
16594
16629
|
|| element.parentElement.querySelector('.' + connectorPointLeft))
|
|
16595
|
-
&&
|
|
16630
|
+
&& isShowConnectorPoints) {
|
|
16596
16631
|
var connectorElement = !isNullOrUndefined(element.querySelector('.' + connectorPointLeft)) ?
|
|
16597
16632
|
element : element.parentElement;
|
|
16598
16633
|
addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
|
|
@@ -18500,7 +18535,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18500
18535
|
dialogModel.position = position;
|
|
18501
18536
|
//dialogModel.width = '750px';
|
|
18502
18537
|
dialogModel.height = this.parent.isAdaptive ? '100%' : 'auto';
|
|
18503
|
-
dialogModel.target =
|
|
18538
|
+
dialogModel.target = document.body;
|
|
18504
18539
|
dialogModel.close = this.dialogClose.bind(this);
|
|
18505
18540
|
dialogModel.closeOnEscape = true;
|
|
18506
18541
|
dialogModel.open = function (args) {
|
|
@@ -18787,15 +18822,15 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18787
18822
|
this.resourceSelection(id);
|
|
18788
18823
|
}
|
|
18789
18824
|
else if (id === ganttObj.element.id + 'NotesTabContainer') {
|
|
18790
|
-
|
|
18825
|
+
document.getElementById(id).ej2_instances[0].refresh();
|
|
18791
18826
|
}
|
|
18792
18827
|
else if (id === ganttObj.element.id + 'SegmentsTabContainer') {
|
|
18793
18828
|
if (isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate)) {
|
|
18794
|
-
|
|
18829
|
+
document.getElementById(id).ej2_instances[0]
|
|
18795
18830
|
.enableToolbarItems([this.parent.element.id + 'SegmentsTabContainer' + '_add'], false);
|
|
18796
18831
|
}
|
|
18797
18832
|
else {
|
|
18798
|
-
|
|
18833
|
+
document.getElementById(id).ej2_instances[0]
|
|
18799
18834
|
.enableToolbarItems([this.parent.element.id + 'SegmentsTabContainer' + '_add'], true);
|
|
18800
18835
|
}
|
|
18801
18836
|
}
|
|
@@ -19755,7 +19790,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19755
19790
|
DialogEdit.prototype.updateResourceCollection = function (args, resourceTreeGridId) {
|
|
19756
19791
|
if (!isNullOrUndefined(args.data) && Object.keys(args.data).length) {
|
|
19757
19792
|
var ganttObj = this.parent;
|
|
19758
|
-
var treeGridId =
|
|
19793
|
+
var treeGridId = document.querySelector('#' + resourceTreeGridId);
|
|
19759
19794
|
var resourceTreeGrid = treeGridId.ej2_instances[0];
|
|
19760
19795
|
if (!isNullOrUndefined(resourceTreeGrid) && resourceTreeGrid.getSelectedRecords().length > 0) {
|
|
19761
19796
|
var tempRecords = resourceTreeGrid.getSelectedRecords();
|
|
@@ -19830,7 +19865,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19830
19865
|
};
|
|
19831
19866
|
DialogEdit.prototype.resourceSelection = function (id) {
|
|
19832
19867
|
var _this = this;
|
|
19833
|
-
var resourceTreeGrid =
|
|
19868
|
+
var resourceTreeGrid = document.querySelector('#' + id).ej2_instances[0];
|
|
19834
19869
|
var currentViewData = resourceTreeGrid.getCurrentViewRecords();
|
|
19835
19870
|
var resources = this.ganttResources;
|
|
19836
19871
|
if (resources && resources.length > 0) {
|
|
@@ -21671,7 +21706,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
21671
21706
|
if (ganttProp.work > 0 || column === 'work') {
|
|
21672
21707
|
switch (taskType) {
|
|
21673
21708
|
case 'FixedUnit':
|
|
21674
|
-
if (
|
|
21709
|
+
if (ganttProp.resourceInfo.length === 0) {
|
|
21710
|
+
return;
|
|
21711
|
+
}
|
|
21712
|
+
else if (isAutoSchedule && ganttProp.resourceInfo.length &&
|
|
21675
21713
|
(column === 'work' || (column === 'resource'))) {
|
|
21676
21714
|
this.parent.dataOperation.updateDurationWithWork(currentData);
|
|
21677
21715
|
}
|
|
@@ -22234,6 +22272,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
22234
22272
|
var eventArgs = {};
|
|
22235
22273
|
eventArgs.requestType = 'beforeSave';
|
|
22236
22274
|
eventArgs.data = args.data;
|
|
22275
|
+
eventArgs.cancel = false;
|
|
22237
22276
|
eventArgs.modifiedRecords = this.parent.editedRecords;
|
|
22238
22277
|
if (!isNullOrUndefined(args.target)) {
|
|
22239
22278
|
eventArgs.target = args.target;
|
|
@@ -23064,13 +23103,13 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23064
23103
|
changedRecords: eventArg.modifiedTaskData
|
|
23065
23104
|
};
|
|
23066
23105
|
var adaptor = data_1.adaptor;
|
|
23106
|
+
var query_1 = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
23067
23107
|
if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor) || data_1.dataSource.batchUrl) {
|
|
23068
|
-
var crud = data_1.saveChanges(updatedData_1, _this.parent.taskFields.id);
|
|
23108
|
+
var crud = data_1.saveChanges(updatedData_1, _this.parent.taskFields.id, null, query_1);
|
|
23069
23109
|
crud.then(function () { return _this.deleteSuccess(args); })
|
|
23070
23110
|
.catch(function (e) { return _this.dmFailure(e, args); });
|
|
23071
23111
|
}
|
|
23072
23112
|
else {
|
|
23073
|
-
var query_1 = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
23074
23113
|
var deletedRecords = 'deletedRecords';
|
|
23075
23114
|
var deleteCrud = null;
|
|
23076
23115
|
for (var i = 0; i < updatedData_1[deletedRecords].length; i++) {
|
|
@@ -26560,6 +26599,11 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
|
26560
26599
|
var target = args.event ? args.event.target :
|
|
26561
26600
|
!this.parent.focusModule ? this.parent.focusModule.getActiveElement() :
|
|
26562
26601
|
this.parent.ganttChartModule.targetElement;
|
|
26602
|
+
// Closed edited cell before opening context menu
|
|
26603
|
+
// eslint-disable-next-line
|
|
26604
|
+
if (!isNullOrUndefined(this.parent.editModule) && this.parent.editModule.cellEditModule && this.parent.editModule.cellEditModule.isCellEdit && target.parentElement.classList.contains('e-row')) {
|
|
26605
|
+
this.parent.treeGrid.closeEdit();
|
|
26606
|
+
}
|
|
26563
26607
|
if (!isNullOrUndefined(args.element) && args.element.id === this.parent.element.id + '_contextmenu') {
|
|
26564
26608
|
this.clickedPosition = getValue('event', args).clientX;
|
|
26565
26609
|
}
|
|
@@ -27253,80 +27297,113 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
27253
27297
|
}
|
|
27254
27298
|
var count = 0;
|
|
27255
27299
|
var dragLength = dragRecords.length;
|
|
27256
|
-
|
|
27257
|
-
|
|
27300
|
+
var _loop_1 = function (i) {
|
|
27301
|
+
this_1.parent.isOnEdit = true;
|
|
27258
27302
|
draggedRecord = dragRecords[i];
|
|
27259
|
-
|
|
27260
|
-
if (
|
|
27261
|
-
if (
|
|
27262
|
-
|
|
27263
|
-
|
|
27303
|
+
this_1.draggedRecord = draggedRecord;
|
|
27304
|
+
if (this_1.dropPosition !== 'Invalid') {
|
|
27305
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
27306
|
+
this_1.checkisSharedTask();
|
|
27307
|
+
this_1.previousParent = this_1.draggedRecord.parentItem.uniqueID;
|
|
27264
27308
|
}
|
|
27265
|
-
if (
|
|
27266
|
-
return;
|
|
27309
|
+
if (this_1.isSharedTask) {
|
|
27310
|
+
return { value: void 0 };
|
|
27267
27311
|
}
|
|
27268
27312
|
if (isByMethod) {
|
|
27269
|
-
|
|
27313
|
+
this_1.deleteDragRow();
|
|
27270
27314
|
}
|
|
27271
|
-
var recordIndex1 =
|
|
27272
|
-
if (
|
|
27273
|
-
|
|
27315
|
+
var recordIndex1 = this_1.treeGridData.indexOf(droppedRecord);
|
|
27316
|
+
if (this_1.dropPosition === 'topSegment') {
|
|
27317
|
+
this_1.dropAtTop(recordIndex1);
|
|
27274
27318
|
}
|
|
27275
|
-
if (
|
|
27276
|
-
if (!
|
|
27319
|
+
if (this_1.dropPosition === 'bottomSegment') {
|
|
27320
|
+
if (!this_1.isSharedTask) {
|
|
27277
27321
|
if (!droppedRecord.hasChildRecords) {
|
|
27278
|
-
if (
|
|
27279
|
-
|
|
27322
|
+
if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
|
|
27323
|
+
this_1.ganttData.splice(recordIndex1 + 1, 0, this_1.draggedRecord.taskData);
|
|
27280
27324
|
}
|
|
27281
|
-
|
|
27282
|
-
|
|
27283
|
-
if (
|
|
27284
|
-
var taskId =
|
|
27285
|
-
|
|
27325
|
+
this_1.treeGridData.splice(recordIndex1 + 1, 0, this_1.draggedRecord);
|
|
27326
|
+
this_1.parent.ids.splice(recordIndex1 + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
|
|
27327
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
27328
|
+
var taskId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
|
|
27329
|
+
this_1.parent.getTaskIds().splice(recordIndex1 + 1, 0, taskId);
|
|
27286
27330
|
}
|
|
27287
27331
|
}
|
|
27288
27332
|
else {
|
|
27289
|
-
count =
|
|
27290
|
-
if (
|
|
27291
|
-
|
|
27333
|
+
count = this_1.parent.editModule.getChildCount(droppedRecord, 0);
|
|
27334
|
+
if (this_1.parent.taskFields.parentID && this_1.ganttData.length > 0) {
|
|
27335
|
+
this_1.ganttData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.taskData);
|
|
27292
27336
|
}
|
|
27293
|
-
|
|
27337
|
+
this_1.treeGridData.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord);
|
|
27294
27338
|
/* eslint-disable-next-line */
|
|
27295
|
-
|
|
27296
|
-
if (
|
|
27297
|
-
var spliceId =
|
|
27298
|
-
|
|
27339
|
+
this_1.parent.ids.splice(recordIndex1 + count + 1, 0, this_1.draggedRecord.ganttProperties.rowUniqueID.toString());
|
|
27340
|
+
if (this_1.parent.viewType === 'ResourceView') {
|
|
27341
|
+
var spliceId = this_1.draggedRecord.level === 0 ? 'R' + this_1.draggedRecord.ganttProperties.taskId : 'T' + this_1.draggedRecord.ganttProperties.taskId;
|
|
27342
|
+
this_1.parent.getTaskIds().splice(recordIndex1 + count + 1, 0, spliceId);
|
|
27299
27343
|
}
|
|
27300
27344
|
}
|
|
27301
|
-
|
|
27302
|
-
|
|
27303
|
-
|
|
27345
|
+
this_1.parent.setRecordValue('parentItem', this_1.treeGridData[recordIndex1].parentItem, draggedRecord);
|
|
27346
|
+
this_1.parent.setRecordValue('parentUniqueID', this_1.treeGridData[recordIndex1].parentUniqueID, draggedRecord);
|
|
27347
|
+
this_1.parent.setRecordValue('level', this_1.treeGridData[recordIndex1].level, draggedRecord);
|
|
27304
27348
|
if (draggedRecord.hasChildRecords) {
|
|
27305
27349
|
var level = 1;
|
|
27306
|
-
|
|
27307
|
-
|
|
27350
|
+
this_1.updateChildRecordLevel(draggedRecord, level);
|
|
27351
|
+
this_1.updateChildRecord(draggedRecord, recordIndex1 + count + 1);
|
|
27308
27352
|
}
|
|
27309
27353
|
if (droppedRecord.parentItem) {
|
|
27310
|
-
var rec =
|
|
27354
|
+
var rec = this_1.parent.getParentTask(droppedRecord.parentItem).childRecords;
|
|
27311
27355
|
var childRecords = rec;
|
|
27312
27356
|
var droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
|
|
27313
27357
|
childRecords.splice(droppedRecordIndex, 0, draggedRecord);
|
|
27314
27358
|
}
|
|
27315
27359
|
}
|
|
27316
27360
|
}
|
|
27317
|
-
if (
|
|
27318
|
-
|
|
27361
|
+
if (this_1.dropPosition === 'middleSegment') {
|
|
27362
|
+
this_1.dropMiddle(recordIndex1);
|
|
27319
27363
|
if (droppedRecord.childRecords.length > 0) {
|
|
27320
27364
|
delete droppedRecord.ganttProperties.segments;
|
|
27321
|
-
delete droppedRecord.taskData[
|
|
27365
|
+
delete droppedRecord.taskData[this_1.parent.taskFields.segments];
|
|
27322
27366
|
}
|
|
27323
27367
|
}
|
|
27324
27368
|
// eslint-disable-next-line
|
|
27325
|
-
if (!isNullOrUndefined(draggedRecord.parentItem &&
|
|
27326
|
-
|
|
27369
|
+
if (!isNullOrUndefined(draggedRecord.parentItem && this_1.updateParentRecords.indexOf(draggedRecord.parentItem) !== -1)) {
|
|
27370
|
+
this_1.updateParentRecords.push(draggedRecord.parentItem);
|
|
27371
|
+
}
|
|
27372
|
+
}
|
|
27373
|
+
if (!this_1.parent.enableVirtualization) {
|
|
27374
|
+
var data_1 = gObj.flatData;
|
|
27375
|
+
var startIndex = void 0;
|
|
27376
|
+
var endIndex = void 0;
|
|
27377
|
+
if (draggedRecord.index < droppedRecord.index) {
|
|
27378
|
+
startIndex = draggedRecord.index;
|
|
27379
|
+
endIndex = droppedRecord.index;
|
|
27380
|
+
}
|
|
27381
|
+
else {
|
|
27382
|
+
startIndex = droppedRecord.index;
|
|
27383
|
+
endIndex = draggedRecord.index;
|
|
27384
|
+
}
|
|
27385
|
+
var _loop_2 = function (i_1) {
|
|
27386
|
+
if (!isNullOrUndefined(data_1[i_1])) {
|
|
27387
|
+
data_1[i_1].index = i_1;
|
|
27388
|
+
if (!isNullOrUndefined(data_1[i_1].parentItem)) {
|
|
27389
|
+
var updatedParent = data_1.filter(function (e) {
|
|
27390
|
+
return e.uniqueID === data_1[i_1].parentUniqueID;
|
|
27391
|
+
})[0];
|
|
27392
|
+
data_1[i_1].parentItem.index = updatedParent.index;
|
|
27393
|
+
}
|
|
27394
|
+
}
|
|
27395
|
+
};
|
|
27396
|
+
for (var i_1 = startIndex; i_1 <= endIndex; i_1++) {
|
|
27397
|
+
_loop_2(i_1);
|
|
27327
27398
|
}
|
|
27328
27399
|
}
|
|
27329
27400
|
gObj.rowDragAndDropModule.refreshDataSource();
|
|
27401
|
+
};
|
|
27402
|
+
var this_1 = this;
|
|
27403
|
+
for (var i = 0; i < dragLength; i++) {
|
|
27404
|
+
var state_1 = _loop_1(i);
|
|
27405
|
+
if (typeof state_1 === "object")
|
|
27406
|
+
return state_1.value;
|
|
27330
27407
|
}
|
|
27331
27408
|
if (this.dropPosition === 'middleSegment') {
|
|
27332
27409
|
if (droppedRecord.ganttProperties.predecessor) {
|
|
@@ -30313,7 +30390,7 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
30313
30390
|
var taskFields = this.parent.taskFields;
|
|
30314
30391
|
var ganttProps = data.ganttProperties;
|
|
30315
30392
|
if (column.editType === 'datepickeredit' || column.editType === 'datetimepickeredit') {
|
|
30316
|
-
cell.value =
|
|
30393
|
+
cell.value = data[column.field];
|
|
30317
30394
|
}
|
|
30318
30395
|
else if (column.field === taskFields.duration) {
|
|
30319
30396
|
cell.value = this.parent.getDurationString(ganttProps.duration, ganttProps.durationUnit);
|
|
@@ -30336,20 +30413,18 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
30336
30413
|
else {
|
|
30337
30414
|
cell.style.format.paragraphIndent = cell.row.level * 10;
|
|
30338
30415
|
}
|
|
30339
|
-
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
|
|
30345
|
-
|
|
30346
|
-
|
|
30347
|
-
|
|
30348
|
-
|
|
30349
|
-
this.parent.trigger('pdfQueryCellInfo', args);
|
|
30350
|
-
}
|
|
30351
|
-
cell.value = args.value;
|
|
30416
|
+
var args = {
|
|
30417
|
+
data: data,
|
|
30418
|
+
value: cell.value,
|
|
30419
|
+
column: column,
|
|
30420
|
+
style: cell.style,
|
|
30421
|
+
cell: cell
|
|
30422
|
+
};
|
|
30423
|
+
args.value = this.exportValueFormatter.formatCellValue(args);
|
|
30424
|
+
if (this.parent.pdfQueryCellInfo) {
|
|
30425
|
+
this.parent.trigger('pdfQueryCellInfo', args);
|
|
30352
30426
|
}
|
|
30427
|
+
cell.value = args.value;
|
|
30353
30428
|
};
|
|
30354
30429
|
/**
|
|
30355
30430
|
* Method for create the taskbar collection for rendering
|