@syncfusion/ej2-image-editor 20.3.47

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 (131) hide show
  1. package/.eslintrc.json +244 -0
  2. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +63 -0
  3. package/.github/PULL_REQUEST_TEMPLATE/feature.md +39 -0
  4. package/CHANGELOG.md +18 -0
  5. package/README.md +6 -0
  6. package/dist/ej2-image-editor.umd.min.js +11 -0
  7. package/dist/ej2-image-editor.umd.min.js.map +1 -0
  8. package/dist/es6/ej2-image-editor.es2015.js +7511 -0
  9. package/dist/es6/ej2-image-editor.es2015.js.map +1 -0
  10. package/dist/es6/ej2-image-editor.es5.js +7550 -0
  11. package/dist/es6/ej2-image-editor.es5.js.map +1 -0
  12. package/dist/global/ej2-image-editor.min.js +11 -0
  13. package/dist/global/ej2-image-editor.min.js.map +1 -0
  14. package/dist/global/index.d.ts +14 -0
  15. package/helpers/e2e/imageEditorHelper.d.ts +37 -0
  16. package/helpers/e2e/imageEditorHelper.js +53 -0
  17. package/helpers/e2e/index.d.ts +1 -0
  18. package/helpers/e2e/index.js +8 -0
  19. package/helpers/e2e/querybuilderHelper.d.ts +37 -0
  20. package/image-editor.d.ts +4 -0
  21. package/image-editor.js +4 -0
  22. package/index.d.ts +4 -0
  23. package/index.js +4 -0
  24. package/license +10 -0
  25. package/package.json +74 -0
  26. package/src/global.js +1 -0
  27. package/src/image-editor/image-editor-model.d.ts +206 -0
  28. package/src/image-editor/image-editor.d.ts +961 -0
  29. package/src/image-editor/image-editor.js +7542 -0
  30. package/src/image-editor/index.d.ts +5 -0
  31. package/src/image-editor/index.js +4 -0
  32. package/src/index.d.ts +4 -0
  33. package/src/index.js +4 -0
  34. package/styles/bootstrap-dark.css +283 -0
  35. package/styles/bootstrap-dark.scss +1 -0
  36. package/styles/bootstrap.css +283 -0
  37. package/styles/bootstrap.scss +1 -0
  38. package/styles/bootstrap4.css +279 -0
  39. package/styles/bootstrap4.scss +1 -0
  40. package/styles/bootstrap5-dark.css +301 -0
  41. package/styles/bootstrap5-dark.scss +1 -0
  42. package/styles/bootstrap5.css +301 -0
  43. package/styles/bootstrap5.scss +1 -0
  44. package/styles/fabric-dark.css +283 -0
  45. package/styles/fabric-dark.scss +1 -0
  46. package/styles/fabric.css +283 -0
  47. package/styles/fabric.scss +1 -0
  48. package/styles/fluent-dark.css +290 -0
  49. package/styles/fluent-dark.scss +1 -0
  50. package/styles/fluent.css +290 -0
  51. package/styles/fluent.scss +1 -0
  52. package/styles/highcontrast-light.css +281 -0
  53. package/styles/highcontrast-light.scss +1 -0
  54. package/styles/highcontrast.css +281 -0
  55. package/styles/highcontrast.scss +1 -0
  56. package/styles/image-editor/_all.scss +2 -0
  57. package/styles/image-editor/_bootstrap-dark-definition.scss +10 -0
  58. package/styles/image-editor/_bootstrap-definition.scss +10 -0
  59. package/styles/image-editor/_bootstrap4-definition.scss +10 -0
  60. package/styles/image-editor/_bootstrap5-dark-definition.scss +1 -0
  61. package/styles/image-editor/_bootstrap5-definition.scss +10 -0
  62. package/styles/image-editor/_fabric-dark-definition.scss +10 -0
  63. package/styles/image-editor/_fabric-definition.scss +10 -0
  64. package/styles/image-editor/_fluent-dark-definition.scss +1 -0
  65. package/styles/image-editor/_fluent-definition.scss +10 -0
  66. package/styles/image-editor/_fusionnew-definition.scss +10 -0
  67. package/styles/image-editor/_highcontrast-definition.scss +10 -0
  68. package/styles/image-editor/_highcontrast-light-definition.scss +10 -0
  69. package/styles/image-editor/_layout.scss +204 -0
  70. package/styles/image-editor/_material-dark-definition.scss +10 -0
  71. package/styles/image-editor/_material-definition.scss +10 -0
  72. package/styles/image-editor/_material3-definition.scss +10 -0
  73. package/styles/image-editor/_tailwind-dark-definition.scss +1 -0
  74. package/styles/image-editor/_tailwind-definition.scss +10 -0
  75. package/styles/image-editor/_theme.scss +97 -0
  76. package/styles/image-editor/bootstrap-dark.css +283 -0
  77. package/styles/image-editor/bootstrap-dark.scss +12 -0
  78. package/styles/image-editor/bootstrap.css +283 -0
  79. package/styles/image-editor/bootstrap.scss +12 -0
  80. package/styles/image-editor/bootstrap4.css +279 -0
  81. package/styles/image-editor/bootstrap4.scss +12 -0
  82. package/styles/image-editor/bootstrap5-dark.css +301 -0
  83. package/styles/image-editor/bootstrap5-dark.scss +12 -0
  84. package/styles/image-editor/bootstrap5.css +301 -0
  85. package/styles/image-editor/bootstrap5.scss +12 -0
  86. package/styles/image-editor/fabric-dark.css +283 -0
  87. package/styles/image-editor/fabric-dark.scss +12 -0
  88. package/styles/image-editor/fabric.css +283 -0
  89. package/styles/image-editor/fabric.scss +12 -0
  90. package/styles/image-editor/fluent-dark.css +290 -0
  91. package/styles/image-editor/fluent-dark.scss +12 -0
  92. package/styles/image-editor/fluent.css +290 -0
  93. package/styles/image-editor/fluent.scss +12 -0
  94. package/styles/image-editor/highcontrast-light.css +281 -0
  95. package/styles/image-editor/highcontrast-light.scss +12 -0
  96. package/styles/image-editor/highcontrast.css +281 -0
  97. package/styles/image-editor/highcontrast.scss +12 -0
  98. package/styles/image-editor/icons/_bootstrap-dark.scss +218 -0
  99. package/styles/image-editor/icons/_bootstrap.scss +218 -0
  100. package/styles/image-editor/icons/_bootstrap4.scss +218 -0
  101. package/styles/image-editor/icons/_bootstrap5-dark.scss +1 -0
  102. package/styles/image-editor/icons/_bootstrap5.scss +224 -0
  103. package/styles/image-editor/icons/_fabric-dark.scss +218 -0
  104. package/styles/image-editor/icons/_fabric.scss +218 -0
  105. package/styles/image-editor/icons/_fluent-dark.scss +1 -0
  106. package/styles/image-editor/icons/_fluent.scss +224 -0
  107. package/styles/image-editor/icons/_fusionnew.scss +224 -0
  108. package/styles/image-editor/icons/_highcontrast-light.scss +218 -0
  109. package/styles/image-editor/icons/_highcontrast.scss +218 -0
  110. package/styles/image-editor/icons/_material-dark.scss +218 -0
  111. package/styles/image-editor/icons/_material.scss +218 -0
  112. package/styles/image-editor/icons/_material3.scss +230 -0
  113. package/styles/image-editor/icons/_tailwind-dark.scss +1 -0
  114. package/styles/image-editor/icons/_tailwind.scss +218 -0
  115. package/styles/image-editor/material-dark.css +299 -0
  116. package/styles/image-editor/material-dark.scss +12 -0
  117. package/styles/image-editor/material.css +299 -0
  118. package/styles/image-editor/material.scss +12 -0
  119. package/styles/image-editor/tailwind-dark.css +288 -0
  120. package/styles/image-editor/tailwind-dark.scss +12 -0
  121. package/styles/image-editor/tailwind.css +288 -0
  122. package/styles/image-editor/tailwind.scss +12 -0
  123. package/styles/material-dark.css +299 -0
  124. package/styles/material-dark.scss +1 -0
  125. package/styles/material.css +299 -0
  126. package/styles/material.scss +1 -0
  127. package/styles/tailwind-dark.css +288 -0
  128. package/styles/tailwind-dark.scss +1 -0
  129. package/styles/tailwind.css +288 -0
  130. package/styles/tailwind.scss +1 -0
  131. package/tslint.json +111 -0
