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

@jupyterlab/filebrowser

Package Overview
Dependencies
Maintainers
35
Versions
396
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupyterlab/filebrowser - npm Package Compare versions

Comparing version 4.0.0-alpha.19 to 4.0.0-alpha.20

src/browser.ts

8

lib/browser.d.ts

@@ -37,5 +37,6 @@ import { Contents } from '@jupyterlab/services';

/**
* Whether to use fuzzy filtering on file names.
* Whether to show the file size column
*/
set useFuzzyFilter(value: boolean);
get showFileSizeColumn(): boolean;
set showFileSizeColumn(value: boolean);
/**

@@ -146,3 +147,2 @@ * Whether to show hidden files

protected mainPanel: Panel;
private _filenameSearcher;
private _manager;

@@ -153,3 +153,3 @@ private _directoryPending;

private _showLastModifiedColumn;
private _useFuzzyFilter;
private _showFileSizeColumn;
private _showHiddenFiles;

@@ -156,0 +156,0 @@ private _showFileCheckboxes;

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

import { nullTranslator } from '@jupyterlab/translation';
import { FilenameSearcher, SidePanel } from '@jupyterlab/ui-components';
import { SidePanel } from '@jupyterlab/ui-components';
import { Panel } from '@lumino/widgets';

@@ -24,6 +24,2 @@ import { BreadCrumbs } from './crumbs';

/**
* The class name added to the filebrowser filterbox node.
*/
const FILTERBOX_CLASS = 'jp-FileBrowser-filterBox';
/**
* The class name added to the filebrowser toolbar node.

@@ -53,3 +49,3 @@ */

this._showLastModifiedColumn = true;
this._useFuzzyFilter = true;
this._showFileSizeColumn = false;
this._showHiddenFiles = false;

@@ -81,13 +77,2 @@ this._showFileCheckboxes = false;

this.listing.addClass(LISTING_CLASS);
this._filenameSearcher = FilenameSearcher({
updateFilter: (filterFn, query) => {
this.listing.model.setFilter(value => {
return filterFn(value.name.toLowerCase());
});
},
useFuzzyFilter: this._useFuzzyFilter,
placeholder: this._trans.__('Filter files by name')
});
this._filenameSearcher.addClass(FILTERBOX_CLASS);
this.mainPanel.addWidget(this._filenameSearcher);
this.mainPanel.addWidget(this.crumbs);

@@ -125,22 +110,16 @@ this.mainPanel.addWidget(this.listing);

/**
* Whether to use fuzzy filtering on file names.
* Whether to show the file size column
*/
set useFuzzyFilter(value) {
this._useFuzzyFilter = value;
// Detach and dispose the current widget
this._filenameSearcher.parent = null;
this._filenameSearcher.dispose();
this._filenameSearcher = FilenameSearcher({
updateFilter: (filterFn, query) => {
this.listing.model.setFilter(value => {
return filterFn(value.name.toLowerCase());
});
},
useFuzzyFilter: this._useFuzzyFilter,
placeholder: this._trans.__('Filter files by name'),
forceRefresh: true
});
this._filenameSearcher.addClass(FILTERBOX_CLASS);
this.mainPanel.insertWidget(0, this._filenameSearcher);
get showFileSizeColumn() {
return this._showFileSizeColumn;
}
set showFileSizeColumn(value) {
if (this.listing.setColumnVisibility) {
this.listing.setColumnVisibility('file_size', value);
this._showFileSizeColumn = value;
}
else {
console.warn('Listing does not support toggling column visibility');
}
}
/**

@@ -147,0 +126,0 @@ * Whether to show hidden files

@@ -356,3 +356,3 @@ import { DocumentRegistry } from '@jupyterlab/docregistry';

*/
key: 'name' | 'last_modified';
key: 'name' | 'last_modified' | 'file_size';
}

