@syncfusion/ej2-image-editor 27.2.5 → 28.1.33

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 (95) hide show
  1. package/README.md +2 -2
  2. package/dist/ej2-image-editor.umd.min.js +3 -3
  3. package/dist/ej2-image-editor.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-image-editor.es2015.js +377 -52
  5. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-image-editor.es5.js +385 -52
  7. package/dist/es6/ej2-image-editor.es5.js.map +1 -1
  8. package/dist/global/ej2-image-editor.min.js +3 -3
  9. package/dist/global/ej2-image-editor.min.js.map +1 -1
  10. package/dist/global/index.d.ts +2 -2
  11. package/package.json +13 -13
  12. package/src/image-editor/action/draw.d.ts +4 -0
  13. package/src/image-editor/action/draw.js +97 -11
  14. package/src/image-editor/action/export.js +1 -1
  15. package/src/image-editor/action/shape.d.ts +1 -1
  16. package/src/image-editor/action/shape.js +22 -15
  17. package/src/image-editor/action/transform.js +1 -0
  18. package/src/image-editor/base/enum.d.ts +8 -2
  19. package/src/image-editor/base/enum.js +6 -0
  20. package/src/image-editor/base/image-editor-model.d.ts +51 -0
  21. package/src/image-editor/base/image-editor.d.ts +79 -2
  22. package/src/image-editor/base/image-editor.js +223 -12
  23. package/src/image-editor/renderer/toolbar.js +35 -12
  24. package/styles/bds-lite.css +863 -0
  25. package/styles/bds-lite.scss +13 -0
  26. package/styles/bds.css +969 -0
  27. package/styles/bds.scss +14 -0
  28. package/styles/bootstrap-dark-lite.css +5 -3
  29. package/styles/bootstrap-dark.css +5 -3
  30. package/styles/bootstrap-lite.css +5 -3
  31. package/styles/bootstrap.css +5 -3
  32. package/styles/bootstrap4-lite.css +5 -3
  33. package/styles/bootstrap4.css +5 -3
  34. package/styles/bootstrap5-dark-lite.css +5 -3
  35. package/styles/bootstrap5-dark.css +5 -3
  36. package/styles/bootstrap5-lite.css +5 -3
  37. package/styles/bootstrap5.3-lite.css +5 -3
  38. package/styles/bootstrap5.3.css +5 -3
  39. package/styles/bootstrap5.css +5 -3
  40. package/styles/fabric-dark-lite.css +5 -3
  41. package/styles/fabric-dark.css +5 -3
  42. package/styles/fabric-lite.css +5 -3
  43. package/styles/fabric.css +5 -3
  44. package/styles/fluent-dark-lite.css +5 -3
  45. package/styles/fluent-dark.css +5 -3
  46. package/styles/fluent-lite.css +5 -3
  47. package/styles/fluent.css +5 -3
  48. package/styles/fluent2-lite.css +5 -3
  49. package/styles/fluent2.css +5 -3
  50. package/styles/highcontrast-light-lite.css +5 -3
  51. package/styles/highcontrast-light.css +5 -3
  52. package/styles/highcontrast-lite.css +5 -3
  53. package/styles/highcontrast.css +5 -3
  54. package/styles/image-editor/_layout.scss +13 -3
  55. package/styles/image-editor/_tailwind3-definition.scss +29 -0
  56. package/styles/image-editor/bds.css +969 -0
  57. package/styles/image-editor/bds.scss +14 -0
  58. package/styles/image-editor/bootstrap-dark.css +5 -3
  59. package/styles/image-editor/bootstrap.css +5 -3
  60. package/styles/image-editor/bootstrap4.css +5 -3
  61. package/styles/image-editor/bootstrap5-dark.css +5 -3
  62. package/styles/image-editor/bootstrap5.3.css +5 -3
  63. package/styles/image-editor/bootstrap5.css +5 -3
  64. package/styles/image-editor/fabric-dark.css +5 -3
  65. package/styles/image-editor/fabric.css +5 -3
  66. package/styles/image-editor/fluent-dark.css +5 -3
  67. package/styles/image-editor/fluent.css +5 -3
  68. package/styles/image-editor/fluent2.css +5 -3
  69. package/styles/image-editor/highcontrast-light.css +5 -3
  70. package/styles/image-editor/highcontrast.css +5 -3
  71. package/styles/image-editor/icons/_tailwind3.scss +259 -0
  72. package/styles/image-editor/material-dark.css +5 -3
  73. package/styles/image-editor/material.css +5 -3
  74. package/styles/image-editor/material3-dark.css +5 -3
  75. package/styles/image-editor/material3.css +5 -3
  76. package/styles/image-editor/tailwind-dark.css +5 -3
  77. package/styles/image-editor/tailwind.css +5 -3
  78. package/styles/image-editor/tailwind3.css +860 -0
  79. package/styles/image-editor/tailwind3.scss +14 -0
  80. package/styles/material-dark-lite.css +5 -3
  81. package/styles/material-dark.css +5 -3
  82. package/styles/material-lite.css +5 -3
  83. package/styles/material.css +5 -3
  84. package/styles/material3-dark-lite.css +5 -3
  85. package/styles/material3-dark.css +5 -3
  86. package/styles/material3-lite.css +5 -3
  87. package/styles/material3.css +5 -3
  88. package/styles/tailwind-dark-lite.css +5 -3
  89. package/styles/tailwind-dark.css +5 -3
  90. package/styles/tailwind-lite.css +5 -3
  91. package/styles/tailwind.css +5 -3
  92. package/styles/tailwind3-lite.css +755 -0
  93. package/styles/tailwind3-lite.scss +13 -0
  94. package/styles/tailwind3.css +860 -0
  95. package/styles/tailwind3.scss +14 -0
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 27.2.5
4
- * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
3
+ * version : 28.1.33
4
+ * Copyright Syncfusion Inc. 2001 - 2024. 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
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-image-editor@*",
3
- "_id": "@syncfusion/ej2-image-editor@27.2.3",
3
+ "_id": "@syncfusion/ej2-image-editor@27.1.50",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-vakrP1C7mO3m0xWdmuSB+dDqk3tdgsJLXwvkkBx8kkST4zLm4BlfEs35biPq7QQAGapcHg8mlY5zE4GhJAlTtg==",
5
+ "_integrity": "sha512-x622GmMcwomW7xoMMGdKgFdB1aohctBixqEe8Z3X8LB3IbfFNoLR8pnz8tUrucjlDRA4p/cfsudWrnzXBfMiMg==",
6
6
  "_location": "/@syncfusion/ej2-image-editor",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,22 +23,22 @@
