@syncfusion/ej2-image-editor 26.2.14 → 27.1.48

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 (186) hide show
  1. package/README.md +1 -1
  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 +3202 -732
  5. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-image-editor.es5.js +3281 -797
  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 +14 -13
  12. package/src/image-editor/action/crop.d.ts +0 -1
  13. package/src/image-editor/action/crop.js +8 -19
  14. package/src/image-editor/action/draw.d.ts +4 -0
  15. package/src/image-editor/action/draw.js +377 -45
  16. package/src/image-editor/action/export.js +21 -13
  17. package/src/image-editor/action/filter.d.ts +13 -0
  18. package/src/image-editor/action/filter.js +272 -1
  19. package/src/image-editor/action/freehand-draw.d.ts +1 -0
  20. package/src/image-editor/action/freehand-draw.js +44 -23
  21. package/src/image-editor/action/selection.d.ts +6 -0
  22. package/src/image-editor/action/selection.js +382 -97
  23. package/src/image-editor/action/shape.d.ts +5 -0
  24. package/src/image-editor/action/shape.js +287 -141
  25. package/src/image-editor/action/transform.js +56 -82
  26. package/src/image-editor/action/undo-redo.d.ts +2 -0
  27. package/src/image-editor/action/undo-redo.js +100 -1
  28. package/src/image-editor/base/enum.d.ts +11 -0
  29. package/src/image-editor/base/enum.js +12 -0
  30. package/src/image-editor/base/image-editor-model.d.ts +13 -1
  31. package/src/image-editor/base/image-editor.d.ts +142 -20
  32. package/src/image-editor/base/image-editor.js +811 -149
  33. package/src/image-editor/base/interface.d.ts +140 -1
  34. package/src/image-editor/renderer/toolbar.d.ts +8 -0
  35. package/src/image-editor/renderer/toolbar.js +873 -191
  36. package/styles/bootstrap-dark-lite.css +746 -0
  37. package/styles/bootstrap-dark-lite.scss +13 -0
  38. package/styles/bootstrap-dark.css +150 -105
  39. package/styles/bootstrap-dark.scss +1 -0
  40. package/styles/bootstrap-lite.css +747 -0
  41. package/styles/bootstrap-lite.scss +13 -0
  42. package/styles/bootstrap.css +151 -106
  43. package/styles/bootstrap.scss +1 -0
  44. package/styles/bootstrap4-lite.css +747 -0
  45. package/styles/bootstrap4-lite.scss +13 -0
  46. package/styles/bootstrap4.css +150 -105
  47. package/styles/bootstrap4.scss +1 -0
  48. package/styles/bootstrap5-dark-lite.css +757 -0
  49. package/styles/bootstrap5-dark-lite.scss +13 -0
  50. package/styles/bootstrap5-dark.css +152 -113
  51. package/styles/bootstrap5-dark.scss +1 -0
  52. package/styles/bootstrap5-lite.css +757 -0
  53. package/styles/bootstrap5-lite.scss +13 -0
  54. package/styles/bootstrap5.3-lite.css +760 -0
  55. package/styles/bootstrap5.3-lite.scss +13 -0
  56. package/styles/bootstrap5.3.css +867 -0
  57. package/styles/bootstrap5.3.scss +14 -0
  58. package/styles/bootstrap5.css +152 -113
  59. package/styles/bootstrap5.scss +1 -0
  60. package/styles/fabric-dark-lite.css +749 -0
  61. package/styles/fabric-dark-lite.scss +13 -0
  62. package/styles/fabric-dark.css +150 -105
  63. package/styles/fabric-dark.scss +1 -0
  64. package/styles/fabric-lite.css +751 -0
  65. package/styles/fabric-lite.scss +13 -0
  66. package/styles/fabric.css +151 -106
  67. package/styles/fabric.scss +1 -0
  68. package/styles/fluent-dark-lite.css +758 -0
  69. package/styles/fluent-dark-lite.scss +13 -0
  70. package/styles/fluent-dark.css +150 -111
  71. package/styles/fluent-dark.scss +1 -0
  72. package/styles/fluent-lite.css +758 -0
  73. package/styles/fluent-lite.scss +13 -0
  74. package/styles/fluent.css +150 -111
  75. package/styles/fluent.scss +1 -0
  76. package/styles/fluent2-lite.css +791 -0
  77. package/styles/fluent2-lite.scss +13 -0
  78. package/styles/fluent2.css +173 -117
  79. package/styles/fluent2.scss +1 -0
  80. package/styles/highcontrast-light-lite.css +748 -0
  81. package/styles/highcontrast-light-lite.scss +13 -0
  82. package/styles/highcontrast-light.css +149 -104
  83. package/styles/highcontrast-light.scss +1 -0
  84. package/styles/highcontrast-lite.css +753 -0
  85. package/styles/highcontrast-lite.scss +13 -0
  86. package/styles/highcontrast.css +150 -104
  87. package/styles/highcontrast.scss +1 -0
  88. package/styles/image-editor/_bds-definition.scss +3 -1
  89. package/styles/image-editor/_bigger.scss +216 -0
  90. package/styles/image-editor/_bootstrap-dark-definition.scss +3 -1
  91. package/styles/image-editor/_bootstrap-definition.scss +3 -1
  92. package/styles/image-editor/_bootstrap4-definition.scss +3 -1
  93. package/styles/image-editor/_bootstrap5-definition.scss +3 -1
  94. package/styles/image-editor/_bootstrap5.3-definition.scss +3 -1
  95. package/styles/image-editor/_fabric-dark-definition.scss +3 -1
  96. package/styles/image-editor/_fabric-definition.scss +3 -1
  97. package/styles/image-editor/_fluent-definition.scss +3 -1
  98. package/styles/image-editor/_fluent2-definition.scss +4 -2
  99. package/styles/image-editor/_fusionnew-definition.scss +3 -1
  100. package/styles/image-editor/_highcontrast-definition.scss +3 -1
  101. package/styles/image-editor/_highcontrast-light-definition.scss +3 -1
  102. package/styles/image-editor/_layout.scss +75 -212
  103. package/styles/image-editor/_material-dark-definition.scss +3 -1
  104. package/styles/image-editor/_material-definition.scss +3 -1
  105. package/styles/image-editor/_material3-definition.scss +5 -3
  106. package/styles/image-editor/_tailwind-definition.scss +5 -3
  107. package/styles/image-editor/_theme.scss +48 -11
  108. package/styles/image-editor/bootstrap-dark.css +150 -105
  109. package/styles/image-editor/bootstrap-dark.scss +1 -0
  110. package/styles/image-editor/bootstrap.css +151 -106
  111. package/styles/image-editor/bootstrap.scss +1 -0
  112. package/styles/image-editor/bootstrap4.css +150 -105
  113. package/styles/image-editor/bootstrap4.scss +1 -0
  114. package/styles/image-editor/bootstrap5-dark.css +152 -113
  115. package/styles/image-editor/bootstrap5-dark.scss +1 -0
  116. package/styles/image-editor/bootstrap5.3.css +867 -0
  117. package/styles/image-editor/bootstrap5.3.scss +14 -0
  118. package/styles/image-editor/bootstrap5.css +152 -113
  119. package/styles/image-editor/bootstrap5.scss +1 -0
  120. package/styles/image-editor/fabric-dark.css +150 -105
  121. package/styles/image-editor/fabric-dark.scss +1 -0
  122. package/styles/image-editor/fabric.css +151 -106
  123. package/styles/image-editor/fabric.scss +1 -0
  124. package/styles/image-editor/fluent-dark.css +150 -111
  125. package/styles/image-editor/fluent-dark.scss +1 -0
  126. package/styles/image-editor/fluent.css +150 -111
  127. package/styles/image-editor/fluent.scss +1 -0
  128. package/styles/image-editor/fluent2.css +173 -117
  129. package/styles/image-editor/fluent2.scss +1 -0
  130. package/styles/image-editor/highcontrast-light.css +149 -104
  131. package/styles/image-editor/highcontrast-light.scss +1 -0
  132. package/styles/image-editor/highcontrast.css +150 -104
  133. package/styles/image-editor/highcontrast.scss +1 -0
  134. package/styles/image-editor/icons/_bds.scss +10 -1
  135. package/styles/image-editor/icons/_bootstrap-dark.scss +10 -1
  136. package/styles/image-editor/icons/_bootstrap.scss +10 -1
  137. package/styles/image-editor/icons/_bootstrap4.scss +10 -1
  138. package/styles/image-editor/icons/_bootstrap5.3.scss +10 -1
  139. package/styles/image-editor/icons/_bootstrap5.scss +10 -1
  140. package/styles/image-editor/icons/_fabric-dark.scss +10 -1
  141. package/styles/image-editor/icons/_fabric.scss +10 -1
  142. package/styles/image-editor/icons/_fluent.scss +10 -1
  143. package/styles/image-editor/icons/_fluent2.scss +10 -1
  144. package/styles/image-editor/icons/_fusionnew.scss +10 -1
  145. package/styles/image-editor/icons/_highcontrast-light.scss +10 -1
  146. package/styles/image-editor/icons/_highcontrast.scss +10 -1
  147. package/styles/image-editor/icons/_material-dark.scss +10 -1
  148. package/styles/image-editor/icons/_material.scss +10 -1
  149. package/styles/image-editor/icons/_material3.scss +10 -1
  150. package/styles/image-editor/icons/_tailwind.scss +10 -1
  151. package/styles/image-editor/material-dark.css +153 -108
  152. package/styles/image-editor/material-dark.scss +1 -0
  153. package/styles/image-editor/material.css +159 -114
  154. package/styles/image-editor/material.scss +1 -0
  155. package/styles/image-editor/material3-dark.css +171 -123
  156. package/styles/image-editor/material3-dark.scss +1 -0
  157. package/styles/image-editor/material3.css +171 -123
  158. package/styles/image-editor/material3.scss +1 -0
  159. package/styles/image-editor/tailwind-dark.css +154 -116
  160. package/styles/image-editor/tailwind-dark.scss +1 -0
  161. package/styles/image-editor/tailwind.css +154 -116
  162. package/styles/image-editor/tailwind.scss +1 -0
  163. package/styles/material-dark-lite.css +767 -0
  164. package/styles/material-dark-lite.scss +13 -0
  165. package/styles/material-dark.css +153 -108
  166. package/styles/material-dark.scss +1 -0
  167. package/styles/material-lite.css +769 -0
  168. package/styles/material-lite.scss +13 -0
  169. package/styles/material.css +159 -114
  170. package/styles/material.scss +1 -0
  171. package/styles/material3-dark-lite.css +799 -0
  172. package/styles/material3-dark-lite.scss +13 -0
  173. package/styles/material3-dark.css +171 -123
  174. package/styles/material3-dark.scss +1 -0
  175. package/styles/material3-lite.css +801 -0
  176. package/styles/material3-lite.scss +13 -0
  177. package/styles/material3.css +171 -123
  178. package/styles/material3.scss +1 -0
  179. package/styles/tailwind-dark-lite.css +751 -0
  180. package/styles/tailwind-dark-lite.scss +13 -0
  181. package/styles/tailwind-dark.css +154 -116
  182. package/styles/tailwind-dark.scss +1 -0
  183. package/styles/tailwind-lite.css +751 -0
  184. package/styles/tailwind-lite.scss +13 -0
  185. package/styles/tailwind.css +154 -116
  186. package/styles/tailwind.scss +1 -0
