The boolean operator used to combine choices of this filter. If "OR", an entry will be included if at least one active choice matches. If "AND", an entry will only be included if all active choices match.
A Collection of FilterChoices for this filter.
A reference to the CompendiumBrowser this filter is used in.
The ID of this filter used to identify it in its browser's filters.
StaticautoShould the choices be automatically sorted?
Affects only choices retrieved from config.
StaticbooleanIs this filter viable for boolean operator?
StaticdefaultDefault booleanOperator
Must be "AND" or "OR".
StaticlocalizeAuto-localize choices.
Defaults to false due to pre-translation.
StaticlocalizeAuto-localize filter label
StaticlocalizePrefix to add to choices before localization.
StaticMIN_The minimum number of choices that must be present before the filter will show a search box. Booleans can be used to override this check.
StaticsavingStaticTEMPLATEThe handlebars template used to render this filter.
StatictypeA convenience property to define a single type this filter applies to.
StatictypesThe types of document this filter applies to.
Whether this filter has any active choices.
The number of active choices.
Whether this filter provides controls in addition to its choices.
StatichandledThe authoritative Set of types this filter applies to.
Static AbstractindexThe field this filter checks against its choices.
Will also be added to the compendiumIndexFields of the document's CONFIG object.
Static AbstractlabelThe label for this filter visible to the user.
Protected_ProtectedFilter this filter's choices based on a string query.
The originating input event
The rendered HTML of this filter
Activate event listeners for this filter.
The rendered HTML element for this filter only
Check whether an entry matches this filter. If the filter is not active, this will always return true.
The entry to check against this filter
Provide data necessary to render this filter. The data object generated by BaseFilter#getData contains the minimum data not only required by the filter itself, but also by the rendering CompendiumBrowser.
} The data object for this filter
Returns whether this filter has more than the given number of choices. Defaults to 1, as a single choice allows for no real filtering.
Optionalnumber: number = 1The number of choices to check for
Prepare the boolean operator for this filter.
Prepare the choices for this filter. This is called after the compendium browser has gathered its entries. By default, this will generate a list of choices from the index field of all entries in the compendium.
Adds the index fields checked by this filter to the document's CONFIG object,
so that CompendiumCollection#getIndex will include them.
Reset all choices and controls to their default state (inactive)
Prepare the filter for use. This step expects the compendium browser to have gathered its entries.
Toggle the active state of a choice, or set it to a specific state.
The key of the choice to toggle
Optionalstate: null | boolean = nullThe state to set the choice to. If null, the choice will be toggled.
StaticgetGenerate a Collection of FilterChoices from a CONFIG object.
The object to generate choices from; can be a Record<string, string> or
Optionaloptions: { innerSet?: boolean; labelKey?: string } = {}Options determining how the choices are generated.
OptionalinnerSet?: booleanWhether choices should be generated from direct properties of the configObject, or from the properties of the inner objects.
OptionallabelKey?: stringThe key to use to determine the label if the configObject is a Record<string, object>; will be ignored if the configObject is a Record<string, string>.
A basic filter class containing common functionality for all filters.
Inheriting classes should define the following static properties: label, indexField. Inheriting classes may define the following static properties: type.