23
23
  "/@syncfusion/ej2-react-image-editor",
24
24
  "/@syncfusion/ej2-vue-image-editor"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-27.2.3.tgz",
27
- "_shasum": "e8a23ddd9e7615dfd1bac7137a0af8fe68078762",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-image-editor/-/ej2-image-editor-27.1.50.tgz",
27
+ "_shasum": "ed81a3b2eaa472e18ce7b776307ce73d73332a94",
28
28
  "_spec": "@syncfusion/ej2-image-editor@*",
29
- "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
29
+ "_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
30
30
  "author": {
31
31
  "name": "Syncfusion Inc."
32
32
  },
33
33
  "bundleDependencies": false,
34
34
  "dependencies": {
35
- "@syncfusion/ej2-base": "~27.2.5",
36
- "@syncfusion/ej2-buttons": "~27.2.4",
37
- "@syncfusion/ej2-dropdowns": "~27.2.5",
38
- "@syncfusion/ej2-inputs": "~27.2.4",
39
- "@syncfusion/ej2-navigations": "~27.2.5",
40
- "@syncfusion/ej2-popups": "~27.2.2",
41
- "@syncfusion/ej2-splitbuttons": "~27.2.2"
35
+ "@syncfusion/ej2-base": "~28.1.33",
36
+ "@syncfusion/ej2-buttons": "~28.1.33",
37
+ "@syncfusion/ej2-dropdowns": "~28.1.33",
38
+ "@syncfusion/ej2-inputs": "~28.1.33",
39
+ "@syncfusion/ej2-navigations": "~28.1.33",
40
+ "@syncfusion/ej2-popups": "~28.1.33",
41
+ "@syncfusion/ej2-splitbuttons": "~28.1.33"
42
42
  },
43
43
  "deprecated": false,
44
44
  "description": "Essential JS 2 ImageEditor",
@@ -68,7 +68,7 @@
68
68
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
69
69
  },
70
70
  "typings": "index.d.ts",
71
- "version": "27.2.5",
71
+ "version": "28.1.33",
72
72
  "sideEffects": false,
73
73
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
74
74
  }