@@ -362,3 +362,3 @@ /**

*/
type ToggleableColumn = 'last_modified' | 'is_selected';
type ToggleableColumn = 'last_modified' | 'is_selected' | 'file_size';
/**

@@ -365,0 +365,0 @@ * A file contents model thunk.

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

last_modified: contents.last_modified,
size: contents.size,
mimetype: contents.mimetype,

@@ -500,0 +501,0 @@ format: contents.format

@@ -16,3 +16,3 @@ import type { WidgetTracker } from '@jupyterlab/apputils';

*/
export declare type IDefaultFileBrowser = FileBrowser;
export type IDefaultFileBrowser = FileBrowser;
/**

@@ -19,0 +19,0 @@ * The file browser factory interface.

{
"name": "@jupyterlab/filebrowser",
"version": "4.0.0-alpha.19",
"version": "4.0.0-alpha.20",
"description": "JupyterLab - FileBrowser Widget",

@@ -30,3 +30,4 @@ "homepage": "https://github.com/jupyterlab/jupyterlab",

"style/*.css",
"style/index.js"
"style/index.js",
"src/**/*.{ts,tsx}"
],

@@ -45,29 +46,29 @@ "scripts": {

"dependencies": {
"@jupyterlab/apputils": "^4.0.0-alpha.19",
"@jupyterlab/coreutils": "^6.0.0-alpha.19",
"@jupyterlab/docmanager": "^4.0.0-alpha.19",
"@jupyterlab/docregistry": "^4.0.0-alpha.19",
"@jupyterlab/services": "^7.0.0-alpha.19",
"@jupyterlab/statedb": "^4.0.0-alpha.19",
"@jupyterlab/statusbar": "^4.0.0-alpha.19",
"@jupyterlab/translation": "^4.0.0-alpha.19",
"@jupyterlab/ui-components": "^4.0.0-alpha.34",
"@lumino/algorithm": "^2.0.0-beta.0",
"@lumino/coreutils": "^2.0.0-beta.0",
"@lumino/disposable": "^2.0.0-beta.1",
"@lumino/domutils": "^2.0.0-beta.0",
"@lumino/dragdrop": "^2.0.0-beta.1",
"@lumino/messaging": "^2.0.0-beta.0",
"@lumino/polling": "^2.0.0-beta.0",
"@lumino/signaling": "^2.0.0-beta.1",
"@lumino/virtualdom": "^2.0.0-beta.0",
"@lumino/widgets": "^2.0.0-beta.1",
"@jupyterlab/apputils": "^4.0.0-alpha.20",
"@jupyterlab/coreutils": "^6.0.0-alpha.20",
"@jupyterlab/docmanager": "^4.0.0-alpha.20",
"@jupyterlab/docregistry": "^4.0.0-alpha.20",
"@jupyterlab/services": "^7.0.0-alpha.20",
"@jupyterlab/statedb": "^4.0.0-alpha.20",
"@jupyterlab/statusbar": "^4.0.0-alpha.20",
"@jupyterlab/translation": "^4.0.0-alpha.20",
"@jupyterlab/ui-components": "^4.0.0-alpha.35",
"@lumino/algorithm": "^2.0.0-rc.0",
"@lumino/coreutils": "^2.0.0-rc.0",
"@lumino/disposable": "^2.0.0-rc.0",
"@lumino/domutils": "^2.0.0-rc.0",
"@lumino/dragdrop": "^2.0.0-rc.0",
"@lumino/messaging": "^2.0.0-rc.0",
"@lumino/polling": "^2.0.0-rc.0",
"@lumino/signaling": "^2.0.0-rc.0",
"@lumino/virtualdom": "^2.0.0-rc.0",
"@lumino/widgets": "^2.0.0-rc.0",
"react": "^18.2.0"
},
"devDependencies": {
"@jupyterlab/testing": "^4.0.0-alpha.19",
"@jupyterlab/testing": "^4.0.0-alpha.20",
"@types/jest": "^29.2.0",
"rimraf": "~3.0.0",
"typedoc": "~0.22.10",
"typescript": "~4.7.3"
"typedoc": "~0.23.25",
"typescript": "~5.0.0-beta"
},

@@ -74,0 +75,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

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