Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ITypeEditorFactory

Hierarchy

  • ITypeEditorFactory

Implemented by

Index

Methods

getDetailEditor

  • Retrieve a detailed popup editor from the factory.

    Popup editors should display more context, and expose more "knobs", than an inline editor. They are given more screen real estate and are displayed as first-class browser popups.

    template

    T The type of the value to be edited

    Type parameters

    • T

    Parameters

    • type: Type

      The type annotation of the value to be edited

    Returns IDetailEditorConstructor<T>

getEditor

  • Retrieve an inline editor component from the factory

    template

    T The type of the value to be edited

    Type parameters

    • T

    Parameters

    • type: Type

      The type annotation of the value to be edited

    Returns ITypeEditorConstructor<T>

isDetailEditorSuppressed

  • isDetailEditorSuppressed(type: Type): boolean
  • Whether the detail editor for a given type should be shown.

    For some types, detail editors don't really make sense, since the type is too simple to ever warrant needing a popup. Type editors should not display a triple-dot in these cases.

    Parameters

    • type: Type

      The type annotation of the editor

    Returns boolean

    Whether the detail editor button should be elided

registerDetailEditor

  • Register a detailed editor, associating it with a given type annotation

    template

    T The type of the value that this editor works with

    Type parameters

    • T

    Parameters

    • type: Type

      The annotation to associate with in the factory

    • editor: IDetailEditorConstructor<T>

      A constructor for a type editor

    Returns void

registerEditor

  • Register an inline editor, associating it with a given type annotation

    template

    T The type of the value that this editor works with

    Type parameters

    • T

    Parameters

    • type: Type

      The annotation to associate with in the factory

    • editor: ITypeEditorConstructor<T>

      A constructor for a type editor

    Returns void

suppressDetailEditor

  • suppressDetailEditor(type: Type): void
  • Supress a detail editor for a given type. Some types are simple enough that they don't need a detail editor, such as Booleans, Dates, and Numbers. These types are primitive enough that the existence of a detail editor isn't helpful, and just acts as clutter.

    Parameters

    • type: Type

      The type of the editor to supress

    Returns void

Generated using TypeDoc