File

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

Description

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

Example :
this.prefs.searchForm.allowedTypeAttributes = ['SSN_NUMBER','DRIVERS_LICENSE_NUMBER'];
Example :
this.prefs.searchResults.prefsChanged.subscribe( (prefs) => { console.log('search form pref change happened.', prefs); })

Extends

SzSdkPrefsBase

Index

Properties
Methods
Accessors

Constructor

constructor()

Properties

jsonKeys
Type : []
Default value : [ 'rememberLastSearches', 'disableSearchHistory', 'allowedTypeAttributes', 'savedSearches', 'searchHistory' ]

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

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.

typemap
Type : object
Default value : {}

Methods

Public fromJSONObject
fromJSONObject(value: string)

the search form prefs contain a folio collection that automagically update when a user executes a search. Because of this additional functionality the usual fromJSONObject needs to perform some special logic to initialize the prefs from JSON like create class instances etc.

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

rememberLastSearches
getrememberLastSearches()

remember last X searches in autofill.

Returns : number
setrememberLastSearches(value: number)

remember last X searches in autofill.

Parameters :
Name Type Optional
value number No
Returns : void
disableSearchHistory
getdisableSearchHistory()

whether or not to disable search form history drop downs.

Returns : boolean
setdisableSearchHistory(value: boolean)

whether or not to disable search form history drop downs.

Parameters :
Name Type Optional
value boolean No
Returns : void
savedSearches
getsavedSearches()

get list of last searches performed.

setsavedSearches(value: SzSearchParamsFolio[])

update list of last searches performed.

Parameters :
Name Type Optional
value SzSearchParamsFolio[] No
Returns : void
searchHistory
getsearchHistory()

get list of last searches performed.

setsearchHistory(value: SzSearchHistoryFolio)

update list of last searches performed.

Parameters :
Name Type Optional
value SzSearchHistoryFolio No
Returns : void
allowedTypeAttributes
getallowedTypeAttributes()

the allowed identifier types to show in the identifier pulldown

Returns : string[]
setallowedTypeAttributes(value: string[])

the allowed identifier types to show in the identifier pulldown

Parameters :
Name Type Optional
value string[] No
Returns : void

results matching ""

    No results matching ""