@syncfusion/ej2-gantt 20.3.61 → 20.4.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.
Files changed (105) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +5 -0
  3. package/dist/ej2-gantt.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js +2 -2
  5. package/dist/ej2-gantt.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es2015.js +1412 -476
  7. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  8. package/dist/es6/ej2-gantt.es5.js +1438 -484
  9. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  10. package/dist/global/ej2-gantt.min.js +2 -2
  11. package/dist/global/ej2-gantt.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +19 -18
  14. package/src/gantt/actions/chart-scroll.d.ts +5 -1
  15. package/src/gantt/actions/chart-scroll.js +39 -1
  16. package/src/gantt/actions/connector-line-edit.js +2 -0
  17. package/src/gantt/actions/context-menu.js +36 -5
  18. package/src/gantt/actions/critical-path.d.ts +2 -2
  19. package/src/gantt/actions/critical-path.js +23 -16
  20. package/src/gantt/actions/dialog-edit.js +37 -14
  21. package/src/gantt/actions/edit.d.ts +1 -0
  22. package/src/gantt/actions/edit.js +156 -34
  23. package/src/gantt/actions/excel-export.js +13 -0
  24. package/src/gantt/actions/filter.js +3 -0
  25. package/src/gantt/actions/keyboard.js +1 -0
  26. package/src/gantt/actions/pdf-export.js +12 -0
  27. package/src/gantt/actions/rowdragdrop.js +8 -2
  28. package/src/gantt/actions/taskbar-edit.js +140 -43
  29. package/src/gantt/actions/toolbar.js +21 -1
  30. package/src/gantt/base/date-processor.js +1 -1
  31. package/src/gantt/base/gantt-chart.js +31 -3
  32. package/src/gantt/base/gantt-model.d.ts +25 -2
  33. package/src/gantt/base/gantt.d.ts +64 -21
  34. package/src/gantt/base/gantt.js +396 -26
  35. package/src/gantt/base/interface.d.ts +0 -4
  36. package/src/gantt/base/splitter.js +12 -2
  37. package/src/gantt/base/task-processor.js +4 -3
  38. package/src/gantt/base/tree-grid.js +37 -0
  39. package/src/gantt/base/utils.js +1 -0
  40. package/src/gantt/export/pdf-connector-line.js +185 -187
  41. package/src/gantt/models/loading-indicator-model.d.ts +20 -0
  42. package/src/gantt/models/loading-indicator.d.ts +18 -0
  43. package/src/gantt/models/loading-indicator.js +34 -0
  44. package/src/gantt/models/models.d.ts +2 -0
  45. package/src/gantt/models/models.js +1 -0
  46. package/src/gantt/renderer/chart-rows.js +75 -30
  47. package/src/gantt/renderer/connector-line.js +100 -97
  48. package/src/gantt/renderer/edit-tooltip.js +22 -3
  49. package/src/gantt/renderer/event-marker.js +15 -2
  50. package/src/gantt/renderer/nonworking-day.js +4 -2
  51. package/src/gantt/renderer/timeline.js +21 -1
  52. package/src/gantt/renderer/tooltip.js +1 -0
  53. package/styles/bootstrap-dark.css +179 -12
  54. package/styles/bootstrap.css +179 -12
  55. package/styles/bootstrap4.css +178 -10
  56. package/styles/bootstrap5-dark.css +178 -10
  57. package/styles/bootstrap5.css +178 -10
  58. package/styles/fabric-dark.css +179 -12
  59. package/styles/fabric.css +179 -12
  60. package/styles/fluent-dark.css +180 -10
  61. package/styles/fluent.css +180 -10
  62. package/styles/gantt/_bootstrap-dark-definition.scss +6 -2
  63. package/styles/gantt/_bootstrap-definition.scss +6 -3
  64. package/styles/gantt/_bootstrap4-definition.scss +6 -3
  65. package/styles/gantt/_bootstrap5-definition.scss +6 -3
  66. package/styles/gantt/_fabric-dark-definition.scss +6 -3
  67. package/styles/gantt/_fabric-definition.scss +6 -3
  68. package/styles/gantt/_fluent-definition.scss +6 -3
  69. package/styles/gantt/_fusionnew-definition.scss +6 -3
  70. package/styles/gantt/_highcontrast-definition.scss +7 -4
  71. package/styles/gantt/_highcontrast-light-definition.scss +6 -3
  72. package/styles/gantt/_layout.scss +234 -21
  73. package/styles/gantt/_material-dark-definition.scss +6 -3
  74. package/styles/gantt/_material-definition.scss +6 -3
  75. package/styles/gantt/_material3-definition.scss +6 -3
  76. package/styles/gantt/_tailwind-definition.scss +6 -3
  77. package/styles/gantt/_theme.scss +17 -8
  78. package/styles/gantt/bootstrap-dark.css +179 -12
  79. package/styles/gantt/bootstrap.css +179 -12
  80. package/styles/gantt/bootstrap4.css +178 -10
  81. package/styles/gantt/bootstrap5-dark.css +178 -10
  82. package/styles/gantt/bootstrap5.css +178 -10
  83. package/styles/gantt/fabric-dark.css +179 -12
  84. package/styles/gantt/fabric.css +179 -12
  85. package/styles/gantt/fluent-dark.css +180 -10
  86. package/styles/gantt/fluent.css +180 -10
  87. package/styles/gantt/highcontrast-light.css +178 -10
  88. package/styles/gantt/highcontrast.css +179 -12
  89. package/styles/gantt/icons/_bootstrap-dark.scss +1 -1
  90. package/styles/gantt/icons/_bootstrap.scss +1 -1
  91. package/styles/gantt/icons/_fabric-dark.scss +1 -1
  92. package/styles/gantt/icons/_fabric.scss +1 -1
  93. package/styles/gantt/icons/_highcontrast.scss +1 -1
  94. package/styles/gantt/icons/_material-dark.scss +1 -1
  95. package/styles/gantt/icons/_material.scss +1 -1
  96. package/styles/gantt/material-dark.css +177 -12
  97. package/styles/gantt/material.css +179 -12
  98. package/styles/gantt/tailwind-dark.css +178 -10
  99. package/styles/gantt/tailwind.css +178 -10
  100. package/styles/highcontrast-light.css +178 -10
  101. package/styles/highcontrast.css +179 -12
  102. package/styles/material-dark.css +177 -12
  103. package/styles/material.css +179 -12
  104. package/styles/tailwind-dark.css +178 -10
  105. package/styles/tailwind.css +178 -10
