@syncfusion/ej2-image-editor 23.2.6 → 24.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.
Files changed (99) hide show
  1. package/CHANGELOG.md +3 -51
  2. package/dist/ej2-image-editor.umd.min.js +2 -2
  3. package/dist/ej2-image-editor.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-image-editor.es2015.js +7151 -4321
  5. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-image-editor.es5.js +7269 -4426
  7. package/dist/es6/ej2-image-editor.es5.js.map +1 -1
  8. package/dist/global/ej2-image-editor.min.js +2 -2
  9. package/dist/global/ej2-image-editor.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +12 -12
  12. package/src/image-editor/action/crop.d.ts +6 -0
  13. package/src/image-editor/action/crop.js +347 -188
  14. package/src/image-editor/action/draw.d.ts +35 -2
  15. package/src/image-editor/action/draw.js +1682 -881
  16. package/src/image-editor/action/export.js +90 -29
  17. package/src/image-editor/action/filter.d.ts +3 -1
  18. package/src/image-editor/action/filter.js +74 -94
  19. package/src/image-editor/action/freehand-draw.d.ts +4 -0
  20. package/src/image-editor/action/freehand-draw.js +259 -149
  21. package/src/image-editor/action/selection.d.ts +6 -1
  22. package/src/image-editor/action/selection.js +1133 -1091
  23. package/src/image-editor/action/shape.d.ts +7 -0
  24. package/src/image-editor/action/shape.js +921 -550
  25. package/src/image-editor/action/transform.d.ts +2 -0
  26. package/src/image-editor/action/transform.js +514 -346
  27. package/src/image-editor/action/undo-redo.d.ts +2 -0
  28. package/src/image-editor/action/undo-redo.js +137 -36
  29. package/src/image-editor/base/enum.d.ts +2 -1
  30. package/src/image-editor/base/enum.js +1 -0
  31. package/src/image-editor/base/image-editor-model.d.ts +37 -2
  32. package/src/image-editor/base/image-editor.d.ts +124 -3
  33. package/src/image-editor/base/image-editor.js +672 -171
  34. package/src/image-editor/base/interface.d.ts +69 -15
  35. package/src/image-editor/renderer/toolbar.d.ts +10 -0
  36. package/src/image-editor/renderer/toolbar.js +1371 -822
  37. package/styles/bootstrap-dark.css +113 -8
  38. package/styles/bootstrap.css +112 -7
  39. package/styles/bootstrap4.css +113 -8
  40. package/styles/bootstrap5-dark.css +113 -8
  41. package/styles/bootstrap5.css +113 -8
  42. package/styles/fabric-dark.css +114 -9
  43. package/styles/fabric.css +113 -8
  44. package/styles/fluent-dark.css +118 -9
  45. package/styles/fluent.css +118 -9
  46. package/styles/highcontrast-light.css +112 -7
  47. package/styles/highcontrast.css +116 -7
  48. package/styles/image-editor/_bootstrap-dark-definition.scss +3 -0
  49. package/styles/image-editor/_bootstrap-definition.scss +3 -0
  50. package/styles/image-editor/_bootstrap4-definition.scss +3 -0
  51. package/styles/image-editor/_bootstrap5-definition.scss +3 -0
  52. package/styles/image-editor/_fabric-dark-definition.scss +3 -0
  53. package/styles/image-editor/_fabric-definition.scss +3 -0
  54. package/styles/image-editor/_fluent-definition.scss +3 -0
  55. package/styles/image-editor/_fusionnew-definition.scss +3 -0
  56. package/styles/image-editor/_highcontrast-definition.scss +3 -0
  57. package/styles/image-editor/_highcontrast-light-definition.scss +3 -0
  58. package/styles/image-editor/_layout.scss +138 -4
  59. package/styles/image-editor/_material-dark-definition.scss +3 -0
  60. package/styles/image-editor/_material-definition.scss +3 -0
  61. package/styles/image-editor/_material3-definition.scss +3 -0
  62. package/styles/image-editor/_tailwind-definition.scss +3 -0
  63. package/styles/image-editor/_theme.scss +2 -4
  64. package/styles/image-editor/bootstrap-dark.css +113 -8
  65. package/styles/image-editor/bootstrap.css +112 -7
  66. package/styles/image-editor/bootstrap4.css +113 -8
  67. package/styles/image-editor/bootstrap5-dark.css +113 -8
  68. package/styles/image-editor/bootstrap5.css +113 -8
  69. package/styles/image-editor/fabric-dark.css +114 -9
  70. package/styles/image-editor/fabric.css +113 -8
  71. package/styles/image-editor/fluent-dark.css +118 -9
  72. package/styles/image-editor/fluent.css +118 -9
  73. package/styles/image-editor/highcontrast-light.css +112 -7
  74. package/styles/image-editor/highcontrast.css +116 -7
  75. package/styles/image-editor/icons/_bootstrap-dark.scss +60 -0
  76. package/styles/image-editor/icons/_bootstrap.scss +60 -0
  77. package/styles/image-editor/icons/_bootstrap4.scss +60 -0
  78. package/styles/image-editor/icons/_bootstrap5.scss +60 -0
  79. package/styles/image-editor/icons/_fabric-dark.scss +60 -0
  80. package/styles/image-editor/icons/_fabric.scss +60 -0
  81. package/styles/image-editor/icons/_fluent.scss +66 -0
  82. package/styles/image-editor/icons/_highcontrast-light.scss +60 -0
  83. package/styles/image-editor/icons/_highcontrast.scss +60 -0
  84. package/styles/image-editor/icons/_material-dark.scss +60 -0
  85. package/styles/image-editor/icons/_material.scss +60 -0
  86. package/styles/image-editor/icons/_material3.scss +60 -0
  87. package/styles/image-editor/icons/_tailwind.scss +60 -0
  88. package/styles/image-editor/material-dark.css +113 -8
  89. package/styles/image-editor/material.css +113 -8
  90. package/styles/image-editor/material3-dark.css +126 -9
  91. package/styles/image-editor/material3.css +126 -9
  92. package/styles/image-editor/tailwind-dark.css +114 -9
  93. package/styles/image-editor/tailwind.css +114 -9
  94. package/styles/material-dark.css +113 -8
  95. package/styles/material.css +113 -8
  96. package/styles/material3-dark.css +126 -9
  97. package/styles/material3.css +126 -9
  98. package/styles/tailwind-dark.css +114 -9
  99. package/styles/tailwind.css +114 -9
