@syncfusion/ej2-image-editor 21.1.35 → 21.1.36

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 (107) hide show
  1. package/.eslintrc.json +1 -0
  2. package/CHANGELOG.md +50 -0
  3. package/dist/ej2-image-editor.umd.min.js +2 -2
  4. package/dist/ej2-image-editor.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-image-editor.es2015.js +19332 -12536
  6. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-image-editor.es5.js +19360 -12537
  8. package/dist/es6/ej2-image-editor.es5.js.map +1 -1
  9. package/dist/global/ej2-image-editor.min.js +2 -2
  10. package/dist/global/ej2-image-editor.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +11 -11
  13. package/src/image-editor/action/crop.d.ts +36 -0
  14. package/src/image-editor/action/crop.js +829 -0
  15. package/src/image-editor/action/draw.d.ts +125 -0
  16. package/src/image-editor/action/draw.js +3263 -0
  17. package/src/image-editor/action/export.d.ts +23 -0
  18. package/src/image-editor/action/export.js +364 -0
  19. package/src/image-editor/action/filter.d.ts +35 -0
  20. package/src/image-editor/action/filter.js +699 -0
  21. package/src/image-editor/action/freehand-draw.d.ts +61 -0
  22. package/src/image-editor/action/freehand-draw.js +1015 -0
  23. package/src/image-editor/action/index.d.ts +9 -0
  24. package/src/image-editor/action/index.js +9 -0
  25. package/src/image-editor/action/selection.d.ts +139 -0
  26. package/src/image-editor/action/selection.js +4518 -0
  27. package/src/image-editor/action/shape.d.ts +94 -0
  28. package/src/image-editor/action/shape.js +2745 -0
  29. package/src/image-editor/action/transform.d.ts +67 -0
  30. package/src/image-editor/action/transform.js +1859 -0
  31. package/src/image-editor/action/undo-redo.d.ts +43 -0
  32. package/src/image-editor/action/undo-redo.js +800 -0
  33. package/src/image-editor/base/enum.d.ts +189 -0
  34. package/src/image-editor/base/enum.js +198 -0
  35. package/src/image-editor/{image-editor-model.d.ts → base/image-editor-model.d.ts} +130 -41
  36. package/src/image-editor/{image-editor.d.ts → base/image-editor.d.ts} +413 -1107
  37. package/src/image-editor/base/image-editor.js +2270 -0
  38. package/src/image-editor/base/index.d.ts +4 -0
  39. package/src/image-editor/base/index.js +2 -0
  40. package/src/image-editor/base/interface.d.ts +1128 -0
  41. package/src/image-editor/base/interface.js +1 -0
  42. package/src/image-editor/index.d.ts +3 -5
  43. package/src/image-editor/index.js +3 -4
  44. package/src/image-editor/renderer/index.d.ts +1 -0
  45. package/src/image-editor/renderer/index.js +1 -0
  46. package/src/image-editor/renderer/toolbar.d.ts +105 -0
  47. package/src/image-editor/renderer/toolbar.js +3018 -0
  48. package/styles/bootstrap-dark.css +69 -3
  49. package/styles/bootstrap.css +69 -3
  50. package/styles/bootstrap4.css +69 -3
  51. package/styles/bootstrap5-dark.css +69 -3
  52. package/styles/bootstrap5.css +69 -3
  53. package/styles/fabric-dark.css +69 -3
  54. package/styles/fabric.css +69 -3
  55. package/styles/fluent-dark.css +69 -3
  56. package/styles/fluent.css +69 -3
  57. package/styles/highcontrast-light.css +71 -5
  58. package/styles/highcontrast.css +72 -5
  59. package/styles/image-editor/_highcontrast-definition.scss +1 -1
  60. package/styles/image-editor/_highcontrast-light-definition.scss +1 -1
  61. package/styles/image-editor/_layout.scss +21 -7
  62. package/styles/image-editor/_material3-dark-definition.scss +1 -0
  63. package/styles/image-editor/_material3-definition.scss +11 -0
  64. package/styles/image-editor/_theme.scss +7 -2
  65. package/styles/image-editor/bootstrap-dark.css +69 -3
  66. package/styles/image-editor/bootstrap.css +69 -3
  67. package/styles/image-editor/bootstrap4.css +69 -3
  68. package/styles/image-editor/bootstrap5-dark.css +69 -3
  69. package/styles/image-editor/bootstrap5.css +69 -3
  70. package/styles/image-editor/fabric-dark.css +69 -3
  71. package/styles/image-editor/fabric.css +69 -3
  72. package/styles/image-editor/fluent-dark.css +69 -3
  73. package/styles/image-editor/fluent.css +69 -3
  74. package/styles/image-editor/highcontrast-light.css +71 -5
  75. package/styles/image-editor/highcontrast.css +72 -5
  76. package/styles/image-editor/icons/_bootstrap-dark.scss +132 -0
  77. package/styles/image-editor/icons/_bootstrap.scss +132 -0
  78. package/styles/image-editor/icons/_bootstrap4.scss +132 -0
  79. package/styles/image-editor/icons/_bootstrap5.scss +132 -0
  80. package/styles/image-editor/icons/_fabric-dark.scss +132 -0
  81. package/styles/image-editor/icons/_fabric.scss +132 -0
  82. package/styles/image-editor/icons/_fluent.scss +132 -0
  83. package/styles/image-editor/icons/_fusionnew.scss +132 -0
  84. package/styles/image-editor/icons/_highcontrast-light.scss +132 -0
  85. package/styles/image-editor/icons/_highcontrast.scss +132 -0
  86. package/styles/image-editor/icons/_material-dark.scss +132 -0
  87. package/styles/image-editor/icons/_material.scss +132 -0
  88. package/styles/image-editor/icons/_material3-dark.scss +1 -0
  89. package/styles/image-editor/icons/_material3.scss +133 -1
  90. package/styles/image-editor/icons/_tailwind.scss +132 -0
  91. package/styles/image-editor/material-dark.css +69 -3
  92. package/styles/image-editor/material.css +69 -3
  93. package/styles/image-editor/material3-dark.css +453 -0
  94. package/styles/image-editor/material3-dark.scss +14 -0
  95. package/styles/image-editor/material3.css +509 -0
  96. package/styles/image-editor/material3.scss +14 -0
  97. package/styles/image-editor/tailwind-dark.css +69 -3
  98. package/styles/image-editor/tailwind.css +69 -3
  99. package/styles/material-dark.css +69 -3
  100. package/styles/material.css +69 -3
  101. package/styles/material3-dark.css +453 -0
  102. package/styles/material3-dark.scss +3 -0
  103. package/styles/material3.css +509 -0
  104. package/styles/material3.scss +3 -0
  105. package/styles/tailwind-dark.css +69 -3
  106. package/styles/tailwind.css +69 -3
  107. package/src/image-editor/image-editor.js +0 -14729
