Options
All
  • Public
  • Public/Protected
  • All
Menu

@bndynet/dialog

Index

Functions

alert

  • alert(message: string, callback?: undefined | function): Modal
  • alert(title: string, message: string, callback?: undefined | function): Modal
  • Shows an alert dialog.

    Parameters

    • message: string

      The alert message

    • Optional callback: undefined | function

      The callback function when you click ok button

    Returns Modal

  • Shows an alert dialog.

    Parameters

    • title: string

      The alert dialog title

    • message: string

      The alert dialog message

    • Optional callback: undefined | function

      The callback function when you click ok button

    Returns Modal

confirm

  • confirm(options: ModalOptions): Modal
  • confirm(message: string, callback: function): Modal
  • confirm(title: string, message: string, callback: function): Modal
  • confirm(title: string, message?: undefined | string): Promise<void>
  • Shows a confirm dialog.

    Parameters

    Returns Modal

    A Modal instance

  • Shows a confirm dialog.

    Parameters

    • message: string

      The confirm message

    • callback: function

      The callback function when click ok button

        • (): void
        • Returns void

    Returns Modal

    A Modal instance

  • Shows a confirm dialog.

    Parameters

    • title: string

      The confirm title

    • message: string

      The confirm message

    • callback: function

      The callback function when click ok button

        • (): void
        • Returns void

    Returns Modal

    A Modal instance

  • Shows a confirm dialog

    Parameters

    • title: string

      The confirm title, if message unspecified, which is as the message

    • Optional message: undefined | string

      The confirm message

    Returns Promise<void>

    A promise

element

iframe

  • Opens a window with iframe element for opening the specified uri.

    Parameters

    • uri: string

      The uri to open

    • title: string

      The window title. If empty, show the url

    • Optional options: ModalOptions

      The ModalOptions like {width: '80%', height: '80%'}

    Returns Modal

loading

loadingFor

  • loadingFor(selector: string, loadingText?: undefined | string, color?: undefined | string): Loading
  • Shows or hides a loading component for element.

    Parameters

    • selector: string

      The element selector

    • Optional loadingText: undefined | string

      The loading text

    • Optional color: undefined | string

      The loading component color

    Returns Loading

    A instance of Loading compnent

notify

setTheme

  • setTheme(theme: string): void
  • Sets theme for dialog and will remove old theme

    Parameters

    • theme: string

      The dialog theme

    Returns void

setup

url

Object literals

Let defaultOptions

defaultOptions: object

The default options for dialog

animate

animate: true = true

labelCancel

labelCancel: string = "Cancel"

labelOK

labelOK: string = "OK"

notificationAutoClose

notificationAutoClose: true = true

notificationClickClose

notificationClickClose: true = true

notificationCloseDelay

notificationCloseDelay: number = 3000

notificationMaxItems

notificationMaxItems: number = 3

notificationPlacement

notificationPlacement: string = "bottom right"

notificationSquare

notificationSquare: false = false

notificationTheme

notificationTheme: string = "default"

Generated by BNDY-NET