@syncfusion/ej2-gantt 20.1.47 → 20.1.51
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 +32 -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 +103 -30
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +103 -30
- 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/actions/filter.js +4 -2
- package/src/gantt/actions/rowdragdrop.js +4 -2
- package/src/gantt/base/gantt-chart.js +1 -1
- package/src/gantt/base/gantt.d.ts +2 -0
- package/src/gantt/base/gantt.js +1 -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 +14 -11
- 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.51
|
|
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@
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@20.1.50",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-RfhzWOGmO7XGQ5xseJGGbRAHhgqv6rLAiVWSKxNeYLjNkY3vjj7j8aoyH9OGIAjAI8lX3ZAr6BOtIXpYwhnwlQ==",
|
|
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-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.1.50.tgz",
|
|
27
|
+
"_shasum": "527cab5ce59fce5ee5719e30d9970507cd0cf5cf",
|
|
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.
|
|
38
|
+
"@syncfusion/ej2-base": "~20.1.50",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~20.1.50",
|
|
40
40
|
"@syncfusion/ej2-calendars": "~20.1.47",
|
|
41
41
|
"@syncfusion/ej2-data": "~20.1.47",
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~20.1.
|
|
43
|
-
"@syncfusion/ej2-grids": "~20.1.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~20.1.
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~20.1.51",
|
|
43
|
+
"@syncfusion/ej2-grids": "~20.1.51",
|
|
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.51",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~20.1.51"
|
|
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.51",
|
|
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)) {
|
|
@@ -185,11 +185,13 @@ var Filter = /** @class */ (function () {
|
|
|
185
185
|
// ...
|
|
186
186
|
};
|
|
187
187
|
Filter.prototype.closeFilterOnContextClick = function (element) {
|
|
188
|
+
var datePickerElement = document.querySelector('body > div.e-datepicker');
|
|
189
|
+
var dateTimePickerElement = document.querySelector('body > div.e-datetimepicker');
|
|
188
190
|
if (this.filterMenuElement && document.body.contains(this.filterMenuElement)) {
|
|
189
191
|
var ganttElement = closest(element, '#' + this.parent.element.id)
|
|
190
192
|
|| element.querySelector('#' + this.parent.element.id);
|
|
191
|
-
if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || element
|
|
192
|
-
|
|
193
|
+
if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || (!(this.filterMenuElement.contains(element)) && (isNullOrUndefined(datePickerElement))
|
|
194
|
+
&& (isNullOrUndefined(dateTimePickerElement)) && ((element.nodeName === 'DIV') || (element.nodeName === 'HTML')))) {
|
|
193
195
|
remove(this.filterMenuElement);
|
|
194
196
|
this.parent.treeGrid.grid.notify('filter-menu-close', { isOpen: false });
|
|
195
197
|
this.filterMenuElement = null;
|
|
@@ -149,10 +149,12 @@ var RowDD = /** @class */ (function () {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
if (!args.cancel) {
|
|
152
|
-
args.cancel = true;
|
|
153
152
|
args.requestType = 'beforeDrop';
|
|
154
153
|
this.parent.trigger('actionBegin', args);
|
|
155
|
-
|
|
154
|
+
if (!args.cancel) {
|
|
155
|
+
this.dropRows(args, true); // method to update the data collections based on drop action
|
|
156
|
+
args.cancel = true;
|
|
157
|
+
}
|
|
156
158
|
}
|
|
157
159
|
};
|
|
158
160
|
RowDD.prototype.dropRows = function (args, isByMethod) {
|
|
@@ -212,7 +212,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
212
212
|
var emptydivHeight = 36;
|
|
213
213
|
var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
|
|
214
214
|
var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
|
|
215
|
-
if (emptyHeight >= contentElement['offsetHeight']) {
|
|
215
|
+
if (emptyHeight >= contentElement['offsetHeight'] || this.parent.height === 'auto') {
|
|
216
216
|
this.chartBodyContent.style.height = formatUnit(emptyHeight);
|
|
217
217
|
}
|
|
218
218
|
else {
|
|
@@ -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
|
@@ -821,6 +821,7 @@ var Gantt = /** @class */ (function (_super) {
|
|
|
821
821
|
this.getCurrentRecords(args);
|
|
822
822
|
}
|
|
823
823
|
this.notify('recordsUpdated', {});
|
|
824
|
+
this.initialChartRowElements = this.ganttChartModule.getChartRows();
|
|
824
825
|
this.isLoad = false;
|
|
825
826
|
this.trigger('dataBound', args);
|
|
826
827
|
};
|
|
@@ -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,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
79
79
|
var progressFormat = new PdfStringFormat();
|
|
80
80
|
progressFormat.lineAlignment = PdfVerticalAlignment.Middle;
|
|
81
81
|
progressFormat.alignment = PdfTextAlignment.Right;
|
|
82
|
+
if (/^[a-zA-Z]/.test(this.taskLabel)) {
|
|
83
|
+
progressFormat.alignment = PdfTextAlignment.Left;
|
|
84
|
+
}
|
|
82
85
|
var pageIndex = -1;
|
|
83
86
|
if (!taskbar.isMilestone) {
|
|
84
87
|
var taskbarPen = new PdfPen(taskbar.taskBorderColor);
|
|
@@ -100,10 +103,10 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
100
103
|
}
|
|
101
104
|
else {
|
|
102
105
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
103
|
-
if (this.
|
|
106
|
+
if (this.isScheduledTask) {
|
|
104
107
|
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
|
-
taskGraphics.drawString(this.
|
|
108
|
+
if (!isNullOrUndefined(this.parent.labelSettings.taskLabel) && !isNullOrUndefined(this.taskLabel)) {
|
|
109
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight, pixelToPoint(this.progressWidth), pixelToPoint(this.height), progressFormat);
|
|
107
110
|
}
|
|
108
111
|
}
|
|
109
112
|
}
|
|
@@ -125,7 +128,7 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
125
128
|
}
|
|
126
129
|
else {
|
|
127
130
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
128
|
-
if (this.
|
|
131
|
+
if (this.isScheduledTask) {
|
|
129
132
|
var progressBoundsWidth = 0;
|
|
130
133
|
if (this.progressWidth <= renderWidth) {
|
|
131
134
|
progressBoundsWidth = this.progressWidth;
|
|
@@ -135,8 +138,8 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
135
138
|
}
|
|
136
139
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
|
|
137
140
|
this.progressWidth -= progressBoundsWidth;
|
|
138
|
-
if (this.
|
|
139
|
-
taskGraphics.drawString(this.
|
|
141
|
+
if (this.parent.labelSettings.taskLabel && !isNullOrUndefined(this.taskLabel)) {
|
|
142
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), (startPoint.y + adjustHeight), pixelToPoint(progressBoundsWidth), pixelToPoint(this.height), progressFormat);
|
|
140
143
|
}
|
|
141
144
|
}
|
|
142
145
|
}
|
|
@@ -153,8 +156,8 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
153
156
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
154
157
|
if (this.isScheduledTask) {
|
|
155
158
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
156
|
-
if (this.
|
|
157
|
-
taskGraphics.drawString(this.
|
|
159
|
+
if (!isNullOrUndefined(this.taskLabel)) {
|
|
160
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(this.progressWidth), pixelToPoint(this.height), progressFormat);
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
163
|
this.isCompleted = true;
|
|
@@ -168,7 +171,7 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
168
171
|
this.isStartPoint = true;
|
|
169
172
|
}
|
|
170
173
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
|
|
171
|
-
if (this.
|
|
174
|
+
if (this.isScheduledTask) {
|
|
172
175
|
var progressBoundsWidth = 0;
|
|
173
176
|
if (this.progressWidth <= detail.totalWidth) {
|
|
174
177
|
progressBoundsWidth = this.progressWidth;
|
|
@@ -178,8 +181,8 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
178
181
|
}
|
|
179
182
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
|
|
180
183
|
this.progressWidth -= progressBoundsWidth;
|
|
181
|
-
if (this.
|
|
182
|
-
taskGraphics.drawString(this.
|
|
184
|
+
if (!isNullOrUndefined(this.taskLabel)) {
|
|
185
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(progressBoundsWidth), pixelToPoint(this.height), progressFormat);
|
|
183
186
|
}
|
|
184
187
|
}
|
|
185
188
|
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
|
}
|