@syncfusion/ej2-image-editor 21.2.6 → 21.2.10

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 : 21.2.6
3
+ * version : 21.2.10
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-image-editor@*",
3
- "_id": "@syncfusion/ej2-image-editor@21.2.5",
3
+ "_id": "@syncfusion/ej2-image-editor@21.2.6",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-nGKuhYWWdTOpjm8vrsaXNAX04hkk31VHqIB27agiLoDNrjLqWL/U13INHoTvi5WwEXkBLtECaouTalB/lnao3A==",
5
+ "_integrity": "sha512-3TNFotEXJWfF7aUHzI7X78bwG5gd4tKDZzd4alwDasNlYNuETzRHzjfPTkGdtj0NU6FzkcgxbJCVKJR4r36OXw==",
6
6
  "_location": "/@syncfusion/ej2-image-editor",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-image-editor",
24
24
  "/@syncfusion/ej2-vue-image-editor"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-21.2.5.tgz",
27
- "_shasum": "aa61f09aca88f67563b8907f39f304993687ba9a",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-21.2.6.tgz",
27
+ "_shasum": "da47fbe9ff898d3a7d63c0e9061675697f1c9055",
28
28
  "_spec": "@syncfusion/ej2-image-editor@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
30
30
  "author": {
@@ -32,11 +32,11 @@
32
32
  },
33
33
  "bundleDependencies": false,
34
34
  "dependencies": {
35
- "@syncfusion/ej2-base": "~21.2.3",
36
- "@syncfusion/ej2-buttons": "~21.2.6",
37
- "@syncfusion/ej2-inputs": "~21.2.6",
38
- "@syncfusion/ej2-navigations": "~21.2.6",
39
- "@syncfusion/ej2-popups": "~21.2.4",
35
+ "@syncfusion/ej2-base": "~21.2.9",
36
+ "@syncfusion/ej2-buttons": "~21.2.10",
37
+ "@syncfusion/ej2-inputs": "~21.2.9",
38
+ "@syncfusion/ej2-navigations": "~21.2.9",
39
+ "@syncfusion/ej2-popups": "~21.2.10",
40
40
  "@syncfusion/ej2-splitbuttons": "~21.2.5"
41
41
  },
42
42
  "deprecated": false,
@@ -67,7 +67,7 @@
67
67
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
68
68
  },
69
69
  "typings": "index.d.ts",
70
- "version": "21.2.6",
70
+ "version": "21.2.10",
71
71
  "sideEffects": false,
72
72
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
73
73
  }