@@ -1,4 +1,4 @@
1
- import { FileType, ShapeType, ImageFinetuneOption, ImageFilterOption, FrameType, FrameLineStyle, ArrowheadType } from '../index';
1
+ import { FileType, ShapeType, ImageFinetuneOption, ImageFilterOption, FrameType, FrameLineStyle, ArrowheadType, RedactType } from '../index';
2
2
  import { ItemModel } from '@syncfusion/ej2-navigations';
3
3
  /**
4
4
  * This interface is used to specify settings for image finetuning operations, including minimum and maximum values, as well as default values.
@@ -187,6 +187,10 @@ export interface ShapeChangeEventArgs {
187
187
  * Returns `the object of shape which is inserted or moved or deleted or resized or customized the UI.
188
188
  */
189
189
  currentShapeSettings?: ShapeSettings;
190
+ /**
191
+ * Prevents shapes from being dragged outside the image boundary.
192
+ */
193
+ allowShapeOverflow?: boolean;
190
194
  }
191
195
  /**
192
196
  * The Interface which contains the properties for selection change in Image Editor.
@@ -452,6 +456,10 @@ export interface ShapeSettings {
452
456
  * Returns the order of the annotation in which it is placed on the image.
453
457
  */
454
458
  index?: number;
459
+ /**
460
+ * Returns the border radius of the rectangle annotation.
461
+ */
462
+ borderRadius?: number;
455
463
  }
