@syncfusion/ej2-image-editor 26.1.40 → 26.1.41

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 : 26.1.40
3
+ * version : 26.1.41
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. 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@26.1.38",
3
+ "_id": "@syncfusion/ej2-image-editor@26.1.40",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-LBGZGIcFpc8FnUEl2kJHr+/ye2QZphVy7q9pekYj+wdy87Fu+zf9TIV1ltUxxojuRxYZHJRrPYAvZ8DtL40NNg==",
5
+ "_integrity": "sha512-JkKZm0ZX+CT8SxX4R5rwflCIAkpN+SNRGGzqoaA0Ds/tZyeZ3sGWV4oRubOw7CYi1mvFhdc5d9324shHPz/bjA==",
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.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-26.1.38.tgz",
27
- "_shasum": "30a86889517ad9fffa74727f93f6f5c2d6c00ac8",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-26.1.40.tgz",
27
+ "_shasum": "3fbde6876ebd51369e500d656bbf616aeeb2bac7",
28
28
  "_spec": "@syncfusion/ej2-image-editor@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
30
30
  "author": {
@@ -34,10 +34,10 @@
34
34
  "dependencies": {
35
35
  "@syncfusion/ej2-base": "~26.1.37",
36
36
  "@syncfusion/ej2-buttons": "~26.1.40",
37
- "@syncfusion/ej2-dropdowns": "~26.1.40",
38
- "@syncfusion/ej2-inputs": "~26.1.40",
39
- "@syncfusion/ej2-navigations": "~26.1.40",
40
- "@syncfusion/ej2-popups": "~26.1.38",
37
+ "@syncfusion/ej2-dropdowns": "~26.1.41",
38
+ "@syncfusion/ej2-inputs": "~26.1.41",
39
+ "@syncfusion/ej2-navigations": "~26.1.41",
40
+ "@syncfusion/ej2-popups": "~26.1.41",
41
41
  "@syncfusion/ej2-splitbuttons": "~26.1.35"
42
42
  },
43
43
  "deprecated": false,
@@ -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": "26.1.40",
71
+ "version": "26.1.41",
72
72
  "sideEffects": false,
73
73
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
74
74
  }