@@ -6259,7 +6259,9 @@ var ImageEditor = /** @class */ (function (_super) {
6259
6259
  if (this.disabled) {
6260
6260
  this.element.setAttribute('class', 'e-disabled');
6261
6261
  }
6262
- this.trigger('fileOpened', fileOpened);
6262
+ if (this.isImageLoaded && this.element.style.opacity !== '0.5') {
6263
+ this.trigger('fileOpened', fileOpened);
6264
+ }
6263
6265
  if (this.zoomSettings.zoomFactor !== 1 || !isNullOrUndefined(this.zoomSettings.zoomPoint)) {
6264
6266
  this.zoom(this.zoomSettings.zoomFactor, this.zoomSettings.zoomPoint);
6265
6267
  }
@@ -6504,10 +6506,33 @@ var ImageEditor = /** @class */ (function (_super) {
6504
6506
  };
6505
6507
  ImageEditor.prototype.fileSelect = function (inputElement, args) {
6506
6508
  if (!this.disabled) {
6507
- showSpinner(this.element);
6508
- this.element.style.opacity = '0.5';
6509
6509
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
6510
6510
  var filesData = args.target.files[0];
6511
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
6512
+ var fileData = filesData;
6513
+ if (!isNullOrUndefined(fileData.name.split('.')) &&
6514
+ !isNullOrUndefined(fileData.name.split('.')[1]) &&
6515
+ fileData.name.split('.')[1].toLowerCase() !== 'jpg' &&
6516
+ fileData.name.split('.')[1].toLowerCase() !== 'jpeg' &&
6517
+ fileData.name.split('.')[1].toLowerCase() !== 'png' &&
6518
+ fileData.name.split('.')[1].toLowerCase() !== 'svg') {
6519
+ return;
6520
+ }
6521
+ showSpinner(this.element);
6522
+ this.element.style.opacity = '0.5';
6523
+ if (!isNullOrUndefined(fileData.name.split('.')) &&
6524
+ !isNullOrUndefined(fileData.name.split('.')[1])) {
6525
+ var fileType = this.toPascalCase(fileData.name.split('.')[1]);
6526
+ if (fileType === 'JPG' || fileType === 'Jpg') {
6527
+ this.fileType = 'Jpeg';
6528
+ }
6529
+ else {
6530
+ this.fileType = fileType;
6531
+ }
6532
+ }
6533
+ else {
6534
+ this.fileType = null;
6535
+ }
6511
6536
  if (this.isImageLoaded) {
6512
6537
  this.isImageLoaded = false;
6513
6538
  this.reset();
@@ -8138,17 +8163,19 @@ var ImageEditor = /** @class */ (function (_super) {
8138
8163
  if (this.degree === 0 || this.degree === 180) {
8139
8164
  if (!isNullOrUndefined(this.activeObj.shape)) {
8140
8165
  this.setZoomDimension(-0.1, this.activeObj);
8141
- if (this.destLeft > this.activeObj.activePoint.startX || this.destTop > this.activeObj.activePoint.startY ||
8142
- this.destLeft + this.destWidth < this.activeObj.activePoint.endX || this.destTop + this.destHeight <
8143
- this.activeObj.activePoint.endY) {
8144
- zoomOut.classList.add('e-disabled');
8145
- zoomOut.parentElement.classList.add('e-overlay');
8146
- isDisabled = true;
8147
- }
8148
- else {
8149
- zoomOut.classList.remove('e-disabled');
8150
- zoomOut.parentElement.classList.remove('e-overlay');
8151
- isDisabled = false;
8166
+ if (!isNullOrUndefined(zoomOut)) {
8167
+ if (this.destLeft > this.activeObj.activePoint.startX || this.destTop > this.activeObj.activePoint.startY ||
8168
+ this.destLeft + this.destWidth < this.activeObj.activePoint.endX || this.destTop + this.destHeight <
8169
+ this.activeObj.activePoint.endY) {
8170
+ zoomOut.classList.add('e-disabled');
8171
+ zoomOut.parentElement.classList.add('e-overlay');
8172
+ isDisabled = true;
8173
+ }
8174
+ else {
8175
+ zoomOut.classList.remove('e-disabled');
8176
+ zoomOut.parentElement.classList.remove('e-overlay');
8177
+ isDisabled = false;
8178
+ }
8152
8179
  }
8153
8180
  }
8154
8181
  else {
@@ -13331,10 +13358,24 @@ var ImageEditor = /** @class */ (function (_super) {
13331
13358
  else {
13332
13359
  this.fileName = 'ImageEditor';
13333
13360
  }
13361
+ if (!isNullOrUndefined(data.split('.')) &&
13362
+ !isNullOrUndefined(data.split('.')[2])) {
13363
+ var fileType = this.toPascalCase(data.split('.')[2]);
13364
+ if (fileType === 'JPG' || fileType === 'Jpg') {
13365
+ this.fileType = 'Jpeg';
13366
+ }
13367
+ else {
13368
+ this.fileType = fileType;
13369
+ }
13370
+ }
13371
+ else {
13372
+ this.fileType = null;
13373
+ }
13334
13374
  this.imageOnLoad(data);
13335
13375
  }
13336
13376
  else {
13337
13377
  this.fileName = 'ImageEditor';
13378
+ this.fileType = null;
13338
13379
  this.lowerCanvas = document.querySelector('#' + this.element.id + '_lowerCanvas');
13339
13380
  this.upperCanvas = document.querySelector('#' + this.element.id + '_upperCanvas');
13340
13381
  this.lowerContext = this.lowerCanvas.getContext('2d');
@@ -13484,7 +13525,9 @@ var ImageEditor = /** @class */ (function (_super) {
13484
13525
  if (!isNullOrUndefined(document.getElementById(this.element.id + '_quickAccessToolbarArea'))) {
13485
13526
  document.getElementById(this.element.id + '_quickAccessToolbarArea').style.display = 'none';
13486
13527
  }
13528
+ this.isImageLoaded = false;
13487
13529
  this.updateCanvas();
13530
+ this.isImageLoaded = true;
13488
13531
  this.refreshDropDownBtn(false);
13489
13532
  this.enableDisableToolbarBtn();
13490
13533
  }