package/.eslintrc.json ADDED
@@ -0,0 +1,244 @@
1
+ {
2
+ "env": {
3
+ "browser": true,
4
+ "es2021": true
5
+ },
6
+ "extends": [
7
+ "eslint:recommended",
8
+ "plugin:@typescript-eslint/recommended",
9
+ "plugin:jsdoc/recommended"
10
+ ],
11
+ "parser": "@typescript-eslint/parser",
12
+ "parserOptions": {
13
+ "ecmaFeatures": { "js": true },
14
+ "ecmaVersion": 2018,
15
+ "project": "./tsconfig.json",
16
+ "sourceType": "module"
17
+ },
18
+ "plugins": [
19
+ "@typescript-eslint",
20
+ "@typescript-eslint/tslint",
21
+ "jsdoc"
22
+ ],
23
+ "rules": {
24
+ "use-isnan": "error",
25
+ "@typescript-eslint/no-inferrable-types": "off",
26
+ "@typescript-eslint/ban-types": ["warn", {
27
+ "types": {
28
+ "Object": false,
29
+ "object": false,
30
+ "{}": false,
31
+ "Function": false
32
+ }
33
+ }],
34
+ "jsdoc/check-tag-names": 0,
35
+ "@typescript-eslint/tslint/config": [
36
+ "error",
37
+ {
38
+ "rules": {
39
+ "ban": true,
40
+ "chai-vague-errors": true,
41
+ "max-func-body-length": [
42
+ true,
43
+ 120,
44
+ {
45
+ "ignore-parameters-to-function-regex": "describe"
46
+ }
47
+ ],
48
+ "missing-jsdoc": true,
49
+ "no-backbone-get-set-outside-model": false,
50
+ "no-cookies": false,
51
+ "no-delete-expression": false,
52
+ "no-disable-auto-sanitization": true,
53
+ "no-duplicate-case": true,
54
+ "no-duplicate-parameter-names": true,
55
+ "no-empty-interfaces": false,
56
+ "no-exec-script": true,
57
+ "no-function-expression": false,
58
+ "no-multiple-var-decl": false,
59
+ "no-string-based-set-immediate": false,
60
+ "no-string-based-set-interval": false,
61
+ "no-unnecessary-bind": false,
62
+ "no-unused-imports": true,
63
+ "no-with-statement": false,
64
+ "prefer-array-literal": false,
65
+ "typedef": [
66
+ true,
67
+ "call-signature",
68
+ "parameter",
69
+ "property-declaration",
70
+ "variable-declaration",
71
+ "arrow-parameter",
72
+ "member-variable-declaration"
73
+ ],
74
+ "use-named-parameter": false,
75
+ "valid-typeof": true,
76
+ "whitespace": [
77
+ true,
78
+ "check-branch",
79
+ "check-decl",
80
+ "check-operator",
81
+ "check-separator",
82
+ "check-type"
83
+ ]
84
+ }
85
+ }
86
+ ],
87
+ "no-control-regex": "error",
88
+ "no-constant-condition": "error",
89
+ "no-invalid-regexp": "error",
90
+ "curly": "error",
91
+ "eol-last": [
92
+ "error",
93
+ "always"
94
+ ],
95
+ "guard-for-in": "error",
96
+ "no-labels": "error",
97
+ "max-len": [
98
+ "error",
99
+ {
100
+ "code": 140,
101
+ "tabWidth": 4,
102
+ "ignoreComments": true,
103
+ "ignoreStrings": true,
104
+ "ignoreTemplateLiterals": true,
105
+ "ignoreRegExpLiterals": true
106
+ }
107
+ ],
108
+ "no-console": [
109
+ "error",
110
+ {
111
+ "allow": [
112
+ "warn",
113
+ "dir",
114
+ "timeLog",
115
+ "assert",
116
+ "clear",
117
+ "count",
118
+ "countReset",
119
+ "group",
120
+ "groupEnd",
121
+ "table",
122
+ "dirxml",
123
+ "error",
124
+ "groupCollapsed",
125
+ "Console",
126
+ "profile",
127
+ "profileEnd",
128
+ "timeStamp",
129
+ "context"
130
+ ]
131
+ }
132
+ ],
133
+ "no-redeclare": [
134
+ "error",
135
+ {
136
+ "builtinGlobals": true
137
+ }
138
+ ],
139
+ "@typescript-eslint/no-parameter-properties": "error",
140
+ "@typescript-eslint/indent": [
141
+ "error",
142
+ 4,
143
+ {
144
+ "CallExpression": {
145
+ "arguments": "first"
146
+ },
147
+ "FunctionDeclaration": {
148
+ "parameters": "first"
149
+ },
150
+ "FunctionExpression": {
151
+ "parameters": "first"
152
+ }
153
+ }
154
+ ],
155
+ "no-debugger": "error",
156
+ "no-eval": "error",
157
+ "no-extra-semi": "error",
158
+ "no-throw-literal": "error",
159
+ "no-fallthrough": "error",
160
+ "comma-dangle": [
161
+ "error",
162
+ "never"
163
+ ],
164
+ "no-trailing-spaces": "error",
165
+ "@typescript-eslint/no-unused-expressions": "error",
166
+ "@typescript-eslint/no-var-requires": "error",
167
+ "one-var": [
168
+ "error",
169
+ "never"
170
+ ],
171
+ "@typescript-eslint/no-explicit-any": "error",
172
+ "no-cond-assign": [
173
+ "error",
174
+ "always"
175
+ ],
176
+ "@typescript-eslint/consistent-type-assertions": "off",
177
+ "jsdoc/check-alignment": "error",
178
+ "no-empty": "error",
179
+ "quotes": [
180
+ "error",
181
+ "single"
182
+ ],
183
+ "semi": [
184
+ "error",
185
+ "always"
186
+ ],
187
+ "eqeqeq": [
188
+ "error",
189
+ "smart"
190
+ ],
191
+ "valid-typeof": [
192
+ "error",
193
+ {
194
+ "requireStringLiterals": true
195
+ }
196
+ ],
197
+ "camelcase": [
198
+ "error",
199
+ {
200
+ "properties": "always",
201
+ "ignoreDestructuring": true,
202
+ "ignoreImports": true
203
+ }
204
+ ],
205
+ "no-irregular-whitespace": [
206
+ "error",
207
+ {
208
+ "skipStrings": true,
209
+ "skipComments": true,
210
+ "skipRegExps": true,
211
+ "skipTemplates": true
212
+ }
213
+ ],
214
+ "valid-jsdoc": [
215
+ "error",
216
+ {
217
+ "prefer": {
218
+ "arg": "param",
219
+ "argument": "param",
220
+ "class": "constructor",
221
+ "return": "returns",
222
+ "virtual": "abstract"
223
+ }
224
+ }
225
+ ],
226
+ "no-var": "error",
227
+ "radix": "error"
228
+ },
229
+ "reportUnusedDisableDirectives": true,
230
+ "overrides": [
231
+ {
232
+ "files": [
233
+ "node_modules",
234
+ "dist",
235
+ "public",
236
+ "coverage",
237
+ "test-report"
238
+ ],
239
+ "rules": {
240
+ "no-unused-expressions": "off"
241
+ }
242
+ }
243
+ ]
244
+ }
@@ -0,0 +1,63 @@
1
+ ### Bug description
2
+
3
+ Clearly and concisely describe the problem or feature (this cannot be empty).
4
+
5
+ ### Root cause
6
+
7
+ Briefly describe the root cause and analysis of the problem.
8
+ If there is an internal discussion on the forum, provide the link.
9
+
10
+ ### Reason for not identifying earlier
11
+
12
+ Find how it was missed in our earlier testing and development by analysing the below checklist. This will help prevent similar mistakes in the future.
13
+
14
+ - [ ] Guidelines/documents are not followed
15
+
16
+ - Common guidelines / Core team guideline
17
+ - Specification document
18
+ - Requirement document
19
+
20
+ - [ ] Guidelines/documents are not given
21
+
22
+
23
+ - Common guidelines / Core team guideline
24
+ - Specification document
25
+ - Requirement document
26
+
27
+
28
+ ### Reason:
29
+ Mention any one or more reasons from the above points.
30
+
31
+ ### Action taken:
32
+
33
+ What action did you take to avoid this in future?
34
+
35
+ ### Related areas:
36
+
37
+ Is there any other related areas also to be addressed?
38
+
39
+
40
+ ### Is it a breaking issue?
41
+
42
+ If it is a breaking issue, provide the commit detail which caused this break.
43
+
44
+ ### Solution description
45
+
46
+ Describe your code changes in detail for reviewers.
47
+
48
+ ### Output screenshots
49
+
50
+ Post the output screenshots if an UI is affected or added due to this bug.
51
+
52
+ ### Areas affected and ensured
53
+
54
+ List the areas affected by your code changes.
55
+
56
+ ### Additional checklist
57
+
58
+ - Did you run the automation against your fix?
59
+ - Is there any API name change?
60
+ - Is there any existing behavior change of other features due to this code change?
61
+ - Does your new code introduce new warnings or binding errors?
62
+ - Does your code pass all FxCop and StyleCop rules?
63
+ - Did you record this case in the unit test or UI test?
@@ -0,0 +1,39 @@
1
+ ### Feature description
2
+
3
+ Clearly and concisely describe the problem or feature (this cannot be empty).
4
+
5
+ ### Analysis and design
6
+
7
+ If there is an external design, link to its project documentation area.
8
+ If there is an internal discussion on the forum, provide the link.
9
+
10
+ ### Solution description
11
+
12
+ Describe your code changes in detail for reviewers.
13
+
14
+ ### Output screenshots
15
+
16
+ Post the output screenshots if an UI is affected or added due to this feature.
17
+
18
+ ### Areas affected and ensured
19
+
20
+ List the areas are affected by your code changes.
21
+
22
+ ### Test cases
23
+
24
+ Provide the unit testing written file details to understand the use cases considered in this implementation.
25
+ If there is no TDD (if it’s not possible to follow), provide the UI automation script location and the Excel file that contains the use cases considered in this implementation.
26
+ Provide the test cases Excel file alone if the feature cannot be automated in any case.
27
+
28
+ ### Test bed sample location
29
+
30
+ Provide the test bed sample location where code reviewers can review the new feature’s behaviors. This depends on the CI process that your team follows. It can be from NPMCI, HockeyApp, staging site, local server, etc.
31
+
32
+ ### Additional checklist
33
+
34
+ - Did you run the automation against your fix?
35
+ - Is there any API name change?
36
+ - Is there any existing behavior change of other features due to this code change?
37
+ - Does your new code introduce new warnings or binding errors?
38
+ - Does your code pass all FxCop and StyleCop rules?
39
+ - Did you record this case in the unit test or UI test?
package/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased]
4
+
5
+ ### Image Editor
6
+
7
+ The Image Editor control is a graphical user interface used for editing images. It provides built-in support for rotate, flip, zoom, and crop the images based on the selection. It also has support for inserting an annotations including rectangle, ellipse, line, text, and freehand drawings.
8
+
9
+ - **Selection** - The selection region can be a `square` or `circle`, customized to various aspects ratios, and customized by dragging and resizing.
10
+ - **Crop** - The image can be cropped based on the selection.
11
+ - **Rotate** - The image can be rotated both clockwise and anticlockwise by 90 degrees.
12
+ - **Flip** - The image can be flipped both horizontally and vertically.
13
+ - **Zoom** - The image can be zoomed in and out.
14
+ - **Pan** - View the entire image by toggling the pan option from the toolbar.
15
+ - **Freehand drawing** - Draw freehand on the image and adjust the pen's stroke width and stroke color.
16
+ - **Reset** - Revert all the edited states and load the original image.
17
+ - **Save** - Save the edited image in JPEG, PNG, and SVG formats.
18
+ - **Annotation** - `Text`, `rectangle`, `ellipse`, and `line` annotation shapes are supported.
package/README.md ADDED
@@ -0,0 +1,6 @@
1
+ # ej2-image-editor-component
2
+
3
+ The Image Editor control is a graphical user interface used for editing images. It provides built-in support for rotate, flip, zoom, and crop the images based on the selection. It also has support for inserting an annotations including rectangle, ellipse, line, text, and freehand drawings.
4
+
5
+
6
+ © Copyright 2022 Syncfusion, Inc. All Rights Reserved. The Syncfusion Essential Studio license and copyright applies to this distribution.