chat-panel.component.d.ts 3.7 KB

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