From 2e60e0b0ab96b9d45cb13c2fc2d28e3f48c23480 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Sat, 16 Jul 2022 08:52:45 -0500 Subject: [PATCH] Fix imports for HTMLManager. --- packages/html-manager/src/htmlmanager.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/html-manager/src/htmlmanager.ts b/packages/html-manager/src/htmlmanager.ts index 197943ccc2..d95da6ed4a 100644 --- a/packages/html-manager/src/htmlmanager.ts +++ b/packages/html-manager/src/htmlmanager.ts @@ -1,6 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. +import {createErrorWidgetModel, ErrorWidgetView} from '@jupyter-widgets/base'; import { ManagerBase } from '@jupyter-widgets/base-manager'; import { MessageLoop } from '@lumino/messaging'; @@ -11,7 +12,8 @@ import { } from '@jupyterlab/rendermime'; import { WidgetRenderer, WIDGET_MIMETYPE } from './output_renderers'; -import { WidgetModel, WidgetView, DOMWidgetView } from '@jupyter-widgets/base'; + +import type { WidgetModel, WidgetView, DOMWidgetView } from '@jupyter-widgets/base'; export class HTMLManager extends ManagerBase { constructor(options?: { @@ -55,9 +57,9 @@ export class HTMLManager extends ManagerBase { } catch (error) { const msg = `Could not create a view for ${view}`; console.error(msg); - const ModelCls = base.createErrorWidgetModel(error, msg); + const ModelCls = createErrorWidgetModel(error, msg); const errorModel = new ModelCls(); - v = new base.ErrorWidgetView({ + v = new ErrorWidgetView({ model: errorModel, }); v.render();