import * as i0 from '@angular/core'; import { InjectionToken, ElementRef, Signal } from '@angular/core'; import * as i1 from '@angular/common'; import * as i2 from 'ngx-tethys/shared'; import * as i3 from '@angular/cdk/overlay'; import * as i4 from '@angular/cdk/portal'; import * as i5 from 'ngx-tethys/icon'; import * as ngx_tethys_notify from 'ngx-tethys/notify'; import { ThyMessageBaseConfig, ThyAbstractMessageRef, ThyAbstractMessageQueue, ThyAbstractMessageContainerComponent, ThyAbstractMessageComponent, ThyAbstractMessageService } from 'ngx-tethys/message'; import { ComponentTypeOrTemplateRef } from 'ngx-tethys/core'; import { ThyNotifyLocale } from 'ngx-tethys/i18n'; type ThyNotifyPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'; type ThyNotifyType = 'blank' | 'success' | 'error' | 'warning' | 'info'; interface ThyGlobalNotifyConfig { placement?: ThyNotifyPlacement; pauseOnHover?: boolean; duration?: number; maxStack?: number; offset?: string; } interface ThyNotifyDetail { link?: string; content?: string; action?: (event?: Event) => void; } interface ThyNotifyAction { text: string; icon?: string; onClick: () => void; } /** * 打开notify通知的配置 * @public * @order 10 */ interface ThyNotifyConfig extends ThyMessageBaseConfig { /** * 通知弹出位置 */ placement?: ThyNotifyPlacement; /** * 弹出通知的类型 */ type?: ThyNotifyType; /** * 标题 */ title?: string; /** * 提示内容 */ content?: string | ComponentTypeOrTemplateRef; contentInitialState?: any; /** * 提示内容的详情,是对内容的详情描述,也可以是能够操作的链接,link是链接名,content是详情描述,action是点击的方法 */ detail?: string | ThyNotifyDetail; /** * 自定义传入html模板 */ html?: ElementRef; /** * 通知操作按钮,text为按钮文本,icon为按钮图标,onClick为点击事件 */ actions?: ThyNotifyAction[]; } declare const THY_NOTIFY_DEFAULT_CONFIG: InjectionToken; declare const THY_NOTIFY_DEFAULT_CONFIG_VALUE: ThyGlobalNotifyConfig; declare const THY_NOTIFY_DEFAULT_CONFIG_PROVIDER: { provide: InjectionToken; useValue: ThyGlobalNotifyConfig; }; declare class ThyNotifyRef extends ThyAbstractMessageRef { } /** * @internal */ declare class ThyNotifyQueue extends ThyAbstractMessageQueue { topLeftQueues: i0.Signal; topRightQueues: i0.Signal; bottomLeftQueues: i0.Signal; bottomRightQueues: i0.Signal; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * @private */ declare class ThyNotifyContainer extends ThyAbstractMessageContainerComponent { notifyQueue: ThyNotifyQueue; defaultConfig: { placement?: ngx_tethys_notify.ThyNotifyPlacement; pauseOnHover?: boolean; duration?: number; maxStack?: number; offset?: string; }; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @private */ declare class ThyNotify extends ThyAbstractMessageComponent { animationState?: string; extendContentClass: i0.WritableSignal; isShowDetail: i0.WritableSignal; readonly contentIsString: i0.Signal; protected queue: ThyNotifyQueue; private placement; readonly actions: i0.Signal; constructor(); extendContent(): void; showDetailToggle(): void; triggerDetail(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ThyNotifyModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * @order 20 */ declare class ThyNotifyService extends ThyAbstractMessageService { private notifyQueue; protected config: ThyGlobalNotifyConfig; locale: Signal; private _lastNotifyId; private defaultConfig; constructor(); /** * 打开自定义配置的 Notify */ show(config: ThyNotifyConfig): ThyNotifyRef; /** * 打开类型为"success"的 Notify */ success(title?: string, content?: string | ComponentTypeOrTemplateRef, config?: ThyNotifyConfig): ThyNotifyRef; /** * 打开类型为"info"的 Notify */ info(title?: string, content?: string | ComponentTypeOrTemplateRef, config?: ThyNotifyConfig): ThyNotifyRef; /** * 打开类型为"warning"的 Notify */ warning(title?: string, content?: string | ComponentTypeOrTemplateRef, config?: ThyNotifyConfig): ThyNotifyRef; /** * 打开类型为"error"的 Notify */ error(title?: string, content?: string | ComponentTypeOrTemplateRef, config?: ThyNotifyConfig): ThyNotifyRef; private formatOptions; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { THY_NOTIFY_DEFAULT_CONFIG, THY_NOTIFY_DEFAULT_CONFIG_PROVIDER, THY_NOTIFY_DEFAULT_CONFIG_VALUE, ThyNotify, ThyNotifyContainer, ThyNotifyModule, ThyNotifyQueue, ThyNotifyRef, ThyNotifyService }; export type { ThyGlobalNotifyConfig, ThyNotifyAction, ThyNotifyConfig, ThyNotifyDetail, ThyNotifyPlacement, ThyNotifyType };