angular2-notifications

  • Version 9.0.0
  • Published
  • 562 kB
  • No dependencies
  • MIT license

Install

npm i angular2-notifications
yarn add angular2-notifications
pnpm add angular2-notifications

Overview

> A light and easy to use notifications library for Angular 2. ~~It features both regular page notifications (toasts) and push notifications.~~

Index

Variables

variable OPTIONS

const OPTIONS: any;

    Functions

    function optionsFactory

    optionsFactory: (options: any) => any;

      Classes

      class NotificationComponent

      class NotificationComponent implements OnInit, OnDestroy {}

        constructor

        constructor(
        notificationService: NotificationsService,
        domSanitizer: any,
        cd: any,
        zone: any
        );

          property animate

          animate: NotificationAnimationType;

            property clickIconToClose

            clickIconToClose: boolean;

              property clickToClose

              clickToClose: boolean;

                property content

                content: any;

                  property contentIsTemplate

                  contentIsTemplate: boolean;

                    property htmlIsTemplate

                    htmlIsTemplate: boolean;

                      property item

                      item: Notification;

                        property maxLength

                        maxLength: number;

                          property pauseOnHover

                          pauseOnHover: boolean;

                            property position

                            position: number;

                              property progressWidth

                              progressWidth: number;

                                property rtl

                                rtl: boolean;

                                  property safeInputHtml

                                  safeInputHtml: any;

                                    property safeSvg

                                    safeSvg: any;

                                      property showProgressBar

                                      showProgressBar: boolean;

                                        property theClass

                                        theClass: string;

                                          property timeOut

                                          timeOut: number;

                                            property title

                                            title: any;

                                              property titleIsTemplate

                                              titleIsTemplate: boolean;

                                                method attachOverrides

                                                attachOverrides: () => void;

                                                  method ngOnDestroy

                                                  ngOnDestroy: () => void;

                                                    method ngOnInit

                                                    ngOnInit: () => void;

                                                      method onClick

                                                      onClick: (event: MouseEvent) => void;

                                                        method onClickIcon

                                                        onClickIcon: (event: MouseEvent) => void;

                                                          method onEnter

                                                          onEnter: () => void;

                                                            method onLeave

                                                            onLeave: () => void;

                                                              method startTimeOut

                                                              startTimeOut: () => void;

                                                                class NotificationsService

                                                                class NotificationsService {}

                                                                  constructor

                                                                  constructor(globalOptions: any);

                                                                    property emitter

                                                                    emitter: any;

                                                                      property globalOptions

                                                                      globalOptions: any;

                                                                        property icons

                                                                        icons: Icons;

                                                                          method alert

                                                                          alert: (
                                                                          title?: any,
                                                                          content?: any,
                                                                          override?: any,
                                                                          context?: any
                                                                          ) => Notification;

                                                                            method bare

                                                                            bare: (
                                                                            title?: any,
                                                                            content?: any,
                                                                            override?: any,
                                                                            context?: any
                                                                            ) => Notification;

                                                                              method create

                                                                              create: (
                                                                              title?: any,
                                                                              content?: any,
                                                                              type?: NotificationType,
                                                                              override?: any,
                                                                              context?: any
                                                                              ) => Notification;

                                                                                method error

                                                                                error: (
                                                                                title?: any,
                                                                                content?: any,
                                                                                override?: any,
                                                                                context?: any
                                                                                ) => Notification;

                                                                                  method html

                                                                                  html: (
                                                                                  html: any,
                                                                                  type?: NotificationType,
                                                                                  override?: any,
                                                                                  icon?: string,
                                                                                  context?: any
                                                                                  ) => Notification;

                                                                                    method info

                                                                                    info: (
                                                                                    title?: any,
                                                                                    content?: any,
                                                                                    override?: any,
                                                                                    context?: any
                                                                                    ) => Notification;

                                                                                      method remove

                                                                                      remove: (id?: string) => void;

                                                                                        method set

                                                                                        set: (notification: Notification, to: boolean) => Notification;

                                                                                          method success

                                                                                          success: (
                                                                                          title?: any,
                                                                                          content?: any,
                                                                                          override?: any,
                                                                                          context?: any
                                                                                          ) => Notification;

                                                                                            method warn

                                                                                            warn: (
                                                                                            title?: any,
                                                                                            content?: any,
                                                                                            override?: any,
                                                                                            context?: any
                                                                                            ) => Notification;

                                                                                              class SimpleNotificationsComponent

                                                                                              class SimpleNotificationsComponent implements OnInit, OnDestroy {}

                                                                                                constructor

                                                                                                constructor(service: NotificationsService, cd: any);

                                                                                                  property animate

                                                                                                  animate: NotificationAnimationType;

                                                                                                    property clickIconToClose

                                                                                                    clickIconToClose: boolean;

                                                                                                      property clickToClose

                                                                                                      clickToClose: boolean;

                                                                                                        property create

                                                                                                        create: any;

                                                                                                          property destroy

                                                                                                          destroy: any;

                                                                                                            property maxLength

                                                                                                            maxLength: number;

                                                                                                              property notifications

                                                                                                              notifications: Notification[];

                                                                                                                property options

                                                                                                                options: Options;

                                                                                                                  property pauseOnHover

                                                                                                                  pauseOnHover: boolean;

                                                                                                                    property position

                                                                                                                    position: Position;

                                                                                                                      property rtl

                                                                                                                      rtl: boolean;

                                                                                                                        property showProgressBar

                                                                                                                        showProgressBar: boolean;

                                                                                                                          property theClass

                                                                                                                          theClass: string;

                                                                                                                            property timeOut

                                                                                                                            timeOut: number;

                                                                                                                              method add

                                                                                                                              add: (item: Notification) => void;

                                                                                                                                method attachChanges

                                                                                                                                attachChanges: (options: any) => void;

                                                                                                                                  method block

                                                                                                                                  block: (item: Notification) => boolean;

                                                                                                                                    method buildEmit

                                                                                                                                    buildEmit: (notification: Notification, to: boolean) => Notification;

                                                                                                                                      method checkHtml

                                                                                                                                      checkHtml: (checker: Notification, item: Notification) => boolean;

                                                                                                                                        method checkStandard

                                                                                                                                        checkStandard: (checker: Notification, item: Notification) => boolean;

                                                                                                                                          method cleanSingle

                                                                                                                                          cleanSingle: (id: string) => void;

                                                                                                                                            method defaultBehavior

                                                                                                                                            defaultBehavior: (value: any) => void;

                                                                                                                                              method ngOnDestroy

                                                                                                                                              ngOnDestroy: () => void;

                                                                                                                                                method ngOnInit

                                                                                                                                                ngOnInit: () => void;

                                                                                                                                                  class SimpleNotificationsModule

                                                                                                                                                  class SimpleNotificationsModule {}

                                                                                                                                                    method forRoot

                                                                                                                                                    static forRoot: (options?: Options) => any;

                                                                                                                                                      Interfaces

                                                                                                                                                      interface Icons

                                                                                                                                                      interface Icons {}

                                                                                                                                                        property alert

                                                                                                                                                        alert: string;

                                                                                                                                                          property error

                                                                                                                                                          error: string;

                                                                                                                                                            property info

                                                                                                                                                            info: string;

                                                                                                                                                              property success

                                                                                                                                                              success: string;

                                                                                                                                                                property warn

                                                                                                                                                                warn: string;

                                                                                                                                                                  interface Notification

                                                                                                                                                                  interface Notification {}

                                                                                                                                                                    property animate

                                                                                                                                                                    animate?: NotificationAnimationType;

                                                                                                                                                                      property click

                                                                                                                                                                      click?: EventEmitter<{}>;

                                                                                                                                                                        property clickIcon

                                                                                                                                                                        clickIcon?: EventEmitter<{}>;

                                                                                                                                                                          property clickIconToClose

                                                                                                                                                                          clickIconToClose?: boolean;

                                                                                                                                                                            property clickToClose

                                                                                                                                                                            clickToClose?: boolean;

                                                                                                                                                                              property content

                                                                                                                                                                              content?: any;

                                                                                                                                                                                property context

                                                                                                                                                                                context?: any;

                                                                                                                                                                                  property createdOn

                                                                                                                                                                                  createdOn?: Date;

                                                                                                                                                                                    property destroyedOn

                                                                                                                                                                                    destroyedOn?: Date;

                                                                                                                                                                                      property html

                                                                                                                                                                                      html?: any;

                                                                                                                                                                                        property icon

                                                                                                                                                                                        icon: string;

                                                                                                                                                                                          property id

                                                                                                                                                                                          id?: string;

                                                                                                                                                                                            property maxLength

                                                                                                                                                                                            maxLength?: number;

                                                                                                                                                                                              property override

                                                                                                                                                                                              override?: any;

                                                                                                                                                                                                property pauseOnHover

                                                                                                                                                                                                pauseOnHover?: boolean;

                                                                                                                                                                                                  property state

                                                                                                                                                                                                  state?: string;

                                                                                                                                                                                                    property theClass

                                                                                                                                                                                                    theClass?: string;

                                                                                                                                                                                                      property timeOut

                                                                                                                                                                                                      timeOut?: number;

                                                                                                                                                                                                        property timeoutEnd

                                                                                                                                                                                                        timeoutEnd?: EventEmitter<{}>;

                                                                                                                                                                                                          property title

                                                                                                                                                                                                          title?: any;

                                                                                                                                                                                                            property type

                                                                                                                                                                                                            type: NotificationType;

                                                                                                                                                                                                              interface NotificationEvent

                                                                                                                                                                                                              interface NotificationEvent {}

                                                                                                                                                                                                                property add

                                                                                                                                                                                                                add?: boolean;

                                                                                                                                                                                                                  property command

                                                                                                                                                                                                                  command: string;

                                                                                                                                                                                                                    property id

                                                                                                                                                                                                                    id?: string;

                                                                                                                                                                                                                      property notification

                                                                                                                                                                                                                      notification?: Notification;

                                                                                                                                                                                                                        interface Options

                                                                                                                                                                                                                        interface Options {}

                                                                                                                                                                                                                          property animate

                                                                                                                                                                                                                          animate?: NotificationAnimationType;

                                                                                                                                                                                                                            property clickIconToClose

                                                                                                                                                                                                                            clickIconToClose?: boolean;

                                                                                                                                                                                                                              property clickToClose

                                                                                                                                                                                                                              clickToClose?: boolean;

                                                                                                                                                                                                                                property icons

                                                                                                                                                                                                                                icons?: Icons;

                                                                                                                                                                                                                                  property lastOnBottom

                                                                                                                                                                                                                                  lastOnBottom?: boolean;

                                                                                                                                                                                                                                    property maxLength

                                                                                                                                                                                                                                    maxLength?: number;

                                                                                                                                                                                                                                      property maxStack

                                                                                                                                                                                                                                      maxStack?: number;

                                                                                                                                                                                                                                        property pauseOnHover

                                                                                                                                                                                                                                        pauseOnHover?: boolean;

                                                                                                                                                                                                                                          property position

                                                                                                                                                                                                                                          position?: Position;

                                                                                                                                                                                                                                            property preventDuplicates

                                                                                                                                                                                                                                            preventDuplicates?: boolean;

                                                                                                                                                                                                                                              property preventLastDuplicates

                                                                                                                                                                                                                                              preventLastDuplicates?: boolean | string;

                                                                                                                                                                                                                                                property rtl

                                                                                                                                                                                                                                                rtl?: boolean;

                                                                                                                                                                                                                                                  property showProgressBar

                                                                                                                                                                                                                                                  showProgressBar?: boolean;

                                                                                                                                                                                                                                                    property theClass

                                                                                                                                                                                                                                                    theClass?: string;

                                                                                                                                                                                                                                                      property timeOut

                                                                                                                                                                                                                                                      timeOut?: number;

                                                                                                                                                                                                                                                        interface Position

                                                                                                                                                                                                                                                        interface Position extends Array<VerticalPosition | HorizontalPosition> {}

                                                                                                                                                                                                                                                          property 0

                                                                                                                                                                                                                                                          0: VerticalPosition;

                                                                                                                                                                                                                                                            property 1

                                                                                                                                                                                                                                                            1: HorizontalPosition;

                                                                                                                                                                                                                                                              Enums

                                                                                                                                                                                                                                                              enum NotificationAnimationType

                                                                                                                                                                                                                                                              enum NotificationAnimationType {
                                                                                                                                                                                                                                                              Fade = 'fade',
                                                                                                                                                                                                                                                              FromTop = 'fromTop',
                                                                                                                                                                                                                                                              FromRight = 'fromRight',
                                                                                                                                                                                                                                                              FromBottom = 'fromBottom',
                                                                                                                                                                                                                                                              FromLeft = 'fromLeft',
                                                                                                                                                                                                                                                              Scale = 'scale',
                                                                                                                                                                                                                                                              Rotate = 'rotate',
                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                member Fade

                                                                                                                                                                                                                                                                Fade = 'fade'

                                                                                                                                                                                                                                                                  member FromBottom

                                                                                                                                                                                                                                                                  FromBottom = 'fromBottom'

                                                                                                                                                                                                                                                                    member FromLeft

                                                                                                                                                                                                                                                                    FromLeft = 'fromLeft'

                                                                                                                                                                                                                                                                      member FromRight

                                                                                                                                                                                                                                                                      FromRight = 'fromRight'

                                                                                                                                                                                                                                                                        member FromTop

                                                                                                                                                                                                                                                                        FromTop = 'fromTop'

                                                                                                                                                                                                                                                                          member Rotate

                                                                                                                                                                                                                                                                          Rotate = 'rotate'

                                                                                                                                                                                                                                                                            member Scale

                                                                                                                                                                                                                                                                            Scale = 'scale'

                                                                                                                                                                                                                                                                              enum NotificationType

                                                                                                                                                                                                                                                                              enum NotificationType {
                                                                                                                                                                                                                                                                              Success = 'success',
                                                                                                                                                                                                                                                                              Error = 'error',
                                                                                                                                                                                                                                                                              Alert = 'alert',
                                                                                                                                                                                                                                                                              Info = 'info',
                                                                                                                                                                                                                                                                              Warn = 'warn',
                                                                                                                                                                                                                                                                              Bare = 'bare',
                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                member Alert

                                                                                                                                                                                                                                                                                Alert = 'alert'

                                                                                                                                                                                                                                                                                  member Bare

                                                                                                                                                                                                                                                                                  Bare = 'bare'

                                                                                                                                                                                                                                                                                    member Error

                                                                                                                                                                                                                                                                                    Error = 'error'

                                                                                                                                                                                                                                                                                      member Info

                                                                                                                                                                                                                                                                                      Info = 'info'

                                                                                                                                                                                                                                                                                        member Success

                                                                                                                                                                                                                                                                                        Success = 'success'

                                                                                                                                                                                                                                                                                          member Warn

                                                                                                                                                                                                                                                                                          Warn = 'warn'

                                                                                                                                                                                                                                                                                            Type Aliases

                                                                                                                                                                                                                                                                                            type HorizontalPosition

                                                                                                                                                                                                                                                                                            type HorizontalPosition = 'right' | 'left' | 'center';

                                                                                                                                                                                                                                                                                              type VerticalPosition

                                                                                                                                                                                                                                                                                              type VerticalPosition = 'top' | 'bottom' | 'middle';

                                                                                                                                                                                                                                                                                                Package Files (11)

                                                                                                                                                                                                                                                                                                Dependencies (0)

                                                                                                                                                                                                                                                                                                No dependencies.

                                                                                                                                                                                                                                                                                                Dev Dependencies (0)

                                                                                                                                                                                                                                                                                                No dev dependencies.

                                                                                                                                                                                                                                                                                                Peer Dependencies (8)

                                                                                                                                                                                                                                                                                                Badge

                                                                                                                                                                                                                                                                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/angular2-notifications.

                                                                                                                                                                                                                                                                                                • Markdown
                                                                                                                                                                                                                                                                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/angular2-notifications)
                                                                                                                                                                                                                                                                                                • HTML
                                                                                                                                                                                                                                                                                                  <a href="https://www.jsdocs.io/package/angular2-notifications"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>