Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jupyter-js-filebrowser

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jupyter-js-filebrowser - npm Package Compare versions

Comparing version 0.2.11 to 0.2.12

lib/handler.d.ts

12

lib/buttons.js

@@ -52,3 +52,3 @@ // Copyright (c) Jupyter Development Team.

input.onchange = this._handleUploadEvent.bind(this);
buttons[Button.Refresh].onclick = this._model.refresh;
buttons[Button.Refresh].onclick = function () { return _this._model.refresh(); };
buttons[Button.New].onclick = function () {

@@ -62,3 +62,3 @@ var rect = buttons[Button.New].getBoundingClientRect();

return utils_1.showErrorMessage(_this, 'New File Error', error);
}).then(_this._model.refresh);
}).then(function () { return _this._model.refresh(); });
});

@@ -88,6 +88,6 @@ this._newMenu = Private.createNewItemMenu(command);

title: 'Overwrite file?',
host: _this.node,
host: _this.node.parentNode,
body: "\"" + file.name + "\" already exists, overwrite?"
};
jupyter_js_utils_1.showDialog(options).then(function (button) {
return jupyter_js_utils_1.showDialog(options).then(function (button) {
if (button.text === 'OK') {

@@ -98,5 +98,5 @@ return _this._model.upload(file, true);

}
}).catch(function (error) { return utils_1.showErrorMessage(_this, 'Upload Error', error); }));
}));
}
Promise.all(promises).then(this._model.refresh);
Promise.all(promises).then(function () { return _this._model.refresh(); }, function (err) { return utils_1.showErrorMessage(_this, 'Upload Error', err); });
};

@@ -103,0 +103,0 @@ return FileButtons;

@@ -214,3 +214,3 @@ // Copyright (c) Jupyter Development Team.

};
jupyter_js_utils_1.showDialog(options).then(function (button) {
return jupyter_js_utils_1.showDialog(options).then(function (button) {
if (button.text === 'OK') {

@@ -223,7 +223,5 @@ return _this._model.delete(newPath).then(function () {

}
}).catch(function (error) {
utils_1.showErrorMessage(_this, 'Move Error', error);
}));
}
Promise.all(promises).then(this._model.refresh);
Promise.all(promises).then(function () { return _this._model.refresh(); }, function (err) { return utils_1.showErrorMessage(_this, 'Move Error', err); });
};

@@ -230,0 +228,0 @@ return BreadCrumbs;

export * from './model';
export * from './browser';
export * from './handler';

@@ -9,2 +9,3 @@ // Copyright (c) Jupyter Development Team.

__export(require('./browser'));
__export(require('./handler'));
require('./index.css');

@@ -205,10 +205,6 @@ // Copyright (c) Jupyter Development Team.

var name_1 = parts[parts.length - 1];
promises.push(this._model.rename(path, name_1).catch(function (error) {
return utils_1.showErrorMessage(_this, 'Paste Error', error);
}));
promises.push(this._model.rename(path, name_1));
}
else {
promises.push(this._model.copy(path, '.').catch(function (error) {
return utils_1.showErrorMessage(_this, 'Paste Error', error);
}));
promises.push(this._model.copy(path, '.'));
}

@@ -224,3 +220,3 @@ }

this.node.classList.remove(CLIPBOARD_CLASS);
return Promise.all(promises).then(this._model.refresh);
return Promise.all(promises).then(function () { return _this._model.refresh(); }, function (error) { return utils_1.showErrorMessage(_this, 'Paste Error', error); });
};