@@ -101,9 +101,12 @@ var GanttTreeGrid = /** @class */ (function () {
101
101
  this.parent.treeGrid.showColumnMenu = this.parent.showColumnMenu;
102
102
  this.parent.treeGrid.enableCollapseAll = this.parent.collapseAllParentTasks;
103
103
  this.parent.treeGrid.columnMenuItems = this.parent.columnMenuItems;
104
+ this.parent.treeGrid.enableRtl = this.parent.enableRtl;
104
105
  this.parent.treeGrid.childMapping = isNullOrUndefined(this.parent.taskFields.child) ? '' : this.parent.taskFields.child;
105
106
  this.parent.treeGrid.treeColumnIndex = this.parent.treeColumnIndex;
106
107
  this.parent.treeGrid.columns = this.treeGridColumns;
108
+ this.parent.treeGrid.loadingIndicator = this.parent.loadingIndicator;
109
+ this.parent.treeGrid.enableVirtualMaskRow = this.parent.enableVirtualMaskRow;
107
110
  if (this.parent.dataSource instanceof Object && isCountRequired(this.parent)) {
108
111
  // In order to bind the observable data at load time, hasChildMapping is necessary to be mapped.
109
112
  this.parent.treeGrid.hasChildMapping = 'isParent';
@@ -197,6 +200,14 @@ var GanttTreeGrid = /** @class */ (function () {
197
200
  GanttTreeGrid.prototype.dataBound = function (args) {
198
201
  this.ensureScrollBar();
199
202
  this.parent.treeDataBound(args);
203
+ if (this.parent.isVirtualScroll) {
204
+ if ((this.parent.enableVirtualMaskRow && this.parent.enableVirtualization) ||
205
+ (this.parent.enableVirtualization && !this.parent.enableVirtualMaskRow && this.parent.loadingIndicator.indicatorType === "Shimmer") ||
206
+ (this.parent.loadingIndicator.indicatorType === "Shimmer")) {
207
+ this.parent.hideMaskRow();
208
+ }
209
+ this.parent.isVirtualScroll = false;
210
+ }
200
211
  this.prevCurrentView = extend([], [], this.parent.currentViewData, true);
201
212
  };
202
213
  GanttTreeGrid.prototype.dataStateChange = function (args) {
@@ -231,6 +242,12 @@ var GanttTreeGrid = /** @class */ (function () {
231
242
  var collapsedArgs = this.createExpandCollapseArgs(args);
232
243
  this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
233
244
  }
245
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
246
+ this.parent.hideMaskRow();
247
+ }
248
+ else {
249
+ this.parent.hideSpinner();
250
+ }
234
251
  };
235
252
  GanttTreeGrid.prototype.expanded = function (args) {
236
253
  if (!this.parent.ganttChartModule.isExpandCollapseFromChart && !this.parent.isExpandCollapseLevelMethod) {
@@ -239,6 +256,12 @@ var GanttTreeGrid = /** @class */ (function () {
239
256
  this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
240
257
  }
241
258
  }
259
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
260
+ this.parent.hideMaskRow();
261
+ }
262
+ else {
263
+ this.parent.hideSpinner();
264
+ }
242
265
  };
243
266
  GanttTreeGrid.prototype.actionBegin = function (args) {
244
267
  this.parent.notify('actionBegin', args);
@@ -247,6 +270,14 @@ var GanttTreeGrid = /** @class */ (function () {
247
270
  setValue('doubleClickTarget', null, this.parent.treeGrid.editModule);
248
271
  }
249
272
  this.parent.trigger('actionBegin', args);
273
+ if (args.requestType != "virtualscroll" && args.type != "edit" && args.requestType != "beginEdit") {
274
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
275
+ this.parent.showMaskRow();
276
+ }
277
+ else {
278
+ this.parent.showSpinner();
279
+ }
280
+ }
250
281
  }; // eslint-disable-next-line
251
282
  GanttTreeGrid.prototype.created = function (args) {
252
283
  this.updateKeyConfigSettings();
@@ -315,6 +346,12 @@ var GanttTreeGrid = /** @class */ (function () {
315
346
  this.parent.addDeleteRecord = false;
316
347
  }
317
348
  this.parent.trigger('actionComplete', updatedArgs);
349
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
350
+ this.parent.hideMaskRow();
351
+ }
352
+ else {
353
+ this.parent.hideSpinner();
354
+ }
318
355
  };
319
356
  GanttTreeGrid.prototype.updateKeyConfigSettings = function () {
320
357
  delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.delete;
@@ -139,6 +139,7 @@ export function updateDates(record, parent) {
139
139
  export function formatString(str, args) {
140
140
  var regx;
141
141
  for (var i = 0; i < args.length; i++) {
142
+ // eslint-disable-next-line detect-non-literal-regexp
142
143
  regx = new RegExp('\\{' + (i) + '\\}', 'gm');
143
144
  str = str.replace(regx, args[i].toString());
144
145
  }
@@ -46,217 +46,215 @@ var PdfGanttPredecessor = /** @class */ (function () {
46
46
  var childPageData;
47
47
  var parentY = 0;
48
48
  var childY = 0;
49
- if (childTask && parentTask) {
50
- switch (this.type) {
51
- case 'FS':
52
- if (childTask.startPage > -1 && parentTask.endPage > -1) {
53
- startPage = pages[parentTask.endPage];
54
- endPage = pages[childTask.startPage];
55
- parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
56
- childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
57
- if (this.parentIndex < this.childIndex) {
58
- if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
59
- predecessorType = 'FSType1';
60
- }
61
- else {
62
- predecessorType = 'FSType2';
63
- }
49
+ switch (this.type) {
50
+ case 'FS':
51
+ if (childTask.startPage > -1 && parentTask.endPage > -1) {
52
+ startPage = pages[parentTask.endPage];
53
+ endPage = pages[childTask.startPage];
54
+ parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
55
+ childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
56
+ if (this.parentIndex < this.childIndex) {
57
+ if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
58
+ predecessorType = 'FSType1';
64
59
  }
65
60
  else {
66
- if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
67
- predecessorType = 'FSType3';
68
- }
69
- else {
70
- predecessorType = 'FSType4';
71
- }
61
+ predecessorType = 'FSType2';
72
62
  }
73
63
  }
74
64
  else {
75
- return;
65
+ if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
66
+ predecessorType = 'FSType3';
67
+ }
68
+ else {
69
+ predecessorType = 'FSType4';
70
+ }
76
71
  }
77
- break;
78
- case 'SF':
79
- if (childTask.endPage > -1 && parentTask.startPage > -1) {
80
- startPage = pages[parentTask.startPage];
81
- endPage = pages[childTask.endPage];
82
- parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
83
- childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
84
- if (this.parentIndex < this.childIndex) {
85
- if (this.parentLeft > this.childLeft + this.childWidth) {
86
- predecessorType = 'SFType1';
87
- }
88
- else {
89
- predecessorType = 'SFType2';
90
- }
72
+ }
73
+ else {
74
+ return;
75
+ }
76
+ break;
77
+ case 'SF':
78
+ if (childTask.endPage > -1 && parentTask.startPage > -1) {
79
+ startPage = pages[parentTask.startPage];
80
+ endPage = pages[childTask.endPage];
81
+ parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
82
+ childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
83
+ if (this.parentIndex < this.childIndex) {
84
+ if (this.parentLeft > this.childLeft + this.childWidth) {
85
+ predecessorType = 'SFType1';
91
86
  }
92
87
  else {
93
- if (this.parentLeft > this.childLeft + this.childWidth) {
94
- predecessorType = 'SFType3';
95
- }
96
- else {
97
- predecessorType = 'SFType4';
98
- }
88
+ predecessorType = 'SFType2';
99
89
  }
100
90
  }
101
91
  else {
102
- return;
92
+ if (this.parentLeft > this.childLeft + this.childWidth) {
93
+ predecessorType = 'SFType3';
94
+ }
95
+ else {
96
+ predecessorType = 'SFType4';
97
+ }
103
98
  }
104
- break;
105
- case 'FF':
106
- if (childTask.endPage > -1 && parentTask.endPage > -1) {
107
- startPage = pages[parentTask.endPage];
108
- endPage = pages[childTask.endPage];
109
- parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
110
- childPageData = pdfGantt.pdfPageDetail[childTask.endPage - pdfGantt.chartPageIndex];
111
- if (this.parentIndex < this.childIndex) {
112
- if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
113
- predecessorType = 'FFType1';
114
- }
115
- else {
116
- predecessorType = 'FFType2';
117
- }
99
+ }
100
+ else {
101
+ return;
102
+ }
103
+ break;
104
+ case 'FF':
105
+ if (childTask.endPage > -1 && parentTask.endPage > -1) {
106
+ startPage = pages[parentTask.endPage];
107
+ endPage = pages[childTask.endPage];
108
+ parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
109
+ childPageData = pdfGantt.pdfPageDetail[childTask.endPage - pdfGantt.chartPageIndex];
110
+ if (this.parentIndex < this.childIndex) {
111
+ if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
112
+ predecessorType = 'FFType1';
118
113
  }
119
114
  else {
120
- if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
121
- predecessorType = 'FFType3';
122
- }
123
- else {
124
- predecessorType = 'FFType4';
125
- }
115
+ predecessorType = 'FFType2';
126
116
  }
127
117
  }
128
118
  else {
129
- return;
119
+ if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
120
+ predecessorType = 'FFType3';
121
+ }
122
+ else {
123
+ predecessorType = 'FFType4';
124
+ }
130
125
  }
131
- break;
132
- case 'SS':
133
- if (childTask.startPage > -1 && parentTask.startPage > -1) {
134
- startPage = pages[parentTask.startPage];
135
- endPage = pages[childTask.startPage];
136
- parentPageData = pdfGantt.pdfPageDetail[parentTask.startPage - pdfGantt.chartPageIndex];
137
- childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
138
- if (this.parentIndex < this.childIndex) {
139
- if (this.parentLeft >= this.childLeft) {
140
- predecessorType = 'SSType1';
141
- }
142
- else {
143
- predecessorType = 'SSType2';
144
- }
126
+ }
127
+ else {
128
+ return;
129
+ }
130
+ break;
131
+ case 'SS':
132
+ if (childTask.startPage > -1 && parentTask.startPage > -1) {
133
+ startPage = pages[parentTask.startPage];
134
+ endPage = pages[childTask.startPage];
135
+ parentPageData = pdfGantt.pdfPageDetail[parentTask.startPage - pdfGantt.chartPageIndex];
136
+ childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
137
+ if (this.parentIndex < this.childIndex) {
138
+ if (this.parentLeft >= this.childLeft) {
139
+ predecessorType = 'SSType1';
145
140
  }
146
141
  else {
147
- if (this.parentLeft >= this.childLeft) {
148
- predecessorType = 'SSType3';
149
- }
150
- else {
151
- predecessorType = 'SSType4';
152
- }
142
+ predecessorType = 'SSType2';
153
143
  }
154
144
  }
155
145
  else {
156
- return;
146
+ if (this.parentLeft >= this.childLeft) {
147
+ predecessorType = 'SSType3';
148
+ }
149
+ else {
150
+ predecessorType = 'SSType4';
151
+ }
157
152
  }
158
- break;
159
- }
160
- var midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
161
- midPoint = pixelToPoint(midPoint);
162
- /* eslint-disable-next-line */
163
- var point1 = void 0, point2 = void 0, point3 = void 0, point4 = void 0, point5 = void 0, point6 = void 0;
164
- point1 = point2 = point3 = point4 = point5 = point6 = new PointF();
165
- var parentTaskpoint = __assign({}, parentTask.taskStartPoint);
166
- var childTaskpoint = __assign({}, childTask.taskStartPoint);
167
- parentY = parentTaskpoint.y + parentPageData.startPoint.y;
168
- childY = childTaskpoint.y + childPageData.startPoint.y;
169
- var ffpoint1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth), parentY + midPoint);
170
- var sspoint1 = new PointF(pixelToPoint(this.parentLeft) - 1, parentY + midPoint);
171
- var ffpoint3 = new PointF(pixelToPoint(this.childLeft - 20), childY + midPoint);
172
- var ffpoint4 = new PointF(pixelToPoint(this.childLeft - 6 - this.lineWidth) - 1, childY + midPoint);
173
- var sspoint4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 6 + this.lineWidth) + 1, childY + midPoint);
174
- switch (predecessorType) {
175
- case 'FSType1':
176
- case 'FSType3':
177
- point1 = ffpoint1;
178
- point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
179
- point3 = ffpoint3;
180
- point4 = ffpoint4;
181
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
182
- break;
183
- case 'FSType2':
184
- point1 = ffpoint1;
185
- point2 = new PointF(point1.x + 10, parentY + midPoint);
186
- point3 = new PointF(point1.x + 10, childY + 2);
187
- point4 = new PointF(pixelToPoint(this.childLeft - 20), childY + 2);
188
- point5 = ffpoint3;
189
- point6 = ffpoint4;
190
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
191
- break;
192
- case 'FSType4':
193
- point1 = ffpoint1;
194
- point2 = new PointF(point1.x + 10, parentY + midPoint);
195
- point3 = new PointF(point1.x + 10, parentY + 2);
196
- point4 = new PointF(pixelToPoint(this.childLeft - 20), parentY + 2);
197
- point5 = ffpoint3;
198
- point6 = ffpoint4;
199
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
200
- break;
201
- case 'FFType1':
202
- case 'FFType3':
203
- point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
204
- point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
205
- point3 = new PointF(point2.x, childY + midPoint);
206
- point4 = sspoint4;
207
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
208
- break;
209
- case 'FFType2':
210
- case 'FFType4':
211
- point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
212
- point2 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth + 20), parentY + midPoint);
213
- point3 = new PointF(point2.x, childY + midPoint);
214
- point4 = sspoint4;
215
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
216
- break;
217
- case 'SSType1':
218
- case 'SSType3':
219
- point1 = sspoint1;
220
- point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
221
- point3 = new PointF(point2.x, childY + midPoint);
222
- point4 = ffpoint4;
223
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
224
- break;
225
- case 'SSType2':
226
- case 'SSType4':
227
- point1 = sspoint1;
228
- point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
229
- point3 = new PointF(point2.x, childY + midPoint);
230
- point4 = ffpoint4;
231
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
232
- break;
233
- case 'SFType1':
234
- case 'SFType3':
235
- point1 = sspoint1;
236
- point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
237
- point3 = new PointF(point2.x, childY + midPoint);
238
- point4 = sspoint4;
239
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
240
- break;
241
- case 'SFType2':
242
- point1 = sspoint1;
243
- point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
244
- point3 = new PointF(point2.x, childY + 2);
245
- point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), childY + 2);
246
- point5 = new PointF(point4.x, childY + midPoint);
247
- point6 = sspoint4;
248
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
249
- break;
250
- case 'SFType4':
251
- point1 = sspoint1;
252
- point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
253
- point3 = new PointF(point2.x, parentY + 2);
254
- point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + 2);
255
- point5 = new PointF(point4.x, childY + midPoint);
256
- point6 = sspoint4;
257
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
258
- break;
259
- }
153
+ }
154
+ else {
155
+ return;
156
+ }
157
+ break;
158
+ }
159
+ var midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
160
+ midPoint = pixelToPoint(midPoint);
161
+ /* eslint-disable-next-line */
162
+ var point1, point2, point3, point4, point5, point6;
163
+ point1 = point2 = point3 = point4 = point5 = point6 = new PointF();
164
+ var parentTaskpoint = __assign({}, parentTask.taskStartPoint);
165
+ var childTaskpoint = __assign({}, childTask.taskStartPoint);
166
+ parentY = parentTaskpoint.y + parentPageData.startPoint.y;
167
+ childY = childTaskpoint.y + childPageData.startPoint.y;
168
+ var ffpoint1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth), parentY + midPoint);
169
+ var sspoint1 = new PointF(pixelToPoint(this.parentLeft) - 1, parentY + midPoint);
170
+ var ffpoint3 = new PointF(pixelToPoint(this.childLeft - 20), childY + midPoint);
171
+ var ffpoint4 = new PointF(pixelToPoint(this.childLeft - 6 - this.lineWidth) - 1, childY + midPoint);
172
+ var sspoint4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 6 + this.lineWidth) + 1, childY + midPoint);
173
+ switch (predecessorType) {
174
+ case 'FSType1':
175
+ case 'FSType3':
176
+ point1 = ffpoint1;
177
+ point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
178
+ point3 = ffpoint3;
179
+ point4 = ffpoint4;
180
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
181
+ break;
182
+ case 'FSType2':
183
+ point1 = ffpoint1;
184
+ point2 = new PointF(point1.x + 10, parentY + midPoint);
185
+ point3 = new PointF(point1.x + 10, childY + 2);
186
+ point4 = new PointF(pixelToPoint(this.childLeft - 20), childY + 2);
187
+ point5 = ffpoint3;
188
+ point6 = ffpoint4;
189
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
190
+ break;
191
+ case 'FSType4':
192
+ point1 = ffpoint1;
193
+ point2 = new PointF(point1.x + 10, parentY + midPoint);
194
+ point3 = new PointF(point1.x + 10, parentY + 2);
195
+ point4 = new PointF(pixelToPoint(this.childLeft - 20), parentY + 2);
196
+ point5 = ffpoint3;
197
+ point6 = ffpoint4;
198
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
199
+ break;
200
+ case 'FFType1':
201
+ case 'FFType3':
202
+ point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
203
+ point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
204
+ point3 = new PointF(point2.x, childY + midPoint);
205
+ point4 = sspoint4;
206
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
207
+ break;
208
+ case 'FFType2':
209
+ case 'FFType4':
210
+ point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
211
+ point2 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth + 20), parentY + midPoint);
212
+ point3 = new PointF(point2.x, childY + midPoint);
213
+ point4 = sspoint4;
214
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
215
+ break;
216
+ case 'SSType1':
217
+ case 'SSType3':
218
+ point1 = sspoint1;
219
+ point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
220
+ point3 = new PointF(point2.x, childY + midPoint);
221
+ point4 = ffpoint4;
222
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
223
+ break;
224
+ case 'SSType2':
225
+ case 'SSType4':
226
+ point1 = sspoint1;
227
+ point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
228
+ point3 = new PointF(point2.x, childY + midPoint);
229
+ point4 = ffpoint4;
230
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
231
+ break;
232
+ case 'SFType1':
233
+ case 'SFType3':
234
+ point1 = sspoint1;
235
+ point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
236
+ point3 = new PointF(point2.x, childY + midPoint);
237
+ point4 = sspoint4;
238
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
239
+ break;
240
+ case 'SFType2':
241
+ point1 = sspoint1;
242
+ point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
243
+ point3 = new PointF(point2.x, childY + 2);
244
+ point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), childY + 2);
245
+ point5 = new PointF(point4.x, childY + midPoint);
246
+ point6 = sspoint4;
247
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
248
+ break;
249
+ case 'SFType4':
250
+ point1 = sspoint1;
251
+ point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
252
+ point3 = new PointF(point2.x, parentY + 2);
253
+ point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + 2);
254
+ point5 = new PointF(point4.x, childY + midPoint);
255
+ point6 = sspoint4;
256
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
257
+ break;
260
258
  }
