@syncfusion/ej2-gantt 21.1.37 → 21.1.38

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 21.1.37
3
+ * version : 21.1.38
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-gantt@*",
3
- "_id": "@syncfusion/ej2-gantt@21.1.35",
3
+ "_id": "@syncfusion/ej2-gantt@21.1.37",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-cP3lpOL2eAFZ2Q5R5P46k7Xp3VWmuu0bOXLdfi0RWJv9cv3ltd9gXByn3FwqoKVbDnHqTcMsfLqIbkDTkHXWEQ==",
5
+ "_integrity": "sha512-ltwvVxBJuPDzCUcpSIWI3K3ZvPOjrOmXSmrL3sqxHQ1aqzTEQIleyCvqPqGPbo/igywXisQ4X7fz7r/EuGafnA==",
6
6
  "_location": "/@syncfusion/ej2-gantt",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-gantt",
24
24
  "/@syncfusion/ej2-vue-gantt"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-21.1.35.tgz",
27
- "_shasum": "a4de85ffeb4e0c788b3a33571de043639daa60bd",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-21.1.37.tgz",
27
+ "_shasum": "3da271adaaa8c7208fbd9a3c011697c0ad7bca71",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
30
30
  "author": {
@@ -35,20 +35,20 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~21.1.37",
38
+ "@syncfusion/ej2-base": "~21.1.38",
39
39
  "@syncfusion/ej2-buttons": "~21.1.37",
40
- "@syncfusion/ej2-calendars": "~21.1.37",
41
- "@syncfusion/ej2-data": "~21.1.37",
42
- "@syncfusion/ej2-dropdowns": "~21.1.37",
43
- "@syncfusion/ej2-grids": "~21.1.37",
44
- "@syncfusion/ej2-inputs": "~21.1.37",
40
+ "@syncfusion/ej2-calendars": "~21.1.38",
41
+ "@syncfusion/ej2-data": "~21.1.38",
42
+ "@syncfusion/ej2-dropdowns": "~21.1.38",
43
+ "@syncfusion/ej2-grids": "~21.1.38",
44
+ "@syncfusion/ej2-inputs": "~21.1.38",
45
45
  "@syncfusion/ej2-layouts": "~21.1.37",
46
46
  "@syncfusion/ej2-lists": "~21.1.37",
47
- "@syncfusion/ej2-navigations": "~21.1.37",
47
+ "@syncfusion/ej2-navigations": "~21.1.38",
48
48
  "@syncfusion/ej2-notifications": "~21.1.37",
49
49
  "@syncfusion/ej2-popups": "~21.1.37",
50
50
  "@syncfusion/ej2-richtexteditor": "~21.1.37",
51
- "@syncfusion/ej2-treegrid": "~21.1.37"
51
+ "@syncfusion/ej2-treegrid": "~21.1.38"
52
52
  },
53
53
  "deprecated": false,
54
54
  "description": "Essential JS 2 Gantt Component",
@@ -73,6 +73,6 @@
73
73
  "url": "git+https://github.com/syncfusion/ej2-gantt.git"
74
74
  },
75
75
  "typings": "index.d.ts",
76
- "version": "21.1.37",
76
+ "version": "21.1.38",
77
77
  "sideEffects": false
78
78
  }
@@ -1,6 +1,7 @@
1
1
  import { Gantt } from '../base/gantt';
2
2
  /**
3
3
  * Configures columnMenu collection in Gantt.
4
+ * @hidden
4
5
  */
