Options
All
  • Public
  • Public/Protected
  • All
Menu

Module apputils

Index

Type aliases

ClipboardData

ClipboardData: string | MimeData

Variables

Const ICommandPalette

ICommandPalette: Token<ICommandPalette>

The command palette token.

Const ISanitizer

ISanitizer: Token<ISanitizer>

The sanitizer token.

ISessionContextDialogs

ISessionContextDialogs: Token<IDialogs>

The session context dialogs token.

Const ISplashScreen

ISplashScreen: Token<ISplashScreen>

The main menu token.

Const IThemeManager

IThemeManager: Token<IThemeManager>

The theme manager token.

IToolbarWidgetRegistry

IToolbarWidgetRegistry: Token<IToolbarWidgetRegistry>

The toolbar registry token.

Const IWindowResolver

IWindowResolver: Token<IWindowResolver>

The default window resolver token.

Const defaultSanitizer

defaultSanitizer: ISanitizer

The default instance of an ISanitizer meant for use by user code.

deprecated

It will be removed in JupyterLab v4. You should request the ISanitizer in your plugin instead.

Const sessionContextDialogs

sessionContextDialogs: IDialogs

The default implementation of the client session dialog provider.

Functions

CommandToolbarButtonComponent

  • CommandToolbarButtonComponent(props: IProps): JSX.Element
  • React component for a toolbar button that wraps a command.

    This wraps the ToolbarButtonComponent and watches the command registry for changes to the command.

    Parameters

    Returns JSX.Element

Const FilenameSearcher

  • A widget which hosts a input textbox to filter on file names.

    Parameters

    Returns ReactWidget

Const FilterBox

  • Parameters

    Returns Element

ToolbarButtonComponent

  • ToolbarButtonComponent(props: IProps): JSX.Element
  • React component for a toolbar button.

    Parameters

    • props: IProps

      The props for ToolbarButtonComponent.

    Returns JSX.Element

addCommandToolbarButtonClass

  • addCommandToolbarButtonClass(w: Widget): Widget
  • Parameters

    • w: Widget

    Returns Widget

addToolbarButtonClass

  • addToolbarButtonClass(w: Widget): Widget
  • Adds the toolbar button class to the toolbar widget.

    Parameters

    • w: Widget

      Toolbar button widget.

    Returns Widget

createDefaultFactory

  • createDefaultFactory(commands: CommandRegistry): (widgetFactory: string, widget: Widget, toolbarItem: IWidget) => Widget
  • Create the default toolbar item widget factory

    Parameters

    • commands: CommandRegistry

      Application commands registry

    Returns (widgetFactory: string, widget: Widget, toolbarItem: IWidget) => Widget

    Default factory

      • (widgetFactory: string, widget: Widget, toolbarItem: IWidget): Widget
      • Parameters

        • widgetFactory: string
        • widget: Widget
        • toolbarItem: IWidget

        Returns Widget

createToolbarFactory

  • Create the toolbar factory for a given container widget based on a data description stored in settings

    Parameters

    • toolbarRegistry: IToolbarWidgetRegistry

      Toolbar widgets registry

    • settingsRegistry: ISettingRegistry

      Settings registry

    • factoryName: string

      Toolbar container factory name

    • pluginId: string

      Settings plugin id

    • translator: ITranslator

      Translator

    • Optional propertyId: string

      Toolbar definition key in the settings plugin

    Returns (widget: Widget) => IObservableList<IToolbarItem>

    List of toolbar widgets factory

fuzzySearch

  • fuzzySearch(source: string, query: string): IScore | null
  • Perform a fuzzy search on a single item.

    Parameters

    • source: string
    • query: string

    Returns IScore | null

setToolbar

showDialog

  • Create and show a dialog.

    Type parameters

    • T

    Parameters

    • Optional options: Partial<IOptions<T>>

      The dialog setup options.

    Returns Promise<IResult<T>>

    A promise that resolves with whether the dialog was accepted.

showErrorMessage

  • showErrorMessage(title: string, error: any, buttons?: ReadonlyArray<IButton>): Promise<void>
  • Show an error message dialog.

    Parameters

    • title: string

      The title of the dialog box.

    • error: any

      the error to show in the dialog body (either a string or an object with a string message property).

    • Optional buttons: ReadonlyArray<IButton>

    Returns Promise<void>

translateKernelStatuses

  • Helper function to translate kernel statuses mapping by using input translator.

    Parameters

    • Optional translator: ITranslator
      • Language translator.

    Returns Record<KernelDisplayStatus, string>

    The translated kernel status mapping.

Const updateFilterFunction

  • updateFilterFunction(value: string, useFuzzyFilter: boolean, caseSensitive?: boolean): (item: string) => Partial<IScore>
  • Parameters

    • value: string
    • useFuzzyFilter: boolean
    • Optional caseSensitive: boolean

    Returns (item: string) => Partial<IScore>

      • (item: string): Partial<IScore>
      • Parameters

        • item: string

        Returns Partial<IScore>

Generated using TypeDoc