UNPKG

1.26 kBTypeScriptView Raw
1import { ToolbarButton } from '@jupyterlab/apputils';
2import { ITranslator } from '@jupyterlab/translation';
3import { FileBrowserModel } from './model';
4/**
5 * A widget which provides an upload button.
6 */
7export declare class Uploader extends ToolbarButton {
8 /**
9 * Construct a new file browser buttons widget.
10 */
11 constructor(options: Uploader.IOptions);
12 /**
13 * The underlying file browser fileBrowserModel for the widget.
14 *
15 * This cannot be named model as that conflicts with the model property of VDomRenderer.
16 */
17 readonly fileBrowserModel: FileBrowserModel;
18 /**
19 * The 'change' handler for the input field.
20 */
21 private _onInputChanged;
22 /**
23 * The 'click' handler for the input field.
24 */
25 private _onInputClicked;
26 protected translator: ITranslator;
27 private _trans;
28 private _input;
29}
30/**
31 * The namespace for Uploader class statics.
32 */
33export declare namespace Uploader {
34 /**
35 * The options used to create an uploader.
36 */
37 interface IOptions {
38 /**
39 * A file browser fileBrowserModel instance.
40 */
41 model: FileBrowserModel;
42 /**
43 * The language translator.
44 */
45 translator?: ITranslator;
46 }
47}