@ckeditor/ckeditor5-upload 44.3.0 → 45.0.0-alpha.0
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/dist/translations/be.d.ts +8 -0
- package/dist/translations/be.js +5 -0
- package/dist/translations/be.umd.js +11 -0
- package/lang/translations/be.po +16 -0
- package/package.json +3 -3
- package/src/adapters/base64uploadadapter.js +5 -0
- package/src/adapters/simpleuploadadapter.js +9 -0
- package/src/filereader.js +10 -0
- package/src/filerepository.js +31 -16
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
|
+
*/
|
5
|
+
|
6
|
+
import type { Translations } from '@ckeditor/ckeditor5-utils';
|
7
|
+
declare const translations: Translations;
|
8
|
+
export default translations;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
|
+
*/
|
5
|
+
export default {"be":{"dictionary":{"Upload in progress":"Ідзе запампоўка"},getPluralForm(n){return (n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);}}}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
|
+
*/
|
5
|
+
|
6
|
+
( e => {
|
7
|
+
const { [ 'be' ]: { dictionary, getPluralForm } } = {"be":{"dictionary":{"Upload in progress":"Ідзе запампоўка"},getPluralForm(n){return (n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);}}};
|
8
|
+
e[ 'be' ] ||= { dictionary: {}, getPluralForm: null };
|
9
|
+
e[ 'be' ].dictionary = Object.assign( e[ 'be' ].dictionary, dictionary );
|
10
|
+
e[ 'be' ].getPluralForm = getPluralForm;
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
2
|
+
#
|
3
|
+
# Want to contribute to this file? Submit your changes via a GitHub Pull Request.
|
4
|
+
#
|
5
|
+
# Check out the official contributor's guide:
|
6
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
7
|
+
#
|
8
|
+
msgid ""
|
9
|
+
msgstr ""
|
10
|
+
"Language: be\n"
|
11
|
+
"Plural-Forms: nplurals=3; plural=(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n"
|
12
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13
|
+
|
14
|
+
msgctxt "A message that a file upload is in progress."
|
15
|
+
msgid "Upload in progress"
|
16
|
+
msgstr "Ідзе запампоўка"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-upload",
|
3
|
-
"version": "
|
3
|
+
"version": "45.0.0-alpha.0",
|
4
4
|
"description": "Upload feature for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -12,8 +12,8 @@
|
|
12
12
|
"type": "module",
|
13
13
|
"main": "src/index.js",
|
14
14
|
"dependencies": {
|
15
|
-
"@ckeditor/ckeditor5-core": "
|
16
|
-
"@ckeditor/ckeditor5-utils": "
|
15
|
+
"@ckeditor/ckeditor5-core": "45.0.0-alpha.0",
|
16
|
+
"@ckeditor/ckeditor5-utils": "45.0.0-alpha.0"
|
17
17
|
},
|
18
18
|
"author": "CKSource (http://cksource.com/)",
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
@@ -48,6 +48,11 @@ export default class Base64UploadAdapter extends Plugin {
|
|
48
48
|
* The upload adapter that converts images inserted into the editor into Base64 strings.
|
49
49
|
*/
|
50
50
|
class Adapter {
|
51
|
+
/**
|
52
|
+
* `FileLoader` instance to use during the upload.
|
53
|
+
*/
|
54
|
+
loader;
|
55
|
+
reader;
|
51
56
|
/**
|
52
57
|
* Creates a new adapter instance.
|
53
58
|
*/
|
@@ -81,6 +81,15 @@ export default class SimpleUploadAdapter extends Plugin {
|
|
81
81
|
* Upload adapter.
|
82
82
|
*/
|
83
83
|
class Adapter {
|
84
|
+
/**
|
85
|
+
* FileLoader instance to use during the upload.
|
86
|
+
*/
|
87
|
+
loader;
|
88
|
+
/**
|
89
|
+
* The configuration of the adapter.
|
90
|
+
*/
|
91
|
+
options;
|
92
|
+
xhr;
|
84
93
|
/**
|
85
94
|
* Creates a new adapter instance.
|
86
95
|
*/
|
package/src/filereader.js
CHANGED
@@ -11,6 +11,16 @@ import { ObservableMixin } from '@ckeditor/ckeditor5-utils';
|
|
11
11
|
* Wrapper over the native `FileReader`.
|
12
12
|
*/
|
13
13
|
export default class FileReader extends /* #__PURE__ */ ObservableMixin() {
|
14
|
+
total;
|
15
|
+
/**
|
16
|
+
* Instance of native FileReader.
|
17
|
+
*/
|
18
|
+
_reader;
|
19
|
+
/**
|
20
|
+
* Holds the data of an already loaded file. The file must be first loaded
|
21
|
+
* by using {@link module:upload/filereader~FileReader#read `read()`}.
|
22
|
+
*/
|
23
|
+
_data;
|
14
24
|
/**
|
15
25
|
* Creates an instance of the FileReader.
|
16
26
|
*/
|
package/src/filerepository.js
CHANGED
@@ -21,22 +21,19 @@ import FileReader from './filereader.js';
|
|
21
21
|
* {@link module:upload/filerepository~FileLoader} instance to load and upload files.
|
22
22
|
*/
|
23
23
|
export default class FileRepository extends Plugin {
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
*/
|
38
|
-
this._pendingAction = null;
|
39
|
-
}
|
24
|
+
/**
|
25
|
+
* Collection of loaders associated with this repository.
|
26
|
+
*/
|
27
|
+
loaders = new Collection();
|
28
|
+
/**
|
29
|
+
* Loaders mappings used to retrieve loaders references.
|
30
|
+
*/
|
31
|
+
_loadersMap = new Map();
|
32
|
+
/**
|
33
|
+
* Reference to a pending action registered in a {@link module:core/pendingactions~PendingActions} plugin
|
34
|
+
* while upload is in progress. When there is no upload then value is `null`.
|
35
|
+
*/
|
36
|
+
_pendingAction = null;
|
40
37
|
/**
|
41
38
|
* @inheritDoc
|
42
39
|
*/
|
@@ -187,6 +184,24 @@ export default class FileRepository extends Plugin {
|
|
187
184
|
* It is used to control the process of reading the file and uploading it using the specified upload adapter.
|
188
185
|
*/
|
189
186
|
class FileLoader extends /* #__PURE__ */ ObservableMixin() {
|
187
|
+
/**
|
188
|
+
* Unique id of FileLoader instance.
|
189
|
+
*
|
190
|
+
* @readonly
|
191
|
+
*/
|
192
|
+
id;
|
193
|
+
/**
|
194
|
+
* Additional wrapper over the initial file promise passed to this loader.
|
195
|
+
*/
|
196
|
+
_filePromiseWrapper;
|
197
|
+
/**
|
198
|
+
* Adapter instance associated with this file loader.
|
199
|
+
*/
|
200
|
+
_adapter;
|
201
|
+
/**
|
202
|
+
* FileReader used by FileLoader.
|
203
|
+
*/
|
204
|
+
_reader;
|
190
205
|
/**
|
191
206
|
* Creates a new instance of `FileLoader`.
|
192
207
|
*
|