1 | /**
|
2 | * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3 | * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4 | */
|
5 | /**
|
6 | * @module image/imageupload/imageuploadprogress
|
7 | */
|
8 | import { type Editor, Plugin } from 'ckeditor5/src/core.js';
|
9 | import '../../theme/imageuploadprogress.css';
|
10 | import '../../theme/imageuploadicon.css';
|
11 | import '../../theme/imageuploadloader.css';
|
12 | /**
|
13 | * The image upload progress plugin.
|
14 | * It shows a placeholder when the image is read from the disk and a progress bar while the image is uploading.
|
15 | */
|
16 | export default class ImageUploadProgress extends Plugin {
|
17 | /**
|
18 | * @inheritDoc
|
19 | */
|
20 | static get pluginName(): "ImageUploadProgress";
|
21 | /**
|
22 | * The image placeholder that is displayed before real image data can be accessed.
|
23 | *
|
24 | * For the record, this image is a 1x1 px GIF with an aspect ratio set by CSS.
|
25 | */
|
26 | private placeholder;
|
27 | /**
|
28 | * @inheritDoc
|
29 | */
|
30 | constructor(editor: Editor);
|
31 | /**
|
32 | * @inheritDoc
|
33 | */
|
34 | init(): void;
|
35 | /**
|
36 | * This method is called each time the image `uploadStatus` attribute is changed.
|
37 | *
|
38 | * @param evt An object containing information about the fired event.
|
39 | * @param data Additional information about the change.
|
40 | */
|
41 | private uploadStatusChange;
|
42 | }
|