jupyter-js-filebrowser
Advanced tools
Comparing version 0.2.8 to 0.2.9
import { Message } from 'phosphor-messaging'; | ||
import { Widget } from 'phosphor-widget'; | ||
import { FileBrowserViewModel } from './viewmodel'; | ||
import { FileBrowserModel } from './model'; | ||
/** | ||
@@ -17,3 +17,3 @@ * A widget which hosts a file browser. | ||
*/ | ||
constructor(model: FileBrowserViewModel); | ||
constructor(model: FileBrowserModel); | ||
/** | ||
@@ -20,0 +20,0 @@ * Dispose of the resources held by the file browser. |
import { Widget } from 'phosphor-widget'; | ||
import { FileBrowserViewModel } from './viewmodel'; | ||
import { FileBrowserModel } from './model'; | ||
/** | ||
@@ -12,3 +12,3 @@ * A widget which host the file browser buttons. | ||
*/ | ||
constructor(model: FileBrowserViewModel); | ||
constructor(model: FileBrowserModel); | ||
/** | ||
@@ -15,0 +15,0 @@ * Dispose of the resources held by the widget. |
import { Message } from 'phosphor-messaging'; | ||
import { Widget } from 'phosphor-widget'; | ||
import { FileBrowserViewModel } from './viewmodel'; | ||
import { FileBrowserModel } from './model'; | ||
/** | ||
@@ -13,3 +13,3 @@ * A class which hosts folder breadcrumbs. | ||
*/ | ||
constructor(model: FileBrowserViewModel); | ||
constructor(model: FileBrowserModel); | ||
/** | ||
@@ -35,2 +35,6 @@ * Handle the DOM events for the bread crumbs. | ||
/** | ||
* A handler invoked on an `'update-request'` message. | ||
*/ | ||
protected onUpdateRequest(msg: Message): void; | ||
/** | ||
* Handle the `'click'` event for the widget. | ||
@@ -55,2 +59,6 @@ */ | ||
private _evtDrop(event); | ||
/** | ||
* Handle a `changed` signal from the model. | ||
*/ | ||
private _onChanged(model, change); | ||
private _model; | ||
@@ -57,0 +65,0 @@ private _crumbs; |
@@ -45,2 +45,3 @@ // Copyright (c) Jupyter Development Team. | ||
this.node.appendChild(this._crumbs[Crumb.Home]); | ||
this._model.changed.connect(this._onChanged, this); | ||
} | ||
@@ -101,2 +102,9 @@ /** | ||
/** | ||
* A handler invoked on an `'update-request'` message. | ||
*/ | ||
BreadCrumbs.prototype.onUpdateRequest = function (msg) { | ||
// Update the breadcrumb list. | ||
updateCrumbs(this._crumbs, this._crumbSeps, this._model.path); | ||
}; | ||
/** | ||
* Handle the `'click'` event for the widget. | ||
@@ -222,2 +230,10 @@ */ | ||
}; | ||
/** | ||
* Handle a `changed` signal from the model. | ||
*/ | ||
BreadCrumbs.prototype._onChanged = function (model, change) { | ||
if (change.name === 'open' && change.newValue.type === 'directory') { | ||
this.update(); | ||
} | ||
}; | ||
return BreadCrumbs; | ||
@@ -224,0 +240,0 @@ })(phosphor_widget_1.Widget); |
@@ -1,2 +0,2 @@ | ||
export * from './viewmodel'; | ||
export * from './model'; | ||
export * from './browser'; |
@@ -7,4 +7,4 @@ // Copyright (c) Jupyter Development Team. | ||
} | ||
__export(require('./viewmodel')); | ||
__export(require('./model')); | ||
__export(require('./browser')); | ||
require('./index.css'); |
import { IContentsModel } from 'jupyter-js-services'; | ||
import { Message } from 'phosphor-messaging'; | ||
import { Widget } from 'phosphor-widget'; | ||
import { FileBrowserViewModel } from './viewmodel'; | ||
import { FileBrowserModel } from './model'; | ||
/** | ||
@@ -26,3 +26,3 @@ * A widget which host a file list area. | ||
*/ | ||
constructor(model: FileBrowserViewModel); | ||
constructor(model: FileBrowserModel); | ||
/** | ||
@@ -29,0 +29,0 @@ * Dispose of the resources held by the directory listing. |
@@ -110,3 +110,3 @@ // Copyright (c) Jupyter Development Team. | ||
this._model = model; | ||
this._model.changed.connect(this._onChanged.bind(this)); | ||
this._model.changed.connect(this._onChanged, this); | ||
// Create the edit node. | ||
@@ -113,0 +113,0 @@ this._editNode = document.createElement('input'); |
{ | ||
"name": "jupyter-js-filebrowser", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"description": "File browser widget for Jupyter", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
111806
22
3240