mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 01:25:37 -05:00
Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)
This commit is contained in:
@@ -85,7 +85,7 @@ export class NotebookViewsCellModel extends CellModel {
|
||||
*/
|
||||
public override get outputs(): Array<nb.ICellOutput> {
|
||||
return super.outputs
|
||||
.filter((output: nb.IDisplayResult) => output.data === undefined || output?.data['text/plain'] !== '<IPython.core.display.HTML object>')
|
||||
.filter((output: nb.ICellOutput) => (output as nb.IDisplayResult)?.data === undefined || (output as nb.IDisplayResult)?.data['text/plain'] !== '<IPython.core.display.HTML object>')
|
||||
.map((output: nb.ICellOutput) => ({ ...output }))
|
||||
.map((output: nb.ICellOutput) => { output.metadata = { ...output.metadata }; return output; });
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Component, OnInit, ViewChildren, QueryList, Input, Inject, forwardRef,
|
||||
import { NotebookViewsCardComponent } from 'sql/workbench/contrib/notebook/browser/notebookViews/notebookViewsCard.component';
|
||||
import { ICellModel } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
|
||||
import { NotebookModel } from 'sql/workbench/services/notebook/browser/models/notebookModel';
|
||||
import { GridStack, GridStackEvent, GridStackNode } from 'gridstack';
|
||||
import { GridItemHTMLElement, GridStack, GridStackEvent, GridStackNode } from 'gridstack';
|
||||
import { localize } from 'vs/nls';
|
||||
import { NotebookViewsExtension } from 'sql/workbench/services/notebook/browser/notebookViews/notebookViewsExtension';
|
||||
import { CellChangeEvent, INotebookView, INotebookViewCell } from 'sql/workbench/services/notebook/browser/notebookViews/notebookViews';
|
||||
@@ -72,9 +72,13 @@ export class NotebookViewsGridComponent extends AngularDisposable implements OnI
|
||||
this._loaded = true;
|
||||
this.detectChanges();
|
||||
|
||||
self._grid.on('added', function (e: Event, items: GridStackNode[]) { if (self._gridEnabled) { self.persist('added', items, self._grid, self._items); } });
|
||||
self._grid.on('removed', function (e: Event, items: GridStackNode[]) { if (self._gridEnabled) { self.persist('removed', items, self._grid, self._items); } });
|
||||
self._grid.on('change', function (e: Event, items: GridStackNode[]) { if (self._gridEnabled) { self.persist('change', items, self._grid, self._items); } });
|
||||
let getGridStackItems = (items: GridStackNode[] | GridItemHTMLElement): GridStackNode[] => {
|
||||
return Array.isArray(items) ? items : (items?.gridstackNode ? [items.gridstackNode] : []);
|
||||
};
|
||||
|
||||
self._grid.on('added', function (e: Event, items: GridStackNode[] | GridItemHTMLElement) { if (self._gridEnabled) { self.persist('added', getGridStackItems(items), self._grid, self._items); } });
|
||||
self._grid.on('removed', function (e: Event, items: GridStackNode[] | GridItemHTMLElement) { if (self._gridEnabled) { self.persist('removed', getGridStackItems(items), self._grid, self._items); } });
|
||||
self._grid.on('change', function (e: Event, items: GridStackNode[] | GridItemHTMLElement) { if (self._gridEnabled) { self.persist('change', getGridStackItems(items), self._grid, self._items); } });
|
||||
}
|
||||
|
||||
ngAfterContentChecked() {
|
||||
|
||||
Reference in New Issue
Block a user