@ts-core/angular 15.0.11 → 15.0.13
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/bottomSheet/BottomSheetService.d.ts +16 -0
- package/esm2020/bottomSheet/BottomSheetService.mjs +4 -0
- package/esm2020/notification/INotification.mjs +7 -0
- package/esm2020/notification/INotificationConfig.mjs +2 -0
- package/esm2020/notification/INotificationContent.mjs +132 -0
- package/esm2020/notification/NotificationConfig.mjs +16 -0
- package/esm2020/notification/NotificationService.mjs +4 -0
- package/esm2020/notification/NotificationServiceEvent.mjs +8 -0
- package/esm2020/public-api.mjs +10 -1
- package/esm2020/window/WindowConfig.mjs +2 -2
- package/esm2020/window/WindowService.mjs +1 -1
- package/fesm2015/ts-core-angular.mjs +164 -1
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +164 -1
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/notification/INotification.d.ts +27 -0
- package/notification/INotificationConfig.d.ts +9 -0
- package/notification/INotificationContent.d.ts +31 -0
- package/notification/NotificationConfig.d.ts +14 -0
- package/notification/NotificationService.d.ts +23 -0
- package/notification/NotificationServiceEvent.d.ts +6 -0
- package/package.json +1 -1
- package/public-api.d.ts +7 -0
- package/window/WindowService.d.ts +2 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IDestroyable } from '@ts-core/common';
|
|
2
|
+
import { INotificationContent } from './INotificationContent';
|
|
3
|
+
import { NotificationConfig } from './NotificationConfig';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
export declare abstract class INotification<T = any> implements IDestroyable {
|
|
6
|
+
abstract getX(): number;
|
|
7
|
+
abstract getY(): number;
|
|
8
|
+
abstract setX(value: number): void;
|
|
9
|
+
abstract setY(value: number): void;
|
|
10
|
+
abstract move(x: number, y: number): void;
|
|
11
|
+
abstract getWidth(): number;
|
|
12
|
+
abstract getHeight(): number;
|
|
13
|
+
abstract setWidth(value: number): void;
|
|
14
|
+
abstract setHeight(value: number): void;
|
|
15
|
+
abstract setSize(width: number, height: number): void;
|
|
16
|
+
abstract close(): void;
|
|
17
|
+
abstract remove(): void;
|
|
18
|
+
abstract destroy(): void;
|
|
19
|
+
abstract emit(event: string): void;
|
|
20
|
+
readonly events: Observable<string>;
|
|
21
|
+
readonly container: HTMLElement;
|
|
22
|
+
readonly config: NotificationConfig<T>;
|
|
23
|
+
readonly content: INotificationContent<T>;
|
|
24
|
+
}
|
|
25
|
+
export declare enum NotificationEvent {
|
|
26
|
+
REMOVED = "REMOVED"
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AfterViewInit, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { DestroyableContainer } from '@ts-core/common';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { INotification } from './INotification';
|
|
5
|
+
import { NotificationConfig } from './NotificationConfig';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare abstract class INotificationContent<T = any> extends DestroyableContainer implements AfterViewInit {
|
|
8
|
+
container: ViewContainerRef;
|
|
9
|
+
protected timer: any;
|
|
10
|
+
protected _config: NotificationConfig<T>;
|
|
11
|
+
protected _notification: INotification<T>;
|
|
12
|
+
constructor(container: ViewContainerRef);
|
|
13
|
+
protected commitNotificationProperties(): void;
|
|
14
|
+
protected commitConfigProperties(): void;
|
|
15
|
+
protected clearTimer(): void;
|
|
16
|
+
protected timerHandler: () => void;
|
|
17
|
+
close(): void;
|
|
18
|
+
remove(): void;
|
|
19
|
+
emit(event: string): void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
ngAfterViewInit(): void;
|
|
22
|
+
handleCloseClick(): void;
|
|
23
|
+
get data(): T;
|
|
24
|
+
get events(): Observable<string>;
|
|
25
|
+
get notification(): INotification<T>;
|
|
26
|
+
set notification(value: INotification<T>);
|
|
27
|
+
set config(value: NotificationConfig<T>);
|
|
28
|
+
get config(): NotificationConfig<T>;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<INotificationContent<any>, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<INotificationContent<any>, "ng-component", never, { "config": "config"; }, {}, never, never, false, never>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WindowConfig } from '../window/WindowConfig';
|
|
2
|
+
import { INotificationConfig } from './INotificationConfig';
|
|
3
|
+
export declare class NotificationConfig<T = any> extends WindowConfig<T> implements INotificationConfig<T> {
|
|
4
|
+
icon: string;
|
|
5
|
+
sound: string;
|
|
6
|
+
iconId: string;
|
|
7
|
+
picture: string;
|
|
8
|
+
closeDuration: number;
|
|
9
|
+
isRemoveAfterClose: boolean;
|
|
10
|
+
constructor(data?: T);
|
|
11
|
+
}
|
|
12
|
+
export declare type NotificationConfigOptions<T = any> = {
|
|
13
|
+
[P in keyof NotificationConfig<T>]?: any;
|
|
14
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ObservableData, ClassType, Destroyable } from '@ts-core/common';
|
|
2
|
+
import { IQuestion, IQuestionOptions } from '../question/IQuestion';
|
|
3
|
+
import { INotification } from './INotification';
|
|
4
|
+
import { INotificationConfig } from './INotificationConfig';
|
|
5
|
+
import { INotificationContent } from './INotificationContent';
|
|
6
|
+
import { NotificationConfigOptions } from './NotificationConfig';
|
|
7
|
+
import { NotificationServiceEvent } from './NotificationServiceEvent';
|
|
8
|
+
import { Observable } from 'rxjs';
|
|
9
|
+
export declare abstract class NotificationService extends Destroyable {
|
|
10
|
+
abstract open<U extends INotificationContent<T>, T>(component: ClassType<U>, config: INotificationConfig<T>): U;
|
|
11
|
+
abstract get<T>(value: NotificationId<T>): INotificationConfig<T>;
|
|
12
|
+
abstract has<T>(value: NotificationId<T>): boolean;
|
|
13
|
+
abstract remove<T>(value: NotificationId<T>): void;
|
|
14
|
+
abstract closeAll(): void;
|
|
15
|
+
abstract close<T>(value: NotificationId<T>): INotification<T>;
|
|
16
|
+
abstract info(translationId?: string, translation?: any, questionOptions?: IQuestionOptions, configOptions?: NotificationConfigOptions): IQuestion;
|
|
17
|
+
abstract question(translationId?: string, translation?: any, questionOptions?: IQuestionOptions, configOptions?: NotificationConfigOptions): IQuestion;
|
|
18
|
+
abstract get events(): Observable<ObservableData<NotificationServiceEvent, INotificationConfig | INotification>>;
|
|
19
|
+
abstract get configs(): Array<INotificationConfig>;
|
|
20
|
+
abstract get closedConfigs(): Array<INotificationConfig>;
|
|
21
|
+
abstract get notifications(): Map<INotificationConfig, INotificationContent>;
|
|
22
|
+
}
|
|
23
|
+
export declare type NotificationId<T> = string | INotificationConfig<T> | NotificationConfigOptions<T>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -93,6 +93,13 @@ export * from './window/WindowServiceEvent';
|
|
|
93
93
|
export * from './window/IWindowConfig';
|
|
94
94
|
export * from './window/IWindowContent';
|
|
95
95
|
export * from './window/WindowClosedError';
|
|
96
|
+
export * from './notification/INotification';
|
|
97
|
+
export * from './notification/INotificationConfig';
|
|
98
|
+
export * from './notification/INotificationContent';
|
|
99
|
+
export * from './notification/NotificationConfig';
|
|
100
|
+
export * from './notification/NotificationService';
|
|
101
|
+
export * from './notification/NotificationServiceEvent';
|
|
102
|
+
export * from './bottomSheet/BottomSheetService';
|
|
96
103
|
export * from './module/LazyModuleLoader';
|
|
97
104
|
export * from './transport/TransportLazy';
|
|
98
105
|
export * from './transport/TransportLazyModule';
|
|
@@ -7,11 +7,11 @@ import { IWindowConfig } from './IWindowConfig';
|
|
|
7
7
|
import { IQuestion, IQuestionOptions } from '../question/IQuestion';
|
|
8
8
|
import { WindowServiceEvent } from './WindowServiceEvent';
|
|
9
9
|
export declare abstract class WindowService extends Destroyable {
|
|
10
|
-
abstract open<U extends IWindowContent<T>, T>(component: ClassType<U>, config: IWindowConfig): U;
|
|
10
|
+
abstract open<U extends IWindowContent<T>, T>(component: ClassType<U>, config: IWindowConfig<T>): U;
|
|
11
11
|
abstract get<T>(value: WindowId<T>): IWindowContent<T>;
|
|
12
12
|
abstract has<T>(value: WindowId<T>): boolean;
|
|
13
13
|
abstract setOnTop<T>(value: WindowId<T>): boolean;
|
|
14
|
-
abstract
|
|
14
|
+
abstract closeAll(): void;
|
|
15
15
|
abstract info(translationId?: string, translation?: any, questionOptions?: IQuestionOptions, configOptions?: WindowConfigOptions): IQuestion;
|
|
16
16
|
abstract question(translationId?: string, translation?: any, questionOptions?: IQuestionOptions, configOptions?: WindowConfigOptions): IQuestion;
|
|
17
17
|
abstract get events(): Observable<ObservableData<WindowServiceEvent, IWindow>>;
|