@syncfusion/ej2-image-editor 26.1.35 → 26.1.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.
Files changed (70) hide show
  1. package/dist/ej2-image-editor.umd.min.js +2 -2
  2. package/dist/ej2-image-editor.umd.min.js.map +1 -1
  3. package/dist/es6/ej2-image-editor.es2015.js +30 -6
  4. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  5. package/dist/es6/ej2-image-editor.es5.js +30 -6
  6. package/dist/es6/ej2-image-editor.es5.js.map +1 -1
  7. package/dist/global/ej2-image-editor.min.js +2 -2
  8. package/dist/global/ej2-image-editor.min.js.map +1 -1
  9. package/dist/global/index.d.ts +1 -1
  10. package/package.json +11 -11
  11. package/src/image-editor/action/draw.js +8 -2
  12. package/src/image-editor/action/selection.js +1 -1
  13. package/src/image-editor/action/shape.js +11 -1
  14. package/src/image-editor/action/undo-redo.js +2 -0
  15. package/src/image-editor/base/image-editor.js +8 -2
  16. package/styles/bootstrap-dark.css +7 -0
  17. package/styles/bootstrap.css +7 -0
  18. package/styles/bootstrap4.css +7 -0
  19. package/styles/bootstrap5-dark.css +7 -0
  20. package/styles/bootstrap5.css +7 -0
  21. package/styles/fabric-dark.css +7 -0
  22. package/styles/fabric.css +7 -0
  23. package/styles/fluent-dark.css +7 -0
  24. package/styles/fluent.css +7 -0
  25. package/styles/fluent2.css +13 -5
  26. package/styles/highcontrast-light.css +7 -0
  27. package/styles/highcontrast.css +7 -0
  28. package/styles/image-editor/_bds-definition.scss +1 -0
  29. package/styles/image-editor/_bootstrap-dark-definition.scss +1 -0
  30. package/styles/image-editor/_bootstrap-definition.scss +1 -0
  31. package/styles/image-editor/_bootstrap4-definition.scss +1 -0
  32. package/styles/image-editor/_bootstrap5-definition.scss +1 -0
  33. package/styles/image-editor/_bootstrap5.3-definition.scss +1 -0
  34. package/styles/image-editor/_fabric-dark-definition.scss +1 -0
  35. package/styles/image-editor/_fabric-definition.scss +1 -0
  36. package/styles/image-editor/_fluent-definition.scss +1 -0
  37. package/styles/image-editor/_fluent2-definition.scss +1 -0
  38. package/styles/image-editor/_fusionnew-definition.scss +1 -0
  39. package/styles/image-editor/_highcontrast-definition.scss +1 -0
  40. package/styles/image-editor/_highcontrast-light-definition.scss +1 -0
  41. package/styles/image-editor/_layout.scss +32 -4
  42. package/styles/image-editor/_material-dark-definition.scss +1 -0
  43. package/styles/image-editor/_material-definition.scss +1 -0
  44. package/styles/image-editor/_material3-definition.scss +1 -0
  45. package/styles/image-editor/_tailwind-definition.scss +1 -0
  46. package/styles/image-editor/_theme.scss +7 -0
  47. package/styles/image-editor/bootstrap-dark.css +7 -0
  48. package/styles/image-editor/bootstrap.css +7 -0
  49. package/styles/image-editor/bootstrap4.css +7 -0
  50. package/styles/image-editor/bootstrap5-dark.css +7 -0
  51. package/styles/image-editor/bootstrap5.css +7 -0
  52. package/styles/image-editor/fabric-dark.css +7 -0
  53. package/styles/image-editor/fabric.css +7 -0
  54. package/styles/image-editor/fluent-dark.css +7 -0
  55. package/styles/image-editor/fluent.css +7 -0
  56. package/styles/image-editor/fluent2.css +13 -5
  57. package/styles/image-editor/highcontrast-light.css +7 -0
  58. package/styles/image-editor/highcontrast.css +7 -0
  59. package/styles/image-editor/material-dark.css +7 -0
  60. package/styles/image-editor/material.css +7 -0
  61. package/styles/image-editor/material3-dark.css +20 -3
  62. package/styles/image-editor/material3.css +20 -3
  63. package/styles/image-editor/tailwind-dark.css +7 -0
  64. package/styles/image-editor/tailwind.css +7 -0
  65. package/styles/material-dark.css +7 -0
  66. package/styles/material.css +7 -0
  67. package/styles/material3-dark.css +20 -3
  68. package/styles/material3.css +20 -3
  69. package/styles/tailwind-dark.css +7 -0
  70. package/styles/tailwind.css +7 -0
@@ -4808,7 +4808,10 @@ var Draw = /** @__PURE__ @class */ (function () {
4808
4808
  }
4809
4809
  };
