A model to manage search sources. Registered as selection-services.SearchSourceModel at the system.

interface SearchSourceModel {
    allSources: readonly SearchSource[];
    effectiveSources: readonly SearchSource[];
    getSourceById(id: string): undefined | SearchSource;
    getSourcesByIds(ids: string[]): readonly SearchSource[];
    hasEffectiveSources: boolean;
    hasSources: boolean;
}

Hierarchy

  • Watchable<
        {
            allSources: SearchSource[];
            effectiveSources: SearchSource[];
            hasEffectiveSources: boolean;
            hasSources: boolean;
        },
    >
    • SearchSourceModel

Properties

allSources: readonly SearchSource[]

Gets all registered search sources.

effectiveSources: readonly SearchSource[]

Gets sources which fulfill visibility constraints.

hasEffectiveSources: boolean

true if effective sources available.

hasSources: boolean

true if sources are available.

Methods

  • Gets source by id or undefined if not found.

    Parameters

    • id: string

    Returns undefined | SearchSource

  • Gets sources by the given ids. The order of the result may not the same as the input array.

    Parameters

    • ids: string[]

      list of ids.

    Returns readonly SearchSource[]