src/lib/services/sz-prefs.service.ts
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;
this.prefs.searchResults.prefsChanged.subscribe( (prefs) => { console.log('search results pref change happened.', prefs); })
Properties |
|
Methods |
|
Accessors |
constructor()
|
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. |
Public fromJSONObject | ||||||
fromJSONObject(value: string)
|
||||||
populate values by calling setters with the same names as json keys
Parameters :
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
|
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 :
Returns :
void
|
showOtherData | ||||||
getshowOtherData()
|
||||||
show "other data" in search results
Returns :
boolean
|
||||||
setshowOtherData(value: boolean)
|
||||||
show "other data" in search results
Parameters :
Returns :
void
|
showHowButton | ||||||
getshowHowButton()
|
||||||
show "how" button in search results
Returns :
boolean
|
||||||
setshowHowButton(value: boolean)
|
||||||
show "how" button in search results
Parameters :
Returns :
void
|
showIdentifierData | ||||||
getshowIdentifierData()
|
||||||
show "other data" in search results
Returns :
boolean
|
||||||
setshowIdentifierData(value: boolean)
|
||||||
show "other data" in search results
Parameters :
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 :
Returns :
void
|
showMatchKeys | ||||||
getshowMatchKeys()
|
||||||
show "match keys" in search results.
Returns :
boolean
|
||||||
setshowMatchKeys(value: boolean)
|
||||||
show "match keys" in search results.
Parameters :
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 :
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 :
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 :
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 :
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 :
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 :
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 :
Returns :
void
|