File

src/lib/services/sz-prefs.service.ts

Description

search results related preferences bus class. used by SzPrefsService to store it's search results related prefs. Should really be used from SzPrefsService context, not on its own.

Example :
this.prefs.searchResults.showOtherData = true;
this.prefs.searchResults.truncateOtherDataAt = 3;
this.prefs.searchResults.truncateIdentifierDataAt =  2;
Example :
this.prefs.searchResults.prefsChanged.subscribe( (prefs) => { console.log('search results pref change happened.', prefs); })

Extends

SzSdkPrefsBase

Index

Properties
Methods
Accessors

Constructor

constructor()

Properties

jsonKeys
Type : []
Default value : [ 'openInNewTab', 'showCharacteristicData', 'showHowButton', 'showIdentifierData', 'showMatchKeys', 'showOtherData', 'truncateRecordsAt', 'truncateOtherDataAt', 'truncateCharacteristicDataAt', 'showEmbeddedGraph', 'showRecordIds', 'linkToEmbeddedGraph', 'truncateIdentifierDataAt' ]

the keys of member setters or variables in the object to output in json, or to take as json input

typemap
Type : object
Default value : { 'openInNewTab': 'boolean', 'showCharacteristicData': 'boolean', 'showHowButton': 'boolean', 'showIdentifierData': 'boolean', 'showMatchKeys': 'boolean', 'showOtherData': 'boolean', 'truncateRecordsAt': 'number', 'truncateOtherDataAt': 'number', 'truncateCharacteristicDataAt': 'number', 'showEmbeddedGraph': 'boolean', 'showRecordIds': 'boolean', 'linkToEmbeddedGraph': 'boolean', 'truncateIdentifierDataAt': 'number' }
Public bulkSet
Type : boolean
Default value : false

during a bulk property set, set this to true to not publish change events on every single value change

Public prefChanged
Type : Subject<literal type>
Default value : new Subject<{name: string, value: any}>()

subject that can be subscribed to for INDIVIDUAL value change notifications.

Public prefsChanged
Type : BehaviorSubject<any>
Default value : new BehaviorSubject<any>(this.toJSONObject())

behavior subject that can be subscribed to for change notifications.

Methods

Public fromJSONObject
fromJSONObject(value: string)

populate values by calling setters with the same names as json keys

Parameters :
Name Type Optional
value string No
Returns : void
Public getPublicPropertiesSchema
getPublicPropertiesSchema()

gets an array of all public json properties and their types

Returns : {}
Public toJSONObject
toJSONObject()

get shallow JSON copy of object state. properties are filtered by members of jsonKeys

Returns : {}
Public toJSONString
toJSONString()

get object state representation as a string

Returns : string

Accessors

openInNewTab
getopenInNewTab()

open entity detail in new tab when link clicked

Returns : boolean
setopenInNewTab(value: boolean)

open entity detail in new tab when link clicked

Parameters :
Name Type Optional
value boolean No
Returns : void
showOtherData
getshowOtherData()

show "other data" in search results

Returns : boolean
setshowOtherData(value: boolean)

show "other data" in search results

Parameters :
Name Type Optional
value boolean No
Returns : void
showHowButton
getshowHowButton()

show "how" button in search results

Returns : boolean
setshowHowButton(value: boolean)

show "how" button in search results

Parameters :
Name Type Optional
value boolean No
Returns : void
showIdentifierData
getshowIdentifierData()

show "other data" in search results

Returns : boolean
setshowIdentifierData(value: boolean)

show "other data" in search results

Parameters :
Name Type Optional
value boolean No
Returns : void
showCharacteristicData
getshowCharacteristicData()

show "attribute data" in search results. ie DOB, favorite cat

Returns : boolean
setshowCharacteristicData(value: boolean)

show "attribute data" in search results. ie DOB, favorite cat

Parameters :
Name Type Optional
value boolean No
Returns : void
showMatchKeys
getshowMatchKeys()

show "match keys" in search results.

Returns : boolean
setshowMatchKeys(value: boolean)

show "match keys" in search results.

Parameters :
Name Type Optional
value boolean No
Returns : void
showRecordIds
getshowRecordIds()

show "record ids" in search results. currently not implemented in view

Returns : boolean
setshowRecordIds(value: boolean)

show "record ids" in search results. currently not implemented in view

Parameters :
Name Type Optional
value boolean No
Returns : void
truncateRecordsAt
gettruncateRecordsAt()

truncate "records" shown before ellipsis in search results. currently not implemented in view

Returns : number
settruncateRecordsAt(value: number)

truncate "records" shown before ellipsis in search results. currently not implemented in view

Parameters :
Name Type Optional
value number No
Returns : void
truncateOtherDataAt
gettruncateOtherDataAt()

truncate "other data" shown before ellipsis in search results.

Returns : number
settruncateOtherDataAt(value: number)

truncate "other data" shown before ellipsis in search results.

Parameters :
Name Type Optional
value number No
Returns : void
truncateCharacteristicDataAt
gettruncateCharacteristicDataAt()

truncate "attribute data" shown before ellipsis in search results.

Returns : number
settruncateCharacteristicDataAt(value: number)

truncate "attribute data" shown before ellipsis in search results.

Parameters :
Name Type Optional
value number No
Returns : void
showEmbeddedGraph
getshowEmbeddedGraph()

show embedded graph component in search results. currently not implemented

Returns : boolean
setshowEmbeddedGraph(value: boolean)

show embedded graph component in search results. currently not implemented

Parameters :
Name Type Optional
value boolean No
Returns : void
linkToEmbeddedGraph
getlinkToEmbeddedGraph()

clicking on search result highlights in embedded graph. currently not implemented

Returns : boolean
setlinkToEmbeddedGraph(value: boolean)

clicking on search result highlights in embedded graph. currently not implemented

Parameters :
Name Type Optional
value boolean No
Returns : void
truncateIdentifierDataAt
gettruncateIdentifierDataAt()

truncate "identifier data" shown before ellipsis in search results.

Returns : number
settruncateIdentifierDataAt(value: number)

truncate "identifier data" shown before ellipsis in search results.

Parameters :
Name Type Optional
value number No
Returns : void

results matching ""

    No results matching ""