@syncfusion/ej2-gantt 19.3.43 → 19.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 +35 -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 +61 -27
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +64 -29
- 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/cell-edit.js +1 -0
- package/src/gantt/actions/dialog-edit.js +6 -6
- package/src/gantt/actions/edit.js +7 -3
- 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.css +104 -99
- 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
|
};
|
|
@@ -18500,7 +18533,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18500
18533
|
dialogModel.position = position;
|
|
18501
18534
|
//dialogModel.width = '750px';
|
|
18502
18535
|
dialogModel.height = this.parent.isAdaptive ? '100%' : 'auto';
|
|
18503
|
-
dialogModel.target =
|
|
18536
|
+
dialogModel.target = document.body;
|
|
18504
18537
|
dialogModel.close = this.dialogClose.bind(this);
|
|
18505
18538
|
dialogModel.closeOnEscape = true;
|
|
18506
18539
|
dialogModel.open = function (args) {
|
|
@@ -18787,15 +18820,15 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18787
18820
|
this.resourceSelection(id);
|
|
18788
18821
|
}
|
|
18789
18822
|
else if (id === ganttObj.element.id + 'NotesTabContainer') {
|
|
18790
|
-
|
|
18823
|
+
document.getElementById(id).ej2_instances[0].refresh();
|
|
18791
18824
|
}
|
|
18792
18825
|
else if (id === ganttObj.element.id + 'SegmentsTabContainer') {
|
|
18793
18826
|
if (isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate)) {
|
|
18794
|
-
|
|
18827
|
+
document.getElementById(id).ej2_instances[0]
|
|
18795
18828
|
.enableToolbarItems([this.parent.element.id + 'SegmentsTabContainer' + '_add'], false);
|
|
18796
18829
|
}
|
|
18797
18830
|
else {
|
|
18798
|
-
|
|
18831
|
+
document.getElementById(id).ej2_instances[0]
|
|
18799
18832
|
.enableToolbarItems([this.parent.element.id + 'SegmentsTabContainer' + '_add'], true);
|
|
18800
18833
|
}
|
|
18801
18834
|
}
|
|
@@ -19755,7 +19788,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19755
19788
|
DialogEdit.prototype.updateResourceCollection = function (args, resourceTreeGridId) {
|
|
19756
19789
|
if (!isNullOrUndefined(args.data) && Object.keys(args.data).length) {
|
|
19757
19790
|
var ganttObj = this.parent;
|
|
19758
|
-
var treeGridId =
|
|
19791
|
+
var treeGridId = document.querySelector('#' + resourceTreeGridId);
|
|
19759
19792
|
var resourceTreeGrid = treeGridId.ej2_instances[0];
|
|
19760
19793
|
if (!isNullOrUndefined(resourceTreeGrid) && resourceTreeGrid.getSelectedRecords().length > 0) {
|
|
19761
19794
|
var tempRecords = resourceTreeGrid.getSelectedRecords();
|
|
@@ -19830,7 +19863,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19830
19863
|
};
|
|
19831
19864
|
DialogEdit.prototype.resourceSelection = function (id) {
|
|
19832
19865
|
var _this = this;
|
|
19833
|
-
var resourceTreeGrid =
|
|
19866
|
+
var resourceTreeGrid = document.querySelector('#' + id).ej2_instances[0];
|
|
19834
19867
|
var currentViewData = resourceTreeGrid.getCurrentViewRecords();
|
|
19835
19868
|
var resources = this.ganttResources;
|
|
19836
19869
|
if (resources && resources.length > 0) {
|
|
@@ -21671,7 +21704,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
21671
21704
|
if (ganttProp.work > 0 || column === 'work') {
|
|
21672
21705
|
switch (taskType) {
|
|
21673
21706
|
case 'FixedUnit':
|
|
21674
|
-
if (
|
|
21707
|
+
if (ganttProp.resourceInfo.length === 0) {
|
|
21708
|
+
return;
|
|
21709
|
+
}
|
|
21710
|
+
else if (isAutoSchedule && ganttProp.resourceInfo.length &&
|
|
21675
21711
|
(column === 'work' || (column === 'resource'))) {
|
|
21676
21712
|
this.parent.dataOperation.updateDurationWithWork(currentData);
|
|
21677
21713
|
}
|
|
@@ -22234,6 +22270,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
22234
22270
|
var eventArgs = {};
|
|
22235
22271
|
eventArgs.requestType = 'beforeSave';
|
|
22236
22272
|
eventArgs.data = args.data;
|
|
22273
|
+
eventArgs.cancel = false;
|
|
22237
22274
|
eventArgs.modifiedRecords = this.parent.editedRecords;
|
|
22238
22275
|
if (!isNullOrUndefined(args.target)) {
|
|
22239
22276
|
eventArgs.target = args.target;
|
|
@@ -23064,13 +23101,13 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23064
23101
|
changedRecords: eventArg.modifiedTaskData
|
|
23065
23102
|
};
|
|
23066
23103
|
var adaptor = data_1.adaptor;
|
|
23104
|
+
var query_1 = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
23067
23105
|
if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor) || data_1.dataSource.batchUrl) {
|
|
23068
|
-
var crud = data_1.saveChanges(updatedData_1, _this.parent.taskFields.id);
|
|
23106
|
+
var crud = data_1.saveChanges(updatedData_1, _this.parent.taskFields.id, null, query_1);
|
|
23069
23107
|
crud.then(function () { return _this.deleteSuccess(args); })
|
|
23070
23108
|
.catch(function (e) { return _this.dmFailure(e, args); });
|
|
23071
23109
|
}
|
|
23072
23110
|
else {
|
|
23073
|
-
var query_1 = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
23074
23111
|
var deletedRecords = 'deletedRecords';
|
|
23075
23112
|
var deleteCrud = null;
|
|
23076
23113
|
for (var i = 0; i < updatedData_1[deletedRecords].length; i++) {
|
|
@@ -30313,7 +30350,7 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
30313
30350
|
var taskFields = this.parent.taskFields;
|
|
30314
30351
|
var ganttProps = data.ganttProperties;
|
|
30315
30352
|
if (column.editType === 'datepickeredit' || column.editType === 'datetimepickeredit') {
|
|
30316
|
-
cell.value =
|
|
30353
|
+
cell.value = data[column.field];
|
|
30317
30354
|
}
|
|
30318
30355
|
else if (column.field === taskFields.duration) {
|
|
30319
30356
|
cell.value = this.parent.getDurationString(ganttProps.duration, ganttProps.durationUnit);
|
|
@@ -30336,20 +30373,18 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
30336
30373
|
else {
|
|
30337
30374
|
cell.style.format.paragraphIndent = cell.row.level * 10;
|
|
30338
30375
|
}
|
|
30339
|
-
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
|
|
30345
|
-
|
|
30346
|
-
|
|
30347
|
-
|
|
30348
|
-
|
|
30349
|
-
this.parent.trigger('pdfQueryCellInfo', args);
|
|
30350
|
-
}
|
|
30351
|
-
cell.value = args.value;
|
|
30376
|
+
var args = {
|
|
30377
|
+
data: data,
|
|
30378
|
+
value: cell.value,
|
|
30379
|
+
column: column,
|
|
30380
|
+
style: cell.style,
|
|
30381
|
+
cell: cell
|
|
30382
|
+
};
|
|
30383
|
+
args.value = this.exportValueFormatter.formatCellValue(args);
|
|
30384
|
+
if (this.parent.pdfQueryCellInfo) {
|
|
30385
|
+
this.parent.trigger('pdfQueryCellInfo', args);
|
|
30352
30386
|
}
|
|
30387
|
+
cell.value = args.value;
|
|
30353
30388
|
};
|
|
30354
30389
|
/**
|
|
30355
30390
|
* Method for create the taskbar collection for rendering
|