@ckeditor/ckeditor5-upload 40.1.0 → 40.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +30 -30
- package/package.json +4 -4
- package/src/ui/filedialogbuttonview.d.ts +6 -7
- package/src/ui/filedialogbuttonview.js +12 -18
package/CHANGELOG.md
CHANGED
@@ -5,33 +5,33 @@ All changes in the package are documented in the main repository. See: https://g
|
|
5
5
|
|
6
6
|
Changes for the past releases are available below.
|
7
7
|
|
8
|
-
## [19.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v18.0.0...v19.0.0) (2020
|
8
|
+
## [19.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v18.0.0...v19.0.0) (April 29, 2020)
|
9
9
|
|
10
10
|
### Bug fixes
|
11
11
|
|
12
12
|
* Restored a condition handling an edge case in upload when promise chains are aborted. Closes [ckeditor/ckeditor5#5892](https://github.com/ckeditor/ckeditor5/issues/5892). ([ed7187b](https://github.com/ckeditor/ckeditor5-upload/commit/ed7187b))
|
13
13
|
|
14
14
|
|
15
|
-
## [18.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v17.0.0...v18.0.0) (2020
|
15
|
+
## [18.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v17.0.0...v18.0.0) (March 19, 2020)
|
16
16
|
|
17
17
|
Internal changes only (updated dependencies, documentation, etc.).
|
18
18
|
|
19
19
|
|
20
|
-
## [17.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v16.0.0...v17.0.0) (2020
|
20
|
+
## [17.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v16.0.0...v17.0.0) (February 19, 2020)
|
21
21
|
|
22
22
|
### Other changes
|
23
23
|
|
24
24
|
* Updated translations. ([5be630b](https://github.com/ckeditor/ckeditor5-upload/commit/5be630b))
|
25
25
|
|
26
26
|
|
27
|
-
## [16.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v15.0.0...v16.0.0) (2019
|
27
|
+
## [16.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v15.0.0...v16.0.0) (December 4, 2019)
|
28
28
|
|
29
29
|
### Other changes
|
30
30
|
|
31
31
|
* Updated translations. ([188255c](https://github.com/ckeditor/ckeditor5-upload/commit/188255c))
|
32
32
|
|
33
33
|
|
34
|
-
## [15.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v12.0.0...v15.0.0) (2019
|
34
|
+
## [15.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v12.0.0...v15.0.0) (October 23, 2019)
|
35
35
|
|
36
36
|
### Bug fixes
|
37
37
|
|
@@ -42,7 +42,7 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
42
42
|
* Updated translations. ([290db0f](https://github.com/ckeditor/ckeditor5-upload/commit/290db0f)) ([1d7e907](https://github.com/ckeditor/ckeditor5-upload/commit/1d7e907))
|
43
43
|
|
44
44
|
|
45
|
-
## [12.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v11.1.1...v12.0.0) (2019
|
45
|
+
## [12.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v11.1.1...v12.0.0) (August 26, 2019)
|
46
46
|
|
47
47
|
### Features
|
48
48
|
|
@@ -68,33 +68,33 @@ import Base64UploadAdapter from '@ckeditor/ckeditor5-upload/src/adapters/base64u
|
|
68
68
|
```
|
69
69
|
|
70
70
|
|
71
|
-
## [11.1.1](https://github.com/ckeditor/ckeditor5-upload/compare/v11.1.0...v11.1.1) (2019
|
71
|
+
## [11.1.1](https://github.com/ckeditor/ckeditor5-upload/compare/v11.1.0...v11.1.1) (July 10, 2019)
|
72
72
|
|
73
73
|
Internal changes only (updated dependencies, documentation, etc.).
|
74
74
|
|
75
75
|
|
76
|
-
## [11.1.0](https://github.com/ckeditor/ckeditor5-upload/compare/v11.0.2...v11.1.0) (2019
|
76
|
+
## [11.1.0](https://github.com/ckeditor/ckeditor5-upload/compare/v11.0.2...v11.1.0) (July 4, 2019)
|
77
77
|
|
78
78
|
### Features
|
79
79
|
|
80
80
|
* Introduced the Base64 image upload adapter. Closes [ckeditor/ckeditor5#1378](https://github.com/ckeditor/ckeditor5/issues/1378). ([938f0f7](https://github.com/ckeditor/ckeditor5-upload/commit/938f0f7))
|
81
81
|
|
82
82
|
|
83
|
-
## [11.0.2](https://github.com/ckeditor/ckeditor5-upload/compare/v11.0.1...v11.0.2) (2019
|
83
|
+
## [11.0.2](https://github.com/ckeditor/ckeditor5-upload/compare/v11.0.1...v11.0.2) (June 6, 2019)
|
84
84
|
|
85
85
|
### Other changes
|
86
86
|
|
87
87
|
* Updated translations. ([73c6761](https://github.com/ckeditor/ckeditor5-upload/commit/73c6761))
|
88
88
|
|
89
89
|
|
90
|
-
## [11.0.1](https://github.com/ckeditor/ckeditor5-upload/compare/v11.0.0...v11.0.1) (2019
|
90
|
+
## [11.0.1](https://github.com/ckeditor/ckeditor5-upload/compare/v11.0.0...v11.0.1) (April 4, 2019)
|
91
91
|
|
92
92
|
### Other changes
|
93
93
|
|
94
94
|
* Updated translations. ([eac33b1](https://github.com/ckeditor/ckeditor5-upload/commit/eac33b1))
|
95
95
|
|
96
96
|
|
97
|
-
## [11.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v10.0.4...v11.0.0) (2019
|
97
|
+
## [11.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v10.0.4...v11.0.0) (February 28, 2019)
|
98
98
|
|
99
99
|
### Bug fixes
|
100
100
|
|
@@ -111,35 +111,35 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
111
111
|
* The `FileLoader.file` property was changed to a getter which returns a native `Promise` instance instead of a `File` instance. The returned promise resolves to a `File` instance.
|
112
112
|
|
113
113
|
|
114
|
-
## [10.0.4](https://github.com/ckeditor/ckeditor5-upload/compare/v10.0.3...v10.0.4) (2018
|
114
|
+
## [10.0.4](https://github.com/ckeditor/ckeditor5-upload/compare/v10.0.3...v10.0.4) (December 5, 2018)
|
115
115
|
|
116
116
|
### Other changes
|
117
117
|
|
118
118
|
* Updated translations. ([489b6fa](https://github.com/ckeditor/ckeditor5-upload/commit/489b6fa)) ([f435630](https://github.com/ckeditor/ckeditor5-upload/commit/f435630))
|
119
119
|
|
120
120
|
|
121
|
-
## [10.0.3](https://github.com/ckeditor/ckeditor5-upload/compare/v10.0.2...v10.0.3) (2018
|
121
|
+
## [10.0.3](https://github.com/ckeditor/ckeditor5-upload/compare/v10.0.2...v10.0.3) (October 8, 2018)
|
122
122
|
|
123
123
|
### Other changes
|
124
124
|
|
125
125
|
* Updated translations. ([871eb44](https://github.com/ckeditor/ckeditor5-upload/commit/871eb44))
|
126
126
|
|
127
127
|
|
128
|
-
## [10.0.2](https://github.com/ckeditor/ckeditor5-upload/compare/v10.0.1...v10.0.2) (2018
|
128
|
+
## [10.0.2](https://github.com/ckeditor/ckeditor5-upload/compare/v10.0.1...v10.0.2) (July 18, 2018)
|
129
129
|
|
130
130
|
### Other changes
|
131
131
|
|
132
132
|
* Updated translations. ([ce32eb2](https://github.com/ckeditor/ckeditor5-upload/commit/ce32eb2), [9adb325](https://github.com/ckeditor/ckeditor5-upload/commit/9adb325))
|
133
133
|
|
134
134
|
|
135
|
-
## [10.0.1](https://github.com/ckeditor/ckeditor5-upload/compare/v10.0.0...v10.0.1) (2018
|
135
|
+
## [10.0.1](https://github.com/ckeditor/ckeditor5-upload/compare/v10.0.0...v10.0.1) (June 21, 2018)
|
136
136
|
|
137
137
|
### Other changes
|
138
138
|
|
139
139
|
* Updated translations.
|
140
140
|
|
141
141
|
|
142
|
-
## [10.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-beta.4...v10.0.0) (2018
|
142
|
+
## [10.0.0](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-beta.4...v10.0.0) (April 25, 2018)
|
143
143
|
|
144
144
|
### Other changes
|
145
145
|
|
@@ -150,17 +150,17 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
150
150
|
* The license under which CKEditor 5 is released has been changed from a triple GPL, LGPL and MPL license to a GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991) for more information.
|
151
151
|
|
152
152
|
|
153
|
-
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-beta.2...v1.0.0-beta.4) (2018
|
153
|
+
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-beta.2...v1.0.0-beta.4) (April 19, 2018)
|
154
154
|
|
155
155
|
Internal changes only (updated dependencies, documentation, etc.).
|
156
156
|
|
157
157
|
|
158
|
-
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2018
|
158
|
+
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-beta.1...v1.0.0-beta.2) (April 10, 2018)
|
159
159
|
|
160
160
|
Internal changes only (updated dependencies, documentation, etc.).
|
161
161
|
|
162
162
|
|
163
|
-
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (2018
|
163
|
+
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (March 15, 2018)
|
164
164
|
|
165
165
|
### Bug fixes
|
166
166
|
|
@@ -183,12 +183,12 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
183
183
|
* Renamed `filerepository-no-adapter` error to `filerepository-no-upload-adapter`.
|
184
184
|
|
185
185
|
|
186
|
-
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2017
|
186
|
+
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (November 14, 2017)
|
187
187
|
|
188
188
|
### Bug fixes
|
189
189
|
|
190
190
|
* Destroying `FileDialogButtonView` should not throw an error. Closes [#66](https://github.com/ckeditor/ckeditor5-upload/issues/66). ([2d4ba62](https://github.com/ckeditor/ckeditor5-upload/commit/2d4ba62))
|
191
|
-
* Images pasted with additional HTML content will not be handled by the upload plugin which prevents data pasted from
|
191
|
+
* Images pasted with additional HTML content will not be handled by the upload plugin which prevents data pasted from Microsoft Word to be treated as an image. Closes [#68](https://github.com/ckeditor/ckeditor5-upload/issues/68). ([8d0644a](https://github.com/ckeditor/ckeditor5-upload/commit/8d0644a))
|
192
192
|
|
193
193
|
### Other changes
|
194
194
|
|
@@ -200,24 +200,24 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
200
200
|
* The `FileDialogButtonView` is not a `ButtonView` instance anymore but a wrapper instead. The button of the component is available under the `#buttonView` property.
|
201
201
|
|
202
202
|
|
203
|
-
## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-upload/compare/v0.2.0...v1.0.0-alpha.1) (2017
|
203
|
+
## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-upload/compare/v0.2.0...v1.0.0-alpha.1) (October 3, 2017)
|
204
204
|
|
205
205
|
### Bug fixes
|
206
206
|
|
207
|
-
* Image placeholder is now correctly displayed
|
207
|
+
* Image placeholder is now correctly displayed in Firefox and Edge. Closes [#56](https://github.com/ckeditor/ckeditor5-upload/issues/56). ([785e88b](https://github.com/ckeditor/ckeditor5-upload/commit/785e88b))
|
208
208
|
* Upload command should not crash when upload adapter is not specified (instead, FileRepository logs an error). Closes [#59](https://github.com/ckeditor/ckeditor5-upload/issues/59). ([14b738b](https://github.com/ckeditor/ckeditor5-upload/commit/14b738b))
|
209
209
|
|
210
210
|
### Other changes
|
211
211
|
|
212
|
-
* `FileRepository` will automatically warn when it
|
213
|
-
* Placeholder
|
212
|
+
* `FileRepository` will automatically warn when it is initialized but no upload adapter was enabled. Closes [#58](https://github.com/ckeditor/ckeditor5-upload/issues/58). ([29aa315](https://github.com/ckeditor/ckeditor5-upload/commit/29aa315))
|
213
|
+
* Placeholder images will now look better on wider editors. Closes [#63](https://github.com/ckeditor/ckeditor5-upload/issues/63). ([edb5e81](https://github.com/ckeditor/ckeditor5-upload/commit/edb5e81))
|
214
214
|
|
215
215
|
|
216
|
-
## [0.2.0](https://github.com/ckeditor/ckeditor5-upload/compare/v0.1.0...v0.2.0) (2017
|
216
|
+
## [0.2.0](https://github.com/ckeditor/ckeditor5-upload/compare/v0.1.0...v0.2.0) (September 3, 2017)
|
217
217
|
|
218
218
|
### Bug fixes
|
219
219
|
|
220
|
-
* [Safari, Edge] The image upload (button) feature will not throw an error anymore when trying to access picked files. The feature should not use `for...of` loop on native `FileList` because Safari and Edge do not support `Symbol.iterator` for it yet. Closes [#35](https://github.com/ckeditor/ckeditor5-upload/issues/35). ([f4efd9b](https://github.com/ckeditor/ckeditor5-upload/commit/f4efd9b))
|
220
|
+
* [Safari, Edge] The image upload (button) feature will not throw an error anymore when trying to access picked files. The feature should not use the `for...of` loop on native `FileList` because Safari and Edge do not support `Symbol.iterator` for it yet. Closes [#35](https://github.com/ckeditor/ckeditor5-upload/issues/35). ([f4efd9b](https://github.com/ckeditor/ckeditor5-upload/commit/f4efd9b))
|
221
221
|
* An image dropped on another image will not redirect the browser to the file's path. Closes [#32](https://github.com/ckeditor/ckeditor5-upload/issues/32). ([4f533be](https://github.com/ckeditor/ckeditor5-upload/commit/4f533be))
|
222
222
|
* Bound `ImageUploadButton#isEnabled` to `ImageUploadCommand#isEnabled`. Closes [#43](https://github.com/ckeditor/ckeditor5-upload/issues/43). ([ba6de66](https://github.com/ckeditor/ckeditor5-upload/commit/ba6de66))
|
223
223
|
* Fixed two issues related to dropping images. First, when dropping a file into an empty paragraph, that paragraph should be replaced with that image. Second, drop position should be read correctly when the editor is focused upon drop. Closes [#42](https://github.com/ckeditor/ckeditor5-upload/issues/42). Closes [#29](https://github.com/ckeditor/ckeditor5-upload/issues/29). ([fec452d](https://github.com/ckeditor/ckeditor5-upload/commit/fec452d))
|
@@ -239,12 +239,12 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
239
239
|
|
240
240
|
### BREAKING CHANGES
|
241
241
|
|
242
|
-
* `UploadImageCommand`
|
243
|
-
* `UploadImageCommand`
|
242
|
+
* `UploadImageCommand` does not optimize the drop position itself anymore. Instead, a separate `findOptimalInsertionPosition()` function was introduced.
|
243
|
+
* `UploadImageCommand` does not verify the type of file anymore. This needs to be done by the caller.
|
244
244
|
* The command API has been changed.
|
245
245
|
|
246
246
|
|
247
|
-
## 0.1.0 (2017
|
247
|
+
## 0.1.0 (May 7, 2017)
|
248
248
|
|
249
249
|
### Features
|
250
250
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-upload",
|
3
|
-
"version": "40.
|
3
|
+
"version": "40.2.0",
|
4
4
|
"description": "Upload feature for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -11,9 +11,9 @@
|
|
11
11
|
],
|
12
12
|
"main": "src/index.js",
|
13
13
|
"dependencies": {
|
14
|
-
"@ckeditor/ckeditor5-core": "40.
|
15
|
-
"@ckeditor/ckeditor5-utils": "40.
|
16
|
-
"@ckeditor/ckeditor5-ui": "40.
|
14
|
+
"@ckeditor/ckeditor5-core": "40.2.0",
|
15
|
+
"@ckeditor/ckeditor5-utils": "40.2.0",
|
16
|
+
"@ckeditor/ckeditor5-ui": "40.2.0"
|
17
17
|
},
|
18
18
|
"author": "CKSource (http://cksource.com/)",
|
19
19
|
"license": "GPL-2.0-or-later",
|
@@ -5,7 +5,7 @@
|
|
5
5
|
/**
|
6
6
|
* @module upload/ui/filedialogbuttonview
|
7
7
|
*/
|
8
|
-
import { ButtonView
|
8
|
+
import { ButtonView } from '@ckeditor/ckeditor5-ui';
|
9
9
|
import type { Locale } from '@ckeditor/ckeditor5-utils';
|
10
10
|
/**
|
11
11
|
* The file dialog button view.
|
@@ -19,9 +19,6 @@ import type { Locale } from '@ckeditor/ckeditor5-utils';
|
|
19
19
|
* view.set( {
|
20
20
|
* acceptedType: 'image/*',
|
21
21
|
* allowMultipleFiles: true
|
22
|
-
* } );
|
23
|
-
*
|
24
|
-
* view.buttonView.set( {
|
25
22
|
* label: t( 'Insert image' ),
|
26
23
|
* icon: imageIcon,
|
27
24
|
* tooltip: true
|
@@ -34,9 +31,11 @@ import type { Locale } from '@ckeditor/ckeditor5-utils';
|
|
34
31
|
* } );
|
35
32
|
* ```
|
36
33
|
*/
|
37
|
-
export default class FileDialogButtonView extends
|
34
|
+
export default class FileDialogButtonView extends ButtonView {
|
38
35
|
/**
|
39
36
|
* The button view of the component.
|
37
|
+
*
|
38
|
+
* @deprecated
|
40
39
|
*/
|
41
40
|
buttonView: ButtonView;
|
42
41
|
/**
|
@@ -63,9 +62,9 @@ export default class FileDialogButtonView extends View {
|
|
63
62
|
*/
|
64
63
|
constructor(locale?: Locale);
|
65
64
|
/**
|
66
|
-
*
|
65
|
+
* @inheritDoc
|
67
66
|
*/
|
68
|
-
|
67
|
+
render(): void;
|
69
68
|
}
|
70
69
|
/**
|
71
70
|
* Fired when file dialog is closed with file selected.
|
@@ -18,9 +18,6 @@ import { ButtonView, View } from '@ckeditor/ckeditor5-ui';
|
|
18
18
|
* view.set( {
|
19
19
|
* acceptedType: 'image/*',
|
20
20
|
* allowMultipleFiles: true
|
21
|
-
* } );
|
22
|
-
*
|
23
|
-
* view.buttonView.set( {
|
24
21
|
* label: t( 'Insert image' ),
|
25
22
|
* icon: imageIcon,
|
26
23
|
* tooltip: true
|
@@ -33,36 +30,33 @@ import { ButtonView, View } from '@ckeditor/ckeditor5-ui';
|
|
33
30
|
* } );
|
34
31
|
* ```
|
35
32
|
*/
|
36
|
-
export default class FileDialogButtonView extends
|
33
|
+
export default class FileDialogButtonView extends ButtonView {
|
37
34
|
/**
|
38
35
|
* @inheritDoc
|
39
36
|
*/
|
40
37
|
constructor(locale) {
|
41
38
|
super(locale);
|
42
|
-
|
39
|
+
// For backward compatibility.
|
40
|
+
this.buttonView = this;
|
43
41
|
this._fileInputView = new FileInputView(locale);
|
44
42
|
this._fileInputView.bind('acceptedType').to(this);
|
45
43
|
this._fileInputView.bind('allowMultipleFiles').to(this);
|
46
44
|
this._fileInputView.delegate('done').to(this);
|
47
|
-
this.
|
48
|
-
|
45
|
+
this.on('execute', () => {
|
46
|
+
this._fileInputView.open();
|
47
|
+
});
|
48
|
+
this.extendTemplate({
|
49
49
|
attributes: {
|
50
50
|
class: 'ck-file-dialog-button'
|
51
|
-
}
|
52
|
-
children: [
|
53
|
-
this.buttonView,
|
54
|
-
this._fileInputView
|
55
|
-
]
|
56
|
-
});
|
57
|
-
this.buttonView.on('execute', () => {
|
58
|
-
this._fileInputView.open();
|
51
|
+
}
|
59
52
|
});
|
60
53
|
}
|
61
54
|
/**
|
62
|
-
*
|
55
|
+
* @inheritDoc
|
63
56
|
*/
|
64
|
-
|
65
|
-
|
57
|
+
render() {
|
58
|
+
super.render();
|
59
|
+
this.children.add(this._fileInputView);
|
66
60
|
}
|
67
61
|
}
|
68
62
|
/**
|