4810
4810
  Draw.prototype.open = function (data) {
4811
- document.getElementById(this.parent.element.id + '_dropArea').style.display = 'none';
4811
+ var dropArea = document.getElementById(this.parent.element.id + '_dropArea');
4812
+ if (dropArea) {
4813
+ dropArea.style.display = 'none';
4814
+ }
4812
4815
  if (!this.parent.disabled) {
4813
4816
  this.openURL = data;
4814
4817
  this.restoreOldImage();
@@ -4829,7 +4832,10 @@ var Draw = /** @__PURE__ @class */ (function () {
4829
4832
  };
4830
4833
  Draw.prototype.fileSelect = function (inputElement, args) {
4831
4834
  var parent = this.parent;
4832
- document.getElementById(parent.element.id + '_dropArea').style.display = 'none';
4835
+ var dropArea = document.getElementById(parent.element.id + '_dropArea');
4836
+ if (dropArea) {
4837
+ dropArea.style.display = 'none';
4838
+ }
4833
4839
  if (!parent.disabled) {
4834
4840
  var filesData = void 0;
4835
4841
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
@@ -9384,7 +9390,7 @@ var Selection = /** @__PURE__ @class */ (function () {
9384
9390
  }
9385
9391
  else {
9386
9392
  parent.trigger('shapeChanging', shapeMovingArgs);
9387
- this.isPreventShaping = shapeResizingArgs.cancel;
9393
+ this.isPreventShaping = shapeMovingArgs.cancel;
9388
9394
  parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false,
9389
9395
  value: { shapeSettings: shapeMovingArgs.currentShapeSettings } });
9390
9396
  }
@@ -13888,6 +13894,14 @@ var Shape = /** @__PURE__ @class */ (function () {
13888
13894
  parent.notify('toolbar', { prop: 'destroy-qa-toolbar', onPropertyChange: false });
13889
13895
  parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: null } });
13890
13896
  }
13897
+ if (text && text.indexOf('\n') > -1 && parent.isPublicMethod) {
13898
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13899
+ var fontSizeInd = String(parent.fontSizeColl.findIndex(function (item) { return item.text === String(parent.activeObj.textSettings.fontSize); }) + 1);
13900
+ parent.noPushUndo = true;
13901
+ parent.updateFontSize('5');
13902
+ parent.updateFontSize(fontSizeInd);
13903
+ parent.noPushUndo = false;
13904
+ }
13891
13905
  if (parent.isPublicMethod && !isSelected) {
13892
13906
  parent.notify('undo-redo', { prop: 'updateUndoRedo', value: { operation: 'shapeInsert' }, onPropertyChange: false });
13893
13907
  }
@@ -15981,7 +15995,9 @@ var Shape = /** @__PURE__ @class */ (function () {
15981
15995
  Shape.prototype.pushActItemIntoObj = function () {
15982
15996
  var parent = this.parent;
15983
15997
  if (parent.textArea.style.display === 'none') {
15984
- parent.objColl.push(parent.activeObj);
15998
+ if (parent.activeObj.activePoint.width !== 0 || parent.activeObj.activePoint.height !== 0) {
15999
+ parent.objColl.push(parent.activeObj);
16000
+ }
15985
16001
  }
15986
16002
  else {
15987
16003
  var temp = extend({}, parent.activeObj, {}, true);
@@ -19614,6 +19630,7 @@ var UndoRedo = /** @__PURE__ @class */ (function () {
19614
19630
  case 'freehanddraw':
19615
19631
  case 'freehand-draw':
19616
19632
  this.updateFreehandDraw(obj.previousPointColl, obj.previousSelPointColl);
19633
+ parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex', value: { value: parent.pointColl.length } });
19617
19634
  break;
19618
19635
  case 'freehanddrawCustomized':
19619
19636
  this.updateFreehandDrawCustomized(obj.previousObjColl, obj.previousPointColl);
@@ -19744,6 +19761,7 @@ var UndoRedo = /** @__PURE__ @class */ (function () {
19744
19761
  case 'freehanddraw':
19745
19762
  case 'freehand-draw':
19746
19763
  this.updateFreehandDraw(obj.currentPointColl, obj.currentSelPointColl);
19764
+ parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex', value: { value: parent.pointColl.length } });
19747
19765
  break;
19748
19766
  case 'freehanddrawCustomized':
19749
19767
  this.updateFreehandDrawCustomized(obj.currentObjColl, obj.currentPointColl);
@@ -21282,7 +21300,10 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
21282
21300
  if (isNullOrUndefined(data)) {
21283
21301
  return;
21284
21302
  }
21285
- document.getElementById(this.element.id + '_dropArea').style.display = 'none';
21303
+ var dropArea = document.getElementById(this.element.id + '_dropArea');
21304
+ if (dropArea) {
21305
+ dropArea.style.display = 'none';
21306
+ }
21286
21307
  this.notify('draw', { prop: 'open', value: { data: data } });
21287
21308
  };
21288
21309
  /**
@@ -22312,7 +22333,10 @@ var ImageEditor = /** @__PURE__ @class */ (function (_super) {
22312
22333
  this.notify('toolbar', { prop: 'destroy-top-toolbar', onPropertyChange: false });
22313
22334
  this.notify('toolbar', { prop: 'create-toolbar', onPropertyChange: false });
22314
22335
  this.notify('toolbar', { prop: 'create-contextual-toolbar', onPropertyChange: false });
22315
- document.getElementById(this.element.id + '_dropArea').style.display = 'block';
22336
+ var dropArea = document.getElementById(this.element.id + '_dropArea');
22337
+ if (dropArea) {
22338
+ dropArea.style.display = 'block';
22339
+ }
22316
22340
  };
22317
22341
  // Toolbar related codes
22318
22342
  ImageEditor.prototype.applyShapes = function () {