@syncfusion/ej2-richtexteditor 20.2.39 → 20.2.40

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.2.39
3
+ * version : 20.2.40
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@20.2.38",
3
+ "_id": "@syncfusion/ej2-richtexteditor@20.2.39",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-R8AtoHAIPqpoh/7JpkRUms9eRZPs7tWWTid2D9gZXd/JieNhPPEcoRKYjavpVRx/Cj4O7umyzzXHIekW+8h3Xw==",
5
+ "_integrity": "sha512-yO/wGqPBdhD7xAMyXiLpzmmE9xiT18tgPaMOCsiUGj4wuJcWEF+2RVc66t2fLy2osg70SdEof4R6wByno2tN+w==",
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": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.2.38.tgz",
30
- "_shasum": "332d081f0e815d62053ba5a2d14d14f9a0813411",
29
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.2.39.tgz",
30
+ "_shasum": "1f0a6edaf8a4f4200b391fe333a9a11116b23191",
31
31
  "_spec": "@syncfusion/ej2-richtexteditor@*",
32
32
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
33
33
  "author": {
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "bundleDependencies": false,
40
40
  "dependencies": {
41
- "@syncfusion/ej2-base": "~20.2.38",
41
+ "@syncfusion/ej2-base": "~20.2.39",
42
42
  "@syncfusion/ej2-buttons": "~20.2.38",
43
43
  "@syncfusion/ej2-filemanager": "~20.2.39",
44
44
  "@syncfusion/ej2-inputs": "~20.2.38",
45
45
  "@syncfusion/ej2-navigations": "~20.2.39",
46
- "@syncfusion/ej2-popups": "~20.2.39",
46
+ "@syncfusion/ej2-popups": "~20.2.40",
47
47
  "@syncfusion/ej2-splitbuttons": "~20.2.38"
48
48
  },
49
49
  "deprecated": false,
@@ -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": "20.2.39",
73
+ "version": "20.2.40",
74
74
  "sideEffects": false
75
75
  }