@@ -25,6 +25,8 @@ export interface ImageFinetuneValue {
25
25
  }
26
26
  /**
27
27
  * The Interface which contains the properties for zoom transition occur in the Image Editor.
28
+ * @remarks
29
+ * The `cancel` and `previousZoomFactor` properties were used for `zooming` event.
28
30
  */
29
31
  export interface ZoomEventArgs {
30
32
  /**
@@ -54,7 +56,7 @@ export interface ZoomEventArgs {
54
56
  /**
55
57
  * Specifies a value that indicates whether the zooming action can be canceled in image editor.
56
58
  */
57
- cancel: boolean;
59
+ cancel?: boolean;
58
60
  /**
59
61
  * Returns the type of zooming performed in the image editor.
60
62
  *
@@ -91,6 +93,8 @@ export interface PanEventArgs {
91
93
  }
92
94
  /**
93
95
  * The Interface which contains the properties for crop transition occurs in the Image Editor.
96
+ * @remarks
97
+ * The `cancel` and `preventScaling` properties were used for `cropping` event.
94
98
  */
95
99
  export interface CropEventArgs {
96
100
  /**
@@ -112,14 +116,16 @@ export interface CropEventArgs {
112
116
  /**
113
117
  * Specifies whether to prevent scale-based cropping in the image editor.
114
118
  */
115
- preventScaling: boolean;
119
+ preventScaling?: boolean;
116
120
  /**
117
121
  * Defines whether to cancel the cropping action of image editor.
118
122
  */
119
- cancel: boolean;
123
+ cancel?: boolean;
120
124
  }
121
125
  /**
122
126
  * The Interface which contains the properties for rotate transition in the Image Editor.
127
+ * @remarks
128
+ * The `cancel` and `previousDegree` properties were used for `rotating` event.
123
129
  */
124
130
  export interface RotateEventArgs {
125
131
  /**
@@ -133,10 +139,12 @@ export interface RotateEventArgs {
133
139
  /**
134
140
  * Defines whether to cancel the rotating action of image editor.
135
141
  */
136
- cancel: boolean;
142
+ cancel?: boolean;
137
143
  }
138
144
  /**
139
145
  * The Interface which contains the properties for flip transition in the Image Editor.
146
+ * @remarks
147
+ * The `cancel` and `previousDirection` properties were used for `flipping` event.
140
148
  */
141
149
  export interface FlipEventArgs {
142
150
  /**
@@ -146,7 +154,7 @@ export interface FlipEventArgs {
146
154
  /**
147
155
  * Defines the cancel option to cancel the flip action.
148
156
  */
149
- cancel: boolean;
157
+ cancel?: boolean;
150
158
  /**
151
159
  * Returns the previous flipped direction of image.
152
160
  */
@@ -154,8 +162,14 @@ export interface FlipEventArgs {
154
162
  }
155
163
  /**
156
164
  * The Interface which contains the properties for shape change in Image Editor.
165
+ * @remarks
166
+ * The `cancel` and `previousShapeSettings` properties were used for `shapeChanging` event.
157
167
  */
158
168
  export interface ShapeChangeEventArgs {
169
+ /**
170
+ * Defines the cancel option to cancel the shape change action.
171
+ */
172
+ cancel?: boolean;
159
173
  /**
160
174
  * Returns the name of the action.
161
175
  */
@@ -337,6 +351,10 @@ export interface ShapeSettings {
337
351
  * Returns the start y position of the shape.
338
352
  */
339
353
  startY: number;
354
+ /**
355
+ * Returns the opacity value of the shape.
356
+ */
357
+ opacity?: number;
340
358
  /**
341
359
  * Returns the width of the shape.
342
360
  */
@@ -399,7 +417,9 @@ export interface ShapeSettings {
399
417
  imageData?: string | ImageData;
400
418
  }
401
419
  /**
402
- * Interface for filter option for the image.
420
+ * The interface which contains the properties for filter option for the image.
421
+ * @remarks
422
+ * The `cancel` property is used for `imageFiltering` event.
403
423
  */
404
424
  export interface ImageFilterEventArgs {
405
425
  /**
@@ -409,10 +429,12 @@ export interface ImageFilterEventArgs {
409
429
  /**
410
430
  * Defines the cancel option to cancel the filter action.
411
431
  */
412
- cancel: boolean;
432
+ cancel?: boolean;
413
433
  }
414
434
  /**
415
- * Interface for fine tunes option for the image.
435
+ * The interface which contains the properties for fine tunes option for the image.
436
+ * @remarks
437
+ * The `cancel` property is used for `finetuneValueChanging` event.
416
438
  */
417
439
  export interface FinetuneEventArgs {
418
440
  /**
@@ -426,7 +448,7 @@ export interface FinetuneEventArgs {
426
448
  /**
427
449
  * Defines the cancel option to cancel the fine tunes action.
428
450
  */
429
- cancel: boolean;
451
+ cancel?: boolean;
430
452
  }
431
453
  /**
432
454
  * Interface for Dimension calculation in the imageEditor.
@@ -461,12 +483,14 @@ export interface ImageEditorClickEventArgs {
461
483
  }
462
484
  /**
463
485
  * The Interface which contains the properties for resize action in the Image Editor.
486
+ * @remarks
487
+ * The `cancel`, `previousWidth`, and `previousHeight` properties were used for `resizing` event.
464
488
  */
465
489
  export interface ResizeEventArgs {
466
490
  /**
467
491
  * Defines whether to cancel the resizing action of image editor.
468
492
  */
469
- cancel: boolean;
493
+ cancel?: boolean;
470
494
  /**
471
495
  * Returns the width of the image before resizing can be performed.
472
496
  */
@@ -520,12 +544,14 @@ export interface QuickAccessToolbarEventArgs {
520
544
  }
521
545
  /**
522
546
  * The Interface which contains the properties for frame action in the Image Editor.
547
+ * @remarks
548
+ * The `cancel` and `previousFrameSetting` properties were used for `frameChange` event.
523
549
  */
524
550
  export interface FrameChangeEventArgs {
525
551
  /**
526
552
  * Defines whether to cancel the frame changing action of image editor.
527
553
  */
528
- cancel: boolean;
554
+ cancel?: boolean;
529
555
  /**
530
556
  * Returns the previous frame settings applied on the image.
531
557
  */
@@ -682,6 +708,10 @@ export interface CurrentObject {
682
708
  * Specifies the stroke color for the object in Image Editor.
683
709
  */
684
710
  previousZoomValue: number;
711
+ /**
712
+ * Specifies the stroke color for the object in Image Editor.
713
+ */
714
+ straightenZoom: number;
685
715
  /**
686
716
  * Specifies the stroke color for the object in Image Editor.
687
717
  */
@@ -714,6 +744,10 @@ export interface CurrentObject {
714
744
  * Specifies the stroke color for the object in Image Editor.
715
745
  */
716
746
  currFlipState: string;
747
+ /**
748
+ * Specifies the stroke color for the object in Image Editor.
749
+ */
750
+ straighten: number;
717
751
  /**
718
752
  * Specifies the stroke color for the object in Image Editor.
719
753
  */
@@ -742,6 +776,14 @@ export interface CurrentObject {
742
776
  * Specifies the frame to be drawn in the image in Image Editor.
743
777
  */
744
778
  frame: string;
779
+ /**
780
+ * Specifies the finetune value in Image Editor.
781
+ */
782
+ adjustmentLevel: Adjustment;
783
+ /**
784
+ * Specifies the selected filter value in Image Editor.
785
+ */
786
+ currentFilter: string;
745
787
  /**
746
788
  * Specifies the frame object to be drawn on the image in Image Editor.
747
789
  */
@@ -855,6 +897,10 @@ export interface TransformValue {
855
897
  * Specifies the zoomed value of image in non-selection state on the canvas.
856
898
  */
857
899
  defaultZoomFactor: number;
900
+ /**
901
+ * Specifies the straighten value of image on the canvas.
902
+ */
903
+ straighten: number;
858
904
  }
859
905
  /**
860
906
  * Defines the panned values of image in canvas.
@@ -980,6 +1026,14 @@ export interface Transition {
980
1026
  * Specifies the circle crop value in Image Editor.
981
1027
  */
982
1028
  isCircleCrop?: boolean;
1029
+ /**
1030
+ * Specifies the finetune slider value in Image Editor.
1031
+ */
1032
+ adjustmentLevel?: Adjustment;
1033
+ /**
1034
+ * Specifies the selected filter value in Image Editor.
1035
+ */
1036
+ currentFilter?: string;
983
1037
  }
984
1038
  /**
985
1039
  * Interface for freehand drawing in the Image Editor.
@@ -1355,12 +1409,12 @@ export interface SelectionPoint {
1355
1409
  * Gets the image element is flipped in vertical or not.
1356
1410
  */
1357
1411
  isVerImageFlip?: boolean;
1358
- /**
1359
- * Gets the image transparency value.
1360
- */
1361
- imageTransparency?: number;
1362
1412
  /**
1363
1413
  * Gets the transform collection values.
1364
1414
  */
1365
1415
  rotateFlipColl?: any;
1416
+ /**
1417
+ * Gets the opacity value of image annotation.
1418
+ */
1419
+ opacity?: number;
1366
1420
  }
@@ -13,12 +13,14 @@ export declare class ToolbarModule {
13
13
  private preventEnableDisableUr;
14
14
  private isAspectRatio;
15
15
  private isFrameToolbar;
16
+ private presetColors;
16
17
  private lowerContext;
17
18
  private upperContext;
18
19
  private inMemoryCanvas;
19
20
  private inMemoryContext;
20
21
  imageWidth: number;
21
22
  imageHeight: number;
23
+ private popupLeft;
22
24
  constructor(parent: ImageEditor);
23
25
  destroy(): void;
24
26
  private addEventListener;
@@ -44,6 +46,8 @@ export declare class ToolbarModule {
44
46
  private processToolbar;
45
47
  private processSubToolbar;
46
48
  private wireZoomBtnEvents;
49
+ private widthPress;
50
+ private heightPress;
47
51
  private widthAspectRatio;
48
52
  private heightAspectRatio;
49
53
  private getResizeToolbarItem;
@@ -53,14 +57,17 @@ export declare class ToolbarModule {
53
57
  private createLeftToolbarControls;
54
58
  private fileSelect;
55
59
  private renderAnnotationBtn;
60
+ private renderStraightenSlider;
56
61
  private renderCropBtn;
57
62
  private renderTransformBtn;
58
63
  private renderSaveBtn;
59
64
  private getCropTransformToolbarItem;
60
65
  private getShapesToolbarItem;
61
66
  private initCropTransformToolbar;
67
+ private getCropTextContent;
62
68
  private getCurrentShapeIcon;
63
69
  private initShapesToolbarItem;
70
+ private beforeModeSwitch;
64
71
  private createShapeColor;
65
72
  private createShapeBtn;
66
73
  private createStartBtn;
@@ -71,6 +78,7 @@ export declare class ToolbarModule {
71
78
  private createTextColor;
72
79
  private createTextBtn;
73
80
  private refreshToolbar;
81
+ private performCropTransformClick;
74
82
  private getAdjustmentToolbarItem;
75
83
  private getFrameToolbarItem;
76
84
  private getFilterToolbarItem;
@@ -98,6 +106,7 @@ export declare class ToolbarModule {
98
106
  private refreshDropDownBtn;
99
107
  private cropSelect;
100
108
  private quickAccessToolbarClicked;
109
+ private duplicateShape;
101
110
  private defToolbarClicked;
102
111
  private performDefTbrClick;
103
112
  private frameToolbarClick;
@@ -115,6 +124,7 @@ export declare class ToolbarModule {
115
124
  private destroyQuickAccessToolbar;
116
125
  private renderSlider;
117
126
  private createSlider;
127
+ private updateFinetuneSpan;
118
128
  private applyPreviewFilter;
119
129
  private unselectBtn;
120
130
  private openSlider;