456
464
  /**
457
465
  * The interface which contains the properties for filter option for the image.
@@ -692,6 +700,15 @@ export interface FrameSettings {
692
700
  */
693
701
  lineCount: number;
694
702
  }
703
+ /**
704
+ * The Interface which contains the properties for loading an image into Image Editor.
705
+ */
706
+ export interface ImageSettings {
707
+ /**
708
+ * Returns the background color of an image.
709
+ */
710
+ backgroundColor: string;
711
+ }
695
712
  /**
696
713
  * Interface for active object in the imageEditor.
697
714
  *
@@ -849,6 +866,14 @@ export interface CurrentObject {
849
866
  * Specifies the action collections performed after cropping in Image Editor.
850
867
  */
851
868
  currSelectionPoint?: SelectionPoint;
869
+ /**
870
+ * Specifies the source of the loaded image in Image Editor.
871
+ */
872
+ imageSource?: string;
873
+ /**
874
+ * Specifies the background color of image in Image Editor.
875
+ */
876
+ bgColor?: string;
852
877
  }
853
878
  /**
854
879
  * Defines the stroke color, fillColor and strokeWidth properties for Image Editor.
@@ -872,6 +897,18 @@ export interface StrokeSettings {
872
897
  * Specifies the flip state for the object in Image Editor.
873
898
  */