@@ -235,7 +235,7 @@ var Draw = /** @class */ (function () {
235
235
  args.value['obj']['isNewPath'] = this.isNewPath;
236
236
  break;
237
237
  case 'getArrowDimension':
238
- args.value['obj']['arrowDimension'] = this.arrowDimension;
238
+ args.value['obj']['arrowDimension'] = extend({}, this.arrowDimension, {}, true);
239
239
  break;
240
240
  case 'setArrowDimension':
241
241
  this.arrowDimension = args.value['arrowDimension'];
@@ -3806,7 +3806,6 @@ var Draw = /** @class */ (function () {
3806
3806
  return [3 /*break*/, 3];
3807
3807
  case 2:
3808
3808
  ex_1 = _a.sent();
3809
- console.log(ex_1.message);
3810
3809
  return [3 /*break*/, 3];
3811
3810
  case 3: return [2 /*return*/];
3812
3811
  }
@@ -24,7 +24,7 @@ var Export = /** @class */ (function () {
24
24
  this.updatePvtVar();
25
25
  switch (args.prop) {
26
26
  case 'export':
27
- this.exportImg(args.value['type'], args.value['fileName']);
27
+ this.exportImg(args.value['type'], args.value['fileName'], args.value['imgQuality']);
28
28
  break;
29
29
  case 'exportToCanvas':
30
30
  this.exportToCanvas(args.value['object']);
@@ -45,7 +45,7 @@ var Export = /** @class */ (function () {
45
45
  this.lowerContext = parent.lowerCanvas.getContext('2d');
46
46
  }
47
47
  };
48
- Export.prototype.exportImg = function (type, fileName) {
48
+ Export.prototype.exportImg = function (type, fileName, imgQuality) {
49
49
  var parent = this.parent;
50
50
  var obj = { fileName: '' };
51
51
  parent.notify('draw', { prop: 'getFileName', onPropertyChange: false, value: { obj: obj } });
@@ -71,12 +71,12 @@ var Export = /** @class */ (function () {
71
71
  parent.notify('shape', { prop: 'redrawActObj', onPropertyChange: false,
72
72
  value: { x: null, y: null, isMouseDown: null } });
73
73
  var beforeSave = { cancel: false, fileName: fileName ? fileName : imageName,
74
- fileType: type };
74
+ fileType: type, imageQuality: imgQuality };
75
75
  parent.trigger('beforeSave', beforeSave);
76
- this.beforeSaveEvent(beforeSave, type, fileName, imageName);
76
+ this.beforeSaveEvent(beforeSave, type, fileName, imageName, imgQuality);
77
77
  }
78
78
  };
79
- Export.prototype.beforeSaveEvent = function (observableSaveArgs, type, fileName, imageName) {
79
+ Export.prototype.beforeSaveEvent = function (observableSaveArgs, type, fileName, imageName, imgQuality) {
80
80
  var parent = this.parent;
81
81
  if (!observableSaveArgs.cancel) {
82
82
  parent.currObjType.isSave = true;
@@ -87,7 +87,7 @@ var Export = /** @class */ (function () {
87
87
  this.toSVGImg(fileName);
88
88
  }
89
89
  else {
90
- this.toBlobFn(fileName, lowerCaseType);
90
+ this.toBlobFn(fileName, lowerCaseType, imgQuality);
91
91
  }
92
92
  var saved = { fileName: fileName ? fileName : imageName, fileType: type };
93
93
  parent.trigger('saved', saved);
@@ -130,12 +130,16 @@ var Export = /** @class */ (function () {
130
130
  return null;
131
131
  }
132
132
  };
133
- Export.prototype.toBlobFn = function (fileName, type) {
133
+ Export.prototype.toBlobFn = function (fileName, type, imgQuality) {
134
134
  // eslint-disable-next-line @typescript-eslint/no-this-alias
135
135
  var proxy = this;
136
136
  var parent = this.parent;
137
137
  showSpinner(parent.element);
138
138
  parent.element.style.opacity = '0.5';
139
+ if (!isNullOrUndefined(imgQuality)) {
140
+ imgQuality = imgQuality > 1 ? 1 : (imgQuality <= 0 ? 0.01 : imgQuality);
141
+ this.imageQuality = imgQuality ? imgQuality : null;
142
+ }
139
143
  var tempCanvas = this.exportToCanvas();
140
144
  var imagetype = type !== 'jpeg' ? 'image/png' : 'image/jpeg';
141
145
  // eslint-disable-next-line @typescript-eslint/tslint/config
@@ -131,6 +131,7 @@ export declare class Selection {
131
131
  private unwireEvent;
132
132
  private keyDownEventHandler;
133
133
  private performEnterAction;
134
+ private focusRatioBtn;
134
135
  private isKeyBoardCrop;
135
136
  private beforeSaveEvent;
136
137
  private handleScroll;
@@ -366,6 +366,7 @@ var Selection = /** @class */ (function () {
366
366
  parent.notify('undo-redo', { prop: 'updateCurrUrc', value: { type: 'ok' } });
367
367
  }
368
368
  }
369
+ parent.isKBDNavigation = true;
369
370
  };
370
371
  Selection.prototype.selMouseUpEvent = function () {
371
372
  this.oldPoint.x = undefined;
@@ -2926,6 +2927,7 @@ var Selection = /** @class */ (function () {
2926
2927
  };
2927
2928
  Selection.prototype.mouseDownEventHandler = function (e) {
2928
2929
  var parent = this.parent;
2930
+ parent.isKBDNavigation = false;
2929
2931
  this.mouseDown = e.currentTarget === parent.lowerCanvas || e.currentTarget === parent.upperCanvas ?
2930
2932
  'canvas' : '';
2931
2933
  if (e.type === 'touchstart') {
@@ -3386,6 +3388,7 @@ var Selection = /** @class */ (function () {
3386
3388
  Selection.prototype.mouseUpEventHandler = function (e) {
3387
3389
  var parent = this.parent;
3388
3390
  var id = parent.element.id;
3391
+ parent.isKBDNavigation = false;
3389
3392
  if (!Browser.isDevice && ((parent.element.querySelector('#' + id + '_contextualToolbar') &&
3390
3393
  !parent.element.querySelector('#' + id + '_contextualToolbar').parentElement.classList.contains('e-hide')) ||
3391
3394
  (parent.element.querySelector('#' + id + '_headWrapper')
@@ -3533,7 +3536,10 @@ var Selection = /** @class */ (function () {
3533
3536
  previousCropObj: prevCropObj, previousText: null,
3534
3537
  currentText: null, previousFilter: null, isCircleCrop: null } });
3535
3538
  }
3536
- this.redrawShape(parent.objColl[parent.objColl.length - 1], true);
3539
+ var tempObj = extend({}, parent.objColl[parent.objColl.length - 1], {}, true);
3540
+ parent.objColl.pop();
3541
+ this.redrawShape(tempObj);
3542
+ parent.objColl.push(tempObj);
3537
3543
  this.tempObjColl = undefined;
3538
3544
  }
3539
3545
  if (!this.isFhdEditing) {
@@ -3583,6 +3589,7 @@ var Selection = /** @class */ (function () {
3583
3589
  parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
3584
3590
  }
3585
3591
  if (!isCropSelection_1) {
3592
+ this.adjustActObjForLineArrow();
3586
3593
  if (parent.isShapeDrawing) {
3587
3594
  var temp = this.currentDrawingShape;
3588
3595
  parent.notify('undo-redo', { prop: 'updateUndoRedoStack', onPropertyChange: false });
@@ -3608,8 +3615,11 @@ var Selection = /** @class */ (function () {
3608
3615
  isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
3609
3616
  }
3610
3617
  else {
3618
+ var temp = this.currentDrawingShape;
3619
+ this.currentDrawingShape = '';
3611
3620
  parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'shapes',
3612
3621
  isApplyBtn: null, isCropping: null, isZooming: null, cType: null } });
3622
+ this.currentDrawingShape = temp;
3613
3623
  }
3614
3624
  parent.notify('toolbar', { prop: 'update-toolbar-items', onPropertyChange: false });
3615
3625
  parent.notify('toolbar', { prop: 'renderQAT', onPropertyChange: false, value: { isPenEdit: null } });
@@ -4143,8 +4153,15 @@ var Selection = /** @class */ (function () {
4143
4153
  Selection.prototype.performEnterAction = function (e) {
4144
4154
  var parent = this.parent;
4145
4155
  if (parent.isResize) {
4156
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
4157
+ var target = e.target;
4158
+ var isIcon = target.id.indexOf('aspectratio') ||
4159
+ target.id.indexOf('non-aspectratio') > -1 ? true : false;
4146
4160
  var isValue = this.isValueUpdated();
4147
4161
  if (!isValue) {
4162
+ if (isIcon) {
4163
+ this.focusRatioBtn();
4164
+ }
4148
4165
  return;
4149
4166
  }
4150
4167
  var point = this.getNumTextValue();
@@ -4177,6 +4194,21 @@ var Selection = /** @class */ (function () {
4177
4194
  }
4178
4195
  }
4179
4196
  parent.notify('draw', { prop: 'redrawDownScale' });
4197
+ if (isIcon) {
4198
+ this.focusRatioBtn();
4199
+ }
4200
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
4201
+ }
4202
+ else if (e.target.classList.contains('e-upload')) {
4203
+ var upload = parent.element.querySelector('.e-image-upload');
4204
+ if (upload && upload.querySelector('.e-tbar-btn')) {
4205
+ upload.querySelector('.e-tbar-btn').click();
4206
+ }
4207
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
4208
+ }
4209
+ else if (e.target.classList.contains('filter-wrapper')) {
4210
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
4211
+ e.target.parentElement.click();
4180
4212
  }
4181
4213
  else {
4182
4214
  var splitWords = void 0;
@@ -4189,6 +4221,19 @@ var Selection = /** @class */ (function () {
4189
4221
  }
4190
4222
  }
4191
4223
  };
4224
+ Selection.prototype.focusRatioBtn = function () {
4225
+ var id = this.parent.element.id;
4226
+ if (this.parent.isKBDNavigation) {
4227
+ setTimeout(function () {
4228
+ if (document.getElementById(id + '_aspectratio')) {
4229
+ document.getElementById(id + '_aspectratio').focus();
4230
+ }
4231
+ else if (document.getElementById(id + '_nonaspectratio')) {
4232
+ document.getElementById(id + '_nonaspectratio').focus();
4233
+ }
4234
+ }, 50);
4235
+ }
4236
+ };
4192
4237
  Selection.prototype.isKeyBoardCrop = function (e) {
4193
4238
  var bool = false;
4194
4239
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
@@ -327,7 +327,8 @@ var UndoRedo = /** @class */ (function () {
327
327
  case 'freehanddraw':
328
328
  case 'freehand-draw':
329
329
  this.updateFreehandDraw(obj.previousPointColl, obj.previousSelPointColl);
330
- parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex', value: { value: parent.pointColl.length } });
330
+ parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
331
+ value: { value: parent.pointColl.length } });
331
332
  break;
332
333
  case 'freehanddrawCustomized':
333
334
  this.updateFreehandDrawCustomized(obj.previousObjColl, obj.previousPointColl);
@@ -458,7 +459,8 @@ var UndoRedo = /** @class */ (function () {
458
459
  case 'freehanddraw':
459
460
  case 'freehand-draw':
460
461
  this.updateFreehandDraw(obj.currentPointColl, obj.currentSelPointColl);
461
- parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex', value: { value: parent.pointColl.length } });
462
+ parent.notify('freehand-draw', { prop: 'setCurrentFreehandDrawIndex',
463
+ value: { value: parent.pointColl.length } });
462
464
  break;
463
465
  case 'freehanddrawCustomized':
464
466
  this.updateFreehandDrawCustomized(obj.currentObjColl, obj.currentPointColl);
@@ -374,6 +374,8 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
374
374
  shapeColl: any;
375
375
  /** @hidden */
376
376
  imgSrc: string;
377
+ /** @hidden */
378
+ isKBDNavigation: boolean;
377
379
  private lowerContext;
378
380
  private upperContext;
379
381
  private inMemoryContext;
@@ -977,13 +979,14 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
977
979
  *
978
980
  * @param {string} type - Specifies a format of image to be saved.
979
981
  * @param {string} fileName – Specifies a file name to be saved
982
+ * @param {number} imageQuality – Specifies the quality of an image to be saved. The default value is “1” which represents the original size of the image if not specified.
980
983
  *
981
984
  * @remarks
982
985
  * The supported file types are JPG, JPEG, PNG, and SVG.
983
986
  *
984
987
  * @returns {void}.
985
988
  */
986
- export(type?: string, fileName?: string): void;
989
+ export(type?: string, fileName?: string, imageQuality?: number): void;
987
990
  /**
988
991
  * Perform selection in an image editor. The selection helps to crop an image.
989
992
  *
@@ -261,6 +261,8 @@ var ImageEditor = /** @class */ (function (_super) {
261
261
  /** @hidden */
262
262
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
263
263
  _this.shapeColl = [];
264
+ /** @hidden */
265
+ _this.isKBDNavigation = false;
264
266
  ImageEditor_1.Inject(Crop, Draw, Selection, Transform, Export, ToolbarModule);
265
267
  ImageEditor_1.Inject(UndoRedo);
266
268
  ImageEditor_1.Inject(Filter);
@@ -1019,7 +1021,7 @@ var ImageEditor = /** @class */ (function (_super) {
1019
1021
  this.aspectWidth = this.aspectHeight = null;
1020
1022
  this.isResize = false;
1021
1023
  this.drawingShape = null;
1022
- this.isShapeDrawing = this.noPushUndo = this.isUndoRedoStack = false;
1024
+ this.isShapeDrawing = this.noPushUndo = this.isUndoRedoStack = this.isKBDNavigation = false;
1023
1025
  this.shapeColl = [];
1024
1026
  var obj_1 = { initialZoomValue: false };
1025
1027
  this.notify('draw', { prop: 'getInitialZoomValue', onPropertyChange: false, value: { obj: obj_1 } });
@@ -1085,15 +1087,16 @@ var ImageEditor = /** @class */ (function (_super) {
1085
1087
  *
1086
1088
  * @param {string} type - Specifies a format of image to be saved.
1087
1089
  * @param {string} fileName – Specifies a file name to be saved
1090
+ * @param {number} imageQuality – Specifies the quality of an image to be saved. The default value is “1” which represents the original size of the image if not specified.
1088
1091
  *
1089
1092
  * @remarks
1090
1093
  * The supported file types are JPG, JPEG, PNG, and SVG.
1091
1094
  *
1092
1095
  * @returns {void}.
1093
1096
  */
1094
- ImageEditor.prototype.export = function (type, fileName) {
1097
+ ImageEditor.prototype.export = function (type, fileName, imageQuality) {
1095
1098
  this.applyShapes();
1096
- this.notify('export', { prop: 'export', onPropertyChange: false, value: { type: type, fileName: fileName } });
1099
+ this.notify('export', { prop: 'export', onPropertyChange: false, value: { type: type, fileName: fileName, imgQuality: imageQuality } });
1097
1100
  };
1098
1101
  /**
1099
1102
  * Perform selection in an image editor. The selection helps to crop an image.
@@ -278,6 +278,10 @@ export interface BeforeSaveEventArgs {
278
278
  * Returns the file type for an image.
279
279
  */
280
280
  fileType: FileType;
281
+ /**
282
+ * Returns the Quality of an image.
283
+ */
284
+ imageQuality?: number;
281
285
  }
282
286
  /**
283
287
  * The Interface which contains the properties for Point Object in the image editor.
@@ -92,6 +92,7 @@ export declare class ToolbarModule {
92
92
  private createTextColor;
93
93
  private createTextBtn;
94
94
  private refreshToolbar;
95
+ private updateKBDNavigation;
95
96
  private performCropTransformClick;
96
97
  private getAdjustmentToolbarItem;
97
98
  private getFrameToolbarItem;
@@ -639,7 +639,7 @@ var ToolbarModule = /** @class */ (function () {
639
639
  var toolbarItems = [];
640
640
  if (isOkBtn) {
641
641
  toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
642
- tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
642
+ tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
643
643
  toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
644
644
  tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
645
645
  }
@@ -721,7 +721,7 @@ var ToolbarModule = /** @class */ (function () {
721
721
  }
722
722
  if (isApplyOption) {
723
723
  toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
724
- tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
724
+ tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
725
725
  toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
726
726
  tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
727
727
  }
@@ -865,7 +865,7 @@ var ToolbarModule = /** @class */ (function () {
865
865
  };
866
866
  ToolbarModule.prototype.widthAspectRatio = function (e) {
867
867
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
868
- if (e.keyCode === 109) {
868
+ if (e.keyCode === 109 || e.keyCode === 9) {
869
869
  return;
870
870
  }
871
871
  var parent = this.parent;
@@ -909,7 +909,7 @@ var ToolbarModule = /** @class */ (function () {
909
909
  };
910
910
  ToolbarModule.prototype.heightAspectRatio = function (e) {
911
911
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
912
- if (e.keyCode === 109) {
912
+ if (e.keyCode === 109 || e.keyCode === 9) {
913
913
  return;
914
914
  }
915
915
  var parent = this.parent;
@@ -977,7 +977,8 @@ var ToolbarModule = /** @class */ (function () {
977
977
  placeholder: isResize ? null : height, format: '###.## px' })
978
978
  });
979
979
  if (!this.isAspectRatio) {
980
- toolbarItems.push({ id: id + '_aspectratio', prefixIcon: 'e-icons e-lock', align: 'Center', tooltipText: this.l10n.getConstant('AspectRatio'), type: 'Button' });
980
+ toolbarItems.push({ id: id + '_aspectratio', prefixIcon: 'e-icons e-lock', align: 'Center',
981
+ tooltipText: this.l10n.getConstant('AspectRatio'), type: 'Button', tabIndex: 0 });
981
982
  this.isAspectRatio = true;
982
983
  }
983
984
  else {
@@ -986,7 +987,7 @@ var ToolbarModule = /** @class */ (function () {
986
987
  }
987
988
  if (!Browser.isDevice) {
988
989
  toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
989
- tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
990
+ tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
990
991
  toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
991
992
  tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
992
993
  }
@@ -1631,7 +1632,7 @@ var ToolbarModule = /** @class */ (function () {
1631
1632
  { id: 'svg', text: 'SVG' }
1632
1633
  ];
1633
1634
  var inputObj = new TextBox({
1634
- placeholder: this.l10n.getConstant('ImageName'),
1635
+ placeholder: this.l10n.getConstant('ImageName')
1635
1636
  });
1636
1637
  inputObj.appendTo('#' + id + '_imgNametext');
1637
1638
  var qualityContainer = document.getElementById(id + '_imgQualitydiv');
@@ -1802,7 +1803,7 @@ var ToolbarModule = /** @class */ (function () {
1802
1803
  else {
1803
1804
  imageNameLabel = document.getElementById(id + '_imageNameLabel');
1804
1805
  }
1805
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/tslint/config */
1806
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
1806
1807
  tempCanvas.toBlob((function (blob) {
1807
1808
  fileSize = Math.floor(blob.size / 1024);
1808
1809
  if (fileSize > 1000) {
@@ -1882,7 +1883,7 @@ var ToolbarModule = /** @class */ (function () {
1882
1883
  }
1883
1884
  if (!Browser.isDevice) {
1884
1885
  toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
1885
- tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
1886
+ tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
1886
1887
  toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
1887
1888
  tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
1888
1889
  }
@@ -1959,7 +1960,7 @@ var ToolbarModule = /** @class */ (function () {
1959
1960
  parent.notify('selection', { prop: 'getCurrentDrawingShape', value: { obj: obj } });
1960
1961
  if (obj['shape'] !== 'path') {
1961
1962
  toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
1962
- tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
1963
+ tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
1963
1964
  toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
1964
1965
  tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
1965
1966
  }
@@ -2573,7 +2574,7 @@ var ToolbarModule = /** @class */ (function () {
2573
2574
  }
2574
2575
  if (!Browser.isDevice) {
2575
2576
  toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
2576
- tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
2577
+ tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
2577
2578
  toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
2578
2579
  tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
2579
2580
  }
@@ -2956,6 +2957,44 @@ var ToolbarModule = /** @class */ (function () {
2956
2957
  }
2957
2958
  this.currToolbar = type;
2958
2959
  this.refreshDropDownBtn(isCropping);
2960
+ this.updateKBDNavigation(this.currToolbar);
2961
+ };
2962
+ ToolbarModule.prototype.updateKBDNavigation = function (type) {
2963
+ var parent = this.parent;
2964
+ var id = parent.element.id;
2965
+ if (!parent.isKBDNavigation) {
2966
+ return;
2967
+ }
2968
+ if (this.isToolbar()) {
2969
+ var tbar = parent.element.querySelectorAll('#' + id + '_toolbar')[0];
2970
+ var tbarInitialChild = void 0;
2971
+ var tbarInitialBtn_1;
2972
+ if (tbar) {
2973
+ tbarInitialChild = tbar.querySelector('.e-toolbar-center');
2974
+ if (!tbarInitialChild || !tbarInitialChild.children[0]) {
2975
+ return;
2976
+ }
2977
+ tbarInitialBtn_1 = tbarInitialChild.children[0].querySelector('.e-btn');
2978
+ var tempElem = tbarInitialChild.children[1];
2979
+ if (tempElem) {
2980
+ tempElem = tempElem.children[0];
2981
+ }
2982
+ if (tempElem) {
2983
+ tempElem = tempElem.children[0];
2984
+ }
2985
+ if (type === 'resize' && tempElem) {
2986
+ tbarInitialBtn_1 = tempElem;
2987
+ }
2988
+ if (tbarInitialBtn_1) {
2989
+ if (type === 'main') {
2990
+ setTimeout(function () { return tbarInitialBtn_1.focus(); }, 50);
2991
+ }
2992
+ else {
2993
+ tbarInitialBtn_1.focus();
2994
+ }
2995
+ }
2996
+ }
2997
+ }
2959
2998
  };
2960
2999
  ToolbarModule.prototype.performCropTransformClick = function (shape, isTransform) {
2961
3000
  var parent = this.parent;
@@ -3021,7 +3060,7 @@ var ToolbarModule = /** @class */ (function () {
3021
3060
  }
3022
3061
  if (!Browser.isDevice) {
3023
3062
  toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
3024
- tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
3063
+ tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
3025
3064
  toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
3026
3065
  tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
3027
3066
  }
@@ -3074,7 +3113,7 @@ var ToolbarModule = /** @class */ (function () {
3074
3113
  if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Default') > -1)) {
3075
3114
  toolbarItems.push({ id: id + '_default', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
3076
3115
  tooltipText: this.l10n.getConstant('Default'), align: 'Center',
3077
- template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + id + '_defaultCanvas' + '></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Default') + '</span></div></div>' });
3116
+ template: '<div class="filter-wrapper" style="box-sizing: content-box;"><canvas id=' + id + '_defaultCanvas' + ' tabindex=0></canvas><div style="text-align:center;"><span>' + this.l10n.getConstant('Default') + '</span></div></div>' });
3078
3117
  }
3079
3118
  if (isNullOrUndefined(parent.toolbar) || !isCustomized || (parent.toolbar && parent.toolbar.indexOf('Chrome') > -1)) {
3080
3119
  toolbarItems.push({ id: id + '_chrome', prefixIcon: 'e-icons e-none', cssClass: 'top-icon e-none',
@@ -3147,7 +3186,7 @@ var ToolbarModule = /** @class */ (function () {
3147
3186
  }
3148
3187
  if (!Browser.isDevice) {
3149
3188
  toolbarItems.push({ id: id + '_ok', prefixIcon: 'e-icons e-check', cssClass: 'top-icon e-tick',
3150
- tooltipText: this.l10n.getConstant('OK'), align: 'Right' });
3189
+ tooltipText: this.l10n.getConstant('OK'), align: 'Right', tabIndex: 0 });
3151
3190
  toolbarItems.push({ id: id + '_cancel', prefixIcon: 'e-icons e-close', cssClass: 'top-icon e-save',
3152
3191
  tooltipText: this.l10n.getConstant('Cancel'), align: 'Right' });
3153
3192
  }