@@ -0,0 +1,189 @@
1
+ /**
2
+ * An enum representing the file types supported by the image editor.
3
+ *
4
+ * @enum {string}
5
+ */
6
+ export declare enum FileType {
7
+ /** The PNG file type. */
8
+ Png = "Png",
9
+ /** The JPEG file type. */
10
+ Jpeg = "Jpeg",
11
+ /** The SVG file type. */
12
+ Svg = "Svg"
13
+ }
14
+ /**
15
+ * An enumeration representing the direction of an image editor operation.
16
+ *
17
+ * @enum {string}
18
+ */
19
+ export declare enum Direction {
20
+ /** The horizontal direction. */
21
+ Horizontal = "Horizontal",
22
+ /** The vertical direction. */
23
+ Vertical = "Vertical"
24
+ }
25
+ /**
26
+ * An enumeration representing the type of shape to be added in the image editor.
27
+ *
28
+ * @enum {string}
29
+ */
30
+ export declare enum ShapeType {
31
+ /** A rectangle shape. */
32
+ Rectangle = "Rectangle",
33
+ /** An ellipse shape. */
34
+ Ellipse = "Ellipse",
35
+ /** A line shape. */
36
+ Line = "Line",
37
+ /** An arrow shape. */
38
+ Arrow = "Arrow",
39
+ /** A path shape. */
40
+ Path = "Path",
41
+ /** A text shape. */
42
+ Text = "Text",
43
+ /** A freehand drawing shape. */
44
+ FreehandDraw = "FreehandDraw"
45
+ }
46
+ /**
47
+ * An enumeration representing the different ways to trigger zooming in the image editor.
48
+ *
49
+ * @aspNumberEnum
50
+ */
51
+ export declare enum ZoomTrigger {
52
+ /** Zooming triggered by mouse wheel. */
53
+ MouseWheel = 1,
54
+ /** Zooming triggered by pinch gesture. */
55
+ Pinch = 2,
56
+ /** Zooming triggered by command keys. */
57
+ Commands = 4,
58
+ /** Zooming triggered by toolbar button click. */
59
+ Toolbar = 8
60
+ }
61
+ /**
62
+ * * An enum representing the available themes in the image editor.
63
+ */
64
+ export declare enum Theme {
65
+ /** The Bootstrap 5 theme. */
66
+ Bootstrap5 = "Bootstrap5",
67
+ /** The dark variant of the Bootstrap 5 theme. */
68
+ Bootstrap5Dark = "Bootstrap5Dark",
69
+ /** The Tailwind CSS theme. */
70
+ Tailwind = "Tailwind",
71
+ /** The dark variant of the Tailwind CSS theme. */
72
+ TailwindDark = "TailwindDark",
73
+ /** The Fluent UI theme. */
74
+ Fluent = "Fluent",
75
+ /** The dark variant of the Fluent UI theme. */
76
+ FluentDark = "FluentDark",
77
+ /** The Bootstrap 4 theme. */
78
+ Bootstrap4 = "Bootstrap4",
79
+ /** The Bootstrap theme. */
80
+ Bootstrap = "Bootstrap",
81
+ /** The dark variant of the Bootstrap theme. */
82
+ BootstrapDark = "BootstrapDark",
83
+ /** The Material Design theme. */
84
+ Material = "Material",
85
+ /** The dark variant of the Material Design theme. */
86
+ MaterialDark = "MaterialDark",
87
+ /** The Fabric theme. */
88
+ Fabric = "Fabric",
89
+ /** The dark variant of the Fabric theme. */
90
+ FabricDark = "FabricDark",
91
+ /** The high contrast theme. */
92
+ Highcontrast = "Highcontrast"
93
+ }
94
+ /**
95
+ * An enum representing the available toolbar commands in the image editor.
96
+ */
97
+ export declare enum ImageEditorCommand {
98
+ Crop = "Crop",
99
+ Transform = "Transform",
100
+ Annotate = "Annotate",
101
+ ZoomIn = "ZoomIn",
102
+ ZoomOut = "ZoomOut",
103
+ Open = "Open",
104
+ Reset = "Reset",
105
+ Save = "Save",
106
+ Pan = "Pan",
107
+ Move = "Move",
108
+ Pen = "Pen",
109
+ Line = "Line",
110
+ Arrow = "Arrow",
111
+ Path = "Path",
112
+ Rectangle = "Rectangle",
113
+ Ellipse = "Ellipse",
114
+ Text = "Text",
115
+ CustomSelection = "CustomSelection",
116
+ CircleSelection = "CircleSelection",
117
+ SquareSelection = "SquareSelection",
118
+ RatioSelection = "RatioSelection",
119
+ RotateLeft = "RotateLeft",
120
+ RotateRight = "RotateRight",
121
+ FlipHorizontal = "FlipHorizontal",
122
+ FlipVertical = "FlipVertical"
123
+ }
124
+ /**
125
+ * An enumeration of available image filter options.
126
+ *
127
+ * @remarks
128
+ * These options can be used with the `applyImageFilter` method of the image editor control to apply filters to an image.
129
+ */
130
+ export declare enum ImageFilterOption {
131
+ /** Default filter */
132
+ Default = "Default",
133
+ /** Chrome filter */
134
+ Chrome = "Chrome",
135
+ /** Cold filter */
136
+ Cold = "Cold",
137
+ /** Warm filter */
138
+ Warm = "Warm",
139
+ /** Grayscale filter */
140
+ Grayscale = "Grayscale",
141
+ /** Sepia filter */
142
+ Sepia = "Sepia",
143
+ /** Invert filter */
144
+ Invert = "Invert"
145
+ }
146
+ /**
147
+ * An enumeration of available image finetune options.
148
+ *
149
+ * @remarks
150
+ * These options can be used with the `finetuneImage` method of the image editor control to apply finetuning to an image.
151
+ */
152
+ export declare enum ImageFinetuneOption {
153
+ /** Adjust the brightness of the image */
154
+ Brightness = "Brightness",
155
+ /** Adjust the contrast of the image */
156
+ Contrast = "Contrast",
157
+ /** Adjust the hue of the image */
158
+ Hue = "Hue",
159
+ /** Adjust the saturation of the image */
160
+ Saturation = "Saturation",
161
+ /** Adjust the exposure of the image */
162
+ Exposure = "Exposure",
163
+ /** Adjust the opacity of the image */
164
+ Opacity = "Opacity",
165
+ /** Adjust the blur of the image */
166
+ Blur = "Blur"
167
+ }
168
+ /**
169
+ * Specifies the type of arrowhead should be drawn.
170
+ *
171
+ */
172
+ export declare enum ArrowheadType {
173
+ /** Indicates no arrowhead should be drawn. */
174
+ None = "None",
175
+ /** Indicates a normal triangle-shaped arrowhead should be drawn. */
176
+ Arrow = "Arrow",
177
+ /** Indicates a solid triangle-shaped arrowhead should be drawn. */
178
+ SolidArrow = "SolidArrow",
179
+ /** Indicates a circular-shaped arrowhead should be drawn. */
180
+ Circle = "Circle",
181
+ /** Indicates a solid circular-shaped arrowhead should be drawn. */
182
+ SolidCircle = "SolidCircle",
183
+ /** Indicates a square-shaped arrowhead should be drawn. */
184
+ Square = "Square",
185
+ /** Indicates a solid square-shaped arrowhead should be drawn. */
186
+ SolidSquare = "SolidSquare",
187
+ /** Indicates a bar shaped arrowhead should be drawn. */
188
+ Bar = "Bar"
189
+ }
@@ -0,0 +1,198 @@
1
+ /**
2
+ * An enum representing the file types supported by the image editor.
3
+ *
4
+ * @enum {string}
5
+ */
6
+ export var FileType;
7
+ (function (FileType) {
8
+ /** The PNG file type. */
9
+ FileType["Png"] = "Png";
10
+ /** The JPEG file type. */
11
+ FileType["Jpeg"] = "Jpeg";
12
+ /** The SVG file type. */
13
+ FileType["Svg"] = "Svg";
14
+ })(FileType || (FileType = {}));
15
+ /**
16
+ * An enumeration representing the direction of an image editor operation.
17
+ *
18
+ * @enum {string}
19
+ */
20
+ export var Direction;
21
+ (function (Direction) {
22
+ /** The horizontal direction. */
23
+ Direction["Horizontal"] = "Horizontal";
24
+ /** The vertical direction. */
25
+ Direction["Vertical"] = "Vertical";
26
+ })(Direction || (Direction = {}));
27
+ /**
28
+ * An enumeration representing the type of shape to be added in the image editor.
29
+ *
30
+ * @enum {string}
31
+ */
32
+ export var ShapeType;
33
+ (function (ShapeType) {
34
+ /** A rectangle shape. */
35
+ ShapeType["Rectangle"] = "Rectangle";
36
+ /** An ellipse shape. */
37
+ ShapeType["Ellipse"] = "Ellipse";
38
+ /** A line shape. */
39
+ ShapeType["Line"] = "Line";
40
+ /** An arrow shape. */
41
+ ShapeType["Arrow"] = "Arrow";
42
+ /** A path shape. */
43
+ ShapeType["Path"] = "Path";
44
+ /** A text shape. */
45
+ ShapeType["Text"] = "Text";
46
+ /** A freehand drawing shape. */
47
+ ShapeType["FreehandDraw"] = "FreehandDraw";
48
+ })(ShapeType || (ShapeType = {}));
49
+ /**
50
+ * An enumeration representing the different ways to trigger zooming in the image editor.
51
+ *
52
+ * @aspNumberEnum
53
+ */
54
+ export var ZoomTrigger;
55
+ (function (ZoomTrigger) {
56
+ /** Zooming triggered by mouse wheel. */
57
+ ZoomTrigger[ZoomTrigger["MouseWheel"] = 1] = "MouseWheel";
58
+ /** Zooming triggered by pinch gesture. */
59
+ ZoomTrigger[ZoomTrigger["Pinch"] = 2] = "Pinch";
60
+ /** Zooming triggered by command keys. */
61
+ ZoomTrigger[ZoomTrigger["Commands"] = 4] = "Commands";
62
+ /** Zooming triggered by toolbar button click. */
63
+ ZoomTrigger[ZoomTrigger["Toolbar"] = 8] = "Toolbar";
64
+ })(ZoomTrigger || (ZoomTrigger = {}));
65
+ /**
66
+ * * An enum representing the available themes in the image editor.
67
+ */
68
+ export var Theme;
69
+ (function (Theme) {
70
+ /** The Bootstrap 5 theme. */
71
+ Theme["Bootstrap5"] = "Bootstrap5";
72
+ /** The dark variant of the Bootstrap 5 theme. */
73
+ Theme["Bootstrap5Dark"] = "Bootstrap5Dark";
74
+ /** The Tailwind CSS theme. */
75
+ Theme["Tailwind"] = "Tailwind";
76
+ /** The dark variant of the Tailwind CSS theme. */
77
+ Theme["TailwindDark"] = "TailwindDark";
78
+ /** The Fluent UI theme. */
79
+ Theme["Fluent"] = "Fluent";
80
+ /** The dark variant of the Fluent UI theme. */
81
+ Theme["FluentDark"] = "FluentDark";
82
+ /** The Bootstrap 4 theme. */
83
+ Theme["Bootstrap4"] = "Bootstrap4";
84
+ /** The Bootstrap theme. */
85
+ Theme["Bootstrap"] = "Bootstrap";
86
+ /** The dark variant of the Bootstrap theme. */
87
+ Theme["BootstrapDark"] = "BootstrapDark";
88
+ /** The Material Design theme. */
89
+ Theme["Material"] = "Material";
90
+ /** The dark variant of the Material Design theme. */
91
+ Theme["MaterialDark"] = "MaterialDark";
92
+ /** The Fabric theme. */
93
+ Theme["Fabric"] = "Fabric";
94
+ /** The dark variant of the Fabric theme. */
95
+ Theme["FabricDark"] = "FabricDark";
96
+ /** The high contrast theme. */
97
+ Theme["Highcontrast"] = "Highcontrast";
98
+ })(Theme || (Theme = {}));
99
+ /**
100
+ * An enum representing the available toolbar commands in the image editor.
101
+ */
102
+ export var ImageEditorCommand;
103
+ (function (ImageEditorCommand) {
104
+ ImageEditorCommand["Crop"] = "Crop";
105
+ ImageEditorCommand["Transform"] = "Transform";
106
+ ImageEditorCommand["Annotate"] = "Annotate";
107
+ ImageEditorCommand["ZoomIn"] = "ZoomIn";
108
+ ImageEditorCommand["ZoomOut"] = "ZoomOut";
109
+ ImageEditorCommand["Open"] = "Open";
110
+ ImageEditorCommand["Reset"] = "Reset";
111
+ ImageEditorCommand["Save"] = "Save";
112
+ ImageEditorCommand["Pan"] = "Pan";
113
+ ImageEditorCommand["Move"] = "Move";
114
+ ImageEditorCommand["Pen"] = "Pen";
115
+ ImageEditorCommand["Line"] = "Line";
116
+ ImageEditorCommand["Arrow"] = "Arrow";
117
+ ImageEditorCommand["Path"] = "Path";
118
+ ImageEditorCommand["Rectangle"] = "Rectangle";
119
+ ImageEditorCommand["Ellipse"] = "Ellipse";
120
+ ImageEditorCommand["Text"] = "Text";
121
+ ImageEditorCommand["CustomSelection"] = "CustomSelection";
122
+ ImageEditorCommand["CircleSelection"] = "CircleSelection";
123
+ ImageEditorCommand["SquareSelection"] = "SquareSelection";
124
+ ImageEditorCommand["RatioSelection"] = "RatioSelection";
125
+ ImageEditorCommand["RotateLeft"] = "RotateLeft";
126
+ ImageEditorCommand["RotateRight"] = "RotateRight";
127
+ ImageEditorCommand["FlipHorizontal"] = "FlipHorizontal";
128
+ ImageEditorCommand["FlipVertical"] = "FlipVertical";
129
+ })(ImageEditorCommand || (ImageEditorCommand = {}));
130
+ /**
131
+ * An enumeration of available image filter options.
132
+ *
133
+ * @remarks
134
+ * These options can be used with the `applyImageFilter` method of the image editor control to apply filters to an image.
135
+ */
136
+ export var ImageFilterOption;
137
+ (function (ImageFilterOption) {
138
+ /** Default filter */
139
+ ImageFilterOption["Default"] = "Default";
140
+ /** Chrome filter */
141
+ ImageFilterOption["Chrome"] = "Chrome";
142
+ /** Cold filter */
143
+ ImageFilterOption["Cold"] = "Cold";
144
+ /** Warm filter */
145
+ ImageFilterOption["Warm"] = "Warm";
146
+ /** Grayscale filter */
147
+ ImageFilterOption["Grayscale"] = "Grayscale";
148
+ /** Sepia filter */
149
+ ImageFilterOption["Sepia"] = "Sepia";
150
+ /** Invert filter */
151
+ ImageFilterOption["Invert"] = "Invert";
152
+ })(ImageFilterOption || (ImageFilterOption = {}));
153
+ /**
154
+ * An enumeration of available image finetune options.
155
+ *
156
+ * @remarks
157
+ * These options can be used with the `finetuneImage` method of the image editor control to apply finetuning to an image.
158
+ */
159
+ export var ImageFinetuneOption;
160
+ (function (ImageFinetuneOption) {
161
+ /** Adjust the brightness of the image */
162
+ ImageFinetuneOption["Brightness"] = "Brightness";
163
+ /** Adjust the contrast of the image */
164
+ ImageFinetuneOption["Contrast"] = "Contrast";
165
+ /** Adjust the hue of the image */
166
+ ImageFinetuneOption["Hue"] = "Hue";
167
+ /** Adjust the saturation of the image */
168
+ ImageFinetuneOption["Saturation"] = "Saturation";
169
+ /** Adjust the exposure of the image */
170
+ ImageFinetuneOption["Exposure"] = "Exposure";
171
+ /** Adjust the opacity of the image */
172
+ ImageFinetuneOption["Opacity"] = "Opacity";
173
+ /** Adjust the blur of the image */
174
+ ImageFinetuneOption["Blur"] = "Blur";
175
+ })(ImageFinetuneOption || (ImageFinetuneOption = {}));
176
+ /**
177
+ * Specifies the type of arrowhead should be drawn.
178
+ *
179
+ */
180
+ export var ArrowheadType;
181
+ (function (ArrowheadType) {
182
+ /** Indicates no arrowhead should be drawn. */
183
+ ArrowheadType["None"] = "None";
184
+ /** Indicates a normal triangle-shaped arrowhead should be drawn. */
185
+ ArrowheadType["Arrow"] = "Arrow";
186
+ /** Indicates a solid triangle-shaped arrowhead should be drawn. */
187
+ ArrowheadType["SolidArrow"] = "SolidArrow";
188
+ /** Indicates a circular-shaped arrowhead should be drawn. */
189
+ ArrowheadType["Circle"] = "Circle";
190
+ /** Indicates a solid circular-shaped arrowhead should be drawn. */
191
+ ArrowheadType["SolidCircle"] = "SolidCircle";
192
+ /** Indicates a square-shaped arrowhead should be drawn. */
193
+ ArrowheadType["Square"] = "Square";
194
+ /** Indicates a solid square-shaped arrowhead should be drawn. */
195
+ ArrowheadType["SolidSquare"] = "SolidSquare";
196
+ /** Indicates a bar shaped arrowhead should be drawn. */
197
+ ArrowheadType["Bar"] = "Bar";
198
+ })(ArrowheadType || (ArrowheadType = {}));
@@ -1,5 +1,4 @@
1
- import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, extend } from '@syncfusion/ej2-base';
2
- import {ImageFinetuneValue,ZoomTrigger,Point,Theme,ImageEditorCommand,SaveEventArgs,BeforeSaveEventArgs,ZoomEventArgs,PanEventArgs,CropEventArgs,RotateEventArgs,FlipEventArgs,ShapeChangeEventArgs,OpenEventArgs,ToolbarEventArgs,ImageFilterEventArgs,FinetuneEventArgs,ImageEditorClickEventArgs,QuickAccessToolbarEventArgs} from "./image-editor";
1
+ import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, ModuleDeclaration, extend, isBlazor, BlazorDotnetObject } from '@syncfusion/ej2-base';
3
2
  import {ComponentModel} from '@syncfusion/ej2-base';
