The render interface for file browser listing options.

interface IRenderer {
    getCheckboxNode: ((node) => null | HTMLInputElement);
    createDragImage(node, count, trans, fileType?): HTMLElement;
    createItemNode(hiddenColumns?, columnsSizes?): HTMLElement;
    createNode(): HTMLElement;
    getNameNode(node): HTMLElement;
    handleHeaderClick(node, event): null | DirListing.ISortState;
    populateHeaderNode(node, translator?, hiddenColumns?, columnsSizes?): void;
    updateItemModified?(modified, modifiedDate, modifiedStyle): void;
    updateItemNode(node, model, fileType?, translator?, hiddenColumns?, selected?, modifiedStyle?, columnsSizes?): void;
    updateItemSize?(node, model, modifiedStyle?, columnsSizes?): void;
}

Implemented by

Properties

getCheckboxNode: ((node) => null | HTMLInputElement)

Get the checkbox input element node.

Downstream interface implementations,such as jupyterlab-unfold, that don't support checkboxes should simply always return null for this function.

Type declaration

Returns

The checkbox node.

Methods

  • Update an item's last modified date.

    Parameters

    • modified: HTMLElement

      Element containing the file's last modified date.

    • modifiedDate: string

      String representation of the last modified date.

    • modifiedStyle: RelativeTimeFormatStyle

      The date style for the modified column: narrow, short, or long

    Returns void

  • Update an item node to reflect the current state of a model.

    Parameters

    • node: HTMLElement

      A node created by [[createItemNode]].

    • model: Contents.IModel

      The model object to use for the item state.

    • Optional fileType: DocumentRegistry.IFileType

      The file type of the item, if applicable.

    • Optional translator: ITranslator
    • Optional hiddenColumns: Set<ToggleableColumn>
    • Optional selected: boolean
    • Optional modifiedStyle: RelativeTimeFormatStyle

      The date style for the modified column: narrow, short, or long

    • Optional columnsSizes: Record<"name" | "last_modified" | "is_selected" | "file_size", null | number>

    Returns void

  • Update size of item nodes, assuming that model has not changed.

    Parameters

    • node: HTMLElement
    • model: Contents.IModel
    • Optional modifiedStyle: RelativeTimeFormatStyle
    • Optional columnsSizes: Record<"name" | "last_modified" | "is_selected" | "file_size", null | number>

    Returns void