Skip to content

arlas-web-contributors > "contributors/ChipsSearchContributor" > ChipsSearchContributor

Class: ChipsSearchContributor

This contributor must work with SearchContributor and a component to display several chips label from SearchComponent. This class make the brigde between the component which displays the data and the collaborativeSearchService of the Arlas-web-core which retrieve the data from the server.

Hierarchy

Contributor

↳ ChipsSearchContributor

Index

Constructors

Properties

Methods


Constructors

constructor

new ChipsSearchContributor(identifier: string, lastBackspaceBus: Subject<boolean>, collaborativeSearcheService: CollaborativesearchService, configService: ConfigService): ChipsSearchContributor

Overrides Contributor.__constructor

Defined in contributors/ChipsSearchContributor.ts:49

Build a new contributor.

Parameters:

Name Type Description
identifier string Identifier of contributor.
lastBackspaceBus Subject<boolean> bus from searchcomponent properties, send if the input is empty on backspace
collaborativeSearcheService CollaborativesearchService Instance of CollaborativesearchService from Arlas-web-core.
configService ConfigService Instance of ConfigService from Arlas-web-core.

Returns: ChipsSearchContributor


Properties

chipMapData

● chipMapData: Map<string, number> = new Map()

Defined in contributors/ChipsSearchContributor.ts:49

Map of string/number, label/count of all chips, use in input of component


collaborativeSearcheService

● collaborativeSearcheService: CollaborativesearchService

Inherited from Contributor.collaborativeSearcheService

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:8


configService

● configService: ConfigService

Inherited from Contributor.configService

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:7


identifier

● identifier: string

Inherited from Contributor.identifier

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:6


query

● query: string

Defined in contributors/ChipsSearchContributor.ts:45

Global query based on all concatenate chips word


Methods

addWord

addWord(value: string): void

Defined in contributors/ChipsSearchContributor.ts:156

Add a new chip with value and count, set filter.

Parameters:

Name Type Description
value string Label of the chip.

Returns: void


computeData

computeData(data: object): object

Overrides Contributor.computeData

Defined in contributors/ChipsSearchContributor.ts:123

Parameters:

data: object

Name Type
hits Hits
label string

Returns: object


fetchData

fetchData(collaborationEvent: CollaborationEvent): Observable<object>

Overrides Contributor.fetchData

Defined in contributors/ChipsSearchContributor.ts:76

Parameters:

Name Type
collaborationEvent CollaborationEvent

Returns: Observable<object>


getConfigValue

getConfigValue(key: string): any

Inherited from Contributor.getConfigValue

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:24

Parameters:

Name Type Description
key string a `key` defined in configuration.

Returns: any value of the key in configuration.


getFilterDisplayName

getFilterDisplayName(): string

Overrides Contributor.getFilterDisplayName

Defined in contributors/ChipsSearchContributor.ts:143

Returns: string Pretty name of contributor based on query propoerty.


getName

getName(): string

Inherited from Contributor.getName

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:28

Returns: string name of contributor set in configuration.


getPackageName

getPackageName(): string

Overrides Contributor.getPackageName

Defined in contributors/ChipsSearchContributor.ts:149

Returns: string Package name for the configuration service.


removeWord

removeWord(word: string): void

Defined in contributors/ChipsSearchContributor.ts:181

Remove a chip , set filter.

Parameters:

Name Type
word string

Returns: void


setData

setData(data: object): any

Overrides Contributor.setData

Defined in contributors/ChipsSearchContributor.ts:126

Parameters:

data: object

Name Type
hits Hits
label string

Returns: any


setSelection

setSelection(collaboration: Collaboration): any

Overrides Contributor.setSelection

Defined in contributors/ChipsSearchContributor.ts:136

Parameters:

Name Type
collaboration Collaboration

Returns: any


<Static> getJsonSchema

getJsonSchema(): Object

Defined in contributors/ChipsSearchContributor.ts:72

Returns: Object