How to use the @jupyter-widgets/jupyterlab-manager.output.OutputView function in @jupyter-widgets/jupyterlab-manager

To help you get started, we’ve selected a few @jupyter-widgets/jupyterlab-manager 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 jupyter-widgets / jupyterlab-sidecar / src / plugin.ts View on Github external
function activateWidgetExtension(app: JupyterLab, registry: IJupyterWidgetRegistry): void {
    let SidecarView = class extends output.OutputView {
      model: SidecarModel;

      render() {
        if (!this.model.rendered) {
          super.render();
          let w = this._outputView;
          w.addClass('jupyterlab-sidecar');
          w.addClass('jp-LinkedOutputView');
          w.title.label = this.model.get('title');
          w.title.closable = true;
          app.shell['_rightHandler'].sideBar.tabCloseRequested.connect((sender : any, tab : any) => {
              tab.title.owner.dispose();
          });
          w.id = UUID.uuid4();
          if (Object.keys(this.model.views).length > 1) {
            w.node.style.display = 'none';