chat-panel.component.d.ts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import { AfterViewInit, ElementRef, OnInit } from '@angular/core';
  2. import { ActivatedRoute, Router } from '@angular/router';
  3. import { FmodeChat, FmodeChatMessage } from '../../service-fmai/service-chat';
  4. import { ChatService } from '../../service-fmai/service-chat';
  5. import { FmChatHeaderArea } from '../chat-header-area';
  6. import { ModalController } from '@ionic/angular/standalone';
  7. import * as i0 from "@angular/core";
  8. export declare class ChatPanelComponent implements OnInit, AfterViewInit {
  9. private route;
  10. private router;
  11. private chatServ;
  12. headerArea: FmChatHeaderArea;
  13. goBack: Function;
  14. onChatSaved: (chat: FmodeChat) => void;
  15. onChatInit: (chat: FmodeChat) => void;
  16. onMessage: (chat: FmodeChat, message: FmodeChatMessage) => void;
  17. onUserSend: (chat: FmodeChat, message: FmodeChatMessage) => boolean | Promise<boolean>;
  18. onClose: (chat: FmodeChat) => boolean | Promise<boolean>;
  19. mode: 'modal' | 'page';
  20. chatId: string;
  21. maskId: any;
  22. roleId: string;
  23. fmodeChat: FmodeChat;
  24. leftButtons: any[] | undefined;
  25. modelList: any[] | undefined;
  26. isDirect: boolean;
  27. showInputModal: boolean;
  28. showMessageArea: boolean;
  29. showHeaderArea: boolean;
  30. hideShare: boolean;
  31. hideModalSelect: boolean;
  32. hideInputPreview: boolean;
  33. constructor(route: ActivatedRoute, router: Router, chatServ: ChatService);
  34. contentComp: ElementRef;
  35. /**
  36. * 监听DIV变化自动滚动至底部,改为更新内容区域组件
  37. */
  38. listenDivChange(): void;
  39. ngAfterViewInit(): void;
  40. ngOnInit(): void;
  41. initChat(data?: any): Promise<void>;
  42. sayWelcome(): void;
  43. loadMask(): void;
  44. static ɵfac: i0.ɵɵFactoryDeclaration<ChatPanelComponent, never>;
  45. static ɵcmp: i0.ɵɵComponentDeclaration<ChatPanelComponent, "app-chat-panel", never, { "goBack": { "alias": "goBack"; "required": false; }; "onChatSaved": { "alias": "onChatSaved"; "required": false; }; "onChatInit": { "alias": "onChatInit"; "required": false; }; "onMessage": { "alias": "onMessage"; "required": false; }; "onUserSend": { "alias": "onUserSend"; "required": false; }; "onClose": { "alias": "onClose"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "chatId": { "alias": "chatId"; "required": false; }; "maskId": { "alias": "maskId"; "required": false; }; "roleId": { "alias": "roleId"; "required": false; }; "leftButtons": { "alias": "leftButtons"; "required": false; }; "modelList": { "alias": "modelList"; "required": false; }; "isDirect": { "alias": "isDirect"; "required": false; }; "showInputModal": { "alias": "showInputModal"; "required": false; }; "showMessageArea": { "alias": "showMessageArea"; "required": false; }; "showHeaderArea": { "alias": "showHeaderArea"; "required": false; }; "hideShare": { "alias": "hideShare"; "required": false; }; "hideModalSelect": { "alias": "hideModalSelect"; "required": false; }; "hideInputPreview": { "alias": "hideInputPreview"; "required": false; }; }, {}, never, ["[chat-header]", "[chat-content]", "[chat-footer]"], true, never>;
  46. }
  47. export interface ChatPanelOptions {
  48. roleId: string;
  49. chatId?: string;
  50. pid?: string;
  51. leftButtons?: any[];
  52. modelList?: any[];
  53. isDirect?: boolean;
  54. hideModalSelect?: boolean;
  55. hideShare?: boolean;
  56. hideInputPreview?: boolean;
  57. onChatInit?: (chat: FmodeChat) => void;
  58. onChatSaved?: (chat: FmodeChat) => void;
  59. onUserSend?: (chat: FmodeChat, message: FmodeChatMessage) => boolean | Promise<boolean>;
  60. onMessage?: (chat: FmodeChat, message: FmodeChatMessage) => void;
  61. onClose?: (chat: FmodeChat) => boolean | Promise<boolean>;
  62. }
  63. export declare function openChatPanelModal(modalCtrl: ModalController, options: ChatPanelOptions): Promise<HTMLIonModalElement>;