@jupyterlab/notebook
Advanced tools
Comparing version 0.17.2 to 0.18.0
@@ -1227,4 +1227,7 @@ "use strict"; | ||
if (session) { | ||
return cells_1.CodeCell.execute(cell, session) | ||
return cells_1.CodeCell.execute(cell, session, { | ||
deletedCells: notebook.model.deletedCells | ||
}) | ||
.then(reply => { | ||
notebook.model.deletedCells.splice(0, notebook.model.deletedCells.length); | ||
if (cell.isDisposed) { | ||
@@ -1313,5 +1316,11 @@ return false; | ||
clipboard.clear(); | ||
const data = notebook.widgets | ||
let data = notebook.widgets | ||
.filter(cell => notebook.isSelectedOrActive(cell)) | ||
.map(cell => cell.model.toJSON()); | ||
.map(cell => cell.model.toJSON()) | ||
.map(cellJSON => { | ||
if (cellJSON.metadata.deletable !== undefined) { | ||
delete cellJSON.metadata.deletable; | ||
} | ||
return cellJSON; | ||
}); | ||
clipboard.setData(JUPYTER_CELL_MIME, data); | ||
@@ -1400,2 +1409,3 @@ if (cut) { | ||
toDelete.push(index); | ||
notebook.model.deletedCells.push(child.model.id); | ||
} | ||
@@ -1402,0 +1412,0 @@ }); |
@@ -50,3 +50,3 @@ "use strict"; | ||
return new apputils_1.ToolbarButton({ | ||
className: TOOLBAR_SAVE_CLASS, | ||
iconClassName: TOOLBAR_SAVE_CLASS + ' foo jp-Icon jp-Icon-16', | ||
onClick: () => { | ||
@@ -75,3 +75,3 @@ if (panel.context.model.readOnly) { | ||
return new apputils_1.ToolbarButton({ | ||
className: TOOLBAR_INSERT_CLASS, | ||
iconClassName: TOOLBAR_INSERT_CLASS + ' jp-Icon jp-Icon-16', | ||
onClick: () => { | ||
@@ -89,3 +89,3 @@ actions_1.NotebookActions.insertBelow(panel.content); | ||
return new apputils_1.ToolbarButton({ | ||
className: TOOLBAR_CUT_CLASS, | ||
iconClassName: TOOLBAR_CUT_CLASS + ' jp-Icon jp-Icon-16', | ||
onClick: () => { | ||
@@ -103,3 +103,3 @@ actions_1.NotebookActions.cut(panel.content); | ||
return new apputils_1.ToolbarButton({ | ||
className: TOOLBAR_COPY_CLASS, | ||
iconClassName: TOOLBAR_COPY_CLASS + ' jp-Icon jp-Icon-16', | ||
onClick: () => { | ||
@@ -117,3 +117,3 @@ actions_1.NotebookActions.copy(panel.content); | ||
return new apputils_1.ToolbarButton({ | ||
className: TOOLBAR_PASTE_CLASS, | ||
iconClassName: TOOLBAR_PASTE_CLASS + ' jp-Icon jp-Icon-16', | ||
onClick: () => { | ||
@@ -131,3 +131,3 @@ actions_1.NotebookActions.paste(panel.content); | ||
return new apputils_1.ToolbarButton({ | ||
className: TOOLBAR_RUN_CLASS, | ||
iconClassName: TOOLBAR_RUN_CLASS + ' jp-Icon jp-Icon-16', | ||
onClick: () => { | ||
@@ -134,0 +134,0 @@ actions_1.NotebookActions.runAndAdvance(panel.content, panel.session); |
@@ -29,2 +29,6 @@ import { DocumentModel, DocumentRegistry } from '@jupyterlab/docregistry'; | ||
readonly metadata: IObservableJSON; | ||
/** | ||
* The array of deleted cells since the notebook was last run. | ||
*/ | ||
readonly deletedCells: string[]; | ||
} | ||
@@ -64,2 +68,6 @@ /** | ||
/** | ||
* The default kernel name of the document. | ||
*/ | ||
readonly deletedCells: string[]; | ||
/** | ||
* The default kernel language of the document. | ||
@@ -109,2 +117,3 @@ */ | ||
private _nbformatMinor; | ||
private _deletedCells; | ||
} | ||
@@ -111,0 +120,0 @@ /** |
@@ -37,2 +37,3 @@ "use strict"; | ||
metadata.changed.connect(this.triggerContentChange, this); | ||
this._deletedCells = []; | ||
} | ||
@@ -71,2 +72,8 @@ /** | ||
/** | ||
* The default kernel name of the document. | ||
*/ | ||
get deletedCells() { | ||
return this._deletedCells; | ||
} | ||
/** | ||
* The default kernel language of the document. | ||
@@ -73,0 +80,0 @@ */ |
@@ -316,5 +316,5 @@ import { JSONValue } from '@phosphor/coreutils'; | ||
* #### Notes | ||
* This is a cell or undefined if there is no active cell. | ||
* This is a cell or `null` if there is no active cell. | ||
*/ | ||
readonly activeCell: Cell | undefined; | ||
readonly activeCell: Cell | null; | ||
/** | ||
@@ -321,0 +321,0 @@ * Dispose of the resources held by the widget. |
@@ -520,3 +520,3 @@ "use strict"; | ||
this._activeCellIndex = -1; | ||
this._activeCell = undefined; | ||
this._activeCell = null; | ||
this._mode = 'command'; | ||
@@ -635,3 +635,3 @@ this._drag = null; | ||
* #### Notes | ||
* This is a cell or undefined if there is no active cell. | ||
* This is a cell or `null` if there is no active cell. | ||
*/ | ||
@@ -648,3 +648,3 @@ get activeCell() { | ||
} | ||
this._activeCell = undefined; | ||
this._activeCell = null; | ||
super.dispose(); | ||
@@ -1684,3 +1684,3 @@ } | ||
if (promptNumber !== '') { | ||
return virtualdom_1.VirtualDOM.realize(virtualdom_1.h.div(virtualdom_1.h.div({ className: DRAG_IMAGE_CLASS }, virtualdom_1.h.span({ className: CELL_DRAG_PROMPT_CLASS }, 'In [' + promptNumber + ']:'), virtualdom_1.h.span({ className: CELL_DRAG_CONTENT_CLASS }, cellContent)), virtualdom_1.h.div({ className: CELL_DRAG_MULTIPLE_BACK }, ''))); | ||
return virtualdom_1.VirtualDOM.realize(virtualdom_1.h.div(virtualdom_1.h.div({ className: DRAG_IMAGE_CLASS }, virtualdom_1.h.span({ className: CELL_DRAG_PROMPT_CLASS }, '[' + promptNumber + ']:'), virtualdom_1.h.span({ className: CELL_DRAG_CONTENT_CLASS }, cellContent)), virtualdom_1.h.div({ className: CELL_DRAG_MULTIPLE_BACK }, ''))); | ||
} | ||
@@ -1693,3 +1693,3 @@ else { | ||
if (promptNumber !== '') { | ||
return virtualdom_1.VirtualDOM.realize(virtualdom_1.h.div(virtualdom_1.h.div({ className: `${DRAG_IMAGE_CLASS} ${SINGLE_DRAG_IMAGE_CLASS}` }, virtualdom_1.h.span({ className: CELL_DRAG_PROMPT_CLASS }, 'In [' + promptNumber + ']:'), virtualdom_1.h.span({ className: CELL_DRAG_CONTENT_CLASS }, cellContent)))); | ||
return virtualdom_1.VirtualDOM.realize(virtualdom_1.h.div(virtualdom_1.h.div({ className: `${DRAG_IMAGE_CLASS} ${SINGLE_DRAG_IMAGE_CLASS}` }, virtualdom_1.h.span({ className: CELL_DRAG_PROMPT_CLASS }, '[' + promptNumber + ']:'), virtualdom_1.h.span({ className: CELL_DRAG_CONTENT_CLASS }, cellContent)))); | ||
} | ||
@@ -1696,0 +1696,0 @@ else { |
{ | ||
"name": "@jupyterlab/notebook", | ||
"version": "0.17.2", | ||
"version": "0.18.0", | ||
"description": "JupyterLab - Notebook", | ||
@@ -33,10 +33,10 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"dependencies": { | ||
"@jupyterlab/apputils": "^0.17.2", | ||
"@jupyterlab/cells": "^0.17.2", | ||
"@jupyterlab/codeeditor": "^0.17.2", | ||
"@jupyterlab/coreutils": "^2.0.2", | ||
"@jupyterlab/docregistry": "^0.17.2", | ||
"@jupyterlab/observables": "^2.0.2", | ||
"@jupyterlab/rendermime": "^0.17.2", | ||
"@jupyterlab/services": "^3.0.3", | ||
"@jupyterlab/apputils": "^0.18.0", | ||
"@jupyterlab/cells": "^0.18.0", | ||
"@jupyterlab/codeeditor": "^0.18.0", | ||
"@jupyterlab/coreutils": "^2.1.0", | ||
"@jupyterlab/docregistry": "^0.18.0", | ||
"@jupyterlab/observables": "^2.0.3", | ||
"@jupyterlab/rendermime": "^0.18.0", | ||
"@jupyterlab/services": "^3.1.0", | ||
"@phosphor/algorithm": "^1.1.2", | ||
@@ -43,0 +43,0 @@ "@phosphor/coreutils": "^1.3.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
551255
7659
+ Added@jupyterlab/apputils@0.18.4(transitive)
+ Added@jupyterlab/attachments@0.18.4(transitive)
+ Added@jupyterlab/cells@0.18.4(transitive)
+ Added@jupyterlab/codeeditor@0.18.4(transitive)
+ Added@jupyterlab/codemirror@0.18.4(transitive)
+ Added@jupyterlab/docregistry@0.18.4(transitive)
+ Added@jupyterlab/outputarea@0.18.4(transitive)
+ Added@jupyterlab/rendermime@0.18.4(transitive)
- Removed@jupyterlab/apputils@0.17.2(transitive)
- Removed@jupyterlab/attachments@0.17.2(transitive)
- Removed@jupyterlab/cells@0.17.2(transitive)
- Removed@jupyterlab/codeeditor@0.17.2(transitive)
- Removed@jupyterlab/codemirror@0.17.3(transitive)
- Removed@jupyterlab/docregistry@0.17.2(transitive)
- Removed@jupyterlab/outputarea@0.17.3(transitive)
- Removed@jupyterlab/rendermime@0.17.3(transitive)
Updated@jupyterlab/apputils@^0.18.0
Updated@jupyterlab/cells@^0.18.0
Updated@jupyterlab/coreutils@^2.1.0
Updated@jupyterlab/services@^3.1.0