@plaso-infi/whiteboard-sdk 0.4.4 → 0.4.6

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.
@@ -30,6 +30,107 @@ interface EventManagerT<ET = any> {
30
30
  type DocumentType = 'ppt' | 'pdf' | 'excel' | 'word';
31
31
  type FileType = 'image' | 'document' | 'video' | 'audio';
32
32
 
33
+ type MeetingId = string;
34
+ type MeetingJoinerId = string;
35
+ declare enum MeetingStatus {
36
+ /** 待开始 */
37
+ PENDING = 0,
38
+ /** 已开始 */
39
+ ON_GOING = 1,
40
+ /** 已结束 */
41
+ ENDED = 2,
42
+ /** 已取消 */
43
+ CANCELED = 3
44
+ }
45
+ declare enum DefaultForceFollow {
46
+ No = 0,
47
+ Yes = 1
48
+ }
49
+ declare enum DefaultPerm {
50
+ SameWithSdk = 0,
51
+ Edit = 1,
52
+ Comment = 2,
53
+ View = 3
54
+ }
55
+ /** 静态会议 interface */
56
+ interface StaticMeetingData {
57
+ id: MeetingId;
58
+ title: string;
59
+ host: string;
60
+ planJoiners: MeetingJoinerId[];
61
+ planStart: number;
62
+ planEnd: number;
63
+ status?: MeetingStatus;
64
+ joined?: boolean;
65
+ coHosts: string[];
66
+ openAhead: number;
67
+ defaultForceFollow: DefaultForceFollow;
68
+ defaultPerm: DefaultPerm;
69
+ }
70
+ type EditMeetingCmpProp = {
71
+ data: StaticMeetingData | null;
72
+ onSubmit: (data: StaticMeetingData) => Promise<void>;
73
+ onFormChanged: (dirty: boolean) => void;
74
+ getCurServerTime: () => number;
75
+ };
76
+ type AddMemberCmpProp = {
77
+ curJoiners: string[];
78
+ onSubmit: (joiners: string[]) => void;
79
+ onCancel: () => void;
80
+ listAll: boolean;
81
+ getMeetingLink(): void;
82
+ };
83
+ declare enum ExitMeetingStatus {
84
+ /** 设备冲突 */
85
+ CONFLICT = 0,
86
+ /** 主持人结束、会议时间到了结束 */
87
+ END = 1,
88
+ /** 网络重试断连 */
89
+ RETRY = 2,
90
+ /** 普通离开 */
91
+ LEAVE = 3,
92
+ /** 被踢出 */
93
+ KICKOUT = 4,
94
+ /** 主动点击按钮离开 */
95
+ CLICKLEAVEBTN = 5
96
+ }
97
+ type MeetingConfigs = {
98
+ /** 是否能在会议中查看成员列表,及是否可以直接添加参会人员 */
99
+ couldCheckMemberList?: boolean;
100
+ /** 是否可以发起会议 */
101
+ couldCreateMeeting?: boolean;
102
+ /** 编辑会议使用的 React 组件, */
103
+ EditMeetingCmp?: FC<EditMeetingCmpProp>;
104
+ /** 添加会议成员使用的 React 组件 */
105
+ AddMemberCmp?: FC<AddMemberCmpProp>;
106
+ /** 用于打开画布后自动进入会议,Id 为会议 ID,画布中人为创建的会议 ID 可以从 REST 回调中获取 */
107
+ autoJoinId?: string;
108
+ /**
109
+ * 自动加入当前画布上的第一个会议,与 autoJoinId 不同的是不需要设置会议 ID,
110
+ * 如果画布中仅有一场与当前用户相关的会议,使用起来会更加方便
111
+ * */
112
+ autoJoinMeeting?: boolean;
113
+ /** 启用自动加入会议时,默认会弹出会议弹窗供用户确认,如果不想显示入会确认弹窗,则可以将本配置项置为 false */
114
+ showAutoJoinModal?: boolean;
115
+ /**
116
+ * 进入会议前的确认函数,可以用来拦截进入会议的行为。
117
+ * @param
118
+ * - type: 'fast' | 'reserve' 快速会议,或者预定的会议
119
+ * - meetingId: 会议 ID 信息,可以从 REST 回调处获取
120
+ */
121
+ preCheckMeetingAccessibility?: (type?: 'fast' | 'reserve', meetingId?: string) => Promise<boolean>;
122
+ /** 即将加入会议的回调函数,在即将入会前执行 */
123
+ onJoinMeeting?: () => void;
124
+ /**
125
+ * 即将离开会议时的回调函数,在即将退出会议时执行
126
+ * @param
127
+ * - meetingId: 会议 ID
128
+ * */
129
+ onLeaveMeeting?: (meetingId: string) => void;
130
+ /** 确定离开会议时的回调函数,入参为离开会议的原因 */
131
+ didLeaveMeeting?: (exitStatus: ExitMeetingStatus) => void;
132
+ };
133
+
33
134
  type WebsdkEngineType = {
34
135
  customFoldableTools?: SdkPluginSlotType[];
35
136
  customBottomRightTools?: SdkBottomRightPluginSlotType[];
@@ -85,6 +186,14 @@ type InfiWebSdkPlugin = {
85
186
  beforeInit?: (plugin: InfiSdkPluginType) => void;
86
187
  /** 当前仅官方 Plugin 可用,详情请参考官方插件文档 */
87
188
  config?: GroupTalkConfig | undefined;
189
+ };
190
+ type GroupTalkConfig = {
191
+ /** 分组讨论默认组数,默认值为 2 */
192
+ defaultGroupsNumber: number;
193
+ /** 分组讨论组数上限, 默认值为 100 */
194
+ maxGroupsNumber: number;
195
+ /** 是否可以创建分组讨论, 默认值为 false */
196
+ canCreateTalk?: boolean;
88
197
  };
89
198
 
90
199
  type ToolBarType = 'sticker' | 'template' | 'shapes' | 'upload' | 'stickyNote' | 'draw' | 'frame' | 'connectLine' | 'table' | 'timer' | 'mindMap' | 'text' | 'comment' | 'webpage' | 'kanban';
@@ -603,72 +712,6 @@ interface InfiWebSdkType {
603
712
  getSdkInstance: (configs: GetSdkInstanceConfigs) => GetSdkInstanceReturnType;
604
713
  readonly version: string;
605
714
  }
606
- type MeetingId = string;
607
- type MeetingJoinerId = string;
608
- declare enum MeetingStatus {
609
- /** 待开始 */
610
- PENDING = 0,
611
- /** 已开始 */
612
- ON_GOING = 1,
613
- /** 已结束 */
614
- ENDED = 2,
615
- /** 已取消 */
616
- CANCELED = 3
617
- }
618
- declare enum DefaultForceFollow {
619
- No = 0,
620
- Yes = 1
621
- }
622
- declare enum DefaultPerm {
623
- SameWithSdk = 0,
624
- Edit = 1,
625
- Comment = 2,
626
- View = 3
627
- }
628
- /** 静态会议 interface */
629
- interface StaticMeetingData {
630
- id: MeetingId;
631
- title: string;
632
- host: string;
633
- planJoiners: MeetingJoinerId[];
634
- planStart: number;
635
- planEnd: number;
636
- status?: MeetingStatus;
637
- joined?: boolean;
638
- coHosts: string[];
639
- openAhead: number;
640
- defaultForceFollow: DefaultForceFollow;
641
- defaultPerm: DefaultPerm;
642
- }
643
- type EditMeetingCmpProp = {
644
- data: StaticMeetingData | null;
645
- onSubmit: (data: StaticMeetingData) => Promise<void>;
646
- onFormChanged: (dirty: boolean) => void;
647
- getCurServerTime: () => number;
648
- };
649
- type AddMemberCmpProp = {
650
- curJoiners: string[];
651
- onSubmit: (joiners: string[]) => void;
652
- onCancel: () => void;
653
- listAll: boolean;
654
- getMeetingLink(): void;
655
- };
656
- type MeetingConfigs = {
657
- /** 是否能在会议中查看成员列表,及是否可以直接添加参会人员 */
658
- couldCheckMemberList?: boolean;
659
- /** 是否可以发起会议 */
660
- couldCreateMeeting?: boolean;
661
- EditMeetingCmp?: FC<EditMeetingCmpProp>;
662
- AddMemberCmp?: FC<AddMemberCmpProp>;
663
- };
664
- type GroupTalkConfig = {
665
- /** 分组讨论默认组数,默认值为 2 */
666
- defaultGroupsNumber: number;
667
- /** 分组讨论组数上限, 默认值为 100 */
668
- maxGroupsNumber: number;
669
- /** 是否可以创建分组讨论, 默认值为 false */
670
- canCreateTalk?: boolean;
671
- };
672
715
  type AuthCheckResult = {
673
716
  code: STATUS_CODE;
674
717
  message?: string;
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export{D as DefaultPerm,F as FULL_TOOLBAR_CONFIG,a as GridType,G as GroupTalkPlugin,H as HoverTip,S as SDKContext,e as Setting,f as SvgIcon,h as SvgManager,I as default,d as getDocumentType,c as getFileType}from"./index-f63b012c.js";import"react";import"react-dom";
1
+ export{D as DefaultPerm,F as FULL_TOOLBAR_CONFIG,a as GridType,G as GroupTalkPlugin,H as HoverTip,S as SDKContext,e as Setting,f as SvgIcon,h as SvgManager,I as default,d as getDocumentType,c as getFileType}from"./index-f8474078.js";import"react";import"react-dom";