How to use the @jupyterlab/docmanager.SavingStatus function in @jupyterlab/docmanager

To help you get started, we’ve selected a few @jupyterlab/docmanager 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 / packages / docmanager-extension / src / index.ts View on Github external
activate: (
    _: JupyterFrontEnd,
    statusBar: IStatusBar,
    docManager: IDocumentManager,
    labShell: ILabShell
  ) => {
    const saving = new SavingStatus({ docManager });

    // Keep the currently active widget synchronized.
    saving.model!.widget = labShell.currentWidget;
    labShell.currentChanged.connect(() => {
      saving.model!.widget = labShell.currentWidget;
    });

    statusBar.registerStatusItem(savingStatusPlugin.id, {
      item: saving,
      align: 'middle',
      isActive: () => true,
      activeStateChanged: saving.model!.stateChanged
    });
  }
};
github jupyterlab / jupyterlab-data-explorer / jupyterlab / packages / docmanager-extension / src / index.ts View on Github external
activate: (
    _: JupyterFrontEnd,
    statusBar: IStatusBar,
    docManager: IDocumentManager,
    labShell: ILabShell
  ) => {
    const saving = new SavingStatus({ docManager });

    // Keep the currently active widget synchronized.
    saving.model!.widget = labShell.currentWidget;
    labShell.currentChanged.connect(() => {
      saving.model!.widget = labShell.currentWidget;
    });

    statusBar.registerStatusItem(savingStatusPlugin.id, {
      item: saving,
      align: 'middle',
      isActive: () => true,
      activeStateChanged: saving.model!.stateChanged
    });
  }
};