874
899
  flipState?: string;
900
+ /**
901
+ * Specifies the flip state for the object in Image Editor.
902
+ */
903
+ radius?: number;
904
+ /**
905
+ * Specifies the stroke text color for Text Annotation.
906
+ */
907
+ outlineColor?: string;
908
+ /**
909
+ * Specifies the stroke width for the object in Image Editor.
910
+ */
911
+ outlineWidth?: number;
875
912
  }
876
913
  /**
877
914
  * Defines the destination and source points of image to draw in canvas.
@@ -1212,6 +1249,10 @@ export interface Interaction {
1212
1249
  * Gets function name called from the canvas.
1213
1250
  */
1214
1251
  isResize: boolean;
1252
+ /**
1253
+ * Gets function name called from the canvas.
1254
+ */
1255
+ isRedact: boolean;
1215
1256
  }
1216
1257
  /**
1217
1258
  * Interface for frame support in the Image Editor.
@@ -1462,4 +1503,102 @@ export interface SelectionPoint {
1462
1503
  * Gets the opacity value of image annotation.
1463
1504
  */
1464
1505
  opacity?: number;
1506
+ /**
1507
+ * Prevents shapes from being dragged outside the image boundary.
1508
+ */
1509
+ preventShapeDragOut?: boolean;
1510
+ /**
1511
+ * Gets redact type.
1512
+ */
1513
+ redactType?: string;
1514
+ /**
1515
+ * Gets blur value of redact.
1516
+ */
1517
+ redactBlur?: number;
1518
+ /**
1519
+ * Gets pixelate value of redact.
1520
+ */
1521
+ redactPixelate?: number;
1522
+ /**
1523
+ * Gets redact image.
1524
+ */
1525
+ redactImage?: HTMLCanvasElement;
1526
+ }
1527
+ /**
1528
+ * Interface for RedactSettings in the Image Editor.
1529
+ */
1530
+ export interface RedactSettings {
1531
+ /**
1532
+ * Returns the id of the shape.
1533
+ */
1534
+ type: RedactType;
1535
+ /**
1536
+ * Returns the type of the shape.
1537
+ */
1538
+ id: string;
1539
+ /**
1540
+ * Returns the start x position of the redaction.
1541
+ */
1542
+ startX: number;
1543
+ /**
1544
+ * Returns the start y position of the redaction.
1545
+ */
1546
+ startY: number;
1547
+ /**
1548
+ * Returns the width of the redaction.
1549
+ */
1550
+ width: number;
1551
+ /**
1552
+ * Returns the height of the redaction.
1553
+ */
1554
+ height: number;
1555
+ /**
1556
+ * Returns the intensity of the blur effect used in blur-type redactions within the image editor.
1557
+ *
1558
+ * @remarks
1559
+ * This property is specifically applicable for redactions that use the blur effect. For other redaction, the value should be null by default.
1560
+ * The default blur value is 20, with a permissible range from a minimum of 10 to maximum) of 50 to control the intensity of the redaction.
1561
+ *
1562
+ */
1563
+ blurIntensity?: number;
1564
+ /**
1565
+ * Returns the pixel size for the pixelate-type redaction within the image editor.
1566
+ *
1567
+ * @remarks
1568
+ * This property is specific to redaction using the pixelate effect. For other redaction the pixel size should default to null.
1569
+ * The default value is 5, with a permissible range from a minimum of 1 to a maximum of 20.
1570
+ *
1571
+ * @value
1572
+ * An integer value representing the size of the pixels used in the pixelate redaction. This determines the granularity of the pixelation effect.
1573
+ */
1574
+ pixelSize?: number;
1575
+ }
1576
+ /**
1577
+ * Defines the properties related to actions performed within the Image Editor.
1578
+ *
1579
+ * This interface encapsulates the details of various actions that can be performed on an image, such as cropping, drawing annotations, applying filters, and fine-tuning. It provides a structured way to access and manage the state and data associated with these actions.
1580
+ *
1581
+ */
1582
+ export interface EditCompleteEventArgs {
1583
+ /**
1584
+ * Represents an action performed within the Image Editor.
1585
+ *
1586
+ * Specifies an editing action, such as cropping, drawing annotations, applying filters, undoing or redoing changes, or any other modification made to the image.
1587
+ *
1588
+ */
1589
+ action: string;
1590
+ /**
1591
+ * Represents the event arguments for actions performed in the image editor, such as applying a shape, redaction, frame, filter, fine-tuning adjustments, resizing, zooming, or cropping.
1592
+ *
1593
+ * This property provides detailed information about the specific action taken, including related details for shapes, redactions, frames, filters, fine-tuning, cropping, resizing, and zooming.
1594
+ *
1595
+ * @type {object | RotateEventArgs | FlipEventArgs | CropEventArgs | FinetuneEventArgs | FrameChangeEventArgs | ImageFilterEventArgs |
1596
+ * PanEventArgs | ResizeEventArgs | ShapeChangeEventArgs | ZoomEventArgs }
1597
+ * @default object
1598
+ *
1599
+ * @remarks
1600
+ * This property helps to identify and retrieve detailed information about the action performed in the image editor.
1601
+ *
1602
+ */
1603
+ actionEventArgs: object | RotateEventArgs | FlipEventArgs | CropEventArgs | FinetuneEventArgs | FrameChangeEventArgs | ImageFilterEventArgs | PanEventArgs | ResizeEventArgs | ShapeChangeEventArgs | ZoomEventArgs;
1465
1604
  }
