UNPKG

2.04 kBTypeScriptView Raw
1import { VDomModel, VDomRenderer } from '@jupyterlab/ui-components';
2import { Widget } from '@lumino/widgets';
3import { IDocumentManager } from './tokens';
4/**
5 * A status bar item for the current file path (or activity name).
6 */
7export declare class PathStatus extends VDomRenderer<PathStatus.Model> {
8 /**
9 * Construct a new PathStatus status item.
10 */
11 constructor(opts: PathStatus.IOptions);
12 /**
13 * Render the status item.
14 */
15 render(): JSX.Element;
16}
17/**
18 * A namespace for PathStatus statics.
19 */
20export declare namespace PathStatus {
21 /**
22 * A VDomModel for rendering the PathStatus status item.
23 */
24 class Model extends VDomModel {
25 /**
26 * Construct a new model.
27 *
28 * @param docManager the application document manager. Used to check
29 * whether the current widget is a document.
30 */
31 constructor(docManager: IDocumentManager);
32 /**
33 * The current path for the application.
34 */
35 get path(): string;
36 /**
37 * The name of the current activity.
38 */
39 get name(): string;
40 /**
41 * The current widget for the application.
42 */
43 get widget(): Widget | null;
44 set widget(widget: Widget | null);
45 /**
46 * React to a title change for the current widget.
47 */
48 private _onTitleChange;
49 /**
50 * React to a path change for the current document.
51 */
52 private _onPathChange;
53 /**
54 * Get the current state of the model.
55 */
56 private _getAllState;
57 /**
58 * Trigger a state change to rerender.
59 */
60 private _triggerChange;
61 private _path;
62 private _name;
63 private _widget;
64 private _docManager;
65 }
66 /**
67 * Options for creating the PathStatus widget.
68 */
69 interface IOptions {
70 /**
71 * The application document manager.
72 */
73 docManager: IDocumentManager;
74 }
75}