@syncfusion/ej2-image-editor 21.2.10 → 22.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.
- package/.eslintrc.json +1 -0
- package/CHANGELOG.md +8 -32
- package/dist/ej2-image-editor.umd.min.js +2 -2
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +19320 -12622
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +19139 -12414
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +2 -2
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/image-editor/action/crop.d.ts +36 -0
- package/src/image-editor/action/crop.js +829 -0
- package/src/image-editor/action/draw.d.ts +125 -0
- package/src/image-editor/action/draw.js +3263 -0
- package/src/image-editor/action/export.d.ts +23 -0
- package/src/image-editor/action/export.js +364 -0
- package/src/image-editor/action/filter.d.ts +35 -0
- package/src/image-editor/action/filter.js +699 -0
- package/src/image-editor/action/freehand-draw.d.ts +61 -0
- package/src/image-editor/action/freehand-draw.js +1015 -0
- package/src/image-editor/action/index.d.ts +9 -0
- package/src/image-editor/action/index.js +9 -0
- package/src/image-editor/action/selection.d.ts +139 -0
- package/src/image-editor/action/selection.js +4518 -0
- package/src/image-editor/action/shape.d.ts +94 -0
- package/src/image-editor/action/shape.js +2745 -0
- package/src/image-editor/action/transform.d.ts +67 -0
- package/src/image-editor/action/transform.js +1859 -0
- package/src/image-editor/action/undo-redo.d.ts +43 -0
- package/src/image-editor/action/undo-redo.js +800 -0
- package/src/image-editor/base/enum.d.ts +189 -0
- package/src/image-editor/base/enum.js +198 -0
- package/src/image-editor/{image-editor-model.d.ts → base/image-editor-model.d.ts} +130 -42
- package/src/image-editor/{image-editor.d.ts → base/image-editor.d.ts} +413 -1111
- package/src/image-editor/base/image-editor.js +2270 -0
- package/src/image-editor/base/index.d.ts +4 -0
- package/src/image-editor/base/index.js +2 -0
- package/src/image-editor/base/interface.d.ts +1128 -0
- package/src/image-editor/base/interface.js +1 -0
- package/src/image-editor/index.d.ts +3 -5
- package/src/image-editor/index.js +3 -4
- package/src/image-editor/renderer/index.d.ts +1 -0
- package/src/image-editor/renderer/index.js +1 -0
- package/src/image-editor/renderer/toolbar.d.ts +105 -0
- package/src/image-editor/renderer/toolbar.js +3018 -0
- package/styles/bootstrap-dark.css +69 -3
- package/styles/bootstrap.css +69 -3
- package/styles/bootstrap4.css +69 -3
- package/styles/bootstrap5-dark.css +69 -3
- package/styles/bootstrap5.css +69 -3
- package/styles/fabric-dark.css +69 -3
- package/styles/fabric.css +69 -3
- package/styles/fluent-dark.css +69 -3
- package/styles/fluent.css +69 -3
- package/styles/highcontrast-light.css +71 -5
- package/styles/highcontrast.css +72 -5
- package/styles/image-editor/_highcontrast-definition.scss +1 -1
- package/styles/image-editor/_highcontrast-light-definition.scss +1 -1
- package/styles/image-editor/_layout.scss +21 -7
- package/styles/image-editor/_material3-dark-definition.scss +1 -0
- package/styles/image-editor/_material3-definition.scss +11 -0
- package/styles/image-editor/_theme.scss +7 -2
- package/styles/image-editor/bootstrap-dark.css +69 -3
- package/styles/image-editor/bootstrap.css +69 -3
- package/styles/image-editor/bootstrap4.css +69 -3
- package/styles/image-editor/bootstrap5-dark.css +69 -3
- package/styles/image-editor/bootstrap5.css +69 -3
- package/styles/image-editor/fabric-dark.css +69 -3
- package/styles/image-editor/fabric.css +69 -3
- package/styles/image-editor/fluent-dark.css +69 -3
- package/styles/image-editor/fluent.css +69 -3
- package/styles/image-editor/highcontrast-light.css +71 -5
- package/styles/image-editor/highcontrast.css +72 -5
- package/styles/image-editor/icons/_bootstrap-dark.scss +132 -0
- package/styles/image-editor/icons/_bootstrap.scss +132 -0
- package/styles/image-editor/icons/_bootstrap4.scss +132 -0
- package/styles/image-editor/icons/_bootstrap5.scss +132 -0
- package/styles/image-editor/icons/_fabric-dark.scss +132 -0
- package/styles/image-editor/icons/_fabric.scss +132 -0
- package/styles/image-editor/icons/_fluent.scss +132 -0
- package/styles/image-editor/icons/_fusionnew.scss +132 -0
- package/styles/image-editor/icons/_highcontrast-light.scss +132 -0
- package/styles/image-editor/icons/_highcontrast.scss +132 -0
- package/styles/image-editor/icons/_material-dark.scss +132 -0
- package/styles/image-editor/icons/_material.scss +132 -0
- package/styles/image-editor/icons/_material3-dark.scss +1 -0
- package/styles/image-editor/icons/_material3.scss +133 -1
- package/styles/image-editor/icons/_tailwind.scss +132 -0
- package/styles/image-editor/material-dark.css +69 -3
- package/styles/image-editor/material.css +69 -3
- package/styles/image-editor/material3-dark.css +453 -0
- package/styles/image-editor/material3-dark.scss +14 -0
- package/styles/image-editor/material3.css +509 -0
- package/styles/image-editor/material3.scss +14 -0
- package/styles/image-editor/tailwind-dark.css +69 -3
- package/styles/image-editor/tailwind.css +69 -3
- package/styles/material-dark.css +69 -3
- package/styles/material.css +69 -3
- package/styles/material3-dark.css +453 -0
- package/styles/material3-dark.scss +3 -0
- package/styles/material3.css +509 -0
- package/styles/material3.scss +3 -0
- package/styles/tailwind-dark.css +69 -3
- package/styles/tailwind.css +69 -3
- package/src/image-editor/image-editor.js +0 -14827
|
@@ -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
|
/**
|
|
@@ -110,8 +109,8 @@ export interface ZoomSettingsModel {
|
|
|
110
109
|
*
|
|
111
110
|
* By default, this property is set to `null`, which enables all types of zooming.
|
|
112
111
|
*
|
|
113
|
-
* @aspNumberEnum
|
|
114
112
|
* @default null
|
|
113
|
+
* @aspNumberEnum
|
|
115
114
|
*/
|
|
116
115
|
zoomTrigger?: ZoomTrigger;
|
|
117
116
|
|
|
@@ -119,7 +118,6 @@ export interface ZoomSettingsModel {
|
|
|
119
118
|
* Specifies the minimum zooming level to limit the zooming.
|
|
120
119
|
* An integer value that specifies the minimum zooming level. And the default value is 1 (100%).
|
|
121
120
|
*
|
|
122
|
-
* @private
|
|
123
121
|
* @remarks
|
|
124
122
|
* The given value is considered as percentage.
|
|
125
123
|
*
|
|
@@ -159,6 +157,40 @@ export interface ZoomSettingsModel {
|
|
|
159
157
|
|
|
160
158
|
}
|
|
161
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
|
+
|
|
162
194
|
/**
|
|
163
195
|
* Interface for a class ImageEditor
|
|
164
196
|
*/
|
|
@@ -229,7 +261,7 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
229
261
|
* If the property is defined as empty collection, the toolbar will not be rendered.
|
|
230
262
|
* The preconfigured toolbar commands are
|
|
231
263
|
* - Crop: helps to crop an image as ellipse, square, various ratio aspects, custom selection with resize, drag and drop.
|
|
232
|
-
* - 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.
|
|
233
265
|
* - Transform: helps to rotate and flip an image.
|
|
234
266
|
* - Finetunes: helps to perform adjustments on an image.
|
|
235
267
|
* - Filters: helps to perform predefined color filters.
|
|
@@ -239,20 +271,12 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
239
271
|
* - Open: open an image to perform editing.
|
|
240
272
|
* - Reset: reset the modification and restore the original image.
|
|
241
273
|
*
|
|
242
|
-
*
|
|
243
|
-
* // Define toolbar items as an array of strings
|
|
244
|
-
* var toolbarItems = ["Crop", "Annotate", "Transform", "ZoomIn", "ZoomOut", "Pan", "Move", "Save", "Open", "Reset"];
|
|
245
|
-
*
|
|
246
|
-
* // Define toolbar items as an array of ItemModel objects
|
|
247
|
-
* var toolbarItems = [
|
|
248
|
-
* { text: "Crop", tooltipText: "Crop", prefixIcon: "e-icon e-crop-icon" }
|
|
249
|
-
* ]
|
|
274
|
+
* {% codeBlock src='image-editor/toolbar/index.md' %}{% endcodeBlock %}
|
|
250
275
|
*
|
|
251
276
|
* @remarks
|
|
252
277
|
* If the toolbarTemplate property is defined in the control, the toolbar will be rendered based on the toolbarTemplate property.
|
|
253
278
|
* @default null
|
|
254
279
|
*
|
|
255
|
-
* {% codeBlock src='image-editor/toolbar/index.md' %}{% endcodeBlock %}
|
|
256
280
|
*/
|
|
257
281
|
toolbar?: (string | ImageEditorCommand | ItemModel)[];
|
|
258
282
|
|
|
@@ -260,15 +284,17 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
260
284
|
* Specifies a custom template for the toolbar of an image editor control.
|
|
261
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.
|
|
262
286
|
*
|
|
287
|
+
* {% codeBlock src='image-editor/toolbarTemplate/index.md' %}{% endcodeBlock %}
|
|
288
|
+
*
|
|
263
289
|
* @remarks
|
|
264
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.
|
|
265
291
|
*
|
|
266
292
|
* @default null
|
|
293
|
+
* @aspType string
|
|
267
294
|
*
|
|
268
|
-
* {% codeBlock src='image-editor/toolbarTemplate/index.md' %}{% endcodeBlock %}
|
|
269
295
|
*
|
|
270
296
|
*/
|
|
271
|
-
toolbarTemplate?: string;
|
|
297
|
+
toolbarTemplate?: string | Function;
|
|
272
298
|
|
|
273
299
|
/**
|
|
274
300
|
* Specifies the width of an Image Editor.
|
|
@@ -294,33 +320,54 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
294
320
|
allowUndoRedo?: boolean;
|
|
295
321
|
|
|
296
322
|
/**
|
|
297
|
-
* Specifies whether to show/hide the
|
|
298
|
-
*
|
|
299
|
-
* @remarks
|
|
300
|
-
* The Quick Access Toolbar is a small customizable toolbar that shows commonly used commands while select the shapes.
|
|
301
|
-
* 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.
|
|
302
324
|
*
|
|
303
|
-
* @default
|
|
304
|
-
* @private
|
|
325
|
+
* @default true
|
|
305
326
|
*
|
|
306
327
|
* @remarks
|
|
307
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
|
+
* ```
|
|
308
340
|
*/
|
|
309
341
|
showQuickAccessToolbar?: boolean;
|
|
310
342
|
|
|
311
343
|
/**
|
|
312
|
-
* Specifies a
|
|
344
|
+
* Specifies a template for the quick access toolbar.
|
|
345
|
+
* Use this property to customize the quick access toolbar.
|
|
313
346
|
*
|
|
314
347
|
* @default null
|
|
315
|
-
* @
|
|
348
|
+
* @aspType string
|
|
316
349
|
*
|
|
317
350
|
* @remarks
|
|
318
|
-
* This property only works if the "
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
|
|
323
|
-
|
|
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;
|
|
324
371
|
|
|
325
372
|
/**
|
|
326
373
|
* Specifies whether to prevent user interaction with the image editor control.
|
|
@@ -358,6 +405,8 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
358
405
|
/**
|
|
359
406
|
* Specifies the finetune settings option which can be used to perform color adjustments in the image editor control.
|
|
360
407
|
*
|
|
408
|
+
* {% codeBlock src='image-editor/finetuneSettings/index.md' %}{% endcodeBlock %}
|
|
409
|
+
*
|
|
361
410
|
* @remarks
|
|
362
411
|
* A 'FinetuneSettingsModel' value that specifies the the finetune options which are enabled in image editor control.
|
|
363
412
|
* If the property is not specified, then the default values will be applied for minimum, maximum, and value properties for all finetune options.
|
|
@@ -371,8 +420,6 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
371
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.
|
|
372
421
|
* - Blur : Adjusting the blur can make an image unfocused or unclear. Blur can be controlled by blur property.
|
|
373
422
|
*
|
|
374
|
-
* {% codeBlock src='image-editor/finetuneSettings/index.md' %}{% endcodeBlock %}
|
|
375
|
-
*
|
|
376
423
|
*/
|
|
377
424
|
finetuneSettings?: FinetuneSettingsModel;
|
|
378
425
|
|
|
@@ -380,6 +427,8 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
380
427
|
* Specifies the zoom settings to perform zooming action.
|
|
381
428
|
* A 'ZoomSettingsModel' value that specifies the the zoom related options which are enabled in image editor control. The default value is null.
|
|
382
429
|
*
|
|
430
|
+
* {% codeBlock src='image-editor/zoomSettings/index.md' %}{% endcodeBlock %}
|
|
431
|
+
*
|
|
383
432
|
* @remarks
|
|
384
433
|
* If the property is not specified, then the default settings will be applied for all the properties available in zoom settings.
|
|
385
434
|
*
|
|
@@ -390,11 +439,24 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
390
439
|
* - zoomTrigger: Specifies the types of zooming to be supported in the image editor.
|
|
391
440
|
* - zoomPoint: Specifies the x and y coordinates in which the zooming performed on initial load.
|
|
392
441
|
*
|
|
393
|
-
* {% codeBlock src='image-editor/zoomSettings/index.md' %}{% endcodeBlock %}
|
|
394
|
-
*
|
|
395
442
|
*/
|
|
396
443
|
zoomSettings?: ZoomSettingsModel;
|
|
397
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
|
+
|
|
398
460
|
/**
|
|
399
461
|
* Event callback that is raised before an image is saved.
|
|
400
462
|
*
|
|
@@ -458,6 +520,13 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
458
520
|
*/
|
|
459
521
|
shapeChanging?: EmitType<ShapeChangeEventArgs>
|
|
460
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
|
+
|
|
461
530
|
/**
|
|
462
531
|
* Event callback that is raised once an image is opened in an Image Editor.
|
|
463
532
|
*
|
|
@@ -481,11 +550,11 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
481
550
|
|
|
482
551
|
/**
|
|
483
552
|
* Event callback that is raised while updating/refreshing the toolbar
|
|
553
|
+
*
|
|
554
|
+
* {% codeBlock src='image-editor/toolbarUpdating/index.md' %}{% endcodeBlock %}
|
|
484
555
|
*
|
|
485
556
|
* @event toolbarUpdating
|
|
486
557
|
*
|
|
487
|
-
* {% codeBlock src='image-editor/toolbarUpdating/index.md' %}{% endcodeBlock %}
|
|
488
|
-
*
|
|
489
558
|
*/
|
|
490
559
|
toolbarUpdating?: EmitType<ToolbarEventArgs>
|
|
491
560
|
|
|
@@ -518,10 +587,9 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
518
587
|
click?: EmitType<ImageEditorClickEventArgs>
|
|
519
588
|
|
|
520
589
|
/**
|
|
521
|
-
* Event callback that is
|
|
590
|
+
* Event callback that is raised when opening the quick access toolbar.
|
|
522
591
|
*
|
|
523
|
-
* @event
|
|
524
|
-
* @private
|
|
592
|
+
* @event quickAccessToolbarOpen
|
|
525
593
|
*
|
|
526
594
|
* @remarks
|
|
527
595
|
* Use this event to customize the toolbar items that appear in the quick access toolbar.
|
|
@@ -530,9 +598,29 @@ export interface ImageEditorModel extends ComponentModel{
|
|
|
530
598
|
* The string values representing the names of the built-in toolbar items to display.
|
|
531
599
|
* The ItemModel values representing the ItemModel of custom toolbar items to display.
|
|
532
600
|
*
|
|
533
|
-
*
|
|
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
|
|
534
622
|
*
|
|
535
623
|
*/
|
|
536
|
-
|
|
624
|
+
quickAccessToolbarItemClick?: EmitType<ClickEventArgs>
|
|
537
625
|
|
|
538
626
|
}
|