fmode-ng 0.0.34 → 0.0.37

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.
Files changed (32) hide show
  1. package/esm2022/lib/aigc/avatar/comp-avatar-role-video/comp-avatar-role-video.component.mjs +1 -1
  2. package/esm2022/lib/aigc/chat/chat-header-area/comp-header-area.component.mjs +1 -1
  3. package/esm2022/lib/aigc/chat/chat-list/chat-list.component.mjs +1 -1
  4. package/esm2022/lib/aigc/chat/chat-message-card/comp-message-card.component.mjs +1 -1
  5. package/esm2022/lib/aigc/chat/chat-modal-input/modal-input.component.mjs +1 -1
  6. package/esm2022/lib/aigc/chat/chat-panel/chat-panel.component.mjs +1 -1
  7. package/esm2022/lib/aigc/chat/comp-role-prompt/comp-role-prompt.component.mjs +1 -1
  8. package/esm2022/lib/aigc/service-fmai/service-chat/chat-class.mjs +1 -1
  9. package/esm2022/lib/aigc/service-fmai/service-chat/chat.service.mjs +1 -1
  10. package/esm2022/lib/aigc/voice/audio.player.mjs +10 -0
  11. package/esm2022/lib/aigc/voice/index.mjs +1 -1
  12. package/esm2022/lib/aigc/voice/tts/fmode-tts-class.mjs +1 -1
  13. package/esm2022/lib/social/index.mjs +10 -0
  14. package/esm2022/lib/social/wechat/wechat-jssdk.service.mjs +10 -0
  15. package/esm2022/lib/user/account.service.mjs +1 -1
  16. package/esm2022/lib/video/fm-video/fm-video.component.mjs +10 -0
  17. package/esm2022/lib/video/index.mjs +10 -0
  18. package/esm2022/public-api.mjs +1 -1
  19. package/fesm2022/fmode-ng.mjs +1 -1
  20. package/fesm2022/fmode-ng.mjs.map +1 -1
  21. package/lib/aigc/avatar/comp-avatar-role-video/comp-avatar-role-video.component.d.ts +10 -3
  22. package/lib/aigc/chat/chat-panel/chat-panel.component.d.ts +6 -1
  23. package/lib/aigc/service-fmai/service-chat/chat-class.d.ts +17 -0
  24. package/lib/aigc/voice/audio.player.d.ts +10 -0
  25. package/lib/aigc/voice/index.d.ts +1 -0
  26. package/lib/social/index.d.ts +1 -0
  27. package/lib/social/wechat/wechat-jssdk.service.d.ts +44 -0
  28. package/lib/user/account.service.d.ts +2 -1
  29. package/lib/video/fm-video/fm-video.component.d.ts +15 -0
  30. package/lib/video/index.d.ts +1 -0
  31. package/package.json +1 -1
  32. package/public-api.d.ts +2 -0
@@ -1,16 +1,23 @@
1
- import { AfterViewInit, OnInit, ElementRef } from '@angular/core';
1
+ import { AfterViewInit, OnInit, EventEmitter } from '@angular/core';
2
2
  import { FmodeAvatarRoleComp } from '../interface-avatar-role';
3
3
  import 'recorder-core/src/extensions/waveview';
4
4
  import Parse from "parse";
5
5
  import { FmodeChat } from '../../service-fmai/service-chat/chat-class';
6
+ import { FmVideoComponent } from '../../../video';
7
+ import { NavController } from '@ionic/angular/standalone';
6
8
  import * as i0 from "@angular/core";
