The basic compendium browser class allowing the browsing of compendiums by utilising their indexes.

Extending classes must define the following static properties if the browser is not meant to browse Item documents: documentName. Extending classes should define the following static properties: typeName, filterClasses.

Hierarchy (View Summary)

Constructors

Properties

_boundResetDragHide: () => void
_debouncedRender: (...args: any) => void
_dragDrop: any
_entries: undefined | IndexEntry[]
entries: Collection<IndexEntry>

The Collection of index entries this browser is aware of.

expandedFilters: Set<string> = ...

A set of filters that were expanded by the user, and should stay expanded upon re-render.

filters: Collection<BaseFilter> = ...

The set of filters to apply to the compendium index.

handledTypes: Set<string> = ...

The types of entries this browser handles, as per a document's type property.

packs: CompendiumCollection<any>[] = []

Compendium packs this browser gets entries from.

_query: undefined | string
BROWSERS: {} = {}

Known browsers.

Initialized in initializeBrowsers

DEFAULT_OPTIONS: {
    actions: {
        clearFilter: (event: PointerEvent, button: HTMLElement) => void;
        reloadPacks: Object;
        resetFilters: Object;
    };
    classes: string[];
    id: string;
    position: { height: number; left: number; top: number; width: number };
    tag: string;
    window: { icon: string; resizable: boolean };
} = ...
documentName: "Actor" | "Item" = "Item"

The document name of entries this browser displays.

ENTRY_TEMPLATE: string = "systems/pf1/templates/apps/compendium-browser/entries.hbs"

The template used to render individual entries in the browser.

filterClasses: typeof BaseFilter[] = []

An array of classes extending BaseFilter that should be used for this browser.

PARTS: { form: { scrollable: string[]; template: string } } = ...
typeName: string

A localisation string used in the browser's title.

Accessors

Methods

  • Request indexes of all packs of a document type to be loaded. This method should only ever be called as CompendiumBrowser.getIndexes to ensure Promises are properly bundled.

    Parameters

    • packNames: string[] = []

      The names of the packs to load indexes for

    Returns Promise<void>

    A Promise that resolves once all indexes have been loaded

    CompendiumBrowser.#indexingPromise