@@ -65,6 +65,7 @@ export declare class ToolbarModule {
65
65
  private fileSelect;
66
66
  private triggerTbarClickEvent;
67
67
  private renderAnnotationBtn;
68
+ private enableDisableCloneBtn;
68
69
  private renderStraightenSlider;
69
70
  private renderCropBtn;
70
71
  private renderTransformBtn;
@@ -80,6 +81,7 @@ export declare class ToolbarModule {
80
81
  private getCropTextContent;
81
82
  private getCurrentShapeIcon;
82
83
  private initShapesToolbarItem;
84
+ private createRectangleRadius;
83
85
  private beforeModeSwitch;
84
86
  private createShapeColor;
85
87
  private createShapeBtn;
@@ -90,8 +92,11 @@ export declare class ToolbarModule {
90
92
  private getFontFamilyItems;
91
93
  private initTextToolbarItem;
92
94
  private createTextColor;
95
+ private createBackgroundColor;
96
+ private createStrokeTextColor;
93
97
  private createTextBtn;
94
98
  private refreshToolbar;
99
+ private updateRedactObj;
95
100
  private updateKBDNavigation;
96
101
  private performCropTransformClick;
97
102
  private getAdjustmentToolbarItem;
@@ -125,6 +130,7 @@ export declare class ToolbarModule {
125
130
  private duplicateShape;
126
131
  private defToolbarClicked;
127
132
  private performDefTbrClick;
133
+ private updateRedactType;
128
134
  private frameToolbarClick;
129
135
  private zoomToFrameRange;
130
136
  private resizeClick;
@@ -148,6 +154,7 @@ export declare class ToolbarModule {
148
154
  private unselectFrameBtn;
149
155
  private updateToolbarItems;
150
156
  private getStrokeWidth;
157
+ private getRectRadius;
151
158
  private cancelPan;
152
159
  private refreshMainToolbar;
153
160
  private destroySubComponents;
@@ -157,4 +164,5 @@ export declare class ToolbarModule {
157
164
  private isSameIndex;
158
165
  private getIndex;
159
166
  getModuleName(): string;
167
+ private redactSlider;
160
168
  }