@syncfusion/ej2-gantt 20.1.48 → 20.1.52
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 +30 -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 +119 -26
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +119 -26
- 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 +13 -13
- package/src/gantt/actions/dialog-edit.js +9 -0
- package/src/gantt/base/gantt.d.ts +2 -0
- package/src/gantt/base/gantt.js +4 -0
- package/src/gantt/base/tree-grid.js +1 -1
- package/src/gantt/export/export-helper.js +3 -0
- package/src/gantt/export/pdf-taskbar.d.ts +1 -0
- package/src/gantt/export/pdf-taskbar.js +36 -12
- package/src/gantt/renderer/chart-rows.js +50 -10
- package/src/gantt/renderer/nonworking-day.d.ts +1 -0
- package/src/gantt/renderer/nonworking-day.js +9 -0
- package/src/gantt/renderer/timeline.js +7 -3
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.1.
|
|
3
|
+
* version : 20.1.52
|
|
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@20.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@20.1.51",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-hpuh4ikvObS1mKA45ZSDNduWBKdILWzPS0UzBbIdnVZcrLka7ba2hfAGx7Lp5wkRp7iUOHW/jHD/KB8qDm1LQg==",
|
|
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": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.1.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.1.51.tgz",
|
|
27
|
+
"_shasum": "64b61c584db9ce4752fe43078762a9c14bba20f7",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~20.1.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~20.1.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~20.1.
|
|
38
|
+
"@syncfusion/ej2-base": "~20.1.50",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~20.1.52",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~20.1.52",
|
|
41
41
|
"@syncfusion/ej2-data": "~20.1.47",
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~20.1.
|
|
43
|
-
"@syncfusion/ej2-grids": "~20.1.
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~20.1.52",
|
|
43
|
+
"@syncfusion/ej2-grids": "~20.1.52",
|
|
44
44
|
"@syncfusion/ej2-inputs": "~20.1.48",
|
|
45
45
|
"@syncfusion/ej2-layouts": "~20.1.47",
|
|
46
46
|
"@syncfusion/ej2-lists": "~20.1.47",
|
|
47
|
-
"@syncfusion/ej2-navigations": "~20.1.
|
|
47
|
+
"@syncfusion/ej2-navigations": "~20.1.51",
|
|
48
48
|
"@syncfusion/ej2-popups": "~20.1.47",
|
|
49
|
-
"@syncfusion/ej2-richtexteditor": "~20.1.
|
|
50
|
-
"@syncfusion/ej2-treegrid": "~20.1.
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~20.1.52",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~20.1.52"
|
|
51
51
|
},
|
|
52
52
|
"deprecated": false,
|
|
53
53
|
"description": "Essential JS 2 Gantt Component",
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
"url": "git+https://github.com/syncfusion/ej2-gantt.git"
|
|
76
76
|
},
|
|
77
77
|
"typings": "index.d.ts",
|
|
78
|
-
"version": "20.1.
|
|
78
|
+
"version": "20.1.52",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -364,6 +364,13 @@ var DialogEdit = /** @class */ (function () {
|
|
|
364
364
|
dialogModel.target = document.body;
|
|
365
365
|
dialogModel.close = this.dialogClose.bind(this);
|
|
366
366
|
dialogModel.closeOnEscape = true;
|
|
367
|
+
dialogModel.beforeClose = function (args) {
|
|
368
|
+
if (args.closedBy == "escape") {
|
|
369
|
+
if (args.event.name == "key-pressed" && args.event.target.nodeName == 'INPUT') {
|
|
370
|
+
args.cancel = true;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
};
|
|
367
374
|
dialogModel.open = function (args) {
|
|
368
375
|
var dialogElement = getValue('element', args);
|
|
369
376
|
var generalTabElement = dialogElement.querySelector('#' + _this.parent.element.id + 'GeneralTabContainer');
|
|
@@ -650,6 +657,8 @@ var DialogEdit = /** @class */ (function () {
|
|
|
650
657
|
}
|
|
651
658
|
else if (id === ganttObj.element.id + 'NotesTabContainer') {
|
|
652
659
|
document.getElementById(id).ej2_instances[0].refresh();
|
|
660
|
+
var notesTabElement = document.querySelector('#' + this.parent.element.id + 'NotesTabContainer');
|
|
661
|
+
notesTabElement.style.overflow = 'scroll';
|
|
653
662
|
}
|
|
654
663
|
else if (id === ganttObj.element.id + 'SegmentsTabContainer') {
|
|
655
664
|
if (isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate)) {
|
|
@@ -108,6 +108,8 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
|
|
|
108
108
|
/** @hidden */
|
|
109
109
|
ganttHeight: number;
|
|
110
110
|
/** @hidden */
|
|
111
|
+
initialChartRowElements: NodeListOf<Element>;
|
|
112
|
+
/** @hidden */
|
|
111
113
|
ganttWidth: number;
|
|
112
114
|
/** @hidden */
|
|
113
115
|
predecessorModule: Dependency;
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -393,6 +393,9 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
393
393
|
}
|
|
394
394
|
else {
|
|
395
395
|
this.treeGrid.dataSource = this.flatData;
|
|
396
|
+
if (!isNullOrUndefined(document.getElementsByClassName('e-listview')[0])) {
|
|
397
|
+
this.treeGrid.dataBind();
|
|
398
|
+
}
|
|
396
399
|
}
|
|
397
400
|
}
|
|
398
401
|
else {
|
|
@@ -821,6 +824,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
821
824
|
this.getCurrentRecords(args);
|
|
822
825
|
}
|
|
823
826
|
this.notify('recordsUpdated', {});
|
|
827
|
+
this.initialChartRowElements = this.ganttChartModule.getChartRows();
|
|
824
828
|
this.isLoad = false;
|
|
825
829
|
this.trigger('dataBound', args);
|
|
826
830
|
};
|
|
@@ -261,7 +261,7 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
261
261
|
return eventArgs;
|
|
262
262
|
};
|
|
263
263
|
GanttTreeGrid.prototype.treeActionComplete = function (args) {
|
|
264
|
-
var updatedArgs = extend({}, args
|
|
264
|
+
var updatedArgs = extend({}, args);
|
|
265
265
|
if (getValue('requestType', args) === 'sorting') {
|
|
266
266
|
this.parent.notify('updateModel', {});
|
|
267
267
|
deleteObject(updatedArgs, 'isFrozen');
|
|
@@ -257,6 +257,9 @@ var ExportHelper = /** @class */ (function () {
|
|
|
257
257
|
if (data[_this.parent.labelSettings.rightLabel]) {
|
|
258
258
|
taskbar.rightTaskLabel.value = data[_this.parent.labelSettings.rightLabel].toString();
|
|
259
259
|
}
|
|
260
|
+
if (data[_this.parent.labelSettings.taskLabel]) {
|
|
261
|
+
taskbar.taskLabel = data[_this.parent.labelSettings.taskLabel].toString();
|
|
262
|
+
}
|
|
260
263
|
var reduceLeft = ganttProp.isMilestone ? Math.floor(_this.parent.chartRowsModule.taskBarHeight / 2) + 33 : 33; // 33 indicates default timeline cell width
|
|
261
264
|
taskbar.rightTaskLabel.left = ganttProp.left + ganttProp.width + reduceLeft; // right label left value
|
|
262
265
|
taskbar.fontFamily = _this.ganttStyle.fontFamily;
|
|
@@ -79,6 +79,12 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
79
79
|
var progressFormat = new PdfStringFormat();
|
|
80
80
|
progressFormat.lineAlignment = PdfVerticalAlignment.Middle;
|
|
81
81
|
progressFormat.alignment = PdfTextAlignment.Right;
|
|
82
|
+
var isLabelString = false;
|
|
83
|
+
var updatedWidth;
|
|
84
|
+
if (/^[a-zA-Z]/.test(this.taskLabel)) {
|
|
85
|
+
isLabelString = true;
|
|
86
|
+
progressFormat.alignment = PdfTextAlignment.Left;
|
|
87
|
+
}
|
|
82
88
|
var pageIndex = -1;
|
|
83
89
|
if (!taskbar.isMilestone) {
|
|
84
90
|
var taskbarPen = new PdfPen(taskbar.taskBorderColor);
|
|
@@ -100,10 +106,14 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
100
106
|
}
|
|
101
107
|
else {
|
|
102
108
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
103
|
-
if (this.
|
|
109
|
+
if (this.isScheduledTask) {
|
|
104
110
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
105
|
-
if (!isNullOrUndefined(this.parent.
|
|
106
|
-
|
|
111
|
+
if (!isNullOrUndefined(this.parent.labelSettings.taskLabel) && !isNullOrUndefined(this.taskLabel)) {
|
|
112
|
+
updatedWidth = this.progressWidth;
|
|
113
|
+
if (isLabelString) {
|
|
114
|
+
updatedWidth = this.width;
|
|
115
|
+
}
|
|
116
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight, pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
107
117
|
}
|
|
108
118
|
}
|
|
109
119
|
}
|
|
@@ -118,14 +128,16 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
118
128
|
this.isStartPoint = true;
|
|
119
129
|
}
|
|
120
130
|
var renderWidth = 0;
|
|
121
|
-
|
|
131
|
+
if (!isLabelString) {
|
|
132
|
+
this.width = this.width - (detail.totalWidth - (this.left - cumulativeWidth));
|
|
133
|
+
}
|
|
122
134
|
renderWidth = (detail.totalWidth - (this.left - cumulativeWidth));
|
|
123
135
|
if (!this.isScheduledTask && this.unscheduledTaskBy !== 'duration') {
|
|
124
136
|
this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
|
|
125
137
|
}
|
|
126
138
|
else {
|
|
127
139
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
128
|
-
if (this.
|
|
140
|
+
if (this.isScheduledTask) {
|
|
129
141
|
var progressBoundsWidth = 0;
|
|
130
142
|
if (this.progressWidth <= renderWidth) {
|
|
131
143
|
progressBoundsWidth = this.progressWidth;
|
|
@@ -135,8 +147,12 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
135
147
|
}
|
|
136
148
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
|
|
137
149
|
this.progressWidth -= progressBoundsWidth;
|
|
138
|
-
if (this.
|
|
139
|
-
|
|
150
|
+
if (this.parent.labelSettings.taskLabel && !isNullOrUndefined(this.taskLabel)) {
|
|
151
|
+
updatedWidth = progressBoundsWidth;
|
|
152
|
+
if (isLabelString) {
|
|
153
|
+
updatedWidth = this.width;
|
|
154
|
+
}
|
|
155
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
140
156
|
}
|
|
141
157
|
}
|
|
142
158
|
}
|
|
@@ -153,8 +169,12 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
153
169
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
154
170
|
if (this.isScheduledTask) {
|
|
155
171
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
156
|
-
if (this.
|
|
157
|
-
|
|
172
|
+
if (!isNullOrUndefined(this.taskLabel)) {
|
|
173
|
+
updatedWidth = this.progressWidth;
|
|
174
|
+
if (isLabelString) {
|
|
175
|
+
updatedWidth = this.width;
|
|
176
|
+
}
|
|
177
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
158
178
|
}
|
|
159
179
|
}
|
|
160
180
|
this.isCompleted = true;
|
|
@@ -168,7 +188,7 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
168
188
|
this.isStartPoint = true;
|
|
169
189
|
}
|
|
170
190
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
|
|
171
|
-
if (this.
|
|
191
|
+
if (this.isScheduledTask) {
|
|
172
192
|
var progressBoundsWidth = 0;
|
|
173
193
|
if (this.progressWidth <= detail.totalWidth) {
|
|
174
194
|
progressBoundsWidth = this.progressWidth;
|
|
@@ -178,8 +198,12 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
178
198
|
}
|
|
179
199
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
|
|
180
200
|
this.progressWidth -= progressBoundsWidth;
|
|
181
|
-
if (this.
|
|
182
|
-
|
|
201
|
+
if (!isNullOrUndefined(this.taskLabel)) {
|
|
202
|
+
updatedWidth = progressBoundsWidth;
|
|
203
|
+
if (isLabelString) {
|
|
204
|
+
updatedWidth = this.width;
|
|
205
|
+
}
|
|
206
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
183
207
|
}
|
|
184
208
|
}
|
|
185
209
|
this.isCompleted = false;
|
|
@@ -162,10 +162,10 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
162
162
|
'border-bottom-right-radius:' + this.getBorderRadius(data.ganttProperties) + 'px;">' +
|
|
163
163
|
'</div>');
|
|
164
164
|
}
|
|
165
|
+
var tempDiv = createElement('div');
|
|
165
166
|
if (this.taskLabelTemplateFunction && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
166
167
|
var taskLabelTemplateNode = this.taskLabelTemplateFunction(extend({ index: i }, data), this.parent, 'TaskLabelTemplate', this.getTemplateID('TaskLabelTemplate'), false, undefined, progressDiv[0]);
|
|
167
168
|
if (taskLabelTemplateNode && taskLabelTemplateNode.length > 0) {
|
|
168
|
-
var tempDiv = createElement('div');
|
|
169
169
|
tempDiv.appendChild(taskLabelTemplateNode[0]);
|
|
170
170
|
labelString = tempDiv.innerHTML;
|
|
171
171
|
}
|
|
@@ -174,7 +174,10 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
174
174
|
labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
|
|
175
175
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
176
176
|
}
|
|
177
|
-
if (labelString
|
|
177
|
+
if (labelString.indexOf('null') === -1) {
|
|
178
|
+
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' && !this.isTemplate(this.parent.labelSettings.taskLabel)) {
|
|
179
|
+
labelString = '';
|
|
180
|
+
}
|
|
178
181
|
if (isNaN(parseInt(labelString))) {
|
|
179
182
|
taskLabel = '<span class="' + cls.taskLabel + '" style="line-height:' +
|
|
180
183
|
(this.taskBarHeight - 1) + 'px; text-align: left;' +
|
|
@@ -212,7 +215,18 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
212
215
|
(isNullOrUndefined(data.ganttProperties.segments) || (!isNullOrUndefined(data.ganttProperties.segments) &&
|
|
213
216
|
data.ganttProperties.segments.length === 0))) {
|
|
214
217
|
if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
215
|
-
|
|
218
|
+
var templateElement = this.createDivElement(template)[0];
|
|
219
|
+
var childLabel = this.parent.labelSettings.taskLabel;
|
|
220
|
+
if (childLabel && childLabel['elementRef'])
|
|
221
|
+
templateElement.appendChild(tempDiv);
|
|
222
|
+
progressDiv[0].appendChild(templateElement);
|
|
223
|
+
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent !== '' &&
|
|
224
|
+
!this.isTemplate(childLabel) &&
|
|
225
|
+
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
226
|
+
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
227
|
+
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
|
|
228
|
+
childLabel && !childLabel['elementRef'] && tempDiv.innerHTML != '')
|
|
229
|
+
progressDiv[0].querySelectorAll('.e-task-label')[0].textContent = childLabel;
|
|
216
230
|
}
|
|
217
231
|
if (!isNullOrUndefined(taskbarInnerDiv) && taskbarInnerDiv.length > 0) {
|
|
218
232
|
taskbarInnerDiv[0].appendChild([].slice.call(progressDiv)[0]);
|
|
@@ -786,10 +800,10 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
786
800
|
'width:' + data.ganttProperties.progressWidth + 'px;' +
|
|
787
801
|
'border-top-right-radius:' + this.getBorderRadius(data) + 'px;' +
|
|
788
802
|
'border-bottom-right-radius:' + this.getBorderRadius(data) + 'px;height:100%;"></div>');
|
|
803
|
+
var div = createElement('div');
|
|
789
804
|
if (this.taskLabelTemplateFunction) {
|
|
790
805
|
var parentTaskLabelNode = this.taskLabelTemplateFunction(extend({ index: i }, data), this.parent, 'TaskLabelTemplate', this.getTemplateID('TaskLabelTemplate'), false, undefined, progressBarInnerDiv[0]);
|
|
791
806
|
if (parentTaskLabelNode && parentTaskLabelNode.length > 0) {
|
|
792
|
-
var div = createElement('div');
|
|
793
807
|
div.appendChild(parentTaskLabelNode[0]);
|
|
794
808
|
labelString = div.innerHTML;
|
|
795
809
|
}
|
|
@@ -798,24 +812,38 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
798
812
|
labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
|
|
799
813
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
800
814
|
}
|
|
801
|
-
if (labelString
|
|
815
|
+
if (labelString.indexOf('null') === -1) {
|
|
816
|
+
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' && !this.isTemplate(this.parent.labelSettings.taskLabel)) {
|
|
817
|
+
labelString = '';
|
|
818
|
+
}
|
|
802
819
|
if (isNaN(parseInt(labelString))) {
|
|
803
|
-
labelDiv =
|
|
820
|
+
labelDiv = '<span class="' + cls.taskLabel + '" style="line-height:' +
|
|
804
821
|
(this.taskBarHeight - 1) + 'px; text-align: left;' +
|
|
805
822
|
'display:' + 'inline-block;' +
|
|
806
823
|
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
807
|
-
this.taskBarHeight + 'px;">' + labelString + '</span>'
|
|
824
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
808
825
|
}
|
|
809
826
|
else {
|
|
810
|
-
labelDiv =
|
|
827
|
+
labelDiv = '<span class="' +
|
|
811
828
|
cls.taskLabel + '" style="line-height:' +
|
|
812
829
|
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
|
|
813
830
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
814
831
|
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
|
|
815
832
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
816
|
-
this.taskBarHeight + 'px;">' + labelString + '</span>'
|
|
833
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
817
834
|
}
|
|
818
|
-
|
|
835
|
+
var labelElement = this.createDivElement(labelDiv)[0];
|
|
836
|
+
var parentLabel = this.parent.labelSettings.taskLabel;
|
|
837
|
+
if (parentLabel && parentLabel['elementRef'])
|
|
838
|
+
labelElement.appendChild(div);
|
|
839
|
+
progressBarInnerDiv[0].appendChild(labelElement);
|
|
840
|
+
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent !== '' &&
|
|
841
|
+
!this.isTemplate(parentLabel) &&
|
|
842
|
+
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
843
|
+
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
844
|
+
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
|
|
845
|
+
parentLabel && !parentLabel['elementRef'] && div.innerHTML != '')
|
|
846
|
+
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
|
|
819
847
|
}
|
|
820
848
|
var milestoneTemplate = '<div class="' + cls.parentMilestone + '" style="position:absolute;">' +
|
|
821
849
|
'<div class="' + cls.parentMilestoneTop + '" style="border-right-width:' +
|
|
@@ -1643,6 +1671,18 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1643
1671
|
};
|
|
1644
1672
|
ChartRows.prototype.getResourceParent = function (record) {
|
|
1645
1673
|
var chartRows = this.parent.ganttChartModule.getChartRows();
|
|
1674
|
+
//Below code is for rendering taskbartemplate in resource view with multi taskbar
|
|
1675
|
+
if (this.parent.initialChartRowElements) {
|
|
1676
|
+
for (var j = 0; j <= this.parent.initialChartRowElements.length; j++) {
|
|
1677
|
+
if (!isNullOrUndefined(chartRows[j])) {
|
|
1678
|
+
if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
|
|
1679
|
+
!isNullOrUndefined(this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2])) {
|
|
1680
|
+
// eslint-disable-next-line
|
|
1681
|
+
chartRows[j].childNodes[0].childNodes[1].childNodes[2]['innerHTML'] = this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2]['innerHTML'];
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1646
1686
|
this.templateData = record;
|
|
1647
1687
|
var parentTrNode = this.getTableTrNode();
|
|
1648
1688
|
var leftLabelNode = this.leftLabelContainer();
|
|
@@ -2,6 +2,7 @@ import { createElement, formatUnit, remove, isNullOrUndefined } from '@syncfusio
|
|
|
2
2
|
import * as cls from '../base/css-constants';
|
|
3
3
|
var NonWorkingDay = /** @class */ (function () {
|
|
4
4
|
function NonWorkingDay(gantt) {
|
|
5
|
+
this.weekendWidthUpdated = false;
|
|
5
6
|
this.parent = gantt;
|
|
6
7
|
this.nonworkingContainer = null;
|
|
7
8
|
this.holidayContainer = null;
|
|
@@ -141,6 +142,14 @@ var NonWorkingDay = /** @class */ (function () {
|
|
|
141
142
|
width = this.parent.dataOperation.getTaskWidth(start, tempEnd);
|
|
142
143
|
isFirstCell = false;
|
|
143
144
|
}
|
|
145
|
+
var sDate = new Date(startDate);
|
|
146
|
+
sDate.setDate(sDate.getDate() + 1);
|
|
147
|
+
if (sDate.getTimezoneOffset() != this.parent.timelineModule.timelineStartDate.getTimezoneOffset() && !this.weekendWidthUpdated) {
|
|
148
|
+
if (this.parent.timelineModule.bottomTier == 'Hour' && this.parent.timelineSettings.bottomTier.count === 1) {
|
|
149
|
+
width = width - this.parent.timelineSettings.timelineUnitSize;
|
|
150
|
+
this.weekendWidthUpdated = true;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
144
153
|
var weekendDiv = createElement('div', {
|
|
145
154
|
className: cls.weekend, styles: "left:" + left + "px;width:" + width + "px;height:100%;"
|
|
146
155
|
});
|
|
@@ -818,7 +818,7 @@ var Timeline = /** @class */ (function () {
|
|
|
818
818
|
// PDf export collection
|
|
819
819
|
var timelineCell = {};
|
|
820
820
|
timelineCell.startDate = new Date(startDate.getTime());
|
|
821
|
-
if (mode === 'Month' && tier === 'bottomTier' && (
|
|
821
|
+
if (mode === 'Month' && tier === 'bottomTier' && (count != 1) && scheduleDateCollection.length === 0) {
|
|
822
822
|
isFirstCell = true;
|
|
823
823
|
}
|
|
824
824
|
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell, isFirstCell);
|
|
@@ -832,6 +832,10 @@ var Timeline = /** @class */ (function () {
|
|
|
832
832
|
}
|
|
833
833
|
isFirstCell = false;
|
|
834
834
|
startDate.setTime(newTime);
|
|
835
|
+
if (startDate.getHours() === 5 && count === 2 && tier === 'bottomTier' &&
|
|
836
|
+
this.parent.timelineSettings.bottomTier.unit === 'Hour') {
|
|
837
|
+
startDate.setTime(startDate.getTime() - (1000 * 60 * 60));
|
|
838
|
+
}
|
|
835
839
|
if (startDate >= endDate) {
|
|
836
840
|
/* eslint-disable-next-line */
|
|
837
841
|
parentTr = this.getHeaterTemplateString(scheduleDateCollection[scheduleDateCollection.length - 1], mode, tier, true, count, timelineCell);
|
|
@@ -952,12 +956,12 @@ var Timeline = /** @class */ (function () {
|
|
|
952
956
|
Timeline.prototype.checkDate = function (firstDay, lastDay, increment, count) {
|
|
953
957
|
var date = new Date(firstDay.getTime());
|
|
954
958
|
date.setTime(date.getTime() + increment);
|
|
955
|
-
if (((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
|
|
959
|
+
if (count !== 1 && ((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
|
|
956
960
|
var diffCount = count - (date.getTime() - lastDay.getTime()) / (1000 * 60 * 60);
|
|
957
961
|
if (!this.parent.isInDst(date)) {
|
|
958
962
|
increment += (1000 * 60 * 60 * diffCount);
|
|
959
963
|
}
|
|
960
|
-
else if (this.parent.isInDst(date)) {
|
|
964
|
+
else if (this.parent.isInDst(date) && count !== 2) {
|
|
961
965
|
increment -= (1000 * 60 * 60 * diffCount);
|
|
962
966
|
}
|
|
963
967
|
}
|