Versions Compared

Key

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

...

Info

The Language filter is composed of the following information :

  • Filter name :Language

    • Type : Multiple selection

    • Option values :

      • English

      • French

      • Deutsch

Advanced Configuration

Adding filters behind the “plus” icon

...

Adding value options to an existing filter

To complete

Configuring a thesaurus

To complete

Ordering filters

To complete

Adding/Deactivating a filter

To complete

Grouping Multiple filters under one menu

To complete

Configuring AI filters

...

Configuring the search bar

Resolving the search bar to use for a context

Search bars are configured per cursor and resource, based on the current context chosen by the user. The application falls back to default configuration if no search bar can be found for current context. Config is loaded from first existing configuration from:

  • $.dam.explore.filters.<cursorName>.<resourceName>

  • $.dam.explore.filters.<cursorName>.defaultResourceConfig

  • $.dam.explore.filters.defaultCursorConfig.<resourceName>

  • $.dam.explore.filters.defaultCursorConfig.defaultResourceConfig

Exemple: Given user has chosen a context mapping to cursor “activeCursor” and resource “activeResource”, the application will load first existing search bar config from the following paths:

  • $.dam.explore.filters.activeCursor.activeResource

  • $.dam.explore.filters.activeCursor.defaultResourceConfig

  • $.dam.explore.filters.defaultCursorConfig.activeResource

  • $.dam.explore.filters.defaultCursorConfig.defaultResourceConfig

Configuring a search bar

From a configuration perspective, a search bar is defined by an object with following properties:

  • hideSide: Boolean - Defines if a side search should be displayed

  • filters: Array<SearchItem> - Defines the items that are used as search entries. Each item will at that level will reflect either:

    • A button in the search bar

    • An entry in the side search (entry must describe a tree field filter)

SearchItem description

A SearchItem can be one of the following:

  • A String reflecting a NamedFilterConfig

  • An ItemFilterConfiguration

  • A GroupFilterConfiguration

NamedFilterConfig description

NamedFilterConfig are named filters configurations. This allows to define Filters once and to re-use them across different contexts.

NamedFilterConfig are defined in $.common.namedFilters. It can be one of:

  • A String reflecting a NamedFilterConfig

  • A String reflecting a field name (as defined in the admin structure area)

  • An ItemFilterConfiguration

  • A GroupFilterConfiguration

ItemFilterConfiguration description

An ItemFilterConfiguration reflects a single filter. It can be defined as:

  • A String representing the field you want to create a filter from. In such case, default behaviour of this filter will be defined base on the field type. This is equivalent to creating a FieldFilterConfig by only specifying the field property:

    Code Block
    languagejson
    "myfieldname"
    // equivalent to
    {
      "field": "myfieldname"
    }

  • An FieldFilterConfig describing the filter.

Note

If ever you define a NamedFilterConfig with the same name as a structure field, you will not be able to access this field only as a String by its name: Otherwise, the application will end in an infinite loop calling the NamedFilterConfig

FieldFilterConfig description

An Object representing a filter for a given field.

Common FieldFilterConfig properties

Property

Type

Default

Description

additional

Boolean

false

When set to true, the field button won’t show by default. User will need to select the field from the + button

class

String

undefined

Allows to add one or more classes to the component

component

String

undefined

Allows to force a component to be used. Usage of this property is discouraged.

constraintKey

String

value of field

Name of the constraint to which this filter applies

customParam

Boolean

false

When set to true, the filter is considered as a custom parameter and sent as such to the REST service

field

String

undefined

The name of the field on which the filter applies

i18n

String

undefined

I18n key to use for the button of the field

label

String

value of resolved i18n if available

field label if i18n not available

The label of the button

Additional FieldFilterConfig properties for Boolean fields

Property

Type

Default

Description

inline

Boolean

false

Shows boolean filter as a Switch

...

Boolean filter when inline is false or undefined

Image Added

Boolean property when inline is true

Additional FieldFilterConfig properties for Date fields

Property

Type

Default

Description

betweenOption

Boolean

false

Adds ability to filter between two dates

operators

Array

[]

Can only define one value: eq, neq, gt, gte, lt or lte

constraintsItems

Array<DateConstraint>

[]

Allows to define “built-in” constraints for searching on the date field:

DateConstraint description

Property

Type

Description

i18n

String

Label of the constraint

constraint

Object

The constraint to apply on the date field

See in v0 config $.common.namedFilters.rightsGroupEndRights for examples

Additional FieldFilterConfig properties for Number fields

Property

Type

Default

Description

operators

Array

["gte", "lte"]

Will use each operator to produce an input