@syncfusion/ej2-richtexteditor 22.1.36 → 22.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 22.1.36
3
+ * version : 22.1.38
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-richtexteditor@*",
3
- "_id": "@syncfusion/ej2-richtexteditor@21.1.36",
3
+ "_id": "@syncfusion/ej2-richtexteditor@22.1.36",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-1Qx8lruZxLPhgZZUd1kqJOySUkMYEoOQ4FZKdNQFqGGBrDkWi388NZ99JEneZaEx2oM041kvtxznw89K+TRWGQ==",
5
+ "_integrity": "sha512-mS0ty0acT5STRbjz9ZSXS5y0hcs04Oe00244YG4ojqmGkymJ4OuAhd6+jZPTAzIqy4Pj9ziOOFIm+NLj1tqJLQ==",
6
6
  "_location": "/@syncfusion/ej2-richtexteditor",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -26,8 +26,8 @@
26
26
  "/@syncfusion/ej2-react-richtexteditor",
27
27
  "/@syncfusion/ej2-vue-richtexteditor"
28
28
  ],
29
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-21.1.36.tgz",
30
- "_shasum": "366072e581172381ce322f6d131561d10f573a01",
29
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-22.1.36.tgz",
30
+ "_shasum": "8af01f54f053e047038c2f48f38cb58b0db212b4",
31
31
  "_spec": "@syncfusion/ej2-richtexteditor@*",
32
32
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
33
33
  "author": {
@@ -38,13 +38,13 @@
38
38
  },
39
39
  "bundleDependencies": false,
40
40
  "dependencies": {
41
- "@syncfusion/ej2-base": "~22.1.34",
42
- "@syncfusion/ej2-buttons": "~21.1.36",
43
- "@syncfusion/ej2-filemanager": "~22.1.36",
44
- "@syncfusion/ej2-inputs": "~22.1.34",
45
- "@syncfusion/ej2-navigations": "~22.1.36",
46
- "@syncfusion/ej2-popups": "~22.1.36",
47
- "@syncfusion/ej2-splitbuttons": "~22.1.34"
41
+ "@syncfusion/ej2-base": "~22.1.38",
42
+ "@syncfusion/ej2-buttons": "~22.1.38",
43
+ "@syncfusion/ej2-filemanager": "~22.1.38",
44
+ "@syncfusion/ej2-inputs": "~22.1.38",
45
+ "@syncfusion/ej2-navigations": "~22.1.38",
46
+ "@syncfusion/ej2-popups": "~22.1.38",
47
+ "@syncfusion/ej2-splitbuttons": "~22.1.37"
48
48
  },
49
49
  "deprecated": false,
50
50
  "description": "Essential JS 2 RichTextEditor component",
@@ -70,6 +70,6 @@
70
70
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
71
71
  },
72
72
  "typings": "index.d.ts",
73
- "version": "22.1.36",
73
+ "version": "22.1.38",
74
74
  "sideEffects": false
75
75
  }
