Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Design

...

Filter bar

...

Info

Default Behaviour(s) :

#01 : Top filter bar is displayed on the search results page. Each cursor can have its top filter bar.

#02 : Default top filter bar for all assets cursor is composed of the following filters :

  • Assets

  • Category

  • Campaign

  • Keywords

  • Language

  • Rights

  • People

#03 : Default top filter bar for all videos cursor is composed of the following filters :

  • Category

  • Campaign

  • Keywords

  • Language

  • Rights

  • People

Assets filter

...

Default Behaviour(s) :

The asset’s filter is composed of the following information :

...

  • Section name : Type

    • Option type : Multiple selection

    • Option Values : Values are automatically generated from technical assets’s data available

  • Section name : Orientation

    • Option type : Multiple selection

    • Option Values : Landscape, Portrait, Square

  • Section name : Size

    • Type : Number field

    • Field : Width, Height

  • Section name : Dominant colors

    • Type : Multiple selection (colors band)

    • Option Values :

      Image Removed
  • Section name : Color Space

    • Option type : Multiple selection

    • Option Values : Values are automatically generated from technical assets’s data available

  • Section name : Document type

    • Option type : Multiple selection

    • Option Values : Values are automatically generated from technical assets’s data available

  • Section name : File extension

    • Type : Input text

    • Option values : None. Once the user start typing a word, the filter immediately applies.

Keywords filter

...

The Keywords filter is composed of the following information :

...

  • The closed list filter will list all keyword values (exept IA keyword), in a paginated list

  • Search is enabled for looking a specific value

  • Checkboxes will select the value

  • Counts are available by default

Rights filter

...

The Rights filter is composed of the following information :

...

  • Type : Multiple selection

  • Option values :

    • External

    • External but publication

    • Internal

...

Section name : Expiration Date (radio button)

  • Type : Radio Button

  • Option values :

    • Never Expires

    • Expire within a year

    • Expire within a month

    • Expire within a week

    • Between two dates

People filter

...

The people filter is composed of the following information :

...

  • Type : Radio button (currently working with multiple selection)

  • Option values :

    • With People

    • Without People

...

Section Name : Age

  • Type : Multiple selection

  • Option values :

    • Baby

    • Children

    • Adults

    • Seniors

Category filter

...

The Category filter is composed of the following information :

...

  • Type : Thesaurus, single selection

  • Trees and thesaurus will list all values by default

  • Search is activated by default

  • Option values :

    • Category 1

    • Category 2

      • Category 2.1

      • Category 2.2

    • Category 3

    • Category 4

      • Category 4.1

      • Category 4.2

Campaign filter

...

The Campaign filter is composed of the following information :

...

  • Type : Thesaurus, single selection

  • Option values :

    • Campaign 1

    • Campaign 2

      • Campaign 2.1

      • Campaign 2.2

    • Campaign 3

    • Campaign 4

      • Campaign 4.1

      • Campaign 4.2

Language

...

The Language filter is composed of the following information :

...

  • Type : Multiple selection

  • Option values :

    • English

    • French

    • Deutsch

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 referencing a NamedFilterConfig

  • An ItemFilterConfig

  • A GroupFilterConfig

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 ItemFilterConfig

  • A CustomConstraintFilterConfig

  • A GroupFilterConfig

ItemFilterConfig description

An ItemFilterConfig 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. If not provided, the filter will be resolved as a CustomConstraintFilterConfig

...

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

...

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

Additional FieldFilterConfig properties for Relationship fields

...

Property

...

Type

...

Default

...

Description

...

tree

...

boolean

...

Resolved from the field referenced resource

...

Allows to force not using a tree filter for a tree field.

Before resolving a relationship filter, the application will by default discover if the field is a tree relationship. It is possible to force the application NOT to use a tree filter for a tree field

It is NOT possible to force the application to use a tree filter for a non-tree relationship.

Additional FieldFilterConfig for non tree Relationship fields

...

Property

...

Type

...

Default

...

Description

...

aggregates

...

string

...

One of "filter", "attenuate", "off"

Defines how aggregates should be used

filter -> Removes values with no matches

attenuate -> Discourage use of values with no matches

off ->Don't do anything

...

cursor

...

string | Object

...

{}

...

Name of the cursor, or cursor definition to use for displaying possible relationship values.

If an empty object, an anonymous cursor is created based on the field’s related resource

...

maxDisplayedItem

...

number

...

60

...

Max number of displayed items

...

operators

...

Array

...

If the field is a child, ["in"]

If the field is a childmultiple,

["contains"]

...

The operator to use for the filter

...

search

...

number

...

25

...

Enable searching when number of possible values reaches this value

Additional FieldFilterConfig for tree Relationship fields

...

Property

...

Type

...

Default

...

Description

...

inTopPanel

...

boolean

...

false

...

Allows to display

...

layout

...

string

...

""

...

Allows to use an alternate layout.
"folder" will use a folder layout

...

operators

...

Array

...

["dof"]

["in"] if layout is "folder"

...

The operator to use for the filter

