fcr-ui-scene-mobile 3.4.0
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.
- package/lib/assets/ground_glass_bg.png +0 -0
- package/lib/base.d.ts +11 -0
- package/lib/base.js +39 -0
- package/lib/common/device-store.d.ts +86 -0
- package/lib/common/device-store.js +642 -0
- package/lib/common/device-stream-store.d.ts +26 -0
- package/lib/common/device-stream-store.js +298 -0
- package/lib/common/event-store.d.ts +124 -0
- package/lib/common/event-store.js +249 -0
- package/lib/common/global-context.d.ts +11 -0
- package/lib/common/global-context.js +9 -0
- package/lib/common/member-list-data-source.d.ts +28 -0
- package/lib/common/member-list-data-source.js +305 -0
- package/lib/common/participant-store.d.ts +195 -0
- package/lib/common/participant-store.js +1577 -0
- package/lib/common/security-store.d.ts +119 -0
- package/lib/common/security-store.js +948 -0
- package/lib/common/setting-store.d.ts +181 -0
- package/lib/common/setting-store.js +797 -0
- package/lib/common/type.d.ts +73 -0
- package/lib/common/type.js +22 -0
- package/lib/config/default-config.d.ts +32 -0
- package/lib/config/default-config.js +39 -0
- package/lib/config/setting-config.d.ts +16 -0
- package/lib/config/setting-config.js +17 -0
- package/lib/creator.d.ts +10 -0
- package/lib/creator.js +49 -0
- package/lib/global.d.ts +8 -0
- package/lib/hooks/meeting-time.d.ts +15 -0
- package/lib/hooks/meeting-time.js +92 -0
- package/lib/hooks/useIsNodePresent.d.ts +4 -0
- package/lib/hooks/useIsNodePresent.js +53 -0
- package/lib/hooks/useOnRefMount.d.ts +2 -0
- package/lib/hooks/useOnRefMount.js +27 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +50 -0
- package/lib/mobile-global.css +28 -0
- package/lib/modules/action-bar/bottom-icons.d.ts +17 -0
- package/lib/modules/action-bar/bottom-icons.js +160 -0
- package/lib/modules/action-bar/context.d.ts +2 -0
- package/lib/modules/action-bar/context.js +9 -0
- package/lib/modules/action-bar/index.css +33 -0
- package/lib/modules/action-bar/index.d.ts +27 -0
- package/lib/modules/action-bar/index.js +46 -0
- package/lib/modules/action-bar/member-list-popup/attendee/index.css +130 -0
- package/lib/modules/action-bar/member-list-popup/attendee/index.d.ts +19 -0
- package/lib/modules/action-bar/member-list-popup/attendee/index.js +252 -0
- package/lib/modules/action-bar/member-list-popup/attendee/list.d.ts +1 -0
- package/lib/modules/action-bar/member-list-popup/attendee/list.js +82 -0
- package/lib/modules/action-bar/member-list-popup/index.css +35 -0
- package/lib/modules/action-bar/member-list-popup/index.d.ts +7 -0
- package/lib/modules/action-bar/member-list-popup/index.js +40 -0
- package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.css +0 -0
- package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.d.ts +12 -0
- package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.js +58 -0
- package/lib/modules/action-bar/more-popup/index.css +71 -0
- package/lib/modules/action-bar/more-popup/index.d.ts +2 -0
- package/lib/modules/action-bar/more-popup/index.js +126 -0
- package/lib/modules/action-bar/store.d.ts +196 -0
- package/lib/modules/action-bar/store.js +1425 -0
- package/lib/modules/action-bar/type.d.ts +6 -0
- package/lib/modules/action-bar/type.js +13 -0
- package/lib/modules/action-bar/view.d.ts +2 -0
- package/lib/modules/action-bar/view.js +75 -0
- package/lib/modules/audio-stream/ index.d.ts +19 -0
- package/lib/modules/audio-stream/ index.js +109 -0
- package/lib/modules/audio-stream/index.d.ts +25 -0
- package/lib/modules/audio-stream/index.js +135 -0
- package/lib/modules/chat/chat-bar/index.css +97 -0
- package/lib/modules/chat/chat-bar/index.d.ts +12 -0
- package/lib/modules/chat/chat-bar/index.js +129 -0
- package/lib/modules/chat/chat-notification/index.css +71 -0
- package/lib/modules/chat/chat-notification/index.d.ts +3 -0
- package/lib/modules/chat/chat-notification/index.js +75 -0
- package/lib/modules/chat/chat-select/index.css +183 -0
- package/lib/modules/chat/chat-select/index.d.ts +12 -0
- package/lib/modules/chat/chat-select/index.js +223 -0
- package/lib/modules/chat/contex.d.ts +2 -0
- package/lib/modules/chat/contex.js +9 -0
- package/lib/modules/chat/demo-wrapper.d.ts +1 -0
- package/lib/modules/chat/demo-wrapper.js +42 -0
- package/lib/modules/chat/index.css +108 -0
- package/lib/modules/chat/index.d.ts +28 -0
- package/lib/modules/chat/index.dev.d.ts +1 -0
- package/lib/modules/chat/index.dev.js +58 -0
- package/lib/modules/chat/index.js +208 -0
- package/lib/modules/chat/message-list.d.ts +22 -0
- package/lib/modules/chat/message-list.js +617 -0
- package/lib/modules/chat/mock.d.ts +2 -0
- package/lib/modules/chat/mock.js +283 -0
- package/lib/modules/chat/store.d.ts +183 -0
- package/lib/modules/chat/store.js +1101 -0
- package/lib/modules/chat/util.d.ts +6 -0
- package/lib/modules/chat/util.js +69 -0
- package/lib/modules/chat/view.d.ts +11 -0
- package/lib/modules/chat/view.js +414 -0
- package/lib/modules/layout/bottom-drawer/index.css +34 -0
- package/lib/modules/layout/bottom-drawer/index.d.ts +3 -0
- package/lib/modules/layout/bottom-drawer/index.js +129 -0
- package/lib/modules/layout/components/Layout.d.ts +1 -0
- package/lib/modules/layout/components/Layout.js +98 -0
- package/lib/modules/layout/components/equip-request-popup/index.css +30 -0
- package/lib/modules/layout/components/equip-request-popup/index.d.ts +3 -0
- package/lib/modules/layout/components/equip-request-popup/index.js +78 -0
- package/lib/modules/layout/components/index.css +78 -0
- package/lib/modules/layout/components/index.d.ts +2 -0
- package/lib/modules/layout/components/index.js +25 -0
- package/lib/modules/layout/context.d.ts +2 -0
- package/lib/modules/layout/context.js +9 -0
- package/lib/modules/layout/drawer-header/index.css +27 -0
- package/lib/modules/layout/drawer-header/index.d.ts +10 -0
- package/lib/modules/layout/drawer-header/index.js +54 -0
- package/lib/modules/layout/index.css +22 -0
- package/lib/modules/layout/index.d.ts +8 -0
- package/lib/modules/layout/index.js +47 -0
- package/lib/modules/layout/store.d.ts +59 -0
- package/lib/modules/layout/store.js +379 -0
- package/lib/modules/layout/type.d.ts +65 -0
- package/lib/modules/layout/type.js +52 -0
- package/lib/modules/layout/view.d.ts +2 -0
- package/lib/modules/layout/view.js +10 -0
- package/lib/modules/member-layout/context.d.ts +2 -0
- package/lib/modules/member-layout/context.js +9 -0
- package/lib/modules/member-layout/data.d.ts +2 -0
- package/lib/modules/member-layout/data.js +304 -0
- package/lib/modules/member-layout/grid/index.css +98 -0
- package/lib/modules/member-layout/grid/index.d.ts +21 -0
- package/lib/modules/member-layout/grid/index.js +316 -0
- package/lib/modules/member-layout/index.css +88 -0
- package/lib/modules/member-layout/index.d.ts +8 -0
- package/lib/modules/member-layout/index.js +45 -0
- package/lib/modules/member-layout/share-toast/index.css +30 -0
- package/lib/modules/member-layout/share-toast/index.d.ts +5 -0
- package/lib/modules/member-layout/share-toast/index.js +43 -0
- package/lib/modules/member-layout/speaker/index.css +30 -0
- package/lib/modules/member-layout/speaker/index.d.ts +9 -0
- package/lib/modules/member-layout/speaker/index.js +28 -0
- package/lib/modules/member-layout/store.d.ts +70 -0
- package/lib/modules/member-layout/store.js +479 -0
- package/lib/modules/member-layout/user/index.css +121 -0
- package/lib/modules/member-layout/user/index.d.ts +34 -0
- package/lib/modules/member-layout/user/index.js +355 -0
- package/lib/modules/member-layout/user/types.d.ts +16 -0
- package/lib/modules/member-layout/user/types.js +6 -0
- package/lib/modules/member-layout/view.d.ts +2 -0
- package/lib/modules/member-layout/view.js +225 -0
- package/lib/modules/state-bar/context.d.ts +2 -0
- package/lib/modules/state-bar/context.js +9 -0
- package/lib/modules/state-bar/index.css +79 -0
- package/lib/modules/state-bar/index.d.ts +17 -0
- package/lib/modules/state-bar/index.js +55 -0
- package/lib/modules/state-bar/leaving-room/index.css +14 -0
- package/lib/modules/state-bar/leaving-room/index.d.ts +7 -0
- package/lib/modules/state-bar/leaving-room/index.js +38 -0
- package/lib/modules/state-bar/meeting-detail/index.css +72 -0
- package/lib/modules/state-bar/meeting-detail/index.d.ts +2 -0
- package/lib/modules/state-bar/meeting-detail/index.js +59 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/copy.d.ts +4 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/copy.js +81 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/index.css +92 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/index.d.ts +2 -0
- package/lib/modules/state-bar/meeting-detail/meeting-info/index.js +188 -0
- package/lib/modules/state-bar/meeting-detail/net-quality/index.css +27 -0
- package/lib/modules/state-bar/meeting-detail/net-quality/index.d.ts +2 -0
- package/lib/modules/state-bar/meeting-detail/net-quality/index.js +87 -0
- package/lib/modules/state-bar/store.d.ts +76 -0
- package/lib/modules/state-bar/store.js +561 -0
- package/lib/modules/state-bar/view.d.ts +7 -0
- package/lib/modules/state-bar/view.js +215 -0
- package/lib/modules/whiteboard/app.d.ts +2 -0
- package/lib/modules/whiteboard/app.js +41 -0
- package/lib/modules/whiteboard/components/control-bar/index.css +53 -0
- package/lib/modules/whiteboard/components/control-bar/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/control-bar/index.js +156 -0
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +35 -0
- package/lib/modules/whiteboard/components/control-bar/store.js +288 -0
- package/lib/modules/whiteboard/components/loading/index.css +76 -0
- package/lib/modules/whiteboard/components/loading/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/loading/index.js +68 -0
- package/lib/modules/whiteboard/components/loading/loading.png +0 -0
- package/lib/modules/whiteboard/components/multi-window/index.css +65 -0
- package/lib/modules/whiteboard/components/multi-window/index.d.ts +5 -0
- package/lib/modules/whiteboard/components/multi-window/index.js +39 -0
- package/lib/modules/whiteboard/components/pagination/index.css +228 -0
- package/lib/modules/whiteboard/components/pagination/index.d.ts +15 -0
- package/lib/modules/whiteboard/components/pagination/index.js +163 -0
- package/lib/modules/whiteboard/components/pagination/store.d.ts +18 -0
- package/lib/modules/whiteboard/components/pagination/store.js +17 -0
- package/lib/modules/whiteboard/components/progress/index.d.ts +5 -0
- package/lib/modules/whiteboard/components/progress/index.js +43 -0
- package/lib/modules/whiteboard/components/progress/style.css +52 -0
- package/lib/modules/whiteboard/components/scene-pagination.d.ts +1 -0
- package/lib/modules/whiteboard/components/scene-pagination.js +30 -0
- package/lib/modules/whiteboard/components/switch-theme/index.css +98 -0
- package/lib/modules/whiteboard/components/switch-theme/index.d.ts +3 -0
- package/lib/modules/whiteboard/components/switch-theme/index.js +89 -0
- package/lib/modules/whiteboard/components/switch-theme/item.d.ts +9 -0
- package/lib/modules/whiteboard/components/switch-theme/item.js +53 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +4 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.js +29 -0
- package/lib/modules/whiteboard/components/toolbar/ style.css +588 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.d.ts +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.js +38 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +107 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +59 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +44 -0
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +89 -0
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +63 -0
- package/lib/modules/whiteboard/components/toolbar/components/history.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/history.js +46 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/fold-icon.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/fold-icon.js +39 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/move-icon.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/move-icon.js +66 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.d.ts +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +134 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +106 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +168 -0
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +14 -0
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +211 -0
- package/lib/modules/whiteboard/components/toolbar/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/index.js +183 -0
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +51 -0
- package/lib/modules/whiteboard/components/toolbar/store.js +248 -0
- package/lib/modules/whiteboard/context.d.ts +69 -0
- package/lib/modules/whiteboard/context.js +36 -0
- package/lib/modules/whiteboard/index.d.ts +119 -0
- package/lib/modules/whiteboard/index.js +1134 -0
- package/lib/modules/whiteboard/style.css +143 -0
- package/lib/modules/whiteboard/type.d.ts +94 -0
- package/lib/modules/whiteboard/type.js +89 -0
- package/lib/modules/whiteboard/utils.d.ts +12 -0
- package/lib/modules/whiteboard/utils.js +36 -0
- package/lib/plugins/css-preset-plugin.d.ts +1 -0
- package/lib/plugins/css-preset-plugin.js +29 -0
- package/lib/plugins/module-dev-plugin.d.ts +12 -0
- package/lib/plugins/module-dev-plugin.js +183 -0
- package/lib/plugins/multi-lang-plugin.d.ts +1 -0
- package/lib/plugins/multi-lang-plugin.js +19 -0
- package/lib/plugins/rtm-plugin.d.ts +1 -0
- package/lib/plugins/rtm-plugin.js +5 -0
- package/lib/plugins/web-rtc-plugin.d.ts +1 -0
- package/lib/plugins/web-rtc-plugin.js +5 -0
- package/lib/translations/enUS.d.ts +1855 -0
- package/lib/translations/enUS.js +1895 -0
- package/lib/translations/zhCN.d.ts +1852 -0
- package/lib/translations/zhCN.js +1892 -0
- package/lib/type.d.ts +121 -0
- package/lib/type.js +46 -0
- package/lib/ui-manager.d.ts +32 -0
- package/lib/ui-manager.js +426 -0
- package/lib/ui-scene.d.ts +14 -0
- package/lib/ui-scene.js +141 -0
- package/lib/utilities/board-context.d.ts +4 -0
- package/lib/utilities/board-context.js +12 -0
- package/lib/utilities/constant.d.ts +286 -0
- package/lib/utilities/constant.js +271 -0
- package/lib/utilities/copyText.d.ts +2 -0
- package/lib/utilities/copyText.js +43 -0
- package/lib/utilities/extract.d.ts +5 -0
- package/lib/utilities/extract.js +117 -0
- package/lib/utilities/hooks.d.ts +14 -0
- package/lib/utilities/hooks.js +101 -0
- package/lib/utilities/mute-action.d.ts +4 -0
- package/lib/utilities/mute-action.js +48 -0
- package/lib/utilities/parameters.d.ts +7 -0
- package/lib/utilities/parameters.js +20 -0
- package/lib/utilities/regex.d.ts +1 -0
- package/lib/utilities/regex.js +14 -0
- package/lib/utilities/tools.d.ts +27 -0
- package/lib/utilities/tools.js +169 -0
- package/lib/utilities/useNamespace.d.ts +15 -0
- package/lib/utilities/useNamespace.js +66 -0
- package/package.json +63 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.messages = void 0;
|
|
8
|
+
require("core-js/modules/es.date.now.js");
|
|
9
|
+
var messages = exports.messages = [{
|
|
10
|
+
id: '1',
|
|
11
|
+
nickName: 'AliceAliceAlice',
|
|
12
|
+
uid: '111',
|
|
13
|
+
role: 'union-host',
|
|
14
|
+
time: '2023-12-29 12:20 AM',
|
|
15
|
+
msg: '测试 time 省略',
|
|
16
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
17
|
+
}, {
|
|
18
|
+
id: '2',
|
|
19
|
+
nickName: 'Alice',
|
|
20
|
+
uid: '111',
|
|
21
|
+
role: 'participant',
|
|
22
|
+
time: '2023-12-29 12:21 AM',
|
|
23
|
+
msg: 'Hello, how can I help youHello, how can I help youHello, how can I help youHello, how can I help youHello, how can I help you?',
|
|
24
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
25
|
+
}, {
|
|
26
|
+
id: '3',
|
|
27
|
+
nickName: 'Bob',
|
|
28
|
+
uid: '222',
|
|
29
|
+
role: 'participant',
|
|
30
|
+
time: '03-12 12:20 PM ',
|
|
31
|
+
msg: '测试别人发送的私聊消息',
|
|
32
|
+
color: 'var(--fcr_ui_scene_icontext1)',
|
|
33
|
+
isPrivate: true
|
|
34
|
+
},
|
|
35
|
+
// TODO: 当可视区域最后一条消息的时间距离现在,差 ? 时,需要插入一条时间消息
|
|
36
|
+
{
|
|
37
|
+
id: '4',
|
|
38
|
+
nickName: '',
|
|
39
|
+
uid: '',
|
|
40
|
+
color: '',
|
|
41
|
+
role: 'system',
|
|
42
|
+
time: '14:20 AM',
|
|
43
|
+
msg: '',
|
|
44
|
+
systemMsg: true,
|
|
45
|
+
chatLevel: 'everyone'
|
|
46
|
+
}, {
|
|
47
|
+
id: '5',
|
|
48
|
+
nickName: 'Alice',
|
|
49
|
+
uid: '111',
|
|
50
|
+
role: 'participant',
|
|
51
|
+
time: '14:20 PM',
|
|
52
|
+
msg: 'Hello, how can I help you?Hello, how can I help youHello, how can I help youHello, how can I help youHello, how can I help youHello, how can I help you?',
|
|
53
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
54
|
+
}, {
|
|
55
|
+
id: '6',
|
|
56
|
+
nickName: 'Bob',
|
|
57
|
+
uid: '222',
|
|
58
|
+
role: 'participant',
|
|
59
|
+
time: Date.now(),
|
|
60
|
+
msg: 'Hello, how can I help you?Hello, how can I help youHello, how can I help youHello, how can I help youHello, how can I help youHello, how can I help you?',
|
|
61
|
+
color: 'var(--fcr_ui_scene_icontext1)',
|
|
62
|
+
isPrivate: true
|
|
63
|
+
}, {
|
|
64
|
+
id: '7',
|
|
65
|
+
nickName: 'Bob',
|
|
66
|
+
uid: '222',
|
|
67
|
+
role: 'participant',
|
|
68
|
+
time: Date.now(),
|
|
69
|
+
msg: '测试私聊消息换行',
|
|
70
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
71
|
+
}, {
|
|
72
|
+
id: '8',
|
|
73
|
+
nickName: 'Alice_AliceAliceAlice',
|
|
74
|
+
uid: '111',
|
|
75
|
+
role: 'participant',
|
|
76
|
+
time: Date.now(),
|
|
77
|
+
msg: '测试名称 ... 截断',
|
|
78
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
79
|
+
}, {
|
|
80
|
+
id: '9',
|
|
81
|
+
nickName: 'Bob',
|
|
82
|
+
uid: '222',
|
|
83
|
+
role: 'participant',
|
|
84
|
+
time: Date.now(),
|
|
85
|
+
msg: 'Hello, how can I help you?',
|
|
86
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
87
|
+
}, {
|
|
88
|
+
id: '10',
|
|
89
|
+
nickName: 'Cherry',
|
|
90
|
+
uid: '333',
|
|
91
|
+
role: 'host',
|
|
92
|
+
time: Date.now(),
|
|
93
|
+
msg: 'Hello, how can I help you?',
|
|
94
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
95
|
+
}, {
|
|
96
|
+
id: '11',
|
|
97
|
+
nickName: 'Cherry',
|
|
98
|
+
uid: '333',
|
|
99
|
+
role: 'host',
|
|
100
|
+
time: Date.now(),
|
|
101
|
+
msg: 'Hello, how can I help you?',
|
|
102
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
103
|
+
}, {
|
|
104
|
+
id: '12',
|
|
105
|
+
nickName: 'Alice',
|
|
106
|
+
uid: '111',
|
|
107
|
+
role: 'host',
|
|
108
|
+
time: Date.now(),
|
|
109
|
+
msg: 'Hello, how can I help you?',
|
|
110
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
111
|
+
}, {
|
|
112
|
+
id: '13',
|
|
113
|
+
nickName: 'Alice',
|
|
114
|
+
uid: '111',
|
|
115
|
+
role: 'participant',
|
|
116
|
+
time: Date.now(),
|
|
117
|
+
msg: 'Hello, how can I help you?',
|
|
118
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
119
|
+
}, {
|
|
120
|
+
id: '14',
|
|
121
|
+
nickName: 'Bob',
|
|
122
|
+
uid: '222',
|
|
123
|
+
role: 'participant',
|
|
124
|
+
time: Date.now(),
|
|
125
|
+
msg: 'Hello, how can I help you?',
|
|
126
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
127
|
+
}, {
|
|
128
|
+
id: '15',
|
|
129
|
+
nickName: 'Alice',
|
|
130
|
+
uid: '111',
|
|
131
|
+
role: 'participant',
|
|
132
|
+
time: Date.now(),
|
|
133
|
+
msg: 'Hello, how can I help you?',
|
|
134
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
135
|
+
}, {
|
|
136
|
+
id: '16',
|
|
137
|
+
nickName: 'Bob',
|
|
138
|
+
uid: '222',
|
|
139
|
+
role: 'participant',
|
|
140
|
+
time: Date.now(),
|
|
141
|
+
msg: 'Hello, how can I help you?',
|
|
142
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
143
|
+
}, {
|
|
144
|
+
id: '17',
|
|
145
|
+
nickName: 'Bob',
|
|
146
|
+
uid: '222',
|
|
147
|
+
role: 'participant',
|
|
148
|
+
time: Date.now(),
|
|
149
|
+
msg: 'Hello, how can I help you?Hello, how can I help youHello, how can I help youHello, how can I help youHello, how can I help youHello, how can I help you?',
|
|
150
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
151
|
+
}, {
|
|
152
|
+
id: '18',
|
|
153
|
+
nickName: 'Alice',
|
|
154
|
+
uid: '111',
|
|
155
|
+
role: 'participant',
|
|
156
|
+
time: Date.now(),
|
|
157
|
+
msg: 'Hello, how can I help you?',
|
|
158
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
159
|
+
}, {
|
|
160
|
+
id: '19',
|
|
161
|
+
nickName: 'Bob',
|
|
162
|
+
uid: '222',
|
|
163
|
+
role: 'participant',
|
|
164
|
+
time: Date.now(),
|
|
165
|
+
msg: 'Hello, how can I help you?',
|
|
166
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
167
|
+
}, {
|
|
168
|
+
id: '20',
|
|
169
|
+
nickName: 'Cherry',
|
|
170
|
+
uid: '333',
|
|
171
|
+
role: 'host',
|
|
172
|
+
time: Date.now(),
|
|
173
|
+
msg: 'Hello, how can I help you?',
|
|
174
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
175
|
+
}, {
|
|
176
|
+
id: '21',
|
|
177
|
+
nickName: 'Cherry',
|
|
178
|
+
uid: '333',
|
|
179
|
+
role: 'host',
|
|
180
|
+
time: Date.now(),
|
|
181
|
+
msg: 'Hello, how can I help you?',
|
|
182
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
183
|
+
}, {
|
|
184
|
+
id: '22',
|
|
185
|
+
nickName: 'Alice',
|
|
186
|
+
uid: '111',
|
|
187
|
+
role: 'host',
|
|
188
|
+
time: Date.now(),
|
|
189
|
+
msg: 'Hello, how can I help you?',
|
|
190
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
191
|
+
}, {
|
|
192
|
+
id: '23',
|
|
193
|
+
nickName: 'Alice',
|
|
194
|
+
uid: '111',
|
|
195
|
+
role: 'participant',
|
|
196
|
+
time: Date.now(),
|
|
197
|
+
msg: 'Hello, how can I help you?',
|
|
198
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
199
|
+
}, {
|
|
200
|
+
id: '24',
|
|
201
|
+
nickName: 'Bob',
|
|
202
|
+
uid: '222',
|
|
203
|
+
role: 'participant',
|
|
204
|
+
time: Date.now(),
|
|
205
|
+
msg: 'Hello, how can I help you?',
|
|
206
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
207
|
+
}, {
|
|
208
|
+
id: '25',
|
|
209
|
+
nickName: 'Alice',
|
|
210
|
+
uid: '111',
|
|
211
|
+
role: 'participant',
|
|
212
|
+
time: Date.now(),
|
|
213
|
+
msg: 'Hello, how can I help you?',
|
|
214
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
215
|
+
}, {
|
|
216
|
+
id: '26',
|
|
217
|
+
nickName: 'Bob',
|
|
218
|
+
uid: '222',
|
|
219
|
+
role: 'participant',
|
|
220
|
+
time: Date.now(),
|
|
221
|
+
msg: 'Hello, how can I help you?',
|
|
222
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
223
|
+
}, {
|
|
224
|
+
id: '27',
|
|
225
|
+
nickName: 'Bob',
|
|
226
|
+
uid: '222',
|
|
227
|
+
role: 'participant',
|
|
228
|
+
time: Date.now(),
|
|
229
|
+
msg: 'Hello, how can I help you?',
|
|
230
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
231
|
+
}, {
|
|
232
|
+
id: '28',
|
|
233
|
+
nickName: 'Alice',
|
|
234
|
+
uid: '111',
|
|
235
|
+
role: 'participant',
|
|
236
|
+
time: Date.now(),
|
|
237
|
+
msg: 'Hello, how can I help you?',
|
|
238
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
239
|
+
}, {
|
|
240
|
+
id: '29',
|
|
241
|
+
nickName: 'Bob',
|
|
242
|
+
uid: '222',
|
|
243
|
+
role: 'participant',
|
|
244
|
+
time: Date.now(),
|
|
245
|
+
msg: 'Hello, how can I help you?',
|
|
246
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
247
|
+
}, {
|
|
248
|
+
id: '30',
|
|
249
|
+
nickName: 'Cherry',
|
|
250
|
+
uid: '333',
|
|
251
|
+
role: 'host',
|
|
252
|
+
time: Date.now(),
|
|
253
|
+
msg: 'Hello, how can I help you?',
|
|
254
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
255
|
+
}, {
|
|
256
|
+
id: '31',
|
|
257
|
+
nickName: 'Cherry',
|
|
258
|
+
uid: '333',
|
|
259
|
+
role: 'host',
|
|
260
|
+
time: Date.now(),
|
|
261
|
+
msg: 'Hello, how can I help you?',
|
|
262
|
+
color: 'var(--fcr_ui_scene_icontext1)'
|
|
263
|
+
}, {
|
|
264
|
+
id: '32',
|
|
265
|
+
nickName: 'Alice',
|
|
266
|
+
uid: '111',
|
|
267
|
+
color: '',
|
|
268
|
+
role: 'host',
|
|
269
|
+
time: Date.now(),
|
|
270
|
+
msg: '',
|
|
271
|
+
systemMsg: true,
|
|
272
|
+
chatLevel: 'no_one'
|
|
273
|
+
}, {
|
|
274
|
+
id: '33',
|
|
275
|
+
nickName: 'Cherry',
|
|
276
|
+
uid: '333',
|
|
277
|
+
color: '',
|
|
278
|
+
role: 'host',
|
|
279
|
+
time: Date.now(),
|
|
280
|
+
msg: '',
|
|
281
|
+
systemMsg: true,
|
|
282
|
+
chatLevel: 'everyone'
|
|
283
|
+
}];
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { FcrUserControl } from 'fcr-core';
|
|
2
|
+
import { RoleType } from 'agora-ui-foundation/lib/components/message-bubble';
|
|
3
|
+
import { FcrUserRole, FcrUserInfo } from 'fcr-core/lib/type';
|
|
4
|
+
import { FcrUIEventStore } from '../../common/event-store';
|
|
5
|
+
import { FcrSecurityStore } from '../../common/security-store';
|
|
6
|
+
import { CellMeasurerCache, List } from 'react-virtualized';
|
|
7
|
+
import { RoomType } from '../../utilities/constant';
|
|
8
|
+
import { AllowChatLevelType } from 'agora-ui-foundation/lib/components/chat-manager';
|
|
9
|
+
import { ToastConfig } from 'agora-ui-foundation/lib/components/toast';
|
|
10
|
+
import { FcrChatRoomConnectionState, FcrChatRoomControl, FcrChatRoomFile, FcrChatRoomMessageType, FcrChatRoomReceiveImageMessage, FcrChatRoomReceiveTextMessage } from 'fcr-core/lib/room-control/chatroom-control/type';
|
|
11
|
+
import { AgoraObservable } from 'agora-foundation/lib/utilities/observable';
|
|
12
|
+
type FcrChatRoomReceiveMessage = FcrChatRoomReceiveTextMessage | FcrChatRoomReceiveImageMessage;
|
|
13
|
+
export interface MsgListType {
|
|
14
|
+
id: string;
|
|
15
|
+
nickName: string;
|
|
16
|
+
uid: string;
|
|
17
|
+
role: RoleType;
|
|
18
|
+
time: number | string;
|
|
19
|
+
msg?: string;
|
|
20
|
+
img?: FcrChatRoomFile;
|
|
21
|
+
color: string;
|
|
22
|
+
systemMsg?: boolean;
|
|
23
|
+
chatLevel?: AllowChatLevelType;
|
|
24
|
+
isPrivate?: boolean;
|
|
25
|
+
target?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const USER_ALL = "All";
|
|
28
|
+
export declare const USER_NONE = "NONE";
|
|
29
|
+
export declare const allToUser: FcrUserInfo;
|
|
30
|
+
export declare const noUser: FcrUserInfo;
|
|
31
|
+
type FcrChatStoreObserver = {
|
|
32
|
+
onReceiveMessage: (msgs: FcrChatRoomReceiveMessage[], type: string) => void;
|
|
33
|
+
};
|
|
34
|
+
type ChatRoomStoreMap = {
|
|
35
|
+
[K in RoomType]?: ChatRoomStore;
|
|
36
|
+
};
|
|
37
|
+
type RoomTypeKeys = keyof typeof RoomType;
|
|
38
|
+
export default class ChatStore {
|
|
39
|
+
private _observable;
|
|
40
|
+
private _securityStore;
|
|
41
|
+
private _uiEventStore;
|
|
42
|
+
private _chatVisible;
|
|
43
|
+
private _eventObserver;
|
|
44
|
+
private _chatStoreObserver;
|
|
45
|
+
accessor chatRoomStores: ChatRoomStoreMap;
|
|
46
|
+
accessor activeTabIndex: RoomTypeKeys;
|
|
47
|
+
constructor({ chatRoomControl, userControl, uiEventStore, securityStore, }: {
|
|
48
|
+
chatRoomControl: FcrChatRoomControl;
|
|
49
|
+
userControl: FcrUserControl;
|
|
50
|
+
uiEventStore: FcrUIEventStore;
|
|
51
|
+
securityStore: FcrSecurityStore;
|
|
52
|
+
});
|
|
53
|
+
hasWaitingRoomPermission(): boolean;
|
|
54
|
+
private _handleReceiveMessage;
|
|
55
|
+
handlerActiveTab(key: RoomType): void;
|
|
56
|
+
private _handleEvent;
|
|
57
|
+
}
|
|
58
|
+
export declare class ChatRoomStore {
|
|
59
|
+
needCbBottomCount: number;
|
|
60
|
+
list: List | undefined;
|
|
61
|
+
mostRecentHeight: number;
|
|
62
|
+
mostRecentWidth: number;
|
|
63
|
+
cache: CellMeasurerCache;
|
|
64
|
+
scrollHeight: number;
|
|
65
|
+
scrollTop: number;
|
|
66
|
+
clientHeight: number;
|
|
67
|
+
firstMsgId: string;
|
|
68
|
+
lastReadInfo: {
|
|
69
|
+
index: number;
|
|
70
|
+
msgId: string;
|
|
71
|
+
};
|
|
72
|
+
lastScrollTop: undefined | number;
|
|
73
|
+
protected logger: import("agora-foundation/lib/logger").Logger;
|
|
74
|
+
private _uiEventStore;
|
|
75
|
+
private _userControl;
|
|
76
|
+
private _chatRoomControl;
|
|
77
|
+
private _securityStore;
|
|
78
|
+
private _chatStoreObservable;
|
|
79
|
+
private _maxMsgCount;
|
|
80
|
+
private _originalMessages;
|
|
81
|
+
private _disposers;
|
|
82
|
+
private _type;
|
|
83
|
+
private accessor _userInfo;
|
|
84
|
+
accessor messageList: MsgListType[];
|
|
85
|
+
accessor readMsgIndex: {
|
|
86
|
+
index: number;
|
|
87
|
+
msgId: string;
|
|
88
|
+
};
|
|
89
|
+
accessor readIdx: number;
|
|
90
|
+
accessor viewIdx: number;
|
|
91
|
+
accessor historyUnreadCount: number;
|
|
92
|
+
accessor hasHistoryMsg: boolean;
|
|
93
|
+
accessor newMsgsUnReadCnt: number;
|
|
94
|
+
accessor privateTargetUser: FcrUserInfo;
|
|
95
|
+
accessor chatLevel: AllowChatLevelType;
|
|
96
|
+
accessor currentUserMap: Map<string, FcrUserInfo>;
|
|
97
|
+
accessor textMsgInfo: {
|
|
98
|
+
textMsg: string;
|
|
99
|
+
height: number;
|
|
100
|
+
};
|
|
101
|
+
accessor privateTargetList: FcrUserInfo[];
|
|
102
|
+
accessor chatRoomState: FcrChatRoomConnectionState;
|
|
103
|
+
accessor hasNewMsg: boolean;
|
|
104
|
+
accessor userCount: number;
|
|
105
|
+
private _chatRoomObserver;
|
|
106
|
+
private _userObserver;
|
|
107
|
+
constructor({ chatRoomControl, userControl, uiEventStore, securityStore, type, chatStoreObservable, }: {
|
|
108
|
+
chatRoomControl: FcrChatRoomControl;
|
|
109
|
+
userControl: FcrUserControl;
|
|
110
|
+
uiEventStore: FcrUIEventStore;
|
|
111
|
+
securityStore: FcrSecurityStore;
|
|
112
|
+
type: string;
|
|
113
|
+
chatStoreObservable: AgoraObservable<FcrChatStoreObserver>;
|
|
114
|
+
});
|
|
115
|
+
private _setPrivateTargetList;
|
|
116
|
+
release(): void;
|
|
117
|
+
setLastScrollTop(value: number | undefined): void;
|
|
118
|
+
setMessageList(messages: MsgListType[]): void;
|
|
119
|
+
sendMessage(msg: string | FcrChatRoomFile, type: FcrChatRoomMessageType): Promise<void>;
|
|
120
|
+
private messageReceived;
|
|
121
|
+
setHasNewMsg(value: boolean): void;
|
|
122
|
+
private _handleTextMessageReceived;
|
|
123
|
+
getUserCount(): number;
|
|
124
|
+
private _onRemoteUserUpdate;
|
|
125
|
+
private _onUserPropertiesUpdated;
|
|
126
|
+
private _onUserInfoUpdated;
|
|
127
|
+
private _setCurrentUserMap;
|
|
128
|
+
private _resetCurrentUserMap;
|
|
129
|
+
private _refreshUserList;
|
|
130
|
+
handleNewMsg(msg: MsgListType): void;
|
|
131
|
+
updateReadMsgIndex(info?: {
|
|
132
|
+
index: number;
|
|
133
|
+
msgId: string;
|
|
134
|
+
}): void;
|
|
135
|
+
get allowChat(): boolean;
|
|
136
|
+
get allowedAllChat(): boolean | undefined;
|
|
137
|
+
get allowedPublicChatAndDisallowedPrivateChat(): boolean | undefined;
|
|
138
|
+
get disallowedPublicChatAndDisallowedPrivateChatToParticipant(): boolean | undefined;
|
|
139
|
+
get disallowedAllChat(): boolean | undefined;
|
|
140
|
+
get hasChatPermission(): boolean;
|
|
141
|
+
get hasChatSendPrivatePermission(): boolean;
|
|
142
|
+
get isHost(): boolean;
|
|
143
|
+
get isCohost(): boolean;
|
|
144
|
+
get localIsManager(): boolean;
|
|
145
|
+
private _addReactions;
|
|
146
|
+
initReadInfo(): void;
|
|
147
|
+
updateHistoryUnreadCnt(historyUnreadCount: number): void;
|
|
148
|
+
updateHasHistoryMsg(hasHistoryMsg: boolean): void;
|
|
149
|
+
updateScrollInfo(listScrollHeight: number, listScrollTop: number, listClientHeight: number): void;
|
|
150
|
+
updateViewIdx(viewIdx: number): void;
|
|
151
|
+
updateReadIdx(readIdx: number): void;
|
|
152
|
+
updateFirstMsgId(firstMsgId: string): void;
|
|
153
|
+
updateHistoryUnReadCount(historyUnReadCount: number): void;
|
|
154
|
+
updateList(list: List): void;
|
|
155
|
+
updateMostRecentHeight(mostRecentHeight: number): void;
|
|
156
|
+
updateMostRecentWidth(mostRecentWidth: number): void;
|
|
157
|
+
patchHandleMsg(): void;
|
|
158
|
+
forceNotifyMsgs(): void;
|
|
159
|
+
resetComponentCache(): void;
|
|
160
|
+
resetTargetUser(): void;
|
|
161
|
+
initChatLevel(): void;
|
|
162
|
+
setTargetUser(user: FcrUserInfo): void;
|
|
163
|
+
get targetUserIsOnline(): boolean;
|
|
164
|
+
get remoteUsers(): FcrUserInfo[];
|
|
165
|
+
handleChatPermissionUpdate(chatLevel: AllowChatLevelType): void;
|
|
166
|
+
updateChatLevel(chatLevel: AllowChatLevelType): void;
|
|
167
|
+
get privilegeOperator(): FcrUserInfo | undefined;
|
|
168
|
+
updateChatTextMsg(textMsgInfo: {
|
|
169
|
+
textMsg: string;
|
|
170
|
+
height: number;
|
|
171
|
+
}): void;
|
|
172
|
+
filterChatMember(list: FcrUserInfo[]): FcrUserInfo[];
|
|
173
|
+
hasSendMessagePermission(): boolean;
|
|
174
|
+
permitPrivateChat(userId: string): void;
|
|
175
|
+
handleToast(params: ToastConfig): void;
|
|
176
|
+
get isHostOrCoHost(): boolean;
|
|
177
|
+
setAllowChat(allowChat: boolean): void;
|
|
178
|
+
setAllowChatWithPayload(type: 'public' | 'private_to_manager'): void;
|
|
179
|
+
private _handleConnectionUpdated;
|
|
180
|
+
}
|
|
181
|
+
export declare function isManager(role: FcrUserRole): role is FcrUserRole.HOST | FcrUserRole.COHOST;
|
|
182
|
+
export declare function sortUsers(users: FcrUserInfo[]): FcrUserInfo[];
|
|
183
|
+
export {};
|