@@ -55,6 +55,7 @@ export declare class Draw {
55
55
  private imageBackgroundColor;
56
56
  private tempStrokeWidth;
57
57
  private allowRedactStraighten;
58
+ private isNullExtension;
58
59
  constructor(parent: ImageEditor);
59
60
  destroy(): void;
60
61
  private addEventListener;
@@ -146,6 +147,9 @@ export declare class Draw {
146
147
  private applyDialogOption;
147
148
  private showDialogPopup;
148
149
  private restoreOldImage;
150
+ private handleFileSize;
151
+ private openImageData;
152
+ private getImageSize;
149
153
  private open;
150
154
  private getInitialLoaded;
151
155
  private getFileExtensionFromURL;
@@ -73,6 +73,7 @@ var Draw = /** @class */ (function () {
73
73
  this.tempPointColl = {};
74
74
  this.imageBackgroundColor = '';
75
75
  this.allowRedactStraighten = true;
76
+ this.isNullExtension = true;
76
77
  this.parent = parent;
77
78
  this.addEventListener();
78
79
  }
@@ -350,6 +351,9 @@ var Draw = /** @class */ (function () {
350
351
  case 'setTempStrokeWidth':
351
352
  this.tempStrokeWidth = args.value['strokeWidth'];
352
353
  break;
354
+ case 'setNullExtension':
355
+ this.isNullExtension = args.value['extension'];
356
+ break;
353
357
  }
354
358
  };
355
359
  Draw.prototype.getModuleName = function () {
@@ -374,6 +378,7 @@ var Draw = /** @class */ (function () {
374
378
  this.isInitialLoading = this.isErrorImage = this.isNewPath = this.isResizeSelect = false;
375
379
  this.isShapeTextInserted = false;
376
380
  this.isImageApply = false;
381
+ this.isNullExtension = true;
377
382
  this.initZoomValue = null;
378
383
  this.tempFilter = '';
379
384
  this.origDim = { width: 0, height: 0 };
@@ -1555,8 +1560,8 @@ var Draw = /** @class */ (function () {
1555
1560
  var angle = Math.atan2(this.dy, this.dx);
1556
1561
  var isStartArrowSolid = actObj.start === 'arrowSolid';
1557
1562
  var isEndArrowSolid = actObj.end === 'arrowSolid';
1558
- var isStartCircleOrSquare = actObj.start === 'circle' || actObj.start === 'square';
1559
1563
  var isEndCircleOrSquare = actObj.end === 'circle' || actObj.end === 'square';
1564
+ var isStartCircleOrSquare = actObj.start === 'circle' || actObj.start === 'square';
1560
1565
  if ((start && (isStartArrowSolid && actObj.end === 'none') || (isStartArrowSolid && !isEndCircleOrSquare && !isStartCircleOrSquare)) ||
1561
1566
  (!start && (isEndArrowSolid && actObj.start === 'none' || !isStartArrowSolid && !isEndCircleOrSquare && !isStartCircleOrSquare))) {
1562
1567
  this.shapeLine(canvasDraw, startX, startY, endX, endY);
@@ -3890,7 +3895,7 @@ var Draw = /** @class */ (function () {
3890
3895
  }
3891
3896
  var obj = { defToolbarItems: null };
3892
3897
  parent.notify('toolbar', { prop: 'getDefToolbarItems', value: { obj: obj } });
3893
- if (obj['defToolbarItems'].length === 0 &&
3898
+ if (obj['defToolbarItems'] && obj['defToolbarItems'].length === 0 &&
3894
3899
  (isNullOrUndefined(document.getElementById(id + '_toolbar'))) &&
3895
3900
  parent.element.querySelector('#' + id + '_toolbarArea')) {
3896
3901
  var height = parent.element.querySelector('#' + id + '_toolbarArea').clientHeight;
@@ -3920,7 +3925,7 @@ var Draw = /** @class */ (function () {
3920
3925
  this.fileType = 'Jpeg';
3921
3926
  fileType = 'jpeg';
3922
3927
  }
3923
- if (fileType !== 'jpeg' && fileType !== 'png' && fileType !== 'svg') {
3928
+ if (fileType !== 'jpeg' && fileType !== 'png' && fileType !== 'svg' && fileType !== 'webp') {
3924
3929
  this.fileType = null;
3925
3930
  }
3926
3931
  }
@@ -4025,19 +4030,96 @@ var Draw = /** @class */ (function () {
4025
4030
  dialog.appendTo('#' + parent.element.id + '_dialog');
4026
4031
  };
4027
4032
  Draw.prototype.restoreOldImage = function () {
4028
- if (this.parent.isImageLoaded) {
4029
- this.reset();
4030
- this.openNewImage();
4033
+ var _this = this;
4034
+ var parent = this.parent;
4035
+ var dropArea = document.getElementById(this.parent.element.id + '_dropArea');
4036
+ var extension = parent.getExtensionArray();
4037
+ var openURLType = typeof this.openURL;
4038
+ if (openURLType !== 'string') {
4039
+ this.openImageData(dropArea);
4040
+ return;
4041
+ }
4042
+ var fileType = this.getFileExtensionFromURL(this.openURL).toLowerCase();
4043
+ if (fileType) {
4044
+ fileType = (fileType === 'jpg' || fileType === 'jpeg') ? 'jpeg' : fileType;
4045
+ }
4046
+ var isAllowedFileType = (fileType ? (extension.indexOf(fileType) > -1 ||
4047
+ (fileType === 'jpeg' && (parent.uploadSettings.allowedExtensions.indexOf('jpg') > -1 ||
4048
+ parent.uploadSettings.allowedExtensions.indexOf('jpeg') > -1))) : false) || this.isNullExtension;
4049
+ if (this.openURL.indexOf('data:image/') > -1 && this.openURL.indexOf('base64') > -1) {
4050
+ this.openImageData(dropArea, true);
4051
+ }
4052
+ else if (parent.uploadSettings.minFileSize || parent.uploadSettings.maxFileSize) {
4053
+ this.getImageSizeFromURL(this.openURL.toString(), function (imageSizeMB) {
4054
+ var isInvalidSize = (parent.uploadSettings.minFileSize && imageSizeMB < parent.uploadSettings.minFileSize) ||
4055
+ (parent.uploadSettings.maxFileSize && imageSizeMB > parent.uploadSettings.maxFileSize);
4056
+ _this.handleFileSize(!isAllowedFileType || isInvalidSize, dropArea, !isAllowedFileType);
4057
+ });
4058
+ }
4059
+ else {
4060
+ this.handleFileSize(!isAllowedFileType, dropArea, !isAllowedFileType);
4061
+ }
4062
+ };
4063
+ Draw.prototype.handleFileSize = function (isError, dropArea, fileTypeError) {
4064
+ var parent = this.parent;
4065
+ if (isError) {
4066
+ this.errorLoading();
4067
+ parent.showDialogPopup('unsupported', fileTypeError);
4068
+ if (dropArea && !parent.isImageLoaded) {
4069
+ dropArea.style.display = 'block';
4070
+ }
4031
4071
  }
4032
4072
  else {
4073
+ if (dropArea) {
4074
+ dropArea.style.display = 'none';
4075
+ }
4076
+ if (this.parent.isImageLoaded) {
4077
+ this.reset();
4078
+ }
4033
4079
  this.openNewImage();
4034
4080
  }
4035
4081
  };
4036
- Draw.prototype.open = function (data) {
4037
- var dropArea = document.getElementById(this.parent.element.id + '_dropArea');
4038
- if (dropArea) {
4039
- dropArea.style.display = 'none';
4082
+ Draw.prototype.openImageData = function (dropArea, isBase64) {
4083
+ var parent = this.parent;
4084
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
4085
+ var proxy = this;
4086
+ var canvas = parent.createElement('canvas');
4087
+ var ctx = canvas.getContext('2d');
4088
+ if (!parent.uploadSettings.minFileSize && !parent.uploadSettings.maxFileSize) {
4089
+ this.handleFileSize(false, dropArea, false);
4090
+ return;
4091
+ }
4092
+ if (isBase64) {
4093
+ var img_1 = new Image();
4094
+ img_1.src = this.openURL;
4095
+ img_1.onload = function () {
4096
+ ctx.canvas.width = img_1.width;
4097
+ ctx.canvas.height = img_1.height;
4098
+ ctx.drawImage(img_1, 0, 0);
4099
+ proxy.getImageSize(canvas, dropArea);
4100
+ };
4040
4101
  }
4102
+ else {
4103
+ canvas.width = this.openURL.width;
4104
+ canvas.height = this.openURL.height;
4105
+ ctx.putImageData(this.openURL, 0, 0);
4106
+ this.getImageSize(canvas, dropArea);
4107
+ }
4108
+ };
4109
+ Draw.prototype.getImageSize = function (canvas, dropArea) {
4110
+ var parent = this.parent;
4111
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
4112
+ canvas.toBlob((function (blob) {
4113
+ if ((parent.uploadSettings.minFileSize && blob.size < parent.uploadSettings.minFileSize) ||
4114
+ (parent.uploadSettings.maxFileSize && blob.size > parent.uploadSettings.maxFileSize)) {
4115
+ this.handleFileSize(true, dropArea, false);
4116
+ }
4117
+ else {
4118
+ this.handleFileSize(false, dropArea, false);
4119
+ }
4120
+ }).bind(this), 'image/jpeg', 1);
4121
+ };
4122
+ Draw.prototype.open = function (data) {
4041
4123
  if (!this.parent.disabled) {
4042
4124
  this.openURL = data;
4043
4125
  this.restoreOldImage();
@@ -4080,7 +4162,11 @@ var Draw = /** @class */ (function () {
4080
4162
  var fileExtensionArray = fileData.name.split('.');
4081
4163
  fileExtension = fileExtensionArray[fileExtensionArray.length - 1].toLowerCase();
4082
4164
  }
4083
- if (fileExtension && ['jpg', 'jpeg', 'png', 'svg'].indexOf(fileExtension) === -1) {
4165
+ var extension = parent.getExtensionArray();
4166
+ var isJPG = ((fileExtension === 'jpg' || fileExtension === 'jpeg') && (parent.uploadSettings.allowedExtensions.indexOf('jpg') > -1 || parent.uploadSettings.allowedExtensions.indexOf('jpeg') > -1));
4167
+ if ((fileExtension && (extension.indexOf(fileExtension) === -1 && !isJPG)) ||
4168
+ ((parent.uploadSettings.minFileSize && fileData.size < parent.uploadSettings.minFileSize) ||
4169
+ (parent.uploadSettings.maxFileSize && fileData.size > parent.uploadSettings.maxFileSize))) {
4084
4170
  this.errorLoading();
4085
4171
  return;
4086
4172
  }
@@ -135,7 +135,7 @@ var Export = /** @class */ (function () {
135
135
  this.imageQuality = imgQuality ? imgQuality : null;
136
136
  }
137
137
  var tempCanvas = this.exportToCanvas();
138
- var imagetype = type !== 'jpeg' ? 'image/png' : 'image/jpeg';
138
+ var imagetype = (type === 'jpeg' ? 'image/jpeg' : (type === 'webp' ? 'image/webp' : 'image/png'));
139
139
  // eslint-disable-next-line @typescript-eslint/tslint/config
140
140
  tempCanvas.toBlob(function (blob) {
141
141
  var blobUrl = URL.createObjectURL(blob);
@@ -34,8 +34,8 @@ export declare class Shape {
34
34
  private setPointCollForLineAndArrow;
35
35
  private prevObjColl;
36
36
  private drawShapeText;
37
- private setTransformColl;
38
37
  private drawShapeImageEvent;
38
+ private setTransformColl;
39
39
  private drawShapeTextEvent;
40
40
  private initializeTextShape;
41
41
  private drawImage;
@@ -641,20 +641,6 @@ var Shape = /** @class */ (function () {
641
641
  parent.isPublicMethod = false;
642
642
  }
643
643
  };
644
- Shape.prototype.setTransformColl = function (transformCollection) {
645
- var parent = this.parent;
646
- parent.activeObj.rotateFlipColl = [];
647
- if (transformCollection) {
648
- for (var i = 0; i < transformCollection.length; i++) {
649
- if (transformCollection[i].degree) {
650
- parent.activeObj.rotateFlipColl.push(transformCollection[i].degree);
651
- }
652
- else {
653
- parent.activeObj.rotateFlipColl.push(transformCollection[i].flip.toLowerCase());
654
- }
655
- }
656
- }
657
- };
658
644
  Shape.prototype.drawShapeImageEvent = function (shapeChangingArgs, isSelect) {
659
645
  var parent = this.parent;
660
646
  this.updateShapeChangeEventArgs(shapeChangingArgs.currentShapeSettings, shapeChangingArgs.allowShapeOverflow);
@@ -678,6 +664,20 @@ var Shape = /** @class */ (function () {
678
664
  }
679
665
  parent.notify('selection', { prop: 'isShapeInserted', onPropertyChange: false, value: { bool: true } });
680
666
  };
667
+ Shape.prototype.setTransformColl = function (transformCollection) {
668
+ var parent = this.parent;
669
+ parent.activeObj.rotateFlipColl = [];
670
+ if (transformCollection) {
671
+ for (var i = 0; i < transformCollection.length; i++) {
672
+ if (transformCollection[i].degree) {
673
+ parent.activeObj.rotateFlipColl.push(transformCollection[i].degree);
674
+ }
675
+ else {
676
+ parent.activeObj.rotateFlipColl.push(transformCollection[i].flip.toLowerCase());
677
+ }
678
+ }
679
+ }
680
+ };
681
681
  Shape.prototype.drawShapeTextEvent = function (shapeChangingArgs) {
682
682
  var parent = this.parent;
683
683
  this.updateShapeChangeEventArgs(shapeChangingArgs.currentShapeSettings, shapeChangingArgs.allowShapeOverflow);
@@ -1689,6 +1689,13 @@ var Shape = /** @class */ (function () {
1689
1689
  };
1690
1690
  Shape.prototype.renderTextArea = function (x, y, actObj) {
1691
1691
  var parent = this.parent;
1692
+ var shapeObj = { shapeSettingsObj: {} };
1693
+ parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: shapeObj } });
1694
+ var shapeSettings = shapeObj['shapeSettingsObj'];
1695
+ var shapeChangingArgs = { cancel: false, action: 'text-edit', previousShapeSettings: shapeSettings,
1696
+ currentShapeSettings: shapeSettings };
1697
+ parent.trigger('shapeChanging', shapeChangingArgs);
1698
+ this.updateShapeChangeEventArgs(shapeChangingArgs.currentShapeSettings, shapeChangingArgs.allowShapeOverflow);
1692
1699
  var degree = this.getRotDegOfShape(parent.activeObj);
1693
1700
  this.transformTextArea();
1694
1701
  parent.notify('toolbar', { prop: 'destroy-qa-toolbar', onPropertyChange: false });
@@ -2287,7 +2294,7 @@ var Shape = /** @class */ (function () {
2287
2294
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
2288
2295
  var fileData = filesData;
2289
2296
  var fileExtension = fileData.name && fileData.name.split('.').pop().toLowerCase();
2290
- if (fileExtension && ['jpg', 'jpeg', 'png', 'svg'].indexOf(fileExtension) === -1) {
2297
+ if (fileExtension && ['jpg', 'jpeg', 'png', 'svg', 'webp'].indexOf(fileExtension) === -1) {
2291
2298
  this.refreshActiveObj();
2292
2299
  return;
2293
2300
  }
@@ -1561,6 +1561,7 @@ var Transform = /** @class */ (function () {
1561
1561
  parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
1562
1562
  }
1563
1563
  }
1564
+ parent.updateDropInfoContent(parent.element.querySelector('.e-ie-drop-info'));
1564
1565
  var tempFilter = this.lowerContext.filter;
1565
1566
  var canvasWrapper = parent.element.querySelector('#' + parent.element.id + '_canvasWrapper');
1566
1567
  if (canvasWrapper) {
@@ -9,7 +9,9 @@ export declare enum FileType {
9
9
  /** The JPEG file type. */
10
10
  Jpeg = "Jpeg",
11
11
  /** The SVG file type. */
12
- Svg = "Svg"
12
+ Svg = "Svg",
13
+ /** The WebP file type. */
14
+ WebP = "WebP"
13
15
  }
14
16
  /**
15
17
  * An enumeration representing the direction of an image editor operation.
@@ -95,7 +97,11 @@ export declare enum Theme {
95
97
  /** The Fluent 2.0 UI theme. */
96
98
  Fluent2 = "Fluent2",
97
99
  /** The dark variant of the Fluent 2.0 UI theme. */
98
- Fluent2Dark = "Fluent2Dark"
100
+ Fluent2Dark = "Fluent2Dark",
101
+ /** The Tailwind 3 UI theme. */
102
+ Tailwind3 = "Tailwind3",
103
+ /** The dark variant of the Tailwind 3 UI theme. */
104
+ Tailwind3Dark = "Tailwind3Dark"
99
105
  }
100
106
  /**
101
107
  * An enum representing the available toolbar commands in the image editor.
@@ -11,6 +11,8 @@ export var FileType;
11
11
  FileType["Jpeg"] = "Jpeg";
12
12
  /** The SVG file type. */
13
13
  FileType["Svg"] = "Svg";
14
+ /** The WebP file type. */
15
+ FileType["WebP"] = "WebP";
14
16
  })(FileType || (FileType = {}));
15
17
  /**
16
18
  * An enumeration representing the direction of an image editor operation.
@@ -101,6 +103,10 @@ export var Theme;
101
103
  Theme["Fluent2"] = "Fluent2";
102
104
  /** The dark variant of the Fluent 2.0 UI theme. */
103
105
  Theme["Fluent2Dark"] = "Fluent2Dark";
106
+ /** The Tailwind 3 UI theme. */
107
+ Theme["Tailwind3"] = "Tailwind3";
108
+ /** The dark variant of the Tailwind 3 UI theme. */
109
+ Theme["Tailwind3Dark"] = "Tailwind3Dark";
104
110
  })(Theme || (Theme = {}));
105
111
  /**
106
112
  * An enum representing the available toolbar commands in the image editor.
@@ -1,6 +1,44 @@
1
1
  import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, ModuleDeclaration, extend } from '@syncfusion/ej2-base';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
+ /**
5
+ * Interface for a class UploadSettings
6
+ */
7
+ export interface UploadSettingsModel {
8
+
9
+ /**
10
+ * Specifies the allowed file extensions for uploaded images.
11
+ *
12
+ * @type {string}
13
+ * @default null
14
+ * @remarks
15
+ * Example: '.jpg, .png, .gif'
16
+ * This property restricts the types of image files that can be uploaded based on their file extensions. Only files with the specified extensions will be allowed.
17
+ */
18
+ allowedExtensions?: string;
19
+
20
+ /**
21
+ * Specifies the minimum size (in bytes) for the uploaded image.
22
+ *
23
+ * @type {number}
24
+ * @default null
25
+ * @remarks
26
+ * The value represents the file size in bytes. Any file smaller than this size will be rejected during the upload process. Use this property to ensure that images meet a certain quality or resolution standard.
27
+ */
28
+ minFileSize?: number;
29
+
30
+ /**
31
+ * Specifies the maximum size (in bytes) for the uploaded image.
32
+ *
33
+ * @type {number}
34
+ * @default null
35
+ * @remarks
36
+ * The value represents the file size in bytes. Any file larger than this size will be rejected during the upload process. This property helps prevent the upload of excessively large files that may impact performance.
37
+ */
38
+ maxFileSize?: number;
39
+
40
+ }
41
+
4
42
  /**
5
43
  * Interface for a class FinetuneSettings
6
44
  */
@@ -489,6 +527,19 @@ export interface ImageEditorModel extends ComponentModel{
489
527
  */
490
528
  fontFamily?: FontFamilyModel;
491
529
 
530
+ /**
531
+ * Represents the settings for configuring image uploads.
532
+ *
533
+ * This object allows you to specify restrictions on the types and sizes of images that can be uploaded, ensuring that only valid files are accepted according to the defined criteria.
534
+ *
535
+ * The following options are available in `uploadSettings`.
536
+ * - allowedExtensions: Specifies the allowed file extensions for uploaded images. The default value is null.
537
+ * - minFileSize: Specifies the minimum size (in bytes) for the uploaded image. The default value is null.
538
+ * - maxFileSize: Specifies the maximum size (in bytes) for the uploaded image. The default value is null.
539
+ *
540
+ */
541
+ uploadSettings?: UploadSettingsModel;
542
+
492
543
  /**
493
544
  * Event callback that is raised before an image is saved.
494
545
  *
@@ -2,7 +2,7 @@ import { Component, INotifyPropertyChanged, ModuleDeclaration } from '@syncfusio
2
2
  import { EmitType } from '@syncfusion/ej2-base';
3
3
  import { ItemModel, ClickEventArgs } from '@syncfusion/ej2-navigations';
4
4
  import { ChildProperty } from '@syncfusion/ej2-base';
5
- import { ImageEditorModel, FinetuneSettingsModel, ZoomSettingsModel, SelectionSettingsModel, FontFamilyModel } from './image-editor-model';
5
+ import { ImageEditorModel, FinetuneSettingsModel, ZoomSettingsModel, SelectionSettingsModel, FontFamilyModel, UploadSettingsModel } from './image-editor-model';
6
6
  import { SelectionChangeEventArgs, Transition, ArrowheadType, ResizeEventArgs, FrameType, FrameLineStyle, FrameChangeEventArgs, ShapeType, ImageSettings, RedactType, TransformationCollection } from './../index';
7
7
  import { ZoomEventArgs, PanEventArgs, CropEventArgs, RotateEventArgs, FlipEventArgs, ShapeChangeEventArgs } from './../index';
8
8
  import { ToolbarEventArgs, OpenEventArgs, SaveEventArgs, BeforeSaveEventArgs, Point, ShapeSettings, ImageFilterEventArgs, RedactSettings } from './../index';
@@ -10,6 +10,39 @@ import { FinetuneEventArgs, QuickAccessToolbarEventArgs, CurrentObject, ImageDim
10
10
  import { Interaction, SelectionPoint, ImageFinetuneValue, Dimension, ActivePoint, ImageEditorClickEventArgs, FrameValue } from './../index';
11
11
  import { Direction, ZoomTrigger, Theme, ImageEditorCommand, ImageFilterOption, ImageFinetuneOption, EditCompleteEventArgs } from './../index';
12
12
  import { ItemModel as DropDownButtonItemModel } from '@syncfusion/ej2-splitbuttons';
13
+ /**
14
+ * Defines the settings for restricting uploaded images.
15
+ */
16
+ export declare class UploadSettings extends ChildProperty<UploadSettings> {
17
+ /**
18
+ * Specifies the allowed file extensions for uploaded images.
19
+ *
20
+ * @type {string}
21
+ * @default null
22
+ * @remarks
23
+ * Example: '.jpg, .png, .gif'
24
+ * This property restricts the types of image files that can be uploaded based on their file extensions. Only files with the specified extensions will be allowed.
25
+ */
26
+ allowedExtensions: string;
27
+ /**
28
+ * Specifies the minimum size (in bytes) for the uploaded image.
29
+ *
30
+ * @type {number}
31
+ * @default null
32
+ * @remarks
33
+ * The value represents the file size in bytes. Any file smaller than this size will be rejected during the upload process. Use this property to ensure that images meet a certain quality or resolution standard.
34
+ */
35
+ minFileSize: number;
36
+ /**
37
+ * Specifies the maximum size (in bytes) for the uploaded image.
38
+ *
39
+ * @type {number}
40
+ * @default null
41
+ * @remarks
42
+ * The value represents the file size in bytes. Any file larger than this size will be rejected during the upload process. This property helps prevent the upload of excessively large files that may impact performance.
43
+ */
44
+ maxFileSize: number;
45
+ }
13
46
  /**
14
47
  * This interface is used to specify settings for finetuning operations on images, including brightness, contrast, hue, saturation, exposure, opacity, and blur. It includes properties for setting minimum and maximum values for each of these options, as well as a default value.
15
48
  */
@@ -660,6 +693,18 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
660
693
  * Predefine the font families that populate in font family dropdown list from the toolbar.
661
694
  */
662
695
  fontFamily: FontFamilyModel;
696
+ /**
697
+ * Represents the settings for configuring image uploads.
698
+ *
699
+ * This object allows you to specify restrictions on the types and sizes of images that can be uploaded, ensuring that only valid files are accepted according to the defined criteria.
700
+ *
701
+ * The following options are available in `uploadSettings`.
702
+ * - allowedExtensions: Specifies the allowed file extensions for uploaded images. The default value is null.
703
+ * - minFileSize: Specifies the minimum size (in bytes) for the uploaded image. The default value is null.
704
+ * - maxFileSize: Specifies the maximum size (in bytes) for the uploaded image. The default value is null.
705
+ *
706
+ */
707
+ uploadSettings: UploadSettingsModel;
663
708
  /**
664
709
  * Event callback that is raised before an image is saved.
665
710
  *
@@ -895,10 +940,34 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
895
940
  * Show dialog popup for unsupported files.
896
941
  *
897
942
  * @param { string } type - Specifies the type of error.
943
+ * @param { boolean } fileTypeError - Specifies the error is due to file type.
898
944
  * @hidden
899
945
  * @returns {void}.
900
946
  */
901
- showDialogPopup(type?: string): void;
947
+ showDialogPopup(type?: string, fileTypeError?: boolean): void;
948
+ /**
949
+ * Returns bytes in string format.
950
+ *
951
+ * @param { number } bytes - Specifies the bytes.
952
+ *
953
+ * @hidden
954
+ * @returns {string}.
955
+ */
956
+ formatSizeUnits(bytes: number): string;
957
+ /**
958
+ * Returns allowed file type extensions in string[].
959
+ *
960
+ * @hidden
961
+ * @returns {string[]}.
962
+ */
963
+ getExtensionArray(): string[];
964
+ /**
965
+ * Returns allowed file type extensions in string.
966
+ *
967
+ * @hidden
968
+ * @returns {string}.
969
+ */
970
+ getExtensionString(): string;
902
971
  /**
903
972
  *
904
973
  * This Method will add events to component (element, event, method, current reference)
@@ -1545,6 +1614,14 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1545
1614
  * A font size collections.
1546
1615
  */
1547
1616
  getFontSizes(): DropDownButtonItemModel[];
1617
+ /**
1618
+ * Updates drop area content dynamically.
1619
+ *
1620
+ * @param { HTMLElement } dropInfoElement - Specifies the drop area element.
1621
+ * @hidden
1622
+ * @returns {void}.
1623
+ */
1624
+ updateDropInfoContent(dropInfoElement: HTMLElement): void;
1548
1625
  /**
1549
1626
  * Handles the OK button operation
1550
1627
  *