4
3
 
5
4
  /**
@@ -111,6 +110,7 @@ export interface ZoomSettingsModel {
111
110
  * By default, this property is set to `null`, which enables all types of zooming.
112
111
  *
113
112
  * @default null
113
+ * @aspNumberEnum
114
114
  */
115
115
  zoomTrigger?: ZoomTrigger;
116
116
 
@@ -118,7 +118,6 @@ export interface ZoomSettingsModel {
118
118
  * Specifies the minimum zooming level to limit the zooming.
119
119
  * An integer value that specifies the minimum zooming level. And the default value is 1 (100%).
120
120
  *
121
- * @private
122
121
  * @remarks
123
122
  * The given value is considered as percentage.
124
123
  *
@@ -158,6 +157,40 @@ export interface ZoomSettingsModel {
158
157
 
159
158
  }
160
159
 
160
+ /**
161
+ * Interface for a class SelectionSettings
162
+ */
163
+ export interface SelectionSettingsModel {
164
+
165
+ /**
166
+ * Specifies a boolean value whether to show circle on selection in the image editor.
167
+ *
168
+ * @type {boolean}
169
+ *
170
+ * @default true
171
+ */
172
+ showCircle?: boolean;
173
+
174
+ /**
175
+ * Represents stroke color of circle selection in the image editor.
176
+ *
177
+ * @type {string}
178
+ *
179
+ * @default null
180
+ */
181
+ strokeColor?: string;
182
+
183
+ /**
184
+ * Represents fill color of circle selection in the image editor.
185
+ *
186
+ * @type {string}
187
+ *
188
+ * @default null
189
+ */
190
+ fillColor?: string;
191
+
192
+ }
193
+
161
194
  /**
162
195
  * Interface for a class ImageEditor
163
196
  */
@@ -228,7 +261,7 @@ export interface ImageEditorModel extends ComponentModel{
228
261
  * If the property is defined as empty collection, the toolbar will not be rendered.
229
262
  * The preconfigured toolbar commands are
230
263
  * - Crop: helps to crop an image as ellipse, square, various ratio aspects, custom selection with resize, drag and drop.
231
- * - Annotate: help to insert a shape on image that supports rectangle, ellipse, line, arrow, text and freehand drawing with resize, drag and drop, and customize its appearance.
264
+ * - Annotate: help to insert a shape on image that supports rectangle, ellipse, line, arrow, path, text and freehand drawing with resize, drag and drop, and customize its appearance.
232
265
  * - Transform: helps to rotate and flip an image.
233
266
  * - Finetunes: helps to perform adjustments on an image.
234
267
  * - Filters: helps to perform predefined color filters.
@@ -238,20 +271,12 @@ export interface ImageEditorModel extends ComponentModel{
238
271
  * - Open: open an image to perform editing.
239
272
  * - Reset: reset the modification and restore the original image.
240
273
  *
241
- * @example
242
- * // Define toolbar items as an array of strings
243
- * var toolbarItems = ["Crop", "Annotate", "Transform", "ZoomIn", "ZoomOut", "Pan", "Move", "Save", "Open", "Reset"];
244
- *
245
- * // Define toolbar items as an array of ItemModel objects
246
- * var toolbarItems = [
247
- * { text: "Crop", tooltipText: "Crop", prefixIcon: "e-icon e-crop-icon" }
248
- * ]
274
+ * {% codeBlock src='image-editor/toolbar/index.md' %}{% endcodeBlock %}
249
275
  *
250
276
  * @remarks
251
277
  * If the toolbarTemplate property is defined in the control, the toolbar will be rendered based on the toolbarTemplate property.
252
278
  * @default null
253
279
  *
254
- * {% codeBlock src='image-editor/toolbar/index.md' %}{% endcodeBlock %}
255
280
  */
256
281
  toolbar?: (string | ImageEditorCommand | ItemModel)[];
257
282
 
@@ -259,15 +284,17 @@ export interface ImageEditorModel extends ComponentModel{
259
284
  * Specifies a custom template for the toolbar of an image editor control.
260
285
  * A string that specifies a custom template for the toolbar of the image editor. If this property is defined, the 'toolbar' property will not have any effect.
261
286
  *
287
+ * {% codeBlock src='image-editor/toolbarTemplate/index.md' %}{% endcodeBlock %}
288
+ *
262
289
  * @remarks
263
290
  * Use this property if you want to customize the entire toolbar in your own way. The template should be a string that contains the HTML markup for the custom toolbar.
264
291
  *
265
292
  * @default null
293
+ * @aspType string
266
294
  *
267
- * {% codeBlock src='image-editor/toolbarTemplate/index.md' %}{% endcodeBlock %}
268
295
  *
269
296
  */
270
- toolbarTemplate?: string;
297
+ toolbarTemplate?: string | Function;
271
298
 
272
299
  /**
273
300
  * Specifies the width of an Image Editor.
@@ -293,33 +320,54 @@ export interface ImageEditorModel extends ComponentModel{
293
320
  allowUndoRedo?: boolean;
294
321
 
295
322
  /**
296
- * Specifies whether to show/hide the Quick Access Toolbar while select the shapes.
297
- *
298
- * @remarks
299
- * The Quick Access Toolbar is a small customizable toolbar that shows commonly used commands while select the shapes.
300
- * Set this property to true to show the Quick Access Toolbar, and false to hide it.
323
+ * Specifies whether to show/hide the quick access toolbar.
301
324
  *
302
- * @default false
303
- * @private
325
+ * @default true
304
326
  *
305
327
  * @remarks
306
328
  * Set this property to true to show the quick access toolbar, and false to hide it.
329
+ * ```html
330
+ * <div id='imageeditor'></div>
331
+ * ```
332
+ * ```typescript
333
+ * <script>
334
+ * var imageObj = new ImageEditor({
335
+ * showQuickAccessToolbar : true
336
+ * });
337
+ * imageObj.appendTo("#imageeditor");
338
+ * </script>
339
+ * ```
307
340
  */
308
341
  showQuickAccessToolbar?: boolean;
309
342
 
310
343
  /**
311
- * Specifies a custom template content for the quick access toolbar of an Image Editor control.
344
+ * Specifies a template for the quick access toolbar.
345
+ * Use this property to customize the quick access toolbar.
312
346
  *
313
347
  * @default null
314
- * @private
348
+ * @aspType string
315
349
  *
316
350
  * @remarks
317
- * This property only works if the "showQuickAccessToolbar" property is set to true.
318
- *
319
- * {% codeBlock src='image-editor/quickAccessToolbarTemplate/index.md' %}{% endcodeBlock %}
320
- *
321
- */
322
- quickAccessToolbarTemplate?: string;
351
+ * This property only works if the "showQuickToolbar" property is set to true.
352
+ * ```html
353
+ * <div id='imageeditor'></div>
354
+ * ```
355
+ * ```typescript
356
+ * <script>
357
+ * var imageObj = new ImageEditor({
358
+ * showQuickAccessToolbar : true,
359
+ * quickAccessToolbarTemplate: '#toolbarTemplate'
360
+ * });
361
+ * imageObj.appendTo("#imageeditor");
362
+ * </script>
363
+ * <script id="toolbarTemplate" type="text/x-template">
364
+ * <div class = 'e-toolbar'>
365
+ * <button id= 'dltbtn'></button>
366
+ * </div>
367
+ * </script>
368
+ * ```
369
+ */
370
+ quickAccessToolbarTemplate?: string | Function;
323
371
 
324
372
  /**
325
373
  * Specifies whether to prevent user interaction with the image editor control.
@@ -357,6 +405,8 @@ export interface ImageEditorModel extends ComponentModel{
357
405
  /**
358
406
  * Specifies the finetune settings option which can be used to perform color adjustments in the image editor control.
359
407
  *
408
+ * {% codeBlock src='image-editor/finetuneSettings/index.md' %}{% endcodeBlock %}
409
+ *
360
410
  * @remarks
361
411
  * A 'FinetuneSettingsModel' value that specifies the the finetune options which are enabled in image editor control.
362
412
  * If the property is not specified, then the default values will be applied for minimum, maximum, and value properties for all finetune options.
@@ -370,8 +420,6 @@ export interface ImageEditorModel extends ComponentModel{
370
420
  * - Opacity: The state or quality of being opaque or transparent, not allowing light to pass through the image. Opacity can be controlled by opacity property.
371
421
  * - Blur : Adjusting the blur can make an image unfocused or unclear. Blur can be controlled by blur property.
372
422
  *
373
- * {% codeBlock src='image-editor/finetuneSettings/index.md' %}{% endcodeBlock %}
374
- *
375
423
  */
376
424
  finetuneSettings?: FinetuneSettingsModel;
377
425
 
@@ -379,6 +427,8 @@ export interface ImageEditorModel extends ComponentModel{
379
427
  * Specifies the zoom settings to perform zooming action.
380
428
  * A 'ZoomSettingsModel' value that specifies the the zoom related options which are enabled in image editor control. The default value is null.
381
429
  *
430
+ * {% codeBlock src='image-editor/zoomSettings/index.md' %}{% endcodeBlock %}
431
+ *
382
432
  * @remarks
383
433
  * If the property is not specified, then the default settings will be applied for all the properties available in zoom settings.
384
434
  *
@@ -389,11 +439,24 @@ export interface ImageEditorModel extends ComponentModel{
389
439
  * - zoomTrigger: Specifies the types of zooming to be supported in the image editor.
390
440
  * - zoomPoint: Specifies the x and y coordinates in which the zooming performed on initial load.
391
441
  *
392
- * {% codeBlock src='image-editor/zoomSettings/index.md' %}{% endcodeBlock %}
393
- *
394
442
  */
395
443
  zoomSettings?: ZoomSettingsModel;
396
444
 
445
+ /**
446
+ * Specifies the selection settings to customize selection.
447
+ * A 'SelectionSettingsModel' value that specifies the the customization related options which are enabled in image editor control. The default value is null.
448
+ *
449
+ * @remarks
450
+ * If the property is not specified, then the default settings will be applied for all the properties available in selection settings.
451
+ *
452
+ * The following options are available in `selectionSettings`.
453
+ * - showCircle: Specifies whether to show / hide circles on selection.
454
+ * - strokeColor: Specifies the stroke color of circle selection.
455
+ * - fillColor: Specifies the fill color of circle selection.
456
+ *
457
+ */
458
+ selectionSettings?: SelectionSettingsModel;
459
+
397
460
  /**
398
461
  * Event callback that is raised before an image is saved.
399
462
  *
@@ -457,6 +520,13 @@ export interface ImageEditorModel extends ComponentModel{
457
520
  */
458
521
  shapeChanging?: EmitType<ShapeChangeEventArgs>
459
522
 
523
+ /**
524
+ * Event callback that is raised while changing selection in an Image Editor.
525
+ *
526
+ * @event selectionChanging
527
+ */
528
+ selectionChanging?: EmitType<SelectionChangeEventArgs>
529
+
460
530
  /**
461
531
  * Event callback that is raised once an image is opened in an Image Editor.
462
532
  *
@@ -480,11 +550,11 @@ export interface ImageEditorModel extends ComponentModel{
480
550
 
481
551
  /**
482
552
  * Event callback that is raised while updating/refreshing the toolbar
553
+ *
554
+ * {% codeBlock src='image-editor/toolbarUpdating/index.md' %}{% endcodeBlock %}
483
555
  *
484
556
  * @event toolbarUpdating
485
557
  *
486
- * {% codeBlock src='image-editor/toolbarUpdating/index.md' %}{% endcodeBlock %}
487
- *
488
558
  */
489
559
  toolbarUpdating?: EmitType<ToolbarEventArgs>
490
560
 
@@ -517,10 +587,9 @@ export interface ImageEditorModel extends ComponentModel{
517
587
  click?: EmitType<ImageEditorClickEventArgs>
518
588
 
519
589
  /**
520
- * Event callback that is triggered when the quick access toolbar is opening.
590
+ * Event callback that is raised when opening the quick access toolbar.
521
591
  *
522
- * @event quickAccessToolbarOpening
523
- * @private
592
+ * @event quickAccessToolbarOpen
524
593
  *
525
594
  * @remarks
526
595
  * Use this event to customize the toolbar items that appear in the quick access toolbar.
@@ -529,9 +598,29 @@ export interface ImageEditorModel extends ComponentModel{
529
598
  * The string values representing the names of the built-in toolbar items to display.
530
599
  * The ItemModel values representing the ItemModel of custom toolbar items to display.
531
600
  *
532
- * {% codeBlock src='image-editor/quickAccessToolbarOpening/index.md' %}{% endcodeBlock %}
601
+ * ```html
602
+ * <div id='imageeditor'></div>
603
+ * ```
604
+ * ```typescript
605
+ * <script>
606
+ * var imageObj = new ImageEditor({
607
+ * showQuickAccessToolbar : true,
608
+ * quickAccessToolbarOpen: (args: QuickAccessToolbarEventArgs)=> {
609
+ * args.toolbarItems = [“Delete”, {text: “custom”}];
610
+ * }
611
+ *
612
+ * });
613
+ * imageObj.appendTo("#imageeditor");
614
+ * </script>
615
+ */
616
+ quickAccessToolbarOpen?: EmitType<QuickAccessToolbarEventArgs>
617
+
618
+ /**
619
+ * Event callback that is raised once the quick access toolbar item is clicked.
620
+ *
621
+ * @event quickAccessToolbarItemClick
533
622
  *
534
623
  */
535
- quickAccessToolbarOpening?: EmitType<QuickAccessToolbarEventArgs>
624
+ quickAccessToolbarItemClick?: EmitType<ClickEventArgs>
536
625
 
537
626
  }