myrta-ui 17.1.63 → 17.1.65

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.
Files changed (25) hide show
  1. package/esm2022/lib/services/index.mjs +2 -1
  2. package/esm2022/lib/services/notify-service/components/index.mjs +2 -0
  3. package/esm2022/lib/services/notify-service/components/notification/notification.component.mjs +21 -0
  4. package/esm2022/lib/services/notify-service/enums/index.mjs +3 -0
  5. package/esm2022/lib/services/notify-service/enums/notification-position.enum.mjs +8 -0
  6. package/esm2022/lib/services/notify-service/enums/notification-type.enum.mjs +8 -0
  7. package/esm2022/lib/services/notify-service/index.mjs +4 -0
  8. package/esm2022/lib/services/notify-service/models/index.mjs +2 -0
  9. package/esm2022/lib/services/notify-service/models/notification-config.model.mjs +2 -0
  10. package/esm2022/lib/services/notify-service/models/notification-state.model.mjs +2 -0
  11. package/esm2022/lib/services/notify-service/notification.service.mjs +125 -0
  12. package/fesm2022/myrta-ui.mjs +153 -2
  13. package/fesm2022/myrta-ui.mjs.map +1 -1
  14. package/lib/services/index.d.ts +1 -0
  15. package/lib/services/notify-service/components/index.d.ts +1 -0
  16. package/lib/services/notify-service/components/notification/notification.component.d.ts +13 -0
  17. package/lib/services/notify-service/enums/index.d.ts +2 -0
  18. package/lib/services/notify-service/enums/notification-position.enum.d.ts +6 -0
  19. package/lib/services/notify-service/enums/notification-type.enum.d.ts +6 -0
  20. package/lib/services/notify-service/index.d.ts +4 -0
  21. package/lib/services/notify-service/models/index.d.ts +2 -0
  22. package/lib/services/notify-service/models/notification-config.model.d.ts +14 -0
  23. package/lib/services/notify-service/models/notification-state.model.d.ts +11 -0
  24. package/lib/services/notify-service/notification.service.d.ts +27 -0
  25. package/package.json +1 -1
@@ -10,3 +10,4 @@ export * from './toaster-service/toaster-service.module';
10
10
  export * from './toaster-service/toaster-service.service';
11
11
  export * from './toaster-service/models/toaster.model';
12
12
  export * from './toaster-service/config';
13
+ export * from './notify-service';
@@ -0,0 +1 @@
1
+ export { NotifyComponent } from './notification/notification.component';
@@ -0,0 +1,13 @@
1
+ import { NotifyConfig } from '../../models';
2
+ import { NotifyType } from '../../enums';
3
+ import { EventEmitter } from '@angular/core';
4
+ import * as i0 from "@angular/core";
5
+ export declare class NotifyComponent {
6
+ config: NotifyConfig;
7
+ NotifyType: typeof NotifyType;
8
+ close: EventEmitter<void>;
9
+ pause: EventEmitter<void>;
10
+ resume: EventEmitter<void>;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotifyComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotifyComponent, "app-notification", never, {}, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,2 @@
1
+ export { NotifyType } from './notification-type.enum';
2
+ export { NotifyPosition } from './notification-position.enum';
@@ -0,0 +1,6 @@
1
+ export declare enum NotifyPosition {
2
+ TopLeft = "top-left",
3
+ TopRight = "top-right",
4
+ BottomLeft = "bottom-left",
5
+ BottomRight = "bottom-right"
6
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum NotifyType {
2
+ Positive = "positive",
3
+ Negative = "negative",
4
+ Info = "info",
5
+ Attention = "attention"
6
+ }
@@ -0,0 +1,4 @@
1
+ export { NotifyService } from './notification.service';
2
+ export { NotifyComponent } from './components';
3
+ export { NotifyConfig, NotifyState } from './models';
4
+ export { NotifyType, NotifyPosition } from './enums';
@@ -0,0 +1,2 @@
1
+ export { NotifyState } from './notification-state.model';
2
+ export { NotifyConfig } from './notification-config.model';
@@ -0,0 +1,14 @@
1
+ import { NotifyType, NotifyPosition } from '../enums';
2
+ export interface NotifyConfig {
3
+ id?: number;
4
+ title?: string;
5
+ message?: string;
6
+ type?: NotifyType;
7
+ options?: {
8
+ closeButton?: boolean;
9
+ enableHtml?: boolean;
10
+ position?: NotifyPosition;
11
+ duration?: number;
12
+ sticky?: boolean;
13
+ };
14
+ }
@@ -0,0 +1,11 @@
1
+ import { ComponentRef } from '@angular/core';
2
+ import { NotifyConfig } from './notification-config.model';
3
+ import { NotifyComponent } from '../components/notification/notification.component';
4
+ export interface NotifyState {
5
+ id: number;
6
+ config: NotifyConfig;
7
+ componentRef: ComponentRef<NotifyComponent>;
8
+ timeoutId?: ReturnType<typeof setInterval>;
9
+ remainingTime?: number;
10
+ startTime?: number;
11
+ }
@@ -0,0 +1,27 @@
1
+ import { Type } from '@angular/core';
2
+ import { NotifyConfig, NotifyState } from './models';
3
+ import { NotifyComponent } from './components';
4
+ import * as i0 from "@angular/core";
5
+ export declare class NotifyService {
6
+ private readonly _appRef;
7
+ private readonly _environmentInjector;
8
+ private readonly _defaultDuration;
9
+ private readonly _defaultPosition;
10
+ private readonly _defaultSticky;
11
+ private readonly _defaultCloseButton;
12
+ private readonly _defaultEnableHtml;
13
+ private readonly _defaultNotificationComponent;
14
+ private readonly _animationDuration;
15
+ private _notificationId;
16
+ notifications: import("@angular/core").WritableSignal<NotifyState[]>;
17
+ show(config: NotifyConfig, component?: Type<NotifyComponent>): number;
18
+ remove(id: number): void;
19
+ private _createNotificationComponent;
20
+ private _removeNotification;
21
+ private _pauseNotification;
22
+ private _resumeNotification;
23
+ private _getOrCreatePositionContainer;
24
+ private _cleanupEmptyContainers;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotifyService, never>;
26
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotifyService>;
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myrta-ui",
3
- "version": "17.1.63",
3
+ "version": "17.1.65",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.0",
6
6
  "@angular/core": "^17.3.0",