How to use the @jupyterlab/launcher.LauncherModel function in @jupyterlab/launcher

To help you get started, we’ve selected a few @jupyterlab/launcher examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab-data-explorer / packages / launcher-extension / src / index.ts View on Github external
function activate(
  app: JupyterFrontEnd,
  palette: ICommandPalette,
  labShell: ILabShell
): ILauncher {
  const { commands } = app;
  const model = new LauncherModel();

  commands.addCommand(CommandIDs.create, {
    label: 'New Launcher',
    execute: (args: JSONObject) => {
      const cwd = args['cwd'] ? String(args['cwd']) : '';
      const id = `launcher-${Private.id++}`;
      const callback = (item: Widget) => {
        labShell.add(item, 'main', { ref: id });
      };
      const launcher = new Launcher({ cwd, callback, commands });

      launcher.model = model;
      launcher.title.label = 'Launcher';
      launcher.title.iconClass = 'jp-LauncherIcon';

      let main = new MainAreaWidget({ content: launcher });
github jupyterlab / jupyterlab / packages / launcher-extension / src / index.ts View on Github external
function activate(
  app: JupyterFrontEnd,
  palette: ICommandPalette,
  labShell: ILabShell
): ILauncher {
  const { commands } = app;
  const model = new LauncherModel();

  commands.addCommand(CommandIDs.create, {
    label: 'New Launcher',
    execute: (args: JSONObject) => {
      const cwd = args['cwd'] ? String(args['cwd']) : '';
      const id = `launcher-${Private.id++}`;
      const callback = (item: Widget) => {
        labShell.add(item, 'main', { ref: id });
      };
      const launcher = new Launcher({ model, cwd, callback, commands });

      launcher.model = model;
      launcher.title.label = 'Launcher';
      launcher.title.iconClass = 'jp-LauncherIcon';

      let main = new MainAreaWidget({ content: launcher });

@jupyterlab/launcher

JupyterLab - Launcher Panel

BSD-3-Clause
Latest version published 13 days ago

Package Health Score

92 / 100
Full package analysis

Similar packages