File

src/lib/filter-toolbar/filter-toolbar.service.ts

Description

FilterToolbarService is used to share data between the filter toolbar and other components in the library. The calculation of each filter is also done here.

Import Information:

  1. Not all attributes are changeable. Or should be changed (consult the api documentation).
Example :
import { FilterToolbarService } from '@talenra/inbox';

Index

Properties
Methods

Methods

compareQueryObjects
compareQueryObjects(a: IQueryBuilderQuery | IQueryBuilderRule, b: IQueryBuilderQuery | IQueryBuilderRule)

Compares the rule objects between two values.

Parameters :
Name Type Optional Description
a IQueryBuilderQuery | IQueryBuilderRule No

First element to compare.

b IQueryBuilderQuery | IQueryBuilderRule No

Second element to compare.

Returns : boolean
createQueryObject
createQueryObject(query: IQueryBuilderQuery)

Create new query object with the values.

Parameters :
Name Type Optional Description
query IQueryBuilderQuery No

The query object to be created.

Returns : IQueryBuilderQuery
createRuleObject
createRuleObject(rule: IQueryBuilderRule)

Create new rule object with the values.

Parameters :
Name Type Optional Description
rule IQueryBuilderRule No

The rule object to be created.

Returns : IQueryBuilderRule
dateTimeReviver
dateTimeReviver(key: string, value: string | number)

Encode a string to a date.

Parameters :
Name Type Optional Description
key string No

The key of the value.

value string | number No

The value to be encoded.

Returns : Date | string | number
decideRuleOrQuery
decideRuleOrQuery(ruleOrQuery: IQueryBuilderRule | IQueryBuilderQuery)

Decide whether to create a rule or a query object.

Parameters :
Name Type Optional Description
ruleOrQuery IQueryBuilderRule | IQueryBuilderQuery No

The rule or query object to be created.

Returns : IQueryBuilderRule | IQueryBuilderQuery
findPresetFromPresetsViaNameAndIdentifier
findPresetFromPresetsViaNameAndIdentifier(presetGroups: IPreset[], searchedPresetName: string[])

Function to check if the filter and sort values have changed compared to the values in the preset.

Parameters :
Name Type Optional Description
presetGroups IPreset[] No

The preset groups.

searchedPresetName string[] No

The searched preset name.

Returns : literal type | undefined
getIconFilterCombinedKey
getIconFilterCombinedKey(iconInput: IIconInput)

Gets the combined icon filter key.

Parameters :
Name Type Optional Description
iconInput IIconInput No

The icon input to construct the key.

Returns : string
isQueryValid
isQueryValid(query: IQueryBuilderQuery)

Check if the query object is valid.

Parameters :
Name Type Optional Description
query IQueryBuilderQuery No

The query object to be checked.

Returns : boolean

Properties

activeExpertFilter$
Type : unknown
Default value : new BehaviorSubject<boolean>(false)

Value for the active expert filter. If true, the expert filter is active. Tag should be displayed and the expert filter should be shown.

Optional identifierWithPossibleSelection
Type : Map<string | ISelectionFilterValue[]>

Map with all identifiers and the possible selections for the filter.

results matching ""

    No results matching ""