Nutrient Web SDK

Class OutlineElement

This record is used to represent document outline elements. These allow the user to navigate interactively from one part of the document to another.

Outline elements can be nested in a tree-like structure where elements are collapsible/expandable to hide/reveal their subtrees.

Class

Hierarchy

RecordOutlineElement

Constructors

  • Parameters

    values
    Partial<{ … }>
    Optional

Properties

action

Readonly

The action that will be triggered when the outline element is either clicked or tapped.

Please refer to NutrientViewer.Actions for an in-depth look at PDF actions.

children

Readonly

Each outline element can have nested outline elements. The visibility of which is controlled by OutlineElement.isExpanded.

color

Readonly

The text color of the outline element title. When this value is null the color is the Nutrient Web SDK's UI's default color which can be configured via NutrientViewer's public CSS API.

Default Value

null

isBold

Readonly
boolean

Whether the outline element title is bold.

Default Value

false

isExpanded

Readonly
boolean

Whether the outline element is expanded and shows its child elements.

Default Value

false

isItalic

Readonly
boolean

Whether the outline element title is italic.

Default Value

false

title

Readonly
string

The outline element title, must be human readable.

Immutable Record API

31
string

The name provided to Record(values, name) can be accessed with displayName.

  • Returns

    this

    See Also

    • Map#asImmutable

  • Returns

    this

    See Also

    • Map#asMutable

  • Returns a new instance of this Record type with all values set to their default values.

    Returns

    this
  • Returns a new instance of this Record type with the value for the specific key set to its default value.

    Type Parameters

    K
    extends keyof { … }

    Parameters

    keyK

    Returns

    this
  • Parameters

    keyPathIterable<unknown>

    Returns

    this
  • Parameters

    otherunknown

    Returns

    boolean
  • Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.

    If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.

    Type Parameters

    K
    extends keyof { … }

    Parameters

    keyK
    notSetValueunknown
    Optional

    Returns

    { … }[K]
  • Type Parameters

    T

    Parameters

    keystring
    notSetValueT

    Returns

  • Parameters

    keyPathIterable<unknown>

    Returns

    unknown
  • Parameters

    keystring

    Returns

    key is
    | "action"
    | "color"
    | "title"
    | "isBold"
    | "isItalic"
    | "children"
    | "isExpanded"
  • Returns

    number
  • Parameters

    keyPathIterable<unknown>

    Returns

    boolean
  • Parameters

    ...collections
    (Iterable<[string, unknown], any, any> | Partial<{ … }>)[]

    Returns

    this
  • Parameters

    ...collections
    (Iterable<[string, unknown], any, any> | Partial<{ … }>)[]

    Returns

    this
  • Parameters

    keyPathIterable<unknown>
    ...collectionsunknown[]

    Returns

    this
  • Parameters

    merger(oldVal: unknown, newVal: unknown, key: unknown) => unknown
    ...collections
    (Iterable<[string, unknown], any, any> | Partial<{ … }>)[]

    Returns

    this
  • Parameters

    keyPathIterable<unknown>
    ...collectionsunknown[]

    Returns

    this
  • Parameters

    merger
    (oldVal: unknown, newVal: unknown, key: keyof { … }) => unknown
    ...collections
    (Iterable<[string, unknown], any, any> | Partial<{ … }>)[]

    Returns

    this
  • Type Parameters

    K
    extends keyof { … }

    Parameters

    keyK

    Returns

    this
  • Parameters

    keyPathIterable<unknown>

    Returns

    this
  • Parameters

    keyPathIterable<unknown>
    valueunknown

    Returns

    this
  • Deeply converts this Record to equivalent native JavaScript Object.

    Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.

    Returns

    { … }
    • action: unknown

      The action that will be triggered when the outline element is either clicked or tapped.

      Please refer to NutrientViewer.Actions for an in-depth look at PDF actions.

    • children: unknown

      Each outline element can have nested outline elements. The visibility of which is controlled by OutlineElement.isExpanded.

    • color: unknown

      The text color of the outline element title. When this value is null the color is the Nutrient Web SDK's UI's default color which can be configured via NutrientViewer's public CSS API.

      Default Value

      null
    • isBold: boolean

      Whether the outline element title is bold.

      Default Value

      false
    • isExpanded: boolean

      Whether the outline element is expanded and shows its child elements.

      Default Value

      false
    • isItalic: boolean

      Whether the outline element title is italic.

      Default Value

      false
    • title: string

      The outline element title, must be human readable.

  • Parameters

    keyPathIterable<unknown>
    updater(value: unknown) => unknown

    Returns

    this
  • Returns

    boolean

    See Also

    • Map#wasAltered

  • Note: Not all methods can be used on a mutable collection or within withMutations! Only set may be used mutatively.

    Parameters

    mutator(mutable: this) => unknown

    Returns

    this

    See Also

    • Map#withMutations