@syncfusion/ej2-gantt 19.3.56 → 19.4.41
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 +39 -0
- package/README.md +1 -1
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +135 -58
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +132 -55
- 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 +18 -18
- package/src/gantt/actions/context-menu.js +35 -14
- package/src/gantt/actions/dialog-edit.js +6 -3
- package/src/gantt/actions/edit.js +5 -1
- package/src/gantt/actions/keyboard.js +2 -2
- package/src/gantt/actions/rowdragdrop.js +2 -0
- package/src/gantt/actions/taskbar-edit.d.ts +0 -15
- package/src/gantt/actions/taskbar-edit.js +7 -24
- package/src/gantt/base/gantt.d.ts +17 -0
- package/src/gantt/base/gantt.js +32 -7
- package/src/gantt/base/task-processor.js +20 -3
- package/src/gantt/base/tree-grid.js +3 -0
- package/src/gantt/renderer/chart-rows.js +2 -0
- package/src/gantt/renderer/timeline.d.ts +1 -0
- package/src/gantt/renderer/timeline.js +18 -1
- package/styles/bootstrap5-dark.css +6 -5
- package/styles/bootstrap5.css +6 -5
- package/styles/fabric-dark.css +1 -1
- package/styles/gantt/_bootstrap4-definition.scss +1 -0
- package/styles/gantt/_bootstrap5-definition.scss +1 -1
- package/styles/gantt/_fabric-dark-definition.scss +2 -1
- package/styles/gantt/_fluent-definition.scss +163 -0
- package/styles/gantt/_layout.scss +7 -7
- package/styles/gantt/_material-dark-definition.scss +2 -1
- package/styles/gantt/_theme.scss +2 -1
- package/styles/gantt/bootstrap5-dark.css +6 -5
- package/styles/gantt/bootstrap5.css +6 -5
- package/styles/gantt/fabric-dark.css +1 -1
- package/styles/gantt/icons/_fluent.scss +112 -0
- package/styles/gantt/icons/_tailwind-dark.scss +112 -112
- package/styles/gantt/material-dark.css +1 -1
- package/styles/gantt/tailwind-dark.css +1 -1
- package/styles/gantt/tailwind.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -2190,8 +2190,16 @@ class TaskProcessor extends DateProcessor {
|
|
|
2190
2190
|
const ganttProperties = ganttData.ganttProperties;
|
|
2191
2191
|
let duration = data[taskSettings.duration];
|
|
2192
2192
|
duration = isNullOrUndefined(duration) || duration === '' ? null : duration;
|
|
2193
|
-
|
|
2194
|
-
|
|
2193
|
+
let startDate;
|
|
2194
|
+
let endDate;
|
|
2195
|
+
if (ganttProperties.startDate && ganttProperties.endDate) {
|
|
2196
|
+
startDate = this.getDateFromFormat(ganttProperties.startDate, true);
|
|
2197
|
+
endDate = this.getDateFromFormat(ganttProperties.endDate, true);
|
|
2198
|
+
}
|
|
2199
|
+
else {
|
|
2200
|
+
startDate = this.getDateFromFormat(data[taskSettings.startDate], true);
|
|
2201
|
+
endDate = this.getDateFromFormat(data[taskSettings.endDate], true);
|
|
2202
|
+
}
|
|
2195
2203
|
const segments = taskSettings.segments ? (data[taskSettings.segments] ||
|
|
2196
2204
|
ganttData.taskData[taskSettings.segments]) : null;
|
|
2197
2205
|
const isMileStone = taskSettings.milestone ? data[taskSettings.milestone] ? true : false : false;
|
|
@@ -2790,7 +2798,10 @@ class TaskProcessor extends DateProcessor {
|
|
|
2790
2798
|
if (!isNullOrUndefined(value)) {
|
|
2791
2799
|
value = new Date(tempDate.getTime());
|
|
2792
2800
|
}
|
|
2793
|
-
this.parent.
|
|
2801
|
+
if (!this.parent.isLoad && !this.parent.isDynamicData) {
|
|
2802
|
+
this.parent.setRecordValue('taskData.' + mapping, value, task);
|
|
2803
|
+
}
|
|
2804
|
+
this.parent.isDynamicData = false;
|
|
2794
2805
|
}
|
|
2795
2806
|
getDurationInDay(duration, durationUnit) {
|
|
2796
2807
|
if (durationUnit === 'day') {
|
|
@@ -3608,8 +3619,14 @@ class TaskProcessor extends DateProcessor {
|
|
|
3608
3619
|
}
|
|
3609
3620
|
continue;
|
|
3610
3621
|
}
|
|
3611
|
-
|
|
3612
|
-
|
|
3622
|
+
let startDate = this.getValidStartDate(childData.ganttProperties);
|
|
3623
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
|
|
3624
|
+
startDate = childData.ganttProperties.autoStartDate;
|
|
3625
|
+
}
|
|
3626
|
+
let endDate = this.getValidEndDate(childData.ganttProperties);
|
|
3627
|
+
if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
|
|
3628
|
+
endDate = childData.ganttProperties.autoEndDate;
|
|
3629
|
+
}
|
|
3613
3630
|
if (isNullOrUndefined(minStartDate)) {
|
|
3614
3631
|
minStartDate = this.getDateFromFormat(startDate);
|
|
3615
3632
|
}
|
|
@@ -6097,6 +6114,7 @@ class Timeline {
|
|
|
6097
6114
|
lastDay.setMinutes(60);
|
|
6098
6115
|
lastDay.setSeconds(0);
|
|
6099
6116
|
increment = (lastDay.getTime() - firstDay.getTime()) + (1000 * 60 * 60 * (count - 1));
|
|
6117
|
+
increment = this.checkDate(firstDay, lastDay, increment, count);
|
|
6100
6118
|
break;
|
|
6101
6119
|
case 'Minutes':
|
|
6102
6120
|
lastDay.setSeconds(60);
|
|
@@ -6105,6 +6123,21 @@ class Timeline {
|
|
|
6105
6123
|
}
|
|
6106
6124
|
return increment;
|
|
6107
6125
|
}
|
|
6126
|
+
checkDate(firstDay, lastDay, increment, count) {
|
|
6127
|
+
var date = new Date(firstDay.getTime());
|
|
6128
|
+
date.setTime(date.getTime() + increment);
|
|
6129
|
+
if (((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
|
|
6130
|
+
var diffCount = count - (date.getTime() - lastDay.getTime()) / (1000 * 60 * 60);
|
|
6131
|
+
if (!this.parent.isInDst(date)) {
|
|
6132
|
+
increment += (1000 * 60 * 60 * diffCount);
|
|
6133
|
+
}
|
|
6134
|
+
else if (this.parent.isInDst(date)) {
|
|
6135
|
+
increment -= (1000 * 60 * 60 * diffCount);
|
|
6136
|
+
}
|
|
6137
|
+
}
|
|
6138
|
+
return increment;
|
|
6139
|
+
}
|
|
6140
|
+
;
|
|
6108
6141
|
/**
|
|
6109
6142
|
* Method to find header cell was weekend or not
|
|
6110
6143
|
*
|
|
@@ -6186,7 +6219,8 @@ class Timeline {
|
|
|
6186
6219
|
* @private
|
|
6187
6220
|
*/
|
|
6188
6221
|
calculateWidthBetweenTwoDate(mode, scheduleWeeks, endDate) {
|
|
6189
|
-
|
|
6222
|
+
let timeDifference = (endDate.getTime() - scheduleWeeks.getTime());
|
|
6223
|
+
const balanceDay = (timeDifference / (1000 * 60 * 60 * 24));
|
|
6190
6224
|
return balanceDay * this.parent.perDayWidth;
|
|
6191
6225
|
}
|
|
6192
6226
|
/**
|
|
@@ -6872,6 +6906,9 @@ class GanttTreeGrid {
|
|
|
6872
6906
|
if (getValue('requestType', args) === 'refresh' && isNullOrUndefined(getValue('type', args)) && this.parent.addDeleteRecord) {
|
|
6873
6907
|
if (this.parent.selectedRowIndex != -1) {
|
|
6874
6908
|
this.parent.selectRow(this.parent.selectedRowIndex);
|
|
6909
|
+
if (this.parent.selectedRowIndex > this.parent.currentViewData.length - 1) {
|
|
6910
|
+
this.parent.selectedRowIndex = -1;
|
|
6911
|
+
}
|
|
6875
6912
|
}
|
|
6876
6913
|
else {
|
|
6877
6914
|
this.parent.selectRow(0);
|
|
@@ -8924,6 +8961,7 @@ class ChartRows extends DateProcessor {
|
|
|
8924
8961
|
}
|
|
8925
8962
|
}
|
|
8926
8963
|
}
|
|
8964
|
+
this.parent.renderTemplates();
|
|
8927
8965
|
this.triggerQueryTaskbarInfo();
|
|
8928
8966
|
this.parent.modifiedRecords = [];
|
|
8929
8967
|
if (collapsedResourceRecord.length) {
|
|
@@ -9287,6 +9325,7 @@ class ChartRows extends DateProcessor {
|
|
|
9287
9325
|
else {
|
|
9288
9326
|
tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
|
|
9289
9327
|
}
|
|
9328
|
+
this.parent.renderTemplates();
|
|
9290
9329
|
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
|
|
9291
9330
|
if (isValidateRange) {
|
|
9292
9331
|
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
@@ -11798,9 +11837,9 @@ class FocusModule {
|
|
|
11798
11837
|
{
|
|
11799
11838
|
if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
|
|
11800
11839
|
e.preventDefault();
|
|
11801
|
-
const focussedElement = ganttObj.element.querySelector('.e-gantt-chart');
|
|
11802
|
-
focussedElement.focus();
|
|
11803
11840
|
ganttObj.addRecord();
|
|
11841
|
+
const focussedElement = ganttObj.element;
|
|
11842
|
+
focussedElement.focus();
|
|
11804
11843
|
}
|
|
11805
11844
|
break;
|
|
11806
11845
|
}
|
|
@@ -11985,6 +12024,8 @@ let Gantt = class Gantt extends Component {
|
|
|
11985
12024
|
/** @hidden */
|
|
11986
12025
|
this.isExpandCollapseLevelMethod = false;
|
|
11987
12026
|
/** @hidden */
|
|
12027
|
+
this.isDynamicData = false;
|
|
12028
|
+
/** @hidden */
|
|
11988
12029
|
this.isConnectorLineUpdate = false;
|
|
11989
12030
|
/** @hidden */
|
|
11990
12031
|
this.staticSelectedRowIndex = -1;
|
|
@@ -12141,6 +12182,27 @@ let Gantt = class Gantt extends Component {
|
|
|
12141
12182
|
return ganttDateFormat;
|
|
12142
12183
|
}
|
|
12143
12184
|
}
|
|
12185
|
+
/**
|
|
12186
|
+
* To get timezone offset.
|
|
12187
|
+
*
|
|
12188
|
+
* @returns {number} .
|
|
12189
|
+
* @private
|
|
12190
|
+
*/
|
|
12191
|
+
getDefaultTZOffset() {
|
|
12192
|
+
const janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
12193
|
+
const julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
12194
|
+
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
12195
|
+
}
|
|
12196
|
+
/**
|
|
12197
|
+
* To check whether the date is in DST.
|
|
12198
|
+
*
|
|
12199
|
+
* @param {Date} date .
|
|
12200
|
+
* @returns {boolean} .
|
|
12201
|
+
* @private
|
|
12202
|
+
*/
|
|
12203
|
+
isInDst(date) {
|
|
12204
|
+
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
12205
|
+
}
|
|
12144
12206
|
/**
|
|
12145
12207
|
* Method to map resource fields.
|
|
12146
12208
|
*
|
|
@@ -12293,7 +12355,7 @@ let Gantt = class Gantt extends Component {
|
|
|
12293
12355
|
this.treeGrid.dataSource = { result: this.flatData, count: count };
|
|
12294
12356
|
}
|
|
12295
12357
|
else {
|
|
12296
|
-
this.treeGrid.dataSource = this.flatData
|
|
12358
|
+
this.treeGrid.dataSource = this.flatData;
|
|
12297
12359
|
}
|
|
12298
12360
|
}
|
|
12299
12361
|
else {
|
|
@@ -12853,10 +12915,8 @@ let Gantt = class Gantt extends Component {
|
|
|
12853
12915
|
this.treeGrid.grid.searchSettings = getActualProperties(this.searchSettings);
|
|
12854
12916
|
this.treeGrid.grid.dataBind();
|
|
12855
12917
|
}
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
this.treeGrid.dataBind();
|
|
12859
|
-
}
|
|
12918
|
+
this.treeGrid.searchSettings = getActualProperties(this.searchSettings);
|
|
12919
|
+
this.treeGrid.dataBind();
|
|
12860
12920
|
if (this.toolbarModule) {
|
|
12861
12921
|
this.toolbarModule.updateSearchTextBox();
|
|
12862
12922
|
}
|
|
@@ -14339,6 +14399,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14339
14399
|
* @public
|
|
14340
14400
|
*/
|
|
14341
14401
|
updateDataSource(dataSource, args) {
|
|
14402
|
+
this.isDynamicData = true;
|
|
14342
14403
|
if (!isNullOrUndefined(args)) {
|
|
14343
14404
|
for (let prop of Object.keys(args)) { // eslint-disable-line
|
|
14344
14405
|
switch (prop) {
|
|
@@ -14541,12 +14602,15 @@ let Gantt = class Gantt extends Component {
|
|
|
14541
14602
|
if (!isNullOrUndefined(rowData)) {
|
|
14542
14603
|
const data = extend({}, {}, rowData.taskData, true);
|
|
14543
14604
|
const taskfields = this.taskFields;
|
|
14605
|
+
if (data[taskfields.startDate]) {
|
|
14606
|
+
this.setRecordValue(taskfields.startDate, rowData.ganttProperties.startDate, data, true);
|
|
14607
|
+
}
|
|
14544
14608
|
if (!isNullOrUndefined(taskfields.duration)) {
|
|
14545
14609
|
data[taskfields.duration] = 0;
|
|
14546
14610
|
}
|
|
14547
14611
|
else {
|
|
14548
|
-
data[taskfields.startDate] = new Date(rowData.
|
|
14549
|
-
data[taskfields.endDate] = new Date(rowData.
|
|
14612
|
+
data[taskfields.startDate] = new Date(rowData.ganttProperties.startDate);
|
|
14613
|
+
data[taskfields.endDate] = new Date(rowData.ganttProperties.endDate);
|
|
14550
14614
|
}
|
|
14551
14615
|
if (!isNullOrUndefined(taskfields.milestone)) {
|
|
14552
14616
|
if (data[taskfields.milestone] === false) {
|
|
@@ -16322,8 +16386,11 @@ class TaskbarEdit extends DateProcessor {
|
|
|
16322
16386
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
16323
16387
|
const args = {
|
|
16324
16388
|
cancel: false,
|
|
16325
|
-
requestType: '
|
|
16389
|
+
requestType: 'taskbarediting'
|
|
16326
16390
|
};
|
|
16391
|
+
if (this.segmentIndex !== -1) {
|
|
16392
|
+
args.requestType = 'mergeSegment';
|
|
16393
|
+
}
|
|
16327
16394
|
this.parent.trigger('actionBegin', args, (arg) => {
|
|
16328
16395
|
if (arg.cancel === false) {
|
|
16329
16396
|
this.taskBarEditingAction(event, false);
|
|
@@ -17148,36 +17215,15 @@ class TaskbarEdit extends DateProcessor {
|
|
|
17148
17215
|
const tierMode = this.parent.timelineModule.bottomTier !== 'None' ? this.parent.timelineModule.topTier :
|
|
17149
17216
|
this.parent.timelineModule.bottomTier;
|
|
17150
17217
|
if (tierMode !== 'Hour' && tierMode !== 'Minutes') {
|
|
17151
|
-
if (this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.isInDst(pStartDate)) {
|
|
17218
|
+
if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
|
|
17152
17219
|
pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
|
|
17153
17220
|
}
|
|
17154
|
-
else if (!this.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.isInDst(pStartDate)) {
|
|
17221
|
+
else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
|
|
17155
17222
|
pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
|
|
17156
17223
|
}
|
|
17157
17224
|
}
|
|
17158
17225
|
return pStartDate;
|
|
17159
17226
|
}
|
|
17160
|
-
/**
|
|
17161
|
-
* To get timezone offset.
|
|
17162
|
-
*
|
|
17163
|
-
* @returns {number} .
|
|
17164
|
-
* @private
|
|
17165
|
-
*/
|
|
17166
|
-
getDefaultTZOffset() {
|
|
17167
|
-
const janMonth = new Date(new Date().getFullYear(), 0, 1);
|
|
17168
|
-
const julMonth = new Date(new Date().getFullYear(), 6, 1); //Because there is no reagions DST inbetwwen this range
|
|
17169
|
-
return Math.max(janMonth.getTimezoneOffset(), julMonth.getTimezoneOffset());
|
|
17170
|
-
}
|
|
17171
|
-
/**
|
|
17172
|
-
* To check whether the date is in DST.
|
|
17173
|
-
*
|
|
17174
|
-
* @param {Date} date .
|
|
17175
|
-
* @returns {boolean} .
|
|
17176
|
-
* @private
|
|
17177
|
-
*/
|
|
17178
|
-
isInDst(date) {
|
|
17179
|
-
return date.getTimezoneOffset() < this.getDefaultTZOffset();
|
|
17180
|
-
}
|
|
17181
17227
|
/**
|
|
17182
17228
|
* To set item position.
|
|
17183
17229
|
*
|
|
@@ -17327,6 +17373,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
17327
17373
|
this.isMouseDragged = false;
|
|
17328
17374
|
}
|
|
17329
17375
|
else {
|
|
17376
|
+
this.parent.isOnEdit = false;
|
|
17330
17377
|
this.cancelTaskbarEditActionInMouseLeave();
|
|
17331
17378
|
}
|
|
17332
17379
|
}
|
|
@@ -17983,7 +18030,7 @@ class DialogEdit {
|
|
|
17983
18030
|
tempData.ganttProperties.durationUnit = this.parent.durationUnit.toLocaleLowerCase();
|
|
17984
18031
|
}
|
|
17985
18032
|
else if (columns[i].field === taskSettings.name) {
|
|
17986
|
-
tempData[field] = '
|
|
18033
|
+
tempData[field] = this.localeObj.getConstant('addDialogTitle') + ' ' + id;
|
|
17987
18034
|
tempData.ganttProperties.taskName = tempData[field];
|
|
17988
18035
|
}
|
|
17989
18036
|
else if (columns[i].field === taskSettings.progress) {
|
|
@@ -18822,7 +18869,7 @@ class DialogEdit {
|
|
|
18822
18869
|
const datePickerModel = this.beforeOpenArgs[generalTabString][this.parent.taskFields[fields[i]]];
|
|
18823
18870
|
const value = args.rowData[args.column.field];
|
|
18824
18871
|
setValue('value', value, datePickerModel);
|
|
18825
|
-
const datePicker = new
|
|
18872
|
+
const datePicker = new this.inputs[this.parent.columnByField[this.parent.taskFields[fields[i]]].editType](datePickerModel);
|
|
18826
18873
|
datePicker.appendTo(args.element);
|
|
18827
18874
|
},
|
|
18828
18875
|
read: (args) => {
|
|
@@ -18893,7 +18940,7 @@ class DialogEdit {
|
|
|
18893
18940
|
inputValue = dialog.querySelector('#' + ganttId + 'SegmentsTabContainer' + columnName)
|
|
18894
18941
|
.ej2_instances[0];
|
|
18895
18942
|
}
|
|
18896
|
-
if (inputValue.value !== tempValue.toString()) {
|
|
18943
|
+
if (inputValue.value.toString() !== tempValue.toString()) {
|
|
18897
18944
|
inputValue.value = tempValue;
|
|
18898
18945
|
inputValue.dataBind();
|
|
18899
18946
|
}
|
|
@@ -19694,6 +19741,9 @@ class DialogEdit {
|
|
|
19694
19741
|
this.rowData.ganttProperties.segments = dataSource;
|
|
19695
19742
|
this.parent.setRecordValue('segments', this.parent.dataOperation.setSegmentsInfo(this.rowData, false), this.rowData.ganttProperties, true);
|
|
19696
19743
|
this.parent.setRecordValue('taskData.' + this.parent.taskFields.segments, userData, this.rowData);
|
|
19744
|
+
if (dataSource.length <= 0) {
|
|
19745
|
+
this.validateDuration(this.rowData);
|
|
19746
|
+
}
|
|
19697
19747
|
}
|
|
19698
19748
|
}
|
|
19699
19749
|
// eslint-disable-next-line
|
|
@@ -21476,7 +21526,7 @@ class Edit$2 {
|
|
|
21476
21526
|
this.updateParentItemOnEditing();
|
|
21477
21527
|
}
|
|
21478
21528
|
/** Update parent up-to zeroth level */
|
|
21479
|
-
if (ganttRecord.parentItem
|
|
21529
|
+
if (ganttRecord.parentItem) {
|
|
21480
21530
|
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
21481
21531
|
}
|
|
21482
21532
|
this.initiateSaveAction(args);
|
|
@@ -23106,8 +23156,11 @@ class Edit$2 {
|
|
|
23106
23156
|
*/
|
|
23107
23157
|
updateRealDataSource(addedRecord, rowPosition) {
|
|
23108
23158
|
const taskFields = this.parent.taskFields;
|
|
23109
|
-
|
|
23159
|
+
let dataSource = isCountRequired(this.parent) ? getValue('result', this.parent.dataSource) :
|
|
23110
23160
|
this.parent.dataSource;
|
|
23161
|
+
if (this.parent.dataSource instanceof DataManager) {
|
|
23162
|
+
dataSource = this.parent.dataSource.dataSource.json;
|
|
23163
|
+
}
|
|
23111
23164
|
for (let i = 0; i < addedRecord.length; i++) {
|
|
23112
23165
|
if (isNullOrUndefined(rowPosition) || isNullOrUndefined(this.addRowSelectedItem)) {
|
|
23113
23166
|
rowPosition = 'Top';
|
|
@@ -23179,6 +23232,7 @@ class Edit$2 {
|
|
|
23179
23232
|
*/
|
|
23180
23233
|
addRecord(data, rowPosition, rowIndex) {
|
|
23181
23234
|
if (this.parent.editModule && this.parent.editSettings.allowAdding) {
|
|
23235
|
+
this.parent.isDynamicData = true;
|
|
23182
23236
|
const cAddedRecord = [];
|
|
23183
23237
|
if (isNullOrUndefined(data)) {
|
|
23184
23238
|
this.validateTaskPosition(data, rowPosition, rowIndex, cAddedRecord);
|
|
@@ -25928,6 +25982,12 @@ class ContextMenu$2 {
|
|
|
25928
25982
|
position = this.item;
|
|
25929
25983
|
data = extend({}, {}, this.rowData.taskData, true);
|
|
25930
25984
|
taskfields = this.parent.taskFields;
|
|
25985
|
+
if (data[taskfields.startDate]) {
|
|
25986
|
+
this.parent.setRecordValue(taskfields.startDate, this.rowData.ganttProperties.startDate, data, true);
|
|
25987
|
+
}
|
|
25988
|
+
if (data[taskfields.endDate]) {
|
|
25989
|
+
this.parent.setRecordValue(taskfields.endDate, this.rowData.ganttProperties.endDate, data, true);
|
|
25990
|
+
}
|
|
25931
25991
|
if (!isNullOrUndefined(taskfields.dependency)) {
|
|
25932
25992
|
data[taskfields.dependency] = null;
|
|
25933
25993
|
}
|
|
@@ -26117,7 +26177,12 @@ class ContextMenu$2 {
|
|
|
26117
26177
|
for (const item of args.items) {
|
|
26118
26178
|
// let target: EventTarget = target;
|
|
26119
26179
|
if (!item.separator) {
|
|
26120
|
-
this.
|
|
26180
|
+
if ((target.classList.contains('e-gantt-unscheduled-taskbar')) && ((item.text === this.getLocale('splitTask')) || (item.text === this.getLocale('mergeTask')))) {
|
|
26181
|
+
this.hideItems.push(item.text);
|
|
26182
|
+
}
|
|
26183
|
+
else {
|
|
26184
|
+
this.updateItemStatus(item, target, rowIndex);
|
|
26185
|
+
}
|
|
26121
26186
|
}
|
|
26122
26187
|
}
|
|
26123
26188
|
args.rowData = this.rowData;
|
|
@@ -26229,24 +26294,34 @@ class ContextMenu$2 {
|
|
|
26229
26294
|
break;
|
|
26230
26295
|
case 'Indent':
|
|
26231
26296
|
{
|
|
26232
|
-
|
|
26233
|
-
|
|
26234
|
-
|
|
26235
|
-
|
|
26236
|
-
|
|
26237
|
-
this.parent.
|
|
26238
|
-
|
|
26297
|
+
if (!this.parent.allowSelection) {
|
|
26298
|
+
this.hideItems.push(item.text);
|
|
26299
|
+
}
|
|
26300
|
+
else {
|
|
26301
|
+
const index = this.parent.selectedRowIndex;
|
|
26302
|
+
const isSelected = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
26303
|
+
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
26304
|
+
const prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
|
|
26305
|
+
if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
|
|
26306
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[index].level - prevRecord.level === 1) {
|
|
26307
|
+
this.updateItemVisibility(item.text);
|
|
26308
|
+
}
|
|
26239
26309
|
}
|
|
26240
26310
|
break;
|
|
26241
26311
|
}
|
|
26242
26312
|
case 'Outdent':
|
|
26243
26313
|
{
|
|
26244
|
-
|
|
26245
|
-
|
|
26246
|
-
|
|
26247
|
-
|
|
26248
|
-
|
|
26249
|
-
this.
|
|
26314
|
+
if (!this.parent.allowSelection) {
|
|
26315
|
+
this.hideItems.push(item.text);
|
|
26316
|
+
}
|
|
26317
|
+
else {
|
|
26318
|
+
const ind = this.parent.selectionModule.getSelectedRowIndexes()[0];
|
|
26319
|
+
const isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
|
|
26320
|
+
this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
26321
|
+
if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
|
|
26322
|
+
this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
|
|
26323
|
+
this.updateItemVisibility(item.text);
|
|
26324
|
+
}
|
|
26250
26325
|
}
|
|
26251
26326
|
break;
|
|
26252
26327
|
}
|
|
@@ -27116,6 +27191,7 @@ class RowDD$1 {
|
|
|
27116
27191
|
else {
|
|
27117
27192
|
const level = 1;
|
|
27118
27193
|
draggedRecord.level = droppedRecord.level + 1;
|
|
27194
|
+
this.parent.setRecordValue('level', this.draggedRecord.level, this.draggedRecord);
|
|
27119
27195
|
this.updateChildRecordLevel(draggedRecord, level);
|
|
27120
27196
|
}
|
|
27121
27197
|
droppedRecord.expanded = true;
|
|
@@ -27200,6 +27276,7 @@ class RowDD$1 {
|
|
|
27200
27276
|
parentData = this.parent.treeGrid[id][record.parentItem.uniqueID];
|
|
27201
27277
|
}
|
|
27202
27278
|
currentRecord.level = record.parentItem ? parentData.level + level : record.level + 1;
|
|
27279
|
+
this.parent.setRecordValue('level', currentRecord.level, currentRecord);
|
|
27203
27280
|
if (currentRecord.hasChildRecords) {
|
|
27204
27281
|
level--;
|
|
27205
27282
|
level = this.updateChildRecordLevel(currentRecord, level);
|