Nutrient Web SDK
    Preparing search index...

    Class SearchState

    The current state of the search indicators inside the web view.

    You can update the search state using Instance#setSearchState.

    Hierarchy

    • Record<
          {
              focusedResultIndex: number;
              isFocused: boolean;
              isLoading: boolean;
              minSearchQueryLength: number;
              results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
              term: string;
          },
          this,
      > & Readonly<
          {
              focusedResultIndex: number;
              isFocused: boolean;
              isLoading: boolean;
              minSearchQueryLength: number;
              results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
              term: string;
          },
      >
      • SearchState
    Index

    Properties

    focusedResultIndex: number

    The currently focused result. -1 if no item is focused yet.

    -1
    
    isFocused: boolean

    Indicates that the search input has focus.

    isLoading: boolean

    Indicates that we're currently loading search requests.

    minSearchQueryLength: number

    Current minimum search query length. When using the UI or the API function NutrientViewer.Instance#search, any query shorter than this number will not be performed.

    In Server mode, this value is retrieved from the server at load time.

    The default value is 1 (not configurable) in Standalone mode, and 3 in Server mode (configurable in the server).

    The latest search results. These will be rendered as highlights in the page view.

    term: string

    The current search term. Changing this term will not start a search. Please use NutrientViewer.Instance#startUISearch for that purpose.

    Methods

    • Returns IterableIterator<
          [
              keyof {
                  focusedResultIndex: number;
                  isFocused: boolean;
                  isLoading: boolean;
                  minSearchQueryLength: number;
                  results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
                  term: string;
              },
              | string
              | number
              | boolean
              | NutrientViewer.Immutable.List<NutrientViewer.SearchResult>,
          ],
      >

    • 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

      Parameters

      • key: K

      Returns this

      remove

    • Parameters

      Returns this

      removeIn

    • Parameters

      • other: any

      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

      Parameters

      • key: K
      • OptionalnotSetValue: any

      Returns {
          focusedResultIndex: number;
          isFocused: boolean;
          isLoading: boolean;
          minSearchQueryLength: number;
          results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
          term: string;
      }[K]

    • Type Parameters

      • T

      Parameters

      • key: string
      • notSetValue: T

      Returns T

    • Parameters

      Returns any

    • Parameters

      • key: string

      Returns key is
          | "isFocused"
          | "isLoading"
          | "term"
          | "focusedResultIndex"
          | "results"
          | "minSearchQueryLength"

    • Returns number

    • Parameters

      Returns boolean

    • Parameters

      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    focusedResultIndex: number;
                    isFocused: boolean;
                    isLoading: boolean;
                    minSearchQueryLength: number;
                    results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
                    term: string;
                },
            >
        )[]

      Returns this

    • Parameters

      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    focusedResultIndex: number;
                    isFocused: boolean;
                    isLoading: boolean;
                    minSearchQueryLength: number;
                    results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
                    term: string;
                },
            >
        )[]

      Returns this

    • Parameters

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

      Returns this

    • Parameters

      • merger: (oldVal: any, newVal: any, key: any) => any
      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    focusedResultIndex: number;
                    isFocused: boolean;
                    isLoading: boolean;
                    minSearchQueryLength: number;
                    results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
                    term: string;
                },
            >
        )[]

      Returns this

    • Parameters

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

      Returns this

    • Parameters

      • merger: (
            oldVal: any,
            newVal: any,
            key: keyof {
                focusedResultIndex: number;
                isFocused: boolean;
                isLoading: boolean;
                minSearchQueryLength: number;
                results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
                term: string;
            },
        ) => any
      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    focusedResultIndex: number;
                    isFocused: boolean;
                    isLoading: boolean;
                    minSearchQueryLength: number;
                    results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
                    term: string;
                },
            >
        )[]

      Returns this

    • Type Parameters

      Parameters

      • key: K

      Returns this

    • Parameters

      Returns this

    • Type Parameters

      Parameters

      Returns this

    • Parameters

      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 {
          focusedResultIndex: any;
          isFocused: any;
          isLoading: any;
          minSearchQueryLength: any;
          results: any;
          term: any;
      }

      • focusedResultIndex: any

        The currently focused result. -1 if no item is focused yet.

        -1
        
      • isFocused: any

        Indicates that the search input has focus.

      • isLoading: any

        Indicates that we're currently loading search requests.

      • ReadonlyminSearchQueryLength: any

        Current minimum search query length. When using the UI or the API function NutrientViewer.Instance#search, any query shorter than this number will not be performed.

        In Server mode, this value is retrieved from the server at load time.

        The default value is 1 (not configurable) in Standalone mode, and 3 in Server mode (configurable in the server).

      • results: any

        The latest search results. These will be rendered as highlights in the page view.

      • term: any

        The current search term. Changing this term will not start a search. Please use NutrientViewer.Instance#startUISearch for that purpose.

    • Shallowly converts this Record to equivalent native JavaScript Object.

      Returns {
          focusedResultIndex: number;
          isFocused: boolean;
          isLoading: boolean;
          minSearchQueryLength: number;
          results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
          term: string;
      }

      • focusedResultIndex: number

        The currently focused result. -1 if no item is focused yet.

        -1
        
      • isFocused: boolean

        Indicates that the search input has focus.

      • isLoading: boolean

        Indicates that we're currently loading search requests.

      • ReadonlyminSearchQueryLength: number

        Current minimum search query length. When using the UI or the API function NutrientViewer.Instance#search, any query shorter than this number will not be performed.

        In Server mode, this value is retrieved from the server at load time.

        The default value is 1 (not configurable) in Standalone mode, and 3 in Server mode (configurable in the server).

      • results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>

        The latest search results. These will be rendered as highlights in the page view.

      • term: string

        The current search term. Changing this term will not start a search. Please use NutrientViewer.Instance#startUISearch for that purpose.

    • Shallowly converts this Record to equivalent JavaScript Object.

      Returns {
          focusedResultIndex: number;
          isFocused: boolean;
          isLoading: boolean;
          minSearchQueryLength: number;
          results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
          term: string;
      }

      • focusedResultIndex: number

        The currently focused result. -1 if no item is focused yet.

        -1
        
      • isFocused: boolean

        Indicates that the search input has focus.

      • isLoading: boolean

        Indicates that we're currently loading search requests.

      • ReadonlyminSearchQueryLength: number

        Current minimum search query length. When using the UI or the API function NutrientViewer.Instance#search, any query shorter than this number will not be performed.

        In Server mode, this value is retrieved from the server at load time.

        The default value is 1 (not configurable) in Standalone mode, and 3 in Server mode (configurable in the server).

      • results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>

        The latest search results. These will be rendered as highlights in the page view.

      • term: string

        The current search term. Changing this term will not start a search. Please use NutrientViewer.Instance#startUISearch for that purpose.

    • Type Parameters

      Parameters

      • key: K
      • updater: (
            value: {
                focusedResultIndex: number;
                isFocused: boolean;
                isLoading: boolean;
                minSearchQueryLength: number;
                results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
                term: string;
            }[K],
        ) => {
            focusedResultIndex: number;
            isFocused: boolean;
            isLoading: boolean;
            minSearchQueryLength: number;
            results: NutrientViewer.Immutable.List<NutrientViewer.SearchResult>;
            term: string;
        }[K]

      Returns this

    • Parameters

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

      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) => any

      Returns this

      Map#withMutations