Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Aggregations Framework is responsible for presenting a user-friendly means of visualizing potential filters based on the supplied data within the user interface (UI). This aspect of the framework primarily focuses on collecting data from the backend, ensuring it is properly typed, and subsequently displaying it with interactive features. These interactive elements empower users to effortlessly filter the results showcased on the screen, thus enhancing their overall experience.

AggTypes

NameValue
TERM'term'
BOOL'bool'
DATE_HISTOGRAM'date_histogram'
HISTOGRAM'histogram'
BROWSE'browse'
DATE_RANGE'date_range'
RANGE'range'
SLIDER'slider'


AggBuilder

This functional component, as implied by its name, serves as the component intended for use in views. Its primary function is to interpret, construct, and present aggregation objects that are transmitted from the backend. It plays a crucial role in rendering and displaying these aggregations within the user interface, making the data provided by the backend more accessible and comprehensible to the end-users.

AggUtils

This typescript file is used to provide interfaces and methods that are required by the AggBuilder, some of them are:

AggAction Enum

NameValue
ADD-
REMOVE-
NEGATE-

onSelectionPros Interface

PropertyTypeDescription
idstringIdentifier.
valueanyValue.
actionAggActionAggregation action (Enum).

AggSelection Interface

PropertyTypeDescription
idstringIdentifier.
valuesany[]Array of values.
negatedany[]Array of negated values.
levelnumberLevel.

InnerSelection Class

PropertyTypeDefaultDescription
levelnumber0Level.
negatedSet<any>-Set of negated values.
valuesSet<any>-Set of values.

AggProps Interface

PropertyTypeDescription
aggAggregationAggregation data.
isSelected(id: string, entry_key: any) => booleanFunction to check if an entry is selected.
handleEvent(props: onSelectionPros) => voidFunction to handle selection events.

Aggregation Interface

PropertyTypeDescription
idstringIdentifier.
typeAggsTypesType of aggregation (Enum).
display_namestringDisplay name.
expandedbooleanExpanded state.
entriesAggData[]Array of aggregation data.

AggData Interface

PropertyTypeDescription
keyanyKey.
countnumberCount.
displaystringDisplay value.
hide_countbooleanFlag to hide count.
translatestringTranslation information.
aggs[Aggregation]Array of aggregations (nested).

Table of Contents

Workflow

Image Modified