LiveFilter.FilterTypes (LiveFilter v0.1.0)

View Source

Defines available filter types and their operators. Maps field types to appropriate UI components.

Summary

Functions

Returns preset date ranges for date filters.

Returns all available field types.

Maps a type and operator combination to an appropriate input component.

Returns human-readable label for an operator.

Determines if an operator requires a value input.

Returns available operators for a given field type.

Validates if a given operator is valid for a field type.

Functions

date_presets()

Returns preset date ranges for date filters.

field_types()

Returns all available field types.

input_component_for(type, operator)

Maps a type and operator combination to an appropriate input component.

operator_label(operator)

Returns human-readable label for an operator.

operator_requires_value?(operator)

Determines if an operator requires a value input.

operators_for_type(type)

Returns available operators for a given field type.

valid_operator?(type, operator)

Validates if a given operator is valid for a field type.