@@ -235,7 +231,5 @@ /**

var name_2 = _a[_i];
promises.push(this._model.delete(name_2).catch(function (error) {
return utils_1.showErrorMessage(_this, 'Delete file', error);
}));
promises.push(this._model.delete(name_2));
}
return Promise.all(promises).then(this._model.refresh);
return Promise.all(promises).then(function () { return _this._model.refresh(); }, function (error) { return utils_1.showErrorMessage(_this, 'Delete file', error); });
};

@@ -252,9 +246,6 @@ /**

if (item.type !== 'directory') {
promises.push(this._model.copy(item.path, this._model.path)
.catch(function (error) {
return utils_1.showErrorMessage(_this, 'Duplicate file', error);
}));
promises.push(this._model.copy(item.path, this._model.path));
}
}
return Promise.all(promises).then(this._model.refresh);
return Promise.all(promises).then(function () { return _this._model.refresh(); }, function (error) { return utils_1.showErrorMessage(_this, 'Duplicate file', error); });
};

@@ -287,8 +278,6 @@ /**

if (this._items[index].classList.contains(SELECTED_CLASS)) {
promises.push(this._model.shutdown(sessionId).catch(function (error) {
return utils_1.showErrorMessage(_this, 'Shutdown kernel', error);
}));
promises.push(this._model.shutdown(sessionId));
}
}
return Promise.all(promises).then(this._model.refresh);
return Promise.all(promises).then(function () { return _this._model.refresh(); }, function (error) { return utils_1.showErrorMessage(_this, 'Shutdown kernel', error); });
};

@@ -343,3 +332,2 @@ /**

node.addEventListener('mousedown', this);
node.addEventListener('mouseup', this);
node.addEventListener('click', this);

@@ -359,6 +347,4 @@ node.addEventListener('dblclick', this);

node.removeEventListener('mousedown', this);
node.removeEventListener('mouseup', this);
node.removeEventListener('click', this);
node.removeEventListener('dblclick', this);
node.removeEventListener('mousemove', this);
node.removeEventListener('p-dragenter', this);

@@ -368,2 +354,4 @@ node.removeEventListener('p-dragleave', this);

node.removeEventListener('p-drop', this);
document.removeEventListener('mousemove', this, true);
document.removeEventListener('mouseup', this, true);
};

@@ -477,2 +465,3 @@ /**

document.removeEventListener('mousemove', this, true);
document.removeEventListener('mouseup', this, true);
return;

@@ -515,2 +504,3 @@ }

this._pendingSelect = false;
this._editNode.blur();
// Find a valid double click target.

@@ -616,3 +606,3 @@ var node = event.target;

};
jupyter_js_utils_1.showDialog(options).then(function (button) {
return jupyter_js_utils_1.showDialog(options).then(function (button) {
if (button.text === 'OK') {

@@ -625,5 +615,5 @@ return _this._model.delete(newPath).then(function () {

}
}).catch(function (error) { return utils_1.showErrorMessage(_this, 'Move Error', error); }));
}));
}
Promise.all(promises).then(this._model.refresh);
Promise.all(promises).then(function () { return _this._model.refresh(); }, function (error) { return utils_1.showErrorMessage(_this, 'Move Error', error); });
};

@@ -630,0 +620,0 @@ /**

@@ -282,6 +282,6 @@ // Copyright (c) Jupyter Development Team.

};
return _this._contentsManager.save(path, model);
resolve(_this._contentsManager.save(path, model));
};
reader.onerror = function (event) {
throw Error(("Failed to upload \"" + file.name + "\":") + event);
reject(Error(("Failed to upload \"" + file.name + "\":") + event));
};

@@ -288,0 +288,0 @@ });

@@ -17,3 +17,3 @@ import { Widget } from 'phosphor-widget';

*/
export declare function showErrorMessage(host: Widget, title: string, error: Error): void;
export declare function showErrorMessage(host: Widget, title: string, error: Error): Promise<void>;
/**

@@ -20,0 +20,0 @@ * Get the index of the node at a client position, or `-1`.

@@ -37,3 +37,3 @@ // Copyright (c) Jupyter Development Team.

};
jupyter_js_utils_1.showDialog(options);
return jupyter_js_utils_1.showDialog(options).then(function () { });
}

@@ -40,0 +40,0 @@ exports.showErrorMessage = showErrorMessage;

{
"name": "jupyter-js-filebrowser",
"version": "0.2.11",
"version": "0.2.12",
"description": "File browser widget for Jupyter",

@@ -8,2 +8,3 @@ "main": "lib/index.js",

"dependencies": {
"codemirror": "^5.10.0",
"jupyter-js-services": "^0.3.0-alpha",

@@ -16,3 +17,3 @@ "jupyter-js-utils": "^0.2.2",

"phosphor-dragdrop": "^0.9.0",
"phosphor-menus": "^1.0.0-beta.3",
"phosphor-menus": "^1.0.0-rc.0",
"phosphor-messaging": "^1.0.5",

@@ -19,0 +20,0 @@ "phosphor-nodewrapper": "^1.0.4",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc