aeb-ui-kit 1.4.0 → 1.5.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.
@@ -1,30 +1,17 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ import { NotificationID, NotificationModel } from './notification/notification.component';
2
3
  import * as i0 from "@angular/core";
3
- export interface NotificationModel {
4
- id: string | number;
5
- message: string;
6
- header: string;
7
- iconPath: string;
8
- }
9
- export declare type orientation = "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
4
+ export declare type Orientation = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
10
5
  export declare class NewNotificationsComponent {
11
6
  notifications: NotificationModel[];
12
- notificationPosition: orientation;
13
- close: EventEmitter<string>;
14
- clickItem: EventEmitter<string>;
15
- /**
16
- * @ignore
17
- */
18
- orientations: {
19
- [key in orientation]: string;
20
- };
21
- constructor();
22
- /**
23
- * @ignore
24
- */
25
- getOrientation(): string;
26
- handleClose(id: string): void;
27
- handleItemClick(id: string): void;
7
+ notificationsPosition: Orientation;
8
+ notificationClick: EventEmitter<NotificationID>;
9
+ notificationClose: EventEmitter<NotificationID>;
10
+ private notificationContainer;
11
+ private orientations;
12
+ get orientation(): string;
13
+ handleItemClick(id: NotificationID): void;
14
+ handleItemClose(id: NotificationID): void;
28
15
  static ɵfac: i0.ɵɵFactoryDeclaration<NewNotificationsComponent, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<NewNotificationsComponent, "aeb-new-notifications", never, { "notifications": "notifications"; "notificationPosition": "notificationPosition"; }, { "close": "close"; "clickItem": "clickItem"; }, never, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<NewNotificationsComponent, "aeb-new-notifications", never, { "notifications": "notifications"; "notificationsPosition": "notificationsPosition"; }, { "notificationClick": "notificationClick"; "notificationClose": "notificationClose"; }, never, never>;
30
17
  }
@@ -1,8 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./new-notifications.component";
3
- import * as i2 from "@angular/common";
3
+ import * as i2 from "./notification/notification.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@angular/platform-browser/animations";
4
6
  export declare class NewNotificationsModule {
5
7
  static ɵfac: i0.ɵɵFactoryDeclaration<NewNotificationsModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<NewNotificationsModule, [typeof i1.NewNotificationsComponent], [typeof i2.CommonModule], [typeof i1.NewNotificationsComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NewNotificationsModule, [typeof i1.NewNotificationsComponent, typeof i2.NotificationComponent], [typeof i3.CommonModule, typeof i4.BrowserAnimationsModule], [typeof i1.NewNotificationsComponent, typeof i2.NotificationComponent]>;
7
9
  static ɵinj: i0.ɵɵInjectorDeclaration<NewNotificationsModule>;
8
10
  }
@@ -0,0 +1,43 @@
1
+ /// <reference types="node" />
2
+ import { AnimationEvent } from '@angular/animations';
3
+ import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
4
+ import * as i0 from "@angular/core";
5
+ export declare type NotificationID = string | number;
6
+ export interface NotificationModel {
7
+ id: string | number;
8
+ message: string;
9
+ header: string;
10
+ iconPath: string;
11
+ lifeTime?: number;
12
+ }
13
+ export declare class NotificationComponent implements OnInit, OnDestroy, OnChanges {
14
+ id: NotificationID;
15
+ message: string;
16
+ header: string;
17
+ iconPath: string;
18
+ /**
19
+ * Время "жизни" уведомления в секундах.
20
+ * Если передано falsy значение (0/null/undefined/etc), то уведомление не будет исчезать.
21
+ */
22
+ lifeTime: number;
23
+ clickNotification: EventEmitter<NotificationID>;
24
+ closeNotification: EventEmitter<NotificationID>;
25
+ private notification;
26
+ state: 'closed' | 'open';
27
+ isHovered: boolean;
28
+ timeout: NodeJS.Timeout;
29
+ private onOver;
30
+ private onLeave;
31
+ private onClick;
32
+ ngOnInit(): void;
33
+ ngOnChanges(changes: SimpleChanges): void;
34
+ ngOnDestroy(): void;
35
+ /**
36
+ * Вызывается при завершении перехода от одного state к другому
37
+ */
38
+ captureDoneEvent(event: AnimationEvent): void;
39
+ handleClose(id: NotificationID): void;
40
+ private waitUntilClose;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationComponent, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotificationComponent, "aeb-notification", never, { "id": "id"; "message": "message"; "header": "header"; "iconPath": "iconPath"; "lifeTime": "lifeTime"; }, { "clickNotification": "clickNotification"; "closeNotification": "closeNotification"; }, never, never>;
43
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aeb-ui-kit",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0",
6
6
  "@angular/core": "^13.0.0",
package/public-api.d.ts CHANGED
@@ -56,6 +56,7 @@ export * from './lib/new-tooltip/new-tooltip.component';
56
56
  export * from './lib/new-tooltip/tooltip.directive';
57
57
  export * from './lib/new-notifications/new-notifications.module';
58
58
  export * from './lib/new-notifications/new-notifications.component';
59
+ export * from './lib/new-notifications/notification/notification.component';
59
60
  export * from './lib/datepicker/datepicker.component';
60
61
  export * from './lib/datepicker/datepicker.module';
61
62
  export * from './lib/datepicker/datepicker-core/datepicker-core.component';