API Docs for: 0.0.1
Show:

Messages Class

Module: messages

Creating floating Panel-nodes which can be shown and hidden.

Copyright (c) 2014 ITSA - https://github.com/itsa New BSD License - http://choosealicense.com/licenses/bsd-3-clause/

Methods

alert

(
  • message
  • [icon]
)
Promise

Defined in src/messages/messages.js:86

Available since 0.0.1

Sends a simple message

Parameters:

  • message String

    The message to be send

  • [icon] String optional

    an icon-name to be used (fe "alert"). The icon-name should be defined by the icons-module.

Returns:

catchErrors

(
  • catchOrNot
)

Defined in src/messages/messages.js:183

Available since 0.0.1

To catch syste-errors into the message system. When set, errors won't appear in the console.

Parameters:

  • catchOrNot Boolean

    Whether errors should be catched or not.

confirm

(
  • message
  • [icon]
)
Promise

Defined in src/messages/messages.js:102

Available since 0.0.1

Sends a simple confirmation

Parameters:

  • message String

    The message to be send

  • [icon] String optional

    an icon-name to be used (fe "alert"). The icon-name should be defined by the icons-module.

Returns:

message

(
  • message
  • [options]
)
Promise

Defined in src/messages/messages.js:45

Available since 0.0.1

Sends a message (emits) and returns a promise. All option-properties will be merged into the promise. (even when not defined in the api)

Parameters:

  • message String

    The message to be send

  • [options] Object optional

    The instance that is going to detach the customEvent

    • [emitter='global'] String optional

      the emitter of the message, will be used as emitterName of the customEvent.

    • [icon] String optional

      an icon-name to be used (fe "alert"). The icon-name should be defined by the icons-module.

    • [level=1] Number optional

      The level --> 1='message', 2='warn', 3='error', 4='statusmessage'.

    • [header] String optional

      Can be used by a messagehandler to render the header.

    • [footer] String optional

      Can be used by a messagehandler to render the footer.

    • [timeout] Number optional

      When specified, the promise will be resolved after this period of time.

    • [stayActive] Number optional

      When specified, the promise won't resolved within this period of time.

Returns:

prompt

(
  • message
  • [options]
)
Promise

Defined in src/messages/messages.js:136

Available since 0.0.1

Sends a prompt-message with an input-element.

Parameters:

  • message String

    The message to be send

  • [options] Object optional

    The instance that is going to detach the customEvent

    • [emitter='global'] String optional

      the emitter of the message, will be used as emitterName of the customEvent.

    • [defaultValue] String optional

      input's default value.

    • [label] String optional

      The label for the input-element.

    • [placeholder] String optional

      The placeholder for the input-element.

    • [icon] String optional

      an icon-name to be used (fe "alert"). The icon-name should be defined by the icons-module.

    • [header] String optional

      Can be used by a messagehandler to render the header.

    • [footer] String optional

      Can be used by a messagehandler to render the footer.

    • [level=1] Number optional

      The level --> 1='message', 2='warn', 3='error', 4='statusmessage'.

    • [timeout] Number optional

      When specified, the promise will be resolved after this period of time.

    • [stayActive] Number optional

      When specified, the promise won't resolved within this period of time.

Returns:

warn

(
  • message
)
Promise

Defined in src/messages/messages.js:121

Available since 0.0.1

Sends a warning-message.

Parameters:

  • message String

    The message to be send

Returns: