File

core/dynamic-component/dynamic-component-alert-aggregator.ts

Index

Properties
Methods

Constructor

constructor(alerts: DynamicComponentAlert[])
Parameters :
Name Type Optional
alerts DynamicComponentAlert[] No

Properties

alertGroups
Type : Array<literal type>

Array containing grouped alerts with data necessary to display alerts and whether alert group should be dismissible.

anyAlertExists$
Type : Observable<boolean>

Methods

addAlerts
addAlerts(alerts: DynamicComponentAlert[])

Adds alert to aggregator.

Parameters :
Name Type Optional Description
alerts DynamicComponentAlert[] No

List of alerts that should be added to aggregator.

Returns : void
clear
clear(type?: AlertType)

Remove alerts in group by provided alert type or removes all alerts when no param is provided.

Parameters :
Name Type Optional Description
type AlertType Yes

Type of alerts group that should be removed.

Returns : void
dismissAlertGroup
dismissAlertGroup(alertType: AlertType, isPermanent)

Removes alerts in group due to dismissal dismissStrategy and sets userDismissalChoice property. If group has dismissal strategy declared as TEMPORARY_OR_PERMANENT, its userDismissalChoice property can be set to REMIND_ALLOWED or REMIND_DISALLOWED depending on parameter.

Parameters :
Name Type Optional Default value Description
alertType AlertType No

Type of alerts group that should be dismissed.

isPermanent No false
Returns : void
setAlertGroupDismissStrategy
setAlertGroupDismissStrategy(alertType: AlertType, dismissStrategy: DismissAlertStrategy)

Sets possibility of alert to be dismissed in specific way.

Parameters :
Name Type Optional Description
alertType AlertType No

Type of alerts for which the dismissal strategy should be set.

dismissStrategy DismissAlertStrategy No

Type of dismissal strategy that will be set for the alert type.

Returns : void
toJSON
toJSON()

Alert aggregator as a widget property should not be serialized and stored in database.

Returns : any

results matching ""

    No results matching ""