The default implementation of an IRenderer.

Implements

Constructors

Properties

itemFactories: {
    date_created: () => HTMLSpanElement;
    file_size: () => HTMLSpanElement;
    is_selected: () => HTMLElement;
    last_modified: () => HTMLSpanElement;
    name: () => HTMLSpanElement;
} = ...

Factories for individual parts of the item.

Methods

  • Create a new item node for a dir listing.

    Parameters

    • OptionalhiddenColumns: Set<ToggleableColumn>
    • OptionalcolumnsSizes: Record<
          "name"
          | "last_modified"
          | "is_selected"
          | "file_size"
          | "date_created",
          null | number,
      >

    Returns HTMLElement

    A new DOM node to use as a content item.

  • Update an item's created date.

    Parameters

    • created: HTMLElement

      Element containing the file's created date.

    • createdDate: string

      String representation of the created date.

    • createdStyle: RelativeTimeFormatStyle

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

    Returns void

  • 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.

    • OptionalfileType: DocumentRegistry.IFileType

      The file type of the item, if applicable.

    • Optionaltranslator: ITranslator
    • OptionalhiddenColumns: Set<ToggleableColumn>
    • Optionalselected: boolean
    • OptionalmodifiedStyle: RelativeTimeFormatStyle

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

    • OptionalcolumnsSizes: Record<
          "name"
          | "last_modified"
          | "is_selected"
          | "file_size"
          | "date_created",
          null | number,
      >
    • OptionalcreatedStyle: RelativeTimeFormatStyle

    Returns void

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

    Parameters

    • node: HTMLElement
    • model: Contents.IModel
    • OptionalmodifiedStyle: RelativeTimeFormatStyle
    • OptionalcolumnsSizes: Record<
          "name"
          | "last_modified"
          | "is_selected"
          | "file_size"
          | "date_created",
          null | number,
      >
    • OptionalcreatedStyle: RelativeTimeFormatStyle

    Returns void