import { ComponentFactoryResolver } from '@angular/core'; import { QueryList } from '@angular/core'; import { AdDirective } from '../directive/ad.directive'; export declare class MessageService { private componentFactoryResolver; constructor(componentFactoryResolver: ComponentFactoryResolver); /** 消息类型库中的组件,---注:外部传入,数据源来自各应用--- */ messageLibs: any; /** 数据源:消息类型配置 */ private source; /** 数据源使用缓存 */ private _source_cache; /** 图标文件地址前缀 */ private iconUrlPrefix; getMessageConfigByName(name: string): any; setData(data: Array): void; /** * 获取消息类型配置文件 * */ getData(): Array; /** * 根据消息类型返回消息配置 * @param type 消息类型 */ getMessageConfigByType(type: number): any; /** * 根据消息类型英文名返回消息配置 * @param name 消息类型英文名 */ getMessageConfigByEnName(name: string): any; /** * 通过order升序排序 * */ sortByOrder(data: Array): Array; /** * 获取消息类型图标 * @return [{type, normal, gray}] * */ getMessageIcons(): any[]; /** * 通过类型获取消息类型的对象,对应之前的 _MSGTYPES.getMsgByType() * @param type 消息类型 */ getMsgByType(type: number): { type: any; name: any; key: any; icon: string; icon_gray: string; patchTypes: any; autoReport: number; autoReply: number; autoBlacklist: number; channelProvider: number; channel: number; moRecord: number; }; /** * 通过消息类型中文名获取消息类型的对象,对应之前的 _MSGTYPES.getMsgByName() * @param name 消息类型 */ getMsgByName(name: string): { type: any; name: any; key: any; icon: string; icon_gray: string; patchTypes: any; autoReport: number; autoReply: number; autoBlacklist: number; channelProvider: number; channel: number; moRecord: number; }; /** * 通过消息类型英文名称来获取对应type * @param name 消息类型 */ getMsgTypeByName(name: string, returnNumber?: boolean): any; /** * 获取所有的消息类型的配置数组,对应之前的 _MSGTYPES.getMsgList() * @returns [...{type: 0, name: '短信'}] */ getMsgList(): any[]; /** * 获取所有的消息类型的对象集合 * @returns //{...SMS: {type: 0, name: '短信',...}, WECHAT: {type: 2, name: '微信',...}} */ getMsgCollection(): any; /** * 获取消息类型与报表的匹配规则 * @returns //[{msgType: 0, reports:[2,4,5], ...}] */ getMsgReportRule(): any[]; /** * 通过组件类型获取对应组件的配置对象,对应之前的 _MSGTYPES.getCompOptionsByType() * @param tplOptions 模板配置 * @param compType 组件类型 * @returns 对应组件的配置对象 */ getCompOptionsByType(tplOptions: any, compType: string): any[]; /** * 缓存angualr库中的消息组件 * */ setMessageLibs(exportLibs: any): void; getComponentsByLib(exportLibs: any): {}; /** * 动态加载消息类型场景组件 * @param injectionToken 消息类型组件的注入令牌 * @param msgTypes 需要动态加载的消息组件的消息类型数组 * @param adHosts 在要动态加载的组件上使用的AdDirective指令查询列表 * @param isRepeatComp true时,当adHosts的数量超过组件数量时,重复显示组件以填充插入点(针对融合发送移动预览场景) */ renderSceneComponents(scene: string, msgTypes: any[], adHosts: QueryList, isRepeatComp?: boolean, adHostIndex?: any): Promise; /** * 根据消息组件的名字动态加载对应组件 */ renderMsgComponent(msgType: number, componentName: string, adHosts: QueryList): Promise; renderByDynamicSign(sign: string, msgType: number, adHosts: QueryList): Promise; getObjValue(arr: any, obj: Object): string; /** * 在插入点动态加载组件 */ loadComponent(msgCompInjector: any, adHost: any): any; getModalDetailComponent(msgType: number, scene?: string): any; }