Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Properties

_OPERATOR_INPUT: ConfigurationInput

Utility variable that can be used as value for the [configurationInputs$]{@link Category#configurationInputs$} Observable.

_allowedOperators: Operator<any>[]
_elasticKeywords: string[]
_generatedPredicate$: BehaviorSubject<ElementaryPredicate>

Emit a new Predicate if the Category is in a state that it can be created. Emits undefined if the Category is not in such state.

_inputType: SearchInputType
_operandsFormControls: FormControl[]

Stores the FormControl objects that are pushed into the observable when the number of operands changes.

_operandsFormControls$: ReplaySubject<FormControl[]>

Contains the FormControl objects that can be used to input search arguments.

_operatorFormControl: FormControl

Contains the FormControl object that is used to drive the operator selection.

The category can subscribe to it if it wishes to react to the selection change by the user.

_operatorService: OperatorService
_operatorTemplate$: BehaviorSubject<OperatorTemplatePart[]>

Contains the operator template parts that make up the operands GUI.

_optionalDependencies?: OptionalDependencies
_trackByIdGenerator: IncrementingCounter

Generates IDs for template parts supplied to ng for.

translationPath: string
OPERATOR_METADATA: "operator" = 'operator'

The CategoryMetadataConfiguration key for this Category's Operator

_i18n: "search.category.case.title" = 'search.category.case.title'

Accessors

  • get displayBold(): boolean
  • get elasticKeywords(): string[]
  • If you use the Category class as a sort of PredicateBuilder, then you want to use the [generatePredicate()]{@link Category#generatePredicate} method instead.

    This stream publishes either a new Predicate object or undefined based on changes to the FormControls that are managed by this class. If (based on user input) the Category reaches a state when construction of a Predicate is possible it will emit this Predicate. If it reaches a state when the Predicate can not longer be created undefined is emitted.

    Returns Observable<ElementaryPredicate>

  • get inputPlaceholder(): string
  • get operandsFormControls$(): Observable<FormControl[]>
  • Returns Observable<FormControl[]>

    an array of FormControl objects that contains as many controls as is the arity of the selected operator. Calling this method multiple times will return the same FormControl instances. When no operator is selected undefined is emitted.

  • get providesPredicate(): boolean
  • get selectedOperatorArity(): number

Methods

  • clearOperatorSelection(): void
  • Provides the necessary information for the serialisation of this category's state.

    Not every state must be preservable. The default library implementation supports only the preservation of the final state when the Category is generating a predicate object.

    Returns CategoryGeneratorMetadata

    an object containing all the necessary information for the reconstruction of this category's state, barring information about allowed nets. Returns undefined if the category is not in a state that generates a predicate. See [providesPredicate()]{@link Category#providesPredicate}.

  • createMetadataValues(): unknown[]
  • The default implementation returns the value of all operand form control objects up to the current number of operands. To serialize value of each operand the [serializeOperandValue()]{@link Category#serializeOperandValue} method is used.

    If the values used by this category are not serializable, then either this method, or the serializeOperandValue method, must be overridden.

    Returns unknown[]

    an array containing values input by the user in a serializable form

  • deserializeOperandValue(value: unknown): Observable<any>
  • destroy(): void
  • generateQuery(userInput: string[]): Query
  • getActiveInputFormControl(inputIndex: number): FormControl
  • initializeCategory(): void
  • isOperandValueSelected(newValue: any): boolean
  • isOperatorSelected(): boolean
  • isSelectedOperator(operatorClass: Type<any>): boolean
  • loadValuesFromMetadata(values: unknown[]): Observable<void>
  • The default implementation sets the provided values into this Category's operand form controls.

    An operator must be set before calling this method! Otherwise an error will be thrown.

    If the number of values doesn't match the arity of the selected operator an error will be thrown!

    If this Category overrides the [serializeOperandValue()]{@link Category#serializeOperandValue}, it must also override its deserialization counterpart - [deserializeOperandValue()]{@link #Category#deserializeOperandValue}!

    Parameters

    • values: unknown[]

      the serialized values that should be loaded into this Category instance

    Returns Observable<void>

    an Observable. When the Observable emits the category has finished loading its values.

  • operandValueChanges(operandIndex: number): void
  • reset(): void
  • selectDefaultOperator(): void
  • selectOperator(operatorIndex: number): void
  • serializeClass(): string
  • serializeOperandValue(valueFormControl: FormControl): unknown
  • setOperands(userInput: string[]): void
  • transformCategoryValue(value: any): string

Generated using TypeDoc