jupyter-js-filebrowser
Advanced tools
Comparing version 0.4.6 to 0.4.7
@@ -19,3 +19,3 @@ import { IContentsModel } from 'jupyter-js-services'; | ||
*/ | ||
constructor(model: FileBrowserModel, widgetFactory?: (path: string) => Widget); | ||
constructor(model: FileBrowserModel); | ||
/** | ||
@@ -37,2 +37,9 @@ * Dispose of the resources held by the file browser. | ||
/** | ||
* Get the widget factory for the widget. | ||
*/ | ||
/** | ||
* Set the widget factory for the widget. | ||
*/ | ||
widgetFactory: (path: string) => Widget; | ||
/** | ||
* Change directory. | ||
@@ -39,0 +46,0 @@ */ |
@@ -46,3 +46,3 @@ // Copyright (c) Jupyter Development Team. | ||
*/ | ||
function FileBrowserWidget(model, widgetFactory) { | ||
function FileBrowserWidget(model) { | ||
var _this = this; | ||
@@ -60,3 +60,3 @@ _super.call(this); | ||
this._buttons = new buttons_1.FileButtons(model); | ||
this._listing = new listing_1.DirListing(model, widgetFactory); | ||
this._listing = new listing_1.DirListing(model); | ||
this._listing.openRequested.connect(function (listing, path) { | ||
@@ -107,2 +107,18 @@ _this.openRequested.emit(path); | ||
}); | ||
Object.defineProperty(FileBrowserWidget.prototype, "widgetFactory", { | ||
/** | ||
* Get the widget factory for the widget. | ||
*/ | ||
get: function () { | ||
return this._listing.widgetFactory; | ||
}, | ||
/** | ||
* Set the widget factory for the widget. | ||
*/ | ||
set: function (factory) { | ||
this._listing.widgetFactory = factory; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
@@ -109,0 +125,0 @@ * Change directory. |
@@ -27,3 +27,3 @@ import { IContentsModel } from 'jupyter-js-services'; | ||
*/ | ||
constructor(model: FileBrowserModel, widgetFactory?: (path: string) => Widget); | ||
constructor(model: FileBrowserModel); | ||
/** | ||
@@ -42,2 +42,9 @@ * Dispose of the resources held by the directory listing. | ||
/** | ||
* Get the widget factory for the widget. | ||
*/ | ||
/** | ||
* Set the widget factory for the widget. | ||
*/ | ||
widgetFactory: (path: string) => Widget; | ||
/** | ||
* Rename the first currently selected item. | ||
@@ -44,0 +51,0 @@ */ |
@@ -117,3 +117,3 @@ // Copyright (c) Jupyter Development Team. | ||
*/ | ||
function DirListing(model, widgetFactory) { | ||
function DirListing(model) { | ||
_super.call(this); | ||
@@ -134,4 +134,2 @@ this._model = null; | ||
this._model.refreshed.connect(this.update, this); | ||
if (widgetFactory) | ||
this._widgetFactory = widgetFactory; | ||
this._editNode = document.createElement('input'); | ||
@@ -208,2 +206,18 @@ this._editNode.className = ITEM_EDIT_CLASS; | ||
}); | ||
Object.defineProperty(DirListing.prototype, "widgetFactory", { | ||
/** | ||
* Get the widget factory for the widget. | ||
*/ | ||
get: function () { | ||
return this._widgetFactory; | ||
}, | ||
/** | ||
* Set the widget factory for the widget. | ||
*/ | ||
set: function (factory) { | ||
this._widgetFactory = factory; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
@@ -210,0 +224,0 @@ * Rename the first currently selected item. |
{ | ||
"name": "jupyter-js-filebrowser", | ||
"version": "0.4.6", | ||
"version": "0.4.7", | ||
"description": "File browser widget for Jupyter", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
114291
3269