Notebook Views (#13465)

* Add notebook editor

Introduce notebook editor component to allow for separate notebook displays in order to accomodate notebook views

* Localize notebook views configuration title

* Refactor view mode and remove the views configuration while it is unused

* Only fire view mode changed event when the value has been changed

* Remove notebook views contribution
This commit is contained in:
Daniel Grajeda
2020-12-27 14:08:27 -07:00
committed by GitHub
parent f314a9e1e6
commit 11f236ade1
8 changed files with 254 additions and 88 deletions

View File

@@ -32,6 +32,7 @@ import { ICellComponentRegistry, Extensions as OutputComponentExtensions } from
import { CollapseComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/collapse.component';
import { MarkdownToolbarComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/markdownToolbar.component';
import { CellToolbarComponent } from 'sql/workbench/contrib/notebook/browser/cellViews/cellToolbar.component';
import { NotebookEditorComponent } from 'sql/workbench/contrib/notebook/browser/notebookEditor.component';
const outputComponentRegistry = Registry.as<ICellComponentRegistry>(OutputComponentExtensions.CellComponentContributions);
@@ -52,6 +53,7 @@ export const NotebookModule = (params, selector: string, instantiationService: I
MarkdownToolbarComponent,
PlaceholderCellComponent,
NotebookComponent,
NotebookEditorComponent,
ComponentHostDirective,
OutputAreaComponent,
OutputComponent,
@@ -62,6 +64,7 @@ export const NotebookModule = (params, selector: string, instantiationService: I
],
entryComponents: [
NotebookComponent,
NotebookEditorComponent,
...outputComponents
],
imports: [
@@ -86,7 +89,7 @@ export const NotebookModule = (params, selector: string, instantiationService: I
}
ngDoBootstrap(appRef: ApplicationRef) {
const factoryWrapper: any = this._resolver.resolveComponentFactory(NotebookComponent);
const factoryWrapper: any = this._resolver.resolveComponentFactory(NotebookEditorComponent);
factoryWrapper.factory.selector = this.selector;
appRef.bootstrap(factoryWrapper);
}