Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dragging attachments from file browser and pasting #5913

Merged
merged 15 commits into from Sep 5, 2019
20 changes: 10 additions & 10 deletions dev_mode/package.json
Expand Up @@ -163,19 +163,19 @@
"@jupyterlab/vdom-extension": "~1.2.0-alpha.0",
"@jupyterlab/vega4-extension": "~1.2.0-alpha.0",
"@jupyterlab/vega5-extension": "~1.2.0-alpha.0",
"@phosphor/algorithm": "^1.1.3",
"@phosphor/application": "^1.6.3",
"@phosphor/commands": "^1.6.3",
"@phosphor/algorithm": "^1.2.0",
"@phosphor/application": "^1.7.0",
"@phosphor/commands": "^1.7.0",
"@phosphor/coreutils": "^1.3.1",
"@phosphor/datagrid": "^0.1.9",
"@phosphor/disposable": "^1.2.0",
"@phosphor/datagrid": "^0.1.11",
"@phosphor/disposable": "^1.3.0",
"@phosphor/domutils": "^1.1.3",
"@phosphor/dragdrop": "^1.3.3",
"@phosphor/messaging": "^1.2.3",
"@phosphor/dragdrop": "^1.3.0",
"@phosphor/messaging": "^1.3.0",
"@phosphor/properties": "^1.1.3",
"@phosphor/signaling": "^1.2.3",
"@phosphor/virtualdom": "^1.1.3",
"@phosphor/widgets": "^1.8.0",
"@phosphor/signaling": "^1.3.0",
"@phosphor/virtualdom": "^1.2.0",
"@phosphor/widgets": "^1.9.0",
"react": "~16.8.4",
"react-dom": "~16.8.4"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/cell/package.json
Expand Up @@ -15,8 +15,8 @@
"@jupyterlab/rendermime": "^1.2.0-alpha.0",
"@jupyterlab/services": "^4.2.0-alpha.0",
"@jupyterlab/theme-light-extension": "^1.2.0-alpha.0",
"@phosphor/commands": "^1.6.3",
"@phosphor/widgets": "^1.8.0",
"@phosphor/commands": "^1.7.0",
"@phosphor/widgets": "^1.9.0",
"es6-promise": "~4.2.6"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/console/package.json
Expand Up @@ -13,8 +13,8 @@
"@jupyterlab/rendermime": "^1.2.0-alpha.0",
"@jupyterlab/services": "^4.2.0-alpha.0",
"@jupyterlab/theme-light-extension": "^1.2.0-alpha.0",
"@phosphor/commands": "^1.6.3",
"@phosphor/widgets": "^1.8.0",
"@phosphor/commands": "^1.7.0",
"@phosphor/widgets": "^1.9.0",
"es6-promise": "~4.2.6"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions examples/filebrowser/package.json
Expand Up @@ -17,9 +17,9 @@
"@jupyterlab/services": "^4.2.0-alpha.0",
"@jupyterlab/theme-light-extension": "^1.2.0-alpha.0",
"@jupyterlab/ui-components": "^1.2.0-alpha.0",
"@phosphor/algorithm": "^1.1.3",
"@phosphor/commands": "^1.6.3",
"@phosphor/widgets": "^1.8.0",
"@phosphor/algorithm": "^1.2.0",
"@phosphor/commands": "^1.7.0",
"@phosphor/widgets": "^1.9.0",
"es6-promise": "~4.2.6"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/notebook/package.json
Expand Up @@ -18,8 +18,8 @@
"@jupyterlab/rendermime": "^1.2.0-alpha.0",
"@jupyterlab/services": "^4.2.0-alpha.0",
"@jupyterlab/theme-light-extension": "^1.2.0-alpha.0",
"@phosphor/commands": "^1.6.3",
"@phosphor/widgets": "^1.8.0",
"@phosphor/commands": "^1.7.0",
"@phosphor/widgets": "^1.9.0",
"es6-promise": "~4.2.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/terminal/package.json
Expand Up @@ -11,7 +11,7 @@
"@jupyterlab/services": "^4.2.0-alpha.0",
"@jupyterlab/terminal": "^1.2.0-alpha.0",
"@jupyterlab/theme-light-extension": "^1.2.0-alpha.0",
"@phosphor/widgets": "^1.8.0",
"@phosphor/widgets": "^1.9.0",
"es6-promise": "~4.2.6"
},
"devDependencies": {
Expand Down
17 changes: 0 additions & 17 deletions jupyterlab/staging/yarn.lock
Expand Up @@ -1605,11 +1605,6 @@ ansi-regex@^2.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8=

ansi-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=

ansi-regex@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
Expand Down Expand Up @@ -5278,11 +5273,6 @@ safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, s
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==

safe-buffer@~5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==

safe-regex@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
Expand Down Expand Up @@ -5662,13 +5652,6 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1:
dependencies:
ansi-regex "^2.0.0"

strip-ansi@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
dependencies:
ansi-regex "^3.0.0"

strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
Expand Down
2 changes: 1 addition & 1 deletion jupyterlab/tests/mock_packages/mimeextension/package.json
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"dependencies": {
"@phosphor/widgets": "^1.8.0"
"@phosphor/widgets": "^1.9.0"
},
"jupyterlab": {
"mimeExtension": true
Expand Down
4 changes: 2 additions & 2 deletions packages/application-extension/package.json
Expand Up @@ -39,8 +39,8 @@
"@jupyterlab/application": "^1.2.0-alpha.0",
"@jupyterlab/apputils": "^1.2.0-alpha.0",
"@jupyterlab/coreutils": "^3.2.0-alpha.0",
"@phosphor/algorithm": "^1.1.3",
"@phosphor/widgets": "^1.8.0",
"@phosphor/algorithm": "^1.2.0",
"@phosphor/widgets": "^1.9.0",
"react": "~16.8.4"
},
"devDependencies": {
Expand Down
14 changes: 7 additions & 7 deletions packages/application/package.json
Expand Up @@ -43,15 +43,15 @@
"@jupyterlab/rendermime-interfaces": "^1.5.0-alpha.0",
"@jupyterlab/services": "^4.2.0-alpha.0",
"@jupyterlab/ui-components": "^1.2.0-alpha.0",
"@phosphor/algorithm": "^1.1.3",
"@phosphor/application": "^1.6.3",
"@phosphor/commands": "^1.6.3",
"@phosphor/algorithm": "^1.2.0",
"@phosphor/application": "^1.7.0",
"@phosphor/commands": "^1.7.0",
"@phosphor/coreutils": "^1.3.1",
"@phosphor/disposable": "^1.2.0",
"@phosphor/messaging": "^1.2.3",
"@phosphor/disposable": "^1.3.0",
"@phosphor/messaging": "^1.3.0",
"@phosphor/properties": "^1.1.3",
"@phosphor/signaling": "^1.2.3",
"@phosphor/widgets": "^1.8.0",
"@phosphor/signaling": "^1.3.0",
"@phosphor/widgets": "^1.9.0",
"font-awesome": "~4.7.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/apputils-extension/package.json
Expand Up @@ -42,11 +42,11 @@
"@jupyterlab/coreutils": "^3.2.0-alpha.0",
"@jupyterlab/mainmenu": "^1.2.0-alpha.0",
"@jupyterlab/ui-components": "^1.2.0-alpha.0",
"@phosphor/algorithm": "^1.1.3",
"@phosphor/commands": "^1.6.3",
"@phosphor/algorithm": "^1.2.0",
"@phosphor/commands": "^1.7.0",
"@phosphor/coreutils": "^1.3.1",
"@phosphor/disposable": "^1.2.0",
"@phosphor/widgets": "^1.8.0",
"@phosphor/disposable": "^1.3.0",
"@phosphor/widgets": "^1.9.0",
"es6-promise": "~4.2.6"
},
"devDependencies": {
Expand Down
14 changes: 7 additions & 7 deletions packages/apputils/package.json
Expand Up @@ -38,16 +38,16 @@
"@jupyterlab/coreutils": "^3.2.0-alpha.0",
"@jupyterlab/services": "^4.2.0-alpha.0",
"@jupyterlab/ui-components": "^1.2.0-alpha.0",
"@phosphor/algorithm": "^1.1.3",
"@phosphor/commands": "^1.6.3",
"@phosphor/algorithm": "^1.2.0",
"@phosphor/commands": "^1.7.0",
"@phosphor/coreutils": "^1.3.1",
"@phosphor/disposable": "^1.2.0",
"@phosphor/disposable": "^1.3.0",
"@phosphor/domutils": "^1.1.3",
"@phosphor/messaging": "^1.2.3",
"@phosphor/messaging": "^1.3.0",
"@phosphor/properties": "^1.1.3",
"@phosphor/signaling": "^1.2.3",
"@phosphor/virtualdom": "^1.1.3",
"@phosphor/widgets": "^1.8.0",
"@phosphor/signaling": "^1.3.0",
"@phosphor/virtualdom": "^1.2.0",
"@phosphor/widgets": "^1.9.0",
"@types/react": "~16.8.18",
"react": "~16.8.4",
"react-dom": "~16.8.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/attachments/package.json
Expand Up @@ -39,8 +39,8 @@
"@jupyterlab/observables": "^2.4.0-alpha.0",
"@jupyterlab/rendermime": "^1.2.0-alpha.0",
"@jupyterlab/rendermime-interfaces": "^1.5.0-alpha.0",
"@phosphor/disposable": "^1.2.0",
"@phosphor/signaling": "^1.2.3"
"@phosphor/disposable": "^1.3.0",
"@phosphor/signaling": "^1.3.0"
},
"devDependencies": {
"rimraf": "~2.6.2",
Expand Down
15 changes: 15 additions & 0 deletions packages/attachments/src/model.ts
Expand Up @@ -67,6 +67,14 @@ export interface IAttachmentsModel extends IDisposable {
*/
set(key: string, attachment: nbformat.IMimeBundle): void;

// TODO: This is marked optional so as to be non-breaking for 1.x
// Make this property mandatory for 2.0
/**
* Remove the attachment whose name is the specified key.
* Note that this is optional only until Jupyterlab 2.0 release.
*/
remove?: (key: string) => void;

/**
* Clear all of the attachments.
*/
Expand Down Expand Up @@ -234,6 +242,13 @@ export class AttachmentsModel implements IAttachmentsModel {
this._map.set(key, item);
}

/**
* Remove the attachment whose name is the specified key
*/
remove(key: string): void {
this._map.delete(key);
}

/**
* Clear all of the attachments.
*/
Expand Down
12 changes: 7 additions & 5 deletions packages/cells/package.json
Expand Up @@ -40,16 +40,18 @@
"@jupyterlab/codeeditor": "^1.2.0-alpha.0",
"@jupyterlab/codemirror": "^1.2.0-alpha.0",
"@jupyterlab/coreutils": "^3.2.0-alpha.0",
"@jupyterlab/filebrowser": "^1.2.0-alpha.0",
"@jupyterlab/observables": "^2.4.0-alpha.0",
"@jupyterlab/outputarea": "^1.2.0-alpha.0",
"@jupyterlab/rendermime": "^1.2.0-alpha.0",
"@jupyterlab/services": "^4.2.0-alpha.0",
"@phosphor/algorithm": "^1.1.3",
"@phosphor/algorithm": "^1.2.0",
"@phosphor/coreutils": "^1.3.1",
"@phosphor/messaging": "^1.2.3",
"@phosphor/signaling": "^1.2.3",
"@phosphor/virtualdom": "^1.1.3",
"@phosphor/widgets": "^1.8.0",
"@phosphor/dragdrop": "^1.3.0",
"@phosphor/messaging": "^1.3.0",
"@phosphor/signaling": "^1.3.0",
"@phosphor/virtualdom": "^1.2.0",
"@phosphor/widgets": "^1.9.0",
"react": "~16.8.4"
},
"devDependencies": {
Expand Down