...

side

...

boolean

...

false

...

Allows to move the filter to the side of the search bar

...

sideDefault

...

boolean

...

false

...

Allows to define the default filter to use in the side panel when multiple are available

...

tree

...

string | Object

...

{}

...

Name of the tree, or tree definition to use for displaying possible relationship values.

If an empty object, an anonymous tree is created based on the field’s related resource

...

Additional FieldFilterConfig for tree String fields

...

Property

...

Type

...

Default

...

Description

...

operators

...

Array

...

["contains"]

...

Will use each operator to produce an input

CustomConstraintFilterConfig description

CustomConstraintFilterConfig allows to define a filter that relies on filters applying to multiple fields.

...

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

...

constraint

...

Object

...

undefined

...

The filter’s constraint.

...

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

GroupFilterConfig description

A GroupFilterConfig allows to group multiple ItemFilterConfig or GroupFilterConfig together.

For easier configuration, a GroupFilterConfig can de defined as a simple Array, where:

  • The first item in the array is either:

    • a string (the value is considered to be an i18n key

    • an Array<string> where

      • first item is an i18n key

      • second item is a css selector used for displaying the icon

    • an Object

    • null

  • Other items are all of type SearchItem

On such configuration, this array is transformed by the application into a GroupFilterConfig object:

Code Block
["some.key", "item1", "item2"]

is equivalent to:

Code Block
{
  "i18n": "some.key",
  "config": ["item1", "item2"]
}
Code Block
[{...props}, "item1", "item2"]

is equivalent to:

Code Block
{
  ...props,
  "config": ["item1", "item2"]
}

Code Block
[["some.key", "far fa-cog"], "item1", "item2"]

is equivalent to:

Code Block
{
  "i18n": "some.key",
  "icon": "far fa-cog",
  "config": ["item1", "item2"]
}

Code Block
[null, "item1", "item2"]

is equivalent to:

Code Block
{
  "config": ["item1", "item2"]
}

GroupFilterConfig properties

...

Property

...

Type

...

Default

...

Description

...

i18n

...

string

...

undefined

...

The i18n key of the group name

...

icon

...

string

...

""

...

The icon for the group button

...

tabs

...

Array | Object

...

undefined

...

The GroupFilterConfig will use a GroupTabWrapper if this property exists. Otherwise, GroupWrapper is used

GroupTabWrapperadditional properties

A tabs property can be provided to define how to organise , items within the groups.

Passing tabs as an Array

Use the array syntax for static tabs. Each item within the tabs array should be an object with following properties:

...

Property

...

Type

...

Default

...

Description

...

title

...

string

...

undefined

...

The i18n key of the tab name

...

content

...

NamedFilterConfig

...

undefined

...

The content of the tab

Passing tabs as an Object

Use the object syntax if you want to generate the tabs as values of a filter. On such circumstance, tabs should be an object with following properties:

...

Property

...

Type

...

Default

...

Description

...

titles

...

FieldFilterConfig | string

...

undefined

...

A FieldFilterConfig or a reference to a named one

This FieldFilterConfig must be a non tree relationship filter, and must be extended with a keyCode property which is the property name from the FieldFilterConfig underlying cursor that will be used to map title with tab content

...

content

...

Record<string, NamedFilterConfig>

...

undefined

...

The content of the tab. Each key should be the value of the keyCode property. Value is the content of the tab.

GroupWrapper additional properties

...

Property

...

Type

...

Default

...

Description

...

constraintPrefix

...

string

...

null

...

When defined, allows to group constraints from nested configs with logical operators

...

horizontal

...

bBoolean

...

false

...

Asset filter

...

Folder filter

...

Collection & Keywords

...

Rights

...

People

...

How it works

Top filter bar displays on the search page.

Each universe menu have its own filters. If no filters have been configured for a universe menu, default configuration is applied.

Starter kit comes with these filters which correspond to the default configuration (but with no data) :

  • Assets : This filter rely on the “assetnature”object content to display this filter, and on automatic metadata extraction setup in the Understanding the default asset structure.

  • Folder

  • Collection

  • Keywords

  • Languages

  • Rights

  • People

Available filters

Filters can be configured at project level for each universe menu.

Additional filters can be hidden behind the “plus” icon :

...

Multiple filters can be grouped into a single filter entry :

...

Available filters for your DAM :

Standard configuration

The filters are manageable from an easy-to-use, out-of-the-box settings interface provided with starter kit from the 2023.1.0 WEDIA release.

➡️ More information

Advanced configuration for developers

Configure the search bar for a given context

Search bars can be configured per universe menu and resource. Make sure to identify the appropriate configuration entry to update it.

Additional filters can be hidden behind the “plus” icon :

...

Multiple filters can be grouped into a single filter entry :

...

See https://crossmedia.atlassian.net/wiki/spaces/WD/pages/2148532225/Search+filters+advanced+description#Resolving-the-search-bar-to-use-for-a-context for detailed explanations.

Add a single field filter

Adding a single field filter is done by adding a filter entry in the active filters context.