@syncfusion/ej2-gantt 20.1.48 → 20.1.50

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 : 20.1.48
3
+ * version : 20.1.50
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.47",
3
+ "_id": "@syncfusion/ej2-gantt@20.1.48",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-60lkObo1sLVOuUOCasgszwBvryKWbHtCish7JIz4IlZ7aEOVHaZMzu84p839ay02/uIw5IKLnxcFY+SE5WW/pA==",
5
+ "_integrity": "sha512-exX12YVuBYKhsKh34tR0TsRYiuTEawpjZoVzbb6/ccK3K0yCSjkJjmO42cfYbmLH1zLI0RAFZ6wAa5jPTVfRNQ==",
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.47.tgz",
27
- "_shasum": "d0d50fd8f2502745938a6e16bfae7b01e97dbfa6",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.1.48.tgz",
27
+ "_shasum": "2379a558869377d6cd73d63d10ae81f2d52d730b",
28
28
  "_spec": "@syncfusion/ej2-gantt@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,18 +35,18 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.1.48",
39
- "@syncfusion/ej2-buttons": "~20.1.47",
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.47",
42
+ "@syncfusion/ej2-dropdowns": "~20.1.50",
43
43
  "@syncfusion/ej2-grids": "~20.1.48",
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
47
  "@syncfusion/ej2-navigations": "~20.1.48",
48
48
  "@syncfusion/ej2-popups": "~20.1.47",
49
- "@syncfusion/ej2-richtexteditor": "~20.1.48",
49
+ "@syncfusion/ej2-richtexteditor": "~20.1.50",
50
50
  "@syncfusion/ej2-treegrid": "~20.1.48"
51
51
  },
52
52
  "deprecated": false,
@@ -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.48",
78
+ "version": "20.1.50",
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;
@@ -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
  };
@@ -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
  }
@@ -175,6 +175,9 @@ var ChartRows = /** @class */ (function (_super) {
175
175
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
176
176
  }
177
177
  if (labelString !== 'null') {
178
+ if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate') {
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,16 @@ 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
- progressDiv[0].appendChild([].slice.call(this.createDivElement(template))[0]);
218
+ var templateElement = this.createDivElement(template)[0];
219
+ templateElement.appendChild(tempDiv);
220
+ progressDiv[0].appendChild(templateElement);
221
+ var childLabel = this.parent.labelSettings.taskLabel;
222
+ if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent !== '' &&
223
+ !this.isTemplate(childLabel))
224
+ progressDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
225
+ if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
226
+ childLabel && !childLabel['elementRef'])
227
+ progressDiv[0].querySelectorAll('.e-task-label')[0].textContent = childLabel;
216
228
  }
217
229
  if (!isNullOrUndefined(taskbarInnerDiv) && taskbarInnerDiv.length > 0) {
218
230
  taskbarInnerDiv[0].appendChild([].slice.call(progressDiv)[0]);
@@ -786,10 +798,10 @@ var ChartRows = /** @class */ (function (_super) {
786
798
  'width:' + data.ganttProperties.progressWidth + 'px;' +
787
799
  'border-top-right-radius:' + this.getBorderRadius(data) + 'px;' +
788
800
  'border-bottom-right-radius:' + this.getBorderRadius(data) + 'px;height:100%;"></div>');
801
+ var div = createElement('div');
789
802
  if (this.taskLabelTemplateFunction) {
790
803
  var parentTaskLabelNode = this.taskLabelTemplateFunction(extend({ index: i }, data), this.parent, 'TaskLabelTemplate', this.getTemplateID('TaskLabelTemplate'), false, undefined, progressBarInnerDiv[0]);
791
804
  if (parentTaskLabelNode && parentTaskLabelNode.length > 0) {
792
- var div = createElement('div');
793
805
  div.appendChild(parentTaskLabelNode[0]);
794
806
  labelString = div.innerHTML;
795
807
  }
@@ -799,23 +811,35 @@ var ChartRows = /** @class */ (function (_super) {
799
811
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
800
812
  }
801
813
  if (labelString !== 'null') {
814
+ if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate') {
815
+ labelString = '';
816
+ }
802
817
  if (isNaN(parseInt(labelString))) {
803
- labelDiv = this.createDivElement('<span class="' + cls.taskLabel + '" style="line-height:' +
818
+ labelDiv = '<span class="' + cls.taskLabel + '" style="line-height:' +
804
819
  (this.taskBarHeight - 1) + 'px; text-align: left;' +
805
820
  'display:' + 'inline-block;' +
806
821
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
807
- this.taskBarHeight + 'px;">' + labelString + '</span>');
822
+ this.taskBarHeight + 'px;">' + labelString + '</span>';
808
823
  }
809
824
  else {
810
- labelDiv = this.createDivElement('<span class="' +
825
+ labelDiv = '<span class="' +
811
826
  cls.taskLabel + '" style="line-height:' +
812
827
  (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
813
828
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
814
829
  (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
815
830
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
816
- this.taskBarHeight + 'px;">' + labelString + '</span>');
831
+ this.taskBarHeight + 'px;">' + labelString + '</span>';
817
832
  }
818
- progressBarInnerDiv[0].appendChild([].slice.call(labelDiv)[0]);
833
+ var labelElement = this.createDivElement(labelDiv)[0];
834
+ labelElement.appendChild(div);
835
+ progressBarInnerDiv[0].appendChild(labelElement);
836
+ var parentLabel = this.parent.labelSettings.taskLabel;
837
+ if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent !== '' &&
838
+ !this.isTemplate(parentLabel))
839
+ progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
840
+ if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
841
+ parentLabel && !parentLabel['elementRef'])
842
+ progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
819
843
  }
820
844
  var milestoneTemplate = '<div class="' + cls.parentMilestone + '" style="position:absolute;">' +
821
845
  '<div class="' + cls.parentMilestoneTop + '" style="border-right-width:' +
@@ -1643,6 +1667,18 @@ var ChartRows = /** @class */ (function (_super) {
1643
1667
  };
1644
1668
  ChartRows.prototype.getResourceParent = function (record) {
1645
1669
  var chartRows = this.parent.ganttChartModule.getChartRows();
1670
+ //Below code is for rendering taskbartemplate in resource view with multi taskbar
1671
+ if (this.parent.initialChartRowElements) {
1672
+ for (var j = 0; j <= this.parent.initialChartRowElements.length; j++) {
1673
+ if (!isNullOrUndefined(chartRows[j])) {
1674
+ if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
1675
+ !isNullOrUndefined(this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2])) {
1676
+ // eslint-disable-next-line
1677
+ chartRows[j].childNodes[0].childNodes[1].childNodes[2]['innerHTML'] = this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2]['innerHTML'];
1678
+ }
1679
+ }
1680
+ }
1681
+ }
1646
1682
  this.templateData = record;
1647
1683
  var parentTrNode = this.getTableTrNode();
1648
1684
  var leftLabelNode = this.leftLabelContainer();