@@ -233,7 +233,7 @@ var ToolbarStatus = /** @class */ (function () {
233
233
  if ((name !== null && name !== '' && name !== undefined)
234
234
  && (fontName === null || fontName === undefined || (fontName.filter(function (value, pos) {
235
235
  var pattern = new RegExp(name, 'i');
236
- if ((value.replace(/"/g, '').replace(/ /g, '') === name.replace(/"/g, '').replace(/ /g, '')) ||
236
+ if ((value.replace(/"/g, '').replace(/ /g, '').toLowerCase() === name.replace(/"/g, '').replace(/ /g, '').toLowerCase()) ||
237
237
  (value.search(pattern) > -1)) {
238
238
  index = pos;
239
239
  }
@@ -851,8 +851,19 @@ var RichTextEditor = /** @class */ (function (_super) {
851
851
  if (this.isDestroyed || !this.isRendered) {
852
852
  return;
853
853
  }
854
- if (this.element.offsetParent === null && !isNOU(this.toolbarModule)) {
855
- this.toolbarModule.destroy();
854
+ if (this.element.offsetParent === null) {
855
+ if (!isNOU(this.toolbarModule)) {
856
+ this.toolbarModule.destroy();
857
+ }
858
+ if (!isNOU(this.imageModule)) {
859
+ this.imageModule.moduleDestroy();
860
+ }
861
+ if (!isNOU(this.linkModule)) {
862
+ this.linkModule.moduleDestroy();
863
+ }
864
+ if (!isNOU(this.renderModule)) {
865
+ this.renderModule.moduleDestroy();
866
+ }
856
867
  return;
857
868
  }
858
869
  this.notify(events.destroy, {});
@@ -30,7 +30,7 @@ export declare class Image {
30
30
  private isAllowedTypes;
31
31
  private pageX;
32
32
  private pageY;
33
- private mousex;
33
+ private mouseX;
34
34
  private dialogRenderObj;
35
35
  private deletedImg;
36
36
  private changedWidthValue;
@@ -165,6 +165,14 @@ export declare class Image {
165
165
 
166
166
  */
167
167
  destroy(): void;
168
+ /**
169
+ * Clears the ImageModule.
170
+ *
171
+ * @returns {void}
172
+ * @hidden
173
+
174
+ */
175
+ moduleDestroy(): void;
168
176
  /**
169
177
  * For internal use only - Get the module name.
170
178
  *
@@ -17,7 +17,7 @@ var Image = /** @class */ (function () {
17
17
  this.isAllowedTypes = true;
18
18
  this.pageX = null;
19
19
  this.pageY = null;
20
- this.mousex = null;
20
+ this.mouseX = null;
21
21
  this.deletedImg = [];
22
22
  this.parent = parent;
23
23
  this.rteID = parent.element.id;
@@ -354,7 +354,7 @@ var Image = /** @class */ (function () {
354
354
  img.style.minWidth = this.parent.insertImageSettings.minWidth === 0 ? '20px' : formatUnit(this.parent.insertImageSettings.minWidth);
355
355
  if (this.parent.insertImageSettings.resizeByPercent) {
356
356
  if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
357
- var original = img.offsetWidth + this.mousex;
357
+ var original = img.offsetWidth + this.mouseX;
358
358
  var finalWidthByPerc = (original / img.offsetWidth) * (parseFloat(img.style.width).toString() == 'NaN' ? (img.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) : parseFloat(img.style.width));
359
359
  img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
360
360
  }
@@ -380,17 +380,17 @@ var Image = /** @class */ (function () {
380
380
  }
381
381
  else {
382
382
  if (this.parent.iframeSettings.enable) {
383
- img.setAttribute('width', (img.width + this.mousex).toString());
383
+ img.setAttribute('width', (img.width + this.mouseX).toString());
384
384
  }
385
385
  else {
386
- img.setAttribute('width', (img.offsetWidth + this.mousex).toString());
386
+ img.setAttribute('width', (img.offsetWidth + this.mouseX).toString());
387
387
  }
388
388
  }
389
389
  }
390
390
  else if (height > width) {
391
391
  if (this.parent.insertImageSettings.resizeByPercent) {
392
392
  if (parseInt('' + img.getBoundingClientRect().width + '', 10) !== 0 && parseInt('' + width + '', 10) !== 0) {
393
- var original = img.offsetWidth + this.mousex;
393
+ var original = img.offsetWidth + this.mouseX;
394
394
  var finalWidthByPerc = (original / img.offsetWidth) * (parseFloat(img.style.width).toString() == 'NaN' ? (img.offsetWidth / (parseFloat(getComputedStyle(this.parent.element).width)) * 100) : parseFloat(img.style.width));
395
395
  img.style.width = ((finalWidthByPerc > 3) ? finalWidthByPerc : 3) + '%';
396
396
  }
@@ -459,7 +459,7 @@ var Image = /** @class */ (function () {
459
459
  var mouseY = (this.resizeBtnStat.topLeft || this.resizeBtnStat.topRight) ? -(pageY - this.pageY) : (pageY - this.pageY);
460
460
  var width = parseInt(this.imgDupPos.width, 10) + mouseX;
461
461
  var height = parseInt(this.imgDupPos.height, 10) + mouseY;
462
- this.mousex = mouseX;
462
+ this.mouseX = mouseX;
463
463
  this.pageX = pageX;
464
464
  this.pageY = pageY;
465
465
  if (this.resizeBtnStat.botRight) {
@@ -2295,6 +2295,18 @@ var Image = /** @class */ (function () {
2295
2295
  this.prevSelectedImgEle = undefined;
2296
2296
  this.removeEventListener();
2297
2297
  };
2298
+ /* eslint-disable */
2299
+ /**
2300
+ * Clears the ImageModule.
2301
+ *
2302
+ * @returns {void}
2303
+ * @hidden
2304
+
2305
+ */
2306
+ /* eslint-enable */
2307
+ Image.prototype.moduleDestroy = function () {
2308
+ this.parent = null;
2309
+ };
2298
2310
  /**
2299
2311
  * For internal use only - Get the module name.
2300
2312
  *
@@ -48,6 +48,14 @@ export declare class Link {
48
48
 
49
49
  */
50
50
  destroy(): void;
51
+ /**
52
+ * Clears the Link Module.
53
+ *
54
+ * @returns {void}
55
+ * @hidden
56
+
57
+ */
58
+ moduleDestroy(): void;
51
59
  /**
52
60
  * For internal use only - Get the module name.
53
61
  *
@@ -520,6 +520,16 @@ var Link = /** @class */ (function () {
520
520
  Link.prototype.destroy = function () {
521
521
  this.removeEventListener();
522
522
  };
523
+ /**
524
+ * Clears the Link Module.
525
+ *
526
+ * @returns {void}
527
+ * @hidden
528
+
529
+ */
530
+ Link.prototype.moduleDestroy = function () {
531
+ this.parent = null;
532
+ };
523
533
  /**
524
534
  * For internal use only - Get the module name.
525
535
  *
@@ -40,6 +40,12 @@ export declare class Render {
40
40
  * @returns {void}
41
41
  */
42
42
  destroy(): void;
43
+ /**
44
+ * Clears the Render Module.
45
+ *
46
+ * @returns {void}
47
+ */
48
+ moduleDestroy(): void;
43
49
  private addEventListener;
44
50
  private removeEventListener;
45
51
  private keyUp;
@@ -51,6 +51,14 @@ var Render = /** @class */ (function () {
51
51
  Render.prototype.destroy = function () {
52
52
  this.removeEventListener();
53
53
  };
54
+ /**
55
+ * Clears the Render Module.
56
+ *
57
+ * @returns {void}
58
+ */
59
+ Render.prototype.moduleDestroy = function () {
60
+ this.parent = null;
61
+ };
54
62
  Render.prototype.addEventListener = function () {
55
63
  if (this.parent.isDestroyed) {
56
64
  return;
@@ -547,7 +547,8 @@ var Table = /** @class */ (function () {
547
547
  }
548
548
  var target = e.target || e.targetTouches[0].target;
549
549
  var closestTable = closest(target, 'table.e-rte-table');
550
- if (!isNOU(this.curTable) && !isNOU(closestTable) && closestTable !== this.curTable) {
550
+ if (!isNOU(this.curTable) && !isNOU(closestTable) && closestTable !== this.curTable &&
551
+ this.parent.contentModule.getEditPanel().contains(closestTable)) {
551
552
  this.removeResizeElement();
552
553
  this.removeHelper(e);
553
554
  this.cancelResizeAction();
@@ -824,7 +825,8 @@ var Table = /** @class */ (function () {
824
825
  var rteWidth = _this.contentModule.getEditPanel().offsetWidth - (_this.contentModule.getEditPanel().offsetWidth -
825
826
  _this.contentModule.getEditPanel().clientWidth) - paddingSize * 2;
826
827
  var widthCompare = void 0;
827
- if (!isNOU(_this.curTable.parentElement.closest('table'))) {
828
+ if (!isNOU(_this.curTable.parentElement.closest('table')) && !isNOU(_this.curTable.closest('td')) &&
829
+ _this.contentModule.getEditPanel().contains(_this.curTable.closest('td'))) {
828
830
  var currentTd = _this.curTable.closest('td');
829
831
  var currentTDPad = +getComputedStyle(currentTd).paddingRight.match(/\d/g).join('');
830
832
  // Padding of the current table with the parent element multiply with 2.