@jupyterlab/docregistry
Advanced tools
Comparing version 3.6.0-beta.0 to 3.6.0-rc.0
@@ -125,2 +125,4 @@ import { ISessionContext, Toolbar, ToolbarRegistry } from '@jupyterlab/apputils'; | ||
* [[defaultWidgetFactory]]. | ||
* | ||
* The user setting `defaultViewers` took precedence on this one too. | ||
*/ | ||
@@ -127,0 +129,0 @@ defaultRenderedWidgetFactory(path: string): DocumentRegistry.WidgetFactory; |
@@ -386,15 +386,22 @@ // Copyright (c) Jupyter Development Team. | ||
* [[defaultWidgetFactory]]. | ||
* | ||
* The user setting `defaultViewers` took precedence on this one too. | ||
*/ | ||
defaultRenderedWidgetFactory(path) { | ||
// Get the matching file types. | ||
const fts = this.getFileTypesForPath(PathExt.basename(path)); | ||
let factory = undefined; | ||
const ftNames = this.getFileTypesForPath(PathExt.basename(path)).map(ft => ft.name); | ||
// Start with any user overrides for the defaults. | ||
for (const name in ftNames) { | ||
if (name in this._defaultWidgetFactoryOverrides) { | ||
return this._widgetFactories[this._defaultWidgetFactoryOverrides[name]]; | ||
} | ||
} | ||
// Find if a there is a default rendered factory for this type. | ||
for (const ft of fts) { | ||
if (ft.name in this._defaultRenderedWidgetFactories) { | ||
factory = this._widgetFactories[this._defaultRenderedWidgetFactories[ft.name]]; | ||
break; | ||
for (const name in ftNames) { | ||
if (name in this._defaultRenderedWidgetFactories) { | ||
return this._widgetFactories[this._defaultRenderedWidgetFactories[name]]; | ||
} | ||
} | ||
return factory || this.defaultWidgetFactory(path); | ||
// Fallback to the default widget factory | ||
return this.defaultWidgetFactory(path); | ||
} | ||
@@ -401,0 +408,0 @@ /** |
{ | ||
"name": "@jupyterlab/docregistry", | ||
"version": "3.6.0-beta.0", | ||
"version": "3.6.0-rc.0", | ||
"description": "JupyterLab - Document Registry", | ||
@@ -45,13 +45,13 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"@jupyter/ydoc": "~0.2.0", | ||
"@jupyterlab/apputils": "^3.6.0-beta.0", | ||
"@jupyterlab/codeeditor": "^3.6.0-beta.0", | ||
"@jupyterlab/codemirror": "^3.6.0-beta.0", | ||
"@jupyterlab/coreutils": "^5.6.0-beta.0", | ||
"@jupyterlab/docprovider": "^3.6.0-beta.0", | ||
"@jupyterlab/observables": "^4.6.0-beta.0", | ||
"@jupyterlab/rendermime": "^3.6.0-beta.0", | ||
"@jupyterlab/rendermime-interfaces": "^3.6.0-beta.0", | ||
"@jupyterlab/services": "^6.6.0-beta.0", | ||
"@jupyterlab/translation": "^3.6.0-beta.0", | ||
"@jupyterlab/ui-components": "^3.6.0-beta.0", | ||
"@jupyterlab/apputils": "^3.6.0-rc.0", | ||
"@jupyterlab/codeeditor": "^3.6.0-rc.0", | ||
"@jupyterlab/codemirror": "^3.6.0-rc.0", | ||
"@jupyterlab/coreutils": "^5.6.0-rc.0", | ||
"@jupyterlab/docprovider": "^3.6.0-rc.0", | ||
"@jupyterlab/observables": "^4.6.0-rc.0", | ||
"@jupyterlab/rendermime": "^3.6.0-rc.0", | ||
"@jupyterlab/rendermime-interfaces": "^3.6.0-rc.0", | ||
"@jupyterlab/services": "^6.6.0-rc.0", | ||
"@jupyterlab/translation": "^3.6.0-rc.0", | ||
"@jupyterlab/ui-components": "^3.6.0-rc.0", | ||
"@lumino/algorithm": "^1.9.0", | ||
@@ -65,3 +65,3 @@ "@lumino/coreutils": "^1.11.0", | ||
"devDependencies": { | ||
"@jupyterlab/testutils": "^3.6.0-beta.0", | ||
"@jupyterlab/testutils": "^3.6.0-rc.0", | ||
"@types/jest": "^26.0.10", | ||
@@ -68,0 +68,0 @@ "jest": "^26.4.2", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
197387
4087