Extends the sortable paginated list to
handle search specific data.
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
- alfresco/lists/AlfSortablePaginatedList
Members
-
_resetVars :string[]
-
The vars and terms showing on the url hash that should be reset for a new search.
Type:
- string[]
- Default Value:
- ["facetFilters", "query"]
- Source:
-
additionalQueryParameters :object
-
An optional map of additional key/value pairs of query parameters to apply to all searches.
Type:
- object
- Since:
- 1.0.96
- Default Value:
- null
- Source:
-
cssRequirements :object[]
-
An array of the CSS files to use with this widget.
Type:
- object[]
- Default Value:
- [{cssFile:"./css/AlfSearchList.css"}]
- Source:
-
facetFields :string
-
The facet fields to include in searches. This is updated by the onIncludeFacetRequest function.
Type:
- string
- Source:
-
facetFilters :object
-
The filters of facets that should be applied to search queries. This can either be configured when the widget is created or can be set via the browser hash fragment.
Type:
- object
- Default Value:
- null
- Source:
-
hideFacets :boolean
-
This indicates whether or not to hide or display the included facets details when results are loaded. This is initialised to true, but will be changed to false if any facets are requested to be included in the page.
Type:
- boolean
- Default Value:
- true
- Source:
-
i18nRequirements :object[]
-
An array of the i18n files to use with this widget.
Type:
- object[]
- Default Value:
- [{i18nFile: "./i18n/AlfSearchList.properties"}]
- Source:
-
itemKeyProperty :string
-
Overrides the mixed in default to set a property more applicable to search APIs.
Type:
- string
- Since:
- 1.0.41
- Default Value:
- "nodeRef"
- Source:
-
resultsCountMessage :string
-
The message key to use when displaying the number of results found.
Type:
- string
- Since:
- 1.0.70
- Default Value:
- "faceted-search.results-menu.results-found-patch"
- Source:
-
searchTerm :string
-
The current term to search on
Type:
- string
- Source:
-
selectedScope :string
-
The initially selected scope. This should either be "repo", "all_sites" or the shortname of a specific site.
Type:
- string
- Default Value:
- "repo"
- Source:
-
spellcheck :boolean
-
Include spell checking in search requests.
Type:
- boolean
- Default Value:
- true
- Source:
-
totalResultsProperty :string
-
Overrides the default value to use the property expected when using the search API.
Type:
- string
- Since:
- 1.0.32
- Default Value:
- "numberFound"
- Source:
-
updateInstanceValues :boolean
-
Overrides the inherited default to ensure that instance values should be updated from the hash. This only appliees when useHash is configured to be true.
Type:
- boolean
- Default Value:
- true
- Source:
Methods
-
_cleanResettableHashTerms(currHash)
-
Clean resettable hash terms based on resetVars array.
Parameters:
Name Type Description currHash
object An object containing current hash values - Source:
Returns:
boolean -
_cleanResettableVars()
-
Clean resettable variables based on resetVars array.
- Source:
-
handleSpellCheck(payload)
-
This function can be called to handle spell check results. If a search term did not match to any results or similar search terms yield better results then the search API may either have carried out the alternative search or has provided some alternative suggestions to search for. This function checks the search result payload and publishes on the "ALF_SPELL_CHECK_SEARCH_TERM" and "ALF_SPELL_CHECK_SEARCH_SUGGESTIONS" topics respectively with that data.
Parameters:
Name Type Description payload
object The payload containing the search result data - Source:
-
loadData()
-
Processes all the current search arguments into a payload that is published to the Search Service to perform the actual search request
- Source:
-
onAdvancedSearch(payload)
-
Handle advanced search requests.
Parameters:
Name Type Description payload
object The details of what to search for. - Source:
-
onApplyFacetFilter(payload)
-
This function is called as a result of publishing on the "ALF_APPLY_FACET_FILTER" topic. It will update the current filters object with a new entry for the request filter.
Parameters:
Name Type Description payload
object The details of the facet filter to apply - Source:
-
onDataLoadSuccess(response, originalRequestConfig)
-
Handles successful calls to get data from the repository.
Parameters:
Name Type Description response
object The response object originalRequestConfig
object The configuration that was passed to the serviceXhr function - Source:
-
onHashChanged(payload)
-
If useHash has been set to true then this function will be called whenever the browser hash fragment is modified. It will update the attributes of this instance with the values provided in the fragment.
Parameters:
Name Type Description payload
object - Source:
-
onIncludeFacetRequest(payload)
-
Parameters:
Name Type Description payload
object The details of the facet to include - Source:
-
onReloadData(payload)
-
Reloads the data by making a search using the currently set search attributes. Typically called following actions
Parameters:
Name Type Description payload
object The payload of the publication requesting the reload - Source:
-
onRemoveFacetFilter(payload)
-
This function is called as a result of publishing on the "ALF_REMOVE_FACET_FILTER" topic. It will update the current filters object to delete the supplied filter
Parameters:
Name Type Description payload
object The details of the facet filter to apply - Source:
-
onRequestFinished()
-
Extends the inherited function to reissue a search request if additional search data was provided whilst a request was in-progress.
- Source:
-
onScopeSelection(payload)
-
Parameters:
Name Type Description payload
object The details of the scope selected. - Source:
-
onSearchTermRequest(payload)
-
Updates the current search term. Note that this is not currently sufficient for setting complete search data (such as facets, filters, sort order, etc) so this will need to be iterated on as needed.
Parameters:
Name Type Description payload
object The details of the search term to set - Source:
-
postMixInProperties()
-
Extends the inherited function
- Source:
-
resetResultsList()
-
Clear Old results from list & reset counts.
- Source:
-
setDisplayMessages()
-
Overrides the inherited function to set search specific messages.
- Source:
-
setupSubscriptions()
-
Extends the inherited function to subscribe to search specific topics.
- Source:
-
updateFilterHash()
-
Performs updates to the url hash as facets are selected and de-selected
- Source:
Fires:
- event:ALF_NAVIGATE_TO_PAGE