261
259
  };
262
260
  /**
@@ -0,0 +1,20 @@
1
+ import { ChildProperty, Property } from "@syncfusion/ej2-base";
2
+
3
+ /**
4
+ * Interface for a class LoadingIndicator
5
+ */
6
+ export interface LoadingIndicatorModel {
7
+
8
+ /**
9
+ * Defines the loading indicator. The available loading indicator are:
10
+ * * Spinner
11
+ * * Shimmer
12
+ *
13
+ * @default Syncfusion.EJ2.Grids.IndicatorType.Spinner
14
+ * @isEnumeration true
15
+ * @aspType Syncfusion.EJ2.Grids.IndicatorType
16
+ *
17
+ */
18
+ indicatorType?: IndicatorType;
19
+
20
+ }
@@ -0,0 +1,18 @@
1
+ import { ChildProperty } from "@syncfusion/ej2-base";
2
+ import { IndicatorType } from "@syncfusion/ej2-grids";
3
+ /**
4
+ * Configures the Loading Indicator of the Gantt.
5
+ */
6
+ export declare class LoadingIndicator extends ChildProperty<LoadingIndicator> {
7
+ /**
8
+ * Defines the loading indicator. The available loading indicator are:
9
+ * * Spinner
10
+ * * Shimmer
11
+ *
12
+ * @default Syncfusion.EJ2.Grids.IndicatorType.Spinner
13
+ * @isEnumeration true
14
+ * @aspType Syncfusion.EJ2.Grids.IndicatorType
15
+ *
16
+ */
17
+ indicatorType: IndicatorType;
18
+ }
@@ -0,0 +1,34 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ };
20
+ import { ChildProperty, Property } from "@syncfusion/ej2-base";
21
+ /**
22
+ * Configures the Loading Indicator of the Gantt.
23
+ */
24
+ var LoadingIndicator = /** @class */ (function (_super) {
25
+ __extends(LoadingIndicator, _super);
26
+ function LoadingIndicator() {
27
+ return _super !== null && _super.apply(this, arguments) || this;
28
+ }
29
+ __decorate([
30
+ Property('Spinner')
31
+ ], LoadingIndicator.prototype, "indicatorType", void 0);
32
+ return LoadingIndicator;
33
+ }(ChildProperty));
34
+ export { LoadingIndicator };
@@ -34,3 +34,5 @@ export * from './sort-settings';
34
34
  export * from './sort-settings-model';
35
35
  export * from './resource-fields';
36
36
  export * from './resource-fields-model';
37
+ export * from './loading-indicator';
38
+ export * from './loading-indicator-model';
@@ -18,3 +18,4 @@ export * from './timeline-settings';
18
18
  export * from './tooltip-settings';
19
19
  export * from './sort-settings';
20
20
  export * from './resource-fields';
21
+ export * from './loading-indicator';