Septima.Search.DetailsHandlerDef
Decorates a result
Options
Name | Type | Mandatory | Default value | Description |
---|---|---|---|---|
proxy | Object | Indites whether a proxy for the result should be used | ||
proxy.item | Object | Describes how to present the found proxy | ||
proxy.item.label | Object | |||
proxy.item.type | Object | result | result | |
proxy.item.show | Object | true | should the found proxy be shown | |
proxy.result | Object | Yes | Describes how to find the proxyResult | |
proxy.result.searcher | Object | Yes | which searcher to use | |
proxy.result.typeId | Object | Yes | which type of result | |
proxy.result.id | Object | Yes | [mainresult.type->] id of proxy result. "$." is replaced with result.data property values (see examples) | |
more | boolean | true | Indicates whether the details provided should be considered an extension of the result rather than related information (Layouts may show "more" handlers at the top without specific heading) | |
targets | boolean | [{source: '', typeId: ''} | Arrayof Combinations of source/typeIds that are supported by the handler | |
buttonText | string | "" | Title of the handler (Layouts may show the title as tab caption) | |
buttonImage | string | icons.infoGrey | Url to icon of the handler (Layouts may show the image as part of the tab caption) | |
meta | string | Description (e.g metadata of output) of the handler (A Detail Itens) | ||
logger | Object | |||
logLevel | string | |||
id | string | random unique string | ||
isApplicableFunction | function | check against options.targets | function, (result)=>, return boolean indicating whether the result is handled | |
handler | function | Yes | function, (result)=>, return detail items | |
meta | function | Yes | detailItem, som repræsenterer metadata |
Examples
Usage
YAML Declaration:
dawa:
_type: Septima.Search.DawaSearcher
_options:
minimumShowCount: 3
resultTypes:
adresse:
singular: Adresse
plural: Adresser
iconURI: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTQsOUgxOS41TDE0LDMuNVY5TTcsMkgxNUwyMSw4VjIwQTIsMiAwIDAsMSAxOSwyMkg3QzUuODksMjIgNSwyMS4xIDUs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E1LjU0TDE4LjA5LDE1LjY1QzE4LjA4LDE1Ljc1IDE4LjA1LDE1Ljc2IDE4LDE1Ljc4SDE3Ljk2TDE3Ljc3LDE1LjhDMTcuMzEsMTUuOCAxNi42LDE1LjYxIDE1Ljg3LDE1LjI5QzE1Ljk2LDE1LjE5IDE2LDE1LjE5IDE2LjEsMTUuMTlDMTcuNSwxNS4xOSAxNy45LDE1LjQ0IDE4LDE1LjU0TTguODMsMTdDOC4xOCwxOC4xOSA3LjU5LDE4Ljg1IDcuMTQsMTlDNy4xOSwxOC42MiA3LjY0LDE3Ljk2IDguMzUsMTcuMzFMOC44MywxN00xMS44NSwxMC4wOUMxMS42Miw5LjE5IDExLjYxLDguNDYgMTEuNzgsOC4wNEwxMS44NSw3LjkyTDEyLDcuOTdDMTIuMTcsOC4yMSAxMi4xOSw4LjUzIDEyLjA5LDkuMDdMMTIuMDYsOS4yM0wxMS45LDEwLjA1TDExLjg1LDEwLjA5WiIgLz48L3N2Zz4=
detailhandlers:
- _type: Septima.Search.InfoForSognProvider
_options:
more: false
buttonText: Ligger i sogn
proxy:
item:
type: result
label: Ligger i sogn
show: true
result:
searcher:
_ref: $.mysearchers.geosearcher
typeId: sogne
id: $.properties.sogn.kode
YAML Declaration: (SqDetailsHandler fires for results of type produktionsenhed)
cvr:
_type: Septima.Search.DataApi.CvrSearcher
_options:
fetcher:
_type: Septima.Search.DataApi.Fetcher
detailhandlers:
- _type: Septima.Search.SqDetailsHandler
_options:
buttonText: Planer for ejende virksomhed
proxy:
item:
type: result
label: Ejende virksomhed
show: true
result:
searcher:
_ref: $.mysearchers.cvr
typeId: virksomhed
id: produktionsenhed->$.cvrnummer
searchers:
- _ref: "$.mysearchers.planSystemSearcher"