@ckeditor/ckeditor5-upload 0.0.0-nightly-20231205.0 → 0.0.0-nightly-20231206.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-upload",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20231206.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": "0.0.0-nightly-
|
15
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
16
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
14
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20231206.0",
|
15
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20231206.0",
|
16
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20231206.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
|
/**
|