7
9
  export declare class CompAvatarRoleVideoComponent implements FmodeAvatarRoleComp, AfterViewInit, OnInit {
8
- avatarVideo: ElementRef<HTMLVideoElement>;
10
+ private navCtrl;
11
+ avatarVideo: FmVideoComponent;
9
12
  animClass: string;
10
13
  fmodeChat: FmodeChat;
11
14
  role: Parse.Object;
12
15
  wave: any;
13
16
  waveInterval: any;
17
+ onClose: EventEmitter<boolean>;
18
+ constructor(navCtrl: NavController);
19
+ close(): void;
20
+ goBack(): void;
14
21
  playWave(): void;
15
22
  stopWave(): void;
16
23
  ngAfterViewInit(): void;
@@ -19,5 +26,5 @@ export declare class CompAvatarRoleVideoComponent implements FmodeAvatarRoleComp
19
26
  playAnimation(): (name: string) => void;
20
27
  playVideo(src: string): void;
21
28
  static ɵfac: i0.ɵɵFactoryDeclaration<CompAvatarRoleVideoComponent, never>;
22
- static ɵcmp: i0.ɵɵComponentDeclaration<CompAvatarRoleVideoComponent, "fm-avatar-role-video", never, { "fmodeChat": { "alias": "fmodeChat"; "required": false; }; "role": { "alias": "role"; "required": false; }; }, {}, never, never, true, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<CompAvatarRoleVideoComponent, "fm-avatar-role-video", never, { "fmodeChat": { "alias": "fmodeChat"; "required": false; }; "role": { "alias": "role"; "required": false; }; }, { "onClose": "onClose"; }, never, never, true, never>;
23
30
  }
@@ -13,13 +13,18 @@ export declare class ChatPanelComponent implements OnInit, AfterViewInit {
13
13
  fmodeChat: FmodeChat;
14
14
  leftButtons: any[] | undefined;
15
15
  modelList: any[] | undefined;
16
+ isDirect: boolean;
17
+ showInputModal: boolean;
18
+ showMessageArea: boolean;
19
+ showHeaderArea: boolean;
16
20
  constructor(route: ActivatedRoute, router: Router, chatServ: ChatService);
17
21
  contentComp: ElementRef;
18
22
  listenDivChange(): void;
19
23
  scrollToBottom(comp: ElementRef): void;
20
24
  ngAfterViewInit(): void;
21
25
  ngOnInit(): void;
26
+ sayWelcome(): void;
22
27
  loadMask(): void;
23
28
  static ɵfac: i0.ɵɵFactoryDeclaration<ChatPanelComponent, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<ChatPanelComponent, "app-chat-panel", never, { "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; }; }, {}, never, never, true, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChatPanelComponent, "app-chat-panel", never, { "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; }; }, {}, never, ["[chat-header]", "[chat-content]", "[chat-footer]"], true, never>;
25
30
  }
@@ -14,6 +14,13 @@ export interface FmodeChatEventMap {
14
14
  onComplete?(FmodeChatMessage: any): void;
15
15
  onSSMLComplete?(FmodeChatMessageVoice: any): void;
16
16
  }
17
+ export interface FmodeChatVoiceConfig {
18
+ voice: string;
19
+ autoTalk: boolean;
20
+ welcome: {
21
+ enabled: true;
22
+ };
23
+ }
17
24
  export declare function getMessageContentText(content: any | string | Array<ChatImageContentItem>): string;
18
25
  export declare function getMessageImageUrl(content: any | string | Array<ChatImageContentItem>): any;
