@jupyterlab/launcher
- Version 4.2.5
- Published
- 46.2 kB
- 10 dependencies
- BSD-3-Clause license
Install
npm i @jupyterlab/launcher
yarn add @jupyterlab/launcher
pnpm add @jupyterlab/launcher
Overview
launcher
Index
Variables
variable ILauncher
const ILauncher: Token<ILauncher>;
The launcher token.
Classes
class Launcher
class Launcher extends VDomRenderer<ILauncher.IModel> {}
A virtual-DOM-based widget for the Launcher.
constructor
constructor(options: ILauncher.IOptions);
Construct a new launcher widget.
property cwd
cwd: string;
The cwd of the launcher.
property pending
pending: boolean;
Whether there is a pending item being launched.
property translator
protected translator: ITranslator;
method render
protected render: () => React.ReactElement<any> | null;
Render the launcher to virtual DOM nodes.
class LauncherModel
class LauncherModel extends VDomModel implements ILauncher.IModel {}
LauncherModel keeps track of the path to working directory and has a list of LauncherItems, which the Launcher will render.
property itemsList
protected itemsList: ILauncher.IItemOptions[];
method add
add: (options: ILauncher.IItemOptions) => IDisposable;
Add a command item to the launcher, and trigger re-render event for parent widget.
Parameter options
The specification options for a launcher item.
Returns
A disposable that will remove the item from Launcher, and trigger re-render event for parent widget.
method items
items: () => IterableIterator<ILauncher.IItemOptions>;
Return an iterator of launcher items.
Interfaces
interface ILauncher
interface ILauncher {}
The launcher interface.
method add
add: (options: ILauncher.IItemOptions) => IDisposable;
Add a command item to the launcher, and trigger re-render event for parent widget.
Parameter options
The specification options for a launcher item.
Returns
A disposable that will remove the item from Launcher, and trigger re-render event for parent widget.
Namespaces
namespace ILauncher
namespace ILauncher {}
The namespace for
ILauncher
class statics.
interface IItemOptions
interface IItemOptions {}
The options used to create a launcher item.
property args
args?: ReadonlyJSONObject;
The arguments given to the command for creating the launcher item.
### Notes The launcher will also add the current working directory of the filebrowser in the
cwd
field of the args, which a command may use to create the activity with respect to the right directory.
property category
category?: string;
The category for the launcher item.
The default value is an empty string.
property command
command: string;
The command ID for the launcher item.
#### Notes If the command's
execute
method returns aWidget
or a promise that resolves with aWidget
, then that widget will replace the launcher in the same location of the application shell. If theexecute
method does something else (i.e., create a modal dialog), then the launcher will not be disposed.
property kernelIconUrl
kernelIconUrl?: string;
For items that have a kernel associated with them, the URL of the kernel icon.
This is not a CSS class, but the URL that points to the icon in the kernel spec.
property metadata
metadata?: ReadonlyJSONObject;
Metadata about the item. This can be used by the launcher to affect how the item is displayed.
property rank
rank?: number;
The rank for the launcher item.
The rank is used when ordering launcher items for display. After grouping into categories, items are sorted in the following order: 1. Rank (lower is better) 3. Display Name (locale order)
The default rank is
Infinity
.
interface IModel
interface IModel extends ILauncher, VDomRenderer.IModel {}
An interface for the launcher model
method items
items: () => IterableIterator<ILauncher.IItemOptions>;
Return an iterator of launcher items.
interface IOptions
interface IOptions {}
The options used to create a Launcher.
property callback
callback: (widget: Widget) => void;
The callback used when an item is launched.
property commands
commands: CommandRegistry;
The command registry used by the launcher.
property cwd
cwd: string;
The cwd of the launcher.
property model
model: IModel;
The model of the launcher.
property translator
translator?: ITranslator;
The application language translation.
Package Files (3)
Dependencies (10)
Dev Dependencies (3)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@jupyterlab/launcher
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@jupyterlab/launcher)
- HTML<a href="https://www.jsdocs.io/package/@jupyterlab/launcher"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2603 ms. - Missing or incorrect documentation? Open an issue for this package.