arlas-web-contributors / ResultListContributor
Class: ResultListContributor
This contributor works with the Angular ResultListComponent of the Arlas-web-components project. 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.
Extends
Contributor
Constructors
new ResultListContributor()
new ResultListContributor(
identifier
,collaborativeSearcheService
,configService
,collection
):ResultListContributor
Build a new contributor.
Parameters
identifier
string
Identifier of contributor.
collaborativeSearcheService
CollaborativesearchService
Instance of CollaborativesearchService from Arlas-web-core.
configService
ConfigService
Instance of ConfigService from Arlas-web-core.
collection
string
Returns
Input
of Angular ResultListComponent, FieldsConfiguration.
Overrides
Contributor.constructor
Defined in
src/contributors/ResultListContributor.ts:332
Properties
actionToTriggerOnClick
actionToTriggerOnClick:
Action
[] =[]
List of actions, from all the contributors of the app, which we could trigger on click in the ResultListComponent.
Defined in
src/contributors/ResultListContributor.ts:270
cacheDuration
cacheDuration:
any
Overrides
Contributor.cacheDuration
Defined in
src/contributors/ResultListContributor.ts:308
collaborativeSearcheService
collaborativeSearcheService:
CollaborativesearchService
Inherited from
Contributor.collaborativeSearcheService
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:9
collection
collection:
string
Inherited from
Contributor.collection
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:14
collections
collections:
CollectionAggField
[]
Inherited from
Contributor.collections
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:15
configService
configService:
ConfigService
Inherited from
Contributor.configService
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:8
data
data:
Map
\<string
,ItemDataType
>[]
Data to populate result list, @Input() data of ResultListComponent.
Defined in
src/contributors/ResultListContributor.ts:254
detailedDataRetriever
detailedDataRetriever:
ResultListDetailedDataRetriever
Instance of DetailedDataRetriever class, @Input() detailedDataRetriever of ResultListComponent.
Defined in
src/contributors/ResultListContributor.ts:266
dropDownMapValues
dropDownMapValues:
Map
\<string
,Observable
\<string
[]>>
List of values to select mapped to each field represented on the resultList. The list of values to select is wrapped in an Observable.
Defined in
src/contributors/ResultListContributor.ts:262
endCollaborationEvent
endCollaborationEvent:
Subject
\<CollaborationEvent
>
Inherited from
Contributor.endCollaborationEvent
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:16
fetchState
fetchState:
object
Indicates whether the contributor reached the start/end page
endListDown
endListDown:
boolean
=false
endListUp
endListUp:
boolean
=true
Defined in
src/contributors/ResultListContributor.ts:294
fieldsConfiguration
fieldsConfiguration:
FieldsConfiguration
A configuration object that allows to set id field, title field, fields used in tooltip/icons and urls to images & thumbnails
Defined in
src/contributors/ResultListContributor.ts:277
fieldsList
fieldsList:
object
[] =[]
List of columns of the table, @Input() fieldsList of ResultListComponent.
columnName
columnName:
string
dataType
dataType:
string
fieldName
fieldName:
string
useColorService?
optional
useColorService:boolean
Defined in
src/contributors/ResultListContributor.ts:258
filter
filter:
object
={}
A filter that is taken into account when fetching list items and that is not included in the global collaboration.
Defined in
src/contributors/ResultListContributor.ts:298
filtersMap
filtersMap:
Map
\<string
,ItemDataType
>
Defined in
src/contributors/ResultListContributor.ts:272
geoOrderSort
geoOrderSort:
string
=''
geoSort parameter of the list.
Defined in
src/contributors/ResultListContributor.ts:306
highlightItems
highlightItems:
Set
\<string
>
Defined in
src/contributors/ResultListContributor.ts:310
identifier
identifier:
string
Inherited from
Contributor.identifier
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:7
includeMetadata
includeMetadata:
string
[]
List of metadata fields to include in the search query
Defined in
src/contributors/ResultListContributor.ts:282
isDataUpdating
isDataUpdating:
boolean
Inherited from
Contributor.isDataUpdating
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:13
linkedContributorId
linkedContributorId:
string
Inherited from
Contributor.linkedContributorId
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:17
maxPages
maxPages:
any
Maximum number of pages that the contributor fetches. Default to 3.
Defined in
src/contributors/ResultListContributor.ts:290
pageSize
pageSize:
any
Number of items in a page of the list. Default to 100.
Defined in
src/contributors/ResultListContributor.ts:286
sort
sort:
string
=''
comma seperated field names that sort the list. Order matters.
Defined in
src/contributors/ResultListContributor.ts:302
Accessors
updateData
Get Signature
get updateData():
boolean
Returns
boolean
whether the data of contributor should be updated.
Set Signature
set updateData(
value
):void
Parameters
value
boolean
set if the data of contributor should be updated or not.
Returns
void
Inherited from
Contributor.updateData
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:49
Methods
addAction()
addAction(
action
):void
Method to add Action in actionToTrigger
Parameters
action
action to add
Returns
void
Defined in
src/contributors/ResultListContributor.ts:564
computeData()
computeData(
hits
):Map
\<string
,ItemDataType
>[]
Parameters
hits
Hits
Returns
Map
\<string
, ItemDataType
>[]
Overrides
Contributor.computeData
Defined in
src/contributors/ResultListContributor.ts:827
downloadItem()
downloadItem(
elementidentifier
):void
Download item information as json
Parameters
elementidentifier
Returns
void
Defined in
src/contributors/ResultListContributor.ts:524
fetch$()
fetch$(
size
,fields
,filter
):Observable
\<Hits
>
Parameters
size
number
fields
string
[]
filter
Filter
Returns
Observable
\<Hits
>
Defined in
src/contributors/ResultListContributor.ts:792
fetchData()
fetchData(
collaborationEvent
):Observable
\<Hits
>
Parameters
collaborationEvent
CollaborationEvent
Returns
Observable
\<Hits
>
Overrides
Contributor.fetchData
Defined in
src/contributors/ResultListContributor.ts:815
geoSort()
geoSort(
lat
,lng
,sortById
?):void
Method sorts by geo-distance to a given geo-point
Parameters
lat
number
latitude of the geo-point
lng
number
longitude of the geo-point
sortById?
boolean
whether to add a sort by id to the geosort or not
Returns
void
Defined in
src/contributors/ResultListContributor.ts:624
getAllFields()
getAllFields():
ExportedColumn
[]
Returns the current columns/details/idfieldname/urltemplates of thumbnail and quicklooks
Returns
ExportedColumn
[]
Defined in
src/contributors/ResultListContributor.ts:441
getConfigValue()
getConfigValue(
key
):any
Parameters
key
string
a key
defined in configuration.
Returns
any
value of the key
in configuration.
Inherited from
Contributor.getConfigValue
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:34
getFilterDisplayName()
getFilterDisplayName():
string
Returns
string
Pretty name of contribution.
Overrides
Contributor.getFilterDisplayName
Defined in
src/contributors/ResultListContributor.ts:551
~~getMoreData()~~
getMoreData(
startFrom
,sortById
?):void
Method called to load more rows into the list.
Parameters
startFrom
number
It corresponds to the number of times this method is being called. It's used to calculate an offset to get the following items
sortById?
boolean
Whether to add a sortById to the cuurent sort/geosort
Returns
void
Deprecated
Use getPage
method instead
Defined in
src/contributors/ResultListContributor.ts:712
getName()
getName():
string
Returns
string
name of contributor set in configuration.
Inherited from
Contributor.getName
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:41
getPackageName()
getPackageName():
string
Returns
string
Package name for the configuration service.
Overrides
Contributor.getPackageName
Defined in
src/contributors/ResultListContributor.ts:557
getPage()
getPage(
reference
,whichPage
):void
Get the previous/following page.
Parameters
reference
Map
\<string
, ItemDataType
>
the last/first hit returned in the list and from which next/previous data is fetched.
whichPage
PageEnum
Whether to fetch next or previous page.
Returns
void
Defined in
src/contributors/ResultListContributor.ts:734
isMyLinkedContributorCollaboration()
isMyLinkedContributorCollaboration(
collaborationEvent
):boolean
Parameters
collaborationEvent
CollaborationEvent
Returns
boolean
Inherited from
Contributor.isMyLinkedContributorCollaboration
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:37
isMyOwnCollaboration()
isMyOwnCollaboration(
collaborationEvent
):boolean
Parameters
collaborationEvent
CollaborationEvent
Returns
boolean
Inherited from
Contributor.isMyOwnCollaboration
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:36
isUpdateEnabledOnOwnCollaboration()
isUpdateEnabledOnOwnCollaboration():
boolean
Returns
boolean
Overrides
Contributor.isUpdateEnabledOnOwnCollaboration
Defined in
src/contributors/ResultListContributor.ts:436
removeAction()
removeAction(
action
):void
Method to remove Action in actionToTrigger
Parameters
action
action to remove
Returns
void
Defined in
src/contributors/ResultListContributor.ts:573
resolveDropDownButNot()
resolveDropDownButNot(
column
):void
Parameters
column
Returns
void
Defined in
src/contributors/ResultListContributor.ts:947
setData()
setData(
listResult
):Map
\<string
,ItemDataType
>[]
Parameters
listResult
Map
\<string
, ItemDataType
>[]
Returns
Map
\<string
, ItemDataType
>[]
Overrides
Contributor.setData
Defined in
src/contributors/ResultListContributor.ts:919
setFilters()
setFilters(
filterMap
):void
Method call when emit the output setFiltersEvent
Parameters
filterMap
Map
\<string
, ItemDataType
>
filter params
Returns
void
Defined in
src/contributors/ResultListContributor.ts:645
setHighlightItems()
setHighlightItems(
items
):void
Parameters
items
string
[]
Returns
void
Defined in
src/contributors/ResultListContributor.ts:517
setName()
setName(
name
):void
Parameters
name
string
Returns
void
set the name of the contributor
Inherited from
Contributor.setName
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:45
setSelection()
setSelection(
listResult
,collaboration
):any
Parameters
listResult
Map
\<string
, ItemDataType
>[]
collaboration
Collaboration
Returns
any
Overrides
Contributor.setSelection
Defined in
src/contributors/ResultListContributor.ts:924
sortColumn()
sortColumn(
sortParams
,sortById
?):void
Sorts the list according to the given sort parameters. If sortParams
is not defined, and sortById=true
then the list is sorted by
id (fieldsConfiguration.idFieldName
)
Parameters
sortParams
sort parameters. They include on which field (column) to sort and in which direction (ascending, descending)
fieldName
string
sortDirection
SortEnum
sortById?
boolean
whether to add a sort by id (fieldsConfiguration.idFieldName
) to the sorted column
Returns
void
Defined in
src/contributors/ResultListContributor.ts:585
updateFromCollaboration()
updateFromCollaboration(
collaborationEvent
):void
Parameters
collaborationEvent
CollaborationEvent
Returns
void
Inherited from
Contributor.updateFromCollaboration
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:62
getJsonSchema()
static
getJsonSchema():Object
Returns
Object
Defined in
src/contributors/ResultListContributor.ts:513