19
26
  export interface ChatImageContentItem {
@@ -49,6 +56,7 @@ export declare class FmodeChat {
49
56
  chatServ: any;
50
57
  userInput: string;
51
58
  userImage: string;
59
+ isDirect: boolean;
52
60
  /**
53
61
  * 虚拟形象展示状态
54
62
  */
@@ -60,6 +68,7 @@ export declare class FmodeChat {
60
68
  * 预置提示词弹窗是否展示
61
69
  */
62
70
  isPromptModalOpen: boolean;
71
+ isPromptMessageAreaShow: boolean;
63
72
  promptList: any;
64
73
  /**
65
74
  * 输入按钮区域
@@ -77,6 +86,7 @@ export declare class FmodeChat {
77
86
  * 开启ssml system提示词
78
87
  * 开启回答文本除xml显示模式
79
88
  */
89
+ voiceConfig: FmodeChatVoiceConfig | undefined;
80
90
  isTalkMode: boolean;
81
91
  SSMLRoleVoice: string;
82
92
  ncloud: NovaCloudService;
@@ -86,6 +96,13 @@ export declare class FmodeChat {
86
96
  * 会话Avatar控制
87
97
  */
88
98
  playAnimation: (animName: string) => void;
99
+ welcome: () => Promise<void>;
100
+ getTimeOfDay(): "早上" | "中午" | "下午" | "晚上";
101
+ self: {
102
+ Person?: Parse.Object | undefined;
103
+ Profile?: Parse.Object | undefined;
104
+ };
105
+ loadSelf(className: any, userKey: any): Promise<any>;
89
106
  /**
90
107
  * 对话模型提示词
91
108
  */
@@ -0,0 +1,10 @@
1
+ export declare class AudioPlayer {
2
+ private static instance;
3
+ private audio;
4
+ private constructor();
5
+ static getInstance(): AudioPlayer;
6
+ setAudioEvent(event: any, func: any): void;
7
+ get duration(): number;
8
+ get src(): string;
9
+ play(src: string): Promise<void>;
10
+ }
@@ -1 +1,2 @@
1
1
  export * from "./fmode-voice.service";
2
+ export * from "./audio.player";
@@ -0,0 +1 @@
1
+ export * from "./wechat/wechat-jssdk.service";
@@ -0,0 +1,44 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { AuthService } from '../../user/auth.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class WechatJssdkService {
5
+ private http;
6
+ private authServ;
7
+ isInit: boolean;
8
+ isWechat: boolean;
9
+ wx: any;
10
+ company: string;
11
+ wechatAccountId: string;
12
+ openid: string;
13
+ constructor(http: HttpClient, authServ: AuthService);
14
+ /**
15
+ * 配置当前页面分享参数
16
+ */
17
+ setCurrentPageShareInfo(shareInfo?: {
18
+ title: string;
19
+ desc: string;
20
+ link: string;
21
+ type: string;
22
+ imgUrl: string;
23
+ success: () => void;
24
+ error: () => void;
25
+ cancel: () => void;
26
+ }): Promise<void>;
27
+ getInviteUrl(url: any): any;
28
+ /**
29
+ * 当前页面获取微信授权签名
30
+ */
31
+ getWXSignPackageInWechat(): Promise<any>;
32
+ /** 微信用户初始化
33
+ * @desc 为当前已登录用户,获取微信授权openid信息
34
+ */
35
+ initUserOpenid(): Promise<void>;
36
+ authWechat(url?: string): void;
37
+ getQueryStringByName(name: string): string;
38
+ getwechat(code: string, url?: string): Promise<boolean>;
39
+ /** 微信环境初始化 */
40
+ init(): Promise<boolean>;
41
+ loadScript(url: any, callback: any, errCallback: any): void;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<WechatJssdkService, never>;
43
+ static ɵprov: i0.ɵɵInjectableDeclaration<WechatJssdkService>;
44
+ }
@@ -12,7 +12,8 @@ export declare class AccountService {
12
12
  profile: Parse.Object;
13
13
  wxAppId: string;
14
14
  wxpayEnabled: boolean;
15
- appid: "wxb4193c93ae9aa696";
15
+ appid: string;
16
+ shareInfo: any;
16
17
  constructor(ncloud: NovaCloudService, authServ: AuthService, http: HttpClient);
17
18
  getProfile(): Promise<void>;
18
19
  getBilling(): Promise<any>;
@@ -0,0 +1,15 @@
1
+ import { OnChanges, SimpleChanges, ElementRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class FmVideoComponent implements OnChanges {
4
+ url: string;
5
+ canvasRef: ElementRef<HTMLCanvasElement>;
6
+ private video;
7
+ private ctx;
8
+ canvasStyle: any;
9
+ constructor();
10
+ ngOnChanges(changes: SimpleChanges): void;
11
+ play(url: string): void;
12
+ private drawFrame;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<FmVideoComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<FmVideoComponent, "fm-video", never, { "url": { "alias": "url"; "required": false; }; "canvasStyle": { "alias": "canvasStyle"; "required": false; }; }, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1 @@
1
+ export * from "./fm-video/fm-video.component";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmode-ng",
3
- "version": "0.0.34",
3
+ "version": "0.0.37",
4
4
  "author": "未来全栈",
5
5
  "license": "COPYRIGHT © 未来飞马 未来全栈 www.fmode.cn All RIGHTS RESERVED",
6
6
  "peerDependencies": {
package/public-api.d.ts CHANGED
@@ -3,4 +3,6 @@ export * from './lib/map';
3
3
  export * from './lib/storage';
4
4
  export * from './lib/platform';
5
5
  export * from './lib/user';
6
+ export * from './lib/social';
7
+ export * from './lib/video';
6
8
  export * from "./lib/nova-cloud";