Constructor
new SearchPanel(options)
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Methods
(static) getMergedSections(searchform, newSections, addIfNotPresentopt) → {Object}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
searchform |
Object | |||
newSections |
Object | |||
addIfNotPresent |
boolean |
<optional> |
false
|
Whether new section, if not present in searchform, should be added. |
Returns:
- Merged Sections
- Type
- Object
addToolbarItem()
Adds commands to toolbar.
applyCustomization()
Applies customization associated with search on searchform options.
applySearchCriteriaOnObjectData(Object) → {boolean}
Applies search criteria on object data and return true of object data matches with search criteria
Parameters:
| Name | Type | Description |
|---|---|---|
Object |
object | Data |
Returns:
whether object data matches the search criteria
- Type
- boolean
checkDataMatches(Search, value) → {boolean}
Evaluates the value against the single search criterion and return true if value matches the criterion
Parameters:
| Name | Type | Description |
|---|---|---|
Search |
object | criterion |
value |
string | against which search criterion should be applied |
Returns:
whether value matches the criterion
- Type
- boolean
close()
decorateSearchConfig(searchForm)
Parameters:
| Name | Type | Description |
|---|---|---|
searchForm |
destroy()
emit(event, dataopt)
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
event |
Object | Event to be emitted |
||
data |
Object |
<optional> |
{}
|
data emitted with event |
getSearchForm() → {*|null}
Returns:
- Type
- * | null
getSearchFormProps() → {Object}
Returns searchFormProps json object.
Returns:
searchFormProps object
- Type
- Object
getToolbar() → {Object}
Returns toolbar json object from save search toolbar.
Returns:
toolbar object
- Type
- Object
initializeToolbar()
Initialize toolbar for this search panel and adds save and load search commands.
isOpen() → {boolean}
Returns:
- Type
- boolean
off(event, handler)
Parameters:
| Name | Type | Description |
|---|---|---|
event |
Object | Event to be removed |
handler |
function | Event handler |
on(event, handler)
Parameters:
| Name | Type | Description |
|---|---|---|
event |
Object | Event to be registered |
handler |
function | Event handler |
onSectionsUpdated(sections)
Parameters:
| Name | Type | Description |
|---|---|---|
sections |
Array.<Object> | array of search form section objects |
open()
registerSearchFormEvents()
Registers events on searchform associated with this searchpanel.
saveCustomization(customization)
Parameters:
| Name | Type | Description |
|---|---|---|
customization |
Object |
setCriteria(criteria)
Sets criteria on the search form.
Parameters:
| Name | Type | Description |
|---|---|---|
criteria |
Object |
setCriteriaAsQueryString(query)
Sets criteria on the search form.
Parameters:
| Name | Type | Description |
|---|---|---|
query |
string | string |
syncFieldValuesAndCounts(fieldUpdates, searchForm)
Synchronizes search form values with the latest field update counts to display the correct facet counts in the search form.
Synchronizing search form values with the latest field update counts are matched against the corresponding field update values, and their counts are updated. Composite values (e.g. "Complete,Release") aggregate the counts of all matching update values. Synchronizing values without a matching update are excluded, while update values not present in the search form are preserved and appended to the result.
Parameters:
| Name | Type | Description |
|---|---|---|
fieldUpdates |
Array.<Object> | The latest field values and counts. |
searchForm |
Object | The configured search form definition. |
toggleVisibility()
updateContentWidth(width, append)
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
width |
|||
append |
false
|
updateSearchFormFields(data)
Parameters:
| Name | Type | Description |
|---|---|---|
data |