5
6
  export declare class ColumnMenu {
6
7
  private parent;
@@ -1,6 +1,7 @@
1
1
  import { TreeGrid, ColumnMenu as TreeGridColumnMenu } from '@syncfusion/ej2-treegrid';
2
2
  /**
3
3
  * Configures columnMenu collection in Gantt.
4
+ * @hidden
4
5
  */
5
6
  var ColumnMenu = /** @class */ (function () {
6
7
  function ColumnMenu(parent) {
@@ -1,5 +1,6 @@
1
1
  import { Gantt } from '../base/gantt';
2
2
  import { IGanttData } from '../base/interface';
3
+ /** @hidden */
3
4
  export declare class CriticalPath {
4
5
  private parent;
5
6
  detailPredecessorCollection: object[];
@@ -1,6 +1,7 @@
1
1
  import { isNullOrUndefined } from '@syncfusion/ej2-base';
2
2
  import { addClass } from '@syncfusion/ej2-base';
3
3
  import * as cls from '../base/css-constants';
4
+ /** @hidden */
4
5
  var CriticalPath = /** @class */ (function () {
5
6
  function CriticalPath(parent) {
6
7
  this.resourceCollectionIds = [];
@@ -62,6 +62,7 @@ var FocusModule = /** @class */ (function () {
62
62
  if (ganttObj.selectedRowIndex === ganttObj.flatData.indexOf(currentSelectingRecord)) {
63
63
  return;
64
64
  }
65
+ ganttObj.selectionModule.selectRow(ganttObj.flatData.indexOf(currentSelectingRecord), false, true);
65
66
  }
66
67
  break;
67
68
  case 'downArrow':
@@ -500,6 +500,12 @@ export interface GanttModel extends ComponentModel{
500
500
  */
501
501
  timelineSettings?: TimelineSettingsModel;
502
502
 
503
+ /**
504
+ * Configure zooming levels of Gantt Timeline
505
+ * @default []
506
+ */
507
+ zoomingLevels?: ZoomTimelineSettings[];
508
+
503
509
  /**
504
510
  * Configures the sort settings of the Gantt.
505
511
  * {% codeBlock src='gantt/sortSettings/index.md' %}{% endcodeBlock %}
@@ -736,6 +736,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
736
736
  timelineSettings: TimelineSettingsModel;
737
737
  /**
738
738
  * Configure zooming levels of Gantt Timeline
739
+ * @default []
739
740
  */
740
741
  zoomingLevels: ZoomTimelineSettings[];
741
742
  /**
@@ -220,7 +220,9 @@ var Gantt = /** @class */ (function (_super) {
220
220
  contextMenu: 'shift+F10' //F Key
221
221
  };
222
222
  this.focusModule = new FocusModule(this);
223
- this.zoomingLevels = this.getZoomingLevels();
223
+ if (this.zoomingLevels.length === 0) {
224
+ this.zoomingLevels = this.getZoomingLevels();
225
+ }
224
226
  this.resourceFieldsMapping();
225
227
  if (isNullOrUndefined(this.resourceFields.unit)) { //set resourceUnit as unit if not mapping
226
228
  this.resourceFields.unit = 'unit';
@@ -1427,6 +1429,14 @@ var Gantt = /** @class */ (function (_super) {
1427
1429
  this.chartRowsModule.refreshGanttRows();
1428
1430
  this.isLoad = false;
1429
1431
  break;
1432
+ case 'dayWorkingTime':
1433
+ this.isLoad = true;
1434
+ this.dataOperation.reUpdateGanttData();
1435
+ this.treeGrid.refreshColumns();
1436
+ this.chartRowsModule.initiateTemplates();
1437
+ this.chartRowsModule.refreshGanttRows();
1438
+ this.isLoad = false;
1439
+ break;
1430
1440
  case 'addDialogFields':
1431
1441
  case 'editDialogFields':
1432
1442
  if (this.editModule && this.editModule.dialogModule) {
@@ -1506,7 +1516,6 @@ var Gantt = /** @class */ (function (_super) {
1506
1516
  case 'readOnly':
1507
1517
  case 'viewType':
1508
1518
  case 'taskFields':
1509
- case 'dayWorkingTime':
1510
1519
  case 'allowTaskbarDragAndDrop':
1511
1520
  case 'allowTaskbarOverlap':
1512
1521
  case 'allowParentDependency':
@@ -3493,6 +3502,9 @@ var Gantt = /** @class */ (function (_super) {
3493
3502
  __decorate([
3494
3503
  Complex({}, TimelineSettings)
3495
3504
  ], Gantt.prototype, "timelineSettings", void 0);
3505
+ __decorate([
3506
+ Property([])
3507
+ ], Gantt.prototype, "zoomingLevels", void 0);
3496
3508
  __decorate([
3497
3509
  Complex({}, SortSettings)
3498
3510
  ], Gantt.prototype, "sortSettings", void 0);
@@ -1457,17 +1457,15 @@ var TaskProcessor = /** @class */ (function (_super) {
1457
1457
  else {
1458
1458
  hierarchicalData = this.parent.dataSource;
1459
1459
  }
1460
- this.parent.flatData.map(function (data) {
1461
- hierarchicalData.map(function (record) {
1462
- if (data.ganttProperties.taskId === record[_this.parent.taskFields.id]) {
1463
- if (!isNullOrUndefined(_this.parent.taskFields.startDate)) {
1464
- task[_this.parent.taskFields.endDate] = record[_this.parent.taskFields.endDate];
1465
- }
1466
- if (!isNullOrUndefined(_this.parent.taskFields.endDate)) {
1467
- task[_this.parent.taskFields.endDate] = record[_this.parent.taskFields.endDate];
1468
- }
1460
+ hierarchicalData.map(function (record) {
1461
+ if (task.ganttProperties.taskId === record[_this.parent.taskFields.id]) {
1462
+ if (!isNullOrUndefined(_this.parent.taskFields.startDate)) {
1463
+ task[_this.parent.taskFields.startDate] = record[_this.parent.taskFields.startDate];
1469
1464
  }
1470
- });
1465
+ if (!isNullOrUndefined(_this.parent.taskFields.endDate)) {
1466
+ task[_this.parent.taskFields.endDate] = record[_this.parent.taskFields.endDate];
1467
+ }
1468
+ }
1471
1469
  });
1472
1470
  };
1473
1471
  TaskProcessor.prototype.getWorkInHour = function (work, workUnit) {
@@ -2222,12 +2220,7 @@ var TaskProcessor = /** @class */ (function (_super) {
2222
2220
  durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 60));
2223
2221
  break;
2224
2222
  default:
2225
- if (childGanttRecord.ganttProperties.duration < 1) {
2226
- durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 3600));
2227
- }
2228
- else {
2229
- durationInDay = childGanttRecord.ganttProperties.duration;
2230
- }
2223
+ durationInDay = childGanttRecord.ganttProperties.duration;
2231
2224
  }
2232
2225
  if (childGanttRecord.hasChildRecords) {
2233
2226
  setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
@@ -2326,7 +2319,7 @@ var TaskProcessor = /** @class */ (function (_super) {
2326
2319
  else {
2327
2320
  taskCount = childLength - milestoneCount;
2328
2321
  }
2329
- var parentProgress = (taskCount > 0 && totalDuration > 0) ? (totalProgress / totalDuration) : 0;
2322
+ var parentProgress = (taskCount > 0 && totalDuration > 0) ? Number((totalProgress / totalDuration).toFixed(2)) : 0;
2330
2323
  var parentProp = parentData.ganttProperties;
2331
2324
  var milestone = (taskCount === 0) && minStartDate && maxEndDate &&
2332
2325
  minStartDate.getTime() === maxEndDate.getTime() ? true : false;
@@ -4,6 +4,7 @@
4
4
  import { PdfPen } from '@syncfusion/ej2-pdf-export';
5
5
  /**
6
6
  * `PdfBorders` class used represents the cell border of the PDF grid.
7
+ * @hidden
7
8
  */
8
9
  export declare class PdfBorders {
9
10
  /**
@@ -86,6 +87,7 @@ export declare class PdfBorders {
86
87
  */
87
88
  constructor();
88
89
  }
90
+ /** @hidden */
89
91
  export declare class PdfPaddings {
90
92
  /**
91
93
  * The `left` padding.
@@ -4,6 +4,7 @@
4
4
  import { PdfPen, PdfDashStyle, PdfColor } from '@syncfusion/ej2-pdf-export';
5
5
  /**
6
6
  * `PdfBorders` class used represents the cell border of the PDF grid.
7
+ * @hidden
7
8
  */
8
9
  var PdfBorders = /** @class */ (function () {
9
10
  // Constructor
@@ -133,6 +134,7 @@ var PdfBorders = /** @class */ (function () {
133
134
  return PdfBorders;
134
135
  }());
135
136
  export { PdfBorders };
137
+ /** @hidden */
136
138
  var PdfPaddings = /** @class */ (function () {
137
139
  function PdfPaddings(left, right, top, bottom) {
138
140
  /**
@@ -3,9 +3,7 @@ import { PdfTreeGrid } from '../pdf-treegrid';
3
3
  import { RectangleF } from '@syncfusion/ej2-pdf-export';
4
4
  import { PdfGraphics } from '@syncfusion/ej2-pdf-export';
5
5
  import { PdfStringFormat, PdfStringLayoutResult } from '@syncfusion/ej2-pdf-export';
6
- /**
7
- *
8
- */
6
+ /**@hidden*/
9
7
  export declare class PdfTreeGridCell {
10
8
  /**
11
9
  * Gets or sets the parent `row`.
@@ -3,9 +3,7 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base';
3
3
  import { RectangleF, PdfTextAlignment, PdfBorderOverlapStyle, PointF, PdfDashStyle, PdfLineCap, PdfSolidBrush, PdfStandardFont } from '@syncfusion/ej2-pdf-export';
4
4
  import { SizeF, PdfFontStyle } from '@syncfusion/ej2-pdf-export';
5
5
  import { PdfStringFormat, PdfStringLayouter } from '@syncfusion/ej2-pdf-export';
6
- /**
7
- *
8
- */
6
+ /**@hidden*/
9
7
  var PdfTreeGridCell = /** @class */ (function () {
10
8
  function PdfTreeGridCell(row) {
11
9
  this.cellWidth = 0;
@@ -102,8 +102,8 @@ export declare class Column {
102
102
  /**
103
103
  * It is used to change display value with the given format and does not affect the original data.
104
104
  * Gets the format from the user which can be standard or custom
105
- * [`number`](../../../common/internationalization/#number-formatting)
106
- * and [`date`](../../../common/internationalization/#formatting) formats.
105
+ * [`number`](https://ej2.syncfusion.com/documentation/common/internationalization/#number-formatting)
106
+ * and [`date`](https://ej2.syncfusion.com/documentation/common/internationalization/#date-formatting) formats.
107
107
  *
108
108
  * @default null
109
109
  * @aspType string
@@ -303,8 +303,8 @@ export interface ColumnModel {
303
303
  /**
304
304
  * It is used to change display value with the given format and does not affect the original data.
305
305
  * Gets the format from the user which can be standard or custom
306
- * [`number`](../../../common/internationalization/#number-formatting)
307
- * and [`date`](../../../common/internationalization/#formatting) formats.
306
+ * [`number`](https://ej2.syncfusion.com/documentation/common/internationalization/#number-formatting)
307
+ * and [`date`](https://ej2.syncfusion.com/documentation/common/internationalization/#date-formatting) formats.
308
308
  *
309
309
  * @default null
310
310
  * @aspType string
@@ -1939,7 +1939,9 @@ var ChartRows = /** @class */ (function (_super) {
1939
1939
  this.parent.ganttChartModule.tempNextElement = null;
1940
1940
  }
1941
1941
  var row = this.parent.treeGrid.grid.getRowObjectFromUID(this.parent.treeGrid.grid.getDataRows()[index].getAttribute('data-uid'));
1942
- row.data = data;
1942
+ if (!isNullOrUndefined(row)) {
1943
+ row.data = data;
1944
+ }
1943
1945
  }
1944
1946
  };
1945
1947
  ChartRows.prototype.getResourceParent = function (record) {
@@ -156,7 +156,10 @@ var Timeline = /** @class */ (function () {
156
156
  */
157
157
  Timeline.prototype.changeTimelineSettings = function (newTimeline) {
158
158
  var _this = this;
159
- if (!this.isZoomIn) {
159
+ if (this.isZoomToFit) {
160
+ this.isSingleTier = this.customTimelineSettings.topTier.unit === 'None' || this.customTimelineSettings.bottomTier.unit === 'None' ? true : false;
161
+ }
162
+ else if (!this.isZoomIn) {
160
163
  this.isSingleTier = newTimeline.topTier.unit === 'None' || newTimeline.bottomTier.unit === 'None' ? true : false;
161
164
  }
162
165
  var skipProperty = this.isSingleTier ?