Skip to main content

Interface: INotificationService

services.INotificationService

Hierarchy

Table of contents

Properties

Methods

Properties

state

Protected Abstract state: INotification\<any>

Inherited from

Component.state

Defined in

src/react/component.ts:44

Methods

add

add\<T>(items): null | INotificationItem\<T>[]

Add new notification items

Type parameters

Name
T

Parameters

NameType
itemsINotificationItem\<T>[]

Returns

null | INotificationItem\<T>[]

Defined in

src/services/notificationService.ts:14


clear

clear(): void

Clear the notifications

Returns

void

Defined in

src/services/notificationService.ts:32


remove

remove(id): void

Remove the specific notification item by id

Parameters

NameType
idUniqueId

Returns

void

Defined in

src/services/notificationService.ts:19


reset

reset(): void

Reset notifications, this will clear the pending notifications

Returns

void

Defined in

src/services/notificationService.ts:36


subscribe

subscribe(name, listener): void

Subscribe the service event

Parameters

NameTypeDescription
namestring | string[]Event name
listenerFunctionListener function

Returns

void

Inherited from

Component.subscribe

Defined in

src/common/event/eventBus.ts:11


toggleNotification

toggleNotification(): void

Toggle the Notification view between display or hidden

Returns

void

Defined in

src/services/notificationService.ts:28


unsubscribe

unsubscribe(name, listener?): void

Unsubscribe the specific event and the listener function

Parameters

NameTypeDescription
nameanyThe event name
listener?Functionoptional, it unsubscribes events via name if not pass the listener function

Returns

void

Inherited from

Component.unsubscribe

Defined in

src/common/event/eventBus.ts:39


update

update\<T>(item): null | INotificationItem\<T>

Update the specific notification item

Type parameters

Name
T

Parameters

NameTypeDescription
itemINotificationItem\<T>notification item, the id field is required

Returns

null | INotificationItem\<T>

Defined in

src/services/notificationService.ts:24