ngx-snotifire 19.0.1 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngx-snotifire.mjs +29 -29
- package/fesm2022/ngx-snotifire.mjs.map +1 -1
- package/index.d.ts +794 -3
- package/package.json +13 -3
- package/lib/components/buttons/buttons-config.interface.d.ts +0 -17
- package/lib/components/buttons/buttons.component.d.ts +0 -17
- package/lib/components/index.d.ts +0 -5
- package/lib/components/ngx-notifire/ngx-snotifire.component.d.ts +0 -61
- package/lib/components/prompt/prompt.component.d.ts +0 -17
- package/lib/components/toast/notifire-toast.model.d.ts +0 -42
- package/lib/components/toast/toast.component.d.ts +0 -64
- package/lib/decorators/set-toast-type.decorator.d.ts +0 -10
- package/lib/decorators/transform-argument.decorator.d.ts +0 -10
- package/lib/defaults/defaults.interface.d.ts +0 -12
- package/lib/defaults/global-config.interface.d.ts +0 -34
- package/lib/defaults/index.d.ts +0 -3
- package/lib/defaults/toast-defaults.d.ts +0 -73
- package/lib/models/index.d.ts +0 -6
- package/lib/models/snotifire-animate.interface.d.ts +0 -19
- package/lib/models/snotifire-config.interface.d.ts +0 -82
- package/lib/models/snotifire-event.type.d.ts +0 -12
- package/lib/models/snotifire-notifications.interface.d.ts +0 -12
- package/lib/models/snotifire-position.type.d.ts +0 -11
- package/lib/models/snotifire.model.d.ts +0 -39
- package/lib/models/snotifire.type.d.ts +0 -9
- package/lib/ngx-snotifire.module.d.ts +0 -15
- package/lib/pipes/index.d.ts +0 -2
- package/lib/pipes/keys.pipe.d.ts +0 -7
- package/lib/pipes/truncate.pipe.d.ts +0 -9
- package/lib/services/index.d.ts +0 -1
- package/lib/services/notification.service.d.ts +0 -270
- package/lib/utils.d.ts +0 -17
- package/public-api.d.ts +0 -6
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-snotifire",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
7
|
-
"@angular/core": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
6
|
+
"@angular/common": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
7
|
+
"@angular/core": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",
|
|
8
8
|
"rxjs": "^7.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
@@ -17,21 +17,29 @@
|
|
|
17
17
|
"angular 16",
|
|
18
18
|
"angular 17",
|
|
19
19
|
"angular 18",
|
|
20
|
+
"angular 19",
|
|
21
|
+
"angular 20",
|
|
20
22
|
"ng14",
|
|
21
23
|
"ng15",
|
|
22
24
|
"ng16",
|
|
23
25
|
"ng17",
|
|
24
26
|
"ng18",
|
|
27
|
+
"ng19",
|
|
28
|
+
"ng20",
|
|
25
29
|
"Angular14",
|
|
26
30
|
"Angular15",
|
|
27
31
|
"Angular16",
|
|
28
32
|
"Angular17",
|
|
29
33
|
"Angular18",
|
|
34
|
+
"Angular19",
|
|
35
|
+
"Angular20",
|
|
30
36
|
"14",
|
|
31
37
|
"15",
|
|
32
38
|
"16",
|
|
33
39
|
"17",
|
|
34
40
|
"18",
|
|
41
|
+
"19",
|
|
42
|
+
"20",
|
|
35
43
|
"Library",
|
|
36
44
|
"Notifications",
|
|
37
45
|
"Notification",
|
|
@@ -51,6 +59,8 @@
|
|
|
51
59
|
"angular16 notifications",
|
|
52
60
|
"angular17 notifications",
|
|
53
61
|
"angular18 notifications",
|
|
62
|
+
"angular19 notifications",
|
|
63
|
+
"angular20 notifications",
|
|
54
64
|
"toaster",
|
|
55
65
|
"snotifire"
|
|
56
66
|
],
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SnotifireToastModel } from '../toast/notifire-toast.model';
|
|
2
|
-
export interface ButtonsConfig {
|
|
3
|
-
/**
|
|
4
|
-
* Button text
|
|
5
|
-
*/
|
|
6
|
-
text: string;
|
|
7
|
-
/**
|
|
8
|
-
* Should buttons text be bold.
|
|
9
|
-
*/
|
|
10
|
-
bold?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Action which will be called after buttons click
|
|
13
|
-
* @param text? string
|
|
14
|
-
* @returns void
|
|
15
|
-
*/
|
|
16
|
-
action?: (toast: SnotifireToastModel) => void;
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SnotifireToastModel } from '../toast/notifire-toast.model';
|
|
2
|
-
import { SnotifireService } from '../../services';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ButtonsComponent {
|
|
5
|
-
private readonly service;
|
|
6
|
-
/**
|
|
7
|
-
* Get buttons Array
|
|
8
|
-
*/
|
|
9
|
-
toast: SnotifireToastModel;
|
|
10
|
-
constructor(service: SnotifireService);
|
|
11
|
-
/**
|
|
12
|
-
* remove toast
|
|
13
|
-
*/
|
|
14
|
-
remove(): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonsComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonsComponent, "notifire-button", never, { "toast": { "alias": "toast"; "required": false; }; }, {}, never, never, false, never>;
|
|
17
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
3
|
-
import { SnotifireEventType, SnotificationPositionType } from '../../models';
|
|
4
|
-
import { SnotifireNotifications } from '../../models/snotifire-notifications.interface';
|
|
5
|
-
import { SnotifireToastModel } from '../toast/notifire-toast.model';
|
|
6
|
-
import { SnotifireService } from '../../services';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class NgxSnotifireComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
9
|
-
readonly service: SnotifireService;
|
|
10
|
-
private readonly unsubscribe$;
|
|
11
|
-
/**
|
|
12
|
-
* Toasts array
|
|
13
|
-
*/
|
|
14
|
-
notifications: SnotifireNotifications;
|
|
15
|
-
/**
|
|
16
|
-
* Toasts emitter
|
|
17
|
-
*/
|
|
18
|
-
emitter: Subscription;
|
|
19
|
-
/**
|
|
20
|
-
* Helper for slice pipe (maxOnScreen)
|
|
21
|
-
*/
|
|
22
|
-
dockSizeA: number;
|
|
23
|
-
/**
|
|
24
|
-
* Helper for slice pipe (maxOnScreen)
|
|
25
|
-
*/
|
|
26
|
-
dockSizeB: number | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* Helper for slice pipe (maxAtPosition)
|
|
29
|
-
*/
|
|
30
|
-
blockSizeA: number;
|
|
31
|
-
/**
|
|
32
|
-
* Helper for slice pipe (maxAtPosition)
|
|
33
|
-
*/
|
|
34
|
-
blockSizeB: number | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Backdrop Opacity
|
|
37
|
-
*/
|
|
38
|
-
backdrop: number | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* How many toasts with backdrop in current queue
|
|
41
|
-
*/
|
|
42
|
-
withBackdrop: SnotifireToastModel[];
|
|
43
|
-
constructor(service: SnotifireService);
|
|
44
|
-
ngAfterViewInit(): void;
|
|
45
|
-
ngOnInit(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Split toasts toasts into different objects
|
|
48
|
-
* @param toasts notifire-toast[]
|
|
49
|
-
* @returns SnotifyNotifications
|
|
50
|
-
*/
|
|
51
|
-
splitToasts(toasts: SnotifireToastModel[]): SnotifireNotifications;
|
|
52
|
-
getNotificationArray(notifications: SnotifireNotifications, position: SnotificationPositionType): SnotifireToastModel[] | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* Changes the backdrop opacity
|
|
55
|
-
* @param event NotificationEventType
|
|
56
|
-
*/
|
|
57
|
-
stateChanged(event: SnotifireEventType): void;
|
|
58
|
-
ngOnDestroy(): void;
|
|
59
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSnotifireComponent, never>;
|
|
60
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxSnotifireComponent, "ngx-snotifire", never, {}, {}, never, never, false, never>;
|
|
61
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SnotifireEventType } from '../../models';
|
|
2
|
-
import { SnotifireToastModel } from '../toast/notifire-toast.model';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class PromptComponent {
|
|
5
|
-
inputType: SnotifireEventType;
|
|
6
|
-
/**
|
|
7
|
-
* Get PROMPT placeholder
|
|
8
|
-
*/
|
|
9
|
-
toast: SnotifireToastModel;
|
|
10
|
-
/**
|
|
11
|
-
* Is PROMPT focused
|
|
12
|
-
*/
|
|
13
|
-
isPromptFocused: boolean;
|
|
14
|
-
getValue($event: any): string;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PromptComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PromptComponent, "ngx-snotify-prompt", never, { "toast": { "alias": "toast"; "required": false; }; }, {}, never, never, false, never>;
|
|
17
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
2
|
-
import { SnotifireConfig } from '../../models/snotifire-config.interface';
|
|
3
|
-
import { SnotifireEventType } from '../../models/snotifire-event.type';
|
|
4
|
-
/**
|
|
5
|
-
* Toast main model
|
|
6
|
-
*/
|
|
7
|
-
export declare class SnotifireToastModel {
|
|
8
|
-
readonly id: number;
|
|
9
|
-
readonly title: string;
|
|
10
|
-
readonly body: string;
|
|
11
|
-
readonly config: SnotifireConfig;
|
|
12
|
-
/**
|
|
13
|
-
* Emits NotifireEventType
|
|
14
|
-
*/
|
|
15
|
-
readonly eventEmitter: Subject<SnotifireEventType>;
|
|
16
|
-
/**
|
|
17
|
-
* Holds all subscribers because we need to unsubscribe from all before toast get destroyed
|
|
18
|
-
*/
|
|
19
|
-
private eventsHolder;
|
|
20
|
-
/**
|
|
21
|
-
* Toast prompt value
|
|
22
|
-
*/
|
|
23
|
-
value?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Toast validator
|
|
26
|
-
*/
|
|
27
|
-
valid: boolean;
|
|
28
|
-
constructor(id: number, title: string, body: string, config: SnotifireConfig);
|
|
29
|
-
/**
|
|
30
|
-
* Subscribe to toast events
|
|
31
|
-
* @returns this
|
|
32
|
-
* @param event NotificationEventType
|
|
33
|
-
* @param action (toast: this) => void
|
|
34
|
-
*/
|
|
35
|
-
on(event: SnotifireEventType, action: (toast: this) => void): this;
|
|
36
|
-
/**
|
|
37
|
-
* Tests if a toast equals this toast.
|
|
38
|
-
* @returns boolean true then equals else false.
|
|
39
|
-
* @param toast notifire-toast
|
|
40
|
-
*/
|
|
41
|
-
equals(toast: SnotifireToastModel): boolean;
|
|
42
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { SnotifireEventType, SnotifireType } from '../../models';
|
|
3
|
-
import { SnotifireToastModel } from './notifire-toast.model';
|
|
4
|
-
import { SnotifireService } from '../../services';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class ToastComponent implements OnInit, OnDestroy {
|
|
7
|
-
private readonly service;
|
|
8
|
-
private unsubscribe$;
|
|
9
|
-
/**
|
|
10
|
-
* Get toast from notifications array
|
|
11
|
-
*/
|
|
12
|
-
toast: SnotifireToastModel;
|
|
13
|
-
stateChanged: EventEmitter<SnotifireEventType>;
|
|
14
|
-
/**
|
|
15
|
-
* requestAnimationFrame id
|
|
16
|
-
*/
|
|
17
|
-
animationFrame: number;
|
|
18
|
-
/**
|
|
19
|
-
* Toast state
|
|
20
|
-
*/
|
|
21
|
-
state: {
|
|
22
|
-
paused: boolean;
|
|
23
|
-
progress: number;
|
|
24
|
-
animation: string;
|
|
25
|
-
isDestroying: boolean;
|
|
26
|
-
promptType: SnotifireType;
|
|
27
|
-
};
|
|
28
|
-
constructor(service: SnotifireService);
|
|
29
|
-
ngOnInit(): void;
|
|
30
|
-
ngAfterContentInit(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Trigger beforeDestroy lifecycle. Removes toast
|
|
33
|
-
*/
|
|
34
|
-
onRemove(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Trigger OnClick lifecycle
|
|
37
|
-
*/
|
|
38
|
-
onClick(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Trigger onHoverEnter lifecycle
|
|
41
|
-
*/
|
|
42
|
-
onMouseEnter(): void;
|
|
43
|
-
/**
|
|
44
|
-
* Trigger onHoverLeave lifecycle
|
|
45
|
-
*/
|
|
46
|
-
onMouseLeave(): void;
|
|
47
|
-
/**
|
|
48
|
-
* Remove toast completely after animation
|
|
49
|
-
*/
|
|
50
|
-
onExitTransitionEnd(): void;
|
|
51
|
-
/**
|
|
52
|
-
* Initialize base toast config
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
initToast(): void;
|
|
56
|
-
/**
|
|
57
|
-
* Start progress bar
|
|
58
|
-
* @param startTime number
|
|
59
|
-
*/
|
|
60
|
-
startTimeout(startTime?: number): void;
|
|
61
|
-
ngOnDestroy(): void;
|
|
62
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ToastComponent, never>;
|
|
63
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "ngx-toast", never, { "toast": { "alias": "toast"; "required": false; }; }, { "stateChanged": "stateChanged"; }, never, never, false, never>;
|
|
64
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Defines toast style depending on method name
|
|
3
|
-
* @param target any
|
|
4
|
-
* @param propertyKey NotificationType
|
|
5
|
-
* @param descriptor PropertyDescriptor
|
|
6
|
-
* @returns value: ((...args: any[]) => any)
|
|
7
|
-
*/
|
|
8
|
-
export declare function SetToastType(target: any, propertyKey: string, descriptor: PropertyDescriptor): {
|
|
9
|
-
value(...args: any[]): any;
|
|
10
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transform arguments to Snotify object
|
|
3
|
-
* @param target any
|
|
4
|
-
* @param propertyKey SnotifyTypeType
|
|
5
|
-
* @param descriptor PropertyDescriptor
|
|
6
|
-
* @returns Snotify
|
|
7
|
-
*/
|
|
8
|
-
export declare function TransformArgument(target: any, propertyKey: string, descriptor: PropertyDescriptor): {
|
|
9
|
-
value(...args: any[]): any;
|
|
10
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SnotifireGlobalConfig } from './global-config.interface';
|
|
2
|
-
import { SnotifireConfig } from '../models/snotifire-config.interface';
|
|
3
|
-
/**
|
|
4
|
-
* Global configuration object
|
|
5
|
-
*/
|
|
6
|
-
export interface SnotifireDefaults {
|
|
7
|
-
global?: SnotifireGlobalConfig;
|
|
8
|
-
snotifireConfig?: SnotifireConfig;
|
|
9
|
-
type?: {
|
|
10
|
-
[key: string]: SnotifireConfig;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Toast dock configuration
|
|
3
|
-
*/
|
|
4
|
-
export interface SnotifireGlobalConfig {
|
|
5
|
-
/**
|
|
6
|
-
* Max toast items on screen.
|
|
7
|
-
*
|
|
8
|
-
* > For example you want to display 3 toasts max at the time. But for some purposes your system calls it 10 times.
|
|
9
|
-
* >
|
|
10
|
-
* > With this option, 3 toast will be shown. And after each of it will disappear, new toast from the queue will be shown.
|
|
11
|
-
*/
|
|
12
|
-
maxOnScreen?: number;
|
|
13
|
-
/**
|
|
14
|
-
* Max toast items at position.
|
|
15
|
-
*
|
|
16
|
-
* Same as maxOnScreen, but affects only current toast position (like rightBottom)
|
|
17
|
-
*/
|
|
18
|
-
maxAtPosition?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Should new items come from top or bottom side.
|
|
21
|
-
*
|
|
22
|
-
* > This option created for styling purposes.
|
|
23
|
-
* >
|
|
24
|
-
* > For example, if your toast position is TOP-RIGHT. Its not very nice, when items comes from top and pulls down all other toasts
|
|
25
|
-
*/
|
|
26
|
-
newOnTop?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* When enabled duplicated notification are filtered out.
|
|
29
|
-
*
|
|
30
|
-
* Duplicates are detected when they have the same title, body and type.
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
filterDuplicates?: boolean;
|
|
34
|
-
}
|
package/lib/defaults/index.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { SnotificationPositionType, SnotifireType } from '../models';
|
|
2
|
-
/**
|
|
3
|
-
* Snotify default configuration object
|
|
4
|
-
*/
|
|
5
|
-
export declare const ToastDefaults: {
|
|
6
|
-
global: {
|
|
7
|
-
newOnTop: boolean;
|
|
8
|
-
maxOnScreen: number;
|
|
9
|
-
maxAtPosition: number;
|
|
10
|
-
filterDuplicates: boolean;
|
|
11
|
-
};
|
|
12
|
-
snotifireConfig: {
|
|
13
|
-
type: SnotifireType;
|
|
14
|
-
showProgressBar: boolean;
|
|
15
|
-
timeout: number;
|
|
16
|
-
closeOnClick: boolean;
|
|
17
|
-
pauseOnHover: boolean;
|
|
18
|
-
bodyMaxLength: number;
|
|
19
|
-
titleMaxLength: number;
|
|
20
|
-
backdrop: number;
|
|
21
|
-
icon: undefined;
|
|
22
|
-
iconClass: undefined;
|
|
23
|
-
html: undefined;
|
|
24
|
-
position: SnotificationPositionType;
|
|
25
|
-
animation: {
|
|
26
|
-
enter: string;
|
|
27
|
-
exit: string;
|
|
28
|
-
time: number;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
type: {
|
|
32
|
-
prompt: {
|
|
33
|
-
timeout: number;
|
|
34
|
-
closeOnClick: boolean;
|
|
35
|
-
buttons: {
|
|
36
|
-
text: string;
|
|
37
|
-
action: null;
|
|
38
|
-
bold: boolean;
|
|
39
|
-
}[];
|
|
40
|
-
placeholder: string;
|
|
41
|
-
type: SnotifireType;
|
|
42
|
-
};
|
|
43
|
-
confirm: {
|
|
44
|
-
timeout: number;
|
|
45
|
-
closeOnClick: boolean;
|
|
46
|
-
buttons: {
|
|
47
|
-
text: string;
|
|
48
|
-
action: null;
|
|
49
|
-
bold: boolean;
|
|
50
|
-
}[];
|
|
51
|
-
type: SnotifireType;
|
|
52
|
-
};
|
|
53
|
-
success: {
|
|
54
|
-
type: SnotifireType;
|
|
55
|
-
};
|
|
56
|
-
error: {
|
|
57
|
-
type: SnotifireType;
|
|
58
|
-
};
|
|
59
|
-
warning: {
|
|
60
|
-
type: SnotifireType;
|
|
61
|
-
};
|
|
62
|
-
info: {
|
|
63
|
-
type: SnotifireType;
|
|
64
|
-
};
|
|
65
|
-
async: {
|
|
66
|
-
pauseOnHover: boolean;
|
|
67
|
-
closeOnClick: boolean;
|
|
68
|
-
timeout: number;
|
|
69
|
-
showProgressBar: boolean;
|
|
70
|
-
type: SnotifireType;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
};
|
package/lib/models/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Animation params
|
|
3
|
-
* If you want more animations, you can include animate.css or write animations yourself in your styles
|
|
4
|
-
* Then you'll need to share this styles with snotify component [ng-snotify] component.
|
|
5
|
-
*/
|
|
6
|
-
export interface SnotifireAnimate {
|
|
7
|
-
/**
|
|
8
|
-
* In animation
|
|
9
|
-
*/
|
|
10
|
-
enter: string;
|
|
11
|
-
/**
|
|
12
|
-
* Out animation
|
|
13
|
-
*/
|
|
14
|
-
exit: string;
|
|
15
|
-
/**
|
|
16
|
-
* Animation time in ms
|
|
17
|
-
*/
|
|
18
|
-
time: number;
|
|
19
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
-
import { ButtonsConfig } from '../components/buttons/buttons-config.interface';
|
|
3
|
-
import { SnotifireAnimate } from './snotifire-animate.interface';
|
|
4
|
-
import { SnotificationPositionType } from './snotifire-position.type';
|
|
5
|
-
import { SnotifireType } from './snotifire.type';
|
|
6
|
-
export interface SnotifireConfig {
|
|
7
|
-
/**
|
|
8
|
-
* Notification timeout in milliseconds.
|
|
9
|
-
* Disable timeout = 0
|
|
10
|
-
*/
|
|
11
|
-
timeout?: number;
|
|
12
|
-
/**
|
|
13
|
-
* Enable/Disable progress bar.
|
|
14
|
-
* Disabled if timeout is 0.
|
|
15
|
-
*/
|
|
16
|
-
showProgressBar?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Type of toast, affects toast style.
|
|
19
|
-
* It's not recommended to change it.
|
|
20
|
-
* Depends on toast type.
|
|
21
|
-
*/
|
|
22
|
-
type?: SnotifireType;
|
|
23
|
-
/**
|
|
24
|
-
* If the notification should dissapear on click
|
|
25
|
-
*/
|
|
26
|
-
closeOnClick?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* If the timeout countdown should pause on hober
|
|
29
|
-
*/
|
|
30
|
-
pauseOnHover?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Buttons config.
|
|
33
|
-
*/
|
|
34
|
-
buttons?: ButtonsConfig[];
|
|
35
|
-
/**
|
|
36
|
-
* Placeholder for Prompt toast
|
|
37
|
-
*/
|
|
38
|
-
placeholder?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Toast title maximum length
|
|
41
|
-
*/
|
|
42
|
-
titleMaxLength?: number;
|
|
43
|
-
/**
|
|
44
|
-
* Toast body maximum length
|
|
45
|
-
*/
|
|
46
|
-
bodyMaxLength?: number;
|
|
47
|
-
/**
|
|
48
|
-
* Activate custom icon.
|
|
49
|
-
* You should provide full tag, e.g.
|
|
50
|
-
* ```html
|
|
51
|
-
* <img src="assets/custom-icon.png"/>
|
|
52
|
-
* ```
|
|
53
|
-
* ```html
|
|
54
|
-
* <svg x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 48 48;" xml:space="preserve" width="48px" height="48px">
|
|
55
|
-
* <g><path....../></g>
|
|
56
|
-
* </svg>
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
icon?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Custom icon class.
|
|
62
|
-
*/
|
|
63
|
-
iconClass?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Animation config
|
|
66
|
-
*/
|
|
67
|
-
animation?: SnotifireAnimate;
|
|
68
|
-
/**
|
|
69
|
-
* Html string witch overrides toast content
|
|
70
|
-
*/
|
|
71
|
-
html?: string | SafeHtml;
|
|
72
|
-
/**
|
|
73
|
-
* Toasts position on screen
|
|
74
|
-
*/
|
|
75
|
-
position?: SnotificationPositionType;
|
|
76
|
-
/**
|
|
77
|
-
* Backdrop opacity.
|
|
78
|
-
* * **Range:** `0.0 - 1.0`.
|
|
79
|
-
* * **Disabled:** `-1`
|
|
80
|
-
*/
|
|
81
|
-
backdrop?: number;
|
|
82
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum SnotifireEventType {
|
|
2
|
-
MOUNTED = "mounted",
|
|
3
|
-
BEFORE_SHOW = "beforeShow",
|
|
4
|
-
SHOWN = "shown",
|
|
5
|
-
INPUT = "input",
|
|
6
|
-
CLICK = "click",
|
|
7
|
-
MOUSE_ENTER = "mouseenter",
|
|
8
|
-
MOUSE_LEAVE = "mouseleave",
|
|
9
|
-
BEFORE_HIDE = "beforeHide",
|
|
10
|
-
HIDDEN = "hidden",
|
|
11
|
-
DESTROYED = "destroyed"
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SnotifireToastModel } from '../components/toast/notifire-toast.model';
|
|
2
|
-
export interface SnotifireNotifications {
|
|
3
|
-
leftTop?: SnotifireToastModel[];
|
|
4
|
-
leftCenter?: SnotifireToastModel[];
|
|
5
|
-
leftBottom?: SnotifireToastModel[];
|
|
6
|
-
rightTop?: SnotifireToastModel[];
|
|
7
|
-
rightCenter?: SnotifireToastModel[];
|
|
8
|
-
rightBottom?: SnotifireToastModel[];
|
|
9
|
-
centerTop?: SnotifireToastModel[];
|
|
10
|
-
centerCenter?: SnotifireToastModel[];
|
|
11
|
-
centerBottom?: SnotifireToastModel[];
|
|
12
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare enum SnotificationPositionType {
|
|
2
|
-
LEFT_TOP = "leftTop",
|
|
3
|
-
LEFT_CENTER = "leftCenter",
|
|
4
|
-
LEFT_BOTTOM = "leftBottom",
|
|
5
|
-
RIGHT_TOP = "rightTop",
|
|
6
|
-
RIGHT_CENTER = "rightCenter",
|
|
7
|
-
RIGHT_BOTTOM = "rightBottom",
|
|
8
|
-
CENTER_TOP = "centerTop",
|
|
9
|
-
CENTER_CENTER = "centerCenter",
|
|
10
|
-
CENTER_BOTTOM = "centerBottom"
|
|
11
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
-
import { SnotifireConfig } from './snotifire-config.interface';
|
|
3
|
-
import { SnotifireType } from './snotifire.type';
|
|
4
|
-
export declare class SnotifireModel {
|
|
5
|
-
type?: SnotifireType | undefined;
|
|
6
|
-
/**
|
|
7
|
-
* Notification Title
|
|
8
|
-
*/
|
|
9
|
-
title?: string | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Notification message
|
|
12
|
-
*/
|
|
13
|
-
body?: string | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Config object
|
|
16
|
-
*/
|
|
17
|
-
config?: SnotifireConfig | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* Html content
|
|
20
|
-
*/
|
|
21
|
-
html?: (string | SafeHtml) | undefined;
|
|
22
|
-
constructor(type?: SnotifireType | undefined,
|
|
23
|
-
/**
|
|
24
|
-
* Notification Title
|
|
25
|
-
*/
|
|
26
|
-
title?: string | undefined,
|
|
27
|
-
/**
|
|
28
|
-
* Notification message
|
|
29
|
-
*/
|
|
30
|
-
body?: string | undefined,
|
|
31
|
-
/**
|
|
32
|
-
* Config object
|
|
33
|
-
*/
|
|
34
|
-
config?: SnotifireConfig | undefined,
|
|
35
|
-
/**
|
|
36
|
-
* Html content
|
|
37
|
-
*/
|
|
38
|
-
html?: (string | SafeHtml) | undefined);
|
|
39
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "./components/prompt/prompt.component";
|
|
4
|
-
import * as i2 from "./components/toast/toast.component";
|
|
5
|
-
import * as i3 from "./components/buttons/buttons.component";
|
|
6
|
-
import * as i4 from "./pipes/truncate.pipe";
|
|
7
|
-
import * as i5 from "./pipes/keys.pipe";
|
|
8
|
-
import * as i6 from "./components/ngx-notifire/ngx-snotifire.component";
|
|
9
|
-
import * as i7 from "@angular/common";
|
|
10
|
-
export declare class NgxSnotifireModule {
|
|
11
|
-
static forRoot(): ModuleWithProviders<NgxSnotifireModule>;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSnotifireModule, never>;
|
|
13
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSnotifireModule, [typeof i1.PromptComponent, typeof i2.ToastComponent, typeof i3.ButtonsComponent, typeof i4.TruncatePipe, typeof i5.KeysPipe, typeof i6.NgxSnotifireComponent], [typeof i7.CommonModule], [typeof i6.NgxSnotifireComponent]>;
|
|
14
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NgxSnotifireModule>;
|
|
15
|
-
}
|
package/lib/pipes/index.d.ts
DELETED
package/lib/pipes/keys.pipe.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class KeysPipe implements PipeTransform {
|
|
4
|
-
transform(value: any): any;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<KeysPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<KeysPipe, "keys", false>;
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TruncatePipe implements PipeTransform {
|
|
4
|
-
private readonly DEFAULT_LIMIT;
|
|
5
|
-
private readonly DEFAULT_TRAIL;
|
|
6
|
-
transform(value: string, ...args: Array<any>): any;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TruncatePipe, never>;
|
|
8
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TruncatePipe, "truncate", false>;
|
|
9
|
-
}
|