Tags

Tags component is used in Event, Planning, Assignment and Full package to control which concept types you are able to add. Each concept type has it's own section in the config.

A concept type can be rendered in two different ways in the tags component, as a search or as a select. This is controlled by the "type"-key and affects how they are rendered. The following images shows topic rendered as a search and channel rendered as a select.

Configuration keys

Key

Description

type

Controls how to render the Tags component. "select" or "search".

title

This text is used as label in the top of the component. Also used on the add button and as a placeholder when configured as search.

icon

The icon shown on the concepts. Used only when configured as search.

Config for icon output can be found here: http://styleguide.navigacloud.com/3.0.0/index.html?path=/docs/atoms-icon--example

enableHierarchy

If the search list item should display the hierarchy of the concept. Only works in conjunction with Advanced concept settings > Store relation information in document

appendDataToLink

If the hierarchy data should be stored as sublink to the link.

searchOnFocus

Determines if an auto wildcard search should be triggered when focusing the search input. Used only when configured as search.

associatedWidth

Determines if this concept type should be associated with another concept type.

selectLabel

Label shown inside select component when something is selected. Used only when configured as select.

selectPlaceholder

Placeholder shown in select component when nothing is selected. Used only when configured as select.

search

search is an object containing all keys related to searching for the items shown in the component. See example config below.

Keys in search object

sortBy

OC property to do search sort on.

type

Specific type of the concept "ConceptImTypeFull" in OC.

allowedConceptStatuses

An array containing status filters when searching. If empty all statuses are searched for. Targets ConceptStatus property in OC.

limit

Max number of results returned.

customQuery

An "AND" query that will be passed to OC when searching, i.e: NOT ConceptStatus: draft

Example below showing a config where Topic is configured as a search, Channel is configured as a select and Section is configured to be associated with Channel.

{
    "tags": [
        {
            "type": "search",
            "title": "Topic",
            "icon": {
                "name": "tags",
                "weight": "bold"
            },
            "enableHierarchy": false,
            "appendDataToLink": false,
            "searchOnFocus": true,
            "search": {
                "type": "x-im/topic",
                "sortBy": "ConceptNameString",
                "allowedConceptStatuses": []
            }
        },
        {
            "title": "Channel",
            "type": "select",
            "selectLabel": "Main channel",
            "selectPlaceholder": "Set main channel",
            "enableHierarchy": false,
            "appendDataToLink": false,
            "searchOnFocus": true,
            "search": {
                "type": "x-im/channel",
                "sortBy": "ConceptNameString",
                "allowedConceptStatuses": [],
                "limit": 15
            }
        },
        {
            "type": "search",
            "title": "Section",
            "icon": {
                "name": "tags",
                "weight": "bold"
            },
            "enableHierarchy": false,
            "appendDataToLink": false,
            "searchOnFocus": true,
            "associatedWith": "x-im/channel",
            "search": {
                "sortBy": "ConceptNameString",
                "type": "x-im/section",
                "allowedConceptStatuses": []
            }
        }
    ]
}