1 | import { WidgetTracker } from '@jupyterlab/apputils';
|
2 | import { ITranslator } from '@jupyterlab/translation';
|
3 | import { VDomModel, VDomRenderer } from '@jupyterlab/ui-components';
|
4 | import { FileBrowser, FileBrowserModel } from '.';
|
5 |
|
6 |
|
7 |
|
8 | export declare class FileUploadStatus extends VDomRenderer<FileUploadStatus.Model> {
|
9 | |
10 |
|
11 |
|
12 | constructor(opts: FileUploadStatus.IOptions);
|
13 | /**
|
14 | * Render the FileUpload status.
|
15 | */
|
16 | render(): JSX.Element;
|
17 | dispose(): void;
|
18 | private _onBrowserChange;
|
19 | private readonly translator;
|
20 | private _trans;
|
21 | private _tracker;
|
22 | }
|
23 | /**
|
24 | * A namespace for FileUpload class statics.
|
25 | */
|
26 | export declare namespace FileUploadStatus {
|
27 | |
28 |
|
29 |
|
30 | class Model extends VDomModel {
|
31 | |
32 |
|
33 |
|
34 | constructor(browserModel: FileBrowserModel | null);
|
35 | /**
|
36 | * The currently uploading items.
|
37 | */
|
38 | get items(): IFileUploadItem[];
|
39 | /**
|
40 | * The current file browser model.
|
41 | */
|
42 | get browserModel(): FileBrowserModel | null;
|
43 | set browserModel(browserModel: FileBrowserModel | null);
|
44 | /**
|
45 | * Handle an uploadChanged event in the filebrowser model.
|
46 | */
|
47 | private _uploadChanged;
|
48 | private _items;
|
49 | private _browserModel;
|
50 | }
|
51 | /**
|
52 | * Options for creating the upload status item.
|
53 | */
|
54 | interface IOptions {
|
55 | |
56 |
|
57 |
|
58 | readonly tracker: WidgetTracker<FileBrowser>;
|
59 | |
60 |
|
61 |
|
62 | readonly translator?: ITranslator;
|
63 | }
|
64 | }
|
65 |
|
66 |
|
67 |
|
68 |
|
69 | interface IFileUploadItem {
|
70 | |
71 |
|
72 |
|
73 | path: string;
|
74 | |
75 |
|
76 |
|
77 | progress: number;
|
78 | |
79 |
|
80 |
|
81 | complete: boolean;
|
82 | }
|
83 | export {};
|