@jupyterlab/apputils 0.19.1-alpha.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +34 -0
- package/lib/clientsession.d.ts +443 -443
- package/lib/clientsession.js +883 -883
- package/lib/clipboard.d.ts +33 -33
- package/lib/clipboard.js +88 -88
- package/lib/commandlinker.d.ts +121 -121
- package/lib/commandlinker.js +175 -175
- package/lib/commandpalette.d.ts +33 -33
- package/lib/commandpalette.js +12 -12
- package/lib/dialog.d.ts +357 -357
- package/lib/dialog.js +540 -540
- package/lib/domutils.d.ts +13 -13
- package/lib/domutils.js +28 -28
- package/lib/hoverbox.d.ts +82 -82
- package/lib/hoverbox.js +101 -101
- package/lib/iframe.d.ts +14 -14
- package/lib/iframe.js +45 -45
- package/lib/index.d.ts +19 -19
- package/lib/index.js +26 -26
- package/lib/instancetracker.d.ts +278 -278
- package/lib/instancetracker.js +318 -318
- package/lib/mainareawidget.d.ts +108 -108
- package/lib/mainareawidget.js +184 -184
- package/lib/sanitizer.d.ts +44 -44
- package/lib/sanitizer.js +913 -913
- package/lib/spinner.d.ts +15 -15
- package/lib/spinner.js +30 -30
- package/lib/splash.d.ts +19 -19
- package/lib/splash.js +10 -10
- package/lib/styling.d.ts +27 -27
- package/lib/styling.js +92 -92
- package/lib/thememanager.d.ts +141 -141
- package/lib/thememanager.js +238 -238
- package/lib/toolbar.d.ts +178 -178
- package/lib/toolbar.js +515 -515
- package/lib/vdom.d.ts +90 -90
- package/lib/vdom.js +130 -130
- package/lib/windowresolver.d.ts +37 -37
- package/lib/windowresolver.js +173 -173
- package/package.json +9 -6
package/lib/toolbar.d.ts
CHANGED
|
@@ -1,178 +1,178 @@
|
|
|
1
|
-
import { ReactElementWidget } from './vdom';
|
|
2
|
-
import { IIterator } from '@phosphor/algorithm';
|
|
3
|
-
import { CommandRegistry } from '@phosphor/commands';
|
|
4
|
-
import { Message } from '@phosphor/messaging';
|
|
5
|
-
import { Widget } from '@phosphor/widgets';
|
|
6
|
-
import { IClientSession } from './clientsession';
|
|
7
|
-
import * as React from 'react';
|
|
8
|
-
/**
|
|
9
|
-
* A class which provides a toolbar widget.
|
|
10
|
-
*/
|
|
11
|
-
export declare class Toolbar<T extends Widget = Widget> extends Widget {
|
|
12
|
-
/**
|
|
13
|
-
* Construct a new toolbar widget.
|
|
14
|
-
*/
|
|
15
|
-
constructor();
|
|
16
|
-
/**
|
|
17
|
-
* Get an iterator over the ordered toolbar item names.
|
|
18
|
-
*
|
|
19
|
-
* @returns An iterator over the toolbar item names.
|
|
20
|
-
*/
|
|
21
|
-
names(): IIterator<string>;
|
|
22
|
-
/**
|
|
23
|
-
* Add an item to the end of the toolbar.
|
|
24
|
-
*
|
|
25
|
-
* @param name - The name of the widget to add to the toolbar.
|
|
26
|
-
*
|
|
27
|
-
* @param widget - The widget to add to the toolbar.
|
|
28
|
-
*
|
|
29
|
-
* @param index - The optional name of the item to insert after.
|
|
30
|
-
*
|
|
31
|
-
* @returns Whether the item was added to toolbar. Returns false if
|
|
32
|
-
* an item of the same name is already in the toolbar.
|
|
33
|
-
*
|
|
34
|
-
* #### Notes
|
|
35
|
-
* The item can be removed from the toolbar by setting its parent to `null`.
|
|
36
|
-
*/
|
|
37
|
-
addItem(name: string, widget: T): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Insert an item into the toolbar at the specified index.
|
|
40
|
-
*
|
|
41
|
-
* @param index - The index at which to insert the item.
|
|
42
|
-
*
|
|
43
|
-
* @param name - The name of the item.
|
|
44
|
-
*
|
|
45
|
-
* @param widget - The widget to add.
|
|
46
|
-
*
|
|
47
|
-
* @returns Whether the item was added to the toolbar. Returns false if
|
|
48
|
-
* an item of the same name is already in the toolbar.
|
|
49
|
-
*
|
|
50
|
-
* #### Notes
|
|
51
|
-
* The index will be clamped to the bounds of the items.
|
|
52
|
-
* The item can be removed from the toolbar by setting its parent to `null`.
|
|
53
|
-
*/
|
|
54
|
-
insertItem(index: number, name: string, widget: T): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Handle the DOM events for the widget.
|
|
57
|
-
*
|
|
58
|
-
* @param event - The DOM event sent to the widget.
|
|
59
|
-
*
|
|
60
|
-
* #### Notes
|
|
61
|
-
* This method implements the DOM `EventListener` interface and is
|
|
62
|
-
* called in response to events on the dock panel's node. It should
|
|
63
|
-
* not be called directly by user code.
|
|
64
|
-
*/
|
|
65
|
-
handleEvent(event: Event): void;
|
|
66
|
-
/**
|
|
67
|
-
* Handle `after-attach` messages for the widget.
|
|
68
|
-
*/
|
|
69
|
-
protected onAfterAttach(msg: Message): void;
|
|
70
|
-
/**
|
|
71
|
-
* Handle `before-detach` messages for the widget.
|
|
72
|
-
*/
|
|
73
|
-
protected onBeforeDetach(msg: Message): void;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* The namespace for Toolbar class statics.
|
|
77
|
-
*/
|
|
78
|
-
export declare namespace Toolbar {
|
|
79
|
-
/**
|
|
80
|
-
* Create an interrupt toolbar item.
|
|
81
|
-
*/
|
|
82
|
-
function createInterruptButton(session: IClientSession): ToolbarButton;
|
|
83
|
-
/**
|
|
84
|
-
* Create a restart toolbar item.
|
|
85
|
-
*/
|
|
86
|
-
function createRestartButton(session: IClientSession): ToolbarButton;
|
|
87
|
-
/**
|
|
88
|
-
* Create a toolbar spacer item.
|
|
89
|
-
*
|
|
90
|
-
* #### Notes
|
|
91
|
-
* It is a flex spacer that separates the left toolbar items
|
|
92
|
-
* from the right toolbar items.
|
|
93
|
-
*/
|
|
94
|
-
function createSpacerItem(): Widget;
|
|
95
|
-
/**
|
|
96
|
-
* Create a kernel name indicator item.
|
|
97
|
-
*
|
|
98
|
-
* #### Notes
|
|
99
|
-
* It will display the `'display_name`' of the current kernel,
|
|
100
|
-
* or `'No Kernel!'` if there is no kernel.
|
|
101
|
-
* It can handle a change in context or kernel.
|
|
102
|
-
*/
|
|
103
|
-
function createKernelNameItem(session: IClientSession): ToolbarButton;
|
|
104
|
-
/**
|
|
105
|
-
* Create a kernel status indicator item.
|
|
106
|
-
*
|
|
107
|
-
* #### Notes
|
|
108
|
-
* It show display a busy status if the kernel status is
|
|
109
|
-
* not idle.
|
|
110
|
-
* It will show the current status in the node title.
|
|
111
|
-
* It can handle a change to the context or the kernel.
|
|
112
|
-
*/
|
|
113
|
-
function createKernelStatusItem(session: IClientSession): Widget;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Namespace for ToolbarButtonComponent.
|
|
117
|
-
*/
|
|
118
|
-
export declare namespace ToolbarButtonComponent {
|
|
119
|
-
/**
|
|
120
|
-
* Interface for ToolbarButttonComponent props.
|
|
121
|
-
*/
|
|
122
|
-
interface IProps {
|
|
123
|
-
className?: string;
|
|
124
|
-
label?: string;
|
|
125
|
-
iconClassName?: string;
|
|
126
|
-
iconLabel?: string;
|
|
127
|
-
tooltip?: string;
|
|
128
|
-
onClick?: () => void;
|
|
129
|
-
enabled?: boolean;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* React component for a toolbar button.
|
|
134
|
-
*
|
|
135
|
-
* @param props - The props for ToolbarButtonComponent.
|
|
136
|
-
*/
|
|
137
|
-
export declare function ToolbarButtonComponent(props: ToolbarButtonComponent.IProps): JSX.Element;
|
|
138
|
-
/**
|
|
139
|
-
* Phosphor Widget version of ToolbarButtonComponent.
|
|
140
|
-
*/
|
|
141
|
-
export declare class ToolbarButton extends ReactElementWidget {
|
|
142
|
-
/**
|
|
143
|
-
* Create a ToolbarButton.
|
|
144
|
-
*
|
|
145
|
-
* @param props - Props for ToolbarButtonComponent.
|
|
146
|
-
*/
|
|
147
|
-
constructor(props?: ToolbarButtonComponent.IProps);
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Namespace for CommandToolbarButtonComponent.
|
|
151
|
-
*/
|
|
152
|
-
export declare namespace CommandToolbarButtonComponent {
|
|
153
|
-
/**
|
|
154
|
-
* Interface for CommandToolbarButtonComponent props.
|
|
155
|
-
*/
|
|
156
|
-
interface IProps {
|
|
157
|
-
commands: CommandRegistry;
|
|
158
|
-
id: string;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* React component for a toolbar button that wraps a command.
|
|
163
|
-
*
|
|
164
|
-
* This wraps the ToolbarButtonComponent and watches the command registry
|
|
165
|
-
* for changes to the command.
|
|
166
|
-
*/
|
|
167
|
-
export declare class CommandToolbarButtonComponent extends React.Component<CommandToolbarButtonComponent.IProps> {
|
|
168
|
-
constructor(props: CommandToolbarButtonComponent.IProps);
|
|
169
|
-
render(): JSX.Element;
|
|
170
|
-
private _onChange;
|
|
171
|
-
private _childProps;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Phosphor Widget version of ToolbarButtonComponent.
|
|
175
|
-
*/
|
|
176
|
-
export declare class CommandToolbarButton extends ReactElementWidget {
|
|
177
|
-
constructor(props: CommandToolbarButtonComponent.IProps);
|
|
178
|
-
}
|
|
1
|
+
import { ReactElementWidget } from './vdom';
|
|
2
|
+
import { IIterator } from '@phosphor/algorithm';
|
|
3
|
+
import { CommandRegistry } from '@phosphor/commands';
|
|
4
|
+
import { Message } from '@phosphor/messaging';
|
|
5
|
+
import { Widget } from '@phosphor/widgets';
|
|
6
|
+
import { IClientSession } from './clientsession';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* A class which provides a toolbar widget.
|
|
10
|
+
*/
|
|
11
|
+
export declare class Toolbar<T extends Widget = Widget> extends Widget {
|
|
12
|
+
/**
|
|
13
|
+
* Construct a new toolbar widget.
|
|
14
|
+
*/
|
|
15
|
+
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* Get an iterator over the ordered toolbar item names.
|
|
18
|
+
*
|
|
19
|
+
* @returns An iterator over the toolbar item names.
|
|
20
|
+
*/
|
|
21
|
+
names(): IIterator<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Add an item to the end of the toolbar.
|
|
24
|
+
*
|
|
25
|
+
* @param name - The name of the widget to add to the toolbar.
|
|
26
|
+
*
|
|
27
|
+
* @param widget - The widget to add to the toolbar.
|
|
28
|
+
*
|
|
29
|
+
* @param index - The optional name of the item to insert after.
|
|
30
|
+
*
|
|
31
|
+
* @returns Whether the item was added to toolbar. Returns false if
|
|
32
|
+
* an item of the same name is already in the toolbar.
|
|
33
|
+
*
|
|
34
|
+
* #### Notes
|
|
35
|
+
* The item can be removed from the toolbar by setting its parent to `null`.
|
|
36
|
+
*/
|
|
37
|
+
addItem(name: string, widget: T): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Insert an item into the toolbar at the specified index.
|
|
40
|
+
*
|
|
41
|
+
* @param index - The index at which to insert the item.
|
|
42
|
+
*
|
|
43
|
+
* @param name - The name of the item.
|
|
44
|
+
*
|
|
45
|
+
* @param widget - The widget to add.
|
|
46
|
+
*
|
|
47
|
+
* @returns Whether the item was added to the toolbar. Returns false if
|
|
48
|
+
* an item of the same name is already in the toolbar.
|
|
49
|
+
*
|
|
50
|
+
* #### Notes
|
|
51
|
+
* The index will be clamped to the bounds of the items.
|
|
52
|
+
* The item can be removed from the toolbar by setting its parent to `null`.
|
|
53
|
+
*/
|
|
54
|
+
insertItem(index: number, name: string, widget: T): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Handle the DOM events for the widget.
|
|
57
|
+
*
|
|
58
|
+
* @param event - The DOM event sent to the widget.
|
|
59
|
+
*
|
|
60
|
+
* #### Notes
|
|
61
|
+
* This method implements the DOM `EventListener` interface and is
|
|
62
|
+
* called in response to events on the dock panel's node. It should
|
|
63
|
+
* not be called directly by user code.
|
|
64
|
+
*/
|
|
65
|
+
handleEvent(event: Event): void;
|
|
66
|
+
/**
|
|
67
|
+
* Handle `after-attach` messages for the widget.
|
|
68
|
+
*/
|
|
69
|
+
protected onAfterAttach(msg: Message): void;
|
|
70
|
+
/**
|
|
71
|
+
* Handle `before-detach` messages for the widget.
|
|
72
|
+
*/
|
|
73
|
+
protected onBeforeDetach(msg: Message): void;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The namespace for Toolbar class statics.
|
|
77
|
+
*/
|
|
78
|
+
export declare namespace Toolbar {
|
|
79
|
+
/**
|
|
80
|
+
* Create an interrupt toolbar item.
|
|
81
|
+
*/
|
|
82
|
+
function createInterruptButton(session: IClientSession): ToolbarButton;
|
|
83
|
+
/**
|
|
84
|
+
* Create a restart toolbar item.
|
|
85
|
+
*/
|
|
86
|
+
function createRestartButton(session: IClientSession): ToolbarButton;
|
|
87
|
+
/**
|
|
88
|
+
* Create a toolbar spacer item.
|
|
89
|
+
*
|
|
90
|
+
* #### Notes
|
|
91
|
+
* It is a flex spacer that separates the left toolbar items
|
|
92
|
+
* from the right toolbar items.
|
|
93
|
+
*/
|
|
94
|
+
function createSpacerItem(): Widget;
|
|
95
|
+
/**
|
|
96
|
+
* Create a kernel name indicator item.
|
|
97
|
+
*
|
|
98
|
+
* #### Notes
|
|
99
|
+
* It will display the `'display_name`' of the current kernel,
|
|
100
|
+
* or `'No Kernel!'` if there is no kernel.
|
|
101
|
+
* It can handle a change in context or kernel.
|
|
102
|
+
*/
|
|
103
|
+
function createKernelNameItem(session: IClientSession): ToolbarButton;
|
|
104
|
+
/**
|
|
105
|
+
* Create a kernel status indicator item.
|
|
106
|
+
*
|
|
107
|
+
* #### Notes
|
|
108
|
+
* It show display a busy status if the kernel status is
|
|
109
|
+
* not idle.
|
|
110
|
+
* It will show the current status in the node title.
|
|
111
|
+
* It can handle a change to the context or the kernel.
|
|
112
|
+
*/
|
|
113
|
+
function createKernelStatusItem(session: IClientSession): Widget;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Namespace for ToolbarButtonComponent.
|
|
117
|
+
*/
|
|
118
|
+
export declare namespace ToolbarButtonComponent {
|
|
119
|
+
/**
|
|
120
|
+
* Interface for ToolbarButttonComponent props.
|
|
121
|
+
*/
|
|
122
|
+
interface IProps {
|
|
123
|
+
className?: string;
|
|
124
|
+
label?: string;
|
|
125
|
+
iconClassName?: string;
|
|
126
|
+
iconLabel?: string;
|
|
127
|
+
tooltip?: string;
|
|
128
|
+
onClick?: () => void;
|
|
129
|
+
enabled?: boolean;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* React component for a toolbar button.
|
|
134
|
+
*
|
|
135
|
+
* @param props - The props for ToolbarButtonComponent.
|
|
136
|
+
*/
|
|
137
|
+
export declare function ToolbarButtonComponent(props: ToolbarButtonComponent.IProps): JSX.Element;
|
|
138
|
+
/**
|
|
139
|
+
* Phosphor Widget version of ToolbarButtonComponent.
|
|
140
|
+
*/
|
|
141
|
+
export declare class ToolbarButton extends ReactElementWidget {
|
|
142
|
+
/**
|
|
143
|
+
* Create a ToolbarButton.
|
|
144
|
+
*
|
|
145
|
+
* @param props - Props for ToolbarButtonComponent.
|
|
146
|
+
*/
|
|
147
|
+
constructor(props?: ToolbarButtonComponent.IProps);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Namespace for CommandToolbarButtonComponent.
|
|
151
|
+
*/
|
|
152
|
+
export declare namespace CommandToolbarButtonComponent {
|
|
153
|
+
/**
|
|
154
|
+
* Interface for CommandToolbarButtonComponent props.
|
|
155
|
+
*/
|
|
156
|
+
interface IProps {
|
|
157
|
+
commands: CommandRegistry;
|
|
158
|
+
id: string;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* React component for a toolbar button that wraps a command.
|
|
163
|
+
*
|
|
164
|
+
* This wraps the ToolbarButtonComponent and watches the command registry
|
|
165
|
+
* for changes to the command.
|
|
166
|
+
*/
|
|
167
|
+
export declare class CommandToolbarButtonComponent extends React.Component<CommandToolbarButtonComponent.IProps> {
|
|
168
|
+
constructor(props: CommandToolbarButtonComponent.IProps);
|
|
169
|
+
render(): JSX.Element;
|
|
170
|
+
private _onChange;
|
|
171
|
+
private _childProps;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Phosphor Widget version of ToolbarButtonComponent.
|
|
175
|
+
*/
|
|
176
|
+
export declare class CommandToolbarButton extends ReactElementWidget {
|
|
177
|
+
constructor(props: CommandToolbarButtonComponent.IProps);
|
|
178
|
+
}
|