@ckeditor/ckeditor5-upload 35.3.1 → 35.4.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": "35.3.1",
3
+ "version": "35.4.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": "^35.3.1",
15
- "@ckeditor/ckeditor5-utils": "^35.3.1",
16
- "@ckeditor/ckeditor5-ui": "^35.3.1"
14
+ "@ckeditor/ckeditor5-core": "^35.4.0",
15
+ "@ckeditor/ckeditor5-utils": "^35.4.0",
16
+ "@ckeditor/ckeditor5-ui": "^35.4.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "typescript": "^4.8.4",
@@ -6,7 +6,7 @@
6
6
  * @module upload/adapters/base64uploadadapter
7
7
  */
8
8
  /* globals window */
9
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
9
+ import { Plugin } from '@ckeditor/ckeditor5-core';
10
10
  import FileRepository from '../filerepository';
11
11
  /**
12
12
  * A plugin that converts images inserted into the editor into [Base64 strings](https://en.wikipedia.org/wiki/Base64)
@@ -6,9 +6,9 @@
6
6
  * @module upload/adapters/simpleuploadadapter
7
7
  */
8
8
  /* globals XMLHttpRequest, FormData */
9
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
9
+ import { Plugin } from '@ckeditor/ckeditor5-core';
10
10
  import FileRepository from '../filerepository';
11
- import { logWarning } from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
11
+ import { logWarning } from '@ckeditor/ckeditor5-utils';
12
12
  /**
13
13
  * The Simple upload adapter allows uploading images to an application running on your server using
14
14
  * the [`XMLHttpRequest`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) API with a
package/src/filereader.js CHANGED
@@ -6,11 +6,11 @@
6
6
  * @module upload/filereader
7
7
  */
8
8
  /* globals window */
9
- import { Observable } from '@ckeditor/ckeditor5-utils/src/observablemixin';
9
+ import { ObservableMixin } from '@ckeditor/ckeditor5-utils';
10
10
  /**
11
11
  * Wrapper over the native `FileReader`.
12
12
  */
13
- export default class FileReader extends Observable {
13
+ export default class FileReader extends ObservableMixin() {
14
14
  /**
15
15
  * Creates an instance of the FileReader.
16
16
  */
@@ -5,13 +5,9 @@
5
5
  /**
6
6
  * @module upload/filerepository
7
7
  */
8
- import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
9
- import PendingActions from '@ckeditor/ckeditor5-core/src/pendingactions';
10
- import CKEditorError, { logWarning } from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
11
- import { Observable } from '@ckeditor/ckeditor5-utils/src/observablemixin';
12
- import Collection from '@ckeditor/ckeditor5-utils/src/collection';
8
+ import { Plugin, PendingActions } from '@ckeditor/ckeditor5-core';
9
+ import { CKEditorError, Collection, ObservableMixin, logWarning, uid } from '@ckeditor/ckeditor5-utils';
13
10
  import FileReader from './filereader';
14
- import uid from '@ckeditor/ckeditor5-utils/src/uid';
15
11
  /**
16
12
  * File repository plugin. A central point for managing file upload.
17
13
  *
@@ -19,7 +15,7 @@ import uid from '@ckeditor/ckeditor5-utils/src/uid';
19
15
  * (sending the file and handling server's response). You can use one of the existing plugins introducing upload adapters
20
16
  * (e.g. {@link module:easy-image/cloudservicesuploadadapter~CloudServicesUploadAdapter} or
21
17
  * {@link module:adapter-ckfinder/uploadadapter~CKFinderUploadAdapter}) or write your own one – see
22
- * the {@glink framework/guides/deep-dive/upload-adapter Custom image upload adapter deep dive guide}.
18
+ * the {@glink framework/guides/deep-dive/upload-adapter Custom image upload adapter deep-dive guide}.
23
19
  *
24
20
  * Then, you can use {@link module:upload/filerepository~FileRepository#createLoader `createLoader()`} and the returned
25
21
  * {@link module:upload/filerepository~FileLoader} instance to load and upload files.
@@ -229,7 +225,7 @@ export default class FileRepository extends Plugin {
229
225
  *
230
226
  * It is used to control the process of reading the file and uploading it using the specified upload adapter.
231
227
  */
232
- class FileLoader extends Observable {
228
+ class FileLoader extends ObservableMixin() {
233
229
  /**
234
230
  * Creates a new instance of `FileLoader`.
235
231
  *
@@ -5,8 +5,7 @@
5
5
  /**
6
6
  * @module upload/ui/filedialogbuttonview
7
7
  */
8
- import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
9
- import View from '@ckeditor/ckeditor5-ui/src/view';
8
+ import { ButtonView, View } from '@ckeditor/ckeditor5-ui';
10
9
  /**
11
10
  * The file dialog button view.
12
11
  *