diff --git a/bootstrap-notify/bootstrap-notify-test.ts b/bootstrap-notify/bootstrap-notify-test.ts
new file mode 100644
index 0000000000..09e1dba1e7
--- /dev/null
+++ b/bootstrap-notify/bootstrap-notify-test.ts
@@ -0,0 +1,51 @@
+///
+///
+
+//Test for bootstrap-notify v3.1.3
+
+$.notify({
+ // options
+ icon: 'glyphicon glyphicon-warning-sign',
+ title: 'Bootstrap notify',
+ message: 'Turning standard Bootstrap alerts into "notify" like notifications',
+ url: 'https://github.com/mouse0270/bootstrap-notify',
+ target: '_blank'
+},{
+ // settings
+ element: 'body',
+ position: null,
+ type: "info",
+ allow_dismiss: true,
+ newest_on_top: false,
+ showProgressbar: false,
+ placement: {
+ from: "top",
+ align: "right"
+ },
+ offset: 20,
+ spacing: 10,
+ z_index: 1031,
+ delay: 5000,
+ timer: 1000,
+ url_target: '_blank',
+ mouse_over: null,
+ animate: {
+ enter: 'animated fadeInDown',
+ exit: 'animated fadeOutUp'
+ },
+ onShow: null,
+ onShown: null,
+ onClose: null,
+ onClosed: null,
+ icon_type: 'class',
+ template: '
' +
+ '
' +
+ '
' +
+ '
{1} ' +
+ '
{2}' +
+ '
' +
+ '
' +
+ '
'
+});
\ No newline at end of file
diff --git a/bootstrap-notify/bootstrap-notify.d.ts b/bootstrap-notify/bootstrap-notify.d.ts
index 2159aa21af..556bf61373 100644
--- a/bootstrap-notify/bootstrap-notify.d.ts
+++ b/bootstrap-notify/bootstrap-notify.d.ts
@@ -1,68 +1,59 @@
-// Type definitions for bootstrap-notify
-// Project: https://github.com/Nijikokun/bootstrap-notify
-// Definitions by: Blake Niemyjski
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
+// Type definitions for bootstrap-notify v3.1.3
-///
+///
-interface NotifyOptions {
- /**
- Alert style, omit alert- from style name.
- @param {string} type
- */
- type?: string;
- /**
- Allow alert to be closable through a close icon.
- @param {boolean} closable
- */
- closable?: boolean;
- /**
- Alert transition, pretty sure only fade is supported, you can try others if you wish.
- @param {string} transition
- */
- transition?: string;
- /**
- Fade alert out after a certain delay (in ms)
- @param {string} fadeOut
- */
- fadeOut?: NotifyFadeOutSettings;
- /**
- Text to show on alert, you can use either html or text. HTML will override text.
- @param {MessageOptions} message
- */
- message?: MessageOptions;
- /**
- Called before alert closes.
- @param {function} onClose
- */
- onClose?: () => void;
- /**
- Called after alert closes.
- @param {function} onClosed
- */
- onClosed?: () => void;
+/* tslint:disable: interface-name no-any */
+
+interface JQueryStatic {
+ /* tslint:enable: interface-name */
+ notify(message: string): INotifyReturn;
+ notify(opts: INotifyOptions, settings?: INotifySettings): INotifyReturn;
+ notifyDefaults(settings: INotifySettings): void;
+ notifyClose(): void;
+ notifyClose(command: string): void;
}
-interface NotifyFadeOutSettings {
- enabled?: boolean;
- delay?: number;
+interface INotifyOptions {
+ message: string;
+ title?: string;
+ icon?: string;
+ url?: string;
+ target?: string;
}
-interface MessageOptions {
- html?: string;
- text?: string;
+interface INotifySettings {
+ element?: string;
+ position?: string;
+ type?: string;
+ allow_dismiss?: boolean;
+ allow_duplicates?: boolean;
+ newest_on_top?: boolean;
+ showProgressbar?: boolean;
+ placement?: {
+ from?: string;
+ align?: string;
+ };
+ offset?: number;
+ spacing?: number;
+ z_index?: number;
+ delay?: number;
+ timer?: number;
+ url_target?: string;
+ mouse_over?: string;
+ animate?: {
+ enter?: string;
+ exit?: string;
+ };
+ onShow?: () => void;
+ onShown?: () => void;
+ onClose?: () => void;
+ onClosed?: () => void;
+ icon_type?: string;
+ template?: string;
}
-interface Notification {
- show();
- hide();
-}
-
-interface JQuery {
- /**
- Creates a notification instance with default options.
- @constructor
- @param {NotifyOptions} options
- */
- notify(options: NotifyOptions): Notification;
+interface INotifyReturn {
+ $ele: JQueryStatic;
+ close: () => void;
+ update: (command: string, update: any) => void;
}
\ No newline at end of file