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.
Files changed (281) hide show
  1. package/lib/assets/ground_glass_bg.png +0 -0
  2. package/lib/base.d.ts +11 -0
  3. package/lib/base.js +39 -0
  4. package/lib/common/device-store.d.ts +86 -0
  5. package/lib/common/device-store.js +642 -0
  6. package/lib/common/device-stream-store.d.ts +26 -0
  7. package/lib/common/device-stream-store.js +298 -0
  8. package/lib/common/event-store.d.ts +124 -0
  9. package/lib/common/event-store.js +249 -0
  10. package/lib/common/global-context.d.ts +11 -0
  11. package/lib/common/global-context.js +9 -0
  12. package/lib/common/member-list-data-source.d.ts +28 -0
  13. package/lib/common/member-list-data-source.js +305 -0
  14. package/lib/common/participant-store.d.ts +195 -0
  15. package/lib/common/participant-store.js +1577 -0
  16. package/lib/common/security-store.d.ts +119 -0
  17. package/lib/common/security-store.js +948 -0
  18. package/lib/common/setting-store.d.ts +181 -0
  19. package/lib/common/setting-store.js +797 -0
  20. package/lib/common/type.d.ts +73 -0
  21. package/lib/common/type.js +22 -0
  22. package/lib/config/default-config.d.ts +32 -0
  23. package/lib/config/default-config.js +39 -0
  24. package/lib/config/setting-config.d.ts +16 -0
  25. package/lib/config/setting-config.js +17 -0
  26. package/lib/creator.d.ts +10 -0
  27. package/lib/creator.js +49 -0
  28. package/lib/global.d.ts +8 -0
  29. package/lib/hooks/meeting-time.d.ts +15 -0
  30. package/lib/hooks/meeting-time.js +92 -0
  31. package/lib/hooks/useIsNodePresent.d.ts +4 -0
  32. package/lib/hooks/useIsNodePresent.js +53 -0
  33. package/lib/hooks/useOnRefMount.d.ts +2 -0
  34. package/lib/hooks/useOnRefMount.js +27 -0
  35. package/lib/index.d.ts +6 -0
  36. package/lib/index.js +50 -0
  37. package/lib/mobile-global.css +28 -0
  38. package/lib/modules/action-bar/bottom-icons.d.ts +17 -0
  39. package/lib/modules/action-bar/bottom-icons.js +160 -0
  40. package/lib/modules/action-bar/context.d.ts +2 -0
  41. package/lib/modules/action-bar/context.js +9 -0
  42. package/lib/modules/action-bar/index.css +33 -0
  43. package/lib/modules/action-bar/index.d.ts +27 -0
  44. package/lib/modules/action-bar/index.js +46 -0
  45. package/lib/modules/action-bar/member-list-popup/attendee/index.css +130 -0
  46. package/lib/modules/action-bar/member-list-popup/attendee/index.d.ts +19 -0
  47. package/lib/modules/action-bar/member-list-popup/attendee/index.js +252 -0
  48. package/lib/modules/action-bar/member-list-popup/attendee/list.d.ts +1 -0
  49. package/lib/modules/action-bar/member-list-popup/attendee/list.js +82 -0
  50. package/lib/modules/action-bar/member-list-popup/index.css +35 -0
  51. package/lib/modules/action-bar/member-list-popup/index.d.ts +7 -0
  52. package/lib/modules/action-bar/member-list-popup/index.js +40 -0
  53. package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.css +0 -0
  54. package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.d.ts +12 -0
  55. package/lib/modules/action-bar/member-list-popup/participant-more-actions/index.js +58 -0
  56. package/lib/modules/action-bar/more-popup/index.css +71 -0
  57. package/lib/modules/action-bar/more-popup/index.d.ts +2 -0
  58. package/lib/modules/action-bar/more-popup/index.js +126 -0
  59. package/lib/modules/action-bar/store.d.ts +196 -0
  60. package/lib/modules/action-bar/store.js +1425 -0
  61. package/lib/modules/action-bar/type.d.ts +6 -0
  62. package/lib/modules/action-bar/type.js +13 -0
  63. package/lib/modules/action-bar/view.d.ts +2 -0
  64. package/lib/modules/action-bar/view.js +75 -0
  65. package/lib/modules/audio-stream/ index.d.ts +19 -0
  66. package/lib/modules/audio-stream/ index.js +109 -0
  67. package/lib/modules/audio-stream/index.d.ts +25 -0
  68. package/lib/modules/audio-stream/index.js +135 -0
  69. package/lib/modules/chat/chat-bar/index.css +97 -0
  70. package/lib/modules/chat/chat-bar/index.d.ts +12 -0
  71. package/lib/modules/chat/chat-bar/index.js +129 -0
  72. package/lib/modules/chat/chat-notification/index.css +71 -0
  73. package/lib/modules/chat/chat-notification/index.d.ts +3 -0
  74. package/lib/modules/chat/chat-notification/index.js +75 -0
  75. package/lib/modules/chat/chat-select/index.css +183 -0
  76. package/lib/modules/chat/chat-select/index.d.ts +12 -0
  77. package/lib/modules/chat/chat-select/index.js +223 -0
  78. package/lib/modules/chat/contex.d.ts +2 -0
  79. package/lib/modules/chat/contex.js +9 -0
  80. package/lib/modules/chat/demo-wrapper.d.ts +1 -0
  81. package/lib/modules/chat/demo-wrapper.js +42 -0
  82. package/lib/modules/chat/index.css +108 -0
  83. package/lib/modules/chat/index.d.ts +28 -0
  84. package/lib/modules/chat/index.dev.d.ts +1 -0
  85. package/lib/modules/chat/index.dev.js +58 -0
  86. package/lib/modules/chat/index.js +208 -0
  87. package/lib/modules/chat/message-list.d.ts +22 -0
  88. package/lib/modules/chat/message-list.js +617 -0
  89. package/lib/modules/chat/mock.d.ts +2 -0
  90. package/lib/modules/chat/mock.js +283 -0
  91. package/lib/modules/chat/store.d.ts +183 -0
  92. package/lib/modules/chat/store.js +1101 -0
  93. package/lib/modules/chat/util.d.ts +6 -0
  94. package/lib/modules/chat/util.js +69 -0
  95. package/lib/modules/chat/view.d.ts +11 -0
  96. package/lib/modules/chat/view.js +414 -0
  97. package/lib/modules/layout/bottom-drawer/index.css +34 -0
  98. package/lib/modules/layout/bottom-drawer/index.d.ts +3 -0
  99. package/lib/modules/layout/bottom-drawer/index.js +129 -0
  100. package/lib/modules/layout/components/Layout.d.ts +1 -0
  101. package/lib/modules/layout/components/Layout.js +98 -0
  102. package/lib/modules/layout/components/equip-request-popup/index.css +30 -0
  103. package/lib/modules/layout/components/equip-request-popup/index.d.ts +3 -0
  104. package/lib/modules/layout/components/equip-request-popup/index.js +78 -0
  105. package/lib/modules/layout/components/index.css +78 -0
  106. package/lib/modules/layout/components/index.d.ts +2 -0
  107. package/lib/modules/layout/components/index.js +25 -0
  108. package/lib/modules/layout/context.d.ts +2 -0
  109. package/lib/modules/layout/context.js +9 -0
  110. package/lib/modules/layout/drawer-header/index.css +27 -0
  111. package/lib/modules/layout/drawer-header/index.d.ts +10 -0
  112. package/lib/modules/layout/drawer-header/index.js +54 -0
  113. package/lib/modules/layout/index.css +22 -0
  114. package/lib/modules/layout/index.d.ts +8 -0
  115. package/lib/modules/layout/index.js +47 -0
  116. package/lib/modules/layout/store.d.ts +59 -0
  117. package/lib/modules/layout/store.js +379 -0
  118. package/lib/modules/layout/type.d.ts +65 -0
  119. package/lib/modules/layout/type.js +52 -0
  120. package/lib/modules/layout/view.d.ts +2 -0
  121. package/lib/modules/layout/view.js +10 -0
  122. package/lib/modules/member-layout/context.d.ts +2 -0
  123. package/lib/modules/member-layout/context.js +9 -0
  124. package/lib/modules/member-layout/data.d.ts +2 -0
  125. package/lib/modules/member-layout/data.js +304 -0
  126. package/lib/modules/member-layout/grid/index.css +98 -0
  127. package/lib/modules/member-layout/grid/index.d.ts +21 -0
  128. package/lib/modules/member-layout/grid/index.js +316 -0
  129. package/lib/modules/member-layout/index.css +88 -0
  130. package/lib/modules/member-layout/index.d.ts +8 -0
  131. package/lib/modules/member-layout/index.js +45 -0
  132. package/lib/modules/member-layout/share-toast/index.css +30 -0
  133. package/lib/modules/member-layout/share-toast/index.d.ts +5 -0
  134. package/lib/modules/member-layout/share-toast/index.js +43 -0
  135. package/lib/modules/member-layout/speaker/index.css +30 -0
  136. package/lib/modules/member-layout/speaker/index.d.ts +9 -0
  137. package/lib/modules/member-layout/speaker/index.js +28 -0
  138. package/lib/modules/member-layout/store.d.ts +70 -0
  139. package/lib/modules/member-layout/store.js +479 -0
  140. package/lib/modules/member-layout/user/index.css +121 -0
  141. package/lib/modules/member-layout/user/index.d.ts +34 -0
  142. package/lib/modules/member-layout/user/index.js +355 -0
  143. package/lib/modules/member-layout/user/types.d.ts +16 -0
  144. package/lib/modules/member-layout/user/types.js +6 -0
  145. package/lib/modules/member-layout/view.d.ts +2 -0
  146. package/lib/modules/member-layout/view.js +225 -0
  147. package/lib/modules/state-bar/context.d.ts +2 -0
  148. package/lib/modules/state-bar/context.js +9 -0
  149. package/lib/modules/state-bar/index.css +79 -0
  150. package/lib/modules/state-bar/index.d.ts +17 -0
  151. package/lib/modules/state-bar/index.js +55 -0
  152. package/lib/modules/state-bar/leaving-room/index.css +14 -0
  153. package/lib/modules/state-bar/leaving-room/index.d.ts +7 -0
  154. package/lib/modules/state-bar/leaving-room/index.js +38 -0
  155. package/lib/modules/state-bar/meeting-detail/index.css +72 -0
  156. package/lib/modules/state-bar/meeting-detail/index.d.ts +2 -0
  157. package/lib/modules/state-bar/meeting-detail/index.js +59 -0
  158. package/lib/modules/state-bar/meeting-detail/meeting-info/copy.d.ts +4 -0
  159. package/lib/modules/state-bar/meeting-detail/meeting-info/copy.js +81 -0
  160. package/lib/modules/state-bar/meeting-detail/meeting-info/index.css +92 -0
  161. package/lib/modules/state-bar/meeting-detail/meeting-info/index.d.ts +2 -0
  162. package/lib/modules/state-bar/meeting-detail/meeting-info/index.js +188 -0
  163. package/lib/modules/state-bar/meeting-detail/net-quality/index.css +27 -0
  164. package/lib/modules/state-bar/meeting-detail/net-quality/index.d.ts +2 -0
  165. package/lib/modules/state-bar/meeting-detail/net-quality/index.js +87 -0
  166. package/lib/modules/state-bar/store.d.ts +76 -0
  167. package/lib/modules/state-bar/store.js +561 -0
  168. package/lib/modules/state-bar/view.d.ts +7 -0
  169. package/lib/modules/state-bar/view.js +215 -0
  170. package/lib/modules/whiteboard/app.d.ts +2 -0
  171. package/lib/modules/whiteboard/app.js +41 -0
  172. package/lib/modules/whiteboard/components/control-bar/index.css +53 -0
  173. package/lib/modules/whiteboard/components/control-bar/index.d.ts +2 -0
  174. package/lib/modules/whiteboard/components/control-bar/index.js +156 -0
  175. package/lib/modules/whiteboard/components/control-bar/store.d.ts +35 -0
  176. package/lib/modules/whiteboard/components/control-bar/store.js +288 -0
  177. package/lib/modules/whiteboard/components/loading/index.css +76 -0
  178. package/lib/modules/whiteboard/components/loading/index.d.ts +2 -0
  179. package/lib/modules/whiteboard/components/loading/index.js +68 -0
  180. package/lib/modules/whiteboard/components/loading/loading.png +0 -0
  181. package/lib/modules/whiteboard/components/multi-window/index.css +65 -0
  182. package/lib/modules/whiteboard/components/multi-window/index.d.ts +5 -0
  183. package/lib/modules/whiteboard/components/multi-window/index.js +39 -0
  184. package/lib/modules/whiteboard/components/pagination/index.css +228 -0
  185. package/lib/modules/whiteboard/components/pagination/index.d.ts +15 -0
  186. package/lib/modules/whiteboard/components/pagination/index.js +163 -0
  187. package/lib/modules/whiteboard/components/pagination/store.d.ts +18 -0
  188. package/lib/modules/whiteboard/components/pagination/store.js +17 -0
  189. package/lib/modules/whiteboard/components/progress/index.d.ts +5 -0
  190. package/lib/modules/whiteboard/components/progress/index.js +43 -0
  191. package/lib/modules/whiteboard/components/progress/style.css +52 -0
  192. package/lib/modules/whiteboard/components/scene-pagination.d.ts +1 -0
  193. package/lib/modules/whiteboard/components/scene-pagination.js +30 -0
  194. package/lib/modules/whiteboard/components/switch-theme/index.css +98 -0
  195. package/lib/modules/whiteboard/components/switch-theme/index.d.ts +3 -0
  196. package/lib/modules/whiteboard/components/switch-theme/index.js +89 -0
  197. package/lib/modules/whiteboard/components/switch-theme/item.d.ts +9 -0
  198. package/lib/modules/whiteboard/components/switch-theme/item.js +53 -0
  199. package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +4 -0
  200. package/lib/modules/whiteboard/components/switch-theme/libs.js +29 -0
  201. package/lib/modules/whiteboard/components/toolbar/ style.css +588 -0
  202. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.d.ts +5 -0
  203. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.js +38 -0
  204. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.d.ts +1 -0
  205. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +107 -0
  206. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.d.ts +1 -0
  207. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +59 -0
  208. package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.d.ts +2 -0
  209. package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +44 -0
  210. package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.d.ts +4 -0
  211. package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +89 -0
  212. package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.d.ts +1 -0
  213. package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +63 -0
  214. package/lib/modules/whiteboard/components/toolbar/components/history.d.ts +2 -0
  215. package/lib/modules/whiteboard/components/toolbar/components/history.js +46 -0
  216. package/lib/modules/whiteboard/components/toolbar/components/icons/fold-icon.d.ts +2 -0
  217. package/lib/modules/whiteboard/components/toolbar/components/icons/fold-icon.js +39 -0
  218. package/lib/modules/whiteboard/components/toolbar/components/icons/move-icon.d.ts +1 -0
  219. package/lib/modules/whiteboard/components/toolbar/components/icons/move-icon.js +66 -0
  220. package/lib/modules/whiteboard/components/toolbar/components/move-handle.d.ts +5 -0
  221. package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +134 -0
  222. package/lib/modules/whiteboard/components/toolbar/components/pen-picker.d.ts +4 -0
  223. package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +106 -0
  224. package/lib/modules/whiteboard/components/toolbar/components/shape-picker.d.ts +4 -0
  225. package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +168 -0
  226. package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +14 -0
  227. package/lib/modules/whiteboard/components/toolbar/hooks/index.js +211 -0
  228. package/lib/modules/whiteboard/components/toolbar/index.d.ts +2 -0
  229. package/lib/modules/whiteboard/components/toolbar/index.js +183 -0
  230. package/lib/modules/whiteboard/components/toolbar/store.d.ts +51 -0
  231. package/lib/modules/whiteboard/components/toolbar/store.js +248 -0
  232. package/lib/modules/whiteboard/context.d.ts +69 -0
  233. package/lib/modules/whiteboard/context.js +36 -0
  234. package/lib/modules/whiteboard/index.d.ts +119 -0
  235. package/lib/modules/whiteboard/index.js +1134 -0
  236. package/lib/modules/whiteboard/style.css +143 -0
  237. package/lib/modules/whiteboard/type.d.ts +94 -0
  238. package/lib/modules/whiteboard/type.js +89 -0
  239. package/lib/modules/whiteboard/utils.d.ts +12 -0
  240. package/lib/modules/whiteboard/utils.js +36 -0
  241. package/lib/plugins/css-preset-plugin.d.ts +1 -0
  242. package/lib/plugins/css-preset-plugin.js +29 -0
  243. package/lib/plugins/module-dev-plugin.d.ts +12 -0
  244. package/lib/plugins/module-dev-plugin.js +183 -0
  245. package/lib/plugins/multi-lang-plugin.d.ts +1 -0
  246. package/lib/plugins/multi-lang-plugin.js +19 -0
  247. package/lib/plugins/rtm-plugin.d.ts +1 -0
  248. package/lib/plugins/rtm-plugin.js +5 -0
  249. package/lib/plugins/web-rtc-plugin.d.ts +1 -0
  250. package/lib/plugins/web-rtc-plugin.js +5 -0
  251. package/lib/translations/enUS.d.ts +1855 -0
  252. package/lib/translations/enUS.js +1895 -0
  253. package/lib/translations/zhCN.d.ts +1852 -0
  254. package/lib/translations/zhCN.js +1892 -0
  255. package/lib/type.d.ts +121 -0
  256. package/lib/type.js +46 -0
  257. package/lib/ui-manager.d.ts +32 -0
  258. package/lib/ui-manager.js +426 -0
  259. package/lib/ui-scene.d.ts +14 -0
  260. package/lib/ui-scene.js +141 -0
  261. package/lib/utilities/board-context.d.ts +4 -0
  262. package/lib/utilities/board-context.js +12 -0
  263. package/lib/utilities/constant.d.ts +286 -0
  264. package/lib/utilities/constant.js +271 -0
  265. package/lib/utilities/copyText.d.ts +2 -0
  266. package/lib/utilities/copyText.js +43 -0
  267. package/lib/utilities/extract.d.ts +5 -0
  268. package/lib/utilities/extract.js +117 -0
  269. package/lib/utilities/hooks.d.ts +14 -0
  270. package/lib/utilities/hooks.js +101 -0
  271. package/lib/utilities/mute-action.d.ts +4 -0
  272. package/lib/utilities/mute-action.js +48 -0
  273. package/lib/utilities/parameters.d.ts +7 -0
  274. package/lib/utilities/parameters.js +20 -0
  275. package/lib/utilities/regex.d.ts +1 -0
  276. package/lib/utilities/regex.js +14 -0
  277. package/lib/utilities/tools.d.ts +27 -0
  278. package/lib/utilities/tools.js +169 -0
  279. package/lib/utilities/useNamespace.d.ts +15 -0
  280. package/lib/utilities/useNamespace.js +66 -0
  281. 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 {};