Nutrient Web SDK
    Preparing search index...

    This record is used to persist the information for a bookmark.

    A bookmark is an object that registers a PDF action, usually triggered to go to a page.

    Hierarchy

    • Record<
          {
              action: NutrientViewer.Actions.Action
              | null;
              id: string | null;
              name: string | null;
              pdfBookmarkId: string | null;
          },
          this,
      > & Readonly<
          {
              action: NutrientViewer.Actions.Action
              | null;
              id: string | null;
              name: string | null;
              pdfBookmarkId: string | null;
          },
      >
      • Bookmark
    Index

    Properties

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

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

    id: string

    A unique identifier to describe the bookmark. When a bookmark is created in the UI, the viewer has to generate a unique ID.

    When changes are saved to the underlying bookmark provider, we call Instance#ensureChangesSaved to make sure the annotation has been persisted from the provider.

    name: string | null

    optional

    An optional name to associate to the bookmark.

    null
    
    pdfBookmarkId: string | null

    When the bookmark is extracted directly from a PDF file, the pdfBookmarkId refers to the identifier that was used in the PDF document.

    This ID is optional since newly created bookmarks using the SYNCProvider annotation provider won't have a pdfBookmarkId assigned.

    null
    
    displayName: string

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

    toSerializableObject: (bookmark: NutrientViewer.Bookmark) => BookmarkJSON = toJSON

    Bookmark serializer. Converts a bookmark to InstantJSON compliant objects.

    Methods

    • Returns IterableIterator<
          [
              keyof {
                  action: NutrientViewer.Actions.Action
                  | null;
                  id: string | null;
                  name: string | null;
                  pdfBookmarkId: string | null;
              },
              string
              | number
              | NutrientViewer.Actions.Action
              | null,
          ],
      >

    • Returns this

      Map#asImmutable

    • Returns this

      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 {
            action: NutrientViewer.Actions.Action | null;
            id: string | null;
            name: string | null;
            pdfBookmarkId: string | null;
        }

      Parameters

      • key: K

      Returns this

      remove

    • Parameters

      Returns this

      removeIn

    • Parameters

      • other: unknown

      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 {
            action: NutrientViewer.Actions.Action | null;
            id: string | null;
            name: string | null;
            pdfBookmarkId: string | null;
        }

      Parameters

      • key: K
      • OptionalnotSetValue: unknown

      Returns {
          action: NutrientViewer.Actions.Action | null;
          id: string | null;
          name: string | null;
          pdfBookmarkId: string | null;
      }[K]

    • Type Parameters

      • T

      Parameters

      • key: string
      • notSetValue: T

      Returns T

    • Parameters

      Returns unknown

    • Parameters

      • key: string

      Returns key is "id" | "name" | "action" | "pdfBookmarkId" | "sortKey"

    • Returns number

    • Parameters

      Returns boolean

    • Parameters

      • ...collections: (
            | Iterable<[string, unknown], any, any>
            | Partial<
                {
                    action: NutrientViewer.Actions.Action
                    | null;
                    id: string | null;
                    name: string | null;
                    pdfBookmarkId: string | null;
                },
            >
        )[]

      Returns this

    • Parameters

      • ...collections: (
            | Iterable<[string, unknown], any, any>
            | Partial<
                {
                    action: NutrientViewer.Actions.Action
                    | null;
                    id: string | null;
                    name: string | null;
                    pdfBookmarkId: string | null;
                },
            >
        )[]

      Returns this

    • Parameters

      • keyPath: Iterable<unknown>
      • ...collections: unknown[]

      Returns this

    • Parameters

      • merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown
      • ...collections: (
            | Iterable<[string, unknown], any, any>
            | Partial<
                {
                    action: NutrientViewer.Actions.Action
                    | null;
                    id: string | null;
                    name: string | null;
                    pdfBookmarkId: string | null;
                },
            >
        )[]

      Returns this

    • Parameters

      • keyPath: Iterable<unknown>
      • ...collections: unknown[]

      Returns this

    • Parameters

      • merger: (
            oldVal: unknown,
            newVal: unknown,
            key: keyof {
                action: NutrientViewer.Actions.Action | null;
                id: string | null;
                name: string | null;
                pdfBookmarkId: string | null;
            },
        ) => unknown
      • ...collections: (
            | Iterable<[string, unknown], any, any>
            | Partial<
                {
                    action: NutrientViewer.Actions.Action
                    | null;
                    id: string | null;
                    name: string | null;
                    pdfBookmarkId: string | null;
                },
            >
        )[]

      Returns this

    • Type Parameters

      • K extends keyof {
            action: NutrientViewer.Actions.Action | null;
            id: string | null;
            name: string | null;
            pdfBookmarkId: string | null;
        }

      Parameters

      • key: K

      Returns this

    • Parameters

      Returns this

    • Type Parameters

      • K extends keyof {
            action: NutrientViewer.Actions.Action | null;
            id: string | null;
            name: string | null;
            pdfBookmarkId: string | null;
        }

      Parameters

      • key: K
      • value: {
            action: NutrientViewer.Actions.Action | null;
            id: string | null;
            name: string | null;
            pdfBookmarkId: string | null;
        }[K]

      Returns this

    • Parameters

      • keyPath: Iterable<unknown>
      • value: unknown

      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;
          id: string | null;
          name: string | null;
          pdfBookmarkId: string | null;
      }

      • action: unknown

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

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

      • id: string | null

        A unique identifier to describe the bookmark. When a bookmark is created in the UI, the viewer has to generate a unique ID.

        When changes are saved to the underlying bookmark provider, we call Instance#ensureChangesSaved to make sure the annotation has been persisted from the provider.

      • name: string | null

        optional

        An optional name to associate to the bookmark.

        null
        
      • pdfBookmarkId: string | null

        When the bookmark is extracted directly from a PDF file, the pdfBookmarkId refers to the identifier that was used in the PDF document.

        This ID is optional since newly created bookmarks using the SYNCProvider annotation provider won't have a pdfBookmarkId assigned.

        null
        
    • Shallowly converts this Record to equivalent native JavaScript Object.

      Returns {
          action: NutrientViewer.Actions.Action | null;
          id: string | null;
          name: string | null;
          pdfBookmarkId: string | null;
      }

      • action: NutrientViewer.Actions.Action | null

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

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

      • id: string | null

        A unique identifier to describe the bookmark. When a bookmark is created in the UI, the viewer has to generate a unique ID.

        When changes are saved to the underlying bookmark provider, we call Instance#ensureChangesSaved to make sure the annotation has been persisted from the provider.

      • name: string | null

        optional

        An optional name to associate to the bookmark.

        null
        
      • pdfBookmarkId: string | null

        When the bookmark is extracted directly from a PDF file, the pdfBookmarkId refers to the identifier that was used in the PDF document.

        This ID is optional since newly created bookmarks using the SYNCProvider annotation provider won't have a pdfBookmarkId assigned.

        null
        
    • Shallowly converts this Record to equivalent JavaScript Object.

      Returns {
          action: NutrientViewer.Actions.Action | null;
          id: string | null;
          name: string | null;
          pdfBookmarkId: string | null;
      }

      • action: NutrientViewer.Actions.Action | null

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

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

      • id: string | null

        A unique identifier to describe the bookmark. When a bookmark is created in the UI, the viewer has to generate a unique ID.

        When changes are saved to the underlying bookmark provider, we call Instance#ensureChangesSaved to make sure the annotation has been persisted from the provider.

      • name: string | null

        optional

        An optional name to associate to the bookmark.

        null
        
      • pdfBookmarkId: string | null

        When the bookmark is extracted directly from a PDF file, the pdfBookmarkId refers to the identifier that was used in the PDF document.

        This ID is optional since newly created bookmarks using the SYNCProvider annotation provider won't have a pdfBookmarkId assigned.

        null
        
    • Returns Keyed<
          keyof {
              action: NutrientViewer.Actions.Action
              | null;
              id: string | null;
              name: string | null;
              pdfBookmarkId: string | null;
          },
          string
          | number
          | NutrientViewer.Actions.Action
          | null,
      >

    • Type Parameters

      • K extends keyof {
            action: NutrientViewer.Actions.Action | null;
            id: string | null;
            name: string | null;
            pdfBookmarkId: string | null;
        }

      Parameters

      • key: K
      • updater: (
            value: {
                action: NutrientViewer.Actions.Action | null;
                id: string | null;
                name: string | null;
                pdfBookmarkId: string | null;
            }[K],
        ) => {
            action: NutrientViewer.Actions.Action
            | null;
            id: string | null;
            name: string | null;
            pdfBookmarkId: string | null;
        }[K]

      Returns this

    • Parameters

      • keyPath: Iterable<unknown>
      • updater: (value: unknown) => unknown

      Returns this

    • Returns boolean

      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

      Map#withMutations