@@ -463,7 +463,8 @@ var InsertHtml = /** @class */ (function () {
463
463
  InsertHtml.findDetachEmptyElem = function (element) {
464
464
  var removableElement;
465
465
  if (!isNOU(element.parentElement)) {
466
- if (element.parentElement.textContent.trim() === '' && element.parentElement.contentEditable !== 'true') {
466
+ if (element.parentElement.textContent.trim() === '' && element.parentElement.contentEditable !== 'true' &&
467
+ isNOU(element.parentElement.querySelector('img'))) {
467
468
  removableElement = this.findDetachEmptyElem(element.parentElement);
468
469
  }
469
470
  else {
@@ -919,7 +919,6 @@ var Table = /** @class */ (function () {
919
919
  var differenceWidth = currentTableWidth - _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare);
920
920
  for (var i = 0; i < lastColumnsCell.length; i++) {
921
921
  if (_this.curTable.rows[i].cells[_this.colIndex]) {
922
- // eslint-disable-next-line
923
922
  _this.curTable.rows[i].cells[_this.curTable.rows[i].cells.length === _this.colIndex ?
924
923
  _this.colIndex - 1 : _this.colIndex].style.width = (currentColumnCellWidth - differenceWidth) + '%';
925
924
  }
@@ -932,32 +931,34 @@ var Table = /** @class */ (function () {
932
931
  var totalwid = parseFloat(_this.columnEle.offsetWidth.toString()) +
933
932
  parseFloat(cellColl[_this.colIndex - 1].offsetWidth.toString());
934
933
  for (var i = 0; i < _this.curTable.rows.length; i++) {
935
- if ((totalwid - actualwid) > 20 && actualwid > 20 && _this.curTable.rows[i].cells[i]) {
934
+ var currentRow = _this.curTable.rows[i];
935
+ if ((totalwid - actualwid) > 20 && actualwid > 20) {
936
936
  var leftColumnWidth = totalwid - actualwid;
937
937
  var rightColWidth = actualwid;
938
938
  var index = void 0;
939
939
  var isMergedEleResize = false;
940
940
  var leftTableCell = void 0;
941
941
  var rightTableCell = void 0;
942
- /* eslint-disable */
943
- for (var j = 0; j < _this.curTable.rows[i].cells.length; j++) {
944
- if (_this.curTable.rows[i].cells[j].hasAttribute('rowspan') && j <= _this.colIndex) {
942
+ for (var j = 0; j < currentRow.cells.length; j++) {
943
+ if (currentRow.cells[j].hasAttribute('rowspan') && j <= _this.colIndex) {
945
944
  isRowCellsMerged = true;
946
945
  mergedCellIndex = i;
947
- mergedElement = _this.curTable.rows[i].cells[j];
946
+ mergedElement = currentRow.cells[j];
948
947
  }
949
948
  }
950
- if (_this.curTable.rows[i].cells[i].hasAttribute('colspan')) {
951
- index = parseInt(_this.curTable.rows[i].cells[i].getAttribute('colspan'), 10) - 1;
949
+ if (!isNOU(currentRow.cells[i]) && currentRow.cells[i].hasAttribute('colspan')) {
950
+ index = parseInt(currentRow.cells[i].getAttribute('colspan'), 10) - 1;
952
951
  }
953
952
  else {
954
953
  index = _this.colIndex;
955
954
  }
956
955
  if (isRowCellsMerged) {
957
956
  var currentResizeRow = void 0;
958
- if (_this.curTable.rows[i].cells.length < cellColl.length) {
959
- index = _this.curTable.rows[i].cells.length === _this.colIndex ? _this.colIndex - 1 : _this.colIndex - (_this.colIndex - 1);
960
- currentResizeRow = _this.curTable.rows[!isNullOrUndefined(mergedCellIndex) ? mergedCellIndex : _this.colIndex - 1];
957
+ if (currentRow.cells.length < cellColl.length) {
958
+ index = currentRow.cells.length === _this.colIndex ?
959
+ _this.colIndex - 1 : _this.colIndex - (_this.colIndex - 1);
960
+ currentResizeRow = _this.curTable.rows[!isNullOrUndefined(mergedCellIndex) ?
961
+ mergedCellIndex : _this.colIndex - 1];
961
962
  if (currentResizeRow && (currentResizeRow.cells[_this.colIndex - 1] === mergedElement ||
962
963
  currentResizeRow.cells[currentResizeRow.cells.length - 1] === mergedElement)) {
963
964
  isMergedEleResize = true;
@@ -969,15 +970,15 @@ var Table = /** @class */ (function () {
969
970
  else {
970
971
  index = _this.colIndex;
971
972
  }
972
- leftTableCell = !isMergedEleResize ? _this.curTable.rows[i].cells[index - 1] : (currentResizeRow &&
973
- currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement) ? currentResizeRow.cells[_this.colIndex - 1] :
974
- _this.curTable.rows[i].cells[_this.curTable.rows[i].cells.length - 1];
975
- rightTableCell = !isMergedEleResize ? _this.curTable.rows[i].cells[index] : rightTableCell && rightTableCell.hasAttribute('rowspan') ?
976
- rightTableCell : currentResizeRow && currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement ? _this.curTable.rows[i].cells[index - 1] :
977
- currentResizeRow.cells[currentResizeRow.cells.length - 1];
973
+ leftTableCell = !isMergedEleResize ? currentRow.cells[index - 1] : (currentResizeRow &&
974
+ currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement) ?
975
+ currentResizeRow.cells[_this.colIndex - 1] : currentRow.cells[currentRow.cells.length - 1];
976
+ rightTableCell = !isMergedEleResize ? currentRow.cells[index] : rightTableCell && rightTableCell.hasAttribute('rowspan') ?
977
+ rightTableCell : currentResizeRow && currentResizeRow.cells[currentResizeRow.cells.length - 1] !== mergedElement ?
978
+ currentRow.cells[index - 1] : currentResizeRow.cells[currentResizeRow.cells.length - 1];
978
979
  }
979
- if (!isNOU(_this.curTable.rows[i].cells[index - 1]) && !isRowCellsMerged) {
980
- _this.curTable.rows[i].cells[index - 1].style.width =
980
+ if (!isNOU(currentRow.cells[index - 1]) && !isRowCellsMerged) {
981
+ currentRow.cells[index - 1].style.width =
981
982
  _this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
982
983
  }
983
984
  else {
@@ -986,8 +987,8 @@ var Table = /** @class */ (function () {
986
987
  _this.convertPixelToPercentage(leftColumnWidth, tableWidth) + '%';
987
988
  }
988
989
  }
989
- if (!isNOU(_this.curTable.rows[i].cells[index]) && !isRowCellsMerged) {
990
- _this.curTable.rows[i].cells[index].style.width =
990
+ if (!isNOU(currentRow.cells[index]) && !isRowCellsMerged) {
991
+ currentRow.cells[index].style.width =
991
992
  _this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
992
993
  }
993
994
  else {
@@ -996,7 +997,6 @@ var Table = /** @class */ (function () {
996
997
  _this.convertPixelToPercentage(rightColWidth, tableWidth) + '%';
997
998
  }
998
999
  }
999
- /* eslint-enable */
1000
1000
  }
1001
1001
  }
1002
1002
  }
@@ -1020,8 +1020,8 @@ var Table = /** @class */ (function () {
1020
1020
  EventHandler.remove(_this.contentModule.getEditPanel(), 'mouseover', _this.resizeHelper);
1021
1021
  }
1022
1022
  if (currentTdElement) {
1023
- // eslint-disable-next-line max-len
1024
- var tableBoxPosition = _this.curTable.getBoundingClientRect().left - currentTdElement.getBoundingClientRect().left;
1023
+ var tableBoxPosition = _this.curTable.getBoundingClientRect().left
1024
+ - currentTdElement.getBoundingClientRect().left;
1025
1025
  maxiumWidth = Math.abs(tableBoxPosition - currentTdElement.getBoundingClientRect().width) - 5;
1026
1026
  _this.curTable.style.maxWidth = maxiumWidth + 'px';
1027
1027
  }