Protected Readonly_allowedOperators that can be used to generated queries on the above keywords
Protected_generatedEmit 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.
Protected_inputinput field type that should be used to enter operator arguments for this category
Protected_logused to record information about incorrect use of this class
Protected_operandsStores the FormControl objects that are pushed into the observable when the number of operands changes.
Protected_operandsContains the FormControl objects that can be used to input search arguments.
Protected Readonly_OPERATOR_Utility variable that can be used as value for the [configurationInputs$]Category#configurationInputs$ Observable.
Protected_operatorContains 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.
Protected_operatorused to resolve serialized operators during deserialization
Protected_operatorContains the operator template parts that make up the operands GUI.
Protected_optionalProtected_options$Protected_optionsAutocomplete categories usually require a map to represent mapping of display names of their options to objects that are needed to construct their queries.
You are not required to use this map when you implement your own Category, but it comes with helpful functions and might save you some time.
See [options()]AutocompleteCategory#options and [addToMap()]AutocompleteCategory#addToMap.
Protected Readonly_pfqlPFQL keywords that should be queried by queries generated with this category
Protected_resourceresource type prefix in PFQL query
Protected_trackGenerates IDs for template parts supplied to ng for.
Readonlytranslationpath to the translation string
Always returns an array with only the [OPERATOR]SearchInputType#OPERATOR constant.
No configuration categories are displayed with bold text
Returns the Predicate currently generated by the Category.
For more information see [generatedPredicate$]Category#generatedPredicate$.
If you use the Category class as a sort of PredicateBuilder, then you want to use the
[generatePredicate()]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.
the translation string path for the text that should be displayed in the input placeholder
Beware that while most categories always return the same constant it is not a requirement. An example for such behavior is the CaseDataset category, where the argument input type depends on the selected data field type.
the required input type for arguments for this category
Sets the required input type for arguments for this category.
This setter allows changing the input type dynamically, which can be useful when the argument input type depends on runtime conditions (e.g., in CaseDataset category where the input type depends on the selected data field type).
the new input type to be set for this category
Returns the current array of FormControl objects that contains as many controls as is the arity of the selected operator.
Unlike the [operandsFormControls$]Category#operandsFormControls$ observable, this getter returns the actual array
instance directly without wrapping it in an observable.
an array of FormControl objects for the operands, or an empty array if no operator is selected
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.
A new value is emitted whenever the selected operator changes. undefined is emitted if no operator is selected.
[operators template]Operator#getOperatorNameTemplate in processed form fit for GUI rendering
Options the user can select from for this search Category.
An Observable of the options the user can select from for this search Category.
The Observable is updated when the base set of options changes, not when the available options are filtered, see [filterOptions()]AutocompleteCategory#filterOptions.
The Observable initially contains an empty array and the options may appear at a later point in time (based on the concrete AutocompleteCategory subclass implementation)
Protectedpfqlthe set of PFQL keywords that should be queried by queries generated with this category. The method can be overridden if the keywords are not static and change based on some additional selection (eg. Data fields)
whether the category is fully configured and represents a valid predicate or not
Protectedselectedthe arity of the selected operator. Throws an error if no operator is selected.
ProtectedaddProtectedcreatean Array containing text segments representing the configuration inputs of this category
an Array containing text segments representing the content of the predicate generated by this category
Protectedcreatefilter text segment representing the operand value at the specified index
Protectedcreatean Array containing text segments representing the operators with operands of this category
ProtectedcreateProtectedcreateProtecteddeserializethe deserialized value, that can be set as FormControl value
This method throws na error if the serialized value is not one of the autocomplete options.
Creates a duplicate of the current category object. Note that a duplicate is NOT a clone. The state of the returned category is not necessarily the same as the state of this category.
a category instance of the same type as this category in its initial state.
The function that is used to filter shown options in the autocomplete field.
By default the options that start with the input string are returned (case insensitive).
By default a new value is emitted, whenever either the user input or the base set of options changes.
user search input
options that satisfy the autocomplete condition
Calls the [generateQuery]Category#generateQuery method and creates an ElementaryPredicate with the result.
values entered by the user. The length of the array should match the [arity]Operator#_numberOfOperands of the selected Operator.
Predicate with Query generated by this object's [generateQuery]Category#generateQuery method
ProtectedgenerateCalls the [createQuery]Operator#createQuery method on the selected Operator.
Throws an Error if no Operator is selected.
Override this method if the query should be generated in some other way.
values entered by the user. The length of the array should match the [arity]Operator#_numberOfOperands of the selected Operator.
the Query generated by the selected Operator
ProtectedinitializeThis method is calle in the constructor. Apart from calling this method, the constructor only creates instances to fill the protected fields of this class.
The default implementation manages creation of operand FormControl instances and manages subscriptions to them.
You can override this method to change the initialization of your category without having to rewrite the base constructor from scratch.
Protectedisthe value of the FormControl object that we want to test
true if the newly selected value is a valid value, false otherwise.
ProtectedisLoads the category state from a PFQL expression.
This method attempts to select an operator based on the expression's operator type and then sets the operands from the expression's operand values. If the operator cannot be selected, the method returns immediately.
the PFQL simple expression containing the operator and operand values
an Observable that emits void when the loading is complete
ProtectedoperandResets the state of the Category, deselecting any selected category and removing other state information if the Category defines them.
This method can be used to reset the state of the category after each predicate constructed, effectively turning the category instance into a predicate builder.
Selects the default operator that should be used for query generation, when no Operator selection is provided to the user.
The default implementation selects the first operator in the [_allowedOperators]Category#allowedOperators array.
See [selectOperator()]Category#selectOperator for more information.
Changes the state of the Category. Category can create queries when an Operator is selected.
This method is useful if you want to use the Category class as predicate builder.
index in the [allowedOperators]Category#allowedOperators array of the Operator that should be selected
ProtectedselectSelects an operator from the category's allowed operators based on the PFQL expression's operator type.
This method searches for an operator in the allowed operators array that matches the type specified in the PFQL expression. If a matching operator is found, it is selected. If no match is found, an error is logged.
the PFQL simple expression containing the operator type to select
true if a matching operator was found and selected, false otherwise
the category class in a serializable form
in 5.6.0 - Category serialisation should be done by utilising the CategoryResolverService instead
ProtectedserializeChanges the state of the Category and generates a query if all necessary operands were set.
If you are using the category as a builder. Consider using the [generatePredicate()]Category#generatePredicate method instead.
values entered by the user. The length of the array should match the [arity]Operator#_numberOfOperands of the selected Operator.
ProtectedtransformPerforms a transformation of the FormControl value before passing it into the selected Operator for query generation.
It is mostly useful only for AutocompleteCategories, where the selected value of the FormControl is an object.
The default AutocompleteCategory implementation returns the SearchAutocompleteOption value attribute.
the FormControlValue
the value used for query generation
ProtectedupdatePublishes a new value in the [_options$]AutocompleteCategory#_options$ Subject generated from the [_optionsMap]AutocompleteCategory#_optionsMap.
The default implementation iterates trough the [_optionsMap]AutocompleteCategory#_optionsMap and creates options with the keys as [text]SearchAutocompleteOption#text and values as [value]SearchAutocompleteOption#value.
A utility class that exists for inheritance by simpler category instances.
The only configuration input is an [OPERATOR]SearchInputType#OPERATOR and a
FormControlinstance is available for it as well.For regular [Categories]Category use NoConfigurationCategory instead.