packageDocumentation module import { PropertyRecord } from "@itwin/appui-abstract" ; import { BeEvent } from "@itwin/core-bentley" ; import { PropertyCategory } from "../../PropertyDataProvider" ; public export enum FilteredType { Category , Label , Value } public export interface PropertyDataFilterResult { /** Indicates whether provided item matched filter */ matchesFilter : boolean ; /**
     * Indicates whether descendants nodes should be forcefully included in filtered results.
     * Can only be true for nodes that have `matchesFilter` set to true.
     */ shouldForceIncludeDescendants ? : boolean ; /**
     * Indicates whether parents of node should be expanded up to this match node.
     * Can only be true for nodes that have `matchesFilter` set to true.
     */ shouldExpandNodeParents ? : boolean ; /**
     * Indicates how many times filter was matched in the provided item.
     */ matchesCount ? : number ; /**
     * Indicates what item types were matched.
     */ filteredTypes ? : FilteredType [ ] ; } public export declare type PropertyFilterChangesListener = ( ) => void ; public export class PropertyFilterChangeEvent extends BeEvent < PropertyFilterChangesListener > { } public export interface IPropertyDataFilterer { readonly isActive : boolean ; recordMatchesFilter : ( node : PropertyRecord , parents : PropertyRecord [ ] ) => Promise < PropertyDataFilterResult > ; categoryMatchesFilter : ( node : PropertyCategory , parents : PropertyCategory [ ] ) => Promise < PropertyDataFilterResult > ; onFilterChanged : PropertyFilterChangeEvent ; } public export abstract class PropertyDataFiltererBase implements IPropertyDataFilterer { public onFilterChanged : PropertyFilterChangeEvent = new PropertyFilterChangeEvent ( ) ; public abstract get isActive ( ) : boolean ; public abstract recordMatchesFilter ( node , parents ) ; public abstract categoryMatchesFilter ( node , parents ) ; } public export abstract class PropertyCategoryDataFiltererBase extends PropertyDataFiltererBase { public async recordMatchesFilter ( ) { return { matchesFilter : ! this . isActive } ; } } public export abstract class PropertyRecordDataFiltererBase extends PropertyDataFiltererBase { public async categoryMatchesFilter ( ) { return { matchesFilter : ! this . isActive } ; } }