src/lib/services/sz-prefs.service.ts
preferences bus base class. provides common methods for publishing and responding to value changes. bulk-set and get.
used by SzSearchFormPrefs, SzSearchResultsPrefs, SzEntityDetailPrefs, SzGraphPrefs
Properties |
|
Methods |
|
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 |
jsonKeys |
Type : []
|
Default value : []
|
the keys of member setters or variables in the object to output in json, or to take as json input |
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. |
typemap |
Type : object
|
Default value : {}
|
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
|